aboutsummaryrefslogtreecommitdiffstats
path: root/development/verify-locale-strings.js
stat options
Period:
Authors:

Commits per author per week (path 'development/verify-locale-strings.js')

AuthorW16 2025W17 2025W18 2025W19 2025Total
Total00000
lass='add' style='width: 0.0%;'/> -rw-r--r--Makefile.am73
-rw-r--r--NEWS780
-rw-r--r--NEWS-1.02939
-rw-r--r--README252
-rw-r--r--RELEASE-NOTES88
-rw-r--r--a11y/.cvsignore2
-rw-r--r--a11y/ChangeLog103
-rw-r--r--a11y/Makefile.am16
-rw-r--r--a11y/calendar/.cvsignore6
-rw-r--r--a11y/calendar/Makefile.am78
-rw-r--r--a11y/calendar/ea-cal-view-event.c479
-rw-r--r--a11y/calendar/ea-cal-view-event.h64
-rw-r--r--a11y/calendar/ea-cal-view.c440
-rw-r--r--a11y/calendar/ea-cal-view.h64
-rw-r--r--a11y/calendar/ea-calendar-helpers.c148
-rw-r--r--a11y/calendar/ea-calendar-helpers.h43
-rw-r--r--a11y/calendar/ea-calendar.c151
-rw-r--r--a11y/calendar/ea-calendar.h38
-rw-r--r--a11y/calendar/ea-day-view-cell.c336
-rw-r--r--a11y/calendar/ea-day-view-cell.h91
-rw-r--r--a11y/calendar/ea-day-view-main-item.c1259
-rw-r--r--a11y/calendar/ea-day-view-main-item.h64
-rw-r--r--a11y/calendar/ea-day-view.c261
-rw-r--r--a11y/calendar/ea-day-view.h64
-rw-r--r--a11y/calendar/ea-gnome-calendar.c248
-rw-r--r--a11y/calendar/ea-gnome-calendar.h65
-rw-r--r--a11y/calendar/ea-week-view.c305
-rw-r--r--a11y/calendar/ea-week-view.h65
-rw-r--r--a11y/e-table/.cvsignore4
-rw-r--r--a11y/e-table/gal-a11y-e-cell-popup.c146
-rw-r--r--a11y/e-table/gal-a11y-e-cell-popup.h64
-rw-r--r--a11y/e-table/gal-a11y-e-cell-registry.c132
-rw-r--r--a11y/e-table/gal-a11y-e-cell-registry.h58
-rw-r--r--a11y/e-table/gal-a11y-e-cell-text.c567
-rw-r--r--a11y/e-table/gal-a11y-e-cell-text.h48
-rw-r--r--a11y/e-table/gal-a11y-e-cell-toggle.c163
-rw-r--r--a11y/e-table/gal-a11y-e-cell-toggle.h47
-rw-r--r--a11y/e-table/gal-a11y-e-cell-tree.c209
-rw-r--r--a11y/e-table/gal-a11y-e-cell-tree.h50
-rw-r--r--a11y/e-table/gal-a11y-e-cell.c551
-rw-r--r--a11y/e-table/gal-a11y-e-cell.h99
-rw-r--r--a11y/e-table/gal-a11y-e-table-factory.c83
-rw-r--r--a11y/e-table/gal-a11y-e-table-factory.h36
-rw-r--r--a11y/e-table/gal-a11y-e-table-item-factory.c96
-rw-r--r--a11y/e-table/gal-a11y-e-table-item-factory.h34
-rw-r--r--a11y/e-table/gal-a11y-e-table-item.c1285
-rw-r--r--a11y/e-table/gal-a11y-e-table-item.h44
-rw-r--r--a11y/e-table/gal-a11y-e-table.c157
-rw-r--r--a11y/e-table/gal-a11y-e-table.h43
-rw-r--r--a11y/e-table/gal-a11y-e-tree-factory.c81
-rw-r--r--a11y/e-table/gal-a11y-e-tree-factory.h34
-rw-r--r--a11y/e-table/gal-a11y-e-tree.c159
-rw-r--r--a11y/e-table/gal-a11y-e-tree.h41
-rw-r--r--a11y/e-text/.cvsignore4
-rw-r--r--a11y/e-text/gal-a11y-e-text-factory.c87
-rw-r--r--a11y/e-text/gal-a11y-e-text-factory.h36
-rw-r--r--a11y/e-text/gal-a11y-e-text.c1121
-rw-r--r--a11y/e-text/gal-a11y-e-text.h40
-rw-r--r--a11y/ea-cell-table.c207
-rw-r--r--a11y/ea-cell-table.h63
-rw-r--r--a11y/ea-factory.h113
-rw-r--r--a11y/gal-a11y-factory.h94
-rw-r--r--a11y/gal-a11y-util.c31
-rw-r--r--a11y/gal-a11y-util.h21
-rw-r--r--a11y/widgets/.cvsignore2
-rw-r--r--a11y/widgets/Makefile.am31
-rw-r--r--a11y/widgets/ea-calendar-cell.c305
-rw-r--r--a11y/widgets/ea-calendar-cell.h92
-rw-r--r--a11y/widgets/ea-calendar-item.c1247
-rw-r--r--a11y/widgets/ea-calendar-item.h77
-rw-r--r--a11y/widgets/ea-widgets.c35
-rw-r--r--a11y/widgets/ea-widgets.h34
-rw-r--r--acinclude.m4182
-rw-r--r--addressbook/.cvsignore6
-rw-r--r--addressbook/ChangeLog2951
-rw-r--r--addressbook/ChangeLog.pre-1-416758
-rw-r--r--addressbook/E-CARD-NEEDED-FIELDS9
-rw-r--r--addressbook/Makefile.am11
-rw-r--r--addressbook/conduit/.cvsignore9
-rw-r--r--addressbook/conduit/Makefile.am39
-rw-r--r--addressbook/conduit/address-conduit.c1713
-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/.cvsignore14
-rw-r--r--addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in143
-rw-r--r--addressbook/gui/component/Makefile.am108
-rw-r--r--addressbook/gui/component/addressbook-component.c431
-rw-r--r--addressbook/gui/component/addressbook-component.h62
-rw-r--r--addressbook/gui/component/addressbook-config.c1439
-rw-r--r--addressbook/gui/component/addressbook-config.h52
-rw-r--r--addressbook/gui/component/addressbook.c1087
-rw-r--r--addressbook/gui/component/addressbook.h20
-rw-r--r--addressbook/gui/component/apps_evolution_addressbook.schemas.in.in42
-rw-r--r--addressbook/gui/component/autocompletion-config.c150
-rw-r--r--addressbook/gui/component/autocompletion-config.h30
-rw-r--r--addressbook/gui/component/component-factory.c87
-rw-r--r--addressbook/gui/component/ldap-config.glade2722
-rw-r--r--addressbook/gui/component/select-names/.cvsignore15
-rw-r--r--addressbook/gui/component/select-names/Evolution-Addressbook-SelectNames.idl42
-rw-r--r--addressbook/gui/component/select-names/GNOME_Evolution_Addressbook_SelectNames.server.in.in31
-rw-r--r--addressbook/gui/component/select-names/Makefile.am96
-rw-r--r--addressbook/gui/component/select-names/e-select-names-bonobo.c600
-rw-r--r--addressbook/gui/component/select-names/e-select-names-bonobo.h66
-rw-r--r--addressbook/gui/component/select-names/e-select-names-completion.c1231
-rw-r--r--addressbook/gui/component/select-names/e-select-names-completion.h68
-rw-r--r--addressbook/gui/component/select-names/e-select-names-config-keys.h39
-rw-r--r--addressbook/gui/component/select-names/e-select-names-config.c117
-rw-r--r--addressbook/gui/component/select-names/e-select-names-config.h43
-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.h30
-rw-r--r--addressbook/gui/component/select-names/e-select-names-manager.c755
-rw-r--r--addressbook/gui/component/select-names/e-select-names-manager.h68
-rw-r--r--addressbook/gui/component/select-names/e-select-names-marshal.list3
-rw-r--r--addressbook/gui/component/select-names/e-select-names-model.c769
-rw-r--r--addressbook/gui/component/select-names/e-select-names-model.h88
-rw-r--r--addressbook/gui/component/select-names/e-select-names-popup.c399
-rw-r--r--addressbook/gui/component/select-names/e-select-names-popup.h36
-rw-r--r--addressbook/gui/component/select-names/e-select-names-section.etspec7
-rw-r--r--addressbook/gui/component/select-names/e-select-names-table-model.c366
-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.c852
-rw-r--r--addressbook/gui/component/select-names/e-select-names-text-model.h53
-rw-r--r--addressbook/gui/component/select-names/e-select-names.c845
-rw-r--r--addressbook/gui/component/select-names/e-select-names.etspec7
-rw-r--r--addressbook/gui/component/select-names/e-select-names.h101
-rw-r--r--addressbook/gui/component/select-names/recipient.glade45
-rw-r--r--addressbook/gui/component/select-names/select-names.glade435
-rw-r--r--addressbook/gui/contact-editor/.cvsignore11
-rw-r--r--addressbook/gui/contact-editor/Makefile.am43
-rw-r--r--addressbook/gui/contact-editor/contact-editor.glade2360
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor-address.c620
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor-address.h73
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor-fullname.c287
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor-fullname.h71
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor-marshal.list2
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c2612
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.h134
-rw-r--r--addressbook/gui/contact-editor/e-contact-quick-add.c457
-rw-r--r--addressbook/gui/contact-editor/e-contact-quick-add.h40
-rw-r--r--addressbook/gui/contact-editor/fulladdr.glade446
-rw-r--r--addressbook/gui/contact-editor/fullname.glade674
-rw-r--r--addressbook/gui/contact-editor/test-editor.c142
-rw-r--r--addressbook/gui/contact-list-editor/.cvsignore6
-rw-r--r--addressbook/gui/contact-list-editor/Makefile.am39
-rw-r--r--addressbook/gui/contact-list-editor/contact-list-editor.glade313
-rw-r--r--addressbook/gui/contact-list-editor/e-contact-list-editor-marshal.list4
-rw-r--r--addressbook/gui/contact-list-editor/e-contact-list-editor.c1297
-rw-r--r--addressbook/gui/contact-list-editor/e-contact-list-editor.etspec7
-rw-r--r--addressbook/gui/contact-list-editor/e-contact-list-editor.h113
-rw-r--r--addressbook/gui/contact-list-editor/e-contact-list-model.c265
-rw-r--r--addressbook/gui/contact-list-editor/e-contact-list-model.h51
-rw-r--r--addressbook/gui/merging/.cvsignore8
-rw-r--r--addressbook/gui/merging/Makefile.am24
-rw-r--r--addressbook/gui/merging/eab-contact-commit-duplicate-detected.glade212
-rw-r--r--addressbook/gui/merging/eab-contact-compare.c736
-rw-r--r--addressbook/gui/merging/eab-contact-compare.h73
-rw-r--r--addressbook/gui/merging/eab-contact-duplicate-detected.glade212
-rw-r--r--addressbook/gui/merging/eab-contact-merging.c197
-rw-r--r--addressbook/gui/merging/eab-contact-merging.h30
-rw-r--r--addressbook/gui/search/.cvsignore7
-rw-r--r--addressbook/gui/search/Makefile.am23
-rw-r--r--addressbook/gui/search/addresstypes.xml83
-rw-r--r--addressbook/gui/search/e-addressbook-search-dialog.c158
-rw-r--r--addressbook/gui/search/e-addressbook-search-dialog.h66
-rw-r--r--addressbook/gui/widgets/.cvsignore19
-rw-r--r--addressbook/gui/widgets/Makefile.am89
-rw-r--r--addressbook/gui/widgets/e-addressbook-model.c693
-rw-r--r--addressbook/gui/widgets/e-addressbook-model.h80
-rw-r--r--addressbook/gui/widgets/e-addressbook-reflow-adapter.c517
-rw-r--r--addressbook/gui/widgets/e-addressbook-reflow-adapter.h44
-rw-r--r--addressbook/gui/widgets/e-addressbook-table-adapter.c356
-rw-r--r--addressbook/gui/widgets/e-addressbook-table-adapter.h36
-rw-r--r--addressbook/gui/widgets/e-addressbook-treeview-adapter.c630
-rw-r--r--addressbook/gui/widgets/e-addressbook-treeview-adapter.h44
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.c1855
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.etspec58
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.h144
-rw-r--r--addressbook/gui/widgets/e-minicard-label.c508
-rw-r--r--addressbook/gui/widgets/e-minicard-label.h86
-rw-r--r--addressbook/gui/widgets/e-minicard-view-widget.c440
-rw-r--r--addressbook/gui/widgets/e-minicard-view-widget.h73
-rw-r--r--addressbook/gui/widgets/e-minicard-view.c581
-rw-r--r--addressbook/gui/widgets/e-minicard-view.h94
-rw-r--r--addressbook/gui/widgets/e-minicard.c968
-rw-r--r--addressbook/gui/widgets/e-minicard.h123
-rw-r--r--addressbook/gui/widgets/eab-contact-display.c486
-rw-r--r--addressbook/gui/widgets/eab-contact-display.h61
-rw-r--r--addressbook/gui/widgets/eab-gui-util.c819
-rw-r--r--addressbook/gui/widgets/eab-gui-util.h70
-rw-r--r--addressbook/gui/widgets/eab-marshal.list11
-rw-r--r--addressbook/gui/widgets/eab-popup-control.c1236
-rw-r--r--addressbook/gui/widgets/eab-popup-control.h85
-rw-r--r--addressbook/gui/widgets/eab-vcard-control.c310
-rw-r--r--addressbook/gui/widgets/eab-vcard-control.h8
-rw-r--r--addressbook/gui/widgets/gal-view-factory-minicard.c85
-rw-r--r--addressbook/gui/widgets/gal-view-factory-minicard.h35
-rw-r--r--addressbook/gui/widgets/gal-view-factory-treeview.c86
-rw-r--r--addressbook/gui/widgets/gal-view-factory-treeview.h35
-rw-r--r--addressbook/gui/widgets/gal-view-minicard.c227
-rw-r--r--addressbook/gui/widgets/gal-view-minicard.h45
-rw-r--r--addressbook/gui/widgets/gal-view-treeview.c234
-rw-r--r--addressbook/gui/widgets/gal-view-treeview.h43
-rw-r--r--addressbook/gui/widgets/test-reflow.c199
-rw-r--r--addressbook/printing/.cvsignore9
-rw-r--r--addressbook/printing/Makefile.am57
-rw-r--r--addressbook/printing/e-contact-print-envelope.c242
-rw-r--r--addressbook/printing/e-contact-print-envelope.h32
-rw-r--r--addressbook/printing/e-contact-print-style-editor.c155
-rw-r--r--addressbook/printing/e-contact-print-style-editor.h73
-rw-r--r--addressbook/printing/e-contact-print-types.h73
-rw-r--r--addressbook/printing/e-contact-print.c1106
-rw-r--r--addressbook/printing/e-contact-print.glade2018
-rw-r--r--addressbook/printing/e-contact-print.h36
-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.c93
-rw-r--r--addressbook/printing/test-print.c88
-rw-r--r--addressbook/tools/.cvsignore5
-rw-r--r--addressbook/tools/Makefile.am49
-rwxr-xr-xaddressbook/tools/csv2vcard236
-rw-r--r--addressbook/tools/evolution-addressbook-abuse.c91
-rw-r--r--addressbook/tools/evolution-addressbook-clean.in24
-rw-r--r--addressbook/tools/evolution-addressbook-export-list-cards.c780
-rw-r--r--addressbook/tools/evolution-addressbook-export-list-folders.c99
-rw-r--r--addressbook/tools/evolution-addressbook-export.c162
-rw-r--r--addressbook/tools/evolution-addressbook-export.h81
-rw-r--r--addressbook/tools/evolution-addressbook-import.c90
-rw-r--r--addressbook/util/.cvsignore4
-rw-r--r--addressbook/util/Makefile.am36
-rw-r--r--addressbook/util/eab-book-util.c293
-rw-r--r--addressbook/util/eab-book-util.h69
-rw-r--r--addressbook/util/eab-destination.c1569
-rw-r--r--addressbook/util/eab-destination.h128
-rw-r--r--addressbook/util/eab-marshal.list5
-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/ChangeLog45
-rw-r--r--art/ChangeLog.pre-1-4712
-rw-r--r--art/Makefile.am272
-rw-r--r--art/about-box.pngbin54200 -> 0 bytes-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/alarm.pngbin4384 -> 0 bytes-rw-r--r--art/all_contacts.xpm158
-rw-r--r--art/apply-filters-16.xpm48
-rw-r--r--art/appointment-reminder-excl.pngbin1234 -> 0 bytes-rw-r--r--art/appointment-reminder.pngbin1233 -> 0 bytes-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/calendar-and-tasks-settings.pngbin4134 -> 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/composer-settings.pngbin3508 -> 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/connect_to_url-16.xpm123
-rw-r--r--art/contact-is-a-list.pngbin173 -> 0 bytes-rw-r--r--art/contact-list-16.pngbin450 -> 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.pngbin2744 -> 0 bytes-rw-r--r--art/evolution-contacts.pngbin2744 -> 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-junk-mini.pngbin926 -> 0 bytes-rw-r--r--art/evolution-junk.pngbin4083 -> 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.pngbin5182 -> 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/flag-for-followup-16.pngbin562 -> 0 bytes-rw-r--r--art/flag-for-followup-48.pngbin3397 -> 0 bytes-rw-r--r--art/flag-for-followup-done-16.pngbin515 -> 0 bytes-rw-r--r--art/flag-for-followup-done-48.pngbin3273 -> 0 bytes-rw-r--r--art/flag-for-followup-done.xpm78
-rw-r--r--art/flag-for-followup.xpm78
-rw-r--r--art/folder-copy-16.pngbin376 -> 0 bytes-rw-r--r--art/folder-mini.pngbin342 -> 0 bytes-rw-r--r--art/folder-move-16.pngbin273 -> 0 bytes-rw-r--r--art/folder-settings.pngbin2753 -> 0 bytes-rw-r--r--art/folder.pngbin2088 -> 0 bytes-rw-r--r--art/folder.xpm73
-rw-r--r--art/font.pngbin2403 -> 0 bytes-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.pngbin4118 -> 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/inbox-mini.pngbin587 -> 0 bytes-rw-r--r--art/inbox.pngbin3385 -> 0 bytes-rw-r--r--art/info-bulb.pngbin2661 -> 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.xpm30
-rw-r--r--art/ldap-mini.pngbin542 -> 0 bytes-rw-r--r--art/ldap-settings.pngbin2109 -> 0 bytes-rw-r--r--art/ldap.pngbin2614 -> 0 bytes-rw-r--r--art/listview.xpm34
-rw-r--r--art/mail-accounts-settings.pngbin2328 -> 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-need-reply.xpm101
-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/mail.pngbin2855 -> 0 bytes-rw-r--r--art/malehead.pngbin2280 -> 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-16.pngbin907 -> 0 bytes-rw-r--r--art/meeting-request.pngbin3520 -> 0 bytes-rw-r--r--art/monkey-16.pngbin977 -> 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_all_day_event.pngbin692 -> 0 bytes-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.pngbin1051 -> 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/outbox-mini.pngbin575 -> 0 bytes-rw-r--r--art/outbox.pngbin2861 -> 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/post-message-16.pngbin574 -> 0 bytes-rw-r--r--art/post-reply-24.pngbin896 -> 0 bytes-rw-r--r--art/previous-message.pngbin1052 -> 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/public-folder-mini.pngbin516 -> 0 bytes-rw-r--r--art/public-folder.pngbin3416 -> 0 bytes-rw-r--r--art/rdf.pngbin4372 -> 0 bytes-rw-r--r--art/receive-24.pngbin869 -> 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.pngbin950 -> 0 bytes-rw-r--r--art/reply.pngbin916 -> 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/schedule-meeting-16.pngbin834 -> 0 bytes-rw-r--r--art/schedule-meeting-16.xpm178
-rw-r--r--art/schedule-meeting-24.pngbin1441 -> 0 bytes-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.pngbin518 -> 0 bytes-rw-r--r--art/send-24-receive.pngbin985 -> 0 bytes-rw-r--r--art/send-24.pngbin807 -> 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.xpm56
-rw-r--r--art/send.pngbin807 -> 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/settings-16.pngbin503 -> 0 bytes-rw-r--r--art/settings.pngbin1132 -> 0 bytes-rw-r--r--art/show_all_messages.xpm27
-rw-r--r--art/splash-1-0.pngbin91906 -> 0 bytes-rw-r--r--art/splash.pngbin98522 -> 0 bytes-rw-r--r--art/stock-edit-16.pngbin492 -> 0 bytes-rw-r--r--art/stock-edit-24.pngbin1092 -> 0 bytes-rw-r--r--art/stock-junk-24.pngbin1276 -> 0 bytes-rw-r--r--art/stock-notjunk-24.pngbin1459 -> 0 bytes-rw-r--r--art/summary-settings.pngbin4659 -> 0 bytes-rw-r--r--art/summary_preferences-16.pngbin584 -> 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/working-16.pngbin490 -> 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.sh24
-rw-r--r--calendar/.cvsignore6
-rw-r--r--calendar/AUTHORS7
-rw-r--r--calendar/ChangeLog4785
-rw-r--r--calendar/ChangeLog.pre-1-421872
-rw-r--r--calendar/Makefile.am12
-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.am34
-rw-r--r--calendar/conduits/calendar/calendar-conduit.c1908
-rw-r--r--calendar/conduits/calendar/e-calendar.conduit.in9
-rw-r--r--calendar/conduits/todo/.cvsignore9
-rw-r--r--calendar/conduits/todo/Makefile.am34
-rw-r--r--calendar/conduits/todo/e-todo.conduit.in9
-rw-r--r--calendar/conduits/todo/todo-conduit.c1413
-rw-r--r--calendar/gui/.cvsignore25
-rw-r--r--calendar/gui/GNOME_Evolution_Calendar.server.in.in146
-rw-r--r--calendar/gui/Makefile.am261
-rw-r--r--calendar/gui/alarm-notify/.cvsignore12
-rw-r--r--calendar/gui/alarm-notify/GNOME_Evolution_Calendar_AlarmNotify.server.in.in16
-rw-r--r--calendar/gui/alarm-notify/Makefile.am67
-rw-r--r--calendar/gui/alarm-notify/alarm-notify-dialog.c394
-rw-r--r--calendar/gui/alarm-notify/alarm-notify-dialog.h44
-rw-r--r--calendar/gui/alarm-notify/alarm-notify.c200
-rw-r--r--calendar/gui/alarm-notify/alarm-notify.glade189
-rw-r--r--calendar/gui/alarm-notify/alarm-notify.h62
-rw-r--r--calendar/gui/alarm-notify/alarm-queue.c1301
-rw-r--r--calendar/gui/alarm-notify/alarm-queue.h34
-rw-r--r--calendar/gui/alarm-notify/alarm.c305
-rw-r--r--calendar/gui/alarm-notify/alarm.h42
-rw-r--r--calendar/gui/alarm-notify/config-data.c168
-rw-r--r--calendar/gui/alarm-notify/config-data.h34
-rw-r--r--calendar/gui/alarm-notify/notify-main.c192
-rw-r--r--calendar/gui/alarm-notify/save.c142
-rw-r--r--calendar/gui/alarm-notify/save.h35
-rw-r--r--calendar/gui/alarm-notify/util.c45
-rw-r--r--calendar/gui/alarm-notify/util.h29
-rw-r--r--calendar/gui/apps_evolution_calendar.schemas.in.in359
-rw-r--r--calendar/gui/cal-search-bar.c513
-rw-r--r--calendar/gui/cal-search-bar.h70
-rw-r--r--calendar/gui/calendar-commands.c810
-rw-r--r--calendar/gui/calendar-commands.h42
-rw-r--r--calendar/gui/calendar-component.c902
-rw-r--r--calendar/gui/calendar-component.h67
-rw-r--r--calendar/gui/calendar-config-keys.h75
-rw-r--r--calendar/gui/calendar-config.c1027
-rw-r--r--calendar/gui/calendar-config.h220
-rw-r--r--calendar/gui/calendar-offline-handler.c345
-rw-r--r--calendar/gui/calendar-offline-handler.h69
-rw-r--r--calendar/gui/calendar-view-factory.c228
-rw-r--r--calendar/gui/calendar-view-factory.h64
-rw-r--r--calendar/gui/calendar-view.c288
-rw-r--r--calendar/gui/calendar-view.h66
-rw-r--r--calendar/gui/comp-editor-factory.c663
-rw-r--r--calendar/gui/comp-editor-factory.h58
-rw-r--r--calendar/gui/comp-util.c342
-rw-r--r--calendar/gui/comp-util.h45
-rw-r--r--calendar/gui/control-factory.c217
-rw-r--r--calendar/gui/control-factory.h30
-rw-r--r--calendar/gui/dialogs/.cvsignore8
-rw-r--r--calendar/gui/dialogs/Makefile.am106
-rw-r--r--calendar/gui/dialogs/alarm-options.c811
-rw-r--r--calendar/gui/dialogs/alarm-options.glade573
-rw-r--r--calendar/gui/dialogs/alarm-options.h28
-rw-r--r--calendar/gui/dialogs/alarm-page.c869
-rw-r--r--calendar/gui/dialogs/alarm-page.glade490
-rw-r--r--calendar/gui/dialogs/alarm-page.h62
-rw-r--r--calendar/gui/dialogs/cal-prefs-dialog.c686
-rw-r--r--calendar/gui/dialogs/cal-prefs-dialog.glade1319
-rw-r--r--calendar/gui/dialogs/cal-prefs-dialog.h41
-rw-r--r--calendar/gui/dialogs/cancel-comp.c99
-rw-r--r--calendar/gui/dialogs/cancel-comp.h30
-rw-r--r--calendar/gui/dialogs/changed-comp.c115
-rw-r--r--calendar/gui/dialogs/changed-comp.h30
-rw-r--r--calendar/gui/dialogs/comp-editor-page.c416
-rw-r--r--calendar/gui/dialogs/comp-editor-page.h111
-rw-r--r--calendar/gui/dialogs/comp-editor-util.c351
-rw-r--r--calendar/gui/dialogs/comp-editor-util.h40
-rw-r--r--calendar/gui/dialogs/comp-editor.c1497
-rw-r--r--calendar/gui/dialogs/comp-editor.h109
-rw-r--r--calendar/gui/dialogs/copy-source-dialog.c163
-rw-r--r--calendar/gui/dialogs/copy-source-dialog.h31
-rw-r--r--calendar/gui/dialogs/delete-comp.c159
-rw-r--r--calendar/gui/dialogs/delete-comp.h32
-rw-r--r--calendar/gui/dialogs/delete-error.c109
-rw-r--r--calendar/gui/dialogs/delete-error.h30
-rw-r--r--calendar/gui/dialogs/e-delegate-dialog.c322
-rw-r--r--calendar/gui/dialogs/e-delegate-dialog.glade113
-rw-r--r--calendar/gui/dialogs/e-delegate-dialog.h72
-rw-r--r--calendar/gui/dialogs/event-editor.c522
-rw-r--r--calendar/gui/dialogs/event-editor.h61
-rw-r--r--calendar/gui/dialogs/event-page.c1371
-rw-r--r--calendar/gui/dialogs/event-page.glade601
-rw-r--r--calendar/gui/dialogs/event-page.h61
-rw-r--r--calendar/gui/dialogs/meeting-page.c833
-rw-r--r--calendar/gui/dialogs/meeting-page.etspec21
-rw-r--r--calendar/gui/dialogs/meeting-page.glade241
-rw-r--r--calendar/gui/dialogs/meeting-page.h67
-rw-r--r--calendar/gui/dialogs/new-calendar.c268
-rw-r--r--calendar/gui/dialogs/new-calendar.glade239
-rw-r--r--calendar/gui/dialogs/new-calendar.h28
-rw-r--r--calendar/gui/dialogs/new-task-list.c145
-rw-r--r--calendar/gui/dialogs/new-task-list.glade193
-rw-r--r--calendar/gui/dialogs/new-task-list.h28
-rw-r--r--calendar/gui/dialogs/recur-comp.c106
-rw-r--r--calendar/gui/dialogs/recur-comp.h34
-rw-r--r--calendar/gui/dialogs/recurrence-page.c2411
-rw-r--r--calendar/gui/dialogs/recurrence-page.glade724
-rw-r--r--calendar/gui/dialogs/recurrence-page.h62
-rw-r--r--calendar/gui/dialogs/save-comp.c70
-rw-r--r--calendar/gui/dialogs/save-comp.h29
-rw-r--r--calendar/gui/dialogs/schedule-page.c517
-rw-r--r--calendar/gui/dialogs/schedule-page.glade24
-rw-r--r--calendar/gui/dialogs/schedule-page.h59
-rw-r--r--calendar/gui/dialogs/send-comp.c93
-rw-r--r--calendar/gui/dialogs/send-comp.h31
-rw-r--r--calendar/gui/dialogs/task-details-page.c781
-rw-r--r--calendar/gui/dialogs/task-details-page.glade384
-rw-r--r--calendar/gui/dialogs/task-details-page.h61
-rw-r--r--calendar/gui/dialogs/task-editor.c486
-rw-r--r--calendar/gui/dialogs/task-editor.h61
-rw-r--r--calendar/gui/dialogs/task-page.c926
-rw-r--r--calendar/gui/dialogs/task-page.glade477
-rw-r--r--calendar/gui/dialogs/task-page.h60
-rw-r--r--calendar/gui/e-alarm-list.c690
-rw-r--r--calendar/gui/e-alarm-list.h79
-rw-r--r--calendar/gui/e-cal-list-view-config.c247
-rw-r--r--calendar/gui/e-cal-list-view-config.h55
-rw-r--r--calendar/gui/e-cal-list-view.c525
-rw-r--r--calendar/gui/e-cal-list-view.etspec17
-rw-r--r--calendar/gui/e-cal-list-view.h97
-rw-r--r--calendar/gui/e-cal-model-calendar.c465
-rw-r--r--calendar/gui/e-cal-model-calendar.h60
-rw-r--r--calendar/gui/e-cal-model-tasks.c1017
-rw-r--r--calendar/gui/e-cal-model-tasks.h68
-rw-r--r--calendar/gui/e-cal-model.c1597
-rw-r--r--calendar/gui/e-cal-model.h111
-rw-r--r--calendar/gui/e-cal-view.c1492
-rw-r--r--calendar/gui/e-cal-view.h137
-rw-r--r--calendar/gui/e-calendar-marshal.list15
-rw-r--r--calendar/gui/e-calendar-table-config.c263
-rw-r--r--calendar/gui/e-calendar-table-config.h55
-rw-r--r--calendar/gui/e-calendar-table.c1464
-rw-r--r--calendar/gui/e-calendar-table.etspec25
-rw-r--r--calendar/gui/e-calendar-table.h101
-rw-r--r--calendar/gui/e-calendar-view.c1492
-rw-r--r--calendar/gui/e-calendar-view.h137
-rw-r--r--calendar/gui/e-cell-date-edit-config.c339
-rw-r--r--calendar/gui/e-cell-date-edit-config.h55
-rw-r--r--calendar/gui/e-cell-date-edit-text.c234
-rw-r--r--calendar/gui/e-cell-date-edit-text.h74
-rw-r--r--calendar/gui/e-comp-editor-registry.c212
-rw-r--r--calendar/gui/e-comp-editor-registry.h79
-rw-r--r--calendar/gui/e-date-edit-config.c269
-rw-r--r--calendar/gui/e-date-edit-config.h55
-rw-r--r--calendar/gui/e-date-time-list.c566
-rw-r--r--calendar/gui/e-date-time-list.h83
-rw-r--r--calendar/gui/e-day-view-config.c475
-rw-r--r--calendar/gui/e-day-view-config.h55
-rw-r--r--calendar/gui/e-day-view-layout.c352
-rw-r--r--calendar/gui/e-day-view-layout.h56
-rw-r--r--calendar/gui/e-day-view-main-item.c796
-rw-r--r--calendar/gui/e-day-view-main-item.h65
-rw-r--r--calendar/gui/e-day-view-time-item.c671
-rw-r--r--calendar/gui/e-day-view-time-item.h74
-rw-r--r--calendar/gui/e-day-view-top-item.c701
-rw-r--r--calendar/gui/e-day-view-top-item.h66
-rw-r--r--calendar/gui/e-day-view.c7229
-rw-r--r--calendar/gui/e-day-view.h586
-rw-r--r--calendar/gui/e-itip-control.c2373
-rw-r--r--calendar/gui/e-itip-control.glade493
-rw-r--r--calendar/gui/e-itip-control.h82
-rw-r--r--calendar/gui/e-meeting-attendee.c1000
-rw-r--r--calendar/gui/e-meeting-attendee.h172
-rw-r--r--calendar/gui/e-meeting-list-view.c460
-rw-r--r--calendar/gui/e-meeting-list-view.h62
-rw-r--r--calendar/gui/e-meeting-model.c1780
-rw-r--r--calendar/gui/e-meeting-model.h116
-rw-r--r--calendar/gui/e-meeting-store.c1295
-rw-r--r--calendar/gui/e-meeting-store.h108
-rw-r--r--calendar/gui/e-meeting-time-sel-item.c999
-rw-r--r--calendar/gui/e-meeting-time-sel-item.h78
-rw-r--r--calendar/gui/e-meeting-time-sel.c2850
-rw-r--r--calendar/gui/e-meeting-time-sel.etspec19
-rw-r--r--calendar/gui/e-meeting-time-sel.h379
-rw-r--r--calendar/gui/e-meeting-types.h78
-rw-r--r--calendar/gui/e-meeting-utils.c52
-rw-r--r--calendar/gui/e-meeting-utils.h49
-rw-r--r--calendar/gui/e-mini-calendar-config.c247
-rw-r--r--calendar/gui/e-mini-calendar-config.h55
-rw-r--r--calendar/gui/e-select-names-editable.c228
-rw-r--r--calendar/gui/e-select-names-editable.h64
-rw-r--r--calendar/gui/e-select-names-renderer.c176
-rw-r--r--calendar/gui/e-select-names-renderer.h63
-rw-r--r--calendar/gui/e-tasks.c1163
-rw-r--r--calendar/gui/e-tasks.h83
-rw-r--r--calendar/gui/e-timezone-entry.c320
-rw-r--r--calendar/gui/e-timezone-entry.h80
-rw-r--r--calendar/gui/e-week-view-config.c332
-rw-r--r--calendar/gui/e-week-view-config.h55
-rw-r--r--calendar/gui/e-week-view-event-item.c945
-rw-r--r--calendar/gui/e-week-view-event-item.h70
-rw-r--r--calendar/gui/e-week-view-layout.c425
-rw-r--r--calendar/gui/e-week-view-layout.h69
-rw-r--r--calendar/gui/e-week-view-main-item.c400
-rw-r--r--calendar/gui/e-week-view-main-item.h66
-rw-r--r--calendar/gui/e-week-view-titles-item.c296
-rw-r--r--calendar/gui/e-week-view-titles-item.h66
-rw-r--r--calendar/gui/e-week-view.c3676
-rw-r--r--calendar/gui/e-week-view.h438
-rw-r--r--calendar/gui/gnome-cal.c2925
-rw-r--r--calendar/gui/gnome-cal.h189
-rw-r--r--calendar/gui/gnome-calendar-conduit.pngbin3000 -> 0 bytes-rw-r--r--calendar/gui/goto-dialog.glade225
-rw-r--r--calendar/gui/goto.c266
-rw-r--r--calendar/gui/goto.h31
-rw-r--r--calendar/gui/itip-bonobo-control.c265
-rw-r--r--calendar/gui/itip-bonobo-control.h31
-rw-r--r--calendar/gui/itip-utils.c979
-rw-r--r--calendar/gui/itip-utils.h35
-rw-r--r--calendar/gui/main.c181
-rw-r--r--calendar/gui/migration.c150
-rw-r--r--calendar/gui/migration.h31
-rw-r--r--calendar/gui/misc.c80
-rw-r--r--calendar/gui/misc.h30
-rw-r--r--calendar/gui/print.c2658
-rw-r--r--calendar/gui/print.h43
-rw-r--r--calendar/gui/tag-calendar.c230
-rw-r--r--calendar/gui/tag-calendar.h33
-rw-r--r--calendar/gui/tasks-component.c812
-rw-r--r--calendar/gui/tasks-component.h60
-rw-r--r--calendar/gui/tasks-control.c627
-rw-r--r--calendar/gui/tasks-control.h34
-rw-r--r--calendar/gui/weekday-picker.c572
-rw-r--r--calendar/gui/weekday-picker.h71
-rw-r--r--calendar/idl/.cvsignore2
-rw-r--r--calendar/idl/Makefile.am5
-rw-r--r--calendar/idl/evolution-calendar.idl48
-rw-r--r--calendar/importers/.cvsignore6
-rw-r--r--calendar/importers/GNOME_Evolution_Calendar_Importer.server.in.in54
-rw-r--r--calendar/importers/Makefile.am53
-rw-r--r--calendar/importers/evolution-calendar-importer.h37
-rw-r--r--calendar/importers/icalendar-importer.c753
-rw-r--r--calendar/importers/main.c56
-rw-r--r--calendar/zones.h387
-rw-r--r--camel.pc.in15
-rw-r--r--camel/.cvsignore13
-rw-r--r--camel/CODING.STYLE19
-rw-r--r--camel/ChangeLog1488
-rw-r--r--camel/ChangeLog.pre-1-422083
-rw-r--r--camel/Makefile.am296
-rw-r--r--camel/README54
-rw-r--r--camel/README.COPYRIGHT46
-rw-r--r--camel/README.HACKING14
-rw-r--r--camel/README.mt171
-rw-r--r--camel/broken-date-parser.c532
-rw-r--r--camel/broken-date-parser.h33
-rw-r--r--camel/camel-address.c240
-rw-r--r--camel/camel-address.h79
-rw-r--r--camel/camel-arg.c130
-rw-r--r--camel/camel-arg.h119
-rw-r--r--camel/camel-block-file.c1181
-rw-r--r--camel/camel-block-file.h144
-rw-r--r--camel/camel-certdb.c665
-rw-r--r--camel/camel-certdb.h154
-rw-r--r--camel/camel-charset-map-private.h621
-rw-r--r--camel/camel-charset-map.c352
-rw-r--r--camel/camel-charset-map.h51
-rw-r--r--camel/camel-cipher-context.c585
-rw-r--r--camel/camel-cipher-context.h174
-rw-r--r--camel/camel-data-cache.c421
-rw-r--r--camel/camel-data-cache.h98
-rw-r--r--camel/camel-data-wrapper.c389
-rw-r--r--camel/camel-data-wrapper.h105
-rw-r--r--camel/camel-digest-folder.c396
-rw-r--r--camel/camel-digest-folder.h52
-rw-r--r--camel/camel-digest-store.c203
-rw-r--r--camel/camel-digest-store.h59
-rw-r--r--camel/camel-digest-summary.c90
-rw-r--r--camel/camel-digest-summary.h62
-rw-r--r--camel/camel-disco-diary.c436
-rw-r--r--camel/camel-disco-diary.h98
-rw-r--r--camel/camel-disco-folder.c399
-rw-r--r--camel/camel-disco-folder.h121
-rw-r--r--camel/camel-disco-store.c373
-rw-r--r--camel/camel-disco-store.h125
-rw-r--r--camel/camel-exception-list.def37
-rw-r--r--camel/camel-exception.c306
-rw-r--r--camel/camel-exception.h87
-rw-r--r--camel/camel-file-utils.c546
-rw-r--r--camel/camel-file-utils.h63
-rw-r--r--camel/camel-filter-driver.c1473
-rw-r--r--camel/camel-filter-driver.h119
-rw-r--r--camel/camel-filter-search.c703
-rw-r--r--camel/camel-filter-search.h54
-rw-r--r--camel/camel-folder-search.c1174
-rw-r--r--camel/camel-folder-search.h133
-rw-r--r--camel/camel-folder-summary.c2831
-rw-r--r--camel/camel-folder-summary.h350
-rw-r--r--camel/camel-folder-thread.c861
-rw-r--r--camel/camel-folder-thread.h75
-rw-r--r--camel/camel-folder.c2161
-rw-r--r--camel/camel-folder.h348
-rw-r--r--camel/camel-gpg-context.c1794
-rw-r--r--camel/camel-gpg-context.h64
-rw-r--r--camel/camel-html-parser.c807
-rw-r--r--camel/camel-html-parser.h78
-rw-r--r--camel/camel-http-stream.c583
-rw-r--r--camel/camel-http-stream.h105
-rw-r--r--camel/camel-i18n.h62
-rw-r--r--camel/camel-iconv.c646
-rw-r--r--camel/camel-iconv.h50
-rw-r--r--camel/camel-index-control.c213
-rw-r--r--camel/camel-index.c396
-rw-r--r--camel/camel-index.h165
-rw-r--r--camel/camel-internet-address.c551
-rw-r--r--camel/camel-internet-address.h65
-rw-r--r--camel/camel-junk-plugin.c75
-rw-r--r--camel/camel-junk-plugin.h59
-rw-r--r--camel/camel-lock-client.c321
-rw-r--r--camel/camel-lock-client.h41
-rw-r--r--camel/camel-lock-helper.c390
-rw-r--r--camel/camel-lock-helper.h69
-rw-r--r--camel/camel-lock.c425
-rw-r--r--camel/camel-lock.h63
-rw-r--r--camel/camel-medium.c332
-rw-r--r--camel/camel-medium.h97
-rw-r--r--camel/camel-mime-filter-basic.c291
-rw-r--r--camel/camel-mime-filter-basic.h71
-rw-r--r--camel/camel-mime-filter-bestenc.c300
-rw-r--r--camel/camel-mime-filter-bestenc.h101
-rw-r--r--camel/camel-mime-filter-canon.c239
-rw-r--r--camel/camel-mime-filter-canon.h65
-rw-r--r--camel/camel-mime-filter-charset.c277
-rw-r--r--camel/camel-mime-filter-charset.h62
-rw-r--r--camel/camel-mime-filter-crlf.c172
-rw-r--r--camel/camel-mime-filter-crlf.h73
-rw-r--r--camel/camel-mime-filter-enriched.c591
-rw-r--r--camel/camel-mime-filter-enriched.h67
-rw-r--r--camel/camel-mime-filter-from.c217
-rw-r--r--camel/camel-mime-filter-from.h57
-rw-r--r--camel/camel-mime-filter-html.c200
-rw-r--r--camel/camel-mime-filter-html.h57
-rw-r--r--camel/camel-mime-filter-index.c157
-rw-r--r--camel/camel-mime-filter-index.h65
-rw-r--r--camel/camel-mime-filter-linewrap.c147
-rw-r--r--camel/camel-mime-filter-linewrap.h60
-rw-r--r--camel/camel-mime-filter-save.c115
-rw-r--r--camel/camel-mime-filter-save.h61
-rw-r--r--camel/camel-mime-filter-tohtml.c447
-rw-r--r--camel/camel-mime-filter-tohtml.h82
-rw-r--r--camel/camel-mime-filter-windows.c180
-rw-r--r--camel/camel-mime-filter-windows.h65
-rw-r--r--camel/camel-mime-filter.c256
-rw-r--r--camel/camel-mime-filter.h94
-rw-r--r--camel/camel-mime-message.c963
-rw-r--r--camel/camel-mime-message.h140
-rw-r--r--camel/camel-mime-parser.c1982
-rw-r--r--camel/camel-mime-parser.h146
-rw-r--r--camel/camel-mime-part-utils.c137
-rw-r--r--camel/camel-mime-part-utils.h44
-rw-r--r--camel/camel-mime-part.c912
-rw-r--r--camel/camel-mime-part.h115
-rw-r--r--camel/camel-mime-utils.c4346
-rw-r--r--camel/camel-mime-utils.h273
-rw-r--r--camel/camel-movemail.c542
-rw-r--r--camel/camel-movemail.h44
-rw-r--r--camel/camel-multipart-encrypted.c273
-rw-r--r--camel/camel-multipart-encrypted.h83
-rw-r--r--camel/camel-multipart-signed.c763
-rw-r--r--camel/camel-multipart-signed.h108
-rw-r--r--camel/camel-multipart.c589
-rw-r--r--camel/camel-multipart.h104
-rw-r--r--camel/camel-news-address.c65
-rw-r--r--camel/camel-news-address.h56
-rw-r--r--camel/camel-object.c1834
-rw-r--r--camel/camel-object.h290
-rw-r--r--camel/camel-operation.c687
-rw-r--r--camel/camel-operation.h74
-rw-r--r--camel/camel-partition-table.c998
-rw-r--r--camel/camel-partition-table.h152
-rw-r--r--camel/camel-private.h168
-rw-r--r--camel/camel-process.c151
-rw-r--r--camel/camel-process.h44
-rw-r--r--camel/camel-provider.c192
-rw-r--r--camel/camel-provider.h201
-rw-r--r--camel/camel-sasl-anonymous.c152
-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.c898
-rw-r--r--camel/camel-sasl-digest-md5.h62
-rw-r--r--camel/camel-sasl-gssapi.c340
-rw-r--r--camel/camel-sasl-gssapi.h64
-rw-r--r--camel/camel-sasl-kerberos4.c224
-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-ntlm.c706
-rw-r--r--camel/camel-sasl-ntlm.h57
-rw-r--r--camel/camel-sasl-plain.c104
-rw-r--r--camel/camel-sasl-plain.h59
-rw-r--r--camel/camel-sasl-popb4smtp.c151
-rw-r--r--camel/camel-sasl-popb4smtp.h59
-rw-r--r--camel/camel-sasl.c285
-rw-r--r--camel/camel-sasl.h78
-rw-r--r--camel/camel-search-private.c684
-rw-r--r--camel/camel-search-private.h82
-rw-r--r--camel/camel-seekable-stream.c202
-rw-r--r--camel/camel-seekable-stream.h87
-rw-r--r--camel/camel-seekable-substream.c302
-rw-r--r--camel/camel-seekable-substream.h68
-rw-r--r--camel/camel-service.c958
-rw-r--r--camel/camel-service.h155
-rw-r--r--camel/camel-session.c901
-rw-r--r--camel/camel-session.h217
-rw-r--r--camel/camel-smime-context.c1061
-rw-r--r--camel/camel-smime-context.h79
-rw-r--r--camel/camel-store-summary.c928
-rw-r--r--camel/camel-store-summary.h176
-rw-r--r--camel/camel-store.c1228
-rw-r--r--camel/camel-store.h242
-rw-r--r--camel/camel-stream-buffer.c471
-rw-r--r--camel/camel-stream-buffer.h106
-rw-r--r--camel/camel-stream-filter.c406
-rw-r--r--camel/camel-stream-filter.h63
-rw-r--r--camel/camel-stream-fs.c304
-rw-r--r--camel/camel-stream-fs.h74
-rw-r--r--camel/camel-stream-mem.c248
-rw-r--r--camel/camel-stream-mem.h74
-rw-r--r--camel/camel-stream-null.c91
-rw-r--r--camel/camel-stream-null.h57
-rw-r--r--camel/camel-stream-process.c273
-rw-r--r--camel/camel-stream-process.h59
-rw-r--r--camel/camel-stream.c281
-rw-r--r--camel/camel-stream.h90
-rw-r--r--camel/camel-string-utils.c110
-rw-r--r--camel/camel-string-utils.h47
-rw-r--r--camel/camel-tcp-stream-openssl.c954
-rw-r--r--camel/camel-tcp-stream-raw.c562
-rw-r--r--camel/camel-tcp-stream-raw.h64
-rw-r--r--camel/camel-tcp-stream-ssl.c1211
-rw-r--r--camel/camel-tcp-stream-ssl.h75
-rw-r--r--camel/camel-tcp-stream.c249
-rw-r--r--camel/camel-tcp-stream.h140
-rw-r--r--camel/camel-text-index.c1948
-rw-r--r--camel/camel-text-index.h114
-rw-r--r--camel/camel-transport.c141
-rw-r--r--camel/camel-transport.h82
-rw-r--r--camel/camel-types.h83
-rw-r--r--camel/camel-uid-cache.c334
-rw-r--r--camel/camel-uid-cache.h60
-rw-r--r--camel/camel-url-scanner.c450
-rw-r--r--camel/camel-url-scanner.h73
-rw-r--r--camel/camel-url.c584
-rw-r--r--camel/camel-url.h90
-rw-r--r--camel/camel-utf8.c400
-rw-r--r--camel/camel-utf8.h41
-rw-r--r--camel/camel-vee-folder.c1683
-rw-r--r--camel/camel-vee-folder.h84
-rw-r--r--camel/camel-vee-store.c324
-rw-r--r--camel/camel-vee-store.h60
-rw-r--r--camel/camel-vtrash-folder.c209
-rw-r--r--camel/camel-vtrash-folder.h63
-rw-r--r--camel/camel.c115
-rw-r--r--camel/camel.h91
-rw-r--r--camel/devel-docs/camel-index.txt407
-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/providers/.cvsignore2
-rw-r--r--camel/providers/Makefile.am12
-rw-r--r--camel/providers/imap/.cvsignore11
-rw-r--r--camel/providers/imap/Makefile.am48
-rw-r--r--camel/providers/imap/camel-imap-command.c822
-rw-r--r--camel/providers/imap/camel-imap-command.h80
-rw-r--r--camel/providers/imap/camel-imap-folder.c2729
-rw-r--r--camel/providers/imap/camel-imap-folder.h90
-rw-r--r--camel/providers/imap/camel-imap-message-cache.c527
-rw-r--r--camel/providers/imap/camel-imap-message-cache.h111
-rw-r--r--camel/providers/imap/camel-imap-private.h76
-rw-r--r--camel/providers/imap/camel-imap-provider.c158
-rw-r--r--camel/providers/imap/camel-imap-search.c499
-rw-r--r--camel/providers/imap/camel-imap-search.h62
-rw-r--r--camel/providers/imap/camel-imap-store-summary.c619
-rw-r--r--camel/providers/imap/camel-imap-store-summary.h102
-rw-r--r--camel/providers/imap/camel-imap-store.c2845
-rw-r--r--camel/providers/imap/camel-imap-store.h148
-rw-r--r--camel/providers/imap/camel-imap-summary.c255
-rw-r--r--camel/providers/imap/camel-imap-summary.h79
-rw-r--r--camel/providers/imap/camel-imap-types.h39
-rw-r--r--camel/providers/imap/camel-imap-utils.c1261
-rw-r--r--camel/providers/imap/camel-imap-utils.h95
-rw-r--r--camel/providers/imap/camel-imap-wrapper.c185
-rw-r--r--camel/providers/imap/camel-imap-wrapper.h70
-rw-r--r--camel/providers/imap/libcamelimap.urls1
-rw-r--r--camel/providers/imapp/.cvsignore11
-rw-r--r--camel/providers/imapp/Makefile.am45
-rw-r--r--camel/providers/imapp/camel-imapp-driver.c771
-rw-r--r--camel/providers/imapp/camel-imapp-driver.h81
-rw-r--r--camel/providers/imapp/camel-imapp-engine.c1180
-rw-r--r--camel/providers/imapp/camel-imapp-engine.h155
-rw-r--r--camel/providers/imapp/camel-imapp-exception.h35
-rw-r--r--camel/providers/imapp/camel-imapp-fetch-stream.c183
-rw-r--r--camel/providers/imapp/camel-imapp-fetch-stream.h47
-rw-r--r--camel/providers/imapp/camel-imapp-folder.c269
-rw-r--r--camel/providers/imapp/camel-imapp-folder.h66
-rw-r--r--camel/providers/imapp/camel-imapp-provider.c97
-rw-r--r--camel/providers/imapp/camel-imapp-store-summary.c616
-rw-r--r--camel/providers/imapp/camel-imapp-store-summary.h102
-rw-r--r--camel/providers/imapp/camel-imapp-store.c1006
-rw-r--r--camel/providers/imapp/camel-imapp-store.h77
-rw-r--r--camel/providers/imapp/camel-imapp-stream.c761
-rw-r--r--camel/providers/imapp/camel-imapp-stream.h90
-rw-r--r--camel/providers/imapp/camel-imapp-summary.c166
-rw-r--r--camel/providers/imapp/camel-imapp-summary.h65
-rw-r--r--camel/providers/imapp/camel-imapp-utils.c1339
-rw-r--r--camel/providers/imapp/camel-imapp-utils.h145
-rw-r--r--camel/providers/imapp/libcamelimapp.urls1
-rw-r--r--camel/providers/local/.cvsignore11
-rw-r--r--camel/providers/local/Makefile.am61
-rw-r--r--camel/providers/local/camel-local-folder.c646
-rw-r--r--camel/providers/local/camel-local-folder.h109
-rw-r--r--camel/providers/local/camel-local-private.h53
-rw-r--r--camel/providers/local/camel-local-provider.c222
-rw-r--r--camel/providers/local/camel-local-store.c442
-rw-r--r--camel/providers/local/camel-local-store.h68
-rw-r--r--camel/providers/local/camel-local-summary.c614
-rw-r--r--camel/providers/local/camel-local-summary.h88
-rw-r--r--camel/providers/local/camel-maildir-folder.c245
-rw-r--r--camel/providers/local/camel-maildir-folder.h58
-rw-r--r--camel/providers/local/camel-maildir-store.c416
-rw-r--r--camel/providers/local/camel-maildir-store.h55
-rw-r--r--camel/providers/local/camel-maildir-summary.c807
-rw-r--r--camel/providers/local/camel-maildir-summary.h84
-rw-r--r--camel/providers/local/camel-mbox-folder.c549
-rw-r--r--camel/providers/local/camel-mbox-folder.h62
-rw-r--r--camel/providers/local/camel-mbox-store.c753
-rw-r--r--camel/providers/local/camel-mbox-store.h58
-rw-r--r--camel/providers/local/camel-mbox-summary.c1029
-rw-r--r--camel/providers/local/camel-mbox-summary.h75
-rw-r--r--camel/providers/local/camel-mh-folder.c231
-rw-r--r--camel/providers/local/camel-mh-folder.h58
-rw-r--r--camel/providers/local/camel-mh-store.c533
-rw-r--r--camel/providers/local/camel-mh-store.h60
-rw-r--r--camel/providers/local/camel-mh-summary.c420
-rw-r--r--camel/providers/local/camel-mh-summary.h53
-rw-r--r--camel/providers/local/camel-spool-folder.c186
-rw-r--r--camel/providers/local/camel-spool-folder.h64
-rw-r--r--camel/providers/local/camel-spool-store.c483
-rw-r--r--camel/providers/local/camel-spool-store.h69
-rw-r--r--camel/providers/local/camel-spool-summary.c344
-rw-r--r--camel/providers/local/camel-spool-summary.h69
-rw-r--r--camel/providers/local/libcamellocal.urls5
-rw-r--r--camel/providers/nntp/.cvsignore12
-rw-r--r--camel/providers/nntp/Makefile.am36
-rw-r--r--camel/providers/nntp/camel-nntp-auth.c92
-rw-r--r--camel/providers/nntp/camel-nntp-auth.h42
-rw-r--r--camel/providers/nntp/camel-nntp-folder.c405
-rw-r--r--camel/providers/nntp/camel-nntp-folder.h72
-rw-r--r--camel/providers/nntp/camel-nntp-grouplist.c219
-rw-r--r--camel/providers/nntp/camel-nntp-grouplist.h48
-rw-r--r--camel/providers/nntp/camel-nntp-newsrc.c651
-rw-r--r--camel/providers/nntp/camel-nntp-newsrc.h34
-rw-r--r--camel/providers/nntp/camel-nntp-private.h64
-rw-r--r--camel/providers/nntp/camel-nntp-provider.c113
-rw-r--r--camel/providers/nntp/camel-nntp-resp-codes.h55
-rw-r--r--camel/providers/nntp/camel-nntp-store.c576
-rw-r--r--camel/providers/nntp/camel-nntp-store.h92
-rw-r--r--camel/providers/nntp/camel-nntp-stream.c462
-rw-r--r--camel/providers/nntp/camel-nntp-stream.h66
-rw-r--r--camel/providers/nntp/camel-nntp-summary.c584
-rw-r--r--camel/providers/nntp/camel-nntp-summary.h67
-rw-r--r--camel/providers/nntp/camel-nntp-types.h33
-rw-r--r--camel/providers/nntp/camel-nntp-utils.c299
-rw-r--r--camel/providers/nntp/camel-nntp-utils.h41
-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.am38
-rw-r--r--camel/providers/pop3/camel-pop3-engine.c382
-rw-r--r--camel/providers/pop3/camel-pop3-engine.h134
-rw-r--r--camel/providers/pop3/camel-pop3-folder.c558
-rw-r--r--camel/providers/pop3/camel-pop3-folder.h77
-rw-r--r--camel/providers/pop3/camel-pop3-provider.c108
-rw-r--r--camel/providers/pop3/camel-pop3-store.c657
-rw-r--r--camel/providers/pop3/camel-pop3-store.h79
-rw-r--r--camel/providers/pop3/camel-pop3-stream.c471
-rw-r--r--camel/providers/pop3/camel-pop3-stream.h69
-rw-r--r--camel/providers/pop3/libcamelpop3.urls1
-rw-r--r--camel/providers/sendmail/.cvsignore11
-rw-r--r--camel/providers/sendmail/Makefile.am28
-rw-r--r--camel/providers/sendmail/camel-sendmail-provider.c63
-rw-r--r--camel/providers/sendmail/camel-sendmail-transport.c262
-rw-r--r--camel/providers/sendmail/camel-sendmail-transport.h63
-rw-r--r--camel/providers/sendmail/libcamelsendmail.urls1
-rw-r--r--camel/providers/smtp/.cvsignore10
-rw-r--r--camel/providers/smtp/Makefile.am35
-rw-r--r--camel/providers/smtp/camel-smtp-provider.c65
-rw-r--r--camel/providers/smtp/camel-smtp-transport.c1455
-rw-r--r--camel/providers/smtp/camel-smtp-transport.h89
-rw-r--r--camel/providers/smtp/libcamelsmtp.urls1
-rw-r--r--camel/tests/.cvsignore7
-rw-r--r--camel/tests/Makefile.am3
-rw-r--r--camel/tests/README44
-rw-r--r--camel/tests/data/camel-test.gpg.pub24
-rw-r--r--camel/tests/data/camel-test.gpg.sec33
-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/data/messages/.cvsignore1
-rw-r--r--camel/tests/folder/.cvsignore21
-rw-r--r--camel/tests/folder/Makefile.am28
-rw-r--r--camel/tests/folder/README12
-rw-r--r--camel/tests/folder/test1.c50
-rw-r--r--camel/tests/folder/test10.c103
-rw-r--r--camel/tests/folder/test2.c58
-rw-r--r--camel/tests/folder/test3.c339
-rw-r--r--camel/tests/folder/test4.c53
-rw-r--r--camel/tests/folder/test5.c53
-rw-r--r--camel/tests/folder/test6.c56
-rw-r--r--camel/tests/folder/test7.c55
-rw-r--r--camel/tests/folder/test8.c205
-rw-r--r--camel/tests/folder/test9.c229
-rw-r--r--camel/tests/lib/.cvsignore12
-rw-r--r--camel/tests/lib/Makefile.am22
-rw-r--r--camel/tests/lib/address-data.h93
-rw-r--r--camel/tests/lib/addresses.c54
-rw-r--r--camel/tests/lib/addresses.h5
-rw-r--r--camel/tests/lib/camel-test.c355
-rw-r--r--camel/tests/lib/camel-test.h68
-rw-r--r--camel/tests/lib/folders.c568
-rw-r--r--camel/tests/lib/folders.h20
-rw-r--r--camel/tests/lib/messages.c290
-rw-r--r--camel/tests/lib/messages.h15
-rw-r--r--camel/tests/lib/session.c44
-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.am25
-rw-r--r--camel/tests/message/README9
-rw-r--r--camel/tests/message/test1.c201
-rw-r--r--camel/tests/message/test2.c326
-rw-r--r--camel/tests/message/test3.c199
-rw-r--r--camel/tests/message/test4.c129
-rw-r--r--camel/tests/mime-filter/.cvsignore8
-rw-r--r--camel/tests/mime-filter/Makefile.am36
-rw-r--r--camel/tests/mime-filter/charset-gb2312.0.in448
-rw-r--r--camel/tests/mime-filter/charset-gb2312.0.out448
-rw-r--r--camel/tests/mime-filter/charset-iso-2022-jp.0.in5
-rw-r--r--camel/tests/mime-filter/charset-iso-2022-jp.0.out5
-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/data/html.0.in10
-rw-r--r--camel/tests/mime-filter/data/html.0.out10
-rw-r--r--camel/tests/mime-filter/data/html.1.in10
-rw-r--r--camel/tests/mime-filter/data/html.1.out10
-rw-r--r--camel/tests/mime-filter/test-charset.c140
-rw-r--r--camel/tests/mime-filter/test-crlf.c160
-rw-r--r--camel/tests/mime-filter/test-tohtml.c132
-rw-r--r--camel/tests/misc/.cvsignore14
-rw-r--r--camel/tests/misc/Makefile.am27
-rw-r--r--camel/tests/misc/README4
-rw-r--r--camel/tests/misc/split.c113
-rw-r--r--camel/tests/misc/url.c123
-rw-r--r--camel/tests/misc/utf7.c106
-rw-r--r--camel/tests/smime/.cvsignore5
-rw-r--r--camel/tests/smime/Makefile.am24
-rw-r--r--camel/tests/smime/README2
-rw-r--r--camel/tests/smime/pgp-mime.c214
-rw-r--r--camel/tests/smime/pgp.c246
-rw-r--r--camel/tests/smime/pkcs7.c178
-rw-r--r--camel/tests/stream/.cvsignore14
-rw-r--r--camel/tests/stream/Makefile.am25
-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/.cvsignore22
-rw-r--r--composer/ChangeLog399
-rw-r--r--composer/ChangeLog.pre-1-44037
-rw-r--r--composer/Composer.idl4
-rw-r--r--composer/Evolution-Composer.idl141
-rw-r--r--composer/Makefile.am87
-rw-r--r--composer/bad-icon.xpm53
-rw-r--r--composer/e-msg-composer-attachment-bar.c850
-rw-r--r--composer/e-msg-composer-attachment-bar.h77
-rw-r--r--composer/e-msg-composer-attachment.c457
-rw-r--r--composer/e-msg-composer-attachment.glade237
-rw-r--r--composer/e-msg-composer-attachment.h77
-rw-r--r--composer/e-msg-composer-hdrs.c1342
-rw-r--r--composer/e-msg-composer-hdrs.h152
-rw-r--r--composer/e-msg-composer-select-file.c136
-rw-r--r--composer/e-msg-composer-select-file.h35
-rw-r--r--composer/e-msg-composer.c5055
-rw-r--r--composer/e-msg-composer.h226
-rw-r--r--composer/evolution-composer.c397
-rw-r--r--composer/evolution-composer.h75
-rw-r--r--composer/listener.c275
-rw-r--r--composer/listener.h51
-rw-r--r--configure.in1384
-rw-r--r--data/.cvsignore4
-rw-r--r--data/Makefile.am65
-rw-r--r--data/cde_app_root/.cvsignore2
-rw-r--r--data/cde_app_root/Makefile.am1
-rw-r--r--data/cde_app_root/dt/.cvsignore2
-rw-r--r--data/cde_app_root/dt/Makefile.am1
-rw-r--r--data/cde_app_root/dt/appconfig/.cvsignore2
-rw-r--r--data/cde_app_root/dt/appconfig/Makefile.am1
-rw-r--r--data/cde_app_root/dt/appconfig/appmanager/.cvsignore2
-rw-r--r--data/cde_app_root/dt/appconfig/appmanager/C/.cvsignore2
-rw-r--r--data/cde_app_root/dt/appconfig/appmanager/C/Makefile.am1
-rw-r--r--data/cde_app_root/dt/appconfig/appmanager/C/Ximian/.cvsignore2
-rwxr-xr-xdata/cde_app_root/dt/appconfig/appmanager/C/Ximian/Evolution17
-rw-r--r--data/cde_app_root/dt/appconfig/appmanager/C/Ximian/Makefile.am6
-rw-r--r--data/cde_app_root/dt/appconfig/appmanager/Makefile.am1
-rw-r--r--data/cde_app_root/dt/appconfig/icons/.cvsignore2
-rw-r--r--data/cde_app_root/dt/appconfig/icons/C/.cvsignore2
-rw-r--r--data/cde_app_root/dt/appconfig/icons/C/Evolution.l.pm307
-rw-r--r--data/cde_app_root/dt/appconfig/icons/C/Evolution.m.pm291
-rw-r--r--data/cde_app_root/dt/appconfig/icons/C/Evolution.t.pm103
-rw-r--r--data/cde_app_root/dt/appconfig/icons/C/Makefile.am15
-rw-r--r--data/cde_app_root/dt/appconfig/icons/C/Ximian.l.pm147
-rw-r--r--data/cde_app_root/dt/appconfig/icons/C/Ximian.m.pm272
-rw-r--r--data/cde_app_root/dt/appconfig/icons/C/Ximian.t.pm289
-rw-r--r--data/cde_app_root/dt/appconfig/icons/Makefile.am1
-rw-r--r--data/cde_app_root/dt/appconfig/types/.cvsignore2
-rw-r--r--data/cde_app_root/dt/appconfig/types/C/.cvsignore3
-rw-r--r--data/cde_app_root/dt/appconfig/types/C/Makefile.am6
-rw-r--r--data/cde_app_root/dt/appconfig/types/C/Ximian.dt.in30
-rw-r--r--data/cde_app_root/dt/appconfig/types/Makefile.am1
-rw-r--r--data/evolution.141
-rw-r--r--data/evolution.desktop.in.in12
-rw-r--r--data/evolution.keys.in24
-rw-r--r--data/evolution.mime5
-rw-r--r--default_user/.cvsignore2
-rw-r--r--default_user/ChangeLog0
-rw-r--r--default_user/ChangeLog.pre-1-4336
-rw-r--r--default_user/Makefile.am19
-rw-r--r--default_user/addressbook-sources.xml10
-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/calendar.ics5
-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/Drafts/mbox0
-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/mbox432
-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/Outbox/mbox0
-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/Sent/mbox0
-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/Tasks/tasks.ics5
-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.xml110
-rw-r--r--default_user/vfolders.xml25
-rw-r--r--designs/ChangeLog36
-rw-r--r--designs/OOA/Comments3
-rw-r--r--designs/OOA/ooa.glade488
-rw-r--r--designs/OOA/oooa_question.pngbin16230 -> 0 bytes-rw-r--r--designs/OOA/oooa_screenshot.pngbin14630 -> 0 bytes-rw-r--r--designs/OOA/outlook_question.pngbin9421 -> 0 bytes-rw-r--r--designs/OOA/outlook_screenshot.pngbin54458 -> 0 bytes-rw-r--r--designs/OOA/spec.txt29
-rw-r--r--designs/read_receipts/.cvsignore1
-rw-r--r--designs/read_receipts/Comments3
-rw-r--r--designs/read_receipts/notification-of-rr-request.jpgbin26853 -> 0 bytes-rw-r--r--designs/read_receipts/proposal.pngbin26147 -> 0 bytes-rw-r--r--designs/read_receipts/read.glade339
-rw-r--r--designs/read_receipts/read.gladep7
-rw-r--r--designs/read_receipts/read_receipt_options.jpgbin40847 -> 0 bytes-rw-r--r--designs/read_receipts/receipt.jpgbin103530 -> 0 bytes-rw-r--r--designs/read_receipts/secure_options.jpgbin18181 -> 0 bytes-rw-r--r--designs/read_receipts/spec.txt67
-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/ChangeLog0
-rw-r--r--doc/ChangeLog.pre-1-41146
-rw-r--r--doc/Design201
-rw-r--r--doc/Keybindings13
-rw-r--r--doc/Makefile.am3
-rw-r--r--doc/NAMESPACE65
-rw-r--r--doc/devel/.cvsignore5
-rw-r--r--doc/devel/ChangeLog6
-rw-r--r--doc/devel/ChangeLog.pre-1-4286
-rw-r--r--doc/devel/Makefile.am179
-rw-r--r--doc/devel/calendar/.cvsignore2
-rw-r--r--doc/devel/calendar/Makefile.am7
-rw-r--r--doc/devel/calendar/alarm-generation.sgml155
-rw-r--r--doc/devel/calendar/architecture.sgml162
-rw-r--r--doc/devel/calendar/cal-client/.cvsignore13
-rw-r--r--doc/devel/calendar/cal-client/Makefile.am196
-rw-r--r--doc/devel/calendar/cal-client/evolution-cal-client-decl.txt526
-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.sgml354
-rw-r--r--doc/devel/calendar/cal-client/tmpl/evolution-cal-client-unused.sgml84
-rw-r--r--doc/devel/calendar/cal-util/.cvsignore13
-rw-r--r--doc/devel/calendar/cal-util/Makefile.am196
-rw-r--r--doc/devel/calendar/cal-util/evolution-cal-util-decl.txt1039
-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.sgml992
-rw-r--r--doc/devel/calendar/cal-util/tmpl/cal-recur.sgml45
-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.sgml322
-rw-r--r--doc/devel/calendar/cal-util/tmpl/timeutil.sgml73
-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/.cvsignore9
-rw-r--r--e-util/ChangeLog340
-rw-r--r--e-util/ChangeLog.pre-1-42649
-rw-r--r--e-util/Makefile.am117
-rw-r--r--e-util/e-account-list.c472
-rw-r--r--e-util/e-account-list.h75
-rw-r--r--e-util/e-account.c560
-rw-r--r--e-util/e-account.h106
-rw-r--r--e-util/e-bit-array.c429
-rw-r--r--e-util/e-bit-array.h104
-rw-r--r--e-util/e-categories-config.c202
-rw-r--r--e-util/e-categories-config.h34
-rw-r--r--e-util/e-categories-master-list-wombat.c183
-rw-r--r--e-util/e-categories-master-list-wombat.h31
-rw-r--r--e-util/e-component-listener.c171
-rw-r--r--e-util/e-component-listener.h47
-rw-r--r--e-util/e-config-listener.c607
-rw-r--r--e-util/e-config-listener.h80
-rw-r--r--e-util/e-corba-utils.c42
-rw-r--r--e-util/e-corba-utils.h30
-rw-r--r--e-util/e-dialog-utils.c284
-rw-r--r--e-util/e-dialog-utils.h45
-rw-r--r--e-util/e-dialog-widgets.c811
-rw-r--r--e-util/e-dialog-widgets.h60
-rw-r--r--e-util/e-gtk-utils.c216
-rw-r--r--e-util/e-gtk-utils.h49
-rw-r--r--e-util/e-gui-utils.c171
-rw-r--r--e-util/e-gui-utils.h14
-rw-r--r--e-util/e-host-utils.c380
-rw-r--r--e-util/e-host-utils.h38
-rw-r--r--e-util/e-html-utils.c521
-rw-r--r--e-util/e-html-utils.h39
-rw-r--r--e-util/e-i18n.h74
-rw-r--r--e-util/e-iconv.c614
-rw-r--r--e-util/e-iconv.h49
-rw-r--r--e-util/e-iterator.c183
-rw-r--r--e-util/e-iterator.h71
-rw-r--r--e-util/e-lang-utils.c68
-rw-r--r--e-util/e-lang-utils.h31
-rw-r--r--e-util/e-list-iterator.c249
-rw-r--r--e-util/e-list-iterator.h46
-rw-r--r--e-util/e-list.c191
-rw-r--r--e-util/e-list.h71
-rw-r--r--e-util/e-marshal.list51
-rw-r--r--e-util/e-memory.c1306
-rw-r--r--e-util/e-memory.h74
-rw-r--r--e-util/e-meta.c521
-rw-r--r--e-util/e-meta.h60
-rw-r--r--e-util/e-mktemp.c271
-rw-r--r--e-util/e-mktemp.h32
-rw-r--r--e-util/e-msgport.c1041
-rw-r--r--e-util/e-msgport.h88
-rw-r--r--e-util/e-passwords.c594
-rw-r--r--e-util/e-passwords.h59
-rw-r--r--e-util/e-path.c255
-rw-r--r--e-util/e-path.h36
-rw-r--r--e-util/e-pilot-map.c448
-rw-r--r--e-util/e-pilot-map.h58
-rw-r--r--e-util/e-pilot-settings.c150
-rw-r--r--e-util/e-pilot-settings.h73
-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.c102
-rw-r--r--e-util/e-request.h33
-rw-r--r--e-util/e-sexp.c1379
-rw-r--r--e-util/e-sexp.h172
-rw-r--r--e-util/e-sorter-array.c259
-rw-r--r--e-util/e-sorter-array.h77
-rw-r--r--e-util/e-sorter.c153
-rw-r--r--e-util/e-sorter.h82
-rw-r--r--e-util/e-text-event-processor-emacs-like.c495
-rw-r--r--e-util/e-text-event-processor-emacs-like.h70
-rw-r--r--e-util/e-text-event-processor-types.h132
-rw-r--r--e-util/e-text-event-processor.c148
-rw-r--r--e-util/e-text-event-processor.h77
-rw-r--r--e-util/e-time-utils.c492
-rw-r--r--e-util/e-time-utils.h58
-rw-r--r--e-util/e-trie.c345
-rw-r--r--e-util/e-trie.h47
-rw-r--r--e-util/e-uid.c61
-rw-r--r--e-util/e-uid.h28
-rw-r--r--e-util/e-url.c341
-rw-r--r--e-util/e-url.h56
-rw-r--r--e-util/e-util-marshal.list2
-rw-r--r--e-util/e-util.c1230
-rw-r--r--e-util/e-util.h231
-rw-r--r--e-util/e-xml-hash-utils.c252
-rw-r--r--e-util/e-xml-hash-utils.h69
-rw-r--r--e-util/e-xml-utils.c502
-rw-r--r--e-util/e-xml-utils.h101
-rw-r--r--e-util/eggtrayicon.c341
-rw-r--r--e-util/eggtrayicon.h76
-rw-r--r--e-util/md5-utils.c363
-rw-r--r--e-util/md5-utils.h52
-rw-r--r--evolution-shell.pc.in23
-rw-r--r--filter/.cvsignore10
-rw-r--r--filter/ChangeLog118
-rw-r--r--filter/ChangeLog.pre-1-42967
-rw-r--r--filter/Makefile.am90
-rw-r--r--filter/filter-code.c127
-rw-r--r--filter/filter-code.h56
-rw-r--r--filter/filter-colour.c229
-rw-r--r--filter/filter-colour.h58
-rw-r--r--filter/filter-context.c279
-rw-r--r--filter/filter-context.h62
-rw-r--r--filter/filter-datespec.c480
-rw-r--r--filter/filter-datespec.h74
-rw-r--r--filter/filter-editor.c169
-rw-r--r--filter/filter-editor.h58
-rw-r--r--filter/filter-element.c385
-rw-r--r--filter/filter-element.h93
-rw-r--r--filter/filter-file.c323
-rw-r--r--filter/filter-file.h73
-rw-r--r--filter/filter-filter.c538
-rw-r--r--filter/filter-filter.h63
-rw-r--r--filter/filter-folder.c264
-rw-r--r--filter/filter-folder.h59
-rw-r--r--filter/filter-input.c353
-rw-r--r--filter/filter-input.h62
-rw-r--r--filter/filter-int.c254
-rw-r--r--filter/filter-int.h63
-rw-r--r--filter/filter-label.c182
-rw-r--r--filter/filter-label.h70
-rw-r--r--filter/filter-marshal.list2
-rw-r--r--filter/filter-option.c367
-rw-r--r--filter/filter-option.h69
-rw-r--r--filter/filter-part.c544
-rw-r--r--filter/filter-part.h85
-rw-r--r--filter/filter-rule.c897
-rw-r--r--filter/filter-rule.h123
-rw-r--r--filter/filter-source.c377
-rw-r--r--filter/filter-source.h56
-rw-r--r--filter/filter.glade1316
-rw-r--r--filter/filtertypes.xml725
-rw-r--r--filter/libfilter-i18n.h62
-rw-r--r--filter/rule-context.c889
-rw-r--r--filter/rule-context.h136
-rw-r--r--filter/rule-editor.c751
-rw-r--r--filter/rule-editor.h103
-rw-r--r--filter/score-context.c101
-rw-r--r--filter/score-context.h58
-rw-r--r--filter/score-editor.c133
-rw-r--r--filter/score-editor.h58
-rw-r--r--filter/score-rule.c201
-rw-r--r--filter/score-rule.h60
-rw-r--r--filter/searchtypes.xml529
-rw-r--r--filter/vfolder-context.c100
-rw-r--r--filter/vfolder-context.h59
-rw-r--r--filter/vfolder-editor.c133
-rw-r--r--filter/vfolder-editor.h58
-rw-r--r--filter/vfolder-rule.c643
-rw-r--r--filter/vfolder-rule.h62
-rw-r--r--filter/vfoldertypes.xml421
-rw-r--r--help/.cvsignore2
-rw-r--r--help/C/.cvsignore4
-rw-r--r--help/C/Makefile.am57
-rw-r--r--help/C/POTFILES.in16
-rw-r--r--help/C/apx-authors.xml80
-rw-r--r--help/C/apx-bugs.xml30
-rw-r--r--help/C/apx-fdl.xml667
-rw-r--r--help/C/apx-gloss.xml480
-rw-r--r--help/C/apx-gpl.xml419
-rw-r--r--help/C/config-prefs.xml1096
-rw-r--r--help/C/config-sync.xml138
-rw-r--r--help/C/evolution-1.5-C.omf25
-rw-r--r--help/C/evolution-1.5.xml125
-rw-r--r--help/C/figures/calendar.pngbin102053 -> 0 bytes-rw-r--r--help/C/figures/config-cal.pngbin61474 -> 0 bytes-rw-r--r--help/C/figures/config-mail.pngbin61733 -> 0 bytes-rw-r--r--help/C/figures/contact-editor.pngbin52598 -> 0 bytes-rw-r--r--help/C/figures/contact.pngbin98575 -> 0 bytes-rw-r--r--help/C/figures/exchange-delegation.pngbin62447 -> 0 bytes-rw-r--r--help/C/figures/exchange-identity.pngbin29201 -> 0 bytes-rw-r--r--help/C/figures/exchange-receive-options.pngbin31765 -> 0 bytes-rw-r--r--help/C/figures/exchange-receive.pngbin31500 -> 0 bytes-rw-r--r--help/C/figures/filter-new-fig.pngbin27412 -> 0 bytes-rw-r--r--help/C/figures/folder-bar.pngbin93009 -> 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-druid-pic.pngbin32267 -> 0 bytes-rw-r--r--help/C/figures/mail-inbox.pngbin95031 -> 0 bytes-rw-r--r--help/C/figures/mail-threaded.pngbin7093 -> 0 bytes-rw-r--r--help/C/figures/mainwindow-pic.pngbin101231 -> 0 bytes-rw-r--r--help/C/figures/newmsg.pngbin59054 -> 0 bytes-rw-r--r--help/C/figures/print-dest.pngbin26005 -> 0 bytes-rw-r--r--help/C/figures/print-preview.pngbin77198 -> 0 bytes-rw-r--r--help/C/figures/replymsg.pngbin63824 -> 0 bytes-rw-r--r--help/C/figures/schedule.pngbin44752 -> 0 bytes-rw-r--r--help/C/figures/summary.pngbin110480 -> 0 bytes-rw-r--r--help/C/figures/vfolder-createrule-fig.pngbin35099 -> 0 bytes-rw-r--r--help/C/legal.xml99
-rw-r--r--help/C/menuref.xml397
-rw-r--r--help/C/preface.xml218
-rw-r--r--help/C/topic.dat11
-rw-r--r--help/C/usage-calendar.xml761
-rw-r--r--help/C/usage-contact.xml581
-rw-r--r--help/C/usage-exchange.xml1002
-rw-r--r--help/C/usage-exec-summary.xml217
-rw-r--r--help/C/usage-mail-org.xml1302
-rw-r--r--help/C/usage-mail.xml1883
-rw-r--r--help/C/usage-mainwindow.xml1576
-rw-r--r--help/C/usage-print.xml115
-rw-r--r--help/C/usage-sync.sgml39
-rw-r--r--help/C/usage-sync.xml39
-rw-r--r--help/COPYING-DOCS355
-rw-r--r--help/ChangeLog4
-rw-r--r--help/ChangeLog.pre-1-42072
-rw-r--r--help/Makefile.am6
-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.sgml46
-rw-r--r--help/es/apx-bugs.sgml23
-rw-r--r--help/es/apx-fdl.sgml670
-rw-r--r--help/es/apx-gloss.sgml183
-rw-r--r--help/es/apx-gpl.sgml420
-rw-r--r--help/es/config-prefs.sgml595
-rw-r--r--help/es/config-sync.sgml76
-rw-r--r--help/es/evolution-es.omf16
-rw-r--r--help/es/evolution.sgml82
-rw-r--r--help/es/menuref.sgml247
-rw-r--r--help/es/preface.sgml227
-rw-r--r--help/es/topic.dat11
-rw-r--r--help/es/usage-calendar.sgml432
-rw-r--r--help/es/usage-contact.sgml348
-rw-r--r--help/es/usage-exchange.sgml425
-rw-r--r--help/es/usage-exec-summary.sgml240
-rw-r--r--help/es/usage-mail-org.sgml674
-rw-r--r--help/es/usage-mail.sgml1173
-rw-r--r--help/es/usage-mainwindow.sgml885
-rw-r--r--help/es/usage-print.sgml62
-rw-r--r--help/es/usage-sync.sgml28
-rw-r--r--help/no/.cvsignore9
-rw-r--r--help/no/ChangeLog0
-rw-r--r--help/no/ChangeLog.pre-1-413
-rw-r--r--help/no/Makefile.am51
-rw-r--r--help/no/apx-authors.sgml98
-rw-r--r--help/no/apx-bugs.sgml38
-rw-r--r--help/no/apx-gloss.sgml419
-rw-r--r--help/no/config-encryption.sgml147
-rw-r--r--help/no/config-prefs.sgml744
-rw-r--r--help/no/config-sync.sgml126
-rw-r--r--help/no/evolution-faq.sgml973
-rw-r--r--help/no/evolution-no.omf16
-rw-r--r--help/no/evolution.sgml128
-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.sgml421
-rw-r--r--help/no/preface.sgml83
-rw-r--r--help/no/topic.dat10
-rw-r--r--help/no/usage-calendar.sgml561
-rw-r--r--help/no/usage-contact.sgml609
-rw-r--r--help/no/usage-encryption.sgml147
-rw-r--r--help/no/usage-exec-summary.sgml315
-rw-r--r--help/no/usage-mail-org.sgml1021
-rw-r--r--help/no/usage-mail.sgml2005
-rw-r--r--help/no/usage-mainwindow.sgml1174
-rw-r--r--help/no/usage-notes.sgml49
-rw-r--r--help/no/usage-print.sgml115
-rw-r--r--help/no/usage-sync.sgml39
-rw-r--r--help/omf.make53
-rwxr-xr-xhelp/update_po.pl212
-rwxr-xr-xhelp/update_translation.pl240
-rw-r--r--help/xmldocs.make96
-rw-r--r--mail/.cvsignore29
-rw-r--r--mail/ChangeLog3091
-rw-r--r--mail/ChangeLog.pre-1-424750
-rw-r--r--mail/GNOME_Evolution_Mail.server.in.in193
-rw-r--r--mail/Makefile.am254
-rw-r--r--mail/README.async366
-rw-r--r--mail/Spell.idl71
-rw-r--r--mail/e-searching-tokenizer.c1251
-rw-r--r--mail/e-searching-tokenizer.h74
-rw-r--r--mail/em-account-prefs.c580
-rw-r--r--mail/em-account-prefs.h99
-rw-r--r--mail/em-camel-stream.c326
-rw-r--r--mail/em-camel-stream.h71
-rw-r--r--mail/em-composer-prefs.c1010
-rw-r--r--mail/em-composer-prefs.h130
-rw-r--r--mail/em-composer-utils.c600
-rw-r--r--mail/em-composer-utils.h43
-rw-r--r--mail/em-folder-browser.c1018
-rw-r--r--mail/em-folder-browser.h60
-rw-r--r--mail/em-folder-selection-button.c255
-rw-r--r--mail/em-folder-selection-button.h69
-rw-r--r--mail/em-folder-selection.c218
-rw-r--r--mail/em-folder-selection.h51
-rw-r--r--mail/em-folder-selector.c362
-rw-r--r--mail/em-folder-selector.h88
-rw-r--r--mail/em-folder-tree-model.c1198
-rw-r--r--mail/em-folder-tree-model.h121
-rw-r--r--mail/em-folder-tree.c1710
-rw-r--r--mail/em-folder-tree.h80
-rw-r--r--mail/em-folder-view.c2020
-rw-r--r--mail/em-folder-view.h117
-rw-r--r--mail/em-format-html-display.c1352
-rw-r--r--mail/em-format-html-display.h63
-rw-r--r--mail/em-format-html-print.c186
-rw-r--r--mail/em-format-html-print.h37
-rw-r--r--mail/em-format-html-quote.c277
-rw-r--r--mail/em-format-html-quote.h49
-rw-r--r--mail/em-format-html.c1627
-rw-r--r--mail/em-format-html.h158
-rw-r--r--mail/em-format-quote.c289
-rw-r--r--mail/em-format-quote.h56
-rw-r--r--mail/em-format.c1255
-rw-r--r--mail/em-format.h204
-rw-r--r--mail/em-html-stream.c169
-rw-r--r--mail/em-html-stream.h64
-rw-r--r--mail/em-icon-stream.c208
-rw-r--r--mail/em-icon-stream.h62
-rw-r--r--mail/em-inline-filter.c335
-rw-r--r--mail/em-inline-filter.h62
-rw-r--r--mail/em-junk-filter.c352
-rw-r--r--mail/em-junk-filter.h30
-rw-r--r--mail/em-junk-plugin.c24
-rw-r--r--mail/em-junk-plugin.h46
-rw-r--r--mail/em-mailer-prefs.c484
-rw-r--r--mail/em-mailer-prefs.h127
-rw-r--r--mail/em-marshal.list5
-rw-r--r--mail/em-message-browser.c214
-rw-r--r--mail/em-message-browser.h30
-rw-r--r--mail/em-migrate.c706
-rw-r--r--mail/em-migrate.h42
-rw-r--r--mail/em-popup.c839
-rw-r--r--mail/em-popup.h171
-rw-r--r--mail/em-subscribe-editor.c853
-rw-r--r--mail/em-subscribe-editor.h9
-rw-r--r--mail/em-sync-stream.c286
-rw-r--r--mail/em-sync-stream.h69
-rw-r--r--mail/em-utils.c2324
-rw-r--r--mail/em-utils.h127
-rw-r--r--mail/evolution-mail.schemas.in.in654
-rw-r--r--mail/evolution-mbox-upgrade.c420
-rw-r--r--mail/importers/.cvsignore15
-rw-r--r--mail/importers/GNOME_Evolution_Mail_Elm_Intelligent_Importer.server.in.in26
-rw-r--r--mail/importers/GNOME_Evolution_Mail_Mbox_Importer.server.in.in29
-rw-r--r--mail/importers/GNOME_Evolution_Mail_Netscape_Intelligent_Importer.server.in.in26
-rw-r--r--mail/importers/GNOME_Evolution_Mail_Outlook_Importer.server.in.in29
-rw-r--r--mail/importers/GNOME_Evolution_Mail_Pine_Intelligent_Importer.server.in.in26
-rw-r--r--mail/importers/Makefile.am102
-rw-r--r--mail/importers/elm-importer.c593
-rw-r--r--mail/importers/evolution-mbox-importer.c335
-rw-r--r--mail/importers/evolution-outlook-importer.c318
-rw-r--r--mail/importers/mozilla-status-headers.h29
-rw-r--r--mail/importers/netscape-importer.c2162
-rw-r--r--mail/importers/pine-importer.c643
-rw-r--r--mail/local-config.glade325
-rw-r--r--mail/mail-account-editor.c225
-rw-r--r--mail/mail-account-editor.h67
-rw-r--r--mail/mail-account-gui.c2105
-rw-r--r--mail/mail-account-gui.h143
-rw-r--r--mail/mail-autofilter.c444
-rw-r--r--mail/mail-autofilter.h51
-rw-r--r--mail/mail-component-factory.c106
-rw-r--r--mail/mail-component.c900
-rw-r--r--mail/mail-component.h99
-rw-r--r--mail/mail-config-druid.c768
-rw-r--r--mail/mail-config-druid.h68
-rw-r--r--mail/mail-config-factory.c105
-rw-r--r--mail/mail-config-factory.h45
-rw-r--r--mail/mail-config.c1524
-rw-r--r--mail/mail-config.glade6020
-rw-r--r--mail/mail-config.h186
-rw-r--r--mail/mail-crypto.c52
-rw-r--r--mail/mail-crypto.h42
-rw-r--r--mail/mail-folder-cache.c956
-rw-r--r--mail/mail-folder-cache.h51
-rw-r--r--mail/mail-font-prefs.c130
-rw-r--r--mail/mail-font-prefs.h66
-rw-r--r--mail/mail-importer.c288
-rw-r--r--mail/mail-importer.h53
-rw-r--r--mail/mail-mt.c982
-rw-r--r--mail/mail-mt.h126
-rw-r--r--mail/mail-offline-handler.c258
-rw-r--r--mail/mail-offline-handler.h65
-rw-r--r--mail/mail-ops.c2449
-rw-r--r--mail/mail-ops.h167
-rw-r--r--mail/mail-search.glade197
-rw-r--r--mail/mail-security.glade214
-rw-r--r--mail/mail-send-recv.c943
-rw-r--r--mail/mail-send-recv.h45
-rw-r--r--mail/mail-session.c855
-rw-r--r--mail/mail-session.h58
-rw-r--r--mail/mail-signature-editor.c447
-rw-r--r--mail/mail-signature-editor.h42
-rw-r--r--mail/mail-tools.c424
-rw-r--r--mail/mail-tools.h75
-rw-r--r--mail/mail-types.h40
-rw-r--r--mail/mail-vfolder.c1022
-rw-r--r--mail/mail-vfolder.h33
-rw-r--r--mail/mail.h33
-rw-r--r--mail/message-list.c3378
-rw-r--r--mail/message-list.etspec35
-rw-r--r--mail/message-list.h216
-rw-r--r--mail/message-tag-editor.c128
-rw-r--r--mail/message-tag-editor.h73
-rw-r--r--mail/message-tag-followup.c354
-rw-r--r--mail/message-tag-followup.h83
-rw-r--r--mail/message-tags.glade335
-rw-r--r--mail/subscribe-dialog.glade334
-rw-r--r--marshal.mk7
-rw-r--r--po/.cvsignore19
-rw-r--r--po/ChangeLog386
-rw-r--r--po/ChangeLog.pre-1-44726
-rw-r--r--po/POTFILES.in393
-rw-r--r--po/POTFILES.skip15
-rw-r--r--po/am.po17383
-rw-r--r--po/az.po26876
-rw-r--r--po/be.po24245
-rw-r--r--po/bg.po25933
-rw-r--r--po/ca.po26854
-rw-r--r--po/cs.po27206
-rw-r--r--po/da.po27781
-rw-r--r--po/de.po27451
-rw-r--r--po/el.po24193
-rw-r--r--po/en_AU.po17451
-rw-r--r--po/en_GB.po17849
-rw-r--r--po/es.po27787
-rw-r--r--po/et.po28634
-rw-r--r--po/eu.po29757
-rw-r--r--po/fi.po22075
-rw-r--r--po/fr.po28900
-rwxr-xr-xpo/ga.po21306
-rw-r--r--po/gl.po27342
-rw-r--r--po/hu.po30959
-rw-r--r--po/it.po17820
-rw-r--r--po/ja.po25319
-rw-r--r--po/ko.po22528
-rw-r--r--po/lt.po25534
-rw-r--r--po/lv.po29026
-rwxr-xr-xpo/mk.po28228
-rw-r--r--po/ml.po27397
-rw-r--r--po/ms.po27375
-rw-r--r--po/nl.po27295
-rw-r--r--po/nn.po28240
-rw-r--r--po/no.po27026
-rw-r--r--po/pl.po17825
-rw-r--r--po/pt.po27687
-rw-r--r--po/pt_BR.po27270
-rw-r--r--po/ro.po26178
-rw-r--r--po/ru.po27378
-rw-r--r--po/sk.po27195
-rw-r--r--po/sl.po24850
-rw-r--r--po/sr.po27223
-rw-r--r--po/sr@Latn.po27229
-rw-r--r--po/sv.po31583
-rw-r--r--po/tr.po28174
-rw-r--r--po/uk.po22334
-rw-r--r--po/vi.po28616
-rw-r--r--po/zh_CN.po27088
-rw-r--r--po/zh_TW.po32560
-rw-r--r--server.mk11
-rw-r--r--shell/.cvsignore27
-rw-r--r--shell/ChangeLog1031
-rw-r--r--shell/ChangeLog.pre-1-415363
-rw-r--r--shell/Evolution-Component.idl82
-rw-r--r--shell/Evolution-ConfigControl.idl34
-rw-r--r--shell/Evolution-Offline.idl61
-rw-r--r--shell/Evolution-Shell.idl53
-rw-r--r--shell/Evolution-Wizard.idl42
-rw-r--r--shell/Evolution-common.idl36
-rw-r--r--shell/Evolution.idl19
-rw-r--r--shell/GNOME_Evolution_Shell.server.in.in51
-rw-r--r--shell/GNOME_Evolution_TestComponent.server41
-rw-r--r--shell/Makefile.am279
-rw-r--r--shell/README14
-rw-r--r--shell/apps_evolution_shell.schemas.in.in253
-rw-r--r--shell/check-empty.xpm21
-rw-r--r--shell/check-filled.xpm21
-rw-r--r--shell/check-missing.xpm20
-rw-r--r--shell/e-activity-handler.c396
-rw-r--r--shell/e-activity-handler.h85
-rw-r--r--shell/e-component-registry.c324
-rw-r--r--shell/e-component-registry.h99
-rw-r--r--shell/e-config-upgrade.c1929
-rw-r--r--shell/e-config-upgrade.h28
-rw-r--r--shell/e-corba-config-page.c264
-rw-r--r--shell/e-corba-config-page.h68
-rw-r--r--shell/e-history.c261
-rw-r--r--shell/e-history.h83
-rw-r--r--shell/e-icon-factory.c162
-rw-r--r--shell/e-icon-factory.h33
-rw-r--r--shell/e-setup.c331
-rw-r--r--shell/e-setup.h32
-rw-r--r--shell/e-shell-about-box.c534
-rw-r--r--shell/e-shell-about-box.h62
-rw-r--r--shell/e-shell-config-autocompletion.c129
-rw-r--r--shell/e-shell-config-autocompletion.h34
-rw-r--r--shell/e-shell-config-default-folders.c203
-rw-r--r--shell/e-shell-config-default-folders.h34
-rw-r--r--shell/e-shell-config-folder-settings.c82
-rw-r--r--shell/e-shell-config-folder-settings.h32
-rw-r--r--shell/e-shell-config-offline.c168
-rw-r--r--shell/e-shell-config-offline.h33
-rw-r--r--shell/e-shell-config.c69
-rw-r--r--shell/e-shell-config.h30
-rw-r--r--shell/e-shell-constants.h50
-rw-r--r--shell/e-shell-corba-icon-utils.c208
-rw-r--r--shell/e-shell-corba-icon-utils.h40
-rw-r--r--shell/e-shell-folder-commands.c653
-rw-r--r--shell/e-shell-folder-commands.h42
-rw-r--r--shell/e-shell-folder-creation-dialog.c580
-rw-r--r--shell/e-shell-folder-creation-dialog.h49
-rw-r--r--shell/e-shell-folder-title-bar.c749
-rw-r--r--shell/e-shell-folder-title-bar.h84
-rw-r--r--shell/e-shell-importer.c1247
-rw-r--r--shell/e-shell-importer.h28
-rw-r--r--shell/e-shell-marshal.list30
-rw-r--r--shell/e-shell-offline-handler.c871
-rw-r--r--shell/e-shell-offline-handler.h82
-rw-r--r--shell/e-shell-settings-dialog.c392
-rw-r--r--shell/e-shell-settings-dialog.h65
-rw-r--r--shell/e-shell-shared-folder-picker-dialog.c557
-rw-r--r--shell/e-shell-shared-folder-picker-dialog.h33
-rw-r--r--shell/e-shell-startup-wizard.c872
-rw-r--r--shell/e-shell-startup-wizard.h30
-rw-r--r--shell/e-shell-utils.c149
-rw-r--r--shell/e-shell-utils.h34
-rw-r--r--shell/e-shell-view-menu.c868
-rw-r--r--shell/e-shell-view-menu.h32
-rw-r--r--shell/e-shell-window-commands.c390
-rw-r--r--shell/e-shell-window-commands.h30
-rw-r--r--shell/e-shell-window.c825
-rw-r--r--shell/e-shell-window.h71
-rw-r--r--shell/e-shell.c1073
-rw-r--r--shell/e-shell.h145
-rw-r--r--shell/e-shortcuts-view-model.c341
-rw-r--r--shell/e-shortcuts-view-model.h66
-rw-r--r--shell/e-shortcuts-view.c800
-rw-r--r--shell/e-shortcuts-view.h74
-rw-r--r--shell/e-shortcuts.c1289
-rw-r--r--shell/e-shortcuts.h167
-rw-r--r--shell/e-sidebar.c453
-rw-r--r--shell/e-sidebar.h66
-rw-r--r--shell/e-splash.c451
-rw-r--r--shell/e-splash.h71
-rw-r--r--shell/e-storage-set-store.c1361
-rw-r--r--shell/e-storage-set-store.h91
-rw-r--r--shell/e-storage-set-view-checkboxes.etstate5
-rw-r--r--shell/e-storage-set-view-no-checkboxes.etstate4
-rw-r--r--shell/e-storage-set-view.etspec8
-rw-r--r--shell/e-task-bar.c187
-rw-r--r--shell/e-task-bar.h71
-rw-r--r--shell/e-task-widget.c251
-rw-r--r--shell/e-task-widget.h78
-rw-r--r--shell/e-uri-schema-registry.c181
-rw-r--r--shell/e-uri-schema-registry.h70
-rw-r--r--shell/e-user-creatable-items-handler.c789
-rw-r--r--shell/e-user-creatable-items-handler.h73
-rw-r--r--shell/evolution-activity-client.c461
-rw-r--r--shell/evolution-config-control.c241
-rw-r--r--shell/evolution-config-control.h70
-rw-r--r--shell/evolution-folder-selector-button.c455
-rw-r--r--shell/evolution-nognome.in13
-rw-r--r--shell/evolution-shell-client.c139
-rw-r--r--shell/evolution-shell-component-utils.c169
-rw-r--r--shell/evolution-shell-component-utils.h54
-rw-r--r--shell/evolution-storage-set-view-factory.c74
-rw-r--r--shell/evolution-storage-set-view-factory.h30
-rw-r--r--shell/evolution-storage-set-view.c481
-rw-r--r--shell/evolution-storage-set-view.h70
-rw-r--r--shell/evolution-storage.c1349
-rw-r--r--shell/evolution-test-component.c715
-rw-r--r--shell/evolution-wizard.c409
-rw-r--r--shell/evolution-wizard.h83
-rw-r--r--shell/glade/.cvsignore4
-rw-r--r--shell/glade/Makefile.am9
-rw-r--r--shell/glade/e-active-connection-dialog.glade144
-rw-r--r--shell/glade/e-folder-list.glade110
-rw-r--r--shell/glade/e-shell-config-default-folders.glade194
-rw-r--r--shell/glade/e-shell-folder-creation-dialog.glade180
-rw-r--r--shell/glade/e-shell-shared-folder-picker-dialog.glade252
-rw-r--r--shell/glade/evolution-startup-wizard.glade92
-rw-r--r--shell/importer/.cvsignore10
-rw-r--r--shell/importer/GNOME_Evolution_Importer.idl97
-rw-r--r--shell/importer/Makefile.am66
-rw-r--r--shell/importer/evolution-importer-client.c251
-rw-r--r--shell/importer/evolution-importer-client.h74
-rw-r--r--shell/importer/evolution-importer-listener.c224
-rw-r--r--shell/importer/evolution-importer-listener.h71
-rw-r--r--shell/importer/evolution-importer.c229
-rw-r--r--shell/importer/evolution-importer.h96
-rw-r--r--shell/importer/evolution-intelligent-importer.c197
-rw-r--r--shell/importer/evolution-intelligent-importer.h74
-rw-r--r--shell/importer/import.glade119
-rw-r--r--shell/importer/intelligent.c485
-rw-r--r--shell/importer/intelligent.h28
-rw-r--r--shell/main.c625
-rw-r--r--smime/.cvsignore2
-rw-r--r--smime/ChangeLog263
-rw-r--r--smime/Makefile.am1
-rw-r--r--smime/gui/.cvsignore3
-rw-r--r--smime/gui/Makefile.am35
-rw-r--r--smime/gui/certificate-manager.c745
-rw-r--r--smime/gui/certificate-manager.h30
-rw-r--r--smime/gui/certificate-viewer.c298
-rw-r--r--smime/gui/certificate-viewer.h31
-rw-r--r--smime/gui/e-cert-selector.c247
-rw-r--r--smime/gui/e-cert-selector.h67
-rw-r--r--smime/gui/smime-ui.glade2100
-rw-r--r--smime/lib/.cvsignore3
-rw-r--r--smime/lib/Makefile.am28
-rw-r--r--smime/lib/e-asn1-object.c393
-rw-r--r--smime/lib/e-asn1-object.h105
-rw-r--r--smime/lib/e-cert-db.c1077
-rw-r--r--smime/lib/e-cert-db.h128
-rw-r--r--smime/lib/e-cert-trust.c418
-rw-r--r--smime/lib/e-cert-trust.h86
-rw-r--r--smime/lib/e-cert.c1227
-rw-r--r--smime/lib/e-cert.h103
-rw-r--r--smime/lib/e-pkcs12.c452
-rw-r--r--smime/lib/e-pkcs12.h71
-rw-r--r--smime/tests/.cvsignore3
-rw-r--r--smime/tests/Makefile.am17
-rw-r--r--smime/tests/import-cert.c38
-rw-r--r--sounds/.cvsignore2
-rw-r--r--sounds/Makefile.am5
-rw-r--r--sounds/default_alarm.wavbin8624 -> 0 bytes-rw-r--r--stamp.h.in1
-rw-r--r--tools/.cvsignore11
-rw-r--r--tools/Makefile.am37
-rw-r--r--tools/evolution-launch-composer.c357
-rw-r--r--tools/killev.c218
-rwxr-xr-xtools/verify-evolution-install.sh640
-rw-r--r--ui/.cvsignore8
-rw-r--r--ui/ChangeLog137
-rw-r--r--ui/ChangeLog.pre-1-41894
-rw-r--r--ui/Makefile.am26
-rw-r--r--ui/evolution-addressbook.h25
-rw-r--r--ui/evolution-addressbook.xml149
-rw-r--r--ui/evolution-calendar.xml107
-rw-r--r--ui/evolution-comp-editor.xml91
-rw-r--r--ui/evolution-composer-entries.xml33
-rw-r--r--ui/evolution-contact-editor.xml99
-rw-r--r--ui/evolution-contact-list-editor.xml65
-rw-r--r--ui/evolution-event-editor.xml53
-rw-r--r--ui/evolution-executive-summary.xml12
-rw-r--r--ui/evolution-mail-global.xml120
-rw-r--r--ui/evolution-mail-list.xml116
-rw-r--r--ui/evolution-mail-message.xml437
-rw-r--r--ui/evolution-mail-messagedisplay.xml56
-rw-r--r--ui/evolution-message-composer.h53
-rw-r--r--ui/evolution-message-composer.xml153
-rw-r--r--ui/evolution-signature-editor.xml73
-rw-r--r--ui/evolution-subscribe.xml57
-rw-r--r--ui/evolution-task-editor.xml41
-rw-r--r--ui/evolution-tasks.xml65
-rw-r--r--ui/evolution.xml134
-rw-r--r--ui/my-evolution.xml29
-rw-r--r--views/.cvsignore2
-rw-r--r--views/ChangeLog19
-rw-r--r--views/ChangeLog.pre-1-4109
-rw-r--r--views/Makefile.am3
-rw-r--r--views/addressbook/.cvsignore2
-rw-r--r--views/addressbook/Address_Cards.galview2
-rw-r--r--views/addressbook/By_Company.galview12
-rw-r--r--views/addressbook/Makefile.am3
-rw-r--r--views/addressbook/Phone_List.galview11
-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/As_Sent_Folder.galview10
-rw-r--r--views/mail/By_Follow_Up_Flag.galview14
-rw-r--r--views/mail/By_Sender.galview12
-rw-r--r--views/mail/By_Status.galview12
-rw-r--r--views/mail/By_Subject.galview12
-rw-r--r--views/mail/Makefile.am3
-rw-r--r--views/mail/Messages.galview10
-rw-r--r--views/mail/galview.xml9
-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/ChangeLog58
-rw-r--r--widgets/ChangeLog.pre-1-4506
-rw-r--r--widgets/LICENSE1
-rw-r--r--widgets/Makefile.am8
-rw-r--r--widgets/e-timezone-dialog/.cvsignore7
-rw-r--r--widgets/e-timezone-dialog/Makefile.am16
-rw-r--r--widgets/e-timezone-dialog/e-timezone-dialog.c684
-rw-r--r--widgets/e-timezone-dialog/e-timezone-dialog.glade302
-rw-r--r--widgets/e-timezone-dialog/e-timezone-dialog.h68
-rw-r--r--widgets/menus/.cvsignore8
-rw-r--r--widgets/menus/Makefile.am11
-rw-r--r--widgets/menus/gal-define-views-dialog.c351
-rw-r--r--widgets/menus/gal-define-views-dialog.h78
-rw-r--r--widgets/menus/gal-define-views-model.c322
-rw-r--r--widgets/menus/gal-define-views-model.h72
-rw-r--r--widgets/menus/gal-define-views.glade232
-rw-r--r--widgets/menus/gal-view-collection.c823
-rw-r--r--widgets/menus/gal-view-collection.h151
-rw-r--r--widgets/menus/gal-view-etable.c305
-rw-r--r--widgets/menus/gal-view-etable.h78
-rw-r--r--widgets/menus/gal-view-factory-etable.c120
-rw-r--r--widgets/menus/gal-view-factory-etable.h62
-rw-r--r--widgets/menus/gal-view-factory.c107
-rw-r--r--widgets/menus/gal-view-factory.h79
-rw-r--r--widgets/menus/gal-view-instance-save-as-dialog.c299
-rw-r--r--widgets/menus/gal-view-instance-save-as-dialog.glade243
-rw-r--r--widgets/menus/gal-view-instance-save-as-dialog.h89
-rw-r--r--widgets/menus/gal-view-instance.c600
-rw-r--r--widgets/menus/gal-view-instance.h116
-rw-r--r--widgets/menus/gal-view-menus.c525
-rw-r--r--widgets/menus/gal-view-menus.h44
-rw-r--r--widgets/menus/gal-view-new-dialog.c284
-rw-r--r--widgets/menus/gal-view-new-dialog.glade175
-rw-r--r--widgets/menus/gal-view-new-dialog.h86
-rw-r--r--widgets/menus/gal-view.c206
-rw-r--r--widgets/menus/gal-view.h98
-rw-r--r--widgets/misc/.cvsignore16
-rw-r--r--widgets/misc/ChangeLog224
-rw-r--r--widgets/misc/ChangeLog.pre-1-41903
-rw-r--r--widgets/misc/Makefile.am161
-rw-r--r--widgets/misc/e-calendar-item.c3235
-rw-r--r--widgets/misc/e-calendar-item.h379
-rw-r--r--widgets/misc/e-calendar.c661
-rw-r--r--widgets/misc/e-calendar.h102
-rw-r--r--widgets/misc/e-canvas-background.c496
-rw-r--r--widgets/misc/e-canvas-background.h71
-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.c381
-rw-r--r--widgets/misc/e-canvas-vbox.h93
-rw-r--r--widgets/misc/e-canvas.c1096
-rw-r--r--widgets/misc/e-canvas.h157
-rw-r--r--widgets/misc/e-cell-date-edit.c977
-rw-r--r--widgets/misc/e-cell-date-edit.h106
-rw-r--r--widgets/misc/e-cell-percent.c158
-rw-r--r--widgets/misc/e-cell-percent.h51
-rw-r--r--widgets/misc/e-cell-renderer-combo.c180
-rw-r--r--widgets/misc/e-cell-renderer-combo.h58
-rw-r--r--widgets/misc/e-charset-picker.c557
-rw-r--r--widgets/misc/e-charset-picker.h48
-rw-r--r--widgets/misc/e-clipped-label.c423
-rw-r--r--widgets/misc/e-clipped-label.h102
-rw-r--r--widgets/misc/e-colors.c103
-rw-r--r--widgets/misc/e-colors.h44
-rw-r--r--widgets/misc/e-combo-button.c531
-rw-r--r--widgets/misc/e-combo-button.h80
-rw-r--r--widgets/misc/e-combo-cell-editable.c423
-rw-r--r--widgets/misc/e-combo-cell-editable.h67
-rw-r--r--widgets/misc/e-config-page.c152
-rw-r--r--widgets/misc/e-config-page.h76
-rw-r--r--widgets/misc/e-cursors.c156
-rw-r--r--widgets/misc/e-cursors.h68
-rw-r--r--widgets/misc/e-dateedit.c1946
-rw-r--r--widgets/misc/e-dateedit.h178
-rw-r--r--widgets/misc/e-dropdown-button.c249
-rw-r--r--widgets/misc/e-dropdown-button.h71
-rw-r--r--widgets/misc/e-filter-bar.c722
-rw-r--r--widgets/misc/e-filter-bar.h118
-rw-r--r--widgets/misc/e-gui-utils.c238
-rw-r--r--widgets/misc/e-gui-utils.h58
-rw-r--r--widgets/misc/e-hsv-utils.c178
-rw-r--r--widgets/misc/e-hsv-utils.h52
-rw-r--r--widgets/misc/e-map.c1788
-rw-r--r--widgets/misc/e-map.h138
-rw-r--r--widgets/misc/e-multi-config-dialog.c514
-rw-r--r--widgets/misc/e-multi-config-dialog.h77
-rw-r--r--widgets/misc/e-popup-menu.c240
-rw-r--r--widgets/misc/e-popup-menu.h142
-rw-r--r--widgets/misc/e-printable.c209
-rw-r--r--widgets/misc/e-printable.h90
-rw-r--r--widgets/misc/e-reflow-model.c355
-rw-r--r--widgets/misc/e-reflow-model.h112
-rw-r--r--widgets/misc/e-reflow.c1506
-rw-r--r--widgets/misc/e-reflow.h146
-rw-r--r--widgets/misc/e-search-bar.c1243
-rw-r--r--widgets/misc/e-search-bar.h151
-rw-r--r--widgets/misc/e-selection-model-array.c557
-rw-r--r--widgets/misc/e-selection-model-array.h96
-rw-r--r--widgets/misc/e-selection-model-simple.c115
-rw-r--r--widgets/misc/e-selection-model-simple.h70
-rw-r--r--widgets/misc/e-selection-model.c689
-rw-r--r--widgets/misc/e-selection-model.h170
-rw-r--r--widgets/misc/e-source-option-menu.c301
-rw-r--r--widgets/misc/e-source-option-menu.h64
-rw-r--r--widgets/misc/e-source-selector.c747
-rw-r--r--widgets/misc/e-source-selector.h80
-rw-r--r--widgets/misc/e-title-bar.c404
-rw-r--r--widgets/misc/e-title-bar.h86
-rw-r--r--widgets/misc/e-unicode.c2055
-rw-r--r--widgets/misc/e-unicode.h115
-rw-r--r--widgets/misc/e-url-entry.c176
-rw-r--r--widgets/misc/e-url-entry.h69
-rw-r--r--widgets/misc/e-util-marshal.list3
-rw-r--r--widgets/misc/gal-categories.glade166
-rw-r--r--widgets/misc/gal-combo-box.c834
-rw-r--r--widgets/misc/gal-combo-box.h91
-rw-r--r--widgets/misc/gal-combo-text.c433
-rw-r--r--widgets/misc/gal-combo-text.h76
-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.c221
-rw-r--r--widgets/misc/test-charset-picker.c18
-rw-r--r--widgets/misc/test-color.c76
-rw-r--r--widgets/misc/test-dateedit.c285
-rw-r--r--widgets/misc/test-dropdown-button.c103
-rw-r--r--widgets/misc/test-multi-config-dialog.c94
-rw-r--r--widgets/misc/test-source-option-menu.c88
-rw-r--r--widgets/misc/test-source-selector.c131
-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.c67
-rw-r--r--widgets/table/e-cell-checkbox.h50
-rw-r--r--widgets/table/e-cell-combo.c697
-rw-r--r--widgets/table/e-cell-combo.h63
-rw-r--r--widgets/table/e-cell-date.c166
-rw-r--r--widgets/table/e-cell-date.h49
-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.c85
-rw-r--r--widgets/table/e-cell-number.h49
-rw-r--r--widgets/table/e-cell-pixbuf.c417
-rw-r--r--widgets/table/e-cell-pixbuf.h53
-rw-r--r--widgets/table/e-cell-popup.c518
-rw-r--r--widgets/table/e-cell-popup.h101
-rw-r--r--widgets/table/e-cell-progress.c456
-rw-r--r--widgets/table/e-cell-progress.h74
-rw-r--r--widgets/table/e-cell-size.c110
-rw-r--r--widgets/table/e-cell-size.h49
-rw-r--r--widgets/table/e-cell-spin-button.c670
-rw-r--r--widgets/table/e-cell-spin-button.h103
-rw-r--r--widgets/table/e-cell-text.c2756
-rw-r--r--widgets/table/e-cell-text.h123
-rw-r--r--widgets/table/e-cell-toggle.c488
-rw-r--r--widgets/table/e-cell-toggle.h62
-rw-r--r--widgets/table/e-cell-tree.c911
-rw-r--r--widgets/table/e-cell-tree.h77
-rw-r--r--widgets/table/e-cell-vbox.c489
-rw-r--r--widgets/table/e-cell-vbox.h65
-rw-r--r--widgets/table/e-cell.c499
-rw-r--r--widgets/table/e-cell.h224
-rw-r--r--widgets/table/e-table-click-to-add.c562
-rw-r--r--widgets/table/e-table-click-to-add.h77
-rw-r--r--widgets/table/e-table-col-dnd.h39
-rw-r--r--widgets/table/e-table-col.c236
-rw-r--r--widgets/table/e-table-col.h101
-rw-r--r--widgets/table/e-table-column-specification.c150
-rw-r--r--widgets/table/e-table-column-specification.h73
-rw-r--r--widgets/table/e-table-column.c291
-rw-r--r--widgets/table/e-table-config-field.c300
-rw-r--r--widgets/table/e-table-config-field.h69
-rw-r--r--widgets/table/e-table-config-no-group.glade2039
-rw-r--r--widgets/table/e-table-config.c1204
-rw-r--r--widgets/table/e-table-config.glade2107
-rw-r--r--widgets/table/e-table-config.h115
-rw-r--r--widgets/table/e-table-defines.h45
-rw-r--r--widgets/table/e-table-example-1.c308
-rw-r--r--widgets/table/e-table-example-2.c349
-rw-r--r--widgets/table/e-table-extras.c292
-rw-r--r--widgets/table/e-table-extras.h82
-rw-r--r--widgets/table/e-table-field-chooser-dialog.c224
-rw-r--r--widgets/table/e-table-field-chooser-dialog.h79
-rw-r--r--widgets/table/e-table-field-chooser-item.c711
-rw-r--r--widgets/table/e-table-field-chooser-item.h75
-rw-r--r--widgets/table/e-table-field-chooser.c282
-rw-r--r--widgets/table/e-table-field-chooser.glade123
-rw-r--r--widgets/table/e-table-field-chooser.h79
-rw-r--r--widgets/table/e-table-group-container.c1512
-rw-r--r--widgets/table/e-table-group-container.h98
-rw-r--r--widgets/table/e-table-group-leaf.c686
-rw-r--r--widgets/table/e-table-group-leaf.h90
-rw-r--r--widgets/table/e-table-group.c712
-rw-r--r--widgets/table/e-table-group.h178
-rw-r--r--widgets/table/e-table-header-item.c1896
-rw-r--r--widgets/table/e-table-header-item.h118
-rw-r--r--widgets/table/e-table-header-utils.c481
-rw-r--r--widgets/table/e-table-header-utils.h55
-rw-r--r--widgets/table/e-table-header.c952
-rw-r--r--widgets/table/e-table-header.h120
-rw-r--r--widgets/table/e-table-item.c3716
-rw-r--r--widgets/table/e-table-item.h231
-rw-r--r--widgets/table/e-table-memory-callbacks.c208
-rw-r--r--widgets/table/e-table-memory-callbacks.h91
-rw-r--r--widgets/table/e-table-memory-store.c583
-rw-r--r--widgets/table/e-table-memory-store.h138
-rw-r--r--widgets/table/e-table-memory.c277
-rw-r--r--widgets/table/e-table-memory.h76
-rw-r--r--widgets/table/e-table-model.c579
-rw-r--r--widgets/table/e-table-model.h170
-rw-r--r--widgets/table/e-table-one.c243
-rw-r--r--widgets/table/e-table-one.h57
-rw-r--r--widgets/table/e-table-scrolled.c229
-rw-r--r--widgets/table/e-table-scrolled.h76
-rw-r--r--widgets/table/e-table-search.c223
-rw-r--r--widgets/table/e-table-search.h71
-rw-r--r--widgets/table/e-table-selection-model.c347
-rw-r--r--widgets/table/e-table-selection-model.h76
-rw-r--r--widgets/table/e-table-simple.c289
-rw-r--r--widgets/table/e-table-simple.h122
-rw-r--r--widgets/table/e-table-size-test.c307
-rw-r--r--widgets/table/e-table-sort-info.c481
-rw-r--r--widgets/table/e-table-sort-info.h107
-rw-r--r--widgets/table/e-table-sorted-variable.c228
-rw-r--r--widgets/table/e-table-sorted-variable.h65
-rw-r--r--widgets/table/e-table-sorted.c310
-rw-r--r--widgets/table/e-table-sorted.h65
-rw-r--r--widgets/table/e-table-sorter.c462
-rw-r--r--widgets/table/e-table-sorter.h74
-rw-r--r--widgets/table/e-table-sorting-utils.c349
-rw-r--r--widgets/table/e-table-sorting-utils.h83
-rw-r--r--widgets/table/e-table-specification.c432
-rw-r--r--widgets/table/e-table-specification.h89
-rw-r--r--widgets/table/e-table-state.c299
-rw-r--r--widgets/table/e-table-state.h74
-rw-r--r--widgets/table/e-table-subset-variable.c250
-rw-r--r--widgets/table/e-table-subset-variable.h82
-rw-r--r--widgets/table/e-table-subset.c482
-rw-r--r--widgets/table/e-table-subset.h89
-rw-r--r--widgets/table/e-table-tooltip.h44
-rw-r--r--widgets/table/e-table-tree.h48
-rw-r--r--widgets/table/e-table-utils.c191
-rw-r--r--widgets/table/e-table-utils.h49
-rw-r--r--widgets/table/e-table-without.c392
-rw-r--r--widgets/table/e-table-without.h91
-rw-r--r--widgets/table/e-table.c3277
-rw-r--r--widgets/table/e-table.diabin4514 -> 0 bytes-rw-r--r--widgets/table/e-table.h358
-rw-r--r--widgets/table/e-tree-memory-callbacks.c275
-rw-r--r--widgets/table/e-tree-memory-callbacks.h119
-rw-r--r--widgets/table/e-tree-memory.c717
-rw-r--r--widgets/table/e-tree-memory.h101
-rw-r--r--widgets/table/e-tree-model.c1098
-rw-r--r--widgets/table/e-tree-model.h227
-rw-r--r--widgets/table/e-tree-scrolled.c228
-rw-r--r--widgets/table/e-tree-scrolled.h75
-rw-r--r--widgets/table/e-tree-selection-model.c802
-rw-r--r--widgets/table/e-tree-selection-model.h77
-rw-r--r--widgets/table/e-tree-simple.c208
-rw-r--r--widgets/table/e-tree-simple.h85
-rw-r--r--widgets/table/e-tree-sorted-variable.c477
-rw-r--r--widgets/table/e-tree-sorted-variable.h85
-rw-r--r--widgets/table/e-tree-sorted.c1390
-rw-r--r--widgets/table/e-tree-sorted.h86
-rw-r--r--widgets/table/e-tree-table-adapter.c1174
-rw-r--r--widgets/table/e-tree-table-adapter.h95
-rw-r--r--widgets/table/e-tree.c3328
-rw-r--r--widgets/table/e-tree.h312
-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.table45
-rw-r--r--widgets/table/spec.xml21
-rw-r--r--widgets/table/table-test.c62
-rw-r--r--widgets/table/table-test.h27
-rw-r--r--widgets/table/test-check.c221
-rw-r--r--widgets/table/test-cols.c265
-rw-r--r--widgets/table/test-table.c478
-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-callbacks.c98
-rw-r--r--widgets/text/e-completion-callbacks.h68
-rw-r--r--widgets/text/e-completion-match.c184
-rw-r--r--widgets/text/e-completion-match.h67
-rw-r--r--widgets/text/e-completion-view.c859
-rw-r--r--widgets/text/e-completion-view.h98
-rw-r--r--widgets/text/e-completion.c339
-rw-r--r--widgets/text/e-completion.h91
-rw-r--r--widgets/text/e-entry-test.c83
-rw-r--r--widgets/text/e-entry.c1399
-rw-r--r--widgets/text/e-entry.h87
-rw-r--r--widgets/text/e-table-text-model.c234
-rw-r--r--widgets/text/e-table-text-model.h64
-rw-r--r--widgets/text/e-text-model-repos.c87
-rw-r--r--widgets/text/e-text-model-repos.h69
-rw-r--r--widgets/text/e-text-model-test.c91
-rw-r--r--widgets/text/e-text-model-uri.c344
-rw-r--r--widgets/text/e-text-model-uri.h56
-rw-r--r--widgets/text/e-text-model.c601
-rw-r--r--widgets/text/e-text-model.h113
-rw-r--r--widgets/text/e-text-test.c168
-rw-r--r--widgets/text/e-text.c3827
-rw-r--r--widgets/text/e-text.h244
2432 files changed, 0 insertions, 1901098 deletions
diff --git a/.cvsignore b/.cvsignore
deleted file mode 100644
index e06716e16f..0000000000
--- a/.cvsignore
+++ /dev/null
@@ -1,30 +0,0 @@
-ABOUT-NLS
-Makefile
-Makefile.in
-autom4te*.cache
-aclocal.m4
-config.cache
-config.guess
-config.h
-config.h.in
-config.log
-config.rpath
-config.status
-config.sub
-configure
-install-sh
-intl
-libtool
-ltconfig
-ltmain.sh
-m4
-missing
-mkinstalldirs
-stamp-h
-stamp-h.in
-stamp.h
-xml-i18n-*
-xlibtool
-xltmain.sh
-intltool-*
-*.pc \ No newline at end of file
diff --git a/AUTHORS b/AUTHORS
deleted file mode 100644
index 75e6a26764..0000000000
--- a/AUTHORS
+++ /dev/null
@@ -1,85 +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>
- Rodrigo Moya <rodrigo@ximian.com>
- Jesse Pavel <jesse@ximian.com>
- JP Rosevear <jpr@ximian.com>
- Russell Steinthal <rms39@columbia.edu> (Gnomecal maintainer)
-
-Documentation
- Kevin Breit <mrproper@ximian.com>
- Aaron Weber <aaron@ximian.com>
-
-Mailer
- Radek Doulik <rodo@ximian.com>
- Larry Ewing <lewing@ximian.com>
- Bertrand Guiheneuf <bertrand@ximian.com>
- Jason Leach <jleach@ximian.com>
- Matt Loper <matt@ximian.com>
- Ettore Perazzoli <ettore@ximian.com>
- Jeffrey 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 <translators@gnome.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>
- Duarte Loreto <happyguy_pt@hotmail.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 48617b5247..0000000000
--- a/ChangeLog
+++ /dev/null
@@ -1,349 +0,0 @@
-2003-12-07 JP Rosevear <jpr@ximian.com>
-
- * configure.in: update version reliance
-
-2003-12-06 JP Rosevear <jpr@ximian.com>
-
- * tools/Makefile.am: Remove hard coded disable deprecated flags
-
-2003-12-05 Radek Doulik <rodo@ximian.com>
-
- * configure.in: require gtkhtml 3.1.3 (new gtk_html_flush method
- to be used in mailer)
-
-2003-12-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * configure.in (EVOLUTION_DIR): Remove the Junk folder
-
-2003-12-01 Rodney Dawes <dobey@ximian.com>
-
- * data/Makefile.am: Install evolution.desktop as
- evolution-$(BASE_VERSION).desktop
- * data/evolution.desktop.in: Remove generated file
- * data/evolution.desktop.in.in: Add (Unstable) to name
- Fix comment to be more correct and have correct capitalization
-
-2003-12-01 Rodney Dawes <dobey@ximian.com>
-
- * tools/killev.c: Use BASE_VERSION for repo_ids and OAFIIDs,
- Update gnome-spell repo_id to correct version,
- Update gtkhtml editor OAFIID to GtkHTML 3.1
-
-2003-12-01 JP Rosevear <jpr@ximian.com>
-
- * configure.in: define privconduitdir
-
-2003-11-28 Anders Carlsson <andersca@gnome.org>
-
- * configure.in: Look for mozilla-nss.pc, not mozilla.pc.
-
-2003-11-26 JP Rosevear <jpr@ximian.com>
-
- * configure.in: make sure the mozilla .pc file exists before
- checking for it
-
-2003-11-24 Rodrigo Moya <rodrigo@ximian.com>
-
- * tools/killev.c (main): kill Evo 2.0's alarm daemon, not 1.4's.
-
-2003-11-19 JP Rosevear <jpr@ximian.com>
-
- * MAINTAINERS: Update
-
-2003-11-18 JP Rosevear <jpr@ximian.com>
-
- * configure.in: remove db3 check
-
-2003-11-18 Rodrigo Moya <rodrigo@ximian.com>
-
- * tools/killev.c (main): kill the alarm notification service, not
- the factory, which no longer exists.
-
-2003-11-17 JP Rosevear <jpr@ximian.com>
-
- * Makefile.am: make sure server.mk is disted
-
-2003-11-17 JP Rosevear <jpr@ximian.com>
-
- * Makefile.am (EXTRA_DIST): do the right thing for disting
-
-2003-11-17 JP Rosevear <jpr@ximian.com>
-
- * configure.in: use the server.mk file to get rules for building
- versioned .server files
-
- * */Makefile.am: use simplified rule subst
-
-2003-11-17 JP Rosevear <jpr@ximian.com>
-
- * Makefile.am: Install versioned package config files
-
-2003-11-14 JP Rosevear <jpr@ximian.com>
-
- * configure.in: make source selector flags/libs
-
-2003-11-14 JP Rosevear <jpr@ximian.com>
-
- * MAINTAINERS: Update
-
-2003-11-11 Chris Toshok <toshok@ximian.com>
-
- * Makefile.am (SUBDIRS): remove libversit from the build.
-
- * configure.in (CERT_UI): change the libraries we link.
- (AC_OUTPUT): remove libversit/Makefile
-
-2003-11-11 JP Rosevear <jpr@ximian.com>
-
- * configure.in: determine the e-d-s version, version the gettext
- files properly
-
-2003-11-07 Dan Winship <danw@ximian.com>
-
- * configure.in (AC_OUTPUT): Remove e-util/ename/Makefile
-
-2003-11-07 JP Rosevear <jpr@ximian.com>
-
- * configure.in: we don't have to configure the libical subdir now
-
-2003-11-07 JP Rosevear <jpr@ximian.com>
-
- * configure.in: pull in evolution-data-server stuff and remove
- backends from output
-
-2003-10-31 JP Rosevear <jpr@ximian.com>
-
- * configure.in: set up vars and rules for versioning the .server
- files
-
- * Makefile.am's: use rules for versioning .server file, ensure
- built files are removed before disting
-
-2003-10-30 Chris Toshok <toshok@ximian.com>
-
- * configure.in: (AC_OUTPUT): remove smime/tests for now.
-
-2003-10-30 Chris Toshok <toshok@ximian.com>
-
- * configure.in: set enable_smime=yes wherever nss would be
- enabled.. fixes manually specifying the nss libs and enabling the
- smime ui. Also, add a section for generating the correct SMIME UI
- flags. gross, but necessary. it should probably be wrapped in
- with all the other nss library crap.
- (AC_OUTPUT): add smime/tests
-
-2003-10-29 Chris Toshok <toshok@ximian.com>
-
- * Makefile.am (SUBDIRS): use $SMIME_DIR. instead of explicitly
- including smime.
-
- * configure.in: add some smime foo - a status message, an
- AM_CONDITIONAL (ENABLE_SMIME)
-
-2003-10-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * configure.in: added a configure check for AI_ADDRCONFIG
-
-2003-10-24 Dan Winship <danw@ximian.com>
-
- * libversit/Makefile.am: Change YFLAGS to AM_YFLAGS to stop an
- automake 1.7 warning
-
-2003-10-23 Rodney Dawes <dobey@ximian.com>
-
- * confiugre.in: Remove mail/importers/Makefile from AC_OUTPUT
- yet again
-
-2003-10-23 Chris Toshok <toshok@ximian.com>
-
- * configure.in: add smime/* dirs. to AC_OUTPUT.
-
- * Makefile.am (SUBDIRS): add smime/.
-
-2003-10-23 Frederic Crozat <fcrozat@mandrakesoft.com>
-
- * configure.in: Check for gnome-thumbnail.h existence
- (really committed this time).
-
-2003-10-22 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Set $ACLOCAL to have the $ACLOCAL_FLAGS in it, so
- it doesn't fail to regenerate the files if you run make without a
- manual autogen after making changes to configure.in and friends.
- [Many thanks to Marco Pesenti Gritti for pointing out the fix to
- me.]
-
-2003-10-22 Rodney Dawes <dobey@ximian.com>
-
- * configure.in: Require ORBit 2.8.0 or newer for threading
-
-2003-10-22 Rodney Dawes <dobey@ximian.com>
-
- * configure.in: Revert broken previous commit and actually remove
- mail/importers/Makefile from AC_OUTPUT
-
-2003-10-22 Rodney Dawes <dobey@ximian.com>
-
- * configure.in: Removed mail/importers/Makefile from AC_OUTPUT
-
-2003-10-22 Rodney Dawes <dobey@ximian.com>
-
- * configure.in: Removed addressbook/tools/Makefile from AC_OUTPUT
-
-2003-10-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * configure.in: Removed pedantic pgp/mime configure flag.
-
-2003-10-22 Dan Winship <danw@ximian.com>
-
- * executive-summary/*: Removed; this code has not been used since
- pre-1.0.
-
- * importers/*: Removed; the actual importers were moved to
- {mail,calendar}/importers long ago.
-
- * my-evolution/*: Removed; gone in evolution 2.0.
-
- * notes/*: Removed; never finished and no one is working on it.
-
- * omf-install/*: Removed; part of old doc system
-
- * tests/*: Removed; these are ancient. Camel regression tests are
- in camel/tests now.
-
- * configure.in (E_UTIL_{CFLAGS,LIBS}): Remove soup-2.0 since
- e-proxy is gone.
- (EVOLUTION_MAIL_{CFLAGS,LIBS}): Remove soup-2.0 since the mailer
- uses CamelHTTPStream now.
- (EVOLUTION_EXECUTIVE_SUMMARY_{CFLAGS,LIBS}): Gone
- (AC_OUTPUT): Remove my-evolution/Makefile
-
- * README: evolution no longer depends on soup
-
-2003-10-21 Dan Winship <danw@ximian.com>
-
- * configure.in (GNOME_COMPILE_WARNINGS): Turn off the annoying
- "comparison between signed and unsigned" warning in gcc 3.3
-
- * evolution-calendar.pc.in (Cflags): add
- -I${privincludedir}/libical
-
-2003-10-08 Frederic Crozat <fcrozat@mandrakesoft.com>
-
- * configure.in: Check for gnome-thumbnail.h existence.
-
-2003-09-04 Dan Winship <danw@ximian.com>
-
- * camel.pc.in (Requires):
- * evolution-addressbook.pc.in (Requires):
- * evolution-calendar.pc.in (Requires):
- * evolution-shell.pc.in (Requires): Require gal-2.2
-
-2003-08-27 Bolian Yin <bolian.yin@sun.com>
-
- * configure.in: add a11y/widgets/Makefile
- * Makefile.am: move a11y directory before widgets directory.
-
-2003-08-21 Not Zed <NotZed@Ximian.com>
-
- * HACKING: Wrote one.
-
-2003-08-20 Bolian Yin <bolian.yin@sun.com>
-
- * configure.in: Add a11y checking, and a11y Makefiles
- * Makefile.am: add a11y subdirectory
-
-2003-08-13 Mike Kestner <mkestner@ximian.com>
-
- * configure.in: don't make 1.5 the default version (ie LN_S)
- update to use gal-2.2
-
-2003-08-01 Not Zed <NotZed@Ximian.com>
-
- * configure.in: Add option for '--enable-imapp', for 'new' imap
- code.
-
-2003-07-26 Larry Ewing <lewing@ximian.com>
-
- * configure.in: use libgtkhtml-3.1 for linking.
-
-2003-07-26 Rodney Dawes <dobey@ximian.com>
-
- * configure.in: Bump version to "1.5", so that we end up being
- parallel installable with 1.4 again, but we can still release
- a "1.5.0" tarball when we get to that point in 6 months
-
-2003-07-23 Dan Winship <danw@ximian.com>
-
- * configure.in: Define EVO_MARSHAL_RULE, which creates glib
- marshaller .c and .h files that don't cause gcc warnings
-
- * marshal.mk: The Makefile fragment used by EVO_MARSHAL_RULE.
- (Can't include newlines in an AC_SUBST, so we have to use
- AC_SUBST_FILE)
-
- * Makefile.am (EXTRA_DIST): add marshal.mk
-
-2003-07-20 Hasbullah Bin Pit <sebol@ikhlas.com>
-
- *configure.in: Added 'ms' (Malay) to ALL_LINGUAS.
-
-2003-07-10 Rodney Dawes <dobey@ximian.com>
-
- * configure.in: Change version to 1.4.99 since HEAD is not the
- stable 1.4 branch, as evolution-1-4-branch was created post-1.4.1
-
-2003-07-01 Dan Winship <danw@ximian.com>
-
- * configure.in: Check for gnome-icon-lookup.h (which could mean
- either plain GNOME 2.2 or Sun GNOME 2.0)
-
-2003-06-30 Rodrigo Moya <rodrigo@ximian.com>
-
- * configure.in:
- * Makefile.am: removed libwombat from the build.
-
- * evolution-calendar.pc.in: removed -lwombat.
-
- * libwombat/*: removed unused directory.
-
-== Version 1.4.1 ==
-
-2003-06-25 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Depend on GtkHTML 3.0.6, gal 1.99.8.
-
- * README: Update
-
-2003-06-23 Ettore Perazzoli <ettore@ximian.com>
-
- * data/Makefile.am: Added implicity rule to subst @BASE_VERSION@
- in evolution.desktop.in.in to generate evolution.desktop.in.
- (desktop_in_file): Removed.
- (desktop_in_in_file): New.
- (kdedesktop_file): Update substitution to use
- $(desktop_in_in_file) instead of $(desktop_in_file).
- (noinst_DATA): Add $(desktop_file).
- (install-data-local): Depend on $(mime_file) and $(keys_file).
- (EXTRA_DIST): Remove $(desktop_file), replace $(desktop_in_file)
- with $(desktop_in_in_file).
-
-2003-06-19 Dan Winship <danw@ximian.com>
-
- * tools/killev.c (kill_component): clean this up a little and make
- it deal with "evolution" vs "evolution-1.4"
-
-2003-06-19 Danilo Šegan <dsegan@gmx.net>
-
- * configure.in: Added "sr" and "sr@Latn" to ALL_LINGUAS.
-
-2003-06-17 Not Zed <NotZed@Ximian.com>
-
- * NEWS: Updated for current mail stuff.
-
-2003-06-13 Ettore Perazzoli <ettore@ximian.com>
-
- * tools/Makefile.am: Remove evolution-launch-composer since it's
- no longer needed.
-
-
diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4
deleted file mode 100644
index 944140f011..0000000000
--- a/ChangeLog.pre-1-4
+++ /dev/null
@@ -1,8530 +0,0 @@
-== Version 1.4.0 ==
-
-2003-06-02 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Bump version number to 1.4.0.
- (VERSION_COMMENT): Set to an empty string.
- (GAL_REQUIRED): Require 1.99.7.
-
-2003-05-28 Rodney Dawes <dobey@ximian.com>
-
- * configure.in: AC_SUBST() for GAL_REQUIRED and GTKHTML_REQUIRED
-
-2003-05-27 Not Zed <NotZed@Ximian.com>
-
- * camel.pc.in: make libs/cflags point to privlibdir/includedir,
- otherwise this just doesn't work.
-
-== Version 1.3.92 ==
-
-2003-05-22 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Bump version to 1.3.92.
-
-2003-05-22 Rodney Dawes <dobey@ximian.com>
-
- * camel.pc.in:
- * evolution-addressbook.pc.in:
- * evolution-calendar.pc.in:
- * evolution-shell.pc.in: s/GAL_VERSION/GAL_REQUIRED/
-
-2003-05-22 Dmitry G. Mastrukov <dmitry@taurussoft.org>
-
- * configure.in: Added Belarusian to ALL_LINGUAS.
-
-2003-05-21 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Bump version to 1.3.91.99.
-
-== Version 1.3.91 ==
-
-2003-05-21 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Renamed GAL_VERSION to GAL_REQUIRED; also, made it
- not AC_SUBST() it anymore since it's only used in configure.
- Added GTKHTML_REQUIRED and made all the libgtkhtml-3.0 checks use
- it.
-
-2003-05-19 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Remove GNOME_PREFIX stuff. Add
- --disable-default-binary command line option, with corresponding
- DEFAULT_BINARY Automake conditional.
-
-2003-05-19 Not Zed <notzed@lostzed.mmc.com.au>
-
- * NEWS: Updated for mail/ camel/ filter/ and e-util/
-
-2003-04-30 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Bump version number to 1.3.3.99.
-
-== Version 1.3.3 ==
-
-2003-04-29 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: 1.3.3.
-
-2003-04-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * NEWS: Updated for mailer fixes
-
-2003-04-28 Rodney Dawes <dobey@ximian.com>
-
- * data/cde_app_root/: Use $(privdatadir) instead of
- $(prefix)/share/evolution-$(BASE_VERSION) for the cde stuff
-
-2003-04-21 Rodney Dawes <dobey@ximian.com>
-
- * configure.in: Fix KDE_APPLNK_DIR to not install to a diff prefix,
- and disable installing the file to the KDE applnk path by default
-
-2003-04-11 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: 1.3.2.99.
-
-== Version 1.3.2 ==
-
-2003-04-08 Dan Winship <danw@ximian.com>
-
- * tools/Makefile.am (EXTRA_DIST): Fix
-
-2003-04-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * configure.in: Oops, don't use a == when comparing strings in
- shell.
-
-2003-04-07 Chris Toshok <toshok@ximian.com>
-
- * tools/Makefile.am (privlibexec_PROGRAMS): remove
- evolution-addressbook-export.
-
- * tools/evolution-addressbook-export.c: nuke.
-
-2003-04-07 Chris Toshok <toshok@ximian.com>
-
- * configure.in: add addressbook/tools/Makefile to AC_OUTPUT.
-
-2003-04-07 Dan Winship <danw@ximian.com>
-
- * tools/Makefile.am (privlibexec_SCRIPTS, privlibexec_PROGRAMS):
- Install these in privlibexecdir, not privdatadir. Move killev from
- SCRIPTS to PROGRAMS.
- (killev_SOURCES, killev_LDADD): Add
-
- * tools/killev.c: New C port of killev, since
- "bonobo-activation-query" does not return as much information as
- "oaf-client" did. Also has prettier output. (Still shells out to
- killall/pkill to do the actual killing.)
-
- * tools/killev: Gone
-
- * tools/evolution-move-tasks: Removed since the evolution-calendar
- code that called it is also gone now.
-
-2003-04-07 Not Zed <NotZed@Ximian.com>
-
- * NEWS: Updated for mail/camel/composer/filter for 1.3.2
-
-2003-04-06 Christophe Merlet <redfox@redfoxcenter.org>
-
- * data/Makefile.am: Create $(DESTDIR)$(kdedeskdopdir).
-
-2003-04-04 Chris Toshok <toshok@ximian.com>
-
- * acinclude.m4 (EVO_LDAP_CHECK): bleah, add "" in for the "no"
- case in with_static_ldap.
-
-2003-04-03 Chris Toshok <toshok@ximian.com>
-
- * acinclude.m4 (EVO_LDAP_CHECK): the existence of libldap.la
- should have no bearing on whether or not we try to statically link
- ldap.
-
-2003-03-29 Duarte Loreto <happyguy_pt@hotmail.com>
-
- * AUTHORS: Added myself as new Portuguese translator.
-
-2003-03-28 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Ported check for "killall" vs. "killp" back from
- 1.2.
-
-2003-03-28 Ettore Perazzoli <ettore@ximian.com>
-
- * data/Makefile.am: Fix installation of the .desktop file.
-
-2003-03-27 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Add gal-2.0 to the list of packages to determine
- WOMBAT_CFLAGS and WOMBAT_LIBS.
-
-2003-03-26 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Autogen help/Makefile.
-
- * Makefile.am (SUBDIRS): Add help. [#38234]
-
-2003-03-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * configure.in: Fixed Heimdal include path.
-
-2003-03-25 Rodney Dawes <dobey@ximian.com>
-
- * data/evolution.desktop.in: Fix 39901 and 40233
-
-2003-03-21 Rodney Dawes <dobey@ximian.com>
-
- * configure.in: Fix the mit krb5+krb4 check to work with --without-kr5
-
-2003-03-19 Ettore Perazzoli <ettore@ximian.com>
-
- * README: Updated considerably.
-
-2003-03-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * configure.in: Fixed a type-o in the krb5 checks.
-
-2003-03-19 Not Zed <NotZed@Ximian.com>
-
- * configure.in (CAMEL_*, E_UTIL_*, ): Add gthread-2.0, to get any
- thread-specific flags (like -D_REENTRANT). Duh. For #39886.
- (LIBIBEX*): Removed old libibex stuff.
-
-2003-03-14 Chris Toshok <toshok@ximian.com>
-
- * tools/evolution-addressbook-export.c (save_cards): use
- bonobo_main_quit, and clean this up a bit.
-
-2003-03-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * configure.in: Added AC_C_INLINE - this should fix bug #39171.
-
-2003-03-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * configure.in: Fix kerberos include paths.
-
-2003-03-05 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Update version number to 1.3.1.99.
-
-== Version 1.3.1 ==
-
-2003-02-28 Dan Winship <danw@ximian.com>
-
- * tools/Makefile.am (evolution_launch_composer_LDADD): Fix
- dependencies
-
-2003-02-28 Hans Petter Jansson <hpj@ximian.com>
-
- * configure.in: Add calendar/importers/Makefile to output.
-
-2003-02-27 Chris Toshok <toshok@ximian.com>
-
- * tools/.cvsignore: ignore some stuff, yo.
-
- * tools/Makefile.am: add in the evolution-launch-composer stuff.
-
- * tools/evolution-launch-composer.c: port this from the 1.2 branch.
-
-2003-02-27 JP Rosevear <jpr@ximian.com>
-
- * configure.in: export gnome-pilot cflags
-
-2003-02-21 Dan Winship <danw@ximian.com>
-
- * libversit/Makefile.am: Make this a shared library to prevent
- linking portability problems
-
- * tools/Makefile.am (evolution_addressbook_import_LDADD): cleanup
-
-2003-02-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * configure.in (ENABLE_IPv6): AC_DEFINE() ENABLE_IPv6 if it should
- be enabled.
-
-2003-02-07 Rodney Dawes <dobey@ximian.com>
-
- * data/Makefile.am: Fix installation of desktop/mime files
-
-2003-02-06 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Add fr to ALL_LINGUAS again.
-
-2003-02-06 Rodney Dawes <dobey@ximian.com>
-
- * configure.in: Fix KRB4_CFLAGS to work correctly
- * data/Makefile.am: Fix desktop file installation path
- * data/evolution.desktop.in: Use correct binary and categories, add
- StartupNotify=1 also, for startup-notification-enabled systems
-
-2003-02-06 Dan Winship <danw@ximian.com>
-
- * configure.in: export priv*dir for libical's configure to use.
-
- * evolution-addressbook.pc.in (Libs): Remove -L${libdir}.
- (CFlags): s/includedir/privincludedir/
-
- * evolution-calendar.pc.in: Likewise
-
- * evolution-shell.pc.in: Likewise. Also change iconsdir to
- imagesdir
-
- * sounds/Makefile.am: remove soundsdir def
-
- * tools/Makefile.am: subst in $(toolsdir) instead of $(bindir)
-
- * tools/evolution-addressbook-clean.in:
- s/EVOLUTION_BINDIR/EVOLUTION_TOOLSDIR/
-
- * tools/evolution-addressbook-abuse.c (main):
- s/PACKAGE/GETTEXT_PACKAGE/ in gettext init
- * tools/evolution-addressbook-export.c (main): Likewise
- * tools/evolution-addressbook-import.c (main): Likewise
-
-2003-02-05 Dan Winship <danw@ximian.com>
-
- * configure.in: Define and AC_SUBST privlibexecdir, privdatadir,
- privincludedir, serverdir, evolutionuidir, imagesdir, buttonsdir,
- soundsdir, gladedir, etspecdir, and viewsdir.
-
- * data/Makefile.am (dtappintegrate, dtappunintegrate): use
- privdatadir
-
-2003-02-04 Dan Winship <danw@ximian.com>
-
- * configure.in: Update AC_DEFINEs to use the new syntax to make
- acconfig.h unnecessary. (Remove unneeded HAVE_KDE_APPLNK define).
- Call GNOME_COMPILE_WARNINGS and add $WARN_CFLAGS to CFLAGS to get
- back to the evo 1.2 behavior of defaulting to -Wall everywhere.
- Fix up privlibdir definition to avoid undefined variables in
- evolution-shell.pc.
-
- * acinclude.m4: Update AC_DEFINE
-
- * acconfig.h: Gone
-
-2003-02-03 Chris Toshok <toshok@ximian.com>
-
- * configure.in (EVOLUTION_MAIL): add gnome-vfs-module-2.0 to the
- deps so we pick up the right include path.
-
-2003-02-03 Chris Toshok <toshok@ximian.com>
-
- * configure.in: remove the --enable-shlib-components stuff.
-
-2003-01-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * configure.in (HAVE_KRB5): Updated to add gssapi libs, since this
- is what we use krb5 for :-)
-
-2003-01-28 Rodney Dawes <dobey@ximian.com>
-
- * tools/Makefile.am (EXTRA_DIST): s/bin_SCRIPTS/tools_SCRIPTS/
-
-2003-01-27 Ettore Perazzoli <ettore@ximian.com>
-
- * tools/evolution-addressbook-export.c: #include bonobo-activation
- instead of oaf.
- (main): Initialize using gnome_program_init().
- (save_cards): Use g_main_loop_quit() instead of gtk_exit().
-
- * tools/evolution-addressbook-import.c: Update include list for
- GNOME 2.
- (main): Initialize using gnome_program_init().
- (unref_executable): Use g_main_loop_quit() instead of gtk_exit().
- (add_cb): Likewise.
-
- * tools/evolution-addressbook-abuse.c: Update include list for
- GNOME 2.
- (main): Initialize using gnome_program_init().
- (use_addressbook): Use g_object_unref() instead of
- gtk_object_unref().
- (main): Use g_timeout_add() instead of gtk_timeout_add().
- (add_cb): Use g_main_loop_quit() instead of gtk_exit().
-
- * configure.in (AC_SUBST): Add tools/Makefile.
-
- * Makefile.am (SUBDIRS): Add tools/ back into the list.
-
- * tools/Makefile.am: Install everything in
- $(datadir)/evolution-$(BASE_VERSION)/tools.
- (INCLUDES): Add the defines that gnome_program_init() likes and
- also add the _DISABLE_DEPRECATED stuff.
-
-2003-01-26 Chris Toshok <toshok@ximian.com>
-
- * configure.in (AC_OUTPUT): add in the conduit Makefile's.
-
-2003-01-26 Chris Toshok <toshok@ximian.com>
-
- * configure.in: only do the CONDUIT_CFLAGS/LIBS stuff if pilot
- conduits have been enabled.
-
-2003-01-26 Chris Toshok <toshok@ximian.com>
-
- * configure.in: in the --enable-pilot-conduits stanza, use
- PKG_CHECK_MODULES to get the gnome-pilot-2.0 (and therefore
- pilot-link) cflags/libs before doing our utf-8 check. also,
- enable the addressbook/calendar CONDUIT_{CFLAGS/LIBS} variables.
-
-2003-01-24 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in (evolutionuidir): Define iconsdir.
-
-2003-01-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * configure.in (FULL_GNOME_DEPS): Doh. Use the
- MANUAL_[NSPR,NSS]_[CFLAGS,LIBS] variables where appropriate.
-
-2003-01-23 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in (idldir): Define componentdir instead of
- COMPONENT_DIR. Set it to $privlibdir/components instead of
- $libdir/evolution-$(BASE_VERSION)/components.
-
-2003-01-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * configure.in (MOZILLA_NSS): Simplify the whole process into
- about 8 lines by using pkg-config.
-
-2003-01-22 Ettore Perazzoli <ettore@ximian.com>
-
- * data/Makefile.am: For now, do not install the evolution.1
- manpage. Install all the other files with a -$(BASE_VERSION)
- suffix.
- (dtappintegrate): Update for the new location of cde_app_root.
- (dtappunintegrate): Likewise.
-
- * data/cde_app_root/dt/appconfig/appmanager/C/Ximian/Makefile.am
- (cdeappmanagerdir): Version using $(BASE_VERSION).
- * data/cde_app_root/dt/appconfig/types/C/Makefile.am
- (cdetypesdir): Likewise.
- * data/cde_app_root/dt/appconfig/icons/C/Makefile.am
- (cdeiconsdir): Likewise.
-
- * sounds/Makefile.am (soundsdir): Version using $(BASE_VERSION).
-
- * configure.in: Define BASE_VERSION. Set idldir to
- $datadir/idl/evolution-$BASE_VERSION instead of just
- $datadir/idl/evolution.
-
-2003-01-14 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in (ALL_LINGUAS): Remove fr for now, since it doesn't
- seem to work.
- (AC_OUTPUT): Remove calendar/importers/Makefile for now.
-
-2003-01-14 Rodney Dawes <dobey@ximian.com>
-
- * Makefile.am (EXTRA_DIST): intltool, not xml-i18n-tools
-
-2003-01-07 Dan Winship <danw@ximian.com>
-
- * Makefile.am (SUBDIRS): add po
-
- * configure.in: Move ALL_LINGUAS definition to before
- AM_GLIB_GNU_GETTEXT, or else no linguas for you!
-
-2003-01-06 Dan Winship <danw@ximian.com>
-
- * configure.in (AC_INIT): Use "Evolution", not "evolution", since
- that becomes the value of the PACKAGE variable
- (privlibdir): parse $VERSION by hand since.
- EVOLUTION_MAJOR_VERSION, etc aren't defined any more (and trying
- to pass a variable to AC_INIT won't work). This and the above
- change fix the problem that privlibdir was being defined as
- "${libdir}/Evolution/." instead of "${libdir}/evolution/1.3"
- (GAL_VERSION): AC_SUBST this since it's needed in the .pc files
- (idldir): define this here rather than in each Makefile.am that
- needs it.
- (AC_OUTPUT): Add .pc files
-
- * Makefile.am (pkgconfig_DATA): Add pc files.
- (confexec_DATA): Remove this (fooConf.sh files)
- (SUBDIRS): Move filter earlier in the build. (I think it was
- calendar that depends on it now?)
- (%Conf.sh): Remove this. The .pc files are output by configure.in
- now.
-
- * camel.pc.in, evolution-addressbook.pc.in,
- evolution-calendar.pc.in, evolution-shell.pc.in: Replace the
- *Conf.sh files with these. In addition to the basic variables,
- include camel_providerdir (in camel.pc) and idldir, IDL_INCLUDES
- and privlibdir (in the others).
-
-2002-12-04 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Define COMPONENT_DIR.
-
-2002-11-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * configure.in: Add NSPR CFLAGS and LDFLAGS to the E_UTIL build
- flags.
-
-2002-11-20 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: AC_OUTPUT(my-evolution/Makefile).
-
-2002-11-20 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am (changelogs): Add my-evolution.
-
-2002-11-20 Not Zed <NotZed@Ximian.com>
-
- * libibex/*: cvs removed it all. Not much use having it around
- anymore.
-
-2002-11-19 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Check for gconftool-2, and added
- AM_GCONF_SOURCE_2.
-
-2002-11-18 Not Zed <NotZed@Ximian.com>
-
- * configure.in: Added back IMPORTERS_CFLAGS and
- mail/importers/Makefile
-
-2002-11-16 Chris Toshok <toshok@ximian.com>
-
- * configure.in: we require >= 0.0.9.99 of gal.
-
-2002-11-15 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Set up the my-evolution flags properly, do not
- AC_SUBST GNOME_Evolution_Mail.server.in.
-
-2002-11-13 Not Zed <NotZed@Ximian.com>
-
- * Makefile.am (SUBDIRS): re-added filter, mail, composer
-
- * configure.in: Added EVOLUTION_MAIL settings, and mail/makefile.
-
-2002-11-11 Joe Shaw <joe@ximian.com>
-
- * Makefile.am (SUBDIRS): remove tools for now, it's not in
- configure.in.
-
-2002-11-11 Chris Toshok <toshok@ximian.com>
-
- * Makefile.am (SUBDIRS): add addressbook.
-
-2002-11-08 Chris Toshok <toshok@ximian.com>
-
- * configure.in: add some more addressbook paths.
-
-2002-11-08 Not Zed <NotZed@Ximian.com>
-
- * configure.in: Added composer/Makefile & gtkhtml-3.0 deps.
-
-2002-11-07 Chris Toshok <toshok@ximian.com>
-
- * configure.in (AC_OUTPUT): GNOME_Evolution_Summary.oaf.in = >
- GNOME_Evolution_Summary.server.in
-
-2002-11-07 JP Rosevear <jpr@ximian.com>
-
- * configure.in: update e-util and calendar compile flags
-
-2002-11-07 Rodrigo Moya <rodrigo@ximian.com>
-
- * configure.in: added libgnome-2.0 to camel requirements.
-
-2002-11-06 Chris Toshok <toshok@ximian.com>
-
- * configure.in: add some more addressbook dirs to AC_OUTPUT.
-
-2002-11-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * configure.in: Re-enable the filter cflags/libs stuff.
-
-2002-11-05 Chris Toshok <toshok@ximian.com>
-
- * Makefile.am (SUBDIRS): add wombat.
-
-2002-11-05 Chris Toshok <toshok@ximian.com>
-
- * configure.in: add wombat and addressbook compile flags, and add
- wombat and some addressbook dirs to AC_OUTPUT.
-
-2002-11-05 Dan Winship <danw@ximian.com>
-
- * configure.in: change the commented-out soup check to refer to
- the new soup 2.0 in the libsoup module
-
-2002-11-05 Rodrigo Moya <rodrigo@ximian.com>
-
- * configure.in: use correct libgtkhtml-3.0 for calendar and added
- generation of calendar GUI's directories.
-
-2002-11-05 Rodrigo Moya <rodrigo@ximian.com>
-
- * configure.in: enabled libwombat.
-
-2002-11-04 Rodrigo Moya <rodrigo@ximian.com>
-
- * configure.in:
- * Makefile.am: added libversit directory to build.
-
-2002-11-04 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am (SUBDIRS): Add shell.
-
-2002-11-04 Rodrigo Moya <rodrigo@ximian.com>
-
- * configure.in: added calendar/idl/Makefile to AC_OUTPUT
-
-2002-11-04 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Add an AM_GLIB_GNU_GETTEXT.
-
-2002-11-03 Rodrigo Moya <rodrigo@ximian.com>
-
- * configure.in:
- * Makefile.am: re-added calendar component (only non-UI stuff).
-
- * data/Makefile.am: use intltools instead of xml-i18n-tools.
-
-2002-11-03 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: AC_PROG_INTLTOOL instead of
- AM_PROG_XML_I18N_TOOLS.
-
-2002-11-01 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Update to use Autoconf 2.53. Remove checks for
- scrollkeeper. Remove intl/Makefile and macros/Makefile from
- AC_OUTPUT list. Set up GETTEXT_PACKAGE. Removed
- AM_ACLOCAL_INCLUDE(macros). Added AM_PATH_ORBIT2.
- (EVO_SET_COMPILE_FLAGS): Use PKG_CHECK_MODULES.
- (IDL_INCLUDES): New, -I params to pass to $(ORBIT_IDL) when
- compiling IDL files into stubs.
-
- * autogen.sh: Changed to use gnome-autogen.sh.
-
-2002-10-30 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: 1.1.90.99.
-
-== Version 1.1.90 (Release Candidate 1) ==
-
-2002-10-28 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: gal 0.21, GtkHTML 1.1.5.
-
-2002-10-23 Chris Toshok <toshok@ximian.com>
-
- * configure.in: Update dep for GAL to 0.21.0.
-
-2002-10-07 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Update version number to 1.1.2.99.
-
-== Version 1.1.2 ==
-
-2002-10-07 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: 1.1.2. Update deps for GAL and GtkHTML.
-
-2002-09-27 gettextize <bug-gnu-gettext@gnu.org>
-
- * Makefile.am (SUBDIRS): Add m4.
- (ACLOCAL_AMFLAGS): New variable.
- (EXTRA_DIST): Add config.rpath.
- * configure.in (AC_OUTPUT): Add po/Makefile.in, m4/Makefile.
-
-2002-09-23 Radek Doulik <rodo@ximian.com>
-
- * configure.in: use pkg-config for gtkhtml
-
-2002-09-23 JP Rosevear <jpr@ximian.com>
-
- * configure.in: fix kde applnk test to not test for things if
- disabled
-
- * configure.in: Fix up mozilla tests and allow static linking of
- nss/nspr (Frank Belew <frb@ximian.com>)
-
-2002-09-23 Aaron Weber <aaron@ximian.com>
-
- * README: Update URLs for mailing lists, Evolution application
- page, help information. Remove note that Evolution is beta. In
- general, changes to the "soft" data. Also, jeff's commit to this
- file from 2001-11-21 seems to have been lost, so I re-removed the
- stuff he took out. And changed libnspr to mozilla-nspr, and
- libnss3 to mozilla-nss.
-
- * data/evolution.1: Update with information about where the real
- help is. Clarify example formatting.
-
-2002-09-16 Ettore Perazzoli <ettore@ximian.com>
-
- * data/cde_app_root/Makefile.am: New.
- * data/cde_app_root/dt/Makefile.am: New.
- * data/cde_app_root/dt/appconfig/Makefile.am: New.
- * data/cde_app_root/dt/appconfig/appmanager/Makefile.am: New.
- * data/cde_app_root/dt/appconfig/appmanager/C/Makefile.am: New.
- * data/cde_app_root/dt/appconfig/appmanager/C/Ximian/Makefile.am: New.
- * data/cde_app_root/dt/appconfig/icons/Makefile.am: New.
- * data/cde_app_root/dt/appconfig/icons/C/Makefile.am: New.
- * data/cde_app_root/dt/appconfig/types/Makefile.am: New.
- * data/cde_app_root/dt/appconfig/types/C/Makefile.am: New.
-
- * configure.in: Add a `--with-cde-path' option. Check for
- dtappintegrate in that path. Define HAVE_DTAPPINTEGRATE and
- GNOME_PREFIX. Also, generate
- data/cde_app_root/dt/appconfig/types/C/Ximian.dt.in and
- shell/evolution-nognome.
-
-2002-09-12 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: 1.1.1.99.
-
-2002-09-11 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am (SUBDIRS): Put po on the top.
-
-== Version 1.1.1 ==
-
-2002-09-09 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: 1.1.1. Also bump some requirements.
-
- * README: Update according to the new requirements.
-
-2002-09-06 Larry Ewing <lewing@ximian.com>
-
- * NEWS: update with some gtkhtml features.
-
-2002-09-05 Ettore Perazzoli <ettore@ximian.com>
-
- * NEWS: Updated with the new 1.2 features (unfinished).
-
- * NEWS-1.0: New, contains the changes up to version 1.0.8.
-
-2002-09-04 Dan Winship <danw@ximian.com>
-
- * acinclude.m4 (EVO_CHECK_TIMEZONE): Remove this from here.
-
- * configure.in: Put it here. (Connector no longer needs to share
- it). Also, check "tm_gmtoff" before "timezone", and if we have
- "timezone", check for "altzone" too.
-
- * acconfig.h: Add HAVE_ALTZONE
-
-2002-08-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * configure.in: e-util now requires soup and gconf flags.
-
-2002-08-12 Dan Winship <danw@ximian.com>
-
- * tools/evolution-addressbook-import.c (main): Use default book,
- not local one.
-
- * tools/evolution-addressbook-export.c (main): Likewise.
-
- * tools/evolution-addressbook-abuse.c (abuse_timeout): Likewise.
-
-2002-08-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * README: Update required gal and gtkhtml dependency information.
-
-2002-08-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * configure.in (THREADS_CFLAGS): Need to check for gal 0.19.99.18
- for e_xml_save_file().
-
-2002-08-01 Ettore Perazzoli <ettore@ximian.com>
-
- * README: Update Soup information and remove hard spaces.
-
- * configure.in: Check for Soup 0.7 or later. [Hm, we should make
- sure that it's actually a 0.7.x version.]
-
-2002-07-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * configure.in: Add checks for IPv6 support.
-
-2002-07-30 Not Zed <NotZed@Ximian.com>
-
- * configure.in (EVOLUTION_MAIL): added soup to compile flags.
-
-2002-07-24 Ettore Perazzoli <ettore@ximian.com>
-
- [Patch by Frank Belew <frb@ximian.com>.]
-
- * configure.in: If no --with-kde-applnk-path is given, try to
- detect the directory using `kde-config'.
-
-2002-07-22 Dan Winship <danw@ximian.com>
-
- * acinclude.m4: Move EVO_CHECK_LIB into here, and also create
- EVO_PURIFY_SUPPORT, EVO_TIMEZONE_CHECK, and EVO_LDAP_CHECK from
- stuff in configure.in. (This stuff is also used by Connector.)
-
- * configure.in: Remove the stuff that was moved to acinclude.m4.
-
- * evolution_addressbookConf.sh.in: Remove db3 and ldap references
- since pas-backend-file and pas-backend-ldap are no longer in
- libpas, and those flags weren't doing anything useful here before
- anyway. (Our attempts to force static linking to those libraries
- end up getting mangled when passed through gnome-config.)
-
- * evolution_calendarConf.sh.in: Likewise, remove db3 references.
-
-2002-07-22 Dan Winship <danw@ximian.com>
-
- * configure.in: Check if we're trying to build with the old
- libversit module borrowed from gnome-pim instead of our own new
- one, and refuse to build if so.
-
- * libversit/Makefile.am: Remove libversit.la stuff since we don't
- want it and it messes up the build slightly.
-
-2002-07-18 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Prepend "$(WERROR)" to all the *_CFLAGS variables
- so you can do `make WERROR=-Werror' to turn all compiler warnings
- into errors.
-
-2002-07-09 Peter Williams <peterw@ximian.com>
-
- * libversit/Makefile.am (privlib_LIBRARIES): Install libversit.a so
- that people compiling against the addressbook can do so successfully.
-
- * Makefile.am: create our *Conf.sh files and dist them and install
- them.
-
- * configure.in: Define and subst some variables that the Conf.sh
- file need.
-
-2002-07-10 Peter Williams <peterw@ximian.com>
-
- * configure.in (privlibdir): Define a versioned library directory
- that we can use for things that are ABI-sensitive: camel
- providers, importers... Define camel_providerder in terms of this,
- resulting in a new location for the providers. Camel will have to
- be rebuilt for it to get the new -D flag.
-
-2002-07-12 Peter Williams <peterw@ximian.com>
-
- * configure.in (E_UTIL_LIBS): e-util relies on bonobo-conf
- in e-passwords.c and e-categories-master-list-wombat.c, so
- reflect that here. And the e-port code needs THREADS_LIBS.
-
-2002-07-09 Peter Williams <peterw@ximian.com>
-
- * tools/Makefile.am (INCLUDES): Add include lines to get
- ebook headers relative to <ebook/foo.h>, not "foo.h".
-
-2002-07-09 <jpr@ximian.com>
-
- * configure.in: re-order nss and nspr flags
-
-2002-07-03 Peter Williams <peterw@ximian.com>
-
- * README: Fix the URL for the DB 3.1.17 package; it's moved.
-
-2002-06-28 Ettore Perazzoli <ettore@ximian.com>
-
- [As suggested by #24466.]
-
- * data/evolution.desktop.in (Categories): Added.
-
-2002-06-27 Dan Winship <danw@ximian.com>
-
- * libversit/Makefile.am: Hack around a libtool/make problem that
- was causing libversit.a to be rebuilt at "make install" time,
- causing further relinking down the line.
-
-2002-06-18 JP Rosevear <jpr@ximian.com>
-
- * configure.in: check for libsoftokn3 if we couldn't link the
- first time
-
-2002-06-14 Chris Toshok <toshok@ximian.com>
-
- * libversit/vobject.c (unUseStr): fix a braindead typo that caused
- us to leak strings in certain circumstances (when the string being
- freed was second in the list, the head of the list would get
- lost.)
-
-2002-06-05 Christopher James Lahey <clahey@ximian.com>
-
- * configure.in: Changed the required version of gal to 0.19.99.17.
-
-2002-06-04 Christopher James Lahey <clahey@ximian.com>
-
- * configure.in: Changed the required version of gal to 0.19.99.16.
-
-2002-06-02 Larry Ewing <lewing@ximian.com>
-
- * configure.in: require gtkhtml-1.1.1.1 aka multicite branch.
-
-2002-05-14 Dan Winship <danw@ximian.com>
-
- * data/evolution.1: Document "evolution default:mail"
-
-2002-05-08 Ettore Perazzoli <ettore@ximian.com>
-
- * README: Add an explanation/warning about why we want Berkeley DB
- 3.1.17 and nothing else.
-
-2002-04-28 Larry Ewing <lewing@ximian.com>
-
- * configure.in: require gtkhtml-1.1.1.
-
-2002-04-29 Christopher James Lahey <clahey@ximian.com>
-
- * configure.in (EVO_CHECK_LIB): Bumped the required version number
- of gal to 0.19.99.15.
-
-2002-04-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * configure.in: Don't generate libibex/Makefile anymore.
-
- * Makefile.am: Removed libibex from SUBDIRS.
-
- * tools/Makefile.am: Don't link with libibex.
-
- * tests/Makefile.am: Same here.
-
-2002-04-22 Christopher James Lahey <clahey@ximian.com>
-
- * configure.in: Require gal 0.19.99.14.
-
-2002-04-17 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Require GAL 0.19.99.13.
-
-2002-04-17 Christopher James Lahey <clahey@ximian.com>
-
- * configure.in: Bumped required gal version number to 0.19.99.12.
-
-2002-04-17 Christopher James Lahey <clahey@ximian.com>
-
- * configure.in: Bumped required gal version number to 0.19.99.11.
-
-2002-04-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * configure.in: Add checks for gethostbyaddr_r
-
-2002-04-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * configure.in: Check for socklen_t and if it doesn't exist,
- define it as unsigned int.
-
-2002-04-04 JP Rosevear <jpr@ximian.com>
-
- * configure.in: Fix static linking on solaris which doesn't have a
- static libresolv.
-
-2002-04-01 Chris Toshok <toshok@ximian.com>
-
- * libversit/vobject.c (newStrItem): only include if USE_STRTBL is
- defined.
- (deleteStrItem): same.
- (hashStr): same.
- (lookupStr): if USE_STRTBL is defined, use existing behavior. if
- not defined, just dup the string.
- (unUseStr): if USE_STRTBL is defined, use existing behavior. if
- not defined, just free the string.
-
-2002-04-01 Dan Winship <danw@ximian.com>
-
- Darwin/OS X portability from Max Horn <max@quendi.de>
-
- * libversit/vcc.y: Remove #include <malloc.h>.
-
- * libversit/vobject.c: Likewise, and #include <stdlib.h>
-
-2002-03-30 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Add argument `--enable-shlib-components'. New
- substitutions OAF_SHLIB_LOCATION, OAF_SHLIB_PREFIX,
- OAF_SHLIB_SUFFIX.
-
-2002-03-29 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Check for GConf. Add gthreads to LIBIBEX_CFLAGS
- and LIBIBEX_LIBS.
-
-2002-03-28 Christopher James Lahey <clahey@ximian.com>
-
- * configure.in: Bumped the required version of gal to 0.19.99.10.
-
-2002-03-24 Peter Williams <peterw@ximian.com>
-
- * tools/killev: Change the OAFIID for the GtkHTML editor to
- have :1.1 at the end.
-
-2002-03-19 Dan Winship <danw@ximian.com>
-
- * tools/Makefile.am (evolution_addressbook_import_LDADD):
- s/libversit.la/libversit.a/
-
-2002-03-13 Chris Toshok <toshok@ximian.com>
-
- * configure.in (EVOLUTION_ADDRESSBOOK_DEPS): add gal.
-
-2002-03-12 Christopher James Lahey <clahey@ximian.com>
-
- * configure.in: Bumped the required version of gal.
-
-2002-03-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * configure.in: Allow the user to enable OpenSSL over Mozilla NSS
- using --enable-openssl or --disable-nss.
-
-2002-02-24 jacob berkman <jacob@ximian.com>
-
- * sounds/Makefile.am (EXTRA_DIST): add $(sounds_DATA)
-
-2002-02-22 Larry Ewing <lewing@ximian.com>
-
- * configure.in: add libglade the to the E_UTIL flags.
-
-2002-02-13 Christopher James Lahey <clahey@ximian.com>
-
- * configure.in: Bumped the required version of gal.
-
-2002-02-12 Tivo Leedjrv <leedjarv@interest.ee>
-
- * configure.in: Added et to ALL_LINGUAS.
-
-2002-02-09 JP Rosevear <jpr@ximian.com>
-
- * configure.in: make sure PISOCK cflags are added where
- appropriate
-
-2002-02-08 Damon Chaplin <damon@ximian.com>
-
- * Makefile.am (SUBDIRS): added sounds.
-
- * configure.in (AC_OUTPUT): added sounds/Makefile.
-
- * sounds/Makefile.am: new file.
- * sounds/default_alarm.wav: default alarm sound, currently only used
- when vCalendar files are imported with audio alarms. We need a better
- sound.
-
-2002-02-07 Christopher James Lahey <clahey@ximian.com>
-
- * configure.in: Bumped the required version of gal.
-
-2002-01-28 Radek Doulik <rodo@ximian.com>
-
- * configure.in: added bonobo to filter flags to avoid compile
- error
-
-2002-01-27 Ettore Perazzoli <ettore@ximian.com>
-
- * tools/Makefile.am: Use GNOME_FULL_LIBS and GNOME_FULL_CFLAGS.
-
- * configure.in: Define the CAMEL_{CFLAGS,LIBS} using
- EVO_SET_COMPILE_FLAGS. Likewise define E_UTIL_{CFLAGS,LIBS},
- E_NAME_{CFLAGS,LIBS}, SHELL_{CFLAGS,LIBS},
- IMPORTERS_{CFLAGS,LIBS}, WOMBAT_{CFLAGS,LIBS} and
- E_WIDGETS_{CFLAGS,LIBS}, LIBFILTER_{CFLAGS,LIBS}. Remove
- GAL_{LIBS,CFLAGS}. Add GNOME_FULL_{CFLAGS,LIBS}. Also, move all
- this stuff after OpenSSL check so they benefit from all the
- cflags/ldflags discoveries for the support libraries.
-
-2002-01-25 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Require gal 0.19.99.1.
-
-2002-01-24 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Define a new macro EVO_SET_COMPILE_FLAGS. Define
- EVOLUTION_ADDRESSBOOK_CFLAGS, EVOLUTION_ADDRESSBOOK_LIBS,
- EVOLUTION_ADDRESSBOOK_CONDUIT_CFLAGS,
- EVOLUTION_ADDRESSBOOK_CONDUIT_LIBS, EVOLUTION_SUMMARY_LIBS,
- EVOLUTION_SUMMARY_CFLAGS, EVOLUTION_CALENDAR_LIBS,
- EVOLUTION_CALENDAR_CFLAGS, EVOLUTION_CALENDAR_CONDUIT_LIBS,
- EVOLUTION_CALENDAR_CONDUIT_CFLAGS through it. Remove SOUP_CFLAGS
- and SOUP_LIBS.
-
-2002-01-15 Iain Holmes <iain@ximian.com>
-
- * configure.in: Add a check for libsoup. Define SOUP_CFLAGS and
- SOUP_LIBS
-
- * README: Update to include the SOUP dependancy.
-
-2002-01-04 Pablo Saratxaga <pablo@mandrakesoft.com>
-
- * configure.in: Added "eu" to ALL_LINGUAS
-
-2001-12-17 Dan Winship <danw@ximian.com>
-
- * configure.in (camel_providerdir): Define this here, using only
- EVOLUTION_MAJOR_VERSION and EVOLUTION_MINOR_VERSION (and not MICRO
- and NANO).
-
-2001-12-13 Chris Toshok <toshok@ximian.com>
-
- * configure.in: check for alloca.h.
-
-2001-12-12 Ettore Perazzoli <ettore@ximian.com>
-
- [Fix #16358, No man page for Evolution.]
-
- * data/Makefile.am (man_MANS): Install the man page.
-
- * data/evolution.1: New man page for Evolution.
-
-2001-12-10 JP Rosevear <jpr@ximian.com>
-
- * configure.in: use UTF-8 as the char set when testing pilot link
-
-2001-12-11 Ettore Perazzoli <ettore@ximian.com>
-
- * data/evolution.desktop.in (_Name): "Ximian Evolution", not
- "Evolution".
-
-2001-12-11 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Up VERSION to 1.1.0.99.
-
-2001-12-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * configure.in: s/PREVIEW_VERSION/VERSION_COMMENT
-
-2001-12-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * configure.in: Add a AC_DEFINE for PREVIEW_RELEASE which is a
- string that will be appended to the X-Mailer header.
-
-2001-11-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * README: Updated. Don't say that the user needs to copy their
- mozilla database files into ~/evolution, since Evolution now
- builds it's own default database files if they don't exist and
- also remove instructions for building with OpenSSL.
-
- * acconfig.h: Remove HAVE_OPENSSL define
-
- * configure.in: Remove checks for OpenSSL libraries.
-
-2001-11-20 Wang Jian <lark@linux.net.cn>
-
- * configure.in(ALL_LINGUAS): Re-Added zh_CN. It is checked
- against gettext 0.10.40 and 0.10.35 without any problem.
- Please contact me if anyone wants to disable it (AGAIN).
-
-2001-11-19 Abel Cheung <maddog@linuxhall.org>
-
- * configure.in: I will keep adding zh_TW to ALL_LINGUAS before
- somebody is willing to tell me why it is deleted without
- reason. It was checked against newest gettext (0.10.40) and
- older gettext (0.10.35) without any problem. A few
- translations are not removed from ALL_LINGUAS even though
- they failed in msgfmt checking.
-
-2001-11-14 Ettore Perazzoli <ettore@ximian.com>
-
- * README: Updated.
-
- * configure.in: 0.99.2. Require gtkhtml 0.16.1 and GAL 0.18.1.
-
-2001-11-14 Ettore Perazzoli <ettore@ximian.com>
-
- * NEWS: Redone with the bug #s from Bugzilla.
-
-2001-11-14 Federico Mena Quintero <federico@ximian.com>
-
- * NEWS: Calendar/tasks NEWS.
-
-2001-11-13 JP Rosevear <jpr@ximian.com>
-
- * configure.in: restore cflags and ldflags properly
-
-2001-11-12 JP Rosevear <jpr@ximian.com>
-
- * configure.in: save the ldflags properly
-
-2001-11-09 JP Rosevear <jpr@ximian.com>
-
- * configure.in: Check to make sure pilot-link has the charset
- conversion stuff enabled
-
-2001-11-09 Ettore Perazzoli <ettore@ximian.com>
-
- * tools/killev: Chop the output from `uname -s'. Thanks to
- Michael Gerdts for suggesting the fix.
-
-2001-11-09 Abel Cheung <maddog@linux.org.hk>
-
- * configure.in: Re-added zh_TW to ALL_LINGUAS. Translator keep
- complaining to me, and waste a month before discovering it was
- disabled while I know nothing about it. Please at least complain
- to me if it's gettext problem.
-
-2001-11-06 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Up to 0.99.1 for snapshot purposes.
-
-2001-11-05 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Upgrade version number to 0.99.0. Require GtkHTML
- 0.16 and GAL 0.18.
-
-2001-11-05 JP Rosevear <jpr@ximian.com>
-
- * NEWS: Small update
-
-2001-11-05 Ettore Perazzoli <ettore@ximian.com>
-
- * NEWS: Updated.
-
-2001-10-31 Ettore Perazzoli <ettore@ximian.com>
-
- * data/evolution.desktop.in (Icon): evolution.png instead of
- evolution-icon.png.
-
-2001-10-31 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Update version to 0.17.100.
-
-2001-10-31 JP Rosevear <jpr@ximian.com>
-
- * NEWS (Conduits): update
-
-2001-10-30 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Add oaf to MAILER_CFLAGS and MAILER_LIBS too.
-
-2001-10-30 Jeffrey Stedfast <fejj@ximian.com>
-
- * NEWS (Mailer): Updated mailer NEWS.
-
-2001-10-30 <NotZed@Ximian.com>
-
- * NEWS (Mailer): My mailer news.
-
-2001-10-30 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Add oaf to the BONOBO_VFS_GNOME_CFLAGS too.
-
-2001-10-30 Federico Mena Quintero <federico@ximian.com>
-
- * NEWS (Calendar): Calendar NEWS.
-
-2001-10-30 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Add oaf to the BONOBO_GNOME_LIBS,
- BONOBO_GNOME_CFLAGS, BONOBO_HTML_GNOME_LIBS,
- BONOBO_HTML_GNOME_CFLAGS.
-
-2001-10-30 Federico Mena Quintero <federico@ximian.com>
-
- * configure.in: Require GAL version 0.15.99.10. I know you all
- love this.
-
-2001-10-30 Radek Doulik <rodo@ximian.com>
-
- * configure.in: require gtkhtml version 0.15.99.2
-
-2001-10-29 Damon Chaplin <damon@ximian.com>
-
- * configure.in (ALL_LINGUAS): added en_AU (copied en_GB).
-
-2001-10-30 Christopher James Lahey <clahey@ximian.com>
-
- * configure.in: Require gal 0.15.99.9.
-
-2001-10-30 <notzed@ximian.com>
-
- * configure.in: Move the configure version number check down
- a bit for gtkhtml/gal, c'ause i'm sick of fixing a manual
- patch i have every bloody time the version changes.
-
-2001-10-29 Joe Shaw <joe@ximian.com>
-
- * configure.in: Require gal 0.15.99.8
-
- * addressbook/backend/ebook/e-card-simple.c,
- addressbook/gui/component/addressbook-storage.c,
- addressbook/gui/widgets/e-addressbook-view.c,
- calendar/gui/e-calendar-table.c,
- calendar/gui/e-itip-control.c,
- calendar/gui/e-meeting-model.c,
- calendar/gui/itip-utils.c,
- calendar/gui/print.c,
- calendar/gui/alarm-notify/alarm-notify-dialog.c,
- filter/rule-editor.c,
- mail/mail-config.c,
- mail/mail-folder-cache.c,
- mail/mail-format.c,
- mail/mail-local.c,
- mail/mail-ops.c,
- mail/mail-vfolder.c,
- shell/e-local-storage.c,
- shell/e-summary-storage.c: Change includes of
- e-util/e-unicode-i18n.h to gal/util/e-unicode-i18n.h
-
- * e-util/Makefile.am: Don't build e-unicode-i18n.[ch] anymore.
-
-2001-10-29 Christopher James Lahey <clahey@ximian.com>
-
- * NEWS (Addressbook): Added my addressbook changes.
-
-2001-10-29 Ettore Perazzoli <ettore@ximian.com>
-
- * AUTHORS: Add Larry and Radek.
-
-2001-10-30 Radek Doulik <rodo@ximian.com>
-
- * configure.in: require gtkhtml version 0.15.99.1
-
-2001-10-29 Rodrigo Moya <rodrigo@ximian.com>
-
- * configure.in: added calendar/importers/Makefile
-
-2001-10-29 Christopher James Lahey <clahey@ximian.com>
-
- * configure.in: Bumped required version of gal to 0.15.99.7.
-
-2001-10-28 JP Rosevear <jpr@ximian.com>
-
- * data/Makefile.am: no need to use destdir
-
-2001-10-27 Christopher James Lahey <clahey@ximian.com>
-
- * configure.in: Bumped required version of gal to 0.15.99.6.
-
-2001-10-27 Dan Winship <danw@ximian.com>
-
- * configure.in: Change the help string on "--enable-nntp" to
- mention the fact that NNTP support is incomplete and unsupported.
- If the user doesn't pass --enable-nntp, don't mention NNTP at all
- in the summary at the end. Also, mention which SSL library is
- being used when SSL support is enabled, and don't mention anything
- about S/MIME since it doesn't work.
-
-2001-10-26 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: GAL 0.15.99.5.
-
-2001-10-26 Kevin Breit <mrproper@ximian.com>
-
- * AUTHORS: Updated my email address.
-
-2001-10-26 <NotZed@Ximian.com>
-
- * configure.in: Bump gal requirement.
-
-2001-10-23 Chris Toshok <toshok@ximian.com>
-
- * tools/killev: and add a way to get some more spew about the
- commands we're executing.
-
-2001-10-23 Chris Toshok <toshok@ximian.com>
-
- * tools/killev: use eq instead of ==.
-
-2001-10-23 Christopher James Lahey <clahey@ximian.com>
-
- * configure.in: Bumped required GAL to 0.15.99.3 so EEntry's
- "draw_button" argument can be used in
- addressbook/gui/component/select-names/e-select-names.c.
-
-2001-10-22 Damon Chaplin <damon@ximian.com>
-
- * configure.in: bumped required GAL to 0.15.99.2.
-
-2001-10-22 Ettore Perazzoli <ettore@ximian.com>
-
- * acconfig.h: HAVE_KDE_APPLNK.
-
- * configure.in (EVO_CHECK_LIB): AC_DEFINE `HAVE_KDE_APPLNK' in the
- case in which the kde applnk dir is found. Also fix the logic
- with the checking so it doesn't get fooled.
-
-2001-10-22 JP Rosevear <jpr@ximian.com>
-
- * data/Makefile.am: include destdir in the path of the kde desktop
- installation dir
-
-2001-10-20 Ettore Perazzoli <ettore@ximian.com>
-
- * data/Makefile.am [HAVE_KDE_APPLNK]: Install `evolution.desktop'
- in the `KDE_APPLNK_DIR'.
-
- * configure.in: New option `--with-kde-applnk-path'. Define the
- `HAVE_KDE_APPLNK' Automake conditional, and the `KDE_APPLNK_DIR'
- value.
-
-2001-10-19 Dan Winship <danw@ximian.com>
-
- * tools/Makefile.am (EXTRA_DIST): Merge the two EXTRA_DIST
- declarations together so they both happen.
-
-2001-10-18 Chris Toshok <toshok@ximian.com>
-
- * tools/killev: use a new fangled perl script that queries oaf for
- interfaces we want to kill.
-
-2001-10-18 Christopher James Lahey <clahey@ximian.com>
-
- * configure.in: Bumped the required version of gal to 0.15.99.1
- for use in evolution-addressbook-export.
-
- * tools/.cvsignore: Added evolution-addressbook-clean,
- evolution-addressbook-export, evolution-addressbook-import, and
- .libs.
-
- * tools/Makefile.am: Added evolution-addressbook-clean,
- evolution-addressbook-export, and evolution-addressbook-import.
-
- * tools/evolution-addressbook-clean.in: Main script to clean up
- the local contact database.
-
- * tools/evolution-addressbook-export.c: Exports the local
- addressbook to the specified file
- (--output-file). If no --output-file is given, writes out to a
- unique file in the /tmp directory. In either case, prints the
- filename to stdout.
-
- * tools/evolution-addressbook-import.c: Imports the specified file
- (--input-file) to the local addressbook.
-
-2001-10-18 Wang Jian <lark@linux.net.cn>
-
- * configure.in(ALL_LINGUAS): Added zh_CN for Simplified Chinese.
-
-2001-10-17 Christopher James Lahey <clahey@ximian.com>
-
- * NEWS (Addressbook): Wrote Addressbook news.
-
-2001-10-12 Chris Toshok <toshok@ximian.com>
-
- * tools/killev: kill evolution-ldif-importer.
-
-2001-10-11 Federico Mena Quintero <federico@ximian.com>
-
- * configure.in (AC_OUTPUT): Fix the order of the help/ subdirs.
- These must be sorted as a preorder walk for a tree!
-
-2001-10-10 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: 0.16.99.
-
-2001-10-10 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: 0.16. Require GtkHTML 0.15 or later and GAL 0.14
- or later. Also, make $with_nspr_includes default to
- `/usr/include/nspr' instead of `/usr/include/mozilla' and
- $with_nss_includes to `/usr/include/moznss' instead of
- `/usr/include/mozilla'.
-
-2001-10-10 Ettore Perazzoli <ettore@ximian.com>
-
- * NEWS: Added info about the shell, plus some minor fixes for
- consistency.
-
-2001-10-10 Christopher James Lahey <clahey@ximian.com>
-
- * NEWS (Addressbook): Updated.
-
-2001-10-09 Federico Mena Quintero <federico@ximian.com>
-
- * NEWS (Calendar): Calendar NEWS.
-
-2001-10-09 <NotZed@Ximian.com>
-
- * NEWS (Mailer): Updated for beta 6.
-
-2001-10-09 Rodrigo Moya <rodrigo@ximian.com>
-
- * configure.in: add libart to list of libraries to use in
- EXTRA_GNOME_CFLAGS/LIBS, which is needed for latest libart versions
-
-2001-10-09 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: AC_OUTPUT(default_user/local/Makefile) before
- AC_OUTPUT()ing the other subdirs of `default_user/local'. Fix
- pointed out by Dmitry G. Mastrukov <dmitry@fitmark.net>.
-
-2001-10-07 Dan Winship <danw@ximian.com>
-
- * configure.in: Remove movemail check, since it's not relevant any
- more.
-
-2001-10-05 Larry Ewing <lewing@ximian.com>
-
- * configure.in: Bumped required version of gtkhtml to 0.14.99.1
-
-2001-10-05 Christopher James Lahey <clahey@ximian.com>
-
- * configure.in: Bumped required version of gal to 0.13.99.1.
-
-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.
-
-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 ce31d66dac..0000000000
--- a/HACKING
+++ /dev/null
@@ -1,277 +0,0 @@
-
-1 Patch guidelines
-
-This section lists some guidelines for writing a good patch which is
-more likely to be accepted.
-
-Any new features or large scale work should first be discussed on the
-evolution-hackers list first. This will ensure the idea fits in the
-direction we wish to take Evolution, and also that the effort is not
-duplicated. See section 3 for details on the mailing lists.
-
-1.1 Patch basics
-
-o The patch should apply cleanly at the time it is made.
-
-o It must compile once applied.
-
-o It must not generate any more compile time warnings than were
- already there. This may be platform dependent so simply do your
- best.
-
-o It must conform to C89/C90 (ANSI/ISO C), and build with gcc using
- the default compile flags.
-
- The primary trap is that in C99 you may define variables anywhere in
- the code, in C89 they must be declared in a declaration block which
- follows any block start '{'.
-
- If you wish to ensure the code is C89, try the following.
-
- From the gcc manual page:
- "To select
- this standard in GCC, use one of the options `-ansi', `-std=c89' or
- `-std=iso9899:1990'; to obtain all the diagnostics required by the
- standard, you should also specify `-pedantic'" ...
-
- You may actually have to use '-std=gnu89' if libraries have taken
- advantage of gcc extensions and where not compiled similarly, as the
- above options will disable all gnu extensions.
-
- [FIXME: Add the same option for Forte here]
-
-o It should not add any extra debug printing by default, unless the
- patch is specifically to add extra debug printing.
-
-o It should not use any gcc extensions, except where they are properly
- checked for and not used with other compilers. glib provides some
- of these features as portable macros and should be used when they
- cover the required functionality.
-
-1.1 GUI changes
-
-If the change requires non-trivial user interface changes, then they
-will have to be discussed and approved on the evolution-hackers list
-first. This is highly recommended before embarking on any UI work, or
-large scale work in general. The Gnome HIG document is the place to
-start on any UI changes or additions.
-
-1.2 Translated string changes
-
-Any changes to translated strings in a stable release must be
-discussed on the hackers list (see section 3), and/or as part of the
-patch submission. There must be very good reasons for changing the
-strings in this case.
-
-1.3 Coding style
-
-Generally the coding style employed matches the "Linux Kernel" style,
-that is, basically K&R style indenting with 8 space tabs. Tabs should
-be used rather than space characters. Reformatting of otherwise
-unchanged code is not acceptable. Editors should have any automatic
-reformatting features disabled.
-
-K&R style indenting puts braces on the same line. The opening
-parenthesis of a function call or conditional statement should be on
-the same line as the function. "else" "} else" and "} else {" must
-always occur on lines by themselves.
-
-A single blank line should follow {} blocks (if not immediately
-followed by the close of another block), and conditional statements,
-and be used to separate logical groups of statements in the same
-block.
-
-A single blank line only should separate functions, and other
-structures at the top level of the file (i.e. outside functions). The
-same rule applies to variable declarations at the start of a block.
-
-An example of the most-developer-preferred formatting:
-
-TheType
-the_function (int frank)
-{
- int a = 1;
-
- if (a == frank) {
- a = foo (a);
- } else {
- do {
- a = bob (frank) + a;
- } until (a == frank);
-
- frank = a;
- }
-
- return (TheType) a;
-}
-
-Where there are slight stylistic differences, the style in the
-surrounding code should be followed.
-
-1.3.1 Object casts
-
-You can either use C style casts, or Gtk style casts. Note that Gtk
-style casts can add significant execution overhead, which is not
-adding any extra checking. e.g. if arguments have already been
-type-checked by preconditions. Putting a space between a cast and a
-variable is optional, but preferred by most of the developers.
-
-1.3.2 Preconditions
-
-External api entry points should have preconditions (g_return_if_fail,
-etc), although their use varies from case to case. Internal entry
-points and/or when you are guaranteed the type has already been
-checked, are unecessary. Object initialisation and other virtual
-method invocations are considered internal entry points.
-
-1.3.3 Line lengths
-
-Do not expend effort and resort to unreadable formatting merely to fit
-any long lines into 80 column widths. We use 8 space tabs, and
-because of the lack of namespacing other than extending the function
-name, many of the function and type names are too long for this to be
-practical. We now all uses high resolution displays, and not
-circa-80's VT100 terminals!
-
-On the other hand, lines should generally not exceed 100 characters,
-and absolutely not exceed 160 characters. If your tab nesting is too
-deep you probably have a poor design that needs rethinking.
-
-1.4 Design
-
-This is a tricky issue to document, but the design of new code should
-`fit' with the existing design of the relevent module. It should at
-the very least, be no worse.
-
-Code should not cross existing abstraction boundaries or attempt
-to remove or work around them, if required the existing design may
-need adjustment.
-
-Type and method names should follow the existing practice in the
-surrounding code. Method arguments should follow the same order as
-related methods, and should use the same names for matching
-parameters.
-
-Per file, static class globals are ok, true globals may be ok, but
-should be used sparingly. Use 'i' for a loop variable, if that's all
-it is, don't use 'the_current_index'. etc.
-
-If in doubt, ask on the lists.
-
-2. Patch submission guidelines
-
-This section outlines procedures that should be followed when
-submitting patches to evolution, via the evolution-patches mailing
-list.
-
-You must subcribe to the list at
-`http://lists.ximian.com/mailman/listinfo/evolution-patches' before you
-can submit patches to it.
-
-Also note that if you attach a patch to a bug report, it should always
-be sent to the list for attention.
-
-Any non-trival patches (patches of more than 1 or 2 changed lines in
-more than 5 isolated locations) also require copyright assignment.
-See http://developer.ximian.com/projects/evolution/copyright.html for
-details.
-
-If you follow the guidelines listed here, you should generally expect
-a response within 2 working days. If you re-send the same patch
-repeatedly, you will more likely receive less attention. Do not
-re-send the same patch repeatedly.
-
-2.1 Subject Lines
-
-If the patch addresses a specific bug in bugzilla.ximian.com, then the
-bug number must be included in the subject line, preferably near the
-beginning of the subject line. A concise summary of the bug(s) being
-addressed, should be the remainder of the subject.
-
-It is unnecessary to add "[PATCH]", "patch" or similar to the subject
-line, unless it is being cross-posted to other non-patch lists.
-
-It is absolutely unnecessary to add "please consider", "please review",
-or "seeking review", or similar, to the subject line. Please do not do
-this.
-
-Where the patch does not address a specific bug number, then the subject
-line should simply be a concise summary of the problem/feature it
-addresses.
-
-In all cases the subject line should include the module(s) to which the
-patch applies, and would generally match the component on the bug or
-the top-level module directory (e.g. camel, mail, addressbook, use 'all'
-for more than 3 or 4 modules).
-
-2.2 Message Body
-
-Patches should be attached as attachments, preferably as a single
-diff, when possible, and the changes are related. The diff must be in
-unified diff format, "-up" is a suitable argument to give to "cvs
-diff" (-p may be dropped if not supported by your diff). If you have
-added files, then -N should also be used, but if you are using cvs,
-"cvs add" is needed, and requires write access to the repository.
-
-If the patch does not address a specific bug, then the patch email
-should describe which feature or problem it addresses. If it does
-address a specific bug, then further explanation beyond the bug
-commentary is optional, although often convenient.
-
-It would also be helpful to summarise the module to which it applies
-in the message body.
-
-In all cases you should include which branch, or branches, the patch
-is intended to apply to. If this is not given it will be assumed to
-be the trunk (HEAD), and such patches will and must not be applied to
-any stable branch without further approval.
-
-2.3 ChangeLogs
-
-All patches must include appropriate ChangeLog diff's, to the
-appropriate ChangeLog(s) for the given change (emacs will automatically
-find the correct one, and format the entry appropriately). All but
-the most trivial of patches will not be considered or discussed
-without this. It is ok to contain extra ChangeLog entries for other
-pending patches, but they should not be excessively long - it isn't
-that hard to isolate patch diffs. If the patch addresses a bug in
-bugzilla.ximian.com, then the ChangeLog entry must include some
-reference to that bug number (either the number, or #number, or 'bug
-xxx'). If it addresses a bug in another bug system, it must also
-indicate which bug system ('gnome bugzilla' 'red-hat bugzilla', etc).
-
-2.4 Stable branches
-
-Generally, any patch to the stable branch from non-core developers
-must address a specific bug in bugzilla.ximian.com. The patch should
-also be attached to the bug in question, with the keyword 'patch' set
-on the bug report. The patch email must identify which stable branch
-and version it is to apply to.
-
-3 Mailing lists
-
-3.1 Evolution Hackers
-
-If you wish to discuss patches before they are submitted, or ideas
-before you start to work on them, do it on the evolution-hackers list,
-which may be subscribed and viewed at
-`http://lists.ximian.com/mailman/listinfo/evolution-hackers'.
-
-This is a low-volume list (5-10 posts per day on average).
-
-Some patches may be discussed here to get a wider audience, although
-once a patch has been made it should generally be discussed on
-evolution-patches.
-
-Feature requests, bug reports, and other user related discussions,
-without the intention to write code to address them, will be ignored.
-
-3.2 Evolution Patches
-
-The patch submission list evolution-patches may be subscribed and
-viewed at
-`http://lists.ximian.com/mailman/listinfo/evolution-patches'. Once a
-patch has been written, it may be submitted here for discussion, as
-well as final approval.
-
-Any non-patch related postings to this list will be ignored.
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 c23ea2e96e..0000000000
--- a/MAINTAINERS
+++ /dev/null
@@ -1,20 +0,0 @@
-Overall Maintainers:
-Ettore Perazzoli <ettore@ximian.com>
-JP Rosevear <jpr@ximian.com>
-
-Mail:
-Jeff Steadfast <fejj@ximian.com>
-Michael Zucchi <notzed@ximian.com>
-
-Addressbook:
-Chris Toshok <toshok@ximian.com>
-Hans Petter Jansson <hpj@ximian.com>
-
-Calendar
-Rodrigo Moya <rodrigo@ximian.com>
-Hans Petter Jansson <hpj@ximian.com>
-
-Composer:
-Larry Ewing <lewing@ximian.com>
-Radek Doulik <rodo@ximian.com>
-
diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644
index 82425329dd..0000000000
--- a/Makefile.am
+++ /dev/null
@@ -1,73 +0,0 @@
-changelogs = \
- ChangeLog \
- ChangeLog.pre-1-4
-
-%-$(BASE_VERSION).pc: %.pc
- mv $< $@
-
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = \
- camel-$(BASE_VERSION).pc \
- evolution-shell-$(BASE_VERSION).pc
-
-EXTRA_DIST = \
- AUTHORS \
- $(changelogs) \
- COPYING-DOCS \
- README \
- HACKING \
- MAINTAINERS \
- NEWS \
- NEWS-1.0 \
- marshal.mk \
- server.mk \
- intltool-merge.in \
- intltool-update.in \
- intltool-extract.in \
- $(pkgconfig_DATA:-$(BASE_VERSION).pc=.pc.in)
-
-if ENABLE_SMIME
-SMIME_DIR=smime
-endif
-
-SUBDIRS = \
- data \
- e-util \
- a11y \
- widgets \
- shell \
- camel \
- filter \
- $(SMIME_DIR) \
- addressbook \
- calendar \
- art \
- composer \
- mail \
- ui \
- default_user \
- views \
- tools \
- help \
- po
-
-
-# CDE Stuff
-
-if HAVE_DTAPPINTEGRATE
-
-# This installs Evolution into the Application Manager on CDE
-dtappintegrate:
- ( cd data && make dtappintegrate )
-
-# ...And this uninstalls it
-dtappunintegrate:
- ( cd data ; make dtappunintegrate )
-
-# Install/uninstall for CDE
-cde-install: install dtappintegrate
-cde-uninstall: dtappunintegrate uninstall
-
-endif
-
-ACLOCAL_AMFLAGS = -I m4
diff --git a/NEWS b/NEWS
deleted file mode 100644
index 0591b22d48..0000000000
--- a/NEWS
+++ /dev/null
@@ -1,780 +0,0 @@
-Evolution 1.4.1, 2003-06-25
----------------------------
-
-Bugzilla bugs fixed (see http://bugzilla.ximian.com/show_bug.cgi):
-
- * Addressbook
-
- #41826 - Focus the first minicard when focusing the view for the
- first time (gilbert.fang@sun.com)
- #43841 - Contact editor will not save Web Page address (Toshok)
- #44477 - Make sure the master category list is upgraded (Toshok)
-
- * Calendar
-
- #41582 - Display incorrect after switching between week and day
- view (Rodrigo)
- #43585 - Ugly tasks printout (Hans Petter)
- #45273 - Tab through events in day view (Bolian Yin)
- #45275 - Shift+F10 to activate Popup menu in ToDo List (Bolian Yin)
- #45423 - Provide shortcus for "Go to today" and "Go to date" (Bolian Yin)
-
- * Mail
-
- #22542 - Creating a folder in the vFolder store fails with a
- meaningless message (Michael)
- #31745 - Cannot view mails under '#mh' namespace. Temporary
- workaround, strip #'s (Michael)
- #33593 - Message remains displayed after last message removed from
- list (Michael)
- #40788 - Broken POP3 server causing evolution to hang/crash (Jeff)
- #42630 - collapsed thread always shows as unread (Jeff)
- #43917 - ECharsetPicker doesn't save user-specified charset strings
- properly (Jeff)
- #43972 - Invert selection doesn't work (Jeff)
- #43974 - Cannot retrieve "Local Delivery" mail (Michael)
- #44121 - Invalid multipart/signed message showing empty (Michael)
- #44139 - Composer spacing is not HIG compliant (Jeff)
- #44322 - Evolution crash with weird IMAP foldername (Michael)
- #44344 - Dont use quoted-printable encoding on anything but text/*
- parts, interoperation with Lookout and others (Jeff)
- #44457 - Crash viewing video content as inline-text (Jeff)
- #44519 - Popup message view redraws when new mail arrives (Michael)
- #44609 - HIG issue with vFolder properties editor (Michael)
- #44991 - Cannot send mail in GB-2312 (Jeff)
- #45082 - GB18030 BIG5HKSCS and EUC-TW charsets not supported in
- evolution mail (suresh.chandrasekharan@sun.com)
- #45063 - Message display refreshes when new mail arrives,
- introducted by #33593 (Michael)
- #45386 - Warnings when sending mail (Michael)
- #45368 - Crash when closing the folder browser
-
- * Summary
-
- #44111 - Crash on exit (Ettore)
- #44798 - Crash when closing print preview dialog (Ettore)
-
- * All
-
- #42691 - Build, make clean doesn't rebuild bonobo-activation
- .server files (Michael)
- #44717 - Tarball cointains generated files (Frederic Crozat)
-
-Other bugs
-
- * Calendar
-
- - Fix invalid shared use of list of calendar factories (Rodrigo)
- - Make the calendar editor window title reflect the summary contents (Rodrigo)
-
- * Mail
-
- - Fix bug in indexer string normalisation (they weren't) (Larry)
- - Major memory leak in message-threading (Larry)
- - Only try to snoop a content-type if its application/octet-stream
- when displaying mail parts (Jeff)
- - Major memory leak in filter-file based filters (Jeff)
- - Try to make asynchronous dns lookup more asynchronously
- cancellable (Michael)
- - Fix a degenerate algorithm case in vFolder shutdown which could
- cause excessive exit cpu usage (Michael)
-
- * Shell
-
- - Wrong version number used for configuration upgrade (Michael)
-
- * All
-
- - Lots of miscellaneous memory leaks
-
-Updated translations:
-
- - cs (Miloslav Trmac, Stanislav Brabec)
- - el (Kostas Papadimas)
- - es (Francisco Javier F. Serrador)
- - hu (Andras Timar)
- - it (Marco Ciampa)
- - ko (Kan Jeong-Hee)
- - mk (Ivan Stojmirov)
- - nl (Vincent van Adrighem)
- - pt_BR (Gustavo Maciel Dias Vieira)
- - sr, sr@Latn (prevod.org)
- - sv (Christian Rose)
- - tr (Gorkem Cetin)
- - zh_CN (Wang Li, Funda Wang)
-
-
-Evolution 1.4, 2003-06-02
--------------------------
-
-Bugzilla bugs fixed (see http://bugzilla.ximian.com/show_bug.cgi):
-
- * Calendar
-
- #43388 - Problems importing appointments (Rodrigo)
- #43455 - Crash on exit (Rodrigo)
- #43763 - 2 right mouse menus appear in Week & Month views (Rodrigo)
- #43775 - Crash under Chinese locale (JP)
-
- * Mail
-
- #42854 - Copying files from one IMAP folder to another makes
- multiple copies of file (Jeff)
- #43862 - First run imap account won't load folders until account
- is disabled and re-enabled (Jeff, Michael)
- #42691 - Server files not regenerated after distclean (Michael)
- #43805 - Evolution locked while editing reply to an mail (Jeff)
- #43410 - Flag for Followup dialog opens up too small in Evo (Michael)
- #43688 - Can't save signatures (Michael)
-
- * Summary
-
- #43506 - Spontaneous crash (Ettore)
-
- * Misc
-
- #43596 - Symlink icon file so it doesn't break existing panel
- setups (Ettore)
-
-Other bugs fixed:
-
- * Addressbook
-
- - Removed conflicting shortcut for the Print Preview menu item
- (Rodney)
-
- * Misc
-
- - Corrected some problems in the pkgconfig files (Rodney)
- - Fixed an issue with GConf schema file installation (Joe Marcus
- Clarke)
-
-Updated translations:
-
- - nl (Vincent van Adrighem)
- - ru (GNOME Russian Team)
- - be (GNOME Belarusian Team)
- - es (Francisco Javier F. Serrador)
-
-
-Evolution 1.3.92, 2003-05-22
-----------------------------
-
-Bugzilla bugs fixed (see http://bugzilla.ximian.com/show_bug.cgi):
-
- * Addressbook
-
- #38084 - Rename local folder issue in contacts (sean.gao@sun.com)
- #41130 - HIG compliance (Anna)
- #41137 - HIG compliance (Anna)
- #41140 - HIG compliance (Anna)
- #41144 - Use stock buttons in the ldap config page (Toshok)
- #41211 - Add icon to "Add" button in "Add to Contacts" dialog (Toshok)
- #41229 - HIG compliance (Anna)
- #41231 - HIG compliance (Anna)
- #41232 - HIG compliance (Anna)
- #41245 - HIG compliance (Toshok)
- #41248 - HIG compliance (Anna)
- #41249 - HIG compliance (Anna)
- #41250 - HIG compliance (Anna)
- #41251 - HIG compliance (Anna)
- #41254 - HIG compliance (Anna)
- #41255 - Use stock Add/Remove icons in the contact list editor (Toshok)
- #41910 - Crash when deleting addresses from long contact lists (Toshok)
- #42048 - "Print" not hooked up in etable view (Toshok)
- #42177 - Cannot tab out of date edit widgets in contact editor (Toshok)
- #42472 - Selecting a field in a contact highlights entire row (Toshok)
- #42596 - Selecting text in a contact address field selects all
- rows of text (Toshok)
- #42604 - Display not shifted when cursor moved to next address
- line (Toshok)
- #42606 - Not saving information entered in Notes field of Contact
- editor (Toshok)
- #42620 - Crash related to mailing address checkbox (Toshok)
- #42625 - Clicking in white space of contact brings up empty
- contact editor (Toshok)
- #42780 - Crash on solaris due to missing NULL in g_guild_filename.
- (sean.gao@sun.com)
- #42825 - clicking on letters in LDAP address card view does not
- load selected letter (Dan, Toshok)
- #43005 - Crash on reply (Toshok)
- #43016 - Crash when adding duplicate contact (Toshok)
- #43023 - All contacts have disappeared (Toshok)
- #43090 - GalView menu missing from the addressbook (Toshok)
- #43175 - Evolution crashed pasting large amount of text into
- address field (Toshok)
- #43213 - auto-completion folder list wasn't populated correctly on
- fresh install (Toshok)
-
- * Calendar
-
- #40972 - connector crashed while evolution was idle (Rodrigo)
- #41234 - button order of "Enter Delegate" dialog (Rodrigo)
- #41329 - Changing Options in scheduling tab causes display time to shift
- #41579 - Double clicked on meeting in Exchange calendar, Evo
- crashed (Rodrigo)
- #41760 - Alarm dialog does not reappear after snoozing Exchange
- alarm (Rodrigo)
- #41811 - Calendar update failing and crashing (JP)
- #41930 - Warning while running gdb includes: "Some clown returned
- undeclared exception" (JP)
- #41935 - day view ignores scroll wheel (JP)
- #42056 - Accelerators in meeting selector not working/looks bad
- (Hans Petter)
- #42220 - calendar not refreshing correctly after changing meeting
- times (Rodrigo)
- #43029 - When running under valgrind Evolution crashed while
- exiting (JP)
- #43308 - scheduling page alignment (JP)
-
- * Mail
-
- #40074 - Thread expansion state not remembered (Jeff)
- #41748 - Send/Recv not sending mail in connector Outbox (Michael)
- #42000 - Crash selecting a non-selectable folder (Michael)
- #42045 - Another workaround for mailers sending out invalid date
- formats (Jeff)
- #42118 - Edit->Mark as unread doesn't behave the same as right
- click->mark as unread (Jeff)
- #42170 - Thread expansion state lost on deleting messages (Jeff)
- #42212 - Crash entering address in composer (Rodrigo)
- #42294 - Custom fixed font setting not applying to composer
- (Michael)
- #42333 - Crash opening a mail again that was still being opened
- (Jeff)
- #42356 - Adding colour from not working properly (Jeff)
- #42456 - Spelling preferences Enable/Disable button inconsisency
- (Michael)
- #42540 - Crash when pressing send/recv too quickly (Michael)
- #42710 - Invalid 8 bit header data getting to the UI layer
- generating warnings (Michael)
- #42763 - Crash deleting local folder with indexing turned off
- (Jeff)
- #42838 - Crash setting up local mail account (Michael)
- #42854 - Copying many messages between IMAP folders results in
- several duplicates (Jeff)
- #43214 - changing server settings enables the account (Jeff)
- #43234 - crash reading mail (Michael)
- #42748 - Check spelling while I type - broken (Larry)
- #42749 - Composer ignores color for misspelled words (Larry)
- #43392 - Reproducible crash after searching mail w/ attachment and
- closing (Jeff)
- #43406 - Evo crashed during POP download/filtering (Jeff)
-
- * Shell
-
- #36956 - Window title too long (Ettore)
- #40391 - Updated contributor list in the about box (Michael)
- #42038 - Crash hitting escape or closing window on rename box
- (Michael, Ettore)
- #42342 - Send/receive sensitive when startedi in offline mode
- (Ettore)
- #42465 - Unread count problem in the shortcut bar (Ettore)
- #42491 - Compilation problems on Forte (Antonio Xu)
- #42518 - Folder bar selection lost on folder delete (Ettore)
- #43079 - Don't crash when an invalid "default:" URI is given on
- the command-line (Ettore)
- #43119 - Memory corruption problem in settings dialog (Ettore)
- #43216 - Crash on exit (Ettore)
- #43322 - Crash on exit (Ettore)
-
- * Summary
-
- #41131 - HIG compliance (Anna)
- #41133 - HIG compliance (Anna)
- #41849 - Charsets not respected in news feed display (Michael)
- #43101 - Crash on exit (JP)
- #43117 - Crash on exit (Ettore)
-
-Other bugs:
-
- * Addressbook
-
- - 64bit cleanup and warning fixes (Jeremy Katz)
- - Fixed some probable memory corruption (Toshok, Sean Gao)
-
- * Calendar
-
- - Fixed crash in cal_client_discard_alarm (Rodrigo)
- - Fixed Bonobo unrefing problems on components (JP)
- - Fixed multiple initialization in calendar factory (Rodrigo)
-
- * Mail
-
- - Crash on exit if password dialog was open (Ettore)
- - Make Ok the default response on the password dialog (Ettore)
- - Crash in SMTP if unable to resolve the remote host name (Jeff)
- - Fix an automake 1.6 issues with camel-lock-helper (Dan)
- - Reload page if citation color changes (Larry)
- - Made all the composer preferences work (Larry)
- - Made newly created HTML signatures work again (Radek)
-
- * Shell
-
- - HIGified config settings dialog a bit more (Anna)
- - Fixed a bunch of reference count problems (JP)
- - Improved the look of the "open other user's folder" dialog
- (Dan)
-
- * Summary
-
- - Fixed a typo that caused the summary to not see the default
- calendar folder (Ettore)
- - Made the print dialog close properly (Ettore)
- - Reference count fixes (JP)
-
- * All
-
- - Various container referencing issues (JPR)
- - 64 bit and portability fixups (Jeremy Katz)
- - Cleaned up lots of compile time warnings and run-time debugging
- output (everyone)
-
-Updated translations:
-
- - cs (Miloslav Trmac)
- - da (Kenneth Rode Christiansen)
- - de (Christian Neumair)
- - es (Francisco Javier Fernandez)
- - fr (Christophe Fergeau)
- - it (Marco Ciampa)
- - ja (Takuo Kitame)
- - no (Kjartan Maraas)
- - pt (Duarte Loreto)
- - pt_BR (Gustavo Maciel Das Vieira)
- - ru (GNOME Russian Team)
- - sv (Christian Rose, Anders Carlsson)
-
- - Fixed encoding of the ca, en_AU, en_CB, et, eu, ro catalogs (Abel
- Cheung)
-
-
-Evolution 1.3.3, 2003-04-29
----------------------------
-
-Bugzilla bugs fixed (see http://bugzilla.ximian.com/show_bug.cgi):
-
- * Addressbook
-
- #37351 - Contact List drag-n-drop broken from sorted list view (Toshok)
- #40954 - Wombat crashes when opening an appointment (Toshok)
- #41843 - Don't use localized field names in the csv exporter (Gilbert Fang)
- #41779 - Fix crash when adding emails to existing contacts (Toshok)
-
- * Calendar
-
- #21499 - No docs in snaps (Rodney)
- #22444 - Deleting recurring meetings menu option (Rodrigo)
- #34498 - alarm-notify not noticing meetings canceled by organizer (Rodrigo)
- #35814 - same mnemonic for File:New:Mail Message and :Meeting (Rodney)
- #37552 - GUI doesn't notice Connector failed to delete task (JP)
- #39735 - Calendar View settings not persistent between sessions (JP)
- #40257 - selecting day from calendar control causes window resize (JP)
- #41129, #41215, #41221, #41256, #41148, #41216, #41235 - gui spacing (Rodrigo, Anna)
- #41230 - forwarded tasks blank when viewed in a separate window (JP)
- #41458 - Crash sending meeting invite (Dan)
- #41459 - remove "Delegate to..." from right click menu in meeting dialog (JP)
- #41641 - crash opening calendar for the first time (Hans)
- #41661 - Only one popup dialog for repeated message alarm (Rodrigo)
- #41671 - audio alarms pop up message dialog instead of playing tune (Rodrigo)
-
- * Mail
-
- #21499 - No docs in snaps (Rodney)
- #38927 - Signature editor help brings up composer help
- #40694 - Focus not in To field of new message when From field is
- visible. (Toshok)
- #40989 - Deleted sub-folders hang around (Michael)
- #41043 - Send/receive accelerators broken (Michael)
- #41142 - Message search dialog has questionable button order (Jeff)
- #41149 - Spacing/padding of "Filters" dialog (Jeff)
- #41150 - Use stock buttons in "Filters" dialog (Jeff)
- #41151 - Spacing/padding of "Add/Edit Filters" window (Jeff)
- #41152 - Spacing/padding of "Vfolders" dialog (Jeff)
- #41153 - Use stock buttons in "VFolders" window (Jeff)
- #41155 - Spacing/padding in "Add/Edit Vfolders" dialog (Jeff)
- #41156 - Use stock** buttons in "add/edit vfolders" dialog (Jeff)
- #41163 - Forwarding HTML mail with inline images results in
- misformatted mail (Michael)
- #41164 - Can't import mails at all (Michael)
- #41190 - Crash cursor navigating Inbox (Michael)
- #41199 - Subscribe dialog's toolbar -- why? :) (Michael)
- #41205 - Use icons on Add/Edit/Delete buttons in "Search Editor" (Jeff)
- #41208 - Spacing/padding in "advanced search" dialog (Jeff)
- #41209 - Spacing/padding of "Create VFolder from Search" dialog (Jeff)
- #41238 - Crash when opening "attachment properties" (Jeff)
- #41239 - Spacing/padding of "attachment properties" (Jeff)
- #41241 - Title capitalisation of "Attachment Properties" (Jeff)
- #41244 - Spacing/padding of "Reformat Mailbox" dialog (Jeff)
- #41389 - Crash creating new Exchange acct (Jeff)
- #41398 - vFolder Sources IMAP folder names not being unencoded
- correctly (Michael)
- #41419 - Variable font key has trailing slash (katzj@redhat.com)
- #41448 - Crash on startup (Michael)
- #41461 - camel_text_to_html doesn't do as good a job with URLs as
- e_text_to_html (Jeff)
- #41513 - Plain text attachments not showing up in the composer (Jeff)
- #41578 - Up/down buttons broken in vfolder list (Jeff)
- #41648 - 1.2 -> 1.3 vfolder conversion (Michael)
- #41730 - Empty "Organization" headers (Jeff)
- #41789 - Bonobo components can pause/freeze the gui (Jeff)
- #41972 - Searching on labels is broken (Michael)
- #42024 - Improper use of Error dialog (Jeff)
-
- * Shell
-
- #21499 - Documentation not working in the snapshots (Rodney)
- #33919 - Crash when opening other user's folder (Dan)
- #41002 - Default folder bar size too narrow (Ettore)
- #41008 - HIG compliance (Anna)
- #41010 - HIG compliance (Anna)
- #41022 - HIG compliance (Anna)
- #41024 - HIG compliance (Anna)
- #41025 - HIG compliance (Anna)
- #41036 - HIG compliance (Anna)
- #41059 - Crash connecting to other user's folder (Ettore)
- #41013 - Startup wizard display problems (Michael)
- #41128 - HIG compliance (Anna)
- #41145 - HIG compliance (Anna)
- #41146 - HIG compliance (Anna)
- #41147 - HIG compliance (Anna)
- #41225 - HIG compliance (Anna)
- #41227 - HIG compliance (Anna)
- #41242 - HIG compliance (Anna)
- #41304 - Missing dialog title (Michael)
- #41392 - HIG compliance (Anna)
- #41413 - Creating folder needs to make sure parent folder is
- expanded (Dan)
- #41468 - New Exchange public folders do not follow type of parent
- folder (Dan)
- #41469 - Upgrade routine crashing on Solaris (Jeff)
- #41484 - Make proxies work (Sanshao Jiang)
- #41567 - HIG compliance (Anna)
- #41569 - HIG compliance (Anna)
- #41648 - Vfolder upgrade problem (Michael)
- #41916 - Memory corruption in Storage interface (Rodrigo)
-
- * Summary
-
- #39693 - Summary weather settings annoyances (Ettore)
- #40902 - HIG compliance (Ettore)
-
-Other bugs:
-
- * Addressbook
-
- - Mostly, if not completely, fixed 33708 (Dan, Toshok)
- - Fix duplicate entry in exported CSV (Gilbert Fang)
- - Use stock buttons (Rodney)
-
- * Misc
-
- - Made Solaris/CDE integration work again (Rodney)
- - Removed some debugging spewage (everyone)
- - Don't crash on malformed GConf folder settings (Toshok)
- - Don't error out if the directory already exists when creating a
- new folder (Ettore)
- - Fixed various memory leaks all over the place (Hans)
-
-Updated translations:
-
- - cs (Miloslav Trmac)
- - de (Christian Neumair)
- - es (Francisco Javier Fernandez)
- - it (Marco Ciampa)
- - nl (Vincent van Adrighem)
- - no (Kjartan Maraas)
- - pt (Duarte Loreto)
- - sv (Christian Rose)
- - zh_CN (Wang Jian)
-
-
-Evolution 1.3.2, 2003-04-11
----------------------------
-
-Bugzilla bugs fixed (see http://bugzilla.ximian.com/show_bug.cgi):
-
- * Addressbook
-
- #7103 - Addressbook doesn't play nice with dark themes. (Toshok)
- #19178 - importers only target default contact folder. (Toshok)
- #20210 - Cannot save changes when invoked from mailer. (Toshok)
- #23036 - Export Contact Data to CSV, XLS, etc. (for mail merge,
- etc.) (Gilbert Fang)
- #25148 - Selected contacts fields are not scrolling properly.
- (Toshok)
- #31786 - LDAP config dialog not properly internationalized.
- (Toshok)
- #32113 - Problem with UTF8 and contact list. (Toshok)
- #34085 - drag+drop not finalizing. (Toshok)
- #34651 - Searches with 8bit ascii char. not working in Select
- Contacts. (Toshok)
- #37204 - Ximian, Inc. contact info update. (Michael)
- #38202 - Evolution crashed when I clicked the send button. (Michael)
- #39170 - void function should not has a 'return' keyword. (Philip
- Zhao)
- #39256 - "Forward Contact", "Send Message to Contact" don't
- work. (Michael)
- #39381 - crash when adding an address from an email to addressbook.
- (Toshok)
- #39507 - Select-names search broken. (Toshok)
- #39730 - Search Base Callback Not Working. (Toshok).
- #39763 - Pasting text into "To:" field doesn't work. (Toshok)
- #39788 - Can't add email address to contact. (Toshok)
- #40026 - Using pulldown to view multiple emails changes email to
- random characters. (Toshok)
- #40046 - To: and Cc: fields not accepting accented letters.
- (Toshok)
- #40403 - can't edit contact lists. (Toshok)
- #40715 - Merge email address dialog non functional when adding
- contact that already exists. . (Toshok)
- #40727 - email autocompletion not listing all names. (Toshok)
- #40841 - Ctrl-v was being used for both "Save As VCard" and
- "Paste". (Toshok)
- #40901 - HIG-ify the LDAP server editor dialog's button
- layout. (Toshok)
-
- * Calendar
-
- #17231 - Private settings not retained. (JP)
- #31382 - Free/busy retrieval didn't work for http source. (Rodrigo)
- #31660 - Appointments with "for" recurrence synced with no end date.
- (JP)
- #32248 - Todo items imported from pilot have time set to 00:00. (JP)
- #34095 - Memory leaks. (Hans Petter)
- #34505 - Duplicate alarm dialogs for appts in exchange calendar.
- (Rodrigo)
- #35926 - Contacts entry in appointment editor to be removed.
- (Hans Petter, Dan)
- #37935 - Drawing problems in mini-calendar. (Hans Petter)
- #39262 - Crash when importing an ics file to local calendar. (Rodrigo)
- #39356 - New evo users didn't get calendar. (Rodrigo)
- #39692 - File type names should not be OAF component types. (Ettore)
- #39735 - View settings not persistent between sessions. (Jeff)
- #39736 - Times in day view too large. (Hans Petter)
- #39740 - Crash clicking in Attendees field when creating new
- meeting. (Rodrigo)
- #39757 - Couldn't delete reminder for appointment. (Hans Petter)
- #39770 - Not meeting request sent. (Rodrigo)
- #39803 - Bottom part of text cut off in month view. (Hans Petter)
- #39895 - Selection vanishes when day view loses focus. (Michael/Hans)
- #39954 - Crash when setting recurrence rule for an appointment.
- (Hans Petter)
- #39955 - Crash when forwarding an appointment as icalendar. (JP)
- #39961 - Appointment schedule autopick menu displays under File.
- (Rodrigo)
- #40133 - wombat startup error. (Toshok)
- #40195 - Cannot create new calendar folders (JP)
- #40252 - LOG(e...) syntax error (Michael)
- #40258 - Recurring event displayed truncated description. (Hans Petter)
- #40578 - Event summaries cut off in month view. (Hans Petter)
- #40655 - Mini-calendar always showed January 1970. (Hans Petter)
- #40661 - Missing header for Forte compilation. (Rodrigo)
- #40722 - Crash when closing a meeting. (JP)
- #40789 - Didn't remember reminder text. (JP)
- #40790 - Didn't launch programs added as reminders. (JP)
- #40792 - Buttons in Select File dialog for sound reminder didn't
- work. (Ettore)
- #40876 - Cannot create a meeting with a resource in Exchange
- calendar (JP)
- #40894 - calendar switching weeks selected in small right subcalendars
- (JP)
- #41127 - Evolution crashed when sending new meeting invitation (JP)
-
- * Mail
-
- #29564 - Message list loses focus when you expunge. (Michael)
- #33786 - Crash when invalid expression fed to vFolder. (Michael)
- #36245 - Translation string context problem. (Dan)
- #37084 - Mailer forgets message list pane size on startup.
- (Michael)
- #38227 - Button spacing issues. (Ettore)
- #38461 - Mail importers cannot import to non-local folders.
- (Michael)
- #38659 - RFC2047 word encoding errors. (Jeff)
- #38926 - Configuration dialogs overlap each other. (Ettore, Jeff)
- #39165 - Losing all vFolder rules after editing them, until
- restart. (Michael)
- #39168 - compiler compatability, empty structs. (Jeff)
- #39170 - Compiler compatibility, returning a void return value.
- (Jeff)
- #39173 - prototype mismatch. (Jeff)
- #39204 - Charset handling problems with broken mails. (Jeff)
- #39256 - Send message to contact/forward contact doesn't work.
- (Michael)
- #39325 - Allow user to enable/disable account from account list.
- (Jeff)
- #39382 - Signature editor dialog buttons messed up. (Jeff)
- #39464 - Trying to remove a duplicate vfolder crashes. (Michael)
- #39486 - Cancelling send/receive could cause a crash. (Michael)
- #39654 - vFolder source remove button doesn't work. (Jeff)
- #39696 - Default composer window title is meaningless. (Jeff)
- #39741 - Configuration dialogs overlap each other. (Ettore, Jeff)
- #39744 - Sending 8 bit mime to a smtp server which doesn't say it
- supports it. (Jeff)
- #39759 - Crash using search dialog. (Michael)
- #39800 - Make To: have focus on a new message. (Jeff)
- #39809 - Dialog's don't match gnome 2 layout. (Jeff)
- #39813 - Crash/noop adding signature script. (Jeff)
- #39870 - Message browser button sensitivity not correct. (Jeff)
- #39914 - Configuration dialogs overlap each other. (Ettore, Jeff)
- #39924, and many others - Subject entry box didn't work
- properly/support i18n very well. (Jeff)
- #40043 - A warning dialog wont go away. (Jeff)
- #40074 - Threads always open expanded. (Jeff)
- #40083 - Search box doesn't work on subscription dialog - it was
- removed. (Jeff)
- #40103 - Deadlock at startup. (Michael)
- #40124 - Cannot unsubscribe from folders that aren't selectable.
- (Jeff)
- #40188 - Context menu on addresses crashes. (Michael)
- #40300 - Files are only detected for recovery when you start an
- editor. (Michael)
- #40314 - Some folders not expandable in subscriptions dialog.
- (Jeff)
- #40472 - Crash after entering password. (Michael)
- #40522 - Two passphrase dialogues viewing encrypted mail. (Michael)
- #40536 - Send/receive dialogue should transient for parent.
- (Michael)
- #40608 - Crash saving attachment. (Jeff)
- #40679 - Composer crash browsing files to attach. (Jeff)
- #40728 - Crash while scrolling. (Jeff)
- #40764 - Composer backs up drafts too often. (Jeff)
- #40778 - incorrect IMAP BODY parsing/display (Jeff)
- #40900 - vfolder creation dialog has wrong button order. (Michael)
- #40904 - Spontaneous crash. (Jeff)
- #40921 - Cancel subscription dialogue while busy -> crash. (Michael)
- #41004 - HIG compliance. (Jeff)
-
- * Shell
-
- #17034 - Use UTF-8 in about box. (Michael)
- #34371 - Tries to open other user's folder with blank user field.
- (Ettore)
- #38775 - Version number hardcoded in warning dialog text. (Michael)
- #38974 - Xlib dependency causing linking error on Solaris. (Ettore)
- #39096 - Start-up crash on Solaris. (Ettore)
- #39467 - Crash when splash image not found. (Michael)
- #39599 - Crash when folder icons missing. (Ettore)
- #39692 - OAFIIDs being shown in the importer dialog. (Ettore)
- #39706 - Settings window too big. (Michael)
- #40377 - Old stale wombat servers not being killed. (Ettore)
- #40413 - Problem with closing the folder selector dialog. (Ettore)
- #40474 - Summary settings not imported from 1.2. (Michael)
- #40590 - Signature settings upgrade problem. (Michael)
- #40652 - Folder bar not resizing after resizing Evolution window.
- (Michael)
- #40748 - Cannot resize icons in the shortcut bar. (Ettore)
- #40854 - Problem with selecting other user's folder. (Dan)
- #40888 - Crash when selecting other user's folder. (Dan)
-
- * Summary
-
- #5344 - Missing weather locations. (Marten Woxberg)
- #7153 - Stock folder names not translated. (Ettore)
- #12066 - Missing weather locations. (Dan)
- #15740 - Missing weather locations. (Dan)
- #18015 - Missing weather locations. (Dan)
- #19957 - AM/PM setting not being honoured. (Ettore)
- #40358 - Summary page not showing properly in non-C locales.
- (Ettore)
- #40141 - Preferences settings inconsistency when clicking "Close".
- (Michael)
- #32027 - Missing locations. (Dan)
-
-Other bugs:
-
- * Addressbook
-
- - HIG'ify the e-address-popup's buttons layout. (Toshok)
- - Add input method support to the minicard view. (Toshok)
- - Make the minicard view listen for style changes. (Toshok)
- - Fix the select names component to be more friendly to non-shlib
- components. (Dan)
- - Fix various errors in the contact editor caused by parsing
- addresses when we don't need to - especially after the user has
- explicitly entered the elements of the address
- themselves. (Toshok)
- - Replace GtkImage based arrow buttons in the contact editor with
- GtkArrow. (Toshok)
-
- * Calendar
-
- - Replaced all references to GdkFont deprecatedness with Pango.
- (Hans Petter)
- - Alarm notification fixes. (Rodrigo)
- - Timezone dialog fix. (Dan)
- - Use weak refs instead of destroy signal. (Rodrigo, Hans Petter)
- - Use GtkMessageDialogs for meeting-related questions. (Rodrigo)
- - GtkObject -> GObject fixes. (Everyone)
- - Connector-related fixes. (Dan)
- - Made meeting/scheduling work correctly. (JP)
- - Only remove alarms for backends that request it (Rodrigo)
- - HIG'ify dialogs (Ettore)
-
- * Mail
-
- - Clear passwords didn't work. (Michael)
- - Show preview and view threaded were made per-folder, as in
- 1.2.x, 1.3.1 had them global. (Michael)
- - Make the printing dialog, and account editor transient for the
- parent. (Larry, Jeff)
- - Check for unique filter/vFolder names in all cases. (Michael)
- - Most warnings removed. (Jeff, Michael)
- - some text/plain mails detected as text/html, re-do the fix for
- #16817 to make it pickier. (Michael)
- - Imap buffer overflow potential. (Timo Sirainen)
- - GSSAPI SASL support. (Jeff)
- - Handle broken header charset checking similarly to badly
- labelled/broken body content. (Dan)
- - Various glib deprecation issues, and use non-locale specific
- string compares in various places. (Jeff, Michael)
- - Mail piped to the sendmail transport is canoncalised into Un*x
- format, using network format (CRLF) confuses some versions of
- postfix. (Jeff)
- - Some work on fixing cut and paste shortcuts in composer. (Jeff)
- - Made the EvolutionComposer corba interfaces work again/port to
- GNOME 2. (Michael)
-
- * Shell
-
- - Fixed some problems with the folder dialogs. (Dan)
- - Fixed shell .server files. (Dan)
- - Added --force-shutdown to the shell as a killev replacement.
- (Dan)
- - Make Evolution use large WM icons. (Ettore)
- - Made the offline dialog work again. (Ettore)
- - Fixed importer framework to support non-local folders. (Ettore)
-
- * Summary
-
- - Make creation of the summary settings page faster. (Dan)
-
- * All
-
- - A number of compiler portability fixes, varadic macro's,
- __FUNCTION__ -> G_GNUC_FUNCTION, inline usage, void returns, etc
- (Everyone)
- - Fixed druid colors. (Dan)
-
-Updated translations:
-
- - cs (Miloslav Trmac)
- - de (Christian Neumair)
- - es (Francisco Javier Fernandez)
- - fi (Sami Pesonen)
- - hu (Andras Timar)
- - it (Marco Ciampa)
- - no (Kjartan Maraas)
- - pt (Duarte Loreto)
- - pt_BR (Gustavo Maciel Dias Vieira)
- - sk (Stanislav Visnovsky)
- - sv (Christian Rose)
- - uk (Yuriy Syrota)
- - zh_TW (Chao-Hsiung Liao)
-
-
-Evolution 1.3.1, 2003-03-05
----------------------------
-
-First release based on GNOME 2.
diff --git a/NEWS-1.0 b/NEWS-1.0
deleted file mode 100644
index b3e5fc7e57..0000000000
--- a/NEWS-1.0
+++ /dev/null
@@ -1,2939 +0,0 @@
-Evolution 1.0.8, 2002-06-23
----------------------------
-
-Bugzilla Bugs Fixed (see http://bugzilla.ximian.com/show_bug.cgi):
-
- * Addressbook
-
- #17332 -- Addressbook crashes in LDAP address completion code.
- (Toshok)
- #26130 -- Close contact editor before save as crashes. (Toshok)
-
- * Calendar
-
- #25757 -- Fix quoting of icalendar properties (JP)
- #25829, #25830, #26066
- -- Fix a number of meeting usability and interop issues (JP)
- #25697 -- Exchange reminders still not quite working (Rodrigo)
-
-Other fixes:
-
- * Addressbook
-
- - Some memory leak fixes in the addressbook backends and
- libversit. (Toshok)
-
- * Calendar
-
- - Update time zone information (Damon)
-
-Updated translations:
-
- - sk (Stanislav Visnovsky)
- - sv (Christian Rose)
-
-
-Evolution 1.0.7, 2002-06-07
----------------------------
-
-Bugzilla Bugs Fixed (see http://bugzilla.ximian.com/show_bug.cgi):
-
- * Addressbook
-
- #25054 -- "New Contact List" button is no longer active in
- folders that don't support contact lists. (Toshok)
-
- * Calendar
-
- #16962 -- Make the schedule page use the work hours set in the
- preferences. (JP)
- #23350 -- Crash when refreshing meeting or task. (JP)
- #24783 -- Fix crash in wombat. (Rodrigo)
-
- * Mail
-
- #11391 -- Bogus gnome_vfs_file_info_unref() that caused an
- occasional crash. (Frederic Crozat)
- #15185 -- Non-RFC-compliant From/To/Cc being displayed as empty
- in mail display. (Dan)
- #19920 -- Messages hiding in threaded view. (Michael)
- #21604 -- Various crashes. (Michael)
- #23782 -- Stop button causes a hang. (Michael)
- #25056 -- wombat segfaults when scrolling around calendar in month view
- (Rodrigo)
- #25456 -- Crash when deleting an account that has not been added
- to the Evolution storage yet. (Jeff)
- #24615 -- VFolders with the UNMATCHED vfolder as a source hang.
- (Michael)
-
- * Shell
-
- #24284 -- Copyright notice inconsistent in the about box.
- (Ettore)
-
-Other fixes:
-
- * Misc
-
- - Fixed some typos in the names of some French locations.
- (Christophe Merlet)
-
-Updated translations:
-
- - et (GNOME ET Team)
- - eu (Josu Walio)
- - sk (Stanislav Visnovsky)
- - fr (Christophe Merlet)
- - fi (Sami Pesonen)
- - vi (pclouds)
-
-
-Evolution 1.0.5, 2002-05-06
----------------------------
-
-Bugzilla Bugs Fixed (see http://bugzilla.ximian.com/show_bug.cgi):
-
- * Mail
-
- #24140 -- Crash when downloading a message with invalid header.
- (Jeff)
-
- #17174 -- Mail spools appear to be unread forever. (Michael)
-
- * Shell
-
- #23538 -- Intermittent bug when moving folders around. (Michael)
-
-Other fixes:
-
- * Calendar
-
- - Make reminders work with remote backends. (Rodrigo)
-
- * Misc
-
- - Added support for adding an Evolution icon to the CDE
- Application Manager. (Ettore)
-
-Updated translations:
-
- - bg (Borislav Aleksandrov)
- - pl (GNOME PL Team)
-
-
-Evolution 1.0.4, 2002-04-18
----------------------------
-
-Bugzilla Bugs Fixed (see http://bugzilla.ximian.com/show_bug.cgi):
-
- * Addressbook
-
- #22965 -- Comply with RFC 2739 for calCalURI and calFBURL. (Toshok)
-
- * Calendar
-
- #22624 -- Unable to accept meeting request that doesn't list user
- as attendee. (JP)
-
- * Startup Wizard
-
- #22047 -- Crash after closing the start-up wizard. (Ettore)
-
- * Mail
-
- #8214 -- "Error Synchronizing Folder" on incoming mail spool.
- (Michael)
- #18929 -- If we get multiple Content-Type header values, change
- subsequent headers to X-Invalid-Content-Type so it doesn't
- wreck processing. (Michael)
- #22363 -- Problems resyncing IMAP folders when going Online. (Jeff)
- #21716 -- Fixes to decoding illegally rfc2047 encoded words. (Michael)
- #22657 -- Fixes printing for some localizations (Radek)
-
-
-Other fixes:
-
- * Calendar
-
- - Use default tasks folder in calendar view. (Rodrigo)
- - Added getQuery method to CalBackend to allow custom queries for
- each calendar backend. (Rodrigo)
-
- * Mail
-
- - Fixed Daylight-Savings-Time calculations on systems that use
- tm.tm_gmtoff rather than 'timezone' (affects BSD systems). (Jeff)
- - Fixed the annoying EINPROGRESS error dialogs when connecting
- to IMAP/SMTP/POP via SSL. (Jeff)
- - Changed the date format used in From-lines in mbox spools to be
- the same as those used by Pine to fix interoperability issues.
- (Michael)
- - Fixed some filtertypes.xml typos. (Michael)
-
- * Summary
-
- - Change the dot.kde.org url.
-
-Updated translations:
-
- - fi (Sami Pesonen)
- - fr (Christophe Merlet, Frederic Riss)
- - ko (Young-Ho Cha)
- - nl (Tino Meinen)
- - no (Kjartan Maraas)
- - pt_BR (Gustavo Maciel Dias Vieira)
-
-
-Evolution 1.0.3, 2002-03-19
----------------------------
-
-Bugzilla Bugs Fixed (see http://bugzilla.ximian.com/show_bug.cgi):
-
- * Addressbook
-
- #16097 -- Need a way to let the user specify the DN to
- authenticate against. (Toshok)
- #16680 -- LDAP performance problem. (Toshok)
- #16968 -- Changing search type immediately requeries. (Toshok)
- #20089 -- Cannot copy contacts with comma from "Contacts" to LDAP.
- (Toshok)
- #20690 -- LDAP contacts dont show when using letter shortcuts.
- (Toshok)
- #20740 -- LDAP performance problem. (Toshok)
- #20871 -- SelectNames dialog needs search feedback. (Toshok)
-
- * Calendar
-
- #14705 -- iMIP compatibility with versions of Outlook. (Better fix
- for the pseudo-fix in 1.0.1). We now support Outlook in
- both Workgroup and Internet-Only modes. (Dan)
- #19054 -- Minimum number of alarm repetitions should be
- 1. (Federico)
- #19234 -- BYMONTH off-by-one in RRULE:FREQ=YEARLY. (Damon)
- #20510 -- Load free busy info as attendees are added. (JP)
- #20022 -- Itip addresses are case sensitive. (JP)
- #20226 -- Timezone data missing from some itip replies. (JP)
- #20346 -- Calendar should indicate if backend dies. (Rodrigo)
- #20780 -- Better subjects in iMIP messages. (Dan)
- #20787 -- Accepted/declined messages aren't always clear. (JP)
- #20800 -- Sorting of free busy information in schedule page does
- not work. (JP)
- #20783 -- Accepting updated meeting request doesn't work. (Rodrigo)
- #21198 -- Outlook didn't recognize Evolution's acceptance of an
- updated meeting request. (Dan)
- #21240 -- Calendar Reminders don't appear for appointments in remote
- servers. (Rodrigo)
-
- * Mail
-
- #19564 -- Don't crash when changing to disconnected mode. (Michael)
- #20779 -- Set a 'name' parameter in the Content-Type header
- since Outlook doesn't seem to check the filename
- parameter on the Content-Disposition header. (Jeff)
-
- * Shell
-
- #20234 -- Deleting folder gratuitiously causes /local to open.
- (Ettore)
- #20237 -- Shell silently drops xfer errors. (Ettore)
- #20311 -- New window from shortcuts should not show the folder
- bar and the shortcut bar. (Ettore)
-
- * Summary
-
- #18025 -- Summary crash upon switching to offline mode. (Ettore)
-
-Other fixes:
-
- * Calendar
-
- - Show more descriptive messages on opening errors. (Rodrigo)
- - Remove $filename.ics from remote URIs. (Rodrigo)
-
- * Addressbook
-
- - Fix search weirdness in local addressbooks. (Toshok)
- - Let backends return general error status from load_uri instead
- of just TRUE/FALSE. (Toshok)
- - EBook(View) handling fixes in ESelectNames and
- EAddressbookModel. (Clahey)
- - Rethink (and change) some of the default queries to ones that
- are at the same time useful and more easily implemented
- efficiently by the backends, in both the component's view and in
- the select-names dialog. (Toshok)
- - Change the "beginswith" query implementation on the name field
- to search both first and last name, so it's a little more useful
- in the general case. (Toshok)
-
-Updated translations:
-
- - es (Carlos Perell Marn)
- - fr (Christophe Merlet)
- - jp (Akira TAGOH)
- - nl (Vincent van Adrighem)
- - nn (Roy-Magne Mo)
- - no (Kjartan Maraas)
- - pt_BR (Gustavo Maciel Dias Vieira)
-
-
-Evolution 1.0.2, 2002-01-24
----------------------------
-
-Bugzilla Bugs Fixed (see http://bugzilla.ximian.com/show_bug.cgi):
-
- * Addressbook
-
- #17725 -- Non-ASCII letter headings are black when printing
- (Zbigniew Chyla)
-
- * Calendar
-
- #6544 -- Make Timezone names translatable (Damon)
- #18801 -- Alarms with specific trigger times are not shown (Damon)
-
- * Importers
-
- #16864 -- LDIF importer chokes on long description field (Toshok)
- #17441 -- Crash trying to import VCards file into an LDAP folder
- (Ettore)
-
- * Mail
-
- #6896 -- message_list_select() with wraparound won't select very
- first message (Jeff)
- #11499 -- All recovered Composer windows have HTML enabled (Jeff)
- #16947 -- Crash while setting up a new mail account (Jeff)
- #17205 -- Crash of evolution-mail on start-up (Jeff)
- #17634 -- Marking a message as unread should undelete it, as well
- (Jeff)
- #17694 -- Exchange 5.5 reporting 2 messages as having the same UID
- breaks Evolution (Jeff)
- #17759 -- Cancelling Send/Receive can lose mail for local case
- (Jeff)
- #18142 -- Mailer crash when trying to send an email (Jeff)
-
-Other fixes:
-
- * Summary
-
- - Change the list of items in the mail preferences (Iain)
-
- * Calendar
-
- - Make Tasks default to public as in Outlook (Rodrigo)
-
- * Importers
-
- - Make the druid as a transient window for the main shell (Iain)
-
- * Mail
-
- - Follow symlinks for mbox files (Jeff)
- - Fixed copy/paste problems in mail-account-gui.c (Ian Goldberg,
- Jeff)
- - Make Vfolders work with add-on storages (Dan)
-
- * Shell
-
- - Don't crash on missing icon on start-up (Michael Meeks)
- - Change activation/deactivation order for views in order to
- reduce flicker in the toolbars (Michael Meeks)
-
-Updated translations:
-
- - bg (Alexander Shopov)
- - el (Nick Niktaris, Panayotis Pakos, Simos Xenitellis)
- - fr (Christophe Merlet)
- - hu (Andras Timar)
- - it (Clara Tattoni, Ettore)
- - lv (Peteris Krisjanis)
- - nn (Roy-Magne Mo)
- - no (Kjartan Maraas)
- - sk (Stanislav Visnovsky)
- - sv (Christian Rose)
-
-
-Evolution 1.0.1, 2001-12-18
----------------------------
-
-New features:
-
- * csv2vcard script to convert CSV addressbook files from Outlook
- into VCard files that the Evolution importer can understand (by
- Michael MacDonald).
-
- * Alarms are now properly synced in the calendar conduit.
-
-Bugs fixed:
-
- * Addressbook
-
- #10114 -- No icon for Delete in the New Contact List editor
- #10241 -- Occasional address completion flakiness
- #10910 -- "Save" in list editor vs. "Save and Close" in contact editor
- #11776 -- Email addresses are case sensitive
- #13751 -- AddressBook address entry form usability problem
- #14002 -- Select names dialog stays up after composer is closed
- #14074 -- Editing fields under the "Collaboration" LDAP contact
- #14715 -- Wombat gets locked up when LDAP server is down
- #14876 -- Modifying LDAP contacts destroys existing objectclass entries
- #15379 -- Printing from the addressbook totally broken
- #16156 -- "Save As", "Send As", "Send To" not available in list editor
- #16176 -- Tab order starts wrong
- #16510 -- Small contact editor fixes
- #16744 -- Crash
- #16852 -- Crash closing empty mail
- #16910 -- Crashed addressbook when selecting addresses
- #17109 -- Crashed when editing a contact
- #17126 -- Adding some addresses does not work
-
- * Calendar
-
- #7641 -- Crash in EMap widget when used in Evolution
- #8993 -- Attendees not stripped properly from itip replies
- #13843 -- Deleting tasks causes crash
- #13952 -- Notifier repeatedly gives alarm after appointment ended
- #14087 -- Daily repeat event with end-date misses one day
- #14489 -- UI bug in Calendar Settings
- #14699 -- gtk_signal_disconnect_by_data warning
- #14705 -- iMIP compatibility with versions of Outlook. (We now support
- Outlook in an Exchange environment by default, but the old
- behavior can be turned on with the environment variable
- EVOLUTION_SEND_IMIP_AS_ATTACHMENT. This will be fixed better
- later.)
- #15401 -- Use UTF-8-aware gnome-print calls
- #15456 -- Typo in translatable string
- #15774 -- Crashed by selecting "decline" in meeting request
- #15941 -- Location missing for the calendar
- #15749 -- Empty end time in all-day-event crashes calendar.
- #15774 -- Selecting decline in schedule meeting request makes evo crash
- #15798 -- Calendar Date Never Updates
- #16232 -- e-itip-control.c - init() doing odd stuff
- #16359 -- Calendar Crash
- #16460 -- Changing a meeting doesn't always offer to send an update
- #16571 -- Weird URI in meeting request email
- #16910 -- Crashed when entering a completion percentage
- #16224 -- remove unsupported columns from Tasks view
- #16880 -- Cannot import ical (ics) even its own
- #17344 -- iCalendar should not be translated
- #17526 -- Refreshing request does not show relevant information
- #17527 -- Refresh requests have wrong menu
- #17531 -- libical does not build with bison 1.30
- #17606 -- libical does not build with autoconf 2.52
- (none) -- Scheduling page did not accurately display no information range
-
- * Conduits
-
- #1183 -- Handle alarms in conduits
- #14452 -- Converting names wrong from Palm
- #15810 -- Crashed during EAddress sync
- #15922 -- Crash
- #16460 -- Changing a meeting doesn't always offer to send an
- update
- #16997 -- Pilot compilation with libiconv
- #17230 -- Custom data on Pilot being over written
-
- * Importers
-
- #14701 -- Importing locks up Evolution
-
- * Mail
-
- #2233 -- Don't show RTF attachments inline
- #5547 -- Crash: Error closing a HTML-mail
- #12062 -- Can't use 'n' to skip to next unread if multiple messages
- are selected
- #13898 -- Crash: Cannot create emails in evolution
- #14127 -- Wrong error message
- #14348 -- Some things that need open messages...
- #14517 -- "Clear" needed twice for non-body+subject searches
- #14662 -- GPG signature showing as attachment
- #14678 -- Timestamp on outgoing mail incorrect on FreeBSD
- #14734 -- Evolution-mail crashes while accessing imap servers
- #14770 -- Appending messages to other IMAP folder can cause INBOX to
- stop updating
- #14838 -- Saving passwords doesn't work
- #14848 -- Forwarding wrong email due to next/prev
- #14965 -- Message copy fails with space in folder names
- #14976 -- Crash when reading a message from an IMAP server
- #15264 -- Crash: evolution-mail seg fault on exit
- #15374 -- "___" in autogenerated name of vfolder created by sender of
- #15415 -- Virtual Folders Editor: display of non-ascii symbols is broken
- #15449 -- `N' wraps `P' doesn't
- #15451 -- Crash when pressing stop during "going offline"
- #15489 -- Evolution crashed while deleting my IMAP mail account
- #15491 -- Evolution crashes/becomes unusable if ppp connection is lost
- #15498 -- Crash: Faulty vFolder editor
- #15512 -- Hangs while scanning for changed messages on S/IMAP+Exchange
- #15552 -- Crash
- #15608 -- RCPT TO: response error: Success
- #15647 -- Composer "send" button has wrong tooltip when offline
- #15657 -- Empty recipients
- #15693 -- Crash: Loading message contents from IMAP and close application
- #15745 -- Search edit window widgets disabled. / Mail component crash.
- #15813 -- Decrypting cuts off initial text
- #15843 -- Attachments inside attachments
- #15946 -- Opening IMAP mailbox made it crash
- #15952 -- Mailer crashed after hitting page down key
- #16227 -- "Body contains" seems to want a regexp
- #16254 -- Add Sender to Addressbook missing from menus
- #16284 -- Evolution-mail crashed selecting "create vfolder on subject"
- #16371 -- Corrupt Email crashes Mail component
- #16416 -- X-Mailer says "Preview Release"
- #16501 -- Crash while creating new account
- #16520 -- Crash
- #16559 -- Race-condition in the Camel type system
- #16669 -- Camel 64-bit badness
- #16695 -- A few dialogs are missing sensible titles
- #16698 -- Crash: Can't empty trash; segfault when I try to exit
- #16722 -- Attachment properties dialog crash
- #16903 -- Crash: segv retrieving mail
- #16924 -- Crash on a particular spam message
- #16936 -- Crash when opening a specific message
- #16947 -- Crash: Trouble Setting up a new mail account
- #17085 -- Bad encoding for subject
- #17386 -- Crash when reading a specific message
-
- * Shell
-
- #7827 -- Switching desktops leaves the folder bar popped up
- #14518 -- Crashed when starting the program
- #14701 -- Importing locks up Evolution
- #15435 -- "Rename folder" dialog: non-ASCII folder names are displayed
- #16507 -- Right Click -> View does nothing
- #16693 -- Crash when creating a new folder
- #17258 -- Shell displays splash even if Evolution is already running
-
- * Summary
-
- #8029 -- Locations.h file for translators
- #11212 -- Degree symbol in weather
- #14483 -- "Hello"?
- #14996 -- All-day appointments are displayed incorrectly in the
- summary view
- #16417 -- Have a better default than CNN headlines
- #16772 -- Summary crashes on startup
- #17249 -- Crash going offline
-
- * Misc
-
- #16358 -- Evolution doesn't have a man page
- #17377 -- Evolution doesn't work on multi-visual displays
-
-
-Evolution 1.0, 2001-11-14
--------------------------
-
-Misc:
- Removed OpenSSL support.
-
-Mailer:
- #14893 -- Mailer hanging if you specify an invalid password
-
-
-Evolution 0.99.2 (Release Candidate 2), 2001-11-14
---------------------------------------------------
-
-Misc:
- #14783 -- killev does not check for system type properly
- #14630 -- HTML docs refer to missing gifs in stylesheet-images
- #15027 -- Typos in the docs
- #15028 -- Corrections to the user documentation
- #15056 -- Spelling Error
-
-Shell:
-
- #6295 -- Go to folder dialog should have the e-tree focused
- #13872 -- Crash
-
-Summary
-
- #13478 -- Summary hangs at startup
- #14518 -- Crashing while starting the program
-
-Mailer:
-
- #10560 -- Messages in Korean charset displayed as blank
- #10735 -- Extra cruft at bottom of Compose window's View menu
- #11177 -- Closing main window while dialog up, hangs
- #11647 -- "Body contains" and "Body does not contain" searches are
- matching strings in the message header
- #13996 -- Searches not available in IMAP in offline mode
- #14351 -- pgp 5.5.8 not supported, recognized as 2.6.x
- #14361 -- IMAP/SSL APPENDs hang
- #14542 -- Crash pressing ctrl-a ctrl-k
- #14569 -- Crash when moving a folder
- #14620 -- Weird font issue in Mdk 7.2
- #14659 -- GPG messages are truncated
- #14672 -- evolution-mail crashes on startup
- #14794 -- PGP signing problem, complaining about 2.6.x when 6.5.1
- is installed
- #14826 -- Crashed the editor by using Alt-C (capitalize word)
- #14838 -- Saving passwords dosen't work
- #14848 -- Forwarding wrong email in separate window when using prev/next
- buttons
- #14861 -- DnD a message from a folder with a space in the name fails
- #14951 -- Cancelling before IMAP connect causes IMAP to loop forever
- #14965 -- Message copy fails with space in folder names
- #15038 -- Can page up or page down off of table
- #15154 -- Long line rendering bug
- #15267 -- Outgoing filter move/copy to folder crashes Mailer
- #15296 -- Mailer hangs when fetching mail
- #15324 -- Table handling code not rendering centered content when
- it should
- #15374 -- "___" in autogenerated name of vfolder created by sender of message
- #15393 -- Pointer grab when shift-double clicking
-
-Addressbook:
-
- #9501 -- Appointment Editor has "Save changes?" confirmation but
- Contact editor does not
- #14107 -- Crash: Address auto-complete pop-up appears after sending mail
- #14646 -- Doesn't handle failure in default_book case
- #14743 -- Contacts crashes when saving a List
- #14780 -- Pushing categories in Contact editor crashes Contacts
- #17355 -- e-select-names/completion from arbitrary storages
-
-Pilot conduits:
-
- #9465 -- Palm Addressbook sync corrupts character set
- #14562 -- Crash
- #15355 -- Bogus warning in calendar conduit
-
-Calendar:
-
- #10285 -- Problem printing the calendar
- #13631 -- Left-over debug print
- #14021 -- Problems entering a task
- #14335 -- UTF-8 Error in schedule meeting
- #14337 -- Meeting is added to calender even when selecting decline
- #14362 -- Appointments (public or private) don't show in the Day
- view of the calendar
- #14392 -- Event editor removes wrong pages when object updated
- #14524 -- Meeting page dragging broken for all day events
- #14655 -- evolution-alarm-notify crash on start
- #14687 -- load_uri failures are not noticed by the client talking
- to the wombat
- #14704 -- Free/busy info not in UTC
- #14765 -- Schedule page timezone problems
- #14842 -- EWeekView - typing in event & day incorrect
- #14845 -- Crash assigning category to new task
- #14941 -- Crash
- #15137 -- Crash when double clicking on empty appointment
-
-
-Version 0.99.0 (1.0 Release Candidate 1), 2001-11-05
-----------------------------------------------------
-
-Shell:
-
- - Fixed problems with icons not showing up in the druids. (Ettore,
- Anna)
-
- - Fixed some dnd brokenness. (Ettore)
-
- - Fixed some random crashes and made the shell more robust in case
- of activation problems or components crashing. (Ettore)
-
- - Implemented a newer, prettier about box. (Ettore)
-
- - Made sure the quit message always gets displayed. (Ettore)
-
- - Made sure the shell doesn't allow for folder names with slashes.
- (Ettore)
-
- - Made the folder selection and folder creation dialogs play better
- with the WM for out-of-proc components. (Ettore)
-
- - Make sure components don't display dialogs before the shell
- windows are displayed. (Ettore)
-
- - Fixed some problems with copying/transferring/renaming folders.
- (Ettore)
-
- - Made the pop-up folder bar have the expected size when popped up.
- (Ettore)
-
-Mailer:
-
- - Fixed SMTP truncation, IMAP/SSL truncation/hangs when
- sending/appending messages. (Jeff)
-
- - Implemented rename for imap/maildir folders. Rename also tracked
- in vfolder and filter code. Use rename for local folders when we
- can instead of copy/delete. (Michael, Jeff)
-
- - Fixed startup wizard next page race bugs. (Michael)
-
- - Fixed toolbars vanishing, Bonobo Suxors. (Michael)
-
- - Made filter/vfolder on mailing lists honour domains, but also
- backward compatible. (Michael)
-
- - Fixed the password coming up behind the main window. (Michael,
- Ettore)
-
- - Fixed numerous crash on startup/exit/while doing nothing/switching
- folder/components, many races and other architectural errors.
- (Michael, Jeff)
-
- - Bunch of vFolder fixes and feature completion. (Michael)
-
- - Added a 'index body' option to configure folder. (Michael)
-
- - Fixed 'unread' counts, again. (Michael)
-
- - Fixed some problems leaking file descriptors and overusing them
- when not necessary. (Michael)
-
- - Implemented iconv() caching and Solaris friendly iconv name
- converter. Made override display charset work in more cases.
- (Michael, Jeff)
-
- - Various untranslated buttons/menus and other translation issues
- fixed. (Michael, Jeff)
-
- - Offline searching in IMAP. (Michael)
-
- - Don't warn the user if he drags a message and drops it in the same
- place. (Jeff)
-
- - Fixed replying-to and forwarding messages with attachments to
- attach the appropriate attachments in the new message. (Jeff, Larry)
-
- - Don't allow the user to edit the default searches and keep all the
- search menus consistant accross all folders. (Jeff)
-
- - Allow the user to drag&drop and/or move messages to the Trash
- folder. (Jeff)
-
- - Various fixes to the filtering code. (Jeff, Michael)
-
- - Make various dialogs non-modal. (Jeff)
-
- - Fixes to POP3 UID caching so users can "leave mail on server" and
- not get duplicates. (Jeff)
-
- - Fixes to IMAP caching code where servers support the UIDPLUS
- extension. Will also now un-cache a folder when the user deletes
- it from the IMAP server. (Jeff)
-
- - Removed support for PGP 2.6.x due to security issues (pgp would
- always return 0 suggesting that the signature was valid even when
- it wasn't). (Jeff)
-
- - "Whitespace-only" recipients are now ignored, rather than being
- flagged as invalid. (Trow)
-
- - Fixed bugs related to message searching: memory leak, i18n problems,
- etc. (Trow)
-
- - We no longer leave stray windows lying around after doing the
- "Add Sender to Addressbook" operation. (Trow)
-
- - Bcc: headers are now shown when viewing drafts, sent mail. (Trow)
-
- - Lots and lots and lots of other little and not so little things.
- (Michael, Jeff, Dan, Trow)
-
-Addressbook:
-
- - General bug fixes. (Everybody)
-
- - Printing fixes. (Trow)
-
- - Fixed the dreaded "this should never happen" bug. (Trow)
-
- - Plugged memory leaks. (Trow)
-
- - Fixed use-score sort ordering when doing completion. (Trow)
-
- - Fixed EAddressPopup race conditions. (Trow)
-
- - Implemented transfer function for shell, so moving contact
- folders now works. (Trow)
-
- - Fixed occasional completion flakiness. (Trow)
-
- - Fixed contact count on folder bar. (Trow)
-
- - Fixes for LDAP/multibook address completion. (Toshok, Trow)
-
- - Added a "Do you want to save changes?" dialog to the contact
- and contact list editors. (Toshok)
-
- - Fixed date (birthday and anniversary) handling for LDAP. (Toshok)
-
- - Fixed nasty LDAP modification bug. (Toshok)
-
- - Add a config setting (/Addressbook/default_book_uri) to specify where
- vcards and email addresses from mail messages are stored as contacts.
- (Toshok)
-
- - Fixed problem that arose in an earlier beta where some contacts
- couldn't be modified or deleted from local addressbook.
- (Chris Toshok)
-
- - LDIF Importer. (Chris Toshok, Michael M. Morrison)
-
- - Fixed Memory Leaks. (Trow)
-
- - Always show the correct message about the number of contacts on the
- message bar. (Trow)
-
- - Fixed printing of contacts. (Trow)
-
- - Fixed the incredibly annoying bug which caused completed
- (underlined) contacts to spontaneously revert when edited.
- (Trow)
-
- - Better event handling in minicard view. (Chris Lahey)
-
- - Fixed Bold font in select names dialog. (Chris Lahey)
-
- - Show error dialog if saving a contact to a file fails. (Chris Lahey)
-
- - Handle carriage returns in any contact field properly. (Chris Lahey)
-
-Summary:
-
- - Worked around gnome-vfs problems that were causing crashes. (Trow)
-
- - Set the defaults to be CNN and Boston (Ettore)
-
- - Move the location of the RDF file to be in a place that will always exist.
-
- - Fixed numerous bugs (Trow, iain)
-
- - Made the offline stuff work correctly (iain)
-
- - Fixed a bug were the summary wouldn't retain settings if all folders,
- or RDFs, or weather stations were removed. (iain)
-
-Importers:
-
- - Made the pine importer work for multidepth mail folders. (iain)
-
-Calendar:
-
- - Underlined accelerators now work in the editor dialogs. (Damon)
-
- - Many fixes for scheduling meetings. (JP)
-
- - Status bar messages for long queries. (Rodrigo)
-
- - Appointments with empty summaries are now deleted from the views.
- Also, you can press Escape to cancel editing [#780]. (Federico)
-
- - The alarm daemon no longer displays "old" alarms twice. (Federico)
-
- - Alarms now handle timezones correctly [#5852]. (Federico)
-
- - Repeating alarms are now handled [#12163]. (Federico)
-
- - The alarm daemon is launched as soon as the calendar starts, not
- when you actually open a folder [#13867]. (Federico)
-
- - You can now set a default reminder to be added to new appointments
- [#13649]. (Federico)
-
- - Fixes for printing week views [#13687, #13688]. (Damon)
-
- - Tasks printout now matches the task list better [#10280]. (Damon)
-
- - Better handling of DATE values, as opposed to DATE-TIME ones. (Damon)
-
- - Many changes to handle the default timezone better. (Damon)
-
- - Recurrence generation fixes [#11525]. (Damon)
-
- - Fixed merging of complete VCALENDAR components. (Damon)
-
- - Fixes to the folder transfer functions. (Ettore, Federico)
-
- - Tasks activation fixes. (Damon)
-
- - Outlook interoperability fixes. (Damon, JP)
-
- - Miscellaneous fixes to the event/task editors. (Damon, JP, Federico)
-
- - New iCalendar importer. (Rodrigo)
-
- - Fixed problems introduced in Beta 6 due to the changes in the URI
- management functions. (Rodrigo)
-
- - Prettier alarm notification dialog. (Larry)
-
- - Session management for the alarm daemon. (Federico)
-
- - Added activity bars for long calendar operations. (Rodrigo)
-
- - Added iCal file importer. (Rodrigo)
-
- - Show error dialogs on calendar failures. (Rodrigo)
-
-Conduits:
-
- - Addressbook phone numbers now preserved if they can't all be
- synced to desktop (JP)
-
- - Sync addressbook phone numbers from non-english pilots (JP)
-
- - Various memory leak fixes (JP)
-
- - Handle multi-day calendar events (without recurrences) (JP)
-
- - Make sure task records are marked complete in every relevant field
- (JP)
-
- - Use new timezone stuff everywhere (JP, Damon)
-
- - Translate task priorities better (JP)
-
-
-Version 0.16 (Beta 6), 2001-10-10
----------------------------------
-
-Shell:
-
- - Now the shell restarts stale components from previous sessions
- properly. This should reduce the need for oaf-slay to only the
- cases in which a specific component is completely stuck (which
- hopefully should never happen). (Ettore)
-
- - Fixed the saving of the size of the shortcut bar and the folder
- bar. (Ettore)
-
- - Always display a new default view for the shell, unless the user
- specified an `evolution:' URI on the command-line. (Ettore)
-
- - Fix the weird behavior for right click -> open in new window in a
- pop-up folder bar. (Ettore)
-
- - Make the copy/move and dnd code to detect copying of folders onto
- themselves correctly. (Ettore)
-
-Mailer:
-
- - Bcc: addresses are now visible when browsing messages in
- the "Sent" folder. (Trow)
-
- - Various backend fixes like thread safeness of concurrent
- triggered events, more forgiving address header decoding,
- fixes for recent breakage to progress reports, adding a deleted
- event/state for folders, various deadlocks. (Michael, Jeff)
-
- - Fixed quick-searching by receipients to work. (Michael)
-
- - Caching of iconv handles to improve performance of many internal
- mail reading/indexing operations. (Michael)
-
- - Major oops in mbox code that caused significant performance
- problems getting/filtering mail fixed. (Michael)
-
- - Message charsets can now be overridden by a user-chosen charset
- encoding in the mail display. (Jeff)
-
- - Report errors when file cannot be attached in the composer. (Jeff)
-
- - File->Folder->Properties and Delete Folder now work for VFolders.
- (Michael)
-
- - VFolders, Filters and Searches are saved in a safe manner so that
- they should not be lost with quota/filled disk problems. (Michael)
-
- - VFolders now update with new mail on their sources. (Michael)
-
- - Fixed the "Load HTML Images" radio button options in the mail
- config dialog to work properly. (Jeff)
-
- - When an IMAP folder is deleted, removed any cached messages that
- had been in that folder when it was "alive". (Jeff)
-
- - New icons for PGP signature authenticity. (Jeff, Jimmac)
-
-Addressbook:
-
- - General fixes. (Chris Toshok, Trow, Iain, Chris Lahey, JP)
-
- - LDAP configuration dialog fixes. (Chris Toshok)
-
- - New authentication work. (Chris Toshok)
-
- - Fixed crashes related to editing the Master Category List. (Trow)
-
- - Address completion is no longer confused by whitespace. (Trow)
-
- - More work on having multiple wombats. (Chris Toshok)
-
- - Contact names no longer mysteriously disappear when using the
- SelectNames dialog. (Trow)
-
-Calendar:
-
- - Backend improvements (Rodrigo)
-
- - Compilation fixes for latest Bonobo (Rodrigo)
-
- - Fixed problem with exceptions to recurring events. (Damon)
-
- - Fixed handling of UNTIL property in recurring events. (Damon)
-
- - The alarm daemon will now notify you of alarms that should have
- occurred while it was not running. (Federico)
-
- - Handle monthly-by-day and "last day" recurrences in the conduits. (JP)
-
- - Added priorities to the fields in the attendee list. (Chris)
-
- - Enhancements to the event editor for meetings. (JP)
-
-Summary:
-
- - Bugfixes. (Iain)
-
- - Recurring events have the correct time and date. (Iain)
-
-
-Version 0.15 (Beta 5), 2001-10-02
----------------------------------
-
-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 56b4e1820f..0000000000
--- a/README
+++ /dev/null
@@ -1,252 +0,0 @@
-Evolution is the integrated mail, calendar and address book suite from
-Ximian, Inc.
-
-See http://www.ximian.com/products/evolution for more information.
-
-If you are using Evolution, you may wish to subscribe to the Evolution
-users mailing list. If you are interested in contributing to
-development on it, you should certainly subscribe to the Evolution
-Hackers mailing list. Visit
-
- http://developer.ximian.com/community/lists.html
-
-to subscribe or view archives of the Ximian mailing lists.
-
-If you are planning to work on any part of Evolution, please send mail
-to the mailing list first, to avoid duplicated effort (and to make
-sure that you aren't basing your work on interfaces that are expected
-to change).
-
-There is also a #evolution IRC channel on irc.gnome.org.
-
-Help for Evolution is available in the user manual (select "Help" from
-the menu after running the application), at the Ximian knowledge base
-(http://support.ximian.com), in the Evolution man page (run "man
-evolution" at the command line), and in the --help strings (run
-"evolution --help" at the command line).
-
-The rest of this file is dedicated to building Evolution.
-
-
-DEPENDENCIES
-------------
-
-In order to build Evolution you need to have the full set of GNOME 2
-or GNOME 2.2 development libraries installed.
-
-GNOME 2 comes with most of the modern distributions, so in most cases
-it should be enough to just install all the devel packages from your
-distribution. If, on the other hand, you want to build GNOME 2 from
-source, please refer to this page:
-
- http://gnome.org/start/2.2/notes/rninstallation.html
-
-Please make sure you have the most recent versions of the libraries
-installed, since bugs in the libraries can cause bugs in Evolution.
-
-Additional dependencies, besides the stock GNOME libraries (the
-dependencies should be compiled in the order they are listed here):
-
- * [If compiling against GNOME 2.0] libgnomeprint and
- libgnomeprintui 2.2.0 or later
-
- These library come with GNOME 2.2 installations, but not
- with GNOME 2.0 ones. The source code can be downloaded from
- the following locations:
-
- ftp://ftp.gnome.org/pub/gnome/sources/libgnomeprint
- ftp://ftp.gnome.org/pub/gnome/sources/libgnomeprintui
-
- * [If compiling against GNOME 2.2] libgnomecanvas 2.2.0.2 or
- later
-
- If you have a GNOME 2.2 installation, you need to upgrade
- libgnomecanvas to this version (or a later one), since
- Evolution exposes a bug in the older versions of the library
- which causes a crash.
-
- If you have a GNOME 2.0 installation, libgnomecanvas 2.0 is
- safe to use.
-
- * gtkhtml 3.0.1 or later
-
- ftp://ftp.gnome.org/pub/gnome/sources/gtkhtml
-
- * gal 1.99.8 or later
-
- ftp://ftp.gnome.org/pub/gnome/sources/gal
-
- * Berkeley's libdb 3.1.17
-
- It is important to use *exactly* this version, and not a
- later one, to compile Evolution. Please check the "Building
- Berkeley DB" section below for more information.
-
- ftp://ftp.ximian.com/pub/source/evolution
-
- * [Optional] Mozilla NSPR/NSS libraries
-
- These are needed if you want to compile Evolution with SSL
- support.
-
- http://www.mozilla.org/
-
- Many distributions ship these as Mozilla development
- packages.
-
- * [Optional] gnome-pilot 2.0 or later
-
- This is only necessary if you want to be able to synchronize
- your Palm device with Evolution.
-
- ftp://ftp.gnome.org/pub/gnome/sources/gnome-pilot
- ftp://ftp.gnome.org/pub/gnome/sources/gnome-pilot-conduits
-
- * [Optional] gnome-spell 1.0.1 or later
-
- This is only necessary if you want to have the spell
- checking functionality in Evolution's message composer.
-
- ftp://ftp.gnome.org/pub/gnome/sources/gnome-spell
-
-
-COMPILING BERKELEY DB
----------------------
-
- --- IMPORTANT WARNING ---
-
- The on-disk format of DB files has been changing between versions 2, 3
- and 4. Also, because of the libdb API, there is no way to easily
- handle the different formats from within the application. For this
- reason, Evolution has chosen to use one specific version of the
- library (version 3) and stick to it, so that users do not need to
- convert their addressbook files to use them with different version of
- Evolution.
-
- That's why Evolution REQUIRES libdb 3.1.17, and NO OTHER VERSION.
-
- If you force the check to accept a version different from 3.1.17, your
- binary of Evolution will be using a different format from the chosen
- one; this means that it will not be able to read addressbook databases
- created by other versions of Evolution which were compiled in the
- standard way. Also, we DO NOT GUARRANTEE that Evolution will work
- with different versions of libdb at all, even if it can be trivially
- made to compile against them.
-
- SPECIAL NOTE FOR BINARY PACKAGERS:
-
- If you are making binary packages for end-users (e.g. if you are a
- distribution vendor), please statically link Evolution to Berkeley
- DB 3.1.17, as mandated by the configure.in check. DO NOT patch
- configure.in to work around the check. Forcing the check to link
- to a different version of the library will only give headaches and
- pain to your users, who will see their addressbook disappear and
- will complain to us (the Evolution team) about losing their data.
-
- Besides, libdb will be linked statically, which means that your
- distribution doesn't actually need to ship DB 3.1.17 itself
- separately.
-
- The Evolution team will be infinitely grateful for your
- co-operation. Thanks!
-
-If you don't have version 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.
-
- * Install the content of the tarball 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
-
- * Configure Evolution specifying that it has to look for the DB
- library there, for example:
-
- ./configure --prefix=/opt/gnome
- --with-db3-includes=/home/user/berkeleydb-3.1.17/include
- --with-db3-libs=/home/user/berkeleydb-3.1.17/lib
-
-Evolution links statically to the library, so after you have compiled
-Evolution you can remove the installed library from your system.
-
-
-CONFIGURING EVOLUTION
----------------------
-
-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. Also, it increases the chance
-that something goes wrong and your GNOME installation gets ruined.
-
-If you want to install in a different prefix, you need to do the
-following things:
-
- * Set the PKG_CONFIG_PATH environment variable to contain a
- colon-separated list of all the pkg-config directories that
- will be involved in the build. This basically means a list
- of $prefix/lib/pkgconfig directory names, where $prefix is
- the prefix where a library is installed.
-
- For example, if you have GNOME installed in /usr and you
- are installing Evolution and its dependencies in
- /opt/evolution, you want to do something like the following
- (assuming you are using Bash):
-
- export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/opt/evolution/lib/pkgconfig
-
- * Edit the bonobo-activation-config.xml file (which is
- normally found in /etc/bonobo-activation/) to include the
- location where you are installing Evolution.
-
- In the example given above (GNOME in /usr, Evolution and
- dependencies in /opt/evolution), your
- bonobo-activation-config.xml will have to look like this:
-
- <?xml version="1.0"?>
- <oafconfig>
- <searchpath>
- <item>/usr/lib/bonobo/servers</item>
- <item>/opt/evolution/lib/bonobo/servers</item>
- </searchpath>
- </oafconfig>
-
- * Pass an appropriate --prefix parameter to the configure
- scripts of Evolution and its dependencies, eg:
-
- ./configure --prefix=/opt/evolution
-
-More information on how to use the configure script is available in
-the INSTALL file which is part of the Evolution tarball.
-
-
-OPTIONAL FEATURES
------------------
-
-Some optional features can be enabled at compilation time by passing
-appropriate flags to the configure script:
-
- * GNOME Pilot support.
-
- Assuming you have installed gnome-pilot, add the following
- options:
-
- --with-pisock=<prefix> --enable-pilot-conduits=yes
-
- Where <prefix> is the location where pilot-link (a package
- that gnome-pilot depends on) was installed.
-
- * SSL support.
-
- Make sure you have Mozilla's NSS nad NSPR libraries
- installed and pass the following flag:
-
- --enable-nss
-
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
deleted file mode 100644
index 45172e08e3..0000000000
--- a/RELEASE-NOTES
+++ /dev/null
@@ -1,88 +0,0 @@
-WARNING
-
-Evolution 1.1.2 is a BETA quality release. This means that it has
-bugs, including possibly destructive bugs that can cause valuable data
-to be lost.
-
-For this reason, please make sure you back up your mail and your
-calendar/addressbook information before using Evolution 1.1.2 on them.
-In particular, you are strongly advised to backup the `evolution'
-directory in your home directory if you are upgrading from a 1.0.x
-version of Evolution to Evolution 1.1.2.
-
-
-UPGRADING FROM 1.0.x
-
-The format of certain configuration files has changed in this version
-of Evolution. When you start Evolution 1.1.2 for the first time, it
-will automatically migrate your configuration so that it will work as
-expected with this version.
-
-IMPORTANT: After you have succesfully installed Evolution 1.1.2,
-please make sure that Evolution 1.0.x isn't running anymore and type
-command `killev' on the command-line (without quotes) before launching
-the new version of Evolution.
-
-
-RETURNING TO 1.0.x
-
-If you want to return to a 1.0.x version after trying 1.1.2, you have
-to restore the original configuration files. From the command-line,
-you can do the following, after having quit Evolution:
-
- killev
- cd ~/evolution
- mv filters.xml.bak-1.0 filters.xml
- mv vfolders.xml.bak-1.0 vfolders.xml
- mv shortcuts.xml.bak-1.0 shortcuts.xml
- mv mail/imap.bak-1.0 mail/imap
-
-Note that any changes to filters, vfolders or shortcuts made with
-1.1.2 will be lost after this operation.
-
-Also note that the upgrade mechanism runs automatically only the first
-time you run 1.1.2. For this reason, if you run Evolution 1.1.2, then
-go back to 1.0 using the aforementioned procedure, and then go back to
-using 1.1.2 again, the settings will not be upgraded.
-
-To force the upgrade to happen again in this case, use the following
-command to start Evolution 1.1.2:
-
- evolution --force-upgrade
-
-IMPORTANT: After you have succesfully installed Evolution 1.0.x,
-please make sure that Evolution 1.1.2 isn't running anymore and type
-command `killev' on the command-line (without quotes) before launching
-the older version of Evolution.
-
-
-SEARCH CRITERIA CHANGES
-
-When you specify multiple words in search "contains" criterion,
-Evolution will now search the mail messages that contain all the words
-specified, in any order. (The 1.0.x behavior was to look for the
-whole string in "subject contains" matches, and matched no messages in
-the case of body searches.)
-
-This applies to the search bar, the filter rules and the vfolder
-rules. Filter rules and vfolder rules might need to be re-adjusted
-after you upgrade to version 1.1.2.
-
-
-IMAP FOLDER NAME CHANGES (I18N)
-
-If you created any folder names using non-ASCII characters using prior
-versions of Evolution, you will find they may not be displayed
-properly anymore. This is because previous versions did not implement
-IMAP I18N folder names correctly as specified in RFC 2060.
-
-The upgrade script will try to rectify any filters or vfolders using
-any such names. However, as it does not know the character set used
-by the server, non ISO-8859-1 (latin-1) characters will not be
-properly converted. You may need to reverify the filter and vFolder
-rules in this case.
-
-Also note that if such folder names do not display properly that it is
-purely cosmetic and may be fixed by renaming the folder(s) in
-question.
-
diff --git a/a11y/.cvsignore b/a11y/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/a11y/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/a11y/ChangeLog b/a11y/ChangeLog
deleted file mode 100644
index 6752384193..0000000000
--- a/a11y/ChangeLog
+++ /dev/null
@@ -1,103 +0,0 @@
-2003-12-05 Bolian Yin <bolian.yin@sun.com>
-
- * calendar/ea-cal-view-event.c (ea_cal_view_event_new): shortcut when cal_view is NULL.
- * calendar/ea-cal-view.c: Change an action name.
- * calendar/ea-calendar.c (ea_calendar_focus_watcher): add check for event atk object.
- * calendar/ea-week-view.c (ea_week_view_get_n_children): correct impl.
- (get_visible_text_item_count): removed.
-
-2003-12-06 JP Rosevear <jpr@ximian.com>
-
- * */Makefile.am: Remove hard coded disable deprecated flags
-
-2003-12-03 Ettore Perazzoli <ettore@ximian.com>
-
- * calendar/Makefile.am (SHELL_IDLS): Only get Evolution.idl.
-
-2003-11-11 Bolian Yin <bolian.yin@sun.com>
-
- Fixes #50538
-
- * new files:
- widgets/ea-calendar-cell.[hc]
-
- * widgets/ea-calendar-item: impl. atk selection and atk table interface.
-
- * widgets/Makefile.am : use shared object library (.so)
-
-2003-11-07 JP Rosevear <jpr@ximian.com>
-
- * calendar/Makefile.am (INCLUDES): don't include toplevel libical
-
-2003-11-07 JP Rosevear <jpr@ximian.com>
-
- * Handle some more renaming
-
-2003-11-07 JP Rosevear <jpr@ximian.com>
-
- * Reflect renaming of ECalView to ECalendarView
-
-2003-11-04 Bolian Yin <bolian.yin@sun.com>
-
- Fixes # 48509
-
- * new files:
- ea-cell-table.h ea-cell-table.c
- * calendar/Makefile.am: add entries for new files
- * calendar/New files added:
- ea-day-view-main-item.c ea-day-view-main-item.h
- ea-day-view-cell.c ea-day-view-cell.h
- * Add debug info and remove some non-C99 compilers warnings.
- * calendar/ea-cal-view: add action interface.
-
-2003-10-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * calendar/Makefile.am: INCLUDE path fixes for changes made to
- libical build.
-
-2003-08-27 Bolian Yin <bolian.yin@sun.com>
-
- * Makefile.am: add widgets directory; move calendar idl stuff to
- calendar directory; stop make a single shared lib for whole a11y
- stuff.
-
- * ea-factory.h: make factory macros available to GOBJECT
-
- * calendar/Makefile.am: add calendar idl stuff
-
- * calendar/ea-cal-view-event.c: add atkcomponent interface.
-
- * calendar/ea-gnome-calendar.c (ea_gcal_switch_view_cb): add
- details for "children_changed".
-
- * new widgets directory for widgets a11y stuff, new files are:
- widgets/Makefile.am, widgets/ea-calendar-item.c,
- widgets/ea-calendar-item.h, widgets/ea-widgets.c,
- widgets/ea-widgets.h
-
-2003-08-20 Rodrigo Moya <rodrigo@ximian.com>
-
- * calendar/ea-cal-view-event.c (ea_cal_view_event_get_name):
- adapted to changes in ECalViewEvent.
-
-2003-08-20 Bolian Yin <bolian.yin@sun.com>
- setup the a11y directory for evolution accessibility work
- New files are:
- ChangeLog
- ea-factory.h
- Makefile.am
- calendar/ea-calendar.c
- calendar/ea-calendar.h
- calendar/ea-calendar-helpers.c
- calendar/ea-calendar-helpers.h
- calendar/ea-cal-view.c
- calendar/ea-cal-view.h
- calendar/ea-cal-view-event.c
- calendar/ea-cal-view-event.h
- calendar/ea-day-view.c
- calendar/ea-day-view.h
- calendar/ea-week-view.c
- calendar/ea-week-view.h
- calendar/ea-gnome-calendar.c
- calendar/ea-gnome-calendar.h
- calendar/Makefile.am
diff --git a/a11y/Makefile.am b/a11y/Makefile.am
deleted file mode 100644
index c3e7a89fed..0000000000
--- a/a11y/Makefile.am
+++ /dev/null
@@ -1,16 +0,0 @@
-SUBDIRS = . calendar widgets
-
-# for debug
-#A11Y_CFLAGS += -pedantic -ansi -DACC_DEBUG -Werror
-
-privlib_LTLIBRARIES = libevolution-a11y.la
-
-INCLUDES = \
- -I$(top_srcdir)/a11y \
- $(A11Y_CFLAGS)
-
-libevolution_a11y_la_SOURCES = \
- ea-factory.h \
- ea-cell-table.h \
- ea-cell-table.c
-
diff --git a/a11y/calendar/.cvsignore b/a11y/calendar/.cvsignore
deleted file mode 100644
index 0e1e389af7..0000000000
--- a/a11y/calendar/.cvsignore
+++ /dev/null
@@ -1,6 +0,0 @@
-Makefile
-Makefile.in
-Evolution-*.c
-Evolution.h
-evolution-calendar-*.c
-evolution-calendar.h
diff --git a/a11y/calendar/Makefile.am b/a11y/calendar/Makefile.am
deleted file mode 100644
index 0c4aba11a0..0000000000
--- a/a11y/calendar/Makefile.am
+++ /dev/null
@@ -1,78 +0,0 @@
-# Calendar IDL files
-
-# for debug
-#A11Y_CFLAGS += -pedantic -ansi -DACC_DEBUG -Werror
-
-CALENDAR_IDLS = $(top_srcdir)/calendar/idl/evolution-calendar.idl
-SHELL_IDLS = \
- $(top_srcdir)/shell/Evolution.idl
-
-CALENDAR_IDL_GENERATED_H = evolution-calendar.h
-CALENDAR_IDL_GENERATED_C = \
- evolution-calendar-common.c \
- evolution-calendar-skels.c \
- evolution-calendar-stubs.c
-
-SHELL_IDL_GENERATED_H = Evolution.h
-SHELL_IDL_GENERATED_C = \
- Evolution-common.c \
- Evolution-skels.c \
- Evolution-stubs.c
-
-$(CALENDAR_IDL_GENERATED_H): $(CALENDAR_IDLS)
- $(ORBIT_IDL) -I $(srcdir) $(IDL_INCLUDES) \
- $(top_srcdir)/calendar/idl/evolution-calendar.idl
-
-$(SHELL_IDL_GENERATED_H): $(SHELL_IDLS)
- $(ORBIT_IDL) -I $(srcdir) $(IDL_INCLUDES) \
- $(top_srcdir)/shell/Evolution.idl
-
-IDL_GENERATED = $(SHELL_IDL_GENERATED_H) $(CALENDAR_IDL_GENERATED_H)
-BUILT_SOURCES = $(IDL_GENERATED)
-CLEANFILES = $(BUILT_SOURCES) $(CALENDAR_IDL_GENERATED_C) $(SHELL_IDL_GENERATED_C)
-
-privlib_LTLIBRARIES = libevolution-calendar-a11y.la
-
-INCLUDES = \
- -DG_LOG_DOMAIN=\"evolution-a11y\" \
- -I$(top_srcdir)/shell \
- -I$(top_srcdir)/calendar \
- -I$(top_srcdir)/calendar/cal-client \
- -I$(top_srcdir)/calendar/gui \
- -I$(top_srcdir)/widgets \
- -I$(top_srcdir)/a11y \
- -DEVOLUTION_DATADIR=\""$(datadir)"\" \
- -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
- -DEVOLUTION_ETSPECDIR=\""$(etspecdir)"\" \
- -DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\" \
- -DEVOLUTION_GALVIEWSDIR=\""$(viewsdir)"\" \
- -DEVOLUTION_UIDIR=\""$(evolutionuidir)"\" \
- -DPREFIX=\""$(prefix)"\" \
- $(A11Y_CFLAGS) \
- $(EVOLUTION_CALENDAR_CFLAGS)
-
-libevolution_calendar_a11y_la_SOURCES = \
- $(CALENDAR_IDL_GENERATED_H) \
- $(SHELL_IDL_GENERATED_H) \
- ea-calendar.c \
- ea-calendar.h \
- ea-calendar-helpers.c \
- ea-calendar-helpers.h \
- ea-cal-view.c \
- ea-cal-view.h \
- ea-cal-view-event.c \
- ea-cal-view-event.h \
- ea-day-view.c \
- ea-day-view.h \
- ea-day-view-main-item.c \
- ea-day-view-main-item.h \
- ea-day-view-cell.c \
- ea-day-view-cell.h \
- ea-week-view.c \
- ea-week-view.h \
- ea-gnome-calendar.c \
- ea-gnome-calendar.h
-
-libevolution_calendar_a11y_la_LIBADD = \
- $(top_builddir)/a11y/libevolution-a11y.la
-
diff --git a/a11y/calendar/ea-cal-view-event.c b/a11y/calendar/ea-cal-view-event.c
deleted file mode 100644
index 37b0d5ed90..0000000000
--- a/a11y/calendar/ea-cal-view-event.c
+++ /dev/null
@@ -1,479 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-cal-view-event.c
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-#include "ea-cal-view-event.h"
-#include "ea-calendar-helpers.h"
-#include "ea-day-view.h"
-#include "ea-week-view.h"
-#include <gal/e-text/e-text.h>
-
-static void ea_cal_view_event_class_init (EaCalViewEventClass *klass);
-
-static G_CONST_RETURN gchar* ea_cal_view_event_get_name (AtkObject *accessible);
-static G_CONST_RETURN gchar* ea_cal_view_event_get_description (AtkObject *accessible);
-static AtkObject* ea_cal_view_event_get_parent (AtkObject *accessible);
-static gint ea_cal_view_event_get_index_in_parent (AtkObject *accessible);
-
-/* component interface */
-static void atk_component_interface_init (AtkComponentIface *iface);
-static void ea_cal_view_get_extents (AtkComponent *component,
- gint *x, gint *y, gint *width, gint *height,
- AtkCoordType coord_type);
-
-#ifdef ACC_DEBUG
-static gint n_ea_cal_view_event_created = 0, n_ea_cal_view_event_destroyed = 0;
-static void ea_cal_view_finalize (GObject *object);
-#endif
-
-static gpointer parent_class = NULL;
-
-GType
-ea_cal_view_event_get_type (void)
-{
- static GType type = 0;
- AtkObjectFactory *factory;
- GTypeQuery query;
- GType derived_atk_type;
-
-
- if (!type) {
- static GTypeInfo tinfo = {
- sizeof (EaCalViewEventClass),
- (GBaseInitFunc) NULL, /* base init */
- (GBaseFinalizeFunc) NULL, /* base finalize */
- (GClassInitFunc) ea_cal_view_event_class_init, /* class init */
- (GClassFinalizeFunc) NULL, /* class finalize */
- NULL, /* class data */
- sizeof (EaCalViewEvent), /* instance size */
- 0, /* nb preallocs */
- (GInstanceInitFunc) NULL, /* instance init */
- NULL /* value table */
- };
-
- static const GInterfaceInfo atk_component_info = {
- (GInterfaceInitFunc) atk_component_interface_init,
- (GInterfaceFinalizeFunc) NULL,
- NULL
- };
-
- /*
- * Figure out the size of the class and instance
- * we are run-time deriving from (atk object for E_TEXT, in this case)
- */
-
- factory = atk_registry_get_factory (atk_get_default_registry (),
- E_TYPE_TEXT);
- derived_atk_type = atk_object_factory_get_accessible_type (factory);
- g_type_query (derived_atk_type, &query);
-
- tinfo.class_size = query.class_size;
- tinfo.instance_size = query.instance_size;
-
- /* we inherit the component, text and other interfaces from E_TEXT */
- type = g_type_register_static (derived_atk_type,
- "EaCalViewEvent", &tinfo, 0);
- g_type_add_interface_static (type, ATK_TYPE_COMPONENT,
- &atk_component_info);
- }
-
- return type;
-}
-
-static void
-ea_cal_view_event_class_init (EaCalViewEventClass *klass)
-{
- AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
-#ifdef ACC_DEBUG
- GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- gobject_class->finalize = ea_cal_view_finalize;
-#endif
-
- parent_class = g_type_class_peek_parent (klass);
-
-
- class->get_name = ea_cal_view_event_get_name;
- class->get_description = ea_cal_view_event_get_description;
- class->get_parent = ea_cal_view_event_get_parent;
- class->get_index_in_parent = ea_cal_view_event_get_index_in_parent;
-
-}
-
-#ifdef ACC_DEBUG
-static void ea_cal_view_finalize (GObject *object)
-{
- ++n_ea_cal_view_event_destroyed;
- printf ("ACC_DEBUG: n_ea_cal_view_event_destroyed = %d\n",
- n_ea_cal_view_event_destroyed);
-}
-#endif
-
-AtkObject*
-ea_cal_view_event_new (GObject *obj)
-{
- AtkObject *atk_obj = NULL;
- GObject *target_obj;
- ECalendarView *cal_view;
-
- g_return_val_if_fail (E_IS_TEXT (obj), NULL);
- cal_view = ea_calendar_helpers_get_cal_view_from (GNOME_CANVAS_ITEM (obj));
- if (!cal_view)
- return NULL;
-
- if (E_IS_WEEK_VIEW (cal_view)) {
- gint event_num, span_num;
- EWeekViewEvent *week_view_event;
- EWeekViewEventSpan *event_span;
- EWeekView *week_view = E_WEEK_VIEW (cal_view);
-
- /* for week view, we need to check if a atkobject exists for
- * the first span of the same event
- */
- if (!e_week_view_find_event_from_item (week_view,
- GNOME_CANVAS_ITEM (obj),
- &event_num,
- &span_num))
- return NULL;
- week_view_event = &g_array_index (week_view->events,
- EWeekViewEvent,
- event_num);
- /* get the first span */
- event_span = &g_array_index (week_view->spans,
- EWeekViewEventSpan,
- week_view_event->spans_index);
- target_obj = G_OBJECT (event_span->text_item);
- atk_obj = g_object_get_data (target_obj, "accessible-object");
-
- }
- else
- target_obj = obj;
-
- if (!atk_obj) {
- static AtkRole event_role = ATK_ROLE_INVALID;
- atk_obj = ATK_OBJECT (g_object_new (EA_TYPE_CAL_VIEW_EVENT,
- NULL));
- atk_object_initialize (atk_obj, target_obj);
- if (event_role == ATK_ROLE_INVALID)
- event_role = atk_role_register ("Calendar Event");
- atk_obj->role = event_role;
-#ifdef ACC_DEBUG
- ++n_ea_cal_view_event_created;
- printf ("ACC_DEBUG: n_ea_cal_view_event_created = %d\n",
- n_ea_cal_view_event_created);
-#endif
- }
-
- /* the registered factory for E_TEXT is cannot create a EaCalViewEvent,
- * we should save the EaCalViewEvent object in it.
- */
- g_object_set_data (obj, "accessible-object", atk_obj);
-
- return atk_obj;
-}
-
-static G_CONST_RETURN gchar*
-ea_cal_view_event_get_name (AtkObject *accessible)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- ECalendarViewEvent *event;
- gchar *tmp_name;
- gchar *new_name = g_strdup ("");
- const char *summary;
-
-
- g_return_val_if_fail (EA_IS_CAL_VIEW_EVENT (accessible), NULL);
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (accessible);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj || !E_IS_TEXT (g_obj))
- return NULL;
- event = ea_calendar_helpers_get_cal_view_event_from (GNOME_CANVAS_ITEM(g_obj));
-
- if (event && event->comp_data) {
- if (e_cal_util_component_has_alarms (event->comp_data->icalcomp)) {
- tmp_name = new_name;
- new_name = g_strconcat (new_name, "alarm ", NULL);
- g_free (tmp_name);
- }
-
- if (e_cal_util_component_has_recurrences (event->comp_data->icalcomp)) {
- tmp_name = new_name;
- new_name = g_strconcat (new_name, "recurrence ", NULL);
- g_free (tmp_name);
- }
-
- if (event->different_timezone) {
- tmp_name = new_name;
- new_name = g_strconcat (new_name, "time-zone ", NULL);
- g_free (tmp_name);
- }
-
- if (e_cal_util_component_has_organizer (event->comp_data->icalcomp)) {
- tmp_name = new_name;
- new_name = g_strconcat (new_name, "meeting ", NULL);
- g_free (tmp_name);
- }
- }
- tmp_name = new_name;
- new_name = g_strconcat (new_name, "event. Summary is ", NULL);
- g_free (tmp_name);
-
- summary = icalcomponent_get_summary (event->comp_data->icalcomp);
- if (summary) {
- tmp_name = new_name;
- new_name = g_strconcat (new_name, summary, NULL);
- g_free (tmp_name);
- }
- else {
- tmp_name = new_name;
- new_name = g_strconcat (new_name, "empty", NULL);
- g_free (tmp_name);
- }
-
- ATK_OBJECT_CLASS (parent_class)->set_name (accessible, new_name);
-#ifdef ACC_DEBUG
- printf("EvoAcc: name for event accobj=%p, is %s\n",
- (void *)accessible, new_name);
-#endif
- g_free (new_name);
- return accessible->name;
-}
-
-static G_CONST_RETURN gchar*
-ea_cal_view_event_get_description (AtkObject *accessible)
-{
- if (accessible->description)
- return accessible->description;
-
- return "calendar view event";
-}
-
-static AtkObject *
-ea_cal_view_event_get_parent (AtkObject *accessible)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- GnomeCanvasItem *canvas_item;
- ECalendarView *cal_view;
-
- g_return_val_if_fail (EA_IS_CAL_VIEW_EVENT (accessible), NULL);
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (accessible);
-
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (g_obj == NULL)
- /* Object is defunct */
- return NULL;
- canvas_item = GNOME_CANVAS_ITEM (g_obj);
-
- cal_view = ea_calendar_helpers_get_cal_view_from (canvas_item);
-
- if (!cal_view)
- return NULL;
-
- return gtk_widget_get_accessible (GTK_WIDGET (cal_view));
-}
-
-static gint
-ea_cal_view_event_get_index_in_parent (AtkObject *accessible)
-{
- GObject *g_obj;
- GnomeCanvasItem *canvas_item;
- ECalendarView *cal_view;
- ECalendarViewEvent *cal_view_event;
-
- g_return_val_if_fail (EA_IS_CAL_VIEW_EVENT (accessible), -1);
- g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE(accessible));
- if (!g_obj)
- /* defunct object*/
- return -1;
-
- canvas_item = GNOME_CANVAS_ITEM (g_obj);
- cal_view = ea_calendar_helpers_get_cal_view_from (canvas_item);
- if (!cal_view)
- return -1;
-
- cal_view_event = ea_calendar_helpers_get_cal_view_event_from (canvas_item);
- if (!cal_view_event)
- return -1;
-
- if (E_IS_DAY_VIEW (cal_view)) {
- gint day, event_num, num_before;
- EDayViewEvent *day_view_event;
- EDayView *day_view = E_DAY_VIEW (cal_view);
-
- /* the long event comes first in the order */
- for (event_num = day_view->long_events->len - 1; event_num >= 0;
- --event_num) {
- day_view_event = &g_array_index (day_view->long_events,
- EDayViewEvent, event_num);
- if (cal_view_event == (ECalendarViewEvent*)day_view_event)
- return event_num;
-
- }
- num_before = day_view->long_events->len;
-
- for (day = 0; day < day_view->days_shown; ++day) {
- for (event_num = day_view->events[day]->len - 1; event_num >= 0;
- --event_num) {
- day_view_event = &g_array_index (day_view->events[day],
- EDayViewEvent, event_num);
- if (cal_view_event == (ECalendarViewEvent*)day_view_event)
- return num_before + event_num;
- }
- num_before += day_view->events[day]->len;
- }
- }
- else if (E_IS_WEEK_VIEW (cal_view)) {
- gint index;
- EWeekViewEvent *week_view_event;
- EWeekView *week_view = E_WEEK_VIEW (cal_view);
-
- for (index = week_view->events->len - 1; index >= 0; --index) {
- week_view_event = &g_array_index (week_view->events,
- EWeekViewEvent, index);
- if (cal_view_event == (ECalendarViewEvent*)week_view_event)
- return index;
- }
- }
- else {
- g_assert_not_reached ();
- return -1;
- }
- return -1;
-}
-
-/* Atk Component Interface */
-
-static void
-atk_component_interface_init (AtkComponentIface *iface)
-{
- g_return_if_fail (iface != NULL);
-
- iface->get_extents = ea_cal_view_get_extents;
-}
-
-static void
-ea_cal_view_get_extents (AtkComponent *component,
- gint *x,
- gint *y,
- gint *width,
- gint *height,
- AtkCoordType coord_type)
-{
- GObject *g_obj;
- GnomeCanvasItem *canvas_item;
- gint x_window, y_window;
- gint scroll_x, scroll_y;
- ECalendarView *cal_view;
- gint item_x, item_y, item_w, item_h;
- GtkWidget *canvas = NULL;
-
- g_return_if_fail (EA_IS_CAL_VIEW_EVENT (component));
-
- g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE(component));
- if (!g_obj)
- /* defunct object*/
- return;
- g_return_if_fail (E_IS_TEXT (g_obj));
-
- canvas_item = GNOME_CANVAS_ITEM (g_obj);
- cal_view = ea_calendar_helpers_get_cal_view_from (canvas_item);
- if (!cal_view)
- return;
-
- if (E_IS_DAY_VIEW (cal_view)) {
- gint day, event_num;
-
- if (!e_day_view_find_event_from_item (E_DAY_VIEW (cal_view),
- canvas_item,
- &day, &event_num))
- return;
- if (day == E_DAY_VIEW_LONG_EVENT) {
- gint start_day, end_day;
- if (!e_day_view_get_long_event_position (E_DAY_VIEW (cal_view),
- event_num,
- &start_day,
- &end_day,
- &item_x,
- &item_y,
- &item_w,
- &item_h))
- return;
- canvas = E_DAY_VIEW (cal_view)->top_canvas;
- }
- else {
- if (!e_day_view_get_event_position (E_DAY_VIEW (cal_view), day,
- event_num,
- &item_x, &item_y,
- &item_w, &item_h))
-
- return;
- canvas = E_DAY_VIEW (cal_view)->main_canvas;
- }
- }
- else if (E_IS_WEEK_VIEW (cal_view)) {
- gint event_num, span_num;
- if (!e_week_view_find_event_from_item (E_WEEK_VIEW (cal_view),
- canvas_item, &event_num,
- &span_num))
- return;
-
- if (!e_week_view_get_span_position (E_WEEK_VIEW (cal_view),
- event_num, span_num,
- &item_x, &item_y, &item_w))
- return;
- item_h = E_WEEK_VIEW_ICON_HEIGHT;
- canvas = E_WEEK_VIEW (cal_view)->main_canvas;
- }
- else
- return;
-
- if (!canvas)
- return;
-
- gdk_window_get_origin (canvas->window,
- &x_window, &y_window);
- gnome_canvas_get_scroll_offsets (GNOME_CANVAS (canvas), &scroll_x, &scroll_y);
-
- *x = item_x + x_window - scroll_x;
- *y = item_y + y_window - scroll_y;
- *width = item_w;
- *height = item_h;
-
- if (coord_type == ATK_XY_WINDOW) {
- GdkWindow *window;
- gint x_toplevel, y_toplevel;
-
- window = gdk_window_get_toplevel (GTK_WIDGET (cal_view)->window);
- gdk_window_get_origin (window, &x_toplevel, &y_toplevel);
-
- *x -= x_toplevel;
- *y -= y_toplevel;
- }
-
-#ifdef ACC_DEBUG
- printf ("Event Bounds (%d, %d, %d, %d)\n", *x, *y, *width, *height);
-#endif
-}
diff --git a/a11y/calendar/ea-cal-view-event.h b/a11y/calendar/ea-cal-view-event.h
deleted file mode 100644
index f139dde9fb..0000000000
--- a/a11y/calendar/ea-cal-view-event.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-cal-view-event.h
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-#ifndef __EA_CAL_VIEW_EVENT_H__
-#define __EA_CAL_VIEW_EVENT_H__
-
-#include <atk/atkgobjectaccessible.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#define EA_TYPE_CAL_VIEW_EVENT (ea_cal_view_event_get_type ())
-#define EA_CAL_VIEW_EVENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EA_TYPE_CAL_VIEW_EVENT, EaCalViewEvent))
-#define EA_CAL_VIEW_EVENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EA_TYPE_CAL_VIEW_EVENT, EaCalViewEventClass))
-#define EA_IS_CAL_VIEW_EVENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EA_TYPE_CAL_VIEW_EVENT))
-#define EA_IS_CAL_VIEW_EVENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EA_TYPE_CAL_VIEW_EVENT))
-#define EA_CAL_VIEW_EVENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EA_TYPE_CAL_VIEW_EVENT, EaCalViewEventClass))
-
-typedef struct _EaCalViewEvent EaCalViewEvent;
-typedef struct _EaCalViewEventClass EaCalViewEventClass;
-
-struct _EaCalViewEvent
-{
- AtkGObjectAccessible parent;
-};
-
-GType ea_cal_view_event_get_type (void);
-
-struct _EaCalViewEventClass
-{
- AtkGObjectAccessibleClass parent_class;
-};
-
-AtkObject *ea_cal_view_event_new (GObject *obj);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* __EA_CAL_VIEW_EVENT_H__ */
diff --git a/a11y/calendar/ea-cal-view.c b/a11y/calendar/ea-cal-view.c
deleted file mode 100644
index 2d86d9ef10..0000000000
--- a/a11y/calendar/ea-cal-view.c
+++ /dev/null
@@ -1,440 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-cal-view.c
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-#include "ea-cal-view.h"
-#include "ea-calendar-helpers.h"
-#include "e-day-view.h"
-#include "e-week-view.h"
-#include "calendar-commands.h"
-#include "goto.h"
-#include <glib/gstrfuncs.h>
-
-static void ea_cal_view_class_init (EaCalViewClass *klass);
-
-static AtkObject* ea_cal_view_get_parent (AtkObject *accessible);
-static void ea_cal_view_real_initialize (AtkObject *accessible, gpointer data);
-
-static void ea_cal_view_event_changed_cb (ECalendarView *cal_view,
- ECalendarViewEvent *event, gpointer data);
-static void ea_cal_view_event_added_cb (ECalendarView *cal_view,
- ECalendarViewEvent *event, gpointer data);
-
-static gboolean idle_dates_changed (gpointer data);
-static void ea_cal_view_dates_change_cb (GnomeCalendar *gcal, gpointer data);
-
-static void atk_action_interface_init (AtkActionIface *iface);
-static gboolean action_interface_do_action (AtkAction *action, gint i);
-static gint action_interface_get_n_actions (AtkAction *action);
-static G_CONST_RETURN gchar*
-action_interface_get_description(AtkAction *action, gint i);
-static G_CONST_RETURN gchar*
-action_interface_get_keybinding (AtkAction *action, gint i);
-static G_CONST_RETURN gchar*
-action_interface_action_get_name(AtkAction *action, gint i);
-
-static gpointer parent_class = NULL;
-
-GType
-ea_cal_view_get_type (void)
-{
- static GType type = 0;
- AtkObjectFactory *factory;
- GTypeQuery query;
- GType derived_atk_type;
-
- if (!type) {
- static GTypeInfo tinfo = {
- sizeof (EaCalViewClass),
- (GBaseInitFunc) NULL, /* base init */
- (GBaseFinalizeFunc) NULL, /* base finalize */
- (GClassInitFunc) ea_cal_view_class_init, /* class init */
- (GClassFinalizeFunc) NULL, /* class finalize */
- NULL, /* class data */
- sizeof (EaCalView), /* instance size */
- 0, /* nb preallocs */
- (GInstanceInitFunc) NULL, /* instance init */
- NULL /* value table */
- };
-
- static const GInterfaceInfo atk_action_info = {
- (GInterfaceInitFunc) atk_action_interface_init,
- (GInterfaceFinalizeFunc) NULL,
- NULL
- };
-
- /*
- * Figure out the size of the class and instance
- * we are run-time deriving from (GailWidget, in this case)
- */
-
- factory = atk_registry_get_factory (atk_get_default_registry (),
- GTK_TYPE_WIDGET);
- derived_atk_type = atk_object_factory_get_accessible_type (factory);
- g_type_query (derived_atk_type, &query);
-
- tinfo.class_size = query.class_size;
- tinfo.instance_size = query.instance_size;
-
- type = g_type_register_static (derived_atk_type,
- "EaCalView", &tinfo, 0);
- g_type_add_interface_static (type, ATK_TYPE_ACTION,
- &atk_action_info);
- }
-
- return type;
-}
-
-static void
-ea_cal_view_class_init (EaCalViewClass *klass)
-{
- AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_peek_parent (klass);
-
- class->get_parent = ea_cal_view_get_parent;
- class->initialize = ea_cal_view_real_initialize;
-}
-
-AtkObject*
-ea_cal_view_new (GtkWidget *widget)
-{
- GObject *object;
- AtkObject *accessible;
-
- g_return_val_if_fail (E_IS_CALENDAR_VIEW (widget), NULL);
-
- object = g_object_new (EA_TYPE_CAL_VIEW, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
-
- return accessible;
-}
-
-static void
-ea_cal_view_real_initialize (AtkObject *accessible, gpointer data)
-{
- ECalendarView *cal_view;
- GnomeCalendar *gcal;
- static AtkRole role = ATK_ROLE_INVALID;
-
- g_return_if_fail (EA_IS_CAL_VIEW (accessible));
- g_return_if_fail (E_IS_CALENDAR_VIEW (data));
-
- ATK_OBJECT_CLASS (parent_class)->initialize (accessible, data);
- if (role == ATK_ROLE_INVALID)
- role = atk_role_register ("Calendar View");
- accessible->role = role;
- cal_view = E_CALENDAR_VIEW (data);
-
- /* add listener for event_changed, event_added
- * we don't need to listen on event_removed. When the e_text
- * of the event is removed, the cal_view_event will go to the state
- * of "defunct" (changed by weak ref callback of atkgobjectaccessible
- */
- g_signal_connect (G_OBJECT(cal_view), "event_changed",
- G_CALLBACK (ea_cal_view_event_changed_cb), NULL);
- g_signal_connect (G_OBJECT(cal_view), "event_added",
- G_CALLBACK (ea_cal_view_event_added_cb), NULL);
-
- /* listen for date changes of calendar */
- gcal = e_calendar_view_get_calendar (cal_view);
-
- if (gcal)
- g_signal_connect (gcal, "dates_shown_changed",
- G_CALLBACK (ea_cal_view_dates_change_cb),
- accessible);
-}
-
-static AtkObject*
-ea_cal_view_get_parent (AtkObject *accessible)
-{
- ECalendarView *cal_view;
- GnomeCalendar *gnomeCalendar;
-
- g_return_val_if_fail (EA_IS_CAL_VIEW (accessible), NULL);
-
- if (!GTK_ACCESSIBLE (accessible)->widget)
- return NULL;
- cal_view = E_CALENDAR_VIEW (GTK_ACCESSIBLE (accessible)->widget);
-
- gnomeCalendar = e_calendar_view_get_calendar (cal_view);
-
- return gtk_widget_get_accessible (GTK_WIDGET(gnomeCalendar));
-}
-
-static void
-ea_cal_view_event_changed_cb (ECalendarView *cal_view, ECalendarViewEvent *event,
- gpointer data)
-{
- AtkObject *atk_obj;
- EaCalView *ea_cal_view;
- AtkObject *event_atk_obj = NULL;
-
- g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
-
- atk_obj = gtk_widget_get_accessible (GTK_WIDGET(cal_view));
- if (!EA_IS_CAL_VIEW (atk_obj))
- return;
- ea_cal_view = EA_CAL_VIEW (atk_obj);
-
- if ((E_IS_DAY_VIEW (cal_view)) && event && event->canvas_item) {
- event_atk_obj =
- ea_calendar_helpers_get_accessible_for (event->canvas_item);
- }
- else if ((E_IS_WEEK_VIEW (cal_view)) && event) {
- EWeekViewEventSpan *span;
- EWeekViewEvent *week_view_event = (EWeekViewEvent *)event;
- EWeekView *week_view = E_WEEK_VIEW (cal_view);
- /* get the first span of the event */
- span = &g_array_index (week_view->spans, EWeekViewEventSpan,
- week_view_event->spans_index);
- if (span && span->text_item)
- event_atk_obj = ea_calendar_helpers_get_accessible_for (span->text_item);
- }
- if (event_atk_obj) {
-#ifdef ACC_DEBUG
- printf ("AccDebug: event=%p changed\n", (void *)event);
-#endif
- g_object_notify (G_OBJECT(event_atk_obj), "accessible-name");
- g_signal_emit_by_name (event_atk_obj, "visible_data_changed");
- }
-
-}
-
-static void
-ea_cal_view_event_added_cb (ECalendarView *cal_view, ECalendarViewEvent *event,
- gpointer data)
-{
- AtkObject *atk_obj;
- EaCalView *ea_cal_view;
- AtkObject *event_atk_obj = NULL;
- gint index;
-
- g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
-
- atk_obj = gtk_widget_get_accessible (GTK_WIDGET(cal_view));
- if (!EA_IS_CAL_VIEW (atk_obj))
- return;
- ea_cal_view = EA_CAL_VIEW (atk_obj);
-
- if ((E_IS_DAY_VIEW (cal_view)) && event && event->canvas_item) {
- event_atk_obj =
- ea_calendar_helpers_get_accessible_for (event->canvas_item);
- }
- else if ((E_IS_WEEK_VIEW (cal_view)) && event) {
- EWeekViewEventSpan *span;
- EWeekViewEvent *week_view_event = (EWeekViewEvent *)event;
- EWeekView *week_view = E_WEEK_VIEW (cal_view);
- /* get the first span of the event */
- span = &g_array_index (week_view->spans, EWeekViewEventSpan,
- week_view_event->spans_index);
- if (span && span->text_item)
- event_atk_obj = ea_calendar_helpers_get_accessible_for (span->text_item);
-
- }
- if (event_atk_obj) {
- index = atk_object_get_index_in_parent (event_atk_obj);
- if (index < 0)
- return;
-#ifdef ACC_DEBUG
- printf ("AccDebug: event=%p added\n", (void *)event);
-#endif
- g_signal_emit_by_name (atk_obj, "children_changed::add",
- index, event_atk_obj, NULL);
- }
-}
-
-static gboolean
-idle_dates_changed (gpointer data)
-{
- AtkObject *ea_cal_view;
-
- g_return_val_if_fail (data, FALSE);
- g_return_val_if_fail (EA_IS_CAL_VIEW (data), FALSE);
-
- ea_cal_view = ATK_OBJECT(data);
-
- if (ea_cal_view->name) {
- g_free (ea_cal_view->name);
- ea_cal_view->name = NULL;
- }
- g_object_notify (G_OBJECT (ea_cal_view), "accessible-name");
- g_signal_emit_by_name (ea_cal_view, "visible_data_changed");
- g_signal_emit_by_name (ea_cal_view, "children_changed", NULL);
-#ifdef ACC_DEBUG
- printf ("AccDebug: cal view date changed\n");
-#endif
-
- return FALSE;
-}
-
-static void
-ea_cal_view_dates_change_cb (GnomeCalendar *gcal, gpointer data)
-{
- g_idle_add (idle_dates_changed, data);
-}
-
-/* atk action interface */
-
-#define CAL_VIEW_ACTION_NUM 5
-
-static const char * action_name [CAL_VIEW_ACTION_NUM] = {
- "New Appointment",
- "New All Day Event",
- "New Meeting",
- "Go to Today",
- "Go to Date"
-};
-
-static void
-atk_action_interface_init (AtkActionIface *iface)
-{
- g_return_if_fail (iface != NULL);
-
- iface->do_action = action_interface_do_action;
- iface->get_n_actions = action_interface_get_n_actions;
- iface->get_description = action_interface_get_description;
- iface->get_keybinding = action_interface_get_keybinding;
- iface->get_name = action_interface_action_get_name;
-}
-
-static gboolean
-action_interface_do_action (AtkAction *action, gint index)
-{
- GtkWidget *widget;
- gboolean return_value = TRUE;
- time_t dtstart, dtend;
- ECalendarView *cal_view;
-
- widget = GTK_ACCESSIBLE (action)->widget;
- if (widget == NULL)
- /*
- * State is defunct
- */
- return FALSE;
-
- if (!GTK_WIDGET_IS_SENSITIVE (widget) || !GTK_WIDGET_VISIBLE (widget))
- return FALSE;
-
- cal_view = E_CALENDAR_VIEW (widget);
- switch (index) {
- case 0:
- /* New Appointment */
- e_calendar_view_new_appointment (cal_view);
- break;
- case 1:
- /* New All Day Event */
- e_calendar_view_get_selected_time_range (cal_view,
- &dtstart, &dtend);
- e_calendar_view_new_appointment_for (cal_view,
- dtstart, dtend, TRUE, FALSE);
- break;
- case 2:
- /* New Meeting */
- e_calendar_view_get_selected_time_range (cal_view,
- &dtstart, &dtend);
- e_calendar_view_new_appointment_for (cal_view,
- dtstart, dtend, FALSE, TRUE);
- break;
- case 3:
- /* Go to today */
- break;
- calendar_goto_today (e_calendar_view_get_calendar (cal_view));
- case 4:
- /* Go to date */
- goto_dialog (e_calendar_view_get_calendar (cal_view));
- break;
- default:
- return_value = FALSE;
- break;
- }
- return return_value;
-}
-
-static gint
-action_interface_get_n_actions (AtkAction *action)
-{
- return CAL_VIEW_ACTION_NUM;
-}
-
-static G_CONST_RETURN gchar*
-action_interface_get_description(AtkAction *action, gint index)
-{
- return action_interface_action_get_name (action, index);
-}
-
-static G_CONST_RETURN gchar*
-action_interface_get_keybinding (AtkAction *action, gint index)
-{
- GtkWidget *widget;
- EaCalView *ea_cal_view;
-
- widget = GTK_ACCESSIBLE (action)->widget;
- if (widget == NULL)
- /*
- * State is defunct
- */
- return NULL;
-
- if (!GTK_WIDGET_IS_SENSITIVE (widget) || !GTK_WIDGET_VISIBLE (widget))
- return FALSE;
-
- ea_cal_view = EA_CAL_VIEW (action);
-
- switch (index) {
- case 0:
- /* New Appointment */
- return "<Alt>fna;<Control>n";
- break;
- case 1:
- /* New Event */
- return "<Alt>fnd;<Shift><Control>d";
- break;
- case 2:
- /* New Meeting */
- return "<Alt>fne;<Shift><Control>e";
- break;
- case 3:
- /* Go to today */
- return "<Alt>vt;<Alt><Control>t";
- break;
- case 4:
- /* Go to date */
- return "<Alt>vd;<Alt><Control>g";
- break;
- default:
- break;
- }
- return NULL;
-}
-
-static G_CONST_RETURN gchar*
-action_interface_action_get_name(AtkAction *action, gint i)
-{
- if (i >= 0 && i < CAL_VIEW_ACTION_NUM)
- return action_name [i];
- return NULL;
-}
diff --git a/a11y/calendar/ea-cal-view.h b/a11y/calendar/ea-cal-view.h
deleted file mode 100644
index 858aa497d4..0000000000
--- a/a11y/calendar/ea-cal-view.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-cal-view.h
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-#ifndef __EA_CAL_VIEW_H__
-#define __EA_CAL_VIEW_H__
-
-#include <gtk/gtkaccessible.h>
-#include "e-cal-view.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#define EA_TYPE_CAL_VIEW (ea_cal_view_get_type ())
-#define EA_CAL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EA_TYPE_CAL_VIEW, EaCalView))
-#define EA_CAL_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EA_TYPE_CAL_VIEW, EaCalViewClass))
-#define EA_IS_CAL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EA_TYPE_CAL_VIEW))
-#define EA_IS_CAL_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EA_TYPE_CAL_VIEW))
-#define EA_CAL_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EA_TYPE_CAL_VIEW, EaCalViewClass))
-
-typedef struct _EaCalView EaCalView;
-typedef struct _EaCalViewClass EaCalViewClass;
-
-struct _EaCalView
-{
- GtkAccessible parent;
-};
-
-GType ea_cal_view_get_type (void);
-
-struct _EaCalViewClass
-{
- GtkAccessibleClass parent_class;
-};
-
-AtkObject* ea_cal_view_new (GtkWidget *widget);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __EA_CAL_VIEW_H__ */
diff --git a/a11y/calendar/ea-calendar-helpers.c b/a11y/calendar/ea-calendar-helpers.c
deleted file mode 100644
index 535265ebeb..0000000000
--- a/a11y/calendar/ea-calendar-helpers.c
+++ /dev/null
@@ -1,148 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-calendar-helpers.c
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-#include "ea-calendar-helpers.h"
-#include "ea-cal-view-event.h"
-#include "e-day-view.h"
-#include "e-week-view.h"
-
-#include <gal/e-text/e-text.h>
-
-/**
- * ea_calendar_helpers_get_accessible_for
- * @canvas_item: the canvas item (e_text) for a event
- * @returns: the atk object for the canvas_item
- *
- **/
-AtkObject *
-ea_calendar_helpers_get_accessible_for (GnomeCanvasItem *canvas_item)
-{
- AtkObject *atk_obj = NULL;
- GObject *g_obj;
-
- g_return_val_if_fail (E_IS_TEXT (canvas_item), NULL);
-
- g_obj = G_OBJECT (canvas_item);
- /* we cannot use atk_gobject_accessible_for_object here,
- * EaDayViewEvent/EaWeekViewEvent cannot be created by the
- * registered facotry of E_TEXT
- */
- atk_obj = g_object_get_data (g_obj, "accessible-object");
- if (!atk_obj)
- atk_obj = ea_cal_view_event_new (g_obj);
- return atk_obj;
-}
-
-/**
- * ea_calendar_helpers_get_view_widget_from:
- * @canvas_item: the canvas item (e_text) for a event
- * @returns: the cal view widget if exists
- *
- * Get the cal view widget contains the canvas_item.
- *
- **/
-ECalendarView *
-ea_calendar_helpers_get_cal_view_from (GnomeCanvasItem *canvas_item)
-{
- GnomeCanvas *canvas;
- GtkWidget *view_widget = NULL;
-
- g_return_val_if_fail (canvas_item, NULL);
- g_return_val_if_fail (E_IS_TEXT (canvas_item), NULL);
-
- /* canvas_item is the e_text for the event */
- /* canvas_item->canvas is the ECanvas for day view */
- /* parent of canvas_item->canvas is the EDayView or EWeekView widget */
- canvas = canvas_item->canvas;
- view_widget = gtk_widget_get_parent (GTK_WIDGET(canvas));
- if (!view_widget || !E_IS_CALENDAR_VIEW (view_widget))
- return NULL;
- return E_CALENDAR_VIEW (view_widget);
-}
-
-/**
- * ea_calendar_helpers_get_cal_view_event_from
- * @canvas_item: the cavas_item (e_text) for the event
- * @returns: the ECalendarViewEvent
- *
- * Get the ECalendarViewEvent for the canvas_item.
- *
- **/
-ECalendarViewEvent *
-ea_calendar_helpers_get_cal_view_event_from (GnomeCanvasItem *canvas_item)
-{
- ECalendarView *cal_view;
- gboolean event_found;
- ECalendarViewEvent *cal_view_event;
-
- g_return_val_if_fail (E_IS_TEXT (canvas_item), NULL);
-
- cal_view = ea_calendar_helpers_get_cal_view_from (canvas_item);
-
- if (!cal_view)
- return NULL;
-
- if (E_IS_DAY_VIEW (cal_view)) {
- gint event_day, event_num;
- EDayViewEvent *day_view_event;
- EDayView *day_view = E_DAY_VIEW (cal_view);
- event_found = e_day_view_find_event_from_item (day_view, canvas_item,
- &event_day, &event_num);
- if (!event_found)
- return NULL;
- if (event_day == E_DAY_VIEW_LONG_EVENT) {
- /* a long event */
- day_view_event = &g_array_index (day_view->long_events,
- EDayViewEvent, event_num);
- }
- else {
- /* a main canvas event */
- day_view_event = &g_array_index (day_view->events[event_day],
- EDayViewEvent, event_num);
- }
- cal_view_event = (ECalendarViewEvent *) day_view_event;
- }
- else if (E_IS_WEEK_VIEW (cal_view)) {
- gint event_num, span_num;
- EWeekViewEvent *week_view_event;
- EWeekView *week_view = E_WEEK_VIEW (cal_view);
- event_found = e_week_view_find_event_from_item (week_view,
- canvas_item,
- &event_num,
- &span_num);
- if (!event_found)
- return NULL;
-
- week_view_event = &g_array_index (week_view->events, EWeekViewEvent,
- event_num);
-
- cal_view_event = (ECalendarViewEvent *)week_view_event;
- }
- else {
- g_assert_not_reached ();
- return NULL;
- }
- return cal_view_event;
-}
diff --git a/a11y/calendar/ea-calendar-helpers.h b/a11y/calendar/ea-calendar-helpers.h
deleted file mode 100644
index 50d997d91d..0000000000
--- a/a11y/calendar/ea-calendar-helpers.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-calendar-helpers.h
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-/* Evolution Accessibility
- */
-
-#ifndef _EA_CALENDAR_HELPERS_H__
-#define _EA_CALENDAR_HELPERS_H__
-
-#include "ea-cal-view.h"
-
-AtkObject *
-ea_calendar_helpers_get_accessible_for (GnomeCanvasItem *canvas_item);
-
-ECalendarView *
-ea_calendar_helpers_get_cal_view_from (GnomeCanvasItem *canvas_item);
-
-ECalendarViewEvent *
-ea_calendar_helpers_get_cal_view_event_from (GnomeCanvasItem *canvas_item);
-
-#endif /* _EA_CALENDAR_HELPERS_H__ */
diff --git a/a11y/calendar/ea-calendar.c b/a11y/calendar/ea-calendar.c
deleted file mode 100644
index bb528cb919..0000000000
--- a/a11y/calendar/ea-calendar.c
+++ /dev/null
@@ -1,151 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-calendar.c
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-#include <gal/e-text/e-text.h>
-#include "ea-calendar-helpers.h"
-#include "ea-factory.h"
-#include "ea-calendar.h"
-
-#include "calendar/ea-cal-view.h"
-#include "calendar/ea-cal-view-event.h"
-#include "calendar/ea-day-view.h"
-#include "calendar/ea-day-view-main-item.h"
-#include "calendar/ea-week-view.h"
-#include "calendar/ea-gnome-calendar.h"
-
-
-EA_FACTORY (EA_TYPE_CAL_VIEW, ea_cal_view, ea_cal_view_new)
-EA_FACTORY (EA_TYPE_DAY_VIEW, ea_day_view, ea_day_view_new)
-EA_FACTORY_GOBJECT (EA_TYPE_DAY_VIEW_MAIN_ITEM, ea_day_view_main_item, ea_day_view_main_item_new)
-EA_FACTORY (EA_TYPE_WEEK_VIEW, ea_week_view, ea_week_view_new)
-EA_FACTORY (EA_TYPE_GNOME_CALENDAR, ea_gnome_calendar, ea_gnome_calendar_new)
-
-static gboolean ea_calendar_focus_watcher (GSignalInvocationHint *ihint,
- guint n_param_values,
- const GValue *param_values,
- gpointer data);
-
-void
-gnome_calendar_a11y_init (void)
-{
- EA_SET_FACTORY (gnome_calendar_get_type(), ea_gnome_calendar);
- /* we only add focus watcher when accessibility is enabled
- */
- if (atk_get_root ()) {
- g_signal_add_emission_hook (g_signal_lookup ("event", E_TYPE_TEXT),
- 0, ea_calendar_focus_watcher,
- NULL, (GDestroyNotify) NULL);
- g_signal_add_emission_hook (g_signal_lookup ("event-after",
- e_day_view_get_type()),
- 0, ea_calendar_focus_watcher,
- NULL, (GDestroyNotify) NULL);
- g_signal_add_emission_hook (g_signal_lookup ("event",
- e_day_view_main_item_get_type()),
- 0, ea_calendar_focus_watcher,
- NULL, (GDestroyNotify) NULL);
-
- }
-}
-
-void
-e_cal_view_a11y_init (void)
-{
- EA_SET_FACTORY (e_cal_view_get_type(), ea_cal_view);
-}
-
-void
-e_day_view_a11y_init (void)
-{
- EA_SET_FACTORY (e_day_view_get_type(), ea_day_view);
-}
-
-void e_day_view_main_item_a11y_init (void)
-{
- EA_SET_FACTORY (e_day_view_main_item_get_type (), ea_day_view_main_item);
-}
-
-void
-e_week_view_a11y_init (void)
-{
- EA_SET_FACTORY (e_week_view_get_type(), ea_week_view);
-}
-
-gboolean
-ea_calendar_focus_watcher (GSignalInvocationHint *ihint,
- guint n_param_values,
- const GValue *param_values,
- gpointer data)
-{
- GObject *object;
- GdkEvent *event;
- AtkObject *ea_event = NULL;
-
- object = g_value_get_object (param_values + 0);
- event = g_value_get_boxed (param_values + 1);
-
- if (E_IS_TEXT (object)) {
- /* "event" signal on canvas item
- */
- GnomeCanvasItem *canvas_item;
-
- canvas_item = GNOME_CANVAS_ITEM (object);
- if (event->type == GDK_FOCUS_CHANGE) {
- if (event->focus_change.in) {
- ea_event =
- ea_calendar_helpers_get_accessible_for (canvas_item);
- if (!ea_event)
- /* not canvas item we want */
- return TRUE;
-
- }
- atk_focus_tracker_notify (ea_event);
- }
- }
- else if (E_IS_DAY_VIEW (object)) {
- EDayView *day_view = E_DAY_VIEW (object);
- if (event->type == GDK_FOCUS_CHANGE) {
- if (event->focus_change.in) {
- /* give main item chance to emit focus */
- gnome_canvas_item_grab_focus (day_view->main_canvas_item);
- }
- }
- }
- else if (E_IS_DAY_VIEW_MAIN_ITEM (object)) {
- if (event->type == GDK_FOCUS_CHANGE) {
- if (event->focus_change.in) {
- /* we should emit focus on main item */
- ea_event = atk_gobject_accessible_for_object (object);
- }
- else
- /* focus out */
- ea_event = NULL;
-#ifdef ACC_DEBUG
- printf ("EvoAcc: focus notify on day main item %p\n", (void *)object);
-#endif
- atk_focus_tracker_notify (ea_event);
- }
- }
- return TRUE;
-}
diff --git a/a11y/calendar/ea-calendar.h b/a11y/calendar/ea-calendar.h
deleted file mode 100644
index 4b1779c0b5..0000000000
--- a/a11y/calendar/ea-calendar.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-calendar.h
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-/* Evolution Accessibility
-*/
-
-#ifndef _EA_CALENDAR_H__
-#define _EA_CALENDAR_H__
-
-void gnome_calendar_a11y_init (void);
-void e_cal_view_a11y_init (void);
-void e_day_view_a11y_init (void);
-void e_day_view_main_item_a11y_init (void);
-void e_week_view_a11y_init (void);
-
-#endif /* _EA_CALENDAR_H__ */
diff --git a/a11y/calendar/ea-day-view-cell.c b/a11y/calendar/ea-day-view-cell.c
deleted file mode 100644
index 52fb860fd6..0000000000
--- a/a11y/calendar/ea-day-view-cell.c
+++ /dev/null
@@ -1,336 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-day-view-cell.c
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-#include "ea-day-view-cell.h"
-#include "ea-day-view-main-item.h"
-#include "ea-day-view.h"
-#include "ea-factory.h"
-
-/* EDayViewCell */
-
-static void e_day_view_cell_class_init (EDayViewCellClass *class);
-
-EA_FACTORY_GOBJECT (EA_TYPE_DAY_VIEW_CELL, ea_day_view_cell, ea_day_view_cell_new)
-
-GType
-e_day_view_cell_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static GTypeInfo tinfo = {
- sizeof (EDayViewCellClass),
- (GBaseInitFunc) NULL, /* base init */
- (GBaseFinalizeFunc) NULL, /* base finalize */
- (GClassInitFunc) e_day_view_cell_class_init, /* class init */
- (GClassFinalizeFunc) NULL, /* class finalize */
- NULL, /* class data */
- sizeof (EDayViewCell), /* instance size */
- 0, /* nb preallocs */
- (GInstanceInitFunc) NULL, /* instance init */
- NULL /* value table */
- };
-
- type = g_type_register_static (G_TYPE_OBJECT,
- "EDayViewCell", &tinfo, 0);
- }
-
- return type;
-}
-
-static void
-e_day_view_cell_class_init (EDayViewCellClass *class)
-{
- EA_SET_FACTORY (e_day_view_cell_get_type (), ea_day_view_cell);
-}
-
-EDayViewCell *
-e_day_view_cell_new (EDayView *day_view, gint row, gint column)
-{
- GObject *object;
- EDayViewCell *cell;
-
- g_return_val_if_fail (E_IS_DAY_VIEW (day_view), NULL);
-
- object = g_object_new (E_TYPE_DAY_VIEW_CELL, NULL);
- cell = E_DAY_VIEW_CELL (object);
- cell->day_view = day_view;
- cell->row = row;
- cell->column = column;
-
-#ifdef ACC_DEBUG
- printf ("EvoAcc: e_day_view_cell created %p\n", (void *)cell);
-#endif
-
- return cell;
-}
-
-/* EaDayViewCell */
-
-static void ea_day_view_cell_class_init (EaDayViewCellClass *klass);
-
-static G_CONST_RETURN gchar* ea_day_view_cell_get_name (AtkObject *accessible);
-static G_CONST_RETURN gchar* ea_day_view_cell_get_description (AtkObject *accessible);
-static AtkStateSet* ea_day_view_cell_ref_state_set (AtkObject *obj);
-static AtkObject * ea_day_view_cell_get_parent (AtkObject *accessible);
-
-/* component interface */
-static void atk_component_interface_init (AtkComponentIface *iface);
-static void component_interface_get_extents (AtkComponent *component,
- gint *x, gint *y,
- gint *width, gint *height,
- AtkCoordType coord_type);
-static gpointer parent_class = NULL;
-
-#ifdef ACC_DEBUG
-static gint n_ea_day_view_cell_created = 0, n_ea_day_view_cell_destroyed = 0;
-static void ea_day_view_cell_finalize (GObject *object);
-#endif
-
-GType
-ea_day_view_cell_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static GTypeInfo tinfo = {
- sizeof (EaDayViewCellClass),
- (GBaseInitFunc) NULL, /* base init */
- (GBaseFinalizeFunc) NULL, /* base finalize */
- (GClassInitFunc) ea_day_view_cell_class_init, /* class init */
- (GClassFinalizeFunc) NULL, /* class finalize */
- NULL, /* class data */
- sizeof (EaDayViewCell), /* instance size */
- 0, /* nb preallocs */
- (GInstanceInitFunc) NULL, /* instance init */
- NULL /* value table */
- };
-
- static const GInterfaceInfo atk_component_info = {
- (GInterfaceInitFunc) atk_component_interface_init,
- (GInterfaceFinalizeFunc) NULL,
- NULL
- };
-
- type = g_type_register_static (ATK_TYPE_GOBJECT_ACCESSIBLE,
- "EaDayViewCell", &tinfo, 0);
- g_type_add_interface_static (type, ATK_TYPE_COMPONENT,
- &atk_component_info);
- }
-
- return type;
-}
-
-static void
-ea_day_view_cell_class_init (EaDayViewCellClass *klass)
-{
- AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
-
-#ifdef ACC_DEBUG
- GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- gobject_class->finalize = ea_day_view_cell_finalize;
-#endif
-
- parent_class = g_type_class_peek_parent (klass);
-
- class->get_name = ea_day_view_cell_get_name;
- class->get_description = ea_day_view_cell_get_description;
- class->ref_state_set = ea_day_view_cell_ref_state_set;
-
- class->get_parent = ea_day_view_cell_get_parent;
-}
-
-AtkObject*
-ea_day_view_cell_new (GObject *obj)
-{
- gpointer object;
- AtkObject *atk_object;
-
- g_return_val_if_fail (E_IS_DAY_VIEW_CELL (obj), NULL);
-
- object = g_object_new (EA_TYPE_DAY_VIEW_CELL, NULL);
- atk_object = ATK_OBJECT (object);
- atk_object_initialize (atk_object, obj);
- atk_object->role = ATK_ROLE_TABLE_CELL;
-
-#ifdef ACC_DEBUG
- ++n_ea_day_view_cell_created;
- printf ("ACC_DEBUG: n_ea_day_view_cell_created = %d\n",
- n_ea_day_view_cell_created);
-#endif
- return atk_object;
-}
-
-#ifdef ACC_DEBUG
-static void ea_day_view_cell_finalize (GObject *object)
-{
- ++n_ea_day_view_cell_destroyed;
- printf ("ACC_DEBUG: n_ea_day_view_cell_destroyed = %d\n",
- n_ea_day_view_cell_destroyed);
-}
-#endif
-
-static G_CONST_RETURN gchar*
-ea_day_view_cell_get_name (AtkObject *accessible)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- EDayViewCell *cell;
-
- g_return_val_if_fail (EA_IS_DAY_VIEW_CELL (accessible), NULL);
-
- if (!accessible->name) {
- AtkObject *ea_main_item;
- GnomeCanvasItem *main_item;
- gchar *new_name = g_strdup ("");
- const gchar *row_label, *column_label;
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (accessible);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return NULL;
-
- cell = E_DAY_VIEW_CELL (g_obj);
- main_item = cell->day_view->main_canvas_item;
- ea_main_item = atk_gobject_accessible_for_object (G_OBJECT (main_item));
- column_label = atk_table_get_column_description (ATK_TABLE (ea_main_item),
- cell->column);
- row_label = atk_table_get_row_description (ATK_TABLE (ea_main_item),
- cell->row);
- new_name = g_strconcat (column_label, " ", row_label, NULL);
- ATK_OBJECT_CLASS (parent_class)->set_name (accessible, new_name);
- g_free (new_name);
- }
- return accessible->name;
-}
-
-static G_CONST_RETURN gchar*
-ea_day_view_cell_get_description (AtkObject *accessible)
-{
- return ea_day_view_cell_get_name (accessible);
-}
-
-static AtkStateSet*
-ea_day_view_cell_ref_state_set (AtkObject *obj)
-{
- AtkStateSet *state_set;
- GObject *g_obj;
- AtkObject *parent;
- gint x, y, width, height;
- gint parent_x, parent_y, parent_width, parent_height;
-
- state_set = ATK_OBJECT_CLASS (parent_class)->ref_state_set (obj);
- g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE(obj));
- if (!g_obj)
- return state_set;
-
- atk_state_set_add_state (state_set, ATK_STATE_SELECTABLE);
-
- parent = atk_object_get_parent (obj);
- atk_component_get_extents (ATK_COMPONENT (obj), &x, &y,
- &width, &height, ATK_XY_WINDOW);
- atk_component_get_extents (ATK_COMPONENT (parent), &parent_x, &parent_y,
- &parent_width, &parent_height, ATK_XY_WINDOW);
-
-
- if (x + width < parent_x || x > parent_x + parent_width ||
- y + height < parent_y || y > parent_y + parent_height)
- /* the cell is out of the main canvas */
- ;
- else
- atk_state_set_add_state (state_set, ATK_STATE_VISIBLE);
-
- return state_set;
-}
-
-static AtkObject *
-ea_day_view_cell_get_parent (AtkObject *accessible)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- EDayViewCell *cell;
-
- g_return_val_if_fail (EA_IS_DAY_VIEW_CELL (accessible), NULL);
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (accessible);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return NULL;
-
- cell = E_DAY_VIEW_CELL (g_obj);
- return gtk_widget_get_accessible (GTK_WIDGET (cell->day_view->main_canvas));
-}
-
-/* Atk Component Interface */
-
-static void
-atk_component_interface_init (AtkComponentIface *iface)
-{
- g_return_if_fail (iface != NULL);
-
- iface->get_extents = component_interface_get_extents;
-}
-
-static void
-component_interface_get_extents (AtkComponent *component,
- gint *x, gint *y, gint *width, gint *height,
- AtkCoordType coord_type)
-{
- GObject *g_obj;
- AtkObject *atk_obj;
- EDayViewCell *cell;
- EDayView *day_view;
- GtkWidget *main_canvas;
- gint day_view_width, day_view_height;
- gint scroll_x, scroll_y;
-
- *x = *y = *width = *height = 0;
-
- g_return_if_fail (EA_IS_DAY_VIEW_CELL (component));
-
- g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE(component));
- if (!g_obj)
- /* defunct object*/
- return;
-
- cell = E_DAY_VIEW_CELL (g_obj);
- day_view = cell->day_view;
- main_canvas = cell->day_view->main_canvas;
-
- atk_obj = atk_gobject_accessible_for_object (G_OBJECT (main_canvas));
- atk_component_get_extents (ATK_COMPONENT (atk_obj),
- x, y,
- &day_view_width, &day_view_height,
- coord_type);
- gnome_canvas_get_scroll_offsets (GNOME_CANVAS (day_view->main_canvas),
- &scroll_x, &scroll_y);
- *x += day_view->day_offsets[cell->column] - scroll_x;
- *y += day_view->row_height * cell->row
- - scroll_y;
- printf ("ybl: cellrow=%d, cellcol=%d, scroll_x=%d, scroll_y=%d\n",
- cell->row, cell->column, scroll_x, scroll_y);
- *width = day_view->day_widths[cell->column];
- *height = day_view->row_height;
-}
diff --git a/a11y/calendar/ea-day-view-cell.h b/a11y/calendar/ea-day-view-cell.h
deleted file mode 100644
index cba2fec15b..0000000000
--- a/a11y/calendar/ea-day-view-cell.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-day-view-cell.h
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-#ifndef __EA_DAY_VIEW_CELL_H__
-#define __EA_DAY_VIEW_CELL_H__
-
-#include <atk/atkgobjectaccessible.h>
-#include "e-day-view.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#define E_TYPE_DAY_VIEW_CELL (e_day_view_cell_get_type ())
-#define E_DAY_VIEW_CELL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_DAY_VIEW_CELL, EDayViewCell))
-#define E_DAY_VIEW_CELL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_DAY_VIEW_CELL, EDayViewCellClass))
-#define E_IS_DAY_VIEW_CELL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_DAY_VIEW_CELL))
-#define E_IS_DAY_VIEW_CELL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_DAY_VIEW_CELL))
-#define E_DAY_VIEW_CELL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), E_TYPE_DAY_VIEW_CELL, EDayViewCellClass))
-
-typedef struct _EDayViewCell EDayViewCell;
-typedef struct _EDayViewCellClass EDayViewCellClass;
-
-struct _EDayViewCell
-{
- GObject parent;
- EDayView *day_view;
- gint row;
- gint column;
-};
-
-GType e_day_view_cell_get_type (void);
-
-struct _EDayViewCellClass
-{
- GObjectClass parent_class;
-};
-
-EDayViewCell * e_day_view_cell_new (EDayView *day_view, gint row, gint column);
-
-#define EA_TYPE_DAY_VIEW_CELL (ea_day_view_cell_get_type ())
-#define EA_DAY_VIEW_CELL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EA_TYPE_DAY_VIEW_CELL, EaDayViewCell))
-#define EA_DAY_VIEW_CELL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EA_TYPE_DAY_VIEW_CELL, EaDayViewCellClass))
-#define EA_IS_DAY_VIEW_CELL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EA_TYPE_DAY_VIEW_CELL))
-#define EA_IS_DAY_VIEW_CELL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EA_TYPE_DAY_VIEW_CELL))
-#define EA_DAY_VIEW_CELL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EA_TYPE_DAY_VIEW_CELL, EaDayViewCellClass))
-
-typedef struct _EaDayViewCell EaDayViewCell;
-typedef struct _EaDayViewCellClass EaDayViewCellClass;
-
-struct _EaDayViewCell
-{
- AtkGObjectAccessible parent;
-};
-
-GType ea_day_view_cell_get_type (void);
-
-struct _EaDayViewCellClass
-{
- AtkGObjectAccessibleClass parent_class;
-};
-
-AtkObject* ea_day_view_cell_new (GObject *gobj);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __EA_DAY_VIEW_CELL_H__ */
diff --git a/a11y/calendar/ea-day-view-main-item.c b/a11y/calendar/ea-day-view-main-item.c
deleted file mode 100644
index af8d704178..0000000000
--- a/a11y/calendar/ea-day-view-main-item.c
+++ /dev/null
@@ -1,1259 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-day-view-main-item.c
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-#include "ea-day-view-main-item.h"
-#include "e-day-view-top-item.h"
-#include "ea-day-view.h"
-#include "ea-day-view-cell.h"
-#include "ea-cell-table.h"
-
-/* EaDayViewMainItem */
-static void ea_day_view_main_item_class_init (EaDayViewMainItemClass *klass);
-
-static void ea_day_view_main_item_finalize (GObject *object);
-static G_CONST_RETURN gchar* ea_day_view_main_item_get_name (AtkObject *accessible);
-static G_CONST_RETURN gchar* ea_day_view_main_item_get_description (AtkObject *accessible);
-
-static gint ea_day_view_main_item_get_n_children (AtkObject *obj);
-static AtkObject* ea_day_view_main_item_ref_child (AtkObject *obj,
- gint i);
-static AtkObject * ea_day_view_main_item_get_parent (AtkObject *accessible);
-static gint ea_day_view_main_item_get_index_in_parent (AtkObject *accessible);
-
-/* callbacks */
-static void ea_day_view_main_item_dates_change_cb (GnomeCalendar *gcal, gpointer data);
-static void ea_day_view_main_item_time_change_cb (EDayView *day_view, gpointer data);
-
-/* component interface */
-static void atk_component_interface_init (AtkComponentIface *iface);
-static void component_interface_get_extents (AtkComponent *component,
- gint *x, gint *y,
- gint *width, gint *height,
- AtkCoordType coord_type);
-/* atk table interface */
-static void atk_table_interface_init (AtkTableIface *iface);
-static gint table_interface_get_index_at (AtkTable *table,
- gint row,
- gint column);
-static gint table_interface_get_column_at_index (AtkTable *table,
- gint index);
-static gint table_interface_get_row_at_index (AtkTable *table,
- gint index);
-static AtkObject* table_interface_ref_at (AtkTable *table,
- gint row,
- gint column);
-static gint table_interface_get_n_rows (AtkTable *table);
-static gint table_interface_get_n_columns (AtkTable *table);
-static gint table_interface_get_column_extent_at (AtkTable *table,
- gint row,
- gint column);
-static gint table_interface_get_row_extent_at (AtkTable *table,
- gint row,
- gint column);
-
-static gboolean table_interface_is_row_selected (AtkTable *table,
- gint row);
-static gboolean table_interface_is_column_selected (AtkTable *table,
- gint row);
-static gboolean table_interface_is_selected (AtkTable *table,
- gint row,
- gint column);
-static gint table_interface_get_selected_rows (AtkTable *table,
- gint **rows_selected);
-static gint table_interface_get_selected_columns (AtkTable *table,
- gint **columns_selected);
-static gboolean table_interface_add_row_selection (AtkTable *table, gint row);
-static gboolean table_interface_remove_row_selection (AtkTable *table,
- gint row);
-static gboolean table_interface_add_column_selection (AtkTable *table,
- gint column);
-static gboolean table_interface_remove_column_selection (AtkTable *table,
- gint column);
-static AtkObject* table_interface_get_row_header (AtkTable *table, gint row);
-static AtkObject* table_interface_get_column_header (AtkTable *table,
- gint in_col);
-static AtkObject* table_interface_get_caption (AtkTable *table);
-
-static G_CONST_RETURN gchar*
-table_interface_get_column_description (AtkTable *table, gint in_col);
-
-static G_CONST_RETURN gchar*
-table_interface_get_row_description (AtkTable *table, gint row);
-
-static AtkObject* table_interface_get_summary (AtkTable *table);
-
-/* atk selection interface */
-static void atk_selection_interface_init (AtkSelectionIface *iface);
-static gboolean selection_interface_add_selection (AtkSelection *selection,
- gint i);
-static gboolean selection_interface_clear_selection (AtkSelection *selection);
-static AtkObject* selection_interface_ref_selection (AtkSelection *selection,
- gint i);
-static gint selection_interface_get_selection_count (AtkSelection *selection);
-static gboolean selection_interface_is_child_selected (AtkSelection *selection,
- gint i);
-
-/* helpers */
-static EaCellTable *
-ea_day_view_main_item_get_cell_data (EaDayViewMainItem *ea_main_item);
-
-static void
-ea_day_view_main_item_destory_cell_data (EaDayViewMainItem *ea_main_item);
-
-static gint
-ea_day_view_main_item_get_child_index_at (EaDayViewMainItem *ea_main_item,
- gint row, gint column);
-static gint
-ea_day_view_main_item_get_row_at_index (EaDayViewMainItem *ea_main_item,
- gint index);
-static gint
-ea_day_view_main_item_get_column_at_index (EaDayViewMainItem *ea_main_item,
- gint index);
-static gint
-ea_day_view_main_item_get_row_label (EaDayViewMainItem *ea_main_item,
- gint row, gchar *buffer,
- gint buffer_size);
-
-#ifdef ACC_DEBUG
-static gint n_ea_day_view_main_item_created = 0;
-static gint n_ea_day_view_main_item_destroyed = 0;
-#endif
-
-static gpointer parent_class = NULL;
-
-GType
-ea_day_view_main_item_get_type (void)
-{
- static GType type = 0;
- AtkObjectFactory *factory;
- GTypeQuery query;
- GType derived_atk_type;
-
- if (!type) {
- static GTypeInfo tinfo = {
- sizeof (EaDayViewMainItemClass),
- (GBaseInitFunc) NULL, /* base init */
- (GBaseFinalizeFunc) NULL, /* base finalize */
- (GClassInitFunc) ea_day_view_main_item_class_init,
- (GClassFinalizeFunc) NULL, /* class finalize */
- NULL, /* class data */
- sizeof (EaDayViewMainItem), /* instance size */
- 0, /* nb preallocs */
- (GInstanceInitFunc) NULL, /* instance init */
- NULL /* value table */
- };
-
- static const GInterfaceInfo atk_component_info = {
- (GInterfaceInitFunc) atk_component_interface_init,
- (GInterfaceFinalizeFunc) NULL,
- NULL
- };
-
- static const GInterfaceInfo atk_table_info = {
- (GInterfaceInitFunc) atk_table_interface_init,
- (GInterfaceFinalizeFunc) NULL,
- NULL
- };
- static const GInterfaceInfo atk_selection_info = {
- (GInterfaceInitFunc) atk_selection_interface_init,
- (GInterfaceFinalizeFunc) NULL,
- NULL
- };
-
-
- /*
- * Figure out the size of the class and instance
- * we are run-time deriving from (GailCanvasItem, in this case)
- *
- */
-
- factory = atk_registry_get_factory (atk_get_default_registry (),
- e_day_view_main_item_get_type());
- derived_atk_type = atk_object_factory_get_accessible_type (factory);
- g_type_query (derived_atk_type, &query);
-
- tinfo.class_size = query.class_size;
- tinfo.instance_size = query.instance_size;
-
- type = g_type_register_static (derived_atk_type,
- "EaDayViewMainItem", &tinfo, 0);
- g_type_add_interface_static (type, ATK_TYPE_COMPONENT,
- &atk_component_info);
- g_type_add_interface_static (type, ATK_TYPE_TABLE,
- &atk_table_info);
- g_type_add_interface_static (type, ATK_TYPE_SELECTION,
- &atk_selection_info);
- }
-
- return type;
-}
-
-static void
-ea_day_view_main_item_class_init (EaDayViewMainItemClass *klass)
-{
- GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
-
- gobject_class->finalize = ea_day_view_main_item_finalize;
- parent_class = g_type_class_peek_parent (klass);
-
- class->get_name = ea_day_view_main_item_get_name;
- class->get_description = ea_day_view_main_item_get_description;
-
- class->get_n_children = ea_day_view_main_item_get_n_children;
- class->ref_child = ea_day_view_main_item_ref_child;
- class->get_parent = ea_day_view_main_item_get_parent;
- class->get_index_in_parent = ea_day_view_main_item_get_index_in_parent;
-}
-
-AtkObject*
-ea_day_view_main_item_new (GObject *obj)
-{
- AtkObject *accessible;
- GnomeCalendar *gcal;
- EDayViewMainItem *main_item;
-
- g_return_val_if_fail (E_IS_DAY_VIEW_MAIN_ITEM (obj), NULL);
-
- accessible = ATK_OBJECT (g_object_new (EA_TYPE_DAY_VIEW_MAIN_ITEM,
- NULL));
-
- atk_object_initialize (accessible, obj);
- accessible->role = ATK_ROLE_TABLE;
-
-#ifdef ACC_DEBUG
- ++n_ea_day_view_main_item_created;
- printf ("ACC_DEBUG: n_ea_day_view_main_item_created = %d\n",
- n_ea_day_view_main_item_created);
-#endif
- main_item = E_DAY_VIEW_MAIN_ITEM (obj);
- g_signal_connect (main_item->day_view, "selected_time_changed",
- G_CALLBACK (ea_day_view_main_item_time_change_cb),
- accessible);
-
- /* listen for date changes of calendar */
- gcal = e_calendar_view_get_calendar (E_CALENDAR_VIEW (main_item->day_view));
- if (gcal)
- g_signal_connect (gcal, "dates_shown_changed",
- G_CALLBACK (ea_day_view_main_item_dates_change_cb),
- accessible);
-
- return accessible;
-}
-
-static void
-ea_day_view_main_item_finalize (GObject *object)
-{
- EaDayViewMainItem *ea_main_item;
-
- g_return_if_fail (EA_IS_DAY_VIEW_MAIN_ITEM (object));
-
- ea_main_item = EA_DAY_VIEW_MAIN_ITEM (object);
-
- /* Free the allocated cell data */
- ea_day_view_main_item_destory_cell_data (ea_main_item);
-
- G_OBJECT_CLASS (parent_class)->finalize (object);
-#ifdef ACC_DEBUG
- ++n_ea_day_view_main_item_destroyed;
- printf ("ACC_DEBUG: n_ea_day_view_main_item_destroyed = %d\n",
- n_ea_day_view_main_item_destroyed);
-#endif
-}
-
-static G_CONST_RETURN gchar*
-ea_day_view_main_item_get_name (AtkObject *accessible)
-{
- AtkObject *parent;
- g_return_val_if_fail (EA_IS_DAY_VIEW_MAIN_ITEM (accessible), NULL);
- parent = atk_object_get_parent (accessible);
- return atk_object_get_name (parent);
-}
-
-static G_CONST_RETURN gchar*
-ea_day_view_main_item_get_description (AtkObject *accessible)
-{
- return "a table to view and select the current time range";
-}
-
-static gint
-ea_day_view_main_item_get_n_children (AtkObject *accessible)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- EDayViewMainItem *main_item;
- EDayView *day_view;
-
- g_return_val_if_fail (EA_IS_DAY_VIEW_MAIN_ITEM (accessible), -1);
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (accessible);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return -1;
-
- main_item = E_DAY_VIEW_MAIN_ITEM (g_obj);
- day_view = main_item->day_view;
-
- return day_view->rows * day_view->days_shown;
-}
-
-static AtkObject *
-ea_day_view_main_item_ref_child (AtkObject *accessible, gint index)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- EDayViewMainItem *main_item;
- EDayView *day_view;
- gint n_children;
- EDayViewCell *cell;
- EaCellTable *cell_data;
- EaDayViewMainItem *ea_main_item;
-
- g_return_val_if_fail (EA_IS_DAY_VIEW_MAIN_ITEM (accessible), NULL);
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (accessible);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return NULL;
-
- main_item = E_DAY_VIEW_MAIN_ITEM (g_obj);
- day_view = main_item->day_view;
-
- n_children = ea_day_view_main_item_get_n_children (accessible);
- if (index < 0 || index >= n_children)
- return NULL;
-
- ea_main_item = EA_DAY_VIEW_MAIN_ITEM (accessible);
- cell_data = ea_day_view_main_item_get_cell_data (ea_main_item);
- if (!cell_data)
- return NULL;
-
- cell = ea_cell_table_get_cell_at_index (cell_data, index);
- if (!cell) {
- gint row, column;
-
- row = ea_day_view_main_item_get_row_at_index (ea_main_item, index);
- column = ea_day_view_main_item_get_column_at_index (ea_main_item, index);
- cell = e_day_view_cell_new (day_view, row, column);
- ea_cell_table_set_cell_at_index (cell_data, index, cell);
- g_object_unref (cell);
- }
- return g_object_ref (atk_gobject_accessible_for_object (G_OBJECT(cell)));
-}
-
-static AtkObject *
-ea_day_view_main_item_get_parent (AtkObject *accessible)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- EDayViewMainItem *main_item;
-
- g_return_val_if_fail (EA_IS_DAY_VIEW_MAIN_ITEM (accessible), NULL);
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (accessible);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return NULL;
-
- main_item = E_DAY_VIEW_MAIN_ITEM (g_obj);
- return gtk_widget_get_accessible (GTK_WIDGET (main_item->day_view));
-}
-
-static gint
-ea_day_view_main_item_get_index_in_parent (AtkObject *accessible)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
-
- g_return_val_if_fail (EA_IS_DAY_VIEW_MAIN_ITEM (accessible), -1);
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (accessible);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return -1;
-
- /* always the first child of ea-day-view */
- return 0;
-}
-
-/* callbacks */
-
-static void
-ea_day_view_main_item_dates_change_cb (GnomeCalendar *gcal, gpointer data)
-{
- EaDayViewMainItem *ea_main_item;
-
- g_return_if_fail (GNOME_IS_CALENDAR (gcal));
- g_return_if_fail (data);
- g_return_if_fail (EA_IS_DAY_VIEW_MAIN_ITEM (data));
-
- ea_main_item = EA_DAY_VIEW_MAIN_ITEM (data);
-
-#ifdef ACC_DEBUG
- printf ("EvoAcc: ea_day_view_main_item update cb\n");
-#endif
-
- ea_day_view_main_item_destory_cell_data (ea_main_item);
-}
-
-static void
-ea_day_view_main_item_time_change_cb (EDayView *day_view, gpointer data)
-{
- EaDayViewMainItem *ea_main_item;
-
- g_return_if_fail (E_IS_DAY_VIEW (day_view));
- g_return_if_fail (data);
- g_return_if_fail (EA_IS_DAY_VIEW_MAIN_ITEM (data));
-
- ea_main_item = EA_DAY_VIEW_MAIN_ITEM (data);
-
-#ifdef ACC_DEBUG
- printf ("EvoAcc: ea_day_view_main_item time changed cb\n");
-#endif
- g_signal_emit_by_name (data, "selection_changed");
-}
-
-/* helpers */
-
-static gint
-ea_day_view_main_item_get_child_index_at (EaDayViewMainItem *ea_main_item,
- gint row, gint column)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- EDayViewMainItem *main_item;
- EDayView *day_view;
-
- g_return_val_if_fail (ea_main_item, -1);
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return -1;
-
- main_item = E_DAY_VIEW_MAIN_ITEM (g_obj);
- day_view = main_item->day_view;
-
- if (row >= 0 && row < day_view->rows &&
- column >= 0 && column < day_view->days_shown)
- return column * day_view->rows + row;
- return -1;
-}
-
-static gint
-ea_day_view_main_item_get_row_at_index (EaDayViewMainItem *ea_main_item,
- gint index)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- EDayViewMainItem *main_item;
- EDayView *day_view;
- gint n_children;
-
- g_return_val_if_fail (ea_main_item, -1);
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return -1;
-
- main_item = E_DAY_VIEW_MAIN_ITEM (g_obj);
- day_view = main_item->day_view;
-
- n_children = ea_day_view_main_item_get_n_children (ATK_OBJECT (ea_main_item));
- if (index >= 0 && index < n_children)
- return index % day_view->rows;
- return -1;
-}
-
-static gint
-ea_day_view_main_item_get_column_at_index (EaDayViewMainItem *ea_main_item,
- gint index)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- EDayViewMainItem *main_item;
- EDayView *day_view;
- gint n_children;
-
- g_return_val_if_fail (ea_main_item, -1);
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return -1;
-
- main_item = E_DAY_VIEW_MAIN_ITEM (g_obj);
- day_view = main_item->day_view;
-
- n_children = ea_day_view_main_item_get_n_children (ATK_OBJECT (ea_main_item));
- if (index >= 0 && index < n_children)
- return index / day_view->rows;
- return -1;
-}
-
-static gint
-ea_day_view_main_item_get_row_label (EaDayViewMainItem *ea_main_item,
- gint row, gchar *buffer, gint buffer_size)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- EDayViewMainItem *main_item;
- EDayView *day_view;
- gchar *suffix;
- gint hour, minute, suffix_width;
-
- g_return_val_if_fail (ea_main_item, 0);
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return 0 ;
-
- main_item = E_DAY_VIEW_MAIN_ITEM (g_obj);
- day_view = main_item->day_view;
-
- hour = day_view->first_hour_shown;
- minute = day_view->first_minute_shown;
- minute += row * day_view->mins_per_row;
- hour = (hour + minute / 60) % 24;
- minute %= 60;
-
- e_day_view_convert_time_to_display (day_view, hour, &hour,
- &suffix, &suffix_width);
- return g_snprintf (buffer, buffer_size, "%i:%02i %s",
- hour, minute, suffix);
-}
-
-static EaCellTable *
-ea_day_view_main_item_get_cell_data (EaDayViewMainItem *ea_main_item)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- EDayViewMainItem *main_item;
- EDayView *day_view;
- EaCellTable *cell_data;
-
- g_return_val_if_fail (ea_main_item, NULL);
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return NULL;
-
- main_item = E_DAY_VIEW_MAIN_ITEM (g_obj);
- day_view = main_item->day_view;
-
- cell_data = g_object_get_data (G_OBJECT(ea_main_item),
- "ea-day-view-cell-table");
- if (!cell_data) {
- cell_data = ea_cell_table_create (day_view->rows,
- day_view->days_shown, TRUE);
- g_object_set_data (G_OBJECT(ea_main_item),
- "ea-day-view-cell-table", cell_data);
- }
- return cell_data;
-}
-
-static void
-ea_day_view_main_item_destory_cell_data (EaDayViewMainItem *ea_main_item)
-{
- EaCellTable *cell_data;
-
- g_return_if_fail (ea_main_item);
-
- cell_data = g_object_get_data (G_OBJECT(ea_main_item),
- "ea-day-view-cell-table");
- if (cell_data) {
- ea_cell_table_destroy (cell_data);
- g_object_set_data (G_OBJECT(ea_main_item),
- "ea-day-view-cell-table", NULL);
- }
-}
-
-/* Atk Component Interface */
-
-static void
-atk_component_interface_init (AtkComponentIface *iface)
-{
- g_return_if_fail (iface != NULL);
-
- iface->get_extents = component_interface_get_extents;
-}
-
-static void
-component_interface_get_extents (AtkComponent *component,
- gint *x, gint *y, gint *width, gint *height,
- AtkCoordType coord_type)
-{
- GObject *g_obj;
- AtkObject *ea_canvas;
- EDayViewMainItem *main_item;
- EDayView *day_view;
-
- *x = *y = *width = *height = 0;
-
- g_return_if_fail (EA_IS_DAY_VIEW_MAIN_ITEM (component));
-
- g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE(component));
- if (!g_obj)
- /* defunct object*/
- return;
- main_item = E_DAY_VIEW_MAIN_ITEM (g_obj);
- day_view = main_item->day_view;
-
- ea_canvas = gtk_widget_get_accessible (day_view->main_canvas);
- atk_component_get_extents (ATK_COMPONENT (ea_canvas), x, y,
- width, height, coord_type);
-}
-
-/* atk table interface */
-
-static void
-atk_table_interface_init (AtkTableIface *iface)
-{
- g_return_if_fail (iface != NULL);
-
- iface->ref_at = table_interface_ref_at;
-
- iface->get_n_rows = table_interface_get_n_rows;
- iface->get_n_columns = table_interface_get_n_columns;
- iface->get_index_at = table_interface_get_index_at;
- iface->get_column_at_index = table_interface_get_column_at_index;
- iface->get_row_at_index = table_interface_get_row_at_index;
- iface->get_column_extent_at = table_interface_get_column_extent_at;
- iface->get_row_extent_at = table_interface_get_row_extent_at;
-
- iface->is_selected = table_interface_is_selected;
- iface->get_selected_rows = table_interface_get_selected_rows;
- iface->get_selected_columns = table_interface_get_selected_columns;
- iface->is_row_selected = table_interface_is_row_selected;
- iface->is_column_selected = table_interface_is_column_selected;
- iface->add_row_selection = table_interface_add_row_selection;
- iface->remove_row_selection = table_interface_remove_row_selection;
- iface->add_column_selection = table_interface_add_column_selection;
- iface->remove_column_selection = table_interface_remove_column_selection;
-
- iface->get_row_header = table_interface_get_row_header;
- iface->get_column_header = table_interface_get_column_header;
- iface->get_caption = table_interface_get_caption;
- iface->get_summary = table_interface_get_summary;
- iface->get_row_description = table_interface_get_row_description;
- iface->get_column_description = table_interface_get_column_description;
-}
-
-static AtkObject*
-table_interface_ref_at (AtkTable *table,
- gint row,
- gint column)
-{
- gint index;
-
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
- index = ea_day_view_main_item_get_child_index_at (ea_main_item,
- row, column);
- return ea_day_view_main_item_ref_child (ATK_OBJECT (ea_main_item), index);
-}
-
-static gint
-table_interface_get_n_rows (AtkTable *table)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- EDayViewMainItem *main_item;
- EDayView *day_view;
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return -1;
-
- main_item = E_DAY_VIEW_MAIN_ITEM (g_obj);
- day_view = main_item->day_view;
-
- return day_view->rows;
-}
-
-static gint
-table_interface_get_n_columns (AtkTable *table)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- EDayViewMainItem *main_item;
- EDayView *day_view;
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return -1;
-
- main_item = E_DAY_VIEW_MAIN_ITEM (g_obj);
- day_view = main_item->day_view;
-
- return day_view->days_shown;
-}
-
-static gint
-table_interface_get_index_at (AtkTable *table,
- gint row,
- gint column)
-{
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
- return ea_day_view_main_item_get_child_index_at (ea_main_item,
- row, column);
-}
-
-static gint
-table_interface_get_column_at_index (AtkTable *table,
- gint index)
-{
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
- return ea_day_view_main_item_get_column_at_index (ea_main_item, index);
-}
-
-static gint
-table_interface_get_row_at_index (AtkTable *table,
- gint index)
-{
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
- return ea_day_view_main_item_get_row_at_index (ea_main_item, index);
-}
-
-static gint
-table_interface_get_column_extent_at (AtkTable *table,
- gint row,
- gint column)
-{
- gint index;
- gint width = 0, height = 0;
- AtkObject *child;
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
-
- index = ea_day_view_main_item_get_child_index_at (ea_main_item,
- row, column);
- child = atk_object_ref_accessible_child (ATK_OBJECT (ea_main_item),
- index);
- if (child)
- atk_component_get_size (ATK_COMPONENT (child),
- &width, &height);
-
- return width;
-}
-
-static gint
-table_interface_get_row_extent_at (AtkTable *table,
- gint row,
- gint column)
-{
- gint index;
- gint width = 0, height = 0;
- AtkObject *child;
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
-
- index = ea_day_view_main_item_get_child_index_at (ea_main_item,
- row, column);
- child = atk_object_ref_accessible_child (ATK_OBJECT (ea_main_item),
- index);
- if (child)
- atk_component_get_size (ATK_COMPONENT (child),
- &width, &height);
-
- return height;
-}
-
-static gboolean
-table_interface_is_row_selected (AtkTable *table,
- gint row)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- EDayViewMainItem *main_item;
- EDayView *day_view;
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return FALSE;
-
- main_item = E_DAY_VIEW_MAIN_ITEM (g_obj);
- day_view = main_item->day_view;
-
- if (day_view->selection_start_day == -1)
- /* no selection */
- return FALSE;
- if (day_view->selection_start_day != day_view->selection_end_day)
- /* all row is selected */
- return TRUE;
- if (row >= day_view->selection_start_row &&
- row <= day_view->selection_end_row)
- return TRUE;
- return FALSE;
-}
-
-static gboolean
-table_interface_is_selected (AtkTable *table,
- gint row,
- gint column)
-{
- return table_interface_is_row_selected (table, row) &&
- table_interface_is_column_selected (table, column);
-}
-
-static gboolean
-table_interface_is_column_selected (AtkTable *table,
- gint column)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- EDayViewMainItem *main_item;
- EDayView *day_view;
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return FALSE;
-
- main_item = E_DAY_VIEW_MAIN_ITEM (g_obj);
- day_view = main_item->day_view;
-
- if (column >= day_view->selection_start_day &&
- column <= day_view->selection_end_day)
- return TRUE;
- return FALSE;
-}
-
-static gint
-table_interface_get_selected_rows (AtkTable *table,
- gint **rows_selected)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- EDayViewMainItem *main_item;
- EDayView *day_view;
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
- gint start_row = -1, n_rows = 0;
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return -1;
-
- main_item = E_DAY_VIEW_MAIN_ITEM (g_obj);
- day_view = main_item->day_view;
-
- if (day_view->selection_start_day == -1)
- return 0;
-
- if (day_view->selection_start_day != day_view->selection_end_day) {
- /* all the rows should be selected */
- n_rows = day_view->rows;
- start_row = 0;
- }
- else if (day_view->selection_start_row != -1) {
- start_row = day_view->selection_start_row;
- n_rows = day_view->selection_end_row - start_row + 1;
- }
- if (n_rows > 0 && start_row != -1 && rows_selected) {
- gint index;
-
- *rows_selected = (gint *) g_malloc (n_rows * sizeof (gint));
- for (index = 0; index < n_rows; ++index)
- (*rows_selected)[index] = start_row + index;
- }
- return n_rows;
-}
-
-static gint
-table_interface_get_selected_columns (AtkTable *table,
- gint **columns_selected)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- EDayViewMainItem *main_item;
- EDayView *day_view;
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
- gint start_column = -1, n_columns = 0;
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return -1;
-
- main_item = E_DAY_VIEW_MAIN_ITEM (g_obj);
- day_view = main_item->day_view;
-
- if (day_view->selection_start_day == -1)
- return 0;
-
- start_column = day_view->selection_start_day;
- n_columns = day_view->selection_end_day - start_column + 1;
- if (n_columns > 0 && start_column != -1 && columns_selected) {
- gint index;
-
- *columns_selected = (gint *) g_malloc (n_columns * sizeof (gint));
- for (index = 0; index < n_columns; ++index)
- (*columns_selected)[index] = start_column + index;
- }
- return n_columns;
-}
-
-static gboolean
-table_interface_add_row_selection (AtkTable *table,
- gint row)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- EDayViewMainItem *main_item;
- EDayView *day_view;
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return FALSE;
-
- main_item = E_DAY_VIEW_MAIN_ITEM (g_obj);
- day_view = main_item->day_view;
-
- /* FIXME: we need multi-selection */
-
- day_view->selection_start_day = 0;
- day_view->selection_end_day = 0;
- day_view->selection_start_row = row;
- day_view->selection_end_row = row;
-
- 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);
- gtk_widget_queue_draw (day_view->main_canvas);
- return TRUE;
-}
-
-static gboolean
-table_interface_remove_row_selection (AtkTable *table,
- gint row)
-{
- return FALSE;
-}
-
-static gboolean
-table_interface_add_column_selection (AtkTable *table,
- gint column)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- EDayViewMainItem *main_item;
- EDayView *day_view;
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return FALSE;
-
- main_item = E_DAY_VIEW_MAIN_ITEM (g_obj);
- day_view = main_item->day_view;
-
- /* FIXME: we need multi-selection */
-
- day_view->selection_start_day = column;
- day_view->selection_end_day = column;
- day_view->selection_start_row = 0;
- day_view->selection_end_row = day_view->rows;
-
- e_day_view_update_calendar_selection_time (day_view);
- gtk_widget_queue_draw (day_view->main_canvas);
- return TRUE;
-}
-
-static gboolean
-table_interface_remove_column_selection (AtkTable *table,
- gint column)
-{
- /* FIXME: NOT IMPLEMENTED */
- return FALSE;
-}
-
-static AtkObject*
-table_interface_get_row_header (AtkTable *table,
- gint row)
-{
- /* FIXME: NOT IMPLEMENTED */
- return NULL;
-}
-
-static AtkObject*
-table_interface_get_column_header (AtkTable *table,
- gint in_col)
-{
- /* FIXME: NOT IMPLEMENTED */
- return NULL;
-}
-
-static AtkObject*
-table_interface_get_caption (AtkTable *table)
-{
- /* FIXME: NOT IMPLEMENTED */
- return NULL;
-}
-
-static G_CONST_RETURN gchar*
-table_interface_get_column_description (AtkTable *table,
- gint in_col)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- EDayViewMainItem *main_item;
- EDayView *day_view;
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
- const gchar *description;
- EaCellTable *cell_data;
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return NULL;
-
- main_item = E_DAY_VIEW_MAIN_ITEM (g_obj);
- day_view = main_item->day_view;
-
- if (in_col < 0 || in_col >= day_view->days_shown)
- return NULL;
- cell_data = ea_day_view_main_item_get_cell_data (ea_main_item);
- if (!cell_data)
- return NULL;
-
- description = ea_cell_table_get_column_label (cell_data, in_col);
- if (!description) {
- gchar buffer[128];
- e_day_view_top_item_get_day_label (day_view, in_col, buffer, 128);
- ea_cell_table_set_column_label (cell_data, in_col, buffer);
- description = ea_cell_table_get_column_label (cell_data, in_col);
- }
- return description;
-}
-
-static G_CONST_RETURN gchar*
-table_interface_get_row_description (AtkTable *table,
- gint row)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- EDayViewMainItem *main_item;
- EDayView *day_view;
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
- const gchar *description;
- EaCellTable *cell_data;
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return NULL;
-
- main_item = E_DAY_VIEW_MAIN_ITEM (g_obj);
- day_view = main_item->day_view;
-
- if (row < 0 || row >= 12 * 24)
- return NULL;
- cell_data = ea_day_view_main_item_get_cell_data (ea_main_item);
- if (!cell_data)
- return NULL;
-
- description = ea_cell_table_get_row_label (cell_data, row);
- if (!description) {
- gchar buffer[128];
- ea_day_view_main_item_get_row_label (ea_main_item, row, buffer, sizeof (buffer));
- ea_cell_table_set_row_label (cell_data, row, buffer);
- description = ea_cell_table_get_row_label (cell_data,
- row);
- }
- return description;
-}
-
-static AtkObject*
-table_interface_get_summary (AtkTable *table)
-{
- /* FIXME: NOT IMPLEMENTED */
- return NULL;
-}
-
-/* atkselection interface */
-
-static void
-atk_selection_interface_init (AtkSelectionIface *iface)
-{
- g_return_if_fail (iface != NULL);
-
- iface->add_selection = selection_interface_add_selection;
- iface->clear_selection = selection_interface_clear_selection;
- iface->ref_selection = selection_interface_ref_selection;
- iface->get_selection_count = selection_interface_get_selection_count;
- iface->is_child_selected = selection_interface_is_child_selected;
-}
-
-static gboolean
-selection_interface_add_selection (AtkSelection *selection, gint i)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- EDayViewMainItem *main_item;
- EDayView *day_view;
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (selection);
- gint column, row;
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return FALSE;
-
- main_item = E_DAY_VIEW_MAIN_ITEM (g_obj);
- day_view = main_item->day_view;
-
- row = ea_day_view_main_item_get_row_at_index (ea_main_item, i);
- column = ea_day_view_main_item_get_column_at_index (ea_main_item, i);
-
- if (row == -1 || column == -1)
- return FALSE;
-
- /*FIXME: multi-selection is needed */
- day_view->selection_start_day = column;
- day_view->selection_end_day = column;
- day_view->selection_start_row = row;
- day_view->selection_end_row = row;
-
- 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);
- gtk_widget_queue_draw (day_view->main_canvas);
- return TRUE;
-}
-
-static gboolean
-selection_interface_clear_selection (AtkSelection *selection)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- EDayViewMainItem *main_item;
- EDayView *day_view;
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (selection);
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return FALSE;
-
- main_item = E_DAY_VIEW_MAIN_ITEM (g_obj);
- day_view = main_item->day_view;
-
- day_view->selection_start_row = -1;
- day_view->selection_start_day = -1;
- day_view->selection_end_row = -1;
- day_view->selection_end_day = -1;
-
- e_day_view_update_calendar_selection_time (day_view);
- gtk_widget_queue_draw (day_view->main_canvas);
-
- return TRUE;
-}
-
-static AtkObject*
-selection_interface_ref_selection (AtkSelection *selection, gint i)
-{
- if (selection_interface_is_child_selected (selection, i))
- return ea_day_view_main_item_ref_child (ATK_OBJECT (selection), i);
- return NULL;
-}
-
-static gint
-selection_interface_get_selection_count (AtkSelection *selection)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- EDayViewMainItem *main_item;
- EDayView *day_view;
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (selection);
- gint start_index, end_index;
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return 0;
-
- main_item = E_DAY_VIEW_MAIN_ITEM (g_obj);
- day_view = main_item->day_view;
-
- if (day_view->selection_start_day == -1 ||
- day_view->selection_start_row == -1)
- return 0;
- start_index = ea_day_view_main_item_get_child_index_at (ea_main_item,
- day_view->selection_start_row,
- day_view->selection_start_day);
- end_index = ea_day_view_main_item_get_child_index_at (ea_main_item,
- day_view->selection_end_row,
- day_view->selection_end_day);
-
- return end_index - start_index + 1;
-}
-
-static gboolean
-selection_interface_is_child_selected (AtkSelection *selection, gint i)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- EDayViewMainItem *main_item;
- EDayView *day_view;
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (selection);
- gint column, row;
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return FALSE;
-
- main_item = E_DAY_VIEW_MAIN_ITEM (g_obj);
- day_view = main_item->day_view;
-
- row = ea_day_view_main_item_get_row_at_index (ea_main_item, i);
- column = ea_day_view_main_item_get_column_at_index (ea_main_item, i);
-
- if (column < day_view->selection_start_day ||
- column > day_view->selection_end_day)
- return FALSE;
-
- if ((column == day_view->selection_start_day ||
- column == day_view->selection_end_day) &&
- (row < day_view->selection_start_row ||
- row > day_view->selection_end_row))
- return FALSE;
-
- /* if comes here, the cell is selected */
- return TRUE;
-}
diff --git a/a11y/calendar/ea-day-view-main-item.h b/a11y/calendar/ea-day-view-main-item.h
deleted file mode 100644
index d22372d064..0000000000
--- a/a11y/calendar/ea-day-view-main-item.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-day-view-main-item.h
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-#ifndef __EA_DAY_VIEW_MAIN_ITEM_H__
-#define __EA_DAY_VIEW_MAIN_ITEM_H__
-
-#include <atk/atkgobjectaccessible.h>
-#include "e-day-view-main-item.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#define EA_TYPE_DAY_VIEW_MAIN_ITEM (ea_day_view_main_item_get_type ())
-#define EA_DAY_VIEW_MAIN_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EA_TYPE_DAY_VIEW_MAIN_ITEM, EaDayViewMainItem))
-#define EA_DAY_VIEW_MAIN_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EA_TYPE_DAY_VIEW_MAIN_ITEM, EaDayViewMainItemClass))
-#define EA_IS_DAY_VIEW_MAIN_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EA_TYPE_DAY_VIEW_MAIN_ITEM))
-#define EA_IS_DAY_VIEW_MAIN_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EA_TYPE_DAY_VIEW_MAIN_ITEM))
-#define EA_DAY_VIEW_MAIN_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EA_TYPE_DAY_VIEW_MAIN_ITEM, EaDayViewMainItemClass))
-
-typedef struct _EaDayViewMainItem EaDayViewMainItem;
-typedef struct _EaDayViewMainItemClass EaDayViewMainItemClass;
-
-struct _EaDayViewMainItem
-{
- AtkGObjectAccessible parent;
-};
-
-GType ea_day_view_main_item_get_type (void);
-
-struct _EaDayViewMainItemClass
-{
- AtkGObjectAccessibleClass parent_class;
-};
-
-AtkObject* ea_day_view_main_item_new (GObject *obj);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __EA_DAY_VIEW_MAIN_ITEM_H__ */
diff --git a/a11y/calendar/ea-day-view.c b/a11y/calendar/ea-day-view.c
deleted file mode 100644
index f91583da24..0000000000
--- a/a11y/calendar/ea-day-view.c
+++ /dev/null
@@ -1,261 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-day-view.c
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-#include "ea-day-view.h"
-#include "ea-cal-view-event.h"
-
-#include "ea-calendar-helpers.h"
-#include "calendar-commands.h"
-#include <glib/gstrfuncs.h>
-
-static void ea_day_view_class_init (EaDayViewClass *klass);
-
-static G_CONST_RETURN gchar* ea_day_view_get_name (AtkObject *accessible);
-static G_CONST_RETURN gchar* ea_day_view_get_description (AtkObject *accessible);
-static gint ea_day_view_get_n_children (AtkObject *obj);
-static AtkObject* ea_day_view_ref_child (AtkObject *obj,
- gint i);
-static gpointer parent_class = NULL;
-
-GType
-ea_day_view_get_type (void)
-{
- static GType type = 0;
- AtkObjectFactory *factory;
- GTypeQuery query;
- GType derived_atk_type;
-
- if (!type) {
- static GTypeInfo tinfo = {
- sizeof (EaDayViewClass),
- (GBaseInitFunc) NULL, /* base init */
- (GBaseFinalizeFunc) NULL, /* base finalize */
- (GClassInitFunc) ea_day_view_class_init, /* class init */
- (GClassFinalizeFunc) NULL, /* class finalize */
- NULL, /* class data */
- sizeof (EaDayView), /* instance size */
- 0, /* nb preallocs */
- (GInstanceInitFunc) NULL, /* instance init */
- NULL /* value table */
- };
-
- /*
- * Figure out the size of the class and instance
- * we are run-time deriving from (EaCalView, in this case)
- *
- * Note: we must still use run-time deriving here, because
- * our parent class EaCalView is run-time deriving.
- */
-
- factory = atk_registry_get_factory (atk_get_default_registry (),
- e_cal_view_get_type());
- derived_atk_type = atk_object_factory_get_accessible_type (factory);
- g_type_query (derived_atk_type, &query);
-
- tinfo.class_size = query.class_size;
- tinfo.instance_size = query.instance_size;
-
- type = g_type_register_static (derived_atk_type,
- "EaDayView", &tinfo, 0);
- }
-
- return type;
-}
-
-static void
-ea_day_view_class_init (EaDayViewClass *klass)
-{
- AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_peek_parent (klass);
-
- class->get_name = ea_day_view_get_name;
- class->get_description = ea_day_view_get_description;
-
- class->get_n_children = ea_day_view_get_n_children;
- class->ref_child = ea_day_view_ref_child;
-}
-
-AtkObject*
-ea_day_view_new (GtkWidget *widget)
-{
- GObject *object;
- AtkObject *accessible;
-
- g_return_val_if_fail (E_IS_DAY_VIEW (widget), NULL);
-
- object = g_object_new (EA_TYPE_DAY_VIEW, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
-
-#ifdef ACC_DEBUG
- printf ("EvoAcc: ea_day_view created %p\n", (void *)accessible);
-#endif
-
- return accessible;
-}
-
-static G_CONST_RETURN gchar*
-ea_day_view_get_name (AtkObject *accessible)
-{
- EDayView *day_view;
- GnomeCalendar *gcal;
- const gchar *label_text;
- GnomeCalendarViewType view_type;
- gchar buffer[128] = "";
- gint n_events;
-
-
- g_return_val_if_fail (EA_IS_DAY_VIEW (accessible), NULL);
-
- if (!GTK_ACCESSIBLE (accessible)->widget)
- return NULL;
- day_view = E_DAY_VIEW (GTK_ACCESSIBLE (accessible)->widget);
-
- gcal = e_calendar_view_get_calendar (E_CALENDAR_VIEW (day_view));
- label_text = calendar_get_text_for_folder_bar_label (gcal);
-
- n_events = atk_object_get_n_accessible_children (accessible);
- /* the child main item is always there */
- --n_events;
- if (n_events > 0)
- g_snprintf (buffer, sizeof (buffer),
- ", %d events", n_events);
- view_type = gnome_calendar_get_view (gcal);
- if (view_type == GNOME_CAL_WORK_WEEK_VIEW)
- accessible->name = g_strconcat ("work week view :",
- label_text, buffer,
- NULL);
- else
- accessible->name = g_strconcat ("day view :",
- label_text, buffer,
- NULL);
- return accessible->name;
-}
-
-static G_CONST_RETURN gchar*
-ea_day_view_get_description (AtkObject *accessible)
-{
- EDayView *day_view;
-
- g_return_val_if_fail (EA_IS_DAY_VIEW (accessible), NULL);
-
- if (!GTK_ACCESSIBLE (accessible)->widget)
- return NULL;
- day_view = E_DAY_VIEW (GTK_ACCESSIBLE (accessible)->widget);
-
- if (accessible->description)
- return accessible->description;
- else {
- GnomeCalendar *gcal;
- GnomeCalendarViewType view_type;
-
- gcal = e_calendar_view_get_calendar (E_CALENDAR_VIEW (day_view));
- view_type = gnome_calendar_get_view (gcal);
-
- if (view_type == GNOME_CAL_WORK_WEEK_VIEW)
- return "calendar view for a work week";
- else
- return "calendar view for one or more days";
- }
-}
-
-static gint
-ea_day_view_get_n_children (AtkObject *accessible)
-{
- EDayView *day_view;
- gint day;
- gint child_num = 0;
-
- g_return_val_if_fail (EA_IS_DAY_VIEW (accessible), -1);
-
- if (!GTK_ACCESSIBLE (accessible)->widget)
- return -1;
-
- day_view = E_DAY_VIEW (GTK_ACCESSIBLE (accessible)->widget);
-
- child_num += day_view->long_events->len;
-
- for (day = 0; day < day_view->days_shown; day++) {
- child_num += day_view->events[day]->len;
- }
-
- /* "+1" for the main item */
- return child_num + 1;
-}
-
-static AtkObject *
-ea_day_view_ref_child (AtkObject *accessible, gint index)
-{
- EDayView *day_view;
- gint child_num;
- gint day;
- AtkObject *atk_object = NULL;
- EDayViewEvent *event = NULL;
-
- g_return_val_if_fail (EA_IS_DAY_VIEW (accessible), NULL);
-
- child_num = atk_object_get_n_accessible_children (accessible);
- if (child_num <= 0 || index < 0 || index >= child_num)
- return NULL;
-
- if (!GTK_ACCESSIBLE (accessible)->widget)
- return NULL;
- day_view = E_DAY_VIEW (GTK_ACCESSIBLE (accessible)->widget);
-
- if (index == 0) {
- /* index == 0 is the main item */
- atk_object = atk_gobject_accessible_for_object (G_OBJECT (day_view->main_canvas_item));
- g_object_ref (atk_object);
- }
- else {
- --index;
- /* a long event */
- if (index < day_view->long_events->len) {
- event = &g_array_index (day_view->long_events,
- EDayViewEvent, index);
- }
- else {
- index -= day_view->long_events->len;
- day = 0;
- while (index >= day_view->events[day]->len) {
- index -= day_view->events[day]->len;
- ++day;
- }
-
- event = &g_array_index (day_view->events[day],
- EDayViewEvent, index);
- }
- if (event && event->canvas_item) {
- /* Not use atk_gobject_accessible_for_object here,
- * we need to do special thing here
- */
- atk_object = ea_calendar_helpers_get_accessible_for (event->canvas_item);
- g_object_ref (atk_object);
- }
- }
- return atk_object;
-}
diff --git a/a11y/calendar/ea-day-view.h b/a11y/calendar/ea-day-view.h
deleted file mode 100644
index 5ca4614f03..0000000000
--- a/a11y/calendar/ea-day-view.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-day-view.h
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-#ifndef __EA_DAY_VIEW_H__
-#define __EA_DAY_VIEW_H__
-
-#include "ea-cal-view.h"
-#include "e-day-view.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#define EA_TYPE_DAY_VIEW (ea_day_view_get_type ())
-#define EA_DAY_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EA_TYPE_DAY_VIEW, EaDayView))
-#define EA_DAY_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EA_TYPE_DAY_VIEW, EaDayViewClass))
-#define EA_IS_DAY_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EA_TYPE_DAY_VIEW))
-#define EA_IS_DAY_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EA_TYPE_DAY_VIEW))
-#define EA_DAY_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EA_TYPE_DAY_VIEW, EaDayViewClass))
-
-typedef struct _EaDayView EaDayView;
-typedef struct _EaDayViewClass EaDayViewClass;
-
-struct _EaDayView
-{
- EaCalView parent;
-};
-
-GType ea_day_view_get_type (void);
-
-struct _EaDayViewClass
-{
- EaCalViewClass parent_class;
-};
-
-AtkObject* ea_day_view_new (GtkWidget *widget);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __EA_DAY_VIEW_H__ */
diff --git a/a11y/calendar/ea-gnome-calendar.c b/a11y/calendar/ea-gnome-calendar.c
deleted file mode 100644
index 9d057ee31a..0000000000
--- a/a11y/calendar/ea-gnome-calendar.c
+++ /dev/null
@@ -1,248 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-gnome-calendar.c
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-#include "ea-gnome-calendar.h"
-#include "calendar-commands.h"
-#include <gtk/gtknotebook.h>
-
-static void ea_gnome_calendar_class_init (EaGnomeCalendarClass *klass);
-
-static G_CONST_RETURN gchar* ea_gnome_calendar_get_name (AtkObject *accessible);
-static G_CONST_RETURN gchar* ea_gnome_calendar_get_description (AtkObject *accessible);
-static gint ea_gnome_calendar_get_n_children (AtkObject* obj);
-static AtkObject * ea_gnome_calendar_ref_child (AtkObject *obj, gint i);
-
-static void ea_gcal_switch_view_cb (GtkNotebook *widget, GtkNotebookPage *page,
- guint index, gpointer data);
-static void ea_gcal_dates_change_cb (GnomeCalendar *gcal, gpointer data);
-
-static gpointer parent_class = NULL;
-
-GType
-ea_gnome_calendar_get_type (void)
-{
- static GType type = 0;
- AtkObjectFactory *factory;
- GTypeQuery query;
- GType derived_atk_type;
-
- if (!type) {
- static GTypeInfo tinfo = {
- sizeof (EaGnomeCalendarClass),
- (GBaseInitFunc) NULL, /* base init */
- (GBaseFinalizeFunc) NULL, /* base finalize */
- (GClassInitFunc) ea_gnome_calendar_class_init, /* class init */
- (GClassFinalizeFunc) NULL, /* class finalize */
- NULL, /* class data */
- sizeof (EaGnomeCalendar), /* instance size */
- 0, /* nb preallocs */
- (GInstanceInitFunc) NULL, /* instance init */
- NULL /* value table */
- };
-
- /*
- * Figure out the size of the class and instance
- * we are run-time deriving from (GailWidget, in this case)
- */
-
- factory = atk_registry_get_factory (atk_get_default_registry (),
- GTK_TYPE_WIDGET);
- derived_atk_type = atk_object_factory_get_accessible_type (factory);
- g_type_query (derived_atk_type, &query);
- tinfo.class_size = query.class_size;
- tinfo.instance_size = query.instance_size;
-
- type = g_type_register_static (derived_atk_type,
- "EaGnomeCalendar", &tinfo, 0);
-
- }
-
- return type;
-}
-
-static void
-ea_gnome_calendar_class_init (EaGnomeCalendarClass *klass)
-{
- AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_peek_parent (klass);
-
- class->get_name = ea_gnome_calendar_get_name;
- class->get_description = ea_gnome_calendar_get_description;
-
- class->get_n_children = ea_gnome_calendar_get_n_children;
- class->ref_child = ea_gnome_calendar_ref_child;
-}
-
-AtkObject*
-ea_gnome_calendar_new (GtkWidget *widget)
-{
- GObject *object;
- AtkObject *accessible;
- GnomeCalendar *gcal;
- GtkWidget *notebook;
-
- g_return_val_if_fail (GNOME_IS_CALENDAR (widget), NULL);
-
- object = g_object_new (EA_TYPE_GNOME_CALENDAR, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
-
- accessible->role = ATK_ROLE_FILLER;
-
- gcal = GNOME_CALENDAR (widget);
-
- /* listen on view type change
- */
- g_signal_connect (widget, "dates_shown_changed",
- G_CALLBACK (ea_gcal_dates_change_cb),
- accessible);
- notebook = gnome_calendar_get_view_notebook_widget (gcal);
- if (notebook) {
- g_signal_connect (notebook, "switch_page",
- G_CALLBACK (ea_gcal_switch_view_cb),
- accessible);
- }
-
-#ifdef ACC_DEBUG
- printf ("EvoAcc: ea-gnome-calendar created: %p\n", (void *)accessible);
-#endif
-
- return accessible;
-}
-
-static G_CONST_RETURN gchar*
-ea_gnome_calendar_get_name (AtkObject *accessible)
-{
- if (accessible->name)
- return accessible->name;
- return "Gnome Calendar";
-}
-
-static G_CONST_RETURN gchar*
-ea_gnome_calendar_get_description (AtkObject *accessible)
-{
- if (accessible->description)
- return accessible->description;
- return "Gnome Calendar";
-}
-
-static gint
-ea_gnome_calendar_get_n_children (AtkObject* obj)
-{
- g_return_val_if_fail (EA_IS_GNOME_CALENDAR (obj), 0);
-
- if (!GTK_ACCESSIBLE (obj)->widget)
- return -1;
- return 4;
-}
-
-static AtkObject *
-ea_gnome_calendar_ref_child (AtkObject *obj, gint i)
-{
- AtkObject * child = NULL;
- GnomeCalendar * calendarWidget;
- GtkWidget *childWidget;
-
- g_return_val_if_fail (EA_IS_GNOME_CALENDAR (obj), NULL);
- /* valid child index range is [0-3] */
- if (i < 0 || i >3 )
- return NULL;
-
- if (!GTK_ACCESSIBLE (obj)->widget)
- return NULL;
- calendarWidget = GNOME_CALENDAR (GTK_ACCESSIBLE (obj)->widget);
-
- switch (i) {
- case 0:
- /* for the search bar */
- childWidget = gnome_calendar_get_search_bar_widget (calendarWidget);
- child = gtk_widget_get_accessible (childWidget);
- atk_object_set_parent (child, obj);
- atk_object_set_name (child, "search bar");
- atk_object_set_description (child, "evolution calendar search bar");
- break;
- case 1:
- /* for the day/week view */
- childWidget = gnome_calendar_get_current_view_widget (calendarWidget);
- child = gtk_widget_get_accessible (childWidget);
- atk_object_set_parent (child, obj);
- break;
- case 2:
- /* for calendar */
- childWidget = gnome_calendar_get_e_calendar_widget (calendarWidget);
- child = gtk_widget_get_accessible (childWidget);
- break;
- case 3:
- /* for todo list */
- childWidget = GTK_WIDGET (gnome_calendar_get_task_pad (calendarWidget));
- child = gtk_widget_get_accessible (childWidget);
- break;
- default:
- break;
- }
- if (child)
- g_object_ref(child);
- return child;
-}
-
-static void
-ea_gcal_switch_view_cb (GtkNotebook *widget, GtkNotebookPage *page,
- guint index, gpointer data)
-{
- GtkWidget *new_widget;
-
- new_widget = gtk_notebook_get_nth_page (widget, index);
-
- /* views are always the second child in gnome calendar
- */
- if (new_widget)
- g_signal_emit_by_name (G_OBJECT(data), "children_changed::add",
- 1, gtk_widget_get_accessible (new_widget), NULL);
-
-#ifdef ACC_DEBUG
- printf ("AccDebug: view switch to widget %p (index=%d) \n",
- (void *)new_widget, index);
-#endif
-}
-
-static void
-ea_gcal_dates_change_cb (GnomeCalendar *gcal, gpointer data)
-{
- const gchar *new_name;
-
- g_return_if_fail (GNOME_IS_CALENDAR (gcal));
- g_return_if_fail (data);
- g_return_if_fail (EA_IS_GNOME_CALENDAR (data));
-
- new_name = calendar_get_text_for_folder_bar_label (gcal);
- atk_object_set_name (ATK_OBJECT(data), new_name);
- g_signal_emit_by_name (data, "visible_data_changed");
-
-#ifdef ACC_DEBUG
- printf ("AccDebug: calendar dates changed, label=%s\n", new_name);
-#endif
-}
diff --git a/a11y/calendar/ea-gnome-calendar.h b/a11y/calendar/ea-gnome-calendar.h
deleted file mode 100644
index 2cb39219c4..0000000000
--- a/a11y/calendar/ea-gnome-calendar.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-gnome-calendar.h
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-#ifndef __EA_GNOME_CALENDAR_H__
-#define __EA_GNOME_CALENDAR_H__
-
-#include <gtk/gtkaccessible.h>
-#include "gnome-cal.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#define EA_TYPE_GNOME_CALENDAR (ea_gnome_calendar_get_type ())
-#define EA_GNOME_CALENDAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EA_TYPE_GNOME_CALENDAR, EaGnomeCalendar))
-#define EA_GNOME_CALENDAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EA_TYPE_GNOME_CALENDAR, EaGnomeCalendarClass))
-#define EA_IS_GNOME_CALENDAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EA_TYPE_GNOME_CALENDAR))
-#define EA_IS_GNOME_CALENDAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EA_TYPE_GNOME_CALENDAR))
-#define EA_GNOME_CALENDAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EA_TYPE_GNOME_CALENDAR, EaGnomeCalendarClass))
-
-typedef struct _EaGnomeCalendar EaGnomeCalendar;
-typedef struct _EaGnomeCalendarClass EaGnomeCalendarClass;
-
-struct _EaGnomeCalendar
-{
- GtkAccessible parent;
-};
-
-GType ea_gnome_calendar_get_type (void);
-
-struct _EaGnomeCalendarClass
-{
- GtkAccessibleClass parent_class;
-};
-
-AtkObject* ea_gnome_calendar_new (GtkWidget *widget);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* __EA_GNOME_CALENDAR_H__ */
diff --git a/a11y/calendar/ea-week-view.c b/a11y/calendar/ea-week-view.c
deleted file mode 100644
index 3c3e13a268..0000000000
--- a/a11y/calendar/ea-week-view.c
+++ /dev/null
@@ -1,305 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-week-view.c
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-#include "ea-week-view.h"
-#include "ea-cal-view.h"
-#include "ea-cal-view-event.h"
-#include "ea-calendar-helpers.h"
-#include "calendar-commands.h"
-#include <gal/e-text/e-text.h>
-
-static void ea_week_view_class_init (EaWeekViewClass *klass);
-
-static G_CONST_RETURN gchar* ea_week_view_get_name (AtkObject *accessible);
-static G_CONST_RETURN gchar* ea_week_view_get_description (AtkObject *accessible);
-static gint ea_week_view_get_n_children (AtkObject *obj);
-static AtkObject* ea_week_view_ref_child (AtkObject *obj,
- gint i);
-
-static gpointer parent_class = NULL;
-
-GType
-ea_week_view_get_type (void)
-{
- static GType type = 0;
- AtkObjectFactory *factory;
- GTypeQuery query;
- GType derived_atk_type;
-
- if (!type) {
- static GTypeInfo tinfo = {
- sizeof (EaWeekViewClass),
- (GBaseInitFunc) NULL, /* base init */
- (GBaseFinalizeFunc) NULL, /* base finalize */
- (GClassInitFunc) ea_week_view_class_init, /* class init */
- (GClassFinalizeFunc) NULL, /* class finalize */
- NULL, /* class data */
- sizeof (EaWeekView), /* instance size */
- 0, /* nb preallocs */
- (GInstanceInitFunc) NULL, /* instance init */
- NULL /* value table */
- };
-
- /*
- * Figure out the size of the class and instance
- * we are run-time deriving from (EaCalView, in this case)
- *
- * Note: we must still use run-time deriving here, because
- * our parent class EaCalView is run-time deriving.
- */
-
- factory = atk_registry_get_factory (atk_get_default_registry (),
- e_cal_view_get_type());
- derived_atk_type = atk_object_factory_get_accessible_type (factory);
- g_type_query (derived_atk_type, &query);
-
- tinfo.class_size = query.class_size;
- tinfo.instance_size = query.instance_size;
-
- type = g_type_register_static (derived_atk_type,
- "EaWeekView", &tinfo, 0);
-
- }
-
- return type;
-}
-
-static void
-ea_week_view_class_init (EaWeekViewClass *klass)
-{
- AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_peek_parent (klass);
-
- class->get_name = ea_week_view_get_name;
- class->get_description = ea_week_view_get_description;
-
- class->get_n_children = ea_week_view_get_n_children;
- class->ref_child = ea_week_view_ref_child;
-}
-
-AtkObject*
-ea_week_view_new (GtkWidget *widget)
-{
- GObject *object;
- AtkObject *accessible;
-
- g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
-
- object = g_object_new (EA_TYPE_WEEK_VIEW, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
-
-#ifdef ACC_DEBUG
- printf ("EvoAcc: ea_week_view created %p\n", (void *)accessible);
-#endif
-
- return accessible;
-}
-
-static G_CONST_RETURN gchar*
-ea_week_view_get_name (AtkObject *accessible)
-{
- EWeekView *week_view;
- GnomeCalendar *gcal;
- const gchar *label_text;
- GnomeCalendarViewType view_type;
- gchar buffer[128] = "";
- gint n_events;
-
- g_return_val_if_fail (EA_IS_WEEK_VIEW (accessible), NULL);
-
- if (!GTK_ACCESSIBLE (accessible)->widget)
- return NULL;
- week_view = E_WEEK_VIEW (GTK_ACCESSIBLE (accessible)->widget);
-
- gcal = e_calendar_view_get_calendar (E_CALENDAR_VIEW (week_view));
- label_text = calendar_get_text_for_folder_bar_label (gcal);
-
- n_events = atk_object_get_n_accessible_children (accessible);
- /* the child main item is always there */
- --n_events;
- if (n_events > 0)
- g_snprintf (buffer, sizeof (buffer),
- ", %d events", n_events);
-
- view_type = gnome_calendar_get_view (gcal);
-
- if (view_type == GNOME_CAL_MONTH_VIEW)
- accessible->name = g_strconcat ("month view :",
- label_text, buffer,
- NULL);
-
- else
- accessible->name = g_strconcat ("week view :",
- label_text, buffer,
- NULL);
- return accessible->name;
-}
-
-static G_CONST_RETURN gchar*
-ea_week_view_get_description (AtkObject *accessible)
-{
- EWeekView *week_view;
-
- g_return_val_if_fail (EA_IS_WEEK_VIEW (accessible), NULL);
-
- if (!GTK_ACCESSIBLE (accessible)->widget)
- return NULL;
- week_view = E_WEEK_VIEW (GTK_ACCESSIBLE (accessible)->widget);
-
- if (accessible->description)
- return accessible->description;
- else {
- GnomeCalendar *gcal;
- GnomeCalendarViewType view_type;
-
- gcal = e_calendar_view_get_calendar (E_CALENDAR_VIEW (week_view));
- view_type = gnome_calendar_get_view (gcal);
-
- if (view_type == GNOME_CAL_MONTH_VIEW)
- return "calendar view for a month";
- else
- return "calendar view for one or more weeks";
- }
-}
-
-static gint
-ea_week_view_get_n_children (AtkObject *accessible)
-{
- EWeekView *week_view;
- GnomeCanvasGroup *canvas_group;
- gint i, count = 0;
- gint event_index;
-
- g_return_val_if_fail (EA_IS_WEEK_VIEW (accessible), -1);
-
- if (!GTK_ACCESSIBLE (accessible)->widget)
- return -1;
- week_view = E_WEEK_VIEW (GTK_ACCESSIBLE (accessible)->widget);
-
- for (event_index = 0; event_index < week_view->events->len;
- ++event_index) {
- EWeekViewEvent *event;
- EWeekViewEventSpan *span;
-
- event = &g_array_index (week_view->events,
- EWeekViewEvent, event_index);
- if (!event)
- continue;
- span = &g_array_index (week_view->spans, EWeekViewEventSpan,
- event->spans_index + 0);
-
- if (!span)
- continue;
-
- /* at least one of the event spans is visible, count it */
- if (span->text_item)
- ++count;
- }
-
- /* add the number of visible jump buttons */
- for (i = 0; i < E_WEEK_VIEW_MAX_WEEKS * 7; i++) {
- if (week_view->jump_buttons[i]->object.flags & GNOME_CANVAS_ITEM_VISIBLE)
- ++count;
- }
-
-#ifdef ACC_DEBUG
- printf("AccDebug: week view %p has %d children\n", (void *)week_view, count);
-#endif
- return count;
-}
-
-static AtkObject *
-ea_week_view_ref_child (AtkObject *accessible, gint index)
-{
- EWeekView *week_view;
- gint child_num, max_count;
- AtkObject *atk_object = NULL;
- gint event_index;
- gint jump_button = -1;
- gint span_num = 0;
- gint count = 0;
-
- g_return_val_if_fail (EA_IS_WEEK_VIEW (accessible), NULL);
-
- child_num = atk_object_get_n_accessible_children (accessible);
- if (child_num <= 0 || index < 0 || index >= child_num)
- return NULL;
-
- if (!GTK_ACCESSIBLE (accessible)->widget)
- return NULL;
- week_view = E_WEEK_VIEW (GTK_ACCESSIBLE (accessible)->widget);
- max_count = week_view->events->len;
-
- for (event_index = 0; event_index < max_count; ++event_index) {
- EWeekViewEvent *event;
- EWeekViewEventSpan *span;
- gint current_day;
-
- event = &g_array_index (week_view->events,
- EWeekViewEvent, event_index);
- if (!event)
- continue;
-
- span = &g_array_index (week_view->spans, EWeekViewEventSpan,
- event->spans_index + span_num);
-
- if (!span)
- continue;
-
- current_day = span->start_day;
- if (span->text_item)
- ++count;
- else if (current_day != jump_button) {
- /* we should go to the jump button */
- jump_button = current_day;
- ++count;
- }
- else
- continue;
-
- if (count == (index + 1)) {
- if (span->text_item) {
- /* Not use atk_gobject_accessible_for_object for event
- * text_item we need to do special thing here
- */
- atk_object = ea_calendar_helpers_get_accessible_for (span->text_item);
- }
- else {
- atk_object = atk_gobject_accessible_for_object (G_OBJECT(week_view->jump_buttons[current_day == -1 ? 0 : current_day]));
- }
- g_object_ref (atk_object);
- break;
- }
- }
-
-#ifdef ACC_DEBUG
- printf ("EvoAcc: ea_week_view_ref_child [%d]=%p\n",
- index, (void *)atk_object);
-#endif
- return atk_object;
-}
diff --git a/a11y/calendar/ea-week-view.h b/a11y/calendar/ea-week-view.h
deleted file mode 100644
index f0ed117375..0000000000
--- a/a11y/calendar/ea-week-view.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-week-view.h
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-#ifndef __EA_WEEK_VIEW_H__
-#define __EA_WEEK_VIEW_H__
-
-#include <gtk/gtkaccessible.h>
-#include "e-week-view.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#define EA_TYPE_WEEK_VIEW (ea_week_view_get_type ())
-#define EA_WEEK_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EA_TYPE_WEEK_VIEW, EaWeekView))
-#define EA_WEEK_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EA_TYPE_WEEK_VIEW, EaWeekViewClass))
-#define EA_IS_WEEK_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EA_TYPE_WEEK_VIEW))
-#define EA_IS_WEEK_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EA_TYPE_WEEK_VIEW))
-#define EA_WEEK_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EA_TYPE_WEEK_VIEW, EaWeekViewClass))
-
-typedef struct _EaWeekView EaWeekView;
-typedef struct _EaWeekViewClass EaWeekViewClass;
-
-struct _EaWeekView
-{
- GtkAccessible parent;
-};
-
-GType ea_week_view_get_type (void);
-
-struct _EaWeekViewClass
-{
- GtkAccessibleClass parent_class;
-};
-
-AtkObject* ea_week_view_new (GtkWidget *widget);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* __EA_WEEK_VIEW_H__ */
diff --git a/a11y/e-table/.cvsignore b/a11y/e-table/.cvsignore
deleted file mode 100644
index 5b48d3f593..0000000000
--- a/a11y/e-table/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-.libs
-Makefile.in
-Makefile
-*.la
diff --git a/a11y/e-table/gal-a11y-e-cell-popup.c b/a11y/e-table/gal-a11y-e-cell-popup.c
deleted file mode 100644
index 88325e726e..0000000000
--- a/a11y/e-table/gal-a11y-e-cell-popup.c
+++ /dev/null
@@ -1,146 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: gal-a11y-e-cell-popup.h
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Yang Wu <yang.wu@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-#include <config.h>
-#include <gal/e-table/e-cell-popup.h>
-#include "gal-a11y-e-cell-popup.h"
-#include "gal-a11y-util.h"
-#include <atk/atkobject.h>
-#include <gdk/gdkkeysyms.h>
-#include <gtk/gtkwidget.h>
-
-static AtkObjectClass *parent_class = NULL;
-#define PARENT_TYPE (gal_a11y_e_cell_get_type ())
-
-static void gal_a11y_e_cell_popup_class_init (GalA11yECellPopupClass *klass);
-static void popup_cell_action (GalA11yECell *cell);
-
-/**
- * gal_a11y_e_cell_popup_get_type:
- * @void:
- *
- * Registers the &GalA11yECellPopup class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the &GalA11yECellPopup class.
- **/
-GType
-gal_a11y_e_cell_popup_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- GTypeInfo info = {
- sizeof (GalA11yECellPopupClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) gal_a11y_e_cell_popup_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (GalA11yECellPopup),
- 0,
- (GInstanceInitFunc) NULL,
- NULL /* value_cell_popup */
- };
-
- type = g_type_register_static (PARENT_TYPE, "GalA11yECellPopup", &info, 0);
- gal_a11y_e_cell_type_add_action_interface (type);
- }
-
- return type;
-}
-
-static void
-gal_a11y_e_cell_popup_class_init (GalA11yECellPopupClass *klass)
-{
- AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_ref (PARENT_TYPE);
-}
-
-AtkObject *
-gal_a11y_e_cell_popup_new (ETableItem *item,
- ECellView *cell_view,
- AtkObject *parent,
- int model_col,
- int view_col,
- int row)
-{
- AtkObject *a11y;
- GalA11yECell *cell;
- ECellPopup *popupcell;
- ECellView* child_view = NULL;
-
- popupcell= E_CELL_POPUP(cell_view->ecell);
-
- if (popupcell && popupcell->popup_cell_view)
- child_view = popupcell->popup_cell_view->child_view;
-
- if (child_view && child_view->ecell) {
- a11y = gal_a11y_e_cell_registry_get_object (NULL,
- item,
- child_view,
- parent,
- model_col,
- view_col,
- row);
- } else {
- a11y = g_object_new (GAL_A11Y_TYPE_E_CELL_POPUP, NULL);
- gal_a11y_e_cell_construct (a11y,
- item,
- cell_view,
- parent,
- model_col,
- view_col,
- row);
- }
- g_return_val_if_fail (a11y != NULL, NULL);
- cell = GAL_A11Y_E_CELL(a11y);
- gal_a11y_e_cell_add_action (cell,
- "popup", /* action name*/
- "popup a child", /* action description */
- "<Alt>Down", /* action keybinding */
- popup_cell_action);
-
- a11y->role = ATK_ROLE_TABLE_CELL;
- return a11y;
-}
-
-static void
-popup_cell_action (GalA11yECell *cell)
-{
- ECellPopup *ecp;
- gint finished;
- GdkEvent event;
-
- event.key.type = GDK_KEY_PRESS;
- event.key.window = GTK_LAYOUT(GNOME_CANVAS_ITEM(cell->item)->canvas)->bin_window;;
- event.key.send_event = TRUE;
- event.key.time = GDK_CURRENT_TIME;
- event.key.state = GDK_MOD1_MASK;
- event.key.keyval = GDK_Down;
-
- g_signal_emit_by_name (cell->item, "event", &event, &finished);
-}
diff --git a/a11y/e-table/gal-a11y-e-cell-popup.h b/a11y/e-table/gal-a11y-e-cell-popup.h
deleted file mode 100644
index 5809f9b4f4..0000000000
--- a/a11y/e-table/gal-a11y-e-cell-popup.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: gal-a11y-e-cell-popup.h
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Yang Wu <yang.wu@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-#ifndef __GAL_A11Y_E_CELL_POPUP_H__
-#define __GAL_A11Y_E_CELL_POPUP_H__
-
-#include <glib-object.h>
-#include <gal/e-table/e-table-item.h>
-#include <a11y/e-table/gal-a11y-e-cell.h>
-#include <atk/atkgobjectaccessible.h>
-
-#define GAL_A11Y_TYPE_E_CELL_POPUP (gal_a11y_e_cell_popup_get_type ())
-#define GAL_A11Y_E_CELL_POPUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAL_A11Y_TYPE_E_CELL_POPUP, GalA11yECellPopup))
-#define GAL_A11Y_E_CELL_POPUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAL_A11Y_TYPE_E_CELL_POPUP, GalA11yECellPopupClass))
-#define GAL_A11Y_IS_E_CELL_POPUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAL_A11Y_TYPE_E_CELL_POPUP))
-#define GAL_A11Y_IS_E_CELL_POPUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAL_A11Y_TYPE_E_CELL_POPUP))
-
-typedef struct _GalA11yECellPopup GalA11yECellPopup;
-typedef struct _GalA11yECellPopupClass GalA11yECellPopupClass;
-
-/* This struct should actually be larger as this isn't what we derive from.
- * The GalA11yECellPopupPrivate comes right after the parent class structure.
- **/
-struct _GalA11yECellPopup {
- GalA11yECell object;
-};
-
-struct _GalA11yECellPopupClass {
- GalA11yECellClass parent_class;
-};
-
-
-/* Standard Glib function */
-GType gal_a11y_e_cell_popup_get_type (void);
-AtkObject *gal_a11y_e_cell_popup_new (ETableItem *item,
- ECellView *cell_view,
- AtkObject *parent,
- int model_col,
- int view_col,
- int row);
-
-#endif /* ! __GAL_A11Y_E_CELL_POPUP_H__ */
diff --git a/a11y/e-table/gal-a11y-e-cell-registry.c b/a11y/e-table/gal-a11y-e-cell-registry.c
deleted file mode 100644
index 7110179554..0000000000
--- a/a11y/e-table/gal-a11y-e-cell-registry.c
+++ /dev/null
@@ -1,132 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * Copyright (C) 2002 Ximian, Inc.
- */
-
-#include <config.h>
-#include "gal-a11y-e-cell-registry.h"
-#include "gal-a11y-e-cell.h"
-
-static GObjectClass *parent_class;
-static GalA11yECellRegistry *default_registry;
-#define PARENT_TYPE (G_TYPE_OBJECT)
-
-struct _GalA11yECellRegistryPrivate {
- GHashTable *table;
-};
-
-/* Static functions */
-
-static void
-gal_a11y_e_cell_registry_finalize (GObject *obj)
-{
- GalA11yECellRegistry *registry = GAL_A11Y_E_CELL_REGISTRY (obj);
-
- g_hash_table_destroy (registry->priv->table);
- g_free (registry->priv);
-}
-
-static void
-gal_a11y_e_cell_registry_class_init (GalA11yECellRegistryClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_ref (PARENT_TYPE);
-
- object_class->finalize = gal_a11y_e_cell_registry_finalize;
-}
-
-static void
-gal_a11y_e_cell_registry_init (GalA11yECellRegistry *registry)
-{
- registry->priv = g_new (GalA11yECellRegistryPrivate, 1);
- registry->priv->table = g_hash_table_new (NULL, NULL);
-}
-
-/**
- * gal_a11y_e_cell_registry_get_type:
- * @void:
- *
- * Registers the &GalA11yECellRegistry class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the &GalA11yECellRegistry class.
- **/
-GType
-gal_a11y_e_cell_registry_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- GTypeInfo info = {
- sizeof (GalA11yECellRegistryClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) gal_a11y_e_cell_registry_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (GalA11yECellRegistry),
- 0,
- (GInstanceInitFunc) gal_a11y_e_cell_registry_init,
- NULL /* value_cell */
- };
-
- type = g_type_register_static (PARENT_TYPE, "GalA11yECellRegistry", &info, 0);
- }
-
- return type;
-}
-
-static void
-init_default_registry (void)
-{
- if (default_registry == NULL) {
- default_registry = g_object_new (gal_a11y_e_cell_registry_get_type(), NULL);
- }
-}
-
-
-AtkObject *
-gal_a11y_e_cell_registry_get_object (GalA11yECellRegistry *registry,
- ETableItem *item,
- ECellView *cell_view,
- AtkObject *parent,
- int model_col,
- int view_col,
- int row)
-{
- GalA11yECellRegistryFunc func = NULL;
- GType type;
-
- if (registry == NULL) {
- init_default_registry ();
- registry = default_registry;
- }
-
- type = GTK_OBJECT_TYPE (cell_view->ecell);
- while (func == NULL && type != 0) {
- func = g_hash_table_lookup (registry->priv->table, GINT_TO_POINTER (type));
- type = g_type_parent (type);
- }
-
- if (func)
- return func (item, cell_view, parent, model_col, view_col, row);
- else
- return gal_a11y_e_cell_new (item, cell_view, parent, model_col, view_col, row);
-}
-
-void
-gal_a11y_e_cell_registry_add_cell_type (GalA11yECellRegistry *registry,
- GType type,
- GalA11yECellRegistryFunc func)
-{
- if (registry == NULL) {
- init_default_registry ();
- registry = default_registry;
- }
-
- g_hash_table_insert (registry->priv->table, GINT_TO_POINTER (type), func);
-}
diff --git a/a11y/e-table/gal-a11y-e-cell-registry.h b/a11y/e-table/gal-a11y-e-cell-registry.h
deleted file mode 100644
index eecd41139c..0000000000
--- a/a11y/e-table/gal-a11y-e-cell-registry.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * Copyright (C) 2001 Chris Lahey
- */
-
-#ifndef __GAL_A11Y_E_CELL_REGISTRY_H__
-#define __GAL_A11Y_E_CELL_REGISTRY_H__
-
-#include <glib-object.h>
-#include <atk/atkobject.h>
-#include <gal/e-table/e-table-item.h>
-#include <gal/e-table/e-cell.h>
-
-#define GAL_A11Y_TYPE_E_CELL_REGISTRY (gal_a11y_e_cell_registry_get_type ())
-#define GAL_A11Y_E_CELL_REGISTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAL_A11Y_TYPE_E_CELL_REGISTRY, GalA11yECellRegistry))
-#define GAL_A11Y_E_CELL_REGISTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAL_A11Y_TYPE_E_CELL_REGISTRY, GalA11yECellRegistryClass))
-#define GAL_A11Y_IS_E_CELL_REGISTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAL_A11Y_TYPE_E_CELL_REGISTRY))
-#define GAL_A11Y_IS_E_CELL_REGISTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAL_A11Y_TYPE_E_CELL_REGISTRY))
-
-typedef struct _GalA11yECellRegistry GalA11yECellRegistry;
-typedef struct _GalA11yECellRegistryClass GalA11yECellRegistryClass;
-typedef struct _GalA11yECellRegistryPrivate GalA11yECellRegistryPrivate;
-
-typedef AtkObject *(*GalA11yECellRegistryFunc) (ETableItem *item,
- ECellView *cell_view,
- AtkObject *parent,
- int model_col,
- int view_col,
- int row);
-
-struct _GalA11yECellRegistry {
- GObject object;
-
- GalA11yECellRegistryPrivate *priv;
-};
-
-struct _GalA11yECellRegistryClass {
- GObjectClass parent_class;
-};
-
-
-/* Standard Glib function */
-GType gal_a11y_e_cell_registry_get_type (void);
-AtkObject *gal_a11y_e_cell_registry_get_object (GalA11yECellRegistry *registry,
- ETableItem *item,
- ECellView *cell_view,
- AtkObject *parent,
- int model_col,
- int view_col,
- int row);
-void gal_a11y_e_cell_registry_add_cell_type (GalA11yECellRegistry *registry,
- GType type,
- GalA11yECellRegistryFunc func);
-
-#endif /* ! __GAL_A11Y_E_CELL_REGISTRY_H__ */
diff --git a/a11y/e-table/gal-a11y-e-cell-text.c b/a11y/e-table/gal-a11y-e-cell-text.c
deleted file mode 100644
index e23d1f2feb..0000000000
--- a/a11y/e-table/gal-a11y-e-cell-text.c
+++ /dev/null
@@ -1,567 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * Copyright (C) 2002 Ximian, Inc.
- */
-
-#include <config.h>
-#include "gal-a11y-e-cell-text.h"
-#include "gal-a11y-util.h"
-#include <gal/e-table/e-cell-text.h>
-#include <atk/atkobject.h>
-#include <atk/atktext.h>
-#include <atk/atkeditabletext.h>
-#include <atk/atkaction.h>
-
-#define CS_CLASS(a11y) (G_TYPE_INSTANCE_GET_CLASS ((a11y), C_TYPE_STREAM, GalA11yECellTextClass))
-static AtkObjectClass *parent_class;
-#define PARENT_TYPE (gal_a11y_e_cell_get_type ())
-
-/* Static functions */
-static G_CONST_RETURN gchar*
-ect_get_name (AtkObject * a11y)
-{
- GalA11yECell *gaec = GAL_A11Y_E_CELL (a11y);
- ECellText *ect = E_CELL_TEXT (gaec->cell_view->ecell);
- return e_cell_text_get_text (ect, gaec->item->table_model, gaec->model_col, gaec->row);
-}
-
-static gchar *
-ect_get_text (AtkText *text,
- gint start_offset,
- gint end_offset)
-{
- GalA11yECell *gaec = GAL_A11Y_E_CELL (text);
- ECellText *ect = E_CELL_TEXT (gaec->cell_view->ecell);
- gchar *ret_val;
- gchar *full_text = e_cell_text_get_text (ect, gaec->item->table_model, gaec->model_col, gaec->row);
-
- if (end_offset == -1)
- end_offset = strlen (full_text);
- else
- end_offset = g_utf8_offset_to_pointer (full_text, end_offset) - full_text;
-
- start_offset = g_utf8_offset_to_pointer (full_text, start_offset) - full_text;
-
- ret_val = g_strndup (full_text + start_offset, end_offset - start_offset);
-
- e_cell_text_free_text (ect, full_text);
-
- return ret_val;
-}
-
-static gchar *
-ect_get_text_after_offset (AtkText *text,
- gint offset,
- AtkTextBoundary boundary_type,
- gint *start_offset,
- gint *end_offset)
-{
- /* Unimplemented */
- return NULL;
-}
-
-static gchar *
-ect_get_text_at_offset (AtkText *text,
- gint offset,
- AtkTextBoundary boundary_type,
- gint *start_offset,
- gint *end_offset)
-{
- /* Unimplemented */
- return NULL;
-}
-
-static gunichar
-ect_get_character_at_offset (AtkText *text,
- gint offset)
-{
- GalA11yECell *gaec = GAL_A11Y_E_CELL (text);
- ECellText *ect = E_CELL_TEXT (gaec->cell_view->ecell);
- gunichar ret_val;
- gchar *at_offset;
- gchar *full_text = e_cell_text_get_text (ect, gaec->item->table_model, gaec->model_col, gaec->row);
- at_offset = g_utf8_offset_to_pointer (full_text, offset);
- ret_val = g_utf8_get_char_validated (at_offset, -1);
- e_cell_text_free_text (ect, full_text);
-
- return ret_val;
-}
-
-
-static gchar*
-ect_get_text_before_offset (AtkText *text,
- gint offset,
- AtkTextBoundary boundary_type,
- gint *start_offset,
- gint *end_offset)
-{
- /* Unimplemented */
- return NULL;
-}
-
-
-static gint
-ect_get_caret_offset (AtkText *text)
-{
- GalA11yECell *gaec = GAL_A11Y_E_CELL (text);
- ECellText *ect = E_CELL_TEXT (gaec->cell_view->ecell);
- gint start, end;
-
- if (e_cell_text_get_selection (gaec->cell_view,
- gaec->view_col, gaec->row,
- &start, &end)) {
- gchar *full_text = e_cell_text_get_text (ect, gaec->item->table_model, gaec->model_col, gaec->row);
- end = g_utf8_pointer_to_offset (full_text, full_text + end);
- e_cell_text_free_text (ect, full_text);
-
- return end;
- }
- else
- return -1;
-}
-
-static AtkAttributeSet*
-ect_get_run_attributes (AtkText *text,
- gint offset,
- gint *start_offset,
- gint *end_offset)
-{
- /* Unimplemented */
- return NULL;
-}
-
-
-static AtkAttributeSet*
-ect_get_default_attributes (AtkText *text)
-{
- /* Unimplemented */
- return NULL;
-}
-
-
-static void
-ect_get_character_extents (AtkText *text,
- gint offset,
- gint *x,
- gint *y,
- gint *width,
- gint *height,
- AtkCoordType coords)
-{
- /* Unimplemented */
-}
-
-
-static gint
-ect_get_character_count (AtkText *text)
-{
- GalA11yECell *gaec = GAL_A11Y_E_CELL (text);
- ECellText *ect = E_CELL_TEXT (gaec->cell_view->ecell);
- gint ret_val;
-
- gchar *full_text = e_cell_text_get_text (ect, gaec->item->table_model, gaec->model_col, gaec->row);
-
- ret_val = g_utf8_strlen (full_text, -1);
- e_cell_text_free_text (ect, full_text);
- return ret_val;
-}
-
-
-static gint
-ect_get_offset_at_point (AtkText *text,
- gint x,
- gint y,
- AtkCoordType coords)
-{
- /* Unimplemented */
- return 0;
-}
-
-
-static gint
-ect_get_n_selections (AtkText *text)
-{
- GalA11yECell *gaec = GAL_A11Y_E_CELL (text);
- gint selection_start, selection_end;
- if (e_cell_text_get_selection (gaec->cell_view,
- gaec->view_col, gaec->row,
- &selection_start,
- &selection_end)
- && selection_start != selection_end)
- return 1;
- return 0;
-}
-
-
-static gchar*
-ect_get_selection (AtkText *text,
- gint selection_num,
- gint *start_offset,
- gint *end_offset)
-{
- GalA11yECell *gaec = GAL_A11Y_E_CELL (text);
- ECellText *ect = E_CELL_TEXT (gaec->cell_view->ecell);
- gchar *ret_val;
- gint selection_start, selection_end;
-
- if (selection_num == 0
- && e_cell_text_get_selection (gaec->cell_view,
- gaec->view_col, gaec->row,
- &selection_start,
- &selection_end)
- && selection_start != selection_end) {
- gint real_start, real_end, len;
- gchar *full_text = e_cell_text_get_text (ect, gaec->item->table_model, gaec->model_col, gaec->row);
- len = strlen (full_text);
- real_start = MIN (selection_start, selection_end);
- real_end = MAX (selection_start, selection_end);
- real_start = MIN (MAX (0, real_start), len);
- real_end = MIN (MAX (0, real_end), len);
-
- ret_val = g_strndup (full_text + real_start, real_end - real_start);
-
- real_start = g_utf8_pointer_to_offset (full_text, full_text + real_start);
- real_end = g_utf8_pointer_to_offset (full_text, full_text + real_end);
-
- if (start_offset)
- *start_offset = real_start;
- if (end_offset)
- *end_offset = real_end;
- e_cell_text_free_text (ect, full_text);
- } else {
- if (start_offset)
- *start_offset = 0;
- if (end_offset)
- *end_offset = 0;
- ret_val = NULL;
- }
-
- return ret_val;
-}
-
-
-static gboolean
-ect_add_selection (AtkText *text,
- gint start_offset,
- gint end_offset)
-{
- GalA11yECell *gaec = GAL_A11Y_E_CELL (text);
- ECellText *ect = E_CELL_TEXT (gaec->cell_view->ecell);
-
- if (start_offset != end_offset) {
- gint real_start, real_end, len;
- gchar *full_text =
- e_cell_text_get_text (ect, gaec->item->table_model, gaec->model_col, gaec->row);
-
- len = g_utf8_strlen (full_text, -1);
- if (end_offset == -1)
- end_offset = len;
-
- real_start = MIN (start_offset, end_offset);
- real_end = MAX (start_offset, end_offset);
-
- real_start = MIN (MAX (0, real_start), len);
- real_end = MIN (MAX (0, real_end), len);
-
- real_start = g_utf8_offset_to_pointer (full_text, real_start) - full_text;
- real_end = g_utf8_offset_to_pointer (full_text, real_end) - full_text;
- e_cell_text_free_text (ect, full_text);
-
- if (e_cell_text_set_selection (gaec->cell_view,
- gaec->view_col, gaec->row,
- real_start, real_end)) {
- g_signal_emit_by_name (ATK_OBJECT(text), "text_selection_changed");
- return TRUE;
- }
- }
-
- return FALSE;
-}
-
-
-static gboolean
-ect_remove_selection (AtkText *text,
- gint selection_num)
-{
- GalA11yECell *gaec = GAL_A11Y_E_CELL (text);
- ECellText *ect = E_CELL_TEXT (gaec->cell_view->ecell);
- gint selection_start, selection_end;
-
- if (selection_num == 0
- && e_cell_text_get_selection (gaec->cell_view,
- gaec->view_col, gaec->row,
- &selection_start,
- &selection_end)
- && selection_start != selection_end
- && e_cell_text_set_selection (gaec->cell_view,
- gaec->view_col, gaec->row,
- selection_end, selection_end)) {
- g_signal_emit_by_name (ATK_OBJECT(text), "text_selection_changed");
- return TRUE;
- }
- else
- return FALSE;
-}
-
-
-static gboolean
-ect_set_selection (AtkText *text,
- gint selection_num,
- gint start_offset,
- gint end_offset)
-{
- if (selection_num == 0) {
- atk_text_add_selection (text, start_offset, end_offset);
- return TRUE;
- }
- else
- return FALSE;
-}
-
-
-static gboolean
-ect_set_caret_offset (AtkText *text,
- gint offset)
-{
- GalA11yECell *gaec = GAL_A11Y_E_CELL (text);
- ECellText *ect = E_CELL_TEXT (gaec->cell_view->ecell);
- gchar *full_text;
- gint len;
-
- full_text = e_cell_text_get_text (ect, gaec->item->table_model, gaec->model_col, gaec->row);
-
- len = g_utf8_strlen (full_text, -1);
- if (offset == -1)
- offset = len;
- else
- offset = MIN (MAX (0, offset), len);
-
- offset = g_utf8_offset_to_pointer (full_text, offset) - full_text;
-
- e_cell_text_free_text (ect, full_text);
-
- return e_cell_text_set_selection (gaec->cell_view,
- gaec->view_col, gaec->row,
- offset, offset);
-}
-
-static gboolean
-ect_set_run_attributes (AtkEditableText *text,
- AtkAttributeSet *attrib_set,
- gint start_offset,
- gint end_offset)
-{
- /* Unimplemented */
- return FALSE;
-}
-
-static void
-ect_set_text_contents (AtkEditableText *text,
- const gchar *string)
-{
- GalA11yECell *gaec = GAL_A11Y_E_CELL (text);
- ECellText *ect = E_CELL_TEXT (gaec->cell_view->ecell);
-
- e_cell_text_set_value (ect, gaec->item->table_model, gaec->model_col, gaec->row, string);
- e_table_item_enter_edit (gaec->item, gaec->view_col, gaec->row);
-}
-
-static void
-ect_insert_text (AtkEditableText *text,
- const gchar *string,
- gint length,
- gint *position)
-{
- /* Utf8 unimplemented */
- GalA11yECell *gaec = GAL_A11Y_E_CELL (text);
- ECellText *ect = E_CELL_TEXT (gaec->cell_view->ecell);
-
- gchar *full_text = e_cell_text_get_text (ect, gaec->item->table_model, gaec->model_col, gaec->row);
- gchar *result = g_strdup_printf ("%.*s%.*s%s", *position, full_text, length, string, full_text + *position);
-
- e_cell_text_set_value (ect, gaec->item->table_model, gaec->model_col, gaec->row, result);
-
- *position += length;
-
- g_free (result);
- e_cell_text_free_text (ect, full_text);
-}
-
-static void
-ect_copy_text (AtkEditableText *text,
- gint start_pos,
- gint end_pos)
-{
- GalA11yECell *gaec = GAL_A11Y_E_CELL (text);
- if (start_pos != end_pos
- && atk_text_set_selection (text, 0, start_pos, end_pos))
- e_cell_text_copy_clipboard (gaec->cell_view,
- gaec->view_col, gaec->row);
-}
-
-static void
-ect_delete_text (AtkEditableText *text,
- gint start_pos,
- gint end_pos)
-{
- GalA11yECell *gaec = GAL_A11Y_E_CELL (text);
- if (start_pos != end_pos
- && atk_text_set_selection (text, 0, start_pos, end_pos))
- e_cell_text_delete_selection (gaec->cell_view,
- gaec->view_col, gaec->row);
-}
-
-static void
-ect_cut_text (AtkEditableText *text,
- gint start_pos,
- gint end_pos)
-{
- ect_copy_text (text, start_pos, end_pos);
- ect_delete_text (text, start_pos, end_pos);
-}
-
-static void
-ect_paste_text (AtkEditableText *text,
- gint position)
-{
- GalA11yECell *gaec = GAL_A11Y_E_CELL (text);
-
- e_table_item_enter_edit (gaec->item, gaec->view_col, gaec->row);
-
- if (atk_text_set_caret_offset (text, position))
- e_cell_text_paste_clipboard (gaec->cell_view,
- gaec->view_col, gaec->row);
-}
-
-static void
-ect_do_action_edit (AtkAction *action)
-{
- GalA11yECell *a11y = GAL_A11Y_E_CELL (action);
- e_table_item_enter_edit (a11y->item, a11y->view_col, a11y->row);
-}
-
-static void
-ect_atk_text_iface_init (AtkTextIface *iface)
-{
- iface->get_text = ect_get_text;
- iface->get_text_after_offset = ect_get_text_after_offset;
- iface->get_text_at_offset = ect_get_text_at_offset;
- iface->get_character_at_offset = ect_get_character_at_offset;
- iface->get_text_before_offset = ect_get_text_before_offset;
- iface->get_caret_offset = ect_get_caret_offset;
- iface->get_run_attributes = ect_get_run_attributes;
- iface->get_default_attributes = ect_get_default_attributes;
- iface->get_character_extents = ect_get_character_extents;
- iface->get_character_count = ect_get_character_count;
- iface->get_offset_at_point = ect_get_offset_at_point;
- iface->get_n_selections = ect_get_n_selections;
- iface->get_selection = ect_get_selection;
- iface->add_selection = ect_add_selection;
- iface->remove_selection = ect_remove_selection;
- iface->set_selection = ect_set_selection;
- iface->set_caret_offset = ect_set_caret_offset;
-}
-
-static void
-ect_atk_editable_text_iface_init (AtkEditableTextIface *iface)
-{
- iface->set_run_attributes = ect_set_run_attributes;
- iface->set_text_contents = ect_set_text_contents;
- iface->insert_text = ect_insert_text;
- iface->copy_text = ect_copy_text;
- iface->cut_text = ect_cut_text;
- iface->delete_text = ect_delete_text;
- iface->paste_text = ect_paste_text;
-}
-
-static void
-ect_class_init (GalA11yECellTextClass *klass)
-{
- AtkObjectClass *a11y = ATK_OBJECT_CLASS (klass);
- parent_class = g_type_class_ref (PARENT_TYPE);
- a11y->get_name = ect_get_name;
-}
-
-static void
-ect_init (GalA11yECellText *a11y)
-{
- gal_a11y_e_cell_add_action (a11y,
- "edit",
- "begin editing this cell",
- NULL,
- (ACTION_FUNC)ect_do_action_edit);
-}
-
-/**
- * gal_a11y_e_cell_text_get_type:
- * @void:
- *
- * Registers the &GalA11yECellText class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the &GalA11yECellText class.
- **/
-GType
-gal_a11y_e_cell_text_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- GTypeInfo info = {
- sizeof (GalA11yECellTextClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) ect_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (GalA11yECellText),
- 0,
- (GInstanceInitFunc) ect_init,
- NULL /* value_cell_text */
- };
-
- static const GInterfaceInfo atk_text_info = {
- (GInterfaceInitFunc) ect_atk_text_iface_init,
- (GInterfaceFinalizeFunc) NULL,
- NULL
- };
-
- static const GInterfaceInfo atk_editable_text_info = {
- (GInterfaceInitFunc) ect_atk_editable_text_iface_init,
- (GInterfaceFinalizeFunc) NULL,
- NULL
- };
-
- type = g_type_register_static (PARENT_TYPE, "GalA11yECellText", &info, 0);
- g_type_add_interface_static (type, ATK_TYPE_TEXT, &atk_text_info);
- g_type_add_interface_static (type, ATK_TYPE_EDITABLE_TEXT, &atk_editable_text_info);
- gal_a11y_e_cell_type_add_action_interface (type);
- }
-
- return type;
-}
-
-AtkObject *
-gal_a11y_e_cell_text_new (ETableItem *item,
- ECellView *cell_view,
- AtkObject *parent,
- int model_col,
- int view_col,
- int row)
-{
- AtkObject *a11y;
-
- a11y = g_object_new (gal_a11y_e_cell_text_get_type (), NULL);
-
- gal_a11y_e_cell_construct (a11y,
- item,
- cell_view,
- parent,
- model_col,
- view_col,
- row);
- return a11y;
-}
diff --git a/a11y/e-table/gal-a11y-e-cell-text.h b/a11y/e-table/gal-a11y-e-cell-text.h
deleted file mode 100644
index 3d9a4447be..0000000000
--- a/a11y/e-table/gal-a11y-e-cell-text.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * Copyright (C) 2001 Chris Lahey
- */
-
-#ifndef __GAL_A11Y_E_CELL_TEXT_H__
-#define __GAL_A11Y_E_CELL_TEXT_H__
-
-#include <glib-object.h>
-#include <gal/e-table/e-table-item.h>
-#include <gal/e-table/e-cell-text.h>
-#include <a11y/e-table/gal-a11y-e-cell.h>
-
-#define GAL_A11Y_TYPE_E_CELL_TEXT (gal_a11y_e_cell_text_get_type ())
-#define GAL_A11Y_E_CELL_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAL_A11Y_TYPE_E_CELL_TEXT, GalA11yECellText))
-#define GAL_A11Y_E_CELL_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAL_A11Y_TYPE_E_CELL_TEXT, GalA11yECellTextClass))
-#define GAL_A11Y_IS_E_CELL_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAL_A11Y_TYPE_E_CELL_TEXT))
-#define GAL_A11Y_IS_E_CELL_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAL_A11Y_TYPE_E_CELL_TEXT))
-
-typedef struct _GalA11yECellText GalA11yECellText;
-typedef struct _GalA11yECellTextClass GalA11yECellTextClass;
-typedef struct _GalA11yECellTextPrivate GalA11yECellTextPrivate;
-
-/* This struct should actually be larger as this isn't what we derive from.
- * The GalA11yECellTextPrivate comes right after the parent class structure.
- **/
-struct _GalA11yECellText {
- GalA11yECell object;
-};
-
-struct _GalA11yECellTextClass {
- GalA11yECellClass parent_class;
-};
-
-
-/* Standard Glib function */
-GType gal_a11y_e_cell_text_get_type (void);
-AtkObject *gal_a11y_e_cell_text_new (ETableItem *item,
- ECellView *cell_view,
- AtkObject *parent,
- int model_col,
- int view_col,
- int row);
-
-#endif /* ! __GAL_A11Y_E_CELL_TEXT_H__ */
diff --git a/a11y/e-table/gal-a11y-e-cell-toggle.c b/a11y/e-table/gal-a11y-e-cell-toggle.c
deleted file mode 100644
index f3b5bf2879..0000000000
--- a/a11y/e-table/gal-a11y-e-cell-toggle.c
+++ /dev/null
@@ -1,163 +0,0 @@
-#include <gtk/gtk.h>
-#include "gal-a11y-e-cell-toggle.h"
-#include <gal/e-table/e-cell-toggle.h>
-#include <gal/e-table/e-table-model.h>
-
-#define PARENT_TYPE (gal_a11y_e_cell_get_type ())
-static GObjectClass *parent_class;
-
-static void gal_a11y_e_cell_toggle_class_init (GalA11yECellToggleClass *klass);
-
-static void
-gal_a11y_e_cell_toggle_dispose (GObject *object)
-{
- GalA11yECellToggle *a11y = GAL_A11Y_E_CELL_TOGGLE (object);
-
- ETableModel *e_table_model = GAL_A11Y_E_CELL (a11y)->item->table_model;
-
- if (e_table_model)
- g_signal_handler_disconnect (e_table_model, a11y->model_id);
-
- if (parent_class->dispose)
- parent_class->dispose (object);
-}
-
-GType
-gal_a11y_e_cell_toggle_get_type (void)
-{
- static GType type = 0;
-
- if (!type)
- {
- static const GTypeInfo tinfo =
- {
- sizeof (GalA11yECellToggleClass),
- (GBaseInitFunc) NULL, /* base init */
- (GBaseFinalizeFunc) NULL, /* base finalize */
- (GClassInitFunc) gal_a11y_e_cell_toggle_class_init, /* class init */
- (GClassFinalizeFunc) NULL, /* class finalize */
- NULL, /* class data */
- sizeof (GalA11yECellToggle), /* instance size */
- 0, /* nb preallocs */
- NULL, /* instance init */
- NULL /* value table */
- };
-
-
- type = g_type_register_static (GAL_A11Y_TYPE_E_CELL,
- "GalA11yECellToggle", &tinfo, 0);
- gal_a11y_e_cell_type_add_action_interface (type);
-
- }
- return type;
-}
-
-
-static void
-gal_a11y_e_cell_toggle_class_init (GalA11yECellToggleClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- object_class->dispose = gal_a11y_e_cell_toggle_dispose;
- parent_class = g_type_class_ref (PARENT_TYPE);
-}
-
-static void
-toggle_cell_action (GalA11yECell *cell)
-{
- ECellToggle * ect;
- gint finished;
- GdkEventButton event;
- gint x, y, width, height;
- gint row, col;
-
- row = cell->row;
- col = cell->view_col;
-
- e_table_item_get_cell_geometry (cell->item, &row, &col,
- &x, &y, &width, &height);
-
- event.x = x + width / 2 + (int)(GNOME_CANVAS_ITEM (cell->item)->x1);
- event.y = y + height / 2 + (int)(GNOME_CANVAS_ITEM (cell->item)->y1);
-
- event.type = GDK_BUTTON_PRESS;
- event.window = GTK_LAYOUT(GNOME_CANVAS_ITEM(cell->item)->canvas)->bin_window;
- event.button = 1;
- event.send_event = TRUE;
- event.time = GDK_CURRENT_TIME;
- event.axes = NULL;
-
- g_signal_emit_by_name (cell->item, "event", &event, &finished);
-}
-
-static void
-model_change_cb (ETableModel *etm,
- gint row,
- gint col,
- GalA11yECell *cell)
-{
- gint value;
-
- if (col == cell->model_col && row == cell->row) {
-
- value = GPOINTER_TO_INT (
- e_table_model_value_at (cell->cell_view->e_table_model,
- cell->model_col, cell->row));
- if (value)
- gal_a11y_e_cell_add_state (cell, ATK_STATE_CHECKED, TRUE);
- else
- gal_a11y_e_cell_remove_state (cell, ATK_STATE_CHECKED, TRUE);
- }
-}
-
-
-AtkObject*
-gal_a11y_e_cell_toggle_new (ETableItem *item,
- ECellView *cell_view,
- AtkObject *parent,
- int model_col,
- int view_col,
- int row)
-{
- AtkObject *a11y;
- GalA11yECell *cell;
- GalA11yECellToggle *toggle_cell;
- gint value;
-
- a11y = ATK_OBJECT(g_object_new (GAL_A11Y_TYPE_E_CELL_TOGGLE, NULL));
-
- g_return_val_if_fail (a11y != NULL, NULL);
-
- cell = GAL_A11Y_E_CELL(a11y);
- toggle_cell = GAL_A11Y_E_CELL_TOGGLE(a11y);
- a11y->role = ATK_ROLE_TABLE_CELL;
-
- gal_a11y_e_cell_construct (a11y,
- item,
- cell_view,
- parent,
- model_col,
- view_col,
- row);
-
- gal_a11y_e_cell_add_action (cell,
- "toggle", /* action name*/
- "toggle the cell", /* action description */
- NULL, /* action keybinding */
- toggle_cell_action);
-
- toggle_cell->model_id = g_signal_connect (item->table_model,
- "model_cell_changed",
- (GCallback) model_change_cb,
- a11y);
-
- value = GPOINTER_TO_INT (
- e_table_model_value_at (cell->cell_view->e_table_model,
- cell->model_col, cell->row));
- if (value)
- gal_a11y_e_cell_add_state (cell, ATK_STATE_CHECKED, FALSE);
- else
- gal_a11y_e_cell_remove_state (cell, ATK_STATE_CHECKED, FALSE);
-
- return a11y;
-}
diff --git a/a11y/e-table/gal-a11y-e-cell-toggle.h b/a11y/e-table/gal-a11y-e-cell-toggle.h
deleted file mode 100644
index 06f9448e02..0000000000
--- a/a11y/e-table/gal-a11y-e-cell-toggle.h
+++ /dev/null
@@ -1,47 +0,0 @@
-#ifndef __GAL_A11Y_E_CELL_TOGGLE_H__
-#define __GAL_A11Y_E_CELL_TOGGLE_H__
-
-#include <atk/atk.h>
-#include "gal-a11y-e-cell.h"
-#include "gal-a11y-e-cell-toggle.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#define GAL_A11Y_TYPE_E_CELL_TOGGLE (gal_a11y_e_cell_toggle_get_type ())
-#define GAL_A11Y_E_CELL_TOGGLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAL_A11Y_TYPE_E_CELL_TOGGLE, GalA11yECellToggle))
-#define GAL_A11Y_E_CELL_TOGGLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAL_A11Y_E_CELL_TOGGLE, GalA11yECellToggleClass))
-#define GAL_A11Y_IS_E_CELL_TOGGLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAL_A11Y_TYPE_E_CELL_TOGGLE))
-#define GAL_A11Y_IS_E_CELL_TOGGLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAL_A11Y_TYPE_E_CELL_TOGGLE))
-#define GAL_A11Y_E_CELL_TOGGLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAL_A11Y_TYPE_E_CELL_TOGGLE, GalA11yECellToggleClass))
-
-typedef struct _GalA11yECellToggle GalA11yECellToggle;
-typedef struct _GalA11yECellToggleClass GalA11yECellToggleClass;
-
-struct _GalA11yECellToggle
-{
- GalA11yECell parent;
- gint model_id;
-};
-
-GType gal_a11y_e_cell_toggle_get_type (void);
-
-struct _GalA11yECellToggleClass
-{
- GalA11yECellClass parent_class;
-};
-
-AtkObject *gal_a11y_e_cell_toggle_new (ETableItem *item,
- ECellView *cell_view,
- AtkObject *parent,
- int model_col,
- int view_col,
- int row);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* __GAL_A11Y_E_CELL_TOGGLE_H__ */
diff --git a/a11y/e-table/gal-a11y-e-cell-tree.c b/a11y/e-table/gal-a11y-e-cell-tree.c
deleted file mode 100644
index e6ff75667b..0000000000
--- a/a11y/e-table/gal-a11y-e-cell-tree.c
+++ /dev/null
@@ -1,209 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Tim Wo <tim.wo@sun.com>, Sun Microsystem Inc. 2003.
- *
- * Copyright (C) 2002 Ximian, Inc.
- */
-
-#include <config.h>
-#include <atk/atk.h>
-#include "gal-a11y-e-cell-tree.h"
-#include "gal-a11y-util.h"
-#include "gal/e-table/e-cell-tree.h"
-#include "gal/e-table/e-table.h"
-#include "gal/e-table/e-tree-table-adapter.h"
-
-#define CS_CLASS(a11y) (G_TYPE_INSTANCE_GET_CLASS ((a11y), C_TYPE_STREAM, GalA11yECellTreeClass))
-static AtkObjectClass *a11y_parent_class;
-#define A11Y_PARENT_TYPE (gal_a11y_e_cell_get_type ())
-
-static void
-ectr_model_row_changed_cb (ETableModel *etm,
- gint row,
- GalA11yECell *a11y)
-{
- ETreePath node;
- ETreeModel *tree_model;
- ETreeTableAdapter *tree_table_adapter;
-
- g_return_if_fail (a11y);
- if (a11y->row != row)
- return;
-
- node = e_table_model_value_at (etm, -1, a11y->row);
- tree_model = e_table_model_value_at (etm, -2, a11y->row);
- tree_table_adapter = e_table_model_value_at (etm, -3, a11y->row);
-
- if (e_tree_model_node_is_expandable (tree_model, node)) {
- gboolean is_exp = e_tree_table_adapter_node_is_expanded (tree_table_adapter, node);
- if (is_exp)
- gal_a11y_e_cell_add_state (a11y, ATK_STATE_EXPANDED, TRUE);
- else
- gal_a11y_e_cell_remove_state (a11y, ATK_STATE_EXPANDED, TRUE);
- }
-}
-
-static void
-ectr_subcell_weak_ref (GalA11yECellTree *a11y,
- GalA11yECell *subcell_a11y)
-{
- g_signal_handler_disconnect (GAL_A11Y_E_CELL (a11y)->item->table_model,
- a11y->model_row_changed_id);
- g_object_unref (a11y);
-}
-
-static void
-ectr_do_action_expand (AtkAction *action)
-{
- GalA11yECell *a11y;
- ETableModel *table_model;
- ETreePath node;
- ETreeModel *tree_model;
- ETreeTableAdapter *tree_table_adapter;
-
- a11y = GAL_A11Y_E_CELL (action);
- table_model = a11y->item->table_model;
- node = e_table_model_value_at (table_model, -1, a11y->row);
- tree_model = e_table_model_value_at (table_model, -2, a11y->row);
- tree_table_adapter = e_table_model_value_at (table_model, -3, a11y->row);
-
- if (e_tree_model_node_is_expandable (tree_model, node)) {
- e_tree_table_adapter_node_set_expanded (tree_table_adapter,
- node,
- TRUE);
- gal_a11y_e_cell_add_state (a11y, ATK_STATE_EXPANDED, TRUE);
- }
-}
-
-static void
-ectr_do_action_collapse (AtkAction *action)
-{
- GalA11yECell *a11y;
- ETableModel *table_model;
- ETreePath node;
- ETreeModel *tree_model;
- ETreeTableAdapter *tree_table_adapter;
-
- a11y = GAL_A11Y_E_CELL (action);
- table_model = a11y->item->table_model;
- node = e_table_model_value_at (table_model, -1, a11y->row);
- tree_model = e_table_model_value_at (table_model, -2, a11y->row);
- tree_table_adapter = e_table_model_value_at (table_model, -3, a11y->row);
-
- if (e_tree_model_node_is_expandable (tree_model, node)) {
- e_tree_table_adapter_node_set_expanded (tree_table_adapter,
- node,
- FALSE);
- gal_a11y_e_cell_remove_state (a11y, ATK_STATE_EXPANDED, TRUE);
- }
-}
-
-static void
-ectr_class_init (GalA11yECellTreeClass *klass)
-{
- a11y_parent_class = g_type_class_ref (A11Y_PARENT_TYPE);
-}
-
-static void
-ectr_init (GalA11yECellTree *a11y)
-{
-}
-
-GType
-gal_a11y_e_cell_tree_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- GTypeInfo info = {
- sizeof (GalA11yECellTreeClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) ectr_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (GalA11yECellTree),
- 0,
- (GInstanceInitFunc) ectr_init,
- NULL /* value_cell_text */
- };
-
- type = g_type_register_static (A11Y_PARENT_TYPE, "GalA11yECellTree", &info, 0);
- gal_a11y_e_cell_type_add_action_interface (type);
- }
-
- return type;
-}
-
-AtkObject *
-gal_a11y_e_cell_tree_new (ETableItem *item,
- ECellView *cell_view,
- AtkObject *parent,
- int model_col,
- int view_col,
- int row)
-{
- AtkObject *subcell_a11y;
- GalA11yECellTree *a11y;
- GtkWidget *e_table;
-
- ETreePath node;
- ETreeModel *tree_model;
- ETreeTableAdapter *tree_table_adapter;
-
- ECellView *subcell_view;
- subcell_view = e_cell_tree_view_get_subcell_view (cell_view);
-
- if (subcell_view->ecell) {
- subcell_a11y = gal_a11y_e_cell_registry_get_object (NULL,
- item,
- subcell_view,
- parent,
- model_col,
- view_col,
- row);
- gal_a11y_e_cell_add_action (subcell_a11y,
- "expand",
- "expands the row in the ETree containing this cell",
- NULL,
- (ACTION_FUNC)ectr_do_action_expand);
-
- gal_a11y_e_cell_add_action (subcell_a11y,
- "collapse",
- "collapses the row in the ETree containing this cell",
- NULL,
- (ACTION_FUNC)ectr_do_action_collapse);
-
- /* init AtkStates for the cell's a11y object */
- node = e_table_model_value_at (item->table_model, -1, row);
- tree_model = e_table_model_value_at (item->table_model, -2, row);
- tree_table_adapter = e_table_model_value_at (item->table_model, -3, row);
- if (e_tree_model_node_is_expandable (tree_model, node)) {
- gal_a11y_e_cell_add_state (subcell_a11y, ATK_STATE_EXPANDABLE, FALSE);
- if (e_tree_table_adapter_node_is_expanded (tree_table_adapter, node))
- gal_a11y_e_cell_add_state (subcell_a11y, ATK_STATE_EXPANDED, FALSE);
- }
- }
- else
- subcell_a11y = NULL;
-
- /* create a companion a11y object, this object has type GalA11yECellTree
- and it connects to some signals to determine whether a tree cell is
- expanded or collapsed */
- a11y = g_object_new (gal_a11y_e_cell_tree_get_type (), NULL);
- gal_a11y_e_cell_construct (a11y,
- item,
- cell_view,
- parent,
- model_col,
- view_col,
- row);
- a11y->model_row_changed_id =
- g_signal_connect (item->table_model, "model_row_changed",
- G_CALLBACK (ectr_model_row_changed_cb),
- subcell_a11y);
- g_object_weak_ref (subcell_a11y, ectr_subcell_weak_ref, a11y);
-
- return subcell_a11y;
-}
diff --git a/a11y/e-table/gal-a11y-e-cell-tree.h b/a11y/e-table/gal-a11y-e-cell-tree.h
deleted file mode 100644
index 355670b5a4..0000000000
--- a/a11y/e-table/gal-a11y-e-cell-tree.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Tim Wo <tim.wo@sun.com>, Sun Microsystem Inc. 2003.
- *
- * Copyright (C) 2002 Ximian, Inc.
- */
-
-#ifndef __GAL_A11Y_E_CELL_TREE_H__
-#define __GAL_A11Y_E_CELL_TREE_H__
-
-#include <glib-object.h>
-#include <gal/e-table/e-table-item.h>
-#include <gal/e-table/e-cell-tree.h>
-#include "gal-a11y-e-cell.h"
-
-#define GAL_A11Y_TYPE_E_CELL_TREE (gal_a11y_e_cell_tree_get_type ())
-#define GAL_A11Y_E_CELL_TREE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAL_A11Y_TYPE_E_CELL_TREE, GalA11yECellTree))
-#define GAL_A11Y_E_CELL_TREE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAL_A11Y_TYPE_E_CELL_TREE, GalA11yECellTreeClass))
-#define GAL_A11Y_IS_E_CELL_TREE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAL_A11Y_TYPE_E_CELL_TREE))
-#define GAL_A11Y_IS_E_CELL_TREE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAL_A11Y_TYPE_E_CELL_TREE))
-
-typedef struct _GalA11yECellTree GalA11yECellTree;
-typedef struct _GalA11yECellTreeClass GalA11yECellTreeClass;
-typedef struct _GalA11yECellTreePrivate GalA11yECellTreePrivate;
-
-/* This struct should actually be larger as this isn't what we derive from.
- * The GalA11yECellTreePrivate comes right after the parent class structure.
- **/
-struct _GalA11yECellTree {
- GalA11yECell object;
-
- int model_row_changed_id;
-};
-
-struct _GalA11yECellTreeClass {
- GalA11yECellClass parent_class;
-};
-
-
-/* Standard Glib function */
-GType gal_a11y_e_cell_tree_get_type (void);
-AtkObject *gal_a11y_e_cell_tree_new (ETableItem *item,
- ECellView *cell_view,
- AtkObject *parent,
- int model_col,
- int view_col,
- int row);
-
-#endif /* ! __GAL_A11Y_E_CELL_TREE_H__ */
diff --git a/a11y/e-table/gal-a11y-e-cell.c b/a11y/e-table/gal-a11y-e-cell.c
deleted file mode 100644
index 34a7429cd5..0000000000
--- a/a11y/e-table/gal-a11y-e-cell.c
+++ /dev/null
@@ -1,551 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * Copyright (C) 2002 Ximian, Inc.
- */
-
-#include <config.h>
-#include "gal/e-table/e-table.h"
-#include "gal-a11y-e-cell.h"
-#include "gal-a11y-util.h"
-#include <atk/atkobject.h>
-#include <atk/atkcomponent.h>
-#include <atk/atkaction.h>
-
-#define CS_CLASS(a11y) (G_TYPE_INSTANCE_GET_CLASS ((a11y), C_TYPE_STREAM, GalA11yECellClass))
-static GObjectClass *parent_class;
-#define PARENT_TYPE (atk_object_get_type ())
-
-
-#if 0
-static void
-unref_item (gpointer user_data, GObject *obj_loc)
-{
- GalA11yECell *a11y = GAL_A11Y_E_CELL (user_data);
- a11y->item = NULL;
- g_object_unref (a11y);
-}
-
-static void
-unref_cell (gpointer user_data, GObject *obj_loc)
-{
- GalA11yECell *a11y = GAL_A11Y_E_CELL (user_data);
- a11y->cell_view = NULL;
- g_object_unref (a11y);
-}
-#endif
-
-static void
-eti_dispose (GObject *object)
-{
- GalA11yECell *a11y = GAL_A11Y_E_CELL (object);
-
-#if 0
- if (a11y->item)
- g_object_unref (G_OBJECT (a11y->item)); /*, unref_item, a11y); */
- if (a11y->cell_view)
- g_object_unref (G_OBJECT (a11y->cell_view)); /*, unref_cell, a11y); */
- if (a11y->parent)
- g_object_unref (a11y->parent);
-#endif
-
- if (a11y->state_set)
- g_object_unref (a11y->state_set);
-
- if (parent_class->dispose)
- parent_class->dispose (object);
-}
-
-/* Static functions */
-static AtkStateSet *
-eti_ref_state_set (AtkObject *accessible)
-{
- GalA11yECell *cell = GAL_A11Y_E_CELL (accessible);
- g_return_val_if_fail (cell->state_set, NULL);
-
- g_object_ref(cell->state_set);
- return cell->state_set;
-}
-
-static AtkObject*
-eti_get_parent (AtkObject *accessible)
-{
- GalA11yECell *a11y = GAL_A11Y_E_CELL (accessible);
- return a11y->parent;
-}
-
-static gint
-eti_get_index_in_parent (AtkObject *accessible)
-{
- GalA11yECell *a11y = GAL_A11Y_E_CELL (accessible);
-
- return a11y->row * a11y->item->cols + a11y->view_col;
-}
-
-
-/* Component IFace */
-static void
-eti_get_extents (AtkComponent *component,
- gint *x,
- gint *y,
- gint *width,
- gint *height,
- AtkCoordType coord_type)
-{
- GalA11yECell *a11y = GAL_A11Y_E_CELL (component);
- int row;
- int col;
- int xval;
- int yval;
-
- row = a11y->row;
- col = a11y->view_col;
-
-
- e_table_item_get_cell_geometry (a11y->item,
- &row,
- &col,
- &xval,
- &yval,
- width,
- height);
-
- atk_component_get_position (ATK_COMPONENT (a11y->parent),
- x, y, coord_type);
- if (x && *x != G_MININT)
- *x += xval;
- if (y && *y != G_MININT)
- *y += yval;
-}
-
-static gboolean
-eti_grab_focus (AtkComponent *component)
-{
- GalA11yECell *a11y;
- gint view_row;
- GtkWidget *e_table, *toplevel;
-
- a11y = GAL_A11Y_E_CELL (component);
- e_table = gtk_widget_get_parent (GNOME_CANVAS_ITEM (a11y->item)->canvas);
- view_row = e_table_view_to_model_row (E_TABLE (e_table), a11y->row);
-
- e_selection_model_select_single_row (a11y->item->selection, view_row);
- e_selection_model_change_cursor (a11y->item->selection, view_row, a11y->view_col);
-
- gtk_widget_grab_focus (e_table);
- toplevel = gtk_widget_get_toplevel (e_table);
- if (GTK_WIDGET_TOPLEVEL (toplevel))
- gtk_window_present (toplevel);
-}
-
-/* Table IFace */
-
-static void
-eti_atk_component_iface_init (AtkComponentIface *iface)
-{
- iface->get_extents = eti_get_extents;
- iface->grab_focus = eti_grab_focus;
-}
-
-static void
-eti_class_init (GalA11yECellClass *klass)
-{
- AtkObjectClass *atk_object_class = ATK_OBJECT_CLASS (klass);
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_ref (PARENT_TYPE);
-
- object_class->dispose = eti_dispose;
-
- atk_object_class->get_parent = eti_get_parent;
- atk_object_class->get_index_in_parent = eti_get_index_in_parent;
- atk_object_class->ref_state_set = eti_ref_state_set;
-}
-
-static void
-eti_init (GalA11yECell *a11y)
-{
- a11y->item = NULL;
- a11y->cell_view = NULL;
- a11y->parent = NULL;
- a11y->model_col = -1;
- a11y->view_col = -1;
- a11y->row = -1;
-
- a11y->state_set = atk_state_set_new ();
- atk_state_set_add_state (a11y->state_set, ATK_STATE_TRANSIENT);
- atk_state_set_add_state (a11y->state_set, ATK_STATE_ENABLED);
-}
-
-
-static ActionInfo *
-_gal_a11y_e_cell_get_action_info (GalA11yECell *cell,
- gint index)
-{
- GList *list_node;
-
- g_return_val_if_fail (GAL_A11Y_IS_E_CELL (cell), NULL);
- if (cell->action_list == NULL)
- return NULL;
- list_node = g_list_nth (cell->action_list, index);
- if (!list_node)
- return NULL;
- return (ActionInfo *) (list_node->data);
-}
-
-static void
-_gal_a11y_e_cell_destroy_action_info (gpointer action_info,
- gpointer user_data)
-{
- ActionInfo *info = (ActionInfo *)action_info;
-
- g_return_if_fail (info != NULL);
- g_free (info->name);
- g_free (info->description);
- g_free (info->keybinding);
- g_free (info);
-}
-
-
-gboolean
-gal_a11y_e_cell_add_action ( GalA11yECell * cell,
- const gchar *action_name,
- const gchar *action_description,
- const gchar *action_keybinding,
- ACTION_FUNC action_func)
-{
- ActionInfo *info;
- g_return_val_if_fail (GAL_A11Y_IS_E_CELL (cell), FALSE);
- info = g_new (ActionInfo, 1);
-
- if (action_name != NULL)
- info->name = g_strdup (action_name);
- else
- info->name = NULL;
-
- if (action_description != NULL)
- info->description = g_strdup (action_description);
- else
- info->description = NULL;
- if (action_keybinding != NULL)
- info->keybinding = g_strdup (action_keybinding);
- else
- info->keybinding = NULL;
- info->do_action_func = action_func;
-
- cell->action_list = g_list_append (cell->action_list, (gpointer) info);
- return TRUE;
-}
-
-gboolean
-gal_a11y_e_cell_remove_action (GalA11yECell *cell,
- gint action_index)
-{
- GList *list_node;
-
- g_return_val_if_fail (GAL_A11Y_IS_E_CELL (cell), FALSE);
- list_node = g_list_nth (cell->action_list, action_index);
- if (!list_node)
- return FALSE;
- g_return_val_if_fail (list_node->data != NULL, FALSE);
- _gal_a11y_e_cell_destroy_action_info (list_node->data, NULL);
- cell->action_list = g_list_remove_link (cell->action_list, list_node);
-
- return TRUE;
-}
-
-gboolean
-gal_a11y_e_cell_remove_action_by_name (GalA11yECell *cell,
- const gchar *action_name)
-{
- GList *list_node;
- gboolean action_found= FALSE;
-
- g_return_val_if_fail (GAL_A11Y_IS_E_CELL (cell), FALSE);
- for (list_node = cell->action_list; list_node && !action_found;
- list_node = list_node->next) {
- if (!g_strcasecmp (((ActionInfo *)(list_node->data))->name, action_name)) {
- action_found = TRUE;
- break;
- }
- }
-
- g_return_val_if_fail (action_found, FALSE);
- _gal_a11y_e_cell_destroy_action_info (list_node->data, NULL);
- cell->action_list = g_list_remove_link (cell->action_list, list_node);
-
- return TRUE;
-}
-
-static gint
-gal_a11y_e_cell_action_get_n_actions (AtkAction *action)
-{
- GalA11yECell *cell = GAL_A11Y_E_CELL(action);
- if (cell->action_list != NULL)
- return g_list_length (cell->action_list);
- else
- return 0;
-}
-
-static G_CONST_RETURN gchar *
-gal_a11y_e_cell_action_get_name (AtkAction *action,
- gint index)
-{
- GalA11yECell *cell = GAL_A11Y_E_CELL(action);
- ActionInfo *info = _gal_a11y_e_cell_get_action_info (cell, index);
-
- if (info == NULL)
- return NULL;
- return info->name;
-}
-
-static G_CONST_RETURN gchar *
-gal_a11y_e_cell_action_get_description (AtkAction *action,
- gint index)
-{
- GalA11yECell *cell = GAL_A11Y_E_CELL(action);
- ActionInfo *info = _gal_a11y_e_cell_get_action_info (cell, index);
-
- if (info == NULL)
- return NULL;
- return info->description;
-}
-
-static gboolean
-gal_a11y_e_cell_action_set_description (AtkAction *action,
- gint index,
- const gchar *desc)
-{
- GalA11yECell *cell = GAL_A11Y_E_CELL(action);
- ActionInfo *info = _gal_a11y_e_cell_get_action_info (cell, index);
-
- if (info == NULL)
- return FALSE;
- g_free (info->description);
- info->description = g_strdup (desc);
- return TRUE;
-}
-
-static G_CONST_RETURN gchar *
-gal_a11y_e_cell_action_get_keybinding (AtkAction *action,
- gint index)
-{
- GalA11yECell *cell = GAL_A11Y_E_CELL(action);
- ActionInfo *info = _gal_a11y_e_cell_get_action_info (cell, index);
- if (info == NULL)
- return NULL;
-
- return info->keybinding;
-}
-
-static gboolean
-idle_do_action (gpointer data)
-{
- GalA11yECell *cell;
-
- cell = GAL_A11Y_E_CELL (data);
- cell->action_idle_handler = 0;
- cell->action_func (cell);
-
- return FALSE;
-}
-
-static gboolean
-gal_a11y_e_cell_action_do_action (AtkAction *action,
- gint index)
-{
- GalA11yECell *cell = GAL_A11Y_E_CELL(action);
- ActionInfo *info = _gal_a11y_e_cell_get_action_info (cell, index);
-
- if (info == NULL)
- return FALSE;
- g_return_val_if_fail (info->do_action_func, FALSE);
- if (cell->action_idle_handler)
- return FALSE;
- cell->action_func = info->do_action_func;
- cell->action_idle_handler = g_idle_add (idle_do_action, cell);
-
- return TRUE;
-}
-
-static void
-gal_a11y_e_cell_atk_action_interface_init (AtkActionIface *iface)
-{
- g_return_if_fail (iface != NULL);
-
- iface->get_n_actions = gal_a11y_e_cell_action_get_n_actions;
- iface->do_action = gal_a11y_e_cell_action_do_action;
- iface->get_name = gal_a11y_e_cell_action_get_name;
- iface->get_description = gal_a11y_e_cell_action_get_description;
- iface->set_description = gal_a11y_e_cell_action_set_description;
- iface->get_keybinding = gal_a11y_e_cell_action_get_keybinding;
-}
-
-void
-gal_a11y_e_cell_type_add_action_interface (GType type)
-{
- static const GInterfaceInfo atk_action_info =
- {
- (GInterfaceInitFunc) gal_a11y_e_cell_atk_action_interface_init,
- (GInterfaceFinalizeFunc) NULL,
- NULL
- };
-
- g_type_add_interface_static (type, ATK_TYPE_ACTION,
- &atk_action_info);
-}
-
-gboolean
-gal_a11y_e_cell_add_state (GalA11yECell *cell,
- AtkStateType state_type,
- gboolean emit_signal)
-{
- if (!atk_state_set_contains_state (cell->state_set, state_type)) {
- gboolean rc;
-
- rc = atk_state_set_add_state (cell->state_set, state_type);
- /*
- * The signal should only be generated if the value changed,
- * not when the cell is set up. So states that are set
- * initially should pass FALSE as the emit_signal argument.
- */
-
- if (emit_signal) {
- atk_object_notify_state_change (ATK_OBJECT (cell), state_type, TRUE);
- /* If state_type is ATK_STATE_VISIBLE, additional
- notification */
- if (state_type == ATK_STATE_VISIBLE)
- g_signal_emit_by_name (cell, "visible_data_changed");
- }
-
- return rc;
- }
- else
- return FALSE;
-}
-
-gboolean
-gal_a11y_e_cell_remove_state (GalA11yECell *cell,
- AtkStateType state_type,
- gboolean emit_signal)
-{
- if (atk_state_set_contains_state (cell->state_set, state_type)) {
- gboolean rc;
-
- rc = atk_state_set_remove_state (cell->state_set, state_type);
- /*
- * The signal should only be generated if the value changed,
- * not when the cell is set up. So states that are set
- * initially should pass FALSE as the emit_signal argument.
- */
-
- if (emit_signal) {
- atk_object_notify_state_change (ATK_OBJECT (cell), state_type, FALSE);
- /* If state_type is ATK_STATE_VISIBLE, additional notification */
- if (state_type == ATK_STATE_VISIBLE)
- g_signal_emit_by_name (cell, "visible_data_changed");
- }
-
- return rc;
- }
- else
- return FALSE;
-}
-
-/**
- * gal_a11y_e_cell_get_type:
- * @void:
- *
- * Registers the &GalA11yECell class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the &GalA11yECell class.
- **/
-GType
-gal_a11y_e_cell_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- GTypeInfo info = {
- sizeof (GalA11yECellClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) eti_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (GalA11yECell),
- 0,
- (GInstanceInitFunc) eti_init,
- NULL /* value_cell */
- };
-
- static const GInterfaceInfo atk_component_info = {
- (GInterfaceInitFunc) eti_atk_component_iface_init,
- (GInterfaceFinalizeFunc) NULL,
- NULL
- };
-
- type = g_type_register_static (PARENT_TYPE, "GalA11yECell", &info, 0);
- g_type_add_interface_static (type, ATK_TYPE_COMPONENT, &atk_component_info);
- }
-
- return type;
-}
-
-AtkObject *
-gal_a11y_e_cell_new (ETableItem *item,
- ECellView *cell_view,
- AtkObject *parent,
- int model_col,
- int view_col,
- int row)
-{
- AtkObject *a11y;
-
- a11y = g_object_new (gal_a11y_e_cell_get_type (), NULL);
-
- gal_a11y_e_cell_construct (a11y,
- item,
- cell_view,
- parent,
- model_col,
- view_col,
- row);
- return a11y;
-}
-
-void
-gal_a11y_e_cell_construct (AtkObject *object,
- ETableItem *item,
- ECellView *cell_view,
- AtkObject *parent,
- int model_col,
- int view_col,
- int row)
-{
- GalA11yECell *a11y = GAL_A11Y_E_CELL (object);
- a11y->item = item;
- a11y->cell_view = cell_view;
- a11y->parent = parent;
- a11y->model_col = model_col;
- a11y->view_col = view_col;
- a11y->row = row;
- ATK_OBJECT (a11y) ->role = ATK_ROLE_TABLE_CELL;
-
-#if 0
- if (parent)
- g_object_ref (parent);
-
- if (item)
- g_object_ref (G_OBJECT (item)); /*,
- unref_item,
- a11y);*/
- if (cell_view)
- g_object_ref (G_OBJECT (cell_view)); /*,
- unref_cell,
- a11y);*/
-#endif
-}
diff --git a/a11y/e-table/gal-a11y-e-cell.h b/a11y/e-table/gal-a11y-e-cell.h
deleted file mode 100644
index 53a6c0089d..0000000000
--- a/a11y/e-table/gal-a11y-e-cell.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * Copyright (C) 2001 Chris Lahey
- */
-
-#ifndef __GAL_A11Y_E_CELL_H__
-#define __GAL_A11Y_E_CELL_H__
-
-#include <glib-object.h>
-#include <gal/e-table/e-table-item.h>
-#include <gal/e-table/e-cell.h>
-
-#define GAL_A11Y_TYPE_E_CELL (gal_a11y_e_cell_get_type ())
-#define GAL_A11Y_E_CELL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAL_A11Y_TYPE_E_CELL, GalA11yECell))
-#define GAL_A11Y_E_CELL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAL_A11Y_TYPE_E_CELL, GalA11yECellClass))
-#define GAL_A11Y_IS_E_CELL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAL_A11Y_TYPE_E_CELL))
-#define GAL_A11Y_IS_E_CELL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAL_A11Y_TYPE_E_CELL))
-
-typedef struct _GalA11yECell GalA11yECell;
-typedef struct _GalA11yECellClass GalA11yECellClass;
-typedef struct _GalA11yECellPrivate GalA11yECellPrivate;
-typedef struct _ActionInfo ActionInfo;
-typedef void (*ACTION_FUNC) (GalA11yECell *cell);
-
-
-/* This struct should actually be larger as this isn't what we derive from.
- * The GalA11yECellPrivate comes right after the parent class structure.
- **/
-struct _GalA11yECell {
- AtkObject object;
-
- ETableItem *item;
- ECellView *cell_view;
- AtkObject *parent;
- int model_col;
- int view_col;
- int row;
- AtkStateSet *state_set;
- GList *action_list;
- gint action_idle_handler;
- ACTION_FUNC action_func;
-};
-
-struct _GalA11yECellClass {
- AtkObjectClass parent_class;
-};
-
-struct _ActionInfo {
- gchar *name;
- gchar *description;
- gchar *keybinding;
- ACTION_FUNC do_action_func;
-};
-
-
-
-/* Standard Glib function */
-GType gal_a11y_e_cell_get_type (void);
-AtkObject *gal_a11y_e_cell_new (ETableItem *item,
- ECellView *cell_view,
- AtkObject *parent,
- int model_col,
- int view_col,
- int row);
-void gal_a11y_e_cell_construct (AtkObject *object,
- ETableItem *item,
- ECellView *cell_view,
- AtkObject *parent,
- int model_col,
- int view_col,
- int row);
-
-void gal_a11y_e_cell_type_add_action_interface (GType type);
-
-gboolean gal_a11y_e_cell_add_action (GalA11yECell *cell,
- const gchar *action_name,
- const gchar *action_description,
- const gchar *action_keybinding,
- ACTION_FUNC action_func);
-
-gboolean gal_a11y_e_cell_remove_action (GalA11yECell *cell,
- gint action_id);
-
-gboolean gal_a11y_e_cell_remove_action_by_name (GalA11yECell *cell,
- const gchar *action_name);
-
-gboolean gal_a11y_e_cell_add_state (GalA11yECell *cell,
- AtkStateType state_type,
- gboolean emit_signal);
-
-gboolean gal_a11y_e_cell_remove_state (GalA11yECell *cell,
- AtkStateType state_type,
- gboolean emit_signal);
-
-
-#endif /* ! __GAL_A11Y_E_CELL_H__ */
diff --git a/a11y/e-table/gal-a11y-e-table-factory.c b/a11y/e-table/gal-a11y-e-table-factory.c
deleted file mode 100644
index 14eaca3d19..0000000000
--- a/a11y/e-table/gal-a11y-e-table-factory.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * Copyright (C) 2002 Ximian, Inc.
- */
-
-#include <config.h>
-#include "gal-a11y-e-table-factory.h"
-#include "gal-a11y-e-table.h"
-
-#define CS_CLASS(factory) (G_TYPE_INSTANCE_GET_CLASS ((factory), C_TYPE_STREAM, GalA11yETableFactoryClass))
-static AtkObjectFactoryClass *parent_class;
-#define PARENT_TYPE (ATK_TYPE_OBJECT_FACTORY)
-
-/* Static functions */
-
-static GType
-gal_a11y_e_table_factory_get_accessible_type (void)
-{
- return GAL_A11Y_TYPE_E_TABLE;
-}
-
-static AtkObject*
-gal_a11y_e_table_factory_create_accessible (GObject *obj)
-{
- AtkObject *accessible;
-
- accessible = gal_a11y_e_table_new (obj);
-
- return accessible;
-}
-
-static void
-gal_a11y_e_table_factory_class_init (GalA11yETableFactoryClass *klass)
-{
- AtkObjectFactoryClass *factory_class = ATK_OBJECT_FACTORY_CLASS (klass);
-
- parent_class = g_type_class_ref (PARENT_TYPE);
-
- factory_class->create_accessible = gal_a11y_e_table_factory_create_accessible;
- factory_class->get_accessible_type = gal_a11y_e_table_factory_get_accessible_type;
-}
-
-static void
-gal_a11y_e_table_factory_init (GalA11yETableFactory *factory)
-{
-}
-
-/**
- * gal_a11y_e_table_factory_get_type:
- * @void:
- *
- * Registers the &GalA11yETableFactory class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the &GalA11yETableFactory class.
- **/
-GType
-gal_a11y_e_table_factory_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- GTypeInfo info = {
- sizeof (GalA11yETableFactoryClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) gal_a11y_e_table_factory_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (GalA11yETableFactory),
- 0,
- (GInstanceInitFunc) gal_a11y_e_table_factory_init,
- NULL /* value_table */
- };
-
- type = g_type_register_static (PARENT_TYPE, "GalA11yETableFactory", &info, 0);
- }
-
- return type;
-}
diff --git a/a11y/e-table/gal-a11y-e-table-factory.h b/a11y/e-table/gal-a11y-e-table-factory.h
deleted file mode 100644
index eb8eb55414..0000000000
--- a/a11y/e-table/gal-a11y-e-table-factory.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * Copyright (C) 2001 Chris Lahey
- */
-
-#ifndef __GAL_A11Y_E_TABLE_FACTORY_H__
-#define __GAL_A11Y_E_TABLE_FACTORY_H__
-
-#include <glib-object.h>
-#include <atk/atkobjectfactory.h>
-
-#define GAL_A11Y_TYPE_E_TABLE_FACTORY (gal_a11y_e_table_factory_get_type ())
-#define GAL_A11Y_E_TABLE_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAL_A11Y_TYPE_E_TABLE_FACTORY, GalA11yETableFactory))
-#define GAL_A11Y_E_TABLE_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAL_A11Y_TYPE_E_TABLE_FACTORY, GalA11yETableFactoryClass))
-#define GAL_A11Y_IS_E_TABLE_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAL_A11Y_TYPE_E_TABLE_FACTORY))
-#define GAL_A11Y_IS_E_TABLE_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAL_A11Y_TYPE_E_TABLE_FACTORY))
-
-typedef struct _GalA11yETableFactory GalA11yETableFactory;
-typedef struct _GalA11yETableFactoryClass GalA11yETableFactoryClass;
-
-struct _GalA11yETableFactory {
- AtkObject object;
-};
-
-struct _GalA11yETableFactoryClass {
- AtkObjectClass parent_class;
-};
-
-
-/* Standard Glib function */
-GType gal_a11y_e_table_factory_get_type (void);
-
-#endif /* ! __GAL_A11Y_E_TABLE_FACTORY_H__ */
diff --git a/a11y/e-table/gal-a11y-e-table-item-factory.c b/a11y/e-table/gal-a11y-e-table-item-factory.c
deleted file mode 100644
index c5fd5c410c..0000000000
--- a/a11y/e-table/gal-a11y-e-table-item-factory.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Authors: Yuedong Du <yuedong.du@sun.com>
- *
- * Copyright (C) 2003 Ximian, Inc.
- */
-
-#include <config.h>
-#include "gal-a11y-e-table-item-factory.h"
-#include "gal-a11y-e-table-item.h"
-#include "gal-a11y-e-table.h"
-#include <gal/e-table/e-table.h>
-#include <gal/e-table/e-tree.h>
-#include <atk/atk.h>
-
-
-#define CS_CLASS(factory) (G_TYPE_INSTANCE_GET_CLASS ((factory), C_TYPE_STREAM, GalA11yETableItemFactoryClass))
-static AtkObjectFactoryClass *parent_class;
-#define PARENT_TYPE (ATK_TYPE_OBJECT_FACTORY)
-
-/* Static functions */
-
-static GType
-gal_a11y_e_table_item_factory_get_accessible_type (void)
-{
- return GAL_A11Y_TYPE_E_TABLE_ITEM;
-}
-
-static AtkObject*
-gal_a11y_e_table_item_factory_create_accessible (GObject *obj)
-{
- AtkObject * accessible;
- ETableItem * eti;
- GnomeCanvas * gc;
- GtkWidget * table;
-
- g_return_if_fail (E_IS_TABLE_ITEM(obj));
- eti = E_TABLE_ITEM(obj);
- gc = GNOME_CANVAS_ITEM(eti)->canvas;
-
- table = gtk_widget_get_parent(GTK_WIDGET(gc));
-
- accessible = gtk_widget_get_accessible (table);
- accessible = atk_object_ref_accessible_child (accessible, 0);
-
- return accessible;
-}
-
-static void
-gal_a11y_e_table_item_factory_class_init (GalA11yETableItemFactoryClass *klass)
-{
- AtkObjectFactoryClass *factory_class = ATK_OBJECT_FACTORY_CLASS (klass);
-
- parent_class = g_type_class_ref (PARENT_TYPE);
-
- factory_class->create_accessible = gal_a11y_e_table_item_factory_create_accessible;
- factory_class->get_accessible_type = gal_a11y_e_table_item_factory_get_accessible_type;
-}
-
-static void
-gal_a11y_e_table_item_factory_init (GalA11yETableItemFactory *factory)
-{
-}
-
-/**
- * gal_a11y_e_table_factory_get_type:
- * @void:
- *
- * Registers the &GalA11yETableFactory class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the &GalA11yETableFactory class.
- **/
-GType
-gal_a11y_e_table_item_factory_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- GTypeInfo info = {
- sizeof (GalA11yETableItemFactoryClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) gal_a11y_e_table_item_factory_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (GalA11yETableItemFactory),
- 0,
- (GInstanceInitFunc) gal_a11y_e_table_item_factory_init,
- NULL /* value_table */
- };
-
- type = g_type_register_static (PARENT_TYPE, "GalA11yETableItemFactory", &info, 0);
- }
-
- return type;
-}
diff --git a/a11y/e-table/gal-a11y-e-table-item-factory.h b/a11y/e-table/gal-a11y-e-table-item-factory.h
deleted file mode 100644
index cbbff9fb18..0000000000
--- a/a11y/e-table/gal-a11y-e-table-item-factory.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Authors: * Yuedong Du <yuedong.du@sun.com>
- *
- * Copyright (C) 2003 Ximian, Inc.
- */
-
-#ifndef __GAL_A11Y_E_TABLE_ITEM_FACTORY_H__
-#define __GAL_A11Y_E_TABLE_ITEM_FACTORY_H__
-
-#include <glib-object.h>
-#include <atk/atkobjectfactory.h>
-
-#define GAL_A11Y_TYPE_E_TABLE_ITEM_FACTORY (gal_a11y_e_table_item_factory_get_type ())
-#define GAL_A11Y_E_TABLE_ITEM_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAL_A11Y_TYPE_E_TABLE_ITEM_FACTORY, GalA11yETableItemFactory))
-#define GAL_A11Y_E_TABLE_ITEM_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAL_A11Y_TYPE_E_TABLE_ITEM_FACTORY, GalA11yETableItemFactoryClass))
-#define GAL_A11Y_IS_E_TABLE_ITEM_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAL_A11Y_TYPE_E_TABLE_ITEM_FACTORY))
-#define GAL_A11Y_IS_E_TABLE_ITEM_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAL_A11Y_TYPE_E_TABLE_ITEM_FACTORY))
-
-typedef struct _GalA11yETableItemFactory GalA11yETableItemFactory;
-typedef struct _GalA11yETableItemFactoryClass GalA11yETableItemFactoryClass;
-
-struct _GalA11yETableItemFactory {
- AtkObject object;
-};
-
-struct _GalA11yETableItemFactoryClass {
- AtkObjectClass parent_class;
-};
-
-
-/* Standard Glib function */
-GType gal_a11y_e_table_item_factory_get_type (void);
-
-#endif /* ! __GAL_A11Y_E_TABLE_FACTORY_H__ */
diff --git a/a11y/e-table/gal-a11y-e-table-item.c b/a11y/e-table/gal-a11y-e-table-item.c
deleted file mode 100644
index fcfa1cc0e6..0000000000
--- a/a11y/e-table/gal-a11y-e-table-item.c
+++ /dev/null
@@ -1,1285 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Christopher James Lahey <clahey@ximian.com>
- * Bolian Yin <bolian.yin@sun.com>
- *
- * Copyright (C) 2002 Ximian, Inc.
- */
-
-#include <config.h>
-#include "gal-a11y-e-table-item.h"
-#include "gal-a11y-e-cell-registry.h"
-#include "gal-a11y-e-cell.h"
-#include "gal-a11y-util.h"
-#include <gal/e-table/e-table-subset.h>
-
-#include <atk/atkobject.h>
-#include <atk/atktable.h>
-#include <atk/atkcomponent.h>
-#include <atk/atkobjectfactory.h>
-#include <atk/atkregistry.h>
-#include <atk/atkgobjectaccessible.h>
-
-#define CS_CLASS(a11y) (G_TYPE_INSTANCE_GET_CLASS ((a11y), C_TYPE_STREAM, GalA11yETableItemClass))
-static GObjectClass *parent_class;
-static AtkComponentIface *component_parent_iface;
-static GType parent_type;
-static gint priv_offset;
-static GQuark quark_accessible_object = 0;
-#define GET_PRIVATE(object) ((GalA11yETableItemPrivate *) (((char *) object) + priv_offset))
-#define PARENT_TYPE (parent_type)
-
-struct _GalA11yETableItemPrivate {
- AtkObject *parent;
- gint index_in_parent;
- gint cols;
- gint rows;
- gpointer *cell_data;
- int selection_change_id;
- int cursor_change_id;
- ETableCol ** columns;
- ESelectionModel *selection;
-};
-
-static gboolean gal_a11y_e_table_item_ref_selection (GalA11yETableItem *a11y,
- ESelectionModel *selection);
-static gboolean gal_a11y_e_table_item_unref_selection (GalA11yETableItem *a11y);
-
-#if 0
-static void
-unref_accessible (gpointer user_data, GObject *obj_loc)
-{
- GalA11yETableItem *a11y = GAL_A11Y_E_TABLE_ITEM (user_data);
- GET_PRIVATE (a11y)->item = NULL;
- g_object_unref (a11y);
-}
-#endif
-
-inline static gint
-view_to_model_row(ETableItem *eti, int row)
-{
- if (eti->uses_source_model) {
- ETableSubset *etss = E_TABLE_SUBSET(eti->table_model);
- if (row >= 0 && row < etss->n_map) {
- eti->row_guess = row;
- return etss->map_table[row];
- } else
- return -1;
- } else
- return row;
-}
-
-inline static gint
-view_to_model_col(ETableItem *eti, int col)
-{
- ETableCol *ecol = e_table_header_get_column (eti->header, col);
- return ecol ? ecol->col_idx : -1;
-}
-
-inline static GObject *
-eti_a11y_get_gobject (AtkObject *accessible)
-{
- return atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (accessible));
-}
-
-static void
-eti_dispose (GObject *object)
-{
- gint i,j;
- GalA11yETableItem *a11y = GAL_A11Y_E_TABLE_ITEM (object);
- GalA11yETableItemPrivate *priv = GET_PRIVATE (a11y);
-
- priv->parent = NULL;
-
- if ( priv->cell_data != NULL ) {
- g_free(priv->cell_data);
- priv->cell_data = NULL;
- }
-
- if (priv->columns) {
- g_free(priv->columns);
- priv->columns = NULL;
- }
-
- if (parent_class->dispose)
- parent_class->dispose (object);
- if (priv->selection)
- gal_a11y_e_table_item_unref_selection (a11y);
-}
-
-/* Static functions */
-static AtkObject *
-eti_get_parent (AtkObject *accessible)
-{
- AtkGObjectAccessible *atk_gobj;
- GalA11yETableItem *a11y;
-
- g_return_val_if_fail (GAL_A11Y_IS_E_TABLE_ITEM (accessible), NULL);
- if (!eti_a11y_get_gobject (accessible))
- /* defunct */
- return NULL;
-
- a11y = GAL_A11Y_E_TABLE_ITEM (accessible);
- return GET_PRIVATE (a11y)->parent;
-}
-
-static gint
-eti_get_n_children (AtkObject *accessible)
-{
- AtkGObjectAccessible *atk_gobj;
-
- g_return_val_if_fail (GAL_A11Y_IS_E_TABLE_ITEM (accessible), 0);
- if (!eti_a11y_get_gobject (accessible))
- return 0;
-
- return atk_table_get_n_columns (ATK_TABLE (accessible)) *
- atk_table_get_n_rows (ATK_TABLE (accessible));
-}
-
-static AtkObject*
-eti_ref_child (AtkObject *accessible, gint index)
-{
- AtkGObjectAccessible *atk_gobj;
- ETableItem *item;
- gint col, row;
-
- g_return_val_if_fail (GAL_A11Y_IS_E_TABLE_ITEM (accessible), NULL);
- item = E_TABLE_ITEM (eti_a11y_get_gobject (accessible));
- if (!item)
- return NULL;
-
- if (index < item->cols) {
- AtkObject *child;
-
- /* A column header is required */
- child = atk_table_get_column_header (ATK_TABLE (accessible), index);
- if (child)
- g_object_ref (child);
- return child;
- }
-
- index -= item->cols;
- col = index % item->cols;
- row = index / item->cols;
-
- return atk_table_ref_at (ATK_TABLE (accessible), row, col);
-}
-
-static gint
-eti_get_index_in_parent (AtkObject *accessible)
-{
- AtkGObjectAccessible *atk_gobj;
- GalA11yETableItem *a11y;
-
- g_return_val_if_fail (GAL_A11Y_IS_E_TABLE_ITEM (accessible), -1);
- if (!eti_a11y_get_gobject (accessible))
- return -1;
-
- a11y = GAL_A11Y_E_TABLE_ITEM (accessible);
- return GET_PRIVATE (a11y)->index_in_parent;
-}
-
-static void
-eti_get_extents (AtkComponent *component,
- gint *x,
- gint *y,
- gint *width,
- gint *height,
- AtkCoordType coord_type)
-{
- ETableItem *item;
- double real_width;
- double real_height;
- int fake_width;
- int fake_height;
-
- item = E_TABLE_ITEM (eti_a11y_get_gobject (ATK_OBJECT (component)));
- if (!item)
- return;
-
- if (component_parent_iface &&
- component_parent_iface->get_extents)
- component_parent_iface->get_extents (component,
- x,
- y,
- &fake_width,
- &fake_height,
- coord_type);
-
- gtk_object_get (GTK_OBJECT (item),
- "width", &real_width,
- "height", &real_height,
- NULL);
-
- if (width)
- *width = real_width;
- if (height)
- *height = real_height;
-}
-
-static AtkObject*
-eti_ref_accessible_at_point (AtkComponent *component,
- gint x,
- gint y,
- AtkCoordType coord_type)
-{
- int row = -1;
- int col = -1;
- int x_origin, y_origin;
- ETableItem *item;
-
- item = E_TABLE_ITEM (eti_a11y_get_gobject (ATK_OBJECT (component)));
- if (!item)
- return;
-
- atk_component_get_position (component,
- &x_origin,
- &y_origin,
- coord_type);
- x -= x_origin;
- y -= y_origin;
-
- e_table_item_compute_location (item, &x, &y,
- &row, &col);
-
- if (row != -1 && col != -1) {
- return atk_table_ref_at (ATK_TABLE (component), row, col);
- } else {
- return NULL;
- }
-}
-
-
-static void
-cell_destroyed (gpointer data)
-{
- AtkObject *parent;
- gint index, n_cols;
- GalA11yETableItem * item;
- GalA11yECell * cell;
-
- g_return_if_fail (GAL_A11Y_IS_E_CELL (data));
- cell = GAL_A11Y_E_CELL (data);
-
- item = atk_gobject_accessible_for_object (GAL_A11Y_E_CELL(data)->item);
-
- g_return_if_fail (item && GAL_A11Y_IS_E_TABLE_ITEM (item));
-
- g_return_if_fail (cell->row < GET_PRIVATE(item)->rows && cell->view_col < GET_PRIVATE(item)->cols);
-
- index = cell->row * cell->item->cols + cell->view_col;
-
- if (GET_PRIVATE (item)->cell_data && GET_PRIVATE (item)->cell_data [index] == data)
- GET_PRIVATE (item)->cell_data [index] = NULL;
-}
-
-/* atk table */
-static AtkObject*
-eti_ref_at (AtkTable *table, gint row, gint column)
-{
- ETableItem *item;
- AtkObject* ret;
-
- item = E_TABLE_ITEM (eti_a11y_get_gobject (ATK_OBJECT (table)));
- if (!item)
- return NULL;
-
- if (column >= 0 &&
- column < item->cols &&
- row >= 0 &&
- row < item->rows &&
- item->cell_views_realized) {
- ECellView *cell_view = item->cell_views[column];
- ETableCol *ecol = e_table_header_get_column (item->header, column);
- gpointer * cell_data;
-
- cell_data = GET_PRIVATE (table)->cell_data;
-
- if (cell_data[row*item->cols + column] == NULL) {
- ret = gal_a11y_e_cell_registry_get_object (NULL,
- item,
- cell_view,
- ATK_OBJECT (table),
- ecol->col_idx,
- column,
- row);
- cell_data[row*item->cols + column] = ret;
- if (ATK_IS_OBJECT (ret))
- g_object_weak_ref (G_OBJECT (ret),
- (GWeakNotify) cell_destroyed,
- ret);
-
- else
- ret = NULL;
- } else {
- ret = (AtkObject *) cell_data[row*item->cols + column];
- if (ATK_IS_OBJECT (ret)) {
- g_object_ref (ret);
- } else {
- ret = NULL;
- }
- }
-
-
- return ret;
- }
-
- return NULL;
-}
-
-static gint
-eti_get_index_at (AtkTable *table, gint row, gint column)
-{
- ETableItem *item;
-
- item = E_TABLE_ITEM (eti_a11y_get_gobject (ATK_OBJECT (table)));
- if (!item)
- return -1;
-
- return column + row * item->cols;
-}
-
-static gint
-eti_get_column_at_index (AtkTable *table, gint index)
-{
- ETableItem *item;
-
- item = E_TABLE_ITEM (eti_a11y_get_gobject (ATK_OBJECT (table)));
- if (!item)
- return -1;
-
- return index % item->cols;
-}
-
-static gint
-eti_get_row_at_index (AtkTable *table, gint index)
-{
- ETableItem *item;
-
- item = E_TABLE_ITEM (eti_a11y_get_gobject (ATK_OBJECT (table)));
- if (!item)
- return -1;
-
- return index / item->cols;
-}
-
-static gint
-eti_get_n_columns (AtkTable *table)
-{
- ETableItem *item;
-
- item = E_TABLE_ITEM (eti_a11y_get_gobject (ATK_OBJECT (table)));
- if (!item)
- return -1;
-
- return item->cols;
-}
-
-static gint
-eti_get_n_rows (AtkTable *table)
-{
- ETableItem *item;
-
- item = E_TABLE_ITEM (eti_a11y_get_gobject (ATK_OBJECT (table)));
- if (!item)
- return -1;
-
- return item->rows;
-}
-
-static gint
-eti_get_column_extent_at (AtkTable *table,
- gint row,
- gint column)
-{
- ETableItem *item;
- int width;
-
- item = E_TABLE_ITEM (eti_a11y_get_gobject (ATK_OBJECT (table)));
- if (!item)
- return -1;
-
- e_table_item_get_cell_geometry (item,
- &row,
- &column,
- NULL,
- NULL,
- &width,
- NULL);
-
- return width;
-}
-
-static gint
-eti_get_row_extent_at (AtkTable *table,
- gint row,
- gint column)
-{
- ETableItem *item;
- int height;
-
- item = E_TABLE_ITEM (eti_a11y_get_gobject (ATK_OBJECT (table)));
- if (!item)
- return -1;
-
- e_table_item_get_cell_geometry (item,
- &row,
- &column,
- NULL,
- NULL,
- NULL,
- &height);
-
- return height;
-}
-
-static AtkObject *
-eti_get_caption (AtkTable *table)
-{
- /* Unimplemented */
- return NULL;
-}
-
-static G_CONST_RETURN gchar *
-eti_get_column_description (AtkTable *table,
- gint column)
-{
- ETableItem *item;
- ETableCol *ecol;
-
- item = E_TABLE_ITEM (eti_a11y_get_gobject (ATK_OBJECT (table)));
- if (!item)
- return NULL;
-
- ecol = e_table_header_get_column (item->header, column);
-
- return ecol->text;
-}
-
-static AtkObject *
-eti_get_column_header (AtkTable *table, gint column)
-{
- ETableItem *item;
- ETableCol *ecol;
- AtkObject *atk_obj = NULL;
- ECell *ecell;
-
- item = E_TABLE_ITEM (eti_a11y_get_gobject (ATK_OBJECT (table)));
- if (!item)
- return NULL;
-
- ecol = e_table_header_get_column (item->header, column);
- ecell = ecol->ecell;
- if (ecell)
- atk_obj = atk_gobject_accessible_for_object (G_OBJECT (ecell));
- return atk_obj;
-}
-
-static G_CONST_RETURN gchar *
-eti_get_row_description (AtkTable *table,
- gint row)
-{
- /* Unimplemented */
- return NULL;
-}
-
-static AtkObject *
-eti_get_row_header (AtkTable *table,
- gint row)
-{
- /* Unimplemented */
- return NULL;
-}
-
-static AtkObject *
-eti_get_summary (AtkTable *table)
-{
- /* Unimplemented */
- return NULL;
-}
-
-static gboolean
-table_is_row_selected (AtkTable *table, gint row)
-{
- ETableItem *item;
-
- item = E_TABLE_ITEM (eti_a11y_get_gobject (ATK_OBJECT (table)));
- if (!item)
- return FALSE;
-
- return e_selection_model_is_row_selected(item->selection, row);
-}
-
-static gboolean
-table_is_selected (AtkTable *table, gint row, gint column)
-{
- return table_is_row_selected (table, row);
-}
-
-static gint
-table_get_selected_rows (AtkTable *table, gint **rows_selected)
-{
- ETableItem *item;
- gint n_selected, row, index_selected;
-
- item = E_TABLE_ITEM (eti_a11y_get_gobject (ATK_OBJECT (table)));
- if (!item)
- return 0;
-
- n_selected = e_selection_model_selected_count (item->selection);
- if (rows_selected) {
- *rows_selected = (gint *) g_malloc (n_selected * sizeof (gint));
-
- index_selected = 0;
- for (row = 0; row < item->rows && index_selected < n_selected; ++row) {
- if (atk_table_is_row_selected (table, row)) {
- (*rows_selected)[index_selected] = row;
- ++index_selected;
- }
- }
- }
- return n_selected;
-}
-
-static gboolean
-table_add_row_selection (AtkTable *table, gint row)
-{
- ETableItem *item;
- gint cursor_row, cursor_col, row_count;
- GdkModifierType state = GDK_CONTROL_MASK;
- ESelectionModel *selection;
-
- item = E_TABLE_ITEM (eti_a11y_get_gobject (ATK_OBJECT (table)));
- if (!item)
- return FALSE;
-
- if (table_is_row_selected (table, row))
- return TRUE;
- e_selection_model_toggle_single_row (item->selection,
- view_to_model_row (item, row));
-
- return TRUE;
-}
-
-static gboolean
-table_remove_row_selection (AtkTable *table, gint row)
-{
- ETableItem *item;
-
- item = E_TABLE_ITEM (eti_a11y_get_gobject (ATK_OBJECT (table)));
- if (!item)
- return FALSE;
-
- if (!atk_table_is_row_selected (table, row))
- return TRUE;
- e_selection_model_toggle_single_row (item->selection, row);
- return TRUE;
-}
-
-static void
-eti_atk_table_iface_init (AtkTableIface *iface)
-{
- iface->ref_at = eti_ref_at;
- iface->get_index_at = eti_get_index_at;
- iface->get_column_at_index = eti_get_column_at_index;
- iface->get_row_at_index = eti_get_row_at_index;
- iface->get_n_columns = eti_get_n_columns;
- iface->get_n_rows = eti_get_n_rows;
- iface->get_column_extent_at = eti_get_column_extent_at;
- iface->get_row_extent_at = eti_get_row_extent_at;
- iface->get_caption = eti_get_caption;
- iface->get_column_description = eti_get_column_description;
- iface->get_column_header = eti_get_column_header;
- iface->get_row_description = eti_get_row_description;
- iface->get_row_header = eti_get_row_header;
- iface->get_summary = eti_get_summary;
-
- iface->is_row_selected = table_is_row_selected;
- iface->is_selected = table_is_selected;
- iface->get_selected_rows = table_get_selected_rows;
- iface->add_row_selection = table_add_row_selection;
- iface->remove_row_selection = table_remove_row_selection;
-}
-
-static void
-eti_atk_component_iface_init (AtkComponentIface *iface)
-{
- component_parent_iface = g_type_interface_peek_parent (iface);
-
- iface->ref_accessible_at_point = eti_ref_accessible_at_point;
- iface->get_extents = eti_get_extents;
-}
-
-static void
-eti_rows_inserted (ETableModel * model, int row, int count,
- AtkObject * table_item)
-{
- gint n_cols,n_rows,i,j;
- gint size;
- gpointer *cell_data;
- ETableItem *item = E_TABLE_ITEM (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (table_item)));
- GalA11yETableItem * item_a11y;
- gint old_nrows;
-
- g_return_if_fail (table_item);
- item_a11y = GAL_A11Y_E_TABLE_ITEM (table_item);
-
- n_cols = atk_table_get_n_columns (ATK_TABLE(table_item));
- n_rows = atk_table_get_n_rows (ATK_TABLE(table_item));
-
- old_nrows = GET_PRIVATE(item_a11y)->rows;
-
- g_return_if_fail (n_cols > 0 && n_rows > 0);
- g_return_if_fail (old_nrows == n_rows - count);
-
- cell_data = GET_PRIVATE(table_item)->cell_data;
- GET_PRIVATE(table_item)->cell_data = g_realloc (cell_data, (n_rows*n_cols) * sizeof(gpointer));
- cell_data = GET_PRIVATE(table_item)->cell_data;
-
- GET_PRIVATE(table_item)->rows = n_rows;
-
- /* If rows are insert in the middle of a table. */
- if (row + count < n_rows ) {
- memmove(&cell_data[(row+count)*n_cols], &cell_data[row*n_cols],
- (old_nrows-row)*n_cols*sizeof(gpointer));
-
- /* Update cell's index. */
- for (i = row + count; i < n_rows; i ++) {
- for (j = 0; j < n_cols; j ++)
- if (cell_data[i*n_cols + j] != NULL) {
- AtkObject * a11y;
-
- a11y = ATK_OBJECT(cell_data[i*n_cols + j]);
- GAL_A11Y_E_CELL(a11y)->row = i;
- }
- }
- }
-
- /* Clear cache for the new added rows. */
- for (i = row ; i < row+count; i ++)
- for (j = 0 ; j < n_cols; j ++)
- cell_data [i*n_cols + j] = NULL;
-
- g_signal_emit_by_name (table_item, "row-inserted", row,
- count, NULL);
-
- for (i = row; i < (row + count); i ++) {
- for (j = 0; j < n_cols; j ++) {
- g_signal_emit_by_name (table_item,
- "children_changed::add",
- ( (i*n_cols) + j), NULL, NULL);
- }
- }
-
- g_signal_emit_by_name (table_item, "visible-data-changed");
-}
-
-static void
-eti_rows_deleted (ETableModel * model, int row, int count,
- AtkObject * table_item)
-{
- gint i,j, n_rows, n_cols, old_nrows;
- gpointer *cell_data;
- ETableItem *item = E_TABLE_ITEM (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (table_item)));
-
- n_rows = atk_table_get_n_rows (ATK_TABLE(table_item));
- n_cols = atk_table_get_n_columns (ATK_TABLE(table_item));
-
- cell_data = GET_PRIVATE(table_item)->cell_data;
- old_nrows = GET_PRIVATE(table_item)->rows;
-
- g_return_if_fail ( row+count <= old_nrows);
- g_return_if_fail (old_nrows == n_rows + count);
- GET_PRIVATE(table_item)->rows = n_rows;
-
- /* DEFUNCT the deleted cells. */
- for (i = row; i < row+count; i ++) {
- for (j = 0; j < n_cols; j ++) {
- if (cell_data[i*n_cols + j] != NULL) {
- AtkObject * a11y;
-
- a11y = ATK_OBJECT(cell_data[i*n_cols + j]);
- gal_a11y_e_cell_add_state (GAL_A11Y_E_CELL(a11y), ATK_STATE_DEFUNCT, TRUE);
- cell_data[i*n_cols + j] = NULL;
- }
- }
- }
-
- /* If more rows left, update the a11y object. */
- if (old_nrows > row + count) {
-
- /* Remove the defunct cells in cache. */
- memmove (&cell_data[row*n_cols], &cell_data[(row+count)*n_cols],
- ( old_nrows-row-count)*n_cols*sizeof(gpointer));
-
- GET_PRIVATE(table_item)->cell_data = g_realloc (cell_data, n_rows*n_cols*sizeof(gpointer));
- cell_data = GET_PRIVATE(table_item)->cell_data;
-
- /* Update index of cells below the deleted rows. */
- for (i = row; i < n_rows; i ++) {
- for (j = 0; j < n_cols; j ++) {
- if (cell_data[i*n_cols + j] != NULL) {
- AtkObject * a11y;
-
- a11y = ATK_OBJECT(cell_data[i*n_cols + j]);
- GAL_A11Y_E_CELL(a11y)->row = i;
- }
- }
- }
- }
-
- g_signal_emit_by_name (table_item, "row-deleted", row,
- count, NULL);
-
- for (i = row; i < (row + count); i ++) {
- for (j = 0; j < n_cols; j ++) {
- g_signal_emit_by_name (table_item,
- "children_changed::remove",
- ( (i*n_cols) + j), NULL, NULL);
- }
- }
- g_signal_emit_by_name (table_item, "visible-data-changed");
-}
-
-enum {
- ETI_HEADER_UNCHANGED = 0,
- ETI_HEADER_REORDERED,
- ETI_HEADER_NEW_ADDED,
- ETI_HEADER_REMOVED,
-};
-
-/*
- * 1. Check what actually happened: column reorder, remove or add
- * 2. Update cache
- * 3. Emit signals
- */
-static void
-eti_header_structure_changed (ETableHeader *eth, AtkObject *a11y)
-{
-
- gboolean reorder_found=FALSE, added_found=FALSE, removed_found=FALSE;
- GalA11yETableItem * a11y_item;
- ETableCol ** cols, **prev_cols;
- GalA11yETableItemPrivate *priv;
- gint *state = NULL, *prev_state = NULL, *reorder = NULL;
- gint i,j,n_rows,n_cols, prev_n_cols;
- gpointer * cell_data, * tmp;
-
- a11y_item = GAL_A11Y_E_TABLE_ITEM (a11y);
- priv = GET_PRIVATE (a11y_item);
-
- g_return_if_fail (priv && priv->cell_data);
- cell_data = priv->cell_data ;
-
- /* Assume rows do not changed. */
- n_rows = priv->rows;
-
- prev_n_cols = priv->cols;
- prev_cols = priv->columns;
-
- cols = e_table_header_get_columns (eth);
- n_cols = eth->col_count;
-
- g_return_if_fail (cols && prev_cols && n_cols > 0);
-
- /* Init to ETI_HEADER_UNCHANGED. */
- state = g_malloc0 (sizeof (gint) * n_cols);
- prev_state = g_malloc0 (sizeof (gint) * prev_n_cols);
- reorder = g_malloc0 (sizeof (gint) * n_cols);
-
- /* Compare with previously saved column headers. */
- for ( i = 0 ; i < n_cols && cols[i]; i ++ ) {
- for ( j = 0 ; j < prev_n_cols && prev_cols[j]; j ++ ) {
- if ( prev_cols [j] == cols[i] && i != j ) {
-
- reorder_found = TRUE;
- state [i] = ETI_HEADER_REORDERED;
- reorder [i] = j;
-
- break;
- } else if (prev_cols[j] == cols[i]) {
- /* OK, this column is not changed. */
- break;
- }
- }
-
- /* cols[i] is new added column. */
- if ( j == prev_n_cols ) {
- gint row;
-
- added_found = TRUE;
- state[i] = ETI_HEADER_NEW_ADDED;
- }
- }
-
- /* Now try to find if there are removed columns. */
- for (i = 0 ; i < prev_n_cols && prev_cols[i]; i ++) {
- for (j = 0 ; j < n_cols && cols[j]; j ++)
- if ( prev_cols [j] == cols[i] )
- break;
-
- /* Removed columns found. */
- if ( j == n_cols ) {
- removed_found = TRUE;
- prev_state[j] = ETI_HEADER_REMOVED;
- }
- }
-
- /* If nothing interesting just return. */
- if (!reorder_found && !added_found && !removed_found)
- return;
-
- /* Now update our cache. */
- tmp = g_malloc0 (n_rows*n_cols*sizeof(gpointer));
- g_return_if_fail (tmp);
-
- for (i = 0 ; i < n_rows; i ++) {
- for ( j = 0 ; j < n_cols; j ++ ) {
- if ( state[j] == ETI_HEADER_REORDERED ) {
- tmp [i*n_cols+j] = cell_data[i*prev_n_cols+reorder[j]];
- if (tmp[i*n_cols+j] && ATK_IS_OBJECT(tmp[i*n_cols+j])) {
- GAL_A11Y_E_CELL(tmp[i*n_cols+j])->view_col = j;
- }
- } else if (state[j] == ETI_HEADER_UNCHANGED) {
- tmp [i*n_cols+j] = cell_data[i*prev_n_cols+j];
- } /* else: new added, keep NULL. */
- }
- }
-
- g_free (cell_data);
- priv->cell_data = tmp;
-
- /* Emit signals */
- if (reorder_found)
- g_signal_emit_by_name (G_OBJECT(a11y_item), "column_reordered");
-
-
- if (removed_found) {
- for (i = 0; i < prev_n_cols; i ++ ) {
- if (prev_state[i] == ETI_HEADER_REMOVED) {
- g_signal_emit_by_name (G_OBJECT(a11y_item), "column-deleted", i, 1);
- for (j = 0 ; j < n_rows; j ++)
- g_signal_emit_by_name (G_OBJECT(a11y_item), "children_changed::remove", (j*prev_n_cols+i), NULL, NULL);
- }
- }
- }
-
- if (added_found) {
- for ( i = 0; i < n_cols; i ++ ) {
- if (state[i] == ETI_HEADER_NEW_ADDED) {
- g_signal_emit_by_name (G_OBJECT(a11y_item), "column-inserted", i, 1);
- for (j = 0 ; j < n_rows; j ++)
- g_signal_emit_by_name (G_OBJECT(a11y_item), "children_changed::add", (j*n_cols+i), NULL, NULL);
- }
- }
- }
-
- priv->cols = n_cols;
-
- g_free (state);
- g_free (reorder);
- g_free (prev_state);
-
- g_free (priv->columns);
- priv->columns = cols;
-}
-
-
-static void
-eti_real_initialize (AtkObject *obj,
- gpointer data)
-{
- ETableItem * eti;
- ETableModel * model;
-
- ATK_OBJECT_CLASS (parent_class)->initialize (obj, data);
- eti = E_TABLE_ITEM (data);
-
- model = eti->table_model;
-
- g_signal_connect (model, "model-rows-inserted",
- G_CALLBACK (eti_rows_inserted),
- obj);
- g_signal_connect (model, "model-rows-deleted",
- G_CALLBACK (eti_rows_deleted),
- obj);
- g_signal_connect (G_OBJECT (eti->header), "structure_change",
- G_CALLBACK (eti_header_structure_changed), obj);
-
-}
-
-static void
-eti_class_init (GalA11yETableItemClass *klass)
-{
- AtkObjectClass *atk_object_class = ATK_OBJECT_CLASS (klass);
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- quark_accessible_object = g_quark_from_static_string ("gtk-accessible-object");
-
- parent_class = g_type_class_ref (PARENT_TYPE);
-
- object_class->dispose = eti_dispose;
-
- atk_object_class->get_parent = eti_get_parent;
- atk_object_class->get_n_children = eti_get_n_children;
- atk_object_class->ref_child = eti_ref_child;
- atk_object_class->get_index_in_parent = eti_get_index_in_parent;
- atk_object_class->initialize = eti_real_initialize;
-}
-
-static void
-eti_init (GalA11yETableItem *a11y)
-{
- GalA11yETableItemPrivate *priv;
-
- priv = GET_PRIVATE (a11y);
-
- priv->parent = NULL;
- priv->index_in_parent = -1;
- priv->selection_change_id = 0;
- priv->cursor_change_id = 0;
- priv->selection = NULL;
-}
-
-/* atk selection */
-
-static void atk_selection_interface_init (AtkSelectionIface *iface);
-static gboolean selection_add_selection (AtkSelection *selection,
- gint i);
-static gboolean selection_clear_selection (AtkSelection *selection);
-static AtkObject* selection_ref_selection (AtkSelection *selection,
- gint i);
-static gint selection_get_selection_count (AtkSelection *selection);
-static gboolean selection_is_child_selected (AtkSelection *selection,
- gint i);
-
-/* callbacks */
-static void eti_a11y_selection_model_removed_cb (ETableItem *eti,
- ESelectionModel *selection,
- gpointer data);
-static void eti_a11y_selection_model_added_cb (ETableItem *eti,
- ESelectionModel *selection,
- gpointer data);
-static void eti_a11y_selection_changed_cb (ESelectionModel *selection,
- GalA11yETableItem *a11y);
-static void eti_a11y_cursor_changed_cb (ESelectionModel *selection,
- int row, int col,
- GalA11yETableItem *a11y);
-
-/**
- * gal_a11y_e_table_item_get_type:
- * @void:
- *
- * Registers the &GalA11yETableItem class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the &GalA11yETableItem class.
- **/
-GType
-gal_a11y_e_table_item_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- AtkObjectFactory *factory;
-
- GTypeInfo info = {
- sizeof (GalA11yETableItemClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) eti_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (GalA11yETableItem),
- 0,
- (GInstanceInitFunc) eti_init,
- NULL /* value_table_item */
- };
-
- static const GInterfaceInfo atk_component_info = {
- (GInterfaceInitFunc) eti_atk_component_iface_init,
- (GInterfaceFinalizeFunc) NULL,
- NULL
- };
- static const GInterfaceInfo atk_table_info = {
- (GInterfaceInitFunc) eti_atk_table_iface_init,
- (GInterfaceFinalizeFunc) NULL,
- NULL
- };
-
- static const GInterfaceInfo atk_selection_info = {
- (GInterfaceInitFunc) atk_selection_interface_init,
- (GInterfaceFinalizeFunc) NULL,
- NULL
- };
-
-
- factory = atk_registry_get_factory (atk_get_default_registry (), GNOME_TYPE_CANVAS_ITEM);
- parent_type = atk_object_factory_get_accessible_type (factory);
-
- type = gal_a11y_type_register_static_with_private (PARENT_TYPE, "GalA11yETableItem", &info, 0,
- sizeof (GalA11yETableItemPrivate), &priv_offset);
-
- g_type_add_interface_static (type, ATK_TYPE_COMPONENT, &atk_component_info);
- g_type_add_interface_static (type, ATK_TYPE_TABLE, &atk_table_info);
- g_type_add_interface_static (type, ATK_TYPE_SELECTION, &atk_selection_info);
- }
-
- return type;
-}
-
-AtkObject *
-gal_a11y_e_table_item_new (AtkObject *parent,
- ETableItem *item,
- int index_in_parent)
-{
- GalA11yETableItem *a11y;
- int n;
-
- a11y = g_object_new (gal_a11y_e_table_item_get_type (), NULL);
-
- atk_object_initialize (ATK_OBJECT (a11y), item);
-
- GET_PRIVATE (a11y)->parent = parent;
- GET_PRIVATE (a11y)->index_in_parent = index_in_parent;
-
- g_return_val_if_fail (item->cols >= 0 && item->rows >= 0, NULL);
- /* Initialize cell data. */
- n = item->cols * item->rows;
- GET_PRIVATE (a11y)->cols = item->cols;
- GET_PRIVATE (a11y)->rows = item->rows;
- if (n > 0) {
- GET_PRIVATE (a11y)->cell_data = g_malloc0(n*sizeof(gpointer));
- /* memory error. */
- if ( GET_PRIVATE (a11y)->cell_data == NULL)
- return NULL;
- } else
- GET_PRIVATE (a11y)->cell_data = NULL;
-
-
- GET_PRIVATE (a11y)->columns = e_table_header_get_columns (item->header);
- if ( GET_PRIVATE (a11y)->columns == NULL)
- return NULL;
-
- if (item) {
- g_signal_connect (G_OBJECT(item), "selection_model_removed",
- G_CALLBACK (eti_a11y_selection_model_removed_cb), NULL);
- g_signal_connect (G_OBJECT(item), "selection_model_added",
- G_CALLBACK (eti_a11y_selection_model_added_cb), NULL);
- if (item->selection)
- gal_a11y_e_table_item_ref_selection (a11y,
- item->selection);
- }
- if (parent)
- g_object_ref (parent);
-
-#if 0
- if (item)
- g_object_weak_ref (G_OBJECT (item),
- unref_accessible,
- a11y);
-#endif
-
- return ATK_OBJECT (a11y);
-}
-
-static gboolean
-gal_a11y_e_table_item_ref_selection (GalA11yETableItem *a11y,
- ESelectionModel *selection)
-{
- GalA11yETableItemPrivate *priv;
-
- g_return_val_if_fail (a11y && selection, FALSE);
-
- priv = GET_PRIVATE (a11y);
- priv->selection_change_id = g_signal_connect (
- G_OBJECT(selection), "selection_changed",
- G_CALLBACK (eti_a11y_selection_changed_cb), a11y);
- priv->cursor_change_id = g_signal_connect (
- G_OBJECT(selection), "cursor_changed",
- G_CALLBACK (eti_a11y_cursor_changed_cb), a11y);
-
- priv->selection = selection;
- g_object_ref (selection);
-
- return TRUE;
-}
-
-static gboolean
-gal_a11y_e_table_item_unref_selection (GalA11yETableItem *a11y)
-{
- GalA11yETableItemPrivate *priv;
-
- g_return_val_if_fail (a11y, FALSE);
-
- priv = GET_PRIVATE (a11y);
-
- g_return_val_if_fail (priv->selection_change_id != 0, FALSE);
- g_return_val_if_fail (priv->cursor_change_id != 0, FALSE);
-
-
- g_signal_handler_disconnect (priv->selection,
- priv->selection_change_id);
- g_signal_handler_disconnect (priv->selection,
- priv->cursor_change_id);
- priv->cursor_change_id = 0;
- priv->selection_change_id = 0;
-
- g_object_unref (priv->selection);
- priv->selection = NULL;
-
- return TRUE;
-}
-
-/* callbacks */
-
-static void
-eti_a11y_selection_model_removed_cb (ETableItem *eti, ESelectionModel *selection,
- gpointer data)
-{
- AtkObject *atk_obj;
- GalA11yETableItem *a11y;
-
- g_return_if_fail (E_IS_TABLE_ITEM (eti));
- g_return_if_fail (E_IS_SELECTION_MODEL (selection));
-
- atk_obj = atk_gobject_accessible_for_object (G_OBJECT (eti));
- a11y = GAL_A11Y_E_TABLE_ITEM (atk_obj);
-
- if (selection == GET_PRIVATE (a11y)->selection)
- gal_a11y_e_table_item_unref_selection (a11y);
-}
-
-static void
-eti_a11y_selection_model_added_cb (ETableItem *eti, ESelectionModel *selection,
- gpointer data)
-{
- AtkObject *atk_obj;
- GalA11yETableItem *a11y;
-
- g_return_if_fail (E_IS_TABLE_ITEM (eti));
- g_return_if_fail (E_IS_SELECTION_MODEL (selection));
-
- atk_obj = atk_gobject_accessible_for_object (G_OBJECT (eti));
- a11y = GAL_A11Y_E_TABLE_ITEM (atk_obj);
-
- if (GET_PRIVATE (a11y)->selection)
- gal_a11y_e_table_item_unref_selection (a11y);
- gal_a11y_e_table_item_ref_selection (a11y, selection);
-}
-
-static void
-eti_a11y_selection_changed_cb (ESelectionModel *selection, GalA11yETableItem *a11y)
-{
- g_return_if_fail (GAL_A11Y_IS_E_TABLE_ITEM (a11y));
-
- g_signal_emit_by_name (a11y, "selection_changed");
-}
-
-static void
-eti_a11y_cursor_changed_cb (ESelectionModel *selection,
- int row, int col, GalA11yETableItem *a11y)
-{
- AtkObject * cell;
- g_return_if_fail (GAL_A11Y_IS_E_TABLE_ITEM (a11y));
-
- g_signal_emit_by_name (a11y, "selection_changed");
-
- cell = atk_table_ref_at (ATK_TABLE (a11y), row, col);
- if (ATK_IS_OBJECT (cell))
- g_signal_emit_by_name (a11y,
- "active-descendant-changed",
- cell);
-}
-
-/* atk selection */
-
-static void atk_selection_interface_init (AtkSelectionIface *iface)
-{
- g_return_if_fail (iface != NULL);
- iface->add_selection = selection_add_selection;
- iface->clear_selection = selection_clear_selection;
- iface->ref_selection = selection_ref_selection;
- iface->get_selection_count = selection_get_selection_count;
- iface->is_child_selected = selection_is_child_selected;
-}
-
-static gboolean
-selection_add_selection (AtkSelection *selection, gint index)
-{
- AtkTable *table;
- gint row, col;
- ETableItem *item;
-
- item = E_TABLE_ITEM (eti_a11y_get_gobject (ATK_OBJECT (selection)));
- if (!item)
- return FALSE;
-
- table = ATK_TABLE (selection);
-
- row = atk_table_get_row_at_index (table, index);
- atk_table_add_row_selection (table, row);
-
- col = atk_table_get_column_at_index (table, index);
- e_selection_model_change_cursor (item->selection,
- view_to_model_row (item, row),
- view_to_model_col (item, col));
- e_selection_model_cursor_changed (item->selection,
- view_to_model_row (item, row),
- view_to_model_col (item, col));
- e_selection_model_cursor_activated (item->selection,
- view_to_model_row (item, row),
- view_to_model_col (item, col));
- return TRUE;
-}
-
-static gboolean
-selection_clear_selection (AtkSelection *selection)
-{
- ETableItem *item;
-
- item = E_TABLE_ITEM (eti_a11y_get_gobject (ATK_OBJECT (selection)));
- if (!item)
- return FALSE;
-
- e_selection_model_clear (item->selection);
- return TRUE;
-}
-
-static AtkObject *
-selection_ref_selection (AtkSelection *selection, gint index)
-{
- AtkTable *table;
- gint row, col;
-
- table = ATK_TABLE (selection);
- row = atk_table_get_row_at_index (table, index);
- col = atk_table_get_column_at_index (table, index);
- if (!atk_table_is_row_selected (table, row))
- return NULL;
-
- return atk_table_ref_at (table, row, col);
-}
-
-static gint
-selection_get_selection_count (AtkSelection *selection)
-{
- AtkTable *table;
- gint n_selected;
-
- table = ATK_TABLE (selection);
- n_selected = atk_table_get_selected_rows (table, NULL);
- if (n_selected > 0)
- n_selected *= atk_table_get_n_columns (table);
- return n_selected;
-}
-
-static gboolean
-selection_is_child_selected (AtkSelection *selection, gint i)
-{
- gint row;
-
- row = atk_table_get_row_at_index (ATK_TABLE (selection), i);
- return atk_table_is_row_selected (ATK_TABLE (selection), row);
-}
diff --git a/a11y/e-table/gal-a11y-e-table-item.h b/a11y/e-table/gal-a11y-e-table-item.h
deleted file mode 100644
index f3a447131d..0000000000
--- a/a11y/e-table/gal-a11y-e-table-item.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * Copyright (C) 2001 Chris Lahey
- */
-
-#ifndef __GAL_A11Y_E_TABLE_ITEM_H__
-#define __GAL_A11Y_E_TABLE_ITEM_H__
-
-#include <glib-object.h>
-#include <gal/e-table/e-table-item.h>
-#include <atk/atkgobjectaccessible.h>
-
-#define GAL_A11Y_TYPE_E_TABLE_ITEM (gal_a11y_e_table_item_get_type ())
-#define GAL_A11Y_E_TABLE_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAL_A11Y_TYPE_E_TABLE_ITEM, GalA11yETableItem))
-#define GAL_A11Y_E_TABLE_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAL_A11Y_TYPE_E_TABLE_ITEM, GalA11yETableItemClass))
-#define GAL_A11Y_IS_E_TABLE_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAL_A11Y_TYPE_E_TABLE_ITEM))
-#define GAL_A11Y_IS_E_TABLE_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAL_A11Y_TYPE_E_TABLE_ITEM))
-
-typedef struct _GalA11yETableItem GalA11yETableItem;
-typedef struct _GalA11yETableItemClass GalA11yETableItemClass;
-typedef struct _GalA11yETableItemPrivate GalA11yETableItemPrivate;
-
-/* This struct should actually be larger as this isn't what we derive from.
- * The GalA11yETableItemPrivate comes right after the parent class structure.
- **/
-struct _GalA11yETableItem {
- AtkGObjectAccessible parent;
-};
-
-struct _GalA11yETableItemClass {
- AtkGObjectAccessibleClass parent_class;
-};
-
-
-/* Standard Glib function */
-GType gal_a11y_e_table_item_get_type (void);
-AtkObject *gal_a11y_e_table_item_new (AtkObject *parent,
- ETableItem *item,
- int index_in_parent);
-
-#endif /* ! __GAL_A11Y_E_TABLE_ITEM_H__ */
diff --git a/a11y/e-table/gal-a11y-e-table.c b/a11y/e-table/gal-a11y-e-table.c
deleted file mode 100644
index 6cd87f41c6..0000000000
--- a/a11y/e-table/gal-a11y-e-table.c
+++ /dev/null
@@ -1,157 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * Copyright (C) 2002 Ximian, Inc.
- */
-
-#include <config.h>
-#include "gal-a11y-e-table.h"
-#include "gal-a11y-e-table-item.h"
-#include "gal-a11y-util.h"
-#include <gal/e-table/e-table.h>
-#include <gal/e-table/e-table-group.h>
-#include <gal/e-table/e-table-group-leaf.h>
-
-#define CS_CLASS(a11y) (G_TYPE_INSTANCE_GET_CLASS ((a11y), C_TYPE_STREAM, GalA11yETableClass))
-static AtkObjectClass *parent_class;
-static GType parent_type;
-static gint priv_offset;
-#define GET_PRIVATE(object) ((GalA11yETablePrivate *) (((char *) object) + priv_offset))
-#define PARENT_TYPE (parent_type)
-
-struct _GalA11yETablePrivate {
- AtkObject *child_item;
-};
-
-/* Static functions */
-
-static void
-init_child_item (GalA11yETable *a11y)
-{
- GalA11yETablePrivate *priv = GET_PRIVATE (a11y);
- ETable *table = E_TABLE (GTK_ACCESSIBLE (a11y)->widget);
- if (priv->child_item == NULL) {
- priv->child_item = gal_a11y_e_table_item_new (ATK_OBJECT (a11y), E_TABLE_GROUP_LEAF (table->group)->item, 0);
- priv->child_item->role = ATK_ROLE_TABLE;
- }
-}
-
-static AtkObject*
-et_ref_accessible_at_point (AtkComponent *component,
- gint x,
- gint y,
- AtkCoordType coord_type)
-{
- GalA11yETable *a11y = GAL_A11Y_E_TABLE (component);
- init_child_item (a11y);
- return GET_PRIVATE (a11y)->child_item;
-}
-
-static gint
-et_get_n_children (AtkObject *accessible)
-{
- return 1;
-}
-
-static AtkObject*
-et_ref_child (AtkObject *accessible,
- gint i)
-{
- GalA11yETable *a11y = GAL_A11Y_E_TABLE (accessible);
- if (i != 0)
- return NULL;
- init_child_item (a11y);
- g_object_ref (GET_PRIVATE (a11y)->child_item);
- return GET_PRIVATE (a11y)->child_item;
-}
-
-static void
-et_class_init (GalA11yETableClass *klass)
-{
- AtkObjectClass *atk_object_class = ATK_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_ref (PARENT_TYPE);
-
- atk_object_class->get_n_children = et_get_n_children;
- atk_object_class->ref_child = et_ref_child;
-}
-
-static void
-et_atk_component_iface_init (AtkComponentIface *iface)
-{
- iface->ref_accessible_at_point = et_ref_accessible_at_point;
-}
-
-static void
-et_init (GalA11yETable *a11y)
-{
- GalA11yETablePrivate *priv;
-
- priv = GET_PRIVATE (a11y);
-
- priv->child_item = NULL;
-}
-
-/**
- * gal_a11y_e_table_get_type:
- * @void:
- *
- * Registers the &GalA11yETable class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the &GalA11yETable class.
- **/
-GType
-gal_a11y_e_table_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- AtkObjectFactory *factory;
-
- GTypeInfo info = {
- sizeof (GalA11yETableClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) et_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (GalA11yETable),
- 0,
- (GInstanceInitFunc) et_init,
- NULL /* value_table */
- };
-
- static const GInterfaceInfo atk_component_info = {
- (GInterfaceInitFunc) et_atk_component_iface_init,
- (GInterfaceFinalizeFunc) NULL,
- NULL
- };
-
- factory = atk_registry_get_factory (atk_get_default_registry (), GTK_TYPE_WIDGET);
- parent_type = atk_object_factory_get_accessible_type (factory);
-
- type = gal_a11y_type_register_static_with_private (PARENT_TYPE, "GalA11yETable", &info, 0,
- sizeof (GalA11yETablePrivate), &priv_offset);
- g_type_add_interface_static (type, ATK_TYPE_COMPONENT, &atk_component_info);
- }
-
- return type;
-}
-
-AtkObject *
-gal_a11y_e_table_new (GObject *widget)
-{
- GalA11yETable *a11y;
- ETable *table;
-
- table = E_TABLE (widget);
-
- a11y = g_object_new (gal_a11y_e_table_get_type (), NULL);
-
- GTK_ACCESSIBLE (a11y)->widget = GTK_WIDGET (widget);
-
- return ATK_OBJECT (a11y);
-}
diff --git a/a11y/e-table/gal-a11y-e-table.h b/a11y/e-table/gal-a11y-e-table.h
deleted file mode 100644
index 0a0901e3bc..0000000000
--- a/a11y/e-table/gal-a11y-e-table.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * Copyright (C) 2001 Chris Lahey
- */
-
-#ifndef __GAL_A11Y_E_TABLE_H__
-#define __GAL_A11Y_E_TABLE_H__
-
-#include <glib-object.h>
-#include <atk/atkobject.h>
-#include <atk/atkcomponent.h>
-#include <gtk/gtkaccessible.h>
-
-#define GAL_A11Y_TYPE_E_TABLE (gal_a11y_e_table_get_type ())
-#define GAL_A11Y_E_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAL_A11Y_TYPE_E_TABLE, GalA11yETable))
-#define GAL_A11Y_E_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAL_A11Y_TYPE_E_TABLE, GalA11yETableClass))
-#define GAL_A11Y_IS_E_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAL_A11Y_TYPE_E_TABLE))
-#define GAL_A11Y_IS_E_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAL_A11Y_TYPE_E_TABLE))
-
-typedef struct _GalA11yETable GalA11yETable;
-typedef struct _GalA11yETableClass GalA11yETableClass;
-typedef struct _GalA11yETablePrivate GalA11yETablePrivate;
-
-/* This struct should actually be larger as this isn't what we derive from.
- * The GalA11yETablePrivate comes right after the parent class structure.
- **/
-struct _GalA11yETable {
- GtkAccessible object;
-};
-
-struct _GalA11yETableClass {
- GtkAccessibleClass parent_class;
-};
-
-
-/* Standard Glib function */
-GType gal_a11y_e_table_get_type (void);
-AtkObject *gal_a11y_e_table_new (GObject *table);
-
-#endif /* ! __GAL_A11Y_E_TABLE_H__ */
diff --git a/a11y/e-table/gal-a11y-e-tree-factory.c b/a11y/e-table/gal-a11y-e-tree-factory.c
deleted file mode 100644
index 2fa34c5fbc..0000000000
--- a/a11y/e-table/gal-a11y-e-tree-factory.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Authors: Yuedong Du <yuedong.du@sun.com>
- *
- * Copyright (C) 2003 Ximian, Inc.
- */
-
-#include <config.h>
-#include "gal-a11y-e-tree-factory.h"
-#include "gal-a11y-e-tree.h"
-
-#define CS_CLASS(factory) (G_TYPE_INSTANCE_GET_CLASS ((factory), C_TYPE_STREAM, GalA11yETreeFactoryClass))
-static AtkObjectFactoryClass *parent_class;
-#define PARENT_TYPE (ATK_TYPE_OBJECT_FACTORY)
-
-/* Static functions */
-
-static GType
-gal_a11y_e_tree_factory_get_accessible_type (void)
-{
- return GAL_A11Y_TYPE_E_TREE;
-}
-
-static AtkObject*
-gal_a11y_e_tree_factory_create_accessible (GObject *obj)
-{
- AtkObject *accessible;
-
- accessible = gal_a11y_e_tree_new (obj);
-
- return accessible;
-}
-
-static void
-gal_a11y_e_tree_factory_class_init (GalA11yETreeFactoryClass *klass)
-{
- AtkObjectFactoryClass *factory_class = ATK_OBJECT_FACTORY_CLASS (klass);
-
- parent_class = g_type_class_ref (PARENT_TYPE);
-
- factory_class->create_accessible = gal_a11y_e_tree_factory_create_accessible;
- factory_class->get_accessible_type = gal_a11y_e_tree_factory_get_accessible_type;
-}
-
-static void
-gal_a11y_e_tree_factory_init (GalA11yETreeFactory *factory)
-{
-}
-
-/**
- * gal_a11y_e_tree_factory_get_type:
- * @void:
- *
- * Registers the &GalA11yETreeFactory class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the &GalA11yETreeFactory class.
- **/
-GType
-gal_a11y_e_tree_factory_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- GTypeInfo info = {
- sizeof (GalA11yETreeFactoryClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) gal_a11y_e_tree_factory_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (GalA11yETreeFactory),
- 0,
- (GInstanceInitFunc) gal_a11y_e_tree_factory_init,
- NULL /* value_tree */
- };
-
- type = g_type_register_static (PARENT_TYPE, "GalA11yETreeFactory", &info, 0);
- }
-
- return type;
-}
diff --git a/a11y/e-table/gal-a11y-e-tree-factory.h b/a11y/e-table/gal-a11y-e-tree-factory.h
deleted file mode 100644
index 434e526db9..0000000000
--- a/a11y/e-table/gal-a11y-e-tree-factory.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Authors: Yuedong Du <yuedong.du@ximian.com>
- *
- * Copyright (C) 2003 Ximian, Inc.
- */
-
-#ifndef __GAL_A11Y_E_TREE_FACTORY_H__
-#define __GAL_A11Y_E_TREE_FACTORY_H__
-
-#include <glib-object.h>
-#include <atk/atkobjectfactory.h>
-
-#define GAL_A11Y_TYPE_E_TREE_FACTORY (gal_a11y_e_table_factory_get_type ())
-#define GAL_A11Y_E_TREE_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAL_A11Y_TYPE_E_TREE_FACTORY, GalA11yETreeFactory))
-#define GAL_A11Y_E_TREE_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAL_A11Y_TYPE_E_TREE_FACTORY, GalA11yETreeFactoryClass))
-#define GAL_A11Y_IS_E_TREE_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAL_A11Y_TYPE_E_TREE_FACTORY))
-#define GAL_A11Y_IS_E_TREE_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAL_A11Y_TYPE_E_TREE_FACTORY))
-
-typedef struct _GalA11yETreeFactory GalA11yETreeFactory;
-typedef struct _GalA11yETreeFactoryClass GalA11yETreeFactoryClass;
-
-struct _GalA11yETreeFactory {
- AtkObject object;
-};
-
-struct _GalA11yETreeFactoryClass {
- AtkObjectClass parent_class;
-};
-
-
-/* Standard Glib function */
-GType gal_a11y_e_tree_factory_get_type (void);
-
-#endif /* ! __GAL_A11Y_E_TREE_FACTORY_H__ */
diff --git a/a11y/e-table/gal-a11y-e-tree.c b/a11y/e-table/gal-a11y-e-tree.c
deleted file mode 100644
index dc7755c6f2..0000000000
--- a/a11y/e-table/gal-a11y-e-tree.c
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Authors: Yuedong Du <yuedong.du@sun.com>
- *
- * Copyright (C) 2003 Ximian, Inc.
- */
-
-#include <config.h>
-#include "gal-a11y-e-tree.h"
-#include "gal-a11y-util.h"
-#include <gal/e-table/e-tree.h>
-#include <gal/e-table/e-table-item.h>
-
-#define CS_CLASS(a11y) (G_TYPE_INSTANCE_GET_CLASS ((a11y), C_TYPE_STREAM, GalA11yETreeClass))
-static AtkObjectClass *parent_class;
-static GType parent_type;
-static gint priv_offset;
-#define GET_PRIVATE(object) ((GalA11yETreePrivate *) (((char *) object) + priv_offset))
-#define PARENT_TYPE (parent_type)
-
-struct _GalA11yETreePrivate {
- AtkObject *child_item;
-};
-
-/* Static functions */
-
-static void
-init_child_item (GalA11yETree *a11y)
-{
- GalA11yETreePrivate *priv = GET_PRIVATE (a11y);
- ETree *tree = E_TREE (GTK_ACCESSIBLE (a11y)->widget);
- ETableItem * eti;
-
- g_return_if_fail (tree);
- eti = e_tree_get_item (tree);
- if (priv->child_item == NULL) {
- priv->child_item = gal_a11y_e_table_item_new (ATK_OBJECT (a11y),eti, 0);
- g_return_if_fail (priv->child_item);
- priv->child_item->role = ATK_ROLE_TREE_TABLE;
- }
-}
-
-static AtkObject*
-et_ref_accessible_at_point (AtkComponent *component,
- gint x,
- gint y,
- AtkCoordType coord_type)
-{
- GalA11yETree *a11y = GAL_A11Y_E_TREE (component);
- init_child_item (a11y);
- return GET_PRIVATE (a11y)->child_item;
-}
-
-static gint
-et_get_n_children (AtkObject *accessible)
-{
- return 1;
-}
-
-static AtkObject*
-et_ref_child (AtkObject *accessible,
- gint i)
-{
- GalA11yETree *a11y = GAL_A11Y_E_TREE (accessible);
- if (i != 0)
- return NULL;
- init_child_item (a11y);
- g_object_ref (GET_PRIVATE (a11y)->child_item);
- return GET_PRIVATE (a11y)->child_item;
-}
-
-static void
-et_class_init (GalA11yETreeClass *klass)
-{
- AtkObjectClass *atk_object_class = ATK_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_ref (PARENT_TYPE);
-
- atk_object_class->get_n_children = et_get_n_children;
- atk_object_class->ref_child = et_ref_child;
-}
-
-static void
-et_atk_component_iface_init (AtkComponentIface *iface)
-{
- iface->ref_accessible_at_point = et_ref_accessible_at_point;
-}
-
-static void
-et_init (GalA11yETree *a11y)
-{
- GalA11yETreePrivate *priv;
-
- priv = GET_PRIVATE (a11y);
-
- priv->child_item = NULL;
-}
-
-/**
- * gal_a11y_e_tree_get_type:
- * @void:
- *
- * Registers the &GalA11yETree class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the &GalA11yETree class.
- **/
-GType
-gal_a11y_e_tree_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- AtkObjectFactory *factory;
-
- GTypeInfo info = {
- sizeof (GalA11yETreeClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) et_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (GalA11yETree),
- 0,
- (GInstanceInitFunc) et_init,
- NULL /* value_tree */
- };
-
- static const GInterfaceInfo atk_component_info = {
- (GInterfaceInitFunc) et_atk_component_iface_init,
- (GInterfaceFinalizeFunc) NULL,
- NULL
- };
-
- factory = atk_registry_get_factory (atk_get_default_registry (), GTK_TYPE_WIDGET);
- parent_type = atk_object_factory_get_accessible_type (factory);
-
- type = gal_a11y_type_register_static_with_private (PARENT_TYPE, "GalA11yETree", &info, 0,
- sizeof (GalA11yETreePrivate), &priv_offset);
- g_type_add_interface_static (type, ATK_TYPE_COMPONENT, &atk_component_info);
- }
-
- return type;
-}
-
-AtkObject *
-gal_a11y_e_tree_new (GObject *widget)
-{
- GalA11yETree *a11y;
- ETree *tree;
- AtkObject * item;
-
- tree = E_TREE (widget);
-
- a11y = g_object_new (gal_a11y_e_tree_get_type (), NULL);
-
- GTK_ACCESSIBLE (a11y)->widget = GTK_WIDGET (widget);
-
- return ATK_OBJECT (a11y);
-}
diff --git a/a11y/e-table/gal-a11y-e-tree.h b/a11y/e-table/gal-a11y-e-tree.h
deleted file mode 100644
index 65b8deb6cf..0000000000
--- a/a11y/e-table/gal-a11y-e-tree.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Authors: Yuedong Du <yuedong.du@sun.com>
- *
- * Copyright (C) 2003 Ximian, Inc.
- */
-
-#ifndef __GAL_A11Y_E_TREE_H__
-#define __GAL_A11Y_E_TREE_H__
-
-#include <glib-object.h>
-#include <atk/atkobject.h>
-#include <atk/atkcomponent.h>
-#include <gtk/gtkaccessible.h>
-
-#define GAL_A11Y_TYPE_E_TREE (gal_a11y_e_tree_get_type ())
-#define GAL_A11Y_E_TREE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAL_A11Y_TYPE_E_TREE, GalA11yETree))
-#define GAL_A11Y_E_TREE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAL_A11Y_TYPE_E_TREE, GalA11yETreeClass))
-#define GAL_A11Y_IS_E_TREE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAL_A11Y_TYPE_E_TREE))
-#define GAL_A11Y_IS_E_TREE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAL_A11Y_TYPE_E_TREE))
-
-typedef struct _GalA11yETree GalA11yETree;
-typedef struct _GalA11yETreeClass GalA11yETreeClass;
-typedef struct _GalA11yETreePrivate GalA11yETreePrivate;
-
-/* This struct should actually be larger as this isn't what we derive from.
- * The GalA11yETablePrivate comes right after the parent class structure.
- **/
-struct _GalA11yETree {
- GtkAccessible object;
-};
-
-struct _GalA11yETreeClass {
- GtkAccessibleClass parent_class;
-};
-
-
-/* Standard Glib function */
-GType gal_a11y_e_tree_get_type (void);
-AtkObject *gal_a11y_e_tree_new (GObject *tree);
-
-#endif /* ! __GAL_A11Y_E_TREE_H__ */
diff --git a/a11y/e-text/.cvsignore b/a11y/e-text/.cvsignore
deleted file mode 100644
index 5b48d3f593..0000000000
--- a/a11y/e-text/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-.libs
-Makefile.in
-Makefile
-*.la
diff --git a/a11y/e-text/gal-a11y-e-text-factory.c b/a11y/e-text/gal-a11y-e-text-factory.c
deleted file mode 100644
index 24e3c28116..0000000000
--- a/a11y/e-text/gal-a11y-e-text-factory.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * Copyright (C) 2002 Ximian, Inc.
- */
-
-#include <config.h>
-#include "gal/e-text/e-text.h"
-#include "gal-a11y-e-text-factory.h"
-#include "gal-a11y-e-text.h"
-
-#define CS_CLASS(factory) (G_TYPE_INSTANCE_GET_CLASS ((factory), C_TYPE_STREAM, GalA11yETextFactoryClass))
-static AtkObjectFactoryClass *parent_class;
-#define PARENT_TYPE (ATK_TYPE_OBJECT_FACTORY)
-
-/* Static functions */
-
-static GType
-gal_a11y_e_text_factory_get_accessible_type (void)
-{
- return GAL_A11Y_TYPE_E_TEXT;
-}
-
-static AtkObject*
-gal_a11y_e_text_factory_create_accessible (GObject *obj)
-{
- AtkObject *atk_object;
-
- g_return_val_if_fail (E_IS_TEXT (obj), NULL);
-
- atk_object = g_object_new (GAL_A11Y_TYPE_E_TEXT, NULL);
- atk_object_initialize (atk_object, obj);
-
- return atk_object;
-}
-
-static void
-gal_a11y_e_text_factory_class_init (GalA11yETextFactoryClass *klass)
-{
- AtkObjectFactoryClass *factory_class = ATK_OBJECT_FACTORY_CLASS (klass);
-
- parent_class = g_type_class_ref (PARENT_TYPE);
-
- factory_class->create_accessible = gal_a11y_e_text_factory_create_accessible;
- factory_class->get_accessible_type = gal_a11y_e_text_factory_get_accessible_type;
-}
-
-static void
-gal_a11y_e_text_factory_init (GalA11yETextFactory *factory)
-{
-}
-
-/**
- * gal_a11y_e_text_factory_get_type:
- * @void:
- *
- * Registers the &GalA11yETextFactory class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the &GalA11yETextFactory class.
- **/
-GType
-gal_a11y_e_text_factory_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- GTypeInfo info = {
- sizeof (GalA11yETextFactoryClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) gal_a11y_e_text_factory_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (GalA11yETextFactory),
- 0,
- (GInstanceInitFunc) gal_a11y_e_text_factory_init,
- NULL /* value_text */
- };
-
- type = g_type_register_static (PARENT_TYPE, "GalA11yETextFactory", &info, 0);
- }
-
- return type;
-}
diff --git a/a11y/e-text/gal-a11y-e-text-factory.h b/a11y/e-text/gal-a11y-e-text-factory.h
deleted file mode 100644
index 56a8d29ab9..0000000000
--- a/a11y/e-text/gal-a11y-e-text-factory.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * Copyright (C) 2001 Chris Lahey
- */
-
-#ifndef __GAL_A11Y_E_TEXT_FACTORY_H__
-#define __GAL_A11Y_E_TEXT_FACTORY_H__
-
-#include <glib-object.h>
-#include <atk/atkobjectfactory.h>
-
-#define GAL_A11Y_TYPE_E_TEXT_FACTORY (gal_a11y_e_text_factory_get_type ())
-#define GAL_A11Y_E_TEXT_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAL_A11Y_TYPE_E_TEXT_FACTORY, GalA11yETextFactory))
-#define GAL_A11Y_E_TEXT_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAL_A11Y_TYPE_E_TEXT_FACTORY, GalA11yETextFactoryClass))
-#define GAL_A11Y_IS_E_TEXT_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAL_A11Y_TYPE_E_TEXT_FACTORY))
-#define GAL_A11Y_IS_E_TEXT_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAL_A11Y_TYPE_E_TEXT_FACTORY))
-
-typedef struct _GalA11yETextFactory GalA11yETextFactory;
-typedef struct _GalA11yETextFactoryClass GalA11yETextFactoryClass;
-
-struct _GalA11yETextFactory {
- AtkObjectFactory object;
-};
-
-struct _GalA11yETextFactoryClass {
- AtkObjectFactoryClass parent_class;
-};
-
-
-/* Standard Glib function */
-GType gal_a11y_e_text_factory_get_type (void);
-
-#endif /* ! __GAL_A11Y_E_TEXT_FACTORY_H__ */
diff --git a/a11y/e-text/gal-a11y-e-text.c b/a11y/e-text/gal-a11y-e-text.c
deleted file mode 100644
index be7835e17d..0000000000
--- a/a11y/e-text/gal-a11y-e-text.c
+++ /dev/null
@@ -1,1121 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * Copyright (C) 2002 Ximian, Inc.
- */
-
-#include <config.h>
-#include "gal-a11y-e-text.h"
-#include "gal-a11y-util.h"
-#include <atk/atkobject.h>
-#include <atk/atktable.h>
-#include <atk/atkcomponent.h>
-#include <atk/atkobjectfactory.h>
-#include <atk/atkregistry.h>
-#include <atk/atkgobjectaccessible.h>
-#include "gal/e-text/e-text.h"
-#include "gal/e-text/e-text-model-repos.h"
-#include <gtk/gtkmain.h>
-
-#define CS_CLASS(a11y) (G_TYPE_INSTANCE_GET_CLASS ((a11y), C_TYPE_STREAM, GalA11yETextClass))
-static GObjectClass *parent_class;
-static AtkComponentIface *component_parent_iface;
-static GType parent_type;
-static gint priv_offset;
-static GQuark quark_accessible_object = 0;
-#define GET_PRIVATE(object) ((GalA11yETextPrivate *) (((char *) object) + priv_offset))
-#define PARENT_TYPE (parent_type)
-
-struct _GalA11yETextPrivate {
- int dummy;
-};
-
-static void
-et_dispose (GObject *object)
-{
- if (parent_class->dispose)
- parent_class->dispose (object);
-}
-
-/* Static functions */
-
-static void
-et_get_extents (AtkComponent *component,
- gint *x,
- gint *y,
- gint *width,
- gint *height,
- AtkCoordType coord_type)
-{
- EText *item = E_TEXT (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (component)));
- double real_width;
- double real_height;
- int fake_width;
- int fake_height;
-
- if (component_parent_iface &&
- component_parent_iface->get_extents)
- component_parent_iface->get_extents (component,
- x,
- y,
- &fake_width,
- &fake_height,
- coord_type);
-
- gtk_object_get (GTK_OBJECT (item),
- "text_width", &real_width,
- "text_height", &real_height,
- NULL);
-
- if (width)
- *width = real_width;
- if (height)
- *height = real_height;
-}
-
-static const gchar *
-et_get_full_text (AtkText *text)
-{
- EText *etext = E_TEXT (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (text)));
- ETextModel *model;
- const char *full_text;
-
- gtk_object_get (GTK_OBJECT (etext),
- "model", &model,
- NULL);
-
- full_text = e_text_model_get_text (model);
-
- return full_text;
-}
-
-static void
-et_set_full_text (AtkEditableText *text,
- const char *full_text)
-{
- EText *etext = E_TEXT (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (text)));
- ETextModel *model;
-
- gtk_object_get (GTK_OBJECT (etext),
- "model", &model,
- NULL);
-
- e_text_model_set_text (model, full_text);
-}
-
-static gchar *
-et_get_text (AtkText *text,
- gint start_offset,
- gint end_offset)
-{
- gint start, end, real_start, real_end, len;
- const char *full_text = et_get_full_text (text);
- if (full_text == NULL)
- return;
- len = g_utf8_strlen (full_text, -1);
-
- start = MIN (MAX (0, start_offset), len);
- end = MIN (MAX (-1, end_offset), len);
-
- if (end_offset == -1)
- end = strlen (full_text);
- else
- end = g_utf8_offset_to_pointer (full_text, end) - full_text;
-
- start = g_utf8_offset_to_pointer (full_text, start) - full_text;
-
- real_start = MIN (start, end);
- real_end = MAX (start, end);
-
- return g_strndup (full_text + real_start, real_end - real_start);
-}
-
-static gboolean
-is_a_seperator (gunichar c)
-{
- return g_unichar_ispunct(c) || g_unichar_isspace(c);
-}
-
-static gint
-find_word_start (const char *text,
- gint begin_offset,
- gint step)
-{
- gint offset;
- char *at_offset;
- gunichar current, previous;
- gint len;
-
- offset = begin_offset;
- len = g_utf8_strlen (text, -1);
-
- while (offset > 0 && offset < len) {
- at_offset = g_utf8_offset_to_pointer (text, offset);
- current = g_utf8_get_char_validated (at_offset, -1);
- at_offset = g_utf8_offset_to_pointer (text, offset-1);
- previous = g_utf8_get_char_validated (at_offset, -1);
- if ((! is_a_seperator (current)) && is_a_seperator (previous))
- break;
- offset += step;
- }
-
- return offset;
-}
-
-static gint
-find_word_end (const char *text,
- gint begin_offset,
- gint step)
-{
- gint offset;
- char *at_offset;
- gunichar current, previous;
- gint len;
-
- offset = begin_offset;
- len = g_utf8_strlen (text, -1);
-
- while (offset > 0 && offset < len) {
- at_offset = g_utf8_offset_to_pointer (text, offset);
- current = g_utf8_get_char_validated (at_offset, -1);
- at_offset = g_utf8_offset_to_pointer (text, offset-1);
- previous = g_utf8_get_char_validated (at_offset, -1);
- if (is_a_seperator (current) && (! is_a_seperator (previous)))
- break;
- offset += step;
- }
-
- return offset;
-}
-
-static gint
-find_sentence_start (const char *text,
- gint begin_offset,
- gint step)
-{
- gint offset, last_word_end, len;
- char *at_offset;
- gunichar ch;
- int i;
-
- offset = find_word_start (text, begin_offset, step);
- len = g_utf8_strlen (text, -1);
-
- while (offset>0 && offset <len) {
- last_word_end = find_word_end (text, offset - 1, -1);
- if (last_word_end == 0)
- break;
- for (i = last_word_end; i < offset; i++) {
- at_offset = g_utf8_offset_to_pointer (text, i);
- ch = g_utf8_get_char_validated (at_offset, -1);
- if (ch == '.' || ch == '!' || ch == '?')
- return offset;
- }
-
- offset = find_word_start (text, offset + step, step);
- }
-
- return offset;
-}
-
-static gint
-find_sentence_end (const char *text,
- gint begin_offset,
- gint step)
-{
- gint offset;
- char *at_offset;
- gunichar previous;
- gint len;
-
- offset = begin_offset;
- len = g_utf8_strlen (text, -1);
-
- while (offset > 0 && offset < len) {
- at_offset = g_utf8_offset_to_pointer (text, offset - 1);
- previous = g_utf8_get_char_validated (at_offset, -1);
- if (previous == '.' || previous == '!' || previous == '?')
- break;
- offset += step;
- }
-
- return offset;
-}
-
-static gint
-find_line_start (const char *text,
- gint begin_offset,
- gint step)
-{
- gint offset;
- char *at_offset;
- gunichar previous;
- gint len;
-
- offset = begin_offset;
- len = g_utf8_strlen (text, -1);
-
- while (offset > 0 && offset < len) {
- at_offset = g_utf8_offset_to_pointer (text, offset - 1);
- previous = g_utf8_get_char_validated (at_offset, -1);
- if (previous == '\n' || previous == '\r')
- break;
- offset += step;
- }
-
- return offset;
-}
-
-static gint
-find_line_end (const char *text,
- gint begin_offset,
- gint step)
-{
- gint offset;
- char *at_offset;
- gunichar current;
- gint len;
-
- offset = begin_offset;
- len = g_utf8_strlen (text, -1);
-
- while (offset >= 0 && offset < len) {
- at_offset = g_utf8_offset_to_pointer (text, offset);
- current = g_utf8_get_char_validated (at_offset, -1);
- if (current == '\n' || current == '\r')
- break;
- offset += step;
- }
-
- return offset;
-}
-
-static gchar *
-et_get_text_after_offset (AtkText *text,
- gint offset,
- AtkTextBoundary boundary_type,
- gint *start_offset,
- gint *end_offset)
-{
- gint start, end, len;
- const char *full_text = et_get_full_text (text);
- g_return_val_if_fail (full_text, NULL);
-
- switch (boundary_type)
- {
- case ATK_TEXT_BOUNDARY_CHAR:
- start = offset + 1;
- end = offset + 2;
- break;
- case ATK_TEXT_BOUNDARY_WORD_START:
- start = find_word_start (full_text, offset + 1, 1);
- end = find_word_start (full_text, start + 1, 1);
- break;
- case ATK_TEXT_BOUNDARY_WORD_END:
- start = find_word_end (full_text, offset + 1, 1);
- end = find_word_end (full_text, start + 1, 1);
- break;
- case ATK_TEXT_BOUNDARY_SENTENCE_START:
- start = find_sentence_start (full_text, offset + 1, 1);
- end = find_sentence_start (full_text, start + 1, 1);
- break;
- case ATK_TEXT_BOUNDARY_SENTENCE_END:
- start = find_sentence_end (full_text, offset + 1, 1);
- end = find_sentence_end (full_text, start + 1, 1);
- break;
- case ATK_TEXT_BOUNDARY_LINE_START:
- start = find_line_start (full_text, offset + 1, 1);
- end = find_line_start (full_text, start + 1, 1);
- break;
- case ATK_TEXT_BOUNDARY_LINE_END:
- start = find_line_end (full_text, offset + 1, 1);
- end = find_line_end (full_text, start + 1, 1);
- break;
- defalut:
- return NULL;
- }
-
- len = g_utf8_strlen (full_text, -1);
- if (start_offset)
- *start_offset = MIN (MAX (0, start), len);
- if (end_offset)
- *end_offset = MIN (MAX (0, end), len);
- return et_get_text (text, start, end);
-}
-
-static gchar *
-et_get_text_at_offset (AtkText *text,
- gint offset,
- AtkTextBoundary boundary_type,
- gint *start_offset,
- gint *end_offset)
-{
- gint start, end, len;
- const char *full_text = et_get_full_text (text);
- g_return_val_if_fail (full_text, NULL);
-
- switch (boundary_type)
- {
- case ATK_TEXT_BOUNDARY_CHAR:
- start = offset;
- end = offset + 1;
- break;
- case ATK_TEXT_BOUNDARY_WORD_START:
- start = find_word_start (full_text, offset - 1, -1);
- end = find_word_start (full_text, offset, 1);
- break;
- case ATK_TEXT_BOUNDARY_WORD_END:
- start = find_word_end (full_text, offset, -1);
- end = find_word_end (full_text, offset + 1, 1);
- break;
- case ATK_TEXT_BOUNDARY_SENTENCE_START:
- start = find_sentence_start (full_text, offset - 1, -1);
- end = find_sentence_start (full_text, offset, 1);
- break;
- case ATK_TEXT_BOUNDARY_SENTENCE_END:
- start = find_sentence_end (full_text, offset, -1);
- end = find_sentence_end (full_text, offset + 1, 1);
- break;
- case ATK_TEXT_BOUNDARY_LINE_START:
- start = find_line_start (full_text, offset - 1, -1);
- end = find_line_start (full_text, offset, 1);
- break;
- case ATK_TEXT_BOUNDARY_LINE_END:
- start = find_line_end (full_text, offset, -1);
- end = find_line_end (full_text, offset + 1, 1);
- break;
- defalut:
- return NULL;
- }
-
- len = g_utf8_strlen (full_text, -1);
- if (start_offset)
- *start_offset = MIN (MAX (0, start), len);
- if (end_offset)
- *end_offset = MIN (MAX (0, end), len);
- return et_get_text (text, start, end);
-}
-
-static gunichar
-et_get_character_at_offset (AtkText *text,
- gint offset)
-{
- const char *full_text = et_get_full_text (text);
- char *at_offset;
-
- at_offset = g_utf8_offset_to_pointer (full_text, offset);
- return g_utf8_get_char_validated (at_offset, -1);
-}
-
-
-static gchar*
-et_get_text_before_offset (AtkText *text,
- gint offset,
- AtkTextBoundary boundary_type,
- gint *start_offset,
- gint *end_offset)
-{
- gint start, end, len;
- const char *full_text = et_get_full_text (text);
- g_return_val_if_fail (full_text, NULL);
-
- switch (boundary_type)
- {
- case ATK_TEXT_BOUNDARY_CHAR:
- start = offset - 1;
- end = offset;
- break;
- case ATK_TEXT_BOUNDARY_WORD_START:
- end = find_word_start (full_text, offset - 1, -1);
- start = find_word_start (full_text, end - 1, -1) ;
- break;
- case ATK_TEXT_BOUNDARY_WORD_END:
- end = find_word_end (full_text, offset, -1);
- start = find_word_end (full_text, end - 1, -1);
- break;
- case ATK_TEXT_BOUNDARY_SENTENCE_START:
- end = find_sentence_start (full_text, offset, -1);
- start = find_sentence_start (full_text, end - 1, -1);
- break;
- case ATK_TEXT_BOUNDARY_SENTENCE_END:
- end = find_sentence_end (full_text, offset, -1);
- start = find_sentence_end (full_text, end - 1, -1);
- break;
- case ATK_TEXT_BOUNDARY_LINE_START:
- end = find_line_start (full_text, offset, -1);
- start = find_line_start (full_text, end - 1, -1);
- break;
- case ATK_TEXT_BOUNDARY_LINE_END:
- end = find_line_end (full_text, offset, -1);
- start = find_line_end (full_text, end - 1, -1);
- break;
- default:
- return NULL;
- }
-
- len = g_utf8_strlen (full_text, -1);
- if (start_offset)
- *start_offset = MIN (MAX (0, start), len);
- if (end_offset)
- *end_offset = MIN (MAX (0, end), len);
- return et_get_text (text, start, end);
-}
-
-static gint
-et_get_caret_offset (AtkText *text)
-{
- GObject *obj;
- EText *etext;
- int offset;
-
- g_return_val_if_fail (ATK_IS_GOBJECT_ACCESSIBLE(text), -1);
- obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (text));
- if (obj == NULL)
- return -1;
-
- g_return_val_if_fail (E_IS_TEXT (obj), -1);
- etext = E_TEXT (obj);
-
- gtk_object_get (GTK_OBJECT (etext),
- "cursor_pos", &offset,
- NULL);
- return offset;
-}
-
-
-static AtkAttributeSet*
-et_get_run_attributes (AtkText *text,
- gint offset,
- gint *start_offset,
- gint *end_offset)
-{
- /* Unimplemented */
- return NULL;
-}
-
-
-static AtkAttributeSet*
-et_get_default_attributes (AtkText *text)
-{
- /* Unimplemented */
- return NULL;
-}
-
-
-static void
-et_get_character_extents (AtkText *text,
- gint offset,
- gint *x,
- gint *y,
- gint *width,
- gint *height,
- AtkCoordType coords)
-{
- GObject *obj;
- EText *etext;
- GnomeCanvas *canvas;
- gint x_widget, y_widget, x_window, y_window;
- GdkWindow *window;
- GtkWidget *widget;
- int index;
- int trailing;
- PangoRectangle pango_pos;
-
- g_return_if_fail (ATK_IS_GOBJECT_ACCESSIBLE(text));
- obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (text));
- if (obj == NULL)
- return;
- g_return_if_fail (E_IS_TEXT (obj));
- etext = E_TEXT(obj);
- canvas = GNOME_CANVAS_ITEM(etext)->canvas;
- widget = GTK_WIDGET(canvas);
- window = widget->window;
- gdk_window_get_origin (window, &x_widget, &y_widget);
-
- pango_layout_index_to_pos (etext->layout, offset, &pango_pos);
- pango_pos.x = PANGO_PIXELS (pango_pos.x);
- pango_pos.y = PANGO_PIXELS (pango_pos.y);
- pango_pos.width = (pango_pos.width + PANGO_SCALE / 2) / PANGO_SCALE;
- pango_pos.height = (pango_pos.height + PANGO_SCALE / 2) / PANGO_SCALE;
-
- *x = pango_pos.x + x_widget;
- *y = pango_pos.y + y_widget;
-
- *width = pango_pos.width;
- *height = pango_pos.height;
-
- if (etext->draw_borders) {
- *x += 3; /*BORDER_INDENT;*/
- *y += 3; /*BORDER_INDENT;*/
- }
-
- *x += etext->xofs;
- *y += etext->yofs;
-
- if (etext->editing) {
- *x -= etext->xofs_edit;
- *y -= etext->yofs_edit;
- }
-
- *x += etext->cx;
- *y += etext->cy;
-
- if (coords == ATK_XY_WINDOW) {
- window = gdk_window_get_toplevel (window);
- gdk_window_get_origin (window, &x_window, &y_window);
- *x -= x_window;
- *y -= y_window;
- }
- else if (coords == ATK_XY_SCREEN) {
- }
- else {
- *x = 0;
- *y = 0;
- *height = 0;
- *width = 0;
- }
-}
-
-
-static gint
-et_get_character_count (AtkText *text)
-{
- const char *full_text = et_get_full_text (text);
-
- return g_utf8_strlen (full_text, -1);
-}
-
-
-static gint
-et_get_offset_at_point (AtkText *text,
- gint x,
- gint y,
- AtkCoordType coords)
-{
- GObject *obj;
- EText *etext;
- GnomeCanvas *canvas;
- gint x_widget, y_widget, x_window, y_window;
- GdkWindow *window;
- GtkWidget *widget;
- int index;
- int trailing;
-
- g_return_val_if_fail (ATK_IS_GOBJECT_ACCESSIBLE(text), -1);
- obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (text));
- if (obj == NULL)
- return -1;
- g_return_val_if_fail (E_IS_TEXT (obj), -1);
- etext = E_TEXT(obj);
- canvas = GNOME_CANVAS_ITEM(etext)->canvas;
- widget = GTK_WIDGET(canvas);
- window = widget->window;
- gdk_window_get_origin (window, &x_widget, &y_widget);
-
- if (coords == ATK_XY_SCREEN) {
- x = x - x_widget;
- y = y - y_widget;
- }
- else if (coords == ATK_XY_WINDOW) {
- window = gdk_window_get_toplevel (window);
- gdk_window_get_origin (window, &x_window, &y_window);
- x = x - x_widget + x_window;
- y = y - y_widget + y_window;
- }
- else
- return -1;
-
- if (etext->draw_borders) {
- x -= 3; /*BORDER_INDENT;*/
- y -= 3; /*BORDER_INDENT;*/
- }
-
- x -= etext->xofs;
- y -= etext->yofs;
-
- if (etext->editing) {
- x += etext->xofs_edit;
- y += etext->yofs_edit;
- }
-
- x -= etext->cx;
- y -= etext->cy;
-
- pango_layout_xy_to_index (etext->layout,
- x * PANGO_SCALE - PANGO_SCALE / 2,
- y * PANGO_SCALE - PANGO_SCALE / 2,
- &index,
- &trailing);
-
- return g_utf8_pointer_to_offset (etext->text, etext->text + index + trailing);
-}
-
-
-static gint
-et_get_n_selections (AtkText *text)
-{
- EText *etext = E_TEXT (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (text)));
- if (etext->selection_start !=
- etext->selection_end)
- return 1;
- return 0;
-}
-
-
-static gchar*
-et_get_selection (AtkText *text,
- gint selection_num,
- gint *start_offset,
- gint *end_offset)
-{
- gint start, end, real_start, real_end, len;
- EText *etext;
- if (selection_num == 0) {
- const char *full_text = et_get_full_text (text);
- if (full_text == NULL)
- return NULL;
- len = g_utf8_strlen (full_text, -1);
- etext = E_TEXT (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (text)));
- start = MIN (etext->selection_start, etext->selection_end);
- end = MAX (etext->selection_start, etext->selection_end);
- start = MIN (MAX (0, start), len);
- end = MIN (MAX (0, end), len);
- if (start != end) {
- if (start_offset)
- *start_offset = start;
- if (end_offset)
- *end_offset = end;
- real_start = g_utf8_offset_to_pointer (full_text, start) - full_text;
- real_end = g_utf8_offset_to_pointer (full_text, end) - full_text;
- return g_strndup (full_text + real_start, real_end - real_start);
- }
- }
-
- return NULL;
-}
-
-
-static gboolean
-et_add_selection (AtkText *text,
- gint start_offset,
- gint end_offset)
-{
- GObject *obj;
- EText *etext;
-
- g_return_val_if_fail (ATK_IS_GOBJECT_ACCESSIBLE (text), FALSE);
- obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (text));
- if (obj == NULL)
- return FALSE;
- g_return_val_if_fail (E_IS_TEXT (obj), FALSE);
- etext = E_TEXT (obj);
-
- g_return_val_if_fail (start_offset >= 0, FALSE);
- g_return_val_if_fail (start_offset >= -1, FALSE);
- if (end_offset == -1)
- end_offset = et_get_character_count (text);
-
- if (start_offset != end_offset) {
- gint real_start, real_end;
- real_start = MIN (start_offset, end_offset);
- real_end = MAX (start_offset, end_offset);
- etext->selection_start = real_start;
- etext->selection_end = real_end;
-
- gnome_canvas_item_grab_focus (GNOME_CANVAS_ITEM (etext));
- gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (etext));
-
- g_signal_emit_by_name (ATK_OBJECT (text), "text_selection_changed");
-
- return TRUE;
- }
-
- return FALSE;
-}
-
-
-static gboolean
-et_remove_selection (AtkText *text,
- gint selection_num)
-{
- GObject *obj;
- EText *etext;
-
- g_return_val_if_fail (ATK_IS_GOBJECT_ACCESSIBLE (text), FALSE);
- obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (text));
- if (obj == NULL)
- return FALSE;
- g_return_val_if_fail (E_IS_TEXT (obj), FALSE);
- etext = E_TEXT (obj);
-
- if (selection_num == 0
- && etext->selection_start != etext->selection_end) {
- etext->selection_end = etext->selection_start;
- g_signal_emit_by_name (ATK_OBJECT(text), "text_selection_changed");
- return TRUE;
- }
-
- return FALSE;
-}
-
-
-static gboolean
-et_set_selection (AtkText *text,
- gint selection_num,
- gint start_offset,
- gint end_offset)
-{
- GObject *obj;
- EText *etext;
- int offset;
-
- g_return_val_if_fail (ATK_IS_GOBJECT_ACCESSIBLE (text), FALSE);
- obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (text));
- if (obj == NULL)
- return FALSE;
- g_return_val_if_fail (E_IS_TEXT (obj), FALSE);
- etext = E_TEXT (obj);
- if (selection_num == 0)
- return et_add_selection (text, start_offset, end_offset);
- return FALSE;
-}
-
-
-static gboolean
-et_set_caret_offset (AtkText *text,
- gint offset)
-{
- GObject *obj;
- EText *etext;
-
- g_return_val_if_fail (ATK_IS_GOBJECT_ACCESSIBLE (text), FALSE);
- obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (text));
- if (obj == NULL)
- return FALSE;
-
- g_return_val_if_fail (E_IS_TEXT (obj), FALSE);
- etext = E_TEXT (obj);
-
- if (offset < -1)
- return FALSE;
- else {
- ETextEventProcessorCommand command;
-
- if (offset == -1)
- offset = et_get_character_count (text);
-
- command.action = E_TEP_MOVE;
- command.position = E_TEP_VALUE;
- command.value = offset;
- command.time = GDK_CURRENT_TIME;
- g_signal_emit_by_name (etext->tep, "command", &command);
- return TRUE;
- }
-}
-
-static gboolean
-et_set_run_attributes (AtkEditableText *text,
- AtkAttributeSet *attrib_set,
- gint start_offset,
- gint end_offset)
-{
- /* Unimplemented */
- return FALSE;
-}
-
-static void
-et_set_text_contents (AtkEditableText *text,
- const gchar *string)
-{
- et_set_full_text (text, string);
-}
-
-static void
-et_insert_text (AtkEditableText *text,
- const gchar *string,
- gint length,
- gint *position)
-{
- /* Utf8 unimplemented */
- char *result;
-
- const char *full_text = et_get_full_text (ATK_TEXT (text));
- if (full_text == NULL)
- return;
-
- result = g_strdup_printf ("%.*s%.*s%s", *position, full_text, length, string, full_text + *position);
-
- et_set_full_text (text, result);
-
- *position += length;
-
- g_free (result);
-}
-
-static void
-et_copy_text (AtkEditableText *text,
- gint start_pos,
- gint end_pos)
-{
- GObject *obj;
- EText *etext;
-
- g_return_if_fail (ATK_IS_GOBJECT_ACCESSIBLE (text));
- obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (text));
- if (obj == NULL)
- return;
-
- g_return_if_fail (E_IS_TEXT (obj));
- etext = E_TEXT (obj);
-
- if (start_pos != end_pos) {
- etext->selection_start = start_pos;
- etext->selection_end = end_pos;
- e_text_copy_clipboard (etext);
- }
-}
-
-static void
-et_delete_text (AtkEditableText *text,
- gint start_pos,
- gint end_pos)
-{
- GObject *obj;
- EText *etext;
-
- g_return_if_fail (ATK_IS_GOBJECT_ACCESSIBLE(text));
- obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (text));
- if (obj == NULL)
- return;
-
- g_return_if_fail (E_IS_TEXT (obj));
- etext = E_TEXT (obj);
-
- etext->selection_start = start_pos;
- etext->selection_end = end_pos;
-
- e_text_delete_selection (etext);
-}
-
-static void
-et_cut_text (AtkEditableText *text,
- gint start_pos,
- gint end_pos)
-{
- et_copy_text (text, start_pos, end_pos);
- et_delete_text (text, start_pos, end_pos);
-}
-
-static void
-et_paste_text (AtkEditableText *text,
- gint position)
-{
- GObject *obj;
- EText *etext;
-
- g_return_if_fail (ATK_IS_GOBJECT_ACCESSIBLE (text));
- obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (text));
- if (obj == NULL)
- return;
-
- g_return_if_fail (E_IS_TEXT (obj));
- etext = E_TEXT (obj);
-
- gtk_object_set (GTK_OBJECT (etext),
- "cursor_pos", position,
- NULL);
- e_text_paste_clipboard (etext);
-}
-
-static void
-et_atk_component_iface_init (AtkComponentIface *iface)
-{
- iface->get_extents = et_get_extents;
-}
-
-static void
-et_atk_text_iface_init (AtkTextIface *iface)
-{
- iface->get_text = et_get_text;
- iface->get_text_after_offset = et_get_text_after_offset;
- iface->get_text_at_offset = et_get_text_at_offset;
- iface->get_character_at_offset = et_get_character_at_offset;
- iface->get_text_before_offset = et_get_text_before_offset;
- iface->get_caret_offset = et_get_caret_offset;
- iface->get_run_attributes = et_get_run_attributes;
- iface->get_default_attributes = et_get_default_attributes;
- iface->get_character_extents = et_get_character_extents;
- iface->get_character_count = et_get_character_count;
- iface->get_offset_at_point = et_get_offset_at_point;
- iface->get_n_selections = et_get_n_selections;
- iface->get_selection = et_get_selection;
- iface->add_selection = et_add_selection;
- iface->remove_selection = et_remove_selection;
- iface->set_selection = et_set_selection;
- iface->set_caret_offset = et_set_caret_offset;
-}
-
-static void
-et_atk_editable_text_iface_init (AtkEditableTextIface *iface)
-{
- iface->set_run_attributes = et_set_run_attributes;
- iface->set_text_contents = et_set_text_contents;
- iface->insert_text = et_insert_text;
- iface->copy_text = et_copy_text;
- iface->cut_text = et_cut_text;
- iface->delete_text = et_delete_text;
- iface->paste_text = et_paste_text;
-}
-
-static void
-_et_reposition_cb (ETextModel *model,
- ETextModelReposFn fn,
- gpointer repos_data,
- gpointer user_data)
-{
- AtkObject *accessible;
- AtkText *text;
-
- accessible = ATK_OBJECT (user_data);
- text = ATK_TEXT (accessible);
-
- if (fn == e_repos_delete_shift) {
- EReposDeleteShift *info = (EReposDeleteShift *) repos_data;
- g_signal_emit_by_name (text, "text-changed::delete", info->pos, info->len);
- }
- else if (fn == e_repos_insert_shift) {
- EReposInsertShift *info = (EReposInsertShift *) repos_data;
- g_signal_emit_by_name (text, "text-changed::insert", info->pos, info->len);
- }
-}
-
-static void
-_et_command_cb (ETextEventProcessor *tep,
- ETextEventProcessorCommand *command,
- gpointer user_data)
-{
- AtkObject *accessible;
- AtkText *text;
-
- accessible = ATK_OBJECT (user_data);
- text = ATK_TEXT (accessible);
-
- switch (command->action) {
- case E_TEP_MOVE:
- g_signal_emit_by_name (text, "text-caret-moved", et_get_caret_offset (text));
- break;
- case E_TEP_SELECT:
- g_signal_emit_by_name (text, "text-selection-changed");
- break;
- }
-}
-
-static void
-et_real_initialize (AtkObject *obj,
- gpointer data)
-{
- GalA11yEText *a11y;
- EText *etext;
-
- ATK_OBJECT_CLASS (parent_class)->initialize (obj, data);
-
- g_return_if_fail (GAL_A11Y_IS_E_TEXT (obj));
- g_return_if_fail (E_IS_TEXT (data));
-
- a11y = GAL_A11Y_E_TEXT (obj);
- etext = E_TEXT (data);
-
- /* Set up signal callbacks */
- g_signal_connect (etext->model, "reposition",
- G_CALLBACK (_et_reposition_cb), obj);
-
- g_signal_connect_after (etext->tep, "command",
- (GCallback) _et_command_cb, obj);
-
- obj->role = ATK_ROLE_TEXT;
-}
-
-static void
-et_class_init (GalA11yETextClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- AtkObjectClass *atk_class = ATK_OBJECT_CLASS (klass);
-
- quark_accessible_object = g_quark_from_static_string ("gtk-accessible-object");
- parent_class = g_type_class_ref (PARENT_TYPE);
- component_parent_iface = g_type_interface_peek(parent_class, ATK_TYPE_COMPONENT);
- object_class->dispose = et_dispose;
- atk_class->initialize = et_real_initialize;
-}
-
-static void
-et_init (GalA11yEText *a11y)
-{
-#if 0
- GalA11yETextPrivate *priv;
-
- priv = GET_PRIVATE (a11y);
-#endif
-}
-
-/**
- * gal_a11y_e_text_get_type:
- * @void:
- *
- * Registers the &GalA11yEText class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the &GalA11yEText class.
- **/
-GType
-gal_a11y_e_text_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- AtkObjectFactory *factory;
-
- GTypeInfo info = {
- sizeof (GalA11yETextClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) et_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (GalA11yEText),
- 0,
- (GInstanceInitFunc) et_init,
- NULL /* value_text */
- };
-
- static const GInterfaceInfo atk_component_info = {
- (GInterfaceInitFunc) et_atk_component_iface_init,
- (GInterfaceFinalizeFunc) NULL,
- NULL
- };
- static const GInterfaceInfo atk_text_info = {
- (GInterfaceInitFunc) et_atk_text_iface_init,
- (GInterfaceFinalizeFunc) NULL,
- NULL
- };
- static const GInterfaceInfo atk_editable_text_info = {
- (GInterfaceInitFunc) et_atk_editable_text_iface_init,
- (GInterfaceFinalizeFunc) NULL,
- NULL
- };
-
- factory = atk_registry_get_factory (atk_get_default_registry (), GNOME_TYPE_CANVAS_ITEM);
- parent_type = atk_object_factory_get_accessible_type (factory);
-
- type = gal_a11y_type_register_static_with_private (PARENT_TYPE, "GalA11yEText", &info, 0,
- sizeof (GalA11yETextPrivate), &priv_offset);
-
- g_type_add_interface_static (type, ATK_TYPE_COMPONENT, &atk_component_info);
- g_type_add_interface_static (type, ATK_TYPE_TEXT, &atk_text_info);
- g_type_add_interface_static (type, ATK_TYPE_EDITABLE_TEXT, &atk_editable_text_info);
- }
-
- return type;
-}
diff --git a/a11y/e-text/gal-a11y-e-text.h b/a11y/e-text/gal-a11y-e-text.h
deleted file mode 100644
index 66d2d6283b..0000000000
--- a/a11y/e-text/gal-a11y-e-text.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * Copyright (C) 2001 Chris Lahey
- */
-
-#ifndef __GAL_A11Y_E_TEXT_H__
-#define __GAL_A11Y_E_TEXT_H__
-
-#include <glib-object.h>
-#include <gal/e-table/e-table-item.h>
-
-#define GAL_A11Y_TYPE_E_TEXT (gal_a11y_e_text_get_type ())
-#define GAL_A11Y_E_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAL_A11Y_TYPE_E_TEXT, GalA11yEText))
-#define GAL_A11Y_E_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAL_A11Y_TYPE_E_TEXT, GalA11yETextClass))
-#define GAL_A11Y_IS_E_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAL_A11Y_TYPE_E_TEXT))
-#define GAL_A11Y_IS_E_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAL_A11Y_TYPE_E_TEXT))
-
-typedef struct _GalA11yEText GalA11yEText;
-typedef struct _GalA11yETextClass GalA11yETextClass;
-typedef struct _GalA11yETextPrivate GalA11yETextPrivate;
-
-/* This struct should actually be larger as this isn't what we derive from.
- * The GalA11yETextPrivate comes right after the parent class structure.
- **/
-struct _GalA11yEText {
- AtkObject object;
-};
-
-struct _GalA11yETextClass {
- AtkObject parent_class;
-};
-
-
-/* Standard Glib function */
-GType gal_a11y_e_text_get_type (void);
-
-#endif /* ! __GAL_A11Y_E_TEXT_H__ */
diff --git a/a11y/ea-cell-table.c b/a11y/ea-cell-table.c
deleted file mode 100644
index 80f5ecbaaa..0000000000
--- a/a11y/ea-cell-table.c
+++ /dev/null
@@ -1,207 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-cell-table.c
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-#include "ea-cell-table.h"
-
-EaCellTable *
-ea_cell_table_create (gint rows, gint columns, gboolean column_first)
-{
- EaCellTable * cell_data;
- gint index;
-
- g_return_val_if_fail (((columns > 0) && (rows > 0)), NULL);
-
- cell_data = g_new0 (EaCellTable, 1);
-
- cell_data->column_first = column_first;
- cell_data->columns = columns;
- cell_data->rows = rows;
-
- cell_data->column_labels = g_new0 (gchar*, columns);
- for (index = columns -1; index >= 0; --index)
- cell_data->column_labels [index] = NULL;
-
- cell_data->row_labels = g_new0 (gchar*, rows);
- for (index = rows -1; index >= 0; --index)
- cell_data->row_labels [index] = NULL;
-
- cell_data->cells = g_new0(gpointer, (columns * rows));
- for (index = (columns * rows) -1; index >= 0; --index)
- cell_data->cells [index] = NULL;
- return cell_data;
-}
-
-void
-ea_cell_table_destroy (EaCellTable * cell_data)
-{
- gint index;
- g_return_if_fail (cell_data);
-
- g_print ("destroy cell table (%d, %d)\n", cell_data->rows,
- cell_data->columns);
- for (index = 0; index < cell_data->columns; ++index)
- if (cell_data->column_labels [index])
- g_free (cell_data->column_labels [index]);
- g_free (cell_data->column_labels);
-
- for (index = 0; index < cell_data->rows; ++index)
- if (cell_data->row_labels [index])
- g_free (cell_data->row_labels [index]);
- g_free (cell_data->row_labels);
-
- for (index = (cell_data->columns * cell_data->rows) -1;
- index >= 0; --index)
- if (cell_data->cells[index] &&
- G_IS_OBJECT (cell_data->cells[index]))
- g_object_unref (cell_data->cells[index]);
-
- g_free (cell_data->cells);
-}
-
-gpointer
-ea_cell_table_get_cell (EaCellTable * cell_data,
- gint row, gint column)
-{
- gint index;
-
- g_return_val_if_fail (cell_data, NULL);
-
- index = ea_cell_table_get_index (cell_data, column, row);
- if (index == -1)
- return NULL;
-
- return cell_data->cells[index];
-}
-
-gboolean
-ea_cell_table_set_cell (EaCellTable * cell_data,
- gint row, gint column, gpointer cell)
-{
- gint index;
-
- g_return_val_if_fail (cell_data, FALSE);
-
- index = ea_cell_table_get_index (cell_data, column, row);
- if (index == -1)
- return FALSE;
-
- if (cell && G_IS_OBJECT(cell))
- g_object_ref (cell);
- if (cell_data->cells[index] &&
- G_IS_OBJECT (cell_data->cells[index]))
- g_object_unref (cell_data->cells[index]);
- cell_data->cells[index] = cell;
-
- return TRUE;
-}
-
-gpointer
-ea_cell_table_get_cell_at_index (EaCellTable * cell_data,
- gint index)
-{
- g_return_val_if_fail (cell_data, NULL);
-
- if (index >=0 && index < (cell_data->columns * cell_data->rows))
- return cell_data->cells [index];
- return NULL;
-}
-
-gboolean
-ea_cell_table_set_cell_at_index (EaCellTable * cell_data,
- gint index, gpointer cell)
-{
- g_return_val_if_fail (cell_data, FALSE);
-
- if (index < 0 || index >=cell_data->columns * cell_data->rows)
- return FALSE;
-
- if (cell && G_IS_OBJECT(cell))
- g_object_ref (cell);
- if (cell_data->cells[index] &&
- G_IS_OBJECT (cell_data->cells[index]))
- g_object_unref (cell_data->cells[index]);
- cell_data->cells[index] = cell;
-
- return TRUE;
-}
-
-G_CONST_RETURN gchar*
-ea_cell_table_get_column_label (EaCellTable * cell_data,
- gint column)
-{
- g_return_val_if_fail (cell_data, NULL);
- g_return_val_if_fail ((column >= 0 && column < cell_data->columns), NULL);
-
- return cell_data->column_labels[column];
-}
-
-void
-ea_cell_table_set_column_label (EaCellTable * cell_data,
- gint column, const gchar *label)
-{
- g_return_if_fail (cell_data);
- g_return_if_fail ((column >= 0 && column < cell_data->columns));
-
- if (cell_data->column_labels[column])
- g_free (cell_data->column_labels[column]);
- cell_data->column_labels[column] = g_strdup(label);
-}
-
-G_CONST_RETURN gchar*
-ea_cell_table_get_row_label (EaCellTable * cell_data,
- gint row)
-{
- g_return_val_if_fail (cell_data, NULL);
- g_return_val_if_fail ((row >= 0 && row < cell_data->rows), NULL);
-
- return cell_data->row_labels[row];
-}
-
-void
-ea_cell_table_set_row_label (EaCellTable * cell_data,
- gint row, const gchar *label)
-{
- g_return_if_fail (cell_data);
- g_return_if_fail ((row >= 0 && row < cell_data->rows));
-
- if (cell_data->row_labels[row])
- g_free (cell_data->row_labels[row]);
- cell_data->row_labels[row] = g_strdup(label);
-}
-
-gint
-ea_cell_table_get_index (EaCellTable *cell_data,
- gint row, gint column)
-{
- g_return_val_if_fail (cell_data, -1);
- if (row < 0 || row >= cell_data->rows ||
- column < 0 || column >= cell_data->columns)
- return -1;
-
- if (cell_data->column_first)
- return column * cell_data->rows + row;
- else
- return row * cell_data->columns + column;
-}
diff --git a/a11y/ea-cell-table.h b/a11y/ea-cell-table.h
deleted file mode 100644
index 932fe8b4fd..0000000000
--- a/a11y/ea-cell-table.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-table-cell.c
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-/* EaCellTable */
-
-#include <glib.h>
-#include <glib-object.h>
-
-struct _EaCellTable {
- gint columns;
- gint rows;
- gboolean column_first; /* index order */
- gchar **column_labels;
- gchar **row_labels;
- gpointer *cells;
-};
-
-typedef struct _EaCellTable EaCellTable;
-
-EaCellTable * ea_cell_table_create (gint rows, gint columns,
- gboolean column_first);
-void ea_cell_table_destroy (EaCellTable * cell_data);
-gpointer ea_cell_table_get_cell (EaCellTable * cell_data,
- gint row, gint column);
-gboolean ea_cell_table_set_cell (EaCellTable * cell_data,
- gint row, gint column, gpointer cell);
-gpointer ea_cell_table_get_cell_at_index (EaCellTable * cell_data,
- gint index);
-gboolean ea_cell_table_set_cell_at_index (EaCellTable * cell_data,
- gint index, gpointer cell);
-
-G_CONST_RETURN gchar*
-ea_cell_table_get_column_label (EaCellTable * cell_data, gint column);
-void ea_cell_table_set_column_label (EaCellTable * cell_data,
- gint column, const gchar *label);
-G_CONST_RETURN gchar*
-ea_cell_table_get_row_label (EaCellTable * cell_data, gint row);
-void ea_cell_table_set_row_label (EaCellTable * cell_data,
- gint row, const gchar *label);
-gint ea_cell_table_get_index (EaCellTable *cell_data,
- gint row, gint column);
diff --git a/a11y/ea-factory.h b/a11y/ea-factory.h
deleted file mode 100644
index 06ae612d6f..0000000000
--- a/a11y/ea-factory.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-factory.h
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-/* Evolution Accessibility
-*/
-
-#ifndef _EA_FACTORY_H__
-#define _EA_FACTORY_H__
-
-#include <glib-object.h>
-#include <atk/atkobject.h>
-
-#define EA_FACTORY_PARTA_GOBJECT(type, type_as_function, opt_create_accessible) \
-static AtkObject* \
-type_as_function ## _factory_create_accessible (GObject *obj) \
-{ \
- AtkObject *accessible; \
- g_return_val_if_fail (G_IS_OBJECT (obj), NULL); \
- accessible = opt_create_accessible (G_OBJECT (obj)); \
- return accessible; \
-}
-
-#define EA_FACTORY_PARTA(type, type_as_function, opt_create_accessible) \
-static AtkObject* \
-type_as_function ## _factory_create_accessible (GObject *obj) \
-{ \
- GtkWidget *widget; \
- AtkObject *accessible; \
- \
- g_return_val_if_fail (GTK_IS_WIDGET (obj), NULL); \
- \
- widget = GTK_WIDGET (obj); \
- \
- accessible = opt_create_accessible (widget); \
- return accessible; \
-}
-
-#define EA_FACTORY_PARTB(type, type_as_function, opt_create_accessible) \
- \
-static GType \
-type_as_function ## _factory_get_accessible_type (void) \
-{ \
- return type; \
-} \
- \
- \
-static void \
-type_as_function ## _factory_class_init (AtkObjectFactoryClass *klass) \
-{ \
- klass->create_accessible = type_as_function ## _factory_create_accessible; \
- klass->get_accessible_type = type_as_function ## _factory_get_accessible_type;\
-} \
- \
-static GType \
-type_as_function ## _factory_get_type (void) \
-{ \
- static GType t = 0; \
- \
- if (!t) \
- { \
- char *name; \
- static const GTypeInfo tinfo = \
- { \
- sizeof (AtkObjectFactoryClass), \
- NULL, NULL, (GClassInitFunc) type_as_function ## _factory_class_init, \
- NULL, NULL, sizeof (AtkObjectFactory), 0, NULL, NULL \
- }; \
- \
- name = g_strconcat (g_type_name (type), "Factory", NULL); \
- t = g_type_register_static ( \
- ATK_TYPE_OBJECT_FACTORY, name, &tinfo, 0); \
- g_free (name); \
- } \
- \
- return t; \
-}
-
-#define EA_FACTORY(type, type_as_function, opt_create_accessible) \
- EA_FACTORY_PARTA(type, type_as_function, opt_create_accessible) \
- EA_FACTORY_PARTB(type, type_as_function, opt_create_accessible)
-
-#define EA_FACTORY_GOBJECT(type, type_as_function, opt_create_accessible) \
- EA_FACTORY_PARTA_GOBJECT(type, type_as_function, opt_create_accessible) \
- EA_FACTORY_PARTB(type, type_as_function, opt_create_accessible)
-
-#define EA_SET_FACTORY(obj_type, type_as_function) \
- atk_registry_set_factory_type (atk_get_default_registry (), \
- obj_type, \
- type_as_function ## _factory_get_type ())
-
-#endif /* _EA_FACTORY_H__ */
diff --git a/a11y/gal-a11y-factory.h b/a11y/gal-a11y-factory.h
deleted file mode 100644
index 22da85eca8..0000000000
--- a/a11y/gal-a11y-factory.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* GAL A11Y
- * gal-a11y-factory.h
- *
- * Copyright 2003 Ximian Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Authors:
- * Gilbert Fang <gilbert.fang@sun.com>, Sun Microsystem Inc. 2003.
- *
- * This file is mainly from the gailfactory.h of GAIL.
- */
-
-#ifndef _GAL_A11Y_FACTORY_H__
-#define _GAL_A11Y_FACTORY_H__
-
-#include <glib-object.h>
-#include <atk/atkobject.h>
-#include <atk/atkobjectfactory.h>
-
-#define GAL_A11Y_FACTORY(type, type_as_function, opt_create_accessible) \
- \
-static GType \
-type_as_function ## _factory_get_accessible_type (void) \
-{ \
- return type; \
-} \
- \
-static AtkObject* \
-type_as_function ## _factory_create_accessible (GObject *obj) \
-{ \
- GtkWidget *widget; \
- AtkObject *accessible; \
- \
- g_return_val_if_fail (GTK_IS_WIDGET (obj), NULL); \
- \
- widget = GTK_WIDGET (obj); \
- \
- accessible = opt_create_accessible (widget); \
- \
- return accessible; \
-} \
- \
-static void \
-type_as_function ## _factory_class_init (AtkObjectFactoryClass *klass) \
-{ \
- klass->create_accessible = type_as_function ## _factory_create_accessible; \
- klass->get_accessible_type = type_as_function ## _factory_get_accessible_type;\
-} \
- \
-static GType \
-type_as_function ## _factory_get_type (void) \
-{ \
- static GType t = 0; \
- \
- if (!t) \
- { \
- char *name; \
- static const GTypeInfo tinfo = \
- { \
- sizeof (AtkObjectFactoryClass), \
- NULL, NULL, (GClassInitFunc) type_as_function ## _factory_class_init, \
- NULL, NULL, sizeof (AtkObjectFactory), 0, NULL, NULL \
- }; \
- \
- name = g_strconcat (g_type_name (type), "Factory", NULL); \
- t = g_type_register_static ( \
- ATK_TYPE_OBJECT_FACTORY, name, &tinfo, 0); \
- g_free (name); \
- } \
- \
- return t; \
-}
-
-#define GAL_A11Y_WIDGET_SET_FACTORY(widget_type, type_as_function) \
- atk_registry_set_factory_type (atk_get_default_registry (), \
- widget_type, \
- type_as_function ## _factory_get_type ())
-
-#endif /* _GAL_A11Y_FACTORY_H__ */
diff --git a/a11y/gal-a11y-util.c b/a11y/gal-a11y-util.c
deleted file mode 100644
index 0cf7c69dbb..0000000000
--- a/a11y/gal-a11y-util.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * Copyright (C) 2002 Ximian, Inc.
- */
-
-#include <config.h>
-#include "gal-a11y-util.h"
-
-GType
-gal_a11y_type_register_static_with_private (GType parent_type,
- const gchar *type_name,
- GTypeInfo *info,
- GTypeFlags flags,
- gint priv_size,
- gint *priv_offset)
-{
- GTypeQuery query;
-
- g_type_query (parent_type, &query);
-
- info->class_size = query.class_size;
- info->instance_size = query.instance_size + priv_size;
-
- if (priv_offset)
- *priv_offset = query.instance_size;
-
- return g_type_register_static (parent_type, type_name, info, flags);
-}
diff --git a/a11y/gal-a11y-util.h b/a11y/gal-a11y-util.h
deleted file mode 100644
index b7f742b122..0000000000
--- a/a11y/gal-a11y-util.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * Copyright (C) 2001 Chris Lahey
- */
-
-#ifndef __GAL_A11Y_UTIL_H__
-#define __GAL_A11Y_UTIL_H__
-
-#include <glib-object.h>
-
-GType gal_a11y_type_register_static_with_private (GType parent_type,
- const gchar *type_name,
- GTypeInfo *info,
- GTypeFlags flags,
- int priv_size,
- gint *priv_offset);
-
-#endif /* ! __GAL_A11Y_UTIL_H__ */
diff --git a/a11y/widgets/.cvsignore b/a11y/widgets/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/a11y/widgets/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/a11y/widgets/Makefile.am b/a11y/widgets/Makefile.am
deleted file mode 100644
index 2480c3bba7..0000000000
--- a/a11y/widgets/Makefile.am
+++ /dev/null
@@ -1,31 +0,0 @@
-
-# for debug
-#A11Y_CFLAGS += -pedantic -ansi -DACC_DEBUG -Werror
-
-privlib_LTLIBRARIES = libevolution-widgets-a11y.la
-
-INCLUDES = \
- -DG_LOG_DOMAIN=\"evolution-a11y\" \
- -I$(top_srcdir)/widgets \
- -I$(top_srcdir)/a11y \
- -DEVOLUTION_DATADIR=\""$(datadir)"\" \
- -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
- -DEVOLUTION_ETSPECDIR=\""$(etspecdir)"\" \
- -DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\" \
- -DEVOLUTION_GALVIEWSDIR=\""$(viewsdir)"\" \
- -DEVOLUTION_UIDIR=\""$(evolutionuidir)"\" \
- -DPREFIX=\""$(prefix)"\" \
- $(A11Y_CFLAGS) \
- $(EVOLUTION_CALENDAR_CFLAGS)
-
-libevolution_widgets_a11y_la_SOURCES = \
- ea-calendar-item.c \
- ea-calendar-item.h \
- ea-calendar-cell.c \
- ea-calendar-cell.h \
- ea-widgets.c \
- ea-widgets.h
-
-libevolution_widgets_a11y_la_LIBADD = \
- $(top_builddir)/a11y/libevolution-a11y.la
-
diff --git a/a11y/widgets/ea-calendar-cell.c b/a11y/widgets/ea-calendar-cell.c
deleted file mode 100644
index 4b0fe75156..0000000000
--- a/a11y/widgets/ea-calendar-cell.c
+++ /dev/null
@@ -1,305 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-calendar-cell.c
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-#include "ea-calendar-cell.h"
-#include "ea-calendar-item.h"
-#include "ea-factory.h"
-
-/* ECalendarCell */
-
-static void e_calendar_cell_class_init (ECalendarCellClass *class);
-
-EA_FACTORY_GOBJECT (EA_TYPE_CALENDAR_CELL, ea_calendar_cell, ea_calendar_cell_new)
-
-GType
-e_calendar_cell_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static GTypeInfo tinfo = {
- sizeof (ECalendarCellClass),
- (GBaseInitFunc) NULL, /* base init */
- (GBaseFinalizeFunc) NULL, /* base finalize */
- (GClassInitFunc) e_calendar_cell_class_init, /* class init */
- (GClassFinalizeFunc) NULL, /* class finalize */
- NULL, /* class data */
- sizeof (ECalendarCell), /* instance size */
- 0, /* nb preallocs */
- (GInstanceInitFunc) NULL, /* instance init */
- NULL /* value table */
- };
-
- type = g_type_register_static (G_TYPE_OBJECT,
- "ECalendarCell", &tinfo, 0);
- }
-
- return type;
-}
-
-static void
-e_calendar_cell_class_init (ECalendarCellClass *class)
-{
- EA_SET_FACTORY (e_calendar_cell_get_type (), ea_calendar_cell);
-}
-
-ECalendarCell *
-e_calendar_cell_new (ECalendarItem *calitem, gint row, gint column)
-{
- GObject *object;
- ECalendarCell *cell;
-
- g_return_val_if_fail (E_IS_CALENDAR_ITEM (calitem), NULL);
-
- object = g_object_new (E_TYPE_CALENDAR_CELL, NULL);
- cell = E_CALENDAR_CELL (object);
- cell->calitem = calitem;
- cell->row = row;
- cell->column = column;
-
-#ifdef ACC_DEBUG
- g_print ("EvoAcc: e_calendar_cell created %p\n", (void *)cell);
-#endif
-
- return cell;
-}
-
-/* EaCalendarCell */
-
-static void ea_calendar_cell_class_init (EaCalendarCellClass *klass);
-
-static G_CONST_RETURN gchar* ea_calendar_cell_get_name (AtkObject *accessible);
-static G_CONST_RETURN gchar* ea_calendar_cell_get_description (AtkObject *accessible);
-static AtkObject * ea_calendar_cell_get_parent (AtkObject *accessible);
-
-/* component interface */
-static void atk_component_interface_init (AtkComponentIface *iface);
-static void component_interface_get_extents (AtkComponent *component,
- gint *x, gint *y,
- gint *width, gint *height,
- AtkCoordType coord_type);
-
-static gpointer parent_class = NULL;
-
-#ifdef ACC_DEBUG
-static gint n_ea_calendar_cell_created = 0, n_ea_calendar_cell_destroyed = 0;
-static void ea_calendar_cell_finalize (GObject *object);
-#endif
-
-GType
-ea_calendar_cell_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static GTypeInfo tinfo = {
- sizeof (EaCalendarCellClass),
- (GBaseInitFunc) NULL, /* base init */
- (GBaseFinalizeFunc) NULL, /* base finalize */
- (GClassInitFunc) ea_calendar_cell_class_init, /* class init */
- (GClassFinalizeFunc) NULL, /* class finalize */
- NULL, /* class data */
- sizeof (EaCalendarCell), /* instance size */
- 0, /* nb preallocs */
- (GInstanceInitFunc) NULL, /* instance init */
- NULL /* value table */
- };
-
- static const GInterfaceInfo atk_component_info = {
- (GInterfaceInitFunc) atk_component_interface_init,
- (GInterfaceFinalizeFunc) NULL,
- NULL
- };
-
- type = g_type_register_static (ATK_TYPE_GOBJECT_ACCESSIBLE,
- "EaCalendarCell", &tinfo, 0);
- g_type_add_interface_static (type, ATK_TYPE_COMPONENT,
- &atk_component_info);
- }
-
- return type;
-}
-
-static void
-ea_calendar_cell_class_init (EaCalendarCellClass *klass)
-{
- AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
-
-#ifdef ACC_DEBUG
- GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- gobject_class->finalize = ea_calendar_cell_finalize;
-#endif
-
- parent_class = g_type_class_peek_parent (klass);
-
- class->get_name = ea_calendar_cell_get_name;
- class->get_description = ea_calendar_cell_get_description;
-
- class->get_parent = ea_calendar_cell_get_parent;
-}
-
-AtkObject*
-ea_calendar_cell_new (GObject *obj)
-{
- gpointer object;
- AtkObject *atk_object;
-
- g_return_val_if_fail (E_IS_CALENDAR_CELL (obj), NULL);
- object = g_object_new (EA_TYPE_CALENDAR_CELL, NULL);
- atk_object = ATK_OBJECT (object);
- atk_object_initialize (atk_object, obj);
- atk_object->role = ATK_ROLE_TABLE_CELL;
-
-#ifdef ACC_DEBUG
- ++n_ea_calendar_cell_created;
- g_print ("ACC_DEBUG: n_ea_calendar_cell_created = %d\n",
- n_ea_calendar_cell_created);
-#endif
- return atk_object;
-}
-
-#ifdef ACC_DEBUG
-static void ea_calendar_cell_finalize (GObject *object)
-{
- ++n_ea_calendar_cell_destroyed;
- g_print ("ACC_DEBUG: n_ea_calendar_cell_destroyed = %d\n",
- n_ea_calendar_cell_destroyed);
-}
-#endif
-
-static G_CONST_RETURN gchar*
-ea_calendar_cell_get_name (AtkObject *accessible)
-{
- GObject *g_obj;
-
- g_return_val_if_fail (EA_IS_CALENDAR_CELL (accessible), NULL);
-
- g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE(accessible));
- if (!g_obj)
- /* defunct object*/
- return NULL;
-
- if (!accessible->name) {
- AtkObject *atk_obj;
- EaCalendarItem *ea_calitem;
- ECalendarCell *cell;
- gint day_index;
- gint year, month, day;
- gchar buffer[128];
-
- cell = E_CALENDAR_CELL (g_obj);
- atk_obj = ea_calendar_cell_get_parent (accessible);
- ea_calitem = EA_CALENDAR_ITEM (atk_obj);
- day_index = atk_table_get_index_at (ATK_TABLE (ea_calitem),
- cell->row, cell->column);
- e_calendar_item_get_date_for_offset (cell->calitem, day_index,
- &year, &month, &day);
-
- g_snprintf (buffer, 128, "%d-%d-%d", year, month + 1, day);
- ATK_OBJECT_CLASS (parent_class)->set_name (accessible, buffer);
- }
- return accessible->name;
-}
-
-static G_CONST_RETURN gchar*
-ea_calendar_cell_get_description (AtkObject *accessible)
-{
- return ea_calendar_cell_get_name (accessible);
-}
-
-static AtkObject *
-ea_calendar_cell_get_parent (AtkObject *accessible)
-{
- GObject *g_obj;
- ECalendarCell *cell;
- ECalendarItem *calitem;
-
- g_return_val_if_fail (EA_IS_CALENDAR_CELL (accessible), NULL);
-
- g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE(accessible));
- if (!g_obj)
- /* defunct object*/
- return NULL;
-
- cell = E_CALENDAR_CELL (g_obj);
- calitem = cell->calitem;
- return atk_gobject_accessible_for_object (G_OBJECT (calitem));
-}
-
-/* Atk Component Interface */
-
-static void
-atk_component_interface_init (AtkComponentIface *iface)
-{
- g_return_if_fail (iface != NULL);
-
- iface->get_extents = component_interface_get_extents;
-}
-
-static void
-component_interface_get_extents (AtkComponent *component,
- gint *x, gint *y, gint *width, gint *height,
- AtkCoordType coord_type)
-{
- GObject *g_obj;
- AtkObject *atk_obj, *atk_canvas;
- ECalendarCell *cell;
- ECalendarItem *calitem;
- EaCalendarItem *ea_calitem;
- gint day_index;
- gint year, month, day;
- gint canvas_x, canvas_y, canvas_width, canvas_height;
-
- *x = *y = *width = *height = 0;
-
- g_return_if_fail (EA_IS_CALENDAR_CELL (component));
-
-
- g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE(component));
- if (!g_obj)
- /* defunct object*/
- return;
-
- cell = E_CALENDAR_CELL (g_obj);
- calitem = cell->calitem;
- atk_obj = atk_gobject_accessible_for_object (G_OBJECT (calitem));
- ea_calitem = EA_CALENDAR_ITEM (atk_obj);
- day_index = atk_table_get_index_at (ATK_TABLE (ea_calitem),
- cell->row, cell->column);
- e_calendar_item_get_date_for_offset (calitem, day_index,
- &year, &month, &day);
-
- if (!e_calendar_item_get_day_extents (calitem,
- year, month, day,
- x, y, width, height))
- return;
- atk_canvas = atk_object_get_parent (ATK_OBJECT (ea_calitem));
- atk_component_get_extents (ATK_COMPONENT (atk_canvas),
- &canvas_x, &canvas_y,
- &canvas_width, &canvas_height,
- coord_type);
- *x += canvas_x;
- *y += canvas_y;
-}
diff --git a/a11y/widgets/ea-calendar-cell.h b/a11y/widgets/ea-calendar-cell.h
deleted file mode 100644
index f87ede90a7..0000000000
--- a/a11y/widgets/ea-calendar-cell.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-calendar-cell.h
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-#ifndef __EA_CALENDAR_CELL_H__
-#define __EA_CALENDAR_CELL_H__
-
-#include <atk/atkgobjectaccessible.h>
-#include "misc/e-calendar-item.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#define E_TYPE_CALENDAR_CELL (e_calendar_cell_get_type ())
-#define E_CALENDAR_CELL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_CALENDAR_CELL, ECalendarCell))
-#define E_CALENDAR_CELL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_CALENDAR_CELL, ECalendarCellClass))
-#define E_IS_CALENDAR_CELL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_CALENDAR_CELL))
-#define E_IS_CALENDAR_CELL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_CALENDAR_CELL))
-#define E_CALENDAR_CELL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), E_TYPE_CALENDAR_CELL, ECalendarCellClass))
-
-typedef struct _ECalendarCell ECalendarCell;
-typedef struct _ECalendarCellClass ECalendarCellClass;
-
-struct _ECalendarCell
-{
- GObject parent;
- ECalendarItem *calitem;
- gint row;
- gint column;
-};
-
-GType e_calendar_cell_get_type (void);
-
-struct _ECalendarCellClass
-{
- GObjectClass parent_class;
-};
-
-ECalendarCell * e_calendar_cell_new (ECalendarItem *calitem,
- gint row, gint column);
-
-#define EA_TYPE_CALENDAR_CELL (ea_calendar_cell_get_type ())
-#define EA_CALENDAR_CELL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EA_TYPE_CALENDAR_CELL, EaCalendarCell))
-#define EA_CALENDAR_CELL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EA_TYPE_CALENDAR_CELL, EaCalendarCellClass))
-#define EA_IS_CALENDAR_CELL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EA_TYPE_CALENDAR_CELL))
-#define EA_IS_CALENDAR_CELL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EA_TYPE_CALENDAR_CELL))
-#define EA_CALENDAR_CELL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EA_TYPE_CALENDAR_CELL, EaCalendarCellClass))
-
-typedef struct _EaCalendarCell EaCalendarCell;
-typedef struct _EaCalendarCellClass EaCalendarCellClass;
-
-struct _EaCalendarCell
-{
- AtkGObjectAccessible parent;
-};
-
-GType ea_calendar_cell_get_type (void);
-
-struct _EaCalendarCellClass
-{
- AtkGObjectAccessibleClass parent_class;
-};
-
-AtkObject* ea_calendar_cell_new (GObject *gobj);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __EA_CALENDAR_CELL_H__ */
diff --git a/a11y/widgets/ea-calendar-item.c b/a11y/widgets/ea-calendar-item.c
deleted file mode 100644
index 6170e7f50c..0000000000
--- a/a11y/widgets/ea-calendar-item.c
+++ /dev/null
@@ -1,1247 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-calendar-item.c
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-#include <stdio.h>
-#include <time.h>
-#include <string.h>
-#include <libgnomecanvas/gnome-canvas.h>
-#include <glib/gdate.h>
-#include "ea-calendar-item.h"
-#include "ea-calendar-cell.h"
-#include "ea-cell-table.h"
-
-#define EA_CALENDAR_COLUMN_NUM E_CALENDAR_COLS_PER_MONTH
-
-/* EaCalendarItem */
-static void ea_calendar_item_class_init (EaCalendarItemClass *klass);
-static void ea_calendar_item_finalize (GObject *object);
-
-static G_CONST_RETURN gchar* ea_calendar_item_get_name (AtkObject *accessible);
-static G_CONST_RETURN gchar* ea_calendar_item_get_description (AtkObject *accessible);
-static gint ea_calendar_item_get_n_children (AtkObject *accessible);
-static AtkObject *ea_calendar_item_ref_child (AtkObject *accessible, gint index);
-
-/* atk table interface */
-static void atk_table_interface_init (AtkTableIface *iface);
-static gint table_interface_get_index_at (AtkTable *table,
- gint row,
- gint column);
-static gint table_interface_get_column_at_index (AtkTable *table,
- gint index);
-static gint table_interface_get_row_at_index (AtkTable *table,
- gint index);
-static AtkObject* table_interface_ref_at (AtkTable *table,
- gint row,
- gint column);
-static gint table_interface_get_n_rows (AtkTable *table);
-static gint table_interface_get_n_columns (AtkTable *table);
-static gint table_interface_get_column_extent_at (AtkTable *table,
- gint row,
- gint column);
-static gint table_interface_get_row_extent_at (AtkTable *table,
- gint row,
- gint column);
-
-static gboolean table_interface_is_row_selected (AtkTable *table,
- gint row);
-static gboolean table_interface_is_column_selected (AtkTable *table,
- gint row);
-static gboolean table_interface_is_selected (AtkTable *table,
- gint row,
- gint column);
-static gint table_interface_get_selected_rows (AtkTable *table,
- gint **rows_selected);
-static gint table_interface_get_selected_columns (AtkTable *table,
- gint **columns_selected);
-static gboolean table_interface_add_row_selection (AtkTable *table, gint row);
-static gboolean table_interface_remove_row_selection (AtkTable *table,
- gint row);
-static gboolean table_interface_add_column_selection (AtkTable *table,
- gint column);
-static gboolean table_interface_remove_column_selection (AtkTable *table,
- gint column);
-static AtkObject* table_interface_get_row_header (AtkTable *table, gint row);
-static AtkObject* table_interface_get_column_header (AtkTable *table,
- gint in_col);
-static AtkObject* table_interface_get_caption (AtkTable *table);
-
-static G_CONST_RETURN gchar*
-table_interface_get_column_description (AtkTable *table, gint in_col);
-
-static G_CONST_RETURN gchar*
-table_interface_get_row_description (AtkTable *table, gint row);
-
-static AtkObject* table_interface_get_summary (AtkTable *table);
-
-/* atk selection interface */
-static void atk_selection_interface_init (AtkSelectionIface *iface);
-static gboolean selection_interface_add_selection (AtkSelection *selection,
- gint i);
-static gboolean selection_interface_clear_selection (AtkSelection *selection);
-static AtkObject* selection_interface_ref_selection (AtkSelection *selection,
- gint i);
-static gint selection_interface_get_selection_count (AtkSelection *selection);
-static gboolean selection_interface_is_child_selected (AtkSelection *selection,
- gint i);
-
-/* callbacks */
-static void selection_preview_change_cb (ECalendarItem *calitem);
-static void date_range_changed_cb (ECalendarItem *calitem);
-static void selection_changed_cb (ECalendarItem *calitem);
-
-/* helpers */
-static EaCellTable *ea_calendar_item_get_cell_data (EaCalendarItem *ea_calitem);
-static void ea_calendar_item_destory_cell_data (EaCalendarItem *ea_calitem);
-static gboolean ea_calendar_item_get_column_label (EaCalendarItem *ea_calitem,
- gint column,
- gchar *buffer,
- gint buffer_size);
-static gboolean ea_calendar_item_get_row_label (EaCalendarItem *ea_calitem,
- gint row,
- gchar *buffer,
- gint buffer_size);
-
-#ifdef ACC_DEBUG
-static gint n_ea_calendar_item_created = 0;
-static gint n_ea_calendar_item_destroyed = 0;
-#endif
-
-static gpointer parent_class = NULL;
-
-GType
-ea_calendar_item_get_type (void)
-{
- static GType type = 0;
- AtkObjectFactory *factory;
- GTypeQuery query;
- GType derived_atk_type;
-
- if (!type) {
- static GTypeInfo tinfo = {
- sizeof (EaCalendarItemClass),
- (GBaseInitFunc) NULL, /* base init */
- (GBaseFinalizeFunc) NULL, /* base finalize */
- (GClassInitFunc) ea_calendar_item_class_init, /* class init */
- (GClassFinalizeFunc) NULL, /* class finalize */
- NULL, /* class data */
- sizeof (EaCalendarItem), /* instance size */
- 0, /* nb preallocs */
- (GInstanceInitFunc) NULL, /* instance init */
- NULL /* value table */
- };
-
- static const GInterfaceInfo atk_table_info = {
- (GInterfaceInitFunc) atk_table_interface_init,
- (GInterfaceFinalizeFunc) NULL,
- NULL
- };
- static const GInterfaceInfo atk_selection_info = {
- (GInterfaceInitFunc) atk_selection_interface_init,
- (GInterfaceFinalizeFunc) NULL,
- NULL
- };
-
- /*
- * Figure out the size of the class and instance
- * we are run-time deriving from (GailCanvasItem, in this case)
- */
-
- factory = atk_registry_get_factory (atk_get_default_registry (),
- GNOME_TYPE_CANVAS_ITEM);
- derived_atk_type = atk_object_factory_get_accessible_type (factory);
- g_type_query (derived_atk_type, &query);
-
- tinfo.class_size = query.class_size;
- tinfo.instance_size = query.instance_size;
-
- type = g_type_register_static (derived_atk_type,
- "EaCalendarItem", &tinfo, 0);
- g_type_add_interface_static (type, ATK_TYPE_TABLE,
- &atk_table_info);
- g_type_add_interface_static (type, ATK_TYPE_SELECTION,
- &atk_selection_info);
- }
-
- return type;
-}
-
-static void
-ea_calendar_item_class_init (EaCalendarItemClass *klass)
-{
- GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
-
- gobject_class->finalize = ea_calendar_item_finalize;
- parent_class = g_type_class_peek_parent (klass);
-
- class->get_name = ea_calendar_item_get_name;
- class->get_description = ea_calendar_item_get_description;
-
- class->get_n_children = ea_calendar_item_get_n_children;
- class->ref_child = ea_calendar_item_ref_child;
-}
-
-AtkObject*
-ea_calendar_item_new (GObject *obj)
-{
- gpointer object;
- AtkObject *atk_object;
-
- g_return_val_if_fail (E_IS_CALENDAR_ITEM (obj), NULL);
- object = g_object_new (EA_TYPE_CALENDAR_ITEM, NULL);
- atk_object = ATK_OBJECT (object);
- atk_object_initialize (atk_object, obj);
- atk_object->role = ATK_ROLE_TABLE;
-#ifdef ACC_DEBUG
- ++n_ea_calendar_item_created;
- g_print ("ACC_DEBUG: n_ea_calendar_item_created = %d\n",
- n_ea_calendar_item_created);
-#endif
- /* connect signal handlers */
- g_signal_connect (obj, "selection_preview_changed",
- G_CALLBACK (selection_preview_change_cb),
- atk_object);
- g_signal_connect (obj, "date_range_changed",
- G_CALLBACK (date_range_changed_cb),
- atk_object);
- g_signal_connect (obj, "selection_preview_changed",
- G_CALLBACK (selection_changed_cb),
- atk_object);
-
- return atk_object;
-}
-
-static void
-ea_calendar_item_finalize (GObject *object)
-{
- EaCalendarItem *ea_calitem;
-
- g_return_if_fail (EA_IS_CALENDAR_ITEM (object));
-
- ea_calitem = EA_CALENDAR_ITEM (object);
-
- /* Free the allocated cell data */
- ea_calendar_item_destory_cell_data (ea_calitem);
-
- G_OBJECT_CLASS (parent_class)->finalize (object);
-#ifdef ACC_DEBUG
- ++n_ea_calendar_item_destroyed;
- printf ("ACC_DEBUG: n_ea_calendar_item_destroyed = %d\n",
- n_ea_calendar_item_destroyed);
-#endif
-}
-
-static G_CONST_RETURN gchar*
-ea_calendar_item_get_name (AtkObject *accessible)
-{
- GObject *g_obj;
- ECalendarItem *calitem;
- gint start_year, start_month, start_day;
- gint end_year, end_month, end_day;
- static gchar new_name[256] = "";
-
- g_return_val_if_fail (EA_IS_CALENDAR_ITEM (accessible), NULL);
-
- if (accessible->name)
- return accessible->name;
-
- g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE(accessible));
- g_return_val_if_fail (E_IS_CALENDAR_ITEM (g_obj), NULL);
-
- calitem = E_CALENDAR_ITEM (g_obj);
- if (e_calendar_item_get_date_range (calitem,
- &start_year, &start_month, &start_day,
- &end_year, &end_month, &end_day)) {
- ++start_month;
- ++end_month;
- sprintf (new_name, "calendar (from %d-%d-%d to %d-%d-%d)",
- start_year, start_month, start_day,
- end_year, end_month, end_day);
- }
-
-#if 0
- if (e_calendar_item_get_selection (calitem, &select_start, &select_end)) {
- GDate select_start, select_end;
- gint year1, year2, month1, month2, day1, day2;
-
- year1 = g_date_get_year (&select_start);
- month1 = g_date_get_month (&select_start);
- day1 = g_date_get_day (&select_start);
-
- year2 = g_date_get_year (&select_end);
- month2 = g_date_get_month (&select_end);
- day2 = g_date_get_day (&select_end);
-
- sprintf (new_name + strlen (new_name),
- " : current selection: from %d-%d-%d to %d-%d-%d.",
- year1, month1, day1,
- year2, month2, day2);
- }
-#endif
-
- return new_name;
-}
-
-static G_CONST_RETURN gchar*
-ea_calendar_item_get_description (AtkObject *accessible)
-{
- if (accessible->description)
- return accessible->description;
-
- return "evolution calendar item";
-}
-
-static gint
-ea_calendar_item_get_n_children (AtkObject *accessible)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- ECalendarItem *calitem;
- gint n_children = 0;
- gint start_year, start_month, start_day;
- gint end_year, end_month, end_day;
- GDate *start_date, *end_date;
-
- g_return_val_if_fail (EA_IS_CALENDAR_ITEM (accessible), -1);
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (accessible);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return -1;
-
- calitem = E_CALENDAR_ITEM (g_obj);
- if (!e_calendar_item_get_date_range (calitem, &start_year,
- &start_month, &start_day,
- &end_year, &end_month,
- &end_day))
- return 0;
-
- start_date = g_date_new_dmy (start_day, start_month + 1, start_year);
- end_date = g_date_new_dmy (end_day, end_month + 1, end_year);
-
- n_children = g_date_days_between (start_date, end_date) + 1;
- g_free (start_date);
- g_free (end_date);
- return n_children;
-}
-
-static AtkObject *
-ea_calendar_item_ref_child (AtkObject *accessible, gint index)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- ECalendarItem *calitem;
- gint n_children;
- ECalendarCell *cell;
- EaCellTable *cell_data;
- EaCalendarItem *ea_calitem;
-
- g_return_val_if_fail (EA_IS_CALENDAR_ITEM (accessible), NULL);
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (accessible);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return NULL;
-
- calitem = E_CALENDAR_ITEM (g_obj);
-
- n_children = ea_calendar_item_get_n_children (accessible);
- if (index < 0 || index >= n_children)
- return NULL;
-
- ea_calitem = EA_CALENDAR_ITEM (accessible);
- cell_data = ea_calendar_item_get_cell_data (ea_calitem);
- if (!cell_data)
- return NULL;
-
- cell = ea_cell_table_get_cell_at_index (cell_data, index);
- if (!cell) {
- cell = e_calendar_cell_new (calitem,
- index / EA_CALENDAR_COLUMN_NUM,
- index % EA_CALENDAR_COLUMN_NUM);
- ea_cell_table_set_cell_at_index (cell_data, index, cell);
- g_object_unref (cell);
- }
-
-#ifdef ACC_DEBUG
- g_print ("AccDebug: ea_calendar_item children[%d]=%p\n", index,
- (gpointer)cell);
-#endif
- return g_object_ref (atk_gobject_accessible_for_object (G_OBJECT(cell)));
-}
-
-/* atk table interface */
-
-static void
-atk_table_interface_init (AtkTableIface *iface)
-{
- g_return_if_fail (iface != NULL);
-
- iface->ref_at = table_interface_ref_at;
-
- iface->get_n_rows = table_interface_get_n_rows;
- iface->get_n_columns = table_interface_get_n_columns;
- iface->get_index_at = table_interface_get_index_at;
- iface->get_column_at_index = table_interface_get_column_at_index;
- iface->get_row_at_index = table_interface_get_row_at_index;
- iface->get_column_extent_at = table_interface_get_column_extent_at;
- iface->get_row_extent_at = table_interface_get_row_extent_at;
-
- iface->is_selected = table_interface_is_selected;
- iface->get_selected_rows = table_interface_get_selected_rows;
- iface->get_selected_columns = table_interface_get_selected_columns;
- iface->is_row_selected = table_interface_is_row_selected;
- iface->is_column_selected = table_interface_is_column_selected;
- iface->add_row_selection = table_interface_add_row_selection;
- iface->remove_row_selection = table_interface_remove_row_selection;
- iface->add_column_selection = table_interface_add_column_selection;
- iface->remove_column_selection = table_interface_remove_column_selection;
-
- iface->get_row_header = table_interface_get_row_header;
- iface->get_column_header = table_interface_get_column_header;
- iface->get_caption = table_interface_get_caption;
- iface->get_summary = table_interface_get_summary;
- iface->get_row_description = table_interface_get_row_description;
- iface->get_column_description = table_interface_get_column_description;
-}
-
-static AtkObject*
-table_interface_ref_at (AtkTable *table,
- gint row,
- gint column)
-{
- gint index;
-
- EaCalendarItem* ea_calitem = EA_CALENDAR_ITEM (table);
- index = EA_CALENDAR_COLUMN_NUM * row + column;
- return ea_calendar_item_ref_child (ATK_OBJECT (ea_calitem), index);
-}
-
-static gint
-table_interface_get_n_rows (AtkTable *table)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- EaCalendarItem* ea_calitem = EA_CALENDAR_ITEM (table);
- gint n_children;
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_calitem);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return -1;
-
- n_children = ea_calendar_item_get_n_children (ATK_OBJECT (ea_calitem));
- return (n_children - 1) / EA_CALENDAR_COLUMN_NUM + 1;
-}
-
-static gint
-table_interface_get_n_columns (AtkTable *table)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- EaCalendarItem* ea_calitem = EA_CALENDAR_ITEM (table);
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_calitem);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return -1;
-
- return EA_CALENDAR_COLUMN_NUM;
-}
-
-static gint
-table_interface_get_index_at (AtkTable *table,
- gint row,
- gint column)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- EaCalendarItem* ea_calitem = EA_CALENDAR_ITEM (table);
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_calitem);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return -1;
-
- return row * EA_CALENDAR_COLUMN_NUM + column;
-}
-
-static gint
-table_interface_get_column_at_index (AtkTable *table,
- gint index)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- EaCalendarItem* ea_calitem = EA_CALENDAR_ITEM (table);
- gint n_children;
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_calitem);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return -1;
-
- n_children = ea_calendar_item_get_n_children (ATK_OBJECT (ea_calitem));
- if (index >= 0 && index < n_children)
- return index % EA_CALENDAR_COLUMN_NUM;
- return -1;
-}
-
-static gint
-table_interface_get_row_at_index (AtkTable *table,
- gint index)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- EaCalendarItem* ea_calitem = EA_CALENDAR_ITEM (table);
- gint n_children;
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_calitem);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return -1;
-
- n_children = ea_calendar_item_get_n_children (ATK_OBJECT (ea_calitem));
- if (index >= 0 && index < n_children)
- return index / EA_CALENDAR_COLUMN_NUM;
- return -1;
-}
-
-static gint
-table_interface_get_column_extent_at (AtkTable *table,
- gint row,
- gint column)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- ECalendarItem *calitem;
- EaCalendarItem* ea_calitem = EA_CALENDAR_ITEM (table);
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_calitem);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return FALSE;
-
- calitem = E_CALENDAR_ITEM (g_obj);
- return calitem->cell_width;
-}
-
-static gint
-table_interface_get_row_extent_at (AtkTable *table,
- gint row, gint column)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- ECalendarItem *calitem;
- EaCalendarItem* ea_calitem = EA_CALENDAR_ITEM (table);
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_calitem);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return FALSE;
-
- calitem = E_CALENDAR_ITEM (g_obj);
- return calitem->cell_height;
-}
-
-/* any day in the row is selected, the row is selected */
-static gboolean
-table_interface_is_row_selected (AtkTable *table,
- gint row)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- gint n_rows;
- ECalendarItem *calitem;
- gint row_index_start, row_index_end;
- gint sel_index_start, sel_index_end;
-
- GDate start_date, end_date;
-
- g_return_val_if_fail (EA_IS_CALENDAR_ITEM (table), FALSE);
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (table);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return FALSE;
-
- n_rows = table_interface_get_n_rows (table);
- if (row < 0 || row >= n_rows)
- return FALSE;
-
- row_index_start = row * EA_CALENDAR_COLUMN_NUM;
- row_index_end = row_index_start + EA_CALENDAR_COLUMN_NUM - 1;
-
- calitem = E_CALENDAR_ITEM (g_obj);
- e_calendar_item_get_selection (calitem, &start_date, &end_date);
-
- sel_index_start =
- e_calendar_item_get_offset_for_date (calitem,
- g_date_get_year (&start_date),
- g_date_get_month (&start_date),
- g_date_get_day (&start_date));
- sel_index_end =
- e_calendar_item_get_offset_for_date (calitem,
- g_date_get_year (&end_date),
- g_date_get_month (&end_date),
- g_date_get_day (&end_date));
-
- if ((sel_index_start < row_index_start &&
- sel_index_end >= row_index_start) ||
- (sel_index_start >= row_index_start &&
- sel_index_start <= row_index_end))
- return TRUE;
- return FALSE;
-}
-
-static gboolean
-table_interface_is_selected (AtkTable *table,
- gint row,
- gint column)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- gint n_rows, n_columns;
- ECalendarItem *calitem;
- gint index;
- gint sel_index_start, sel_index_end;
-
- GDate start_date, end_date;
-
- g_return_val_if_fail (EA_IS_CALENDAR_ITEM (table), FALSE);
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (table);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return FALSE;
-
- n_rows = table_interface_get_n_rows (table);
- if (row < 0 || row >= n_rows)
- return FALSE;
- n_columns = table_interface_get_n_columns (table);
- if (column < 0 || column >= n_columns)
- return FALSE;
-
- index = table_interface_get_index_at (table, row, column);
-
- calitem = E_CALENDAR_ITEM (g_obj);
- e_calendar_item_get_selection (calitem, &start_date, &end_date);
-
- sel_index_start =
- e_calendar_item_get_offset_for_date (calitem,
- g_date_get_year (&start_date),
- g_date_get_month (&start_date),
- g_date_get_day (&start_date));
- sel_index_end =
- e_calendar_item_get_offset_for_date (calitem,
- g_date_get_year (&end_date),
- g_date_get_month (&end_date),
- g_date_get_day (&end_date));
-
- if (sel_index_start <= index && sel_index_end >= index)
- return TRUE;
- return FALSE;
-}
-
-static gboolean
-table_interface_is_column_selected (AtkTable *table,
- gint column)
-{
- return FALSE;
-}
-
-static gint
-table_interface_get_selected_rows (AtkTable *table,
- gint **rows_selected)
-{
- *rows_selected = NULL;
- return -1;
-}
-
-static gint
-table_interface_get_selected_columns (AtkTable *table,
- gint **columns_selected)
-{
- *columns_selected = NULL;
- return -1;
-}
-
-static gboolean
-table_interface_add_row_selection (AtkTable *table,
- gint row)
-{
- return FALSE;
-}
-
-static gboolean
-table_interface_remove_row_selection (AtkTable *table,
- gint row)
-{
- return FALSE;
-}
-
-static gboolean
-table_interface_add_column_selection (AtkTable *table,
- gint column)
-{
- return FALSE;
-}
-
-static gboolean
-table_interface_remove_column_selection (AtkTable *table,
- gint column)
-{
- /* FIXME: NOT IMPLEMENTED */
- return FALSE;
-}
-
-static AtkObject*
-table_interface_get_row_header (AtkTable *table,
- gint row)
-{
- /* FIXME: NOT IMPLEMENTED */
- return NULL;
-}
-
-static AtkObject*
-table_interface_get_column_header (AtkTable *table,
- gint in_col)
-{
- /* FIXME: NOT IMPLEMENTED */
- return NULL;
-}
-
-static AtkObject*
-table_interface_get_caption (AtkTable *table)
-{
- /* FIXME: NOT IMPLEMENTED */
- return NULL;
-}
-
-static G_CONST_RETURN gchar*
-table_interface_get_column_description (AtkTable *table, gint in_col)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- ECalendarItem *calitem;
- EaCalendarItem* ea_calitem = EA_CALENDAR_ITEM (table);
- const gchar *description = NULL;
- EaCellTable *cell_data;
- gint n_columns;
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_calitem);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return NULL;
-
- calitem = E_CALENDAR_ITEM (g_obj);
- n_columns = table_interface_get_n_columns (table);
- if (in_col < 0 || in_col >= n_columns)
- return NULL;
- cell_data = ea_calendar_item_get_cell_data (ea_calitem);
- if (!cell_data)
- return NULL;
-
- description = ea_cell_table_get_column_label (cell_data, in_col);
- if (!description) {
- gchar buffer[128] = "column description";
- ea_calendar_item_get_column_label (ea_calitem, in_col,
- buffer, sizeof (buffer));
- ea_cell_table_set_column_label (cell_data, in_col, buffer);
- description = ea_cell_table_get_column_label (cell_data,
- in_col);
- }
- return description;
-}
-
-static G_CONST_RETURN gchar*
-table_interface_get_row_description (AtkTable *table, gint row)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- ECalendarItem *calitem;
- EaCalendarItem* ea_calitem = EA_CALENDAR_ITEM (table);
- const gchar *description = NULL;
- EaCellTable *cell_data;
- gint n_rows;
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_calitem);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return NULL;
-
- calitem = E_CALENDAR_ITEM (g_obj);
- n_rows = table_interface_get_n_rows (table);
- if (row < 0 || row >= n_rows)
- return NULL;
- cell_data = ea_calendar_item_get_cell_data (ea_calitem);
- if (!cell_data)
- return NULL;
-
- description = ea_cell_table_get_row_label (cell_data, row);
- if (!description) {
- gchar buffer[128] = "row description";
- ea_calendar_item_get_row_label (ea_calitem, row,
- buffer, sizeof (buffer));
- ea_cell_table_set_row_label (cell_data, row, buffer);
- description = ea_cell_table_get_row_label (cell_data,
- row);
- }
- return description;
-}
-
-static AtkObject*
-table_interface_get_summary (AtkTable *table)
-{
- /* FIXME: NOT IMPLEMENTED */
- return NULL;
-}
-
-/* atkselection interface */
-
-static void
-atk_selection_interface_init (AtkSelectionIface *iface)
-{
- g_return_if_fail (iface != NULL);
-
- iface->add_selection = selection_interface_add_selection;
- iface->clear_selection = selection_interface_clear_selection;
- iface->ref_selection = selection_interface_ref_selection;
- iface->get_selection_count = selection_interface_get_selection_count;
- iface->is_child_selected = selection_interface_is_child_selected;
-}
-
-static gboolean
-selection_interface_add_selection (AtkSelection *selection, gint index)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- ECalendarItem *calitem;
- EaCalendarItem* ea_calitem = EA_CALENDAR_ITEM (selection);
- gint year, month, day;
- GDate start_date, end_date;
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_calitem);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return FALSE;
-
- calitem = E_CALENDAR_ITEM (g_obj);
- if (!e_calendar_item_get_date_for_offset (calitem, index,
- &year, &month, &day))
- return FALSE;
-
- /* FIXME: not support mulit-selection */
- g_date_set_dmy (&start_date, day, month + 1, year);
- end_date = start_date;
- e_calendar_item_set_selection (calitem, &start_date, &end_date);
- return TRUE;
-}
-
-static gboolean
-selection_interface_clear_selection (AtkSelection *selection)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- ECalendarItem *calitem;
- EaCalendarItem* ea_calitem = EA_CALENDAR_ITEM (selection);
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_calitem);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return FALSE;
-
- calitem = E_CALENDAR_ITEM (g_obj);
- e_calendar_item_set_selection (calitem, NULL, NULL);
-
- return TRUE;
-}
-
-static AtkObject*
-selection_interface_ref_selection (AtkSelection *selection, gint i)
-{
- GObject *g_obj;
- ECalendarItem *calitem;
- EaCalendarItem* ea_calitem = EA_CALENDAR_ITEM (selection);
- gint count, sel_offset;
- GDate start_date, end_date;
-
- count = selection_interface_get_selection_count (selection);
- if (i < 0 || i >= count)
- return NULL;
-
- g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (ea_calitem));
-
- calitem = E_CALENDAR_ITEM (g_obj);
- e_calendar_item_get_selection (calitem, &start_date, &end_date);
- sel_offset = e_calendar_item_get_offset_for_date (calitem,
- g_date_get_year (&start_date),
- g_date_get_month (&start_date),
- g_date_get_day (&start_date));
-
- return ea_calendar_item_ref_child (ATK_OBJECT (selection), sel_offset + i);
-}
-
-static gint
-selection_interface_get_selection_count (AtkSelection *selection)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- ECalendarItem *calitem;
- EaCalendarItem* ea_calitem = EA_CALENDAR_ITEM (selection);
- GDate start_date, end_date;
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_calitem);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return 0;
-
- calitem = E_CALENDAR_ITEM (g_obj);
- e_calendar_item_get_selection (calitem, &start_date, &end_date);
-
- return g_date_days_between (&start_date, &end_date) + 1;
-}
-
-static gboolean
-selection_interface_is_child_selected (AtkSelection *selection, gint index)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- ECalendarItem *calitem;
- EaCalendarItem* ea_calitem = EA_CALENDAR_ITEM (selection);
- gint row, column, n_children;
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_calitem);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return FALSE;
-
- calitem = E_CALENDAR_ITEM (g_obj);
- n_children = atk_object_get_n_accessible_children (ATK_OBJECT (selection));
- if (index < 0 || index >= n_children)
- return FALSE;
-
- row = index / EA_CALENDAR_COLUMN_NUM;
- column = index % EA_CALENDAR_COLUMN_NUM;
-
- return table_interface_is_selected (ATK_TABLE (selection), row, column);
-}
-
-/* callbacks */
-
-static void
-selection_preview_change_cb (ECalendarItem *calitem)
-{
- AtkObject *atk_obj;
-
- g_return_if_fail (E_IS_CALENDAR_ITEM (calitem));
- atk_obj = atk_gobject_accessible_for_object (G_OBJECT (calitem));
-
- g_signal_emit_by_name (atk_obj, "selection_changed");
-}
-
-static void
-date_range_changed_cb (ECalendarItem *calitem)
-{
- AtkObject *atk_obj;
-
- g_return_if_fail (E_IS_CALENDAR_ITEM (calitem));
- atk_obj = atk_gobject_accessible_for_object (G_OBJECT (calitem));
- ea_calendar_item_destory_cell_data (EA_CALENDAR_ITEM (atk_obj));
-
- g_signal_emit_by_name (atk_obj, "model_changed");
-}
-
-static void
-selection_changed_cb (ECalendarItem *calitem)
-{
- selection_preview_change_cb (calitem);
-}
-
-/* helpers */
-
-static EaCellTable *
-ea_calendar_item_get_cell_data (EaCalendarItem *ea_calitem)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- ECalendarItem *calitem;
- EaCellTable *cell_data;
-
- g_return_val_if_fail (ea_calitem, NULL);
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_calitem);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return NULL;
-
- calitem = E_CALENDAR_ITEM (g_obj);
-
- cell_data = g_object_get_data (G_OBJECT(ea_calitem),
- "ea-calendar-cell-table");
-
- if (!cell_data) {
- gint n_cells = ea_calendar_item_get_n_children (ATK_OBJECT(ea_calitem));
- cell_data = ea_cell_table_create (n_cells/EA_CALENDAR_COLUMN_NUM,
- EA_CALENDAR_COLUMN_NUM,
- FALSE);
- g_object_set_data (G_OBJECT(ea_calitem),
- "ea-calendar-cell-table", cell_data);
- }
- return cell_data;
-}
-
-static void
-ea_calendar_item_destory_cell_data (EaCalendarItem *ea_calitem)
-{
- EaCellTable *cell_data;
-
- g_return_if_fail (ea_calitem);
-
- cell_data = g_object_get_data (G_OBJECT(ea_calitem),
- "ea-calendar-cell-table");
- if (cell_data) {
- ea_cell_table_destroy (cell_data);
- g_object_set_data (G_OBJECT(ea_calitem),
- "ea-calendar-cell-table", NULL);
- }
-}
-
-static gboolean
-ea_calendar_item_get_row_label (EaCalendarItem *ea_calitem, gint row,
- gchar *buffer, gint buffer_size)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- ECalendarItem *calitem;
- gint index, week_num;
- gint year, month, day;
-
- g_return_val_if_fail (ea_calitem, FALSE);
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_calitem);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return FALSE;
-
- calitem = E_CALENDAR_ITEM (g_obj);
-
- index = atk_table_get_index_at (ATK_TABLE (ea_calitem), row, 0);
- if (!e_calendar_item_get_date_for_offset (calitem, index,
- &year, &month, &day))
- return FALSE;
-
- week_num = e_calendar_item_get_week_number (calitem,
- day, month, year);
-
- g_snprintf (buffer, buffer_size, "week number : %d", week_num);
- return TRUE;
-}
-
-static gboolean
-ea_calendar_item_get_column_label (EaCalendarItem *ea_calitem, gint column,
- gchar *buffer, gint buffer_size)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- ECalendarItem *calitem;
- gchar *week_char;
- gint char_size;
-
- g_return_val_if_fail (ea_calitem, FALSE);
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_calitem);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj)
- return FALSE;
-
- calitem = E_CALENDAR_ITEM (g_obj);
- week_char = g_utf8_offset_to_pointer (calitem->days, column);
- char_size = strlen (calitem->days) -
- strlen (g_utf8_find_next_char (calitem->days, NULL));
-
- if (week_char && char_size < buffer_size) {
- memcpy (buffer, week_char, char_size);
- buffer[char_size] = '\0';
- return TRUE;
- }
- return FALSE;
-}
-
-/* the coordinate the e-calendar canvas coord */
-gboolean
-e_calendar_item_get_day_extents (ECalendarItem *calitem,
- gint year, gint month, gint date,
- gint *x, gint *y,
- gint *width, gint *height)
-{
- GnomeCanvasItem *item;
- GtkWidget *widget;
- GtkStyle *style;
- PangoFontDescription *font_desc;
- PangoContext *pango_context;
- PangoFontMetrics *font_metrics;
- gint char_height, xthickness, ythickness, text_y;
- gint new_year, new_month, num_months, months_offset;
- gint month_x, month_y, month_cell_x, month_cell_y;
- gint month_row, month_col;
- gint day_row, day_col;
- gint days_from_week_start;
-
- g_return_val_if_fail (E_IS_CALENDAR_ITEM (calitem), FALSE);
-
- item = GNOME_CANVAS_ITEM (calitem);
- widget = GTK_WIDGET (item->canvas);
- style = widget->style;
-
- /* Set up Pango prerequisites */
- font_desc = calitem->font_desc;
- if (!font_desc)
- font_desc = style->font_desc;
- pango_context = gtk_widget_get_pango_context (widget);
- font_metrics = pango_context_get_metrics (pango_context, font_desc,
- pango_context_get_language (pango_context));
-
- char_height =
- PANGO_PIXELS (pango_font_metrics_get_ascent (font_metrics)) +
- PANGO_PIXELS (pango_font_metrics_get_descent (font_metrics));
-
- xthickness = style->xthickness;
- ythickness = style->ythickness;
-
- new_year = year;
- new_month = month;
- e_calendar_item_normalize_date (calitem, &new_year, &new_month);
- num_months = calitem->rows * calitem->cols;
- months_offset = (new_year - calitem->year) * 12
- + new_month - calitem->month;
-
- if (months_offset > num_months || months_offset < 0)
- return FALSE;
-
- month_row = months_offset / calitem->cols;
- month_col = months_offset % calitem->cols;
-
- month_x = item->x1 + xthickness + calitem->x_offset
- + month_col * calitem->month_width;
- month_y = item->y1 + ythickness + month_row * calitem->month_height;
-
- month_cell_x = month_x + E_CALENDAR_ITEM_XPAD_BEFORE_WEEK_NUMBERS
- + calitem->month_lpad + E_CALENDAR_ITEM_XPAD_BEFORE_CELLS;
- text_y = month_y + ythickness * 2
- + E_CALENDAR_ITEM_YPAD_ABOVE_MONTH_NAME
- + char_height + E_CALENDAR_ITEM_YPAD_BELOW_MONTH_NAME
- + E_CALENDAR_ITEM_YPAD_ABOVE_DAY_LETTERS + calitem->month_tpad;
-
- month_cell_y = text_y + char_height
- + E_CALENDAR_ITEM_YPAD_BELOW_DAY_LETTERS + 1
- + E_CALENDAR_ITEM_YPAD_ABOVE_CELLS;
-
- days_from_week_start =
- e_calendar_item_get_n_days_from_week_start (calitem, new_year,
- new_month);
- day_row = (date + days_from_week_start - 1) / EA_CALENDAR_COLUMN_NUM;
- day_col = (date + days_from_week_start - 1) % EA_CALENDAR_COLUMN_NUM;
-
- *x = month_cell_x + day_col * calitem->cell_width;
- *y = month_cell_y + day_row * calitem->cell_height;
- *width = calitem->cell_width;
- *height = calitem->cell_height;
-
- return TRUE;
-}
-
-/* month is from 0 to 11 */
-gboolean
-e_calendar_item_get_date_for_offset (ECalendarItem *calitem, gint day_offset,
- gint *year, gint *month, gint *day)
-{
- gint start_year, start_month, start_day;
- gint end_year, end_month, end_day;
- GDate *start_date;
-
- g_return_val_if_fail (E_IS_CALENDAR_ITEM (calitem), FALSE);
-
- if (!e_calendar_item_get_date_range (calitem, &start_year,
- &start_month, &start_day,
- &end_year, &end_month,
- &end_day))
- return FALSE;
-
- start_date = g_date_new_dmy (start_day, start_month + 1, start_year);
-
- g_date_add_days (start_date, day_offset);
-
- *year = g_date_get_year (start_date);
- *month = g_date_get_month (start_date) - 1;
- *day = g_date_get_day (start_date);
-
- return TRUE;
-}
-
-/* month is from 0 to 11 */
-gint
-e_calendar_item_get_offset_for_date (ECalendarItem *calitem,
- gint year, gint month, gint day)
-{
- gint start_year, start_month, start_day;
- gint end_year, end_month, end_day;
- GDate *start_date, *end_date;
- gint n_days;
-
- g_return_val_if_fail (E_IS_CALENDAR_ITEM (calitem), -1);
-
- if (!e_calendar_item_get_date_range (calitem, &start_year,
- &start_month, &start_day,
- &end_year, &end_month,
- &end_day))
- return FALSE;
-
- start_date = g_date_new_dmy (start_day, start_month + 1, start_year);
- end_date = g_date_new_dmy (day, month + 1, year);
-
- n_days = g_date_days_between (start_date, end_date);
- g_free (start_date);
- g_free (end_date);
- return n_days;
-}
-
-gint
-e_calendar_item_get_n_days_from_week_start (ECalendarItem *calitem,
- gint year, gint month)
-{
- struct tm tmp_tm;
- gint start_weekday, days_from_week_start;
-
- memset (&tmp_tm, 0, sizeof (tmp_tm));
- tmp_tm.tm_year = year - 1900;
- tmp_tm.tm_mon = month;
- tmp_tm.tm_mday = 1;
- tmp_tm.tm_isdst = -1;
- mktime (&tmp_tm);
- start_weekday = (tmp_tm.tm_wday + 6) % 7; /* 0 to 6 */
- days_from_week_start = (start_weekday + 7 - calitem->week_start_day)
- % 7;
- return days_from_week_start;
-}
diff --git a/a11y/widgets/ea-calendar-item.h b/a11y/widgets/ea-calendar-item.h
deleted file mode 100644
index 04df5f94ac..0000000000
--- a/a11y/widgets/ea-calendar-item.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-calendar-item.h
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-#ifndef __EA_CALENDAR_ITEM_H__
-#define __EA_CALENDAR_ITEM_H__
-
-#include <atk/atkgobjectaccessible.h>
-#include <misc/e-calendar-item.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#define EA_TYPE_CALENDAR_ITEM (ea_calendar_item_get_type ())
-#define EA_CALENDAR_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EA_TYPE_CALENDAR_ITEM, EaCalendarItem))
-#define EA_CALENDAR_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EA_TYPE_CALENDAR_ITEM, EaCalendarItemClass))
-#define EA_IS_CALENDAR_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EA_TYPE_CALENDAR_ITEM))
-#define EA_IS_CALENDAR_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EA_TYPE_CALENDAR_ITEM))
-#define EA_CALENDAR_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EA_TYPE_CALENDAR_ITEM, EaCalendarItemClass))
-
-typedef struct _EaCalendarItem EaCalendarItem;
-typedef struct _EaCalendarItemClass EaCalendarItemClass;
-
-struct _EaCalendarItem
-{
- AtkGObjectAccessible parent;
-};
-
-GType ea_calendar_item_get_type (void);
-
-struct _EaCalendarItemClass
-{
- AtkGObjectAccessibleClass parent_class;
-};
-
-AtkObject *ea_calendar_item_new (GObject *obj);
-gboolean e_calendar_item_get_day_extents (ECalendarItem *calitem,
- gint year, gint month, gint date,
- gint *x, gint *y,
- gint *width, gint *height);
-gboolean e_calendar_item_get_date_for_offset (ECalendarItem *calitem,
- gint day_offset,
- gint *year, gint *month,
- gint *day);
-gint e_calendar_item_get_offset_for_date (ECalendarItem *calitem,
- gint year, gint month, gint day);
-gint e_calendar_item_get_n_days_from_week_start (ECalendarItem *calitem,
- gint year, gint month);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* __EA_CALENDAR_ITEM_H__ */
diff --git a/a11y/widgets/ea-widgets.c b/a11y/widgets/ea-widgets.c
deleted file mode 100644
index edead1b785..0000000000
--- a/a11y/widgets/ea-widgets.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-widgets.c
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-#include "ea-factory.h"
-#include "widgets/ea-calendar-item.h"
-#include "ea-widgets.h"
-
-EA_FACTORY_GOBJECT (EA_TYPE_CALENDAR_ITEM, ea_calendar_item, ea_calendar_item_new)
-
-void e_calendar_item_a11y_init (void)
-{
- EA_SET_FACTORY (e_calendar_item_get_type (), ea_calendar_item);
-}
diff --git a/a11y/widgets/ea-widgets.h b/a11y/widgets/ea-widgets.h
deleted file mode 100644
index e9ec9b3ad9..0000000000
--- a/a11y/widgets/ea-widgets.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-widgets.h
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-/* Evolution Accessibility
-*/
-
-#ifndef _EA_WIDGETS_H__
-#define _EA_WIDGETS_H__
-
-void e_calendar_item_a11y_init (void);
-
-#endif /* _EA_WIDGETS_H__ */
diff --git a/acinclude.m4 b/acinclude.m4
deleted file mode 100644
index 63008b790d..0000000000
--- a/acinclude.m4
+++ /dev/null
@@ -1,182 +0,0 @@
-# evolution/acinclude.m4
-# shared configure.in hacks between Evolution and Connector
-
-# EVO_CHECK_LIB(dispname, pkgname, minvers[, maxvers])
-# Checks if the package with human-readable name @dispname, known
-# to gnome-config as @pkgname exists and has an appropriate version.
-# The version must be >= @minvers. If @maxvers is equal to @minvers,
-# it must be exactly that version. Otherwise, if @maxvers is set,
-# the version must be LESS THAN @maxvers (not less than or equal).
-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 $PACKAGE"
-"If you think you already have this installed, consult the README."])
- fi
-])
-
-
-# EVO_PURIFY_SUPPORT
-# Add --enable-purify. If the user turns it on, subst PURIFY and set
-# the automake conditional ENABLE_PURIFY
-AC_DEFUN(EVO_PURIFY_SUPPORT, [
- 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"
-])
-
-
-# EVO_LDAP_CHECK(default)
-# Add --with-openldap and --with-static-ldap options. --with-openldap
-# defaults to the given value if not specified. If LDAP support is
-# configured, HAVE_LDAP will be defined and the automake conditional
-# ENABLE_LDAP will be set. LDAP_CFLAGS and LDAP_LIBS will be set
-# appropriately.
-AC_DEFUN(EVO_LDAP_CHECK, [
- default="$1"
-
- 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:=$default}")
- case $ac_cv_with_openldap in
- no|"")
- with_openldap=no
- ;;
- yes)
- with_openldap=/usr
- ;;
- *)
- with_openldap=$ac_cv_with_openldap
- LDAP_CFLAGS="-I$ac_cv_with_openldap/include"
- LDAP_LDFLAGS="-L$ac_cv_with_openldap/lib"
- ;;
- esac
-
- if test "$with_openldap" != no; then
- AC_DEFINE(HAVE_LDAP,1,[Define if you have LDAP support])
-
- case $with_static_ldap in
- no|"")
- with_static_ldap=no
- ;;
- *)
- with_static_ldap=yes
- ;;
- esac
-
- 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 "$with_static_ldap" = "yes"; 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 $with_static_ldap = "yes"; 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)
- fi
-
- AC_SUBST(LDAP_CFLAGS)
- AC_SUBST(LDAP_LIBS)
- fi
- AM_CONDITIONAL(ENABLE_LDAP, test $with_openldap != no)
-])
-
-# EVO_PTHREAD_CHECK
-AC_DEFUN([EVO_PTHREAD_CHECK],[
- PTHREAD_LIB=""
- AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
- [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
- [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
- [AC_CHECK_LIB(pthread, __pthread_attr_init_system, PTHREAD_LIB="-lpthread",
- [AC_CHECK_FUNC(pthread_create)]
- )]
- )]
- )]
- )
- AC_SUBST(PTHREAD_LIB)
- AC_PROVIDE([EVO_PTHREAD_CHECK])
-])
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 a68d11b86c..0000000000
--- a/addressbook/ChangeLog
+++ /dev/null
@@ -1,2951 +0,0 @@
-2003-12-06 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names-manager.c
- (open_book_cb): change prototype to fix warning, and change the
- comment to read load_source instead of load_uri (which isn't what
- we use anymore.)
- (update_completion_books): just use our source list for this.
- check the "completion" source property.
- (source_list_changed): recreate the completion books.
- (e_select_names_manager_init): connect to the source_list's
- changed signal.
- (e_select_names_manager_dispose): don't need to free the
- completion_uids list anymore.
-
- * gui/component/select-names/e-select-names-config.c
- (e_select_names_config_get_completion_books,
- e_select_names_config_set_completion_books,
- e_select_names_config_add_notification_completion_books): remove.
-
- * gui/component/select-names/e-select-names-config.h: remove the
- completion books calls, since we can just use the source list.
-
- * gui/component/component-factory.c (factory): create the
- autocompletion control.
-
- * gui/component/autocompletion-config.[ch]: new config control for
- selecting completion folders. Uses e-source-selector. Could
- probably be beautified a bit.
-
- * gui/component/Makefile.am (libevolution_addressbook_la_SOURCES):
- add autocompletion-config.[ch]
-
- * gui/component/GNOME_Evolution_Addressbook.server.in.in: remove
- the ldap config control server, and add the autocompletion one.
-
-2003-12-06 JP Rosevear <jpr@ximian.com>
-
- * */Makefile.am: Remove hard coded disable deprecated flags
-
-2003-12-05 JP Rosevear <jpr@ximian.com>
-
- * gui/component/select-names/select-names.glade: no more custom
- widget for the selection of the search source
-
- * gui/component/select-names/e-select-names.h: add member
-
- * gui/component/select-names/e-select-names.etspec: update model
- column
-
- * gui/component/select-names/e-select-names.c (find_first_source):
- find the first source in the list
- (addressbook_model_set_source): we have the source to set directly
- now
- (source_selected): listen for the source item to change
- (e_select_names_init): create a source option menu and hook it up
- (e_select_names_dispose): destroy the source list
- (e_select_names_new): do away with the config setup here
-
- * gui/component/select-names/e-select-names-manager.h: update
- members
-
- * gui/component/select-names/e-select-names-manager.c
- (update_completion_books): add books based on source uid
- (config_completion_books_changed_cb): handle the completion list
- changing
- (config_min_query_length_changed_cb): handle minimum query length
- changing
- (e_select_names_manager_new): we don't do the settings stuff here
- any more
- (e_select_names_manager_init): do the initial set up here for the
- book loaded and listen for changes
- (e_select_names_manager_dispose): destroy the new stuff
-
- * gui/component/select-names/e-select-names-config.[hc]: config
- information
-
- * gui/component/select-names/e-select-names-config-keys.h: the
- config keys
-
- * gui/component/select-names/e-select-names-bonobo.c
- (impl_SelectNames_activate_dialog): do away with the shell client
- stuff
-
- * gui/component/select-names/Makefile.am: build new files
-
-2003-12-05 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-addressbook-model.c (book_view_loaded): call
- remove_book_view/free_data here as well, to guard against multiple
- book_view's being loaded.
-
-2003-12-05 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/widgets/e-addressbook-view.etspec: Clean up and sync with
- current model columns.
-
-2003-12-03 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook.c
- (retrieve_shell_view_interface_from_control): Remove.
- (set_folder_bar_label): Remove.
- (addressbook_new_control): Don't connect.
-
-2003-12-03 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook-config.c: Do not depend on
- e-folder-list.
-
- * gui/component/select-names/e-select-names.c: Remove dependency
- on evolution-folder-selector-button.
- (e_addressbook_create_folder_selector): Just return a FIXME label
- for now.
- (folder_selected): #if 0 out.
- (e_select_names_init): Do not connect.
-
- * gui/component/select-names/e-select-names-manager.c
- (e_select_names_manager_activate_dialog): Don't get a shell_client
- arg anymore.
- (load_completion_books): Stub out.
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_new): Don't get an EvolutionShellClient anymore.
- Don't create the folder selector button for now.
-
- * gui/component/select-names/e-select-names.h: Remove dependency
- on evolution-shell-client.
-
- * gui/component/select-names/e-select-names-bonobo.c: Remove
- dependency on evolution-shell-client.
- (impl_SelectNames_activate_dialog): Stub out.
-
- * gui/widgets/eab-gui-util.c: Remove dependency on
- evolution-shell-client.
- (eab_transfer_contacts): Stub out.
-
-2003-12-02 Rodney Dawes <dobey@ximian.com>
-
- * gui/component/Makefile.am: Version the schemas
- * gui/component/apps_evolution_addressbook.schemas: Removed
- * gui/component/apps_evolution_addressbook.schemas.in.in: Added
-
-2003-12-02 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook.c (set_status_message): Call
- e_activity_handler_operation_finished() on the current activity ID
- when done.
-
-2003-12-01 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook.c (struct AddressbookView): Replace
- activity_client with activity_id.
- (set_status_message): Use the EActivityHandler from the
- AddressbookComponent.
-
- * gui/component/addressbook-component.c (struct
- _AddressbookComponentPrivate): New member activity_handler.
- (addressbook_component_init): Init.
- (impl_dispose): Unref.
- (addressbook_component_peek_activity_handler): New.
- (impl_createControls): Return an ETaskBar as the statusbar control
- and attach it to the activity handler.
-
-2003-12-01 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook-component.c (impl_createControls):
- Pass a label for the status bar control for now.
-
-2003-12-01 Larry Ewing <lewing@ximian.com>
-
- * gui/component/Makefile.am (INCLUDES): remove
- GTK_DISABLED_DEPRECATED so that we can build with gtk-2.3.
-
-2003-12-01 Rodney Dawes <dobey@ximian.com>
-
- * gui/component/GNOME_Evolution_Addressbook.server.in.in:
- * gui/component/addressbook-config.c:
- * gui/component/addressbook.c:
- * gui/component/component-factory.c:
- * gui/component/select-names/GNOME_Evolution_Addressbook_SelectNames.server.in.in:
- * gui/component/select-names/e-select-names-bonobo.c:
- * gui/component/select-names/e-select-names-factory.c:
- * gui/widgets/eab-gui-util.c:
- * gui/widgets/eab-vcard-control.c: Use BASE_VERSION for repo_ids and
- OAFIIDs
-
-2003-12-01 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/component/ldap-config.glade: Fix start page text.
-
-2003-12-01 JP Rosevear <jpr@ximian.com>
-
- * conduit/Makefile.am: use privconduitdir
-
- * conduit/e-address.conduit.in: subst right thing
-
-2003-12-01 JP Rosevear <jpr@ximian.com>
-
- * conduit/e-address.conduit.in: specify privlibdir as the location
-
- * conduit/Makefile.am: install the conduit to privlibdir
-
-2003-12-01 JP Rosvear <jpr@ximian.com>
-
- * conduit/Makefile.am: version the .conduit file
-
-2003-12-01 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/component/new-addressbook.glade: Remove this too.
-
- * gui/component/Makefile.am (glade_DATA): Remove new-addressbook.glade.
-
-2003-12-01 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/component/Makefile.am (libevolution_addressbook_la_SOURCES):
- Remove addressbook-storage.[ch] and new-addressbook.[ch].
-
- * gui/component/addressbook-storage.[ch]: Removed from repository.
-
- * gui/component/new-addressbook.[ch]: Removed from repository.
-
- * gui/component/addressbook-component.c (load_uri_for_selection):
- Set source_uid property on view control, not folder_uri.
- (new_addressbook_cb): Call addressbook_config_create_new_source ().
- (edit_addressbook_cb): Implement.
- (fill_popup_menu_callback): Hook up edit_addressbook_cb ().
- (addressbook_component_init): Create the LDAP source group.
-
- * gui/component/addressbook-config.c (AddressbookSourceDialog):
- Take out the NEW_ADVANCED_UI stuff and add ESource related vars.
- (ldap_unparse_auth)
- (ldap_parse_auth)
- (ldap_unparse_scope)
- (ldap_unparse_ssl)
- (ldap_parse_ssl): Moved here from addressbook-storage.c.
- (addressbook_dialog_get_source)
- (addressbook_dialog_set_source)
- (objectclasses_create_server_table)
- (objectclasses_create_evolution_table)
- (objectclasses_add_foreach)
- (objectclasses_add)
- (objectclasses_sever_double_click)
- (objectclasses_remove_foreach)
- (objectclasses_remove)
- (objectclasses_evolution_double_click)
- (objectclasses_restore_default)
- (server_selection_model_changed)
- (evolution_selection_model_changed)
- (setup_objectclasses_tab): Nuke aging, unfinished NEW_ADVANCED_UI.
- (add_source_clicked)
- (edit_source_clicked)
- (delete_server)
- (delete_source_clicked)
- (ldap_config_control_destroy_callback)
- (ldap_config_control_apply_callback)
- (sources_selection_changed)
- (sources_table_row_activated)
- (ldap_dialog_new)
- (addressbook_dialog_create_sources_table)
- (ldap_config_control_new)
- (addressbook_config_control_new): Nuke config control.
- (create_source_dir)
- (dialog_to_source)
- (dialog_to_temp_source)
- (source_to_uri_parts)
- (source_to_dialog)
- (source_group_changed_cb)
- (source_group_menu_add_groups)
- (folder_page_forward)
- (finish_page_back): Implement.
- (addressbook_ldap_init): Take ESource instead of AddressbookSource.
- (addressbook_ldap_auth): Don't take a source, not needed.
- (addressbook_root_dse_query): Ditto.
- (addressbook_source_dialog_destroy): Clean up destroy function.
- (addressbook_add_server_druid_finish): Clean up, create ESource.
- (general_tab_check): If it's not LDAP, these options don't matter.
- (do_ldap_root_dse_query): Source no longer needed here.
- (query_for_supported_bases): Use a temp source generated from
- current dialog settings.
- (display_name_page_prepare): Renamed to folder_page_prepare ().
- (druid_display_name_page_modify_cb): Renamed to
- druid_folder_page_modify_cb ().
- (addressbook_add_server_druid): Set up source list, group selector.
- Make LDAP pages optional, dependent on selected group. Use ESource.
- (edit_dialog_store_change): Remove config control list stuff,
- export settings to ESource.
- (addressbook_edit_server_dialog): Renamed to
- addressbook_config_edit_source (), which takes an ESource. Remove
- config control list stuff, make LDAP pages show up only if we have
- an LDAP source. Remove NEW_ADVANCED_UI cruft.
- (addressbook_config_create_new_source): Just call
- addressbook_add_server_druid ().
-
- * gui/component/addressbook-config.h: Move LDAP enums here, from
- addressbook-storage.h.
-
- * gui/component/addressbook.c (control_activate_cb): uri -> source
- (addressbook_view_clear): Unref source list.
- (book_open_cb): Use ESource.
- (load_uri_auth_cb): Renamed to load_source_auth_cb (), manipulate
- ESource instead of URI.
- (get_remember_password): Implement.
- (set_remember_password): Implement.
- (addressbook_authenticate): Use ESource properties.
- (load_uri_cb): Renamed to load_source_cb (), ESource adaptation.
- (addressbook_load_uri): Renamed to addressbook_load_source (), takes
- ESource.
- (addressbook_load_default_book): ESource adaptation.
- (get_prop): folder_uri property -> source_uid property.
- (set_prop): folder_uri property -> source_uid property. Find ESource
- by UID.
- (addressbook_new_control): Set up source_uid property and ESourceList.
-
- * gui/component/component-factory.c (factory): Disable config control.
-
- * gui/component/ldap-config.glade: Druid and notebook dialogs
- generalized to deal with local sources as well as LDAP. This file
- should probably be renamed...
-
- * gui/component/select-names/e-select-names-manager.c
- (load_completion_books): Use addressbook_load_source (). However, this
- needs a bit more work to get source UIDs instead of URIs.
-
- * gui/component/select-names/e-select-names.c
- (addressbook_model_set_uri): Use addressbook_load_source (). However,
- this needs a bit more work to get source UIDs instead of URIs.
-
-2003-11-26 JP Rosevear <jpr@ximian.com>
-
- * gui/widgets/Makefile.am: turn on deprecated gtk and libgnomeui
- stuff
-
- * gui/component/select-names/Makefile.am: turn on deprecated gtk
- stuff
-
- * gui/contact-editor/Makefile.am: ditto
-
-2003-11-17 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/component/addressbook-component.c (impl_createControls): Store
- a ref to the source selector.
- (impl_requestCreateItem): Implement.
- (impl_dispose): Unref the source selector.
- (addressbook_component_init): Set up default sources.
-
- * gui/widgets/e-addressbook-model.c (eab_model_set_property): If
- the 'book' property is set, and editability changes, emit a signal
- to that effect.
-
-2003-11-14 JP Rosevear <jpr@ximian.com>
-
- * gui/component/new-addressbook.c: include e-source from e-d-s
-
-2003-11-13 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/contact-list-editor/e-contact-list-model.c
- (contact_list_is_cell_editable): Return TRUE for all cells, for now.
-
- * gui/widgets/e-addressbook-table-adapter.c (card_modified_cb):
- Renamed to contact_modified_cb ().
- (addressbook_set_value_at): Port to use EContact instead of ECard.
- (addressbook_is_cell_editable): Ditto.
- (addressbook_append_row): Ditto.
-
- * gui/widgets/e-minicard-label.c (e_minicard_label_set_property):
- Make not editable, ever, and add a comment to this effect.
- (e_minicard_label_realize): Ditto.
-
- * gui/widgets/e-minicard.c (e_minicard_set_property): Ditto.
- (add_field): Ditto.
-
-2003-11-13 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook-component.c
- (impl__get_userCreatableItems): New, implementation for the
- userCreatableItems property.
- (impl_requestCreateItem): New, implementation for the
- requestCreateItem method.
- (addressbook_component_class_init): Install.
-
-2003-11-12 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/GNOME_Evolution_Addressbook.server.in.in: Add
- component_alias of "contacts".
-
-2003-11-08 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/component/Makefile.am (libevolution_addressbook_la_SOURCES):
- Add new-addressbook.[ch].
- (glade_DATA): Add new-addressbook.glade.
-
- * gui/component/addressbook-component.c (add_popup_menu_item):
- Implement.
- (new_addressbook_cb): Implement.
- (delete_addressbook_cb): Implement (skeletal).
- (fill_popup_menu_callback): Implement.
- (impl_createControls): Hook up fill_popup_menu_callback().
-
- * gui/component/new-addressbook.[ch]: New files.
-
- * gui/component/new-addressbook.glade: New file.
-
-2003-11-07 Dan Winship <danw@ximian.com>
-
- * util/Makefile.am (INCLUDES): Remove some includes of directories
- that don't exist any more
-
-2003-11-07 JP Rosevear <jpr@ximian.com>
-
- * gui/contact-editor/Makefile.am: don't include the c marshaller
- file twice
-
- * gui/widgets/Makefile.am: ditto
-
-2003-11-07 JP Rosevear <jpr@ximian.com>
-
- * gui/widgets/Makefile.am: make sure the marshal header is in the
- source list
-
- * gui/component/select-names/Makefile.am: ditto
-
- * gui/contact-editor/Makefile.am: ditto
-
- * gui/contact-list-editor/Makefile.am: ditto
-
-2003-11-07 JP Rosevear <jpr@ximian.com>
-
- * util/Makefile.am: dist the marshal list
-
-2003-11-07 JP Rosevear <jpr@ximian.com>
-
- * gui/widgets/e-addressbook-view.c (change_view_type): don't
- destroy the widget here - its dead when removed from the paned
- container
-
-2003-11-07 JP Rosevear <jpr@ximian.com>
-
- * In the gui this is a search and replace commit for moving the
- addressbook to evolution-data-server; it also deletes the old
- backend files
-
-2003-11-05 Larry Ewing <lewing@ximian.com>
-
- * gui/widgets/e-addressbook-view.c (create_minicard_view): fix cast.
-
-2003-11-03 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/select-names/e-select-names-factory.c: Update
- factory ID.
-
- * gui/component/select-names/GNOME_Evolution_Addressbook_SelectNames.server.in.in:
- Version the SelectNames server IDs by appending a "_2".
-
-2003-11-03 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/GNOME_Evolution_Addressbook.server.in.in: Change
- "evolution:config_item" into "evolution2:config_item".
-
-2003-10-29 Chris Toshok <toshok@ximian.com>
-
- * gui/component/GNOME_Evolution_Addressbook.server.in.in: add the
- S/MIME config control here.
-
-2003-10-29 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-book-listener.c (e_book_listener_new): change
- the poa hint to PER_REQUEST. fixes a couple of deadlocks.
-
-2003-10-29 Chris Toshok <toshok@ximian.com>
-
- * gui/component/component-factory.c (factory): ifdef the smime
- code with HAVE_NSS.
-
- * gui/component/Makefile.am (libevolution_addressbook_la_LIBADD):
- conditionally include libevolution-smime.la.
-
-2003-10-24 Dan Winship <danw@ximian.com>
-
- * backend/pas/Makefile.am (libpas_la_LIBADD): libpas should depend
- on libebook, but NOT on libpasfile, etc, since it needs to be
- linked into all backends, not just the wombat.
- (libpasfile_la_LIBADD): depend on libpas.la and libedb3util.la
- (libpasvcf_la_LIBADD): depend on libpas.la
- (libpasldap_la_LIBADD): depend on libpas.la and $(LDAP_LIBS)
-
-2003-10-23 Dan Winship <danw@ximian.com>
-
- * backend/ebook/e-contact.c (e_contact_date_equal): new util func
-
- * backend/pas/pas-backend-ldap.c (anniversary_compare,
- birthday_compare): Use it
-
- * backend/pas/pas-backend-summary.c
- (pas_backend_summary_check_contact): Check if an ID exists in the
- summary.
-
-2003-10-23 Chris Toshok <toshok@ximian.com>
-
- * tools/Makefile.am: convert 8 spaces to a tab.
-
- * tools/.cvsignore: ignore evolution-addressbook-abuse and
- evolution-addressbook-clean.
-
- * gui/component/Makefile.am (libevolution_addressbook_la_LIBADD):
- add libevolution-smime.la.
-
- * gui/component/component-factory.c (factory): add the certificate
- manager config control stuff here, at least for now.
-
- * gui/component/GNOME_Evolution_Addressbook.server.in.in: same.
-
-2003-10-23 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/component/addressbook-config.c
- (addressbook_dialog_create_source_table): fixed typo in variable name.
-
-2003-10-22 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/GNOME_Evolution_Addressbook.server.in.in: Add an
- "evolution:button_icon" attribute.
-
-2003-10-22 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/GNOME_Evolution_Addressbook.server.in.in: Add an
- "evolution:button_sort_order" property.
-
-2003-10-22 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook-component.c (impl_createControls):
- Make the the scrolled window have an "in" shadow.
- * gui/component/addressbook-config.c
- (addressbook_dialog_create_sources_table): Likewise.
- * gui/widgets/e-addressbook-view.c (create_minicard_view): Likewise.
- (create_treeview_view): Likewise.
-
-2003-10-22 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook-component.c (impl_createControls): Set
- the GtkScrolledWindow scrollbar policy to "automatic" for both the
- horizontal and the vertical scrollbar.
-
-2003-10-22 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/GNOME_Evolution_Addressbook.server.in.in: Add an
- "evolution:button_label" property on the component for use in the
- shell.
-
-2003-10-21 JP Rosevear <jpr@ximian.com>
-
- * conduit/address-conduit.c: make it work with the new ebook api
-
- * backend/pas/pas-book.c (pas_book_respond_get_changes): put the
- vcard in for every change
-
- * backend/pas/pas-backend.c (pas_backend_change_add_new): just use
- the vcard field
- (pas_backend_change_modify_new): ditto
- (pas_backend_change_delete_new): ditto
-
- * backend/pas/pas-backend-file.c
- (pas_backend_file_changes_foreach_key): create a fake contact with
- the uid
- (pas_backend_file_get_changes): add the card to the changes
-
- * backend/ebook/tests/ebook/test-changes.c (main): just print the
- uid
-
- * backend/ebook/e-book.c (e_book_free_change_list): unref the
- contact
-
- * backend/ebook/e-book-types.h: the change struct contains an
- EContact now
-
- * backend/ebook/e-book-listener.c
- (impl_BookListener_respond_get_changes): create the contact from
- the vcard string
-
- * backend/idl/addressbook.idl: Book change item is no longer a
- union, it always gives back a card
-
-2003-10-21 Chris Toshok <toshok@ximian.com>
-
- * tools/evolution-addressbook-abuse.c: use the synchronous api for
- this. simplifies it a bunch.
-
-2003-10-21 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-book.c
- (impl_GNOME_Evolution_Addressbook_Book_remove): we can ill afford
- bad debug spew.
- (view_listener_died_cb): implement.
- (impl_GNOME_Evolution_Addressbook_Book_getBookView): hook up an
- ORBit_small connection listener on the view's listener.
- (pas_book_respond_create): use e_contact_get_const instead of
- e_contact_get here. fixes a leak.
-
- * backend/pas/pas-book-view.c
- (impl_GNOME_Evolution_Addressbook_BookView_stop): implement, call
- pas_backend_stop_book_view.
- (pas_book_view_get_listener): return the book view's listener.
- (pas_book_view_class_init): fill in epv->stop.
- (pas_book_view_init): use a #define for THRESHOLD_MAX instead of
- the constant.
-
- * backend/pas/pas-book-view.h: add prototype for
- pas_book_view_get_listener.
-
- * backend/pas/pas-backend.c (pas_backend_stop_book_view):
- implement.
- (pas_backend_remove_book_view): implement.
-
- * backend/pas/pas-backend.h: add prototype for stop_book_view and
- remove_book_view.
-
- * backend/pas/pas-backend-vcf.c (load_file): pass in the fd and
- use fdopen here.
- (foreach_build_list): don't creat EContacts here, because we'll
- just be converting them back to vcards anyway.
- (save_file): use char*'s instead of EContacts, and split entries
- with 2 blank lines. Also, hold the lock over the entire function.
- (do_create): hold the lock around uid generation and touching the
- hash table.
- (pas_backend_vcf_process_remove_contacts): same.
- (pas_backend_vcf_process_modify_contact): same.
- (pas_backend_vcf_stop_book_view): new function, but leave
- unimplemented for now.
- (pas_backend_vcf_load_uri): the uri contains the directory name,
- not the filename.
- (pas_backend_vcf_dispose): grab the lock here just for sanity's
- sake. Also reorder things a bit, and free the hashtable and
- mutex.
- (pas_backend_vcf_init): init the mutex.
-
- * backend/pas/pas-backend-summary.c
- (pas_backend_summary_add_contact): don't unref the contact here.
-
- * backend/pas/pas-backend-ldap.c
- (pas_backend_ldap_process_stop_book_view): new function, but leave
- unimplemented for now.
-
- * backend/pas/pas-backend-file.c (build_summary): use an EContact
- for this call.
- (do_summary_query): nuke, the contents of this has been moved to
- start_book_view.
- (pas_backend_file_search_timeout): same.
- (pas_backend_file_search): same.
- (pas_backend_file_start_book_view): glom everything into here
- involving searching. This function could (and should) be renamed
- and reused from both this function and _get_contact_list.
- (pas_backend_file_stop_book_view): new function.
- (pas_backend_file_class_init): fill in backend->stop_book_view.
-
- * backend/pas/Makefile.am (LDAP_BACKEND): libpasldap.a ->
- libpasldap.la
- (noinst_LTLIBRARIES): *.a -> *.la.
- (libpas_la_SOURCES): same.
- (libpasfile_la_SOURCES): same.
- (libpasvcf_la_SOURCES): same.
- (libpasldap_la_SOURCES): same.
-
- * backend/idl/addressbook.idl: add BookView::stop.
-
- * backend/ebook/e-vcard.c (read_attribute_value): fix GString
- related leaks.
- (read_attribute_params): same.
- (parse): don't leak the EVCardAttributes corresponding to
- BEGIN/END:vCard.
- (free_gstring): new function
- (e_vcard_attribute_remove_values): free the decoded_values list,
- using free_gstring.
-
- * backend/ebook/e-book.c (e_book_response_get_book_view): ref the
- listener here.
-
- * backend/ebook/e-book-view.h: add prototype for e_book_view_stop.
-
- * backend/ebook/e-book-view.c (e_book_view_stop): new function.
-
- * backend/ebook/e-book-async.c (_get_book_view_response_dtor):
- unref the book view.
-
-2003-10-20 Dan Winship <danw@ximian.com>
-
- * backend/pas/pas-book-view.c: Queue up removes and modifies as
- well as adds, and remove the calls that took a list of changes
- rather than a single change, since no one was really using the
- list versions. Keep a list of IDs currently in the view so we can
- more easily figure out what changes count as adds, modifies, and
- removes.
- (send_pending_adds): Don't reset next_threshold if it's being
- called from notify_add.
- (send_pending_changes, send_pending_removes): New
- (pas_book_view_notify_update): Simplified add/change interface.
- Takes an EContact and figures out if it's new, modified, or
- removed relative to this view.
- (pas_book_view_notify_change, pas_book_view_notify_change_1,
- pas_book_view_notify_add, pas_book_view_notify_add_1): Gone.
- (pas_book_view_notify_remove): Now does what remove_1 used to do.
- (pas_book_view_vcard_matches): Remove this; no longer used.
-
- * backend/pas/pas-backend.c (pas_backend_notify_update): New.
- Calls pas_book_view_notify_update() on each of the backend's views.
- (pas_backend_notify_remove): Likewise for notify_remove().
- (pas_backend_notify_complete): And notify_complete().
-
- * backend/pas/pas-book.c (pas_book_respond_create): Take an
- EContact instead of an id and a vcard. Use
- pas_backend_notify_update.
- (pas_book_respond_remove_contacts): Use pas_backend_notify_remove.
- (pas_book_respond_modify): Take a single EContact instead of two
- vcards. Use pas_backend_notify_update.
-
- * backend/pas/pas-backend-sync.c
- (pas_backend_sync_create_contact): Return an EContact rather than
- an id.
- (pas_backend_sync_modify_contact): Return an EContact rather than
- the old_vcard.
- (_pas_backend_create_contact, _pas_backend_modify_contact): Update
-
- * backend/pas/pas-backend-file.c (do_summary_query): Use
- pas_book_view_notify_update.
- (pas_backend_file_search_timeout): Likewise
- (pas_backend_file_create_contact): Update for API changes
- (pas_backend_file_modify_contact): Likewise.
-
- * backend/pas/pas-backend-ldap.c (create_contact_handler,
- pas_backend_ldap_process_create_contact): Update for API changes
- (modify_contact_modify_handler, modify_contact_search_handler,
- pas_backend_ldap_process_modify_contact): Likewise
- (ldap_search_handler): Use pas_book_view_notify_update
-
- * backend/pas/pas-backend-vcf.c (foreach_search_compare): Use
- pas_book_view_notify_update.
- (pas_backend_vcf_process_create_contact): Update for API changes
- (pas_backend_vcf_process_modify_contact): Likewise
-
- * backend/pas/pas-backend-summary.c
- (pas_backend_summary_add_contact): Take an EContact instead of a
- const char *vcard.
-
- * backend/ebook/e-contact.c (photo_getter): s/malloc/g_malloc/
-
-2003-10-20 JP Rosevear <jpr@ximian.com>
-
- * backend/pas/pas-backend-vcf.c (pas_backend_vcf_search): compiler
- with non-c99 compilers
-
-2003-10-17 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-contact.c (fn_getter): new function, just return
- the full name value.
- (fn_setter): rather distasteful hack. set the N attribute if it's
- not already present.
- (n_setter): set the X-EVOLUTION-FILE-AS attribute if it's not
- already set.
-
- * backend/pas/pas-backend-ldap.c (prop_info): add PROP_WRITE_ONLY
- flag for properties (right now just 'sn') that we don't want to
- use when building the EContact - we only use it when storing the
- contact out to the ldap server.
- (build_contact_from_entry): skip WRITE_ONLY properties.
-
-2003-10-17 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-addressbook-view.c (init_collection): add the
- minicard factory back in.
- (display_view): add the minicard case back in.
- (get_selection_model): same.
- (minicard_right_click): resurrect.
- (create_minicard_view): same.
- (change_view_type): add the minicard case back in.
- (eab_view_print): same.
- (eab_view_print_preview): same.
-
- * gui/widgets/e-addressbook-view.h (EABViewType): add MINICARD
- back in.
-
- * gui/widgets/e-addressbook-model.c (eab_model_new):
- E_TYPE_AB_MODEL -> EAB_TYPE_MODEL.
-
- * gui/widgets/e-addressbook-model.h: rename E_TYPE_AB_MODEL to
- EAB_TYPE_MODEL.
-
- * gui/widgets/Makefile.am (libeabwidgets_la_SOURCES): add the
- minicard stuff back into the build.
-
- * gui/widgets/e-addressbook-reflow-adapter.[ch],
- gui/widgets/e-minicard-label.[ch],
- gui/widgets/e-minicard-view-widget.[ch],
- gui/widgets/e-minicard-view.[ch], gui/widgets/e-minicard.[ch],
- gui/widgets/gal-view-factory-minicard.[ch], gal-view-minicard.h:
- resurrect the minicard stuff, in a new uneditable,
- EContact-friendly state. no in-place editing anymore.
-
-
-2003-10-10 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-editor/e-contact-editor.c (fill_in_info): un-ifdef
- the date handling code.
- (extract_info): same.
-
- * backend/pas/pas-backend-ldap.c (prop_info): add the address
- labels and dates to the build.
- (anniversary_populate): un-ifdef and get this working.
- (anniversary_ber): same.
- (anniversary_compare): same.
- (birthday_populate): same.
- (birthday_ber): same.
- (birthday_compare): same.
-
- * backend/ebook/tests/ebook/.cvsignore,
- backend/ebook/tests/ebook/Makefile.am
- backend/ebook/tests/ebook/test-date.c: add a test for EContactDate
- getting/setting.
-
- * backend/ebook/e-vcard.h: add EVC_BDAY.
-
- * backend/ebook/e-contact.h: add prototypes for the
- e_contact_date_* functions.
-
- * backend/ebook/e-contact.c (field_info): add
- BIRTH_DATE/ANNIVERSARY fields.
- (date_getter): new
- (date_setter): new
- (e_contact_date_new): new
- (e_contact_date_from_string): new
- (e_contact_date_to_string): new
- (e_contact_date_free): new
-
-2003-10-10 Not Zed <NotZed@Ximian.com>
-
- *
- gui/component/select-names/GNOME_Evolution_Addressbook_SelectNames.server.in.in:
- Use the main factory on the .so file, so it can be found.
-
-2003-10-08 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names.c (contact_key): add a
- descriptive comment about this "#if notyet".
-
- * gui/component/select-names/e-select-names-model.h
- (e_select_names_model_thaw): add prorotype for
- e_select_names_model_cancel_all_contact_load.
-
- * gui/component/select-names/e-select-names-bonobo.c
- (_EntryPropertyID): remove the SIMPLE_CARD_LIST property.
- (entry_get_property_fn): same.
- (impl_SelectNames_get_entry_for_section): same.
-
- * backend/ebook/e-contact.h: add prototype for
- e_contact_name_to_string.
-
-2003-10-07 Chris Toshok <toshok@ximian.com>
-
- * util/eab-book-util.c: remove a bunch of ifdef'ed code (that's
- going to be living in e-book.c)
-
- * backend/pas/pas-backend-summary.c
- (pas_backend_summary_add_contact): un-ifdef some code.
- (pas_backend_summary_get_summary_vcard): same.
-
- * backend/pas/pas-backend-ldap.c (prop_info): remove the
- query_prop field since we can get it from e_contact_field_name.
- also remove it from all the macros and their uses.
- (homephone_populate): un-ifdef.
- (homephone_ber): same.
- (homephone_compare): same.
- (business_populate): same.
- (business_ber): same.
- (business_compare): same.
- (query_prop_to_ldap): use e_contact_field_name to get the query
- prop for a given attribute.
- (add_oc_attributes_to_supported_fields): same.
-
- * backend/pas/pas-backend-card-sexp.c (compare_phone): use the new
- EContactField constants to iterate over the phone list.
-
- * backend/ebook/e-contact.h (EContactField): add some useful
- constants for those pieces of code that iterate over
- email/phones/addresses.
-
-2003-10-07 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/eab-vcard-control.c (book_open_cb): un-ifdef this.
- (eab_vcard_control_new): put the buttons above the vcard so they
- don't move when it's expanded.
-
- * gui/widgets/eab-popup-control.h: remove prototypes for
- eab_popup_control_set_name and eab_popup_control_set_email.
-
- * gui/widgets/eab-popup-control.c (email_table_ok_cb): remove the
- stupid idle function and do the work here.
- (eab_popup_control_set_name): make this static - noone uses it.
- (eab_popup_control_set_email): same.
-
- * gui/widgets/eab-gui-util.c (eab_show_contact_editor):
- e_contact_editor_new is what we use for the time being.
-
- * gui/widgets/eab-contact-display.c (render_string): abstract this
- code out.
- (render_url): same.
- (eab_contact_display_render_normal): make use of render_string and
- render_url.
-
- * gui/widgets/e-addressbook-view.c (delete): un-ifdef this and get
- it working.
- (selection_received): same.
-
- * gui/widgets/e-addressbook-model.c (get_view): nuke some code
- that was moved to another function.
- (eab_model_set_property): get the writable state when we set the
- book - don't rely on the timing of signals.
-
- * gui/contact/editor/contact-editor.glade: add the blog field
- below the homepage url field.
-
- * gui/contact/editor/e-contact-editor-address.[ch]: get this
- building with the new stuff.
-
- * gui/contact/editor/e-contact-editor-fullname.[ch]: get this
- building with the new stuff.
-
- * gui/contact-editor/e-contact-editor.[ch]: get this most of the
- way there.
-
- * gui/contact-editor/e-contact-quick-add.[ch]: get this building
- with the new stuff.
-
- * gui/contact-editor/Makefile.am (libecontacteditor_la_SOURCES):
- remove e-contact-save-as.[ch]. They're in
- addressbook/widgets/eab-gui-util.[ch] now.
-
- * gui/merging/Makefile.am: track all the naming changes.
-
- * gui/merging/*.glade: gratuitous renaming.
-
- * gui/merging/eab-contact-compare.[ch]: gratuitous renaming, and
- move this from the old ebook/
-
- * gui/merging/eab-contact-merging.[ch]: gratuitous renaming.
-
- * backend/ebook/e-contact.[ch]: lots of overly complicated changes
- for an overly complicated piece of code.
-
- * backend/ebook/e-book-view.c (e_book_view_do_added_event): remove
- some ifdef'ed code.
- (e_book_view_do_modified_event): same.
-
- * backend/ebook/e-vcard.c (parse): plug a memory leak.
- (escape_string): deal with @s being NULL.
- (e_vcard_remove_attribute): new function.
- (e_vcard_attribute_remove_params): same.
- (e_vcard_attribute_param_free): same.
- (e_vcard_attribute_param_remove_values): same.
-
- * backend/ebook/e-vcard.h: add prototypes for
- e_vcard_remove_attribute, e_vcard_attribute_remove_params, and
- e_vcard_attribute_param_remove_values.
-
- * backend/ebook/e-book.c (e_book_handle_response): cache the
- writable state of the ebook before generating the signal.
- (e_book_unload_uri): initialize cap to NULL and writable to FALSE.
-
- * backend/ebook/e-book.h: add prototype for e_book_is_writable.
-
- * backend/ebook/e-book-async.c (_get_fields_response_handler):
- don't call the callback if it's NULL.
- (_get_methods_response_handler): same.
- (_auth_user_response_handler): same.
- (_get_contact_response_handler): same.
- (_remove_contacts_response_handler): same.
- (_add_contact_response_handler): same.
- (_commit_contact_response_handler): same.
- (_get_book_view_response_handler): same.
- (_get_contacts_response_handler): same.
- (_remove_contacts_dtor): free the list.
- (e_book_async_remove_contacts): duplicate the list.
-
- * backend/pas/pas-backend.c (pas_backend_open): if we successfully
- load the uri, report the writable status back.
-
- * backend/pas/pas-backend-sync.c (_pas_backend_remove_contacts):
- free the list of ids.
-
- * backend/pas/pas-backend-file.c (do_create): return the contact
- we create here.
- (pas_backend_file_create_contact): format the newly created
- contact as a string to add to the summary.
- (pas_backend_file_remove_contacts): don't free the list of removed
- cards here - it happens in pas-backend-sync.
- (pas_backend_file_load_uri): pass NULL for @contact to do_create.
-
-2003-10-01 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/eab-contact-display.c (render_address): move the :'s
- inside the <b>'s. Thanks for pointing this out, guenther. :)
- (eab_contact_display_render_normal): same.
- (eab_contact_display_render_compact): same.
-
- * gui/widgets/eab-vcard-control.c (save_in_addressbook): track
- change to address_load_default_book.
-
-2003-10-01 Chris Toshok <toshok@ximian.com>
-
- * gui/component/Makefile.am: remove some commented out crap about
- e-address-popup.[ch].
-
- * gui/component/component-factory.c (factory): use
- eab_popup_control_new for the AddressPopup iid.
-
- * gui/widgets/Makefile.am (libeabwidgets_la_SOURCES): add
- eab-popup-control.[ch].
-
- * backend/ebook/e-book.c (e_book_get_default_addressbook): hack
- this so it at least sorta works - hardcode the
- ~/evolution/local/Contacts uri for now.
-
- * gui/component/addressbook.[ch] (addressbook_load_default_book):
- remove the EBook argument, and call
- e_book_async_get_default_addressbook.
-
- * gui/component/e-address-popup.[ch]: nuke.
-
- * gui/widgets/eab-popup-control.c: rename
- gui/component/e-address-popup.c to this.
-
- * gui/widgets/eab-popup-control.h: rename
- gui/component/e-address-popup.h to this.
-
- * backend/ebook/e-book-async.h: add prototype for
- e_book_async_get_default_addressbook.
-
- * backend/ebook/e-book-async.c
- (e_book_async_get_default_addressbook): new function.
-
-2003-10-01 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-addressbook-view.c (eab_view_new): create the
- scrolled window to embed the EABContactDisplay widget inside of.
-
- * gui/widgets/e-addressbook-view.h (struct _EABView): add scrolled;
-
- * gui/widgets/eab-contact-display.h: add
- EABContactDisplayRenderMode enum, and add @render_mode arg to
- eab_contact_display_render.
-
- * gui/widgets/eab-contact-display.c
- (eab_contact_display_render_compact): new function, render a
- compact format suitable for inclusion in the mail display.
- (eab_contact_display_render_normal): move the previouw contents of
- eab_contact_display_render here.
- (eab_contact_display_render): render in either compact or normal
- mode depending on @mode.
- (eab_contact_display_new): remove the scrolled window stuff from
- here, as in the compact mode we don't want it present. push it up
- into the e-addressbook-view.c code.
-
- * gui/widgets/eab-vcard-control.[ch]: bonobo control that wraps up
- the EABContactDisplay stuff and lets us display vcards in a pretty
- format in mail messages.
-
- * gui/component/component-factory.c (factory): replace the #if
- notyet'ed minicard control code with the new vcard control.
-
- * gui/component/Makefile.am (INCLUDES): remove gui/minicard.
-
- * gui/component/GNOME_Evolution_Addressbook.server.in.in: remove
- the MiniCard_Control iid, and replace it with VCard_Control.
-
-2003-10-01 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook-component.c
- (destination_folder_handle_drop): use
- eab_contact_list_from_string, and un-"#if notyet" this.
-
- * gui/component/addressbook.c: remove #include
- "e-contact-save-as.h"
-
- * gui/contact-list-editor/e-contact-list-editor.c
- (file_save_as_cb): use eab_contact_save.
- (file_send_as_cb): use eab_send_contact, un-"#if notyet" this.
- (file_send_to_cb): same.
- (table_drag_data_received_cb): use eab_contact_list_from_string.
-
- * gui/widgets/e-addressbook-reflow-adapter.[ch]: nuke. last
- vestiges of the minicard view.
-
- * gui/widgets/e-addressbook-view.c (eab_view_init):
- s/clipboard_cards/cliboard_contacts.
- (eab_view_dispose): same.
- (get_contact_list_1): s/card/contact
- (get_contact_list): same.
- (save_as): same, and use eab_contact_list_save.
- (send_as): reenable this code, s/card/contact, and use
- eab_send_contact_list.
- (send_to): same.
- (print): s/card/contact.
- (delete): same.
- (new_card): same, and un-"#if notyet" some code.
- (selection_get): use eab_contact_list_to_string.
- (selection_clear_event): s/card/contact
- (selection_received): same.
- (get_selected_contacts): same.
- (eab_view_save_as): same, and use eab_contact_list_save.
- (eab_view_view): same, and use eab_show_multiple_contacts.
- (eab_view_send): reenable this code, s/card/contact, and use
- eab_send_contact_list.
- (eab_view_send_to): same.
- (eab_view_copy): s/card/contact.
- (view_transfer_contacts): same.
- (eab_view_copy_to_folder): same.
- (eab_view_move_to_folder): same.
-
- * gui/widgets/e-addressbook-view.h (struct _EABView): rename
- clipboard_cards to clipboard_contacts.
-
- * gui/widgets/eab-gui-util.c (view_contacts): un-"#if notyet"
- (file_exists): moved from e-contact-save-as.c
- (save_it): same.
- (close_it): same.
- (destroy_it): same.
- (make_safe_filename): same.
- (eab_contact_save): same, and renamed from e_contact_save_as.
- (eab_contact_list_save): same, and renamed from
- e_contact_list_save_as.
- (contact_deleted_cb): s/card/contact.
- (do_delete): same, and use e_book_async.
- (delete_contacts): s/card/contact.
- (process_unref): same.
- (contact_added_cb): same.
- (do_copy): same, and use e_book_async.
- (got_book_cb): same.
- (eab_transfer_contacts): same, and use e_book_async.
- (eab_send_contact_list): s/card/contact
- (eab_send_contact): same.
-
- * gui/widgets/eab-gui-util.h: some random s/card/contact work, and
- move the contents of e-contact-save-as.h here.
-
- * util/eab-book-util.c (eab_contact_list_from_string): rename
- eab_load_contacts_from_string to this.
- (eab_contact_list_to_string): new function.
-
- * util/eab-book-util.h: add prototype for
- eab_contact_list_to_string, and rename
- eab_load_contacts_from_string to eab_contact_list_from_string.
-
- * gui/contact-editor/e-contact-save-as.[ch]: nuke. the contents
- of these files has been wrapped up in
- gui/widgets/eab-gui-util.[ch].
-
-2003-09-30 Chris Toshok <toshok@ximian.com>
-
- * gui/component/Makefile.am (libevolution_addressbook_la_LIBADD):
- add libecontactlisteditor.la back into the build.
-
- * gui/component/addressbook-component.c (new_item_cb): enable the
- contact list editor portion.
-
- * util/eab-book-util.c (eab_load_contacts_from_string): new
- function, return a GList of EContact*'s parsed from the string.
-
- * util/eab-book-util.h: add prototype for
- eab_load_contacts_from_string.
-
- * gui/contact-list-editor/contact-list-editor.glade: set the id of
- the list-image widget.
-
- * gui/contact-list-editor/e-contact-list-editor.c
- (e_contact_list_editor_class_init): PROP_CARD -> PROP_CONTACT.
- (e_contact_list_editor_init): initialize image_buf to null and
- card -> contact. also, hook up the dnd signals on the list_image
- widget so we can drop images.
- (e_contact_list_editor_dispose): free the image_buf.
- (list_added_cb): card -> contact.
- (list_modified_cb): same.
- (save_contact): same, and use the ebook-async api.
- (prompt_to_save_changes): card -> contact.
- (file_save_cb): same.
- (file_save_as_cb): same.
- (file_send_as_cb): #if notyet for now.
- (file_send_to_cb): same.
- (tb_save_and_close_cb): card -> contact.
- (list_deleted_cb): same.
- (delete_cb): same.
- (delete_cb): same, and use ebook-async.
- (e_contact_list_editor_new): card -> contact.
- (e_contact_list_editor_set_property): same.
- (table_drag_motion_cb): use GDK_POINTER_TO_ATOM instead of
- casting.
- (table_drag_data_received_cb): use eab_load_contacts_from_string,
- and card -> contact.
- (set_image_from_data): new function. create a pixbuf from the
- image data and composite it in an image that's the same size as
- the initial list_image widget.
- (image_drag_motion_cb): new function.
- (image_drag_drop_cb): new function.
- (image_drag_data_received_cb): new function.
- (extract_info): port to EContact, and add support for the image.
- (fill_in_info): same.
-
- * gui/contact-list-editor/e-contact-list-editor.h (struct
- _EContactListEditor): add image stuff, and ECard -> EContact.
-
- * gui/contact-list-editor/e-contact-list-model.c
- (contact_list_value_at): e_destination -> eab_destination.
- (e_contact_list_model_init): same.
- (e_contact_list_model_add_destination): same.
- (e_contact_list_model_add_email): same.
- (e_contact_list_model_add_contact): same, and card -> contact.
- (e_contact_list_model_remove_row): e_destination ->
- eab_destination.
- (e_contact_list_model_get_destination): same.
-
- * gui/contact-list-editor/e-contact-list-model.h: card -> contact,
- and e-destination -> eab-destination.
-
- * gui/widgets/e-addressbook-view.etspec: fix a couple of
- fields.. this needs a completely once-over at some point soon.
-
- * gui/widgets/e-addressbook-view.c (table_double_click): reenable
- all of this.
-
- * gui/widgets/eab-contact-display.c (render_address): use
- e_text_to_html to convert the \n's to <br>'s.
- (on_url_requested): get PHOTO if there is one, otherwise LOGO.
- (eab_contact_display_render): escape all the text we're sending to
- gtkhtml with e_text_to_html. also, if it's a contact list, output
- _("List Members") with the contents of _EMAIL.
-
- * gui/widgets/eab-gui-util.h: rename eab_send_card{_list} to
- eab_send_contact{_list}.
-
-2003-09-30 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/tests/ebook/Makefile.am (noinst_PROGRAMS): add
- test-string.
-
- * backend/ebook/tests/ebook/test-string.c: test setting/getting a
- string attribute.
-
- * backend/ebook/e-contact.c (photo_setter): do gnome-vfs mime type
- sniffing before we set the attribute value.
- (e_contact_set_property): implement setting of MULTI list
- attributes (like MAIL).
- (e_contact_get_property): rework the ATTR_TYPE attribute handling
- so we aren't calling g_value_set_pointer on a value that holds a
- string (and vice versa).
-
- * backend/ebook/e-vcard.c (e_vcard_remove_attributes): implement.
- (e_vcard_attribute_add_param): use g_ascii_strcasecmp.
-
- * backend/ebook/e-vcard.h: rename e_vcard_remove_attribute to
- e_vcard_remove_attributes, since it removes all matching
- attributes.
-
- * backend/ebook/e-book.c (e_book_response_add_contact): we need to
- strdup the id here since the listener frees it.
- (e_book_handle_response): implement the WritableStatusEvent part
- of the switch.
-
- * backend/ebook/e-book-listener.c
- (impl_BookListener_report_writable): un-"#if notyet" this.
-
- * backend/ebook/e-book-async.c (_add_contact_handler): fill in
- response->id.
-
-2003-09-29 Chris Toshok <toshok@ximian.com>
-
- * printing/e-contact-print-envelope.c: card -> contact.
-
- * printing/e-contact-print-envelope.h: card -> contact.
-
- * printing/e-contact-print.c: card -> contact.
-
- * printing/e-contact-print.h: card -> contact.
-
- * printing/Makefile.am (contact_print_test_LDADD): add
- libeabutil.la and reorder things so it links.
- (contact_print_style_editor_test_LDADD): same.
-
-2003-09-29 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names-text-model.c:
- e-addressbook-util.h -> eab-gui-util.h.
-
- * gui/component/select-names/e-select-names-popup.c:
- e-addressbook-util.h -> eab-gui-util.h.
-
- * gui/component/e-address-popup.c: e-addressbook-util.h ->
- eab-gui-util.h.
-
- * gui/component/component-factory.c: #if notyet the minicard
- control stuff, since it's been completely nuked from the tree.
-
- * gui/component/addressbook.c: e-addressbook-util.h ->
- eab-gui-util.h.
-
- * gui/component/addressbook-component.c: e-addressbook-util.h ->
- eab-gui-util.h.
-
- * gui/component/Makefile.am (libevolution_addressbook_la_LIBADD):
- rename libeminicard to libeabwidgets.
-
- * Makefile.am (SUBDIRS): add util/ to the build.
-
-2003-09-29 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-addressbook-treeview-adapter.c:
- e-addressbook-util.h -> eab-gui-util.h, and convert some
- EDestination code to EABDestination.
-
- * gui/widgets/e-addressbook-table-adapter.c: e-addressbook-util.h
- -> eab-gui-util.h, and include util/eab-destination.h.
- (addressbook_value_at): un-#if 0 some code.
-
- * gui/widgets/e-addressbook-model.c: e-addressbook-util.h ->
- eab-gui-util.h
-
- * gui/widgets/e-addressbook-view.c: e-addressbook-util.h ->
- eab-gui-util.h
-
- * gui/widgets/e-minicard-control.c,
- gui/widgets/e-minicard-control.h, gui/widgets/e-minicard-label.c,
- gui/widgets/e-minicard-label.h,
- 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-test.c,
- gui/widgets/e-minicard-widget.c, gui/widgets/e-minicard-widget.h,
- gui/widgets/e-minicard.c, gui/widgets/e-minicard.h,
- test-minicard-label.c, test-minicard-view.c, test-minicard.c: nuke
- all of the old minicard stuff.
-
- * gui/widgets/eab-gui-util.[ch]: rename e-addressbook-util.[ch] to
- this and nuke e-addressbook-util.[ch].
-
- * gui/widgets/Makefile.am (INCLUDES): change G_LOG_DOMAIN to
- eab-widgets, and add -I$(top_srcdir)/addressbook.
- (noinst_LTLIBRARIES): rename to libeabwidgets.la
- (libeabwidgets_la_SOURCES): rename e-addressbook-util.[ch] to
- eab-gui-util.[ch].
-
-2003-09-29 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/eab-contact-display.c (eab_contact_display_new):
- track change from E_TYPE_AB_CONTACT_DISPLAY to
- EAB_TYPE_CONTACT_DISPLAY.
-
- * gui/widgets/eab-contact-display.h: change from E_* type foo to
- EAB_* type foo.
-
-2003-09-29 Chris Toshok <toshok@ximian.com>
-
- * gui/search/e-addressbook-search-dialog.[ch]: convert everything
- from e_addressbook_search_dialog to eab_search_dialog, and
- EAddressbookSearchDialog to EABSearchDialog.
-
- * gui/component/addressbook.c (search_cb):
- e_addressbook_search_dialog -> eab_search_dialog.
- (addressbook_search_activated): same.
- (addressbook_query_changed): same.
-
-2003-09-29 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-book.c (pas_book_respond_get_supported_fields):
- don't free the fields here - the backends hold onto them.
- (pas_book_respond_get_supported_auth_methods): don't free the
- auth_methods here - the backends hold onto them.
-
- * backend/pas/pas-backend-file.c
- (pas_backend_file_get_supported_fields): fields go from 1 to
- E_CONTACT_FIELD_LAST, not 0.
-
-2003-09-29 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook.c: e-book-util.h -> eab-book-util.h
-
- * gui/component/addressbook-component.c: e-book-util.h ->
- eab-book-util.h.
- (new_item_cb): enable the contact editor portion of this.
- (user_create_new_item_cb): convert to async_load_uri api, and
- ifdef the _use_default_book crap.
- (ensure_completion_uris_exist): e_book_get_config_database ->
- eab_get_config_database.
-
- * gui/component/e-address-widget.h: e-book-util.h ->
- eab-book-util.h.
-
- * gui/component/Makefile.am (libevolution_addressbook_la_LIBADD):
- add selectnames back in, and add util/libeabutil.la.
-
-2003-09-29 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-contact.c: my head explodes from so many
- changes.
-
- * backend/ebook/e-contact.h: reorder fields such that all the
- string fields are first in the enum (and add a
- E_CONTACT_LAST_SIMPLE_STRING value, ala the old e-card-simple
- stuff.) Also, add E_CONTACT_LOGO, WANTS_HTML, IS_LIST, and
- LIST_SHOW_ADDRESSES. remove E_CONTACT_PHOTO_URI.
-
- * backend/ebook/e-vcard.c (e_vcard_remove_attribute): rename from
- e_card_remove_attribute, and add a g_assert_not_reached.
- (_evc_base64_encode_simple): make this not static (we need it for
- a test.)
- (_evc_base64_decode_simple): same.
-
- * backend/ebook/e-vcard.h: add LOGO, X-MOZILLA-HTML,
- X-EVOLUTION-LIST, and X-EVOLUTION-LIST-SHOW_ADDRESSES #defines.
-
- * backend/ebook/e-book.c (EBookLoadState): change from
- UriNotLoaded to E_BOOK_URI_NOT_LOADED, etc.
- (e_book_add_contact): track _URI_ change.
- (e_book_get_supported_fields): same.
- (e_book_get_supported_auth_methods): same.
- (e_book_authenticate_user): same.
- (e_book_get_contact): same.
- (e_book_response_get_contact): remove the ifdefed call to
- e_contact_set_book.
- (e_book_remove_contacts): track _URI_ change.
- (e_book_get_book_view): same.
- (e_book_get_contacts): same.
- (e_book_get_changes): same.
- (e_book_remove): same.
- (e_book_unload_uri): same.
- (e_book_load_uri): same.
- (e_book_load_uri): same.
- (e_book_get_self): start the implementation of this.
- (e_book_get_default_addressbook): ifdef out a possible
- implementation of this (it's broken.)
- (e_book_init): track _URI_ change.
- (e_book_dispose): same.
-
- * backend/ebook/e-book.h: move get_default_addressbook out of the
- ifdef, and change get_default_addressbook/get_addressbooks to be
- more like the rest of the api.
-
- * backend/ebook/e-book-util.[ch]: nuke.
-
- * backend/ebook/e-card-compare.[ch]: nuke.
-
- * backend/ebook/e-destination.[ch]: nuke.
-
- * backend/ebook/e-book-query.c (func_and): fix valgrind error.
- (func_or): same.
-
- * backend/ebook/e-book-listener.h: drop #include of e-list.h
-
- * backend/ebook/e-book-async.c (_get_contacts_response_handler)
- (_get_contacts_response_dtor, _get_contacts_handler)
- (_get_contacts_dtor, e_book_async_get_contacts): new functions,
- implementing e_book_async_get_contacts.
-
- * backend/ebook/e-book-async.h: add e_book_async_get_contacts.
-
-2003-09-29 Chris Toshok <toshok@ximian.com>
-
- * util/eab-marshal.list: new file.
-
- * util/eab-destination.[ch]: rename
- backend/ebook/e-destination.[ch] to this, and change all the entry
- point names too.
-
- * util/eab-book-util.[ch]: rename backend/ebook/e-book-util.[ch]
- to this, and change all the entry point names too.
-
- * util/Makefile.am: new file, build libeabutil.la
-
-2003-09-29 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names.c
- (addressbook_model_set_uri): e_addressbook_model -> eab_model.
- (contact_key): e-contactify this, and remove the call to
- e_contact_get_book since we don't have it.
- (sync_one_model): card -> contact.
- (real_add_address_cb): track various name changes.
- (esn_get_key_fn): same.
- (e_addressbook_create_ebook_table): same.
- (folder_selected): same.
- (select_entry_changed): same.
- (e_select_names_new): same.
-
- * gui/component/select-names/e-select-names-text-model.c
- (dump_model): s/card/contact.
- (e_select_names_text_model_insert_length): e-destination ->
- eab-destination.
- (e_select_names_text_model_delete): same.
- (e_select_names_text_model_obj_count): same.
- (nth_obj_index): same.
- (e_select_names_text_model_activate_obj): ifdef this out since we
- don't have e_contact_get_book in the new api.
-
- * gui/component/select-names/e-select-names-table-model.c
- (fill_in_info): convert to e_contact/eab_destination.
-
- * gui/component/select-names/e-select-names-popup.c
- (change_email_num_cb): e_destination -> eab_destination.
- (populate_popup_contact): same, and ECard -> EContact. Also, the
- email attribute is a GList, not an EList. lastly, rename from
- populate_popup_card.
- (populate_popup_nocontact): same, and rename from
- populate_popup_nocard.
- (e_select_names_populate_popup): same.
-
- * gui/component/select-names/e-select-names-model.h: track changes
- to e_destination, and rename the cardify methods to something mode
- descriptive.
-
- * gui/component/select-names/e-select-names-model.c
- (e_select_names_model_duplicate): e_destination ->
- eab_destination.
- (e_select_names_model_get_textification): same.
- (e_select_names_model_get_address_text): same.
- (e_select_names_model_get_destination): same.
- (e_select_names_model_export_destinationv): same.
- (send_changed): same.
- (e_select_names_model_import_destinationv): same.
- (e_select_names_model_get_contact): same, and rename from
- _get_card
- (e_select_names_model_get_string): same.
- (connect_destination): same.
- (disconnect_destination): same.
- (e_select_names_model_contains): same.
- (e_select_names_model_insert): same.
- (e_select_names_model_append): same.
- (e_select_names_model_replace): same.
- (e_select_names_model_delete): same.
- (e_select_names_model_clean): same.
- (delete_all_iter): same.
- (e_select_names_model_overwrite_copy): same.
- (e_select_names_model_merge): same.
- (e_select_names_model_name_pos): same.
- (e_select_names_model_text_pos): same.
- (e_select_names_model_cardify): nuke.
- (e_select_names_model_uncardify): nuke.
- (e_select_names_model_cancel_cardify): nuke.
- (e_select_names_model_load_all_contacts): rename _cardify_all to
- this.
- (e_select_names_model_cancel_all_contact_load): rename
- _cancel_cardify to this.
-
- * gui/component/select-names/e-select-names-manager.c
- (focus_in_cb): cancel_cardify_all -> cancel_all_contact_load
- (focus_out_cb): cardify_all -> load_all_contacts.
- (completion_popup_cb): same.
- (load_completion_books): no e_book_expand_uri anymore.
- (e_select_names_manager_new): e_book_get_config_database ->
- eab_get_config_database.
- (e_select_names_manager_dispose): same.
-
- * gui/component/select-names/e-select-names-completion.h: e-book.h
- -> e-book-async.h
-
- * gui/component/select-names/e-select-names-completion.c:
- EContactify this.
-
- * gui/component/select-names/e-select-names-bonobo.c
- (entry_get_property_fn): ifdef out the SIMPLE_CARD_LIST getter,
- and cardify_all -> load_all_contacts.
-
- * gui/component/select-names/Evolution-Addressbook-SelectNames.idl:
- nuke all the SimpleCard stuff. It's a horribly inefficient way to
- deal with vcards, and since ebook is platform level now, we can
- (and should) promote just linking to ebook to do this.
-
-2003-09-19 Gilbert Fang <gilbert.fang@sun.com>
-
- * addressbook/gui/component/addressbook-component.c (xfer_folder):
- remove the "addressbook.db.summary" correctly. #48538
-
-2003-09-11 Dan Winship <danw@ximian.com>
-
- * backend/ebook/Makefile.am (privlib_LTLIBRARIES): Remove
- libebook-static.la
-
- * conduit/Makefile.am (libeaddress_conduit_la_LIBADD): Use
- non-static versions of libraries: the static ones were only needed
- for libtool 1.3.
-
-2003-09-07 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-contact.c (e_contact_get_property): implement
- getters for the address labels. they aren't really synthetic, but
- we can't handle them as normal strings because they switch off the
- TYPE parameter, not the attribute name (go go vcard.) Also add
- getters for the structured address fields (ADR). Also fix a spot
- where we were using strcmp instead of strcasecmp.
- (e_contact_address_free): new function.
-
- * backend/ebook/e-contact.h: Add EContactAddress structure, which
- will probably go away once i merge in my cool spiffy address
- editor. Add LABEL fields for the address labels, and add
- prototype for e_contact_address_free.
-
- * backend/ebook/e-vcard.h: add EVC_LABEL and EVC_X_BLOG_URL.
-
- * backend/ebook/e-vcard.c (read_attribute_value): step to the next
- character after unescaping \-escaped characters. keeps commas
- from multiplying.
-
- * gui/widgets/eab-contact-display.c (render_address): new function
- (eab_contact_display_render): display email, delivery addresses,
- and the blog url.
-
-2003-09-06 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-contact.c (e_contact_set_property): implement
- E_CONTACT_EMAIL_*.
-
- * backend/pas/pas-backend-ldap.c (email_ber): EContact-ify and
- re-enable this code.
- (email_compare): same.
- (email_populate): same.
-
- * backend/pas/pas-backend-vcf.c (pas_backend_vcf_load_uri): use
- XIMIAN_VCARD.
-
- * backend/pas/pas-backend-file.c (pas_backend_file_load_uri): use
- XIMIAN_VCARD, and don't fail if the directory already exists.
- just try to create the db anyway.
-
- * backend/pas/Makefile.am (libpas_a_SOURCES): add ximian-vcard.h
-
- * backend/pas/ximian-vcard.h (XIMIAN_VCARD): put the initial vcard
- here, so we can share 1 #define between file/vcf backends. Also,
- add a jpeg photo.
-
-2003-09-06 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/Makefile.am (libeminicard_la_SOURCES): add
- eab-contact-display.[ch]
-
- * gui/widgets/e-addressbook-view.c (eab_view_init): just init
- everything to NULL.
- (eab_view_new): move a bunch of stuff that was in eab_view_init
- here. create a vpaned to hold the contact display, and create the
- contact display.
- (render_contact): render the selected contact to the
- contact_display.
- (selection_changed): add logic to display the currently selected
- contact in the preview pane.
- (create_table_view): add the table to the paned.
- (create_treeview_view): add the scrolled to the paned.
- (change_view_type): remove view->widget from the paned.
-
- * gui/widgets/e-addressbook-view.h: switch from using a GtkTable
- to a GtkEventBox - we don't need the table logic anymore.
-
- * gui/widgets/e-addressbook-model.c (create_contact): indent
- (eab_model_get_contact): same.
-
- * gui/widgets/eab-contact-display.[ch]: new files - this
- implements the preview pane.
-
-2003-09-06 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (BINARY_PROP): new type of
- property, for specifying data coming back from the ldap server
- with both data/length (like photos).
- (photo_populate): set the contact's photo.
- (build_contact_from_entry): add PROP_TYPE_BINARY handling.
-
- * backend/ebook/e-vcard.c (EVCardEncoding): new enum for use with
- the ENCODING attribute parameter. Right now, just "raw",
- "base64", and "quoted-printable".
- (struct _EVCardAttribute): add a "decoded_values" list of
- GString*'s, as well as fields to hold encoding/encoding_set.
- (e_vcard_class_init): call _evc_base64_init.
- (e_vcard_attribute_add_value_decoded): based on what encoding the
- attribute uses, add the value properly.
- (e_vcard_attribute_add_param): if the parameter is ENCODING, work
- our magic.
- (e_vcard_attribute_get_values_decoded): spit out properly decoded
- values depending on the decoding type.
- (_evc_base64*): copy the camel base64 routines here.
-
- * backend/ebook/e-vcard.h: add prototypes for
- e_vcard_attribute_add_value_decoded and
- e_vcard_attribute_get_values_decoded.
-
- * backend/ebook/e-contact.c (e_contact_get_first_attr): move this
- to above _set_property so we can make use of it there.
- (e_contact_set_property): fix up the generic STRING field handler,
- and implement E_CONTACT_PHOTO setting.
- (e_contact_get_property): add handling for
- E_CONTACT_PHOTO/E_CONTACT_PHOTO_URI.
- (e_contact_photo_free): new function.
-
- * backend/ebook/e-contact.h: add EContactPhoto struct, a prototype
- for e_contact_photo_free, and two new EContactField elements (PHOTO and
- PHOTO_URI).
-
- * backend/ebook/tests/ebook/.cvsignore: ignore test-photo
-
- * backend/ebook/tests/ebook/Makefile.am (noinst_PROGRAMS): add test-photo
-
- * backend/ebook/tests/ebook/test-photo.c: test for the photo
- set/get routines (which do base64 encoding/decoding).
-
-2003-09-02 Chris Toshok <toshok@ximian.com>
-
- * gui/component/Makefile.am: comment out a buncha stuff just to
- get this building.
-
- * gui/component/select-names/e-select-names.c: #include
- e-book-async.h
- (search_result): EAddressbookModel -> EABModel.
- (addressbook_model_set_uri): same, and don't use
- e_book_expand_uri, as it's dead.
- (esn_get_key_fn): EAddressbookModel -> EABModel.
- (e_addressbook_create_ebook_table): same.
- (status_message): same.
-
- * gui/component/select-names/e-select-names.h (struct
- _ESelectNames): EAddressbookModel -> EABModel.
-
- * gui/component/addressbook-component.c (new_item_cb): ifdef out
- for now.
- (dnd_drop_book_open_cb): s/card/contact.
- (destination_folder_handle_drop): ifdef out.
- (request_quit): same.
-
- * gui/component/addressbook.c: track api changes - e_addressbook_
- -> eab_, and e_book_* becomes e_book_async_*.
-
- * gui/component/addressbook.h: #include e-book-async.h
-
- * gui/component/e-address-widget.c (query_results_cb):
- e/EBookSimpleQueryStatus/EBookStatus
-
- * gui/component/e-address-widget.h: s/ECard/EContact.
-
- * gui/component/e-cardlist-model.[ch]: nuke.
-
- * gui/component/e-address-popup.c: s/e-book.h/e-book-async.h
-
- * gui/component/e-address-popup.h: s/ECard/EContact
-
-2003-09-02 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/Makefile.am (libebook_la_SOURCES): remove
- e-card.c,e-card.simple.c
-
- * backend/ebook/tests/ebook/test-ebook.c: remove #include of
- e-card-simple.h
-
- * backend/ebook/tests/ebook/test-changes.c: remove #include of
- e-card-simple.h
-
- * backend/ebook/e-card.[ch], backend/ebook/e-card-simple.[ch]:
- nuke.
-
- * backend/ebook/e-book-util.h: s/card/contact.
-
- * backend/ebook/e-book-util.c: ifdef out an #include.
-
- * backend/ebook/e-book-async.[ch]: stop doing the stupid #define
- renaming trick, and just rename all the prototypes from e_book_*
- to e_book_async_*. Also, get rid of the *_vcard variants.
-
-2003-09-02 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-card-sexp.[ch]
- (pas_backend_card_sexp_match_contact): rename
- pas_backend_card_sexp_match_card, and it takes an EContact now.
- Also, port this file to use EContact instead of ECard, and ifdef
- out lots of stuff.
-
- * backend/pas/pas-backend-ldap.c: convert this to use EContact
- instead of ECard, and ifdef great swaths of code to make it
- compile.
-
- * backend/pas/pas-book.c (pas_book_respond_modify): convert this
- from ECard to EContact.
-
-2003-09-02 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/Makefile.am (libeminicard_la_SOURCES): remove all
- the reflow/minicard stuff from the build.
- (e-addressbook-marshal.[ch]): change the prefix on the marshallers to
- eab_marshal.
-
- * gui/widgets/e-addressbook-view.etspec: bring this more in line
- with the field ids for EContact, and comment out a ton of them
- that aren't there yet.
-
- * gui/widgets/e-addressbook-view.[ch]: big renaming - rename
- e_addressbook_view to eab_view, and EAddressbookView to EABView.
-
- * gui/widgets/e-addressbook-util.c (eab_error_dialog): rename, and
- change a few of the error strings s/Card/Contact.
- (added_cb): E_BOOK_STATUS_SUCCESS => E_BOOK_ERROR_OK.
- (modified_cb): same.
- (e_addressbook_show_contact_editor): this takes an EContact now,
- and track the change to the contact editor signal names.
- (e_addressbook_show_contact_list_editor): this takes an EContact
- now.
- (view_contacts): rename view_cards to this, and ifdef the body.
- (e_addressbook_show_multiple_contacts): rename
- e_addressbook_show_multiple_cards to this, and s/card/contact.
-
- * gui/widgets/e-addressbook-util.h: ifdef some things out, and
- rename e_addressbook_error_dialog to eab_error_dialog.
-
- * gui/widgets/e-addressbook-table-adapter.[ch]: big renaming -
- rename e_addressbook_table_adapter to eab_table_adapter, and
- EAddressbookTableAdapter to EABTableAdapter. Also, remove the
- simple mapping - we can do ECardSimple-like operations directly on
- the EContacts from the EABModel.
-
- * gui/widgets/e-addressbook-model.[ch]: big renaming - rename
- e_addressbook_model to eab_model, and EAddressbookModel to
- EABModel. Also, convert everything from ECard to EContact.
-
-2003-09-01 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-vcard.c (e_vcard_new_from_string): omg i'm dumb.
- don't call e_vcard_new here since it just turns around and calls
- e_vcard_new_from_string again.
-
-2003-09-01 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-book-view.c (pas_book_view_notify_change): guard
- pending adds foo.
- (pas_book_view_notify_remove): same.
- (pas_book_view_notify_add): same.
- (pas_book_view_notify_complete): same.
- (pas_book_view_construct): init mutex
- (pas_book_view_dispose): free mutex
-
- * backend/pas/pas-backend-ldap.c (func_exists): new function.
- (send_pending_adds): remove
- (ldap_search_handler): let the BookView stuff handle the pending
- adds for us.
- (ldap_search_dtor): remove pending adds stuff.
- (pas_backend_ldap_search): same
-
- * backend/pas/pas-backend-card-sexp.c (func_exists): new function.
-
- * backend/ebook/tests/ebook/test-ebook.c (print_all_emails): use
- an exists query.
-
-2003-08-31 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-book-query.c (func_and, func_or, func_not)
- (func_contains, func_is, func_beginswith, func_endswith)
- (e_book_query_from_string): adapt the pas ldap backend sexp
- parsing code to this, build up an EBookQuery that represents the
- sexp.
-
- * backend/ebook/e-contact.h (e_contact_field_id): add prototype.
-
- * backend/ebook/e-contact.c (e_contact_field_id): new function.
-
- * backend/ebook/Makefile.am (libebook_la_SOURCES): add
- e-book-util.c back into the build, if only for the config_database
- thingy.
-
-2003-08-31 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-contact.c (e_contact_duplicate): new function.
-
- * backend/ebook/e-contact.h: add prototype for
- e_contact_duplicate.
-
- * backend/ebook/e-book-util.[ch]: massive ifdeffing. most of this
- is either gone or will be unnecessary soon.
-
- * backend/ebook/e-book-query.c (e_book_query_from_string): hack
- this so it'll at least generate a query.
-
- * backend/ebook/e-book-listener.c
- (impl_BookListener_respond_get_view): add some debug spew and
- remove a c&p'ed comment.
-
- * backend/ebook/e-book-async.h: add prototype for
- e_book_async_unload_uri.
-
- * backend/ebook/e-book-async.c (e_book_async_unload_uri): new
- function.
-
- * backend/pas/pas-book-view.c (pas_book_view_construct): switch to
- CORBA_Object_duplicate, ala pas_book.
-
- * backend/pas/pas-backend-sync.c (pas_backend_sync_class_init):
- fix typo and the build.
-
-2003-08-29 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (ldap_error_to_response):
- s/card/contact.
- (pas_backend_ldap_process_create_contact): same.
- (remove_contact_handler): same.
- (remove_contact_dtor): same.
- (pas_backend_ldap_process_remove_contacts): same.
- (modify_contact_modify_handler): same.
- (modify_contact_dtor): same.
- (pas_backend_ldap_process_modify_contact): same.
- (get_contact_handler): same.
- (get_contact_dtor): same.
- (pas_backend_ldap_process_get_contact): same.
- (pas_backend_ldap_class_init): same.
-
- * backend/pas/pas-backend-summary.c
- (pas_backend_summary_add_contact): s/card/contact, and mostly
- switch from ECard{Simple} to EContact.
- (pas_backend_summary_get_summary_vcard): same.
- (pas_backend_summary_remove_contact): s/card/contact
-
- * backend/pas/pas-backend-summary.h: s/card/contact.
-
- * backend/pas/pas-backend-file.c (build_summary): fix g_warning,
- and return immediately if the db->cursor call fails.
- (pas_backend_file_create_contact): s/card/contact
- (pas_backend_file_remove_contacts): same.
- (pas_backend_file_modify_contact): same.
- (pas_backend_file_get_contact): same.
- (pas_backend_file_get_contact_list): same.
- (pas_backend_file_class_init): same.
-
- * backend/pas/pas-backend-vcf.c
- (pas_backend_vcf_process_create_contact): s/card/contact.
- (pas_backend_vcf_process_remove_contacts): same.
- (pas_backend_vcf_process_modify_contact): same.
- (pas_backend_vcf_process_get_contact): same.
- (pas_backend_vcf_process_get_contact_list): same.
- (pas_backend_vcf_class_init): same.
-
- * backend/pas/pas-backend-sync.c (pas_backend_sync_create_contact): s/card/contact.
- (pas_backend_sync_remove_contacts): same.
- (pas_backend_sync_modify_contact): same.
- (pas_backend_sync_get_contact): same.
- (pas_backend_sync_get_contact_list): same.
- (_pas_backend_create_contact): same.
- (_pas_backend_remove_contacts): same.
- (_pas_backend_modify_contact): same.
- (_pas_backend_get_contact): same.
- (_pas_backend_get_contact_list): same.
- (pas_backend_sync_class_init): same.
-
- * backend/pas/pas-backend-sync.h: s/card/contact.
-
- * backend/pas/pas-backend.c (pas_backend_create_contact): s/card/contact.
- (pas_backend_remove_contacts): same.
- (pas_backend_modify_contact): same.
- (pas_backend_get_contact): same.
- (pas_backend_get_contact_list): same.
- (pas_backend_change_add_new): same.
- (pas_backend_change_modify_new): same.
- (pas_backend_change_delete_new): same.
-
- * backend/pas/pas-backend.h: s/card/contact.
-
- * backend/pas/pas-book-view.c (send_pending_adds): s/card/contact
- (pas_book_view_notify_change): same.
- (pas_book_view_notify_remove): same.
-
- * backend/pas/pas-book.c
- (impl_GNOME_Evolution_Addressbook_Book_getContact): s/card/contact
- (impl_GNOME_Evolution_Addressbook_Book_getContactList): same.
- (impl_GNOME_Evolution_Addressbook_Book_addContact): same.
- (impl_GNOME_Evolution_Addressbook_Book_removeContacts): same.
- (impl_GNOME_Evolution_Addressbook_Book_modifyContact): same.
- (pas_book_respond_create): same.
- (pas_book_respond_remove_contacts): same.
- (pas_book_respond_modify): same.
- (pas_book_respond_get_contact): same.
- (pas_book_respond_get_contact_list): same.
- (pas_book_respond_get_changes): same.
- (pas_book_class_init): same.
-
- * backend/pas/pas-book.h: s/card/contact
-
- * backend/ebook/tests/vcard/dump-vcard.c: #include
- "ebook/e-vcard.h"
-
- * backend/ebook/tests/vcard/Makefile.am (TEST_LIBS): use
- top_builddir.
- (CFLAGS): same.
-
- * backend/ebook/tests/ebook/Makefile.am (TEST_LIBS): use
- top_builddir.
- (CFLAGS): use srcdir
-
- * backend/ebook/test-card.c, backend/ebook/test-client-list.c,
- backend/ebook/test-client.c, backend/ebook/test-ebook.c: remove.
-
- * backend/ebook/e-card-cursor.[ch]: remove.
-
- * backend/ebook/e-card-pairs.h: remove.
-
- * backend/ebook/e-book.c (e_book_add_contact): s/Card/Contact.
- (e_book_commit_contact): same
- (e_book_get_contact): same.
- (e_book_remove_contacts): same.
- (e_book_get_contacts): same.
- (e_book_handle_response): same.
-
- * backend/ebook/e-book-view.c (e_book_view_do_added_event):
- s/card/contact
- (e_book_view_do_modified_event): same.
- (e_book_view_do_removed_event): same.
- (e_book_view_handle_response): same.
- (e_book_view_class_init): same.
-
- * backend/ebook/e-book-view.h: s/card/contact and pad the class
- struct.
-
- * backend/ebook/e-book-view-listener.c
- (e_book_view_listener_queue_response): s/Card/Contact.
- (e_book_view_listener_queue_status_event): no need to assign
- things to NULL, we g_new0.
- (e_book_view_listener_queue_idlist_event): s/Card/Contact, and no
- need to assign things to NULL, we g_new0.
- (e_book_view_listener_queue_sequence_event): same.
- (e_book_view_listener_queue_message_event): same.
- (impl_BookViewListener_notify_contacts_added): s/Card/Contact.
- (impl_BookViewListener_notify_contacts_removed): same.
- (impl_BookViewListener_notify_contacts_changed): same.
- (e_book_view_listener_class_init): same.
-
- * backend/ebook/e-book-view-listener.h: s/Card/Contact
-
- * backend/ebook/e-book-types.h: s/CARD/CONTACT
-
- * backend/ebook/e-book-listener.c
- (e_book_listener_convert_status): s/Card/Contact
- (impl_BookListener_respond_create_contact): same.
- (impl_BookListener_respond_remove_contacts): same.
- (impl_BookListener_respond_modify_contact): same.
- (impl_BookListener_respond_get_contact): same.
- (impl_BookListener_respond_get_contact_list): same.
- (impl_BookListener_respond_get_changes): same.
- (e_book_listener_class_init): same.
-
- * backend/ebook/e-book-listener.h: pad the class struct, and
- s/Card/Contact.
-
- * backend/ebook/e-book-async.c (_load_uri_handler): GError
- changes.
- (_get_fields_handler): same.
- (_get_methods_handler): same.
- (_auth_user_handler): same.
- (_get_card_handler): same.
- (_remove_cards_handler): same.
- (_add_vcard_handler): same.
- (_commit_vcard_handler): same.
- (_get_book_view_handler): same.
- (e_book_async_get_book_view): use an EBookQuery instead of a char*.
-
- * backend/ebook/Makefile.am: remove the test handling.
- (SUBDIRS): set to ". tests"
- (libebook_la_SOURCES): add e-book-async.c
-
- * backend/idl/addressbook.idl: possibly gratuitous renaming, but i
- was sick of seeing "Card" being used everywhere. "Contact" is the
- new "Card".
-
-2003-08-28 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-book.c (e_book_op_free): rename from
- e_book_free_op.
- (e_book_op_remove): rename from e_book_remove_op.
- (e_book_clear_op): new function, remove the op, unlock its mutex,
- and free it.
- (e_book_add_contact): use e_book_clear_op.
- (e_book_commit_contact): same.
- (e_book_get_supported_fields): same.
- (e_book_get_supported_auth_methods): same.
- (e_book_authenticate_user): same.
- (e_book_get_contact): same.
- (e_book_remove_contacts): same.
- (e_book_get_book_view): same.
- (e_book_get_contacts): same.
- (e_book_get_changes): same.
- (e_book_load_uri): same.
- (e_book_remove): new function.
- (e_book_response_remove): new function.
- (e_book_handle_response): add handling for RemoveBookResponse.
- (e_book_load_local_addressbook): pass TRUE for e_book_load_uri
- @only_if_exists.
-
- * backend/ebook/e-book.h: add @only_if_exists arg to
- e_book_load_uri so we can support folder creation at load_uri
- time, and add prototype for e_book_remove.
-
- * backend/ebook/e-book-types.h: add an "id" slot in EBookChange.
-
- * backend/ebook/e-book-listener.c
- (impl_BookListener_respond_get_changes): handle union in idl.
- (impl_BookListener_respond_open_book): remove unnecessary
- exception check.
- (impl_BookListener_respond_remove_book): new function.
- (impl_BookListener_respond_get_supported_fields): rename this from
- _response_.
- (impl_BookListener_respond_get_supported_auth_methods): same.
- (e_book_listener_class_init): add _remove_book and track change to
- get_supported_fields/get_supported_auth_methods names.
-
- * backend/ebook/e-book-listener.h: add RemoveBookResponse to
- EBookListenerOperation enum.
-
- * backend/idl/addressbook.idl: make BookChangeItem a union that
- switches over BookChangeType.
-
- * backend/pas/pas-backend.c (pas_backend_change_add_new): new
- function, create a BookChangeItem representing the addition of a
- contact.
- (pas_backend_change_modify_new): same, but for modifications.
- (pas_backend_change_delete_new): same, but for deletions.
-
- * backend/pas/pas-backend.h: add prototypes for
- pas_backend_change_{add,modify,delete}_new
-
- * backend/pas/pas-backend-file.c (pas_backend_file_changes): nuke.
- (do_create): fix memory corruption.
- (pas_backend_file_get_changes): copy the body of
- pas_backend_file_changes here, and rework so that it's synchronous
- and return a list instead of the book view hack.
- (pas_backend_file_load_uri): mkdir the directory (we need a mkdir
- -p here).
- (select_changes): new function, scandir helper.
- (pas_backend_file_remove): NULL out bf->priv->summary to quiet
- valgrind, and call scandir to accumulate the .changes.db files
- then unlink them.
-
- * backend/pas/pas-book.c (pas_book_respond_remove): new function.
- (pas_book_respond_get_supported_fields): unifdef this, and make it
- use a glist.
- (pas_book_respond_get_supported_auth_methods): same.
- (pas_book_respond_get_changes): this code is kinda gross... lots
- of copying going on, there's got to be a better way. but it
- works.
-
-2003-08-26 Chris Toshok <toshok@ximian.com>
-
- * backend/idl/addressbook.idl: add oneway void Book::remove() and
- oneway void notifyBookRemoved()
-
-2003-08-26 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend.c (pas_backend_remove): new function.
- (pas_backend_add_book_view): new function.
- (pas_backend_add_client): move the "real_add_client" code here.
- (pas_backend_remove_client): move the "real_remove_client" code
- here.
- (pas_backend_class_init): remove assignments of add_client and
- remove_client vtable entries.
- (pas_backend_is_removed): new function.
- (pas_backend_set_is_removed): new function.
- (pas_backend_init): init clients_mutex and views_mutex.
-
- * backend/pas/pas-backend.h: remove the vtable entries for
- add/remove_client, since these are fully handled in PASBackend.
- Add prototypes for
- pas_backend_is_removed/pas_backend_add_book_view/pas_backend_set_is_removed.
-
- * backend/pas/pas-book.c
- (impl_GNOME_Evolution_Addressbook_Book_remove): new function.
- (impl_GNOME_Evolution_Addressbook_Book_getBookView): clean things
- up a bit, and don't use pas_backend_get_book_views as it can't
- lock the list of views.
- (pas_book_respond_get_supported_auth_methods): remove the extra
- unnecessary arg from the corba call.
- (pas_book_respond_get_changes): same.
- (pas_book_class_init): fill in epv "remove" slot.
-
- * backend/pas/pas-book.h: rename pas_book_respond_remove to
- pas_book_respond_remove_cards, and add a new
- pas_book_respond_remove for use with removing books.
-
- * backend/pas/pas-backend-sync.c (pas_backend_sync_remove): new
- function.
- (_pas_backend_remove): new function.
- (pas_backend_sync_class_init): fill in the "remove" vtable entry.
- (_pas_backend_remove_cards): track change to
- pas_book_respond_remove_cards (pas_book_respond_remove is used for
- removing the book, not the cards.)
-
- * backend/pas/pas-backend-sync.h: add pas_backend_sync_remove
- prototype and add remove_sync virtual function.
-
-2003-08-26 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-file.c (pas_backend_file_create_card,
- pas_backend_file_remove_cards, pas_backend_file_modify_card,
- pas_backend_file_get_vcard, pas_backend_file_get_card_list,
- pas_backend_file_start_book_view, pas_backend_file_get_changes,
- pas_backend_file_authenticate_user,
- pas_backend_file_get_supported_fields): rename from
- pas_backend_file_process_*
- (pas_backend_file_load_uri): save off the dirname/summary
- filename.
- (pas_backend_file_remove): new function, unlink all the files we
- know about.
- (pas_backend_file_class_init): track changes to functions, and add
- pas_backend_file_remove.
-
-2003-08-26 JP Rosevear <jpr@ximian.com>
-
- * conduit/address-conduit.c (ecard_from_remote_record): duplicate
- the extra address lines
-
-2003-08-22 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-book.[ch]: switch from using the PASRequest
- union and a central PASBackend dispatch function. just call the
- pas_backend methods directly and expand the args out.
-
- * backend/pas/pas-backend.[ch]: same.
-
- * backend/pas/pas-backend-sync.[ch]: same.
-
- * backend/pas/pas-backend-vcf.c, backend/pas/pas-backend-file.c,
- backend/pas/pas-backend-ldap.c: same, and get these all compiling
- against the rest of the current pas/ebook code.
-
-2003-08-21 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/test-ebook.c: track GError case.
-
- * backend/ebook/e-book.[ch]: GError-ify the api, and clean up some
- cases where we weren't removing the current op.
-
- * backend/ebook/e-book-view-listener.c
- (e_book_view_listener_convert_status): track change from
- E_BOOK_VIEW_STATUS_* to E_BOOK_VIEW_ERROR_*.
-
- * backend/ebook/e-book-types.h: track change from E_BOOK_STATUS_*
- to E_BOOK_ERROR_*, and some E_BOOK_VIEW_STATUS_* to
- E_BOOK_VIEW_ERROR_*.
-
- * backend/ebook/e-book-listener.c
- (e_book_listener_convert_status): track change from
- E_BOOK_STATUS_* to E_BOOK_ERROR_*.
-
- * backend/ebook/e-book-query.c (e_book_query_any_field_contains):
- new function.
- (e_book_query_unref): handle the any_field_contains case.
- (e_book_query_to_string): same.
-
- * backend/ebook/e-book-query.h: add prototype for
- e_book_query_any_field_contains.
-
- * backend/ebook/e-card.c (e_card_load_uri): ifdef this out for
- now.
-
- * backend/ebook/e-contact.[ch] (e_contact_get_const): new
- function/prototype.
-
-2003-08-20 Gilbert Fang <gilbert.fang@sun.com>
-
- * gui/widgets/e-addressbook-util.c
- (e_addressbook_send_card_list): use memcpy to assign
- CORBA_char_sequence instead of strcpy. (#46706)
-
-2003-08-18 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/component-factory.c: Update OAFIIDs.
-
- * gui/widgets/e-addressbook-util.c (e_addressbook_transfer_cards):
- Removed extern declaration for global_shell_client [yuck].
- (e_addressbook_transfer_cards): #if 0 the invocation for
- evolution_shell_client_user_select_folder(), we need to
- reimplement this component-side now.
-
- * gui/component/component-factory.c (factory): Call
- addressbook_component_peek() here instead of
- addressbook_component_init() [since the latter is no more].
-
- * gui/component/addressbook.c (set_status_message): Don't create
- the activity client for now.
-
- * gui/component/addressbook-config.c: Removed member shell from
- struct AddressbookDialog.
- (ldap_dialog_new): Do not take a shell arg anymore.
- (ldap_config_control_new): Likewise.
- (addressbook_config_control_new): No need to get the global shell
- pointer here anymore.
-
- * gui/component/addressbook-component.c: Rewritten to support the
- new ::Component interface.
- * gui/component/addressbook-component.h: Likewise.
-
- * gui/component/GNOME_Evolution_Addressbook.server.in.in: Version
- factory's OAFIID. Remove ShellComponent server, add Component
- server.
-
-2003-08-12 Rodrigo Moya <rodrigo@ximian.com>
-
- * backend/ebook/e-book.c (e_book_dispose): unref the
- EComponentListener before unloading the CORBA object.
-
-2003-08-12 Hans Petter Jansson <hpj@ximian.com>
-
- * backend/ebook/e-destination.c (e_destination_dispose): Chain.
-
- * gui/component/e-address-widget.c (e_address_widget_destroy): Chain.
- Prevent double frees. Prevent double GSource removal.
-
- * gui/component/e-cardlist-model.c (e_cardlist_model_class_init):
- Store parent class.
- (e_cardlist_model_dispose): Chain. Prevent double frees and unrefs.
-
- * gui/contact-editor/e-contact-editor-address.c
- (e_contact_editor_address_dispose): Chain.
-
- * gui/contact-editor/e-contact-editor-fullname.c
- (e_contact_editor_fullname_dispose): Chain.
-
- * gui/contact-list-editor/e-contact-list-editor.c
- (e_contact_list_editor_dispose): Chain.
-
- * gui/contact-list-editor/e-contact-list-model.c
- (contact_list_model_destroy): Chain. Prevent double frees and unrefs.
-
- * gui/widgets/e-addressbook-reflow-adapter.c (addressbook_dispose):
- Chain.
- (addressbook_finalize): Chain.
-
- * gui/widgets/e-addressbook-table-adapter.c (addressbook_dispose):
- Chain.
-
- * gui/widgets/e-addressbook-treeview-adapter.c (addressbook_destroy):
- Chain. Prevent double free.
-
- * gui/widgets/gal-view-minicard.c (gal_view_minicard_dispose):
- Chain. Prevent double free and detach.
-
- * gui/widgts/gal-view-treeview.c (gal_view_treeview_dispose):
- Chain. Prevent double free and detach.
-
- * printins/e-contact-print-style-editor.c
- (e_contact_print_stule_editor_destroy): Chain. Prevent double unref.
-
-2003-08-07 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-vcard.c (e_vcard_to_string_vcard_21): new,
- unimplemented, function.
- (e_vcard_to_string_vcard_30): move the 3.0 vcard export code here.
- (e_vcard_to_string): call e_vcard_to_string_vcard_21 or
- e_vcard_to_string_vcard_30 based on @format.
- (e_vcard_attribute_remove_values): new function.
-
- * backend/ebook/e-vcard.h: add @format to e_vcard_to_string, and
- add prototype for e_vcard_attribute_remove_values. also, add
- prototype for e_vcard_decode_b_encoding.
-
-2003-08-07 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-book-listener.c
- (impl_BookListener_respond_open_book): remove the book arg.
-
- * backend/ebook/e-book-listener.h (struct _EBookListenerResponse):
- remove the corba book.
-
- * backend/ebook/e-book-async.c (_get_book_view_dtor): free the
- query string.
- (e_book_async_get_book_view): dup the query string.
-
- * backend/ebook/e-book.h: change e_book_get_book_view and
- e_book_get_contacts to take a const char * query string instead of
- an EBookQuery.
-
- * backend/ebook/e-book.c (e_book_add_contact): pass
- EVC_FORMAT_VCARD_30 to e_vcard_to_string.
- (e_book_commit_contact): same.
- (e_book_get_book_view): take a const char* query string instead of
- an EBookQuery.
- (e_book_get_contacts): same.
- (e_book_response_open): track change - the Book is no longer
- communicated back here.
- (listener_cb): nuke.
- (e_book_handle_response): track change to e_book_response_open.
- (e_book_load_uri): rework this from using BookFactory::openBook to
- BookFactory::getBook + Book::open.
- (e_book_get_uri): new function, reimplement from old api.
- (e_book_get_static_capabilities): same.
- (e_book_check_static_capability): same.
- (startup_mainloop): new function, run bonobo_main.
- (e_book_activate): start up a thread with startup_mainloop as the
- start func.
- (e_book_new): call e_book_activate.
-
- * backend/idl/addressbook.idl: Add Book::open, remove the Book
- from notifyBookOpened's args, and change BookFactory::openBook to
- BookFactory::getBook.
-
- * backend/pas/pas-backend-file.c (pas_backend_file_load_uri): add
- only_if_exists - stop using the "create-initial" special file.
-
- * backend/pas/pas-backend-vcf.c (pas_backend_vcf_load_uri): add
- only_if_exists - stop using the "create-initial" special file.
-
- * backend/pas/pas-backend.c (pas_backend_load_uri): add
- @only_if_exists, and pass it along to the virtual method.
- (pas_backend_open): new function, lock the mutex so only one
- PASBook can actually call load_uri. call load_uri with
- pas_book_get_uri, and req->only_if_exists.
- (pas_backend_handle_request): rename process_client_request to
- this, and expose it publicly. Also add a case statement for
- "Open".
- (real_add_client): gut this function, we don't need to create the
- book anymore, just add the client to the list and do the weak
- ref/ORBit small stuff.
- (pas_backend_add_client): track change to signature - BookListener
- -> PASBook.
- (pas_backend_init): init open_mutex.
- (pas_backend_dispose): free open_mutex.
-
- * backend/pas/pas-backend.h (PASBackendClass): add @only_if_exists
- to the load_uri virtual method, and change the add_client virtual
- method to take a PASBook instead of a BookListener. add the same
- args to _load_uri and add_client. Also, add prototypes for
- pas_backend_handle_request and pas_backend_open.
-
- * backend/pas/pas-book-factory.c
- (_pas_book_factory_send_open_book_response): nuke.
- (pas_book_factory_launch_backend): just return NULL, don't call
- _pas_book_factory_send_open_book_response, in the error case.
- (start_backend): nuke
- (impl_GNOME_Evolution_Addressbook_BookFactory_getBook): rename
- _openBook to this. clean up the code a bit. Create the PASBook
- here, and always track change to pas_backend_add_client's type (we
- pass the book now, not the listener).
- (pas_book_factory_class_init): openBook -> getBook.
-
- * backend/pas/pas-book.c
- (impl_GNOME_Evolution_Addressbook_Book_open): new function, call
- pas_backend_open.
- (impl_GNOME_Evolution_Addressbook_Book_getVCard): get rid of the
- signal crap, just call pas_backend_handle_request.
- (impl_GNOME_Evolution_Addressbook_Book_getCardList): same.
- (impl_GNOME_Evolution_Addressbook_Book_authenticateUser): same.
- (impl_GNOME_Evolution_Addressbook_Book_addCard): same.
- (impl_GNOME_Evolution_Addressbook_Book_removeCards): same.
- (impl_GNOME_Evolution_Addressbook_Book_modifyCard): same.
- (impl_GNOME_Evolution_Addressbook_Book_getChanges): same.
- (impl_GNOME_Evolution_Addressbook_Book_getSupportedFields): same.
- (impl_GNOME_Evolution_Addressbook_Book_getSupportedAuthMethods):
- same.
- (impl_GNOME_Evolution_Addressbook_Book_cancelOperation): same.
- (pas_book_get_backend): aggregate some g_return_if_fail's.
- (pas_book_get_listener): new function.
- (pas_book_get_uri): new function.
- (pas_book_respond_open): just call BookListener::notifyBookOpened.
- (pas_book_construct): add @uri, and g_strdup it.
- (pas_book_new): add @uri, and pass it to pas_book_construct.
- (pas_book_class_init): remove the "request" signal stuff, and fill
- in epv->open.
-
- * backend/pas/pas-book.h: add PASOpenRequest struct/enum entry.
- Also, add @uri to the pas_book_new args, and add a prototype for
- pas_book_get_uri. Also, remove the "request" signal.
-
-2003-08-07 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-book-factory.c
- (pas_book_factory_get_n_backends): lock map_mutex around hash
- table work.
- (pas_book_factory_dump_active_backends): same.
- (backend_last_client_gone_cb): same.
- (_pas_book_factory_send_open_book_response): track CallStatus idl
- change.
- (start_backend): simplify this greatly, since the factory is
- tagged with HINT_PER_THREAD.
- (impl_GNOME_Evolution_Addressbook_BookFactory_openBook): lock
- around hash table.
- (pas_book_factory_init): initialize map_mutex.
- (pas_book_factory_dispose): free map_mutex.
-
-2003-08-06 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-file.c
- (pas_backend_file_book_view_copy): nuke.
- (pas_backend_file_book_view_free): same.
- (view_destroy): same.
- (pas_backend_file_changes): #if notyet
- (do_create): e-card -> e-contact.
- (pas_backend_file_process_create_card): remove view handling from
- here.
- (pas_backend_file_process_remove_cards): same.
- (pas_backend_file_process_modify_card): convert to e-contact, and
- remove view handling.
- (pas_backend_file_get_book_view): nuke.
- (pas_backend_file_process_get_supported_fields): e-card-simple ->
- e-contact.
- (pas_backend_file_upgrade_db): e-card -> e-contact.
- (pas_backend_file_cancel_operation): implement, just return
- CouldNotCancel.
- (pas_backend_file_class_init): assign cancel_operation, and remove
- get_book_view assignment.
- (pas_backend_file_init): remove book_views assignment.
-
-2003-08-06 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-vcf.c (pas_backend_vcf_book_view_copy):
- nuke.
- (pas_backend_vcf_book_view_free): same.
- (view_destroy): same.
- (insert_contact): new function, insert the contact into our hash
- table.
- (load_file): reimplement without the e_card stuff.
- (foreach_build_list): e_card -> e_contact.
- (save_file): mostly reimplement in terms of e-contact. more error
- case work needs doing.
- (do_create): e-card -> e-contact.
- (pas_backend_vcf_process_create_card): remove the view handling
- from here.
- (pas_backend_vcf_process_remove_cards): implement this, just
- remove it from the hash table and set ourselves to dirty.
- (pas_backend_vcf_process_modify_card): remove the view handling
- from here.
- (pas_backend_vcf_process_get_book_view): nuke.
- (pas_backend_vcf_process_get_supported_fields): reimplement in
- terms of e-contact.
- (INITIAL_VCARD): add in a FN attribute, and remove the quoted
- printable encoding.
- (pas_backend_vcf_cancel_operation): implement, just always return
- CouldNotCancel.
- (pas_backend_vcf_class_init): fill in cancel_operation, and remove
- get_book_view_sync.
- (pas_backend_vcf_init): remove book_views handling.
-
- * backend/pas/pas-backend-vcf.h: update copyright.
-
-2003-08-06 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-sync.c (pas_backend_sync_remove_cards):
- add out param @ids, so we can call pas_book_respond_remove
- properly.
- (_pas_backend_remove_cards): the other half of the change - pass
- the ids on to pas_book_response_remove.
- (pas_backend_sync_modify_card): add out param @old_vcard so we can
- call pas_book_respond_modify properly.
- (_pas_backend_modify_card): the other half of the change, pass the
- old_vcard on to pas_book_respond_modify.
- (pas_backend_sync_get_book_view): nuke.
- (pas_backend_sync_get_changes): track change (book view -> GList)
- (_pas_backend_is_threaded): nuke.
- (_pas_backend_create_card): indent.
- (_pas_backend_remove_cards): same.
- (_pas_backend_modify_card): same.
- (_pas_backend_get_card_list): same.
- (_pas_backend_get_changes): same.
- (_pas_backend_authenticate_user): same.
- (_pas_backend_get_supported_fields): same.
- (_pas_backend_get_supported_auth_methods): same.
- (_pas_backend_get_book_view): nuke.
- (pas_backend_sync_class_init): remove assignment to is_threaded
- and get_book_view.
-
- * backend/pas/pas-backend-sync.h: add out-params @ids to
- remove_cards_sync, @old_vcard to modify_card_sync.
- get_changes_sync's out-param is a GList instead of a book view,
- and remove get_book_view_sync.
-
- * backend/pas/pas-backend.c (pas_backend_get_book_view): nuke.
- (pas_backend_is_threaded): nuke.
- (pas_backend_start_threaded): nuke.
- (pas_backend_init): initialize priv->views.
- (pas_backend_dispose): free priv->views.
- (pas_backend_get_book_views): new function, return priv->views.
-
- * backend/pas/pas-backend.h: remove the get_book_view virtual
- method, and the pas_backend_get_book_view prototype. Also, track
- the CallStatus change, and add a cancel_operation virtual method
- and prototype, and add pas_backend_get_book_views function, so the
- PASBook's can get ahold of the list.
-
- * backend/pas/pas-book-view.h: track collapsing of
- Addressbook::BookListenerCallStatus and
- Addressbook::BookView::CallStatus enums into
- Addressbook::CallStatus.
-
- * backend/pas/pas-book-view.c: same.
-
- * backend/pas/pas-card-cursor.[ch]: nuke
-
- * backend/pas/pas-book.c: track collapsing of
- Addressbook::BookListenerCallStatus and
- Addressbook::BookView::CallStatus enums into
- Addressbook::CallStatus.
- (impl_GNOME_Evolution_Addressbook_Book_getBookView): implement
- this all here, instead of farming it out to the backends.
- (impl_GNOME_Evolution_Addressbook_Book_getChanges): track change
- to signature. this is no longer a book view, it'll return an
- actual list.
- (impl_GNOME_Evolution_Addressbook_Book_cancelOperation): new
- function, implement.
- (pas_book_respond_create): iterate over the views, notifying them
- if the new card matches their query.
- (pas_book_respond_remove): iterate over the views, telling them to
- delete the card matching the id.
- (pas_book_respond_modify): iterate over the views, notifying them
- if they need to change/add/remove that card.
- (view_destroy): move this here from the backends.
- (pas_book_respond_get_book_view): weak-ref the book view.
- (pas_book_new): remove the is_threaded switch on POA hints, and
- always use PER_REQUEST.
- (pas_book_class_init): fill in cancelOperation.
-
- * backend/pas/pas-book.h: track collapsing of
- Addressbook::BookListenerCallStatus and
- Addressbook::BookView::CallStatus enums into
- Addressbook::CallStatus.
-
-2003-08-01 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-book-async.c: mostly finished.
-
-2003-08-01 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-book-async.[ch]: new files, create async methods
- similar to the old ebook api that use GThread/GAsyncQueue to
- simulate the old async behavior.
-
-2003-07-29 Chris Toshok <toshok@ximian.com>
-
- * backend/idl/addressbook.idl: collapse
- Addressbook::BookListenerCallStatus and
- Addressbook::BookView::CallStatus enums into
- Addressbook::CallStatus.
-
-2003-07-29 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-book-types.h: add EBookChangeType/EBookChange.
-
-2003-07-29 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-book-view-listener.c: track collapsing of
- Addressbook::BookListenerCallStatus and
- Addressbook::BookView::CallStatus enums into
- Addressbook::CallStatus.
-
- * backend/ebook/e-book-listener.c track collapsing of
- Addressbook::BookListenerCallStatus and
- Addressbook::BookView::CallStatus enums into
- Addressbook::CallStatus.
- (response_free): nuked
- (e_book_listener_check_queue): nuked
- (e_book_listener_queue_response): nuked
- (e_book_listener_queue_progress): nuked
- (e_book_listener_queue_get_view_response): nuked
- (e_book_listener_queue_get_changes_response): nuked
- (e_book_listener_queue_writable_status): nuked
- (e_book_listener_queue_authentication_response): nuked
- (e_book_listener_queue_get_supported_fields_response): nuked
- (e_book_listener_queue_get_supported_auth_methods_response): nuked
- (e_book_listener_dispose): nuked
-
- * backend/ebook/e-book-listener.h: remove prototypes for
- check_pending and pop_response.
-
- * backend/ebook/e-book.c (e_book_get_changes): new function.
- implement this as more of a getCardList type function, instead of
- getBookView.
- (e_book_response_get_changes): new function.
- (e_book_free_change_list): new function.
-
- * backend/ebook/e-book.h: add prototype for
- e_book_free_change_list.
-
-2003-07-23 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-book.c (e_book_get_book_view): new function,
- implement this.
- (e_book_response_get_book_view): same.
- (e_book_get_contacts): remove the op so we don't see BUSY after
- this request.
- (e_book_handle_response): unifdef a few things.
- (e_book_unload_uri): fix the assertion about URI_NOT_LOADED, and
- unifdef some code.
- (e_book_dispose): fix a typo.
-
- * backend/ebook/e-book-view.c (e_book_view_handle_response):
- rename _check_listener_queue to this. we don't need to pop the
- response either, it's passed as an arg.
- (e_book_view_construct): "response_queued" -> "response"
- (e_book_view_start): new function, call BookView.start.
- (e_book_view_dispose): track the signal id change.
-
- * backend/ebook/e-book-view.h: add prototype for
- e_book_view_start.
-
- * backend/ebook/e-book-view-listener.c
- (e_book_view_listener_check_queue): remove.
- (e_book_view_listener_queue_response): just emit the signal.
- (impl_BookViewListener_notify_card_added): spew.
- (impl_BookViewListener_notify_card_changed): spew.
- (impl_BookViewListener_notify_sequence_complete): spew.
- (impl_BookViewListener_notify_progress): spew.
- (e_book_view_listener_check_pending): remove
- (e_book_view_listener_check_pop_response): remove
- (e_book_view_listener_new): use the ALL_AT_IDLE poa policy.
- (e_book_view_listener_init): remove the queue/timeout stuff.
- (e_book_view_listener_dispose): remove the queue/timeout stuff.
-
- * backend/ebook/e-book-view-listener.h: remove _check_pending and
- _pop_response.
-
-2003-07-23 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-file.c (do_summary_query): remove the
- completion_search argument, and remove the aggregating stuff.
- just call pas_book_view_notify_add_1.
- (pas_backend_file_book_view_copy): remove card_sexp crap.
- (pas_backend_file_book_view_free): same.
- (get_length): remove
- (get_nth): remove
- (cursor_destroy): remove
- (vcard_matches_search): remove
- (ecard_matches_search): remove
- (pas_backend_file_search_timeout): remove the aggregating stuff.
- just call pas_book_view_notify_add_1.
- (pas_backend_file_search): simplify this a bunch.
- (do_create): use pas_book_view_vcard_matches.
- (pas_backend_file_process_get_card_list): add some more error
- checks.
- (pas_backend_file_process_get_book_view): unifdef this, and
- implement it.
- (pas_backend_file_start_book_view): kick off the search.
- (pas_backend_file_get_uri): remove.
- (pas_backend_file_class_init): remove get_uri, add
- start_book_view.
-
- * backend/pas/pas-backend-ldap.c (view_destroy): don't need to
- unref the card_sexp, as the PASBookView owns it now.
- (create_card_handler): use pas_book_view_vcard_matches.
- (modify_card_modify_handler): same.
- (ldap_get_view): initialize the view properly.
- (pas_backend_ldap_get_uri): remove.
- (pas_backend_ldap_class_init): remove the get_uri assignment.
-
- * backend/pas/pas-backend-sync.c (_pas_backend_get_card_list):
- don't free this, it's freed in the pas_book code.
-
- * backend/pas/pas-backend-sync.h: make use of pas-types.h and
- remove some typedefs.
-
- * backend/pas/pas-backend-summary.h: same.
-
- * backend/pas/pas-backend-card-sexp.h: same.
-
-2003-07-23 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-book.c
- (impl_GNOME_Evolution_Addressbook_Book_getBookView): spew.
- (pas_book_respond_create): unifdef this.
- (pas_book_respond_remove): same.
- (pas_book_respond_modify): same.
- (pas_book_respond_authenticate_user): same.
- (pas_book_respond_get_supported_fields): unref the iterator.
- (pas_book_respond_get_book_view): unifdef, and add spew.
-
- * backend/pas/pas-book.h: make use of pas-types.h and remove some
- typedefs.
-
-2003-07-23 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-types.h: new file, all the typedefs shared
- between files here.
-
-2003-07-23 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-book-view.c (send_pending_adds): abstract all
- the aggregating code to the book view. backends just call
- notify_card_added and the superclass does all the aggregating.
- (pas_book_view_notify_change): if there are pending adds, send
- them before we send the change.
- (pas_book_view_notify_remove): same.
- (pas_book_view_notify_add): the other part of the aggregating
- code.
- (pas_book_view_notify_complete): send pending adds if there are
- any.
- (impl_GNOME_Evolution_Addressbook_BookView_start): new function,
- call pas_backend_start_book_view.
- (pas_book_view_get_card_query): new function.
- (pas_book_view_get_card_sexp): new function.
- (pas_book_view_get_backend): new function.
-
- * backend/pas/pas-book-view.h: add a PASBackend arg to the
- constructor, as well as the char* query and PASBackendCardSExp
- form. also add accessors for card_query, card_sexp, and backend.
-
- * backend/idl/addressbook.idl
- (GNOME::Evolution::Addressbook::BookView): add start() method.
- (GNOME::Evolution::Addressbook::BookListener): remove the oneway
- tag from notifyBookOpened, notifyViewRequested, and
- notifyChangesRequested so the call doesn't return until the remote
- object has gotten the method call.
-
- * backend/pas/pas-backend.c (pas_backend_load_uri): fill in the
- uri slot if the load was successful.
- (pas_backend_get_uri): return the uri, remove the virtual method
- call.
- (pas_backend_start_book_view): new function.
- (process_client_request): ifdef out the threaded foo, since i'm
- not certain it's at all necessary.
- (real_add_client): remove the bonobo_object_unref of the book,
- since it's immortal.
- (pas_backend_dispose): free the uri.
-
- * backend/pas/pas-backend.h: remove the get_uri virtual method,
- and add the start_book_view virtual method and
- pas_backend_start_book_view prototype.
-
-2003-07-23 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/Makefile.am (libpasvcf_a_SOURCES): new.
- (noinst_LIBRARIES): add libpasvcf.a
-
- * backend/pas/pas-backend-vcf.[ch]: new files, implement a vcard
- file backend. the backend api still needs a little work, but it's
- getting easier to write backends.
-
-2003-07-23 Chris Toshok <toshok@ximian.com>
-
- * printing/e-contact-print.c (e_contact_print_response): deal with
- "uses_list". Fixes #30839.
- (e_contact_print_dialog_new): use GINT_TO_POINTER instead of
- casting to void*, and set "uses_list" to FALSE.
- (e_contact_print_card_dialog_new): same.
- (e_contact_print_card_list_dialog_new): same, but set "uses_list"
- to TRUE.
-
-2003-07-23 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-book.c (e_book_dispose): fix a typo.
-
-2003-07-22 Akira TAGOH <tagoh@redhat.com>
-
- * printing/e-contact-print-envelope.c (ecpe_print): Use 'Sans'
- instead of 'Helvetica' for the font name.
- * printing/e-contact-print.c (e_contact_build_style): Likewise.
-
-2003-07-23 Dan Winship <danw@ximian.com>
-
- * backend/ebook/Makefile.am: use EVO_MARSHAL_RULE
- * backend/pas/Makefile.am: Likewise
- * gui/component/select-names/Makefile.am: Likewise
- * gui/contact-editor/Makefile.am: Likewise
- * gui/contact-list-editor/Makefile.am: Likewise
- * gui/widgets/Makefile.am: Likewise
-
- * gui/contact-editor/e-contact-editor.c
- (e_contact_editor_class_init):
- s/ece_marshal/e_contact_editor_marshal/
-
- * gui/contact-list-editor/e-contact-list-editor.c
- (e_contact_list_editor_class_init): Likewise for ecle_marshal
-
- * gui/search/e-addressbook-search-dialog.c
- (e_addressbook_search_dialog_init): Remove gtk_window_set_policy
- call since that function is deprecated and it was just setting
- everything to the default values anyway.
-
- * gui/widgets/e-addressbook-util.c: #include gal/util/e-util.h for
- e_free_object_list.
-
-2003-07-22 Dan Winship <danw@ximian.com>
-
- * backend/ebook/e-card.c: (e_card_new,
- e_card_new_with_default_charset): Make the "vcard" arg const.
- ...: add lots and lots of other consts as a side effect
-
-2003-06-30 Dan Winship <danw@ximian.com>
-
- * gui/widgets/e-addressbook-view.c (e_addressbook_view_dispose):
- disconnect from model signals to prevent a race condition at
- shutdown where the view gets destroyed and then the model notices
- the backend dying before being destroyed itself.
-
- * gui/widgets/e-addressbook-reflow-adapter.c
- (addressbook_finalize): add, to free priv.
- (e_addressbook_reflow_adapter_class_init): set it up
-
- * gui/component/e-address-popup.c (e_address_popup_set_free_form):
- Don't leak strings
-
- * gui/component/addressbook-storage.c (load_source_data): don't
- leak xml data.
-
- * gui/component/addressbook-component.c (new_item_cb): don't leak
- the new card.
-
-2003-06-25 Gilbert Fang <gilbert.fang@sun.com>
-
- * gui/widgets/e-minicard-view-widget.c
- (e_minicard_view_widget_real_focus_in_event): new function,
- override the event handler for focus_in_event, set the first item
- be focused if no focused item at all. Fixes bug 41826.
-
-2003-06-18 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-editor/e-contact-editor.c (fill_in_field): in the
- EUrlEntry case just reassign widget. it'll be handled by the
- GtkEditable code below. Fixes #43841.
-
-2003-06-14 Larry Ewing <lewing@ximian.com>
-
- * gui/backend/ebook/e-card-simple.c:
- * gui/backend/ebook/e-card.c:
- * gui/backend/ebook/evolution-ldif-importer.c:
- * gui/backend/ebook/load-pine-addressbook.c:
- * gui/backend/ebook/test-card.c:
- * gui/backend/pas/pas-backend-card-sexp.c:
- * gui/backend/pas/pas-backend-ldap.c: Fix lots of leaks, update
- for correct use of g_object_get. Some cleanups.
-
-2003-06-13 Larry Ewing <lewing@ximian.com>
-
- * gui/component/addressbook.c:
- * gui/component/e-cardlist-model.c:
- * gui/component/select-names/e-select-names-text-model.c:
- * gui/contact-editor/e-contact-editor.c:
- * gui/contact-editor/e-contact-save-as.c:
- * gui/contact-list-editor/e-contact-list-editor.c:
- * gui/widgets/e-addressbook-table-adapter.c:
- * gui/widgets/e-addressbook-util.c:
- * gui/widgets/e-addressbook-view.c:
- * gui/widgets/e-minicard-view.c:
- * gui/widgets/e-minicard.c: Fix lots of leaks, update for correct
- use of g_object_get. Some misc cleanups.
-
- * printing/e-contact-print.c: update for correct use of
- g_object_get.
-
-2003-06-05 Not Zed <NotZed@Ximian.com>
-
- ** For #42691.
-
- * gui/component/select-names/Makefile.am (%.server.in): implicit
- rule for .in file.
- (BUILT_SOURCES): added server_DATA.
-
- * gui/component/Makefile.am (%.server.in): use implicit rule for
- .in file.
- (BUILT_SOURCES): added, just server_DATA.
- (CLEANFILES): added
-
- * backend/ebook/Makefile.am (BUILT_SOURCES): add server_DATA.
-
-2003-06-04 Rodrigo Moya <rodrigo@ximian.com>
-
- * backend/ebook/ebook.c (e_book_do_response_open): adapted to
- changes in EComponentListener API.
-
-** See ChangeLog.pre-1-4 for older changes
-
diff --git a/addressbook/ChangeLog.pre-1-4 b/addressbook/ChangeLog.pre-1-4
deleted file mode 100644
index b1c12cb82f..0000000000
--- a/addressbook/ChangeLog.pre-1-4
+++ /dev/null
@@ -1,16758 +0,0 @@
-2003-05-19 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (func_beginswith): use the more
- convoluted (but more correct) query if evolutionPerson is
- supported. Fixes #42825.
-
-2003-05-19 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-destination.c (use_default_book_cb): handle the
- case where @book == NULL, which can happen if there was a problem
- opening the default book. Should fix #43005.
-
-2003-05-19 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook-component.c
- (ensure_completion_uris_exist): fix the initial run case. the
- config upgrade code creates all elements so we can't just check
- for NULL - we have to check if the string is empty. Fixes #43213.
-
-2003-05-19 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-minicard-label.c (set_colors): if we've got focus,
- set the background of the rect to bg[NORMAL], and the fill color
- of the text and label to text[NORMAL]. This will make the
- background a different color than the canvas, but won't make it
- use the selected background. fixes #42472
-
-2003-05-19 Chris Toshok <toshok@ximian.com>
-
- * gui/merging/e-card-merging.c (e_card_merging_book_commit_card):
- add a g_object_ref(card), to match the one in
- e_card_merging_book_add_card. Fixes #43175.
-
-2003-05-19 Anna Marie Dirks <anna@ximian.com>
-
- * gui/contact-editor/e-contact-quick-add.c: Added HIG-appropriate
- HIG-appropriate spacing, padding, accelerators. Fixes bug #41210
-
- * gui/component/ldap-config.glade: HIG-ified the various dialogs
- (including the settings pages, the config druid, and the edit dialog)
- in this glade file. This fixes bugs #41140, #41137, #41130
-
- * gui/merging/e-card-merging-book-commit-duplicate-detected.glade:
- Changed button order, and added HIG-appropriate spacing/padding.
- Fixes bug #41232.
-
- * gui/merging/e-card-duplicate-detected.glade: Changed button
- order, and added HIG-appropriate spacing/padding. Fixes bug
- #41229 and #41231.
-
-2003-05-19 Sean Gao <sean.gao@sun.com>
-
- * gui/component/addressbook-component.c (xfer_folder): remove the
- summary if @remove_source is TRUE. Fixes 38084.
-
-2003-05-16 Anna Marie Dirks <anna@ximian.com>
-
- * gui/contact-list-editor/contact-list-editor.glade: Added
- HIG-appropriate spacing, padding, capitalization and accelerators.
- Fixes bug #41254
-
-2003-05-16 Anna Marie Dirks <anna@ximian.com>
-
- * gui/contact-editor/fulladdr.glade: Added HIG-appropriate
- spacing, padding, capitalization and accelerators. Fixes bug #41251
-2003-05-14 Anna Marie Dirks <anna@ximian.com>
-
- * gui/contact-editor/fullname.glade: Added HIG-appropriate
- spacing, padding, caps, title and accelerators. Fixes bug #41249,
- and also bug #41250..
-
-2003-05-16 Anna Marie Dirks <anna@ximian.com>
-
- * gui/contact-editor/contact-editor.glade: Added HIG-appropriate
- spacing, padding, capitalization and accelerators. Fixes bug #41248.
-
-
-2003-05-16 Rodney Dawes <dobey@ximian.com>
-
- * addressbook/backend/ebook/Makefile.am: Move the tools to a
- more appropriate directory, privlibexecdir
-
-2003-05-15 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook.c (book_open_cb): backing out a tiny
- porting of jpr's fix - we need to set the book on the
- EAddressbookView, or else it won't do queries, and it won't show
- any cards. Fixes #43023, #43090.
-
-2003-05-15 Chris Toshok <toshok@ximian.com>
-
- * gui/merging/e-card-merging.c (free_lookup): new function, split
- out the duplicated teardown code from final_cb and final_id_cb.
- also, unref the card.
- (final_id_cb): call free_lookup.
- (final_cb): same.
- (e_card_merging_book_add_card): ref the card. fixes bug #43016.
-
-2003-05-14 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-editor/e-contact-editor.c (full_addr_clicked):
- replace the text_buffer_delete/text_buffer_insert with
- set_buffer_set_text. call widget_changed if they clicked OK, so
- we actually mark the dialog changed.
- (fill_in_field): make this handle GtkTextViews, because for some
- reason that escapes rational thought GtkTextView's don't implement
- GtkEditable. fixes #42606.
- (extract_field): same.
-
-2003-05-14 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-minicard-label.c (e_minicard_label_reflow): set
- the clip_height on reflow so the name of the field is as high as
- the field's value. makes it possible to click anywhere to the
- left of a tall field (like an address) and have it select the
- field. Fixes #42625.
-
-2003-05-14 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-editor/e-contact-editor.c (address_mailing_changed):
- handle the case where we haven't filled in the address yet. fixes
- #42620.
-
-2003-05-14 JP Rosevear <jpr@ximian.com>
-
- * gui/component/addressbook.c (addressbook_view_unref): clear the
- view
- (book_open_cb): track the book in the view, don't unref the book
- (set_prop): set the book
- (retrieve_shell_view_interface_from_control): get the shell view
- every time
- (set_folder_bar_label): release and unref the shell view
-
- * gui/component/addressbook-storage.h: add proto
-
- * gui/component/addressbook-storage.c
- (addressbook_storage_cleanup): unref the storage
-
- * gui/component/addressbook-component.c (owner_unset_cb): clean up
- storage
-
- * backend/ebook/e-book.c (e_book_load_uri): track the listener
- signal
- (e_book_dispose): unref the listener and disconnect the signal
-
-2003-05-13 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names-text-model.c
- (e_select_names_text_model_set_separator): strlen ->
- g_utf8_strlen.
- (e_select_names_text_model_insert): same.
- (e_select_names_text_model_insert_length): big change, make this
- work with multibyte utf8.
- (e_select_names_text_model_delete): same. this could possibly use
- a tighter loop + a memmove, but this works.
-
- * gui/component/select-names/e-select-names-model.c
- (e_select_names_model_get_textification): make sure our truncation
- to MAX_LENGTH characters uses utf8 characters, not bytes.
- (e_select_names_model_name_pos): track e-text-model change.
- pos/length are now in utf8 character terms, so use g_utf8_strlen
- instead of strlen.
- (e_select_names_model_text_pos): same.
-
-2003-05-13 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-addressbook-table-adapter.c (addressbook_dispose):
- rename addressbook_destroy to this, and guard against multiple
- calls.
- (e_addressbook_table_adapter_class_init): GtkObject -> GObject,
- and destroy -> dispose.
- (e_addressbook_table_adapter_init): GtkObject -> GObject.
-
-2003-05-12 Sean Gao <sean.gao@sun.com>
-
- * gui/contact-list-editor/e-contact-list-editor.c
- (e_contact_list_editor_init): terminate g_build_filename with
- NULL.
-
-2003-05-11 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #42048 ]
- * gui/widgets/e-addressbook-view.c (e_contact_print_button):
- button => response.
- (e_addressbook_view_print): connect to "response", not "clicked".
-
-2003-05-11 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #41245 ]
- * gui/component/select-names/select-names.glade: fix
- spacing/border widths as per HIG.
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_init): set the border width/spacing on widgets we
- create here.
-
-2003-05-09 Jeremy Katz <katzj@redhat.com>
-
- * printing/e-contact-print.c (e_contact_print_response): Use glib
- macro to case from pointer to int.
-
- * printing/e-contact-print-envelope.c: Add missing #include.
-
- * gui/component/select-names/e-select-names-completion.c
- (e_select_names_completion_start_query): Use
- E_SELECT_NAMES_COMPLETION to avoid warning
-
-2003-05-06 Chris Toshok <toshok@ximian.com>
-
- [ really commit this, fixes bug #41910 ]
- * gui/contact-list-editor/e-contact-list-model.c
- (e_contact_list_model_remove_row): change from model_changed to
- row_deleted here. model_changed causes the table to free its
- ETableSelection, which is what we iterate over when deleting
- contacts.
- (e_contact_list_model_add_destination): no need to be calling
- model_changed here either.
-
-2003-04-29 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #41255 ]
- * gui/contact-list-editor/contact-list-editor.glade: use stock
- buttons for Add/Remove.
-
-2003-04-29 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #41144 ]
- * gui/component/ldap-config.glade: use stock buttons for the
- Add/Delete buttons. Switch from "Delete" to "Remove", though, as
- "Remove" fits much better with the one for "Add". Also, add our
- stock-edit-24.png icon for "Edit".
-
-2003-04-29 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #41211 ]
- * gui/component/e-address-popup.c (e_address_popup_no_matches):
- call e_button_new_with_stock_icon to create our button and give it
- the right icon.
-
-2003-04-29 Gilbert Fang <gilbert.fang@sun.com>
-
- * tools/evolution-addressbook-export-list-cards.c
- (set_pre_defined_field): remove duplicate HOME_COUNTRY field add.
-
-2003-04-28 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #41843]
- * tools/evolution-addressbook-export-list-cards.c
- (e_card_simple_csv_get_name): use e_card_simple_get_ecard_field
- instead of e_card_simple_get_name, so the return value won't be
- localized.
-
-2003-04-28 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #41779 ]
- * gui/component/e-address-popup.c (mini_wizard_container_add): we
- don't need to call gtk_widget_destroy on the old child, since
- gtk_container_remove will unref it for us.
-
-2003-04-23 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #37351 ]
- * gui/widgets/e-addressbook-view.c (table_drag_data_get): the row
- the signal is called with is already the model row, not the view
- row, so don't call e_table_view_to_model_row on it.
-
-2003-04-23 Chris Toshok <toshok@ximian.com>
-
- [ either mostly or entirely fixes #33708 ]
- * gui/component/select-names/e-select-names-completion.c
- (e_select_names_completion_done): new function, factor it out of
- _seq_complete_cb because we need to run the same code in a couple
- of places.
- (e_select_names_completion_got_book_view_cb): treat an error from
- a book as getting a "sequence_complete", and decrement the count
- of pending complete signals.
- (e_select_names_completion_got_book_view_cb): remove the increment
- of pending_completion_seq from here.
- (e_select_names_completion_seq_complete_cb): factor out the body
- of e_select_names_completion_done from here, and call it.
- (e_select_names_completion_start_query): increment
- pending_completion_seq here. remove the async variable, as we can
- now use pending_completion_seq for that purpose (it's > 0 iff
- async would have been TRUE).
-
-2003-04-19 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #40954 ]
- * backend/pas/pas-backend-file.c (pas_backend_file_dispose): guard
- against NULL bf->priv->summary (happens if the initial load_uri
- failed).
- (pas_backend_file_load_uri): always set bf->priv->uri, since it's
- used in _get_uri, which is called when the backend goes away.
- This only happened before if you tried to load a folder that
- didn't exist.
-
-2003-04-19 Chris Toshok <toshok@ximian.com>
-
- [ fixes #40694 ]
- * gui/component/select-names/e-select-names-bonobo.c
- (control_activate_cb): just grab focus if @activate == TRUE.
- we'll do all merging/unmerging in the focus handler.
- (widget_focus_cb): handle the merging here.
- (e_bonobo_control_automerge_ui): store off the widget (so we can
- grab focus on it) and connect to "activate".
-
-2003-04-18 Rodney Dawes <dobey@ximian.com>
-
- * gui/component/select-names/Makefile.am: Add missing -DPREFIX
-
-2003-04-18 Rodney Dawes <dobey@ximian.com>
-
- [ fixes #21499 ]
- * gui/component/Makefile.am:
- * gui/component/addressbook.c:
- * gui/component/select-names/e-select-names-bonobo.c:
- * gui/contact-editor/Makefile.am:
- * gui/contact-editor/e-contact-editor.c:
- * gui/contact-list-editor/Makefile.am:
- * gui/contact-list-editor/e-contact-list-editor.c:
- Use PREFIX instead of EVOLUTION_DATADIR for bonobo_ui_util_set_ui ()
-
-2003-04-15 Chris Toshok <toshok@ximian.com>
-
- [ fixes #41252 ]
- * gui/contact-editor/fulladdr.glade: change title from "Check
- Address" to "Full Address".
-
-2003-04-09 Chris Toshok <toshok@ximian.com>
-
- [ fixes #40727 ]
- * gui/component/select-names/e-select-names-completion.c
- (e_select_names_completion_start_query): if the query text is
- either shorter than the cached query_text or they don't match,
- don't just set can_reuse_cached_cards to FALSE. we also need to
- invalidate the cache.
-
-2003-04-08 Ettore Perazzoli <ettore@ximian.com>
-
- * backend/ebook/e-destination.c (d): Remove all debugging
- messages.
-
-2003-04-08 Dan Winship <danw@ximian.com>
-
- * gui/component/ldap-config.glade: Remove color specifications
- from the druid so it will use theme colors.
-
- * gui/component/addressbook-config.c
- (addressbook_add_server_druid): Use g_signal_connect_after for
- "prepare" signal (to work around b.g.o 81869)
-
-2003-04-07 Chris Toshok <toshok@ximian.com>
-
- [ fixes #7103 ]
- * gui/widgets/e-minicard-label.c (e_minicard_label_class_init):
- init style_set. and add the signal.
- (e_minicard_label_realize): include e_minicard_label_construct's
- code here, and call set_colors after we create the sub-items.
- (e_minicard_label_unrealize): indent, and remove dead code.
- (e_minicard_label_event): indent, and call set_colors instead of
- setting the colors manually.
- (set_colors): new function, set our colors based on the current
- style.
- (e_minicard_label_style_set): new function, just call set_colors.
- (e_minicard_label_new): e_minicard_label_construct doesn't exist
- anymore.
-
- * gui/widgets/e-minicard-label.h (struct _EMinicardLabelClass):
- add style_set signal.
-
- * gui/widgets/e-minicard.c (set_selected): little tweaks in the
- coloring.
- (e_minicard_unrealize): reindent, and remove some unused code.
-
- * gui/widgets/e-minicard-view-widget.h (struct
- _EMinicardViewWidget): add background.
-
- * gui/widgets/e-minicard-view-widget.c
- (e_minicard_view_widget_class_init): init
- widget_class->style_class.
- (e_minicard_view_widget_style_set): new function, just set the
- background's fill_color_gdk to base[GTK_STATE_NORMAL].
- (e_minicard_view_widget_realize): store off the background canvas
- item so we can set the color later.
-
-2003-04-07 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #40901 ]
- * gui/component/ldap-config.glade: HIG-ify the ldap server edit
- dialog's button layout.
-
-2003-04-07 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #39763 ]
- * gui/component/select-names/e-select-names-bonobo.c (copy_cb):
- verb callback for EditCopy
- (cut_cb): verb callback for EditCut.
- (paste_cb): verb callback for EditPaste.
- (select_all_cb): verb callback for SelectAll.
- (free_closure): new function
- (merge_menu_items): same
- (unmerge_menu_items): same
- (control_set_frame_cb): same
- (control_activate_cb): same
- (widget_focus_cb): same
- (e_bonobo_control_automerge_ui): new function, sets up focus
- signals on the widget passed in to merge/unmerge the passed in
- ui/verbs.
- (impl_SelectNames_get_entry_for_section): call
- e_bonobo_control_automerge_ui for this entry.
-
-2003-04-07 Chris Toshok <toshok@ximian.com>
-
- * gui/component/e-address-popup.c (mini_wizard_new): change the
- ok/cancel button layout to be higified.
-
-2003-04-07 Chris Toshok <toshok@ximian.com>
-
- [ last portion of #40046 fix ]
- * gui/component/select-names/e-select-names-popup.c
- (remove_recipient_cb): ifdef this out to quiet the compiler.
- (remove_all_recipients_cb): same.
- (toggle_html_mail_cb): same.
- (populate_popup_card): change the #if 0 to #if
- TOO_MANY_MENU_ITEMS.
- (popup_menu_list): nuke, as it's handled by populate_popup_card.
- (populate_popup_nocard): rename popup_menu_nocard to this, and
- implement it as in populate_popup_card.
- (e_select_names_populate_popup): we don't need the card, since we
- don't check if it's a list here anymore. also, remove the #if 0
- surrounding the nocard case.
-
-2003-04-07 Not Zed <NotZed@Ximian.com>
-
- Fixes #40252.
-
- * conduit/address-conduit.c: Change the LOG macro to a
- single arg macro which copies its arg. Fix all callers. Change
- WARN and INFO to simply g_warning/g_message. Init G_LOG_DOMAIN
- before including anything.
-
-2003-04-07 Chris Toshok <toshok@ximian.com>
-
- * Makefile.am (SUBDIRS): add tools.
-
-2003-04-07 Gilbert Fang <gilbert.fang@sun.com>
-
- [ fixes bug #23036 ]
- * tools/evolution-addressbook-export.c,
- tools/evolution-addressbook-export-list-cards.c,
- tools/evolution-addressbook-export-list-folders.c: : new and
- improved export utility.
-
-2003-04-07 Dan Winship <danw@ximian.com>
-
- * gui/component/GNOME_Evolution_Addressbook.server.in.in: Clean up
- server names.
-
- * gui/component/select-names/GNOME_Evolution_Addressbook_SelectNames.server.in.in:
- Likewise
-
- * backend/ebook/GNOME_Evolution_Addressbook_LDIF_Importer.server.in.in:
- Likewise. Also mark the evolution:menu_name for i18n.
-
- * backend/ebook/GNOME_Evolution_Addressbook_VCard_Importer.server.in.in:
- Likewise
-
-2003-04-03 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-minicard-label.c (e_minicard_label_event): set
- "handle_popup" on the field to be TRUE if it's got focus, FALSE if
- not.
-
-2003-04-03 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-minicard-label.c (e_minicard_label_construct):
- doh, set the im_context on the field name too so we get the Input
- Method submenu in the contxt menu.
-
-2003-04-03 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-minicard-label.c (e_minicard_label_construct): set
- the im_context on the field's EText.
- (e_minicard_label_event): remove a huge swath of #if 0'd code.
-
-2003-04-03 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #40715 ]
- * gui/merging/e-card-merging.c (final_id_cb): add this callback,
- to unref the book/free the closure after calling the user's
- callback.
- (final_cb): same.
- (doit): use final{_id}_cb
- (cancelit): same.
- (response): don't free the lookup struct here.
- (match_query_callback): same.
- (e_card_merging_book_add_card): ref the book.
- (e_card_merging_book_commit_card): same.
-
- * gui/component/e-address-popup.c (card_picker_init): make sure to
- set the "text" attribute on the cell renderer so the text actually
- shows up. also, g_object_connect -> g_signal_connect *sigh*.
- Lastly, get rid of the scrolled window and just make the window
- size to show the text.
-
- * gui/widgets/e-minicard.c (e_minicard_style_set): only call
- set_selected if we're realized (we create all the canvas objects
- that set_selected manipulates in our realize method.)
-
-2003-04-03 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/Makefile.am (INCLUDES): add
- EVOLUTION_IMAGESDIR
-
-2003-04-02 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names-popup.c: change all
- this around so that we populate the existing popup. This means we
- get the select names popup stuff on top of the normal EEntry popup
- foo.
-
- * gui/component/select-names/e-select-names-popup.h
- (e_select_names_populate_popup): rename e_select_names_popup to
- this.
-
- * gui/component/select-names/e-select-names-manager.c
- (populate_popup_cb): rename popup_cb here, and
- e_select_names_popup -> e_select_names_populate_popup.
- (e_select_names_manager_entry_new): popup -> populate_popup.
-
-2003-04-02 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-addressbook-marshal.list: add NONE:OBJECT
-
- * gui/widgets/e-minicard.c (e_minicard_class_init): add style_set
- signal.
- (e_minicard_style_set): just call set_selected with the currently
- selected flag, so we recolor properly.
-
- * gui/widgets/e-minicard.h (struct _EMinicardClass): add style_set
- signal.
-
-2003-04-01 Rodrigo Moya <rodrigo@ximian.com>
-
- * backend/ebook/evolution-ldif-importer.c (load_file_fn):
- * backend/ebook/evolution-vcard-importer.c (load_file_fn): added
- "folder_type" parameter to EvolutionImporterLoadFileFn.
-
-2003-03-31 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-book-util.c (get_local_book_uri): new function,
- just return the local uri.
- (set_default_book_uri_local): use get_local_book_uri.
- (e_book_default_book_open): only try and reload the default book
- if it's not already the local book.
-
-2003-03-31 JP Rosevear <jpr@ximian.com>
-
- * conduit/address-conduit.c (card_removed): it emits a list now
-
-2003-03-31 Dan Winship <danw@ximian.com>
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_init): Remove folder-selector button
- initialization.
- (e_select_names_new): Initialize folder-selector button here,
- using the passed-in EvolutionShellClient rather than depending on
- a global variable.
-
- * gui/component/select-names/e-select-names-manager.c
- (e_select_names_manager_activate_dialog): take an
- EvolutionShellClient and pass it to e_select_names_new().
-
- * gui/component/select-names/e-select-names-bonobo.c
- (impl_SelectNames_activate_dialog): get a pointer to the shell
- from bonobo-activation, create a shell_client, and pass it to
- e_select_names_manager_activate_dialog.
-
- * backend/ebook/e-book-util.c (e_book_get_default_book_uri):
- constify return value
-
-2003-03-30 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-vcard.[ch]: braindead, and *extremely* forgiving
- vcard parser. not for public consumption yet.
-
-2003-03-30 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #39381 (again) ]
- * gui/component/e-address-popup.c (edit_contact_info_cb): add
- "GtkWidget *button" first arg, so we don't crash.
-
-2003-03-28 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #40403 ]
- * backend/ebook/e-card.c (e_card_get_vobject): revert the fix for
- 28945, as was done on the 1.2 branch. this is because the "fix"
- actually breaks internal use of contact lists. We need to make
- the exporting of contacts DTRT, instead of fixing it here.
-
-2003-03-28 Chris Toshok <toshok@ximian.com>
-
- [ fix the contact editor so that the only time the address is
- parsed is when the user types in the address GtkTextView. ]
- * gui/contact-editor/e-contact-editor.c (address_mailing_changed):
- make this use delivery addresses instead of labels.
- (full_addr_clicked): same.
- (find_address_mailing): same.
-
- * backend/ebook/e-card-simple.c
- (e_card_simple_set_delivery_address): make this operate similar to
- e_card_simple_set_address: it sets both the delivery address and
- the label for the address.
-
-2003-03-26 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #19178 ]
- * backend/ebook/evolution-ldif-importer.c (ebook_open): use
- e_book_load_address_book_by_uri on the passed in uri.
- (load_file_fn): pass the uri.
-
- * backend/ebook/evolution-vcard-importer.c (ebook_open): use
- e_book_load_address_book_by_uri on the passed in uri.
- (load_file_fn): pass the uri.
-
-2003-03-26 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #34651 ]
- * gui/component/select-names/e-select-names.c
- (select_entry_changed): strcmp -> g_utf8_collate.
- (update_query): encode the string we pass for the query.
-
-2003-03-26 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #34085 ]
- * gui/contact-list-editor/e-contact-list-editor.c
- (table_drag_data_received_cb): only successfully complete the drag
- if they dropped a valid vcard (or vcard list). Call
- gtk_drag_finish.
-
-2003-03-26 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-list-editor/Makefile.am (INCLUDES): $evolution_uidir
- -> $evolutionuidir
-
-2003-03-26 Philip Zhao <philip.zhao@sun.com>
-
- [ fixes bug #39170 ]
- * backend/pas/pas-backend.c (pas_backend_create_card): remove
- 'return'.
- (pas_backend_remove_cards): same.
- (pas_backend_modify_card): same.
- (pas_backend_check_connection): same.
- (pas_backend_get_vcard): same.
- (pas_backend_get_cursor): same.
- (pas_backend_get_book_view): same.
- (pas_backend_get_completion_view): same.
- (pas_backend_get_changes): same.
- (pas_backend_authenticate_user): same.
- (pas_backend_get_supported_fields): same.
- (pas_backend_get_supported_auth_methods): same.
-
-2003-03-26 JP Rosevear <jpr@ximian.com>
-
- * conduit/address-conduit.c (local_record_from_ecard): append the
- second line to the address if necessary
- (ecard_from_remote_record): split the address line in two if
- necessary
-
-2003-03-23 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-list-editor/contact-list-editor.glade: set the
- dialog to "Visible: No" so it doesn't flash when we bring it up.
-
-2003-03-23 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #40026 ]
- * gui/contact-editor/e-contact-editor.c (set_field): add
- EContactEditor arg, and block/unblock signals around the
- gtk_entry_set_text, since that generates a "changed" signal which
- causes problems.
- (set_phone_field): take and pass along an EContactEditor arg.
- (set_fields): pass editor to set_field.
-
-2003-03-23 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-editor/arrow.png: nuke.
-
- * gui/contact-editor/Makefile.am (EXTRA_DIST): remove images_DATA
- (images_DATA): nuke, don't need it anymore.
-
- * gui/contact-editor/e-contact-editor.c
- (connect_arrow_button_signal): rename _replace_button to this. we
- no longer create an image, as it's a GtkArrow in the .glade file
- now.
- (connect_arrow_button_signals): rename _replace_buttons to this.
- no longer pass the arrow.png's to _replace_button.
- (e_contact_editor_init): _replace_buttons ->
- connect_arrow_button_signals.
- (_arrow_pressed): remove some dead code, and some args that aren't
- used.
- (_phone_arrow_pressed): track change to _arrow_pressed.
- (_email_arrow_pressed): same.
- (_address_arrow_pressed): same.
-
-2003-03-23 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #31786 ]
- * gui/component/addressbook-config.c
- (addressbook_source_dialog_set_source): fix some gtk warnings.
- (set_advanced_button_state): the advanced dialog isn't present in
- the glade file anymore, so ifdef everything dealing with it.
- (addressbook_edit_server_dialog): same.
-
- * gui/component/ldap-config.glade: remove all the unused Advanced
- UI stuff to lessen the amount of strings needing translation.
-
-2003-03-23 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #32113 ]
- * backend/ebook/e-destination.h: add include_email arg to
- e_destination_get_textrep.
-
- * backend/ebook/e-destination.c (e_destination_get_textrep): add
- include_email arg. if it's TRUE, and if there's an email address to
- add
-
- * gui/contact-list-editor/e-contact-list-model.c
- (contact_list_value_at): use e_destination_get_textrep so we don't
- display QP text, and pass TRUE for include_email.
-
- * gui/widgets/e-minicard.c (add_field): same.
- (remodel): same.
-
- * gui/widgets/e-addressbook-treeview-adapter.c (adapter_get_value): same.
-
- * gui/widgets/e-addressbook-table-adapter.c (addressbook_value_at): same.
-
- * gui/component/select-names/e-select-names-text-model.c
- (e_select_names_text_model_insert_length): pass FALSE for
- include_email.
-
- * gui/component/select-names/e-select-names-model.c
- (e_select_names_model_get_textification): pass FALSE for
- include_email.
- (e_select_names_model_get_string): same.
- (e_select_names_model_replace): same.
- (e_select_names_model_name_pos): same.
- (e_select_names_model_text_pos): same.
-
-2003-03-19 Ettore Perazzoli <ettore@ximian.com>
-
- * backend/ebook/GNOME_Evolution_Addressbook_VCard_Importer.server.in.in:
- Replace "evolution:menu-name" prop with "evolution:menu_name". [#39692]
- * backend/ebook/GNOME_Evolution_Addressbook_LDIF_Importer.server.in.in: Likewise.
-
-2003-03-18 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names-table-model.c
- (e_select_names_table_model_col_count): up the column count by one
- for the underline.
- (e_select_names_table_model_value_at): add handling for underline.
-
-2003-03-18 Chris Toshok <toshok@ximian.com>
-
- * gui/component/e-address-popup.c (email_menu_add_option): fix use
- of deprecated gtk_menu_append.
- (card_picker_selection_changed): change this to be used with the
- "changed" signal on GtkTreeSelection.
- (free_str): yeah, gross. i know.
- (card_picker_init): this needed some fixing, so the strings don't
- go away after we insert them into the model. also, connect to the
- "changed" GtkTreeSelection signal instead of using the nonexistant
- gtk_tree_selection_set_func.
- (e_address_popup_construct): gtk_style_unref -> g_object_unref.
- (popup_size_allocate_cb): nuke.
- (e_address_popup_ambiguous_email_add): use gtk_window_set_position
- and let the window manager place the window instead of doing it
- ourself.
-
-2003-03-18 Chris Toshok <toshok@ximian.com>
-
- [ Fixes addressbook bug #39730 ]
- * gui/component/ldap-config.glade: add response ids to the search
- base dialog.
-
- * gui/component/addressbook-config.c
- (addressbook_source_dialog_destroy): use g_object_unref, not
- gtk_widget_destroy, on the GladeXML.
- (addressbook_add_server_druid): call gtk_window_set_type_hint
- GDK_WINDOW_TYPE_HINT_DIALOG so this window looks like a dialog.
- (editor_modify_cb): no more apply button.
- (edit_dialog_apply_clicked): nuked.
- (edit_dialog_close_clicked): rename to _cancal_clicked.
- (edit_dialog_ok_clicked): call gtk_widget_destroy here instead of
- calling _cancel_clicked.
- (addressbook_edit_server_dialog): no more apply button, and
- close_button -> cancel_button. Also, set the hint to
- GDK_WINDOW_TYPE_HINT_DIALOG.
- (ldap_dialog_new): fix compiler warning.
- (addressbook_dialog_create_sources_table): same.
-
-2003-03-18 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names-section.etspec: use
- alternating-row-colors="false"
-
- * gui/component/select-names/e-select-names.h: nuke prototypes for
- e_select_names_get_source/section.
-
- * gui/component/select-names/e-select-names.c (set_book): remove
- the signal disconnect from here.
- (addressbook_model_set_uri): same.
- (e_select_names_init): connect to the search_result signal on the
- addressbook model.
- (e_select_names_child_free): disconnect the changed_id signal.
- (e_select_names_add_section): set the underline column so the
- recipient tables look like they did when they were EEntry.
- (e_select_names_add_section): store off the changed_id.
- (e_select_names_get_section): nuke.
- (e_select_names_get_source): nuke.
-
-2003-03-18 JP Rosevear <jpr@ximian.com>
-
- * conduit/address-conduit.c (addrconduit_load_configuration): kill
- warning by sinking objects
-
-2003-03-18 Not Zed <NotZed@Ximian.com>
-
- * gui/component/select-names/e-select-names.c (set_book,
- addressbook_model_set_uri): disconnect/keep track of search result
- signal id.
- (e_select_names_init): Keep track of various signals, particularly
- status signal.
- (e_select_names_dispose): disconnect from any signals that are
- still active. Fixes crash for #38202.
-
-2003-03-13 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-editor/e-contact-editor.c
- (set_entry_changed_signals): use set_entry_changed_signal_email
- for the email entry so the email gets saved out.
- (set_entry_changed_signal_email): new function, analogous to
- set_entry_changed_signal_phone, but for email.
-
-2003-03-12 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #20210 ]
- * gui/component/select-names/e-select-names-popup.c
- (popup_menu_card): change "Edit Contact Info" to "View Contact
- Info", as you can't always edit the contact (if the book is read
- only).
- (popup_menu_list): same, but for a contact list.
-
-2003-03-11 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #39507 ]
- * gui/component/select-names/e-select-names.c (search_result): new
- function, sync the models after we do a search.
- (addressbook_model_set_uri): connect to search_result.
-
-2003-03-11 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_init): fix compiler warnings about deprecated
- functions.
- (e_select_names_child_free): unref the table model.
- (remove_address): re-enable.
- (section_right_click_cb): this is an ETable callback now.
- (e_select_names_add_section): remove a gross gross awful hack, and
- make the recipient tables ETables instead EEntry's. We lose the
- nice underlining, but we can add that back in as another ETable
- style (like strikeout and bold), and we also fix the longstanding
- scrolling problems (like bug #25148) and can finally remove
- addresses by double clicking on them (which is also a bug
- someplace I think.. dunno the # offhand.)
-
- * gui/component/select-names/e-select-names-table-model.c
- (clear_info): always set the count to -1, regardless of what
- model->data is.
-
- * gui/component/select-names/e-select-names-model.c: remove some
- unused enums.
-
- * gui/component/select-names/Makefile.am (etspec_DATA): add
- e-select-names-section.etspec
-
- * gui/component/select-names/e-select-names-section.etspec: new
- file, spec for the To:/Cc:/Bcc: etable's in the select-names
- dialog.
-
-2003-03-11 Not Zed <NotZed@Ximian.com>
-
- * backend/pas/pas-backend-file.c (INITIAL_VCARD): Updated phone
- number. Bug #37204.
-
- * gui/widgets/e-addressbook-util.c (e_addressbook_send_card_list):
- re-enable in build, include e-destination.h. For #39256.
-
-2003-03-06 Ettore Perazzoli <ettore@ximian.com>
-
- * backend/ebook/load-pine-addressbook.c (ebook_create): Likewise.
- * backend/ebook/load-gnomecard-addressbook.c (ebook_create): Likewise.
- * backend/ebook/evolution-vcard-importer.c (ebook_create): Likewise.
- * backend/ebook/evolution-ldif-importer.c (ebook_create): Likewise.
- * backend/ebook/test-client.c (get_cursor_cb): Likewise.
- (ebook_create): Likewise.
- * gui/widgets/e-minicard.c (e_minicard_set_property): Likewise.
- (card_modified_cb): Likewise.
- (e_minicard_event): Likewise.
- * gui/widgets/gal-view-minicard.c (column_width_changed): Likewise.
- * gui/widgets/test-minicard-view.c (ebook_create): Likewise.
- * gui/widgets/gal-view-treeview.c (column_width_changed): Likewise.
-
-2003-03-05 Not Zed <NotZed@Ximian.com>
-
- * gui/component/addressbook-component.c (bonobo_main_quit_cb):
- removed.
- (owner_unset_cb): Basically a noop, the shell does the quit, we
- just note we have no owner anymore.
-
-2003-03-04 JP Rosevear <jpr@ximian.com>
-
- Fixes #37881
-
- * gui/component/select-names/e-simple-card-bonobo.c
- (impl_SimpleCard_get): if we get a null value, send back the empty
- string
-
-2003-03-04 JP Rosevear <jpr@ximian.com>
-
- * gui/component/select-names/e-select-names.etspec: reflect prior column addition
-
- * gui/component/select-names/e-select-names-bonobo.c
- (entry_get_property_fn): set the arg properly
-
- * gui/component/select-names/Evolution-Addressbook-SelectNames.idl:
- add Icscalendar to field list
-
- * backend/pas/pas-backend-ldap.c: add icscalendar to prop list
-
- * backend/ebook/e-card.h: add icscalendar data member
-
- * backend/ebook/e-card.c: add icscalendar to list and its parse
- routine
- (e_card_get_vobject): add icscalendar prop value
- (parse_icscalendar): parse routine
- (e_card_class_init): add icscalendar arg
- (e_card_destroy): destroy icscalendar member
- (e_card_set_arg): set icscalendar
- (e_card_init): init icscalendar
- (e_card_get_arg): return icscalendar
-
- * backend/ebook/e-card-simple.c (field_data): add icscalendar
-
- * backend/ebook/e-card-simple.h: ditto
-
-2003-03-03 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_new): Don't set the "modal" property through
- g_object_new().
- (e_select_names_init): Explictly make the dialog modal here.
-
-2003-03-03 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/widgets/e-addressbook-view.c (create_minicard_view): No need
- to do any reparenting here; the widget is created with no parent.
-
-2003-03-03 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_init): Instead of using gtk_widget_unparent(),
- remove the widget from the container using gtk_container_remove().
- This fixes a bunch of crashers in all the places using the
- ESelectNames widget/control.
-
-2003-02-28 Dan Winship <danw@ximian.com>
-
- * gui/contact-editor/Makefile.am: Build libecontacteditor as an
- uninstalled shared library.
-
- * gui/contact-list-editor/Makefile.am: Likewise for
- libecontactlisteditor
-
- * gui/merging/Makefile.am: and libecardmerging
-
- * gui/search/Makefile.am: and libeaddressbooksearch
-
- * gui/widgets/Makefile.am: and libeminicard
-
- * printing/Makefile.am: and libecontactprint
-
- * gui/component/Makefile.am (libevolution_addressbook_la_LIBADD):
- Update for new library names (and get rid of libtool portability
- warnings).
-
-2003-02-28 Dan Winship <danw@ximian.com>
-
- * backend/ebook/e-card.c (e_card_list_send, e_card_send): Remove
- these from here; talking to the mailer doesn't really belong at
- the libebook level anyway.
-
- * backend/ebook/Makefile.am: Remove Evolution-Composer CORBA
- stuff, which fixes some linking problems on OS X.
-
- * gui/widgets/e-addressbook-util.c (e_addressbook_send_card_list,
- e_addressbook_send_card): Move from e-card.c and rename.
-
- * gui/widgets/Makefile.am: move Evolution-Composer CORBA stuff
- here
-
- * gui/widgets/e-addressbook-view.c (send_as, send_to,
- e_addressbook_view_send, e_addressbook_view_send_to): Update for
- new function names.
-
- * gui/contact-list-editor/e-contact-list-editor.c (file_send_as_cb,
- file_send_to_cb): Likewise
-
- * gui/contact-editor/e-contact-editor.c (file_send_as_cb,
- file_send_to_cb): Likewise
-
-2003-02-27 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook.c (book_open_cb): use g_signal_connect
- here, not swapped... although since we pass the widget as the
- closure it really doesn't matter.
- (load_uri_auth_cb): use a GtkDialog here.
- (search_result): same.
-
- * gui/component/select-names/e-simple-card-bonobo.h: add prototype
- for e_simple_card_bonobo_construct to fix warning.
-
- * gui/widgets/e-addressbook-view.c (create_alphabet): remove call
- to gtk_widget_set_usize.
-
- * gui/contact-editor/e-contact-editor-address.c
- (e_contact_editor_address_init): gtk_window_set_policy =>
- gtk_window_set_resizable.
-
- * gui/contact-editor/e-contact-editor-fullname.c
- (e_contact_editor_fullname_init): same.
-
-2003-02-27 JP Rosevear <jpr@ximian.com>
-
- * conduit/Makefile.am: link to libversit libtool object
-
-2003-02-27 Rodney Dawes <dobey@ximian.com>
-
- * backend/ebook/Makefile.am: Fix for server files from Antonio Xu
-
-2003-02-26 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-book.c (e_book_load_uri): if we fail to activate
- factories for a given protocol, return.
-
- * gui/component/ldap-config.glade: remove the two unused custom
- widgets to cut down on gtk warning spam.
-
-2003-02-21 Dan Winship <danw@ximian.com>
-
- * backend/ebook/Makefile.am (libebook_la_LIBADD): depend on
- libversit.la, libcamel.la, libename.la, and libeutil.la.
- (test_client_LDADD, test_client_list_LDADD, test_card_LDADD,
- evolution_vcard_importer_LDADD, evolution_ldif_importer_LDADD,
- load_pine_addressbook_LDADD, load_gnomecard_addressbook_LDADD):
- Remove those dependencies from here, since they're pulled in by
- libebook.
-
- * gui/component/Makefile.am (libevolution_addressbook_la_LIBADD):
- Remove libebook's dependencies
-
- * gui/component/select-names/Makefile.am
- (libeselectnames_la_LIBADD): add this
-
- * gui/widgets/Makefile.am (various disabled *_test_LDADD): cleanup
-
- * printing/Makefile.am (contact_print_test_LDADD,
- contact_print_style_editor_test_LDADD): cleanup
-
-2003-02-20 Dan Winship <danw@ximian.com>
-
- * gui/component/Makefile.am (libevolution_addressbook_la_LIBADD):
- s/libemiscwidgets.a/libemiscwidgets.la/
-
- * gui/widgets/Makefile.am: Likewise (in a bunch of commented-out
- test programs)
-
-2003-02-19 Dan Winship <danw@ximian.com>
-
- * gui/widgets/e-addressbook-model.c: Make parent_class static.
-
- * gui/widgets/e-addressbook-reflow-adapter.c: Likewise
-
- * gui/widgets/e-addressbook-table-adapter.c: Likewise
-
-2003-02-19 Chris Toshok <toshok@ximian.com>
-
- [ fix #38074 ]
- * gui/component/e-address-popup.c (add_contacts_cb): first arg is
- a GtkWidget. duh.
-
-2003-02-19 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/contact-editor/Makefile.am (INCLUDES): Use $(evolutionuidir)
- instead of $(evolution_uidir). [Pointed out by Grzegorz Goawski.]
-
-2003-02-17 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names-completion.c
- (e_select_names_completion_start_query): if we can complete solely
- from our cached cards, call e_completion_end_search from here when
- we're done.
-
-2003-02-17 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook-component.c
- (ensure_completion_uris_exist): plug memory leak (always free
- val).
-
-2003-02-16 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-file.c
- (pas_backend_file_search_timeout): move the bulk of the
- non-summary searching stuff here. we aggregate up to our
- threshold, then send them to the front end and register a timeout
- to do another batch. This keeps us from totally spamming the UI,
- making things a bit more responsive.
- (pas_backend_file_search): set up the closure and call the timeout
- in an idle func.
-
-2003-02-16 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names-manager.c
- (e_select_names_manager_entry_new): indent properly.
-
-2003-02-16 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-addressbook-reflow-adapter.c (unlink_model):
- disconnect search_started and search_result.
- (addressbook_compare): if we're loading, just compare model
- positions (so we just append while loading).
- (remove_card): use e_reflow_model_item_removed.
- (search_started): new function, set loading = TRUE.
- (search_result): new function, set loading = FALSE and emit
- "comparison_changed".
- (e_addressbook_reflow_adapter_init): init loading and the new
- signal ids.
- (e_addressbook_reflow_adapter_construct): connect "search_started"
- and "search_result".
-
- * gui/widgets/e-addressbook-model.h (struct
- _EAddressbookModelClass): add search_started signal.
-
- * gui/widgets/e-addressbook-model.c
- (e_addressbook_model_class_init): new signal "search_started".
- (book_view_loaded): emit "search_started" after "model_changed".
- (remove_card): simplify this, and use CARD_REMOVED all the time,
- instead of just in the single card case.
-
-2003-02-10 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-file.c
- (pas_backend_file_search_timeout): split out the bulk of the
- non-summary searching logic to here. we do 1 "card_threshold"
- sized lump per timeout.
- (pas_backend_file_search): use pas_backend_file_search_timeout.
-
-2003-02-10 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #33066 ]
- * gui/contact-editor/e-contact-editor.c
- (set_urlentry_changed_signal_field): new function
- (set_entry_changed_signals): call
- set_urlentry_changed_signal_field for entry-web, entry-caluri, and
- entry-fburl.
- (fill_in_field): add handling for EUrlEntry's.
- (extract_field): same.
- (enable_widget): same.
- (e_contact_editor_create_date): show the widget.
- (e_contact_editor_create_web): same, create a url entry.
- (set_urlentry_changed_signal_field): new function
-
- * gui/contact-editor/contact-editor.glade: entry-web,
- entry-caluri, and entry-fburl are all custom widgets now.
-
-2003-02-10 Ettore Perazzoli <ettore@ximian.com>
-
- * backend/ebook/Makefile.am: Install load-pine-addressbook and
- load-gnomecard-addressbook into ${privdatadir}/tools. Install
- evolution-vcard-importer and evolution-ldif-importer into
- ${privlibexecdir}.
-
- * backend/ebook/GNOME_Evolution_Addressbook_VCard_Importer.server.in:
- Removed.
-
- * backend/ebook/GNOME_Evolution_Addressbook_LDIF_Importer.server.in:
- Removed.
-
- * backend/ebook/GNOME_Evolution_Addressbook_VCard_Importer.server.in.in:
- New. Specify an absolute path for the executable, using
- @LIBEXECDIR@.
- * backend/ebook/GNOME_Evolution_Addressbook_LDIF_Importer.server.in.in:
- Likewise.
-
-2003-02-09 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names-completion.c
- (sexp_initials): gone.
- (match_initials): gone.
- (book_query_sexp): remove the primary handling.
- (book_query_score): same.
-
- * backend/ebook/e-card.c (e_card_set_property):
- g_value_get_pointer => g_value_get_object for "category_list".
-
- * backend/ebook/e-book.c (struct _EBookPrivate): add a comment.
-
- * backend/pas/pas-backend-ldap.c (func_beginswith): performance at
- the cost of a tiny bit of correctness. If the ldap server doesn't
- support evolutionPerson don't query on fileAs, use sn (since
- that's effectively what gets used in the display when fileAs isn't
- supported.)
-
-2003-02-09 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names-completion.c: lots of
- changes here. should be a big performance gain. god i hope this
- is finally right.
-
-2003-02-08 Chris Toshok <toshok@ximian.com>
-
- [ huge change, all for 1 little performance problem :) fixes #18207 ]
- * gui/widgets/e-addressbook-model.c (get_view): use
- e_book_check_static_capability here to make things a little
- prettier.
- (remove_card): complain about my life, and add code to use one
- "model_changed" signal if we get back a list of cards instead of
- multiple "card_removed" signals.
-
- * gui/widgets/e-addressbook-model.h: little clean up.
-
- * gui/widgets/e-addressbook-view.c (delete): write a bulk-remove
- case for this. if the backend supports it, send all the ids at
- once. otherwise loop over the ids.
- (e_addressbook_view_delete_selection): fake a CardAndBook
- structure and call delete, instead of duplicating the code in 2
- places.
-
- * gui/component/addressbook.c (delete_contact_cb): don't call
- e_contact_editor_confirm_delete here, it's handled by the
- EAddressbookView.
-
- * backend/pas/pas-card-cursor.c (pas_card_cursor_construct): fix a
- compiler warning about a stupid crash.
-
- * backend/pas/pas-book.h (PASOperation): RemoveCard ->
- RemoveCards.
- (PASRemoveCardsReques): char *id -> GList *ids.
- (PASRequest): PASRemoveCardRequest -> PASRemoveCardsRequest.
-
- * backend/pas/pas-book.c (pas_book_queue_remove_cards): build up a
- GList from the id sequence.
- (pas_book_respond_remove): notifyCardRemoved ->
- notifyCardsRemoved.
- (impl_GNOME_Evolution_Addressbook_Book_removeCards): rename.
- (pas_book_free_request): free the idlist for RemoveCards.
- (pas_book_class_init): removeCard -> removeCards.
-
- * backend/pas/pas-book-view.h: change prototype for
- pas_book_view_notify_remove, and add prototype for
- pas_book_view_notify_remove_1.
-
- * backend/pas/pas-book-view.c (pas_book_view_notify_remove_1):
- build up a list and call pas_book_view_notify_remove.
- (pas_book_view_notify_remove): build up the corba id sequence and
- call BookViewListener::notifyCardsRemoved.
-
- * backend/pas/pas-backend.h: remove_card -> remove_cards.
-
- * backend/pas/pas-backend.c (pas_backend_remove_cards): rename
- from _remove_card.
- (process_client_requests): RemoveCard -> RemoveCards and
- _remove_card -> _remove_cards.
-
- * backend/pas/pas-backend-ldap.c (check_schema_support):
- g_strcasecmp -> g_ascii_strcasecmp.
- (remove_card_handler): _remove => _remove_1.
- (modify_card_modify_handler): same.
- (pas_backend_ldap_process_remove_cards): rename from _remove_card.
- (pas_backend_ldap_class_init): _remove_card -> _remove_cards.
-
- * backend/pas/pas-backend-file.c (pas_backend_file_class_init):
- remove_card -> remove_cards.
- (pas_backend_file_get_static_capabilities): add "bulk-removes".
- (pas_backend_file_process_remove_cards): rewrite this function
- largely, so that it handles lists of ids. first we loop through
- and for every successful deletion we build a list of deleted
- ECards. Then for each view we build a list (a subset of the
- deleted ECard list) and pass back that list to the view.
- (pas_backend_file_process_modify_card): use _remove_1 instead of
- _remove.
- (ecard_matches_search): new function.
-
- * backend/pas/pas-backend-card-sexp.c
- (pas_backend_card_sexp_match_vcard): rewrite in terms of
- _match_ecard.
- (pas_backend_card_sexp_match_ecard): new function, the guts from
- _match_vcard.
-
- * backend/pas/pas-backend-card-sexp.h: add prototype for
- pas_backend_card_sexp_match_ecard.
-
- * backend/idl/addressbook.idl: the card removal stuff now takes
- CardIdList.
-
- * backend/ebook/e-book.c (e_book_get_static_capabilities): cache
- successful capability queries (since they're static).
- (e_book_check_static_capability): new, convenience function to
- check if a particular capability is supported.
- (e_book_remove_card_by_id): build a single element GList and call
- e_book_remove_cards.
- (e_book_remove_cards): build up a CORBA sequence from the GList
- and call Book::removeCards.
- (e_book_dispose): free the cached capabilities string.
-
- * backend/ebook/e-book.h: add new prototypes for
- e_book_check_static_capability and e_book_remove_cards.
-
- * backend/ebook/e-book-view.h (struct _EBookViewClass): rename
- "card_removed" signal to "cards_removed".
-
- * backend/ebook/e-book-view.c (e_book_view_do_removed_event): id
- -> ids, and free the id list.
- (e_book_view_check_listener_queue): CardRemovedEvent ->
- CardsRemovedEvent.
-
- * backend/ebook/e-book-view-listener.c
- (e_book_view_listener_queue_response): free the id list.
- (e_book_view_listener_queue_idlist_event): new function, used for
- cards_removed.
- (e_book_view_listener_queue_status_event): id -> ids.
- (e_book_view_listener_queue_sequence_event): same.
- (e_book_view_listener_queue_message_event): same.
- (impl_BookViewListener_notify_cards_removed): call
- queue_idlist_event.
- (e_book_view_listener_dispose): free the id list.
- (e_book_view_listener_class_init): track change to idl call.
-
- * backend/ebook/e-book-view-listener.h
- (EBookViewListenerOperation): CardRemovedEvent ->
- CardsRemovedEvent.
- (EBookViewListenerResponse): char *id -> GList *ids.
-
- * backend/ebook/e-book-listener.c
- (impl_BookListener_respond_remove_cards): rename from remove_card.
-
-2003-02-06 Chris Toshok <toshok@ximian.com>
-
- * gui/component/e-address-popup.c (email_table_save_card_cb):
- check the status, not the book, and unref the book here.
- (contact_editor_cb): same.
- (start_query): unref the book in the failure case.
- (add_card_idle_cb): addressbook_load_default_book returns void
- now.
- (edit_contact_info_cb): same.
- (e_address_popup_query): same.
-
- * gui/component/addressbook.c (control_activate_cb): track change
- to addressbook_load_uri return type.
- (set_prop): same.
- (addressbook_load_uri): return type is void now.
- (addressbook_load_default_book): same.
-
- * gui/component/addressbook.h:
- addressbook_load_uri/addressbook_load_default_book return void
- now.
-
- * conduit/address-conduit.c (start_addressbook_server):
- e_book_load_default_book returns void now.
-
- * backend/ebook/e-book-util.h: track changes to return types.
-
- * backend/ebook/e-book-util.c (e_book_load_address_book_by_uri):
- fallout from change to e_book_load_uri. return type for this
- function is void now too.
- (e_book_use_address_book_by_uri): same.
- (e_book_use_default_book): same.
- (e_book_load_default_book): same.
- (got_uri_book_cb): if unsuccessful and book is non-NULL, unref it
- here.
- (got_default_book_cb): same.
-
- * backend/ebook/e-book.c (e_book_load_uri): no longer return a
- gboolean. any error is communicated to the callback.
-
- * backend/ebook/e-book.h: e_book_load_uri no longer returns a
- gboolean (it's void.)
-
- * backend/ebook/evolution-ldif-importer.c (ebook_create): track
- change to the e_book_load_uri family of functions.
-
- * backend/ebook/test-client-list.c (ebook_create): same.
-
- * backend/ebook/test-client.c (ebook_create): same.
-
- * backend/ebook/load-pine-addressbook.c (ebook_create): same.
-
- * backend/ebook/evolution-vcard-importer.c (ebook_create): same.
-
-2003-02-06 Ettore Perazzoli <ettore@ximian.com>
-
- * backend/ebook/Makefile.am (e-book-marshal.c, e-book-marshal.h):
- Use different tmp file names so these rules can be executed in
- parallel without interfering with each otehr.
-
- * backend/pas/Makefile.am: Make the ORBit compilation work
- properly with parallel makes (i.e. make sure it does not spawn
- multiple orbit-idl processes on the same IDL file at the same
- time).
- * gui/component/select-names/Makefile.am: Likewise.
- * backend/ebook/Makefile.am: Likewise.
-
-2003-02-06 Dan Winship <danw@ximian.com>
-
- * gui/component/addressbook-config.c (main):
- s/PACKAGE/GETTEXT_PACKAGE/ in gettext setup.
-
-2003-02-05 Dan Winship <danw@ximian.com>
-
- * backend/ebook/Makefile.am (INCLUDES): Remove cruft.
- (libebookincludedir): Use privincludedir.
-
- * backend/ebook/e-book-util.c: #include <string.h>
- * backend/ebook/e-card-compare.c: Likewise
- * backend/ebook/load-pine-addressbook.c: Likewise
- * backend/ebook/test-client.c: Likewise
-
- * backend/ebook/evolution-vcard-importer.c: #include
- <e-book-util.h>
- (factory_fn): Fix this to actually return the importer.
-
- * backend/ebook/evolution-ldif-importer.c (parseLine): #include
- <e-book-util.h> and <bonobo/bonobo-main.h>. Use g_ascii_strcmp.
-
- * backend/ebook/e-card.c (e_card_email_match_single_string):
- (e_card_email_find_number): s/g_str/g_ascii_str/
- * backend/ebook/e-destination.c (e_destination_equal): Likewise.
- Also, add an "else return FALSE;"
-
-
- * backend/pas/Makefile.am (INCLUDES): Remove cruft
- (ldapschemadir): Use privdatadir
- (pasincludedir): Use privincludedir.
-
- * backend/pas/pas-book-factory.c (pas_book_factory_activate):
- Remove unused variable.
- * backend/pas/pas-book-view.c (pas_book_view_new): Likewise
-
-
- * printing/Makefile.am (ecpsdir): Define in terms of privdatadir.
- (gladedir): Defined in configure.in now.
-
- * printing/e-contact-print.c: #include <string.h>
-
- * printing/test-print.c: #include <bonobo/bonobo-main.h>
- * printing/test-contact-print-style-editor.c: Likewise
-
-
- * gui/contact-editor/Makefile.am (INCLUDES): Remove some cruft.
- rename ICONSDIR to IMAGESDIR.
- (images_DATA): Install arrow.png in imagesdir instead of
- privdatadir.
-
- * gui/contact-editor/e-contact-quick-add.c: #include <string.h>
-
- * gui/contact-editor/e-contact-editor.c: #include <string.h>
- (e_contact_editor_init): s/EVOLUTION_ICONSDIR/EVOLUTION_IMAGESDIR/
- (e_contact_editor_new): s/gtk_object_ref/g_object_ref/
- (_replace_button): Look in imagesdir, not privdatadir
- (_phone_arrow_pressed): Remove call to deprecated
- gtk_check_menu_item_set_show_toggle.
- (_email_arrow_pressed): Likewise
- (_address_arrow_pressed): Likewise
- (set_address_field): Remove unused variable
- (enable_widget):
- s/gtk_entry_set_editable/gtk_editable_set_editable/
-
- * gui/contact-editor/e-contact-editor-address.c
- (e_contact_editor_address_init):
- s/EVOLUTION_ICONSDIR/EVOLUTION_IMAGESDIR
- (e_contact_editor_address_set_property):
- s/gtk_entry_set_editable/gtk_editable_set_editable/
-
- * gui/contact-editor/e-contact-editor-fullname.c
- (e_contact_editor_fullname_init):
- s/EVOLUTION_ICONSDIR/EVOLUTION_IMAGESDIR
- (e_contact_editor_fullname_set_property): Likewise.
-
-
- * gui/contact-list-editor/Makefile.am (INCLUDES): Remove cruft,
- s/ICONSDIR/IMAGESDIR/
- (gladedir, etspecdir): Remove definitions.
-
- * gui/contact-list-editor/e-contact-list-editor.c: #include
- <string.h>
- (e_contact_list_editor_init): s/ICONSDIR/IMAGESDIR/
- (e_contact_list_editor_new): s/gtk_object_ref/g_object_ref/
-
- * gui/contact-list-editor/e-contact-list-model.c: #include <string.h>
-
-
- * gui/merging/Makefile.am (INCLUDES): Remove cruft.
- * gui/search/Makefile.am (ruledir): Define in terms of privdatadir
-
-
- * gui/widgets/Makefile.am (INCLUDES): Remove cruft.
- (gladedir, etspecdir): Remove definitions.
- (glade_DATA): Empty, so remove it.
-
- * gui/widgets/e-addressbook-reflow-adapter.c: #include <string.h>
- (addressbook_get_property): Remove unused variable
-
- * gui/widgets/e-addressbook-view.c: #include <string.h>
- (get_selection_model): Add a g_return_val_if_reached.
-
- * gui/widgets/e-minicard.c: #include string.h, gtkmain.h,
- gnome-canvas-pixbuf.h
- (field_changed): s/gtk_object_unref/g_object_unref/
- (get_left_width): Remove unused variable
-
- * gui/widgets/e-minicard-control.c: #include <string.h>
- (pstream_load, pstream_save): Use g_ascii_strcasecmp
-
- * gui/widgets/e-minicard-view.c: #include <string.h>
-
- * gui/widgets/e-minicard-view-widget.c
- (e_minicard_view_widget_new): s/gtk_type_new/g_object_new/
-
-
- * gui/component/select-names/Makefile.am (INCLUDES): Remove cruft.
- (serverdir, gladedir, etspecdir): Remove definitions
-
- * gui/component/select-names/e-select-names.c: #include <string.h>
-
- * gui/component/select-names/e-select-names-popup.c
- (init_html_mail): Remove deprecated
- gtk_check_menu_item_set_show_toggle call.
-
- * gui/component/select-names/e-select-names-manager.c
- (e_select_names_manager_entry_free):
- s/gtk_timeout_remove/g_source_remove/
-
-
- * gui/component/Makefile.am (INCLUDES): Remove cruft, rename
- ICONSDIR to IMAGESDIR.
- (serverdir, gladedir): Remove defintions.
-
- * gui/component/addressbook-component.c (IS_CONTACT_TYPE): use
- g_ascii_strcasecmp
- (add_creatable_item): s/ICONSDIR/IMAGESDIR/
-
- * gui/component/component-factory.c: #include <string.h>
-
- * gui/component/e-address-widget.c: Likewise.
- (e_address_widget_destroy): s/gtk_idle_remove/g_source_remove/
- (e_address_widget_schedule_query): s/gtk_idle_add/g_idle_add/
-
-
- * conduit/Makefile.am (INCLUDES): Remove cruft
-
-2003-02-05 Dan Winship <danw@ximian.com>
-
- * gui/component/addressbook-config.c (main): Replace deprecated
- glade_gnome_init() with glade_init().
-
- * gui/contact-editor/test-editor.c (main): Likewise.
-
- * printing/test-contact-print-style-editor.c (main): Likewise.
-
- * printing/test-print.c (main): Likewise.
-
-2003-02-03 Chris Toshok <toshok@ximian.com>
-
- [ pull forward Jack Jia's fix for #34900 ]
- * gui/contact-editor/e-contact-save-as.c (e_contact_save_as): use
- a weak ref for the file selector.
- (e_contact_list_save_as): same.
- (destroy_it): rewrite this as a weak ref notify function.
- (close_it): remove frees of the info (it's freed in the weak ref
- function).
- (save_it): same.
-
-2003-02-03 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook-component.c (remove_folder): pull
- forward Jack Jia's fix for #33672, but convert it to use unlink
- instead of the gnome-vfs stuff.
-
-2003-01-27 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-editor/contact-editor.glade: add a scrolled window
- (SHADOW_IN) around the address textview.
-
-2003-01-26 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-editor/contact-editor.glade: rename the category
- entry to entry-categories.
-
- * gui/contact-editor/e-contact-editor.c
- (set_entry_changed_signals): use the specialized "changed" signal
- handlers for entry-company and entry-fullname.
-
-2003-01-26 Chris Toshok <toshok@ximian.com>
-
- * gui/component/Makefile.am: i need to sleep more.
-
-2003-01-26 Chris Toshok <toshok@ximian.com>
-
- * gui/component/Makefile.am (componentdir): need to assign this
- here or else the lib doesn't get built.
-
-2003-01-26 Chris Toshok <toshok@ximian.com>
-
- * printing/e-contact-print.c (e_contact_start_new_page): begin the
- new page after showing the last one.
- (complete_sequence): beginpage before we start printing.
- (e_contact_print_response): GtkDialog-ify this.
- (e_contact_print_dialog_new): "clicked" -> "response".
- (e_contact_print_card_dialog_new): same.
- (e_contact_print_card_list_dialog_new): same.
-
-2003-01-26 Chris Toshok <toshok@ximian.com>
-
- * Makefile.am (CONDUIT_SUBDIR): enable this, as building the
- conduit works if you have gnome-pilot2.
-
-2003-01-25 Chris Toshok <toshok@ximian.com>
-
- * conduit/address-conduit.c: GObjectify the stuff in here that
- refers to addressbook objects. the gnome-pilot stuff is still
- GtkObject for the moment.
-
-2003-01-24 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/Makefile.am (iconsdir): Remove definition; this is
- now in configure.in.
- * gui/contact-editor/Makefile.am (iconsdir): Likewise.
- * gui/contact-list-editor/Makefile.am (iconsdir): Likewise.
-
-2003-01-23 Sean Gao <Sean.Gao@Sun.COM>
-
- [ fixes bug #34898 ]
- * gui/widgets/e-minicard.c (field_changed): handle modifications
- to email addresses in contact lists.
-
-2003-01-23 Sean Gao <Sean.Gao@Sun.COM>
-
- [ fixes bug #36375 ]
- * backend/pas/pas-backend-ldap.c: use PHONE_OTHER_FAX instead of
- PHONE_OTHER for "other_fax".
-
-2003-01-23 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #31014, roll this in from the 1.2 branch ]
- * backend/pas/pas-backend-ldap.c: use "categories" instead of
- "category" for the ECard field so the UI/get_supported_fields stuff
- actually thinks its usable in the contact editor..
-
-2003-01-23 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (pas_backend_ldap_connect): fix
- for bug 34883 broke ssl transactions (at least those where we were
- connecting to port 636). Move it to after the SSL stanza.
-
-2003-01-23 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/select-names/Makefile.am (componentdir): Remove
- definition; no need to set it here since it's now defined in
- configure.in
- * gui/component/Makefile.am (componentdir): Likewise.
-
-2003-01-22 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/select-names/Makefile.am (gladedir): Version using
- $(BASE_VERSION).
- (etspecdir): Likewise.
- (iconsdir): Likewise.
-
- * gui/contact-list-editor/Makefile.am (iconsdir): Version using
- $(BASE_VERSION).
- (gladedir): Likewise.
-
- * gui/merging/Makefile.am (gladedir): Version using $(BASE_VERSION).
-
- * gui/search/Makefile.am (ruledir): Version using $(BASE_VERSION).
-
- * gui/component/Makefile.am (INCLUDES): Update EVOLUTION_IMAGESDIR
- to be versioned through $(BASE_VERSION).
-
- * gui/widgets/e-addressbook-view.c (init_collection): Use
- EVOLUTION_GALVIEWSDIR.
-
- * gui/widgets/Makefile.am (INCLUDES): Define EVOLUTION_GALVIEWSDIR
- and update EVOLUTION_IMAGESDIR.
-
-2003-01-21 Radek Doulik <rodo@ximian.com>
-
- * printing/e-contact-print.c (e_contact_print_button): don't use
- gnome_print_multipage_new_from_sizes and add warning
-
-2003-01-14 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/widgets/e-addressbook-util.c
- (e_addressbook_prompt_save_dialog): Change dialog from
- Yes/No/Cancel to Discard/Cancel/Save to match the HIG.
-
- * gui/search/e-addressbook-search-dialog.c
- (e_addressbook_search_dialog_init): Change dialog from OK/Cancel
- to Cancel/OK to match the HIG.
-
- * gui/contact-editor/e-contact-save-as.c (file_exists): Change
- dialog from Overwrite/Cancel to Cancel/Overwrite to match the HIG.
-
- * gui/contact-editor/e-contact-quick-add.c
- (build_quick_add_dialog): Fix typo s/reponse/response/. Also
- change the dialog to be Edit/Cancel/OK instead of OK/Edit/Cancel
- to match the HIG.
-
- * gui/contact-editor/e-contact-editor.c
- (e_contact_editor_confirm_delete): Make alert cancel/delete
- instead of delete/cancel to match the HIG.
-
- * gui/contact-editor/e-contact-editor-fullname.c
- (e_contact_editor_fullname_init): Make dialog Cancel/OK instead of
- OK/Cancel to match the HIG.
-
- * gui/contact-editor/e-contact-editor-address.c
- (e_contact_editor_address_init): Make dialog Cancel/OK instead of
- OK/Cancel to match the HIG.
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_init): Make dialog Cancel/OK instead of OK/Cancel
- to match the HIG.
-
-2003-01-14 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/Makefile.am (EXTRA_DIST): Add $(schema_DATA).
-
-2003-01-09 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook.c (control_activate_cb): try to load
- the uri again if it failed previously.
- (book_open_cb): set failed_to_load based on the response.
- (set_prop): initialize failed_to_load to FALSE before we kick off
- the first load.
-
- * backend/pas/pas-book-factory.c
- (pas_book_factory_process_request): if the load_uri fails, remove
- it from the hashtable and free it, so we'll try to load it again
- from scratch the next time it's requested instead of serving up a
- backend that doesn't function.
-
- * backend/pas/pas-backend.c (pas_backend_get_uri): we need to be
- able to get the uri from backends that aren't loaded (so we can
- remove them from the hashtable.)
-
-2003-01-09 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (query_ldap_root_dse): doh, fix
- build error.
-
-2003-01-09 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names-popup.c: #include
- gtklabel.h, fixes an unresolved symbol.
-
-2003-01-09 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (query_ldap_root_dse): build up
- the list of supported auth_methods.
- (pas_backend_ldap_process_get_supported_auth_methods): respond
- with the list of auth methods we've built up.
- (pas_backend_ldap_dispose): unref the auth_method list.
- (pas_backend_ldap_class_init): hook up
- pas_backend_ldap_process_get_supported_auth_methods.
-
- * backend/pas/pas-backend.c
- (pas_backend_get_supported_auth_methods): new function.
- (process_client_requests): add clause for GetSupportedAuthMethods.
-
- * backend/pas/pas-backend.h: add prototype for
- pas_backend_get_supported_auth_methods, and add it to the class
- vtable.
-
- * backend/pas/pas-book.h: add GetSupportedAuthMethods enum member
- and PASGetSupportedAuthMethodsRequest. and add prototype for
- pas_book_respond_get_supported_auth_methods.
-
- * backend/pas/pas-book.c
- (pas_book_queue_get_supported_auth_methods): new function.
- (impl_GNOME_Evolution_Addressbook_Book_getSupportedAuthMethods):
- new function.
- (pas_book_respond_get_supported_auth_methods): new function.
- (pas_book_free_request): add clause for GetSupportedAuthMethods.
- (pas_book_class_init): hook up getSupportedAuthMethods.
-
- * backend/ebook/e-book-listener.c
- (e_book_listener_queue_get_supported_fields_response): fields ->
- list.
- (e_book_listener_queue_get_supported_auth_methods_response): new
- function.
- (impl_BookListener_response_get_supported_auth_methods): new
- function.
- (e_book_listener_class_init): hook up
- epv->notifySupportedAuthMethods.
-
- * backend/ebook/e-book-listener.h: add
- GetSupportedAuthMethodsResponse enum member, and change the field
- name from "fields" to list (and use it for both GetSupportedFields
- and GetSupportedAuthMethods)
-
- * backend/ebook/e-book.c (e_book_get_supported_auth_methods): new
- function.
- (e_book_do_response_get_supported_auth_methods): new function.
-
- * backend/ebook/e-book.h: add prototype for
- e_book_get_supported_auth_methods.
-
- * backend/idl/addressbook.idl: add getSupportedAuthMethods IDL
- call.
-
-2003-01-09 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-book-factory.c (backend_last_client_gone_cb):
- deal with backends that might not have loaded successfully
- (they'll have a NULL uri).
-
-2003-01-09 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names-bonobo.c
- (e_select_names_bonobo_new): call e_select_names_bonobo_construct
- on the newly created object.
-
-2003-01-09 Chris Toshok <toshok@ximian.com>
-
- * gui/component/Makefile.am: addressbook-config.etspec is gone.
-
- * gui/component/addressbook-config.c: make the sources table be a
- gtktreeview instead of an etable.
-
- * gui/component/ldap-config.glade: remove all references to
- gnome-hint.png
-
-2003-01-09 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/gal-view-minicard.c (column_width_changed): fix
- parameter types here (this signal isn't generated from an ETable.)
-
- * gui/widgets/gal-view-factory-minicard.c: include e-util.h
-
- * gui/widgets/e-minicard.h: include gnome-canvas.h here.
-
- * gui/widgets/e-addressbook-table-adapter.c: #include
- e-destination.h here.
-
- * gui/widgets/e-minicard.c: same.
-
-2003-01-09 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-editor/e-contact-editor.[ch]: remove the select
- names stuff (the Related Contacts button/entry.)
-
- * gui/contact-editor/contact-editor.glade: same.
-
-2003-01-09 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/GNOME_Evolution_Addressbook_SelectNames.server.in.in:
- comment out the factory oaf_server, and change the location of the
- SelectNames controls to be
- OAFIID:GNOME_Evolution_Addressbook_Factory so the normal
- addressbook.so will create them.
-
- * gui/component/select-names/Makefile.am
- (libeselectnames_la_SOURCES): remove the
- e-select-names-factory.[ch] stuff for the time being.
-
- * gui/component/component-factory.c (factory): we're now (for the
- time being) the factory for the select names control.
-
-2003-01-08 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-addressbook-view.c: oops, don't include
- e-treeview-selection-model.h unless we're building the treeview.
-
-2003-01-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * backend/pas/pas-backend-ldap.c
- (pas_backend_ldap_process_authenticate_user): Fix to build.
-
-2003-01-08 Chris Toshok <toshok@ximian.com>
-
- * gui/component/apps_evolution_addressbook.schemas: add in the
- schema entry for minimum_query_length.
-
-2003-01-08 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-addressbook-view.h: add
- E_ADDRESSBOOK_VIEW_TREEVIEW to the enum, ifdef'ed out.
-
- * gui/widgets/e-addressbook-view.c
- (e_addressbook_view_class_init): add ifdefed treeview code.
- (init_collection): same.
- (display_view): same.
- (get_selection_model): same.
- (treeview_row_activated): same.
- (create_treeview_view): same.
- (change_view_type): same.xo
- (e_addressbook_view_print): same.
- (e_addressbook_view_print_preview): same.
-
- * gui/widgets/Makefile.am: add in the treeview sources (commented
- out).
-
-2003-01-08 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/gal-view-minicard.c (gal_view_minicard_edit): add
- parent arg.
-
- * gui/widgets/e-addressbook-treeview-adapter.[ch]: new files, for
- a GtkTreeView view of contacts.
-
- * gui/widgets/gal-view-treeview.[ch]: same
-
- * gui/widgets/gal-view-favroty-treeview.[ch]: same
-
-2003-01-08 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/Makefile.am: $(datadir)/evolution/images instead
- of $(datadir)/images/evolution.
- * gui/contact-editor/Makefile.am: Likewise.
- * gui/contact-list-editor/Makefile.am (iconsdir): Likewise.
- * gui/widgets/Makefile.am: Likewise.
-
-2002-01-08 Dan Winship <danw@ximian.com>
-
- Move PASBook request handling into PASBackend itself since all
- existing backends do it exactly the same way. (Part of 32866).
-
- * backend/pas/pas-backend.h (PASBackendClass): add new methods for
- the various pas book requests.
-
- * backend/pas/pas-backend.c: Add a clients list to
- PASBackendPrivate.
- (pas_backend_create_card, etc): Add these to invoke the new
- methods.
- (process_client_requests, book_destroy_cb): Moved here and
- slightly rewritten from pas-backend-file.
- (last_client_gone): Now static.
- (add_client, remove_client): Default implementations, based on
- pas-backend-file, that add the client to/remove it from the
- backend's clients list and connect to its requests_queued signal.
- (pas_backend_init, pas_backend_dispose): Deal with the clients
- list.
-
- * backend/pas/pas-backend-file.c (struct _PASBackendFilePrivate):
- Remove GList *clients.
- (pas_backend_file_process_client_requests,
- pas_backend_file_book_destroy_db, pas_backend_file_add_client,
- pas_backend_file_remove_client): Gone.
- (pas_backend_file_class_init): Remove add_client/remove_client
- method initializations, add initializations for processing the
- various book requests.
-
- * backend/pas/pas-backend-ldap.c (struct _PASBackendLDAPPrivate):
- Remove GList *clients.
- (pas_backend_ldap_process_create_card, etc): Make these take the
- specific PAS*Request types rather than a generic PASRequest.
- (pas_backend_ldap_process_client_requests,
- pas_backend_ldap_book_destroy_db, pas_backend_ldap_add_client,
- pas_backend_ldap_remove_client): Gone.
- (pas_backend_ldap_class_init): Remove add_client/remove_client
- method initializations, add initializations for processing the
- various book requests.
-
-2003-01-07 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/evolutionperson.schema: fix the SYNTAX for the
- telephone attributes, and make the fax attributes more closely
- mirror those from core.schema. Fixes the schema for openldap-2.1.
-
-2003-01-06 Dan Winship <danw@ximian.com>
-
- * backend/idl/Makefile.am: remove idldir def (defined by
- configure.in now)
-
- * gui/component/select-names/Makefile.am: Likewise
-
-2003-01-01 Chris Toshok <toshok@ximian.com>
-
- [ fixes the non-ui portion of #36183 ]
- * gui/component/select-names/e-select-names-completion.c
- (e_select_names_completion_start_query): use the entry's
- minimum_query_length instead of a constant here.
- (e_select_names_completion_set_minimum_query_length): new
- function, set the entry's minimum_query_length.
-
- * gui/component/select-names/e-select-names-manager.c
- (e_select_names_manager_entry_new): set the minimum_query length
- after setting the completion books.
- (read_completion_settings_from_db): rename
- read_completion_books_from_db to this, and read the
- minimum_query_length too.
- (db_listener): rename uris_listener to this, and listen for
- changes on both the uris and minimum_query_length settings.
-
- * gui/component/select-names/e-select-names-completion.h: add
- prototype for e_select_names_completion_set_minimum_query_length.
-
- * gui/component/select-names/e-select-names-manager.h: add
- minimum_query_length to struct _ESelectNamesManager.
-
-2002-12-19 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook-config.c
- (addressbook_config_control_new): Made it return an
- EvolutionConfigControl instead of a BonoboControl (and removed a
- bogus EvolutionConfigControl -> BonoboControl cast).
-
-2002-12-17 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #34897 ]
- * gui/widgets/e-addressbook-table-adapter.c
- (addressbook_value_at): don't free the return of
- e_card_simple_get_const, as this causes a double free later on.
-
-2002-12-18 Chris Toshok <toshok@ximian.com>
-
- * gui/component/e-address-popup.c: convert the clist in here to a
- GtkTreeView. your guess is as good as mine if it works (i can't
- test it at present) but it compiles.
-
-2002-12-18 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-addressbook-view.c (jump_to_letters):
- g_string_sprintfa -> g_string_append_printf.
- (create_alphabet): same.
- (create_minicard_view): remove gtk_widget_{push,pop}_visual.
-
- * gui/widgets/Makefile.am (INCLUDES): add -D*_DISABLE_DEPRECATED.
-
-2002-12-18 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-minicard.c (e_minicard_realize): drop use of
- "font" arg.
- (get_left_width): use pango to calculate this instead of a GdkFont.
-
- * gui/widgets/e-minicard-view.c: drop include of e-unicode.h.
-
- * gui/widgets/e-minicard-label.c (e_minicard_label_construct):
- don't need to create the font anymore.
-
- * gui/search/Makefile.am (INCLUDES): add -D*_DISABLE_DEPRECATED.
-
- * gui/search/e-addressbook-search-dialog.c
- (e_addressbook_search_dialog_new): use g_object_new instead of
- gtk_type_new.
-
- * gui/merging/Makefile.am (INCLUDES): add -D*_DISABLE_DEPRECATED.
-
- * gui/contact-list-editor/Makefile.am (INCLUDES): add
- -D*_DISABLE_DEPRECATED.
-
- * gui/contact-list-editor/e-contact-list-editor.c (is_named):
- strdup (or not, if we don't need to save the value) instead of
- using the e_utf8 functions.
- (fill_in_info): same.
-
- * gui/contact-editor/Makefile.am (INCLUDES): add
- -D*_DISABLE_DEPRECATED.
-
- * gui/contact-editor/e-contact-save-as.c (e_contact_save_as):
- strdup (or not, if we don't need to save the value) instead of
- using the e_utf8 functions.
- (e_contact_list_save_as): same.
-
- * gui/contact-editor/e-contact-quick-add.c (clicked_cb): strdup
- (or not, if we don't need to save the value) instead of using the
- e_utf8 functions.
- (build_quick_add_dialog): same.
-
- * gui/contact-editor/e-contact-editor.c (phone_entry_changed):
- strdup (or not, if we don't need to save the value) instead of
- using the e_utf8 functions.
- (file_as_set_style): same.
- (name_entry_changed): same.
- (full_name_clicked): same.
- (categories_clicked): same.
- (set_field): same.
- (fill_in_field): same.
- (fill_in_single_field): same.
- (extract_field): same.
- (extract_single_field): same.
-
- * gui/contact-editor/e-contact-editor-fullname.c (extract_field):
- just strdup, it's already utf8.
-
- * gui/contact-editor/e-contact-editor-address.c (extract_field):
- they're all entries, use GTK_ENTRY foo here.
-
- * gui/component/select-names/Makefile.am (INCLUDES): add
- -D*_DISABLE_DEPRECATED.
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_add_section): remove the extra
- utf8_from_locale_string stuff.
-
- * gui/component/select-names/e-select-names-popup.c
- (set_uiinfo_label): gtk_container_children ->
- gtk_container_get_children, and remove the extra utf8 stuff.
-
- * gui/component/Makefile.am (INCLUDES): add
- -D*_DISABLE_DEPRECATED.
-
- * gui/component/addressbook-storage.c
- (addressbook_storage_init_source_uri): g_string_sprintfa ->
- g_string_append_printf.
-
- * gui/component/addressbook-config.c (focus_help):
- gtk_notebook_set_page -> gtk_notebook_set_current_page.
- (addressbook_source_dialog_set_source): same.
- (auth_optionmenu_activated): gtk_container_children ->
- gtk_container_get_children.
- (ssl_optionmenu_activated): same.
- (ssl_optionmenu_selected): same, and gtk_notebook_set_page ->
- gtk_notebook_set_current_page.
- (scope_optionmenu_activated): same.
- (set_advanced_button_state): same.
- (addressbook_ldap_init): hook "response" to gtk_widget_destroy to
- make the dialog go away when clicked.
- (addressbook_ldap_auth): same.
- (addressbook_root_dse_query): same.
- (do_ldap_root_dse_query): same.
- (addressbook_config_control_new): fix return type and cast.
- (main): remove call to gtk_widget_push_visual.
-
- * gui/component/addressbook-config.h:
- addressbook_config_control_new returns a BonoboObject, not a
- BonoboControl.
-
- * gui/component/addressbook.c: remove e-unicode.h include.
-
- * backend/pas/Makefile.am (INCLUDES): Add
- -DLIBGNOME_DISABLE_DEPRECATED.
-
- * backend/ebook/Makefile.am (INCLUDES): Add
- -DLIBGNOME_DISABLE_DEPRECATED.
-
- * backend/ebook/e-card.c (e_card_get_property): remove misleading
- comment.
-
-2002-12-17 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (build_card_from_entry):
- g_strcasecmp -> g_ascii_strcasecmp.
- (FIND_INSERT): same.
-
- * backend/pas/pas-backend-file.c (pas_backend_file_load_uri):
- g_dirname -> g_path_get_dirname.
-
- * backend/pas/Makefile.am (INCLUDES): add
- -DG_DISABLE_DEPRECATED.
-
- * backend/ebook/Makefile.am (INCLUDES): add
- -DG_DISABLE_DEPRECATED.
-
-2002-12-17 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names-manager.c
- (uris_listener): oops, use strcmp, not !strcmp here.
-
-2002-12-17 Chris Toshok <toshok@ximian.com>
-
- [ Fixes bug #35135 ]
- * backend/ebook/e-book-util.c (set_default_book_uri_local): don't
- free the default_book_uri here, it's done in set_default_book_uri.
- (set_default_book_uri): break some stuff out from
- set_default_book_uri_from_bonobo_conf to here so it can be used
- both from that function and the bonobo listener.
- (default_folder_listener): set the new default book uri.
- (set_default_book_uri_from_bonobo_conf): install the bonobo conf
- listener so we'll get updates.
-
-2002-12-16 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook-config.c
- (addressbook_config_control_new): Use
- evolution_shell_client_corba_objref() instead of BONOBO_OBJREF()
- to get the Shell CORBA object.
-
-2002-12-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * gui/component/addressbook-config.c: Don't #include
- <e-util/e-html-utils.h>
-
-2002-12-09 Chris Toshok <toshok@ximian.com>
-
- * gui/search/e-addressbook-search-dialog.[ch]: GObject-ize this.
-
-2002-12-09 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook.c (load_uri_auth_cb): pass
- "Addressbook" to e_passwords*.
- (addressbook_authenticate): same.
-
-2002-12-09 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook.c (search_cb): remove
- PENDING_PORT_WORK.
- (addressbook_search_activated): same.
- (addressbook_query_changed): same.
-
- * gui/component/Makefile.am (libevolution_addressbook_la_LIBADD):
- add libfilter.la back in.
-
-2002-12-09 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/widgets/e-minicard-control.c: #define MINICARD_CONTROL_ID.
-
-2002-12-08 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-addressbook-util.c (e_addressbook_error_dialog):
- connect ::response to gtk_widget_destroy so the dialog goes away.
-
- * gui/widgets/e-minicard-label.c (e_minicard_label_construct):
- don't use font_gdk anymore on EText. it doesn't exist.
-
-2002-12-08 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-addressbook-reflow-adapter.c (text_height): this
- uses pango now.
- (addressbook_height): same.
-
-2002-12-06 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-book.c (e_book_commit_card): use e_card_set_book
- instead of basically duplicating its code here.
- (e_book_add_card): same.
-
-2002-12-06 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/e-cardlist-model.c: #include <string.h>.
-
- * gui/component/addressbook-storage.c: #include <string.h>,
- <ctype.h>, <unistd.h>.
-
- * gui/component/addressbook-factory.c: Removed.
-
- * gui/component/addressbook-component.c: #include
- <bonobo/bonobo-main.h>, <unistd.h> and <string.h>.
- (create_view): addressbook_new_control() instead of
- addressbook_factory_new_control().
-
- * gui/component/select-names/e-select-names.c
- (e_addressbook_create_ebook_table): Removed unused variable.
- (e_select_names_add_section): Removed unused variable.
-
- * gui/component/select-names/e-select-names-manager.c
- (focus_in_cb): Use g_source_remove() here instead of
- gtk_timeout_remove().
-
- * gui/component/component-factory.c: New.
-
- * gui/widgets/e-minicard-control.c
- (e_minicard_control_factory_init): Removed.
- (e_minicard_control_control_factory): Removed.
- (e_minicard_control_new): New.
-
- * gui/component/e-address-widget.c
- (e_address_widget_factory_init): Removed.
- (e_address_widget_new_control): Renamed from
- e_address_widget_factory_new_control(), made public.
- (e_address_widget_factory): Removed.
-
- * gui/component/e-address-popup.c (e_address_popup_new_control):
- New.
- (e_address_popup_factory_new_control): Removed.
- (e_address_popup_factory): Removed.
- (e_address_popup_factory_init): Removed.
-
- * gui/component/addressbook-config.c
- (addressbook_config_register_factory): Removed.
- (addressbook_config_create_control): New.
-
- * gui/component/addressbook-component.c
- (addressbook_component_factory_init): Removed.
- (addressbook_component_get_object): New.
- (owner_set_cb): Do not call addressbok_config_register_factory().
-
- * gui/component/addressbook.c (addressbook_factory_init): Removed.
- (addressbook_new_control): Renamed from
- addressbook_factory_new_control().
-
-2002-12-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * gui/component/select-names/e-select-names.etspec: Use collate
- for sorting rather than the normal string sort. This fixes bug
- #26335 without causing bug #33933 :-)
-
-2002-11-30 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (pas_backend_ldap_connect): only
- enable the LDAPv3 stuff if TLS is being used. Also, deal with
- naming errors returned from query_ldap_root_dse, as some servers
- (older openldap servers among others i'm sure) don't have a root
- dse at all.
-
-2002-12-02 Not Zed <NotZed@Ximian.com>
-
- * gui/widgets/e-addressbook-view.c (e_contact_print_button):
- gnomedialog -> gtkdialog stuff. print dialog is a gtkdialog now.
-
- * gui/contact-editor/e-contact-editor.c: include gtkstock.h
-
-
-2002-11-27 Not Zed <NotZed@Ximian.com>
-
- * gui/contact-editor/e-contact-editor-address.c: #include gtkstock.h
-
-2002-11-29 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-minicard-view-widget.c (column_width_changed): the
- detail is supposed to go after the signal id, not at the end of
- the parameter list.
-
-2002-11-28 Chris Toshok <toshok@ximian.com>
- [ roll forward from 1.2 branch, partial fix for #31763 ]
- * gui/component/select-names/select-names.glade: add the Find
- button back in.
-
-2002-11-28 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-addressbook-view.c (create_minicard_view): remove
- the button_press_event handler (that did nothing). this makes it
- so button presses actually get to the canvas (and therefore we can
- now drag the lines in the reflow widget).
-
-2002-11-26 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-editor/e-contact-quick-add.c: add include for
- gtkstock.h.
-
- * gui/contact-list-editor/e-contact-list-model.c
- (e_contact_list_model_add_destination): add pre_change call.
- (e_contact_list_model_remove_row): same.
- (e_contact_list_model_remove_all): same.
-
- * gui/contact-list-editor/e-contact-list-editor.c
- (e_contact_list_editor_new): ref/sink the contact list editor so
- we don't get the floating unref warning from gtk.
-
- * gui/contact-editor/e-contact-editor.c (e_contact_editor_new):
- ref/sink the contact editor so we don't get the floating unref
- warning from gtk.
- (e_contact_editor_init): use g_build_filename instead of
- g_concat_dir_and_file.
-
- * gui/widgets/e-minicard-label.c
- (e_minicard_label_resize_children): use MAX (value, 0) to make
- sure we aren't passing negative values for clip-widths.
-
- * gui/widgets/e-minicard.c (e_minicard_realize): use MAX (value,
- 0) to make sure we aren't passing negative values for widths.
-
- * gui/contact-editor/e-contact-editor.c (e_contact_editor_init):
- use g_build_filename.
-
-2002-11-26 Chris Toshok <toshok@ximian.com>
-
- [ roll forward from 1.2 branch ]
- * backend/pas/pas-backend-file.c
- (pas_backend_file_process_get_vcard): never pass NULL as the vcard
- to the corba call, it causes a crash. This particular bug bit us
- when we opened a card that contained an unresolvable related
- contact.
-
-2002-11-26 Chris Toshok <toshok@ximian.com>
-
- [ roll forward from 1.2 branch, Fixes addressbook bug #28945 ]
- * backend/ebook/e-card.c (e_card_get_vobject): if the email
- property is xml, get the real address from the e-destination.
- Fixes saving contact lists.
-
-2002-11-26 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-minicard.c (e_minicard_reflow): remove redundant
- setting of y2.
-
- * gui/contact-list-editor/e-contact-list-editor.c
- (e_contact_list_editor_init): show the table.
-
- * gui/component/select-names/e-select-names-completion.c: remove
- an unnecessary #include.
-
- * gui/component/addressbook-storage.c (addressbook_storage_setup):
- use g_build_filename.
-
- * gui/component/addressbook-component.c (remove_folder): use
- g_build_filename.
- (add_creatable_item): same.
- (ensure_completion_uris_exist): same, and use the right gconf
- paths for completion uris.
-
-2002-11-26 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names-manager.c
- (read_completion_books_from_db): use new schema for
- completion/uris.
- (uris_listener): same.
-
- * gui/component/select-names/e-select-names.h: Convert to
- GtkDialog from GnomeDialog.
-
- * gui/component/select-names/e-select-names.c: Convert to
- GtkDialog from GnomeDialog.
- (folder_selected): use new schema for last_used_uri.
- (e_select_names_init): same.
- (e_select_names_set_default): use pango markup to set
- bold/not-bold.
- (e_select_names_add_section): don't bother creating an EEntry, we
- can use pango and a normal label. This also keeps us from
- wrapping "contacts ->" at the '-'.
-
- * gui/component/apps_evolution_addressbook.schemas: new file.
-
- * gui/component/Makefile.am: add the schema stuff.
-
-2002-11-24 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook-config.c (query_for_supported_bases):
- show the etable.
- (addressbook_add_server_druid): show_all before returning the
- dialog, so the druid shows up.
-
-2002-11-23 Chris Toshok <toshok@ximian.com>
-
- [ roll forward from the 1.2 branch. fixes #25540, part of #29630,
- as well as other selection issues in the contact editor and ACL
- issues in the ldap backend ]
- * backend/pas/pas-backend-ldap.c (check_schema_support): reset the
- schema check state to FALSE if the read returned nothing (and the
- user had not authenticated). we'll requery if/when they auth.
- (query_ldap_root_dse): free the schema dn before assigning over
- it.
- (pas_backend_ldap_connect): added a diagnostic warning about the
- root dse query failing in anonymous mode (if it in fact did fail.)
- (pas_backend_ldap_process_authenticate_user): if we successfully
- authed, requery the root dse to pick up any attributes that might
- be protected, and retry the schema query if that failed before.
-
- * gui/contact-editor/e-contact-editor.c (full_name_clicked): set
- the dialog's editable state based on the new field
- "fullname_editable", and only do the Ok button handling if this
- flag is TRUE.
- (full_addr_clicked): set the dialog's editable state based on the
- editable state for the particular address (from
- editor->address_editable[]). also, only do the Ok button handling
- if this flag is TRUE.
- (_address_arrow_pressed): use the address_editable array to
- determine whether the address text and the mailing address
- checkbutton are sensitive.
- (enable_writable_fields): figure out if fullname_editable is
- TRUE/FALSE, also, init the address_editable flags based on the
- field list, and handle the address checkbutton.
-
- * gui/contact-editor/fulladdr.glade: change the label names to
- label-<name> to match {entry,combo}-<name>.
-
- * gui/contact-editor/fullname.glade: same.
-
- * gui/contact-editor/e-contact-editor-fullname.c
- (e_contact_editor_fullname_class_init): rename ARG_IS_READ_ONLY to
- ARG_EDITABLE, to reflect the correct sense of the flag.
- (e_contact_editor_fullname_set_arg): same, and make the labels
- sensitive/insensitive depending on the editable state of the
- dialog.
-
- * gui/contact-editor/e-contact-editor-address.c
- (e_contact_editor_address_class_init): rename ARG_IS_READ_ONLY to
- ARG_EDITABLE, to reflect the correct sense of the flag.
- (e_contact_editor_address_set_arg): same, and make the labels
- sensitive/insensitive depending on the editable state of the
- dialog.
-
-2002-11-22 Chris Toshok <toshok@ximian.com>
-
- [ roll forward Sean.Gao@sun.com's fix for #16870 from the 1.2
- branch ]
- * backend/ebook/evolution-ldif-importer.c (getNextLDIFEntry):
- check for both LR and CRLF as empty line markers.
-
-2002-11-22 Chris Toshok <toshok@ximian.com>
-
- [ rolling forward fix for #34254 from 1.2 branch ]
- * backend/ebook/evolution-vcard-importer.c (check_file_is_vcard):
- use g-ascii_strncasecmp instead of strncmp.
- (support_format_fn): use g_ascii_strcasecmp instead of strcmp.
-
-2002-11-20 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook-storage.h: roll forward the scope fix.
-
-2002-11-20 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-editor/e-contact-editor.c: roll forward the fix for
- the contact editor.
-
-2002-11-21 Not Zed <NotZed@Ximian.com>
-
- * gui/component/select-names/e-select-names-bonobo.c
- (entry_changed): Pass type to bonobo_ctonrol_set_property, and
- also NULL terminate the valist.
-
- * gui/component/select-names/e-select-names-text-model.c
- (changed_cb): Fix signature for signal.
-
-2002-11-19 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/select-names/GNOME_Evolution_Addressbook_SelectNames.server.in.in,
- * gui/component/select-names/Makefile.am: Same changes as below
- for the SelectNames component.
-
-2002-11-18 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_init): show the custom table.
-
-2002-11-18 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/gal-view-minicard.c (gal_view_minicard_attach):
- remove the cast to (int) - column_width is a double.
-
- * gui/widgets/e-minicard.c (e_minicard_class_init): the height
- property is only readable, not readwrite.
-
- * gui/widgets/e-minicard-view-widget.c
- (e_minicard_view_widget_class_init): make column_width a double
- property.
- (e_minicard_view_widget_set_property): don't cast to (int).
- column_width is double in the e-minicard-view.
- (e_minicard_view_widget_realize): same.
- (e_minicard_view_widget_get_property): use g_value_set_double for
- column_width.
-
-2002-11-17 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/Makefile.am (servers_DATA): oops,
- missed some "oaf"'s.
-
-2002-11-16 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-editor/e-contact-editor.c
- (e_contact_editor_build_phone_ui): sink the popup.
- (e_contact_editor_build_email_ui): same.
- (e_contact_editor_build_address_ui): same.
-
- * gui/component/addressbook-config.c (ldap_dialog_new): show
- everything from dialog->page down, so custom widgets show up.
-
-2002-11-15 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/Makefile.am: Added rule to generate
- GNOME_Evolution_Addressbook.server.in from
- GNOME_Evolution_Addressbook.server.in.in, substituting
- @LIBEXECDIR@.
-
- * GNOME_Evolution_Addressbook.server.in.in: Renamed from
- GNOME_Evolution_Addressbook.server.in. Added @LIBEXECDIR@ before
- the location of the executable.
-
- * gui/component/select-names/select-names.glade: Ported to Glade
- 2.
-
- * gui/component/select-names/recipient.glade: Ported to Glade 2.
-
-2002-11-15 Rodney Dawes <dobey@ximian.com>
-
- * gui/component/addressbook-component.c: Use bonobo_main_quit.
-
-2002-11-14 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/gal-view-factory-minicard.c: clean this up a tad.
-
- * gui/widgets/e-addressbook-view.c (init_collection): re-enable
- this.
- (setup_menus): same.
-
- * gui/widgets/gal-view-minicard.[ch]: more GObject work.
-
-2002-11-12 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-editor/e-contact-editor.c (_popup_position): push_in
- = FALSE, no clue why... :)
- (_arrow_pressed): call g_signal_stop_emission here, seems to fix
- things.
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_init): fix warnings.
-
- * gui/component/select-names/e-select-names-manager.c
- (e_select_names_manager_activate_dialog): fix warning.
-
- * gui/component/addressbook.c (forget_passwords_cb): remove the
- PENDING_PORT ifdef.
- (load_uri_auth_cb): same.
- (addressbook_authenticate): same.
-
- * gui/component/addressbook-factory.c (main): same.
-
- * gui/component/addressbook-storage.c (load_source_data): be
- silent about text nodes if they contain nothing but whitespace.
-
-2002-11-11 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-card-cursor.c (pas_card_cursor_dispose): guard
- against multiple invocations.
-
- * backend/pas/pas-backend-ldap.c (view_destroy): change signature
- to that of a weak ref notify function.
- (cursor_destroy): same.
- (pas_backend_ldap_book_destroy_cb): same.
- (get_cursor_handler): ::destroy -> weak_ref.
- (pas_backend_ldap_process_get_book_view): same.
- (pas_backend_ldap_add_client): same.
-
- * backend/pas/pas-backend-file.c (cursor_destroy): change
- signature to that of a weak ref notify function.
- (view_destroy): same.
- (pas_backend_file_book_destroy_cb): same.
- (pas_backend_file_process_get_cursor): ::destroy -> weak_ref.
- (pas_backend_file_process_get_book_view): same.
- (pas_backend_file_process_get_completion_view): same.
- (pas_backend_file_process_get_changes): same.
- (pas_backend_file_add_client): same.
-
- * backend/ebook/test-client.c (get_cursor_cb): unref the book and
- exit here.
- (get_card_cb): pass a query string to get_cursor.
-
- * backend/ebook/e-book-view.c (e_book_view_class_init): correct
- marshaller for "card_added".
-
-2002-11-11 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/test-reflow.c (destroy_callback): change signature
- to that of a weak ref notify function.
- (main): ::destroy -> weak_ref.
-
- * gui/widgets/test-minicard.c (destroy_callback): change signature
- to that of a weak ref notify function.
- (main): ::destroy -> weak_ref.
-
- * gui/widgets/test-minicard-view.c (destroy_callback): change
- signature to that of a weak ref notify function.
- (main): ::destroy -> weak_ref.
-
- * gui/widgets/test-minicard-label.c (destroy_callback): change
- signature to that of a weak ref notify function.
- (main): ::destroy -> weak_ref.
-
- * gui/widgets/e-minicard-widget.c (e_minicard_widget_init): ifdef
- out the call to gnome_canvas_set_scroll_region. It doesn't seem
- necessary judging from the rest of the code, and it also crashes
- the addressbook if it's in.
-
- * gui/widgets/e-minicard-widget-test.c (destroy_callback): change
- signature to that of a weak ref notify function.
- (main): ::destroy -> weak_ref.
-
- * gui/widgets/e-minicard-control.c (free_struct): change signature
- to that of a weak ref notify function.
- (e_minicard_control_factory): ::destroy -> weak_ref.
-
- * gui/widgets/e-addressbook-view.c (e_addressbook_view_init):
- ::destroy -> weak_ref.
- (e_addressbook_view_print): same.
- (free_closure): change signature to that of a weak ref notify
- function.
- (e_contact_print_destroy): same.
- (invisible_destroyed): same.
-
- * gui/widgets/e-addressbook-util.c
- (e_addressbook_prompt_save_dialog): convert from GnomeDialog to
- GtkDialog.
- (e_addressbook_show_multiple_cards): same.
-
- * gui/contact-list-editor/e-contact-list-editor.c
- (prompt_to_save_changes): change response ids to use
- GTK_RESPONSE_.
-
- * gui/component/select-names/e-select-names-manager.c
- (clear_widget): new function.
- (e_select_names_manager_activate_dialog): ::destroy -> weak_ref.
-
- * gui/component/select-names/e-select-names.c (clear_widget):
- change signature to that of a weak ref notify function.
- (e_select_names_init): ::destroy -> weak_ref.
-
- * gui/component/e-address-popup.c (mini_wizard_destroy_cb): change
- signature to that of a weak ref notify function.
- (mini_wizard_new): ::destroy -> weak_ref.
-
- * gui/component/addressbook-config.c
- (addressbook_source_dialog_destroy): change signature to that of a
- weak ref notify function.
- (ldap_config_control_destroy_callback): same.
- (addressbook_add_server_druid): ::destroy -> weak_ref.
- (addressbook_edit_server_dialog): same.
- (ldap_config_control_new): same.
-
- * gui/component/addressbook.c (destroy_callback): change signature
- to that of a a weak ref notify function.
- (addressbook_factory_new_control): ::destroy -> weak_ref.
-
- * gui/merging/e-card-merging.c (response): rename clicked to this,
- and destroy the dialog here.
- (match_query_callback): ::clicked -> ::response
-
- * gui/merging/e-card-merging-book-commit-duplicate-detected.glade:
- convert.
-
- * gui/merging/e-card-duplicate-detected.glade: same.
-
-2002-11-11 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-editor/e-contact-editor.c (_arrow_pressed): change
- around a little, still ifdefed though.
-
- * gui/contact-editor/e-contact-save-as.c (file_exists): same.
- (save_it): deal with the GtkDialog response ids.
-
- * gui/contact-editor/e-contact-editor.c
- (e_contact_editor_confirm_delete): just build the dialog here
- (using gtk_message_dialog*).
-
- * gui/contact-editor/Makefile.am (glade_DATA): remove
- file-exists.glade and e-contact-editor-confirm-delete.glade.
-
-2002-11-11 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-card-cursor.c (pas_card_cursor_dispose): guard
- against multiple invocations.
-
- * backend/pas/pas-backend-ldap.c (view_destroy): change signature
- to that of weak ref's notify function - also, don't use the type
- check macros on the freed GObject.
- (cursor_destroy): same.
- (pas_backend_ldap_book_destroy_cb): same.
- (pas_backend_ldap_add_client): use weak_ref insteead of ::destroy.
- (get_cursor_handler): same.
- (pas_backend_ldap_process_get_book_view): same.
-
- * backend/pas/pas-backend-file.c (cursor_destroy): change
- signature to that of weak ref's notify function - also, don't use
- the type check macros on the freed GObject.
- (pas_backend_file_book_destroy_cb): same.
- (view_destroy): same.
- (pas_backend_file_process_get_cursor): use weak_ref instead of
- ::destroy.
- (pas_backend_file_process_get_book_view): same.
- (pas_backend_file_process_get_completion_view): same.
- (pas_backend_file_process_get_changes): same.
- (pas_backend_file_add_client): same.
-
-2002-11-10 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-card-sexp.c
- (pas_backend_card_sexp_dispose): guard against multiple
- invocations.
-
- * backend/pas/pas-card-cursor.c (pas_card_cursor_dispose): same.
-
- * backend/pas/pas-book.c (pas_book_dispose): same.
-
- * backend/pas/pas-book-view.c (pas_book_view_dispose): same.
-
- * backend/pas/pas-book-factory.c (pas_book_factory_dispose): same.
-
- * backend/pas/pas-backend-summary.c (pas_backend_summary_dispose): same.
-
- * backend/pas/pas-backend-ldap.c (pas_backend_ldap_dispose): same.
-
- * backend/pas/pas-backend-file.c (pas_backend_file_dispose): same.
-
- * backend/ebook/e-book-listener.c (e_book_listener_dispose): guard
- against multiple invocations.
-
- * backend/ebook/e-card.c (e_card_dispose): same.
-
- * backend/ebook/e-card-simple.c (e_card_simple_dispose): same.
-
- * backend/ebook/e-card-cursor.c (e_card_cursor_dispose): same.
-
- * backend/ebook/e-book.c (e_book_dispose): same.
-
- * backend/ebook/e-book-view-listener.c (e_book_view_listener_dispose): same.
-
-2002-11-08 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-addressbook-model.c (free_data): guard against
- multiple invocations.
- (remove_book_view): same.
- (addressbook_dispose): same.
-
- * gui/widgets/e-addressbook-view.c (e_addressbook_view_dispose):
- same.
-
- * gui/widgets/e-minicard-view-widget.c
- (e_minicard_view_widget_dispose): same.
-
- * gui/widgets/e-minicard-view.c (e_minicard_view_dispose): same.
-
- * gui/widgets/e-minicard-widget.c (e_minicard_widget_dispose):
- same.
-
-2002-11-08 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-addressbook-reflow-adapter.c
- (addressbook_get_property): oops, missed these casts.
-
- * gui/component/addressbook.c (get_master_list): remove the
- PENDING_PORT_WORK ifdef, just ported ECategoriesMasterList.
- (make_suboptions): same.
-
- * gui/contact-editor/e-contact-editor.c (categories_clicked):
- same.
-
-2002-11-08 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/test-reflow.c: port work.
-
- * gui/widgets/test-minicard-view.c: port work.
-
- * gui/widgets/e-minicard.[ch]: port work.
-
- * gui/widgets/e-minicard-widget.c: port work.
-
- * gui/widgets/e-minicard-view.c: port work.
-
- * gui/widgets/e-minicard-view-widget.c
- (e_minicard_view_widget_size_allocate): gtk_->g_ change i missed.
- (e_minicard_view_widget_reflow): same.
-
- * gui/widgets/e-minicard-label.c: port work.
-
- * gui/widgets/e-minicard-control.c (get_prop): gtk_->g_ change i
- missed.
-
- * gui/widgets/e-addressbook-view.c (setup_menus): ifdef this
- PENDING_PORT_WORK for now.
- (has_email_address_1): gtk_->g_ change i missed.
- (print): remove the PENDING_PORT_WORK from here, as the print_*
- symbols now resolve.
- (delete): gtk_->g_ changes.
- (new_card): same.
- (new_list): same.
- (sources): same.
- (create_minicard_view): same.
- (table_double_click): same.
- (create_table_view): same.
- (e_contact_print_destroy): same.
- (e_contact_print_button): same.
- (e_addressbook_view_print): same, and remove the PENDING_PORT_WORK
- ifdef.
- (e_addressbook_view_print_preview): same.
- (do_remove): gtk_->g_ changes.
- (e_addressbook_view_save_state): same.
- (view_transfer_cards): same.
-
- * gui/widgets/e-addressbook-view.h (struct _EAddressbookView):
- GtkObject -> GObject.
-
- * gui/widgets/e-addressbook-util.c (e_addressbook_error_dialog):
- GnomeDialog -> GtkDialog.
-
- * gui/widgets/e-addressbook-table-adapter.c
- (addressbook_set_value_at): a gtk_->g_ change i missed.
- (e_addressbook_table_adapter_class_init): gtk_type_class ->
- g_type_class_peek_parent.
-
- * gui/widgets/e-addressbook-reflow-adapter.c
- (addressbook_get_property): use g_object_get_property for
- aggregated properties.
- (e_addressbook_reflow_adapter_class_init): gtk_type_class ->
- g_type_class_peek_parent.
-
- * gui/merging/e-card-merging.c (match_query_callback): some misc
- gtk_->g_ changes i missed.
-
-2002-11-08 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names-model.h: parent class
- is GObjectClass.
-
- * gui/component/select-names/e-simple-card-bonobo.c
- (impl_dispose): guard against multiple invocations, and chain
- dispose.
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_dispose): guard against multiple invocations.
-
- * gui/component/select-names/e-select-names-text-model.c
- (e_select_names_text_model_dispose): guard against multiple
- invocations.
- (e_select_names_text_model_set_source): fix casts.
-
- * gui/component/select-names/e-select-names-table-model.c
- (e_select_names_table_model_add_source): remove the GTK_OBJECT
- cast, fixes a warning.
- (clear_info): guard against multiple invocations from ::dispose.
-
- * gui/component/select-names/e-select-names-manager.c
- (e_select_names_manager_dispose): same.
-
- * gui/component/select-names/e-select-names-completion.c
- (e_select_names_completion_dispose): same.
-
- * gui/component/select-names/e-select-names-bonobo.c
- (impl_dispose): guard against multiple invocations.
-
-2002-11-08 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-list-editor/contact-list-editor.glade: convert to glade-2
-
- * gui/contact-list-editor/e-contact-list-editor.c: port work.
-
- * gui/contact-list-editor/e-contact-list-model.[ch]: port work.
-
-2002-11-08 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-editor/e-contact-editor-address.[ch]: port work.
-
- * gui/contact-editor/e-contact-editor-fullname.[ch]: port work.
-
- * gui/contact-editor/e-contact-editor.[ch]: port work.
-
- * gui/contact-editor/e-contact-quick-add.c: port work.
-
- * gui/contact-editor/e-contact-save-as.c: port work.
-
-2002-11-08 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-book-util.c
- (set_default_book_uri_from_config_db): prepend /apps/Evolution to
- config db paths.
-
- * gui/component/select-names/e-select-names-manager.c (read_completion_books_from_db): same.
- (uris_listener): same.
-
-2002-11-08 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-editor/e-contact-editor.c: more porting work.
-
- * e-contact-editor-fullname.[ch]: more porting work.
-
- * e-contact-editor.c: more porting work.
-
- * e-contact-quick-add.c: more porting work.
-
- * e-contact-save-as.c: more porting work.
-
- * test-editor.c: more porting work.
-
- * e-contact-editor-confirm-delete.glade, file-exists.glade,
- fulladdr.glade, fullname.glade: run these through
- libglade-convert.
-
-2002-11-07 Chris Toshok <toshok@ximian.com>
-
- * gui/component/Makefile.am (evolution_addressbook_LDADD): add
- lots of libs back in since they're building now.
-
- * gui/component/addressbook-config.c: more porting work.
-
- * gui/component/addressbook.c: more porting work.
-
- * gui/component/e-address-popup.[ch]: more porting work.
-
- * gui/component/e-address-widget.[ch]: more porting work.
-
- * gui/component/e-cardlist-model.[ch]: more porting work.
-
-2002-11-07 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names-bonobo.[ch]: more
- porting work.
-
- * gui/component/select-names/e-select-names-completion.[ch]: more
- porting work.
-
- * gui/component/select-names/e-select-names-manager.[ch]: more
- porting work.
-
- * gui/component/select-names/e-select-names-model.[ch]: more
- porting work.
-
- * gui/component/select-names/e-select-names-popup.c: more
- porting work.
-
- * gui/component/select-names/e-select-names-table-model.[ch]: more
- porting work.
-
- * gui/component/select-names/e-select-names-text-model.[ch]: more
- porting work.
-
- * gui/component/select-names/e-select-names.[ch]: more
- porting work.
-
-2002-11-07 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/Makefile.am: tests are linking now, and link in
- libcamel.la.
-
- * backend/ebook/e-destination.c (e_destination_get_name): un-ifdef
- since camel is compiling.
- (e_destination_get_email): same.
- (e_destination_get_address): same.
- (e_destination_get_textrep): same.
-
- * backend/ebook/e-card-compare.c (name_fragment_match): use e_utf8_casefold_*.
- (name_fragment_match_with_synonyms): same.
- (e_card_compare_name_to_string_full): same.
- (e_card_compare_name): same.
-
-2002-11-07 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-book-util.h: add prototypes for e_utf8_casefold_collate{_len}
-
- * backend/ebook/e-book-util.c (e_utf8_casefold_collate_len): move
- utf8_casefold_collate_len here.
- (e_utf8_casefold_collate): move utf8_casefold_collate here.
-
-2002-11-06 Chris Toshok <toshok@ximian.com>
-
- * printing/e-contact-print-envelope.c: port this to
- gnome2/gnomeprint2.
-
- * printing/e-contact-print-style-editor.c: same.
-
- * printing/e-contact-print.c: same.
-
- * printing/test-contact-print-style-editor.c: same.
-
- * printing/test-print.c: same.
-
- * printing/e-contact-print.glade: libglade-convert to libglade-2.
-
- * printing/Makefile.am (contact_print_test_LDADD)
- (contact_print_style_editor_test_LDADD): remove libcamel.la from
- these for the time being to get things linking.
-
-2002-11-06 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/gal-view-minicard.[ch]: gobjectify this.
-
- * gui/widgets/e-minicard.[ch]: gobjectify this.
- (e_minicard_class_init): change the
- min/max values of the width/height paramspecs so that they can
- actually be set to something other than 0.0.
-
- * gui/widgets/e-minicard-widget.[ch]: gobjectify this.
-
- * gui/widgets/e-minicard-view.[ch]: gobjectify this.
- (set_empty_message): don't need e_utf8_from_locale_string anymore.
-
- * gui/widgets/e-minicard-view-widget.[ch]: gobjectify this.
-
- * gui/widgets/e-minicard-label.[ch]: gobjectify this.
-
- * gui/widgets/e-addressbook-view.[ch]: gobjectify this.
-
- * gui/widgets/e-addressbook-table-adapter.[ch]: gobjectify this.
-
- * gui/widgets/e-addressbook-reflow-adapter.[ch]: gobjectify this.
-
- * gui/widgets/e-addressbook-model.[ch]: gobjectify this.
-
- * gui/widgets/e-minicard-control.c (e_minicard_control_factory):
- fix bonobo_persist_stream_new api change.
-
- * gui/contact-list-editor/e-contact-list-model.c
- (e_contact_list_model_add_destination): get rid of the
- gtk_object_sink here.
-
- * gui/component/ldap-config.glade: glade-2 version of this file.
-
- * gui/component/e-address-popup.c (e_address_popup_refresh_names):
- don't need e_utf8_to_gtk_string anymore.
-
- * gui/component/addressbook.c (make_suboptions): don't need
- e_utf8_to_locale_string anymore.
-
- * gui/component/addressbook-config.c
- (addressbook_dialog_get_source): get rid of the e_utf8 gtk_entry
- functions.
- (addressbook_source_dialog_set_source): same.
- (general_tab_check): same.
- (port_changed_func): same.
- (connecting_tab_check): same.
- (query_for_supported_bases): same.
- (display_name_check): same.
- (display_name_page_prepare): same.
- (edit_source_clicked): same.
- (addressbook_config_create_new_source): same.
-
-2002-11-06 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-card-sexp.c
- (pas_backend_card_sexp_class_init): use g_type_class_peek_parent.
-
- * backend/pas/pas-card-cursor.c (pas_card_cursor_class_init): same.
-
- * backend/pas/pas-book-view.c (pas_book_view_class_init): same.
-
- * backend/pas/pas-book-factory.c (pas_book_factory_class_init): same.
-
- * backend/pas/pas-backend-summary.c (pas_backend_summary_class_init): same.
-
- * backend/pas/pas-backend-ldap.c (pas_backend_ldap_class_init): same.
-
- * backend/pas/pas-backend-file.c (pas_backend_file_class_init): same.
-
- * backend/ebook/e-book-marshal.list: ENUM -> INT.
-
- * backend/ebook/e-book-view.c (e_book_view_dispose): guard against
- this being called multiple times.
- (e_book_view_class_init): ENUM -> INT in the sequence_complete
- signal.
-
- * backend/ebook/e-book.c (e_book_do_response_open): un-ifdef the
- component_died signal stuff.
-
-2002-11-06 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-book-util.c (e_book_expand_uri): call
- g_build_filename, not g_build_path.
-
-2002-11-06 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-destination.[ch]: fix the gnome-xml headers.
-
-2002-11-06 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/gal-view-minicard.c: fix the gnome-xml headers.
-
- * gui/widgets/e-addressbook-view.c
- (e_addressbook_view_class_init): convert from gtk signals and args
- to GSignal and GObject properties.
- (e_addressbook_view_dispose): rename _destroy to this.
- (e_addressbook_view_set_property): rework _set_arg to this.
- (e_addressbook_view_get_property): rework _get_arg to this.
- (display_view): if we're here we need to choose a view, regardless
- of whether or not the GAL_IS_VIEW_* macros tell us which type it
- is.
-
- * gui/widgets/e-addressbook-table-adapter.c: fix the gnome-xml
- headers.
-
- * gui/widgets/e-addressbook-model.c
- (e_addressbook_model_class_init): use INT, not ENUM in the signal here.
-
- * gui/component/addressbook-config.c: another big gtk_* -> g_*
- renaming.
-
- * gui/component/addressbook.c: same.
-
- * gui/component/e-address-popup.c: same.
-
- * gui/component/e-address-widget.c: same.
-
- * gui/component/e-cardlist-model.c: fix the gnome-xml headers, and
- more gtk_* -> g_* renaming.
-
- * gui/component/addressbook-component.c (owner_set_cb): use
- evolution_shell_client_corba_objref as per ettore's change to
- EvolutionShellClient..
- (create_view): fix the call to bonobo_control_set_property.
- (create_component): gtk_signal_connect -> g_signal_connect.
-
- * gui/component/addressbook-storage.c: fix the gnome-xml
- headers.
- (addressbook_storage_setup): use
- evolution_shell_client_corba_objref as per ettore's change to
- EvolutionShellClient..
- (addressbook_get_other_contact_storage): gtk_signal_connect ->
- g_signal_connect.
- (load_source_data): root->childs -> root->childrens.
-
-2002-11-06 Chris Toshok <toshok@ximian.com>
-
- * gui/search/e-addressbook-search-dialog.c: fix some #include's.
-
-2002-11-06 Chris Toshok <toshok@ximian.com>
-
- * Makefile.am (SUBDIRS): only build the backend and gui dirs for
- now. printing and conduits are no-man's land at present.
-
- * addressbook/gui/merging/e-card-merging.[ch]: Port to
- GObject/gnome2.
-
-2002-11-05 Chris Toshok <toshok@ximian.com>
-
- * gui/component/.cvsignore: ignore the new .server file.
-
- * gui/component/Makefile.am: typical port stuff. switch the .oaf
- to .server, and leave out a lot of libs so we can actually get
- things linking.
-
- * gui/component/GNOME_Evolution_Addressbook.server.in: rename
- .oaf.in here.
-
- * gui/component/addressbook-component.c: Port to GObject/gnome2.
-
- * gui/component/addressbook-config.c: Port to GObject/gnome2.
-
- * gui/component/addressbook-factory.c: Port to GObject/gnome2.
-
- * gui/component/addressbook-storage.c: Port to GObject/gnome2.
-
- * gui/component/addressbook.[ch]: Port to GObject/gnome2.
-
- * gui/component/e-address-popup.[ch]: Port to GObject/gnome2.
-
- * gui/component/e-address-widget.[ch]: Port to GObject/gnome2.
-
- * gui/component/e-cardlist-model.h: Port to GObject/gnome2.
-
-2002-11-05 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-list-editor/.cvsignore: ignore the marshal generated
- stuff.
-
- * gui/contact-list-editor/Makefile.am: typical port stuff. add
- marshaller generation foo, dist it...
-
- * gui/contact-list-editor/e-contact-list-editor.[ch]: Port to
- GObject/gnome2.
-
- * gui/contact-list-editor/e-contact-list-model.[ch]: Port to
- GObject/gnome2.
-
-2002-11-05 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-editor/.cvsignore: ignore the marshal generated
- stuff.
-
- * gui/contact-editor/Makefile.am: typical port stuff. add
- marshaller generation foo, dist it...
-
- * gui/contact-editor/e-contact-editor-address.[ch]: Port to GObject/gnome2.
-
- * gui/contact-editor/e-contact-editor-fullname.c: Port to GObject/gnome2.
-
- * gui/contact-editor/e-contact-editor.c: Port to GObject/gnome2.
-
- * gui/contact-editor/e-contact-quick-add.c: Port to GObject/gnome2.
-
- * gui/contact-editor/e-contact-save-as.[ch]: Port to GObject/gnome2.
-
- * gui/contact-editor/test-editor.c: Port to GObject/gnome2.
-
-2002-11-05 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-addressbook-model.[ch]: Port to GObject/gnome2.
-
- * gui/widgets/e-addressbook-reflow-adapter.c: Port to
- GObject/gnome2.
-
- * gui/widgets/e-addressbook-table-adapter.c: Port to
- GObject/gnome2.
-
- * gui/widgets/e-addressbook-util.c: Port to GObject/gnome2.
-
- * gui/widgets/e-addressbook-view.[ch]: Port to GObject/gnome2.
-
- * gui/widgets/e-minicard-control.c: Port to GObject/gnome2.
-
- * gui/widgets/e-minicard-label.[ch]: Port to GObject/gnome2.
-
- * gui/widgets/e-minicard-view-widget.[ch]: Port to GObject/gnome2.
-
- * gui/widgets/e-minicard-view.[ch]: Port to GObject/gnome2.
-
- * gui/widgets/e-minicard-widget-test.c: Port to GObject/gnome2.
-
- * gui/widgets/e-minicard-widget.c: Port to GObject/gnome2.
-
- * gui/widgets/e-minicard.[ch]: Port to GObject/gnome2.
-
- * gui/widgets/gal-view-factory-minicard.c: Port to GObject/gnome2.
-
- * gui/widgets/gal-view-minicard.c: Port to GObject/gnome2.
-
- * gui/widgets/test-minicard-label.c: Port to GObject/gnome2.
-
- * gui/widgets/test-minicard-view.c: Port to GObject/gnome2.
-
- * gui/widgets/test-minicard.c: Port to GObject/gnome2.
-
- * gui/widgets/test-reflow.c: Port to GObject/gnome2.
-
- * gui/widgets/Makefile.am: typical port stuff. add marshaller
- generation foo, dist it...
-
- * gui/widgets/.cvsignore: ignore the marshaller stuff.
-
-2002-11-05 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-simple-card-bonobo.[ch]: Port to
- GObject/gnome2.
-
- * gui/component/select-names/e-select-names.[ch]: Port to
- GObject/gnome2.
-
- * gui/component/select-names/e-select-names-text-model.c: Port to
- GObject/gnome2.
-
- * gui/component/select-names/e-select-names-table-model.c: Port to
- GObject/gnome2.
-
- * gui/component/select-names/e-select-names-popup.[ch]: Port to
- GObject/gnome2.
-
- * gui/component/select-names/e-select-names-model.c: Port to
- GObject/gnome2.
-
- * gui/component/select-names/e-select-names-manager.[ch]: Port to
- GObject/gnome2.
-
- * gui/component/select-names/e-select-names-factory.c: Port to
- GObject/gnome2.
-
- * gui/component/select-names/e-select-names-completion.[ch]: Port
- to GObject/gnome2.
-
- * gui/component/select-names/e-select-names-bonobo.[ch]: Port to
- GObject/gnome2.
-
- * gui/component/select-names/Makefile.am: typical port stuff. add
- marshaller generation foo, dist it, and switch the .oaf to .server
-
- * gui/component/select-names/.cvsignore: ignore the marshaller
- stuff.
-
-2002-11-05 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/.cvsignore: ignore the generated marshaller files.
-
- * backend/ebook/e-destination.c (e_destination_dispose): rename
- e_destination_destroy.
- (e_destination_equal): ifdef this out for now, PENDING_PORT_WORK.
- (e_destination_get_name): same.
- (e_destination_get_email): same.
- (e_destination_get_address): same.
- (e_destination_get_textrep): same.
-
- * backend/ebook/Makefile.am: don't build the executables
- (importers and loaders) for now. Also, s/oaf/server, and use
- INTLTOOL_SERVER_RULE.
-
- * backend/ebook/e-book-util.c (e_book_get_config_database):
- un-#ifdef this.
- (e_book_default_book_open): un-#ifdef ths code in here that relies
- on the e_config_listener.
-
-2002-11-05 Dan Winship <danw@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (send_pending_adds): copy a
- memleak fix from pas-backend-ad.
-
-2002-11-05 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-card.c: g_date_* => g_date_get_*, fixes
- G_DISABLE_DEPRECATED build.
-
- * backend/ebook/e-book-listener.[ch]: remove the servant crap i'd
- c&p'ed and put in here.
-
- * backend/ebook/e-book-view-listener.[ch]: remove the servant crap
- i'd c&p'ed and put in here.
-
- * backend/pas/pas-book-factory.[ch]: subclass from BonoboObject,
- and remove the servant crap from here too. whee.
-
- * backend/pas/pas-card-cursor.[ch]: remove the servant crap i'd
- c&p'ed and put in here.
-
- * backend/pas/pas-book.[ch]: remove the servant crap i'd c&p'ed
- and put in here.
-
- * backend/pas/pas-book-view.[ch]: remove the servant crap i'd
- c&p'ed and put in here.
-
-2002-11-05 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-card-sexp.[ch]: port to gnome 2.
-
- * backend/pas/pas-backend-file.[ch]: same.
-
- * backend/pas/pas-backend-file.[ch]: same.
-
- * backend/pas/pas-backend-ldap.[ch]: same.
-
- * backend/pas/pas-backend-summary.[ch]: same.
-
- * backend/pas/pas-backend.[ch]: same.
-
- * backend/pas/pas-book-factory.[ch]: same.
-
- * backend/pas/pas-book-view.[ch]: same.
-
- * backend/pas/pas-book.[ch]: same.
-
- * backend/pas/pas-card-cursor.[ch]: same.
-
- * backend/pas/pas-marshal.list: list of marshallers.
-
- * backend/pas/Makefile.am (libpas_a_SOURCES): add pas-marshal.c
- also add the marshal building foo.
-
- * backend/pas/.cvsignore: ignore pas-marshal.[ch]
-
-2002-11-05 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/test-client-list.c (main): don't call
- bonobo_activation_init directly.
-
- * backend/ebook/test-client.c (get_card_cb): don't unref the card
- here since we never reffed it.
- (main): no need to call bonobo_activation_init, as
- gnome_program_init did it for us.
-
- * backend/ebook/e-card-simple.c (e_card_simple_get_property):
- s/g_value_{set,get}_pointer/g_value_{set,get}_object
-
- * backend/ebook/e-book-util.c (set_default_book_uri_local): make
- sure to terminate args with NULL for g_build_filename.
-
- * backend/ebook/e-book-listener.c: nuke e_book_listener_get_type
- and use the BONOBO_TYPE_FUNC_FULL macro.
-
- * backend/ebook/e-book-listener.h: add the epv to
- EBookListenerClass so BONOBO_TYPE_FUNC_FULL works.
-
- * backend/ebook/e-book-view-listener.c: nuke
- e_book_view_listener_get_type and use the BONOBO_TYPE_FUNC_FULL
- macro.
-
- * backend/ebook/e-book-view-listener.h: add the epv to
- EBookViewListenerClass so BONOBO_TYPE_FUNC_FULL works.
-
-2002-11-02 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-book-types.h: just include glib.h instead of the
- gtk stuff.
-
- * backend/ebook/e-book-listener.[ch]: convert to
- GObject/bonobo-activation/etc/etc.
- * e-book-util.[ch]: same.
- * e-book-view-listener.[ch]: same.
- * e-book-view.[ch]: same.
- * e-book.[ch]: same.
- * e-card-compare.[ch]: same.
- * e-card-cursor.[ch]: same.
- * e-card-simple.[ch]: same.
- * e-card.[ch]: same.
- * e-destination.[ch]: same.
- * evolution-ldif-importer.c: same.
- * evolution-vcard-importer.c: same.
- * load-gnomecard-addressbook.c: same.
- * load-pine-addressbok.c: same.
- * test-card.c: same.
- * test-client-list.c: same.
- * test-client.c: same.
-
- * backend/ebook/Makefile.am: add e-book-marshal.c to SOURCES, add
- e-book-marshal.[ch] to CLEANFILES, and add e-book-marshal.list to
- EXTRA_DIST. Also, remove the camel libs from the test LDADD's,
- and leave e-destination.[ch] out of the build.
-
- * backend/ebook/.cvsignore: ignore e-book-marshal.[ch]
-
- * backend/ebook/e-book-marshal.list: marshallers for e-book.
-
-2002-10-28 Larry Ewing <lewing@ximian.com>
-
- * backend/ebook/e-card.c (addPropValueUTF8): never set the charset
- on an item without also encoding it. Mime messages don't like
- parts with multiple charsets.
-
-2002-10-25 Dan Winship <danw@ximian.com>
-
- * gui/widgets/e-addressbook-model.c (addressbook_destroy):
- Disconnect from the book's backend_died signal.
-
-2002-10-24 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/Makefile.am: install evolutionperson.schema to
- $(datadir)/evolution.
-
-2002-10-24 Chris Toshok <toshok@ximian.com>
-
- [ fixes #29144 ]
- * gui/component/addressbook-config.c (edit_dialog_store_change):
- use e_table_memory_storage_change instead of remove/insert, so the
- selection is maintained.
-
-2002-10-22 Dan Winship <danw@ximian.com>
-
- * gui/component/select-names/e-select-names.c
- (folder_selected): Set /Addressbook/select_names_uri in the
- configdb to the selected folder.
- (e_select_names_init): Look for /Addressbook/select_names_uri
- before /DefaultFolders/contacts_uri for the initial folder. So the
- select names dialog now starts up using the same folder you used
- last time, which is useful when you have an LDAP company directory
- (which can't be your default contacts folder because it's
- read-only).
-
-2002-10-21 Dan Winship <danw@ximian.com>
-
- * gui/component/addressbook-component.c (IS_CONTACT_TYPE): fix the
- sense of a strcmp
-
-2002-10-20 Chris Toshok <toshok@ximian.com>
-
- [ fix for #23764 ]
- * gui/widgets/e-addressbook-view.c (jump_to_letters): handle
- multiple letters associated with a single button.
- (button_toggled): closure->letter -> closure->letters.
- (free_closure): free closure->letters.
- (create_alphabet): init closure->letters.
-
-2002-10-20 Chris Toshok <toshok@ximian.com>
-
- [ fixes #29067 ]
- * backend/pas/pas-backend-file.c (pas_backend_file_search): we
- need to create a card_sexp even when doing summary queries since
- it's used to check modifications of cards in the view.
-
-2002-10-20 Chris Toshok <toshok@ximian.com>
-
- [ fixes #32144 ]
- * gui/contact-editor/e-contact-save-as.c (e_contact_save_as):
- convert the name to the gtk locale before saving.
- (e_contact_list_save_as): same.
-
-2002-10-19 Chris Toshok <toshok@ximian.com>
-
- [ probable fix for #25477, and memory leak fix ]
- * gui/contact-editor/e-contact-editor.c (supported_fields_cb): if
- the dialog isn't in the list of all dialogs it's been destroyed so
- just return here.
-
- * backend/ebook/e-book.c
- (e_book_do_response_get_supported_fields): plug leak of
- resp->fields.
-
-2002-10-15 Dan Winship <danw@ximian.com>
-
- * backend/ebook/e-card.c (e_card_email_match_string): Return right
- away rather than crashing if card->email is NULL.
- (e_card_email_find_number): Likewise.
-
-2002-10-10 Kjartan Maraas <kmaraas@gnome.org>
-
- [Fix #7094, #7064, #7095, #31944, #31945 ]
- * gui/component/Makefile.am: Hook up new etspec file.
- * gui/component/addressbook-config.c: Remove ETable spec.
- * gui/component/addressbook-config.etspec: New file.
- * gui/component/ldap-config.glade: Fix typo.
- * gui/component/select-names/e-select-names.c: Remove inline spec.
- * gui/component/select-names/e-select-names.etspec: New file.
- * gui/contact-list-editor/Makefile.am: Hook up etspec.
- * gui/contact-list-editor/e-contact-list-editor.c: Remove inline spec.
- * gui/contact-list-editor/e-contact-list-editor.etspec: New file.
- * gui/widgets/Makefile.am: Hook up new spec.
- * gui/widgets/e-addressbook-view.c: Remove inline spec.
- * gui/widgets/e-addressbook-view.etspec: New file.
-
-2002-10-02 Chris Toshok <toshok@ximian.com>
-
- [ Fix #28392 ]
- * gui/widgets/e-addressbook-view.c (do_popup_menu): #if 0 out the
- gal_view submenu, since it's not spec'ed to be there anyway (as
- per bug #16250).
-
-2002-09-30 Chris Toshok <toshok@ximian.com>
-
- [ Fixes #31321 ]
- * backend/ebook/e-card.c (e_card_get_vobject): add VERSION:2.1 to
- exported vCards.
-
-2002-09-30 Chris Toshok <toshok@ximian.com>
-
- [ Fixes #31434 ]
- * backend/pas/pas-backend-file.c (do_summary_query): always
- retrieve the card from the db. use the summary strictly for
- matching, not for storing all information. This fixes completion
- of contact lists, since only 3 addresses were being stored and
- contact lists can have more.
-
-2002-09-30 Aaron Weber <aaron@ximian.com>
-
- * gui/widgets/e-addressbook-util.c (e_addressbook_show_multiple_cards): rephrase string on l. 213
-
-2002-09-30 Dan Winship <danw@ximian.com>
-
- * backend/ebook/e-card.c (e_card_list_send): update for
- Composer_setHeaders change.
-
-2002-09-27 Chris Toshok <toshok@ximian.com>
-
- [ fixes #27521 ]
- * gui/contact-editor/e-contact-quick-add.c (editor_closed_cb):
- always unref the contact editor when we get the editor_closed
- signal.
-
-2002-09-27 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (check_schema_support): set the
- timeout to 30 seconds.
- (query_ldap_root_dse): same, and also return the ldap_error since
- this function is the one that actually causes openldap to
- connect() to the ldap host.
- (pas_backend_ldap_connect): check the return value of
- query_ldap_root_dse, and error out if it's not SUCCESS.
-
-2002-09-26 Dan Winship <danw@ximian.com>
-
- * gui/component/addressbook-storage.c (load_source_data): Change
- folder type to "contacts/ldap".
- (addressbook_storage_add_source): Likewise.
- (create_ldap_folder): Check for type being "contacts" not
- ldap contacts, since the ldap-specific type doesn't appear in the
- menu.
-
-2002-09-25 Dan Winship <danw@ximian.com>
-
- * gui/component/addressbook-component.c (folder_types): Rename
- "ldap-contacts" to "contacts/ldap" and add "contacts/public".
- (IS_CONTACT_TYPE): update for new types.
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_init): Use "contacts/*" for selector_types.
-
- * gui/widgets/e-addressbook-util.c (e_addressbook_transfer_cards):
- Likewise.
-
- * gui/component/GNOME_Evolution_Addressbook.oaf.in: add
- "evolution:config_item:type" = "contacts/ldap" to the LDAP sources
- control so it comes up by default when you open Preferences in an
- LDAP folder.
-
-2002-09-23 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-addressbook-table-adapter.c (addressbook_destroy):
- free adapter->priv.
-
- * gui/widgets/e-addressbook-model.c (addressbook_destroy): free
- model->query.
-
- * gui/component/select-names/e-select-names-manager.c
- (load_completion_books): use e_book_expand_uri here, and free the
- expanded uri after calling addressbook_load_uri, plugging a leak.
-
- * gui/component/select-names/e-select-names.c (set_book): unref
- esn->model before we unref esn. fixes an edge case memory
- corruption bug.
- (clear_widget): utility function to set a widget's ref to NULL
- when it's destroyed.
- (e_select_names_init): hook the status_message, categories option
- menu, and select_entry to clear_widget.
- (addressbook_model_set_uri): use e_book_expand_uri.
-
-2002-09-23 JP Rosevear <jpr@ximian.com>
-
- * conduit/Makefile.am: add libeutil to the link and link with
- libcamel instead of libcamel-static.la
-
-2002-09-22 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names-manager.h: oops, add
- cached_folder_list to struct _ESelectNamesManager.
-
-2002-09-22 Chris Toshok <toshok@ximian.com>
-
- [ Fixes #30481 ]
- * gui/component/select-names/e-select-names.c
- (e_select_names_init): initialize the select names dialog with the
- default contacts folder.
-
-2002-09-22 Chris Toshok <toshok@ximian.com>
-
- [ Fixes #28165, 29171 ]
- * gui/component/select-names/e-select-names-manager.c
- (uris_listener): check to see if the value has really changed.
- the way the preferences dialog works is such that we'll get called
- when any of the Folder Options are changed (default folders,
- offline stuff, etc.) we really only want to tear down and build
- back up the completion books if the autocomplete folder setting
- changed.
- (read_completion_books_from_db): cache the folder list, and call
- load_completion_books.
- (load_completion_books): new function, loads from the
- cached_folder_list.
- (e_select_names_manager_init): init cached_folder_list to NULL.
- (e_select_names_manager_destroy): g_free (cached_folder_list).
-
-2002-09-20 Chris Toshok <toshok@ximian.com>
-
- [ Fixes #30483 ]
- * gui/component/select-names/e-select-names-completion.c
- (name_style_query): argh, contains => beginswith.
-
-2002-09-17 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook-component.c (add_creatable_item):
- don't add the user creatable item for ldap-contact folders atm,
- since it results in their being duplicate New Contact and New
- Contact List menu items.
-
-2002-09-17 Kjartan Maraas <kmaraas@gnome.org>
-
- * gui/component/ldap-config.glade: Fix a typo.
-
-2002-09-13 Chris Toshok <toshok@ximian.com>
-
- [ Fixes bug #30250 ]
- * backend/ebook/e-destination.c (e_destination_get_name): handle
- "Unnamed Lists" here by setting their name to _("Unnamed List').
-
- * backend/ebook/e-card-simple.c (e_card_simple_get): same.
-
- * gui/contact-list-editor/e-contact-list-editor.c (is_named): new
- function, return TRUE if the name field is filled in.
- (prompt_to_save_changes): return TRUE if the list isn't named
- (meaning it's not saveable.)
- (command_state_changed): saving requires a name.
- (add_email_cb): always call command_state_changed.
- (remove_entry_cb): same.
- (list_name_changed_cb): same.
- (visible_addrs_toggled_cb): same.
- (table_drag_data_received_cb): same.
-
-2002-09-12 Dan Winship <danw@ximian.com>
-
- * backend/ebook/e-card-simple.c (e_card_simple_get): return
- g_strdup("true"), not "true".
-
-2002-09-11 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names-completion.c
- (e_select_names_completion_start_query): institute an arbitrary
- minimum limit on the number of characters before we actually try
- to autocomplete. It's 3, btw.
-
-2002-09-11 Chris Toshok <toshok@ximian.com>
-
- [ fixes the other half of #17336 ]
- * gui/contact-editor/e-contact-quick-add.c (quick_add_set_name):
- parse the name when we're asked to set it, so the full name
- doesn't get stored as (potentially) "Last, First" in the card.
-
-2002-09-11 Chris Toshok <toshok@ximian.com>
-
- [ fixes part of #17336 ]
- * gui/contact-editor/e-contact-editor-fullname.c
- (e_contact_editor_fullname_init): get the window title from the
- .glade file, and supply a suitable wm icon.
-
- * gui/contact-editor/e-contact-editor-address.c
- (e_contact_editor_address_init): same.
-
-2002-09-11 Chris Toshok <toshok@ximian.com>
-
- [ fixes #30208 ]
- * gui/component/addressbook.c (load_uri_auth_cb): if the user
- clicked cancel in the password dialog, let them off the hook and
- bind anonymously. Otherwise (if they failed to auth), prompt them
- for the password again.
- (addressbook_authenticate): new function, split out 99% of the
- auth machinery here so it can be called multiple times. Also,
- call the callback with E_BOOK_STATUS_CANCELLED if the user clicked
- the cancel button in the dialog.
- (load_uri_cb): call addressbook_authenticate if the book has auth
- enabled.
- (addressbook_load_uri): use g_new0.
-
-2002-09-05 Anna Dirks <anna@ximian.com>
- * gui/component/GNOME_Evolution_Addressbook.oaf.in : Changed the
- description of the Directory Servers page of the settings dialog
- to be a little less wordy {This page can be used to configure blah-->
- Configure blah.}
-
-
-2002-09-04 Chris Toshok <toshok@ximian.com>
-
- [ Fixes #29904 ]
- * gui/component/select-names/e-select-names-text-model.c
- (e_select_names_text_model_activate_obj): we need to activate
- either a contact list editor or contact editor depending on if
- it's a list (this screams for a utility function.)
-
-2002-09-04 Dan Winship <danw@ximian.com>
-
- * gui/component/addressbook-storage.c
- (addressbook_get_other_contact_storage): Pass FALSE to
- evolution_storage_new: the Other Contacts storage doesn't support
- shared folders.
-
-2002-09-04 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook-component.c (create_component): Pass
- NULL as @unpopulate_folder_context_menu_fn to
- evolution_shell_component_new().
-
-2002-09-03 Mike Kestner <mkestner@ximian.com>
-
- * gui/component/select-names/e-select-names.c (e_select_names_destroy):
- unref the "without", adapter, and model, then chain up the GnomeDialog
- destroy function.
-
-2002-09-03 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/GNOME_Evolution_Addressbook.oaf.in: Use
- ldap-settings.png instead of evolution-contacts.png.
-
-2002-09-03 Chris Toshok <toshok@ximian.com>
-
- [ fixes #29699 ]
- * gui/component/addressbook-config.c
- (addressbook_add_server_druid): call _set_source with a NULL
- source to fill in dialog settings that are set from the option
- menus (like the SSL setting).
-
-2002-09-03 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook.c (delete_contact_cb): Fix typo
- [`view>view' instead of `view->view']. Also, cast to
- GTK_WINDOW instead of GTK_WIDGET as it should be.
-
-2002-08-30 Dan Winship <danw@ximian.com>
-
- * backend/idl/addressbook.idl (CallStatus): add QueryRefused, for
- when the backend refuses to perform a query. (part of #25782)
-
- * backend/ebook/e-book-view-listener.c
- (e_book_view_listener_convert_status): translate
- GNOME_Evolution_Addressbook_BookViewListener_QueryRefused.
-
- * gui/component/addressbook.c (search_result): Handle
- E_BOOK_VIEW_STATUS_QUERY_REFUSED.
-
-2002-08-30 Chris Toshok <toshok@ximian.com>
-
- [ fixes #27923]
- * backend/pas/pas-backend-summary.c: up the version to 4_0 (4000).
- (pas_backend_summary_load_item): handle wants_html{_set}, list,
- and list_show_addresses.
- (pas_backend_summary_save_item): same.
- (pas_backend_summary_add_card): same.
- (pas_backend_summary_get_summary_vcard): same.
-
-2002-08-29 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook-component.c (add_creatable_item): call
- evolution_shell_component_add_user_creatable_item twice here, once
- for the "contacts" folder type, and once for "ldap-contacts".
-
-2002-08-29 Chris Toshok <toshok@ximian.com>
-
- [ fixes #20347 ]
- * gui/widgets/e-addressbook-view.c (e_addressbook_view_init): hook
- up the backend_died signal.
- (backend_died): new function, pop up an error dialog saying the
- backend died.
-
- * gui/widgets/e-addressbook-model.c (backend_died): new function,
- emit the backend_died signal.
- (e_addressbook_model_class_init): create the backend_died signal.
- (e_addressbook_model_init): init backend_died_id
- (e_addressbook_model_set_arg): disconnect the backend_died signal
- from the old book and hook it up to the new book.
-
- * gui/widgets/e-addressbook-model.h: add the backend_died signal.
-
- * backend/ebook/e-book.c (backend_died_cb): new function, emit the
- backend_died signal.
- (e_book_do_response_open): create the component listener and hook
- up the backend_died signal.
- (e_book_destroy): disconnect the component listener and unref it.
-
- * backend/ebook/e-book.h: add backend_died signal.
-
-2002-08-29 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-card-sexp.c (is_helper): use strcasecmp
- here, since all the other helpers use case insensitive
- comparisons.
-
- * backend/pas/pas-backend-summary.c (is_helper): same.
-
-2002-08-29 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (category_ber): return NULL if
- the list is empty.
- (pas_backend_ldap_connect): always try to use ldapv3, not just
- when we want to use tls.
-
-2002-08-29 Chris Toshok <toshok@ximian.com>
-
- [ fixes #25038 ]
- * gui/contact-editor/Makefile.am (INCLUDES): need to have
- EVOLUTION_ICONSDIR defined.
-
- * gui/contact-list-editor/Makefile.am (INCLUDES): same.
-
- * gui/contact-editor/e-contact-editor.c (e_contact_editor_init):
- set the window icon to the contact mini icon.
-
- * gui/contact-list-editor/e-contact-list-editor.c
- (e_contact_list_editor_init): set the window icon to the new
- contact list icon.
-
- * gui/widgets/e-minicard.c (LIST_ICON_FILENAME): change to (the
- prettier, imo) "contact-list-16.png"
-
-2002-08-28 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (pas_backend_ldap_search): spew
- the filter we're using for the search.
-
-2002-08-28 Mike Kestner <mkestner@ximian.com>
-
- * gui/component/select-names/e-select-names-completion.c : stop the
- EBookViews before unreffing.
-
-2002-08-28 Dan Winship <danw@ximian.com>
-
- * gui/component/GNOME_Evolution_Addressbook.oaf.in: Add an
- evolution:shell_component_launch_order and rename
- evolution:shell_component_icon.
-
-2002-08-28 Chris Toshok <toshok@ximian.com>
-
- [ oops, merged the .h and .glade file back to the HEAD from the
- 1-0 branch, but missed the .c file. ]
- * gui/component/select-names/e-select-names.c (status_message): set
- the status label's text.
- (e_select_names_init): get the status message widget from the
- glade ui.
-
-2002-08-28 Chris Toshok <toshok@ximian.com>
-
- [ fixes #19286 ]
- * gui/component/addressbook.c (delete_contact_cb): confirm
- deletion of contacts when using the menubar or toolbar.
-
-2002-08-28 Chris Toshok <toshok@ximian.com>
-
- [ fixes #28897 ]
- * gui/component/select-names/e-select-names-completion.c
- (e_select_names_completion_clear_book_data): set book_data to NULL
- after clearing/freeing the list. fixes a crash.
-
-2002-08-28 Chris Toshok <toshok@ximian.com>
-
- [ fixes #20348 ]
- * backend/pas/evolutionperson.schema: deprecate "categories" in
- favor of "category". evolution no longer uses "categories".
-
- * backend/pas/pas-backend-ldap.c (category_populate): new
- function, "category" is the new name, and it's multivalued so we
- need the complex-prop stuff..
- (category_ber): new function, same.
- (category_compare): new function, same.
-
- * gui/component/addressbook.c (addressbook_search_activated): the
- text is "Category is" so we should use "is" instead of "contains"
- for the query.
-
-2002-08-27 Chris Toshok <toshok@ximian.com>
-
- [ Fixes #14835 ]
- * backend/pas/pas-backend-ldap.c (pas_backend_ldap_search):
- notify_complete with InvalidQuery if the parse fails.
-
-2002-08-27 Chris Toshok <toshok@ximian.com>
-
- [ fixes #26907 ]
- * gui/component/addressbook.c (addressbook_search_activated): use
- beginswith for email.
-
-2002-08-26 Chris Toshok <toshok@ximian.com>
-
- * printing/e-contact-print.c (complete_sequence): change prototype
- for complete_sequence to match sequence_complete.
- (e_contact_print_button): same.
-
-2002-08-26 Chris Toshok <toshok@ximian.com>
-
- [ fixes #29446 ]
- * gui/component/addressbook-config.c (scope_optionmenu_activated):
- searching_modify_func can be NULL (since we don't require changes
- to enable the "Next" button on this page when you create a
- directory server.)
-
-2002-08-26 Chris Toshok <toshok@ximian.com>
-
- [ Fixes (almost certainly) #24649, #25494, #27351, and other LDAP search crashes ]
- * backend/pas/pas-backend-ldap.c (view_destroy): use an EList
- instead of a GList to store the book_view's so we don't have weird
- issues with modifying the list while it's being traversed.
- (find_book_view): same.
- (create_card_handler): same.
- (remove_card_handler): same.
- (modify_card_modify_handler): same.
- (poll_ldap): same, and also ref the book_view before calling
- ldap_search_op_timeout (and therefore send_pending_adds).
- (ldap_search_handler): same.
- (ldap_op_add): warn about conflicting ldap msgid's (shouldn't ever
- happen..)
- (homephone_populate): make this a bit more robust (if values[0] ==
- NULL, values[1] won't be valid).
- (business_populate): same.
- (build_card_from_entry): break out of the prop_info loop when we
- get a match, and only set the simple field if the value != NULL.
- (ldap_search_dtor): free all the pending adds stuff.
- (pas_backend_ldap_process_get_book_view): g_list_prepend =>
- e_list_append.
- (pas_backend_ldap_remove_client): simplify the removing of the
- book (use g_list_remove instead of searching and then using
- g_list_remove_link.)
- (pas_backend_ldap_destroy): unref the book_views list.
- (pas_backend_ldap_init): initialize the EList for book_views.
-
-2002-08-25 Mike Kestner <mkestner@ximian.com>
-
- * gui/widgets/e-addressbook-view.c (remove_book_view): stop the
- view before unref, in case the listener has pending events.
-
-2002-08-20 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook.c (book_open_cb): not sure what i was
- thinking here... the EBook isn't valid if we couldn't open it, so
- we can't turn around and query it for its capabilities.
-
-2002-08-19 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names-manager.h: add the
- listener_id slot.
-
- * gui/component/select-names/e-select-names-manager.c
- (e_select_names_manager_new): store off the listener_id.
- (e_select_names_manager_destroy): remove the bonobo listener -
- fixes a crash when modifying the completion folders after you
- bring up a compose window.
- (e_select_names_manager_entry_new): another random timeout change
- - make the completion at 100ms.
-
-2002-08-19 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-book-view.c (pas_book_view_notify_complete):
- take and pass the CallStatus to our listener.
-
- * backend/pas/pas-book-view.h: change the prototype for
- notify_complete to include the CallStatus.
-
- * gui/component/select-names/e-select-names-completion.c
- (e_select_names_completion_seq_complete_cb): add the status arg.
-
- * gui/widgets/e-addressbook-view.c
- (e_addressbook_view_class_init): init the search_result signal.
- (e_addressbook_view_init): connect to the model's search_result
- signal.
- (emit_search_result): emit our search_result signal.
- (search_result): call emit_search_result.
-
- * gui/widgets/e-addressbook-view.h (struct
- _EAddressbookViewClass): add the search_result signal.
-
- * gui/widgets/e-addressbook-model.c (sequence_complete): emit both
- a "search_result" as well as the "stop_state_changed" signal.
- (e_addressbook_model_class_init): init the search_result signal.
-
- * gui/widgets/e-addressbook-model.h: add search_result signal.
-
- * gui/component/addressbook.c (search_result): pop up a dialog
- telling the user why the search failed or was truncated.
- (addressbook_factory_new_control): connect to the "search_result"
- signal on the view.
-
- * conduit/address-conduit.c (sequence_complete): add the status
- parameter to sequence_complete.
-
- * backend/idl/addressbook.idl: add BookViewListener_CallStatus,
- and change notifySequenceComplete to take a CallStatus.
-
- * backend/pas/pas-backend-ldap.c (create_card_handler): pass
- status back in the notify_complete call.
- (remove_card_handler): same.
- (modify_card_modify_handler): same
- (ldap_search_handler): same, and parse out the ldap return code so
- we can report limits being properly.
-
- * backend/pas/pas-backend-file.c (do_summary_query): pass status
- back in the notify_complete call.
- (pas_backend_file_search): same, and get rid of the
- status_message, as the status is passed back properly.
- (pas_backend_file_search): pass status
- back in the notify_complete call.
- (pas_backend_file_changes): same.
- (pas_backend_file_process_create_card): same.
- (pas_backend_file_process_remove_card): same.
- (pas_backend_file_process_modify_card): same.
-
- * backend/ebook/e-book-util.c (simple_query_sequence_complete_cb):
- add status parameter.
-
- * backend/ebook/e-book-view-listener.c
- (e_book_view_listener_queue_status_event): change name from
- _queue_empty_event, and take a status arg.
- (e_book_view_listener_queue_id_event): init resp->status (to
- SUCCESS).
- (e_book_view_listener_queue_sequence_event): same.
- (e_book_view_listener_queue_message_event): same.
- (impl_BookViewListener_notify_sequence_complete): call
- queue_status_event, and convert the corba status to
- EBookViewStatus.
- (e_book_view_listener_convert_status): new function, conver the
- corba status to EBookViewStatus.
-
- * backend/ebook/e-book-view-listener.h: add a "status" slot to
- EBookViewListenerResponse.
-
- * backend/ebook/e-book-view.h: change prototype for
- sequence_complete signal.
-
- * backend/ebook/e-book-view.c (e_book_view_do_complete_event):
- sequence_complete takes a parameter now (EBookViewStatus).
- (e_book_view_class_init): add the enum arg to the signal.
-
- * backend/ebook/e-book-types.h: add EBookViewStatus enum.
-
-2002-08-19 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-file.c
- (pas_backend_file_get_static_capabilities): add
- "cache-completions" here, since file completion results are
- blanket cached (as they're generated from a summary).
-
- * backend/pas/pas-backend-ldap.c
- (pas_backend_ldap_process_get_cursor): there should be no search
- limit on the get_cursor_request, as it's meant to match every card
- it can.
- (ldap_search_handler): parse the ldap result in the
- RES_SEARCH_RESULT case. we'll want more here soon, so we can
- notify the front end if the result was truncated due to either the
- size or time limit being exceeded.
- (pas_backend_ldap_process_get_book_view): in the case of a
- completion view, we hardcode (yeah yeah, i know, but really) the
- search limit to MIN (100, user-specified-limit).
- (pas_backend_ldap_search): each view has its own limit now,
- defaulting from the user specified one for normal searches but
- possibly different for completion views. use the view's limit
- here.
-
-2002-08-19 Dan Winship <danw@ximian.com>
-
- * gui/component/select-names/e-select-names-bonobo.c
- (entry_get_property_fn): add an "addresses" property, to get the
- "Dan Winship <danw@ximian.com>" form, as opposed to "text", which
- gets you what's displayed, which might be just "Dan Winship".
- (entry_set_property_fn): When setting, just reuse the "text" code,
- since it should properly cardify everything for us anyway.
- (impl_SelectNames_get_entry_for_section): Add the property.
-
-2002-08-16 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook-config.c
- (addressbook_source_dialog_set_source): fix c&p error that was
- losing the ssl setting.
-
-2002-08-16 Iain <iain@ximian.com>
-
- * backends/e-book/evolution-ldif-importer.c (ebook_create): Use the
- default EBook instead of the local one.
-
- * backends/e-book/evolution-vcard-importer.c (ebook_create): Ditto.
-
-2002-08-16 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (book_view_notify_status): new
- function to save a little typing.
- (find_book_view): same.
- (pas_backend_ldap_connect): reorder things a bit - set the version
- to VERSION3 *before* doing TLS, as tls requires v3, and if we're
- doing ldaps://, do tls a little differently (not sure if this is
- strictly necessary, but the openldap source did it.. *shrug*).
- also, guard the schema check as this function can be called
- multiple times for the same server (if the server goes down or
- times us out.)
- (pas_backend_ldap_reconnect): new function, reconnect and if
- necessary reauth the user.
- (pas_backend_ldap_process_create_card): use
- find_book_view/book_view_notify_status/pas_backend_ldap_reconnect.
- (pas_backend_ldap_process_remove_card): same.
- (pas_backend_ldap_process_modify_card): same.
- (pas_backend_ldap_process_get_vcard): same.
- (pas_backend_ldap_process_get_cursor): same.
- (pas_backend_ldap_search): same.
- (poll_ldap): reconnect if ldap_result returns -1.
- (pas_backend_ldap_process_authenticate_user): ick ick ick save off
- the dn/passwd we auth with so we can use them to reauthenticate.
-
-2002-08-16 Chris Toshok <toshok@ximian.com>
-
- [ fix 27333 ]
- * gui/widgets/e-addressbook-model.c (get_view): "local" ->
- "do-initial-query".
-
- * backend/pas/pas-backend-file.c
- (pas_backend_file_get_static_capabilities): "local" ->
- "local,do-initial-query".
-
- * gui/widgets/e-addressbook-model.c (get_view): "local" ->
- "do-initial-query".
-
- * gui/component/addressbook.c (book_open_cb): Only assume the
- addressbook is local if "local" appears in its static
- capabilities. We still use the ldap special case, but be nicer to
- other networked backends.
-
-2002-08-12 Dan Winship <danw@ximian.com>
-
- * gui/component/addressbook-component.c (user_create_new_item_cb):
- If invoked from a non-contact folder, add the contact to the
- default contact folder, not the local one. If invoked from a
- contact folder, don't append "addressbook.db" to the URI, let
- ebook do the right thing. Fixes #28327 and #28325.
-
- * backend/idl/addressbook.idl (CallStatus): Add NoSuchBook.
- (Initially intended as part of a fix for #28327, but the other
- changes make it so the error code never ends up getting used any
- more, but it's still good to have.)
-
- * gui/widgets/e-addressbook-util.c (e_addressbook_error_dialog):
- Handle NO_SUCH_BOOK.
-
- * backend/ebook/e-book-types.h (EBookStatus): Add
- E_BOOK_STATUS_NO_SUCH_BOOK.
-
- * backend/ebook/e-book-listener.c
- (e_book_listener_convert_status): add case for NoSuchBook.
-
- * backend/ebook/e-book-util.c (e_book_load_local_address_book):
- Kill this. Nothing should ever explicitly load the local
- addressbook.
- (e_book_use_default_book): Replaces e_book_use_local_address_book,
- using the default book instead.
- (e_book_default_book_open): Fall back to local contact folder on
- E_BOOK_STATUS_NO_SUCH_BOOK too.
- (e_book_query_address_default): Use default book, not local.
-
- * gui/component/e-address-widget.c (query_idle_fn): Use the
- default book, not the local book.
-
- * gui/component/select-names/e-select-names-popup.c
- (edit_contact_info_cb): Use the default book, not the local book.
-
- * backend/ebook/e-destination.c (e_destination_cardify): Use the
- default book, not the local book.
- (e_destination_touch): Query the default book, not the local book.
-
- * backend/ebook/e-card-compare.c (e_card_locate_match,
- e_card_locate_match_full): Use the default book, not the local
- book.
-
-2002-08-08 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-summary.c (pas_backend_summary_init):
- initialize summary->upgraded to quiet valgrind.
-
-2002-08-06 Dan Winship <danw@ximian.com>
-
- * backend/ebook/test-client.c (TEST_VCARD): Use "\r" rather than
- including literal CRs in the string, which confuses gcc on OS X.
-
- * backend/ebook/test-card.c (TEST_VCARD): Likewise.
-
-2002-08-01 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #25958 ]
- * gui/component/addressbook.c (alphabet_state_changed): use
- FULL_NAME in the case where we're untoggling a letter, and... well
- use FULL_NAME in the other case too - we should never pop up the
- advanced dialog.
-
-2002-08-01 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names.h (struct
- _ESelectNames): no more search_entry.
-
- * gui/component/select-names/e-select-names.c (update_query): no
- more search_entry, search_entry => select_entry, and add file_as
- to the query since some entries don't have names (like the Ximian,
- Inc. default card.)
- (e_select_names_init): no more search_entry, and add an "activate"
- handler on select_entry that updates the query.
-
-2002-08-01 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names.h (struct
- _ESelectNames): remove folders and folders_by_uri, and the 2
- listeners.
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_destroy): remove the hash_table_destroys of
- folders and folders_by_uri, since they no longer exist. same for
- other_contacts_listener and local_listener.
-
-2002-08-01 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook-component.c (create_component): Use
- "contact-list-16.png" for the "New Contact List" item.
-
-2002-07-31 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook-component.c (create_component): Change
- the order so that "New Contact" is first and "New Contact List" is
- next.
-
-2002-07-31 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook-component.c (add_creatable_item): Pass
- "contacts" as the @folder_type to
- evolution_shell_component_add_user_creatable_item().
-
-2002-07-31 Chris Toshok <toshok@ximian.com>
-
- [ roll in the following change from the 1.0 branch.]
- * backend/pas/pas-backend-ldap.c:
- (prop_info): change the CALURI and FBURL ecard attributes to map to the
- RFC 2739 specified attributes.
- (check_schema_support): check to see if calEntry is supported.
- (add_objectclass_mod): insert calEntry if it's supported.
- * backend/pas/evolutionperson.schema: deprecate freeBusyURI
- and calendarURI.
-
-2002-07-31 Ettore Perazzoli <ettore@ximian.com>
-
- [Patch by Jacob Berkman <jacob@ximian.com>, fixes #25968]
-
- * backend/ebook/e-book.c (activate_factories_for_uri): Don't
- double free protocol and query.
-
-2002-07-27 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-summary.c (save_string): don't save
- empty strings.
- (pas_backend_summary_save): print out the errno when we fail.
-
-2002-07-26 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook.c: Don't set up the ContactNew and
- ContactNewList verbs.
- (update_command_state): Don't set the sensitivity of
- /commands/ContactNew and /commands/ContactNewList anymore.
- (new_contact_cb): Removed.
- (new_contact_list_cb): Removed.
-
-2002-07-24 Peter Williams <peterw@ximian.com>
-
- * conduit/Makefile.am (libeaddress_conduit_la_LIBADD): Change
- libversit.la -> libversit.a for danw's changes.
-
-2002-07-24 Dan Winship <danw@ximian.com>
-
- * conduit/Makefile.am (libeaddress_conduit_la_LIBADD):
- s/libversit_lt/libversit/
-
-2002-07-22 Dan Winship <danw@ximian.com>
-
- * backend/pas/Makefile.am: Split pas-backend-file and
- pas-backend-ldap out of libpas and build them as separate (noinst)
- libraries libpasfile.a and libpasldap.a. This gets the db3 and
- LDAP dependencies out of libpas, and people trying to create an
- addressbook backend shouldn't be calling functions from the
- existing backends anyway so there's no reason to install them.
-
-2002-07-16 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/select-names.glade: remove the option
- menu and browse button, and add a custom widget placeholder for
- the folder-selector.
-
- * gui/component/select-names/e-select-names.c
- (addressbook_model_set_uri): move the "append /addressbook.db"
- stuff here.
- (e_addressbook_create_ebook_table): remove the code setting
- initial uri from here.
- (e_select_names_folder_free): gone.
- (e_select_names_option_activated): gone.
- (add_menu_item): gone.
- (update_option_menu): gone.
- (new_folder): gone.
- (removed_folder): gone.
- (folder_browse): gone.
- (hookup_listner): gone.
- (add_additional_select_names_uris): gone.
- (e_select_names_hookup_listners): gone.
- (e_addressbook_create_folder_selector): new function, create the
- folder selector button.
- (folder_selected): new function, callback for the folder selector.
- just calls addresbook_model_set_uri.
- (e_select_names_init): get the folder selector and initialize it
- to show /local/Contacts. also, set the model's uri here to the
- same folder. nuke the code involving the old option menu and
- browse button.
-
-2002-07-08 Peter Williams <peterw@ximian.com>
-
- * backend/ebook/Makefile.am: Install libebook-static.la.
- Also change --all-static to -all-static, which is the right flag.
-
- * backend/pas/Makefile.am: Install the PAS headers in
- $(includedir)/evolution/pas. Install libpas.a
-
-2002-07-08 Peter Williams <peterw@ximian.com>
-
- * gui/component/select-names/Makefile.am (idl_DATA): Install the
- SelectNames IDL and ancillary changes.
-
-2002-07-12 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-summary.c (free_summary_item): free the
- full_name (as well as given_name. oops.)
- (pas_backend_summary_new): new summaries are version 3.0 now.
- (pas_backend_summary_load_item): all loaded summaries should be
- 3.0+, as we fail to load versions lower than that.
- (pas_backend_summary_load_header): if the summary isn't version
- 3.0 fail out, as we need to rebuild the entire file to cache the
- full_name fields.
- (pas_backend_summary_save_item): save out the full_name.
- (pas_backend_summary_add_card): put the item's full_name in the
- card.
-
-2002-07-12 Dan Winship <danw@ximian.com>
-
- * gui/component/select-names/e-select-names-bonobo.c
- (entry_get_property_fn): Make the
- ENTRY_PROPERTY_ID_SIMPLE_CARD_LIST case not crash, although
- there's still something wrong.
-
-2002-07-10 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names-completion.c
- (e_select_names_completion_start_query): e_book_get_book_view =>
- e_book_get_completion_view, so the backends have the option of
- using a pregenerated summary.
-
-2002-07-10 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-summary.c (clear_items): actually remove
- the items from the pointer array too, so an error while loading
- doesn't leave the memory summary corrupted.
- (pas_backend_summary_load_header): bleah, load the num_items and
- summary_mtime in the right order :) Also, set upgraded to TRUE if
- we loaded a v1.0 summary.
- (pas_backend_summary_open): make this return a gboolean, return
- TRUE if the summary is already open (priv->fp != NULL). return
- FALSE in error conditions.
- (pas_backend_summary_load): if summary_open returns FALSE, return
- FALSE, also set the dirty flag to FALSE after we load, and if the
- summary was upgraded write it out.
- (pas_backend_summary_save): update the in memory mtime to that of
- the file when we save.
- (summary_flush_func): if we're not dirty, do nothing and return.
- (pas_backend_summary_is_up_to_date): make sure we've opened the
- summary.
- (pas_backend_summary_get_summary_vcard): fix compiler warning.
-
-2002-07-10 Peter Williams <peterw@ximian.com>
-
- * backend/ebook/e-book-view-listener.h: Oops, missed this one.
-
- * backend/ebook/Makefile.am (libebookinclude_HEADERS): Also
- put addressbook.h here because several headers reference it.
-
-2002-07-08 Peter Williams <peterw@ximian.com>
-
- * backend/ebook/e-book.h: Normalize includes to <ebook/foo.h>, so
- that the installed headers will work sanely.
-
- * backend/ebook/e-card-cursor.h:
- * backend/ebook/e-book-view.h:
- * backend/ebook/e-card-simple.h:
- * backend/ebook/e-card.h:
- * backend/ebook/e-destination.h: Same.
-
- * printing/Makefile.am (INCLUDES): add -Iaddressbook/backend
- to access the ebook headers. Also the builddir version to get
- the generated addressbook.h
-
- * conduit/Makefile.am (INCLUDES): Same.
-
- * gui/widgets/Makefile.am (INCLUDES): Same builddir fix.
-
- * gui/merging/e-card-merging.c: Fix an ebook #include.
-
- * gui/merging/Makefile.am (INCLUDES): Same idea.
-
- * gui/contact-list-editor/Makefile.am (INCLUDES): Same.
-
- * gui/contact-editor/Makefile.am (INCLUDES): Same builddir
- change.
-
-2002-07-10 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook-storage.c (load_source_data): Pass
- zero as the @sorting_priority to evolution_storage_new_folder().
- (addressbook_storage_add_source): Likewise.
-
-2002-07-10 Chris Toshok <toshok@ximian.com>
-
- * backend/idl/addressbook.idl: add Book.getCompletionView.
-
- * backend/ebook/e-book.c (e_book_get_completion_view): new
- function, basically c&p of e_book_get_book_view, but call
- getCompletionView.
-
- * backend/ebook/e-book.h: add prototype for
- e_book_get_completion_view.
-
- * backend/pas/pas-backend-ldap.c
- (pas_backend_ldap_process_client_requests): add a
- GetCompletionView case here that just calls the same code as
- GetBookView (since we don't build summaries for the ldap backend.)
-
- * backend/pas/pas-backend-file.c (do_summary_query): add
- @completion_search. If it's TRUE, just create the vcards from the
- summary using pas_backend_summary_get_summary_vcard instead of
- looking them up from the db.
- (pas_backend_file_search): add @completion_search and pass it on
- to do_summary_query.
- (pas_backend_file_process_get_book_view): pass FALSE to
- pas_backend_file_search.
- (pas_backend_file_process_get_completion_view): new function,
- basically c&p pas_backend_file_process_get_book_view, but pass
- TRUE to pas_backend_file_search.
- (pas_backend_file_process_client_requests): add a case for
- GetCompletionView.
- (pas_backend_file_load_uri): track the change to the summary api -
- create the summary filename
-
- * backend/pas/pas-book.c (pas_book_queue_get_completion_view): new
- function, queue a GetCompletionView request to our queue.
- (impl_GNOME_Evolution_Addressbook_Book_getCompletionView): new
- function, call pas_book_queue_get_completion_view.
- (pas_book_respond_get_completion_view): new function, just call
- notifyViewRequested.
- (pas_book_free_request): add a case for GetCompletionView.
- (pas_book_get_epv): fill in epv->getCompletionView.
-
- * backend/pas/pas-book.h: add a GetCompletionView PASOperation,
- and a new structure (PASGetCompletionViewRequest). Also, add
- get_completion_view to PASRequest.
-
- * backend/pas/pas-backend-summary.c (clear_items): remove the
- items from the hash table.
- (pas_backend_summary_new): db_path -> summary_path.
- (pas_backend_summary_destroy): db_.path -> summary_path, and
- destroy the hash table.
- (pas_backend_summary_init): db_path = summary_path, and initialize
- the id_to_item hashtable.
- (pas_backend_summary_load_header): handle the upgrading from
- version 1.0 to version 2.0 (the addition of an mtime field in the
- header)
- (pas_backend_summary_load_item): version 1.0 and 2.0 have the same
- format for items.
- (pas_backend_summary_open): new function. open the summary so we
- can load the header (and get the mtime).
- (pas_backend_summary_load): rework this a bit since the header has
- already been loaded, and also add the items to the hashtable.
- (pas_backend_summary_add_card): add the new item to the hashtable.
- (pas_backend_summary_remove_card): remove the item from the hash
- table.
- (pas_backend_summary_is_up_to_date): new function, chekc @t
- against the summary's mtime.
- (pas_backend_summary_get_summary_vcard): create a vcard from the
- fields we have in the summary.
-
- * backend/pas/pas-backend-summary.h: add prorotypes for
- pas_backend_summary_is_up_to_date and
- pas_backend_summary_get_summary_vcard.
-
-2002-07-09 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook-storage.c (load_source_data): Pass
- NULL @custom_icon_name to evolution_storage_new_folder().
- (addressbook_storage_add_source): Likewise. [Note we could be
- passing a nice custom here. ;-)]
-
-2002-07-02 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook-component.c (add_creatable_item): New
- arg @tooltip; pass it to
- evolution_shell_component_add_user_creatable_item() [which now has
- a @tooltip arg].
-
-2002-06-29 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/Makefile.am (libpas_a_SOURCES): add
- pas-backend-summary.[ch].
-
- * backend/pas/pas-backend-file.c (string_to_dbt): move this to the
- top of the file so it can be used in..
- (build_summary): loop over the db, adding cards ot the summary.
- (do_summary_query): call pas_backend_summary_search and loop over
- the returned id's looking them up in the db.
- (pas_backend_file_search): call
- pas_backend_summary_is_summary_query, and either call
- do_summary_query if it's a query over just the set of attributes
- in the summary or use the old, slow method if not.
- (pas_backend_file_process_create_card): call
- pas_backend_summary_add_card.
- (pas_backend_file_process_remove_card): call
- pas_backend_summary_remove_card.
- (pas_backend_file_process_modify_card): call remove_card/add_card.
- (pas_backend_file_load_uri): try to load the summary file, and if
- it doesn't exist create it.
- (pas_backend_file_destroy): unref the summary.
-
- * backend/pas/pas-backend-summary.[ch]: new files, reading and
- writing (and querying) summaries.
-
-2002-06-27 Sean Atkinson <sean@cantab.net>
-
- * gui/component/addressbook-config.c (query_for_supported_bases):
- don't unref selection_model (otherwise 3 clicks of
- "Show Supported Bases" crashes if LDAP server isn't running).
-
-2002-06-25 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook-component.c (create_component):
- reorder the adding of creatable items so the default is a new
- contact, not a new contact list.
-
-2002-06-21 Sean Atkinson <sean@cantab.net>
-
- * gui/component/addressbook-config.c (addressbook_edit_server_dialog):
- remove source argument (get it from the dialog).
- (edit_source_clicked): same.
- (sources_table_double_click): added to edit server by double-clicking.
- (ldap_dialog_new): use sources_table_double_click.
-
-2002-06-17 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-addressbook-view.c (e_addressbook_view_save_as):
- pass NULL to e_contact_list_save_as. modality sucks. fixes
- broken build.
- (save_as): same.
-
-2002-06-15 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #26130 ]
- * gui/contact-editor/e-contact-editor.c (file_save_as_cb): pass
- ce->app as parent_window.
-
- * gui/contact-list-editor/e-contact-list-editor.c
- (file_save_as_cb): same .
-
- * gui/contact-editor/e-contact-save-as.c (e_contact_list_save_as):
- if a parent_window is specified, the file selector should be
- modal/transient for that window.
- (e_contact_save_as): same.
-
- * gui/contact-editor/e-contact-save-as.h: track prototype changes
- (addition of GtkWindow *parent_window to both calls.)
-
-2002-06-15 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (pas_backend_ldap_connect): use
- ldap_unbind_ext.
- (create_card_handler): don't leak the new vcard.
- (pas_backend_ldap_process_authenticate_user): don't leak the dn.
-
-2002-06-14 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-file.c (pas_backend_file_search): up the
- max threshold to 3000 cards from 1000 cards.. seems to improve
- performance a bit. also remove the g_list_reverse since it
- doesn't matter what order the cards arrive to the gui.
- (pas_backend_file_changes): plug memory leaks.
-
-2002-06-14 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-card-compare.c (compare_email_addresses): Made
- "" compare as not equal to "" for addresses.
- (use_common_book_cb): Don't bother checking for nickname here
- since we don't use it as a match later. Don't add "" as an
- address to the list of query parts.
-
-2002-06-13 Christopher James Lahey <clahey@ximian.com>
-
- * gui/contact-editor/e-contact-editor.c (enable_writable_fields):
- Don't enable fields if the editor isn't editable and the
- widget_field_mappings lists this field as being desensitize for
- read only.
-
-2002-06-11 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #17332 ]
- * backend/ebook/e-book.c (e_book_get_static_capabilities): we
- shouldn't ever return NULL here. in error cases we need to return
- g_strdup("");
-
-2002-06-11 Christopher James Lahey <clahey@ximian.com>
-
- * gui/widgets/e-minicard-view.c (e_minicard_view_event): Made
- double clicking on read only folders not do anything.
-
-2002-06-10 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-book-util.c (e_book_expand_uri): Made expand_uri
- a bit more robust and readable.
- (e_book_get_default_book_uri): Made e_book_get_default_book_uri
- use e_book_expand_uri if using the bonobo_config value.
-
- * gui/component/e-address-popup.c (start_query): Handle the
- failure state here by acting as if there are no matches.
-
-2002-06-05 Christopher James Lahey <clahey@ximian.com>
-
- * gui/widgets/e-minicard.c (e_minicard_event): Call
- e_minicard_selected in the GDK_BUTTON_RELEASE case here.
- (e_minicard_drag_begin): Set E_REFLOW (parent)->maybe_in_drag =
- FALSE if it's an EReflow.
-
-2002-06-04 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/select-names/e-select-names-completion.c
- (e_select_names_completion_book_ready): Commented out this unused
- function.
-
- * gui/component/select-names/e-select-names-manager.c
- (open_book_cb): Ref if we're keeping the book. Don't unref if
- we're not keeping the book.
- (clean_cb): Commented out this unused function.
-
-2002-06-04 Christopher James Lahey <clahey@ximian.com>
-
- * gui/widgets/e-addressbook-view.c (init_collection): Set the
- title of our GalVIewCollection.
-
-2002-05-29 Anna Marie Dirks <anna@ximian.com>
-
- * gui/component/select-names/select-names.glade: Changed some spacing
- and expanding behavior to make this dialog behave more like I intended
- to.
-
-2002-05-24 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook-config.c (CONFIG_CONTROL_FACTORY_ID):
- put this back in, accidentally got snipped with the hacking going
- on in here.
-
-2002-05-24 Chris Toshok <toshok@ximian.com>
-
- [ part of #25047 ]
- * gui/component/addressbook-config.c: remove the autocompletion
- config control from here, as it lives in the shell now.
-
- * gui/component/GNOME_Evolution_Addressbook.oaf.in: same.
-
-2002-05-24 Chris Toshok <toshok@ximian.com>
-
- [ #24189 ]
- * gui/component/select-names/e-select-names-manager.c
- (focus_out_cb): ifdef out the body of this because it only works
- with a single completion book. not sure what to do here, but it
- doesn't impact most usage scenarios.
- (completion_popup_cb): same.
- (e_select_names_manager_entry_new): add the books that have been
- loaded successfully by the time this entry is created.
- (open_book_cb): add the opened book to the entries that have
- already been created, and store it in our list so that entries
- that are created in the future can catch up.
- (read_completion_books_from_db): slurp in the folder list from the
- config db and load all the uris.
- (uris_listener): listener function - when there's a change it
- calls _clear_books on all the created entries, and clears our
- list. It then re-reads the books from the db.
- (e_select_names_manager_new): create our bonobo listener and call
- read_completion_books_from_db.
- (e_select_names_manager_init): init completion_books.
- (e_select_names_manager_destroy): free our list of
- completion_books.
-
- * gui/component/select-names/e-select-names-manager.h: switch from
- a single EBook to a GList of completion_books here.
-
- * gui/component/select-names/e-select-names-completion.c
- (e_select_names_completion_add_book): deal with the case where
- there's an active query (by effectively restarting it.) This is
- quite a contrived edge case.
- (e_select_names_completion_clear_books): stop the current query
- and clear our list of books.
- (e_select_names_completion_new): track change to prototype, and
- axe the majority of this method since an EBook* isn't passed
- anymore.
- (e_select_names_completion_clear_book_data): split this code out
- from the destroy method so it can be called from _clear_books.
-
- * gui/component/select-names/e-select-names-completion.h: the
- constructor no longer takes an EBook -- pass in as many as you
- want using _add_book. Also, add prototype for _clear_books.
-
- * gui/component/addressbook.c (load_uri_cb): when
- storing/retrieving passwords, use the cleaned (without params)
- version of the uri, so changing things like download limit don't
- cause the user to be prompted for a password again.
-
- * gui/component/addressbook-component.c
- (ensure_completion_uris_exist): new function - probably doesn't
- belong in this file. Make sure the basic local Contacts folder
- exists in the completion uris.
- (addressbook_component_factory_init): call
- ensure_completion_uris_exist.
-
- * backend/ebook/e-book-util.h: add prototype for
- e_book_get_default_book_uri.
-
- * backend/ebook/e-book-util.c (e_book_get_default_book_uri): new
- function, just return the default contacts uri.
- (e_book_load_default_book): change
- to use e_book_get_default_book_uri.
-
-2002-05-23 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook-config.c (addressbook_root_dse_query):
- fix parameter/local variable overloading.
-
-2002-05-21 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook.c (load_uri_cb): Don't try to invoke
- e_book_get_uri() on NULL. Fixes #25069.
-
-2002-05-17 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-addressbook-util.c (e_addressbook_error_dialog):
- make sure we map status -> string correctly (add missing strings).
-
- * backend/ebook/e-book-types.h (EBookStatus): add the missing
- AUTHENTICATION_REQUIRED status code, to map to the idl response.
-
- * backend/ebook/e-book-listener.c
- (e_book_listener_convert_status): make sure we map all idl status
- codes to EBookStatus statuses.
-
-2002-05-20 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook-storage.c (load_source_data): Pass
- FALSE for @sync_offline to evolution_storage_new_folder().
- (addressbook_storage_add_source): Pass FALSE for @sync_offline to
- evolution_storage_new_folder().
-
-2002-05-16 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook-component.c (request_quit): New, quit
- handler for the EvolutionShellComponent.
- (add_creatable_item): Set it up.
-
- * gui/contact-editor/e-contact-list-editor.c
- (e_contact_list_editor_request_close_all): New.
- (e_contact_list_editor_new): Put the contact editor in a static
- list and gtk_object_weakref() it.
- (contact_list_editor_destroy_notify): New, GtkDestroyNotify
- function for the contact editors.
-
- * gui/contact-editor/e-contact-editor.c
- (e_contact_editor_request_close_all): New.
- (e_contact_editor_new): Put the contact editor in a static list
- and gtk_object_weakref() it.
- (contact_editor_destroy_notify): New, GtkDestroyNotify function
- for the contact editors.
-
-2002-05-15 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook-component.c (create_component): Pass
- NULL as @request_quit_fn.
-
-2002-05-13 Christopher James Lahey <clahey@ximian.com>
-
- * backend/idl/addressbook.idl: Removed an incorrect comment here.
-
-2002-05-13 Christopher James Lahey <clahey@ximian.com>
-
- * gui/contact-editor/e-contact-editor.c (enable_writable_fields):
- Enable the dropdown widgets even if the contact is not editable so
- that you can view any email address, phone number, or postal
- address on read only contacts.
-
-2002-05-10 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/select-names/Evolution-Addressbook-SelectNames.idl:
- Added SimpleCard interface.
-
- * gui/component/select-names/Makefile.am: Added
- e-simple-card-bonobo.c and e-simple-card-bonobo.h.
-
- * gui/component/select-names/e-select-names-bonobo.c
- (entry_get_property_fn): Added SIMPLE_CARD_LIST arg.
-
- * gui/component/select-names/e-simple-card-bonobo.c,
- gui/component/select-names/e-simple-card-bonobo.h: New class to
- represent an ECardSimple across Bonobo.
-
-2002-05-09 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/select-names/e-select-names-bonobo.c
- (entry_get_property_fn): Added "first_email" property.
-
-2002-05-09 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook-storage.c
- (addressbook_get_other_contact_storage): Pass %FALSE as
- @has_shared_folders to evolution_storage_new().
-
-2002-05-08 JP Rosevear <jpr@ximian.com>
-
- * conduit/Makefile.am: link against the libtool version of
- libversit
-
-2002-05-07 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook-config.c
- (addressbook_config_control_new): oops, add the NULL back at the
- end of possible_types.
-
-2002-05-07 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook-config.c (addressbook_ldap_init):
- bleah, need to pass the GtkWindow here so we can pop up the a
- modal parented dialog (gtk modal dialogs suck?).
- (addressbook_ldap_auth): same.
- (addressbook_root_dse_query): same.
- (do_ldap_root_dse_query): same.
- (addressbook_config_control_new): add "ldap-contacts" to the list
- of possible types.
-
-2002-05-07 Dan Winship <danw@ximian.com>
-
- * gui/component/addressbook-storage.c (create_ldap_folder):
- s/ldap_config/addressbook_config/
-
-2002-05-03 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-book.c (activate_factories_for_uri): finally
- remove the #if 0's and use the oaf query stuff to get backends
- that handle specific protocols.
-
-2002-05-03 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/addressbook-config.c
- (addressbook_folder_list_changed_callback): Call
- evolution_config_control_changed when the EFolderList changes.
-
-2002-05-03 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/GNOME_Evolution_Addressbook.oaf.in: Updated this
- to have the ConfigControlFactory have an addressbookwide generic
- name and added OAFIID:GNOME_Evolution_Addressbook_ConfigControl.
-
- * gui/component/Makefile.am (evolution_addressbook_SOURCES),
- gui/component/addressbook-component.c,
- gui/component/addressbook-storage.c, gui/component/addressbook.c:
- Replaced ldap-config.c and ldap-config.h with addressbook-config.c
- andaddressbook-config.h.
-
- * gui/component/addressbook-config.c,
- gui/component/addressbook-config.h: Based on ldap-config.c and
- ldap-config.h. Added a folder list control. Made this a multi
- factory.
-
- * gui/component/ldap-config.c, gui/component/ldap-config.h:
- Replaced these with addressbook-config.c and addressbook-config.h.
-
-2002-05-02 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/select-names/e-select-names.c (selection_change):
- Desensitize the to, cc, and bcc buttons if there's no selection
- here. Fixes Ximian bug #21482.
-
-2002-05-01 Christopher James Lahey <clahey@ximian.com>
-
- * gui/contact-list-editor/e-contact-list-editor.c (verbs): Changed
- some of these to bind to the ContactListEditor verbs since they're
- marked as that in the ui file. Fixes Ximian bug #13034.
-
-2002-04-30 JP Rosevear <jpr@ximian.com>
-
- * gui/component/Makefile.am (EXTRA_DIST): fix
-
-2002-04-30 Christopher James Lahey <clahey@ximian.com>
-
- * gui/widgets/e-addressbook-model.c,
- gui/widgets/e-addressbook-model.h
- (e_addressbook_model_peek_card): Added this function so that there
- would be less duplication of cards during run time when
- duplication is unnecessary.
-
- * gui/widgets/e-addressbook-view.c: Cleaned up get_card_list and a
- number of associated functions to be much more uniform and
- simpler.
- (get_has_email_address): Don't show the "Send Message to Contact"
- menu item if there are no email addresses in the listed contacts.
- Fixes bug #1298.
-
-2002-04-30 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-card.c (e_card_list_send): Changed this to set a
- subject when sending a contact. This makes the signature be set
- properly also.
-
-2002-04-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * printing/Makefile.am: Don't link to libibex anymore.
-
- * conduit/Makefile.am: Same.
-
- * backend/ebook/Makefile.am: Again here.
-
- * gui/component/Makefile.am: And finally here.
-
-2002-04-26 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_child_free): Unref the text_model here instead of
- the model, since the model never gets set. Removed the model
- field since it's no longer used.
-
-2002-04-24 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/ldap-config.c: Updated this for the new
- e_table_memory_store_insert function prototype.
-
-2002-04-24 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 (folder_browse):
- Added a "Browse..." button to switch to a different addressbook
- folder.
-
- * gui/widgets/e-addressbook-util.c (e_addressbook_transfer_cards):
- Moved extern EvolutionShellClient out of this function so that
- it'd be more readable.
-
-2002-04-23 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/select-names/e-select-names.c,
- gui/component/select-names/e-select-names.h: Coded handling of the
- select_entry to search within the displayed contacts.
-
- * gui/component/select-names/select-names.glade: Updated this
- dialog to have an entry-select instead of an entry-find.
-
-2002-04-23 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/select-names/select-names.glade: Updated this
- dialog to match the redesign.
-
-2002-04-23 Christopher James Lahey <clahey@ximian.com>
-
- * gui/widgets/e-addressbook-view.c (do_popup_menu): Make unused
- menu items disappear instead of graying out.
-
-2002-04-23 Christopher James Lahey <clahey@ximian.com>
-
- * gui/widgets/e-addressbook-reflow-adapter.c,
- gui/widgets/e-addressbook-reflow-adapter.h: Removed
- e_addressbook_reflow_adapter_right_click and
- e_addressbook_reflow_adapter_base_right_click.
-
- * gui/widgets/e-addressbook-view.c: Handle right click menu for
- both types of view. Merged right click on white space with right
- click on main area. General clean up.
-
- * gui/widgets/e-minicard-view-widget.c,
- gui/widgets/e-minicard-view-widget.h: Removed a couple unnecessary
- functions. Added e_minicard_view_widget_get_view. Added
- right_click signal.
-
- * gui/widgets/e-minicard-view.c, gui/widgets/e-minicard-view.h:
- Added the right_click signal and the e_minicard_view_get_card_list
- function.
-
-2002-04-22 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/select-names/e-select-names.h: Removed an unused
- variable here.
-
- * gui/widgets/e-addressbook-view.c (table_right_click,
- table_white_space_event): Added a current view submenu to the
- popup menu here.
-
-2002-04-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * gui/widgets/e-minicard-view.c (e_minicard_view_drag_begin):
- Allow GDK_ACTION_COPY also, since the composer for example does
- not accept MOVE's. Completes bug #8448.
-
-2002-04-18 Chris Toshok <toshok@ximian.com>
-
- * gui/component/ldap-config.glade: change order of scope option
- menu to match how it's stored.
-
-2002-04-18 Chris Toshok <toshok@ximian.com>
-
- * gui/component/GNOME_Evolution_Addressbook.oaf.in: change ldap
- config control text so it fits in the config dialog.
-
- * gui/component/ldap-config.c: #ifdef lots of stuff HAVE_LDAP so
- it'll build/run in either case.
- (addressbook_source_dialog_destroy): rename
- addressbook_add_server_druid_destroy to this, and free lots more
- stuff.
- (addressbook_add_server_druid):
- addressbook_add_server_druid_destroy ->
- addressbook_source_dialog_destroy.
- (do_schema_query): add 3 second timeout to schema query.
- (addressbook_edit_server_dialog): hook up destroy signal.
- (config_control_new): if HAVE_LDAP isn't defined, put up a label
- saying so.
-
-2002-04-18 Chris Toshok <toshok@ximian.com>
-
- * gui/component/Makefile.am (INCLUDES): add LDAP_CFLAGS to INCLUDES
-
-2002-04-18 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook.c (book_open_cb): no more
- source->type.
-
-2002-04-18 Chris Toshok <toshok@ximian.com>
-
- * gui/component/ldap-config.c (addressbook_dialog_get_source):
- fill in source->ssl.
- (addressbook_source_dialog_set_source): set up auth/scope/ssl
- option menus properly.
-
- * gui/component/addressbook-storage.c
- (addressbook_storage_init_source_uri): always include the
- limit/ssl in the uri so we don't need to rely on defaults
- everywhere.
- (ldap_source_foreach): store the ssl option.
-
- * gui/component/addressbook-storage.h: reorder SSLType to match
- the UI.
-
- * backend/pas/pas-backend-ldap.c: (struct _PASBackendLDAPPrivate)
- add field for ldap_timeout.
- (pas_backend_ldap_connect): reorder things a bit - we need to
- start tls before the root dse query, if we can.
- (pas_backend_ldap_load_uri): track the way ssl parameters are
- given in the uri, and parse out the timeout.
-
- * gui/component/ldap-config.c (port_changed_func): use the
- symbolic SSL name instead of an integer constant.
-
-2002-04-18 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (get_ldap_library_info): fix
- memory leaks.
-
- * gui/component/GNOME_Evolution_Addressbook.oaf.in: remove the
- Addressbook_ConfigControl stuff to LDAP_ConfigControl.
-
- * gui/component/Makefile.am (evolution_addressbook_SOURCES):
- remove addressbook-config.* and add ldap-config.*
- (glade_DATA): same.
- (evolution_addressbook_LDADD): add LDAP_LIBS.
-
- * gui/component/addressbook-component.c (owner_set_cb):
- addressbook_config_register_factory =>
- ldap_config_register_factory.
-
- * gui/component/addressbook.c (book_open_cb): remove source->type
- check - they're always LDAP.
- (load_uri_cb): same.
-
- * gui/component/addressbook-storage.c (ldap_unparse_ssl): new
- function.
- (ldap_parse_ssl): new function.
- (addressbook_storage_init_source_uri): use a more flexible scheme
- to build up the uri's, and add in the ssl parameter.
- (load_source_data): fill in source->ssl, and remove source->type
- assignment.
- (addressbook_source_copy): copy source->ssl, and remove
- source->type copy.
- (create_ldap_folder): addressbook_create_new_source =>
- ldap_config_create_new_source.
-
- * gui/component/addressbook-storage.h: remove
- AddressbookSourceType (it was always LDAP), and add
- AddressbookLDAPSSLType.
-
-2002-04-18 Dan Winship <danw@ximian.com>
-
- * backend/ebook/e-book-util.c (e_book_load_default_book): Append
- /addressbook.db to the end of the default URI if it starts with
- file:
-
- * backend/ebook/e-book.c (e_book_load_uri_step): Fix this to not
- loop forever if you have more than one backend.
-
-2002-04-17 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_create_categories): Changed this to use
- ECategoriesMasterListOptionMenu.
-
- * gui/component/select-names/e-select-names.c
- (section_right_click_cb),
- gui/widgets/e-addressbook-reflow-adapter.c,
- gui/widgets/e-addressbook-view.c: Updated these to match the new
- EPopupMenu.
-
-2002-04-11 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/addressbook-component.c: Include
- addressbook-config.h here as this file uses it.
-
- * gui/component/select-names/e-select-names.c (SPEC, SPEC2): Made
- this dialog searchable by typing in the ETable.
-
- * gui/widgets/e-addressbook-model.c: Include e-addressbook-util.h
- here.
-
- * gui/widgets/e-addressbook-reflow-adapter.c
- (e_addressbook_reflow_adapter_right_click),
- gui/widgets/e-addressbook-view.c (table_right_click): Fixed a
- memory leak here by using "selection-done" signal.
-
- * gui/widgets/e-addressbook-reflow-adapter.c,
- gui/widgets/e-addressbook-reflow-adapter.h,
- gui/widgets/e-addressbook-view.c, gui/widgets/e-minicard-view.c:
- Added a right click menu for areas that aren't cards.
-
-2002-04-09 Dan Winship <danw@ximian.com>
-
- * backend/ebook/e-book-util.c (e_book_load_default_book): Update
- for new-and-improved consistent default folder uri.
-
- * gui/component/addressbook.c (addressbook_load_default_book): Use
- e_book_load_default_book rather than duplicating most of its logic
- here.
- (load_uri_cb): Modify to work as a callback for
- addressbook_load_default_book as well as addressbook_load_uri.
-
-2002-04-08 Dan Winship <danw@ximian.com>
-
- * gui/component/addressbook-component.c (create_view): Add
- view_info arg, but don't do anything with it.
-
-2002-04-06 JP Rosevear <jpr@ximian.com>
-
- * gui/component/GNOME_Evolution_Addressbook.oaf.in: add
- config_item:type
-
-2002-04-04 JP Rosevear <jpr@ximian.com>
-
- * conduit/Makefile.am: link to the static libversit
-
-2002-04-04 Dan Winship <danw@ximian.com>
-
- * gui/widgets/e-addressbook-util.c (e_addressbook_transfer_cards):
- Update for evolution_shell_client_user_select_folder API change.
-
-2002-04-04 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook.c: Remove AddressbookConfig,
- ContactNew, ContactNewList EPixmap entries.
-
- * gui/component/addressbook-factory.c (main): Print out a
- debugging message just before the main loop starts, for debugging
- purposes.
-
-2002-04-02 Dan Winship <danw@ximian.com>
-
- * backend/ebook/e-card-simple.h: Fix spelling of
- E_CARD_SIMPLE_PHONE_ID_TTYTDD and E_CARD_SIMPLE_FIELD_PHONE_TTYTDD
- (they previously ended with "TTD" instead of "TDD")
-
- * backend/ebook/e-card-simple.c: Update for spelling fix.
-
- * backend/pas/pas-backend-ldap.c: Likewise
-
-2002-04-01 Dan Winship <danw@ximian.com>
-
- * gui/component/select-names/e-select-names-text-model.c:
- parent_class should be static. (From Max Horn <max@quendi.de>)
-
-2002-03-29 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/GNOME_Evolution_Addressbook.oaf.in: Add priority
- for the config page. Renamed to "Directory Servers".
-
-2002-03-27 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-file.c
- (pas_backend_file_process_create_card): don't free req->vcard.
- it's freed in pas_book_free_request.
- (pas_backend_file_process_remove_card): don't free req->id for the
- same reason.
- (pas_backend_file_process_modify_card): don't free req->vcard for
- the same reason.
- (pas_backend_file_process_get_changes): don't free req->change_id
- or release_unref the listener for the same reason.
-
-2002-03-27 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (check_schema_support): make sure
- to call ldap_value_free (values);, and ldap_msgfree (resp).
- (get_ldap_library_info): don't ask me why, but it appears we have
- to free each extension char*.
- (query_ldap_root_dse): make sure to free values in the
- subschemaSubentry code before overwriting it, and call
- ldap_msgfree(resp) when we're all done.
- (build_card_from_entry): don't leak the DN, ldap attributes, or
- the berval the ldap_*_attribute calls use to step through the
- attributes. the docs say this berval is freed when
- ldap_next_attribute returns NULL, but if we don't free it it leaks
- a substantial amount of memory.
- (pas_backend_ldap_search): make sure to only allocate *op once,
- and fix the g_warning since op isn't valid in its scope anymore.
-
-2002-03-19 Dan Winship <danw@ximian.com>
-
- * backend/ebook/Makefile.am: Update for libversit change: Use .a
- rather than .la now.
-
- * printing/Makefile.am: Likewise
-
- * gui/component/Makefile.am: Likewise
-
-2002-03-18 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook.c (addressbook_menu_activated):
- Removed.
- (addressbook_factory_new_control): Don't connect anymore, as this
- signal has been removed from the ESearchBar.
- (addressbook_factory_new_control): No more custom menu items here.
-
-2002-03-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * gui/widgets/e-addressbook-view.c (table_right_click): Update to
- use new EPopupMenu API.
-
- * gui/widgets/e-addressbook-reflow-adapter.c
- (e_addressbook_reflow_adapter_right_click): Update to use new
- EPopupMenu API.
-
- * gui/component/select-names/e-select-names.c
- (section_right_click_cb): Update to match new EPopupMenu api.
-
-2002-03-15 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook.c: Remove the
- `addressbook_search_menu_items'.
- (addressbook_menu_activated): Removed.
- (addressbook_factory_new_control): Don't connect. No menu items.
-
-2002-03-15 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook.c (control_activate): Call
- `e_search_bar_set_ui_component()' to set the BonoboUIComponent for
- the search bar.
-
- * gui/component/GNOME_Evolution_Addressbook.oaf.in: Add an icon
- for the LDAP sources configuration control.
-
-2002-03-12 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook.c: Remove verb "AddressbookConfig".
- (config_cb): Removed.
-
- * gui/component/addressbook-config.c: Remove `dialog' member from
- `AddresbookDialog'. Instead, add a `config_control' member.
- (config_control_new): New.
- (addressbook_config): Removed.
- (addressbook_config_register_factory): New.
- (config_control_factory_fn): New, factory function for the
- ConfigControl page.
- (addressbook_source_edit_changed): Don't change the sensitivity of
- the dialog. Rather, invoke ::changed on the ConfigPage.
- (auth_checkbutton_changed): No need to manually change the
- sensitiviness of the buttons here either.
- (add_source_clicked): Likewise, just invoke
- evolution_config_control_changed().
- (edit_source_clicked): Likewise.
- (addressbook_dialog_close): Removed.
- (config_control_destroy_callback): New, callback for when the
- config control gets destroyed.
- (addressbook_dialog_apply): Removed.
- (config_control_apply_callback): New callback for
- EvolutionConfigControl::apply.
- (addressbook_dialog_ok): Removed.
- (addressbook_config_control_new): Set up ->config_control and
- connect the signals.
-
- * gui/component/addressbook-config.glade: Call the main hbox in
- the addressbook_sources dialog `addressbook_sources_main_hbox'.
-
- * gui/component/addressbook-component.c (owner_set_cb): Call
- `addresbook_config_register_factory'.
-
- * gui/component/GNOME_Evolution_Addressbook.oaf.in: Add items for
- OAFIID:GNOME_Evolution_Addresbook_ConfigControl and
- OAFIID:GNOME_Evolution_Addressbook_ConfigControlFactory.
-
-2002-03-11 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names.c (update_query):
- change contains x-evolution-any-field to beginswith on email,
- full_name, and nickname. faster, and more applicable to this
- dialog.
-
-2002-03-09 Chris Toshok <toshok@ximian.com>
-
- * backend/idl/addressbook.idl: add TLSNotAvailable to
- BookLister_CallStatus.
-
- * backend/ebook/e-book-types.h: add TLS_NOT_AVAILABLE to the EBookStatus enum.
-
- * backend/ebook/e-book-listener.c
- (e_book_listener_convert_status): add TLS_NOT_AVAILABLE to the
- switch.
-
- * backend/pas/pas-backend-ldap.c
- (pas_backend_ldap_get_static_capabilities): fix name.
- (pas_backend_ldap_class_init): fix name.
- (pas_backend_ldap_connect): change return type to CallStatus so we
- can return different errors from here. Also, do STARTTLS if the
- user has asked for it and the connection supports it, returning
- TLSNotAvailable (and close the connection) if they chose to
- require it.
- (pas_backend_ldap_load_uri): return pas_backend_ldap_connect.
- (func_beginswith): pull in change from evolution-1-0-branch to
- make full_name beginswith search both cn and sn.
-
-2002-03-09 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-addressbook-view.c (jump_to_letter): since I've
- gone ahead and made the file backend (by way of
- pas-backend-card-sexp.c) use case insensitive searches for
- beginswith, there's no need to list upper and lower case here.
-
- * gui/component/addressbook.c (addressbook_search_option_items):
- reorder things to put "Any field contains" at the end, since it's
- the least efficient search. Also reorder the enum to the same
- ordering. Change "Name contains" to "Name begins with" and change
- "Email contains" to "Email is".
- (addressbook_search_activated): change FULL_NAME to beginswith,
- and change EMAIL to is to match the labels.
-
- * backend/pas/pas-backend-card-sexp.c (compare_name): new
- function, so we can compare both full and family names (so
- beginswith can operate on them both.)
- (endswith_helper): use e_utf8_strstrcase here, since all the
- backends backends use case insensitive searching.
- (func_endswith): same.
-
-2002-03-06 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-book.c (pas_book_queue_create_card): track
- union/struct change.
- (pas_book_queue_remove_card): same.
- (pas_book_queue_modify_card): same.
- (pas_book_queue_get_cursor): same.
- (pas_book_queue_get_vcard): same.
- (pas_book_queue_authenticate_user): same.
- (pas_book_queue_get_book_view): same.
- (pas_book_queue_get_changes): same.
- (pas_book_free_request): new function - free everything we need to
- for each type of request.
- (pas_book_destroy): call pas_book_free_request here instead of
- just freeing 3 elements of the old struct. yay plugging memleaks.
-
- * backend/pas/pas-book.h: make PASRequest a union and split out
- members into structs, so it's a little clearer which fields are
- used by which requests. Also, add prototype for
- pas_book_free_request so backends can just free everything at once
- (usually in their requests_queued signal func.)
-
- * backend/pas/pas-backend-file.c
- (pas_backend_file_process_create_card): track struct/union change.
- (pas_backend_file_process_remove_card): same.
- (pas_backend_file_process_modify_card): same.
- (pas_backend_file_build_cards_list): same.
- (pas_backend_file_process_get_vcard): same.
- (pas_backend_file_process_get_cursor): same.
- (pas_backend_file_process_get_book_view): same.
- (pas_backend_file_process_get_changes): same.
- (pas_backend_file_process_check_connection): same.
- (pas_backend_file_process_authenticate_user): same.
- (pas_backend_file_process_get_supported_fields): same.
- (pas_backend_file_process_client_requests): case the union to the
- specific struct and pass it to the process_* functions. also,
- call pas_book_free_request here, instead of relying on each of the
- functions to free their stuff.
-
-2002-03-07 Dan Winship <danw@ximian.com>
-
- * gui/component/addressbook-storage.c
- (addressbook_get_other_contact_storage): Update for
- evolution_storage_new() change.
-
-2002-03-05 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-minicard-view-widget.c
- (e_minicard_view_widget_realize): don't set "editable" here, as
- the way things work the backend isn't able to override a setting
- from the UI, so writable books never show up as writable.
-
-2002-03-04 Chris Toshok <toshok@ximian.com>
-
- [fixes bug #20871]
- * gui/component/select-names/select-names.glade: add the
- status-message label.
-
- * gui/component/select-names/e-select-names.h (struct
- _ESelectNames): add status_message field.
-
- * gui/component/select-names/e-select-names.c (status_message):
- new function, set the label's text from the message.
- (e_select_names_init): get the status-message label, and if it's
- valid, connect to the status_message signal of the
- EAddressbookModel.
-
-2002-02-28 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (pas_backend_ldap_search): don't
- ref the view here, since it keeps the view alive until the search
- is over, which we don't want. we want the view's death to cancel
- the search. This speeds up starting new searches after one is
- already active (since switching searches actually creates a new
- book view and destroys the old one.)
- (ldap_search_dtor): remove the matching unref here. The unref as
- it was was incorrect anyway, and caused a crash (we needed
- search_op->view, not op->view.)
-
-2002-02-27 Chris Toshok <toshok@ximian.com>
-
- [fixes bug #20690]
- * backend/pas/pas-backend-ldap.c (func_and): the data arg is not
- GList** anymore, it's PASBackendLDAPSExpData*, so use
- ldap_data->list instead of *list.
- (func_or): same.
- (func_not): same.
- (func_contains): same.
- (func_is): same.
- (func_endswith): same.
- (func_beginswith): same, but also special case the beginswith
- "fileAs" query type (the one used by the alphabet buttons on the
- right hand side, so we can deal with entries that don't have
- fileAs attributes, and return meaningful responses.)
- (pas_backend_ldap_build_query): initialize the
- PASBackendLDAPSExpData struct and pass that instead of &list.
- Also, take the PASBackendLDAP arg to add to the struct in case we
- need it at some point in the future.
- (ldap_search_handler): pass in the PASBackendLDAP.
-
-2002-02-26 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-file.c (pas_backend_file_search): move
- card_count++ inside the if that checks to see if a card matches
- (and adds the card to the list).
-
-2002-02-24 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook.c (addressbook_query_changed): only
- handle the ESB_ADVANCED case here now. the actual query work is
- done in addressbook_search_activated.
- (addressbook_search_activated): split out all the searching
- functionality here.
- (addressbook_factory_new_control): hook up "search_activated" to
- addressbook_search_activated.
-
-2002-02-24 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook-config.c
- (addressbook_source_dialog_set_source): make the right auth page
- start up open.
-
- * gui/component/addressbook-storage.c (addressbook_source_free):
- free the binddn.
- (addressbook_source_copy): copy the binddn;
-
-2002-02-22 Chris Toshok <toshok@ximian.com>
-
- [ Fixes bugs 20740, 16680, and god knows what else :) ]
- * gui/widgets/e-addressbook-model.c (create_card): double the
- allocated size every time we need more space instead of using a
- fixed size increment. this helps huge queries. Also, remove the
- gtk_object_get of "file_as", as it was dead code.
- (book_view_loaded): handle errors here (by popping up a dialog).
-
- * backend/pas/pas-backend-ldap.c (view_destroy): search_idle ->
- search_timeout.
- (build_card_from_entry): comment out some spew, and unref ecard
- when we're done to plug a memory leak.
- (send_pending_adds): send along to the client all the cards we've
- been saving up.
- (poll_ldap): use a timeout for ldap_result to keep the backend
- from blocking (and it turns out keep the frontend from hanging
- waiting on a ref to complete) on large db's with few matches.
-
- Also, add some fairly smart, self-tuning aggregating of cards.
- Keep track of the number of cards we've sent the last time through
- as well as this time, and estimate the number we want to aggregate
- the next time based on them (we average them at the moment),
- subject to maximum/minimum number of cards. also, we have a
- maximum aggregation time, after which we force a flush if there
- are pending cards and recalculate our target pending number.
- there's a minimum wait time to possibly keep outselves from
- spamming the ui, although it's 0 at the moment.
-
- Lastly, make sure to only notify the GUI of status messages when
- we need to. this results in a *huge* savings.
- (ldap_search_handler): initialize all the pending card stuff, and
- use a timeout instead of an idle function for poll_ldap.
-
- * backend/ebook/e-book-view-listener.c
- (e_book_view_listener_queue_response): performance optimization
- for large adds. If we're a CardAddedEvent and there's an existing
- CardAddedEvent at the end of the queue, just concat the lists of
- cards together. This is to keep the gui from falling further and
- further behind the ldap backend, which is merrily spewing updates
- at the gui.
-
-2002-02-21 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/Makefile.am: Define $(iconsdir).
-
- * gui/component/addressbook-component.c (add_creatable_item): New
- helper function.
- (create_component): Add the icons for the user creatable items as
- well.
-
-2002-02-20 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-file.c (pas_backend_file_load_uri):
- track change to signature, and (for now) just change all the
- return FALSE's to _RepositoryOffline (what FALSE used to map to in
- pas_book_factory_process_request), and change TRUE to _Success.
-
- * backend/pas/pas-backend-ldap.c (pas_backend_ldap_load_uri):
- track change to signature, and differentiate between
- pas_backend_ldap_connect failing (RepositoryOffline), and
- ldap_url_parse failing (OtherError).
-
- * backend/pas/pas-book-factory.c
- (pas_book_factory_process_request): since pas_backend_load_uri
- returns status now, use it to nodify the BookListener if there's a
- failure.
-
- * backend/pas/pas-backend.c (pas_backend_load_uri): track change
- to signature.
-
- * backend/pas/pas-backend.h: change return type of
- pas_backend_load_uri to
- GNOME_Evolution_Addressbook_BookListener_CallStatus to allow
- differentiation between failure types.
-
- * backend/ebook/e-book-listener.c
- (e_book_listener_convert_status): handle _AUTHENTICATION_FAILED.
-
- * backend/ebook/e-book-types.h (EBookStatus): add
- _AUTHENTICATION_FAILED.
-
-2002-02-18 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-book-factory.c
- (pas_book_factory_process_request): if the load_uri fails, notify
- the listener that the repository is offline. (partial fix for bug
- 20347)
-
-2002-02-18 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (create_dn_from_ecard): escape
- commas in the dn, since they're used by ldap to specify the node's
- placement in the tree. (fixes bug 20089)
- (rfc2254_escape): just use sprintf and %02X instead.
-
-2002-02-13 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/select-names/e-select-names.c (set_book): Keep a
- ref of the model in this case as well.
-
-2002-02-13 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/select-names/e-select-names.c (set_book): Make
- sure to only set the query once when creating a new book and not
- at all on addressbook model creation. This prevents an accidental
- pair of changes from making the addressbook model load a remote
- addressbook.
-
- * gui/widgets/e-addressbook-model.c (get_view): If this is the
- first_get_view and the addressbook is remote, empty the view
- instead of leaving it in the state it used to be in. This only
- occurs if you set the book after the model has existed for a
- while.
- (e_addressbook_model_set_arg): When setting the book, set
- first_get_view to TRUE.
-
-2002-02-13 Christopher James Lahey <clahey@ximian.com>
-
- * gui/widgets/e-addressbook-view.c (display_view): Attach to the
- emvw instead of the emv here.
-
- * gui/widgets/e-minicard-view-widget.c, e-minicard-view-widget.h:
- Made this object have a "column_width" argument and a
- "column_width_changed" signal which are a simple layer down to the
- EMinicardView contained within.
-
- * gui/widgets/gal-view-minicard.c, gui/widgets/gal-view-minicard.h
- (gal_view_minicard_attach): Made this attach to an
- EMinicardViewWidget instead of a EMinicardView.
-
-2002-02-13 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-book-util.c, backend/ebook/e-book-util.h
- (e_book_expand_uri, e_book_load_address_book_by_uri,
- e_book_use_address_book_by_uri): New functions that take a file://
- url ending in the directory name and automatically append the
- addressbook.db and do the appropriate thing.
-
- * backend/pas/pas-backend-card-sexp.c,
- backend/pas/pas-backend-card-sexp.h: Added copyright notice here.
-
- * gui/component/addressbook-component.c
- (destination_folder_handle_drop), gui/component/addressbook.c
- (set_prop): Use e_book_expand_uri instead of
- addressbook_expand_uri.
-
- * gui/component/addressbook-storage.c: Fixed the fcntl include
- here.
-
- * gui/component/addressbook.c (ContactsCopyToFolder,
- ContactsMoveToFolder): Added handlers for these two verbs.
-
- * gui/component/addressbook.h: Removed addressbook_expand_uri in
- favor of e_book_expand_uri.
-
- * gui/widgets/e-addressbook-reflow-adapter.c (transfer_cards):
- Added code to handle Move to and Copy to right click menu items.
-
- * gui/widgets/e-addressbook-util.c,
- gui/widgets/e-addressbook-util.h (e_addressbook_transfer_cards):
- New function to pop up a dialog and transfer a set of cards to the
- given folder.
-
- * gui/widgets/e-addressbook-view.c,
- gui/widgets/e-addressbook-view.h (display_view): Don't attach to
- the view if it doesn't exist yet. We have to make this then
- attach later.
- (e_addressbook_view_copy_to_folder,
- e_addressbook_view_move_to_folder): New functions utilizing
- e_addressbook_transfer_cards.
- (table_right_click): Add copy_to_folder and move_to_folder to the
- right click menu for tables here.
- (e_addressbook_view_discard_menus): Handle menu unmerging here.
-
- * gui/widgets/e-minicard-view-widget.h (struct
- _EMinicardViewWidget): Removed unused field.
-
-2002-02-13 Christopher James Lahey <clahey@ximian.com>
-
- * gui/widgets/e-addressbook-view.c (display_view): Attach the
- GalViewMinicard to the EMinicardView here.
-
- * gui/widgets/gal-view-minicard.c, gui/widgets/gal-view-minicard.h
- (gal_view_minicard_load, gal_view_minicard_save): Made these save
- the column width of the view.
- (gal_view_minicard_attach, gal_view_minicard_detach): Added these
- functions to allow the GalViewMinicard to set the column width of
- a EMinicardView and to monitor its changes.
-
-2002-02-12 Christopher James Lahey <clahey@ximian.com>
-
- * gui/widgets/e-addressbook-reflow-adapter.c
- (addressbook_get_arg): Added an argument to get the model.
-
- * gui/widgets/e-addressbook-view.c (writable_status): Don't bother
- connecting to the writable_status callback on the book, simply
- rely on the writable_status callback on the addressbook model.
-
- * gui/widgets/e-minicard-view.c, gui/widgets/e-minicard-view.h
- (set_empty_message): Handle the case of a read only view here.
-
-2002-02-07 JP Rosevear <jpr@ximian.com>
-
- * gui/component/addressbook-component.c (create_component): remove
- "New" from user creatable menu items
-
-2002-02-07 Christopher James Lahey <clahey@ximian.com>
-
- * gui/widgets/e-addressbook-view.c,
- gui/widgets/e-addressbook-view.h
- (e_addressbook_view_setup_menus): Changed this function to use the
- new GalViewMenus which takes a GalViewInstance, instead of a
- GalViewCollection.
-
-2002-02-04 JP Rosevear <jpr@ximian.com>
-
- * gui/contact-editor/e-contact-editor.c (find_address_mailing): tidy
-
- * conduit/address-conduit.c (addrconduit_load_configuration): load
- default address setting
- (addrconduit_save_configuration): save default address setting
- (e_addr_gui_new): new gui routine for conduit settings
- (e_addr_gui_fill_widgets): ditto
- (e_addr_gui_fill_config): ditto
- (e_addr_gui_destroy): ditto
- (e_addr_context_destroy): destroy the gui and new_cfg
- (local_record_from_ecard): reinstate commented out bits, determine
- which address to sync to pilot
- (ecard_from_remote_record): determine which address to sync from
- pilot
- (fill_widgets): put the gui widgets in
- (create_settings_window): create gui
- (save_settings): fill gui
-
-2002-02-04 JP Rosevear <jpr@ximian.com>
-
- * gui/contact-editor/e-contact-editor.c (address_text_changed): if
- the shown address in the mailing address or there is no mailing
- address, set the default flag and make sure the button is checked
- (address_mailing_changed): set the flags properly when the mailing
- address changes
- (e_contact_editor_init): listen for the check button being toggled
- (find_address_mailing): find the address (if any) with the default
- flag
- (set_address_field): set the mailing address button appropriately
- (fill_in_info): find the mailing address
-
- * gui/contact-editor/e-contact-editor.h: add new class data member
-
- * gui/contact-editor/contact-editor.glade: show mailing address
- check button
-
-2002-02-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * backend/ebook/e-destination.c (e_destination_is_auto_recipient):
- New function to find out if a destination was one which was
- auto-matically set by Evolution.
- (e_destination_set_auto_recipient): Set whether or not the dest is
- an auto-recipient.
- (e_destination_touch): Don't touch the address if it is an
- auto_recipient.
- (e_destination_list_to_vector_sized): New function to avoid having
- to calculate the length of the list ourselves. Allows for a bit of
- optimization if our caller knows the length of the list.
- (e_destination_xml_encode): Encode the auto_recipient bit.
- (e_destination_xml_decode): Decode the auto_recipient bit.
-
-2002-02-01 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-card-simple.c (e_card_simple_sync_card): Made
- this preserve addressbook flags other than the first three.
-
- * backend/ebook/e-card-types.h: Added E_CARD_ADDR_MASK and
- E_CARD_ADDR_DEFAULT.
-
- * backend/ebook/e-card.c (get_address_flags): Added "PREF" to
- E_CARD_ADDR_DEFAULT mapping.
-
- * backend/ebook/test-client.c: Added #include "e-book-util.h".
-
-2002-01-30 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-file.c (pas_backend_file_changes):
- compute the change db filename based on our contact db filename.
- (pas_backend_file_load_uri): store the filename in
- bf->priv->filename.
- (pas_backend_file_destroy): free the filename, and (!) free
- bf->priv too.
-
-2002-01-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * backend/ebook/e-destination.c (e_destination_is_valid): Revert
- my previous change as trow says this will break auto-completion
- stuff.
-
-2002-01-27 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/contact-editor/Makefile.am: Use EVOLUTION_ADDRESSBOOK_CFLAGS.
- * gui/contact-list-editor/Makefile.am: Likewise.
- * gui/merging/Makefile.am: Likewise.
- * gui/search/Makefile.am: Likewise.
- * gui/component/select-names/Makefile.am: Likewise.
-
-2002-01-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * backend/ebook/e-destination.c (e_destination_is_valid): Don't
- check for an @ in the email address. This is to fix bug #10960.
-
-2002-01-24 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug 16097 ]
- * gui/component/addressbook-config.glade: gui love for the new
- auth stuff.
-
- * gui/component/addressbook.c (load_uri_cb): track change to auth,
- and offer up different prompt strings depending on which method
- (binddn or email) we're using.
-
- * gui/component/addressbook-storage.c (ldap_unparse_auth): use the
- new auth types for ldap.
- (ldap_parse_auth): same.
- (addressbook_storage_auth_type_to_string): new function.
- (load_source_data): get the binddn too.
- (ldap_source_foreach): store out binddn or emailaddr, depending on
- the auth type chosen.
-
- * gui/component/addressbook-storage.h: add the more detailed auth
- types, add "binddn" to the source structure, and add a prototype
- for addressbook_storage_auth_type_to_string.
-
- * gui/component/addressbook-config.c (auth_checkbutton_changed):
- set the auth stuff (in)sensitive.
- (auth_optionmenu_activated): new function.
- (addressbook_source_dialog_set_source): track UI change.
- (addressbook_source_dialog_get_source): same.
- (add_scope_activate_cb): rename add_activate_cb to this to
- distinguish it from the auth stuff.
- (add_auth_activate_cb): new function.
- (addressbook_source_dialog): track change to auth UI stuff.
- (addressbook_storage_auth_type_to_string): new function.
-
- * backend/ebook/e-book.h: add auth_method arg to
- e_book_authenticate_user.
-
- * backend/ebook/e-book.c (e_book_authenticate_user): track change
- to prototype - add auth_method arg, and pass it along to the CORBA
- call.
-
- * backend/ebook/test-client.c (book_open_cb): track api change -
- keep this building.
-
- * backend/pas/pas-book.h: add auth_method slot in PASRequest.
-
- * backend/pas/pas-book.c (pas_book_queue_authenticate_user): add
- auth_method arg and add it to the PASRequest.
- (impl_GNOME_Evolution_Addressbook_Book_authenticateUser): track
- idl change, add auth_method and pass it along to
- pas_book_queue_authenticate_user.
-
- * backend/pas/pas-backend-ldap.c
- (pas_backend_ldap_process_authenticate_user): support both
- "ldap/simple-email" and "ldap/simple-binddn" auth methods.
-
- * backend/idl/addressbook.idl: add "in string authMethod" to
- authenticateUser.
-
-2002-01-24 Ettore Perazzoli <ettore@ximian.com>
-
- * conduit/Makefile.am: Use EVOLUTION_ADDRESSBOOK_CONDUIT_CFLAGS
- and EVOLUTION_ADDRESSBOOK_CONDUIT_LIBS and remove unused flags
-
- * gui/component/Makefile.am: Use EVOLUTION_ADDRESSBOOK_CFLAGS and
- EVOLUTION_ADDRESSBOOK_LIBS and remove unused flags.
- * backend/pas/Makefile.am: Likewise.
- * backend/ebook/Makefile.am: Likewise.
- * printing/Makefile.am: Likewise.
- * backend/ebook/Makefile.am: Likewise.
- * gui/widgets/Makefile.am (INCLUDES): Likewise.
-
-2002-01-23 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook-component.c (create_component): Pass a
- NULL @icon to
- `evolution_shell_component_add_user_creatable_item()'.
-
-2002-01-23 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/contact-editor/e-contact-editor-address.c: #include
- <locale.h>.
-
-2002-01-22 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug # 16864 ]
- * backend/ebook/evolution-ldif-importer.c (getValue): create and
- return a GString here, instead of writing to a fixed size buffer.
- (parseLine): use a GString here instead of a fixed size buffer.
-
-2002-01-21 Christopher James Lahey <clahey@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (ldap_search_handler): Set the
- number of cards to return to the value specified in the ldap uri,
- leaving the default at 100. Fixes Ximian bug #13953.
-
- * gui/component/addressbook-config.c (addressbook_source_dialog),
- gui/component/addressbook-config.glade: Added a limit entry here
- to edit the limit field of the source.
-
- * gui/component/addressbook-storage.c,
- gui/component/addressbook-storage.h
- (addressbook_storage_init_source_uri): Added a limit field to this
- class and pass that value through in the uri that's generated.
-
-2002-01-18 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-card-compare.c: Made username match with no
- domain match be vague instead of partial. Fixes Ximian bug
- #13612.
-
-2002-01-18 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/addressbook.c (view_contact_cb): New verb to open
- a bunch of cards.
-
- * gui/widgets/e-addressbook-reflow-adapter.c (open_card): Call
- e_addressbook_show_multiple_cards instead of doing this ourselves.
-
- * gui/widgets/e-addressbook-util.c,
- gui/widgets/e-addressbook-util.h
- (e_addressbook_show_multiple_cards): Added this function to show a
- bunch of cards, including a dialog if lots of windows are going to
- appear.
-
- * gui/widgets/e-addressbook-view.c (e_addressbook_view_view,
- e_addressbook_view_can_view): e_addressbook_view_view calls
- e_addressbook_show_multiple_cards on the appropriate list of
- cards.
-
-2002-01-18 Christopher James Lahey <clahey@ximian.com>
-
- * gui/contact-editor/e-contact-editor-address.c
- (fill_in_countries), gui/contact-editor/fulladdr.glade: Sort
- country list. Country list moves from fulladdr.glade to
- e-contact-editor-address.c, but only a few country names have
- actually changed. Fixes Ximian bug #16545.
-
-2001-12-20 Zbigniew Chyla <cyba@gnome.pl>
-
- Fixes #17725
-
- * evolution/addressbook/printing/e-contact-print.c (complete_sequence):
- Do not assume that the first byte of file_as is the first letter, use
- utf8 functions instead.
-
-2002-01-16 JP Rosevear <jpr@ximian.com>
-
- * conduit/address-conduit.c: move all functions here, get rid of
- header files, use e-pilot-settings to display gui
-
-2002-01-15 JP Rosevear <jpr@ximian.com>
-
- * gui/component/select-names/select-names.glade: remove misleading
- title and fix spacing
-
-2002-01-11 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/addressbook.c (alphabet_state_changed): Handle
- setting the search bar to "Advanced..." when the alphabet buttons
- are pushed and back when they're cleared. Fixes Ximian bug
- #12904.
- (addressbook_menu_activated): When the user calls Search->clear,
- set the search to ESB_ANY and "", don't just set the text. This
- is especially useful when it's set to ESB_ADVANCED.
-
- * gui/widgets/e-addressbook-view.c,
- gui/widgets/e-addressbook-view.h (alphabet_state_change): Added
- this signal which gets emitted when the alphabet buttons are
- pushed.
- (command_state_change): Removed the ref pair here. It's not
- necessary. gtk_signal_emit refs the object itself.
-
-2002-01-11 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-card-compare.c (name_synonyms): Added a couple
- of names here.
-
- * gui/component/select-names/e-select-names-text-model.c
- (e_select_names_text_model_get_nth_obj): Removed an unused
- variable.
-
-2002-01-11 Christopher James Lahey <clahey@ximian.com>
-
- * gui/widgets/e-addressbook-view.c,
- gui/widgets/e-addressbook-view.h (create_alphabet): Use toggle
- buttons here. Fixes Ximian bug #10734.
-
-2002-01-09 Christopher James Lahey <clahey@ximian.com>
-
- * gui/contact-editor/e-contact-editor.c (set_fields): Choose the
- first filled in address field here. Fixes Ximian bug #2222.
-
-2002-01-03 Joe Shaw <joe@ximian.com>
-
- * backend/ebook/test-card.c: Add a test for getting arbitrary
- fields.
-
- * backend/pas/pas-backend-card-sexp.c (compare_arbitrary): Added.
- (prop_info_table): Add a LIST_PROP for arbitrary fields.
-
-2002-01-03 Nat Friedman <nat@ximian.com>
-
- * backend/ebook/e-book.c (activate_factories_for_uri): Free the
- query if the oaf response is of zero length.
-
-2001-12-27 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names.c
- (real_add_address_cb): When we clean, don't clean the model's last
- element. This helps keep things working properly when we have
- signal-character separators.
- (section_right_click_cb): Changed to work properly with our
- EText-emitted popup signal.
- (e_select_names_add_section): Use ETexts for the recipient
- sections, rather than tables. This lets us make them directly
- editable. (Bug #1721)
-
- * gui/component/select-names/e-select-names-popup.c
- (popup_info_new): Pass in a ESelectNamesTextModel, not a
- ESelectNamesModel.
- (e_select_names_popup): Adjust for the new signature for
- e_select_names_model_text_pos.
-
- * gui/component/select-names/e-select-names-manager.c
- (focus_out_cb): Schedule a cleaning when we focus out.
- (focus_in_cb): Cancel pending cleaning when we get focus. This
- helps us avoid bad things happening during the fast focus out/ins
- that happen when the completion dropdown appears.
- (completion_handler): Adjust for new signatures of
- e_select_names_model_text_pos and e_select_names_model_name_pos.
- (e_select_names_manager_entry_new): Pass in our
- ESelectNamesTextModel when constructing the
- ESelectNamesCompletion.
- (e_select_names_manager_entry_free): Cancel any pending clean-ups.
-
- * gui/component/select-names/e-select-names-bonobo.c
- (entry_get_property_fn): Get the text off of the text model.
- Which is the only way that really makes sense when you think about
- it.
-
- * gui/component/select-names/e-select-names-completion.c: Added a
- copy of the associated ESelectNamesTextModel to
- ESelectNamesCompletionPrivate. This replaces the
- ESelectNamesModel.
- (e_select_names_completion_destroy): Unref ->text_model.
- (e_select_names_completion_handle_request): Pass in our text
- model's separator info when calling e_select_names_model_text_pos.
- (e_select_names_completion_new): Pass in the text model as an arg
- instead of the model, and ref it as needed.
-
- * gui/component/select-names/e-select-names-text-model.c
- (e_select_names_text_model_init): Set separator as either ", " or
- ",", depending on the value of the EVOLUTION_DISABLE_MAGIC_COMMA
- environment variable.
- (e_select_names_text_model_destroy): Free the separator.
- (changed_cb): Flush our cached text on changed.
- (e_select_names_text_model_set_source): Use our own changed_cb
- callback on changed, rather than just connecting up
- e_text_model_changed.
- (e_select_names_text_model_set_separator): Added. Lets the
- separator between recipients be specified.
- (e_select_names_text_model_get_text): Cache the text we get from
- calling e_select_names_model_get_textification.
- (e_select_names_text_model_insert_length): A bunch of small
- changes to properly support generic separators, rather than
- (implicit and explicitly) assuming ", ".
- (e_select_names_text_model_delete): More small tweaks to handle
- generic separators.
- (e_select_names_text_model_get_nth_obj): Use new signature when
- calling e_select_names_model_name_pos, and use our cached text.
-
- * gui/component/select-names/e-select-names-model.c
- (e_select_names_model_destroy): We don't cache the text or
- addr_text anymore, so no need to free them here.
- (e_select_names_model_changed): ...and no need to reset our text
- and addr_text caches here.
- (e_select_names_model_get_textification): Take a separator as an
- arg, rather than just using ", ". Also, no caching.
- (e_select_names_model_get_address_text): Take a separator as an
- arg, rather than just using ", ". And no caching here either.
- (e_select_names_model_clean): Add arg that give us control over
- whether or not the last entry should get cleaned. We need this
- when using a one-character separator, so that new destinations
- that get tacked onto the end don't get immediately cleaned away
- for being empty.
- (e_select_names_model_name_pos): Take the separator length as an
- argument, remove implicit assumption of length 2.
- (e_select_names_model_text_pos): Take the separator length as an
- argument, remove implicit assumption of length 2.
-
-2001-12-20 Ettore Perazzoli <ettore@ximian.com>
-
- [Fix #17377, Evolution doesn't work on multi-depth displays.]
-
- * gui/component/addressbook-factory.c (main): Push GdkRGB visual
- and colormap.
-
-2001-12-19 Jon Trowbridge <trow@ximian.com>
-
- * gui/widgets/e-addressbook-reflow-adapter.c
- (e_addressbook_reflow_adapter_right_click): Add cut/copy/paste to
- right-click menu.
-
- * gui/widgets/e-addressbook-view.c (table_right_click): Add
- cut/copy/paste to right-click menu. (Fixes bug #14528.) Also,
- disable some right-click options if our addressbook isn't
- editable.
-
-2001-12-18 JP Rosevear <jpr@ximian.com>
-
- * conduit/address-conduit.c (check_for_slow_setting): go slow and
- clear the map if the last uri and the current uri do not match
- (post_sync): save the last uri
-
- * conduits/address-conduit-config.h: handle a last uri config
- option
-
-2001-12-18 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook.c (addressbook_default_book_open):
- change this to match its e-book counterpart, and only failover to
- the local addressbook if the protocol wasn't supported. that way
- errors like "failure to connect" are still reported to the user.
-
- * backend/ebook/e-book-util.h: add prototypes for
- e_book_load_default_book and e_book_get_config_database.
-
- * backend/ebook/e-book-util.c (e_book_default_book_open): new
- function, basically cut and paste addressbook_default_book_open
- from addressbook.c here.
- (e_book_load_default_book): cut and past
- addressbook_load_default_book here, pretty much, except leave off
- the auth stuff.
- (e_book_get_config_database): new function, returns the
- Bonobo_ConfigDatabase for e_book_load_default_book to use.
-
- * conduit/address-conduit.c (start_addressbook_server): use
- e_book_load_default_book here.
-
-2001-12-17 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug 17355 ]
- * gui/component/select-names/e-select-names.c (new_folder): if
- we're dealing with an LDAP folder, prepend [LDAP] to it. Now that
- we have 3 different places where folders are coming from, it helps
- to be able to differentiate "Contacts" in ~/evolution and a
- "Contacts" ldap server and a "Contacts" exchange folder.
- (add_additional_select_names_uris): loop through the bonobo conf
- settings for additional folders, adding them to the option menu.
- (e_select_names_hookup_shell_listeners): call
- add_additional_select_names_uris.
-
-2001-11-28 Christopher James Lahey <clahey@ximian.com>
-
- * gui/widgets/e-minicard-view-widget.c
- (e_minicard_view_widget_realize): Use an #ECanvasBackground here
- instead of a #GnomeCanvasRect.
-
-2001-12-16 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names-completion.c: Added
- 'cache_complete' flag to ESelectNamesCompletionPrivate.
- (e_select_names_completion_seq_complete_cb): Set cache_complete
- to TRUE if our query wasn't interrupted.
- (e_select_names_completion_start_query): Set cache_complete to
- FALSE at the beginning of a potentially-cached query.
- (e_select_names_completion_do_query): Only reuse cached cards
- if cache_complete is TRUE. (Fixes bug #10241)
-
-2001-12-15 JP Rosevear <jpr@ximian.com>
-
- * conduit/address-conduit.c (e_addr_context_destroy): don't free
- the hash table keys, we didn't allocate them and free the change
- objects and unref the associated cards
- (local_record_from_uid): unref the temp card we create
- (replace_record): ref the new card associated with the card change
- and unref the old one
-
-2001-12-13 JP Rosevear <jpr@ximian.com>
-
- * conduit/address-conduit.c (local_record_from_ecard): Make sure
- to copy the custom fields so they are not overwritten
-
-2001-12-13 Jon Trowbridge <trow@ximian.com>
-
- * backend/ebook/e-book-util.c (simple_query_new): Used
- g_strdup_printf to dup a string. Doh! Changed to g_strdup.
- (Bug #17126)
-
-2001-12-07 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names-manager.c
- (e_select_names_manager_entry_new): Remove a reference to code
- I don't want to commit yet. :-)
-
- * gui/component/select-names/e-select-names-manager.c: Extensively
- refactored -- this code had gotten _really_ ugly. Untangle things
- to the point where our reference counting problems are fixable.
-
- * gui/component/select-names/e-select-names-bonobo.c
- (impl_destroy): Remove all of the ugly hacks to work around our
- memory management problems, and just unref the manager.
- (Fixes #14412)
-
-2001-12-05 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c
- (search_for_dn_with_objectclasses): move search_for_dn's contents
- here, and add an "existing_objectclasses" parameter that we pass
- on to build_card_from_entry.
- (search_for_dn): call search_for_dn_with_objectclasses with NULL
- for existing_objectclasses.
- (build_card_from_entry): if existing_objectclasses is non-NULL,
- fill it in with the list of existing objectclass values for this
- entry.
- (add_objectclass_mod): if existing_objectclasses is non-NULL,
- meaning we're modifying an entry, search in the existing
- objectclasses for the ones we want to be there, and only add
- what's missing. If none are missing, don't add objectclass_mod to
- the list of mods.
- (create_card_handler): track change to add_objectclass_mod (pass
- NULL).
- (modify_card_handler): use search_for_dn_with_objectclasses
- instead of search_for_dn, and pass the existing objectclasses to
- add_objectclass_mod. also, free the list when we're done.
- (poll_ldap): track change to build_card_from_entry (pass NULL).
-
-2001-12-05 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-editor/e-contact-editor.c (enable_writable_fields):
- we need to be able to disable non-labels here as well. since
- we're using enable_widget and not gtk_widget_set_sensitive, it's
- okay to handle entries/text's, etc, here.
- (widget_field_mappings): add label-caluri and label-fburl here.
-
- * gui/contact-editor/contact-editor.glade: change the label names
- for the freebusy/calendar urls to have more descriptive names,
- since we use them in e-contact-editor.c now.
-
- * backend/pas/pas-backend-ldap.c: add support for
- caluri/calendarURI, fburl/freeBusyURI.
-
- * backend/pas/evolutionperson.schema: add calendarURI and
- freeBusyURI.
-
-2001-12-04 Christopher James Lahey <clahey@ximian.com>
-
- * gui/contact-editor/contact-editor.glade: Fixed up the
- accelerators and such here.
-
- * gui/contact-editor/e-contact-editor.c (file_save_as_cb):
- Translate this string.
- (pixmaps): Added a pixmap for the ContactEditorSaveClose command.
- (setup_tab_order): Fixed up the tab order here.
-
- * gui/contact-editor/fulladdr.glade: Made the country combo
- focusable here.
-
-2001-12-03 Jon Trowbridge <trow@ximian.com>
-
- * backend/ebook/e-destination.c (e_destination_equal): Make address
- comparisons case-insensitive. (Fixes 11776)
-
- * backend/ebook/e-card.c (e_card_email_match_single_string): Make address
- host comparisons case-insensitive. (Fixes 11776)
-
- * gui/component/select-names/e-select-names-manager.c (focus_out_cb): Clean
- ESelectNamesModel on focus-out. (Half of a fix for 15656)
-
- * backend/ebook/e-destination.c (nonempty): Fix this function
- and make it utf8-safe. (The other half of the fix for 15656)
-
-2001-11-28 Christopher James Lahey <clahey@ximian.com>
-
- * gui/contact-list-editor/e-contact-list-editor.c: Consistency
- fixes with standard contact editor. Added Save As, Send As, and
- Send To. Replaced Save toolbar with Save and Close and added Save
- and Close menu item. Added a trash icon.
-
-2001-11-28 Christopher James Lahey <clahey@ximian.com>
-
- * gui/contact-editor/e-contact-editor-address.c (setup_tab_order):
- Setup the tab order here. Fixes Ximian bug #13751.
-
-2001-11-28 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/addressbook.c (connect_master_list_changed,
- make_suboptions): Changed how this list of categories gets
- computed. Fixes Ximian bugs #7707 and #7708.
-
-2001-11-15 Zbigniew Chyla <cyba@gnome.pl>
-
- * printing/e-contact-print-envelope.c (ecpe_linelist_dimensions),
- printing/e-contact-print.c (e_contact_divide_text, e_contact_output,
- e_contact_rectangle, e_contact_print_letter_tab,
- e_contact_print_letter_heading, e_contact_get_card_size,
- e_contact_print_card, e_contact_print_phone_list):
- s/gnome_font_get_width_string/gnome_font_get_width_utf8/
- s/gnome_font_get_width_string_n/gnome_font_get_width_utf8_sized/
-
-2001-11-14 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (search_for_dn): check against
- LDAP_SUCCESS as the return value, not -1.
- (pas_backend_ldap_build_all_cards_list): same.
- (pas_backend_ldap_process_authenticate_user): same.
-
-2001-11-12 Chris Toshok <toshok@ximian.com>
-
- [ Fixes Ximian bug #14843 ]
- * backend/pas/pas-backend-ldap.c (func_and): don't crash if a
- subexpression wasn't filled in.
-
- * backend/pas/pas-backend-ldap.c (func_or): same.
-
-2001-11-12 Jon Trowbridge <trow@ximian.com>
-
- * gui/contact-list-editor/e-contact-list-editor.c (list_added_cb):
- Release callback's reference to EContactListEditor.
- (list_modified_cb): Release callback's reference to
- EContactListEditor.
- (save_card): Ref the EContactListEditor on behalf of the
- e_book_foo callback. (Fixes bug #14743)
- (save_card): Set changed to false once we've saved.
- (list_deleted_cb): Release callback's reference.
- (delete_cb): Hold reference for the callback.
-
-2001-11-12 Jon Trowbridge <trow@ximian.com>
-
- * gui/contact-editor/e-contact-editor.c (categories_clicked): If
- our call to e_categories_new returns NULL, put up an error dialog
- and return. (Fixed #14780)
-
-2001-11-09 Chris Toshok <toshok@ximian.com>
-
- [ Fixes Ximian bug #14687 ]
- * backend/pas/pas-backend-file.c
-
- * backend/pas/pas-book-factory.c
- (pas_book_factory_process_request): do load_uri before add_client,
- so we know if the load actually worked (add_client uses this
- information to respond to the new client.) before this change,
- the client would still think the book was in a useful state even
- if the load_uri failed.
-
- * backend/pas/pas-backend-ldap.c (pas_backend_ldap_add_client): if
- the we're not connected, say so.
-
- * backend/pas/pas-backend-file.c (pas_backend_file_add_client):
- same.
- (pas_backend_file_load_uri): don't report_writable here,
- add_client does it. was only needed before because of the
- improper ordering in pas-book-factory.c above.
-
-2001-11-09 Chris Toshok <toshok@ximian.com>
-
- [ Fixes Ximian bug #14646 ]
- * gui/component/addressbook.c (addressbook_default_book_open): new
- function. if the default_book failed to load, load the local
- addressbook in its place.
- addressbook_load_default_book): if we're loading the default_book
- uri, use addressbook_default_book_open as the open_response.
-
- * backend/ebook/e-book.c (e_book_load_uri_step): reset the
- load_state to NotLoaded so we can attempt another load_uri on
- the book if it fails.
-
-2001-11-08 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names-bonobo.c
- (impl_destroy): Explicitly destroy entries. Part of the fix for
- the lingering completion window bug.
-
-2001-11-04 JP Rosevear <jpr@ximian.com>
-
- * conduit/address-conduit.c: Use ordering of the pilot's phone
- label list to find fields we sync in order to avoid strcmp'ing the
- pilot's labels rendering phone syncing usable only for english
- language pilots
-
-2001-11-03 Chris Toshok <toshok@ximian.com>
-
- [ Fixes Ximian bug #14410 ]
- * gui/contact-editor/e-contact-editor.c (e_contact_editor_init):
- init in_async_call to FALSE.
- (card_added_cb): turn the UI back on and set in_async_call to
- FALSE.
- (card_modified_cb): same.
- (card_deleted_cb): same.
- (save_card): turn off the UI by setting the dialog insensitive,
- and set in_async_call to TRUE.
- (delete_cb): same.
- (app_delete_event_cb): if we're in an async call don't let the
- window get deleted.
-
- * gui/contact-editor/e-contact-editor.h (struct _EContactEditor):
- add in_async_call flag for when we make a wombat call and need to
- disable the UI.
-
- * gui/contact-list-editor/e-contact-list-editor.c
- (e_contact_list_editor_init): init in_async_call to FALSE.
- (list_added_cb): turn the UI back on and set in_async_call to
- FALSE.
- (list_modified_cb): same.
- (list_deleted_cb): same.
- (save_card): turn off the UI by setting the dialog insensitive,
- and set in_async_call to TRUE.
- (delete_cb): same.
- (app_delete_event_cb): if we're in an async call don't let the
- window get deleted.
-
- * gui/contact-list-editor/e-contact-list-editor.h (struct
- _EContactListEditor): add in_async_call flag for when we make a
- wombat call and need to disable the UI.
-
-2001-11-02 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-card-simple.c (e_card_simple_get): Check for
- NULL dates before converting them to strings. Fixes Ximian bug
- #14394.
-
-2001-11-02 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names-bonobo.c
- (impl_destroy): Leak select-names related data structures until
- the memory management issues get sorted out. Fixed bug #14086.
-
-2001-10-31 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/e-cardlist-model.c,
- gui/component/select-names/e-select-names-table-model.c,
- gui/widgets/e-addressbook-table-adapter.c: Make the pre_changes
- and changes match here.
-
-2001-10-31 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_destroy): Check that local_listener and
- other_contacts_listener are non-NULL before
- disconnecting/unrefing.
-
- * gui/component/select-names/e-select-names-manager.c
- (entry_destroyed): The entry shouldn't unref the manager.
- (e_select_names_manager_create_entry): The entry shouldn't hold a
- ref to the manager. It becomes circular.
- (e_select_names_manager_create_entry): On the other hand, we
- should hold a ref to the entry we create.
-
- * gui/component/select-names/e-select-names-bonobo.c
- (impl_destroy): Remove the explicit dialog destroy hack.
-
-2001-10-30 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names-bonobo.c
- (impl_destroy): Force the select names dialog to be destroyed.
- This is a hack to fix bug #14002 -- I'll clean up the refcounting
- issues post-freeze. At least now it won't crash.
-
-2001-10-30 JP Rosevear <jpr@ximian.com>
-
- * conduit/address-conduit.c (ecard_from_remote_record): make sure
- to translate the character sets of the names
-
-2001-10-30 JP Rosevear <jpr@ximian.com>
-
- * gui/component/select-names/e-select-names-bonobo.c
- (manager_ok_cb): send a null bonobo arg to prevent explosion
-
-2001-10-30 JP Rosevear <jpr@ximian.com>
-
- * gui/widgets/e-addressbook-view.c: correct include typo
-
-2001-10-29 Jon Trowbridge <trow@ximian.com.
-
- * gui/widgets/e-minicard.c (add_field): Five characters, not four!
-
- * gui/widgets/e-addressbook-table-adapter.c
- (addressbook_value_at): Convert xml-ified destinations into proper
- addresses.
-
-2001-10-29 Jon Trowbridge <trow@ximian.com.
-
- * gui/component/select-names/e-select-names-bonobo.c (init):
- Connect to manager's "ok" signal.
- (manager_ok_cb): Emit "ok" bonobo-signal.
-
- * gui/component/select-names/e-select-names-manager.c
- (e_select_names_manager_class_init): Added "ok" signal.
- (e_select_names_clicked): Emit 'ok' signal.
-
-2001-10-29 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-addressbook-util.c
- (e_addressbook_prompt_save_dialog): new function, a "Do you want
- to save changes?" dialog.
-
- * gui/widgets/e-addressbook-util.h: add prototype for
- e_addressbook_prompt_save_dialog.
-
- * gui/contact-editor/e-contact-editor.c (prompt_to_save_changes):
- call e_addressbook_prompt_save_dialog and save the card if they
- select save. return TRUE if the dialog should be closed, FALSE
- otherwise.
- (file_close_cb): check prompt_to_save_changes before closing the
- dialog.
- (app_delete_event_cb): same.
-
- * gui/contact-list-editor/e-contact-list-editor.c
- (prompt_to_save_changes): call e_addressbook_prompt_save_dialog
- and save the card if they select save. return TRUE if the dialog
- should be closed, FALSE otherwise.
- (file_close_cb): check prompt_to_save_changes before closing the
- dialog.
- (app_delete_event_cb): same.
-
-2001-10-29 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (add_objectclass_mod): overload
- this function for modifying objectclasses too, so we can make sure
- evolutionPerson shows up in the objectclasses of an entry if it
- shows up in the schema for the server.
- (create_card_handler): add @replace = FALSE in the call to
- add_objectclass_mod.
- (modify_card_handler): call add_objectclass_mod with @replace =
- TRUE.
- (anniversary_compare): fix typo - return "equal", not "TRUE".
- (birthday_compare): same.
-
-2001-10-29 Jon Trowbridge <trow@ximian.com>
-
- * conduit/address-conduit.c (pre_sync): Comment out spew.
-
- * gui/contact-list-editor/e-contact-list-editor.c (fill_in_info):
- Comment out spew.
-
- * gui/component/addressbook-component.c
- (destination_folder_handle_drop): Comment out spew.
- (get_dnd_selection): Comment out spew.
-
- * gui/widgets/e-addressbook-table-adapter.c
- (addressbook_set_value_at): Comment out spew.
-
-2001-10-29 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/addressbook.c (update_command_state): Check that
- our BonoboUIComponent has a container so we don't get a lot of
- annoying debug spew.
-
- * printing/smallbook.ecps: Fixed fonts.
-
- * printing/phonelist.ecps: Fixed fonts.
-
- * printing/medbook.ecps: Fixed fonts.
-
- * printing/e-contact-print.c (e_contact_get_card_size): Commented
- out spew.
-
- * gui/widgets/e-minicard.c (remodel): Check that e_minicard->card
- != NULL.
-
-2001-10-29 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names-completion.c
- (e_select_names_completion_destroy): We were using
- book_data->book_view immediately after unrefing it. Reordered the
- code a bit to avoid this.
-
-2001-10-29 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-book-factory.h: add prototype for
- pas_book_factory_dump_active_backends.
-
- * backend/pas/pas-book-factory.c
- (pas_book_factory_dump_active_backends): new function.
- (dump_active_server_map_entry): new function.
-
-2001-10-29 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names-completion.c
- (make_match): Drop a match if either of the text fields is NULL.
- This could happen if any of the utf-8 involved is invalid, for
- example. (Bug #13757)
-
-2001-10-29 JP Rosevear <jpr@ximian.com>
-
- * conduit/address-conduit.c (is_syncable): fix bug that allowed
- for phone's not to be in priority order and the item to still be
- syncable
-
- * conduit/address-conduit-config.h
- (addrconduit_load_configuration): get management by id
-
-2001-10-29 JP Rosevear <jpr@ximian.com>
-
- * conduit/address-conduit.c (is_syncable): a card also needs to
- have its phone nums in priority order to be "syncable"
-
-2001-10-29 JP Rosevear <jpr@ximian.com>
-
- * conduit/address-conduit.c (is_syncable): move the syncable
- checking code to a different function
- (ecard_from_remote_record): set the name parts individually
- (local_record_from_ecard): use is_syncable
-
-2001-10-29 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-card-simple.c (file_as_get_style,
- file_as_set_style): Use the actual ECardName in the ECard instead
- of parsing the full_name here.
-
-2001-10-29 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-card-simple.c, backend/ebook/e-card-simple.h
- (e_card_simple_set_name): New function to set the ECardName on
- this card and fix the file_as if necessary.
-
-2001-10-29 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-card-simple.c, backend/ebook/e-card-simple.h
- (e_card_simple_get): Handle returning dates here.
- (e_card_simple_get_allow_newlines): New function. Returns whether
- it makes much sense to have newlines in this string.
-
- * gui/component/addressbook-config.c,
- gui/component/addressbook-config.h
- (addressbook_create_new_source): The first argument here should
- be const.
-
- * gui/component/addressbook-storage.c: Added #include
- "addressbook-config.h".
-
- * gui/widgets/e-minicard-label.c (e_minicard_label_event): On an
- escape here, cancel editing and remove the focus from the text.
-
- * gui/widgets/e-minicard.c (add_field): Set allow_newlines here.
- (field_activated): Stop editing on the activate signal and remove
- the focus from the text. Fixes Ximian bug #12286.
-
-2001-10-28 JP Rosevear <jpr@ximian.com>
-
- * conduit/address-conduit.h: tidy
-
- * conduit/address-conduit-config.h: ditto
-
- * conduit/address-conduit.c (add_record): unref ecard when done
-
-2001-10-28 Jon Trowbridge <trow@ximian.com>
-
- * backend/ebook/e-card.c (e_card_date_from_string): Expose this
- function.
- (e_card_date_to_string): ...and this one. Fixes build problem in
- pas-backend-ldap.c.
-
-2001-10-28 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_hookup_shell_listeners): Change "this should never
- happen" dialog to not give my name/e-mail. Sorry translators.
- But this really should never happen, thanks to my fix below.
-
- * gui/component/addressbook-component.c: Initialize
- global_shell_client to NULL. (Bug #6625)
-
-2001-10-27 Chris Toshok <toshok@ximian.com>
-
- [ bug #12979 ]
- * backend/pas/pas-backend-ldap.c (anniversary_populate): new
- function.
- (anniversary_ber): new function.
- (anniversary_compare): new function.
- (birthday_populate): new function.
- (birthday_ber): new function.
- (birthday_compare): new function.
-
-2001-10-27 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names-completion.c
- (e_select_names_completion_destroy): free up all the book_data
- list stuff.
- (e_select_names_completion_got_book_view_cb): deal with book_data
- being passed as the closure, and increment the
- pending_completion_seq counter.
- (e_select_names_completion_card_added_cb): deal with book_data
- being passwd as the closure.
- (e_select_names_completion_seq_complete_cb): same, and decrement
- the pending_completion_seq if we haven't gotten one for this book
- view before.
- (e_select_names_completion_stop_query): cancel all the
- book_data's.
- (e_select_names_completion_start_query): use the books_not_ready
- counter instead of book_ready. also, do e_book_get_book_view on
- each of the book's in our list.
- (e_select_names_completion_do_query): change to deal with our
- list.
- (e_select_names_completion_book_ready): decrement the
- book_not_ready counter.
- (e_select_names_completion_new): add the book we're created with
- to our list.
- (e_select_names_completion_add_book): implement.
-
- * gui/component/select-names/e-select-names-completion.h: add
- prototype for e_select_names_completion_add_book.
-
- * gui/component/select-names/e-select-names-manager.c
- (e_select_names_manager_new): use addressbook_config_data, and
- don't unref the db.
- (e_select_names_manager_create_entry): always add NULL for a book
- (which corresponds to the local book), and if the completion_book
- is present, add it to the list of books to complete again.
-
-2001-10-27 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-editor/e-contact-quick-add.c (merge_cb): change to
- EBookCallback signature, and unref the book.
- (quick_add_merge_card): use addressbook_load_default_book.
- (ce_have_book): change to EBookCallback signature, and unref the
- book.
- (edit_card): use addressbook_load_default_book.
-
- * gui/component/e-address-popup.c (email_table_save_card_cb):
- change to EBookCallback signature, and unref the book.
- (add_card_idle_cb): use addressbook_load_default_book, and call
- the cb if it fails.
- (e_address_popup_cleanup): fix type -- should be "pop->card =
- NULL", not "pop = NULL".
- (contact_editor_cb): change to EBookCallback signature.
- (edit_contact_info_cb): use addressbook_load_default_book.
- (start_query): change to EBookCallback signature.
- (e_address_popup_query): use addressbook_load_default_book.
-
- * gui/widgets/e-minicard-control.c (book_open_cb): change to
- EBookCallback signature, and unref the book.
- (save_in_addressbook): use addressbook_load_default_book instead
- of e_book_use_local_address_book.
-
- * gui/widgets/Makefile.am (INCLUDES): change includes since we're
- including addressbook.h which has it's own set of funky include
- path requirements.
-
-2001-10-27 Jon Trowbridge <trow@ximian.com>
-
- * backend/ebook/e-book.c (activate_factories_for_uri): Don't leak
- stuff. (Bug #13709)
-
-2001-10-27 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-destination.c (name_and_email_simple_query_cb,
- nickname_simple_query_cb): Set book_uri when cardification occurs.
-
-2001-10-27 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_add_section): Turned off use_ellipsis (it breaks
- emulate_label_resize) and on emulate_label_resize. Fixes Ximian
- bug #13693.
-
-2001-10-27 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names-completion.c
- (make_match): Doh! We should be sorting our contacts so that the
- most frequently used ones are at the top of the list, not the
- bottom.
-
- * backend/pas/pas-book.c (pas_book_check_queue): That should be a
- bonobo_object_unref, not a gtk_object_unref.
- (pas_book_queue_request): Likewise, we need to bonobo_object_ref
- here.
- (pas_book_destroy): If our pas_book_check_queue timeout is still
- active, disable it. This should never happen, but it never hurts
- to be careful.
- (pas_book_destroy): Set book->priv to NULL after we free it.
-
-2001-10-27 JP Rosevear <jpr@ximian.com>
-
- * conduit/address-conduit.c (local_record_from_ecard): copy phone
- labels and show phone as well, clear correct entry text and
- correctly detect unsyncable cases
-
-2001-10-27 JP Rosevear <jpr@ximian.com>
-
- * conduit/address-conduit.c (local_record_from_ecard): touch the
- record on lookup
- (check_for_slow_setting): write touched only if we are doing a
- slow sync
- (card_removed): don't touch on lookup
- (match): touch on lookup
-
-2001-10-27 Jon Trowbridge <trow@ximian.com>
-
- * backend/pas/pas-book.c (pas_book_check_queue): Added paranoid
- reentrancy guards.
- (pas_book_queue_request): Changed our idle handler into a timeout,
- so as to work w/ reentrancy guards.
- (pas_book_init): Explicit initialization.
-
-2001-10-26 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook.h: add prototypes for
- addressbook_config_database, and addressbook_load_default_book.
-
- * gui/component/addressbook.c (addressbook_config_database): new
- function, so we aren't activating the db everywhere we need to use
- it.
- (addressbook_load_default_book): load the default book, after
- getting the uri from bonobo-config.
-
-2001-10-26 Jon Trowbridge <trow@ximian.com>
-
- * backend/ebook/e-book-util.c (simple_query_card_added_cb): Return
- on cancellation.
- (simple_query_sequence_complete_cb): Act if not cancelled.
- (simple_query_book_view_cb): Free & return on cancellation.
- (e_book_simple_query_cancel): Set cancellation flag.
-
- * gui/component/e-address-popup.c (e_address_popup_query): Hold a
- reference to ourselves for the duration of our addressbook fetch.
- (start_query): Release when we've fetched our addressbook.
- (e_address_popup_cleanup): Break out most of what we do in
- _destroy into a separate function.
- (e_address_popup_destroy): Class cleanup.
- (contact_editor_cb): Paranoid clean-up.
- (add_contacts_cb): Paranoid clean-up.
- (e_address_popup_ambiguous_email_add): Paranoid clean-up.
-
-2001-10-26 JP Rosevear <jpr@ximian.com>
-
- * conduit/e-address.conduit.in: remove the merges as valid sync
- types
-
- * conduit/address-conduit.c (pre_sync): write out only the touched
- records if we are doing copies
-
- * conduit/address-conduit-config.h
- (addrconduit_load_configuration): get the sync type
-
-2001-10-26 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/e-address-popup.c (e_address_popup_destroy):
- Cancel any pending queries.
-
- * gui/contact-editor/e-contact-editor.c (close_dialog): Don't
- assert, but check if ce->app != NULL, since this function can
- (apparently) get called multiple times.
-
- * gui/contact-editor/e-contact-save-as.c (file_exists): Remove bad
- dialog ref-counting crap.
-
- * gui/contact-editor/e-contact-editor.c (save_card): Ref our
- EContactEditor, since we are holding a pointer to it in
- EditorCloseStruct.
- (card_modified_cb): Unref our EContactEditor when we free our
- EditorCloseStruct.
- (card_added_cb): Unref our EContactEditor when we free our
- EditorCloseStruct.
-
-2001-10-26 JP Rosevear <jpr@ximian.com>
-
- * conduit/address-conduit.c (check_for_slow_setting): make debug
- info more accurate
-
-2001-10-26 JP Rosevear <jpr@ximian.com>
-
- * conduit/address-conduit.c (e_addr_context_destroy): prevent
- double unref
- (cursor_cb): correct typo
- (card_removed): remove the card from the map if was archived and
- is now deleted
-
-2001-10-26 JP Rosevear <jpr@ximian.com>
-
- * conduit/address-conduit.h: new member
-
- * conduit/address-conduit.c (print_remote): free the struct after
- using it
- (e_addr_context_new): make consistent with other conduits
- (e_addr_context_destroy): properly destroy the context
- (cursor_cb): no need to ref the card, its done for us
- (clear_entry_text): util function to free a field
- (free_local): free a local record
- (local_record_to_pilot_record): use a static buffer so we don't
- have to free it later
- (local_record_from_ecard): only fill in the fields we might not
- sync, clear a field before replacing the contents
- (for_each): track locals
- (for_each_modified): ditto
- (free_match): use free_local
-
-2001-10-26 Christopher James Lahey <clahey@ximian.com>
-
- * gui/widgets/e-minicard.c, gui/widgets/e-minicard.h
- (set_has_cursor): Added has_cursor argument. Setting the argument
- to TRUE if the minicard doesn't have focus will grab the focus.
- Fixes Ximian bug #3024.
-
-2001-10-24 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/addressbook-factory.c (main): Initialize
- gnome-vfs.
-
- * gui/component/addressbook-component.c (xfer_file): Added.
- (Copied from the calendar.)
- (xfer_folder): Fixed to allow renaming of contact folders.
-
-2001-10-24 Christopher James Lahey <clahey@ximian.com>
-
- * gui/widgets/e-addressbook-view.c
- (e_addressbook_view_class_init): Removed key_press handler here
- since delete and backspace are now handled by keybindings.
-
-2001-10-23 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/addressbook.c: Fix command paths when we specify
- our pixmaps, so we don't get a lot of totally useless & very ugly
- bonobo-ui spew.
-
- * backend/ebook/e-book-util.c (e_book_nickname_query): The empty
- string as an arg shouldn't generate a warning.
-
- * gui/component/select-names/e-select-names-completion.c: Removed
- our cancelled flag and e_select_names_completion_cancel function,
- since we were just duplicating stuff that had ended up in
- ECompletion.
- (match_name): Form our menu_text properly on an additional-name
- match.
- (e_select_names_completion_got_book_view_cb): Store handles for
- our signals, disconnect them properly when we switch book views.
- (e_select_names_completion_stop_query): Disconnect signals when we
- stop our query.
- (check_capabilities): Spew if we are using LDAP for completion.
- (e_select_names_completion_destroy): Disconnect our signals when
- we destroy.
- This all should fix bug #10241.
-
-2001-10-23 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_add_section): Set "draw_button" argument to TRUE
- on this EEntry.
-
-2001-10-22 Christopher James Lahey <clahey@ximian.com>
-
- * gui/contact-editor/e-contact-save-as.c (save_it): Put up an
- error dialog if there's an error while saving. If the person hits
- cancel on the "file exists" dialog, don't close the file selection
- dialog. Fixes Ximian bug #7055.
-
-2001-10-21 Christopher James Lahey <clahey@ximian.com>
-
- * gui/widgets/e-addressbook-reflow-adapter.c
- (model_and_selection_free): right_click_up here when we let go of
- the popup.
-
- * gui/widgets/e-minicard-view.c (e_minicard_view_selection_event):
- right_click_up here.
-
-2001-10-21 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_add_section, e_select_names_set_default): Use an
- EEntry here instead of a GtkLabel. Fixes Ximian bug #7067.
-
-2001-10-21 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/addressbook.c (control_activate_cb): Call
- e_addressbook_model_force_folder_bar_message when we activate the
- component. (Fixes bug #11749)
-
- * gui/widgets/e-addressbook-model.c
- (e_addressbook_model_force_folder_bar_message): Added. Forces
- emission of a folder_bar_message.
-
-2001-10-20 Larry Ewing <lewing@ximian.com>
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_set_default): stick with the style font if the
- efont bold font does not exist.
- (e_select_names_set_default): don't forget to unref the oldstyle.
-
-2001-10-20 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names-completion.c
- (name_style_query): Fix memory leak.
-
- * gui/widgets/e-addressbook-view.c (jump_to_letter): Free our
- string vector letter_v when we are done with it.
-
- * gui/contact-editor/e-contact-quick-add.c (edit_card): Unref our
- QuickAdd structure.
-
- * gui/component/e-address-popup.c (e_address_popup_construct):
- Unref our style after we are done with it.
-
-2001-10-20 Jon Trowbridge <trow@ximian.com>
-
- * backend/ebook/e-book.c (activate_factories_for_uri): We
- shouldn't leak the info returned by oaf_query.
-
- * gui/contact-editor/e-contact-quick-add.c (card_added_cb): Remove
- superfluous call to quick_add_unref.
- (editor_closed_cb): Remove superfluous call to quick_add_unref.
-
- * gui/component/select-names/e-select-names.c (esn_get_key_fn): We
- need to unref the card returned by e_addressbook_model_get_card.
-
-2001-10-20 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook-component.c: Make LDAP servers
- non-user-creatable.
-
-2001-10-20 Jon Trowbridge <trow@ximian.com>
-
- * printing/e-contact-print.c (e_contact_print_card): Check that the
- string we are checking for xml-ness is non-NULL.
-
- * backend/ebook/e-destination.c (e_destination_importv): Filter
- out empty destinations. (also Bug #13036)
-
- * printing/e-contact-print.c (e_contact_build_style): Use
- gnome_font_new_closest; if gnome_font_new fails and returns NULL,
- our spacing gets all messed up. (Bug #10785)
-
- * gui/widgets/e-addressbook-view.c (e_addressbook_view_can_print):
- Allow printing if there are any cards in our view. The selection
- has nothing to do with it.
-
- * backend/ebook/e-destination.c (e_destination_is_empty): Check
- for strings that contain non-whitespace, rather than just looking
- for a non-zero first character. (Bug #13036)
-
-2001-10-20 Christopher James Lahey <clahey@ximian.com>
-
- * gui/widgets/e-minicard-view.c (e_minicard_view_selection_event):
- Handle focus_change in event by selecting that contact. Fixes
- Ximian bug #3024.
-
- * gui/component/addressbook-component.c (owner_unset_cb):
- Repeatedly call gtk_main_quit here as long as there is a main loop
- around. This is an ugly hack around Ximian bug #11760.
-
-2001-10-20 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/select-names/e-select-names.c: Added #include
- <gal/widgets/e-unicode.h>.
-
- * gui/widgets/e-minicard-control.c: Made this display the number
- of extra cards in the attachment as well as made it save them all
- to the local addressbook if the person selects the button. Fixes
- Ximian bug #9507.
-
-2001-10-20 Christopher James Lahey <clahey@ximian.com>
-
- * gui/widgets/e-minicard.c (e_minicard_event): Changed this to not
- grab on a right click. Fixes Ximian bug #12660.
-
-2001-10-19 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook-component.c
- (destination_folder_handle_motion): Get @folder_type here too [to
- match the changes in the EvolutionShellComponentDnd interface].
- Also, remove a debugging message.
- (destination_folder_handle_drop): Likewise.
-
-2001-10-18 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names.c (add_menu_item):
- Translate labels in select-names option menu. (Bug #9604)
-
- * gui/search/e-addressbook-search-dialog.c
- (e_addressbook_search_dialog_init): Made the default window size
- slightly wider. (Bug #7516)
-
-2001-10-18 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-card.c, backend/ebook/e-card.h
- (e_card_list_get_vcard): Made this take a const GList.
-
-2001-10-18 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names-completion.c
- (check_capabilities): Added. Check if our book is local or
- networked.
- (e_select_names_completion_book_ready): Call check_capabilities.
- (e_select_names_completion_new): Call check_capabilities.
- (e_select_names_completion_do_query): If we have a networked book,
- keep trying if we haven't been able to cache any cards --- our
- earlier attempts could have failed due to too many matches. (Bug
- #12932)
-
- * gui/component/select-names/e-select-names-manager.c
- (focus_out_cb): Lag our cardification on focus-out. This seems to
- help with the unintended cardifications that can result from the
- weird focus-out/focus-in events that get generated when the popup
- disappears.
-
- * backend/ebook/e-card-compare.c: Removed some debug spew.
-
-2001-10-17 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook-config.c (addressbook_source_dialog):
- grab focus in the Account entry when preparing the dialog, fixes
- #10406.
-
-2001-10-17 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names.c (new_folder): make
- sure to also add "ldap-contacts" folders to the option menu.
-
-2001-10-17 JP Rosevear <jpr@ximian.com>
-
- * conduit/address-conduit.c (ecard_from_remote_record): sync all
- the fields we can, with out overwriting
- (local_record_from_ecard): write the fields to the pilot in
- priority order unless there are fields on the pilot we can't
- store, then fill in the fields as they are on the pilot
-
-2001-10-17 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-card.c (e_card_get_vobject): Did a bit of clean
- up here. Might fix some crashes, specifically Ximian bug #10164.
-
- * gui/widgets/e-addressbook-view.c (SPEC): Updated the model
- column numbers here. Fixes Ximian bug #12308.
-
-2001-10-17 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-file.c (pas_backend_file_upgrade_db):
- add upgrade from 0.1 to 0.2, where we make sure id dbt's match
- vcard id's, fixes longstanding bug (#7406) where cards were not
- modifiable or removable after having been created during a 1-2
- week long window in early betas.
- (PAS_BACKEND_FILE_VERSION): change to 0.2
- (PAS_ID_PREFIX): #define this here.
- (pas_backend_file_create_unique_id): use PAS_ID_PREFIX instead of
- the string.
-
-2001-10-16 Iain Holmes <iain@ximian.com>
-
- * backend/ebook/evolution-ldif-importer.c (support_format_fn): Return
- FALSE if no extension.
-
-2001-10-16 Jon Trowbridge <trow@ximian.com>
-
- * backend/ebook/e-card.c (e_card_get_id): If card->id is NULL,
- return an empty string.
- (e_card_set_id): Don't allow the card id to be set to NULL; use
- the empty string instead.
- (e_card_get_vobject): When building our vcard, pass in the empty
- string as the id if card->id is NULL. (Bug #10164)
-
-2001-10-16 JP Rosevear <jpr@ximian.com>
-
- * conduit/address-conduit.c (local_record_from_ecard): don't set
- the phone info if it is blank
- (ecard_from_remote_record): save up to 3 fax numbers
-
-2001-10-15 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (pas_backend_ldap_add_client):
- unref the book after we pass it off to evolution-addressbook.
-
-2001-10-15 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (create_card_dtor): unref
- op->view.
- (pas_backend_ldap_process_create_card): ref op->view.
- (remove_card_dtor): unref op->view.
- (pas_backend_ldap_process_remove_card): ref op->view.
- (modify_card_dtor): unref op->view.
- (pas_backend_ldap_process_modify_card): ref op->view.
- (ldap_search_dtor): unref op->view.
- (pas_backend_ldap_search): ref op->view.
-
-2001-10-15 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c
- (pas_backend_ldap_process_get_book_view): make sure to unref the
- book_view here so we don't leak them.
-
-2001-10-12 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook-factory.c (main): call
- e_passwords_init and e_passwords_shutdown.
-
-2001-10-15 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-card.c (addPropValueQP, addPropValueSets,
- e_card_get_vobject): Properly decide whether a property needs to
- be marked as QP by searching for '\n'. Fixes Ximian bug #3021.
-
-2001-10-15 Christopher James Lahey <clahey@ximian.com>
-
- * gui/contact-editor/e-contact-save-as.c (e_contact_save_as,
- e_contact_list_save_as): Set the default file name here. Fixes
- Ximian bug #7053.
-
-2001-10-14 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_hookup_shell_listeners): Added linebreaks to our
- "this shouldn't happen" dialog message. (Bug #12498)
-
-2001-10-12 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/addressbook-factory.c (main): Add a component name
- to the e_passwords_init() call.
-
-2001-10-12 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/evolution-ldif-importer.c: commit the importer
- originally from Michael M. Morrison, with fixups by toshok.
-
- * backend/ebook/Makefile.am (bin_PROGRAMS): add
- evolution-ldif-importer.
- (oaf_in_files): add
- GNOME_Evolution_Addressbook_LDIF_Importer.oaf.in.
-
- * backend/ebook/e-card-simple.h: add WANTS_HTML and IS_LIST.
-
- * backend/ebook/e-card-simple.c (field_data): add WANTS_HTML and
- IS_LIST.
- (e_card_simple_set): fix typo.
-
- * backend/ebook/.cvsignore: ignore
- GNOME_Evolution_Addressbook_LDIF_Importer.oaf and
- evolution-ldif-importer.
-
- * backend/ebook/GNOME_Evolution_Addressbook_LDIF_Importer.oaf.in:
- ldif importer oafinfo.
-
-2001-10-12 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-card-simple.c, backend/ebook/e-card-simple.h:
- Added a boolean type here.
-
-2001-10-12 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names.c
- (addressbook_model_set_uri): Check to see if the uri we are
- setting is the same as the current uri. If so, do nothing.
- (Bug #11324)
-
-2001-10-11 Jon Trowbridge <trow@ximian.com>
-
- * backend/ebook/e-destination.c
- (e_destination_reverting_is_a_good_idea): Added. Heuristic for
- whether or not we want to revert to an earlier cardified state.
- (e_destination_cardify): Don't be quite as aggressive about
- reverting to previous cardified states. (Bug #11890)
-
-2001-10-11 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-card-simple.c (e_card_simple_destroy,
- fill_in_info, e_card_simple_sync_card, e_card_simple_set_phone,
- e_card_simple_set_address, e_card_simple_set_delivery_address,
- file_as_get_style, file_as_set_style, e_card_simple_set,
- e_card_simple_set_arbitrary),
- gui/contact-editor/e-contact-editor-address.c
- (e_contact_editor_address_destroy,
- e_contact_editor_address_set_arg,
- e_contact_editor_address_get_arg),
- gui/contact-editor/e-contact-editor-fullname.c
- (e_contact_editor_fullname_destroy,
- e_contact_editor_fullname_set_arg,
- e_contact_editor_fullname_get_arg),
- gui/contact-editor/e-contact-editor.c (phone_entry_changed,
- address_text_changed, name_entry_changed, full_name_clicked,
- full_addr_clicked, fill_in_info): Changed these to use the new ref
- and unref functions for ECard auxillary types.
-
- * backend/ebook/e-card-simple.h: Added a comment.
-
- * backend/ebook/e-card-types.h: Added ref_count field to all the
- types.
-
- * backend/ebook/e-card.c, backend/ebook/e-card.h: Added ref and
- unref functions here for all the ECard auxillary types. Removed
- the corresponding free functions. Switched to using these
- functions where appropriate.
-
- * gui/component/addressbook-factory.c: #include
- <e-util/e-passwords.h>
-
- * gui/component/addressbook.c (load_uri_cb): const correctify.
-
- * gui/component/select-names/e-select-names-manager.c,
- gui/component/select-names/e-select-names.c: #include
- <addressbook/gui/component/addressbook.h>
-
- * gui/widgets/e-addressbook-model.c (modify_card): Removed an
- unnecessary ref here.
-
-2001-10-11 Dan Winship <danw@ximian.com>
-
- * gui/component/select-names/e-select-names.c (update_folder):
- Don't need this any more.
-
-2001-10-11 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/addressbook.c (new_contact_cb): Check that
- view->view != NULL.
- (save_contact_cb): Check that view->view != NULL.
- (search_cb): Check that view->view != NULL.
- (delete_contact_cb): Check that view->view != NULL.
- (print_cb): Check that view->view != NULL.
- (print_preview_cb): Check that view->view != NULL.
- (stop_loading_cb): Check that view->view != NULL.
- (cut_contacts_cb): Check that view->view != NULL.
- (copy_contacts_cb): Check that view->view != NULL.
- (paste_contacts_cb): Check that view->view != NULL.
- (select_all_contacts_cb): Check that view->view != NULL.
- (send_contact_cb): Check that view->view != NULL.
- (send_contact_to_cb): Check that view->view != NULL.
- (update_command_state): Check that view->view != NULL. Hold a
- reference to the AddressbookView for the duration of the function,
- in case we exit during bonobo-reentrancy.
- (addressbook_view_ref): Added.
- (addressbook_view_unref): Added. Simple ref counting for
- AddressbookView objects.
- (addressbook_view_clear): Zero out an AddressbookView. This is
- now separated from the deallocation of the AddressbookView object,
- so that we don't leave a dangling pointer if we exit during
- bonobo-reentrancy in update_command_state. (Which often seems to
- happen if we exit while addressbook operations are going on.)
- (destroy_callback): Replace previous call to addressbook_view_free
- with addressbook_view_clear/addressbook_view_unref calls.
- (addressbook_factory_new_control): Initialize the reference count
- in the AddressbookView object.
-
- * gui/widgets/e-addressbook-view.c (e_addressbook_view_destroy):
- Carefully zero out our destroyed object.
- (command_state_change): Hold a reference to ourselves during the
- signal emission.
- (get_selected_cards): Ref cards as we add them to the list.
- (e_addressbook_view_stop): Check for view != NULL.
- (e_addressbook_view_can_create): Check for view != NULL.
- (e_addressbook_view_can_print): Check for view != NULL.
- (e_addressbook_view_can_save_as): Check for view != NULL.
- (e_addressbook_view_can_send): Check for view != NULL.
- (e_addressbook_view_can_send_to): Check for view != NULL.
- (e_addressbook_view_can_delete): Check for view != NULL.
- (e_addressbook_view_can_cut): Check for view != NULL.
- (e_addressbook_view_can_copy): Check for view != NULL.
- (e_addressbook_view_can_paste): Check for view != NULL.
- (e_addressbook_view_can_select_all): Check for view != NULL.
- (e_addressbook_view_can_stop): Check for view != NULL.
-
- * gui/widgets/e-addressbook-model.c (addressbook_destroy): Be
- careful about zeroing out our destroyed object.
-
- * backend/ebook/e-book-view.c (e_book_view_stop): Added. Stops
- event processing in the underlying listener.
-
-2001-10-10 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names-manager.c
- (e_select_names_manager_destroy): If our select names dialog is
- still around, destroy it. Otherwise, the dialog will hang around
- after our composer goes away.
-
-2001-10-06 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook-config.glade: add an Email Address
- field/label/help text.
-
- * gui/component/addressbook-config.c
- (addressbook_source_dialog_set_source): fill in the email entry
- from the source. also, set the initial state of the email
- label/entry.
- (auth_checkbutton_changed): set the email label/entry
- sensitive/editable if auth is turned on, and
- insensitive/uneditable if it's off.
- (addressbook_source_dialog_get_source): get the email address from
- the email entry.
- (addressbook_source_dialog): hook up the email entry to the
- changed signal foo, as well as the focus handler for displaying
- help text.
-
-2001-10-06 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names-manager.c
- (e_select_names_manager_new): db isn't a BonoboObject, so don't
- bonobo_object_unref it!
-
-2001-10-05 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names.c
- (addressbook_model_set_uri): e_book_load_uri ->
- addressbook_load_uri.
-
- * gui/component/select-names/e-select-names-manager.c
- (e_select_names_manager_new): e_book_load_uri ->
- addressbook_load_uri.
-
- * gui/component/addressbook.c (forget_passwords_cb): new function,
- call e_passwords_forget_passwords.
- (verbs): Add ContactsForgetPasswords.
- (load_uri_auth_cb): new function, call the callback and free up
- our closure stuff.
- (load_uri_cb): once the uri is loaded, check if we're configured
- to authenticate for it, and do so, using the e_passwords stuff.
- (addressbook_load_uri): wrapper around e_book_load_uri. save off
- the parameters and start the load-with-auth machinery.
- (book_open_cb): remove all the auth stuff from here, as it's
- handled elsewhere now.
-
- * gui/component/addressbook-factory.c (main): call
- e_passwords_init.
-
- * gui/component/addressbook-component.c (user_create_new_item_cb):
- e_book_load_uri -> addressbook_load_uri.
- (destination_folder_handle_drop): same.
-
- * gui/component/addressbook.h: add prototype for
- addressbook_load_uri (a wrapper around e_book_load_uri that also
- handles authentication if the user selects it.)
-
-2001-10-05 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names.c
- (real_add_address_cb): Check to make sure our call to
- e_addressbook_model_get_card doesn't return NULL.
-
- * gui/widgets/e-addressbook-model.c
- (e_addressbook_model_get_card): Chek that we aren't requesting a
- negative row.
-
- * gui/contact-list-editor/e-contact-list-editor.c (add_email_cb):
- Move to the bottom of the scrolled window, so we can see the
- address we just added.
- (table_drag_data_received_cb): Move to the bottom of the scrolled
- window, so we can see the contact we just dropped.
-
- * gui/component/addressbook.c (addressbook_factory_new_control):
- We don't own the string returned by e_categories_master_list_nth,
- so terrible things will happen if we free it. (Bug 10916)
-
-2001-10-05 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-addressbook-view.c (e_addressbook_view_set_arg):
- don't set the editable field on the model - let the book do that.
- (book_writable_cb): call writable_status to propagate a ui-change
- event up (and sensitize the write-only toolbar buttons after you
- authenticate with ldap.)
-
-2001-10-04 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-book.c (activate_factories_for_uri): for some
- reason, matching on protocol is causing problems for me.
- disabling it for now.
-
-2001-10-04 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook-component.c: use ldap.png for ldap
- contacts.
-
-2001-10-03 Iain Holmes <iain@ximian.com>
-
- * addressbook/gui/component/addressbook-storage.c
- (addressbook_storage_setup): Only load_storages if you have LDAP.
- (load_source_data): Only do stuff if you have LDAP.
-
-2001-10-03 Christopher James Lahey <clahey@ximian.com>
-
- * gui/widgets/e-addressbook-reflow-adapter.c (addressbook_height),
- gui/widgets/e-minicard.c (remodel): Fixed these to determine the
- fields to use properly.
-
-2001-10-02 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names-completion.c
- (name_style_query): Strip out commas before forming our query.
- (match_name): Use e_card_compare_name_to_string_full, rather
- than our crufty old matching code. Not only is this cleaner,
- but that crufty old code was very broken when it came to
- handling strings with whitespace. (Bug 8988)
- (match_nickname): utf8 and bug fixes.
-
- * backend/ebook/e-card-compare.c
- (e_card_compare_name_to_string_full): Added. This is basically
- e_card_compare_name_to_string with a bunch of extra options, so
- that it can more readily be reused in other contexts.
- (e_card_compare_name_to_string): This is now just a call to
- e_card_compare_name_to_string_full with the extra args filled in
- to defaults that simulate the old behavior.
-
-2001-10-02 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-book.c (e_book_construct): remove most of the
- oaf stuff from here. we do it in load_uri, where we'll have more
- information (namely, the protocol we're using.)
- (activate_factories_for_uri): do an oaf query to get a list of all
- objects implementing our BookFactory interface and also supporting
- the protocol used in the uri.
- (e_book_load_uri): try activating book factories to handle this
- uri, and start the iteration over the list.
- (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-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 d472f0033b..0000000000
--- a/addressbook/Makefile.am
+++ /dev/null
@@ -1,11 +0,0 @@
-if ENABLE_PILOT_CONDUITS
-CONDUIT_SUBDIR=conduit
-endif
-
-SUBDIRS = \
- util printing gui $(CONDUIT_SUBDIR)
-
-EXTRA_DIST = \
- ChangeLog.pre-1-4
-
-# XXX tools \ No newline at end of file
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 3c6b0f2314..0000000000
--- a/addressbook/conduit/Makefile.am
+++ /dev/null
@@ -1,39 +0,0 @@
-INCLUDES = \
- -I$(top_srcdir) \
- -I$(top_srcdir)/addressbook \
- -I$(top_srcdir)/addressbook/backend \
- -I$(top_builddir)/addressbook/backend \
- -I$(top_srcdir)/e-util \
- -I$(top_builddir)/e-util \
- $(EVOLUTION_ADDRESSBOOK_CONDUIT_CFLAGS)
-
-# Address Conduit
-privconduit_LTLIBRARIES = libeaddress_conduit.la
-
-libeaddress_conduit_la_SOURCES = \
- address-conduit.c
-
-libeaddress_conduit_la_LDFLAGS = -module -avoid-version
-libeaddress_conduit_la_LIBADD = \
- $(top_builddir)/e-util/libeutil.la \
- $(top_builddir)/e-util/libeconduit.la \
- $(top_builddir)/camel/libcamel.la \
- $(EVOLUTION_ADDRESSBOOK_CONDUIT_LIBS)
-
-e-address-$(BASE_VERSION).conduit: e-address.conduit.in
- sed -e 's^\@privconduitdir\@^$(privconduitdir)^g' \
- -e 's^\@datadir\@^$(datadir)^g' \
- -e 's^\@BASE_VERSION\@^$(BASE_VERSION)^g' \
- $< > $@
-
-conduitdir = $(datadir)/gnome-pilot/conduits/
-conduit_DATA = e-address-$(BASE_VERSION).conduit
-
-BUILT_SOURCES = $(conduit_DATA)
-CLEANFILES = $(BUILT_SOURCES)
-
-EXTRA_DIST = \
- e-address.conduit.in
-
-dist-hook:
- cd $(distdir); rm -f $(BUILT_SOURCES)
diff --git a/addressbook/conduit/address-conduit.c b/addressbook/conduit/address-conduit.c
deleted file mode 100644
index 5d6530fd85..0000000000
--- a/addressbook/conduit/address-conduit.c
+++ /dev/null
@@ -1,1713 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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>
-
-#define G_LOG_DOMAIN "eaddrconduit"
-
-#include <bonobo.h>
-#include <libxml/parser.h>
-#include <pi-source.h>
-#include <pi-socket.h>
-#include <pi-dlp.h>
-#include <pi-address.h>
-#include <libebook/e-book.h>
-#include <gpilotd/gnome-pilot-conduit.h>
-#include <gpilotd/gnome-pilot-conduit-sync-abs.h>
-#include <libgpilotdCM/gnome-pilot-conduit-management.h>
-#include <libgpilotdCM/gnome-pilot-conduit-config.h>
-#include <e-dialog-widgets.h>
-#include <e-pilot-map.h>
-#include <e-pilot-settings.h>
-#include <e-pilot-util.h>
-
-GnomePilotConduit * conduit_get_gpilot_conduit (guint32);
-void conduit_destroy_gpilot_conduit (GnomePilotConduit*);
-
-#define CONDUIT_VERSION "0.1.2"
-
-#define DEBUG_CONDUIT 1
-/* #undef DEBUG_CONDUIT */
-
-#ifdef DEBUG_CONDUIT
-#define LOG(x) x
-#else
-#define LOG(x)
-#endif
-
-#define WARN g_warning
-#define INFO g_message
-
-enum {
- LABEL_WORK,
- LABEL_HOME,
- LABEL_FAX,
- LABEL_OTHER,
- LABEL_EMAIL,
- LABEL_MAIN,
- LABEL_PAGER,
- LABEL_MOBILE
-};
-
-static EContactField priority [] = {
- E_CONTACT_PHONE_BUSINESS,
- E_CONTACT_PHONE_HOME,
- E_CONTACT_PHONE_BUSINESS_FAX,
- E_CONTACT_EMAIL,
- E_CONTACT_PHONE_PAGER,
- E_CONTACT_PHONE_MOBILE,
- E_CONTACT_PHONE_BUSINESS_2,
- E_CONTACT_PHONE_HOME_2,
- E_CONTACT_PHONE_HOME_FAX,
- E_CONTACT_EMAIL_2,
- E_CONTACT_PHONE_OTHER,
- E_CONTACT_PHONE_PRIMARY,
- E_CONTACT_PHONE_OTHER_FAX,
- E_CONTACT_EMAIL_3,
- E_CONTACT_FIELD_LAST
-};
-
-static int priority_label [] = {
- LABEL_WORK,
- LABEL_HOME,
- LABEL_FAX,
- LABEL_EMAIL,
- LABEL_PAGER,
- LABEL_MOBILE,
- LABEL_WORK,
- LABEL_HOME,
- LABEL_FAX,
- LABEL_EMAIL,
- LABEL_OTHER,
- LABEL_MAIN,
- LABEL_FAX,
- LABEL_EMAIL,
- -1
-};
-
-typedef struct _EAddrLocalRecord EAddrLocalRecord;
-typedef struct _EAddrConduitCfg EAddrConduitCfg;
-typedef struct _EAddrConduitGui EAddrConduitGui;
-typedef struct _EAddrConduitContext EAddrConduitContext;
-
-/* Local Record */
-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 */
- EContact *contact;
-
- /* pilot-link address structure, used for implementing Transmit. */
- struct Address *addr;
-};
-
-
-static void
-addrconduit_destroy_record (EAddrLocalRecord *local)
-{
- g_object_unref (local->contact);
- free_Address (local->addr);
- g_free (local->addr);
- g_free (local);
-}
-
-/* Configuration */
-struct _EAddrConduitCfg {
- guint32 pilot_id;
- GnomePilotConduitSyncType sync_type;
-
- gboolean secret;
- EContactField default_address;
-
- gchar *last_uri;
-};
-
-static EAddrConduitCfg *
-addrconduit_load_configuration (guint32 pilot_id)
-{
- EAddrConduitCfg *c;
- GnomePilotConduitManagement *management;
- GnomePilotConduitConfig *config;
- gchar *address, 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);
-
- c->pilot_id = pilot_id;
- management = gnome_pilot_conduit_management_new ("e_address_conduit", GNOME_PILOT_CONDUIT_MGMT_ID);
- gtk_object_ref (GTK_OBJECT (management));
- gtk_object_sink (GTK_OBJECT (management));
- config = gnome_pilot_conduit_config_new (management, pilot_id);
- gtk_object_ref (GTK_OBJECT (config));
- gtk_object_sink (GTK_OBJECT (config));
- if (!gnome_pilot_conduit_config_is_enabled (config, &c->sync_type))
- c->sync_type = GnomePilotConduitSyncTypeNotSet;
- gtk_object_unref (GTK_OBJECT (config));
- gtk_object_unref (GTK_OBJECT (management));
-
- /* Custom settings */
- gnome_config_push_prefix (prefix);
-
- c->secret = gnome_config_get_bool ("secret=FALSE");
- address = gnome_config_get_string ("default_address=business");
- if (!strcmp (address, "business"))
- c->default_address = E_CONTACT_ADDRESS_WORK;
- else if (!strcmp (address, "home"))
- c->default_address = E_CONTACT_ADDRESS_HOME;
- else if (!strcmp (address, "other"))
- c->default_address = E_CONTACT_ADDRESS_OTHER;
- g_free (address);
- c->last_uri = gnome_config_get_string ("last_uri");
-
- gnome_config_pop_prefix ();
-
- return c;
-}
-
-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 ("secret", c->secret);
- switch (c->default_address) {
- case E_CONTACT_ADDRESS_WORK:
- gnome_config_set_string ("default_address", "business");
- break;
- case E_CONTACT_ADDRESS_HOME:
- gnome_config_set_string ("default_address", "home");
- break;
- case E_CONTACT_ADDRESS_OTHER:
- gnome_config_set_string ("default_address", "other");
- break;
- default:
- g_warning ("Unknown default_address value");
- }
- gnome_config_set_string ("last_uri", c->last_uri);
- gnome_config_pop_prefix ();
-
- gnome_config_sync ();
- gnome_config_drop_all ();
-}
-
-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->pilot_id = c->pilot_id;
-
- retval->secret = c->secret;
- retval->default_address = c->default_address;
- retval->last_uri = g_strdup (c->last_uri);
-
- return retval;
-}
-
-static void
-addrconduit_destroy_configuration (EAddrConduitCfg *c)
-{
- g_return_if_fail (c != NULL);
-
- g_free (c->last_uri);
- g_free (c);
-}
-
-/* Gui */
-struct _EAddrConduitGui {
- GtkWidget *default_address;
-};
-
-static EAddrConduitGui *
-e_addr_gui_new (EPilotSettings *ps)
-{
- EAddrConduitGui *gui;
- GtkWidget *lbl, *menu;
- gint rows, i;
- static const char *items[] = {"Business", "Home", "Other", NULL};
-
- g_return_val_if_fail (ps != NULL, NULL);
- g_return_val_if_fail (E_IS_PILOT_SETTINGS (ps), NULL);
-
- gtk_table_resize (GTK_TABLE (ps), E_PILOT_SETTINGS_TABLE_ROWS + 1,
- E_PILOT_SETTINGS_TABLE_COLS);
-
- gui = g_new0 (EAddrConduitGui, 1);
-
- rows = E_PILOT_SETTINGS_TABLE_ROWS;
- lbl = gtk_label_new (_("Default Sync Address:"));
- gtk_misc_set_alignment (GTK_MISC (lbl), 0.0, 0.5);
- gui->default_address = gtk_option_menu_new ();
- menu = gtk_menu_new ();
- for (i = 0; items[i] != NULL; i++) {
- GtkWidget *item;
-
- item = gtk_menu_item_new_with_label (items[i]);
- gtk_widget_show (item);
-
- gtk_menu_append (GTK_MENU (menu), item);
- }
- gtk_widget_show (menu);
- gtk_option_menu_set_menu (GTK_OPTION_MENU (gui->default_address), menu);
- gtk_table_attach_defaults (GTK_TABLE (ps), lbl, 0, 1, rows, rows + 1);
- gtk_table_attach_defaults (GTK_TABLE (ps), gui->default_address, 1, 2, rows, rows + 1);
- gtk_widget_show (lbl);
- gtk_widget_show (gui->default_address);
-
- return gui;
-}
-
-static const int default_address_map[] = {
- E_CONTACT_ADDRESS_WORK,
- E_CONTACT_ADDRESS_HOME,
- E_CONTACT_ADDRESS_OTHER,
- -1
-};
-
-static void
-e_addr_gui_fill_widgets (EAddrConduitGui *gui, EAddrConduitCfg *cfg)
-{
- g_return_if_fail (gui != NULL);
- g_return_if_fail (cfg != NULL);
-
- e_dialog_option_menu_set (gui->default_address,
- cfg->default_address,
- default_address_map);
-}
-
-static void
-e_addr_gui_fill_config (EAddrConduitGui *gui, EAddrConduitCfg *cfg)
-{
- g_return_if_fail (gui != NULL);
- g_return_if_fail (cfg != NULL);
-
- cfg->default_address = e_dialog_option_menu_get (gui->default_address,
- default_address_map);
-}
-
-static void
-e_addr_gui_destroy (EAddrConduitGui *gui)
-{
- g_free (gui);
-}
-
-/* Context */
-struct _EAddrConduitContext {
- GnomePilotDBInfo *dbi;
-
- EAddrConduitCfg *cfg;
- EAddrConduitCfg *new_cfg;
- EAddrConduitGui *gui;
- GtkWidget *ps;
-
- struct AddressAppInfo ai;
-
- EBook *ebook;
- GList *cards;
- GList *changed;
- GHashTable *changed_hash;
- GList *locals;
-
- EPilotMap *map;
-};
-
-static EAddrConduitContext *
-e_addr_context_new (guint32 pilot_id)
-{
- EAddrConduitContext *ctxt = g_new0 (EAddrConduitContext, 1);
-
- ctxt->cfg = addrconduit_load_configuration (pilot_id);
- ctxt->new_cfg = addrconduit_dupe_configuration (ctxt->cfg);
- ctxt->gui = NULL;
- ctxt->ps = NULL;
- ctxt->ebook = NULL;
- ctxt->cards = NULL;
- ctxt->changed_hash = NULL;
- ctxt->changed = NULL;
- ctxt->locals = NULL;
- ctxt->map = NULL;
-
- return ctxt;
-}
-
-static void
-e_addr_context_destroy (EAddrConduitContext *ctxt)
-{
- GList *l;
-
- g_return_if_fail (ctxt != NULL);
-
- if (ctxt->cfg != NULL)
- addrconduit_destroy_configuration (ctxt->cfg);
- if (ctxt->new_cfg != NULL)
- addrconduit_destroy_configuration (ctxt->new_cfg);
- if (ctxt->gui != NULL)
- e_addr_gui_destroy (ctxt->gui);
-
- if (ctxt->ebook != NULL)
- g_object_unref (ctxt->ebook);
-
- if (ctxt->cards != NULL) {
- for (l = ctxt->cards; l != NULL; l = l->next)
- g_object_unref (l->data);
- g_list_free (ctxt->cards);
- }
-
- if (ctxt->changed_hash != NULL)
- g_hash_table_destroy (ctxt->changed_hash);
-
- if (ctxt->changed != NULL)
- e_book_free_change_list (ctxt->changed);
-
- if (ctxt->locals != NULL) {
- for (l = ctxt->locals; l != NULL; l = l->next)
- addrconduit_destroy_record (l->data);
- g_list_free (ctxt->locals);
- }
-
- if (ctxt->map != NULL)
- e_pilot_map_destroy (ctxt->map);
-
- g_free (ctxt);
-}
-
-/* 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] : "");
-
- free_Address (&addr);
-
- return buff;
-}
-
-/* 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)
-{
- EBookChange *ebc;
- GList *l;
-
- for (l = changes; l != NULL; l = l->next) {
- ebc = l->data;
-
- if (g_hash_table_lookup (ctxt->changed_hash, e_contact_get_const (ebc->contact, E_CONTACT_UID)))
- return l;
- }
-
- return NULL;
-}
-
-static EContactField
-get_next_mail (EContactField *field)
-{
- if (field == NULL)
- return E_CONTACT_EMAIL;
-
- switch (*field) {
- case E_CONTACT_EMAIL:
- return E_CONTACT_EMAIL_2;
- case E_CONTACT_EMAIL_2:
- return E_CONTACT_EMAIL_3;
- default:
- }
-
- return E_CONTACT_FIELD_LAST;
-}
-
-static EContactField
-get_next_home (EContactField *field)
-{
- if (field == NULL)
- return E_CONTACT_PHONE_HOME;
-
- switch (*field) {
- case E_CONTACT_PHONE_HOME:
- return E_CONTACT_PHONE_HOME_2;
- default:
- }
-
- return E_CONTACT_FIELD_LAST;
-}
-
-static EContactField
-get_next_work (EContactField *field)
-{
- if (field == NULL)
- return E_CONTACT_PHONE_BUSINESS;
-
- switch (*field) {
- case E_CONTACT_PHONE_BUSINESS:
- return E_CONTACT_PHONE_BUSINESS_2;
- default:
- }
-
- return E_CONTACT_FIELD_LAST;
-}
-
-static EContactField
-get_next_fax (EContactField *field)
-{
- if (field == NULL)
- return E_CONTACT_PHONE_BUSINESS_FAX;
-
- switch (*field) {
- case E_CONTACT_PHONE_BUSINESS_FAX:
- return E_CONTACT_PHONE_HOME_FAX;
- case E_CONTACT_PHONE_HOME_FAX:
- return E_CONTACT_PHONE_OTHER_FAX;
- default:
- }
-
- return E_CONTACT_FIELD_LAST;
-}
-
-static EContactField
-get_next_other (EContactField *field)
-{
- if (field == NULL)
- return E_CONTACT_PHONE_OTHER;
-
- return E_CONTACT_FIELD_LAST;
-}
-
-static EContactField
-get_next_main (EContactField *field)
-{
- if (field == NULL)
- return E_CONTACT_PHONE_PRIMARY;
-
- return E_CONTACT_FIELD_LAST;
-}
-
-static EContactField
-get_next_pager (EContactField *field)
-{
- if (field == NULL)
- return E_CONTACT_PHONE_PAGER;
-
- return E_CONTACT_FIELD_LAST;
-}
-
-static EContactField
-get_next_mobile (EContactField *field)
-{
- if (field == NULL)
- return E_CONTACT_PHONE_MOBILE;
-
- return E_CONTACT_FIELD_LAST;
-}
-
-static void
-get_next_init (EContactField *next_mail,
- EContactField *next_home,
- EContactField *next_work,
- EContactField *next_fax,
- EContactField *next_other,
- EContactField *next_main,
- EContactField *next_pager,
- EContactField *next_mobile)
-{
- *next_mail = get_next_mail (NULL);
- *next_home = get_next_home (NULL);
- *next_work = get_next_work (NULL);
- *next_fax = get_next_fax (NULL);
- *next_other = get_next_other (NULL);
- *next_main = get_next_main (NULL);
- *next_pager = get_next_pager (NULL);
- *next_mobile = get_next_mobile (NULL);
-}
-
-static gboolean
-is_next_done (EContactField field)
-{
- if (field == E_CONTACT_FIELD_LAST)
- return TRUE;
-
- return FALSE;
-}
-
-static gboolean
-is_syncable (EAddrConduitContext *ctxt, EAddrLocalRecord *local)
-{
- EContactField next_mail, next_home, next_work, next_fax;
- EContactField next_other, next_main, next_pager, next_mobile;
- gboolean syncable = TRUE;
- int i, l = 0;
-
- /* See if there are fields we can't sync or not in priority order */
- get_next_init (&next_mail, &next_home, &next_work, &next_fax,
- &next_other, &next_main, &next_pager, &next_mobile);
-
- for (i = entryPhone1; i <= entryPhone5 && syncable; i++) {
- int phonelabel = local->addr->phoneLabel[i - entryPhone1];
- const char *phone_str = local->addr->entry[i];
- gboolean empty = !(phone_str && *phone_str);
-
- if (empty)
- continue;
-
- for ( ; priority_label[l] != -1; l++)
- if (phonelabel == priority_label[l])
- break;
-
- if (priority_label[l] == -1) {
- syncable = FALSE;
- continue;
- }
-
- if (phonelabel == LABEL_EMAIL) {
- if (is_next_done (next_mail) || next_mail != priority[l]) {
- syncable = FALSE;
- break;
- }
- next_mail = get_next_mail (&next_mail);
- } else if (phonelabel == LABEL_HOME) {
- if (is_next_done (next_home) || next_home != priority[l]) {
- syncable = FALSE;
- break;
- }
- next_home = get_next_home (&next_home);
- } else if (phonelabel == LABEL_WORK) {
- if (is_next_done (next_work) || next_work != priority[l]) {
- syncable = FALSE;
- break;
- }
- next_work = get_next_work (&next_work);
- } else if (phonelabel == LABEL_FAX) {
- if (is_next_done (next_fax) || next_fax != priority[l]) {
- syncable = FALSE;
- break;
- }
- next_fax = get_next_fax (&next_fax);
- } else if (phonelabel == LABEL_OTHER) {
- if (is_next_done (next_other) || next_other != priority[l]) {
- syncable = FALSE;
- break;
- }
- next_other = get_next_other (&next_other);
- } else if (phonelabel == LABEL_MAIN) {
- if (is_next_done (next_main) || next_main != priority[l]) {
- syncable = FALSE;
- break;
- }
- next_main = get_next_main (&next_main);
- } else if (phonelabel == LABEL_PAGER) {
- if (is_next_done (next_pager) || next_pager != priority[l]) {
- syncable = FALSE;
- break;
- }
- next_pager = get_next_pager (&next_pager);
- } else if (phonelabel == LABEL_MOBILE) {
- if (is_next_done (next_mobile) || next_mobile != priority[l]) {
- syncable = FALSE;
- break;
- }
- next_mobile = get_next_mobile (&next_mobile);
- }
- }
-
- return syncable;
-}
-
-static void
-set_contact_text (EContact *contact, EContactField field, struct Address address, int entry)
-{
- char *text = NULL;
-
- if (address.entry[entry])
- text = e_pilot_utf8_from_pchar (address.entry[entry]);
-
- e_contact_set (contact, field, text);
-
- g_free (text);
-}
-
-static char *
-get_entry_text (struct Address address, int entry)
-{
- if (address.entry[entry])
- return e_pilot_utf8_from_pchar (address.entry[entry]);
-
- return NULL;
-}
-
-static void
-clear_entry_text (struct Address address, int field)
-{
- if (address.entry[field]) {
- free (address.entry[field]);
- address.entry[field] = NULL;
- }
-}
-
-static void
-compute_status (EAddrConduitContext *ctxt, EAddrLocalRecord *local, const char *uid)
-{
- EBookChange *ebc;
-
- local->local.archived = FALSE;
- local->local.secret = FALSE;
-
- ebc = g_hash_table_lookup (ctxt->changed_hash, uid);
-
- if (ebc == NULL) {
- local->local.attr = GnomePilotRecordNothing;
- return;
- }
-
- switch (ebc->change_type) {
- case E_BOOK_CHANGE_CARD_ADDED:
- local->local.attr = GnomePilotRecordNew;
- break;
- case E_BOOK_CHANGE_CARD_MODIFIED:
- local->local.attr = GnomePilotRecordModified;
- break;
- case E_BOOK_CHANGE_CARD_DELETED:
- local->local.attr = GnomePilotRecordDeleted;
- break;
- }
-}
-
-static GnomePilotRecord
-local_record_to_pilot_record (EAddrLocalRecord *local,
- EAddrConduitContext *ctxt)
-{
- GnomePilotRecord p;
- static char record[0xffff];
-
- g_assert (local->addr != NULL );
-
- LOG (g_message ( "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 = record;
- p.length = pack_Address (local->addr, p.record, 0xffff);
-
- return p;
-}
-
-static void
-local_record_from_ecard (EAddrLocalRecord *local, EContact *contact, EAddrConduitContext *ctxt)
-{
- const EContactAddress *address;
- EContactField mailing_address;
- int phone = entryPhone1;
-
- gboolean syncable;
- int i;
-
- g_return_if_fail (local != NULL);
- g_return_if_fail (contact != NULL);
-
- local->contact = g_object_ref (contact);
- local->local.ID = e_pilot_map_lookup_pid (ctxt->map, e_contact_get_const (contact, E_CONTACT_UID), TRUE);
-
- compute_status (ctxt, local, e_contact_get_const (contact, E_CONTACT_UID));
-
- 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) {
- struct Address addr;
- 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;
- memset (&addr, 0, sizeof (struct Address));
- unpack_Address (&addr, record, 0xffff);
- for (i = 0; i < 5; i++) {
- if (addr.entry[entryPhone1 + i])
- local->addr->entry[entryPhone1 + i] =
- strdup (addr.entry[entryPhone1 + i]);
- local->addr->phoneLabel[i] = addr.phoneLabel[i];
- }
- local->addr->showPhone = addr.showPhone;
- for (i = 0; i < 4; i++) {
- if (addr.entry[entryCustom1 + i])
- local->addr->entry[entryCustom1 + i] =
- strdup (addr.entry[entryCustom1 + i]);
- }
- free_Address (&addr);
- }
- }
-
- local->addr->entry[entryFirstname] = e_pilot_utf8_to_pchar (e_contact_get_const (contact, E_CONTACT_GIVEN_NAME));
- local->addr->entry[entryLastname] = e_pilot_utf8_to_pchar (e_contact_get_const (contact, E_CONTACT_FAMILY_NAME));
- local->addr->entry[entryCompany] = e_pilot_utf8_to_pchar (e_contact_get_const (contact, E_CONTACT_ORG));
- local->addr->entry[entryTitle] = e_pilot_utf8_to_pchar (e_contact_get_const (contact, E_CONTACT_TITLE));
-
- /* See if the default has something in it */
- mailing_address = -1;
- if (e_contact_get_const (contact, ctxt->cfg->default_address))
- mailing_address = ctxt->cfg->default_address;
-
- /* If it doesn't, look for any address */
- if (mailing_address == -1) {
- for (i = E_CONTACT_FIRST_LABEL_ID; i < E_CONTACT_LAST_LABEL_ID; i++) {
- if (e_contact_get_const (contact, i)) {
- mailing_address = i;
- break;
- }
- }
- }
-
- /* If all else fails, use the default */
- if (mailing_address == -1)
- mailing_address = ctxt->cfg->default_address;
-
- address = e_contact_get_const (contact, mailing_address);
- if (address) {
- char *add;
-
- /* If the address has 2 lines, make sure both get added */
- if (address->ext != NULL)
- add = g_strconcat (address->street, "\n", address->ext, NULL);
- else
- add = g_strdup (address->street);
- local->addr->entry[entryAddress] = e_pilot_utf8_to_pchar (add);
- g_free (add);
-
- local->addr->entry[entryCity] = e_pilot_utf8_to_pchar (address->locality);
- local->addr->entry[entryState] = e_pilot_utf8_to_pchar (address->region);
- local->addr->entry[entryZip] = e_pilot_utf8_to_pchar (address->code);
- local->addr->entry[entryCountry] = e_pilot_utf8_to_pchar (address->country);
- }
-
- /* Phone numbers */
-
- /* See if everything is syncable */
- syncable = is_syncable (ctxt, local);
-
- if (syncable) {
- INFO ("Syncable");
-
- /* Sync by priority */
- for (i = 0, phone = entryPhone1;
- priority[i] != E_CONTACT_FIELD_LAST && phone <= entryPhone5; i++) {
- const char *phone_str;
-
- phone_str = e_contact_get_const (contact, priority[i]);
- if (phone_str && *phone_str) {
- clear_entry_text (*local->addr, phone);
- local->addr->entry[phone] = e_pilot_utf8_to_pchar (phone_str);
- local->addr->phoneLabel[phone - entryPhone1] = priority_label[i];
- phone++;
- }
- }
- for ( ; phone <= entryPhone5; phone++)
- local->addr->phoneLabel[phone - entryPhone1] = phone - entryPhone1;
- local->addr->showPhone = 0;
- } else {
- EContactField next_mail, next_home, next_work, next_fax;
- EContactField next_other, next_main, next_pager, next_mobile;
-
- INFO ("Not Syncable");
- get_next_init (&next_mail, &next_home, &next_work, &next_fax,
- &next_other, &next_main, &next_pager, &next_mobile);
-
- /* Not completely syncable, so do the best we can */
- for (i = entryPhone1; i <= entryPhone5; i++) {
- int phonelabel = local->addr->phoneLabel[i - entryPhone1];
- const char *phone_str = NULL;
-
- if (phonelabel == LABEL_EMAIL && !is_next_done (next_mail)) {
- phone_str = e_contact_get_const (contact, next_mail);
- next_mail = get_next_mail (&next_mail);
- } else if (phonelabel == LABEL_HOME && !is_next_done (next_home)) {
- phone_str = e_contact_get_const (contact, next_home);
- next_home = get_next_home (&next_home);
- } else if (phonelabel == LABEL_WORK && !is_next_done (next_work)) {
- phone_str = e_contact_get_const (contact, next_work);
- next_work = get_next_work (&next_work);
- } else if (phonelabel == LABEL_FAX && !is_next_done (next_fax)) {
- phone_str = e_contact_get_const (contact, next_fax);
- next_fax = get_next_fax (&next_fax);
- } else if (phonelabel == LABEL_OTHER && !is_next_done (next_other)) {
- phone_str = e_contact_get_const (contact, next_other);
- next_other = get_next_other (&next_other);
- } else if (phonelabel == LABEL_MAIN && !is_next_done (next_main)) {
- phone_str = e_contact_get_const (contact, next_main);
- next_main = get_next_main (&next_main);
- } else if (phonelabel == LABEL_PAGER && !is_next_done (next_pager)) {
- phone_str = e_contact_get_const (contact, next_pager);
- next_pager = get_next_pager (&next_pager);
- } else if (phonelabel == LABEL_MOBILE && !is_next_done (next_mobile)) {
- phone_str = e_contact_get_const (contact, next_mobile);
- next_mobile = get_next_mobile (&next_mobile);
- }
-
- if (phone_str && *phone_str) {
- clear_entry_text (*local->addr, i);
- local->addr->entry[i] = e_pilot_utf8_to_pchar (phone_str);
- }
- }
- }
-
- /* Note */
- local->addr->entry[entryNote] = e_pilot_utf8_to_pchar (e_contact_get_const (contact, E_CONTACT_NOTE));
-}
-
-static void
-local_record_from_uid (EAddrLocalRecord *local,
- const char *uid,
- EAddrConduitContext *ctxt)
-{
- EContact *contact = NULL;
- GList *l;
-
- g_assert (local != NULL);
-
- for (l = ctxt->cards; l != NULL; l = l->next) {
- contact = l->data;
-
- /* FIXME Do we need to check for the empty string? */
- if (e_contact_get_const (contact, E_CONTACT_UID));
- break;
-
- contact = NULL;
- }
-
- if (contact != NULL) {
- local_record_from_ecard (local, contact, ctxt);
- } else {
- contact = e_contact_new ();
- e_contact_set (contact, E_CONTACT_UID, (gpointer) uid);
- local_record_from_ecard (local, contact, ctxt);
- g_object_unref (contact);
- }
-}
-
-static EContact *
-ecard_from_remote_record(EAddrConduitContext *ctxt,
- GnomePilotRecord *remote,
- EContact *in_contact)
-{
- struct Address address;
- EContact *contact;
- EContactName *name;
- EContactAddress *eaddress;
- EContactField mailing_address;
- char *txt, *find;
- EContactField next_mail, next_home, next_work, next_fax;
- EContactField next_other, next_main, next_pager, next_mobile;
- int i;
-
- g_return_val_if_fail(remote!=NULL,NULL);
- memset (&address, 0, sizeof (struct Address));
- unpack_Address (&address, remote->record, remote->length);
-
- if (in_contact == NULL)
- contact = e_contact_new ();
- else
- contact = e_contact_duplicate (in_contact);
-
- /* Name */
- name = e_contact_name_new ();
- name->given = get_entry_text (address, entryFirstname);
- name->family = get_entry_text (address, entryLastname);
-
- e_contact_set (contact, E_CONTACT_NAME, name);
- e_contact_name_free (name);
-
- /* File as */
- if (!e_contact_get_const (contact, E_CONTACT_FULL_NAME))
- set_contact_text (contact, E_CONTACT_FILE_AS, address, entryCompany);
-
- /* Title and Company */
- set_contact_text (contact, E_CONTACT_TITLE, address, entryTitle);
- set_contact_text (contact, E_CONTACT_ORG, address, entryCompany);
-
- /* Address */
- mailing_address = -1;
- if (e_contact_get_const (contact, ctxt->cfg->default_address))
- mailing_address = ctxt->cfg->default_address;
-
- if (mailing_address == -1) {
- for (i = E_CONTACT_FIRST_LABEL_ID; i < E_CONTACT_LAST_LABEL_ID; i++) {
- if (e_contact_get_const (contact, i)) {
- mailing_address = i;
- break;
- }
- }
- }
-
- if (mailing_address == -1)
- mailing_address = ctxt->cfg->default_address;
-
- eaddress = g_new0 (EContactAddress, 1);
-
- txt = get_entry_text (address, entryAddress);
- if ((find = strchr (txt, '\n')) != NULL) {
- *find = '\0';
- find++;
- }
- eaddress->street = txt;
- eaddress->ext = find != NULL ? g_strdup (find) : g_strdup ("");
- eaddress->locality = get_entry_text (address, entryCity);
- eaddress->region = get_entry_text (address, entryState);
- eaddress->country = get_entry_text (address, entryCountry);
- eaddress->code = get_entry_text (address, entryZip);
-
- e_contact_set (contact, mailing_address, eaddress);
- e_contact_address_free (eaddress);
-
- /* Phone numbers */
- get_next_init (&next_mail, &next_home, &next_work, &next_fax,
- &next_other, &next_main, &next_pager, &next_mobile);
-
- for (i = entryPhone1; i <= entryPhone5; i++) {
- int phonelabel = address.phoneLabel[i - entryPhone1];
- char *phonenum = get_entry_text (address, i);
-
- if (phonelabel == LABEL_EMAIL && !is_next_done (next_mail)) {
- e_contact_set (contact, next_mail, phonenum);
- next_mail = get_next_mail (&next_mail);
- } else if (phonelabel == LABEL_HOME && !is_next_done (next_home)) {
- e_contact_set (contact, next_home, phonenum);
- next_home = get_next_home (&next_home);
- } else if (phonelabel == LABEL_WORK && !is_next_done (next_work)) {
- e_contact_set (contact, next_work, phonenum);
- next_work = get_next_work (&next_work);
- } else if (phonelabel == LABEL_FAX && !is_next_done (next_fax)) {
- e_contact_set (contact, next_fax, phonenum);
- next_fax = get_next_fax (&next_fax);
- } else if (phonelabel == LABEL_OTHER && !is_next_done (next_other)) {
- e_contact_set (contact, next_other, phonenum);
- next_other = get_next_other (&next_other);
- } else if (phonelabel == LABEL_MAIN && !is_next_done (next_main)) {
- e_contact_set (contact, next_main, phonenum);
- next_main = get_next_main (&next_main);
- } else if (phonelabel == LABEL_PAGER && !is_next_done (next_pager)) {
- e_contact_set (contact, next_pager, phonenum);
- next_pager = get_next_pager (&next_pager);
- } else if (phonelabel == LABEL_MOBILE && !is_next_done (next_mobile)) {
- e_contact_set (contact, next_mobile, phonenum);
- next_mobile = get_next_mobile (&next_mobile);
- }
-
- g_free (phonenum);
- }
-
- /* Note */
- set_contact_text (contact, E_CONTACT_NOTE, address, entryNote);
-
- free_Address(&address);
-
- return contact;
-}
-
-static void
-check_for_slow_setting (GnomePilotConduit *c, EAddrConduitContext *ctxt)
-{
- GnomePilotConduitStandard *conduit = GNOME_PILOT_CONDUIT_STANDARD (c);
- int map_count;
- const char *uri;
-
- map_count = g_hash_table_size (ctxt->map->pid_map);
- if (map_count == 0)
- gnome_pilot_conduit_standard_set_slow (conduit, TRUE);
-
- /* Or if the URI's don't match */
- uri = e_book_get_uri (ctxt->ebook);
- LOG (g_message (" Current URI %s (%s)\n", uri, ctxt->cfg->last_uri ? ctxt->cfg->last_uri : "<NONE>"));
- if (ctxt->cfg->last_uri != NULL && strcmp (ctxt->cfg->last_uri, uri)) {
- gnome_pilot_conduit_standard_set_slow (conduit, TRUE);
- e_pilot_map_clear (ctxt->map);
- }
-
- if (gnome_pilot_conduit_standard_get_slow (conduit)) {
- ctxt->map->write_touched_only = TRUE;
- LOG (g_message ( " doing slow sync\n" ));
- } else {
- LOG (g_message ( " doing fast sync\n" ));
- }
-}
-
-/* Pilot syncing callbacks */
-static gint
-pre_sync (GnomePilotConduit *conduit,
- GnomePilotDBInfo *dbi,
- EAddrConduitContext *ctxt)
-{
- GnomePilotConduitSyncAbs *abs_conduit;
- EBookQuery *query;
- GList *l;
- int len;
- unsigned char *buf;
- char *filename;
- char *change_id;
- gint num_records, add_records = 0, mod_records = 0, del_records = 0;
-
- abs_conduit = GNOME_PILOT_CONDUIT_SYNC_ABS (conduit);
-
- LOG (g_message ( "---------------------------------------------------------\n" ));
- LOG (g_message ( "pre_sync: Addressbook Conduit v.%s", CONDUIT_VERSION ));
- /* g_message ("Addressbook Conduit v.%s", CONDUIT_VERSION); */
-
- ctxt->dbi = dbi;
-
- /* FIXME Need to allow our own concept of "local" */
- ctxt->ebook = e_book_new ();
- if (!e_book_load_local_addressbook (ctxt->ebook, NULL)) {
- WARN(_("Could not load addressbook"));
- gnome_pilot_conduit_error (conduit, _("Could not load addressbook"));
-
- return -1;
- }
-
- /* Load the uid <--> pilot id mappings */
- filename = map_name (ctxt);
- e_pilot_map_read (filename, &ctxt->map);
- g_free (filename);
-
- /* Get a list of all contacts */
- query = e_book_query_from_string ("#t");
- if (!e_book_get_contacts (ctxt->ebook, query, &ctxt->cards, NULL)) {
- g_object_unref (query);
-
- return -1;
- }
- g_object_unref (query);
-
- /* Count and hash the changes */
- change_id = g_strdup_printf ("pilot-sync-evolution-addressbook-%d", ctxt->cfg->pilot_id);
- if (!e_book_get_changes (ctxt->ebook, change_id, &ctxt->changed, NULL))
- return -1;
- ctxt->changed_hash = g_hash_table_new (g_str_hash, g_str_equal);
- g_free (change_id);
-
- for (l = ctxt->changed; l != NULL; l = l->next) {
- EBookChange *ebc = l->data;
- const char *uid;
-
- uid = e_contact_get_const (ebc->contact, E_CONTACT_UID);
- if (!e_pilot_map_uid_is_archived (ctxt->map, uid)) {
-
- g_hash_table_insert (ctxt->changed_hash, g_strdup (uid), ebc);
-
- switch (ebc->change_type) {
- case E_BOOK_CHANGE_CARD_ADDED:
- add_records++;
- break;
- case E_BOOK_CHANGE_CARD_MODIFIED:
- mod_records++;
- break;
- case E_BOOK_CHANGE_CARD_DELETED:
- del_records++;
- break;
- }
- } else if (ebc->change_type == E_BOOK_CHANGE_CARD_DELETED) {
- e_pilot_map_remove_by_uid (ctxt->map, uid);
- }
- }
-
- /* Set the count information */
- num_records = g_list_length (ctxt->cards);
- 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);
- if (ctxt->cfg->sync_type == GnomePilotConduitSyncTypeCopyToPilot
- || ctxt->cfg->sync_type == GnomePilotConduitSyncTypeCopyFromPilot)
- ctxt->map->write_touched_only = TRUE;
-
- return 0;
-}
-
-static gint
-post_sync (GnomePilotConduit *conduit,
- GnomePilotDBInfo *dbi,
- EAddrConduitContext *ctxt)
-{
- GList *changed;
- gchar *filename, *change_id;
-
- LOG (g_message ( "post_sync: Address Conduit v.%s", CONDUIT_VERSION ));
-
- g_free (ctxt->cfg->last_uri);
- ctxt->cfg->last_uri = g_strdup (e_book_get_uri (ctxt->ebook));
- addrconduit_save_configuration (ctxt->cfg);
-
- 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);
- if (e_book_get_changes (ctxt->ebook, change_id, &changed, NULL))
- e_book_free_change_list (changed);
- g_free (change_id);
-
- LOG (g_message ( "---------------------------------------------------------\n" ));
-
- return 0;
-}
-
-static gint
-set_pilot_id (GnomePilotConduitSyncAbs *conduit,
- EAddrLocalRecord *local,
- guint32 ID,
- EAddrConduitContext *ctxt)
-{
- LOG (g_message ( "set_pilot_id: setting to %d\n", ID ));
-
- e_pilot_map_insert (ctxt->map, ID, e_contact_get_const (local->contact, E_CONTACT_UID), FALSE);
-
- return 0;
-}
-
-static gint
-set_status_cleared (GnomePilotConduitSyncAbs *conduit,
- EAddrLocalRecord *local,
- EAddrConduitContext *ctxt)
-{
- LOG (g_message ( "set_status_cleared: clearing status\n" ));
-
- g_hash_table_remove (ctxt->changed_hash, e_contact_get_const (local->contact, E_CONTACT_UID));
-
- 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 (g_message ( "beginning for_each" ));
-
- cards = ctxt->cards;
- count = 0;
-
- if (cards != NULL) {
- LOG (g_message ( "iterating over %d records", g_list_length (cards) ));
-
- *local = g_new0 (EAddrLocalRecord, 1);
- local_record_from_ecard (*local, cards->data, ctxt);
- g_list_prepend (ctxt->locals, *local);
-
- iterator = cards;
- } else {
- LOG (g_message ( "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);
- g_list_prepend (ctxt->locals, *local);
- } else {
- LOG (g_message ( "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 (g_message ( "for_each_modified beginning\n" ));
-
- iterator = ctxt->changed;
-
- count = 0;
-
- iterator = next_changed_item (ctxt, iterator);
- if (iterator != NULL) {
- EBookChange *ebc = iterator->data;
-
- LOG (g_message ( "iterating over %d records", g_hash_table_size (ctxt->changed_hash)));
-
- *local = g_new0 (EAddrLocalRecord, 1);
- local_record_from_ecard (*local, ebc->contact, ctxt);
- g_list_prepend (ctxt->locals, *local);
- } else {
- LOG (g_message ( "no events" ));
-
- *local = NULL;
- }
- } else {
- count++;
- iterator = g_list_next (iterator);
- if (iterator && (iterator = next_changed_item (ctxt, iterator))) {
- EBookChange *ebc = iterator->data;
-
- *local = g_new0 (EAddrLocalRecord, 1);
- local_record_from_ecard (*local, ebc->contact, ctxt);
- g_list_prepend (ctxt->locals, *local);
- } else {
- LOG (g_message ( "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)
-{
- GnomePilotRecord local_pilot;
- int retval = 0;
-
- LOG (g_message ("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 (g_message ( " equal" ));
- else
- LOG (g_message ( " not equal" ));
-
- return retval;
-}
-
-static gint
-add_record (GnomePilotConduitSyncAbs *conduit,
- GnomePilotRecord *remote,
- EAddrConduitContext *ctxt)
-{
- EContact *contact;
- int retval = 0;
-
- g_return_val_if_fail (remote != NULL, -1);
-
- LOG (g_message ( "add_record: adding %s to desktop\n", print_remote (remote) ));
-
- contact = ecard_from_remote_record (ctxt, remote, NULL);
-
- /* add the ecard to the server */
- if (!e_book_add_contact (ctxt->ebook, contact, NULL)) {
- WARN ("add_record: failed to add card to ebook\n");
- g_object_unref (contact);
-
- return -1;
- }
-
- e_pilot_map_insert (ctxt->map, remote->ID, e_contact_get (contact, E_CONTACT_UID), FALSE);
-
- g_object_unref (contact);
-
- return retval;
-}
-
-static gint
-replace_record (GnomePilotConduitSyncAbs *conduit,
- EAddrLocalRecord *local,
- GnomePilotRecord *remote,
- EAddrConduitContext *ctxt)
-{
- EContact *new_contact;
- EBookChange *ebc;
- char *old_id;
- int retval = 0;
-
- g_return_val_if_fail (remote != NULL, -1);
-
- LOG (g_message ("replace_record: replace %s with %s\n",
- print_local (local), print_remote (remote)));
-
- old_id = e_contact_get (local->contact, E_CONTACT_UID);
- ebc = g_hash_table_lookup (ctxt->changed_hash, old_id);
-
- new_contact = ecard_from_remote_record (ctxt, remote, local->contact);
- g_object_unref (local->contact);
- local->contact = new_contact;
-
- if (ebc && ebc->change_type == E_BOOK_CHANGE_CARD_DELETED) {
- if (!e_book_add_contact (ctxt->ebook, local->contact, NULL)) {
- WARN (G_STRLOC ": failed to add card\n");
-
- return -1;
- }
-
- } else {
- if (!e_book_commit_contact (ctxt->ebook, local->contact, NULL)) {
- WARN (G_STRLOC ": failed to commit card\n");
-
- return -1;
- }
- }
-
- /* Adding a record causes wombat to assign a new uid so we must tidy */
- if (ebc && ebc->change_type == E_BOOK_CHANGE_CARD_DELETED) {
- const char *uid = e_contact_get_const (local->contact, E_CONTACT_UID);
- gboolean arch;
-
- arch = e_pilot_map_uid_is_archived (ctxt->map, uid);
- e_pilot_map_insert (ctxt->map, remote->ID, uid, arch);
-
- ebc = g_hash_table_lookup (ctxt->changed_hash, old_id);
- if (ebc) {
- g_hash_table_remove (ctxt->changed_hash, old_id);
- g_object_unref (ebc->contact);
- g_object_ref (local->contact);
- ebc->contact = local->contact;
- /* FIXME We should possibly be duplicating the uid */
- g_hash_table_insert (ctxt->changed_hash, (gpointer) uid, ebc);
- }
- }
-
- return retval;
-}
-
-static gint
-delete_record (GnomePilotConduitSyncAbs *conduit,
- EAddrLocalRecord *local,
- EAddrConduitContext *ctxt)
-{
- int retval = 0;
-
- g_return_val_if_fail (local != NULL, -1);
- g_return_val_if_fail (local->contact != NULL, -1);
-
- LOG (g_message ( "delete_record: delete %s\n", print_local (local) ));
-
- e_pilot_map_remove_by_uid (ctxt->map, e_contact_get_const (local->contact, E_CONTACT_UID));
- if (!e_book_remove_contact (ctxt->ebook, e_contact_get_const (local->contact, E_CONTACT_UID), NULL)) {
- WARN ("delete_record: failed to delete card in ebook\n");
-
- retval = -1;
- }
-
- 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 (g_message ( "archive_record: %s\n", archive ? "yes" : "no" ));
-
- e_pilot_map_insert (ctxt->map, local->local.ID, e_contact_get_const (local->contact, E_CONTACT_UID), archive);
-
- return retval;
-}
-
-static gint
-match (GnomePilotConduitSyncAbs *conduit,
- GnomePilotRecord *remote,
- EAddrLocalRecord **local,
- EAddrConduitContext *ctxt)
-{
- const char *uid;
-
- LOG (g_message ("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, TRUE);
-
- if (!uid)
- return 0;
-
- LOG (g_message ( " 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 (g_message ( "free_match: freeing\n" ));
-
- g_return_val_if_fail (local != NULL, -1);
-
- addrconduit_destroy_record (local);
-
- return 0;
-}
-
-static gint
-prepare (GnomePilotConduitSyncAbs *conduit,
- EAddrLocalRecord *local,
- GnomePilotRecord *remote,
- EAddrConduitContext *ctxt)
-{
- LOG (g_message ( "prepare: encoding local %s\n", print_local (local) ));
-
- *remote = local_record_to_pilot_record (local, ctxt);
-
- return 0;
-}
-
-/* Pilot Settings Callbacks */
-static void
-fill_widgets (EAddrConduitContext *ctxt)
-{
- e_pilot_settings_set_secret (E_PILOT_SETTINGS (ctxt->ps),
- ctxt->cfg->secret);
-
- e_addr_gui_fill_widgets (ctxt->gui, ctxt->cfg);
-}
-
-static gint
-create_settings_window (GnomePilotConduit *conduit,
- GtkWidget *parent,
- EAddrConduitContext *ctxt)
-{
- LOG (g_message ( "create_settings_window" ));
-
- ctxt->ps = e_pilot_settings_new ();
- ctxt->gui = e_addr_gui_new (E_PILOT_SETTINGS (ctxt->ps));
-
- gtk_container_add (GTK_CONTAINER (parent), ctxt->ps);
- gtk_widget_show (ctxt->ps);
-
- fill_widgets (ctxt);
-
- return 0;
-}
-static void
-display_settings (GnomePilotConduit *conduit, EAddrConduitContext *ctxt)
-{
- LOG (g_message ( "display_settings" ));
-
- fill_widgets (ctxt);
-}
-
-static void
-save_settings (GnomePilotConduit *conduit, EAddrConduitContext *ctxt)
-{
- LOG (g_message ( "save_settings" ));
-
- ctxt->new_cfg->secret =
- e_pilot_settings_get_secret (E_PILOT_SETTINGS (ctxt->ps));
- e_addr_gui_fill_config (ctxt->gui, ctxt->new_cfg);
-
- addrconduit_save_configuration (ctxt->new_cfg);
-}
-
-static void
-revert_settings (GnomePilotConduit *conduit, EAddrConduitContext *ctxt)
-{
- LOG (g_message ( "revert_settings" ));
-
- addrconduit_save_configuration (ctxt->cfg);
- addrconduit_destroy_configuration (ctxt->new_cfg);
- ctxt->new_cfg = addrconduit_dupe_configuration (ctxt->cfg);
-}
-
-GnomePilotConduit *
-conduit_get_gpilot_conduit (guint32 pilot_id)
-{
- GtkObject *retval;
- EAddrConduitContext *ctxt;
-
- LOG (g_message ( "in address's conduit_get_gpilot_conduit\n" ));
-
- retval = gnome_pilot_conduit_sync_abs_new ("AddressDB", 0x61646472);
- g_assert (retval != NULL);
-
- ctxt = e_addr_context_new (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);
-
- /* Gui Settings */
- gtk_signal_connect (retval, "create_settings_window", (GtkSignalFunc) create_settings_window, ctxt);
- gtk_signal_connect (retval, "display_settings", (GtkSignalFunc) display_settings, ctxt);
- gtk_signal_connect (retval, "save_settings", (GtkSignalFunc) save_settings, ctxt);
- gtk_signal_connect (retval, "revert_settings", (GtkSignalFunc) revert_settings, 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/e-address.conduit.in b/addressbook/conduit/e-address.conduit.in
deleted file mode 100644
index 669a506001..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="@privconduitdir@/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"/>
- <conduit-attribute name="settings" value="TRUE"/>
- <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 5639d4fc22..0000000000
--- a/addressbook/gui/component/.cvsignore
+++ /dev/null
@@ -1,14 +0,0 @@
-.deps
-.libs
-.pure
-Makefile
-Makefile.in
-*.lo
-*.la
-evolution-addressbook
-evolution-addressbook.pure
-test-addressbook
-GNOME_Evolution_Addressbook*.server
-GNOME_Evolution_Addressbook*.server.in
-addressbook-marshal.c
-addressbook-marshal.h
diff --git a/addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in b/addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in
deleted file mode 100644
index fb55b0df58..0000000000
--- a/addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in
+++ /dev/null
@@ -1,143 +0,0 @@
-<oaf_info>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_Factory:@VERSION@"
- type="shlib"
- location="@COMPONENTDIR@/libevolution-addressbook.so">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/ObjectFactory:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="name" type="string"
- _value="Evolution Addressbook"/>
-
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_VCard_Control:@VERSION@"
- type="factory"
- location="OAFIID:GNOME_Evolution_Addressbook_Factory:@VERSION@">
-
- <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 card viewer"/>
-
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_Control:@VERSION@"
- type="factory"
- location="OAFIID:GNOME_Evolution_Addressbook_Factory:@VERSION@">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:BonoboControl/addressbook-control:@VERSION@"/>
- <item value="IDL:GNOME/Control:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="name" type="string"
- _value="Evolution Addressbook folder viewer"/>
-
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_Component:@VERSION@"
- type="factory"
- location="OAFIID:GNOME_Evolution_Addressbook_Factory:@VERSION@">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Evolution/Component:@VERSION@"/>
- </oaf_attribute>
-
- <oaf_attribute name="name" type="string"
- _value="Evolution Addressbook component"/>
-
- <oaf_attribute name="evolution:component_alias" type="string" value="contacts"/>
-
- <oaf_attribute name="evolution:button_label" type="string" _value="Contacts"/>
- <oaf_attribute name="evolution:button_sort_order" type="string" value="-9"/>
- <oaf_attribute name="evolution:button_icon" type="string" value="evolution-contacts.png"/>
-
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_AddressWidget:@VERSION@"
- type="factory"
- location="OAFIID:GNOME_Evolution_Addressbook_Factory:@VERSION@">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:BonoboControl/address-widget:@VERSION@"/>
- <item value="IDL:GNOME/Control:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="name" type="string"
- _value="Evolution Addressbook address viewer"/>
-
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_AddressPopup:@VERSION@"
- type="factory"
- location="OAFIID:GNOME_Evolution_Addressbook_Factory:@VERSION@">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:BonoboControl/address-widget:@VERSION@"/>
- <item value="IDL:GNOME/Control:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="name" type="string"
- _value="Evolution Addressbook address pop-up"/>
-
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_SMime_CertificateManager_ConfigControl:@VERSION@"
- type="factory"
- location="OAFIID:GNOME_Evolution_Addressbook_Factory:@VERSION@">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Evolution/ConfigControl:@VERSION@"/>
- </oaf_attribute>
-
- <oaf_attribute name="evolution2:config_item:title" type="string"
- _value="Certificates"/>
-
- <oaf_attribute name="evolution2:config_item:description" type="string"
- _value="Manager your S/Mime certificates here"/>
-
- <oaf_attribute name="evolution2:config_item:icon_name" type="string"
- value="pgp-signature-ok.png"/>
-
- <oaf_attribute name="evolution2:config_item:priority" type="string" value="-6"/>
-
- <oaf_attribute name="name" type="string"
- _value="Evolution S/Mime Certificate Management Control"/>
-
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_Autocompletion_ConfigControl:@VERSION@"
- type="factory"
- location="OAFIID:GNOME_Evolution_Addressbook_Factory:@VERSION@">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Evolution/ConfigControl:@VERSION@"/>
- </oaf_attribute>
-
- <oaf_attribute name="evolution2:config_item:title" type="string"
- _value="Autocompletion"/>
-
- <oaf_attribute name="evolution2:config_item:description" type="string"
- _value="Configure autocomple here"/>
-
- <oaf_attribute name="evolution2:config_item:icon_name" type="string"
- value="folder-settings.png"/>
-
- <oaf_attribute name="evolution2:config_item:priority" type="string" value="-9"/>
-
- <oaf_attribute name="name" type="string"
- _value="Evolution folder settings configuration control"/>
-</oaf_server>
-
-</oaf_info>
diff --git a/addressbook/gui/component/Makefile.am b/addressbook/gui/component/Makefile.am
deleted file mode 100644
index 09dcb8e537..0000000000
--- a/addressbook/gui/component/Makefile.am
+++ /dev/null
@@ -1,108 +0,0 @@
-SUBDIRS = select-names
-
-INCLUDES = \
- -DG_LOG_DOMAIN=\"evolution-addressbook\" \
- -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/widgets \
- -I$(top_srcdir)/addressbook/backend \
- -I$(top_builddir)/addressbook/backend \
- -DEVOLUTION_DATADIR=\""$(datadir)"\" \
- -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
- -DEVOLUTION_ETSPECDIR=\""$(etspecdir)"\" \
- -DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\" \
- -DEVOLUTION_LOCALEDIR=\""$(localedir)"\" \
- -DEVOLUTION_UIDIR=\""$(evolutionuidir)"\" \
- -DPREFIX=\""$(prefix)"\" \
- $(LDAP_CFLAGS) \
- $(EVOLUTION_ADDRESSBOOK_CFLAGS)
-
-component_LTLIBRARIES = libevolution-addressbook.la
-
-libevolution_addressbook_la_SOURCES = \
- addressbook-component.c \
- addressbook-component.h \
- addressbook-config.c \
- addressbook-config.h \
- autocompletion-config.c \
- autocompletion-config.h \
- addressbook.c \
- addressbook.h \
- component-factory.c
-
-# $(top_builddir)/addressbook/printing/libecontactprint.la
-
-if ENABLE_SMIME
-SMIME_LIB=$(top_builddir)/smime/gui/libevolution-smime.la
-endif
-
-libevolution_addressbook_la_LIBADD = \
- $(SMIME_LIB) \
- $(top_builddir)/addressbook/gui/component/select-names/libeselectnames.la \
- $(top_builddir)/shell/libeshell.la \
- $(top_builddir)/addressbook/gui/merging/libeabbookmerging.la \
- $(top_builddir)/addressbook/gui/widgets/libeabwidgets.la \
- $(top_builddir)/addressbook/gui/search/libeaddressbooksearch.la \
- $(top_builddir)/filter/libfilter.la \
- $(top_builddir)/addressbook/util/libeabutil.la \
- $(top_builddir)/addressbook/gui/contact-editor/libecontacteditor.la \
- $(top_builddir)/addressbook/gui/contact-list-editor/libecontactlisteditor.la \
- $(top_builddir)/widgets/misc/libemiscwidgets.la \
- $(top_builddir)/widgets/menus/libmenus.la \
- $(EVOLUTION_ADDRESSBOOK_LIBS) $(LDAP_LIBS)
-
-
-
-libevolution_addressbook_la_LDFLAGS = -module -avoid-version
-
-# GConf schemas
-
-schemadir = $(GCONF_SCHEMA_FILE_DIR)
-schema_in_files = apps_evolution_addressbook.schemas.in.in
-schema_DATA = $(schema_in_files:.schemas.in.in=-$(BASE_VERSION).schemas)
-%-$(BASE_VERSION).schemas.in: %.schemas.in.in
- cp $< $@
-
-@INTLTOOL_SCHEMAS_RULE@
-
-install-data-local:
- if test -z "$(DESTDIR)" ; then \
- for p in $(schema_DATA) ; do \
- GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(srcdir)/$$p; \
- done \
- fi
-
-server_in_files = GNOME_Evolution_Addressbook.server.in.in
-server_DATA = $(server_in_files:.server.in.in=_$(BASE_VERSION).server)
-@EVO_SERVER_RULE@
-@INTLTOOL_SERVER_RULE@
-
-glade_DATA = \
- ldap-config.glade
-
-BUILT_SOURCES = $(server_DATA)
-CLEANFILES = $(BUILT_SOURCES)
-
-EXTRA_DIST = \
- $(glade_DATA) \
- $(schema_DATA) \
- $(server_in_files)
-
-dist-hook:
- cd $(distdir); rm -f $(BUILT_SOURCES)
-
-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 803ed82d55..0000000000
--- a/addressbook/gui/component/addressbook-component.c
+++ /dev/null
@@ -1,431 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* addressbook-component.c
- *
- * Copyright (C) 2003 Ettore Perazzoli
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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>
- */
-
-/* EPFIXME: Add autocompletion setting. */
-
-
-#include <config.h>
-
-#include "addressbook-component.h"
-
-#include "addressbook.h"
-#include "addressbook-config.h"
-
-#include "widgets/misc/e-source-selector.h"
-#include "addressbook/gui/widgets/eab-gui-util.h"
-
-#include "e-task-bar.h"
-
-#include <string.h>
-#include <bonobo/bonobo-i18n.h>
-#include <gtk/gtkscrolledwindow.h>
-#include <gtk/gtkmenu.h>
-#include <gtk/gtkimage.h>
-#include <gtk/gtkimagemenuitem.h>
-#include <gtk/gtklabel.h> /* FIXME */
-#include <gtk/gtkmessagedialog.h>
-#include <gtk/gtkstock.h>
-#include <gconf/gconf-client.h>
-#include <gal/util/e-util.h>
-
-
-#define PARENT_TYPE bonobo_object_get_type ()
-static BonoboObjectClass *parent_class = NULL;
-
-struct _AddressbookComponentPrivate {
- GConfClient *gconf_client;
- ESourceList *source_list;
- GtkWidget *source_selector;
-
- EActivityHandler *activity_handler;
-};
-
-
-/* Utility functions. */
-
-static void
-load_uri_for_selection (ESourceSelector *selector,
- BonoboControl *view_control)
-{
- ESource *selected_source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (selector));
-
- if (selected_source != NULL) {
- bonobo_control_set_property (view_control, NULL, "source_uid", TC_CORBA_string,
- e_source_peek_uid (selected_source), NULL);
- }
-}
-
-static void
-add_popup_menu_item (GtkMenu *menu, const char *label, const char *pixmap,
- GCallback callback, gpointer user_data)
-{
- GtkWidget *item, *image;
-
- if (pixmap) {
- item = gtk_image_menu_item_new_with_label (label);
-
- /* load the image */
- image = gtk_image_new_from_file (pixmap);
- if (!image)
- image = gtk_image_new_from_stock (pixmap, GTK_ICON_SIZE_MENU);
-
- if (image)
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
- } else {
- item = gtk_menu_item_new_with_label (label);
- }
-
- if (callback)
- g_signal_connect (G_OBJECT (item), "activate", callback, user_data);
-
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
- gtk_widget_show (item);
-}
-
-/* Folder popup menu callbacks */
-
-static void
-new_addressbook_cb (GtkWidget *widget, AddressbookComponent *comp)
-{
- addressbook_config_create_new_source (gtk_widget_get_toplevel (widget));
-}
-
-static void
-edit_addressbook_cb (GtkWidget *widget, AddressbookComponent *comp)
-{
- AddressbookComponentPrivate *priv;
- ESource *selected_source;
-
- priv = comp->priv;
-
- selected_source =
- e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (priv->source_selector));
- if (!selected_source)
- return;
-
- addressbook_config_edit_source (gtk_widget_get_toplevel (widget), selected_source);
-}
-
-static void
-delete_addressbook_cb (GtkWidget *widget, AddressbookComponent *comp)
-{
-}
-
-/* Callbacks. */
-
-static void
-primary_source_selection_changed_callback (ESourceSelector *selector,
- BonoboControl *view_control)
-{
- load_uri_for_selection (selector, view_control);
-}
-
-static void
-fill_popup_menu_callback (ESourceSelector *selector, GtkMenu *menu, AddressbookComponent *comp)
-{
- add_popup_menu_item (menu, _("New Addressbook"), NULL, G_CALLBACK (new_addressbook_cb), comp);
- add_popup_menu_item (menu, _("Properties..."), NULL, G_CALLBACK (edit_addressbook_cb), comp);
- add_popup_menu_item (menu, _("Delete"), GTK_STOCK_DELETE, G_CALLBACK (delete_addressbook_cb), comp);
- add_popup_menu_item (menu, _("Rename"), NULL, NULL, NULL);
-}
-
-/* Evolution::Component CORBA methods. */
-
-static void
-impl_createControls (PortableServer_Servant servant,
- Bonobo_Control *corba_sidebar_control,
- Bonobo_Control *corba_view_control,
- Bonobo_Control *corba_statusbar_control,
- CORBA_Environment *ev)
-{
- AddressbookComponent *addressbook_component = ADDRESSBOOK_COMPONENT (bonobo_object_from_servant (servant));
- GtkWidget *selector;
- GtkWidget *selector_scrolled_window;
- GtkWidget *statusbar_widget;
- BonoboControl *sidebar_control;
- BonoboControl *view_control;
- BonoboControl *statusbar_control;
-
- selector = e_source_selector_new (addressbook_component->priv->source_list);
- e_source_selector_show_selection (E_SOURCE_SELECTOR (selector), FALSE);
- gtk_widget_show (selector);
-
- addressbook_component->priv->source_selector = selector;
-
- selector_scrolled_window = gtk_scrolled_window_new (NULL, NULL);
- gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (selector_scrolled_window), GTK_SHADOW_IN);
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (selector_scrolled_window),
- GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
- gtk_container_add (GTK_CONTAINER (selector_scrolled_window), selector);
- gtk_widget_show (selector_scrolled_window);
-
- sidebar_control = bonobo_control_new (selector_scrolled_window);
-
- view_control = addressbook_new_control ();
- g_signal_connect_object (selector, "primary_selection_changed",
- G_CALLBACK (primary_source_selection_changed_callback),
- G_OBJECT (view_control), 0);
- g_signal_connect_object (selector, "fill_popup_menu",
- G_CALLBACK (fill_popup_menu_callback),
- G_OBJECT (addressbook_component), 0);
- load_uri_for_selection (E_SOURCE_SELECTOR (selector), view_control);
-
- statusbar_widget = e_task_bar_new ();
- gtk_widget_show (statusbar_widget);
- statusbar_control = bonobo_control_new (statusbar_widget);
-
- e_activity_handler_attach_task_bar (addressbook_component->priv->activity_handler,
- E_TASK_BAR (statusbar_widget));
-
- *corba_sidebar_control = CORBA_Object_duplicate (BONOBO_OBJREF (sidebar_control), ev);
- *corba_view_control = CORBA_Object_duplicate (BONOBO_OBJREF (view_control), ev);
- *corba_statusbar_control = CORBA_Object_duplicate (BONOBO_OBJREF (statusbar_control), ev);
-}
-
-static GNOME_Evolution_CreatableItemTypeList *
-impl__get_userCreatableItems (PortableServer_Servant servant,
- CORBA_Environment *ev)
-{
- GNOME_Evolution_CreatableItemTypeList *list = GNOME_Evolution_CreatableItemTypeList__alloc ();
-
- list->_length = 2;
- list->_maximum = list->_length;
- list->_buffer = GNOME_Evolution_CreatableItemTypeList_allocbuf (list->_length);
-
- CORBA_sequence_set_release (list, FALSE);
-
- list->_buffer[0].id = "contact";
- list->_buffer[0].description = _("New Contact");
- list->_buffer[0].menuDescription = _("_Contact");
- list->_buffer[0].tooltip = _("Create a new contact");
- list->_buffer[0].menuShortcut = 'c';
- list->_buffer[0].iconName = "evolution-contacts-mini.png";
-
- list->_buffer[1].id = "contact_list";
- list->_buffer[1].description = _("New Contact List");
- list->_buffer[1].menuDescription = _("Contact _List");
- list->_buffer[1].tooltip = _("Create a new contact list");
- list->_buffer[1].menuShortcut = 'l';
- list->_buffer[1].iconName = "contact-list-16.png";
-
- return list;
-}
-
-static void
-impl_requestCreateItem (PortableServer_Servant servant,
- const CORBA_char *item_type_name,
- CORBA_Environment *ev)
-{
- AddressbookComponent *addressbook_component = ADDRESSBOOK_COMPONENT (bonobo_object_from_servant (servant));
- AddressbookComponentPrivate *priv;
- EBook *book;
- EContact *contact = e_contact_new ();
- ESource *selected_source;
- gchar *uri;
-
- priv = addressbook_component->priv;
-
- selected_source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (priv->source_selector));
- if (!selected_source) {
- CORBA_exception_set (ev, CORBA_USER_EXCEPTION, ex_GNOME_Evolution_Component_Failed, NULL);
- return;
- }
-
- uri = e_source_get_uri (selected_source);
- if (!uri) {
- CORBA_exception_set (ev, CORBA_USER_EXCEPTION, ex_GNOME_Evolution_Component_Failed, NULL);
- return;
- }
-
- book = e_book_new ();
- if (!e_book_load_uri (book, uri, TRUE, NULL)) {
- CORBA_exception_set (ev, CORBA_USER_EXCEPTION, ex_GNOME_Evolution_Component_Failed, NULL);
- g_object_unref (book);
- g_free (uri);
- return;
- }
-
- contact = e_contact_new ();
-
- if (!item_type_name) {
- CORBA_exception_set (ev, CORBA_USER_EXCEPTION, ex_GNOME_Evolution_Component_UnknownType, NULL);
- } else if (!strcmp (item_type_name, "contact")) {
- eab_show_contact_editor (book, contact, TRUE, TRUE);
- } else if (!strcmp (item_type_name, "contact_list")) {
- eab_show_contact_list_editor (book, contact, TRUE, TRUE);
- } else {
- CORBA_exception_set (ev, CORBA_USER_EXCEPTION, ex_GNOME_Evolution_Component_UnknownType, NULL);
- }
-
- g_object_unref (book);
- g_object_unref (contact);
- g_free (uri);
-}
-
-
-/* GObject methods. */
-
-static void
-impl_dispose (GObject *object)
-{
- AddressbookComponentPrivate *priv = ADDRESSBOOK_COMPONENT (object)->priv;
-
- if (priv->source_selector != NULL) {
- g_object_unref (priv->source_selector);
- priv->source_selector = NULL;
- }
-
- if (priv->source_list != NULL) {
- g_object_unref (priv->source_list);
- priv->source_list = NULL;
- }
-
- if (priv->gconf_client != NULL) {
- g_object_unref (priv->gconf_client);
- priv->gconf_client = NULL;
- }
-
- if (priv->activity_handler != NULL) {
- g_object_unref (priv->activity_handler);
- priv->activity_handler = NULL;
- }
-
- (* G_OBJECT_CLASS (parent_class)->dispose) (object);
-}
-
-static void
-impl_finalize (GObject *object)
-{
- AddressbookComponentPrivate *priv = ADDRESSBOOK_COMPONENT (object)->priv;
-
- g_free (priv);
-
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
-}
-
-
-/* Initialization. */
-
-static void
-addressbook_component_class_init (AddressbookComponentClass *class)
-{
- POA_GNOME_Evolution_Component__epv *epv = &class->epv;
- GObjectClass *object_class = G_OBJECT_CLASS (class);
-
- epv->createControls = impl_createControls;
- epv->_get_userCreatableItems = impl__get_userCreatableItems;
- epv->requestCreateItem = impl_requestCreateItem;
-
- object_class->dispose = impl_dispose;
- object_class->finalize = impl_finalize;
-
- parent_class = g_type_class_peek_parent (class);
-}
-
-static void
-addressbook_component_init (AddressbookComponent *component)
-{
- AddressbookComponentPrivate *priv;
- GSList *groups;
-
- priv = g_new0 (AddressbookComponentPrivate, 1);
-
- /* EPFIXME: Should use a custom one instead? Also we should add
- addressbook_component_peek_gconf_client(). */
- priv->gconf_client = gconf_client_get_default ();
-
- priv->source_list = e_source_list_new_for_gconf (priv->gconf_client,
- "/apps/evolution/addressbook/sources");
-
- priv->activity_handler = e_activity_handler_new ();
-
- /* Create default addressbooks if there are no groups */
- groups = e_source_list_peek_groups (priv->source_list);
- if (!groups) {
- ESourceGroup *group;
- ESource *source;
- char *base_uri, *base_uri_proto, *new_dir;
-
- /* create the local source group */
- base_uri = g_build_filename (g_get_home_dir (),
- "/.evolution/addressbook/local/OnThisComputer/",
- NULL);
-
- base_uri_proto = g_strconcat ("file://", base_uri, NULL);
-
- group = e_source_group_new (_("On This Computer"), base_uri_proto);
- e_source_list_add_group (priv->source_list, group, -1);
-
- g_free (base_uri_proto);
-
- /* FIXME: Migrate addressbooks from older setup? */
-
- /* Create default addressbooks */
- new_dir = g_build_filename (base_uri, "Personal/", NULL);
- if (!e_mkdir_hier (new_dir, 0700)) {
- source = e_source_new (_("Personal"), "Personal");
- e_source_group_add_source (group, source, -1);
- }
- g_free (new_dir);
-
- new_dir = g_build_filename (base_uri, "Work/", NULL);
- if (!e_mkdir_hier (new_dir, 0700)) {
- source = e_source_new (_("Work"), "Work");
- e_source_group_add_source (group, source, -1);
- }
- g_free (new_dir);
-
- g_free (base_uri);
-
- /* Create the LDAP source group */
- group = e_source_group_new (_("On LDAP Servers"), "ldap://");
- e_source_list_add_group (priv->source_list, group, -1);
- }
-
- component->priv = priv;
-}
-
-
-/* Public API. */
-
-AddressbookComponent *
-addressbook_component_peek (void)
-{
- static AddressbookComponent *component = NULL;
-
- if (component == NULL)
- component = g_object_new (addressbook_component_get_type (), NULL);
-
- return component;
-}
-
-
-EActivityHandler *
-addressbook_component_peek_activity_handler (AddressbookComponent *component)
-{
- g_return_val_if_fail (ADDRESSBOOK_IS_COMPONENT (component), NULL);
-
- return component->priv->activity_handler;
-}
-
-
-BONOBO_TYPE_FUNC_FULL (AddressbookComponent, GNOME_Evolution_Component, PARENT_TYPE, addressbook_component)
diff --git a/addressbook/gui/component/addressbook-component.h b/addressbook/gui/component/addressbook-component.h
deleted file mode 100644
index f08f54aaaf..0000000000
--- a/addressbook/gui/component/addressbook-component.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* addressbook-component.h
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 _ADDRESSBOOK_COMPONENT_H_
-#define _ADDRESSBOOK_COMPONENT_H_
-
-#include <bonobo/bonobo-object.h>
-
-#include "Evolution.h"
-#include "e-activity-handler.h"
-
-#define ADDRESSBOOK_TYPE_COMPONENT (addressbook_component_get_type ())
-#define ADDRESSBOOK_COMPONENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ADDRESSBOOK_TYPE_COMPONENT, AddressbookComponent))
-#define ADDRESSBOOK_COMPONENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ADDRESSBOOK_TYPE_COMPONENT, AddressbookComponentClass))
-#define ADDRESSBOOK_IS_COMPONENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ADDRESSBOOK_TYPE_COMPONENT))
-#define ADDRESSBOOK_IS_COMPONENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), ADDRESSBOOK_TYPE_COMPONENT))
-
-
-typedef struct _AddressbookComponent AddressbookComponent;
-typedef struct _AddressbookComponentPrivate AddressbookComponentPrivate;
-typedef struct _AddressbookComponentClass AddressbookComponentClass;
-
-struct _AddressbookComponent {
- BonoboObject parent;
-
- AddressbookComponentPrivate *priv;
-};
-
-struct _AddressbookComponentClass {
- BonoboObjectClass parent_class;
-
- POA_GNOME_Evolution_Component__epv epv;
-};
-
-
-GType addressbook_component_get_type (void);
-
-AddressbookComponent *addressbook_component_peek (void);
-
-EActivityHandler *addressbook_component_peek_activity_handler (AddressbookComponent *component);
-
-
-#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 371539562a..0000000000
--- a/addressbook/gui/component/addressbook-config.c
+++ /dev/null
@@ -1,1439 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Chris Toshok <toshok@ximian.com>
- * Chris Lahey <clahey@ximian.com>
- **/
-
-/*#define STANDALONE*/
-
-#include <config.h>
-
-#include <string.h>
-#include <stdlib.h>
-#include <sys/time.h>
-
-#include <gtk/gtkcombo.h>
-#include <gtk/gtkdialog.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtkmessagedialog.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-druid.h>
-#include <libgnomeui/gnome-druid-page.h>
-
-#include <bonobo/bonobo-generic-factory.h>
-
-#include <glade/glade.h>
-
-#include "addressbook.h"
-#include "addressbook-component.h"
-#include "addressbook-config.h"
-
-#include "evolution-config-control.h"
-
-#include <gal/e-table/e-table-memory-store.h>
-#include <gal/e-table/e-table-scrolled.h>
-
-
-#ifdef HAVE_LDAP
-#include "ldap.h"
-#include "ldap_schema.h"
-#endif
-
-#define LDAP_PORT_STRING "389"
-#define LDAPS_PORT_STRING "636"
-
-#define GLADE_FILE_NAME "ldap-config.glade"
-#define CONFIG_CONTROL_FACTORY_ID "OAFIID:GNOME_Evolution_Addressbook_ConfigControlFactory:" BASE_VERSION
-#define LDAP_CONFIG_CONTROL_ID "OAFIID:GNOME_Evolution_LDAPStorage_ConfigControl:" BASE_VERSION
-
-GtkWidget* supported_bases_create_table (char *name, char *string1, char *string2,
- int num1, int num2);
-
-/* default objectclasses */
-#define TOP "top"
-#define PERSON "person"
-#define ORGANIZATIONALPERSON "organizationalPerson"
-#define INETORGPERSON "inetOrgPerson"
-#define EVOLUTIONPERSON "evolutionPerson"
-#define CALENTRY "calEntry"
-
-
-typedef struct {
- GtkWidget *notebook;
- int page_num;
-} FocusHelpClosure;
-
-static void
-focus_help (GtkWidget *w, GdkEventFocus *event, FocusHelpClosure *closure)
-{
- gtk_notebook_set_current_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;
-
- g_signal_connect_data (G_OBJECT (widget),
- "focus_in_event" /* XXX */,
- G_CALLBACK (focus_help),
- focus_closure,
- (GClosureNotify) g_free,
- (GConnectFlags)0);
-}
-
-typedef struct _AddressbookSourceDialog AddressbookSourceDialog;
-typedef void (*ModifyFunc)(GtkWidget *item, AddressbookSourceDialog *dialog);
-
-struct _AddressbookSourceDialog {
- GladeXML *gui;
-
- GtkWidget *window;
- GtkWidget *druid; /* only used (obviously) in the druid */
-
- /* Source selection (druid only) */
- ESourceList *source_list;
- GtkWidget *group_optionmenu;
-
- /* ESource we're currently editing (editor only) */
- ESource *source;
-
- /* Source group we're creating/editing a source in */
- ESourceGroup *source_group;
-
- /* info page fields */
- ModifyFunc general_modify_func;
- GtkWidget *host;
- GtkWidget *auth_optionmenu;
- AddressbookLDAPAuthType auth;
- GtkWidget *auth_label_notebook;
- GtkWidget *auth_entry_notebook;
- GtkWidget *email;
- GtkWidget *binddn;
-
- /* connecting page fields */
- ModifyFunc connecting_modify_func;
- GtkWidget *port_combo;
- GtkWidget *ssl_optionmenu;
- AddressbookLDAPSSLType ssl;
-
- /* searching page fields */
- ModifyFunc searching_modify_func;
- GtkWidget *rootdn;
- AddressbookLDAPScopeType scope;
- GtkWidget *scope_optionmenu;
- GtkWidget *timeout_scale;
- GtkWidget *limit_spinbutton;
-
- /* display name page fields */
- GtkWidget *display_name;
- gboolean display_name_changed; /* only used in the druid */
-
- gboolean schema_query_successful;
-
- /* stuff for the account editor window */
- GtkWidget *ok_button;
- GtkWidget *cancel_button;
- GtkWidget *advanced_button_notebook;
- GtkWidget *notebook; /* the toplevel notebook */
-
- gboolean advanced;
-};
-
-
-
-#ifdef HAVE_LDAP
-
-static char *
-ldap_unparse_auth (AddressbookLDAPAuthType auth_type)
-{
- switch (auth_type) {
- case ADDRESSBOOK_LDAP_AUTH_NONE:
- return "none";
- case ADDRESSBOOK_LDAP_AUTH_SIMPLE_EMAIL:
- return "ldap/simple-email";
- case ADDRESSBOOK_LDAP_AUTH_SIMPLE_BINDDN:
- return "ldap/simple-binddn";
- default:
- g_assert(0);
- return "none";
- }
-}
-
-static AddressbookLDAPAuthType
-ldap_parse_auth (const char *auth)
-{
- if (!auth)
- return ADDRESSBOOK_LDAP_AUTH_NONE;
-
- if (!strcmp (auth, "ldap/simple-email") || !strcmp (auth, "simple"))
- return ADDRESSBOOK_LDAP_AUTH_SIMPLE_EMAIL;
- else if (!strcmp (auth, "ldap/simple-binddn"))
- return ADDRESSBOOK_LDAP_AUTH_SIMPLE_BINDDN;
- 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 char *
-ldap_unparse_ssl (AddressbookLDAPSSLType ssl_type)
-{
- switch (ssl_type) {
- case ADDRESSBOOK_LDAP_SSL_NEVER:
- return "never";
- case ADDRESSBOOK_LDAP_SSL_WHENEVER_POSSIBLE:
- return "whenever_possible";
- case ADDRESSBOOK_LDAP_SSL_ALWAYS:
- return "always";
- default:
- g_assert(0);
- return "";
- }
-}
-
-static AddressbookLDAPSSLType
-ldap_parse_ssl (const char *ssl)
-{
- if (!ssl)
- return ADDRESSBOOK_LDAP_SSL_WHENEVER_POSSIBLE; /* XXX good default? */
-
- if (!strcmp (ssl, "always"))
- return ADDRESSBOOK_LDAP_SSL_ALWAYS;
- else if (!strcmp (ssl, "never"))
- return ADDRESSBOOK_LDAP_SSL_NEVER;
- else
- return ADDRESSBOOK_LDAP_SSL_WHENEVER_POSSIBLE;
-}
-
-#endif
-
-
-
-static gboolean
-create_source_dir (AddressbookSourceDialog *dialog, ESource *source)
-{
- gchar *new_dir;
- gint result;
-
- new_dir = g_build_filename (e_source_group_peek_base_uri (dialog->source_group),
- e_source_peek_name (source), NULL);
- g_print ("Making %s\n", new_dir);
- result = e_mkdir_hier (new_dir + sizeof ("file://") - 1, 0700);
- g_free (new_dir);
-
- if (result) {
- e_notice (NULL /* FIXME: parent */, GTK_MESSAGE_ERROR,
- _("Could not create a directory for the new addressbook."));
- return FALSE;
- }
-
- return TRUE;
-}
-
-static void
-dialog_to_source (AddressbookSourceDialog *dialog, ESource *source, gboolean temporary)
-{
- gchar *str;
-
- g_assert (source);
-
- e_source_set_name (source, gtk_entry_get_text (GTK_ENTRY (dialog->display_name)));
-
- if (!strcmp ("ldap://", e_source_group_peek_base_uri (dialog->source_group))) {
-#ifdef HAVE_LDAP
- e_source_set_property (source, "email_addr", gtk_entry_get_text (GTK_ENTRY (dialog->email)));
- e_source_set_property (source, "binddn", gtk_entry_get_text (GTK_ENTRY (dialog->binddn)));
- e_source_set_property (source, "limit", gtk_entry_get_text (GTK_ENTRY (dialog->limit_spinbutton)));
- e_source_set_property (source, "ssl", ldap_unparse_ssl (dialog->ssl));
- e_source_set_property (source, "auth", ldap_unparse_auth (dialog->auth));
-
- str = g_strdup_printf ("%s:%s/%s?" /* trigraph prevention */ "?%s",
- gtk_entry_get_text (GTK_ENTRY (dialog->host)),
- gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (dialog->port_combo)->entry)),
- gtk_entry_get_text (GTK_ENTRY (dialog->rootdn)),
- ldap_unparse_scope (dialog->scope));
- e_source_set_relative_uri (source, str);
- g_free (str);
-#endif
- } else {
- const gchar *relative_uri;
-
- relative_uri = e_source_peek_relative_uri (source);
- if (!relative_uri || !strlen (relative_uri)) {
- e_source_set_relative_uri (source, e_source_peek_name (source));
-
- if (!temporary && !create_source_dir (dialog, source))
- return;
- }
- }
-
- if (!temporary && !e_source_peek_group (source))
- e_source_group_add_source (dialog->source_group, source, -1);
-}
-
-static ESource *
-dialog_to_temp_source (AddressbookSourceDialog *dialog)
-{
- ESource *source;
-
- source = e_source_new ("", "");
- dialog_to_source (dialog, source, TRUE);
-
- return source;
-}
-
-#ifdef HAVE_LDAP
-static gboolean
-source_to_uri_parts (ESource *source, gchar **host, gchar **rootdn,
- AddressbookLDAPScopeType *scope, gint *port)
-{
- gchar *uri;
- LDAPURLDesc *lud;
- gint ldap_error;
-
- g_assert (source);
-
- uri = e_source_get_uri (source);
- ldap_error = ldap_url_parse ((gchar *) uri, &lud);
- g_free (uri);
-
- if (ldap_error != LDAP_SUCCESS)
- return FALSE;
-
- if (host)
- *host = g_strdup (lud->lud_host ? lud->lud_host : "");
- if (rootdn)
- *rootdn = g_strdup (lud->lud_dn ? lud->lud_dn : "");
- if (port)
- *port = lud->lud_port ? lud->lud_port : LDAP_PORT;
- if (scope)
- *scope = lud->lud_scope == LDAP_SCOPE_BASE ? ADDRESSBOOK_LDAP_SCOPE_BASE :
- lud->lud_scope == LDAP_SCOPE_ONELEVEL ? ADDRESSBOOK_LDAP_SCOPE_ONELEVEL :
- lud->lud_scope == LDAP_SCOPE_SUBTREE ? ADDRESSBOOK_LDAP_SCOPE_SUBTREE :
- ADDRESSBOOK_LDAP_SCOPE_ONELEVEL;
-
- ldap_free_urldesc (lud);
- return TRUE;
-}
-#endif
-
-#define SOURCE_PROP_STRING(source, prop) \
- (source && e_source_get_property (source, prop) ? e_source_get_property (source, prop) : "")
-
-static void
-source_to_dialog (AddressbookSourceDialog *dialog)
-{
- ESource *source = dialog->source;
-
- gtk_entry_set_text (GTK_ENTRY (dialog->display_name), source ? e_source_peek_name (source) : "");
-
-#ifdef HAVE_LDAP
- gtk_entry_set_text (GTK_ENTRY (dialog->email), SOURCE_PROP_STRING (source, "email_addr"));
- gtk_entry_set_text (GTK_ENTRY (dialog->binddn), SOURCE_PROP_STRING (source, "binddn"));
- gtk_entry_set_text (GTK_ENTRY (dialog->limit_spinbutton),
- source && e_source_get_property (source, "limit") ?
- e_source_get_property (source, "limit") : "100");
-
- dialog->auth = source && e_source_get_property (source, "auth") ?
- ldap_parse_auth (e_source_get_property (source, "auth")) : ADDRESSBOOK_LDAP_AUTH_NONE;
- dialog->ssl = source && e_source_get_property (source, "ssl") ?
- ldap_parse_ssl (e_source_get_property (source, "ssl")) : ADDRESSBOOK_LDAP_SSL_WHENEVER_POSSIBLE;
-
- if (source && !strcmp ("ldap://", e_source_group_peek_base_uri (dialog->source_group))) {
- gchar *host;
- gchar *rootdn;
- AddressbookLDAPScopeType scope;
- gint port;
-
- if (source_to_uri_parts (source, &host, &rootdn, &scope, &port)) {
- gchar *port_str;
-
- gtk_entry_set_text (GTK_ENTRY (dialog->host), host);
- gtk_entry_set_text (GTK_ENTRY (dialog->rootdn), rootdn);
-
- dialog->scope = scope;
-
- port_str = g_strdup_printf ("%d", port);
- gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (dialog->port_combo)->entry), port_str);
- g_free (port_str);
-
- g_free (host);
- g_free (rootdn);
- }
- }
-
- gtk_option_menu_set_history (GTK_OPTION_MENU(dialog->auth_optionmenu), dialog->auth);
- if (dialog->auth != ADDRESSBOOK_LDAP_AUTH_NONE) {
- gtk_notebook_set_current_page (GTK_NOTEBOOK(dialog->auth_label_notebook), dialog->auth - 1);
- gtk_notebook_set_current_page (GTK_NOTEBOOK(dialog->auth_entry_notebook), dialog->auth - 1);
- }
- gtk_widget_set_sensitive (dialog->auth_label_notebook, dialog->auth != ADDRESSBOOK_LDAP_AUTH_NONE);
- gtk_widget_set_sensitive (dialog->auth_entry_notebook, dialog->auth != ADDRESSBOOK_LDAP_AUTH_NONE);
-
- gtk_option_menu_set_history (GTK_OPTION_MENU(dialog->scope_optionmenu), dialog->scope);
- gtk_option_menu_set_history (GTK_OPTION_MENU(dialog->ssl_optionmenu), dialog->ssl);
-#endif
-}
-
-#ifdef HAVE_LDAP
-
-/* ldap api foo */
-static LDAP *
-addressbook_ldap_init (GtkWidget *window, ESource *source)
-{
- LDAP *ldap;
- gchar *host;
- gint port;
-
- if (!source_to_uri_parts (source, &host, NULL, NULL, &port))
- return NULL;
-
- ldap = ldap_init (host, port);
- if (!ldap) {
- GtkWidget *dialog;
- dialog = gtk_message_dialog_new (GTK_WINDOW(window),
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- _("Failed to connect to LDAP server"));
- g_signal_connect (dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL);
- gtk_widget_show (dialog);
- }
-
- /* XXX do TLS if it's configured in */
-
- g_free (host);
- return ldap;
-}
-
-static gint
-addressbook_ldap_auth (GtkWidget *window, LDAP *ldap)
-{
- gint ldap_error;
-
- /* XXX use auth info from source */
- ldap_error = ldap_simple_bind_s (ldap, NULL, NULL);
- if (LDAP_SUCCESS != ldap_error) {
- GtkWidget *dialog;
- dialog = gtk_message_dialog_new (GTK_WINDOW (window),
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- _("Failed to authenticate with LDAP server"));
- g_signal_connect (dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL);
- gtk_widget_show (dialog);
- }
-
- return ldap_error;
-}
-
-static int
-addressbook_root_dse_query (GtkWindow *window, LDAP *ldap, char **attrs, LDAPMessage **resp)
-{
- int ldap_error;
- struct timeval timeout;
-
- /* 3 second timeout */
- timeout.tv_sec = 3;
- timeout.tv_usec = 0;
-
- ldap_error = ldap_search_ext_s (ldap,
- LDAP_ROOT_DSE, LDAP_SCOPE_BASE,
- "(objectclass=*)",
- attrs, 0, NULL, NULL, &timeout, LDAP_NO_LIMIT, resp);
- if (LDAP_SUCCESS != ldap_error) {
- GtkWidget *dialog;
- dialog = gtk_message_dialog_new (window,
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- _("Could not perform query on Root DSE"));
- g_signal_connect (dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL);
- gtk_widget_show (dialog);
- }
-
- return ldap_error;
-}
-
-#endif
-
-static void
-addressbook_source_dialog_destroy (gpointer data, GObject *where_object_was)
-{
- AddressbookSourceDialog *dialog = data;
-
- g_object_unref (dialog->gui);
- g_free (dialog);
-}
-
-static void
-addressbook_add_server_druid_cancel (GtkWidget *widget, AddressbookSourceDialog *dialog)
-{
- gtk_widget_destroy (dialog->window);
-}
-
-static void
-addressbook_add_server_druid_finish (GnomeDruidPage *druid_page, GtkWidget *gnome_druid, AddressbookSourceDialog *sdialog)
-{
- sdialog->source = e_source_new ("", "");
- dialog_to_source (sdialog, sdialog->source, FALSE);
-
- /* tear down the widgets */
- gtk_widget_destroy (sdialog->window);
-}
-
-static void
-reparent_to_vbox (AddressbookSourceDialog *dialog, char *vbox_name, char *widget_name)
-{
- GtkWidget *vbox, *widget;
-
- vbox = glade_xml_get_widget (dialog->gui, vbox_name);
- widget = glade_xml_get_widget (dialog->gui, widget_name);
-
- gtk_widget_reparent (widget, vbox);
- gtk_box_set_child_packing (GTK_BOX (vbox), widget, TRUE, TRUE, 0, GTK_PACK_START);
-}
-
-static void
-auth_optionmenu_activated (GtkWidget *item, AddressbookSourceDialog *dialog)
-{
- dialog->auth = g_list_index (gtk_container_get_children (GTK_CONTAINER (item->parent)),
- item);
-
- dialog->general_modify_func (item, dialog);
-
- if (dialog->auth == 0) {
- gtk_widget_set_sensitive (dialog->auth_label_notebook, FALSE);
- gtk_widget_set_sensitive (dialog->auth_entry_notebook, FALSE);
- }
- else {
- gtk_widget_set_sensitive (dialog->auth_label_notebook, TRUE);
- gtk_widget_set_sensitive (dialog->auth_entry_notebook, TRUE);
- gtk_notebook_set_current_page (GTK_NOTEBOOK(dialog->auth_label_notebook), dialog->auth - 1);
- gtk_notebook_set_current_page (GTK_NOTEBOOK(dialog->auth_entry_notebook), dialog->auth - 1);
- }
-}
-
-static void
-add_auth_activate_cb (GtkWidget *item, AddressbookSourceDialog *dialog)
-{
- g_signal_connect (item, "activate",
- G_CALLBACK (auth_optionmenu_activated), dialog);
-}
-
-static void
-setup_general_tab (AddressbookSourceDialog *dialog, ModifyFunc modify_func)
-{
- GtkWidget *general_tab_help;
- GtkWidget *menu;
-
- general_tab_help = glade_xml_get_widget (dialog->gui, "general-tab-help");
-
- dialog->general_modify_func = modify_func;
- dialog->host = glade_xml_get_widget (dialog->gui, "server-name-entry");
- g_signal_connect (dialog->host, "changed",
- G_CALLBACK (modify_func), dialog);
- add_focus_handler (dialog->host, general_tab_help, 0);
-
- dialog->auth_label_notebook = glade_xml_get_widget (dialog->gui, "auth-label-notebook");
- dialog->auth_entry_notebook = glade_xml_get_widget (dialog->gui, "auth-entry-notebook");
- dialog->email = glade_xml_get_widget (dialog->gui, "email-entry");
- g_signal_connect (dialog->email, "changed",
- G_CALLBACK (modify_func), dialog);
- add_focus_handler (dialog->email, general_tab_help, 1);
- dialog->binddn = glade_xml_get_widget (dialog->gui, "dn-entry");
- g_signal_connect (dialog->binddn, "changed",
- G_CALLBACK (modify_func), dialog);
- add_focus_handler (dialog->binddn, general_tab_help, 2);
-
- dialog->auth_optionmenu = glade_xml_get_widget (dialog->gui, "auth-optionmenu");
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU(dialog->auth_optionmenu));
- gtk_container_foreach (GTK_CONTAINER (menu), (GtkCallback)add_auth_activate_cb, dialog);
- add_focus_handler (dialog->auth_optionmenu, general_tab_help, 3);
-}
-
-static gboolean
-general_tab_check (AddressbookSourceDialog *dialog)
-{
- gboolean valid = TRUE;
- const char *string;
-
- if (strcmp ("ldap://", e_source_group_peek_base_uri (dialog->source_group)))
- return TRUE;
-
- string = gtk_entry_get_text (GTK_ENTRY (dialog->host));
- if (!string || !string[0])
- valid = FALSE;
-
- if (valid) {
- if (dialog->auth != ADDRESSBOOK_LDAP_AUTH_NONE) {
- if (dialog->auth == ADDRESSBOOK_LDAP_AUTH_SIMPLE_BINDDN)
- string = gtk_entry_get_text (GTK_ENTRY (dialog->binddn));
- else
- string = gtk_entry_get_text (GTK_ENTRY (dialog->email));
-
- if (!string || !string[0])
- valid = FALSE;
- }
- }
-
- return valid;
-}
-
-static void
-druid_info_page_modify_cb (GtkWidget *item, AddressbookSourceDialog *dialog)
-{
- gnome_druid_set_buttons_sensitive (GNOME_DRUID(dialog->druid),
- TRUE, /* back */
- general_tab_check (dialog), /* next */
- TRUE, /* cancel */
- FALSE /* help */);
-}
-
-static void
-druid_info_page_prepare (GnomeDruidPage *dpage, GtkWidget *gdruid, AddressbookSourceDialog *dialog)
-{
- druid_info_page_modify_cb (NULL, dialog);
- /* stick the focus in the hostname field */
- gtk_widget_grab_focus (dialog->host);
-}
-
-
-/* connecting page */
-static void
-ssl_optionmenu_activated (GtkWidget *item, AddressbookSourceDialog *dialog)
-{
- dialog->ssl = g_list_index (gtk_container_get_children (GTK_CONTAINER (item->parent)),
- item);
-
- dialog->connecting_modify_func (item, dialog);
-}
-
-static void
-ssl_optionmenu_selected (GtkWidget *item, AddressbookSourceDialog *dialog)
-{
- GtkWidget *connecting_tab_help;
- int ssl_type = g_list_index (gtk_container_get_children (GTK_CONTAINER (item->parent)),
- item);
-
- connecting_tab_help = glade_xml_get_widget (dialog->gui, "connecting-tab-help");
-
- gtk_notebook_set_current_page (GTK_NOTEBOOK(connecting_tab_help), ssl_type + 1);
-}
-
-static void
-add_ssl_activate_cb (GtkWidget *item, AddressbookSourceDialog *dialog)
-{
- g_signal_connect (item, "activate",
- G_CALLBACK (ssl_optionmenu_activated), dialog);
- g_signal_connect (item, "select",
- G_CALLBACK (ssl_optionmenu_selected), dialog);
-}
-
-static void
-port_changed_func (GtkWidget *item, AddressbookSourceDialog *dialog)
-{
- /* if the port value is ldaps, set the SSL/TLS option menu to
- Always and desensitize it */
- const char *string = gtk_entry_get_text (GTK_ENTRY (item));
-
- dialog->connecting_modify_func (item, dialog);
-
- if (!strcmp (string, LDAPS_PORT_STRING)) {
- dialog->ssl = ADDRESSBOOK_LDAP_SSL_ALWAYS;
- gtk_option_menu_set_history (GTK_OPTION_MENU(dialog->ssl_optionmenu),
- dialog->ssl);
-
- gtk_widget_set_sensitive (dialog->ssl_optionmenu, FALSE);
- }
- else {
- gtk_widget_set_sensitive (dialog->ssl_optionmenu, TRUE);
- }
-
-}
-
-static void
-setup_connecting_tab (AddressbookSourceDialog *dialog, ModifyFunc modify_func)
-{
- GtkWidget *menu;
- GtkWidget *connecting_tab_help;
-
- dialog->connecting_modify_func = modify_func;
-
- connecting_tab_help = glade_xml_get_widget (dialog->gui, "connecting-tab-help");
-
- dialog->port_combo = glade_xml_get_widget (dialog->gui, "port-combo");
- add_focus_handler (dialog->port_combo, connecting_tab_help, 0);
- add_focus_handler (GTK_COMBO(dialog->port_combo)->entry, connecting_tab_help, 0);
- g_signal_connect (GTK_COMBO(dialog->port_combo)->entry, "changed",
- G_CALLBACK (modify_func), dialog);
- g_signal_connect (GTK_COMBO(dialog->port_combo)->entry, "changed",
- G_CALLBACK (port_changed_func), dialog);
- dialog->ssl_optionmenu = glade_xml_get_widget (dialog->gui, "ssl-optionmenu");
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU(dialog->ssl_optionmenu));
- gtk_container_foreach (GTK_CONTAINER (menu), (GtkCallback)add_ssl_activate_cb, dialog);
-}
-
-static gboolean
-connecting_tab_check (AddressbookSourceDialog *dialog)
-{
- gboolean valid = TRUE;
- const char *string;
-
- string = gtk_entry_get_text (GTK_ENTRY (GTK_COMBO(dialog->port_combo)->entry));
- if (!string || !string[0])
- valid = FALSE;
-
- return valid;
-}
-
-static void
-druid_connecting_page_modify_cb (GtkWidget *item, AddressbookSourceDialog *dialog)
-{
- gnome_druid_set_buttons_sensitive (GNOME_DRUID(dialog->druid),
- TRUE, /* back */
- connecting_tab_check (dialog), /* next */
- TRUE, /* cancel */
- FALSE /* help */);
-}
-
-static void
-druid_connecting_page_prepare (GnomeDruidPage *dpage, GtkWidget *gdruid, AddressbookSourceDialog *dialog)
-{
- druid_connecting_page_modify_cb (NULL, dialog);
- /* stick the focus in the port combo */
- gtk_widget_grab_focus (GTK_COMBO(dialog->port_combo)->entry);
-}
-
-
-
-#ifdef HAVE_LDAP
-
-/* searching page */
-static ETableMemoryStoreColumnInfo bases_table_columns[] = {
- E_TABLE_MEMORY_STORE_STRING,
- E_TABLE_MEMORY_STORE_TERMINATOR
-};
-
-#define BASES_TABLE_SPEC \
-"<ETableSpecification cursor-mode=\"line\" no-headers=\"true\"> \
- <ETableColumn model_col= \"0\" _title=\"Base\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableState> \
- <column source=\"0\"/> \
- <grouping></grouping> \
- </ETableState> \
-</ETableSpecification>"
-
-GtkWidget*
-supported_bases_create_table (char *name, char *string1, char *string2, int num1, int num2)
-{
- GtkWidget *table;
- ETableModel *model;
-
- model = e_table_memory_store_new (bases_table_columns);
-
- table = e_table_scrolled_new (model, NULL, BASES_TABLE_SPEC, NULL);
-
- g_object_set_data (G_OBJECT (table), "model", model);
-
- return table;
-}
-
-static gboolean
-do_ldap_root_dse_query (GtkWidget *dialog, ETableModel *model, ESource *source, char ***rvalues)
-{
- LDAP *ldap;
- char *attrs[2];
- int ldap_error;
- char **values;
- LDAPMessage *resp;
- int i;
-
- ldap = addressbook_ldap_init (dialog, source);
- if (!ldap)
- return FALSE;
-
- if (LDAP_SUCCESS != addressbook_ldap_auth (dialog, ldap))
- goto fail;
-
- attrs[0] = "namingContexts";
- attrs[1] = NULL;
-
- ldap_error = addressbook_root_dse_query (GTK_WINDOW (dialog), ldap, attrs, &resp);
-
- if (ldap_error != LDAP_SUCCESS)
- goto fail;
-
- values = ldap_get_values (ldap, resp, "namingContexts");
- if (!values || values[0] == NULL) {
- GtkWidget *error_dialog;
- error_dialog = gtk_message_dialog_new (GTK_WINDOW (dialog),
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- _("The server responded with no supported search bases"));
- g_signal_connect (error_dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL);
- gtk_widget_show (error_dialog);
- goto fail;
- }
-
- for (i = 0; values[i]; i++)
- e_table_memory_store_insert (E_TABLE_MEMORY_STORE (model),
- -1, GINT_TO_POINTER(i), values[i]);
-
- *rvalues = values;
-
- ldap_unbind_s (ldap);
- return TRUE;
-
- fail:
- ldap_unbind_s (ldap);
- return FALSE;
-}
-
-static void
-search_base_selection_model_changed (ESelectionModel *selection_model, GtkWidget *dialog)
-{
- gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog),
- GTK_RESPONSE_OK,
- e_selection_model_selected_count (selection_model) == 1);
-}
-
-static void
-query_for_supported_bases (GtkWidget *button, AddressbookSourceDialog *sdialog)
-{
- ESelectionModel *selection_model;
- ESource *source;
- GtkWidget *dialog;
- GtkWidget *supported_bases_table;
- ETableModel *model;
- int id;
- char **values;
-
- source = dialog_to_temp_source (sdialog);
-
- dialog = glade_xml_get_widget (sdialog->gui, "supported-bases-dialog");
-
- supported_bases_table = glade_xml_get_widget (sdialog->gui, "supported-bases-table");
- gtk_widget_show (supported_bases_table);
- selection_model = e_table_get_selection_model (e_table_scrolled_get_table (E_TABLE_SCROLLED(supported_bases_table)));
- model = g_object_get_data (G_OBJECT (supported_bases_table), "model");
-
- g_signal_connect (selection_model, "selection_changed",
- G_CALLBACK (search_base_selection_model_changed), dialog);
-
- search_base_selection_model_changed (selection_model, dialog);
-
- if (do_ldap_root_dse_query (dialog, model, source, &values)) {
- id = gtk_dialog_run (GTK_DIALOG (dialog));
-
- gtk_widget_hide (dialog);
-
- if (id == GTK_RESPONSE_OK) {
- int i;
- /* OK was clicked */
-
- /* ugh. */
- for (i = 0; values[i]; i ++) {
- if (e_selection_model_is_row_selected (selection_model, i)) {
- gtk_entry_set_text (GTK_ENTRY (sdialog->rootdn), values[i]);
- break; /* single selection, so we can quit when we've found it. */
- }
- }
- }
-
- ldap_value_free (values);
-
- e_table_memory_store_clear (E_TABLE_MEMORY_STORE (model));
- }
-
- g_object_unref (source);
-}
-
-static void
-scope_optionmenu_activated (GtkWidget *item, AddressbookSourceDialog *dialog)
-{
- dialog->scope = g_list_index (gtk_container_get_children (GTK_CONTAINER (item->parent)),
- item);
-
- if (dialog->searching_modify_func)
- dialog->searching_modify_func (item, dialog);
-}
-
-static void
-add_scope_activate_cb (GtkWidget *item, AddressbookSourceDialog *dialog)
-{
- g_signal_connect (item, "activate",
- G_CALLBACK (scope_optionmenu_activated), dialog);
-}
-
-static void
-setup_searching_tab (AddressbookSourceDialog *dialog, ModifyFunc modify_func)
-{
- GtkWidget *menu;
- GtkWidget *rootdn_button;
- GtkWidget *searching_tab_help;
-
- dialog->searching_modify_func = modify_func;
-
- searching_tab_help = glade_xml_get_widget (dialog->gui, "searching-tab-help");
-
- dialog->rootdn = glade_xml_get_widget (dialog->gui, "rootdn-entry");
- add_focus_handler (dialog->rootdn, searching_tab_help, 0);
- if (modify_func)
- g_signal_connect (dialog->rootdn, "changed",
- G_CALLBACK (modify_func), dialog);
-
- dialog->scope_optionmenu = glade_xml_get_widget (dialog->gui, "scope-optionmenu");
- add_focus_handler (dialog->scope_optionmenu, searching_tab_help, 1);
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU(dialog->scope_optionmenu));
- gtk_container_foreach (GTK_CONTAINER (menu), (GtkCallback)add_scope_activate_cb, dialog);
-
- dialog->timeout_scale = glade_xml_get_widget (dialog->gui, "timeout-scale");
- add_focus_handler (dialog->timeout_scale, searching_tab_help, 2);
- if (modify_func)
- g_signal_connect (GTK_RANGE(dialog->timeout_scale)->adjustment,
- "value_changed",
- G_CALLBACK (modify_func), dialog);
-
- dialog->limit_spinbutton = glade_xml_get_widget (dialog->gui, "download-limit-spinbutton");
- if (modify_func)
- g_signal_connect (dialog->limit_spinbutton, "changed",
- G_CALLBACK (modify_func), dialog);
-
- /* special handling for the "Show Supported Bases button" */
- rootdn_button = glade_xml_get_widget (dialog->gui, "rootdn-button");
- g_signal_connect (rootdn_button, "clicked",
- G_CALLBACK(query_for_supported_bases), dialog);
-}
-
-static void
-druid_searching_page_prepare (GnomeDruidPage *dpage, GtkWidget *gdruid, AddressbookSourceDialog *dialog)
-{
- gnome_druid_set_buttons_sensitive (GNOME_DRUID(dialog->druid),
- TRUE, /* back */
- TRUE, /* next */
- TRUE, /* cancel */
- FALSE /* help */);
-}
-
-#endif
-
-
-/* display name page */
-static gboolean
-display_name_check (AddressbookSourceDialog *dialog)
-{
- gboolean valid = TRUE;
- const char *string;
-
- string = gtk_entry_get_text (GTK_ENTRY (dialog->display_name));
- if (!string || !string[0])
- valid = FALSE;
-
- return valid;
-}
-
-static void
-folder_page_prepare (GtkWidget *page, GtkWidget *gnome_druid, AddressbookSourceDialog *dialog)
-{
- if (!dialog->display_name_changed) {
- const char *server_name = gtk_entry_get_text (GTK_ENTRY (dialog->host));
- gtk_entry_set_text (GTK_ENTRY (dialog->display_name), server_name);
- }
-
- gnome_druid_set_buttons_sensitive (GNOME_DRUID(dialog->druid),
- TRUE, /* back */
- display_name_check (dialog), /* next */
- TRUE, /* cancel */
- FALSE /* help */);
-}
-
-static void
-druid_folder_page_modify_cb (GtkWidget *item, AddressbookSourceDialog *dialog)
-{
- dialog->display_name_changed = TRUE;
- folder_page_prepare (NULL, NULL, dialog);
-}
-
-
-
-static void
-source_group_changed_cb (GtkWidget *widget, AddressbookSourceDialog *sdialog)
-{
- sdialog->source_group = g_slist_nth (e_source_list_peek_groups (sdialog->source_list),
- gtk_option_menu_get_history (GTK_OPTION_MENU (sdialog->group_optionmenu)))->data;
-}
-
-static void
-source_group_menu_add_groups (GtkMenuShell *menu_shell, ESourceList *source_list)
-{
- GSList *groups, *sl;
-
- groups = e_source_list_peek_groups (source_list);
- for (sl = groups; sl; sl = g_slist_next (sl)) {
- GtkWidget *menu_item;
- ESourceGroup *group = sl->data;
-
-#ifndef HAVE_LDAP
- /* If LDAP isn't configured, skip LDAP groups */
- if (!strcmp ("ldap://", e_source_group_peek_base_uri (group)))
- continue;
-#endif
-
- menu_item = gtk_menu_item_new_with_label (e_source_group_peek_name (group));
- gtk_widget_show (menu_item);
- gtk_menu_shell_append (menu_shell, menu_item);
- }
-}
-
-static gboolean
-folder_page_forward (GtkWidget *page, GtkWidget *widget, AddressbookSourceDialog *sdialog)
-{
- GtkWidget *finish_page = glade_xml_get_widget (sdialog->gui, "add-server-druid-finish-page");
-
- if (strcmp ("ldap://", e_source_group_peek_base_uri (sdialog->source_group))) {
- gnome_druid_set_page (GNOME_DRUID (sdialog->druid), GNOME_DRUID_PAGE (finish_page));
- return TRUE;
- }
-
- return FALSE;
-}
-
-static gboolean
-finish_page_back (GtkWidget *page, GtkWidget *widget, AddressbookSourceDialog *sdialog)
-{
- GtkWidget *folder_page = glade_xml_get_widget (sdialog->gui, "add-server-druid-folder-page");
-
- if (strcmp ("ldap://", e_source_group_peek_base_uri (sdialog->source_group))) {
- gnome_druid_set_page (GNOME_DRUID (sdialog->druid), GNOME_DRUID_PAGE (folder_page));
- return TRUE;
- }
-
- return FALSE;
-}
-
-static AddressbookSourceDialog *
-addressbook_add_server_druid (void)
-{
- AddressbookSourceDialog *sdialog = g_new0 (AddressbookSourceDialog, 1);
- GtkWidget *page;
- GConfClient *gconf_client;
-
- sdialog->gui = glade_xml_new (EVOLUTION_GLADEDIR "/" GLADE_FILE_NAME, NULL, NULL);
-
- sdialog->window = glade_xml_get_widget (sdialog->gui, "account-druid-window");
- sdialog->druid = glade_xml_get_widget (sdialog->gui, "account-druid");
-
- /* general page */
- page = glade_xml_get_widget (sdialog->gui, "add-server-druid-folder-page");
- sdialog->display_name = glade_xml_get_widget (sdialog->gui, "druid-display-name-entry");
- g_signal_connect (sdialog->display_name, "changed",
- G_CALLBACK (druid_folder_page_modify_cb), sdialog);
- g_signal_connect_after (page, "prepare",
- G_CALLBACK (folder_page_prepare), sdialog);
- g_signal_connect_after (page, "next",
- G_CALLBACK (folder_page_forward), sdialog);
-
- gconf_client = gconf_client_get_default ();
- sdialog->source_list = e_source_list_new_for_gconf (gconf_client, "/apps/evolution/addressbook/sources");
- sdialog->group_optionmenu = glade_xml_get_widget (sdialog->gui, "druid-group-option-menu");
- if (!GTK_IS_MENU (gtk_option_menu_get_menu (GTK_OPTION_MENU (sdialog->group_optionmenu)))) {
- GtkWidget *menu = gtk_menu_new ();
- gtk_option_menu_set_menu (GTK_OPTION_MENU (sdialog->group_optionmenu), menu);
- gtk_widget_show (menu);
- }
-
- /* NOTE: This assumes that we have sources. If they don't exist, they're set up
- * on startup of the Addressbook component. */
- source_group_menu_add_groups (GTK_MENU_SHELL (gtk_option_menu_get_menu (
- GTK_OPTION_MENU (sdialog->group_optionmenu))), sdialog->source_list);
- gtk_option_menu_set_history (GTK_OPTION_MENU (sdialog->group_optionmenu), 0);
- sdialog->source_group = e_source_list_peek_groups (sdialog->source_list)->data;
- g_signal_connect (sdialog->group_optionmenu, "changed",
- G_CALLBACK (source_group_changed_cb), sdialog);
-
-#ifdef HAVE_LDAP
-
- /* info page */
- page = glade_xml_get_widget (sdialog->gui, "add-server-druid-info-page");
- reparent_to_vbox (sdialog, "account-druid-general-vbox", "general-tab");
- setup_general_tab (sdialog, druid_info_page_modify_cb);
- g_signal_connect_after (page, "prepare",
- G_CALLBACK(druid_info_page_prepare), sdialog);
-
- /* connecting page */
- page = glade_xml_get_widget (sdialog->gui, "add-server-druid-connecting-page");
- reparent_to_vbox (sdialog, "account-druid-connecting-vbox", "connecting-tab");
- setup_connecting_tab (sdialog, druid_connecting_page_modify_cb);
- g_signal_connect_after (page, "prepare",
- G_CALLBACK(druid_connecting_page_prepare), sdialog);
-
- /* searching page */
- page = glade_xml_get_widget (sdialog->gui, "add-server-druid-searching-page");
- reparent_to_vbox (sdialog, "account-druid-searching-vbox", "searching-tab");
- setup_searching_tab (sdialog, NULL);
- g_signal_connect_after (page, "prepare",
- G_CALLBACK(druid_searching_page_prepare), sdialog);
-
-#endif
-
- /* finish page */
- page = glade_xml_get_widget (sdialog->gui, "add-server-druid-finish-page");
- g_signal_connect (page, "finish",
- G_CALLBACK(addressbook_add_server_druid_finish), sdialog);
- g_signal_connect_after (page, "back",
- G_CALLBACK (finish_page_back), sdialog);
- g_signal_connect (sdialog->druid, "cancel",
- G_CALLBACK(addressbook_add_server_druid_cancel), sdialog);
- g_object_weak_ref (G_OBJECT (sdialog->window),
- addressbook_source_dialog_destroy, sdialog);
-
- /* make sure we fill in the default values */
- source_to_dialog (sdialog);
-
- gtk_window_set_type_hint (GTK_WINDOW (sdialog->window), GDK_WINDOW_TYPE_HINT_DIALOG);
- gtk_window_set_modal (GTK_WINDOW (sdialog->window), TRUE);
-
- gtk_widget_show_all (sdialog->window);
-
- return sdialog;
-}
-
-static void
-editor_modify_cb (GtkWidget *item, AddressbookSourceDialog *dialog)
-{
- gboolean valid = TRUE;
-
- valid = display_name_check (dialog);
-#ifdef HAVE_LDAP
- if (valid)
- valid = general_tab_check (dialog);
- if (valid)
- valid = connecting_tab_check (dialog);
-#if 0
- if (valid)
- valid = searching_tab_check (dialog);
-#endif
-#endif
-
- gtk_widget_set_sensitive (dialog->ok_button, valid);
-}
-
-static void
-set_advanced_button_state (AddressbookSourceDialog *dialog)
-{
- if (dialog->advanced) {
- gtk_notebook_set_current_page (GTK_NOTEBOOK(dialog->advanced_button_notebook), 0);
-#ifdef NEW_ADVANCED_UI
- gtk_notebook_append_page (GTK_NOTEBOOK(dialog->notebook), dialog->objectclasses_tab, dialog->objectclasses_label);
- gtk_notebook_append_page (GTK_NOTEBOOK(dialog->notebook), dialog->mappings_tab, dialog->mappings_label);
- gtk_notebook_append_page (GTK_NOTEBOOK(dialog->notebook), dialog->dn_customization_tab, dialog->dn_customization_label);
-#endif
- }
- else {
-#ifdef NEW_ADVANCED_UI
- gtk_notebook_set_current_page (GTK_NOTEBOOK(dialog->advanced_button_notebook), 1);
-
- /* hide the advanced tabs of the main notebook */
- gtk_notebook_remove_page (GTK_NOTEBOOK(dialog->notebook), 5);
- gtk_notebook_remove_page (GTK_NOTEBOOK(dialog->notebook), 4);
- gtk_notebook_remove_page (GTK_NOTEBOOK(dialog->notebook), 3);
-#endif
- }
-}
-
-#ifdef NEW_ADVANCED_UI
-static void
-advanced_button_clicked (GtkWidget *button, AddressbookSourceDialog *dialog)
-{
- dialog->advanced = !dialog->advanced;
- set_advanced_button_state (dialog);
-}
-
-static gboolean
-do_schema_query (AddressbookSourceDialog *sdialog)
-{
- LDAP *ldap;
- int ldap_error;
- char *schema_dn;
- char *attrs[3];
- char **values;
- int i;
- AddressbookSource *source = addressbook_dialog_get_source (sdialog);
- LDAPMessage *resp;
- struct timeval timeout;
-
- ldap = addressbook_ldap_init (sdialog->window, source);
- if (!ldap)
- goto fail;
-
- if (LDAP_SUCCESS != addressbook_ldap_auth (sdialog->window, source, ldap))
- goto fail;
-
- attrs[0] = "subschemaSubentry";
- attrs[1] = NULL;
-
- ldap_error = addressbook_root_dse_query (sdialog->window, source, ldap, attrs, &resp);
-
- if (ldap_error != LDAP_SUCCESS)
- goto fail;
-
- values = ldap_get_values (ldap, resp, "subschemaSubentry");
- if (!values || values[0] == NULL) {
- GtkWidget *dialog;
- dialog = gnome_ok_dialog_parented (_("This server does not support LDAPv3 schema information"), GTK_WINDOW (sdialog->window));
- gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
- goto fail;
- }
-
- schema_dn = g_strdup (values[0]);
-
- ldap_value_free (values);
- ldap_msgfree (resp);
-
- attrs[0] = "objectClasses";
- attrs[1] = NULL;
-
- /* 3 second timeout */
- timeout.tv_sec = 3;
- timeout.tv_usec = 0;
-
- ldap_error = ldap_search_ext_s (ldap, schema_dn, LDAP_SCOPE_BASE,
- "(objectClass=subschema)", attrs, 0,
- NULL, NULL, &timeout, LDAP_NO_LIMIT, &resp);
- if (LDAP_SUCCESS != ldap_error) {
- GtkWidget *dialog;
- dialog = gnome_error_dialog_parented (_("Error retrieving schema information"), GTK_WINDOW (sdialog->window));
- gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
- goto fail;
- }
-
- values = ldap_get_values (ldap, resp, "objectClasses");
- if (!values) {
- GtkWidget *dialog;
- dialog = gnome_error_dialog_parented (_("Server did not respond with valid schema information"), GTK_WINDOW (sdialog->window));
- gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
- goto fail;
- }
-
- 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;
-
- /* we fill in the default list of classes here */
- for (j = 0; oc->oc_names[j]; j ++) {
- if (!g_strcasecmp (oc->oc_names[j], EVOLUTIONPERSON) ||
- !g_strcasecmp (oc->oc_names[j], INETORGPERSON) ||
- !g_strcasecmp (oc->oc_names[j], ORGANIZATIONALPERSON) ||
- !g_strcasecmp (oc->oc_names[j], PERSON) ||
- !g_strcasecmp (oc->oc_names[j], CALENTRY) ||
- !g_strcasecmp (oc->oc_names[j], TOP))
- g_ptr_array_add (sdialog->default_objectclasses, oc);
- }
-
- g_ptr_array_add (sdialog->server_objectclasses, oc);
- }
-
- addressbook_source_free (source);
- ldap_unbind_s (ldap);
- return TRUE;
-
- fail:
- addressbook_source_free (source);
- if (ldap)
- ldap_unbind_s (ldap);
- return FALSE;
-}
-
-static void
-edit_dialog_switch_page (GtkNotebook *notebook,
- GtkNotebookPage *page, guint page_num,
- AddressbookSourceDialog *sdialog)
-{
- if (page_num >= 3 && !sdialog->schema_query_successful) {
- int i;
-
- gtk_widget_set_sensitive (GTK_WIDGET (notebook), FALSE);
-
- sdialog->schema_query_successful = do_schema_query (sdialog);
-
- if (sdialog->schema_query_successful) {
- /* fill in the objectclasses model */
- for (i = 0; i < sdialog->server_objectclasses->len; i ++) {
- LDAPObjectClass *oc = g_ptr_array_index (sdialog->server_objectclasses, i);
- e_table_memory_store_insert (E_TABLE_MEMORY_STORE (sdialog->objectclasses_server_model),
- -1, oc, oc->oc_names[0]);
- }
- gtk_widget_set_sensitive (page->child, TRUE);
- }
- else {
- gtk_widget_set_sensitive (page->child, FALSE);
- }
-
- gtk_widget_set_sensitive (GTK_WIDGET (notebook), TRUE);
- }
-}
-#endif
-
-static gboolean
-edit_dialog_store_change (AddressbookSourceDialog *sdialog)
-{
- dialog_to_source (sdialog, sdialog->source, FALSE);
-
- /* check the display name for uniqueness */
- if (FALSE /* XXX */) {
- return FALSE;
- }
-
- return TRUE;
-}
-
-static void
-edit_dialog_cancel_clicked (GtkWidget *item, AddressbookSourceDialog *sdialog)
-{
- gtk_widget_destroy (sdialog->window);
-}
-
-static void
-edit_dialog_ok_clicked (GtkWidget *item, AddressbookSourceDialog *sdialog)
-{
- if (edit_dialog_store_change (sdialog)) {
- gtk_widget_destroy (sdialog->window);
- }
-}
-
-void
-addressbook_config_edit_source (GtkWidget *parent, ESource *source)
-{
- AddressbookSourceDialog *sdialog = g_new0 (AddressbookSourceDialog, 1);
- GtkWidget *general_tab_help;
-
- sdialog->gui = glade_xml_new (EVOLUTION_GLADEDIR "/" GLADE_FILE_NAME, NULL, NULL);
- sdialog->window = glade_xml_get_widget (sdialog->gui, "account-editor-window");
-
- sdialog->source = source;
- sdialog->source_group = e_source_peek_group (source);
-
- sdialog->display_name = glade_xml_get_widget (sdialog->gui, "account-editor-display-name-entry");
- g_signal_connect (sdialog->display_name, "changed",
- G_CALLBACK (editor_modify_cb), sdialog);
-
-#ifdef HAVE_LDAP
-
- /* general tab */
- general_tab_help = glade_xml_get_widget (sdialog->gui, "general-tab-help");
- reparent_to_vbox (sdialog, "account-editor-general-ldap-vbox", "general-tab");
- setup_general_tab (sdialog, editor_modify_cb);
-
- /* connecting tab */
- reparent_to_vbox (sdialog, "account-editor-connecting-vbox", "connecting-tab");
- setup_connecting_tab (sdialog, editor_modify_cb);
-
- /* searching tab */
- reparent_to_vbox (sdialog, "account-editor-searching-vbox", "searching-tab");
- setup_searching_tab (sdialog, editor_modify_cb);
-
-#endif
-
- sdialog->notebook = glade_xml_get_widget (sdialog->gui, "account-editor-notebook");
-
- sdialog->ok_button = glade_xml_get_widget (sdialog->gui, "account-editor-ok-button");
- sdialog->cancel_button = glade_xml_get_widget (sdialog->gui, "account-editor-cancel-button");
-
-#ifdef HAVE_LDAP
- if (strcmp ("ldap://", e_source_group_peek_base_uri (sdialog->source_group))) {
- gtk_widget_hide (glade_xml_get_widget (sdialog->gui, "account-editor-general-ldap-vbox"));
- gtk_widget_hide (glade_xml_get_widget (sdialog->gui, "account-editor-connecting-vbox"));
- gtk_widget_hide (glade_xml_get_widget (sdialog->gui, "account-editor-searching-vbox"));
- } else {
- add_focus_handler (sdialog->display_name, general_tab_help, 4);
- }
-#else
- gtk_widget_hide (glade_xml_get_widget (sdialog->gui, "account-editor-general-ldap-vbox"));
- gtk_widget_hide (glade_xml_get_widget (sdialog->gui, "account-editor-connecting-vbox"));
- gtk_widget_hide (glade_xml_get_widget (sdialog->gui, "account-editor-searching-vbox"));
-#endif
-
- source_to_dialog (sdialog);
-
- set_advanced_button_state (sdialog);
-
- g_signal_connect (sdialog->ok_button,
- "clicked", G_CALLBACK(edit_dialog_ok_clicked), sdialog);
- g_signal_connect (sdialog->cancel_button,
- "clicked", G_CALLBACK(edit_dialog_cancel_clicked), sdialog);
- g_object_weak_ref (G_OBJECT (sdialog->window),
- addressbook_source_dialog_destroy, sdialog);
-
- gtk_widget_set_sensitive (sdialog->ok_button, FALSE);
-
- gtk_window_set_type_hint (GTK_WINDOW (sdialog->window), GDK_WINDOW_TYPE_HINT_DIALOG);
- gtk_window_set_modal (GTK_WINDOW (sdialog->window), TRUE);
-
- gtk_widget_show (sdialog->window);
-}
-
-void
-addressbook_config_create_new_source (GtkWidget *parent)
-{
- AddressbookSourceDialog *dialog;
-
- dialog = addressbook_add_server_druid ();
-}
-
-#if 0
-#ifdef STANDALONE
-int
-main(int argc, char **argv)
-{
- AddressbookDialog *dialog;
-
- gnome_init_with_popt_table ("evolution-addressbook", "0.0",
- argc, argv, oaf_popt_options, 0, NULL);
-
- glade_init ();
-
- bindtextdomain (GETTEXT_PACKAGE, EVOLUTION_LOCALEDIR);
- textdomain (GETTEXT_PACKAGE);
-
-#if 0
- g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING);
-#endif
-
- gtk_widget_push_colormap (gdk_rgb_get_cmap ());
-
- dialog = ldap_dialog_new (NULL);
-
- gtk_widget_show (glade_xml_get_widget (dialog->gui, "addressbook-sources-window"));
-
- gtk_main();
-
- return 0;
-}
-#endif
-
-#endif
diff --git a/addressbook/gui/component/addressbook-config.h b/addressbook/gui/component/addressbook-config.h
deleted file mode 100644
index b5800bc123..0000000000
--- a/addressbook/gui/component/addressbook-config.h
+++ /dev/null
@@ -1,52 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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:
- * Chris Toshok <toshok@ximian.com>
- * Chris Lahey <clahey@ximian.com>
- **/
-
-#ifndef __ADDRESSBOOK_CONFIG_H__
-#define __ADDRESSBOOK_CONFIG_H__
-
-#include "evolution-config-control.h"
-
-typedef enum {
- ADDRESSBOOK_LDAP_AUTH_NONE,
- ADDRESSBOOK_LDAP_AUTH_SIMPLE_EMAIL,
- ADDRESSBOOK_LDAP_AUTH_SIMPLE_BINDDN,
-} AddressbookLDAPAuthType;
-
-typedef enum {
- ADDRESSBOOK_LDAP_SCOPE_ONELEVEL,
- ADDRESSBOOK_LDAP_SCOPE_SUBTREE,
- ADDRESSBOOK_LDAP_SCOPE_BASE,
- ADDRESSBOOK_LDAP_SCOPE_LAST
-} AddressbookLDAPScopeType;
-
-typedef enum {
- ADDRESSBOOK_LDAP_SSL_ALWAYS,
- ADDRESSBOOK_LDAP_SSL_WHENEVER_POSSIBLE,
- ADDRESSBOOK_LDAP_SSL_NEVER
-} AddressbookLDAPSSLType;
-
-void addressbook_config_edit_source (GtkWidget *parent, ESource *source);
-void addressbook_config_create_new_source (GtkWidget *parent);
-
-#endif /* __ADDRESSBOOK_CONFIG_H__ */
diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c
deleted file mode 100644
index f415c903e9..0000000000
--- a/addressbook/gui/component/addressbook.c
+++ /dev/null
@@ -1,1087 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* addressbook.c
- *
- * Copyright (C) 2000, 2001, 2002 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 Lahey (clahey@ximian.com)
- */
-
-#include <config.h>
-
-#include <string.h>
-#include <glib.h>
-#include <gtk/gtkvbox.h>
-#include <gtk/gtkwidget.h>
-#include <gtk/gtkmessagedialog.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-app.h>
-#include <libgnomeui/gnome-href.h>
-#include <libgnomeui/gnome-uidefs.h>
-#include <bonobo/bonobo-generic-factory.h>
-#include <bonobo/bonobo-ui-util.h>
-#include <bonobo/bonobo-exception.h>
-#include <bonobo/bonobo-property-bag.h>
-#include <gal/util/e-util.h>
-
-#include "e-util/e-categories-master-list-wombat.h"
-#include "e-util/e-sexp.h"
-#include "e-util/e-passwords.h"
-
-#include "evolution-shell-component-utils.h"
-#include "e-activity-handler.h"
-#include "e-contact-editor.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/eab-gui-util.h"
-#include "addressbook/printing/e-contact-print.h"
-#include "addressbook/util/eab-book-util.h"
-
-#include <libebook/e-book-async.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 = NULL;
-
-#define d(x)
-
-#define PROPERTY_SOURCE_UID "source_uid"
-
-#define PROPERTY_SOURCE_UID_IDX 1
-
-typedef struct {
- gint refs;
- EABView *view;
- ESearchBar *search;
- gint ecml_changed_id;
- GtkWidget *vbox;
- EBook *book;
- guint activity_id;
- BonoboControl *control;
- BonoboPropertyBag *properties;
- GConfClient *gconf_client;
- ESourceList *source_list;
- ESource *source;
- char *passwd;
- gboolean ignore_search_changes;
- gboolean failed_to_load;
-} AddressbookView;
-
-static void addressbook_view_ref (AddressbookView *);
-static void addressbook_view_unref (AddressbookView *);
-
-static void addressbook_authenticate (EBook *book, gboolean previous_failure,
- ESource *source, EBookCallback cb, gpointer closure);
-
-static void book_open_cb (EBook *book, EBookStatus status, gpointer closure);
-
-static void
-save_contact_cb (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- AddressbookView *view = (AddressbookView *) user_data;
- if (view->view)
- eab_view_save_as(view->view);
-}
-
-static void
-view_contact_cb (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- AddressbookView *view = (AddressbookView *) user_data;
- if (view->view)
- eab_view_view(view->view);
-}
-
-static void
-search_cb (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- AddressbookView *view = (AddressbookView *) user_data;
-
- if (view->view)
- gtk_widget_show(eab_search_dialog_new(view->view));
-}
-
-static void
-delete_contact_cb (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- AddressbookView *view = (AddressbookView *) user_data;
- if (view->view) {
- eab_view_delete_selection(view->view);
- }
-}
-
-static void
-print_cb (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- AddressbookView *view = (AddressbookView *) user_data;
- if (view->view)
- eab_view_print(view->view);
-}
-
-static void
-print_preview_cb (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- AddressbookView *view = (AddressbookView *) user_data;
- if (view->view)
- eab_view_print_preview(view->view);
-}
-
-static void
-stop_loading_cb (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- AddressbookView *view = (AddressbookView *) user_data;
- if (view->view)
- eab_view_stop(view->view);
-}
-
-static void
-cut_contacts_cb (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- AddressbookView *view = (AddressbookView *) user_data;
- if (view->view)
- eab_view_cut(view->view);
-}
-
-static void
-copy_contacts_cb (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- AddressbookView *view = (AddressbookView *) user_data;
- if (view->view)
- eab_view_copy(view->view);
-}
-
-static void
-paste_contacts_cb (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- AddressbookView *view = (AddressbookView *) user_data;
- if (view->view)
- eab_view_paste(view->view);
-}
-
-static void
-select_all_contacts_cb (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- AddressbookView *view = (AddressbookView *) user_data;
- if (view->view)
- eab_view_select_all (view->view);
-}
-
-static void
-send_contact_cb (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- AddressbookView *view = (AddressbookView *) user_data;
- if (view->view)
- eab_view_send (view->view);
-}
-
-static void
-send_contact_to_cb (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- AddressbookView *view = (AddressbookView *) user_data;
- if (view->view)
- eab_view_send_to (view->view);
-}
-
-static void
-copy_contact_to_cb (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- AddressbookView *view = (AddressbookView *) user_data;
- if (view->view)
- eab_view_copy_to_folder (view->view);
-}
-
-static void
-move_contact_to_cb (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- AddressbookView *view = (AddressbookView *) user_data;
- if (view->view)
- eab_view_move_to_folder (view->view);
-}
-
-static void
-forget_passwords_cb (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- e_passwords_forget_passwords();
-}
-
-static void
-update_command_state (EABView *eav, AddressbookView *view)
-{
- BonoboUIComponent *uic;
-
- if (view->view == NULL)
- return;
-
- addressbook_view_ref (view);
-
- uic = bonobo_control_get_ui_component (view->control);
-
- if (bonobo_ui_component_get_container (uic) != CORBA_OBJECT_NIL) {
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactsSaveAsVCard",
- "sensitive",
- eab_view_can_save_as (view->view) ? "1" : "0", NULL);
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactsView",
- "sensitive",
- eab_view_can_view (view->view) ? "1" : "0", NULL);
-
- /* Print Contact */
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactsPrint",
- "sensitive",
- eab_view_can_print (view->view) ? "1" : "0", NULL);
-
- /* Print Contact */
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactsPrintPreview",
- "sensitive",
- eab_view_can_print (view->view) ? "1" : "0", NULL);
-
- /* Delete Contact */
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactDelete",
- "sensitive",
- eab_view_can_delete (view->view) ? "1" : "0", NULL);
-
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactsCut",
- "sensitive",
- eab_view_can_cut (view->view) ? "1" : "0", NULL);
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactsCopy",
- "sensitive",
- eab_view_can_copy (view->view) ? "1" : "0", NULL);
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactsPaste",
- "sensitive",
- eab_view_can_paste (view->view) ? "1" : "0", NULL);
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactsSelectAll",
- "sensitive",
- eab_view_can_select_all (view->view) ? "1" : "0", NULL);
-
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactsSendContactToOther",
- "sensitive",
- eab_view_can_send (view->view) ? "1" : "0", NULL);
-
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactsSendMessageToContact",
- "sensitive",
- eab_view_can_send_to (view->view) ? "1" : "0", NULL);
-
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactsMoveToFolder",
- "sensitive",
- eab_view_can_move_to_folder (view->view) ? "1" : "0", NULL);
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactsCopyToFolder",
- "sensitive",
- eab_view_can_copy_to_folder (view->view) ? "1" : "0", NULL);
-
- /* Stop */
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactStop",
- "sensitive",
- eab_view_can_stop (view->view) ? "1" : "0", NULL);
- }
-
- addressbook_view_unref (view);
-}
-
-static void
-change_view_type (AddressbookView *view, EABViewType view_type)
-{
- g_object_set (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 ("ContactsView", view_contact_cb),
- BONOBO_UI_UNSAFE_VERB ("ToolSearch", search_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_UNSAFE_VERB ("ContactsMoveToFolder", move_contact_to_cb),
- BONOBO_UI_UNSAFE_VERB ("ContactsCopyToFolder", copy_contact_to_cb),
- BONOBO_UI_UNSAFE_VERB ("ContactsForgetPasswords", forget_passwords_cb),
-
- BONOBO_UI_VERB_END
-};
-
-static EPixmap pixmaps [] = {
- 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/EditPlaceholder/Edit/ContactsCut", "16_cut.png"),
- E_PIXMAP ("/menu/EditPlaceholder/Edit/ContactsCopy", "16_copy.png"),
- E_PIXMAP ("/menu/EditPlaceholder/Edit/ContactsPaste", "16_paste.png"),
- E_PIXMAP ("/menu/EditPlaceholder/Edit/ContactDelete", "evolution-trash-mini.png"),
-
- E_PIXMAP ("/menu/Tools/ComponentPlaceholder/ToolSearch", "search-16.png"),
-
- 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, NULL);
- bonobo_ui_component_set_container (uic, remote_ui_container, NULL);
- bonobo_object_release_unref (remote_ui_container, NULL);
-
- e_search_bar_set_ui_component (view->search, uic);
-
- bonobo_ui_component_add_verb_list_with_data (
- uic, verbs, view);
-
- bonobo_ui_component_freeze (uic, NULL);
-
- bonobo_ui_util_set_ui (uic, PREFIX,
- EVOLUTION_UIDIR "/evolution-addressbook.xml",
- "evolution-addressbook", NULL);
-
- eab_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);
- if (activate && view->view && view->view->model)
- eab_model_force_folder_bar_message (view->view->model);
-
- /* if the book failed to load, we kick off another
- load here */
-
- if (view->failed_to_load && view->source) {
- EBook *book;
-
- book = e_book_new ();
-
- addressbook_load_source (book, view->source, book_open_cb, view);
- }
- } else {
- bonobo_ui_component_unset_container (uic, NULL);
- eab_view_discard_menus (view->view);
- }
-}
-
-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_view_clear (AddressbookView *view)
-{
- if (view->book) {
- g_object_unref (view->book);
- view->book = NULL;
- }
-
- if (view->properties) {
- bonobo_object_unref (BONOBO_OBJECT(view->properties));
- view->properties = NULL;
- }
-
- g_free(view->passwd);
- view->passwd = NULL;
-
- if (view->source_list) {
- g_object_unref (view->source_list);
- view->source_list = NULL;
- }
-
- if (view->ecml_changed_id != 0) {
- g_signal_handler_disconnect (get_master_list(),
- view->ecml_changed_id);
- view->ecml_changed_id = 0;
- }
-}
-
-static void
-addressbook_view_ref (AddressbookView *view)
-{
- g_assert (view->refs > 0);
- ++view->refs;
-}
-
-static void
-addressbook_view_unref (AddressbookView *view)
-{
- g_assert (view->refs > 0);
- --view->refs;
- if (view->refs == 0) {
- addressbook_view_clear (view);
- g_free (view);
- }
-}
-
-static void
-book_open_cb (EBook *book, EBookStatus status, gpointer closure)
-{
- AddressbookView *view = closure;
-
- if (status == E_BOOK_ERROR_OK) {
- view->failed_to_load = FALSE;
- g_object_set(view->view,
- "book", book,
- NULL);
- view->book = book;
- }
- else {
- char *label_string;
- GtkWidget *warning_dialog;
- GtkWidget *href = NULL;
- gchar *uri;
-
- view->failed_to_load = TRUE;
-
- uri = e_source_get_uri (view->source);
-
- if (!strncmp (uri, "file:", 5)) {
- label_string =
- _("We were unable to open this addressbook. Please check that the\n"
- "path exists and that you have permission to access it.");
- }
- else if (!strncmp (uri, "ldap:", 5)) {
- /* special case for ldap: contact folders so we can tell the user about openldap */
-#if HAVE_LDAP
- label_string =
- _("We were unable to open this addressbook. This either\n"
- "means you have entered an incorrect URI, or the LDAP server\n"
- "is unreachable.");
-#else
- label_string =
- _("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");
- href = gnome_href_new ("http://www.openldap.org/", "OpenLDAP at http://www.openldap.org/");
-#endif
- } else {
- /* other network folders */
- label_string =
- _("We were unable to open this addressbook. This either\n"
- "means you have entered an incorrect URI, or the server\n"
- "is unreachable.");
- }
-
- warning_dialog = gtk_message_dialog_new (
- NULL /* XXX */,
- 0,
- GTK_MESSAGE_WARNING,
- GTK_BUTTONS_CLOSE,
- label_string,
- NULL);
-
- g_signal_connect (warning_dialog,
- "response",
- G_CALLBACK (gtk_widget_destroy),
- warning_dialog);
-
- gtk_window_set_title (GTK_WINDOW (warning_dialog), _("Unable to open addressbook"));
-
- if (href)
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (warning_dialog)->vbox),
- href, FALSE, FALSE, 0);
-
- gtk_widget_show_all (warning_dialog);
-
- g_free (uri);
- }
-}
-
-static void
-destroy_callback(gpointer data, GObject *where_object_was)
-{
- AddressbookView *view = data;
- addressbook_view_unref (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_SOURCE_UID_IDX:
- if (view && view->source)
- BONOBO_ARG_SET_STRING (arg, e_source_peek_uid (view->source));
- else
- BONOBO_ARG_SET_STRING (arg, "");
- break;
-
- default:
- g_warning ("Unhandled arg %d\n", arg_id);
- }
-}
-
-typedef struct {
- EBookCallback cb;
- ESource *source;
- gpointer closure;
-} LoadSourceData;
-
-static void
-load_source_auth_cb (EBook *book, EBookStatus status, gpointer closure)
-{
- LoadSourceData *data = closure;
-
- if (status != E_BOOK_ERROR_OK) {
- if (status == E_BOOK_ERROR_CANCELLED) {
- /* the user clicked cancel in the password dialog */
- GtkWidget *dialog;
- dialog = gtk_message_dialog_new (NULL,
- 0,
- GTK_MESSAGE_WARNING,
- GTK_BUTTONS_OK,
- _("Accessing LDAP Server anonymously"));
- g_signal_connect (dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL);
- gtk_widget_show (dialog);
- data->cb (book, E_BOOK_ERROR_OK, data->closure);
- g_free (data);
- return;
- }
- else {
- gchar *uri = e_source_get_uri (data->source);
-
- e_passwords_forget_password ("Addressbook", uri);
- addressbook_authenticate (book, TRUE, data->source, load_source_auth_cb, closure);
-
- g_free (uri);
- return;
- }
- }
-
- data->cb (book, status, data->closure);
-
- g_object_unref (data->source);
- g_free (data);
-}
-
-static gboolean
-get_remember_password (ESource *source)
-{
- const gchar *value;
-
- value = e_source_get_property (source, "remember_password");
- if (value && !strcasecmp (value, "true"))
- return TRUE;
-
- return FALSE;
-}
-
-static void
-set_remember_password (ESource *source, gboolean value)
-{
- e_source_set_property (source, "remember_password",
- value ? "true" : "false");
-}
-
-static void
-addressbook_authenticate (EBook *book, gboolean previous_failure, ESource *source,
- EBookCallback cb, gpointer closure)
-{
- const char *password = NULL;
- char *pass_dup = NULL;
- const gchar *auth;
- const gchar *user;
- gchar *uri = e_source_get_uri (source);
-
- password = e_passwords_get_password ("Addressbook", uri);
-
- auth = e_source_get_property (source, "auth");
-
- if (auth && !strcmp ("ldap/simple-binddn", auth))
- user = e_source_get_property (source, "binddn");
- else
- user = e_source_get_property (source, "email_addr");
- if (!user)
- user = "";
-
- if (!password) {
- char *prompt;
- gboolean remember;
- char *failed_auth;
-
- if (previous_failure) {
- failed_auth = _("Failed to authenticate.\n");
- }
- else {
- failed_auth = "";
- }
-
- prompt = g_strdup_printf (_("%sEnter password for %s (user %s)"),
- failed_auth, e_source_peek_name (source), user);
-
- remember = get_remember_password (source);
- pass_dup = e_passwords_ask_password (prompt, "Addressbook", uri, prompt, TRUE,
- E_PASSWORDS_REMEMBER_FOREVER, &remember,
- NULL);
- if (remember != get_remember_password (source))
- set_remember_password (source, remember);
-
- g_free (prompt);
- }
-
- if (password || pass_dup) {
- e_book_async_authenticate_user (book, user, password ? password : pass_dup,
- e_source_get_property (source, "auth"),
- cb, closure);
- g_free (pass_dup);
- }
- else {
- /* they hit cancel */
- cb (book, E_BOOK_ERROR_CANCELLED, closure);
- }
-
- g_free (uri);
-}
-
-static void
-load_source_cb (EBook *book, EBookStatus status, gpointer closure)
-{
- LoadSourceData *load_source_data = closure;
-
- if (status == E_BOOK_ERROR_OK && book != NULL) {
- const gchar *auth;
-
- auth = e_source_get_property (load_source_data->source, "auth");
-
- /* check if the addressbook needs authentication */
-
- if (auth && strcmp (auth, "none")) {
- addressbook_authenticate (book, FALSE, load_source_data->source,
- load_source_auth_cb, closure);
-
- return;
- }
- }
-
- load_source_data->cb (book, status, load_source_data->closure);
- g_object_unref (load_source_data->source);
- g_free (load_source_data);
-}
-
-void
-addressbook_load_source (EBook *book, ESource *source,
- EBookCallback cb, gpointer closure)
-{
- LoadSourceData *load_source_data = g_new0 (LoadSourceData, 1);
-
- load_source_data->cb = cb;
- load_source_data->closure = closure;
- load_source_data->source = g_object_ref (source);
-
- e_book_async_load_source (book, source, load_source_cb, load_source_data);
-}
-
-void
-addressbook_load_default_book (EBookCallback cb, gpointer closure)
-{
- LoadSourceData *load_source_data = g_new (LoadSourceData, 1);
-
- /* FIXME: We need to get the source for the default book */
-
- load_source_data->cb = cb;
- load_source_data->closure = closure;
-
- e_book_async_get_default_addressbook (load_source_cb, load_source_data);
-}
-
-static void
-set_prop (BonoboPropertyBag *bag,
- const BonoboArg *arg,
- guint arg_id,
- CORBA_Environment *ev,
- gpointer user_data)
-{
- AddressbookView *view = user_data;
- const gchar *uid;
-
- switch (arg_id) {
-
- case PROPERTY_SOURCE_UID_IDX:
- if (view->book) {
- /* we've already had a uri set on this view, so unload it */
- e_book_async_unload_uri (view->book);
- view->source = NULL;
- } else {
- view->book = e_book_new ();
- }
-
- view->failed_to_load = FALSE;
-
- uid = BONOBO_ARG_GET_STRING (arg);
- view->source = e_source_list_peek_source_by_uid (view->source_list, uid);
-
- if (view->source)
- addressbook_load_source (view->book, view->source, book_open_cb, view);
- else
- g_warning ("Could not find source by UID '%s'!", uid);
-
- break;
-
- default:
- g_warning ("Unhandled arg %d\n", arg_id);
- break;
- }
-}
-
-enum {
- ESB_FULL_NAME,
- ESB_EMAIL,
- ESB_CATEGORY,
- ESB_ANY,
- ESB_ADVANCED
-};
-
-static ESearchBarItem addressbook_search_option_items[] = {
- { N_("Name begins with"), ESB_FULL_NAME, NULL },
- { N_("Email begins with"), ESB_EMAIL, NULL },
- { N_("Category is"), ESB_CATEGORY, NULL }, /* We attach subitems below */
- { N_("Any field contains"), ESB_ANY, NULL },
- { N_("Advanced..."), ESB_ADVANCED, NULL },
- { NULL, -1, NULL }
-};
-
-static void
-addressbook_search_activated (ESearchBar *esb, AddressbookView *view)
-{
- ECategoriesMasterList *master_list;
- char *search_word, *search_query;
- const char *category_name;
- int search_type, subid;
-
- if (view->ignore_search_changes) {
- return;
- }
-
- g_object_get(esb,
- "text", &search_word,
- "item_id", &search_type,
- NULL);
-
- if (search_type == ESB_ADVANCED) {
- gtk_widget_show(eab_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 ("(beginswith \"full_name\" %s)",
- s->str);
- break;
- case ESB_EMAIL:
- search_query = g_strdup_printf ("(beginswith \"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 ("(is \"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)
- g_object_set (view->view,
- "query", search_query,
- NULL);
-
- g_free (search_query);
- }
-
- g_free (search_word);
-}
-
-static void
-addressbook_query_changed (ESearchBar *esb, AddressbookView *view)
-{
- int search_type;
-
- g_object_get(esb,
- "item_id", &search_type,
- NULL);
-
- if (search_type == ESB_ADVANCED) {
- gtk_widget_show(eab_search_dialog_new(view->view));
- }
-}
-
-static void
-set_status_message (EABView *eav, const char *message, AddressbookView *view)
-{
- EActivityHandler *activity_handler = addressbook_component_peek_activity_handler (addressbook_component_peek ());
-
- if (!message || !*message) {
- if (view->activity_id != 0) {
- e_activity_handler_operation_finished (activity_handler, view->activity_id);
- view->activity_id = 0;
- }
- } else if (view->activity_id == 0) {
- char *clientid = g_strdup_printf ("%p", view);
-
- if (progress_icon == NULL)
- progress_icon = gdk_pixbuf_new_from_file (EVOLUTION_IMAGESDIR "/" EVOLUTION_CONTACTS_PROGRESS_IMAGE, NULL);
-
- view->activity_id = e_activity_handler_operation_started (activity_handler, clientid,
- progress_icon, message, TRUE);
-
- g_free (clientid);
- } else {
- e_activity_handler_operation_progressing (activity_handler, view->activity_id, message, -1.0);
- }
-
-}
-
-static void
-search_result (EABView *eav, EBookViewStatus status, AddressbookView *view)
-{
- char *str = NULL;
-
- switch (status) {
- case E_BOOK_VIEW_STATUS_OK:
- return;
- case E_BOOK_VIEW_STATUS_SIZE_LIMIT_EXCEEDED:
- str = _("More cards matched this query than either the server is \n"
- "configured to return or Evolution is configured to display.\n"
- "Please make your search more specific or raise the result limit in\n"
- "the directory server preferences for this addressbook.");
- break;
- case E_BOOK_VIEW_STATUS_TIME_LIMIT_EXCEEDED:
- str = _("The time to execute this query exceeded the server limit or the limit\n"
- "you have configured for this addressbook. Please make your search\n"
- "more specific or raise the time limit in the directory server\n"
- "preferences for this addressbook.");
- break;
- case E_BOOK_VIEW_ERROR_INVALID_QUERY:
- str = _("The backend for this addressbook was unable to parse this query.");
- break;
- case E_BOOK_VIEW_ERROR_QUERY_REFUSED:
- str = _("The backend for this addressbook refused to perform this query.");
- break;
- case E_BOOK_VIEW_ERROR_OTHER_ERROR:
- str = _("This query did not complete successfully.");
- break;
- }
-
- if (str) {
- GtkWidget *dialog;
- dialog = gtk_message_dialog_new (NULL,
- 0,
- GTK_MESSAGE_WARNING,
- GTK_BUTTONS_OK,
- str);
- g_signal_connect (dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL);
- gtk_widget_show (dialog);
- }
-}
-
-static int
-compare_subitems (const void *a, const void *b)
-{
- const ESearchBarSubitem *subitem_a = a;
- const ESearchBarSubitem *subitem_b = b;
-
- return strcoll (subitem_a->text, subitem_b->text);
-}
-
-static void
-make_suboptions (AddressbookView *view)
-{
- ESearchBarSubitem *subitems, *s;
- ECategoriesMasterList *master_list;
- gint i, N;
-
- master_list = get_master_list ();
- N = e_categories_master_list_count (master_list);
- 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) {
- const char *category = e_categories_master_list_nth (master_list, i);
-
- subitems[i+1].id = i;
- subitems[i+1].text = g_strdup (category);
- subitems[i+1].translate = FALSE;
- }
- subitems[N+1].id = -1;
- subitems[N+1].text = NULL;
-
- qsort (subitems + 1, N, sizeof (subitems[0]), compare_subitems);
-
- e_search_bar_set_suboption (view->search, ESB_CATEGORY, subitems);
-
- for (s = subitems; s->id != -1; s++) {
- if (s->text)
- g_free (s->text);
- }
- g_free (subitems);
-}
-
-static void
-ecml_changed (ECategoriesMasterList *ecml, AddressbookView *view)
-{
- make_suboptions (view);
-}
-
-static void
-connect_master_list_changed (AddressbookView *view)
-{
- view->ecml_changed_id =
- g_signal_connect (get_master_list(), "changed",
- G_CALLBACK (ecml_changed), view);
-}
-
-BonoboControl *
-addressbook_new_control (void)
-{
- AddressbookView *view;
-
- view = g_new0 (AddressbookView, 1);
- view->refs = 1;
- view->ignore_search_changes = FALSE;
-
- view->vbox = gtk_vbox_new (FALSE, 0);
-
- g_object_weak_ref (G_OBJECT (view->vbox), destroy_callback, view);
-
- /* Create the control. */
- view->control = bonobo_control_new (view->vbox);
-
- view->search = E_SEARCH_BAR (e_search_bar_new (NULL, addressbook_search_option_items));
- make_suboptions (view);
- connect_master_list_changed (view);
-
- gtk_box_pack_start (GTK_BOX (view->vbox), GTK_WIDGET (view->search),
- FALSE, FALSE, 0);
- g_signal_connect (view->search, "query_changed",
- G_CALLBACK (addressbook_query_changed), view);
- g_signal_connect (view->search, "search_activated",
- G_CALLBACK (addressbook_search_activated), view);
-
- view->view = EAB_VIEW(eab_view_new());
- gtk_box_pack_start (GTK_BOX (view->vbox), GTK_WIDGET (view->view),
- TRUE, TRUE, 0);
-
- /* create the initial view */
- change_view_type (view, EAB_VIEW_TABLE);
-
- 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_SOURCE_UID, PROPERTY_SOURCE_UID_IDX,
- BONOBO_ARG_STRING, NULL,
- _("UID of the contacts source that the view will display"), 0);
-
- bonobo_control_set_properties (view->control,
- bonobo_object_corba_objref (BONOBO_OBJECT (view->properties)),
- NULL);
-
- g_signal_connect (view->view, "status_message",
- G_CALLBACK(set_status_message), view);
-
- g_signal_connect (view->view, "search_result",
- G_CALLBACK(search_result), view);
-
- g_signal_connect (view->view, "command_state_change",
- G_CALLBACK(update_command_state), view);
-
- view->gconf_client = gconf_client_get_default ();
- view->source_list = e_source_list_new_for_gconf (view->gconf_client,
- "/apps/evolution/addressbook/sources");
- view->source = NULL;
-
- g_signal_connect (view->control, "activate",
- G_CALLBACK (control_activate_cb), view);
-
- return view->control;
-}
diff --git a/addressbook/gui/component/addressbook.h b/addressbook/gui/component/addressbook.h
deleted file mode 100644
index fb05287133..0000000000
--- a/addressbook/gui/component/addressbook.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef __ADDRESSBOOK_H__
-#define __ADDRESSBOOK_H__
-
-#include <bonobo/bonobo-control.h>
-#include <e-util/e-config-listener.h>
-#include <bonobo/bonobo-object.h>
-#include <bonobo/bonobo-moniker-util.h>
-#include <libebook/e-book-async.h>
-
-/* use this instead of e_book_load_uri everywhere where you want the
- authentication to be handled for you. */
-#if 0
-void addressbook_load_uri (EBook *book, const char *uri, EBookCallback cb, gpointer closure);
-#endif
-void addressbook_load_source (EBook *book, ESource *source, EBookCallback cb, gpointer closure);
-void addressbook_load_default_book (EBookCallback open_response, gpointer closure);
-
-BonoboControl *addressbook_new_control (void);
-
-#endif /* __ADDRESSBOOK_H__ */
diff --git a/addressbook/gui/component/apps_evolution_addressbook.schemas.in.in b/addressbook/gui/component/apps_evolution_addressbook.schemas.in.in
deleted file mode 100644
index 82af9d0843..0000000000
--- a/addressbook/gui/component/apps_evolution_addressbook.schemas.in.in
+++ /dev/null
@@ -1,42 +0,0 @@
-<gconfschemafile>
- <schemalist>
-
- <!-- Completion uris -->
-
- <schema>
- <key>/schemas/apps/evolution/addressbook/completion/uris</key>
- <applyto>/apps/evolution/addressbook/completion/uris</applyto>
- <owner>evolution-addressbook</owner>
- <type>string</type>
- <default></default>
- <locale name="C">
- <short>EFolderList xml for the list of completion uris</short>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/addressbook/completion/minimum_query_length</key>
- <applyto>/apps/evolution/addressbook/completion/minimum_query_length</applyto>
- <owner>evolution-addressbook</owner>
- <type>int</type>
- <default>3</default>
- <locale name="C">
- <short>The number of characters that must be typed before evolution will attempt to autocomplete</short>
- </locale>
- </schema>
-
- <!-- Select names last used uri -->
-
- <schema>
- <key>/schemas/apps/evolution/addressbook/select_names/last_used_uri</key>
- <applyto>/apps/evolution/addressbook/select_names/last_used_uri</applyto>
- <owner>evolution-addressbook</owner>
- <type>string</type>
- <default></default>
- <locale name="C">
- <short>URI for the folder last used in the select names dialog</short>
- </locale>
- </schema>
-
- </schemalist>
-</gconfschemafile> \ No newline at end of file
diff --git a/addressbook/gui/component/autocompletion-config.c b/addressbook/gui/component/autocompletion-config.c
deleted file mode 100644
index 05898f6688..0000000000
--- a/addressbook/gui/component/autocompletion-config.c
+++ /dev/null
@@ -1,150 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-shell-config-autocompletion.h - Configuration page for addressbook autocompletion.
- *
- * Copyright (C) 2003 Novell, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Chris Toshok <toshok@ximian.com>
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-
-#include "autocompletion-config.h"
-
-#include "Evolution.h"
-
-#include <bonobo/bonobo-exception.h>
-
-#include "e-source-selector.h"
-#include <libedataserver/e-source-list.h>
-#include <libgnome/gnome-i18n.h>
-#include <gtk/gtkwidget.h>
-#include <gtk/gtksignal.h>
-
-
-typedef struct {
- EvolutionConfigControl *config_control;
-
- GtkWidget *control_widget;
-
- ESourceList *source_list;
-} AutocompletionConfig;
-
-static void
-source_selection_changed (ESourceSelector *selector,
- AutocompletionConfig *ac)
-{
- evolution_config_control_changed (ac->config_control);
-}
-
-static void
-config_control_destroy_notify (void *data,
- GObject *where_the_config_control_was)
-{
- AutocompletionConfig *ac = (AutocompletionConfig *) data;
-
- g_object_unref (ac->source_list);
-
- g_free (ac);
-}
-
-
-static void
-config_control_apply_callback (EvolutionConfigControl *config_control,
- AutocompletionConfig *ac)
-{
- GSList *selection;
- GSList *l;
- GSList *groups;
-
- /* first we clear all the completion flags from all sources */
- for (groups = e_source_list_peek_groups (ac->source_list); groups; groups = groups->next) {
- ESourceGroup *group = E_SOURCE_GROUP (groups->data);
- GSList *sources;
- for (sources = e_source_group_peek_sources (group); sources; sources = sources->next) {
- ESource *source = E_SOURCE (sources->data);
-
- e_source_set_property (source, "completion", NULL);
- }
- }
-
- /* then we loop over the selector's selection, setting the
- property on those sources */
- selection = e_source_selector_get_selection (E_SOURCE_SELECTOR (ac->control_widget));
- for (l = selection; l; l = l->next) {
- e_source_set_property (E_SOURCE (l->data), "completion", "true");
- }
- e_source_selector_free_selection (selection);
-
- e_source_list_sync (ac->source_list, NULL); /* XXX we should pop up a dialog if this fails */
-}
-
-static void
-initialize_selection (AutocompletionConfig *ac)
-{
- GSList *groups;
-
- for (groups = e_source_list_peek_groups (ac->source_list); groups; groups = groups->next) {
- ESourceGroup *group = E_SOURCE_GROUP (groups->data);
- GSList *sources;
- for (sources = e_source_group_peek_sources (group); sources; sources = sources->next) {
- ESource *source = E_SOURCE (sources->data);
- const char *completion = e_source_get_property (source, "completion");
- if (completion && !g_ascii_strcasecmp (completion, "true"))
- e_source_selector_select_source (E_SOURCE_SELECTOR (ac->control_widget),
- source);
- }
- }
-}
-
-EvolutionConfigControl*
-autocompletion_config_control_new (void)
-{
- AutocompletionConfig *ac;
- CORBA_Environment ev;
-
- ac = g_new0 (AutocompletionConfig, 1);
-
- CORBA_exception_init (&ev);
-
- ac->source_list = e_source_list_new_for_gconf_default ("/apps/evolution/addressbook/sources");
- /* XXX should we watch for the source list to change and
- update it in the control? what about our local changes? */
- /* g_signal_connect (ac->source_list, "changed", G_CALLBACK (source_list_changed), ac); */
-
- ac->control_widget = e_source_selector_new (ac->source_list);
-
- initialize_selection (ac);
-
- gtk_widget_show (ac->control_widget);
-
- ac->config_control = evolution_config_control_new (ac->control_widget);
-
- g_signal_connect (ac->control_widget, "selection_changed",
- G_CALLBACK (source_selection_changed), ac);
- g_signal_connect (ac->config_control, "apply",
- G_CALLBACK (config_control_apply_callback), ac);
-
- g_object_weak_ref (G_OBJECT (ac->config_control), config_control_destroy_notify, ac);
-
- CORBA_exception_free (&ev);
-
- return ac->config_control;
-}
-
diff --git a/addressbook/gui/component/autocompletion-config.h b/addressbook/gui/component/autocompletion-config.h
deleted file mode 100644
index 86f056477e..0000000000
--- a/addressbook/gui/component/autocompletion-config.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-shell-config-autocompletion.h - Configuration page for addressbook autocompletion.
- *
- * Copyright (C) 2003 Novell, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Chris Toshok <toshok@ximian.com>
- */
-
-#ifndef _AUTOCOMPLETION_CONFIG_H
-#define _AUTOCOMPLETION_CONFIG_H
-
-#include "evolution-config-control.h"
-
-EvolutionConfigControl* autocompletion_config_control_new (void);
-
-#endif /* _AUTOCOMPLETION_CONFIG_H */
diff --git a/addressbook/gui/component/component-factory.c b/addressbook/gui/component/component-factory.c
deleted file mode 100644
index 08bf146691..0000000000
--- a/addressbook/gui/component/component-factory.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* component-factory.c - Factory for Evolution's Addressbook component.
- *
- * Copyright (C) 2002 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <string.h>
-#include "addressbook.h"
-#include "addressbook-component.h"
-#include "addressbook-config.h"
-#include "autocompletion-config.h"
-#include "eab-popup-control.h"
-#include "eab-vcard-control.h"
-#include "select-names/e-select-names-bonobo.h"
-#if HAVE_NSS
-#include "smime/gui/certificate-manager.h"
-#endif
-#include <bonobo/bonobo-shlib-factory.h>
-
-
-#define FACTORY_ID "OAFIID:GNOME_Evolution_Addressbook_Factory:" BASE_VERSION
-
-#define VCARD_CONTROL_ID "OAFIID:GNOME_Evolution_Addressbook_VCard_Control:" BASE_VERSION
-#define ADDRESSBOOK_CONTROL_ID "OAFIID:GNOME_Evolution_Addressbook_Control:" BASE_VERSION
-#define COMPONENT_ID "OAFIID:GNOME_Evolution_Addressbook_Component:" BASE_VERSION
-#define ADDRESS_POPUP_ID "OAFIID:GNOME_Evolution_Addressbook_AddressPopup:" BASE_VERSION
-#define SELECT_NAMES_ID "OAFIID:GNOME_Evolution_Addressbook_SelectNames:" BASE_VERSION
-#define LDAP_STORAGE_CONFIG_CONTROL_ID "OAFIID:GNOME_Evolution_LDAPStorage_ConfigControl:" BASE_VERSION
-#define COMPLETION_CONFIG_CONTROL_ID "OAFIID:GNOME_Evolution_Addressbook_Autocompletion_ConfigControl:" BASE_VERSION
-#define CERTIFICATE_MANAGER_CONFIG_CONTROL_ID "OAFIID:GNOME_Evolution_SMime_CertificateManager_ConfigControl:" BASE_VERSION
-
-
-static BonoboObject *
-factory (BonoboGenericFactory *factory,
- const char *component_id,
- void *closure)
-{
- printf ("asked to activate component_id `%s'\n", component_id);
-
- if (strcmp (component_id, VCARD_CONTROL_ID) == 0)
- return BONOBO_OBJECT (eab_vcard_control_new ());
- if (strcmp (component_id, ADDRESSBOOK_CONTROL_ID) == 0)
- return BONOBO_OBJECT (addressbook_new_control ());
- if (strcmp (component_id, COMPONENT_ID) == 0) {
- BonoboObject *object = BONOBO_OBJECT (addressbook_component_peek ());
- bonobo_object_ref (object);
- return object;
- }
- if (strcmp (component_id, ADDRESS_POPUP_ID) == 0)
- return BONOBO_OBJECT (eab_popup_control_new ());
- if (strcmp (component_id, COMPLETION_CONFIG_CONTROL_ID) == 0)
- return BONOBO_OBJECT (autocompletion_config_control_new ());
-#if 0
- /* Config control is dead */
- if (strcmp (component_id, LDAP_STORAGE_CONFIG_CONTROL_ID) == 0)
- return BONOBO_OBJECT (addressbook_config_control_new ());
-#endif
- if (strcmp (component_id, SELECT_NAMES_ID) == 0)
- return BONOBO_OBJECT (e_select_names_bonobo_new ());
-#if HAVE_NSS
- if (strcmp (component_id, CERTIFICATE_MANAGER_CONFIG_CONTROL_ID) == 0)
- return BONOBO_OBJECT (certificate_manager_config_control_new ());
-#endif
-
- g_warning (FACTORY_ID ": Don't know what to do with %s", component_id);
- return NULL;
-}
-
-BONOBO_ACTIVATION_SHLIB_FACTORY (FACTORY_ID, "Evolution Addressbook component factory", factory, NULL)
diff --git a/addressbook/gui/component/ldap-config.glade b/addressbook/gui/component/ldap-config.glade
deleted file mode 100644
index 0683fe1f66..0000000000
--- a/addressbook/gui/component/ldap-config.glade
+++ /dev/null
@@ -1,2722 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-<requires lib="gnome"/>
-
-<widget class="GtkWindow" id="account-editor-window">
- <property name="title" translatable="yes">Edit LDAP Server</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
-
- <child>
- <widget class="GtkVBox" id="vbox37">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkNotebook" id="account-editor-notebook">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="show_tabs">True</property>
- <property name="show_border">True</property>
- <property name="tab_pos">GTK_POS_TOP</property>
- <property name="scrollable">False</property>
- <property name="enable_popup">False</property>
-
- <child>
- <widget class="GtkVBox" id="account-editor-general-vbox">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHBox" id="hbox100">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">4</property>
-
- <child>
- <widget class="GtkLabel" id="label431">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Display name:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment45">
- <property name="visible">True</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0.9</property>
- <property name="yscale">1</property>
-
- <child>
- <widget class="GtkEntry" id="account-editor-display-name-entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="account-editor-general-ldap-vbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <placeholder/>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label331">
- <property name="visible">True</property>
- <property name="label" translatable="yes">General</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="account-editor-connecting-vbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <placeholder/>
- </child>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label334">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Connecting</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="account-editor-searching-vbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <placeholder/>
- </child>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label344">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Searching</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHSeparator" id="hseparator10">
- <property name="visible">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox120">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkHButtonBox" id="hbuttonbox20">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkButton" id="account-editor-cancel-button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="account-editor-ok-button">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-<widget class="GtkWindow" id="account-druid-window">
- <property name="title" translatable="yes">New Addressbook</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
-
- <child>
- <widget class="GnomeDruid" id="account-druid">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="show_help">False</property>
-
- <child>
- <widget class="GnomeDruidPageEdge" id="druidpagestart1">
- <property name="visible">True</property>
- <property name="position">GNOME_EDGE_START</property>
- <property name="title" translatable="yes">Addressbook Creation Assistant</property>
- <property name="text" translatable="yes">This assistant will help you create a new addressbook.
-
-Depending on the type of addressbook you create, additional
-parameters may be required. Please contact your system
-administrator if you need help finding this information.</property>
- </widget>
- </child>
-
- <child>
- <widget class="GnomeDruidPageStandard" id="add-server-druid-folder-page">
- <property name="visible">True</property>
- <property name="title" translatable="yes">Step 1: Folder Characteristics</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="druid-vbox6">
- <property name="border_width">16</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkVBox" id="vbox21">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label198">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Specifying a display name and group is the first step in setting up an addressbook.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xpad">3</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHSeparator" id="hseparator5">
- <property name="visible">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTable" id="table15">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">3</property>
-
- <child>
- <widget class="GtkEntry" id="druid-display-name-entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label199">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Display name:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">druid-display-name-entry</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label555">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Group:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="druid-group-option-menu">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">-1</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkNotebook" id="notebook15">
- <property name="visible">True</property>
- <property name="show_tabs">False</property>
- <property name="show_border">False</property>
- <property name="tab_pos">GTK_POS_TOP</property>
- <property name="scrollable">False</property>
- <property name="enable_popup">False</property>
-
- <child>
- <widget class="GtkLabel" id="label207">
- <property name="visible">True</property>
- <property name="label" translatable="yes">This is the name that will appear in your Evolution folder list. It is for display purposes only. </property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label208">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label163</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label215">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Selecting this option will let you change Evolution's default settings for LDAP
-searches, and for creating and editing contacts. </property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label210">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label164</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GnomeDruidPageStandard" id="add-server-druid-info-page">
- <property name="visible">True</property>
- <property name="title" translatable="yes">Step 2: Server Information</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="druid-vbox1">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkVBox" id="account-druid-general-vbox">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label158">
- <property name="visible">True</property>
- <property name="label" translatable="yes">You have decided to configure an LDAP server. The first step in doing this is to provide its name and your
-log in information. Please ask your system administrator if you are unsure of this information.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xpad">3</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHSeparator" id="hseparator2">
- <property name="visible">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GnomeDruidPageStandard" id="add-server-druid-connecting-page">
- <property name="visible">True</property>
- <property name="title" translatable="yes">Step 3: Connecting to Server</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="druid-vbox2">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkVBox" id="account-druid-connecting-vbox">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label174">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Now, you must specify how you want to connect to the LDAP server. The SSL (Secure Sockets Layer)
-and TLS (Transport Layer Security) protocols are used by some servers to cryptographically protect
-your connection. Ask your system administrator if your LDAP server uses these protocols.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xpad">3</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHSeparator" id="hseparator3">
- <property name="visible">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GnomeDruidPageStandard" id="add-server-druid-searching-page">
- <property name="visible">True</property>
- <property name="title" translatable="yes">Step 4: Searching the Directory</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="vbox23">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkVBox" id="account-druid-searching-vbox">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label254">
- <property name="visible">True</property>
- <property name="label" translatable="yes">The options on this page control how many entries should be included in your
-searches, and how long a search should take. Ask your system administrator if you
-need to change these options.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHSeparator" id="hseparator7">
- <property name="visible">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GnomeDruidPageEdge" id="add-server-druid-finish-page">
- <property name="visible">True</property>
- <property name="position">GNOME_EDGE_FINISH</property>
- <property name="title" translatable="yes">Finished</property>
- <property name="text" translatable="yes">Congratulations, you are finished setting up this addressbook.
-
-Please click the &quot;Finish&quot; button to save the settings you have entered here.</property>
- </widget>
- </child>
- </widget>
- </child>
-</widget>
-
-<widget class="GtkDialog" id="addressbook-sources-window">
- <property name="title" translatable="yes">Addressbook Sources</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="default_width">355</property>
- <property name="default_height">285</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="has_separator">True</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="addressbook-sources-vbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="hbuttonbox27">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="button104">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">0</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="button105">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-apply</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">0</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="button106">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-close</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">0</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="addressbook-sources">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="Custom" id="sourcesTable">
- <property name="visible">True</property>
- <property name="creation_function">addressbook_dialog_create_sources_table</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Thu, 11 Apr 2002 00:31:02 GMT</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox73">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label529">
- <property name="visible">True</property>
- <property name="label" translatable="yes">
-</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVButtonBox" id="vbuttonbox18">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_START</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkButton" id="addSource">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-add</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="editSource">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment64">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox121">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child>
- <widget class="Custom" id="custom1">
- <property name="visible">True</property>
- <property name="creation_function">e_create_image_widget</property>
- <property name="string1">stock-edit-24.png</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Fri, 25 Apr 2003 20:27:48 GMT</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label554">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Edit</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="deleteSource">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-remove</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-<widget class="GtkWindow" id="general-tab-window">
- <property name="title" translatable="yes">general-tab</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
-
- <child>
- <widget class="GtkVBox" id="general-tab">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkTable" id="table36">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="n_rows">4</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label534">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Server name:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">server-name-entry</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label535">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Log in method:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="server-name-entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment63">
- <property name="visible">True</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">1</property>
-
- <child>
- <widget class="GtkOptionMenu" id="auth-optionmenu">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget28">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget29">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Anonymously</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget30">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Using email address</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget31">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Using distinguished name (DN)</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkNotebook" id="auth-label-notebook">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="show_tabs">False</property>
- <property name="show_border">False</property>
- <property name="tab_pos">GTK_POS_TOP</property>
- <property name="scrollable">False</property>
- <property name="enable_popup">False</property>
-
- <child>
- <widget class="GtkLabel" id="label553">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Email address:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label546">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label546</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label536">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Distinguished _name:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label547">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label547</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkNotebook" id="auth-entry-notebook">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="show_tabs">False</property>
- <property name="show_border">False</property>
- <property name="tab_pos">GTK_POS_TOP</property>
- <property name="scrollable">False</property>
- <property name="enable_popup">False</property>
-
- <child>
- <widget class="GtkEntry" id="email-entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label549">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label549</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="dn-entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label550">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label550</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHSeparator" id="hseparator12">
- <property name="visible">True</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkNotebook" id="general-tab-help">
- <property name="visible">True</property>
- <property name="show_tabs">False</property>
- <property name="show_border">False</property>
- <property name="tab_pos">GTK_POS_TOP</property>
- <property name="scrollable">False</property>
- <property name="enable_popup">False</property>
-
- <child>
- <widget class="GtkLabel" id="label537">
- <property name="visible">True</property>
- <property name="label" translatable="yes">This is the full name of your ldap server. For example, &quot;ldap.mycompany.com&quot;.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label538">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label163</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label539">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Evolution will use this email address to authenticate you with the server</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label540">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label164</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label541">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Evolution will use this DN to authenticate you with the server</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label542">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label165</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label552">
- <property name="visible">True</property>
- <property name="label" translatable="yes">This is the method evolution will use to authenticate you. Note that setting this to &quot;Email Address&quot; requires anonymous access to your ldap server.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">True</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label551">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label551</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label544">
- <property name="visible">True</property>
- <property name="label" translatable="yes">This is the name for this server that will appear in your Evolution folder list.
-It is for display purposes only. </property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label545">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label452</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-<widget class="GtkWindow" id="connecting-tab-window">
- <property name="title" translatable="yes">connecting-tab</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
-
- <child>
- <widget class="GtkVBox" id="connecting-tab">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkTable" id="table14">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label175">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Port number:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment21">
- <property name="visible">True</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">1</property>
-
- <child>
- <widget class="GtkCombo" id="port-combo">
- <property name="visible">True</property>
- <property name="value_in_list">False</property>
- <property name="allow_empty">True</property>
- <property name="case_sensitive">False</property>
- <property name="enable_arrow_keys">True</property>
- <property name="enable_arrows_always">False</property>
-
- <child internal-child="entry">
- <widget class="GtkEntry" id="entry27">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- </child>
-
- <child internal-child="list">
- <widget class="GtkList" id="convertwidget32">
- <property name="visible">True</property>
- <property name="selection_mode">GTK_SELECTION_BROWSE</property>
-
- <child>
- <widget class="GtkListItem" id="convertwidget33">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget34">
- <property name="visible">True</property>
- <property name="label" translatable="yes">389</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkListItem" id="convertwidget35">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget36">
- <property name="visible">True</property>
- <property name="label" translatable="yes">636</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkListItem" id="convertwidget37">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget38">
- <property name="visible">True</property>
- <property name="label" translatable="yes">3268</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkListItem" id="convertwidget39">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget40">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label176">
- <property name="visible">True</property>
- <property name="label" translatable="yes">U_se SSL/TLS:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment60">
- <property name="visible">True</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">1</property>
-
- <child>
- <widget class="GtkOptionMenu" id="ssl-optionmenu">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget41">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget42">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Always</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget43">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Whenever Possible</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget44">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Never</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkNotebook" id="connecting-tab-help">
- <property name="visible">True</property>
- <property name="show_tabs">False</property>
- <property name="show_border">False</property>
- <property name="tab_pos">GTK_POS_TOP</property>
- <property name="scrollable">False</property>
- <property name="enable_popup">False</property>
-
- <child>
- <widget class="GtkLabel" id="label178">
- <property name="visible">True</property>
- <property name="label" translatable="yes">This is the port on the LDAP server that Evolution will try to connect to. A
-list of standard ports has been provided. Ask your system administrator
-what port you should specify.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label179">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label163</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label395">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Selecting this option means that Evolution will only connect to your LDAP server if
-your LDAP server supports SSL or TLS.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label398">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label398</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label399">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Selecting this option means that Evolution will only try to use SSL/TLS if you are in a
-insecure environment. For example, if you and your LDAP server are behind a firewall
-at work, then Evolution doesn't need to use SSL/TLS because your connection is already
-secure.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label396">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label396</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label400">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Selecting this option means that your server does not support either SSL or TLS. This
-means that your connection will be insecure, and that you will be vulnerable to security
-exploits. </property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label397">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label397</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-<widget class="GtkWindow" id="searching-tab-window">
- <property name="title" translatable="yes">searching-tab</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
-
- <child>
- <widget class="GtkVBox" id="searching-tab">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkTable" id="table30">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="n_rows">4</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label455">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Search base:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label456">
- <property name="visible">True</property>
- <property name="label" translatable="yes">S_earch scope: </property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment49">
- <property name="visible">True</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">7.45058e-09</property>
- <property name="xscale">0</property>
- <property name="yscale">1</property>
-
- <child>
- <widget class="GtkOptionMenu" id="scope-optionmenu">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget45">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget46">
- <property name="visible">True</property>
- <property name="label" translatable="yes">One</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget47">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Sub</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox109">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkEntry" id="rootdn-entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="rootdn-button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes"> S_how Supported Bases </property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label457">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Timeout (minutes):</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">1</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment50">
- <property name="visible">True</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
-
- <child>
- <widget class="GtkHBox" id="hbox110">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkLabel" id="label458">
- <property name="visible">True</property>
- <property name="label" translatable="yes">1:00</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHScale" id="timeout-scale">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="draw_value">False</property>
- <property name="value_pos">GTK_POS_LEFT</property>
- <property name="digits">0</property>
- <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
- <property name="inverted">False</property>
- <property name="adjustment">3 1 5 0.5 1 0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label459">
- <property name="visible">True</property>
- <property name="label" translatable="yes">5:00</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">3</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label460">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Selected:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label461">
- <property name="visible">True</property>
- <property name="label" translatable="yes">2:30</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label462">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Download limit:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment51">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">1</property>
-
- <child>
- <widget class="GtkHBox" id="hbox111">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkSpinButton" id="download-limit-spinbutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">False</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="snap_to_ticks">False</property>
- <property name="wrap">False</property>
- <property name="adjustment">100 0 10000 1 10 10</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label463">
- <property name="visible">True</property>
- <property name="label" translatable="yes">cards</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkNotebook" id="searching-tab-help">
- <property name="visible">True</property>
- <property name="show_tabs">False</property>
- <property name="show_border">False</property>
- <property name="tab_pos">GTK_POS_TOP</property>
- <property name="scrollable">False</property>
- <property name="enable_popup">False</property>
-
- <child>
- <widget class="GtkLabel" id="label464">
- <property name="visible">True</property>
- <property name="label" translatable="yes">The search base is the distinguished name (DN) of the entry where your searches will
-begin. If you leave this blank, the search will begin at the root of the directory tree.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label465">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label163</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label466">
- <property name="visible">True</property>
- <property name="label" translatable="yes">The search scope defines how deep you would like the search to extend down the
-directory tree. A search scope of &quot;sub&quot; will include all entries below your search base.
-A search scope of &quot;one&quot; will only include the entries one level beneath your base.
-</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label467">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label164</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label468">
- <property name="visible">True</property>
- <property name="label" translatable="yes">This option controls how long a search will be run.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label469">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label165</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label470">
- <property name="visible">True</property>
- <property name="label" translatable="yes">This is the maximum number of entries to download. Setting this number to be
-too large will slow down your addressbook.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label471">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label166</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-<widget class="GtkDialog" id="supported-bases-dialog">
- <property name="title" translatable="yes">Supported Search Bases</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="default_width">300</property>
- <property name="default_height">200</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="has_separator">True</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox5">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area5">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="button107">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">-5</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="button109">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">-6</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="supported-bases-table">
- <property name="visible">True</property>
- <property name="creation_function">supported_bases_create_table</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Fri, 12 Apr 2002 20:06:45 GMT</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/addressbook/gui/component/select-names/.cvsignore b/addressbook/gui/component/select-names/.cvsignore
deleted file mode 100644
index 1520453f86..0000000000
--- a/addressbook/gui/component/select-names/.cvsignore
+++ /dev/null
@@ -1,15 +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*.server
-GNOME_Evolution_Addressbook_SelectNames*.server.in
-e-select-names-marshal.c
-e-select-names-marshal.h
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 6feb6b54bb..0000000000
--- a/addressbook/gui/component/select-names/Evolution-Addressbook-SelectNames.idl
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -*- Mode: C; 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.server.in.in b/addressbook/gui/component/select-names/GNOME_Evolution_Addressbook_SelectNames.server.in.in
deleted file mode 100644
index 0a9f975463..0000000000
--- a/addressbook/gui/component/select-names/GNOME_Evolution_Addressbook_SelectNames.server.in.in
+++ /dev/null
@@ -1,31 +0,0 @@
-<oaf_info>
-
-<!--
-<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_SelectNamesFactory:@VERSION@"
- type="shlib"
- location="@COMPONENTDIR@/libevolution-addressbook.so">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/ObjectFactory:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="name" type="string"
- _value="Evolution Addressbook name selection interface"/>
-
-</oaf_server>
--->
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_SelectNames:@VERSION@"
- type="factory"
- location="OAFIID:GNOME_Evolution_Addressbook_Factory:@VERSION@">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Evolution/Addressbook/SelectNames:@VERSION@"/>
- </oaf_attribute>
-
- <oaf_attribute name="name" type="string"
- _value="Evolution Addressbook name selection interface"/>
-
-</oaf_server>
-
-</oaf_info>
diff --git a/addressbook/gui/component/select-names/Makefile.am b/addressbook/gui/component/select-names/Makefile.am
deleted file mode 100644
index b64cf31689..0000000000
--- a/addressbook/gui/component/select-names/Makefile.am
+++ /dev/null
@@ -1,96 +0,0 @@
-# CORBA stuff
-
-idl_DATA = \
- Evolution-Addressbook-SelectNames.idl
-
-IDL_GENERATED_H = \
- Evolution-Addressbook-SelectNames.h
-IDL_GENERATED_C = \
- Evolution-Addressbook-SelectNames-common.c \
- Evolution-Addressbook-SelectNames-skels.c \
- Evolution-Addressbook-SelectNames-stubs.c
-IDL_GENERATED = $(IDL_GENERATED_C) $(IDL_GENERATED_H)
-
-$(IDL_GENERATED_H): $(idl_DATA)
- $(ORBIT_IDL) -I $(srcdir) $(IDL_INCLUDES) \
- $(srcdir)/Evolution-Addressbook-SelectNames.idl
-$(IDL_GENERATED_C): $(IDL_GENERATED_H)
-
-server_in_files = GNOME_Evolution_Addressbook_SelectNames.server.in.in
-server_DATA = $(server_in_files:.server.in.in=_$(BASE_VERSION).server)
-@EVO_SERVER_RULE@
-@INTLTOOL_SERVER_RULE@
-
-INCLUDES = \
- -DG_LOG_DOMAIN=\"evolution-addressbook\" \
- -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 \
- -DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\" \
- -DEVOLUTION_DATADIR=\""$(datadir)"\" \
- -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
- -DEVOLUTION_ETSPECDIR=\""$(etspecdir)"\" \
- -DEVOLUTION_UIDIR=\""$(evolutionuidir)"\" \
- -DPREFIX=\""$(prefix)"\" \
- $(EVOLUTION_ADDRESSBOOK_CFLAGS)
-
-privlib_LTLIBRARIES = libeselectnames.la
-
-libeselectnames_la_SOURCES = \
- $(IDL_GENERATED) \
- $(MARSHAL_GENERATED) \
- e-select-names-bonobo.c \
- e-select-names-bonobo.h \
- e-select-names-completion.c \
- e-select-names-completion.h \
- e-select-names-config.c \
- e-select-names-config.h \
- e-select-names-config-keys.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
-
-libeselectnames_la_LIBADD = \
- $(EVOLUTION_ADDRESSBOOK_LIBS)
-
-# We'll need these again when we split out the select names control
-# into its own shlib factory, but for now they're redundant.
-#
-# e-select-names-factory.c
-# e-select-names-factory.h
-
-MARSHAL_GENERATED = e-select-names-marshal.c e-select-names-marshal.h
-@EVO_MARSHAL_RULE@
-
-glade_DATA = select-names.glade
-etspec_DATA = e-select-names.etspec e-select-names-section.etspec
-
-EXTRA_DIST = \
- $(glade_DATA) \
- $(server_in_files) \
- $(idl_DATA) \
- $(etspec_DATA) \
- e-select-names-marshal.list
-
-BUILT_SOURCES = $(IDL_GENERATED) $(MARSHAL_GENERATED) $(server_DATA)
-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 1977abe95f..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-bonobo.c
+++ /dev/null
@@ -1,600 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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-activation/bonobo-activation-activate.h>
-
-#include <bonobo/bonobo-property-bag.h>
-#include <bonobo/bonobo-control.h>
-#include <bonobo/bonobo-exception.h>
-#include <bonobo/bonobo-event-source.h>
-#include <bonobo/bonobo-ui-util.h>
-
-#include <gal/util/e-util.h>
-#include <gal/e-text/e-entry.h>
-#include <gal/util/e-text-event-processor.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"
-
-#include <string.h>
-
-
-#define PARENT_TYPE BONOBO_TYPE_OBJECT
-static BonoboObjectClass *parent_class = NULL;
-
-struct _ESelectNamesBonoboPrivate {
- ESelectNamesManager *manager;
- BonoboEventSource *event_source;
-};
-
-enum _EntryPropertyID {
- ENTRY_PROPERTY_ID_TEXT,
- ENTRY_PROPERTY_ID_ADDRESSES,
- 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:
- {
- ETextModel *text_model;
- text_model = E_TEXT_MODEL (g_object_get_data (G_OBJECT (w), "select_names_text_model"));
- g_assert (text_model != NULL);
-
- BONOBO_ARG_SET_STRING (arg, e_text_model_get_text (text_model));
- break;
- }
-
- case ENTRY_PROPERTY_ID_ADDRESSES:
- {
- ESelectNamesModel *model;
- char *text;
-
- model = E_SELECT_NAMES_MODEL (g_object_get_data (G_OBJECT (w), "select_names_model"));
- g_assert (model != NULL);
-
- text = e_select_names_model_get_address_text (model, ", ");
- BONOBO_ARG_SET_STRING (arg, text);
- g_free (text);
- }
- break;
-
- case ENTRY_PROPERTY_ID_DESTINATIONS:
- {
- ESelectNamesModel *model;
- char *text;
-
- model = E_SELECT_NAMES_MODEL (g_object_get_data (G_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 (g_object_get_data (G_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:
- case ENTRY_PROPERTY_ID_ADDRESSES:
- {
- ESelectNamesModel *model;
- model = E_SELECT_NAMES_MODEL (g_object_get_data (G_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_load_all_contacts (model, NULL);
- break;
- }
-
- case ENTRY_PROPERTY_ID_DESTINATIONS:
- {
- ESelectNamesModel *model;
- model = E_SELECT_NAMES_MODEL (g_object_get_data (G_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_load_all_contacts (model, NULL);
- break;
- }
-
- case ENTRY_PROPERTY_ID_ALLOW_CONTACT_LISTS:
- {
- ESelectNamesCompletion *comp;
- comp = E_SELECT_NAMES_COMPLETION (g_object_get_data (G_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:
- g_object_set_data (G_OBJECT (w), "entry_property_id_changed", GUINT_TO_POINTER (1));
- break;
-
- default:
- break;
- }
-}
-
-static void
-impl_SelectNames_add_section (PortableServer_Servant servant,
- const CORBA_char *id,
- const CORBA_char *title,
- CORBA_Environment *ev)
-{
- ESelectNamesBonobo *select_names;
- ESelectNamesBonoboPrivate *priv;
-
- select_names = E_SELECT_NAMES_BONOBO (bonobo_object (servant));
- 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)
-{
- ESelectNamesBonobo *select_names;
- ESelectNamesBonoboPrivate *priv;
-
- select_names = E_SELECT_NAMES_BONOBO (bonobo_object (servant));
- 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 (g_object_get_data (G_OBJECT (widget), "entry_property_id_changed"));
-
- if (!changed)
- bonobo_control_set_property (control, NULL, "entry_changed", TC_CORBA_boolean, TRUE, NULL);
-}
-
-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
-manager_ok_cb (ESelectNamesManager *manager, gpointer closure)
-{
- ESelectNamesBonobo *select_names = E_SELECT_NAMES_BONOBO (closure);
- BonoboArg *arg;
-
- arg = bonobo_arg_new (BONOBO_ARG_NULL);
-
- bonobo_event_source_notify_listeners_full (select_names->priv->event_source,
- "GNOME/Evolution",
- "ok",
- "dialog",
- arg,
- NULL);
-
- bonobo_arg_release (arg);
-}
-
-static void
-copy_cb (BonoboUIComponent *ui, gpointer user_data, const char *command)
-{
- EEntry *entry = E_ENTRY (user_data);
-
- e_text_copy_clipboard (entry->item);
-}
-
-static void
-cut_cb (BonoboUIComponent *ui, gpointer user_data, const char *command)
-{
- EEntry *entry = E_ENTRY (user_data);
-
- e_text_cut_clipboard (entry->item);
-}
-
-static void
-paste_cb (BonoboUIComponent *ui, gpointer user_data, const char *command)
-{
- EEntry *entry = E_ENTRY (user_data);
-
- e_text_paste_clipboard (entry->item);
-}
-
-static void
-select_all_cb (BonoboUIComponent *ui, gpointer user_data, const char *command)
-{
- EEntry *entry = E_ENTRY (user_data);
-
- e_text_select_all (entry->item);
-}
-
-static BonoboUIVerb verbs [] = {
- BONOBO_UI_VERB ("EditCut", cut_cb),
- BONOBO_UI_VERB ("EditCopy", copy_cb),
- BONOBO_UI_VERB ("EditPaste", paste_cb),
- BONOBO_UI_VERB ("EditSelectAll", select_all_cb),
- BONOBO_UI_VERB_END
-};
-
-typedef struct {
- GtkWidget *widget;
- BonoboControl *control;
- Bonobo_UIContainer remote_ui_container;
- char *ui_xml_path;
- char *app_name;
- BonoboUIVerb *verbs;
- gpointer user_data;
-} ControlUIClosure;
-
-static void
-free_closure (ControlUIClosure *closure,
- GtkObject *where_object_was)
-{
- bonobo_object_release_unref (closure->remote_ui_container, NULL);
- g_free (closure->ui_xml_path);
- g_free (closure->app_name);
- g_free (closure);
-}
-
-static void
-merge_menu_items (BonoboControl *control, BonoboUIComponent *uic, ControlUIClosure *closure)
-{
- if (closure->remote_ui_container) {
- bonobo_ui_component_set_container (uic, closure->remote_ui_container, NULL);
-
- bonobo_ui_component_add_verb_list_with_data (uic, closure->verbs, closure->user_data);
-
- bonobo_ui_component_freeze (uic, NULL);
-
- bonobo_ui_util_set_ui (uic, PREFIX,
- closure->ui_xml_path,
- closure->app_name, NULL);
-
- bonobo_ui_component_thaw (uic, NULL);
- }
-}
-
-static void
-unmerge_menu_items (BonoboControl *control, BonoboUIComponent *uic, ControlUIClosure *closure)
-{
- bonobo_ui_component_unset_container (uic, NULL);
-}
-
-static void
-control_set_frame_cb (BonoboControl *control,
- ControlUIClosure *closure)
-{
- Bonobo_ControlFrame frame = bonobo_control_get_control_frame (control,
- NULL);
- if (!frame)
- return;
- closure->remote_ui_container = bonobo_control_get_remote_ui_container (control, NULL);
-}
-
-static void
-control_activate_cb (BonoboControl *control,
- gboolean activate,
- ControlUIClosure *closure)
-{
- if (activate)
- gtk_widget_grab_focus (closure->widget); /* the ECanvas */
-}
-
-static gboolean
-widget_focus_cb (GtkWidget *w, GdkEventFocus *focus, ControlUIClosure *closure)
-{
- BonoboUIComponent *uic;
-
- uic = bonobo_control_get_ui_component (closure->control);
-
- if (GTK_WIDGET_HAS_FOCUS (w)) {
- merge_menu_items (closure->control, uic, closure);
- } else {
- unmerge_menu_items (closure->control, uic, closure);
- }
-
- return FALSE;
-}
-
-static void
-e_bonobo_control_automerge_ui (GtkWidget *w,
- BonoboControl *control,
- const char *ui_xml_path,
- const char *app_name,
- BonoboUIVerb *verbs,
- gpointer data)
-{
- ControlUIClosure *closure;
-
- g_return_if_fail (GTK_IS_WIDGET (w));
- g_return_if_fail (BONOBO_IS_CONTROL (control));
- g_return_if_fail (ui_xml_path != NULL);
- g_return_if_fail (app_name != NULL);
- g_return_if_fail (verbs != NULL);
-
- closure = g_new (ControlUIClosure, 1);
-
- closure->widget = w;
- closure->control = control;
- closure->ui_xml_path = g_strdup (ui_xml_path);
- closure->app_name = g_strdup (app_name);
- closure->verbs = verbs;
- closure->user_data = data;
-
- g_signal_connect (w, "focus_in_event",
- G_CALLBACK (widget_focus_cb), closure);
- g_signal_connect (w, "focus_out_event",
- G_CALLBACK (widget_focus_cb), closure);
- g_signal_connect (control, "activate",
- G_CALLBACK (control_activate_cb), closure);
- g_signal_connect (control, "set_frame",
- G_CALLBACK (control_set_frame_cb), closure);
-
- g_object_weak_ref (G_OBJECT (control), (GWeakNotify)free_closure, closure);
-}
-
-static Bonobo_Control
-impl_SelectNames_get_entry_for_section (PortableServer_Servant servant,
- const CORBA_char *section_id,
- CORBA_Environment *ev)
-{
- ESelectNamesBonobo *select_names;
- ESelectNamesBonoboPrivate *priv;
- GtkWidget *entry_widget;
- BonoboControl *control;
- BonoboPropertyBag *property_bag;
-
- select_names = E_SELECT_NAMES_BONOBO (bonobo_object (servant));
- 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, "addresses", ENTRY_PROPERTY_ID_ADDRESSES,
- 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, bonobo_object_corba_objref (BONOBO_OBJECT (property_bag)), NULL);
- bonobo_object_unref (BONOBO_OBJECT (property_bag));
-
- g_signal_connect (entry_widget, "changed", G_CALLBACK (entry_changed), control);
-
- e_bonobo_control_automerge_ui (GTK_WIDGET (E_ENTRY (entry_widget)->canvas),
- control,
- EVOLUTION_UIDIR "/evolution-composer-entries.xml",
- "evolution-addressbook",
- verbs, entry_widget);
-
- 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)
-{
- ESelectNamesBonobo *select_names;
- ESelectNamesBonoboPrivate *priv;
-
- select_names = E_SELECT_NAMES_BONOBO (bonobo_object (servant));
- priv = select_names->priv;
-
- e_select_names_manager_activate_dialog (priv->manager, section_id);
-}
-
-
-/* GtkObject methods. */
-
-static void
-impl_dispose (GObject *object)
-{
- ESelectNamesBonobo *select_names;
- ESelectNamesBonoboPrivate *priv;
-
- select_names = E_SELECT_NAMES_BONOBO (object);
- priv = select_names->priv;
-
- if (priv) {
- if (priv->manager->names) {
- gtk_widget_destroy (GTK_WIDGET (priv->manager->names));
- priv->manager->names = NULL;
- }
-
- g_object_unref (priv->manager);
-
- g_free (priv);
- select_names->priv = NULL;
- }
-
- if (G_OBJECT_CLASS (parent_class)->dispose)
- G_OBJECT_CLASS (parent_class)->dispose (object);
-}
-
-
-static void
-e_select_names_bonobo_class_init (ESelectNamesBonoboClass *klass)
-{
- GObjectClass *object_class;
- POA_GNOME_Evolution_Addressbook_SelectNames__epv *epv;
-
- object_class = G_OBJECT_CLASS (klass);
- parent_class = g_type_class_peek_parent (klass);
-
- object_class->dispose = impl_dispose;
-
- epv = &klass->epv;
- 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;
-}
-
-static void
-e_select_names_bonobo_init (ESelectNamesBonobo *select_names)
-{
- ESelectNamesBonoboPrivate *priv;
-
- priv = g_new (ESelectNamesBonoboPrivate, 1);
-
- priv->manager = e_select_names_manager_new ();
- priv->event_source = NULL;
-
- g_signal_connect (priv->manager,
- "changed",
- G_CALLBACK (manager_changed_cb),
- select_names);
-
- g_signal_connect (priv->manager,
- "ok",
- G_CALLBACK (manager_ok_cb),
- select_names);
-
- select_names->priv = priv;
-}
-
-
-static void
-e_select_names_bonobo_construct (ESelectNamesBonobo *select_names)
-{
- g_return_if_fail (select_names != NULL);
- g_return_if_fail (E_IS_SELECT_NAMES_BONOBO (select_names));
-
- 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)
-{
- ESelectNamesBonobo *select_names;
-
- select_names = g_object_new (E_TYPE_SELECT_NAMES_BONOBO, NULL);
-
- e_select_names_bonobo_construct (select_names);
-
- return select_names;
-}
-
-
-BONOBO_TYPE_FUNC_FULL (
- ESelectNamesBonobo,
- GNOME_Evolution_Addressbook_SelectNames,
- PARENT_TYPE,
- e_select_names_bonobo);
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 5b04ed5b2e..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-bonobo.h
+++ /dev/null
@@ -1,66 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_SELECT_NAMES_BONOBO, ESelectNamesBonobo))
-#define E_SELECT_NAMES_BONOBO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_SELECT_NAMES_BONOBO, ESelectNamesBonoboClass))
-#define E_IS_SELECT_NAMES_BONOBO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_SELECT_NAMES_BONOBO))
-#define E_IS_SELECT_NAMES_BONOBO_CLASS(klass) (G_TYPE_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;
-
- POA_GNOME_Evolution_Addressbook_SelectNames__epv epv;
-};
-
-
-GType e_select_names_bonobo_get_type (void);
-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 39b5f7a008..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-completion.c
+++ /dev/null
@@ -1,1231 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <libebook/e-contact.h>
-#include <addressbook/util/eab-book-util.h>
-#include <addressbook/util/eab-destination.h>
-#include <addressbook/gui/merging/eab-contact-compare.h>
-
-typedef struct {
- EBook *book;
- guint book_view_tag;
- EBookView *book_view;
- ESelectNamesCompletion *comp;
- guint contacts_added_tag;
- guint seq_complete_tag;
- gboolean sequence_complete_received;
-
- gchar *cached_query_text;
- GList *cached_cards;
- gboolean cache_complete;
-
-} ESelectNamesCompletionBookData;
-
-struct _ESelectNamesCompletionPrivate {
-
- ESelectNamesTextModel *text_model;
-
- GList *book_data;
- gint books_not_ready;
- gint pending_completion_seq;
-
- gchar *waiting_query;
- gint waiting_pos, waiting_limit;
- gchar *query_text;
-
- gboolean match_contact_lists;
-
- gint minimum_query_length;
-};
-
-static void e_select_names_completion_class_init (ESelectNamesCompletionClass *);
-static void e_select_names_completion_init (ESelectNamesCompletion *);
-static void e_select_names_completion_dispose (GObject *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_contacts_added_cb (EBookView *, const GList *cards, gpointer user_data);
-static void e_select_names_completion_seq_complete_cb (EBookView *, EBookViewStatus status, 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 GObjectClass *parent_class;
-
-static FILE *out;
-
-/*
- *
- * Query builders
- *
- */
-
-typedef gchar *(*BookQuerySExp) (ESelectNamesCompletion *);
-typedef ECompletionMatch *(*BookQueryMatchTester) (ESelectNamesCompletion *, EABDestination *);
-
-static int
-utf8_casefold_collate_len (const gchar *str1, const gchar *str2, int len)
-{
- gchar *s1 = g_utf8_casefold(str1, len);
- gchar *s2 = g_utf8_casefold(str2, len);
- int rv;
-
- rv = g_utf8_collate (s1, s2);
-
- g_free (s1);
- g_free (s2);
-
- return rv;
-}
-
-static int
-utf8_casefold_collate (const gchar *str1, const gchar *str2)
-{
- return utf8_casefold_collate_len (str1, str2, -1);
-}
-
-static void
-our_match_destroy (ECompletionMatch *match)
-{
- g_object_unref (match->user_data);
-}
-
-static ECompletionMatch *
-make_match (EABDestination *dest, const gchar *menu_form, double score)
-{
- ECompletionMatch *match;
-#if notyet
- EContact *contact = eab_destination_get_contact (dest);
-#endif
-
- match = e_completion_match_new (eab_destination_get_name (dest), menu_form, score);
-
- e_completion_match_set_text (match, eab_destination_get_name (dest), menu_form);
-
- /* Reject any match that has null text fields. */
- if (! (e_completion_match_get_match_text (match) && e_completion_match_get_menu_text (match))) {
- g_object_unref (match);
- return NULL;
- }
-
-#if notyet
- /* XXX toshok - EContact doesn't have the use_score stuff */
- /* Since we sort low to high, we negate so that larger use scores will come first */
- match->sort_major = contact ? -floor (e_contact_get_use_score (contact)) : 0;
-#else
- match->sort_major = 0;
-#endif
-
- match->sort_minor = eab_destination_get_email_num (dest);
-
- match->user_data = dest;
- g_object_ref (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, EABDestination *dest)
-{
- ECompletionMatch *match = NULL;
- gint len;
- EContact *contact = eab_destination_get_contact (dest);
- double score;
- const char *nickname;
-
- nickname = e_contact_get_const (contact, E_CONTACT_NICKNAME);
- if (nickname == NULL)
- return NULL;
-
- len = g_utf8_strlen (comp->priv->query_text, -1);
- if (nickname && !utf8_casefold_collate_len (comp->priv->query_text, nickname, len)) {
- const gchar *name;
- gchar *str;
-
- score = len * 2; /* nickname gives 2 points per matching character */
-
- if (len == g_utf8_strlen (nickname, -1)) /* boost score on an exact match */
- score *= 10;
-
- name = eab_destination_get_name (dest);
- if (name && *name)
- str = g_strdup_printf ("'%s' %s <%s>", nickname, name, eab_destination_get_email (dest));
- else
- str = g_strdup_printf ("'%s' <%s>", nickname, eab_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, EABDestination *dest)
-{
- ECompletionMatch *match;
- gint len = strlen (comp->priv->query_text);
- const gchar *name = eab_destination_get_name (dest);
- const gchar *email = eab_destination_get_email (dest);
- double score;
-
- if (email
- && !utf8_casefold_collate_len (comp->priv->query_text, email, len)
- && !eab_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), *c;
- gchar **strv;
- gchar *query;
- gint i, count=0;
-
- for (c = cpy; *c; ++c) {
- if (*c == ',')
- *c = ' ';
- }
-
- strv = g_strsplit (cpy, " ", 0);
- for (i=0; strv[i]; ++i) {
- gchar *old;
- ++count;
- g_strstrip (strv[i]);
- old = strv[i];
- strv[i] = g_strdup_printf ("(beginswith \"%s\" \"%s\")", field, old);
- g_free (old);
- }
-
- 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");
-}
-
-static ECompletionMatch *
-match_name (ESelectNamesCompletion *comp, EABDestination *dest)
-{
- ECompletionMatch *final_match = NULL;
- gchar *menu_text = NULL;
- EContact *contact;
- const gchar *email;
- gint match_len = 0;
- EABContactMatchType match;
- EABContactMatchPart first_match;
- double score = 0;
- gboolean have_given, have_additional, have_family;
- EContactName *contact_name;
-
- contact = eab_destination_get_contact (dest);
-
- contact_name = e_contact_get (contact, E_CONTACT_NAME);
- if (!contact_name)
- return NULL;
-
- email = eab_destination_get_email (dest);
-
- match = eab_contact_compare_name_to_string_full (contact, comp->priv->query_text, TRUE /* yes, allow partial matches */,
- NULL, &first_match, &match_len);
-
- if (match <= EAB_CONTACT_MATCH_NONE) {
- e_contact_name_free (contact_name);
- return NULL;
- }
-
- score = match_len * 3; /* three points per match character */
-
- have_given = contact_name->given && *contact_name->given;
- have_additional = contact_name->additional && *contact_name->additional;
- have_family = contact_name->family && *contact_name->family;
-
- if (e_contact_get (contact, E_CONTACT_IS_LIST)) {
-
- menu_text = e_contact_name_to_string (contact_name);
-
- } else if (first_match == EAB_CONTACT_MATCH_PART_GIVEN_NAME) {
-
- if (have_family)
- menu_text = g_strdup_printf ("%s %s <%s>", contact_name->given, contact_name->family, email);
- else
- menu_text = g_strdup_printf ("%s <%s>", contact_name->given, email);
-
- } else if (first_match == EAB_CONTACT_MATCH_PART_ADDITIONAL_NAME) {
-
- if (have_given) {
-
- menu_text = g_strdup_printf ("%s%s%s, %s <%s>",
- contact_name->additional,
- have_family ? " " : "",
- have_family ? contact_name->family : "",
- contact_name->given,
- email);
- } else {
-
- menu_text = g_strdup_printf ("%s%s%s <%s>",
- contact_name->additional,
- have_family ? " " : "",
- have_family ? contact_name->family : "",
- email);
- }
-
- } else if (first_match == EAB_CONTACT_MATCH_PART_FAMILY_NAME) {
-
- if (have_given)
- menu_text = g_strdup_printf ("%s, %s%s%s <%s>",
- contact_name->family,
- contact_name->given,
- have_additional ? " " : "",
- have_additional ? contact_name->additional : "",
- email);
- else
- menu_text = g_strdup_printf ("%s <%s>", contact_name->family, email);
-
- } else { /* something funny happened */
-
- menu_text = g_strdup_printf ("<%s> ???", email);
-
- }
-
- if (menu_text) {
- g_strstrip (menu_text);
- final_match = make_match (dest, menu_text, score);
- g_free (menu_text);
- }
-
- e_contact_name_free (contact_name);
-
- 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, EABDestination *dest)
-{
- const gchar *name;
- const gchar *email;
- gchar *cpy, **strv, *menu_text;
- gint i, len;
- double score = 0.00001;
- ECompletionMatch *match;
-
- name = eab_destination_get_name (dest);
- email = eab_destination_get_email (dest);
-
- if (!(name && *name))
- return NULL;
-
- cpy = g_strdup (comp->priv->query_text);
- strv = g_strsplit (cpy, " ", 0);
-
- for (i=0; strv[i] && score > 0; ++i) {
- len = g_utf8_strlen (strv[i], -1);
- if (!utf8_casefold_collate_len (name, strv[i], len))
- score += len; /* one point per character of the match */
- else
- score = 0;
- }
-
- g_free (cpy);
- g_strfreev (strv);
-
- if (score <= 0)
- 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;
-}
-
-typedef struct _BookQuery BookQuery;
-struct _BookQuery {
- BookQuerySExp builder;
- BookQueryMatchTester tester;
-};
-
-static BookQuery book_queries[] = {
- { sexp_nickname, match_nickname},
- { sexp_email, match_email },
- { sexp_name, match_name },
- { sexp_file_as, match_file_as },
-};
-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;
- 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;
-
- queryv = g_new0 (gchar *, book_query_count+1);
- for (i=0, j=0; i<book_query_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<book_query_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, EABDestination *dest)
-{
- ECompletionMatch *best_match = NULL;
- gint i;
-
- g_return_val_if_fail (E_IS_SELECT_NAMES_COMPLETION (comp), NULL);
- g_return_val_if_fail (EAB_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].tester && eab_destination_get_contact (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 *contacts)
-{
- while (contacts) {
- EContact *contact = E_CONTACT (contacts->data);
-
- if (e_contact_get (contact, E_CONTACT_IS_LIST)) {
-
- if (comp->priv->match_contact_lists) {
-
- EABDestination *dest = eab_destination_new ();
- ECompletionMatch *match;
- eab_destination_set_contact (dest, contact, 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);
- }
- g_object_unref (dest);
-
- }
-
- }
- else {
- GList *email = e_contact_get (contact, E_CONTACT_EMAIL);
- if (email) {
- GList *iter;
- gint i;
- for (i=0, iter = email; iter; ++i, iter = iter->next) {
- EABDestination *dest = eab_destination_new ();
- gchar *e;
- ECompletionMatch *match;
-
- eab_destination_set_contact (dest, contact, i);
- e = iter->data;
-
- if (e && *e) {
-
- 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);
- }
- }
-
- g_object_unref (dest);
- }
- }
- g_list_foreach (email, (GFunc)g_free, NULL);
- g_list_free (email);
- }
-
- contacts = contacts->next;
- }
-}
-
-/*
- *
- * ESelectNamesCompletion code
- *
- */
-
-
-GType
-e_select_names_completion_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (ESelectNamesCompletionClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) e_select_names_completion_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (ESelectNamesCompletion),
- 0, /* n_preallocs */
- (GInstanceInitFunc) e_select_names_completion_init,
- };
-
- type = g_type_register_static (e_completion_get_type (), "ESelectNamesCompletion", &info, 0);
- }
-
- return type;
-}
-
-static void
-e_select_names_completion_class_init (ESelectNamesCompletionClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- ECompletionClass *completion_class = E_COMPLETION_CLASS (klass);
-
- parent_class = g_type_class_peek_parent (klass);
-
- object_class->dispose = e_select_names_completion_dispose;
-
- completion_class->request_completion = e_select_names_completion_handle_request;
- completion_class->end_completion = e_select_names_completion_end;
-
- 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_clear_book_data (ESelectNamesCompletion *comp)
-{
- GList *l;
-
- for (l = comp->priv->book_data; l; l = l->next) {
- ESelectNamesCompletionBookData *book_data = l->data;
-
- if (book_data->contacts_added_tag) {
- g_signal_handler_disconnect (book_data->book_view, book_data->contacts_added_tag);
- book_data->contacts_added_tag = 0;
- }
-
- if (book_data->seq_complete_tag) {
- g_signal_handler_disconnect (book_data->book_view, book_data->seq_complete_tag);
- book_data->seq_complete_tag = 0;
- }
-
- g_object_unref (book_data->book);
-
- if (book_data->book_view) {
- e_book_view_stop (book_data->book_view);
- g_object_unref (book_data->book_view);
- }
-
- g_free (book_data->cached_query_text);
- g_list_foreach (book_data->cached_cards, (GFunc)g_object_unref, NULL);
- g_list_free (book_data->cached_cards);
-
- g_free (book_data);
- }
- g_list_free (comp->priv->book_data);
- comp->priv->book_data = NULL;
-}
-
-static void
-e_select_names_completion_dispose (GObject *object)
-{
- ESelectNamesCompletion *comp = E_SELECT_NAMES_COMPLETION (object);
-
- if (comp->priv) {
- if (comp->priv->text_model)
- g_object_unref (comp->priv->text_model);
-
- e_select_names_completion_clear_book_data (comp);
-
- g_free (comp->priv->waiting_query);
- g_free (comp->priv->query_text);
-
- g_free (comp->priv);
- comp->priv = NULL;
- }
-
- if (parent_class->dispose)
- parent_class->dispose (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 (ESelectNamesCompletionBookData *book_data)
-{
- if (out)
- fprintf (out, "** clearing cache on book %s\n", e_book_get_uri (book_data->book));
-
- g_free (book_data->cached_query_text);
- g_list_foreach (book_data->cached_cards, (GFunc)g_object_unref, NULL);
- g_list_free (book_data->cached_cards);
-
- book_data->cached_query_text = NULL;
- book_data->cached_cards = NULL;
-}
-
-static void
-e_select_names_completion_done (ESelectNamesCompletion *comp)
-{
- g_free (comp->priv->query_text);
- comp->priv->query_text = NULL;
-
- 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_got_book_view_cb (EBook *book, EBookStatus status, EBookView *view, gpointer user_data)
-{
- ESelectNamesCompletion *comp;
- ESelectNamesCompletionBookData *book_data;
-
- book_data = (ESelectNamesCompletionBookData*)user_data;
- comp = book_data->comp;
-
- if (status != E_BOOK_ERROR_OK) {
- comp->priv->pending_completion_seq--;
- if (!comp->priv->pending_completion_seq)
- e_select_names_completion_done (comp);
- return;
- }
-
- book_data->book_view_tag = 0;
-
- if (book_data->contacts_added_tag) {
- g_signal_handler_disconnect (book_data->book_view, book_data->contacts_added_tag);
- book_data->contacts_added_tag = 0;
- }
- if (book_data->seq_complete_tag) {
- g_signal_handler_disconnect (book_data->book_view, book_data->seq_complete_tag);
- book_data->seq_complete_tag = 0;
- }
-
- g_object_ref (view);
- if (book_data->book_view) {
- e_book_view_stop (book_data->book_view);
- g_object_unref (book_data->book_view);
- }
- book_data->book_view = view;
-
- book_data->contacts_added_tag =
- g_signal_connect (view,
- "contacts_added",
- G_CALLBACK (e_select_names_completion_contacts_added_cb),
- book_data);
-
- book_data->seq_complete_tag =
- g_signal_connect (view,
- "sequence_complete",
- G_CALLBACK (e_select_names_completion_seq_complete_cb),
- book_data);
-
- e_book_view_start (view);
-
- book_data->sequence_complete_received = FALSE;
-}
-
-static void
-e_select_names_completion_contacts_added_cb (EBookView *book_view, const GList *cards, gpointer user_data)
-{
- ESelectNamesCompletionBookData *book_data = user_data;
- ESelectNamesCompletion *comp = book_data->comp;
-
- if (e_completion_searching (E_COMPLETION (comp))) {
- book_query_process_card_list (comp, cards);
-
- /* Save the list of matching cards. */
- while (cards) {
- book_data->cached_cards = g_list_prepend (book_data->cached_cards, cards->data);
- g_object_ref (cards->data);
- cards = g_list_next (cards);
- }
- }
-}
-
-static void
-e_select_names_completion_seq_complete_cb (EBookView *book_view, EBookViewStatus status, gpointer user_data)
-{
- ESelectNamesCompletionBookData *book_data = user_data;
- ESelectNamesCompletion *comp = book_data->comp;
-
- if (out)
- fprintf (out, "** got sequence_complete (status = %d) on book %s\n", status, e_book_get_uri (book_data->book));
-
- /*
- * 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))) {
- if (out)
- fprintf (out, "\t we weren't searching, clearing the cache\n");
- e_select_names_completion_clear_cache (book_data);
- return;
- }
-
- if (book_data->cached_query_text
- && status == E_BOOK_ERROR_OK
- && !book_data->cache_complete
- && !strcmp (book_data->cached_query_text, comp->priv->query_text))
- book_data->cache_complete = TRUE;
-
- if (out)
- fprintf (out, "\tending search, book_data->cache_complete == %d\n", book_data->cache_complete);
-
- if (!book_data->sequence_complete_received) {
- book_data->sequence_complete_received = TRUE;
-
- if (book_data->contacts_added_tag) {
- g_signal_handler_disconnect (book_data->book_view, book_data->contacts_added_tag);
- book_data->contacts_added_tag = 0;
- }
- if (book_data->seq_complete_tag) {
- g_signal_handler_disconnect (book_data->book_view, book_data->seq_complete_tag);
- book_data->seq_complete_tag = 0;
- }
-
- if (out)
- fprintf (out, "\t %d remaining book view's\n", comp->priv->pending_completion_seq - 1);
-
- comp->priv->pending_completion_seq --;
- if (comp->priv->pending_completion_seq > 0)
- return;
- }
-
- e_select_names_completion_done (comp);
-}
-
-static void
-e_select_names_completion_stop_query (ESelectNamesCompletion *comp)
-{
- GList *l;
-
- 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;
-
- for (l = comp->priv->book_data; l; l = l->next) {
- ESelectNamesCompletionBookData *book_data = l->data;
- if (book_data->book_view_tag) {
-#if notyet
- e_book_cancel (book_data->book, book_data->book_view_tag);
-#endif
- book_data->book_view_tag = 0;
- }
- if (book_data->book_view) {
- if (book_data->contacts_added_tag) {
- g_signal_handler_disconnect (book_data->book_view, book_data->contacts_added_tag);
- book_data->contacts_added_tag = 0;
- }
- if (book_data->seq_complete_tag) {
- g_signal_handler_disconnect (book_data->book_view, book_data->seq_complete_tag);
- book_data->seq_complete_tag = 0;
- }
-
- e_book_view_stop (book_data->book_view);
- g_object_unref (book_data->book_view);
- book_data->book_view = NULL;
- }
- }
-
- comp->priv->pending_completion_seq = 0;
-}
-
-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->books_not_ready == 0) {
- gchar *sexp;
-
- if (strlen (query_text) < comp->priv->minimum_query_length) {
- e_completion_end_search (E_COMPLETION (comp));
- return;
- }
-
- g_free (comp->priv->query_text);
- comp->priv->query_text = g_strdup (query_text);
-
- sexp = book_query_sexp (comp);
- if (sexp && *sexp) {
- GList *l;
-
- if (out)
- fprintf (out, "\n\n**** starting query: \"%s\"\n", comp->priv->query_text);
-
- for (l = comp->priv->book_data; l; l = l->next) {
- ESelectNamesCompletionBookData *book_data = l->data;
- gboolean can_reuse_cached_cards;
-
- if (out) {
- fprintf (out,
- "book == %s[\n"
- "\tbook_data->cached_query_text == `%s'\n"
- "\tbook_data->cache_complete == %d\n"
- "\tbook_data->cached_cards == %p\n",
- e_book_get_uri (book_data->book),
- book_data->cached_query_text,
- book_data->cache_complete,
- book_data->cached_cards);
- }
-
- /* for lack of a better place, we invalidate the cache here if we
- notice that the text is different. */
- if (book_data->cached_query_text
- && (strlen (book_data->cached_query_text) > strlen (query_text)
- || utf8_casefold_collate_len (book_data->cached_query_text, query_text,
- strlen (book_data->cached_query_text))))
- book_data->cache_complete = FALSE;
-
- can_reuse_cached_cards = (book_data->cached_query_text
- && book_data->cache_complete
- && book_data->cached_cards != NULL);
-
- if (can_reuse_cached_cards) {
-
- if (out)
- fprintf (out, "\t*** can reuse cached cards (%d cards cached)!\n", g_list_length (book_data->cached_cards));
-
- if (out)
- fprintf (out, "\tusing existing query info: %s (vs %s)\n", query_text, book_data->cached_query_text);
- book_query_process_card_list (comp, book_data->cached_cards);
- }
- else {
- e_select_names_completion_clear_cache (book_data);
- book_data->cached_query_text = g_strdup (query_text);
-
- book_data->book_view_tag = e_book_async_get_book_view (book_data->book,
- sexp,
- e_select_names_completion_got_book_view_cb, book_data);
- comp->priv->pending_completion_seq++;
- }
-
- if (out)
- fprintf (out, "]\n");
- }
-
- /* if we looped through all the books
- and were able to complete based
- solely on our cached cards, signal
- that the search is over. */
- if (!comp->priv->pending_completion_seq)
- e_select_names_completion_done (E_SELECT_NAMES_COMPLETION (comp));
- } 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;
-
- 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;
- }
-
- if (out)
- fprintf (out, "do_query: %s => %s\n", query_text, clean);
-
- 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 } },
- { "easter-egg?", { "What were you expecting, a flight simulator?", 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 !utf8_casefold_collate (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->text_model->source,
- selcomp->priv->text_model->seplen,
- pos, &index, NULL, NULL);
- str = index >= 0 ? e_select_names_model_get_string (selcomp->priv->text_model->source, 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");
-}
-
-/*
- *
- * Our Pseudo-Constructor
- *
- */
-
-ECompletion *
-e_select_names_completion_new (ESelectNamesTextModel *text_model)
-{
- ESelectNamesCompletion *comp;
-
- g_return_val_if_fail (E_IS_SELECT_NAMES_TEXT_MODEL (text_model), NULL);
-
- comp = g_object_new (E_TYPE_SELECT_NAMES_COMPLETION, NULL);
-
- comp->priv->text_model = text_model;
- g_object_ref (text_model);
-
- return E_COMPLETION (comp);
-}
-
-void
-e_select_names_completion_add_book (ESelectNamesCompletion *comp, EBook *book)
-{
- ESelectNamesCompletionBookData *book_data;
-
- g_return_if_fail (book != NULL);
-
- book_data = g_new0 (ESelectNamesCompletionBookData, 1);
- book_data->book = book;
- book_data->comp = comp;
- g_object_ref (book_data->book);
- comp->priv->book_data = g_list_append (comp->priv->book_data, book_data);
-
- /* XXX toshok - this doesn't work properly. need to rethink this next bit. */
- /* if the user is typing as we're adding books, restart the
- query after the new book has been added */
- if (comp->priv->query_text && *comp->priv->query_text) {
- char *query_text = g_strdup (comp->priv->query_text);
- e_select_names_completion_stop_query (comp);
- e_select_names_completion_start_query (comp, query_text);
- g_free (query_text);
- }
-}
-
-void
-e_select_names_completion_clear_books (ESelectNamesCompletion *comp)
-{
- e_select_names_completion_stop_query (comp);
- e_select_names_completion_clear_book_data (comp);
-}
-
-void
-e_select_names_completion_set_minimum_query_length (ESelectNamesCompletion *comp, int query_length)
-{
- g_return_if_fail (E_IS_SELECT_NAMES_COMPLETION (comp));
- comp->priv->minimum_query_length = query_length;
-}
-
-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 4ad1f4fd52..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 <libebook/e-book-async.h>
-#include "e-select-names-text-model.h"
-
-G_BEGIN_DECLS
-
-#define E_TYPE_SELECT_NAMES_COMPLETION (e_select_names_completion_get_type ())
-#define E_SELECT_NAMES_COMPLETION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_TYPE_SELECT_NAMES_COMPLETION, ESelectNamesCompletion))
-#define E_SELECT_NAMES_COMPLETION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), E_TYPE_SELECT_NAMES_COMPLETION, ESelectNamesCompletionClass))
-#define E_IS_SELECT_NAMES_COMPLETION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_TYPE_SELECT_NAMES_COMPLETION))
-#define E_IS_SELECT_NAMES_COMPLETION_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_TYPE_SELECT_NAMES_COMPLETION))
-
-typedef struct _ESelectNamesCompletion ESelectNamesCompletion;
-typedef struct _ESelectNamesCompletionClass ESelectNamesCompletionClass;
-struct _ESelectNamesCompletionPrivate;
-
-struct _ESelectNamesCompletion {
- ECompletion parent;
-
- struct _ESelectNamesCompletionPrivate *priv;
-};
-
-struct _ESelectNamesCompletionClass {
- ECompletionClass parent_class;
-
-};
-
-GType e_select_names_completion_get_type (void);
-
-ECompletion *e_select_names_completion_new (ESelectNamesTextModel *);
-void e_select_names_completion_add_book (ESelectNamesCompletion *, EBook *);
-void e_select_names_completion_clear_books (ESelectNamesCompletion *);
-void e_select_names_completion_set_minimum_query_length (ESelectNamesCompletion *, int);
-gboolean e_select_names_completion_get_match_contact_lists (ESelectNamesCompletion *);
-void e_select_names_completion_set_match_contact_lists (ESelectNamesCompletion *, gboolean);
-
-G_END_DECLS
-
-#endif /* E_SELECT_NAMES_COMPLETION_H */
diff --git a/addressbook/gui/component/select-names/e-select-names-config-keys.h b/addressbook/gui/component/select-names/e-select-names-config-keys.h
deleted file mode 100644
index e0f08c3019..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-config-keys.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors :
- * JP Rosevear <jpr@ximian.com>
- *
- * Copyright 2003, Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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_CONFIG_KEYS_H_
-#define _E_SELECT_NAMES_CONFIG_KEYS_H_
-
-#include <glib.h>
-
-G_BEGIN_DECLS
-
-#define SELECT_NAMES_CONFIG_PREFIX "/apps/evolution/addressbook/completion"
-
-/* Display settings */
-#define SELECT_NAMES_CONFIG_COMPLETION_BOOKS SELECT_NAMES_CONFIG_PREFIX "/books"
-#define SELECT_NAMES_CONFIG_LAST_COMPLETION_BOOK SELECT_NAMES_CONFIG_PREFIX "/last_book"
-#define SELECT_NAMES_CONFIG_MIN_QUERY_LENGTH SELECT_NAMES_CONFIG_PREFIX "/minimum_query_length"
-
-G_END_DECLS
-
-#endif
diff --git a/addressbook/gui/component/select-names/e-select-names-config.c b/addressbook/gui/component/select-names/e-select-names-config.c
deleted file mode 100644
index 8335ed7c3b..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-config.c
+++ /dev/null
@@ -1,117 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 "e-select-names-config-keys.h"
-#include "e-select-names-config.h"
-
-static GConfClient *config = NULL;
-
-static void
-do_cleanup (void)
-{
- g_object_unref (config);
- config = NULL;
-}
-
-static void
-e_select_names_config_init (void)
-{
- if (config)
- return;
-
- config = gconf_client_get_default ();
- g_atexit ((GVoidFunc) do_cleanup);
-
- gconf_client_add_dir (config, SELECT_NAMES_CONFIG_PREFIX, GCONF_CLIENT_PRELOAD_RECURSIVE, NULL);
-}
-
-void
-e_select_names_config_remove_notification (guint id)
-{
- gconf_client_notify_remove (config, id);
-}
-
-char *
-e_select_names_config_get_last_completion_book (void)
-{
- e_select_names_config_init ();
-
- return gconf_client_get_string (config, SELECT_NAMES_CONFIG_LAST_COMPLETION_BOOK, NULL);
-}
-
-void
-e_select_names_config_set_last_completion_book (const char *last_completion_book)
-{
- e_select_names_config_init ();
-
- gconf_client_set_string (config, SELECT_NAMES_CONFIG_LAST_COMPLETION_BOOK, last_completion_book, NULL);
-}
-
-guint
-e_select_names_config_add_notification_last_completion_book (GConfClientNotifyFunc func, gpointer data)
-{
- guint id;
-
- e_select_names_config_init ();
-
- id = gconf_client_notify_add (config, SELECT_NAMES_CONFIG_LAST_COMPLETION_BOOK, func, data, NULL, NULL);
-
- return id;
-}
-
-gint
-e_select_names_config_get_min_query_length (void)
-{
- e_select_names_config_init ();
-
- return gconf_client_get_int (config, SELECT_NAMES_CONFIG_MIN_QUERY_LENGTH, NULL);
-}
-
-
-void
-e_select_names_config_set_min_query_length (gint day_end_hour)
-{
- e_select_names_config_init ();
-
- gconf_client_set_int (config, SELECT_NAMES_CONFIG_MIN_QUERY_LENGTH, day_end_hour, NULL);
-}
-
-guint
-e_select_names_config_add_notification_min_query_length (GConfClientNotifyFunc func, gpointer data)
-{
- guint id;
-
- e_select_names_config_init ();
-
- id = gconf_client_notify_add (config, SELECT_NAMES_CONFIG_MIN_QUERY_LENGTH, func, data, NULL, NULL);
-
- return id;
-}
diff --git a/addressbook/gui/component/select-names/e-select-names-config.h b/addressbook/gui/component/select-names/e-select-names-config.h
deleted file mode 100644
index 12d2c1314d..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-config.h
+++ /dev/null
@@ -1,43 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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_CONFIG_H_
-#define _E_SELECT_NAMES_CONFIG_H_
-
-#include <gconf/gconf-client.h>
-
-void e_select_names_config_remove_notification (guint id);
-
-/* The last completion book */
-char *e_select_names_config_get_last_completion_book (void);
-void e_select_names_config_set_last_completion_book (const char *last_completion_book);
-guint e_select_names_config_add_notification_last_completion_book (GConfClientNotifyFunc func, gpointer data);
-
-
-/* The minimum query length */
-gint e_select_names_config_get_min_query_length (void);
-void e_select_names_config_set_min_query_length (gint day_end_hour);
-guint e_select_names_config_add_notification_min_query_length (GConfClientNotifyFunc func, gpointer data);
-
-#endif /* _E_SELECT_NAMES_CONFIG_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 9e427513e0..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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:" BASE_VERSION
-
-static BonoboGenericFactory *factory = NULL;
-
-
-static BonoboObject *
-factory_fn (BonoboGenericFactory *factory,
- const char *component_id,
- 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 0fe85c8361..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-factory.h
+++ /dev/null
@@ -1,30 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 1b7cbbb38e..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-manager.c
+++ /dev/null
@@ -1,755 +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 <gal/e-text/e-entry.h>
-
-#include <libgnome/gnome-i18n.h>
-#include "e-select-names-config.h"
-#include "e-select-names-manager.h"
-#include "e-select-names-marshal.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/util/eab-book-util.h>
-#include <addressbook/util/eab-destination.h>
-#include "addressbook/gui/component/addressbook.h"
-#include <bonobo/bonobo-object.h>
-
-#define DEFAULT_MINIMUM_QUERY_LENGTH 3
-
-enum {
- CHANGED,
- OK,
- CANCEL,
- LAST_SIGNAL
-};
-
-static guint e_select_names_manager_signals[LAST_SIGNAL] = { 0 };
-
-static GObjectClass *parent_class = NULL;
-
-typedef struct {
- char *id;
- char *title;
- ESelectNamesModel *model;
- ESelectNamesModel *original_model;
- ESelectNamesManager *manager;
- guint changed_tag;
-} ESelectNamesManagerSection;
-
-typedef struct {
- char *id;
- EEntry *entry;
- ESelectNamesManager *manager;
- ESelectNamesModel *model;
- ECompletion *comp;
- guint cleaning_tag;
-} 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_dispose (GObject *object);
-
-/* ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** */
-
-/* ESelectNamesManagerSection routines */
-
-static void
-section_model_changed_cb (ESelectNamesModel *model, gpointer closure)
-{
- ESelectNamesManagerSection *section = closure;
- g_signal_emit (section->manager,
- e_select_names_manager_signals[CHANGED], 0,
- section->id,
- FALSE);
-}
-
-static ESelectNamesManagerSection *
-e_select_names_manager_section_new (ESelectNamesManager *manager,
- const gchar *id,
- const gchar *title,
- ESelectNamesModel *model)
-{
- ESelectNamesManagerSection *section;
-
- g_return_val_if_fail (E_IS_SELECT_NAMES_MANAGER (manager), NULL);
- g_return_val_if_fail (E_IS_SELECT_NAMES_MODEL (model), NULL);
-
- section = g_new0 (ESelectNamesManagerSection, 1);
-
- section->id = g_strdup (id);
- section->title = g_strdup (title);
-
- section->manager = manager;
-
- section->model = model;
- g_object_ref (section->model);
- section->changed_tag =
- g_signal_connect (section->model,
- "changed",
- G_CALLBACK (section_model_changed_cb),
- section);
-
- return section;
-}
-
-static void
-e_select_names_manager_section_free (ESelectNamesManagerSection *section)
-{
- if (section == NULL)
- return;
-
- g_free (section->id);
- g_free (section->title);
-
- if (section->model) {
- g_signal_handler_disconnect (section->model, section->changed_tag);
- g_object_unref (section->model);
- }
-
- if (section->original_model) {
- g_object_unref (section->original_model);
- }
-
- g_free (section);
-}
-
-/* ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** */
-
-/* ESelectNamesManagerEntry routines */
-
-static ESelectNamesManagerEntry *
-get_entry_info (EEntry *entry)
-{
- g_return_val_if_fail (E_IS_ENTRY (entry), NULL);
- return (ESelectNamesManagerEntry *) g_object_get_data (G_OBJECT (entry), "entry_info");
-}
-
-static void
-populate_popup_cb (EEntry *eentry, GdkEventButton *ev, gint pos, GtkWidget *menu, gpointer user_data)
-{
- ESelectNamesTextModel *text_model;
-
- g_object_get (eentry,
- "model", &text_model,
- NULL);
- g_assert (E_IS_SELECT_NAMES_TEXT_MODEL (text_model));
-
- e_select_names_populate_popup (menu, text_model, ev, pos, GTK_WIDGET (eentry));
-}
-
-#if 0
-static gboolean
-clean_cb (gpointer ptr)
-{
- ESelectNamesManagerEntry *entry = ptr;
-
- e_select_names_model_clean (entry->model, TRUE);
- entry->cleaning_tag = 0;
- return FALSE;
-}
-#endif
-
-static gint
-focus_in_cb (GtkWidget *w, GdkEventFocus *ev, gpointer user_data)
-{
- ESelectNamesManagerEntry *entry = user_data;
-
- if (entry->cleaning_tag) {
- g_source_remove (entry->cleaning_tag);
- entry->cleaning_tag = 0;
- }
-
- e_select_names_model_cancel_all_contact_load (entry->model);
-
- return FALSE;
-}
-
-static gint
-focus_out_cb (GtkWidget *w, GdkEventFocus *ev, gpointer user_data)
-{
-#if 0
- /* XXX fix me */
- ESelectNamesManagerEntry *entry = user_data;
- gboolean visible = e_entry_completion_popup_is_visible (entry->entry);
-
- if (! visible) {
- e_select_names_model_load_all_contacts (entry->model, entry->manager->completion_book, 100);
- if (entry->cleaning_tag == 0)
- entry->cleaning_tag = gtk_timeout_add (100, clean_cb, entry);
- }
-#endif
- return FALSE;
-}
-
-static void
-completion_popup_cb (EEntry *w, gint visible, gpointer user_data)
-{
-#if 0
- /* XXX fix me */
- ESelectNamesManagerEntry *entry = user_data;
-
- if (!visible && !GTK_WIDGET_HAS_FOCUS (GTK_WIDGET (entry->entry->canvas)))
- e_select_names_model_load_all_contacts (entry->model, entry->manager->completion_book, 0);
-#endif
-}
-
-static void
-completion_handler (EEntry *entry, ECompletionMatch *match)
-{
- ESelectNamesManagerEntry *mgr_entry;
- ESelectNamesTextModel *text_model;
- EABDestination *dest;
- gint i, pos, start_pos, len;
-
- if (match == NULL || match->user_data == NULL)
- return;
-
- mgr_entry = get_entry_info (entry);
- dest = EAB_DESTINATION (match->user_data);
-
- /* Sometimes I really long for garbage collection. Reference
- counting makes you feel 31337, but sometimes it is just a
- bitch. */
- g_object_ref (dest);
-
- g_object_get (entry,
- "model", &text_model,
- NULL);
- g_assert (E_IS_SELECT_NAMES_TEXT_MODEL (text_model));
-
- pos = e_entry_get_position (entry);
- e_select_names_model_text_pos (mgr_entry->model, text_model->seplen, pos, &i, NULL, NULL);
- e_select_names_model_replace (mgr_entry->model, i, dest);
- e_select_names_model_name_pos (mgr_entry->model, text_model->seplen, i, &start_pos, &len);
- e_entry_set_position (entry, start_pos+len);
-}
-
-static ESelectNamesManagerEntry *
-e_select_names_manager_entry_new (ESelectNamesManager *manager, ESelectNamesModel *model, const gchar *id)
-{
- ESelectNamesManagerEntry *entry;
- ETextModel *text_model;
- GList *l;
-
- g_return_val_if_fail (E_IS_SELECT_NAMES_MANAGER (manager), NULL);
- g_return_val_if_fail (E_IS_SELECT_NAMES_MODEL (model), NULL);
-
- entry = g_new0 (ESelectNamesManagerEntry, 1);
-
- entry->id = g_strdup (id);
-
- entry->entry = E_ENTRY (e_entry_new ());
- text_model = e_select_names_text_model_new (model);
- g_object_set(entry->entry,
- "model", text_model, /* The entry takes ownership of the text model */
- "editable", TRUE,
- "use_ellipsis", TRUE,
- "allow_newlines", FALSE,
- NULL);
-
- g_object_ref (entry->entry);
-
- entry->comp = e_select_names_completion_new (E_SELECT_NAMES_TEXT_MODEL (text_model));
-
- for (l = manager->completion_books; l; l = l->next) {
- EBook *book = l->data;
- e_select_names_completion_add_book (E_SELECT_NAMES_COMPLETION(entry->comp), book);
- }
-
- e_select_names_completion_set_minimum_query_length (E_SELECT_NAMES_COMPLETION(entry->comp),
- manager->minimum_query_length);
-
- e_entry_enable_completion_full (entry->entry, entry->comp, 100, completion_handler);
-
- entry->manager = manager;
-
- entry->model = model;
- g_object_ref (model);
-
- g_signal_connect (entry->entry,
- "populate_popup",
- G_CALLBACK (populate_popup_cb),
- entry);
-
- g_signal_connect (entry->entry->canvas,
- "focus_in_event",
- G_CALLBACK (focus_in_cb),
- entry);
-
- g_signal_connect (entry->entry->canvas,
- "focus_out_event",
- G_CALLBACK (focus_out_cb),
- entry);
-
- g_signal_connect (entry->entry,
- "completion_popup",
- G_CALLBACK (completion_popup_cb),
- entry);
-
- g_object_set_data (G_OBJECT (entry->entry), "entry_info", entry);
- g_object_set_data (G_OBJECT (entry->entry), "select_names_model", model);
- g_object_set_data (G_OBJECT (entry->entry), "select_names_text_model", text_model);
- g_object_set_data (G_OBJECT (entry->entry), "completion_handler", entry->comp);
-
- return entry;
-}
-
-static void
-e_select_names_manager_entry_free (ESelectNamesManagerEntry *entry)
-{
- if (entry == NULL)
- return;
-
- g_free (entry->id);
- g_object_unref (entry->model);
- g_object_unref (entry->entry);
-
- if (entry->cleaning_tag)
- g_source_remove (entry->cleaning_tag);
-
- g_free (entry);
-}
-
-/* ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** */
-
-static void
-e_select_names_manager_save_models (ESelectNamesManager *manager)
-{
- GList *iter;
-
- for (iter = manager->sections; iter != NULL; iter = g_list_next (iter)) {
- ESelectNamesManagerSection *section = iter->data;
-
- if (section->original_model == NULL && section->model != NULL)
- section->original_model = e_select_names_model_duplicate (section->model);
-
- }
-}
-
-static void
-e_select_names_manager_revert_to_saved_models (ESelectNamesManager *manager)
-{
- GList *iter;
-
- for (iter = manager->sections; iter != NULL; iter = g_list_next (iter)) {
- ESelectNamesManagerSection *section = iter->data;
- if (section->model && section->original_model) {
- e_select_names_model_overwrite_copy (section->model, section->original_model);
- g_object_unref (section->original_model);
- section->original_model = NULL;
- }
- }
-}
-
-static void
-e_select_names_manager_discard_saved_models (ESelectNamesManager *manager)
-{
- GList *iter;
-
- for (iter = manager->sections; iter != NULL; iter = g_list_next (iter)) {
- ESelectNamesManagerSection *section = iter->data;
- if (section->original_model) {
- g_object_unref (section->original_model);
- section->original_model = NULL;
- }
- }
-}
-
-/* ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** */
-
-static void
-open_book_cb (EBook *book, EBookStatus status, gpointer user_data)
-{
- ESelectNamesManager *manager = E_SELECT_NAMES_MANAGER (user_data);
-
- if (status == E_BOOK_ERROR_OK) {
- GList *l;
- for (l = manager->entries; l; l = l->next) {
- ESelectNamesManagerEntry *entry = l->data;
- e_select_names_completion_add_book (E_SELECT_NAMES_COMPLETION(entry->comp), book);
- }
-
- manager->completion_books = g_list_append (manager->completion_books, book);
- g_object_ref (book);
- }
-
- g_object_unref (manager); /* unref ourself (matches ref before the load_source call below) */
-}
-
-static void
-update_completion_books (ESelectNamesManager *manager)
-{
- GSList *groups;
-
- /* Add all the completion books */
- for (groups = e_source_list_peek_groups (manager->source_list); groups; groups = groups->next) {
- ESourceGroup *group = E_SOURCE_GROUP (groups->data);
- GSList *sources;
-
- for (sources = e_source_group_peek_sources (group); sources; sources = sources->next) {
- ESource *source = E_SOURCE (sources->data);
- const char *completion = e_source_get_property (source, "completion");
- if (completion && !g_ascii_strcasecmp (completion, "true")) {
- EBook *book = e_book_new ();
- g_object_ref (manager);
- addressbook_load_source (book, source, open_book_cb, manager);
- }
- }
- }
-}
-
-static void
-source_list_changed (ESourceList *source_list, ESelectNamesManager *manager)
-{
- GList *l;
-
- for (l = manager->entries; l; l = l->next) {
- ESelectNamesManagerEntry *entry = l->data;
- e_select_names_completion_clear_books (E_SELECT_NAMES_COMPLETION (entry->comp));
- }
-
- g_list_foreach (manager->completion_books, (GFunc)g_object_unref, NULL);
- g_list_free (manager->completion_books);
- manager->completion_books = NULL;
-
- update_completion_books (manager);
-}
-
-static void
-config_min_query_length_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- ESelectNamesManager *manager = data;
- GList *l;
-
- manager->minimum_query_length = e_select_names_config_get_min_query_length ();
- if (manager->minimum_query_length <= 0)
- manager->minimum_query_length = DEFAULT_MINIMUM_QUERY_LENGTH;
-
- for (l = manager->entries; l; l = l->next) {
- ESelectNamesManagerEntry *entry = l->data;
- e_select_names_completion_set_minimum_query_length (E_SELECT_NAMES_COMPLETION(entry->comp),
- manager->minimum_query_length);
- }
-}
-
-/**
- * e_select_names_manager_new:
- *
- * Returns: a new #ESelectNamesManager
- */
-ESelectNamesManager *
-e_select_names_manager_new (void)
-{
- ESelectNamesManager *manager = g_object_new (E_TYPE_SELECT_NAMES_MANAGER, NULL);
-
- return manager;
-}
-
-
-/*
- * ESelectNamesManager lifecycle management and vcard loading/saving.
- */
-
-
-void
-e_select_names_manager_add_section (ESelectNamesManager *manager,
- const char *id,
- const char *title)
-{
- g_return_if_fail (E_IS_SELECT_NAMES_MANAGER (manager));
- g_return_if_fail (id != NULL);
- g_return_if_fail (title != NULL);
-
- 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;
- ESelectNamesModel *model;
-
- g_return_if_fail (E_IS_SELECT_NAMES_MANAGER (manager));
- g_return_if_fail (id != NULL);
- g_return_if_fail (title != NULL);
-
- model = e_select_names_model_new ();
- e_select_names_model_set_limit (model, limit);
-
- section = e_select_names_manager_section_new (manager, id, title, model);
-
- manager->sections = g_list_append (manager->sections, section);
-
- g_object_unref (model);
-}
-
-ESelectNamesModel *
-e_select_names_manager_get_source (ESelectNamesManager *manager,
- const char *id)
-{
- GList *iter;
-
- g_return_val_if_fail (E_IS_SELECT_NAMES_MANAGER (manager), NULL);
- g_return_val_if_fail (id != NULL, NULL);
-
- for (iter = manager->sections; iter != NULL; iter = g_list_next (iter)) {
- ESelectNamesManagerSection *section = iter->data;
- if (!strcmp (section->id, id))
- return section->model;
- }
- return NULL;
-}
-
-GtkWidget *
-e_select_names_manager_create_entry (ESelectNamesManager *manager, const char *id)
-{
- GList *iter;
-
- g_return_val_if_fail (E_IS_SELECT_NAMES_MANAGER (manager), NULL);
- g_return_val_if_fail (id != NULL, NULL);
-
- for (iter = manager->sections; iter != NULL; iter = g_list_next (iter)) {
- ESelectNamesManagerSection *section = iter->data;
- if (!strcmp(section->id, id)) {
- ESelectNamesManagerEntry *entry;
-
- entry = e_select_names_manager_entry_new (manager, section->model, section->id);
- manager->entries = g_list_append (manager->entries, entry);
-
- return GTK_WIDGET(entry->entry);
- }
- }
-
- return NULL;
-}
-
-static void
-e_select_names_response(ESelectNames *dialog, gint response_id, ESelectNamesManager *manager)
-{
- gtk_widget_destroy (GTK_WIDGET (dialog));
-
- switch(response_id) {
- case GTK_RESPONSE_OK:
- e_select_names_manager_discard_saved_models (manager);
- g_signal_emit (manager, e_select_names_manager_signals[OK], 0);
- break;
-
- case GTK_RESPONSE_CANCEL:
- e_select_names_manager_revert_to_saved_models (manager);
- g_signal_emit (manager, e_select_names_manager_signals[CANCEL], 0);
- break;
- }
-}
-
-static void
-clear_widget (gpointer data, GObject *where_object_was)
-{
- GtkWidget **widget_ref = data;
- *widget_ref = NULL;
-}
-
-void
-e_select_names_manager_activate_dialog (ESelectNamesManager *manager,
- const char *id)
-{
- g_return_if_fail (E_IS_SELECT_NAMES_MANAGER (manager));
- g_return_if_fail (id != NULL);
-
- 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 {
-
- GList *iter;
-
- manager->names = E_SELECT_NAMES (e_select_names_new ());
-
- for (iter = manager->sections; iter != NULL; iter = g_list_next (iter)) {
- ESelectNamesManagerSection *section = iter->data;
- e_select_names_add_section (manager->names, section->id, section->title, section->model);
- }
-
- e_select_names_set_default (manager->names, id);
-
- g_signal_connect(manager->names,
- "response",
- G_CALLBACK(e_select_names_response),
- manager);
-
- g_object_weak_ref (G_OBJECT (manager->names), clear_widget, &manager->names);
-
- gtk_widget_show(GTK_WIDGET(manager->names));
- }
-
- e_select_names_manager_save_models (manager);
-}
-
-/* ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** */
-
-static void
-e_select_names_manager_init (ESelectNamesManager *manager)
-{
- guint not;
-
- manager->sections = NULL;
- manager->entries = NULL;
-
- manager->source_list = e_source_list_new_for_gconf_default ("/apps/evolution/addressbook/sources");
- g_signal_connect (manager->source_list, "changed", G_CALLBACK (source_list_changed), manager);
-
- manager->completion_books = NULL;
-
- manager->minimum_query_length = e_select_names_config_get_min_query_length ();
-
- update_completion_books (manager);
-
- not = e_select_names_config_add_notification_min_query_length (config_min_query_length_changed_cb, manager);
- manager->notifications = g_list_append (manager->notifications, GUINT_TO_POINTER (not));
-}
-
-static void
-e_select_names_manager_dispose (GObject *object)
-{
- ESelectNamesManager *manager;
-
- manager = E_SELECT_NAMES_MANAGER (object);
-
- if (manager->names) {
- gtk_widget_destroy (GTK_WIDGET (manager->names));
- manager->names = NULL;
- }
-
- if (manager->sections) {
- g_list_foreach (manager->sections, (GFunc) e_select_names_manager_section_free, NULL);
- g_list_free (manager->sections);
- manager->sections = NULL;
- }
-
- if (manager->entries) {
- g_list_foreach (manager->entries, (GFunc) e_select_names_manager_entry_free, NULL);
- g_list_free (manager->entries);
- manager->entries = NULL;
- }
-
- if (manager->source_list) {
- g_object_unref (manager->source_list);
- manager->source_list = NULL;
- }
-
- if (manager->completion_books) {
- g_list_foreach (manager->completion_books, (GFunc) g_object_unref, NULL);
- g_list_free (manager->completion_books);
- manager->completion_books = NULL;
- }
-
- if (manager->notifications) {
- GList *l;
-
- for (l = manager->notifications; l; l = l->next)
- e_select_names_config_remove_notification (GPOINTER_TO_UINT (l->data));
- g_list_free (manager->notifications);
- manager->notifications = NULL;
- }
-
- if (G_OBJECT_CLASS (parent_class)->dispose)
- G_OBJECT_CLASS (parent_class)->dispose (object);
-}
-
-static void
-e_select_names_manager_class_init (ESelectNamesManagerClass *klass)
-{
- GObjectClass *object_class;
-
- object_class = G_OBJECT_CLASS(klass);
- parent_class = g_type_class_peek_parent (klass);
-
- object_class->dispose = e_select_names_manager_dispose;
-
- e_select_names_manager_signals[CHANGED] =
- g_signal_new ("changed",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ESelectNamesManagerClass, changed),
- NULL, NULL,
- e_select_names_marshal_NONE__POINTER_INT,
- G_TYPE_NONE, 2,
- G_TYPE_POINTER,
- G_TYPE_INT);
-
- e_select_names_manager_signals[OK] =
- g_signal_new ("ok",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ESelectNamesManagerClass, ok),
- NULL, NULL,
- e_select_names_marshal_NONE__NONE,
- G_TYPE_NONE, 0);
-
- e_select_names_manager_signals[CANCEL] =
- g_signal_new ("cancel",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ESelectNamesManagerClass, cancel),
- NULL, NULL,
- e_select_names_marshal_NONE__NONE,
- G_TYPE_NONE, 0);
-}
-
-/**
- * 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.
- **/
-GType
-e_select_names_manager_get_type (void)
-{
- static GType manager_type = 0;
-
- if (!manager_type) {
- static const GTypeInfo manager_info = {
- sizeof (ESelectNamesManagerClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) e_select_names_manager_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (ESelectNamesManager),
- 0, /* n_preallocs */
- (GInstanceInitFunc) e_select_names_manager_init,
- };
-
- manager_type = g_type_register_static (G_TYPE_OBJECT, "ESelectNamesManager", &manager_info, 0);
- }
-
- return manager_type;
-}
-
-
-
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 0830d299d5..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-manager.h
+++ /dev/null
@@ -1,68 +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) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_SELECT_NAMES_MANAGER, ESelectNamesManager))
-#define E_SELECT_NAMES_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_SELECT_NAMES_MANAGER, ESelectNamesManagerClass))
-#define E_IS_SELECT_NAMES_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_SELECT_NAMES_MANAGER))
-#define E_IS_SELECT_NAMES_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_SELECT_NAMES_MANAGER))
-
-typedef struct _ESelectNamesManager ESelectNamesManager;
-typedef struct _ESelectNamesManagerClass ESelectNamesManagerClass;
-
-struct _ESelectNamesManager {
- GObject object;
-
- GList *sections;
- GList *entries;
-
- ESelectNames *names;
-
- ESourceList *source_list;
- GList *completion_books;
-
- int minimum_query_length;
-
- GList *notifications;
-};
-
-struct _ESelectNamesManagerClass {
- GObjectClass parent_class;
-
- void (*changed) (ESelectNamesManager *, const gchar *section_id, gint changed_working_copy);
- void (*ok) (ESelectNamesManager *);
- void (*cancel) (ESelectNamesManager *);
-};
-
-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 */
-GType e_select_names_manager_get_type (void);
-
-#endif /* ! __E_SELECT_NAMES_MANAGER_H__ */
diff --git a/addressbook/gui/component/select-names/e-select-names-marshal.list b/addressbook/gui/component/select-names/e-select-names-marshal.list
deleted file mode 100644
index 8e751dc27d..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-marshal.list
+++ /dev/null
@@ -1,3 +0,0 @@
-NONE:POINTER,INT
-NONE:NONE
-NONE:INT,INT,INT
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 74bda7a74b..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-model.c
+++ /dev/null
@@ -1,769 +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 <libebook/e-contact.h>
-#include "e-select-names-model.h"
-#include "e-select-names-marshal.h"
-
-#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_CONTACT,
-};
-
-struct _ESelectNamesModelPrivate {
- gchar *id;
- gchar *title;
-
- GList *data; /* of EABDestination */
-
- gint limit;
-
- gint freeze_count;
- gboolean pending_changed;
-};
-
-static GObjectClass *parent_class = NULL;
-
-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_dispose (GObject *object);
-
-GType
-e_select_names_model_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (ESelectNamesModelClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) e_select_names_model_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (ESelectNamesModel),
- 0, /* n_preallocs */
- (GInstanceInitFunc) e_select_names_model_init,
- };
-
- type = g_type_register_static (G_TYPE_OBJECT, "ESelectNamesModel", &info, 0);
- }
-
- return type;
-}
-
-static void
-e_select_names_model_class_init (ESelectNamesModelClass *klass)
-{
- GObjectClass *object_class;
-
- object_class = G_OBJECT_CLASS(klass);
- parent_class = g_type_class_peek_parent (klass);
-
- e_select_names_model_signals[E_SELECT_NAMES_MODEL_CHANGED] =
- g_signal_new ("changed",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ESelectNamesModelClass, changed),
- NULL, NULL,
- e_select_names_marshal_NONE__NONE,
- G_TYPE_NONE, 0);
-
- e_select_names_model_signals[E_SELECT_NAMES_MODEL_RESIZED] =
- g_signal_new ("resized",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ESelectNamesModelClass, resized),
- NULL, NULL,
- e_select_names_marshal_NONE__INT_INT_INT,
- G_TYPE_NONE, 3,
- G_TYPE_INT,
- G_TYPE_INT,
- G_TYPE_INT);
-
- klass->changed = NULL;
-
- object_class->dispose = e_select_names_model_dispose;
-}
-
-/**
- * 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_dispose (GObject *object)
-{
- ESelectNamesModel *model = E_SELECT_NAMES_MODEL (object);
-
- if (model->priv) {
- g_free (model->priv->title);
- g_free (model->priv->id);
-
- g_list_foreach (model->priv->data, (GFunc) g_object_unref, NULL);
- g_list_free (model->priv->data);
-
- g_free (model->priv);
- model->priv = NULL;
- }
-
- if (G_OBJECT_CLASS (parent_class)->dispose)
- G_OBJECT_CLASS (parent_class)->dispose (object);
-}
-
-
-static void
-e_select_names_model_changed (ESelectNamesModel *model)
-{
- if (model->priv->freeze_count > 0) {
- model->priv->pending_changed = TRUE;
- } else {
- g_signal_emit (model, e_select_names_model_signals[E_SELECT_NAMES_MODEL_CHANGED], 0);
- model->priv->pending_changed = FALSE;
- }
-}
-
-static void
-destination_changed_proxy (EABDestination *dest, gpointer closure)
-{
- e_select_names_model_changed (E_SELECT_NAMES_MODEL (closure));
-}
-
-/** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **/
-
-ESelectNamesModel *
-e_select_names_model_new (void)
-{
- ESelectNamesModel *model;
- model = g_object_new (E_TYPE_SELECT_NAMES_MODEL, NULL);
- return model;
-}
-
-ESelectNamesModel *
-e_select_names_model_duplicate (ESelectNamesModel *old)
-{
- ESelectNamesModel *model = e_select_names_model_new ();
- 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)) {
- EABDestination *dup = eab_destination_copy (EAB_DESTINATION (iter->data));
- e_select_names_model_append (model, dup);
- }
-
- model->priv->limit = old->priv->limit;
-
- return model;
-}
-
-gchar *
-e_select_names_model_get_textification (ESelectNamesModel *model, const char *separator)
-{
- gchar *text;
-
- g_return_val_if_fail (model != NULL, NULL);
- g_return_val_if_fail (E_IS_SELECT_NAMES_MODEL (model), NULL);
- g_return_val_if_fail (separator && *separator, NULL);
-
- if (model->priv->data == NULL) {
-
- 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) {
- EABDestination *dest = EAB_DESTINATION (iter->data);
- strv[i] = (gchar *) eab_destination_get_textrep (dest, FALSE);
- ++i;
- iter = g_list_next (iter);
- }
-
- text = g_strjoinv (separator, strv);
-
- if (g_utf8_strlen(text, -1) > MAX_LENGTH) {
- char *p = g_utf8_offset_to_pointer (text, MAX_LENGTH);
- *p = '\0';
- text = g_realloc (text, p - text + 1);
- }
-
- g_free (strv);
-
- }
-
- return text;
-}
-
-gchar *
-e_select_names_model_get_address_text (ESelectNamesModel *model, const char *separator)
-{
- gchar *addr_text;
-
- g_return_val_if_fail (model != NULL, NULL);
- g_return_val_if_fail (E_IS_SELECT_NAMES_MODEL (model), NULL);
- g_return_val_if_fail (separator && *separator, NULL);
-
- if (model->priv->data == NULL) {
-
- 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) {
- EABDestination *dest = EAB_DESTINATION (iter->data);
- strv[i] = (gchar *) eab_destination_get_address (dest);
- if (strv[i])
- ++i;
- iter = g_list_next (iter);
- }
-
- addr_text = g_strjoinv (separator, strv);
-
- g_free (strv);
-
- }
-
- return 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 EABDestination *
-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 EAB_DESTINATION (g_list_nth_data (model->priv->data, index));
-}
-
-gchar *
-e_select_names_model_export_destinationv (ESelectNamesModel *model)
-{
- EABDestination **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 (EABDestination *, len+1);
-
- for (i=0, j = model->priv->data; j != NULL; j = g_list_next (j)) {
- EABDestination *dest = EAB_DESTINATION (j->data);
-
- if (dest)
- destv[i++] = dest;
- }
-
- str = eab_destination_exportv (destv);
- g_free (destv);
-
- return str;
-}
-
-static void send_changed (EABDestination *dest, EContact *contact, gpointer closure)
-{
- ESelectNamesModel *model = closure;
- e_select_names_model_changed (model);
-}
-
-void
-e_select_names_model_import_destinationv (ESelectNamesModel *model,
- gchar *destinationv)
-{
- EABDestination **destv;
- gint i;
-
- g_return_if_fail (model && E_IS_SELECT_NAMES_MODEL (model));
-
- destv = eab_destination_importv (destinationv);
-
- e_select_names_model_delete_all (model);
-
- if (destv == NULL)
- return;
-
- for (i = 0; destv[i]; i++) {
- eab_destination_use_contact (destv[i], send_changed, model);
- e_select_names_model_append (model, destv[i]);
- }
- g_free (destv);
-}
-
-EContact *
-e_select_names_model_get_contact (ESelectNamesModel *model, gint index)
-{
- const EABDestination *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 ? eab_destination_get_contact (dest) : NULL;
-
-}
-
-const gchar *
-e_select_names_model_get_string (ESelectNamesModel *model, gint index)
-{
- const EABDestination *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 ? eab_destination_get_textrep (dest, FALSE) : "";
-}
-
-static void
-connect_destination (ESelectNamesModel *model, EABDestination *dest)
-{
- g_signal_connect (dest,
- "changed",
- G_CALLBACK (destination_changed_proxy),
- model);
-}
-
-static void
-disconnect_destination (ESelectNamesModel *model, EABDestination *dest)
-{
- g_signal_handlers_disconnect_by_func (dest, destination_changed_proxy, model);
-}
-
-gboolean
-e_select_names_model_contains (ESelectNamesModel *model, const EABDestination *dest)
-{
- GList *iter;
-
- g_return_val_if_fail (E_IS_SELECT_NAMES_MODEL (model), FALSE);
- g_return_val_if_fail (EAB_IS_DESTINATION (dest), FALSE);
-
- for (iter = model->priv->data; iter != NULL; iter = g_list_next (iter)) {
- if (iter->data != NULL && eab_destination_equal (dest, EAB_DESTINATION (iter->data)))
- return TRUE;
- }
-
- return FALSE;
-}
-
-void
-e_select_names_model_insert (ESelectNamesModel *model, gint index, EABDestination *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 && EAB_IS_DESTINATION (dest));
-
- if (e_select_names_model_at_limit (model)) {
- /* FIXME: This is bad. */
- g_object_unref (dest);
- return;
- }
-
- connect_destination (model, dest);
-
- model->priv->data = g_list_insert (model->priv->data, dest, index);
-
- g_object_ref (dest);
-
- e_select_names_model_changed (model);
-}
-
-void
-e_select_names_model_append (ESelectNamesModel *model, EABDestination *dest)
-{
- g_return_if_fail (model && E_IS_SELECT_NAMES_MODEL (model));
- g_return_if_fail (dest && EAB_IS_DESTINATION (dest));
-
- if (e_select_names_model_at_limit (model)) {
- /* FIXME: This is bad. */
- g_object_unref (dest);
- return;
- }
-
- connect_destination (model, dest);
-
- model->priv->data = g_list_append (model->priv->data, dest);
-
- g_object_ref (dest);
-
- e_select_names_model_changed (model);
-}
-
-void
-e_select_names_model_replace (ESelectNamesModel *model, gint index, EABDestination *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 && EAB_IS_DESTINATION (dest));
-
- new_str = eab_destination_get_textrep (dest, FALSE);
- 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);
- g_object_ref (dest);
-
- } else {
-
- node = g_list_nth (model->priv->data, index);
-
- if (node->data != dest) {
-
- disconnect_destination (model, EAB_DESTINATION (node->data));
- connect_destination (model, dest);
-
- old_str = eab_destination_get_textrep (EAB_DESTINATION (node->data), FALSE);
- old_strlen = old_str ? strlen (old_str) : 0;
-
- g_object_unref (node->data);
-
- node->data = dest;
- g_object_ref (dest);
- }
- }
-
- e_select_names_model_changed (model);
-
- g_signal_emit (model, e_select_names_model_signals[E_SELECT_NAMES_MODEL_RESIZED], 0,
- index, old_strlen, new_strlen);
-}
-
-void
-e_select_names_model_delete (ESelectNamesModel *model, gint index)
-{
- GList *node;
- EABDestination *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 = EAB_DESTINATION (node->data);
-
- disconnect_destination (model, dest);
- g_object_unref (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, gboolean clean_last_entry)
-{
- GList *iter, *next;
- gboolean changed = FALSE;
-
- g_return_if_fail (model != NULL && E_IS_SELECT_NAMES_MODEL (model));
-
- iter = model->priv->data;
-
- while (iter) {
- EABDestination *dest;
-
- next = g_list_next (iter);
-
- if (next == NULL && !clean_last_entry)
- break;
-
- dest = iter->data ? EAB_DESTINATION (iter->data) : NULL;
-
- if (dest == NULL || eab_destination_is_empty (dest)) {
- if (dest) {
- disconnect_destination (model, dest);
- g_object_unref (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), EAB_DESTINATION (data));
- g_object_unref (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 EABDestination *d = e_select_names_model_get_destination (src, i);
- if (d)
- e_select_names_model_append (dest, eab_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 EABDestination *d = e_select_names_model_get_destination (src, i);
- if (d && !e_select_names_model_contains (dest, d))
- e_select_names_model_append (dest, eab_destination_copy (d));
- }
-}
-
-void
-e_select_names_model_name_pos (ESelectNamesModel *model, gint seplen, gint index, gint *pos, gint *length)
-{
- gint rp = 0, i, len = 0;
- GList *iter;
- const gchar *str;
-
- g_return_if_fail (E_IS_SELECT_NAMES_MODEL (model));
- g_return_if_fail (seplen > 0);
-
- i = 0;
- iter = model->priv->data;
- while (iter && i <= index) {
- rp += len + (i > 0 ? seplen : 0);
- str = eab_destination_get_textrep (EAB_DESTINATION (iter->data), FALSE);
- len = str ? g_utf8_strlen (str, -1) : 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 seplen, 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 (E_IS_SELECT_NAMES_MODEL (model));
- g_return_if_fail (seplen > 0);
-
- iter = model->priv->data;
-
- while (iter != NULL) {
- str = eab_destination_get_textrep (EAB_DESTINATION (iter->data), FALSE);
- len = str ? g_utf8_strlen (str, -1) : 0;
-
- if (sp <= pos && pos <= sp + len + adj) {
- break;
- }
-
- sp += len + adj + 1;
- adj = seplen-1;
- ++i;
-
- iter = g_list_next (iter);
- }
-
- if (i != 0)
- sp += seplen-1; /* 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_load_all_contacts (ESelectNamesModel *model, EBook *book)
-{
- 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)) {
- EABDestination *dest = EAB_DESTINATION (iter->data);
- if (!eab_destination_is_empty (dest)) {
-
- eab_destination_load_contact (dest, book);
- }
- }
-}
-
-void
-e_select_names_model_cancel_all_contact_load (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)) {
- EABDestination *dest = EAB_DESTINATION (iter->data);
- if (!eab_destination_is_empty (dest)) {
-
- eab_destination_cancel_contact_load (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 0d21ee86b3..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-model.h
+++ /dev/null
@@ -1,88 +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 <libebook/e-contact.h>
-#include <addressbook/util/eab-destination.h>
-
-#define E_TYPE_SELECT_NAMES_MODEL (e_select_names_model_get_type ())
-#define E_SELECT_NAMES_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_SELECT_NAMES_MODEL, ESelectNamesModel))
-#define E_SELECT_NAMES_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_SELECT_NAMES_MODEL, ESelectNamesModelClass))
-#define E_IS_SELECT_NAMES_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_SELECT_NAMES_MODEL))
-#define E_IS_SELECT_NAMES_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_SELECT_NAMES_MODEL))
-
-typedef struct _ESelectNamesModel ESelectNamesModel;
-typedef struct _ESelectNamesModelClass ESelectNamesModelClass;
-struct _ESelectNamesModelPrivate;
-
-struct _ESelectNamesModel {
- GObject object;
-
- struct _ESelectNamesModelPrivate *priv;
-};
-
-struct _ESelectNamesModelClass {
- GObjectClass parent_class;
-
- void (*changed) (ESelectNamesModel *model);
- void (*resized) (ESelectNamesModel *model, gint index, gint old_len, gint new_len);
-};
-
-GType e_select_names_model_get_type (void);
-
-ESelectNamesModel *e_select_names_model_new (void);
-ESelectNamesModel *e_select_names_model_duplicate (ESelectNamesModel *old);
-
-gchar *e_select_names_model_get_textification (ESelectNamesModel *model, const char *separator);
-gchar *e_select_names_model_get_address_text (ESelectNamesModel *model, const char *separator);
-
-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 EABDestination *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);
-EContact *e_select_names_model_get_contact (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 EABDestination *dest);
-
-void e_select_names_model_insert (ESelectNamesModel *model, gint index, EABDestination *dest);
-void e_select_names_model_append (ESelectNamesModel *model, EABDestination *dest);
-void e_select_names_model_replace (ESelectNamesModel *model, gint index, EABDestination *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, gboolean clean_last_entry);
-
-void e_select_names_model_name_pos (ESelectNamesModel *model, gint seplen, gint index, gint *pos, gint *length);
-void e_select_names_model_text_pos (ESelectNamesModel *model, gint seplen, gint pos, gint *index, gint *start_pos, gint *length);
-
-void e_select_names_model_load_all_contacts (ESelectNamesModel *model, EBook *book);
-void e_select_names_model_cancel_all_contact_load (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 bb0f331516..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-popup.c
+++ /dev/null
@@ -1,399 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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/gtkimage.h>
-#include <gtk/gtkmenuitem.h>
-#include <gtk/gtkimagemenuitem.h>
-#include <gtk/gtkcheckmenuitem.h>
-#include <gtk/gtkradiomenuitem.h>
-#include <gtk/gtkseparatormenuitem.h>
-#include <gtk/gtklabel.h>
-#include <libgnome/gnome-i18n.h>
-
-#include <addressbook/util/eab-book-util.h>
-#include <addressbook/gui/contact-editor/e-contact-editor.h>
-#include <addressbook/gui/contact-list-editor/e-contact-list-editor.h>
-#include <addressbook/gui/contact-editor/e-contact-quick-add.h>
-#include "eab-gui-util.h"
-#include "e-select-names-popup.h"
-
-#define LIST_ICON_FILENAME "contact-list-16.png"
-#define CONTACT_ICON_FILENAME "evolution-contacts-mini.png"
-
-typedef struct _PopupInfo PopupInfo;
-struct _PopupInfo {
- ESelectNamesTextModel *text_model;
- EABDestination *dest;
- gint pos;
- gint index;
-};
-
-static PopupInfo *
-popup_info_new (ESelectNamesTextModel *text_model, EABDestination *dest, gint pos, gint index)
-{
- PopupInfo *info = g_new0 (PopupInfo, 1);
- info->text_model = text_model;
- info->dest = dest;
- info->pos = pos;
- info->index = index;
-
- if (text_model)
- g_object_ref (text_model);
-
- if (dest)
- g_object_ref (dest);
-
- return info;
-}
-
-static void
-popup_info_free (PopupInfo *info)
-{
- if (info) {
-
- if (info->text_model)
- g_object_unref (info->text_model);
-
- if (info->dest)
- g_object_unref (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... */
-
-#if TOO_MANY_MENU_ITEMS
-static void
-make_contact_editor_cb (EBook *book, gpointer user_data)
-{
- if (book) {
- EABDestination *dest = EAB_DESTINATION (user_data);
- EContact *contact;
-
- contact = (EContact *) eab_destination_get_contact (dest);
- if (e_contact_get (contact, E_CONTACT_IS_LIST)) {
- EContactListEditor *ce;
- ce = e_addressbook_show_contact_list_editor (book, contact, FALSE, TRUE);
- e_contact_list_editor_raise (ce);
- }
- else {
- EContactEditor *ce;
- ce = e_addressbook_show_contact_editor (book, contact, FALSE, TRUE);
- e_contact_editor_raise (ce);
- }
- g_object_unref (dest);
- }
-}
-
-static void
-edit_contact_info_cb (GtkWidget *w, gpointer user_data)
-{
- PopupInfo *info = (PopupInfo *) user_data;
- if (info == NULL)
- return;
-
- g_object_ref (info->dest);
- e_book_use_default_book (make_contact_editor_cb, (gpointer) info->dest);
-}
-#endif
-
-static void
-change_email_num_cb (GtkWidget *w, gpointer user_data)
-{
- PopupInfo *info = (PopupInfo *) user_data;
- gint n;
- EABDestination *dest;
-
- if (info == NULL)
- return;
-
- if (! GTK_CHECK_MENU_ITEM (w)->active)
- return;
-
- n = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (w), "number"));
-
- if (n != eab_destination_get_email_num (info->dest)) {
- dest = eab_destination_new ();
- eab_destination_set_contact (dest, eab_destination_get_contact (info->dest), n);
- e_select_names_model_replace (info->text_model->source, info->index, dest);
- }
-}
-
-#if TOO_MANY_MENU_ITEMS
-static void
-remove_recipient_cb (GtkWidget *w, gpointer user_data)
-{
- PopupInfo *info = (PopupInfo *) user_data;
- e_select_names_model_delete (info->text_model->source, info->index);
-}
-
-static void
-remove_all_recipients_cb (GtkWidget *w, gpointer user_data)
-{
- PopupInfo *info = (PopupInfo *) user_data;
- e_select_names_model_delete_all (info->text_model->source);
-}
-
-static void
-toggle_html_mail_cb (GtkWidget *w, gpointer user_data)
-{
- PopupInfo *info = (PopupInfo *) user_data;
- GtkCheckMenuItem *item = GTK_CHECK_MENU_ITEM (w);
- const EABDestination *dest;
-
- if (info == NULL)
- return;
-
- dest = info->dest;
-
- item = GTK_CHECK_MENU_ITEM (item);
- eab_destination_set_html_mail_pref ((EABDestination *) dest, item->active);
-}
-#endif
-
-static void
-populate_popup_contact (GtkWidget *pop, gboolean list, PopupInfo *info)
-{
- GtkWidget *image;
- EContact *contact;
- GtkWidget *menuitem;
- GList *email_list;
-
- contact = eab_destination_get_contact (info->dest);
-
-#if TOO_MANY_MENU_ITEMS
- menuitem = gtk_separator_menu_item_new();
- gtk_widget_show (menuitem);
- gtk_menu_shell_prepend (GTK_MENU_SHELL (pop), menuitem);
-
- menuitem = gtk_menu_item_new_with_label (_("Remove All"));
- g_signal_connect (menuitem, "activate",
- G_CALLBACK (remove_all_recipients_cb),
- info);
- gtk_widget_show (menuitem);
- gtk_menu_shell_prepend (GTK_MENU_SHELL (pop), menuitem);
-
- menuitem = gtk_menu_item_new_with_label (_("Remove"));
- g_signal_connect (menuitem, "activate",
- G_CALLBACK (remove_recipient_cb),
- info);
- gtk_widget_show (menuitem);
- gtk_menu_shell_prepend (GTK_MENU_SHELL (pop), menuitem);
-
- menuitem = gtk_menu_item_new_with_label (list ? _("View Contact List") : _("View Contact Info"));
- g_signal_connect (menuitem, "activate",
- G_CALLBACK (edit_contact_info_cb),
- info);
- gtk_widget_show (menuitem);
- gtk_menu_shell_prepend (GTK_MENU_SHELL (pop), menuitem);
-
- menuitem = gtk_check_menu_item_new_with_label (_("Send HTML Mail?"));
- gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menuitem),
- eab_destination_get_html_mail_pref (info->dest));
- g_signal_connect (menuitem, "toggled",
- G_CALLBACK (toggle_html_mail_cb),
- info);
- gtk_widget_show (menuitem);
- gtk_menu_shell_prepend (GTK_MENU_SHELL (pop), menuitem);
-#endif
-
- email_list = e_contact_get (contact, E_CONTACT_EMAIL);
-
- if (email_list) {
- menuitem = gtk_separator_menu_item_new();
- gtk_widget_show (menuitem);
- gtk_menu_shell_prepend (GTK_MENU_SHELL (pop), menuitem);
-
- if (g_list_length (email_list) > 1) {
- GList *l;
- GSList *radiogroup = NULL;
- gint n = eab_destination_get_email_num (info->dest);
- gint j = g_list_length (email_list) - 1;
-
- for (l = g_list_last (email_list); l; l = l->prev) {
- char *email = l->data;
- char *label = NULL;
-
- if (!strncmp (email, "<?xml", 5)) {
- EABDestination *dest = eab_destination_import (email);
- if (dest) {
- label = g_strdup (eab_destination_get_textrep (dest, TRUE));
- g_object_unref (dest);
- }
- }
- else {
- label = g_strdup (email);
- }
-
- if (list) {
- menuitem = gtk_menu_item_new_with_label (label);
- }
- else {
- menuitem = gtk_radio_menu_item_new_with_label (radiogroup, label);
- g_signal_connect (menuitem, "toggled",
- G_CALLBACK (change_email_num_cb),
- info);
- if (j == n)
- gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menuitem), TRUE);
-
- g_object_set_data (G_OBJECT (menuitem), "number", GINT_TO_POINTER (j));
- radiogroup = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menuitem));
- }
-
- gtk_widget_show (menuitem);
- gtk_menu_shell_prepend (GTK_MENU_SHELL (pop), menuitem);
-
- j--;
-
- g_free (label);
- }
- } else {
- menuitem = gtk_menu_item_new_with_label (eab_destination_get_email (info->dest));
- gtk_widget_show (menuitem);
- gtk_menu_shell_prepend (GTK_MENU_SHELL (pop), menuitem);
- }
-
- g_list_foreach (email_list, (GFunc)g_free, NULL);
- g_list_free (email_list);
- }
-
- menuitem = gtk_separator_menu_item_new ();
- gtk_widget_show (menuitem);
- gtk_menu_shell_prepend (GTK_MENU_SHELL (pop), menuitem);
-
- image = gtk_image_new_from_file (list
- ? EVOLUTION_IMAGESDIR "/" LIST_ICON_FILENAME
- : EVOLUTION_IMAGESDIR "/" CONTACT_ICON_FILENAME);
- gtk_widget_show (image);
- menuitem = gtk_image_menu_item_new_with_label (eab_destination_get_name (info->dest));
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem),
- image);
- gtk_widget_show (menuitem);
- gtk_menu_shell_prepend (GTK_MENU_SHELL (pop), menuitem);
-}
-
-static void
-quick_add_cb (GtkWidget *w, gpointer user_data)
-{
- PopupInfo *info = (PopupInfo *) user_data;
- e_contact_quick_add_free_form (eab_destination_get_address (info->dest), NULL, NULL);
-}
-
-static void
-populate_popup_nocontact (GtkWidget *pop, PopupInfo *info)
-{
- const gchar *str;
- GtkWidget *menuitem;
-
- menuitem = gtk_separator_menu_item_new ();
- gtk_widget_show (menuitem);
- gtk_menu_shell_prepend (GTK_MENU_SHELL (pop), menuitem);
-
- menuitem = gtk_menu_item_new_with_label (_("Add to Contacts"));
- gtk_widget_show (menuitem);
- gtk_menu_shell_prepend (GTK_MENU_SHELL (pop), menuitem);
- g_signal_connect (menuitem, "activate",
- G_CALLBACK (quick_add_cb),
- info);
-
-#if TOO_MANY_MENU_ITEMS
- menuitem = gtk_check_menu_item_new_with_label (_("Send HTML Mail?"));
- gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menuitem),
- eab_destination_get_html_mail_pref (info->dest));
- g_signal_connect (menuitem, "toggled",
- G_CALLBACK (toggle_html_mail_cb),
- info);
- gtk_widget_show (menuitem);
- gtk_menu_shell_prepend (GTK_MENU_SHELL (pop), menuitem);
-#endif
-
- menuitem = gtk_separator_menu_item_new ();
- gtk_widget_show (menuitem);
- gtk_menu_shell_prepend (GTK_MENU_SHELL (pop), menuitem);
-
- str = eab_destination_get_name (info->dest);
- if (! (str && *str))
- str = eab_destination_get_email (info->dest);
- if (! (str && *str))
- str = _("Unnamed Contact");
-
- menuitem = gtk_menu_item_new_with_label (str);
- gtk_widget_show (menuitem);
- gtk_menu_shell_prepend (GTK_MENU_SHELL (pop), menuitem);
-}
-
-void
-e_select_names_populate_popup (GtkWidget *menu, ESelectNamesTextModel *text_model,
- GdkEventButton *ev, gint pos, GtkWidget *for_widget)
-{
- ESelectNamesModel *model;
- PopupInfo *info;
- EABDestination *dest;
- gint index;
-
- g_return_if_fail (GTK_IS_MENU_SHELL (menu));
- g_return_if_fail (E_IS_SELECT_NAMES_TEXT_MODEL (text_model));
- g_return_if_fail (ev);
- g_return_if_fail (0 <= pos);
-
- model = text_model->source;
-
- e_select_names_model_text_pos (model, text_model->seplen, pos, &index, NULL, NULL);
- if (index < 0 || index >= e_select_names_model_count (model))
- return;
-
- /* XXX yuck, why does this return a const? */
- dest = (EABDestination *)e_select_names_model_get_destination (model, index);
- if (eab_destination_is_empty (dest))
- return;
-
- info = popup_info_new (text_model, dest, pos, index);
-
- if (eab_destination_get_contact (dest)) {
- populate_popup_contact (menu, eab_destination_is_evolution_list (dest), info);
- } else {
- populate_popup_nocontact (menu, info);
- }
-
- /* Clean up our info item after we've made our selection. */
- g_signal_connect (menu,
- "selection-done",
- G_CALLBACK (popup_info_cleanup),
- 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 531275190b..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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-text-model.h"
-
-void e_select_names_populate_popup (GtkWidget *menu, ESelectNamesTextModel *text_model,
- GdkEventButton *ev, gint pos, GtkWidget *for_widget);
-
-#endif /* __E_SELECT_NAMES_POPUP_H__ */
-
diff --git a/addressbook/gui/component/select-names/e-select-names-section.etspec b/addressbook/gui/component/select-names/e-select-names-section.etspec
deleted file mode 100644
index 9d7b038892..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-section.etspec
+++ /dev/null
@@ -1,7 +0,0 @@
-<ETableSpecification no-headers="true" cursor-mode="line" alternating-row-colors="false">
- <ETableColumn model_col= "0" _title="Name" expansion="1.0" minimum_width="20" resizable="true" cell="string" compare="collate" search="string"/>
- <ETableState>
- <column source="0"/>
- <grouping> <leaf column="0" ascending="true"/> </grouping>
- </ETableState>
-</ETableSpecification>
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 aaa6936c8d..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-table-model.c
+++ /dev/null
@@ -1,366 +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 <libgnome/gnome-i18n.h>
-#include <libebook/e-contact.h>
-#include "e-select-names-table-model.h"
-
-/* Object argument IDs */
-enum {
- PROP_0,
- PROP_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_dispose (GObject *object);
-static void e_select_names_table_model_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
-static void e_select_names_table_model_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
-static void e_select_names_table_model_model_changed (ESelectNamesModel *source,
- ESelectNamesTableModel *model);
-
-static ETableModelClass *parent_class = NULL;
-
-static void
-e_select_names_table_model_add_source (ESelectNamesTableModel *model,
- ESelectNamesModel *source)
-{
- model->source = source;
- if (model->source)
- g_object_ref(model->source);
- model->source_changed_id = g_signal_connect(model->source, "changed",
- G_CALLBACK(e_select_names_table_model_model_changed),
- model);
-}
-
-static void
-e_select_names_table_model_drop_source (ESelectNamesTableModel *model)
-{
- if (model->source_changed_id)
- g_signal_handler_disconnect(model->source, model->source_changed_id);
- if (model->source)
- g_object_unref(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.
- **/
-GType
-e_select_names_table_model_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (ESelectNamesTableModelClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) e_select_names_table_model_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (ESelectNamesTableModel),
- 0, /* n_preallocs */
- (GInstanceInitFunc) e_select_names_table_model_init,
- };
-
- type = g_type_register_static (e_table_model_get_type (), "ESelectNamesTableModel", &info, 0);
- }
-
- return 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 = g_object_new (E_TYPE_SELECT_NAMES_TABLE_MODEL, NULL);
- g_object_set(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 EABDestination *dest = e_select_names_model_get_destination (model->source, i);
- EContact *contact = dest ? eab_destination_get_contact (dest) : NULL;
-
- if (contact) {
- model->data[i].name = e_contact_get(contact, E_CONTACT_FULL_NAME);
- if (model->data[i].name == 0)
- model->data[i].name = g_strdup("");
- model->data[i].email = e_contact_get(contact, E_CONTACT_EMAIL_1);
- if (model->data[i].email == 0)
- model->data[i].email = g_strdup("");
- } else {
- const gchar *name = eab_destination_get_name (dest);
- const gchar *email = eab_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)
-{
- if (model->data) {
- 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_dispose (GObject *object)
-{
- ESelectNamesTableModel *model;
-
- model = E_SELECT_NAMES_TABLE_MODEL (object);
-
- e_select_names_table_model_drop_source (model);
- clear_info(model);
-
- if (G_OBJECT_CLASS (parent_class)->dispose)
- G_OBJECT_CLASS (parent_class)->dispose (object);
-}
-
-/* This function returns the number of columns in our ETableModel. */
-static int
-e_select_names_table_model_col_count (ETableModel *etc)
-{
- return 3;
-}
-
-/* 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;
- case 2:
- /* underline column*/
- return (void*)TRUE;
- 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)
-{
- e_table_model_pre_change(E_TABLE_MODEL(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_property (GObject *object, guint prop_id,
- const GValue *value, GParamSpec *pspec)
-{
- ESelectNamesTableModel *model;
-
- model = E_SELECT_NAMES_TABLE_MODEL (object);
-
- switch (prop_id) {
- case PROP_SOURCE:
- e_select_names_table_model_drop_source (model);
- e_select_names_table_model_add_source (model, E_SELECT_NAMES_MODEL(g_value_get_object (value)));
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-/* Get_arg handler for the model */
-static void
-e_select_names_table_model_get_property (GObject *object, guint prop_id,
- GValue *value, GParamSpec *pspec)
-{
- ESelectNamesTableModel *model;
-
- model = E_SELECT_NAMES_TABLE_MODEL (object);
-
- switch (prop_id) {
- case PROP_SOURCE:
- g_value_set_object (value, model->source);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- 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)
-{
- GObjectClass *object_class;
- ETableModelClass *table_model_class;
-
- object_class = G_OBJECT_CLASS(klass);
- table_model_class = E_TABLE_MODEL_CLASS(klass);
-
- parent_class = g_type_class_peek_parent (klass);
-
- object_class->dispose = e_select_names_table_model_dispose;
- object_class->get_property = e_select_names_table_model_get_property;
- object_class->set_property = e_select_names_table_model_set_property;
-
- g_object_class_install_property (object_class, PROP_SOURCE,
- g_param_spec_object ("source",
- _("Source"),
- /*_( */"XXX blurb" /*)*/,
- E_TYPE_SELECT_NAMES_MODEL,
- G_PARAM_READWRITE));
-
- 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 1fd1026f19..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) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_SELECT_NAMES_TABLE_MODEL, ESelectNamesTableModel))
-#define E_SELECT_NAMES_TABLE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_SELECT_NAMES_TABLE_MODEL, ESelectNamesTableModelClass))
-#define E_IS_SELECT_NAMES_TABLE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_SELECT_NAMES_TABLE_MODEL))
-#define E_IS_SELECT_NAMES_TABLE_MODEL_CLASS(klass) (G_TYPE_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 */
-GType 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 e885de5bf6..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-text-model.c
+++ /dev/null
@@ -1,852 +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 <libgnome/gnome-i18n.h>
-
-#include <addressbook/gui/contact-editor/e-contact-editor.h>
-#include "e-select-names-text-model.h"
-#include "eab-gui-util.h"
-
-static FILE *out = NULL; /* stream for debugging spew */
-
-/* Object argument IDs */
-enum {
- PROP_0,
- PROP_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_dispose (GObject *object);
-static void e_select_names_text_model_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
-static void e_select_names_text_model_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
-
-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);
-
-
-static 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 GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (ESelectNamesTextModelClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) e_select_names_text_model_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (ESelectNamesTextModel),
- 0, /* n_preallocs */
- (GInstanceInitFunc) e_select_names_text_model_init,
- };
-
- type = g_type_register_static (PARENT_TYPE, "ESelectNamesTextModel", &info, 0);
- }
-
- return type;
-}
-
-static void
-e_select_names_text_model_class_init (ESelectNamesTextModelClass *klass)
-{
- GObjectClass *object_class;
- ETextModelClass *text_model_class;
-
- object_class = G_OBJECT_CLASS(klass);
- text_model_class = E_TEXT_MODEL_CLASS(klass);
-
- parent_class = g_type_class_peek_parent (klass);
-
- object_class->dispose = e_select_names_text_model_dispose;
- object_class->get_property = e_select_names_text_model_get_property;
- object_class->set_property = e_select_names_text_model_set_property;
-
- g_object_class_install_property (object_class, PROP_SOURCE,
- g_param_spec_object ("source",
- _("Source"),
- /*_( */"XXX blurb" /*)*/,
- E_TYPE_SELECT_NAMES_MODEL,
- G_PARAM_READWRITE));
-
- 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_contact (model, i) ? "<contact>" : "");
- fprintf (out, "\n");
-}
-
-static void
-e_select_names_text_model_init (ESelectNamesTextModel *model)
-{
- const gchar *default_sep;
-
- model->last_magic_comma_pos = -1;
-
- if (getenv ("EVOLUTION_DISABLE_MAGIC_COMMA"))
- default_sep = ",";
- else
- default_sep = ", ";
-
- e_select_names_text_model_set_separator (model, default_sep);
-}
-
-static void
-e_select_names_text_model_dispose (GObject *object)
-{
- ESelectNamesTextModel *model;
-
- model = E_SELECT_NAMES_TEXT_MODEL (object);
-
- if (model->text) {
- g_free (model->text);
- model->text = NULL;
- }
- if (model->sep) {
- g_free (model->sep);
- model->sep = NULL;
- }
-
- e_select_names_text_model_set_source (model, NULL);
-
- if (G_OBJECT_CLASS(parent_class)->dispose)
- G_OBJECT_CLASS(parent_class)->dispose(object);
-}
-
-static void
-e_select_names_text_model_set_property (GObject *object, guint prop_id,
- const GValue *value, GParamSpec *pspec)
-{
- ESelectNamesTextModel *model;
-
- model = E_SELECT_NAMES_TEXT_MODEL (object);
-
- switch (prop_id) {
- case PROP_SOURCE:
- e_select_names_text_model_set_source(model, E_SELECT_NAMES_MODEL (g_value_get_object(value)));
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-e_select_names_text_model_get_property (GObject *object, guint prop_id,
- GValue *value, GParamSpec *pspec)
-{
- ESelectNamesTextModel *model;
-
- model = E_SELECT_NAMES_TEXT_MODEL (object);
-
- switch (prop_id) {
- case PROP_SOURCE:
- g_value_set_object (value, model->source);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- 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;
- gint seplen = E_SELECT_NAMES_TEXT_MODEL (model)->seplen;
-
- e_select_names_model_name_pos (source, seplen, 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
-changed_cb (ESelectNamesModel *source, ETextModel *model)
-{
- ESelectNamesTextModel *text_model = E_SELECT_NAMES_TEXT_MODEL (model);
-
- g_free (text_model->text);
- text_model->text = NULL;
-
- e_text_model_changed (model);
-}
-
-
-static void
-e_select_names_text_model_set_source (ESelectNamesTextModel *model,
- ESelectNamesModel *source)
-{
- if (source == model->source)
- return;
-
- if (model->source) {
- g_signal_handler_disconnect (model->source, model->source_changed_id);
- g_signal_handler_disconnect (model->source, model->source_resize_id);
- g_object_unref (model->source);
- }
-
- model->source = source;
-
- if (model->source) {
- g_object_ref (model->source);
- model->source_changed_id = g_signal_connect (model->source,
- "changed",
- G_CALLBACK (changed_cb),
- model);
- model->source_resize_id = g_signal_connect (model->source,
- "resized",
- G_CALLBACK (resize_cb),
- model);
- }
-}
-
-ETextModel *
-e_select_names_text_model_new (ESelectNamesModel *source)
-{
- ETextModel *model = g_object_new (E_TYPE_SELECT_NAMES_TEXT_MODEL, NULL);
- e_select_names_text_model_set_source (E_SELECT_NAMES_TEXT_MODEL (model), source);
- return model;
-}
-
-void
-e_select_names_text_model_set_separator (ESelectNamesTextModel *model, const char *sep)
-{
- g_return_if_fail (E_IS_SELECT_NAMES_TEXT_MODEL (model));
- g_return_if_fail (sep && *sep);
-
- g_free (model->sep);
- model->sep = g_strdup (sep);
- model->seplen = g_utf8_strlen (sep, -1);
-}
-
-static const gchar *
-e_select_names_text_model_get_text (ETextModel *model)
-{
- ESelectNamesTextModel *snm = E_SELECT_NAMES_TEXT_MODEL(model);
-
- if (snm == NULL)
- return "";
- else if (snm->text == NULL)
- snm->text = e_select_names_model_get_textification (snm->source, snm->sep);
-
- return snm->text;
-}
-
-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, g_utf8_strlen (text, -1));
-}
-
-static void
-e_select_names_text_model_insert_length (ETextModel *model, gint pos, const gchar *text, gint length)
-{
- ESelectNamesTextModel *text_model = E_SELECT_NAMES_TEXT_MODEL (model);
- ESelectNamesModel *source = text_model->source;
- const char *t;
- gchar *tmp;
-
- if (out) {
- tmp = g_strndup (text, length);
- fprintf (out, ">> insert \"%s\" (len=%d) at %d\n", tmp, length, pos);
- g_free (tmp);
- }
-
- tmp = e_select_names_model_get_textification (source, text_model->sep);
- pos = CLAMP (pos, 0, g_utf8_strlen (tmp, -1));
- g_free (tmp);
-
- /* We want to control all cursor motions ourselves, rather than taking hints
- from the ESelectNamesModel. */
- g_signal_handler_block (source, text_model->source_resize_id);
-
- /* We handle this one character at a time. */
-
- for (t = text; length >= 0; t = g_utf8_next_char (t), length--) {
- gint index, start_pos, text_len;
- gboolean inside_quote = FALSE;
- gunichar ut = g_utf8_get_char (t);
-
- if (ut == 0)
- break;
-
- text_model->last_magic_comma_pos = -1;
-
- if (out)
- fprintf (out, "processing [%d]\n", ut);
-
- e_select_names_model_text_pos (source, text_model->seplen, pos, &index, &start_pos, &text_len);
-
- if (out)
- fprintf (out, "index=%d start_pos=%d text_len=%d\n", index, start_pos, text_len);
-
- /* Is this a quoted or an unquoted separator we are dealing with? */
- if (ut == g_utf8_get_char(text_model->sep) && index >= 0) {
- const EABDestination *dest = e_select_names_model_get_destination (source, index);
- if (dest) {
- const gchar *str = eab_destination_get_textrep (dest, FALSE);
- int j;
- const char *jp;
-
- if (out)
- fprintf (out, "str=%s pos=%d\n", str, pos);
-
- for (jp = str, j = 0; j<pos-start_pos && *jp; jp = g_utf8_next_char (jp), ++j) {
- if (*jp == '"') {
- 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 (ut == g_utf8_get_char (text_model->sep) && !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, eab_destination_new ());
- e_select_names_model_insert (source, 0, eab_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, eab_destination_new ());
-
- repos.model = model;
- repos.pos = pos;
- repos.len = text_model->seplen;
- e_text_model_reposition (model, e_repos_insert_shift, &repos);
- pos += text_model->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);
- EABDestination *d1 = eab_destination_new (), *d2 = eab_destination_new ();
-
- eab_destination_set_raw (d1, str1);
- eab_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 = text_model->seplen;
- e_text_model_reposition (model, e_repos_insert_shift, &repos);
- pos += text_model->seplen;
- }
-
- if (text_model->seplen > 1)
- text_model->last_magic_comma_pos = pos;
-
- } else {
- EReposInsertShift repos;
- gint offset = MAX (pos - start_pos, 0);
- const gchar *str;
- GString *new_str = g_string_new (NULL);
- gint this_length = 1;
- gboolean whitespace = g_unichar_isspace (ut);
-
- 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" */
- /* FIXME: This code does the wrong thing if seplen > 2 */
- g_string_append_unichar (new_str, ut);
- g_string_append (new_str, pos < start_pos ? " " : "");
- g_string_append (new_str, str);
- if (pos < start_pos)
- ++this_length;
- }
- } else {
- const char *u;
- int n;
- for (u = str, n = 0; n < offset; u = g_utf8_next_char (u), n++)
- g_string_append_unichar (new_str, g_utf8_get_char (u));
- g_string_append_unichar (new_str, ut);
- g_string_append (new_str, u);
- }
- } else {
- if (whitespace) {
- /* swallow leading whitespace */
- this_length = 0;
- } else {
- g_string_append_unichar (new_str, ut);
- }
- }
-
- if (new_str->len) {
-
- EABDestination *dest;
- dest = index >= 0 ? eab_destination_copy (e_select_names_model_get_destination (source, index)) : eab_destination_new ();
- eab_destination_set_raw (dest, new_str->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_string_free (new_str, TRUE);
- }
- }
-
- dump_model (text_model);
-
- g_signal_handler_unblock (source, text_model->source_resize_id);
-}
-
-
-static void
-e_select_names_text_model_delete (ETextModel *model, gint pos, gint length)
-{
- ESelectNamesTextModel *text_model = E_SELECT_NAMES_TEXT_MODEL (model);
- ESelectNamesModel *source = text_model->source;
- gint index, start_pos, text_len, offset;
-
- if (out) {
- const gchar *str = e_select_names_model_get_textification (source, text_model->sep);
- 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 (text_model->last_magic_comma_pos == pos+1 && length == 1) {
- pos -= text_model->seplen-1;
- if (pos >= 0)
- length = text_model->seplen;
- text_model->last_magic_comma_pos = -1;
- }
-
- e_select_names_model_text_pos (source, text_model->seplen, 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. */
- g_signal_handler_block (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;
- EABDestination *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%s", str1, text_model->sep+1, 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 = eab_destination_new ();
- eab_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 = text_model->seplen;
-
- 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 + text_model->seplen;
-
- e_text_model_reposition (model, e_repos_delete_shift, &repos);
-
- length -= text_len + text_model->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);
-
- if (str) {
- const char *p;
- char *np;
- int i;
- EReposDeleteShift repos;
- EABDestination *dest;
-
- new_str = g_new0 (char, strlen (str) * 6 + 1); /* worse case it can't be any longer than this */
-
- /* copy the region before the deletion */
- for (p = str, i = 0, np = new_str; i < offset; i++) {
- gunichar ch;
-
- ch = g_utf8_get_char (p);
- g_unichar_to_utf8 (ch, np);
-
- np = g_utf8_next_char (np);
- p = g_utf8_next_char (p);
- }
-
- /* skip the deleted segment */
- for (i = 0; i < length; i++)
- p = g_utf8_next_char (p);
-
- /* copy the region after the deletion */
- for (; *p; p = g_utf8_next_char (p)) {
- gunichar ch;
-
- ch = g_utf8_get_char (p);
- g_unichar_to_utf8 (ch, np);
-
- np = g_utf8_next_char (np);
- }
-
- dest = index >= 0 ? eab_destination_copy (e_select_names_model_get_destination (source, index)) : eab_destination_new ();
- eab_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 = text_model->seplen;
-
- e_text_model_reposition (model, e_repos_delete_shift, &repos);
- }
- }
-
- finished:
- E_SELECT_NAMES_TEXT_MODEL (model)->last_magic_comma_pos = -1;
- g_signal_handler_unblock (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 EABDestination *dest;
- --i;
- dest = e_select_names_model_get_destination (source, i);
- if (eab_destination_get_contact (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 EABDestination *dest = e_select_names_model_get_destination (source, i);
- if (eab_destination_get_contact (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)
-{
- ESelectNamesTextModel *text_model = E_SELECT_NAMES_TEXT_MODEL (model);
- ESelectNamesModel *source = text_model->source;
- gint i, pos;
-
- i = nth_obj_index (source, n);
- if (i < 0)
- return NULL;
-
- e_select_names_model_name_pos (source, text_model->seplen, i, &pos, len);
- if (pos < 0)
- return NULL;
-
- if (text_model->text == NULL)
- text_model->text = e_select_names_model_get_textification (source, text_model->sep);
- return g_utf8_offset_to_pointer (text_model->text, pos);
-}
-
-static void
-e_select_names_text_model_activate_obj (ETextModel *model, gint n)
-{
-#if notyet
- /* XXX the new ebook doesn't have e_contact_get_book, and we
- don't really want to add it, so this can't be implemented
- this simply anymore */
- ESelectNamesModel *source = E_SELECT_NAMES_TEXT_MODEL (model)->source;
- EContact *contact;
- gint i;
-
- i = nth_obj_index (source, n);
- g_return_if_fail (i >= 0);
-
- contact = e_select_names_model_get_contact (source, i);
- g_return_if_fail (contact != NULL);
-
- /* present read-only contact editor when someone double clicks from here */
- if (e_contact_get (contact, E_CONTACT_IS_LIST)) {
- EContactListEditor *ce;
- ce = e_addressbook_show_contact_list_editor (e_contact_get_book(contact), contact, FALSE, FALSE);
- e_contact_list_editor_raise (ce);
- }
- else {
- EABContactEditor *ce;
- ce = e_addressbook_show_contact_editor (e_contact_get_book(contact), contact, FALSE, FALSE);
- e_contact_editor_raise (ce);
- }
-#endif
-}
-
-
-
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 eec062aee6..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-text-model.h
+++ /dev/null
@@ -1,53 +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) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_SELECT_NAMES_TEXT_MODEL, ESelectNamesTextModel))
-#define E_SELECT_NAMES_TEXT_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_SELECT_NAMES_TEXT_MODEL, ESelectNamesTextModelClass))
-#define E_IS_SELECT_NAMES_TEXT_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_SELECT_NAMES_TEXT_MODEL))
-#define E_IS_SELECT_NAMES_TEXT_MODEL_CLASS(klass) (G_TYPE_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;
-
- gchar *text;
-
- gchar *sep;
- gint seplen;
-
- gint last_magic_comma_pos;
-};
-
-struct _ESelectNamesTextModelClass {
- ETextModelClass parent_class;
-};
-
-ETextModel *e_select_names_text_model_new (ESelectNamesModel *source);
-void e_select_names_text_model_set_separator (ESelectNamesTextModel *model, const char *sep);
-
-/* Standard Gtk function */
-GType 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 3925857447..0000000000
--- a/addressbook/gui/component/select-names/e-select-names.c
+++ /dev/null
@@ -1,845 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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 <string.h>
-#include <glib.h>
-#include <gtk/gtk.h>
-#include <libgnome/gnome-i18n.h>
-
-#include <gal/e-table/e-table-simple.h>
-#include <gal/e-table/e-table-without.h>
-#include <gal/widgets/e-popup-menu.h>
-
-#include <libebook/e-book-async.h>
-#include <libebook/e-contact.h>
-#include <addressbook/gui/widgets/e-addressbook-model.h>
-#include <addressbook/gui/widgets/e-addressbook-table-adapter.h>
-#include <addressbook/util/eab-book-util.h>
-#include <addressbook/gui/component/addressbook-component.h>
-#include <addressbook/gui/component/addressbook.h>
-
-#include "e-select-names-config.h"
-#include "e-select-names.h"
-#include "e-select-names-table-model.h"
-#include <gal/widgets/e-categories-master-list-option-menu.h>
-#include <gal/e-text/e-entry.h>
-#include <e-util/e-categories-master-list-wombat.h>
-#include "e-util/e-sexp.h"
-
-static void e_select_names_init (ESelectNames *names);
-static void e_select_names_class_init (ESelectNamesClass *klass);
-static void e_select_names_dispose (GObject *object);
-static void update_query (GtkWidget *widget, ESelectNames *e_select_names);
-
-static void sync_table_and_models (ESelectNamesModel *triggering_model, ESelectNames *esl);
-
-static GtkDialogClass *parent_class = NULL;
-#define PARENT_TYPE gtk_dialog_get_type()
-
-/* The arguments we take */
-enum {
- ARG_0,
-};
-
-typedef struct {
- char *title;
- ESelectNamesModel *source;
- ESelectNamesTableModel *table_model;
- ESelectNames *names;
- GtkWidget *label;
- GtkWidget *button;
- GtkWidget *recipient_table;
- gulong changed_id;
-} ESelectNamesChild;
-
-GType
-e_select_names_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (ESelectNamesClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) e_select_names_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (ESelectNames),
- 0, /* n_preallocs */
- (GInstanceInitFunc) e_select_names_init,
- };
-
- type = g_type_register_static (PARENT_TYPE, "ESelectNames", &info, 0);
- }
-
- return type;
-}
-
-static void
-e_select_names_class_init (ESelectNamesClass *klass)
-{
- GObjectClass *object_class;
-
- object_class = G_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_peek_parent (klass);
-
- object_class->dispose = e_select_names_dispose;
-}
-
-GtkWidget *e_addressbook_create_ebook_table(char *name, char *string1, char *string2, int num1, int num2);
-
-static void
-search_result (EABModel *model, EBookViewStatus status, ESelectNames *esn)
-{
- sync_table_and_models (NULL, esn);
-}
-
-static void
-set_book(EBook *book, EBookStatus status, ESelectNames *esn)
-{
- g_object_set(esn->model,
- "book", book,
- NULL);
- update_query (NULL, esn);
- g_object_unref(book);
- g_object_unref(esn->model);
- g_object_unref(esn);
-}
-
-static ESource *
-find_first_source (ESourceList *source_list)
-{
- GSList *groups, *sources, *l, *m;
-
- groups = e_source_list_peek_groups (source_list);
- for (l = groups; l; l = l->next) {
- ESourceGroup *group = l->data;
-
- sources = e_source_group_peek_sources (group);
- for (m = sources; m; m = m->next) {
- ESource *source = m->data;
-
- return source;
- }
- }
-
- return NULL;
-}
-
-static void
-addressbook_model_set_source (ESelectNames *e_select_names, EABModel *model, ESource *source)
-{
- EBook *book;
-
- book = e_book_new();
-
- g_object_ref(e_select_names);
- g_object_ref(model);
-
- addressbook_load_source (book, source, (EBookCallback) set_book, e_select_names);
-}
-
-static void *
-contact_key (const EContact *contact)
-{
- EBook *book = NULL;
- const gchar *book_uri;
-
- if (contact == NULL)
- return NULL;
-
- g_assert (E_IS_CONTACT (contact));
-
-#if notyet
- /* XXX we need a way to reproduce this here somehow.. or at
- least make sure we never collide between two contacts in
- different books. */
- book = e_contact_get_book (contact);
-#endif
- book_uri = book ? e_book_get_uri (book) : "NoBook";
- return g_strdup_printf ("%s|%s", book_uri ? book_uri : "NoURI", (char*)e_contact_get_const ((EContact*)contact, E_CONTACT_UID));
-}
-
-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;
- EContact *contact;
- void *key;
-
- count = e_select_names_model_count (model);
- for (i = 0; i < count; ++i) {
- contact = e_select_names_model_get_contact (model, i);
- if (contact) {
- key = contact_key (contact);
- 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;
- const EContact *contact;
- EABDestination *dest = eab_destination_new ();
- gint mapped_row;
-
- mapped_row = e_table_subset_view_to_model_row (E_TABLE_SUBSET (names->without), model_row);
-
- contact = eab_model_contact_at (EAB_MODEL(names->model), mapped_row);
-
- if (contact != NULL) {
- eab_destination_set_contact (dest, (EContact*)contact, 0);
-
- e_select_names_model_append (child->source, dest);
- e_select_names_model_clean (child->source, FALSE);
- }
-}
-
-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
-sensitize_button (gpointer key, gpointer data, gpointer user_data)
-{
- gboolean *sensitive = user_data;
- ESelectNamesChild *child = data;
-
- gtk_widget_set_sensitive (child->button, *sensitive);
-}
-
-static void
-selection_change (ETable *table, ESelectNames *names)
-{
- gboolean sensitive;
-
- sensitive = e_table_selected_count (table) > 0;
-
- g_hash_table_foreach (names->children, sensitize_button, &sensitive);
-}
-
-static void *
-esn_get_key_fn (ETableModel *source, int row, void *closure)
-{
- EABModel *model = EAB_MODEL (closure);
- const EContact *contact = eab_model_contact_at (model, row);
- void *key = contact_key (contact);
- 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;
- EABModel *model;
- GtkWidget *table;
-
- model = eab_model_new ();
- adapter = E_TABLE_MODEL (eab_table_adapter_new (model));
-
- g_object_set(model,
- "editable", FALSE,
- 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);
-
- table = e_table_scrolled_new_from_spec_file (without,
- NULL,
- EVOLUTION_ETSPECDIR "/e-select-names.etspec",
- NULL);
-
- g_object_set_data(G_OBJECT(table), "adapter", adapter);
- g_object_set_data(G_OBJECT(table), "without", without);
- g_object_set_data(G_OBJECT(table), "model", model);
-
- return table;
-}
-
-static void
-source_selected (ESourceOptionMenu *menu, ESource *source, ESelectNames *e_select_names)
-{
- addressbook_model_set_source (e_select_names, e_select_names->model, source);
- e_select_names_config_set_last_completion_book (e_source_peek_uid (source));
-}
-
-static void
-update_query (GtkWidget *widget, ESelectNames *e_select_names)
-{
- char *category = "";
- const char *search = "";
- char *query;
- char *q_array[4];
- int i;
- GString *s = g_string_new ("");
-
- if (e_select_names->categories) {
- category = e_categories_master_list_option_menu_get_category (E_CATEGORIES_MASTER_LIST_OPTION_MENU (e_select_names->categories));
- }
- if (e_select_names->select_entry) {
- search = gtk_entry_get_text (GTK_ENTRY (e_select_names->select_entry));
- }
-
- e_sexp_encode_string (s, search);
-
- 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 ("(or (beginswith \"email\" %s) "
- " (beginswith \"full_name\" %s) "
- " (beginswith \"nickname\" %s)"
- " (beginswith \"file_as\" %s))",
- s->str, s->str, s->str, s->str);
- 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]);
- }
- g_object_set (e_select_names->model,
- "query", query,
- NULL);
- for (i = 1; q_array[i]; i++) {
- g_free (q_array[i]);
- }
- g_free (query);
- g_string_free (s, TRUE);
-}
-
-static void
-status_message (EABModel *model, const gchar *message, ESelectNames *e_select_names)
-{
- if (message == NULL)
- gtk_label_set_text (GTK_LABEL (e_select_names->status_message), "");
- else
- gtk_label_set_text (GTK_LABEL (e_select_names->status_message), message);
-}
-
-static void
-categories_changed (GtkWidget *widget, ESelectNames *e_select_names)
-{
- update_query (widget, e_select_names);
-}
-
-static void
-select_entry_changed (GtkWidget *widget, ESelectNames *e_select_names)
-{
- if (e_select_names->select_entry) {
- const char *select_string = gtk_entry_get_text (GTK_ENTRY (e_select_names->select_entry));
- char *select_strcoll_string = g_utf8_collate_key (select_string, -1);
- int count;
- ETable *table;
- int i;
-
- table = e_table_scrolled_get_table (e_select_names->table);
-
- count = e_table_model_row_count (e_select_names->without);
-
- for (i = 0; i < count; i++) {
- int model_row = e_table_view_to_model_row (table, i);
- char *row_strcoll_string =
- g_utf8_collate_key (e_table_model_value_at (e_select_names->without,
- E_CONTACT_FULL_NAME,
- model_row),
- -1);
- if (g_utf8_collate (select_strcoll_string, row_strcoll_string) <= 0) {
- g_free (row_strcoll_string);
- break;
- }
- g_free (row_strcoll_string);
- }
- g_free (select_strcoll_string);
- if (i == count)
- i --;
-
- if (count > 0) {
- i = e_table_view_to_model_row (table, i);
- e_table_set_cursor_row (table, i);
- }
- }
-}
-
-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 *option_menu;
-
- ecml = e_categories_master_list_wombat_new ();
- option_menu = e_categories_master_list_option_menu_new (ecml);
- g_object_unref (ecml);
-
- return option_menu;
-}
-
-static void
-clear_widget (gpointer data, GObject *where_object_was)
-{
- GtkWidget **widget_ref = data;
- *widget_ref = NULL;
-}
-
-static void
-e_select_names_init (ESelectNames *e_select_names)
-{
- GladeXML *gui;
- GtkWidget *widget, *button, *table, *esom;
- ESource *source = NULL;
- char *uid;
-
- /* FIXME What to do on error/NULL ? */
- e_select_names->source_list = e_source_list_new_for_gconf_default ("/apps/evolution/addressbook/sources");
-
- gui = glade_xml_new (EVOLUTION_GLADEDIR "/select-names.glade", NULL, NULL);
- e_select_names->gui = gui;
-
- /* Add the source menu */
- esom = e_source_option_menu_new (e_select_names->source_list);
- g_signal_connect (esom, "source_selected", G_CALLBACK (source_selected), e_select_names);
- gtk_widget_show (esom);
-
- table = glade_xml_get_widget (gui, "show_contacts_table");
- gtk_table_attach (GTK_TABLE (table), esom, 1, 2, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
-
- /* Set up the rest of the widgets */
- 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_container_remove(GTK_CONTAINER(widget->parent), widget);
- gtk_box_pack_start(GTK_BOX(GTK_DIALOG(e_select_names)->vbox), widget, TRUE, TRUE, 0);
- gtk_widget_unref(widget);
-
- gtk_dialog_add_buttons (GTK_DIALOG (e_select_names),
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_OK, GTK_RESPONSE_OK,
- NULL);
-
- gtk_dialog_set_default_response (GTK_DIALOG (e_select_names),
- GTK_RESPONSE_OK);
-
- gtk_container_set_border_width (GTK_CONTAINER (e_select_names), 12);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (e_select_names)->vbox), 6);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (e_select_names)->action_area), 12);
-
- gtk_window_set_modal (GTK_WINDOW (e_select_names), TRUE);
-
- gtk_window_set_title(GTK_WINDOW(e_select_names), _("Select Contacts from Addressbook"));
- gtk_window_set_resizable(GTK_WINDOW(e_select_names), TRUE);
-
- e_select_names->table = E_TABLE_SCROLLED(glade_xml_get_widget(gui, "table-source"));
- e_select_names->model = g_object_get_data(G_OBJECT(e_select_names->table), "model");
- e_select_names->adapter = g_object_get_data(G_OBJECT(e_select_names->table), "adapter");
- e_select_names->without = g_object_get_data(G_OBJECT(e_select_names->table), "without");
- gtk_widget_show (GTK_WIDGET (e_select_names->table));
-
- e_select_names->status_message = glade_xml_get_widget (gui, "status-message");
- if (e_select_names->status_message && !GTK_IS_LABEL (e_select_names->status_message))
- e_select_names->status_message = NULL;
- if (e_select_names->status_message) {
- e_select_names->status_id = g_signal_connect (e_select_names->model, "status_message",
- G_CALLBACK (status_message), e_select_names);
- g_object_weak_ref (G_OBJECT (e_select_names->status_message), clear_widget, &e_select_names->status_message);
- }
-
- e_select_names->search_id = g_signal_connect (e_select_names->model,
- "search_result", G_CALLBACK (search_result),
- e_select_names);
-
- e_select_names->categories = glade_xml_get_widget (gui, "custom-categories");
- if (e_select_names->categories && !E_IS_CATEGORIES_MASTER_LIST_OPTION_MENU (e_select_names->categories))
- e_select_names->categories = NULL;
- if (e_select_names->categories) {
- g_signal_connect(e_select_names->categories, "changed",
- G_CALLBACK(categories_changed), e_select_names);
- g_object_weak_ref (G_OBJECT (e_select_names->categories), clear_widget, &e_select_names->categories);
- }
- gtk_widget_show (e_select_names->categories);
-
- e_select_names->select_entry = glade_xml_get_widget (gui, "entry-select");
- if (e_select_names->select_entry && !GTK_IS_ENTRY (e_select_names->select_entry))
- e_select_names->select_entry = NULL;
- if (e_select_names->select_entry) {
- g_signal_connect(e_select_names->select_entry, "changed",
- G_CALLBACK(select_entry_changed), e_select_names);
- g_signal_connect(e_select_names->select_entry, "activate",
- G_CALLBACK(update_query), e_select_names);
- g_object_weak_ref (G_OBJECT (e_select_names->select_entry), clear_widget, &e_select_names->select_entry);
- }
-
- button = glade_xml_get_widget (gui, "button-find");
- if (button && GTK_IS_BUTTON (button))
- g_signal_connect(button, "clicked",
- G_CALLBACK(update_query), e_select_names);
-
- g_signal_connect (e_table_scrolled_get_table (e_select_names->table), "double_click",
- G_CALLBACK (add_address), e_select_names);
- g_signal_connect (e_table_scrolled_get_table (e_select_names->table), "selection_change",
- G_CALLBACK (selection_change), e_select_names);
- selection_change (e_table_scrolled_get_table (e_select_names->table), e_select_names);
-
- /* Select a source for to display initially */
- uid = e_select_names_config_get_last_completion_book ();
- if (uid) {
- source = e_source_list_peek_source_by_uid (e_select_names->source_list, uid);
- g_free (uid);
- }
-
- if (!source)
- source = find_first_source (e_select_names->source_list);
-
- /* FIXME What if we still can't find a source? */
- e_source_option_menu_select (E_SOURCE_OPTION_MENU (esom), source);
-
-}
-
-static void e_select_names_child_free(char *key, ESelectNamesChild *child, ESelectNames *e_select_names)
-{
- g_signal_handler_disconnect(child->source, child->changed_id);
-
- g_free(child->title);
- g_object_unref(child->table_model);
- g_object_unref(child->source);
- g_free(key);
- g_free(child);
-}
-
-static void
-e_select_names_dispose (GObject *object)
-{
- ESelectNames *e_select_names = E_SELECT_NAMES(object);
-
- if (e_select_names->source_list) {
- g_object_unref (e_select_names->source_list);
- e_select_names->source_list = NULL;
- }
-
- if (e_select_names->status_id) {
- g_signal_handler_disconnect(e_select_names->model, e_select_names->status_id);
- e_select_names->status_id = 0;
- }
-
- if (e_select_names->search_id) {
- g_signal_handler_disconnect(e_select_names->model, e_select_names->search_id);
- e_select_names->search_id = 0;
- }
-
- if (e_select_names->gui) {
- g_object_unref(e_select_names->gui);
- e_select_names->gui = NULL;
- }
-
- if (e_select_names->children) {
- 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);
- e_select_names->children = NULL;
- }
-
- if (e_select_names->without) {
- g_object_unref(e_select_names->without);
- e_select_names->without = NULL;
- }
- if (e_select_names->adapter) {
- g_object_unref(e_select_names->adapter);
- e_select_names->adapter = NULL;
- }
- if (e_select_names->model) {
- g_object_unref(e_select_names->model);
- e_select_names->model = NULL;
- }
-
- if (e_select_names->def) {
- g_free(e_select_names->def);
- e_select_names->def = NULL;
- }
-
- if (G_OBJECT_CLASS(parent_class)->dispose)
- G_OBJECT_CLASS(parent_class)->dispose(object);
-}
-
-GtkWidget*
-e_select_names_new (void)
-{
- ESelectNames *e_select_names;
-
- e_select_names = g_object_new (E_TYPE_SELECT_NAMES, NULL);
-
- return GTK_WIDGET (e_select_names);
-}
-
-static void
-button_clicked(GtkWidget *button, ESelectNamesChild *child)
-{
- real_add_address(child->names, child);
-}
-
-static void
-remove_address(ETable *table, int row, int col, GdkEvent *event, ESelectNamesChild *child)
-{
- e_select_names_model_delete (child->source, row);
-}
-
-struct _RightClickData {
- ESelectNamesChild *child;
- int row;
-};
-typedef struct _RightClickData RightClickData;
-
-static void
-remove_cb (GtkWidget *widget, void *data)
-{
- RightClickData *rcdata = (RightClickData *)data;
-
- e_select_names_model_delete (rcdata->child->source, rcdata->row);
-
- /* Free everything we've created */
- g_free (rcdata);
-}
-
-static void
-section_right_click_cb (ETable *et, int row, int col, GdkEvent *ev, ESelectNamesChild *child)
-{
- static EPopupMenu right_click_menu[] = {
- E_POPUP_ITEM (N_("Remove"), G_CALLBACK (remove_cb), 0),
- E_POPUP_TERMINATOR
- };
- RightClickData *rcdata = g_new0 (RightClickData, 1);
-
- rcdata->row = row;
- rcdata->child = child;
-
- e_popup_menu_run (right_click_menu, (GdkEvent *)ev, 0, 0, rcdata);
-}
-
-void
-e_select_names_add_section (ESelectNames *e_select_names,
- const char *name, const char *id,
- ESelectNamesModel *source)
-{
- ESelectNamesChild *child;
- GtkWidget *button;
- GtkWidget *label;
- GtkWidget *alignment;
- GtkTable *table;
- char *label_text;
- ETable *etable;
- ETableExtras *extras;
- ECell *string_cell;
-
- GtkWidget *sw;
-
- 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));
-
- child->table_model = (ESelectNamesTableModel*)e_select_names_table_model_new (source);
-
- child->source = source;
- g_object_ref(child->source);
-
- e_select_names->child_count++;
-
- alignment = gtk_alignment_new(0, 0, 1, 0);
-
- label_text = g_strconcat (child->title, " ->", NULL);
-
- label = gtk_label_new ("");
-
- gtk_label_set_markup (GTK_LABEL(label), label_text);
-
- g_free (label_text);
-
- button = gtk_button_new ();
- gtk_container_add (GTK_CONTAINER (button), label);
- child->label = label;
- child->button = button;
-
- gtk_container_add(GTK_CONTAINER(alignment), button);
- gtk_widget_show_all(alignment);
- g_signal_connect(button, "clicked",
- G_CALLBACK(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);
-
- etable = e_table_scrolled_get_table (e_select_names->table);
- gtk_widget_set_sensitive (button, e_table_selected_count (etable) > 0);
-
- extras = e_table_extras_new ();
- string_cell = e_table_extras_get_cell (extras, "string");
-
- g_object_set (string_cell,
- "underline_column", 2,
- NULL);
-
- sw = e_table_scrolled_new_from_spec_file (E_TABLE_MODEL (child->table_model),
- extras,
- EVOLUTION_ETSPECDIR "/e-select-names-section.etspec",
- NULL);
- g_object_unref (extras);
-
- child->recipient_table = GTK_WIDGET (e_table_scrolled_get_table (E_TABLE_SCROLLED (sw)));
-
- g_signal_connect (child->recipient_table,
- "right_click",
- G_CALLBACK (section_right_click_cb),
- child);
-
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
- GTK_POLICY_AUTOMATIC,
- GTK_POLICY_AUTOMATIC);
-
- g_signal_connect(child->recipient_table, "double_click",
- G_CALLBACK(remove_address), child);
-
- child->changed_id = g_signal_connect (child->source,
- "changed",
- G_CALLBACK (sync_table_and_models),
- e_select_names);
-
- gtk_widget_show_all (sw);
-
- gtk_table_attach(table, sw,
- 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);
-}
-
-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) {
- GtkWidget *label = child->label;
-
- /* set the previous default to non-bold */
- gtk_label_set_markup (GTK_LABEL (label), child->title);
- }
- }
-
- 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) {
- GtkWidget *label = child->label;
- char *markup = g_strconcat ("<b>", child->title, "</b>", NULL);
-
- /* set the new default to bold */
- gtk_label_set_markup (GTK_LABEL (label), markup);
- g_free (markup);
- }
- }
-}
diff --git a/addressbook/gui/component/select-names/e-select-names.etspec b/addressbook/gui/component/select-names/e-select-names.etspec
deleted file mode 100644
index 7a260887ff..0000000000
--- a/addressbook/gui/component/select-names/e-select-names.etspec
+++ /dev/null
@@ -1,7 +0,0 @@
-<ETableSpecification no-headers="true" cursor-mode="line">
- <ETableColumn model_col= "69" _title="Name" expansion="1.0" minimum_width="20" resizable="true" cell="string" compare="collate" search="string"/>
- <ETableState>
- <column source="0"/>
- <grouping> <leaf column="0" ascending="true"/> </grouping>
- </ETableState>
-</ETableSpecification>
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 e927932d13..0000000000
--- a/addressbook/gui/component/select-names/e-select-names.h
+++ /dev/null
@@ -1,101 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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 <gtk/gtkdialog.h>
-#include <glade/glade.h>
-#include <gal/e-table/e-table.h>
-#include <gal/e-table/e-table-scrolled.h>
-#include <libedataserver/e-source-list.h>
-#include <widgets/misc/e-source-option-menu.h>
-
-#include "e-addressbook-model.h"
-
-#include "e-select-names-model.h"
-
-G_BEGIN_DECLS
-
-/* ESelectNames - A dialog displaying information about a contact.
- *
- * The following arguments are available:
- *
- * name type read/write description
- * --------------------------------------------------------------------------------
- */
-
-#define E_TYPE_SELECT_NAMES (e_select_names_get_type ())
-#define E_SELECT_NAMES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_SELECT_NAMES, ESelectNames))
-#define E_SELECT_NAMES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_SELECT_NAMES, ESelectNamesClass))
-#define E_IS_SELECT_NAMES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_SELECT_NAMES))
-#define E_IS_SELECT_NAMES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_SELECT_NAMES))
-
-typedef struct _ESelectNames ESelectNames;
-typedef struct _ESelectNamesClass ESelectNamesClass;
-typedef struct _ESelectNamesFolder ESelectNamesFolder;
-
-struct _ESelectNames
-{
- GtkDialog parent;
-
- ESourceList *source_list;
-
- /* item specific fields */
- GladeXML *gui;
-
- GHashTable *children; /* Of type char * to ESelectNamesChild */
- int child_count;
- ETableScrolled *table;
- ETableModel *adapter;
- ETableModel *without;
- EABModel *model;
- GtkWidget *categories;
- GtkWidget *select_entry;
- GtkWidget *status_message;
- char *def;
- ESelectNamesFolder *current_folder;
-
- /* signal handlers */
- gulong status_id;
- gulong search_id;
-};
-
-struct _ESelectNamesClass
-{
- GtkDialogClass parent_class;
-};
-
-
-GType e_select_names_get_type (void);
-
-GtkWidget *e_select_names_new (void);
-
-void e_select_names_add_section (ESelectNames *e_select_names,
- const char *name,
- const char *id,
- ESelectNamesModel *source);
-void e_select_names_set_default (ESelectNames *e_select_names,
- const char *id);
-
-G_END_DECLS
-
-#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 edcf6bbab0..0000000000
--- a/addressbook/gui/component/select-names/recipient.glade
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd" >
-
-<glade-interface>
- <widget class="GtkWindow" id="window1">
- <property name="visible">no</property>
- <property name="title" translatable="yes">window1</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="modal">no</property>
- <property name="allow_shrink">no</property>
- <property name="allow_grow">yes</property>
- <property name="window-position">GTK_WIN_POS_NONE</property>
-
- <child>
- <widget class="GtkHBox" id="hbox-top">
- <property name="homogeneous">no</property>
- <property name="spacing">4</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment1">
- <property name="xalign">1.08033e-07</property>
- <property name="yalign">0</property>
- <property name="xscale">1</property>
- <property name="yscale">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkButton" id="text-button">
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">-&gt;</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
-</glade-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 bf63b9dfa4..0000000000
--- a/addressbook/gui/component/select-names/select-names.glade
+++ /dev/null
@@ -1,435 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-<requires lib="gnome"/>
-
-<widget class="GtkDialog" id="dialog-top">
- <property name="border_width">12</property>
- <property name="title" translatable="yes">Select Names</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="default_width">417</property>
- <property name="default_height">332</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="has_separator">True</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="button4">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">0</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="button5">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">0</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTable" id="table-top">
- <property name="visible">True</property>
- <property name="n_rows">3</property>
- <property name="n_columns">1</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkHSeparator" id="hseparator1">
- <property name="visible">True</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options"></property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox5">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkTable" id="table4">
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">3</property>
-
- <child>
- <widget class="GtkLabel" id="label32">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Type a name into the entry, or
-select one from the list below:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTable" id="table-recipients">
- <property name="visible">True</property>
- <property name="n_rows">1</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label20">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Selected Contacts:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">True</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment4">
- <property name="visible">True</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
-
- <child>
- <widget class="GtkVBox" id="vbox6">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHBox" id="hbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkEntry" id="entry-select">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="button-find">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Find</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment3">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
-
- <child>
- <widget class="Custom" id="table-source">
- <property name="visible">True</property>
- <property name="creation_function">e_addressbook_create_ebook_table</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Sat, 10 Jun 2000 22:02:57 GMT</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="status-message">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">3</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frame1">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkTable" id="show_contacts_table">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label30">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Folder:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label31">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Category:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment5">
- <property name="visible">True</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">1</property>
-
- <child>
- <widget class="Custom" id="custom-categories">
- <property name="visible">True</property>
- <property name="creation_function">e_select_names_create_categories</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Tue, 19 Feb 2002 23:06:24 GMT</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Show Contacts</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/addressbook/gui/contact-editor/.cvsignore b/addressbook/gui/contact-editor/.cvsignore
deleted file mode 100644
index ddbd38bb6e..0000000000
--- a/addressbook/gui/contact-editor/.cvsignore
+++ /dev/null
@@ -1,11 +0,0 @@
-.deps
-.libs
-.pure
-Makefile
-Makefile.in
-*.lo
-*.la
-contact-editor-test
-contact-editor.gladep
-e-contact-editor-marshal.c
-e-contact-editor-marshal.h
diff --git a/addressbook/gui/contact-editor/Makefile.am b/addressbook/gui/contact-editor/Makefile.am
deleted file mode 100644
index 685004dabb..0000000000
--- a/addressbook/gui/contact-editor/Makefile.am
+++ /dev/null
@@ -1,43 +0,0 @@
-INCLUDES = \
- -I$(top_srcdir) \
- -I$(top_srcdir)/addressbook/ \
- -I$(top_srcdir)/addressbook/backend \
- -I$(top_builddir)/addressbook/backend \
- -I$(top_srcdir)/addressbook/gui/merging \
- -I$(top_srcdir)/widgets/e-table \
- -I$(top_builddir)/shell \
- -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
- -DEVOLUTION_DATADIR=\""$(datadir)"\" \
- -DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\" \
- -DEVOLUTION_UIDIR=\""$(evolutionuidir)\"" \
- -DPREFIX=\""$(prefix)"\" \
- -DG_LOG_DOMAIN=\"contact-editor\" \
- $(EVOLUTION_ADDRESSBOOK_CFLAGS)
-
-noinst_LTLIBRARIES = \
- libecontacteditor.la
-
-libecontacteditor_la_SOURCES = \
- $(MARSHAL_GENERATED) \
- 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-quick-add.c \
- e-contact-quick-add.h
-
-MARSHAL_GENERATED = e-contact-editor-marshal.c e-contact-editor-marshal.h
-@EVO_MARSHAL_RULE@
-
-glade_DATA = \
- contact-editor.glade \
- fulladdr.glade \
- fullname.glade
-
-BUILT_SOURCES = $(MARSHAL_GENERATED)
-CLEANFILES = $(BUILT_SOURCES)
-
-EXTRA_DIST= $(glade_DATA) \
- e-contact-editor-marshal.list
diff --git a/addressbook/gui/contact-editor/contact-editor.glade b/addressbook/gui/contact-editor/contact-editor.glade
deleted file mode 100644
index 10b05c27b4..0000000000
--- a/addressbook/gui/contact-editor/contact-editor.glade
+++ /dev/null
@@ -1,2360 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-<requires lib="gnome"/>
-<requires lib="bonobo"/>
-
-<widget class="GtkDialog" id="dialog2">
- <property name="border_width">2</property>
- <property name="title" translatable="yes"></property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="has_separator">True</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">4</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area2">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="button28">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">0</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="button29">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-apply</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">0</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="button30">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">0</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTable" id="table2">
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">0</property>
- <property name="column_spacing">2</property>
-
- <child>
- <widget class="GtkEntry" id="entry2">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child>
- <widget class="GtkButton" id="button31">
- <property name="border_width">2</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Add</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="button32">
- <property name="border_width">2</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Delete</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow1">
- <property name="visible">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
- <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTreeView" id="clist1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">True</property>
- <property name="rules_hint">False</property>
- <property name="reorderable">False</property>
- <property name="enable_search">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-<widget class="GtkDialog" id="dialog-add-phone">
- <property name="title" translatable="yes">New phone type</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="has_separator">True</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="vbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">8</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="hbuttonbox1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="button43">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Add</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">0</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="button44">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">0</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frame-add-phone">
- <property name="border_width">4</property>
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment9">
- <property name="border_width">9</property>
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
-
- <child>
- <widget class="GtkEntry" id="entry-add-phone">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label21">
- <property name="visible">True</property>
- <property name="label" translatable="yes">New phone type</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-<widget class="GnomeApp" id="contact editor">
- <property name="title" translatable="yes">Contact Editor</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="enable_layout_config">True</property>
-
- <child internal-child="dock">
- <widget class="BonoboDock" id="dock1">
- <property name="visible">True</property>
- <property name="allow_floating">True</property>
-
- <child>
- <widget class="GtkNotebook" id="notebook-contact-editor">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="show_tabs">True</property>
- <property name="show_border">True</property>
- <property name="tab_pos">GTK_POS_TOP</property>
- <property name="scrollable">False</property>
- <property name="enable_popup">False</property>
-
- <child>
- <widget class="GtkTable" id="table-contact-editor-general">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="n_rows">14</property>
- <property name="n_columns">8</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkEntry" id="entry-phone1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">7</property>
- <property name="right_attach">8</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry-phone2">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">7</property>
- <property name="right_attach">8</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry-phone3">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">7</property>
- <property name="right_attach">8</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry-phone4">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">7</property>
- <property name="right_attach">8</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="button-fullname">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Full _Name...</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">3</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment3">
- <property name="visible">True</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">1</property>
-
- <child>
- <widget class="GtkButton" id="button-email1">
- <property name="visible">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
-
- <child>
- <widget class="GtkArrow" id="arrow1">
- <property name="visible">True</property>
- <property name="arrow_type">GTK_ARROW_DOWN</property>
- <property name="shadow_type">GTK_SHADOW_OUT</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment5">
- <property name="visible">True</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
-
- <child>
- <widget class="GtkButton" id="button-phone4">
- <property name="visible">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
-
- <child>
- <widget class="GtkArrow" id="arrow5">
- <property name="visible">True</property>
- <property name="arrow_type">GTK_ARROW_DOWN</property>
- <property name="shadow_type">GTK_SHADOW_OUT</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">6</property>
- <property name="right_attach">7</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment7">
- <property name="visible">True</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
-
- <child>
- <widget class="GtkButton" id="button-phone2">
- <property name="visible">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
-
- <child>
- <widget class="GtkArrow" id="arrow3">
- <property name="visible">True</property>
- <property name="arrow_type">GTK_ARROW_DOWN</property>
- <property name="shadow_type">GTK_SHADOW_OUT</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">6</property>
- <property name="right_attach">7</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment8">
- <property name="visible">True</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
-
- <child>
- <widget class="GtkButton" id="button-phone1">
- <property name="visible">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
-
- <child>
- <widget class="GtkArrow" id="arrow2">
- <property name="visible">True</property>
- <property name="arrow_type">GTK_ARROW_DOWN</property>
- <property name="shadow_type">GTK_SHADOW_OUT</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">6</property>
- <property name="right_attach">7</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHSeparator" id="hseparator4">
- <property name="visible">True</property>
- </widget>
- <packing>
- <property name="left_attach">4</property>
- <property name="right_attach">8</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="y_padding">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment6">
- <property name="visible">True</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
-
- <child>
- <widget class="GtkButton" id="button-phone3">
- <property name="visible">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
-
- <child>
- <widget class="GtkArrow" id="arrow4">
- <property name="visible">True</property>
- <property name="arrow_type">GTK_ARROW_DOWN</property>
- <property name="shadow_type">GTK_SHADOW_OUT</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">6</property>
- <property name="right_attach">7</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry-fullname">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="can_focus">True</property>
- <property name="has_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry-jobtitle">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry-company">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry-email1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHSeparator" id="hseparator5">
- <property name="visible">True</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">4</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="y_padding">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCombo" id="combo-file-as">
- <property name="visible">True</property>
- <property name="value_in_list">False</property>
- <property name="allow_empty">True</property>
- <property name="case_sensitive">True</property>
- <property name="enable_arrow_keys">True</property>
- <property name="enable_arrows_always">False</property>
-
- <child internal-child="entry">
- <widget class="GtkEntry" id="entry-file-as">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- </child>
-
- <child internal-child="list">
- <widget class="GtkList" id="convertwidget3">
- <property name="visible">True</property>
- <property name="selection_mode">GTK_SELECTION_BROWSE</property>
-
- <child>
- <widget class="GtkListItem" id="convertwidget4">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget5">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHSeparator" id="hseparator6">
- <property name="visible">True</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">4</property>
- <property name="top_attach">7</property>
- <property name="bottom_attach">8</property>
- <property name="y_padding">2</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment-htmlmail">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
-
- <child>
- <widget class="GtkCheckButton" id="checkbutton-htmlmail">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Wants to receive _HTML mail</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">6</property>
- <property name="bottom_attach">7</property>
- <property name="x_options">expand|shrink|fill</property>
- <property name="y_options">shrink|fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment4">
- <property name="visible">True</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
-
- <child>
- <widget class="GtkButton" id="button-address">
- <property name="visible">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
-
- <child>
- <widget class="GtkArrow" id="arrow6">
- <property name="visible">True</property>
- <property name="arrow_type">GTK_ARROW_DOWN</property>
- <property name="shadow_type">GTK_SHADOW_OUT</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">6</property>
- <property name="right_attach">7</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEventBox" id="eventbox1">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="label-phone1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Business:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-phone1</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">5</property>
- <property name="right_attach">6</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEventBox" id="eventbox2">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="label-phone2">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Home:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-phone2</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">5</property>
- <property name="right_attach">6</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEventBox" id="eventbox3">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="label-phone3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Business fa_x:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-phone3</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">5</property>
- <property name="right_attach">6</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEventBox" id="eventbox4">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="label-phone4">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Mobile:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-phone4</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">5</property>
- <property name="right_attach">6</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEventBox" id="eventbox5">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="label-email1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Primary _email:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-email1</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEventBox" id="eventbox-business">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="label-address">
- <property name="visible">True</property>
- <property name="label" translatable="yes"> B_usiness:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">text-address</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">5</property>
- <property name="right_attach">6</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment2">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
-
- <child>
- <widget class="GtkCheckButton" id="checkbutton-mailingaddress">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_This is the mailing address</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">7</property>
- <property name="right_attach">8</property>
- <property name="top_attach">9</property>
- <property name="bottom_attach">10</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHSeparator" id="hseparator9">
- <property name="visible">True</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">4</property>
- <property name="top_attach">11</property>
- <property name="bottom_attach">12</property>
- <property name="y_padding">2</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHSeparator" id="hseparator10">
- <property name="visible">True</property>
- </widget>
- <packing>
- <property name="left_attach">4</property>
- <property name="right_attach">8</property>
- <property name="top_attach">11</property>
- <property name="bottom_attach">12</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEventBox" id="eventbox7">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="label-jobtitle">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Job title:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-jobtitle</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="custom1">
- <property name="visible">True</property>
- <property name="creation_function">e_create_image_widget</property>
- <property name="string1">malehead.png</property>
- <property name="string2"></property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Thu, 18 May 2000 12:19:47 GMT</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="custom2">
- <property name="visible">True</property>
- <property name="creation_function">e_create_image_widget</property>
- <property name="string1">cellphone.png</property>
- <property name="string2"></property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Thu, 18 May 2000 12:20:02 GMT</property>
- </widget>
- <packing>
- <property name="left_attach">4</property>
- <property name="right_attach">5</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="custom3">
- <property name="visible">True</property>
- <property name="creation_function">e_create_image_widget</property>
- <property name="string1">envelope.png</property>
- <property name="string2"></property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Thu, 18 May 2000 12:19:51 GMT</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">7</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="custom4">
- <property name="visible">True</property>
- <property name="creation_function">e_create_image_widget</property>
- <property name="string1">house.png</property>
- <property name="string2"></property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Thu, 18 May 2000 12:20:06 GMT</property>
- </widget>
- <packing>
- <property name="left_attach">4</property>
- <property name="right_attach">5</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">10</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="custom10">
- <property name="visible">True</property>
- <property name="creation_function">e_create_image_widget</property>
- <property name="string1">globe.png</property>
- <property name="string2"></property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Thu, 18 May 2000 12:19:56 GMT</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">8</property>
- <property name="bottom_attach">10</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label-company">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Organi_zation:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-company</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">3</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="button-fulladdr">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">A_ddress...</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- <packing>
- <property name="left_attach">5</property>
- <property name="right_attach">7</property>
- <property name="top_attach">6</property>
- <property name="bottom_attach">7</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="accellabel-fileas">
- <property name="visible">True</property>
- <property name="label" translatable="yes">File a_s:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-file-as</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">3</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="accellabel-web">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Web page address:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-web</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">3</property>
- <property name="top_attach">8</property>
- <property name="bottom_attach">9</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment16">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">0</property>
-
- <child>
- <widget class="GtkButton" id="button-categories">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Categories...</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">3</property>
- <property name="top_attach">12</property>
- <property name="bottom_attach">13</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="custom6">
- <property name="visible">True</property>
- <property name="creation_function">e_create_image_widget</property>
- <property name="string1">briefcase.png</property>
- <property name="string2"></property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Thu, 18 May 2000 12:20:09 GMT</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">12</property>
- <property name="bottom_attach">14</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment19">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">0</property>
-
- <child>
- <widget class="GtkEntry" id="entry-categories">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">12</property>
- <property name="bottom_attach">13</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow3">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTextView" id="text-address">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="justification">GTK_JUSTIFY_LEFT</property>
- <property name="wrap_mode">GTK_WRAP_WORD</property>
- <property name="cursor_visible">True</property>
- <property name="pixels_above_lines">0</property>
- <property name="pixels_below_lines">0</property>
- <property name="pixels_inside_wrap">0</property>
- <property name="left_margin">0</property>
- <property name="right_margin">0</property>
- <property name="indent">0</property>
- <property name="text" translatable="yes"></property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">7</property>
- <property name="right_attach">8</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">9</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="entry-web">
- <property name="visible">True</property>
- <property name="creation_function">e_contact_editor_create_web</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Sat, 08 Feb 2003 09:14:46 GMT</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">8</property>
- <property name="bottom_attach">9</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="accellabel-blog">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Blog address:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-web</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">3</property>
- <property name="top_attach">9</property>
- <property name="bottom_attach">10</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="entry-blog">
- <property name="visible">True</property>
- <property name="creation_function">e_contact_editor_create_web</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Sat, 08 Feb 2003 09:14:46 GMT</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">9</property>
- <property name="bottom_attach">10</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label15">
- <property name="visible">True</property>
- <property name="label" translatable="yes">General</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTable" id="table-contact-editor-details">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="n_rows">9</property>
- <property name="n_columns">6</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label-department">
- <property name="visible">True</property>
- <property name="label" translatable="yes">D_epartment:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-department</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label-office">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Office:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-office</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label-profession">
- <property name="visible">True</property>
- <property name="label" translatable="yes">P_rofession:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-profession</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label-nickname">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Nickname:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-nickname</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label-spouse">
- <property name="visible">True</property>
- <property name="label" translatable="yes">S_pouse:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-spouse</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label-birthday">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Birthda_y:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">dateedit-birthday</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label-assistant">
- <property name="visible">True</property>
- <property name="label" translatable="yes">A_ssistant's name:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-assistant</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label-manager">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Manager's name:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-manager</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label-anniversary">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Anni_versary:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">dateedit-anniversary</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry-spouse">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry-department">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry-office">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry-profession">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry-nickname">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry-assistant">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">4</property>
- <property name="right_attach">6</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry-manager">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">4</property>
- <property name="right_attach">6</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHSeparator" id="hseparator7">
- <property name="visible">True</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">6</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_padding">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label-comments">
- <property name="visible">True</property>
- <property name="label" translatable="yes">No_tes:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">text-comments</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">7</property>
- <property name="bottom_attach">8</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHSeparator" id="hseparator8">
- <property name="visible">True</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">6</property>
- <property name="top_attach">6</property>
- <property name="bottom_attach">7</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="custom7">
- <property name="visible">True</property>
- <property name="creation_function">e_create_image_widget</property>
- <property name="string1">briefcase.png</property>
- <property name="string2"></property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Thu, 18 May 2000 12:20:13 GMT</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="custom8">
- <property name="visible">True</property>
- <property name="creation_function">e_create_image_widget</property>
- <property name="string1">malehead.png</property>
- <property name="string2"></property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Thu, 18 May 2000 12:20:16 GMT</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">6</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow2">
- <property name="visible">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTextView" id="text-comments">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="justification">GTK_JUSTIFY_LEFT</property>
- <property name="wrap_mode">GTK_WRAP_WORD</property>
- <property name="cursor_visible">True</property>
- <property name="pixels_above_lines">0</property>
- <property name="pixels_below_lines">0</property>
- <property name="pixels_inside_wrap">0</property>
- <property name="left_margin">0</property>
- <property name="right_margin">0</property>
- <property name="indent">0</property>
- <property name="text" translatable="yes"></property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">6</property>
- <property name="top_attach">8</property>
- <property name="bottom_attach">9</property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="custom9">
- <property name="visible">True</property>
- <property name="creation_function">e_create_image_widget</property>
- <property name="string1">globe.png</property>
- <property name="string2"></property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Thu, 18 May 2000 12:20:19 GMT</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">7</property>
- <property name="bottom_attach">9</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="dateedit-birthday">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="creation_function">e_contact_editor_create_date</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Tue, 05 Jun 2001 02:36:27 GMT</property>
- </widget>
- <packing>
- <property name="left_attach">4</property>
- <property name="right_attach">6</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="dateedit-anniversary">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="creation_function">e_contact_editor_create_date</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Tue, 05 Jun 2001 02:36:32 GMT</property>
- </widget>
- <packing>
- <property name="left_attach">4</property>
- <property name="right_attach">6</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label16">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Details</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox3">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHBox" id="hbox1">
- <property name="border_width">7</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">4</property>
-
- <child>
- <widget class="Custom" id="custom12">
- <property name="visible">True</property>
- <property name="creation_function">e_create_image_widget</property>
- <property name="string1">globe.png</property>
- <property name="string2"></property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Thu, 18 May 2000 12:20:13 GMT</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label24">
- <property name="visible">True</property>
- <property name="label" translatable="yes">If this person publishes free/busy or other calendar information on the Internet, enter the address
-of that information here.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment18">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0.75</property>
- <property name="yscale">1</property>
-
- <child>
- <widget class="GtkTable" id="table-contact-editor-collaboration">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label-caluri">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Public Calendar URL:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-caluri</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label-fburl">
- <property name="visible">True</property>
- <property name="label" translatable="yes">F_ree/Busy URL:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-fburl</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="entry-caluri">
- <property name="visible">True</property>
- <property name="creation_function">e_contact_editor_create_web</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Mon, 10 Feb 2003 20:37:57 GMT</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="entry-fburl">
- <property name="visible">True</property>
- <property name="creation_function">e_contact_editor_create_web</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Mon, 10 Feb 2003 20:38:00 GMT</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label21">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Collaboration</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child internal-child="appbar">
- <widget class="GnomeAppBar" id="appbar1">
- <property name="visible">True</property>
- <property name="has_progress">True</property>
- <property name="has_status">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-</widget>
-
-</glade-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 34977e3fb7..0000000000
--- a/addressbook/gui/contact-editor/e-contact-editor-address.c
+++ /dev/null
@@ -1,620 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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-editor-address.h>
-
-#include <glib.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-window-icon.h>
-#include <libgnome/gnome-util.h>
-#include <gal/widgets/e-gui-utils.h>
-#include <gtk/gtkcombo.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtkstock.h>
-#include <gtk/gtklabel.h>
-#include <string.h>
-#include <stdlib.h>
-#include <locale.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_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
-static void e_contact_editor_address_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
-static void e_contact_editor_address_dispose (GObject *object);
-
-static void fill_in_info(EContactEditorAddress *editor);
-static void extract_info(EContactEditorAddress *editor);
-
-static GtkDialogClass *parent_class = NULL;
-
-/* The arguments we take */
-enum {
- PROP_0,
- PROP_ADDRESS,
- PROP_EDITABLE
-};
-
-GType
-e_contact_editor_address_get_type (void)
-{
- static GType contact_editor_address_type = 0;
-
- if (!contact_editor_address_type) {
- static const GTypeInfo contact_editor_address_info = {
- sizeof (EContactEditorAddressClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) e_contact_editor_address_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EContactEditorAddress),
- 0, /* n_preallocs */
- (GInstanceInitFunc) e_contact_editor_address_init,
- };
-
- contact_editor_address_type = g_type_register_static (GTK_TYPE_DIALOG, "EContactEditorAddress", &contact_editor_address_info, 0);
- }
-
- return contact_editor_address_type;
-}
-
-static void
-e_contact_editor_address_class_init (EContactEditorAddressClass *klass)
-{
- GObjectClass *object_class;
-
- object_class = G_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_ref (GTK_TYPE_DIALOG);
-
- object_class->set_property = e_contact_editor_address_set_property;
- object_class->get_property = e_contact_editor_address_get_property;
- object_class->dispose = e_contact_editor_address_dispose;
-
- g_object_class_install_property (object_class, PROP_ADDRESS,
- g_param_spec_pointer ("address",
- _("Address"),
- /*_( */"XXX blurb" /*)*/,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_EDITABLE,
- g_param_spec_boolean ("editable",
- _("Editable"),
- /*_( */"XXX blurb" /*)*/,
- FALSE,
- G_PARAM_READWRITE));
-}
-
-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-checkaddress");
-
- if (container) {
- list = add_to_tab_order(list, gui, "entry-city");
- list = add_to_tab_order(list, gui, "entry-region");
- list = add_to_tab_order(list, gui, "entry-code");
- list = add_to_tab_order(list, gui, "combo-country");
- list = g_list_reverse(list);
- e_container_change_tab_order(GTK_CONTAINER(container), list);
- g_list_free(list);
- }
-}
-
-static char * countries [] = {
- N_("United States"),
- N_("Afghanistan"),
- N_("Albania"),
- N_("Algeria"),
- N_("American Samoa"),
- N_("Andorra"),
- N_("Angola"),
- N_("Anguilla"),
- N_("Antarctica"),
- N_("Antigua And Barbuda"),
- N_("Argentina"),
- N_("Armenia"),
- N_("Aruba"),
- N_("Australia"),
- N_("Austria"),
- N_("Azerbaijan"),
- N_("Bahamas"),
- N_("Bahrain"),
- N_("Bangladesh"),
- N_("Barbados"),
- N_("Belarus"),
- N_("Belgium"),
- N_("Belize"),
- N_("Benin"),
- N_("Bermuda"),
- N_("Bhutan"),
- N_("Bolivia"),
- N_("Bosnia And Herzegowina"),
- N_("Botswana"),
- N_("Bouvet Island"),
- N_("Brazil"),
- N_("British Indian Ocean Territory"),
- N_("Brunei Darussalam"),
- N_("Bulgaria"),
- N_("Burkina Faso"),
- N_("Burundi"),
- N_("Cambodia"),
- N_("Cameroon"),
- N_("Canada"),
- N_("Cape Verde"),
- N_("Cayman Islands"),
- N_("Central African Republic"),
- N_("Chad"),
- N_("Chile"),
- N_("China"),
- N_("Christmas Island"),
- N_("Cocos (Keeling) Islands"),
- N_("Colombia"),
- N_("Comoros"),
- N_("Congo"),
- N_("Congo"),
- N_("Cook Islands"),
- N_("Costa Rica"),
- N_("Cote d'Ivoire"),
- N_("Croatia"),
- N_("Cuba"),
- N_("Cyprus"),
- N_("Czech Republic"),
- N_("Denmark"),
- N_("Djibouti"),
- N_("Dominica"),
- N_("Dominican Republic"),
- N_("East Timor"),
- N_("Ecuador"),
- N_("Egypt"),
- N_("El Salvador"),
- N_("Equatorial Guinea"),
- N_("Eritrea"),
- N_("Estonia"),
- N_("Ethiopia"),
- N_("Falkland Islands"),
- N_("Faroe Islands"),
- N_("Fiji"),
- N_("Finland"),
- N_("France"),
- N_("French Guiana"),
- N_("French Polynesia"),
- N_("French Southern Territories"),
- N_("Gabon"),
- N_("Gambia"),
- N_("Georgia"),
- N_("Germany"),
- N_("Ghana"),
- N_("Gibraltar"),
- N_("Greece"),
- N_("Greenland"),
- N_("Grenada"),
- N_("Guadeloupe"),
- N_("Guam"),
- N_("Guatemala"),
- N_("Guinea"),
- N_("Guinea-bissau"),
- N_("Guyana"),
- N_("Haiti"),
- N_("Heard And McDonald Islands"),
- N_("Holy See"),
- N_("Honduras"),
- N_("Hong Kong"),
- N_("Hungary"),
- N_("Iceland"),
- N_("India"),
- N_("Indonesia"),
- N_("Ireland"),
- N_("Israel"),
- N_("Italy"),
- N_("Jamaica"),
- N_("Japan"),
- N_("Jordan"),
- N_("Kazakhstan"),
- N_("Kenya"),
- N_("Kiribati"),
- N_("Korea, Republic Of"),
- N_("Kuwait"),
- N_("Kyrgyzstan"),
- N_("Laos"),
- N_("Latvia"),
- N_("Lebanon"),
- N_("Lesotho"),
- N_("Liberia"),
- N_("Liechtenstein"),
- N_("Lithuania"),
- N_("Luxembourg"),
- N_("Macau"),
- N_("Macedonia"),
- N_("Madagascar"),
- N_("Malawi"),
- N_("Malaysia"),
- N_("Maldives"),
- N_("Mali"),
- N_("Malta"),
- N_("Marshall Islands"),
- N_("Martinique"),
- N_("Mauritania"),
- N_("Mauritius"),
- N_("Mayotte"),
- N_("Mexico"),
- N_("Micronesia"),
- N_("Moldova, Republic Of"),
- N_("Monaco"),
- N_("Mongolia"),
- N_("Montserrat"),
- N_("Morocco"),
- N_("Mozambique"),
- N_("Myanmar"),
- N_("Namibia"),
- N_("Nauru"),
- N_("Nepal"),
- N_("Netherlands"),
- N_("Netherlands Antilles"),
- N_("New Caledonia"),
- N_("New Zealand"),
- N_("Nicaragua"),
- N_("Niger"),
- N_("Nigeria"),
- N_("Niue"),
- N_("Norfolk Island"),
- N_("Northern Mariana Islands"),
- N_("Norway"),
- N_("Oman"),
- N_("Pakistan"),
- N_("Palau"),
- N_("Palestinian Territory"),
- N_("Panama"),
- N_("Papua New Guinea"),
- N_("Paraguay"),
- N_("Peru"),
- N_("Philippines"),
- N_("Pitcairn"),
- N_("Poland"),
- N_("Portugal"),
- N_("Puerto Rico"),
- N_("Qatar"),
- N_("Reunion"),
- N_("Romania"),
- N_("Russian Federation"),
- N_("Rwanda"),
- N_("Saint Kitts And Nevis"),
- N_("Saint Lucia"),
- N_("Saint Vincent And The Grena-dines"),
- N_("Samoa"),
- N_("San Marino"),
- N_("Sao Tome And Principe"),
- N_("Saudi Arabia"),
- N_("Senegal"),
- N_("Seychelles"),
- N_("Sierra Leone"),
- N_("Singapore"),
- N_("Slovakia"),
- N_("Slovenia"),
- N_("Solomon Islands"),
- N_("Somalia"),
- N_("South Africa"),
- N_("South Georgia And The South Sandwich Islands"),
- N_("Spain"),
- N_("Sri Lanka"),
- N_("St. Helena"),
- N_("St. Pierre And Miquelon"),
- N_("Sudan"),
- N_("Suriname"),
- N_("Svalbard And Jan Mayen Islands"),
- N_("Swaziland"),
- N_("Sweden"),
- N_("Switzerland"),
- N_("Taiwan"),
- N_("Tajikistan"),
- N_("Tanzania, United Republic Of"),
- N_("Thailand"),
- N_("Togo"),
- N_("Tokelau"),
- N_("Tonga"),
- N_("Trinidad And Tobago"),
- N_("Tunisia"),
- N_("Turkey"),
- N_("Turkmenistan"),
- N_("Turks And Caicos Islands"),
- N_("Tuvalu"),
- N_("Uganda"),
- N_("Ukraine"),
- N_("United Arab Emirates"),
- N_("United Kingdom"),
- N_("United States Minor Outlying Islands"),
- N_("Uruguay"),
- N_("Uzbekistan"),
- N_("Vanuatu"),
- N_("Venezuela"),
- N_("Viet Nam"),
- N_("Virgin Islands, British"),
- N_("Virgin Islands, U.S."),
- N_("Wallis And Futuna Islands"),
- N_("Western Sahara"),
- N_("Yemen"),
- N_("Yugoslavia"),
- N_("Zambia"),
- N_("Zimbabwe"),
- NULL
-};
-
-static int
-compare_func (const void *voida, const void *voidb)
-{
- char * const *stringa = voida, * const *stringb = voidb;
-
- return strcoll (*stringa, *stringb);
-}
-
-static void
-fill_in_countries (GladeXML *gui)
-{
- GtkCombo *combo;
- combo = (GtkCombo *) glade_xml_get_widget(gui, "combo-country");
- if (combo && GTK_IS_COMBO (combo)) {
- static gboolean sorted = FALSE;
- static GList *country_list;
- if (!sorted) {
- int i;
- char *locale;
-
- for (i = 0; countries[i]; i++) {
- countries[i] = _(countries[i]);
- }
-
- locale = setlocale (LC_COLLATE, NULL);
- qsort (countries + 1, i - 1, sizeof (countries[0]), compare_func);
- country_list = NULL;
- for (i = 0; countries[i]; i++) {
- country_list = g_list_prepend (country_list, countries[i]);
- }
- country_list = g_list_reverse (country_list);
- sorted = TRUE;
- }
- gtk_combo_set_popdown_strings (combo, country_list);
- }
-}
-
-static void
-e_contact_editor_address_init (EContactEditorAddress *e_contact_editor_address)
-{
- GladeXML *gui;
- GtkWidget *widget;
- char *icon_path;
-
- gtk_dialog_add_buttons (GTK_DIALOG (e_contact_editor_address),
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_OK, GTK_RESPONSE_OK,
- NULL);
-
- gtk_window_set_resizable(GTK_WINDOW(e_contact_editor_address), TRUE);
-
-#if notyet
- e_contact_editor_address->address = NULL;
-#endif
-
- gui = glade_xml_new (EVOLUTION_GLADEDIR "/fulladdr.glade", NULL, NULL);
- e_contact_editor_address->gui = gui;
-
- setup_tab_order (gui);
- fill_in_countries (gui);
-
- widget = glade_xml_get_widget(gui, "dialog-checkaddress");
- gtk_window_set_title (GTK_WINDOW (e_contact_editor_address),
- GTK_WINDOW (widget)->title);
-
- widget = glade_xml_get_widget(gui, "table-checkaddress");
- g_object_ref(widget);
- gtk_container_remove(GTK_CONTAINER(widget->parent), widget);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (e_contact_editor_address)->vbox), widget, TRUE, TRUE, 0);
- g_object_unref(widget);
-
- icon_path = g_concat_dir_and_file (EVOLUTION_IMAGESDIR, "evolution-contacts-mini.png");
- gnome_window_icon_set_from_file (GTK_WINDOW (e_contact_editor_address), icon_path);
- g_free (icon_path);
-}
-
-void
-e_contact_editor_address_dispose (GObject *object)
-{
- EContactEditorAddress *e_contact_editor_address = E_CONTACT_EDITOR_ADDRESS(object);
-
- if (e_contact_editor_address->gui) {
- g_object_unref(e_contact_editor_address->gui);
- e_contact_editor_address->gui = NULL;
- }
-
-#if notyet
- if (e_contact_editor_address->address) {
- e_card_delivery_address_unref(e_contact_editor_address->address);
- e_contact_editor_address->address = NULL;
- }
-#endif
-
- if (G_OBJECT_CLASS (parent_class)->dispose)
- (* G_OBJECT_CLASS (parent_class)->dispose) (object);
-}
-
-GtkWidget*
-e_contact_editor_address_new (/* XXX notyet const ECardDeliveryAddress *address*/)
-{
- GtkWidget *widget = g_object_new (E_TYPE_CONTACT_EDITOR_ADDRESS, NULL);
-#if notyet
- g_object_set (widget,
- "address", address,
- NULL);
-#endif
- return widget;
-}
-
-static void
-e_contact_editor_address_set_property (GObject *object, guint prop_id,
- const GValue *value, GParamSpec *pspec)
-{
- EContactEditorAddress *e_contact_editor_address;
-
- e_contact_editor_address = E_CONTACT_EDITOR_ADDRESS (object);
-
- switch (prop_id){
- case PROP_ADDRESS:
-#if notyet
- e_card_delivery_address_unref(e_contact_editor_address->address);
- e_contact_editor_address->address = e_card_delivery_address_copy(g_value_get_pointer (value));
- fill_in_info(e_contact_editor_address);
-#endif
- break;
- case PROP_EDITABLE: {
- int i;
- char *widget_names[] = {
- "entry-street",
- "entry-city",
- "entry-ext",
- "entry-po",
- "entry-region",
- "combo-country",
- "entry-code",
- "label-street",
- "label-city",
- "label-ext",
- "label-po",
- "label-region",
- "label-country",
- "label-code",
- NULL
- };
- e_contact_editor_address->editable = g_value_get_boolean (value) ? TRUE : FALSE;
- for (i = 0; widget_names[i] != NULL; i ++) {
- GtkWidget *w = glade_xml_get_widget(e_contact_editor_address->gui, widget_names[i]);
- if (GTK_IS_ENTRY (w)) {
- gtk_editable_set_editable (GTK_EDITABLE (w),
- e_contact_editor_address->editable);
- }
- else if (GTK_IS_COMBO (w)) {
- gtk_editable_set_editable (GTK_EDITABLE (GTK_COMBO (w)->entry),
- e_contact_editor_address->editable);
- gtk_widget_set_sensitive (GTK_COMBO (w)->button, e_contact_editor_address->editable);
- }
- else if (GTK_IS_LABEL (w)) {
- gtk_widget_set_sensitive (w, e_contact_editor_address->editable);
- }
- }
- break;
- }
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-e_contact_editor_address_get_property (GObject *object, guint prop_id,
- GValue *value, GParamSpec *pspec)
-{
- EContactEditorAddress *e_contact_editor_address;
-
- e_contact_editor_address = E_CONTACT_EDITOR_ADDRESS (object);
-
- switch (prop_id) {
- case PROP_ADDRESS:
- extract_info(e_contact_editor_address);
-#if notyet
- g_value_set_pointer (value, e_card_delivery_address_ref(e_contact_editor_address->address));
-#endif
- break;
- case PROP_EDITABLE:
- g_value_set_boolean (value, e_contact_editor_address->editable ? TRUE : FALSE);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-fill_in_field(EContactEditorAddress *editor, char *field, char *string)
-{
- GtkEntry *entry = GTK_ENTRY(glade_xml_get_widget(editor->gui, field));
- if (entry) {
- if (string)
- gtk_entry_set_text(entry, string);
- else
- gtk_entry_set_text(entry, "");
- }
-}
-
-static void
-fill_in_info(EContactEditorAddress *editor)
-{
-#if notyet
- 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);
- }
-#endif
-}
-
-static char *
-extract_field(EContactEditorAddress *editor, char *field)
-{
- GtkEntry *entry = GTK_ENTRY(glade_xml_get_widget(editor->gui, field));
- if (entry)
- return g_strdup (gtk_entry_get_text(entry));
- else
- return NULL;
-}
-
-static void
-extract_info(EContactEditorAddress *editor)
-{
-#if notyet
- 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");
-#endif
-}
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 893a2ea2f7..0000000000
--- a/addressbook/gui/contact-editor/e-contact-editor-address.h
+++ /dev/null
@@ -1,73 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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 <gtk/gtkdialog.h>
-#include <glade/glade.h>
-#include <libebook/e-contact.h>
-
-G_BEGIN_DECLS
-
-/* 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_TYPE_CONTACT_EDITOR_ADDRESS (e_contact_editor_address_get_type ())
-#define E_CONTACT_EDITOR_ADDRESS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_CONTACT_EDITOR_ADDRESS, EContactEditorAddress))
-#define E_CONTACT_EDITOR_ADDRESS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_CONTACT_EDITOR_ADDRESS, EContactEditorAddressClass))
-#define E_IS_CONTACT_EDITOR_ADDRESS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_CONTACT_EDITOR_ADDRESS))
-#define E_IS_CONTACT_EDITOR_ADDRESS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_CONTACT_EDITOR_ADDRESS))
-
-
-typedef struct _EContactEditorAddress EContactEditorAddress;
-typedef struct _EContactEditorAddressClass EContactEditorAddressClass;
-
-struct _EContactEditorAddress
-{
- GtkDialog parent;
-
-#if notyet
- /* item specific fields */
- ECardDeliveryAddress *address;
-#endif
-
- guint editable : 1;
-
- GladeXML *gui;
-};
-
-struct _EContactEditorAddressClass
-{
- GtkDialogClass parent_class;
-};
-
-
-GtkWidget *e_contact_editor_address_new(/* XXX not yet const ECardDeliveryAddress *name*/);
-GType e_contact_editor_address_get_type (void);
-
-G_END_DECLS
-
-#endif /* __E_CONTACT_EDITOR_ADDRESS_H__ */
diff --git a/addressbook/gui/contact-editor/e-contact-editor-fullname.c b/addressbook/gui/contact-editor/e-contact-editor-fullname.c
deleted file mode 100644
index c37f4cc8b7..0000000000
--- a/addressbook/gui/contact-editor/e-contact-editor-fullname.c
+++ /dev/null
@@ -1,287 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * eab-contact-editor-phones.c
- * Copyright (C) 2003 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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-editor-fullname.h"
-#include <libgnomeui/gnome-window-icon.h>
-#include <libgnome/gnome-util.h>
-#include <libgnome/gnome-i18n.h>
-#include <gtk/gtkcombo.h>
-#include <gtk/gtkstock.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtklabel.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_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
-static void e_contact_editor_fullname_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
-static void e_contact_editor_fullname_dispose (GObject *object);
-
-static void fill_in_info(EContactEditorFullname *editor);
-static void extract_info(EContactEditorFullname *editor);
-
-static GtkDialogClass *parent_class = NULL;
-
-/* The arguments we take */
-enum {
- PROP_0,
- PROP_NAME,
- PROP_EDITABLE
-};
-
-GType
-e_contact_editor_fullname_get_type (void)
-{
- static GType contact_editor_fullname_type = 0;
-
- if (!contact_editor_fullname_type) {
- static const GTypeInfo contact_editor_fullname_info = {
- sizeof (EContactEditorFullnameClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) e_contact_editor_fullname_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EContactEditorFullname),
- 0, /* n_preallocs */
- (GInstanceInitFunc) e_contact_editor_fullname_init,
- };
-
- contact_editor_fullname_type = g_type_register_static (GTK_TYPE_DIALOG, "EContactEditorFullname", &contact_editor_fullname_info, 0);
- }
-
- return contact_editor_fullname_type;
-}
-
-static void
-e_contact_editor_fullname_class_init (EContactEditorFullnameClass *klass)
-{
- GObjectClass *object_class;
-
- object_class = G_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_ref (GTK_TYPE_DIALOG);
-
- object_class->set_property = e_contact_editor_fullname_set_property;
- object_class->get_property = e_contact_editor_fullname_get_property;
- object_class->dispose = e_contact_editor_fullname_dispose;
-
- g_object_class_install_property (object_class, PROP_NAME,
- g_param_spec_pointer ("name",
- _("Name"),
- /*_( */"XXX blurb" /*)*/,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_EDITABLE,
- g_param_spec_boolean ("editable",
- _("Editable"),
- /*_( */"XXX blurb" /*)*/,
- FALSE,
- G_PARAM_READWRITE));
-}
-
-static void
-e_contact_editor_fullname_init (EContactEditorFullname *e_contact_editor_fullname)
-{
- GladeXML *gui;
- GtkWidget *widget;
- char *icon_path;
-
- gtk_dialog_add_buttons (GTK_DIALOG (e_contact_editor_fullname),
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_OK, GTK_RESPONSE_OK,
- NULL);
-
- gtk_window_set_resizable(GTK_WINDOW(e_contact_editor_fullname), TRUE);
-
- e_contact_editor_fullname->name = NULL;
- gui = glade_xml_new (EVOLUTION_GLADEDIR "/fullname.glade", NULL, NULL);
- e_contact_editor_fullname->gui = gui;
-
- widget = glade_xml_get_widget(gui, "dialog-checkfullname");
- gtk_window_set_title (GTK_WINDOW (e_contact_editor_fullname),
- GTK_WINDOW (widget)->title);
-
- widget = glade_xml_get_widget(gui, "table-checkfullname");
- g_object_ref(widget);
- gtk_container_remove(GTK_CONTAINER(widget->parent), widget);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (e_contact_editor_fullname)->vbox), widget, TRUE, TRUE, 0);
- g_object_unref(widget);
-
- icon_path = g_concat_dir_and_file (EVOLUTION_IMAGESDIR, "evolution-contacts-mini.png");
- gnome_window_icon_set_from_file (GTK_WINDOW (e_contact_editor_fullname), icon_path);
- g_free (icon_path);
-}
-
-void
-e_contact_editor_fullname_dispose (GObject *object)
-{
- EContactEditorFullname *e_contact_editor_fullname = E_CONTACT_EDITOR_FULLNAME(object);
-
- if (e_contact_editor_fullname->gui) {
- g_object_unref(e_contact_editor_fullname->gui);
- e_contact_editor_fullname->gui = NULL;
- }
-
- if (e_contact_editor_fullname->name) {
- e_contact_name_free(e_contact_editor_fullname->name);
- e_contact_editor_fullname->name = NULL;
- }
-
- if (G_OBJECT_CLASS (parent_class)->dispose)
- (* G_OBJECT_CLASS (parent_class)->dispose) (object);
-}
-
-GtkWidget*
-e_contact_editor_fullname_new (const EContactName *name)
-{
- GtkWidget *widget = g_object_new (E_TYPE_CONTACT_EDITOR_FULLNAME, NULL);
- g_object_set (widget,
- "name", name,
- NULL);
- return widget;
-}
-
-static void
-e_contact_editor_fullname_set_property (GObject *object, guint prop_id,
- const GValue *value, GParamSpec *pspec)
-{
- EContactEditorFullname *e_contact_editor_fullname;
-
- e_contact_editor_fullname = E_CONTACT_EDITOR_FULLNAME (object);
-
- switch (prop_id){
- case PROP_NAME:
- e_contact_name_free(e_contact_editor_fullname->name);
- e_contact_editor_fullname->name = e_contact_name_copy(g_value_get_pointer (value));
- fill_in_info(e_contact_editor_fullname);
- break;
- case PROP_EDITABLE: {
- int i;
- char *widget_names[] = {
- "combo-title",
- "combo-suffix",
- "entry-first",
- "entry-middle",
- "entry-last",
- "label-title",
- "label-suffix",
- "label-first",
- "label-middle",
- "label-last",
- NULL
- };
- e_contact_editor_fullname->editable = g_value_get_boolean (value) ? TRUE : FALSE;
- for (i = 0; widget_names[i] != NULL; i ++) {
- GtkWidget *w = glade_xml_get_widget(e_contact_editor_fullname->gui, widget_names[i]);
- if (GTK_IS_ENTRY (w)) {
- gtk_editable_set_editable (GTK_EDITABLE (w),
- e_contact_editor_fullname->editable);
- }
- else if (GTK_IS_COMBO (w)) {
- gtk_editable_set_editable (GTK_EDITABLE (GTK_COMBO (w)->entry),
- e_contact_editor_fullname->editable);
- gtk_widget_set_sensitive (GTK_COMBO (w)->button, e_contact_editor_fullname->editable);
- }
- else if (GTK_IS_LABEL (w)) {
- gtk_widget_set_sensitive (w, e_contact_editor_fullname->editable);
- }
- }
- break;
- }
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-e_contact_editor_fullname_get_property (GObject *object, guint prop_id,
- GValue *value, GParamSpec *pspec)
-{
- EContactEditorFullname *e_contact_editor_fullname;
-
- e_contact_editor_fullname = E_CONTACT_EDITOR_FULLNAME (object);
-
- switch (prop_id) {
- case PROP_NAME:
- extract_info(e_contact_editor_fullname);
- g_value_set_pointer (value, e_contact_name_copy(e_contact_editor_fullname->name));
- break;
- case PROP_EDITABLE:
- g_value_set_boolean (value, e_contact_editor_fullname->editable ? TRUE : FALSE);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-fill_in_field(EContactEditorFullname *editor, char *field, char *string)
-{
- GtkEntry *entry = GTK_ENTRY(glade_xml_get_widget(editor->gui, field));
- if (entry) {
- if (string)
- gtk_entry_set_text(entry, string);
- else
- gtk_entry_set_text(entry, "");
- }
-}
-
-static void
-fill_in_info(EContactEditorFullname *editor)
-{
- EContactName *name = editor->name;
- if (name) {
- fill_in_field(editor, "entry-title", name->prefixes);
- 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->suffixes);
- }
-}
-
-static char *
-extract_field(EContactEditorFullname *editor, char *field)
-{
- GtkEntry *entry = GTK_ENTRY(glade_xml_get_widget(editor->gui, field));
- if (entry)
- return g_strdup (gtk_entry_get_text(entry));
- else
- return NULL;
-}
-
-static void
-extract_info(EContactEditorFullname *editor)
-{
- EContactName *name = editor->name;
- if (!name) {
- name = e_contact_name_new();
- editor->name = name;
- }
-
- name->prefixes = 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->suffixes = 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 0b254c789c..0000000000
--- a/addressbook/gui/contact-editor/e-contact-editor-fullname.h
+++ /dev/null
@@ -1,71 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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 <gtk/gtkdialog.h>
-#include <glade/glade.h>
-#include <libebook/e-contact.h>
-
-G_BEGIN_DECLS
-
-/* 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_TYPE_CONTACT_EDITOR_FULLNAME (e_contact_editor_fullname_get_type ())
-#define E_CONTACT_EDITOR_FULLNAME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_CONTACT_EDITOR_FULLNAME, EContactEditorFullname))
-#define E_CONTACT_EDITOR_FULLNAME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_CONTACT_EDITOR_FULLNAME, EContactEditorFullnameClass))
-#define E_IS_CONTACT_EDITOR_FULLNAME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_CONTACT_EDITOR_FULLNAME))
-#define E_IS_CONTACT_EDITOR_FULLNAME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_CONTACT_EDITOR_FULLNAME))
-
-
-typedef struct _EContactEditorFullname EContactEditorFullname;
-typedef struct _EContactEditorFullnameClass EContactEditorFullnameClass;
-
-struct _EContactEditorFullname
-{
- GtkDialog parent;
-
- /* item specific fields */
- EContactName *name;
- GladeXML *gui;
-
- /* Whether the dialog will accept modifications */
- guint editable : 1;
-};
-
-struct _EContactEditorFullnameClass
-{
- GtkDialogClass parent_class;
-};
-
-
-GtkWidget *e_contact_editor_fullname_new(const EContactName *name);
-GType e_contact_editor_fullname_get_type (void);
-
-G_END_DECLS
-
-#endif /* __E_CONTACT_EDITOR_FULLNAME_H__ */
diff --git a/addressbook/gui/contact-editor/e-contact-editor-marshal.list b/addressbook/gui/contact-editor/e-contact-editor-marshal.list
deleted file mode 100644
index 58b2640de5..0000000000
--- a/addressbook/gui/contact-editor/e-contact-editor-marshal.list
+++ /dev/null
@@ -1,2 +0,0 @@
-NONE:INT,OBJECT
-NONE:NONE
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 1391ccf1b0..0000000000
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ /dev/null
@@ -1,2612 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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-editor.h"
-
-#include <string.h>
-#include <time.h>
-#include <gtk/gtkcheckbutton.h>
-#include <gtk/gtkcheckmenuitem.h>
-#include <gtk/gtkcombo.h>
-#include <gtk/gtktextview.h>
-#include <gtk/gtkmessagedialog.h>
-#include <gtk/gtkstock.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtklabel.h>
-#include <libgnomeui/gnome-popup-menu.h>
-#include <libgnomeui/gnome-window-icon.h>
-#include <libgnome/gnome-i18n.h>
-
-#include <bonobo/bonobo-ui-container.h>
-#include <bonobo/bonobo-ui-util.h>
-#include <bonobo/bonobo-window.h>
-#include <gdk-pixbuf/gdk-pixbuf.h>
-#include <gal/widgets/e-categories.h>
-#include <gal/widgets/e-gui-utils.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 "addressbook/gui/widgets/eab-gui-util.h"
-#include "e-util/e-gui-utils.h"
-#include "widgets/misc/e-dateedit.h"
-#include "widgets/misc/e-url-entry.h"
-#include "shell/evolution-shell-component-utils.h"
-
-#include "eab-contact-merging.h"
-
-#include "e-contact-editor-address.h"
-#include "e-contact-editor-fullname.h"
-#include "e-contact-editor-marshal.h"
-
-/* Signal IDs */
-enum {
- CONTACT_ADDED,
- CONTACT_MODIFIED,
- CONTACT_DELETED,
- EDITOR_CLOSED,
- LAST_SIGNAL
-};
-
-static void e_contact_editor_init (EContactEditor *editor);
-static void e_contact_editor_class_init (EContactEditorClass *klass);
-static void e_contact_editor_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
-static void e_contact_editor_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
-static void e_contact_editor_dispose (GObject *object);
-
-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 find_address_mailing (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_field(EContactEditor *editor, GtkEntry *entry, const char *string);
-static void set_address_field(EContactEditor *editor, int result);
-static void set_phone_field(EContactEditor *editor, GtkWidget *entry, const char *phone_number);
-static void set_fields(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 {
- PROP_0,
- PROP_BOOK,
- PROP_CONTACT,
- PROP_IS_NEW_CONTACT,
- PROP_EDITABLE,
- PROP_CHANGED,
- PROP_WRITABLE_FIELDS
-};
-
-enum {
- DYNAMIC_LIST_EMAIL,
- DYNAMIC_LIST_PHONE,
- DYNAMIC_LIST_ADDRESS
-};
-
-static EContactField phones[] = {
- E_CONTACT_PHONE_ASSISTANT,
- E_CONTACT_PHONE_BUSINESS,
- E_CONTACT_PHONE_BUSINESS_2,
- E_CONTACT_PHONE_BUSINESS_FAX,
- E_CONTACT_PHONE_CALLBACK,
- E_CONTACT_PHONE_CAR,
- E_CONTACT_PHONE_COMPANY,
- E_CONTACT_PHONE_HOME,
- E_CONTACT_PHONE_HOME_2,
- E_CONTACT_PHONE_HOME_FAX,
- E_CONTACT_PHONE_ISDN,
- E_CONTACT_PHONE_MOBILE,
- E_CONTACT_PHONE_OTHER,
- E_CONTACT_PHONE_OTHER_FAX,
- E_CONTACT_PHONE_PAGER,
- E_CONTACT_PHONE_PRIMARY,
- E_CONTACT_PHONE_RADIO,
- E_CONTACT_PHONE_TELEX,
- E_CONTACT_PHONE_TTYTDD,
-};
-
-static EContactField emails[] = {
- E_CONTACT_EMAIL_1,
- E_CONTACT_EMAIL_2,
- E_CONTACT_EMAIL_3
-};
-
-static GSList *all_contact_editors = NULL;
-
-GType
-e_contact_editor_get_type (void)
-{
- static GType contact_editor_type = 0;
-
- if (!contact_editor_type) {
- static const GTypeInfo contact_editor_info = {
- sizeof (EContactEditorClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) e_contact_editor_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EContactEditor),
- 0, /* n_preallocs */
- (GInstanceInitFunc) e_contact_editor_init,
- };
-
- contact_editor_type = g_type_register_static (GTK_TYPE_OBJECT, "EContactEditor", &contact_editor_info, 0);
- }
-
- return contact_editor_type;
-}
-
-static void
-e_contact_editor_class_init (EContactEditorClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_ref (GTK_TYPE_OBJECT);
-
- object_class->set_property = e_contact_editor_set_property;
- object_class->get_property = e_contact_editor_get_property;
- object_class->dispose = e_contact_editor_dispose;
-
- g_object_class_install_property (object_class, PROP_BOOK,
- g_param_spec_object ("book",
- _("Book"),
- /*_( */"XXX blurb" /*)*/,
- E_TYPE_BOOK,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_CONTACT,
- g_param_spec_object ("contact",
- _("Contact"),
- /*_( */"XXX blurb" /*)*/,
- E_TYPE_CONTACT,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_IS_NEW_CONTACT,
- g_param_spec_boolean ("is_new_contact",
- _("Is New Contact"),
- /*_( */"XXX blurb" /*)*/,
- FALSE,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_WRITABLE_FIELDS,
- g_param_spec_object ("writable_fields",
- _("Writable Fields"),
- /*_( */"XXX blurb" /*)*/,
- E_TYPE_LIST,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_EDITABLE,
- g_param_spec_boolean ("editable",
- _("Editable"),
- /*_( */"XXX blurb" /*)*/,
- FALSE,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_CHANGED,
- g_param_spec_boolean ("changed",
- _("Changed"),
- /*_( */"XXX blurb" /*)*/,
- FALSE,
- G_PARAM_READWRITE));
-
- contact_editor_signals[CONTACT_ADDED] =
- g_signal_new ("contact_added",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (EContactEditorClass, contact_added),
- NULL, NULL,
- e_contact_editor_marshal_NONE__INT_OBJECT,
- G_TYPE_NONE, 2,
- G_TYPE_INT, G_TYPE_OBJECT);
-
- contact_editor_signals[CONTACT_MODIFIED] =
- g_signal_new ("contact_modified",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (EContactEditorClass, contact_modified),
- NULL, NULL,
- e_contact_editor_marshal_NONE__INT_OBJECT,
- G_TYPE_NONE, 2,
- G_TYPE_INT, G_TYPE_OBJECT);
-
- contact_editor_signals[CONTACT_DELETED] =
- g_signal_new ("contact_deleted",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (EContactEditorClass, contact_deleted),
- NULL, NULL,
- e_contact_editor_marshal_NONE__INT_OBJECT,
- G_TYPE_NONE, 2,
- G_TYPE_INT, G_TYPE_OBJECT);
-
- contact_editor_signals[EDITOR_CLOSED] =
- g_signal_new ("editor_closed",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (EContactEditorClass, editor_closed),
- NULL, NULL,
- e_contact_editor_marshal_NONE__NONE,
- G_TYPE_NONE, 0);
-}
-
-static void
-connect_arrow_button_signal (EContactEditor *editor, gchar *button_xml, GCallback func)
-{
- GladeXML *gui = editor->gui;
- GtkWidget *button = glade_xml_get_widget(gui, button_xml);
- if (button && GTK_IS_BUTTON(button)) {
- g_signal_connect(button, "button_press_event", func, editor);
- }
-}
-
-static void
-connect_arrow_button_signals (EContactEditor *editor)
-{
- connect_arrow_button_signal(editor, "button-phone1", G_CALLBACK (_phone_arrow_pressed));
- connect_arrow_button_signal(editor, "button-phone2", G_CALLBACK (_phone_arrow_pressed));
- connect_arrow_button_signal(editor, "button-phone3", G_CALLBACK (_phone_arrow_pressed));
- connect_arrow_button_signal(editor, "button-phone4", G_CALLBACK (_phone_arrow_pressed));
- connect_arrow_button_signal(editor, "button-address", G_CALLBACK (_address_arrow_pressed));
- connect_arrow_button_signal(editor, "button-email1", G_CALLBACK (_email_arrow_pressed));
-}
-
-static void
-wants_html_changed (GtkWidget *widget, EContactEditor *editor)
-{
- gboolean wants_html;
- g_object_get (widget,
- "active", &wants_html,
- NULL);
-
- e_contact_set (editor->contact, E_CONTACT_WANTS_HTML, GINT_TO_POINTER (wants_html));
-
- widget_changed (widget, editor);
-}
-
-static void
-phone_entry_changed (GtkWidget *widget, EContactEditor *editor)
-{
- int which;
- GtkEntry *entry = GTK_ENTRY(widget);
-
- 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;
-
- printf ("gtk_entry_get_text(entry) == %s\n", (char*)gtk_entry_get_text(entry));
- e_contact_set(editor->contact, editor->phone_choice[which - 1], (char*)gtk_entry_get_text(entry));
-
- widget_changed (widget, editor);
-}
-
-static void
-email_entry_changed (GtkWidget *widget, EContactEditor *editor)
-{
- GtkEntry *entry = GTK_ENTRY(widget);
-
- e_contact_set (editor->contact, editor->email_choice, (char*)gtk_entry_get_text(entry));
-
- widget_changed (widget, editor);
-}
-
-static void
-address_text_changed (GtkTextBuffer *buffer, EContactEditor *editor)
-{
-#if notyet
- ECardAddrLabel *address;
- GtkTextIter start_iter, end_iter;
-
- if (editor->address_choice == -1)
- return;
-
- address = e_card_address_label_new();
-
- if (editor->address_mailing == editor->address_choice || editor->address_mailing == -1) {
- GtkWidget *check;
-
- address->flags |= E_CARD_ADDR_DEFAULT;
-
- check = glade_xml_get_widget(editor->gui, "checkbutton-mailingaddress");
- if (check && GTK_IS_CHECK_BUTTON (check)) {
- g_signal_handlers_block_matched (check,
- G_SIGNAL_MATCH_DATA,
- 0, 0,
- NULL, NULL, editor);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), TRUE);
- g_signal_handlers_unblock_matched (check,
- G_SIGNAL_MATCH_DATA,
- 0, 0,
- NULL, NULL, editor);
- }
- }
-
- gtk_text_buffer_get_start_iter (GTK_TEXT_BUFFER (buffer), &start_iter);
- gtk_text_buffer_get_end_iter (GTK_TEXT_BUFFER (buffer), &end_iter);
-
- address->data = gtk_text_buffer_get_text (GTK_TEXT_BUFFER (buffer), &start_iter, &end_iter, FALSE);
-
- e_card_simple_set_address(editor->simple, editor->address_choice, address);
- e_card_address_label_unref(address);
-
- widget_changed (NULL, editor);
-#endif
-}
-
-
-static void
-address_mailing_changed (GtkWidget *widget, EContactEditor *editor)
-{
-#if notyet
- const ECardDeliveryAddress *curr;
- ECardDeliveryAddress *address;
- gboolean mailing_address;
-
- if (editor->address_choice == -1)
- return;
-
- mailing_address = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
-
- /* Mark the current address as the mailing address */
- curr = e_card_simple_get_delivery_address (editor->simple,
- editor->address_choice);
-
- address = e_card_delivery_address_copy (curr);
-
- if (!address)
- address = e_card_delivery_address_new ();
-
- if (mailing_address)
- address->flags |= E_CARD_ADDR_DEFAULT;
- else
- address->flags &= ~E_CARD_ADDR_DEFAULT;
-
- e_card_simple_set_delivery_address(editor->simple, editor->address_choice, address);
- e_card_delivery_address_unref (address);
-
- /* Unset the previous mailing address flag */
- if (mailing_address && editor->address_mailing != -1) {
- const ECardDeliveryAddress *curr;
-
- curr = e_card_simple_get_delivery_address(editor->simple,
- editor->address_mailing);
- address = e_card_delivery_address_copy (curr);
- address->flags &= ~E_CARD_ADDR_DEFAULT;
- e_card_simple_set_delivery_address(editor->simple,
- editor->address_mailing,
- address);
- e_card_delivery_address_unref (address);
- }
-
- /* Remember the new mailing address */
- if (mailing_address)
- editor->address_mailing = editor->address_choice;
- else
- editor->address_mailing = -1;
-
- widget_changed (widget, editor);
-#endif
-}
-
-
-/* This function tells you whether name_to_style will make sense. */
-static gboolean
-style_makes_sense(const EContactName *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 EContactName *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;
- EContactName *name = editor->name;
- int i;
- int style;
-
- if (!(file_as && GTK_IS_ENTRY(file_as)))
- return -1;
-
- filestring = g_strdup (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 = g_strdup (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);
- if (u) strings = g_list_append(strings, u);
- }
- }
-
- if (widget && GTK_IS_COMBO(widget)) {
- GtkCombo *combo = GTK_COMBO(widget);
- gtk_combo_set_popdown_strings(combo, strings);
- g_list_foreach(strings, (GFunc) g_free, NULL);
- g_list_free(strings);
- }
-
- if (style != -1) {
- string = name_to_style(editor->name, editor->company, style);
- gtk_entry_set_text(file_as, string);
- g_free(string);
- }
-}
-
-static void
-name_entry_changed (GtkWidget *widget, EContactEditor *editor)
-{
- int style = 0;
- const char *string;
-
- style = file_as_get_style(editor);
-
- e_contact_name_free (editor->name);
-
- string = gtk_entry_get_text (GTK_ENTRY(widget));
-
- editor->name = e_contact_name_from_string(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 = g_strdup (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))
- g_signal_connect(widget, "changed",
- G_CALLBACK (phone_entry_changed), editor);
-}
-
-static void
-set_entry_changed_signal_email(EContactEditor *editor, char *id)
-{
- GtkWidget *widget = glade_xml_get_widget(editor->gui, id);
- if (widget && GTK_IS_ENTRY(widget))
- g_signal_connect(widget, "changed",
- G_CALLBACK (email_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))
- g_signal_connect(widget, "changed",
- G_CALLBACK (field_changed), editor);
-}
-
-static void
-set_urlentry_changed_signal_field (EContactEditor *editor, char *id)
-{
- GtkWidget *widget = glade_xml_get_widget(editor->gui, id);
- if (widget && E_IS_URL_ENTRY(widget)) {
- GtkWidget *entry = e_url_entry_get_entry (E_URL_ENTRY (widget));
- g_signal_connect (entry, "changed",
- G_CALLBACK (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");
-
- set_entry_changed_signal_email(editor, "entry-email1");
-
- widget = glade_xml_get_widget(editor->gui, "text-address");
- if (widget && GTK_IS_TEXT_VIEW(widget)) {
- GtkTextBuffer *buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (widget));
- g_signal_connect(buffer, "changed",
- G_CALLBACK (address_text_changed), editor);
- }
-
- widget = glade_xml_get_widget(editor->gui, "entry-fullname");
- if (widget && GTK_IS_ENTRY(widget)) {
- g_signal_connect (widget, "changed",
- G_CALLBACK (name_entry_changed), editor);
- }
-
- widget = glade_xml_get_widget(editor->gui, "entry-company");
- if (widget && GTK_IS_ENTRY(widget)) {
- g_signal_connect (widget, "changed",
- G_CALLBACK (company_entry_changed), editor);
- }
-
- set_urlentry_changed_signal_field (editor, "entry-web");
- set_urlentry_changed_signal_field (editor, "entry-blog");
- set_urlentry_changed_signal_field (editor, "entry-caluri");
- set_urlentry_changed_signal_field (editor, "entry-fburl");
-
- set_entry_changed_signal_field(editor, "entry-categories");
- set_entry_changed_signal_field(editor, "entry-jobtitle");
- set_entry_changed_signal_field(editor, "entry-file-as");
- set_entry_changed_signal_field(editor, "entry-manager");
- set_entry_changed_signal_field(editor, "entry-assistant");
- set_entry_changed_signal_field(editor, "entry-office");
- set_entry_changed_signal_field(editor, "entry-department");
- set_entry_changed_signal_field(editor, "entry-profession");
- set_entry_changed_signal_field(editor, "entry-nickname");
- set_entry_changed_signal_field(editor, "entry-spouse");
-
- widget = glade_xml_get_widget(editor->gui, "text-comments");
- if (widget && GTK_IS_TEXT_VIEW(widget)) {
- GtkTextBuffer *buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (widget));
- g_signal_connect (buffer, "changed",
- G_CALLBACK (widget_changed), editor);
- }
- widget = glade_xml_get_widget(editor->gui, "dateedit-birthday");
- if (widget && E_IS_DATE_EDIT(widget)) {
- g_signal_connect (widget, "changed",
- G_CALLBACK (widget_changed), editor);
- }
- widget = glade_xml_get_widget(editor->gui, "dateedit-anniversary");
- if (widget && E_IS_DATE_EDIT(widget)) {
- g_signal_connect (widget, "changed",
- G_CALLBACK (widget_changed), editor);
- }
-}
-
-static void
-full_name_clicked(GtkWidget *button, EContactEditor *editor)
-{
- GtkDialog *dialog = GTK_DIALOG(e_contact_editor_fullname_new(editor->name));
- int result;
-
- g_object_set (dialog,
- "editable", editor->fullname_editable,
- NULL);
- gtk_widget_show(GTK_WIDGET(dialog));
- result = gtk_dialog_run (dialog);
- gtk_widget_hide (GTK_WIDGET (dialog));
-
- if (editor->fullname_editable && result == GTK_RESPONSE_OK) {
- EContactName *name;
- GtkWidget *fname_widget;
- int style = 0;
-
- g_object_get (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_contact_name_to_string(name);
- gtk_entry_set_text(GTK_ENTRY(fname_widget), full_name);
- g_free(full_name);
- }
-
- e_contact_name_free(editor->name);
- editor->name = name;
-
- file_as_set_style(editor, style);
- }
- gtk_widget_destroy (GTK_WIDGET (dialog));
-}
-
-static void
-full_addr_clicked(GtkWidget *button, EContactEditor *editor)
-{
-#if notyet
- GtkDialog *dialog;
- int result;
- const ECardDeliveryAddress *address;
-
- address = e_card_simple_get_delivery_address(editor->simple, editor->address_choice);
-
- dialog = GTK_DIALOG(e_contact_editor_address_new(address));
- g_object_set (dialog,
- "editable", editor->address_editable[editor->address_choice],
- NULL);
- gtk_widget_show(GTK_WIDGET(dialog));
-
- result = gtk_dialog_run (dialog);
-
- gtk_widget_hide (GTK_WIDGET (dialog));
-
- if (editor->address_editable[editor->address_choice] && result == GTK_RESPONSE_OK) {
- ECardDeliveryAddress *new_address;
- GtkWidget *address_widget;
- int saved_choice = editor->address_choice;
-
- editor->address_choice = -1;
-
- g_object_get (dialog,
- "address", &new_address,
- NULL);
-
- address_widget = glade_xml_get_widget(editor->gui, "text-address");
- if (address_widget && GTK_IS_TEXT_VIEW(address_widget)) {
- GtkTextBuffer *buffer;
- char *string = e_card_delivery_address_to_string(new_address);
-
- buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (address_widget));
-
- gtk_text_buffer_set_text (buffer, string, strlen (string));
-
- g_free(string);
- }
-
- editor->address_choice = saved_choice;
-
- e_card_simple_set_delivery_address(editor->simple, editor->address_choice, new_address);
-
- e_card_delivery_address_unref(new_address);
-
- widget_changed (NULL, editor);
- }
- gtk_widget_destroy (GTK_WIDGET (dialog));
-#endif
-}
-
-static void
-categories_clicked(GtkWidget *button, EContactEditor *editor)
-{
- char *categories = NULL;
- GtkDialog *dialog;
- int result;
- GtkWidget *entry = glade_xml_get_widget(editor->gui, "entry-categories");
- ECategoriesMasterList *ecml;
- if (entry && GTK_IS_ENTRY(entry))
- categories = g_strdup (gtk_entry_get_text(GTK_ENTRY(entry)));
- else if (editor->contact)
- categories = e_contact_get (editor->contact, E_CONTACT_CATEGORIES);
-
- dialog = GTK_DIALOG(e_categories_new(categories));
-
- if (dialog == NULL) {
- GtkWidget *uh_oh = gtk_message_dialog_new (NULL,
- 0, GTK_MESSAGE_ERROR,
- GTK_RESPONSE_OK,
- _("Category editor not available."));
- g_free (categories);
- gtk_widget_show (uh_oh);
- return;
- }
-
- ecml = e_categories_master_list_wombat_new ();
- g_object_set (dialog,
- "header", _("This contact belongs to these categories:"),
- "ecml", ecml,
- NULL);
- g_object_unref (ecml);
- gtk_widget_show(GTK_WIDGET(dialog));
- result = gtk_dialog_run (dialog);
- g_free (categories);
- if (result == GTK_RESPONSE_OK) {
- g_object_get (dialog,
- "categories", &categories,
- NULL);
- if (entry && GTK_IS_ENTRY(entry))
- gtk_entry_set_text(GTK_ENTRY(entry), categories);
- else
- e_contact_set (editor->contact, E_CONTACT_CATEGORIES, categories);
-
- g_free(categories);
- }
- gtk_widget_destroy(GTK_WIDGET(dialog));
-}
-
-typedef struct {
- EContactEditor *ce;
- gboolean should_close;
-} EditorCloseStruct;
-
-static void
-contact_added_cb (EBook *book, EBookStatus status, const char *id, EditorCloseStruct *ecs)
-{
- EContactEditor *ce = ecs->ce;
- gboolean should_close = ecs->should_close;
-
- gtk_widget_set_sensitive (ce->app, TRUE);
- ce->in_async_call = FALSE;
-
- e_contact_set (ce->contact, E_CONTACT_UID, (char*)id);
-
- g_signal_emit (ce, contact_editor_signals[CONTACT_ADDED], 0,
- status, ce->contact);
-
- if (status == E_BOOK_ERROR_OK) {
- ce->is_new_contact = FALSE;
-
- if (should_close) {
- close_dialog (ce);
- }
- else {
- ce->changed = FALSE;
- command_state_changed (ce);
- }
- }
-
- g_object_unref (ce);
- g_free (ecs);
-}
-
-static void
-contact_modified_cb (EBook *book, EBookStatus status, EditorCloseStruct *ecs)
-{
- EContactEditor *ce = ecs->ce;
- gboolean should_close = ecs->should_close;
-
- gtk_widget_set_sensitive (ce->app, TRUE);
- ce->in_async_call = FALSE;
-
- g_signal_emit (ce, contact_editor_signals[CONTACT_MODIFIED], 0,
- status, ce->contact);
-
- if (status == E_BOOK_ERROR_OK) {
- if (should_close) {
- close_dialog (ce);
- }
- else {
- ce->changed = FALSE;
- command_state_changed (ce);
- }
- }
-
- g_object_unref (ce);
- g_free (ecs);
-}
-
-/* Emits the signal to request saving a contact */
-static void
-save_contact (EContactEditor *ce, gboolean should_close)
-{
- extract_info (ce);
-
- if (ce->book) {
- EditorCloseStruct *ecs = g_new(EditorCloseStruct, 1);
-
- ecs->ce = ce;
- g_object_ref (ecs->ce);
-
- ecs->should_close = should_close;
-
- gtk_widget_set_sensitive (ce->app, FALSE);
- ce->in_async_call = TRUE;
-
- if (ce->is_new_contact)
- eab_merging_book_add_contact (ce->book, ce->contact, (EBookIdCallback)contact_added_cb, ecs);
- else
- eab_merging_book_commit_contact (ce->book, ce->contact, (EBookCallback)contact_modified_cb, ecs);
- }
-}
-
-/* Closes the dialog box and emits the appropriate signals */
-static void
-close_dialog (EContactEditor *ce)
-{
- if (ce->app != NULL) {
- gtk_widget_destroy (ce->app);
- ce->app = NULL;
- g_signal_emit (ce, contact_editor_signals[EDITOR_CLOSED], 0);
- }
-}
-
-static gboolean
-prompt_to_save_changes (EContactEditor *editor)
-{
- if (!editor->changed)
- return TRUE;
-
- switch (eab_prompt_save_dialog (GTK_WINDOW(editor->app))) {
- case GTK_RESPONSE_YES:
- save_contact (editor, FALSE);
- return TRUE;
- case GTK_RESPONSE_NO:
- return TRUE;
- case GTK_RESPONSE_CANCEL:
- default:
- return FALSE;
- }
-}
-
-/* Menu callbacks */
-
-/* File/Save callback */
-static void
-file_save_cb (GtkWidget *widget, gpointer data)
-{
- EContactEditor *ce;
-
- ce = E_CONTACT_EDITOR (data);
- save_contact (ce, FALSE);
-}
-
-/* File/Close callback */
-static void
-file_close_cb (GtkWidget *widget, gpointer data)
-{
- EContactEditor *ce;
-
- ce = E_CONTACT_EDITOR (data);
- if (!prompt_to_save_changes (ce))
- return;
-
- close_dialog (ce);
-}
-
-static void
-file_save_as_cb (GtkWidget *widget, gpointer data)
-{
- EContactEditor *ce;
- EContact *contact;
-
- ce = E_CONTACT_EDITOR (data);
-
- extract_info (ce);
-
- contact = ce->contact;
- eab_contact_save(_("Save Contact as VCard"), contact, GTK_WINDOW (ce->app));
-}
-
-static void
-file_send_as_cb (GtkWidget *widget, gpointer data)
-{
- EContactEditor *ce;
-
- ce = E_CONTACT_EDITOR (data);
-
- extract_info (ce);
-
- eab_send_contact(ce->contact, EAB_DISPOSITION_AS_ATTACHMENT);
-}
-
-static void
-file_send_to_cb (GtkWidget *widget, gpointer data)
-{
- EContactEditor *ce;
-
- ce = E_CONTACT_EDITOR (data);
-
- extract_info (ce);
-
- eab_send_contact(ce->contact, EAB_DISPOSITION_AS_TO);
-}
-
-gboolean
-e_contact_editor_confirm_delete (GtkWindow *parent)
-{
- GtkWidget *dialog;
- gint result;
-
- dialog = gtk_message_dialog_new (parent,
- 0,
- GTK_MESSAGE_QUESTION,
- GTK_BUTTONS_NONE,
-#if notyet
- /* XXX we really need to handle the plural case here.. */
- (plural
- ? _("Are you sure you want\n"
- "to delete these contacts?"))
-#endif
- _("Are you sure you want\n"
- "to delete this contact?"));
-
- gtk_dialog_add_buttons (GTK_DIALOG (dialog),
- GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
- GTK_STOCK_DELETE, GTK_RESPONSE_ACCEPT,
- NULL);
-
- result = gtk_dialog_run(GTK_DIALOG (dialog));
-
- gtk_widget_destroy (dialog);
-
- return (result == GTK_RESPONSE_ACCEPT);
-}
-
-static void
-contact_deleted_cb (EBook *book, EBookStatus status, EContactEditor *ce)
-{
- gtk_widget_set_sensitive (ce->app, TRUE);
- ce->in_async_call = FALSE;
-
- g_signal_emit (ce, contact_editor_signals[CONTACT_DELETED], 0,
- status, ce->contact);
-
- /* always close the dialog after we successfully delete a card */
- if (status == E_BOOK_ERROR_OK)
- close_dialog (ce);
-}
-
-static void
-delete_cb (GtkWidget *widget, gpointer data)
-{
- EContactEditor *ce = E_CONTACT_EDITOR (data);
- EContact *contact = ce->contact;
-
- g_object_ref(contact);
-
- if (e_contact_editor_confirm_delete(GTK_WINDOW(ce->app))) {
-
- extract_info (ce);
-
- if (!ce->is_new_contact && ce->book) {
- gtk_widget_set_sensitive (ce->app, FALSE);
- ce->in_async_call = TRUE;
-
- e_book_async_remove_contact (ce->book, contact, (EBookCallback)contact_deleted_cb, ce);
- }
- }
-
- g_object_unref(contact);
-}
-
-/* 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);
-
- gtk_widget_show(e_contact_print_contact_dialog_new(ce->contact));
-}
-
-#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_contact (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/ContactEditorSaveClose", "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, PREFIX,
- EVOLUTION_UIDIR "/evolution-contact-editor.xml",
- "evolution-contact-editor", NULL);
-
- 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);
-
- /* if we're saving, don't allow the dialog to close */
- if (ce->in_async_call)
- return TRUE;
-
- if (!prompt_to_save_changes (ce))
- return TRUE;
-
- 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 = add_to_tab_order(list, gui, "entry-email1");
- list = add_to_tab_order(list, gui, "alignment-htmlmail");
- list = add_to_tab_order(list, gui, "entry-web");
- list = add_to_tab_order(list, gui, "entry-blog");
- list = add_to_tab_order(list, gui, "button-fulladdr");
- list = add_to_tab_order(list, gui, "text-address");
- 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;
- char *icon_path;
-
- 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_contact_name_new();
- e_contact_editor->company = g_strdup("");
-
- e_contact_editor->email_choice = E_CONTACT_EMAIL_1;
- e_contact_editor->phone_choice[0] = E_CONTACT_PHONE_BUSINESS;
- e_contact_editor->phone_choice[1] = E_CONTACT_PHONE_HOME;
- e_contact_editor->phone_choice[2] = E_CONTACT_PHONE_BUSINESS_FAX;
- e_contact_editor->phone_choice[3] = E_CONTACT_PHONE_MOBILE;
-#if 0
- e_contact_editor->address_choice = 0;
- e_contact_editor->address_mailing = -1;
-#endif
-
- e_contact_editor->contact = NULL;
- e_contact_editor->changed = FALSE;
- e_contact_editor->in_async_call = FALSE;
- e_contact_editor->editable = TRUE;
-
- gui = glade_xml_new (EVOLUTION_GLADEDIR "/contact-editor.glade", NULL, NULL);
- e_contact_editor->gui = gui;
-
- setup_tab_order(gui);
-
- e_contact_editor->app = glade_xml_get_widget (gui, "contact editor");
-
- connect_arrow_button_signals(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))
- g_signal_connect (wants_html, "toggled",
- G_CALLBACK (wants_html_changed), e_contact_editor);
-
- widget = glade_xml_get_widget(e_contact_editor->gui, "checkbutton-mailingaddress");
- if (widget && GTK_IS_TOGGLE_BUTTON(widget))
- g_signal_connect (widget, "toggled",
- G_CALLBACK (address_mailing_changed), e_contact_editor);
-
- widget = glade_xml_get_widget(e_contact_editor->gui, "button-fullname");
- if (widget && GTK_IS_BUTTON(widget))
- g_signal_connect (widget, "clicked",
- G_CALLBACK (full_name_clicked), e_contact_editor);
-
- widget = glade_xml_get_widget(e_contact_editor->gui, "button-fulladdr");
- if (widget && GTK_IS_BUTTON(widget))
- g_signal_connect (widget, "clicked",
- G_CALLBACK (full_addr_clicked), e_contact_editor);
-
- widget = glade_xml_get_widget(e_contact_editor->gui, "button-categories");
- if (widget && GTK_IS_BUTTON(widget))
- g_signal_connect (widget, "clicked",
- G_CALLBACK (categories_clicked), e_contact_editor);
-
- /* Construct the app */
- bonobo_win = bonobo_window_new ("contact-editor-dialog", _("Contact Editor"));
-
- /* FIXME: The sucking bit */
- {
- GtkWidget *contents;
-
- contents = bonobo_dock_get_client_area (gnome_app_get_dock (GNOME_APP(e_contact_editor->app)));
-
- if (!contents) {
- g_message ("contact_editor_construct(): Could not get contents");
- return;
- }
- g_object_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_window_get_ui_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)),
- NULL);
-
- 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 */
-
- g_signal_connect (e_contact_editor->app, "delete_event",
- GTK_SIGNAL_FUNC (app_delete_event_cb), e_contact_editor);
-
- /* set the icon */
- icon_path = g_build_filename (EVOLUTION_IMAGESDIR, "evolution-contacts-mini.png", NULL);
- gnome_window_icon_set_from_file (GTK_WINDOW (e_contact_editor->app), icon_path);
- g_free (icon_path);
-}
-
-void
-e_contact_editor_dispose (GObject *object) {
- EContactEditor *e_contact_editor = E_CONTACT_EDITOR(object);
-
- if (e_contact_editor->writable_fields) {
- g_object_unref(e_contact_editor->writable_fields);
- e_contact_editor->writable_fields = NULL;
- }
- 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);
- e_contact_editor->email_list = NULL;
- }
- if (e_contact_editor->email_info) {
- g_free(e_contact_editor->email_info);
- e_contact_editor->email_info = NULL;
- }
- if (e_contact_editor->email_popup) {
- g_object_unref(e_contact_editor->email_popup);
- e_contact_editor->email_popup = NULL;
- }
-
- 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);
- e_contact_editor->phone_list = NULL;
- }
- if (e_contact_editor->phone_info) {
- g_free(e_contact_editor->phone_info);
- e_contact_editor->phone_info = NULL;
- }
- if (e_contact_editor->phone_popup) {
- g_object_unref(e_contact_editor->phone_popup);
- e_contact_editor->phone_popup = NULL;
- }
-
- 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);
- e_contact_editor->address_list = NULL;
- }
- if (e_contact_editor->address_info) {
- g_free(e_contact_editor->address_info);
- e_contact_editor->address_info = NULL;
- }
- if (e_contact_editor->address_popup) {
- g_object_unref(e_contact_editor->address_popup);
- e_contact_editor->address_popup = NULL;
- }
-
- if (e_contact_editor->contact) {
- g_object_unref(e_contact_editor->contact);
- e_contact_editor->contact = NULL;
- }
-
- if (e_contact_editor->book) {
- g_object_unref(e_contact_editor->book);
- e_contact_editor->book = NULL;
- }
-
- if (e_contact_editor->name) {
- e_contact_name_free(e_contact_editor->name);
- e_contact_editor->name = NULL;
- }
-
- if (e_contact_editor->company) {
- g_free (e_contact_editor->company);
- e_contact_editor->company = NULL;
- }
-
- if (e_contact_editor->gui) {
- g_object_unref(e_contact_editor->gui);
- e_contact_editor->gui = NULL;
- }
-}
-
-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_contact) ? "1" : "0", NULL);
-}
-
-static void
-supported_fields_cb (EBook *book, EBookStatus status,
- EList *fields, EContactEditor *ce)
-{
- if (!g_slist_find (all_contact_editors, ce)) {
- g_warning ("supported_fields_cb called for book that's still around, but contact editor that's been destroyed.");
- return;
- }
-
- g_object_set (ce,
- "writable_fields", fields,
- NULL);
-
- e_contact_editor_show (ce);
-
- command_state_changed (ce);
-}
-
-static void
-contact_editor_destroy_notify (void *data,
- GObject *where_the_object_was)
-{
- EContactEditor *ce = E_CONTACT_EDITOR (data);
-
- all_contact_editors = g_slist_remove (all_contact_editors, ce);
-}
-
-EContactEditor *
-e_contact_editor_new (EBook *book,
- EContact *contact,
- gboolean is_new_contact,
- gboolean editable)
-{
- EContactEditor *ce;
-
- g_return_val_if_fail (E_IS_BOOK (book), NULL);
- g_return_val_if_fail (E_IS_CONTACT (contact), NULL);
-
- ce = g_object_new (E_TYPE_CONTACT_EDITOR, NULL);
-
- all_contact_editors = g_slist_prepend (all_contact_editors, ce);
- g_object_weak_ref (G_OBJECT (ce), contact_editor_destroy_notify, ce);
-
- g_object_ref (ce);
- gtk_object_sink (GTK_OBJECT (ce));
-
- g_object_set (ce,
- "book", book,
- "contact", contact,
- "is_new_contact", is_new_contact,
- "editable", editable,
- NULL);
-
- if (book)
- e_book_async_get_supported_fields (book, (EBookFieldsCallback)supported_fields_cb, ce);
-
- return ce;
-}
-
-static void
-e_contact_editor_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
-{
- EContactEditor *editor;
-
- editor = E_CONTACT_EDITOR (object);
-
- switch (prop_id){
- case PROP_BOOK:
- if (editor->book)
- g_object_unref(editor->book);
- editor->book = E_BOOK(g_value_get_object (value));
- g_object_ref (editor->book);
- /* XXX more here about editable/etc. */
- break;
- case PROP_CONTACT:
- if (editor->contact)
- g_object_unref(editor->contact);
- editor->contact = e_contact_duplicate(E_CONTACT(g_value_get_object (value)));
- fill_in_info(editor);
- editor->changed = FALSE;
- break;
-
- case PROP_IS_NEW_CONTACT:
- editor->is_new_contact = g_value_get_boolean (value) ? TRUE : FALSE;
- break;
-
- case PROP_EDITABLE: {
- gboolean new_value = g_value_get_boolean (value) ? TRUE : FALSE;
- gboolean changed = (editor->editable != new_value);
-
- editor->editable = new_value;
-
- if (changed) {
- set_editable (editor);
- command_state_changed (editor);
- }
- break;
- }
-
- case PROP_CHANGED: {
- gboolean new_value = g_value_get_boolean (value) ? TRUE : FALSE;
- gboolean changed = (editor->changed != new_value);
-
- editor->changed = new_value;
-
- if (changed)
- command_state_changed (editor);
- break;
- }
- case PROP_WRITABLE_FIELDS:
- if (editor->writable_fields)
- g_object_unref(editor->writable_fields);
- editor->writable_fields = g_value_get_object (value);
- if (editor->writable_fields)
- g_object_ref (editor->writable_fields);
- else
- editor->writable_fields = e_list_new(NULL, NULL, NULL);
- enable_writable_fields (editor);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-e_contact_editor_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
-{
- EContactEditor *e_contact_editor;
-
- e_contact_editor = E_CONTACT_EDITOR (object);
-
- switch (prop_id) {
- case PROP_BOOK:
- g_value_set_object (value, e_contact_editor->book);
- break;
-
- case PROP_CONTACT:
- extract_info(e_contact_editor);
- g_value_set_object (value, e_contact_editor->contact);
- break;
-
- case PROP_IS_NEW_CONTACT:
- g_value_set_boolean (value, e_contact_editor->is_new_contact ? TRUE : FALSE);
- break;
-
- case PROP_EDITABLE:
- g_value_set_boolean (value, e_contact_editor->editable ? TRUE : FALSE);
- break;
-
- case PROP_CHANGED:
- g_value_set_boolean (value, e_contact_editor->changed ? TRUE : FALSE);
- break;
-
- case PROP_WRITABLE_FIELDS:
- if (e_contact_editor->writable_fields)
- g_value_set_object (value, e_list_duplicate (e_contact_editor->writable_fields));
- else
- g_value_set_object (value, NULL);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-_popup_position(GtkMenu *menu,
- gint *x,
- gint *y,
- gboolean *push_in,
- gpointer data)
-{
- GtkWidget *button = GTK_WIDGET(data);
- GtkRequisition request;
- int mh, mw;
- gdk_window_get_origin (button->window, x, y);
- *x += button->allocation.x;
- *y += button->allocation.y;
-
- 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;
-
- *push_in = FALSE;
-}
-
-static gint
-_arrow_pressed (GtkWidget *widget, GdkEventButton *button, EContactEditor *editor, GtkWidget *popup, GList **list, GnomeUIInfo **info, gchar *label)
-{
- gint menu_item;
-
- g_signal_stop_emission_by_name (widget, "button_press_event");
-
- gtk_widget_realize(popup);
- menu_item = gnome_popup_menu_do_popup_modal(popup, _popup_position, widget, button, editor, widget);
- if ( menu_item != -1 ) {
- GtkWidget *label_widget = glade_xml_get_widget(editor->gui, label);
- if (label_widget && GTK_IS_LABEL(label_widget)) {
- g_object_set (label_widget,
- "label", _(g_list_nth_data(*list, menu_item)),
- NULL);
- }
- }
- 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)
-{
- if (editor->phone_list == NULL) {
- int i;
-
- for (i = 0; i < G_N_ELEMENTS (phones); i ++) {
- editor->phone_list = g_list_append(editor->phone_list, g_strdup(e_contact_pretty_name (phones[i])));
- }
- }
- if (editor->phone_info == NULL) {
- e_contact_editor_build_ui_info(editor->phone_list, &editor->phone_info);
-
- if ( editor->phone_popup )
- g_object_unref(editor->phone_popup);
-
- editor->phone_popup = gnome_popup_menu_new(editor->phone_info);
- g_object_ref (editor->phone_popup);
- gtk_object_sink (GTK_OBJECT (editor->phone_popup));
- }
-}
-
-static void
-e_contact_editor_build_email_ui (EContactEditor *editor)
-{
- int i;
-
- if (editor->email_list == NULL) {
- for (i = 0; i < G_N_ELEMENTS (emails); i++)
- editor->email_list = g_list_append(editor->email_list, g_strdup(e_contact_pretty_name (emails[i])));
- }
- if (editor->email_info == NULL) {
- e_contact_editor_build_ui_info(editor->email_list, &editor->email_info);
-
- if ( editor->email_popup )
- g_object_unref(editor->email_popup);
-
- editor->email_popup = gnome_popup_menu_new(editor->email_info);
- g_object_ref (editor->email_popup);
- gtk_object_sink (GTK_OBJECT (editor->email_popup));
- }
-}
-
-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 )
- g_object_unref(editor->address_popup);
-
- editor->address_popup = gnome_popup_menu_new(editor->address_info);
- g_object_ref (editor->address_popup);
- gtk_object_sink (GTK_OBJECT (editor->address_popup));
- }
-}
-
-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 < G_N_ELEMENTS (phones); i++) {
- char *phone = e_contact_get (editor->contact, phones[i]);
- gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(editor->phone_info[i].widget),
- phone && *phone);
- g_free (phone);
- }
-
- result = _arrow_pressed (widget, button, editor, editor->phone_popup, &editor->phone_list, &editor->phone_info, label);
-
- if (result != -1) {
- GtkWidget *w = glade_xml_get_widget (editor->gui, entry);
- editor->phone_choice[which - 1] = phones[result];
- set_fields (editor);
- enable_widget (glade_xml_get_widget (editor->gui, label), TRUE);
- enable_widget (w, 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 < G_N_ELEMENTS (emails); i++) {
- char *string = e_contact_get (editor->contact, emails[i]);
- gboolean checked;
- checked = string && *string;
- gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(editor->email_info[i].widget),
- checked);
- g_free (string);
- }
-
- result = _arrow_pressed (widget, button, editor, editor->email_popup, &editor->email_list, &editor->email_info, "label-email1");
-
- if (result != -1) {
- GtkWidget *entry = glade_xml_get_widget (editor->gui, "entry-email1");
- 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 (entry, 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)
-{
-#if notyet
- 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);
- }
-
- result = _arrow_pressed (widget, button, editor, editor->address_popup, &editor->address_list, &editor->address_info, "label-address");
-
- 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->address_editable[result]);
- enable_widget (glade_xml_get_widget (editor->gui, "checkbutton-mailingaddress"), editor->address_editable[result]);
- }
-#endif
-}
-
-static void
-find_address_mailing (EContactEditor *editor)
-{
-#if notyet
- const ECardDeliveryAddress *address;
- int i;
-
- editor->address_mailing = -1;
- for (i = 0; i < E_CARD_SIMPLE_ADDRESS_ID_LAST; i++) {
- address = e_card_simple_get_delivery_address(editor->simple, i);
- if (address && (address->flags & E_CARD_ADDR_DEFAULT)) {
- if (editor->address_mailing == -1) {
- editor->address_mailing = i;
- } else {
- ECardDeliveryAddress *new;
-
- new = e_card_delivery_address_copy (address);
- new->flags &= ~E_CARD_ADDR_DEFAULT;
- e_card_simple_set_delivery_address(editor->simple, i, new);
- e_card_delivery_address_unref (new);
- }
- }
- }
-#endif
-}
-
-static void
-set_field(EContactEditor *editor, GtkEntry *entry, const char *string)
-{
- const char *oldstring = gtk_entry_get_text(entry);
- if (!string)
- string = "";
- if (strcmp(string, oldstring)) {
- g_signal_handlers_block_matched (entry,
- G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL, editor);
- gtk_entry_set_text(entry, string);
- g_signal_handlers_unblock_matched (entry,
- G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL, editor);
- }
-}
-
-static void
-set_phone_field(EContactEditor *editor, GtkWidget *entry, const char *phone_number)
-{
- set_field(editor, GTK_ENTRY(entry), phone_number ? phone_number : "");
-}
-
-static void
-set_fields(EContactEditor *editor)
-{
- GtkWidget *entry;
- GtkWidget *label_widget;
- int i;
-
- entry = glade_xml_get_widget(editor->gui, "entry-phone1");
- if (entry && GTK_IS_ENTRY(entry))
- set_phone_field(editor, entry, e_contact_get_const(editor->contact, editor->phone_choice[0]));
-
- entry = glade_xml_get_widget(editor->gui, "entry-phone2");
- if (entry && GTK_IS_ENTRY(entry))
- set_phone_field(editor, entry, e_contact_get_const(editor->contact, editor->phone_choice[1]));
-
- entry = glade_xml_get_widget(editor->gui, "entry-phone3");
- if (entry && GTK_IS_ENTRY(entry))
- set_phone_field(editor, entry, e_contact_get_const(editor->contact, editor->phone_choice[2]));
-
- entry = glade_xml_get_widget(editor->gui, "entry-phone4");
- if (entry && GTK_IS_ENTRY(entry))
- set_phone_field(editor, entry, e_contact_get_const(editor->contact, editor->phone_choice[3]));
-
- entry = glade_xml_get_widget(editor->gui, "entry-email1");
- if (entry && GTK_IS_ENTRY(entry))
- set_field(editor, GTK_ENTRY(entry), e_contact_get_const(editor->contact, editor->email_choice));
-
-
- e_contact_editor_build_address_ui (editor);
-
-#if notyet
- for (i = 0; i < E_CARD_SIMPLE_ADDRESS_ID_LAST; i++) {
- const ECardAddrLabel *address = e_card_simple_get_address(editor->simple, i);
-
- if (address && address->data && *address->data)
- break;
- }
- if (i == E_CARD_SIMPLE_ADDRESS_ID_LAST)
- i = 0;
-
- label_widget = glade_xml_get_widget(editor->gui, "label-address");
- if (label_widget && GTK_IS_LABEL(label_widget)) {
- g_object_set (label_widget,
- "label", _(g_list_nth_data(editor->address_list, i)),
- NULL);
- }
-
- set_address_field(editor, i);
-#endif
-}
-
-static void
-set_address_field(EContactEditor *editor, int result)
-{
-#if notyet
- GtkWidget *text, *check;
-
- text = glade_xml_get_widget(editor->gui, "text-address");
-
- if (text && GTK_IS_TEXT_VIEW(text)) {
- GtkTextBuffer *buffer;
- GtkTextIter start_iter, end_iter;
- const ECardAddrLabel *address;
-
- if (result == -1)
- result = editor->address_choice;
- editor->address_choice = -1;
-
- buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text));
-
- gtk_text_buffer_get_start_iter (buffer, &start_iter);
- gtk_text_buffer_get_end_iter (buffer, &end_iter);
-
- gtk_text_buffer_delete (buffer, &start_iter, &end_iter);
-
- address = e_card_simple_get_address(editor->simple, result);
- if (address && address->data)
- gtk_text_buffer_insert (buffer, &start_iter, address->data, strlen (address->data));
-
- check = glade_xml_get_widget(editor->gui, "checkbutton-mailingaddress");
- if (check && GTK_IS_CHECK_BUTTON (check)) {
- if (address && address->data)
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check),
- address->flags & E_CARD_ADDR_DEFAULT);
- else
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), FALSE);
- }
-
- editor->address_choice = result;
- }
-#endif
-}
-
-static struct {
- char *id;
- EContactField field;
-} field_mapping [] = {
- { "entry-fullname", E_CONTACT_FULL_NAME },
- { "entry-web", E_CONTACT_HOMEPAGE_URL },
- { "entry-blog", E_CONTACT_BLOG_URL },
- { "entry-company", E_CONTACT_ORG },
- { "entry-department", E_CONTACT_ORG_UNIT },
- { "entry-office", E_CONTACT_OFFICE },
- { "entry-jobtitle", E_CONTACT_TITLE },
- { "entry-profession", E_CONTACT_ROLE },
- { "entry-manager", E_CONTACT_MANAGER },
- { "entry-assistant", E_CONTACT_ASSISTANT },
- { "entry-nickname", E_CONTACT_NICKNAME },
- { "entry-spouse", E_CONTACT_SPOUSE },
- { "text-comments", E_CONTACT_NOTE },
- { "entry-categories", E_CONTACT_CATEGORIES },
- { "entry-caluri", E_CONTACT_CALENDAR_URI },
- { "entry-fburl", E_CONTACT_FREEBUSY_URL },
-};
-
-static void
-fill_in_field(EContactEditor *editor, char *id, char *value)
-{
- GtkWidget *widget = glade_xml_get_widget(editor->gui, id);
-
- if (!widget)
- return;
-
- if (E_IS_URL_ENTRY (widget))
- widget = e_url_entry_get_entry (E_URL_ENTRY (widget));
-
- if (GTK_IS_TEXT_VIEW (widget)) {
- if (value)
- gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (widget)),
- value, strlen (value));
- }
- else if (GTK_IS_EDITABLE(widget)) {
- int position = 0;
- GtkEditable *editable = GTK_EDITABLE(widget);
- gtk_editable_delete_text(editable, 0, -1);
- if (value)
- gtk_editable_insert_text(editable, value, strlen(value), &position);
- }
-}
-
-static void
-disable_widget_foreach (char *key, GtkWidget *widget, gpointer closure)
-{
- enable_widget (widget, FALSE);
-}
-
-static struct {
- char *widget_name;
- EContactField field_id;
- gboolean desensitize_for_read_only;
-} widget_field_mappings[] = {
- { "entry-web", E_CONTACT_HOMEPAGE_URL, TRUE },
- { "accellabel-web", E_CONTACT_HOMEPAGE_URL },
-
- { "entry-blog", E_CONTACT_BLOG_URL, TRUE },
- { "accellabel-blog", E_CONTACT_BLOG_URL },
-
- { "entry-jobtitle", E_CONTACT_TITLE, TRUE },
- { "label-jobtitle", E_CONTACT_TITLE },
-
- { "entry-company", E_CONTACT_ORG, TRUE },
- { "label-company", E_CONTACT_ORG },
-
- { "combo-file-as", E_CONTACT_FILE_AS, TRUE },
- { "entry-file-as", E_CONTACT_FILE_AS, TRUE },
- { "accellabel-fileas", E_CONTACT_FILE_AS },
-
- { "label-department", E_CONTACT_ORG_UNIT },
- { "entry-department", E_CONTACT_ORG_UNIT, TRUE },
-
- { "label-office", E_CONTACT_OFFICE },
- { "entry-office", E_CONTACT_OFFICE, TRUE },
-
- { "label-profession", E_CONTACT_ROLE },
- { "entry-profession", E_CONTACT_ROLE, TRUE },
-
- { "label-manager", E_CONTACT_MANAGER },
- { "entry-manager", E_CONTACT_MANAGER, TRUE },
-
- { "label-assistant", E_CONTACT_ASSISTANT },
- { "entry-assistant", E_CONTACT_ASSISTANT, TRUE },
-
- { "label-nickname", E_CONTACT_NICKNAME },
- { "entry-nickname", E_CONTACT_NICKNAME, TRUE },
-
- { "label-spouse", E_CONTACT_SPOUSE },
- { "entry-spouse", E_CONTACT_SPOUSE, TRUE },
-
- { "label-birthday", E_CONTACT_BIRTH_DATE },
- { "dateedit-birthday", E_CONTACT_BIRTH_DATE, TRUE },
-
- { "label-anniversary", E_CONTACT_ANNIVERSARY },
- { "dateedit-anniversary", E_CONTACT_ANNIVERSARY, TRUE },
-
- { "label-comments", E_CONTACT_NOTE },
- { "text-comments", E_CONTACT_NOTE, TRUE },
-
- { "entry-fullname", E_CONTACT_FULL_NAME, TRUE },
-
- { "button-categories", E_CONTACT_CATEGORIES, TRUE },
- { "entry-categories", E_CONTACT_CATEGORIES, TRUE },
-
- { "label-caluri", E_CONTACT_CALENDAR_URI },
- { "entry-caluri", E_CONTACT_CALENDAR_URI, TRUE },
-
- { "label-fburl", E_CONTACT_FREEBUSY_URL },
- { "entry-fburl", E_CONTACT_FREEBUSY_URL, 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;
- char *widget_name;
-
- if (!fields)
- return;
-
- 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 < G_N_ELEMENTS (phones); i ++)
- g_hash_table_insert (dropdown_hash,
- (char*)e_contact_field_name(phones[i]),
- editor->phone_info[i].widget);
- e_contact_editor_build_email_ui (editor);
- for (i = 0; i < G_N_ELEMENTS (emails); i ++)
- g_hash_table_insert (dropdown_hash,
- (char*)e_contact_field_name(phones[i]),
- editor->email_info[i].widget);
-#if notyet
- 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);
-#endif
-
- /* 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 address 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, "checkbutton-mailingaddress"), FALSE);
- enable_widget (glade_xml_get_widget (editor->gui, "label-address"), FALSE);
- enable_widget (glade_xml_get_widget (editor->gui, "text-address"), FALSE);
-
- editor->fullname_editable = 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);
- int i;
-
- if (widget) {
- enable_widget (widget, TRUE);
- }
- else {
- /* if it's not a field that's handled by the
- dropdown items, add it to the has to be
- used in the second step */
- g_hash_table_insert (supported_hash, field, field);
- }
-
-#if notyet
- for (i = 0; i < E_CARD_SIMPLE_ADDRESS_ID_LAST; i ++) {
- if (!strcmp (field, e_card_simple_get_ecard_field (simple, e_card_simple_map_address_to_field(i)))) {
- editor->address_editable [i] = TRUE;
- }
- }
-#endif
-
- /* 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_contact_field_name (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_contact_field_name (editor->address_choice))) {
- enable_widget (glade_xml_get_widget (editor->gui, "label-address"), TRUE);
- enable_widget (glade_xml_get_widget (editor->gui, "checkbutton-mailingaddress"), editor->editable);
- enable_widget (glade_xml_get_widget (editor->gui, "text-address"), editor->editable);
- }
- else for (i = 0; i < 4; i ++) {
- if (!strcmp (field, e_contact_field_name (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;
- }
- field = e_contact_field_name (widget_field_mappings[i].field_id);
-
- enabled = (g_hash_table_lookup (supported_hash, field) != NULL);
-
- if (widget_field_mappings[i].desensitize_for_read_only && !editor->editable) {
- enabled = FALSE;
- }
-
- enable_widget (w, enabled);
- }
-
- editor->fullname_editable = (g_hash_table_lookup (supported_hash, "full_name") != NULL);
-
- g_hash_table_destroy (dropdown_hash);
- g_hash_table_destroy (supported_hash);
-}
-
-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)
-{
- EContact *contact = editor->contact;
- if (contact) {
- char *file_as;
- EContactName *name;
- EContactDate *anniversary;
- EContactDate *bday;
- int i;
- GtkWidget *widget;
- gboolean wants_html;
-
- g_object_get (contact,
- "file_as", &file_as,
- "name", &name,
- "anniversary", &anniversary,
- "birth_date", &bday,
- "wants_html", &wants_html,
- NULL);
-
- for (i = 0; i < sizeof(field_mapping) / sizeof(field_mapping[0]); i++) {
- char *string = e_contact_get (contact, field_mapping[i].field);
- fill_in_field(editor, field_mapping[i].id, string);
- g_free (string);
- }
-
- find_address_mailing (editor);
-
- widget = glade_xml_get_widget(editor->gui, "checkbutton-htmlmail");
- if (widget && GTK_IS_CHECK_BUTTON(widget)) {
- g_object_set (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);
-
- g_free (file_as);
- if (editor->name)
- e_contact_name_free(editor->name);
- editor->name = 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);
- }
-
- e_contact_date_free (anniversary);
- e_contact_date_free (bday);
-
- set_fields(editor);
- }
-}
-
-static void
-extract_field(EContactEditor *editor, EContact *contact, char *editable_id, EContactField field)
-{
- GtkWidget *widget = glade_xml_get_widget(editor->gui, editable_id);
- char *string = NULL;
-
- if (!widget)
- return;
-
- if (E_IS_URL_ENTRY (widget))
- widget = e_url_entry_get_entry (E_URL_ENTRY (widget));
-
- if (GTK_IS_EDITABLE (widget))
- string = gtk_editable_get_chars(GTK_EDITABLE (widget), 0, -1);
- else if (GTK_IS_TEXT_VIEW (widget)) {
- GtkTextIter start, end;
- GtkTextBuffer *buffer;
-
- buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (widget));
- gtk_text_buffer_get_start_iter (buffer, &start);
- gtk_text_buffer_get_end_iter (buffer, &end);
-
- string = gtk_text_buffer_get_text (buffer, &start, &end, TRUE);
- }
-
- if (string && *string)
- e_contact_set (contact, field, string);
- else
- e_contact_set (contact, field, NULL);
-
- if (string) g_free(string);
-}
-
-static void
-extract_info(EContactEditor *editor)
-{
- EContact *contact = editor->contact;
- if (contact) {
- EContactDate anniversary;
- EContactDate bday;
- int i;
- GtkWidget *widget;
-
- widget = glade_xml_get_widget(editor->gui, "entry-file-as");
- if (widget && GTK_IS_EDITABLE(widget)) {
- GtkEditable *editable = GTK_EDITABLE(widget);
- char *string = gtk_editable_get_chars(editable, 0, -1);
-
- if (string && *string)
- e_contact_set (contact, E_CONTACT_FILE_AS, string);
-
- g_free(string);
- }
-
- for (i = 0; i < sizeof(field_mapping) / sizeof(field_mapping[0]); i++) {
- extract_field(editor, contact, field_mapping[i].id, field_mapping[i].field);
- }
-
- if (editor->name)
- e_contact_set (contact, E_CONTACT_NAME, editor->name);
-
- 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); */
- e_contact_set (contact, E_CONTACT_ANNIVERSARY, &anniversary);
- } else
- e_contact_set (contact, E_CONTACT_ANNIVERSARY, 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); */
- e_contact_set (contact, E_CONTACT_BIRTH_DATE, &bday);
- } else
- e_contact_set (contact, E_CONTACT_BIRTH_DATE, 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);
- gtk_widget_show (widget);
- return widget;
-}
-
-GtkWidget *
-e_contact_editor_create_web(gchar *name,
- gchar *string1, gchar *string2,
- gint int1, gint int2);
-
-GtkWidget *
-e_contact_editor_create_web(gchar *name,
- gchar *string1, gchar *string2,
- gint int1, gint int2)
-{
- GtkWidget *widget = e_url_entry_new ();
- gtk_widget_show (widget);
- return widget;
-}
-
-static void
-enable_widget (GtkWidget *widget, gboolean enabled)
-{
- if (GTK_IS_ENTRY (widget)) {
- gtk_editable_set_editable (GTK_EDITABLE (widget), enabled);
- }
- else if (GTK_IS_TEXT_VIEW (widget)) {
- gtk_text_view_set_editable (GTK_TEXT_VIEW (widget), enabled);
- }
- else if (GTK_IS_COMBO (widget)) {
- gtk_editable_set_editable (GTK_EDITABLE (GTK_COMBO (widget)->entry),
- enabled);
- gtk_widget_set_sensitive (GTK_COMBO (widget)->button, enabled);
- }
- else if (E_IS_URL_ENTRY (widget)) {
- GtkWidget *e = e_url_entry_get_entry (E_URL_ENTRY (widget));
- gtk_editable_set_editable (GTK_EDITABLE (e), 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);
-}
-
-
-gboolean
-e_contact_editor_request_close_all (void)
-{
- GSList *p;
- GSList *pnext;
- gboolean retval;
-
- retval = TRUE;
- for (p = all_contact_editors; p != NULL; p = pnext) {
- pnext = p->next;
-
- e_contact_editor_raise (E_CONTACT_EDITOR (p->data));
- if (! prompt_to_save_changes (E_CONTACT_EDITOR (p->data))) {
- retval = FALSE;
- break;
- }
-
- close_dialog (E_CONTACT_EDITOR (p->data));
- }
-
- return retval;
-}
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 27baa9f0fc..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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 <libebook/e-book-async.h>
-#include <libebook/e-contact.h>
-
-G_BEGIN_DECLS
-
-/* 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_TYPE_CONTACT_EDITOR (e_contact_editor_get_type ())
-#define E_CONTACT_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_CONTACT_EDITOR, EContactEditor))
-#define E_CONTACT_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_CONTACT_EDITOR, EContactEditorClass))
-#define E_IS_CONTACT_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_CONTACT_EDITOR))
-#define E_IS_CONTACT_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_CONTACT_EDITOR))
-
-
-typedef struct _EContactEditor EContactEditor;
-typedef struct _EContactEditorClass EContactEditorClass;
-
-struct _EContactEditor
-{
- GtkObject object;
-
- /* item specific fields */
- EBook *book;
- EContact *contact;
-
- /* 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;
-
- EContactName *name;
- char *company;
-
- EContactField email_choice;
- EContactField phone_choice[4];
- EContactField address_choice;
- EContactField address_mailing;
-
- /* Whether we are editing a new contact or an existing one */
- guint is_new_contact : 1;
-
- /* Whether the contact has been changed since bringing up the contact editor */
- guint changed : 1;
-
- /* Whether the contact editor will accept modifications */
- guint editable : 1;
-
- /* Whether the fullname will accept modifications */
- guint fullname_editable : 1;
-
-#if notyet
- /* Whether each of the addresses are editable */
- gboolean address_editable[E_CARD_SIMPLE_ADDRESS_ID_LAST];
-#endif
-
- /* Whether an async wombat call is in progress */
- guint in_async_call : 1;
-
- EList *writable_fields;
-};
-
-struct _EContactEditorClass
-{
- GtkObjectClass parent_class;
-
- /* Notification signals */
-
- void (* contact_added) (EContactEditor *ce, EBookStatus status, EContact *contact);
- void (* contact_modified) (EContactEditor *ce, EBookStatus status, EContact *contact);
- void (* contact_deleted) (EContactEditor *ce, EBookStatus status, EContact *contact);
- void (* editor_closed) (EContactEditor *ce);
-};
-
-EContactEditor *e_contact_editor_new (EBook *book,
- EContact *contact,
- gboolean is_new_contact,
- gboolean editable);
-GType 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);
-
-gboolean e_contact_editor_request_close_all (void);
-
-G_END_DECLS
-
-#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 0f59c1145f..0000000000
--- a/addressbook/gui/contact-editor/e-contact-quick-add.c
+++ /dev/null
@@ -1,457 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <string.h>
-#include <glib.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtklabel.h>
-#include <gtk/gtktable.h>
-#include <gtk/gtkdialog.h>
-#include <gtk/gtkstock.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-app.h>
-#include <libebook/e-book.h>
-#include <libebook/e-contact.h>
-#include <addressbook/gui/component/addressbook.h>
-#include <addressbook/util/eab-book-util.h>
-#include "e-contact-editor.h"
-#include "e-contact-quick-add.h"
-#include "eab-contact-merging.h"
-
-typedef struct _QuickAdd QuickAdd;
-struct _QuickAdd {
- gchar *name;
- gchar *email;
- EContact *contact;
-
- 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->contact = e_contact_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);
- g_object_unref (qa->contact);
- g_free (qa);
- }
- }
-}
-
-static void
-quick_add_set_name (QuickAdd *qa, const gchar *name)
-{
-#if notyet
- EContactName *card_name;
-
- if (name == qa->name)
- return;
-
- g_free (qa->name);
-
- card_name = e_card_name_from_string (name);
- qa->name = e_card_name_to_string (card_name);
-
- g_object_set (qa->card,
- "full_name", qa->name,
- NULL);
-
- e_card_name_unref (card_name);
-#endif
-}
-
-static void
-quick_add_set_email (QuickAdd *qa, const gchar *email)
-{
- if (email == qa->email)
- return;
-
- g_free (qa->email);
- qa->email = g_strdup (email);
-
- e_contact_set (qa->contact, E_CONTACT_EMAIL_1, (char*)email);
-}
-
-static void
-merge_cb (EBook *book, EBookStatus status, gpointer closure)
-{
- QuickAdd *qa = (QuickAdd *) closure;
-
- if (status == E_BOOK_ERROR_OK) {
- eab_merging_book_add_contact (book, qa->contact, NULL, NULL);
- if (qa->cb)
- qa->cb (qa->contact, qa->closure);
- g_object_unref (book);
- } else {
- /* Something went wrong. */
- if (book)
- g_object_unref (book);
- if (qa->cb)
- qa->cb (NULL, qa->closure);
- }
-
- quick_add_unref (qa);
-}
-
-static void
-quick_add_merge_contact (QuickAdd *qa)
-{
- quick_add_ref (qa);
-
- addressbook_load_default_book (merge_cb, qa);
-}
-
-
-/*
- * Raise a contact editor with all fields editable, and hook up all signals accordingly.
- */
-
-static void
-contact_added_cb (EContactEditor *ce, EBookStatus status, EContact *contact, gpointer closure)
-{
- QuickAdd *qa = (QuickAdd *) g_object_get_data (G_OBJECT (ce), "quick_add");
-
- if (qa) {
-
- if (qa->cb)
- qa->cb (qa->contact, qa->closure);
-
- /* We don't need to unref qa because we set_data_full below */
- g_object_set_data (G_OBJECT (ce), "quick_add", NULL);
- }
-}
-
-static void
-editor_closed_cb (GtkWidget *w, gpointer closure)
-{
- QuickAdd *qa = (QuickAdd *) g_object_get_data (G_OBJECT (w), "quick_add");
-
- if (qa)
- /* We don't need to unref qa because we set_data_full below */
- g_object_set_data (G_OBJECT (w), "quick_add", NULL);
-
- g_object_unref (w);
-}
-
-static void
-ce_have_book (EBook *book, EBookStatus status, gpointer closure)
-{
- QuickAdd *qa = (QuickAdd *) closure;
-
- if (status != E_BOOK_ERROR_OK) {
- if (book)
- g_object_unref (book);
- g_warning ("Couldn't open local address book.");
- quick_add_unref (qa);
- } else {
- EContactEditor *contact_editor = e_contact_editor_new (book, qa->contact, TRUE, TRUE /* XXX */);
-
- /* mark it as changed so the Save buttons are enabled when we bring up the dialog. */
- g_object_set (contact_editor,
- "changed", TRUE,
- NULL);
-
- /* We pass this via object data, so that we don't get a dangling pointer referenced if both
- the "contact_added" and "editor_closed" get emitted. (Which, based on a backtrace in bugzilla,
- I think can happen and cause a crash. */
- g_object_set_data_full (G_OBJECT (contact_editor), "quick_add", qa,
- (GDestroyNotify) quick_add_unref);
-
- g_signal_connect (contact_editor,
- "contact_added",
- G_CALLBACK (contact_added_cb),
- NULL);
- g_signal_connect (contact_editor,
- "editor_closed",
- G_CALLBACK (editor_closed_cb),
- NULL);
-
- g_object_unref (book);
- }
-}
-
-static void
-edit_contact (QuickAdd *qa)
-{
- addressbook_load_default_book (ce_have_book, qa);
-}
-
-#define QUICK_ADD_RESPONSE_EDIT_FULL 2
-
-static void
-clicked_cb (GtkWidget *w, gint button, gpointer closure)
-{
- QuickAdd *qa = (QuickAdd *) closure;
-
- /* Get data out of entries. */
- if (button == GTK_RESPONSE_OK || button == QUICK_ADD_RESPONSE_EDIT_FULL) {
- 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 = tmp;
- }
-
- if (qa->email_entry) {
- gchar *tmp;
- tmp = gtk_editable_get_chars (GTK_EDITABLE (qa->email_entry), 0, -1);
- email = 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 == GTK_RESPONSE_OK) {
-
- /* OK */
- quick_add_merge_contact (qa);
-
- } else if (button == QUICK_ADD_RESPONSE_EDIT_FULL) {
-
- /* EDIT FULL */
- edit_contact (qa);
-
- } else {
- /* CANCEL */
- quick_add_unref (qa);
- }
-
-}
-
-static GtkWidget *
-build_quick_add_dialog (QuickAdd *qa)
-{
- GtkWidget *dialog;
- GtkTable *table;
- const gint xpad=6, ypad=6;
-
- g_return_val_if_fail (qa != NULL, NULL);
-
- dialog = gtk_dialog_new_with_buttons (_("Contact Quick-Add"),
- NULL, /* XXX */
- (GtkDialogFlags) 0,
- _("_Edit Full"), QUICK_ADD_RESPONSE_EDIT_FULL,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_OK, GTK_RESPONSE_OK,
- NULL);
-
- g_signal_connect (dialog, "response", G_CALLBACK (clicked_cb), qa);
-
- qa->name_entry = gtk_entry_new ();
- if (qa->name)
- gtk_entry_set_text (GTK_ENTRY (qa->name_entry), qa->name);
-
-
- qa->email_entry = gtk_entry_new ();
- if (qa->email)
- gtk_entry_set_text (GTK_ENTRY (qa->email_entry), qa->email);
-
- table = GTK_TABLE (gtk_table_new (2, 2, FALSE));
-
- gtk_table_attach (table, gtk_label_new_with_mnemonic (_("_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_with_mnemonic (_("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_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox),
- 6);
-
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox),6);
-
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
- GTK_WIDGET (table),
- TRUE, TRUE, 6);
- 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 a969211915..0000000000
--- a/addressbook/gui/contact-editor/e-contact-quick-add.h
+++ /dev/null
@@ -1,40 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 <libebook/e-contact.h>
-
-typedef void (*EContactQuickAddCallback) (EContact *new_contact, 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/fulladdr.glade b/addressbook/gui/contact-editor/fulladdr.glade
deleted file mode 100644
index c7767b9751..0000000000
--- a/addressbook/gui/contact-editor/fulladdr.glade
+++ /dev/null
@@ -1,446 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-
-<widget class="GtkDialog" id="dialog-checkaddress">
- <property name="title" translatable="yes">Full Address</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">True</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="has_separator">True</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="vbox-container">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">8</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="hbuttonbox1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="button1">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">0</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="button2">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">0</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTable" id="table-checkaddress">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="n_rows">4</property>
- <property name="n_columns">4</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label-street">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Address:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-street</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label-city">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Ci_ty:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-city</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry-city">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry-ext">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label-po">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_PO Box:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-po</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label-ext">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Address _2:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-ext</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry-po">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry-street">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">4</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label-region">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_State/Province:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-region</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry-region">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCombo" id="combo-country">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="value_in_list">False</property>
- <property name="allow_empty">True</property>
- <property name="case_sensitive">False</property>
- <property name="enable_arrow_keys">True</property>
- <property name="enable_arrows_always">False</property>
-
- <child internal-child="entry">
- <widget class="GtkEntry" id="entry-country">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- </child>
-
- <child internal-child="list">
- <widget class="GtkList" id="convertwidget1">
- <property name="visible">True</property>
- <property name="selection_mode">GTK_SELECTION_BROWSE</property>
-
- <child>
- <widget class="GtkListItem" id="convertwidget2">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget3">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry-code">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label-code">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_ZIP Code:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-code</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label-country">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Countr_y:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-country</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/addressbook/gui/contact-editor/fullname.glade b/addressbook/gui/contact-editor/fullname.glade
deleted file mode 100644
index 9e170c93d0..0000000000
--- a/addressbook/gui/contact-editor/fullname.glade
+++ /dev/null
@@ -1,674 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-
-<widget class="GtkDialog" id="dialog-checkfullname">
- <property name="title" translatable="yes">Full Name</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">True</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="has_separator">True</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="vbox-container">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">8</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="hbuttonbox1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="button1">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">0</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="button2">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">0</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTable" id="table-checkfullname">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="n_rows">5</property>
- <property name="n_columns">3</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkCombo" id="combo-title">
- <property name="visible">True</property>
- <property name="value_in_list">False</property>
- <property name="allow_empty">True</property>
- <property name="case_sensitive">False</property>
- <property name="enable_arrow_keys">True</property>
- <property name="enable_arrows_always">False</property>
-
- <child internal-child="entry">
- <widget class="GtkEntry" id="entry-title">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- </child>
-
- <child internal-child="list">
- <widget class="GtkList" id="convertwidget1">
- <property name="visible">True</property>
- <property name="selection_mode">GTK_SELECTION_BROWSE</property>
-
- <child>
- <widget class="GtkListItem" id="convertwidget2">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget3">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkListItem" id="convertwidget4">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget5">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Mr.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkListItem" id="convertwidget6">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget7">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Mrs.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkListItem" id="convertwidget8">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget9">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Ms.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkListItem" id="convertwidget10">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget11">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Miss</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkListItem" id="convertwidget12">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget13">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Dr.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkListItem" id="convertwidget14">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget15">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCombo" id="combo-suffix">
- <property name="visible">True</property>
- <property name="value_in_list">False</property>
- <property name="allow_empty">True</property>
- <property name="case_sensitive">False</property>
- <property name="enable_arrow_keys">True</property>
- <property name="enable_arrows_always">False</property>
-
- <child internal-child="entry">
- <widget class="GtkEntry" id="entry-suffix">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- </child>
-
- <child internal-child="list">
- <widget class="GtkList" id="convertwidget16">
- <property name="visible">True</property>
- <property name="selection_mode">GTK_SELECTION_BROWSE</property>
-
- <child>
- <widget class="GtkListItem" id="convertwidget17">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget18">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkListItem" id="convertwidget19">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget20">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Sr.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkListItem" id="convertwidget21">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget22">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Jr.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkListItem" id="convertwidget23">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget24">
- <property name="visible">True</property>
- <property name="label" translatable="yes">I</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkListItem" id="convertwidget25">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget26">
- <property name="visible">True</property>
- <property name="label" translatable="yes">II</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkListItem" id="convertwidget27">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget28">
- <property name="visible">True</property>
- <property name="label" translatable="yes">III</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkListItem" id="convertwidget29">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget30">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Esq.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkListItem" id="convertwidget31">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget32">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry-first">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry-middle">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">3</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry-last">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">3</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label-first">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_First:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-first</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label-title">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Title:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-title</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label-middle">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Middle:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-middle</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label-last">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Last:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-last</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label-suffix">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Suffix:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-suffix</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/addressbook/gui/contact-editor/test-editor.c b/addressbook/gui/contact-editor/test-editor.c
deleted file mode 100644
index 4a8c111563..0000000000
--- a/addressbook/gui/contact-editor/test-editor.c
+++ /dev/null
@@ -1,142 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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-ui-init.h>
-#include <glade/glade.h>
-#include "e-contact-editor.h"
-#include "ebook/e-card.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--;
- g_object_unref (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;
-
- gnome_program_init("Contact Editor Test", VERSION, LIBGNOMEUI_MODULE, argc, argv, NULL);
-
- glade_init ();
-
- cardstr = NULL;
- if (argc == 2)
- cardstr = read_file (argv [1]);
-
- if (cardstr == NULL)
- cardstr = TEST_VCARD;
-
- ce = e_contact_editor_new (NULL, e_card_new_with_default_charset (cardstr, "ISO-8859-1"), TRUE, FALSE);
- g_signal_connect (ce, "editor_closed",
- G_CALLBACK (editor_closed_cb), NULL);
-
- ce = e_contact_editor_new (NULL, e_card_new_with_default_charset (cardstr, "ISO-8859-1"), TRUE, FALSE);
- g_signal_connect (ce, "editor_closed",
- G_CALLBACK (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 f151930645..0000000000
--- a/addressbook/gui/contact-list-editor/.cvsignore
+++ /dev/null
@@ -1,6 +0,0 @@
-Makefile.in
-Makefile
-.deps
-.pure
-e-contact-list-editor-marshal.c
-e-contact-list-editor-marshal.h
diff --git a/addressbook/gui/contact-list-editor/Makefile.am b/addressbook/gui/contact-list-editor/Makefile.am
deleted file mode 100644
index 43abc3ff47..0000000000
--- a/addressbook/gui/contact-list-editor/Makefile.am
+++ /dev/null
@@ -1,39 +0,0 @@
-INCLUDES = \
- -I$(top_srcdir) \
- -I$(top_srcdir)/addressbook/ \
- -I$(top_srcdir)/addressbook/backend \
- -I$(top_builddir)/addressbook/backend \
- -I$(top_srcdir)/addressbook/gui/merging \
- -I$(top_srcdir)/addressbook/gui/contact-editor \
- -I$(top_builddir)/shell \
- -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
- -DEVOLUTION_ETSPECDIR=\""$(etspecdir)"\" \
- -DEVOLUTION_DATADIR=\""$(datadir)"\" \
- -DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\" \
- -DEVOLUTION_UIDIR=\""$(evolutionuidir)\"" \
- -DPREFIX=\""$(prefix)"\" \
- -DG_LOG_DOMAIN=\"contact-list-editor\" \
- $(EVOLUTION_ADDRESSBOOK_CFLAGS)
-
-noinst_LTLIBRARIES = \
- libecontactlisteditor.la
-
-libecontactlisteditor_la_SOURCES = \
- $(MARSHAL_GENERATED) \
- e-contact-list-editor.c \
- e-contact-list-editor.h \
- e-contact-list-model.c \
- e-contact-list-model.h
-
-MARSHAL_GENERATED = e-contact-list-editor-marshal.c e-contact-list-editor-marshal.h
-@EVO_MARSHAL_RULE@
-
-glade_DATA = contact-list-editor.glade
-etspec_DATA = e-contact-list-editor.etspec
-
-BUILT_SOURCES = $(MARSHAL_GENERATED)
-CLEANFILES = $(BUILT_SOURCES)
-
-EXTRA_DIST = $(glade_DATA) \
- $(etspec_DATA) \
- e-contact-list-editor-marshal.list
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 002e697105..0000000000
--- a/addressbook/gui/contact-list-editor/contact-list-editor.glade
+++ /dev/null
@@ -1,313 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-<requires lib="gnome"/>
-<requires lib="bonobo"/>
-
-<widget class="GnomeApp" id="contact list editor">
- <property name="title" translatable="yes">contact-list-editor</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="default_width">426</property>
- <property name="default_height">304</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="enable_layout_config">True</property>
-
- <child internal-child="dock">
- <widget class="BonoboDock" id="dock1">
- <property name="visible">True</property>
- <property name="allow_floating">True</property>
-
- <child>
- <widget class="GtkVBox" id="vbox8">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHBox" id="hbox6">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label10">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_List name:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">list-name-entry</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="list-name-entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="list-image">
- <property name="visible">True</property>
- <property name="creation_function">e_create_image_widget</property>
- <property name="string1">evolution-contacts-plain.png</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Sat, 23 Jun 2001 05:59:21 GMT</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frame3">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkHBox" id="hbox7">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkVBox" id="vbox9">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label11">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Type an email address or drag a contact into the list below:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="email-entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="contact-list-table">
- <property name="visible">True</property>
- <property name="creation_function">e_contact_list_editor_create_table</property>
- <property name="string1"></property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Sat, 23 Jun 2001 06:00:16 GMT</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="visible-addrs-checkbutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Hide addresses when sending mail to this list</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox10">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label12">
- <property name="visible">True</property>
- <property name="label" translatable="yes">
-</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVButtonBox" id="vbuttonbox4">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_START</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkButton" id="add-email-button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-add</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="remove-button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-remove</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label11">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Members</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/addressbook/gui/contact-list-editor/e-contact-list-editor-marshal.list b/addressbook/gui/contact-list-editor/e-contact-list-editor-marshal.list
deleted file mode 100644
index 8d94a0bf3b..0000000000
--- a/addressbook/gui/contact-list-editor/e-contact-list-editor-marshal.list
+++ /dev/null
@@ -1,4 +0,0 @@
-INT:OBJECT
-NONE:INT,OBJECT
-NONE:INT,OBJECT
-NONE:NONE
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 a475d15cd6..0000000000
--- a/addressbook/gui/contact-list-editor/e-contact-list-editor.c
+++ /dev/null
@@ -1,1297 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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-list-editor.h"
-
-#include <string.h>
-#include <glib.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-window-icon.h>
-#include <bonobo/bonobo-ui-container.h>
-#include <bonobo/bonobo-ui-util.h>
-#include <bonobo/bonobo-window.h>
-#include <gal/e-table/e-table-scrolled.h>
-#include <libgnomevfs/gnome-vfs-ops.h>
-#include "shell/evolution-shell-component-utils.h"
-
-#include "addressbook/gui/widgets/eab-gui-util.h"
-#include "addressbook/util/eab-book-util.h"
-
-#include "e-contact-editor.h"
-#include "e-contact-list-model.h"
-#include "e-contact-list-editor-marshal.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_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
-static void e_contact_list_editor_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
-static void e_contact_list_editor_dispose (GObject *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 gboolean image_drag_motion_cb (GtkWidget *widget,
- GdkDragContext *context,
- gint x, gint y, guint time, EContactListEditor *editor);
-static gboolean image_drag_drop_cb (GtkWidget *widget,
- GdkDragContext *context,
- gint x, gint y, guint time, EContactListEditor *editor);
-static void image_drag_data_received_cb (GtkWidget *widget,
- 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,
- DND_TARGET_TYPE_URI_LIST
-};
-#define VCARD_TYPE "text/x-vcard"
-#define URI_LIST_TYPE "text/uri-list"
-
-static GtkTargetEntry list_drag_types[] = {
- { VCARD_TYPE, 0, DND_TARGET_TYPE_VCARD },
-};
-static const int num_list_drag_types = sizeof (list_drag_types) / sizeof (list_drag_types[0]);
-
-static GtkTargetEntry image_drag_types[] = {
- { URI_LIST_TYPE, 0, DND_TARGET_TYPE_URI_LIST },
-};
-static const int num_image_drag_types = sizeof (image_drag_types) / sizeof (image_drag_types[0]);
-
-/* The arguments we take */
-enum {
- PROP_0,
- PROP_BOOK,
- PROP_CONTACT,
- PROP_IS_NEW_LIST,
- PROP_EDITABLE
-};
-
-static GSList *all_contact_list_editors = NULL;
-
-GType
-e_contact_list_editor_get_type (void)
-{
- static GType cle_type = 0;
-
- if (!cle_type) {
- static const GTypeInfo cle_info = {
- sizeof (EContactListEditorClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) e_contact_list_editor_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EContactListEditor),
- 0, /* n_preallocs */
- (GInstanceInitFunc) e_contact_list_editor_init,
- };
-
- cle_type = g_type_register_static (GTK_TYPE_OBJECT, "EContactListEditor", &cle_info, 0);
- }
-
- return cle_type;
-}
-
-
-static void
-e_contact_list_editor_class_init (EContactListEditorClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_ref (GTK_TYPE_OBJECT);
-
- object_class->set_property = e_contact_list_editor_set_property;
- object_class->get_property = e_contact_list_editor_get_property;
- /* object_class->dispose = e_contact_list_editor_dispose;*/
-
- g_object_class_install_property (object_class, PROP_BOOK,
- g_param_spec_object ("book",
- _("Book"),
- /*_( */"XXX blurb" /*)*/,
- E_TYPE_BOOK,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_CONTACT,
- g_param_spec_object ("contact",
- _("Contact"),
- /*_( */"XXX blurb" /*)*/,
- E_TYPE_CONTACT,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_IS_NEW_LIST,
- g_param_spec_boolean ("is_new_list",
- _("Is New List"),
- /*_( */"XXX blurb" /*)*/,
- FALSE,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_EDITABLE,
- g_param_spec_boolean ("editable",
- _("Editable"),
- /*_( */"XXX blurb" /*)*/,
- FALSE,
- G_PARAM_READWRITE));
-
- contact_list_editor_signals[LIST_ADDED] =
- g_signal_new ("list_added",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (EContactListEditorClass, list_added),
- NULL, NULL,
- e_contact_list_editor_marshal_NONE__INT_OBJECT,
- G_TYPE_NONE, 2,
- G_TYPE_INT, G_TYPE_OBJECT);
-
- contact_list_editor_signals[LIST_MODIFIED] =
- g_signal_new ("list_modified",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (EContactListEditorClass, list_modified),
- NULL, NULL,
- e_contact_list_editor_marshal_NONE__INT_OBJECT,
- G_TYPE_NONE, 2,
- G_TYPE_INT, G_TYPE_OBJECT);
-
- contact_list_editor_signals[LIST_DELETED] =
- g_signal_new ("list_deleted",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (EContactListEditorClass, list_deleted),
- NULL, NULL,
- e_contact_list_editor_marshal_NONE__INT_OBJECT,
- G_TYPE_NONE, 2,
- G_TYPE_INT, G_TYPE_OBJECT);
-
- contact_list_editor_signals[EDITOR_CLOSED] =
- g_signal_new ("editor_closed",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (EContactListEditorClass, editor_closed),
- NULL, NULL,
- e_contact_list_editor_marshal_NONE__NONE,
- G_TYPE_NONE, 0);
-}
-
-static void
-e_contact_list_editor_init (EContactListEditor *editor)
-{
- GladeXML *gui;
- GtkWidget *bonobo_win;
- BonoboUIContainer *container;
- char *icon_path;
- GdkPixbuf *pixbuf;
-
- editor->image_buf = NULL;
- editor->contact = NULL;
- editor->changed = FALSE;
- editor->editable = TRUE;
- editor->in_async_call = FALSE;
- editor->is_new_list = FALSE;
-
- gui = glade_xml_new (EVOLUTION_GLADEDIR "/contact-list-editor.glade", NULL, 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 = g_object_get_data (G_OBJECT(editor->table), "model");
-
- /* XXX need this for libglade-2 it seems */
- gtk_widget_show (editor->table);
-
- 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->list_image = glade_xml_get_widget (gui, "list-image");
- if (GTK_IS_ALIGNMENT (editor->list_image)) {
- /* deal with the e_create_image_widget code, that wraps the image in an alignment */
- editor->list_image = GTK_BIN (editor->list_image)->child;
- }
- editor->visible_addrs_checkbutton = glade_xml_get_widget (gui, "visible-addrs-checkbutton");
-
- pixbuf = gtk_image_get_pixbuf (GTK_IMAGE (editor->list_image));
- editor->list_image_width = gdk_pixbuf_get_width (pixbuf);
- editor->list_image_height = gdk_pixbuf_get_height (pixbuf);
-
- /* Construct the app */
- bonobo_win = bonobo_window_new ("contact-list-editor", _("Contact List Editor"));
-
- /* FIXME: The sucking bit */
- {
- GtkWidget *contents;
-
- contents = bonobo_dock_get_client_area (gnome_app_get_dock (GNOME_APP (editor->app)));
-
- 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_window_get_ui_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)), NULL);
-
- create_ui (editor);
-
- /* connect signals */
- g_signal_connect (editor->add_button,
- "clicked", G_CALLBACK(add_email_cb), editor);
- g_signal_connect (editor->email_entry,
- "activate", G_CALLBACK(add_email_cb), editor);
- g_signal_connect (editor->remove_button,
- "clicked", G_CALLBACK(remove_entry_cb), editor);
- g_signal_connect (editor->list_name_entry,
- "changed", G_CALLBACK(list_name_changed_cb), editor);
- g_signal_connect (editor->visible_addrs_checkbutton,
- "toggled", G_CALLBACK(visible_addrs_toggled_cb), editor);
-
- e_table_drag_dest_set (e_table_scrolled_get_table (E_TABLE_SCROLLED (editor->table)),
- 0, list_drag_types, num_list_drag_types, GDK_ACTION_LINK);
-
- g_signal_connect (e_table_scrolled_get_table (E_TABLE_SCROLLED (editor->table)),
- "table_drag_motion", G_CALLBACK(table_drag_motion_cb), editor);
- g_signal_connect (e_table_scrolled_get_table (E_TABLE_SCROLLED (editor->table)),
- "table_drag_drop", G_CALLBACK (table_drag_drop_cb), editor);
- g_signal_connect (e_table_scrolled_get_table (E_TABLE_SCROLLED (editor->table)),
- "table_drag_data_received", G_CALLBACK(table_drag_data_received_cb), editor);
-
- gtk_drag_dest_set (editor->list_image, 0, image_drag_types, num_image_drag_types, GDK_ACTION_COPY);
- g_signal_connect (editor->list_image,
- "drag_motion", G_CALLBACK (image_drag_motion_cb), editor);
- g_signal_connect (editor->list_image,
- "drag_drop", G_CALLBACK (image_drag_drop_cb), editor);
- g_signal_connect (editor->list_image,
- "drag_data_received", G_CALLBACK (image_drag_data_received_cb), editor);
-
- command_state_changed (editor);
-
- /* Connect to the deletion of the dialog */
-
- g_signal_connect (editor->app, "delete_event",
- G_CALLBACK (app_delete_event_cb), editor);
-
- /* set the icon */
- icon_path = g_build_filename (EVOLUTION_IMAGESDIR, "contact-list-16.png", NULL);
- gnome_window_icon_set_from_file (GTK_WINDOW (editor->app), icon_path);
- g_free (icon_path);
-}
-
-static void
-e_contact_list_editor_dispose (GObject *object)
-{
- EContactListEditor *cle = E_CONTACT_LIST_EDITOR (object);
-
- if (cle->image_buf) {
- g_free (cle->image_buf);
- cle->image_buf = NULL;
- }
-
- if (G_OBJECT_CLASS (parent_class)->dispose)
- (* G_OBJECT_CLASS (parent_class)->dispose) (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;
-
- if (cle->app)
- gtk_widget_set_sensitive (cle->app, TRUE);
- cle->in_async_call = FALSE;
-
- e_contact_set (cle->contact, E_CONTACT_UID, (char*)id);
-
- g_signal_emit (cle, contact_list_editor_signals[LIST_ADDED], 0,
- status, cle->contact);
-
- if (status == E_BOOK_ERROR_OK) {
- cle->is_new_list = FALSE;
-
- if (should_close)
- close_dialog (cle);
- else
- command_state_changed (cle);
- }
-
- g_object_unref (cle);
- g_free (ecs);
-}
-
-static void
-list_modified_cb (EBook *book, EBookStatus status, EditorCloseStruct *ecs)
-{
- EContactListEditor *cle = ecs->cle;
- gboolean should_close = ecs->should_close;
-
- if (cle->app)
- gtk_widget_set_sensitive (cle->app, TRUE);
- cle->in_async_call = FALSE;
-
- g_signal_emit (cle, contact_list_editor_signals[LIST_MODIFIED], 0,
- status, cle->contact);
-
- if (status == E_BOOK_ERROR_OK) {
- if (should_close)
- close_dialog (cle);
- }
-
- g_object_unref (cle); /* release ref held for ebook callback */
- g_free (ecs);
-}
-
-static void
-save_contact (EContactListEditor *cle, gboolean should_close)
-{
- extract_info (cle);
-
- if (cle->book) {
- EditorCloseStruct *ecs = g_new(EditorCloseStruct, 1);
-
- ecs->cle = cle;
- g_object_ref (cle);
- ecs->should_close = should_close;
-
- if (cle->app)
- gtk_widget_set_sensitive (cle->app, FALSE);
- cle->in_async_call = TRUE;
-
- if (cle->is_new_list)
- e_book_async_add_contact (cle->book, cle->contact, (EBookIdCallback)list_added_cb, ecs);
- else
- e_book_async_commit_contact (cle->book, cle->contact, (EBookCallback)list_modified_cb, ecs);
-
- cle->changed = FALSE;
- }
-}
-
-static gboolean
-is_named (EContactListEditor *editor)
-{
- char *string = gtk_editable_get_chars(GTK_EDITABLE (editor->list_name_entry), 0, -1);
- gboolean named = FALSE;
-
- if (string && *string) {
- named = TRUE;
- }
-
- g_free (string);
-
- return named;
-}
-
-static gboolean
-prompt_to_save_changes (EContactListEditor *editor)
-{
- if (!editor->changed || !is_named (editor))
- return TRUE;
-
- switch (eab_prompt_save_dialog (GTK_WINDOW(editor->app))) {
- case GTK_RESPONSE_YES:
- save_contact (editor, FALSE);
- return TRUE;
- case GTK_RESPONSE_NO:
- return TRUE;
- case GTK_RESPONSE_CANCEL:
- default:
- return FALSE;
- }
-}
-
-static void
-file_close_cb (GtkWidget *widget, gpointer data)
-{
- EContactListEditor *cle = E_CONTACT_LIST_EDITOR (data);
-
- if (!prompt_to_save_changes (cle))
- return;
-
- close_dialog (cle);
-}
-
-static void
-file_save_cb (GtkWidget *widget, gpointer data)
-{
- EContactListEditor *cle = E_CONTACT_LIST_EDITOR (data);
-
- save_contact (cle, FALSE);
-}
-
-static void
-file_save_as_cb (GtkWidget *widget, gpointer data)
-{
- EContactListEditor *cle = E_CONTACT_LIST_EDITOR (data);
-
- extract_info (cle);
-
- eab_contact_save(_("Save List as VCard"), cle->contact, GTK_WINDOW (cle->app));
-}
-
-static void
-file_send_as_cb (GtkWidget *widget, gpointer data)
-{
- EContactListEditor *cle = E_CONTACT_LIST_EDITOR (data);
-
- extract_info (cle);
-
- eab_send_contact(cle->contact, EAB_DISPOSITION_AS_ATTACHMENT);
-}
-
-static void
-file_send_to_cb (GtkWidget *widget, gpointer data)
-{
- EContactListEditor *cle = E_CONTACT_LIST_EDITOR (data);
-
- extract_info (cle);
-
- eab_send_contact(cle->contact, EAB_DISPOSITION_AS_TO);
-}
-
-static void
-tb_save_and_close_cb (GtkWidget *widget, gpointer data)
-{
- EContactListEditor *cle = E_CONTACT_LIST_EDITOR (data);
- save_contact (cle, TRUE);
-}
-
-static void
-list_deleted_cb (EBook *book, EBookStatus status, EContactListEditor *cle)
-{
- if (cle->app)
- gtk_widget_set_sensitive (cle->app, TRUE);
- cle->in_async_call = FALSE;
-
- g_signal_emit (cle, contact_list_editor_signals[LIST_DELETED], 0,
- status, cle->contact);
-
- /* always close the dialog after we successfully delete a list */
- if (status == E_BOOK_ERROR_OK)
- close_dialog (cle);
-
- g_object_unref (cle); /* release reference held for callback */
-}
-
-static void
-delete_cb (GtkWidget *widget, gpointer data)
-{
- EContactListEditor *cle = E_CONTACT_LIST_EDITOR (data);
- EContact *contact = cle->contact;
-
- g_object_ref (contact);
-
- if (e_contact_editor_confirm_delete(GTK_WINDOW(cle->app))) {
-
- extract_info (cle);
-
- if (!cle->is_new_list) {
- gtk_widget_set_sensitive (cle->app, FALSE);
- cle->in_async_call = TRUE;
-
- g_object_ref (cle); /* hold reference for callback */
- e_book_async_remove_contact (cle->book, contact, (EBookCallback)list_deleted_cb, cle);
- }
- }
-
- g_object_unref (contact);
-}
-
-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),
- BONOBO_UI_UNSAFE_VERB ("ContactListEditorSaveAs", file_save_as_cb),
- BONOBO_UI_UNSAFE_VERB ("ContactListEditorSendAs", file_send_as_cb),
- BONOBO_UI_UNSAFE_VERB ("ContactListEditorSendTo", file_send_to_cb),
- 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/ContactListEditorSaveClose", "save-16.png"),
- E_PIXMAP ("/commands/ContactListEditorSaveAs", "save-as-16.png"),
-
- E_PIXMAP ("/commands/ContactListEditorDelete", "evolution-trash-mini.png"),
-#if 0 /* Envelope printing is disabled for Evolution 1.0. */
- E_PIXMAP ("/commands/ContactListEditorPrint", "print.xpm"),
- E_PIXMAP ("/commands/ContactListEditorPrintEnvelope", "print.xpm"),
-#endif
- E_PIXMAP ("/Toolbar/ContactListEditorSaveClose", "buttons/save-24.png"),
- E_PIXMAP ("/Toolbar/ContactListEditorDelete", "buttons/delete-message.png"),
- E_PIXMAP ("/Toolbar/ContactListEditorPrint", "buttons/print.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, PREFIX,
- EVOLUTION_UIDIR "/evolution-contact-list-editor.xml",
- "evolution-contact-list-editor", NULL);
-
- e_pixmaps_update (ce->uic, pixmaps);
-}
-
-static void
-contact_list_editor_destroy_notify (gpointer data,
- GObject *where_the_object_was)
-{
- EContactListEditor *ce = E_CONTACT_LIST_EDITOR (data);
-
- all_contact_list_editors = g_slist_remove (all_contact_list_editors, ce);
-}
-
-EContactListEditor *
-e_contact_list_editor_new (EBook *book,
- EContact *list_contact,
- gboolean is_new_list,
- gboolean editable)
-{
- EContactListEditor *ce = g_object_new (E_TYPE_CONTACT_LIST_EDITOR, NULL);
-
- all_contact_list_editors = g_slist_prepend (all_contact_list_editors, ce);
- g_object_weak_ref (G_OBJECT (ce), contact_list_editor_destroy_notify, ce);
-
- g_object_ref (ce);
- gtk_object_sink (GTK_OBJECT (ce));
-
- g_object_set (ce,
- "book", book,
- "contact", list_contact,
- "is_new_list", is_new_list,
- "editable", editable,
- NULL);
-
- return ce;
-}
-
-static void
-e_contact_list_editor_set_property (GObject *object, guint prop_id,
- const GValue *value, GParamSpec *pspec)
-{
- EContactListEditor *editor;
-
- editor = E_CONTACT_LIST_EDITOR (object);
-
- switch (prop_id){
- case PROP_BOOK:
- if (editor->book)
- g_object_unref (editor->book);
- editor->book = E_BOOK(g_value_get_object (value));
- g_object_ref (editor->book);
- /* XXX more here about editable/etc. */
- break;
- case PROP_CONTACT:
- if (editor->contact)
- g_object_unref (editor->contact);
- editor->contact = e_contact_duplicate(E_CONTACT(g_value_get_object (value)));
- fill_in_info(editor);
- editor->changed = FALSE;
- command_state_changed (editor);
- break;
- case PROP_IS_NEW_LIST: {
- gboolean new_value = g_value_get_boolean (value);
- gboolean changed = (editor->is_new_list != new_value);
-
- editor->is_new_list = new_value;
-
- if (changed)
- command_state_changed (editor);
- break;
- }
- case PROP_EDITABLE: {
- gboolean new_value = g_value_get_boolean (value);
- gboolean changed = (editor->editable != new_value);
-
- editor->editable = new_value;
-
- if (changed) {
- set_editable (editor);
- command_state_changed (editor);
- }
- break;
- }
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-e_contact_list_editor_get_property (GObject *object, guint prop_id,
- GValue *value, GParamSpec *pspec)
-{
- EContactListEditor *editor;
-
- editor = E_CONTACT_LIST_EDITOR (object);
-
- switch (prop_id) {
- case PROP_BOOK:
- g_value_set_object (value, editor->book);
- break;
-
- case PROP_CONTACT:
- extract_info(editor);
- g_value_set_object (value, editor->contact);
- break;
-
- case PROP_IS_NEW_LIST:
- g_value_set_boolean (value, editor->is_new_list);
- break;
-
- case PROP_EDITABLE:
- g_value_set_boolean (value, editor->editable);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- 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);
-}
-
-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_from_spec_file (model,
- NULL,
- EVOLUTION_ETSPECDIR "/e-contact-list-editor.etspec",
- NULL);
-
- g_object_set_data(G_OBJECT(table), "model", model);
-
- return table;
-}
-
-static void
-add_email_cb (GtkWidget *w, EContactListEditor *editor)
-{
- GtkAdjustment *adj = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (editor->table));
- const 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);
-
- /* Skip to the end of the list */
- if (adj->upper - adj->lower > adj->page_size)
- gtk_adjustment_set_value (adj, adj->upper);
- }
-
- gtk_entry_set_text (GTK_ENTRY(editor->email_entry), "");
-
- 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);
- editor->changed = TRUE;
- command_state_changed (editor);
-}
-
-static void
-list_name_changed_cb (GtkWidget *w, EContactListEditor *editor)
-{
- editor->changed = TRUE;
- command_state_changed (editor);
-}
-
-static void
-visible_addrs_toggled_cb (GtkWidget *w, EContactListEditor *editor)
-{
- 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;
-
- g_signal_emit (cle, contact_list_editor_signals[EDITOR_CLOSED], 0);
-}
-
-/* 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);
-
- /* if we're in an async call, don't allow the dialog to close */
- if (ce->in_async_call)
- return TRUE;
-
- if (!prompt_to_save_changes (ce))
- return TRUE;
-
- 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 (GDK_POINTER_TO_ATOM (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)
- return FALSE;
-
-
- gtk_drag_get_data (GTK_WIDGET (table), context,
- GDK_POINTER_TO_ATOM (context->targets->data),
- time);
- return TRUE;
-}
-
-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)
-{
- GtkAdjustment *adj = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (editor->table));
- char *target_type;
- gboolean changed = FALSE;
- gboolean handled = FALSE;
-
- target_type = gdk_atom_name (selection_data->target);
-
- if (!strcmp (target_type, VCARD_TYPE)) {
-
- GList *contact_list = eab_contact_list_from_string (selection_data->data);
- GList *c;
-
- if (contact_list)
- handled = TRUE;
-
- for (c = contact_list; c; c = c->next) {
- EContact *contact = c->data;
-
- if (!e_contact_get (contact, E_CONTACT_IS_LIST)) {
- e_contact_list_model_add_contact (E_CONTACT_LIST_MODEL (editor->model),
- contact);
-
- changed = TRUE;
- }
- }
- g_list_foreach (contact_list, (GFunc)g_object_unref, NULL);
- g_list_free (contact_list);
-
- /* Skip to the end of the list */
- if (adj->upper - adj->lower > adj->page_size)
- gtk_adjustment_set_value (adj, adj->upper);
-
- if (changed) {
- editor->changed = TRUE;
- command_state_changed (editor);
- }
- }
-
- gtk_drag_finish (context, handled, FALSE, time);
-}
-
-static gboolean
-set_image_from_data (EContactListEditor *editor,
- char *data, int length)
-{
- gboolean rv = FALSE;
- GdkPixbufLoader *loader = gdk_pixbuf_loader_new ();
- GdkPixbuf *pixbuf;
-
- gdk_pixbuf_loader_write (loader, data, length, NULL);
-
- pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
- if (pixbuf)
- gdk_pixbuf_ref (pixbuf);
- gdk_pixbuf_loader_close (loader, NULL);
- g_object_unref (loader);
-
- if (pixbuf) {
- GdkPixbuf *scaled;
- GdkPixbuf *composite;
-
- float scale;
- int new_height, new_width;
-
- new_height = gdk_pixbuf_get_height (pixbuf);
- new_width = gdk_pixbuf_get_width (pixbuf);
-
- printf ("new dimensions = (%d,%d)\n", new_width, new_height);
-
- if (editor->list_image_height < new_height
- || editor->list_image_width < new_width) {
- /* we need to scale down */
- printf ("we need to scale down\n");
- if (new_height > new_width)
- scale = (float)editor->list_image_height / new_height;
- else
- scale = (float)editor->list_image_width / new_width;
- }
- else {
- /* we need to scale up */
- printf ("we need to scale up\n");
- if (new_height > new_width)
- scale = (float)new_height / editor->list_image_height;
- else
- scale = (float)new_width / editor->list_image_width;
- }
-
- printf ("scale = %g\n", scale);
-
- new_width *= scale;
- new_height *= scale;
- new_width = MIN (new_width, editor->list_image_width);
- new_height = MIN (new_height, editor->list_image_height);
-
- printf ("new scaled dimensions = (%d,%d)\n", new_width, new_height);
-
- scaled = gdk_pixbuf_scale_simple (pixbuf,
- new_width, new_height,
- GDK_INTERP_BILINEAR);
-
- composite = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, gdk_pixbuf_get_bits_per_sample (pixbuf),
- editor->list_image_width, editor->list_image_height);
-
- gdk_pixbuf_fill (composite, 0x00000000);
-
- gdk_pixbuf_copy_area (scaled, 0, 0, new_width, new_height,
- composite,
- editor->list_image_width / 2 - new_width / 2,
- editor->list_image_height / 2 - new_height / 2);
-
- gtk_image_set_from_pixbuf (GTK_IMAGE (editor->list_image), composite);
- gdk_pixbuf_unref (pixbuf);
- gdk_pixbuf_unref (scaled);
- gdk_pixbuf_unref (composite);
-
- rv = TRUE;
- }
-
- return rv;
-}
-
-static gboolean
-image_drag_motion_cb (GtkWidget *widget,
- 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 (GDK_POINTER_TO_ATOM (p->data));
- if (!strcmp (possible_type, URI_LIST_TYPE)) {
- g_free (possible_type);
- gdk_drag_status (context, GDK_ACTION_COPY, time);
- return TRUE;
- }
-
- g_free (possible_type);
- }
-
- return FALSE;
-}
-
-static gboolean
-image_drag_drop_cb (GtkWidget *widget,
- GdkDragContext *context,
- gint x, gint y, guint time, EContactListEditor *editor)
-{
- GList *p;
-
- if (context->targets == NULL)
- return FALSE;
-
-
- for (p = context->targets; p != NULL; p = p->next) {
- char *possible_type;
-
- possible_type = gdk_atom_name (GDK_POINTER_TO_ATOM (p->data));
- if (!strcmp (possible_type, URI_LIST_TYPE)) {
- g_free (possible_type);
- gtk_drag_get_data (widget, context,
- GDK_POINTER_TO_ATOM (p->data),
- time);
- return TRUE;
- }
-
- g_free (possible_type);
- }
-
- return FALSE;
-}
-
-static void
-image_drag_data_received_cb (GtkWidget *widget,
- GdkDragContext *context,
- gint x, gint y,
- GtkSelectionData *selection_data,
- guint info, guint time, EContactListEditor *editor)
-{
- char *target_type;
- gboolean changed = FALSE;
- gboolean handled = FALSE;
-
- target_type = gdk_atom_name (selection_data->target);
-
- printf ("target_type == %s\n", target_type);
-
- if (!strcmp (target_type, URI_LIST_TYPE)) {
- GnomeVFSResult result;
- GnomeVFSHandle *handle;
- char *uri;
- char *nl = strstr (selection_data->data, "\r\n");
- char *buf = NULL;
- GnomeVFSFileInfo info;
-
- if (nl)
- uri = g_strndup (selection_data->data, nl - (char*)selection_data->data);
- else
- uri = g_strdup (selection_data->data);
-
- printf ("uri == %s\n", uri);
-
- result = gnome_vfs_open (&handle, uri, GNOME_VFS_OPEN_READ);
- if (result == GNOME_VFS_OK) {
- result = gnome_vfs_get_file_info_from_handle (handle, &info, GNOME_VFS_FILE_INFO_DEFAULT);
- if (result == GNOME_VFS_OK) {
- GnomeVFSFileSize num_left;
- GnomeVFSFileSize num_read;
- GnomeVFSFileSize total_read;
-
- printf ("file size = %d\n", (int)info.size);
- buf = g_malloc (info.size);
-
- num_left = info.size;
- total_read = 0;
-
- while ((result = gnome_vfs_read (handle, buf + total_read, num_left, &num_read)) == GNOME_VFS_OK) {
- num_left -= num_read;
- total_read += num_read;
- }
-
- printf ("read %d bytes\n", (int)total_read);
- if (set_image_from_data (editor, buf, total_read)) {
- changed = TRUE;
- handled = TRUE;
- g_free (editor->image_buf);
- editor->image_buf = buf;
- editor->image_buf_size = total_read;
- }
- else {
- /* XXX we should pop up a
- warning dialog here */
- g_free (buf);
- }
- }
-
- gnome_vfs_close (handle);
- }
- else {
- printf ("gnome_vfs_open failed (%s)\n", gnome_vfs_result_to_string (result));
- }
-
- g_free (uri);
-
- if (changed) {
- editor->changed = TRUE;
- command_state_changed (editor);
- }
- }
-
- gtk_drag_finish (context, handled, FALSE, time);
-}
-
-static void
-command_state_changed (EContactListEditor *editor)
-{
- gboolean named = is_named (editor);
-
- bonobo_ui_component_set_prop (editor->uic,
- "/commands/ContactListEditorSaveClose",
- "sensitive",
- editor->changed && named && editor->editable ? "1" : "0", NULL);
-
- bonobo_ui_component_set_prop (editor->uic,
- "/commands/ContactListEditorSave",
- "sensitive",
- editor->changed && named && 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)
-{
- EContact *contact = editor->contact;
- if (contact) {
- int i;
- GList *email_list;
- char *string = gtk_editable_get_chars(GTK_EDITABLE (editor->list_name_entry), 0, -1);
-
- if (string && *string) {
- e_contact_set (contact, E_CONTACT_FILE_AS, string);
- e_contact_set (contact, E_CONTACT_FULL_NAME, string);
- }
-
- g_free (string);
-
- e_contact_set (contact, E_CONTACT_IS_LIST, GINT_TO_POINTER (TRUE));
- e_contact_set (contact, E_CONTACT_LIST_SHOW_ADDRESSES,
- GINT_TO_POINTER (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(editor->visible_addrs_checkbutton))));
-
- email_list = NULL;
- /* then refill it from the contact list model */
- for (i = 0; i < e_table_model_row_count (editor->model); i ++) {
- const EABDestination *dest = e_contact_list_model_get_destination (E_CONTACT_LIST_MODEL (editor->model), i);
- gchar *dest_xml = eab_destination_export (dest);
- if (dest_xml)
- email_list = g_list_append (email_list, dest_xml);
- }
-
- e_contact_set (contact, E_CONTACT_EMAIL, email_list);
-
- /* XXX free email_list? */
-
- if (editor->image_buf) {
- EContactPhoto photo;
-
- photo.data = editor->image_buf;
- photo.length = editor->image_buf_size;
-
- e_contact_set (contact, E_CONTACT_LOGO, &photo);
- }
- g_object_unref (email_list);
- }
-}
-
-static void
-fill_in_info(EContactListEditor *editor)
-{
- if (editor->contact) {
- EContactPhoto *photo;
- char *file_as;
- gboolean show_addresses = FALSE;
- gboolean is_evolution_list = FALSE;
- GList *email_list;
- GList *iter;
-
- file_as = e_contact_get_const (editor->contact, E_CONTACT_FILE_AS);
- email_list = e_contact_get (editor->contact, E_CONTACT_EMAIL);
- is_evolution_list = GPOINTER_TO_INT (e_contact_get (editor->contact, E_CONTACT_IS_LIST));
- show_addresses = GPOINTER_TO_INT (e_contact_get (editor->contact, E_CONTACT_LIST_SHOW_ADDRESSES));
-
- gtk_editable_delete_text (GTK_EDITABLE (editor->list_name_entry), 0, -1);
- if (file_as) {
- int position = 0;
- gtk_editable_insert_text (GTK_EDITABLE (editor->list_name_entry), file_as, strlen (file_as), &position);
- g_free (file_as);
- }
-
- 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));
-
- for (iter = email_list; iter; iter = iter->next) {
- char *dest_xml = iter->data;
- EABDestination *dest;
-
- /* g_message ("incoming xml: [%s]", dest_xml); */
- dest = eab_destination_import (dest_xml);
-
- if (dest != NULL) {
- e_contact_list_model_add_destination (E_CONTACT_LIST_MODEL (editor->model), dest);
- }
- }
-
- /* XXX free email_list */
-
- photo = e_contact_get (editor->contact, E_CONTACT_LOGO);
- if (photo) {
- set_image_from_data (editor, photo->data, photo->length);
- e_contact_photo_free (photo);
- }
- g_object_unref (email_list);
- }
-}
-
-
-gboolean
-e_contact_list_editor_request_close_all (void)
-{
- GSList *p;
- GSList *pnext;
- gboolean retval;
-
- retval = TRUE;
- for (p = all_contact_list_editors; p != NULL; p = pnext) {
- pnext = p->next;
-
- e_contact_list_editor_raise (E_CONTACT_LIST_EDITOR (p->data));
- if (! prompt_to_save_changes (E_CONTACT_LIST_EDITOR (p->data))) {
- retval = FALSE;
- break;
- }
-
- close_dialog (E_CONTACT_LIST_EDITOR (p->data));
- }
-
- return retval;
-}
diff --git a/addressbook/gui/contact-list-editor/e-contact-list-editor.etspec b/addressbook/gui/contact-list-editor/e-contact-list-editor.etspec
deleted file mode 100644
index 6d5f4f2514..0000000000
--- a/addressbook/gui/contact-list-editor/e-contact-list-editor.etspec
+++ /dev/null
@@ -1,7 +0,0 @@
-<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>
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 52e78a6a23..0000000000
--- a/addressbook/gui/contact-list-editor/e-contact-list-editor.h
+++ /dev/null
@@ -1,113 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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 <libebook/e-book-async.h>
-#include <libebook/e-contact.h>
-
-G_BEGIN_DECLS
-
-#define E_TYPE_CONTACT_LIST_EDITOR (e_contact_list_editor_get_type ())
-#define E_CONTACT_LIST_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_CONTACT_LIST_EDITOR, EContactListEditor))
-#define E_CONTACT_LIST_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_CONTACT_LIST_EDITOR, EContactListEditorClass))
-#define E_IS_CONTACT_LIST_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_CONTACT_LIST_EDITOR))
-#define E_IS_CONTACT_LIST_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_CONTACT_LIST_EDITOR))
-
-
-typedef struct _EContactListEditor EContactListEditor;
-typedef struct _EContactListEditorClass EContactListEditorClass;
-
-struct _EContactListEditor
-{
- GtkObject object;
-
- /* item specific fields */
- EBook *book;
- EContact *contact;
-
- /* 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 *list_image_button;
- GtkWidget *visible_addrs_checkbutton;
- GtkWidget *list_image;
- int list_image_width;
- int list_image_height;
-
- char *image_buf;
- int image_buf_size;
-
- /* Whether we are editing a new contact or an existing one */
- guint is_new_list : 1;
-
- /* Whether the contact has been changed since bringing up the contact editor */
- guint changed : 1;
-
- /* Whether the contact editor will accept modifications */
- guint editable : 1;
-
- /* Whether an async wombat call is in progress */
- guint in_async_call : 1;
-};
-
-struct _EContactListEditorClass
-{
- GtkObjectClass parent_class;
-
- /* Notification signals */
-
- void (* list_added) (EContactListEditor *cle, EBookStatus status, EContact *contact);
- void (* list_modified) (EContactListEditor *cle, EBookStatus status, EContact *contact);
- void (* list_deleted) (EContactListEditor *cle, EBookStatus status, EContact *contact);
- void (* editor_closed) (EContactListEditor *cle);
-};
-
-EContactListEditor *e_contact_list_editor_new (EBook *book,
- EContact *list_contact,
- gboolean is_new_list,
- gboolean editable);
-GType 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);
-
-gboolean e_contact_list_editor_request_close_all (void);
-
-G_END_DECLS
-
-
-#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 c7fd626372..0000000000
--- a/addressbook/gui/contact-list-editor/e-contact-list-model.c
+++ /dev/null
@@ -1,265 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-#include <config.h>
-#include <string.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 *) eab_destination_get_textrep (model->data[row], TRUE);
-}
-
-/* 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 TRUE;
-}
-
-/* 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;
-
- if (model->data != NULL) {
- for (i = 0; i < model->data_count; i ++) {
- g_object_unref (model->data[i]);
- }
- g_free (model->data);
- model->data = NULL;
- }
-
- model->data_count = 0;
- model->data_alloc = 0;
-
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (o);
-}
-
-static void
-e_contact_list_model_class_init (GtkObjectClass *object_class)
-{
- ETableModelClass *model_class = (ETableModelClass *) object_class;
-
- parent_class = g_type_class_ref (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 (EABDestination*, model->data_alloc);
-}
-
-GType
-e_contact_list_model_get_type (void)
-{
- static GType cle_type = 0;
-
- if (!cle_type) {
- static const GTypeInfo cle_info = {
- sizeof (EContactListModelClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) e_contact_list_model_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EContactListModel),
- 0, /* n_preallocs */
- (GInstanceInitFunc) e_contact_list_model_init,
- };
-
- cle_type = g_type_register_static (E_TABLE_MODEL_TYPE, "EContactListModel", &cle_info, 0);
- }
-
- return cle_type;
-}
-
-void
-e_contact_list_model_construct (EContactListModel *model)
-{
-}
-
-ETableModel *
-e_contact_list_model_new ()
-{
- EContactListModel *model;
-
- model = g_object_new (E_TYPE_CONTACT_LIST_MODEL, NULL);
-
- e_contact_list_model_construct (model);
-
- return E_TABLE_MODEL(model);
-}
-
-void
-e_contact_list_model_add_destination (EContactListModel *model, EABDestination *dest)
-{
- g_return_if_fail (E_IS_CONTACT_LIST_MODEL (model));
- g_return_if_fail (EAB_IS_DESTINATION (dest));
-
- e_table_model_pre_change (E_TABLE_MODEL (model));
-
- if (model->data_count + 1 >= model->data_alloc) {
- model->data_alloc *= 2;
- model->data = g_renew (EABDestination*, model->data, model->data_alloc);
- }
-
- model->data[model->data_count ++] = dest;
- g_object_ref (dest);
-
- e_table_model_row_inserted (E_TABLE_MODEL (model), model->data_count - 1);
-}
-
-void
-e_contact_list_model_add_email (EContactListModel *model,
- const char *email)
-{
- EABDestination *new_dest;
-
- g_return_if_fail (E_IS_CONTACT_LIST_MODEL (model));
- g_return_if_fail (email != NULL);
-
- new_dest = eab_destination_new ();
- eab_destination_set_email (new_dest, email);
-
- e_contact_list_model_add_destination (model, new_dest);
-}
-
-void
-e_contact_list_model_add_contact (EContactListModel *model,
- EContact *contact)
-{
- EABDestination *new_dest;
-
- g_return_if_fail (E_IS_CONTACT_LIST_MODEL (model));
- g_return_if_fail (E_IS_CONTACT (contact));
-
- new_dest = eab_destination_new ();
- eab_destination_set_contact (new_dest, contact, 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);
-
- e_table_model_pre_change (E_TABLE_MODEL (model));
-
- g_object_unref (model->data[row]);
- memmove (model->data + row, model->data + row + 1, sizeof (EABDestination*) * (model->data_count - row - 1));
- model->data_count --;
-
- e_table_model_row_deleted (E_TABLE_MODEL (model), row);
-}
-
-void
-e_contact_list_model_remove_all (EContactListModel *model)
-{
- int i;
-
- g_return_if_fail (E_IS_CONTACT_LIST_MODEL (model));
-
- e_table_model_pre_change (E_TABLE_MODEL (model));
-
- for (i = 0; i < model->data_count; i ++) {
- g_object_unref (model->data[i]);
- model->data[i] = NULL;
- }
-
- model->data_count = 0;
-
- e_table_model_changed (E_TABLE_MODEL (model));
-}
-
-
-const EABDestination *
-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 504f31b9d8..0000000000
--- a/addressbook/gui/contact-list-editor/e-contact-list-model.h
+++ /dev/null
@@ -1,51 +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 <gtk/gtk.h>
-#include <gal/e-table/e-table-model.h>
-#include <libebook/e-book-async.h>
-#include <libebook/e-contact.h>
-#include "addressbook/util/eab-destination.h"
-
-G_BEGIN_DECLS
-
-#define E_TYPE_CONTACT_LIST_MODEL (e_contact_list_model_get_type ())
-#define E_CONTACT_LIST_MODEL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_TYPE_CONTACT_LIST_MODEL, EContactListModel))
-#define E_CONTACT_LIST_MODEL_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), E_TYPE_CONTACT_LIST_MODEL, EContactListModelClass))
-#define E_IS_CONTACT_LIST_MODEL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_TYPE_CONTACT_LIST_MODEL))
-#define E_IS_CONTACT_LIST_MODEL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_TYPE_CONTACT_LIST_MODEL))
-
-typedef struct _EContactListModel EContactListModel;
-typedef struct _EContactListModelClass EContactListModelClass;
-
-struct _EContactListModel {
- ETableModel parent;
-
- EABDestination **data;
- int data_count;
- int data_alloc;
-};
-
-
-struct _EContactListModelClass {
- ETableModelClass parent_class;
-};
-
-
-GType 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, EABDestination *dest);
-void e_contact_list_model_add_email (EContactListModel *model, const char *email);
-void e_contact_list_model_add_contact (EContactListModel *model, EContact *contact);
-
-void e_contact_list_model_remove_row (EContactListModel *model, int row);
-void e_contact_list_model_remove_all (EContactListModel *model);
-
-const EABDestination *e_contact_list_model_get_destination (EContactListModel *model, int row);
-
-G_END_DECLS
-
-#endif /* _E_CONTACT_LIST_MODEL_H_ */
diff --git a/addressbook/gui/merging/.cvsignore b/addressbook/gui/merging/.cvsignore
deleted file mode 100644
index b6fa83ca4c..0000000000
--- a/addressbook/gui/merging/.cvsignore
+++ /dev/null
@@ -1,8 +0,0 @@
-.deps
-.libs
-.pure
-Makefile
-Makefile.in
-*.lo
-*.la
-*.gladep
diff --git a/addressbook/gui/merging/Makefile.am b/addressbook/gui/merging/Makefile.am
deleted file mode 100644
index f1d589ad00..0000000000
--- a/addressbook/gui/merging/Makefile.am
+++ /dev/null
@@ -1,24 +0,0 @@
-INCLUDES = \
- -DG_LOG_DOMAIN=\"eab-contact-merging\" \
- -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
- -I$(top_srcdir) \
- -I$(top_srcdir)/addressbook \
- -I$(top_srcdir)/addressbook/backend \
- -I$(top_builddir)/addressbook/backend \
- $(EVOLUTION_ADDRESSBOOK_CFLAGS)
-
-noinst_LTLIBRARIES = \
- libeabbookmerging.la
-
-libeabbookmerging_la_SOURCES = \
- eab-contact-compare.c \
- eab-contact-compare.h \
- eab-contact-merging.c \
- eab-contact-merging.h
-
-
-glade_DATA = eab-contact-duplicate-detected.glade \
- eab-contact-commit-duplicate-detected.glade
-
-EXTRA_DIST = \
- $(glade_DATA)
diff --git a/addressbook/gui/merging/eab-contact-commit-duplicate-detected.glade b/addressbook/gui/merging/eab-contact-commit-duplicate-detected.glade
deleted file mode 100644
index 789c465d92..0000000000
--- a/addressbook/gui/merging/eab-contact-commit-duplicate-detected.glade
+++ /dev/null
@@ -1,212 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-
-<widget class="GtkDialog" id="dialog-duplicate-contact">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="title" translatable="yes">Duplicate Contact Detected</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="has_separator">True</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="button3">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">1</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="button4">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-add</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">0</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTable" id="table1">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="n_rows">5</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="Custom" id="custom-old-contact">
- <property name="visible">True</property>
- <property name="creation_function">_eab_contact_merging_create_contact_display</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Sun, 05 Oct 2003 03:54:20 GMT</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">The changed email or name of this contact already
-exists in this folder. Would you like to add it anyway?</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Conflicting Contact:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label4">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Changed Contact:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="custom-new-contact">
- <property name="visible">True</property>
- <property name="creation_function">_eab_contact_merging_create_contact_display</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Sun, 05 Oct 2003 03:53:42 GMT</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0</property>
- <property name="xscale">1</property>
- <property name="yscale">0</property>
-
- <child>
- <widget class="Custom" id="custom2">
- <property name="visible">True</property>
- <property name="creation_function">e_create_image_widget</property>
- <property name="string1">malehead.png</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Fri, 08 Jun 2001 00:18:39 GMT</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">5</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/addressbook/gui/merging/eab-contact-compare.c b/addressbook/gui/merging/eab-contact-compare.c
deleted file mode 100644
index 409b1bce81..0000000000
--- a/addressbook/gui/merging/eab-contact-compare.c
+++ /dev/null
@@ -1,736 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * eab-contact-compare.c
- *
- * Copyright (C) 2001, 2002, 2003 Ximian, Inc.
- *
- * Authors: Jon Trowbridge <trow@ximian.com>
- * Chris Toshok <toshok@ximian.com>
- */
-
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <string.h>
-#include "util/eab-book-util.h"
-#include "eab-contact-compare.h"
-
-/* This is an "optimistic" combiner: the best of the two outcomes is
- selected. */
-static EABContactMatchType
-combine_comparisons (EABContactMatchType prev,
- EABContactMatchType new_info)
-{
- if (new_info == EAB_CONTACT_MATCH_NOT_APPLICABLE)
- return prev;
- return (EABContactMatchType) 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 it can be fixed later. */
-
-/* This is very Anglocentric. */
-static gchar *name_synonyms[][2] = {
- { "jon", "john" }, /* Ah, the hacker's perogative */
- { "joseph", "joe" },
- { "robert", "bob" },
- { "gene", "jean" },
- { "jesse", "jessie" },
- { "ian", "iain" },
- { "richard", "dick" },
- { "william", "bill" },
- { "william", "will" },
- { "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" },
- { "christopher", "chris" },
- { "rebecca", "becca" },
- { "rebecca", "becky" },
- { "anderson", "andersen" },
- { "johnson", "johnsen" },
- /* We could go on and on... */
- /* We should add soundex here. */
- { NULL, NULL }
-};
-
-static gboolean
-name_fragment_match (const gchar *a, const gchar *b, gboolean strict)
-{
- gint len;
-
- if (!(a && b && *a && *b))
- return FALSE;
-
- /* If we are in 'strict' mode, b must match the beginning of a.
- So "Robert", "Rob" would match, but "Robert", "Robbie" wouldn't.
-
- If strict is FALSE, it is sufficient for the strings to share
- some leading characters. In this case, "Robert" and "Robbie"
- would match, as would "Dave" and "Dan". */
-
- if (strict) {
- len = g_utf8_strlen (b, -1);
- } else {
- len = MIN (g_utf8_strlen (a, -1), g_utf8_strlen (b, -1));
- }
-
- return !e_utf8_casefold_collate_len (a, b, len);
-}
-
-static gboolean
-name_fragment_match_with_synonyms (const gchar *a, const gchar *b, gboolean strict)
-{
- gint i;
-
- if (!(a && b && *a && *b))
- return FALSE;
-
- if (name_fragment_match (a, b, strict))
- return TRUE;
-
- /* Check for nicknames. Yes, the linear search blows. */
- for (i=0; name_synonyms[i][0]; ++i) {
-
- if (!e_utf8_casefold_collate (name_synonyms[i][0], a)
- && !e_utf8_casefold_collate (name_synonyms[i][1], b))
- return TRUE;
-
- if (!e_utf8_casefold_collate (name_synonyms[i][0], b)
- && !e_utf8_casefold_collate (name_synonyms[i][1], a))
- return TRUE;
- }
-
- return FALSE;
-}
-
-EABContactMatchType
-eab_contact_compare_name_to_string (EContact *contact, const gchar *str)
-{
- return eab_contact_compare_name_to_string_full (contact, str, FALSE, NULL, NULL, NULL);
-}
-
-EABContactMatchType
-eab_contact_compare_name_to_string_full (EContact *contact, const gchar *str, gboolean allow_partial_matches,
- gint *matched_parts_out, EABContactMatchPart *first_matched_part_out, gint *matched_character_count_out)
-{
- gchar **namev, **givenv = NULL, **addv = NULL, **familyv = NULL;
-
- gint matched_parts = EAB_CONTACT_MATCH_PART_NONE;
- EABContactMatchPart first_matched_part = EAB_CONTACT_MATCH_PART_NONE;
- EABContactMatchPart this_part_match = EAB_CONTACT_MATCH_PART_NOT_APPLICABLE;
- EABContactMatchType match_type;
- EContactName *contact_name;
-
- gint match_count = 0, matched_character_count = 0, fragment_count;
- gint i, j;
- gchar *str_cpy, *s;
-
- g_return_val_if_fail (E_IS_CONTACT (contact), EAB_CONTACT_MATCH_NOT_APPLICABLE);
-
- if (!e_contact_get_const (contact, E_CONTACT_FULL_NAME))
- return EAB_CONTACT_MATCH_NOT_APPLICABLE;
- if (str == NULL)
- return EAB_CONTACT_MATCH_NOT_APPLICABLE;
-
- str_cpy = s = g_strdup (str);
- while (*s) {
- if (*s == ',' || *s == '"')
- *s = ' ';
- ++s;
- }
- namev = g_strsplit (str_cpy, " ", 0);
- g_free (str_cpy);
-
- contact_name = e_contact_get (contact, E_CONTACT_NAME);
-
- if (contact_name->given)
- givenv = g_strsplit (contact_name->given, " ", 0);
- if (contact_name->additional)
- addv = g_strsplit (contact_name->additional, " ", 0);
- if (contact_name->family)
- familyv = g_strsplit (contact_name->family, " ", 0);
-
- e_contact_name_free (contact_name);
-
- fragment_count = 0;
- for (i = 0; givenv && givenv[i]; ++i)
- ++fragment_count;
- for (i = 0; addv && addv[i]; ++i)
- ++fragment_count;
- for (i = 0; familyv && familyv[i]; ++i)
- ++fragment_count;
-
- for (i = 0; namev[i] && this_part_match != EAB_CONTACT_MATCH_PART_NONE; ++i) {
-
- if (*namev[i]) {
-
- this_part_match = EAB_CONTACT_MATCH_PART_NONE;
-
- /* When we are allowing partials, we are strict about the matches we allow.
- Does this make sense? Not really, but it does the right thing for the purposes
- of completion. */
-
- if (givenv && this_part_match == EAB_CONTACT_MATCH_PART_NONE) {
- for (j = 0; givenv[j]; ++j) {
- if (name_fragment_match_with_synonyms (givenv[j], namev[i], allow_partial_matches)) {
-
- this_part_match = EAB_CONTACT_MATCH_PART_GIVEN_NAME;
-
- /* We remove a piece of a name once it has been matched against, so
- that "john john" won't match "john doe". */
- g_free (givenv[j]);
- givenv[j] = g_strdup ("");
- break;
- }
- }
- }
-
- if (addv && this_part_match == EAB_CONTACT_MATCH_PART_NONE) {
- for (j = 0; addv[j]; ++j) {
- if (name_fragment_match_with_synonyms (addv[j], namev[i], allow_partial_matches)) {
-
- this_part_match = EAB_CONTACT_MATCH_PART_ADDITIONAL_NAME;
-
- g_free (addv[j]);
- addv[j] = g_strdup ("");
- break;
- }
- }
- }
-
- if (familyv && this_part_match == EAB_CONTACT_MATCH_PART_NONE) {
- for (j = 0; familyv[j]; ++j) {
- if (allow_partial_matches ? name_fragment_match_with_synonyms (familyv[j], namev[i], allow_partial_matches)
- : !e_utf8_casefold_collate (familyv[j], namev[i])) {
-
- this_part_match = EAB_CONTACT_MATCH_PART_FAMILY_NAME;
-
- g_free (familyv[j]);
- familyv[j] = g_strdup ("");
- break;
- }
- }
- }
-
- if (this_part_match != EAB_CONTACT_MATCH_PART_NONE) {
- ++match_count;
- matched_character_count += g_utf8_strlen (namev[i], -1);
- matched_parts |= this_part_match;
- if (first_matched_part == EAB_CONTACT_MATCH_PART_NONE)
- first_matched_part = this_part_match;
- }
- }
- }
-
- match_type = EAB_CONTACT_MATCH_NONE;
-
- if (this_part_match != EAB_CONTACT_MATCH_PART_NONE) {
-
- if (match_count > 0)
- match_type = EAB_CONTACT_MATCH_VAGUE;
-
- if (fragment_count == match_count) {
-
- match_type = EAB_CONTACT_MATCH_EXACT;
-
- } else if (fragment_count == match_count + 1) {
-
- match_type = EAB_CONTACT_MATCH_PARTIAL;
-
- }
- }
-
- if (matched_parts_out)
- *matched_parts_out = matched_parts;
- if (first_matched_part_out)
- *first_matched_part_out = first_matched_part;
- if (matched_character_count_out)
- *matched_character_count_out = matched_character_count;
-
- g_strfreev (namev);
- g_strfreev (givenv);
- g_strfreev (addv);
- g_strfreev (familyv);
-
- return match_type;
-}
-
-EABContactMatchType
-eab_contact_compare_name (EContact *contact1, EContact *contact2)
-{
- EContactName *a, *b;
- gint matches=0, possible=0;
- gboolean given_match = FALSE, additional_match = FALSE, family_match = FALSE;
-
- g_return_val_if_fail (E_IS_CONTACT (contact1), EAB_CONTACT_MATCH_NOT_APPLICABLE);
- g_return_val_if_fail (E_IS_CONTACT (contact2), EAB_CONTACT_MATCH_NOT_APPLICABLE);
-
- a = e_contact_get (contact1, E_CONTACT_NAME);
- b = e_contact_get (contact2, E_CONTACT_NAME);
-
- if (a == NULL || b == NULL)
- return EAB_CONTACT_MATCH_NOT_APPLICABLE;
-
- if (a->given && b->given) {
- ++possible;
- if (name_fragment_match_with_synonyms (a->given, b->given, FALSE /* both inputs are complete */)) {
- ++matches;
- given_match = TRUE;
- }
- }
-
- if (a->additional && b->additional) {
- ++possible;
- if (name_fragment_match_with_synonyms (a->additional, b->additional, FALSE /* both inputs are complete */)) {
- ++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 (! e_utf8_casefold_collate (a->family, b->family)) {
- ++matches;
- family_match = TRUE;
- }
- }
-
- e_contact_name_free (a);
- e_contact_name_free (b);
-
- /* Now look at the # of matches and try to intelligently map
- an EAB_CONTACT_MATCH_* type to it. Special consideration is given
- to family-name matches. */
-
- if (possible == 0)
- return EAB_CONTACT_MATCH_NOT_APPLICABLE;
-
- if (possible == 1)
- return family_match ? EAB_CONTACT_MATCH_VAGUE : EAB_CONTACT_MATCH_NONE;
-
- if (possible == matches)
- return family_match ? EAB_CONTACT_MATCH_EXACT : EAB_CONTACT_MATCH_PARTIAL;
-
- if (possible == matches+1)
- return family_match ? EAB_CONTACT_MATCH_VAGUE : EAB_CONTACT_MATCH_NONE;
-
- return EAB_CONTACT_MATCH_NONE;
-}
-
-
-/*** Nickname Comparisons ***/
-
-EABContactMatchType
-eab_contact_compare_nickname (EContact *contact1, EContact *contact2)
-{
- g_return_val_if_fail (contact1 && E_IS_CONTACT (contact1), EAB_CONTACT_MATCH_NOT_APPLICABLE);
- g_return_val_if_fail (contact2 && E_IS_CONTACT (contact2), EAB_CONTACT_MATCH_NOT_APPLICABLE);
-
- return EAB_CONTACT_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 EABContactMatchType
-compare_email_addresses (const gchar *addr1, const gchar *addr2)
-{
- if (addr1 == NULL || *addr1 == 0 ||
- addr2 == NULL || *addr2 == 0)
- return EAB_CONTACT_MATCH_NOT_APPLICABLE;
-
- if (match_email_username (addr1, addr2))
- return match_email_hostname (addr1, addr2) ? EAB_CONTACT_MATCH_EXACT : EAB_CONTACT_MATCH_VAGUE;
-
- return EAB_CONTACT_MATCH_NONE;
-}
-
-EABContactMatchType
-eab_contact_compare_email (EContact *contact1, EContact *contact2)
-{
- EABContactMatchType match = EAB_CONTACT_MATCH_NOT_APPLICABLE;
- GList *contact1_email, *contact2_email;
- GList *i1, *i2;
-
- g_return_val_if_fail (contact1 && E_IS_CONTACT (contact1), EAB_CONTACT_MATCH_NOT_APPLICABLE);
- g_return_val_if_fail (contact2 && E_IS_CONTACT (contact2), EAB_CONTACT_MATCH_NOT_APPLICABLE);
-
- contact1_email = e_contact_get (contact1, E_CONTACT_EMAIL);
- contact2_email = e_contact_get (contact2, E_CONTACT_EMAIL);
-
- if (contact1_email == NULL || contact2_email == NULL) {
- g_list_foreach (contact1_email, (GFunc)g_free, NULL);
- g_list_free (contact1_email);
-
- g_list_foreach (contact2_email, (GFunc)g_free, NULL);
- g_list_free (contact2_email);
- return EAB_CONTACT_MATCH_NOT_APPLICABLE;
- }
-
- i1 = contact1_email;
-
- /* Do pairwise-comparisons on all of the e-mail addresses. If
- we find an exact match, there is no reason to keep
- checking. */
- while (i1 && match != EAB_CONTACT_MATCH_EXACT) {
- char *addr1 = (char *) i1->data;
-
- i2 = contact2_email;
- while (i2 && match != EAB_CONTACT_MATCH_EXACT) {
- char *addr2 = (char *) i2->data;
-
- match = combine_comparisons (match, compare_email_addresses (addr1, addr2));
-
- i2 = i2->next;
- }
-
- i1 = i1->next;
- }
-
- g_list_foreach (contact1_email, (GFunc)g_free, NULL);
- g_list_free (contact1_email);
-
- g_list_foreach (contact2_email, (GFunc)g_free, NULL);
- g_list_free (contact2_email);
-
- return match;
-}
-
-EABContactMatchType
-eab_contact_compare_address (EContact *contact1, EContact *contact2)
-{
- g_return_val_if_fail (contact1 && E_IS_CONTACT (contact1), EAB_CONTACT_MATCH_NOT_APPLICABLE);
- g_return_val_if_fail (contact2 && E_IS_CONTACT (contact2), EAB_CONTACT_MATCH_NOT_APPLICABLE);
-
- /* Unimplemented */
-
- return EAB_CONTACT_MATCH_NOT_APPLICABLE;
-}
-
-EABContactMatchType
-eab_contact_compare_telephone (EContact *contact1, EContact *contact2)
-{
- g_return_val_if_fail (contact1 && E_IS_CONTACT (contact1), EAB_CONTACT_MATCH_NOT_APPLICABLE);
- g_return_val_if_fail (contact2 && E_IS_CONTACT (contact2), EAB_CONTACT_MATCH_NOT_APPLICABLE);
-
- /* Unimplemented */
-
- return EAB_CONTACT_MATCH_NOT_APPLICABLE;
-}
-
-EABContactMatchType
-eab_contact_compare (EContact *contact1, EContact *contact2)
-{
- EABContactMatchType result;
-
- g_return_val_if_fail (contact1 && E_IS_CONTACT (contact1), EAB_CONTACT_MATCH_NOT_APPLICABLE);
- g_return_val_if_fail (contact2 && E_IS_CONTACT (contact2), EAB_CONTACT_MATCH_NOT_APPLICABLE);
-
- result = EAB_CONTACT_MATCH_NONE;
- result = combine_comparisons (result, eab_contact_compare_name (contact1, contact2));
- result = combine_comparisons (result, eab_contact_compare_nickname (contact1, contact2));
- result = combine_comparisons (result, eab_contact_compare_email (contact1, contact2));
- result = combine_comparisons (result, eab_contact_compare_address (contact1, contact2));
- result = combine_comparisons (result, eab_contact_compare_telephone (contact1, contact2));
-
- return result;
-}
-
-typedef struct _MatchSearchInfo MatchSearchInfo;
-struct _MatchSearchInfo {
- EContact *contact;
- GList *avoid;
- EABContactMatchQueryCallback cb;
- gpointer closure;
-};
-
-static void
-match_search_info_free (MatchSearchInfo *info)
-{
- if (info) {
- g_object_unref (info->contact);
-
- /* This should already have been deallocated, but just in case... */
- if (info->avoid) {
- g_list_foreach (info->avoid, (GFunc) g_object_unref, NULL);
- g_list_free (info->avoid);
- info->avoid = NULL;
- }
-
- g_free (info);
- }
-}
-
-static void
-query_cb (EBook *book, EBookStatus status, GList *contacts, gpointer closure)
-{
- /* XXX we need to free contacts */
- MatchSearchInfo *info = (MatchSearchInfo *) closure;
- EABContactMatchType best_match = EAB_CONTACT_MATCH_NONE;
- EContact *best_contact = NULL;
- GList *remaining_contacts = NULL;
- const GList *i;
-
- if (status != E_BOOK_ERROR_OK) {
- info->cb (info->contact, NULL, EAB_CONTACT_MATCH_NONE, info->closure);
- match_search_info_free (info);
- return;
- }
-
- /* remove the contacts we're to avoid from the list, if they're present */
- for (i = contacts; i != NULL; i = g_list_next (i)) {
- EContact *this_contact = E_CONTACT (i->data);
- GList *iterator;
- gboolean avoid = FALSE;
- for (iterator = info->avoid; iterator; iterator = iterator->next) {
- if (!strcmp (e_contact_get_const (iterator->data, E_CONTACT_UID),
- e_contact_get_const (this_contact, E_CONTACT_UID))) {
- avoid = TRUE;
- break;
- }
- }
- if (!avoid)
- remaining_contacts = g_list_prepend (remaining_contacts, this_contact);
- }
-
- remaining_contacts = g_list_reverse (remaining_contacts);
-
- for (i = remaining_contacts; i != NULL; i = g_list_next (i)) {
- EContact *this_contact = E_CONTACT (i->data);
- EABContactMatchType this_match = eab_contact_compare (info->contact, this_contact);
- if ((gint)this_match > (gint)best_match) {
- best_match = this_match;
- best_contact = this_contact;
- }
- }
-
- g_list_free (remaining_contacts);
-
- info->cb (info->contact, best_contact, 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;
- EContact *contact = info->contact;
- EContactName *contact_name;
- GList *contact_email;
- gchar *query_parts[MAX_QUERY_PARTS];
- gint p=0;
- gchar *query, *qj;
- int i;
-
- if (book == NULL) {
- info->cb (info->contact, NULL, EAB_CONTACT_MATCH_NONE, info->closure);
- match_search_info_free (info);
- return;
- }
-
- contact_name = e_contact_get (contact, E_CONTACT_NAME);
- if (contact_name) {
- if (contact_name->given && *contact_name->given)
- query_parts[p++] = g_strdup_printf ("(contains \"full_name\" \"%s\")", contact_name->given);
-
- if (contact_name->additional && *contact_name->additional)
- query_parts[p++] = g_strdup_printf ("(contains \"full_name\" \"%s\")", contact_name->additional);
-
- if (contact_name->family && *contact_name->family)
- query_parts[p++] = g_strdup_printf ("(contains \"full_name\" \"%s\")", contact_name->family);
-
- e_contact_name_free (contact_name);
- }
-
- contact_email = e_contact_get (contact, E_CONTACT_EMAIL);
- if (contact_email) {
- GList *iter;
- for (iter = contact_email; iter && p < MAX_QUERY_PARTS; iter = iter->next) {
- gchar *addr = g_strdup (iter->data);
- if (addr && *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);
- }
- }
- }
- g_list_foreach (contact_email, (GFunc)g_free, NULL);
- g_list_free (contact_email);
-
-
- /* 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;
- }
-
- if (query && *query)
- e_book_async_get_contacts (book, query, query_cb, info);
- else
- query_cb (book, E_BOOK_ERROR_OK, NULL, info);
-
- g_free (query);
-}
-
-void
-eab_contact_locate_match (EContact *contact, EABContactMatchQueryCallback cb, gpointer closure)
-{
- MatchSearchInfo *info;
-
- g_return_if_fail (contact && E_IS_CONTACT (contact));
- g_return_if_fail (cb != NULL);
-
- info = g_new (MatchSearchInfo, 1);
- info->contact = contact;
- g_object_ref (contact);
- info->cb = cb;
- info->closure = closure;
- info->avoid = NULL;
-
- addressbook_load_default_book (use_common_book_cb, info);
-}
-
-/**
- * e_contact_locate_match_full:
- * @book: The book to look in. If this is NULL, use the default
- * addressbook.
- * @contact: The contact to compare to.
- * @avoid: A list of contacts 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 EABContactMatchQueryCallback.
- **/
-void
-eab_contact_locate_match_full (EBook *book, EContact *contact, GList *avoid, EABContactMatchQueryCallback cb, gpointer closure)
-{
- MatchSearchInfo *info;
-
- g_return_if_fail (contact && E_IS_CONTACT (contact));
- g_return_if_fail (cb != NULL);
-
- info = g_new (MatchSearchInfo, 1);
- info->contact = contact;
- g_object_ref (contact);
- info->cb = cb;
- info->closure = closure;
- info->avoid = g_list_copy (avoid);
- g_list_foreach (info->avoid, (GFunc) g_object_ref, NULL);
-
- if (book)
- use_common_book_cb (book, info);
- else
- addressbook_load_default_book (use_common_book_cb, info);
-}
-
diff --git a/addressbook/gui/merging/eab-contact-compare.h b/addressbook/gui/merging/eab-contact-compare.h
deleted file mode 100644
index 4b97b3c698..0000000000
--- a/addressbook/gui/merging/eab-contact-compare.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * eab-contact-compare.h
- *
- * Copyright (C) 2001,2002,2003 Ximian, Inc.
- *
- * Authors: Jon Trowbridge <trow@ximian.com>
- * Chris Toshok <toshok@ximian.com>
- */
-
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA.
- */
-
-#ifndef __EAB_CONTACT_COMPARE_H__
-#define __EAB_CONTACT_COMPARE_H__
-
-#include <libebook/e-book.h>
-#include <libebook/e-contact.h>
-
-typedef enum {
- EAB_CONTACT_MATCH_NOT_APPLICABLE = 0,
- EAB_CONTACT_MATCH_NONE = 1,
- EAB_CONTACT_MATCH_VAGUE = 2,
- EAB_CONTACT_MATCH_PARTIAL = 3,
- EAB_CONTACT_MATCH_EXACT = 4
-} EABContactMatchType;
-
-typedef enum {
- EAB_CONTACT_MATCH_PART_NOT_APPLICABLE = -1,
- EAB_CONTACT_MATCH_PART_NONE = 0,
- EAB_CONTACT_MATCH_PART_GIVEN_NAME = 1<<0,
- EAB_CONTACT_MATCH_PART_ADDITIONAL_NAME = 1<<2,
- EAB_CONTACT_MATCH_PART_FAMILY_NAME = 1<<3
-} EABContactMatchPart;
-
-typedef void (*EABContactMatchQueryCallback) (EContact *contact, EContact *match, EABContactMatchType type, gpointer closure);
-
-EABContactMatchType eab_contact_compare_name_to_string (EContact *contact, const gchar *str);
-
-EABContactMatchType eab_contact_compare_name_to_string_full (EContact *contact, const gchar *str,
- gboolean allow_partial_matches,
- gint *matched_parts, EABContactMatchPart *first_matched_part,
- gint *matched_character_count);
-
-EABContactMatchType eab_contact_compare_name (EContact *contact1, EContact *contact2);
-EABContactMatchType eab_contact_compare_nickname (EContact *contact1, EContact *contact2);
-EABContactMatchType eab_contact_compare_email (EContact *contact1, EContact *contact2);
-EABContactMatchType eab_contact_compare_address (EContact *contact1, EContact *contact2);
-EABContactMatchType eab_contact_compare_telephone (EContact *contact1, EContact *contact2);
-
-EABContactMatchType eab_contact_compare (EContact *contact1, EContact *contact2);
-
-void eab_contact_locate_match (EContact *contact, EABContactMatchQueryCallback cb, gpointer closure);
-void eab_contact_locate_match_full (EBook *book, EContact *contact, GList *avoid, EABContactMatchQueryCallback cb, gpointer closure);
-
-
-
-#endif /* __E_CONTACT_COMPARE_H__ */
-
diff --git a/addressbook/gui/merging/eab-contact-duplicate-detected.glade b/addressbook/gui/merging/eab-contact-duplicate-detected.glade
deleted file mode 100644
index c44547fb92..0000000000
--- a/addressbook/gui/merging/eab-contact-duplicate-detected.glade
+++ /dev/null
@@ -1,212 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-
-<widget class="GtkDialog" id="dialog-duplicate-contact">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="title" translatable="yes">Duplicate Contact Detected</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="has_separator">True</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="button4">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">1</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="button3">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-add</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">0</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTable" id="table1">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="n_rows">5</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="Custom" id="custom-old-contact">
- <property name="visible">True</property>
- <property name="creation_function">_eab_contact_merging_create_contact_display</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Sun, 05 Oct 2003 03:55:10 GMT</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">The name or email address of this contact already exists
-in this folder. Would you like to add it anyway?</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Original Contact:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label4">
- <property name="visible">True</property>
- <property name="label" translatable="yes">New Contact:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="custom-new-contact">
- <property name="visible">True</property>
- <property name="creation_function">_eab_contact_merging_create_contact_display</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Sun, 05 Oct 2003 03:54:50 GMT</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0</property>
- <property name="xscale">1</property>
- <property name="yscale">0</property>
-
- <child>
- <widget class="Custom" id="custom2">
- <property name="visible">True</property>
- <property name="creation_function">e_create_image_widget</property>
- <property name="string1">malehead.png</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Fri, 08 Jun 2001 00:18:39 GMT</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">5</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/addressbook/gui/merging/eab-contact-merging.c b/addressbook/gui/merging/eab-contact-merging.c
deleted file mode 100644
index 38a3c188b2..0000000000
--- a/addressbook/gui/merging/eab-contact-merging.c
+++ /dev/null
@@ -1,197 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Code for checking for duplicates when doing EContact work.
- *
- * Authors:
- * Christopher James Lahey <clahey@ximian.com>
- * Chris Toshok <toshok@ximian.com>
- *
- * Copyright (C) 2001, 2002, 2003, Ximian, Inc.
- */
-
-#include <config.h>
-
-#include "eab-contact-merging.h"
-#include "eab-contact-compare.h"
-#include <glade/glade.h>
-#include <gtk/gtksignal.h>
-#include "addressbook/gui/widgets/eab-contact-display.h"
-
-typedef enum {
- E_CONTACT_MERGING_ADD,
- E_CONTACT_MERGING_COMMIT
-} EContactMergingOpType;
-
-typedef struct {
- EContactMergingOpType op;
- EBook *book;
- EContact *contact;
- EBookIdCallback id_cb;
- EBookCallback cb;
- gpointer closure;
-} EContactMergingLookup;
-
-static void
-free_lookup (EContactMergingLookup *lookup)
-{
- g_object_unref (lookup->book);
- g_object_unref (lookup->contact);
-
- g_free (lookup);
-}
-
-static void
-final_id_cb (EBook *book, EBookStatus status, const char *id, gpointer closure)
-{
- EContactMergingLookup *lookup = closure;
-
- if (lookup->id_cb)
- lookup->id_cb (lookup->book, status, id, lookup->closure);
-
- free_lookup (lookup);
-}
-
-static void
-final_cb (EBook *book, EBookStatus status, gpointer closure)
-{
- EContactMergingLookup *lookup = closure;
-
- if (lookup->cb)
- lookup->cb (lookup->book, status, lookup->closure);
-
- free_lookup (lookup);
-}
-
-static void
-doit (EContactMergingLookup *lookup)
-{
- if (lookup->op == E_CONTACT_MERGING_ADD)
- e_book_async_add_contact (lookup->book, lookup->contact, final_id_cb, lookup);
- else if (lookup->op == E_CONTACT_MERGING_COMMIT)
- e_book_async_commit_contact (lookup->book, lookup->contact, final_cb, lookup);
-}
-
-static void
-cancelit (EContactMergingLookup *lookup)
-{
- if (lookup->op == E_CONTACT_MERGING_ADD) {
- if (lookup->id_cb)
- final_id_cb (lookup->book, E_BOOK_ERROR_CANCELLED, NULL, lookup);
- } else if (lookup->op == E_CONTACT_MERGING_COMMIT) {
- if (lookup->cb)
- final_cb (lookup->book, E_BOOK_ERROR_CANCELLED, lookup);
- }
-}
-
-static void
-response (GtkWidget *dialog, int response, EContactMergingLookup *lookup)
-{
- gtk_widget_destroy (dialog);
-
- switch (response) {
- case 0:
- doit (lookup);
- break;
- case 1:
- cancelit (lookup);
- break;
- }
-}
-
-static void
-match_query_callback (EContact *contact, EContact *match, EABContactMatchType type, gpointer closure)
-{
- EContactMergingLookup *lookup = closure;
-
- if ((gint) type <= (gint) EAB_CONTACT_MATCH_VAGUE) {
- doit (lookup);
- } else {
- GladeXML *ui;
-
- GtkWidget *widget;
-
- if (lookup->op == E_CONTACT_MERGING_ADD)
- ui = glade_xml_new (EVOLUTION_GLADEDIR "/eab-contact-duplicate-detected.glade", NULL, NULL);
- else if (lookup->op == E_CONTACT_MERGING_COMMIT)
- ui = glade_xml_new (EVOLUTION_GLADEDIR "/eab-contact-merging-commit-duplicate-detected.glade", NULL, NULL);
- else {
- doit (lookup);
- return;
- }
-
- widget = glade_xml_get_widget (ui, "custom-old-contact");
- eab_contact_display_render (EAB_CONTACT_DISPLAY (widget),
- match, EAB_CONTACT_DISPLAY_RENDER_COMPACT);
-
- widget = glade_xml_get_widget (ui, "custom-new-contact");
- eab_contact_display_render (EAB_CONTACT_DISPLAY (widget),
- contact, EAB_CONTACT_DISPLAY_RENDER_COMPACT);
-
- widget = glade_xml_get_widget (ui, "dialog-duplicate-contact");
-
- g_signal_connect (widget, "response",
- G_CALLBACK (response), lookup);
-
- gtk_widget_show_all (widget);
- }
-}
-
-gboolean
-eab_merging_book_add_contact (EBook *book,
- EContact *contact,
- EBookIdCallback cb,
- gpointer closure)
-{
- EContactMergingLookup *lookup;
-
- lookup = g_new (EContactMergingLookup, 1);
-
- lookup->op = E_CONTACT_MERGING_ADD;
- lookup->book = g_object_ref (book);
- lookup->contact = g_object_ref (contact);
- lookup->id_cb = cb;
- lookup->closure = closure;
-
- eab_contact_locate_match_full (book, contact, NULL, match_query_callback, lookup);
-
- return TRUE;
-}
-
-gboolean
-eab_merging_book_commit_contact (EBook *book,
- EContact *contact,
- EBookCallback cb,
- gpointer closure)
-{
- EContactMergingLookup *lookup;
- GList *avoid;
-
- lookup = g_new (EContactMergingLookup, 1);
-
- lookup->op = E_CONTACT_MERGING_COMMIT;
- lookup->book = g_object_ref (book);
- lookup->contact = g_object_ref (contact);
- lookup->cb = cb;
- lookup->closure = closure;
-
- avoid = g_list_append (NULL, contact);
-
- eab_contact_locate_match_full (book, contact, avoid, match_query_callback, lookup);
-
- g_list_free (avoid);
-
- return TRUE;
-}
-
-GtkWidget *
-_eab_contact_merging_create_contact_display(gchar *name,
- gchar *string1, gchar *string2,
- gint int1, gint int2);
-
-GtkWidget *
-_eab_contact_merging_create_contact_display(gchar *name,
- gchar *string1, gchar *string2,
- gint int1, gint int2)
-{
- return eab_contact_display_new();
-}
diff --git a/addressbook/gui/merging/eab-contact-merging.h b/addressbook/gui/merging/eab-contact-merging.h
deleted file mode 100644
index d6d60e57de..0000000000
--- a/addressbook/gui/merging/eab-contact-merging.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * The Evolution addressbook client object.
- *
- * Authors:
- * Christopher James Lahey <clahey@ximian.com>
- * Chris Toshok <toshok@ximian.com>
- *
- * Copyright (C) 2001, 2002, 2003 Ximian, Inc.
- */
-
-#ifndef __E_CONTACT_MERGING_H__
-#define __E_CONTACT_MERGING_H__
-
-#include <libebook/e-book-async.h>
-
-G_BEGIN_DECLS
-
-gboolean eab_merging_book_add_contact (EBook *book,
- EContact *contact,
- EBookIdCallback cb,
- gpointer closure);
-gboolean eab_merging_book_commit_contact (EBook *book,
- EContact *contact,
- EBookCallback cb,
- gpointer closure);
-
-G_END_DECLS
-
-#endif /* ! __EAB_CONTACT_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 391039d81f..0000000000
--- a/addressbook/gui/search/Makefile.am
+++ /dev/null
@@ -1,23 +0,0 @@
-ruledir = $(privdatadir)
-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)\" \
- $(EVOLUTION_ADDRESSBOOK_CFLAGS)
-
-noinst_LTLIBRARIES = \
- libeaddressbooksearch.la
-
-libeaddressbooksearch_la_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 a8621bf5a7..0000000000
--- a/addressbook/gui/search/e-addressbook-search-dialog.c
+++ /dev/null
@@ -1,158 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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/gtkstock.h>
-#include <libgnome/gnome-i18n.h>
-#include "gal/util/e-util.h"
-
-#include "e-addressbook-search-dialog.h"
-
-
-static void eab_search_dialog_init (EABSearchDialog *widget);
-static void eab_search_dialog_class_init (EABSearchDialogClass *klass);
-static void eab_search_dialog_dispose (GObject *object);
-
-static GtkDialog *parent_class = NULL;
-
-#define PARENT_TYPE GTK_TYPE_DIALOG
-
-E_MAKE_TYPE (eab_search_dialog,
- "EABSearchDialog",
- EABSearchDialog,
- eab_search_dialog_class_init,
- eab_search_dialog_init,
- PARENT_TYPE)
-
-static void
-eab_search_dialog_class_init (EABSearchDialogClass *klass)
-{
- GObjectClass *object_class;
-
- object_class = (GObjectClass*) klass;
-
- parent_class = g_type_class_ref (PARENT_TYPE);
-
- object_class->dispose = eab_search_dialog_dispose;
-}
-
-static GtkWidget *
-get_widget (EABSearchDialog *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 (EABSearchDialog *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
-dialog_response (GtkWidget *widget, int response_id, EABSearchDialog *dialog)
-{
- char *query;
-
- if (response_id == GTK_RESPONSE_OK) {
- query = get_query(dialog);
- g_object_set(dialog->view,
- "query", query,
- NULL);
- g_free(query);
- }
-
- gtk_widget_destroy(GTK_WIDGET (dialog));
-}
-
-static void
-eab_search_dialog_init (EABSearchDialog *view)
-{
- GtkDialog *dialog = GTK_DIALOG (view);
-
- gtk_window_set_default_size (GTK_WINDOW (view), 550, 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);
-
- gtk_dialog_add_buttons (dialog,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- /*GTK_STOCK_SAVE, GTK_RESPONSE_APPLY,*/
- GTK_STOCK_OK, GTK_RESPONSE_OK,
- NULL);
-
- gtk_dialog_set_default_response (dialog, GTK_RESPONSE_OK);
-
- g_signal_connect(dialog, "response",
- G_CALLBACK(dialog_response), view);
-}
-
-GtkWidget *
-eab_search_dialog_new (EABView *addr_view)
-{
- EABSearchDialog *view = g_object_new (EAB_SEARCH_DIALOG_TYPE, NULL);
- view->view = addr_view;
- return GTK_WIDGET(view);
-}
-
-static void
-eab_search_dialog_dispose (GObject *object)
-{
- EABSearchDialog *view;
-
- view = EAB_SEARCH_DIALOG (object);
-
- if (view->context) {
- g_object_unref(view->context);
- view->context = NULL;
- }
- if (view->rule) {
- g_object_unref(view->rule);
- view->rule = NULL;
- }
-
- G_OBJECT_CLASS(parent_class)->dispose (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 8634074f69..0000000000
--- a/addressbook/gui/search/e-addressbook-search-dialog.h
+++ /dev/null
@@ -1,66 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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 __EAB_SEARCH_DIALOG_H__
-#define __EAB_SEARCH_DIALOG_H__
-
-#include <libebook/e-book.h>
-
-#include "addressbook/gui/widgets/e-addressbook-view.h"
-#include "filter/rule-context.h"
-#include "filter/filter-rule.h"
-#include <gtk/gtkdialog.h>
-
-G_BEGIN_DECLS
-
-#define EAB_SEARCH_DIALOG_TYPE (eab_search_dialog_get_type ())
-#define EAB_SEARCH_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EAB_SEARCH_DIALOG_TYPE, EABSearchDialog))
-#define EAB_SEARCH_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EAB_SEARCH_DIALOG_TYPE, EABSearchDialogClass))
-#define E_IS_ADDRESSBOOK_SEARCH_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EAB_SEARCH_DIALOG_TYPE))
-#define E_IS_ADDRESSBOOK_SEARCH_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), EAB_SEARCH_DIALOG_TYPE))
-
-
-typedef struct _EABSearchDialog EABSearchDialog;
-typedef struct _EABSearchDialogClass EABSearchDialogClass;
-
-struct _EABSearchDialog
-{
- GtkDialog parent;
-
- GtkWidget *search;
-
- EABView *view;
-
- RuleContext *context;
- FilterRule *rule;
-};
-
-struct _EABSearchDialogClass
-{
- GtkDialogClass parent_class;
-};
-
-GType eab_search_dialog_get_type (void);
-
-GtkWidget *eab_search_dialog_new (EABView *view);
-
-G_END_DECLS
-
-#endif /* __EAB_SEARCH_DIALOG_H__ */
diff --git a/addressbook/gui/widgets/.cvsignore b/addressbook/gui/widgets/.cvsignore
deleted file mode 100644
index b67f65e6c3..0000000000
--- a/addressbook/gui/widgets/.cvsignore
+++ /dev/null
@@ -1,19 +0,0 @@
-.deps
-.libs
-.pure
-Makefile
-Makefile.in
-*.lo
-*.la
-minicard-label-test
-minicard-test
-minicard-view-test
-minicard-widget-test
-reflow-test
-eab-marshal.c
-eab-marshal.h
-Evolution-Composer-stubs.c
-Evolution-Composer-skels.c
-Evolution-Composer-common.c
-Evolution-Composer.h
-
diff --git a/addressbook/gui/widgets/Makefile.am b/addressbook/gui/widgets/Makefile.am
deleted file mode 100644
index ce5cc32275..0000000000
--- a/addressbook/gui/widgets/Makefile.am
+++ /dev/null
@@ -1,89 +0,0 @@
-INCLUDES = \
- -DG_LOG_DOMAIN=\"eab-widgets\" \
- -DEVOLUTION_ETSPECDIR=\""$(etspecdir)"\" \
- -DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\" \
- -DEVOLUTION_GALVIEWSDIR=\""$(viewsdir)"\" \
- -I$(top_srcdir) \
- -I$(top_srcdir)/addressbook \
- -I$(top_srcdir)/addressbook/backend \
- -I$(top_builddir)/addressbook/backend \
- -I$(top_srcdir)/addressbook/gui/contact-editor \
- -I$(top_srcdir)/addressbook/gui/merging \
- -I$(top_srcdir)/addressbook/gui/component \
- -I$(top_srcdir)/widgets/misc \
- -I$(top_builddir)/shell \
- $(EVOLUTION_ADDRESSBOOK_CFLAGS)
-
-CORBA_COMPOSER_SOURCE_H = \
- Evolution-Composer.h
-CORBA_COMPOSER_SOURCE_C = \
- Evolution-Composer-common.c \
- Evolution-Composer-skels.c \
- Evolution-Composer-stubs.c
-CORBA_COMPOSER_IDL = $(srcdir)/../../../composer/Evolution-Composer.idl
-
-$(CORBA_COMPOSER_SOURCE_H): $(CORBA_COMPOSER_IDL)
- $(ORBIT_IDL) -I $(srcdir) $(IDL_INCLUDES) $(CORBA_COMPOSER_IDL)
-
-$(CORBA_COMPOSER_SOURCE_C): $(CORBA_COMPOSER_SOURCE_H)
-
-CORBA_SOURCE_H = $(CORBA_COMPOSER_SOURCE_H)
-CORBA_SOURCE_C = $(CORBA_COMPOSER_SOURCE_C)
-CORBA_SOURCE = $(CORBA_SOURCE_H) $(CORBA_SOURCE_C)
-
-noinst_LTLIBRARIES = \
- libeabwidgets.la
-
-libeabwidgets_la_SOURCES = \
- $(CORBA_SOURCE) \
- $(MARSHAL_GENERATED) \
- eab-contact-display.c \
- eab-contact-display.h \
- eab-gui-util.c \
- eab-gui-util.h \
- eab-popup-control.c \
- eab-popup-control.h \
- eab-vcard-control.c \
- eab-vcard-control.h \
- e-minicard.c \
- e-minicard.h \
- e-minicard-label.c \
- e-minicard-label.h \
- e-minicard-view.c \
- e-minicard-view.h \
- e-minicard-view-widget.c \
- e-minicard-view-widget.h \
- 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-view.c \
- e-addressbook-view.h \
- gal-view-minicard.c \
- gal-view-minicard.h \
- gal-view-factory-minicard.c \
- gal-view-factory-minicard.h
-
-#TREEVIEW_SOURCES= e-addressbook-treeview-adapter.c \
-# e-addressbook-treeview-adapter.h \
-# gal-view-factory-treeview.c \
-# gal-view-factory-treeview.h \
-# gal-view-treeview.c \
-# gal-view-treeview.h
-
-MARSHAL_GENERATED = eab-marshal.c eab-marshal.h
-@EVO_MARSHAL_RULE@
-
-BUILT_SOURCES = $(CORBA_SOURCE) $(MARSHAL_GENERATED)
-CLEANFILES = $(BUILT_SOURCES)
-
-dist-hook:
- cd $(distdir); rm -f $(BUILT_SOURCES)
-
-etspec_DATA= e-addressbook-view.etspec
-
-EXTRA_DIST = \
- $(etspec_DATA) \
- eab-marshal.list
diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c
deleted file mode 100644
index 992b42b852..0000000000
--- a/addressbook/gui/widgets/e-addressbook-model.c
+++ /dev/null
@@ -1,693 +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 "eab-marshal.h"
-#include "e-addressbook-model.h"
-#include <libxml/tree.h>
-#include <libxml/parser.h>
-#include <libxml/xmlmemory.h>
-#include <gnome.h>
-#include <gal/widgets/e-gui-utils.h>
-#include "eab-gui-util.h"
-
-#define PARENT_TYPE G_TYPE_OBJECT
-static GObjectClass *parent_class;
-
-/*
- * EABModel callbacks
- * These are the callbacks that define the behavior of our custom model.
- */
-static void eab_model_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
-static void eab_model_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
-
-
-enum {
- PROP_0,
- PROP_BOOK,
- PROP_QUERY,
- PROP_EDITABLE,
-};
-
-enum {
- WRITABLE_STATUS,
- STATUS_MESSAGE,
- SEARCH_STARTED,
- SEARCH_RESULT,
- FOLDER_BAR_MESSAGE,
- CONTACT_ADDED,
- CONTACT_REMOVED,
- CONTACT_CHANGED,
- MODEL_CHANGED,
- STOP_STATE_CHANGED,
- BACKEND_DIED,
- LAST_SIGNAL
-};
-
-static guint eab_model_signals [LAST_SIGNAL] = {0, };
-
-static void
-free_data (EABModel *model)
-{
- if (model->data) {
- int i;
-
- for ( i = 0; i < model->data_count; i++ ) {
- g_object_unref (model->data[i]);
- }
-
- g_free(model->data);
- model->data = NULL;
- model->data_count = 0;
- model->allocated_count = 0;
- }
-}
-
-static void
-remove_book_view(EABModel *model)
-{
- if (model->book_view && model->create_contact_id)
- g_signal_handler_disconnect (model->book_view,
- model->create_contact_id);
- if (model->book_view && model->remove_contact_id)
- g_signal_handler_disconnect (model->book_view,
- model->remove_contact_id);
- if (model->book_view && model->modify_contact_id)
- g_signal_handler_disconnect (model->book_view,
- model->modify_contact_id);
- if (model->book_view && model->status_message_id)
- g_signal_handler_disconnect (model->book_view,
- model->status_message_id);
- if (model->book_view && model->sequence_complete_id)
- g_signal_handler_disconnect (model->book_view,
- model->sequence_complete_id);
-
- model->create_contact_id = 0;
- model->remove_contact_id = 0;
- model->modify_contact_id = 0;
- model->status_message_id = 0;
- model->sequence_complete_id = 0;
-
- model->search_in_progress = FALSE;
-
- if (model->book_view) {
- e_book_view_stop (model->book_view);
- g_object_unref (model->book_view);
- model->book_view = NULL;
- }
-}
-
-static void
-addressbook_dispose(GObject *object)
-{
- EABModel *model = EAB_MODEL(object);
-
- remove_book_view(model);
- free_data (model);
-
- if (model->book) {
- if (model->writable_status_id)
- g_signal_handler_disconnect (model->book,
- model->writable_status_id);
- model->writable_status_id = 0;
-
- if (model->backend_died_id)
- g_signal_handler_disconnect (model->book,
- model->backend_died_id);
- model->backend_died_id = 0;
-
- g_object_unref (model->book);
- model->book = NULL;
- }
-
- if (model->query) {
- e_book_query_unref (model->query);
- model->query = NULL;
- }
-
- if (G_OBJECT_CLASS(parent_class)->dispose)
- G_OBJECT_CLASS(parent_class)->dispose(object);
-}
-
-static void
-update_folder_bar_message (EABModel *model)
-{
- int count;
- char *message;
-
- count = model->data_count;
-
- switch (count) {
- case 0:
- message = g_strdup (_("No contacts"));
- break;
- case 1:
- message = g_strdup (_("1 contact"));
- break;
- default:
- message = g_strdup_printf (_("%d contacts"), count);
- break;
- }
-
- g_signal_emit (model,
- eab_model_signals [FOLDER_BAR_MESSAGE], 0,
- message);
-
- g_free (message);
-}
-
-static void
-create_contact(EBookView *book_view,
- const GList *contacts,
- EABModel *model)
-{
- int old_count = model->data_count;
- int length = g_list_length ((GList *)contacts);
-
- if (model->data_count + length > model->allocated_count) {
- while (model->data_count + length > model->allocated_count)
- model->allocated_count = model->allocated_count * 2 + 1;
- model->data = g_renew(EContact *, model->data, model->allocated_count);
- }
-
- for ( ; contacts; contacts = contacts->next) {
- model->data[model->data_count++] = contacts->data;
- g_object_ref (contacts->data);
- }
-
- g_signal_emit (model,
- eab_model_signals [CONTACT_ADDED], 0,
- old_count, model->data_count - old_count);
-
- update_folder_bar_message (model);
-}
-
-static void
-remove_contact(EBookView *book_view,
- GList *ids,
- EABModel *model)
-{
- /* XXX we should keep a hash around instead of this O(n*m) loop */
- int i = 0;
- GList *l;
-
- for (l = ids; l; l = l->next) {
- char *id = l->data;
- for ( i = 0; i < model->data_count; i++) {
- if ( !strcmp(e_contact_get_const (model->data[i], E_CONTACT_UID), id) ) {
- g_object_unref (model->data[i]);
- memmove(model->data + i, model->data + i + 1, (model->data_count - i - 1) * sizeof (EContact *));
- model->data_count--;
-
- g_signal_emit (model,
- eab_model_signals [CONTACT_REMOVED], 0,
- i);
-
- break;
- }
- }
- }
-
- update_folder_bar_message (model);
-}
-
-static void
-modify_contact(EBookView *book_view,
- const GList *contacts,
- EABModel *model)
-{
- for ( ; contacts; contacts = contacts->next) {
- int i;
- for ( i = 0; i < model->data_count; i++) {
- if ( !strcmp(e_contact_get_const(model->data[i], E_CONTACT_UID),
- e_contact_get_const(E_CONTACT(contacts->data), E_CONTACT_UID)) ) {
- g_object_unref (model->data[i]);
- model->data[i] = e_contact_duplicate(E_CONTACT(contacts->data));
- g_signal_emit (model,
- eab_model_signals [CONTACT_CHANGED], 0,
- i);
- break;
- }
- }
- }
-}
-
-static void
-status_message (EBookView *book_view,
- char* status,
- EABModel *model)
-{
- g_signal_emit (model,
- eab_model_signals [STATUS_MESSAGE], 0,
- status);
-}
-
-static void
-sequence_complete (EBookView *book_view,
- EBookViewStatus status,
- EABModel *model)
-{
- model->search_in_progress = FALSE;
- status_message (book_view, NULL, model);
- g_signal_emit (model,
- eab_model_signals [SEARCH_RESULT], 0,
- status);
- g_signal_emit (model,
- eab_model_signals [STOP_STATE_CHANGED], 0);
-}
-
-static void
-writable_status (EBook *book,
- gboolean writable,
- EABModel *model)
-{
- if (!model->editable_set) {
- model->editable = writable;
-
- g_signal_emit (model,
- eab_model_signals [WRITABLE_STATUS], 0,
- writable);
- }
-}
-
-static void
-backend_died (EBook *book,
- EABModel *model)
-{
- g_signal_emit (model,
- eab_model_signals [BACKEND_DIED], 0);
-}
-
-static void
-eab_model_class_init (GObjectClass *object_class)
-{
- parent_class = g_type_class_ref (PARENT_TYPE);
-
- object_class->dispose = addressbook_dispose;
- object_class->set_property = eab_model_set_property;
- object_class->get_property = eab_model_get_property;
-
- g_object_class_install_property (object_class, PROP_BOOK,
- g_param_spec_object ("book",
- _("Book"),
- /*_( */"XXX blurb" /*)*/,
- E_TYPE_BOOK,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_QUERY,
- g_param_spec_string ("query",
- _("Query"),
- /*_( */"XXX blurb" /*)*/,
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_EDITABLE,
- g_param_spec_boolean ("editable",
- _("Editable"),
- /*_( */"XXX blurb" /*)*/,
- FALSE,
- G_PARAM_READWRITE));
-
- eab_model_signals [WRITABLE_STATUS] =
- g_signal_new ("writable_status",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EABModelClass, writable_status),
- NULL, NULL,
- eab_marshal_NONE__BOOL,
- G_TYPE_NONE,
- 1, G_TYPE_BOOLEAN);
-
- eab_model_signals [STATUS_MESSAGE] =
- g_signal_new ("status_message",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EABModelClass, status_message),
- NULL, NULL,
- eab_marshal_NONE__POINTER,
- G_TYPE_NONE,
- 1, G_TYPE_POINTER);
-
- eab_model_signals [SEARCH_STARTED] =
- g_signal_new ("search_started",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EABModelClass, search_started),
- NULL, NULL,
- eab_marshal_NONE__NONE,
- G_TYPE_NONE, 0);
-
- eab_model_signals [SEARCH_RESULT] =
- g_signal_new ("search_result",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EABModelClass, search_result),
- NULL, NULL,
- eab_marshal_NONE__INT,
- G_TYPE_NONE, 1, G_TYPE_INT);
-
- eab_model_signals [FOLDER_BAR_MESSAGE] =
- g_signal_new ("folder_bar_message",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EABModelClass, folder_bar_message),
- NULL, NULL,
- eab_marshal_NONE__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
-
- eab_model_signals [CONTACT_ADDED] =
- g_signal_new ("contact_added",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EABModelClass, contact_added),
- NULL, NULL,
- eab_marshal_NONE__INT_INT,
- G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT);
-
- eab_model_signals [CONTACT_REMOVED] =
- g_signal_new ("contact_removed",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EABModelClass, contact_removed),
- NULL, NULL,
- eab_marshal_NONE__INT,
- G_TYPE_NONE, 1, G_TYPE_INT);
-
- eab_model_signals [CONTACT_CHANGED] =
- g_signal_new ("contact_changed",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EABModelClass, contact_changed),
- NULL, NULL,
- eab_marshal_NONE__INT,
- G_TYPE_NONE, 1, G_TYPE_INT);
-
- eab_model_signals [MODEL_CHANGED] =
- g_signal_new ("model_changed",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EABModelClass, model_changed),
- NULL, NULL,
- eab_marshal_NONE__NONE,
- G_TYPE_NONE, 0);
-
- eab_model_signals [STOP_STATE_CHANGED] =
- g_signal_new ("stop_state_changed",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EABModelClass, stop_state_changed),
- NULL, NULL,
- eab_marshal_NONE__NONE,
- G_TYPE_NONE, 0);
-
- eab_model_signals [BACKEND_DIED] =
- g_signal_new ("backend_died",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EABModelClass, backend_died),
- NULL, NULL,
- eab_marshal_NONE__NONE,
- G_TYPE_NONE, 0);
-}
-
-static void
-eab_model_init (GObject *object)
-{
- EABModel *model = EAB_MODEL(object);
- model->book = NULL;
- model->query = e_book_query_any_field_contains ("");
- model->book_view = NULL;
- model->create_contact_id = 0;
- model->remove_contact_id = 0;
- model->modify_contact_id = 0;
- model->status_message_id = 0;
- model->writable_status_id = 0;
- model->backend_died_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)
-{
- EABModel *model = closure;
-
- if (status != E_BOOK_ERROR_OK) {
- eab_error_dialog (_("Error getting book view"), status);
- return;
- }
-
- remove_book_view (model);
- free_data (model);
-
- model->book_view = book_view;
- if (model->book_view)
- g_object_ref (model->book_view);
- model->create_contact_id = g_signal_connect(model->book_view,
- "contacts_added",
- G_CALLBACK (create_contact),
- model);
- model->remove_contact_id = g_signal_connect(model->book_view,
- "contacts_removed",
- G_CALLBACK (remove_contact),
- model);
- model->modify_contact_id = g_signal_connect(model->book_view,
- "contacts_changed",
- G_CALLBACK(modify_contact),
- model);
- model->status_message_id = g_signal_connect(model->book_view,
- "status_message",
- G_CALLBACK(status_message),
- model);
- model->sequence_complete_id = g_signal_connect(model->book_view,
- "sequence_complete",
- G_CALLBACK(sequence_complete),
- model);
-
- model->search_in_progress = TRUE;
- g_signal_emit (model,
- eab_model_signals [MODEL_CHANGED], 0);
- g_signal_emit (model,
- eab_model_signals [SEARCH_STARTED], 0);
- g_signal_emit (model,
- eab_model_signals [STOP_STATE_CHANGED], 0);
-
- e_book_view_start (model->book_view);
-}
-
-static void
-get_view (EABModel *model)
-{
- gboolean success;
-
- if (model->book && model->query) {
- char *query_string = e_book_query_to_string (model->query);
-
- remove_book_view(model);
- free_data (model);
-
- if (model->first_get_view) {
- model->first_get_view = FALSE;
-
- if (e_book_check_static_capability (model->book, "do-initial-query")) {
- success = e_book_async_get_book_view (model->book, query_string, book_view_loaded, model);
- } else {
- g_signal_emit (model,
- eab_model_signals [MODEL_CHANGED], 0);
- g_signal_emit (model,
- eab_model_signals [STOP_STATE_CHANGED], 0);
- g_free (query_string);
- return;
- }
- }
- else
- success = e_book_async_get_book_view (model->book, query_string, book_view_loaded, model);
-
- g_free (query_string);
- }
-}
-
-EContact *
-eab_model_get_contact(EABModel *model,
- int row)
-{
- if (model->data && 0 <= row && row < model->data_count) {
- return e_contact_duplicate (model->data[row]);
- }
- return NULL;
-}
-
-static void
-eab_model_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
-{
- EABModel *model;
-
- model = EAB_MODEL (object);
-
- switch (prop_id){
- case PROP_BOOK:
- if (model->book) {
- if (model->writable_status_id)
- g_signal_handler_disconnect (model->book,
- model->writable_status_id);
- model->writable_status_id = 0;
-
- if (model->backend_died_id)
- g_signal_handler_disconnect (model->book,
- model->backend_died_id);
- model->backend_died_id = 0;
-
- g_object_unref (model->book);
- }
- model->book = E_BOOK(g_value_get_object (value));
- if (model->book) {
- if (!model->editable_set) {
- model->editable = e_book_is_writable (model->book);
-
- g_signal_emit (model,
- eab_model_signals [WRITABLE_STATUS], 0,
- model->editable);
- }
- model->first_get_view = TRUE;
- g_object_ref (model->book);
- get_view (model);
- g_signal_connect (model->book,
- "writable_status",
- G_CALLBACK (writable_status), model);
- g_signal_connect (model->book,
- "backend_died",
- G_CALLBACK (backend_died), model);
- }
- break;
- case PROP_QUERY:
- if (model->query)
- e_book_query_unref (model->query);
- model->query = e_book_query_from_string (g_value_get_string (value));
- get_view (model);
- break;
- case PROP_EDITABLE:
- model->editable = g_value_get_boolean (value);
- model->editable_set = TRUE;
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-eab_model_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
-{
- EABModel *eab_model;
-
- eab_model = EAB_MODEL (object);
-
- switch (prop_id) {
- case PROP_BOOK:
- g_value_set_object (value, eab_model->book);
- break;
- case PROP_QUERY: {
- char *query_string = e_book_query_to_string (eab_model->query);
- g_value_set_string (value, query_string);
- break;
- }
- case PROP_EDITABLE:
- g_value_set_boolean (value, eab_model->editable);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-GType
-eab_model_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (EABModelClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) eab_model_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EABModel),
- 0, /* n_preallocs */
- (GInstanceInitFunc) eab_model_init,
- };
-
- type = g_type_register_static (PARENT_TYPE, "EABModel", &info, 0);
- }
-
- return type;
-}
-
-EABModel*
-eab_model_new (void)
-{
- EABModel *et;
-
- et = g_object_new (EAB_TYPE_MODEL, NULL);
-
- return et;
-}
-
-void eab_model_stop (EABModel *model)
-{
- remove_book_view(model);
- g_signal_emit (model,
- eab_model_signals [STOP_STATE_CHANGED], 0);
- g_signal_emit (model,
- eab_model_signals [STATUS_MESSAGE], 0,
- "Search Interrupted.");
-}
-
-gboolean
-eab_model_can_stop (EABModel *model)
-{
- return model->search_in_progress;
-}
-
-void
-eab_model_force_folder_bar_message (EABModel *model)
-{
- update_folder_bar_message (model);
-}
-
-int
-eab_model_contact_count (EABModel *model)
-{
- return model->data_count;
-}
-
-const EContact *
-eab_model_contact_at (EABModel *model, int index)
-{
- return model->data[index];
-}
-
-gboolean
-eab_model_editable (EABModel *model)
-{
- return model->editable;
-}
-
-EBook *
-eab_model_get_ebook (EABModel *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 64ce6c3845..0000000000
--- a/addressbook/gui/widgets/e-addressbook-model.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-#ifndef _EAB_MODEL_H_
-#define _EAB_MODEL_H_
-
-#include <glib.h>
-#include <glib-object.h>
-#include <libebook/e-book-async.h>
-#include <libebook/e-book-view.h>
-
-#define EAB_TYPE_MODEL (eab_model_get_type ())
-#define EAB_MODEL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EAB_TYPE_MODEL, EABModel))
-#define EAB_MODEL_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), EAB_TYPE_MODEL, EABModelClass))
-#define E_IS_ADDRESSBOOK_MODEL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EAB_TYPE_MODEL))
-#define E_IS_ADDRESSBOOK_MODEL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EAB_TYPE_MODEL))
-
-typedef struct _EABModel EABModel;
-typedef struct _EABModelClass EABModelClass;
-
-struct _EABModel {
- GObject parent;
-
- /* item specific fields */
- EBook *book;
- EBookQuery *query;
- EBookView *book_view;
-
- EContact **data;
- int data_count;
- int allocated_count;
-
- int create_contact_id, remove_contact_id, modify_contact_id;
- int status_message_id, writable_status_id, sequence_complete_id;
- int backend_died_id;
-
- guint search_in_progress : 1;
- guint editable : 1;
- guint editable_set : 1;
- guint first_get_view : 1;
-};
-
-
-struct _EABModelClass {
- GObjectClass parent_class;
-
- /*
- * Signals
- */
- void (*writable_status) (EABModel *model, gboolean writable);
- void (*search_started) (EABModel *model);
- void (*search_result) (EABModel *model, EBookViewStatus status);
- void (*status_message) (EABModel *model, const gchar *message);
- void (*folder_bar_message) (EABModel *model, const gchar *message);
- void (*contact_added) (EABModel *model, gint index, gint count);
- void (*contact_removed) (EABModel *model, gint index);
- void (*contact_changed) (EABModel *model, gint index);
- void (*model_changed) (EABModel *model);
- void (*stop_state_changed) (EABModel *model);
- void (*backend_died) (EABModel *model);
-};
-
-
-GType eab_model_get_type (void);
-EABModel *eab_model_new (void);
-
-/* Returns object with ref count of 1. */
-EContact *eab_model_get_contact (EABModel *model,
- int row);
-EBook *eab_model_get_ebook (EABModel *model);
-
-void eab_model_stop (EABModel *model);
-gboolean eab_model_can_stop (EABModel *model);
-
-void eab_model_force_folder_bar_message (EABModel *model);
-
-int eab_model_contact_count (EABModel *model);
-const EContact *eab_model_contact_at (EABModel *model,
- int index);
-gboolean eab_model_editable (EABModel *model);
-
-#endif /* _EAB_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 cf1667fec5..0000000000
--- a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
+++ /dev/null
@@ -1,517 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-
-#include <config.h>
-#include <string.h>
-
-#include <libgnome/gnome-i18n.h>
-#include "eab-marshal.h"
-#include "e-addressbook-reflow-adapter.h"
-#include "e-addressbook-model.h"
-#include "e-addressbook-view.h"
-#include "eab-gui-util.h"
-
-#include "e-minicard.h"
-#include <gal/widgets/e-popup-menu.h>
-#include <gal/widgets/e-gui-utils.h>
-#include "addressbook/printing/e-contact-print.h"
-#include "addressbook/printing/e-contact-print-envelope.h"
-
-
-struct _EAddressbookReflowAdapterPrivate {
- EABModel *model;
-
- gboolean loading;
-
- int create_contact_id, remove_contact_id, modify_contact_id, model_changed_id;
- int search_started_id, search_result_id;
-};
-
-#define PARENT_TYPE e_reflow_model_get_type()
-static EReflowModel *parent_class;
-
-#define d(x)
-
-enum {
- PROP_0,
- PROP_BOOK,
- PROP_QUERY,
- PROP_EDITABLE,
- PROP_MODEL,
-};
-
-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;
-
- if (priv->model && priv->create_contact_id)
- g_signal_handler_disconnect (priv->model,
- priv->create_contact_id);
- if (priv->model && priv->remove_contact_id)
- g_signal_handler_disconnect (priv->model,
- priv->remove_contact_id);
- if (priv->model && priv->modify_contact_id)
- g_signal_handler_disconnect (priv->model,
- priv->modify_contact_id);
- if (priv->model && priv->model_changed_id)
- g_signal_handler_disconnect (priv->model,
- priv->model_changed_id);
- if (priv->model && priv->search_started_id)
- g_signal_handler_disconnect (priv->model,
- priv->search_started_id);
- if (priv->model && priv->search_result_id)
- g_signal_handler_disconnect (priv->model,
- priv->search_result_id);
-
- priv->create_contact_id = 0;
- priv->remove_contact_id = 0;
- priv->modify_contact_id = 0;
- priv->model_changed_id = 0;
- priv->search_started_id = 0;
- priv->search_result_id = 0;
-
- if (priv->model)
- g_object_unref (priv->model);
-
- priv->model = NULL;
-}
-
-
-static int
-text_height (PangoLayout *layout, const gchar *text)
-{
- int height;
-
- pango_layout_set_text (layout, text, -1);
-
- pango_layout_get_pixel_size (layout, NULL, &height);
-
- return height;
-}
-
-static void
-addressbook_dispose(GObject *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 eab_model_contact_count (priv->model);
-}
-
-/* This function returns the height of the minicontact in question */
-static int
-addressbook_height (EReflowModel *erm, int i, GnomeCanvasGroup *parent)
-{
- EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(erm);
- EAddressbookReflowAdapterPrivate *priv = adapter->priv;
- EContactField field;
- int count = 0;
- char *string;
- EContact *contact = (EContact*)eab_model_contact_at (priv->model, i);
- PangoLayout *layout = gtk_widget_create_pango_layout (GTK_WIDGET (GNOME_CANVAS_ITEM (parent)->canvas), "");
- int height;
-
- string = e_contact_get(contact, E_CONTACT_FILE_AS);
- height = text_height (layout, string ? string : "") + 10.0;
- g_free(string);
-
- for(field = E_CONTACT_FULL_NAME; field != E_CONTACT_LAST_SIMPLE_STRING && count < 5; field++) {
-
- if (field == E_CONTACT_FAMILY_NAME || field == E_CONTACT_GIVEN_NAME)
- continue;
-
- string = e_contact_get(contact, field);
- if (string && *string) {
- int this_height;
- int field_text_height;
-
- this_height = text_height (layout, e_contact_pretty_name(field));
-
- field_text_height = text_height (layout, string);
- if (this_height < field_text_height)
- this_height = field_text_height;
-
- this_height += 3;
-
- height += this_height;
- count ++;
- }
- g_free (string);
- }
- height += 2;
-
- g_object_unref (layout);
-
- return height;
-}
-
-static int
-addressbook_compare (EReflowModel *erm, int n1, int n2)
-{
- EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(erm);
- EAddressbookReflowAdapterPrivate *priv = adapter->priv;
- EContact *contact1, *contact2;
-
- if (priv->loading) {
- return n1-n2;
- }
- else {
- contact1 = (EContact*)eab_model_contact_at (priv->model, n1);
- contact2 = (EContact*)eab_model_contact_at (priv->model, n2);
-
- if (contact1 && contact2) {
- const char *file_as1, *file_as2;
- file_as1 = e_contact_get_const (contact1, E_CONTACT_FILE_AS);
- file_as2 = e_contact_get_const (contact2, E_CONTACT_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_contact_get_const (contact1, E_CONTACT_UID),
- e_contact_get_const (contact2, E_CONTACT_UID));
- }
- if (contact1)
- return -1;
- if (contact2)
- return 1;
- return 0;
- }
-}
-
-static int
-adapter_drag_begin (EMinicard *card, GdkEvent *event, EAddressbookReflowAdapter *adapter)
-{
- gint ret_val = 0;
-
- g_signal_emit (adapter,
- e_addressbook_reflow_adapter_signals[DRAG_BEGIN], 0,
- 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(),
- "contact", eab_model_contact_at (priv->model, i),
- "editable", eab_model_editable (priv->model),
- NULL);
-
-#if 0
- g_signal_connect (item, "selected",
- G_CALLBACK(card_selected), 0, emvm);
-#endif
-
- g_signal_connect (item, "drag_begin",
- G_CALLBACK(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,
- "contact", eab_model_contact_at (priv->model, i),
- NULL);
-}
-
-static void
-create_contact (EABModel *model,
- gint index, gint count,
- EAddressbookReflowAdapter *adapter)
-{
- e_reflow_model_items_inserted (E_REFLOW_MODEL (adapter),
- index,
- count);
-}
-
-static void
-remove_contact (EABModel *model,
- gint index,
- EAddressbookReflowAdapter *adapter)
-{
- e_reflow_model_item_removed (E_REFLOW_MODEL (adapter), index);
-}
-
-static void
-modify_contact (EABModel *model,
- gint index,
- EAddressbookReflowAdapter *adapter)
-{
- e_reflow_model_item_changed (E_REFLOW_MODEL (adapter), index);
-}
-
-static void
-model_changed (EABModel *model,
- EAddressbookReflowAdapter *adapter)
-{
- e_reflow_model_changed (E_REFLOW_MODEL (adapter));
-}
-
-static void
-search_started (EABModel *model,
- EAddressbookReflowAdapter *adapter)
-{
- EAddressbookReflowAdapterPrivate *priv = adapter->priv;
-
- priv->loading = TRUE;
-}
-
-static void
-search_result (EABModel *model,
- EBookViewStatus status,
- EAddressbookReflowAdapter *adapter)
-{
- EAddressbookReflowAdapterPrivate *priv = adapter->priv;
-
- priv->loading = FALSE;
-
- e_reflow_model_comparison_changed (E_REFLOW_MODEL (adapter));
-}
-
-static void
-addressbook_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
-{
- EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(object);
- EAddressbookReflowAdapterPrivate *priv = adapter->priv;
-
- switch (prop_id) {
- case PROP_BOOK:
- g_object_set (priv->model,
- "book", g_value_get_object (value),
- NULL);
- break;
- case PROP_QUERY:
- g_object_set (priv->model,
- "query", g_value_get_string (value),
- NULL);
- break;
- case PROP_EDITABLE:
- g_object_set (priv->model,
- "editable", g_value_get_boolean (value),
- NULL);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-addressbook_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
-{
- EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(object);
- EAddressbookReflowAdapterPrivate *priv = adapter->priv;
-
- switch (prop_id) {
- case PROP_BOOK: {
- g_object_get_property (G_OBJECT (priv->model),
- "book", value);
- break;
- }
- case PROP_QUERY: {
- g_object_get_property (G_OBJECT (priv->model),
- "query", value);
- break;
- }
- case PROP_EDITABLE: {
- g_object_get_property (G_OBJECT (priv->model),
- "editable", value);
- break;
- }
- case PROP_MODEL:
- g_value_set_object (value, priv->model);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-e_addressbook_reflow_adapter_class_init (GObjectClass *object_class)
-{
- EReflowModelClass *model_class = (EReflowModelClass *) object_class;
-
- parent_class = g_type_class_peek_parent (object_class);
-
- object_class->set_property = addressbook_set_property;
- object_class->get_property = addressbook_get_property;
- object_class->dispose = addressbook_dispose;
-
- g_object_class_install_property (object_class, PROP_BOOK,
- g_param_spec_object ("book",
- _("Book"),
- /*_( */"XXX blurb" /*)*/,
- E_TYPE_BOOK,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_QUERY,
- g_param_spec_string ("query",
- _("Query"),
- /*_( */"XXX blurb" /*)*/,
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_EDITABLE,
- g_param_spec_boolean ("editable",
- _("Editable"),
- /*_( */"XXX blurb" /*)*/,
- FALSE,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_MODEL,
- g_param_spec_object ("model",
- _("Model"),
- /*_( */"XXX blurb" /*)*/,
- EAB_TYPE_MODEL,
- G_PARAM_READABLE));
-
- e_addressbook_reflow_adapter_signals [DRAG_BEGIN] =
- g_signal_new ("drag_begin",
- G_OBJECT_CLASS_TYPE(object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EAddressbookReflowAdapterClass, drag_begin),
- NULL, NULL,
- eab_marshal_INT__POINTER,
- G_TYPE_INT, 1, G_TYPE_POINTER);
-
- 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->loading = FALSE;
- priv->create_contact_id = 0;
- priv->remove_contact_id = 0;
- priv->modify_contact_id = 0;
- priv->model_changed_id = 0;
- priv->search_started_id = 0;
- priv->search_result_id = 0;
-}
-
-GType
-e_addressbook_reflow_adapter_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (EAddressbookReflowAdapterClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) e_addressbook_reflow_adapter_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EAddressbookReflowAdapter),
- 0, /* n_preallocs */
- (GInstanceInitFunc) e_addressbook_reflow_adapter_init,
- };
-
- type = g_type_register_static (PARENT_TYPE, "EAddressbookReflowAdapter", &info, 0);
- }
-
- return type;
-}
-
-void
-e_addressbook_reflow_adapter_construct (EAddressbookReflowAdapter *adapter,
- EABModel *model)
-{
- EAddressbookReflowAdapterPrivate *priv = adapter->priv;
-
- priv->model = model;
- g_object_ref (priv->model);
-
- priv->create_contact_id = g_signal_connect(priv->model,
- "contact_added",
- G_CALLBACK(create_contact),
- adapter);
- priv->remove_contact_id = g_signal_connect(priv->model,
- "contact_removed",
- G_CALLBACK(remove_contact),
- adapter);
- priv->modify_contact_id = g_signal_connect(priv->model,
- "contact_changed",
- G_CALLBACK(modify_contact),
- adapter);
- priv->model_changed_id = g_signal_connect(priv->model,
- "model_changed",
- G_CALLBACK(model_changed),
- adapter);
- priv->search_started_id = g_signal_connect(priv->model,
- "search_started",
- G_CALLBACK(search_started),
- adapter);
- priv->search_result_id = g_signal_connect(priv->model,
- "search_result",
- G_CALLBACK(search_result),
- adapter);
-}
-
-EReflowModel *
-e_addressbook_reflow_adapter_new (EABModel *model)
-{
- EAddressbookReflowAdapter *et;
-
- et = g_object_new (E_TYPE_ADDRESSBOOK_REFLOW_ADAPTER, NULL);
-
- e_addressbook_reflow_adapter_construct (et, model);
-
- return E_REFLOW_MODEL(et);
-}
-
-
-EContact *
-e_addressbook_reflow_adapter_get_contact (EAddressbookReflowAdapter *adapter,
- int index)
-{
- EAddressbookReflowAdapterPrivate *priv = adapter->priv;
-
- return eab_model_get_contact (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 1321b27bb4..0000000000
--- a/addressbook/gui/widgets/e-addressbook-reflow-adapter.h
+++ /dev/null
@@ -1,44 +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 <libebook/e-contact.h>
-#include "e-addressbook-model.h"
-
-#define E_TYPE_ADDRESSBOOK_REFLOW_ADAPTER (e_addressbook_reflow_adapter_get_type ())
-#define E_ADDRESSBOOK_REFLOW_ADAPTER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_TYPE_ADDRESSBOOK_REFLOW_ADAPTER, EAddressbookReflowAdapter))
-#define E_ADDRESSBOOK_REFLOW_ADAPTER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), E_TYPE_ADDRESSBOOK_REFLOW_ADAPTER, EAddressbookReflowAdapterClass))
-#define E_IS_ADDRESSBOOK_REFLOW_ADAPTER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_TYPE_ADDRESSBOOK_REFLOW_ADAPTER))
-#define E_IS_ADDRESSBOOK_REFLOW_ADAPTER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_TYPE_ADDRESSBOOK_REFLOW_ADAPTER))
-
-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);
-};
-
-
-GType e_addressbook_reflow_adapter_get_type (void);
-void e_addressbook_reflow_adapter_construct (EAddressbookReflowAdapter *adapter,
- EABModel *model);
-EReflowModel *e_addressbook_reflow_adapter_new (EABModel *model);
-
-/* Returns object with ref count of 1. */
-EContact *e_addressbook_reflow_adapter_get_contact (EAddressbookReflowAdapter *adapter,
- int index);
-#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 9fa48084ed..0000000000
--- a/addressbook/gui/widgets/e-addressbook-table-adapter.c
+++ /dev/null
@@ -1,356 +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 "eab-contact-merging.h"
-#include "eab-gui-util.h"
-#include "util/eab-destination.h"
-#include <libxml/tree.h>
-#include <libxml/parser.h>
-#include <libxml/xmlmemory.h>
-#include <gnome.h>
-
-struct _EAddressbookTableAdapterPrivate {
- EABModel *model;
-
- int create_contact_id, remove_contact_id, modify_contact_id, model_changed_id;
-};
-
-#define PARENT_TYPE e_table_model_get_type()
-static ETableModelClass *parent_class;
-
-#define COLS (E_CONTACT_FIELD_LAST)
-
-static void
-unlink_model(EAddressbookTableAdapter *adapter)
-{
- EAddressbookTableAdapterPrivate *priv = adapter->priv;
-
- g_signal_handler_disconnect (priv->model,
- priv->create_contact_id);
- g_signal_handler_disconnect (priv->model,
- priv->remove_contact_id);
- g_signal_handler_disconnect (priv->model,
- priv->modify_contact_id);
- g_signal_handler_disconnect (priv->model,
- priv->model_changed_id);
-
- priv->create_contact_id = 0;
- priv->remove_contact_id = 0;
- priv->modify_contact_id = 0;
- priv->model_changed_id = 0;
-
- g_object_unref (priv->model);
-
- priv->model = NULL;
-}
-
-static void
-addressbook_dispose(GObject *object)
-{
- EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER(object);
-
- if (adapter->priv) {
- unlink_model(adapter);
-
- g_free (adapter->priv);
- adapter->priv = NULL;
- }
-
- if (G_OBJECT_CLASS (parent_class)->dispose)
- (* G_OBJECT_CLASS (parent_class)->dispose) (object);
-}
-
-/* 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 = EAB_TABLE_ADAPTER(etc);
- EAddressbookTableAdapterPrivate *priv = adapter->priv;
-
- return eab_model_contact_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 = EAB_TABLE_ADAPTER(etc);
- EAddressbookTableAdapterPrivate *priv = adapter->priv;
- const char *value;
-
- if ( col >= COLS || row >= eab_model_contact_count (priv->model) )
- return NULL;
-
- value = e_contact_get_const((EContact*)eab_model_contact_at (priv->model, row), col);
-
- if (value && !strncmp (value, "<?xml", 5)) {
- EABDestination *dest = eab_destination_import (value);
- if (dest) {
- /* XXX blech, we leak this */
- value = g_strdup (eab_destination_get_textrep (dest, TRUE));
- g_object_unref (dest);
- }
- }
-
-
- return (void *)(value ? value : "");
-}
-
-/* This function sets the value at a particular point in our ETableModel. */
-static void
-contact_modified_cb (EBook* book, EBookStatus status,
- gpointer user_data)
-{
- if (status != E_BOOK_ERROR_OK)
- eab_error_dialog (_("Error modifying card"), status);
-}
-
-static void
-addressbook_set_value_at (ETableModel *etc, int col, int row, const void *val)
-{
- EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER(etc);
- EAddressbookTableAdapterPrivate *priv = adapter->priv;
-
- if (eab_model_editable (priv->model)) {
- EContact *contact;
-
- if (col >= COLS || row >= eab_model_contact_count (priv->model))
- return;
-
- contact = eab_model_get_contact (priv->model, row);
- if (!contact)
- return;
-
- e_table_model_pre_change(etc);
-
- e_contact_set(contact, col, (void *) val);
- eab_merging_book_commit_contact (eab_model_get_ebook (priv->model),
- contact, contact_modified_cb, NULL);
-
- g_object_unref (contact);
-
- /* XXX do we need this? shouldn't the commit_contact 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 = EAB_TABLE_ADAPTER(etc);
- EAddressbookTableAdapterPrivate *priv = adapter->priv;
- const EContact *contact;
-
- if (row >= 0 && row < eab_model_contact_count (priv->model))
- contact = eab_model_contact_at (priv->model, row);
- else
- contact = NULL;
-
- if (!eab_model_editable(priv->model))
- return FALSE;
- else if (contact && e_contact_get ((EContact *) contact, E_CONTACT_IS_LIST))
- /* we only allow editing of the name and file as for
- lists */
- return col == E_CONTACT_FULL_NAME || col == E_CONTACT_FILE_AS;
- else
- return col < E_CONTACT_LAST_SIMPLE_STRING;
-
- return FALSE;
-}
-
-static void
-addressbook_append_row (ETableModel *etm, ETableModel *source, gint row)
-{
- EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER(etm);
- EAddressbookTableAdapterPrivate *priv = adapter->priv;
- EContact *contact;
- int col;
-
- contact = e_contact_new ();
-
- for (col = 1; col < E_CONTACT_LAST_SIMPLE_STRING; col++) {
- const void *val = e_table_model_value_at (source, col, row);
- e_contact_set (contact, col, (void *) val);
- }
-
- eab_merging_book_add_contact (eab_model_get_ebook (priv->model), contact, NULL, NULL);
-
- g_object_unref (contact);
-}
-
-/* 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
-eab_table_adapter_class_init (GObjectClass *object_class)
-{
- ETableModelClass *model_class = (ETableModelClass *) object_class;
-
- parent_class = g_type_class_peek_parent (object_class);
-
- object_class->dispose = addressbook_dispose;
-
- 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
-eab_table_adapter_init (GObject *object)
-{
- EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER(object);
- EAddressbookTableAdapterPrivate *priv;
-
- priv = adapter->priv = g_new0 (EAddressbookTableAdapterPrivate, 1);
-
- priv->create_contact_id = 0;
- priv->remove_contact_id = 0;
- priv->modify_contact_id = 0;
- priv->model_changed_id = 0;
-}
-
-
-static void
-create_contact (EABModel *model,
- gint index, gint count,
- EAddressbookTableAdapter *adapter)
-{
- e_table_model_pre_change (E_TABLE_MODEL (adapter));
- e_table_model_rows_inserted (E_TABLE_MODEL (adapter), index, count);
-}
-
-static void
-remove_contact (EABModel *model,
- gint index,
- EAddressbookTableAdapter *adapter)
-{
- e_table_model_pre_change (E_TABLE_MODEL (adapter));
- e_table_model_rows_deleted (E_TABLE_MODEL (adapter), index, 1);
-}
-
-static void
-modify_contact (EABModel *model,
- gint index,
- EAddressbookTableAdapter *adapter)
-{
- e_table_model_pre_change (E_TABLE_MODEL (adapter));
- e_table_model_row_changed (E_TABLE_MODEL (adapter), index);
-}
-
-static void
-model_changed (EABModel *model,
- EAddressbookTableAdapter *adapter)
-{
- e_table_model_pre_change (E_TABLE_MODEL (adapter));
- e_table_model_changed (E_TABLE_MODEL (adapter));
-}
-
-GType
-eab_table_adapter_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (EAddressbookTableAdapterClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) eab_table_adapter_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EAddressbookTableAdapter),
- 0, /* n_preallocs */
- (GInstanceInitFunc) eab_table_adapter_init,
- };
-
- type = g_type_register_static (PARENT_TYPE, "EAddressbookTableAdapter", &info, 0);
- }
-
- return type;
-}
-
-void
-eab_table_adapter_construct (EAddressbookTableAdapter *adapter,
- EABModel *model)
-{
- EAddressbookTableAdapterPrivate *priv = adapter->priv;
-
- priv->model = model;
- g_object_ref (priv->model);
-
- priv->create_contact_id = g_signal_connect(priv->model,
- "contact_added",
- G_CALLBACK(create_contact),
- adapter);
- priv->remove_contact_id = g_signal_connect(priv->model,
- "contact_removed",
- G_CALLBACK(remove_contact),
- adapter);
- priv->modify_contact_id = g_signal_connect(priv->model,
- "contact_changed",
- G_CALLBACK(modify_contact),
- adapter);
- priv->model_changed_id = g_signal_connect(priv->model,
- "model_changed",
- G_CALLBACK(model_changed),
- adapter);
-}
-
-ETableModel *
-eab_table_adapter_new (EABModel *model)
-{
- EAddressbookTableAdapter *et;
-
- et = g_object_new(E_TYPE_AB_TABLE_ADAPTER, NULL);
-
- eab_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 cf139e2bee..0000000000
--- a/addressbook/gui/widgets/e-addressbook-table-adapter.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-#ifndef _EAB_TABLE_ADAPTER_H_
-#define _EAB_TABLE_ADAPTER_H_
-
-#include <gal/e-table/e-table-model.h>
-#include <libebook/e-book.h>
-#include <libebook/e-book-view.h>
-
-#define E_TYPE_AB_TABLE_ADAPTER (eab_table_adapter_get_type ())
-#define EAB_TABLE_ADAPTER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_TYPE_AB_TABLE_ADAPTER, EAddressbookTableAdapter))
-#define EAB_TABLE_ADAPTER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), E_TYPE_AB_TABLE_ADAPTER, EAddressbookTableAdapterClass))
-#define E_IS_ADDRESSBOOK_TABLE_ADAPTER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_TYPE_AB_TABLE_ADAPTER))
-#define E_IS_ADDRESSBOOK_TABLE_ADAPTER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_TYPE_AB_TABLE_ADAPTER))
-
-typedef struct _EAddressbookTableAdapter EAddressbookTableAdapter;
-typedef struct _EAddressbookTableAdapterPrivate EAddressbookTableAdapterPrivate;
-typedef struct _EAddressbookTableAdapterClass EAddressbookTableAdapterClass;
-
-struct _EAddressbookTableAdapter {
- ETableModel parent;
-
- EAddressbookTableAdapterPrivate *priv;
-};
-
-
-struct _EAddressbookTableAdapterClass {
- ETableModelClass parent_class;
-};
-
-
-GType eab_table_adapter_get_type (void);
-void eab_table_adapter_construct (EAddressbookTableAdapter *adapter,
- EABModel *model);
-ETableModel *eab_table_adapter_new (EABModel *model);
-
-#endif /* _EAB_TABLE_ADAPTER_H_ */
diff --git a/addressbook/gui/widgets/e-addressbook-treeview-adapter.c b/addressbook/gui/widgets/e-addressbook-treeview-adapter.c
deleted file mode 100644
index 592f9d2b03..0000000000
--- a/addressbook/gui/widgets/e-addressbook-treeview-adapter.c
+++ /dev/null
@@ -1,630 +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-treeview-adapter.h"
-#include "e-card-merging.h"
-#include "eab-gui-util.h"
-#include <gtk/gtktreednd.h>
-#include <libxml/tree.h>
-#include <libxml/parser.h>
-#include <libxml/xmlmemory.h>
-
-struct _EAddressbookTreeViewAdapterPrivate {
- EAddressbookModel *model;
-
- gint stamp;
-
- ECardSimple **simples;
- int count;
-
- int create_card_id, remove_card_id, modify_card_id, model_changed_id;
-};
-
-#define PARENT_TYPE G_TYPE_OBJECT
-GObjectClass *parent_class;
-
-#define COLS (E_CARD_SIMPLE_FIELD_LAST)
-
-static void
-unlink_model(EAddressbookTreeViewAdapter *adapter)
-{
- EAddressbookTreeViewAdapterPrivate *priv = adapter->priv;
- int i;
-
- g_signal_handler_disconnect (priv->model,
- priv->create_card_id);
- g_signal_handler_disconnect (priv->model,
- priv->remove_card_id);
- g_signal_handler_disconnect (priv->model,
- priv->modify_card_id);
- g_signal_handler_disconnect (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 ++)
- g_object_unref (priv->simples[i]);
- g_free (priv->simples);
- priv->simples = NULL;
- }
-
- g_object_unref (priv->model);
-
- priv->model = NULL;
-}
-
-static void
-build_simple_mapping(EAddressbookTreeViewAdapter *adapter)
-{
- EAddressbookTreeViewAdapterPrivate *priv = adapter->priv;
- int i;
-
- /* free up the existing mapping if there is one */
- if (priv->simples) {
- for (i = 0; i < priv->count; i ++)
- g_object_unref (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));
- g_object_ref (priv->simples[i]);
- }
-}
-
-static void
-addressbook_destroy(GtkObject *object)
-{
- EAddressbookTreeViewAdapter *adapter = E_ADDRESSBOOK_TREEVIEW_ADAPTER(object);
-
- unlink_model(adapter);
-
- g_free (adapter->priv);
- adapter->priv = NULL;
-
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-#if 0
-static void
-addressbook_set_value_at (ETableModel *etc, int col, int row, const void *val)
-{
- EAddressbookTreeViewAdapter *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_table_model_pre_change(etc);
-
- e_card_simple_set(priv->simples[row],
- col,
- val);
- g_object_get(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);
- g_object_unref (simple);
- g_object_unref (card);
-}
-#endif
-
-static void
-e_addressbook_treeview_adapter_class_init (GtkObjectClass *object_class)
-{
- parent_class = g_type_class_peek_parent (object_class);
-
- object_class->destroy = addressbook_destroy;
-}
-
-static void
-e_addressbook_treeview_adapter_init (GtkObject *object)
-{
- EAddressbookTreeViewAdapter *adapter = E_ADDRESSBOOK_TREEVIEW_ADAPTER(object);
- EAddressbookTreeViewAdapterPrivate *priv;
-
- priv = adapter->priv = g_new0 (EAddressbookTreeViewAdapterPrivate, 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
-get_iter (EAddressbookTreeViewAdapter *adapter, gint index, GtkTreeIter *iter)
-{
- EAddressbookTreeViewAdapterPrivate *priv = adapter->priv;
-
- iter->stamp = priv->stamp;
- iter->user_data = GINT_TO_POINTER (index);
-}
-
-static void
-create_card (EAddressbookModel *model,
- gint index, gint count,
- EAddressbookTreeViewAdapter *adapter)
-{
- EAddressbookTreeViewAdapterPrivate *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 *));
-
- for (i = 0; i < count; i ++) {
- GtkTreeIter iter;
- GtkTreePath *path;
-
- priv->simples[index + i] = e_card_simple_new (e_addressbook_model_card_at (priv->model, index + i));
-
- get_iter (adapter, index + i, &iter);
- path = gtk_tree_model_get_path (GTK_TREE_MODEL (adapter), &iter);
-
- gtk_tree_model_row_inserted (GTK_TREE_MODEL (adapter), path, &iter);
- gtk_tree_model_row_changed (GTK_TREE_MODEL (adapter), path, &iter);
-
- gtk_tree_path_free (path);
- }
-}
-
-static void
-remove_card (EAddressbookModel *model,
- gint index,
- EAddressbookTreeViewAdapter *adapter)
-{
- EAddressbookTreeViewAdapterPrivate *priv = adapter->priv;
- GtkTreeIter iter;
- GtkTreePath *path;
-
- g_object_unref (priv->simples[index]);
- memmove (priv->simples + index, priv->simples + index + 1, (priv->count - index - 1) * sizeof (ECardSimple *));
- priv->count --;
- get_iter (adapter, index, &iter);
- path = gtk_tree_model_get_path (GTK_TREE_MODEL (adapter), &iter);
-
- gtk_tree_model_row_deleted (GTK_TREE_MODEL (adapter), path);
-
- gtk_tree_path_free (path);
-}
-
-static void
-modify_card (EAddressbookModel *model,
- gint index,
- EAddressbookTreeViewAdapter *adapter)
-{
- EAddressbookTreeViewAdapterPrivate *priv = adapter->priv;
- GtkTreeIter iter;
- GtkTreePath *path;
-
- g_object_unref (priv->simples[index]);
- priv->simples[index] = e_card_simple_new (e_addressbook_model_card_at (priv->model, index));
-
- get_iter (adapter, index, &iter);
- path = gtk_tree_model_get_path (GTK_TREE_MODEL (adapter), &iter);
-
- gtk_tree_model_row_changed (GTK_TREE_MODEL (adapter), path, &iter);
-
- gtk_tree_path_free (path);
-}
-
-static void
-model_changed (EAddressbookModel *model,
- EAddressbookTreeViewAdapter *adapter)
-{
- int i;
-
- /* there has *got* to be an easier/faster way to do this... */
- for (i = 0; i < adapter->priv->count; i++) {
- remove_card (model, i, adapter);
- }
-
- build_simple_mapping (adapter);
-
- if (adapter->priv->count) {
- printf ("AIIEEEEEE\n");
- }
-
- /* XXX this isn't right either, we need to add the new cards */
-}
-
-static GtkTreeModelFlags
-adapter_get_flags (GtkTreeModel *tree_model)
-{
- g_return_val_if_fail (E_IS_ADDRESSBOOK_TREEVIEW_ADAPTER (tree_model), 0);
-
- return GTK_TREE_MODEL_LIST_ONLY;
-}
-
-static gint
-adapter_get_n_columns (GtkTreeModel *tree_model)
-{
- g_return_val_if_fail (E_IS_ADDRESSBOOK_TREEVIEW_ADAPTER (tree_model), 0);
-
- return COLS;
-}
-
-static GType
-adapter_get_column_type (GtkTreeModel *tree_model,
- gint index)
-{
- g_return_val_if_fail (E_IS_ADDRESSBOOK_TREEVIEW_ADAPTER (tree_model), G_TYPE_INVALID);
- g_return_val_if_fail (index < COLS && index >= 0, G_TYPE_INVALID);
-
- return G_TYPE_STRING;
-}
-
-static gboolean
-adapter_get_iter (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- GtkTreePath *path)
-{
- EAddressbookTreeViewAdapter *adapter;
- GSList *list;
- gint i;
-
- g_return_val_if_fail (E_IS_ADDRESSBOOK_TREEVIEW_ADAPTER (tree_model), FALSE);
- g_return_val_if_fail (gtk_tree_path_get_depth (path) > 0, FALSE);
-
- adapter = E_ADDRESSBOOK_TREEVIEW_ADAPTER (tree_model);
-
- i = gtk_tree_path_get_indices (path)[0];
-
- if (i >= adapter->priv->count)
- return FALSE;
-
- iter->stamp = adapter->priv->stamp;
- iter->user_data = GINT_TO_POINTER (i);
-
- return TRUE;
-}
-
-static GtkTreePath *
-adapter_get_path (GtkTreeModel *tree_model,
- GtkTreeIter *iter)
-{
- EAddressbookTreeViewAdapter *adapter = E_ADDRESSBOOK_TREEVIEW_ADAPTER (tree_model);
- GtkTreePath *retval;
-
- g_return_val_if_fail (E_IS_ADDRESSBOOK_TREEVIEW_ADAPTER (tree_model), NULL);
- g_return_val_if_fail (iter->stamp == adapter->priv->stamp, NULL);
-
-
- if (GPOINTER_TO_INT (iter->user_data) >= adapter->priv->count)
- return NULL;
-
- retval = gtk_tree_path_new ();
- gtk_tree_path_append_index (retval, GPOINTER_TO_INT (iter->user_data));
- return retval;
-}
-
-static void
-adapter_get_value (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- gint column,
- GValue *value)
-{
- EAddressbookTreeViewAdapter *adapter = E_ADDRESSBOOK_TREEVIEW_ADAPTER (tree_model);
- ECardSimple *simple;
- gint tmp_column = column;
- const char *v;
-
- g_return_if_fail (E_IS_ADDRESSBOOK_TREEVIEW_ADAPTER (tree_model));
- g_return_if_fail (column < COLS);
- g_return_if_fail (adapter->priv->stamp == iter->stamp);
-
- simple = adapter->priv->simples [ GPOINTER_TO_INT (iter->user_data) ];
-
- v = e_card_simple_get_const(simple, column);
-
- if (v && !strncmp (v, "<?xml", 5)) {
- EABDestination *dest = eab_destination_import (v);
- if (dest) {
- /* XXX blech, we leak this */
- v = g_strdup (eab_destination_get_textrep (dest, TRUE));
- g_object_unref (dest);
- }
- }
-
- g_value_init (value, G_TYPE_STRING);
- g_value_set_string (value, (v ? v : ""));
-}
-
-static gboolean
-adapter_iter_next (GtkTreeModel *tree_model,
- GtkTreeIter *iter)
-{
- EAddressbookTreeViewAdapter *adapter;
-
- g_return_val_if_fail (E_IS_ADDRESSBOOK_TREEVIEW_ADAPTER (tree_model), FALSE);
- g_return_val_if_fail (E_ADDRESSBOOK_TREEVIEW_ADAPTER (tree_model)->priv->stamp == iter->stamp, FALSE);
-
- adapter = E_ADDRESSBOOK_TREEVIEW_ADAPTER (tree_model);
-
- iter->user_data = GINT_TO_POINTER (GPOINTER_TO_INT (iter->user_data) + 1);
-
- return (GPOINTER_TO_INT (iter->user_data) < adapter->priv->count);
-}
-
-static gboolean
-adapter_iter_children (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- GtkTreeIter *parent)
-{
- EAddressbookTreeViewAdapter *adapter = E_ADDRESSBOOK_TREEVIEW_ADAPTER (tree_model);
-
- /* this is a list, nodes have no children */
- if (parent)
- return FALSE;
-
- /* but if parent == NULL we return the list itself as children of the
- * "root"
- */
- if (adapter->priv->count) {
- iter->stamp = adapter->priv->stamp;
- iter->user_data = GINT_TO_POINTER (0);
- return TRUE;
- }
- else
- return FALSE;
-}
-
-static gboolean
-adapter_iter_has_child (GtkTreeModel *tree_model,
- GtkTreeIter *iter)
-{
- return FALSE;
-}
-
-static gint
-adapter_iter_n_children (GtkTreeModel *tree_model,
- GtkTreeIter *iter)
-{
- EAddressbookTreeViewAdapter *adapter = E_ADDRESSBOOK_TREEVIEW_ADAPTER (tree_model);
-
- g_return_val_if_fail (E_IS_ADDRESSBOOK_TREEVIEW_ADAPTER (tree_model), -1);
- if (iter == NULL)
- return adapter->priv->count;
-
- g_return_val_if_fail (adapter->priv->stamp == iter->stamp, -1);
- return 0;
-}
-
-static gboolean
-adapter_iter_nth_child (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- GtkTreeIter *parent,
- gint n)
-{
- EAddressbookTreeViewAdapter *adapter = E_ADDRESSBOOK_TREEVIEW_ADAPTER (tree_model);
-
- g_return_val_if_fail (E_IS_ADDRESSBOOK_TREEVIEW_ADAPTER (tree_model), FALSE);
-
- if (parent)
- return FALSE;
-
- if (n < adapter->priv->count) {
- iter->stamp = adapter->priv->stamp;
- iter->user_data = GINT_TO_POINTER (n);
- return TRUE;
- }
- else
- return FALSE;
-}
-
-static gboolean
-adapter_iter_parent (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- GtkTreeIter *child)
-{
- return FALSE;
-}
-
-static void
-adapter_tree_model_init (GtkTreeModelIface *iface)
-{
- iface->get_flags = adapter_get_flags;
- iface->get_n_columns = adapter_get_n_columns;
- iface->get_column_type = adapter_get_column_type;
- iface->get_iter = adapter_get_iter;
- iface->get_path = adapter_get_path;
- iface->get_value = adapter_get_value;
- iface->iter_next = adapter_iter_next;
- iface->iter_children = adapter_iter_children;
- iface->iter_has_child = adapter_iter_has_child;
- iface->iter_n_children = adapter_iter_n_children;
- iface->iter_nth_child = adapter_iter_nth_child;
- iface->iter_parent = adapter_iter_parent;
-}
-
-static gboolean
-adapter_drag_data_delete (GtkTreeDragSource *drag_source,
- GtkTreePath *path)
-{
- g_return_val_if_fail (E_IS_ADDRESSBOOK_TREEVIEW_ADAPTER (drag_source), FALSE);
-
- return FALSE;
-}
-
-static gboolean
-adapter_drag_data_get (GtkTreeDragSource *drag_source,
- GtkTreePath *path,
- GtkSelectionData *selection_data)
-{
- g_return_val_if_fail (E_IS_ADDRESSBOOK_TREEVIEW_ADAPTER (drag_source), FALSE);
-
- /* Note that we don't need to handle the GTK_TREE_MODEL_ROW
- * target, because the default handler does it for us, but
- * we do anyway for the convenience of someone maybe overriding the
- * default handler.
- */
-
- if (gtk_tree_set_row_drag_data (selection_data,
- GTK_TREE_MODEL (drag_source),
- path)) {
- return TRUE;
- }
- else {
- if (selection_data->target == gdk_atom_intern ("text/x-vcard", FALSE)) {
- printf ("HI THERE\n");
- }
- }
-
- return FALSE;
-}
-
-static void
-adapter_drag_source_init (GtkTreeDragSourceIface *iface)
-{
- iface->drag_data_delete = adapter_drag_data_delete;
- iface->drag_data_get = adapter_drag_data_get;
-}
-
-GType
-e_addressbook_treeview_adapter_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo adapter_info = {
- sizeof (EAddressbookTreeViewAdapterClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) e_addressbook_treeview_adapter_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EAddressbookTreeViewAdapter),
- 0, /* n_preallocs */
- (GInstanceInitFunc) e_addressbook_treeview_adapter_init,
- };
-
- static const GInterfaceInfo tree_model_info = {
- (GInterfaceInitFunc) adapter_tree_model_init,
- NULL,
- NULL
- };
-
- static const GInterfaceInfo drag_source_info = {
- (GInterfaceInitFunc) adapter_drag_source_init,
- NULL,
- NULL
- };
-
- type = g_type_register_static (PARENT_TYPE, "EAddressbookTreeViewAdapter", &adapter_info, 0);
-
- g_type_add_interface_static (type,
- GTK_TYPE_TREE_MODEL,
- &tree_model_info);
-
- g_type_add_interface_static (type,
- GTK_TYPE_TREE_DRAG_SOURCE,
- &drag_source_info);
- }
-
- return type;
-}
-
-void
-e_addressbook_treeview_adapter_construct (EAddressbookTreeViewAdapter *adapter,
- EAddressbookModel *model)
-{
- EAddressbookTreeViewAdapterPrivate *priv = adapter->priv;
-
- priv->model = model;
- g_object_ref (priv->model);
-
- priv->stamp = g_random_int ();
-
- priv->create_card_id = g_signal_connect(priv->model,
- "card_added",
- G_CALLBACK(create_card),
- adapter);
- priv->remove_card_id = g_signal_connect(priv->model,
- "card_removed",
- G_CALLBACK(remove_card),
- adapter);
- priv->modify_card_id = g_signal_connect(priv->model,
- "card_changed",
- G_CALLBACK(modify_card),
- adapter);
- priv->model_changed_id = g_signal_connect(priv->model,
- "model_changed",
- G_CALLBACK(model_changed),
- adapter);
-
- build_simple_mapping (adapter);
-}
-
-GtkTreeModel *
-e_addressbook_treeview_adapter_new (EAddressbookModel *model)
-{
- EAddressbookTreeViewAdapter *et;
-
- et = g_object_new(E_TYPE_ADDRESSBOOK_TREEVIEW_ADAPTER, NULL);
-
- e_addressbook_treeview_adapter_construct (et, model);
-
- return (GtkTreeModel*)et;
-}
diff --git a/addressbook/gui/widgets/e-addressbook-treeview-adapter.h b/addressbook/gui/widgets/e-addressbook-treeview-adapter.h
deleted file mode 100644
index 2c4370dee3..0000000000
--- a/addressbook/gui/widgets/e-addressbook-treeview-adapter.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-#ifndef _E_ADDRESSBOOK_TREEVIEW_ADAPTER_H_
-#define _E_ADDRESSBOOK_TREEVIEW_ADAPTER_H_
-
-#include <gtk/gtktreemodel.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_TYPE_ADDRESSBOOK_TREEVIEW_ADAPTER (e_addressbook_treeview_adapter_get_type ())
-#define E_ADDRESSBOOK_TREEVIEW_ADAPTER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_TYPE_ADDRESSBOOK_TREEVIEW_ADAPTER, EAddressbookTreeViewAdapter))
-#define E_ADDRESSBOOK_TREEVIEW_ADAPTER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), E_TYPE_ADDRESSBOOK_TREEVIEW_ADAPTER, EAddressbookTreeViewAdapterClass))
-#define E_IS_ADDRESSBOOK_TREEVIEW_ADAPTER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_TYPE_ADDRESSBOOK_TREEVIEW_ADAPTER))
-#define E_IS_ADDRESSBOOK_TREEVIEW_ADAPTER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_TYPE_ADDRESSBOOK_TREEVIEW_ADAPTER))
-
-/* Virtual Column list:
- 0 Email
- 1 Full Name
- 2 Street
- 3 Phone
-*/
-
-typedef struct _EAddressbookTreeViewAdapter EAddressbookTreeViewAdapter;
-typedef struct _EAddressbookTreeViewAdapterPrivate EAddressbookTreeViewAdapterPrivate;
-typedef struct _EAddressbookTreeViewAdapterClass EAddressbookTreeViewAdapterClass;
-
-struct _EAddressbookTreeViewAdapter {
- GObject parent;
-
- EAddressbookTreeViewAdapterPrivate *priv;
-};
-
-
-struct _EAddressbookTreeViewAdapterClass {
- GObjectClass parent_class;
-};
-
-
-GType e_addressbook_treeview_adapter_get_type (void);
-void e_addressbook_treeview_adapter_construct (EAddressbookTreeViewAdapter *adapter,
- EAddressbookModel *model);
-GtkTreeModel *e_addressbook_treeview_adapter_new (EAddressbookModel *model);
-
-#endif /* _E_ADDRESSBOOK_TABLE_ADAPTER_H_ */
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c
deleted file mode 100644
index 5303b279be..0000000000
--- a/addressbook/gui/widgets/e-addressbook-view.c
+++ /dev/null
@@ -1,1855 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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/gtk.h>
-
-#include <libgnome/gnome-i18n.h>
-#include <libgnome/gnome-util.h>
-#include <gtk/gtkscrolledwindow.h>
-#include <gal/e-table/e-table-scrolled.h>
-#include <gal/e-table/e-table-model.h>
-#include <gal/widgets/e-popup-menu.h>
-#include <gal/widgets/e-gui-utils.h>
-#include <gal/menus/gal-view-factory-etable.h>
-#include <gal/menus/gal-view-etable.h>
-#include <gal/util/e-xml-utils.h>
-#include <libgnomeui/gnome-dialog-util.h>
-
-#include <libgnomeprint/gnome-print.h>
-#include <libgnomeprint/gnome-print-job.h>
-#include <libgnomeprintui/gnome-print-dialog.h>
-#include <libgnomeprintui/gnome-print-job-preview.h>
-
-#include "addressbook/printing/e-contact-print.h"
-#include "addressbook/printing/e-contact-print-envelope.h"
-
-#ifdef WITH_ADDRESSBOOK_VIEW_TREEVIEW
-#include <gal/widgets/e-treeview-selection-model.h>
-#include "gal-view-factory-treeview.h"
-#include "gal-view-treeview.h"
-#endif
-#include "gal-view-minicard.h"
-#include "gal-view-factory-minicard.h"
-
-#include "eab-marshal.h"
-#include "e-addressbook-view.h"
-#include "e-addressbook-model.h"
-#include "eab-gui-util.h"
-#include "util/eab-book-util.h"
-#include "e-addressbook-table-adapter.h"
-#ifdef WITH_ADDRESSBOOK_VIEW_TREEVIEW
-#include "e-addressbook-treeview-adapter.h"
-#endif
-#include "eab-contact-merging.h"
-
-#include "e-contact-editor.h"
-#include <gdk/gdkkeysyms.h>
-#include <ctype.h>
-#include <string.h>
-
-#include <libxml/tree.h>
-#include <libxml/parser.h>
-
-#define SHOW_ALL_SEARCH "(contains \"x-evolution-any-field\" \"\")"
-
-#define d(x)
-
-static void eab_view_init (EABView *card);
-static void eab_view_class_init (EABViewClass *klass);
-
-static void eab_view_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
-static void eab_view_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
-
-static void eab_view_dispose (GObject *object);
-static void change_view_type (EABView *view, EABViewType view_type);
-
-static void status_message (GtkObject *object, const gchar *status, EABView *eav);
-static void search_result (GtkObject *object, EBookViewStatus status, EABView *eav);
-static void folder_bar_message (GtkObject *object, const gchar *status, EABView *eav);
-static void stop_state_changed (GtkObject *object, EABView *eav);
-static void writable_status (GtkObject *object, gboolean writable, EABView *eav);
-static void backend_died (GtkObject *object, EABView *eav);
-static void command_state_change (EABView *eav);
-
-static void selection_clear_event (GtkWidget *invisible, GdkEventSelection *event,
- EABView *view);
-static void selection_received (GtkWidget *invisible, GtkSelectionData *selection_data,
- guint time, EABView *view);
-static void selection_get (GtkWidget *invisible, GtkSelectionData *selection_data,
- guint info, guint time_stamp, EABView *view);
-static void invisible_destroyed (gpointer data, GObject *where_object_was);
-
-#define PARENT_TYPE GTK_TYPE_EVENT_BOX
-static GtkEventBoxClass *parent_class = NULL;
-
-/* The arguments we take */
-enum {
- PROP_0,
- PROP_BOOK,
- PROP_QUERY,
- PROP_TYPE,
-};
-
-enum {
- STATUS_MESSAGE,
- SEARCH_RESULT,
- 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 eab_view_signals [LAST_SIGNAL] = {0, };
-
-static GdkAtom clipboard_atom = GDK_NONE;
-
-static GalViewCollection *collection = NULL;
-
-GType
-eab_view_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (EABViewClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) eab_view_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EABView),
- 0, /* n_preallocs */
- (GInstanceInitFunc) eab_view_init,
- };
-
- type = g_type_register_static (PARENT_TYPE, "EABView", &info, 0);
- }
-
- return type;
-}
-
-static void
-eab_view_class_init (EABViewClass *klass)
-{
- GObjectClass *object_class;
- GtkWidgetClass *widget_class;
-
- object_class = G_OBJECT_CLASS(klass);
- widget_class = GTK_WIDGET_CLASS(klass);
-
- parent_class = gtk_type_class (PARENT_TYPE);
-
- object_class->set_property = eab_view_set_property;
- object_class->get_property = eab_view_get_property;
- object_class->dispose = eab_view_dispose;
-
- g_object_class_install_property (object_class, PROP_BOOK,
- g_param_spec_object ("book",
- _("Book"),
- /*_( */"XXX blurb" /*)*/,
- E_TYPE_BOOK,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_QUERY,
- g_param_spec_string ("query",
- _("Query"),
- /*_( */"XXX blurb" /*)*/,
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_TYPE,
- g_param_spec_int ("type",
- _("Type"),
- /*_( */"XXX blurb" /*)*/,
- EAB_VIEW_NONE,
- EAB_VIEW_TABLE,
- EAB_VIEW_NONE,
- G_PARAM_READWRITE));
-
- eab_view_signals [STATUS_MESSAGE] =
- g_signal_new ("status_message",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EABViewClass, status_message),
- NULL, NULL,
- eab_marshal_NONE__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
-
- eab_view_signals [SEARCH_RESULT] =
- g_signal_new ("search_result",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EABViewClass, search_result),
- NULL, NULL,
- eab_marshal_NONE__INT,
- G_TYPE_NONE, 1, G_TYPE_INT);
-
- eab_view_signals [FOLDER_BAR_MESSAGE] =
- g_signal_new ("folder_bar_message",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EABViewClass, folder_bar_message),
- NULL, NULL,
- eab_marshal_NONE__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
-
- eab_view_signals [COMMAND_STATE_CHANGE] =
- g_signal_new ("command_state_change",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EABViewClass, command_state_change),
- NULL, NULL,
- eab_marshal_NONE__NONE,
- G_TYPE_NONE, 0);
-
- if (!clipboard_atom)
- clipboard_atom = gdk_atom_intern ("CLIPBOARD", FALSE);
-}
-
-static void
-eab_view_init (EABView *eav)
-{
- eav->view_type = EAB_VIEW_NONE;
-
- eav->model = NULL;
- eav->object = NULL;
- eav->widget = NULL;
- eav->scrolled = NULL;
- eav->contact_display = NULL;
-
- eav->view_instance = NULL;
- eav->view_menus = NULL;
- eav->current_view = NULL;
- eav->uic = NULL;
-
- eav->book = NULL;
- eav->query = NULL;
-
- eav->invisible = NULL;
- eav->clipboard_contacts = NULL;
-}
-
-static void
-eab_view_dispose (GObject *object)
-{
- EABView *eav = EAB_VIEW(object);
-
- if (eav->model) {
- g_signal_handlers_disconnect_matched (eav->model,
- G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL,
- object);
- g_object_unref (eav->model);
- eav->model = NULL;
- }
-
- if (eav->book) {
- g_object_unref (eav->book);
- eav->book = NULL;
- }
-
- if (eav->query) {
- g_free(eav->query);
- eav->query = NULL;
- }
-
- eav->uic = NULL;
-
- if (eav->view_instance) {
- g_object_unref (eav->view_instance);
- eav->view_instance = NULL;
- }
-
- if (eav->view_menus) {
- g_object_unref (eav->view_menus);
- eav->view_menus = NULL;
- }
-
- if (eav->clipboard_contacts) {
- g_list_foreach (eav->clipboard_contacts, (GFunc)g_object_unref, NULL);
- g_list_free (eav->clipboard_contacts);
- eav->clipboard_contacts = NULL;
- }
-
- if (eav->invisible) {
- gtk_widget_destroy (eav->invisible);
- eav->invisible = NULL;
- }
-
- if (G_OBJECT_CLASS(parent_class)->dispose)
- G_OBJECT_CLASS(parent_class)->dispose(object);
-}
-
-GtkWidget*
-eab_view_new (void)
-{
- GtkWidget *widget = GTK_WIDGET (g_object_new (E_TYPE_AB_VIEW, NULL));
- EABView *eav = EAB_VIEW (widget);
-
- /* create our model */
- eav->model = eab_model_new ();
-
- g_signal_connect (eav->model, "status_message",
- G_CALLBACK (status_message), eav);
- g_signal_connect (eav->model, "search_result",
- G_CALLBACK (search_result), eav);
- g_signal_connect (eav->model, "folder_bar_message",
- G_CALLBACK (folder_bar_message), eav);
- g_signal_connect (eav->model, "stop_state_changed",
- G_CALLBACK (stop_state_changed), eav);
- g_signal_connect (eav->model, "writable_status",
- G_CALLBACK (writable_status), eav);
- g_signal_connect (eav->model, "backend_died",
- G_CALLBACK (backend_died), eav);
-
- eav->editable = FALSE;
- eav->query = g_strdup (SHOW_ALL_SEARCH);
-
- /* create the paned window and contact display */
- eav->paned = gtk_vpaned_new ();
- gtk_container_add (GTK_CONTAINER (eav), eav->paned);
-
- eav->widget = gtk_label_new ("empty label here");
- gtk_container_add (GTK_CONTAINER (eav->paned), eav->widget);
- gtk_widget_show (eav->widget);
-
- eav->scrolled = gtk_scrolled_window_new (NULL, NULL);
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (eav->scrolled), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
- gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (eav->scrolled), GTK_SHADOW_IN);
- eav->contact_display = eab_contact_display_new ();
-
- gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (eav->scrolled), eav->contact_display);
- gtk_widget_show (eav->contact_display);
-
- gtk_container_add (GTK_CONTAINER (eav->paned), eav->scrolled);
- gtk_widget_show (eav->scrolled);
- gtk_widget_show (eav->paned);
-
- /* XXX hack */
- gtk_paned_set_position (GTK_PANED (eav->paned), 144);
-
- /* gtk selection crap */
- eav->invisible = gtk_invisible_new ();
-
- gtk_selection_add_target (eav->invisible,
- clipboard_atom,
- GDK_SELECTION_TYPE_STRING,
- 0);
-
- g_signal_connect (eav->invisible, "selection_get",
- G_CALLBACK (selection_get),
- eav);
- g_signal_connect (eav->invisible, "selection_clear_event",
- G_CALLBACK (selection_clear_event),
- eav);
- g_signal_connect (eav->invisible, "selection_received",
- G_CALLBACK (selection_received),
- eav);
- g_object_weak_ref (G_OBJECT (eav->invisible), invisible_destroyed, eav);
-
- return widget;
-}
-
-static void
-writable_status (GtkObject *object, gboolean writable, EABView *eav)
-{
- eav->editable = writable;
- command_state_change (eav);
-}
-
-static void
-init_collection (void)
-{
- GalViewFactory *factory;
- ETableSpecification *spec;
- char *galview;
-
- if (collection == NULL) {
- collection = gal_view_collection_new();
-
- gal_view_collection_set_title (collection, _("Addressbook"));
-
- galview = gnome_util_prepend_user_home("/evolution/views/addressbook/");
- gal_view_collection_set_storage_directories
- (collection,
- EVOLUTION_GALVIEWSDIR "/addressbook/",
- galview);
- g_free(galview);
-
- spec = e_table_specification_new();
- e_table_specification_load_from_file (spec, EVOLUTION_ETSPECDIR "/e-addressbook-view.etspec");
-
- factory = gal_view_factory_etable_new (spec);
- g_object_unref (spec);
- gal_view_collection_add_factory (collection, factory);
- g_object_unref (factory);
-
- factory = gal_view_factory_minicard_new();
- gal_view_collection_add_factory (collection, factory);
- g_object_unref (factory);
-
-#ifdef WITH_ADDRESSBOOK_VIEW_TREEVIEW
- factory = gal_view_factory_treeview_new ();
- gal_view_collection_add_factory (collection, factory);
- g_object_unref (factory);
-#endif
-
- gal_view_collection_load(collection);
- }
-}
-
-static void
-display_view(GalViewInstance *instance,
- GalView *view,
- gpointer data)
-{
- EABView *address_view = data;
- if (GAL_IS_VIEW_ETABLE(view)) {
- change_view_type (address_view, EAB_VIEW_TABLE);
- gal_view_etable_attach_table (GAL_VIEW_ETABLE(view), e_table_scrolled_get_table(E_TABLE_SCROLLED(address_view->widget)));
- }
- else if (GAL_IS_VIEW_MINICARD(view)) {
- change_view_type (address_view, EAB_VIEW_MINICARD);
- gal_view_minicard_attach (GAL_VIEW_MINICARD (view), E_MINICARD_VIEW_WIDGET (address_view->object));
- }
-#ifdef WITH_ADDRESSBOOK_VIEW_TREEVIEW
- else if (GAL_IS_VIEW_TREEVIEW (view)) {
- change_view_type (address_view, EAB_VIEW_TREEVIEW);
- gal_view_treeview_attach (GAL_VIEW_TREEVIEW(view), GTK_TREE_VIEW (address_view->object));
- }
-#endif
- address_view->current_view = view;
-}
-
-static void
-setup_menus (EABView *view)
-{
- if (view->book && view->view_instance == NULL) {
- init_collection ();
- view->view_instance = gal_view_instance_new (collection, e_book_get_uri (view->book));
- }
-
- if (view->view_instance && view->uic) {
- view->view_menus = gal_view_menus_new(view->view_instance);
- gal_view_menus_apply(view->view_menus, view->uic, NULL);
-
- display_view (view->view_instance, gal_view_instance_get_current_view (view->view_instance), view);
-
- g_signal_connect(view->view_instance, "display_view",
- G_CALLBACK (display_view), view);
- }
-}
-
-static void
-eab_view_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
-{
- EABView *eav = EAB_VIEW(object);
-
- switch (prop_id){
- case PROP_BOOK:
- if (eav->book) {
- g_object_unref (eav->book);
- }
- if (g_value_get_object (value)) {
- eav->book = E_BOOK(g_value_get_object (value));
- g_object_ref (eav->book);
- }
- else
- eav->book = NULL;
-
- if (eav->view_instance) {
- g_object_unref (eav->view_instance);
- eav->view_instance = NULL;
- }
-
- g_object_set(eav->model,
- "book", eav->book,
- NULL);
-
- setup_menus (eav);
-
- break;
- case PROP_QUERY:
-#if 0 /* This code will mess up ldap a bit. We need to think about the ramifications of this more. */
- if ((g_value_get_string (value) == NULL && !strcmp (eav->query, SHOW_ALL_SEARCH)) ||
- (g_value_get_string (value) != NULL && !strcmp (eav->query, g_value_get_string (value))))
- break;
-#endif
- g_free(eav->query);
- eav->query = g_strdup(g_value_get_string (value));
- if (!eav->query)
- eav->query = g_strdup (SHOW_ALL_SEARCH);
- g_object_set(eav->model,
- "query", eav->query,
- NULL);
- break;
- case PROP_TYPE:
- change_view_type(eav, g_value_get_int (value));
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-eab_view_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
-{
- EABView *eav = EAB_VIEW(object);
-
- switch (prop_id) {
- case PROP_BOOK:
- if (eav->book)
- g_value_set_object (value, eav->book);
- else
- g_value_set_object (value, NULL);
- break;
- case PROP_QUERY:
- g_value_set_string (value, eav->query);
- break;
- case PROP_TYPE:
- g_value_set_int (value, eav->view_type);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static ESelectionModel*
-get_selection_model (EABView *view)
-{
- if (view->view_type == EAB_VIEW_TABLE)
- return e_table_get_selection_model (e_table_scrolled_get_table (E_TABLE_SCROLLED(view->widget)));
- else if (view->view_type == EAB_VIEW_MINICARD)
- return e_minicard_view_widget_get_selection_model (E_MINICARD_VIEW_WIDGET(view->object));
-#ifdef WITH_ADDRESSBOOK_VIEW_TREEVIEW
- else if (view->view_type == EAB_VIEW_TREEVIEW)
- return e_treeview_get_selection_model (GTK_TREE_VIEW (view->object));
-#endif
- g_return_val_if_reached (NULL);
-}
-
-/* Popup menu stuff */
-typedef struct {
- EABView *view;
- EPopupMenu *submenu;
- gpointer closure;
-} ContactAndBook;
-
-static ESelectionModel*
-contact_and_book_get_selection_model (ContactAndBook *contact_and_book)
-{
- return get_selection_model (contact_and_book->view);
-}
-
-static void
-contact_and_book_free (ContactAndBook *contact_and_book)
-{
- EABView *view = contact_and_book->view;
- ESelectionModel *selection;
-
- if (contact_and_book->submenu)
- gal_view_instance_free_popup_menu (view->view_instance,
- contact_and_book->submenu);
-
- selection = contact_and_book_get_selection_model (contact_and_book);
- if (selection)
- e_selection_model_right_click_up(selection);
-
- g_object_unref (view);
-}
-
-static void
-get_contact_list_1(gint model_row,
- gpointer closure)
-{
- ContactAndBook *contact_and_book;
- GList **list;
- EABView *view;
- EContact *contact;
-
- contact_and_book = closure;
- list = contact_and_book->closure;
- view = contact_and_book->view;
-
- contact = eab_model_get_contact(view->model, model_row);
- *list = g_list_prepend(*list, contact);
-}
-
-static GList *
-get_contact_list (ContactAndBook *contact_and_book)
-{
- GList *list = NULL;
- ESelectionModel *selection;
-
- selection = contact_and_book_get_selection_model (contact_and_book);
-
- if (selection) {
- contact_and_book->closure = &list;
- e_selection_model_foreach (selection, get_contact_list_1, contact_and_book);
- }
-
- return list;
-}
-
-static void
-has_email_address_1(gint model_row,
- gpointer closure)
-{
- ContactAndBook *contact_and_book;
- gboolean *has_email;
- EABView *view;
- const EContact *contact;
- GList *email;
-
- contact_and_book = closure;
- has_email = contact_and_book->closure;
- view = contact_and_book->view;
-
- if (*has_email)
- return;
-
- contact = eab_model_contact_at(view->model, model_row);
-
- email = e_contact_get (E_CONTACT (contact), E_CONTACT_EMAIL);
-
- if (g_list_length (email) > 0)
- *has_email = TRUE;
-
- g_list_foreach (email, (GFunc)g_free, NULL);
- g_list_free (email);
-}
-
-static gboolean
-get_has_email_address (ContactAndBook *contact_and_book)
-{
- ESelectionModel *selection;
- gboolean has_email = FALSE;
-
- selection = contact_and_book_get_selection_model (contact_and_book);
-
- if (selection) {
- contact_and_book->closure = &has_email;
- e_selection_model_foreach (selection, has_email_address_1, contact_and_book);
- }
-
- return has_email;
-}
-
-static void
-save_as (GtkWidget *widget, ContactAndBook *contact_and_book)
-{
- GList *contacts = get_contact_list (contact_and_book);
- if (contacts) {
- eab_contact_list_save(_("Save as VCard"), contacts, NULL);
- e_free_object_list(contacts);
- }
-}
-
-static void
-send_as (GtkWidget *widget, ContactAndBook *contact_and_book)
-{
- GList *contacts = get_contact_list (contact_and_book);
- if (contacts) {
- eab_send_contact_list(contacts, EAB_DISPOSITION_AS_ATTACHMENT);
- e_free_object_list(contacts);
- }
-}
-
-static void
-send_to (GtkWidget *widget, ContactAndBook *contact_and_book)
-
-{
- GList *contacts = get_contact_list (contact_and_book);
-
- if (contacts) {
- eab_send_contact_list(contacts, EAB_DISPOSITION_AS_TO);
- e_free_object_list(contacts);
- }
-}
-
-static void
-print (GtkWidget *widget, ContactAndBook *contact_and_book)
-{
- GList *contacts = get_contact_list (contact_and_book);
- if (contacts) {
- if (contacts->next)
- gtk_widget_show(e_contact_print_contact_list_dialog_new(contacts));
- else
- gtk_widget_show(e_contact_print_contact_dialog_new(contacts->data));
- e_free_object_list(contacts);
- }
-}
-
-#if 0 /* Envelope printing is disabled for Evolution 1.0. */
-static void
-print_envelope (GtkWidget *widget, ContactAndBook *contact_and_book)
-{
- GList *cards = get_card_list (contact_and_book);
- if (cards) {
- gtk_widget_show(e_contact_list_print_envelope_dialog_new(contact_and_book->card));
- e_free_object_list(cards);
- }
-}
-#endif
-
-static void
-copy (GtkWidget *widget, ContactAndBook *contact_and_book)
-{
- eab_view_copy (contact_and_book->view);
-}
-
-static void
-paste (GtkWidget *widget, ContactAndBook *contact_and_book)
-{
- eab_view_paste (contact_and_book->view);
-}
-
-static void
-cut (GtkWidget *widget, ContactAndBook *contact_and_book)
-{
- eab_view_cut (contact_and_book->view);
-}
-
-static void
-delete (GtkWidget *widget, ContactAndBook *contact_and_book)
-{
- if (e_contact_editor_confirm_delete(GTK_WINDOW(gtk_widget_get_toplevel(contact_and_book->view->widget)))) {
- EBook *book;
- GList *list = get_contact_list(contact_and_book);
- GList *iterator;
- gboolean bulk_remove = FALSE;
-
- bulk_remove = e_book_check_static_capability (contact_and_book->view->model->book,
- "bulk-remove");
-
- g_object_get(contact_and_book->view->model,
- "book", &book,
- NULL);
-
- if (bulk_remove) {
- GList *ids = NULL;
-
- for (iterator = list; iterator; iterator = iterator->next) {
- EContact *contact = iterator->data;
- ids = g_list_prepend (ids, (char*)e_contact_get_const (contact, E_CONTACT_UID));
- }
-
- /* Remove the cards all at once. */
- /* XXX no callback specified... ugh */
- e_book_async_remove_contacts (book,
- ids,
- NULL,
- NULL);
-
- g_list_free (ids);
- }
- else {
- for (iterator = list; iterator; iterator = iterator->next) {
- EContact *contact = iterator->data;
- /* Remove the card. */
- /* XXX no callback specified... ugh */
- e_book_async_remove_contact (book,
- e_contact_get_const (contact, E_CONTACT_UID),
- NULL,
- NULL);
- }
- }
- e_free_object_list(list);
- g_object_unref(book);
- }
-}
-
-static void
-copy_to_folder (GtkWidget *widget, ContactAndBook *contact_and_book)
-{
- eab_view_copy_to_folder (contact_and_book->view);
-}
-
-static void
-move_to_folder (GtkWidget *widget, ContactAndBook *contact_and_book)
-{
- eab_view_move_to_folder (contact_and_book->view);
-}
-
-static void
-free_popup_info (GtkWidget *w, ContactAndBook *contact_and_book)
-{
- contact_and_book_free (contact_and_book);
-}
-
-static void
-new_card (GtkWidget *widget, ContactAndBook *contact_and_book)
-{
- EBook *book;
- EContact *contact = e_contact_new();
-
- g_object_get(contact_and_book->view->model,
- "book", &book,
- NULL);
-
- eab_show_contact_editor (book, contact, TRUE, TRUE);
- g_object_unref (book);
- g_object_unref (contact);
-}
-
-static void
-new_list (GtkWidget *widget, ContactAndBook *contact_and_book)
-{
- EBook *book;
- EContact *contact = e_contact_new ();
-
- g_object_get(contact_and_book->view->model,
- "book", &book,
- NULL);
- eab_show_contact_list_editor (book, contact, TRUE, TRUE);
- g_object_unref(book);
- g_object_unref(contact);
-}
-
-#if 0
-static void
-sources (GtkWidget *widget, ContactAndBook *contact_and_book)
-{
- BonoboControl *control;
- GNOME_Evolution_ShellView shell_view;
- CORBA_Environment ev;
-
- control = g_object_get_data (G_OBJECT (gcal), "control");
- if (control == NULL)
- return;
-
- shell_view = get_shell_view_interface (control);
- if (shell_view == CORBA_OBJECT_NIL)
- return;
-
- CORBA_exception_init (&ev);
-
- GNOME_Evolution_ShellView_showSettings (shell_view, &ev);
-
- if (BONOBO_EX (&ev))
- g_message ("control_util_show_settings(): Could not show settings");
-
- CORBA_exception_free (&ev);
-}
-#endif
-
-#define POPUP_READONLY_MASK 0x1
-#define POPUP_NOSELECTION_MASK 0x2
-#define POPUP_NOEMAIL_MASK 0x4
-
-static void
-do_popup_menu(EABView *view, GdkEvent *event)
-{
- ContactAndBook *contact_and_book;
- GtkMenu *popup;
- EPopupMenu *submenu = NULL;
- ESelectionModel *selection_model;
- gboolean selection = FALSE;
-
- EPopupMenu menu[] = {
- E_POPUP_ITEM (N_("New Contact..."), G_CALLBACK(new_card), POPUP_READONLY_MASK),
- E_POPUP_ITEM (N_("New Contact List..."), G_CALLBACK(new_list), POPUP_READONLY_MASK),
- E_POPUP_SEPARATOR,
-#if 0
- E_POPUP_ITEM (N_("Go to Folder..."), G_CALLBACK (goto_folder), 0),
- E_POPUP_ITEM (N_("Import..."), G_CALLBACK (import), POPUP_READONLY_MASK),
- E_POPUP_SEPARATOR,
- E_POPUP_ITEM (N_("Search for Contacts..."), G_CALLBACK (search), 0),
- E_POPUP_ITEM (N_("Addressbook Sources..."), G_CALLBACK (sources), 0),
- E_POPUP_SEPARATOR,
- E_POPUP_ITEM (N_("Pilot Settings..."), G_CALLBACK (pilot_settings), 0),
-#endif
- E_POPUP_SEPARATOR,
- E_POPUP_ITEM (N_("Save as VCard"), G_CALLBACK(save_as), POPUP_NOSELECTION_MASK),
- E_POPUP_ITEM (N_("Forward Contact"), G_CALLBACK(send_as), POPUP_NOSELECTION_MASK),
- E_POPUP_ITEM (N_("Send Message to Contact"), G_CALLBACK(send_to), POPUP_NOSELECTION_MASK | POPUP_NOEMAIL_MASK),
- E_POPUP_ITEM (N_("Print"), G_CALLBACK(print), POPUP_NOSELECTION_MASK),
-#if 0 /* Envelope printing is disabled for Evolution 1.0. */
- E_POPUP_ITEM (N_("Print Envelope"), G_CALLBACK(print_envelope), POPUP_NOSELECTION_MASK),
-#endif
- E_POPUP_SEPARATOR,
-
- E_POPUP_ITEM (N_("Copy to folder..."), G_CALLBACK(copy_to_folder), POPUP_NOSELECTION_MASK),
- E_POPUP_ITEM (N_("Move to folder..."), G_CALLBACK(move_to_folder), POPUP_READONLY_MASK | POPUP_NOSELECTION_MASK),
- E_POPUP_SEPARATOR,
-
- E_POPUP_ITEM (N_("Cut"), G_CALLBACK (cut), POPUP_READONLY_MASK | POPUP_NOSELECTION_MASK),
- E_POPUP_ITEM (N_("Copy"), G_CALLBACK (copy), POPUP_NOSELECTION_MASK),
- E_POPUP_ITEM (N_("Paste"), G_CALLBACK (paste), POPUP_READONLY_MASK),
- E_POPUP_ITEM (N_("Delete"), G_CALLBACK(delete), POPUP_READONLY_MASK | POPUP_NOSELECTION_MASK),
- E_POPUP_SEPARATOR,
-
-#if 0
- E_POPUP_SUBMENU (N_("Current View"), submenu = gal_view_instance_get_popup_menu (view->view_instance), 0),
-#endif
- E_POPUP_TERMINATOR
- };
-
- contact_and_book = g_new(ContactAndBook, 1);
- contact_and_book->view = view;
- contact_and_book->submenu = submenu;
-
- g_object_ref (contact_and_book->view);
-
- selection_model = contact_and_book_get_selection_model (contact_and_book);
- if (selection_model)
- selection = e_selection_model_selected_count (selection_model) > 0;
-
- popup = e_popup_menu_create (menu,
- 0,
- (eab_model_editable (view->model) ? 0 : POPUP_READONLY_MASK) +
- (selection ? 0 : POPUP_NOSELECTION_MASK) +
- (get_has_email_address (contact_and_book) ? 0 : POPUP_NOEMAIL_MASK),
- contact_and_book);
-
- g_signal_connect (popup, "selection-done",
- G_CALLBACK (free_popup_info), contact_and_book);
- e_popup_menu (popup, event);
-
-}
-
-static void
-render_contact (int row, EABView *view)
-{
- EContact *contact = eab_model_get_contact (view->model, row);
-
- eab_contact_display_render (EAB_CONTACT_DISPLAY (view->contact_display), contact,
- EAB_CONTACT_DISPLAY_RENDER_NORMAL);
-}
-
-static void
-selection_changed (GObject *o, EABView *view)
-{
- ESelectionModel *selection_model;
-
- command_state_change (view);
-
- selection_model = get_selection_model (view);
-
- if (e_selection_model_selected_count (selection_model) == 1)
- e_selection_model_foreach (selection_model,
- (EForeachFunc)render_contact, view);
- else
- eab_contact_display_render (EAB_CONTACT_DISPLAY (view->contact_display), NULL,
- EAB_CONTACT_DISPLAY_RENDER_NORMAL);
-
-}
-
-static void
-table_double_click(ETableScrolled *table, gint row, gint col, GdkEvent *event, EABView *view)
-{
- if (E_IS_ADDRESSBOOK_TABLE_ADAPTER(view->object)) {
- EABModel *model = view->model;
- EContact *contact = eab_model_get_contact (model, row);
- EBook *book;
-
- g_object_get(model,
- "book", &book,
- NULL);
-
- g_assert (E_IS_BOOK (book));
-
- if (e_contact_get (contact, E_CONTACT_IS_LIST))
- eab_show_contact_list_editor (book, contact, FALSE, view->editable);
- else
- eab_show_contact_editor (book, contact, FALSE, view->editable);
-
- g_object_unref (book);
- g_object_unref (contact);
- }
-}
-
-static gint
-table_right_click(ETableScrolled *table, gint row, gint col, GdkEvent *event, EABView *view)
-{
- do_popup_menu(view, event);
- return TRUE;
-}
-
-static gint
-table_white_space_event(ETableScrolled *table, GdkEvent *event, EABView *view)
-{
- if (event->type == GDK_BUTTON_PRESS && ((GdkEventButton *)event)->button == 3) {
- do_popup_menu(view, event);
- return TRUE;
- } else {
- return FALSE;
- }
-}
-
-static void
-table_drag_data_get (ETable *table,
- int row,
- int col,
- GdkDragContext *context,
- GtkSelectionData *selection_data,
- guint info,
- guint time,
- gpointer user_data)
-{
- EABView *view = user_data;
-
- if (!E_IS_ADDRESSBOOK_TABLE_ADAPTER(view->object))
- return;
-
- switch (info) {
- case DND_TARGET_TYPE_VCARD: {
- char *value;
-
- value = e_vcard_to_string (E_VCARD (view->model->data[row]), EVC_FORMAT_VCARD_30);
-
- gtk_selection_data_set (selection_data,
- selection_data->target,
- 8,
- value, strlen (value));
- break;
- }
- }
-}
-
-static void
-emit_status_message (EABView *eav, const gchar *status)
-{
- g_signal_emit (eav,
- eab_view_signals [STATUS_MESSAGE], 0,
- status);
-}
-
-static void
-emit_search_result (EABView *eav, EBookViewStatus status)
-{
- g_signal_emit (eav,
- eab_view_signals [SEARCH_RESULT], 0,
- status);
-}
-
-static void
-emit_folder_bar_message (EABView *eav, const gchar *message)
-{
- g_signal_emit (eav,
- eab_view_signals [FOLDER_BAR_MESSAGE], 0,
- message);
-}
-
-static void
-status_message (GtkObject *object, const gchar *status, EABView *eav)
-{
- emit_status_message (eav, status);
-}
-
-static void
-search_result (GtkObject *object, EBookViewStatus status, EABView *eav)
-{
- emit_search_result (eav, status);
-}
-
-static void
-folder_bar_message (GtkObject *object, const gchar *status, EABView *eav)
-{
- emit_folder_bar_message (eav, status);
-}
-
-static void
-stop_state_changed (GtkObject *object, EABView *eav)
-{
- command_state_change (eav);
-}
-
-static void
-command_state_change (EABView *eav)
-{
- /* Reffing during emission is unnecessary. Gtk automatically refs during an emission. */
- g_signal_emit (eav, eab_view_signals [COMMAND_STATE_CHANGE], 0);
-}
-
-static void
-backend_died (GtkObject *object, EABView *eav)
-{
- char *message = g_strdup_printf (_("The addressbook backend for\n%s\nhas crashed. "
- "You will have to restart Evolution in order "
- "to use it again"),
- e_book_get_uri (eav->book));
- gnome_error_dialog_parented (message, GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (eav))));
- g_free (message);
-}
-
-static void
-minicard_right_click (EMinicardView *minicard_view_item, GdkEvent *event, EABView *view)
-{
- do_popup_menu(view, event);
-}
-
-static void
-create_minicard_view (EABView *view)
-{
- GtkWidget *scrolled_window;
- GtkWidget *minicard_view;
- EAddressbookReflowAdapter *adapter;
-
- adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(e_addressbook_reflow_adapter_new (view->model));
- minicard_view = e_minicard_view_widget_new(adapter);
-
- g_signal_connect(minicard_view, "selection_change",
- G_CALLBACK(selection_changed), view);
-
- g_signal_connect(minicard_view, "right_click",
- G_CALLBACK(minicard_right_click), view);
-
- scrolled_window = gtk_scrolled_window_new (NULL, NULL);
- gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window), GTK_SHADOW_IN);
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
- GTK_POLICY_AUTOMATIC,
- GTK_POLICY_AUTOMATIC);
-
- view->object = G_OBJECT(minicard_view);
- view->widget = scrolled_window;
-
- gtk_container_add (GTK_CONTAINER (scrolled_window), minicard_view);
- gtk_widget_show (minicard_view);
-
- gtk_widget_show_all( GTK_WIDGET(scrolled_window) );
-
- gtk_paned_add1 (GTK_PANED (view->paned), scrolled_window);
-
- e_reflow_model_changed (E_REFLOW_MODEL (adapter));
-}
-
-static void
-create_table_view (EABView *view)
-{
- ETableModel *adapter;
- GtkWidget *table;
-
- adapter = eab_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_from_spec_file (adapter, NULL, EVOLUTION_ETSPECDIR "/e-addressbook-view.etspec", NULL);
-
- view->object = G_OBJECT(adapter);
- view->widget = table;
-
- g_signal_connect(e_table_scrolled_get_table(E_TABLE_SCROLLED(table)), "double_click",
- G_CALLBACK(table_double_click), view);
- g_signal_connect(e_table_scrolled_get_table(E_TABLE_SCROLLED(table)), "right_click",
- G_CALLBACK(table_right_click), view);
- g_signal_connect(e_table_scrolled_get_table(E_TABLE_SCROLLED(table)), "white_space_event",
- G_CALLBACK(table_white_space_event), view);
- g_signal_connect(e_table_scrolled_get_table(E_TABLE_SCROLLED(table)), "selection_change",
- G_CALLBACK(selection_changed), 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);
-
- g_signal_connect (E_TABLE_SCROLLED(table)->table,
- "table_drag_data_get",
- G_CALLBACK (table_drag_data_get),
- view);
-
- gtk_paned_add1 (GTK_PANED (view->paned), table);
-
- gtk_widget_show( GTK_WIDGET(table) );
-}
-
-#ifdef WITH_ADDRESSBOOK_VIEW_TREEVIEW
-static void
-treeview_row_activated(GtkTreeView *treeview,
- GtkTreePath *path, GtkTreeViewColumn *column,
- EABView *view)
-{
- EABModel *model = view->model;
- int row = gtk_tree_path_get_indices (path)[0];
- ECard *card = eab_model_get_card(model, row);
- EBook *book;
-
- g_object_get(model,
- "book", &book,
- NULL);
-
- g_assert (E_IS_BOOK (book));
-
- if (e_card_evolution_list (card))
- eab_show_contact_list_editor (book, card, FALSE, view->editable);
- else
- eab_show_contact_editor (book, card, FALSE, view->editable);
-
- g_object_unref (book);
- g_object_unref (card);
-}
-
-static void
-create_treeview_view (EABView *view)
-{
- GtkTreeModel *adapter;
- ECardSimple *simple;
- GtkWidget *treeview;
- GtkWidget *scrolled;
- int i;
-
- simple = e_card_simple_new(NULL);
-
- adapter = eab_treeview_adapter_new(view->model);
-
- scrolled = gtk_scrolled_window_new (NULL, NULL);
- gtk_scrolled_window_set_shadow (GTK_SCROLLED_WINDOW (scrolled), GTK_SHADOW_IN);
- treeview = gtk_tree_view_new_with_model (adapter);
-
- gtk_widget_show (treeview);
-
- gtk_container_add (GTK_CONTAINER (scrolled), treeview);
-
- for (i = 0; i < 15; i ++) {
- GtkTreeViewColumn *column =
- gtk_tree_view_column_new_with_attributes (e_card_simple_get_name (simple, i),
- gtk_cell_renderer_text_new (),
- "text", i,
- NULL);
-
- gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column);
- }
-
- view->object = G_OBJECT(treeview);
- view->widget = scrolled;
-
- gtk_tree_selection_set_mode (gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)), GTK_SELECTION_MULTIPLE);
- gtk_tree_view_enable_model_drag_source (GTK_TREE_VIEW (treeview),
- GDK_BUTTON1_MASK,
- drag_types,
- num_drag_types,
- GDK_ACTION_MOVE);
-
- g_signal_connect(treeview, "row_activated",
- G_CALLBACK (treeview_row_activated), view);
-#if 0
- g_signal_connect(e_table_scrolled_get_table(E_TABLE_SCROLLED(table)), "right_click",
- G_CALLBACK(table_right_click), view);
-
- /* drag & drop signals */
- e_table_drag_source_set (E_TABLE(E_TABLE_SCROLLED(table)->table), GDK_BUTTON1_MASK,
- drag_types, num_drag_types, GDK_ACTION_MOVE);
-
- g_signal_connect (E_TABLE_SCROLLED(table)->table,
- "table_drag_data_get",
- G_CALLBACK (table_drag_data_get),
- view);
-#endif
-
-
- g_signal_connect(e_treeview_get_selection_model (GTK_TREE_VIEW (treeview)), "selection_changed",
- G_CALLBACK(selection_changed), view);
-
- gtk_paned_add1 (GTK_PANED (view->paned), scrolled);
-
- gtk_widget_show( GTK_WIDGET(scrolled) );
-
- g_object_unref (simple);
-}
-#endif
-
-static void
-change_view_type (EABView *view, EABViewType view_type)
-{
- if (view_type == view->view_type)
- return;
-
- if (view->widget) {
- gtk_container_remove (GTK_CONTAINER (view->paned), view->widget);
- view->widget = NULL;
- }
- view->object = NULL;
-
- switch (view_type) {
- case EAB_VIEW_TABLE:
- create_table_view (view);
- break;
- case EAB_VIEW_MINICARD:
- create_minicard_view (view);
- break;
-#ifdef WITH_ADDRESSBOOK_VIEW_TREEVIEW
- case EAB_VIEW_TREEVIEW:
- create_treeview_view (view);
- break;
-#endif
- default:
- g_warning ("view_type not recognized.");
- return;
- }
-
- view->view_type = view_type;
-
- command_state_change (view);
-}
-
-typedef struct {
- GtkWidget *table;
- GObject *printable;
-} EContactPrintDialogWeakData;
-
-static void
-e_contact_print_destroy(gpointer data, GObject *where_object_was)
-{
- EContactPrintDialogWeakData *weak_data = data;
- g_object_unref (weak_data->printable);
- g_object_unref (weak_data->table);
- g_free (weak_data);
-}
-
-static void
-e_contact_print_button(GtkDialog *dialog, gint response, gpointer data)
-{
- GnomePrintJob *master;
- GnomePrintContext *pc;
- EPrintable *printable = g_object_get_data(G_OBJECT(dialog), "printable");
- GtkWidget *preview;
- switch( response ) {
- case GNOME_PRINT_DIALOG_RESPONSE_PRINT:
- master = gnome_print_job_new(gnome_print_dialog_get_config ( GNOME_PRINT_DIALOG(dialog) ));
- pc = gnome_print_job_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_job_close(master);
- gnome_print_job_print(master);
- g_object_unref (master);
- gtk_widget_destroy((GtkWidget *)dialog);
- break;
- case GNOME_PRINT_DIALOG_RESPONSE_PREVIEW:
- master = gnome_print_job_new (gnome_print_dialog_get_config ( GNOME_PRINT_DIALOG(dialog) ));
- pc = gnome_print_job_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_job_close(master);
- preview = GTK_WIDGET(gnome_print_job_preview_new(master, "Print Preview"));
- gtk_widget_show_all(preview);
- g_object_unref (master);
- break;
- case GNOME_PRINT_DIALOG_RESPONSE_CANCEL:
- default:
- gtk_widget_destroy((GtkWidget *)dialog);
- break;
- }
-}
-
-void
-eab_view_setup_menus (EABView *view,
- BonoboUIComponent *uic)
-{
-
- 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));
-
- init_collection ();
-
- view->uic = uic;
-
- setup_menus (view);
-}
-
-/**
- * eab_view_discard_menus:
- * @view: An addressbook view.
- *
- * Makes an addressbook view discard its GAL view menus and its views instance
- * objects. This should be called when the corresponding Bonobo component is
- * deactivated.
- **/
-void
-eab_view_discard_menus (EABView *view)
-{
- g_return_if_fail (view != NULL);
- g_return_if_fail (E_IS_ADDRESSBOOK_VIEW (view));
- g_return_if_fail (view->view_instance);
-
- if (view->view_menus) {
- gal_view_menus_unmerge (view->view_menus, NULL);
-
- g_object_unref (view->view_menus);
- view->view_menus = NULL;
- }
-
- if (view->view_instance) {
- g_object_unref (view->view_instance);
- view->view_instance = NULL;
- }
-
- view->uic = NULL;
-}
-
-void
-eab_view_print(EABView *view)
-{
- if (view->view_type == EAB_VIEW_MINICARD) {
- char *query;
- EBook *book;
- GtkWidget *print;
-
- g_object_get (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 == EAB_VIEW_TABLE) {
- GtkWidget *dialog;
- EPrintable *printable;
- ETable *etable;
- EContactPrintDialogWeakData *weak_data;
-
- dialog = gnome_print_dialog_new(NULL, "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);
-
- g_object_get(view->widget, "table", &etable, NULL);
- printable = e_table_get_printable(etable);
- g_object_unref(etable);
- g_object_ref (view->widget);
-
- g_object_set_data (G_OBJECT (dialog), "table", view->widget);
- g_object_set_data (G_OBJECT (dialog), "printable", printable);
-
- g_signal_connect(dialog,
- "response", G_CALLBACK(e_contact_print_button), NULL);
-
- weak_data = g_new (EContactPrintDialogWeakData, 1);
-
- weak_data->table = view->widget;
- weak_data->printable = G_OBJECT (printable);
-
- g_object_weak_ref (G_OBJECT (dialog), e_contact_print_destroy, weak_data);
-
- gtk_widget_show(dialog);
- }
-#ifdef WITH_ADDRESSBOOK_VIEW_TREEVIEW
- else if (view->view_type == EAB_VIEW_TREEVIEW) {
- /* XXX */
- }
-#endif
-}
-
-void
-eab_view_print_preview(EABView *view)
-{
- if (view->view_type == EAB_VIEW_MINICARD) {
- char *query;
- EBook *book;
-
- g_object_get (view->model,
- "query", &query,
- "book", &book,
- NULL);
- e_contact_print_preview(book, query);
- g_free(query);
- }
- else if (view->view_type == EAB_VIEW_TABLE) {
- EPrintable *printable;
- ETable *etable;
- GnomePrintJob *master;
- GnomePrintContext *pc;
- GnomePrintConfig *config;
- GtkWidget *preview;
-
- g_object_get(view->widget, "table", &etable, NULL);
- printable = e_table_get_printable(etable);
- g_object_unref(etable);
-
- master = gnome_print_job_new(NULL);
- config = gnome_print_job_get_config (master);
- gnome_print_config_set_int (config, GNOME_PRINT_KEY_NUM_COPIES, 1);
- pc = gnome_print_job_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_job_close(master);
- preview = GTK_WIDGET(gnome_print_job_preview_new(master, "Print Preview"));
- gtk_widget_show_all(preview);
- g_object_unref (master);
- g_object_unref (printable);
- }
-#ifdef WITH_ADDRESSBOOK_VIEW_TREEVIEW
- else if (view->view_type == EAB_VIEW_TREEVIEW) {
- /* XXX */
- }
-#endif
-}
-
-void
-eab_view_delete_selection(EABView *view)
-{
- ContactAndBook contact_and_book;
-
- memset (&contact_and_book, 0, sizeof (contact_and_book));
- contact_and_book.view = view;
-
- delete (GTK_WIDGET (view), &contact_and_book);
-}
-
-static void
-invisible_destroyed (gpointer data, GObject *where_object_was)
-{
- EABView *view = data;
- view->invisible = NULL;
-}
-
-static void
-selection_get (GtkWidget *invisible,
- GtkSelectionData *selection_data,
- guint info,
- guint time_stamp,
- EABView *view)
-{
- char *value;
-
- value = eab_contact_list_to_string (view->clipboard_contacts);
-
- gtk_selection_data_set (selection_data, GDK_SELECTION_TYPE_STRING,
- 8, value, strlen (value));
-
-}
-
-static void
-selection_clear_event (GtkWidget *invisible,
- GdkEventSelection *event,
- EABView *view)
-{
- if (view->clipboard_contacts) {
- g_list_foreach (view->clipboard_contacts, (GFunc)g_object_unref, NULL);
- g_list_free (view->clipboard_contacts);
- view->clipboard_contacts = NULL;
- }
-}
-
-static void
-selection_received (GtkWidget *invisible,
- GtkSelectionData *selection_data,
- guint time,
- EABView *view)
-{
- if (selection_data->length < 0 || selection_data->type != GDK_SELECTION_TYPE_STRING) {
- return;
- }
- else {
- /* XXX make sure selection_data->data = \0 terminated */
- GList *contact_list = eab_contact_list_from_string (selection_data->data);
- GList *l;
-
- for (l = contact_list; l; l = l->next) {
- EContact *contact = l->data;
-
- /* XXX NULL for a callback /sigh */
- eab_merging_book_add_contact (view->book, contact, NULL /* XXX */, NULL);
- }
-
- g_list_foreach (contact_list, (GFunc)g_object_unref, NULL);
- g_list_free (contact_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_contacts (EABView *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 = eab_model_get_contact (view->model, GPOINTER_TO_INT (iterator->data));
- }
- list = g_list_reverse (list);
- return list;
-}
-
-void
-eab_view_save_as (EABView *view)
-{
- GList *list = get_selected_contacts (view);
- if (list)
- eab_contact_list_save (_("Save as VCard"), list, NULL);
- e_free_object_list(list);
-}
-
-void
-eab_view_view (EABView *view)
-{
- GList *list = get_selected_contacts (view);
- eab_show_multiple_contacts (view->book, list, view->editable);
- e_free_object_list(list);
-}
-
-void
-eab_view_send (EABView *view)
-{
- GList *list = get_selected_contacts (view);
- if (list)
- eab_send_contact_list (list, EAB_DISPOSITION_AS_ATTACHMENT);
- e_free_object_list(list);
-}
-
-void
-eab_view_send_to (EABView *view)
-{
- GList *list = get_selected_contacts (view);
- if (list)
- eab_send_contact_list (list, EAB_DISPOSITION_AS_TO);
- e_free_object_list(list);
-}
-
-void
-eab_view_cut (EABView *view)
-{
- eab_view_copy (view);
- eab_view_delete_selection (view);
-}
-
-void
-eab_view_copy (EABView *view)
-{
- view->clipboard_contacts = get_selected_contacts (view);
-
- gtk_selection_owner_set (view->invisible, clipboard_atom, GDK_CURRENT_TIME);
-}
-
-void
-eab_view_paste (EABView *view)
-{
- gtk_selection_convert (view->invisible, clipboard_atom,
- GDK_SELECTION_TYPE_STRING,
- GDK_CURRENT_TIME);
-}
-
-void
-eab_view_select_all (EABView *view)
-{
- ESelectionModel *model = get_selection_model (view);
-
- g_return_if_fail (model);
-
- e_selection_model_select_all (model);
-}
-
-void
-eab_view_show_all(EABView *view)
-{
- g_object_set(view,
- "query", NULL,
- NULL);
-}
-
-void
-eab_view_stop(EABView *view)
-{
- if (view)
- eab_model_stop (view->model);
-}
-
-static void
-view_transfer_contacts (EABView *view, gboolean delete_from_source)
-{
- EBook *book;
- GList *contacts;
- GtkWindow *parent_window;
-
- g_object_get(view->model,
- "book", &book,
- NULL);
- contacts = get_selected_contacts (view);
- parent_window = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (view)));
-
- eab_transfer_contacts (book, contacts, delete_from_source, parent_window);
- g_object_unref(book);
-}
-
-void
-eab_view_copy_to_folder (EABView *view)
-{
- view_transfer_contacts (view, FALSE);
-}
-
-void
-eab_view_move_to_folder (EABView *view)
-{
- view_transfer_contacts (view, TRUE);
-}
-
-
-static gboolean
-eab_view_selection_nonempty (EABView *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
-eab_view_can_create (EABView *view)
-{
- return view ? eab_model_editable (view->model) : FALSE;
-}
-
-gboolean
-eab_view_can_print (EABView *view)
-{
- return view && view->model ? eab_model_contact_count (view->model) : FALSE;
-}
-
-gboolean
-eab_view_can_save_as (EABView *view)
-{
- return view ? eab_view_selection_nonempty (view) : FALSE;
-}
-
-gboolean
-eab_view_can_view (EABView *view)
-{
- return view ? eab_view_selection_nonempty (view) : FALSE;
-}
-
-gboolean
-eab_view_can_send (EABView *view)
-{
- return view ? eab_view_selection_nonempty (view) : FALSE;
-}
-
-gboolean
-eab_view_can_send_to (EABView *view)
-{
- return view ? eab_view_selection_nonempty (view) : FALSE;
-}
-
-gboolean
-eab_view_can_delete (EABView *view)
-{
- return view ? eab_view_selection_nonempty (view) && eab_model_editable (view->model) : FALSE;
-}
-
-gboolean
-eab_view_can_cut (EABView *view)
-{
- return view ? eab_view_selection_nonempty (view) && eab_model_editable (view->model) : FALSE;
-}
-
-gboolean
-eab_view_can_copy (EABView *view)
-{
- return view ? eab_view_selection_nonempty (view) : FALSE;
-}
-
-gboolean
-eab_view_can_paste (EABView *view)
-{
- return view ? eab_model_editable (view->model) : FALSE;
-}
-
-gboolean
-eab_view_can_select_all (EABView *view)
-{
- return view ? eab_model_contact_count (view->model) != 0 : FALSE;
-}
-
-gboolean
-eab_view_can_stop (EABView *view)
-{
- return view ? eab_model_can_stop (view->model) : FALSE;
-}
-
-gboolean
-eab_view_can_copy_to_folder (EABView *view)
-{
- return view ? eab_view_selection_nonempty (view) : FALSE;
-}
-
-gboolean
-eab_view_can_move_to_folder (EABView *view)
-{
- return view ? eab_view_selection_nonempty (view) && eab_model_editable (view->model) : FALSE;
-}
diff --git a/addressbook/gui/widgets/e-addressbook-view.etspec b/addressbook/gui/widgets/e-addressbook-view.etspec
deleted file mode 100644
index 84f9ad44b8..0000000000
--- a/addressbook/gui/widgets/e-addressbook-view.etspec
+++ /dev/null
@@ -1,58 +0,0 @@
-<ETableSpecification draw-grid="true">
- <ETableColumn model_col= "2" _title="File As" expansion="1.0" minimum_width="75" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col= "3" _title="Full Name" expansion="1.0" minimum_width="75" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col= "4" _title="Given Name" expansion="1.0" minimum_width="75" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col= "5" _title="Family Name" expansion="1.0" minimum_width="75" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col= "6" _title="Nickname" expansion="1.0" minimum_width="75" resizable="true" cell="string" compare="string"/>
-
- <ETableColumn model_col= "7" _title="Email" expansion="1.0" minimum_width="75" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col= "8" _title="Email 2" expansion="1.0" minimum_width="75" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col= "9" _title="Email 3" expansion="1.0" minimum_width="75" resizable="true" cell="string" compare="string"/>
-
- <ETableColumn model_col= "14" _title="Assistant Phone" expansion="1.0" minimum_width="75" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col= "15" _title="Business Phone" expansion="1.0" minimum_width="75" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col= "16" _title="Business Phone 2" expansion="1.0" minimum_width="75" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col="17" _title="Business Fax" expansion="1.0" minimum_width="75" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col="18" _title="Callback Phone" expansion="1.0" minimum_width="75" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col="19" _title="Car Phone" expansion="1.0" minimum_width="75" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col="20" _title="Company Phone" expansion="1.0" minimum_width="75" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col="21" _title="Home Phone" expansion="1.0" minimum_width="75" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col="22" _title="Home Phone 2" expansion="1.0" minimum_width="75" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col="23" _title="Home Fax" expansion="1.0" minimum_width="75" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col="24" _title="ISDN Phone" expansion="1.0" minimum_width="75" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col="25" _title="Mobile Phone" expansion="1.0" minimum_width="75" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col="26" _title="Other Phone" expansion="1.0" minimum_width="75" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col="27" _title="Other Fax" expansion="1.0" minimum_width="75" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col="28" _title="Pager" expansion="1.0" minimum_width="75" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col="29" _title="Primary Phone" expansion="1.0" minimum_width="75" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col="30" _title="Radio" expansion="1.0" minimum_width="75" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col="31" _title="Telex" expansion="1.0" minimum_width="75" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col="32" _title="TTYTDD" expansion="1.0" minimum_width="75" resizable="true" cell="string" compare="string"/>
-
- <ETableColumn model_col="33" _title="Organization" expansion="1.0" minimum_width="75" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col="34" _title="Unit" expansion="1.0" minimum_width="75" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col="35" _title="Office" expansion="1.0" minimum_width="75" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col="36" _title="Title" expansion="1.0" minimum_width="75" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col="37" _title="Role" expansion="1.0" minimum_width="75" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col="38" _title="Manager" expansion="1.0" minimum_width="75" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col="39" _title="Assistant" expansion="1.0" minimum_width="75" resizable="true" cell="string" compare="string"/>
-
- <ETableColumn model_col="40" _title="Web Site" expansion="1.0" minimum_width="75" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col="41" _title="Journal" expansion="1.0" minimum_width="75" resizable="true" cell="string" compare="string"/>
-
- <ETableColumn model_col="42" _title="Categories" expansion="1.0" minimum_width="75" resizable="true" cell="string" compare="string"/>
-
- <ETableColumn model_col="46" _title="Spouse" expansion="1.0" minimum_width="75" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col="47" _title="Note" expansion="1.0" minimum_width="75" resizable="true" cell="string" compare="string"/>
-
- <ETableState>
- <column source="0"/>
- <column source="1"/>
- <column source="5"/>
- <column source="23"/>
- <column source="36"/>
- <grouping>
- <leaf column="0" ascending="true"/>
- </grouping>
- </ETableState>
-</ETableSpecification>
diff --git a/addressbook/gui/widgets/e-addressbook-view.h b/addressbook/gui/widgets/e-addressbook-view.h
deleted file mode 100644
index f819704550..0000000000
--- a/addressbook/gui/widgets/e-addressbook-view.h
+++ /dev/null
@@ -1,144 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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 __EAB_VIEW_H__
-#define __EAB_VIEW_H__
-
-#include <gtk/gtkeventbox.h>
-#include <bonobo/bonobo-ui-component.h>
-#include <gal/menus/gal-view-instance.h>
-#include <libebook/e-book.h>
-#include "e-addressbook-model.h"
-#include "eab-contact-display.h"
-#include "widgets/menus/gal-view-menus.h"
-
-G_BEGIN_DECLS
-
-/* EABView - A card displaying information about a contact.
- *
- * The following arguments are available:
- *
- * name type read/write description
- * --------------------------------------------------------------------------------
- */
-
-#define E_TYPE_AB_VIEW (eab_view_get_type ())
-#define EAB_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_AB_VIEW, EABView))
-#define EAB_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_AB_VIEW, EABViewClass))
-#define E_IS_ADDRESSBOOK_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_AB_VIEW))
-#define E_IS_ADDRESSBOOK_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_AB_VIEW))
-
-typedef enum {
- EAB_VIEW_NONE, /* initialized to this */
- EAB_VIEW_MINICARD,
- EAB_VIEW_TABLE,
-#ifdef WITH_ADDRESSBOOK_VIEW_TREEVIEW
- ,EAB_VIEW_TREEVIEW
-#endif
-} EABViewType;
-
-
-typedef struct _EABView EABView;
-typedef struct _EABViewClass EABViewClass;
-
-struct _EABView
-{
- GtkEventBox parent;
-
- /* item specific fields */
- EABViewType view_type;
-
- EABModel *model;
-
- GtkWidget *invisible;
- GList *clipboard_contacts;
-
- EBook *book;
- char *query;
- guint editable : 1;
-
- GObject *object;
- GtkWidget *widget;
-
- GtkWidget *scrolled;
- GtkWidget *contact_display;
- GtkWidget *paned;
-
- /* Menus handler and the view instance */
- GalViewInstance *view_instance;
- GalViewMenus *view_menus;
- GalView *current_view;
- BonoboUIComponent *uic;
-};
-
-struct _EABViewClass
-{
- GtkEventBoxClass parent_class;
-
- /*
- * Signals
- */
- void (*status_message) (EABView *view, const gchar *message);
- void (*search_result) (EABView *view, EBookViewStatus status);
- void (*folder_bar_message) (EABView *view, const gchar *message);
- void (*command_state_change) (EABView *view);
-};
-
-GtkWidget *eab_view_new (void);
-GType eab_view_get_type (void);
-
-void eab_view_setup_menus (EABView *view,
- BonoboUIComponent *uic);
-
-void eab_view_discard_menus (EABView *view);
-
-void eab_view_save_as (EABView *view);
-void eab_view_view (EABView *view);
-void eab_view_send (EABView *view);
-void eab_view_send_to (EABView *view);
-void eab_view_print (EABView *view);
-void eab_view_print_preview (EABView *view);
-void eab_view_delete_selection (EABView *view);
-void eab_view_cut (EABView *view);
-void eab_view_copy (EABView *view);
-void eab_view_paste (EABView *view);
-void eab_view_select_all (EABView *view);
-void eab_view_show_all (EABView *view);
-void eab_view_stop (EABView *view);
-void eab_view_copy_to_folder (EABView *view);
-void eab_view_move_to_folder (EABView *view);
-
-gboolean eab_view_can_create (EABView *view);
-gboolean eab_view_can_print (EABView *view);
-gboolean eab_view_can_save_as (EABView *view);
-gboolean eab_view_can_view (EABView *view);
-gboolean eab_view_can_send (EABView *view);
-gboolean eab_view_can_send_to (EABView *view);
-gboolean eab_view_can_delete (EABView *view);
-gboolean eab_view_can_cut (EABView *view);
-gboolean eab_view_can_copy (EABView *view);
-gboolean eab_view_can_paste (EABView *view);
-gboolean eab_view_can_select_all (EABView *view);
-gboolean eab_view_can_stop (EABView *view);
-gboolean eab_view_can_copy_to_folder (EABView *view);
-gboolean eab_view_can_move_to_folder (EABView *view);
-
-G_END_DECLS;
-
-#endif /* __EAB_VIEW_H__ */
diff --git a/addressbook/gui/widgets/e-minicard-label.c b/addressbook/gui/widgets/e-minicard-label.c
deleted file mode 100644
index df1465349e..0000000000
--- a/addressbook/gui/widgets/e-minicard-label.c
+++ /dev/null
@@ -1,508 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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-label.h"
-#include "eab-marshal.h"
-
-#include <gtk/gtksignal.h>
-#include <libgnomecanvas/gnome-canvas-rect-ellipse.h>
-#include <libgnome/gnome-i18n.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 <gdk/gdkkeysyms.h>
-
-static void e_minicard_label_init (EMinicardLabel *card);
-static void e_minicard_label_class_init (EMinicardLabelClass *klass);
-static void e_minicard_label_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
-static void e_minicard_label_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
-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_style_set (EMinicardLabel *label, GtkStyle *previous_style);
-
-static void e_minicard_label_resize_children( EMinicardLabel *e_minicard_label );
-
-static void set_colors (EMinicardLabel *label);
-
-static GnomeCanvasGroupClass *parent_class = NULL;
-
-/* The arguments we take */
-enum {
- PROP_0,
- PROP_WIDTH,
- PROP_HEIGHT,
- PROP_HAS_FOCUS,
- PROP_FIELD,
- PROP_FIELDNAME,
- PROP_TEXT_MODEL,
- PROP_MAX_FIELD_NAME_WIDTH,
- PROP_EDITABLE
-};
-
-enum {
- STYLE_SET,
- LAST_SIGNAL
-};
-
-static guint e_minicard_label_signals [LAST_SIGNAL] = {0, };
-
-GType
-e_minicard_label_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (EMinicardLabelClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) e_minicard_label_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EMinicardLabel),
- 0, /* n_preallocs */
- (GInstanceInitFunc) e_minicard_label_init,
- };
-
- type = g_type_register_static (gnome_canvas_group_get_type (), "EMinicardLabel", &info, 0);
- }
-
- return type;
-}
-
-static void
-e_minicard_label_class_init (EMinicardLabelClass *klass)
-{
- GObjectClass *object_class;
- GnomeCanvasItemClass *item_class;
-
- object_class = G_OBJECT_CLASS (klass);
- item_class = (GnomeCanvasItemClass *) klass;
-
- klass->style_set = e_minicard_label_style_set;
-
- parent_class = g_type_class_peek_parent (klass);
-
- object_class->set_property = e_minicard_label_set_property;
- object_class->get_property = e_minicard_label_get_property;
- /* object_class->destroy = e_minicard_label_destroy; */
-
- g_object_class_install_property (object_class, PROP_WIDTH,
- g_param_spec_double ("width",
- _("Width"),
- /*_( */"XXX blurb" /*)*/,
- 0.0, G_MAXDOUBLE, 10.0,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_HEIGHT,
- g_param_spec_double ("height",
- _("Height"),
- /*_( */"XXX blurb" /*)*/,
- 0.0, G_MAXDOUBLE, 10.0,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_HAS_FOCUS,
- g_param_spec_boolean ("has_focus",
- _("Has Focus"),
- /*_( */"XXX blurb" /*)*/,
- FALSE,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_FIELD,
- g_param_spec_string ("field",
- _("Field"),
- /*_( */"XXX blurb" /*)*/,
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_FIELDNAME,
- g_param_spec_string ("fieldname",
- _("Field Name"),
- /*_( */"XXX blurb" /*)*/,
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_TEXT_MODEL,
- g_param_spec_object ("text_model",
- _("Text Model"),
- /*_( */"XXX blurb" /*)*/,
- E_TYPE_TEXT_MODEL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_MAX_FIELD_NAME_WIDTH,
- g_param_spec_double ("max_field_name_length",
- _("Max field name length"),
- /*_( */"XXX blurb" /*)*/,
- -1.0, G_MAXDOUBLE, -1.0,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_EDITABLE,
- g_param_spec_boolean ("editable",
- _("Editable"),
- /*_( */"XXX blurb" /*)*/,
- FALSE,
- G_PARAM_READWRITE));
-
- e_minicard_label_signals [STYLE_SET] =
- g_signal_new ("style_set",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (EMinicardLabelClass, style_set),
- NULL, NULL,
- eab_marshal_VOID__OBJECT,
- G_TYPE_NONE, 1,
- GTK_TYPE_STYLE);
-
- /* 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_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
-{
- EMinicardLabel *e_minicard_label;
- GnomeCanvasItem *item;
-
- e_minicard_label = E_MINICARD_LABEL (object);
- item = GNOME_CANVAS_ITEM (object);
-
- switch (prop_id){
- case PROP_WIDTH:
- e_minicard_label->width = g_value_get_double (value);
- e_minicard_label_resize_children(e_minicard_label);
- e_canvas_item_request_reflow (item);
- break;
- case PROP_HAS_FOCUS:
- if (e_minicard_label->field && (g_value_get_boolean (value) != E_FOCUS_NONE))
- e_canvas_item_grab_focus(e_minicard_label->field, FALSE);
- break;
- case PROP_FIELD:
- gnome_canvas_item_set( e_minicard_label->field, "text", g_value_get_string (value), NULL );
- break;
- case PROP_FIELDNAME:
- gnome_canvas_item_set( e_minicard_label->fieldname, "text", g_value_get_string (value), NULL );
- break;
- case PROP_TEXT_MODEL:
- gnome_canvas_item_set( e_minicard_label->field, "model", g_value_get_object (value), NULL);
- break;
- case PROP_MAX_FIELD_NAME_WIDTH:
- e_minicard_label->max_field_name_length = g_value_get_double (value);
- break;
- case PROP_EDITABLE:
- e_minicard_label->editable = g_value_get_boolean (value);
- g_object_set (e_minicard_label->field, "editable", FALSE /* e_minicard_label->editable */, NULL);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-e_minicard_label_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
-{
- EMinicardLabel *e_minicard_label;
-
- e_minicard_label = E_MINICARD_LABEL (object);
-
- switch (prop_id) {
- case PROP_WIDTH:
- g_value_set_double (value, e_minicard_label->width);
- break;
- case PROP_HEIGHT:
- g_value_set_double (value, e_minicard_label->height);
- break;
- case PROP_HAS_FOCUS:
- g_value_set_boolean (value, e_minicard_label->has_focus ? E_FOCUS_CURRENT : E_FOCUS_NONE);
- break;
- case PROP_FIELD:
- g_object_get_property (G_OBJECT (e_minicard_label->field),
- "text", value);
- break;
- case PROP_FIELDNAME:
- g_object_get_property (G_OBJECT (e_minicard_label->fieldname),
- "text", value);
- break;
- case PROP_TEXT_MODEL:
- g_object_get_property (G_OBJECT (e_minicard_label->field),
- "model", value);
- break;
- case PROP_MAX_FIELD_NAME_WIDTH:
- g_value_set_double (value, e_minicard_label->max_field_name_length);
- break;
- case PROP_EDITABLE:
- g_value_set_boolean (value, e_minicard_label->editable);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-e_minicard_label_realize (GnomeCanvasItem *item)
-{
- EMinicardLabel *e_minicard_label;
- GnomeCanvasGroup *group;
-
- e_minicard_label = E_MINICARD_LABEL (item);
- group = GNOME_CANVAS_GROUP( item );
-
- if (GNOME_CANVAS_ITEM_CLASS( parent_class )->realize)
- (* GNOME_CANVAS_ITEM_CLASS( parent_class )->realize) (item);
-
- e_canvas_item_request_reflow(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,
- "fill_color", "black",
- "draw_background", FALSE,
- "im_context", E_CANVAS (item->canvas)->im_context,
- 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,
- "fill_color", "black",
- "editable", FALSE, /* e_minicard_label->editable, */
- "draw_background", FALSE,
- "im_context", E_CANVAS (item->canvas)->im_context,
- NULL );
- e_canvas_item_move_absolute(e_minicard_label->field, ( e_minicard_label->width / 2 + 2), 1);
-
- set_colors (e_minicard_label);
-
- 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 (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_KEY_PRESS:
- if (event->key.keyval == GDK_Escape) {
- GnomeCanvasItem *parent;
-
- e_text_cancel_editing (E_TEXT (e_minicard_label->field));
-
- parent = GNOME_CANVAS_ITEM (e_minicard_label)->parent;
- if (parent)
- e_canvas_item_grab_focus(parent, FALSE);
- }
- break;
- case GDK_FOCUS_CHANGE: {
- GdkEventFocus *focus_event = (GdkEventFocus *) event;
-
- e_minicard_label->has_focus = focus_event->in;
- set_colors (e_minicard_label);
-
- g_object_set (e_minicard_label->field,
- "handle_popup", e_minicard_label->has_focus,
- NULL);
- break;
- }
- case GDK_BUTTON_PRESS:
- case GDK_BUTTON_RELEASE:
- case GDK_MOTION_NOTIFY:
- case GDK_ENTER_NOTIFY:
- case GDK_LEAVE_NOTIFY: {
- gboolean return_val;
- g_signal_emit_by_name(e_minicard_label->field, "event", event, &return_val);
- return return_val;
- }
- 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) MAX ( left_width, 0 ),
- NULL );
- gnome_canvas_item_set( e_minicard_label->field,
- "clip_width", (double) MAX ( e_minicard_label->width - 8 - left_width, 0 ),
- NULL );
-}
-
-static void
-set_colors (EMinicardLabel *label)
-{
- if ( (GTK_OBJECT_FLAGS( label ) & GNOME_CANVAS_ITEM_REALIZED) ) {
- GtkWidget *canvas = GTK_WIDGET (GNOME_CANVAS_ITEM (label)->canvas);
- GtkStyle *style = gtk_widget_get_style (canvas);
- if (label->has_focus) {
- gnome_canvas_item_set (label->rect,
- "outline_color_gdk", &style->mid[GTK_STATE_SELECTED],
- "fill_color_gdk", &style->bg[GTK_STATE_NORMAL],
- NULL);
-
- gnome_canvas_item_set (label->field,
- "fill_color_gdk", &canvas->style->text[GTK_STATE_NORMAL],
- NULL);
-
- gnome_canvas_item_set (label->fieldname,
- "fill_color_gdk", &canvas->style->text[GTK_STATE_NORMAL],
- NULL);
- }
- else {
- gnome_canvas_item_set (label->rect,
- "outline_color_gdk", NULL,
- "fill_color_gdk", NULL,
- NULL);
-
- gnome_canvas_item_set (label->field,
- "fill_color_gdk", &canvas->style->text[GTK_STATE_NORMAL],
- NULL);
-
- gnome_canvas_item_set (label->fieldname,
- "fill_color_gdk", &canvas->style->text[GTK_STATE_NORMAL],
- NULL);
- }
- }
-}
-
-static void
-e_minicard_label_style_set (EMinicardLabel *label, GtkStyle *previous_style)
-{
- set_colors (label);
-}
-
-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;
-
- g_object_get(e_minicard_label->fieldname,
- "text_height", &text_height,
- NULL);
-
- e_minicard_label->height = text_height;
-
-
- g_object_get(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 );
-
- gnome_canvas_item_set( e_minicard_label->fieldname,
- "clip_height", (double) e_minicard_label->height - 3,
- 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);
- 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 d914cb30bb..0000000000
--- a/addressbook/gui/widgets/e-minicard-label.h
+++ /dev/null
@@ -1,86 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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 <libgnomecanvas/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_TYPE_MINICARD_LABEL (e_minicard_label_get_type ())
-#define E_MINICARD_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_MINICARD_LABEL, EMinicardLabel))
-#define E_MINICARD_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_MINICARD_LABEL, EMiniCardLabelClass))
-#define E_IS_MINICARD_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_MINICARD_LABEL))
-#define E_IS_MINICARD_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_MINICARD_LABEL))
-
-
-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;
-
- void (* style_set) (EMinicardLabel *label, GtkStyle *previous_style);
-};
-
-
-GType 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 ff1bdc1f06..0000000000
--- a/addressbook/gui/widgets/e-minicard-view-widget.c
+++ /dev/null
@@ -1,440 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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 <gal/widgets/e-canvas-background.h>
-#include <gal/widgets/e-canvas.h>
-#include <libgnome/gnome-i18n.h>
-
-#include "eab-marshal.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_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
-static void e_minicard_view_widget_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
-static void e_minicard_view_widget_dispose (GObject *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_style_set (GtkWidget *widget, GtkStyle *previous_style);
-static void e_minicard_view_widget_realize (GtkWidget *widget);
-
-static ECanvasClass *parent_class = NULL;
-
-/* The arguments we take */
-enum {
- PROP_0,
- PROP_BOOK,
- PROP_QUERY,
- PROP_EDITABLE,
- PROP_COLUMN_WIDTH
-};
-
-enum {
- SELECTION_CHANGE,
- COLUMN_WIDTH_CHANGED,
- RIGHT_CLICK,
- LAST_SIGNAL
-};
-
-static guint signals [LAST_SIGNAL] = {0, };
-
-GType
-e_minicard_view_widget_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (EMinicardViewWidgetClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) e_minicard_view_widget_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EMinicardViewWidget),
- 0, /* n_preallocs */
- (GInstanceInitFunc) e_minicard_view_widget_init,
- };
-
- type = g_type_register_static (e_canvas_get_type (), "EMinicardViewWidget", &info, 0);
- }
-
- return type;
-}
-
-static void
-e_minicard_view_widget_class_init (EMinicardViewWidgetClass *klass)
-{
- GObjectClass *object_class;
- GtkWidgetClass *widget_class;
- ECanvasClass *canvas_class;
-
- object_class = (GObjectClass*) klass;
- widget_class = GTK_WIDGET_CLASS (klass);
- canvas_class = E_CANVAS_CLASS (klass);
-
- parent_class = gtk_type_class (e_canvas_get_type ());
-
- object_class->set_property = e_minicard_view_widget_set_property;
- object_class->get_property = e_minicard_view_widget_get_property;
- object_class->dispose = e_minicard_view_widget_dispose;
-
- g_object_class_install_property (object_class, PROP_BOOK,
- g_param_spec_object ("book",
- _("Book"),
- /*_( */"XXX blurb" /*)*/,
- E_TYPE_BOOK,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_QUERY,
- g_param_spec_string ("query",
- _("Query"),
- /*_( */"XXX blurb" /*)*/,
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_EDITABLE,
- g_param_spec_boolean ("editable",
- _("Editable"),
- /*_( */"XXX blurb" /*)*/,
- FALSE,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_COLUMN_WIDTH,
- g_param_spec_double ("column_width",
- _("Column Width"),
- /*_( */"XXX blurb" /*)*/,
- 0.0, G_MAXDOUBLE, 150.0,
- G_PARAM_READWRITE));
-
- signals [SELECTION_CHANGE] =
- g_signal_new ("selection_change",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EMinicardViewWidgetClass, selection_change),
- NULL, NULL,
- eab_marshal_NONE__NONE,
- G_TYPE_NONE, 0);
-
- signals [COLUMN_WIDTH_CHANGED] =
- g_signal_new ("column_width_changed",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EMinicardViewWidgetClass, column_width_changed),
- NULL, NULL,
- eab_marshal_NONE__DOUBLE,
- G_TYPE_NONE, 1, G_TYPE_DOUBLE);
-
- signals [RIGHT_CLICK] =
- g_signal_new ("right_click",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EMinicardViewWidgetClass, right_click),
- NULL, NULL,
- eab_marshal_INT__POINTER,
- G_TYPE_INT, 1, G_TYPE_POINTER);
-
- widget_class->style_set = e_minicard_view_widget_style_set;
- 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;
-
- klass->selection_change = NULL;
- klass->column_width_changed = NULL;
- klass->right_click = NULL;
-}
-
-static void
-e_minicard_view_widget_init (EMinicardViewWidget *view)
-{
- view->emv = NULL;
-
- view->book = NULL;
- view->query = NULL;
- view->editable = FALSE;
- view->column_width = 150;
-}
-
-GtkWidget *
-e_minicard_view_widget_new (EAddressbookReflowAdapter *adapter)
-{
- EMinicardViewWidget *widget = E_MINICARD_VIEW_WIDGET (g_object_new (e_minicard_view_widget_get_type (), NULL));
-
- widget->adapter = adapter;
- g_object_ref (widget->adapter);
-
- return GTK_WIDGET (widget);
-}
-
-static void
-e_minicard_view_widget_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- EMinicardViewWidget *emvw;
-
- emvw = E_MINICARD_VIEW_WIDGET (object);
-
- switch (prop_id){
- case PROP_BOOK:
- if (emvw->book)
- g_object_unref (emvw->book);
- if (g_value_get_object (value)) {
- emvw->book = E_BOOK(g_value_get_object (value));
- if (emvw->book)
- g_object_ref(emvw->book);
- } else
- emvw->book = NULL;
- if (emvw->emv)
- g_object_set(emvw->emv,
- "book", emvw->book,
- NULL);
- break;
- case PROP_QUERY:
- emvw->query = g_strdup(g_value_get_string (value));
- if (emvw->emv)
- g_object_set(emvw->emv,
- "query", emvw->query,
- NULL);
- break;
- case PROP_EDITABLE:
- emvw->editable = g_value_get_boolean (value);
- if (emvw->emv)
- g_object_set (emvw->emv,
- "editable", emvw->editable,
- NULL);
- break;
- case PROP_COLUMN_WIDTH:
- emvw->column_width = g_value_get_double (value);
- if (emvw->emv) {
- g_object_set (emvw->emv,
- "column_width", emvw->column_width,
- NULL);
- }
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-e_minicard_view_widget_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
-{
- EMinicardViewWidget *emvw;
-
- emvw = E_MINICARD_VIEW_WIDGET (object);
-
- switch (prop_id) {
- case PROP_BOOK:
- g_value_set_object (value, emvw->book);
- break;
- case PROP_QUERY:
- g_value_set_string (value, emvw->query);
- break;
- case PROP_EDITABLE:
- g_value_set_boolean (value, emvw->editable);
- break;
- case PROP_COLUMN_WIDTH:
- g_value_set_double (value, emvw->column_width);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-e_minicard_view_widget_dispose (GObject *object)
-{
- EMinicardViewWidget *view = E_MINICARD_VIEW_WIDGET(object);
-
- if (view->book) {
- g_object_unref (view->book);
- view->book = NULL;
- }
- if (view->query) {
- g_free(view->query);
- view->query = NULL;
- }
-
- if (view->adapter) {
- g_object_unref (view->adapter);
- view->adapter = NULL;
- }
-
- if (G_OBJECT_CLASS(parent_class)->dispose)
- G_OBJECT_CLASS(parent_class)->dispose (object);
-}
-
-static void
-selection_change (ESelectionModel *esm, EMinicardViewWidget *widget)
-{
- g_signal_emit (widget,
- signals [SELECTION_CHANGE], 0);
-}
-
-static void
-selection_row_change (ESelectionModel *esm, int row, EMinicardViewWidget *widget)
-{
- gboolean selected = e_selection_model_is_row_selected (esm, row);
-
- /* we only handle the selected case here */
- if (!selected)
- return;
-
- selection_change (esm, widget);
-}
-
-static void
-column_width_changed (ESelectionModel *esm, double width, EMinicardViewWidget *widget)
-{
- g_signal_emit (widget,
- signals [COLUMN_WIDTH_CHANGED], 0, width);
-}
-
-static guint
-right_click (EMinicardView *view, GdkEvent *event, EMinicardViewWidget *widget)
-{
- guint ret_val;
- g_signal_emit (widget,
- signals [RIGHT_CLICK], 0,
- event, &ret_val);
- return ret_val;
-}
-
-static void
-e_minicard_view_widget_style_set (GtkWidget *widget, GtkStyle *previous_style)
-{
- EMinicardViewWidget *view = E_MINICARD_VIEW_WIDGET(widget);
-
- if (view->background)
- gnome_canvas_item_set (view->background,
- "fill_color_gdk", &widget->style->base[GTK_STATE_NORMAL],
- NULL );
-
- if (GTK_WIDGET_CLASS(parent_class)->style_set)
- GTK_WIDGET_CLASS(parent_class)->style_set (widget, previous_style);
-}
-
-
-static void
-e_minicard_view_widget_realize (GtkWidget *widget)
-{
- EMinicardViewWidget *view = E_MINICARD_VIEW_WIDGET(widget);
- GtkStyle *style = gtk_widget_get_style (widget);
-
- view->background = gnome_canvas_item_new(gnome_canvas_root( GNOME_CANVAS(view) ),
- e_canvas_background_get_type(),
- "fill_color_gdk", &style->base[GTK_STATE_NORMAL],
- 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,
- "adapter", view->adapter,
- "column_width", view->column_width,
- NULL );
-
- g_signal_connect (E_REFLOW(view->emv)->selection,
- "selection_changed",
- G_CALLBACK (selection_change), view);
- g_signal_connect (E_REFLOW(view->emv)->selection,
- "selection_row_changed",
- G_CALLBACK (selection_row_change), view);
- g_signal_connect (view->emv,
- "column_width_changed",
- G_CALLBACK (column_width_changed), view);
- g_signal_connect (view->emv,
- "right_click",
- G_CALLBACK (right_click), 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 );
- g_object_get(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);
- }
-}
-
-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);
-
- g_object_get(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);
-}
-
-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;
-}
-
-EMinicardView *
-e_minicard_view_widget_get_view (EMinicardViewWidget *view)
-{
- if (view->emv)
- return E_MINICARD_VIEW (view->emv);
- 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 ef8401b88c..0000000000
--- a/addressbook/gui/widgets/e-minicard-view-widget.h
+++ /dev/null
@@ -1,73 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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 <libebook/e-book.h>
-#include "e-minicard-view.h"
-
-G_BEGIN_DECLS
-
-#define E_TYPE_MINICARD_VIEW_WIDGET (e_minicard_view_widget_get_type ())
-#define E_MINICARD_VIEW_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_MINICARD_VIEW_WIDGET, EMinicardViewWidget))
-#define E_MINICARD_VIEW_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_MINICARD_VIEW_WIDGET, EMinicardViewWidgetClass))
-#define E_IS_MINICARD_VIEW_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_MINICARD_VIEW_WIDGET))
-#define E_IS_MINICARD_VIEW_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_MINICARD_VIEW_WIDGET))
-
-
-typedef struct _EMinicardViewWidget EMinicardViewWidget;
-typedef struct _EMinicardViewWidgetClass EMinicardViewWidgetClass;
-
-struct _EMinicardViewWidget
-{
- ECanvas parent;
-
- GnomeCanvasItem *background;
- GnomeCanvasItem *emv;
-
- EAddressbookReflowAdapter *adapter;
-
- EBook *book;
- char *query;
- guint editable : 1;
-
- double column_width;
-};
-
-struct _EMinicardViewWidgetClass
-{
- ECanvasClass parent_class;
- void (*selection_change) (EMinicardViewWidget *emvw);
- void (*column_width_changed) (EMinicardViewWidget *emvw, double width);
- guint (*right_click) (EMinicardViewWidget *emvw);
-};
-
-
-GType e_minicard_view_widget_get_type (void);
-GtkWidget *e_minicard_view_widget_new (EAddressbookReflowAdapter *adapter);
-
-/* Get parts of the view widget. */
-ESelectionModel *e_minicard_view_widget_get_selection_model (EMinicardViewWidget *view);
-EMinicardView *e_minicard_view_widget_get_view (EMinicardViewWidget *view);
-
-G_END_DECLS
-
-#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 3c588c9ef2..0000000000
--- a/addressbook/gui/widgets/e-minicard-view.c
+++ /dev/null
@@ -1,581 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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 "eab-gui-util.h"
-#include "eab-marshal.h"
-#include "util/eab-book-util.h"
-
-#include <gtk/gtkselection.h>
-#include <gtk/gtkdnd.h>
-#include <gal/widgets/e-canvas.h>
-#include <libgnome/gnome-i18n.h>
-#include <string.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 {
- PROP_0,
- PROP_ADAPTER,
- PROP_BOOK,
- PROP_QUERY,
- PROP_EDITABLE
-};
-
-
-enum {
- RIGHT_CLICK,
- LAST_SIGNAL
-};
-
-static guint signals [LAST_SIGNAL] = {0, };
-
-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 = eab_contact_list_to_string (view->drag_list);
-
- gtk_selection_data_set (selection_data,
- selection_data->target,
- 8,
- value, strlen (value));
- break;
- }
- }
-
- g_list_foreach (view->drag_list, (GFunc)g_object_unref, NULL);
- g_list_free (view->drag_list);
- view->drag_list = NULL;
-}
-
-static int
-e_minicard_view_drag_begin (EAddressbookReflowAdapter *adapter, GdkEvent *event, EMinicardView *view)
-{
- GdkDragContext *context;
- GtkTargetList *target_list;
- GdkDragAction actions = GDK_ACTION_MOVE | GDK_ACTION_COPY;
-
- view->drag_list = e_minicard_view_get_card_list (view);
-
- 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 = g_signal_connect (GNOME_CANVAS_ITEM (view)->canvas,
- "drag_data_get",
- G_CALLBACK (e_minicard_view_drag_data_get),
- view);
-
- gtk_drag_set_icon_default (context);
-
- return TRUE;
-}
-
-static void
-set_empty_message (EMinicardView *view)
-{
- char *empty_message;
- gboolean editable = FALSE;
-
- if (view->adapter) {
- g_object_get (view->adapter,
- "editable", &editable,
- NULL);
- }
-
- if (editable)
- empty_message = _("\n\nThere are no items to show in this view.\n\n"
- "Double-click here to create a new Contact.");
- else
- empty_message = _("\n\nThere are no items to show in this view.");
-
- g_object_set (view,
- "empty_message", empty_message,
- NULL);
-}
-
-static void
-writable_status_change (EABModel *model, gboolean writable, EMinicardView *view)
-{
- set_empty_message (view);
-}
-
-static void
-adapter_changed (EMinicardView *view)
-{
- set_empty_message (view);
-
- g_signal_connect (view->adapter, "drag_begin",
- G_CALLBACK (e_minicard_view_drag_begin), view);
-}
-
-static void
-e_minicard_view_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- EMinicardView *view;
-
- view = E_MINICARD_VIEW (object);
-
- switch (prop_id){
- case PROP_ADAPTER:
- if (view->adapter) {
- if (view->writable_status_id) {
- EABModel *model;
- g_object_get (view->adapter,
- "model", &model,
- NULL);
- if (model) {
- g_signal_handler_disconnect (model, view->writable_status_id);
- }
- }
-
- g_object_unref (view->adapter);
- }
- view->writable_status_id = 0;
- view->adapter = g_value_get_object (value);
- g_object_ref (view->adapter);
- adapter_changed (view);
- g_object_set (view,
- "model", view->adapter,
- NULL);
- if (view->adapter) {
- EABModel *model;
- g_object_get (view->adapter,
- "model", &model,
- NULL);
- if (model) {
- view->writable_status_id =
- g_signal_connect (model, "writable_status",
- G_CALLBACK (writable_status_change), view);
- }
-
- }
- break;
- case PROP_BOOK:
- g_object_set (view->adapter,
- "book", g_value_get_object (value),
- NULL);
- set_empty_message (view);
- break;
- case PROP_QUERY:
- g_object_set (view->adapter,
- "query", g_value_get_string (value),
- NULL);
- break;
- case PROP_EDITABLE:
- g_object_set (view->adapter,
- "editable", g_value_get_boolean (value),
- NULL);
- set_empty_message (view);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-e_minicard_view_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
-{
- EMinicardView *view;
-
- view = E_MINICARD_VIEW (object);
-
- switch (prop_id) {
- case PROP_ADAPTER:
- g_value_set_object (value, view->adapter);
- break;
- case PROP_BOOK:
- g_object_get_property (G_OBJECT (view->adapter),
- "book", value);
- break;
- case PROP_QUERY:
- g_object_get_property (G_OBJECT (view->adapter),
- "query", value);
- break;
- case PROP_EDITABLE:
- g_object_get_property (G_OBJECT (view->adapter),
- "editable", value);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-e_minicard_view_dispose (GObject *object)
-{
- EMinicardView *view = E_MINICARD_VIEW(object);
-
- if (view->canvas_drag_data_get_id) {
- g_signal_handler_disconnect (GNOME_CANVAS_ITEM (view)->canvas,
- view->canvas_drag_data_get_id);
- view->canvas_drag_data_get_id = 0;
- }
-
- if (view->adapter) {
- if (view->writable_status_id) {
- EABModel *model;
- g_object_get (view->adapter,
- "model", &model,
- NULL);
- if (model) {
- g_signal_handler_disconnect (model, view->writable_status_id);
- }
- }
-
- g_object_unref (view->adapter);
- }
- view->writable_status_id = 0;
- view->adapter = NULL;
-
- if (G_OBJECT_CLASS(parent_class)->dispose)
- G_OBJECT_CLASS(parent_class)->dispose (object);
-}
-
-static guint
-e_minicard_view_right_click (EMinicardView *view, GdkEvent *event)
-{
- guint ret_val = 0;
- g_signal_emit (view, signals[RIGHT_CLICK], 0,
- event, &ret_val);
- return ret_val;
-}
-
-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) {
- gboolean editable;
-
- g_object_get(view->adapter, "editable", &editable, NULL);
-
- if (editable) {
- EBook *book;
- g_object_get(view, "book", &book, NULL);
-
- if (book && E_IS_BOOK (book))
- eab_show_contact_editor (book, e_contact_new(), TRUE, editable);
- }
- return TRUE;
- }
- case GDK_BUTTON_PRESS:
- if (event->button.button == 3) {
- e_minicard_view_right_click (view, event);
- }
- break;
- default:
- break;
- }
-
- if (GNOME_CANVAS_ITEM_CLASS(parent_class)->event)
- return GNOME_CANVAS_ITEM_CLASS(parent_class)->event(item, event);
- else
- return FALSE;
-}
-
-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_FOCUS_CHANGE:
- if (event->focus_change.in) {
- int i;
- for (i = 0; i < reflow->count; i++) {
- if (reflow->items[i] == item) {
- e_selection_model_maybe_do_something(reflow->selection, i, 0, 0);
- break;
- }
- }
- }
- break;
- case GDK_BUTTON_PRESS:
- if (event->button.button == 3) {
- return_val = e_minicard_view_right_click (view, event);
- if (!return_val)
- e_selection_model_right_click_up(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;
- EContact *contact;
- ViewCbClosure *viewcbclosure = user_data;
- EMinicardView *view = viewcbclosure->view;
- EBookCallback cb = viewcbclosure->cb;
- gpointer closure = viewcbclosure->closure;
-
- g_object_get (view->adapter,
- "book", &book,
- NULL);
-
- contact = e_addressbook_reflow_adapter_get_contact (view->adapter, i);
-
- e_book_async_remove_contact(book, contact, cb, closure);
-
- g_object_unref (contact);
-}
-
-#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;
- g_object_get(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
-
-static void
-e_minicard_view_class_init (EMinicardViewClass *klass)
-{
- GObjectClass *object_class;
- GnomeCanvasItemClass *item_class;
- EReflowClass *reflow_class;
-
- object_class = G_OBJECT_CLASS (klass);
- item_class = (GnomeCanvasItemClass *) klass;
- reflow_class = (EReflowClass *) klass;
-
- parent_class = g_type_class_peek_parent (klass);
-
- object_class->set_property = e_minicard_view_set_property;
- object_class->get_property = e_minicard_view_get_property;
- object_class->dispose = e_minicard_view_dispose;
-
- g_object_class_install_property (object_class, PROP_ADAPTER,
- g_param_spec_object ("adapter",
- _("Adapter"),
- /*_( */"XXX blurb" /*)*/,
- E_TYPE_ADDRESSBOOK_REFLOW_ADAPTER,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_BOOK,
- g_param_spec_object ("book",
- _("Book"),
- /*_( */"XXX blurb" /*)*/,
- E_TYPE_BOOK,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_QUERY,
- g_param_spec_string ("query",
- _("Query"),
- /*_( */"XXX blurb" /*)*/,
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_EDITABLE,
- g_param_spec_boolean ("editable",
- _("Editable"),
- /*_( */"XXX blurb" /*)*/,
- FALSE,
- G_PARAM_READWRITE));
-
- signals [RIGHT_CLICK] =
- g_signal_new ("right_click",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EMinicardViewClass, right_click),
- NULL, NULL,
- eab_marshal_INT__POINTER,
- G_TYPE_INT, 1, G_TYPE_POINTER);
-
- 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;
- view->writable_status_id = 0;
-
- set_empty_message (view);
-}
-
-GType
-e_minicard_view_get_type (void)
-{
- static GType reflow_type = 0;
-
- if (!reflow_type) {
- static const GTypeInfo reflow_info = {
- sizeof (EMinicardViewClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) e_minicard_view_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EMinicardView),
- 0, /* n_preallocs */
- (GInstanceInitFunc) e_minicard_view_init,
- };
-
- reflow_type = g_type_register_static (PARENT_TYPE, "EMinicardView", &reflow_info, 0);
- }
-
- return reflow_type;
-}
-
-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);
-}
-
-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
-}
-
-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_contact (mal->adapter, index));
-}
-
-GList *
-e_minicard_view_get_card_list (EMinicardView *view)
-{
- ModelAndList mal;
-
- mal.adapter = view->adapter;
- mal.list = NULL;
-
- e_selection_model_foreach (E_REFLOW (view)->selection, add_to_list, &mal);
-
- mal.list = g_list_reverse (mal.list);
- return mal.list;
-}
diff --git a/addressbook/gui/widgets/e-minicard-view.h b/addressbook/gui/widgets/e-minicard-view.h
deleted file mode 100644
index 2614b7577a..0000000000
--- a/addressbook/gui/widgets/e-minicard-view.h
+++ /dev/null
@@ -1,94 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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 <libebook/e-book.h>
-#include "e-addressbook-reflow-adapter.h"
-
-G_BEGIN_DECLS
-
-/* 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_TYPE_MINICARD_VIEW (e_minicard_view_get_type ())
-#define E_MINICARD_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_MINICARD_VIEW, EMinicardView))
-#define E_MINICARD_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_MINICARD_VIEW, EMinicardViewClass))
-#define E_IS_MINICARD_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_MINICARD_VIEW))
-#define E_IS_MINICARD_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_MINICARD_VIEW))
-
-
-typedef struct _EMinicardView EMinicardView;
-typedef struct _EMinicardViewClass EMinicardViewClass;
-
-struct _EMinicardView
-{
- EReflow parent;
-
- EAddressbookReflowAdapter *adapter;
-
- /* item specific fields */
-
- GList *drag_list;
-
- guint canvas_drag_data_get_id;
-
- guint writable_status_id;
-};
-
-struct _EMinicardViewClass
-{
- EReflowClass parent_class;
-
- void (*right_click) (EMinicardView *view, GdkEvent *event);
-};
-
-GType 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);
-GList *e_minicard_view_get_card_list (EMinicardView *view);
-
-
-G_END_DECLS
-
-#endif /* __E_MINICARD_VIEW_H__ */
diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c
deleted file mode 100644
index 259d2b12f0..0000000000
--- a/addressbook/gui/widgets/e-minicard.c
+++ /dev/null
@@ -1,968 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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 <string.h>
-#include <glib.h>
-#include <gtk/gtkdnd.h>
-#include <gtk/gtkmain.h>
-#include <gdk/gdkkeysyms.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomecanvas/gnome-canvas-rect-ellipse.h>
-#include <libgnomecanvas/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 <libebook/e-book.h>
-#include "eab-marshal.h"
-#include "eab-gui-util.h"
-#include "e-minicard.h"
-#include "e-minicard-label.h"
-#include "e-minicard-view.h"
-#include "e-contact-editor.h"
-#include "util/eab-destination.h"
-
-static void e_minicard_init (EMinicard *card);
-static void e_minicard_class_init (EMinicardClass *klass);
-static void e_minicard_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
-static void e_minicard_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
-static void e_minicard_dispose (GObject *object);
-static void e_minicard_finalize (GObject *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_style_set (EMinicard *minicard, GtkStyle *previous_style);
-
-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 {
- EContactField field;
- GnomeCanvasItem *label;
-};
-
-#define d(x)
-
-#define LIST_ICON_FILENAME "contact-list-16.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 {
- PROP_0,
- PROP_WIDTH,
- PROP_HEIGHT,
- PROP_HAS_FOCUS,
- PROP_SELECTED,
- PROP_HAS_CURSOR,
- PROP_EDITABLE,
- PROP_CONTACT
-};
-
-enum {
- SELECTED,
- DRAG_BEGIN,
- STYLE_SET,
- LAST_SIGNAL
-};
-
-static guint e_minicard_signals [LAST_SIGNAL] = {0, };
-
-GType
-e_minicard_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (EMinicardClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) e_minicard_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EMinicard),
- 0, /* n_preallocs */
- (GInstanceInitFunc) e_minicard_init,
- };
-
- type = g_type_register_static (gnome_canvas_group_get_type (), "EMinicard", &info, 0);
- }
-
- return type;
-}
-
-static void
-e_minicard_class_init (EMinicardClass *klass)
-{
- GObjectClass *object_class = (GObjectClass*) klass;
- GnomeCanvasItemClass *item_class = (GnomeCanvasItemClass *) klass;
-
- object_class->set_property = e_minicard_set_property;
- object_class->get_property = e_minicard_get_property;
- object_class->dispose = e_minicard_dispose;
- object_class->finalize = e_minicard_finalize;
-
- klass->style_set = e_minicard_style_set;
-
- parent_class = gtk_type_class (gnome_canvas_group_get_type ());
-
- g_object_class_install_property (object_class, PROP_WIDTH,
- g_param_spec_double ("width",
- _("Width"),
- /*_( */"XXX blurb" /*)*/,
- 0.0, G_MAXDOUBLE, 10.0,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_HEIGHT,
- g_param_spec_double ("height",
- _("Height"),
- /*_( */"XXX blurb" /*)*/,
- 0.0, G_MAXDOUBLE, 10.0,
- G_PARAM_READABLE));
-
- g_object_class_install_property (object_class, PROP_HAS_FOCUS,
- /* XXX should be _enum */
- g_param_spec_int ("has_focus",
- _("Has Focus"),
- /*_( */"XXX blurb" /*)*/,
- E_MINICARD_FOCUS_TYPE_START, E_MINICARD_FOCUS_TYPE_END,
- E_MINICARD_FOCUS_TYPE_START,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_SELECTED,
- g_param_spec_boolean ("selected",
- _("Selected"),
- /*_( */"XXX blurb" /*)*/,
- FALSE,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_HAS_CURSOR,
- g_param_spec_boolean ("has_cursor",
- _("Has Cursor"),
- /*_( */"XXX blurb" /*)*/,
- FALSE,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_EDITABLE,
- g_param_spec_boolean ("editable",
- _("Editable"),
- /*_( */"XXX blurb" /*)*/,
- FALSE,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_CONTACT,
- g_param_spec_object ("contact",
- _("Contact"),
- /*_( */"XXX blurb" /*)*/,
- E_TYPE_CONTACT,
- G_PARAM_READWRITE));
-
- e_minicard_signals [SELECTED] =
- g_signal_new ("selected",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EMinicardClass, selected),
- NULL, NULL,
- eab_marshal_INT__POINTER,
- G_TYPE_INT, 1, G_TYPE_POINTER);
-
- e_minicard_signals [DRAG_BEGIN] =
- g_signal_new ("drag_begin",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EMinicardClass, drag_begin),
- NULL, NULL,
- eab_marshal_INT__POINTER,
- G_TYPE_INT, 1, G_TYPE_POINTER);
-
- e_minicard_signals [STYLE_SET] =
- g_signal_new ("style_set",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (EMinicardClass, style_set),
- NULL, NULL,
- eab_marshal_VOID__OBJECT,
- G_TYPE_NONE, 1,
- GTK_TYPE_STYLE);
-
- /* 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->rect = NULL;
- minicard->fields = NULL;
- minicard->width = 10;
- minicard->height = 10;
- minicard->has_focus = FALSE;
- minicard->selected = FALSE;
- minicard->editable = FALSE;
- minicard->has_cursor = FALSE;
-
- minicard->contact = NULL;
-
- minicard->list_icon_pixbuf = gdk_pixbuf_new_from_file (EVOLUTION_IMAGESDIR "/" LIST_ICON_FILENAME, NULL);
- 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_ACTIVE],
- 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->text[GTK_STATE_NORMAL],
- NULL);
- }
- minicard->selected = selected;
-}
-
-static void
-set_has_cursor (EMinicard *minicard, gboolean has_cursor)
-{
- if (!minicard->has_focus && has_cursor)
- e_canvas_item_grab_focus(GNOME_CANVAS_ITEM (minicard), FALSE);
- minicard->has_cursor = has_cursor;
-}
-
-
-static void
-e_minicard_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
-{
- GnomeCanvasItem *item;
- EMinicard *e_minicard;
- GList *l;
-
- item = GNOME_CANVAS_ITEM (object);
- e_minicard = E_MINICARD (object);
-
- switch (prop_id){
- case PROP_WIDTH:
- if (e_minicard->width != g_value_get_double (value)) {
- e_minicard->width = g_value_get_double (value);
- e_minicard_resize_children(e_minicard);
- if ( GTK_OBJECT_FLAGS( e_minicard ) & GNOME_CANVAS_ITEM_REALIZED )
- e_canvas_item_request_reflow(item);
- }
- break;
- case PROP_HAS_FOCUS:
- if (e_minicard->fields) {
- if ( g_value_get_int(value) == E_FOCUS_START ||
- g_value_get_int(value) == E_FOCUS_CURRENT) {
- gnome_canvas_item_set(E_MINICARD_FIELD(e_minicard->fields->data)->label,
- "has_focus", g_value_get_int (value),
- NULL);
- } else if ( g_value_get_int (value) == E_FOCUS_END ) {
- gnome_canvas_item_set(E_MINICARD_FIELD(g_list_last(e_minicard->fields)->data)->label,
- "has_focus", g_value_get_int (value),
- NULL);
- }
- }
- else {
- if (!e_minicard->has_focus)
- e_canvas_item_grab_focus(item, FALSE);
- }
- break;
- case PROP_SELECTED:
- if (e_minicard->selected != g_value_get_boolean (value))
- set_selected (e_minicard, g_value_get_boolean (value));
- break;
- case PROP_EDITABLE:
- e_minicard->editable = g_value_get_boolean (value);
- for (l = e_minicard->fields; l; l = l->next) {
- g_object_set (E_MINICARD_FIELD (l->data)->label,
- "editable", FALSE /* e_minicard->editable */,
- NULL);
- }
- break;
- case PROP_HAS_CURSOR:
- d(g_print("%s: PROP_HAS_CURSOR\n", G_GNUC_FUNCTION));
- if (e_minicard->has_cursor != g_value_get_boolean (value))
- set_has_cursor (e_minicard, g_value_get_boolean (value));
- break;
- case PROP_CONTACT:
- if (e_minicard->contact)
- g_object_unref (e_minicard->contact);
- e_minicard->contact = E_CONTACT(g_value_get_object (value));
- if (e_minicard->contact)
- g_object_ref (e_minicard->contact);
- remodel(e_minicard);
- e_canvas_item_request_reflow(item);
- e_minicard->changed = FALSE;
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-e_minicard_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
-{
- EMinicard *e_minicard;
-
- e_minicard = E_MINICARD (object);
-
- switch (prop_id) {
- case PROP_WIDTH:
- g_value_set_double (value, e_minicard->width);
- break;
- case PROP_HEIGHT:
- g_value_set_double (value, e_minicard->height);
- break;
- case PROP_HAS_FOCUS:
- g_value_set_int (value, e_minicard->has_focus ? E_FOCUS_CURRENT : E_FOCUS_NONE);
- break;
- case PROP_SELECTED:
- g_value_set_boolean (value, e_minicard->selected);
- break;
- case PROP_HAS_CURSOR:
- g_value_set_boolean (value, e_minicard->has_cursor);
- break;
- case PROP_EDITABLE:
- g_value_set_boolean (value, e_minicard->editable);
- break;
- case PROP_CONTACT:
- g_value_set_object (value, e_minicard->contact);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-e_minicard_dispose (GObject *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->fields) {
- g_list_foreach(e_minicard->fields, (GFunc) e_minicard_field_destroy, NULL);
- g_list_free(e_minicard->fields);
- e_minicard->fields = NULL;
- }
-
- if (e_minicard->list_icon_pixbuf) {
- gdk_pixbuf_unref (e_minicard->list_icon_pixbuf);
- e_minicard->list_icon_pixbuf = NULL;
- }
-
- if (G_OBJECT_CLASS (parent_class)->dispose)
- (* G_OBJECT_CLASS (parent_class)->dispose) (object);
-}
-
-
-
-static void
-e_minicard_finalize (GObject *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->contact)
- g_object_unref (e_minicard->contact);
-
- if (G_OBJECT_CLASS (parent_class)->finalize)
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
-}
-
-static void
-e_minicard_style_set (EMinicard *minicard, GtkStyle *previous_style)
-{
- if ( (GTK_OBJECT_FLAGS( minicard ) & GNOME_CANVAS_ITEM_REALIZED) )
- set_selected (minicard, minicard->selected);
-}
-
-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) MAX (e_minicard->width - 1, 0),
- "y2", (double) MAX (e_minicard->height - 1, 0),
- "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) MAX (e_minicard->width - 3, 0),
- "y2", (double) MAX (e_minicard->height - 3, 0),
- "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) MAX( e_minicard->width - 12, 0 ),
- "clip", TRUE,
- "use_ellipsis", TRUE,
- "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);
-
- set_selected (e_minicard, e_minicard->selected);
-
- remodel(e_minicard);
- e_canvas_item_request_reflow(item);
-}
-
-static void
-e_minicard_unrealize (GnomeCanvasItem *item)
-{
- EMinicard *e_minicard;
-
- e_minicard = E_MINICARD (item);
-
- if (GNOME_CANVAS_ITEM_CLASS(parent_class)->unrealize)
- (* GNOME_CANVAS_ITEM_CLASS(parent_class)->unrealize) (item);
-}
-
-/* Callback used when the contact editor is closed */
-static void
-editor_closed_cb (GtkObject *editor, gpointer data)
-{
- EMinicard *minicard = data;
- g_object_unref (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;
- d(g_print("%s: GDK_FOCUS_CHANGE: %s\n", G_GNUC_FUNCTION, focus_event->in?"in":"out"));
- if (focus_event->in) {
- /* Chris: When EMinicard gets the cursor, if it doesn't have the focus, it should take it. */
- e_minicard->has_focus = TRUE;
- if (!e_minicard->selected) {
- e_minicard_selected(e_minicard, event);
- }
- }
- else {
- e_minicard->has_focus = FALSE;
- }
- }
- break;
- case GDK_BUTTON_PRESS: {
- if (1 <= event->button.button && event->button.button <= 2) {
- 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;
- } else if (event->button.button == 3) {
- int ret_val = e_minicard_selected(e_minicard, event);
- if (ret_val != 0)
- return ret_val;
- }
- break;
- }
- case GDK_BUTTON_RELEASE:
- e_minicard_selected(e_minicard, event);
- 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 (GPOINTER_TO_INT (e_contact_get (e_minicard->contact, E_CONTACT_IS_LIST)))
- 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)) {
- g_object_get(item->parent,
- "book", &book,
- NULL);
- }
-
- if (book != NULL) {
- if (e_contact_get (e_minicard->contact, E_CONTACT_IS_LIST)) {
- EContactListEditor *editor = eab_show_contact_list_editor (book, e_minicard->contact,
- FALSE, e_minicard->editable);
- e_minicard->editor = G_OBJECT (editor);
- }
- else {
- EContactEditor *editor = eab_show_contact_editor (book, e_minicard->contact,
- FALSE, e_minicard->editable);
- e_minicard->editor = G_OBJECT (editor);
- }
- g_object_ref (e_minicard->editor);
-
- g_signal_connect (e_minicard->editor, "editor_closed",
- G_CALLBACK (editor_closed_cb), e_minicard);
-
- g_object_unref (book);
- }
- }
- return TRUE;
- }
- break;
- default:
- break;
- }
-
- if (GNOME_CANVAS_ITEM_CLASS( parent_class )->event)
- return (* GNOME_CANVAS_ITEM_CLASS( parent_class )->event) (item, event);
- else
- return 0;
-}
-
-static void
-e_minicard_resize_children( EMinicard *e_minicard )
-{
- GList *list;
- gboolean is_list = GPOINTER_TO_INT (e_contact_get (e_minicard->contact, E_CONTACT_IS_LIST));
-
- if (e_minicard->header_text) {
- gnome_canvas_item_set( e_minicard->header_text,
- "width", ((double) e_minicard->width - 12
- - (is_list ? 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
-add_field (EMinicard *e_minicard, EContactField field, gdouble left_width)
-{
- GnomeCanvasItem *new_item;
- GnomeCanvasGroup *group;
- EMinicardField *minicard_field;
- char *name;
- char *string;
-
- group = GNOME_CANVAS_GROUP( e_minicard );
-
- name = g_strdup_printf("%s:", e_contact_pretty_name (field));
- string = e_contact_get (e_minicard->contact, field);
-
- /* Magically convert embedded XML into an address. */
- if (!strncmp (string, "<?xml", 5)) {
- EABDestination *dest = eab_destination_import (string);
- if (dest != NULL) {
- gchar *new_string = g_strdup (eab_destination_get_textrep (dest, TRUE));
- g_free (string);
- string = new_string;
- g_object_unref (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", FALSE /* e_minicard->editable */,
- NULL );
-#if notyet
- g_object_set(E_MINICARD_LABEL(new_item)->field,
- "allow_newlines", e_card_simple_get_allow_newlines (e_minicard->contact, field),
- NULL);
-#endif
- g_object_set_data(G_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 int
-get_left_width(EMinicard *e_minicard)
-{
- gchar *name;
- EContactField field;
- int width = -1;
- PangoLayout *layout;
-
- layout = gtk_widget_create_pango_layout (GTK_WIDGET (GNOME_CANVAS_ITEM (e_minicard)->canvas), "");
- for(field = E_CONTACT_FULL_NAME; field != E_CONTACT_LAST_SIMPLE_STRING; field++) {
- int this_width;
-
- if (field == E_CONTACT_FAMILY_NAME || field == E_CONTACT_GIVEN_NAME)
- continue;
-
- name = g_strdup_printf("%s:", e_contact_pretty_name (field));
- pango_layout_set_text (layout, name, -1);
- pango_layout_get_pixel_size (layout, &this_width, NULL);
- if (width < this_width)
- width = this_width;
- g_free(name);
- }
- g_object_unref (layout);
- 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->contact) {
- EContactField field;
- GList *list;
- char *file_as;
- int left_width = -1;
-
- if (e_minicard->header_text) {
- file_as = e_contact_get (e_minicard->contact, E_CONTACT_FILE_AS);
- gnome_canvas_item_set (e_minicard->header_text,
- "text", file_as ? file_as : "",
- NULL );
- g_free(file_as);
- }
-
- if (e_minicard->contact && e_contact_get (e_minicard->contact, E_CONTACT_IS_LIST))
- 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_CONTACT_FULL_NAME; field != E_CONTACT_LAST_SIMPLE_STRING && count < 5; field++) {
- EMinicardField *minicard_field = NULL;
-
- if (field == E_CONTACT_FAMILY_NAME || field == E_CONTACT_GIVEN_NAME)
- continue;
-
- if (list)
- minicard_field = list->data;
- if (minicard_field && minicard_field->field == field) {
- GList *this_list = list;
- char *string;
-
- string = e_contact_get(e_minicard->contact, field);
- if (string && *string) {
- /* Magically convert embedded XML into an address. */
- if (!strncmp (string, "<?xml", 4)) {
- EABDestination *dest = eab_destination_import (string);
- if (dest != NULL) {
- gchar *new_string = g_strdup (eab_destination_get_textrep (dest, TRUE));
- g_free (string);
- string = new_string;
- g_object_unref (dest);
- }
- }
-
- e_minicard->fields = g_list_append(e_minicard->fields, minicard_field);
- g_object_set(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_contact_get(e_minicard->contact, 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;
-
- g_object_get( 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;
- g_object_get (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,
- "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->contact) {
- return e_contact_get_const (minicard->contact, E_CONTACT_UID);
- } else {
- return "";
- }
-}
-
-int
-e_minicard_compare (EMinicard *minicard1, EMinicard *minicard2)
-{
- int cmp = 0;
-
- 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->contact && minicard2->contact) {
- char *file_as1, *file_as2;
- g_object_get(minicard1->contact,
- "file_as", &file_as1,
- NULL);
- g_object_get(minicard2->contact,
- "file_as", &file_as2,
- NULL);
-
- if (file_as1 && file_as2)
- cmp = g_utf8_collate(file_as1, file_as2);
- else if (file_as1)
- cmp = -1;
- else if (file_as2)
- cmp = 1;
- else
- cmp = strcmp(e_minicard_get_card_id(minicard1), e_minicard_get_card_id(minicard2));
-
- g_free (file_as1);
- g_free (file_as2);
- }
-
- return cmp;
-}
-
-int
-e_minicard_selected (EMinicard *minicard, GdkEvent *event)
-{
- gint ret_val = 0;
- GnomeCanvasItem *item = GNOME_CANVAS_ITEM (minicard);
- if (item->parent) {
- guint signal_id = g_signal_lookup ("selection_event", G_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) {
- g_signal_emit(item->parent,
- signal_id, 0,
- item, event, &ret_val);
- }
- }
- return ret_val;
-}
-
-static gint
-e_minicard_drag_begin (EMinicard *minicard, GdkEvent *event)
-{
- gint ret_val = 0;
- GnomeCanvasItem *parent;
- g_signal_emit (minicard,
- e_minicard_signals[DRAG_BEGIN], 0,
- event, &ret_val);
-
- parent = GNOME_CANVAS_ITEM (minicard)->parent;
- if (parent && E_IS_REFLOW (parent)) {
- E_REFLOW (parent)->maybe_in_drag = FALSE;
- }
- return ret_val;
-}
diff --git a/addressbook/gui/widgets/e-minicard.h b/addressbook/gui/widgets/e-minicard.h
deleted file mode 100644
index 2d0cfd8ed5..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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 <gdk-pixbuf/gdk-pixbuf.h>
-#include "addressbook/gui/contact-editor/e-contact-editor.h"
-#include <libgnomecanvas/gnome-canvas.h>
-#include <libebook/e-contact.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_TYPE_MINICARD (e_minicard_get_type ())
-#define E_MINICARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_MINICARD, EMinicard))
-#define E_MINICARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_MINICARD, EMinicardClass))
-#define E_IS_MINICARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_MINICARD))
-#define E_IS_MINICARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_MINICARD))
-
-
-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 */
- EContact *contact;
-
- GnomeCanvasItem *rect;
- GnomeCanvasItem *header_rect;
- GnomeCanvasItem *header_text;
- GnomeCanvasItem *list_icon;
-
- GdkPixbuf *list_icon_pixbuf;
- double list_icon_size;
-
- GObject *editor;
-
- GList *fields; /* Of type EMinicardField */
- guint needs_remodeling : 1;
-
- guint changed : 1;
-
- guint selected : 1;
- guint has_cursor : 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);
-
- void (* style_set) (EMinicard *minicard, GtkStyle *previous_style);
-};
-
-
-GType 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/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c
deleted file mode 100644
index 3de6eac380..0000000000
--- a/addressbook/gui/widgets/eab-contact-display.c
+++ /dev/null
@@ -1,486 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Chris Toshok <toshok@ximian.com>
- *
- * Copyright (C) 2003 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 "eab-contact-display.h"
-
-#include "e-util/e-html-utils.h"
-#include "util/eab-destination.h"
-
-#include <string.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnome/gnome-url.h>
-#include <gtkhtml/gtkhtml.h>
-#include <gtkhtml/gtkhtml-stream.h>
-
-#define PARENT_TYPE (gtk_vbox_get_type ())
-
-struct _EABContactDisplayPrivate {
- GtkHTML *html;
- EContact *contact;
-};
-
-
-#define HTML_HEADER "<!doctype html public \"-//W3C//DTD HTML 4.0 TRANSITIONAL//EN\">\n<html>\n" \
- "<head>\n<meta name=\"generator\" content=\"Evolution Addressbook Component\">\n</head>\n"
-
-#define MAX_COMPACT_IMAGE_DIMENSION 48
-
-static void
-on_url_requested (GtkHTML *html, const char *url, GtkHTMLStream *handle,
- EABContactDisplay *display)
-{
- printf ("on_url_requested (%s)\n", url);
- if (!strcmp (url, "internal-contact-photo:")) {
- EContactPhoto *photo;
-
- photo = e_contact_get (display->priv->contact, E_CONTACT_PHOTO);
- if (!photo)
- photo = e_contact_get (display->priv->contact, E_CONTACT_LOGO);
-
- printf ("writing a photo of length %d\n", photo->length);
-
- gtk_html_stream_write (handle, photo->data, photo->length);
-
- gtk_html_end (html, handle, GTK_HTML_STREAM_OK);
- }
-}
-
-static void
-on_link_clicked (GtkHTML *html, const char *url, EABContactDisplay *display)
-{
- GError *err = NULL;
-
- gnome_url_show (url, &err);
-
- if (err) {
- g_warning ("gnome_url_show: %s", err->message);
- g_error_free (err);
- }
-}
-
-static void
-render_address (GtkHTMLStream *html_stream, EContact *contact, const char *html_label, EContactField adr_field, EContactField label_field)
-{
- EContactAddress *adr;
- const char *label;
-
- label = e_contact_get_const (contact, label_field);
- if (label) {
- char *html = e_text_to_html (label, E_TEXT_TO_HTML_CONVERT_NL);
-
- gtk_html_stream_printf (html_stream, "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr valign=\"top\"><td>");
- gtk_html_stream_printf (html_stream, "<b>%s:</b>&nbsp;<td>%s<br>", html_label, html);
-
- gtk_html_stream_printf (html_stream, "<a href=\"http://www.mapquest.com/\">%s</a>", _("Map It"));
- gtk_html_stream_printf (html_stream, "</td></tr></table>");
- g_free (html);
- return;
- }
-
- adr = e_contact_get (contact, adr_field);
- if (adr &&
- (adr->po || adr->ext || adr->street || adr->locality || adr->region || adr->code || adr->country)) {
-
- gtk_html_stream_printf (html_stream, "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr valign=\"top\"><td>");
- gtk_html_stream_printf (html_stream, "<b>%s:</b>&nbsp;<td>", html_label);
-
- if (adr->po && *adr->po) gtk_html_stream_printf (html_stream, "%s<br>", adr->po);
- if (adr->ext && *adr->ext) gtk_html_stream_printf (html_stream, "%s<br>", adr->ext);
- if (adr->street && *adr->street) gtk_html_stream_printf (html_stream, "%s<br>", adr->street);
- if (adr->locality && *adr->locality) gtk_html_stream_printf (html_stream, "%s<br>", adr->locality);
- if (adr->region && *adr->region) gtk_html_stream_printf (html_stream, "%s<br>", adr->region);
- if (adr->code && *adr->code) gtk_html_stream_printf (html_stream, "%s<br>", adr->code);
- if (adr->country && *adr->country) gtk_html_stream_printf (html_stream, "%s<br>", adr->country);
-
- gtk_html_stream_printf (html_stream, "<a href=\"http://www.mapquest.com/\">%s</a>", _("Map It"));
- gtk_html_stream_printf (html_stream, "</td></tr></table>");
- }
- if (adr)
- e_contact_address_free (adr);
-}
-
-static void
-render_string (GtkHTMLStream *html_stream, EContact *contact, const char *html_label, EContactField field)
-{
- const char *str;
-
- str = e_contact_get_const (contact, field);
-
- if (str && *str) {
- char *html = e_text_to_html (str, 0);
- gtk_html_stream_printf (html_stream, "<b>%s:</b> %s<br>", html_label, str);
- g_free (html);
- }
-}
-
-static void
-render_url (GtkHTMLStream *html_stream, EContact *contact, const char *html_label, EContactField field)
-{
- const char *str;
- str = e_contact_get_const (contact, field);
- if (str && *str) {
- char *html = e_text_to_html (str, E_TEXT_TO_HTML_CONVERT_URLS);
- gtk_html_stream_printf (html_stream, "<b>%s:</b> %s<br>",
- html_label, html);
- g_free (html);
- }
-}
-
-static void
-eab_contact_display_render_normal (EABContactDisplay *display, EContact *contact)
-{
- GtkHTMLStream *html_stream;
-
- if (display->priv->contact)
- g_object_unref (display->priv->contact);
- display->priv->contact = contact;
- if (display->priv->contact)
- g_object_ref (display->priv->contact);
-
- html_stream = gtk_html_begin (display->priv->html);
- gtk_html_stream_write (html_stream, HTML_HEADER, sizeof (HTML_HEADER) - 1);
- gtk_html_stream_write (html_stream, "<body>\n", 7);
-
- if (contact) {
- char *str, *html;
- EContactPhoto *photo;
-
- gtk_html_stream_printf (html_stream, "<table border=\"0\" valign=\"top\"><tr valign=\"top\"><td>");
- photo = e_contact_get (contact, E_CONTACT_PHOTO);
- if (!photo)
- photo = e_contact_get (contact, E_CONTACT_LOGO);
- if (photo) {
- gtk_html_stream_printf (html_stream, "<img src=\"internal-contact-photo:\">");
- e_contact_photo_free (photo);
- }
-
- gtk_html_stream_printf (html_stream, "</td><td>\n");
-
- str = e_contact_get_const (contact, E_CONTACT_FILE_AS);
- if (str) {
- html = e_text_to_html (str, 0);
- gtk_html_stream_printf (html_stream, "<h2>%s</h2>", html);
- g_free (html);
- }
- else {
- str = e_contact_get_const (contact, E_CONTACT_FULL_NAME);
- if (str) {
- html = e_text_to_html (str, 0);
- gtk_html_stream_printf (html_stream, "<h2>%s</h2>", html);
- g_free (html);
- }
- }
-
- if (e_contact_get (contact, E_CONTACT_IS_LIST)) {
- GList *email_list;
- GList *l;
-
- gtk_html_stream_printf (html_stream, "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr valign=\"top\"><td>");
- gtk_html_stream_printf (html_stream, "<b>%s:</b>&nbsp;<td>", _("List Members"));
-
- email_list = e_contact_get (contact, E_CONTACT_EMAIL);
- for (l = email_list; l; l = l->next) {
- EABDestination *dest = eab_destination_import (l->data);
- if (dest) {
- const char *textrep = eab_destination_get_textrep (dest, TRUE);
- char *html = e_text_to_html (textrep, 0);
- gtk_html_stream_printf (html_stream, "%s<br>", html);
- g_free (html);
- g_object_unref (dest);
- }
- }
- gtk_html_stream_printf (html_stream, "</td></tr></table>");
- }
- else {
- render_string (html_stream, contact, _("Job Title"), E_CONTACT_TITLE);
-
- render_string (html_stream, contact, _("Email"), E_CONTACT_EMAIL_1);
- render_string (html_stream, contact, _("Email"), E_CONTACT_EMAIL_2);
- render_string (html_stream, contact, _("Email"), E_CONTACT_EMAIL_3);
-
-
- render_address (html_stream, contact, _("Home Address"), E_CONTACT_ADDRESS_HOME, E_CONTACT_ADDRESS_LABEL_HOME);
- render_address (html_stream, contact, _("Work Address"), E_CONTACT_ADDRESS_WORK, E_CONTACT_ADDRESS_LABEL_WORK);
- render_address (html_stream, contact, _("Other Address"), E_CONTACT_ADDRESS_OTHER, E_CONTACT_ADDRESS_LABEL_OTHER);
-
- gtk_html_stream_printf (html_stream, "<hr>");
-
- render_url (html_stream, contact, _("Home page"), E_CONTACT_HOMEPAGE_URL);
- render_url (html_stream, contact, _("Blog"), E_CONTACT_BLOG_URL);
-
- }
-
- gtk_html_stream_printf (html_stream, "</td></tr></table>\n");
- }
-
- gtk_html_stream_write (html_stream, "</body></html>\n", 15);
- gtk_html_end (display->priv->html, html_stream, GTK_HTML_STREAM_OK);
-}
-
-static void
-eab_contact_display_render_compact (EABContactDisplay *display, EContact *contact)
-{
- GtkHTMLStream *html_stream;
-
- if (display->priv->contact)
- g_object_unref (display->priv->contact);
- display->priv->contact = contact;
- if (display->priv->contact)
- g_object_ref (display->priv->contact);
-
- html_stream = gtk_html_begin (display->priv->html);
- gtk_html_stream_write (html_stream, HTML_HEADER, sizeof (HTML_HEADER) - 1);
- gtk_html_stream_write (html_stream, "<body>\n", 7);
-
- if (contact) {
- char *str, *html;
- EContactPhoto *photo;
-
- gtk_html_stream_printf (html_stream,
- "<table width=\"100%%\" cellpadding=1 cellspacing=0 bgcolor=\"#000000\">"
- "<tr><td>"
- "<table width=\"100%%\" cellpadding=0 cellspacing=0 bgcolor=\"#eeeeee\">"
- "<tr><td>"
- "<table>"
- "<tr valign=\"top\"><td>");
-
- photo = e_contact_get (contact, E_CONTACT_PHOTO);
- if (!photo)
- photo = e_contact_get (contact, E_CONTACT_LOGO);
- if (photo) {
- int calced_width = MAX_COMPACT_IMAGE_DIMENSION, calced_height = MAX_COMPACT_IMAGE_DIMENSION;
- GdkPixbufLoader *loader = gdk_pixbuf_loader_new ();
- GdkPixbuf *pixbuf;
-
- /* figure out if we need to downscale the
- image here. we don't scale the pixbuf
- itself, just insert width/height tags in
- the html */
- gdk_pixbuf_loader_write (loader, photo->data, photo->length, NULL);
- pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
- gdk_pixbuf_loader_close (loader, NULL);
- g_object_unref (loader);
- if (pixbuf) {
- int max_dimension = gdk_pixbuf_get_height (pixbuf);
- if (max_dimension < gdk_pixbuf_get_width (pixbuf))
- max_dimension = gdk_pixbuf_get_width (pixbuf);
-
- calced_width = (float)gdk_pixbuf_get_width (pixbuf) / max_dimension * MAX_COMPACT_IMAGE_DIMENSION;
- calced_height = (float)gdk_pixbuf_get_height (pixbuf) / max_dimension * MAX_COMPACT_IMAGE_DIMENSION;
-
- calced_width = MIN (calced_width, MAX_COMPACT_IMAGE_DIMENSION);
- calced_height = MIN (calced_height, MAX_COMPACT_IMAGE_DIMENSION);
- }
-
- gdk_pixbuf_unref (pixbuf);
- gtk_html_stream_printf (html_stream, "<img width=\"%d\" height=\"%d\" src=\"internal-contact-photo:\">",
- calced_width, calced_height);
- e_contact_photo_free (photo);
- }
-
- gtk_html_stream_printf (html_stream, "</td><td>\n");
-
- str = e_contact_get_const (contact, E_CONTACT_FILE_AS);
- if (str) {
- html = e_text_to_html (str, 0);
- gtk_html_stream_printf (html_stream, "<b>%s</b>", html);
- g_free (html);
- }
- else {
- str = e_contact_get_const (contact, E_CONTACT_FULL_NAME);
- if (str) {
- html = e_text_to_html (str, 0);
- gtk_html_stream_printf (html_stream, "<b>%s</b>", html);
- g_free (html);
- }
- }
-
- gtk_html_stream_write (html_stream, "<hr>", 4);
-
- if (e_contact_get (contact, E_CONTACT_IS_LIST)) {
- GList *email_list;
- GList *l;
-
- gtk_html_stream_printf (html_stream, "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr valign=\"top\"><td>");
- gtk_html_stream_printf (html_stream, "<b>%s:</b>&nbsp;<td>", _("List Members"));
-
- email_list = e_contact_get (contact, E_CONTACT_EMAIL);
- for (l = email_list; l; l = l->next) {
- EABDestination *dest = eab_destination_import (l->data);
- if (dest) {
- const char *textrep = eab_destination_get_textrep (dest, TRUE);
- char *html = e_text_to_html (textrep, 0);
- gtk_html_stream_printf (html_stream, "%s, ", html);
- g_free (html);
- g_object_unref (dest);
- }
- }
- gtk_html_stream_printf (html_stream, "</td></tr></table>");
- }
- else {
- gboolean comma = FALSE;
- str = e_contact_get_const (contact, E_CONTACT_TITLE);
- if (str) {
- html = e_text_to_html (str, 0);
- gtk_html_stream_printf (html_stream, "<b>%s:</b> %s<br>", _("Job Title"), str);
- g_free (html);
- }
-
- gtk_html_stream_printf (html_stream, "<b>%s:</b> ", _("Email"));
- str = e_contact_get_const (contact, E_CONTACT_EMAIL_1);
- if (str) {
- html = e_text_to_html (str, 0);
- gtk_html_stream_printf (html_stream, "%s", str);
- g_free (html);
- comma = TRUE;
- }
- str = e_contact_get_const (contact, E_CONTACT_EMAIL_2);
- if (str) {
- html = e_text_to_html (str, 0);
- gtk_html_stream_printf (html_stream, "%s%s", comma ? ", " : "", str);
- g_free (html);
- comma = TRUE;
- }
- str = e_contact_get_const (contact, E_CONTACT_EMAIL_3);
- if (str) {
- html = e_text_to_html (str, 0);
- gtk_html_stream_printf (html_stream, "%s%s", comma ? ", " : "", str);
- g_free (html);
- }
- gtk_html_stream_write (html_stream, "<br>", 4);
-
- str = e_contact_get_const (contact, E_CONTACT_HOMEPAGE_URL);
- if (str) {
- html = e_text_to_html (str, E_TEXT_TO_HTML_CONVERT_URLS);
- gtk_html_stream_printf (html_stream, "<b>%s:</b> %s<br>",
- _("Home page"), html);
- g_free (html);
- }
-
- str = e_contact_get_const (contact, E_CONTACT_BLOG_URL);
- if (str) {
- html = e_text_to_html (str, E_TEXT_TO_HTML_CONVERT_URLS);
- gtk_html_stream_printf (html_stream, "<b>%s:</b> %s<br>",
- _("Blog"), html);
- }
- }
-
- gtk_html_stream_printf (html_stream, "</td></tr></table></td></tr></table></td></tr></table>\n");
- }
-
- gtk_html_stream_write (html_stream, "</body></html>\n", 15);
- gtk_html_end (display->priv->html, html_stream, GTK_HTML_STREAM_OK);
-}
-
-void
-eab_contact_display_render (EABContactDisplay *display, EContact *contact,
- EABContactDisplayRenderMode mode)
-{
- switch (mode) {
- case EAB_CONTACT_DISPLAY_RENDER_NORMAL:
- eab_contact_display_render_normal (display, contact);
- break;
- case EAB_CONTACT_DISPLAY_RENDER_COMPACT:
- eab_contact_display_render_compact (display, contact);
- break;
- }
-}
-
-GtkWidget*
-eab_contact_display_new (void)
-{
- EABContactDisplay *display;
-
- display = g_object_new (EAB_TYPE_CONTACT_DISPLAY, NULL);
-
- display->priv = g_new0 (EABContactDisplayPrivate, 1);
-
- display->priv->html = GTK_HTML (gtk_html_new ());
-
- gtk_html_set_default_content_type (display->priv->html, "text/html; charset=utf-8");
-
- gtk_html_set_editable (display->priv->html, FALSE);
-
-
- g_signal_connect (display->priv->html, "url_requested",
- G_CALLBACK (on_url_requested),
- display);
- g_signal_connect (display->priv->html, "link_clicked",
- G_CALLBACK (on_link_clicked),
- display);
-#if 0
- g_signal_connect (display->priv->html, "object_requested",
- G_CALLBACK (on_object_requested),
- mail_display);
- g_signal_connect (display->priv->html, "button_press_event",
- G_CALLBACK (html_button_press_event), mail_display);
- g_signal_connect (display->priv->html, "motion_notify_event",
- G_CALLBACK (html_motion_notify_event), mail_display);
- g_signal_connect (display->priv->html, "enter_notify_event",
- G_CALLBACK (html_enter_notify_event), mail_display);
- g_signal_connect (display->priv->html, "iframe_created",
- G_CALLBACK (html_iframe_created), mail_display);
- g_signal_connect (display->priv->html, "on_url",
- G_CALLBACK (html_on_url), mail_display);
-#endif
-
- gtk_box_pack_start_defaults (GTK_BOX (display), GTK_WIDGET (display->priv->html));
- gtk_widget_show (GTK_WIDGET (display->priv->html));
-
- return GTK_WIDGET (display);
-}
-
-
-static void
-eab_contact_display_init (GObject *object)
-{
-}
-
-static void
-eab_contact_display_class_init (GtkObjectClass *object_class)
-{
- // object_class->destroy = mail_display_destroy;
-}
-
-GType
-eab_contact_display_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (EABContactDisplayClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) eab_contact_display_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EABContactDisplay),
- 0, /* n_preallocs */
- (GInstanceInitFunc) eab_contact_display_init,
- };
-
- type = g_type_register_static (PARENT_TYPE, "EABContactDisplay", &info, 0);
- }
-
- return type;
-}
diff --git a/addressbook/gui/widgets/eab-contact-display.h b/addressbook/gui/widgets/eab-contact-display.h
deleted file mode 100644
index e7f47031ce..0000000000
--- a/addressbook/gui/widgets/eab-contact-display.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Chris Toshok <toshok@ximian.com>
- *
- * Copyright 2003 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 _EAB_CONTACT_DISPLAY_H_
-#define _EAB_CONTACT_DISPLAY_H_
-
-#include <gtk/gtkvbox.h>
-#include <gtkhtml/gtkhtml.h>
-#include <libebook/e-contact.h>
-
-#define EAB_TYPE_CONTACT_DISPLAY (eab_contact_display_get_type ())
-#define EAB_CONTACT_DISPLAY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EAB_TYPE_CONTACT_DISPLAY, EABContactDisplay))
-#define EAB_CONTACT_DISPLAY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), EAB_TYPE_CONTACT_DISPLAY, EABContactDisplayClass))
-#define IS_EAB_CONTACT_DISPLAY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EAB_TYPE_CONTACT_DISPLAY))
-#define IS_EAB_CONTACT_DISPLAY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EAB_TYPE_CONTACT_DISPLAY))
-
-typedef struct _EABContactDisplay EABContactDisplay;
-typedef struct _EABContactDisplayPrivate EABContactDisplayPrivate;
-typedef struct _EABContactDisplayClass EABContactDisplayClass;
-
-typedef enum {
- EAB_CONTACT_DISPLAY_RENDER_NORMAL, /* for use in the preview pane */
- EAB_CONTACT_DISPLAY_RENDER_COMPACT /* for use with embedded vcards (e.g, the EABVCardControl) */
-} EABContactDisplayRenderMode;
-
-struct _EABContactDisplay {
- GtkVBox parent;
-
- EABContactDisplayPrivate *priv;
-};
-
-struct _EABContactDisplayClass {
- GtkVBoxClass parent_class;
-};
-
-GtkType eab_contact_display_get_type (void);
-GtkWidget * eab_contact_display_new (void);
-
-void eab_contact_display_render (EABContactDisplay *display, EContact *contact,
- EABContactDisplayRenderMode render_mode);
-
-#endif /* _EAB_CONTACT_DISPLAY_H_ */
diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c
deleted file mode 100644
index bd4ed78463..0000000000
--- a/addressbook/gui/widgets/eab-gui-util.c
+++ /dev/null
@@ -1,819 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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 <errno.h>
-#include <string.h>
-
-#include <gal/util/e-util.h>
-#include "eab-gui-util.h"
-#include "util/eab-book-util.h"
-#include "util/eab-destination.h"
-
-#include <gnome.h>
-
-#include "addressbook/gui/contact-editor/e-contact-editor.h"
-#include "addressbook/gui/contact-list-editor/e-contact-list-editor.h"
-
-void
-eab_error_dialog (const gchar *msg, EBookStatus status)
-{
- static char *status_to_string[] = {
- N_("Success"),
- N_("Unknown error"),
- N_("Repository offline"),
- N_("Permission denied"),
- N_("Contact not found"),
- N_("Contact ID already exists"),
- N_("Protocol not supported"),
- N_("Cancelled"),
- N_("Authentication Failed"),
- N_("Authentication Required"),
- N_("TLS not Available"),
- N_("Addressbook does not exist"),
- N_("Other error")
- };
- char *error_msg;
- GtkWidget *dialog;
-
- error_msg = g_strdup_printf ("%s: %s", msg, _(status_to_string [status]));
-
- dialog = gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
- error_msg);
-
- g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL);
-
- gtk_widget_show (dialog);
-
- g_free (error_msg);
-}
-
-gint
-eab_prompt_save_dialog (GtkWindow *parent)
-{
- GtkWidget *dialog;
- gint response;
-
- dialog = gtk_message_dialog_new (parent,
- (GtkDialogFlags)0,
- GTK_MESSAGE_QUESTION,
- GTK_BUTTONS_NONE,
- _("Do you want to save changes?"));
- gtk_dialog_add_buttons (GTK_DIALOG (dialog),
- _("_Discard"), GTK_RESPONSE_NO,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE, GTK_RESPONSE_YES,
- NULL);
-
- gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_YES);
-
- response = gtk_dialog_run (GTK_DIALOG (dialog));
-
- gtk_widget_destroy (dialog);
-
- return response;
-}
-
-static void
-added_cb (EBook* book, EBookStatus status, const char *id,
- gboolean is_list)
-{
- if (status != E_BOOK_ERROR_OK) {
- eab_error_dialog (is_list ? _("Error adding list") : _("Error adding contact"), status);
- }
-}
-
-static void
-modified_cb (EBook* book, EBookStatus status,
- gboolean is_list)
-{
- if (status != E_BOOK_ERROR_OK) {
- eab_error_dialog (is_list ? _("Error modifying list") : _("Error modifying contact"),
- status);
- }
-}
-
-static void
-deleted_cb (EBook* book, EBookStatus status,
- gboolean is_list)
-{
- if (status != E_BOOK_ERROR_OK) {
- eab_error_dialog (is_list ? _("Error removing list") : _("Error removing contact"),
- status);
- }
-}
-
-static void
-editor_closed_cb (GtkObject *editor, gpointer data)
-{
- g_object_unref (editor);
-}
-
-EContactEditor *
-eab_show_contact_editor (EBook *book, EContact *contact,
- gboolean is_new_contact,
- gboolean editable)
-{
- EContactEditor *ce;
-
- ce = e_contact_editor_new (book, contact, is_new_contact, editable);
-
- g_signal_connect (ce, "contact_added",
- G_CALLBACK (added_cb), GINT_TO_POINTER (FALSE));
- g_signal_connect (ce, "contact_modified",
- G_CALLBACK (modified_cb), GINT_TO_POINTER (FALSE));
- g_signal_connect (ce, "contact_deleted",
- G_CALLBACK (deleted_cb), GINT_TO_POINTER (FALSE));
- g_signal_connect (ce, "editor_closed",
- G_CALLBACK (editor_closed_cb), NULL);
-
- return ce;
-}
-
-EContactListEditor *
-eab_show_contact_list_editor (EBook *book, EContact *contact,
- gboolean is_new_contact,
- gboolean editable)
-{
- EContactListEditor *ce;
-
- ce = e_contact_list_editor_new (book, contact, is_new_contact, editable);
-
- g_signal_connect (ce, "list_added",
- G_CALLBACK (added_cb), GINT_TO_POINTER (TRUE));
- g_signal_connect (ce, "list_modified",
- G_CALLBACK (modified_cb), GINT_TO_POINTER (TRUE));
- g_signal_connect (ce, "list_deleted",
- G_CALLBACK (deleted_cb), GINT_TO_POINTER (TRUE));
- g_signal_connect (ce, "editor_closed",
- G_CALLBACK (editor_closed_cb), GINT_TO_POINTER (TRUE));
-
- e_contact_list_editor_show (ce);
-
- return ce;
-}
-
-static void
-view_contacts (EBook *book, GList *list, gboolean editable)
-{
- for (; list; list = list->next) {
- EContact *contact = list->data;
- if (e_contact_get (contact, E_CONTACT_IS_LIST))
- eab_show_contact_list_editor (book, contact, FALSE, editable);
- else
- eab_show_contact_editor (book, contact, FALSE, editable);
- }
-}
-
-void
-eab_show_multiple_contacts (EBook *book,
- GList *list,
- gboolean editable)
-{
- if (list) {
- int length = g_list_length (list);
- if (length > 5) {
- GtkWidget *dialog;
- gint response;
-
- dialog = gtk_message_dialog_new (NULL,
- 0,
- GTK_MESSAGE_QUESTION,
- GTK_BUTTONS_YES_NO,
- _("Opening %d contacts will open %d new windows as well.\n"
- "Do you really want to display all of these contacts?"),
- length,
- length);
-
- response = gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
- if (response == GTK_RESPONSE_YES)
- view_contacts (book, list, editable);
- } else {
- view_contacts (book, list, editable);
- }
- }
-}
-
-
-static gint
-file_exists(GtkFileSelection *filesel, const char *filename)
-{
- GtkWidget *dialog;
- gint response;
-
- dialog = gtk_message_dialog_new (GTK_WINDOW (filesel),
- 0,
- GTK_MESSAGE_QUESTION,
- GTK_BUTTONS_NONE,
- _("%s already exists\nDo you want to overwrite it?"), filename);
-
- gtk_dialog_add_buttons (GTK_DIALOG (dialog),
- GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
- _("Overwrite"), GTK_RESPONSE_ACCEPT,
- NULL);
-
- response = gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
- return response;
-}
-
-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 GTK_RESPONSE_ACCEPT : /* Overwrite */
- e_write_file(filename, info->vcard, O_WRONLY | O_CREAT | O_TRUNC);
- break;
- case GTK_RESPONSE_REJECT : /* cancel */
- return;
- }
- } else if (error != 0) {
- GtkWidget *dialog;
- char *str;
-
- str = g_strdup_printf (_("Error saving %s: %s"), filename, strerror(errno));
- dialog = gtk_message_dialog_new (GTK_WINDOW (info->filesel),
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- str);
- g_free (str);
-
- gtk_widget_show (dialog);
-
- return;
- }
-
- gtk_widget_destroy(GTK_WIDGET(info->filesel));
-}
-
-static void
-close_it(GtkWidget *widget, SaveAsInfo *info)
-{
- gtk_widget_destroy (GTK_WIDGET (info->filesel));
-}
-
-static void
-destroy_it(void *data, GObject *where_the_object_was)
-{
- SaveAsInfo *info = data;
- g_free (info->vcard);
- g_free (info);
-}
-
-static char *
-make_safe_filename (const char *prefix, char *name)
-{
- char *safe, *p;
-
- if (!name) {
- /* This is a filename. Translators take note. */
- name = _("card.vcf");
- }
-
- p = strrchr (name, '/');
- if (p)
- safe = g_strdup_printf ("%s%s%s", prefix, p, ".vcf");
- else
- safe = g_strdup_printf ("%s/%s%s", prefix, name, ".vcf");
-
- p = strrchr (safe, '/') + 1;
- if (p)
- e_filename_make_safe (p);
-
- return safe;
-}
-
-void
-eab_contact_save (char *title, EContact *contact, GtkWindow *parent_window)
-{
- GtkFileSelection *filesel;
- char *file;
- char *name;
- SaveAsInfo *info = g_new(SaveAsInfo, 1);
-
- filesel = GTK_FILE_SELECTION(gtk_file_selection_new(title));
-
- name = e_contact_get (contact, E_CONTACT_FILE_AS);
- file = make_safe_filename (g_get_home_dir(), name);
- gtk_file_selection_set_filename (filesel, file);
- g_free (file);
-
- info->filesel = filesel;
- info->vcard = e_vcard_to_string (E_VCARD (contact), EVC_FORMAT_VCARD_30);
-
- g_signal_connect(filesel->ok_button, "clicked",
- G_CALLBACK (save_it), info);
- g_signal_connect(filesel->cancel_button, "clicked",
- G_CALLBACK (close_it), info);
- g_object_weak_ref (G_OBJECT (filesel), destroy_it, info);
-
- if (parent_window) {
- gtk_window_set_transient_for (GTK_WINDOW (filesel),
- parent_window);
- gtk_window_set_modal (GTK_WINDOW (filesel), TRUE);
- }
-
- gtk_widget_show(GTK_WIDGET(filesel));
-}
-
-void
-eab_contact_list_save (char *title, GList *list, GtkWindow *parent_window)
-{
- GtkFileSelection *filesel;
- SaveAsInfo *info = g_new(SaveAsInfo, 1);
-
- filesel = GTK_FILE_SELECTION(gtk_file_selection_new(title));
-
- /* This is a filename. Translators take note. */
- if (list && list->data && list->next == NULL) {
- char *name, *file;
- name = e_contact_get (E_CONTACT (list->data), E_CONTACT_FILE_AS);
- if (!name)
- name = e_contact_get (E_CONTACT (list->data), E_CONTACT_FULL_NAME);
-
- file = make_safe_filename (g_get_home_dir(), name);
- gtk_file_selection_set_filename (filesel, file);
- g_free (file);
- } else {
- char *file;
- file = make_safe_filename (g_get_home_dir(), _("list"));
- gtk_file_selection_set_filename (filesel, file);
- g_free (file);
- }
-
- info->filesel = filesel;
- info->vcard = eab_contact_list_to_string (list);
-
- g_signal_connect(filesel->ok_button, "clicked",
- G_CALLBACK (save_it), info);
- g_signal_connect(filesel->cancel_button, "clicked",
- G_CALLBACK (close_it), info);
- g_object_weak_ref (G_OBJECT (filesel), destroy_it, info);
-
- if (parent_window) {
- gtk_window_set_transient_for (GTK_WINDOW (filesel),
- parent_window);
- gtk_window_set_modal (GTK_WINDOW (filesel), TRUE);
- }
-
- gtk_widget_show(GTK_WIDGET(filesel));
-}
-
-typedef struct ContactCopyProcess_ ContactCopyProcess;
-
-typedef void (*ContactCopyDone) (ContactCopyProcess *process);
-
-struct ContactCopyProcess_ {
- int count;
- GList *contacts;
- EBook *source;
- EBook *destination;
- ContactCopyDone done_cb;
-};
-
-static void
-contact_deleted_cb (EBook* book, EBookStatus status, gpointer user_data)
-{
- if (status != E_BOOK_ERROR_OK) {
- eab_error_dialog (_("Error removing contact"), status);
- }
-}
-
-static void
-do_delete (gpointer data, gpointer user_data)
-{
- EBook *book = user_data;
- EContact *contact = data;
-
- e_book_async_remove_contact(book, contact, contact_deleted_cb, NULL);
-}
-
-static void
-delete_contacts (ContactCopyProcess *process)
-{
- g_list_foreach (process->contacts,
- do_delete,
- process->source);
-}
-
-static void
-process_unref (ContactCopyProcess *process)
-{
- process->count --;
- if (process->count == 0) {
- if (process->done_cb) {
- process->done_cb (process);
- }
- e_free_object_list(process->contacts);
- g_object_unref (process->source);
- g_object_unref (process->destination);
- g_free (process);
- }
-}
-
-static void
-contact_added_cb (EBook* book, EBookStatus status, const char *id, gpointer user_data)
-{
- ContactCopyProcess *process = user_data;
-
- if (status != E_BOOK_ERROR_OK) {
- eab_error_dialog (_("Error adding contact"), status);
- } else {
- process_unref (process);
- }
-}
-
-static void
-do_copy (gpointer data, gpointer user_data)
-{
- EBook *book;
- EContact *contact;
- ContactCopyProcess *process;
-
- process = user_data;
- contact = data;
-
- book = process->destination;
-
- process->count ++;
- e_book_async_add_contact(book, contact, contact_added_cb, process);
-}
-
-static void
-got_book_cb (EBook *book, EBookStatus status, gpointer closure)
-{
- ContactCopyProcess *process;
- process = closure;
- if (status == E_BOOK_ERROR_OK) {
- process->destination = book;
- g_object_ref (book);
- g_list_foreach (process->contacts,
- do_copy,
- process);
- }
- process_unref (process);
-}
-
-void
-eab_transfer_contacts (EBook *source, GList *contacts /* adopted */, gboolean delete_from_source, GtkWindow *parent_window)
-{
-#if 0
- EBook *dest;
- const char *allowed_types[] = { "contacts/*", NULL };
- GNOME_Evolution_Folder *folder;
- static char *last_uri = NULL;
- ContactCopyProcess *process;
- char *desc;
-
- if (contacts == NULL)
- return;
-
- if (last_uri == NULL)
- last_uri = g_strdup ("");
-
- if (contacts->next == NULL) {
- if (delete_from_source)
- desc = _("Move contact to");
- else
- desc = _("Copy contact to");
- } else {
- if (delete_from_source)
- desc = _("Move contacts to");
- else
- desc = _("Copy contacts to");
- }
-
- evolution_shell_client_user_select_folder (global_shell_client,
- parent_window,
- desc, last_uri, allowed_types,
- &folder);
-
- if (!folder)
- return;
-
- if (strcmp (last_uri, folder->evolutionUri) != 0) {
- g_free (last_uri);
- last_uri = g_strdup (folder->evolutionUri);
- }
-
- process = g_new (ContactCopyProcess, 1);
- process->count = 1;
- process->source = source;
- g_object_ref (source);
- process->contacts = contacts;
- process->destination = NULL;
-
- if (delete_from_source)
- process->done_cb = delete_contacts;
- else
- process->done_cb = NULL;
-
- dest = e_book_new ();
- e_book_async_load_uri (dest, folder->physicalUri, got_book_cb, process);
-
- CORBA_free (folder);
-#endif
-}
-
-#include <Evolution-Composer.h>
-
-#define COMPOSER_OAFID "OAFIID:GNOME_Evolution_Mail_Composer:" BASE_VERSION
-
-void
-eab_send_contact_list (GList *contacts, EABDisposition disposition)
-{
-#if notyet
- GNOME_Evolution_Composer composer_server;
- CORBA_Environment ev;
-
- if (contacts == NULL)
- return;
-
- CORBA_exception_init (&ev);
-
- composer_server = bonobo_activation_activate_from_id (COMPOSER_OAFID, 0, NULL, &ev);
-
- if (disposition == EAB_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 = contacts; iter != NULL; iter = g_list_next (iter)) {
- EContact *contact = E_CONTACT (iter->data);
- if (e_contact_get (contact, E_CONTACT_IS_LIST)) {
- 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 EABDestinations. */
- EABDestination *dest = eab_destination_import (e_iterator_get (iterator));
- if (dest != NULL) {
- name = g_strdup (eab_destination_get_name (dest));
- addr = g_strdup (eab_destination_get_email (dest));
- free_name_addr = TRUE;
- g_object_unref (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;
-
- }
- g_object_unref (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);
- } else if (disposition == EAB_DISPOSITION_AS_ATTACHMENT) {
- CORBA_char *content_type, *filename, *description;
- GNOME_Evolution_Composer_AttachmentData *attach_data;
- CORBA_boolean show_inline;
- char *tempstr;
-
- GNOME_Evolution_Composer_RecipientList *to_list, *cc_list, *bcc_list;
- CORBA_char *subject;
-
- 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;
-
- g_object_get(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 = eab_contact_list_to_string (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);
-
- to_list = GNOME_Evolution_Composer_RecipientList__alloc ();
- to_list->_maximum = to_list->_length = 0;
-
- 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;
-
- if (!cards || cards->next) {
- subject = CORBA_string_dup ("Contact information");
- } else {
- ECard *card = cards->data;
- const gchar *tempstr2;
-
- tempstr2 = NULL;
- g_object_get(card,
- "file_as", &tempstr2,
- NULL);
- if (!tempstr2 || !*tempstr2)
- g_object_get(card,
- "full_name", &tempstr2,
- NULL);
- if (!tempstr2 || !*tempstr2)
- g_object_get(card,
- "org", &tempstr2,
- NULL);
- if (!tempstr2 || !*tempstr2) {
- EList *list;
- EIterator *iterator;
- g_object_get(card,
- "email", &list,
- NULL);
- iterator = e_list_get_iterator (list);
- if (e_iterator_is_valid (iterator)) {
- tempstr2 = e_iterator_get (iterator);
- }
- g_object_unref (iterator);
- }
-
- if (!tempstr2 || !*tempstr2)
- tempstr = g_strdup_printf ("Contact information");
- else
- tempstr = g_strdup_printf ("Contact information for %s", tempstr2);
- subject = CORBA_string_dup (tempstr);
- g_free (tempstr);
- }
-
- GNOME_Evolution_Composer_setHeaders (composer_server, "", to_list, cc_list, bcc_list, subject, &ev);
-
- CORBA_free (to_list);
- CORBA_free (cc_list);
- CORBA_free (bcc_list);
- CORBA_free (subject);
- }
-
- 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);
-#endif
-}
-
-void
-eab_send_contact (EContact *contact, EABDisposition disposition)
-{
- GList *list;
- list = g_list_prepend (NULL, contact);
- eab_send_contact_list (list, disposition);
- g_list_free (list);
-}
diff --git a/addressbook/gui/widgets/eab-gui-util.h b/addressbook/gui/widgets/eab-gui-util.h
deleted file mode 100644
index 24a0a78577..0000000000
--- a/addressbook/gui/widgets/eab-gui-util.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* eab-gui-util.h
- * Copyright (C) 2001-2003 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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 <gtk/gtkwindow.h>
-#include <libebook/e-book.h>
-#include "addressbook/gui/contact-editor/e-contact-editor.h"
-#include "addressbook/gui/contact-list-editor/e-contact-list-editor.h"
-
-G_BEGIN_DECLS
-
-void eab_error_dialog (const gchar *msg,
- EBookStatus status);
-gint eab_prompt_save_dialog (GtkWindow *parent);
-
-EContactEditor *eab_show_contact_editor (EBook *book,
- EContact *contact,
- gboolean is_new_contact,
- gboolean editable);
-EContactListEditor *eab_show_contact_list_editor (EBook *book,
- EContact *contact,
- gboolean is_new_contact,
- gboolean editable);
-void eab_show_multiple_contacts (EBook *book,
- GList *list,
- gboolean editable);
-void eab_transfer_contacts (EBook *source,
- GList *contacts, /* adopted */
- gboolean delete_from_source,
- GtkWindow *parent_window);
-
-void eab_contact_save (char *title,
- EContact *contact,
- GtkWindow *parent_window);
-
-void eab_contact_list_save (char *title,
- GList *list,
- GtkWindow *parent_window);
-
-typedef enum {
- EAB_DISPOSITION_AS_ATTACHMENT,
- EAB_DISPOSITION_AS_TO,
-} EABDisposition;
-
-void eab_send_contact (EContact *contact,
- EABDisposition disposition);
-void eab_send_contact_list (GList *contacts,
- EABDisposition disposition);
-
-G_END_DECLS
-
-#endif /* __E_ADDRESSBOOK_UTIL_H__ */
diff --git a/addressbook/gui/widgets/eab-marshal.list b/addressbook/gui/widgets/eab-marshal.list
deleted file mode 100644
index 2b34707dbb..0000000000
--- a/addressbook/gui/widgets/eab-marshal.list
+++ /dev/null
@@ -1,11 +0,0 @@
-INT:POINTER
-NONE:NONE
-NONE:BOOL
-NONE:POINTER
-NONE:OBJECT
-NONE:ENUM
-NONE:INT,INT
-NONE:INT
-NONE:UINT
-NONE:DOUBLE
-INT:POINTER
diff --git a/addressbook/gui/widgets/eab-popup-control.c b/addressbook/gui/widgets/eab-popup-control.c
deleted file mode 100644
index 6e2ad6a603..0000000000
--- a/addressbook/gui/widgets/eab-popup-control.c
+++ /dev/null
@@ -1,1236 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * eab-popup-control.c
- *
- * Copyright (C) 2001-2003, Ximian, Inc.
- *
- * Authors: Jon Trowbridge <trow@ximian.com>
- * Chris Toshok <toshok@ximian.com>
- */
-
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <string.h>
-#include "addressbook.h"
-#include "eab-popup-control.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 <libebook/e-book-async.h>
-#include <addressbook/util/eab-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/eab-contact-display.h>
-#include <addressbook/gui/widgets/eab-gui-util.h>
-#include "e-util/e-gui-utils.h"
-
-static void eab_popup_control_set_name (EABPopupControl *pop, const gchar *name);
-static void eab_popup_control_set_email (EABPopupControl *pop, const gchar *email);
-
-/*
- * 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_get_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_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 (gpointer closure, GObject *where_object_was)
-{
- 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 *bbox;
-
- wiz->body = gtk_vbox_new (FALSE, 2);
- wiz->vbox = gtk_vbox_new (FALSE, 2);
- wiz->ok_button = gtk_button_new_from_stock (GTK_STOCK_OK);
- wiz->cancel_button = gtk_button_new_from_stock (GTK_STOCK_CANCEL);
-
- wiz->ok_cb = NULL;
- wiz->cleanup_cb = NULL;
- wiz->closure = NULL;
-
- wiz->destroy_cb = NULL;
- wiz->destroy_closure = NULL;
-
- bbox = gtk_hbutton_box_new ();
- gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox),
- GTK_BUTTONBOX_END);
-
- gtk_box_pack_start (GTK_BOX (bbox), wiz->cancel_button, FALSE, TRUE, 0);
- gtk_box_pack_start (GTK_BOX (bbox), wiz->ok_button, FALSE, TRUE, 0);
-
- gtk_box_set_spacing (GTK_BOX (bbox),
- 10 /* ugh */);
-
- 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), bbox, FALSE, TRUE, 2);
-
- gtk_widget_show_all (wiz->body);
-
- g_signal_connect (wiz->ok_button,
- "clicked",
- G_CALLBACK (mini_wizard_ok_cb),
- wiz);
- g_signal_connect (wiz->cancel_button,
- "clicked",
- G_CALLBACK (mini_wizard_cancel_cb),
- wiz);
-
- g_object_weak_ref (G_OBJECT (wiz->body),
- 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
- * contact.
- */
-
-#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 *) g_object_get_data (G_OBJECT (w), "addr");
-
- menu->current_selection = addr;
-}
-
-static void
-email_menu_add_option (EMailMenu *menu, char *addr)
-{
- GtkWidget *menu_item;
-
- g_return_if_fail (menu != NULL);
- if (addr == NULL)
- return;
-
- menu->options = g_list_append (menu->options, addr);
-
- menu_item = gtk_menu_item_new_with_label (addr);
- g_object_set_data (G_OBJECT (menu_item), "addr", addr);
- gtk_widget_show_all (menu_item);
- gtk_menu_shell_append (GTK_MENU_SHELL (gtk_option_menu_get_menu (GTK_OPTION_MENU (menu->option_menu))), menu_item);
-
- g_signal_connect (menu_item,
- "activate",
- G_CALLBACK (menu_activate_cb),
- menu);
-}
-
-static void
-email_menu_add_options_from_contact (EMailMenu *menu, EContact *contact, const gchar *extra_addr)
-{
- g_return_if_fail (contact && E_IS_CONTACT (contact));
-
- /* 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_contact_get (contact, E_CONTACT_EMAIL_1));
- email_menu_add_option (menu, e_contact_get (contact, E_CONTACT_EMAIL_2));
- email_menu_add_option (menu, e_contact_get (contact, E_CONTACT_EMAIL_3));
- email_menu_add_option (menu, g_strdup (extra_addr));
- email_menu_add_option (menu, EMPTY_ENTRY);
-}
-
-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;
- EContact *contact;
- EMailMenu *primary;
- EMailMenu *email2;
- EMailMenu *email3;
-};
-
-static void
-email_table_cleanup_cb (gpointer closure)
-{
- EMailTable *et = (EMailTable *) closure;
-
- if (et == NULL)
- return;
-
- g_object_unref (et->contact);
- email_menu_free (et->primary);
- email_menu_free (et->email2);
- email_menu_free (et->email3);
-
- g_free (et);
-}
-
-static void
-email_table_from_contact (EMailTable *et)
-{
- g_return_if_fail (et != NULL);
-
- email_menu_set_option (et->primary, e_contact_get_const (et->contact, E_CONTACT_EMAIL_1));
- email_menu_set_option (et->email2, e_contact_get_const (et->contact, E_CONTACT_EMAIL_2));
- email_menu_set_option (et->email3, e_contact_get_const (et->contact, E_CONTACT_EMAIL_3));
-}
-
-static void
-email_table_to_contact (EMailTable *et)
-{
- gchar *curr;
-
- g_return_if_fail (et != NULL);
-
- curr = et->primary->current_selection;
- if (curr && !strcmp (curr, _(EMPTY_ENTRY)))
- curr = NULL;
- e_contact_set (et->contact, E_CONTACT_EMAIL_1, curr);
-
- curr = et->email2->current_selection;
- if (curr && !strcmp (curr, _(EMPTY_ENTRY)))
- curr = NULL;
- e_contact_set (et->contact, E_CONTACT_EMAIL_2, curr);
-
- curr = et->email3->current_selection;
- if (curr && !strcmp (curr, _(EMPTY_ENTRY)))
- curr = NULL;
- e_contact_set (et->contact, E_CONTACT_EMAIL_3, curr);
-}
-
-static void
-email_table_save_contact_cb (EBook *book, EBookStatus status, gpointer closure)
-{
- EContact *contact = E_CONTACT (closure);
-
- if (status == E_BOOK_ERROR_OK) {
- e_book_async_commit_contact (book, contact, NULL, NULL);
- }
- if (book)
- g_object_unref (book);
- g_object_unref (contact);
-}
-
-static void
-email_table_ok_cb (MiniWizard *wiz, gpointer closure)
-{
- EMailTable *et = (EMailTable *) closure;
-
- email_table_to_contact (et);
-
- g_object_ref (et->contact);
-
- addressbook_load_default_book (email_table_save_contact_cb, et->contact);
-
- mini_wizard_destroy (wiz);
-}
-
-static void
-email_table_init (MiniWizard *wiz, EContact *contact, 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 (contact && E_IS_CONTACT (contact));
-
- et = g_new (EMailTable, 1);
-
- et->contact = contact;
- g_object_ref (et->contact);
-
- 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_contact (et->primary, et->contact, extra_address);
- email_menu_add_options_from_contact (et->email2, et->contact, extra_address);
- email_menu_add_options_from_contact (et->email3, et->contact, extra_address);
-
- email_table_from_contact (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_contact_get (et->contact, E_CONTACT_FULL_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 contacts
- * and decide which one you want to add the e-mail address to.
- */
-
-typedef struct _ContactPicker ContactPicker;
-struct _ContactPicker {
- GtkWidget *body;
- GtkWidget *list;
- GtkListStore *model;
- GList *contacts;
- gchar *new_name;
- gchar *new_email;
-
- EContact *current_contact;
-};
-
-enum {
- COLUMN_ACTION,
- COLUMN_CONTACT
-};
-
-static void
-contact_picker_selection_changed (GtkTreeSelection *selection, gpointer closure)
-{
- MiniWizard *wiz = (MiniWizard *) closure;
- ContactPicker *pick = (ContactPicker *) wiz->closure;
- gboolean selected;
- GtkTreeIter iter;
-
- selected = gtk_tree_selection_get_selected (selection, NULL, &iter);
-
- gtk_widget_set_sensitive (wiz->ok_button, selected);
-
- if (selected) {
- gtk_tree_model_get (GTK_TREE_MODEL (pick->model), &iter,
- COLUMN_CONTACT, &pick->current_contact,
- -1);
- }
- else {
- pick->current_contact = NULL;
- }
-}
-
-static void
-contact_picker_ok_cb (MiniWizard *wiz, gpointer closure)
-{
- ContactPicker *pick = (ContactPicker *) closure;
-
- if (pick->current_contact == NULL) {
- e_contact_quick_add (pick->new_name, pick->new_email, NULL, NULL);
- mini_wizard_destroy (wiz);
- } else {
- email_table_init (wiz, pick->current_contact, pick->new_email);
- }
-}
-
-static void
-contact_picker_cleanup_cb (gpointer closure)
-{
- ContactPicker *pick = (ContactPicker *) closure;
-
- g_list_foreach (pick->contacts, (GFunc) g_object_unref, NULL);
- g_list_free (pick->contacts);
-
- g_free (pick->new_name);
- g_free (pick->new_email);
-}
-
-static void
-free_str (gpointer data,
- GObject *where_the_object_was)
-{
- g_free (data);
-}
-
-static void
-contact_picker_init (MiniWizard *wiz, const GList *contacts, const gchar *new_name, const gchar *new_email)
-{
- ContactPicker *pick;
- gchar *str;
- GtkWidget *w;
- GtkTreeIter iter;
-
- pick = g_new (ContactPicker, 1);
-
- pick->body = gtk_vbox_new (FALSE, 2);
-
- pick->model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_POINTER);
-
- pick->list = gtk_tree_view_new_with_model (GTK_TREE_MODEL (pick->model));
-
- gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (pick->list), TRUE);
-
- gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (pick->list),
- COLUMN_ACTION,
- _("Select an Action"),
- gtk_cell_renderer_text_new (),
- "text", COLUMN_ACTION,
- NULL);
-
- gtk_tree_selection_set_mode (gtk_tree_view_get_selection (GTK_TREE_VIEW (pick->list)),
- GTK_SELECTION_SINGLE);
-
- str = g_strdup_printf (_("Create a new contact \"%s\""), new_name);
- gtk_list_store_append (pick->model, &iter);
- gtk_list_store_set (pick->model, &iter,
- COLUMN_ACTION, str,
- COLUMN_CONTACT, NULL,
- -1);
- g_object_weak_ref (G_OBJECT (pick->model), free_str, str);
-
- pick->contacts = NULL;
- while (contacts) {
- EContact *contact = (EContact *) contacts->data;
- gchar *name_str = e_contact_get (contact, E_CONTACT_FULL_NAME);
-
- pick->contacts = g_list_append (pick->contacts, contact);
- g_object_ref (contact);
-
- str = g_strdup_printf (_("Add address to existing contact \"%s\""), name_str);
- gtk_list_store_append (pick->model, &iter);
- gtk_list_store_set (pick->model, &iter,
- COLUMN_ACTION, str,
- COLUMN_CONTACT, contact,
- -1);
- g_free (name_str);
-
- g_object_weak_ref (G_OBJECT (pick->model), free_str, str);
-
- contacts = g_list_next (contacts);
- }
-
- pick->new_name = g_strdup (new_name);
- pick->new_email = g_strdup (new_email);
-
- pick->current_contact = NULL;
- gtk_widget_set_sensitive (wiz->ok_button, FALSE);
-
- /* Connect some signals & callbacks */
-
- wiz->ok_cb = contact_picker_ok_cb;
- wiz->cleanup_cb = contact_picker_cleanup_cb;
-
- g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW (pick->list)),
- "changed", G_CALLBACK (contact_picker_selection_changed),
- wiz);
-
- /* Build our widget */
-
- w = gtk_label_new (new_email);
- gtk_box_pack_start (GTK_BOX (pick->body), w, FALSE, TRUE, 3);
-
- gtk_box_pack_start (GTK_BOX (pick->body), pick->list, 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 EABPopupControl widget begins here.
- */
-
-/* ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** */
-
-
-static GtkObjectClass *parent_class;
-
-static void eab_popup_control_dispose (GObject *);
-static void eab_popup_control_query (EABPopupControl *);
-
-
-static void
-eab_popup_control_class_init (EABPopupControlClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_peek_parent (klass);
-
- object_class->dispose = eab_popup_control_dispose;
-}
-
-static void
-eab_popup_control_init (EABPopupControl *pop)
-{
- pop->transitory = TRUE;
-}
-
-static void
-eab_popup_control_cleanup (EABPopupControl *pop)
-{
- if (pop->contact) {
- g_object_unref (pop->contact);
- pop->contact = NULL;
- }
-
- if (pop->scheduled_refresh) {
- g_source_remove (pop->scheduled_refresh);
- pop->scheduled_refresh = 0;
- }
-
- if (pop->query_tag) {
-#if notyet
- e_book_simple_query_cancel (pop->book, pop->query_tag);
-#endif
- pop->query_tag = 0;
- }
-
- if (pop->book) {
- g_object_unref (pop->book);
- pop->book = NULL;
- }
-
- g_free (pop->name);
- pop->name = NULL;
-
- g_free (pop->email);
- pop->email = NULL;
-}
-
-static void
-eab_popup_control_dispose (GObject *obj)
-{
- EABPopupControl *pop = EAB_POPUP_CONTROL (obj);
-
- eab_popup_control_cleanup (pop);
-
- if (G_OBJECT_CLASS (parent_class)->dispose)
- G_OBJECT_CLASS (parent_class)->dispose (obj);
-}
-
-GType
-eab_popup_control_get_type (void)
-{
- static GType pop_type = 0;
-
- if (!pop_type) {
- static const GTypeInfo pop_info = {
- sizeof (EABPopupControlClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) eab_popup_control_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EABPopupControl),
- 0, /* n_preallocs */
- (GInstanceInitFunc) eab_popup_control_init,
- };
-
- pop_type = g_type_register_static (gtk_event_box_get_type (), "EABPopupControl", &pop_info, 0);
- }
-
- return pop_type;
-}
-
-static void
-eab_popup_control_refresh_names (EABPopupControl *pop)
-{
- if (pop->name_widget) {
- if (pop->name && *pop->name) {
- gtk_label_set_text (GTK_LABEL (pop->name_widget), pop->name);
- gtk_widget_show (pop->name_widget);
- } else {
- gtk_widget_hide (pop->name_widget);
- }
- }
-
- if (pop->email_widget) {
- if (pop->email && *pop->email) {
- gtk_label_set_text (GTK_LABEL (pop->email_widget), pop->email);
- gtk_widget_show (pop->email_widget);
- } else {
- gtk_widget_hide (pop->email_widget);
- }
- }
-
- eab_popup_control_query (pop);
-}
-
-static gint
-refresh_timeout_cb (gpointer ptr)
-{
- EABPopupControl *pop = EAB_POPUP_CONTROL (ptr);
- eab_popup_control_refresh_names (pop);
- pop->scheduled_refresh = 0;
- return 0;
-}
-
-static void
-eab_popup_control_schedule_refresh (EABPopupControl *pop)
-{
- if (pop->scheduled_refresh == 0)
- pop->scheduled_refresh = g_timeout_add (20, refresh_timeout_cb, pop);
-}
-
-/* If we are handed something of the form "Foo <bar@bar.com>",
- do the right thing. */
-static gboolean
-eab_popup_control_set_free_form (EABPopupControl *pop, const gchar *txt)
-{
- gchar *lt, *gt = NULL;
-
- g_return_val_if_fail (pop && EAB_IS_POPUP_CONTROL (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);
- eab_popup_control_set_name (pop, name);
- eab_popup_control_set_email (pop, email);
-
- return TRUE;
- }
-
- return FALSE;
-}
-
-static void
-eab_popup_control_set_name (EABPopupControl *pop, const gchar *name)
-{
- g_return_if_fail (pop && EAB_IS_POPUP_CONTROL (pop));
-
- /* We only allow the name to be set once. */
- if (pop->name)
- return;
-
- if (!eab_popup_control_set_free_form (pop, name)) {
- pop->name = g_strdup (name);
- if (pop->name)
- g_strstrip (pop->name);
- }
-
- eab_popup_control_schedule_refresh (pop);
-}
-
-static void
-eab_popup_control_set_email (EABPopupControl *pop, const gchar *email)
-{
- g_return_if_fail (pop && EAB_IS_POPUP_CONTROL (pop));
-
- /* We only allow the e-mail to be set once. */
- if (pop->email)
- return;
-
- if (!eab_popup_control_set_free_form (pop, email)) {
- pop->email = g_strdup (email);
- if (pop->email)
- g_strstrip (pop->email);
- }
-
- eab_popup_control_schedule_refresh (pop);
-}
-
-void
-eab_popup_control_construct (EABPopupControl *pop)
-{
- GtkWidget *vbox, *name_holder;
- GdkColor color = { 0x0, 0xffff, 0xffff, 0xffff };
-
- g_return_if_fail (pop && EAB_IS_POPUP_CONTROL (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);
- g_object_unref (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 ContactDisplay */
- pop->contact_display = eab_contact_display_new ();
- gtk_box_pack_start (GTK_BOX (pop->main_vbox), pop->contact_display, 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);
-}
-
-static GtkWidget *
-eab_popup_new (void)
-{
- EABPopupControl *pop = g_object_new (EAB_TYPE_POPUP_CONTROL, NULL);
- eab_popup_control_construct (pop);
- return GTK_WIDGET (pop);
-}
-
-static void
-emit_event (EABPopupControl *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, EBookStatus status, gpointer closure)
-{
- if (status == E_BOOK_ERROR_OK) {
- EABPopupControl *pop = EAB_POPUP_CONTROL (closure);
- EContactEditor *ce = eab_show_contact_editor (book, pop->contact, FALSE, TRUE);
- eab_popup_control_cleanup (pop);
- emit_event (pop, "Destroy");
- e_contact_editor_raise (ce);
- }
-
- if (book)
- g_object_unref (book);
-}
-
-static void
-edit_contact_info_cb (GtkWidget *button, EABPopupControl *pop)
-{
- emit_event (pop, "Hide");
-
- addressbook_load_default_book (contact_editor_cb, pop);
-}
-
-static void
-eab_popup_control_display_contact (EABPopupControl *pop, EContact *contact)
-{
- GtkWidget *b;
-
- g_return_if_fail (pop && EAB_IS_POPUP_CONTROL (pop));
- g_return_if_fail (contact && E_IS_CONTACT (contact));
- g_return_if_fail (pop->contact == NULL);
-
- pop->contact = contact;
- g_object_ref (pop->contact);
-
- eab_contact_display_render (EAB_CONTACT_DISPLAY (pop->contact_display),
- contact,
- EAB_CONTACT_DISPLAY_RENDER_COMPACT);
- gtk_widget_show (pop->contact_display);
- 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);
- g_signal_connect (b,
- "clicked",
- G_CALLBACK (edit_contact_info_cb),
- pop);
- gtk_widget_show (b);
-}
-
-static void
-add_contacts_cb (GtkWidget *button, EABPopupControl *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);
-
- }
- eab_popup_control_cleanup (pop);
- emit_event (pop, "Destroy");
-}
-
-static void
-eab_popup_control_no_matches (EABPopupControl *pop)
-{
- GtkWidget *b;
-
- g_return_if_fail (pop && EAB_IS_POPUP_CONTROL (pop));
-
- b = e_button_new_with_stock_icon (_("Add to Contacts"), "gtk-add");
-
- gtk_box_pack_start (GTK_BOX (pop->main_vbox), b, TRUE, TRUE, 0);
- g_signal_connect (b,
- "clicked",
- G_CALLBACK (add_contacts_cb),
- pop);
- gtk_widget_show (b);
-}
-
-static void
-wizard_destroy_cb (MiniWizard *wiz, gpointer closure)
-{
- gtk_widget_destroy (GTK_WIDGET (closure));
-}
-
-static void
-eab_popup_control_ambiguous_email_add (EABPopupControl *pop, const GList *contacts)
-{
- 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_window_set_position (GTK_WINDOW (win), GTK_WIN_POS_MOUSE);
-
- contact_picker_init (wiz, contacts, pop->name, pop->email);
-
- eab_popup_control_cleanup (pop);
- emit_event (pop, "Destroy");
-
- gtk_container_add (GTK_CONTAINER (win), wiz->body);
- gtk_widget_show_all (win);
-}
-
-static void
-eab_popup_control_multiple_matches (EABPopupControl *pop, const GList *contacts)
-{
- pop->multiple_matches = TRUE;
-
- eab_popup_control_ambiguous_email_add (pop, contacts);
-}
-
-/** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **/
-
-/*
- * Addressbook Query Fun
- */
-
-static void
-name_only_query_cb (EBook *book, EBookStatus status, GList *contacts, gpointer closure)
-{
- EABPopupControl *pop;
-
- if (status != E_BOOK_ERROR_OK)
- return;
-
- pop = EAB_POPUP_CONTROL (closure);
-
- pop->query_tag = 0;
-
- if (contacts == NULL) {
- eab_popup_control_no_matches (pop);
- } else {
- eab_popup_control_ambiguous_email_add (pop, contacts);
- g_list_foreach (contacts, (GFunc)g_object_unref, NULL);
- g_list_free (contacts);
- }
-}
-
-static void
-query_cb (EBook *book, EBookStatus status, GList *contacts, gpointer closure)
-{
- EABPopupControl *pop;
-
- if (status != E_BOOK_ERROR_OK)
- return;
-
- pop = EAB_POPUP_CONTROL (closure);
-
- pop->query_tag = 0;
- gtk_widget_hide (pop->query_msg);
-
- if (contacts == 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 = eab_name_and_email_query (book, pop->name, NULL, name_only_query_cb, pop);
- } else {
- eab_popup_control_no_matches (pop);
- }
-
- } else {
- if (g_list_length ((GList *) contacts) == 1)
- eab_popup_control_display_contact (pop, E_CONTACT (contacts->data));
- else
- eab_popup_control_multiple_matches (pop, contacts);
-
- g_list_foreach (contacts, (GFunc)g_object_unref, NULL);
- g_list_free (contacts);
- }
-}
-
-static void
-start_query (EBook *book, EBookStatus status, gpointer closure)
-{
- EABPopupControl *pop = EAB_POPUP_CONTROL (closure);
-
- if (status != E_BOOK_ERROR_OK) {
- eab_popup_control_no_matches (pop);
- if (book)
- g_object_unref (book);
- return;
- }
-
-#if notyet
- if (pop->query_tag)
- e_book_simple_query_cancel (book, pop->query_tag);
-#endif
-
- if (pop->book != book) {
- g_object_ref (book);
- if (pop->book)
- g_object_unref (pop->book);
- pop->book = book;
- }
-
- pop->query_tag = eab_name_and_email_query (book, pop->name, pop->email, query_cb, pop);
-
- g_object_unref (pop);
-}
-
-static void
-eab_popup_control_query (EABPopupControl *pop)
-{
- g_return_if_fail (pop && EAB_IS_POPUP_CONTROL (pop));
-
- g_object_ref (pop);
-
- addressbook_load_default_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)
-{
- EABPopupControl *pop = EAB_POPUP_CONTROL (user_data);
-
- switch (arg_id) {
-
- case PROPERTY_NAME:
- eab_popup_control_set_name (pop, BONOBO_ARG_GET_STRING (arg));
- break;
-
- case PROPERTY_EMAIL:
- eab_popup_control_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)
-{
- EABPopupControl *pop = EAB_POPUP_CONTROL (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 ();
- }
-}
-
-BonoboControl *
-eab_popup_control_new (void)
-{
- BonoboControl *control;
- BonoboPropertyBag *bag;
- EABPopupControl *addy;
- GtkWidget *w;
-
- w = eab_popup_new ();
- addy = EAB_POPUP_CONTROL (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, bonobo_object_corba_objref (BONOBO_OBJECT (bag)), NULL);
- 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;
-}
diff --git a/addressbook/gui/widgets/eab-popup-control.h b/addressbook/gui/widgets/eab-popup-control.h
deleted file mode 100644
index 2feb3ac7d0..0000000000
--- a/addressbook/gui/widgets/eab-popup-control.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * eab-popup-control.h
- *
- * Copyright (C) 2001-2003, Ximian, Inc.
- *
- * Authors: Jon Trowbridge <trow@ximian.com>
- * Chris Toshok <toshok@ximian.com>
- */
-
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA.
- */
-
-#ifndef __EAB_POPUP_CONTROL_H__
-#define __EAB_POPUP_CONTROL_H__
-
-#include <bonobo/bonobo-event-source.h>
-#include <gtk/gtk.h>
-#include <libebook/e-book-async.h>
-#include <libebook/e-contact.h>
-
-G_BEGIN_DECLS
-
-#define EAB_TYPE_POPUP_CONTROL (eab_popup_control_get_type ())
-#define EAB_POPUP_CONTROL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EAB_TYPE_POPUP_CONTROL, EABPopupControl))
-#define EAB_POPUP_CONTROL_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), EAB_TYPE_POPUP_CONTROL, EABPopupControlClass))
-#define EAB_IS_POPUP_CONTROL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EAB_TYPE_POPUP_CONTROL))
-#define EAB_IS_POPUP_CONTROL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EAB_TYPE_POPUP_CONTROL))
-
-typedef struct _EABPopupControl EABPopupControl;
-typedef struct _EABPopupControlClass EABPopupControlClass;
-
-struct _EABPopupControl {
- GtkEventBox parent;
-
- gchar *name;
- gchar *email;
-
- GtkWidget *name_widget;
- GtkWidget *email_widget;
- GtkWidget *query_msg;
-
- GtkWidget *main_vbox;
- GtkWidget *generic_view;
- GtkWidget *contact_display;
-
- gboolean transitory;
-
- guint scheduled_refresh;
- EBook *book;
- guint query_tag;
- gboolean multiple_matches;
- EContact *contact;
-
- BonoboEventSource *es;
-};
-
-struct _EABPopupControlClass {
- GtkEventBoxClass parent_class;
-};
-
-GType eab_popup_control_get_type (void);
-
-void eab_popup_control_construct (EABPopupControl *);
-
-BonoboControl *eab_popup_control_new (void);
-
-G_END_DECLS
-
-#endif /* __EAB_POPUP_CONTROL_H__ */
-
diff --git a/addressbook/gui/widgets/eab-vcard-control.c b/addressbook/gui/widgets/eab-vcard-control.c
deleted file mode 100644
index c161333f15..0000000000
--- a/addressbook/gui/widgets/eab-vcard-control.c
+++ /dev/null
@@ -1,310 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * eab-vcard-control.c
- *
- * Copyright (C) 1999, 2000, 2001, 2002, 2003, Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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:
- * Chris Lahey <clahey@ximian.com>
- * Chris Toshok <toshok@ximian.com>
- */
-
-#include <config.h>
-#include <string.h>
-
-#include <gtk/gtk.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 <gal/util/e-util.h>
-
-#include <libebook/e-book-async.h>
-#include <libebook/e-contact.h>
-#include <addressbook/gui/component/addressbook.h>
-#include <addressbook/gui/widgets/eab-contact-display.h>
-#include <addressbook/util/eab-book-util.h>
-
-#include "eab-vcard-control.h"
-#include "eab-contact-merging.h"
-
-typedef struct {
- EABContactDisplay *display;
- GList *card_list;
- GtkWidget *label;
- EABContactDisplayRenderMode render_mode;
-} EABVCardControl;
-
-#define VCARD_CONTROL_ID "OAFIID:GNOME_Evolution_Addressbook_VCard_Control:" BASE_VERSION
-
-/*
- * 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)
-{
- GList *list;
- char *vcard;
- EABVCardControl *vcard_control = data;
-
- if (type && g_ascii_strcasecmp (type, "text/vCard") != 0 &&
- g_ascii_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;
- }
-
- e_free_object_list (vcard_control->card_list);
- list = eab_contact_list_from_string (vcard);
- g_free(vcard);
- vcard_control->card_list = list;
- if (list) {
- eab_contact_display_render (vcard_control->display, E_CONTACT (list->data),
- vcard_control->render_mode);
- }
- if (list && list->next) {
- char *message;
- int length = g_list_length (list) - 1;
- if (length > 1) {
- message = g_strdup_printf (_("and %d other contacts."), length);
- } else {
- message = g_strdup_printf (_("and one other contact."));
- }
- gtk_label_set_text (GTK_LABEL (vcard_control->label), message);
- g_free (message);
- gtk_widget_show (vcard_control->label);
- } else {
- gtk_widget_hide (vcard_control->label);
- }
-} /* 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)
-{
- EABVCardControl *vcard_control = data;
- char *vcard;
- int length;
-
- if (type && g_ascii_strcasecmp (type, "text/vCard") != 0 &&
- g_ascii_strcasecmp (type, "text/x-vCard") != 0) {
- CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
- ex_Bonobo_Persist_WrongDataType, NULL);
- return;
- }
-
- vcard = eab_contact_list_to_string (vcard_control->card_list);
- length = strlen (vcard);
- bonobo_stream_client_write (stream, vcard, length, ev);
- g_free (vcard);
-} /* pstream_save */
-
-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)
-{
- GList *list = closure;
- if (status == E_BOOK_ERROR_OK) {
- GList *p;
- for (p = list; p; p = p->next) {
- /* XXX argh, more passing of NULL's for callbacks */
- eab_merging_book_add_contact (book, E_CONTACT (p->data), NULL, NULL);
- }
- }
- if (book)
- g_object_unref (book);
- e_free_object_list (list);
-}
-
-static void
-save_in_addressbook(GtkWidget *button, gpointer data)
-{
- EABVCardControl *vcard_control = data;
- GList *list, *p;
-
- list = g_list_copy (vcard_control->card_list);
-
- for (p = list; p; p = p->next)
- g_object_ref (p->data);
-
- addressbook_load_default_book (book_open_cb, list);
-}
-
-static void
-toggle_full_vcard(GtkWidget *button, gpointer data)
-{
- EABVCardControl *vcard_control = data;
- char *label;
-
- if (!vcard_control->card_list)
- return;
-
- if (vcard_control->render_mode == EAB_CONTACT_DISPLAY_RENDER_NORMAL) {
- vcard_control->render_mode = EAB_CONTACT_DISPLAY_RENDER_COMPACT;
- label = _("Show Full VCard");
- }
- else {
- vcard_control->render_mode = EAB_CONTACT_DISPLAY_RENDER_NORMAL;
- label = _("Show Compact VCard");
- }
-
- gtk_button_set_label (GTK_BUTTON (button), label);
- eab_contact_display_render (vcard_control->display, E_CONTACT (vcard_control->card_list->data),
- vcard_control->render_mode);
-}
-
-static void
-free_struct (gpointer data, GObject *where_object_was)
-{
- EABVCardControl *vcard_control = data;
- e_free_object_list (vcard_control->card_list);
- g_free (vcard_control);
-}
-
-BonoboControl *
-eab_vcard_control_new (void)
-{
- BonoboControl *control;
- BonoboPersistStream *stream;
- GtkWidget *display;
- GtkWidget *button1, *button2;
- GtkWidget *label;
- GtkWidget *table;
-
- EABVCardControl *vcard_control = g_new (EABVCardControl, 1);
-
- printf ("inside eab_vcard_control_new\n");
-
- vcard_control->card_list = NULL;
- vcard_control->display = NULL;
- vcard_control->label = NULL;
-
- vcard_control->render_mode = EAB_CONTACT_DISPLAY_RENDER_COMPACT;
-
- /* Create the control. */
-
- display = eab_contact_display_new ();
- gtk_widget_show (display);
- vcard_control->display = EAB_CONTACT_DISPLAY (display);
-
- /* This is intentionally not shown. */
- label = gtk_label_new ("");
- vcard_control->label = label;
-
- button1 = gtk_button_new_with_label(_("Show Full VCard"));
- g_signal_connect (button1, "clicked",
- G_CALLBACK (toggle_full_vcard), vcard_control);
- gtk_widget_show (button1);
-
- button2 = gtk_button_new_with_label(_("Save in addressbook"));
- g_signal_connect (button2, "clicked",
- G_CALLBACK (save_in_addressbook), vcard_control);
- gtk_widget_show (button2);
-
- table = gtk_table_new (6, 6, FALSE);
- gtk_table_attach (GTK_TABLE (table), display, 0, 6, 3, 6, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
- gtk_table_attach (GTK_TABLE (table), label, 0, 3, 2, 3, GTK_FILL, 0, 0, 0);
- gtk_table_attach (GTK_TABLE (table), button1, 0, 1, 1, 2, 0, 0, 0, 0);
- gtk_table_attach (GTK_TABLE (table), button2, 1, 2, 1, 2, 0, 0, 0, 0);
- gtk_widget_show (table);
-
- control = bonobo_control_new (table);
-
- g_object_weak_ref (G_OBJECT (control), free_struct, vcard_control);
-
- stream = bonobo_persist_stream_new (pstream_load, pstream_save,
- pstream_get_content_types,
- VCARD_CONTROL_ID,
- vcard_control);
-
- if (stream == NULL) {
- bonobo_object_unref (BONOBO_OBJECT (control));
- return NULL;
- }
-
- bonobo_object_add_interface (BONOBO_OBJECT (control),
- BONOBO_OBJECT (stream));
-
- return control;
-}
diff --git a/addressbook/gui/widgets/eab-vcard-control.h b/addressbook/gui/widgets/eab-vcard-control.h
deleted file mode 100644
index 5f6643c1ca..0000000000
--- a/addressbook/gui/widgets/eab-vcard-control.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef __EAB_VCARD_CONTROL_H__
-#define __EAB_VCARD_CONTROL_H__
-
-#include <bonobo/bonobo-control.h>
-
-BonoboControl *eab_vcard_control_new (void);
-
-#endif /* __EAB_VCARD_CONTROL_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 212ac79b53..0000000000
--- a/addressbook/gui/widgets/gal-view-factory-minicard.c
+++ /dev/null
@@ -1,85 +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-i18n.h>
-#include "gal-view-factory-minicard.h"
-#include "gal-view-minicard.h"
-#include "gal/util/e-util.h"
-
-#define PARENT_TYPE GAL_VIEW_FACTORY_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_class_init (GObjectClass *object_class)
-{
- GalViewFactoryClass *view_factory_class = GAL_VIEW_FACTORY_CLASS(object_class);
- gal_view_factory_minicard_parent_class = g_type_class_ref (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;
-}
-
-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 (g_object_new (GAL_TYPE_VIEW_FACTORY_MINICARD, NULL));
-}
-
-/**
- * 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);
-}
-
-E_MAKE_TYPE(gal_view_factory_minicard, "GalViewFactoryMinicard", GalViewFactoryMinicard, gal_view_factory_minicard_class_init, gal_view_factory_minicard_init, PARENT_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 02eea99e47..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_TYPE_VIEW_FACTORY_MINICARD (gal_view_factory_minicard_get_type ())
-#define GAL_VIEW_FACTORY_MINICARD(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GAL_TYPE_VIEW_FACTORY_MINICARD, GalViewFactoryMinicard))
-#define GAL_VIEW_FACTORY_MINICARD_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GAL_TYPE_VIEW_FACTORY_MINICARD, GalViewFactoryMinicardClass))
-#define GAL_IS_VIEW_FACTORY_MINICARD(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GAL_TYPE_VIEW_FACTORY_MINICARD))
-#define GAL_IS_VIEW_FACTORY_MINICARD_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GAL_TYPE_VIEW_FACTORY_MINICARD))
-
-typedef struct {
- GalViewFactory base;
-} GalViewFactoryMinicard;
-
-typedef struct {
- GalViewFactoryClass parent_class;
-} GalViewFactoryMinicardClass;
-
-/* Standard functions */
-GType 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-factory-treeview.c b/addressbook/gui/widgets/gal-view-factory-treeview.c
deleted file mode 100644
index b14c8dec59..0000000000
--- a/addressbook/gui/widgets/gal-view-factory-treeview.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8
- -*- */
-/*
- * gal-view-factory-treeview.c: A View Factory
- *
- * Authors:
- * Chris Lahey <clahey@ximian.com>
- *
- * (C) 2000, 2001 Ximian, Inc.
- */
-#include <config.h>
-#include <glib.h>
-#include <libgnome/gnome-i18n.h>
-#include <gal/util/e-util.h>
-#include "gal-view-factory-treeview.h"
-#include "gal-view-treeview.h"
-
-#define PARENT_TYPE GAL_VIEW_FACTORY_TYPE
-
-static GalViewFactoryClass *gal_view_factory_treeview_parent_class;
-
-static const char *
-gal_view_factory_treeview_get_title (GalViewFactory *factory)
-{
- return _("GTK Tree View");
-}
-
-static GalView *
-gal_view_factory_treeview_new_view (GalViewFactory *factory,
- const char *name)
-{
- return gal_view_treeview_new(name);
-}
-
-static const char *
-gal_view_factory_treeview_get_type_code (GalViewFactory *factory)
-{
- return "treeview";
-}
-
-static void
-gal_view_factory_treeview_class_init (GObjectClass *object_class)
-{
- GalViewFactoryClass *view_factory_class = GAL_VIEW_FACTORY_CLASS(object_class);
- gal_view_factory_treeview_parent_class = g_type_class_ref (PARENT_TYPE);
-
- view_factory_class->get_title = gal_view_factory_treeview_get_title;
- view_factory_class->new_view = gal_view_factory_treeview_new_view;
- view_factory_class->get_type_code = gal_view_factory_treeview_get_type_code;
-}
-
-static void
-gal_view_factory_treeview_init (GalViewFactoryTreeView *factory)
-{
-}
-
-/**
- * gal_view_treeview_new
- *
- * A new GalViewFactory for creating TreeView views. Create one of
- * these and pass it to GalViewCollection for use.
- *
- * Returns: The new GalViewFactoryTreeView.
- */
-GalViewFactory *
-gal_view_factory_treeview_new (void)
-{
- return gal_view_factory_treeview_construct (g_object_new (GAL_TYPE_VIEW_FACTORY_TREEVIEW, NULL));
-}
-
-/**
- * gal_view_treeview_construct
- * @factory: The factory to construct
- *
- * constructs the GalViewFactoryTreeView. To be used by subclasses and
- * language bindings.
- *
- * Returns: The GalViewFactoryTreeView.
- */
-GalViewFactory *
-gal_view_factory_treeview_construct (GalViewFactoryTreeView *factory)
-{
- return GAL_VIEW_FACTORY(factory);
-}
-
-E_MAKE_TYPE(gal_view_factory_treeview, "GalViewFactoryTreeView", GalViewFactoryTreeView, gal_view_factory_treeview_class_init, gal_view_factory_treeview_init, PARENT_TYPE)
diff --git a/addressbook/gui/widgets/gal-view-factory-treeview.h b/addressbook/gui/widgets/gal-view-factory-treeview.h
deleted file mode 100644
index 4795c6d3aa..0000000000
--- a/addressbook/gui/widgets/gal-view-factory-treeview.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * gal-view-factory-treeview.c: A View Factory
- *
- * Authors:
- * Chris Toshok <toshok@ximian.com>
- *
- * (C) 2000, 2001 Ximian, Inc.
- */
-#ifndef _GAL_VIEW_FACTORY_TREEVIEW_H_
-#define _GAL_VIEW_FACTORY_TREEVIEW_H_
-
-#include <gtk/gtkobject.h>
-#include <gal/menus/gal-view-factory.h>
-
-#define GAL_TYPE_VIEW_FACTORY_TREEVIEW (gal_view_factory_treeview_get_type ())
-#define GAL_VIEW_FACTORY_TREEVIEW(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GAL_TYPE_VIEW_FACTORY_TREEVIEW, GalViewFactoryTreeView))
-#define GAL_VIEW_FACTORY_TREEVIEW_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GAL_TYPE_VIEW_FACTORY_TREEVIEW, GalViewFactoryTreeViewClass))
-#define GAL_IS_VIEW_FACTORY_TREEVIEW(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GAL_TYPE_VIEW_FACTORY_TREEVIEW))
-#define GAL_IS_VIEW_FACTORY_TREEVIEW_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GAL_TYPE_VIEW_FACTORY_TREEVIEW))
-
-typedef struct {
- GalViewFactory base;
-} GalViewFactoryTreeView;
-
-typedef struct {
- GalViewFactoryClass parent_class;
-} GalViewFactoryTreeViewClass;
-
-/* Standard functions */
-GType gal_view_factory_treeview_get_type (void);
-GalViewFactory *gal_view_factory_treeview_new (void);
-GalViewFactory *gal_view_factory_treeview_construct (GalViewFactoryTreeView *factory);
-
-#endif /* _GAL_VIEW_FACTORY_TREEVIEW_H_ */
diff --git a/addressbook/gui/widgets/gal-view-minicard.c b/addressbook/gui/widgets/gal-view-minicard.c
deleted file mode 100644
index da60497cdb..0000000000
--- a/addressbook/gui/widgets/gal-view-minicard.c
+++ /dev/null
@@ -1,227 +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"
-#include <libxml/parser.h>
-#include <gal/util/e-xml-utils.h>
-
-#define PARENT_TYPE gal_view_get_type ()
-#define d(x) x
-
-static GalViewClass *gal_view_minicard_parent_class;
-
-static void
-gal_view_minicard_edit (GalView *view, GtkWindow *parent_window)
-{
- /* GalViewMinicard *minicard_view = GAL_VIEW_MINICARD(view); */
-}
-
-static void
-gal_view_minicard_load (GalView *view,
- const char *filename)
-{
- xmlDoc *doc;
- doc = xmlParseFile (filename);
- if (doc) {
- xmlNode *root = xmlDocGetRootElement(doc);
- GAL_VIEW_MINICARD (view)->column_width = e_xml_get_double_prop_by_name_with_default (root, "column_width", 150);
- xmlFreeDoc(doc);
- }
-}
-
-static void
-gal_view_minicard_save (GalView *view,
- const char *filename)
-{
- xmlDoc *doc;
- xmlNode *root;
-
- doc = xmlNewDoc("1.0");
- root = xmlNewNode (NULL, "EMinicardViewState");
- e_xml_set_double_prop_by_name (root, "column_width", GAL_VIEW_MINICARD (view)->column_width);
- xmlDocSetRootElement(doc, root);
- xmlSaveFile(filename, doc);
- xmlFreeDoc(doc);
-}
-
-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 *gvm, *new;
-
- gvm = GAL_VIEW_MINICARD(view);
-
- new = g_object_new (GAL_TYPE_VIEW_MINICARD, NULL);
- new->title = g_strdup (gvm->title);
- new->column_width = gvm->column_width;
-
- return GAL_VIEW(new);
-}
-
-static void
-gal_view_minicard_dispose (GObject *object)
-{
- GalViewMinicard *view = GAL_VIEW_MINICARD(object);
-
- if (view->title != NULL) {
- gal_view_minicard_detach (view);
- g_free(view->title);
- view->title = NULL;
- }
-
- if (G_OBJECT_CLASS (gal_view_minicard_parent_class)->dispose)
- (* G_OBJECT_CLASS (gal_view_minicard_parent_class)->dispose) (object);
-}
-
-static void
-gal_view_minicard_class_init (GObjectClass *object_class)
-{
- GalViewClass *gal_view_class = GAL_VIEW_CLASS(object_class);
- gal_view_minicard_parent_class = g_type_class_ref (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->dispose = gal_view_minicard_dispose ;
-}
-
-static void
-gal_view_minicard_init (GalViewMinicard *gvm)
-{
- gvm->title = NULL;
- gvm->column_width = 150.0;
-
- gvm->emvw = NULL;
- gvm->emvw_column_width_changed_id = 0;
-}
-
-/**
- * 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 (g_object_new (GAL_TYPE_VIEW_MINICARD, NULL), 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);
-}
-
-GType
-gal_view_minicard_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (GalViewMinicardClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) gal_view_minicard_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (GalViewMinicard),
- 0, /* n_preallocs */
- (GInstanceInitFunc) gal_view_minicard_init,
- };
-
- type = g_type_register_static (PARENT_TYPE, "GalViewMinicard", &info, 0);
- }
-
- return type;
-}
-
-static void
-column_width_changed (EMinicardViewWidget *w, double width, GalViewMinicard *view)
-{
- d(g_print("%s: Old width = %f, New width = %f\n", G_GNUC_FUNCTION, view->column_width, width));
- if (view->column_width != width) {
- view->column_width = width;
- gal_view_changed(GAL_VIEW(view));
- }
-}
-
-void
-gal_view_minicard_attach (GalViewMinicard *view, EMinicardViewWidget *emvw)
-{
- gal_view_minicard_detach (view);
-
- view->emvw = emvw;
-
- g_object_ref (view->emvw);
-
- g_object_set (view->emvw,
- "column_width", view->column_width,
- NULL);
-
- view->emvw_column_width_changed_id =
- g_signal_connect(view->emvw, "column_width_changed",
- G_CALLBACK (column_width_changed), view);
-}
-
-void
-gal_view_minicard_detach (GalViewMinicard *view)
-{
- if (view->emvw == NULL)
- return;
- if (view->emvw_column_width_changed_id) {
- g_signal_handler_disconnect (view->emvw,
- view->emvw_column_width_changed_id);
- view->emvw_column_width_changed_id = 0;
- }
- g_object_unref (view->emvw);
- view->emvw = NULL;
-}
diff --git a/addressbook/gui/widgets/gal-view-minicard.h b/addressbook/gui/widgets/gal-view-minicard.h
deleted file mode 100644
index e586012f73..0000000000
--- a/addressbook/gui/widgets/gal-view-minicard.h
+++ /dev/null
@@ -1,45 +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 <gal/menus/gal-view.h>
-#include <e-minicard-view-widget.h>
-
-#define GAL_TYPE_VIEW_MINICARD (gal_view_minicard_get_type ())
-#define GAL_VIEW_MINICARD(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GAL_TYPE_VIEW_MINICARD, GalViewMinicard))
-#define GAL_VIEW_MINICARD_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GAL_TYPE_VIEW_MINICARD, GalViewMinicardClass))
-#define GAL_IS_VIEW_MINICARD(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GAL_TYPE_VIEW_MINICARD))
-#define GAL_IS_VIEW_MINICARD_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GAL_TYPE_VIEW_MINICARD))
-
-typedef struct {
- GalView base;
-
- char *title;
- double column_width;
-
- EMinicardViewWidget *emvw;
- guint emvw_column_width_changed_id;
-} GalViewMinicard;
-
-typedef struct {
- GalViewClass parent_class;
-} GalViewMinicardClass;
-
-/* Standard functions */
-GType gal_view_minicard_get_type (void);
-GalView *gal_view_minicard_new (const gchar *title);
-GalView *gal_view_minicard_construct (GalViewMinicard *view,
- const gchar *title);
-void gal_view_minicard_attach (GalViewMinicard *view,
- EMinicardViewWidget *emvw);
-void gal_view_minicard_detach (GalViewMinicard *view);
-
-#endif /* _GAL_VIEW_MINICARD_H_ */
diff --git a/addressbook/gui/widgets/gal-view-treeview.c b/addressbook/gui/widgets/gal-view-treeview.c
deleted file mode 100644
index e18ae6341b..0000000000
--- a/addressbook/gui/widgets/gal-view-treeview.c
+++ /dev/null
@@ -1,234 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * gal-view-treeview.c: An TreeView View
- *
- * Authors:
- * Chris Lahey <clahey@ximian.com>
- *
- * (C) 2000, 2001 Ximian, Inc.
- */
-#include <config.h>
-#include "gal-view-treeview.h"
-#include <libxml/parser.h>
-#include <gal/util/e-xml-utils.h>
-
-#define PARENT_TYPE gal_view_get_type ()
-#define d(x) x
-
-static GalViewClass *gal_view_treeview_parent_class;
-
-static void
-gal_view_treeview_edit (GalView *view, GtkWindow *parent_window)
-{
- /* GalViewTreeView *treeview_view = GAL_VIEW_TREEVIEW(view); */
-}
-
-static void
-gal_view_treeview_load (GalView *view,
- const char *filename)
-{
-#if 0
- xmlDoc *doc;
- doc = xmlParseFile (filename);
- if (doc) {
- xmlNode *root = xmlDocGetRootElement(doc);
- GAL_VIEW_TREEVIEW (view)->column_width = e_xml_get_double_prop_by_name_with_default (root, "column_width", 150);
- xmlFreeDoc(doc);
- }
-#endif
-}
-
-static void
-gal_view_treeview_save (GalView *view,
- const char *filename)
-{
-#if 0
- xmlDoc *doc;
- xmlNode *root;
-
- doc = xmlNewDoc("1.0");
- root = xmlNewNode (NULL, "ETreeViewViewState");
- e_xml_set_double_prop_by_name (root, "column_width", GAL_VIEW_TREEVIEW (view)->column_width);
- xmlDocSetRootElement(doc, root);
- xmlSaveFile(filename, doc);
- xmlFreeDoc(doc);
-#endif
-}
-
-static const char *
-gal_view_treeview_get_title (GalView *view)
-{
- return GAL_VIEW_TREEVIEW(view)->title;
-}
-
-static void
-gal_view_treeview_set_title (GalView *view,
- const char *title)
-{
- g_free(GAL_VIEW_TREEVIEW(view)->title);
- GAL_VIEW_TREEVIEW(view)->title = g_strdup(title);
-}
-
-static const char *
-gal_view_treeview_get_type_code (GalView *view)
-{
- return "treeview";
-}
-
-static GalView *
-gal_view_treeview_clone (GalView *view)
-{
- GalViewTreeView *gvm, *new;
-
- gvm = GAL_VIEW_TREEVIEW(view);
-
- new = g_object_new (GAL_TYPE_VIEW_TREEVIEW, NULL);
- new->title = g_strdup (gvm->title);
-
- return GAL_VIEW(new);
-}
-
-static void
-gal_view_treeview_dispose (GObject *object)
-{
- GalViewTreeView *view = GAL_VIEW_TREEVIEW(object);
-
- if (view->title != NULL) {
- gal_view_treeview_detach (view);
- g_free(view->title);
- view->title = NULL;
- }
-
- if (G_OBJECT_CLASS (gal_view_treeview_parent_class)->dispose)
- (* G_OBJECT_CLASS (gal_view_treeview_parent_class)->dispose) (object);
-}
-
-static void
-gal_view_treeview_class_init (GObjectClass *object_class)
-{
- GalViewClass *gal_view_class = GAL_VIEW_CLASS(object_class);
- gal_view_treeview_parent_class = g_type_class_ref (PARENT_TYPE);
-
- gal_view_class->edit = gal_view_treeview_edit ;
- gal_view_class->load = gal_view_treeview_load ;
- gal_view_class->save = gal_view_treeview_save ;
- gal_view_class->get_title = gal_view_treeview_get_title ;
- gal_view_class->set_title = gal_view_treeview_set_title ;
- gal_view_class->get_type_code = gal_view_treeview_get_type_code;
- gal_view_class->clone = gal_view_treeview_clone ;
-
- object_class->dispose = gal_view_treeview_dispose ;
-}
-
-static void
-gal_view_treeview_init (GalViewTreeView *gvm)
-{
- gvm->title = NULL;
-
- gvm->tree = NULL;
-}
-
-/**
- * gal_view_treeview_new
- * @title: The name of the new view.
- *
- * Returns a new GalViewTreeView. This is primarily for use by
- * GalViewFactoryTreeView.
- *
- * Returns: The new GalViewTreeView.
- */
-GalView *
-gal_view_treeview_new (const gchar *title)
-{
- return gal_view_treeview_construct (g_object_new (GAL_TYPE_VIEW_TREEVIEW, NULL), title);
-}
-
-/**
- * gal_view_treeview_construct
- * @view: The view to construct.
- * @title: The name of the new view.
- *
- * constructs the GalViewTreeView. To be used by subclasses and
- * language bindings.
- *
- * Returns: The GalViewTreeView.
- */
-GalView *
-gal_view_treeview_construct (GalViewTreeView *view,
- const gchar *title)
-{
- view->title = g_strdup(title);
- return GAL_VIEW(view);
-}
-
-GType
-gal_view_treeview_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (GalViewTreeViewClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) gal_view_treeview_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (GalViewTreeView),
- 0, /* n_preallocs */
- (GInstanceInitFunc) gal_view_treeview_init,
- };
-
- type = g_type_register_static (PARENT_TYPE, "GalViewTreeView", &info, 0);
- }
-
- return type;
-}
-
-#if 0
-static void
-column_width_changed (ETable *table, double width, GalViewMinicard *view)
-{
- d(g_print("%s: Old width = %f, New width = %f\n", G_GNUC_FUNCTION, view->column_width, width));
- if (view->column_width != width) {
- view->column_width = width;
- gal_view_changed(GAL_VIEW(view));
- }
-}
-#endif
-
-void
-gal_view_treeview_attach (GalViewTreeView *view, GtkTreeView *tree)
-{
-#if 0
- gal_view_treeview_detach (view);
-
- view->emvw = emvw;
-
- g_object_ref (view->emvw);
-
- g_object_set (view->emvw,
- "column_width", view->column_width,
- NULL);
-
- view->emvw_column_width_changed_id =
- g_signal_connect(view->emvw, "column_width_changed",
- G_CALLBACK (column_width_changed), view);
-#endif
-}
-
-void
-gal_view_treeview_detach (GalViewTreeView *view)
-{
-#if 0
- if (view->emvw == NULL)
- return;
- if (view->emvw_column_width_changed_id) {
- g_signal_handler_disconnect (view->emvw,
- view->emvw_column_width_changed_id);
- view->emvw_column_width_changed_id = 0;
- }
- g_object_unref (view->emvw);
- view->emvw = NULL;
-#endif
-}
diff --git a/addressbook/gui/widgets/gal-view-treeview.h b/addressbook/gui/widgets/gal-view-treeview.h
deleted file mode 100644
index a0313856a6..0000000000
--- a/addressbook/gui/widgets/gal-view-treeview.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * gal-view-treeview.h: An TreeView View
- *
- * Authors:
- * Chris Toshok <toshok@ximian.com>
- *
- * (C) 2000, 2001 Ximian, Inc.
- */
-#ifndef _GAL_VIEW_TREEVIEW_H_
-#define _GAL_VIEW_TREEVIEW_H_
-
-#include <gal/menus/gal-view.h>
-#include <gtk/gtktreeview.h>
-
-#define GAL_TYPE_VIEW_TREEVIEW (gal_view_treeview_get_type ())
-#define GAL_VIEW_TREEVIEW(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GAL_TYPE_VIEW_TREEVIEW, GalViewTreeView))
-#define GAL_VIEW_TREEVIEW_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GAL_TYPE_VIEW_TREEVIEW, GalViewTreeViewClass))
-#define GAL_IS_VIEW_TREEVIEW(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GAL_TYPE_VIEW_TREEVIEW))
-#define GAL_IS_VIEW_TREEVIEW_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GAL_TYPE_VIEW_TREEVIEW))
-
-typedef struct {
- GalView base;
-
- char *title;
-
- GtkTreeView *tree;
-} GalViewTreeView;
-
-typedef struct {
- GalViewClass parent_class;
-} GalViewTreeViewClass;
-
-/* Standard functions */
-GType gal_view_treeview_get_type (void);
-GalView *gal_view_treeview_new (const gchar *title);
-GalView *gal_view_treeview_construct (GalViewTreeView *view,
- const gchar *title);
-void gal_view_treeview_attach (GalViewTreeView *view,
- GtkTreeView *tree);
-void gal_view_treeview_detach (GalViewTreeView *view);
-
-#endif /* _GAL_VIEW_TREEVIEW_H_ */
diff --git a/addressbook/gui/widgets/test-reflow.c b/addressbook/gui/widgets/test-reflow.c
deleted file mode 100644
index 66f003fe2c..0000000000
--- a/addressbook/gui/widgets/test-reflow.c
+++ /dev/null
@@ -1,199 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#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(gpointer data, GObject *where_object_was)
-{
- 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 );
- g_object_get(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;
- g_object_get(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 );
- g_signal_connect( canvas, "reflow",
- G_CALLBACK ( 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 */
- g_object_weak_ref (app, destroy_callback, app);
-
- g_signal_connect( canvas, "size_allocate",
- G_CALLBACK ( 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 8da93df0b8..0000000000
--- a/addressbook/printing/Makefile.am
+++ /dev/null
@@ -1,57 +0,0 @@
-ecpsdir = $(privdatadir)/ecps
-ecps_DATA = \
- smallbook.ecps \
- medbook.ecps \
- phonelist.ecps
-
-glade_DATA = \
- e-contact-print.glade
-
-INCLUDES = \
- $(GNOME_INCLUDEDIR) \
- -DG_LOG_DOMAIN=\"addressbook-printing\" \
- -I$(top_srcdir)/addressbook \
- -I$(top_srcdir)/addressbook/backend \
- -I$(top_builddir)/addressbook/backend \
- -I$(top_srcdir) \
- -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
- -DEVOLUTION_ECPSDIR=\""$(ecpsdir)"\" \
- $(EVOLUTION_ADDRESSBOOK_CFLAGS)
-
-noinst_LTLIBRARIES = \
- libecontactprint.la
-
-libecontactprint_la_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 = \
- libecontactprint.la \
- $(top_builddir)/addressbook/util/libeabutil.la \
- $(EVOLUTION_ADDRESSBOOK_LIBS)
-
-contact_print_style_editor_test_SOURCES = \
- test-contact-print-style-editor.c
-
-contact_print_style_editor_test_LDADD = \
- libecontactprint.la \
- $(top_builddir)/addressbook/util/libeabutil.la \
- $(EVOLUTION_ADDRESSBOOK_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 c7bd68163f..0000000000
--- a/addressbook/printing/e-contact-print-envelope.c
+++ /dev/null
@@ -1,242 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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-i18n.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <time.h>
-#include <libgnomeprintui/gnome-print-dialog.h>
-#include <libgnomeprint/gnome-print.h>
-#include <libgnomeprint/gnome-print-job.h>
-#include <libgnomeprintui/gnome-print-job-preview.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_utf8_sized (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, EContact *contact, gboolean as_return)
-{
- 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_contact_get(contact, E_CONTACT_ADDRESS_LABEL_WORK);
- linelist = ecpe_break(address);
- if (as_return)
- font = gnome_font_find ("Sans", 9);
- else
- font = gnome_font_find ("Sans", 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);
- g_object_unref(font);
- g_free(linelist);
-
- g_free(address);
-
- gnome_print_showpage(pc);
- gnome_print_context_close(pc);
-}
-
-static void
-e_contact_print_envelope_button(GnomeDialog *dialog, gint button, gpointer data)
-{
- GnomePrintJob *master;
- GnomePrintContext *pc;
- GnomePrintConfig *config;
- EContact *contact = NULL;
- GtkWidget *preview;
-
- contact = g_object_get_data(G_OBJECT(dialog), "contact");
-
- switch( button ) {
- case GNOME_PRINT_DIALOG_RESPONSE_PRINT:
- config = gnome_print_dialog_get_config (GNOME_PRINT_DIALOG (dialog));
- master = gnome_print_job_new (config);
- pc = gnome_print_job_get_context( master );
-
- ecpe_print(pc, contact, FALSE);
-
- gnome_print_job_print(master);
- gnome_dialog_close(dialog);
- break;
- case GNOME_PRINT_DIALOG_RESPONSE_PREVIEW:
- config = gnome_print_dialog_get_config (GNOME_PRINT_DIALOG (dialog));
- master = gnome_print_job_new (config);
- pc = gnome_print_job_get_context( master );
-
- ecpe_print(pc, contact, FALSE);
-
- preview = GTK_WIDGET(gnome_print_job_preview_new(master, "Print Preview"));
- gtk_widget_show_all(preview);
- break;
- case GNOME_PRINT_DIALOG_RESPONSE_CANCEL:
- g_object_unref(contact);
- gnome_dialog_close(dialog);
- break;
- }
-}
-
-GtkWidget *
-e_contact_print_envelope_dialog_new(EContact *contact)
-{
- GtkWidget *dialog;
-
- dialog = gnome_print_dialog_new(NULL, _("Print envelope"), GNOME_PRINT_DIALOG_COPIES);
-
- contact = e_contact_duplicate(contact);
- g_object_set_data(G_OBJECT(dialog), "contact", contact);
- g_signal_connect(dialog,
- "clicked", G_CALLBACK(e_contact_print_envelope_button), NULL);
- g_signal_connect(dialog,
- "close", G_CALLBACK(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;
- EContact *contact;
-
- if (list == NULL)
- return NULL;
-
- dialog = gnome_print_dialog_new(NULL, _("Print envelope"), GNOME_PRINT_DIALOG_COPIES);
-
- contact = e_contact_duplicate(list->data);
- g_object_set_data(G_OBJECT(dialog), "contact", contact);
- g_signal_connect(dialog,
- "clicked", G_CALLBACK(e_contact_print_envelope_button), NULL);
- g_signal_connect(dialog,
- "close", G_CALLBACK(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 a7a8492638..0000000000
--- a/addressbook/printing/e-contact-print-envelope.h
+++ /dev/null
@@ -1,32 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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 <gtk/gtkwidget.h>
-#include <libebook/e-contact.h>
-#include "e-contact-print-types.h"
-
-GtkWidget *e_contact_print_envelope_dialog_new(EContact *contact);
-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 436aaddff0..0000000000
--- a/addressbook/printing/e-contact-print-style-editor.c
+++ /dev/null
@@ -1,155 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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, 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);
-
- if (e_contact_print_style_editor->gui != NULL) {
- g_object_unref(e_contact_print_style_editor->gui);
- e_contact_print_style_editor->gui = NULL;
- }
-
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-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 e4604d551c..0000000000
--- a/addressbook/printing/e-contact-print-style-editor.h
+++ /dev/null
@@ -1,73 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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 b7082b41f6..0000000000
--- a/addressbook/printing/e-contact-print-types.h
+++ /dev/null
@@ -1,73 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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 1a9b83c62d..0000000000
--- a/addressbook/printing/e-contact-print.c
+++ /dev/null
@@ -1,1106 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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 <string.h>
-#include <glib.h>
-#include <libxml/tree.h>
-#include <libxml/parser.h>
-#include <libxml/xmlmemory.h>
-#include <libgnome/gnome-util.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeprint/gnome-print.h>
-#include <libgnomeprint/gnome-font.h>
-#include <libgnomeprint/gnome-print-job.h>
-#include <libgnomeprintui/gnome-print-dialog.h>
-#include <libgnomeprintui/gnome-print-job-preview.h>
-#include <libebook/e-book-async.h>
-#include <libebook/e-contact.h>
-#include <addressbook/util/eab-destination.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;
- GnomePrintJob *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 *contacts;
-};
-
-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_utf8(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_utf8_sized(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_utf8(font, " ");
- linestart = lastend + 1;
- x += gnome_font_get_width_utf8_sized(font, text + linestart, i - linestart);
- lastend = i;
- linecount ++;
- } else {
- x += gnome_font_get_width_utf8_sized(font, text + lastend, i - lastend);
- lastend = i;
- }
- firstword = 0;
- } else if ( text[i] == '\n' ) {
- if ( (!firstword) && x + gnome_font_get_width_utf8_sized(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_utf8(font, " ");
-
- firstword = 1;
- }
- }
- if ( (!firstword) && x + gnome_font_get_width_utf8_sized(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_utf8(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_utf8(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, const 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_utf8(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_utf8(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_utf8(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_utf8(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_utf8(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_utf8(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);
-
- gnome_print_beginpage (ctxt->pc, NULL);
-
- ctxt->first_char_on_page = ctxt->last_char_on_page + 1;
-}
-
-static double
-e_contact_get_contact_size(EContact *contact, EContactPrintContext *ctxt)
-{
- gdouble height = 0;
- gdouble page_width = 72 * (ctxt->style->page_width - ctxt->style->left_margin - ctxt->style->right_margin);
- gdouble column_width;
- const 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;
-
- file_as = e_contact_get_const (contact, E_CONTACT_FILE_AS);
-
- 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_CONTACT_FILE_AS; field != E_CONTACT_LAST_SIMPLE_STRING; field++) {
- char *string;
- string = e_contact_get(contact, field);
- if (string && *string) {
- double xoff = 0;
- xoff += gnome_font_get_width_utf8(ctxt->style->body_font, e_contact_pretty_name (field));
- xoff += gnome_font_get_width_utf8(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;
-
- /* g_message ("%s %g", e_card_simple_get (simple, E_CARD_SIMPLE_FIELD_FILE_AS), height); */
- return height;
-}
-
-
-static void
-e_contact_print_contact (EContact *contact, 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;
-
- file_as = e_contact_get (contact, E_CONTACT_FILE_AS);
- 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);
- g_free (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_CONTACT_FILE_AS; field != E_CONTACT_LAST_SIMPLE_STRING; field++) {
- char *string;
- string = e_contact_get(contact, field);
-
- if (string && !strncmp (string, "<?xml", 4)) {
- EABDestination *dest = eab_destination_import (string);
- if (dest != NULL) {
- gchar *new_string = g_strdup (eab_destination_get_address (dest));
- g_free (string);
- string = new_string;
- g_object_unref (dest);
- }
- }
-
- if (string && *string) {
- double xoff = 0;
- e_contact_output(ctxt->pc, ctxt->style->body_font, ctxt->x + xoff, ctxt->y, -1, e_contact_pretty_name (field));
- xoff += gnome_font_get_width_utf8(ctxt->style->body_font, e_contact_pretty_name (field));
- e_contact_output(ctxt->pc, ctxt->style->body_font, ctxt->x + xoff, ctxt->y, -1, ": ");
- xoff += gnome_font_get_width_utf8(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, EBookViewStatus status, EContactPrintContext *ctxt)
-{
- GList *contacts = ctxt->contacts;
-
- 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;
-
- gnome_print_beginpage (ctxt->pc, NULL);
-
- for(; contacts; contacts = contacts->next) {
- EContact *contact = contacts->data;
- guchar *file_as;
- gchar *letter_str = NULL;
-
- file_as = e_contact_get (contact, E_CONTACT_FILE_AS);
-
- if (file_as != NULL) {
- letter_str = g_strndup (file_as, g_utf8_next_char (file_as) - (gchar *) file_as);
- }
- if ( file_as && (!ctxt->character || g_utf8_collate (ctxt->character, letter_str) != 0) ) {
- g_free (ctxt->character);
- ctxt->character = g_strdup (letter_str);
- 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_contact_size(contact, 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->first_section = FALSE;
- }
- else if ( (!ctxt->first_contact) && (ctxt->y - e_contact_get_contact_size(contact, 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);
- }
- g_free (letter_str);
- 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_contact(contact, ctxt);
- ctxt->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(ctxt->character);
- if (book_view)
- g_object_unref(book_view);
- if (ctxt->type == GNOME_PRINT_DIALOG_RESPONSE_PREVIEW) {
- GtkWidget *preview;
- preview = GTK_WIDGET(gnome_print_job_preview_new(ctxt->master, "Print Preview"));
- gtk_widget_show_all(preview);
- } else {
- gnome_print_job_print(ctxt->master);
- }
- g_object_unref(ctxt->pc);
- g_object_unref(ctxt->master);
- if (ctxt->book)
- g_object_unref(ctxt->book);
- g_free(ctxt->query);
- g_list_foreach(ctxt->contacts, (GFunc) g_object_unref, NULL);
- g_list_free(ctxt->contacts);
- g_object_unref(ctxt->style->headings_font);
- g_object_unref(ctxt->style->body_font);
- g_object_unref(ctxt->style->header_font);
- g_object_unref(ctxt->style->footer_font);
- g_object_unref(ctxt->letter_heading_font);
- g_object_unref(ctxt->letter_tab_font);
- g_free(ctxt->style);
- g_free(ctxt);
-}
-
-static int
-contact_compare (EContact *contact1, EContact *contact2)
-{
- if (contact1 && contact2) {
- const char *file_as1, *file_as2;
- file_as1 = e_contact_get_const (contact1, E_CONTACT_FILE_AS);
- file_as2 = e_contact_get_const (contact2, E_CONTACT_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_contact_get_const(contact1, E_CONTACT_UID), e_contact_get_const(contact2, E_CONTACT_UID));
- } else {
- return 0;
- }
-}
-
-static void
-create_contact(EBookView *book_view, const GList *contacts, EContactPrintContext *ctxt)
-{
- for(; contacts; contacts = contacts->next) {
- EContact *contact = contacts->data;
- g_object_ref(contact);
- ctxt->contacts = g_list_insert_sorted(ctxt->contacts, contact, (GCompareFunc) contact_compare);
- }
-}
-
-static void
-book_view_loaded (EBook *book, EBookStatus status, EBookView *book_view, EContactPrintContext *ctxt)
-{
- g_object_ref(book_view);
-
- g_signal_connect(book_view,
- "contacts_added",
- G_CALLBACK(create_contact),
- ctxt);
-
- g_signal_connect(book_view,
- "sequence_complete",
- G_CALLBACK(complete_sequence),
- ctxt);
-
- e_book_view_start (book_view);
-}
-
-static void
-e_contact_do_print_contacts (EBook *book, char *query, EContactPrintContext *ctxt)
-{
- e_book_async_get_book_view(book, query, (EBookBookViewCallback) book_view_loaded, ctxt);
-}
-
-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_contacts( book, query, ctxt);
- break;
- 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_find_from_full_name( data );
- if ( font ) {
- g_object_unref(*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_find_closest_from_weight_slant ("Sans", GNOME_FONT_BOLD, FALSE, 8);
- style->body_font = gnome_font_find_closest_from_weight_slant ("Sans", GNOME_FONT_BOOK, FALSE, 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_find_closest_from_weight_slant ("Sans", GNOME_FONT_BOOK, FALSE, 6);
-
- style->left_header = g_strdup("");
- style->center_header = g_strdup("");
- style->right_header = g_strdup("");
-
- style->footer_font = gnome_font_find_closest_from_weight_slant ("Sans", GNOME_FONT_BOOK, FALSE, 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->children; 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_response(GtkWidget *dialog, gint response_id, gpointer data)
-{
- EContactPrintContext *ctxt = g_new(EContactPrintContext, 1);
- EContactPrintStyle *style = g_new(EContactPrintStyle, 1);
- GnomePrintJob *master;
- GnomePrintConfig *config;
- GnomePrintContext *pc;
- gboolean uses_book = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(dialog), "uses_book"));
- gboolean uses_list = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(dialog), "uses_list"));
- EBook *book = NULL;
- char *query = NULL;
- EContact *contact = NULL;
- GList *contact_list = NULL;
- gdouble font_size;
-
-
- if (uses_book) {
- book = g_object_get_data(G_OBJECT(dialog), "book");
- query = g_object_get_data(G_OBJECT(dialog), "query");
- }
- else if (uses_list) {
- contact_list = g_object_get_data(G_OBJECT(dialog), "contact_list");
- }
- else {
- contact = g_object_get_data(G_OBJECT(dialog), "contact");
- }
- switch( response_id ) {
- case GNOME_PRINT_DIALOG_RESPONSE_PRINT:
- config = gnome_print_dialog_get_config (GNOME_PRINT_DIALOG(dialog));
- master = gnome_print_job_new( config );
- pc = gnome_print_job_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_DIALOG_RESPONSE_PRINT;
-
- font_size = 72 * ctxt->style->page_height / 27.0 / 2.0;
- ctxt->letter_heading_font = gnome_font_find (gnome_font_get_name(ctxt->style->headings_font), gnome_font_get_size (ctxt->style->headings_font) * 1.5);
- ctxt->letter_tab_font = gnome_font_find (gnome_font_get_name(ctxt->style->headings_font), font_size);
-
- ctxt->pc = pc;
-#warning FIXME gnome_print_multipage_new_from_sizes
-#if 0
- 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));
-#endif
-
- ctxt->book = book;
- ctxt->query = query;
- if (uses_book) {
- ctxt->contacts = NULL;
- e_contact_do_print(book, ctxt->query, ctxt);
- }
- else if (uses_list) {
- ctxt->contacts = contact_list;
- complete_sequence(NULL, E_BOOK_VIEW_STATUS_OK, ctxt);
- }
- else {
- ctxt->contacts = g_list_append(NULL, contact);
- complete_sequence(NULL, E_BOOK_VIEW_STATUS_OK, ctxt);
- }
- gtk_widget_destroy (dialog);
- break;
- case GNOME_PRINT_DIALOG_RESPONSE_PREVIEW:
- config = gnome_print_dialog_get_config (GNOME_PRINT_DIALOG(dialog));
- master = gnome_print_job_new( config );
- pc = gnome_print_job_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_DIALOG_RESPONSE_PREVIEW;
-
- font_size = 72 * ctxt->style->page_height / 27.0 / 2.0;
- ctxt->letter_heading_font = gnome_font_find (gnome_font_get_name(ctxt->style->headings_font), gnome_font_get_size (ctxt->style->headings_font) * 1.5);
- ctxt->letter_tab_font = gnome_font_find (gnome_font_get_name(ctxt->style->headings_font), font_size);
-
- ctxt->pc = pc;
-#warning FIXME gnome_print_multipage_new_from_sizes
-#if 0
- 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));
-#endif
- ctxt->book = book;
- ctxt->query = g_strdup(query);
- if (uses_book) {
- ctxt->contacts = NULL;
- g_object_ref(book);
- e_contact_do_print(book, ctxt->query, ctxt);
- }
- else if (uses_list) {
- ctxt->contacts = g_list_copy (contact_list);
- g_list_foreach (ctxt->contacts, (GFunc)g_object_ref, NULL);
- complete_sequence(NULL, E_BOOK_VIEW_STATUS_OK, ctxt);
- }
- else {
- ctxt->contacts = g_list_append(NULL, contact);
- g_object_ref(contact);
- complete_sequence(NULL, E_BOOK_VIEW_STATUS_OK, ctxt);
- }
- break;
- case GNOME_PRINT_DIALOG_RESPONSE_CANCEL:
- if (uses_book)
- g_object_unref(book);
- else if (uses_list)
- e_free_object_list (contact_list);
- else
- g_object_unref(contact);
- g_free(query);
- gtk_widget_destroy (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(NULL, _("Print contacts"), 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);
-
- g_object_ref(book);
- g_object_set_data(G_OBJECT(dialog), "uses_book", GINT_TO_POINTER (TRUE));
- g_object_set_data(G_OBJECT(dialog), "uses_list", GINT_TO_POINTER (FALSE));
- g_object_set_data(G_OBJECT(dialog), "book", book);
- g_object_set_data(G_OBJECT(dialog), "query", g_strdup(query));
- g_signal_connect(dialog,
- "response", G_CALLBACK(e_contact_print_response), NULL);
- g_signal_connect(dialog,
- "close", G_CALLBACK(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);
- GnomePrintJob *master;
- GnomePrintContext *pc;
- GnomePrintConfig *config;
- gdouble font_size;
-
- master = gnome_print_job_new(NULL);
- config = gnome_print_job_get_config (master);
- gnome_print_config_set_int (config, GNOME_PRINT_KEY_NUM_COPIES, 1);
- pc = gnome_print_job_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_DIALOG_RESPONSE_PREVIEW;
-
- font_size = 72 * ctxt->style->page_height / 27.0 / 2.0;
- ctxt->letter_heading_font = gnome_font_find (gnome_font_get_name(ctxt->style->headings_font), gnome_font_get_size (ctxt->style->headings_font) * 1.5);
- ctxt->letter_tab_font = gnome_font_find (gnome_font_get_name(ctxt->style->headings_font), font_size);
-
- ctxt->pc = pc;
-#warning FIXME gnome_print_multipage_new_from_sizes
-#if 0
- 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));
-#endif
- ctxt->book = book;
- ctxt->query = g_strdup(query);
- ctxt->contacts = NULL;
- g_object_ref(book);
- e_contact_do_print(book, ctxt->query, ctxt);
-}
-
-GtkWidget *
-e_contact_print_contact_dialog_new(EContact *contact)
-{
- GtkWidget *dialog;
-
- dialog = gnome_print_dialog_new(NULL, _("Print contact"), GNOME_PRINT_DIALOG_COPIES);
-
- contact = e_contact_duplicate(contact);
- g_object_set_data(G_OBJECT(dialog), "contact", contact);
- g_object_set_data(G_OBJECT(dialog), "uses_list", GINT_TO_POINTER (FALSE));
- g_object_set_data(G_OBJECT(dialog), "uses_book", GINT_TO_POINTER (FALSE));
- g_signal_connect(dialog,
- "response", G_CALLBACK(e_contact_print_response), NULL);
- g_signal_connect(dialog,
- "close", G_CALLBACK(e_contact_print_close), NULL);
- return dialog;
-}
-
-GtkWidget *
-e_contact_print_contact_list_dialog_new(GList *list)
-{
- GtkWidget *dialog;
- GList *copied_list;
- GList *l;
-
- if (list == NULL)
- return NULL;
-
- copied_list = g_list_copy (list);
- for (l = copied_list; l; l = l->next)
- l->data = e_contact_duplicate (E_CONTACT (l->data));
-
- dialog = gnome_print_dialog_new(NULL, _("Print contact"), GNOME_PRINT_DIALOG_COPIES);
-
- g_object_set_data(G_OBJECT(dialog), "contact_list", copied_list);
- g_object_set_data(G_OBJECT(dialog), "uses_list", GINT_TO_POINTER (TRUE));
- g_object_set_data(G_OBJECT(dialog), "uses_book", GINT_TO_POINTER (FALSE));
- g_signal_connect(dialog,
- "response", G_CALLBACK(e_contact_print_response), NULL);
- g_signal_connect(dialog,
- "close", G_CALLBACK(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 d1721e3509..0000000000
--- a/addressbook/printing/e-contact-print.glade
+++ /dev/null
@@ -1,2018 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd" >
-
-<glade-interface>
- <widget class="GtkDialog" id="print-edit-style">
- <property name="visible">no</property>
- <property name="title" translatable="yes">Page Setup:</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="modal">no</property>
- <property name="allow_shrink">no</property>
- <property name="allow_grow">no</property>
- <property name="window-position">GTK_WIN_POS_NONE</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox1">
- <property name="homogeneous">no</property>
- <property name="spacing">8</property>
- <property name="visible">yes</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
- <property name="layout_style">GTK_BUTTONBOX_END</property>
- <property name="spacing">8</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkButton" id="button1">
- <property name="can_default">yes</property>
- <property name="can_focus">yes</property>
- <property name="visible">yes</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">yes</property>
- <property name="use_underline">yes</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="button2">
- <property name="can_default">yes</property>
- <property name="can_focus">yes</property>
- <property name="visible">yes</property>
- <property name="label">gtk-apply</property>
- <property name="use_stock">yes</property>
- <property name="use_underline">yes</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="button3">
- <property name="can_default">yes</property>
- <property name="can_focus">yes</property>
- <property name="visible">yes</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">yes</property>
- <property name="use_underline">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">yes</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox-contact-print-style-editor">
- <property name="homogeneous">no</property>
- <property name="spacing">5</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkHBox" id="hbox2">
- <property name="border_width">5</property>
- <property name="homogeneous">no</property>
- <property name="spacing">16</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label8">
- <property name="label" translatable="yes">Style name:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="label-style-name">
- <property name="can_focus">yes</property>
- <property name="editable">no</property>
- <property name="text" translatable="yes"></property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkNotebook" id="notebook1">
- <property name="can_focus">yes</property>
- <property name="show_tabs">yes</property>
- <property name="show_border">yes</property>
- <property name="tab_pos">GTK_POS_TOP</property>
- <property name="scrollable">no</property>
- <property name="tab_hborder">2</property>
- <property name="tab_vborder">2</property>
- <property name="enable-popup">no</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkVBox" id="vbox2">
- <property name="border_width">5</property>
- <property name="homogeneous">no</property>
- <property name="spacing">5</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment1">
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkFrame" id="frame5">
- <property name="label" translatable="yes">Preview:</property>
- <property name="label_xalign">0</property>
- <property name="shadow">GTK_SHADOW_ETCHED_IN</property>
- <property name="visible">yes</property>
-
- <child>
- <placeholder />
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox1">
- <property name="homogeneous">yes</property>
- <property name="spacing">7</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkFrame" id="frame6">
- <property name="label" translatable="yes">Options</property>
- <property name="label_xalign">0</property>
- <property name="shadow">GTK_SHADOW_ETCHED_IN</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment4">
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkTable" id="table1">
- <property name="border_width">8</property>
- <property name="homogeneous">no</property>
- <property name="row_spacing">0</property>
- <property name="column_spacing">0</property>
- <property name="n-rows">6</property>
- <property name="n-columns">5</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label5">
- <property name="label" translatable="yes">Include:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label4">
- <property name="label" translatable="yes">Sections:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment2">
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkRadioButton" id="radiobutton1">
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">Immediately follow each other</property>
- <property name="active">yes</property>
- <property name="draw_indicator">yes</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">5</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="checkbutton1">
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">Letter tabs on side</property>
- <property name="active">no</property>
- <property name="draw_indicator">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">5</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="checkbutton2">
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">Headings for each letter</property>
- <property name="active">no</property>
- <property name="draw_indicator">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">5</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment3">
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkRadioButton" id="radiobutton2">
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">Start on a new page</property>
- <property name="active">no</property>
- <property name="draw_indicator">yes</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">5</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label6">
- <property name="label" translatable="yes">Number of columns:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">3</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_padding">0</property>
- <property name="y_padding">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label7">
- <property name="label" translatable="yes">Blank forms at end:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">3</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_padding">0</property>
- <property name="y_padding">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment6">
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkSpinButton" id="spinbutton2">
- <property name="can_focus">yes</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">no</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="wrap">no</property>
- <property name="snap_to_ticks">no</property>
- <property name="visible">yes</property>
- <property name="adjustment">2 0 100 1 10 10</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_padding">0</property>
- <property name="y_padding">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment5">
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkSpinButton" id="spinbutton1">
- <property name="can_focus">yes</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">no</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="wrap">no</property>
- <property name="width-request">45</property>
- <property name="snap_to_ticks">no</property>
- <property name="visible">yes</property>
- <property name="adjustment">1 0 100 1 10 10</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_padding">0</property>
- <property name="y_padding">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox3">
- <property name="homogeneous">no</property>
- <property name="spacing">8</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkFrame" id="frame7">
- <property name="label" translatable="yes">Fonts</property>
- <property name="label_xalign">0</property>
- <property name="shadow">GTK_SHADOW_ETCHED_IN</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkTable" id="table2">
- <property name="border_width">8</property>
- <property name="homogeneous">no</property>
- <property name="row_spacing">13</property>
- <property name="column_spacing">8</property>
- <property name="n-rows">2</property>
- <property name="n-columns">2</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment7">
- <property name="xalign">0.5</property>
- <property name="yalign">1</property>
- <property name="xscale">1</property>
- <property name="yscale">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkButton" id="button6">
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">F_ont...</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="visible">yes</property>
- <property name="use_underline">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment8">
- <property name="xalign">0.5</property>
- <property name="yalign">1</property>
- <property name="xscale">1</property>
- <property name="yscale">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkButton" id="button5">
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">_Font...</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="width-request">90</property>
- <property name="visible">yes</property>
- <property name="use_underline">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox4">
- <property name="homogeneous">no</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label10">
- <property name="label" translatable="yes">Headings</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry3">
- <property name="can_focus">yes</property>
- <property name="editable">yes</property>
- <property name="text" translatable="yes">10 pt. Tahoma</property>
- <property name="width-request">100</property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">expand|fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox5">
- <property name="homogeneous">no</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label9">
- <property name="label" translatable="yes">Body</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry2">
- <property name="can_focus">yes</property>
- <property name="editable">yes</property>
- <property name="text" translatable="yes">8 pt. Tahoma</property>
- <property name="width-request">100</property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">expand|fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frame8">
- <property name="label" translatable="yes">Shading</property>
- <property name="label_xalign">0</property>
- <property name="shadow">GTK_SHADOW_ETCHED_IN</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkCheckButton" id="checkbutton3">
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">Print using gray shading</property>
- <property name="active">no</property>
- <property name="draw_indicator">yes</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="label" translatable="yes">Format</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox3">
- <property name="homogeneous">yes</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkVBox" id="vbox6">
- <property name="homogeneous">no</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkFrame" id="frame9">
- <property name="label" translatable="yes">Paper</property>
- <property name="label_xalign">0</property>
- <property name="shadow">GTK_SHADOW_ETCHED_IN</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkVBox" id="vbox16">
- <property name="border_width">10</property>
- <property name="homogeneous">no</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkVBox" id="vbox17">
- <property name="homogeneous">no</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label21">
- <property name="label" translatable="yes">Type:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow1">
- <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
- <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkTreeView" id="clist1">
- <property name="can_focus">yes</property>
- <property name="headers-visible">no</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label26">
- <property name="child_name">CList:title</property>
- <property name="label" translatable="yes">label26</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child internal-child="hscrollbar">
- <widget class="GtkHScrollbar" id="convertwidget1">
- <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
- <property name="visible">yes</property>
- </widget>
- </child>
-
- <child internal-child="vscrollbar">
- <widget class="GtkVScrollbar" id="convertwidget2">
- <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox18">
- <property name="homogeneous">no</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label24">
- <property name="label" translatable="yes">Dimensions:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox5">
- <property name="homogeneous">yes</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label27">
- <property name="label" translatable="yes">Width:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry9">
- <property name="can_focus">yes</property>
- <property name="editable">yes</property>
- <property name="text" translatable="yes"></property>
- <property name="width-request">1</property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label28">
- <property name="label" translatable="yes">Height:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry10">
- <property name="can_focus">yes</property>
- <property name="editable">yes</property>
- <property name="text" translatable="yes"></property>
- <property name="width-request">1</property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox19">
- <property name="homogeneous">no</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label25">
- <property name="label" translatable="yes">Paper source:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCombo" id="combo1">
- <property name="value_in_list">no</property>
- <property name="case_sensitive">no</property>
- <property name="enable_arrow_keys">yes</property>
- <property name="enable_arrows_always">no</property>
- <property name="allow_empty">yes</property>
- <property name="visible">yes</property>
-
- <child internal-child="entry">
- <widget class="GtkEntry" id="combo-entry1">
- <property name="can_focus">yes</property>
- <property name="editable">yes</property>
- <property name="text" translatable="yes"></property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</property>
- </widget>
- </child>
-
- <child internal-child="list">
- <widget class="GtkList" id="convertwidget3">
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkListItem" id="convertwidget4">
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget5">
- <property name="label" translatable="yes"></property>
- <property name="xalign">0.0</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frame10">
- <property name="label" translatable="yes">Margins</property>
- <property name="label_xalign">0</property>
- <property name="shadow">GTK_SHADOW_ETCHED_IN</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkTable" id="table4">
- <property name="border_width">15</property>
- <property name="homogeneous">yes</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">9</property>
- <property name="n-rows">2</property>
- <property name="n-columns">4</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label29">
- <property name="label" translatable="yes">Top:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">expand|fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label30">
- <property name="label" translatable="yes">Bottom:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">expand|fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label31">
- <property name="label" translatable="yes">Left:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">expand|fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry11">
- <property name="can_focus">yes</property>
- <property name="editable">yes</property>
- <property name="text" translatable="yes"></property>
- <property name="width-request">1</property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">expand|fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry12">
- <property name="can_focus">yes</property>
- <property name="editable">yes</property>
- <property name="text" translatable="yes"></property>
- <property name="width-request">1</property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">expand|fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry13">
- <property name="can_focus">yes</property>
- <property name="editable">yes</property>
- <property name="text" translatable="yes"></property>
- <property name="width-request">1</property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">expand|fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry14">
- <property name="can_focus">yes</property>
- <property name="editable">yes</property>
- <property name="text" translatable="yes"></property>
- <property name="width-request">1</property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">expand|fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label32">
- <property name="label" translatable="yes">Right:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">expand|fill</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox7">
- <property name="homogeneous">no</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkFrame" id="frame11">
- <property name="label" translatable="yes">Page</property>
- <property name="label_xalign">0</property>
- <property name="shadow">GTK_SHADOW_ETCHED_IN</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkVBox" id="vbox8">
- <property name="border_width">10</property>
- <property name="homogeneous">no</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkVBox" id="vbox20">
- <property name="homogeneous">no</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label33">
- <property name="label" translatable="yes">Size:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow2">
- <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
- <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkTreeView" id="clist2">
- <property name="can_focus">yes</property>
- <property name="headers-visible">no</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label35">
- <property name="child_name">CList:title</property>
- <property name="label" translatable="yes">label26</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child internal-child="hscrollbar">
- <widget class="GtkHScrollbar" id="convertwidget6">
- <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
- <property name="visible">yes</property>
- </widget>
- </child>
-
- <child internal-child="vscrollbar">
- <widget class="GtkVScrollbar" id="convertwidget7">
- <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox21">
- <property name="homogeneous">no</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label34">
- <property name="label" translatable="yes">Dimensions:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox6">
- <property name="homogeneous">yes</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label36">
- <property name="label" translatable="yes">Width:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry15">
- <property name="can_focus">yes</property>
- <property name="editable">yes</property>
- <property name="text" translatable="yes"></property>
- <property name="width-request">1</property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label37">
- <property name="label" translatable="yes">Height:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry16">
- <property name="can_focus">yes</property>
- <property name="editable">yes</property>
- <property name="text" translatable="yes"></property>
- <property name="width-request">1</property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frame12">
- <property name="label" translatable="yes">Orientation</property>
- <property name="label_xalign">0</property>
- <property name="shadow">GTK_SHADOW_ETCHED_IN</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkHBox" id="hbox4">
- <property name="homogeneous">no</property>
- <property name="spacing">10</property>
- <property name="visible">yes</property>
-
- <child>
- <placeholder />
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox9">
- <property name="homogeneous">no</property>
- <property name="spacing">5</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment9">
- <property name="xalign">0</property>
- <property name="yalign">1</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkRadioButton" id="radiobutton3">
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">Portrait</property>
- <property name="active">no</property>
- <property name="draw_indicator">yes</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment10">
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkRadioButton" id="radiobutton4">
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">Landscape</property>
- <property name="active">no</property>
- <property name="draw_indicator">yes</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label2">
- <property name="label" translatable="yes">Paper</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox10">
- <property name="border_width">8</property>
- <property name="homogeneous">no</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkTable" id="table5">
- <property name="homogeneous">yes</property>
- <property name="row_spacing">4</property>
- <property name="column_spacing">4</property>
- <property name="n-rows">4</property>
- <property name="n-columns">3</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment15">
- <property name="xalign">0</property>
- <property name="yalign">1</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkButton" id="button11">
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">F_ont...</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="visible">yes</property>
- <property name="use_underline">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTextView" id="text10">
- <property name="can_focus">yes</property>
- <property name="editable">no</property>
- <property name="text" translatable="yes"></property>
- <property name="wrap_mode">GTK_WRAP_WORD</property>
- <property name="height-request">50</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">expand|fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTextView" id="text11">
- <property name="can_focus">yes</property>
- <property name="editable">no</property>
- <property name="text" translatable="yes"></property>
- <property name="wrap_mode">GTK_WRAP_WORD</property>
- <property name="height-request">50</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">expand|fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTextView" id="text12">
- <property name="can_focus">yes</property>
- <property name="editable">no</property>
- <property name="text" translatable="yes"></property>
- <property name="wrap_mode">GTK_WRAP_WORD</property>
- <property name="height-request">50</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTextView" id="text13">
- <property name="can_focus">yes</property>
- <property name="editable">no</property>
- <property name="text" translatable="yes"></property>
- <property name="wrap_mode">GTK_WRAP_WORD</property>
- <property name="height-request">50</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">expand|fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTextView" id="text14">
- <property name="can_focus">yes</property>
- <property name="editable">no</property>
- <property name="text" translatable="yes"></property>
- <property name="wrap_mode">GTK_WRAP_WORD</property>
- <property name="height-request">5</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTextView" id="text15">
- <property name="can_focus">yes</property>
- <property name="editable">no</property>
- <property name="text" translatable="yes"></property>
- <property name="wrap_mode">GTK_WRAP_WORD</property>
- <property name="height-request">50</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment16">
- <property name="xalign">0.5</property>
- <property name="yalign">1</property>
- <property name="xscale">1</property>
- <property name="yscale">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkVBox" id="vbox14">
- <property name="homogeneous">no</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label14">
- <property name="label" translatable="yes">Header</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry7">
- <property name="can_focus">yes</property>
- <property name="editable">yes</property>
- <property name="text" translatable="yes"></property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">expand|fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment17">
- <property name="xalign">0.5</property>
- <property name="yalign">1</property>
- <property name="xscale">1</property>
- <property name="yscale">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkVBox" id="vbox15">
- <property name="homogeneous">no</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label15">
- <property name="label" translatable="yes">Footer:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry8">
- <property name="can_focus">yes</property>
- <property name="editable">yes</property>
- <property name="text" translatable="yes"></property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">expand|fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment14">
- <property name="xalign">0</property>
- <property name="yalign">1</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkButton" id="button10">
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">_Font...</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="visible">yes</property>
- <property name="use_underline">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox7">
- <property name="homogeneous">no</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkToolbar" id="toolbar1">
- <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
- <property name="toolbar-style">GTK_TOOLBAR_ICONS</property>
- <property name="visible">yes</property>
-
- <child>
- <placeholder />
- </child>
-
- <child>
- <placeholder />
- </child>
-
- <child>
- <placeholder />
- </child>
-
- <child>
- <placeholder />
- </child>
-
- <child>
- <placeholder />
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">no</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="checkbutton4">
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">Reverse on even pages</property>
- <property name="active">no</property>
- <property name="draw_indicator">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label3">
- <property name="label" translatable="yes">Header/Footer</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">4</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
-</glade-interface>
diff --git a/addressbook/printing/e-contact-print.h b/addressbook/printing/e-contact-print.h
deleted file mode 100644
index 4edc948082..0000000000
--- a/addressbook/printing/e-contact-print.h
+++ /dev/null
@@ -1,36 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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 <libebook/e-book.h>
-#include <libebook/e-contact.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_contact_dialog_new(EContact *card);
-GtkWidget *e_contact_print_contact_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 ef76c0b46e..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 980750a6b2..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 0bb19aa92e..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 f49625434e..0000000000
--- a/addressbook/printing/test-contact-print-style-editor.c
+++ /dev/null
@@ -1,93 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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-ui-init.h>
-#include <bonobo/bonobo-main.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_program_init ("Contact Print Style Editor Test", VERSION,
- LIBGNOMEUI_MODULE,
- argc, argv,
- NULL);
-
- glade_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 */
- g_signal_connect( app, "destroy",
- G_CALLBACK ( destroy_callback ),
- ( gpointer ) app );
-
- gtk_widget_show_all( app );
-
- bonobo_main();
-
- /* Not reached. */
- return 0;
-}
diff --git a/addressbook/printing/test-print.c b/addressbook/printing/test-print.c
deleted file mode 100644
index a1dede7bde..0000000000
--- a/addressbook/printing/test-print.c
+++ /dev/null
@@ -1,88 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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-dialog.h>
-#include <libgnomeui/gnome-ui-init.h>
-#include <glade/glade.h>
-#include <bonobo/bonobo-main.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_program_init ("Contact Print Test", VERSION,
- LIBGNOMEUI_MODULE,
- argc, argv,
- NULL);
-
- glade_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);
- g_signal_connect(print, "close", G_CALLBACK(test_close), NULL);
-
- bonobo_main();
-
- /* Not reached. */
- return 0;
-}
diff --git a/addressbook/tools/.cvsignore b/addressbook/tools/.cvsignore
deleted file mode 100644
index 25963ae030..0000000000
--- a/addressbook/tools/.cvsignore
+++ /dev/null
@@ -1,5 +0,0 @@
-Makefile
-Makefile.in
-evolution-addressbook-export
-evolution-addressbook-abuse
-evolution-addressbook-clean
diff --git a/addressbook/tools/Makefile.am b/addressbook/tools/Makefile.am
deleted file mode 100644
index fe76abcc08..0000000000
--- a/addressbook/tools/Makefile.am
+++ /dev/null
@@ -1,49 +0,0 @@
-privlibexec_SCRIPTS = \
- csv2vcard \
- evolution-addressbook-clean
-
-bin_PROGRAMS = \
- evolution-addressbook-export
-
-noinst_PROGRAMS= evolution-addressbook-abuse
-
-INCLUDES = \
- -DG_LOG_DOMAIN=\"evolution-addressbook-tools\" \
- -I$(top_srcdir) \
- -I$(top_builddir) \
- -DEVOLUTION_LOCALEDIR=\""$(localedir)"\" \
- -DPREFIX=\""$(prefix)"\" \
- -DSYSCONFDIR=\""$(sysconfdir)"\" \
- -DDATADIR=\""$(datadir)"\" \
- -DLIBDIR=\""$(libdir)"\" \
- -I$(top_srcdir)/addressbook \
- -I$(top_srcdir)/addressbook/backend \
- -I$(top_builddir)/addressbook/backend \
- $(GNOME_FULL_CFLAGS)
-
-evolution_addressbook_export_SOURCES = \
- evolution-addressbook-export.c \
- evolution-addressbook-export-list-cards.c \
- evolution-addressbook-export-list-folders.c \
- evolution-addressbook-export.h
-
-evolution_addressbook_export_LDADD = \
- $(top_builddir)/addressbook/backend/ebook/libebook.la \
- $(top_builddir)/e-util/ename/libename.la \
- $(top_builddir)/e-util/libeutil.la
-
-evolution_addressbook_abuse_LDADD = \
- $(top_builddir)/addressbook/backend/ebook/libebook.la \
- $(top_builddir)/e-util/ename/libename.la \
- $(top_builddir)/e-util/libeutil.la
-
-EXTRA_DIST = $(privlibexec_SCRIPTS) \
- evolution-addressbook-clean.in
-
-CLEANFILES= evolution-addressbook-clean
-
-evolution-addressbook-clean: evolution-addressbook-clean.in Makefile
-## Use sed and then mv to avoid problems if the user interrupts.
- sed -e 's?\@EVOLUTION_TOOLSDIR\@?$(privlibexecdir)?g' \
- < $(srcdir)/evolution-addressbook-clean.in > evolution-addressbook-clean.tmp \
- && mv evolution-addressbook-clean.tmp evolution-addressbook-clean
diff --git a/addressbook/tools/csv2vcard b/addressbook/tools/csv2vcard
deleted file mode 100755
index b968fbd9c3..0000000000
--- a/addressbook/tools/csv2vcard
+++ /dev/null
@@ -1,236 +0,0 @@
-#!/usr/bin/perl -w
-#
-# cvs2vcard - Script to convert Outlook CSV files into VCard files
-# suitable to be imported into Evolution.
-#
-# Copyright (C) 2001 Ximian, Inc.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of version 2 of the GNU General Public
-# License as published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public
-# 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: Michael MacDonald <mjmac@ximian.com>
-#
-
-use strict;
-use diagnostics;
-use Text::ParseWords;
-
-sub usage
-{
- print STDERR << "--EndOfUsage";
-
-Takes a CSV-formatted list of contacts from Outlook and attempts to
-convert it into a list of VCards suitable for import into Evolution.
-
-Usage: $0 [infile outfile]
-
---EndOfUsage
-
- exit;
-}
-
-sub is_recognized_format
-{
- my $line = shift;
-
- # Making some assumptions here... Prolly OK.
- return $line =~ /(First Name|Middle Name|Last Name)/;
-}
-
-sub map_columns
-{
- my $line = shift;
-
- my @names = parse_line(',', 0, $line);
-
- my $ctr = 0;
- my %fieldmap = map { $_ => $ctr++ } @names;
-
- return %fieldmap;
-}
-
-sub build_vcard_attr_from_def
-{
- my ($def, $fields, $map) = @_;
-
- # Valid chars for lookup (from Outlook CSV) are
- # A-Za-z0-9_-'/
- # Valid chars for formatting of attr are
- # \s,|
- my @lookup = map { s/=0A$//; s/[^\w\s\-'\/]//; $_; } split /[\s,]*\|[\s,]*/, $def;
-
- foreach my $el (@lookup) {
- unless (defined($map->{ $el })) {
- print STDERR "$el is undefined\n";
- next;
- }
- if (defined($fields->[$map->{ $el }])) {
- unless ($fields->[$map->{ $el }] =~ /(^$|0\/0\/00)/) {
- $def =~ s/$el/$fields->[$map->{ $el }]/;
- } else {
- $def =~ s/((?<=\|)\s*)?$el(\s*?(?=\|))?(=0A)?,?//;
- }
- } else {
- $def =~ s/((?<=\|)\s*)?$el(\s*?(?=\|))?(=0A)?,?//;
- }
- }
- # Get rid of field delimiters
- $def =~ s/\|//g;
- # Snip off any trailing semicolons or whitespace
- $def =~ s/[\s;]*$//;
-
- return $def;
-}
-
-sub build_vcard_from_line {
- my ($line, %map) = @_;
- my %vcard;
-
- my @fields = parse_line(',', 0, $line);
-
- my %vcard_def = ( FN => 'Title |First Name |Middle Name |Last Name |Suffix',
- N => 'Last Name| Suffix|;First Name|;Middle Name|;Title',
- 'ADR;WORK' => 'PO Box|;Business Street 2|;Business Street|;Business City|;Business State|;Business Postal Code|;Business Country',
- 'LABEL;QUOTED-PRINTABLE;WORK' => 'PO Box |Business Street=0A|Business Street 2=0A|Business City,| Business State| Business Postal Code=0A|Business Country',
- 'TEL;WORK;VOICE' => 'Business Phone',
- 'TEL;WORK;VOICE2' => 'Business Phone 2',
- 'TEL;WORK;FAX' => 'Business Fax',
- 'TEL;WORK;COMPANY' => 'Company Main Phone',
- 'ADR;HOME' => ';Home Street 2|;Home Street|;Home City|;Home State|;Home Postal Code|;Home Country',
- 'LABEL;QUOTED-PRINTABLE;HOME' => 'Home Street=0A|Home Street 2=0A|Home City,| Home State| Home Postal Code=0A|Home Country',
- 'TEL;HOME;VOICE' => 'Home Phone',
- 'TEL;HOME;VOICE2' => 'Home Phone 2',
- 'TEL;HOME;FAX' => 'Home Fax',
- 'ADR;POSTAL' => ';Other Street 2|;Other Street|;Other City|;Other State|;Other Postal Code|;Other Country',
- 'LABEL;QUOTED-PRINTABLE;POSTAL' => 'Other Street=0A|Other Street 2=0A|Other City,| Other State| Other Postal Code=0A|Other Country',
- 'TEL;VOICE' => 'Other Phone',
- 'TEL;FAX' => 'Other Fax',
- 'TEL;CELL' => 'Mobile Phone',
- 'TEL;CAR' => 'Car Phone',
- 'TEL;PAGER' => 'Pager',
- 'TEL;PREF' => 'Primary Phone',
- 'TEL;ISDN' => 'ISDN',
- 'TEL;X-EVOLUTION-CALLBACK' => 'Callback',
- 'TEL;X-EVOLUTION-TTYTDD' => 'TTY/TDD Phone',
- 'TEL;X-EVOLUTION-TELEX' => 'Telex',
- 'TEL;X-EVOLUTION-RADIO' => 'Radio Phone',
- 'EMAIL;INTERNET' => 'E-mail Address',
- 'EMAIL;INTERNET2' => 'E-mail 2 Address',
- 'EMAIL;INTERNET3' => 'E-mail 3 Address',
- ORG => 'Company|;Department',
- TITLE => 'Job Title',
- ROLE => 'Profession',
- 'X-EVOLUTION-ASSISTANT' => "Assistant's Name",
- 'TEL;X-EVOLUTION-ASSISTANT' => "Assistant's Phone",
- 'X-EVOLUTION-SPOUSE' => 'Spouse',
- 'X-EVOLUTION-ANNIVERSARY' => 'Anniversary',
- 'X-EVOLUTION-MANAGER' => "Manager's Name",
- 'X-EVOLUTION-OFFICE' => 'Office Location',
- BDAY => 'Birthday',
- NOTE => 'Notes',
- FBURL => 'Internet Free Busy',
- URL => 'Web Page',
- );
-
- foreach my $key (keys(%vcard_def)) {
- my $attr = build_vcard_attr_from_def($vcard_def{ $key }, \@fields, \%map);
- if (defined($attr)) {
- $vcard{ $key } = $attr unless ($attr =~ /^$/);
- }
- }
-
- return %vcard;
-}
-
-sub print_vcard_to_fh
-{
- my ($fh, %vcard) = @_;
-
- print $fh "BEGIN:VCARD\n";
- foreach my $key (keys(%vcard)) {
- # Dirty hack because Evolution's vcard stores multiple email addrs
- # with same sttribute, hence key collision. Bleah.
- # Ugh! Same deal for multiple phones... (eg. bus. phone)
- #
- # And finally, while we're special-casing... Outlook exports dates
- # differently, so munge 'em if we find 'em.
- if ($key =~ /EMAIL;INTERNET/o) {
- (my $temp = $key) =~ s/\d$//;
- print $fh "$temp:$vcard{ $key }\n";
- } elsif ($key =~ /TEL;(HOME|WORK)/o) {
- (my $temp = $key) =~ s/\d$//;
- print $fh "$temp:$vcard{ $key }\n";
- } elsif ($key =~ /(BDAY|X\-EVOLUTION\-ANNIVERSARY)/o) {
- my $temp = $vcard{ $key };
- if ($temp =~ /(\d\d)\/(\d\d)\/(\d\d)/) {
- # Y2k !! MS Didn't learn anything.
- # Hope no one was born before 1915
- if ((1900 + $3) < 1915) {
- print $fh "$key:20$3-$1-$2\n";
- } else {
- print $fh "$key:19$3-$1-$2\n";
- }
- } else {
- # Something's funky... Just delete the attribute
- print STDERR "Couldn't figure out what to do with $key:$vcard{ $key }\n";
- delete($vcard{ $key });
- }
- } else {
- print $fh "$key:$vcard{ $key }\n";
- }
- }
- print $fh "END:VCARD\n\n";
-}
-
-my $in = $ARGV[0];
-my $out = $ARGV[1];
-
-usage() unless(defined($in) && defined($out));
-
-open (IN, $in)
- or die "Can't open($in): $!\n";
-
-open (OUT, ">$out")
- or die "Can't open($out): $!\n";
-
-my $linectr = 0;
-my %map;
-
-while (my $line = <IN>) {
- $line =~ s/\r//g;
- $line =~ s/\n$//;
- if ($linectr == 0) {
- $linectr++;
- usage() unless is_recognized_format($line);
- %map = map_columns($line);
- #if ($line =~ /\r\n$/) {
- # print STDERR "Apparenlty found DOS-style EOL indicators...\n";
- $/ = "\r\n";
- #}
- } else {
- $linectr++;
- while ($line =~ /^(("([^"]|\n|"")*")?,)*"([^"]|\n|"")*$/) {
- my $temp = $line;
- $line = <IN>;
- $line =~ s/\r//g;
- $line =~ s/\n$//;
- $line = "$temp $line";
- }
- my %vcard = build_vcard_from_line($line, %map);
- print_vcard_to_fh(\*OUT, %vcard);
- }
-}
-
-close(IN);
-close(OUT);
diff --git a/addressbook/tools/evolution-addressbook-abuse.c b/addressbook/tools/evolution-addressbook-abuse.c
deleted file mode 100644
index 3446e15938..0000000000
--- a/addressbook/tools/evolution-addressbook-abuse.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-#include <config.h>
-
-#include <bonobo/bonobo-main.h>
-
-#include <backend/ebook/e-book.h>
-#include <gnome.h>
-
-#define CONTACTS_TO_ADD 2000
-
-static gchar *
-make_random_string (void)
-{
- const gchar *elements = " abcdefghijklmnopqrstuvwxyz1234567890 ABCDEFGHIJKLMNOPQRSTUVWXYZ";
- gint len = strlen (elements);
- gint i, N = 5 + (random () % 10);
- gchar *str = g_malloc (N+1);
-
- for (i = 0; i < N; ++i) {
- str[i] = elements[random () % len];
- }
- str[i] = '\0';
-
- return str;
-}
-
-static gchar *
-make_random_vcard (void)
-{
- gchar *fa = make_random_string ();
- gchar *name = make_random_string ();
- gchar *email = make_random_string ();
- gchar *org = make_random_string ();
-
- gchar *vcard;
-
- vcard = g_strdup_printf ("BEGIN:VCARD\n"
- "X-EVOLUTION-FILE-AS:%s\n"
- "N:%s\n"
- "EMAIL;INTERNET:%s\n"
- "ORG:%s\n"
- "END:VCARD",
- fa, name, email, org);
- g_free (fa);
- g_free (name);
- g_free (email);
- g_free (org);
-
- return vcard;
-}
-
-int
-main (int argc, char *argv[])
-{
- EBook *book;
- int i;
-
- if (getenv ("ABUSE_THE_WOMBAT") == NULL) {
- g_print ("You probably don't want to use this program.\n"
- "It isn't very nice.\n");
- exit(0);
- }
-
- bindtextdomain (GETTEXT_PACKAGE, EVOLUTION_LOCALEDIR);
- textdomain (GETTEXT_PACKAGE);
-
- gnome_program_init ("evolution-addressbook-abuse", VERSION,
- LIBGNOMEUI_MODULE, argc, argv,
- GNOME_PROGRAM_STANDARD_PROPERTIES,
- NULL);
-
- if (!e_book_get_default_addressbook (&book, NULL)) {
- g_warning ("couldn't open addressbook");
- exit (1);
- }
-
- for (i = 0; i < CONTACTS_TO_ADD; ++i) {
- gchar *vcard = make_random_vcard ();
- EContact *contact = e_contact_new_from_vcard (vcard);
- g_message ("adding %d", i);
- if (!e_book_add_contact (book, contact, NULL)) {
- g_warning ("something went wrong...");
- exit (1);
- }
- g_free (vcard);
- g_object_unref (contact);
- }
-
- return 0;
-}
diff --git a/addressbook/tools/evolution-addressbook-clean.in b/addressbook/tools/evolution-addressbook-clean.in
deleted file mode 100644
index b7ee7ba167..0000000000
--- a/addressbook/tools/evolution-addressbook-clean.in
+++ /dev/null
@@ -1,24 +0,0 @@
-#! /usr/bin/perl -w
-
-sub do_system
-{
- my ($command) = @_;
- system ($command);
- if ($? != 0) {
- die "Command failed: $command";
- }
-}
-
-$filename = `@EVOLUTION_TOOLSDIR@/evolution-addressbook-export`;
-if ($? != 0) {
- $! = $?;
- die $!;
-}
-
-$HOME = $ENV{"HOME"};
-
-system ("@EVOLUTION_TOOLSDIR@/killev");
-do_system ("/bin/mv ${HOME}/evolution/local/Contacts/addressbook.db ${HOME}/evolution/local/Contacts/addressbook-backup.db");
-do_system ("@EVOLUTION_TOOLSDIR@/evolution-addressbook-import --input-file $filename");
-do_system ("/bin/rm $filename");
-
diff --git a/addressbook/tools/evolution-addressbook-export-list-cards.c b/addressbook/tools/evolution-addressbook-export-list-cards.c
deleted file mode 100644
index c51393d047..0000000000
--- a/addressbook/tools/evolution-addressbook-export-list-cards.c
+++ /dev/null
@@ -1,780 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* evolution-addressbook-export-list-cards.c
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Gilbert Fang <gilbert.fang@sun.com>
- *
- */
-
-#include <config.h>
-
-#include <sys/types.h>
-#include <unistd.h>
-
-#include <glib.h>
-#include <bonobo-activation/bonobo-activation.h>
-#include <libbonobo.h>
-#include <libgnome/libgnome.h>
-
-#include <ebook/e-book.h>
-#include <ebook/e-card-simple.h>
-#include <ebook/e-book-util.h>
-
-#include "evolution-addressbook-export.h"
-
-#define COMMA_SEPARATOR ","
-
-typedef enum _CARD_FORMAT CARD_FORMAT;
-typedef enum _DeliveryAddressField DeliveryAddressField;
-typedef enum _ECardSimpleFieldCSV ECardSimpleFieldCSV;
-typedef struct _ECardCSVFieldData ECardCSVFieldData;
-
-enum _CARD_FORMAT
-{
- CARD_FORMAT_CSV,
- CARD_FORMAT_VCARD
-};
-
-enum _DeliveryAddressField
-{
- DELIVERY_ADDRESS_STREET,
- DELIVERY_ADDRESS_EXT,
- DELIVERY_ADDRESS_CITY,
- DELIVERY_ADDRESS_REGION,
- DELIVERY_ADDRESS_CODE,
- DELIVERY_ADDRESS_COUNTRY
-};
-
-enum _ECardSimpleFieldCSV
-{
- E_CARD_SIMPLE_FIELD_CSV_FILE_AS,
- E_CARD_SIMPLE_FIELD_CSV_FULL_NAME,
- E_CARD_SIMPLE_FIELD_CSV_EMAIL,
- E_CARD_SIMPLE_FIELD_CSV_PHONE_PRIMARY,
- E_CARD_SIMPLE_FIELD_CSV_PHONE_ASSISTANT,
- E_CARD_SIMPLE_FIELD_CSV_PHONE_BUSINESS,
- E_CARD_SIMPLE_FIELD_CSV_PHONE_CALLBACK,
- E_CARD_SIMPLE_FIELD_CSV_PHONE_COMPANY,
- E_CARD_SIMPLE_FIELD_CSV_PHONE_HOME,
- E_CARD_SIMPLE_FIELD_CSV_ORG,
- /*E_CARD_SIMPLE_FIELD_CSV_ADDRESS_BUSINESS, */
- E_CARD_SIMPLE_FIELD_CSV_ADDRESS_BUSINESS_STREET,
- E_CARD_SIMPLE_FIELD_CSV_ADDRESS_BUSINESS_EXT,
- E_CARD_SIMPLE_FIELD_CSV_ADDRESS_BUSINESS_CITY,
- E_CARD_SIMPLE_FIELD_CSV_ADDRESS_BUSINESS_REGION,
- E_CARD_SIMPLE_FIELD_CSV_ADDRESS_BUSINESS_POSTCODE,
- E_CARD_SIMPLE_FIELD_CSV_ADDRESS_BUSINESS_COUNTRY,
- /*E_CARD_SIMPLE_FIELD_CSV_ADDRESS_HOME, */
- E_CARD_SIMPLE_FIELD_CSV_ADDRESS_HOME_STREET,
- E_CARD_SIMPLE_FIELD_CSV_ADDRESS_HOME_EXT,
- E_CARD_SIMPLE_FIELD_CSV_ADDRESS_HOME_CITY,
- E_CARD_SIMPLE_FIELD_CSV_ADDRESS_HOME_REGION,
- E_CARD_SIMPLE_FIELD_CSV_ADDRESS_HOME_POSTCODE,
- E_CARD_SIMPLE_FIELD_CSV_ADDRESS_HOME_COUNTRY,
- E_CARD_SIMPLE_FIELD_CSV_PHONE_MOBILE,
- E_CARD_SIMPLE_FIELD_CSV_PHONE_CAR,
- E_CARD_SIMPLE_FIELD_CSV_PHONE_BUSINESS_FAX,
- E_CARD_SIMPLE_FIELD_CSV_PHONE_HOME_FAX,
- E_CARD_SIMPLE_FIELD_CSV_PHONE_BUSINESS_2,
- E_CARD_SIMPLE_FIELD_CSV_PHONE_HOME_2,
- E_CARD_SIMPLE_FIELD_CSV_PHONE_ISDN,
- E_CARD_SIMPLE_FIELD_CSV_PHONE_OTHER,
- E_CARD_SIMPLE_FIELD_CSV_PHONE_OTHER_FAX,
- E_CARD_SIMPLE_FIELD_CSV_PHONE_PAGER,
- E_CARD_SIMPLE_FIELD_CSV_PHONE_RADIO,
- E_CARD_SIMPLE_FIELD_CSV_PHONE_TELEX,
- E_CARD_SIMPLE_FIELD_CSV_PHONE_TTYTDD,
- /*E_CARD_SIMPLE_FIELD_CSV_ADDRESS_OTHER, */
- E_CARD_SIMPLE_FIELD_CSV_ADDRESS_OTHER_STREET,
- E_CARD_SIMPLE_FIELD_CSV_ADDRESS_OTHER_EXT,
- E_CARD_SIMPLE_FIELD_CSV_ADDRESS_OTHER_CITY,
- E_CARD_SIMPLE_FIELD_CSV_ADDRESS_OTHER_REGION,
- E_CARD_SIMPLE_FIELD_CSV_ADDRESS_OTHER_POSTCODE,
- E_CARD_SIMPLE_FIELD_CSV_ADDRESS_OTHER_COUNTRY,
- E_CARD_SIMPLE_FIELD_CSV_EMAIL_2,
- E_CARD_SIMPLE_FIELD_CSV_EMAIL_3,
- E_CARD_SIMPLE_FIELD_CSV_URL,
- E_CARD_SIMPLE_FIELD_CSV_ORG_UNIT,
- E_CARD_SIMPLE_FIELD_CSV_OFFICE,
- E_CARD_SIMPLE_FIELD_CSV_TITLE,
- E_CARD_SIMPLE_FIELD_CSV_ROLE,
- E_CARD_SIMPLE_FIELD_CSV_MANAGER,
- E_CARD_SIMPLE_FIELD_CSV_ASSISTANT,
- E_CARD_SIMPLE_FIELD_CSV_NICKNAME,
- E_CARD_SIMPLE_FIELD_CSV_SPOUSE,
- E_CARD_SIMPLE_FIELD_CSV_NOTE,
- E_CARD_SIMPLE_FIELD_CSV_CALURI,
- E_CARD_SIMPLE_FIELD_CSV_FBURL,
- /*E_CARD_SIMPLE_FIELD_CSV_ANNIVERSARY, */
- E_CARD_SIMPLE_FIELD_CSV_ANNIVERSARY_YEAR,
- E_CARD_SIMPLE_FIELD_CSV_ANNIVERSARY_MONTH,
- E_CARD_SIMPLE_FIELD_CSV_ANNIVERSARY_DAY,
- /*E_CARD_SIMPLE_FIELD_CSV_BIRTH_DATE, */
- E_CARD_SIMPLE_FIELD_CSV_BIRTH_DATE_YEAR,
- E_CARD_SIMPLE_FIELD_CSV_BIRTH_DATE_MONTH,
- E_CARD_SIMPLE_FIELD_CSV_BIRTH_DATE_DAY,
- E_CARD_SIMPLE_FIELD_CSV_MAILER,
- E_CARD_SIMPLE_FIELD_CSV_NAME_OR_ORG,
- E_CARD_SIMPLE_FIELD_CSV_CATEGORIES,
- E_CARD_SIMPLE_FIELD_CSV_FAMILY_NAME,
- E_CARD_SIMPLE_FIELD_CSV_GIVEN_NAME,
- E_CARD_SIMPLE_FIELD_CSV_ADDITIONAL_NAME,
- E_CARD_SIMPLE_FIELD_CSV_NAME_SUFFIX,
- E_CARD_SIMPLE_FIELD_CSV_WANTS_HTML,
- E_CARD_SIMPLE_FIELD_CSV_IS_LIST,
- E_CARD_SIMPLE_FIELD_CSV_LAST
-};
-
-struct _ECardCSVFieldData
-{
- gint csv_field;
- gint simple_field;
- gchar *csv_name;
-};
-
-#define NOMAP -1
-static ECardCSVFieldData csv_field_data[] = {
- {E_CARD_SIMPLE_FIELD_CSV_FILE_AS, E_CARD_SIMPLE_FIELD_FILE_AS, ""},
- {E_CARD_SIMPLE_FIELD_CSV_FULL_NAME, E_CARD_SIMPLE_FIELD_CSV_FULL_NAME, ""},
- {E_CARD_SIMPLE_FIELD_CSV_EMAIL, E_CARD_SIMPLE_FIELD_EMAIL, ""},
- {E_CARD_SIMPLE_FIELD_CSV_PHONE_PRIMARY, E_CARD_SIMPLE_FIELD_PHONE_PRIMARY,
- ""},
- {E_CARD_SIMPLE_FIELD_CSV_PHONE_ASSISTANT,
- E_CARD_SIMPLE_FIELD_PHONE_ASSISTANT, ""},
- {E_CARD_SIMPLE_FIELD_CSV_PHONE_BUSINESS,
- E_CARD_SIMPLE_FIELD_PHONE_BUSINESS, ""},
- {E_CARD_SIMPLE_FIELD_CSV_PHONE_CALLBACK,
- E_CARD_SIMPLE_FIELD_PHONE_CALLBACK, ""},
- {E_CARD_SIMPLE_FIELD_CSV_PHONE_COMPANY, E_CARD_SIMPLE_FIELD_PHONE_COMPANY,
- ""},
- {E_CARD_SIMPLE_FIELD_CSV_PHONE_HOME, E_CARD_SIMPLE_FIELD_PHONE_HOME, ""},
- {E_CARD_SIMPLE_FIELD_CSV_ORG, E_CARD_SIMPLE_FIELD_ORG, ""},
- /*E_CARD_SIMPLE_FIELD_CSV_ADDRESS_BUSINESS, */
- {E_CARD_SIMPLE_FIELD_CSV_ADDRESS_BUSINESS_STREET, NOMAP,
- "Business Address"},
- {E_CARD_SIMPLE_FIELD_CSV_ADDRESS_BUSINESS_EXT, NOMAP,
- "Business Address2"},
- {E_CARD_SIMPLE_FIELD_CSV_ADDRESS_BUSINESS_CITY, NOMAP,
- "Business Address City"},
- {E_CARD_SIMPLE_FIELD_CSV_ADDRESS_BUSINESS_REGION, NOMAP,
- "Business Address State"},
- {E_CARD_SIMPLE_FIELD_CSV_ADDRESS_BUSINESS_POSTCODE, NOMAP,
- "Business Address PostCode"},
- {E_CARD_SIMPLE_FIELD_CSV_ADDRESS_BUSINESS_COUNTRY, NOMAP,
- "Business Address Country"},
- /*E_CARD_SIMPLE_FIELD_CSV_ADDRESS_HOME, */
- {E_CARD_SIMPLE_FIELD_CSV_ADDRESS_HOME_STREET, NOMAP, "Home Address"},
- {E_CARD_SIMPLE_FIELD_CSV_ADDRESS_HOME_EXT, NOMAP, "Home Address2"},
- {E_CARD_SIMPLE_FIELD_CSV_ADDRESS_HOME_CITY, NOMAP, "Home Address City"},
- {E_CARD_SIMPLE_FIELD_CSV_ADDRESS_HOME_REGION, NOMAP,
- "Home Address State"},
- {E_CARD_SIMPLE_FIELD_CSV_ADDRESS_HOME_POSTCODE, NOMAP,
- "Home Address PostCode"},
- {E_CARD_SIMPLE_FIELD_CSV_ADDRESS_HOME_COUNTRY, NOMAP,
- "Home Address Country"},
- {E_CARD_SIMPLE_FIELD_CSV_PHONE_MOBILE, E_CARD_SIMPLE_FIELD_PHONE_MOBILE,
- ""},
- {E_CARD_SIMPLE_FIELD_CSV_PHONE_CAR, E_CARD_SIMPLE_FIELD_PHONE_CAR, ""},
- {E_CARD_SIMPLE_FIELD_CSV_PHONE_BUSINESS_FAX,
- E_CARD_SIMPLE_FIELD_PHONE_BUSINESS_FAX, ""},
- {E_CARD_SIMPLE_FIELD_CSV_PHONE_HOME_FAX,
- E_CARD_SIMPLE_FIELD_PHONE_HOME_FAX, ""},
- {E_CARD_SIMPLE_FIELD_CSV_PHONE_BUSINESS_2,
- E_CARD_SIMPLE_FIELD_PHONE_BUSINESS_2, ""},
- {E_CARD_SIMPLE_FIELD_CSV_PHONE_HOME_2, E_CARD_SIMPLE_FIELD_PHONE_HOME_2,
- ""},
- {E_CARD_SIMPLE_FIELD_CSV_PHONE_ISDN, E_CARD_SIMPLE_FIELD_PHONE_ISDN, ""},
- {E_CARD_SIMPLE_FIELD_CSV_PHONE_OTHER, E_CARD_SIMPLE_FIELD_PHONE_OTHER, ""},
- {E_CARD_SIMPLE_FIELD_CSV_PHONE_OTHER_FAX,
- E_CARD_SIMPLE_FIELD_PHONE_OTHER_FAX, ""},
- {E_CARD_SIMPLE_FIELD_CSV_PHONE_PAGER, E_CARD_SIMPLE_FIELD_PHONE_PAGER, ""},
- {E_CARD_SIMPLE_FIELD_CSV_PHONE_RADIO, E_CARD_SIMPLE_FIELD_PHONE_RADIO, ""},
- {E_CARD_SIMPLE_FIELD_CSV_PHONE_TELEX, E_CARD_SIMPLE_FIELD_PHONE_TELEX, ""},
- {E_CARD_SIMPLE_FIELD_CSV_PHONE_TTYTDD, E_CARD_SIMPLE_FIELD_PHONE_TTYTDD,
- ""},
- /*E_CARD_SIMPLE_FIELD_CSV_ADDRESS_OTHER, */
- {E_CARD_SIMPLE_FIELD_CSV_ADDRESS_OTHER_STREET, NOMAP, "Other Address"},
- {E_CARD_SIMPLE_FIELD_CSV_ADDRESS_OTHER_EXT, NOMAP, "Other Address2"},
- {E_CARD_SIMPLE_FIELD_CSV_ADDRESS_OTHER_CITY, NOMAP,
- "Other Address City"},
- {E_CARD_SIMPLE_FIELD_CSV_ADDRESS_OTHER_REGION, NOMAP,
- "Other Address State"},
- {E_CARD_SIMPLE_FIELD_CSV_ADDRESS_OTHER_POSTCODE, NOMAP,
- "Other Address PostCode"},
- {E_CARD_SIMPLE_FIELD_CSV_ADDRESS_OTHER_COUNTRY, NOMAP,
- "Other Address Country"},
- {E_CARD_SIMPLE_FIELD_CSV_EMAIL_2, E_CARD_SIMPLE_FIELD_EMAIL_2, ""},
- {E_CARD_SIMPLE_FIELD_CSV_EMAIL_3, E_CARD_SIMPLE_FIELD_EMAIL_3, ""},
- {E_CARD_SIMPLE_FIELD_CSV_URL, E_CARD_SIMPLE_FIELD_URL, ""},
- {E_CARD_SIMPLE_FIELD_CSV_ORG_UNIT, E_CARD_SIMPLE_FIELD_ORG_UNIT, ""},
- {E_CARD_SIMPLE_FIELD_CSV_OFFICE, E_CARD_SIMPLE_FIELD_OFFICE, ""},
- {E_CARD_SIMPLE_FIELD_CSV_TITLE, E_CARD_SIMPLE_FIELD_TITLE, ""},
- {E_CARD_SIMPLE_FIELD_CSV_ROLE, E_CARD_SIMPLE_FIELD_ROLE, ""},
- {E_CARD_SIMPLE_FIELD_CSV_MANAGER, E_CARD_SIMPLE_FIELD_MANAGER, ""},
- {E_CARD_SIMPLE_FIELD_CSV_ASSISTANT, E_CARD_SIMPLE_FIELD_ASSISTANT, ""},
- {E_CARD_SIMPLE_FIELD_CSV_NICKNAME, E_CARD_SIMPLE_FIELD_NICKNAME, ""},
- {E_CARD_SIMPLE_FIELD_CSV_SPOUSE, E_CARD_SIMPLE_FIELD_SPOUSE, ""},
- {E_CARD_SIMPLE_FIELD_CSV_NOTE, E_CARD_SIMPLE_FIELD_NOTE, ""},
- {E_CARD_SIMPLE_FIELD_CSV_CALURI, E_CARD_SIMPLE_FIELD_CALURI, ""},
- {E_CARD_SIMPLE_FIELD_CSV_FBURL, E_CARD_SIMPLE_FIELD_FBURL, ""},
- /*E_CARD_SIMPLE_FIELD_ANNIVERSARY, */
- {E_CARD_SIMPLE_FIELD_CSV_ANNIVERSARY_YEAR, NOMAP, "Anniversary Year"},
- {E_CARD_SIMPLE_FIELD_CSV_ANNIVERSARY_MONTH, NOMAP, "Anniversary Month"},
- {E_CARD_SIMPLE_FIELD_CSV_ANNIVERSARY_DAY, NOMAP, "Anniversary Day"},
- /*E_CARD_SIMPLE_FIELD_BIRTH_DATE, */
- {E_CARD_SIMPLE_FIELD_CSV_BIRTH_DATE_YEAR, NOMAP, "Birth Year"},
- {E_CARD_SIMPLE_FIELD_CSV_BIRTH_DATE_MONTH, NOMAP, "Birth Month"},
- {E_CARD_SIMPLE_FIELD_CSV_BIRTH_DATE_DAY, NOMAP, "Birth Day"},
- {E_CARD_SIMPLE_FIELD_CSV_MAILER, E_CARD_SIMPLE_FIELD_MAILER, ""},
- {E_CARD_SIMPLE_FIELD_CSV_NAME_OR_ORG, E_CARD_SIMPLE_FIELD_NAME_OR_ORG, ""},
- {E_CARD_SIMPLE_FIELD_CSV_CATEGORIES, E_CARD_SIMPLE_FIELD_CATEGORIES, ""},
- {E_CARD_SIMPLE_FIELD_CSV_FAMILY_NAME, E_CARD_SIMPLE_FIELD_FAMILY_NAME, ""},
- {E_CARD_SIMPLE_FIELD_CSV_GIVEN_NAME, E_CARD_SIMPLE_FIELD_GIVEN_NAME, ""},
- {E_CARD_SIMPLE_FIELD_CSV_ADDITIONAL_NAME,
- E_CARD_SIMPLE_FIELD_ADDITIONAL_NAME, ""},
- {E_CARD_SIMPLE_FIELD_CSV_NAME_SUFFIX, E_CARD_SIMPLE_FIELD_NAME_SUFFIX, ""},
- {E_CARD_SIMPLE_FIELD_CSV_WANTS_HTML, E_CARD_SIMPLE_FIELD_WANTS_HTML, ""},
- {E_CARD_SIMPLE_FIELD_CSV_IS_LIST, E_CARD_SIMPLE_FIELD_IS_LIST, ""},
- {E_CARD_SIMPLE_FIELD_CSV_LAST, NOMAP, ""}
-
-};
-
-static GSList *pre_defined_fields;
-
-/*function prototypes*/
-gint e_card_simple_csv_get_simple_field (ECardSimpleFieldCSV csv_field);
-gchar *e_card_simple_csv_get_name (ECardSimpleFieldCSV csv_field);
-gchar *e_card_simple_csv_get (ECardSimple * simple, ECardSimpleFieldCSV csv_field);
-gchar *e_card_simple_csv_get_header_line (GSList * csv_all_fields);
-gchar *e_card_simple_to_csv (ECardSimple * simple, GSList * csv_all_fields);
-gchar *e_card_get_csv (ECard * card, GSList * csv_all_fields);
-gchar *delivery_address_get_sub_field (const ECardDeliveryAddress * delivery_address, DeliveryAddressField sub_field);
-gchar *check_null_pointer (gchar * orig);
-gchar *quote_string (gchar * orig);
-int output_n_cards_file (FILE * outputfile, ECardCursor * cursor, int size, int begin_no, CARD_FORMAT format);
-static void fork_to_background (void);
-static void action_list_cards_get_cursor_cb (EBook * book, EBookStatus status, ECardCursor * cursor, ActionContext * p_actctx);
-static void action_list_cards_open_cb (EBook * book, EBookStatus status, ActionContext * p_actctx);
-static guint action_list_cards_run (ActionContext * p_actctx);
-void set_pre_defined_field (GSList ** pre_defined_fields);
-guint action_list_cards_init (ActionContext * p_actctx);
-
-
-/* function declarations*/
-gint
-e_card_simple_csv_get_simple_field (ECardSimpleFieldCSV csv_field)
-{
- return csv_field_data[csv_field].simple_field;
-}
-
-gchar *
-e_card_simple_csv_get_name (ECardSimpleFieldCSV csv_field)
-{
- gint simple_field;
- gchar *name;
- gchar *esc_name;
- gchar *quoted_name;
-
- ECardSimple *a_simple_card;
-
- simple_field = e_card_simple_csv_get_simple_field (csv_field);
-
- if (simple_field != NOMAP) {
- a_simple_card = E_CARD_SIMPLE (g_object_new (E_TYPE_CARD_SIMPLE, NULL));
- name = g_strdup (e_card_simple_get_ecard_field (a_simple_card, simple_field));
- g_object_unref (G_OBJECT (a_simple_card));
- } else {
- name = g_strdup (csv_field_data[csv_field].csv_name);
- }
- esc_name = g_strescape (name, NULL);
- g_free (name);
- quoted_name = quote_string (esc_name);
- g_free (esc_name);
- return quoted_name;
-}
-
-
-gchar *
-e_card_simple_csv_get (ECardSimple * simple, ECardSimpleFieldCSV csv_field)
-{
- gint simple_field;
- gchar *field_value;
- gchar *esc_field_value;
- gchar *quoted_field_value;
-
- const ECardDeliveryAddress *delivery_address = NULL;
-
- simple_field = e_card_simple_csv_get_simple_field (csv_field);
-
- if (simple_field != NOMAP) {
- field_value = e_card_simple_get (simple, simple_field);
- } else {
-
- switch (csv_field) {
- case E_CARD_SIMPLE_FIELD_CSV_ADDRESS_HOME_STREET:
- delivery_address = e_card_simple_get_delivery_address (simple, E_CARD_SIMPLE_ADDRESS_ID_HOME);
- field_value = delivery_address_get_sub_field (delivery_address, DELIVERY_ADDRESS_STREET);
- break;
- case E_CARD_SIMPLE_FIELD_CSV_ADDRESS_HOME_EXT:
- delivery_address = e_card_simple_get_delivery_address (simple, E_CARD_SIMPLE_ADDRESS_ID_HOME);
- field_value = delivery_address_get_sub_field (delivery_address, DELIVERY_ADDRESS_EXT);
- break;
- case E_CARD_SIMPLE_FIELD_CSV_ADDRESS_HOME_CITY:
- delivery_address = e_card_simple_get_delivery_address (simple, E_CARD_SIMPLE_ADDRESS_ID_HOME);
- field_value = delivery_address_get_sub_field (delivery_address, DELIVERY_ADDRESS_CITY);
- break;
- case E_CARD_SIMPLE_FIELD_CSV_ADDRESS_HOME_REGION:
- delivery_address = e_card_simple_get_delivery_address (simple, E_CARD_SIMPLE_ADDRESS_ID_HOME);
- field_value = delivery_address_get_sub_field (delivery_address, DELIVERY_ADDRESS_REGION);
- break;
- case E_CARD_SIMPLE_FIELD_CSV_ADDRESS_HOME_POSTCODE:
- delivery_address = e_card_simple_get_delivery_address (simple, E_CARD_SIMPLE_ADDRESS_ID_HOME);
- field_value = delivery_address_get_sub_field (delivery_address, DELIVERY_ADDRESS_CODE);
- break;
- case E_CARD_SIMPLE_FIELD_CSV_ADDRESS_HOME_COUNTRY:
- delivery_address = e_card_simple_get_delivery_address (simple, E_CARD_SIMPLE_ADDRESS_ID_HOME);
- field_value = delivery_address_get_sub_field (delivery_address, DELIVERY_ADDRESS_COUNTRY);
- break;
- case E_CARD_SIMPLE_FIELD_CSV_ADDRESS_BUSINESS_STREET:
- delivery_address = e_card_simple_get_delivery_address (simple, E_CARD_SIMPLE_ADDRESS_ID_BUSINESS);
- field_value = delivery_address_get_sub_field (delivery_address, DELIVERY_ADDRESS_STREET);
- break;
- case E_CARD_SIMPLE_FIELD_CSV_ADDRESS_BUSINESS_EXT:
- delivery_address = e_card_simple_get_delivery_address (simple, E_CARD_SIMPLE_ADDRESS_ID_BUSINESS);
- field_value = delivery_address_get_sub_field (delivery_address, DELIVERY_ADDRESS_EXT);
- break;
- case E_CARD_SIMPLE_FIELD_CSV_ADDRESS_BUSINESS_CITY:
- delivery_address = e_card_simple_get_delivery_address (simple, E_CARD_SIMPLE_ADDRESS_ID_BUSINESS);
- field_value = delivery_address_get_sub_field (delivery_address, DELIVERY_ADDRESS_CITY);
- break;
- case E_CARD_SIMPLE_FIELD_CSV_ADDRESS_BUSINESS_REGION:
- delivery_address = e_card_simple_get_delivery_address (simple, E_CARD_SIMPLE_ADDRESS_ID_BUSINESS);
- field_value = delivery_address_get_sub_field (delivery_address, DELIVERY_ADDRESS_REGION);
- break;
- case E_CARD_SIMPLE_FIELD_CSV_ADDRESS_BUSINESS_POSTCODE:
- delivery_address = e_card_simple_get_delivery_address (simple, E_CARD_SIMPLE_ADDRESS_ID_BUSINESS);
- field_value = delivery_address_get_sub_field (delivery_address, DELIVERY_ADDRESS_CODE);
- break;
- case E_CARD_SIMPLE_FIELD_CSV_ADDRESS_BUSINESS_COUNTRY:
- delivery_address = e_card_simple_get_delivery_address (simple, E_CARD_SIMPLE_ADDRESS_ID_BUSINESS);
- field_value = delivery_address_get_sub_field (delivery_address, DELIVERY_ADDRESS_COUNTRY);
- break;
- case E_CARD_SIMPLE_FIELD_CSV_BIRTH_DATE_YEAR:
- if (simple->card->bday != NULL) {
- field_value = g_strdup_printf ("%04d", simple->card->bday->year);
- } else {
- field_value = g_strdup ("");
- }
- break;
-
- case E_CARD_SIMPLE_FIELD_CSV_BIRTH_DATE_MONTH:
- if (simple->card->bday != NULL) {
- field_value = g_strdup_printf ("%02d", simple->card->bday->month);
- } else {
- field_value = g_strdup ("");
- }
- break;
-
- case E_CARD_SIMPLE_FIELD_CSV_BIRTH_DATE_DAY:
- if (simple->card->bday != NULL) {
- field_value = g_strdup_printf ("%02d", simple->card->bday->day);
- } else {
- field_value = g_strdup ("");
- }
- break;
-
- default:
- field_value = g_strdup ("");
- }
- }
-
- /*checking to avoid the NULL pointer */
- if (field_value == NULL)
- field_value = g_strdup ("");
-
- esc_field_value = g_strescape (field_value, NULL);
- g_free (field_value);
-
- quoted_field_value = quote_string (esc_field_value);
- g_free (esc_field_value);
-
- return quoted_field_value;
-}
-
-
-gchar *
-e_card_simple_csv_get_header_line (GSList * csv_all_fields)
-{
-
- guint field_number;
- gint csv_field;
- gchar **field_name_array;
- gchar *header_line;
-
- gint loop_counter;
-
- field_number = g_slist_length (csv_all_fields);
- field_name_array = g_new0 (gchar *, field_number + 1);
-
- for (loop_counter = 0; loop_counter < field_number; loop_counter++) {
- csv_field = GPOINTER_TO_INT (g_slist_nth_data (csv_all_fields, loop_counter));
- *(field_name_array + loop_counter) = e_card_simple_csv_get_name (csv_field);
- }
-
- header_line = g_strjoinv (COMMA_SEPARATOR, field_name_array);
-
- for (loop_counter = 0; loop_counter < field_number; loop_counter++) {
- g_free (*(field_name_array + loop_counter));
- }
- g_free (field_name_array);
-
- return header_line;
-
-}
-
-
-gchar *
-e_card_simple_to_csv (ECardSimple * simple, GSList * csv_all_fields)
-{
- guint field_number;
- gint csv_field;
- gchar **field_value_array;
- gchar *aline;
-
- gint loop_counter;
-
- field_number = g_slist_length (csv_all_fields);
- field_value_array = g_new0 (gchar *, field_number + 1);
-
- for (loop_counter = 0; loop_counter < field_number; loop_counter++) {
- csv_field = GPOINTER_TO_INT (g_slist_nth_data (csv_all_fields, loop_counter));
- *(field_value_array + loop_counter) = e_card_simple_csv_get (simple, csv_field);
- }
-
- aline = g_strjoinv (COMMA_SEPARATOR, field_value_array);
-
- for (loop_counter = 0; loop_counter < field_number; loop_counter++) {
- g_free (*(field_value_array + loop_counter));
- }
- g_free (field_value_array);
-
- return aline;
-
-}
-
-
-gchar *
-e_card_get_csv (ECard * card, GSList * csv_all_fields)
-{
- ECardSimple *simple_card;
- gchar *aline;
-
- simple_card = e_card_simple_new (card);
- aline = e_card_simple_to_csv (simple_card, csv_all_fields);
- g_object_unref (G_OBJECT (simple_card));
- return aline;
-}
-
-
-gchar *
-check_null_pointer (gchar * orig)
-{
- gchar *result;
- if (orig == NULL)
- result = g_strdup ("");
- else
- result = g_strdup (orig);
- return result;
-}
-
-gchar *delivery_address_get_sub_field (const ECardDeliveryAddress * address, DeliveryAddressField sub_field)
-{
- gchar *sub_field_value;
- gchar *str_temp, *str_temp_a;
- if (address != NULL) {
- switch (sub_field) {
- case DELIVERY_ADDRESS_STREET:
- str_temp_a = check_null_pointer (address->po);
- str_temp = check_null_pointer (address->street);
- sub_field_value = g_strdup_printf ("%s %s", str_temp_a, str_temp);
- g_free (str_temp);
- g_free (str_temp_a);
- break;
- case DELIVERY_ADDRESS_EXT:
- sub_field_value = check_null_pointer (address->ext);
- break;
- case DELIVERY_ADDRESS_CITY:
- sub_field_value = check_null_pointer (address->city);
- break;
- case DELIVERY_ADDRESS_REGION:
- sub_field_value = check_null_pointer (address->region);
- break;
- case DELIVERY_ADDRESS_CODE:
- sub_field_value = check_null_pointer (address->code);
- break;
- case DELIVERY_ADDRESS_COUNTRY:
- sub_field_value = check_null_pointer (address->country);
- break;
- default:
- sub_field_value = g_strdup ("");
- }
- } else {
- sub_field_value = g_strdup ("");
- }
- return sub_field_value;
-}
-
-gchar *
-quote_string (gchar *orig)
-{
- if (orig == NULL)
- return g_strdup ("\"\"");
- return g_strdup_printf("\"%s\"", orig);
-}
-
-int
-output_n_cards_file (FILE * outputfile, ECardCursor * cursor, int size, int begin_no, CARD_FORMAT format)
-{
- int i;
- if (format == CARD_FORMAT_VCARD) {
- for (i = begin_no; i < size + begin_no; i++) {
- ECard *card = e_card_cursor_get_nth (cursor, i);
- gchar *vcard = e_card_get_vcard_assume_utf8 (card);
- fprintf (outputfile, "%s\n", vcard);
- g_free (vcard);
- g_object_unref (G_OBJECT (card));
- }
- } else if (format == CARD_FORMAT_CSV) {
- gchar *csv_fields_name = e_card_simple_csv_get_header_line (pre_defined_fields);
- fprintf (outputfile, "%s\n", csv_fields_name);
- g_free (csv_fields_name);
-
- for (i = begin_no; i < size + begin_no; i++) {
- ECard *card = e_card_cursor_get_nth (cursor, i);
- gchar *csv = e_card_get_csv (card, pre_defined_fields);
- fprintf (outputfile, "%s\n", csv);
- g_free (csv);
- g_object_unref (G_OBJECT (card));
-
- }
- }
-
- return SUCCESS;
-
-}
-
-static void
-fork_to_background (void)
-{
- pid_t pid;
- pid = fork ();
- if (pid == -1) {
- /* ouch, fork() failed */
- perror ("fork");
- exit (-1);
- } else if (pid == 0) {
- /* child */
- /*contunue */
-
- } else {
- /* parent exit, note the use of _exit() instead of exit() */
- _exit (-1);
- }
-}
-
-
-
-
-static void
-action_list_cards_get_cursor_cb (EBook * book, EBookStatus status, ECardCursor * cursor, ActionContext * p_actctx)
-{
- FILE *outputfile;
- long length;
- int IsFirstOne;
- int series_no;
- gchar *file_series_name;
- CARD_FORMAT format;
- int size;
-
- length = e_card_cursor_get_length (cursor);
-
- if (length <= 0) {
- g_warning ("Couldn't load addressbook correctly!!!! %s####", p_actctx->action_list_cards.addressbook_folder_uri);
- exit (-1);
- }
-
-
- if (p_actctx->action_list_cards.async_mode == FALSE) { /* normal mode */
-
- if (p_actctx->action_list_cards.output_file == NULL) {
- outputfile = stdout;
- } else {
- /* fopen output file */
- if (!(outputfile = fopen (p_actctx->action_list_cards.output_file, "w"))) {
- g_warning (_("Can not open file"));
- exit (-1);
- }
- }
-
- if (p_actctx->action_list_cards.IsVCard == TRUE)
- format = CARD_FORMAT_VCARD;
- else
- format = CARD_FORMAT_CSV;
-
- output_n_cards_file (outputfile, cursor, length, 0, format);
-
-
-
- if (p_actctx->action_list_cards.output_file != NULL) {
- fclose (outputfile);
- }
- }
-
-
- /*async mode */
- else {
-
- size = p_actctx->action_list_cards.file_size;
- IsFirstOne = TRUE;
- series_no = 0;
-
- do {
- /* whether it is the last file */
- if ((series_no + 1) * size >= length) { /*last one */
- file_series_name = g_strdup_printf ("%s.end", p_actctx->action_list_cards.output_file);
-
- } else { /*next one */
- file_series_name =
- g_strdup_printf ("%s.%04d", p_actctx->action_list_cards.output_file, series_no);
- }
-
- if (!(outputfile = fopen (file_series_name, "w"))) {
- g_warning (_("Can not open file"));
- exit (-1);
- }
-
-
- if (p_actctx->action_list_cards.IsVCard == TRUE)
- format = CARD_FORMAT_VCARD;
- else
- format = CARD_FORMAT_CSV;
- output_n_cards_file (outputfile, cursor, size, series_no * size, format);
-
- fclose (outputfile);
-
- series_no++;
-
- if (IsFirstOne == TRUE) {
- fork_to_background ();
- IsFirstOne = FALSE;
- }
-
-
- }
- while (series_no * size < length);
- g_free (file_series_name);
- }
-
- bonobo_main_quit ();
-}
-
-
-
-
-static void
-action_list_cards_open_cb (EBook * book, EBookStatus status, ActionContext * p_actctx)
-{
- if (status != E_BOOK_STATUS_SUCCESS) {
- g_warning ("Couldn't load addressbook %s", p_actctx->action_list_cards.addressbook_folder_uri);
- exit (-1);
- }
- e_book_get_cursor (book, "(contains \"full_name\" \"\")", (EBookCursorCallback)action_list_cards_get_cursor_cb, p_actctx);
-}
-
-
-static guint
-action_list_cards_run (ActionContext * p_actctx)
-{
- EBook *book;
- book = e_book_new ();
-
- if (p_actctx->action_list_cards.addressbook_folder_uri != NULL) {
- e_book_load_uri (book, p_actctx->action_list_cards.addressbook_folder_uri,
- (EBookCallback)action_list_cards_open_cb, p_actctx);
- } else {
- e_book_load_default_book (book, (EBookCallback)action_list_cards_open_cb, p_actctx);
- }
- return SUCCESS;
-}
-
-
-void
-set_pre_defined_field (GSList ** pre_defined_fields)
-{
- *pre_defined_fields = NULL;
- *pre_defined_fields = g_slist_append (*pre_defined_fields, GINT_TO_POINTER (E_CARD_SIMPLE_FIELD_CSV_GIVEN_NAME));
- *pre_defined_fields = g_slist_append (*pre_defined_fields, GINT_TO_POINTER (E_CARD_SIMPLE_FIELD_CSV_FAMILY_NAME));
- *pre_defined_fields = g_slist_append (*pre_defined_fields, GINT_TO_POINTER (E_CARD_SIMPLE_FIELD_CSV_FULL_NAME));
- *pre_defined_fields = g_slist_append (*pre_defined_fields, GINT_TO_POINTER (E_CARD_SIMPLE_FIELD_CSV_NICKNAME));
- *pre_defined_fields = g_slist_append (*pre_defined_fields, GINT_TO_POINTER (E_CARD_SIMPLE_FIELD_CSV_EMAIL));
- *pre_defined_fields = g_slist_append (*pre_defined_fields, GINT_TO_POINTER (E_CARD_SIMPLE_FIELD_CSV_EMAIL_2));
- *pre_defined_fields = g_slist_append (*pre_defined_fields, GINT_TO_POINTER (E_CARD_SIMPLE_FIELD_CSV_WANTS_HTML));
- *pre_defined_fields = g_slist_append (*pre_defined_fields, GINT_TO_POINTER (E_CARD_SIMPLE_FIELD_CSV_PHONE_BUSINESS));
- *pre_defined_fields = g_slist_append (*pre_defined_fields, GINT_TO_POINTER (E_CARD_SIMPLE_FIELD_CSV_PHONE_HOME));
- *pre_defined_fields = g_slist_append (*pre_defined_fields, GINT_TO_POINTER (E_CARD_SIMPLE_FIELD_CSV_PHONE_BUSINESS_FAX));
- *pre_defined_fields = g_slist_append (*pre_defined_fields, GINT_TO_POINTER (E_CARD_SIMPLE_FIELD_CSV_PHONE_PAGER));
- *pre_defined_fields = g_slist_append (*pre_defined_fields, GINT_TO_POINTER (E_CARD_SIMPLE_FIELD_CSV_PHONE_MOBILE));
- *pre_defined_fields = g_slist_append (*pre_defined_fields, GINT_TO_POINTER (E_CARD_SIMPLE_FIELD_CSV_ADDRESS_HOME_STREET));
- *pre_defined_fields = g_slist_append (*pre_defined_fields, GINT_TO_POINTER (E_CARD_SIMPLE_FIELD_CSV_ADDRESS_HOME_EXT));
- *pre_defined_fields = g_slist_append (*pre_defined_fields, GINT_TO_POINTER (E_CARD_SIMPLE_FIELD_CSV_ADDRESS_HOME_CITY));
- *pre_defined_fields = g_slist_append (*pre_defined_fields, GINT_TO_POINTER (E_CARD_SIMPLE_FIELD_CSV_ADDRESS_HOME_REGION));
- *pre_defined_fields =
- g_slist_append (*pre_defined_fields, GINT_TO_POINTER (E_CARD_SIMPLE_FIELD_CSV_ADDRESS_HOME_POSTCODE));
- *pre_defined_fields =
- g_slist_append (*pre_defined_fields, GINT_TO_POINTER (E_CARD_SIMPLE_FIELD_CSV_ADDRESS_HOME_COUNTRY));
- *pre_defined_fields =
- g_slist_append (*pre_defined_fields, GINT_TO_POINTER (E_CARD_SIMPLE_FIELD_CSV_ADDRESS_BUSINESS_STREET));
- *pre_defined_fields =
- g_slist_append (*pre_defined_fields, GINT_TO_POINTER (E_CARD_SIMPLE_FIELD_CSV_ADDRESS_BUSINESS_EXT));
- *pre_defined_fields =
- g_slist_append (*pre_defined_fields, GINT_TO_POINTER (E_CARD_SIMPLE_FIELD_CSV_ADDRESS_BUSINESS_CITY));
- *pre_defined_fields =
- g_slist_append (*pre_defined_fields, GINT_TO_POINTER (E_CARD_SIMPLE_FIELD_CSV_ADDRESS_BUSINESS_REGION));
- *pre_defined_fields =
- g_slist_append (*pre_defined_fields, GINT_TO_POINTER (E_CARD_SIMPLE_FIELD_CSV_ADDRESS_BUSINESS_POSTCODE));
- *pre_defined_fields =
- g_slist_append (*pre_defined_fields, GINT_TO_POINTER (E_CARD_SIMPLE_FIELD_CSV_ADDRESS_BUSINESS_COUNTRY));
- *pre_defined_fields = g_slist_append (*pre_defined_fields, GINT_TO_POINTER (E_CARD_SIMPLE_FIELD_CSV_TITLE));
- *pre_defined_fields = g_slist_append (*pre_defined_fields, GINT_TO_POINTER (E_CARD_SIMPLE_FIELD_CSV_OFFICE));
- *pre_defined_fields = g_slist_append (*pre_defined_fields, GINT_TO_POINTER (E_CARD_SIMPLE_FIELD_CSV_ORG));
- *pre_defined_fields = g_slist_append (*pre_defined_fields, GINT_TO_POINTER (E_CARD_SIMPLE_FIELD_CSV_URL));
- *pre_defined_fields = g_slist_append (*pre_defined_fields, GINT_TO_POINTER (E_CARD_SIMPLE_FIELD_CSV_CALURI));
- *pre_defined_fields = g_slist_append (*pre_defined_fields, GINT_TO_POINTER (E_CARD_SIMPLE_FIELD_CSV_BIRTH_DATE_YEAR));
- *pre_defined_fields = g_slist_append (*pre_defined_fields, GINT_TO_POINTER (E_CARD_SIMPLE_FIELD_CSV_BIRTH_DATE_MONTH));
- *pre_defined_fields = g_slist_append (*pre_defined_fields, GINT_TO_POINTER (E_CARD_SIMPLE_FIELD_CSV_BIRTH_DATE_DAY));
- *pre_defined_fields = g_slist_append (*pre_defined_fields, GINT_TO_POINTER (E_CARD_SIMPLE_FIELD_CSV_NOTE));
-}
-
-guint
-action_list_cards_init (ActionContext * p_actctx)
-{
- g_idle_add ((GSourceFunc) action_list_cards_run, p_actctx);
- set_pre_defined_field (&pre_defined_fields);
-
- return SUCCESS;
-}
diff --git a/addressbook/tools/evolution-addressbook-export-list-folders.c b/addressbook/tools/evolution-addressbook-export-list-folders.c
deleted file mode 100644
index 8922422a8f..0000000000
--- a/addressbook/tools/evolution-addressbook-export-list-folders.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* evolution-addressbook-export-list-folders.c
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Gilbert Fang <gilbert.fang@sun.com>
- *
- */
-
-#include <config.h>
-
-#include <glib.h>
-#include <bonobo-activation/bonobo-activation.h>
-#include <libbonobo.h>
-#include <libgnome/libgnome.h>
-
-#include <ebook/e-book.h>
-#include <ebook/e-book-util.h>
-
-#include "evolution-addressbook-export.h"
-
-static void
-action_list_folders_get_cursor_cb (EBook * book, EBookStatus status, ECardCursor * cursor, ActionContext * p_actctx)
-{
- FILE *outputfile;
- long length;
- const char *uri;
- char *name;
-
- uri = e_book_get_default_book_uri ();
- length = e_card_cursor_get_length (cursor);
-
- /*Fix me *
- can not get name, should be a bug of e-book.Anyway, should set a default name.
- */
- /*name = e_book_get_name (book); */
- name = g_strdup (_("Contacts"));
-
- if (p_actctx->action_list_folders.output_file == NULL) {
- printf ("\"%s\",\"%s\",%d\n", uri, name, (int) length);
- } else {
- /*output to a file */
- if (!(outputfile = fopen (p_actctx->action_list_folders.output_file, "w"))) {
- g_warning (_("Can not open file"));
- exit (-1);
- }
- fprintf (outputfile, "\"%s\",\"%s\",%d\n", uri, name, (int) length);
- fclose (outputfile);
- }
-
- g_free (name);
- g_object_unref (G_OBJECT (book));
- bonobo_main_quit ();
-}
-
-static void
-action_list_folders_open_cb (EBook * book, EBookStatus status, ActionContext * p_actctx)
-{
- if (E_BOOK_STATUS_SUCCESS == status) {
- e_book_get_cursor (book, "(contains \"full_name\" \"\")",
- (EBookCursorCallback)action_list_folders_get_cursor_cb, p_actctx);
- } else {
- g_object_unref (G_OBJECT (book));
- g_warning (_("Can not load URI"));
- exit (-1);
- }
-}
-
-static guint
-action_list_folders_run (ActionContext * p_actctx)
-{
- EBook *book;
- book = e_book_new ();
-
- e_book_load_default_book (book, (EBookCallback)action_list_folders_open_cb, p_actctx);
- return SUCCESS;
-}
-
-guint
-action_list_folders_init (ActionContext * p_actctx)
-{
- g_idle_add ((GSourceFunc) action_list_folders_run, p_actctx);
-
- return SUCCESS;
-}
diff --git a/addressbook/tools/evolution-addressbook-export.c b/addressbook/tools/evolution-addressbook-export.c
deleted file mode 100644
index a61880ed14..0000000000
--- a/addressbook/tools/evolution-addressbook-export.c
+++ /dev/null
@@ -1,162 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* evolution-addressbook-export.c
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Gilbert Fang <gilbert.fang@sun.com>
- *
- */
-
-#include <config.h>
-
-#include <glib.h>
-#include <bonobo-activation/bonobo-activation.h>
-#include <bonobo/bonobo-main.h>
-#include <gnome.h>
-
-#include <ebook/e-book.h>
-
-#include "evolution-addressbook-export.h"
-
-int
-main (int argc, char **argv)
-{
- ActionContext actctx;
- GnomeProgram *program;
- poptContext context;
- const gchar **argvn;
-
- int current_action = ACTION_NOTHING;
- int IsCSV = FALSE;
- int IsVCard = FALSE;
-
- /*** popttable */
- char *output_file = NULL;
- int list_folders_mode = FALSE;
- char *output_format = NULL;
- char *addressbook_folder_uri = NULL;
- int async_mode = FALSE;
- int file_size = 0;
-
- struct poptOption options[] = {
- {"output", '\0', POPT_ARG_STRING, &output_file, 0, N_("Specify the output file instead of standard output"),
- N_("OUTPUTFILE")},
- {"list-addressbook-folders", 'l', POPT_ARG_NONE, &list_folders_mode, 0, N_("List local addressbook folders"),
- NULL},
- {"format", '\0', POPT_ARG_STRING, &output_format, 0, N_("Show cards as vcard or csv file"), N_("[vcard|csv]")},
- {"async", 'a', POPT_ARG_NONE, &async_mode, 0, N_("Export in asynchronous mode "), NULL},
- {"size", '\0', POPT_ARG_INT, &file_size, 0,
- N_("The number of cards in one output file in asychronous mode,default size 100."), N_("NUMBER")},
- {NULL, '\0', 0, NULL, 0, NULL, NULL}
- };
- /* popttable end ** */
-
- /*i18n-lize */
- bindtextdomain (GETTEXT_PACKAGE, EVOLUTION_LOCALEDIR);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- textdomain (GETTEXT_PACKAGE);
-
- program =
- gnome_program_init (PACKAGE, VERSION, GNOME_BONOBO_MODULE, argc, argv, GNOME_PARAM_POPT_TABLE, options,
- GNOME_PARAM_NONE);
-
- /* Parsing Parameter */
- g_object_get (program, "popt-context", &context, NULL);
- argvn = poptGetArgs (context);
- if (!argvn) {
- addressbook_folder_uri = NULL;
- } else { /* there at lease is a one argument, and that should be addressbook folder uri */
- addressbook_folder_uri = g_strdup (*argvn);
- }
- poptFreeContext (context);
-
- if (list_folders_mode != FALSE) {
- current_action = ACTION_LIST_FOLDERS;
- /* check there should not be addressbook-folder-uri , and async and size , output_format */
- if (addressbook_folder_uri != NULL || async_mode != FALSE || output_format != NULL || file_size != 0) {
- g_warning (_("Command line arguments error, please use --help option to see the usage."));
- exit (-1);
- }
- } else {
-
- current_action = ACTION_LIST_CARDS;
-
- /* check the output format */
- if (output_format == NULL) {
- IsVCard = TRUE;
- } else {
- IsCSV = !strcmp (output_format, "csv");
- IsVCard = !strcmp (output_format, "vcard");
- if (IsCSV == FALSE && IsVCard == FALSE) {
- g_warning (_("Only support csv or vcard format."));
- exit (-1);
- }
- }
-
- /*check async and output file */
- if (async_mode == TRUE) {
- /* check have to output file , set default file_size */
- if (output_file == NULL) {
- g_warning (_("In async mode, output must be file."));
- exit (-1);
- }
- if (file_size == 0)
- file_size = DEFAULT_SIZE_NUMBER;
- } else {
- /*check no file_size */
- if (file_size != 0) {
- g_warning (_("In normal mode, there should not need size option."));
- exit (-1);
- }
- }
- }
-
- /* do actions */
- if (current_action == ACTION_LIST_FOLDERS) {
- actctx.action_type = current_action;
- if (output_file == NULL) {
- actctx.action_list_folders.output_file = NULL;
- } else {
- actctx.action_list_folders.output_file = g_strdup (output_file);
- }
- action_list_folders_init (&actctx);
- } else if (current_action == ACTION_LIST_CARDS) {
- actctx.action_type = current_action;
- if (output_file == NULL) {
- actctx.action_list_cards.output_file = NULL;
- } else {
- actctx.action_list_cards.output_file = g_strdup (output_file);
- }
- actctx.action_list_cards.IsCSV = IsCSV;
- actctx.action_list_cards.IsVCard = IsVCard;
- actctx.action_list_cards.addressbook_folder_uri = g_strdup (addressbook_folder_uri);
- actctx.action_list_cards.async_mode = async_mode;
- actctx.action_list_cards.file_size = file_size;
-
- action_list_cards_init (&actctx);
-
- } else {
- g_warning (_("Impossible internal error."));
- exit (-1);
- }
-
- bonobo_main ();
-
- /*FIXME:should free actctx's some char* field, such as output_file! but since the program will end, so that will not cause mem leak. */
-
- return 0;
-}
diff --git a/addressbook/tools/evolution-addressbook-export.h b/addressbook/tools/evolution-addressbook-export.h
deleted file mode 100644
index 13749aed61..0000000000
--- a/addressbook/tools/evolution-addressbook-export.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* evolution-addressbook-export.h
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Gilbert Fang <gilbert.fang@sun.com>
- *
- */
-
-#ifndef _EVOLUTION_ADDRESSBOOK_EXPORT_H_
-#define _EVOLUTION_ADDRESSBOOK_EXPORT_H__
-
-#include <glib.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#define SUCCESS 0
-#define FAILED -1
-
-#define ACTION_NOTHING 0
-#define ACTION_LIST_FOLDERS 1
-#define ACTION_LIST_CARDS 2
-
-#define DEFAULT_SIZE_NUMBER 100
-
-union _ActionContext
-{
-
- guint action_type;
-
- struct
- {
- gint action_type;
- gchar *output_file;
- }
- action_list_folders;
-
- struct
- {
- gint action_type;
- gchar *output_file;
- gint IsCSV;
- gint IsVCard;
- gchar *addressbook_folder_uri;
- gint async_mode;
- gint file_size;
- }
- action_list_cards;
-};
-
-typedef union _ActionContext ActionContext;
-
-
-/* action_list_folders */
-guint action_list_folders_init (ActionContext * p_actctx);
-
-/*action list cards*/
-guint action_list_cards_init (ActionContext * p_actctx);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _EVOLUTION_ADDRESSBOOK_EXPORT_H_ */
diff --git a/addressbook/tools/evolution-addressbook-import.c b/addressbook/tools/evolution-addressbook-import.c
deleted file mode 100644
index 28871efd96..0000000000
--- a/addressbook/tools/evolution-addressbook-import.c
+++ /dev/null
@@ -1,90 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-#include <config.h>
-
-#include <bonobo-activation/bonobo-activation.h>
-#include <bonobo/bonobo-main.h>
-#include <backend/ebook/e-book-async.h>
-#include <gnome.h>
-
-static int exec_ref_count = 0;
-
-static void
-ref_executable (void)
-{
- exec_ref_count ++;
-}
-
-static void
-unref_executable (void)
-{
- exec_ref_count --;
- if (exec_ref_count == 0)
- g_main_loop_quit (0);
-}
-
-static void
-add_cb (EBook *book, EBookStatus status, const char *id, gpointer closure)
-{
- switch (status) {
- case E_BOOK_ERROR_OK:
- unref_executable ();
- break;
- default:
- g_main_loop_quit (NULL);
- break;
- }
-}
-
-static void
-use_addressbook (EBook *book, gpointer closure)
-{
- GList *cards, *list;
- char *filename = closure;
-
- if (book == NULL)
- g_error (_("Error loading default addressbook."));
-
- cards = e_card_load_cards_from_file (filename);
-
- ref_executable ();
-
- for (list = cards; list; list = list->next) {
- ref_executable ();
- e_book_add_card (book, list->data, add_cb, closure);
- }
- sync();
-
- unref_executable ();
-}
-
-int
-main (int argc, char *argv[])
-{
- char *filename = NULL;
-
- struct poptOption options[] = {
- { "input-file", '\0', POPT_ARG_STRING, &filename, 0, N_("Input File"), NULL },
- POPT_AUTOHELP
- { NULL, '\0', 0, NULL, 0, NULL, NULL }
- };
-
- bindtextdomain (GETTEXT_PACKAGE, EVOLUTION_LOCALEDIR);
- textdomain (GETTEXT_PACKAGE);
-
- gnome_program_init ("evolution-addressbook-import", VERSION,
- LIBGNOMEUI_MODULE, argc, argv,
- GNOME_PROGRAM_STANDARD_PROPERTIES,
- GNOME_PARAM_POPT_TABLE, options,
- NULL);
-
- if (filename == NULL) {
- g_error (_("No filename provided."));
- }
-
- e_book_async_get_default_addressbook (use_addressbook, filename);
-
- bonobo_main ();
-
- return 0;
-}
diff --git a/addressbook/util/.cvsignore b/addressbook/util/.cvsignore
deleted file mode 100644
index 6205c6f3ab..0000000000
--- a/addressbook/util/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-Makefile
-Makefile.in
-eab-marshal.c
-eab-marshal.h
diff --git a/addressbook/util/Makefile.am b/addressbook/util/Makefile.am
deleted file mode 100644
index 6cb70de06a..0000000000
--- a/addressbook/util/Makefile.am
+++ /dev/null
@@ -1,36 +0,0 @@
-INCLUDES = \
- -DPREFIX=\"$(prefix)\" \
- -DSYSCONFDIR=\"$(sysconfdir)\" \
- -DDATADIR=\"$(datadir)\" \
- -DLIBDIR=\"$(libdir)\" \
- -DG_LOG_DOMAIN=\"EBook\" \
- -I$(top_srcdir) \
- -I$(top_srcdir)/camel \
- -I$(top_builddir)/shell \
- -I$(top_srcdir)/shell \
- $(EVOLUTION_ADDRESSBOOK_CFLAGS)
-
-noinst_LTLIBRARIES = libeabutil.la
-
-libeabutil_la_SOURCES = \
- eab-marshal.c \
- eab-destination.c \
- eab-destination.h \
- eab-book-util.c \
- eab-book-util.h
-
-libeabutil_la_LIBADD = \
- $(top_builddir)/camel/libcamel.la \
- $(top_builddir)/e-util/libeutil.la
-
-MARSHAL_GENERATED = eab-marshal.c eab-marshal.h
-@EVO_MARSHAL_RULE@
-
-BUILT_SOURCES = $(MARSHAL_GENERATED)
-CLEANFILES = $(BUILT_SOURCES)
-
-EXTRA_DIST = \
- eab-marshal.list
-
-dist-hook:
- cd $(distdir); rm -f $(BUILT_SOURCES)
diff --git a/addressbook/util/eab-book-util.c b/addressbook/util/eab-book-util.c
deleted file mode 100644
index 2c80d6f8a1..0000000000
--- a/addressbook/util/eab-book-util.c
+++ /dev/null
@@ -1,293 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * eab-util.c
- *
- * Copyright (C) 2001-2003 Ximian, Inc.
- *
- * Authors: Jon Trowbridge <trow@ximian.com>
- * Chris Toshok <toshok@ximian.com>
- */
-
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 "eab-book-util.h"
-
-#include <string.h>
-#include <glib.h>
-#include <glib-object.h>
-#include <e-util/e-config-listener.h>
-
-EConfigListener *
-eab_get_config_database ()
-{
- static EConfigListener *config_db;
-
- if (config_db == NULL)
- config_db = e_config_listener_new ();
-
- return config_db;
-}
-
-/*
- *
- * Specialized Queries
- *
- */
-
-guint
-eab_name_and_email_query (EBook *book,
- const gchar *name,
- const gchar *email,
- EBookContactsCallback cb,
- gpointer closure)
-{
- 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)
- name_query = g_strdup_printf ("(or (beginswith \"file_as\" \"%s\") (beginswith \"full_name\" \"%s\"))", name, name);
-
- /* 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;
-
- tag = e_book_async_get_contacts (book, query, cb, closure);
-
- g_free (email_query);
- g_free (name_query);
- g_free (query);
-
- return tag;
-}
-
-/*
- * Simple nickname query
- */
-guint
-eab_nickname_query (EBook *book,
- const char *nickname,
- EBookContactsCallback cb,
- gpointer closure)
-{
- gchar *query;
- guint retval;
-
- g_return_val_if_fail (E_IS_BOOK (book), 0);
- g_return_val_if_fail (nickname != NULL, 0);
-
- /* The empty-string case shouldn't generate a warning. */
- if (! *nickname)
- return 0;
-
- query = g_strdup_printf ("(is \"nickname\" \"%s\")", nickname);
-
- retval = e_book_async_get_contacts (book, query, cb, closure);
-
- g_free (query);
-
- return retval;
-}
-
-GList*
-eab_contact_list_from_string (const char *str)
-{
- GList *contacts = NULL;
- GString *gstr = g_string_new ("");
- char *p = (char*)str;
- char *q;
- char *blank_line;
-
- while (*p) {
- if (*p != '\r') g_string_append_c (gstr, *p);
-
- p++;
- }
-
- p = g_string_free (gstr, FALSE);
- q = p;
- do {
- char *temp;
-
- blank_line = strstr (q, "\n\n");
- if (blank_line) {
- temp = g_strndup (q, blank_line - q);
- }
- else {
- temp = g_strdup (q);
- }
-
- contacts = g_list_append (contacts, e_contact_new_from_vcard (temp));
-
- g_free (temp);
-
- if (blank_line)
- q = blank_line + 2;
- else
- q = NULL;
- } while (blank_line);
-
- g_free (p);
-
- return contacts;
-}
-
-char*
-eab_contact_list_to_string (GList *contacts)
-{
- GString *str = g_string_new ("");
- GList *l;
-
- for (l = contacts; l; l = l->next) {
- EContact *contact = l->data;
- char *vcard_str = e_vcard_to_string (E_VCARD (contact), EVC_FORMAT_VCARD_30);
-
- g_string_append (str, vcard_str);
- if (l->next)
- g_string_append (str, "\r\n");
- }
-
- return g_string_free (str, FALSE);
-}
-
-#if notyet
-/*
- * 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 *contacts, gpointer closure)
-{
- HaveAddressInfo *info = (HaveAddressInfo *) closure;
-
- info->cb (book,
- info->email,
- contacts && (status == E_BOOK_ERROR_OK) ? E_CONTACT (contacts->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
-eab_query_address_default (const gchar *email,
- EABHaveAddressCallback 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_default_book (have_address_book_open_cb, info);
-}
-#endif
-
-/* bad place for this i know. */
-int
-e_utf8_casefold_collate_len (const gchar *str1, const gchar *str2, int len)
-{
- gchar *s1 = g_utf8_casefold(str1, len);
- gchar *s2 = g_utf8_casefold(str2, len);
- int rv;
-
- rv = g_utf8_collate (s1, s2);
-
- g_free (s1);
- g_free (s2);
-
- return rv;
-}
-
-int
-e_utf8_casefold_collate (const gchar *str1, const gchar *str2)
-{
- return e_utf8_casefold_collate_len (str1, str2, -1);
-}
diff --git a/addressbook/util/eab-book-util.h b/addressbook/util/eab-book-util.h
deleted file mode 100644
index 7fda98adf3..0000000000
--- a/addressbook/util/eab-book-util.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * e-book-util.h
- *
- * Copyright (C) 2001-2003 Ximian, Inc.
- *
- * Authors: Jon Trowbridge <trow@ximian.com>
- * Chris Toshok <toshok@ximian.com>
- */
-
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA.
- */
-
-#ifndef __EAB_UTIL_H__
-#define __EAB_UTIL_H__
-
-#include <bonobo/bonobo-object.h>
-#include <bonobo/bonobo-moniker-util.h>
-#include <libebook/e-book-async.h>
-#include "e-util/e-config-listener.h"
-
-G_BEGIN_DECLS
-
-typedef void (*EABHaveAddressCallback) (EBook *book, const gchar *addr, EContact *contact, gpointer closure);
-
-/* config database interface. */
-EConfigListener *eab_get_config_database (void);
-
-/* Specialized Name/Email Queries */
-guint eab_name_and_email_query (EBook *book,
- const char *name,
- const char *email,
- EBookContactsCallback cb,
- gpointer closure);
-guint eab_nickname_query (EBook *book,
- const char *nickname,
- EBookContactsCallback cb,
- gpointer closure);
-
-GList *eab_contact_list_from_string (const char *str);
-char *eab_contact_list_to_string (GList *contacts);
-
-/* Returns the EContact associated to email in the callback,
- or NULL if no match is found in the default address book. */
-void eab_query_address_default (const gchar *email,
- EABHaveAddressCallback cb,
- gpointer closure);
-
-int e_utf8_casefold_collate_len (const gchar *str1, const gchar *str2, int len);
-int e_utf8_casefold_collate (const gchar *str1, const gchar *str2);
-
-G_END_DECLS
-
-#endif /* __EAB_UTIL_H__ */
-
diff --git a/addressbook/util/eab-destination.c b/addressbook/util/eab-destination.c
deleted file mode 100644
index 07557b1455..0000000000
--- a/addressbook/util/eab-destination.c
+++ /dev/null
@@ -1,1569 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * eab-destination.c
- *
- * Copyright (C) 2001-2003 Ximian, Inc.
- *
- * Authors: Jon Trowbridge <trow@ximian.com>
- * Chris Toshok <toshok@ximian.com>
- */
-
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 "eab-destination.h"
-
-#include <stdlib.h>
-#include <ctype.h>
-#include <string.h>
-#include <libebook/e-book.h>
-#include "eab-marshal.h"
-#include "eab-book-util.h"
-#include <gal/widgets/e-unicode.h>
-
-#include <glib.h>
-#include <libxml/xmlmemory.h>
-#include <camel/camel-internet-address.h>
-
-#define d(x)
-
-enum {
- CHANGED,
- CONTACT_LOADED,
- LAST_SIGNAL
-};
-
-guint eab_destination_signals[LAST_SIGNAL] = { 0 };
-
-struct _EABDestinationPrivate {
- gchar *raw;
-
- gchar *book_uri;
- gchar *uid;
- EContact *contact;
- gint email_num;
-
- gchar *name;
- gchar *email;
- gchar *addr;
- gchar *textrep;
-
- GList *list_dests;
-
- guint html_mail_override : 1;
- guint wants_html_mail : 1;
-
- guint show_addresses : 1;
-
- guint contact_loaded : 1;
- guint cannot_load : 1;
- guint auto_recipient : 1;
- guint pending_contact_load;
-
- guint pending_change : 1;
-
- EBook *book;
-
- gint freeze_count;
-};
-
-static void eab_destination_clear_contact (EABDestination *);
-static void eab_destination_clear_strings (EABDestination *);
-
-/* the following prototypes were in e-destination.h, but weren't used
- by anything in evolution... let's make them private for now. */
-static gboolean eab_destination_is_valid (const EABDestination *);
-static void eab_destination_set_contact_uid (EABDestination *, const gchar *uid, gint email_num);
-static void eab_destination_set_book_uri (EABDestination *, const gchar *uri);
-static gboolean eab_destination_from_contact (const EABDestination *);
-static const gchar *eab_destination_get_book_uri (const EABDestination *);
-static const gchar *eab_destination_get_contact_uid (const EABDestination *);
-static xmlNodePtr eab_destination_xml_encode (const EABDestination *dest);
-static gboolean eab_destination_xml_decode (EABDestination *dest, xmlNodePtr node);
-
-static GObjectClass *parent_class;
-
-static void
-eab_destination_dispose (GObject *obj)
-{
- EABDestination *dest = EAB_DESTINATION (obj);
-
- if (dest->priv) {
- eab_destination_clear (dest);
-
- if (dest->priv->book)
- g_object_unref (dest->priv->book);
-
- g_free (dest->priv);
- dest->priv = NULL;
- }
-
- if (G_OBJECT_CLASS (parent_class)->dispose)
- (* G_OBJECT_CLASS (parent_class)->dispose) (obj);
-}
-
-static void
-eab_destination_class_init (EABDestinationClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_ref (G_TYPE_OBJECT);
-
- object_class->dispose = eab_destination_dispose;
-
- eab_destination_signals[CHANGED] =
- g_signal_new ("changed",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EABDestinationClass, changed),
- NULL, NULL,
- eab_marshal_NONE__NONE,
- G_TYPE_NONE, 0);
-
- eab_destination_signals[CONTACT_LOADED] =
- g_signal_new ("contact_loaded",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EABDestinationClass, contact_loaded),
- NULL, NULL,
- eab_marshal_NONE__NONE,
- G_TYPE_NONE, 0);
-}
-
-static void
-eab_destination_init (EABDestination *dest)
-{
- dest->priv = g_new0 (struct _EABDestinationPrivate, 1);
-
- dest->priv->cannot_load = FALSE;
- dest->priv->auto_recipient = FALSE;
- dest->priv->pending_contact_load = 0;
-}
-
-GType
-eab_destination_get_type (void)
-{
- static GType dest_type = 0;
-
- if (!dest_type) {
- GTypeInfo dest_info = {
- sizeof (EABDestinationClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) eab_destination_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EABDestination),
- 0, /* n_preallocs */
- (GInstanceInitFunc) eab_destination_init
- };
-
- dest_type = g_type_register_static (G_TYPE_OBJECT, "EABDestination", &dest_info, 0);
- }
-
- return dest_type;
-}
-
-EABDestination *
-eab_destination_new (void)
-{
- return g_object_new (EAB_TYPE_DESTINATION, NULL);
-}
-
-static void
-eab_destination_freeze (EABDestination *dest)
-{
- g_return_if_fail (EAB_IS_DESTINATION (dest));
- g_return_if_fail (dest->priv->freeze_count >= 0);
-
- dest->priv->freeze_count++;
-}
-
-static void
-eab_destination_thaw (EABDestination *dest)
-{
- g_return_if_fail (EAB_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)
- eab_destination_changed (dest);
-}
-
-void
-eab_destination_changed (EABDestination *dest)
-{
- if (dest->priv->freeze_count == 0) {
- g_signal_emit (dest, eab_destination_signals[CHANGED], 0);
- dest->priv->pending_change = FALSE;
- dest->priv->cannot_load = FALSE;
-
- } else {
- dest->priv->pending_change = TRUE;
- }
-}
-
-EABDestination *
-eab_destination_copy (const EABDestination *dest)
-{
- EABDestination *new_dest;
- GList *iter;
-
- g_return_val_if_fail (dest && EAB_IS_DESTINATION (dest), NULL);
-
- new_dest = eab_destination_new ();
-
- new_dest->priv->book_uri = g_strdup (dest->priv->book_uri);
- new_dest->priv->uid = g_strdup (dest->priv->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->email_num = dest->priv->email_num;
-
- new_dest->priv->contact = dest->priv->contact;
- if (new_dest->priv->contact)
- g_object_ref (new_dest->priv->contact);
-
- 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,
- eab_destination_copy (EAB_DESTINATION (iter->data)));
- }
-
- return new_dest;
-}
-
-static void
-eab_destination_clear_contact (EABDestination *dest)
-{
- g_free (dest->priv->book_uri);
- dest->priv->book_uri = NULL;
- g_free (dest->priv->uid);
- dest->priv->uid = NULL;
-
- dest->priv->contact = NULL;
- dest->priv->email_num = -1;
-
- g_list_foreach (dest->priv->list_dests, (GFunc) g_object_unref, NULL);
- g_list_free (dest->priv->list_dests);
- dest->priv->list_dests = NULL;
-
- dest->priv->cannot_load = FALSE;
-
- eab_destination_cancel_contact_load (dest);
-
- eab_destination_changed (dest);
-}
-
-static void
-eab_destination_clear_strings (EABDestination *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;
-
- eab_destination_changed (dest);
-}
-
-void
-eab_destination_clear (EABDestination *dest)
-{
- g_return_if_fail (dest && EAB_IS_DESTINATION (dest));
-
- eab_destination_freeze (dest);
-
- eab_destination_clear_contact (dest);
- eab_destination_clear_strings (dest);
-
- eab_destination_thaw (dest);
-}
-
-static gboolean
-nonempty (const gchar *s)
-{
- gunichar c;
- while (*s) {
- c = g_utf8_get_char (s);
- if (!g_unichar_isspace (c))
- return TRUE;
- s = g_utf8_next_char (s);
- }
- return FALSE;
-}
-
-gboolean
-eab_destination_is_empty (const EABDestination *dest)
-
-{
- struct _EABDestinationPrivate *p;
-
- g_return_val_if_fail (EAB_IS_DESTINATION (dest), TRUE);
-
- p = dest->priv;
-
- return !(p->contact != NULL
- || (p->book_uri && *p->book_uri)
- || (p->uid && *p->uid)
- || (p->raw && nonempty (p->raw))
- || (p->name && nonempty (p->name))
- || (p->email && nonempty (p->email))
- || (p->addr && nonempty (p->addr))
- || (p->list_dests != NULL));
-}
-
-gboolean
-eab_destination_is_valid (const EABDestination *dest)
-{
- const char *email;
-
- g_return_val_if_fail (EAB_IS_DESTINATION (dest), FALSE);
-
- if (eab_destination_from_contact (dest))
- return TRUE;
-
- email = eab_destination_get_email (dest);
-
- /* FIXME: if we really wanted to get fancy here, we could
- check to make sure that the address was valid according to
- rfc822's addr-spec grammar. */
-
- return email && *email && strchr (email, '@');
-}
-
-gboolean
-eab_destination_equal (const EABDestination *a, const EABDestination *b)
-{
- const struct _EABDestinationPrivate *pa, *pb;
- const char *na, *nb;
-
- g_return_val_if_fail (EAB_IS_DESTINATION (a), FALSE);
- g_return_val_if_fail (EAB_IS_DESTINATION (b), FALSE);
-
- if (a == b)
- return TRUE;
-
- pa = a->priv;
- pb = b->priv;
-
- /* Check equality of contacts. */
- if (pa->contact || pb->contact) {
- if (! (pa->contact && pb->contact))
- return FALSE;
-
- if (pa->contact == pb->contact || !strcmp (e_contact_get_const (pa->contact, E_CONTACT_UID),
- e_contact_get_const (pb->contact, E_CONTACT_UID)))
- return TRUE;
-
- return FALSE;
- }
-
- /* Just in case name returns NULL */
- na = eab_destination_get_name (a);
- nb = eab_destination_get_name (b);
- if ((na || nb) && !(na && nb && ! e_utf8_casefold_collate (na, nb)))
- return FALSE;
-
- if (!g_ascii_strcasecmp (eab_destination_get_email (a), eab_destination_get_email (b)))
- return TRUE;
- else
- return FALSE;
-}
-
-void
-eab_destination_set_contact (EABDestination *dest, EContact *contact, gint email_num)
-{
- g_return_if_fail (dest && EAB_IS_DESTINATION (dest));
- g_return_if_fail (contact && E_IS_CONTACT (contact));
-
- if (dest->priv->contact != contact || dest->priv->email_num != email_num) {
- /* We have to freeze/thaw around these operations so that the 'changed'
- signals don't cause the EABDestination's internal state to be altered
- before we can finish setting ->contact && ->email_num. */
- eab_destination_freeze (dest);
- eab_destination_clear (dest);
-
- dest->priv->contact = contact;
- g_object_ref (dest->priv->contact);
-
- dest->priv->email_num = email_num;
-
- eab_destination_changed (dest);
- eab_destination_thaw (dest);
- }
-}
-
-static void
-eab_destination_set_book_uri (EABDestination *dest, const gchar *uri)
-{
- g_return_if_fail (dest && EAB_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);
-
- eab_destination_changed (dest);
- }
-}
-
-void
-eab_destination_set_contact_uid (EABDestination *dest, const gchar *uid, gint email_num)
-{
- g_return_if_fail (dest && EAB_IS_DESTINATION (dest));
- g_return_if_fail (uid != NULL);
-
- if (dest->priv->uid == NULL
- || strcmp (dest->priv->uid, uid)
- || dest->priv->email_num != email_num) {
-
- g_free (dest->priv->uid);
- dest->priv->uid = g_strdup (uid);
- dest->priv->email_num = email_num;
-
- /* If we already have a contact, remove it unless it's uid matches the one
- we just set. */
- if (dest->priv->contact && strcmp (uid,
- e_contact_get_const (dest->priv->contact, E_CONTACT_UID))) {
- g_object_unref (dest->priv->contact);
- dest->priv->contact = NULL;
- }
-
- eab_destination_changed (dest);
- }
-}
-
-void
-eab_destination_set_name (EABDestination *dest, const gchar *name)
-{
- gboolean changed = FALSE;
-
- g_return_if_fail (EAB_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;
- eab_destination_changed (dest);
- }
-}
-
-void
-eab_destination_set_email (EABDestination *dest, const gchar *email)
-{
- gboolean changed = FALSE;
-
- g_return_if_fail (EAB_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;
- eab_destination_changed (dest);
- }
-}
-
-void
-eab_destination_set_html_mail_pref (EABDestination *dest, gboolean x)
-{
- g_return_if_fail (dest && EAB_IS_DESTINATION (dest));
-
- dest->priv->html_mail_override = TRUE;
- if (dest->priv->wants_html_mail != x) {
- dest->priv->wants_html_mail = x;
- eab_destination_changed (dest);
- }
-}
-
-gboolean
-eab_destination_contains_contact (const EABDestination *dest)
-{
- g_return_val_if_fail (dest && EAB_IS_DESTINATION (dest), FALSE);
- return dest->priv->contact != NULL;
-}
-
-gboolean
-eab_destination_from_contact (const EABDestination *dest)
-{
- g_return_val_if_fail (dest && EAB_IS_DESTINATION (dest), FALSE);
- return dest->priv->contact != NULL || dest->priv->book_uri != NULL || dest->priv->uid != NULL;
-}
-
-gboolean
-eab_destination_is_auto_recipient (const EABDestination *dest)
-{
- g_return_val_if_fail (dest && EAB_IS_DESTINATION (dest), FALSE);
-
- return dest->priv->auto_recipient;
-}
-
-void
-eab_destination_set_auto_recipient (EABDestination *dest, gboolean value)
-{
- g_return_if_fail (dest && EAB_IS_DESTINATION (dest));
-
- dest->priv->auto_recipient = value;
-}
-
-typedef struct _UseContact UseContact;
-struct _UseContact {
- EABDestination *dest;
- EABDestinationContactCallback cb;
- gpointer closure;
-};
-
-static void
-use_contact_cb (EContact *contact, gpointer closure)
-{
- UseContact *uc = (UseContact *) closure;
-
- if (contact != NULL && uc->dest->priv->contact == NULL) {
- uc->dest->priv->contact = contact;
- g_object_ref (uc->dest->priv->contact);
- eab_destination_changed (uc->dest);
- }
-
- if (uc->cb) {
- uc->cb (uc->dest, uc->dest->priv->contact, uc->closure);
- }
-
- /* We held a copy of the destination during the callback. */
- g_object_unref (uc->dest);
- g_free (uc);
-}
-
-void
-eab_destination_use_contact (EABDestination *dest, EABDestinationContactCallback cb, gpointer closure)
-{
- g_return_if_fail (dest && EAB_IS_DESTINATION (dest));
-
- if (dest->priv->contact != NULL) {
- if (cb)
- cb (dest, dest->priv->contact, closure);
- } else if (dest->priv->book_uri != NULL && dest->priv->uid != NULL) {
- UseContact *uc = g_new (UseContact, 1);
-
- uc->dest = dest;
- /* Hold a reference to the destination during the callback. */
- g_object_ref (uc->dest);
- uc->cb = cb;
- uc->closure = closure;
-#if notyet
- e_contact_load_uri (dest->priv->book_uri, dest->priv->uid, use_contact_cb, uc);
-#endif
- } else {
- if (cb)
- cb (dest, NULL, closure);
- }
-}
-
-EContact *
-eab_destination_get_contact (const EABDestination *dest)
-{
- g_return_val_if_fail (dest && EAB_IS_DESTINATION (dest), NULL);
-
- return dest->priv->contact;
-}
-
-const gchar *
-eab_destination_get_contact_uid (const EABDestination *dest)
-{
- g_return_val_if_fail (dest && EAB_IS_DESTINATION (dest), NULL);
-
- if (dest->priv->uid)
- return dest->priv->uid;
-
- if (dest->priv->contact)
- return e_contact_get_const (dest->priv->contact, E_CONTACT_UID);
-
- return NULL;
-}
-
-const gchar *
-eab_destination_get_book_uri (const EABDestination *dest)
-{
- g_return_val_if_fail (dest && EAB_IS_DESTINATION (dest), NULL);
-
- return dest->priv->book_uri;
-}
-
-gint
-eab_destination_get_email_num (const EABDestination *dest)
-{
- g_return_val_if_fail (dest && EAB_IS_DESTINATION (dest), -1);
-
- if (dest->priv->contact == NULL && (dest->priv->book_uri == NULL || dest->priv->uid == NULL))
- return -1;
-
- return dest->priv->email_num;
-}
-
-const gchar *
-eab_destination_get_name (const EABDestination *dest)
-{
- struct _EABDestinationPrivate *priv;
-
- g_return_val_if_fail (dest && EAB_IS_DESTINATION (dest), NULL);
-
- priv = (struct _EABDestinationPrivate *)dest->priv; /* cast out const */
-
- if (priv->name == NULL) {
- if (priv->contact != NULL) {
- priv->name = e_contact_get (priv->contact, E_CONTACT_FULL_NAME);
-
- if (priv->name == NULL || *priv->name == '\0') {
- g_free (priv->name);
- priv->name = e_contact_get (priv->contact, E_CONTACT_FILE_AS);
- }
-
- if (priv->name == NULL || *priv->name == '\0') {
- g_free (priv->name);
- if (e_contact_get (priv->contact, E_CONTACT_IS_LIST))
- priv->name = g_strdup (_("Unnamed List"));
- else
- priv->name = g_strdup (eab_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 char *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 *
-eab_destination_get_email (const EABDestination *dest)
-{
- struct _EABDestinationPrivate *priv;
-
- g_return_val_if_fail (dest && EAB_IS_DESTINATION (dest), NULL);
-
- priv = (struct _EABDestinationPrivate *)dest->priv; /* cast out const */
-
- if (priv->email == NULL) {
- if (priv->contact != NULL) {
- /* Pull the address out of the card. */
- GList *email = e_contact_get (priv->contact, E_CONTACT_EMAIL);
- if (email) {
- char *e = g_list_nth_data (email, priv->email_num);
-
- if (e)
- priv->email = g_strdup (e);
- }
- if (email) {
- g_list_foreach (email, (GFunc)g_free, NULL);
- g_list_free (email);
- }
-
- } 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 *
-eab_destination_get_address (const EABDestination *dest)
-{
- struct _EABDestinationPrivate *priv;
-
- g_return_val_if_fail (dest && EAB_IS_DESTINATION (dest), NULL);
-
- priv = (struct _EABDestinationPrivate *)dest->priv; /* cast out const */
-
- if (priv->addr == NULL) {
- CamelInternetAddress *addr = camel_internet_address_new ();
-
- if (eab_destination_is_evolution_list (dest)) {
- GList *iter = dest->priv->list_dests;
-
- while (iter) {
- EABDestination *list_dest = EAB_DESTINATION (iter->data);
-
- if (!eab_destination_is_empty (list_dest)) {
- camel_internet_address_add (addr,
- eab_destination_get_name (list_dest),
- eab_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,
- eab_destination_get_name (dest),
- eab_destination_get_email (dest));
-
- priv->addr = camel_address_encode (CAMEL_ADDRESS (addr));
- }
-
- camel_object_unref (CAMEL_OBJECT (addr));
- }
-
- return priv->addr;
-}
-
-void
-eab_destination_set_raw (EABDestination *dest, const gchar *raw)
-{
- g_return_if_fail (EAB_IS_DESTINATION (dest));
- g_return_if_fail (raw != NULL);
-
- if (dest->priv->raw == NULL || strcmp (dest->priv->raw, raw)) {
- eab_destination_freeze (dest);
-
- eab_destination_clear (dest);
- dest->priv->raw = g_strdup (raw);
- eab_destination_changed (dest);
-
- eab_destination_thaw (dest);
- }
-}
-
-const gchar *
-eab_destination_get_textrep (const EABDestination *dest, gboolean include_email)
-{
- const char *name, *email;
-
- g_return_val_if_fail (dest && EAB_IS_DESTINATION (dest), NULL);
-
- if (dest->priv->raw)
- return dest->priv->raw;
-
- name = eab_destination_get_name (dest);
- email = eab_destination_get_email (dest);
-
- if (eab_destination_from_contact (dest) && name != NULL && (!include_email || !email || !*email))
- 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
-eab_destination_is_evolution_list (const EABDestination *dest)
-{
- g_return_val_if_fail (dest && EAB_IS_DESTINATION (dest), FALSE);
-
- if (dest->priv->list_dests == NULL
- && dest->priv->contact != NULL
- && e_contact_get (dest->priv->contact, E_CONTACT_IS_LIST)) {
- GList *email = e_contact_get (dest->priv->contact, E_CONTACT_EMAIL);
- if (email) {
- GList *iter;
- for (iter = email; iter; iter = iter->next) {
- EABDestination *list_dest = eab_destination_import ((char *) iter->data);
-
- if (list_dest)
- dest->priv->list_dests = g_list_append (dest->priv->list_dests, list_dest);
- }
- }
- }
-
- return dest->priv->list_dests != NULL;
-}
-
-gboolean
-eab_destination_list_show_addresses (const EABDestination *dest)
-{
- g_return_val_if_fail (EAB_IS_DESTINATION (dest), FALSE);
-
- if (dest->priv->contact != NULL)
- return GPOINTER_TO_UINT (e_contact_get (dest->priv->contact, E_CONTACT_LIST_SHOW_ADDRESSES));
-
- return dest->priv->show_addresses;
-}
-
-gboolean
-eab_destination_get_html_mail_pref (const EABDestination *dest)
-{
- g_return_val_if_fail (dest && EAB_IS_DESTINATION (dest), FALSE);
-
- if (dest->priv->html_mail_override || dest->priv->contact == NULL)
- return dest->priv->wants_html_mail;
-
- return e_contact_get (dest->priv->contact, E_CONTACT_WANTS_HTML) ? TRUE : FALSE;
-}
-
-static void
-set_book (EABDestination *dest, EBook *book)
-{
- if (dest->priv->book && dest->priv->book != book) {
- g_object_unref (dest->priv->book);
- }
-
- dest->priv->book = book;
-
- if (book)
- g_object_ref (book);
-}
-
-static void
-name_and_email_cb (EBook *book, EBookStatus status, GList *contacts, gpointer closure)
-{
- EABDestination *dest = EAB_DESTINATION (closure);
-
- if (status == E_BOOK_ERROR_OK && g_list_length ((GList *) contacts) == 1) {
- EContact *contact = E_CONTACT (contacts->data);
- const char *email = eab_destination_get_email (dest);
- int email_num = 0;
-
-#if notyet
- if (eab_destination_is_valid (dest) && email && *email) {
- email_num = e_contact_email_find_number (contact, eab_destination_get_email (dest));
- }
-#endif
-
- if (email_num >= 0) {
- const char *book_uri;
-
- book_uri = e_book_get_uri (book);
-
- dest->priv->contact_loaded = TRUE;
- eab_destination_set_contact (dest, contact, email_num);
- eab_destination_set_book_uri (dest, book_uri);
- g_signal_emit (dest, eab_destination_signals[CONTACT_LOADED], 0);
- }
- }
-
- if (!dest->priv->contact_loaded)
- dest->priv->cannot_load = TRUE;
-
- g_object_unref (dest); /* drop the reference held by the query */
-}
-
-
-static void
-nickname_cb (EBook *book, EBookStatus status, GList *contacts, gpointer closure)
-{
- EABDestination *dest = EAB_DESTINATION (closure);
-
- if (status == E_BOOK_ERROR_OK) {
- if (g_list_length ((GList *) contacts) == 1) {
- const char *book_uri;
-
- book_uri = e_book_get_uri (book);
-
- dest->priv->contact_loaded = TRUE;
- eab_destination_set_contact (dest, E_CONTACT (contacts->data), 0); /* Uses primary e-mail by default. */
- eab_destination_set_book_uri (dest, book_uri);
- g_signal_emit (dest, eab_destination_signals[CONTACT_LOADED], 0);
-
- g_object_unref (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 */
-
- eab_name_and_email_query (book,
- eab_destination_get_textrep (dest, FALSE),
- NULL,
- name_and_email_cb,
- dest);
- }
- } else {
- /* Something went wrong with the query: drop our ref to the destination and return. */
- g_object_unref (dest);
- }
-}
-
-static void
-launch_load_contact_query (EABDestination *dest)
-{
- if (! eab_destination_is_valid (dest)) {
- /* If it doesn't look like an e-mail address, see if it is a nickname. */
- eab_nickname_query (dest->priv->book,
- eab_destination_get_textrep (dest, FALSE),
- nickname_cb,
- dest);
-
- } else {
- eab_name_and_email_query (dest->priv->book,
- eab_destination_get_name (dest),
- eab_destination_get_email (dest),
- name_and_email_cb,
- dest);
- }
-}
-
-void
-eab_destination_load_contact (EABDestination *dest, EBook *book)
-{
- g_return_if_fail (EAB_IS_DESTINATION (dest));
- g_return_if_fail (book == NULL || E_IS_BOOK (book));
-
- if (eab_destination_is_evolution_list (dest))
- return;
-
- if (eab_destination_contains_contact (dest))
- return;
-
- if (dest->priv->cannot_load)
- return;
-
- eab_destination_cancel_contact_load (dest);
-
- set_book (dest, book);
-
- /* Handle the case of an EABDestination containing a contact URL */
- if (eab_destination_contains_contact (dest)) {
- eab_destination_use_contact (dest, NULL, NULL);
- return;
- }
-
- /* We hold a reference to ourselves until our query is complete. */
- g_object_ref (dest);
- launch_load_contact_query (dest);
-}
-
-static int
-do_load_delayed (gpointer ptr)
-{
- EABDestination *dest = EAB_DESTINATION (ptr);
-
- eab_destination_load_contact (dest, dest->priv->book);
- return FALSE;
-}
-
-void
-eab_destination_load_contact_delayed (EABDestination *dest, EBook *book, gint delay)
-{
- g_return_if_fail (EAB_IS_DESTINATION (dest));
- g_return_if_fail (book == NULL || E_IS_BOOK (book));
-
- if (delay < 0)
- delay = 500;
-
- eab_destination_cancel_contact_load (dest);
-
- set_book (dest, book);
-
- dest->priv->pending_contact_load = g_timeout_add (delay, do_load_delayed, dest);
-}
-
-void
-eab_destination_cancel_contact_load (EABDestination *dest)
-{
- g_return_if_fail (EAB_IS_DESTINATION (dest));
-
- if (dest->priv->pending_contact_load) {
- g_source_remove (dest->priv->pending_contact_load);
- dest->priv->pending_contact_load = 0;
- }
-}
-
-gboolean
-eab_destination_unload_contact (EABDestination *dest)
-{
- char *email;
-
- g_return_val_if_fail (EAB_IS_DESTINATION (dest), FALSE);
-
- if (!eab_destination_contains_contact (dest))
- return FALSE;
-
- email = g_strdup (eab_destination_get_email (dest));
-
- if (email == NULL)
- return FALSE;
-
- eab_destination_freeze (dest);
- eab_destination_clear (dest);
- eab_destination_set_raw (dest, email);
- g_free (email);
- eab_destination_thaw (dest);
-
- return TRUE;
-}
-
-/*
- * Destination import/export
- */
-
-gchar *
-eab_destination_get_address_textv (EABDestination **destv)
-{
- int i, j, len = 0;
- char **strv;
- char *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 (EAB_IS_DESTINATION (destv[len]), NULL);
- len++;
- }
-
- strv = g_new0 (char *, len + 1);
- for (i = 0, j = 0; destv[i]; i++) {
- if (!eab_destination_is_empty (destv[i])) {
- const char *addr = eab_destination_get_address (destv[i]);
- strv[j++] = addr ? (char *) addr : "";
- }
- }
-
- str = g_strjoinv (", ", strv);
-
- g_free (strv);
-
- return str;
-}
-
-xmlNodePtr
-eab_destination_xml_encode (const EABDestination *dest)
-{
- xmlNodePtr dest_node;
- const char *str;
-
- g_return_val_if_fail (dest && EAB_IS_DESTINATION (dest), NULL);
-
- dest_node = xmlNewNode (NULL, "destination");
-
- str = eab_destination_get_name (dest);
- if (str)
- xmlNewTextChild (dest_node, NULL, "name", str);
-
- if (!eab_destination_is_evolution_list (dest)) {
- str = eab_destination_get_email (dest);
- if (str)
- xmlNewTextChild (dest_node, NULL, "email", str);
- } else {
- GList *iter = dest->priv->list_dests;
-
- while (iter) {
- EABDestination *list_dest = EAB_DESTINATION (iter->data);
- xmlNodePtr list_node = xmlNewNode (NULL, "list_entry");
-
- str = eab_destination_get_name (list_dest);
- if (str)
- xmlNewTextChild (list_node, NULL, "name", str);
-
- str = eab_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",
- eab_destination_list_show_addresses (dest) ? "yes" : "no");
- }
-
- str = eab_destination_get_book_uri (dest);
- if (str) {
- xmlNewTextChild (dest_node, NULL, "book_uri", str);
- }
-
- str = eab_destination_get_contact_uid (dest);
- if (str) {
- char buf[16];
-
- xmlNodePtr uri_node = xmlNewTextChild (dest_node, NULL, "card_uid", str);
- g_snprintf (buf, 16, "%d", eab_destination_get_email_num (dest));
- xmlNewProp (uri_node, "email_num", buf);
- }
-
- xmlNewProp (dest_node, "html_mail", eab_destination_get_html_mail_pref (dest) ? "yes" : "no");
-
- xmlNewProp (dest_node, "auto_recipient",
- eab_destination_is_auto_recipient (dest) ? "yes" : "no");
-
- return dest_node;
-}
-
-gboolean
-eab_destination_xml_decode (EABDestination *dest, xmlNodePtr node)
-{
- char *name = NULL, *email = NULL, *book_uri = NULL, *card_uid = NULL;
- gboolean is_list = FALSE, show_addr = FALSE, auto_recip = FALSE;
- gboolean html_mail = FALSE;
- GList *list_dests = NULL;
- int email_num = -1;
- char *tmp;
-
- g_return_val_if_fail (dest && EAB_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);
- }
-
- tmp = xmlGetProp (node, "auto_recipient");
- if (tmp) {
- auto_recip = !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;
- char *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) {
- EABDestination *list_dest = eab_destination_new ();
-
- if (list_name)
- eab_destination_set_name (list_dest, list_name);
- if (list_email)
- eab_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;
- }
-
- eab_destination_freeze (dest);
-
- eab_destination_clear (dest);
-
- if (name) {
- eab_destination_set_name (dest, name);
- g_free (name);
- }
- if (email) {
- eab_destination_set_email (dest, email);
- g_free (email);
- }
- if (book_uri) {
- eab_destination_set_book_uri (dest, book_uri);
- g_free (book_uri);
- }
- if (card_uid) {
- eab_destination_set_contact_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;
-
- dest->priv->auto_recipient = auto_recip;
-
- eab_destination_thaw (dest);
-
- return TRUE;
-}
-
-/* FIXME: Make utf-8 safe */
-static gchar *
-null_terminate_and_remove_extra_whitespace (xmlChar *xml_in, gint size)
-{
- gboolean skip_white = FALSE;
- char *xml, *r, *w;
-
- 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 *
-eab_destination_export (const EABDestination *dest)
-{
- xmlNodePtr dest_node;
- xmlDocPtr dest_doc;
- xmlChar *buffer = NULL;
- int size = -1;
- char *str;
-
- g_return_val_if_fail (dest && EAB_IS_DESTINATION (dest), NULL);
-
- dest_node = eab_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;
-}
-
-EABDestination *
-eab_destination_import (const gchar *str)
-{
- EABDestination *dest = NULL;
- xmlDocPtr dest_doc;
-
- if (!(str && *str))
- return NULL;
-
- dest_doc = xmlParseMemory ((char *) str, strlen (str));
- if (dest_doc && dest_doc->xmlRootNode) {
- dest = eab_destination_new ();
- if (! eab_destination_xml_decode (dest, dest_doc->xmlRootNode)) {
- g_object_unref (dest);
- dest = NULL;
- }
- }
- xmlFreeDoc (dest_doc);
-
- return dest;
-}
-
-gchar *
-eab_destination_exportv (EABDestination **destv)
-{
- xmlDocPtr destv_doc;
- xmlNodePtr destv_node;
- xmlChar *buffer = NULL;
- int i, size = -1;
- char *str;
-
- 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 (! eab_destination_is_empty (destv[i])) {
- xmlNodePtr dest_node = eab_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;
-}
-
-EABDestination **
-eab_destination_importv (const gchar *str)
-{
- GPtrArray *dest_array = NULL;
- xmlDocPtr destv_doc;
- xmlNodePtr node;
- EABDestination **destv = NULL;
-
- if (!(str && *str))
- return NULL;
-
- destv_doc = xmlParseMemory ((char *)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) {
- EABDestination *dest;
-
- dest = eab_destination_new ();
- if (eab_destination_xml_decode (dest, node) && !eab_destination_is_empty (dest)) {
- g_ptr_array_add (dest_array, dest);
- } else {
- g_object_unref (dest);
- }
-
- node = node->next;
- }
-
- /* we need destv to be NULL terminated */
- g_ptr_array_add (dest_array, NULL);
-
- destv = (EABDestination **) dest_array->pdata;
- g_ptr_array_free (dest_array, FALSE);
-
- finished:
- xmlFreeDoc (destv_doc);
-
- return destv;
-}
-
-EABDestination **
-eab_destination_list_to_vector_sized (GList *list, int n)
-{
- EABDestination **destv;
- int i = 0;
-
- if (n == -1)
- n = g_list_length (list);
-
- if (n == 0)
- return NULL;
-
- destv = g_new (EABDestination *, n + 1);
- while (list != NULL && i < n) {
- destv[i] = EAB_DESTINATION (list->data);
- list->data = NULL;
- i++;
- list = g_list_next (list);
- }
- destv[i] = NULL;
-
- return destv;
-}
-
-EABDestination **
-eab_destination_list_to_vector (GList *list)
-{
- return eab_destination_list_to_vector_sized (list, -1);
-}
-
-void
-eab_destination_freev (EABDestination **destv)
-{
- int i;
-
- if (destv) {
- for (i = 0; destv[i] != NULL; ++i) {
- g_object_unref (destv[i]);
- }
- g_free (destv);
- }
-
-}
-
-#if notyet
-static void
-touch_cb (EBook *book, const gchar *addr, ECard *card, gpointer closure)
-{
- if (book != NULL && card != NULL) {
- e_card_touch (card);
- d(g_message ("Use score for \"%s\" is now %f", addr, e_card_get_use_score (card)));
- e_book_commit_card (book, card, NULL, NULL);
- }
-}
-#endif
-
-void
-eab_destination_touch (EABDestination *dest)
-{
-#if notyet
- const char *email;
-
- g_return_if_fail (dest && EAB_IS_DESTINATION (dest));
-
- if (!eab_destination_is_auto_recipient (dest)) {
- email = eab_destination_get_email (dest);
-
- if (email)
- e_book_query_address_default (email, touch_cb, NULL);
- }
-#endif
-}
-
-void
-eab_destination_touchv (EABDestination **destv)
-{
-#if notyet
- int i;
-
- g_return_if_fail (destv != NULL);
-
- for (i = 0; destv[i] != NULL; ++i) {
- eab_destination_touch (destv[i]);
- }
-#endif
-}
diff --git a/addressbook/util/eab-destination.h b/addressbook/util/eab-destination.h
deleted file mode 100644
index 2c8e2abc11..0000000000
--- a/addressbook/util/eab-destination.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * eab-destination.h
- *
- * Copyright (C) 2001-2003 Ximian, Inc.
- *
- * Authors: Jon Trowbridge <trow@ximian.com>
- * Chris Toshok <toshok@ximian.com>
- */
-
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 <glib.h>
-#include <glib-object.h>
-#include <libebook/e-contact.h>
-#include <libebook/e-book.h>
-#include <libxml/tree.h>
-
-#define EAB_TYPE_DESTINATION (eab_destination_get_type ())
-#define EAB_DESTINATION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EAB_TYPE_DESTINATION, EABDestination))
-#define EAB_DESTINATION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), EAB_TYPE_DESTINATION, EABDestinationClass))
-#define EAB_IS_DESTINATION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EAB_TYPE_DESTINATION))
-#define EAB_IS_DESTINATION_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EAB_TYPE_DESTINATION))
-#define EAB_DESTINATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EAB_TYPE_DESTINATION, EABDestinationClass))
-
-typedef struct _EABDestination EABDestination;
-typedef struct _EABDestinationClass EABDestinationClass;
-
-typedef void (*EABDestinationContactCallback) (EABDestination *dest, EContact *contact, gpointer closure);
-
-struct _EABDestinationPrivate;
-
-struct _EABDestination {
- GObject object;
-
- struct _EABDestinationPrivate *priv;
-};
-
-struct _EABDestinationClass {
- GObjectClass parent_class;
-
- void (*changed) (EABDestination *dest);
- void (*contact_loaded) (EABDestination *dest);
-};
-
-GType eab_destination_get_type (void);
-
-
-EABDestination *eab_destination_new (void);
-void eab_destination_changed (EABDestination *);
-EABDestination *eab_destination_copy (const EABDestination *);
-void eab_destination_clear (EABDestination *);
-
-gboolean eab_destination_is_empty (const EABDestination *);
-gboolean eab_destination_equal (const EABDestination *a, const EABDestination *b);
-
-void eab_destination_set_contact (EABDestination *, EContact *contact, gint email_num);
-
-void eab_destination_set_name (EABDestination *, const gchar *name);
-void eab_destination_set_email (EABDestination *, const gchar *email);
-
-void eab_destination_set_html_mail_pref (EABDestination *, gboolean);
-
-gboolean eab_destination_contains_contact (const EABDestination *);
-
-gboolean eab_destination_is_auto_recipient (const EABDestination *);
-void eab_destination_set_auto_recipient (EABDestination *, gboolean value);
-
-void eab_destination_use_contact (EABDestination *, EABDestinationContactCallback cb, gpointer closure);
-
-EContact *eab_destination_get_contact (const EABDestination *);
-gint eab_destination_get_email_num (const EABDestination *);
-
-const gchar *eab_destination_get_name (const EABDestination *); /* "Jane Smith" */
-const gchar *eab_destination_get_email (const EABDestination *); /* "jane@assbarn.com" */
-const gchar *eab_destination_get_address (const EABDestination *);; /* "Jane Smith <jane@assbarn.com>" (or a comma-sep set of such for a list) */
-
-void eab_destination_set_raw (EABDestination *, const gchar *free_form_string);
-const gchar *eab_destination_get_textrep (const EABDestination *, gboolean include_email); /* "Jane Smith" or "jane@assbarn.com" */
-
-gboolean eab_destination_is_evolution_list (const EABDestination *);
-gboolean eab_destination_list_show_addresses (const EABDestination *);
-
-/* If true, they want HTML mail. */
-gboolean eab_destination_get_html_mail_pref (const EABDestination *);
-
-void eab_destination_load_contact (EABDestination *, EBook *);
-void eab_destination_load_contact_delayed (EABDestination *, EBook *, gint delay); /* delay < 0: "default" */
-void eab_destination_cancel_contact_load (EABDestination *);
-gboolean eab_destination_unload_contact (EABDestination *);
-
-gchar *eab_destination_get_address_textv (EABDestination **);
-
-gchar *eab_destination_export (const EABDestination *);
-EABDestination *eab_destination_import (const gchar *str);
-
-gchar *eab_destination_exportv (EABDestination **);
-EABDestination **eab_destination_importv (const gchar *str);
-
-EABDestination **eab_destination_list_to_vector_sized (GList *, int n);
-EABDestination **eab_destination_list_to_vector (GList *);
-
-void eab_destination_freev (EABDestination **);
-
-void eab_destination_touch (EABDestination *);
-void eab_destination_touchv (EABDestination **);
-
-
-#endif /* __EAB_DESTINATION_H__ */
-
diff --git a/addressbook/util/eab-marshal.list b/addressbook/util/eab-marshal.list
deleted file mode 100644
index 680ea039a3..0000000000
--- a/addressbook/util/eab-marshal.list
+++ /dev/null
@@ -1,5 +0,0 @@
-NONE:NONE
-NONE:BOOL
-NONE:POINTER
-NONE:STRING
-NONE:INT
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 e71ea6327d..0000000000
--- a/art/ChangeLog
+++ /dev/null
@@ -1,45 +0,0 @@
-2003-12-04 Radek Doulik <rodo@ximian.com>
-
- * Makefile.am (buttons_DATA): added stock junk button and notjunk
- placeholder (until artists have the right one)
-
-2003-12-02 Rodney Dawes <dobey@ximian.com>
-
- * Makefile.am: Add flag-for-followup-done.xpm to EXTRA_DIST
-
-2003-12-02 Not Zed <NotZed@Ximian.com>
-
- * flag-for-folloup*: Changed the base flag colour to reddish, and
- created a -done set, the original blue-ish colour.
-
-2003-11-12 Jakub Steiner <jimmac@ximian.com>
-
- * about-box.png: replace the foobar file
-
-2003-10-10 Hans Petter Jansson <hpj@ximian.com>
-
- * listview.xpm: Add calendar list view icon.
-
-2003-09-24 Ettore Perazzoli <ettore@ximian.com>
-
- * about-box.png: More artwork from Jakub.
-
-2003-09-24 Ettore Perazzoli <ettore@ximian.com>
-
- * splash.png: New artwork from Jakub.
-
-2003-09-12 Bolian Yin <bolian.yin@sun.com>
-
- * jump.xpm: add icon for the focused jump button.
-
-2003-08-28 Hans Petter Jansson <hpj@ximian.com>
-
- * appointment-reminder.png:
- * appointment-reminder-excl.png: Add icons used by the calendar alarm's
- systray notification. These are also in gnome-icon-theme HEAD, but
- until we have workable stock packages, we use this.
-
-2003-06-23 Jakub Steiner <jimmac@ximian.com>
-
- * splash.png:
- * about-box.png: update Copyright info
diff --git a/art/ChangeLog.pre-1-4 b/art/ChangeLog.pre-1-4
deleted file mode 100644
index 9dec5cedc8..0000000000
--- a/art/ChangeLog.pre-1-4
+++ /dev/null
@@ -1,712 +0,0 @@
-2003-06-02 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am (install-data-local) [DEFAULT_BINARY]: Symlink
- evolution.png to evolution-$(BASE_VERSION).png. [#43596]
-
-2003-05-27 Jakub Steiner <jimmac@ximian.com>
-
- * about-box.png, splash.png: Update copyright info
-
-2003-05-21 Ettore Perazzoli <ettore@ximian.com>
-
- * about-box.png, splash.png: New artwork from Jakub.
-
-2003-05-05 Jakub Steiner <jimmac@ximian.com>
-
- * evolution-contacts-plain.png
- * evolution-contacts.png:
- * globe.png:
- * malehead.png:
- * next-message.png:
- * previous-message.png:
- * receive-24.png:
- * reply-to-all.png:
- * reply.png:
- * send-24-receive.png:
- * send-24.png:
- * send-16.png:
- * send-receive.xpm:
- * send.png: quick fix of the artwork, the rest goes to the
- (future) icon theme
-
-2003-04-29 Chris Toshok <toshok@ximian.com>
-
- * Makefile.am (images_DATA): add stock-edit-{16,24}.png
-
-2003-03-03 Ettore Perazzoli <ettore@ximian.com>
-
- * about-box.png: New artwork from Jakub.
-
-2003-02-06 Dan Winship <danw@ximian.com>
-
- * Makefile.am: remove imagesdir, etc, which are now defined in
- configure.in
-
-2003-01-22 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am (imagesdir): Version using $(BASE_VERSION).
- (buttonsdir): Likewise.
- (conduitsdir): Likewise.
- (install-data-local): New rule to install evolution.png as
- evolution-$(BASE_VERSION).png.
- (EXTRA_DIST): Add evolution.png.
-
-2003-01-08 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am (imagesdir): Install images into
- $(datadir)/evolution/images instead of
- $(datadir)/images/evolution.
- (buttonsdir): Likewise, these go into
- $(datadir)/evolution/images/buttons now.
- (conduits_DATA): Likewise, $(datadir)/evolution/images/conduits.
-
-2002-11-25 Ettore Perazzoli <ettore@ximian.com>
-
- * splash.png: New work-in-progress splash from Jakub.
-
-2002-10-28 Ettore Perazzoli <ettore@ximian.com>
-
- * splash.png: New artwork from Jakub.
- * about-box.png: New artwork from Jakub.
-
-2002-10-28 Ettore Perazzoli <ettore@ximian.com>
-
- * settings.png: New.
- * settings-16.png: New.
-
-2002-10-07 Ettore Perazzoli <ettore@ximian.com>
-
- * splash.png: New artwork from Jakub.
-
-2002-09-27 Dan Winship <danw@ximian.com>
-
- * post-reply-24.png: New icon for "Post a Reply" from Jakub.
-
-2002-02-29 Ettore Perazzoli <ettore@ximian.com>
-
- * about-box.png, splash.png: New artwork from Jakub.
-
-2002-09-03 Ettore Perazzoli <ettore@ximian.com>
-
- * folder-settings.png: New icon from Jakub.
-
-2002-09-03 Jakub Steiner <jimmac@ximian.com>
-
- * ldap-settings.png: use a more gnomeish version
-
-2002-08-01 Ettore Perazzoli <ettore@ximian.com>
-
- * contact-list-16.png: New artwork from Jakub.
- * post-message-16.png: Likewise.
- * meeting-request-16.png: Likewise.
-
- * meeting.xpm: Removed.
-
-2002-07-26 Ettore Perazzoli <ettore@ximian.com>
-
- * mail.png: New icon for mail (gnome-textfile.png from GNOME 2, by
- Tuomas' suggestion).
-
-2002-07-23 Jakub Steiner <jimmac@ximian.com>
-
- * inbox.png,outbox.png: fix the arrows
- * font.png: the former one was vector style - from gorilla
-
-2002-07-22 <jpr@ximian.com>
-
- * Makefile.am: add new image
-
-2002-07-16 Ettore Perazzoli <ettore@ximian.com>
-
- * inbox.png, outbox.png: Added final large versions of the Inbox
- and Outbox icons.
-
-2002-07-09 Dan Winship <danw@ximian.com>
-
- * Makefile.am (images_DATA): add folder.png, folder-mini.png,
- public-folder.png, and public-folder-mini.png
-
- * folder-mini.png: Renamed from local-16.png
-
- * folder.png, public-folder.png, public-folder-mini.png: New, from
- Jakub.
-
-2002-07-09 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am (images_DATA): inbox-mini.png instead of
- inbox-16.png, outbox-mini.png instead of outbox-16.png. Also add
- inbox.png and outbox.png.
- (inbox.png): New.
- (outbox.png): New.
-
-2002-05-20 Ettore Perazzoli <ettore@ximian.com>
-
- * schedule-meeting-24.png: New.
-
-2002-04-25 Larry Ewing <lewing@ximian.com>
-
- * Makefile.am (images_DATA): font.png: Add for the font config
- prefs.
-
-2002-04-17 Dan Winship <danw@ximian.com>
-
- * monkey-16.png: Replace with an antialiased version
-
-2002-04-10 Dan Winship <danw@ximian.com>
-
- * Makefile.am (images_DATA), folder-settings.png: Add. (Copied
- from Unscalable Gorilla because it was handy. Will probably get
- changed to something else...)
-
-2002-03-28 Ettore Perazzoli <ettore@ximian.com>
-
- * calendar-and-tasks-settings.png: New.
- * composer-settings.png: New.
- * ldap-settings.png: New.
- * mail-accounts-settings.png: New.
- * summary-settings.png: New.
-
-2002-03-25 Dan Winship <danw@ximian.com>
-
- * Makefile.am (images_DATA): Add working-16.png (the GNOME2 stock
- "wait" icon, from Jakub)
-
-2002-03-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * forward.xpm, reply.xpm, reply_to_all.xpm: Rename the internal
- structure to coincide with the filenames.
-
-2002-02-29 Ettore Perazzoli <ettore@ximian.com>
-
- * about-box.png, splash.png: New cool artwork from Jakub.
-
-2002-02-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * Makefile.am: Remove meeting_widget.png from the build since it
- doesn't seem to be in cvs?
-
-2002-02-20 Jakub Steiner <jimmac@ximian.com>
-
- * summary_preferences-16.png: menu icon for summary preferences
- * Makefile.am: added the icon
-
-2002-02-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * flag-for-followup.xpm:
- * flag-for-followup-16.png:
- * flag-for-followup-48.png: New icons.
-
- * Makefile.am: Added the new icons...
-
-2002-02-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * Makefile.am: Install mail-new.xpm, mail-read.xpm and
- priority-high.xpm in the same place as other bonobo-ui menu
- pixmaps so we can use these in menus too.
-
-2002-02-08 JP Rosevear <jpr@ximian.com>
-
- * connect_to_url-16.xpm: new icon
-
- * new_all_day_event.png: ditto
-
- * Makefile.am: install and dist new images
-
-2001-12-11 Jon Trowbridge <trow@ximian.com>
-
- * mail-need-reply.xpm: A new icon that sucks less. We still need
- some Tuomas-love.
-
-2001-12-09 Jon Trowbridge <trow@ximian.com>
-
- * mail-need-reply.xpm: Added a really, really ugly and
- awful icon to symbolize "message needs a reply".
-
- * Makefile.am (EXTRA_DIST): Added mail-need-reply.xpm.
-
-2001-11-06 Ettore Perazzoli <ettore@ximian.com>
-
- * evolution.png: New, updated icon from Tuomas.
-
-2001-11-05 JP Rosevear <jpr@ximian.com>
-
- * Makefile.am (EXTRA_DIST): dist the glade data
-
-2001-11-01 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am (gladedir): New.
- (glade_DATA): Pixmap files required to be installed by the glade
- files.
-
-2001-10-31 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am: Install `evolution.png', not `evolution-icon.png'.
-
- * evolution.png: Renamed from `evolution-icon.png', removing the
- old, now unused `evolution.png'.
-
-2001-10-30 Jakub Steiner <jimmac@ximian.com>
-
- * splash-1-0.png: new style splash
-
-2001-10-23 Tuomas Kuosmanen <tigert@ximian.com>
-
- * splash.png: Remove the "1" from "1.0 Release Candidate 1" so it
- looks better.
-
-2001-10-23 Tuomas Kuosmanen <tigert@ximian.com>
-
- * Makefile.am (appicon_DATA): Changed the filename here too
- so the icon gets installed.
-
- * evolution-icon.png: New icon that scales better.
-
-2001-10-22 Jakub Steiner <jimmac@ximian.com>
-
- * about-box.png: update the layout a bit
- * splash.png: update to 0.17
-
-2001-10-16 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am (images_DATA): Add `about-box.png'.
-
- * about-box.png: New image for the about box from Jakub.
-
-2001-10-18 Larry Ewing <lewing@ximian.com>
-
- * Makefile.am (images_DATA): add alarm.png for the new alarm
- notification code.
-
-2001-10-04 Chris Toshok <toshok@ximian.com>
-
- * Makefile.am (images_DATA): change ldap-16.png to ldap-mini.png,
- and add ldap.png.
-
-2001-10-04 Jakub Steiner <jimmac@ximian.com>
-
- * splash.png: bump to 0.16
- * ldap.png: 48x48 version for shortcut bar
-
-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 7e23226ed1..0000000000
--- a/art/Makefile.am
+++ /dev/null
@@ -1,272 +0,0 @@
-images_DATA = \
- 16_copy.png \
- 16_customize.png \
- 16_cut.png \
- 16_paste.png \
- about-box.png \
- alarm.png \
- all_contacts.xpm \
- apply-filters-16.xpm \
- appointment-reminder.png \
- appointment-reminder-excl.png \
- bcg.png \
- briefcase.png \
- butterfly.png \
- calendar-and-tasks-settings.png \
- cellphone.png \
- compose-message.png \
- composer-settings.png \
- configure_16_addressbook.xpm \
- configure_16_calendar.xpm \
- configure_16_folder.xpm \
- configure_16_mail.xpm \
- connect_to_url-16.xpm \
- contact-is-a-list.png \
- contact-list-16.png \
- copy_16_message.xpm \
- edit.xpm \
- empty.gif \
- encrypt.xpm \
- envelope.png \
- es-appointments.png \
- es-weather.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 \
- evolution-junk.png \
- evolution-junk-mini.png \
- executive-summary-bg.png \
- executive-summary-curve.png \
- info-bulb.png \
- faq-16.png \
- fetch-mail.png \
- find_contact.xpm \
- find_message.xpm \
- flag-for-followup-16.png \
- folder-copy-16.png \
- folder-move-16.png \
- folder-settings.png \
- folder.png \
- folder-mini.png \
- folder.xpm \
- font.png \
- forward.xpm \
- globe.png \
- goto-16.png \
- hide_deleted_messages.xpm \
- hide_read_messages.xpm \
- hide_selected_messages.xpm \
- house.png \
- ico-calendar.png \
- ico-mail.png \
- ico-rdf.png \
- ico-weather.png \
- import.png \
- import.xpm \
- inbox.png \
- inbox-mini.png \
- ldap-mini.png \
- ldap-settings.png \
- ldap.png \
- mail.png \
- mail-accounts-settings.png \
- mail-config-druid-account-name.png \
- mail-config-druid-identity.png \
- mail-config-druid-receive.png \
- mail-config-druid-send.png \
- mail-config-druid.png \
- mail-new.xpm \
- mail-read.xpm \
- malehead.png \
- mark-as-important-16.png \
- meeting-request.png \
- meeting-request-16.png \
- monkey-16.png \
- move_message.xpm \
- myevo-appointments.png \
- myevo-mail-summary.png \
- myevo-post-it.png \
- myweather-clouds.png \
- myweather-fog.png \
- myweather-rain.png \
- myweather-snow.png \
- myweather-storm.png \
- myweather-sun.png \
- myweather-suncloud.png \
- new-message.xpm \
- new_all_day_event.png \
- new_appointment.xpm \
- new_contact.xpm \
- new_task-16.png \
- offline.png \
- online.png \
- open-in-new-window-16.png \
- outbox.png \
- outbox-mini.png \
- pattern.png \
- pgp-signature-bad.png \
- pgp-signature-nokey.png \
- pgp-signature-ok.png \
- post-message-16.png \
- post-reply-24.png \
- print-preview.xpm \
- print.xpm \
- priority-high.xpm \
- public-folder.png \
- public-folder-mini.png \
- rdf.png \
- reply.xpm \
- reply_to_all.xpm \
- save-16.png \
- save-as-16.png \
- save.xpm \
- schedule-meeting-16.xpm \
- schedule-meeting-24.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-disabled.png \
- service-down.png \
- service-left-disabled.png \
- service-left.png \
- service-right-disabled.png \
- service-right.png \
- service-up-disabled.png \
- service-up.png \
- settings.png \
- settings-16.png \
- show_all_messages.xpm \
- splash.png \
- stock-edit-16.png \
- stock-edit-24.png \
- stock-junk-24.png \
- stock-notjunk-24.png \
- summary-settings.png \
- summary_preferences-16.png \
- talking-heads.png \
- task.png \
- task.xpm \
- thankyou.png \
- timezone-16.xpm \
- timezone-48.png \
- undelete_message-16.png \
- wax-seal-broken.png \
- wax-seal.png \
- work_offline.xpm \
- work_online-16.png \
- working-16.png \
- world_map-960.png
-
-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 \
- listview.xpm \
- 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
-
-glade_DATA = \
- evolution.png \
- import.png \
- flag-for-followup-48.png \
- mail-config-druid-account-name.png \
- mail-config-druid-identity.png \
- mail-config-druid.png \
- mail-config-druid-receive.png \
- mail-config-druid-send.png \
- thankyou.png \
- timezone-48.png
-
-conduitsdir = $(imagesdir)/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
-
-install-data-local:
- $(mkinstalldirs) $(DESTDIR)$(datadir)/pixmaps
- $(INSTALL_DATA) $(srcdir)/evolution.png $(DESTDIR)$(datadir)/pixmaps/evolution-$(BASE_VERSION).png
-if DEFAULT_BINARY
- cd $(DESTDIR)$(datadir)/pixmaps && rm -f evolution.png && $(LN_S) evolution-$(BASE_VERSION).png evolution.png
-endif
-
-EXTRA_DIST = \
- ChangeLog.pre-1-4 \
- attachment.xpm \
- bell.xpm \
- check-filled.xpm \
- empty.xpm \
- evolution.png \
- jump.xpm \
- mail-need-reply.xpm \
- mail-new.xpm \
- mail-read.xpm \
- mail-replied.xpm \
- flag-for-followup.xpm \
- flag-for-followup-done.xpm \
- mark.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) \
- $(glade_DATA)
diff --git a/art/about-box.png b/art/about-box.png
deleted file mode 100644
index c3613fb4bb..0000000000
--- a/art/about-box.png
+++ /dev/null
Binary files differ
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/alarm.png b/art/alarm.png
deleted file mode 100644
index 71a9be8a48..0000000000
--- a/art/alarm.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/appointment-reminder-excl.png b/art/appointment-reminder-excl.png
deleted file mode 100644
index 2bd35ae067..0000000000
--- a/art/appointment-reminder-excl.png
+++ /dev/null
Binary files differ
diff --git a/art/appointment-reminder.png b/art/appointment-reminder.png
deleted file mode 100644
index 7e7caa95ed..0000000000
--- a/art/appointment-reminder.png
+++ /dev/null
Binary files differ
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/calendar-and-tasks-settings.png b/art/calendar-and-tasks-settings.png
deleted file mode 100644
index a457bb3cc8..0000000000
--- a/art/calendar-and-tasks-settings.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/composer-settings.png b/art/composer-settings.png
deleted file mode 100644
index f255c755e7..0000000000
--- a/art/composer-settings.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/connect_to_url-16.xpm b/art/connect_to_url-16.xpm
deleted file mode 100644
index 5053d252f7..0000000000
--- a/art/connect_to_url-16.xpm
+++ /dev/null
@@ -1,123 +0,0 @@
-/* XPM */
-static char * connect_to_url_16_xpm[] = {
-"16 16 104 2",
-" c None",
-". c #000000",
-"+ c #070808",
-"@ c #677B68",
-"# c #BECFC5",
-"$ c #B4C3C6",
-"% c #8AA0B6",
-"& c #95A1AC",
-"* c #AFB8B8",
-"= c #989D98",
-"- c #373737",
-"; c #AFC1B1",
-"> c #E0E7DE",
-", c #BACFC6",
-"' c #96AFC0",
-") c #728BA4",
-"! c #889BA4",
-"~ c #829176",
-"{ c #879A81",
-"] c #AAA89A",
-"^ c #585A5B",
-"/ c #1D1D1D",
-"( c #748E79",
-"_ c #DEEADF",
-": c #B1D9B3",
-"< c #AAD8B5",
-"[ c #79B7A5",
-"} c #7A9AB5",
-"| c #839DA3",
-"1 c #74876C",
-"2 c #7E8471",
-"3 c #82755A",
-"4 c #8F7F66",
-"5 c #2D2E2D",
-"6 c #CAD7CB",
-"7 c #BCD9C2",
-"8 c #96C69D",
-"9 c #4D8550",
-"0 c #597FA7",
-"a c #418093",
-"b c #637E61",
-"c c #73755B",
-"d c #86765A",
-"e c #949290",
-"f c #CDDACD",
-"g c #518355",
-"h c #989389",
-"i c #807D74",
-"j c #3B7480",
-"k c #449268",
-"l c #819395",
-"m c #797E67",
-"n c #9D907D",
-"o c #73816F",
-"p c #43423C",
-"q c #B7B3AA",
-"r c #C4C2BD",
-"s c #EAE8E3",
-"t c #4D5C5E",
-"u c #887664",
-"v c #000001",
-"w c #010101",
-"x c #E2E1DD",
-"y c #F0EFEC",
-"z c #AAA7A0",
-"A c #C5D2C8",
-"B c #E9EEEA",
-"C c #8B8572",
-"D c #476346",
-"E c #889079",
-"F c #F2F0ED",
-"G c #EBEAE6",
-"H c #8A857B",
-"I c #ECEBE8",
-"J c #4D6C8B",
-"K c #4B6963",
-"L c #53885E",
-"M c #6E7653",
-"N c #747F6C",
-"O c #0C0B0A",
-"P c #78756B",
-"Q c #BEBBB5",
-"R c #B3B1AA",
-"S c #7D786E",
-"T c #E1DFDB",
-"U c #46698F",
-"V c #598860",
-"W c #617853",
-"X c #818667",
-"Y c #030506",
-"Z c #8C8981",
-"` c #A6A29B",
-" . c #726D63",
-".. c #CECAC3",
-"+. c #3D5143",
-"@. c #020203",
-"#. c #0F0F0D",
-"$. c #F0F3F1",
-"%. c #272622",
-"&. c #8B877E",
-"*. c #706C62",
-"=. c #B1ADA4",
-"-. c #6C685E",
-";. c #646056",
-" . . . + . . . . ",
-" . @ # $ % & * = - . ",
-" . ; > , ' ) ! ~ { ] ^ / ",
-" . ( _ : < [ } | 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 i . . . . t u v ",
-" w . x y z s i . A A B . C v ",
-". . . i x y z s i . . . . D E v ",
-"s s s s F G H I i . J K L M N O ",
-"i i P P Q R S T P . U V W X Y ",
-". . w P Z ` ...P . . . . +.@. ",
-" #.Z ` ...P . A A $.. ",
-" %.&.*.=.-.. . . . ",
-" #.#.h ;.. ",
-" #.#. "};
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/contact-list-16.png b/art/contact-list-16.png
deleted file mode 100644
index 5ebfe92745..0000000000
--- a/art/contact-list-16.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 4043413589..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 4043413589..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-junk-mini.png b/art/evolution-junk-mini.png
deleted file mode 100644
index 64d488ca1c..0000000000
--- a/art/evolution-junk-mini.png
+++ /dev/null
Binary files differ
diff --git a/art/evolution-junk.png b/art/evolution-junk.png
deleted file mode 100644
index 5fefbefc56..0000000000
--- a/art/evolution-junk.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 412dcfbbc0..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/flag-for-followup-16.png b/art/flag-for-followup-16.png
deleted file mode 100644
index 08e5e6dcd4..0000000000
--- a/art/flag-for-followup-16.png
+++ /dev/null
Binary files differ
diff --git a/art/flag-for-followup-48.png b/art/flag-for-followup-48.png
deleted file mode 100644
index a387bd9521..0000000000
--- a/art/flag-for-followup-48.png
+++ /dev/null
Binary files differ
diff --git a/art/flag-for-followup-done-16.png b/art/flag-for-followup-done-16.png
deleted file mode 100644
index c21a388135..0000000000
--- a/art/flag-for-followup-done-16.png
+++ /dev/null
Binary files differ
diff --git a/art/flag-for-followup-done-48.png b/art/flag-for-followup-done-48.png
deleted file mode 100644
index 76f5c0b04e..0000000000
--- a/art/flag-for-followup-done-48.png
+++ /dev/null
Binary files differ
diff --git a/art/flag-for-followup-done.xpm b/art/flag-for-followup-done.xpm
deleted file mode 100644
index 6d93b23457..0000000000
--- a/art/flag-for-followup-done.xpm
+++ /dev/null
@@ -1,78 +0,0 @@
-/* XPM */
-static char * flag_for_followup_done_xpm[] = {
-"16 16 59 1",
-" c None",
-". c #000000",
-"+ c #282E33",
-"@ c #C1D1E0",
-"# c #929EA9",
-"$ c #69737C",
-"% c #32404B",
-"& c #363F47",
-"* c #AEC0D1",
-"= c #DAE3EB",
-"- c #C4D4E4",
-"; c #6F8498",
-"> c #4D5D6C",
-", c #3F4D5B",
-"' c #3F4952",
-") c #AABBCB",
-"! c #C6D3DE",
-"~ c #E4EAF0",
-"{ c #C0D0E0",
-"] c #73889C",
-"^ c #526271",
-"/ c #41505E",
-"( c #56636F",
-"_ c #41484E",
-": c #97A9B8",
-"< c #5D7B95",
-"[ c #6A87A1",
-"} c #B5C4D2",
-"| c #D8E1E9",
-"1 c #CFDBE6",
-"2 c #9DB8D2",
-"3 c #455461",
-"4 c #465665",
-"5 c #45515B",
-"6 c #30363A",
-"7 c #C0B094",
-"8 c #4B6983",
-"9 c #57758F",
-"0 c #64819B",
-"a c #B3C2D0",
-"b c #D2DBE4",
-"c c #DCE4EC",
-"d c #A4BBD1",
-"e c #97A1AB",
-"f c #74797F",
-"g c #727A81",
-"h c #606A74",
-"i c #B39169",
-"j c #516F89",
-"k c #AEBECC",
-"l c #AFBFCE",
-"m c #DCE4EB",
-"n c #7D94A8",
-"o c #BBC8D3",
-"p c #0E0E0E",
-"q c #D7DEE4",
-"r c #040404",
-"s c #9EA4AA",
-"t c #0B0F13",
-" . ",
-" ...+. ",
-" .@#$%&. ",
-" .*=-;>,'.. ",
-" .)!~{]^/(_.. ",
-" .:<[}|12;3456. ",
-".7.890abcdefgh. ",
-" .i.8j<klm.... ",
-" .i.88nop ",
-" .i.88qr ",
-" .i.8s. ",
-" .i.t ",
-" .i. ",
-" .i. ",
-" .i. ",
-" .. "};
diff --git a/art/flag-for-followup.xpm b/art/flag-for-followup.xpm
deleted file mode 100644
index aa646673ad..0000000000
--- a/art/flag-for-followup.xpm
+++ /dev/null
@@ -1,78 +0,0 @@
-/* XPM */
-static char * flag_for_followup_xpm[] = {
-"16 16 59 1",
-" c None",
-". c #000000",
-"+ c #33282B",
-"@ c #DFC0CA",
-"# c #A89199",
-"$ c #7B686E",
-"% c #4B323A",
-"& c #47363B",
-"* c #D0ADB8",
-"= c #EAD9DF",
-"- c #E4C4CD",
-"; c #976E7B",
-"> c #6B4C56",
-", c #5B3F47",
-"' c #523F44",
-") c #CAA9B4",
-"! c #DEC6CD",
-"~ c #EFE3E7",
-"{ c #DFBFC9",
-"] c #9C737F",
-"^ c #70515B",
-"/ c #5E4149",
-"( c #6F565D",
-"_ c #4E4145",
-": c #B796A1",
-"< c #955D6E",
-"[ c #A0697B",
-"} c #D1B4BD",
-"| c #E8D7DD",
-"1 c #E6CFD6",
-"2 c #D19CAD",
-"3 c #60444D",
-"4 c #64454F",
-"5 c #5B454C",
-"6 c #392F33",
-"7 c #BFB093",
-"8 c #824A5C",
-"9 c #8F5768",
-"0 c #9A6375",
-"a c #CFB2BB",
-"b c #E4D2D7",
-"c c #ECDCE0",
-"d c #D0A3B1",
-"e c #AA969C",
-"f c #7F7476",
-"g c #807176",
-"h c #735F65",
-"i c #B29168",
-"j c #885062",
-"k c #CCAEB7",
-"l c #CEAFB8",
-"m c #EADBE0",
-"n c #A77D8A",
-"o c #D2BAC2",
-"p c #0D0D0D",
-"q c #E4D7DB",
-"r c #030303",
-"s c #A99DA1",
-"t c #120B0D",
-" . ",
-" ...+. ",
-" .@#$%&. ",
-" .*=-;>,'.. ",
-" .)!~{]^/(_.. ",
-" .:<[}|12;3456. ",
-".7.890abcdefgh. ",
-" .i.8j<klm.... ",
-" .i.88nop ",
-" .i.88qr ",
-" .i.8s. ",
-" .i.t ",
-" .i. ",
-" .i. ",
-" .i. ",
-" .. "};
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-mini.png b/art/folder-mini.png
deleted file mode 100644
index 1fc929bbf7..0000000000
--- a/art/folder-mini.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-settings.png b/art/folder-settings.png
deleted file mode 100644
index 64305acf23..0000000000
--- a/art/folder-settings.png
+++ /dev/null
Binary files differ
diff --git a/art/folder.png b/art/folder.png
deleted file mode 100644
index 30f073ea6b..0000000000
--- a/art/folder.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/font.png b/art/font.png
deleted file mode 100644
index bd927d3344..0000000000
--- a/art/font.png
+++ /dev/null
Binary files differ
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 fcb25802a1..0000000000
--- a/art/forward.xpm
+++ /dev/null
@@ -1,51 +0,0 @@
-/* XPM */
-static char * 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 88f22d3020..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/inbox-mini.png b/art/inbox-mini.png
deleted file mode 100644
index 88071fa91e..0000000000
--- a/art/inbox-mini.png
+++ /dev/null
Binary files differ
diff --git a/art/inbox.png b/art/inbox.png
deleted file mode 100644
index dda0fecbb3..0000000000
--- a/art/inbox.png
+++ /dev/null
Binary files differ
diff --git a/art/info-bulb.png b/art/info-bulb.png
deleted file mode 100644
index 2d2e6be8b1..0000000000
--- a/art/info-bulb.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 7c289e738f..0000000000
--- a/art/jump.xpm
+++ /dev/null
@@ -1,30 +0,0 @@
-/* XPM */
-static char * jump_xpm[] = {
-"16 8 3 1",
-" c None",
-". c #000000",
-"+ c #FFFF00",
-"................",
-".++++++++++++++.",
-".++++++++++++++.",
-".++..++..++..++.",
-".++..++..++..++.",
-".++++++++++++++.",
-".++++++++++++++.",
-"................"};
-
-static char * jump_xpm_focused[] = {
-"16 8 3 1",
-" c None",
-". c #0000FF",
-"+ c #FFFF00",
-"................",
-"................",
-"..++++++++++++..",
-"..+..++..++..+..",
-"..+..++..++..+..",
-"..++++++++++++..",
-"................",
-"................"};
-
-
diff --git a/art/ldap-mini.png b/art/ldap-mini.png
deleted file mode 100644
index 85c4dc0cf7..0000000000
--- a/art/ldap-mini.png
+++ /dev/null
Binary files differ
diff --git a/art/ldap-settings.png b/art/ldap-settings.png
deleted file mode 100644
index dd10f98412..0000000000
--- a/art/ldap-settings.png
+++ /dev/null
Binary files differ
diff --git a/art/ldap.png b/art/ldap.png
deleted file mode 100644
index 5ff8180b35..0000000000
--- a/art/ldap.png
+++ /dev/null
Binary files differ
diff --git a/art/listview.xpm b/art/listview.xpm
deleted file mode 100644
index 56d4a7fd64..0000000000
--- a/art/listview.xpm
+++ /dev/null
@@ -1,34 +0,0 @@
-/* XPM */
-static char * listview_xpm[] = {
-"24 24 7 1",
-" c None",
-". c #000000",
-"+ c #D8D8D4",
-"@ c #919191",
-"# c #666666",
-"$ c #FFFFFF",
-"% c #F2F1ED",
-"....................... ",
-".++++++++++++++++++++@. ",
-".+@@@@@@@@@@@@@@@@@@@#. ",
-".+@@@@@@@@@@@@@@@@@@@#. ",
-".+@@@@@@@@@@@@@@@@@@@#. ",
-".@####################. ",
-".$%%%%%%%%%%%%%%%%%%%@. ",
-".$%%%%%%%%%%%%%%%%%%%@. ",
-".$%%%%%%%%%%%%%%%%%%%@. ",
-".@@@@@@@@@@@@@@@@@@@@#. ",
-".$%%%%%%%%%%%%%%%%%%%@. ",
-".$%%%%%%%%%%%%%%%%%%%@. ",
-".$%%%%%%%%%%%%%%%%%%%@. ",
-".@@@@@@@@@@@@@@@@@@@@#. ",
-".$%%%%%%%%%%%%%%%%%%%@. ",
-".$%%%%%%%%%%%%%%%%%%%@. ",
-".$%%%%%%%%%%%%%%%%%%%@. ",
-".@@@@@@@@@@@@@@@@@@@@#. ",
-".$%%%%%%%%%%%%%%%%%%%@. ",
-".$%%%%%%%%%%%%%%%%%%%@. ",
-".$%%%%%%%%%%%%%%%%%%%@. ",
-".+@@@@@@@@@@@@@@@@@@@#. ",
-"....................... ",
-" "};
diff --git a/art/mail-accounts-settings.png b/art/mail-accounts-settings.png
deleted file mode 100644
index 565b1b300a..0000000000
--- a/art/mail-accounts-settings.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-need-reply.xpm b/art/mail-need-reply.xpm
deleted file mode 100644
index 283ef3d83f..0000000000
--- a/art/mail-need-reply.xpm
+++ /dev/null
@@ -1,101 +0,0 @@
-/* XPM */
-static char * mail_need_reply_xpm[] = {
-"16 16 82 1",
-" c None",
-". c #2A2A2A",
-"+ c #AAAAAA",
-"@ c #A2A2A2",
-"# c #949494",
-"$ c #E4E4E4",
-"% c #F6F6F6",
-"& c #F7F7F7",
-"* c #F8F8F8",
-"= c #E5E5E5",
-"- c #898989",
-"; c #7A7A7A",
-"> c #DADADA",
-", c #F5F5F5",
-"' c #818181",
-") c #B1B1B1",
-"! c #858585",
-"~ c #EDEDED",
-"{ c #8E8E8E",
-"] c #E1E1E1",
-"^ c #E2E2E2",
-"/ c #7F7F7F",
-"( c #B7B7B7",
-"_ c #E0E0E0",
-": c #BEBEBE",
-"< c #737373",
-"[ c #848484",
-"} c #E8E8E8",
-"| c #DBDBDB",
-"1 c #363636",
-"2 c #9C9C9C",
-"3 c #C9C9C9",
-"4 c #919191",
-"5 c #B4B4B4",
-"6 c #AFAFAF",
-"7 c #C3C3C3",
-"8 c #6F635C",
-"9 c #372B24",
-"0 c #EBEBEB",
-"a c #F1F1F1",
-"b c #D7D7D7",
-"c c #C7C7C7",
-"d c #E9E9E9",
-"e c #F3F3F3",
-"f c #BDBDBD",
-"g c #CDCDCD",
-"h c #372E28",
-"i c #F6B893",
-"j c #88634D",
-"k c #534339",
-"l c #2C211A",
-"m c #8F8F8F",
-"n c #A8A8A8",
-"o c #6F6F6F",
-"p c #473B34",
-"q c #DBA585",
-"r c #F4A677",
-"s c #F5AD82",
-"t c #F5B189",
-"u c #72503C",
-"v c #3F3F3F",
-"w c #1C1C1C",
-"x c #2B1E15",
-"y c #DC976F",
-"z c #DA8A5B",
-"A c #583725",
-"B c #984816",
-"C c #A75223",
-"D c #43210E",
-"E c #261102",
-"F c #853F12",
-"G c #A55123",
-"H c #9C4C20",
-"I c #984B20",
-"J c #42200E",
-"K c #853E12",
-"L c #4A240E",
-"M c #291408",
-"N c #160A04",
-"O c #200E01",
-"P c #180B01",
-"Q c #000000",
-" ",
-" .++++++++++. ",
-" @#$%&**%&=-; ",
-" +>#,,,,,,')! ",
-" +*~{],,^/(_! ",
-" +*,:<,,;[]}! ",
-" +|1234-567}! ",
-" +890abcdefg! ",
-" hijkklmbbbno ",
-" pqrsttu.vvvvw ",
-" xyzzzzzA ",
-" xBCCCCCD ",
-" EFGHIIJ ",
-" EKLMMN ",
-" OP ",
-" Q "};
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/mail.png b/art/mail.png
deleted file mode 100644
index bfe4bad56c..0000000000
--- a/art/mail.png
+++ /dev/null
Binary files differ
diff --git a/art/malehead.png b/art/malehead.png
deleted file mode 100644
index 2b1328b4e2..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-16.png b/art/meeting-request-16.png
deleted file mode 100644
index 9874eca084..0000000000
--- a/art/meeting-request-16.png
+++ /dev/null
Binary files differ
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/monkey-16.png b/art/monkey-16.png
deleted file mode 100644
index 02fb7b6eb5..0000000000
--- a/art/monkey-16.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_all_day_event.png b/art/new_all_day_event.png
deleted file mode 100644
index ee15651725..0000000000
--- a/art/new_all_day_event.png
+++ /dev/null
Binary files differ
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 b040c1f2f2..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/outbox-mini.png b/art/outbox-mini.png
deleted file mode 100644
index e52e00a7f3..0000000000
--- a/art/outbox-mini.png
+++ /dev/null
Binary files differ
diff --git a/art/outbox.png b/art/outbox.png
deleted file mode 100644
index 3567691c1f..0000000000
--- a/art/outbox.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/post-message-16.png b/art/post-message-16.png
deleted file mode 100644
index fbdaa4b2e5..0000000000
--- a/art/post-message-16.png
+++ /dev/null
Binary files differ
diff --git a/art/post-reply-24.png b/art/post-reply-24.png
deleted file mode 100644
index 43b0a229ba..0000000000
--- a/art/post-reply-24.png
+++ /dev/null
Binary files differ
diff --git a/art/previous-message.png b/art/previous-message.png
deleted file mode 100644
index 2163fcbe2a..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/public-folder-mini.png b/art/public-folder-mini.png
deleted file mode 100644
index 087eca4a85..0000000000
--- a/art/public-folder-mini.png
+++ /dev/null
Binary files differ
diff --git a/art/public-folder.png b/art/public-folder.png
deleted file mode 100644
index b23d9f805f..0000000000
--- a/art/public-folder.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 a09bf6a596..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 1a3ccc1740..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 137beb9e90..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 681801c7d7..0000000000
--- a/art/reply.xpm
+++ /dev/null
@@ -1,46 +0,0 @@
-/* XPM */
-static char * 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 be5c633f2a..0000000000
--- a/art/reply_to_all.xpm
+++ /dev/null
@@ -1,52 +0,0 @@
-/* XPM */
-static char * 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/schedule-meeting-16.png b/art/schedule-meeting-16.png
deleted file mode 100644
index 7081e2fead..0000000000
--- a/art/schedule-meeting-16.png
+++ /dev/null
Binary files differ
diff --git a/art/schedule-meeting-16.xpm b/art/schedule-meeting-16.xpm
deleted file mode 100644
index 7cc7911439..0000000000
--- a/art/schedule-meeting-16.xpm
+++ /dev/null
@@ -1,178 +0,0 @@
-/* XPM */
-static char * schedule_meeting_16_xpm[] = {
-"16 16 159 2",
-" c None",
-". c #000000",
-"+ c #8A8575",
-"@ c #EEDEA6",
-"# c #F0DD96",
-"$ c #EFDB95",
-"% c #AFA06B",
-"& c #655C38",
-"* c #0B0B0B",
-"= c #A49D83",
-"- c #F1DD97",
-"; c #F2E5B3",
-"> c #F3E9C1",
-", c #EBDEB0",
-"' c #B4A981",
-") c #C6C6C6",
-"! c #535353",
-"~ c #131313",
-"{ c #EFDE9F",
-"] c #F1E1AA",
-"^ c #F8F3D9",
-"/ c #FBF3D5",
-"( c #EAE1BE",
-"_ c #948D73",
-": c #161615",
-"< c #4D4D4D",
-"[ c #B7B7B7",
-"} c #655D53",
-"| c #56493A",
-"1 c #564838",
-"2 c #514433",
-"3 c #D9C993",
-"4 c #F8F1CF",
-"5 c #FDF7DB",
-"6 c #FAF3D3",
-"7 c #E6DCB9",
-"8 c #867F66",
-"9 c #2D2C2A",
-"0 c #978774",
-"a c #D5B792",
-"b c #D2B38D",
-"c c #C7A882",
-"d c #B39672",
-"e c #2B2824",
-"f c #EEE7CF",
-"g c #F4EBC9",
-"h c #FEF6D5",
-"i c #FBF2CD",
-"j c #E7DCB5",
-"k c #857D63",
-"l c #5A544D",
-"m c #B89F80",
-"n c #D8BA94",
-"o c #CAAB84",
-"p c #C2A27B",
-"q c #54493C",
-"r c #C5B887",
-"s c #E9E0BF",
-"t c #FAEFC8",
-"u c #FAEDC0",
-"v c #E5D8A9",
-"w c #887F5F",
-"x c #686158",
-"y c #BFA482",
-"z c #D2B38E",
-"A c #CEAF89",
-"B c #C7A781",
-"C c #C2A17A",
-"D c #726555",
-"E c #B6A977",
-"F c #CAC4AD",
-"G c #B0A47F",
-"H c #AEA277",
-"I c #4B473C",
-"J c #8F8A82",
-"K c #BDA382",
-"L c #CCAD87",
-"M c #C9A983",
-"N c #C4A47D",
-"O c #BE9E77",
-"P c #6E6A64",
-"Q c #495946",
-"R c #3D5146",
-"S c #32483E",
-"T c #0F0F05",
-"U c #77736D",
-"V c #988A79",
-"W c #C9AA86",
-"X c #B29573",
-"Y c #856F55",
-"Z c #69726C",
-"` c #A4D3C5",
-" . c #8DCDBA",
-".. c #7BBDA9",
-"+. c #376052",
-"@. c #15241E",
-"#. c #443C31",
-"$. c #403528",
-"%. c #3C3329",
-"&. c #5A6A63",
-"*. c #85C9B7",
-"=. c #75C1AB",
-"-. c #6AB89F",
-";. c #5FAE93",
-">. c #468A73",
-",. c #173128",
-"'. c #303030",
-"). c #9A9A9A",
-"!. c #C5D2DE",
-"~. c #B7C9DA",
-"{. c #667685",
-"]. c #23292F",
-"^. c #7A998C",
-"/. c #72B7A2",
-"(. c #7EBBA7",
-"_. c #5DB093",
-":. c #53A688",
-"<. c #3A7D65",
-"[. c #2E2E2E",
-"}. c #959799",
-"|. c #B7C9DB",
-"1. c #90ABC5",
-"2. c #89A5BF",
-"3. c #809DB7",
-"4. c #758FA7",
-"5. c #171E24",
-"6. c #749786",
-"7. c #549F85",
-"8. c #85B5A4",
-"9. c #4DA584",
-"0. c #449B7A",
-"a. c #2F745A",
-"b. c #BFCFDD",
-"c. c #7F96AB",
-"d. c #85A0BA",
-"e. c #7B97B1",
-"f. c #728FA9",
-"g. c #69849D",
-"h. c #404E5C",
-"i. c #6B927E",
-"j. c #49967A",
-"k. c #7EB09D",
-"l. c #409A78",
-"m. c #38916F",
-"n. c #277153",
-"o. c #ACBFD0",
-"p. c #687F95",
-"q. c #92A9BD",
-"r. c #6F8BA5",
-"s. c #66839D",
-"t. c #577188",
-"u. c #596774",
-"v. c #A1B5C6",
-"w. c #4F6376",
-"x. c #8FA4B7",
-"y. c #607D97",
-"z. c #57758F",
-"A. c #49657D",
-"B. c #5A6773",
-" . . . . . . ",
-" . + @ # $ % & . * . . . . ",
-". = - ; > , ' . ) ! ~ . . . . ",
-". { ] ^ / ( _ : < [ } | 1 2 . . ",
-". 3 4 5 6 7 8 . 9 0 a b c d e . ",
-". f g h i j k . l m n b 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 p X Y . . ",
-" . Z ` ...+.@.. . #.$.%.. ",
-". &.*.=.-.;.>.,.'.).!.~.{.].. ",
-". ^./.(._.:.<.[.}.|.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.. ",
-" . . . . . . . . . "};
diff --git a/art/schedule-meeting-24.png b/art/schedule-meeting-24.png
deleted file mode 100644
index 237bac1f96..0000000000
--- a/art/schedule-meeting-24.png
+++ /dev/null
Binary files differ
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 1ade9e9b98..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 a6e4354ddf..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 bc5800ca62..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 27ad312dee..0000000000
--- a/art/send-receive.xpm
+++ /dev/null
@@ -1,56 +0,0 @@
-/* XPM */
-static char * send_receive_xpm[] = {
-"16 16 37 1",
-" c None",
-". c #000000",
-"+ c #F8D4CD",
-"@ c #F8D6CF",
-"# c #ED9280",
-"$ c #B33118",
-"% c #F7CEC6",
-"& c #C1351A",
-"* c #A92F16",
-"= c #DD3D1E",
-"- c #E86F57",
-"; c #EC8A77",
-"> c #A12D16",
-", c #852512",
-"' c #F3B3A6",
-") c #F3B8AC",
-"! c #F5C4BA",
-"~ c #D2DCE5",
-"{ c #ABBECE",
-"] c #547693",
-"^ c #E66349",
-"/ c #CFDAE4",
-"( c #A2B7C9",
-"_ c #425D73",
-": c #CCD7E1",
-"< c #C9D5E0",
-"[ c #D5DEE6",
-"} c #A9BDCE",
-"| c #B1C3D2",
-"1 c #9BB2C6",
-"2 c #4D6C86",
-"3 c #577A98",
-"4 c #4F6F8A",
-"5 c #456178",
-"6 c #DBE3EA",
-"7 c #496780",
-"8 c #DAE2E9",
-" . ",
-" .+. ",
-" .@#$. ",
-" .%##&*. ",
-".%=-;>,,. ",
-"...'#>... ",
-" .)#>. ..... ",
-" .!#>. .~{]. ",
-" .#^>. ./(_. ",
-" ..... .:(_. ",
-" ...<(_...",
-" .[}|1232.",
-" .[((45. ",
-" .6(7. ",
-" .8. ",
-" . "};
diff --git a/art/send.png b/art/send.png
deleted file mode 100644
index bc5800ca62..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/settings-16.png b/art/settings-16.png
deleted file mode 100644
index b391a0e839..0000000000
--- a/art/settings-16.png
+++ /dev/null
Binary files differ
diff --git a/art/settings.png b/art/settings.png
deleted file mode 100644
index f3e8bfd4fc..0000000000
--- a/art/settings.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 13dabfd980..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 440f86d8c1..0000000000
--- a/art/splash.png
+++ /dev/null
Binary files differ
diff --git a/art/stock-edit-16.png b/art/stock-edit-16.png
deleted file mode 100644
index 7c7d597da5..0000000000
--- a/art/stock-edit-16.png
+++ /dev/null
Binary files differ
diff --git a/art/stock-edit-24.png b/art/stock-edit-24.png
deleted file mode 100644
index f6b49be992..0000000000
--- a/art/stock-edit-24.png
+++ /dev/null
Binary files differ
diff --git a/art/stock-junk-24.png b/art/stock-junk-24.png
deleted file mode 100644
index 52364ab279..0000000000
--- a/art/stock-junk-24.png
+++ /dev/null
Binary files differ
diff --git a/art/stock-notjunk-24.png b/art/stock-notjunk-24.png
deleted file mode 100644
index a74fecbd66..0000000000
--- a/art/stock-notjunk-24.png
+++ /dev/null
Binary files differ
diff --git a/art/summary-settings.png b/art/summary-settings.png
deleted file mode 100644
index 011d94ac0a..0000000000
--- a/art/summary-settings.png
+++ /dev/null
Binary files differ
diff --git a/art/summary_preferences-16.png b/art/summary_preferences-16.png
deleted file mode 100644
index 4a318c2fd1..0000000000
--- a/art/summary_preferences-16.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/working-16.png b/art/working-16.png
deleted file mode 100644
index 5f12053a84..0000000000
--- a/art/working-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 8d96b80beb..0000000000
--- a/autogen.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-# Run this to generate all the initial makefiles, etc.
-
-#!/bin/sh
-# Run this to generate all the initial makefiles, etc.
-
-srcdir=`dirname $0`
-test -z "$srcdir" && srcdir=.
-
-PKG_NAME="Evolution"
-
-(test -f $srcdir/configure.in \
- && test -f $srcdir/ChangeLog \
- && test -d $srcdir/shell) || {
- echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
- echo " top-level $PKG_NAME directory"
- exit 1
-}
-
-which gnome-autogen.sh || {
- echo "You need to install gnome-common from the GNOME CVS"
- exit 1
-}
-USE_GNOME2_MACROS=1 . gnome-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 8ad6de67ba..0000000000
--- a/calendar/ChangeLog
+++ /dev/null
@@ -1,4785 +0,0 @@
-2003-12-08 Bolian Yin <bolian.yin@sun.com>
-
- * gui/e-day-view.c (e_day_view_on_editing_started): remove setting property of "handle_popup".
- * gui/e-week-view.c (e_week_view_on_editing_started): remove setting property of "handle_popup".
-
-2003-12-08 Carl Sun <carl.sun@sun.com>
-
- Fixes #46351
-
- * gui/e-timezone-entry.c (e_timezone_entry_mnemonic_activate):
- new function. override the member function of GtkWidget to handle
- nemonic_activate signal of custom class ETimezoneEntry.
-
-
-2003-12-08 Bolian Yin <bolian.yin@sun.com>
-
- * gui/gnome-cal.c (gnome_calendar_class_init): correct argument mismatch in "goto_date" signal definition.
-
-2003-12-05 Yong Sun <Yong.Sun@Sun.com>
-
- Fix for #51337
-
- * gui/dialogs/alarm-page.c
- Change raw string "Action/Trigger" to _("Action/Trigger")
- * gui/dialogs/recurrence-page.c
- Change raw string "Date/Time" to _("Date/Time")
-
-2003-12-04 Harry Lu <harry.lu@sun.com>
-
- Fix for bugzilla bug #51627.
-
- * gui/goto.c: (create_ecal): set calitem's move_selection_when_moving
- to FALSE so that changing month and year won't send out
- a "selection_changed" signal.
-
-2003-12-03 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/tasks-control.c (tasks_control_activate): Do not call
- control_util_set_folder_bar_label().
-
- * gui/e-calendar-table.c (e_calendar_table_set_status_message):
- Use e_activity_handler_operation_progressing(), not
- evolution_activity_client_update().
-
- * gui/e-cal-view.c: Remove settings menu.
- (on_settings): Remove.
-
- * gui/calendar-commands.c (get_shell_view_interface): Remove.
- (control_util_set_folder_bar_label): Remove.
- (calendar_set_folder_bar_label): Remove.
- (control_util_show_settings): Remove.
- (gcal_calendar_dates_change_cb): Remove.
- (calendar_control_activate): Do not connect, do not call
- calendar_set_folder_bar_label().
-
-2003-12-03 JP Rosevear <jpr@ximian.com>
-
- * gui/gnome-cal.c (gnome_calendar_destroy): free the notification
- list
-
- * gui/tasks-component.c (impl_dispose): ditto
-
- * gui/calendar-component.c (impl_dispose): ditto
-
-2003-12-03 JP Rosevear <jpr@ximian.com>
-
- * gui/tasks-component.c (impl_dispose): free up the notifications
- and the ecal
- (config_create_ecal_changed_cb): clear the create_ecal if the
- primary selection changes
- (setup_create_ecal): find a default ecal to do creation with
- (impl_requestCreateItem): use above
-
-2003-12-03 JP Rosevear <jpr@ximian.com>
-
- * gui/tasks-component.c (rename_task_list_cb): cast the parent
- (impl_createControls): add notification for primary tasks
- (config_primary_selection_changed_cb): handle primary selection
- changing in gconf
-
- * gui/calendar-config-keys.h: fix config key for primary tasks
-
-2003-12-03 JP Rosevear <jpr@ximian.com>
-
- * gui/calendar-component.c (rename_calendar_cb): cast the parent
- (config_primary_selection_changed_cb): handle the primary
- selection changing elsewhere
- (impl_dispose): remove the list of notifications
- (impl_createControls): add primary calendar notification
- (config_create_ecal_changed_cb): clear create_ecal if the primary
- key changes
- (setup_create_ecal): find an ecal to use for creation
- (impl_requestCreateItem): use above
-
-2003-12-03 Ettore Perazzoli <ettore@ximian.com>
-
- * importers/icalendar-importer.c: Do not #include shell stuff.
-
- * gui/main.c: Do not #include <evolution-shell-client.h>.
-
- * gui/e-itip-control.c: Do not #include
- <e-folder-selector-button.h> nor <evolution-shell-client.h>.
- (start_default_server): Return FALSE.
- (default_server_started_cb): Do not connect the "selected" signal
- on the button since it's now NULL.
- (button_selected_cb): #if 0 out.
-
- * gui/e-cal-list-view.h: Do not #include
- "evolution-activity-client.h".
-
- * gui/tasks-component.c (impl_createControls): Give an empty label
- for the status bar.
-
- * gui/e-day-view.h: Remove all deps on evolution-activity-client.
-
-2003-12-02 Rodney Dawes <dobey@ximian.com>
-
- * gui/Makefile.am: Version the schemas
- * gui/apps_evolution_calendar.schemas: Removed
- * gui/apps_evolution_calendar.schemas.in.in: Added
-
-2003-12-02 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/dialogs/copy-source-dialog.c (copy_source_dialog): added
- a label to the dialog to make it look less ugly.
-
-2003-12-02 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/dialogs/copy-source-dialog.c: converted to use an
- ESourceOptionMenu instead of the ESourceSelector.
- (primary_selection_changed_cb): removed.
- (copy_source_dialog): create the ESourceOptionMenu here.
- (source_selected_cb): callback for the "source_selected"
- signal on the ESourceOptionMenu widget.
-
-2003-12-02 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/e-calendar-table.h (struct _ECalendarTable): Replace member
- "activity" with an "activity_id".
-
- * gui/e-cal-view.c (struct _ECalendarViewPrivate): Replace member
- "activity" with "activity_id".
- (e_calendar_view_destroy): Don't unref activity here anymore.
- (e_calendar_view_set_status_message): Report progress using the
- EActivityHandler off the CalendarComponent.
-
- * gui/calendar-component.c
- (struct _CalendarComponentPrivate): New member activity_handler.
- (calendar_component_init): Init.
- (calendar_component_peek_activity_handler): New.
- (impl_dispose): Unref.
- (impl_createControls): Return an ETaskBar for the statusbar
- control.
-
-2003-12-01 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/calendar-component.c (impl_createControls): Pass a label for
- the status bar control for now.
-
- * gui/tasks-component.c (impl_createControls): Pass a label for
- the status bar control for now.
-
-2003-12-01 Rodney Dawes <dobey@ximian.com>
-
- * gui/GNOME_Evolution_Calendar.server.in.in:
- * gui/calendar-commands.c:
- * gui/e-meeting-list-view.c:
- * gui/e-meeting-model.c:
- * gui/e-select-names-editable.c:
- * gui/itip-bonobo-control.c:
- * gui/itip-utils.c:
- * gui/main.c:
- * gui/alarm-notify/GNOME_Evolution_Calendar_AlarmNotify.server.in.in:
- * gui/alarm-notify/alarm-queue.c:
- * gui/alarm-notify/notify-main.c:
- * gui/dialogs/alarm-options.c:
- * gui/dialogs/e-delegate-dialog.c:
- * importers/GNOME_Evolution_Calendar_Importer.server.in.in:
- * importers/main.c: Use BASE_VERSION for repo_ids and OAFIIDs
-
-2003-12-01 JP Rosevear <jpr@ximian.com>
-
- * conduits/todo/Makefile.am: put the conduits in their own dir
-
- * conduits/calendar/Makefile.am: ditto
-
- * conduits/todo/e-todo.conduit.in: subst in correct thing
-
- * conduits/calendar/e-calendar.conduit.in: ditto
-
-2003-12-01 JP Rosevear <jpr@ximian.com>
-
- * conduits/todo/Makefile.am: install to privlibdir
-
- * conduits/calendar/Makefile.am: ditto
-
- * conduits/todo/e-todo.conduit.in: subst in correct thing
-
- * conduits/calendar/e-calendar.conduit.in: subst in correct thing
-
-2003-12-01 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/alarm-notify/alarm-notify.c (add_uri_to_load, remove_uri_to_load):
- removed unneeded functions.
- (alarm_notify_add_calendar, alarm_notify_remove_calendar): no need
- anymore to add/remove URIs to load on startup to the configuration.
-
-2003-12-01 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/alarm-notify/save.c (save_calendars_to_load): removed this
- function, since we now use the ESourceList to know what calendars
- to load.
- (get_calendars_to_load): moved to config-data.c.
- (save_notification_time, get_saved_notification_time,
- save_blessed_program, is_blessed_program): use the
- shared GConfClient.
-
- * gui/alarm-notify/config-data.[ch]: use a GConfClient instead of a
- EConfigListener.
- (config_data_get_conf_client): renamed from _get_listener.
- (config_data_get_timezone, config_data_get_24_hour_format): changed
- to use the GConfClient.
- (config_data_get_calendars_to_load): new function.
- (ensure_inited): create the source lists for calendar and tasks here.
- (do_cleanup): cleanup the source lists here.
-
- * gui/alarm-notify/notify-main.c (load_calendars): use
- config_data_get_calendars_to_load().
-
-2003-11-28 JP Rosevear <jpr@ximian.com>
-
- * gui/e-tasks.c (e_tasks_delete_completed): we want to skip if it
- *is* read only
-
-2003-11-28 JP Rosevear <jpr@ximian.com>
-
- * gui/e-meeting-store.c (e_meeting_store_get_type): allocate the
- type information correctly
-
-2003-11-26 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/calendar-offline-handler.c (backend_go_offline): e_cal_new () ->
- e_cal_new_from_uri ().
- (backend_go_online): Ditto.
- (calendar_offline_handler_init): Ditto.
-
- * gui/comp-editor-factory.c (open_client): Ditto.
-
- * gui/e-itip-control.c (start_calendar_server): Ditto.
- (object_requested_cb): Ditto.
-
- * gui/e-tasks.c (e_tasks_add_todo_uri): Ditto.
-
- * gui/gnome-cal.c (gnome_calendar_construct): Ditto.
- (gnome_calendar_add_event_uri): Ditto.
-
- * gui/alarm-notify/alarm-notify.c (alarm_notify_add_calendar): Ditto.
-
- * importers/icalendar-importer.c (load_file_fn): Ditto.
- (vcal_load_file_fn): Ditto.
- (gnome_calendar_import_data_fn): Ditto.
-
- * gui/dialogs/copy-source-dialog.c (copy_source): Pass sources to
- e_cal_new ().
-
-2003-11-24 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/dialogs/copy-source-dialog.c (copy_source): use the correct
- icalcomponent when calling e_cal_create_object.
-
- * gui/tasks-control.c (sensitize_commands): no need to have a
- selection for Paste to work.
-
- * gui/e-calendar-table.c (e_calendar_table_show_popup_menu): disable
- editing items if the selected task list is read only, not if it's not.
-
-2003-11-24 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/dialogs/new-task-list.glade:
- * gui/dialogs/new-task-list.[ch]: new files containing the
- implementation of the 'New Task List' dialog.
-
- * gui/dialogs/Makefile.am: added new files.
-
- * gui/dialogs/new-calendar.c (new_calendar_dialog): use G_STRLOC
- for g_warning messages.
-
- * gui/tasks-component.c (new_task_list_cb): implemented.
-
-2003-11-24 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/dialogs/copy-source-dialog.c (copy_source_dialog): actually
- add the source selector to the dialog's box.
-
-2003-11-23 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/tasks-component.c:
- * gui/dialogs/copy-source-dialog.[ch]: fixed compilation errors.
-
- * gui/dialogs/Makefile.am: added missing header directories.
-
-2003-11-23 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/dialogs/new-calendar.[ch]: fixed copyright notices.
-
- * gui/dialogs/copy-source-dialog.[ch]: implementation of the
- Copy command for sources.
-
- * gui/dialogs/Makefile.am: added new files.
-
- * gui/calendar-component.c (fill_popup_menu_cb, copy_calendar_cb):
- added Copy command.
-
- * gui/tasks-component.c (fill_popup_menu_cb, copy_task_list_cb):
- added Copy command.
-
-2003-11-23 Ross Burton <ross@burtonini.com>
-
- * gui/alarm-notify/GNOME_Evolution_Calendar_AlarmNotify.server.in.in:
- Append "_2" to the OAFIID to avoid conflicting with Evo 1.4.
-
- * gui/main.c:
- * gui/alarm-notify/notify-main.c:
- Updated with new OAFIID.
-
-2003-11-20 JP Rosevear <jpr@ximian.com>
-
- * Remove a bunch of gal includes that are no longer needed
-
-2003-11-19 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #43556
-
- * gui/e-cal-view.c (selection_get, selection_clear_event,
- selection_received): removed this unneeded functions.
- (e_calendar_view_init): don't create a GtkInvisible anymore.
- (e_calendar_view_destroy): no need to destroy the GtkInvisible.
- (e_cal_view_copy_clipboard, e_cal_view_paste_clipboard):
- use GtkClipboard.
-
-2003-11-19 JP Rosevear <jpr@ximian.com>
-
- * gui/e-cal-model-tasks.c (get_due): make sure timezone value is
- sane
- (get_completed): ditto
-
- * gui/e-cal-model.c (get_dtstart): add more guards
-
- * gui/e-cal-model-calendar.c (get_dtend): ditto
-
-2003-11-19 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #51052
-
- * importers/icalendar-importer.c (prepare_events, prepare_tasks):
- call icalcompiter_next to move the pointer to the next before
- removing a component avoid breaking the link.
-
-2003-11-18 JP Rosevear <jpr@ximian.com>
-
- * gui/e-cal-model.c (get_dtstart): make sure the timezone value is
- sane
-
- * gui/e-cal-model-calendar.c (get_dtend): ditto
-
-2003-11-18 JP Rosevear <jpr@ximian.com>
-
- * gui/calendar-config.h: add protos
-
- * gui/calendar-config.c (calendar_config_get_primary_calendar):
- get the primary calendar
- (calendar_config_set_primary_calendar): set it
- (calendar_config_add_notification_primary_calendar): set
- notifications for it
- (calendar_config_get_primary_tasks): get the primary task list
- (calendar_config_set_primary_tasks): set it
- (calendar_config_add_notification_primary_tasks): set
- notifications for it
-
- * gui/calendar-config-keys.h: add primary keys
-
- * gui/calendar-component.c (find_first_source): find any source
- (update_uri_for_primary_selection): set the default uri and save
- the source uid
- (update_primary_selection): set the primary selection
- (primary_source_selection_changed_cb): use above
- (impl_createControls): set the primary selection
-
- * gui/tasks-component.c: as above
-
-2003-11-18 JP Rosevear <jpr@ximian.com>
-
- * gui/Makefile.am: remove db3 include
-
-2003-11-18 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/calendar-commands.c
- (calendar_control_sensitize_calendar_commands,
- sensitize_taskpad_commands): removed the 'New...' menu items
- from the UI, it's now implemented in the shell.
- (file_new_appointment_cb, file_new_event_cb, file_new_meeting_cb,
- file_new_task_cb): removed.
-
-2003-11-18 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/calendar-component.c (add_popup_menu_item): added 'sensitive'
- argument.
- (fill_popup_menu_cb): disable/enable menu items depending on whether
- there is a selection or not.
-
- * gui/tasks-component.c (add_popup_menu_item, fill_popup_menu_cb):
- ditto.
-
-2003-11-17 JP Rosevear <jpr@ximian.com>
-
- * Cleanup some ref/unref calls
-
-2003-11-17 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/calendar-component.c (delete_calendar_cb, rename_calendar_cb):
- * gui/tasks-component.c (delete_task_list_cb, rename_task_list_cb):
- peek the primary selection.
-
-2003-11-17 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/tasks-component.c (fill_popup_menu_cb): added 'Delete' and
- 'Rename' menu items.
- (delete_task_list_cb, rename_task_list_cb): callbacks for new
- menu items.
-
-2003-11-17 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/calendar-component.c (add_popup_menu_item): try first to
- create the icon from the stock, and then from a file.
- (fill_popup_menu_cb): set callback for 'Rename' menu item.
- (rename_calendar_cb): callback for 'Rename' menu item.
- (new_calendar_cb): fixed arguments.
-
- * gui/tasks-component.c (impl_createControls): connect to
- "fill_popup_menu" signal on the source selector.
- (fill_popup_menu_cb): callback to create our menu items.
-
-2003-11-17 Rodrigo Moya <rodrigo@ximian.com>
-
- * idl/evolution-calendar.idl: remove the AlarmNotify service, no
- more need for it, since the alarm daemon will listen for changes
- on the GConf key.
-
- * gui/gnome-cal.c (add_alarms): removed function to talk to the
- alarm daemon.
- (client_cal_opened_cb): don't call add_alarms().
-
- * gui/alarm-notify/alarm-notify.[ch]: made it a basic GObject.
- (AlarmNotify_addCalendar, AlarmNotify_removeCalendar): removed
- AlarmNotify interface implementation.
- (alarm_notify_class_init): no epv to initialize.
- (alarm_notify_remove_calendar): new function, copied from the
- CORBA method implementation.
- (alarm_notify_factory_fn): return NULL, since there is no objects
- that can be created via this factory now.
-
- * gui/alarm-notify/notify-main.c (main): now the factory is the alarm
- notification service itself.
- (load_calendars): no need to use exceptions here.
-
- * gui/alarm-notify/GNOME_Evolution_Calendar_AlarmNotify.server.in.in:
- now the factory is the alarm notification service itself.
-
- * gui/main.c (launch_alarm_daemon_cb): dont use the AlarmNotify CORBA
- types.
-
-2003-11-17 Harry Lu <harry.lu@sun.com>
-
- * gui/dialogs/recurrence-page.c (make_ending_count_special):
- Make ending count of occurrences of Recurrence tab numeric only.
-
-2003-11-16 JP Rosevear <jpr@ximian.com>
-
- * gui/tasks-control.c (tasks_control_set_property): add a uri
-
- * gui/e-tasks.c: kill e_tasks_open
-
- * gui/e-tasks.h: remove proto
-
-2003-11-16 JP Rosevear <jpr@ximian.com>
-
- * gui/e-cal-model.c (e_cal_view_objects_added_cb): emit the added
- signal for the correct rows
-
-2003-11-16 JP Rosevear <jpr@ximian.com>
-
- * gui/tasks-component.c (is_in_uids): copy in here
- (update_uris_for_selection): save the selection
- (update_selection): update the selection when its changed
- somewhere else
- (config_selection_changed_cb): update the selection if the
- configuration changes
- (impl_createControls): store the source selector
-
- * gui/calendar-config.h: add protos
-
- * gui/calendar-config.c (calendar_config_get_tasks_selected): get
- the list of task lists selected
- (calendar_config_set_tasks_selected): save it
- (calendar_config_add_notification_tasks_selected): get notified
- about it
-
-2003-11-16 JP Rosevear <jpr@ximian.com>
-
- * gui/tasks-component.c (add_uri_for_source): add it via e-tasks
- (remove_uri_for_source): remove it via e-tasks
- (get_default_task): provide a default for editing
- (impl_createControls): create the control directly
- (impl_requestCreateItem): implement
-
- * gui/gnome-cal.c (gnome_calendar_purge): don't let the two list
- iterators clobber each other
-
- * gui/e-tasks.h: add protos
-
- * gui/e-tasks.c (e_tasks_destroy): free the client list and the
- hash, disconnect signals
- (e_tasks_new_task): use the default client
- (e_tasks_add_todo_uri): add a uri
- (e_tasks_remove_todo_uri): remove a uri
- (e_tasks_set_default_uri): set default uri
- (e_tasks_get_default_client): get default client
- (e_tasks_delete_completed): expunge from all clients
- (e_tasks_setup_view_menus): use default client uri
-
- * gui/e-tasks.c (set_timezone): set the timezone for all clients
- (e_tasks_init): set up the clients has table
-
- * gui/e-calendar-table.etspec: yank some useless display columns
-
- * gui/e-cal-model.c (remove_client): remove objects in reverse
- order so we don't clobber ourselves
-
- * gui/calendar-component.c: add FIXME
-
-2003-11-16 JP Rosevear <jpr@ximian.com>
-
- * gui/calendar-component.c (get_default_event): set up a event to
- be edited
- (impl_requestCreateItem): implement
-
-2003-11-14 JP Rosevear <jpr@ximian.com>
-
- * gui/*.[hc]: include e-source* from e-d-s
-
-2003-11-14 JP Rosevear <jpr@ximian.com>
-
- * gui/calendar-config.c (calendar_config_get_calendars_selected):
- config accessor
- (calendar_config_set_calendars_selected): ditto
- (calendar_config_add_notification_calendars_selected): config
- notification
-
- * gui/calendar-config.h: add protos
-
- * gui/calendar-config-keys.h: add new key
-
- * gui/calendar-component.c (is_in_uids): util function
- (update_uris_for_selection): save the selection in the
- configuration
- (update_selection): update the selection from the config info
- (source_selection_changed_cb): only pass one param
- (config_selection_changed_cb): listen for config changes
- (impl_dispose): remove config notification
- (impl_createControls): use bonobo_exception_set; add a config
- notification
-
-2003-11-13 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/tasks-component.c (impl__get_userCreatableItems): New.
- (impl_requestCreateItem): New.
- (tasks_component_class_init): Install.
-
- * gui/calendar-component.c (impl__get_userCreatableItems): New.
- (impl_requestCreateItem): New, for now just a stub.
- (calendar_component_class_init): Install into the EPV.
-
-2003-11-13 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/GNOME_Evolution_Calendar.server.in.in: Add a component_alias
- of "calendar" for the calendar and "tasks" for the tasks.
-
-2003-11-12 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/calendar-component.c (add_popup_menu_item): Use non-deprecated
- gtk_menu_shell_append ().
-
-2003-11-11 Bolian Yin <bolian.yin@sun.com>
-
- Fixes #50808
-
- * gui/goto.c (goto_dialog): set initial selection to current day.
-
-2003-11-11 JP Rosevear <jpr@ximian.com>
-
- * gui/calendar-offline-handler.c (backend_cal_opened_offline): use
- a standard calendar status
- (backend_cal_opened_online): ditto
-
- * gui/alarm-notify/alarm-queue.c (cal_opened_cb): ditto
-
- * gui/gnome-cal.c (client_cal_opened_cb): ditto
-
- * gui/e-tasks.c (cal_opened_cb): ditto
-
- * gui/e-itip-control.c (default_server_started_cb): ditto
-
- * gui/e-cal-model.c (cal_opened_cb): ditto
-
- * gui/comp-editor-factory.c (cal_opened_cb): ditto
-
-2003-11-11 JP Rosevear <jpr@ximian.com>
-
- * conduits/todo/todo-conduit.c (start_calendar_server): load the
- calendar synchronously
-
- * conduits/calendar/calendar-conduit.c (start_calendar_server): ditto
-
-2003-11-10 JP Rosevear <jpr@ximian.com>
-
- * importers/icalendar-importer.c (update_single_object): return
- boolean not ECalStatus
- (update_objects): ditto
- (process_item_fn): handle above returns
-
-2003-11-10 JP Rosevear <jpr@ximian.com>
-
- * gui/e-cal-model-tasks.c (get_due_status): just check the boolean
-
-2003-11-10 JP Rosevear <jpr@ximian.com>
-
- * conduits/calendar/calendar-conduit.c
- (e_calendar_context_destroy): use proper change list free function
- name
- (post_sync): ditto
-
- * conduits/todo/todo-conduit.c: same
-
-2003-11-10 Dan Winship <danw@ximian.com>
-
- * gui/e-tasks.c (e_tasks_delete_completed): Remove get-vtype check
- from the completed-tasks query (and don't leak the sexp string).
-
- * gui/e-cal-model.c (update_e_cal_view_for_client): Don't adjust
- the sexp to use get-vtype.
-
- * gui/gnome-cal.c (adjust_e_cal_view_sexp, gnome_calendar_purge):
- Remove get-vtype check from queries
-
-2003-11-07 JP Rosevear <jpr@ximian.com>
-
- * gui/Makefile.am: remove includes for toplevel libical dir
-
- * gui/dialogs/Makefile.am: ditto
-
- * importers/Makefile.am: ditto
-
-2003-11-07 JP Rosevear <jpr@ximian.com>
-
- * In the gui this is a search and replace commit for moving the
- calendar to evolution-data-server; it also deletes the old backend
- files; e-cal-view was rename to e-calendar-view to remove name
- conflict
-
-2003-11-05 JP Rosevear <jpr@ximian.com>
-
- * gui/migration.c: fix typo
-
-2003-11-05 Larry Ewing <lewing@ximian.com>
-
- * gui/migration.c (process_old_dir): add a unimplemented warning
- so we at least avoid relocation errors.
-
-2003-11-04 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/calendar-component.c (fill_popup_menu_callback): added more
- menu items.
- (delete_calendar_cb): callbacks for new popup menu items.
- (impl_createControls): add the source selector widget to the
- CalendarComponentPrivate structure.
-
- * gui/migration.[ch] (migrate_old_tasks): new function to migrate
- old tasks setups.
- (process_old_dir): renamed and added a "filename" argument, so that
- the same function can be used for tasks and calendar directories.
- (migrate_old_calendars): added new argument when calling
- process_old_dir().
-
- * gui/tasks-component.c (tasks_component_init): call
- migrate_old_tasks() if there are no groups defined.
-
-2003-11-04 Bolian Yin <bolian.yin@sun.com>
-
- * gui/e-cal-view.c: add new signal "selected_time_changed"
- * gui/e-day-view-main-item.c (e_day_view_main_item_class_init):
- a11y initialization
- * gui/e-day-view-top-item (e_day_view_top_item_get_day_label):
- new public function.
- * gui/e-day-view.c (e_day_view_ensure_rows_visible,
- e_day_view_update_calendar_selection_time): make static functions public
- (e_day_view_cursor_key_up, e_day_view_cursor_key_down,
- e_day_view_cursor_key_left, e_day_view_cursor_key_right): emit
- "selected_time_changed".
-
-2003-11-03 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/e-meeting-model.c (SELECT_NAMES_OAFID): Append "_2".
- * gui/e-select-names-editable.c (SELECT_NAMES_OAFIID): Likewise.
- * gui/e-meeting-list-view.c (SELECT_NAMES_OAFID): Likewise.
- * gui/dialogs/alarm-options.c (SELECT_NAMES_OAFID): Likewise.
- * gui/dialogs/e-delegate-dialog.c (SELECT_NAMES_OAFID): Likewise
-
-2003-11-03 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/GNOME_Evolution_Calendar.server.in.in: use
- "evolution2:config_item" properties instead of
- "evolution:config_item" ones.
-
-2003-11-03 Harry Lu <harry.lu@sun.com>
-
- Fix for #50387.
-
- * importers/icalendar-importer.c (support_format_fn):
- Call icalcomponent_is_valid() to check whether the returned
- icalcomponent is valid.
-
-2003-10-31 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/calendar-component.c (calendar_component_init): Add the webcal
- source group.
-
- * gui/dialogs/new-calendar.c (print_uri_noproto): Implement.
- (group_is_remote): Implement.
- (create_new_source_with_group): Implement webcal case.
- (new_calendar_dialog): Get optional location from dialog.
-
- * gui/dialogs/new-calendar.glade: Add location entry.
-
- * pcs/Makefile.am: Build http backend.
-
- * pcs/cal-backend-http.[ch]: Add skeleton based on cal-backend-file.
-
-2003-10-31 Dan Winship <danw@ximian.com>
-
- * cal-util/cal-util.h: Add CAL_STATIC_CAPABILITY_NO_THISANDFUTURE
- and CAL_STATIC_CAPABILITY_NO_THISANDPRIOR
-
- * gui/dialogs/recur-comp.c (recur_component_dialog): Add a
- CalClient argument. Use cal_client_get_static_capability to decide
- whether or not to offer THISANDFUTURE and THISANDPRIOR options
-
- * gui/dialogs/comp-editor.c (prompt_to_save_changes, save_cmd,
- save_close_cmd): Pass a CalClient to recur_component_dialog.
-
- * gui/e-day-view.c (e_day_view_finish_long_event_resize,
- e_day_view_finish_resize, e_day_view_on_editing_stopped,
- e_day_view_on_top_canvas_drag_data_received,
- e_day_view_on_main_canvas_drag_data_received): Likewise
-
- * gui/e-week-view.c (e_week_view_on_editing_stopped): Likewise
-
- * gui/calendar-component.c (impl_createControls): set an exception
- if we fail, so evo won't crash.
-
-2003-10-31 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-calendar-table.c (e_calendar_table_show_popup_menu): fixed
- mismatched condition in if/else statement.
-
-2003-10-30 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-tasks.[ch] (e_tasks_get_cal_client): removed.
-
- * gui/tasks-control.c (sensitize_commands): fixed to work correctly
- with the ECalView's model.
- (tasks_control_set_property): don't use e_tasks_get_cal_client.
-
- * gui/alarm-notify/alarm-notify.c (free_client_hash): new function
- to remove items from the CalClient's hash table.
- (alarm_notify_finalize): call free_client_hash() for each item
- in the hash table.
-
-2003-10-30 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/alarm-notify/notify-main.c (client_die_cb): use
- bonobo_main_quit, not gtk_main_quit.
-
- * gui/alarm-notify/alarm-queue.c (free_client_alarms_cb): callback
- for freeing ClientAlarms stored in the hash table.
- (alarm_queue_done): call free_client_alarms_cb() for each opened
- client.
-
-2003-10-30 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/cal-backend-file.c (mark_dirty, save_idle): removed, since
- we dont save the file anymore in idle callbacks.
- (cal_backend_file_dispose): removed all traces of the idle saving.
- (check_dup_uid, create_cal, cal_backend_file_add_timezone,
- cal_backend_file_create_object, cal_backend_file_modify_object,
- cal_backend_file_remove_object, cal_backend_file_receive_objects):
- call save() directly instead of mark_dirty().
-
-2003-10-30 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/cal-backend-file.c (cal_backend_file_modify_object):
- implemented THIS and ALL recurrences cases, blowing away or detaching
- recurrences from the main component as required.
- (get_rid_string): make it return const.
- (get_rid_timetype): new convenience function for getting
- libical's recurrence ID from a CalComponent.
- (cal_backend_file_is_read_only, remove_recurrence_cb,
- remove_component): fixed warnings.
- (remove_object_instance_cb): callback to remove the instances
- from the hash on the THISANDPRIOR and THISANDFUTURE cases.
- (cal_backend_file_remove_object): replaced mismatched if/else
- statement with proper management of each of the recurrence cases.
-
-2003-10-29 JP Rosevear <jpr@ximian.com>
-
- * gui/Makefile.am: build new files
-
- * gui/dialogs/comp-editor-util.c (date_edit_destroy_cb): unref the
- config manager
- (comp_editor_new_date_edit): set up a config manager for the date
- editor
-
- * gui/e-date-edit-config.[hc]: config manager for e-date-edit
-
-2003-10-29 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/cal-prefs-dialog.c (update_config): no need to
- update config settings everywhere explicitly
-
- * gui/tasks-component.c (update_uris_for_selection): cast the
- widget
-
- * gui/gnome-cal.h: remove proto
-
- * gui/gnome-cal.c (setup_widgets): don't update config settings
- explicitly
- (gnome_calendar_update_config_settings): kill
-
- * gui/e-week-view.c: remove null chars
-
- * gui/e-tasks.h: remove proto
-
- * gui/e-tasks.c (set_timezone): set the timezone on the client
- (timezone_changed_cb): changed timezone callback
- (setup_config): setup config stuff
- (e_tasks_init): setup config and widgets here
- (e_tasks_new): construct is dead, no need to track all widgets
- (cal_opened_cb): set the timezone upon opening
- (e_tasks_update_all_config_settings): kill
-
- * gui/control-factory.c (control_factory_new_control): create the
- calendar ourselves
-
- * gui/calendar-config.c (on_timezone_set): don't update the
- settings everywhere here, we have config managers now
-
- * gui/calendar-component.c (impl_createControls): create the
- calendar ourselves
-
- * gui/calendar-commands.h: remove protos
-
- * gui/calendar-commands.c: remove dead functions
-
-2003-10-29 JP Rosevear <jpr@ximian.com>
-
- * gui/e-day-view-config.c (set_twentyfour_hour): set the format on
- the cal view
-
- * gui/e-week-view-config.c (set_twentyfour_hour): ditto
-
- * gui/e-cal-list-view-config.c (set_twentyfour_hour): set the 24
- hour format on the view
- (twentyfour_hour_changed_cb): 24 hour format change callback
- (e_cal_list_view_config_set_view): handle 24 hour format changes
-
-2003-10-29 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/recurrence-page.c (recurrence_page_finalize): unref
- config manager
- (init_widgets): create config manager for the e-calendar
-
- * gui/e-tasks.c (setup_widgets): create config manager for the
- table view
- (e_tasks_destroy): unref config manager
- (e_tasks_open): return FALSE not NULL
- (e_tasks_update_all_config_settings): don't configure the calendar
- table here, we have a manager
-
- * gui/calendar-config.c: remove dead config functions (handled by
- config managers now)
-
-2003-10-29 JP Rosevear <jpr@ximian.com>
-
- * gui/gnome-cal.c (set_timezone): set the timezone for all clients
- (timezone_changed_cb): callback for changes
- (setup_config): setup the configuration
- (setup_widgets): setup up configuration managers for the list
- view, task list and date navigator
- (gnome_calendar_init): setup config
- (gnome_calendar_destroy): destroy configuration managers and
- notifications
- (gnome_calendar_update_config_settings): remove dead bits
-
- * gui/e-mini-calendar-config.[hc]: manage configuration of an
- e-calendar
-
- * gui/e-day-view-config.h: remove extraneous comment, type the
- parent class correctly
-
- * gui/e-week-view-config.h: ditto
-
- * gui/e-day-view-config.c (e_day_view_config_class_init): type the
- class correctly
- (set_timezone): set timezone
- (timezone_changed_cb): timezone changed callback
- (e_day_view_config_set_view): track timezone changes
-
- * gui/e-week-view-config.c: ditto
-
- * gui/e-cell-date-edit-config.[hc]: manage configuration of a date
- edit cell
-
- * gui/e-calendar-table-config.[hc]: manage configuration of a
- e-calendar-table
-
- * gui/e-cal-list-view.c (get_current_time_cb): use the view
- timezone to compute
-
- * gui/e-cal-list-view-config.[hc]: manage configuration of a
- list view
-
- * gui/calendar-config.h: update protos
-
- * gui/calendar-config.c
- (calendar_config_add_notification_timezone): notify of timezone
- change
- (calendar_config_add_notification_dnav_show_week_no): notify of
- show week number setting change
-
- * gui/calendar-component.c (calendar_component_peek): remove bad
- comma
-
- * gui/Makefile.am: build new config classes
-
-2003-10-29 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/calendar-component.c (fill_popup_menu_callback): fixed
- typo in menu item label.
-
- * gui/e-cal-model.[ch] (e_cal_model_get_use_24_hour_format): new
- function.
-
- * gui/e-cal-view.[ch]: no need to keep the 'use_24_hour' setting,
- it's already in the model.
- (e_cal_view_get_use_24_hour_format,
- e_cal_view_set_use_24_hour_format): new functions.
-
- * gui/e-day-view.[ch] (e_day_view_get_24_hour_format,
- (e_day_view_set_24_hour_format): removed.
- (e_day_view_convert_time_to_display, e_day_view_update_event_label,
- e_day_view_get_time_string_width): use the ECalView's function to
- get the 24 hour format.
-
- * gui/e-week-view.[ch] (e_week_view_get_24_hour_format,
- e_week_view_set_24_hour_format): removed.
- (e_week_view_convert_time_to_display,
- e_week_view_get_time_string_width): use the ECalView's function
- to get the 24 hour format.
-
- * gui/e-day-view-top-item.c (e_day_view_top_item_draw_long_event):
- * gui/e-day-view-time-item.c (e_day_view_time_item_draw):
- * gui/e-week-view-event-item.c (e_week_view_draw_time):
- don't use the view's use_24_hour_format, but the ECalView method.
-
-2003-10-28 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/calendar-component.c (impl_createControls): connect to
- "fill_popup_menu" on the ESourceSelector.
- (fill_popup_menu_callback): add popup menu items here.
- (add_popup_menu_item): new function to add items to the
- popup menu.
- (new_calendar_cb): callbacks for the popup menu items.
-
-2003-10-28 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-cal-view.c: no need to keep the timezone here, it is
- already stored in the model.
- (e_cal_view_get_timezone): call e_cal_model_get_timezone().
- (e_cal_view_set_timezone): call e_cal_model_set_timezone().
- (e_cal_view_new_appointment_for): use the model's timezone.
-
-2003-10-27 Dan Winship <danw@ximian.com>
-
- * pcs/cal-backend.c (cal_backend_notify_object_created,
- cal_backend_notify_object_modified,
- cal_backend_notify_object_removed): New; tell each query about a
- created/modified/removed object.
-
- * pcs/cal.c (cal_notify_object_created): Use
- cal_backend_notify_object_created.
- (cal_notify_object_modified, cal_notify_object_removed): Likewise
- for modified/removed
- (cal_notify_objects_received): we need both the before and after
- forms for the modified objects so they can be resolved as
- adds/modifies/removes per-query. But the caller can just call the
- cal_backend_* routines for each object anyway, so just remove the
- created/modified/removed lists.
-
- * pcs/cal-backend-sync.c (cal_backend_sync_receive_objects):
- Remove created/modified/removed list arguments.
- (_cal_backend_receive_objects): Likewise.
-
- * pcs/cal-backend-file.c (cal_backend_file_receive_objects):
- Remove created/modified/removed list arguments. Replace the one
- use of *removed with a call to cal_backend_notify_object_removed.
-
-2003-10-27 JP Rosevear <jpr@ximian.com>
-
- * gui/gnome-cal.c (setup_widgets): store config objects as well
- (gnome_calendar_set_default_uri): return FALSE if the
- pre-condition fails
- (gnome_calendar_update_config_settings): remove settings that are
- now handled by the config objects
-
- * gui/e-week-view.c (e_week_view_set_compress_weekend): queue a
- draw
-
- * gui/e-itip-control.c (start_default_server): comment out
-
- * gui/e-day-view-config.[hc]: a class to track config changes of
- interest to day views
-
- * gui/e-week-view.[hc]: ditto for week views
-
- * gui/calendar-config.h: add protos
-
- * gui/calendar-config.c: use the #defines for the keys and add
- notification routines
-
- * gui/calendar-config-keys.h: a list of defines for gconf keys
-
- * gui/Makefile.am: build new files
-
-2003-10-27 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-cal-model.h: changed fill_component_from_model virtual
- method to get an ETableModel, not an ECalModel.
-
- * gui/e-cal-model.c (ecm_append_row): the source model sent from
- ETable is an ETableModel, not an ECalModel.
-
- * gui/e-cal-model-calendar.c (ecmc_fill_component_from_model):
- get an ETableModel for the 'source_model' argument.
-
- * gui/e-cal-model-tasks.c (ecmt_fill_component_from_model): ditto.
-
-2003-10-27 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/tasks-component.c (add_uri_for_source): pass FALSE as the
- 'only_if_exists' parameter, so that the calendar gets created when
- it still does not exist.
-
-2003-10-24 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/tasks-component.c (tasks_component_init): initialize private
- structure on TasksComponent.
-
-2003-10-24 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/calendar-component.c (calendar_component_class_init): removed
- repeated initialization.
- (calendar_component_peek): use G_STRLOC for g_warning's.
-
- * gui/tsaks-control.[ch] (tasks_control_activate,
- tasks_control_deactivate): made these 2 functions public.
-
- * gui/tasks-component.[ch]: implementation of the tasks component.
-
- * gui/Makefile.am:
- * gui/GNOME_Evolution_Calendar.server.in.in: added tasks component.
-
- * gui/main.c: ditto.
- (factory): added code to create the tasks component when requested.
-
-2003-10-24 Dan Winship <danw@ximian.com>
-
- * cal-client/cal-client.c (cal_client_get_changes): Remove type arg
-
- * conduits/calendar/calendar-conduit.c (pre_sync, post_sync):
- Update for that
-
- * conduits/todo/todo-conduit.c (pre_sync, post_sync): Likewise
-
- * idl/evolution-calendar.idl (getChanges): Remove type arg.
-
- * pcs/cal.c (impl_Cal_getChanges): Likewise
-
- * pcs/cal-backend.c (cal_backend_get_changes): Likewise
-
- * pcs/cal-backend-sync.c (cal_backend_sync_get_changes): Likewise
-
- * pcs/cal-backend-file.c (cal_backend_file_get_changes): Update
- for that
-
- * pcs/Makefile.am: build libpcs.la and libpcsfile.la instead of
- just .a.
- (libpcs_la_LIBADD): depend on libcal-util.la and libeutil.la
- (libpcsfile_la_LIBADD): depend on libpcs.la
-
-2003-10-24 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-util/cal-util.[ch] (cal_util_construct_instance,
- cal_util_remove_instances): new functions for individual
- instances management.
-
- * pcs/cal-backend-file.c (cal_backend_file_get_object): if we
- dont have a recurrence in our hash table, generate one for the
- specified recurrence ID.
- (match_recurrence_sexp): new function to match recurrences on
- regular expresessions.
- (match_object_sexp): call match_recurrence_sexp() for all recurrences.
- (cal_backend_file_modify_object): handle mod_types.
- (cal_backend_file_remove_object): handle mod_types.
-
-2003-10-24 JP Rosevear <jpr@ximian.com>
-
- * gui/gnome-cal.h: update protos
-
- * gui/gnome-cal.c (gnome_calendar_set_default_uri): set the
- default client based on uri
-
- * gui/calendar-component.c (add_uri_for_source): rename from
- load_uri_for_source and take a calendar
- (remove_uri_for_source): utility routine to remove the source's
- uri from the calendar
- (is_in_selection): checks to see if the uid of the given source
- matches any of those in the given selection
- (update_uris_for_selection): remove any uris no longer in the
- selection, add those that still exist
- (source_selection_changed_callback): call above
- (primary_source_selection_changed_callback): we have the calendar
- easily now; set the default by uri
- (control_activate_cb): handle activation and de-activation
- (impl_createControls): create the calendar control ourselves so we
- have access to the calendar
- (impl_dispose): release the source selection
-
-2003-10-23 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/cal-backend-file.c (add_component): if the component received
- is an instance, add it to the recurrences hash table.
- (free_recurrence): callback for g_hash_table_foreach() to free
- the recurrences in the CalBackendFileObject structure.
- (free_object): call free_recurrence for each recurrence.
- (remove_recurrence_cb): g_hash_table_foreach() callback to
- remove recurrences from the calendar.
- (remove_component): remove all recurrences.
- (cal_backend_file_open): check write access on the file, and
- set read_only flag appropriately.
- (cal_backend_file_is_read_only): return the private flag.
- (cal_backend_file_init): initialize read_only flag.
- (cal_backend_file_get_object): deal with recurrences.
-
- * gui/alarm-notify/notify-main.c (main): unref the alarm
- notification service when terminating.
- (client_die_cb): call bonobo_main_quit instead of gtk_main_quit.
-
-2003-10-23 <jpr@ximian.com>
-
- * gui/gnome-cal.c (gnome_calendar_get_current_view_widget): just
- uses the views array and the current view type
- (setup_widgets): ditto
- (set_view): ditto
- (backend_died_cb): ditto
- (gnome_calendar_get_calendar_model): ditto
- (gnome_calendar_update_config_settings): ditto
-
-2003-10-23 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-day-view.c: accept also text/calendar for D&D.
-
-2003-10-23 JP Rosevear <jpr@ximian.com>
-
- * gui/e-day-view.c (e_day_view_on_top_canvas_drag_data_received):
- fix typo
- (e_day_view_on_main_canvas_drag_data_received): fix C99 issue, fix
- typo
-
-2003-10-23 JP Rosevear <jpr@ximian.com>
-
- * gui/gnome-cal.c (update_query): use the internal client list to
- create the queries
- (gnome_calendar_destroy): use the internal client list to
- disconnect signal handlers
- (gnome_calendar_add_event_uri): add the client to the internal
- list
- (gnome_calendar_remove_event_uri): remove the client from the
- internal list and lookup the client
- (gnome_calendar_update_config_settings): use the internal client
- list to update the config settings
-
-2003-10-23 Harry Lu <harry.lu@sun.com>
-
- * cal-client/cal-client.c: (cal_client_get_timezone): remove and free
- op before return.
-
- * gui/e-cal-view.c (e_cal_view_add_event): modified from
- selection_received_add_event() so that it call be called out of
- e-cal-view.c.
- (selection_received): modified to call e_cal_view_add_event().
-
- * gui/e-cal-view.h: add declaration for e_cal_view_add_event().
-
- * gui/e-day-view.c (e_day_view_on_drag_data_get): Provide a
- icalcomponent for both TARGET_CALENDAR_EVENT and TARGET_VCALENDAR.
- (e_day_view_on_top_canvas_drag_data_received): If dragging between
- different windows, make it works like a copy and paste.
- (e_day_view_on_main_canvas_drag_data_received): ditto.
-
-2003-10-23 JP Rosevear <jpr@ximian.com>
-
- * cal-util/cal-recur.c: update g_date calls to non-deprecated
- calls
-
- * cal-util/Makefile.am: turn off deprecated funcs
-
- * cal-client/Makefile.am: turn off deprecated funcs
-
- * cal-client/cal-client.c (cal_client_get_error_message): add OK
- message
-
- * pcs/cal-backend.[hc]: remove dead funcs
-
- * pcs/query.c: tidy headers
-
-2003-10-23 JP Rosevear <jpr@ximian.com>
-
- * pcs/query.c (query_notify_objects_removed_1): Fix c/p typo -
- call removed instead of modify
-
-2003-10-23 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-cal-view.c (e_cal_view_init): connect also to ETableModel's
- "model_cell_changed" signal.
- (e_cal_view_set_model): likewise.
- (model_cell_changed_cb): callback for "model_cell_changed".
- (e_cal_view_destroy): use g_signal_handlers_disconnect_matched instead
- of g_signal_handlers_disconnect_by_func, so that all handlers are
- disconnected.
-
-2003-10-23 JP Rosevear <jpr@ximian.com>
-
- * pcs/cal.c (cal_notify_object_modified): guard against irrelevant
- args (ie if there was an error)
- (cal_notify_object_removed): ditto
- (cal_notify_timezone_added): ditto
-
- * pcs/cal-backend-sync.c (_cal_backend_is_read_only): init value
- to something known
- (_cal_backend_get_cal_address): ditto
- (_cal_backend_get_alarm_email_address): ditto
- (_cal_backend_get_ldap_attribute): ditto
- (_cal_backend_get_static_capabilities): ditto
- (_cal_backend_modify_object): ditto
- (_cal_backend_remove_object): ditto
- (_cal_backend_get_object_list): ditto
-
-2003-10-22 JP Rosevear <jpr@ximian.com>
-
- * gui/e-cal-list-view.c (e_cal_list_view_new): create a model and
- pass it as an arg during creation
-
- * gui/e-day-view.c (e_day_view_new): unref the model
-
- * gui/e-week-view.c (e_week_view_new): ditto
-
-2003-10-22 JP Rosevear <jpr@ximian.com>
-
- * cal-client/cal-client.c (cal_client_get_object): only change to
- invalid object error code if we got the object but couldn't parse
- it, and only check for timezones if we had success
-
- * gui/comp-util.c (cal_comp_is_on_server): don't throw a warning
- if the object simply does not exist
-
-2003-10-22 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/gnome-cal.[ch] (gnome_calendar_remove_event_uri): new
- function to remove calendars from the views.
-
-2003-10-22 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/GNOME_Evolution_Calendar.server.in.in: Add an
- "evolution:button_icon" attribute.
-
-2003-10-22 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/GNOME_Evolution_Calendar.server.in.in: Add an
- "evoution:button_sort_order" attribute.
-
-2003-10-22 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/calendar-component.c (impl_createControls): Make the
- scrolled window have a GTK_SHADOW_IN shadow.
- * gui/dialogs/meeting-page.c (meeting_page_construct): Likewise.
-
-2003-10-22 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/calendar-component.c (impl_createControls): Set the
- scrollbar policy to "automatic" for both the horizontal and
- vertical scrollbars around the source selector.
-
-2003-10-22 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/GNOME_Evolution_Calendar.server.in.in: Add an
- "evolution:button_label" property on the component for use in the
- shell.
-
-2003-10-21 Rodney Dawes <dobey@ximian.com>
-
- * cal-client/Makefile.am: Fix typo in libcal_client_la_SOURCES
-
-2003-10-21 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/calendar-component.c (calendar_component_init): fixed
- a leak caused by only freeing 'base_uri' in some cases.
-
-2003-10-21 JP Rosevear <jpr@ximian.com>
-
- * gui/control-factory.c (get_prop): fix parse error
- (set_prop): gnome_calendar_open was renamed
-
- * conduits/todo/todo-conduit.c (start_calendar_server): adapt to
- the cal_client_new changes and the lack of a default calendar
- routine
- (pre_sync): don't have to pass a type for the default object any
- more
-
- * conduits/calendar/calendar-conduit.c (start_calendar_server):
- adapt to the cal_client_new changes and the lack of a default
- calendar routine
- (pre_sync): don't have to pass a type for the default object any
- more
-
- * cal-client/cal-client.c (cal_client_open_async): add FIXME
- comment
-
-2003-10-21 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/cal-backend-file.c: store recurrences per object.
- (free_object): free correctly the CalBackendFileObject's
- contained in 'priv->comp_uid_hash'.
- (lookup_component, check_dup_uid, add_component, remove_component,
- match_object_sexp):
- adapted to changes in comp_uid_hash.
-
-2003-10-20 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/gnome-cal.[ch] (gnome_calendar_add_event_uri): renamed
- from gnome_calendar_open.
-
- * gui/calendar-component.c (load_uri_for_source): call
- gnome_calendar_add_event_uri instead of setting the URI property on
- the Bonobo control.
-
-2003-10-17 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/migration.c (process_calendar_dir): process subfolders.
-
-2003-10-17 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/migration.[ch] (migrate_old_calendars): new function.
-
- * gui/calendar-component.c (calendar_component_init): call
- the above function to migrate from old setups.
-
- * gui/Makefile.am: added new files.
-
-2003-10-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * conduits/calendar/Makefile.am: Fixed for libical build changes.
-
- * conduits/todo/Makefile.am: Same.
-
-2003-10-17 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-cal-view.c (on_print): call
- e_cal_view_get_visible_time_range, not the gnome_calendar_
- version.
- (e_cal_view_new_appointment_for, e_cal_view_new_appointment,
- e_cal_view_edit_appointment): new functions.
-
- * gui/gnome-cal.[ch] (gnome_calendar_new_appointment_for,
- gnome_calendar_new_appointment, gnome_calendar_edit_object):
- removed these functions, now available in e-cal-view.
-
- * gui/calendar-commands.c:
- * gui/e-day-view.c:
- * gui/e-week-view-event-item.c:
- * gui/e-week-view.c: replaced calls to gnome_calendar_* with
- e_cal_view_* equivalents.
-
-2003-10-17 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-cal-view.[ch] (e_cal_view_get_default_category):
- (e_cal_view_set_default_category): new functions.
- (e_cal_view_destroy): free the default_category field.
-
- * gui/e-day-view.[ch] (e_day_view_set_default_category):
- removed obsolete function.
- (e_day_view_init, e_day_view_destroy, e_day_view_do_key_press):
- use the ECalView's default_category.
-
- * gui/e-week-view.[ch] (e_week_view_set_default_category):
- removed obsolete function.
- (e_week_view_init, e_week_view_destroy, e_week_view_do_key_press):
- use the ECalView's default_category.
-
- * gui/gnome-cal.c (gnome_calendar_set_query): set the query
- also on the list view by using the priv->views array.
- (search_bar_category_changed_cb, gnome_calendar_set_default_client):
- use the priv->views array.
- (gnome_calendar_get_calendar_model): return the model for the
- current view widget.
- (gnome_calendar_open): removed tasks opening code.
-
-2003-10-16 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/dialogs/new-calendar.c (new_calendar_dialog): if the user
- presses Cancel, just terminate.
-
-2003-10-16 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/calendar-component.c (calendar_component_init): create
- directories for the newly-created calendars.
-
- * gui/dialogs/new-calendar.c (create_new_source_with_group): use
- e_mkdir_hier instead of mkdir.
-
-2003-10-16 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/calendar-component.c (calendar_component_init): if no groups
- are present in the configuration, create the "On This Computer"
- group and the "Personal" and "Work" calendars on it.
-
- * gui/dialogs/new-calendar.c (new_calendar_dialog): moved the
- source creation...
- (create_new_source_with_group): ...here, and made the code create
- the directory for the new calendar.
-
-2003-10-15 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/e-select-names-editable.c (e_selct_names_editable_get_address):
- EDestination -> EABDestination.
-
- * gui/gnome-cal.c (setup_widgets): evolution_dir -> ".evolution".
-
-2003-10-15 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-select-names-editable.c (e_select_names_editable_get_address):
- use EABDestination instead of EDestination.
-
- * gui/gnome-cal.c (gnome_calendar_open): disabled tasks opening code.
-
-2003-10-15 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-meeting-list-view.c: adapted to new addressbook API.
-
- * gui/e-meeting-store.c: adapted to new addressbook API.
- (find_zone): fixed usage of icalcomponent where an icalproperty
- is expected.
- (refresh_busy_periods): fixed call to cal_client_get_free_busy().
-
- * gui/e-meeting-time-sel.c (e_meeting_time_selector_construct):
- added missing variable.
-
-2003-10-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * gui/dialogs/meeting-page.c: #include <gal/e-table/e-table.h>
-
-2003-10-15 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-meeting-list-view.c (start_addressbook_server):
- updated to new addressbook API.
- (book_open_cb): removed unneeded function, since we load
- the local addressbook synchronously.
-
-2003-10-15 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/Makefile.am: added missing header directories.
-
- * pcs/cal-factory.h: include <libical/ical.h>, not <ical.h>.
-
- * gui/dialogs/meeting-page.c: added missing headers.
- (meeting_page_construct): free 'backend_address' as returned
- by cal_client_get_cal_address(). Removed code to create the
- meeting model's ETable not removed with the merge.
-
- * gui/e-meeting-list-view.c: updated addressbook headers.
-
- * gui/gnome-cal.h: added missing ',' in the GnomeCalendarViewType
- enum.
-
-2003-10-14 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-day-view.c (e_day_view_update_query): dont set status
- messages here, already set in e_cal_view_update_query.
- (update_query): removed this function.
- (e_day_view_recalc_day_starts): call e_day_view_update_query,
- not update_query.
-
- * gui/e-week-view.c (e_week_view_update_query): dont set status
- messages here, already set in e_cal_view_update_query.
-
- * gui/gnome-cal.c (adjust_query_for_view): new function to adjust
- the query for the visible time range on a given view.
- (gnome_calendar_set_query): call adjust_query_for_view for each
- one of the views.
-
-2003-10-14 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-cal-view.c (e_cal_view_init): connect to signals on the
- model we create here, so that we get notifications for changes.
-
- * gui/gnome-cal.c (gnome_calendar_set_query): set the query
- on all models.
- (gnome_calendar_open): update the date navigator query.
-
-2003-10-14 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/cal.c (cal_notify_timezone_requested): never send NULL
- strings to ORBit.
-
- * gui/e-cal-view.c (e_cal_view_create_popup_menu): removed
- unneeded variables. Also, fixed a typo that was making the
- menu options be disabled when they should be enabled.
-
-2003-10-13 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-cal-model.[ch] (e_cal_model_get_client_for_uri): new function.
-
- * gui/gnome-cal.[ch] (gnome_calendar_set_default_client): new function.
-
- * gui/calendar-component.c (primary_source_selection_changed_callback):
- set the default client on the calendar view to be the primary
- selection on the source list.
-
-2003-10-13 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/dialogs/new-calendar.c (new_calendar_dialog): set a default group
- on the calendar group option menu and create the source if all checks
- are passed.
-
-2003-10-12 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/dialogs/new-calendar.c (new_calendar_dialog): set up widgets
- loaded from the Glade file.
-
-2003-10-10 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/Makefile.am (etspec_DATA): Add e-cal-list-view.etspec.
- (libevolution_calendar_la_SOURCES): Add e-cal-list-view.[ch].
-
- * gui/calendar-commands.c (show_list_view_clicked): Implement.
- (calendar_get_text_for_folder_bar_label): Add case for list view.
- Use month case and tweak it so it doesn't show "%d - %d" if the
- time span contains only one day.
- (verbs): Add list view.
- (pixmaps): Add list view.
-
- * gui/calendar-view-factory.c (calendar_view_factory_get_title):
- Add list view case.
- (calendar_view_factory_get_type_code): Add list view case.
-
- * gui/control-factory.c (get_prop): Add list view case.
-
- * gui/e-cal-model.c (get_classification): Fix to conform to updated
- libical.
- (ecm_set_value_at): Add missing break statements.
- (ecm_get_color_for_component): Add braces for clarity.
-
- * gui/gnome-cal.c (gnome_calendar_get_current_view_widget): Add
- list view case.
- (get_focus_location): Add list view case.
- (connect_list_view_focus): Implement.
- (setup_widgets): Set up list view.
- (gnome_calendar_direction): Add list view case.
- (set_view): Add list view case.
- (gnome_calendar_setup_view_menus): Add list view factory.
- (gnome_calendar_construct): Account for list view.
- (gnome_calendar_update_config_settings): Account for list view.
- (get_days_shown): Implement list view case.
-
- * gui/gnome-cal.h (GnomeCalendarViewType): Add list view.
-
- * gui/e-cal-list-view.[ch]: Implement ECalListView, subclassing
- ECalView.
-
-2003-10-10 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/dialogs/new-calendar.[ch]: added new widget, which implements
- the dialog to create new calendars.
-
- * gui/dialogs/new-calendar.glade: basic mockup of the dialog.
-
- * gui/dialogs/Makefile.am: added new files.
-
- * gui/calendar-commands.c (file_new_calendar_cb): open the new calendar
- dialog to allow user to create a new cal.
-
-2003-10-10 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/control-factory.c (calendar_properties_init): pass the
- BonoboControl to get_prop/set_prop.
- (get_prop): obtain the GnomeCalendar from the control.
- (set_prop): ditto, and when the URI property is changed,
- sensitize the UI as approppriate.
-
- * gui/calendar-commands.c (calendar_control_sensitize_calendar_commands):
- made this function public.
-
- * gui/calendar-commands.h: added new prototype.
-
-2003-10-10 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/calendar-commands.c (file_new_calendar_cb,
- file_new_appointment_cb, file_new_event_cb, file_new_meeting_cb,
- file_new_task_cb): callbacks for "New..." verbs.
- (sensitize_calendar_commands): sensitize new verbs, and made it
- sensitize correctly based on the set of clients currently loaded.
- (sensitize_taskpad_commands): likewise.
-
-2003-10-09 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/e-cal-model.c (get_classification): Adapt to libical API changes.
- (ecm_set_value_at): Break after each case, so we don't set the passed value
- in more than one field.
-
-2003-10-09 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-cal-view.c (e_cal_view_delete_selected_occurrence):
- * cal-client/cal-client.c (cal_client_remove_object): added missing
- argument when calling cal_client_remove_object_with_mod().
-
-2003-10-09 Rodrigo Moya <rodrigo@ximian.com>
-
- * idl/evolution-calendar.idl: added missing 'rid' argument to the
- removeObject method.
-
- * cal-client/cal-client.c (cal_client_remove_object_with_mod):
- * pcs/cal-backend.h:
- * pcs/cal-backend.c (cal_backend_remove_object):
- * pcs/cal-backend-sync.h:
- * pcs/cal-backend-sync.c (cal_backend_sync_remove_object,
- _cal_backend_remove_object):
- * pcs/cal-backend-file.c (cal_backend_file_remove_object):
- * pcs/cal.c (impl_cal_removeObject): adapted to changes in IDL.
-
-2003-10-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * cal-client/Makefile.am: INCLUDE path fixes for changes made to
- libical build.
-
- * cal-util/Makefile.am: INCLUDE path fixes for changes made to
- libical build.
-
- * cal-util/*.[c,h]: #include <libical/ical.h> instead of <ical.h>
-
- * gui/Makefile.am: INCLUDE path fixes for changes made to libical
- build.
-
- * gui/*.[c,h]: #include <libical/ical.h> instead of <ical.h>
-
- * gui/alarm-notify/Makefile.am: INCLUDE path fixes for changes
- made to libical build.
-
- * gui/alarm-notify/config-data.h: #include <libical/ical.h>
- instead of <ical.h>
-
- * gui/dialogs/Makefile.am: INCLUDE path fixes for changes made to
- libical build.
-
- * gui/dialogs/comp-editor-util.c: #include <libical/ical.h>
- instead of <ical.h>
-
- * gui/dialogs/e-delegate-dialog.c: #include <libical/ical.h>
- instead of <ical.h>
-
- * importers/Makefile.am: INCLUDE path fixes for changes made to
- libical build.
-
- * pcs/Makefile.am: INCLUDE path fixes for changes made to libical
- build.
-
- * pcs/cal.c: #include <libical/ical.h> instead of <ical.h>
-
-2003-10-08 Harry Lu <harry.lu@sun.com>
-
- * gui/dialogs/alarm-options.glade: Make repeat-quantity and
- repeat-value of alarm option dialog numeric only.
-
- * gui/dialogs/task-details-page.glade: Make percent-complete of
- task details dialog numeric only.
-
-2003-10-08 Chris Toshok <toshok@ximian.com>
-
- * gui/dialogs/e-delegate-dialog.c (e_delegate_dialog_construct):
- EDestination => EABDestination, and e_destination =>
- eab_destination.
- (e_delegate_dialog_get_delegate): same.
- (e_delegate_dialog_get_delegate_name): same.
-
- * gui/dialogs/comp-editor-util.c: remove unnecessary #include of
- e-destination.h.
-
- * gui/dialogs/alarm-options.c (alarm_to_malarm_widgets):
- EDestination => EABDestination, and e_destination =>
- eab_destination.
- (malarm_widgets_to_alarm): same.
-
- * gui/e-meeting-model.c (book_open_cb): track change to error
- return codes.
- (start_addressbook_server): use
- e_book_async_get_default_addressbook.
- (contacts_cb): rename cursor_cb to this, as we no longer get
- passed a cursur, and we don't need to check the email address
- since the query is now "is" instead of "contains".
- (refresh_busy_periods): use an "is" query, and use
- e_book_async_get_contacts instead of getting a CardCursor.
- (process_section): this takes an EABDestination** instead of a
- SimpleCardList*, which is gone.
- (select_names_ok_cb): get "destinations" instead of
- "simple_card_list".
-
-2003-10-08 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-client/cal-client.c (cal_client_is_read_only): fixed
- documentation comments.
-
- * gui/calendar-commands.c (sensitize_calendar_commands): figure
- out read-only menu items to disable based on the currently
- selected object's CalClient.
-
-2003-10-08 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-client/cal-client.c: set better error m,essages on the
- E_CALENDAR_CHECK_STATUS macro.
- (cal_client_get_error_message): new function.
-
- * cal-client/cal-client.h: added new prototype.
-
- * gui/dialogs/comp-editor.c (save_comp): use the GError argument
- for the cal_client_create/_modify_object calls, and display the
- error message coming from the backend.
-
- * gui/comp-util.c (cal_comp_is_on_server): likewise.
-
-2003-10-07 Dan Winship <danw@ximian.com>
-
- * idl/evolution-calendar.idl (getDefaultObject): Remove the "type"
- arg; the backend knows what type it is
-
- * pcs/cal.c (impl_Cal_getDefaultObject): Likewise
-
- * pcs/cal-backend.c (cal_backend_get_default_object): Likewise
-
- * pcs/cal-backend-sync.c (cal_backend_sync_get_default_object,
- _cal_backend_get_default_object): Likewise
-
- * pcs/cal-backend-file.c (cal_backend_file_get_default_object):
- Likewise. (Use cal_backend_get_kind() instead.)
-
- * cal-client/cal-client.c (cal_client_get_default_object):
- Likewise
-
- * gui/comp-util.c (cal_comp_event_new_with_defaults,
- cal_comp_task_new_with_defaults): Update calls to
- cal_client_get_default_object().
-
- * pcs/cal-backend-sync.c (_cal_backend_get_static_capabilities):
- Use the right cal notification
-
-2003-10-07 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-cal-model.c (e_cal_model_create_component_with_defaults):
- dont clone NULL icalcomponent's.
-
-2003-10-07 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-cal-model.c (e_cal_model_get_default_client): make sure we
- always return a default client, if possible, since we rely on having
- a default client in many places.
-
- * gui/e-day-view.c (e_day_view_do_key_press): dont create event if
- e_cal_model_create_component_with_defaults returns NULL.
-
- * gui/e-week-view.c (e_week_view_do_key_press): dont create event if
- e_cal_model_create_component_with_defaults returns NULL.
-
-2003-10-06 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-cal-model.c (e_cal_model_create_component_with_defaults):
- make sure the component has always an UID.
-
- * gui/e-day-view.c (e_day_view_find_event_from_uid):
- * gui/e-week-view.c (e_week_view_find_event_from_uid): check
- pointers passed to strcmp().
-
-2003-10-06 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/gnome-cal.c (gnome_calendar_open): added missing call to
- cal_client_open().
-
- * cal-client/cal-client.c (cal_client_new): fixed documentation
- comments.
- (cal_client_open): emit CAL_OPENED signal with appropriate status codes.
- (open_sync): dont emit CAL_OPENED signal, it's already emitted in
- cal_client_open().
-
-2003-10-06 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/comp-editor-factory.c (open_client):
- * gui/gnome-cal.c (gnome_calendar_open, gnome_calendar_construct):
- * gui/calendar-offline-handler.c (backend_go_offline, backend_go_online,
- calendar_offline_handler_init): adapted to changes in cal_client and
- manage GError's returned by cal_client_open.
-
- * gui/e-itip-control.c: dont run anymore sub event loops.
- (start_calendar_server): use synchronous interface for opening calendars.
- (start_default_server): renamed it from *_async.
- (start_calendar_server_cb): removed unneeded function.
- (object_requested_cb): use sync interface.
-
- * gui/e-tasks.c (e_tasks_construct): dont create the CalClient here.
- (e_tasks_open): do it here, where we've got all the info needed.
-
- * importers/icalendar-importer.c (update_single_object): killed warning.
- (ical_importer_new, vcal_importer_new): don't create CalClient's here.
- (load_file_fn): create them here.
- (vcal_load_file_fn): and here.
- (gnome_calendar_import_data_fn): fixed usage of cal_client_*.
-
- * */*: integrated JP's changes for synchronous open's in cal_client
- and one model per view instead of one model for all views.
-
-2003-10-02 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-client/cal-client.c (cal_client_modify_object): return FALSE
- if the icalcomponent is NULL.
-
- * gui/e-day-view.c (e_day_view_finish_resize): commit sequence on
- CalComponent after changing start/end dates.
-
-2003-10-01 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-day-view.c (process_component):
- * gui/e-week-view.c (process_component): expand recurrences here.
-
-2003-09-30 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/cal-backend-file.c (match_recurrence_sexp): removed.
- (match_object_sexp): dont expand recurrences here.
-
-2003-09-30 Mike Kestner <mkestner@ximian.com>
-
- * cal-util/cal-util-marshal.list : new VOID:STRING,STRING,STRING
- * gui/Makefile.am : build the new view/store/renderer/editable
- * gui/e-select-names-renderer.* : new completion cell renderer
- * gui/e-select-names-editable.* : new completion cell editable
- * gui/e-meeting-model.* : killed. code reused in list-view/store
- * gui/e-meeting-store.* : port of EMeetingModel to GtkTreeModel
- * gui/e-meeting-list-view.* : GtkTreeView subclass for attendee lists
- * gui/e-meeting-time-sel.c : Use the new store/view
- * gui/e-meeting-time-sel-item.c : Use the new store/view
- * gui/dialogs/Makefile.am : don't install the etspec anymore.
- * gui/dialogs/event-editor.c : Use the new store/view.
- * gui/dialogs/meeting-page.c : Use the new store/view.
- * gui/dialogs/shedule-page.c : Use the new store/view.
- * gui/dialogs/task-editor.c : Use the new store/view.
-
-2003-09-29 JP Rosevear <jpr@ximian.com>
-
- * conduits/todo/Makefile.am: link to libical-evolution
-
- * conduits/calendar/Makefile.am: ditto
-
-2003-09-26 JP Rosevear <jpr@ximian.com>
-
- * pcs/cal-backend.c (cal_backend_class_init): remove cal_added
- signal
-
-2003-09-26 JP Rosevear <jpr@ximian.com>
-
- * pcs/cal.h: add protos
-
- * pcs/cal.c (cal_get_backend): accessor
- (cal_get_listener): ditto
-
- * pcs/cal-factory.c (impl_CalFactory_getCal): update to new
- routine name
-
- * pcs/cal-backend.h: add protos
-
- * pcs/cal-backend.c (cal_backend_init): init client mutex
- (cal_backend_finalize): destroy client mutex
- (cal_destroy_cb): just remove the client
- (listener_died_cb): remove the client, the listener died so it
- can't really do anything
- (last_client_gone): signal the last client gone
- (cal_backend_add_client): add a client with locking and listen for
- the death of the listener
- (cal_backend_remove_client): remove client
-
-2003-09-26 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/cal-backend-sync.c (_cal_backend_create_object): only free the
- returned UID if it's not NULL.
-
- * pcs/cal.c (cal_notify_object_created): dont send NULL strings to
- ORBit code.
-
-2003-09-26 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/comp-util.c (cal_comp_is_on_server): free the icalcomponent
- returned from cal_client_get_object, and return TRUE if we find
- the component on the backend.
-
- * gui/e-day-view.c (process_component):
- * gui/e-week-view.c (process_component): added missing case, so that
- we also display recurrent meetings starting before the time range and
- ending after the time range.
-
- * cal-client/cal-listener.c (impl_notifyReadOnly): pass the
- 'read_only' argument to the signal callback correctly (a gboolean
- not a 'gboolean *').
-
- * gui/comp-editor-factory.c (resolve_pending_requests): removed
- the g_assert on 'oc->pending != NULL', since there are now cases
- (local calendar) where we get to call this function (cal_opened_cb)
- with no pending requests yet.
-
-2003-09-25 JP Rosevear <jpr@ximian.com>
-
- * gui/calendar-commands.c (publish_freebusy_cmd): adapt to new
- get_free_busy api
-
- * conduits/calendar/calendar-conduit.c (post_sync): ditto
- (pre_sync): ditto
-
- * conduits/todo/todo-conduit.c (pre_sync): ditto
- (post_sync): ditto
-
- * gui/e-meeting-model.c (refresh_busy_periods): ditto
-
- * gui/e-itip-control.c (send_freebusy): ditto
-
- * gui/e-cal-view.c (on_publish): ditto
-
- * cal-client/cal-listener.h: add signals
-
- * cal-client/cal-listener.c (build_change_list): move here from
- cal-client.c
- (impl_notifyChanges): implement
- (build_free_busy_list): util to create the GList of free busy
- objects
- (impl_notifyFreeBusy): implement
- (cal_listener_class_init): set free busy and changes epv methods,
- add signals
-
- * cal-client/cal-client.h: update protos
-
- * cal-client/cal-client.c (cal_get_changes_cb): get changes call
- back
- (cal_get_free_busy_cb): get free busy call back
- (cal_client_init): listen for free busy and changes signals
- (cal_client_get_changes): convert to new threaded sync api
- (cal_client_get_free_busy): ditto
-
- * pcs/cal.h: add protos
-
- * pcs/cal.c: remove dead type conversion function
- (impl_Cal_getChanges): implement by just calling, no return stuff
- (impl_Cal_getFreeBusy): ditto
- (cal_notify_changes): do getChanges callback
- (cal_notify_free_busy): do getFreeBusy callback
-
- * pcs/cal-backend.h: update protos, vmethods
-
- * pcs/cal-backend.c (cal_backend_get_free_busy): call through
- (cal_backend_get_changes): ditto
-
- * pcs/cal-backend-sync.h: add vmethods, protos
-
- * pcs/cal-backend-sync.c (cal_backend_sync_get_changes): call
- through
- (cal_backend_sync_get_free_busy): ditto
- (_cal_backend_get_changes): backend implementation, notify
- (_cal_backend_get_free_busy): ditto
- (cal_backend_sync_class_init): set free busy and changes
- implementations
-
- * pcs/cal-backend-file.c (cal_backend_file_get_free_busy): convert
- to sync backend method
- (cal_backend_file_compute_changes_foreach_key): remove from the
- hash here
- (cal_backend_file_compute_changes): no need to build the sequence
- here
- (cal_backend_file_get_changes): convert to sync backend method
- (cal_backend_file_class_init): set sync backend methods for free
- busy and changes
-
- * idl/evolution-calendar.idl: convert getChanges and getFreeBusy
- to new async api
-
-2003-09-25 JP Rosevear <jpr@ximian.com>
-
- * pcs/cal-backend.h: remove dead result enums
-
- * pcs/cal-backend.c: fix comments
-
- * idl/evolution-calendar.idl: remove dead exceptions
-
-2003-09-25 JP Rosevear <jpr@ximian.com>
-
- * pcs/cal.c (cal_notify_default_object): send back the empty
- string if the object is NULL
- (cal_notify_object): ditto
-
-2003-09-25 JP Rosevear <jpr@ximian.com>
-
- * gui/comp-editor-factory.c (edit_existing): convert to api
- changes
-
- * conduits/todo/todo-conduit.c (local_record_from_uid): ditto
- (pre_sync): ditto
-
- * conduits/calendar/calendar-conduit.c (local_record_from_uid):
- ditto
- (pre_sync): ditto
-
- * importers/icalendar-importer.c (update_single_object): ditto
-
- * gui/dialogs/comp-editor.c (obj_updated_cb): ditto
-
- * gui/e-itip-control.c (get_real_item): ditto
- (find_server): ditto
-
- * gui/comp-util.c (cal_comp_is_on_server): ditto
- (cal_comp_event_new_with_defaults): ditto
- (cal_comp_task_new_with_defaults): ditto
-
- * cal-client/cal-listener.h: add signals
-
- * cal-client/cal-listener.c (impl_notifyDefaultObjectRequested):
- implement
- (impl_notifyObjectRequested): ditto
- (cal_listener_class_init): set above epv implementations, add signals
-
- * cal-client/cal-client.h: update protos
-
- * cal-client/cal-client.c (cal_default_object_requested_cb): get
- default object callback
- (cal_object_requested_cb): get object callback
- (cal_client_init): listen for get and get default object signals
- (cal_client_get_default_object): convert to new sync api
- (cal_client_get_object): ditto
-
- * pcs/cal.h: add protos
-
- * pcs/cal.c (impl_Cal_getDefaultObject): just call the backend, it
- does the notification now
- (impl_Cal_getObject): ditto
- (cal_notify_default_object): do getDefaultObject response
- (cal_notify_object): do getObject response
-
- * pcs/cal-backend.h: remove vmethods, protos
-
- * pcs/cal-backend.c: remove a couple of dead functions
- (cal_backend_class_init): get_object_component is no longer a
- vmethod
- (cal_backend_get_default_object): call through
- (cal_backend_get_object): ditto
-
- * pcs/cal-backend-sync.h: add protos, vmethods
-
- * pcs/cal-backend-sync.c (cal_backend_sync_get_default_object):
- call through
- (cal_backend_sync_get_object): ditto
- (_cal_backend_discard_alarm): pass correct params to
- cal_notify_discard_alarm
- (_cal_backend_get_default_object): call through and notify
- (_cal_backend_get_object): ditto
- (cal_backend_sync_class_init): set backend implementations
-
- * pcs/cal-backend-file.c (cal_backend_file_get_default_object):
- convert to sync backend method
- (cal_backend_file_get_object): ditto
- (cal_backend_file_compute_changes_foreach_key): just look up the
- component rather than using the backend vmethod
- (cal_backend_file_remove_object): return valid sync status codes
- (cal_backend_file_class_init): move get_object, get_default_object
- to sync class
-
- * idl/evolution-calendar.idl: convert getObject and
- getDefaultObject to new async idl
-
-2003-09-25 JP Rosevear <jpr@ximian.com>
-
- * pcs/cal.c (impl_Cal_discardAlarm): just call the backend
- function, it does the notification
- (cal_notify_alarm_discarded): notify of discard alarm call
-
- * pcs/cal-backend.h: update proto
-
- * pcs/cal-backend.c (cal_backend_discard_alarm): call through
-
- * pcs/cal-backend-sync.h: add proto, vmethod
-
- * pcs/cal-backend-sync.c (cal_backend_sync_discard_alarm): call
- through
- (_cal_backend_discard_alarm): call through and notify
- (cal_backend_sync_class_init): set discard alarm implementation
-
- * pcs/cal-backend-file.c (cal_backend_file_discard_alarm): match
- sync backend vmethod
- (cal_backend_file_class_init): set alarm vmethod implementation
-
- * idl/evolution-calendar.idl: switch discardAlarm to new api
-
- * gui/alarm-notify/alarm-queue.c (remove_queued_alarm): match new
- api
-
- * cal-client/cal-listener.h: add signal
-
- * cal-client/cal-listener.c (impl_notifyAlarmDiscarded): implement
- (cal_listener_class_init): add alarm, send, receive epv functions,
- alarm signal
-
- * cal-client/cal-client.h: update proto
-
- * cal-client/cal-client.c (cal_alarm_discarded_cb): discardAlarm
- callback
- (cal_client_init): listen to discard alarm signal
- (cal_client_discard_alarm): implement with new threaded sync api
-
-2003-09-25 JP Rosevear <jpr@ximian.com>
-
- * idl/evolution-calendar.idl: remove unused user exceptions
-
-2003-09-24 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/cal-backend-util.[ch] (cal_backend_util_fill_alarm_instances_seq):
- removed unneeded function.
-
-2003-09-24 JP Rosevear <jpr@ximian.com>
-
- * conduits/*/*.c: adjust to new timezone api calls
-
- * gui/*.c: ditto
-
- * gui/dialogs/*.c: ditto
-
- * cal-client/cal-listener.h: add new signals
-
- * cal-client/cal-listener.c (convert_status): convert invalid
- object as well
- (impl_notifyTimezoneRequested): implement
- (impl_notifyDefaultTimezoneSet): ditto
- (cal_listener_class_init): set epv implementations for timezone
- functions
- (cal_listener_class_init): create timezone response signals
-
- * cal-client/cal-client.h: update protos
-
- * cal-client/cal-client.c: fix return values all over the place
- (cal_get_timezone_cb): getTimezone response
- (cal_query_cb): setDefaultTimezone response
- (cal_client_init): listen for new response signals
- (cal_client_get_timezone): implement using new thread sync api
- (cal_client_ensure_timezone_on_server): use add timezone call
- (cal_client_set_default_timezone): oimplement using new thread sync
- api
-
- * cal-client/cal-client-types.h: add invalid object status code
-
- * idl/evolution-calendar.idl: getQuery no longer raises any user
- exceptions, remove dead types and exceptions
-
-2003-09-24 JP Rosevear <jpr@ximian.com>
-
- * pcs/cal.h: new protos
-
- * pcs/cal.c (impl_Cal_getTimezone): call backend implementation
- (impl_Cal_addTimezone): ditto
- (impl_Cal_setDefaultTimezone): ditto
- (cal_class_init): set epv implementations of timezone functions
- (cal_notify_timezone_requested): notify of get timezone response
- (cal_notify_default_timezone_set): notify of default timezone
- being set
-
- * pcs/cal-backend.h: new vmethods, protos
-
- * pcs/cal-backend.c (cal_backend_class_init): init new timezone
- vmethods
- (cal_backend_get_timezone): call through
- (cal_backend_set_default_timezone): ditto
- (cal_backend_add_timezone): ditto
- (cal_backend_internal_get_default_timezone): ditto
- (cal_backend_internal_get_timezone): ditto
-
- * pcs/cal-backend-sync.h: add vmethods, protos
-
- * pcs/cal-backend-sync.c (cal_backend_sync_get_timezone): call
- through
- (cal_backend_sync_set_default_timezone): ditto
- (_cal_backend_set_default_timezone): call through and notify
- (_cal_backend_get_timezone): ditto
- (cal_backend_sync_class_init): set backend implementations for new
- funcs
-
- * pcs/cal-backend-object-sexp.c (func_occur_in_time_range): get
- time_t values based on the zone
-
- * pcs/cal-backend-file.c: reorg so we don't have to prototype
- everything
- (cal_backend_file_get_timezone): implement the sync backend way
- (cal_backend_file_add_timezone): ditto
- (cal_backend_file_set_default_timezone): ditto
- (cal_backend_file_internal_get_default_timezone): internal method,
- for sexp comparison
- (cal_backend_file_internal_get_timezone): ditto
-
- * idl/evolution-calendar.idl: convert timezone routines to async
- api
-
-2003-09-23 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/cal-backend-object-sexp.c (func_occur_in_time_range): dont expand
- recurrences, since they are supposed to be expanded in the backends.
- (instance_occur_cb, resolve_tzid): removed unneeded functions.
-
- * pcs/cal-backend-file.c (cal_backend_file_add_timezone): guard against
- adding the timezone if it's already there.
-
-2003-09-23 JP Rosevear <jpr@ximian.com>
-
- * pcs/cal.c (cal_notify_object_created): notify with the object,
- not the uid
-
- * gui/e-cal-model.c (add_new_client): don't listen for
- non-existent signal
-
-2003-09-23 JP Rosevear <jpr@ximian.com>
-
- * cal-client/cal-client.h: remove dead proto
-
-2003-09-23 JP Rosevear <jpr@ximian.com>
-
- * cal-client/cal-client.h: remove send result enum
-
- * gui/itip-utils.c (comp_server_send): use the new send_objects
- routine
-
-2003-09-23 JP Rosevear <jpr@ximian.com>
-
- * cal-client/cal-client.h: remove send result enum
-
-2003-09-23 JP Rosevear <jpr@ximian.com>
-
- * cal-client/cal-client.h: remove enum, protos
-
- * cal-client/cal-client.c: remove remove status enum typing
-
-2003-09-23 Rodrigo Moya <rodrigo@ximian.com>
-
- * importers/icalendar-importer.c (update_objects): new function
- to manage the update of components, taking into account
- VTIMEZONE components.
- (process_item_fn, gnome_calendar_import_data_fn): use
- update_objects instead of cal_client_update_objects.
-
-2003-09-23 JP Rosevear <jpr@ximian.com>
-
- * pcs/cal.h: update proto
-
- * pcs/cal.c (impl_Cal_addTimezone): just call add_timezone, it
- does the notification
- (cal_notify_object_created): only notify the query if the object
- matches
- (cal_notify_object_removed): ditto
-
- * pcs/cal-backend.h: update proto, vmethod
-
- * pcs/cal-backend.c (cal_backend_add_timezone): returns void
-
- * pcs/cal-backend-sync.h: update proto, vmethod
-
- * pcs/cal-backend-sync.c (cal_backend_sync_remove_object): add the
- object as an out param
- (_cal_backend_remove_object): get the object and pass it in the
- notification
-
- * pcs/cal-backend-file.c (cal_backend_file_create_object): kill
- cal_backend_file_update_objects call, its more efficient to create
- the comp ourselves; stamp the creation time, add the component to
- the toplevel
- (cal_backend_file_modify_object): kill the
- cal_backend_file_update_objects call, add the component to the
- toplevel
- (cal_backend_file_remove_object): pass back the object when
- removing
-
-2003-09-23 JP Rosevear <jpr@ximian.com>
-
- * cal-client/cal-query.c (cal_query_finalize): disconnect the
- signal handlers
-
- * cal-client/cal-client.c (cal_client_get_query): unref the
- listener when done
-
-2003-09-23 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-cal-view.c (selection_received): add VTIMEZONE components
- contained in the clipboard data to the backend.
-
-2003-09-22 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/comp-editor.c (save_comp): modify and create instead
- of update, simplify mod code
-
-2003-09-22 JP Rosevear <jpr@ximian.com>
-
- * gui/e-day-view.c (e_day_view_finish_long_event_resize): modify
- the object instead of update, simplify the instance handling
- (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
-
-2003-09-22 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-client/cal-client.c (cal_client_get_alarms_in_range): use
- 'has-alarms' function in the search expression.
-
- * pcs/cal-backend-object-sexp.c (func_has_alarms): new SExp function.
-
-2003-09-22 JP Rosevear <jpr@ximian.com>
-
- * gui/e-day-view.c (e_day_view_on_editing_stopped): create the
- object if its not on the server or modify it if it is
-
- * gui/e-week-view.c (e_week_view_on_editing_stopped): we return if
- there is no text and it *not* on the server
-
-2003-09-22 JP Rosevear <jpr@ximian.com>
-
- * gui/e-week-view.c (e_week_view_on_editing_stopped): create the
- object if its not on the server or modify it if it is
-
-2003-09-22 JP Rosevear <jpr@ximian.com>
-
- * gui/gnome-cal.h: remove proto
-
- * gui/gnome-cal.c: remove gnome_calendar_unrecur_selection
-
- * gui/e-week-view.h: remove proto
-
- * gui/e-week-view.c: remove e_week_view_unrecur_appointment
-
- * gui/e-day-view.h: remove proto
-
- * gui/e-day-view.c: remove e_day_view_unrecur_appointment
-
- * gui/e-cal-view.c: remove on_unrecur_appointment (this is handled
- better via recurrence id's now)
-
-2003-09-22 JP Rosevear <jpr@ximian.com>
-
- * gui/e-itip-control.c (update_attendee_status): ifdef out, leave
- temporarily for reference, but otherwise it shouldn't be needed
- (update_item): switch to using receive objects
- (ok_clicked_cb): update item when receiving a reply
-
- * gui/e-calendar-table.c (selection_received): switch to using
- create object from update_objects
-
- * gui/e-cal-view.c (selection_received_add_event): util routine to
- prevent duplication
- (selection_received): use above
-
- * gui/e-cal-model.c (ecm_set_value_at): switch to using modify
- object from update_objects
- (ecm_append_row): switch to using create object from
- update_objects
-
- * gui/e-cal-model-calendar.c (ecmc_set_value_at): switch to using
- modify object from update_objects
-
- * gui/e-cal-model-tasks.c (ecmt_set_value_at): ditto
-
-2003-09-22 Hans Petter Jansson <hpj@ximian.com>
-
- * cal-util/Makefile.am (libical_util_la_LIBADD):
- libical.la -> libical-evolution.la
-
- * importers/Makefile.am (libevolution_calendar_importers_la_LIBADD):
- libicalvcal.la -> libicalvcal-evolution.la
-
-
-2003-09-19 Rodrigo Moya <rodrigo@ximian.com>
-
- * idl/evolution-calendar.idl: removed getAlarmsInRange and
- getAlarmsForObject methods.
-
- * pcs/cal.c (impl_Cal_getAlarmsInRange, impl_Cal_getAlarmsForObject):
- removed unneeded CORBA methods.
- (cal_class_init): dont set removed methods in the epv.
-
- * pcs/cal-backend.[ch]: removed get_alarms_in_range and
- get_alarms_for_object virtual methods.
- (cal_backend_get_alarms_in_range, cal_backend_get_alarms_for_object):
- removed.
- (cal_backend_class_init): dont set removed virtual methods.
-
- * pcs/cal-backend-file.c (cal_backend_file_get_alarms_in_range,
- cal_backend_file_get_alarms_for_object): removed.
- (cal_backend_file_class_init): dont set removed virtual methods.
-
-2003-09-19 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-client/cal-client.c (cal_client_get_alarms_in_range): changed
- to use queries.
- (build_component_alarms_list): create the alarm list from a list
- of iCalendar strings.
- (build_alarm_instance_list): removed.
- (cal_client_get_alarms_for_object): dont call the CORBA methods,
- just get alarms by itself.
-
-2003-09-18 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-client/cal-listener.[ch]: added "add_timezone" signal.
- (impl_notifyTimezoneAdded): implemented new CalListener method.
- (cal_listener_class_init): create "add_timezone" signal for the class.
-
- * cal-client/cal-client.[ch] (cal_client_add_timezone): new function.
- (cal_client_init): connect to "add_timezone" signal on the
- CalListener.
- (cal_add_timezone_cb): callback for the "add_timezone" signal.
-
-2003-09-18 Rodrigo Moya <rodrigo@ximian.com>
-
- * idl/evolution-calendar.idl: added 'notifyTimezoneAdded' method
- to the Calendar::Listener interface.
-
- * pcs/cal-backend-sync.[ch] (cal_backend_sync_add_timezone):
- (_cal_backend_add_timezone): new functions for the new virtual
- method implementation.
-
- * pcs/cal.[ch] (cal_notify_timezone_added): new function.
-
- * pcs/cal-backend-file.c (cal_backend_add_timezone): converted to
- return a CalBackendSyncStatus.
- (cal_backend_file_class_init): the 'add_timezone' method we implement
- is the one in the CalBackendSync class.
- (cancel_receive_object): added missing 'return'.
- (free_cal_component): removed unused function.
-
-2003-09-17 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/cal-backend-file.c (cal_backend_add_timezone): added new
- virtual method implementation.
-
- * pcs/cal.c (impl_Cal_addTimezone): check return value from
- cal_backend_add_timezone, and set an exception if an error is
- returned.
-
-2003-09-16 Rodrigo Moya <rodrigo@ximian.com>
-
- * idl/evolution-calendar.idl: added addTimezone method.
-
- * pcs/cal.c (impl_Cal_addTimezone): implemented new method.
- (cal_class_init): set new method on the epv.
-
- * pcs/cal-backend.[ch]: added 'add_timezone' virtual method.
- (cal_backend_add_timezone): implemented new virtual method.
-
- * pcs/cal-backend-file.c (cal_backend_file_modify_object): it's
- cal_component_get_as_string, not cal_component_as_string.
-
- * cal-client/cal-client.c (cal_client_ensure_timezone_on_server):
- dont use anymore updateObjects method, use addTimezone instead.
-
-2003-09-16 Rodrigo Moya <rodrigo@ximian.com>
-
- * conduits/todo/Makefile.am: removed libwombat reference.
-
-2003-09-15 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/cal-backend-file.c (cal_backend_file_create_object): return
- the UID of the added object.
- (cal_backend_file_remove_object): ditto for old_object.
-
-2003-09-15 JP Rosevear <jpr@ximian.com>
-
- * conduits/todo/todo-conduit.c (replace_record): switch to modify
- object
- (add_record): switch to using create object
-
- * conduits/calendar/calendar-conduit.c (process_multi_day): switch
- to using create object
- (add_record): switch to using create object
- (replace_record): switch to modify object
-
- * cal-client/cal-listener.h: add signals
-
- * cal-client/cal-listener.c (impl_notifyObjectsReceived):
- implement listener method
- (build_object_list): ditto
- (cal_listener_class_init): create receive_objects and send_objects
- signals
-
- * cal-client/cal-client.h: add, update protos
-
- * cal-client/cal-client.c (cal_objects_received_cb):
- receive_objects callback
- (cal_objects_sent_cb): send_objects callback
- (cal_client_init): listen for above signals
- (cal_client_create_object): pass back uid
- (cal_client_receive_objects): implement
- (cal_client_send_objects): ditto
-
- * idl/evolution-calendar.idl: add receive/send objects methods and
- yank updateObjects
-
- * pcs/cal.h: add protos
-
- * pcs/cal.c (impl_Cal_receiveObjects): implement
- (impl_Cal_sendObjects): ditto
- (cal_class_init): add epv methods
- (cal_notify_objects_received): notify of objects received call,
- updating queries
- (cal_notify_objects_sent): notify of objects sent
-
- * pcs/cal-backend.h: remove proto
-
- * pcs/cal-backend.c (cal_backend_class_init): remove obj_updated
- signal
- (cal_backend_class_init): init vmethods properly
- (cal_backend_receive_objects): call through
- (cal_backend_send_objects): ditto
-
- * pcs/cal-backend-sync.h: add protos, vmethods
-
- * pcs/cal-backend-sync.c (cal_backend_sync_receive_objects): call
- through
- (cal_backend_sync_send_objects): ditto
- (_cal_backend_receive_objects): call backend method and notify
- (_cal_backend_send_objects): ditto
- (cal_backend_sync_class_init): override send/receive object
- vmethods
-
- * pcs/cal-backend-file.c (cal_backend_file_class_init): set
- remove/send objects sync vmethods
- (cal_backend_file_create_object): remove call to dead method
- (cal_backend_file_remove_object): ditto
- (cal_backend_file_modify_object): ditto
- (cancel_received_object): cancel an object
- (check_tzids): check we have all the tzid's for the object
- (cal_backend_file_receive_objects): receive a bunch of objects via
- itip
- (cal_backend_file_send_objects): skeleton implementation
-
-2003-09-15 Rodrigo Moya <rodrigo@ximian.com>
-
- * idl/evolution-calendar.idl: added InvalidObject CallStatus.
-
- * pcs/cal-backend-file.c (cal_backend_file_create_object): implemented.
- (cal_backend_file_modify_object): implemented.
-
-2003-09-15 Harry Lu <harry.lu@sun.com>
-
- * gui/apps_evolution_calendar.schemas: change last_notification_time's
- type from string to int.
-
-2003-09-12 Bolian Yin <bolian.yin@sun.com>
-
- * e-week-view.c (e_week_view_focus): make jump button focusable
- (e_week_view_on_jump_button_event): key_press and focus event for jump button
- (e_week_view_jump_to_button_item): new function, jump to the day view.
- (e_week_view_is_jump_button_visible): new function.
-
-
-2003-09-12 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/cal.c (cal_notify_cal_address, cal_notify_alarm_email_address,
- cal_notify_ldap_attribute, cal_notify_static_capability):
- make sure we always notify listeners, regardless of whether the
- string is empty or not.
-
- * cal-client/cal-client.c (check_capability): guard against using
- NULL strings with strstr.
-
-2003-09-12 JP Rosevear <jpr@ximian.com>
-
- * cal-client/client-test.c (cal_opened_cb): listen for other query
- signals
-
- * cal-client/cal-listener.h: add signals
-
- * cal-client/cal-listener.c (impl_notifyObjectCreated): implement
- (impl_notifyObjectModified): implement
- (cal_listener_class_init): assign epv implementations
- (cal_listener_class_init): add create/modify object signals
-
- * cal-client/cal-client.h: add protos
-
- * cal-client/cal-client.c (cal_object_created_cb): object created
- callback
- (cal_object_modified_cb): object modified callback
- (cal_client_init): listen for create/modify object signals from
- the listener
- (cal_client_create_object): call the create object method
- (cal_client_modify_object): call the modify object method
-
- * cal-client/client-test.c (cal_opened_cb): listen for all the
- query signals, tidy
-
-2003-09-12 JP Rosevear <jpr@ximian.com>
-
- * pcs/cal.c (impl_Cal_createObject): implement
- (impl_Cal_modifyObject): ditto
- (cal_class_init): set epv methods for create/modify
-
- * pcs/cal-backend.h: add protos, vmethod
-
- * pcs/cal-backend.c (cal_backend_class_init): init new vmethods
- (cal_backend_create_object): call through
- (cal_backend_modify_object): ditto
-
- * pcs/cal-backend-sync.h: add protos, vmethods
-
- * pcs/cal-backend-sync.c (cal_backend_sync_create_object): call
- through
- (cal_backend_sync_modify_object): ditto
- (_cal_backend_create_object): create object and notify
- (_cal_backend_modify_object): modify object and notify
-
- * pcs/cal-backend-file.c (cal_backend_file_create_object):
- skeleton routine for creating objects
- (cal_backend_file_modify_object): ditto for modifying
-
- * idl/evolution-calendar.idl: add createObject and modifyObject
- calls
-
-2003-09-12 JP Rosevear <jpr@ximian.com>
-
- * pcs/cal.c (cal_notify_object_removed): its uid, not uids
-
-2003-09-12 JP Rosevear <jpr@ximian.com>
-
- * pcs/query.h: add protos
-
- * pcs/query.c (query_object_matches): use the sexp to check for a
- match
- (query_notify_objects_added_1): notify of one object added to
- query
- (query_notify_objects_modified_1): ditto for modification
- (query_notify_objects_removed_1): ditto for removal
-
- * pcs/cal.h: add protos
-
- * pcs/cal.c (cal_notify_object_created): notify of object creation
- (cal_notify_object_modified): notify of object modification
- (cal_notify_object_removed): use the _1 routines
-
- * pcs/cal-backend-file.c (match_recurrence_sexp): this returns a
- boolean
- (cal_backend_file_update_objects): don't signal removals here now
-
- * idl/evolution-calendar.idl: add object created and modified
- responses
-
-
-2003-09-11 JP Rosevear <jpr@ximian.com>
-
- * pcs/cal.h: update proto
-
- * pcs/cal.c (cal_notify_object_removed): notify relevant queries
- of removal
-
- * pcs/cal-backend.c (cal_backend_get_queries): ref the list before
- passing it back
-
- * pcs/cal-backend-sync.c (_cal_backend_remove_object): pass uid to
- notification
-
-2003-09-11 JP Rosevear <jpr@ximian.com>
-
- * pcs/cal-backend-file.c (match_recurrence_sexp): don't unref the
- component
-
- * cal-client/client-test.c (cal_opened_cb): listen to objects
- added signal
- (objects_added_cb): print the object uid
-
-2003-09-11 JP Rosevear <jpr@ximian.com>
-
- * pcs/cal-backend-object-sexp.c (cal_backend_object_sexp_text):
- return the base text
-
-2003-09-11 JP Rosevear <jpr@ximian.com>
-
- * gui/gnome-cal.c (update_query): fix c/p typo
-
-2003-09-11 JP Rosevear <jpr@ximian.com>
-
- * gui/gnome-cal.c (update_query): start the query
-
- * gui/e-cal-model.c (update_query_for_client): ditto
-
- * cal-client/client-test.c (cal_opened_cb): ditto
-
-2003-09-11 JP Rosevear <jpr@ximian.com>
-
- * cal-client/cal-query.h: add proto
-
- * cal-client/cal-query.c (cal_query_start): start the query
-
-2003-09-11 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/delete-error.c (delete_error_dialog): accept GError
- and base error messages on that
-
- * gui/dialogs/delete-error.h: update proto
-
- * gui/e-tasks.c (e_tasks_delete_completed): pass extra param to
- cal_client_remove_object
-
- * conduits/todo/todo-conduit.c (delete_record): ditto
-
- * conduits/calendar/calendar-conduit.c (process_multi_day): ditto
- (delete_record): ditto
-
- * gui/gnome-cal.c (gnome_calendar_purge): ditto
-
- * gui/dialogs/comp-editor.c (delete_comp): ditto
-
- * gui/e-cal-view.c (e_cal_view_cut_clipboard): pass the error to
- delete_error_dialog
- (delete_event): ditto
- (e_cal_view_delete_selected_occurrence): ditto
-
- * gui/e-itip-control.c (remove_item): ditto
-
- * gui/e-calendar-table.c (delete_selected_components): ditto
-
- * cal-client/cal-listener.h: add signal
-
- * cal-client/cal-listener.c (impl_notifyObjectRemoved): implement
- (cal_listener_class_init): set object removed implementation and
- create signal
-
- * cal-client/cal-client.h: update protos
-
- * cal-client/cal-client.c (cal_object_removed_cb): object removal
- callback
- (cal_client_init): listen for object removal signal
- (cal_client_remove_object_with_mod): make call synchronous
- (cal_client_remove_object): pass new params
-
- * pcs/cal.h: add proto
-
- * pcs/cal.c (impl_Cal_removeObject): just call the backend
- function
- (cal_notify_object_removed): notify of removal
-
- * pcs/cal-backend.h: remove and update protos, remove signal
-
- * pcs/cal-backend.c (cal_backend_class_init): kill obj_removed
- signal
- (cal_backend_remove_object): there is no return value now
-
- * pcs/cal-backend-sync.h: add vmethod, proto
-
- * pcs/cal-backend-sync.c (cal_backend_sync_remove_object): call
- through
- (_cal_backend_remove_object): remove the object and then do the
- notification
-
- * pcs/cal-backend-file.c (cal_backend_file_class_init): remove
- object is not part of the sync class
- (cal_backend_file_update_objects): there is no more removed signal
- (cal_backend_file_remove_object): return sync status codes
-
- * idl/evolution-calendar.idl: make removeObject oneway and and a
- notification method in the listener
-
-2003-09-11 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/query.[ch] (query_get_text): new function.
- (query_get_object_sexp): new function.
-
- * pcs/cal-backend-file.c (cal_backend_file_start_query): implemented.
-
-2003-09-11 Hans Petter Jansson <hpj@ximian.com>
-
- * cal-util/Makefile.am (libcal_util_la_LIBADD):
- libical-evolution.la -> libical.la
-
- * cal-util/cal-component.c (cal_component_get_classification)
- (cal_component_set_classification)
- (get_text_list)
- (get_icaltimetype)
- (get_datetime)
- (get_period_list)
- (get_recur_list)
- (cal_component_get_transparency)
- (cal_component_set_transparency): Adapt to new libical.
-
- * cal-util/cal-util.c (cal_util_event_dates_match): Ditto.
-
- * pcs/cal-backend-file.c (create_user_free_busy): Ditto.
-
- * gui/e-cal-model-tasks.c (get_completed)
- (get_due)
- (get_due_status): Ditto.
-
- * gui/e-cal-model.c (get_dtstart)
- (set_classification): Ditto.
-
- * gui/e-cal-model-calendar.c (get_dtend)
- (get_transparency)
- (set_transparency): Adapt to new libical and fix a comparison bug.
-
- * importers/Makefile.am (libevolution_calendar_importers_la_LIBADD):
- libical-evolution.la -> libical.la
-
-2003-09-11 Dan Winship <danw@ximian.com>
-
- * cal-util/Makefile.am (privlib_LTLIBRARIES): Remove
- libcal-util-static.la
-
- * cal-client/Makefile.am (noinst_LTLIBRARIES): Remove
- libcal-client-static.la
-
- * conduits/calendar/Makefile.am (libecalendar_conduit_la_LIBADD):
- use non-static libraries. The static ones were only needed for
- libtool 1.3.
-
- * conduits/todo/Makefile.am (libetodo_conduit_la_LIBADD): Likewise
-
- * gui/Makefile.am (IDL_GENERATED): Don't compile the calendar idl
- here. It's already in libcal-client.
-
-2003-09-11 Frederic Crozat <fcrozat@mandrakesoft.com>
-
- * conduits/todo/Makefile.am:
- Statically link with wombat. Fix ETodo conduit.
- (Mdk bug #5348)
-
-
-2003-09-10 JP Rosevear <jpr@ximian.com>
-
- * pcs/cal.h: update proto
-
- * pcs/cal.c (impl_Cal_getObjectList): just call the backend, it
- will do the notification now
- (cal_notify_object_list): the list is a list of strings
-
- * pcs/cal-backend.h: update vmethod, proto
-
- * pcs/cal-backend.c (cal_backend_get_object_list): call through
-
- * pcs/cal-backend-sync.h: add proto, vmethod
-
- * pcs/cal-backend-sync.c (cal_backend_sync_get_object_list): call
- through
- (_cal_backend_get_object_list): get the list of objects from the
- sync backend and do the notification
- (cal_backend_sync_class_init): set vmethod implementation
-
- * pcs/cal-backend-file.c (cal_backend_file_class_init): the get
- object list call is now part of the sync backend
- (cal_backend_file_get_object_list): return a status and put the
- object list in the passed in param
-
-2003-09-10 JP Rosevear <jpr@ximian.com>
-
- * pcs/cal-backend.c (cal_backend_finalize): unref the elist
- (cal_backend_init): init the query elist
-
-2003-09-10 JP Rosevear <jpr@ximian.com>
-
- * gui/gnome-cal.c (dn_query_objects_added_cb): match new query
- signals - just tag here
- (dn_query_objects_modified_cb): always retag
- (dn_query_objects_removed_cb): ditto
- (update_query): connect to new signals
- (gnome_calendar_destroy): we don't keep a list of expunging
- queries
- (gnome_calendar_purge): no need to do the
- expunge async, just get the object list immediately
-
- * gui/e-tasks.c (e_tasks_delete_completed): no need to do the
- expunge async, just get the object list immediately
-
- * gui/e-cal-model.c (query_objects_added_cb): callback for objects
- added to the query
- (query_objects_modified_cb): ditto for modifications
- (query_objects_removed_cb): ditto for removed
- (query_progress_cb): progress of the query
- (query_done_cb): query is done
- (update_query_for_client): connect to the new signals
-
- * cal-client/client-test.c (cal_opened_cb): run a query
-
- * cal-client/cal-query.c: we are given the listener now - listen
- for signals from the listener and emit signals matching the api
- changes
-
- * cal-client/query-listener.[hc]: rewrite to match new query
- listener methods and emit signals rather than using function
- callbacks
-
- * cal-client/cal-marshal.list: add to marshallers
-
- * cal-client/cal-listener.h: add query signal
-
- * cal-client/cal-listener.c (impl_notifyQuery): implement
- (cal_listener_class_init): set notifyQuery method
- (cal_listener_class_init): add query signal
-
- * cal-client/cal-client.h: update protos
-
- * cal-client/cal-client.c (cal_query_cb): handle response to
- getQuery
- (cal_client_init): listen for query signal
- (cal_client_get_query): get a query from the calendar
-
- * pcs/query.h: update protos
-
- * pcs/query.c: rewrite to implement the query start method and
- provide notification calls
-
- * pcs/cal.h: add proto
-
- * pcs/cal.c (impl_Cal_getQuery): re-implement so the backend
- doesn't create the query for us
- (cal_notify_query): respond with the query
-
- * pcs/cal-factory.c: re-order includes
-
- * pcs/cal-common.h: add types
-
- * pcs/cal-backend.h: update protos, vmethods
-
- * pcs/cal-backend.c (cal_backend_class_init): init start_query
- vmethod
- (cal_backend_finalize): free mutex
- (cal_backend_start_query): call through
- (cal_backend_add_query): add a query to the list the backend is
- running
- (cal_backend_get_queries): get the query list
-
- * pcs/cal-backend-object-sexp.h: add proto
-
- * pcs/cal-backend-file.c (cal_backend_file_start_query): skeleton
- for new backend implementation
-
- * pcs/Makefile.am: don't build dead files
-
- * idl/evolution-calendar.idl: make the getQuery call async, make
- the query listener calls oneway and match the addressbook
-
-2003-09-09 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/cal-backend-file.c (cal_backend_file_get_object_component):
- added case for getting the individual recurrences if 'rid' is
- not NULL,
-
-2003-09-09 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/cal-backend-file.c (match_object_sexp): expand recurrences
- for recurrent objects.
- (match_recurrence_sexp): add the recurrences that match the query
- expression to the object list.
-
-2003-09-08 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/cal-backend-file.c: don't store all recurrences in the
- private structure.
-
-2003-09-04 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-day-view.c (process_component):
- * gui/e-week-view.c (process_component): dont expand recurrences,
- since they are now expanded by the backends.
-
-2003-09-02 JP Rosevear <jpr@ximian.com>
-
- * gui/tasks-control.c (sensitize_commands): adapt to cal-client
- threaded sync api changes
-
- * gui/itip-utils.c (itip_organizer_is_user): ditto
-
- * gui/gnome-cal.c (gnome_calendar_purge): ditto
-
- * gui/e-meeting-model.c (process_section): ditto
-
- * gui/e-calendar-table.c (e_calendar_table_show_popup_menu): ditto
-
- * gui/e-cal-view.c (e_cal_view_create_popup_menu): ditto
-
- * gui/calendar-commands.c (sensitize_calendar_commands): ditto
- (sensitize_taskpad_commands): ditto
-
- * gui/dialogs/task-editor.c (set_menu_sens): ditto
-
- * gui/dialogs/meeting-page.c (meeting_page_construct): ditto
-
- * gui/dialogs/event-editor.c (set_menu_sens): ditto
-
- * gui/dialogs/alarm-page.c (add_clicked_cb): ditto
-
- * conduits/calendar/calendar-conduit.c (pre_sync): convert to
- cal_client api changes
-
- * conduits/todo/todo-conduit.c (pre_sync): ditto
-
- * cal-client/client-test.c (list_uids): match new error handling
-
- * cal-client/cal-marshal.list: marshallers
-
- * cal-client/cal-listener.[hc]: emit signals for corba listener
- callbacks - start with is_read_only, get_static_capabilities,
- get_cal_address, get_ldap_attribute, open, remove and object_list
-
- * cal-client/cal-client.h: move the status enum away from here,
- update protos to new thread sync api standard
-
- * cal-client/cal-client.c: the listener emits signals instead of
- using callback functions now and we return booleans + GError in
- outs for results
- (e_calendar_error_quark): for GError handling
- (cal_read_only_cb): handle listener op callback
- (cal_cal_address_cb): ditto
- (cal_alarm_address_cb): ditto
- (cal_ldap_attribute_cb): ditto
- (cal_static_capabilities_cb): ditto
- (cal_opened_cb): ditto
- (cal_removed_cb): ditto
- (cal_object_list_cb): ditto
-
- * cal-client/cal-client-types.h: add GError stuff
-
- * cal-client/Makefile.am: build glib marshal stuff
-
- * pcs/query.c (backend_opened_cb): comment out some break
- temporarily
-
- * pcs/cal.h: add protos
-
- * pcs/cal.c (impl_Cal_open): just call the backend method, it will
- handle the notification
- (impl_Cal_remove): ditto
- (impl_Cal_isReadOnly): ditto
- (impl_Cal_getCalAddress): ditto
- (impl_Cal_getAlarmEmailAddress): ditto
- (impl_Cal_getLdapAttribute): ditto
- (impl_Cal_getStaticCapabilities): ditto
- (impl_Cal_getObjectList): simplify
- (cal_new): set poa to be threaded
- (cal_notify_read_only): notification utils
- (cal_notify_cal_address): ditto
- (cal_notify_alarm_email_address): ditto
- (cal_notify_ldap_attribute): ditto
- (cal_notify_static_capabilities): ditto
- (cal_notify_open): ditto
- (cal_notify_remove): ditto
- (cal_notify_object_list): ditto
-
- * pcs/cal-factory.c (impl_CalFactory_getCal): dup the key and the
- object
- (cal_factory_new): set poa to be threaded
-
- * pcs/cal-backend.h: update vmethods and protos
-
- * pcs/cal-backend.c (cal_backend_get_cal_address): we no longer
- return anything - the callee is responsible for notification
- (cal_backend_get_alarm_email_address): ditto
- (cal_backend_get_ldap_attribute): ditto
- (cal_backend_get_static_capabilities): ditto
- (cal_backend_open): ditto
- (cal_backend_remove): ditto
-
- * pcs/cal-backend-file.h: update inheritance
-
- * pcs/cal-backend-file.c: inherit from CalBackendSync and make
- is_read_only, get_static_capabilities, get_cal_address, get_ldap_attribute, open and
- remove match
-
- * pcs/Makefile.am: build new files
-
-2003-09-02 JP Rosevear <jpr@ximian.com>
-
- * idl/evolution-calendar.idl: make all listener callbacks one ways
-
-2003-09-02 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/cal-backend-file.c (match_recurrence_sexp, match_object_sexp):
- new callbacks for g_hash_table_foreach in get_object_list.
- (cal_backend_file_get_object_list): don't use the priv->comp list
- to check the components, use the hash table, which contains all
- the recurrences already expanded.
- (add_component): only expand recurrences for recurrent components.
-
-2003-09-01 Andrew Wu <Yang.Wu@sun.com>
-
- * gui/e-day-view.c:
- (e_day_view_change_event_end_time_up):
- (e_day_view_change_event_end_time_down): Use
- "ctrl+shift+alt+Up/Down" to change the end time of the editing
- event.
-
-2003-08-29 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/cal-backend-file.c (lookup_component): take into account the 'rid'
- argument.
- (get_rid_string): new function to convert the recurrence ID to string.
- (add_recurrence_to_object): callback for cal_recur_generate_instances.
- (add_component): expand recurrences and g_strdup the hash's key.
- (free_cal_component): free also the hash's key.
-
-2003-08-28 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/alarm-notify/alarm-queue.c (tray_icon_blink_cb)
- (display_notification): Use images that come with Evolution instead
- of unreleased stock, for now.
-
-2003-08-28 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/alarm-notify/util.[ch]: Added alarm-notify utils.
-
- * gui/alarm-notify/Makefile.am: Added alarm-notify utils.
-
- * gui/alarm-notify/alarm-notify-dialog.c (timet_to_str_with_zone):
- Move to util.c.
-
- * gui/alarm-notify/alarm-queue.c (notify_dialog_cb)
- (on_dialog_removed_cb)
- (notify_dialog_cb)
- (tray_icon_destroyed_cb)
- (tray_icon_clicked_cb)
- (tray_icon_blink_cb)
- (display_notification): Add Rodrigo Moya's code for tray icon
- notification of appointments, with some fixes and blink code by me.
- Requires HEAD gnome-icon-theme for now.
-
-2003-08-27 Hans Petter Jansson <hpj@ximian.com>
-
- Fixes #29032.
-
- * gui/dialogs/task-details-page.c (status_changed): When task status
- is set to "In Progress", set percent complete to 50% only if it was
- previously set to 0% or 100%.
-
-2003-08-27 Bolian Yin <bolian.yin@sun.com>
-
- * gui/Makefile.am use libevolution-calendar-a11y instead of libevolution-a11y.
-
-2003-08-26 Jack Jia <jack.jia@sun.com>
-
- ** Fixes #47863.
-
- * gui/alarm-notify/alarm-notify.c (AlarmNotify_removeCalendar): set
- the initial value of lc_ptr and orig_str_ptr to NULL to avoid crash.
-
-
-2003-08-26 Rodrigo Moya <rodrigo@ximian.com>
-
- * idl/evolution-calendar.idl: QueryListener::notifyObjUpdated now gets
- a sequence of CalObj's.
-
- * pcs/query.c (add_component): send the whole object to the listener,
- not just the UID. Improved the way the listeners are notified, by allocating
- a CORBA sequence to be used for all listeners, not one for each.
- (match_component): pass the CalComponent to add_component, not only the UID.
- (start_cached_query_cb): send the whole object to the listener.
-
- * cal-client/cal-query.[ch]: changed argument names for "obj_updated"
- signal.
- (obj_updated_cb): pass the calobj's, not uid's.
-
- * gui/e-tasks.c (query_obj_updated_cb):
- * gui/gnome-cal.c (dn_query_obj_updated_cb, purging_obj_updated_cb):
- * gui/e-cal-model.c (query_obj_updated_cb): we now get the object's
- string representation instead of the UID.
-
-2003-08-25 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-client/cal-client.c (cal_client_get_object): added a 'rid' argument
- to match the IDL method.
-
- * conduits/calendar/calendar-conduit.c (local_record_from_uid):
- * conduits/todo/todo-conduit.c (local_record_from_uid):
- * gui/comp-editor-factory.c (edit_existing):
- * gui/comp-util.c (cal_comp_is_on_server):
- * gui/e-cal-model.c (query_obj_updated_cb):
- * gui/e-itip-control.c (find_server, get_real_item, update_attendee_status):
- * gui/gnome-cal.c (dn_query_obj_updated_cb, purging_obj_updated_cb):
- * gui/dialogs/comp-editor.c (obj_updated_cb): adapted to changes in
- cal_client_get_object().
-
-2003-08-23 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/query-backend.c (object_updated_cb):
- * pcs/cal-backend.c (cal_backend_get_type_by_uid): use 'rid' parameter
- where appropriate.
-
- * pcs/cal-backend-file.c (check_dup_uid): removed unused variables.
- (cal_backend_file_compute_changes_foreach_key): pass a NULL 'rid'
- to cal_backend_get_object().
- (lookup_component): get a 'rid' argument also.
- (cal_backend_file_cancel_object, cal_backend_file_remove_object):
- pass correct number of parameters to lookup_component().
-
-2003-08-22 Rodrigo Moya <rodrigo@ximian.com>
-
- * idl/evolution-calendar.idl: use UID/RID pairs to identify objects.
-
- * pcs/cal.c (impl_Cal_getObject): added 'rid' parameter.
-
- * pcs/cal-backend.c (cal_backend_get_object): added 'rid' parameter.
- (cal_backend_get_object_component): ditto.
- (get_object): ditto.
-
- * pcs/cal-backend-file.c (cal_backend_file_get_object_component):
- added 'rid' parameter.
- (lookup_component): added 'rid' parameter and made it search for the
- recurrence when that parameter is not NULL.
- (cal_backend_file_get_alarms_for_object, cal_backend_file_update_object):
- adapted to changes in lookup_component().
-
-2003-08-22 Frederic Crozat <fcrozat@mandrakesoft.com>
-
- * gui/alarm-notify/notify-main.c: (main):
- Ensure we get UTF-8 strings from gettext.
-
-2003-08-22 Bolian Yin <bolian.yin@sun.com>
-
- Fixes #47779
-
- * gnome-cal.c (gnome_calendar_get_visible_time_range): fix the return value bug.
-
-2003-08-21 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-client/cal-client.[ch] (cal_client_send_object): use a 'char **'
- for the 'error_msg' argument, instead of a fixed size string.
-
- * gui/itip-utils.c (comp_server_send): pass the correct parameter to
- cal_client_send_object.
-
-2002-08-20 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/e-itip-control.c (start_defalt_server): Rename to
- start_default_server_async () and don't run a nested main loop. Let
- the caller deal with the client object and signals.
- (default_server_started_cb): Implement. Async signal handler for
- 'cal_opened' signal, does the embedding.
- (object_requested_cb): Rewritten to work asynchronously, and finish
- the embedding when default_server_started_cb() is called.
-
-2003-08-20 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-calendar-table.c (setup_popup_icons): new function to set icons
- on the popup menu items.
- (e_calendar_table_show_popup_menu): call setup_popup_icons.
-
- * gui/e-cal-view.c (setup_popup_icons): set more icons for the
- popup menu.
-
-2003-08-20 Bolian Yin <bolian.yin@sun.com>
-
- * gui/Makefile.am : Add a11y dependency.
- * gui/calendar-commands.c (calendar_get_text_for_folder_bar_label)
- * gui/e-cal-view.c: Add two new events: "event_changed" and "event_added"
- * gui/e-day-view.c (e_day_view_class_init): init a11y.
- (e_day_view_find_event_from_item): make it public from private
- (e_day_view_update_event_cb): emit "event_changed" signal
- (e_day_view_reshape_day_event): emit "event_added" signal
- (e_day_view_reshape_long_event): emit "event_added" signal
- * gui/e-week-view.c (e_week_view_class_init): init a11y.
- (e_week_view_find_event_from_item): make it public from private
- (e_week_view_update_event_cb): emit "event_changed" signal
- (e_week_view_reshape_event_span): emit "event_added" signal
- * gui/gnome-cal.c (gnome_calendar_class_init): init a11y.
- (gnome_calendar_get_e_calendar_widget),
- (gnome_calendar_get_search_bar_widget),
- (gnome_calendar_get_view_notebook_widget): new functions
-
-
-2003-08-20 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/query-backend.c (foreach_uid_cb): use the icalcomponent
- to call icalcomponent_get_uid, not the string.
-
-2003-08-20 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/cal-backend-file.c: store objects by UID and RID.
- (free_object): new function to free the CalBackendFileObject structure.
- (cal_backend_file_dispose): use free_object callback to remove the
- objects in the comp_uid_hash.
- (lookup_component): search correctly the component in the new hash
- table organizarion.
- (check_dup_uid): ditto.
- (add_component): ditto.
- (remove_component): ditto.
-
-2003-08-19 JP Rosevear <jpr@ximian.com>
-
- * gui/gnome-cal.c (setup_widgets): set up models here
- (gnome_calendar_construct): not here
-
- * conduits/calendar/calendar-conduit.c
- (e_calendar_context_destroy): we have a list of calcomponents
- rather than uids now
- (process_multi_day): build a list of components rather than uids
- (pre_sync): use get_object_list instead of getting uids
- (for_each): create local records from calcomponents
-
- * conduits/todo/todo-conduit.c: as above
-
- * gui/print.c (instance_cb): mark as true if we found an instance
- (print_month_small): see if atleast one instance exists in a
- slight different way
-
- * cal-client/client-test.c (list_uids): use get_object_list
-
- * cal-client/cal-listener.h: update protos
-
- * cal-client/cal-listener.c (cal_listener_class_init): set object
- list callback implementation
- (impl_notifyObjectListRequested): implement
- (cal_listener_construct): take object list callback function
- (cal_listener_new): ditto
-
- * cal-client/cal-client.h: update protos, add status
-
- * cal-client/cal-client.c (e_calendar_new_op): create new op
- (e_calendar_get_op): retrieve current op
- (e_calendar_free_op): free the op
- (e_calendar_remove_op): clear current op
- (cal_client_init): create new mutex
- (cal_client_finalize): destroy mutex
- (build_object_list): build list of icalcomponents
- (cal_object_list_cb): handle getObjectList response
- (real_open_calendar): pass extra listener arg
- (cal_client_get_object_list): implement using thread safe mutex
- locking
- (cal_client_get_object_list_as_comp): return calcomponents instead
- of icalcomponents
- (cal_client_generate_instances): just get the object list - no
- need to make it atomic since get_object_list is already atomic
-
- * pcs/query.c (query_finalize): free new sexp class
- (parse_sexp): use new sexp class
- (match_component): ditto
-
- * pcs/query-backend.c (foreach_uid_cb): use icalcomponent to
- extract uid
- (query_backend_new): get all objects using object list call
-
- * pcs/cal.c (impl_Cal_getObjectList): implement
- (cal_class_init): adjust for idl method changes
-
- * pcs/cal-backend.h: update vmethods, add proto
-
- * pcs/cal-backend.c (cal_backend_class_init): remove get_uids and
- get_objects_in_range vmethods, add get_object_list vmethod
- (cal_backend_get_object_list): call through to vmethod implementation
-
- * pcs/cal-backend-object-sexp.[hc]: nice class to represent a sexp
- and search cal components
-
- * pcs/cal-backend-file.c (cal_backend_file_class_init): remove
- get_uids and get_objects_in_range calls and set get_object_list
- call
- (cal_backend_file_get_object_list): implement
- (create_user_free_busy): use sexp ops to implement
- (cal_backend_file_compute_changes): just iterate over the
- component list rather than fetching uids
-
- * pcs/Makefile.am: build new files
-
- * idl/evolution-calendar.idl: make opening a oneway call, add
- getObjectList call, remove getUIDS and getObjectsInRange call -
- both can be done with getObjectList; make listener callbacks
- oneway
-
-2003-08-19 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/gnome-cal.c (gnome_calendar_purge): don't leak the client list.
- (gnome_calendar_destroy): disconnect from all callbacks on all
- loaded clients.
-
-2003-08-19 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-cal-model-tasks.c (ecmt_get_color_for_component): use
- "black" for normal tasks, since the light colors from the palette
- are too light.
-
- * gui/gnome-cal.c (gnome_calendar_purge): don't leak the client list.
- (gnome_calendar_destroy): disconnect from all callbacks on all
- loaded clients.
-
-2003-08-18 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-day-view.c: fixed the problem with a new event being
- created for each keystroke.
- (e_day_view_add_event): don't create a new default component, use
- the one we get as parameter.
- (e_day_view_do_key_press): get the UID from the icalcomponent.
-
- * gui/e-week-view.c (e_week_view_add_event, e_week_view_do_key_press):
- same as e-day-view.c
-
-2003-08-18 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/calendar-component.c (impl_createControls): Oops, pass
- [NULL, NULL] to gtk_scrolled_window_new().
-
-2003-08-18 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/main.c (factory): Ref the object from
- calendar_component_peek() before returning it.
-
-2003-08-17 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/control-factory.h: #include <bonobo/bonobo-control.h>.
-
- * gui/Makefile.am (libevolution_calendar_la_LIBADD): Link to
- libeutil.
-
- * gui/e-calendar-table.c (e_calendar_table_set_status_message):
- Don't use the global_shell_client.
-
- * gui/main.c (factory): Call calendar_component_peek() for the
- GNOME_Evolution_Calendar_Component OAFIID.
-
- * gui/GNOME_Evolution_Calendar.server.in.in: Set up the
- GNOME_Evolution_Calendar_Component server and rename
- GNOME_Evolution_Calendar_Factory to
- GNOME_Evolution_Calendar_Factory_2.
- * gui/main.c: Updated IDs accordingly.
-
- * gui/e-meeting-time-sel.c (e_meeting_time_selector_construct):
- Use calendar_component_peek_config_directory() instead of
- evolution_dir.
- * gui/gnome-cal.c (setup_widgets): Likewise.
- (gnome_calendar_destroy): Likewise.
- * gui/dialogs/meeting-page.c (meeting_page_construct): Likewise.
-
- * gui/gnome-cal.c (gnome_calendar_open): #if 0 some code for
- figuring out where the task list is.
-
- * gui/calendar-component.c: New file.
- * gui/calendar-component.h: New file.
-
- * gui/itip-utils.c (itip_addresses_get): Unref the GConf client
- from gconf_client_get_default.
-
-2003-08-15 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-cal-model.c (ecm_get_color_for_component): use tigert's
- new color palette.
- (cal_removed_cb): when a client is removed, remove it from the model.
- (backend_died_cb): remove it also when the backend dies.
- (add_new_client): connect to new signals for CalClient's.
-
-2003-08-15 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-cal-model.c (e_cal_model_finalize): don't unref the
- 'accounts' field, since it is internal to itip-utils.c.
-
- * gui/alarm-notify/alarm-notify.c (alarm_notify_add_calendar):
- initialize all fields of the LoadedClient struct before calling
- cal_client_open_calendar(), since the "cal_opened_cb" signal is
- now emitted within it.
-
-2003-08-14 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-cal-model.[ch] (e_cal_model_free_component_data): new
- function.
-
- * gui/e-cal-view.h: added 'allocated_comp_data' field to the
- ECalViewEvent structure.
-
- * gui/e-day-view.c (e_day_view_add_event): allocate the event's
- ECalModelComponent if it hasn't been set.
- (e_day_view_update_event_cb, e_day_view_remove_event_cb,
- e_day_view_free_event_array): if the ECalModelComponent has
- been allocated by the view, free it here.
-
- * gui/e-week-event.c (e_week_view_add_event,
- e_week_view_update_event_cb, e_week_view_remove_event_cb,
- e_week_view_free_events): same as EDayView.
-
-2003-08-14 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-cal-model.c (e_cal_model_create_component_with_defaults):
- use the default client to call cal_comp_*_new_with_defaults, and
- if no client is available, just create an empty icalcomponent.
-
- * gui/e-cal-view.c (e_cal_view_init): create an empty model.
-
- * gui/e-week-view.c (e_week_view_add_event): use the event's client.
-
-2003-08-13 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/gnome-cal.c (gnome_calendar_open): unref the client if there
- is an error.
- (update_query): set status bar messages for progress.
- (update_query_timeout): re-enabled.
- (client_cal_opened_cb): install timeout handler for the query updates.
-
- * gui/e-cal-view.c (e_cal_view_set_model): connect to all appropriate
- signals on the model, to be called for every change.
- (model_row_changed_cb, model_rows_changed_cb): new model callbacks.
-
- * gui/e-week-view-event-item.c (e_week_view_event_item_draw): colorize
- the background for multiple days events.
-
-2003-08-13 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-cal-model.c (ecm_append_row, ecm_get_color_for_component):
- * gui/e-cal-model-tasks.c (ecmt_get_color_for_component): merged
- missing bith from calendar-views-with-model branch.
-
-2003-08-13 JP Rosevear <jpr@ximian.com>
-
- * cal-client/cal-client.c (real_open_calendar): set the priv->cal
- pointer in a slightly different spot so we have it in the call
- back
-
- * gui/e-cal-model.c (e_cal_model_get_client_list): merge this in
- properly
-
-2003-08-13 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-cal-model.c (ecm_get_color_for_component): assign the colors
- based on the URI, which is stored in a common place for all models.
- Thus different views will use the same color for the same calendar.
-
- * gui/e-week-view-event-item.c (e_week_view_event_item_draw): draw
- a filled rectangle and a black border around it for one-day events.
-
- * gui/e-day-view-top-item.c (e_day_view_top_item_draw_long_event):
- fill the rectangle for the item with its associated color.
-
-2003-08-13 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/gnome-cal.c (gnome_calendar_open): unref the client if there
- is an error.
- (update_query): set status bar messages for progress.
- (update_query_timeout): re-enabled.
- (client_cal_opened_cb): install timeout handler for the query updates.
-
- * gui/e-cal-view.c (e_cal_view_set_model): connect to all appropriate
- signals on the model, to be called for every change.
- (model_row_changed_cb, model_rows_changed_cb): new model callbacks.
-
- * gui/e-week-view-event-item.c (e_week_view_event_item_draw): colorize
- the background for multiple days events.
-
-2003-08-13 JP Rosevear <jpr@ximian.com>
-
- * cal-client/client-test.c (create_client): there is no more
- object updated signal
-
- * cal-client/cal-listener.c: clean up comment
-
- * cal-client/cal-client.c (cal_client_class_init): remove
- obj_updated and obj_removed signals
-
- * cal-client/cal-client.h: ditto
-
-2003-08-12 JP Rosevear <jpr@ximian.com>
-
- * pcs/cal-backend.h: remove get_uri vmethod
-
- * pcs/cal-backend.c (cal_backend_class_init): remove get_uri
- vmethod init
-
- * pcs/cal-backend-file.c (cal_backend_file_class_init): no longer
- a get uri vmethod
- (cal_backend_file_get_uri): remove implementation of above
-
-2003-08-12 JP Rosevear <jpr@ximian.com>
-
- * cal-client/client-test.c (main): use tmp uris
-
- * cal-client/cal-listener.h: update protos
-
- * cal-client/cal-listener.c (cal_listener_init): init removed
- function
- (cal_listener_finalize): clear removed function
- (impl_notifyCalOpened): take file status
- (impl_notifyCalRemoved): implement
- (cal_listener_construct): take remove function arg
- (cal_listener_new): ditto
-
- * cal-client/cal-client.h: update protos, add remove status
-
- * cal-client/cal-client.c
- (cal_client_remove_status_enum_get_type): add remove status type
- (cal_client_class_init): add removed signal
- (cal_opened_cb): can no longer get unsupported exception here
- (cal_removed_cb): emit removed status
- (real_open_calendar): pass removed callback function to listener
- (get_fall_back_uri): no longer append tasks.ics or calendar.ics
- (cal_client_remove_calendar): new c wrapper for corba function -
- calendar must be open currently
-
- * pcs/query.c (backend_opened_cb): only disconnect the open
- callback
- (backend_removed_cb): handle calendar removal
- (query_construct): listen for remove signal as well
-
- * pcs/cal.h: cal no longer takes uri during construction
-
- * pcs/cal.c (backend_to_listener_status): convert backend to corba
- status code
- (impl_Cal_open): backend open no longer takes uri, use above to
- send back status
- (impl_Cal_remove): implement
- (cal_construct): we no longer track the uri
- (cal_finalize): ditto
- (cal_class_init): set remove epv method
-
- * pcs/cal-factory.c (impl_CalFactory_getCal): instantiate backend
- with uri and kind properties
-
- * pcs/cal-backend.h: list file status enum, add protos
-
- * pcs/cal-backend.c (cal_backend_set_property): implement object
- properties
- (cal_backend_get_property): ditto
- (cal_backend_class_init): add properties vmethods and uri, kind
- properties, removed signal
- (cal_backend_get_uri): don't get the uri from the backend
- (cal_backend_get_kind): get the kind from the backend
- (cal_backend_open): adapt to new open call, no uri passed in
- (cal_backend_remove): call through to remove implementation
- (cal_backend_opened): use new file status
- (cal_backend_removed): emit removed signal
-
- * pcs/cal-backend-file.h: update protos
-
- * pcs/cal-backend-file.c (cal_backend_file_class_init): override
- remove vmethod
- (cal_backend_file_init): default file name to calendar.ics
- (cal_backend_file_set_file_name): accessor for filename tacked on
- to uri
- (cal_backend_file_get_file_name): ditto
- (open_cal): return "file" type status codes
- (create_cal): ditto
- (get_uri_string): construct the full uri string
- (cal_backend_file_open): use above
- (cal_backend_file_remove): implement
-
- * pcs/cal-backend-file-todos.c (cal_backend_file_todos_init): set
- the file name to tasks.ics
-
- * pcs/cal-backend-file-events.c (cal_backend_file_events_init):
- set the file name to calendar.ics
-
- * cal-util/cal-util.c (cal_util_expand_uri): just return a copy of
- the uri now
-
- * idl/evolution-calendar.idl: convert OpenStatus to FileStatus so
- remove() can use it as well
-
- * gui/gnome-cal.c (gnome_calendar_open): just open the default
- folder in all cases
-
-2003-08-12 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-util/cal-util.[ch] (cal_util_component_has_alarms): new function.
-
- * gui/gnome-cal.[ch]:
- * gui/goto.c:
- * gui/itip-bonobo-control.c:
- * gui/print.c:
- * gui/e-week-view.[ch]:
- * gui/e-day-view.[ch]: lots of fixes to make all compile with no
- warnings.
-
-2003-08-12 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-util/cal-util.[ch] (cal_util_component_has_organizer):
- new function.
-
- * gui/e-day-view-main-item.c:
- * gui/e-day-view-top-item.c:
- * gui/e-week-view-event-item.c:
- * gui/e-week-view.c: adaptated to changes in ECalViewEvent.
-
- * gui/e-cal-model.[ch] (e_cal_model_get_client_list): new function.
- (ecm_append_row): fixed usage of icalcomponent variable.
-
- * gui/e-cal-view.c (e_cal_view_class_init): removed unused variable.
- (selection_received): use default client for pasting from clipboard.
- (e_cal_view_cut_clipboard): cut the appointment from its client.
- (e_cal_view_copy_clipboard, delete_event, on_save_as, om_print_event,
- e_cal_view_delete_selected_occurrence, on_meeting, on_forward,
- e_cal_view_create_popup_menu): adapted to changes in ECalViewEvent.
- (e_cal_view_delete_selected_event, e_cal_view_delete_selected_events):
- pass the ECalViewEvent to delete_event, so that it knows which
- CalClient to use.
- (on_edit_appointment): pass CalClient and icalcomponent to
- gnome_calendar_edit_object.
- (on_publish): publish F/B info for all the clients currently loaded
- in the view.
- (setup_popup_icons): added missing argument to gtk_image_new_from_stock.
-
- * gui/calendar-commands.c (publish_freebusy_cmd): publish F/B info
- for all the clients currently loaded in the view.
- (sensitize_calendar_commands): use icalcomponent functions.
-
- * gui/e-day-view.c:
- * gui/comp-editor-factory.c (impl_editExisting):
- * gui/calendar-offline-handler.c (backend_cal_opened_online):
- * gui/e-alarm-list.c (e_alarm_list_finalize):
- * gui/e-cal-model-tasks.c (ecmt_get_color_for_component):
- * gui/e-date-time-list.c (e_date_time_list_finalize):
- * gui/control-factory.c (get_prop): fixed warnings.
-
-2003-08-12 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/calendar-offline-handler.c (impl_dispose): Chain. Prevent
- double unrefs.
- (impl_finalize): Chain.
-
- * gui/e-alarm-list.c (finalize): Chain.
-
- * gui/e-comp-editor-registry.c (destroy): Chain. Prevent double frees.
- (editor_destroy_cb): Don't crash if we get the destroy signal twice.
-
- * gui/e-date-time-list.c (e_date_time_list_finalize): Chain.
-
- * gui/e-meeting-attendee.c (finalize): Chain.
-
- * gui/e-meeting-model.c (finalize): Chain.
-
-2003-08-12 Andrew Wu <Yang.Wu@sun.com>
-
- * gui/e-day-view.c
- (e_day_view_change_duration_to_start_of_work_day):
- In DayView, Shift+Home, Change the duration to the time
- that begins the current work day.
- (e_day_view_change_duration_to_end_of_work_day):
- In DayView, Shift+End, Change the duration to the time
- that ends the current work day
-
-2003-08-12 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/e-itip-control.c (html_destroyed):
- (init):
- (write_html): Add destroy chaining.
-
-2003-08-12 Andrew Wu <Yang.Wu@sun.com>
-
- * gui/e-week-view.c
- (e_week_view_on_key_up):
- (e_week_view_on_key_down):
- (e_week_view_on_key_left):
- (e_week_view_on_key_right):
- In the WeekView, Navigation through days with arrow keys.
-
-2003-08-12 Harry Lu <harry.lu@sun.com>
-
- ** fixes #47464.
-
- * gui/dialogs/meeting-page.c: (get_widgets): The Organizer's value
- need not match one of the values in the list.
-
-2003-08-12 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-day-view.c (e_day_view_update_query):
- * gui/e-week-view.c (e_week_view_update_query): remove the status bar
- messages when the operation is finished.
-
- * gui/e-day-view-main-item.c (e_day_view_main_item_draw_day_event):
- draw a rectangle filled with the color associated with the event's
- calendar.
-
-2003-08-12 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-util/cal-util.[ch] (cal_util_component_has_alarms): new function.
-
- * gui/gnome-cal.[ch]:
- * gui/goto.c:
- * gui/itip-bonobo-control.c:
- * gui/print.c:
- * gui/e-week-view.[ch]:
- * gui/e-day-view.[ch]: lots of fixes to make all compile with no
- warnings.
-
-2003-08-12 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-util/cal-util.[ch] (cal_util_component_has_organizer):
- new function.
-
- * gui/e-day-view-main-item.c:
- * gui/e-day-view-top-item.c:
- * gui/e-week-view-event-item.c:
- * gui/e-week-view.c: adaptated to changes in ECalViewEvent.
-
- * gui/e-cal-model.[ch] (e_cal_model_get_client_list): new function.
- (ecm_append_row): fixed usage of icalcomponent variable.
-
- * gui/e-cal-view.c (e_cal_view_class_init): removed unused variable.
- (selection_received): use default client for pasting from clipboard.
- (e_cal_view_cut_clipboard): cut the appointment from its client.
- (e_cal_view_copy_clipboard, delete_event, on_save_as, om_print_event,
- e_cal_view_delete_selected_occurrence, on_meeting, on_forward,
- e_cal_view_create_popup_menu): adapted to changes in ECalViewEvent.
- (e_cal_view_delete_selected_event, e_cal_view_delete_selected_events):
- pass the ECalViewEvent to delete_event, so that it knows which
- CalClient to use.
- (on_edit_appointment): pass CalClient and icalcomponent to
- gnome_calendar_edit_object.
- (on_publish): publish F/B info for all the clients currently loaded
- in the view.
- (setup_popup_icons): added missing argument to gtk_image_new_from_stock.
-
- * gui/calendar-commands.c (publish_freebusy_cmd): publish F/B info
- for all the clients currently loaded in the view.
- (sensitize_calendar_commands): use icalcomponent functions.
-
- * gui/e-day-view.c:
- * gui/comp-editor-factory.c (impl_editExisting):
- * gui/calendar-offline-handler.c (backend_cal_opened_online):
- * gui/e-alarm-list.c (e_alarm_list_finalize):
- * gui/e-cal-model-tasks.c (ecmt_get_color_for_component):
- * gui/e-date-time-list.c (e_date_time_list_finalize):
- * gui/control-factory.c (get_prop): fixed warnings.
-
-2003-08-11 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-util/cal-util.[ch] (cal_util_component_is_instance,
- cal_util_component_has_recurrences, cal_util_component_has_rdates,
- cal_util_component_has_rrules, cal_util_event_dates_match):
- new functions needed for the CalComponent->icalcomponent
- transition.
-
- * gui/e-day-view.[ch]:
- * gui/e-week-view.[ch]: more adaptation to changes in ECalViewEvent.
-
- * gui/gnome-cal.c (gnome_calendar_edit_object): use icalcomponent's
- instead of CalComponent's.
-
-2003-08-11 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-day-view.c: more adaptation to changes in ECalViewEvent.
- (e_day_view_update_event_cb): use an ECalModelComponent, not a
- CalComponent.
- (process_component): pass an ECalModelComponent to
- e_day_view_update_event_cb().
-
- * gui/e-week-view.c: more adaptation to changes in ECalViewEvent.
- (e_week_view_update_event_cb, e_week_view_reshape_event_span):
- set the background color on the event's summary text.
-
-2003-08-11 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-week-view.c (e_day_view_update_query): no more query
- management here.
- (query_obj_updated_cb, query_obj_removed_cb, query_query_done_cb,
- query_eval_error_cb): removed query signals' callbacks.
- (adjust_query_sexp): removed.
- (process_component): new function to draw all components from
- the model.
-
- * gui/e-day-view.c: adapted to changes in ECalViewEvent structure.
- (e_day_view_update_query): no more query management here.
- (query_obj_updated_cb, query_obj_removed_cb, query_query_done_cb,
- query_eval_error_cb): removed query signals' callbacks.
- (adjust_query_sexp): removed.
- (process_component): new function to draw all components from
- the model.
-
-2003-08-11 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-cal-view.c (e_cal_view_destroy): disconnect from signals
- on the model.
- (e_cal_view_set_model): disconnect from signals on the old model
- and connect on the new one.
- (model_changed_cb): tell the views to redraw when the model changes.
-
- * gui/gnome-cal.c (dn_query_obj_updated_cb, gnome_calendar_destroy,
- client_categories_changed_cb): removed the 'client' field from the
- private structure, so don't use it anymore
- (client_cal_opened_cb): if successful, add the CalClient to the
- views' model.
- (gnome_calendar_construct): don't add the client to the task model,
- add it in client_cal_opened_cb().
- (gnome_calendar_get_cal_client): removed.
- (gnome_calendar_get_calendar_model): new function.
- (gnome_calendar_open): create the CalClient here, to be added to the
- views' model in client_cal_opened_cb().
-
-2003-08-09 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-cal-view.[ch] (e_cal_view_get_cal_client,
- e_cal_view_set_cal_client, e_cal_view_get_query,
- e_cal_view_set_query): removed unneeded functions.
- (e_cal_view_get_model, e_cal_view_set_model): new functions.
- (e_cal_view_destroy): free the model.
- (e_cal_view_init): removed sexp initialization.
-
- * gui/gnome-cal.c (gnome_calendar_set_query): set the
- query on the view's model, not on the view.
- (gnome_calendar_construct): create the calendar model and associate
- it to all the views.
-
-2003-08-08 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-cal-model-calendar.c (ecmc_fill_component_from_model):
- implemented new virtual method.
- (ecmc_class_init): initialize new virtual method.
-
-2003-08-08 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-client/cal-client.c (cal_client_update_object_with_mod):
- cal_client_get_component_as_string_internal expects now a
- icalcomponent, not a CalComponent.
-
- * gui/e-cal-model.h: added fill_component_from_model virtual method.
-
- * gui/e-cal-model.c (e_cal_model_get_default_client): return
- the default URI as per the configuration if we've got that
- client loaded. If not, return the first client.
- (get_dtstart): retrieve the value from the icalproperty.
- (set_summary): implemented correctly.
- (set_categories, set_classification, set_description): changed
- to really get an ECalModelComponent.
- (ecm_append_row): pass the correct arguments to the set_ functions
- and call the class' fill_component_from_model method to fill in the
- created icalcomponent.
-
- * gui/e-cal-model-tasks.c (set_due): added missing function.
- (ecmt_set_value_at): implemented case for DUE field.
- (ecmt_fill_component_from_model): implemented new virtual method.
- (ecmt_append_row): removed.
-
- * gui/e-cal-model-calendar.c (ecmc_append_row): removed.
-
- * gui/e-calendar-table.c (e_calendar_table_init): initialize
- missing fields. Disabled call to g_object_unref on the 'extras'
- object, since it causes GLib warnings. Something is wrong here.
-
-2003-08-08 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-cal-model.c (cal_opened_cb): don't call remove_client,
- since the client, at this point, hasn't been added anywhere.
- (ecm_finalize): don't call e_cal_model_remove_all_clients, since
- that function triggers notifications on the model.
- (query_obj_updated_cb): free all the date fields.
-
-2003-08-07 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-cal-model.c (ecm_value_at): don't convert to an integer
- the return value from get_color.
- (ecm_get_color_for_component): use correct GTK 2.x color values.
-
- * gui/e-calendar-table.c: replace all CAL_COMPONENT_FIELD...
- with the correct E_CAL_MODEL_*_FIELD...
-
-2003-08-07 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-cal-model-tasks.c (get_completed, get_due): added
- missing implementation.
- (ecmt_class_init): initialize missing virtual method.
-
- * gui/gnome-cal.c (gnome_calendar_construct): fixed typo.
-
-2003-08-07 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-client/cal-client.[ch] (cal_client_get_component_as_string):
- * cal-util/cal-util.[ch] (cal_util_add_timezone_from_component):
- use icalcomponent's instead of CalComponent's.
-
- * gui/Makefile.am:
- * gui/calendar-model.[ch]: removed old model class.
-
- * gui/e-calendar-table.[ch]: use ECalModelTasks class instead
- of CalendarModel.
- (e_calendar_table_set_status_message): new function.
- (get_selected_comp): return an ECalModelComponent.
- (get_selected_objects): return a list of ECalModelComponent's.
- (delete_selected_components): use the CalClient associated
- with each component.
- (copy_row_cb): adapted to changes in get_selected_comp.
-
- * gui/e-tasks.c:
- * gui/print.c:
- * gui/dialogs/comp-editor.c (save_as_cmd):
- * gui/e-day-view.c (e_day_view_on_drag_data_get):
- * gui/e-cal-view.c (e_cal_view_copy_clipboard, on_save_as): pass
- an icalcomponent to cal_util_add_timezones_from_component and
- cal_client_get_component_as_string.
-
- * gui/e-cal-model.[ch] (e_cal_model_set_use_24_hour_format):
- (e_cal_model_get_default_client):
- (e_cal_model_set_default_category): new functions.
-
- * gui/e-cal-model-tasks.[ch] (e_cal_model_tasks_mark_task_complete):
- new function.
- (ecmt_get_color_for_component): chain the call to the parent class
- so that it assigns the per-client color to 'normal' tasks.
-
- * gui/calendar-config.c (calendar_config_configure_e_calendar_table):
- call e_cal_model_set_use_24_hour_format.
-
-2003-08-07 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-cal-model.c (ecm_get_color_for_component): use the color
- palette from Tuomas.
-
-2003-08-06 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-cal-model.[ch]: removed 'create_component_with_defaults'
- virtual method.
- (e_cal_component_create_component_with_defaults):
- (e_cal_component_get_color_for_component): new functions.
-
-2003-08-06 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-cal-model.[ch] (e_cal_model_set_query): new function.
- (e_cal_model_remove_all_clients): implemented.
- (remove_client): also remove all objects belonging to the
- client being removed.
-
-2003-08-06 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-cal-model.c (get_dtstart, set_dtstart): implemented.
- (ecm_value_at, ecm_set_value_at, ecm_duplicate_value,
- ecm_free_value, ecm_value_to_string): added case for DTSTART
- field.
- (free_comp_data): free also the other date values in the
- ECalModelComponent struct.
- (e_cal_model_date_value_to_string): new function.
-
- * gui/e-cal-model.h: added new prototypes.
-
- * gui/e-cal-model-calendar.[ch]: new ECalModel-based class for
- containing events.
-
- * gui/e-cal-model-tasks.c (ecmt_value_to_string): implemented
- the case for date fields.
-
-2003-08-05 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-client/cal-client.c (generate_instances_obj_updated_cb): fixed
- parameters in call to cal_client_get_object().
- (get_objects_atomatically): same.
-
- * gui/e-cal-model.[ch]: added "get_color_for_component" virtual method.
- (get_color): new function to return the color. It calls the virtual
- method of the current class.
- (ecm_value_at): return a value for the color and icon columns.
- (e_cal_model_class_init): initialize virtual methods.
-
- * gui/e-cal-model-tasks.c (ecmt_get_color_for_component): implemented
- new class' virtual method.
-
-2003-08-05 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-client_/cal-client.c (cal_client_get_default_object): use
- correctly the pointer to pointer.
-
- * gui/e-week-view.c (query_obj_updated_cb): fixed the call to
- cal_client_get_object().
-
-2003-08-04 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-client/cal-client.[ch] (cal_client_get_default_object):
- (cal_client_get_object): use icalcomponent instead of CalComponent.
-
- * gui/e-cal-model.c (get_dtstart): implemented.
- (query_obj_updated_cb):
- (query_obj_removed_cb):
- (query_done_cb):
- (query_eval_error_cb): implemented missing functions.
-
- * gui/calendar-model.c:
- * gui/comp-editor-factory.c:
- * gui/comp-util.c:
- * gui/e-day-view.c:
- * gui/e-itip-control.c:
- * gui/e-week-view.c:
- * gui/gnome-cal.c:
- * gui/dialogs/comp-editor.c:
- * conduits/todo/todo-conduit.c:
- * conduits/calendar/calendar-conduit.c: adapted to changes
- in CalClient API.
-
-2003-08-04 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-client/cal-query.[ch] (cal_query_new): added a 'CalClient'
- argument to this function.
- (cal_query_get_client): new function.
-
- * cal-client/cal-client.c (cal_client_get_query): added new parameter
- in call to cal_query_new ().
-
-2003-08-01 Lorenzo Gil <lgs@sicem.biz>
-
- * gui/e-alarm-list.c: added the include <config.h> line at the
- beginning to enable gettext.
-
-2003-08-01 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-cal-model.[ch] (e_cal_model_get_component_at): new function.
- (ecm_append_row): use the client from the source model.
- (e_cal_model_get_timezone, e_cal_model_set_timezone): new functions.
-
- * gui/e-cal-model-tasks.[ch]: new class for the tasks model.
-
-2003-07-31 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-cal-model.[ch]: new class, based on CalendarModel to be
- an abstract class for calendar models.
-
- * gui/Makefile.am: added new files to build.
-
-2003-07-30 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-client/cal-client-multi.[ch]:
- * cal-client/Makefile.am: removed obsolete code.
-
-2003-07-30 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/main.c (factory): Do not depend on global_shell_client being
- not NULL for creating the calendar preferences dialog.
-
- * gui/e-itip-control.c (show_current): Don't call get_servers
- anymore [to be fixed].
- (get_servers): #if 0ed out.
- (object_requested_cb): Don't create the folder selector button.
-
- * gui/e-cal-view.c (e_cal_view_set_status_message): Don't create
- an activity client.
-
- * gui/calendar-model.c (calendar_model_set_status_message): Don't
- create an activity client.
-
- * gui/calendar-component.c: Removed global variable
- global_shell_client.
- (owner_set_cb): Don't set global_shell_client.
- (owner_unset_cb): Don't set it here either.
-
-2003-07-29 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes all "alarm daemon doesn't start with session"
-
- * gui/alarm-notify/notify-main.c (main): use LIBGNOMEUI_MODULE
- instead of LIBGNOME_MODULE so that the default session client
- is created in gnome_program_init.
-
-2003-07-29 Harry Lu <harry.lu@sun.com>
-
- Fixes #46769
-
- * gui/dialogs/task-page.c: (task_page_fill_component): Popup a
- error dialog if due date time is before start datetime when saving
- a task.
-
-2003-07-29 Bolian Yin <bolian.yin@sun.com>
-
- Fixes #46847
-
- * gui/e-day-view.c (e_day_view_get_next_tab_event, e_day_view_focus):
- add day view widget in the tab loop of events.
- * gui/e-week-view.c (e_week_view_get_next_tab_event, e_week_view_focus):
- add week view widget in the tab loop of events.
-
- Also: add some comments in gui/e-day-view.c and gui/e-week-view.c
- remove two compile warnings in gui/e-day-view.c
-
-2003-07-24 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-cal-view.[ch] (e_cal_view_delete_selected_occurrence):
- new function.
- (e_cal_view_get_timezone, e_cal_view_set_timezone): new functions.
- (e_cal_view_class_init): added new class' signal.
-
- * gui/e-week-view.[ch] (e_week_view_delete_occurrence,
- e_week_view_delete_occurrence_internal): removed.
- (e_week_view_get_timezone): removed.
- (e_week_view_set_timezone): renamed to timezone_changed_cb, as
- the callback for timezone changes in the parent ECalView.
- (e_week_view_on_button_press): call gnome_calendar_new_appointment
- instead of the non-existant e_week_view_new_appointment.
-
- * gui/e-day-view.[ch] (e_day_view_delete_occurrence,
- e_day_view_delete_occurrence_internal): removed.
- (e_day_view_get_timezone): removed.
- (e_day_view_set_timezone): renamed to timezone_changed_cb, as
- the callback for timezone changes in the parent ECalView.
-
- * gui/gnome-cal.c (gnome_calendar_delete_selected_occurrence):
- made it call e_cal_view_delete_selected_occurrence.
- (gnome_calendar_update_config_settings): call the generic
- e_cal_view_set_timezone on all view widgets.
-
- * gui/e-day-view-top-item.c:
- * gui/e-week-view-main-item.c:
- * gui/e-day-view-main-item.c: removed mentions to non-existant
- structure fields.
-
-2003-07-24 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-cal-view.h: define ECalViewEvent as the base struct for
- the other views.
-
- * gui/e-day-view.[ch]: EDayViewEvent is now based on ECalViewEvent.
- (e_day_view_get_selected_events): made it return a list of
- ECalViewEvent's, not CalComponent's, so that we can get more
- information about the events.
-
- * gui/e-week-view.[ch]: EWeekViewEvent is now based on ECalViewEvent.
- (e_week_view_get_selected_events): same as e_day_view_get_selected_events.
-
- * gui/e-cal-view.c (e_cal_view_cut_clipboard, e_cal_view_copy_clipboard,
- e_cal_view_delete_selected_event, e_cal_view_delete_selected_events,
- on_edit_appointment, on_save_as, on_print_event, on_meeting,
- on_forward, e_cal_view_create_popup_menu):
- * gui/calendar-commands.c (sensitize_calendar_commands): updated
- to read ECalViewEvent's instead of CalComponent's as returned
- by e_cal_view_get_selected_events().
-
-2003-07-24 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-cal-view.c (delete_event): check the uid before using it.
-
-2003-07-24 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-day-view.c (e_day_view_delete_event,
- e_day_view_delete_event_internal):
- * gui/e-week-view.c (e_week_view_delete_event,
- e_week_view_delete_event_internal): removed.
-
- * gui/e-cal-view.[ch] (e_cal_view_delete_selected_event): renamed
- from e_cal_view_delete_event_internal.
- (e_cal_view_delete_selected_events): new function.
-
- * gui/gnome-cal.c (gnome_calendar_delete_selection): call
- e_cal_view_delete_selected_events().
-
- * gui/e-week-view-event-item.c (e_week_view_event_item_get_position,
- e_week_view_event_item_button_press):
- * 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):
- adapted to changes in E*ViewPosition.
-
-2003-07-24 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-cal-view.c (on_print): added missing cases.
- (setup_popup_icons): new function to set up icons for the popup menu.
- (e_cal_view_create_popup_menu): call setup_popup_icons.
-
-2003-07-23 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-cal-view.[ch]: moved the duplicated popup menu code here.
- (e_cal_view_create_popup_menu): new function to create the popup
- menu for all views.
- (on_new_appointment, on_new_event, on_new_meeting, on_new_task,
- on_goto_today, on_goto_date, on_edit_appointment, on_print,
- on_save_as, on_print_event, on_meeting, on_forward, on_publish,
- on_settings, on_delete_appointment, on_cut, on_copy, on_paste,
- on_unrecur_appointment): callbacks for the popup menu items.
-
- * gui/e-week-view.c (e_week_view_on_new_appointment,
- e_week_view_new_appointment, e_week_view_on_new_event,
- e_week_view_on_new_meeting, e_week_view_on_new_task,
- e_week_view_on_goto_today, e_week_view_on_goto_date,
- e_week_view_on_edit_appointment, e_week_view_on_print,
- e_week_view_on_save_as, e_week_view_on_print_event,
- e_week_view_on_meeting, e_week_view_on_forward,
- e_week_view_on_publish, e_week_view_on_settings,
- e_week_view_on_delete_appointment,
- e_week_view_delete_event_internal, e_week_view_on_cut,
- e_week_view_on_copy, e_week_view_on_paste):
- * gui/e-day-view.c (e_day_view_on_new_appointment,
- e_day_view_on_new_event, e_day_view_on_new_meeting,
- e_day_view_on_new_task, e_day_view_on_goto_today,
- e_day_view_on_goto_date, e_day_view_on_edit_appointment,
- e_day_view_on_print, e_day_view_on_save_as,
- e_day_view_on_print_event, e_day_view_on_meeting,
- e_day_view_on_forward, e_day_view_on_publish,
- e_day_view_on_settings, e_day_view_on_delete_appointment,
- e_day_view_delete_event_internal, e_day_view_on_cut,
- e_day_view_on_copy, e_day_view_on_paste): removed duplicated code.
-
- * gui/gnome-cal.[ch] (gnome_calendar_unrecur_selection): new function.
-
-2003-07-23 Dan Winship <danw@ximian.com>
-
- * cal-util/Makefile.am: Use EVO_MARSHAL_RULE, and add
- MARSHAL_GENERATED to CLEANFILES
-
- * gui/alarm-notify/alarm-queue.c (on_dialog_obj_updated_cb): Fix
- an unused variable
-
- * gui/calendar-commands.c (purge_cmd): Fix warnings.
-
- * gui/calendar-config.h: s/confirm_expunge/confirm_purge/ to match
- the actual functions
-
- * gui/control-factory.c: add some missing #includes
-
- * gui/dialogs/delete-comp.c (delete_component_dialog): Fix a
- warning
-
- * gui/e-itip-control.c (write_label_piece): Remove unused variable.
-
- * gui/print.c (print_calendar): Remove unused variable
- (print_comp): Likewise.
-
- * gui/tasks-control.c (confirm_purge): Fix warnings.
- (print_tasks): Remove unused variable.
-
-2003-07-23 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-day-view.h:
- * gui/e-week-view.h: removed unneeded prototypes.
-
- * gui/e-cal-view.[ch] (e_cal_view_get_visible_time_range): new
- function.
- (selection_received): deal correctly with the selected time range.
-
- * gui/e-week-view.c (e_week_view_get_visible_time_range): made it
- private as the implementation of the 'get_visible_time_range'
- virtual method.
-
- * gui/e-day-view.c (e_day_view_get_visible_time_range): ditto.
-
- * gui/gnome-cal.c (gnome_calendar_direction): merged redundant 'case'.
- (focus_current_view): removed redundant code.
-
-2003-07-22 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-day-view.c (e_day_view_get_selected_events):
- * gui/e-week-view.c (e_week_view_get_selected_events): manage the
- case where the selected events are the popup menu ones.
-
-2003-07-22 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/gnome-cal.c (gnome_calendar_copy_clipboard,
- gnome_calendar_cut_clipboard, gnome_calendar_paste_clipboard):
- removed missing calls to e_day/week_view_*_clipboard.
-
-2003-07-22 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-cal-view.[ch]: added "get_selected_events",
- and "update_query" virtual methods.
- (e_cal_view_class_init): initialize new virtual methods.
- (e_cal_view_destroy): destroy new private members.
- (e_cal_view_get_selected_events, e_cal_view_set_cal_client,
- e_cal_view_get_cal_client): new functions.
- (e_cal_view_cut_clipboard, e_cal_view_copy_clipboard,
- e_cal_view_paste_clipboard): merged clipboard stuff.
-
- * gui/e-day-view.c (e_day_view_cut_clipboard,
- e_day_view_copy_clipboard, e_day_view_paste_clipboard): removed.
- (e_day_view_get_selected_events): made these private as the
- implementation of the 'get_selected_events' base class virtual method.
-
- * gui/e-week-view.c (e_week_view_get_selected_events): ditto.
- (e_week_view_cut_clipboard, e_week_view_copy_clipboard,
- e_week_view_paste_clipboard): removed.
-
- * gui/calendar-commands.c (sensitize_calendar_commands): call
- e_cal_view_get_selected_events.
-
- * gui/gnome-cal.c: removed a lot of redundant code thanks to the
- above changes.
-
-2003-07-21 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-day-view.[ch]: removed e_day_view_set_calendar prototype.
- (e_day_view_set_status_message): removed.
-
- * gui/e-week-view.[ch] (e_week_view_set_status_message): removed.
-
- * gui/e-cal-view.[ch] (e_cal_view_set_status_message): new functions.
- (e_cal_view_destroy): unref activity client.
-
- * gui/gnome-cal.c: updated to e_*_view/e_cal_view.
-
-2003-07-18 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-day-view.[ch]:
- * gui/e-week-view.[ch]: moved duplicated code to...
-
- * gui/e-cal-view.[ch]: ...here.
- (e_cal_view_get_calendar, e_cal_view_set_calendar): new functions.
-
- * gui/e-week-view-event-item.c (e_week_event_item_double_click):
- * gui/gnome-cal.c (setup_widgets): adapted to changes in views.
-
-2003-07-17 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-cal-view.[ch]: new base class for calendar views.
-
- * gui/e-day-view.[ch]:
- * gui/e-week-view.[ch]: base these classes on ECalView.
-
- * gui/Makefile.am: added new files.
-
-2003-07-17 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/calendar-config.[ch]:
- * gui/tasks-control.c: s/expunge/purge.
-
-2003-07-16 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/gnome-cal.[ch] (gnome_calendar_purge): new function,
- which uses a CalQuery to retrieve the objects older than a given date.
- (check_instance_cb): callback for cal_recur_generate_instances.
- (purging_obj_updated_cb): call check_instance_cb on each recurrence
- to double-check the event can be deleted.
- (purging_query_done_cb, purging_eval_error_cb): needed callbacks to
- finish the query.
- (gnome_calendar_destroy): free new members.
-
- * gui/calendar-commands.c (purge_cmd): added implementation for the
- 'Purge' menu item.
-
-2003-07-16 Andrew Wu <Yang.Wu@sun.com>
-
- Fixes #45774
-
- * gui/e-day-view.c (e_day_view_goto_start_of_work_day):
- implemented select the time that begins a work day.
- (e_day_view_goto_end_of_work_day):
- implemented select the time that ends a work day.
-
-2003-07-16 Andrew Wu <Yang.Wu@sun.com>
-
- Fixes #45772
-
- * gui/gnome-cal.c(gnome_calendar_goto_date): implemented Alt+Left/Right
- to go to the same day of the previous/next week.
- * gui/gnome-cal.h:add two element in GnomeCalendarGotoDateType.
-
-2003-07-14 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #41676
-
- * gui/dialogs/alarm-options.c (palarm_options_changed_cb,
- repeat_spin_button_changed_cb, repeat_unit_changed_cb): new callbacks for
- managing modifications in the 'Run a program' alarm case.
- (repeat_toggle_toggled_cb): if the alarm being edited has a procedure
- action, call palarm_options_changed_cb.
- (init_widgets): connect new callbacks.
- (alarm_to_dialog): disable 'OK' button if a procedure alarm.
-
-2003-07-11 Federico Mena Quintero <federico@ximian.com>
-
- * gui/dialogs/task-details-page.glade: Changed the "URL:" label to
- "_Web Page:". Added a widget name to the URL label so that we can
- hook up its mnemonic by hand. Added underlines to the "%
- Complete:" and "Date Completed:" labels. Added a widget name to
- the date completed label, also so that we can hook up its mnemonic.
-
- * gui/dialogs/task-details-page.c (get_widgets): Get the url_label
- and date_completed_label as well.
- (init_widgets): Set the mnemonic widgets of the url_label and the
- date_completed_label by hand, as their respective widgets are
- not created by libglade.
-
- * gui/e-calendar-table.c (tasks_popup_menu): Added an item for
- "Open Web Page".
- (e_calendar_table_show_popup_menu): Disable the aforementioned
- menu item if the selected task doesn't have the URL property set.
- (open_url_cb): New callback.
-
- * gui/e-tasks.c (write_html): Make the HTML say "Web Page:"
- instead of "URL:".
-
-2003-07-10 Harry Lu <harry.lu@sun.com>
-
- Fixes #46075.
-
- * gui/e-date-time-list.c (compare_datetime): new function to compare
- two CalComponentDateTime instances.
- (e_date_time_list_append): check whether the date already exists
- before adding it to the list.
-
-2003-07-07 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #45910
-
- * gui/dialogs/task-editor.c (task_editor_class_init): set up the
- handler for the set_cal_client virtual method.
- (task_editor_set_cal_client): added missing virtual method.
-
-2003-07-07 Jack Jia <jack.jia@sun.com>
-
- * cal-client/cal-client.c (cal_client_get_static_capability): add
- g_return_val_if_fail to check the input param.
-
-2003-07-03 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-tasks.c (setup_widgets): added a paned widget to contain
- the task list and a HTML widget for displaying the task's details.
- Connect to "cursor_change" signal on the ETable.
- (table_cursor_change_cb): update the HTML view every time the selected
- task changes.
- (timet_to_str_with_zone): new function copied from alarm daemon.
- (url_requested_cb): callback for "url_requested" signal on the
- GtkHTML widget.
- (on_link_clicked_cb): respond to clicks linked on the HTML widget.
- (vpaned_resized_cb): set the configuration entry for the task vpane
- position.
- (e_tasks_destroy): free new member.
- (e_tasks_construct): connect to "obj_removed" signal on the CalClient.
- (client_obj_removed_cb): if the updated object is the one being
- displayed in the HTML widget, update it.
-
- * gui/calendar-config.[ch] (calendar_config_get_task_vpane_pos):
- (calendar_config_gset_task_vpane_pos): new functions.
-
- * gui/apps_evolution_calendar.schemas: added task vpane position.
-
-2003-07-03 Antonio Xu <antonio.xu@sun.com>
-
- Fixes #45767
-
- * conduits/todo/Makefile.am: removed libwombat from the build.
-
-2003-07-02 Harry Lu <harry.lu@sun.com>
-
- Fixes #44485
-
- * gui/e-timezone-entry.c (e_timezone_entry_set_entry): pass a
- new allocated string to gtk_entry_set_text instead of the one
- that might come from gettext.
-
-2003-07-02 Dan Winship <danw@ximian.com>
-
- * cal-client/cal-client.c (real_open_calendar): Don't leak
- exceptions
- (load_static_capabilities): free the capability string
-
- * gui/dialogs/task-page.c (task_page_fill_component): Free the
- description text if it *was* set, rather than if it wasn't.
-
- * gui/dialogs/task-editor.c (task_editor_finalize): Free the priv
- struct.
-
-2003-07-02 Bolian Yin <bolian.yin@sun.com>
-
- Fixes #45328, #45329
-
- * gui/e-day-view.c (e_day_view_do_key_press): Do not process
- PageUp/PageDown, .. when the Alt key is pressed (give key binding
- set the chance).
- * gui/gnome-cal.h : define new enum type, GNOME_CAL_GOTO_DATE_TYPE.
- * gui/gnome-cal.c (gnome_calendar_class_init): define new signal
- "goto_date". Add key bindings for "Alt+PageUp/PageDown",
- "Alt+Home/End".
- (gnome_calendar_goto_date): Impl. signal handler for "goto_date".
-
-2003-07-01 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #45524
-
- * gui/calendar-commands.c: use stock icons where approppriate.
-
- * gui/tasks-control.c: removed EPixmaps structure, since we only use
- stock icons now.
- (tasks_control_activate): no need to call e_pixmaps_update.
-
-2003-07-01 Bolian Yin <bolian.yin@sun.com>
-
- Fixes #45274
-
- * gui/e-week-view.c: implemented tabbing though events in week view.
-
-2003-06-30 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-client/cal-client.c: removed usage of WombatClient.
- (client_get_password_cb, client_forget_password_cb): removed.
- (real_open_calendar): don't create the WombatClient object.
- (cal_client_init, cal_client_finalize): removed WombatClient
- related code.
- (cal_client_finalize): re-enabled call to destroy_factories.
-
- * pcs/cal.c: removed usage of WombatClient interface.
- (cal_construct): don't get a reference to the WombatClient.
- (cal_get_password, cal_forget_password): removed unused functions.
-
- * conduits/calendar/Makefile.am:
- * cal-client/Makefile.am: removed references to libwombat.
-
-2003-06-27 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/dialogs/send-comp.[ch] (send_component_dialog):
- * gui/dialogs/cancel-comp.[ch] (cancel_component_dialog): added a
- GtkWindow argument for callers to specify the parent window.
-
- * gui/dialogs/changed-comp.[ch] (changed_component_dialog): added
- 'parent' argument and use GtkMessageDialog instead of
- gnome_question_dialog.
-
- * gui/e-calendar-table.c (e_calendar_table_delete_selected):
- * gui/e-day-view.c (e_day_view_delete_event_internal,
- e_day_view_on_cut, e_day_view_finish_long_event_resize,
- e_day_view_finish_resize, e_day_view_on_editting_stopped,
- e_day_view_on_top_canvas_drag_data_received, selection_received):
- * gui/e-week-view.c (e_week_view_delete_event_internal,
- e_week_view_on_cut, e_week_view_on_editing_stopped,
- selection_received):
- * gui/dialogs/event-editor.c (cancel_meeting_cmd):
- * gui/dialogs/task-editor.c (cancel_task_cmd):
- * gui/dialogs/comp-editor.c (delete_cmd, obj_removed_cb): pass the parent window to
- the *_component_dialog() functions.
-
- * gui/dialogs/delete-comp.c (delete_component_dialog): use the 'widget'
- argument to get the parent window for the dialog.
-
-2003-06-26 Bolian Yin <bolian.yin@sun.com>
-
- Fixes #45276
-
- * gui/e-day-view.c (e_day_view_on_text_item_event): set focus to dayview
- when editing is canceled.
- * gui/e-week-view.c (e_week_view_on_text_item_event): set focus to weekview
- when editing is canceled
-
-2003-06-25 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #44723
-
- * gui/dialogs/alarm-page.c: added a new field to the private structure
- to keep track of the old summary.
- (alarm_page_init): initialize new field.
- (alarm_page_finalize): free new field.
- (alarm_page_set_summary): iterate over the list of alarms to change
- their description if it was the same as the event's summary.
-
-2003-06-25 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #44719
-
- * gui/alarm-notify/alarm-notify-dialog.c (alarm_notify_dialog): use
- gtk_window_set_icon_from_file to set the window's icon and implemented
- the code to make the window sticky with GTK 2.x API.
-
-2003-06-25 Bolian Yin <bolian.yin@sun.com>
-
- Fixes #45275
-
- * gui/e-calendar-table.c (e_calendar_table_show_popup_menu): new function.
- (e_calendar_table_on_right_click_menu): call e_calendar_table_show_popup_menu.
- (e_calendar_table_on_popup_menu): callback for "popup_menu" signal.
- (e_calendar_table_init): connect to ETable's "popup_menu" signal.
-
-2003-06-25 Bolian Yin <bolian.yin@sun.com>
-
- Fixes #45273
-
- * gui/e-day-view.c: implemented tabbing though events in day view.
-
-2003-06-23 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/dialogs/comp-editor.c (make_title_from_string, set_title_from_string):
- new functions.
- (page_summary_changed_cb): change the window title when the object's
- summary changes.
-
-2003-06-22 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-client/cal-client.c (get_factories): don't use a static GList,
- since the value returned is freed in destroy_factories, making several
- clients use a buggy GList if one of them happen to be destroyed.
-
-2003-06-22 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/print.c (get_font_for_size): Remove debug output.
-
- * gui/tasks-control.c (print_tasks): Ref and sink the printable.
- Use fixed (5%) margins instead of what gnome-print gives us.
-
-2003-06-19 Dan Winship <danw@ximian.com>
-
- * pcs/cal-backend.c (cal_backend_finalize): don't leak the
- CalBackendPrivate.
-
-2003-06-18 Dan Winship <danw@ximian.com>
-
- * gui/calendar-config.c (calendar_config_get_hpane_pos)
- (calendar_config_get_vpane_pos)
- (calendar_config_get_month_hpane_pos)
- (calendar_config_get_month_vpane_pos): Plug in the defaults from
- the schemas file here, so that even if something goes wrong with
- the schemas, people will still get reasonable defaults instead of
- "I click on the calendar and it shows me tasks".
-
-2003-06-16 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/dialogs/comp-editor.c (make_title_from_comp): removed unused
- variable.
-
-2003-06-12 Jack Jia <jack.jia@sun.com>
-
- * gui/e-itip-control.c
- (struct _EItipControlPrivate): switch the "view_only" arg to be an
- int.
- (init): ditto.
- (e_itip_control_set_view_only): ditto.
- (e_itip_control_get_view_only): ditto.
-
- * gui/itip-bonobo-control.c
- (get_prop): switch BONOBO_ARG_SET_BOOLEAN to BONOBO_ARG_SET_INT.
- (set_prop): switch BONOBO_ARG_GET_BOOLEAN to BONOBO_ARG_GET_INT.
- (itip_bonobo_control_new): switch BONOBO_ARG_BOOLEAN to
- BONOBO_ARG_INT.
-
- Function "bonobo_property_bag_client_set_value_gboolean" can not
- work on solaris.
-
-2003-06-10 Bolian Yin <bolian.yin@sun.com>
-
- Fixes #44682, Shift+F10 to active popup menu on day/week view
-
- * gui/e-day-view.c (e_day_view_key_press, e_day_view_do_key_press):
- When the key press is not handled, give keybindings the chance.
- (e_day_view_popup_menu, e_day_view_show_popup_menu,
- e_day_view_on_event_right_click ): popup menu will be activated from
- both keyboard and mouse.
-
- * gui/e-week-view.c (e_week_view_key_press, e_week_view_do_key_press):
- When the key press is not handled, give keybindings the chance.
- (e_week_view_popup_menu): popup menu can be activated from keyboard
-
-2003-06-10 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #41582
-
- * gui/gnome-cal.c (gnome_calendar_hpane_resized): killed warnings
- and added code to resize the EDayView's time column on the hpane's
- resizing.
- (gnome_calendar_vpane_resized): killed warnings.
-
-2003-06-05 Not Zed <NotZed@Ximian.com>
-
- ** For #42691.
-
- * gui/Makefile.am (%.server.in): implicit rule for .in file.
- (BUILT_SOURCES): added server_DATA.
-
- * gui/alarm-notify/Makefile.am (%.server.in): added implicit rule
- for .in file.
- (BUILT_SOURCES): added server_DATA.
-
-2003-06-04 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/query.c (start_cached_query_cb): adapted to changes in
- EComponentListener API.
- (query_construct): ditto.
-
- * cal-client/cal-client.c (cal_opened_cb): ditto.
diff --git a/calendar/ChangeLog.pre-1-4 b/calendar/ChangeLog.pre-1-4
deleted file mode 100644
index 912411acd1..0000000000
--- a/calendar/ChangeLog.pre-1-4
+++ /dev/null
@@ -1,21872 +0,0 @@
-2003-06-02 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes part of #43388
-
- * importers/icalendar-importer.c (prepare_events):
- (prepare_tasks): use external iterators for removing components from
- the main component.
-
-2003-05-29 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #43763
-
- * gui/e-week-view.c (e_week_view_init): use g_signal_connect_after
- for "button_press_event" callback.
-
- * gui/e-day-view.c (e_day_view_init): ditto.
-
-2003-05-29 JP Rosevear <jpr@ximian.com>
-
- Fixes #43775
-
- * gui/weekday-picker.c (get_day_text): calculate the characters to
- display correctly
- (configure_items): use it
- (weekday_picker_style_set): ditto
-
- * gui/print.c (format_date): use e_utf8_strftime
- (print_week_view_background): ditto
- (print_month_summary): ditto
- (range_selector_new): ditto
- (print_comp_item): ditto
-
- * gui/itip-utils.c (comp_description): the translation is already
- utf8
-
- * gui/e-itip-control.c (write_label_piece): the string is already
- in utf8
-
- * gui/e-day-view.c (e_day_view_style_set): use e_utf8_strftime
- (e_day_view_recalc_cell_sizes): ditto
-
- * gui/e-day-view-top-item.c (e_day_view_top_item_draw): use
- e_utf8_strftime
-
- * gui/e-cell-date-edit-text.c (ecd_get_text): return the
- duplicated buffer (its already utf8)
- (show_date_warning): use e_utf8_strftime
-
- * gui/calendar-model.c (date_value_to_string): return the
- duplicated buffer (its already utf8)
- (calendar_model_value_to_string): the translations should already
- be in utf8
-
- * gui/calendar-config.c
- (calendar_config_locale_supports_12_hour_format): use
- e_utf8_strftime
-
- * gui/calendar-commands.c (calendar_set_folder_bar_label): use
- e_utf8_strftime
-
-2003-05-28 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #43455
-
- * gui/tasks-control.c (confirm_expunge): converted to a GtkMessageDialog
- and removed object weak's ref code, not needed anymore.
-
-2003-05-20 JP Rosevear <jpr@ximian.com>
-
- Fixes #43308
-
- * gui/e-meeting-time-sel.c (e_meeting_time_selector_style_set):
- adjust row heights to reflect changes in etable row heights and
- set display top to align properly
-
-2003-05-22 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/comp-editor-page.c (comp_editor_page_destroy): unref
- not ref the client
-
-2003-05-22 JP Rosevear <jpr@ximian.com>
-
- Fixes #41329
-
- * gui/e-meeting-time-sel.c
- (e_meeting_time_selector_on_zoomed_out_toggled): make sure the
- meeting time is shown afterwards
- (e_meeting_time_selector_on_working_hours_toggled): ditto
-
-2003-05-21 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #41234
-
- * gui/dialogs/e-delegate-dialog.glade: changed button ordering.
-
-2003-05-20 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/gnome-cal.c (gnome_calendar_setup_view_menus): Removed
- debugging message.
-
-2003-05-20 Anna Marie Dirks <anna@ximian.com>
-
- * gui/dialogs/save-comp.c (save_component_dialog): Change this
- dialog from using a gnome_message_box (which has been deprecated),
- to using a gtk_message_dialog. This HIG-ifies this dialog, and
- fixes bug #42046.
-
-2003-05-20 Hans Petter Jansson <hpj@ximian.com>
-
- Fixes #42056
-
- * gui/e-meeting-time-sel.c (e_meeting_time_selector_construct):
- Don't create accel groups for menuitem mnemonics. Don't use
- deprecated functions where we actually need accel groups.
-
-2003-05-19 Dan Winship <danw@ximian.com>
-
- * pcs/cal-backend.c (cal_backend_finalize): Don't double-free
- newly-added categories that the gui hasn't been told about yet.
- #43321
-
-2003-05-19 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/main.c (factory): set 'initialized' to TRUE when initialization
- is done, or we get the initialization code called over and over.
-
-2003-05-19 Anna Marie Dirks <anna@ximian.com>
-
- * gui/e-meeting-time-sel.c: (e_meeting_time_selector_construct):
- Added HIG-blessed padding to (some of) the widgets in the
- dialog.
-
- * gui/dialogs/meeting-page.glade: Added HIG-blessed border width
- and spacing to the meeting page of the event editor.
-
- * gui/dialogs/schedule-page.glade: Added HIG-blessed border width
- to the schedule page on the event editor.
-
-
-2003-05-19 JP Rosevear <jpr@ximian.com>
-
- * gui/gnome-cal.c (gnome_calendar_destroy): remove the query time
- out if its still alive
- (update_query_timeout): update the query and clear the time out
- (client_cal_opened_cb): add the query update timeout
-
-2003-05-19 JP Rosevear <jpr@ximian.com>
-
- Fixes #43103
-
- * gui/e-day-view.c (e_day_view_init): connect normally instead of
- after so that our boolean return values afffect the action signal
- emmissions properly
- (e_day_view_on_top_canvas_drag_motion): fix proto to be a gboolean
- (e_day_view_on_main_canvas_drag_motion): ditto
-
- * gui/e-week-view.c (e_week_view_init): connect normally instead
- of after so that our boolean return values afffect the action
- signal emmissions properly
-
-2003-05-16 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/comp-editor.c (make_title_from_comp): the title is
- already in UTF-8
-
-2003-05-16 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #42220
-
- * gui/e-day-view.c (e_day_view_finish_resize): hide canvas items and
- update internal fields before updating the object.
-
-2003-05-15 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/comp-editor.c (comp_editor_finalize): unref the
- client and the ui component
-
-2003-05-15 JP Rosevear <jpr@ximian.com>
-
- Fixes #41935
-
- * gui/e-week-view.c (e_week_view_init): listen for scroll events
- on the canvas
- (e_week_view_on_button_press): don't scroll here
- (e_week_view_on_scroll): scroll here
-
- * gui/e-day-view.c (e_day_view_init): listen for scroll events on
- the time and main canvases
- (e_day_view_on_main_canvas_button_press): don't scroll here
- (e_day_view_on_main_canvas_scroll): scroll here
- (e_day_view_on_time_canvas_scroll): and here
-
-2003-05-15 JP Rosevear <jpr@ximian.com>
-
- Fixes #43029
-
- * gui/e-week-view.c (e_week_view_init): don't listen for destroy
- signal
- (e_week_view_destroy): check for NULL and make invisible NULL
- after we destroy it, unref cursors and NULL them out as well,
- guard against freeing events multiple times
-
- * gui/e-day-view.c (e_day_view_destroy): check for NULL and make
- invisible NULL after we destroy it, unref cursors and NULL them
- out as well, guard against freeing events multiple times
- (e_day_view_init): don't listen for destroy signal
-
- * gui/e-calendar-table.c (e_calendar_table_init): don't listen for
- destroy signal
- (e_calendar_table_destroy): check for NULL and make invisible NULL
- after we destroy it
-
-2003-05-15 JP Rosevear <jpr@ximian.com>
-
- Fixes #41930
-
- * idl/evolution-calendar.idl: Make sure everything that can raise
- a NotFound exception lists it
-
-2003-05-15 JP Rosevear <jpr@ximian.com>
-
- * gui/e-meeting-time-sel.c
- (e_meeting_time_selector_refresh_free_busy): ref ourselves the
- number of times we'll get called back
-
-2003-05-14 JP Rosevear <jpr@ximian.com>
-
- * gui/e-tasks.c (e_tasks_destroy): guard against multiple destroys
-
- * cal-client/cal-client.c (cal_client_finalize): unref the
- bonobo listener
-
- * gui/gnome-cal.c (gnome_calendar_destroy): guard against multiple
- destroy calls
-
- * gui/e-week-view.c (e_week_view_init): connect after destroy
- (invisible_destroyed): don't unref, its already destroyed
-
- * gui/e-day-view.c (e_day_view_init): connect after destroy
- (invisible_destroyed): don't unref, its already destroyed
-
- * gui/e-calendar-table.c (e_calendar_table_class_init): make sure
- we set the parent class
- (e_calendar_table_init): connect after the destroy handler runs
- (e_calendar_table_destroy): guard against multiple destroys
- (invisible_destroyed): don't unref the invisible, its already
- being destroyed
-
- * gui/calendar-offline-handler.c (backend_cal_set_mode): unref the
- client, we are done with it now
- (backend_cal_opened_online): ditto
- (impl_dispose): unref our main client
-
- * gui/calendar-commands.c (control_util_set_folder_bar_label):
- release/unref the shell view once we are done with it
- (control_util_show_settings): ditto
-
-2003-05-13 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/alarm-notify/alarm-queue.c (notify_dialog_cb): fixed memory
- leak introduced by previous commit.
-
-2003-05-12 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #41760
-
- * gui/alarm-notify/alarm-queue.c (create_snooze): don't add a new
- alarm, but update the already existing one.
- (notify_dialog_cb): make sure we don't remove the alarm if we are
- snoozing.
-
-2003-05-07 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/task-page.glade: fix button conversion problem
-
- * gui/dialogs/task-details-page.c
- (task_details_page_fill_widgets): only free the percent if its
- non-null
-
-2003-05-07 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-client/cal-client.c (cal_client_discard_alarm): added missing
- assignment.
-
-2003-05-05 JP Rosevear <jpr@ximian.com>
-
- Fixes #41811
-
- * gui/alarm-notify/Makefile.am: don't dist idl generated files
-
-2003-05-01 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/task-editor.c (task_editor_finalize): unref the
- model again
- (task_editor_edit_comp): don't allow editing if the assignee has
- delegated
-
- * gui/dialogs/meeting-page.c (popup_delete_cb): set the new
- non-delegator to be editable
-
- * gui/dialogs/event-editor.c (event_editor_edit_comp): don't allow
- editing if the attendee has delegated
- (event_editor_finalize): unref the model again
-
- * gui/e-meeting-model.c: remove e-table-without related functions
- (finalize): don't create without table
- (e_meeting_model_etable_from_model): build the table with this as
- model
- (e_meeting_model_etable_model_to_view_row): directly use the
- model_to_view call
- (e_meeting_model_etable_view_to_model_row): as above
- (attendee_changed_cb): make sure pre change is alwasy called
-
- * gui/e-meeting-model.h: use DECLS, remove protos for long dead
- functions, don't include config.h
-
-2003-04-30 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/alarm-notify/alarm-notify.c (alarm_notify_add_calendar): removed
- unused code.
-
-2003-04-29 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/task-editor.c (task_editor_finalize): ditto
-
- * gui/dialogs/event-editor.c (event_editor_finalize): don't unref
- the model here
-
- * gui/e-meeting-time-sel.c (e_meeting_time_selector_destroy): null
- up the display_top and display_main for re-entrancy purposes
-
-2003-04-25 JP Rosevear <jpr@ximian.com>
-
- * gui/itip-utils.c (itip_send_comp): kill warnings
-
-2003-04-28 Anna Marie Dirks <anna@ximian.com>
-
- * gui/dialogs/alarm-options.glade: Added HIG-blessed padding
- to the alarm options dialog. Fixes bug #41221.
-
-2003-04-28 Anna Marie Dirks <anna@ximian.com>
-
- * gui/dialogs/cal-prefs-dialog.glade: Added appropriate spacing
- and padding to the calendar/tasks page of the settings dialog.
- Fixes bug #41129
-
-
-2003-04-28 Anna Marie Dirks <anna@ximian.com>
-
- * gui/dialogs/task-page.glade: Finishes up fixing #41256 by
- adding appropriate spacing/padding to the main task page.
-
- * gui/dialogs/task-details-page.glade: Added appropriate
- spacing and padding to the task-details page. Partially
- fixes #41256.
-
-
-2003-04-28 Anna Marie Dirks <anna@ximian.com>
-
- * gui/dialogs/recurrence-page.glade: Added padding/spacing
- to this page as specified by the HIG. Partially fixes #41215.
-
- * gui/dialogs/alarm-page.glade: Added padding/spacing/stock
- buttons to the alarm page. Partially fixes #41215.
-
- * gui/dialogs/event-page.glade: Added padding/spacing to the
- event-page (partially fixes #41215)
-
-
-2003-04-27 Rodney Dawes <dobey@ximian.com>
-
- Fixes #35814
-
- * gui/calendar-component.c: Change mnemonic/keybinding for
- New Meeting to not conflict with other items in the File->New menu
-
-2003-04-24 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #41661
-
- * idl/evolution-calendar.idl: added discardAlarm method to
- GNOME:Evolution:Calendar:Cal interface.
-
- * pcs/cal.c (cal_class_init): set new epv's method.
- (impl_Cal_discardAlarm): implementation of new CORBA method.
-
- * pcs/cal-backend.[ch]: added 'discard_alarm' virtual method, and
- CAL_BACKEND_RESULT_NOT_IMPLEMENTED to CalBackendResult enum.
- (cal_backend_class_init): initialize new class method.
- (cal_backend_discard_alarm): new method.
- (cal_backend_update_objects, cal_backend_remove_object): return
- proper CalBackendResult values.
-
- * pcs/cal-backend-file.c (cal_backend_file_class_init): initialize
- new class method.
- (cal_backend_file_discard_alarm): implementation of new method.
-
- * pcs/cal-client.[ch] (cal_client_discard_alarm): new function.
-
- * gui/alarm-notify/alarm-queue.c (remove_qeueud_alarm): don't remove
- the alarm directly from the component, call cal_client_discard_alarm
- and let the backend deal with it.
-
-2003-04-24 JP Rosevear <jpr@ximian.com>
-
- * gui/apps_evolution_calendar.schemas: set the hpane default to
- 32000 so we never see a pane no matter the start up window size
- unless the user changes it
-
-2003-04-24 JP Rosevear <jpr@ximian.com>
-
- Fixes #37552
-
- * gui/dialogs/Makefile.am: build delete-error.[hc]
-
- * gui/e-tasks.c: wrap calls to cal_client_remove_object with
- delete_error_dialog
-
- * gui/e-itip-control.c: ditto
-
- * gui/e-calendar-table.c: ditto
-
- * gui/e-week-view.c: ditto
-
- * gui/e-day-view.c: ditto
-
- * gui/dialogs/delete-error.[hc]: gemerate an error message based
- on result
-
-2003-04-23 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-day-view.c (e_day_view_on_delete_occurrence): removed
- unused variable..
-
-2003-04-23 Hans Petter Jansson <hpj@ximian.com>
-
- Fixes #41641
-
- * gui/e-day-view.c (e_day_view_focus_in): Remove assert an old
- input method code.
- (e_day_view_focus_out): Ditto.
- (e_day_view_reshape_long_event): Set input method context.
- (e_day_view_reshape_day_event): Ditto.
- (e_day_view_on_editing_started): Let EText handle the context popup.
- (e_day_view_on_editing_stopped): Turn off EText's handling of context
- popup.
-
- * gui/e-week-view.c (e_week_view_reshape_event_span): Set input
- method context.
- (e_week_view_on_text_item_event): Let the EText item handle
- right-click context popup if we're editing it.
- (e_week_view_on_editing_started): Let the EText item handle the
- context popup.
- (e_weeK_view_on_editing_stopped): Turn off EText's handling of
- context popup.
-
-2003-04-23 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #41671
-
- * gui/alarm-notify/notify-main.c (main): added calls to gnome_sound_init
- and gnome_sound_shutdown.
-
- * gui/alarm-notify/alarm-queue.c (audio_notification): check that the
- sound file exists, and gdk_beep if not.
-
-2003-04-22 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes part of #41148, #41216 and #41235
-
- * gui/e-itip-control.c (init):
- * gui/e-meeting-time-sel.c (e_meeting_time_selector_construct,
- e_meeting_time_selector_add_key_color):
- * gui/e-timezone-entry.c (e_timezone_entry_init):
- * gui/gnome-cal.c (setup_widgets):
- * gui/tasks-control.c (confirm_expunge):
- * gui/dialogs/comp-editor.c (setup_widgets):
- * gui/dialogs/e-delegate-dialog.c (e_delegate_dialog_construct):
- * gui/dialogs/meeting-page.c (meeting_page_construct):
- * gui/dialogs/recurrence-page.c (make_weekly_special,
- make_monthly_special, make_ending_count_special):
- * gui/dialogs/schedule-page.c (schedule_page_construct):
- use HIG-suggested spacing.
-
-2003-04-21 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #22444
-
- * gui/calendar-commands.c: added new verbs for occurrence-related
- menu items.
- (delete_occurrence_cmd): added callback for "Delete this occurrence"
- menu item. "Delete all occurrences" is just the same as "Delete".
- (sensitize_calendar_commands): sensitive ocurrence-related menu items.
-
- * gui/gnome-cal.[ch] (gnome_calendar_delete_selected_occurrence): new
- function.
- (gnome_calendar_get_current_view_widget): made this public.
-
- * gui/e-week-view.[ch] (e_week_view_get_selected_event):
- (e_week_view_delete_occurrence): new functions.
- (e_week_view_delete_occurrence_internal): real implementation of the
- 'Delete Occurrence' logic.
- (e_week_view_on_delete_occurrence): call delete_instance_internal.
-
- * gui/e-day-view.[ch] (e_day_view_get_selected_event):
- (e_day_view_delete_occurrence): new functions.
- (e_week_view_delete_occurrence_internal): real implementation of the
- 'Delete Occurrence' logic.
- (e_week_view_on_delete_occurrence): call delete_occurrence_internal.
-
-2003-04-18 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/alarm-notify/alarm-notify.glade: removed 'heading' and
- 'message' labels.
-
- * gui/alarm-notify/alarm-notify-dialog.c: removed deleted widgets.
- (alarm_notify_dialog): don't load the removed widgets.
-
-2003-04-18 Rodney Dawes <dobey@ximian.com>
-
- Fixes #21499
-
- * gui/Makefile.am:
- * gui/calendar-commands.c:
- * gui/tasks-control.c:
- * gui/dialogs/Makefile.am:
- * gui/dialogs/comp-editor.c:
- Use PREFIX instead of EVOLUTION_DATADIR for bonobo_ui_util_set_ui ()
-
-2003-04-17 JP Rosevear <jpr@ximian.com>
-
- Fixes #41459
-
- * gui/dialogs/meeting-page.c: comment out delegation stuff
-
-2003-04-17 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #34498
-
- * gui/alarm-notify/alarm-queue.c: added a 'uid' field to the
- CompQueuedAlarms structure.
- (remove_queued_alarm): free the 'uid' field when freeing the
- structure.
- (add_component_alarms): g_strdup the component's UID and use that as
- the key for the hash table.
-
-2003-04-16 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #41129, #41215, #41221, #41256
-
- * gui/alarm-notify/alarm-notify.glade:
- * gui/dialogs/alarm-options.glade:
- * gui/dialogs/alarm-page.glade:
- * gui/dialogs/cal-prefs-dialog.glade:
- * gui/dialogs/e-delegate-dialog.glade:
- * gui/dialogs/meeting-page.glade:
- * gui/dialogs/recurrence-page.glade:
- * gui/dialogs/schedule-page.glade:
- * gui/dialogs/task-details-dialog.glade:
- * gui/dialogs/task-page.glade:
- * gui/dialogs/event-page.glade: set spacing to 6 pixels
- everywhere.
-
-2003-04-16 JP Rosevear <jpr@ximian.com>
-
- Fixes #41230
-
- * gui/e-itip-control.c (show_current): make sure to pass TRUE for
- tasks
- (start_calendar_server): make sure we don't gtk_main_quit if we
- haven't gtk_main'ed
- (start_calendar_server_cb): ditto
-
-2003-04-15 JP Rosevear <jpr@ximian.com>
-
- Fixes #39735 and 40257
-
- * gui/gnome-cal.c: convert float pane positions to ints
- (setup_widgets): set the initial position after realization and
- track the drags to get the new position, pack the panes slightly
- differently
- (gnome_calendar_set_pane_positions): set purely pixel oriented
- positions
- (gnome_calendar_update_config_settings): no need to update quanta
- setting
- (gnome_calendar_hpane_realized): realization callback
- (gnome_calendar_vpane_realized): ditto
- (gnome_calendar_vpane_resized): resize callback, store new size
- (gnome_calendar_hpane_resized): ditto
-
- * gui/calendar-model.c (get_due_status): handle an error getting
- the timezone
-
- * gui/calendar-config.c (calendar_config_get_hpane_pos): return an int
- (calendar_config_set_hpane_pos): take an int
- (calendar_config_get_vpane_pos): return an int
- (calendar_config_set_vpane_pos): take an int
-
- * gui/calendar-config.h: update protos
-
- * gui/apps_evolution_calendar.schemas: update defaults for pane
- positions
-
-2003-04-15 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/calendar-component.c (owner_set_cb): If we already have an
- evolution_dir, free the old one before setting it anew.
-
- * gui/e-day-view-time-item.c (e_day_view_time_item_draw): Unref the
- metrics.
-
- * gui/e-day-view.c (e_day_view_style_set): Unref the metrics.
- (e_day_view_recalc_cell_sizes): We don't need font metrics here.
- (e_day_view_reshape_long_event): Ditto.
-
- * gui/e-meeting-model.c (init): Don't dup the string passed to
- e_table_without_hide().
-
- * gui/e-meeting-time-sel.c (e_meeting_time_selector_style_set):
- Unref the metrics.
- (e_meeting_time_selector_recalc_date_form): Doesn't need metrics.
-
- * gui/e-week-view-main-item.c (e_week_view_main_item_draw_day):
- Unref the metrics.
-
- * gui/e-week-view.c (e_week_view_style_set): Unref metrics.
- (e_week_view_recalc_cell_sizes): Ditto.
- (e_week_view_reshape_event_span): Move Pango stuff to where it
- can't be leaked due to an early return. Unref metrics.
-
- * gui/weekday-picker.c (weekday_picker_style_set): Unref metrics.
-
- * gui/dialogs/meeting-page.c (meeting_page_finalize): Free default
- address.
-
-2003-04-11 Dan Winship <danw@ximian.com>
-
- * gui/dialogs/Makefile.am (IDL_GENERATED, etc): Oops. Add this
- back. Turns out it's still needed by other parts.
-
-2003-04-11 Dan Winship <danw@ximian.com>
-
- * gui/dialogs/task-page.glade: Remove the "Contacts" button and
- entry from here too. Supposed to have been part of #35926
-
- * gui/dialogs/task-page.c: Remove all code pertaining to the
- contacts button
-
- * gui/dialogs/comp-editor-util.c:
- * gui/dialogs/comp-editor-util.h: Likewise
-
- * gui/dialogs/Makefile.am (IDL_GENERATED, etc): Remove
- select-names stuff, which is no longer used.
-
-2003-04-11 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-util/cal-util.h: added missing capabilities.
-
- * cal-client/cal-client.c (cal_client_get_one_alarm_only,
- cal_client_get_organizer_must_attend,
- cal_client_get_save_schedules):
- * gui/itip-utils.c (itip_organizer_is_user):
- * gui/e-calendar-table.c (e_calendar_table_on_right_click):
- * gui/dialogs/task-editor.c (set_menu_sens):
- * gui/dialogs/event-page.c (event_page_fill_widgets):
- * gui/dialogs/meeting-page.c (meeting_page_fill_widgets):
- * gui/dialogs/alarm-page.c (button_options_clicked_cb): use the macros
- defined in cal-util.h for static capabilities.
-
-2003-04-11 JP Rosevear <jpr@ximian.com>
-
- * gui/e-meeting-model.c (start_addressbook_server): load the
- default book to look for additional free/busy info in
- (init): ugly hack to make sure we get destroyed, set idle id to 0
- (process_callbacks): unref the im because we are now done with it
- (refresh_busy_periods): set idle id to 0, ref the model and handle
- e_book_get_cursor error
-
-2003-04-11 JP Rosevear <jpr@ximian.com>
-
- * gui/e-meeting-time-sel-item.c
- (e_meeting_time_selector_item_destroy): guard against multiple
- destroy calls
-
-2003-04-11 JP Rosevear <jpr@ximian.com>
-
- * cal-client/cal-client.c (cal_client_get_free_busy): only print a
- message if the exception isn't the reasonable NotFound
-
-2003-04-11 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/schedule-page.c (schedule_page_finalize): unref the
- main widget since we ref it when we un-parent it
-
- * gui/dialogs/alarm-page.c (alarm_page_finalize): ditto
-
- * gui/dialogs/task-page.c (task_page_finalize): ditto
-
- * gui/dialogs/event-page.c (event_page_finalize): ditto
-
- * gui/dialogs/task-details-page.c (task_details_page_finalize):
- ditto
-
- * gui/dialogs/recurrence-page.c (recurrence_page_finalize): ditto
-
- * gui/dialogs/meeting-page.c (meeting_page_finalize): ditto
-
-2003-04-10 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-meeting-time-sel.c
- (e_meeting_time_selector_options_menu_position_callback):
- (e_meeting_time_selector_autopick_menu_position_callback): added the
- allocation's X and Y position to the calculated coordinates.
-
-2003-04-10 JP Rosevear <jpr@ximian.com>
-
- Fixes #41127
-
- * gui/e-meeting-time-sel.c (e_meeting_time_selector_refresh_cb):
- unref here, when the callback is done
- (e_meeting_time_selector_refresh_free_busy): don't unref here
-
- * gui/e-meeting-model.c (process_free_busy): if the type is
- unexpected, make sure we cleanup properly
-
-2003-04-10 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/alarm-notify/alarm-queue.c (remove_queued_alarm): only remove
- the alarm for backends that want it (Exchange).
-
-2003-04-10 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-util/cal-util.h: added #define's for static capabilities.
-
- * pcs/cal-backend-file.c (cal_backend_file_get_static_capabilities):
- use the #define's above.
-
-2003-04-09 Chris Toshok <toshok@ximian.com>
-
- Fixes #40133
-
- * pcs/cal-backend.c (cal_backend_class_init): use G_TYPE_INT
- instead of G_TYPE_ENUM as a parameter type for the signal to get
- rid of runtime warning.
-
-2003-04-09 JP Rosevear <jpr@ximian.com>
-
- Fixes #40915
-
- * gui/calendar-model.c (get_due_status): when getting the current
- time for date values, use a timezone aware function
-
-2003-04-09 JP Rosevear <jpr@ximian.com>
-
- Fixes #40952
-
- * pcs/cal-backend-file.c (cal_backend_file_open): check for file
- method instead of is_local
-
-2003-04-08 JP Rosevear <jpr@ximian.com>
-
- Fixes #40894
-
- * gui/gnome-cal.c
- (gnome_calendar_on_date_navigator_selection_changed): update the
- selection for all view types
-
-2003-04-08 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/dialogs/alarm-options.c: Remove button_ok, button_cancel,
- canceled members from struct Dialog.
- (get_widgets): Do not initialize.
- (close_dialog): Destroy the toplevel.
- (toplevel_delete_event_cb): Removed.
- (button_cancel_clicked_cb): Removed.
- (button_ok_clicked_cb): Removed.
- (close_dialog): Removed.
- (alarm_options_dialog_run): Use gtk_dialog_run.
- (init_widgets): Do not init ->canceled, do not connect OK/Cancel
- buttons.
- (alarm_to_dialog): No need to make the file entry modal from here
- anymore.
-
- * gui/dialogs/alarm-options.glade: Turned into a GtkDialog. Set
- the "modal" property to True for the file entry.
-
-2003-04-07 Hans Petter Jansson <hpj@ximian.com>
-
- Fixes #35926.
-
- * gui/dialogs/event-page.glade: Remove contacts entry/chooser.
-
- * gui/dialogs/event-page.c: Remove contacts entry/chooser.
- (event_page_init): Remove references.
- (event_page_finalize): Ditto.
- (event_page_fill_widgets): Ditto.
- (event_page_fill_component): Ditto.
- (get_widgets): Ditto.
- (init_widgets): Ditto.
- (contacts_clicked_cb): Remove wholesale.
- (contacts_changed_cb): Ditto.
-
-2003-04-07 JP Rosevear <jpr@ximian.com>
-
- Fixes #40876
-
- * gui/e-meeting-time-sel.c
- (e_meeting_time_selector_refresh_free_busy): guard against
- callbacks after destruction
- (e_meeting_time_selector_refresh_cb): ditto
-
-2003-04-07 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/event-page.glade: create buttons properly
-
- * gui/itip-utils.c (comp_server_send): for errors other than busy,
- we want to email the results
-
- * pcs/cal-backend.c (cal_backend_ref_categories): insert the new
- category in the category list as well
- (idle_notify_categories_changed): reset idle id
-
-2003-04-07 Not Zed <NotZed@Ximian.com>
-
- Fixes #40252
-
- * conduits/todo/todo-conduit.c: Same as below.
-
- * conduits/calendar/calendar-conduit.c: Change the LOG macro to a
- single arg macro which copies its arg. Fix all callers. Change
- WARN and INFO to simply g_warning/g_message. Init G_LOG_DOMAIN
- before including anything.
-
-2003-04-07 Dan Winship <danw@ximian.com>
-
- * gui/GNOME_Evolution_Calendar.server.in.in: Clean up server names
-
- * gui/alarm-notify/GNOME_Evolution_Calendar_AlarmNotify.server.in.in:
- Likewise
-
- * importers/GNOME_Evolution_Calendar_Importer.server.in.in:
- Likewise. Also mark the evolution:menu_name for i18n
-
-2003-04-07 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/e-meeting-attendee.[ch]: GObjectify. Eliminates ref/sink
- warnings from the meeting editor.
-
-2003-04-06 Hans Petter Jansson <hpj@ximian.com>
-
- Week view part of fix for #39895.
-
- * gui/e-week-view-main-item.c (e_week_view_main_item_draw_day):
- Use the UNFOCUSSED colour if we're not focused, rather than not
- drawing anything.
-
- * gui/e-week-view.c: Set up the UNFOCUSSED colour.
-
- * gui/e-week-view.h: Add the UNFOCUSSED colour.
-
-2003-04-04 JP Rosevear <jpr@ximian.com>
-
- Fixes #40790
-
- * gui/alarm-notify/alarm-queue.c (procedure_notification_dialog):
- return based on the response code (not old button stuff)
-
-2003-04-04 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/dialogs/alarm-options.c (alarm_to_dialog): Make the file
- entry modal. [#40792]
-
-2003-04-04 JP Rosevear <jpr@ximian.com>
-
- Fixes #40789
-
- * gui/dialogs/alarm-options.c (alarm_to_dalarm_widgets):
- description is a text buffer
- (alarm_to_malarm_widgets): ditto
- (dalarm_widgets_to_alarm): ditto
- (malarm_widgets_to_alarm): ditto
- (alarm_to_repeat_widgets): check repeat status correctly
-
-2003-04-04 Dan Winship <danw@ximian.com>
-
- * gui/e-itip-control.c (write_html): Don't free static string.
-
-2003-04-04 JP Rosevear <jpr@ximian.com>
-
- * gui/cal-search-bar.c (cal_search_bar_destroy): guard against
- multiple destroy calls
-
-2003-04-04 JP Rosevear <jpr@ximian.com>
-
- * cal-client/cal-client.c (get_default_uri): guard against empty
- uri as well
-
-2003-04-04 JP Rosevear <jpr@ximian.com>
-
- Fixes #40722
-
- * gui/e-meeting-time-sel.c (e_meeting_time_selector_destroy):
- guard against multiple destroy calls
-
-2003-04-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * gui/control-factory.c (set_prop): Add a check to see if the view
- should be the day-view and change the default to be whatever
- calendar_config_get_default_view() returns. Should fix bug #39735.
-
- * gui/calendar-config.h: calendar_config_write() and
- calendar_config_write_on_exit() no longer exist. Removed
- prototypes.
-
- * gui/control-factory.c (set_prop): g_strcasecmp() is
- deprecated. Since the values can never be anything other than all
- lowercase anyway, just use strcmp.
-
-2003-04-02 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #39262
-
- * importers/icalendar-importer.c (load_file_fn, vcal_load_file_fn):
- use folder_type argument to determine what to import.
-
-2003-04-02 Rodrigo Moya <rodrigo@ximian.com>
-
- * importers/icalendar-importer.c (load_file_fn, vcal_load_file_fn):
- added "folder_type" parameter to EvolutionImporterLoadFileFn.
-
-2003-04-02 JP Rosevear <jpr@ximian.com>
-
- Fixes #39955
-
- * gui/itip-utils.c (comp_sentby): don't unref the the account
-
-2003-04-02 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #40661
-
- * gui/itip-utils.c: added missing header for Forte compilation.
-
-2003-04-01 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/e-day-view-main-item.c (e_day_view_main_item_draw):
- Nuke GdkFont and use Pango's font measuring.
-
- * gui/e-day-view-time-itme.c (e_day_view_time_item_get_column_width)
- (e_day_view_time_item_draw): Ditto.
-
- * gui/e-day-view-top-item.c (e_day_view_top_item_draw)
- (e_day_view_top_item_draw_long_event): Ditto.
-
- * gui/e-day-view.c (e_day_view_style_set)
- (e_day_view_recalc_cell_sizes)
- (e_day_view_reshape_long_event)
- (e_day_view_update_top_canvas_drag)
- (e_day_view_update_main_canvas_drag): Ditto.
-
- * gui/e-meeting-time-sel.c (e_meeting_time_selector_style_set)
- (e_meeting_time_selector_recalc_date_form): Ditto.
-
- * gui/e-week-view-event-item.c (e_week_view_draw_time): Ditto.
-
- * gui/e-week-view-main-item.c (e_week_view_main_item_draw_day):
- Ditto.
-
- * gui/e-week-view-titles-item.c (e_week_view_titles_item_draw):
- Ditto.
-
- * gui/e-week-view.c (e_week_view_style_set)
- (e_week_view_recalc_cell_sizes)
- (e_week_view_reshape_event_span): Ditto.
-
- * gui/weekday-picker.c (weekday_picker_style_set): Ditto.
-
-2003-04-01 JP Rosevear <jpr@ximian.com>
-
- Fix for #17231 (Evo portion)
-
- * conduits/todo/todo-conduit.c (comp_from_remote_record): test for
- secret flag properly
-
- * conduits/calendar/calendar-conduit.c (comp_from_remote_record):
- ditto
-
-2003-04-01 Rodrigo Moya <rodrigo@ximian.com>
-
- * importers/icalendar-importer.c (load_file_fn, vcal_load_file_fn):
- added filename (tasks.ics/calendar.ics) to the URI if it does not
- contain it.
-
-2003-03-31 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #39961
-
- * gui/e-meeting-time-sel.c
- (e_meeting_time_selector_options_menu_position_callback):
- (e_meeting_time_selector_autopick_menu_position_callback): use the
- button's allocation to position the popup menu.
-
-2003-03-29 Not Zed <NotZed@Ximian.com>
-
- Fixes #39895
-
- * gui/e-day-view.h (EDayViewColors): add an unfocussed colour to
- draw the selection in when we're not focussed.
-
- * gui/e-day-view.c (e_day_view_realize): Initialise
- E_DAY_VIEW_COLOR_BG_SELECTED_UNFOCUSSED to be 1/2 saturation of
- the focussed colour.
-
- * gui/e-day-view-main-item.c (e_day_view_main_item_draw): Use the
- UFOCUSSED colour if we aren't focussed, rather than just not
- drawing anything.
-
-2003-03-28 JP Rosevear <jpr@ximian.com>
-
- * gui/e-itip-control.c (get_servers): the shell client is a
- g_object now, ref appropriately
-
-2003-03-28 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/e-day-view.c (comp_destroy_cb)
- (e_day_view_on_long_event_button_press)
- (e_day_view_on_event_button_press)
- (e_day_view_on_long_event_click)
- (e_day_view_on_event_click)
- (e_day_view_on_event_double_click)
- (e_day_view_on_delete_appointment): Hold weak references to the
- CalComponent instead of connecting to the "destroy" signal.
-
- * gui/e-week-view.c (comp_destroy_cb)
- (e_week_view_on_text_item_event): Ditto.
-
-2003-03-28 Hans Petter Jansson <hpj@ximian.com>
-
- Fixes #39954
-
- * gui/dialogs/recurrence-page.c (make_recurrence_special):
- Destroy would-be children of the container before the container.
-
-2003-03-28 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/meeting-page.c (meeting_page_init): init new members
- (get_current_account): get a matching account for the currently
- selected user in the combo
- (meeting_page_finalize): unref the meeting attendee if there is
- one
- (meeting_page_fill_widgets): don't set the combo list here
- (clear_widgets): set the default organizer here and if we don't
- have an organizer, add the default organizer as an attendee
- (meeting_page_fill_component): use get_current_account
- (org_changed_cb): if this is a new meeting and the organizer
- changes, change the attendee
- (change_clicked_cb): no need to set the default here
- (init_widgets): reflect changed callback name
- (meeting_page_construct): set the combo strings here
- (popup_delete_cb): remove the organizer attendee if the user
- explicitly deletes it
-
- * gui/e-meeting-model.c (attendee_changed_cb): set row properly
-
- * gui/itip-utils.c (comp_to_list): skip the user themselves if
- cancelling or requesting
-
-2003-03-26 Rodrigo Moya <rodrigo@ximian.com>
-
- * importers/icalendar-importer.c (gnome_calendar_import_data_fn): use
- g_object_unref for CalClient's.
- (create_checkboxes_control): use g_signal_connect.
-
- * cal-client/cal-client.c (cal_client_get_load_state): return correct
- values in g_return_val_if_fail.
-
-2003-03-26 Jack Jia <jack.jia@sun.com>
-
- * calendar/gui/dialogs/alarm-options.c
- (malarm_widgets_to_alarm): add a parameter(TC_CORBA_string) to
- the bonobo_widget_get_property.
-
-2003-03-25 Dan Winship <danw@ximian.com>
-
- * gui/itip-utils.c: Update for e_notice move
-
- * gui/tasks-control.c (confirm_expunge): Move the code that used
- to be e_gnome_dialog_set_parent here, since it was marked
- deprecated and this was the only place using it.
-
- * gui/dialogs/comp-editor.c: Update for e_notice move
- (page_changed_cb, page_summary_changed_cb, page_dates_changed_cb):
- Pass a parent_window to e_notice.
-
- * gui/dialogs/meeting-page.c: Update for e_notice move.
- (meeting_page_fill_component, meeting_page_fill_component,
- popup_delegate_cb): Pass a parent_window to e_notice
-
-2003-03-25 Dan Winship <danw@ximian.com>
-
- * cal-util/cal-util.c (cal_util_parse_ics_file): Utility wrapper
- around icalparser.
-
- * cal-util/test-recur.c (main): Use it
-
- * pcs/cal-backend-file.c (open_cal): Likewise
-
- * gui/comp-editor-factory.c (open_client): Add the OpenClient to
- the hash before calling cal_client_open_calendar, since in some
- failure cases, that will call cal_opened_cb (which will free the
- oc) with a failure immediately, causing a crash if we then try to
- deref it.
-
-2003-03-21 JP Rosevear <jpr@ximian.com>
-
- Fixes #32248
-
- * conduits/todo/todo-conduit.c (comp_from_remote_record): make
- sure the due date is actually a date
-
-2003-03-21 JP Rosevear <jpr@ximian.com>
-
- Fixes #31660
-
- * conduits/calendar/calendar-conduit.c (rrules_mostly_equal):
- check if the rrules are equal other than until/count
- (find_last_cb): update the data with the start timet
- (local_record_from_comp): handle the case where the recurrence
- rule ends after a certain number occurrences
- (comp_from_remote_record): same
-
-2003-03-20 JP Rosevear <jpr@ximian.com>
-
- * conduits/calendar/calendar-conduit.c
- (e_calendar_context_destroy): calcomponents are gobjects now
- (calconduit_load_configuration): ref and sink to avoid warnings
-
- * conduits/todo/todo-conduit.c (todoconduit_load_configuration):
- ref and sink to avoid warnings
- (e_todo_context_destroy): calcomponents are gobjects now
-
-2003-03-20 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/dialogs/cancel-comp.c (cancel_component_dialog): use a
- GtkMessageDialog and deal correctly with the dialog's reponses.
-
-2003-03-20 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #39770
-
- * gui/itip-utils.c (itip_Send_comp): check the CORBA exception instead
- of the g_return_val_if_fail. Also, use a CORBA_Object for the value
- returned from bonobo_activation_activate_from_id.
-
-2003-03-20 Rodrigo Moya <rodrigo@ximian.com>
-
- * importers/ical-importer.c: removed activation of shell_client.
- (importer_destroy_cb): no need to unref shell_client.
- (connect_to_shell): removed.
- (ical_importer_new, vcal_importer_new): don't call connect_to_shell.
-
-2003-03-20 Rodrigo Moya <rodrigo@ximian.com>
-
- * importers/ical-importer.c (get_uri_from_folder_path): removed.
- (load_file_fn, vcal_load_file_fn): use physical_uri instead of
- folderpath.
-
-2003-03-19 Ettore Perazzoli <ettore@ximian.com>
-
- * importers/GNOME_Evolution_Calendar_Importer.server.in.in:
- Replace "evolution:menu-name" prop with "evolution:menu_name".
- [#39692]
-
-2003-03-18 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/dialogs/send-comp.c (send_component_dialog): use GtkMessageDialog
- instead of gnome_question_dialog, and deal correctly with the dialog's
- response.
-
-2003-03-18 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #34505
-
- * gui/alarm-notify/alarm-queue.c (remove_queued_alarm): added removal
- of the alarm itself in the calendar if the (new) argument says so.
- Also, set expecting_update flag to TRUE.
- (add_component_alarms): initialize expecting_update to FALSE.
- (remove_alarms): don't remove the component if expecting_update is
- TRUE.
- (obj_updated_cb, notify_dialog_cb, procedure_notification): adapted
- to changes in remove_queued_alarm.
-
-2003-03-17 Hans Petter Jansson <hpj@ximian.com>
-
- Fixes #34095
-
- * gui/e-meeting-model.c (append_row): Don't leak meeting attendees;
- unref the attendee after it's assigned to model.
-
- * gui/dialogs/meeting-page.c (meeting_page_destroy): Free the actual
- array of deleted attendees.
-
- * gui/dialogs/event-editor.c (event_editor_destroy): Free the private
- structure.
-
- * gui/itip-utils.c (comp_description): Rework free/busy information
- composer so we can free date/time information after use. Then free it.
- (itip_send_comp): Free the allocated CORBA buffer for attachment data.
-
- * gui/dialogs/comp-editor-util.c (comp_editor_contacts_to_component):
- Free the destination contacts string once we're done with it.
-
- * gui/e-calendar-table.c (invisible_destroyed): Unref the invisible.
-
- * gui/e-day-view.c (invisible_destroyed): Ditto.
-
- * gui/e-week-view.c (invisible_destroyed): Ditto.
-
-2003-03-17 Hans Petter Jansson <hpj@ximian.com>
-
- Fixes #39757
-
- * gui/dialogs/alarm-page.c (sensitize_buttons): Somehow this code
- reverted to thinking it was dealing with a GtkCList, when in reality
- it's a GtkTreeView. Fix that, so the buttons are sensitized correctly.
-
-2003-03-17 Hans Petter Jansson <hpj@ximian.com>
-
- Fixes #39736
-
- * gui/e-day-view.c: Reduce the size of the large-digits font so it's
- en par with the one in 1.2.
-
-2003-03-14 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #39740
-
- * gui/e-meeting-model.c (is_cell_editable): check row number is valid
- before using it as index for the GPtrArray.
-
-2003-03-14 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #39356
-
- * gui/Makefile.am:
- * gui/tasks-migrate.[ch]: removed tasks migration obsolete stuff.
-
- * gui/calendar-component.c (owner_set_cb): don't call tasks_migrate.
-
-2003-03-14 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/cal-factory.c (impl_CalFactory_uriList): set_release
- on the sequence we create.
-
- * cal-client/cal-client.c (cal_client_uri_list): don't leak the
- string sequence returned by CalFactory_uriList.
-
-2003-03-13 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/query-backend.c (query_backend_new): use a weak ref instead
- of connecting to backend's "destroy" signal.
- (backend_destroyed_cb, query_destroyed_cb): changed to be weak
- reference callbacks.
-
-2003-03-12 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/dialogs/save-comp.c (save_component_dialog): don't use
- GNOME_STOCK_* defines, but GTK_STOCK_*.
-
-2003-03-12 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/dialogs/save-comp.[ch] (save_component_dialog): corrected
- button ordering and changed the return type to be a GtkResponseType.
-
- * gui/dialogs/comp-editor.c (prompt_to_save_changes): adapted to
- changes in save_component_dialog.
-
-2003-03-11 Dan Winship <danw@ximian.com>
-
- * gui/calendar-config.c (on_timezone_set): Update for timezone
- dialog API changes.
-
- * gui/e-timezone-entry.c: Likewise
-
-2003-03-11 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/gnome-cal.c (gnome_calendar_open): issue more descriptive
- warnings.
-
-2003-03-09 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/alarm-notify/alarm-notify.c (alarm_notify_add_calendar): if we
- already have the client loaded, don't remove it, just increment its
- reference count.
-
- * gui/alarm-notify/alarm-queue.c (remove_queued_alarm): added new
- argument to specify whether we want the component's structure removed
- if no more alarms exist, and only free the structure if TRUE.
- (remove_alarms): added same new argument and pass it over to
- remove_queued_alarm.
- (remove_comp, obj_updated_cb): passed new argument to remove_alarms.
- (procedure_notification): passed new argument to remove_queued_alarm.
- (obj_removed_cb): set all freed pointers to NULL.
- (notify_dialog_cb): only remove the alarm if the pointers are not NULL.
-
-2003-03-07 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/alarm-notify/save.c (get_calendars_to_load): create the array
- to be returned only once.
-
-2003-03-06 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/alarm-queue.c (display_notification): ref the CalClient.
- (notify_dialog_cb): unref the CalClient.
-
-2003-03-06 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/alarm-notify/alarm-notify-dialog.[ch]
- (alarm_notify_dialog_disable_buttons): new function.
- (alarm_notify_dialog): made it return a pointer to the dialog structure.
-
- * gui/alarm-notify/alarm-queue.c (remove_alarms, remove_comp): splitted
- alarm removal out of remove_comp.
- (obj_updated_cb): remove the component only when needed. In normal
- updates, just update the internal structure.
- (edit_component): don't get a CompQueuedAlarms as argument, since it
- might be removed.
- (on_dialog_obj_updated_cb, on_dialog_obj_removed_cb): callbacks for
- modifications during dialog display.
- (notify_dialog_cb): disconnect from "obj_*ed" signals and call
- edit_component with the new set of arguments.
- (display_notification): added more data to the closure structure.
-
-2003-03-05 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #31382
-
- * gui/e-meeting-model.c (async_read): don't assume the buffer is
- always full, but use GNOME_VFS_ERROR_EOF instead for knowing when
- the read has finished.
-
-2003-03-05 JP Rosevear <jpr@ximian.com>
-
- * gui/apps_evolution_calendar.schemas: fix defaults and
- descriptions to match what calendar-config wants them to be
-
-2003-03-05 JP Rosevear <jpr@ximian.com>
-
- * gui/e-itip-control.c (show_current): g_objectify ref/unref
-
- * gui/itip-bonobo-control.c (set_data_idle_cb): as above
- (pstream_load): ditto
-
- * gui/dialogs/alarm-options.c (alarm_to_malarm_widgets): as above
-
-2003-03-05 JP Rosevear <jpr@ximian.com>
-
- * gui/e-itip-control.c (class_init): override finalize, not
- destroy
- (start_calendar_server): take itip as a param and gtk_main_quit if
- it gets destroyed while we are waiting for the cal client to load
- (start_default_server): ditto
- (get_servers): take itip as a param and don't load if we've been
- destroyed, check for an except when retrieving the folder list
- (init): ref the html control
- (destroy): mark ourselves as destroyed
- (finalize): clean up, unref html control
- (write_html): if the html widget has been destroyed, don't write
- anything out
- (show_current_todo): pass extra param
- (show_current): ref/unref the itip control to avoid finalization while
- we are working, pass extra param
- (button_selected_cb): pass extra param
- (object_requested_cb): ditto
-
-2003-03-05 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/calendar-offline-handler.c (backend_go_offline,
- backend_go_online): cast CalClient's to GObject, not GtkObject.
-
-2003-03-04 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/meeting-page.c (meeting_page_fill_widgets): don't
- let the user change to an email organizer if the back end is not
- an email addres
-
-2003-03-04 JP Rosevear <jpr@ximian.com>
-
- Fixes #37881
-
- * gui/e-meeting-model.c (process_section): if the attendee is the
- empty string, try to get the email
-
-2003-03-04 JP Rosevear <jpr@ximian.com>
-
- * gui/calendar-offline-handler.c (backend_cal_opened_online): set
- the backend to REMOTE mode when it opens
- (backend_go_online): prepare to set calendar mode to REMOTE
- (impl_goOnline): get all the local calendars and set to REMOTE
-
-2003-03-04 JP Rosevear <jpr@ximian.com>
-
- Fixes #37881
-
- * gui/e-meeting-model.c (process_section): if the attendee is the
- empty string, try to get the email
-
-2003-03-04 JP Rosevear <jpr@ximian.com>
-
- Fixes #37883
-
- * idl/evolution-calendar.idl: getLdapAttribute can raise NotFound
-
-2003-03-04 JP Rosevear <jpr@ximian.com>
-
- Fixes #37806, #37697
-
- * gui/e-itip-control.c (e_itip_control_set_data): if the text is
- null or the empty string, just clear the widget
- (init): set the html widget to initially be blank
-
-2003-03-04 JP Rosevear <jpr@ximian.com>
-
- * pcs/cal.c (impl_Cal_get_ldap_attribute): implement
-
- * pcs/cal-backend.h: add virtual method
-
- * pcs/cal-backend.c (cal_backend_get_ldap_attribute): call
- get_ldap_attribute_method
-
- * pcs/cal-backend-file.c (cal_backend_file_class_init): overrid
- get_ldap_attribute method
-
- * idl/evolution-calendar.idl: add getLdapAttribute method
-
- * gui/e-meeting-model.c (process_section): take simple card list
- as arg and try to use the ldap attribute (if any) as the attendee,
- else use the email address
- (select_names_ok_cb): get the simple card list
-
- * cal-client/cal-client.h: add proto
-
- * cal-client/cal-client.c (cal_client_init): init ldap_attribute
- to NULL
- (cal_client_destroy): free ldap_attribute
- (cal_client_get_ldap_attribute): accessor
-
-2003-03-04 JP Rosevear <jpr@ximian.com>
-
- * gui/itip-utils.c (itip_organizer_is_user): call
- cal_client_get_cal_address instead of cal_client_get_email_address
-
- * gui/dialogs/meeting-page.c (meeting_page_construct): ditto
-
- * pcs/cal.c (impl_Cal_get_cal_address): implement updated method
- name
- (cal_class_init): set method implementation
-
- * pcs/cal-backend.c (cal_backend_class_init): init get_cal_address
- virtual function
- (cal_backend_get_cal_address): call proper function
-
- * pcs/cal-backend.h: update proto, rename get_email_address
- virtual function to get_cal_address virtual function
-
- * pcs/cal-backend-file.c (cal_backend_file_class_init): match
- get_cal_address call
- (cal_backend_file_get_cal_address): rename from
- cal_backend_file_get_email_address
-
- * cal-client/cal-client.c: rename email_address private member to
- cal_address
- (cal_client_init): init cal_address
- (cal_client_destroy): free cal_address and properly free
- alarm_email_address
- (cal_client_get_cal_address): rename from
- cal_client_get_email_address and call proper corba function
-
-2003-03-04 JP Rosevear <jpr@ximian.com>
-
- * idl/evolution-calendar.idl: fix comment
-
-2003-03-04 JP Rosevear <jpr@ximian.com>
-
- * gui/calendar-model.c (calendar_model_append_row): update FIXME
- note
-
-2003-03-04 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/recur-comp.h: fix copyright
-
- * gui/dialogs/recur-comp.c: fix copyright
- (recur_component_dialog): say "recurring journal entry" instead of
- just "recurring journal"
-
-2003-03-04 JP Rosevear <jpr@ximian.com>
-
- Partially Fixes #23606 (from Jack Jia <jack.jia@sun.com>)
-
- * gui/dialogs/schedule-page.c (update_time): handle no end date if
- the start is date only
-
- * gui/dialogs/event-page.c (update_time): ditto
-
-2003-03-04 JP Rosevear <jpr@ximian.com>
-
- Merging in 1.2 stuff
-
- Fixes #35598
-
- * gui/dialogs/task-details-page.c
- (task_details_page_fill_widgets): count a status of needs action
- as a status of none (not started)
- (date_changed_cb): set the option menu to a status of none
- (status_changed): no need to handle needs action status now
-
- * gui/dialogs/task-details-page.glade: remove needs-action menu
- item
-
- Fixes #36763
-
- * gui/dialogs/alarm-page.c (add_clicked_cb): if no address was set
- for an email alarm, set the default
- (button_options_clicked_cb): pass the default email address
-
- * gui/dialogs/alarm-options.h (alarm_options_dialog_run): update proto
-
- * gui/dialogs/alarm-options.c (alarm_to_malarm_widgets): if there
- are no email attendees, default to the passed in value
- (alarm_options_dialog_run): take and track an email param
-
- * pcs/cal.c (impl_Cal_get_alarm_email_address): implement by
- calling backend method
- (cal_class_init): set alarm email address method implementation
-
- * pcs/cal-backend.h: add new virtual proto
-
- * pcs/cal-backend.c (cal_backend_class_init): set alarm email
- address virtual method to NULL
- (cal_backend_get_alarm_email_address): call backend method
-
- * pcs/cal-backend-file.c (cal_backend_file_class_init): set alarm
- email address method
- (cal_backend_file_get_alarm_email_address): implement by returning
- NULL
-
- * idl/evolution-calendar.idl: add getAlarmEmailAddress method
-
- Fixes #37102
-
- * gui/dialogs/task-editor.c (set_menu_sens): don't allow task
- assignment if the backend says not to
-
- * gui/dialogs/recurrence-page.c (fill_component): kill warning
- (preview_recur): display the recurrences in the dtstart timezone
- if possible
-
- * gui/gnome-cal.c (dn_query_obj_updated_cb): pass NULL to use
- default tag zone
-
- * gui/tag-calendar.c (tag_calendar_by_comp): allow display zone
- for the tagged calendar to be passed in
- (prepare_tag): use the passed in timezone for display if non-null
-
- * gui/tag-calendar.h (tag_calendar_by_comp): update proto
-
- * gui/dialogs/recurrence-page.c (recurrence_page_set_dates): make
- sure we always update the preview
-
- * conduits/todo/todo-conduit.c (add_record): make sure to create a
- unique uid for the record
-
- * conduits/calendar/calendar-conduit.c (add_record): ditto
-
- * conduits/todo/todo-conduit.c (e_todo_context_new): init default
- comp and timezone to NULL
- (e_todo_context_destroy): unref default comp
- (pre_sync): et the default comp via the client and set the default
- timezone
- (add_record): pass the default comp as the base comp
-
- * conduits/calendar/calendar-conduit.c (e_calendar_context_new):
- init default comp to NULL
- (e_calendar_context_destroy): unref default comp
- (pre_sync): get the default comp via the client
- (add_record): pass the default comp as the base comp
-
- * conduits/calendar/calendar-conduit.c (local_record_from_comp):
- only add the recurrence rule if its not an instance
-
- * gui/itip-control-factory.c (set_data_idle_cb): idle call back to
- set control data
- (pstream_load): set the data in an idle callback to avoid deadlock
- (get_prop): handle view_only
- (set_prop): ditto
- (itip_control_factory): add view_only
-
- * gui/e-itip-control.h: add protos
-
- * gui/e-itip-control.c (write_html): only write out the options if
- we aren't in view_only mode
- (e_itip_control_set_view_only): accessor
- (e_itip_control_get_view_only): ditto
-
- Fixes #36909
-
- * gui/dialogs/alarm-page.c (button_options_clicked_cb): indicate
- whether the options dialog should allow repeating
-
- * gui/dialogs/alarm-options.h: update proto
-
- * gui/dialogs/alarm-options.c (alarm_to_repeat_widgets): if
- repeating is not allowed, sensitize the widgets appropriately
- (alarm_options_dialog_run): store the repeat param
-
- * gui/calendar-model.c (calendar_model_append_row): guard against
- saving before the calendar is open
-
- * gui/e-day-view.c (e_day_view_key_press): ditto
-
- * gui/dialogs/comp-editor.c (page_changed_cb): change warning
- dialog to not mention email
- (page_summary_changed_cb): ditto
- (page_dates_changed_cb): ditto
-
- * gui/itip-utils.c (itip_organizer_is_user): make the compare case
- insensitive
-
- * gui/dialogs/meeting-page.c (meeting_page_fill_widgets): don't
- allow the organizer to be changed if its not an email address
-
- * gui/e-day-view.c, calendar-model.c, e-week-view.c,
- task-editor.c, event-editor.c, comp-editor.c, meeting-page.c: pass
- additional param
-
- * gui/itip-utils.c (itip_organizer_is_user): take client as param,
- and if organizer-not-email-address and email address and organizer
- match, assume the user is the organizer
-
- * gui/itip-utils.h: update proto
-
- * pcs/cal.c (build_fb_seq): set the max
-
- * gui/e-meeting-model.c
- (e_meeting_model_add_attendee_with_defaults): correct typo and set
- rsvp appropriately
-
- * gui/dialogs/send-comp.c (send_component_dialog): if save
- schedules, return FALSE for now
-
- * gui/dialogs/recurrence-page.c (sensitize_recur_widgets):
- de-sensitize the preview widget if we are viewing an instance
- (preview_recur): return if the comp is an instance
-
- * gui/dialogs/event-page.glade: name the show time frame
-
- * gui/dialogs/event-page.c (event_page_fill_widgets)
- (event_page_init): init show time frame
- (event_page_fill_widgets): hide/show frame as needed
- (get_widgets): get the frame
-
- * gui/alarm-notify/alarm-queue.c (mail_notification): kill mail
- notification code
-
- * cal-client/cal-client.c (load_static_capabilities): grab static
- capabilities string
- (check_capability): see if a capability is in the string
- (cal_client_get_one_alarm_only): accessor
- (cal_client_get_organizer_must_attend): use check_capability
- (cal_client_get_static_capability): ditto
-
- * cal-client/cal-client.h: new, changed protos
-
- * idl/evolution-calendar.idl: change over getSchedulingInformation
- to a more general getStaticCapabilities call
-
- * pcs/cal-backend-file.c
- (cal_backend_file_get_static_capabilities): return
- "no-email-alarms"
-
- * pcs/cal-backend.c (cal_backend_get_static_capabilities): ditto
-
- * pcs/cal-backend.h: ditto
-
- * pcs/cal.c (impl_Cal_get_static_capabilities): ditto
-
- * gui/alarm-notify/alarm-queue.c (get_default_address): utility
- routine to snag address info
-
- * gui/alarm-notify/Makefile.am: build composer idl
-
- * *.c: pass client param for send an cancel params
-
- * gui/dialogs/send-comp.c (send_component_dialog): take client as
- a parm and if save schedules return true right away
-
- * gui/dialogs/send-comp.h: update proto
-
- * gui/dialogs/cancel-comp.c (cancel_component_dialog): take client
- as a param and if we are deleting and schedule saves, return true
- right away
-
- * gui/dialogs/cancel-comp.h (cancel_component_dialog): update proto
-
- * gui/dialogs/alarm-options.glade: add Send To: button
-
- * gui/dialogs/alarm-options.c (addressbook_clicked_cb): display
- dialog
- (setup_select_names): attach above to Send To: button clicked
- signal
-
- * gui/dialogs/alarm-options.c (get_widgets): get mail alarm
- widgets
- (setup_select_names): add the select names widget
- (alarm_to_malarm_widgets): show the attendees and description
- (alarm_to_dialog): set the title for mail alarms properly
- (malarm_widgets_to_alarm): save attendees and descriptions in
- alarm
- (alarm_options_dialog_run): call setup_select_names
-
- * gui/dialogs/alarm-page.c: add email to alarm types
-
- * gui/dialogs/alarm-options.glade: add mail alarm widgets
-
- * gui/dialogs/alarm-page.glade: add email to alarm types
-
- * cal-util/cal-component.c (scan_attendee): kill unnecessary
- CalComponent param
- (scan_property): don't pass same
- (set_attendee_list): take an icalcomp instead of a CalComponent
- (cal_component_set_attendee_list): pass same
- (scan_alarm_property): if its an attendee, scan it
- (make_alarm): set attendee_list member to null
- (cal_component_alarm_new): ditto
- (cal_component_alarm_free): free attendee list
- (cal_component_alarm_get_attendee_list): return attendee list
- (cal_component_alarm_set_attendee_list): set attendee list
- (cal_component_alarm_has_attendees): return true if alarm has attendees
-
- * cal-util/cal-component.h: new protos
-
- * gui/calendar-model.c (calendar_model_append_row): use
- cal_comp_task_new_with_defaults
-
- * gui/comp-editor-factory.c (get_default_task): ditto
-
- * gui/e-tasks.c (e_tasks_new_task): ditto
-
- * gui/gnome-cal.c (gnome_calendar_new_task): ditto
-
- * gui/comp-util.h (cal_comp_task_new_with_defaults): new proto
-
- * gui/comp-util.c (cal_comp_task_new_with_defaults): new utility
- routine
-
- * cal-util/cal-util.c (generate_absolute_triggers): skip omitted
- alarm types
- (add_alarm_occurrences_cb): ditto
- (cal_util_generate_alarms_for_list): take/pass omit param
- (cal_util_generate_alarms_for_comp): ditto
-
- * cal-util/cal-util.h: update protos
-
- * pcs/cal-backend-file.c (cal_backend_file_get_alarms_for_object):
- add omit param
- (cal_backend_file_get_alarms_in_range): ditto
-
- * pcs/cal-backend.c (cal_backend_get_scheduling_information):
- remove dead param
-
- * gui/dialogs/meeting-page.h: delete proto
-
- * gui/dialogs/meeting-page.c: remove dead routine
-
- * gui/dialogs/event-editor.c (event_editor_edit_comp): we don't
- need to add the organizer as an attendee ourselves, just set the
- edit level properly
-
- * gui/dialogs/task-editor.c (task_editor_edit_comp): ditto
-
- * gui/comp-util.c (cal_comp_event_new_with_defaults): take client
- as arg so we can obtain the default from the backend
-
- * gui/comp-editor-factory.c (get_default_event): pass
- cal_comp_event_new_with_defaults the new param
-
- * gui/gnome-cal.c (gnome_calendar_new_appointment_for): ditto
-
- * gui/e-week-view.c (e_week_view_key_press): ditto
-
- * gui/e-day-view.c (e_day_view_key_press): ditto
-
- * gui/calendar-model.c (calendar_model_append_row): ditto
-
- * gui/comp-util.h (cal_comp_event_new_with_defaults): update proto
-
- * pcs/cal-backend-file.c (cal_backend_file_get_default_object):
- return appropriate default object
-
- * pcs/cal-backend.c (cal_backend_get_default_object): call
- get_default_backend class method
-
- * pcs/cal-backend.h: add proto
-
- * pcs/cal.c (impl_Cal_get_default_object): implement
- (cal_class_init): set handler for getDefaultObject call
-
- * idl/evolution-calendar.idl: remove always schedule from
- SchedulingInformation and add getDefaultObject call
-
- * cal-client/cal-client.c (cal_client_get_default_object): gets a
- default object from the server
- (cal_client_init): remove always_schedule
- (load_scheduling_info): ditto
-
- * cal-client/cal-client.h: add a proto, delete a proto
-
- * gui/dialogs/meeting-page.c (right_click_cb): if the attendee is
- not fully editable, don't allow deletion
- (meeting_page_construct): keep the default organizer as an itip
- address
- (meeting_page_get_default_organizer): return the default organizer
-
- * gui/dialogs/meeting-page.h: new proto
-
- * gui/dialogs/event-editor.c (event_editor_edit_comp): we set
- appropriate edit levels now for users and if the backend always
- schedules we always show the meeting pages and add the organizer
- as an attendee
-
- * gui/dialogs/task-editor.c (task_editor_edit_comp): same
-
- * gui/e-meeting-model.c (is_cell_editable): use the edit level of
- the attendee to determine if cell is editable
- (init): we no longer keep the attendee list of restricted
-
- * gui/e-meeting-attendee.c (e_meeting_attendee_get_edit_level): accessor
- (e_meeting_attendee_set_edit_level): ditto
-
- * gui/e-meeting-attendee.h: new protos and edit level enum
-
- * cal-client/cal-client.c (load_scheduling_info): load the
- scheduling info
- (cal_client_get_always_schedule): accessor
- (cal_client_get_organizer_must_attend): ditto
- (cal_client_get_save_schedules): ditto
- (cal_client_init): init scheduling data members
-
- * cal-client/cal-client.h: accessors for scheduling information
-
- * pcs/cal-backend-file.c
- (cal_backend_file_get_scheduling_information): implement the new
- virtual method
-
- * pcs/cal-backend.c (cal_backend_get_scheduling_information): call
- the class specific method
-
- * pcs/cal-backend.h: add virtual method
-
- * idl/evolution-calendar.idl: add a getSchedulingInformation call
- which describes how the backend does its scheduling
-
- * pcs/cal.c (impl_Cal_get_scheduling_information): implement above
-
- * gui/e-day-view.c: pass NULL as parent to recur dialog
-
- * gui/e-week-view.c: ditto
-
- * gui/dialogs/comp-editor.c (prompt_to_save_changes): show recur
- dialog after prompting, not before
- (save_cmd): ditto
- (save_close_cmd): ditto
- (real_edit_comp): don't show recur dialog before opening
-
- * gui/dialogs/recur-comp.h (recur_component_dialog): update proto
-
- * gui/dialogs/recur-comp.c (recur_component_dialog): take a parent
- argument and set the dialog parent if non-null
-
- * gui/e-week-view.c (e_day_view_on_editing_stopped): Don't update
- appointment if both the old and the new summary texts are empty.
-
- * gui/e-week-view.c (e_week_view_show_popup_menu): mask out "make
- moveable" if its an instance
-
- * gui/e-day-view.c (e_day_view_on_event_right_click): ditto
-
- * gui/e-week-view.c (e_week_view_on_editing_stopped): if its
- an instance, show the recur comp dialog and modify it based on the
- response (or not if cancel is hit)
-
- * gui/e-day-view.c (e_day_view_finish_long_event_resize): if its
- an instance, show the recur comp dialog and modify it based on the
- response (or not if cancel is hit)
- (e_day_view_finish_resize): ditto
- (e_day_view_on_editing_stopped): ditto
- (e_day_view_on_top_canvas_drag_data_received): ditto
- (e_day_view_on_main_canvas_drag_data_received): ditto
-
- * gui/dialogs/comp-editor.c (real_edit_comp): reflect changes in
- proto of recur_component_dialog
-
- * gui/dialogs/recur-comp.c (recur_component_dialog): use ok/cancel
- instead and radio buttons for the mod type
-
- * gui/dialogs/recur-comp.h: update proto
-
- * gui/e-day-view.c (e_day_view_on_long_event_click): allow
- dragging if its an instance
- (e_day_view_on_event_click): ditto
- (e_day_view_on_top_canvas_motion): ditto
- (e_day_view_on_main_canvas_motion): ditto
-
- * gui/dialogs/comp-editor.c (save_comp): if its an instance,
- update with the mod type
- (real_edit_comp): ask the user what instances they want to change
-
- * gui/dialogs/recur-comp.[hc]: new dialog to ask user what
- recurrences to modify
-
- * gui/dialogs/Makefile.am: Compile new files
-
- * gui/e-day-view.c (e_day_view_on_delete_occurrence): if its an
- instance, just remove with THIS mod
-
- * gui/e-week-view.c (e_week_view_on_delete_occurrence): ditto
-
- * cal-client/cal-client.c (cal_client_remove_object_with_mod):
- send the mod parameter to the backend
- (cal_client_remove_object): implement with above
- (cal_client_update_object_with_mod): send the mod parameter to the
- backend
- (cal_client_update_object): implement with above
-
- * cal-client/cal-client.h: new protos
-
- * cal-client/cal-client.c (cal_client_is_read_only): return
- booleans in the pre conditions
- (cal_client_update_object): pass mod param
- (cal_client_update_objects): ditto
- (cal_client_remove_object): ditto
- (cal_client_ensure_timezone_on_server): ditto
-
- * pcs/cal.c (impl_Cal_update_objects): take mod param
- (impl_Cal_remove_object): ditto
-
- * pcs/cal-backend.h: fix protos
-
- * pcs/cal-backend.c (cal_backend_update_objects): take mod param
- (cal_backend_remove_object): ditto
-
- * pcs/cal-backend-file.c (cal_backend_file_update_objects): take
- mod param
- (cal_backend_file_remove_object): ditto
-
- * cal-util/cal-util.h: add mod enum
-
- * cal-util/cal-recur.c (cal_recur_generate_instances_of_rule): if
- its an instance, just report the instance
-
- * cal-util/cal-component.h: new protos
-
- * cal-util/cal-component.c (cal_component_is_instance): indicate
- whether the component is an instance or not
- (cal_component_free_range): free a range
-
- * idl/evolution-calendar.idl: get remove and update to take mod
- type
-
-2003-03-03 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/dialogs/alarm-page.c
- * gui/dialogs/event-page.c
- * gui/dialogs/meeting-page.c
- * gui/dialogs/recurrence-page.c
- * gui/dialogs/schedule-page.c
- * gui/dialogs/task-details-page.c
- * gui/dialogs/task-page.c (get_widgets): gtk_widget_unparent() ->
- gtk_container_remove(). The former caused crashes in the
- addressbook's name-selector.
-
-2003-03-01 Hans Petter Jansson <hpj@ximian.com>
-
- * Makefile.am: Do importers after the other dirs, as it relies on
- generated files from there. This is still not optimal... Should
- probably introduce dependencies.
-
-2003-02-28 Hans Petter Jansson <hpj@ximian.com>
-
- * importers/Makefile.am: Shlibify.
-
- * importers/GNOME_Evolution_Calendar_Importer.server.in.in:
- Shlibify.
-
- * importers/icalendar-importer.c: Add necessary includes.
- (importer_destroy_cb): This is now a GWeakNotify func. gtk_ -> g_.
- (ical_importer_new)
- (vcal_importer_new)
- (gnome_calendar_importer_destroy_cb): Destroy signal -> weak ref.
-
- * importers/main.c: Add necessary includes. Shlibify.
-
-2003-02-28 Dan Winship <danw@ximian.com>
-
- * gui/dialogs/Makefile.am: build libcal-dialogs as an uninstalled
- shared library
- ($(IDL_GENERATED_H), etc): Only generate
- Evolution-Addressbook-SelectNames.h, not the corresponding .c
- files, or we'll get duplicate symbol errors trying to link this
- into libevolution_calendar.la
-
- * gui/Makefile.am (libevolution_calendar_la_LIBADD): Update for
- that (and eliminate libtool portability warnings)
-
-2003-02-28 Hans Petter Jansson <hpj@ximian.com>
-
- * Makefile.am (SUBDIRS): Add importers/.
-
- * importers/Makefile.am (server_in_files)
- (server_DATA): Insert $(libexecdir).
-
- * importers/icalendar-importer.c (connect_to_shell):
- oaf_activate_from_id() -> bonobo_activation_activate_from_id().
- (load_vcalendar_file): U_() -> _().
-
- * importers/GNOME_Evolution_Calendar_Importer.server.in:
- Renamed to corresponding .in.in.
-
-2003-02-28 Dan Winship <danw@ximian.com>
-
- * gui/Makefile.am (libevolution_calendar_la_LIBADD): Remove
- libalarm.a, which was not being used by the calendar.
-
- * gui/main.c: Remove unneeded alarm.h include.
-
- * gui/alarm-notify/Makefile.am (noinst_LIBRARIES): Stop building
- libalarm.a
- (evolution_alarm_notify_SOURCES): Add alarm.c, alarm.h
- (evolution_alarm_notify_LDADD): Remove libalarm.a
-
-2003-02-27 JP Rosevear <jpr@ximian.com>
-
- * conduits/todo/Makefile.am: link to versist libtool object
-
- * conduits/calendar/Makefile.am: ditto
-
-2003-02-26 Hans Petter Jansson <hpj@ximian.com>
-
- This makes alarm notification work.
-
- * gui/alarm-notify/notify-main.c (main): Initialize GTK. Don't
- initialize bonobo activation - bonobo_init() does that for us.
-
-2003-02-26 Hans Petter Jansson <hpj@ximian.com>
-
- This makes creating appointments and tasks from the "New" button work.
-
- * gui/main.c (comp_editor_factory_fn): Doesn't need to take any args.
- (factory): Add a handler for CompEditorFactory.
-
-2003-02-26 Hans Petter Jansson <hpj@ximian.com>
-
- Fixes Ximian #37895.
-
- * gui/e-day-view.c (e_day_view_destroy): g_object_unref () ->
- pango_font_description_free ().
- (e_day_view_style_set): Ditto.
-
- * gui/e-week-view.c (e_week_view_destroy): Ditto.
-
-2003-02-26 Hans Petter Jansson <hpj@ximian.com>
-
- Fixes Ximian #38306.
-
- * gui/e-itip-control.c (clean_up): Do nothing if the private structure
- has been freed. Don't call non-g_free() freers with NULL pointers.
- (destroy): Do nothing if the private structure has been freed. Clear
- pointers to freed blocks.
-
-2003-02-25 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/print.c (print_calendar): Use fixed margins of 5% of page
- width/height. This is the same cheat as gtkhtml employs to get
- around the fact that GNOME_PRINT_KEY_PAGE_MARGIN_* don't return
- useful values (I think). It sort of sucks, but is better than
- no margins at all.
- (print_comp): Ditto.
-
-2003-02-25 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/calendar-config.c (calendar_config_get_default_view): Get
- default view from correct key.
-
-2003-02-25 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/dialogs/cal-prefs-dialog.c (get_widgets): Show start/end-of-day
- widgets.
-
-2003-02-23 Hans Petter Jansson <hpj@ximian.com>
-
- * cal-client/cal-client.c (cal_client_is_read_only): Don't warn
- if calendar isn't loaded... Doesn't seem to hurt, but this should
- probably be investigated further.
-
- * gui/dialogs/comp-editor-util.c (comp_editor_contacts_to_widget):
- If we have no contacts, don't bother trying to set them in the
- widget. Used to pass a NULL list, which would lead to much anxiety
- in callees.
-
- * gui/dialogs/meeting-page.c (meeting_page_fill_widgets):
- If we have no potential organizers, emit a sensible warning.
-
- * gui/dialogs/task-page.c (init_widgets): Don't try to connect to
- the "changed" signal of the GtkTextView -- we listen to the
- GtkTextBuffer now.
-
-2003-02-20 Not Zed <NotZed@Ximian.com>
-
- * gui/e-itip-control.c (destroy): dont unref accounts anymore.
- (change_status): itipAddress -> EAccount.
-
- * gui/calendar-model.c (calendar_model_destroy): dont unref
- accounts anymore.
- (calendar_model_value_at): simplify logic using account_list_find.
-
- * gui/dialogs/task-editor.c (task_editor_edit_comp): use new
- itip_addresses interfaces.
-
- * gui/dialogs/meeting-page.c (meeting_page_construct): use new
- itip_addresses_* interfaces. Should probably be using e_account
- directly.
- (meeting_page_finalize): dont unref the accounts list.
-
- * gui/dialogs/event-editor.c (event_editor_edit_comp): dont unref
- accounts anymore.
-
- * gui/itip-utils.c (itip_addresses_get_default): Just use
- e_account_list_get_default.
- (itip_addresses_get): dont ref the account object, just keep 1 ref
- to it.
- (find_account): remove.
- (itip_organizer_is_user): use e_account_list_find now.
- (itip_sentby_is_user): "
- (comp_limit_attendees): "
-
-2003-02-19 Not Zed <NotZed@Ximian.com>
-
- * gui/dialogs/meeting-page.c: addresses->accounts
- (meeting_page_finalize): unref accounts.
-
- * gui/dialogs/event-editor.c: Use EAccountList api's
-
- * pcs/cal-backend-util.c (cal_backend_mail_account_get): Removed,
- use a global EAccountList instead.
- (cal_backend_mail_account_get_default): Use the global
- EAccountList directly.
- (cal_backend_mail_account_is_valid): And here too.
-
- * gui/itip-utils.h: Removed ItipAddress structure.
-
- * gui/itip-utils.c (itip_addresses_get): Change it to return a
- global account object, so we dont need to duplicate all account
- info in the calendar.
- (itip_addresses_free, itip_address_free): Removed, use
- g_object_unref.
- (itip_addresses_get_default): Return an EAccount.
- (find_account): helper to lookup accounts based on name/address.
- (itip_organizer_is_user): Use helper to find account.
- (itip_sentby_is_user): "
- (comp_limit_attendees): "
- (comp_sentby): Update to use an EAccount direclty.
- (get_address): Removed, now redundant.
-
- * gui/e-itip-control.c: Changed priv->addresses to be accounts
- EAccountList.
- (destroy): unref accounts.
- (find_my_address): Change to use accounts list directly, also fix
- a small potential memleak.
-
- * gui/calendar-model.c: Change priv->addresses to be a direct
- reference to an EAccountList, renamed priv->accounts.
- (calendar_model_destroy): unref accounts.
- (calendar_model_value_at): Use EAccountList directly to lookup
- members.
-
- * gui/calendar-config.c (calendar_config_get_timezone)
- (calendar_config_set_timezone): Fix timezone key.
- (calendar_config_get_24_hour_format): Same for 24 hour format key.
- (calendar_config_set_24_hour_format): And here.
- (calendar_config_get_week_start_day): "
- (calendar_config_set_week_start_day): "
- (calendar_config_get_day_start_hour): "
- (calendar_config_set_day_start_hour): "
- (calendar_config_get_day_start_minute): "
- (calendar_config_set_day_start_minute): "
- (calendar_config_get_day_end_hour): "
- (calendar_config_set_day_end_hour): "
- (calendar_config_get_day_end_minute)
- (calendar_config_set_day_end_minute)
- (calendar_config_get_time_divisions)
- (calendar_config_set_time_divisions)
- (calendar_config_get_dnav_show_week_no)
- (calendar_config_set_dnav_show_week_no)
- (calendar_config_get_default_view)
- (calendar_config_set_default_view)
- (calendar_config_get_hpane_pos, calendar_config_set_hpane_pos)
- (calendar_config_get_vpane_pos, calendar_config_set_vpane_pos)
- (calendar_config_get_month_hpane_pos)
- (calendar_config_set_month_hpane_pos)
- (calendar_config_get_month_vpane_pos)
- (calendar_config_set_month_vpane_pos)
- (calendar_config_get_compress_weekend)
- (calendar_config_set_compress_weekend)
- (calendar_config_get_show_event_end)
- (calendar_config_set_show_event_end)
- (calendar_config_get_working_days)
- (calendar_config_set_working_days)
- (calendar_config_get_hide_completed_tasks)
- (calendar_config_set_hide_completed_tasks)
- (calendar_config_get_hide_completed_tasks_units)
- (calendar_config_set_hide_completed_tasks_units)
- (calendar_config_get_hide_completed_tasks_value)
- (calendar_config_set_hide_completed_tasks_value)
- (calendar_config_get_confirm_delete)
- (calendar_config_set_confirm_delete)
- (calendar_config_get_confirm_expunge)
- (calendar_config_set_confirm_expunge)
- (calendar_config_get_tasks_due_today_color)
- (calendar_config_set_tasks_due_today_color)
- (calendar_config_get_tasks_overdue_color)
- (calendar_config_set_tasks_overdue_color)
- (calendar_config_get_use_default_reminder)
- (calendar_config_set_use_default_reminder)
- (calendar_config_get_default_reminder_interval)
- (calendar_config_set_default_reminder_interval)
- (calendar_config_get_default_reminder_units)
- (calendar_config_set_default_reminder_units)
- (calendar_config_default_calendar_folder)
- (calendar_config_default_tasks_folder): Update config paths for
- new config convention, etc.
-
- * gui/alarm-notify/save.c (KEY_LAST_NOTIFICATION_TIME, etc):
- Updated keys to lowercase/proper path.
- (save_calendars_to_load): Store the calendars list as a gconf
- list.
- (get_calendars_to_load): Load the calendars list as a gconf list.
- (save_blessed_program): Similar, for the blessed program list.
- (is_blessed_program): Same here.
-
- * gui/alarm-notify/config-data.c (config_data_get_timezone): Update
- the path to the timezone key.
- (config_data_get_24_hour_format): Fix path to config option.
-
- * conduits/todo/todo-conduit.c (get_default_timezone): lower-case
- the timezone key.
-
- * conduits/calendar/calendar-conduit.c (get_default_timezone):
- lower-case the timezone key.
-
- * cal-client/cal-client.c (get_default_uri): Use the proper path
- to get the default folder uri's.
-
-2003-02-23 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/gnome-cal.c (backend_died_cb): Appease the compiler.
- (gnome_calendar_update_paned_quanta): Don't actually try to set
- the quantum properties. The quantum code should probably go away
- entirely now that the panes update during resize, but let's keep
- it around for a bit more.
-
- * gui/dialogs/event-editor.c (event_editor_construct): Ref & sink
- the pages.
-
- * gui/dialogs/task-editor.c (task_editor_construct): Ref & sink
- the pages.
-
-2003-02-23 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/cal-search-bar.c (make_suboptions): Eliminate
- e_utf8_to_gtk_string ().
-
- * gui/e-timezone-entry.c (e_timezone_entry_get_display_name):
- Ditto.
-
- * gui/calendar-model.c (date_value_to_string):
- e_utf8_from_locale_string () -> g_locale_to_utf8 ().
- (calendar_model_value_to_string): Ditto.
-
- * gui/e-cell-date-edit-text.c (ecd_get_text): Ditto.
-
- * gui/e-itip-control.c (write_label_piece): Ditto.
-
- * gui/print.c (format_date): Ditto.
- (print_week_view_background): Ditto.
- (print_month_summary): Ditto.
- (print_date_label): Ditto.
- (print_comp_item): Ditto.
-
- * gui/alarm-notify/alarm-notify-dialog.c (write_html_heading):
- Ditto.
-
-2003-02-22 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/dialogs/task-details-page.c (get_widgets): Show the custom
- widgets, since libglade appears to not want to do that.
-
- * gui/dialogs/task-page.c (clear_widgets): Make the description
- field use a GtkTextView.
- (task_page_fill_widgets): Ditto.
- (task_page_fill_component): Ditto.
- (init_widgets): Ditto.
- (get_widgets): Show the custom widgets, since libglade doesn't do it.
-
-2003-02-22 Hans Petter Jansson <hpj@ximian.com>
-
- * pcs/cal-backend.c (cal_backend_unref_categories): Add an
- iteration statement. Fixes hang in wombat.
-
-2003-02-22 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/apps_evolution_calendar.schemas: Commit fixes from
- Grzegorz Goawski <grzegol@pld.org.pl>.
-
-2003-02-21 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/calendar-model.c (calendar_model_class_init): GObject, not
- GtkObject.
- (calendar_model_destroy): -> calendar_model_finalize ().
-
- * gui/calendar-view.c (calendar_view_class_init): GObject, not
- GtkObject.
- (calendar_view_destroy): -> calendar_view_finalize ().
-
- * gui/comp-editor-factory.c (comp_editor_factory_class_init):
- GObject, not GtkObject.
- (comp_editor_factory_destroy): -> comp_editor_factory_finalize ().
-
- * gui/e-day-view.c (e_day_view_long_event_button_press):
- gtk_signal_disconnect () -> g_signal_handler_disconnect ().
- (e_day_view_on_event_button_press): Ditto.
- (e_day_view_on_long_event_click): Ditto.
- (e_day_view_on_event_click): Ditto.
- (e_day_view_on_event_double_click): Ditto.
- (e_day_view_on_delete_appointment): Ditto.
-
- * gui/e-week-view.c (e_week_view_on_text_item_event):
- gtk_signal_disconnect () -> g_signal_handler_disconnect ().
-
- * gui/alarm-notify/alarm-notify.c (AlarmNotify_RemoveCalendar):
- Don't cast to GtkObject.
-
-2003-02-21 Dan Winship <danw@ximian.com>
-
- * cal-client/Makefile.am (libcal_client_la_LIBADD): depend on
- libcal-util, libwombat, and libeutil
- (client_test_LDADD): Remove those deps from here
-
- * cal-util/Makefile.am (libcal_util_la_LIBADD): depend on
- libical-evolution.la
- (test_recur_LDADD): Remove that dependency here (and an ancient
- libversit dependency).
-
- * gui/alarm-notify/Makefile.am (evolution_alarm_notify_LDADD):
- remove some deps
-
- * gui/Makefile.am (libevolution_calendar_la_LIBADD): Likewise.
-
-2003-02-20 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/apps_evolution_calendar.schemas: Add GConf schemas.
-
- * gui/Makefile.am (EXTRA_DIST): Dist GConf schemas.
- (install-data-local): Install GConf schemas.
-
-2003-02-20 Dan Winship <danw@ximian.com>
-
- * gui/Makefile.am (libevolution_calendar_la_LIBADD):
- s/libemiscwidgets.a/libemiscwidgets.la/ and likewise for
- libetimezonedialog
-
-2003-02-19 Ettore Perazzoli <ettore@ximian.com>
-
- * pcs/Makefile.am: Split $(CORBA_GENERATED_H) rule from the
- $(CORBA_GENERATED_C) rule to that it autogens properly when using
- parallel makes.
- * cal-client/Makefile.am: Likewise.
-
- * gui/gnome-cal.c (gnome_calendar_setup_view_menus): Fix path to
- the calendar's GAL Views directory. [Pointed out by Grzegorz
- Goawski.]
-
-2003-02-11 Hans Petter Jansson <hpj@ximian.com>
-
- Enable printing for calendar and tasks.
-
- * gui/print.c: Set default font to be "Sans". Store the PrintConfig
- globally instead of PaperInfo (which doesn't exist anymore).
- (get_font_for_size): Don't use
- gnome_font_face_find_closest_from_weight_slant() anymore, since
- it's broken. Instead, use gnome_font_face_find() and put bold- and
- italicness in the name to look for. Descenders can now be negative,
- so have to take the absolute value to get font height.
- (print_comp): Use global, persistent print configuration.
- GnomePrintDialog is now a GtkDialog. Remove manual configuration
- parameter shuffling. Set up page using new methods.
- (print_calendar): Like print_comp(). For month view, force landscape
- mode by temporarily setting it in the config, and remove the old hack.
- (print_setup): Port. I'm not sure this works, but at least it
- compiles now. How do I test this code path?
- (print_day_view): Pass NULL for page denominator.
- (print_week_view): Ditto.
- (print_month_view): Ditto.
- (print_year_view): Ditto.
- (print_comp_item): Add missing gnome_print_beginpage(). How did this
- work before?
-
- * gui/tasks-control.c: Store the PrintConfig globally instead of
- passing individual parameters every time. Persistent too.
- (print_title): Look for "Sans Bold" instead of "Times" with
- GNOME_FONT_BOLD property. Don't use find_closest_from_weight_slant().
- (print_tasks): Set up page using new methods. GnomePrintMaster ->
- GnomePrintJob. Get params from global config instead of args.
- (tasks_control_print_cmd): Use global, persistent print configuration.
- Remove manual portrait/landscape hack. GnomePrintDialog is now a
- GtkDialog. Set params in global config instead of passing them to
- print_tasks().
- (tasks_control_print_preview_cmd): print_tasks() now takes fewer
- args.
-
-2003-02-11 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/e-meeting-time-sel.c (e_meeting_time_selector_construct):
- Don't use gtk_scrolled_window_set_scrollbar_spacing() anymore.
-
-2003-02-10 Hans Petter Jansson <hpj@ximian.com>
-
- * pcs/cal-backend-file.c (save): Don't try to make an error string
- from an uninitialized GnomeVFSResult.
-
-2003-02-10 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/Makefile.am: Make the CORBA IDL compilation work with
- parallel makes.
- * gui/dialogs/Makefile.am: Likewise.
- * gui/alarm-notify/Makefile.am: Likewise.
-
-2003-02-07 Rodney Dawes <dobey@ximian.com>
-
- * gui/alarm-notify/GNOME_Evolution_Calendar_AlarmNotify.server.in:
- remove this file, as it's generated now
- * gui/alarm-notify/GNOME_Evolution_Calendar_AlarmNotify.server.in.in:
- Add this file to generate the .server.in from, with hardcoded path
- * gui/alarm-notify/Makefile.am: Hardcode path in server file
-
-2003-02-07 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #37706
-
- * gui/comp-editor-factory.c (cal_opened_cb): added PERMISSION_DENIED
- case for not ending process on g_assert_not_reached.
-
-2003-02-06 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/e-day-view-time-item.c
- (e_day_view_time_item_show_popup_menu): Use
- e_auto_kill_popup_menu_on_selection_done() instead of
- e_auto_kill_popup_menu_on_hide().
- * gui/dialogs/meeting-page.c (right_click_cb): Likewise.
-
-2003-02-06 Dan Winship <danw@ximian.com>
-
- * gui/dialogs/event-page.c (make_timezone_entry): show the widget
- before returning it.
-
- * importers/main.c (main): s/PACKAGE/GETTEXT_PACKAGE/ in gettext
- init
-
-2003-02-05 Dan Winship <danw@ximian.com>
-
- * gui/Makefile.am (INCLUDES): Remove cruft. Rename ICONSDIR to
- IMAGESDIR.
- (gladedir, etspecdir, serverdir): Remove definitions
- (libevolution_calendar_la_LDFLAGS): Remove -export-dynamic, add
- -module.
-
- * gui/calendar-config.c: #include <string.h>
-
- * gui/calendar-component.c (add_creatable_item):
- s/ICONSDIR/IMAGESDIR/
-
- * gui/comp-util.c: #include <string.h>
-
- * gui/e-alarm-list.c: #include e-time-utils.h
- (row_deleted): Remove unused variable.
- (e_alarm_list_append): Likewise.
-
- * gui/e-date-time-list.c: #include e-time-utils.h, timeutil.h,
- calendar-config.h
- (row_deleted): Remove unused variable
- (e_date_time_list_append): Likewise.
-
- * gui/e-day-view.c (e_day_view_unrealize): Remove unused var
- (e_day_view_style_set): Likewise.
- (e_day_view_set_event_font_cb): Likewise.
-
- * gui/e-day-view-time-item.c: #include <string.h>
- (e_day_view_time_item_get_column_width): Remove unused variable.
-
- * gui/e-itip-control.c: #include <unistd.h>
- (url_requested_cb): s/ICONSDIR/IMAGESDIR/
-
- * gui/e-week-view.c (e_week_view_unrealize): Remove unused variable
- (e_week_view_style_set): Likewise
-
- * gui/e-week-view-titles-item.c: #include string.h
- * gui/itip-bonobo-control.c: Likewise
- * gui/print.c: Likewise
-
-
- * gui/alarm-notify/Makefile.am: Use privlibexecdir.
- (INCLUDES): Remove cruft.
- (gladedir, serversdir): Remove definitions
- (evolution_alarm_notify_LDFLAGS): Remove no-longer-needed
- -export-dynamic.
-
- * gui/alarm-notify/alarm-notify-dialog.c (write_html_heading):
- s/ICONSDIR/IMAGESDIR
-
- * gui/alarm-notify/notify-main.c (main): Fix up gettext
- initialization
-
-
- * gui/dialogs/Makefile.am (INCLUDES): Remove cruft. Rename
- ICONSDIR to IMAGESDIR.
- (gladedir, etspecdir): Remove definitions
-
- * gui/dialogs/alarm-page.c: #include gtktreeselection.h and
- gtkcellrenderertext.h
- (append_reminder): Remove unused variable.
- (alarm_page_fill_component): Likewise.
- (alarm_page_set_summary): Likewise.
- (delete_clicked_cb): Likewise.
-
- * gui/dialogs/comp-editor.c (make_icon_from_comp):
- s/ICONSDIR/IMAGESDIR/
-
- * gui/dialogs/event-page.c: #include <string.h>
-
- * gui/dialogs/meeting-page.c (meeting_page_construct): Remove
- unused variable.
- (meeting_page_fill_widgets): Likewise
-
- * gui/dialogs/recurrence-page.c: #include gtktreeselection.h and
- gtkcellrenderertext.h
- (append_exception): Remove unused variable
- (fill_component): Likewise
- (recurrence_page_set_summary): Likewise.
- (exception_delete_cb): Likewise
-
-
- * cal-client/Makefile.am (libcal_clientincludedir): Define in
- terms of privincludedir
-
- * cal-client/client-test.c (main): Fix up gettext initialization
-
- * cal-client/cal-client.c (cal_client_construct): Likewise
-
-
- * cal-util/Makefile.am (INCLUDES): Remove cruft.
- (libcal_utilincludedir): Define in terms of privincludedir
-
-
- * pcs/Makefile.am (INCLUDES): Remove cruft.
- (pcsincludedir): Define in terms of privincludedir
-
- * pcs/cal-backend-file.c (cal_backend_file_finalize): Remove
- unused variable
-
-
- * importers/Makefile.am: Update this some although it's not
- currently being built
-
-2003-02-05 Dan Winship <danw@ximian.com>
-
- * gui/alarm-notify/notify-main.c (main):
- s/glade_gnome_init/glade_init/
-
- * gui/calendar-offline-handler.c: s/BonoboXObject/BonoboObject/
-
- * gui/comp-editor-factory.c: Likewise
-
-2003-02-05 Dan Winship <danw@ximian.com>
-
- * cal-util/cal-recur.c (cal_recur_nth): array of localized month
- day names ("1st" - "31st")
-
- * gui/dialogs/recurrence-page.c (make_recur_month_num_submenu,
- make_recur_month_num_menu, month_num_menu_selection_done_cb): Use
- the new cal_recur_nth[] array. The way this was done before didn't
- localize properly.
-
- From evolution-1-2-branch:
-
- * gui/e-itip-control.c (write_recurrence_piece): Describe
- recurrences, if we can. #30993
- (set_date_label): If the meeting has recurrences, call
- write_recurrence_piece after writing the start and end dates.
- (write_label_piece): Wrap the timezone in <font size=-1> to
- de-emphasize it a bit and try to keep the timestamp on a single
- line even with big Outlook timezone names. Add an option to show
- just the date, for describing the end of recurrences (since the
- time in the UNTIL is the *beginning* of the last instance, which
- would confuse people).
- (update_item): Set the VCALENDAR's METHOD.
- (ok_clicked_cb): Use update_item, not remove_item, to process a
- cancelation. Part of #33875.
-
- * pcs/cal-backend-file.c (cal_backend_file_cancel_object): New,
- handle an ICAL_METHOD_CANCEL update.
- (cal_backend_file_update_objects): Call
- cal_backend_file_update_object or cal_backend_file_cancel_object
- as appropriate.
-
-2003-02-04 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/e-meeting-time-sel.c
- (e_meeting_time_selector_on_invite_others_button_draw):
- Rename to e_meeting_time_selector_on_invite_others_button_expose()
- and handle "expose-event" instead of "draw".
- (e_meeting_time_selector_construct): The "draw" signal doesn't exist
- anymore - connect to "expose-event" instead.
-
- * gui/dialogs/event-page.c (clear_widgets): Clear the GtkTextBuffer
- for the description.
- (event_page_fill_widgets): Use the GtkTextBuffer.
- (event_page_fill_component): Use the GtkTextBuffer.
- (init_widgets): Create a GtkTextBuffer for the GtkTextView. Set word
- wrap. Connect to the "changed" signal of the model instead of the view.
-
-2003-02-04 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/e-meeting-time-sel-item.c
- (e_meeting_time_selector_item_paint_day_top): Use PangoLayout to
- draw text.
-
-2003-02-02 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/e-day-view.c (e_day_view_set_event_font_cb): Skip setting the
- "font_gdk" arg for now.
- (e_day_view_update_main_canvas_drag): Ditto.
-
- * gui/e-week-view.c (e_week_view_style_set): Ditto.
-
- * gui/weekday-picker.c (configure_items): Ditto.
-
- * gui/dialogs/event-page.c (get_widgets): Show custom widgets
- manually, since the visibility specified in the Glade XML appears
- to not have any effect.
-
- * gui/dialogs/recurrence-page.c (get_widgets): Ditto.
-
-2003-01-30 Ronald Kuetemeier <ronald@kuetemeier.com>
-
- Fixes #35572
-
- * gui/alarm-notify/alarm-queue.c: set saved_notification_time to last
- notification time when we update the config to last notification, so
- alarms will not get trigged again if a new calendar window is opened.
-
-2003-01-26 Chris Toshok <toshok@ximian.com>
-
- * conduits/todo/todo-conduit.c: CalClient and CalComponent are
- GObjects.
-
- * conduits/calendar/calendar-conduit.c: same.
-
-2003-01-26 Chris Toshok <toshok@ximian.com>
-
- * conduits/calendar/calendar-conduit.c (start_calendar_server):
- fix warning.
- (get_default_timezone): BonoboConfigDatabase -> e_config_listener.
- (accept_all_cookies): remove.
- (conduit_get_gpilot_conduit): remove the oaf initialization stuff.
-
- * conduits/todo/todo-conduit.c (start_calendar_server):
- fix warning.
- (get_default_timezone): BonoboConfigDatabase -> e_config_listener.
- (accept_all_cookies): remove.
- (conduit_get_gpilot_conduit): remove the oaf initialization stuff.
-
- * Makefile.am (CONDUIT_DIR): uncomment the conduit stuff.
-
-2003-01-26 Hans Petter Jansson <hpj@ximian.com>
-
- Make clicks, drags and resizes work, and pangoize remaining strings.
- Fix EText placement.
-
- * gui/e-day-view-top-item.c (e_day_view_top_item_draw_long_event):
- Use Pango.
-
- * gui/e-day-view.c (e_day_view_on_top_canvas_button_press):
- Don't add scroll offset, it's already factored in.
- (e_day_view_on_main_canvas_button_press): Ditto.
- (e_day_view_on_top_canvas_motion): Ditto.
- (e_day_view_on_main_canvas_motion): Ditto.
- (e_day_view_reshape_long_event): Don't set the "font_gdk" property.
- Its non-existence will prevent the other properties from being set as
- well.
- (e_day_view_reshape_day_event): Ditto.
- (e_day_view_update_top_canvas_drag): Ditto.
- (e_day_view_start_editing_event): ETextEventProcessor is a GObject
- now. So use g_signal_stuff.
- (e_day_view_check_auto_scroll): Factor out scroll offset before
- checking the pointer's position relative to widget.
- (e_day_view_auto_scroll_handler): Don't freeze the canvas when
- scrolling - it will fail to update the canvas. If this is not
- intended behaviour, it's a bug in the canvas, I think.
- (e_day_view_on_main_canvas_drag_motion): Factor in the scroll offset
- before checking for auto-scroll, since the function requires this.
-
- * gui/e-week-view.c (e_week_view_reshape_event_span): Don't set the
- "font_gdk" property. Its non-existence will prevent the other
- properties from being set as well.
- (e_week_view_start_editing_event): ETextEventProcessor is a GObject
- now. So use g_signal_stuff.
-
-2003-01-25 Hans Petter Jansson <hpj@ximian.com>
-
- Mainly making all views use PangoLayouts for text. When drawing a
- PangoLayout, the draw offset is the top left corner of the layout,
- not the text's baseline. Keep this in mind when viewing the
- changes. I'll be brief about the exact changes, since they speak
- better for themselves.
-
- * gui/e-day-view-time-item.c (e_day_view_time_item_get_column_width):
- Use Pango.
- (e_day_view_time_item_draw): Use Pango.
-
- * gui/e-day-view-top-item.c (e_day_view_top_item_draw): Use Pango.
- (e_day_view_top_item_draw_long_event): Add some FIXME text so we can
- see when this is being used. Is it in use at all?
-
- * gui/e-day-view.c: No longer specify an explicit X font string for
- the large font. Use the main font, and change the point size.
- (e_day_view_init): Use Pango.
- (e_day_view_style_set): Use Pango. Comment out the gdk_font setting
- for the drag text items for now.
-
- * gui/e-day-view.h: Use Pango.
-
- * gui/e-week-view-event-item.c (e_week_view_draw_time): Use Pango.
-
- * gui/e-week-view-main-item.c (e_week_view_main_item_draw_day):
- Use Pango.
-
- * gui/e-week-view-titles-item.c (e_week_view_titles_item_draw):
- Use Pango.
-
- * gui/e-week-view.c: No longer specify an explicit X font string for
- the small font. Use the main font, and change the point size.
- (e_week_view_init): Use Pango.
- (e_week_view_destroy): Use Pango.
- (get_string_width): Implemented for convenience.
- (get_digit_width): Implemented for convenience.
- (e_week_view_style_set): Use Pango.
- (e_week_view_recalc_cell_sizes): Use Pango.
- (e_week_view_get_time_string_width): Use Pango.
-
- * gui/e-week-view.h: Use Pango.
-
- Following are some random UTF-8 fixes and a crash fix.
-
- * gui/itip-utils.c (comp_description): Use g_locale_to_utf8 ().
-
- * gui/dialogs/comp-editor.c (make_title_from_comp): Return a
- UTF-8 string.
-
- * gui/dialogs/alarm-page.c (alarm_page_set_summary): Pass UTF-8
- directly to GTK.
-
- * gui/dialogs/delete-comp.c (delete_component_dialog): Ditto.
-
- * gui/dialogs/meeting-page.c (meeting_page_fill_widgets): Ditto.
- (meeting_page_construct): Ditto.
-
- * gui/dialogs/recurrence-page.c (recurrence_page_set_summary): Ditto.
-
- * gui/dialogs/event-editor.c (event_editor_finalize): Fix crash caused
- by gtk_object_destroy()-ing a non-GtkObject.
-
-2003-01-24 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/e-day-view.c (e_day_view_on_editing_stopped): Don't insist
- appointment is updated if both old and new summary are blank.
-
- * gui/e-week-view.c (e_week_view_on_editing_stopped): Ditto.
-
- * gui/e-timezone-entry.c (on_button_clicked): Timezone dialog is now
- a GtkDialog. Treat it as such.
-
- * gui/goto.c (ecal_event): Goto dialog is now a GtkDialog. Treat it
- as such.
- (goto_dialog): Ditto.
-
- * gui/goto-dialog.glade: Set the return IDs from the dialog buttons.
-
- * gui/dialogs/meeting-page.c (popup_delegate_cb): Enable the delegate
- dialog. It's now a GtkDialog, so treat it like one.
- (right_click_cb): Use GTK stock item, not GNOME (that doesn't work
- anymore).
-
- * gui/e-delegate-dialog.glade: Set the return IDs from dialog buttons.
-
- * gui/print.c (print_calendar): Correct the print dialog init. Code
- is still not enabled, though.
-
- * gui/tasks-control.c (print_tasks): Add a warning about printing
- being disabled.
-
-2003-01-24 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/dialogs/Makefile.am (iconsdir): Remove, this is now defined
- in configure.in.
-
- * gui/Makefile.am (iconsdir): Remove; this is now defined in
- configure.in.
-
- * gui/alarm-notify/Makefile.am (iconsdir): Remove; this is now
- defined in configure.in.
-
-2003-01-23 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/dialogs/event-page.c (get_widgets): GTK_OBJECT -> G_OBJECT cast.
-
- * gui/dialogs/alarm-page.c (get_widgets): Ditto.
-
- * gui/dialogs/meeting-page.c (get_widgets): Ditto.
-
- * gui/dialogs/recurrence-page.c (get_widgets): Ditto.
-
- * gui/dialogs/schedule-page.c (get_widget): Ditto.
-
- * gui/dialogs/task-details-page.c (get_widget): Ditto.
-
- * gui/dialogs/task-page.c (get_widget): Ditto.
-
- * gui/e-meeting-time-sel.c (e_meeting_time_selector_construct): Add a
- FIXME comment to think about.
-
- * gui/dialogs/comp-editor.c (comp_editor_merge_ui): Add a terminating
- NULL to the concatenation.
-
-2003-01-23 Hans Petter Jansson <hpj@ximian.com>
-
- Fixes some trivial, but distracting, warnings.
-
- * gui/calendar-config.c (on_timezone_set): Fix constness.
-
- * gui/e-timezone-entry.c (on_button_clicked): Fix constness.
-
- * gui/dialogs/event-page.c (contacts_changed_cb): Fix constness.
-
- * gui/dialogs/task-page.c (contacts_changed_cb): Fix constness.
-
- * gui/e-itip-control.c (start_default_server): Cast callback with
- G_CALLBACK ().
-
- * gui/dialogs/schedule-page.c (init_widgets): Cast callback with
- G_CALLBACK ().
-
- * gui/calendar-offline-handler.c (impl_dispose): Takes GObject,
- not GtkObject.
- (impl_finalize): Ditto.
-
- * gui/calendar-view.c (calendar_view_edit): Now takes parent window
- as second arg.
-
- * gui/e-meeting-model.c (select_names_ok_cb): Fix constness.
- (get_select_name_dialog): Cast callback to BonoboListenerCallbackFn.
-
- * gui/e-meeting-time-sel.c
- (e_meeting_time_selector_options_menu_position_callback): Add the
- push_in arg to arg list. This was crash-prone before.
- (e_meeting_time_selector_autopick_menu_position_callback): Ditto.
-
- * gui/alarm-notify/alarm-notify-dialog.c: Include e-unicode.h.
-
-2003-01-23 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/Makefile.am (componentdir): Removed definition; this is now
- defined in configure.in.
-
-2003-01-22 Ettore Perazzoli <ettore@ximian.com>
-
- * pcs/cal-backend.c (cal_backend_ref_categories): Do not put the
- category in both the changed_categories and the categories hashes;
- fixes a double-free when finalizing the CalBackend.
-
-2003-01-22 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/gnome-cal.c (gnome_calendar_setup_view_menus): Use
- EVOLUTION_GALVIEWSDIR.
-
- * gui/e-tasks.c (e_tasks_setup_view_menus): Use
- EVOLUTION_GALVIEWSDIR.
-
- * cal-util/Makefile.am: Install libcal-util.la in $(privlibdir)
- instead of $(libdir).
-
- * gui/dialogs/comp-editor.c (setup_widgets): Get
- evolution-comp-editor.xml from EVOLUTION_UIDIR.
- (comp_editor_merge_ui): Get the file in EVOLUTION_UIDIR.
-
- * gui/tasks-control.c (tasks_control_activate): Get
- evolution-tasks.xml from EVOLUTION_UI_DIRECTORY.
-
- * gui/calendar-commands.c (calendar_control_activate): Get
- evolution-calendar.xml from EVOLUTION_UI_DIRECTORY.
-
- * pcs/Makefile.am (pcsincludedir): Version using $(BASE_VERSION).
-
- * importers/Makefile.am: Install evolution-calendar-importer in
- $(libexecdir)/evolution/$(BASE_VERSION).
- (sounddir): Remove.
-
- * gui/dialogs/Makefile.am (iconsdir): Version using
- $(BASE_VERSION).
- (gladedir): Likewise.
- (etspecdir): Likewise.
-
- * gui/Makefile.am (help_base): Remove.
- (install-data-local): Do not make the $(help_base)/C directory.
- (etspecdir): Version using $(BASE_VERSION).
- (gladedir): Likewise.
- (iconsdir): Likewise.
- (INCLUDES): Update the EVOLUTION_IMAGESDIR define to be versioned,
- and add a -DEVOLUTION_GALVIEWSDIR.
-
- * cal-util/Makefile.am: Install evolution-alarm-notify in
- $(libexecdir)/evolution/$(BASE_VERSION).
-
- * cal-util/Makefile.am (libcal_utilincludedir): Version using
- $(BASE_VERSION).
- * gui/alarm-notify/Makefile.am (iconsdir): Likewise.
- (gladedir): Likewise.
-
- * cal-client/Makefile.am: Install libcal-client.la in privlibdir
- instead of libdir.
- (libcal_clientincludedir): Version using $(BASE_VERSION).
-
-2003-01-18 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/print.c (print_calendar): Create a GnomePrintDialog,
- not a GnomePrinterDialog. They're different things. Patch from
- Chema.
-
-2003-01-17 Dan Winship <danw@ximian.com>
-
- * pcs/cal-backend.c: Move some non-file-backend-specific stuff
- from cal-backend-file here so it can be shared with other
- backends.
- (CalBackendPrivate): add this, containing the categories hashes
- and the (formerly public) clients list.
- (cal_backend_init, cal_backend_finalize): Handle backend->priv.
- (cal_destroy_cb): Simplify this (and redo it as a weak notify
- func)
- (cal_backend_add_cal): Keep a weak ref on the cal rather than
- connecting to its "destroy" signal. Call notify_categories_changed
- to let the new cal know about them.
- (get_object): Default implementation of cal_backend_get_object.
- that calls cal_component_get_as_string on the return value of
- cal_backend_get_object_component.
- (cal_backend_notify_mode, cal_backend_notify_update,
- cal_backend_notify_remove, cal_backend_notify_error): Notify each
- Cal about something.
- (cal_backend_ref_categories, cal_backend_unref_categories):
- Maintain a list of categories that are used by components in the
- backend, and trigger categories_changed notifications as needed.
-
- * pcs/cal-backend-file.c: Remove stuff that was moved to
- CalBackend (notify funcs, category handling, get_object
- implementation)
-
-2003-01-16 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/e-alarm-list.[ch]: Implement EAlarmList as CalComponentAlarm
- list with a GtkTreeModel interface.
-
- * gui/Makefile.am: Add e-alarm-list.[ch].
-
- * gui/dialogs/alarm-page.[ch]: Use GtkTreeView with the new
- EAlarmList as model for the alarm list. Update copyright.
-
- * gui/dialogs/recurrence-page.[ch]: Update copyright.
- (free_exception_date_time): Removed.
- (fill_exception_widgets): Kill a lingering clist operation.
-
-2003-01-15 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/e-meeting-time-sel.c (e_meeting_time_selector_construct):
- Create accel groups for popup menus. Fixes crash.
-
- * gui/e-date-time-list.[ch]: Implement EDateTimeList as
- CalComponentDateTime list with a GtkTreeModel interface.
-
- * gui/Makefile.am: Add e-date-time-list.[ch].
-
- * gui/dialogs/recurrence-page.c: Use GtkTreeView with the new
- EDateTimeList as model for the exception list.
-
- * gui/e-day-view.c: Silence warnings caused by missing casts.
-
- * gui/e-week-view.c: Silence warnings caused by missing casts.
-
-2003-01-15 Rodney Dawes <dobey@ximian.com>
-
- * gui/Makefile.am: Added libevolution_calendar_la_LDFLAGS, and
- avoid versioning the shlib component
-
-2003-01-14 Ettore Perazzoli <ettore@ximian.com>
-
- * cal-client/Makefile.am (CORBA_SOURCES_GENERATED): Renamed from
- CORBA_GENERATED.
- (CORBA_GENERATED): New, put both $(CORBA_SOURCES_GENERATED) and
- $(CORBA_HEADERS_GENERATED) in it.
- (BUILT_SOURCES): Put $(CORBA_GENERATED) in here.
-
-2003-01-14 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/e-calendar-table.c (tasks_popup_menu): Cast signal handlers
- to GtkSignalFunc, avoid warnings.
-
- * gui/gnome-cal.c (set_view): Only set view ID if we have an instance.
-
-2003-01-14 Ettore Perazzoli <ettore@ximian.com>
-
- * cal-util/Makefile.am (EXTRA_DIST): cal-util-marshal.list.
-
- * Makefile.am: Comment out the CONDUIT_DIR stuff for now.
-
-2003-01-14 Rodney Dawes <dobey@ximian.com>
-
- * gui/gnome-cal.c: Use GtkPaned instead of EPaned
-
-2003-01-14 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/e-day-view.c (e_day_view_init): Work around canvas crashes
- by ensuring rectangles have an initial width.
-
-2003-01-13 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/config-control-factory.h: Removed.
- * gui/config-control-factory.c: Removed.
-
- * gui/itip-bonobo-control.c: Renamed from itip-control-factory.c.
- (itip_bonobo_control_new): New.
- (itip_control_factory_init): Removed.
-
- * gui/itip-bonobo-control.h: Renamed from itip-control-factory.h.
-
- * gui/tasks-control-factory.c: Removed.
- * gui/tasks-control-factory.h: Removed.
-
- * gui/control-factory.c (control_factory_init): Removed.
-
- * gui/Makefile.am: Updated to build everything as
- libevolution-calendar.so and install in the COMPONENTDIR.
-
- * gui/GNOME_Evolution_Calendar.server.in.in: Updated to build the
- component as a shared library.
-
- * gui/main.c (main): Removed.
-
- * gui/calendar-component.c (calendar_component_get_object): New.
- (owner_set_cb): Do not store the shell pointer in shells.
- (owner_unset_cb): Do not remove the shell pointer from shells;
- instead, just set global_shell_client to NULL.
-
- * gui/calendar-component.h: Renamed from component-factory.h.
- * gui/calendar-component.c: Renamed from component-factory.c.
-
-2003-01-10 Ettore Perazzoli <ettore@ximian.com>
-
- * importers/icalendar-importer.c (connect_to_shell):
- CORBA_Object_release() the CORBA shell.
-
-2003-01-09 Dan Winship <danw@ximian.com>
-
- * gui/dialogs/recurrence-page.c (make_recur_month_num_submenu,
- make_recur_month_num_menu, month_num_menu_selection_done_cb): Use
- the new cal_recur_nth[] array. The way this was done before didn't
- localize properly.
-
- * cal-util/cal-recur.c (cal_recur_nth): array of localized month
- day names ("1st" - "31st")
-
- * cal-util/cal-component.c (cal_component_set_recurid): Allow
- recur_id to be NULL to clear the recurrence id. (Based on a story
- by JP on evolution-1-2-recurid-branch)
-
- * gui/print.c: Remove unused gnome-print-copies.h #include
-
- * pcs/query.c (query_new): Use g_object_weak_ref rather than
- connecting to "destroy" (which doesn't actually exist on a
- CalBackend)
- (backend_destroyed_cb): Update prototype.
-
-2003-01-08 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/alarm-notify/Makefile.am: Icons are now in
- $(datadir)/evolution/images instead of
- $(datadir)/images/evolution.
- * gui/Makefile.am: Likewise.
- * gui/dialogs/Makefile.am: Likewise.
-
-2003-01-06 Dan Winship <danw@ximian.com>
-
- * idl/Makefile.am: remove idldir definition. (It's defined in
- configure.in now)
-
-2002-12-19 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/calendar-commands.c (calendar_control_deactivate):
- Replace gtk_signal_disconnect_by_data() with
- g_signal_handlers_disconnect_matched(). Former takes GtkObject,
- latter takes GObject.
-
- * gui/calendar-model.c (calendar_model_destroy): Ditto.
- (update_query): Ditto.
- (calendar_model_set_cal_client): Ditto.
-
- * gui/e-day-view.c (e_day_view_destroy): Ditto.
- (update_query): Ditto.
- (e_day_view_set_cal_client): Ditto.
-
- * gui/e-tasks.c (query_eval_error_cb): Ditto.
- (query_query_done_cb): Ditto.
-
- * gui/e-week-view.c (e_week_view_destroy): Ditto.
- (update_query): Ditto.
- (e_week_view_set_cal_client): Ditto.
-
- * gui/gnome-cal.c (update_query): Ditto.
- (gnome_calendar_destroy): Ditto.
-
- * gui/tasks-control.c (tasks_control_deactivate): Ditto.
-
- * gui/e-comp-editor-registry.c (foreach_close_cb): Replace
- gtk_signal_handler_(un)block_by_data() with
- g_signal_handlers_(un)block_matched(). Former takes GtkObject, latter
- takes GObject.
-
- * gui/dialogs/alarm-page.c (alarm_page_get_type): Replace with
- E_MAKE_TYPE().
- (alarm_page_class_init): Use GObject as base class instead of
- GtkObject, and set up finalization instead of destroy handler.
- (alarm_page_destroy): Change to alarm_page_finalize() and assume
- parent is GObject, not GtkObject.
- (alarm_page_new): Use g_object_new(), not gtk_type_new().
-
- * gui/dialogs/event-page.c: Same general changes as above file.
- (update_time): Replace gtk_signal_handler_(un)block_by_data()
- with g_signal_handlers_(un)block_matched().
- (clear_widgets): Ditto.
- (times_updated): Ditto.
-
- * gui/dialogs/recurrence-page.c: Same general changes as above file.
- (clear_widgets): Replace gtk_signal_handler_(un)block_by_data()
- with g_signal_handlers_(un)block_matched().
- (append_exception): Ditto.
- (fill_ending_date): Ditto.
- (recurrence_page_fill_widgets): Ditto.
-
- * gui/dialogs/comp-editor.c: Same general changes as above file.
- (comp_editor_finalize): Replace gtk_signal_disconnect_by_data()
- with g_signal_handlers_disconnect_matched().
- (comp_editor_remove_page): Ditto.
-
- * gui/dialogs/event-editor.c: Same general changes as above file.
- * gui/dialogs/meeting-page.c: Same general changes as above file.
- * gui/dialogs/schedule-page.c: Same general changes as above file.
- * gui/dialogs/task-details-page.c: Same general changes.
- * gui/dialogs/task-editor.c: Same general changes as above file.
- * gui/dialogs/task-page.c: Same general changes as above file.
- * gui/dialogs/e-delegate-dialog.c: Same general changes.
-
-2002-12-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * gui/e-itip-control.c (write_html): Use camel_text_to_html()
- instead.
-
-2002-12-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * gui/e-itip-control.c (write_html): Correctly convert text.value
- into HTML here (ie, don't pass "<i>None</i>" into e_text_to_html()
- if text.value is NULL).
-
-2002-12-06 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #35003
-
- * gui/misc.[ch] (get_uri_without_password): new function for
- removing the password from the CalClient's uris.
-
- * gui/gnome-cal.c (client_cal_opened_cb): use the URI returned by
- get_uri_without_password for messages.
- (backend_error_cb): likewise.
- (backend_died_cb): likewise.
- (gnome_calendar_open): likewise.
- (open_error, method_error, permission_error): likewise.
-
- * gui/e-tasks.c (e_tasks_open): hide the password from the URI
- being displayed in messages.
- (backend_error_cb): likewise.
-
-2002-12-06 Hans Petter Jansson <hpj@ximian.com>
-
- * cal-client/cal-query.c (cal_query_done_status_enum_get_type):
- Implement GType for this enumeration.
- (cal_query_class_init): Use the enumeration instead of the
- abstract one.
-
- * cal-client/cal-query.h: Add type macro and proto for enum.
-
-2002-12-06 Hans Petter Jansson <hpj@ximian.com>
-
- * gui/component-factory.c (create_view): Pass the env argument to
- bonobo_control_set_property ().
-
- * gui/e-meeting-model.c (class_init): We're no longer derived from
- GtkObject, so use GObject class methods instead. destroy->finalize.
- (destroy): Zapped.
- (finalize): Implement based on old destroy ().
-
-2002-12-06 Hans Petter Jansson <hpj@ximian.com>
-
- * cal-client/cal-client.c (cal_client_open_status_enum_get_type):
- Create a non-abstract enumeration type derived from GEnum.
- (cal_client_set_mode_status_enum_get_type): Ditto.
- (cal_mode_enum_get_type): Ditto.
- (cal_client_class_init): Use our enumerations and not the abstract
- one.
- (cal_client_finalize): Don't destroy factories, since the CalClient
- doesn't own them anymore. They're shared between CalClients now.
- (get_factories): Implement. Move the factory setup code here from
- cal_client_construct (), and cache the factories. This is hopefully
- temporary, until wombat goes away or is fixed.
- (cal_client_construct): Most of the code moved to get_factories ().
-
- * cal-client/cal-client.h: Add enumeration type macros and protos.
-
- * gui/cal-search-bar.c (cal_search_bar_get_type): Removed in favour
- of E_MAKE_TYPE, which uses GObject calls.
- (cal_search_bar_class_init): Use g_type_class_peek_parent ().
-
- * gui/calendar-model.c (calendar_model_get_type):
- (calendar_model_class_init): Ditto, like above file.
- * gui/calendar-view.c (calendar_view_get_type):
- (calendar_view_class_init): Ditto.
- * gui/e-calendar-table.c (e_calendar_table_get_type):
- (e_calendar_table_class_init): Ditto.
- * gui/e-comp-editor-registry.c (e_comp_editor_registry_get_type):
- (class_init): Ditto.
- * gui/e-day-view-main-item.c (e_day_view_main_item_get_type):
- (e_day_view_main_item_class_init): Ditto.
- * gui/e-day-view-time-item.c (e_day_view_time_item_get_type):
- (e_day_view_time_item_class_init): Ditto.
- * gui/e-day-view-top-item.c (e_day_view_top_item_get_type):
- (e_day_view_top_item_class_init): Ditto.
- * gui/e-day-view.c (e_day_view_get_type):
- (e_day_view_class_init): Ditto.
- * gui/e-itip-control.c (e_itip_control_get_type):
- (class_init): Ditto.
- * gui/e-meeting-attendee.c (e_meeting_attendee_get_type):
- (class_init): Ditto.
- * gui/e-meeting-model.c (e_meeting_model_get_type):
- (class_init): Ditto.
- * gui/e-meeting-time-sel-item.c
- (e_meeting_time_selector_item_get_type):
- (e_meeting_time_selector_item_class_init): Ditto.
- * gui/e-meeting-time-sel.c
- (e_meeting_time_selector_get_type):
- (e_meeting_time_selector_class_init): Ditto.
- * gui/e-timezone-entry.c (e_timezone_entry_get_type):
- (e_timezone_entry_class_init): Ditto.
- * gui/e-week-view-event-item.c (e_week_view_event_item_get_type):
- (e_week_view_event_item_class_init): Ditto.
- * gui/e-week-view-main-item.c (e_week_view_main_item_get_type):
- (e_week_view_main_item_class_init): Ditto.
- * gui/e-week-view-titles-item.c (e_week_view_titles_item_get_type):
- (e_week_view_titles_item_class_init): Ditto.
- * gui/gnome-cal.c (gnome_calendar_get_type):
- (gnome_calendar_class_init): Ditto.
- * gui/weekday-picker.c (weekday_picker_get_type):
- (weekday_picker_class_init): Ditto.
-
- * gui/e-week-view.c (e_week_view_get_type):
- (e_week_view_class_init): Ditto, but parent_class init was moved
- from get_type() to class_init().
-
- * gui/calendar-view-factory.c (calendar_view_factory_get_type):
- (calendar_view_factory_class_init): Ditto, and set up finalize
- callback instead of destroy.
- (calendar_view_factory_finalize): It's a GObject, so implement this.
- (celendar_view_factory_destroy): Move code to _finalize() and remove.
-
- * gui/main.c (init_bonobo): Remove extraneous bonobo_activation_init().
-
-2002-11-27 Not Zed <NotZed@Ximian.com>
-
- * gui/itip-utils.[ch]: run fix.sh over this.
-
- * gui/dialogs/*.[ch]: run fix.sh over all of this.
-
-2002-11-26 Richard Li <Richard.Li@Sun.COM>
-
- * cal-client/cal-client.c (cal_client_construct): removed extra call
- to CORBA_exception_init.
-
-2002-11-22 Not Zed <NotZed@Ximian.com>
-
- * gui/dialogs/delete-comp.c (delete_component_dialog): Changed
- e_messagebox -> gtk_messagedialog.
-
-2002-11-21 Not Zed <NotZed@Ximian.com>
-
- * gui/component-factory.c (create_view): pass type to
- bonobo_control_set_property.
-
-2002-11-20 Not Zed <NotZed@Ximian.com>
-
- * gui/Makefile.am (EXTRA_DIST): fix typo, servers_in_files ->
- server_in_files.
-
-2002-11-19 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am: Added rule to generate
- GNOME_Evolution_Calendar.server.in from
- GNOME_Evolution_Calendar.server.in.in, substituting @LIBEXECDIR@.
- Also, install evolution-calendar in $libexecdir instead of
- $bindir.
-
- * gui/GNOME_Evolution_Calendar.server.in.in: Renamed from
- GNOME_Evolution_Calendar.server.in. Prepended the executable name
- with @LIBEXECDIR@.
-
-2002-11-19 Not Zed <NotZed@Ximian.com>
-
- * gui/e-meeting-model.c (get_select_name_dialog): pass type to
- bonobo_widget::set_property.
- (select_names_ok_cb): ", for get_property.
-
- * gui/dialogs/e-delegate-dialog.c (e_delegate_dialog_construct):
- pass type to bonobo_widget::set_property & plug small leak.
- (e_delegate_dialog_get_delegate): ", for get_property.
- (e_delegate_dialog_get_delegate_name): "
-
- * gui/dialogs/comp-editor-util.c (comp_editor_contacts_to_widget):
- pass type to bonobo_widget::set_property.
- (comp_editor_contacts_to_component): ", for get_property
-
-2002-11-16 Chris Toshok <toshok@ximian.com>
-
- * gui/e-meeting-time-sel.c (e_meeting_time_selector_style_set):
- use new e_table_header_compute_height signature.
-
-2002-11-15 Rodney Dawes <dobey@ximian.com>
-
- * gui/component-factory.c: Use bonobo_main_quit instead of gtk
-
-2002-11-13 Federico Mena Quintero <federico@ximian.com>
-
- * cal-client/cal-query.c: #include <string.h>
- (obj_removed_cb): Fixed prototype.
-
- * cal-client/cal-client.c (get_objects_atomically): Fix use of
- g_signal_handler_disconnect().
-
- * cal-client/client-test.c (create_client): Add G_CALLBACK casts.
-
-2002-11-12 Federico Mena Quintero <federico@ximian.com>
-
- * pcs/cal-backend-util.c: #include <string.h>
-
- * pcs/cal.c: Fixed prototypes of the CORBA method implementations.
-
- * pcs/cal-backend-file.c (cal_backend_file_dispose): Added a
- dispose method.
- (cal_backend_file_get_free_busy): Converted to use EConfigListener
- rather than BonoboConfigDatabase.
-
- * gui/alarm-notify/alarm-notify.c: #include <string.h>, fix use of
- g_hash_table_lookup_extended().
-
- * gui/alarm-notify/alarm-notify-dialog.c: Substitute deprecated
- GTK+ functions for new ones.
-
- * gui/alarm-notify/alarm-queue.c: Likewise.
-
- * gui/alarm-notify/notify-main.c: #include <string.h>,
- <gtk/gtkmain.h>.
-
- * gui/alarm-notify/save.c: #include <string.h>.
-
-2002-11-08 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/calendar-commands.c (calendar_control_deactivate): Use
- g_object_set_data(..., NULL) instead of gtk_object_remove_data().
-
- * gui/calendar-commands.c: Use g_object_{set,get}_* functions
- instead of gtk_object_{set,get}_*.
- * gui/calendar-commands.c: Likewise.
- * gui/calendar-config.c: Likewise.
- * gui/control-factory.c: Likewise.
- * gui/e-calendar-table.c: Likewise.
- * gui/e-comp-editor-registry.c: Likewise.
- * gui/e-day-view-main-item.c: Likewise.
- * gui/e-day-view-time-item.c: Likewise.
- * gui/e-day-view-top-item.c: Likewise.
- * gui/e-day-view.c: Likewise.
- * gui/e-meeting-attendee.c: Likewise.
- * gui/e-meeting-model.c: Likewise.
- * gui/e-meeting-time-sel-item.c: Likewise.
- * gui/e-meeting-time-sel.c: Likewise.
- * gui/e-week-view-event-item.c: Likewise.
- * gui/e-week-view-layout.c: Likewise.
- * gui/e-week-view-main-item.c: Likewise.
- * gui/e-week-view-titles-item.c: Likewise.
- * gui/e-week-view.c: Likewise.
- * gui/gnome-cal.c: Likewise.
- * gui/print.c: Likewise.
-
-2002-11-08 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/calendar-commands.c: Use g_object_ref()/g_object_unref()
- instead of gtk_object_ref/gtk_object_unref().
- * gui/calendar-config.c: Likewise.
- * gui/calendar-model.c: Likewise.
- * gui/comp-editor-factory.c: Likewise.
- * gui/comp-util.c: Likewise.
- * gui/e-calendar-table.c: Likewise.
- * gui/e-day-view.c: Likewise.
- * gui/e-itip-control.c: Likewise.
- * gui/e-meeting-model.c: Likewise.
- * gui/e-meeting-time-sel.c: Likewise.
- * gui/e-tasks.c: Likewise.
- * gui/e-timezone-entry.c: Likewise.
- * gui/e-week-view.c: Likewise.
- * gui/gnome-cal.c: Likewise.
- * gui/goto.c: Likewise.
- * gui/itip-utils.c: Likewise.
- * gui/print.c: Likewise.
- * gui/tasks-control.c: Likewise.
- * gui/tasks-migrate.c: Likewise.
-
- * gui/cal-search-bar.c: Use g_object_new() instead of
- gtk_type_new().
- * gui/calendar-model.c: Likewise.
- * gui/calendar-view-factory.c: Likewise.
- * gui/calendar-view.c: Likewise.
- * gui/calendar-view.c: Likewise.
- * gui/comp-editor-factory.c: Likewise.
- * gui/e-calendar-table.c: Likewise.
- * gui/e-cell-date-edit-text.c: Likewise.
- * gui/e-comp-editor-registry.c: Likewise.
- * gui/e-day-view.c: Likewise.
- * gui/e-itip-control.c: Likewise.
- * gui/e-meeting-attendee.c: Likewise.
- * gui/e-meeting-attendee.c: Likewise.
- * gui/e-meeting-model.c: Likewise.
- * gui/e-meeting-time-sel.c: Likewise.
- * gui/e-tasks.c: Likewise.
- * gui/e-timezone-entry.c: Likewise.
- * gui/e-week-view.c: Likewise.
- * gui/gnome-cal.c: Likewise.
- * gui/weekday-picker.c: Likewise.
-
- * gui/e-itip-control.c (get_servers): g_object_unref the
- shell_client instead of using bonobo_object_unref().
-
- * gui/component-factory.c (owner_set_cb): Use
- evolution_shell_client_corba_objref() instead of
- bonobo_object_corba_objref().
-
-2002-11-08 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/calendar-commands.c: Use g_signal_connect() instead of
- gtk_signal_connect().
- * calendar-commands.c: Likewise.
- * calendar-config.c: Likewise.
- * calendar-model.c: Likewise.
- * comp-editor-factory.c: Likewise.
- * component-factory.c: Likewise.
- * control-factory.c: Likewise.
- * e-calendar-table.c: Likewise.
- * e-comp-editor-registry.c: Likewise.
- * e-day-view-time-item.c: Likewise.
- * e-day-view.c: Likewise.
- * e-itip-control.c: Likewise.
- * e-meeting-model.c: Likewise.
- * e-meeting-time-sel.c: Likewise.
- * e-tasks.c: Likewise.
- * e-timezone-entry.c: Likewise.
- * e-week-view.c: Likewise.
- * gnome-cal.c: Likewise.
- * goto.c: Likewise.
- * tasks-control.c: Likewise.
- * tasks-migrate.c: Likewise.
- * weekday-picker.c: Likewise.
-
-2002-11-08 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/calendar-offline-handler.c
- (calendar_offline_handler_class_init): GObjectified.
- (impl_finalize): Finalize impl.
- (impl_dispose): Dispose impl.
- (calendar_offline_handler_new): Use g_object_new().
- (backend_cal_opened): use g_signal_connect() instead of
- gtk_signal_connect().
- (backend_go_offline): Likewise.
- (backend_cal_opened): g_object_unref() instead of
- gtk_object_unref().
- (backend_go_offline): Likewise.
-
-2002-11-08 Rodrigo Moya <rodrigo@ximian.com>
-
- * importers/evolution-calendar-importer.h: use GLib macros.
-
- * importers/main.c (init_importer): use bonobo_generic_factory_new,
- not bonobo_generic_factory_new_multi.
- (main): don't use libgnome functions.
-
-2002-11-07 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-client/client-test.c: don't use GTK, we don't need it.
-
-2002-11-07 JP Rosevear <jpr@ximian.com>
-
- * Initial port of gui/ subdir to GNOME 2
-
-2002-11-07 Rodrigo Moya <rodrigo@ximian.com>
-
- * importers/icalendar-importer.c: removed non-existant headers.
-
- * importers/Makefile.am: changes for BonoboActivation.
-
- * gui/GNOME_Evolution_Calendar.server.in: install to $libdir, not
- $datadir.
-
-2002-11-07 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-client/query-listener.[ch]: converted to BonoboObject.
-
- * gui/dialogs/comp-editor-util.c (parse_contact_string): use glib's
- g_utf8_strchr.
-
- * gui/dialogs/delete-comp.c: removed non-existant headers. Use
- GtkStock instead of GnomeStock.
-
- * gui/dialogs/e-delegate-dialog.c: converted to BonoboActivation.
- (e_delegate_dialog_construct): adapted to changes in glade_xml_new.
-
-2002-11-07 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/cal.[ch]: converted to BonoboObject.
- (impl_Cal_get_query): bonobo_object_unref the query returned by
- cal_backend_get_query if we can't duplicate it.
-
- * pcs/query.[ch]:
- * pcs/cal-factory.[ch]: converted to BonoboObject.
-
- * pcs/query-backend.[ch]:
- * pcs/cal-backend-file.[ch]:
- * pcs/cal-backend.[ch]: GObjectify.
-
-2002-11-06 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/cal-prefs-dialog.c: #include gtkoptionmenu.h.
- (cal_prefs_dialog_new): adapted to changes in glade_xml_new.
-
- * gui/dialogs/event-page.h:
- * gui/dialogs/meeting-page.h:
- * gui/dialogs/recurrence-page.h:
- * gui/dialogs/schedule-page.h:
- * gui/dialogs/task-details-page.h:
- * gui/dialogs/task-page.h:
- * gui/cal-prefs-dialog.h: use correctly the macros.
-
- * gui/dialogs/cancel-comp.c:
- * gui/dialogs/changed-comp.c:
- * gui/dialogs/comp-editor-page.c:
- * gui/gnome-cal.h: removed non-existent headers.
-
- * gui/dialogs/comp-editor.c: remove non-existent headers.
- (close_dialog): gtk_widget_destroy the widget.
- (setup_widgets, comp_editor_merge_ui): use BonoboWindow correctly.
- (comp_editor_set_cal_client, comp_editor_send_comp,
- comp_editor_edit_comp): use G_OBJECT_GET_CLASS for
- getting the class of an object.
-
- * gui/dialogs/comp-editor-page.c (comp_editor_page_class_init):
- use g_signal_* functions.
-
- * gui/dialogs/comp-editor-util.c: converted to BonoboActivation.
-
- * gui/dialogs/comp-editor.h: #include bonobo-window.h, not
- bonobo-win.h.
-
-2002-11-06 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/alarm-notify/GNOME_Evolution_Calendar_AlarmNotify.server.in:
- * gui/GNOME_Evolution_Calendar.server.in: renmaed .oaf.in files.
-
- * gui/alarm-notify/Makefile.am:
- * gui/Makefile.am: fixed rules for .server files.
-
-2002-11-06 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/dialogs/comp-editor-util.[ch]
- (comp_editor_connect_contacts_changed): don't return a
- Bonobo_EventSource_ListenerId, since it does not exist anymore,
- and was not even being used.
-
- * gui/e-timezone-entry.h: use GLib macros.
-
- * gui/dialogs/*.glade:
- * gui/alarm-notify/*.glade:
- * gui/*.glade: converted to Glade2 format.
-
-2002-11-05 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/dialogs/alarm-options.c (alarm_options_dialog_run): adapted to
- to new glade_xml_new signature.
-
- * gui/calendar-model.h:
- * gui/dialogs/comp-editor-page.h:
- * gui/dialogs/alarm-page.[ch]: removed non-existant header files.
-
- * gui/dialogs/comp-editor-util.h: added missing headers.
-
-2002-11-05 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/cal-backend.c: use libxml2 headers.
-
- * gui/alarm-notify/Makefile.am:
- * gui/dialogs/Makefile.am:
- * gui/Makefile.am: s/XML_I18N/INTLTOOL. Fixed execution of
- $(ORBIT_IDL).
-
- * gui/alarm-notify/alarm-notify.[ch]: converted to BonoboObject.
-
- * gui/alarm-notify/alarm-notify-dialog.c: compilation fixes.
- (alarm_notify_dialog): adapted to new glade_xml_new signature.
-
- * gui/alarm-notify/alarm-queue.c: ported to BonoboActivation and
- GtkStock and GtkDialog.
-
- * gui/alarm-notify/notify-main.c: ported to BonoboActivation and
- use GObject functions instead of GtkObject ones.
-
- * gui/alarm-notify/save.h: removed BonoboConfig related functions.
-
- * gui/alarm-notify/config-data.c: use GObject functions instead of
- GtkObject ones.
-
- * TODO.port: added file for keeping track of disabled things while we
- port.
-
-2002-11-04 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-util/cal-util-marshal.list: added new marshallers.
-
- * cal-client/cal-client.c (get_objects_atomically): fixed calls to
- g_signal_handler_disconnect_by_func.
- (cal_client_class_init): fixed typos.
-
- * cal-client/cal-client-multi.[ch]:
- * cal-client/cal-client-types.c:
- * cal-client/cal-query.[ch]: ported to GObject.
-
- * cal-client/cal-listener.[ch]: converted to BonoboObject.
-
- * cal-client/Makefile.am:
- * pcs/Makefile.am: fixed flags for orbit-idl
-
-2002-11-04 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-util/Makefile.am:
- * cal-util/cal-util-marshal.list: added marshallers.
-
- * cal-client/cal-client.[ch]: ported to GObject.
-
-2002-11-04 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-util/cal-component.[ch]: ported to GObject.
-
- * cal-util/cal-util.c (cal_util_generate_alarms_for_comp): use
- g_object_* instead of gtk_object_*.
-
-2002-11-03 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-client/cal-client.c (get_default_uri): use EConfigListener
- instead of BonoboConfig.
-
- * cal-client/cal-client.c:
- * cal-client/cal-listener.[ch]:
- * cal-client/query-listener.c: warning free.
-
-2002-11-03 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/cal-backend-util.[ch]: don't use BonoboConfig, but
- EConfigListener.
-
- * gui/calendar-config.c: use /apps/Evolution prefix for all
- configuration keys.
-
-2002-10-31 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-util/cal-component.[ch]:
- * cal-util/cal-recur.h:
- * cal-util/cal-util.[ch]:
- * cal-client/cal-client.h:
- * cal-client/cal-client-multi.h:
- * cal-client/cal-client-types.[ch]:
- * cal-client/cal-listener.h
- * cal-client/cal-query.[ch]:
- * cal-client/query-listener.h:
- * pcs/cal.h:
- * pcs/cal-backend.[ch]:
- * pcs/cal-backend-file.h:
- * pcs/cal-backend-util.h:
- * pcs/cal-common.h:
- * pcs/cal-factory.h:
- * pcs/query.[ch]:
- * pcs/query-backend.[ch]: started GNOME 2 porting.
- cal-util, cal-client and pcs compiled ok.
-
- * cal-client/cal-client.c (cal_client_construct):
- * pcs/cal-factory.c: use b-a instead of OAF and bonobo-config
- instead of bonobo-conf.
-
-2002-10-29 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/gnome-cal.c (backend_died_cb): cleaned up the status bar
- messages for all widgets.
-
-2002-10-24 JP Rosevear <jpr@ximian.com>
-
- * gui/e-itip-control.c (init): initialize new values
- (clean_up): free new values
- (find_my_address): if we have a delegator address, use it instead
- (write_html): display delegator info to user
- (show_current_event): if we have a calendar uri, use that and
- describe the event differently
- (show_current_todo): ditto
- (show_current): search for delegator X properties
- (e_itip_control_set_delegator_address): accessor
- (e_itip_control_get_delegator_address): ditto
- (e_itip_control_set_delegator_name): ditto
- (e_itip_control_get_delegator_name): ditto
- (e_itip_control_set_calendar_uri): ditto
- (e_itip_control_get_calendar_uri): ditto
-
- * gui/e-itip-control.h: add protos
-
- * gui/itip-utils.c (comp_from): use the first attendee as the from
- address for things other than request, cancel and add (use
- organizer) and publish (use default address)
-
-2002-10-23 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #32613
-
- * gui/component-factory.c (sc_user_create_new_item_cb): use the
- default calendar/tasks folder to activate the component editor.
- (get_data_uri): deal correctly with the URIs being used.
-
-2002-10-23 JP Rosevear <jpr@ximian.com>
-
- * gui/e-itip-control.c (show_current): fix warning
-
-2002-10-22 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #32371
-
- * pcs/query.c (start_cached_query_cb): CORBA_exception_init the
- CORBA_Environment before using it.
-
-2002-10-22 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/cal-factory.c (lookup_backend): use NULL for pointer instead of
- FALSE.
-
-2002-10-22 JP Rosevear <jpr@ximian.com>
-
- * gui/itip-utils.c (get_address): use e_config_listener_* to get
- values
- (itip_addresses_get): ditto
- (itip_addresses_get_default): ditto
-
- * gui/calendar-model.c (calendar_model_value_to_string): don't
- send back a null string (affects if it is the group header)
- (calendar_model_init): pre load config database info so we don't
- do corba calls during draws
-
- Fixes #32276
-
-2002-10-17 JP Rosevear <jpr@ximian.com>
-
- * gui/gnome-cal.c (gnome_calendar_construct): fix c/p type
-
-2002-10-17 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/recurrence-page.c (fill_ending_date): if the value
- is a datetime, convert it to a date
-
- * gui/itip-utils.c (comp_compliant): convert an UNTIL date value
- to a datetime value
-
- * cal-util/cal-component.c (cal_component_has_simple_recurrence):
- check to see if the component recurrences meet our definition of
- "simple"
-
- * cal-util/cal-component.h: new proto
-
-2002-10-17 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/dialogs/recurrence-page.c (fill_component): changed to have a
- gboolean return type, which is what it's supposed to do.
- (recurrence_page_fill_component): return the result from
- fill_component.
-
- * gui/dialogs/comp-editor-page.h: fixed typo in function prototype.
-
-2002-10-11 JP Rosevear <jpr@ximian.com>
-
- * gui/gnome-cal.c
- (gnome_calendar_on_date_navigator_selection_changed): try to
- preserve the work week view setting if it makes sense
- (set_view): don't update the info again based on our view change
- call
-
- Fixes #16036
-
-2002-10-08 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #11434
-
- * gui/dialogs/comp-editor-page.[ch]
- (comp_editor_page_display_validation_error): new function.
-
- * gui/dialogs/event-page.c (event_page_fill_component):
- * gui/dialogs/recurrence-page.c (fill_component):
- * gui/dialogs/task-details-page.c (task_details_page_fill_component):
- * gui/dialogs/task-page.c (task_page_fill_component): added
- checks for all date values, and return FALSE if we find
- some invalid date/times.
-
- * gui/dialogs/comp-editor.c (save_comp): activate the page that
- returns error in fill_component.
-
-2002-10-08 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/cal-prefs-dialog.c
- (cal_prefs_dialog_create_time_edit): set the 24 hour format
- initially
-
- Fixes #31812
-
-2002-10-08 JP Rosevear <jpr@ximian.com>
-
- * gui/e-week-view.c: remove pilot settings from contextual menu
-
- * gui/e-day-view.c: ditto
-
-2002-10-07 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #31774
-
- * gui/dialogs/alarm-options.c (dalarm_widgets_to_alarm,
- palarm_widgets_to_alarm): use correct pointer in loop.
-
-2002-10-07 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/cal-prefs-dialog.c (setup_changes): cast the correct
- item
-
-2002-10-07 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes crash in #19159
-
- * gui/alarm-notify/alarm-queue.c (lookup_queued_alarm): don't crash if
- we don't find the queued alarm in the internal list.
- (alarm_trigger_cb, create_snooze, display_notification,
- audio_notification, procedure_notification, remove_queued_alarm):
- check return value from lookup_queued_alarm.
-
-2002-10-04 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #15892
-
- * idl/evolution-calendar.idl: added notifyErrorOccurred method to
- the Listener interface, so that backends can notify clients of errors
- that can't be reported otherwise.
-
- * pcs/cal.[ch] (cal_notify_error): new function.
-
- * pcs/cal-backend-file.c (save): made to save to temporary file and
- then moved to the correct file, so that we don't lose any data if
- there's a problem while saving.
- (notify_error): new function for notifying error messages to clients.
-
- * cal-client/cal-listener.[ch]: added new callback function for getting
- error messages from backends.
- (impl_notifyErrorOccurred): new method implementation.
- (cal_listener_class_init): initialize new epv member.
- (cal_listener_init, cal_listener_destroy, cal_listener_construct,
- cal_listener_new): initialize new function pointer.
-
- * cal-client/cal-client.[ch]: adapted to changes in CalListener class.
- (cal_client_class_init): added "backend_error" signal to CalClient class.
- (backend_error_cb): callback for "error_occurred" signal on the CalListener,
- which just emits the "backend_error" signal of CalClient.
-
- * gui/gnome-cal.c (gnome_calendar_construct): connect to "backend_error"
- signal on the CalClient's we create.
- (backend_error_cb): display error message on error from backend.
-
- * gui/e-tasks.c: likewise.
-
-2002-10-02 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/alarm-notify/notify-main.c (alarm_notify_factory_fn): removed
- unneeded g_assert which was preventing the alarm daemon to
- start correctly in some cases.
-
-2002-10-02 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #30057
-
- * cal-client/cal-client.c (cal_client_is_read_only): added check
- of the status of the client before trying to make CORBA calls.
-
- * gui/calendar-commands.c (sensitize_calendar_commands,
- sensitize_taskpad_commands):
- * gui/tasks-control.c (sensitize_commands):
- * gui/dialogs/event-editor.c (set_menu_sens):
- * gui/dialogs/task-editor.c (set_menu_sens):
- * gui/e-calendar-table.c (e_calendar_table_on_right_click):
- * gui/e-day-view.c (e_day_view_on_event_right_click):
- * gui/e-week-view.c (e_week_view_show_popup_menu): take into account
- the read-onlyness of clients to disable/enable menu items.
-
-2002-10-01 Rodrigo Moya <rodrigo@ximian.com>
-
- * idl/evolution-calendar.idl: added isReadOnly method to Cal
- interface.
-
- * pcs/cal.c (impl_Cal_is_read_only): new method implementation.
-
- * pcs/cal-backend.[ch]: added is_read_only method to CalBackend class.
- (cal_backend_is_read_only): new function.
-
- * pcs/cal-backend-file.c (cal_backend_file_is_read_only): new method.
- (cal_backend_file_class_init): set new signal's virtual method.
-
- * cal-client/cal-client.[ch] (cal_client_is_read_only): new function.
-
-2002-10-01 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #15710
-
- * gui/dialogs/alarm-page.c (alarm_page_init): added a
- X-EVOLUTION-NEEDS-DESCRIPTION property, so that we later set it
- correctly if it hasn't been set in the meanwhile (editing options for
- the alarm).
-
- * gui/dialogs/alarm-options.c (dalarm_widgets_to_alarm,
- palarm_widgets_to_alarm): removed X-EVOLUTION-NEEDS-DESCRIPTION
- property from alarms every time we set the description of the alarm.
-
-2002-10-01 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #30290
-
- * importers/icalendar-importer.c (process_item_fn): return a status of
- BUSY rather than NOT_READY, to avoid the display of the error message.
-
-2002-09-30 JP Rosevear <jpr@ximian.com>
-
- * conduits/calendar/calendar-conduit.c
- (calconduit_load_configuration): load multi_day_split
- (calconduit_save_configuration): save it
- (calconduit_dupe_configuration): copy it
- (e_cal_gui_new): create gui for it
- (e_cal_gui_fill_widgets): fill gui with value
- (e_cal_gui_fill_config): get value from gui and store in config
- (e_calendar_context_destroy): destroy new_cfg and gui properly
- (process_multi_day): skip item if its multi-day and we don't want
- to split
- (fill_widgets): fill local config widgets
- (create_settings_window): create local config widgets
- (save_settings): fill config from local widgets
-
- Fixes #23763
-
-2002-09-30 Aaron Weber <aaron@ximian.com>
-
- * gui/e-itip-control.c (update_item): adjust string on line 1609
- and 1517.
-
- * gui/dialogs/alarm-options.glade: rephrase string on line 270
-
-2002-09-27 Dan Winship <danw@ximian.com>
-
- * gui/calendar-commands.c (pixmaps): Remove "/Toolbar/New" and
- "/Toolbar/NewTask" since they're not there any more. Kills some
- bonobo-ui spewage.
-
-2002-09-26 Dan Winship <danw@ximian.com>
-
- Non-Connector part of #29334 (meeting created by a delegate in the
- delegator's calendar should have the delegator as Organizer).
-
- * idl/evolution-calendar.idl: add Cal_getEmailAddress, to return
- the email address associated with a backend (if any).
-
- * pcs/cal-backend.c (cal_backend_get_email_address): New.
-
- * pcs/cal-backend-file.c (cal_backend_file_get_email_address):
- Return NULL (for now).
-
- * pcs/cal.c (impl_Cal_get_email_address): Implement this by
- calling cal_backend_get_email_address and returning a NotFound
- exception if it returns NULL.
-
- * cal-client/cal-client.c (cal_client_get_email_address): New.
- (cal_client_init, cal_client_destroy, etc): initialize/free
- email_address
-
- * gui/dialogs/event-editor.c (event_editor_construct): Split this
- out of event_editor_init. Take and set a CalClient.
- (event_editor_new): Take a CalClient.
-
- * gui/dialogs/task-editor.c (task_editor_construct,
- task_editor_new): Likewise.
-
- * gui/dialogs/meeting-page.c (meeting_page_new,
- meeting_page_construct): Take a CalClient and call
- cal_client_get_email_address to find the default organizer
- address. (Also fix a bug if the default account's name has
- non-ASCII characters.)
-
- * gui/itip-utils.c (comp_from): New. When sending a REQUEST or
- CANCEL, use the Organizer as the From address.
- (itip_send_comp): Call comp_from and pass the result to
- Composer_setHeaders.
-
- * gui/comp-editor-factory.c (edit_existing, edit_new): Pass the
- CalClient to event_editor_new/task_editor_new
-
- * gui/e-calendar-table.c (open_task): Likewise.
-
- * gui/e-tasks.c (e_tasks_new_task): Likewise.
-
- * gui/gnome-cal.c (gnome_calendar_edit_object,
- gnome_calendar_new_task): Likewise.
-
-2002-09-26 JP Rosevear <jpr@ximian.com>
-
- * gui/e-meeting-model.c (set_value_at): only change the attendee
- value if it isn't empty
-
-2002-09-26 Rodrigo Moya <rodrigo@ximian.com>
-
- Should fix once for all #24210
-
- * idl/evolution-calendar.idl: changed the notifyObjUpdated method
- of the QueryListener interface accept a list of UIDs.
-
- * cal-client/query-listener.[ch] (impl_notifyObjUpdated): likewise for
- the QueryListener class.
-
- * cal-client/cal-query.c (obj_updated_cb): changed to adapt the
- multiple-id's received in the QueryListener class' signal to the
- one-by-one update notification of the public CalQuery class, thus
- keeping the changes needed for this minimal.
-
- * pcs/query.c (add_component, start_cached_query_cb): changed to
- send sequences of UIDs.
-
-2002-09-25 Dan Winship <danw@ximian.com>
-
- * gui/component-factory.c (folder_types): Add "calendar/public"
- and "tasks/public".
- (type_is_calendar, type_is_tasks): New utility functions
- (create_view, create_folder, remove_folder, xfer_folder,
- sc_user_create_new_item_cb): Use type_is_calendar/type_is_tasks
-
- * importers/icalendar-importer.c (get_uri_from_folder_path): allow
- importing into public calendar/task folders too.
-
- * gui/e-itip-control.c: Note that it's intentional that we use
- "calendar" and "tasks" here instead of "calendar/*" and "tasks/*".
- (31032)
-
-2002-09-25 JP Rosevear <jpr@ximian.com>
-
- * gui/itip-utils.c (itip_send_comp): if the item being sent is not
- a meeting, send it as a mixed item with a description and the
- calendar text in an attachment
-
- Fixes #30638
-
-2002-09-25 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #27961
-
- * pcs/cal-backend-file.c (cal_backend_file_update_object): set the
- LAST-MODIFIED time of the components when we save them.
-
-2002-09-24 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/cal-backend-file.c (cal_backend_file_get_timezone_object,
- cal_backend_file_get_timezone): return a builtin timezone if we
- don't find the timezone in our component.
-
-2002-09-24 JP Rosevear <jpr@ximian.com>
-
- * conduits/calendar/calendar-conduit.c (comp_from_remote_record):
- make sure the start/end for no time palm events are DATE values,
- tidy code slightly
-
- Fixes #21631
-
-2002-09-24 JP Rosevear <jpr@ximian.com>
-
- * conduits/calendar/calendar-conduit.c (process_multi_day):
- convert to date values if the original start and end were both
- dates
-
-2002-09-24 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-client/cal-query.c (cal_query_destroy): unref the query
- since now the query object on the server keeps a copy of it and
- must know when the listener is no longer valid.
-
- * pcs/query.c (listener_died_cb): unref the QueryListener object.
- (query_construct): create an EComponentListener for the non-cached
- queries' listeners also.
-
-2002-09-23 JP Rosevear <jpr@ximian.com>
-
- * conduits/todo/Makefile.am: add libeutil to the link
-
- * conduits/calendar/Makefile.am: ditto
-
-2002-09-23 Dan Winship <danw@ximian.com>
-
- * pcs/cal.c (imple_Cal_update_objects, impl_Cal_remove_object):
- fix non-ANSI switch statements.
-
- * gui/e-meeting-model.c (is_cell_editable, value_is_empty,
- process_free_busy_comp): Likewise
-
- * gui/itip-utils.c (comp_compliant): Likewise.
-
-2002-09-23 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/main.c (launch_alarm_daemon): install an idle callback that will
- start the alarm daemon.
- (launch_alarm_daemon_cb): actually activate the alarm daemon here.
-
- * pcs/query.c (start_cached_query_cb): remove timeout function always
- and re-add it if the query is in progress.
-
-2002-09-23 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/query.c (start_cached_query_cb): move success notification code
- to its own code block, since it was being run for parse errors also.
- Also, remove all traces of the query from the cache if there is an
- error. Also, use GINT_TO_POINTER instead of GPOINTER_TO_INT.
-
-2002-09-23 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #28310
-
- * gui/alarm-notify/save.c (save_notification_time): only save the
- new notification time if it is bigger than the already saved one.
- This should avoid some reminders showing up twice.
-
-2002-09-20 JP Rosevear <jpr@ximian.com>
-
- * gui/comp-util.c (cal_comp_is_on_server): check to see if the
- component is already on the server or not
-
- * gui/comp-util.h: change proto
-
- * gui/e-week-view.c (e_week_view_on_editing_stopped): only delete
- the event if the summary is empty and the component is not already
- on the server
-
- * gui/e-day-view.c (e_day_view_on_editing_stopped): same
-
- Fixes #14111
-
-2002-09-20 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/meeting-page.c (meeting_page_fill_widgets): set the
- deleted attendees array to size 0 after we clean it up
-
- Fixes #30479
-
-2002-09-20 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/query.c (parse_sexp): remove the query from the cache if it
- failed.
- (start_cached_query_cb): notify of errors in the query.
-
-2002-09-19 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/query.c: added a list of EComponentListener's to control the
- lifetime of the listeners.
- (query_init): initialize new member.
- (query_destroy): free new member.
- (start_cached_query_cb): create a EComponentListener for the new
- listener being added.
-
-2002-09-19 Rodrigo Moya <rodrigo@ximian.com>
-
- More fixes for #24210
-
- * pcs/query.c: added list of cached queries and changed the Query
- class to work with several listeners, not only one.
- (query_init): initialize new members.
- (query_destroy): free new members.
- (add_component, remove_component, parse_sexp, match_component,
- process_components_cb): notify all listeners.
- (notify_uid_cb, start_cached_query_cb): implemented integration of
- cached queries.
- (query_new): search the query in the cache before creating a new
- one. And if we create a new one, store it in the cache.
-
-2002-09-19 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/recurrence-page.c (simple_recur_to_comp): bump the
- month_num by 1 because it indexs at 0
- (recurrence_page_fill_widgets): lower the month_num by one as above
-
- Fixes #30381
-
-2002-09-17 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #26362
-
- * gui/e-itip-control.c (show current): add a default reminder if
- default reminders are set in the configuration.
-
-2002-09-11 JP Rosevear <jpr@ximian.com>
-
- * gui/e-day-view.c (e_day_view_on_top_canvas_button_press): keep
- the selection if we right click in it (but not on an appointment)
- (e_day_view_on_main_canvas_button_press): ditto
-
- * gui/e-week-view.c (e_week_view_on_button_press): same
-
-2002-09-11 JP Rosevear <jpr@ximian.com>
-
- * gui/e-week-view.c (e_week_view_new_appointment): create a new
- appointment based on the selection
- (e_week_view_on_button_press): use above
- (e_week_view_on_new_appointment): ditto
- (e_week_view_on_new_meeting): ditto
-
- Fixes #18162
-
-2002-09-10 JP Rosevear <jpr@ximian.com>
-
- * gui/comp-editor-factory.c (get_default_event): duh, don't
- blindly increment the hour without adjusting for the day
- boundaries
-
- Fixes #29983
-
-2002-09-10 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #24032
-
- * gui/e-itip-control.c (init): don't get servers here, since we don't
- know the type of the component(s) to be loaded.
- (show_current): get servers here.
- (destroy): only free stuff that needs to be freed.
-
-2002-09-09 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/gnome-cal.c (client_cal_opened_cb): display status messages for
- all operations we make, so that when using remote slow backends, so
- that users have always indication of what's happening.
-
-2002-09-06 JP Rosevear <jpr@ximian.com>
-
- * gui/gnome-cal.c (gnome_calendar_edit_object): kill warning
-
- * gui/e-week-view.h: new proto
-
- * gui/e-week-view.c (e_week_view_set_selected_time_range_visible):
- select a range of time in the currently visible area, if out side
- the visible area, select as much as possible
- (e_week_view_on_text_item_event): call above
-
- * gui/e-week-view-event-item.c
- (e_week_view_event_item_button_press): call above
-
- * gui/e-day-view.c
- (e_day_view_set_selected_time_range_in_top_visible): select a
- range of time in the currently visible area, if out side the
- visible area, select as much as possible
- (e_day_view_set_selected_time_range_visible): the same for the
- main canvas
- (e_day_view_on_long_event_button_press): call above
- (e_day_view_on_event_button_press): ditto
-
-2002-09-05 JP Rosevear <jpr@ximian.com>
-
- * gui/itip-utils.c (itip_send_comp): don't try to send via the
- server if we are publishing; don't bail out on a 0 length to list
- if we are publishing
-
-2002-09-05 Anna Marie Dirks <anna@ximian.com>
-
- * gui/GNOME_Evolution_Calendar.oaf.in: Changed the description of
- the calendar/tasks page of the settings dialog, to be hopefully
- more descriptive and less awkwardly worded.
-
-
-2002-09-05 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-day-view.c (e_day_view_on_drag_data_get): added support for
- text/x-calendar targets, in which case a VCALENDAR component, with
- full timezone information is returned.
-
-2002-09-04 JP Rosevear <jpr@ximian.com>
-
- * gui/gnome-cal.c (gnome_calendar_destroy): don't listen to client
- signals after we get destroyed
-
- Fixes #17036
-
-2002-09-04 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/event-editor.c (event_editor_send_comp): bail out if
- we couldn't send the cancel
-
- * gui/dialogs/task-editor.c (task_editor_send_comp): ditto
-
- * gui/dialogs/comp-editor.c (save_comp_with_send): indicate send
- status
- (real_send_comp): return success/fail, only resave the component a
- if we successfully sent
- (comp_editor_send_comp): return success/fail
-
- * gui/itip-utils.h: update proto
-
- * gui/itip-utils.c (itip_send_comp): return true if we sent the
- message
-
-2002-09-04 JP Rosevear <jpr@ximian.com>
-
- * gui/itip-utils.c (comp_server_send): provide error message
- param, give a dialog with the message if we get a busy result;
- return TRUE if we succeed
- (itip_send_comp): bail out if we had a problem sending via the
- server
-
- * cal-client/cal-client.c (cal_client_send_object): pass back
- error message if we get the busy exception in the new param
-
- * cal-client/cal-client.h: update proto
-
- * pcs/cal.c (impl_Cal_send_object): dump backend error message
- into Busy exception
-
- * pcs/cal-backend.h: update proto
-
- * pcs/cal-backend.c (cal_backend_send_object): take/pass new error
- message parameter
-
- * pcs/cal-backend-file.c (cal_backend_file_send_object): take new param
-
- * idl/evolution-calendar.idl: add errorMsg to Busy exception
-
-2002-09-04 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component-factory.c (create_object): Pass NULL as
- @unpopulate_folder_context_menu_fn to
- evolution_shell_component_new().
-
-2002-09-03 JP Rosevear <jpr@ximian.com>
-
- * gui/itip-utils.c (comp_compliant): don't make the reply
- component minimal
-
- Fixes #28956
-
-2002-08-30 JP Rosevear <jpr@ximian.com>
-
- * gui/itip-utils.c (itip_send_comp): make the sure to list is 0
- length before sending via imip
-
- Fixes #29624
-
-2002-08-30 Mike Kestner <mkestner@ximian.com>
-
- * gui/dialogs/event-page.c:
- * gui/dialogs/task-page.c: use bonobo_object_release_unref to release
- the remote SelectNames component, not CORBA_Object_release.
-
-2002-08-29 JP Rosevear <jpr@ximian.com>
-
- * gui/e-day-view.c (e_day_view_on_top_canvas_button_press): select
- the top canvas if the user right-clicks on it
- (e_day_view_on_main_canvas_button_press): select the row the user
- is right-clicking on
- (e_day_view_on_long_event_button_press): select the top canvas if
- the user right-clicks on an event there
- (e_day_view_on_event_button_press): select the relevant rows if
- the user right-clicks on an event
- (e_day_view_set_selected_time_range_in_top): select a number of
- days in the top canvas
-
- * gui/e-week-view.c (e_week_view_on_button_press): select the day
- the user is right-clicking on
- (e_week_view_on_text_item_event): select the corresponding time
- range when showing the contextual menu for an event
-
- * gui/e-week-view-event-item.c
- (e_week_view_event_item_button_press): select the corresponding
- time range when showing the contextual menu for an event
-
- Fixes #14660
-
-2002-08-28 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-day-view.c:
- * gui/e-week-view.c: added missing header file.
-
-2002-08-28 Dan Winship <danw@ximian.com>
-
- * gui/GNOME_Evolution_Calendar.oaf.in: Add an
- evolution:shell_component_launch_order and rename
- evolution:shell_component_icon.
-
-2002-08-27 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/calendar-config.c: use EConfigListener instead of direct access
- to the bonobo-conf database.
- (calendar_config_init): create the EConfigListener here, and install
- an atexit function to unref the config listener object.
- (config_read, property_change_cb, calendar_config_write,
- calendar_config_write_on_exit): removed unneeded functions.
- (calendar_config_get_*, calendar_config_set_*): changed to make use of
- EConfigListener directly.
-
- * gui/main.c (main): removed call to calendar_config_write_on_exit.
-
- * gui/dialogs/cal-prefs-dialog.c (update_config): removed call to
- calendar_config_write.
-
-2002-08-26 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #12326
-
- * gui/alarm-notify/config-data.c (ensure_inited): create a
- EConfigListener for configuration access.
- (do_cleanup): g_atexit installed function, to clean up configuration
- database resources.
- (config_data_get_timezone): retrieve the configuration for the
- EConfigListener object.
- (config_data_get_listener): new function.
-
- * gui/alarm-notify/save.c (get_config_db, discard_config_db): removed.
- Use EConfigListener instead.
- (save_notification_time, get_saved_notification_time,
- save_calendars_to_load, get_calendars_to_load, save_blessed_program,
- is_blessed_program): use EConfigListener.
-
- * gui/alarm-notify/notify-main.c (init_alarm_notify_service): removed.
- (alarm_notify_factory_fn): create here the alarm_notify_service if it
- hasn't been created yet.
- (load_calendars): likewise.
- (main): don't call init_alarm_notify_service.
-
-2002-08-22 JP Rosevear <jpr@ximian.com>
-
- * gui/e-meeting-model.c (process_section): if its a
- non-participant, add it as a resource to match dialog label
- (set_value_at): if the type is set to be a resource, switch the
- role to non-participant by default
-
-2002-08-22 JP Rosevear <jpr@ximian.com>
-
- * gui/calendar-model.c (set_completed): if the value given is a
- date, convert to a time in the current zone
-
-2002-08-20 JP Rosevear <jpr@ximian.com>
-
- * gui/tasks-control.c (tasks_control_activate): don't set the
- tasks ui component until the container is set, remove unused
- pixmaps
-
-2002-08-19 JP Rosevear <jpr@ximian.com>
-
- * gui/e-meeting-model.c (destroy): disconnect destroy signal
- callbacks on tables
-
- Fixes #28231
-
-2002-08-19 JP Rosevear <jpr@ximian.com>
-
- * gui/itip-utils.c (comp_toplevel_with_zones): clone the ical
- component before adding it
-
- Fixes #29061
-
-2002-08-19 JP Rosevear <jpr@ximian.com>
-
- * gui/comp-editor-factory.c (get_default_event): make sure to get
- the date in the current zone, not at UTC
-
- Fixes #17692
-
-2002-08-19 JP Rosevear <jpr@ximian.com>
-
- * gui/e-itip-control.c (set_date_label): stop adding redundant
- information for start/end/due/complete times
- (write_html): convert newlines properly and escape characters for
- summary, location, description; put text information on separate
- line from bolded title to make it look nicer when there are line
- breaks
-
- Fixes #26964
-
-2002-08-16 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-client/cal-client.[ch]: added internal EComponentListener
- object, to listen for the activated Cal.
- (cal_client_class_init): added "backend_died" signal.
- (cal_client_destroy): clean up component listener.
- (backend_died_cb): new callback for getting signals from the
- EComponentListener.
- (cal_opened_cb): setup component listener.
-
- * cal-client/Makefile.am: added libetuil to needed LIBS.
-
- * gui/gnome-cal.c (backend_died_cb): new callback.
- (gnome_calendar_construct): connect to "backend_died" signal
- on all CalClient's we create.
-
-2002-08-14 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/cal-prefs-dialog.c (init_widgets): listen for the
- time editors to change
- (cal_prefs_dialog_start_of_day_changed): make sure the start is
- never after the end
- (cal_prefs_dialog_end_of_day_changed): make sure the end is never
- after the start
-
- * gui/e-meeting-time-sel.c
- (e_meeting_time_selector_set_working_hours): make sure to show a
- minimum of 1 hour for work day
-
- * gui/e-day-view-main-item.c (e_day_view_main_item_draw):
- calculate the work/not working color boxes to the nearest pixel,
- rather the the nearest time division
-
- Fixes #10286, #26285
-
-2002-08-13 Dan Winship <danw@ximian.com>
-
- * gui/e-itip-control.c: Remove a bunch of old #if 0 code.
- (update_item): Set X-MICROSOFT-CDO-REPLYTIME here.
-
- * gui/itip-utils.c (comp_toplevel_with_zones): Don't set it here.
-
- * cal-util/cal-component.c (ensure_mandatory_properties): Use
- icaltime_current_time_with_zone rather than rolling our own.
- (cal_component_strip_errors): Remove unused variable.
-
-2002-08-13 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/gnome-cal.c (gnome_calendar_open): set status message on
- ECalendarTable when opening the tasks.
- (client_cal_opened_cb): set ECalendarTable status message to NULL
- when we open the tasks folder. Also, clear up calendar status message
- in all cases, not only if the folder was opened successfully.
-
-2002-08-13 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/gnome-cal.c (gnome_calendar_open): set status message to NULL
- if there is an error opening the calendar.
- (client_cal_opened_cb): set status message to NULL only when we have
- successfully opened the main CalClient.
-
-2002-08-09 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/comp-editor.c (real_send_comp): set the editor to
- changed so the item actually gets saved
-
-2002-08-08 JP Rosevear <jpr@ximian.com>
-
- * gui/itip-utils.c (users_has_attendee): check for an attendee in
- the list
- (comp_to_list): only add the user if they aren't on the list
- (comp_server_send): don't remove the users, pass back the list
- (itip_send_comp): send to server before doing comp_minimal
-
- * gui/dialogs/comp-editor.c (real_send_comp): edit and save the
- updated comp
-
- * pcs/cal.c (impl_Cal_send_object): copy the correct item to pass
- back
-
-2002-08-08 Dan Winship <danw@ximian.com>
-
- * pcs/query-backend.c (query_backend_new): Initialize
- loaded_backends before using it. (Just kills off a harmless
- g_warning.)
-
-2002-08-08 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #15710
-
- * cal-util/cal-component.[ch]
- (cal_component_alarm_get_icalcomponent): new function for getting
- the icalcomponent from a CalComponentAlarm.
-
- * gui/comp-util.c (cal_comp_event_new_with_defaults): added
- X-EVOLUTION-NEEDS-DESCRIPTION property to the default reminder
- alarm, so that we can identify it when saving the component.
-
- * gui/dialogs/alarm-page.c (alarm_page_fill_component): if the
- alarm has the X-EVOLUTION-NEEDS-DESCRIPTION property, set the
- description to be the same as of the component.
-
-2002-08-07 JP Rosevear <jpr@ximian.com>
-
- * pcs/cal-backend-file.c (cal_backend_file_send_object): just
- return the object untouched since we don't send anything
-
- * pcs/cal-backend.c (cal_backend_remove_object): call virtual method
-
- * pcs/cal-backend.h: add send result codes, new proto
-
- * pcs/cal.c (impl_Cal_send_object): implement sendObject corba call
- (cal_class_init): add to epv
-
- * gui/itip-utils.c (comp_toplevel_with_zones): utility function to
- create icalcomponent with necessary timezone info
- (comp_has_attendee): see if attendee is in the attendee list
- (comp_server_send): use above and remove attendees if the server
- sends them
-
- * gui/e-itip-control.c (show_current_todo): remove unused var
-
- * idl/evolution-calendar.idl: add Busy exception and
-
- * cal-client/cal-client.c (cal_client_send_object): send object
- via the server (if the server can)
-
- * cal-client/cal-client.h: add send results and new proto
-
-2002-08-05 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/query-backend.[ch] (query_backend_get_object_component): new
- function.
- (query_backend_get_uids): new function.
- (query_backend_new): create the static GHashTable if it hasn't been
- created yet.
- (query_backend_destroy): destroy the static GHashTable if empty.
- (foreach_uid_cb): call object_updated_cb, which does everything.
-
- * pcs/query.c: make use of the new QueryBackend class.
- (query_init): initialize new private structure member.
- (query_destroy): clean up new member, without freeing it, since it is
- managed internally in query-backend.c.
- (query_construct): create a QueryBackend for the query.
-
-2002-08-04 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes the crash in #19159
-
- * gui/alarm-notify/alarm-queue.c (create_snooze): check for NULL
- pointers before using them.
-
-2002-08-02 JP Rosevear <jpr@ximian.com>
-
- * gui/e-week-view.c (e_week_view_init): don't warn if we can't use
- the small font, just set use_small_font to FALSE
-
-2002-08-02 JP Rosevear <jpr@ximian.com>
-
- * gui/e-itip-control.c (adjust_item): new util function to add
- information to an itip message that might not already be there for
- display purposes (summary, location, etc)
- (show_current_event): use above
- (show_current_todo): ditto
-
-2002-08-02 JP Rosevear <jpr@ximian.com>
-
- * gui/e-meeting-model.c (init): initialize value to corba nil
-
-2002-08-01 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component-factory.c (create_object): Use
- meeting-request-16.png instead of meeting-request.png.
-
- * gui/calendar-commands.c (pixmaps): Remove pixmaps in
- /menu/File/New/NewFirstItem/.
-
-2002-08-01 JP Rosevear <jpr@ximian.com>
-
- * gui/calendar-model.c (is_overdue): use get_due_status
- (get_color): ditto
- (get_due_status): utility function to reduce replicated code,
- handle the case where the due date is just a date
-
-2002-07-31 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/query-backend.[ch]: new class for implementing a backend cache
- for the calendar queries.
-
- * pcs/Makefile.am: added new files.
-
-2002-07-31 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component-factory.c (create_object): Change the order of the
- user creatable items a bit so that "New Appointment" and "New
- Meeting" are at the top when in a calendar folder.
-
-2002-07-31 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component-factory.c (add_creatable_item): New arg
- @folder_type, pass it to
- evolution_shell_component_add_user_creatable_item().
- (create_object): Set the right folder types for the various
- user-creatable items.
-
-2002-07-31 JP Rosevear <jpr@ximian.com>
-
- * gui/e-tasks.c (e_tasks_destroy): we no longer need to manually
- save the state
- (e_tasks_open): we no longer need to manually load the state
- (display_view_cb): attach the gal view to the table
-
- Fixes #27894
-
-2002-07-29 JP Rosevear <jpr@ximian.com>
-
- * gui/e-day-view.c (e_day_view_find_work_week_start): make sure
- that the work week view goes to the current work week if the day
- selected is before the start of the work week
-
- Fixes #20317
-
-2002-07-28 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/dialogs/task-details-page.c: fixed mapping of popdown menu
- to ICAL_STATUS_ values.
- (task_details_page_fill_widgets): when we can't set the status,
- default to ICAL_STATUS_NONE, which maps to 'Not started'. Fixed
- use of 'percent' variable, which was being used after being freed.
- (percent_complete_changed): default to ICAL_STATUS_NONE (Not Started).
-
- * gui/dialogs/task-details-page.glade: added 'Needs Action' to
- popdown menu values.
-
-2002-07-26 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-util/cal-util.[ch] (cal_util_add_timezones_from_component):
- new function for adding VTIMEZONE components to a VCALENDAR
- component.
-
- * gui/e-calendar-table.c (copy_row_cb): added VTIMEZONE components
- to resulting VCALENDAR top-level component.
-
- * gui/e-week-view.c (e_week_view_copy_clipboard): copy to the
- clipboard a top-level VCALENDAR component, with all the needed
- VTIMEZONE components.
- (e_week_view_on_copy): likewise.
-
- * gui/e-day-view.c (e_day_view_copy_clipboard): likewise.
- (e_day_view_on_copy): likewise.
-
-2002-07-26 JP Rosevear <jpr@ximian.com>
-
- * cal-client/cal-client.c (cal_client_construct): remove useless
- debug statement
-
- Probably fixes #19333
-
-2002-07-26 JP Rosevear <jpr@ximian.com>
-
- * gui/comp-editor-factory.c (impl_editExisting): focus the editor
- if it does exist, create a new one if it doesn't (not vice-versa)
-
- Fixes #23468
-
-2002-07-25 JP Rosevear <jpr@ximian.com>
-
- * gui/e-day-view.c (e_day_view_init): set large_font to NULL
- (e_day_view_style_set): calculate large font, fall back to the
- style->font if necessary
-
- Fixes #11773
-
-2002-07-24 JP Rosevear <jpr@ximian.com>
-
- * gui/e-itip-control.c (write_html): display the location in the
- itip information
-
- Fixes #24690
-
-2002-07-24 JP Rosevear <jpr@ximian.com>
-
- * gui/calendar-model.c (set_percent): set status to in progress if
- the percent is between 0 and 100
- (set_status): if the value is set to in process, change the
- percent to 50
-
- Fixes #1590
-
-2002-07-24 JP Rosevear <jpr@ximian.com>
-
- * cal-util/timeutil.c (time_day_of_year): add a day for the leap
- year only if we are currently counting Feb., not if the month
- passed in is Feb. Fixes #23446.
-
-2002-07-23 JP Rosevear <jpr@ximian.com>
-
- * gui/e-day-view.c (e_day_view_realize): use proper meeting icon
-
-2002-07-22 Dan Winship <danw@ximian.com>
-
- * pcs/Makefile.am: Split pcs-backend-file out of libpcs and build
- it as a separate (noinst) library libpcsfile.a. This gets the db3
- dependencies out of libpcs, and people trying to create a calendar
- backend shouldn't be calling functions from the existing backends
- anyway so there's no reason to install them.
-
- * cal-util/timeutil.c: Replace a bunch of old gnomecal functions
- with the functionally identical ones from Connector.
-
-2002-07-18 Rodrigo Moya <rodrigo@ximian.com>
-
- * importers/icalendar-importer.c (get_uri_from_folder_path): if
- there's an exception, continue with the next item.
-
-2002-07-08 Peter Williams <peterw@ximian.com>
-
- * cal-util/Makefile.am: Install libcal-util-static.la
- and fix the -all-static flag to make it install statically.
-
- * pcs/Makefile.am: Install libpcs.a and its headers.
-
- * pcs/cal-backend-util.h: Same sort of include namespacing fix,
- but for pcs.
-
- * pcs/cal.h:
- * pcs/query.h:
- * pcs/cal-factory.h:
- * pcs/cal-backend.h:
- * pcs/cal-backend-file.h: Same.
-
-2002-07-17 <jpr@ximian.com>
-
- * gui/calendar-model.c (calendar_model_value_at): use util
- function to see if the user is the organizer
-
- * gui/dialogs/cancel-comp.c (cancel_component_dialog): add
- deleting proto to indicate whether cancelling or deleting is the
- primary operation
-
- * gui/dialogs/cancel-comp.h: update proto
-
- * gui/dialogs/comp-editor.c (delete_cmd): offer to cancel
-
- * gui/dialogs/task-editor.c (cancel_task_cmd): call
- cancel_component_dialog with new param
-
- * gui/dialogs/event-editor.c (cancel_meeting_cmd): ditto
-
- * gui/e-week-view.c (e_week_view_on_editing_stopped): only update
- request if user is organizer
- (e_week_view_show_popup_menu): disable the meeting and meeting
- organizer mask if appropriate
- (e_week_view_delete_event_internal): offer to cancel the meeting
- (e_week_view_on_cut): ditto
- (selection_received): send request if its a meeting
-
- * gui/e-day-view.h: add meeting icon/mask
-
- * gui/e-day-view.c (e_day_view_on_event_right_click): disable the
- meeting and meeting organizer mask if appropriate
- (e_day_view_delete_event_internal): offer to cancel meeting
- (e_day_view_on_cut): ditto
- (e_day_view_finish_long_event_resize): only update request if user
- is organizer
- (e_day_view_reshape_long_event): add meeting icon to count
- (e_day_view_reshape_day_event): ditto
- (e_day_view_on_top_canvas_drag_data_received): only update request
- if user is organizer
- (e_day_view_on_main_canvas_drag_data_received): ditto
- (selection_received): offer to send meeting info
-
- * gui/e-day-view-main-item.c
- (e_day_view_main_item_draw_day_event): draw meeting icon if
- appropriate (using dummy icon atm)
-
-2002-07-14 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #8001
-
- * importers/icalendar-importer.c (connect_to_shell): new function for
- connecting the importers (both iCal and vCal) to the shell, needed for
- some information retrieval about the folders we're importing to.
- (ical_importer_new, vcal_importer_new): call connect_to_shell.
- (importer_destroy_cb): unref the shell client object.
- (get_uri_from_folder_path): retrieve the uri from the storage
- registry.
- (check_folder_type): removed.
-
- * importers/Makefile.am: included libeshell to LIBS.
-
-2002-07-12 Peter Williams <peterw@ximian.com>
-
- * pcs/cal.c: Sigh, fix for the wombat.idl -> Evolution-Wombat.idl
- rename here too. At least grep indicates that's all that needs to
- be fixed.
-
-2002-07-08 Peter Williams <peterw@ximian.com>
-
- * gui/Makefile.am (INCLUDES): Change the -I flags to get
- it to play nicely with the new Ebook header paradigm.
-
- * gui/dialogs/Makefile.am: Same.
-
- * gui/e-meeting-model.c: More of the same.
-
- * gui/dialogs/e-delegate-dialog.c:
- * gui/dialogs/e-meeting-model.c:
- * gui/dialogs/comp-editor-util.c: Fix include lines to get
- ebook headers.
-
- * pcs/Makefile.am: Same.
-
-2002-07-02 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #16034
-
- * gui/e-day-view.c (e_day_view_reshape_long_event):
- (e_day_view_reshape_day_event):
- * gui/e-day-view-main-item.c (e_day_view_main_item_draw_day_event):
- * 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):
- Don't assume all categories have icons when allocating space for
- the icons.
-
-2002-07-02 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component-factory.c (add_creatable_item): New arg @tooltip.
- Pass it to evolution_shell_component_add_user_creatable_item(),
- which now has a @tooltip arg.
- (create_object): Added tooltips.
-
-2002-07-01 JP Rosevear <jpr@ximian.com>
-
- * gui/calendar-config.c (config_read): listen for timezone config
- change
- (property_change_cb): set the timezone if it changed elsewhere
-
- * gui/main.c (init_bonobo): call bonobo_activate because we make
- bonobo related calls before the bonobo_main call
-
-2002-06-25 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #25410
-
- * gui/alarm-notify.c (AlarmNotify_removeCalendar): do proper
- cleanup on removal of clients.
- (alarm_notify_add_calendar): ditto.
-
-2002-06-27 JP Rosevear <jpr@ximian.com>
-
- * gui/itip-utils.c (comp_compliant): plug leak and actually use
- the minimal comp we create
-
-2002-06-25 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/comp-editor-page.h: add back proto
-
- * gui/dialogs/comp-editor-page.c
- (comp_editor_page_notify_needs_send): add page needs_send signal
-
- * gui/e-meeting-time-sel.c
- (e_meeting_time_selector_on_invite_others_button_draw): check to
- see if the button should be sensitive when drawing
- (e_meeting_time_selector_construct): listen for the button draw
- signal
-
- * cal-util/cal-component.c (cal_component_strip_errors): remove
- X-LIC-ERROR x properties
-
- * cal-util/cal-component.h: new proto
-
- * gui/dialogs/meeting-page.c (change_clicked_cb): set needs_send
- to true
- (meeting_page_fill_widgets): set up gui based on if the user or
- someone else is the organizer
- (meeting_page_construct): read the addresses here for the combo
- box
- (get_widgets): explicitly set the value in list values
-
- * gui/dialogs/event-editor.c (set_menu_sens): base this on the
- exist org and user org values of the comp editor
- (event_editor_edit_comp): set up editable row restrictions on the
- meeting model if the user is not an organizer, and don't set needs
- send if we aren't the organizer initially
- (model_row_changed_cb): set needs_send to true
- (row_count_changed_cb): ditto
-
- * gui/dialogs/meeting-page.glade: update gui
-
- * gui/dialogs/comp-editor.c (save_comp_with_send): if the user is
- not the organizer, REPLY rather than REQUEST
- (comp_editor_set_existing_org): accessor
- (comp_editor_get_existing_org): ditto
- (comp_editor_set_user_org): ditto
- (comp_editor_get_user_org): ditto
- (real_edit_comp): determine if there is an existing organizer and
- if the organizers is a user
- (page_changed_cb): warn the user that changes may be discarded
- (page_summary_changed_cb): ditto
- (page_dates_changed_cb): ditto
-
- * gui/dialogs/comp-editor.h: new protos
-
- * gui/itip-utils.c (itip_organizer_is_user): determine if the
- organizer of a component is a user
- (itip_sentby_is_user): same for sentby field of organizer
- (comp_sentby): use above routines instead
- (comp_compliant): strip all X-LIC-ERROR fields generated by
- libical
-
- * gui/e-meeting-model.c (is_cell_editable): if there is a list of
- editable rows, allow only the status column of those rows to be
- edited
- (init): init edit_rows
- (e_meeting_model_restricted_add): add an editable row to the model
- (e_meeting_model_restricted_remove): remove an editable row
- (e_meeting_model_restricted_clear): clear all editable rows
- (e_meeting_model_etable_click_to_add): set the click to add arg on
- all tables
- (e_meeting_model_etable_from_model): track the tables
- (table_destroy_list_cb): remove the table being destroyed from the
- list
- (table_destroy_state_cb): remove the table being destroyed from
- the list
-
- * gui/e-meeting-model.h: new protos
-
- * gui/e-itip-control.c (update_attendee_status): kill warning
-
-2002-06-18 JP Rosevear <jpr@ximian.com>
-
- * zones.h: update for new zones
-
-2002-06-17 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes wombat crash (for JP and myself)
-
- * gui/gnome-cal.c (gnome_calendar_open): don't call add_alarms here,
- since the client is not yet attached to the backend, and the alarm
- daemon does unref the client before creating a new one.
- (client_cal_opened_cb): call add_alarms here.
-
-2002-06-12 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/alarm-notify.c: added timeout_id to LoadedClient structure, to
- keep track of the timeout function.
- (retry_timeout_cb): don't use RetryData, but the LoadedClient.
- (cal_opened_cb): ditto, and assigned lc->timeout_id to the return
- value of g_timeout_add().
- (alarm_notify_add_calendar): destroy the timeout callback when
- destroying the LoadedClient structure.
-
-2002-06-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * pcs/cal-factory.c (open_fn): Free the uri_string once we're done
- with it.
-
-2002-06-12 Kjartan Maraas <kmaraas@gnome.org>
-
- * gui/dialogs/cal-prefs-dialog.glade: Fix a typo.
-
-2002-06-10 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/alarm-notify/alarm-notify.c (alarm_notify_add_calendar): removed
- already loaded client when asked to be opened again, and *really*
- re-open it again.
-
-2002-06-04 Christopher James Lahey <clahey@ximian.com>
-
- * gui/gnome-cal.c (gnome_calendar_setup_view_menus):
- gal_view_menus_set_show_define_views (..., FALSE);
-
-2002-06-04 Christopher James Lahey <clahey@ximian.com>
-
- * gui/e-tasks.c (e_tasks_setup_view_menus), gui/gnome-cal.c
- (gnome_calendar_setup_view_menus): Set the title of our
- GalViewCollection.
-
-2002-06-03 Anna Marie Dirks <anna@ximian.com>
-
- * gui/dialogs/cal-prefs-dialog.glade: In an attempt to clean up the
- config dialog (and to reduce its overall girth), I have re-laid-out the
- calendar preferences dialog. It now conforms to standard Evolution
- spacing and padding guidelines, and exhibits proper alignment, etc.
-
-2002-06-03 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/query.c: keep a reference to the Query object, to avoid
- crashes when the queries are destroyed before finishing processing.
- Fixes #25056.
-
-2002-05-26 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/comp-editor.h: update proto
-
- * gui/dialogs/comp-editor.c (comp_editor_get_comp): new function
- to get base comp
-
- * gui/e-comp-editor-registry.c (e_comp_editor_registry_add): get
- the base comp, not the current comp, don't unref it
- (foreach_close_cb): block the signal, unblock it if the editor
- could not be closed
- (e_comp_editor_registry_close_all): fix preconditions
- (editor_destroy_cb): get the base comp, not the current comp,
- don't unref it
-
-2002-05-26 JP Rosevear <jpr@ximian.com>
-
- * gui/e-comp-editor-registry.c (e_comp_editor_registry_close_all):
- if there are remaining items, return false
- (foreach_close_cb): don't remove the item if it couldn't be closed
-
- * gui/e-comp-editor-registry.h: update proto
-
- * gui/component-factory.c (request_quit): return a boolean
- indicating if everything was closed
-
- * gui/dialogs/comp-editor.h: update proto
-
- * gui/dialogs/comp-editor.c (comp_editor_close): return true if
- the editor was closed, false otherwise
-
-2002-05-26 JP Rosevear <jpr@ximian.com>
-
- * gui/e-comp-editor-registry.[hc]: a registry of comp editors so
- we can close them all centrally
-
- * gui/gnome-cal.c (gnome_calendar_init): there is no editor hash
- now
- (gnome_calendar_destroy): ditto
- (gnome_calendar_edit_object): look for the event editor in the
- registry, if it isn't there, create it and add it to the registry
-
- * gui/e-calendar-table.c (open_task): look for the task editor in
- the registry, if it isn't there, create it and add it to the
- registry
-
- * gui/component-factory.c (request_quit): close all open editors
- (create_object): add a request_quit function to the shell
- component
-
- * gui/comp-editor-factory.c (free_client): there is no
- uid_comp_hash to free any more
- (editor_destroy_cb): we get an OpenClient as callback data now,
- reduce the editor count and destroy it if it is 0
- (edit_existing): don't create the Component, add the new editor to
- the registry, increase the editor count
- (edit_new): ditto
- (open_client): set the editor count to 0
- (impl_editExisting): look in the registry for the editor
-
- * gui/Makefile.am: Build new sources
-
- * gui/main.c (main): create the registry
-
- * gui/dialogs/comp-editor.c (comp_editor_close): prompt to save
- and then close dialog
-
- * gui/dialogs/comp-editor.h: new proto
-
- * gui/GNOME_Evolution_Calendar.oaf.in: remove dead summary stuff
-
-2002-05-24 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/cal-backend-file.c (save): check the value returned by
- gnome_vfs_uri_to_string before using it.
- (cal_backend_file_open): ditto.
-
-2002-05-20 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/dialogs/event-editor.c (event_editor_init): Pass the
- @component_pixmaps in so we give the new "Meeting" button an icon.
-
- * gui/dialogs/comp-editor.c (comp_editor_merge_ui): New arg
- @component_pixmaps to pass in custom pixmaps.
-
-2002-05-20 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/alarm-notify/alarm-notify.c:
- * gui/alarm-notify/notify-main.c: ported changes from evolution-1-0
- to make it work with reminders on remote backends.
-
- * pcs/cal-backend-file.c (cal_backend_file_open): check the string
- returned by gnome_vfs_uri_to_string, which can be empty. If so,
- return an error.
-
-2002-05-17 JP Rosevear <jpr@ximian.com>
-
- * gui/gnome-cal.c (gnome_calendar_setup_view_menus): set the view
- to the current view
-
-2002-05-16 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/gnome-cal.c (client_cal_opened_cb): added support for
- CAL_CLIENT_OPEN_PERMISSION_DENIED error code.
- (permission_error): new function to display 'Permission Denied'
- error message when opening the calendar.
-
- * gui/e-tasks.c: likewise.
-
- * idl/evolution-calendar.idl: added PERMISSION_DENIED to Listener's
- OpenStatus enumeration.
-
- * cal-client/cal-client.c (cal_opened_cb): added code for retrieving
- 'Permission Denied' errors, and convert it to CalClientOpenStatus
- values.
-
- * pcs/cal-factory.c (open_backend): added code for informing of
- 'Permission Denied' errors.
-
-2002-05-16 Rodrigo Moya <rodrigo@ximian.com>
-
- * idl/evolution-calendar.idl: added PermissionDenied exception and
- make it be raised in open, updateObjects and removeObject.
-
- * pcs/cal-backend.h: added CAL_BACKEND_OPEN_PERMISSION_DENIED to
- CalBackendOpenStatus enumeration, added CalBackendResult enumeration.
-
- * pcs/cal.c:
- * pcs/cal-backend.c:
- * pcs/cal-backend-file.c: adapted to changes in update_objects and
- remove_object methods.
-
- * cal-client/cal-client.[ch]: added CalClientResult enumeration.
- (cal_client_update_object, cal_client_update_objects,
- cal_client_remove_object): changed to return a CalClientResult.
-
- * conduits/calendar/calendar-conduit.c:
- * calendar/conduits/todo/todo-conduit.c:
- * importers/icalendar-importer.c:
- * gui/dialogs/comp-editor.c:
- * gui/calendar-model.c:
- * gui/e-calendar-table.c:
- * gui/e-day-view.c:
- * gui/e-itip-control.c:
- * gui/e-week-view.c:
- * gui/comp-util.c:
- * gui/e-tasks.c:
- * gui/tasks-migrate.c: adapted to changes in cal_client_update_object(s)
- and cal_client_remove_object.
-
-2002-05-15 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component-factory.c (create_object): Pass NULL as
- @request_quit_fn.
-
-2002-05-14 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/schedule-page.c (schedule_page_construct): set the
- working hours for the meeting time selector
-
-2002-05-14 JP Rosevear <jpr@ximian.com>
-
- * cal-util/cal-component.h: make the range datetime member a
- struct not a pointer
-
- * cal-util/cal-component.c (cal_component_get_recurid): take a
- pointer to a range
- (cal_component_set_recurid): ditto
-
- * gui/itip-utils.c (comp_minimal): get/set the recurrence id
- properly
-
-2002-05-09 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/e-itip-control.c (get_servers): use
- GNOME_Evolution_Storage__get_folderList instead of
- GNOME_Evolution_Storage_getFolderList since I have now changed
- that to be an attribute instead of a method.
-
-2002-05-07 JP Rosevear <jpr@ximian.com>
-
- * gui/e-itip-control.c (start_calendar_server): start a server a
- uri
- (start_default_server): start a default server
- (get_servers): get all clients for all folders of the given
- type(s)
- (find_server): locate a server for a particular uid
- (init): get_servers, listen for object_requested signal
- (destroy): destroy all clients
- (write_html): put options is there own cell
- (get_publish_options): place selector in if param is true
- (get_request_options): ditto
- (get_real_item): only try and look up the item if we know its in
- the server
- (show_current_event): find the server (if any) for the current
- comp
- (show_current_todo): ditto
- (update_attendee_status): if there is no server for the comp, it
- doesn't exist
- (remove_item): ditto
- (button_selected_cb): get a client for the selected folder
- (object_requested_cb): draw the folder button in
-
- * gui/calendar-config.h: new protos
-
- * gui/calendar-config.c (calendar_config_default_tasks_folder):
- get default tasks uri
- (calendar_config_default_calendar_folder): get default calendar
- uri
-
- * cal-client/cal-client.c (get_default_uri): use
- cal_util_expand_uri
-
- * cal-util/cal-util.h: new proto
-
- * cal-util/cal-util.c (cal_util_expand_uri): tack on the file name
- if its a file uri
-
-2002-05-03 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-tasks.c (e_tasks_delete_selected):
- (e_tasks_complete_selected): show progress messages
- on the status bar.
-
-2002-05-02 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/query.c: #include <gtk/gtkmain.h> to avoid warnings.
-
-2002-05-02 JP Rosevear <jpr@ximian.com>
-
- * gui/e-week-view.c (free_view_popup): only discard the popup if
- we created one
-
-2002-05-02 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/query.c: refactored a bit, to not do things in idle loops.
-
-2002-05-01 JP Rosevear <jpr@ximian.com>
-
- * gui/print.c (print_day_details): modify the start and end hours
- to accomodate all the events in the day
-
- * gui/e-day-view.c (free_view_popup): only discard the popup if we
- created one
-
-2002-04-30 JP Rosevear <jpr@ximian.com>
-
- * gui/gnome-cal.c (gnome_calendar_construct): remove setup_widgets
- from here
- (gnome_calendar_init): move setup_widgets back here
-
-2002-04-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * gui/Makefile.am: Don't link to libibex anymore!!
-
-2002-04-24 JP Rosevear <jpr@ximian.com>
-
- * gui/e-day-view.c (e_day_view_on_pilot_settings): launch pilot
- settings capplet
-
- * gui/e-week-view.c (e_week_view_on_pilot_settings): ditto
-
-2002-04-24 JP Rosevear <jpr@ximian.com>
-
- * gui/e-week-view.c (free_view_popup): free the view popup
- (e_week_view_show_popup_menu): add the view popup to the
- "main_item" menu and listen for destruction
-
- * gui/e-day-view.c (free_view_popup): as above
- (e_day_view_on_event_right_click): as above
-
- * gui/e-week-view.h: add class member
-
- * gui/e-day-view.h: add a class member
-
- * gui/gnome-cal.h: new protos
-
- * gui/gnome-cal.c (set_view): set the instance view id properly
- when switching views
- (gnome_calendar_setup_view_popup): generate a view popup
- (gnome_calendar_discard_view_popup): destroy a view popup
-
-2002-04-22 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/cal.c (impl_Cal_get_alarms_in_range): raise an exception if the
- backend's method returns NULL, since we can't send a NULL pointer to
- ORBit.
-
-2002-04-19 Anna Marie Dirks <anna@ximian.com>
-
- * gui/dialogs/cal-prefs-dialog.glade: Collapsed notebook into two pages
- and added accelerators for everything, as part of my config dialog
- polishing project
-
-2002-04-18 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/recurrence-page.c (simple_recur_to_comp): properly
- handle -ve recurrence values
- (month_num_submenu_selection_done_cb): track the current date in
- use
- (make_recur_month_num_submenu): make a submenu of dates
- (make_recur_month_num_menu): make the date/relation option menu
- (month_num_menu_selection_done_cb): update the date properly and
- keep both option menus consistent
- (month_day_menu_selection_done_cb): keep both option menus
- consistent
- (make_monthly_special): listen for selection done signal
- (make_recurrence_special): destroy old month_num_menu
- (recurrence_page_fill_widgets): properly handle -ve recurrence
- values
-
-2002-04-18 JP Rosevear <jpr@ximian.com>
-
- * gui/e-day-view.c (e_day_view_on_settings): show the settings
-
- * gui/e-week-view.c (e_week_view_on_settings): ditto
-
- * gui/calendar-commands.c (control_util_show_settings): show the
- settings dialog
-
- * gui/calendar-commands.h: new proto
-
- * gui/control-factory.c (control_factory_new_control): set the
- control as object data on the calendar
-
-2002-04-17 Christopher James Lahey <clahey@ximian.com>
-
- * gui/e-calendar-table.c, gui/e-day-view.c, gui/e-week-view.c,
- gui/dialogs/meeting-page.c: Updated these to match the new
- EPopupMenu.
-
-2002-04-05 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/cal-backend.[ch] (cal_backend_get_query): new method.
-
- * pcs/cal-backend-file.c (cal_backend_file_get_query): new method.
-
- * pcs/cal.c (impl_Cal_get_query): call the CalBackend's implementation
- instead of calling query_new directly.
-
- * pcs/query.[ch]: fixed headers.
-
-2002-04-10 Dan Winship <danw@ximian.com>
-
- * gui/gnome-cal.c (gnome_calendar_open): Fix this: Rodrigo's patch
- used one of the functions I just removed. :)
-
-2002-04-10 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/gnome-cal.c (gnome_calendar_open): use the default uri for
- tasks (as stored in the configuration) when the calendar URI is not
- a local one (connector, etc).
-
-2002-04-10 Dan Winship <danw@ximian.com>
-
- * cal-client/cal-client.c (get_default_uri): Use new-and-improved
- default folder URI config paths.
-
- * gui/calendar-config.c (calendar_config_{get,set}_default_uri,
- calendar_config_{get,set}_default_tasks_uri): Remove these. The
- shell owns this information now. (Weren't being used anyway.)
-
- * gui/component-factory.c (get_data_uri): Fix another place that
- hardcoded tacking foo.ics on to the end of URLs.
-
-2002-04-08 Dan Winship <danw@ximian.com>
-
- * gui/component-factory.c (create_view): Add view_info arg. If the
- view_info is non-empty and this is a calendar folder, set the
- "view" property on the control's propertybag.
-
- * gui/control-factory.c (calendar_properties_init): Set up the
- "view" property.
- (get_prop, set_prop): handle the "view" property by
- getting/setting the GnomeCalendar's view. Unfortunately, this
- doesn't actually work. See #23208.
-
- * gui/calendar-commands.c (calendar_control_activate): Set the UI
- component's container before calling
- gnome_calendar_set_ui_component so that the search bar
- initialization will work.
-
-2002-04-06 JP Rosevear <jpr@ximian.com>
-
- * pcs/cal-backend-db.[hc]: Remove dead files.
-
-2002-04-06 JP Rosevear <jpr@ximian.com>
-
- * gui/GNOME_Evolution_Calendar.oaf.in: add config_item:type
-
-2002-04-01 Kjartan Maraas <kmaraas@gnome.org>
-
- * gui/e-itip-control.c: Fix a string.
-
-2002-04-01 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/cal-backend-db.c: simple fix for DB3 header inclusion in
- Mac OS X, by Max Horn <max@quendi.de>
-
-2002-03-31 JP Rosevear <jpr@ximian.com>
-
- * gui/e-itip-control.c (clean_up): free the my_address member
- (find_my_address): fall back on a CN match if possible
- (change_status): handle changing the status of a non-existent
- address by adding a new attendee
- (update_attendee_status): if the attendee response is not from a
- user on the list of attendees, ask the user if they want to add
- the attendee any how (as an optional participant)
- (ok_clicked_cb): if we are suppose to rsvp and the status was ok,
- but the attendee address is not known, find it
-
-2002-03-29 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/GNOME_Evolution_Calendar.oaf.in: Set a priority for the
- config item. Rename to "Calendar and Tasks".
-
-2002-03-29 JP Rosevear <jpr@ximian.com>
-
- * conduits/calendar/Makefile.am: s/libversit.la/libversit.a/
-
- * conduits/todo/Makefile.am: ditto
-
-2002-03-29 JP Rosevear <jpr@ximian.com>
-
- * gui/e-calendar-table.c: implement new pop up menu items for
- "Save as", "Print", "Assign Task", "Forward as iCalendar"
-
- * gui/e-day-view.c: similarly, also "Publish Free/Busy
- Information" and "New Meeting" and "New Task"
-
- * gui/e-week-view.c: ditto
-
- * gui/dialogs/task-editor.c (show_assignment): move the assignment
- page stuff here
- (task_editor_show_assignment): use it
- (assign_task_cmd): ditto
-
- * gui/dialogs/task-editor.h: new proto
-
- * gui/dialogs/comp-editor.c (save_as_cmd): use new e-util file
- selector function
-
- * meeting-mockup.glade: Remove old file
-
- * topic.dat
-
-2002-03-19 Dan Winship <danw@ximian.com>
-
- * cal-util/Makefile.am: s/libversit.la/libversit.a/
-
- * cal-client/Makefile.am: Likewise
-
- * gui/Makefile.am: Likewise
-
-2002-03-18 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/cal-search-bar.c: Removed `search_menu_items'.
- (cal_search_bar_menu_activated): Removed.
- (cal_search_bar_class_init): Don't install.
- (cal_search_bar_construct): No menu items here.
-
-2002-03-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * gui/e-day-view.c: Updated to use new EPopupMenu API.
-
- * gui/e-week-view.c: Updated to use new EPopupMenu API.
-
- * gui/e-calendar-table.c: Updated to use new EPopupMenu API.
-
-2002-03-15 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/tasks-control.c (tasks_control_activate): Call
- `e_tasks_set_ui_component()' here to give it the
- BonoboUIComponent.
- (tasks_control_deactivate): Likewise, call it here to unset the
- BonoboUIComponent.
-
- * gui/e-tasks.c (e_tasks_set_ui_component): New.
-
- * gui/calendar-commands.c (calendar_control_activate): Call
- gnome_calendar_set_ui_component() here.
- (calendar_control_deactivate): ...And here, with a NULL
- BonoboUIComponent.
-
- * gui/gnome-cal.c (gnome_calendar_set_ui_component): New.
-
-2002-03-15 JP Rosevear <jpr@ximian.com>
-
- * gui/main.c: use bonobo exception macros to tidy
-
- * gui/itip-control-factory.c: ditto
-
- * gui/gnome-cal.c: ditto
-
- * gui/comp-editor-factory.c: ditto
-
- * gui/calendar-commands.c: ditto
-
-2002-03-14 JP Rosevear <jpr@ximian.com>
-
- * idl/evolution-calendar.idl: add all day event editor mode
-
- * gui/component-factory.c: clean up exception handling
- (sc_user_create_new_item_cb): support the all day event id
- (create_object): add a user creatable all day appointment item
-
- * gui/comp-editor-factory.c (get_default_event): get a default
- event either all day or starting at the top of the hour
- (get_default_task): get a default task
- (edit_new): support the all day event mode
-
- * gui/calendar-commands.c: remove unused functions/verbs
-
-2002-03-13 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/GNOME_Evolution_Calendar.oaf.in: Add an
- "evolution:config_item:icon_path" attribute so we get an icon for
- the calendar preferences.
-
-2002-03-12 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/dialogs/cal-prefs-dialog.glade: Add <visible>False</visible>
- to cal-prefs-dialog so it doesn't get shown when we load the Glade
- file with libglade.
-
- * gui/component-factory.c (owner_set_cb): Register the
- ConfigControl factory.
-
- * gui/tasks-control.c: Removed verb "TaskSettings".
- (tasks_control_settings_cmd): Removed.
-
- * gui/calendar-commands.c: Removed verb "CalendarSettings".
- (settings_cmd): Removed.
-
- * gui/dialogs/cal-prefs-dialog.c: Renamed `CalPrefsDialogPrivate'
- to `DialogData'. Replace `dialog' member with a `page' member.
- Remove `toplevel_notebook' member.
- (init_widgets): Renamed from `cal_prefs_dialog_init_widgets'.
- Just get a DialogData.
- (get_widgets): Get a DialogData pointer.
- (cal_prefs_dialog_destroy): Removed.
- (config_control_destroy_callback): New, signal handler for
- ::destroy for ConfigControl.
- (cal_prefs_dialog_new): Create a new DialogData, connect all the
- signal handlers.
- (create_time_edit): Renamed from
- `cal_prefs_dialog_create_time_edit'.
- (cal_prefs_dialog_show): Removed.
- (cal_prefs_dialog_button_clicked): Removed.
- (show_task_list_config): Get a DialogData.
- (show_config): Renamed from `cal_prefs_dialog_show_config'.
- Likewise.
- (update_task_list_config): Likewise.
- (update_config): Renamed from
- `cal_prefs_dialog_update_config'. Likewise.
- (color_set_callback): New callback, makes the dialog report
- changes when the setting in any of the color widgets is changed.
- (widget_changed_callback): New callback, makes the dialog report
- changes when any of the widgets changes status.
- (connect_changed): New utility function to connect this callback
- to all the widgets.
- (setup_widgets): Connect all the widgets.
- (cal_prefs_dialog_new): Call `setup_widgets'.
-
- * gui/config-control-factory.c: New.
- * gui/config-control-factory.h: New.
-
- * gui/GNOME_Evolution_Calendar.oaf.in: Add
- OAFIID:GNOME_Evolution_Calendar_ConfigControl and
- OAFIID:GNOME_Evolution_Calendar_ConfigControlFactory.
-
-2002-03-06 Rodrigo Moya <rodrigo@ximian.com>
-
- Should fix #21240
-
- * gui/alarm-notify/alarm-notify.c: replaced use of GnomeVFSURI
- with EUri, to allow non-registered methods.
-
-2002-03-05 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-itip-control.c (e_itip_control_set_data): reverted my last
- change of adding the METHOD property to the incoming request.
-
- * gui/itip-utils.c (comp_string): added extra
- X-MICROSOFT-CDO-REPLYTIME property for broken Outlook. Should fix
- #20783.
-
-2002-03-04 Dan Winship <danw@ximian.com>
-
- * gui/itip-utils.c (comp_compliant): Reset the DTSTAMP of the new
- component. (RFC2245 says DTSTAMP corresponds to the time the
- particular iCalendar representation of the object was created.)
- Fixes #21198.
-
-2002-03-05 JP Rosevear <jpr@ximian.com>
-
- * gui/print.c: remove unneeded parameter from print_text_size
- everywhere
- (get_font_for_size): calculate a font size based on the available
- height
- (print_text): calculate the top of where the font should be drawn
- (print_text_size): use get_font_for_size
- (print_day_background): use get_font_for_size
-
-2002-03-05 JP Rosevear <jpr@ximian.com>
-
- * gui/e-meeting-time-sel-item.c
- (e_meeting_time_selector_item_draw): pass the real table
- to e_meeting_model_etable_view_to_model_row
- (e_meeting_time_selector_item_paint_busy_periods): ditto
-
- * gui/dialogs/meeting-page.c (right_click_cb): ditto
-
- * gui/e-meeting-model.h: update protos
-
- * gui/e-meeting-model.c
- (e_meeting_model_etable_model_to_view_row): take in to account the
- fact the table used the without model
- (e_meeting_model_etable_view_to_model_row): ditto
-
-2002-03-04 Damon Chaplin <damon@ximian.com>
-
- * gui/tasks-control.c: added support for printing the Tasks table.
- I hacked it a bit so the user could choose portrait or landscape mode.
- This is bug #9677. ETable printing has a few issues, though, and it
- isn't very pretty.
-
-2002-03-04 Dan Winship <danw@ximian.com>
-
- * gui/itip-utils.c (comp_subject): Prefix the subject with an
- indicator like "Accepted" or "Cancelled" explaining what the
- action is, since Outlook doesn't display any of that information
- inline like we do. (20780)
-
-2002-02-28 Rodrigo Moya <rodrigo@ximian.com>
-
- * calendar/gui/e-itip-control.c (e_itip_control_set_data): added the
- METHOD property to the top level component we create.
-
-2002-02-26 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/control-factory.c (set_prop):
- * gui/tasks-control.c (tasks_control_set_property): display an error
- message if the call to gnome_calendar_open or e_tasks_open does not
- return TRUE. Fixes #20346.
-
-2002-02-25 Dan Winship <danw@ximian.com>
-
- * gui/itip-utils.c (itip_send_comp): use
- GNOME_Evolution_Composer_setBody rather than _setMultipartType and
- _attachData now, to send a message containing just a text/calendar
- part. Fixes 14705. Mostly.
- (comp_content_type): Include the filename here since we can't add
- a Content-Disposition now.
-
-2002-02-24 Chris Toshok <toshok@ximian.com>
-
- * gui/cal-search-bar.c (cal_search_bar_class_init): change
- query_changed to search_activated.
- (cal_search_bar_search_activated): rename
- cal_search_bar_query_changed to this.
-
-2002-02-21 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component-factory.c (add_creatable_item): New helper
- function.
- (create_object): Add icons for the various user creatable items.
-
-2002-02-19 JP Rosevear <jpr@ximian.com>
-
- * gui/e-itip-control.c (send_item): pass extra itip_send_comp
- params
- (send_freebusy): ditto
- (ok_clicked_cb): ditto, including the timezones culled from the
- component
-
- * gui/e-week-view.c: pass extra itip_send_comp params
-
- * gui/calendar-commands.c: ditto
-
- * gui/e-day-view.c: ditto
-
- * gui/dialogs/task-editor.c: ditto
-
- * gui/dialogs/event-editor.c: ditto
-
- * gui/dialogs/comp-editor.c: ditto
-
- * gui/itip-utils.h (itip_send_comp): update proto
-
- * gui/itip-utils.c (foreach_tzid_callback): check the passed in
- zones, then the builtin time zones then the client
-
-2002-02-19 JP Rosevear <jpr@ximian.com>
-
- * gui/e-itip-control.c (find_my_address): strip the ical value and
- do a case insensitive compare
- (find_attendee): ditto
- (change_status): put the error message here
- (ok_clicked_cb): don't update the item or rsvp unless
- change_status was successful, trip the ical value and do a case
- insensitive compare
-
- * gui/itip-utils.c (get_address): strip the incoming address
- (itip_strip_mailto): use g_strncasecmp
- (comp_limit_attendees): strip the ical value and do a case
- insensitive compare
-
-2002-02-14 JP Rosevear <jpr@ximian.com>
-
- * gui/e-meeting-model.c: use new column enums
- (set_value_at): emit pre-change/cell change signals
- (destroy): destroy refresh_queue and refresh_data
- (init): init new elements
- (refresh_queue_add): if the attendee is being refreshed already,
- possibly update the start/end times to look for and update the
- callback info, otherwise add it to the queue
- (refresh_queue_remove): remove a refreshing attende from the queue
- (process_callbacks): make all the callbacks and remove the
- attendee from the queue
- (process_free_busy): process the callbacks immediately if parsing
- fails or on successful completion of processing
- (async_close): process free busy
- (cursor_cb): we're only looking for one at a time now
- (refresh_busy_periods): idle callback to start processing the queue
- (e_meeting_model_refresh_all_busy_periods): add every row to the queue
- (e_meeting_model_refresh_busy_periods): add a single row to the queue
-
- * gui/e-meeting-model.h: new protos, enum the columns
-
- * gui/e-meeting-time-sel.c: use new compare time function
- (e_meeting_time_selector_construct): listen for a cell changed
- signal and use separate callbacks for rows_inserted and
- rows_deleted
- (e_meeting_time_selector_refresh_free_busy): util function to
- refresh free busy info
- (e_meeting_time_selector_on_update_free_busy): use above
- (rows_inserted_cb): refresh free busy on the new rows
- (cell_changed_cb): refresh free busy on the row when the address
- changes
- (rows_deleted_cb): redraw
-
- * gui/e-meeting-utils.[hc]: a holding spot for a meeting time
- comparison function
-
- * gui/Makefile.am: compile new files
-
-2002-02-13 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/control-factory.c (set_prop): don't append 'calendar.ics'
- to the URI.
- (get_prop): finished.
-
- * gui/tasks-control.c (tasks_control_set_property): don't append
- 'tasks.ics' to the URI.
- (tasks_control_get_property): finished.
-
- * gui/gnome-cal.c (gnome_calendar_open):
- * gui/e-tasks.c (e_tasks_open): append $filename.ics to the uri to be
- opened if the uri is local. Leave intact in other cases.
-
-2002-02-08 Damon Chaplin <damon@ximian.com>
-
- * gui/comp-util.c (cal_comp_util_compare_event_timezones): check if
- the CalComponentDateTime values are set before trying to use them.
- Possibly fixes bug #18529.
-
- * importers/icalendar-importer.c: added vCalendar importer and
- intelligent GnomeCalendar importer code here, as it shares a lot of
- code with the iCalendar importer.
-
- NOTE: check_folder_type() needs to be finished at some point.
- It needs a new shell Corba call so it can decide whether to import
- events or tasks into the folder. Currently it just imports both.
-
- * importers/main.c (importer_factory_fn): create vCalendar importer
- or GnomeCalendar importer if required.
-
- * importers/evolution-calendar-importer.h: added declarations for
- creating a vCalendar importer and intelligent Gnome Calendar importer.
-
- * importers/Makefile.am: added -DEVOLUTION_SOUNDDIR so the importer
- knows what filename to use for audio alarms in vCalendar files.
- Added libicalvcal-evolution to LDADD.
-
- * importers/GNOME_Evolution_Calendar_Importer.oaf.in: added vCalendar
- importer and intelligent Gnome Calendar importer.
-
- * gui/comp-util.c (cal_comp_util_compare_event_timezones): return TRUE
- if the event uses UTC. We don't want to flag all events from Outlook,
- which use UTC.
-
-2002-02-08 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/task-details-page.glade: change custom widget
- creator to e_url_entry_new
-
- * gui/dialogs/task-details-page.c (get_widgets): get the url entry
- and its entry
-
-2002-02-08 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/task-details-page.glade: add a custom widget created
- with e_url_button_new
-
- * gui/dialogs/task-details-page.c (task_details_page_init): init
- url_button member to NULL
- (init_widgets): set the url button entry
- (get_widgets): get the url button
-
- * gui/calendar-commands.c (pixmaps): use new all day event icon
-
-2002-02-07 JP Rosevear <jpr@ximian.com>
-
- * gui/e-day-view.c: pass meeting boolean for
- gnome_calendar_edit_object and gnome_calendar_new_appointment_for
-
- * gui/e-week-view-event-item.c: ditto
-
- * gui/e-week-view.c: ditto
-
- * gui/tasks-control.c (confirm_expunge): kill warning
-
- * gui/calendar-commands.c (new_meeting_cb): show a new meeting
- dialog
- (new_event_cb): pass new param
-
- * gui/gnome-cal.c (gnome_calendar_edit_object): take meeting
- boolean and show meeting page if true
- (gnome_calendar_new_appointment_for): takeing meeting param and
- pass to above
- (gnome_calendar_new_appointment): add new param
-
- * gui/gnome-cal.h: update proto
-
- * gui/component-factory.c (create_component): take a comp editor
- mode, determine vtype
- (sc_user_create_new_item_cb): check for meeting user creatable
- item
- (create_object): add meeting as user creatable item
-
- * gui/comp-editor-factory.c (edit_new): get a comp editor mode
- now, determine vtype and show meeting page if required
- (queue_edit_new): get comp editor mode
- (impl_editNew): ditto, plus queue the mode directly instead of
- determining the vtype
-
- * gui/dialogs/event-editor.c (show_meeting): new internal util
- function to show meeting page
- (event_editor_show_meeting): show the meeting
- (schedule_meeting_cmd): use show_meeting
-
- * gui/dialogs/event-editor.h: new proto
-
- * idl/evolution-calendar.idl: editNew takes a mode rather than a
- type now
-
- * cal-util/Makefile.am: fix includes
-
-2002-02-07 Christopher James Lahey <clahey@ximian.com>
-
- * gui/e-tasks.c (e_tasks_setup_view_menus), gui/gnome-cal.c
- (gnome_calendar_setup_view_menus): Made these use the new
- GalViewMenus stuff.
-
-2002-02-06 Damon Chaplin <damon@ximian.com>
-
- * cal-util/cal-recur.c (cal_recur_from_icalproperty): convert months
- from 1-12 to 0-11. Fixes bug #19235.
-
-2002-02-04 JP Rosevear <jpr@ximian.com>
-
- * conduits/todo/todo-conduit.c (e_todo_gui_new): new gui routines
- for conduit settings
- (e_todo_gui_fill_config): ditto
- (e_todo_gui_fill_widgets): ditto
- (e_todo_gui_destroy): ditto
- (e_todo_context_destroy): destroy new_cfg and gui properly
- (local_record_from_comp): set the priority to the default setting
- if none is set on the icalendar object
- (fill_widgets): fill gui widgets
- (create_settings_window): create gui
-
-2002-01-30 JP Rosevear <jpr@ximian.com>
-
- * gui/e-itip-control.c (write_html): if this is a reply, print the
- attendee status
-
-2002-01-25 Federico Mena Quintero <federico@ximian.com>
-
- * gui/dialogs/alarm-options.glade: Use 1 instead of zero as the
- minimum value for the repetitions spin button as we use a check
- box to specify whether the alarm has repetitions or not. Fixes
- bug #19054.
-
-2002-01-24 Ettore Perazzoli <ettore@ximian.com>
-
- * importers/Makefile.am (evolution_calendar_importer_LDADD):
- Ooops. Forgot to use EVOLUTION_CALENDAR_LIBS here.
-
-2002-01-24 Ettore Perazzoli <ettore@ximian.com>
-
- * conduits/calendar/Makefile.am: Use
- EVOLUTION_CALENDAR_CONDUIT_LIBS and
- EVOLUTION_CALENDAR_CONDUIT_CFLAGS.
- * conduits/todo/Makefile.am: Likewise.
-
- * cal-client/Makefile.am: Use EVOLUTION_CALENDAR_LIBS and
- EVOLUTION_CALENDAR_CFLAGS.
- * cal-util/Makefile.am: Likewise.
- * gui/alarm-notify/Makefile.am: Likewise.
- * gui/Makefile.am: Likewise.
-
-2002-01-23 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component-factory.c (create_object): Pass a NULL @icon to
- `evolution_shell_component_add_user_creatable_item()'.
-
-2002-01-21 JP Rosevear <jpr@ximian.com>
-
- * conduits/todo/todo-conduit.c (todoconduit_load_configuration):
- return a new configuration struct, load default priority setting
- (todoconduit_save_configuration): save default priority setting
- (e_todo_context_new): dupe configuration
-
- * conduits/calendar/calendar-conduit.c (e_calendar_context_new):
- set ps to NULL
-
-2002-01-17 Damon Chaplin <damon@ximian.com>
-
- * gui/dialogs/alarm-page.c (get_alarm_string): save the alarm string
- in the correct variable (str), so it actually gets shown for alarms
- with specific trigger times. Fixes bug #18801.
-
-2002-01-15 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/dialogs/task-page.c (task_page_fill_widgets): default component
- classification to PUBLIC. Fixes internal bug #1066
-
-2002-01-14 JP Rosevear <jpr@ximian.com>
-
- * conduits/calendar/calendar-conduit.c: move all functions here,
- get rid of header files, use e-pilot-settings to display gui
-
- * conduits/todo/todo-conduit.c: as above
-
-2002-01-14 JP Rosevear <jpr@ximian.com>
-
- * gui/gnome-cal.c (get_current_time): use icaltimetype_to_tm
-
-2002-01-14 JP Rosevear <jpr@ximian.com>
-
- * gui/e-week-view-main-item.c (e_week_view_main_item_draw_day):
- figure out when today is and highlight if it is not selected
-
- * gui/e-week-view.h: enum the "today" color
-
- * gui/e-week-view.c (e_week_view_realize): init the "today" color
-
-2002-01-13 JP Rosevear <jpr@ximian.com>
-
- * gui/alarm-notify/save.h: add protos
-
- * gui/alarm-notify/save.c (save_blessed_program): records a
- program as blessed
- (is_blessed_program): checks to see if a program is blessed
-
- * gui/alarm-notify/alarm-queue.c (procedure_notification_dialog):
- popup a dialog notifying the user that is a program and let them
- not see the dialog about this program again
- (procedure_notification): use above
-
-2002-01-11 Damon Chaplin <damon@ximian.com>
-
- * gui/e-timezone-entry.c:
- * gui/e-itip-control.c (write_label_piece):
- * gui/calendar-config.c (on_timezone_set): translate timezone names
- when displayed. Fixes bug #6544.
-
-2002-01-03 JP Rosevear <jpr@ximian.com>
-
- * gui/tasks-control.c (tasks_control_complete_cmd): new verb
- callback
- (sensitize_commands): set sensitivity of mark complete command
-
- * gui/e-tasks.h: new proto
-
- * gui/e-tasks.c (e_tasks_complete_selected): mark selected tasks
- in the table as complete
-
- * gui/e-calendar-table.h: new proto
-
- * gui/e-calendar-table.c (e_calendar_table_complete_selected):
- mark selected rows as complete
-
-2002-01-03 JP Rosevear <jpr@ximian.com>
-
- * gui/tasks-control.c (confirm_expunge): only need one warning
- message now
-
- * gui/e-tasks.c (create_sexp): change the logic to expunge all
- completed tasks not just hidden ones
-
-2002-01-03 JP Rosevear <jpr@ximian.com>
-
- * gui/tasks-control.c (confirm_expunge): confirm expunging of the
- tasks
- (tasks_control_expunge_cmd): verb callback
-
- * gui/calendar-config.c (config_read): read confirm expunge value
- (calendar_config_write): write confirm expunge value
- (calendar_config_write_on_exit): ditto
- (calendar_config_get_confirm_expunge): get value
- (calendar_config_set_confirm_expunge): set value
-
- * gui/calendar-config.h: new proto
-
- * gui/e-itip-control.c (start_calendar_server): kill warning
-
- * gui/e-tasks.c (e_tasks_init): init query member to NULL
- (set_status_message): util function to set status message
- (e_tasks_open): use above
- (cal_opened_cb): ditto
- (create_sexp): create sexp of items to be deleted
- (query_obj_updated_cb): remove any items found
- (query_eval_error_cb): bail out on error
- (query_query_done_cb): tidy when done
- (e_tasks_delete_completed): set up query
-
- * gui/e-tasks.h: new proto
-
- * gui/calendar-model.c (query_query_done_cb): use g_warning
- instead of printing to stderr
- (query_eval_error_cb): ditto
- (update_query): clear the status message if we can't create the
- query
-
- * gui/tag-calendar.c (resolve_tzid_cb): make this static
-
-2001-12-21 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/comp-editor.c: remove needs send signal related
- cruft
- (save_comp_with_send): with send_component_dialog, indicate if the
- meeting info is newly created or not
- (real_edit_comp): remember if the dialog initially needs a send
-
- * gui/dialogs/send-comp.c (send_component_dialog): take a "new"
- parameter indicating whether the dialog should intimate if the
- component to be sent is a new meeting or not
-
- * gui/dialogs/send-comp.h: update proto
-
- * gui/dialogs/comp-editor.c: remove no longer used needs_send
- notification and signal
-
- * gui/dialogs/comp-editor.h: remove proto
-
- * gui/e-day-view.c (e_day_view_on_main_canvas_drag_data_received): add new
- param to send_component_dialog
- (e_day_view_finish_long_event_resize): ditto
- (e_day_view_finish_resize): ditto
- (e_day_view_on_editing_stopped): ditto
- (e_day_view_on_top_canvas_drag_data_received): ditto
-
- * gui/e-week-view.c (e_week_view_on_editing_stopped): add new
- param to send_component_dialog
-
-2001-12-21 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/comp-editor.h: inherit from bonobo window
-
- * gui/dialogs/comp-editor.c: inherit from bonobo window
- (comp_editor_key_press_event): Look for an escape key press and
- close the window if found
-
-2001-12-20 Ettore Perazzoli <ettore@ximian.com>
-
- [Fixes #17377, Evolution doesn't work on multi-depth displays.]
-
- * gui/main.c (main): Push GdkRGB visual and colormap.
-
-2001-12-19 JP Rosevear <jpr@ximian.com>
-
- * conduits/calendar/calendar-conduit.c (check_for_slow_setting):
- go slow and clear the map if the last uri and the current uri do
- not match
- (post_sync): save the last uri
-
- * conduits/calendar/calendar-conduit-config.h: handle a last uri
- config option
-
- * conduits/todo/todo-conduit-config.h: ditto
-
- * conduits/calendar/calendar-conduit.c (start_calendar_server):
- use the open_default_calendar method
-
- * conduits/todo/todo-conduit.c (start_calendar_server): same as above
-
- * cal-client/Makefile.am: link with bonobo conf
-
- * cal-client/cal-client.h: new protos
-
- * idl/evolution-calendar.idl: make sure open method raises
- appropriate exceptions
-
- * gui/e-itip-control.c (start_calendar_server): use
- cal_client_open_default_* calls
-
- * cal-client/cal-client.c (real_open_calendar): do the real work
- of loading
- (cal_client_open_calendar): use above
- (get_fall_back_uri): get the basic local uri
- (get_default_uri): get the default uri from the config db
- (cal_client_open_default_calendar): open the default uri or the
- fallback if the method is unsupported
- (cal_client_open_default_tasks): same for tasks
-
-2001-12-17 JP Rosevear <jpr@ximian.com>
-
- * gui/e-itip-control.c (send_item): use get_real_item
- (get_refresh_options): uncomment out
- (get_real_item): obtain the real object which has the uid of the
- item received
- (show_current_todo): use get_refresh_options for refresh method
- and provide the description and summary from the real component
- since its not in the reply
- (show_current_event): ditto
- (send_item): use get_real_item
-
-2001-12-17 JP Rosevear <jpr@ximian.com>
-
- * gui/itip-utils.c (comp_limit_attendees): can't remove properties
- in an iteration loop, so remove them outside the loop
- (comp_minimal): don't set a recurid if there isn't one, add the x
- properties to the clone
- (comp_compliant): unref the clone for DECLINECOUNTER
-
- * gui/e-itip-control.c (get_refresh_options): make function
- available again
- (show_current_event): use it here
- (ok_clicked_cb): can't remove properties in an iteration loop, so
- remove them outside the loop
-
- * cal-util/cal-component.c (free_icalcomponent): properly free the
- attendee list
- (cal_component_rescan): don't destroy the alarm hash
-
-2001-12-13 Damon Chaplin <damon@ximian.com>
-
- * zones.h: new file to contain all timezone names for translation.
- We won't be using the translations in 1.0.1, but it gives translators
- time before we do use them in 1.0.2.
-
- * Makefile.am: added zones.h to EXTRA_DIST.
-
-2001-12-12 JP Rosevear <jpr@ximian.com>
-
- * gui/e-day-view.c (e_day_view_on_top_canvas_button_release):
- ungrab the pointer before calling
- e_day_view_finish_long_event_resize
- (e_day_view_on_main_canvas_button_release): ditto
- (e_day_view_finish_long_event_resize): ask if the meeting should
- be sent
- (e_day_view_finish_resize): ditto
- (e_day_view_on_editing_stopped): ditto
- (e_day_view_on_top_canvas_drag_data_received): ditto
- (e_day_view_on_main_canvas_drag_data_received): ditto
-
-2001-12-11 JP Rosevear <jpr@ximian.com>
-
- * gui/e-meeting-model.c (process_free_busy_comp): properly convert
- the dtstart and dtend times if they are UTC
- (cursor_cb): if we don't have anybody to get f/b info for, process
- the callbacks immediately
- (e_meeting_model_refresh_busy_periods): take start/end times,
- calculate the timet values with object timezone
- (e_meeting_model_etable_model_to_view_row): proper cast
- (e_meeting_model_etable_view_to_model_row): ditto
- (async_open): bail out if we couldn't open properly
-
- * gui/e-meeting-time-sel.c
- (e_meeting_time_selector_on_update_free_busy): use defines for
- determining the number of days before and after of free busy to
- request
- (e_meeting_time_selector_update_dates_shown): use defines for the
- number of days shown
-
- * gui/e-meeting-model.h: update proto
-
-2001-12-10 Damon Chaplin <damon@ximian.com>
-
- * gui/control-factory.c (control_factory_new_control): removed code
- that connects to GnomeCalendar's "dates_shown_changed" signal.
-
- * gui/calendar-commands.c (gcal_calendar_dates_change_cb):
- (calendar_control_activate): moved it here, so it gets reconnected
- whenever the control is activated. Fixes bug #15798.
-
-2001-12-10 Damon Chaplin <damon@ximian.com>
-
- * importers/GNOME_Evolution_Calendar_Importer.oaf.in: fixed executable
- name. Fixes bug #16880.
-
-2001-12-08 JP Rosevear <jpr@ximian.com>
-
- * conduits/calendar/calendar-conduit.c (local_record_from_comp):
- if we have an alarm that can be represented on the pilot, set the
- appointment fields appropriately, if the duration has values for
- minutes and/or hours and/or days, use the lowest common
- denominator
- (comp_from_remote_record): if the appointment on the pilot has an
- alarm, find the first alarm an item currently had that is relative
- to the start and with a negative duration and update it (or create
- a new one if no valid ones exist)
-
- * cal-util/cal-component.c (cal_component_get_alarm_uids): build
- list in the order they appear in the component so we get
- consisting order for the gui and for the pilot
-
-2001-12-08 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/calendar-config.c (calendar_config_get_default_uri):
- (calendar_config_get_default_tasks_uri): s/%/%s
-
-2001-11-09 Federico Mena Quintero <federico@ximian.com>
-
- (committed by Damon)
-
- Fix bug #14699.
-
- * pcs/query.c (QueryState): Added a state QUERY_WAIT_FOR_BACKEND
- to indicate that the query is not populated as we are waiting for
- the backend to be opened.
- (query_init): Start in the QUERY_WAIT_FOR_BACKEND state.
- (query_destroy): Only disconnect from the backend if we are in a
- state that implies that we are connected to its signals.
- (query_construct): If the backend is already loaded, immediately
- set the state to QUERY_START_PENDING.
- (backend_opened_cb): Disconnect from the backend's "opened"
- signal. Set the state to QUERY_START_PENDING.
- (match_component): We can now only match components if the query
- is in progress or if it is done. Assert to that effect, and do
- not ensure_sexp().
- (match_component): Do not check for a nonexistent component using
- g_return_if_fail(). Also, there is no need to ref/unref the
- component.
- (backend_obj_updated_cb): Assert to the effect of our state.
- (backend_obj_removed_cb): Likewise.
- (parse_sexp): Renamed from ensure_sexp(). Assert that the query
- has not started. Do not disconnect from the backend's signals
- here, since we have no connections.
- (start_query_cb): Set the state to QUERY_IN_PROGRESS here instead
- of in populate_query().
-
-2001-12-07 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/calendar-config.c (calendar_config_get_default_uri):
- (calendar_config_get_default_tasks_uri): if the key in the config
- database does not exist, just return the local URIs, but never
- return NULL
-
-2001-12-06 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/dialogs/event-page.c (event_page_fill_widgets): default
- component classification to PUBLIC
-
-2001-12-06 Jon Trowbridge <trow@ximian.com>
-
- * gui/dialogs/event-editor.c (event_editor_destroy): Explicitly
- destroy the EMeetingModel. This is a hack to work around problems
- with the reference counting; we are still leaking the
- EMeetingModels.
-
- * gui/e-meeting-time-sel.c
- (e_meeting_time_selector_construct): Ref our EMeetingModel.
- (e_meeting_time_selector_destroy): Unref the model.
-
- * gui/e-meeting-model.c (destroy): Properly destroy
- corba_select_names with a call to bonobo_object_release_unref.
- (Fixes 14002)
-
-2001-12-05 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/dialogs/event-page.glade: added entry for the LOCATION field
-
- * gui/dialogs/event-page.c: added support for the new LOCATION entry
- added in the Event editor.
-
-2001-12-05 Zbigniew Chyla <cyba@gnome.pl>
-
- * gui/itip-utils.c (comp_subject, comp_description):
- Marked strings for translation.
-
-2001-12-03 Damon Chaplin <damon@ximian.com>
-
- * gui/e-meeting-model.c:
- * gui/calendar-model.c: make sure we call e_table_model_pre_change()
- before changing the model.
-
- * gui/calendar-config.c (calendar_config_configure_e_calendar_table):
- removed call to e_table_model_changed(). calendar_model_refresh()
- results in that anyway.
-
-2001-12-03 Damon Chaplin <damon@ximian.com>
-
- * gui/e-calendar-table.etspec: disabled 'Alarms', 'End Date' and
- 'Show Time As' fields, as these are not useful for tasks. We may want
- to reenable them later if we add a table view of calendar events.
-
-2001-12-02 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/calendar-offline-handler.c (backend_cal_opened): connect to
- "cal_set_mode" signal before calling cal_client_set_mode. Also,
- s/cal_mode_set/cal_set_mode
- (backend_go_offline): connect to "cal_opened" signal before calling
- cal_client_open_calendar
-
-2001-11-30 Damon Chaplin <damon@ximian.com>
-
- * gui/e-itip-control.c (remove_item): only show the dialog if we
- created it. Hopefully fixes bug #15774.
- Also ifdef'ed out a lot of code that isn't currently used, including
- code to use a label which is never created. The unused code was there
- to support handling multiple iTIP objects in a message, but was never
- updated when we switched to use HTML for the control. Fixes bug #16232.
-
-2001-11-28 Federico Mena Quintero <federico@ximian.com>
-
- * gui/gnome-cal.c (gnome_calendar_new_task): Set the category of
- the new task to that of the search bar. Fixes bug #15533.
-
-2001-11-27 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-itip-control.c (update_attendee_status):
- * gui/itip-utils.c (comp_to_list): fixed typos in translatable
- strings. Fixes Ximian #15456
-
-2001-11-14 Damon Chaplin <damon@ximian.com>
-
- * gui/print.c: Substituted gnome_font_get_width_string() with
- gnome_font_get_width_utf8() and gnome_font_get_width_string_n()
- with gnome_font_get_width_utf8_sized(). Fixes calendar part of #15379.
-
-2001-11-14 Federico Mena Quintero <federico@ximian.com>
-
- * gui/calendar-model.c (date_value_to_string): Convert the buffer
- to UTF8.
- (calendar_model_value_to_string): Do not convert the string fields
- to UTF8 again; they are already in UTF8. Fixes the UTF8-related
- bits of bug #15304.
-
-2001-11-14 Damon Chaplin <damon@ximian.com>
-
- * gui/calendar-model.c:
- * cal-util/cal-component.h: #ifdef'ed out the LOCATION field for now,
- since it wasn't supported everywhere, or in the .etspec file.
-
-2001-11-14 Damon Chaplin <damon@ximian.com>
-
- * gui/e-calendar-table.c: don't abort when e_table_selected_count()
- returns odd values. There seems to be a bug in ETable. This is to
- avoid bug #13843.
-
-2001-11-13 Federico Mena Quintero <federico@ximian.com>
-
- (committed to CVS by Damon)
- Fixes bug #15137.
-
- * gui/e-day-view.c (e_day_view_on_delete_appointment): Do not try
- to operate on the event if it gets deleted while stopping the
- edition.
- (e_day_view_on_event_double_click): Likewise.
- (e_day_view_on_long_event_button_press): Likewise.
- (e_day_view_on_event_button_press): Likewise.
- (e_day_view_on_long_event_click): Likewise.
- (e_day_view_on_event_click): Likewise.
-
- * gui/e-week-view.c (e_week_view_on_text_item_event): Likewise.
-
-2001-11-14 JP Rosevear <jpr@ximian.com>
-
- * conduits/calendar/calendar-conduit.c (pre_sync): remove silly
- debug warning
-
-2001-11-13 Damon Chaplin <damon@ximian.com>
-
- * gui/alarm-notify/config-data.c (ensure_inited):
- * gui/calendar-config.c (config_read):
- * conduits/todo/todo-conduit.c (get_default_timezone):
- * conduits/calendar/calendar-conduit.c (get_default_timezone):
- make the timezone default to UTC. Fixes bug #14362.
-
-2001-11-13 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-week-view.c (selection_received): only change the day,
- month and year for the start date, for not screwing up the start
- time, which was being set to midnight always (Fixes Ximian #5287)
- Also, deal correctly with VCALENDAR components
-
- * gui/e-day-view.c (selection_received): dela correctly with
- VCALENDAR components being pasted
-
-2001-11-11 Federico Mena Quintero <federico@ximian.com>
-
- * gui/alarm-notify/save.c (get_calendars_to_load): The last
- argument to the bonobo_config_get_XXX_with_default() is a gboolean
- *, not a CORBA_Environment *. Fixes bug #14655.
-
-2001-11-11 JP Rosevear <jpr@ximian.com>
-
- * pcs/cal-backend-file.c (free_busy_instance): recurrence
- expansion callback for free/busy
- (create_user_free_busy): expand recurrences and use date/time
- values for dtstart and dtend
-
-2001-11-11 JP Rosevear <jpr@ximian.com>
-
- * gui/e-meeting-model.h: new protos
-
- * gui/e-meeting-model.c (e_meeting_model_get_zone): accessor
- (e_meeting_model_set_zone): ditto
- (init): init to the calendar default zone
- (process_free_busy_comp): take the zone to convert to as a param
- (e_meeting_model_refresh_busy_periods): redraw properly
-
- * gui/dialogs/schedule-page.c (update_time): set the zone of the
- model
-
-2001-11-09 Damon Chaplin <damon@ximian.com>
-
- * gui/e-week-view.c (e_week_view_key_press): don't subtract a day
- from DTEND. For DATE values we don't include the entire day now.
- Fixes bug #14842.
-
-2001-11-09 Damon Chaplin <damon@ximian.com>
-
- * gui/e-week-view-layout.c (e_week_view_layout_events): fix buffer
- overflow. Fixes bug #10285 (the printing of lines & dates in the
- printout of the month view).
-
-2001-11-09 Zbigniew Chyla <cyba@gnome.pl>
-
- * gui/dialogs/meeting-page.c
- (meeting_page_fill_widgets): Convert strings to GTK+ encoding.
- (meeting_page_destroy): Free allocated strings before freeing the list
- itself.
-
-2001-11-08 JP Rosevear <jpr@ximian.com>
-
- * gui/e-meeting-time-sel.c
- (e_meeting_time_selector_timeout_handler): don't let an empty
- event occur for all days when auto scrolling
-
-2001-11-08 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/cal-backend-file.c
- (cal_backend_file_compute_changes_foreach_key): don't leak the
- string returned by cal_component_get_as_string nor the temporary
- CalComponent we create
-
-2001-11-08 JP Rosevear <jpr@ximian.com>
-
- * gui/e-itip-control.c (ok_clicked_cb): don't add the item, remove
- it if declining (in case it was added before)
- (remove_item): Since we can't discern between an item not found
- and another error, always say the removal is complete
-
-2001-11-07 Zbigniew Chyla <cyba@gnome.pl>
-
- * gui/e-cell-date-edit-text.c (ecd_get_text):
- Convert generated string to UTF-8.
-
-2001-11-07 JP Rosevear <jpr@ximian.com>
-
- * gui/e-meeting-time-sel.c
- (e_meeting_time_selector_on_start_time_changed): emit changed
- signal
- (e_meeting_time_selector_on_end_time_changed): emit changed
- signal, if end time is now before start time and all day event,
- make sure a whole day is still selected
- (e_meeting_time_selector_drag_meeting_time): calculate the first
- and last_time's in whole days for all day events
- (e_meeting_time_selector_timeout_handler): calculate the drag time
- to be whole days for all day events and scroll the canvas even if
- we don't update the time so the user can see where they're headed
-
-2001-11-06 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/event-editor.c (event_editor_edit_comp): make sure
- to remove all attendees from the model when we edit a new comp,
- append the pages if they are needed and we weren't showing them
- before
-
- * gui/dialogs/task-editor.c (task_editor_edit_comp): same as above
-
- * gui/dialogs/comp-editor.c (comp_editor_remove_page): check for a
- return value indicating the page was not found and return if so
-
-2001-11-05 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/dialogs/e-delegate-dialog.c: #include
- "Evolution-Addressbook-SelectNames.h", not
- "../Evolution-Addressbook-SelectNames.h". Grrr.
-
-2001-11-05 JP Rosevear <jpr@ximian.com>
-
- * gui/e-meeting-time-sel.c (e_meeting_time_selector_class_init):
- add a changed signal
- (e_meeting_time_selector_construct): emit changed signal
- (e_meeting_time_selector_set_meeting_time): ditto
- (e_meeting_time_selector_set_all_day): set the all day setting
- (e_meeting_time_selector_autopick): emit changed signal
- (e_meeting_time_selector_find_nearest_interval): find proper
- interval when in all day mode
- (e_meeting_time_selector_find_nearest_interval_backward): ditto
- (e_meeting_time_selector_drag_meeting_time): for all day events,
- move the time when past the 12 hour mark, and and always make sure
- 1 full day is selected, emit changed signal when appropriate
- (e_meeting_time_selector_update_start_date_edit): set date and
- time of day together
- (e_meeting_time_selector_update_end_date_edit): ditto, and adjust
- display time if all day event
-
- * gui/e-meeting-time-sel-item.c
- (e_meeting_time_selector_item_draw): remove unused variable
- (e_meeting_time_selector_item_button_press): for all day mode,
- make the interval a whole day
-
- * gui/dialogs/schedule-page.c (update_time): set the meeting time
- selector setting instead of manual mucking with the e-date-edit
- widgets
- (init_widgets): listen to the changed signal of the meeting time
- selector instead of propagating multiple events as it updates
-
- * gui/dialogs/event-page.c (update_time): block time zone change
- signals
-
-2001-11-05 Damon Chaplin <damon@ximian.com>
-
- * gui/calendar-model.c (dup_date_edit_value): removed ';' in the wrong
- place. Fixes bug #14421.
-
-2001-11-05 Dan Winship <danw@ximian.com>
-
- * gui/alarm-notify/Makefile.am (evolution_alarm_notify_LDFLAGS):
- -export-dynamic for libglade custom widget.
-
-2001-11-04 Damon Chaplin <damon@ximian.com>
-
- * gui/comp-editor-factory.c (get_default_component): use TZID from the
- builtin timezone, instead of using the location name.
-
-2001-11-02 Federico Mena Quintero <federico@ximian.com>
-
- * cal-util/cal-util.c (compute_alarm_range): Short-circuit the
- calculation of the repeat time if there are zero repetitions.
- (compute_alarm_range): I'm a moron. De-reference alarm_start when
- subtracting stuff from it! Fixes bug #14209.
-
-2001-10-31 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/dialogs/Makefile.am: Added rules to generate
- `Evolution-Addressbook-SelectNames.h'.
-
- * gui/dialogs/comp-editor-util.h: #include
- "Evolution-Addressbook-SelectNames.h" from this directory.
-
-2001-10-31 Federico Mena Quintero <federico@ximian.com>
-
- * gui/dialogs/alarm-options.c: #include <string.h>
-
-2001-10-31 Federico Mena Quintero <federico@ximian.com>
-
- * gui/gnome-cal.c (dn_query_obj_updated_cb): If a query is not in
- progress, just retag the whole thing. An event may change dates
- and tag_calendar_by_comp() would not know how to untag the old
- dates. Fixes bug #10220.
-
- * pcs/query.c (start_query_cb): Connect to the backend's
- "obj_updated" and "obj_removed" signals here instead of in
- query_construct(). If a query is started while another one is
- notifying of an update, these signal connections would get appened
- to the running signal (the one that triggered the notification
- about an update) and the new signal handlers would also get
- called. We are really not interested in updates before we
- populate the query, because we'll catch the changes anyways.
-
-2001-10-31 Federico Mena Quintero <federico@ximian.com>
-
- Fix bug #13723.
-
- * gui/gnome-cal.h (GnomeCalendarClass): New signals
- "calendar_focus_change", "taskpad_focus_change", and
- "taskpad_selection_changed". Renamed "selection_changed" to
- "calendar_selection_changed".
-
- * gui/gnome-cal.c (gnome_calendar_get_num_tasks_selected): New
- function.
- (setup_widgets): Connect to the focus event signals of the task
- pad and the calendar view widgets.
- (gnome_calendar_delete_selection): Renamed from
- gnome_calendar_delete_event().
- (gnome_calendar_cut_clipboard): Handle the current focus location.
- (gnome_calendar_copy_clipboard): Likewise.
- (gnome_calendar_paste_clipboard): Likewise.
- (gnome_calendar_delete_selection): Likewise.
- (table_selection_change_cb): New callback.
-
- * gui/calendar-commands.c (sensitize_calendar_commands): Take in
- whether we should unconditionally disable everything.
- (sensitize_taskpad_commands): Analogous function to the above.
- (gcal_calendar_focus_change_cb): New callback, used for calendar
- views.
- (gcal_taskpad_focus_change_cb): New callback, used for the
- taskpad.
-
- * gui/e-day-view.c (e_day_view_key_press): Use a better test for
- keys that should start editing. Fixes bug #6447.
-
- * gui/e-week-view.c (e_week_view_key_press): Likewise.
-
-2001-10-31 Christopher James Lahey <clahey@ximian.com>
-
- * gui/calendar-model.c: Make the pre_changes and changes match
- here.
-
-2001-10-31 JP Rosevear <jpr@ximian.com>
-
- * gui/itip-utils.c (itip_send_comp): send as mixed rather than
- alternative
-
-2001-10-31 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/alarm-notify/save.c (KEY_CALENDARS_TO_LOAD):
- Removed.
- (KEY_NUM_CALENDARS_TO_LOAD): New key, containing the number of
- calendars to load.
- (BASE_KEY_CALENDAR_TO_LOAD): New base key name for the URIs of the
- calendars to load.
- (save_calendars_to_load): Rewrote to not use a sequence, to work
- around an ORBit bug that causes bonobo-moniker-xmldb to crash.
- (get_calendars_to_load): Likewise.
-
-2001-10-30 Damon Chaplin <damon@ximian.com>
-
- * gui/dialogs/comp-editor.c (comp_editor_remove_page): disconnect
- signals added in append_page(). Fixes Gtk-Critical warning about
- GtkAccelGroup being added twice to a window.
-
-2001-10-30 JP Rosevear <jpr@ximian.com>
-
- * gui/itip-utils.c (itip_send_comp): set a body for the message
-
-2001-10-30 Dan Winship <danw@ximian.com>
-
- * gui/itip-utils.c (itip_send_comp): call
- GNOME_Evolution_Composer_setMultipartType to get a
- multipart/alternative.
-
-2001-10-30 JP Rosevear <jpr@ximian.com>
-
- * gui/e-meeting-time-sel.c
- (e_meeting_time_selector_on_start_time_changed): don't overwrite
- memory
- (e_meeting_time_selector_on_end_time_changed): ditto
-
-2001-10-30 Damon Chaplin <damon@ximian.com>
-
- * gui/calendar-model.c (dup_date_edit_value): return NULL if passed
- NULL. Should fix bug #14048.
-
-2001-10-30 Federico Mena Quintero <federico@ximian.com>
-
- * gui/calendar-config.c (config_read): Do not ignore the
- exceptions of the cases that do not have defaults.
-
-2001-10-30 JP Rosevear <jpr@ximian.com>
-
- * gui/e-meeting-time-sel.c
- (e_meeting_time_selector_drag_meeting_time): if we are doing all
- day stuff, make the drag increment 1 day at a time
-
-2001-10-30 Federico Mena Quintero <federico@ximian.com>
-
- * gui/dialogs/meeting-page.c (meeting_page_fill_component): Add
- _() to a string that was missing it.
-
-2001-10-30 Federico Mena Quintero <federico@ximian.com>
-
- * gui/dialogs/meeting-page.c (table_canvas_focus_out_cb): Commit
- the ETable click-to-add for if the dialog is being destroyed.
- Should fix bug #13959.
-
-2001-10-30 Federico Mena Quintero <federico@ximian.com>
-
- * gui/itip-utils.c (itip_send_comp): Allocate enough space for the
- string! (was missing the null terminator) Possibly fixes #13924.
- Thanks a *LOT* to Michael Zucchi for running this through Purify.
-
-2001-10-30 JP Rosevear <jpr@ximian.com>
-
- * gui/e-meeting-time-sel-item.c
- (e_meeting_time_selector_item_button_press): move in whole day
- increments if we are in all day mode
-
- * gui/e-meeting-time-sel.c
- (e_meeting_time_selector_on_start_time_changed): get rid of
- localtime call
- (e_meeting_time_selector_on_end_time_changed): ditto
- (e_meeting_time_selector_update_start_date_edit): set the date
- editor using the meeting time fields directly
- (e_meeting_time_selector_update_end_date_edit): ditto
-
- * gui/dialogs/schedule-page.c (update_time): do the set_show_time
- stuff first
-
- * conduits/calendar/calendar-conduit.c (process_multi_day): don't
- adjust the time, set the default timezone for date values
-
-2001-10-30 Dan Winship <danw@ximian.com>
-
- * gui/alarm-notify/Makefile.am (INCLUDES):
- s/BONOBO_HTML_GNOME_LIBS/BONOBO_HTML_GNOME_CFLAGS/
-
-2001-10-30 JP Rosevear <jpr@ximian.com>
-
- * gui/e-meeting-model.c (e_meeting_model_count_actual_attendees):
- count the actual attendees (doesn't include people delegating
-
- * gui/e-meeting-time-sel.c: use
- e_meeting_model_count_actual_attendees (renamed)
-
- * gui/e-meeting-time-sel-item.c: use
- e_meeting_model_etable_view_to_model_row calls instead of calling
- on the model directly, use e_meeting_model_count_actual_attendees
-
- * gui/e-meeting-model.c
- (e_meeting_model_etable_model_to_view_row): get the real mapping
- (e_meeting_model_etable_view_to_model_row): ditto
- (get_key): e-table-without callback
- (duplicate_key): ditto
- (free_gotten_key): ditto
- (free_duplicated_key): ditto
- (init): create without model
- (e_meeting_model_etable_from_model): build etable from without
- model
-
- * gui/e-meeting-model.h: update protos
-
- * gui/dialogs/meeting-page.c (right_click_cb): convert row from
- view to model row
-
-2001-10-30 Damon Chaplin <damon@ximian.com>
-
- * gui/dialogs/task-page.c (task_page_fill_widgets): set to the default
- timezone for DATE values, in case the user switches to a DATE-TIME.
-
-2001-10-30 Damon Chaplin <damon@ximian.com>
-
- * gui/dialogs/task-page.c: handle DATE values for Start and Due dates.
-
-2001-10-30 Damon Chaplin <damon@ximian.com>
-
- * gui/dialogs/schedule-page.c:
- * gui/dialogs/event-page.c:
- * gui/dialogs/comp-editor-util.c: updated code to handle DATE values.
-
- * gui/gnome-cal.c (gnome_calendar_new_appointment_for):
- * gui/e-day-view.c (e_day_view_key_press): updated DATE code.
-
- * gui/e-cell-date-edit-text.c:
- * gui/calendar-model.c: updated to support DATE values.
-
- * cal-util/cal-recur.c (cal_recur_generate_instances_of_rule): updated
- to use DATE values in same way as Outlook - i.e. the DTEND date is
- not included entirely. Though I did make it so that if the DTSTART
- and DTEND used the same DATE value, it includes the entire day.
- So 1-day events should be the same. Long All-Day events will be
- 1 day shorter.
-
- * cal-util/cal-component.c (cal_component_get_start_plus_duration):
- don't subtract a day from the end date.
-
- * gui/tasks-control.c: updated the EPixmap paths for Cut/Copy etc.
- Removed Print & Print Preview paths, since we don't have menu commands
- for these any more.
-
-2001-10-30 Federico Mena Quintero <federico@ximian.com>
-
- Fix bug #10016.
-
- * gui/dialogs/comp-editor.c (comp_editor_merge_ui): Use
- bonobo_ui_util_set_ui() instead of doing things by hand. Hmmm, if
- only that function had a way of telling us whether it failed so
- that we could avoid setting the verb list...
-
- * gui/dialogs/event-editor.c (event_editor_init): Do not pass the
- filename with the full path so that Bonobo can find it in a smart
- way.
-
- * gui/dialogs/task-editor.c (task_editor_init): Likewise.
-
-2001-10-30 Federico Mena Quintero <federico@ximian.com>
-
- * gui/dialogs/delete-comp.c (delete_component_dialog): Use an
- EMessageBox instead of a gnome_dialog_question so that the label
- gets line breaking. Fixes bug #11260.
-
-2001-10-29 Federico Mena Quintero <federico@ximian.com>
-
- Fix bug #13649.
-
- * gui/calendar-config.c
- (calendar_config_get_use_default_reminder): New function.
- (calendar_config_set_use_default_reminder): New function.
- (calendar_config_get_default_reminder_interval): New function.
- (calendar_config_set_default_reminder_interval): New function.
- (calendar_config_get_default_reminder_units): New function.
- (calendar_config_set_default_reminder_units): New function.
- (config_read): Get the options for default reminders.
- (calendar_config_write): Set the options for default reminders.
-
- * gui/dialogs/cal-prefs-dialog.c (cal_prefs_dialog_show_config):
- Set the default reminder widgets from the config values.
- (cal_prefs_dialog_update_config): Set the config values from the
- widgets.
-
- * gui/comp-util.c (cal_comp_event_new_with_defaults): New
- function; creates a VEVENT component with the default alarm.
-
- * gui/e-day-view.c (e_day_view_key_press): Use
- cal_comp_event_new_with_defaults ();
-
- * gui/e-week-view.c (e_week_view_key_press): Likewise.
- * gui/calendar-model.c (calendar_model_append_row): Likewise.
- * gui/comp-editor-factory.c (get_default_component): Likewise.
- * gui/gnome-cal.c (gnome_calendar_new_appointment_for): Likewise.
-
- * cal-util/cal-component.c (ensure_alarm_properties_cb): Ensure we
- have a DESCRIPTION property.
- (cal_component_commit_sequence): Ensure we have the mandatory
- alarm properties.
-
-2001-10-30 JP Rosevear <jpr@ximian.com>
-
- * gui/e-meeting-model.c (process_section): process an individual
- section here
- (select_names_ok_cb): call above
- (get_select_name_dialog): listen for ok:dialog signal
-
-2001-10-29 Damon Chaplin <damon@ximian.com>
-
- * importers/Makefile.am (evolution_calendar_importer_LDADD):
- * gui/Makefile.am (evolution_calendar_LDADD):
- * cal-util/Makefile.am (test_recur_LDADD):
- * cal-client/Makefile.am (client_test_LDADD): use libical-evolution.la
-
- * gui/dialogs/schedule-page.c: save the timezone passed in for the
- start time, so if our times are changed we use this. Also, if the
- end time was passed in in a different timezone, convert it.
- Also hide the time fields for DATE values. Note that DATE values still
- do not work.
-
- * gui/dialogs/meeting-page.glade: changed "Invite Others" to
- "Invite Others..." to be consistent with the other page.
-
- * gui/dialogs/event-page.c (times_updated):
- (all_day_event_toggled_cb): set is_date if appropriate.
-
- * gui/e-itip-control.c (write_label_piece): convert all UTC times to
- the current timezone. Outlook sends simple, non-recurring, events as
- UTC times, which isn't very useful.
-
-2001-10-29 Federico Mena Quintero <federico@ximian.com>
-
- * gui/main.c (launch_alarm_daemon): Launch the alarm daemon as
- soon as the calendar component is started. Fixes bug #13867;
- we can't really do much better than this.
-
-2001-10-29 Federico Mena Quintero <federico@ximian.com>
-
- * gui/tasks-control.c (pixmaps): Fix the verb names for the
- pixmaps in the Edit menu; they were out of synch with the XML
- UI description.
-
-2001-10-29 Chris Toshok <toshok@ximian.com>
-
- * pcs/cal-factory.c (cal_factory_dump_active_backends): new
- function.
- (dump_backend): new function.
-
- * pcs/cal-factory.h: add prototype for
- cal_factory_dump_active_backends.
-
-2001-10-29 Federico Mena Quintero <federico@ximian.com>
-
- Fix bug #12163.
-
- * cal-util/cal-util.c (compute_alarm_range): Take alarm
- repetitions into account.
- (add_alarm_occurrences_cb): Add alarm repetitions.
- (generate_absolute_triggers): Likewise.
- (generate_absolute_triggers): Oops, absolute triggers are in UTC,
- so convert them as such. Also, pay attention to the timezones of
- the dtstart and dtend properties.
-
-2001-10-29 JP Rosevear <jpr@ximian.com>
-
- * importers/Makefile.am: include the header as a source so it gets
- dist'ed.
-
-2001-10-29 Ettore Perazzoli <ettore@ximian.com>
-
- * importers/Makefile.am (INCLUDES):
- s/BONOBO_CFLAGS/BONOBO_GNOME_CFLAGS/.
-
-2001-10-29 Rodrigo Moya <rodrigo@ximian.com>
-
- * importers/icalendar-importer.c (load_file_fn): fixed URI
- construction, which was preventing importing into the root
- calendar (~/evo/local/Calendar/)
-
-2001-10-29 JP Rosevear <jpr@ximian.com>
-
- * conduits/calendar/calendar-conduit.c (is_all_day): handle date
- values
-
-2001-10-29 Rodrigo Moya <rodrigo@ximian.com>
-
- * importers/: added evolution-calendar-importer binary, starting
- with an iCalendar file importer
-
-2001-10-29 JP Rosevear <jpr@ximian.com>
-
- * conduits/todo/todo-conduit-config.h
- (todoconduit_load_configuration): get the management object by id
-
- * conduits/calendar/calendar-conduit-config.h
- (calconduit_load_configuration): ditto
-
-2001-10-29 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/calendar-config.[ch] (calendar_config_get_default_uri):
- (calendar_config_set_default_uri):
- (calendar_config_get_default_tasks_uri):
- (calendar_config_set_default_tasks_uri): new functions for setting
- and retrieving the default calendar URIs
-
- * gui/e-itip-control.c (init): don't use
- hard-coded URI, but use the default calendar URI, as returned
- by calendar_config_get_default_uri
- (start_calendar_server): added a "gboolean tasks" parameter, so
- that the local tasks.ics file is used if the calendar to be
- started is for tasks when no default tasks URI is found in
- the configuration
-
-2001-10-28 JP Rosevear <jpr@ximian.com>
-
- * conduits/calendar/calendar-conduit.c (add_record): unref the
- comp when finished
-
- * conduits/todo/todo-conduit.c (add_record): ditto
-
-2001-10-28 Damon Chaplin <damon@ximian.com>
-
- * gui/dialogs/task-page.c (task_page_fill_widgets): added break
- statements after each case, when setting the classification.
- Fixes bug #13772.
-
-2001-10-28 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-client/cal-client.c (destroy_wombat_client): removed this
- function, as we don't need to unref at all the WombatClient
- object, since it is aggregated to the CalListener object, which
- will take care of unrefing it (Fixes Ximian #12001)
- (cal_client_open_calendar): create the WombatClient here
-
-2001-10-28 Damon Chaplin <damon@ximian.com>
-
- * gui/print.c (print_todo_details): get the tasks directly from the
- CalendarModel, so we get the filtering & sorting for free. Fixes
- bug #10280. Hmm. This seems too easy. It isn't going to work is it...
-
- * gui/gnome-cal.c (gnome_calendar_get_task_pad): new function to get
- the TaskPad ECalendarTable, for printing.
-
- * gui/calendar-model.c:
- * gui/calendar-config.c (calendar_config_get_hide_completed_tasks_sexp):
- split this out from calendar-model.c so we could use it for printing,
- but ended up doing that a different way.
-
- * gui/dialogs/task-page.c (init_widgets): removed a duplicated signal
- connected to field_changed_cb().
-
-2001-10-27 Damon Chaplin <damon@ximian.com>
-
- * gui/print.c (print_week_view):
- (range_selector_new): when the week start day is set to Sunday, we
- have to be careful to make sure we print the correct week, since
- the previous Saturday is actually printed first. Fixes bug #13687.
- (print_week_summary): always set compress_weekend to true if
- multi_week_view is FALSE (i.e. we are printing the week view).
- Fixes bug #13688.
-
- * gui/e-itip-control.c (send_freebusy): use the timezones from the
- DTSTART and DTEND.
- (write_label_piece): output the date-time and the timezone after it.
- Note that we may want to convert it to the current timezone and display
- that as well. Also converted COMPLETED to the current timezone.
- And fixed all uses of old timezone functions.
-
- * gui/dialogs/comp-editor.c (commit_all_fields): added function to
- set the focus in the window to NULL, so all fields lose their focus,
- so they emit "changed" signals and update their values if needed.
- We call this when most menu commands are used, e.g. 'Save and Close',
- 'Print' etc. Fixes bug #11434. In future we should also check fields
- are valid and show dialogs if they are not.
-
- * gui/calendar-model.c (get_completed): use the completed value
- properly. Fixes bug #13694.
-
- * cal-util/timeutil.c (icaltimetype_to_tm_with_zone): don't check
- from_zone and to_zone != NULL. A NULL zone is valid, it is for
- floating times.
-
-2001-10-27 Federico Mena Quintero <federico@ximian.com>
-
- * gui/e-day-view.c (e_day_view_on_text_item_event): Cancel editing
- if the user presses Escape.
-
- * gui/e-week-view.c (e_week_view_on_text_item_event): Likewise.
-
- * gui/cal-search-bar.c: #include <string.h>
-
-2001-10-27 Federico Mena Quintero <federico@ximian.com>
-
- * gui/e-day-view.c (e_day_view_on_editing_stopped): Delete
- appointments with empty summaries. Fixes Ximian bug #780.
-
- * gui/e-week-view.c (e_week_view_on_editing_stopped): Likewise.
-
- * gui/dialogs/delete-comp.c (delete_component_dialog): Added an
- argument to specify whether we unconditionally want single
- components to be considered as not having a summary.
-
- * gui/comp-util.c (cal_comp_confirm_delete_empty_comp): New
- function.
-
- * gui/misc.[ch]: New files with miscellaneous utility functions;
- moved string_is_empty() over from calendar-model.c.
-
- * gui/calendar-model.c: Use the string_is_empty()
- function from misc.c.
-
- * gui/Makefile.am (evolution_calendar_SOURCES): Added misc.[ch] to
- the list of sources.
-
-2001-10-27 JP Rosevear <jpr@ximian.com>
-
- * conduits/todo/todo-conduit.c (local_record_from_comp): touch on
- lookup
- (check_for_slow_setting): write touched only if slow sync
- (match): touch on lookup
-
- * conduits/calendar/calendar-conduit.c (local_record_from_comp):
- touch the record on lookup
- (check_for_slow_setting): write touched only if slow sync
- (pre_sync): don't touch on lookup
- (match): touch on lookup
-
-2001-10-26 JP Rosevear <jpr@ximian.com>
-
- * conduits/calendar/e-calendar.conduit.in: remove the merges as
- valid sync types
-
- * conduits/todo/e-todo.conduit.in: as above
-
- * conduits/calendar/calendar-conduit.c (pre_sync): write out only
- the touched records if we are doing copies
-
- * conduits/todo/todo-conduit.c: as above
-
- * conduits/calendar/calendar-conduit-config.h
- (calconduit_load_configuration): get the sync type
-
- * conduits/todo/todo-conduit-config.h: as above
-
-2001-10-26 Damon Chaplin <damon@ximian.com>
-
- * gui/e-itip-control.c (write_label_piece): convert the formatted
- date to UTF-8.
-
- * cal-util/cal-recur.c (CAL_OBJ_DEBUG): turn off debug functions.
-
- * gui/dialogs/comp-editor-util.c (parse_contact_string): handle UTF8
- correctly. Bug #4450. Good enough for 1.0.
-
- * gui/e-week-view-event-item.c (e_week_view_draw_time): set the gc
- color before drawing. Should fix bug #11469.
-
- * gui/dialogs/task-editor.c (task_editor_edit_comp): show or hide the
- meeting page as appropriate. Note this may be called more than once,
- if the task gets updated somewhere else and the user clicks 'Update
- the object'. Hopefully fixes bug #12930.
-
- * gui/print.c (print_comp_item): printed more fields and made a little
- prettier. Fixes bug #9352.
- (print_date_label): used the correct timezones for each date field.
-
- * *.c: removed several debug messages.
-
-2001-10-26 JP Rosevear <jpr@ximian.com>
-
- * conduits/calendar/calendar-conduit.c (check_for_slow_setting):
- make debug output more accurate
-
- * conduits/todo/todo-conduit.c (check_for_slow_setting): ditto
-
-2001-10-26 JP Rosevear <jpr@ximian.com>
-
- * conduits/todo/todo-conduit.c (pre_sync): remove the uid from the
- map if was archived and is now deleted
-
- * conduits/calendar/calendar-conduit.c: ditto
-
-2001-10-26 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-calendar_table.c (delete_selected_components):
- (selection_received): added status bar messages
-
- * gui/e-day-view.c (e_day_view_cut_clipboard):
- (selection_received): likewise
-
- * gui/e-week-view.c (e_week_view_cut_clipboard):
- (selection_received): likewise
-
-2001-10-26 JP Rosevear <jpr@ximian.com>
-
- * conduits/calendar/calendar-conduit.h: modify fields
-
- * conduits/todo/todo-conduit.h: as above
-
- * conduits/calendar/calendar-conduit.c (print_remote): free the
- struct after use
- (e_calendar_context_new): explicitly init context fields
- (e_calendar_context_destroy): free local records and properly free
- changed hash elements
- (start_calendar_server_cb): tidy
- (start_calendar_server): ditto
- (free_local): free a local record
- (local_record_to_pilot_record): use a static buffer to avoid leaks
- (local_record_from_comp): only copy over alarm stuff from the
- original record, we sync everything else
- (local_record_from_uid): unref the comp when we are done
- (pre_sync): free change_id
- (post_sync): ditto
- (for_each): track locals
- (for_each_modified): ditto
- (free_match): use free_local
-
- * conduits/todo/todo-conduit.c: as above
-
-2001-10-26 Federico Mena Quintero <federico@ximian.com>
-
- * pcs/cal.c (cal_construct): Get a fresh CORBA_Environment for
- every CORBA call. Hopefully will fix #11978, but I'm not sure
- about what else could be happening.
- (cal_get_password): Free the exception.
-
-2001-10-25 Damon Chaplin <damon@ximian.com>
-
- * gui/e-itip-control.c: used functions to get PUBLISH_OPTIONS etc.,
- so we can translate them.
-
-2001-10-25 Damon Chaplin <damon@ximian.com>
-
- * cal-util/cal-recur.c (cal_obj_bysetpos_filter): subtract 1 from
- any positive BYSETPOS value, since our array is 0-based.
-
- * gui/dialogs/recurrence-page.c (simple_recur_to_comp):
- (recurrence_page_fill_widgets): Outlook (2000) will not accept monthly
- recurrences like BYDAY=2TU. Instead it uses BYDAY=TU;BYSETPOS=2.
- So to be compatable with it we now do the same, although we still
- accept and convert the old format.
-
- * cal-client/cal-client.c (cal_client_get_component_as_string): new
- function to return a complete VCALENDAR string containing a VEVENT
- or VTODO with all the VTIMEZONEs it uses.
-
- * gui/dialogs/comp-editor.c (save_as_ok): use above function so we
- save the VTIMEZONE data with the VEVENT/VTODO. Fixes bug #8626.
- Also made sure we output "METHOD:PUBLISH" since Outlook (2000) will
- not import it otherwise.
-
- * gui/dialogs/comp-editor.c (page_mapped_cb):
- (page_unmapped_cb): install/uninstall the GtkAccelGroup for the page.
- (comp_editor_append_page): connect to the map/unmap signals to
- install/uninstall the accelerators. (This is all for bug #11609,
- though of course it doesn't work too well in GTK+ 1.2 anyway.)
-
- * gui/dialogs/task-page.c (get_widgets):
- * gui/dialogs/task-details-page.c (get_widgets):
- * gui/dialogs/schedule-page.c (get_widgets):
- * gui/dialogs/recurrence-page.c (get_widgets):
- * gui/dialogs/meeting-page.c (get_widgets):
- * gui/dialogs/event-page.c (get_widgets):
- * gui/dialogs/alarm-page.c (get_widgets): got the GtkAccelGroup from
- the original window, ref'ed it and placed it in the CompEditorPage
- struct.
-
- * gui/dialogs/comp-editor-page.c (comp_editor_page_destroy): unref
- any GtkAccelGroup for the page.
-
- * gui/dialogs/task-page.glade: changed '_Confidential' to
- 'Con_fidential' as it clashed with '_Contacts'. It now matches the
- event editor as well.
-
- * gui/dialogs/event-page.glade:
- * gui/dialogs/task-page.glade: Set CAN_FOCUS to TRUE for the custom
- EDateEdit widgets, and set them as the accel targets of the labels.
-
-2001-10-25 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/dialogs/comp-editor.c (save_comp): show an error message when
- we can't update the object on the calendar server
-
-2001-10-25 Federico Mena Quintero <federico@ximian.com>
-
- * gui/control-factory.c: Ifdef-ed out the PersistFile bits.
-
- * gui/GNOME_Evolution_Calendar.oaf.in: The tasks folder does not
- support the PersistFile interface; removed it. Removed it as well
- from the calendar folder since it is aggregated but not actually
- implemented.
-
-2001-10-25 Federico Mena Quintero <federico@ximian.com>
-
- * gui/component-factory.c (xfer_folder): Handle tasks folders as
- well; was always using "calendar.ics" as the filename.
-
-2001-10-24 Damon Chaplin <damon@ximian.com>
-
- * gui/GNOME_Evolution_Calendar.oaf.in: added sections for Tasks
- factory and control. I hope someone checks these!
-
-2001-10-24 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component-factory.c (xfer_folder): Fixed to only copy the
- `calendar.ics' and `calendar.ics~' files.
-
-2001-10-24 Damon Chaplin <damon@ximian.com>
-
- * pcs/cal-backend-file.c (cal_backend_file_update_objects): when
- iterating over the subcomponents, use 'subcomp' rather than 'icalcomp'.
- That meant it wasn't working at all well when an entire VCALENDAR
- was passed in.
-
- * cal-util/cal-component.c: handle DURATION property used instead of
- DTEND or DUE. In cal_component_get_dtend/due we will return DTSTART
- + DURATION if necessary. In set_dtend/due we remove any DURATION
- property. Fixes bug #11262.
-
- * gui/e-meeting-model.c (build_etable):
- * gui/e-calendar-table.c (e_calendar_table_init): use U_ for the
- ECellCombo popdown strings, as it expects UTF-8 strings.
-
-2001-10-24 JP Rosevear <jpr@ximian.com>
-
- * gui/e-meeting-time-sel.c (e_meeting_time_selector_construct):
- track the spacer vbox
- (e_meeting_time_selector_style_set): make sure the rows are the
- correct size for the style
-
- * gui/e-meeting-time-sel-item.c
- (e_meeting_time_selector_item_paint_day_top): slight adjustments
- to where the text is drawn
-
- * gui/e-meeting-time-sel.h: new member
-
- * gui/e-meeting-model.c (build_etable): ensure uniform row height
-
- * conduits/todo/todo-conduit.c (comp_from_remote_record): mark
- status as completed in appropriate places and don't overwrite
- legitimate percentages and such
-
-2001-10-24 Federico Mena Quintero <federico@ximian.com>
-
- Fixes bug #5282.
-
- * cal-util/timeutil.c (icaltimetype_to_tm_with_zone): New function
- to avoid copying the same code all over the place.
- (icaltimetype_to_tm): Also set the tm.tm_wday.
-
- * gui/alarm-notify/alarm-queue.c (queue_midnight_refresh): Use
- time_day_end_with_zone().
- (load_alarms_for_today): Likewise. And oops, we were only
- computing the times and not loading the alarms.
- (obj_updated_cb): Likewise.
- (load_alarms): Removed assertion that is no longer valid because
- we may load the alarms for a client in two stages.
-
- * gui/dialogs/alarm-page.c (get_alarm_string): Convert absolute
- trigger times to the local timezone.
-
- * gui/alarm-notify/alarm-notify-dialog.c (write_html_heading):
- Convert the times to the local timezone.
- (alarm_notify_dialog): Likewise, for the window title.
- (alarm_notify_dialog): Set the window layer to WIN_LAYER_ONTOP.
-
- * gui/e-cell-date-edit-text.c (ecd_get_text): Use
- icaltimetype_to_tm_with_zone().
-
- * gui/alarm-notify/save.c (get_config_db): Made public.
- (discard_config_db): Made public.
-
- * gui/alarm-notify/config-data.[ch]: New files with functions to
- fetch the calendar configuration data used by the alarm daemon.
-
-2001-10-23 Damon Chaplin <damon@ximian.com>
-
- * cal-util/cal-component.c (cal_component_event_dates_match): make sure
- we free all the CalComponentDateTime's when we are finished.
-
- * gui/gnome-cal.c (gnome_calendar_notify_dates_shown_changed): just
- return if no time range is set.
-
-2001-10-23 JP Rosevear <jpr@ximian.com>
-
- * gui/e-meeting-time-sel.c
- (e_meeting_time_selector_table_vadjustment_changed): adjust the
- display canvas when the table scrolls
- (e_meeting_time_selector_construct): listen for table scrolling
-
-2001-10-23 JP Rosevear <jpr@ximian.com>
-
- * gui/e-meeting-model.c (build_etable): no longer set the
- scrollbar policy here
-
- * gui/e-meeting-time-sel.c
- (e_meeting_time_selector_update_main_canvas_scroll_region): add an
- extra row to the height so the click to add row can be properly
- seen
- (e_meeting_time_selector_construct): set the scrollbar policy for
- the etable scrolled
-
-2001-10-23 JP Rosevear <jpr@ximian.com>
-
- * cal-util/timeutil.c (icaltimetype_to_tm): convert an
- icaltimetype to a tm
- (tm_to_icaltimetype): vice versa
-
- * cal-util/timeutil.h: new protos
-
- * conduits/calendar/calendar-conduit.c: replace all mktime and
- localtime calls (except for debugging calls)
-
- * conduits/todo/todo-conduit.c: ditto
- (comp_from_remote_record): make sure the completed time is in UTC
-
-2001-10-23 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-client/cal-query.c (cal_query_construct) set priv->corba_query
- to CORBA_OBJECT_NIL if there was an error
-
-2001-10-22 Damon Chaplin <damon@ximian.com>
-
- * idl/evolution-calendar.idl: added setDefaultTimezone() method.
-
- * pcs/cal-backend.c (cal_backend_get_default_timezone):
- (cal_backend_set_default_timezone): new functions to call class
- methods.
-
- * pcs/cal-backend-file.c: lots of changes to handle the default
- timezone and use it.
-
- * pcs/query.c: use the default timezone.
-
- * gui/dialogs/task-details-page.c (date_changed_cb): initialized
- completed_tt.
-
- * gui/dialogs/event-page.c: changed it to handle DATE values. The
- 'All Day Event' checkbox is only set now when the DTSTART and DTEND
- are DATE values.
-
- * gui/dialogs/comp-editor-util.c (comp_editor_free_dates): free the
- CalComponentDateTime structs as well.
-
- * gui/e-tasks.c: set the default timezone on the server.
-
- * gui/tag-calendar.c:
- * gui/gnome-cal.c:
- * gui/e-week-view.c:
- * gui/e-day-view.c: updates to handle DATE values.
-
- * gui/e-calendar-table.c (date_compare_cb): updated to use the new
- ECellDateEditValue values, so it now works.
- (percent_compare_cb): updated to use GPOINTER_TO_INT values.
- (e_calendar_table_init): use an ECellPercent for the percent field
- and an ECellDateEditText for the date fields.
-
- * gui/comp-util.c (cal_comp_util_compare_event_timezones): return TRUE
- if the DTSTART or DTEND is a DATE value. We don't want to show the
- timezone icons for DATE values.
-
- * gui/comp-editor-factory.c (resolve_pending_requests): set the default
- timezone on the server.
-
- * gui/calendar-model.c: major changes to support sorting properly.
- For date and percent fields we now use subclasses of ECellText, so
- we don't use a char* as the model value. For the percent field we now
- use a GINT_TO_POINTER. For the date fields we now use a
- ECellDateEditValue* as the value.
-
- * gui/calendar-config.c (calendar_config_configure_e_cell_date_edit):
- set the timezone and use_24_hour flags of the new ECellDateEditText.
-
- * conduits/todo/todo-conduit.c (pre_sync):
- * conduits/calendar/calendar-conduit.c (pre_sync): set the default
- timezone on the server.
-
- * cal-util/timeutil.c (time_days_in_month): removed debug message.
-
- * cal-util/test-recur.c: try to handle timezones in the iCalendar
- file properly, and updated to pass default timezone.
-
- * cal-util/cal-util.c (cal_util_generate_alarms_for_comp):
- (cal_util_generate_alarms_for_list): added default timezone argument.
-
- * cal-util/cal-recur.c: changed many of the functions to take a default
- timezone, to use to resolve DATE and floating DATE-TIME values.
-
- * cal-client/cal-client.c (cal_client_set_default_timezone): new
- function to set the default timezone.
- (cal_client_ensure_timezone_on_server): new function to ensure that
- a given timezone is on the server.
-
- * gui/e-cell-date-edit-text.c: new subclass of ECellText to display
- and edit a date value.
-
- * cal-util/cal-recur.c (cal_obj_byday_expand_monthly): changed week_num
- to -week_num when calculating the weeks to go back from the end of the
- month for things like BYDAY=-2WE. Fixes bug #11525.
- (cal_recur_generate_instances_of_rule): only go up to MAX_YEAR (2037).
- We can't really handle anything past that anyway.
- (cal_recur_ensure_rule_end_date): initialize cb_date.end_date to 0,
- so if the RULE doesn't generate COUNT instances we save 0 as the
- time_t.
-
-2001-10-22 Federico Mena Quintero <federico@ximian.com>
-
- * gui/tasks-control-factory.c (tasks_control_factory_fn): Put up a
- warning dialog box if we failed to create the tasks control.
- Fixes bug #13033.
-
-2001-10-22 JP Rosevear <jpr@ximian.com>
-
- * gui/e-itip-control.c (set_date_label): write out the correct
- time in the control
-
- * pcs/cal.c (build_fb_seq): utility function to build sequences of
- f/b data
- (impl_Cal_get_free_busy): use above so we never return a NULL
-
- * conduits/calendar/calendar-conduit-config.h
- (calconduit_save_configuration): fix c/p error
- (calconduit_load_configuration): ditto
-
-2001-10-22 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/meeting-page.c (meeting_page_destroy): we don't need
- to save the state
-
- * gui/e-meeting-time-sel.c (e_meeting_time_selector_destroy):
- ditto
-
- * gui/e-meeting-model.c (build_etable): listen for the etable
- being destroyed
- (table_destroy_cb): save the state when the etable is destroyed
-
-2001-10-21 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/schedule-page.c (init_widgets): listen for changes
- in the date editors
- (schedule_page_set_dates): update the times when they change
- elsewhere
- (update_time): set the time in the dialog
- (time_changed_cb): notify of changed times
-
- * gui/dialogs/comp-editor.c (page_dates_changed_cb): don't call
- the set dates function on the page that noted the change
- (page_summary_changed_cb): same for set summary function
-
- * gui/dialogs/event-page.c (update_time): move time setting stuff
- to util function
- (event_page_set_dates): use it
- (event_page_fill_component): ditto
-
- * gui/e-meeting-time-sel.h: fix comment
-
-2001-10-19 Federico Mena Quintero <federico@ximian.com>
-
- * gui/alarm-notify/alarm-notify.c (add_uri_to_load): Do not assert
- if we fail to load the URI list. This would of course have been a
- bonobo-conf activation problem.
- (remove_uri_to_load): Likewise.
-
- * gui/alarm-notify/notify-main.c (load_calendars): Likewise.
-
- * gui/alarm-notify/alarm-queue.c (load_missed_alarms): Make the
- time range half-open so that we do not display the last alarm
- twice.
-
-2001-10-19 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/calendar-model.c (calendar_model_set_status_message): make
- it a public function
-
- * gui/e-tasks.c (e_tasks_open): display progress messages
- (cal_opened_cb): clean up status bar messages
-
- * gui/gnome-cal.c (gnome_calendar_open): display progress messages
- (client_cal_opened_cb): clean up status bar messages
-
-2001-10-19 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/calendar-model.c (set_status_message): new function
- (update_query): call set_status_message
- (query_query_done_cb):
- (query_eval_error_cb): clean up status bar messages
- (get_location, set_location): new functions for setting and
- retrieving the location in the calendar model
-
-2001-10-19 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/component-factory.c (owner_set_cb): keep a reference to the
- EvolutionShellClient component
-
- * gui/e-week-view.c (e_week_view_set_status_message): new function
- (update_query): call e_week_view_set_status_message
- (query_query_done_cb):
- (query_eval_error_cb): clean up status bar messages
-
- * gui/e-day-view.c (e_day_view_set_status_message): new function
- (update_query): call e_day_view_set_status_message
- (query_query_done_cb):
- (query_eval_error_cb): clean up status bar messages
-
- * gui/Makefile.am: added EVOLUTION_IMAGESDIR to CFLAGS
-
-2001-10-18 JP Rosevear <jpr@ximian.com>
-
- * gui/e-meeting-time-sel.c
- (e_meeting_time_selector_on_invite_others_button_clicked): call
- the invite others dialog in the model
-
- * gui/e-meeting-attendee.c (e_meeting_attendee_get_atype): pick
- attendee type based on role and cutype
-
- * gui/e-meeting-attendee.h: remove proto
-
- * gui/Makefile.am: compile select names idl
-
- * gui/e-meeting-model.h: new proto
-
- * gui/dialogs/meeting-page.c: remove invite others dialogs bits
- from here
-
- * gui/e-meeting-model.c (e_meeting_model_invite_others_dialog):
- and put them here
-
- * gui/dialogs/Makefile.am: compile corba bits in parent dir
-
- * gui/dialogs/comp-editor-util.h: reflect above in includes
-
- * gui/dialogs/e-delegate-dialog.c: ditto
-
- * gui/dialogs/schedule-page.c: ditto and clean includes
-
-2001-10-18 Larry Ewing <lewing@ximian.com>
-
- * gui/alarm-notify/alarm-notify-dialog.c: add html widget
- (url_requested_cb): add function to load images from file as they
- are requested.
- (write_html_heading): convert to using html.
- (alarm_notify_dialog): convert to use html display.
- (make_html_display): this is the function the custom widget in the
- galde file uses to create the html widget.
-
- * gui/alarm-notify/alarm-notify.glade: add placeholder for the
- custom html widget.
-
- * gui/alarm-notify/Makefile.am: add flags for gtkhtml and gal.
-
-2001-10-18 Federico Mena Quintero <federico@ximian.com>
-
- Adds session management for the alarm daemon. Also makes it store
- a list of calendars to be monitored. Those calendars will all be
- loaded when the alarm daemon starts up.
-
- * idl/evolution-calendar.idl (AlarmNotify): Removed the ::die()
- method. The alarm daemon now handles termination via the session
- manager's commands.
-
- * gui/alarm-notify/notify-main.c (set_session_parameters): New
- function, sets some parameters so that the session manager can
- restart the daemon via the evolution-alarm-client program. Also,
- sets up the "die" signal so that the daemon can terminate when the
- session ends.
- (load_calendars): New function to load the calendars on startup.
- (main): Set the session parameters. Load the calendars on startup.
-
- * gui/alarm-notify/alarm-notify.c (alarm_notify_add_calendar): New
- function, moved over from the impl_ function. Added a
- load_afterwards argument to indicate whether the calendar should
- just be loaded or if it should also be added to the list of
- calendars to load on startup.
- (AlarmNotify_addCalendar): Use alarm_notify_add_calendar().
- (AlarmNotify_removeCalendar): Remove the calendar from the list of
- calendars to load on startup.
-
- * gui/alarm-notify/save.c (save_calendars_to_load): New function,
- saves a sequence of the URIs to load.
- (get_calendars_to_load): New function, loads a sequence of
- calendars to load.
-
- * gui/alarm-notify/alarm.h: Removed stale prototype for alarm_init().
-
- * gui/component-factory.c (remove_folder): Ask the alarm daemon to
- stop monitoring alarms for the folder that is being deleted.
-
-2001-10-18 JP Rosevear <jpr@ximian.com>
-
- * gui/e-meeting-time-sel.c
-
- * gui/e-meeting-time-sel-item.c
- (e_meeting_time_selector_item_paint_day_top): use 12 or 24 hour
- settings
-
- * gui/e-meeting-time-sel.c: strings for 12 hour setting
- (e_meeting_time_selector_construct): increase width slightly
-
- * gui/e-meeting-time-sel.h: extern the new char array
-
-2001-10-18 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-util/cal-component.[ch] (cal_component_get_location):
- (cal_component_set_location): new functions
-
-2001-10-18 JP Rosevear <jpr@ximian.com>
-
- * gui/e-meeting-model.c (process_callbacks): util routine to
- handle calling back
- (async_close): use above
- (e_meeting_model_refresh_busy_periods): ditto
-
-2001-10-17 JP Rosevear <jpr@ximian.com>
-
- * conduits/todo/todo-conduit.c (local_record_from_comp): translate
- 1-5 priorites to 1-9 priorities better
- (comp_from_remote_record): ditto
-
-2001-10-17 JP Rosevear <jpr@ximian.com>
-
- * idl/evolution-calendar.idl: allow some decent exceptions
-
-2001-10-17 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/query.c (match_component): there may be cases when the backend
- will return an invalid component from a valid UID (an UID returned
- by the get_uids method), so don't abort if that's the case
-
-2001-10-15 Damon Chaplin <damon@ximian.com>
-
- * gui/dialogs/cal-prefs-dialog.glade: removed Help button. Do we have
- any others?
-
-2001-10-15 Larry Ewing <lewing@ximian.com>
-
- * gui/dialogs/comp-editor.c (set_icon_from_comp): remove warnings.
-
-2001-10-15 JP Rosevear <jpr@ximian.com>
-
- * conduits/calendar/calendar-conduit.c (process_multi_day):
- function to break up multi day events into single events for both
- evo and the pilot and create new CalClientChange structures
- (pre_sync): call above function, and adjust changed list if
- necessary
-
-2001-10-15 JP Rosevear <jpr@ximian.com>
-
- * conduits/calendar/calendar-conduit.c (is_all_day): util function
- to determine if event is all day
- (local_record_from_comp): use new util function
- (comp_from_remote_record): kill use of deprecated time functions
-
-2001-10-13 Larry Ewing <lewing@ximian.com>
-
- * gui/dialogs/comp-editor.c (real_edit_comp): call
- set_icon_from_comp.
- (set_icon_from_comp): set the window icon from the comp.
- (make_icon_from_comp): get the icon path based on comp type.
-
- * gui/dialogs/Makefile.am (iconsdir): EVOLUTION_ICONSDIR bits.
-
-2001-10-13 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/task-editor.c (task_editor_send_comp): send
- cancellation comp if necessary
-
-2001-10-12 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/alarm-page.c: return fill_component success
-
- * gui/dialogs/task-page.c: ditto
-
- * gui/dialogs/task-details-page.c: ditto
-
- * gui/dialogs/schedule-page.c: ditto
-
- * gui/dialogs/recurrence-page.c: ditto
-
- * gui/dialogs/event-page.c: ditto
-
- * gui/dialogs/meeting-page.c: use e_notice instead of
- duplicate_error
- (meeting_page_get_cancel_comp): duh, deleted_attendees is an array
- now
- (meeting_page_fill_component): spew gui errors if there is no
- organizer or no attendees, return success
-
- * gui/dialogs/event-editor.c (event_editor_send_comp): always call
- parent method and don't send the cancellation comp if the method
- is publish
- (refresh_meeting_cmd): use the orginal comp to refresh
- (forward_cmd): prompt the user for the version they want to send
- (current, original)
-
- * gui/dialogs/task-editor.c (forward_cmd): as above
- (refresh_task_cmd): ditto
-
- * gui/dialogs/comp-editor-page.c
- (comp_editor_page_fill_component): return boolean of whether the
- component could be filled or not
-
- * gui/dialogs/comp-editor-page.h: update proto
-
- * gui/dialogs/comp-editor.c (prompt_to_save_changes): take a param
- on whether to try and send or not
- (comp_editor_get_current_comp): only fill component if its changed
- (comp_editor_save_comp): prompt user as well
-
- * gui/dialogs/comp-editor.h: change proto
-
- * gui/itip-utils.c: replace error_dialog with e_notice
- (comp_content_type): specify charset
-
-2001-10-11 Larry Ewing <lewing@ximian.com>
-
- * gui/e-itip-control.c: large reworking of i18n tagging and now
- uses gtk_html_stream write and U_ where appropriate. More to
- come.
-
-2001-10-10 Larry Ewing <lewing@ximian.com>
-
- * gui/e-itip-control.c (init): set the default character set to
- utf-8.
-
-2001-10-10 Federico Mena Quintero <federico@ximian.com>
-
- * pcs/cal-factory.c (lookup_backend): Return the original key in
- the hash table if requested.
- (backend_last_client_gone_cb): Use lookup_backend() so that we
- have the URI mangling done for us.
- (impl_CalFactory_open): The type should be GtkType *, not GtkType!
-
-2001-10-10 JP Rosevear <jpr@ximian.com>
-
- * cal-client/cal-client.c (cal_set_mode_cb): remove unneeded
- assertions
-
-2001-10-10 JP Rosevear <jpr@ximian.com>
-
- * pcs/cal-factory.c (add_uri): fix logic checks
-
- * gui/dialogs/event-editor.c (event_editor_init): init the
- exisiting_org boolean
- (set_menu_sens): base sensitivity on existing_org boolean
- (event_editor_edit_comp): set exisiting_org boolean
-
- * gui/dialogs/task-editor.c: same as above
-
- * gui/calendar-offline-handler.c (add_connection): handle the
- protocol or host being unknown
-
- * cal-util/cal-component.c (cal_component_has_organizer):
- implement
-
-2001-10-09 Federico Mena Quintero <federico@ximian.com>
-
- Fixes bug #884.
-
- * gui/alarm-notify/save.[ch]: New files with functions to
- save/load the last notification time.
-
- * gui/alarm-notify/alarm-queue.c (alarm_trigger_cb): Save the last
- notification time.
- (alarm_queue_init): Load the last notification time when the
- daemon is inited.
- (alarm_queue_add_client): Load the alarms that we missed while the
- alarm daemon was not running.
- (cal_opened_cb): Likewise.
-
- * gui/alarm-notify/Makefile.am (evolution_alarm_notify_SOURCES):
- Added save.[ch] to the list of sources.
-
-2001-10-09 JP Rosevear <jpr@ximian.com>
-
- * gui/itip-utils.c (get_address): util function to get address
- (itip_addresses_get_default): get only the default address
- (itip_address_free): free single address
- (itip_addresses_free): use above
- (comp_limit_attendees): limit the number of attendees to one, the
- user
- (comp_sentby): set the sentby parameter if the user is not the
- organizer
- (comp_minimal): remove extraneous info for send (for refresh and
- declinecounter)
- (comp_compliant): remove all alarms, do various things to make the
- components comply with itip spec based on method
- (itip_send_comp): use comp_compliant method
-
- * gui/itip-utils.h: new protos
-
- * gui/e-itip-control.c: rescan the component when necessary
- (get_next): don't get stuck in infinite loop if there are no
- viewable components
- (e_itip_control_set_data): if there are no viewable components,
- spit an error message
-
- * gui/dialogs/meeting-page.h: tidy
-
- * gui/dialogs/meeting-page.c (meeting_page_fill_widgets): use
- organizer's cn if possible
- (other_clicked_cb): no longer doing the sent by stuff directly,
- hide more widgets
-
- * pcs/query.c: use bonobo exception stuff
-
- * cal-util/cal-component.c (cal_component_rescan): have the comp
- rescan its libical component (for when you change things directly)
- (free_icalcomponent): take a param on whether to free the
- component or just clean up the mappings
- (cal_component_has_attendees): util function
-
- * cal-util/cal-component.h: new protos
-
-2001-10-09 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/cal-factory.c (lookup_backend, add_backend): deal correctly with
- URIs to be inserted into the hash table, so that we don't add the same
- backend over and over because the URI strings were different (although
- refering to the same backend)
-
- * pcs/cal-backend-file.c (mail_account_*): moved to a common place
- (cal_backend_file_open): check if "uristr != NULL" and not
- "uri != NULL"
-
- * pcs/cal-backend-util.c: moved to here
-
- * gui/e-day-view.c: add missing header file
-
-2001-10-09 Dan Winship <danw@ximian.com>
-
- * gui/e-meeting-model.c (process_free_busy_comp): Fix incorrect
- variable name check.
-
-2001-10-03 JP Rosevear <jpr@ximian.com>
-
- * gui/itip-utils.c (itip_send_comp): refactor functionality into
- several function
- (comp_string): if we are publishing, empty the attendee list
-
- * gui/dialogs/event-editor.c (schedule_meeting_cmd): when we
- schedule a new meeting, mark the event editor as changed
-
- * pcs/cal.c (cal_class_init): get correct parent class
-
- * gui/dialogs/comp-editor.c (comp_editor_merge_ui): use the
- generated ui component name
-
-2001-10-03 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/component-factory.c:
- * gui/calendar-offline-handler.c:
- * gui/comp-editor-factory.c: replace use of gnome_vfs_uri with e_uri
-
- * gui/e-meeting-model.c (start_addressbook_server): make it return void,
- since the return value does not mind
-
- * pcs/cal.c:
- * pcs/cal-factory.c:
- * pcs/cal-backend.[ch]: don't use GnomeVFS for URI management
-
- * pcs/cal-backend-file.c: ditto, only use GnomeVFS for internal
- operations
-
- * cal-client/cal-client.c (cal_client_open_calendar): don't CORBA_exception_free
- before checking for exceptions
-
-2001-10-03 Christopher James Lahey <clahey@ximian.com>
-
- * gui/e-calendar-table.etspec: Added priorities to a bunch of
- these columns. Fixes Ximian bug #7158.
-
-2001-10-03 Damon Chaplin <damon@ximian.com>
-
- * gui/comp-util.c (cal_comp_util_add_exdate): save the EXDATE as a
- DATE-TIME value, since we know the exact time. Fixes bug #11278.
- (Before we were setting is_date, but icaltime_from_timet_with_zone()
- didn't convert it properly. We need to figure out how to handle DATEs
- when using time_t's.)
-
- * gui/dialogs/recurrence-page.c (get_exception_string): use
- e_time_format_date_and_time() so we show the time as well, if the
- exception is a DATE-TIME value.
-
- * cal-util/timeutil.c: removed time_add_month(), time_year_begin(),
- time_month_begin() & time_week_begin() - old pre-timezone functions
- which we no longer use.
-
- * cal-util/cal-recur.c (cal_recur_from_icalproperty): set
- ir.until.is_date to FALSE before converting to a time_t.
- Hopefully fixes bug #5034.
-
-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 76851cc008..0000000000
--- a/calendar/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-if ENABLE_PILOT_CONDUITS
-CONDUIT_DIR = conduits
-else
-CONDUIT_DIR =
-endif
-
-SUBDIRS = idl gui importers $(CONDUIT_DIR)
-
-EXTRA_DIST = \
- ChangeLog.pre-1-4 \
- zones.h
-
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 7bf53a7aed..0000000000
--- a/calendar/conduits/calendar/Makefile.am
+++ /dev/null
@@ -1,34 +0,0 @@
-INCLUDES = \
- -I$(top_srcdir)/e-util \
- -I$(top_builddir)/e-util \
- $(EVOLUTION_CALENDAR_CONDUIT_CFLAGS)
-
-# Calendar Conduit
-privconduit_LTLIBRARIES = libecalendar_conduit.la
-
-libecalendar_conduit_la_SOURCES = \
- calendar-conduit.c
-
-libecalendar_conduit_la_LDFLAGS = -module -avoid-version
-libecalendar_conduit_la_LIBADD = \
- $(top_builddir)/e-util/libeutil.la \
- $(top_builddir)/e-util/libeconduit.la \
- $(EVOLUTION_CALENDAR_CONDUIT_LIBS)
-
-e-calendar-$(BASE_VERSION).conduit: e-calendar.conduit.in
- sed -e 's^\@privconduitdir\@^$(privconduitdir)^g' \
- -e 's^\@datadir\@^$(datadir)^g' \
- -e 's^\@BASE_VERSION\@^$(BASE_VERSION)^g' \
- $< > $@
-
-conduitdir = $(datadir)/gnome-pilot/conduits/
-conduit_DATA = e-calendar-$(BASE_VERSION).conduit
-
-BUILT_SOURCES = $(conduit_DATA)
-CLEANFILES = $(BUILT_SOURCES)
-
-EXTRA_DIST = \
- e-calendar.conduit.in
-
-dist-hook:
- cd $(distdir); rm -f $(BUILT_SOURCES) \ No newline at end of file
diff --git a/calendar/conduits/calendar/calendar-conduit.c b/calendar/conduits/calendar/calendar-conduit.c
deleted file mode 100644
index 47b3755ea5..0000000000
--- a/calendar/conduits/calendar/calendar-conduit.c
+++ /dev/null
@@ -1,1908 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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>
-
-#define G_LOG_DOMAIN "ecalconduit"
-
-#include <libecal/e-cal-types.h>
-#include <libecal/e-cal.h>
-#include <libecal/e-cal-time-util.h>
-#include <pi-source.h>
-#include <pi-socket.h>
-#include <pi-dlp.h>
-#include <pi-datebook.h>
-#include <gpilotd/gnome-pilot-conduit.h>
-#include <gpilotd/gnome-pilot-conduit-sync-abs.h>
-#include <libgpilotdCM/gnome-pilot-conduit-management.h>
-#include <libgpilotdCM/gnome-pilot-conduit-config.h>
-#include <e-pilot-map.h>
-#include <e-pilot-settings.h>
-#include <e-pilot-util.h>
-#include <e-config-listener.h>
-
-GnomePilotConduit * conduit_get_gpilot_conduit (guint32);
-void conduit_destroy_gpilot_conduit (GnomePilotConduit*);
-
-#define CONDUIT_VERSION "0.1.6"
-
-#define DEBUG_CALCONDUIT 1
-/* #undef DEBUG_CALCONDUIT */
-
-#ifdef DEBUG_CALCONDUIT
-#define LOG(x) x
-#else
-#define LOG(x)
-#endif
-
-#define WARN g_warning
-#define INFO g_message
-
-#define PILOT_MAX_ADVANCE 99
-
-typedef struct _ECalLocalRecord ECalLocalRecord;
-typedef struct _ECalConduitCfg ECalConduitCfg;
-typedef struct _ECalConduitGui ECalConduitGui;
-typedef struct _ECalConduitContext ECalConduitContext;
-
-/* Local Record */
-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 */
- ECalComponent *comp;
-
- /* pilot-link appointment structure */
- struct Appointment *appt;
-};
-
-static void
-calconduit_destroy_record (ECalLocalRecord *local)
-{
- g_object_unref (local->comp);
- free_Appointment (local->appt);
- g_free (local->appt);
- g_free (local);
-}
-
-/* Configuration */
-struct _ECalConduitCfg {
- guint32 pilot_id;
- GnomePilotConduitSyncType sync_type;
-
- gboolean secret;
- gboolean multi_day_split;
-
- gchar *last_uri;
-};
-
-static ECalConduitCfg *
-calconduit_load_configuration (guint32 pilot_id)
-{
- ECalConduitCfg *c;
- GnomePilotConduitManagement *management;
- GnomePilotConduitConfig *config;
- gchar prefix[256];
-
- c = g_new0 (ECalConduitCfg, 1);
- g_assert (c != NULL);
-
- /* Pilot ID */
- c->pilot_id = pilot_id;
-
- /* Sync Type */
- management = gnome_pilot_conduit_management_new ("e_calendar_conduit", GNOME_PILOT_CONDUIT_MGMT_ID);
- gtk_object_ref (GTK_OBJECT (management));
- gtk_object_sink (GTK_OBJECT (management));
- config = gnome_pilot_conduit_config_new (management, pilot_id);
- gtk_object_ref (GTK_OBJECT (config));
- gtk_object_sink (GTK_OBJECT (config));
- if (!gnome_pilot_conduit_config_is_enabled (config, &c->sync_type))
- c->sync_type = GnomePilotConduitSyncTypeNotSet;
- gtk_object_unref (GTK_OBJECT (config));
- gtk_object_unref (GTK_OBJECT (management));
-
- /* Custom settings */
- g_snprintf (prefix, 255, "/gnome-pilot.d/e-calendar-conduit/Pilot_%u/", pilot_id);
- gnome_config_push_prefix (prefix);
-
- c->secret = gnome_config_get_bool ("secret=FALSE");
- c->multi_day_split = gnome_config_get_bool ("multi_day_split=TRUE");
- c->last_uri = gnome_config_get_string ("last_uri");
-
- gnome_config_pop_prefix ();
-
- return c;
-}
-
-static void
-calconduit_save_configuration (ECalConduitCfg *c)
-{
- gchar prefix[256];
-
- g_snprintf (prefix, 255, "/gnome-pilot.d/e-calendar-conduit/Pilot_%u/", c->pilot_id);
- gnome_config_push_prefix (prefix);
-
- gnome_config_set_bool ("secret", c->secret);
- gnome_config_set_bool ("multi_day_split", c->multi_day_split);
- gnome_config_set_string ("last_uri", c->last_uri);
-
- gnome_config_pop_prefix ();
-
- gnome_config_sync ();
- gnome_config_drop_all ();
-}
-
-static ECalConduitCfg*
-calconduit_dupe_configuration (ECalConduitCfg *c)
-{
- ECalConduitCfg *retval;
-
- g_return_val_if_fail (c != NULL, NULL);
-
- retval = g_new0 (ECalConduitCfg, 1);
- retval->pilot_id = c->pilot_id;
- retval->sync_type = c->sync_type;
- retval->secret = c->secret;
- retval->multi_day_split = c->multi_day_split;
- retval->last_uri = g_strdup (c->last_uri);
-
- return retval;
-}
-
-static void
-calconduit_destroy_configuration (ECalConduitCfg *c)
-{
- g_return_if_fail (c != NULL);
-
- g_free (c->last_uri);
- g_free (c);
-}
-
-/* Gui */
-struct _ECalConduitGui {
- GtkWidget *multi_day_split;
-};
-
-static ECalConduitGui *
-e_cal_gui_new (EPilotSettings *ps)
-{
- ECalConduitGui *gui;
- GtkWidget *lbl;
- gint rows;
-
- g_return_val_if_fail (ps != NULL, NULL);
- g_return_val_if_fail (E_IS_PILOT_SETTINGS (ps), NULL);
-
- gtk_table_resize (GTK_TABLE (ps), E_PILOT_SETTINGS_TABLE_ROWS + 1, E_PILOT_SETTINGS_TABLE_COLS);
-
- gui = g_new0 (ECalConduitGui, 1);
-
- rows = E_PILOT_SETTINGS_TABLE_ROWS;
- lbl = gtk_label_new (_("Split Multi-Day Events:"));
- gui->multi_day_split = gtk_check_button_new ();
- gtk_table_attach_defaults (GTK_TABLE (ps), lbl, 0, 1, rows, rows + 1);
- gtk_table_attach_defaults (GTK_TABLE (ps), gui->multi_day_split, 1, 2, rows, rows + 1);
- gtk_widget_show (lbl);
- gtk_widget_show (gui->multi_day_split);
-
- return gui;
-}
-
-static void
-e_cal_gui_fill_widgets (ECalConduitGui *gui, ECalConduitCfg *cfg)
-{
- g_return_if_fail (gui != NULL);
- g_return_if_fail (cfg != NULL);
-
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gui->multi_day_split),
- cfg->multi_day_split);
-}
-
-static void
-e_cal_gui_fill_config (ECalConduitGui *gui, ECalConduitCfg *cfg)
-{
- g_return_if_fail (gui != NULL);
- g_return_if_fail (cfg != NULL);
-
- cfg->multi_day_split = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gui->multi_day_split));
-}
-
-static void
-e_cal_gui_destroy (ECalConduitGui *gui)
-{
- g_free (gui);
-}
-
-/* Context */
-struct _ECalConduitContext {
- GnomePilotDBInfo *dbi;
-
- ECalConduitCfg *cfg;
- ECalConduitCfg *new_cfg;
- ECalConduitGui *gui;
- GtkWidget *ps;
-
- struct AppointmentAppInfo ai;
-
- ECal *client;
-
- icaltimezone *timezone;
- ECalComponent *default_comp;
- GList *comps;
- GList *changed;
- GHashTable *changed_hash;
- GList *locals;
-
- EPilotMap *map;
-};
-
-static ECalConduitContext *
-e_calendar_context_new (guint32 pilot_id)
-{
- ECalConduitContext *ctxt;
-
- ctxt = g_new0 (ECalConduitContext, 1);
- g_assert (ctxt != NULL);
-
- ctxt->cfg = calconduit_load_configuration (pilot_id);
- ctxt->new_cfg = calconduit_dupe_configuration (ctxt->cfg);
- ctxt->ps = NULL;
- ctxt->dbi = NULL;
- ctxt->client = NULL;
- ctxt->timezone = NULL;
- ctxt->default_comp = NULL;
- ctxt->comps = NULL;
- ctxt->changed = NULL;
- ctxt->changed_hash = NULL;
- ctxt->locals = NULL;
- ctxt->map = NULL;
-
- return ctxt;
-}
-
-static gboolean
-e_calendar_context_foreach_change (gpointer key, gpointer value, gpointer data)
-{
- g_free (key);
-
- return TRUE;
-}
-
-static void
-e_calendar_context_destroy (ECalConduitContext *ctxt)
-{
- GList *l;
-
- g_return_if_fail (ctxt != NULL);
-
- if (ctxt->cfg != NULL)
- calconduit_destroy_configuration (ctxt->cfg);
- if (ctxt->new_cfg != NULL)
- calconduit_destroy_configuration (ctxt->new_cfg);
- if (ctxt->gui != NULL)
- e_cal_gui_destroy (ctxt->gui);
-
- if (ctxt->client != NULL)
- g_object_unref (ctxt->client);
- if (ctxt->default_comp != NULL)
- g_object_unref (ctxt->default_comp);
- if (ctxt->comps != NULL) {
- for (l = ctxt->comps; l; l = l->next)
- g_object_unref (l->data);
- g_list_free (ctxt->comps);
- }
-
- if (ctxt->changed != NULL)
- e_cal_free_change_list (ctxt->changed);
-
- if (ctxt->changed_hash != NULL) {
- g_hash_table_foreach_remove (ctxt->changed_hash, e_calendar_context_foreach_change, NULL);
- g_hash_table_destroy (ctxt->changed_hash);
- }
-
- if (ctxt->locals != NULL) {
- for (l = ctxt->locals; l != NULL; l = l->next)
- calconduit_destroy_record (l->data);
- g_list_free (ctxt->locals);
- }
-
- if (ctxt->map != NULL)
- e_pilot_map_destroy (ctxt->map);
-}
-
-/* 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 : "");
-
- free_Appointment (&appt);
-
- return buff;
-}
-
-static int
-start_calendar_server (ECalConduitContext *ctxt)
-{
- char *uri;
-
- g_return_val_if_fail (ctxt != NULL, -2);
-
- /* FIXME Need a mechanism for the user to select uri's */
- /* FIXME Can we use the cal model? */
- uri = g_strdup_printf ("file://%s/local/Calendar/", g_get_home_dir ());
- ctxt->client = e_cal_new (uri, CALOBJ_TYPE_EVENT);
- g_free (uri);
-
- if (!ctxt->client)
- return -1;
-
- if (!e_cal_open (ctxt->client, FALSE, NULL))
- return -1;
-
- return 0;
-}
-
-/* Utility routines */
-static icaltimezone *
-get_timezone (ECal *client, const char *tzid)
-{
- icaltimezone *timezone = NULL;
-
- timezone = icaltimezone_get_builtin_timezone_from_tzid (tzid);
- if (timezone == NULL)
- e_cal_get_timezone (client, tzid, &timezone, NULL);
-
- return timezone;
-}
-
-static icaltimezone *
-get_default_timezone (void)
-{
- EConfigListener *listener;
- icaltimezone *timezone = NULL;
- char *location;
-
- listener = e_config_listener_new ();
-
- location = e_config_listener_get_string_with_default (listener,
- "/apps/evolution/calendar/display/timezone", "UTC", NULL);
- if (!location || !location[0]) {
- g_free (location);
- location = g_strdup ("UTC");
- }
-
- timezone = icaltimezone_get_builtin_timezone (location);
- g_free (location);
-
- g_object_unref (listener);
-
- 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 gboolean
-is_all_day (ECal *client, ECalComponentDateTime *dt_start, ECalComponentDateTime *dt_end)
-{
- time_t dt_start_time, dt_end_time;
- icaltimezone *timezone;
-
- if (dt_start->value->is_date && dt_end->value->is_date)
- return TRUE;
-
- timezone = get_timezone (client, dt_start->tzid);
- dt_start_time = icaltime_as_timet_with_zone (*dt_start->value, timezone);
- dt_end_time = icaltime_as_timet_with_zone (*dt_end->value, get_timezone (client, dt_end->tzid));
-
- if (dt_end_time == time_add_day_with_zone (dt_start_time, 1, timezone))
- return TRUE;
-
- return FALSE;
-}
-
-static gboolean
-process_multi_day (ECalConduitContext *ctxt, ECalChange *ccc, GList **multi_comp, GList **multi_ccc)
-{
- ECalComponentDateTime dt_start, dt_end;
- icaltimezone *tz_start, *tz_end;
- time_t event_start, event_end, day_end;
- struct icaltimetype *old_start_value, *old_end_value;
- const char *uid;
- gboolean is_date = FALSE;
- gboolean last = FALSE;
- gboolean ret = TRUE;
-
- *multi_ccc = NULL;
- *multi_comp = NULL;
-
- if (ccc->type == E_CAL_CHANGE_DELETED)
- return FALSE;
-
- /* Start time */
- e_cal_component_get_dtstart (ccc->comp, &dt_start);
- if (dt_start.value->is_date)
- tz_start = ctxt->timezone;
- else
- tz_start = get_timezone (ctxt->client, dt_start.tzid);
- event_start = icaltime_as_timet_with_zone (*dt_start.value, tz_start);
-
- e_cal_component_get_dtend (ccc->comp, &dt_end);
- if (dt_end.value->is_date)
- tz_end = ctxt->timezone;
- else
- tz_end = get_timezone (ctxt->client, dt_end.tzid);
- event_end = icaltime_as_timet_with_zone (*dt_end.value, tz_end);
-
- day_end = time_day_end_with_zone (event_start, ctxt->timezone);
- if (day_end >= event_end) {
- ret = FALSE;
- goto cleanup;
- } else if (e_cal_component_has_recurrences (ccc->comp) || !ctxt->cfg->multi_day_split) {
- ret = TRUE;
- goto cleanup;
- }
-
- if (dt_start.value->is_date && dt_end.value->is_date)
- is_date = TRUE;
-
- old_start_value = dt_start.value;
- old_end_value = dt_end.value;
- while (!last) {
- ECalComponent *clone = e_cal_component_clone (ccc->comp);
- char *new_uid = e_cal_component_gen_uid ();
- struct icaltimetype start_value, end_value;
- ECalChange *c = g_new0 (ECalChange, 1);
-
- if (day_end >= event_end) {
- day_end = event_end;
- last = TRUE;
- }
-
- e_cal_component_set_uid (clone, new_uid);
-
- start_value = icaltime_from_timet_with_zone (event_start, is_date, tz_start);
- dt_start.value = &start_value;
- e_cal_component_set_dtstart (clone, &dt_start);
-
- end_value = icaltime_from_timet_with_zone (day_end, is_date, tz_end);
- dt_end.value = &end_value;
- e_cal_component_set_dtend (clone, &dt_end);
-
- /* FIXME Error handling */
- e_cal_create_object (ctxt->client, e_cal_component_get_icalcomponent (clone), NULL, NULL);
-
- c->comp = clone;
- c->type = E_CAL_CHANGE_ADDED;
-
- *multi_ccc = g_list_prepend (*multi_ccc, c);
- *multi_comp = g_list_prepend (*multi_comp, g_object_ref (c->comp));
-
- event_start = day_end;
- day_end = time_day_end_with_zone (event_start, ctxt->timezone);
- }
- dt_start.value = old_start_value;
- dt_end.value = old_end_value;
-
- e_cal_component_get_uid (ccc->comp, &uid);
- /* FIXME Error handling */
- e_cal_remove_object (ctxt->client, uid, NULL);
- ccc->type = E_CAL_CHANGE_DELETED;
-
- cleanup:
- e_cal_component_free_datetime (&dt_start);
- e_cal_component_free_datetime (&dt_end);
-
- return ret;
-}
-
-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)
-{
- ECalChange *ccc;
- GList *l;
-
- for (l = changes; l != NULL; l = l->next) {
- const char *uid;
-
- ccc = l->data;
-
- e_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)
-{
- ECalChange *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 E_CAL_CHANGE_ADDED:
- local->local.attr = GnomePilotRecordNew;
- break;
-
- case E_CAL_CHANGE_MODIFIED:
- local->local.attr = GnomePilotRecordModified;
- break;
-
- case E_CAL_CHANGE_DELETED:
- local->local.attr = GnomePilotRecordDeleted;
- break;
- }
-}
-
-static gboolean
-rrules_mostly_equal (struct icalrecurrencetype *a, struct icalrecurrencetype *b)
-{
- struct icalrecurrencetype acopy, bcopy;
-
- acopy = *a;
- bcopy = *b;
-
- acopy.until = bcopy.until = icaltime_null_time ();
- acopy.count = bcopy.count = 0;
-
- if (!memcmp (&acopy, &bcopy, sizeof (struct icalrecurrencetype)))
- return TRUE;
-
- return FALSE;
-}
-
-static gboolean
-find_last_cb (ECalComponent *comp, time_t start, time_t end, gpointer data)
-{
- time_t *last = data;
-
- *last = start;
-
- return TRUE;
-}
-
-static GnomePilotRecord
-local_record_to_pilot_record (ECalLocalRecord *local,
- ECalConduitContext *ctxt)
-{
- GnomePilotRecord p;
- static char record[0xffff];
-
- 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 = record;
- p.length = pack_Appointment (local->appt, p.record, 0xffff);
-
- return p;
-}
-
-/*
- * converts a ECalComponent object to a ECalLocalRecord
- */
-static void
-local_record_from_comp (ECalLocalRecord *local, ECalComponent *comp, ECalConduitContext *ctxt)
-{
- const char *uid;
- ECalComponentText summary;
- GSList *d_list = NULL, *edl = NULL, *l;
- ECalComponentText *description;
- ECalComponentDateTime dt_start, dt_end;
- ECalComponentClassification classif;
- icaltimezone *default_tz = ctxt->timezone;
- int i;
-
- g_return_if_fail (local != NULL);
- g_return_if_fail (comp != NULL);
-
- local->comp = comp;
- g_object_ref (comp);
-
- e_cal_component_get_uid (local->comp, &uid);
- local->local.ID = e_pilot_map_lookup_pid (ctxt->map, uid, TRUE);
- 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) {
- struct Appointment appt;
- 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;
- memset (&appt, 0, sizeof (struct Appointment));
- unpack_Appointment (&appt, record, 0xffff);
- local->appt->alarm = appt.alarm;
- local->appt->advance = appt.advance;
- local->appt->advanceUnits = appt.advanceUnits;
- free_Appointment (&appt);
- }
- }
-
- /* STOP: don't replace these with g_strdup, since free_Appointment
- uses free to deallocate */
- e_cal_component_get_summary (comp, &summary);
- if (summary.value)
- local->appt->description = e_pilot_utf8_to_pchar (summary.value);
-
- e_cal_component_get_description_list (comp, &d_list);
- if (d_list) {
- description = (ECalComponentText *) 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;
- }
-
- /* Start/End */
- e_cal_component_get_dtstart (comp, &dt_start);
- e_cal_component_get_dtend (comp, &dt_end);
- if (dt_start.value) {
- icaltimezone_convert_time (dt_start.value,
- get_timezone (ctxt->client, dt_start.tzid),
- default_tz);
- local->appt->begin = icaltimetype_to_tm (dt_start.value);
- }
-
- if (dt_start.value && dt_end.value) {
- if (is_all_day (ctxt->client, &dt_start, &dt_end)) {
- local->appt->event = 1;
- } else {
- icaltimezone_convert_time (dt_end.value,
- get_timezone (ctxt->client, dt_end.tzid),
- default_tz);
- local->appt->end = icaltimetype_to_tm (dt_end.value);
- local->appt->event = 0;
- }
- } else {
- local->appt->event = 1;
- }
- e_cal_component_free_datetime (&dt_start);
- e_cal_component_free_datetime (&dt_end);
-
- /* Recurrence Rules */
- local->appt->repeatType = repeatNone;
-
- if (!e_cal_component_is_instance (comp)) {
- if (e_cal_component_has_rrules (comp)) {
- GSList *list;
- struct icalrecurrencetype *recur;
-
- e_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 = 0;
- local->appt->repeatEnd = icaltimetype_to_tm_with_zone (&recur->until,
- icaltimezone_get_utc_timezone (),
- default_tz);
- } else if (recur->count > 0) {
- time_t last = -1;
- struct icaltimetype itt;
-
- /* The palm does not support count recurrences */
- local->appt->repeatForever = 0;
- e_cal_recur_generate_instances (comp, -1, -1, find_last_cb, &last,
- e_cal_resolve_tzid_cb, ctxt->client,
- default_tz);
- itt = icaltime_from_timet_with_zone (last, TRUE, default_tz);
- local->appt->repeatEnd = icaltimetype_to_tm (&itt);
- } else {
- local->appt->repeatForever = 1;
- }
-
- e_cal_component_free_recur_list (list);
- }
-
- /* Exceptions */
- e_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++) {
- ECalComponentDateTime *dt = l->data;
-
- icaltimezone_convert_time (dt->value,
- icaltimezone_get_utc_timezone (),
- default_tz);
- *local->appt->exception = icaltimetype_to_tm (dt->value);
- }
- e_cal_component_free_exdate_list (edl);
- }
-
- /* Alarm */
- local->appt->alarm = 0;
- if (e_cal_component_has_alarms (comp)) {
- GList *uids, *l;
- ECalComponentAlarm *alarm;
- ECalComponentAlarmTrigger trigger;
-
- uids = e_cal_component_get_alarm_uids (comp);
- for (l = uids; l != NULL; l = l->next) {
- alarm = e_cal_component_get_alarm (comp, l->data);
- e_cal_component_alarm_get_trigger (alarm, &trigger);
-
- if ((trigger.type == E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START
- && trigger.u.rel_duration.is_neg)) {
- local->appt->advanceUnits = advMinutes;
- local->appt->advance =
- trigger.u.rel_duration.minutes
- + trigger.u.rel_duration.hours * 60
- + trigger.u.rel_duration.days * 60 * 24
- + trigger.u.rel_duration.weeks * 7 * 60 * 24;
-
- if (local->appt->advance > PILOT_MAX_ADVANCE) {
- local->appt->advanceUnits = advHours;
- local->appt->advance =
- trigger.u.rel_duration.minutes / 60
- + trigger.u.rel_duration.hours
- + trigger.u.rel_duration.days * 24
- + trigger.u.rel_duration.weeks * 7 * 24;
- }
- if (local->appt->advance > PILOT_MAX_ADVANCE) {
- local->appt->advanceUnits = advDays;
- local->appt->advance =
- trigger.u.rel_duration.minutes / (60 * 24)
- + trigger.u.rel_duration.hours / 24
- + trigger.u.rel_duration.days
- + trigger.u.rel_duration.weeks * 7;
- }
- if (local->appt->advance > PILOT_MAX_ADVANCE)
- local->appt->advance = PILOT_MAX_ADVANCE;
-
- local->appt->alarm = 1;
- break;
- }
- e_cal_component_alarm_free (alarm);
- }
- cal_obj_uid_list_free (uids);
- }
-
- e_cal_component_get_classification (comp, &classif);
-
- if (classif == E_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)
-{
- ECalComponent *comp;
- icalcomponent *icalcomp;
- GError *error = NULL;
-
- g_assert(local!=NULL);
-
- if (e_cal_get_object (ctxt->client, uid, NULL, &icalcomp, &error)) {
- comp = e_cal_component_new ();
- if (!e_cal_component_set_icalcomponent (comp, icalcomp)) {
- g_object_unref (comp);
- icalcomponent_free (icalcomp);
- return;
- }
-
- local_record_from_comp (local, comp, ctxt);
- g_object_unref (comp);
- } else if (error->code == E_CALENDAR_STATUS_OBJECT_NOT_FOUND) {
- comp = e_cal_component_new ();
- e_cal_component_set_new_vtype (comp, E_CAL_COMPONENT_EVENT);
- e_cal_component_set_uid (comp, uid);
- local_record_from_comp (local, comp, ctxt);
- g_object_unref (comp);
- } else {
- INFO ("Object did not exist");
- }
-
- g_clear_error (&error);
-}
-
-static ECalComponent *
-comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
- GnomePilotRecord *remote,
- ECalComponent *in_comp,
- ECal *client,
- icaltimezone *timezone)
-{
- ECalComponent *comp;
- struct Appointment appt;
- struct icaltimetype now = icaltime_from_timet_with_zone (time (NULL), FALSE, timezone), it;
- struct icalrecurrencetype recur;
- ECalComponentText summary = {NULL, NULL};
- ECalComponentDateTime dt = {NULL, NULL};
- 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 = e_cal_component_new ();
- e_cal_component_set_new_vtype (comp, E_CAL_COMPONENT_EVENT);
- e_cal_component_set_created (comp, &now);
- } else {
- comp = e_cal_component_clone (in_comp);
- }
-
- e_cal_component_set_last_modified (comp, &now);
-
- summary.value = txt = e_pilot_utf8_from_pchar (appt.description);
- e_cal_component_set_summary (comp, &summary);
- free (txt);
-
- /* The iCal description field */
- if (!appt.note) {
- e_cal_component_set_description_list (comp, NULL);
- } else {
- GSList l;
- ECalComponentText text;
-
- text.value = txt = e_pilot_utf8_from_pchar (appt.note);
- text.altrep = NULL;
- l.data = &text;
- l.next = NULL;
-
- e_cal_component_set_description_list (comp, &l);
- free (txt);
- }
-
- if (appt.event && !is_empty_time (appt.begin)) {
- it = tm_to_icaltimetype (&appt.begin, TRUE);
- dt.value = &it;
- dt.tzid = NULL;
- e_cal_component_set_dtstart (comp, &dt);
- e_cal_component_set_dtend (comp, &dt);
- } else {
- dt.tzid = icaltimezone_get_tzid (timezone);
-
- if (!is_empty_time (appt.begin)) {
- it = tm_to_icaltimetype (&appt.begin, FALSE);
- dt.value = &it;
- e_cal_component_set_dtstart (comp, &dt);
- }
-
- if (!is_empty_time (appt.end)) {
- it = tm_to_icaltimetype (&appt.end, FALSE);
- dt.value = &it;
- e_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, *existing;
- struct icalrecurrencetype *erecur;
-
- /* recurrence start of week */
- recur.week_start = get_ical_day (appt.repeatWeekstart);
-
- if (!appt.repeatForever) {
- recur.until = tm_to_icaltimetype (&appt.repeatEnd, TRUE);
- }
-
- list = g_slist_append (list, &recur);
- e_cal_component_set_rrule_list (comp, list);
-
- /* If the desktop uses count and rrules are
- * equivalent, use count still on the desktop */
- if (!appt.repeatForever && e_cal_component_has_rrules (in_comp)) {
- e_cal_component_get_rrule_list (in_comp, &existing);
- erecur = existing->data;
-
- /* If the rules are otherwise the same and the existing uses count,
- see if they end at the same point */
- if (rrules_mostly_equal (&recur, erecur) &&
- icaltime_is_null_time (erecur->until) && erecur->count > 0) {
- time_t last, elast;
-
- e_cal_recur_generate_instances (comp, -1, -1, find_last_cb, &last,
- e_cal_resolve_tzid_cb, client,
- timezone);
- e_cal_recur_generate_instances (in_comp, -1, -1, find_last_cb, &elast,
- e_cal_resolve_tzid_cb, client,
- timezone);
-
-
- if (last == elast) {
- recur.until = icaltime_null_time ();
- recur.count = erecur->count;
- e_cal_component_set_rrule_list (comp, list);
- }
- }
- }
-
- g_slist_free (list);
- } else {
- e_cal_component_set_rrule_list (comp, NULL);
- }
-
- /* Exceptions */
- for (i = 0; i < appt.exceptions; i++) {
- struct tm ex;
- ECalComponentDateTime *dt = g_new0 (ECalComponentDateTime, 1);
-
- dt->value = g_new0 (struct icaltimetype, 1);
- dt->tzid = NULL;
-
- ex = appt.exception[i];
- *dt->value = tm_to_icaltimetype (&ex, TRUE);
-
- edl = g_slist_prepend (edl, dt);
- }
- e_cal_component_set_exdate_list (comp, edl);
- e_cal_component_free_exdate_list (edl);
-
- /* Alarm */
- if (appt.alarm) {
- ECalComponentAlarm *alarm = NULL;
- ECalComponentAlarmTrigger trigger;
- gboolean found = FALSE;
-
- if (e_cal_component_has_alarms (comp)) {
- GList *uids, *l;
-
- uids = e_cal_component_get_alarm_uids (comp);
- for (l = uids; l != NULL; l = l->next) {
- alarm = e_cal_component_get_alarm (comp, l->data);
- e_cal_component_alarm_get_trigger (alarm, &trigger);
- if ((trigger.type == E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START
- && trigger.u.rel_duration.is_neg)) {
- found = TRUE;
- break;
- }
- e_cal_component_alarm_free (alarm);
- }
- cal_obj_uid_list_free (uids);
- }
- if (!found)
- alarm = e_cal_component_alarm_new ();
-
- memset (&trigger, 0, sizeof (ECalComponentAlarmTrigger));
- trigger.type = E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START;
- trigger.u.rel_duration.is_neg = 1;
- switch (appt.advanceUnits) {
- case advMinutes:
- trigger.u.rel_duration.minutes = appt.advance;
- break;
- case advHours:
- trigger.u.rel_duration.hours = appt.advance;
- break;
- case advDays:
- trigger.u.rel_duration.days = appt.advance;
- break;
- }
- e_cal_component_alarm_set_trigger (alarm, trigger);
- e_cal_component_alarm_set_action (alarm, E_CAL_COMPONENT_ALARM_DISPLAY);
-
- if (!found)
- e_cal_component_add_alarm (comp, alarm);
- e_cal_component_alarm_free (alarm);
- }
-
- e_cal_component_set_transparency (comp, E_CAL_COMPONENT_TRANSP_NONE);
-
- if (remote->secret)
- e_cal_component_set_classification (comp, E_CAL_COMPONENT_CLASS_PRIVATE);
- else
- e_cal_component_set_classification (comp, E_CAL_COMPONENT_CLASS_PUBLIC);
-
- e_cal_component_commit_sequence (comp);
-
- free_Appointment (&appt);
-
- return comp;
-}
-
-static void
-check_for_slow_setting (GnomePilotConduit *c, ECalConduitContext *ctxt)
-{
- GnomePilotConduitStandard *conduit = GNOME_PILOT_CONDUIT_STANDARD (c);
- int map_count;
- const char *uri;
-
- /* If there are objects but no log */
- map_count = g_hash_table_size (ctxt->map->pid_map);
- if (map_count == 0)
- gnome_pilot_conduit_standard_set_slow (conduit, TRUE);
-
- /* Or if the URI's don't match */
- uri = e_cal_get_uri (ctxt->client);
- LOG (g_message ( " Current URI %s (%s)\n", uri, ctxt->cfg->last_uri ? ctxt->cfg->last_uri : "<NONE>" ));
- if (ctxt->cfg->last_uri != NULL && strcmp (ctxt->cfg->last_uri, uri)) {
- gnome_pilot_conduit_standard_set_slow (conduit, TRUE);
- e_pilot_map_clear (ctxt->map);
- }
-
- if (gnome_pilot_conduit_standard_get_slow (conduit)) {
- ctxt->map->write_touched_only = TRUE;
- LOG (g_message ( " doing slow sync\n" ));
- } else {
- LOG (g_message ( " doing fast sync\n" ));
- }
-}
-
-/* Pilot syncing callbacks */
-static gint
-pre_sync (GnomePilotConduit *conduit,
- GnomePilotDBInfo *dbi,
- ECalConduitContext *ctxt)
-{
- GnomePilotConduitSyncAbs *abs_conduit;
- GList *removed = NULL, *added = NULL, *l;
- int len;
- unsigned char *buf;
- char *filename, *change_id;
- icalcomponent *icalcomp;
- gint num_records, add_records = 0, mod_records = 0, del_records = 0;
-
- abs_conduit = GNOME_PILOT_CONDUIT_SYNC_ABS (conduit);
-
- LOG (g_message ( "---------------------------------------------------------\n" ));
- LOG (g_message ( "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 (g_message ( " Using timezone: %s", icaltimezone_get_tzid (ctxt->timezone) ));
-
- /* Set the default timezone on the backend. */
- if (ctxt->timezone) {
- if (!e_cal_set_default_timezone (ctxt->client, ctxt->timezone, NULL))
- return -1;
- }
-
- /* Get the default component */
- if (!e_cal_get_default_object (ctxt->client, &icalcomp, NULL))
- return -1;
-
- ctxt->default_comp = e_cal_component_new ();
- if (!e_cal_component_set_icalcomponent (ctxt->default_comp, icalcomp)) {
- g_object_unref (ctxt->default_comp);
- icalcomponent_free (icalcomp);
- return -1;
- }
-
- ctxt->default_comp = e_cal_component_new ();
- if (!e_cal_component_set_icalcomponent (ctxt->default_comp, icalcomp)) {
- g_object_unref (ctxt->default_comp);
- icalcomponent_free (icalcomp);
- return -1;
- }
-
- /* Load the uid <--> pilot id mapping */
- filename = map_name (ctxt);
- e_pilot_map_read (filename, &ctxt->map);
- g_free (filename);
-
- /* Get the local database */
- if (!e_cal_get_object_list_as_comp (ctxt->client, "(#t)", &ctxt->comps, NULL))
- return -1;
-
- /* Find the added, modified and deleted items */
- change_id = g_strdup_printf ("pilot-sync-evolution-calendar-%d", ctxt->cfg->pilot_id);
- if (!e_cal_get_changes (ctxt->client, change_id, &ctxt->changed, NULL))
- return -1;
- ctxt->changed_hash = g_hash_table_new (g_str_hash, g_str_equal);
- g_free (change_id);
-
- /* See if we need to split up any events */
- for (l = ctxt->changed; l != NULL; l = l->next) {
- ECalChange *ccc = l->data;
- GList *multi_comp = NULL, *multi_ccc = NULL;
-
- if (process_multi_day (ctxt, ccc, &multi_comp, &multi_ccc)) {
- ctxt->comps = g_list_concat (ctxt->comps, multi_comp);
-
- added = g_list_concat (added, multi_ccc);
- removed = g_list_prepend (removed, ccc);
- }
- }
-
- /* Remove the events that were split up */
- g_list_concat (ctxt->changed, added);
- for (l = removed; l != NULL; l = l->next) {
- ECalChange *ccc = l->data;
- const char *uid;
-
- e_cal_component_get_uid (ccc->comp, &uid);
- if (e_pilot_map_lookup_pid (ctxt->map, uid, FALSE) == 0) {
- ctxt->changed = g_list_remove (ctxt->changed, ccc);
- g_object_unref (ccc->comp);
- g_free (ccc);
- }
- }
- g_list_free (removed);
-
- for (l = ctxt->changed; l != NULL; l = l->next) {
- ECalChange *ccc = l->data;
- const char *uid;
-
- e_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 E_CAL_CHANGE_ADDED:
- add_records++;
- break;
- case E_CAL_CHANGE_MODIFIED:
- mod_records++;
- break;
- case E_CAL_CHANGE_DELETED:
- del_records++;
- break;
- }
- } else if (ccc->type == E_CAL_CHANGE_DELETED) {
- e_pilot_map_remove_by_uid (ctxt->map, uid);
- }
- }
-
- /* Set the count information */
- num_records = g_list_length (ctxt->comps);
- 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);
- if (ctxt->cfg->sync_type == GnomePilotConduitSyncTypeCopyToPilot
- || ctxt->cfg->sync_type == GnomePilotConduitSyncTypeCopyFromPilot)
- ctxt->map->write_touched_only = TRUE;
-
- return 0;
-}
-
-static gint
-post_sync (GnomePilotConduit *conduit,
- GnomePilotDBInfo *dbi,
- ECalConduitContext *ctxt)
-{
- GList *changed;
- gchar *filename, *change_id;
-
- LOG (g_message ( "post_sync: Calendar Conduit v.%s", CONDUIT_VERSION ));
-
- g_free (ctxt->cfg->last_uri);
- ctxt->cfg->last_uri = g_strdup (e_cal_get_uri (ctxt->client));
- calconduit_save_configuration (ctxt->cfg);
-
- 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);
- if (e_cal_get_changes (ctxt->client, change_id, &changed, NULL))
- e_cal_free_change_list (changed);
- g_free (change_id);
-
- LOG (g_message ( "---------------------------------------------------------\n" ));
-
- return 0;
-}
-
-static gint
-set_pilot_id (GnomePilotConduitSyncAbs *conduit,
- ECalLocalRecord *local,
- guint32 ID,
- ECalConduitContext *ctxt)
-{
- const char *uid;
-
- LOG (g_message ( "set_pilot_id: setting to %d\n", ID ));
-
- e_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 (g_message ( "set_status_cleared: clearing status\n" ));
-
- e_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 *comps, *iterator;
- static int count;
-
- g_return_val_if_fail (local != NULL, -1);
-
- if (*local == NULL) {
- LOG (g_message ( "beginning for_each" ));
-
- comps = ctxt->comps;
- count = 0;
-
- if (comps != NULL) {
- LOG (g_message ( "iterating over %d records", g_list_length (comps)));
-
- *local = g_new0 (ECalLocalRecord, 1);
- local_record_from_comp (*local, comps->data, ctxt);
- g_list_prepend (ctxt->locals, *local);
-
- iterator = comps;
- } else {
- LOG (g_message ( "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);
- g_list_prepend (ctxt->locals, *local);
- } else {
- LOG (g_message ( "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 (g_message ( "for_each_modified beginning\n" ));
-
- iterator = ctxt->changed;
-
- count = 0;
-
- LOG (g_message ( "iterating over %d records", g_hash_table_size (ctxt->changed_hash) ));
-
- iterator = next_changed_item (ctxt, iterator);
- if (iterator != NULL) {
- ECalChange *ccc = iterator->data;
-
- *local = g_new0 (ECalLocalRecord, 1);
- local_record_from_comp (*local, ccc->comp, ctxt);
- g_list_prepend (ctxt->locals, *local);
- } else {
- LOG (g_message ( "no events" ));
-
- *local = NULL;
- }
- } else {
- count++;
- iterator = g_list_next (iterator);
- if (iterator && (iterator = next_changed_item (ctxt, iterator))) {
- ECalChange *ccc = iterator->data;
-
- *local = g_new0 (ECalLocalRecord, 1);
- local_record_from_comp (*local, ccc->comp, ctxt);
- g_list_prepend (ctxt->locals, *local);
- } else {
- LOG (g_message ( "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 (g_message ("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 (g_message ( " equal" ));
- else
- LOG (g_message ( " not equal" ));
-
- return retval;
-}
-
-static gint
-add_record (GnomePilotConduitSyncAbs *conduit,
- GnomePilotRecord *remote,
- ECalConduitContext *ctxt)
-{
- ECalComponent *comp;
- char *uid;
- int retval = 0;
-
- g_return_val_if_fail (remote != NULL, -1);
-
- LOG (g_message ( "add_record: adding %s to desktop\n", print_remote (remote) ));
-
- comp = comp_from_remote_record (conduit, remote, ctxt->default_comp, ctxt->client, ctxt->timezone);
-
- /* Give it a new UID otherwise it will be the uid of the default comp */
- uid = e_cal_component_gen_uid ();
- e_cal_component_set_uid (comp, uid);
-
- if (!e_cal_create_object (ctxt->client, e_cal_component_get_icalcomponent (comp), NULL, NULL))
- return -1;
-
- e_pilot_map_insert (ctxt->map, remote->ID, uid, FALSE);
-
- g_free (uid);
-
- g_object_unref (comp);
-
- return retval;
-}
-
-static gint
-replace_record (GnomePilotConduitSyncAbs *conduit,
- ECalLocalRecord *local,
- GnomePilotRecord *remote,
- ECalConduitContext *ctxt)
-{
- ECalComponent *new_comp;
- int retval = 0;
-
- g_return_val_if_fail (remote != NULL, -1);
-
- LOG (g_message ("replace_record: replace %s with %s\n",
- print_local (local), print_remote (remote)));
-
- new_comp = comp_from_remote_record (conduit, remote, local->comp, ctxt->client, ctxt->timezone);
- g_object_unref (local->comp);
- local->comp = new_comp;
-
- if (!e_cal_modify_object (ctxt->client, e_cal_component_get_icalcomponent (new_comp),
- CALOBJ_MOD_ALL, NULL))
- return -1;
-
- 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);
-
- e_cal_component_get_uid (local->comp, &uid);
-
- LOG (g_message ( "delete_record: deleting %s\n", uid ));
-
- e_pilot_map_remove_by_uid (ctxt->map, uid);
- /* FIXME Error handling */
- e_cal_remove_object (ctxt->client, uid, NULL);
-
- 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 (g_message ( "archive_record: %s\n", archive ? "yes" : "no" ));
-
- e_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 (g_message ("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, TRUE);
-
- if (!uid)
- return 0;
-
- LOG (g_message ( " 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 (g_message ( "free_match: freeing\n" ));
-
- g_return_val_if_fail (local != NULL, -1);
-
- calconduit_destroy_record (local);
-
- return 0;
-}
-
-static gint
-prepare (GnomePilotConduitSyncAbs *conduit,
- ECalLocalRecord *local,
- GnomePilotRecord *remote,
- ECalConduitContext *ctxt)
-{
- LOG (g_message ( "prepare: encoding local %s\n", print_local (local) ));
-
- *remote = local_record_to_pilot_record (local, ctxt);
-
- return 0;
-}
-
-/* Pilot Settings Callbacks */
-static void
-fill_widgets (ECalConduitContext *ctxt)
-{
- e_pilot_settings_set_secret (E_PILOT_SETTINGS (ctxt->ps),
- ctxt->cfg->secret);
-
- e_cal_gui_fill_widgets (ctxt->gui, ctxt->cfg);
-}
-
-static gint
-create_settings_window (GnomePilotConduit *conduit,
- GtkWidget *parent,
- ECalConduitContext *ctxt)
-{
- LOG (g_message ( "create_settings_window" ));
-
- ctxt->ps = e_pilot_settings_new ();
- ctxt->gui = e_cal_gui_new (E_PILOT_SETTINGS (ctxt->ps));
-
- gtk_container_add (GTK_CONTAINER (parent), ctxt->ps);
- gtk_widget_show (ctxt->ps);
-
- fill_widgets (ctxt);
-
- return 0;
-}
-static void
-display_settings (GnomePilotConduit *conduit, ECalConduitContext *ctxt)
-{
- LOG (g_message ( "display_settings" ));
-
- fill_widgets (ctxt);
-}
-
-static void
-save_settings (GnomePilotConduit *conduit, ECalConduitContext *ctxt)
-{
- LOG (g_message ( "save_settings" ));
-
- ctxt->new_cfg->secret =
- e_pilot_settings_get_secret (E_PILOT_SETTINGS (ctxt->ps));
- e_cal_gui_fill_config (ctxt->gui, ctxt->new_cfg);
-
- calconduit_save_configuration (ctxt->new_cfg);
-}
-
-static void
-revert_settings (GnomePilotConduit *conduit, ECalConduitContext *ctxt)
-{
- LOG (g_message ( "revert_settings" ));
-
- calconduit_save_configuration (ctxt->cfg);
- calconduit_destroy_configuration (ctxt->new_cfg);
- ctxt->new_cfg = calconduit_dupe_configuration (ctxt->cfg);
-}
-
-GnomePilotConduit *
-conduit_get_gpilot_conduit (guint32 pilot_id)
-{
- GtkObject *retval;
- ECalConduitContext *ctxt;
-
- LOG (g_message ( "in calendar's conduit_get_gpilot_conduit\n" ));
-
- 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);
-
- /* Sync signals */
- 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);
-
- /* Gui Settings */
- gtk_signal_connect (retval, "create_settings_window", (GtkSignalFunc) create_settings_window, ctxt);
- gtk_signal_connect (retval, "display_settings", (GtkSignalFunc) display_settings, ctxt);
- gtk_signal_connect (retval, "save_settings", (GtkSignalFunc) save_settings, ctxt);
- gtk_signal_connect (retval, "revert_settings", (GtkSignalFunc) revert_settings, 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/e-calendar.conduit.in b/calendar/conduits/calendar/e-calendar.conduit.in
deleted file mode 100644
index 6ddcf5761a..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="@privconduitdir@/libecalendar_conduit.so"/>
- <name value="ECalendar"/>
- <conduit-attribute name="description" value="Synchronizes Calendar with Evolution @BASE_VERSION@"/>
- <conduit-attribute name="default-synctype" value="synchronize"/>
- <conduit-attribute name="valid-synctypes" value="synchronize copy_from_pilot copy_to_pilot"/>
- <conduit-attribute name="settings" value="TRUE"/>
- <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 15e7a81f84..0000000000
--- a/calendar/conduits/todo/Makefile.am
+++ /dev/null
@@ -1,34 +0,0 @@
-INCLUDES = \
- -I$(top_srcdir)/e-util \
- -I$(top_builddir)/e-util \
- $(EVOLUTION_CALENDAR_CONDUIT_CFLAGS)
-
-# ToDo Conduit
-privconduit_LTLIBRARIES = libetodo_conduit.la
-
-libetodo_conduit_la_SOURCES = \
- todo-conduit.c
-
-libetodo_conduit_la_LDFLAGS = -module -avoid-version
-libetodo_conduit_la_LIBADD = \
- $(top_builddir)/e-util/libeutil.la \
- $(top_builddir)/e-util/libeconduit.la \
- $(EVOLUTION_CALENDAR_CONDUIT_LIBS)
-
-e-todo-$(BASE_VERSION).conduit: e-todo.conduit.in
- sed -e 's^\@privconduitdir\@^$(privconduitdir)^g' \
- -e 's^\@datadir\@^$(datadir)^g' \
- -e 's^\@BASE_VERSION\@^$(BASE_VERSION)^g' \
- $< > $@
-
-conduitdir = $(datadir)/gnome-pilot/conduits/
-conduit_DATA = e-todo-$(BASE_VERSION).conduit
-
-BUILT_SOURCES = $(conduit_DATA)
-CLEANFILES = $(BUILT_SOURCES)
-
-EXTRA_DIST = \
- e-todo.conduit.in
-
-dist-hook:
- cd $(distdir); rm -f $(BUILT_SOURCES) \ No newline at end of file
diff --git a/calendar/conduits/todo/e-todo.conduit.in b/calendar/conduits/todo/e-todo.conduit.in
deleted file mode 100644
index 3b02058c91..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="@privconduitdir@/libetodo_conduit.so"/>
- <name value="EToDo"/>
- <conduit-attribute name="description" value="Synchronizes ToDo List with Evolution @BASE_VERSION@"/>
- <conduit-attribute name="default-synctype" value="synchronize"/>
- <conduit-attribute name="valid-synctypes" value="synchronize copy_from_pilot copy_to_pilot"/>
- <conduit-attribute name="settings" value="TRUE"/>
- <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.c b/calendar/conduits/todo/todo-conduit.c
deleted file mode 100644
index fe5684252b..0000000000
--- a/calendar/conduits/todo/todo-conduit.c
+++ /dev/null
@@ -1,1413 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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>
-
-#define G_LOG_DOMAIN "etodoconduit"
-
-#include <libecal/e-cal-types.h>
-#include <libecal/e-cal.h>
-#include <libecal/e-cal-time-util.h>
-#include <pi-source.h>
-#include <pi-socket.h>
-#include <pi-dlp.h>
-#include <pi-todo.h>
-#include <libical/icaltypes.h>
-#include <gpilotd/gnome-pilot-conduit.h>
-#include <gpilotd/gnome-pilot-conduit-sync-abs.h>
-#include <libgpilotdCM/gnome-pilot-conduit-management.h>
-#include <libgpilotdCM/gnome-pilot-conduit-config.h>
-#include <e-pilot-map.h>
-#include <e-pilot-settings.h>
-#include <e-pilot-util.h>
-#include <e-config-listener.h>
-
-GnomePilotConduit * conduit_get_gpilot_conduit (guint32);
-void conduit_destroy_gpilot_conduit (GnomePilotConduit*);
-
-#define CONDUIT_VERSION "0.1.4"
-
-#define DEBUG_TODOCONDUIT 1
-/* #undef DEBUG_TODOCONDUIT */
-
-#ifdef DEBUG_TODOCONDUIT
-#define LOG(x) x
-#else
-#define LOG(x)
-#endif
-
-#define WARN g_warning
-#define INFO g_message
-
-typedef struct _EToDoLocalRecord EToDoLocalRecord;
-typedef struct _EToDoConduitCfg EToDoConduitCfg;
-typedef struct _EToDoConduitGui EToDoConduitGui;
-typedef struct _EToDoConduitContext EToDoConduitContext;
-
-/* Local Record */
-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 */
- ECalComponent *comp;
-
- /* pilot-link todo structure */
- struct ToDo *todo;
-};
-
-static void
-todoconduit_destroy_record (EToDoLocalRecord *local)
-{
- g_object_unref (local->comp);
- free_ToDo (local->todo);
- g_free (local->todo);
- g_free (local);
-}
-
-/* Configuration */
-struct _EToDoConduitCfg {
- guint32 pilot_id;
- GnomePilotConduitSyncType sync_type;
-
- gboolean secret;
- gint priority;
-
- gchar *last_uri;
-};
-
-static EToDoConduitCfg *
-todoconduit_load_configuration (guint32 pilot_id)
-{
- EToDoConduitCfg *c;
- GnomePilotConduitManagement *management;
- GnomePilotConduitConfig *config;
- 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);
-
- c->pilot_id = pilot_id;
-
- management = gnome_pilot_conduit_management_new ("e_todo_conduit", GNOME_PILOT_CONDUIT_MGMT_ID);
- gtk_object_ref (GTK_OBJECT (management));
- gtk_object_sink (GTK_OBJECT (management));
- config = gnome_pilot_conduit_config_new (management, pilot_id);
- gtk_object_ref (GTK_OBJECT (config));
- gtk_object_sink (GTK_OBJECT (config));
- if (!gnome_pilot_conduit_config_is_enabled (config, &c->sync_type))
- c->sync_type = GnomePilotConduitSyncTypeNotSet;
- gtk_object_unref (GTK_OBJECT (config));
- gtk_object_unref (GTK_OBJECT (management));
-
- /* Custom settings */
- gnome_config_push_prefix (prefix);
-
- c->secret = gnome_config_get_bool ("secret=FALSE");
- c->priority = gnome_config_get_int ("priority=3");
- c->last_uri = gnome_config_get_string ("last_uri");
-
- gnome_config_pop_prefix ();
-
- return c;
-}
-
-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 ("secret", c->secret);
- gnome_config_set_int ("priority", c->priority);
- gnome_config_set_string ("last_uri", c->last_uri);
- gnome_config_pop_prefix ();
-
- gnome_config_sync ();
- gnome_config_drop_all ();
-}
-
-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->pilot_id = c->pilot_id;
-
- retval->secret = c->secret;
- retval->priority = c->priority;
- retval->last_uri = g_strdup (c->last_uri);
-
- return retval;
-}
-
-static void
-todoconduit_destroy_configuration (EToDoConduitCfg *c)
-{
- g_return_if_fail (c != NULL);
-
- g_free (c->last_uri);
- g_free (c);
-}
-
-/* Gui */
-struct _EToDoConduitGui {
- GtkWidget *priority;
-};
-
-static EToDoConduitGui *
-e_todo_gui_new (EPilotSettings *ps)
-{
- EToDoConduitGui *gui;
- GtkWidget *lbl;
- GtkObject *adj;
- gint rows;
-
- g_return_val_if_fail (ps != NULL, NULL);
- g_return_val_if_fail (E_IS_PILOT_SETTINGS (ps), NULL);
-
- gtk_table_resize (GTK_TABLE (ps), E_PILOT_SETTINGS_TABLE_ROWS + 1, E_PILOT_SETTINGS_TABLE_COLS);
-
- gui = g_new0 (EToDoConduitGui, 1);
-
- rows = E_PILOT_SETTINGS_TABLE_ROWS;
- lbl = gtk_label_new (_("Default Priority:"));
- gtk_misc_set_alignment (GTK_MISC (lbl), 0.0, 0.5);
- adj = gtk_adjustment_new (1, 1, 5, 1, 5, 5);
- gui->priority = gtk_spin_button_new (GTK_ADJUSTMENT (adj), 1.0, 0);
- gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (gui->priority), TRUE);
- gtk_table_attach_defaults (GTK_TABLE (ps), lbl, 0, 1, rows, rows + 1);
- gtk_table_attach_defaults (GTK_TABLE (ps), gui->priority, 1, 2, rows, rows + 1);
- gtk_widget_show (lbl);
- gtk_widget_show (gui->priority);
-
- return gui;
-}
-
-static void
-e_todo_gui_fill_widgets (EToDoConduitGui *gui, EToDoConduitCfg *cfg)
-{
- g_return_if_fail (gui != NULL);
- g_return_if_fail (cfg != NULL);
-
- gtk_spin_button_set_value (GTK_SPIN_BUTTON (gui->priority), cfg->priority);
-}
-
-static void
-e_todo_gui_fill_config (EToDoConduitGui *gui, EToDoConduitCfg *cfg)
-{
- g_return_if_fail (gui != NULL);
- g_return_if_fail (cfg != NULL);
-
- cfg->priority = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (gui->priority));
-}
-
-static void
-e_todo_gui_destroy (EToDoConduitGui *gui)
-{
- g_free (gui);
-}
-
-/* Context */
-struct _EToDoConduitContext {
- GnomePilotDBInfo *dbi;
-
- EToDoConduitCfg *cfg;
- EToDoConduitCfg *new_cfg;
- EToDoConduitGui *gui;
- GtkWidget *ps;
-
- struct ToDoAppInfo ai;
-
- ECal *client;
-
- icaltimezone *timezone;
- ECalComponent *default_comp;
- GList *comps;
- GList *changed;
- GHashTable *changed_hash;
- GList *locals;
-
- EPilotMap *map;
-};
-
-static EToDoConduitContext *
-e_todo_context_new (guint32 pilot_id)
-{
- EToDoConduitContext *ctxt = g_new0 (EToDoConduitContext, 1);
-
- ctxt->cfg = todoconduit_load_configuration (pilot_id);
- ctxt->new_cfg = todoconduit_dupe_configuration (ctxt->cfg);
- ctxt->gui = NULL;
- ctxt->ps = NULL;
- ctxt->client = NULL;
- ctxt->timezone = NULL;
- ctxt->default_comp = NULL;
- ctxt->comps = NULL;
- ctxt->changed_hash = NULL;
- ctxt->changed = NULL;
- ctxt->locals = NULL;
- ctxt->map = NULL;
-
- return ctxt;
-}
-
-static gboolean
-e_todo_context_foreach_change (gpointer key, gpointer value, gpointer data)
-{
- g_free (key);
-
- return TRUE;
-}
-
-static void
-e_todo_context_destroy (EToDoConduitContext *ctxt)
-{
- GList *l;
-
- g_return_if_fail (ctxt != NULL);
-
- if (ctxt->cfg != NULL)
- todoconduit_destroy_configuration (ctxt->cfg);
- if (ctxt->new_cfg != NULL)
- todoconduit_destroy_configuration (ctxt->new_cfg);
- if (ctxt->gui != NULL)
- e_todo_gui_destroy (ctxt->gui);
-
- if (ctxt->client != NULL)
- g_object_unref (ctxt->client);
-
- if (ctxt->default_comp != NULL)
- g_object_unref (ctxt->default_comp);
- if (ctxt->comps != NULL) {
- for (l = ctxt->comps; l; l = l->next)
- g_object_unref (l->data);
- g_list_free (ctxt->comps);
- }
-
- if (ctxt->changed_hash != NULL) {
- g_hash_table_foreach_remove (ctxt->changed_hash, e_todo_context_foreach_change, NULL);
- g_hash_table_destroy (ctxt->changed_hash);
- }
-
- if (ctxt->locals != NULL) {
- for (l = ctxt->locals; l != NULL; l = l->next)
- todoconduit_destroy_record (l->data);
- g_list_free (ctxt->locals);
- }
-
- if (ctxt->changed != NULL)
- e_cal_free_change_list (ctxt->changed);
-
- if (ctxt->map != NULL)
- e_pilot_map_destroy (ctxt->map);
-
- g_free (ctxt);
-}
-
-/* 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 : "");
-
- free_ToDo (&todo);
-
- return buff;
-}
-
-static int
-start_calendar_server (EToDoConduitContext *ctxt)
-{
- char *uri;
-
- g_return_val_if_fail (ctxt != NULL, -2);
-
- /* FIXME Need a mechanism for the user to select uri's */
- /* FIXME Can we use the cal model? */
- uri = g_strdup_printf ("file://%s/local/Tasks/", g_get_home_dir ());
- ctxt->client = e_cal_new (uri, CALOBJ_TYPE_TODO);
- g_free (uri);
-
- if (!ctxt->client)
- return -1;
-
- if (!e_cal_open (ctxt->client, FALSE, NULL))
- return -1;
-
- return 0;
-}
-
-/* Utility routines */
-static icaltimezone *
-get_timezone (ECal *client, const char *tzid)
-{
- icaltimezone *timezone = NULL;
-
- timezone = icaltimezone_get_builtin_timezone_from_tzid (tzid);
- if (timezone == NULL)
- e_cal_get_timezone (client, tzid, &timezone, NULL);
-
- return timezone;
-}
-
-static icaltimezone *
-get_default_timezone (void)
-{
- EConfigListener *listener;
- icaltimezone *timezone = NULL;
- char *location;
-
- listener = e_config_listener_new ();
-
- location = e_config_listener_get_string_with_default (listener,
- "/apps/evolution/calendar/display/timezone", "UTC", NULL);
- if (!location || !location[0]) {
- g_free (location);
- location = g_strdup ("UTC");
- }
-
- timezone = icaltimezone_get_builtin_timezone (location);
- g_free (location);
-
- g_object_unref (listener);
-
- 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)
-{
- ECalChange *ccc;
- GList *l;
-
- for (l = changes; l != NULL; l = l->next) {
- const char *uid;
-
- ccc = l->data;
-
- e_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)
-{
- ECalChange *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 E_CAL_CHANGE_ADDED:
- local->local.attr = GnomePilotRecordNew;
- break;
- case E_CAL_CHANGE_MODIFIED:
- local->local.attr = GnomePilotRecordModified;
- break;
- case E_CAL_CHANGE_DELETED:
- local->local.attr = GnomePilotRecordDeleted;
- break;
- }
-}
-
-static GnomePilotRecord
-local_record_to_pilot_record (EToDoLocalRecord *local,
- EToDoConduitContext *ctxt)
-{
- GnomePilotRecord p;
- static char record[0xffff];
-
- g_assert (local->comp != NULL);
- g_assert (local->todo != NULL );
-
- LOG (g_message ( "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 = record;
- p.length = pack_ToDo (local->todo, p.record, 0xffff);
-
- return p;
-}
-
-/*
- * converts a ECalComponent object to a EToDoLocalRecord
- */
-static void
-local_record_from_comp (EToDoLocalRecord *local, ECalComponent *comp, EToDoConduitContext *ctxt)
-{
- const char *uid;
- int *priority;
- icalproperty_status status;
- ECalComponentText summary;
- GSList *d_list = NULL;
- ECalComponentText *description;
- ECalComponentDateTime due;
- ECalComponentClassification classif;
- icaltimezone *default_tz = get_default_timezone ();
-
- LOG (g_message ( "local_record_from_comp\n" ));
-
- g_return_if_fail (local != NULL);
- g_return_if_fail (comp != NULL);
-
- local->comp = comp;
- g_object_ref (comp);
-
- e_cal_component_get_uid (local->comp, &uid);
- local->local.ID = e_pilot_map_lookup_pid (ctxt->map, uid, TRUE);
-
- compute_status (ctxt, local, uid);
-
- local->todo = g_new0 (struct ToDo,1);
-
- /* Don't overwrite the category */
- 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;
- }
- }
-
- /* STOP: don't replace these with g_strdup, since free_ToDo
- uses free to deallocate */
- e_cal_component_get_summary (comp, &summary);
- if (summary.value)
- local->todo->description = e_pilot_utf8_to_pchar (summary.value);
-
- e_cal_component_get_description_list (comp, &d_list);
- if (d_list) {
- description = (ECalComponentText *) 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;
- }
-
- e_cal_component_get_due (comp, &due);
- if (due.value) {
- icaltimezone_convert_time (due.value,
- get_timezone (ctxt->client, due.tzid),
- default_tz);
- local->todo->due = icaltimetype_to_tm (due.value);
- local->todo->indefinite = 0;
- } else {
- local->todo->indefinite = 1;
- }
- e_cal_component_free_datetime (&due);
-
- e_cal_component_get_status (comp, &status);
- if (status == ICAL_STATUS_COMPLETED)
- local->todo->complete = 1;
- else
- local->todo->complete = 0;
-
- e_cal_component_get_priority (comp, &priority);
- if (priority && *priority != 0) {
- if (*priority <= 3)
- local->todo->priority = 1;
- else if (*priority == 4)
- local->todo->priority = 2;
- else if (*priority == 5)
- local->todo->priority = 3;
- else if (*priority <= 7)
- local->todo->priority = 4;
- else
- local->todo->priority = 5;
-
- e_cal_component_free_priority (priority);
- } else {
- local->todo->priority = ctxt->cfg->priority;
- }
-
- e_cal_component_get_classification (comp, &classif);
-
- if (classif == E_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)
-{
- ECalComponent *comp;
- icalcomponent *icalcomp;
- GError *error = NULL;
-
- g_assert(local!=NULL);
-
- if (e_cal_get_object (ctxt->client, uid, NULL, &icalcomp, &error)) {
- comp = e_cal_component_new ();
- if (!e_cal_component_set_icalcomponent (comp, icalcomp)) {
- g_object_unref (comp);
- icalcomponent_free (icalcomp);
- return;
- }
-
- local_record_from_comp (local, comp, ctxt);
- g_object_unref (comp);
- } else if (error->code == E_CALENDAR_STATUS_OBJECT_NOT_FOUND) {
- comp = e_cal_component_new ();
- e_cal_component_set_new_vtype (comp, E_CAL_COMPONENT_TODO);
- e_cal_component_set_uid (comp, uid);
- local_record_from_comp (local, comp, ctxt);
- g_object_unref (comp);
- } else {
- INFO ("Object did not exist");
- }
-
- g_clear_error (&error);
-}
-
-
-static ECalComponent *
-comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
- GnomePilotRecord *remote,
- ECalComponent *in_comp,
- icaltimezone *timezone)
-{
- ECalComponent *comp;
- struct ToDo todo;
- ECalComponentText summary = {NULL, NULL};
- ECalComponentDateTime dt = {NULL, icaltimezone_get_tzid (timezone)};
- struct icaltimetype due, now;
- icaltimezone *utc_zone;
- int priority;
- char *txt;
-
- g_return_val_if_fail (remote != NULL, NULL);
-
- memset (&todo, 0, sizeof (struct ToDo));
- unpack_ToDo (&todo, remote->record, remote->length);
-
- utc_zone = icaltimezone_get_utc_timezone ();
- now = icaltime_from_timet_with_zone (time (NULL), FALSE,
- utc_zone);
-
- if (in_comp == NULL) {
- comp = e_cal_component_new ();
- e_cal_component_set_new_vtype (comp, E_CAL_COMPONENT_TODO);
- e_cal_component_set_created (comp, &now);
- } else {
- comp = e_cal_component_clone (in_comp);
- }
-
- e_cal_component_set_last_modified (comp, &now);
-
- summary.value = txt = e_pilot_utf8_from_pchar (todo.description);
- e_cal_component_set_summary (comp, &summary);
- free (txt);
-
- /* The iCal description field */
- if (!todo.note) {
- e_cal_component_set_comment_list (comp, NULL);
- } else {
- GSList l;
- ECalComponentText text;
-
- text.value = txt = e_pilot_utf8_from_pchar (todo.note);
- text.altrep = NULL;
- l.data = &text;
- l.next = NULL;
-
- e_cal_component_set_description_list (comp, &l);
- free (txt);
- }
-
- if (todo.complete) {
- int percent = 100;
-
- e_cal_component_set_completed (comp, &now);
- e_cal_component_set_percent (comp, &percent);
- e_cal_component_set_status (comp, ICAL_STATUS_COMPLETED);
- } else {
- int *percent = NULL;
- icalproperty_status status;
-
- e_cal_component_set_completed (comp, NULL);
-
- e_cal_component_get_percent (comp, &percent);
- if (percent == NULL || *percent == 100) {
- int p = 0;
- e_cal_component_set_percent (comp, &p);
- }
- if (percent != NULL)
- e_cal_component_free_percent (percent);
-
- e_cal_component_get_status (comp, &status);
- if (status == ICAL_STATUS_COMPLETED)
- e_cal_component_set_status (comp, ICAL_STATUS_NEEDSACTION);
- }
-
- if (!is_empty_time (todo.due)) {
- due = tm_to_icaltimetype (&todo.due, TRUE);
- dt.value = &due;
- e_cal_component_set_due (comp, &dt);
- }
-
- switch (todo.priority) {
- case 1:
- priority = 3;
- break;
- case 2:
- priority = 4;
- break;
- case 3:
- priority = 5;
- break;
- case 4:
- priority = 7;
- break;
- default:
- priority = 9;
- }
-
- e_cal_component_set_priority (comp, &priority);
- e_cal_component_set_transparency (comp, E_CAL_COMPONENT_TRANSP_NONE);
-
- if (remote->secret)
- e_cal_component_set_classification (comp, E_CAL_COMPONENT_CLASS_PRIVATE);
- else
- e_cal_component_set_classification (comp, E_CAL_COMPONENT_CLASS_PUBLIC);
-
- e_cal_component_commit_sequence (comp);
-
- free_ToDo(&todo);
-
- return comp;
-}
-
-static void
-check_for_slow_setting (GnomePilotConduit *c, EToDoConduitContext *ctxt)
-{
- GnomePilotConduitStandard *conduit = GNOME_PILOT_CONDUIT_STANDARD (c);
- int map_count;
- const char *uri;
-
- /* If there are no objects or objects but no log */
- map_count = g_hash_table_size (ctxt->map->pid_map);
- if (map_count == 0)
- gnome_pilot_conduit_standard_set_slow (conduit, TRUE);
-
- /* Or if the URI's don't match */
- uri = e_cal_get_uri (ctxt->client);
- LOG (g_message ( " Current URI %s (%s)\n", uri, ctxt->cfg->last_uri ? ctxt->cfg->last_uri : "<NONE>" ));
- if (ctxt->cfg->last_uri != NULL && strcmp (ctxt->cfg->last_uri, uri)) {
- gnome_pilot_conduit_standard_set_slow (conduit, TRUE);
- e_pilot_map_clear (ctxt->map);
- }
-
- if (gnome_pilot_conduit_standard_get_slow (conduit)) {
- ctxt->map->write_touched_only = TRUE;
- LOG (g_message ( " doing slow sync\n" ));
- } else {
- LOG (g_message ( " 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;
- icalcomponent *icalcomp;
- gint num_records, add_records = 0, mod_records = 0, del_records = 0;
-
- abs_conduit = GNOME_PILOT_CONDUIT_SYNC_ABS (conduit);
-
- LOG (g_message ( "---------------------------------------------------------\n" ));
- LOG (g_message ( "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 (g_message ( " Using timezone: %s", icaltimezone_get_tzid (ctxt->timezone) ));
-
- /* Set the default timezone on the backend. */
- if (ctxt->timezone) {
- if (!e_cal_set_default_timezone (ctxt->client, ctxt->timezone, NULL))
- return -1;
- }
-
- /* Get the default component */
- if (!e_cal_get_default_object (ctxt->client, &icalcomp, NULL))
- return -1;
-
- ctxt->default_comp = e_cal_component_new ();
- if (!e_cal_component_set_icalcomponent (ctxt->default_comp, icalcomp)) {
- g_object_unref (ctxt->default_comp);
- icalcomponent_free (icalcomp);
- return -1;
- }
-
- ctxt->default_comp = e_cal_component_new ();
- if (!e_cal_component_set_icalcomponent (ctxt->default_comp, icalcomp)) {
- g_object_unref (ctxt->default_comp);
- icalcomponent_free (icalcomp);
- return -1;
- }
-
- /* Load the uid <--> pilot id map */
- filename = map_name (ctxt);
- e_pilot_map_read (filename, &ctxt->map);
- g_free (filename);
-
- /* Get the local database */
- if (!e_cal_get_object_list_as_comp (ctxt->client, "(#t)", &ctxt->comps, NULL))
- return -1;
-
- /* Count and hash the changes */
- change_id = g_strdup_printf ("pilot-sync-evolution-todo-%d", ctxt->cfg->pilot_id);
- if (!e_cal_get_changes (ctxt->client, change_id, &ctxt->changed, NULL))
- return -1;
- ctxt->changed_hash = g_hash_table_new (g_str_hash, g_str_equal);
- g_free (change_id);
-
- for (l = ctxt->changed; l != NULL; l = l->next) {
- ECalChange *ccc = l->data;
- const char *uid;
-
- e_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 E_CAL_CHANGE_ADDED:
- add_records++;
- break;
- case E_CAL_CHANGE_MODIFIED:
- mod_records++;
- break;
- case E_CAL_CHANGE_DELETED:
- del_records++;
- break;
- }
- } else if (ccc->type == E_CAL_CHANGE_DELETED) {
- e_pilot_map_remove_by_uid (ctxt->map, uid);
- }
- }
-
- /* Set the count information */
- num_records = g_list_length (ctxt->comps);
- 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);
- if (ctxt->cfg->sync_type == GnomePilotConduitSyncTypeCopyToPilot
- || ctxt->cfg->sync_type == GnomePilotConduitSyncTypeCopyFromPilot)
- ctxt->map->write_touched_only = TRUE;
-
- return 0;
-}
-
-static gint
-post_sync (GnomePilotConduit *conduit,
- GnomePilotDBInfo *dbi,
- EToDoConduitContext *ctxt)
-{
- GList *changed;
- gchar *filename, *change_id;
-
- LOG (g_message ( "post_sync: ToDo Conduit v.%s", CONDUIT_VERSION ));
-
- g_free (ctxt->cfg->last_uri);
- ctxt->cfg->last_uri = g_strdup (e_cal_get_uri (ctxt->client));
- todoconduit_save_configuration (ctxt->cfg);
-
- 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);
- if (e_cal_get_changes (ctxt->client, change_id, &changed, NULL))
- e_cal_free_change_list (changed);
- g_free (change_id);
-
- LOG (g_message ( "---------------------------------------------------------\n" ));
-
- return 0;
-}
-
-static gint
-set_pilot_id (GnomePilotConduitSyncAbs *conduit,
- EToDoLocalRecord *local,
- guint32 ID,
- EToDoConduitContext *ctxt)
-{
- const char *uid;
-
- LOG (g_message ( "set_pilot_id: setting to %d\n", ID ));
-
- e_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 (g_message ( "set_status_cleared: clearing status\n" ));
-
- e_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 *comps, *iterator;
- static int count;
-
- g_return_val_if_fail (local != NULL, -1);
-
- if (*local == NULL) {
- LOG (g_message ( "beginning for_each" ));
-
- comps = ctxt->comps;
- count = 0;
-
- if (comps != NULL) {
- LOG (g_message ( "iterating over %d records", g_list_length (comps)));
-
- *local = g_new0 (EToDoLocalRecord, 1);
- local_record_from_comp (*local, comps->data, ctxt);
- g_list_prepend (ctxt->locals, *local);
-
- iterator = comps;
- } else {
- LOG (g_message ( "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);
- g_list_prepend (ctxt->locals, *local);
- } else {
- LOG (g_message ( "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 (g_message ( "for_each_modified beginning\n" ));
-
- iterator = ctxt->changed;
-
- count = 0;
-
- LOG (g_message ( "iterating over %d records", g_hash_table_size (ctxt->changed_hash) ));
-
- iterator = next_changed_item (ctxt, iterator);
- if (iterator != NULL) {
- ECalChange *ccc = iterator->data;
-
- *local = g_new0 (EToDoLocalRecord, 1);
- local_record_from_comp (*local, ccc->comp, ctxt);
- g_list_prepend (ctxt->locals, *local);
- } else {
- LOG (g_message ( "no events" ));
-
- *local = NULL;
- }
- } else {
- count++;
- iterator = g_list_next (iterator);
- if (iterator && (iterator = next_changed_item (ctxt, iterator))) {
- ECalChange *ccc = iterator->data;
-
- *local = g_new0 (EToDoLocalRecord, 1);
- local_record_from_comp (*local, ccc->comp, ctxt);
- g_list_prepend (ctxt->locals, *local);
- } else {
- LOG (g_message ( "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 (g_message ("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 (g_message ( " equal" ));
- else
- LOG (g_message ( " not equal" ));
-
- return retval;
-}
-
-static gint
-add_record (GnomePilotConduitSyncAbs *conduit,
- GnomePilotRecord *remote,
- EToDoConduitContext *ctxt)
-{
- ECalComponent *comp;
- char *uid;
- int retval = 0;
-
- g_return_val_if_fail (remote != NULL, -1);
-
- LOG (g_message ( "add_record: adding %s to desktop\n", print_remote (remote) ));
-
- comp = comp_from_remote_record (conduit, remote, ctxt->default_comp, ctxt->timezone);
-
- /* Give it a new UID otherwise it will be the uid of the default comp */
- uid = e_cal_component_gen_uid ();
- e_cal_component_set_uid (comp, uid);
-
- if (!e_cal_create_object (ctxt->client, e_cal_component_get_icalcomponent (comp), NULL, NULL))
- return -1;
-
- e_pilot_map_insert (ctxt->map, remote->ID, uid, FALSE);
-
- g_object_unref (comp);
-
- return retval;
-}
-
-static gint
-replace_record (GnomePilotConduitSyncAbs *conduit,
- EToDoLocalRecord *local,
- GnomePilotRecord *remote,
- EToDoConduitContext *ctxt)
-{
- ECalComponent *new_comp;
- int retval = 0;
-
- g_return_val_if_fail (remote != NULL, -1);
-
- LOG (g_message ("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);
- g_object_unref (local->comp);
- local->comp = new_comp;
-
- if (!e_cal_modify_object (ctxt->client, e_cal_component_get_icalcomponent (new_comp),
- CALOBJ_MOD_ALL, NULL))
- return -1;
-
- 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);
-
- e_cal_component_get_uid (local->comp, &uid);
-
- LOG (g_message ( "delete_record: deleting %s\n", uid ));
-
- e_pilot_map_remove_by_uid (ctxt->map, uid);
- /* FIXME Error handling */
- e_cal_remove_object (ctxt->client, uid, NULL);
-
- 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 (g_message ( "archive_record: %s\n", archive ? "yes" : "no" ));
-
- e_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 (g_message ("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, TRUE);
-
- if (!uid)
- return 0;
-
- LOG (g_message ( " 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 (g_message ( "free_match: freeing\n" ));
-
- g_return_val_if_fail (local != NULL, -1);
-
- todoconduit_destroy_record (local);
-
- return 0;
-}
-
-static gint
-prepare (GnomePilotConduitSyncAbs *conduit,
- EToDoLocalRecord *local,
- GnomePilotRecord *remote,
- EToDoConduitContext *ctxt)
-{
- LOG (g_message ( "prepare: encoding local %s\n", print_local (local) ));
-
- *remote = local_record_to_pilot_record (local, ctxt);
-
- return 0;
-}
-
-/* Pilot Settings Callbacks */
-static void
-fill_widgets (EToDoConduitContext *ctxt)
-{
- e_pilot_settings_set_secret (E_PILOT_SETTINGS (ctxt->ps),
- ctxt->cfg->secret);
-
- e_todo_gui_fill_widgets (ctxt->gui, ctxt->cfg);
-}
-
-static gint
-create_settings_window (GnomePilotConduit *conduit,
- GtkWidget *parent,
- EToDoConduitContext *ctxt)
-{
- LOG (g_message ( "create_settings_window" ));
-
- ctxt->ps = e_pilot_settings_new ();
- ctxt->gui = e_todo_gui_new (E_PILOT_SETTINGS (ctxt->ps));
-
- gtk_container_add (GTK_CONTAINER (parent), ctxt->ps);
- gtk_widget_show (ctxt->ps);
-
- fill_widgets (ctxt);
-
- return 0;
-}
-static void
-display_settings (GnomePilotConduit *conduit, EToDoConduitContext *ctxt)
-{
- LOG (g_message ( "display_settings" ));
-
- fill_widgets (ctxt);
-}
-
-static void
-save_settings (GnomePilotConduit *conduit, EToDoConduitContext *ctxt)
-{
- LOG (g_message ( "save_settings" ));
-
- ctxt->new_cfg->secret = e_pilot_settings_get_secret (E_PILOT_SETTINGS (ctxt->ps));
- e_todo_gui_fill_config (ctxt->gui, ctxt->new_cfg);
-
- todoconduit_save_configuration (ctxt->new_cfg);
-}
-
-static void
-revert_settings (GnomePilotConduit *conduit, EToDoConduitContext *ctxt)
-{
- LOG (g_message ( "revert_settings" ));
-
- todoconduit_save_configuration (ctxt->cfg);
- todoconduit_destroy_configuration (ctxt->new_cfg);
- ctxt->new_cfg = todoconduit_dupe_configuration (ctxt->cfg);
-}
-
-GnomePilotConduit *
-conduit_get_gpilot_conduit (guint32 pilot_id)
-{
- GtkObject *retval;
- EToDoConduitContext *ctxt;
-
- LOG (g_message ( "in todo's conduit_get_gpilot_conduit\n" ));
-
- 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);
-
- /* Gui Settings */
- gtk_signal_connect (retval, "create_settings_window", (GtkSignalFunc) create_settings_window, ctxt);
- gtk_signal_connect (retval, "display_settings", (GtkSignalFunc) display_settings, ctxt);
- gtk_signal_connect (retval, "save_settings", (GtkSignalFunc) save_settings, ctxt);
- gtk_signal_connect (retval, "revert_settings", (GtkSignalFunc) revert_settings, 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/gui/.cvsignore b/calendar/gui/.cvsignore
deleted file mode 100644
index a2cee3711f..0000000000
--- a/calendar/gui/.cvsignore
+++ /dev/null
@@ -1,25 +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
-e-calendar-marshal.h
-e-calendar-marshal.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*.server
-GNOME_Evolution_Calendar*.server.in
diff --git a/calendar/gui/GNOME_Evolution_Calendar.server.in.in b/calendar/gui/GNOME_Evolution_Calendar.server.in.in
deleted file mode 100644
index cee3a6a103..0000000000
--- a/calendar/gui/GNOME_Evolution_Calendar.server.in.in
+++ /dev/null
@@ -1,146 +0,0 @@
-<oaf_info>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Calendar_Factory:@VERSION@"
- type="shlib"
- location="@COMPONENTDIR@/libevolution-calendar.so">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/ObjectFactory:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="name" type="string"
- _value="Evolution Calendar and Tasks"/>
-
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Calendar_iTip_Control:@VERSION@"
- type="factory"
- location="OAFIID:GNOME_Evolution_Calendar_Factory:@VERSION@">
-
- <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 scheduling message viewer"/>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Calendar_Component:@VERSION@"
- type="factory"
- location="OAFIID:GNOME_Evolution_Calendar_Factory:@VERSION@">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Evolution/Component:@VERSION@"/>
- </oaf_attribute>
-
- <oaf_attribute name="evolution:component_alias" type="string" value="calendar"/>
-
- <oaf_attribute name="name" type="string" _value="Evolution's Calendar component"/>
-
- <oaf_attribute name="evolution:button_label" type="string" _value="Calendars"/>
- <oaf_attribute name="evolution:button_icon" type="string" value="evolution-calendar.png"/>
- <oaf_attribute name="evolution:button_sort_order" type="string" value="-8"/>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Calendar_Control:@VERSION@"
- type="factory"
- location="OAFIID:GNOME_Evolution_Calendar_Factory:@VERSION@">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:BonoboControl/calendar-control:@VERSION@"/>
- <item value="IDL:Bonobo/Control: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="name" type="string"
- _value="Evolution Calendar viewer"/>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Tasks_Component:@VERSION@"
- type="factory"
- location="OAFIID:GNOME_Evolution_Calendar_Factory:@VERSION@">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Evolution/Component:@VERSION@"/>
- </oaf_attribute>
-
- <oaf_attribute name="evolution:component_alias" type="string" value="tasks"/>
-
- <oaf_attribute name="name" type="string" _value="Evolution's Tasks component"/>
-
- <oaf_attribute name="evolution:button_label" type="string" _value="Tasks"/>
- <oaf_attribute name="evolution:button_icon" type="string" value="evolution-tasks.png"/>
- <oaf_attribute name="evolution:button_sort_order" type="string" value="-8"/>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Tasks_Control:@VERSION@"
- type="factory"
- location="OAFIID:GNOME_Evolution_Calendar_Factory:@VERSION@">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:BonoboControl/tasks-control:@VERSION@"/>
- <item value="IDL:Bonobo/Control: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="name" type="string"
- _value="Evolution Tasks viewer"/>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Calendar_CompEditorFactory:@VERSION@"
- type="factory"
- location="OAFIID:GNOME_Evolution_Calendar_Factory:@VERSION@">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Evolution/Calendar/CompEditorFactory:@VERSION@"/>
- <item value="IDL:Bonobo/Unknown:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="name" type="string"
- _value="Evolution Calendar/Task editor"/>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Calendar_ConfigControl:@VERSION@"
- type="factory"
- location="OAFIID:GNOME_Evolution_Calendar_Factory:@VERSION@">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Evolution/ConfigControl:@VERSION@"/>
- </oaf_attribute>
-
- <oaf_attribute name="evolution2:config_item:title" type="string"
- _value="Calendar and Tasks"/>
-
- <oaf_attribute name="evolution2:config_item:description" type="string"
- _value="Configure your timezone, Calendar and Task List here "/>
-
- <oaf_attribute name="evolution2:config_item:icon_name" type="string"
- value="evolution-calendar.png"/>
-
- <oaf_attribute name="evolution2:config_item:type" type="stringv">
- <item value="calendar"/>
- <item value="tasks"/>
- </oaf_attribute>
-
- <oaf_attribute name="evolution2:config_item:priority" type="string" value="-7"/>
-
- <oaf_attribute name="name" type="string"
- _value="Evolution Calendar configuration control"/>
-
-</oaf_server>
-
-</oaf_info>
diff --git a/calendar/gui/Makefile.am b/calendar/gui/Makefile.am
deleted file mode 100644
index bdb5f454fa..0000000000
--- a/calendar/gui/Makefile.am
+++ /dev/null
@@ -1,261 +0,0 @@
-## CORBA stuff
-
-IDLS = \
- $(top_srcdir)/composer/Evolution-Composer.idl \
- $(top_srcdir)/calendar/idl/evolution-calendar.idl \
- $(top_srcdir)/addressbook/gui/component/select-names/Evolution-Addressbook-SelectNames.idl
-
-CALENDAR_IDL_GENERATED_H = \
- evolution-calendar.h
-CALENDAR_IDL_GENERATED_C = \
- evolution-calendar-common.c \
- evolution-calendar-skels.c \
- evolution-calendar-stubs.c
-CALENDAR_IDL_GENERATED = $(CALENDAR_IDL_GENERATED_C) $(CALENDAR_IDL_GENERATED_H)
-
-$(CALENDAR_IDL_GENERATED_H): $(IDLS)
- $(ORBIT_IDL) -I $(srcdir) $(IDL_INCLUDES) \
- $(top_srcdir)/calendar/idl/evolution-calendar.idl
-$(CALENDAR_IDL_GENERATED_C): $(CALENDAR_IDL_GENERATED_H)
-
-# Message composer IDL files
-
-COMPOSER_IDL_GENERATED_H = \
- Evolution-Composer.h
-COMPOSER_IDL_GENERATED_C = \
- Evolution-Composer-common.c \
- Evolution-Composer-skels.c \
- Evolution-Composer-stubs.c
-COMPOSER_IDL_GENERATED = $(COMPOSER_IDL_GENERATED_C) $(COMPOSER_IDL_GENERATED_H)
-
-$(COMPOSER_IDL_GENERATED_H): $(IDLS)
- $(ORBIT_IDL) -I $(srcdir) $(IDL_INCLUDES) \
- $(srcdir)/../../composer/Evolution-Composer.idl
-$(COMPOSER_IDL_GENERATED_C): $(COMPOSER_IDL_GENERATED_H)
-
-# SelectNames IDL files
-
-SELECT_NAMES_IDL_GENERATED_H = \
- Evolution-Addressbook-SelectNames.h
-SELECT_NAMES_IDL_GENERATED_C = \
- Evolution-Addressbook-SelectNames-common.c \
- Evolution-Addressbook-SelectNames-skels.c \
- Evolution-Addressbook-SelectNames-stubs.c
-SELECT_NAMES_IDL_GENERATED = $(SELECT_NAMES_IDL_GENERATED_C) $(SELECT_NAMES_IDL_GENERATED_H)
-
-$(SELECT_NAMES_IDL_GENERATED_H): $(IDLS)
- $(ORBIT_IDL) -I $(srcdir) $(IDL_INCLUDES) \
- $(top_srcdir)/addressbook/gui/component/select-names/Evolution-Addressbook-SelectNames.idl
-$(SELECT_NAMES_IDL_GENERATED_C): $(SELECT_NAMES_IDL_GENERATED_H)
-
-
-IDL_GENERATED = $(CALENDAR_IDL_GENERATED) $(COMPOSER_IDL_GENERATED) $(SELECT_NAMES_IDL_GENERATED)
-
-# The marshallers
-MARSHAL_GENERATED = e-calendar-marshal.c e-calendar-marshal.h
-@EVO_MARSHAL_RULE@
-
-SUBDIRS = alarm-notify dialogs
-
-component_LTLIBRARIES = libevolution-calendar.la
-
-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)/widgets \
- -I$(top_srcdir)/a11y/calendar \
- -DEVOLUTION_DATADIR=\""$(datadir)"\" \
- -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
- -DEVOLUTION_ETSPECDIR=\""$(etspecdir)"\" \
- -DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\" \
- -DEVOLUTION_GALVIEWSDIR=\""$(viewsdir)"\" \
- -DEVOLUTION_UIDIR=\""$(evolutionuidir)"\" \
- -DPREFIX=\""$(prefix)"\" \
- $(EVOLUTION_CALENDAR_CFLAGS)
-
-glade_DATA = \
- e-itip-control.glade \
- goto-dialog.glade
-
-etspec_DATA = \
- e-calendar-table.etspec \
- e-meeting-time-sel.etspec \
- e-cal-list-view.etspec
-
-libevolution_calendar_la_SOURCES = \
- $(IDL_GENERATED) \
- $(MARSHAL_GENERATED) \
- cal-search-bar.c \
- cal-search-bar.h \
- calendar-config.c \
- calendar-config.h \
- calendar-config-keys.h \
- calendar-commands.c \
- calendar-commands.h \
- calendar-component.c \
- calendar-component.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 \
- e-alarm-list.c \
- e-alarm-list.h \
- e-cal-model-calendar.c \
- e-cal-model-calendar.h \
- e-cal-model-tasks.c \
- e-cal-model-tasks.h \
- e-cal-model.c \
- e-cal-model.h \
- e-cal-view.c \
- e-cal-view.h \
- e-cal-list-view.c \
- e-cal-list-view.h \
- e-cal-list-view-config.c \
- e-cal-list-view-config.h \
- e-calendar-table.c \
- e-calendar-table.h \
- e-calendar-table-config.c \
- e-calendar-table-config.h \
- e-cell-date-edit-config.c \
- e-cell-date-edit-config.h \
- e-cell-date-edit-text.h \
- e-cell-date-edit-text.c \
- e-comp-editor-registry.c \
- e-comp-editor-registry.h \
- e-date-edit-config.c \
- e-date-edit-config.h \
- e-date-time-list.c \
- e-date-time-list.h \
- e-day-view-config.c \
- e-day-view-config.h \
- 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-list-view.c \
- e-meeting-list-view.h \
- e-meeting-store.c \
- e-meeting-store.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-meeting-utils.c \
- e-meeting-utils.h \
- e-mini-calendar-config.c \
- e-mini-calendar-config.h \
- e-select-names-editable.c \
- e-select-names-editable.h \
- e-select-names-renderer.c \
- e-select-names-renderer.h \
- e-week-view-config.c \
- e-week-view-config.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-bonobo-control.c \
- itip-bonobo-control.h \
- itip-utils.c \
- itip-utils.h \
- main.c \
- migration.c \
- migration.h \
- misc.c \
- misc.h \
- print.c \
- print.h \
- tag-calendar.c \
- tag-calendar.h \
- tasks-component.c \
- tasks-component.h \
- tasks-control.c \
- tasks-control.h \
- weekday-picker.c \
- weekday-picker.h
-
-libevolution_calendar_la_LIBADD = \
- $(top_builddir)/widgets/menus/libmenus.la \
- $(top_builddir)/shell/libeshell.la \
- $(top_builddir)/calendar/gui/dialogs/libcal-dialogs.la \
- $(top_builddir)/widgets/e-timezone-dialog/libetimezonedialog.la \
- $(top_builddir)/widgets/misc/libemiscwidgets.la \
- $(top_builddir)/e-util/libeutil.la \
- $(top_builddir)/a11y/calendar/libevolution-calendar-a11y.la \
- $(EVOLUTION_CALENDAR_LIBS)
-
-libevolution_calendar_la_LDFLAGS = -avoid-version -module
-
-server_in_files = GNOME_Evolution_Calendar.server.in.in
-server_DATA = $(server_in_files:.server.in.in=_$(BASE_VERSION).server)
-@EVO_SERVER_RULE@
-@INTLTOOL_SERVER_RULE@
-
-# GConf schemas
-
-schemadir = $(GCONF_SCHEMA_FILE_DIR)
-schema_in_files = apps_evolution_calendar.schemas.in.in
-schema_DATA = $(schema_in_files:.schemas.in.in=-$(BASE_VERSION).schemas)
-%-$(BASE_VERSION).schemas.in: %.schemas.in.in
- cp $< $@
-
-@INTLTOOL_SCHEMAS_RULE@
-
-EXTRA_DIST = \
- e-calendar-marshal.list \
- $(glade_DATA) \
- $(schema_DATA) \
- $(etspec_DATA) \
- $(server_in_files)
-
-BUILT_SOURCES = $(IDL_GENERATED) $(server_DATA)
-CLEANFILES = $(BUILT_SOURCES)
-
-install-data-local:
- $(mkinstalldirs) $(Conduitsdir); \
- if test -z "$(DESTDIR)"; then \
- for p in $(schema_DATA); do \
- GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(srcdir)/$$p; \
- done; \
- fi
-
-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 d940a07146..0000000000
--- a/calendar/gui/alarm-notify/.cvsignore
+++ /dev/null
@@ -1,12 +0,0 @@
-.deps
-.libs
-.pure
-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*.server
-GNOME_Evolution_Calendar_AlarmNotify*.server.in
diff --git a/calendar/gui/alarm-notify/GNOME_Evolution_Calendar_AlarmNotify.server.in.in b/calendar/gui/alarm-notify/GNOME_Evolution_Calendar_AlarmNotify.server.in.in
deleted file mode 100644
index 3c43c4ca54..0000000000
--- a/calendar/gui/alarm-notify/GNOME_Evolution_Calendar_AlarmNotify.server.in.in
+++ /dev/null
@@ -1,16 +0,0 @@
-<oaf_info>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Calendar_AlarmNotify:@VERSION@"
- type="exe"
- location="@LIBEXECDIR@/evolution-alarm-notify">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/ObjectFactory:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="name" type="string"
- _value="Evolution Calendar 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 e5653e4433..0000000000
--- a/calendar/gui/alarm-notify/Makefile.am
+++ /dev/null
@@ -1,67 +0,0 @@
-CORBA_GENERATED_H = \
- evolution-calendar.h
-CORBA_GENERATED_C = \
- evolution-calendar-common.c \
- evolution-calendar-skels.c \
- evolution-calendar-stubs.c
-CORBA_GENERATED = $(CORBA_GENERATED_C) $(CORBA_GENERATED_H)
-
-idls = $(top_srcdir)/calendar/idl/evolution-calendar.idl
-idl_flags = $(IDL_INCLUDES)
-
-$(CORBA_GENERATED_H): $(idls)
- $(ORBIT_IDL) $(idl_flags) $(top_srcdir)/calendar/idl/evolution-calendar.idl
-$(CORBA_GENERATED_C): $(CORBA_GENERATED_H)
-
-
-privlibexec_PROGRAMS = evolution-alarm-notify
-
-
-INCLUDES = \
- -DG_LOG_DOMAIN=\"evolution-alarm-notify\" \
- -I$(top_srcdir) \
- -I$(top_srcdir)/widgets \
- -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
- -DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\" \
- -DEVOLUTION_LOCALEDIR=\""$(localedir)"\" \
- $(EVOLUTION_CALENDAR_CFLAGS)
-
-glade_DATA = \
- alarm-notify.glade
-
-evolution_alarm_notify_SOURCES = \
- $(CORBA_GENERATED) \
- alarm.c \
- alarm.h \
- alarm-notify.c \
- alarm-notify.h \
- alarm-notify-dialog.c \
- alarm-notify-dialog.h \
- alarm-queue.c \
- alarm-queue.h \
- config-data.c \
- config-data.h \
- notify-main.c \
- save.c \
- save.h \
- util.c \
- util.h
-
-evolution_alarm_notify_LDADD = \
- $(top_builddir)/e-util/libeutil.la \
- $(EVOLUTION_CALENDAR_LIBS)
-
-server_in_files = GNOME_Evolution_Calendar_AlarmNotify.server.in.in
-server_DATA = $(server_in_files:.server.in.in=_$(BASE_VERSION).server)
-@EVO_SERVER_RULE@
-@INTLTOOL_SERVER_RULE@
-
-EXTRA_DIST = \
- $(server_in_files) \
- $(glade_DATA)
-
-BUILT_SOURCES = $(CORBA_GENERATED) $(server_DATA)
-CLEANFILES = $(BUILT_SOURCES)
-
-dist-hook:
- cd $(distdir); rm -f $(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 e7c87c2156..0000000000
--- a/calendar/gui/alarm-notify/alarm-notify-dialog.c
+++ /dev/null
@@ -1,394 +0,0 @@
-/* Evolution calendar - alarm notification dialog
- *
- * Copyright (C) 2000 Ximian, Inc.
- * 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <gtk/gtklabel.h>
-#include <gtk/gtkspinbutton.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkscrolledwindow.h>
-#include <gtk/gtkwindow.h>
-#include <libgnome/gnome-i18n.h>
-#if 0
-# include <libgnomeui/gnome-winhints.h>
-#endif
-#include <libgnomeui/gnome-window-icon.h>
-#include <glade/glade.h>
-#include <e-util/e-time-utils.h>
-#include <gtkhtml/gtkhtml.h>
-#include <gtkhtml/gtkhtml-stream.h>
-#include <libecal/e-cal-time-util.h>
-#include "alarm-notify-dialog.h"
-#include "config-data.h"
-#include "util.h"
-
-
-GtkWidget *make_html_display (gchar *widget_name, char *s1, char *s2, int scroll, int shadow);
-
-/* The useful contents of the alarm notify dialog */
-typedef struct {
- GladeXML *xml;
-
- GtkWidget *dialog;
- GtkWidget *close;
- GtkWidget *snooze;
- GtkWidget *edit;
- GtkWidget *snooze_time;
- GtkWidget *html;
-
- 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;
- g_object_unref (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);
-}
-
-static void
-url_requested_cb (GtkHTML *html, const char *url, GtkHTMLStream *stream, gpointer data)
-{
-
- if (!strncmp ("file:///", url, strlen ("file:///"))) {
- FILE *fp;
- const char *filename = url + strlen ("file://");
- char buf[4096];
- size_t len;
-
- fp = fopen (filename, "r");
-
- if (fp == NULL) {
- g_warning ("Error opening image: %s\n", url);
- gtk_html_stream_close (stream, GTK_HTML_STREAM_ERROR);
- return;
- }
-
- while ((len = fread (buf, 1, sizeof(buf), fp)) > 0)
- gtk_html_stream_write (stream, buf, len);
-
- if (feof (fp)) {
- fclose (fp);
- gtk_html_stream_close (stream, GTK_HTML_STREAM_OK);
- return;
- }
-
- fclose (fp);
- }
-
- g_warning ("Error loading image");
- gtk_html_stream_close (stream, GTK_HTML_STREAM_ERROR);
- return;
-}
-
-GtkWidget *
-make_html_display (gchar *widget_name, char *s1, char *s2, int scroll, int shadow)
-{
- GtkWidget *html, *scrolled_window;
-
- gtk_widget_push_colormap (gdk_rgb_get_colormap ());
-
- html = gtk_html_new();
-
- gtk_html_set_default_content_type (GTK_HTML (html),
- "charset=utf-8");
- gtk_html_load_empty (GTK_HTML (html));
-
- g_signal_connect (html, "url_requested",
- G_CALLBACK (url_requested_cb),
- NULL);
-
- gtk_widget_pop_colormap();
-
- 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_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window),
- GTK_SHADOW_IN);
-
- gtk_widget_set_size_request (scrolled_window, 300, 200);
-
- gtk_container_add(GTK_CONTAINER (scrolled_window), html);
-
- gtk_widget_show_all(scrolled_window);
-
- g_object_set_data (G_OBJECT (scrolled_window), "html", html);
- return scrolled_window;
-}
-
-static void
-write_times (GtkHTMLStream *stream, char *start, char *end)
-{
- if (start)
- gtk_html_stream_printf (stream, "<b>%s</b> %s<br>", _("Starting:"), start);
- if (end)
- gtk_html_stream_printf (stream, "<b>%s</b> %s<br>", _("Ending:"), end);
-
-}
-
-/* Creates a heading for the alarm notification dialog */
-static void
-write_html_heading (GtkHTMLStream *stream, const char *message,
- ECalComponentVType vtype, time_t occur_start, time_t occur_end)
-{
- char *buf;
- char *start, *end;
- char *bg_path = "file://" EVOLUTION_IMAGESDIR "/bcg.png";
- char *image_path = "file://" EVOLUTION_IMAGESDIR "/alarm.png";
- icaltimezone *current_zone;
-
- /* Stringize the times */
-
- current_zone = config_data_get_timezone ();
-
- buf = timet_to_str_with_zone (occur_start, current_zone);
- start = g_locale_to_utf8 (buf, -1, NULL, NULL, NULL);
- g_free (buf);
-
- buf = timet_to_str_with_zone (occur_end, current_zone);
- end = g_locale_to_utf8 (buf, -1, NULL, NULL, NULL);
- g_free (buf);
-
- /* Write the header */
-
- gtk_html_stream_printf (stream,
- "<HTML><BODY background=\"%s\">"
- "<TABLE WIDTH=\"100%%\">"
- "<TR>"
- "<TD><IMG SRC=\"%s\" ALIGN=\"top\" BORDER=\"0\"></TD>"
- "<TD><H1>%s</H1></TD>"
- "</TR>"
- "</TABLE>",
- bg_path,
- image_path,
- _("Evolution Alarm"));
-
- gtk_html_stream_printf (stream, "<br><br><font size=\"+2\">%s</font><br><br>", message);
-
- /* Write the times */
-
- switch (vtype) {
- case E_CAL_COMPONENT_EVENT:
- write_times (stream, start, end);
- break;
-
- case E_CAL_COMPONENT_TODO:
- write_times (stream, start, end);
- break;
-
- default:
- /* Only VEVENTs and VTODOs can have alarms */
- g_assert_not_reached ();
- break;
- }
-
- g_free (start);
- g_free (end);
-}
-
-/**
- * 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: a pointer to the dialog structure if successful or NULL if an error occurs.
- **/
-gpointer
-alarm_notify_dialog (time_t trigger, time_t occur_start, time_t occur_end,
- ECalComponentVType vtype, const char *message,
- AlarmNotifyFunc func, gpointer func_data)
-{
- AlarmNotify *an;
- GtkHTMLStream *stream;
- icaltimezone *current_zone;
- char *buf, *title;
-
- g_return_val_if_fail (trigger != -1, NULL);
-
- /* Only VEVENTs or VTODOs can have alarms */
- g_return_val_if_fail (vtype == E_CAL_COMPONENT_EVENT || vtype == E_CAL_COMPONENT_TODO, NULL);
- g_return_val_if_fail (message != NULL, NULL);
- g_return_val_if_fail (func != NULL, NULL);
-
- an = g_new0 (AlarmNotify, 1);
-
- an->func = func;
- an->func_data = func_data;
-
- an->xml = glade_xml_new (EVOLUTION_GLADEDIR "/alarm-notify.glade", NULL, NULL);
- if (!an->xml) {
- g_message ("alarm_notify_dialog(): Could not load the Glade XML file!");
- g_free (an);
- return NULL;
- }
-
- 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->snooze_time = glade_xml_get_widget (an->xml, "snooze-time");
- an->html = g_object_get_data (G_OBJECT (glade_xml_get_widget (an->xml, "frame")), "html");
-
- if (!(an->dialog && an->close && an->snooze && an->edit
- && an->snooze_time)) {
- g_message ("alarm_notify_dialog(): Could not find all widgets in Glade file!");
- g_object_unref (an->xml);
- g_free (an);
- return NULL;
- }
-
- g_signal_connect (G_OBJECT (an->dialog), "destroy",
- G_CALLBACK (dialog_destroy_cb),
- an);
-
- /* Title */
-
- current_zone = config_data_get_timezone ();
-
- buf = timet_to_str_with_zone (trigger, current_zone);
- title = g_strdup_printf (_("Alarm on %s"), buf);
- g_free (buf);
-
- gtk_window_set_title (GTK_WINDOW (an->dialog), title);
- g_free (title);
-
- /* html heading */
- stream = gtk_html_begin (GTK_HTML (an->html));
- write_html_heading (stream, message, vtype, occur_start, occur_end);
- gtk_html_stream_close (stream, GTK_HTML_STREAM_OK);
-
- /* Connect actions */
-
- g_signal_connect (an->dialog, "delete_event",
- G_CALLBACK (delete_event_cb),
- an);
-
- g_signal_connect (an->close, "clicked",
- G_CALLBACK (close_clicked_cb),
- an);
-
- g_signal_connect (an->snooze, "clicked",
- G_CALLBACK (snooze_clicked_cb),
- an);
-
- g_signal_connect (an->edit, "clicked",
- G_CALLBACK (edit_clicked_cb),
- an);
-
- /* Run! */
-
- if (!GTK_WIDGET_REALIZED (an->dialog))
- gtk_widget_realize (an->dialog);
-
- gtk_window_stick (GTK_WINDOW (an->dialog));
- gtk_window_set_icon_from_file (GTK_WINDOW (an->dialog), EVOLUTION_IMAGESDIR "/alarm.png", NULL);
-
- gtk_widget_show (an->dialog);
- return an;
-}
-
-void
-alarm_notify_dialog_disable_buttons (gpointer dialog)
-{
- AlarmNotify *an = dialog;
-
- gtk_widget_set_sensitive (an->snooze, FALSE);
- gtk_widget_set_sensitive (an->edit, FALSE);
-}
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 9bebce0a08..0000000000
--- a/calendar/gui/alarm-notify/alarm-notify-dialog.h
+++ /dev/null
@@ -1,44 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 <libecal/e-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);
-
-gpointer alarm_notify_dialog (time_t trigger, time_t occur_start, time_t occur_end,
- ECalComponentVType vtype, const char *message,
- AlarmNotifyFunc func, gpointer func_data);
-void alarm_notify_dialog_disable_buttons (gpointer dialog);
-
-
-#endif
diff --git a/calendar/gui/alarm-notify/alarm-notify.c b/calendar/gui/alarm-notify/alarm-notify.c
deleted file mode 100644
index 9e7f1335a8..0000000000
--- a/calendar/gui/alarm-notify/alarm-notify.c
+++ /dev/null
@@ -1,200 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <libecal/e-cal.h>
-#include "alarm-notify.h"
-#include "alarm-queue.h"
-#include "save.h"
-#include "e-util/e-url.h"
-
-
-
-/* Private part of the AlarmNotify structure */
-struct _AlarmNotifyPrivate {
- /* Mapping from EUri's to LoadedClient structures */
- GHashTable *uri_client_hash;
-};
-
-
-
-static void alarm_notify_class_init (AlarmNotifyClass *klass);
-static void alarm_notify_init (AlarmNotify *an, AlarmNotifyClass *klass);
-static void alarm_notify_finalize (GObject *object);
-
-
-static BonoboObjectClass *parent_class;
-
-
-
-GType
-alarm_notify_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static GTypeInfo info = {
- sizeof (AlarmNotifyClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) alarm_notify_class_init,
- NULL, NULL,
- sizeof (AlarmNotify),
- 0,
- (GInstanceInitFunc) alarm_notify_init
- };
- type = g_type_register_static (G_TYPE_OBJECT, "AlarmNotify", &info, 0);
- }
-
- return type;
-}
-
-/* Class initialization function for the alarm notify service */
-static void
-alarm_notify_class_init (AlarmNotifyClass *klass)
-{
- GObjectClass *object_class;
-
- object_class = (GObjectClass *) klass;
-
- parent_class = g_type_class_peek_parent (klass);
-
- object_class->finalize = alarm_notify_finalize;
-}
-
-/* Object initialization function for the alarm notify system */
-static void
-alarm_notify_init (AlarmNotify *an, AlarmNotifyClass *klass)
-{
- AlarmNotifyPrivate *priv;
-
- priv = g_new0 (AlarmNotifyPrivate, 1);
- an->priv = priv;
-
- priv->uri_client_hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref);
-}
-
-static void
-free_client_hash (gpointer key, gpointer value, gpointer user_data)
-{
- char *uri = key;
- ECal *client = value;
-
- g_free (uri);
- g_object_unref (client);
-}
-
-/* Finalize handler for the alarm notify system */
-static void
-alarm_notify_finalize (GObject *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, (GHFunc) free_client_hash, NULL);
- g_hash_table_destroy (priv->uri_client_hash);
-
- g_free (priv);
-
- if (G_OBJECT_CLASS (parent_class)->finalize)
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
-}
-
-
-
-/**
- * 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 = g_object_new (TYPE_ALARM_NOTIFY, NULL);
- return an;
-}
-
-/**
- * alarm_notify_add_calendar:
- * @an: An alarm notification service.
- * @uri: URI of the calendar to load.
- * @load_afterwards: Whether this calendar should be loaded in the future
- * when the alarm daemon starts up.
- *
- * Tells the alarm notification service to load a calendar and start monitoring
- * its alarms. It can optionally be made to save the URI of this calendar so
- * that it can be loaded in the future when the alarm daemon starts up.
- **/
-void
-alarm_notify_add_calendar (AlarmNotify *an, const char *str_uri, gboolean load_afterwards)
-{
- AlarmNotifyPrivate *priv;
- ECal *client;
-
- g_return_if_fail (an != NULL);
- g_return_if_fail (IS_ALARM_NOTIFY (an));
- g_return_if_fail (str_uri != NULL);
-
- priv = an->priv;
-
- /* See if we already know about this uri */
- if (g_hash_table_lookup (priv->uri_client_hash, str_uri))
- return;
-
- client = e_cal_new_from_uri (str_uri, CALOBJ_TYPE_EVENT);
-
- if (client) {
- if (e_cal_open (client, FALSE, NULL)) {
- g_hash_table_insert (priv->uri_client_hash,
- g_strdup (str_uri), client);
- }
- }
-}
-
-void
-alarm_notify_remove_calendar (AlarmNotify *an, const char *str_uri)
-{
- AlarmNotifyPrivate *priv;
- ECal *client;
-
- priv = an->priv;
-
- client = g_hash_table_lookup (priv->uri_client_hash, str_uri);
- if (client) {
- alarm_queue_remove_client (client);
-
- g_hash_table_remove (priv->uri_client_hash, str_uri);
- }
-}
diff --git a/calendar/gui/alarm-notify/alarm-notify.glade b/calendar/gui/alarm-notify/alarm-notify.glade
deleted file mode 100644
index bc0da43f22..0000000000
--- a/calendar/gui/alarm-notify/alarm-notify.glade
+++ /dev/null
@@ -1,189 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-
-<widget class="GtkWindow" id="alarm-notify">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="title" translatable="yes"></property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
-
- <child>
- <widget class="GtkVBox" id="vbox2">
- <property name="border_width">4</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHBox" id="hbox3">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkVBox" id="vbox5">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="Custom" id="frame">
- <property name="visible">True</property>
- <property name="creation_function">make_html_display</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Thu, 11 Oct 2001 08:19:04 GMT</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox4">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkButton" id="close">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">C_lose</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="snooze">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Snoo_ze</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="edit">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Edit appointment</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHSeparator" id="hseparator1">
- <property name="visible">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox4">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label4">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Snooze time (minutes)</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkSpinButton" id="snooze-time">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">False</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="snap_to_ticks">False</property>
- <property name="wrap">False</property>
- <property name="adjustment">5 1 1440 1 5 5</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/calendar/gui/alarm-notify/alarm-notify.h b/calendar/gui/alarm-notify/alarm-notify.h
deleted file mode 100644
index 418ae23878..0000000000
--- a/calendar/gui/alarm-notify/alarm-notify.h
+++ /dev/null
@@ -1,62 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 <glib-object.h>
-
-
-
-#define TYPE_ALARM_NOTIFY (alarm_notify_get_type ())
-#define ALARM_NOTIFY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ALARM_NOTIFY, AlarmNotify))
-#define ALARM_NOTIFY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ALARM_NOTIFY, \
- AlarmNotifyClass))
-#define IS_ALARM_NOTIFY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ALARM_NOTIFY))
-#define IS_ALARM_NOTIFY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ALARM_NOTIFY))
-
-typedef struct _AlarmNotify AlarmNotify;
-typedef struct _AlarmNotifyClass AlarmNotifyClass;
-
-typedef struct _AlarmNotifyPrivate AlarmNotifyPrivate;
-
-struct _AlarmNotify {
- GObject object;
-
- /* Private data */
- AlarmNotifyPrivate *priv;
-};
-
-struct _AlarmNotifyClass {
- GObjectClass parent_class;
-};
-
-GType alarm_notify_get_type (void);
-
-AlarmNotify *alarm_notify_new (void);
-
-void alarm_notify_add_calendar (AlarmNotify *an, const char *str_uri, gboolean load_afterwards);
-void alarm_notify_remove_calendar (AlarmNotify *an, const char *str_uri);
-
-
-
-
-#endif
diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c
deleted file mode 100644
index 2cf95f47b7..0000000000
--- a/calendar/gui/alarm-notify/alarm-queue.c
+++ /dev/null
@@ -1,1301 +0,0 @@
-/* Evolution calendar - Alarm queueing engine
- *
- * 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <bonobo-activation/bonobo-activation.h>
-#include <bonobo/bonobo-object.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkbox.h>
-#include <gtk/gtkdialog.h>
-#include <gtk/gtkeventbox.h>
-#include <gtk/gtkimage.h>
-#include <gtk/gtklabel.h>
-#include <gtk/gtkcheckbutton.h>
-#include <gtk/gtkstock.h>
-#include <gtk/gtktooltips.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnome/gnome-exec.h>
-#include <libgnome/gnome-sound.h>
-#include <libgnomeui/gnome-dialog-util.h>
-#include <libgnomeui/gnome-uidefs.h>
-#include <e-util/eggtrayicon.h>
-#include <libecal/e-cal-time-util.h>
-#include "evolution-calendar.h"
-#include "alarm.h"
-#include "alarm-notify-dialog.h"
-#include "alarm-queue.h"
-#include "config-data.h"
-#include "save.h"
-#include "util.h"
-
-
-
-/* Whether the queueing system has been initialized */
-static gboolean alarm_queue_inited;
-
-/* When the alarm queue system is inited, this gets set to the last time an
- * alarm notification was issued. This lets us present any notifications that
- * should have happened while the alarm daemon was not running.
- */
-static time_t saved_notification_time;
-
-/* Clients we are monitoring for alarms */
-static GHashTable *client_alarms_hash = NULL;
-
-/* Structure that stores a client we are monitoring */
-typedef struct {
- /* Monitored client */
- ECal *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 ECalComponentAlarms and the mapping from queued alarm IDs to the
- * actual alarm instance structures.
- */
-typedef struct {
- /* The parent client alarms structure */
- ClientAlarms *parent_client;
-
- /* The component's UID */
- char *uid;
-
- /* The actual component and its alarm instances */
- ECalComponentAlarms *alarms;
-
- /* List of QueuedAlarm structures */
- GSList *queued_alarms;
-
- /* Flags */
- gboolean expecting_update;
-} 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 */
- ECalComponentAlarmInstance *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_for_today (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;
- icaltimezone *zone;
-
- g_assert (midnight_refresh_id == NULL);
-
- zone = config_data_get_timezone ();
-
- midnight = time_day_end_with_zone (time (NULL), zone);
-
- 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_for_today (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 (ECal *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)
- return qa;
- }
-
- /* not found, might have been updated/removed */
- return NULL;
-}
-
-/* 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,
- gboolean free_object, gboolean remove_alarm)
-{
- QueuedAlarm *qa;
- GSList *l;
-
- qa = NULL;
-
- for (l = cqa->queued_alarms; l; l = l->next) {
- qa = l->data;
- if (qa->alarm_id == alarm_id)
- break;
- }
-
- if (!l)
- return;
-
- cqa->queued_alarms = g_slist_remove_link (cqa->queued_alarms, l);
- g_slist_free_1 (l);
-
- if (remove_alarm) {
- cqa->expecting_update = TRUE;
- e_cal_discard_alarm (cqa->parent_client->client, cqa->alarms->comp,
- qa->instance->auid, NULL);
- cqa->expecting_update = FALSE;
- }
-
- g_free (qa);
-
- /* If this was the last queued alarm for this component, remove the
- * component itself.
- */
-
- if (cqa->queued_alarms != NULL)
- return;
-
- if (free_object) {
- g_hash_table_remove (cqa->parent_client->uid_alarms_hash, cqa->uid);
- g_free (cqa->uid);
- cqa->uid = NULL;
- cqa->parent_client = NULL;
- e_cal_component_alarms_free (cqa->alarms);
- g_free (cqa);
- } else {
- e_cal_component_alarms_free (cqa->alarms);
- cqa->alarms = NULL;
- }
-}
-
-/* Callback used when an alarm triggers */
-static void
-alarm_trigger_cb (gpointer alarm_id, time_t trigger, gpointer data)
-{
- CompQueuedAlarms *cqa;
- ECalComponent *comp;
- QueuedAlarm *qa;
- ECalComponentAlarm *alarm;
- ECalComponentAlarmAction action;
-
- cqa = data;
- comp = cqa->alarms->comp;
-
- save_notification_time (trigger);
- saved_notification_time = trigger;
-
- qa = lookup_queued_alarm (cqa, alarm_id);
- if (!qa)
- return;
-
- /* 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 = e_cal_component_get_alarm (comp, qa->instance->auid);
- g_assert (alarm != NULL);
-
- e_cal_component_alarm_get_action (alarm, &action);
- e_cal_component_alarm_free (alarm);
-
- switch (action) {
- case E_CAL_COMPONENT_ALARM_AUDIO:
- audio_notification (trigger, cqa, alarm_id);
- break;
-
- case E_CAL_COMPONENT_ALARM_DISPLAY:
- display_notification (trigger, cqa, alarm_id, TRUE);
- break;
-
- case E_CAL_COMPONENT_ALARM_EMAIL:
- mail_notification (trigger, cqa, alarm_id);
- break;
-
- case E_CAL_COMPONENT_ALARM_PROCEDURE:
- procedure_notification (trigger, cqa, alarm_id);
- break;
-
- default:
- g_assert_not_reached ();
- break;
- }
-}
-
-/* Adds the alarms in a ECalComponentAlarms 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, ECalComponentAlarms *alarms)
-{
- const char *uid;
- CompQueuedAlarms *cqa;
- GSList *l;
-
- /* No alarms? */
- if (alarms->alarms == NULL) {
- e_cal_component_alarms_free (alarms);
- return;
- }
-
- cqa = g_new (CompQueuedAlarms, 1);
- cqa->parent_client = ca;
- cqa->alarms = alarms;
- cqa->expecting_update = FALSE;
-
- cqa->queued_alarms = NULL;
-
- for (l = alarms->alarms; l; l = l->next) {
- ECalComponentAlarmInstance *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);
- }
-
- e_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);
-
- e_cal_component_alarms_free (cqa->alarms);
- cqa->alarms = NULL;
-
- g_free (cqa);
- return;
- }
-
- cqa->queued_alarms = g_slist_reverse (cqa->queued_alarms);
- cqa->uid = g_strdup (uid);
- g_hash_table_insert (ca->uid_alarms_hash, cqa->uid, cqa);
-}
-
-/* Loads the alarms of a client for a given range of time */
-static void
-load_alarms (ClientAlarms *ca, time_t start, time_t end)
-{
- GSList *comp_alarms;
- GSList *l;
-
- comp_alarms = e_cal_get_alarms_in_range (ca->client, start, end);
-
- for (l = comp_alarms; l; l = l->next) {
- ECalComponentAlarms *alarms;
-
- alarms = l->data;
- add_component_alarms (ca, alarms);
- }
-
- g_slist_free (comp_alarms);
-}
-
-/* Loads today's remaining alarms for a client */
-static void
-load_alarms_for_today (ClientAlarms *ca)
-{
- time_t now, day_end;
- icaltimezone *zone;
-
- now = time (NULL);
-
- zone = config_data_get_timezone ();
-
- day_end = time_day_end_with_zone (now, zone);
- load_alarms (ca, now, day_end);
-}
-
-/* Adds any alarms that should have occurred while the alarm daemon was not
- * running.
- */
-static void
-load_missed_alarms (ClientAlarms *ca)
-{
- time_t now;
-
- now = time (NULL);
-
- g_assert (saved_notification_time != -1);
-
- /* We add 1 to the saved_notification_time to make the time ranges
- * half-open; we do not want to display the "last" displayed alarm
- * twice, once when it occurs and once when the alarm daemon restarts.
- */
- load_alarms (ca, saved_notification_time + 1, now);
-}
-
-/* Called when a calendar client finished loading; we load its alarms */
-static void
-cal_opened_cb (ECal *client, ECalendarStatus status, gpointer data)
-{
- ClientAlarms *ca;
-
- ca = data;
-
- if (status != E_CALENDAR_STATUS_OK)
- return;
-
- load_alarms_for_today (ca);
- load_missed_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);
-}
-
-static void
-remove_alarms (CompQueuedAlarms *cqa, gboolean free_object)
-{
- GSList *l;
-
- 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, free_object, FALSE);
- }
-
-}
-
-/* Removes a component an its alarms */
-static void
-remove_comp (ClientAlarms *ca, const char *uid)
-{
- CompQueuedAlarms *cqa;
-
- 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);
-
- remove_alarms (cqa, TRUE);
-
- /* 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 (ECal *client, const char *uid, gpointer data)
-{
- ClientAlarms *ca;
- time_t now, day_end;
- ECalComponentAlarms *alarms;
- gboolean found;
- icaltimezone *zone;
- CompQueuedAlarms *cqa;
-
- ca = data;
-
- now = time (NULL);
-
- zone = config_data_get_timezone ();
-
- day_end = time_day_end_with_zone (now, zone);
-
- found = e_cal_get_alarms_for_object (ca->client, uid, now, day_end, &alarms);
-
- if (!found) {
- remove_comp (ca, uid);
- return;
- }
-
- cqa = lookup_comp_queued_alarms (ca, uid);
- if (!cqa)
- add_component_alarms (ca, alarms);
- else {
- GSList *l;
-
- /* if already in the list, just update it */
- remove_alarms (cqa, FALSE);
- cqa->alarms = alarms;
- cqa->queued_alarms = NULL;
-
- /* add the new alarms */
- for (l = cqa->alarms->alarms; l; l = l->next) {
- ECalComponentAlarmInstance *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 ("obj_updated_cb(): 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);
- }
-
- if (cqa->queued_alarms == NULL) {
- if (!cqa->expecting_update)
- remove_comp (ca, uid);
- } else
- cqa->queued_alarms = g_slist_reverse (cqa->queued_alarms);
- }
-}
-
-/* Called when a calendar component is removed; we must delete its corresponding
- * alarms.
- */
-static void
-obj_removed_cb (ECal *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;
- time_t t;
- gpointer new_id;
-
- orig_qa = lookup_queued_alarm (cqa, alarm_id);
- if (!orig_qa)
- return;
-
- 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;
- }
-
- orig_qa->instance->trigger = t;
- orig_qa->alarm_id = new_id;
- orig_qa->snooze = TRUE;
-}
-
-/* Launches a component editor for a component */
-static void
-edit_component (ECal *client, ECalComponent *comp)
-{
- const char *uid;
- const char *uri;
- CORBA_Environment ev;
- GNOME_Evolution_Calendar_CompEditorFactory factory;
-
- e_cal_component_get_uid (comp, &uid);
-
- uri = e_cal_get_uri (client);
-
- /* Get the factory */
-
- CORBA_exception_init (&ev);
- factory = bonobo_activation_activate_from_id ("OAFIID:GNOME_Evolution_Calendar_CompEditorFactory:" BASE_VERSION,
- 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);
-}
-
-
-/* /\* Callback used from the alarm notify dialog *\/ */
-/* static void */
-/* notify_dialog_cb (AlarmNotifyResult result, int snooze_mins, gpointer data) */
-/* { */
-
-/* switch (result) { */
-/* case ALARM_NOTIFY_SNOOZE: */
-/* create_snooze (c->cqa, c->alarm_id, snooze_mins); */
-
-/* g_object_unref (c->comp); */
-/* g_object_unref (c->client); */
-/* g_free (c); */
-/* return; */
-
-/* case ALARM_NOTIFY_EDIT: */
-/* edit_component (c->client, c->comp); */
-/* break; */
-
-/* case ALARM_NOTIFY_CLOSE: */
-/* /\* Do nothing *\/ */
-/* break; */
-
-/* default: */
-/* g_assert_not_reached (); */
-/* } */
-
-/* if (c->cqa != NULL) */
-/* remove_queued_alarm (c->cqa, c->alarm_id, TRUE, TRUE); */
-/* g_object_unref (c->comp); */
-/* g_object_unref (c->client); */
-/* g_free (c); */
-/* } */
-
-typedef struct {
- char *message;
- gboolean blink_state;
- gint blink_id;
- time_t trigger;
- CompQueuedAlarms *cqa;
- gpointer alarm_id;
- ECalComponent *comp;
- ECal *client;
- GtkWidget *tray_icon;
- GtkWidget *image;
- GtkWidget *alarm_dialog;
-} TrayIconData;
-
-static void
-on_dialog_obj_updated_cb (ECal *client, const char *uid, gpointer data)
-{
-/* commented out so gcc won't complain about the unused variable
- struct notify_dialog_closure *c = data;
-*/
-}
-
-static void
-on_dialog_obj_removed_cb (ECal *client, const char *uid, gpointer data)
-{
- const char *our_uid;
- TrayIconData *tray_data = data;
-
- e_cal_component_get_uid (tray_data->comp, &our_uid);
- g_return_if_fail (our_uid && *our_uid);
-
- if (!strcmp (uid, our_uid)) {
- alarm_notify_dialog_disable_buttons (tray_data->alarm_dialog);
- tray_data->cqa = NULL;
- tray_data->alarm_id = NULL;
- }
-}
-
-/* Callback used from the alarm notify dialog */
-static void
-notify_dialog_cb (AlarmNotifyResult result, int snooze_mins, gpointer data)
-{
- TrayIconData *tray_data = data;
-
- g_signal_handlers_disconnect_matched (tray_data->client, G_SIGNAL_MATCH_FUNC,
- 0, 0, NULL, on_dialog_obj_removed_cb, NULL);
-
- switch (result) {
- case ALARM_NOTIFY_SNOOZE:
- create_snooze (tray_data->cqa, tray_data->alarm_id, snooze_mins);
- tray_data->cqa = NULL;
- return;
-
- case ALARM_NOTIFY_EDIT:
- edit_component (tray_data->client, tray_data->comp);
- break;
-
- case ALARM_NOTIFY_CLOSE:
- /* Do nothing */
- break;
-
- default:
- g_assert_not_reached ();
- }
-
- tray_data->alarm_dialog = NULL;
- gtk_widget_destroy (tray_data->tray_icon);
-}
-
-static gint
-tray_icon_destroyed_cb (GtkWidget *tray, gpointer user_data)
-{
- TrayIconData *tray_data = user_data;
-
- if (tray_data->cqa != NULL)
- remove_queued_alarm (tray_data->cqa, tray_data->alarm_id, TRUE, TRUE);
-
- if (tray_data->message != NULL) {
- g_free (tray_data->message);
- tray_data->message = NULL;
- }
-
- g_source_remove (tray_data->blink_id);
-
- g_object_unref (tray_data->comp);
- g_object_unref (tray_data->client);
- g_free (tray_data);
-
- return TRUE;
-}
-
-static gint
-tray_icon_clicked_cb (GtkWidget *widget, GdkEventButton *event, gpointer user_data)
-{
- TrayIconData *tray_data = user_data;
-
- if (event->type == GDK_BUTTON_PRESS) {
- if (event->button == 1) {
- QueuedAlarm *qa;
-
- if (tray_data->alarm_dialog != NULL)
- return FALSE;
-
- qa = lookup_queued_alarm (tray_data->cqa, tray_data->alarm_id);
- if (qa) {
- gtk_widget_hide (tray_data->tray_icon);
- tray_data->alarm_dialog = alarm_notify_dialog (
- tray_data->trigger,
- qa->instance->occur_start,
- qa->instance->occur_end,
- e_cal_component_get_vtype (tray_data->comp),
- tray_data->message,
- notify_dialog_cb, tray_data);
- if (tray_data->alarm_dialog) {
- g_signal_connect (G_OBJECT (tray_data->client), "obj_removed",
- G_CALLBACK (on_dialog_obj_removed_cb), tray_data);
- }
- }
-
- return TRUE;
- } else if (event->button == 2) {
- return TRUE;
- }
- }
-
- return FALSE;
-}
-
-static gboolean
-tray_icon_blink_cb (gpointer data)
-{
- TrayIconData *tray_data = data;
-
- /* FIXME: Use stock image equivalents when they become available */
-
- tray_data->blink_state = tray_data->blink_state == TRUE ? FALSE : TRUE;
- gtk_image_set_from_file (GTK_IMAGE (tray_data->image),
- tray_data->blink_state == TRUE ?
- EVOLUTION_IMAGESDIR "/appointment-reminder-excl.png" :
- EVOLUTION_IMAGESDIR "/appointment-reminder.png");
-
- return TRUE;
-}
-
-/* Performs notification of a display alarm */
-static void
-display_notification (time_t trigger, CompQueuedAlarms *cqa,
- gpointer alarm_id, gboolean use_description)
-{
- QueuedAlarm *qa;
- ECalComponent *comp;
- ECal *client;
- ECalComponentVType vtype;
- const char *message;
- ECalComponentAlarm *alarm;
- GtkWidget *tray_icon, *image, *ebox;
- GtkTooltips *tooltips;
- TrayIconData *tray_data;
- ECalComponentText text;
- char *str, *start_str, *end_str, *alarm_str;
- icaltimezone *current_zone;
-
- comp = cqa->alarms->comp;
- qa = lookup_queued_alarm (cqa, alarm_id);
- if (!qa)
- return;
-
- vtype = e_cal_component_get_vtype (comp);
-
- /* get a sensible description for the event */
- alarm = e_cal_component_get_alarm (comp, qa->instance->auid);
- g_assert (alarm != NULL);
-
- e_cal_component_alarm_get_description (alarm, &text);
- e_cal_component_alarm_free (alarm);
-
- if (text.value)
- message = text.value;
- else {
- e_cal_component_get_summary (comp, &text);
- if (text.value)
- message = text.value;
- else
- message = _("No description available.");
- }
-
- /* create the tray icon */
- tooltips = gtk_tooltips_new ();
-
- /* FIXME: Use stock image equivalent when it becomes available */
- tray_icon = egg_tray_icon_new (qa->instance->auid);
- image = gtk_image_new_from_file (EVOLUTION_IMAGESDIR "/appointment-reminder.png");
- ebox = gtk_event_box_new ();
-
- gtk_widget_show (image);
- gtk_widget_show (ebox);
-
- current_zone = config_data_get_timezone ();
- alarm_str = timet_to_str_with_zone (trigger, current_zone);
- start_str = timet_to_str_with_zone (qa->instance->occur_start, current_zone);
- end_str = timet_to_str_with_zone (qa->instance->occur_end, current_zone);
- str = g_strdup_printf (_("Alarm on %s\n%s\nStarting at %s\nEnding at %s"),
- alarm_str, message, start_str, end_str);
- gtk_tooltips_set_tip (GTK_TOOLTIPS (tooltips), ebox, str, str);
- g_free (start_str);
- g_free (end_str);
- g_free (alarm_str);
- g_free (str);
-
- g_object_set_data (G_OBJECT (tray_icon), "image", image);
- g_object_set_data (G_OBJECT (tray_icon), "available", GINT_TO_POINTER (1));
-
- gtk_container_add (GTK_CONTAINER (ebox), image);
- gtk_container_add (GTK_CONTAINER (tray_icon), ebox);
-
- /* create the private structure */
- tray_data = g_new0 (TrayIconData, 1);
- tray_data->message = g_strdup (message);
- tray_data->trigger = trigger;
- tray_data->cqa = cqa;
- tray_data->alarm_id = alarm_id;
- tray_data->comp = e_cal_component_clone (comp);
- tray_data->client = cqa->parent_client->client;
- tray_data->image = image;
- tray_data->blink_state = FALSE;
- g_object_ref (tray_data->client);
- tray_data->tray_icon = tray_icon;
-
- g_signal_connect (G_OBJECT (tray_icon), "destroy",
- G_CALLBACK (tray_icon_destroyed_cb), tray_data);
- g_signal_connect (G_OBJECT (ebox), "button_press_event",
- G_CALLBACK (tray_icon_clicked_cb), tray_data);
-
- tray_data->blink_id = g_timeout_add (500, tray_icon_blink_cb, tray_data);
-
- gtk_widget_show (tray_icon);
-}
-
-/* Performs notification of an audio alarm */
-static void
-audio_notification (time_t trigger, CompQueuedAlarms *cqa,
- gpointer alarm_id)
-{
- QueuedAlarm *qa;
- ECalComponent *comp;
- ECalComponentAlarm *alarm;
- icalattach *attach;
-
- comp = cqa->alarms->comp;
- qa = lookup_queued_alarm (cqa, alarm_id);
- if (!qa)
- return;
-
- alarm = e_cal_component_get_alarm (comp, qa->instance->auid);
- g_assert (alarm != NULL);
-
- e_cal_component_alarm_get_attach (alarm, &attach);
- e_cal_component_alarm_free (alarm);
-
- if (attach && icalattach_get_is_url (attach)) {
- const char *url;
-
- url = icalattach_get_url (attach);
-
- if (url && *url && g_file_test (url, G_FILE_TEST_EXISTS))
- gnome_sound_play (url); /* this sucks */
- else
- gdk_beep ();
- }
-
- 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;
- GtkWidget *label;
-
- /* FIXME */
-
- display_notification (trigger, cqa, alarm_id, FALSE);
-
- dialog = gtk_dialog_new_with_buttons (_("Warning"),
- NULL, 0,
- GTK_STOCK_OK, GTK_RESPONSE_CANCEL,
- NULL);
- label = gtk_label_new (_("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."));
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), label, TRUE, TRUE, 4);
-
- gtk_dialog_run (GTK_DIALOG (dialog));
-}
-
-/* Performs notification of a procedure alarm */
-static gboolean
-procedure_notification_dialog (const char *cmd, const char *url)
-{
- GtkWidget *dialog, *label, *checkbox;
- char *str;
- int btn;
-
- if (is_blessed_program (url))
- return TRUE;
-
- dialog = gtk_dialog_new_with_buttons (_("Warning"),
- NULL, 0,
- GTK_STOCK_NO, GTK_RESPONSE_CANCEL,
- GTK_STOCK_YES, GTK_RESPONSE_OK,
- NULL);
-
- str = g_strdup_printf (_("An Evolution Calendar reminder is about to trigger. "
- "This reminder is configured to run the following program:\n\n"
- " %s\n\n"
- "Are you sure you want to run this program?"),
- cmd);
- label = gtk_label_new (str);
- 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 (GTK_DIALOG (dialog)->vbox),
- label, TRUE, TRUE, 4);
- g_free (str);
-
- checkbox = gtk_check_button_new_with_label
- (_("Do not ask me about this program again."));
- gtk_widget_show (checkbox);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
- checkbox, TRUE, TRUE, 4);
-
- /* Run the dialog */
- btn = gtk_dialog_run (GTK_DIALOG (dialog));
- if (btn == GTK_RESPONSE_OK && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbox)))
- save_blessed_program (url);
- gtk_widget_destroy (dialog);
-
- return (btn == GTK_RESPONSE_OK);
-}
-
-static void
-procedure_notification (time_t trigger, CompQueuedAlarms *cqa, gpointer alarm_id)
-{
- QueuedAlarm *qa;
- ECalComponent *comp;
- ECalComponentAlarm *alarm;
- ECalComponentText description;
- icalattach *attach;
- const char *url;
- char *cmd;
- int result;
-
- comp = cqa->alarms->comp;
- qa = lookup_queued_alarm (cqa, alarm_id);
- if (!qa)
- return;
-
- alarm = e_cal_component_get_alarm (comp, qa->instance->auid);
- g_assert (alarm != NULL);
-
- e_cal_component_alarm_get_attach (alarm, &attach);
- e_cal_component_alarm_get_description (alarm, &description);
- e_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;
-
- result = 0;
- if (procedure_notification_dialog (cmd, url))
- 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, TRUE, TRUE);
- 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.
- **/
-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 ();
-
- saved_notification_time = get_saved_notification_time ();
- if (saved_notification_time == -1) {
- saved_notification_time = time (NULL);
- save_notification_time (saved_notification_time);
- }
-
- alarm_queue_inited = TRUE;
-}
-
-static void
-free_client_alarms_cb (gpointer key, gpointer value, gpointer user_data)
-{
- ECal *client = key;
- ClientAlarms *ca = value;
-
- if (ca) {
- g_object_unref (ca->client);
- g_free (ca);
- }
-}
-
-/**
- * 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_foreach (client_alarms_hash, (GHFunc) free_client_alarms_cb, NULL);
- 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 (ECal *client)
-{
- ClientAlarms *ca;
-
- g_return_if_fail (alarm_queue_inited);
- g_return_if_fail (client != NULL);
- g_return_if_fail (E_IS_CAL (client));
-
- ca = lookup_client (client);
- if (ca) {
- ca->refcount++;
- return;
- }
-
- ca = g_new (ClientAlarms, 1);
-
- ca->client = client;
- g_object_ref (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 (e_cal_get_load_state (client) != E_CAL_LOAD_LOADED)
- g_signal_connect (client, "cal_opened",
- G_CALLBACK (cal_opened_cb),
- ca);
-
- g_signal_connect (client, "obj_updated",
- G_CALLBACK (obj_updated_cb),
- ca);
- g_signal_connect (client, "obj_removed",
- G_CALLBACK (obj_removed_cb),
- ca);
-
- if (e_cal_get_load_state (client) == E_CAL_LOAD_LOADED) {
- load_alarms_for_today (ca);
- load_missed_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 (ECal *client)
-{
- ClientAlarms *ca;
-
- g_return_if_fail (alarm_queue_inited);
- g_return_if_fail (client != NULL);
- g_return_if_fail (E_IS_CAL (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 */
-
- g_signal_handlers_disconnect_matched (ca->client, G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL, ca);
-
- g_object_unref (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 12802750ec..0000000000
--- a/calendar/gui/alarm-notify/alarm-queue.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Evolution calendar - Alarm queueing engine
- *
- * 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 <libecal/e-cal.h>
-
-
-void alarm_queue_init (void);
-void alarm_queue_done (void);
-
-void alarm_queue_add_client (ECal *client);
-void alarm_queue_remove_client (ECal *client);
-
-
-#endif
diff --git a/calendar/gui/alarm-notify/alarm.c b/calendar/gui/alarm-notify/alarm.c
deleted file mode 100644
index 8c6c4c59cd..0000000000
--- a/calendar/gui/alarm-notify/alarm.c
+++ /dev/null
@@ -1,305 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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. We do not need to be concerned with
- * timezones here, as this is just a periodic check on the alarm queue.
- */
-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 23fde886c9..0000000000
--- a/calendar/gui/alarm-notify/alarm.h
+++ /dev/null
@@ -1,42 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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_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/config-data.c b/calendar/gui/alarm-notify/config-data.c
deleted file mode 100644
index 3cad23d5cd..0000000000
--- a/calendar/gui/alarm-notify/config-data.c
+++ /dev/null
@@ -1,168 +0,0 @@
-/* Evolution calendar - Configuration values for the alarm notification daemon
- *
- * 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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_CONFIOH
-#include <config.h>
-#endif
-
-#include <libedataserver/e-source-list.h>
-#include "config-data.h"
-#include "save.h"
-
-
-
-/* Whether we have initied ourselves by reading the data from the configuration engine */
-static gboolean inited = FALSE;
-static GConfClient *conf_client = NULL;
-static ESourceList *calendar_source_list = NULL, *tasks_source_list = NULL;
-
-
-
-/* Copied from ../calendar-config.c; returns whether the locale has 'am' and
- * 'pm' strings defined.
- */
-static gboolean
-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
-do_cleanup (void)
-{
- if (calendar_source_list) {
- g_object_unref (calendar_source_list);
- calendar_source_list = NULL;
- }
-
- if (tasks_source_list) {
- g_object_unref (tasks_source_list);
- tasks_source_list = NULL;
- }
-
- g_object_unref (conf_client);
- conf_client = NULL;
-
- inited = FALSE;
-}
-
-/* Ensures that the configuration values have been read */
-static void
-ensure_inited (void)
-{
- if (inited)
- return;
-
- inited = TRUE;
-
- conf_client = gconf_client_get_default ();
- if (!GCONF_IS_CLIENT (conf_client)) {
- inited = FALSE;
- return;
- }
-
- g_atexit ((GVoidFunc) do_cleanup);
-
- /* load the sources for calendars and tasks */
- calendar_source_list = e_source_list_new_for_gconf (conf_client,
- "/apps/evolution/calendar/sources");
- tasks_source_list = e_source_list_new_for_gconf (conf_client,
- "/apps/evolution/tasks/sources");
-
-}
-
-GConfClient *
-config_data_get_conf_client (void)
-{
- ensure_inited ();
- return conf_client;
-}
-
-icaltimezone *
-config_data_get_timezone (void)
-{
- char *location;
- icaltimezone *local_timezone;
-
- ensure_inited ();
-
- location = gconf_client_get_string (conf_client,
- "/apps/evolution/calendar/display/timezone",
- NULL);
- if (location && location[0]) {
- local_timezone = icaltimezone_get_builtin_timezone (location);
- } else {
- local_timezone = icaltimezone_get_utc_timezone ();
- }
-
- g_free (location);
-
- return local_timezone;
-}
-
-gboolean
-config_data_get_24_hour_format (void)
-{
- ensure_inited ();
-
- if (locale_supports_12_hour_format ()) {
- return gconf_client_get_bool (conf_client,
- "/apps/evolution/calendar/display/use_24hour_format",
- NULL);
- }
-
- return TRUE;
-}
-
-GPtrArray *
-config_data_get_calendars_to_load (void)
-{
- GPtrArray *cals;
- GSList *groups, *gl, *sources, *sl;
-
- ensure_inited ();
-
- /* create the array to be returned */
- cals = g_ptr_array_new ();
-
- /* process calendar sources */
- groups = e_source_list_peek_groups (calendar_source_list);
- for (gl = groups; gl != NULL; gl = gl->next) {
- sources = e_source_group_peek_sources (E_SOURCE_GROUP (gl->data));
- for (sl = sources; sl != NULL; sl = sl->next) {
- g_ptr_array_add (cals, sl->data);
- }
- }
-
- /* process tasks sources */
- groups = e_source_list_peek_groups (tasks_source_list);
- for (gl = groups; gl != NULL; gl = gl->next) {
- sources = e_source_group_peek_sources (E_SOURCE_GROUP (gl->data));
- for (sl = sources; sl != NULL; sl = sl->next) {
- g_ptr_array_add (cals, sl->data);
- }
- }
-
- return cals;
-}
diff --git a/calendar/gui/alarm-notify/config-data.h b/calendar/gui/alarm-notify/config-data.h
deleted file mode 100644
index 26b5dc111f..0000000000
--- a/calendar/gui/alarm-notify/config-data.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Evolution calendar - Configuration values for the alarm notification daemon
- *
- * 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#ifndef CONFIG_DATA_H
-#define CONFIG_DATA_H
-
-#include <glib.h>
-#include <libical/ical.h>
-#include <gconf/gconf-client.h>
-
-GConfClient *config_data_get_conf_client (void);
-
-icaltimezone *config_data_get_timezone (void);
-gboolean config_data_get_24_hour_format (void);
-GPtrArray *config_data_get_calendars_to_load (void);
-
-#endif
diff --git a/calendar/gui/alarm-notify/notify-main.c b/calendar/gui/alarm-notify/notify-main.c
deleted file mode 100644
index 6897d00857..0000000000
--- a/calendar/gui/alarm-notify/notify-main.c
+++ /dev/null
@@ -1,192 +0,0 @@
-/* Evolution calendar - Alarm notification service main file
- *
- * Copyright (C) 2000 Ximian, Inc.
- * Copyright (C) 2003 Novell, 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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-i18n.h>
-#include <libgnome/gnome-init.h>
-#include <libgnome/gnome-sound.h>
-#include <libgnomeui/gnome-client.h>
-#include <libgnomeui/gnome-ui-init.h>
-#include <libgnomevfs/gnome-vfs-init.h>
-#include <glade/glade.h>
-#include <bonobo/bonobo-main.h>
-#include <bonobo/bonobo-generic-factory.h>
-#include <bonobo-activation/bonobo-activation.h>
-#include <libedataserver/e-source.h>
-#include "alarm.h"
-#include "alarm-queue.h"
-#include "alarm-notify.h"
-#include "config-data.h"
-#include "save.h"
-
-
-
-static GnomeClient *master_client = NULL;
-
-static BonoboGenericFactory *factory;
-
-static AlarmNotify *alarm_notify_service = NULL;
-
-
-/* Callback for the master client's "die" signal. We must terminate the daemon
- * since the session is ending.
- */
-static void
-client_die_cb (GnomeClient *client)
-{
- bonobo_main_quit ();
-}
-
-/* Sees if a session manager is present. If so, it tells the SM how to restart
- * the daemon when the session starts. It also sets the die callback so that
- * the daemon can terminate properly when the session ends.
- */
-static void
-set_session_parameters (char **argv)
-{
- int flags;
- char *args[2];
-
- master_client = gnome_master_client ();
- flags = gnome_client_get_flags (master_client);
-
- if (!(flags & GNOME_CLIENT_IS_CONNECTED))
- return;
-
- /* The daemon should always be started up by the session manager when
- * the session starts. The daemon will take care of loading whatever
- * calendars it was told to load.
- */
- gnome_client_set_restart_style (master_client, GNOME_RESTART_ANYWAY);
-
- args[0] = argv[0];
- args[1] = NULL;
-
- gnome_client_set_restart_command (master_client, 1, args);
-
- g_signal_connect (G_OBJECT (master_client), "die",
- G_CALLBACK (client_die_cb), NULL);
-}
-
-/* Factory function for the alarm notify service; just creates and references a
- * singleton service object.
- */
-static BonoboObject *
-alarm_notify_factory_fn (BonoboGenericFactory *factory, const char *component_id, void *data)
-{
- if (!alarm_notify_service) {
- alarm_notify_service = alarm_notify_new ();
- g_assert (alarm_notify_service != NULL);
- }
-
- return NULL;
-}
-
-/* Loads the calendars that the alarm daemon has been told to load in the past */
-static gboolean
-load_calendars (gpointer user_data)
-{
- GPtrArray *cals;
- int i;
-
- alarm_queue_init ();
-
- /* create the alarm notification service */
- if (!alarm_notify_service) {
- alarm_notify_service = alarm_notify_new ();
- g_assert (alarm_notify_service != NULL);
- }
-
- cals = config_data_get_calendars_to_load ();
- if (!cals) {
- g_message ("load_calendars(): Could not get the list of calendars to load");
- return TRUE; /* should we continue retrying? */;
- }
-
- for (i = 0; i < cals->len; i++) {
- ESource *source;
- char *uri;
-
- source = cals->pdata[i];
-
- uri = e_source_get_uri (source);
- alarm_notify_add_calendar (alarm_notify_service, uri, FALSE);
- g_free (uri);
- }
-
- g_ptr_array_free (cals, TRUE);
-
- return FALSE;
-}
-
-int
-main (int argc, char **argv)
-{
- bindtextdomain (GETTEXT_PACKAGE, EVOLUTION_LOCALEDIR);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- textdomain (GETTEXT_PACKAGE);
-
- gnome_program_init ("evolution-alarm-notify", VERSION, LIBGNOMEUI_MODULE, argc, argv, NULL);
- gtk_init (&argc, &argv);
-
- if (bonobo_init (&argc, argv) == FALSE)
- g_error (_("Could not initialize Bonobo"));
-
- if (!gnome_vfs_init ())
- g_error (_("Could not initialize gnome-vfs"));
-
- glade_init ();
-
- gnome_sound_init ("localhost");
-
- factory = bonobo_generic_factory_new ("OAFIID:GNOME_Evolution_Calendar_AlarmNotify:" BASE_VERSION,
- (BonoboFactoryCallback) alarm_notify_factory_fn, NULL);
- if (!factory)
- g_error (_("Could not create the alarm notify service factory"));
-
- set_session_parameters (argv);
-
- g_idle_add ((GSourceFunc) load_calendars, NULL);
-
- bonobo_main ();
-
- bonobo_object_unref (BONOBO_OBJECT (factory));
- factory = NULL;
-
- bonobo_object_unref (BONOBO_OBJECT (alarm_notify_service));
-
- alarm_queue_done ();
- alarm_done ();
-
- if (alarm_notify_service)
- bonobo_object_unref (BONOBO_OBJECT (alarm_notify_service));
-
- gnome_sound_shutdown ();
- gnome_vfs_shutdown ();
-
- return 0;
-}
diff --git a/calendar/gui/alarm-notify/save.c b/calendar/gui/alarm-notify/save.c
deleted file mode 100644
index d0b127fb99..0000000000
--- a/calendar/gui/alarm-notify/save.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/* Evolution calendar - Functions to save alarm notification times
- *
- * 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <bonobo/bonobo-arg.h>
-#include <bonobo/bonobo-exception.h>
-#include <bonobo/bonobo-moniker-util.h>
-#include "evolution-calendar.h"
-#include "config-data.h"
-#include "save.h"
-#include <gconf/gconf-client.h>
-
-
-
-/* Key names for the configuration values */
-
-#define KEY_LAST_NOTIFICATION_TIME "/apps/evolution/calendar/notify/last_notification_time"
-#define KEY_CALENDARS "/apps/evolution/calendar/notify/calendars"
-#define KEY_PROGRAMS "/apps/evolution/calendar/notify/programs"
-
-
-
-/**
- * save_notification_time:
- * @t: A time value.
- *
- * Saves the last notification time so that it can be fetched the next time the
- * alarm daemon is run. This way the daemon can show alarms that should have
- * triggered while it was not running.
- **/
-void
-save_notification_time (time_t t)
-{
- GConfClient *conf_client;
- time_t current_t;
-
- g_return_if_fail (t != -1);
-
- if (!(conf_client = config_data_get_conf_client ()))
- return;
-
- /* we only store the new notification time if it is bigger
- than the already stored one */
- current_t = gconf_client_get_int (conf_client, KEY_LAST_NOTIFICATION_TIME, NULL);
- if (t > current_t)
- gconf_client_set_int (conf_client, KEY_LAST_NOTIFICATION_TIME, t, NULL);
-}
-
-/**
- * get_saved_notification_time:
- *
- * Queries the last saved value for alarm notification times.
- *
- * Return value: The last saved value, or -1 if no value had been saved before.
- **/
-time_t
-get_saved_notification_time (void)
-{
- GConfClient *conf_client;
- long t;
-
- if (!(conf_client = config_data_get_conf_client ()))
- return -1;
-
- t = gconf_client_get_int (conf_client, KEY_LAST_NOTIFICATION_TIME, NULL);
-
- return (time_t) t;
-}
-
-/**
- * save_blessed_program:
- * @program: a program name
- *
- * Saves a program name as "blessed"
- **/
-void
-save_blessed_program (const char *program)
-{
- GConfClient *conf_client;
- GSList *l;
-
- if (!(conf_client = config_data_get_conf_client ()))
- return;
-
- l = gconf_client_get_list (conf_client, KEY_PROGRAMS, GCONF_VALUE_STRING, NULL);
- l = g_slist_append (l, g_strdup (program));
- gconf_client_set_list (conf_client, KEY_PROGRAMS, GCONF_VALUE_STRING, l, NULL);
- g_slist_foreach (l, (GFunc) g_free, NULL);
- g_slist_free (l);
-}
-
-/**
- * is_blessed_program:
- * @program: a program name
- *
- * Checks to see if a program is blessed
- *
- * Return value: TRUE if program is blessed, FALSE otherwise
- **/
-gboolean
-is_blessed_program (const char *program)
-{
- GConfClient *conf_client;
- GSList *l, *n;
- gboolean found = FALSE;
-
- if (!(conf_client = config_data_get_conf_client ()))
- return FALSE;
-
- l = gconf_client_get_list (conf_client, KEY_PROGRAMS, GCONF_VALUE_STRING, NULL);
- while (l) {
- n = l->next;
- if (!found)
- found = strcmp ((char *) l->data, program) == 0;
- g_free (l->data);
- g_slist_free_1 (l);
- l = n;
- }
-
- return found;
-}
diff --git a/calendar/gui/alarm-notify/save.h b/calendar/gui/alarm-notify/save.h
deleted file mode 100644
index f7cc75955c..0000000000
--- a/calendar/gui/alarm-notify/save.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Evolution calendar - Functions to save alarm notification times
- *
- * 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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_H
-#define SAVE_H
-
-#include <time.h>
-
-void save_notification_time (time_t t);
-time_t get_saved_notification_time (void);
-
-void save_calendars_to_load (GPtrArray *uris);
-GPtrArray *get_calendars_to_load (void);
-
-void save_blessed_program (const char *program);
-gboolean is_blessed_program (const char *program);
-
-#endif
diff --git a/calendar/gui/alarm-notify/util.c b/calendar/gui/alarm-notify/util.c
deleted file mode 100644
index 4bc91810a5..0000000000
--- a/calendar/gui/alarm-notify/util.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Evolution calendar - utility functions
- *
- * Copyright (C) 2000 Ximian, Inc.
- * 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <libgnome/gnome-i18n.h>
-#include <e-util/e-time-utils.h>
-#include <libecal/e-cal-time-util.h>
-#include "config-data.h"
-#include "util.h"
-
-/* Converts a time_t to a string, relative to the specified timezone */
-char *
-timet_to_str_with_zone (time_t t, icaltimezone *zone)
-{
- struct icaltimetype itt;
- struct tm tm;
- char buf[256];
-
- if (t == -1)
- return g_strdup (_("invalid time"));
-
- itt = icaltime_from_timet_with_zone (t, FALSE, zone);
- tm = icaltimetype_to_tm (&itt);
-
- e_time_format_date_and_time (&tm, config_data_get_24_hour_format (),
- FALSE, FALSE, buf, sizeof (buf));
- return g_strdup (buf);
-}
diff --git a/calendar/gui/alarm-notify/util.h b/calendar/gui/alarm-notify/util.h
deleted file mode 100644
index 7dae3dd7fe..0000000000
--- a/calendar/gui/alarm-notify/util.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Evolution calendar - utility functions
- *
- * Copyright (C) 2000 Ximian, Inc.
- * 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#ifndef UTIL_H
-#define UTIL_H
-
-#include <libecal/e-cal-component.h>
-
-char *timet_to_str_with_zone (time_t t, icaltimezone *zone);
-
-#endif
diff --git a/calendar/gui/apps_evolution_calendar.schemas.in.in b/calendar/gui/apps_evolution_calendar.schemas.in.in
deleted file mode 100644
index 27e9aa44e2..0000000000
--- a/calendar/gui/apps_evolution_calendar.schemas.in.in
+++ /dev/null
@@ -1,359 +0,0 @@
-<gconfschemafile>
- <schemalist>
-
- <!-- Display -->
-
- <schema>
- <key>/schemas/apps/evolution/calendar/display/timezone</key>
- <applyto>/apps/evolution/calendar/display/timezone</applyto>
- <owner>evolution-calendar</owner>
- <type>string</type>
- <default>UTC</default>
- <locale name="C">
- <short>Default timezone for meetings</short>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/calendar/display/use_24hour_format</key>
- <applyto>/apps/evolution/calendar/display/use_24hour_format</applyto>
- <owner>evolution-calendar</owner>
- <type>bool</type>
- <default>false</default>
- <locale name="C">
- <short>Whether to show times in 24h format instead of using am/pm</short>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/calendar/display/week_start_day</key>
- <applyto>/apps/evolution/calendar/display/week_start_day</applyto>
- <owner>evolution-calendar</owner>
- <type>int</type>
- <default>1</default>
- <locale name="C">
- <short>Weekday the week starts on</short>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/calendar/display/day_start_hour</key>
- <applyto>/apps/evolution/calendar/display/day_start_hour</applyto>
- <owner>evolution-calendar</owner>
- <type>int</type>
- <default>9</default>
- <locale name="C">
- <short>Hour the workday starts on</short>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/calendar/display/day_start_minute</key>
- <applyto>/apps/evolution/calendar/display/day_start_minute</applyto>
- <owner>evolution-calendar</owner>
- <type>int</type>
- <default>0</default>
- <locale name="C">
- <short>Minute the workday starts on</short>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/calendar/display/day_end_hour</key>
- <applyto>/apps/evolution/calendar/display/day_end_hour</applyto>
- <owner>evolution-calendar</owner>
- <type>int</type>
- <default>17</default>
- <locale name="C">
- <short>Hour the workday ends on</short>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/calendar/display/day_end_minute</key>
- <applyto>/apps/evolution/calendar/display/day_end_minute</applyto>
- <owner>evolution-calendar</owner>
- <type>int</type>
- <default>0</default>
- <locale name="C">
- <short>Minute the workday ends on</short>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/calendar/display/time_divisions</key>
- <applyto>/apps/evolution/calendar/display/time_divisions</applyto>
- <owner>evolution-calendar</owner>
- <type>int</type>
- <default>30</default>
- <locale name="C">
- <short>Intervals shown in Day and Work Week views</short>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/calendar/display/default_view</key>
- <applyto>/apps/evolution/calendar/display/default_view</applyto>
- <owner>evolution-calendar</owner>
- <type>int</type>
- <default>0</default>
- <locale name="C">
- <short>The view showing when the calendar starts</short>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/calendar/display/hpane_position</key>
- <applyto>/apps/evolution/calendar/display/hpane_position</applyto>
- <owner>evolution-calendar</owner>
- <type>int</type>
- <default>400</default>
- <locale name="C">
- <short>Position of the horizontal pane</short>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/calendar/display/vpane_position</key>
- <applyto>/apps/evolution/calendar/display/vpane_position</applyto>
- <owner>evolution-calendar</owner>
- <type>int</type>
- <default>150</default>
- <locale name="C">
- <short>Position of the vertical pane</short>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/calendar/display/month_hpane_position</key>
- <applyto>/apps/evolution/calendar/display/month_hpane_position</applyto>
- <owner>evolution-calendar</owner>
- <type>int</type>
- <default>32000</default>
- <locale name="C">
- <short>Position of the horizontal pane in the month view</short>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/calendar/display/month_vpane_position</key>
- <applyto>/apps/evolution/calendar/display/month_vpane_position</applyto>
- <owner>evolution-calendar</owner>
- <type>int</type>
- <default>150</default>
- <locale name="C">
- <short>Position of the vertical pane in the month view</short>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/calendar/display/task_vpane_position</key>
- <applyto>/apps/evolution/calendar/display/task_vpane_position</applyto>
- <owner>evolution-calendar</owner>
- <type>int</type>
- <default>400</default>
- <locale name="C">
- <short>Position of the vertical pane in the task view</short>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/calendar/display/compress_weekend</key>
- <applyto>/apps/evolution/calendar/display/compress_weekend</applyto>
- <owner>evolution-calendar</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Allocate less space to weekend appointments</short>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/calendar/display/show_event_end</key>
- <applyto>/apps/evolution/calendar/display/show_event_end</applyto>
- <owner>evolution-calendar</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Show where events end in week and month views</short>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/calendar/display/working_days</key>
- <applyto>/apps/evolution/calendar/display/working_days</applyto>
- <owner>evolution-calendar</owner>
- <type>int</type>
- <default>62</default>
- <locale name="C">
- <short>Days that are work days</short>
- </locale>
- </schema>
-
- <!-- Tasks -->
-
- <schema>
- <key>/schemas/apps/evolution/calendar/tasks/hide_completed</key>
- <applyto>/apps/evolution/calendar/tasks/hide_completed</applyto>
- <owner>evolution-calendar</owner>
- <type>bool</type>
- <default>false</default>
- <locale name="C">
- <short>Whether to hide completed tasks</short>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/calendar/tasks/hide_completed_units</key>
- <applyto>/apps/evolution/calendar/tasks/hide_completed_units</applyto>
- <owner>evolution-calendar</owner>
- <type>string</type>
- <default>days</default>
- <locale name="C">
- <short>Units for determining when to hide tasks</short>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/calendar/tasks/hide_completed_value</key>
- <applyto>/apps/evolution/calendar/tasks/hide_completed_value</applyto>
- <owner>evolution-calendar</owner>
- <type>int</type>
- <default>1</default>
- <locale name="C">
- <short>Number of units for determining when to hide tasks</short>
- </locale>
- </schema>
-
- <!-- Tasks: Colors -->
-
- <schema>
- <key>/schemas/apps/evolution/calendar/tasks/colors/due_today</key>
- <applyto>/apps/evolution/calendar/tasks/colors/due_today</applyto>
- <owner>evolution-calendar</owner>
- <type>string</type>
- <default>blue</default>
- <locale name="C">
- <short>Color of tasks that are due today</short>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/calendar/tasks/colors/overdue</key>
- <applyto>/apps/evolution/calendar/tasks/colors/overdue</applyto>
- <owner>evolution-calendar</owner>
- <type>string</type>
- <default>red</default>
- <locale name="C">
- <short>Color of tasks that are overdue</short>
- </locale>
- </schema>
-
- <!-- Miscellaneous -->
-
- <schema>
- <key>/schemas/apps/evolution/calendar/prompts/confirm_delete</key>
- <applyto>/apps/evolution/calendar/prompts/confirm_delete</applyto>
- <owner>evolution-calendar</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Whether to ask for confirmation on appointment deletion</short>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/calendar/prompts/confirm_expunge</key>
- <applyto>/apps/evolution/calendar/prompts/confirm_expunge</applyto>
- <owner>evolution-calendar</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Whether to ask for confirmation when folder is expunged</short>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/calendar/other/use_default_reminder</key>
- <applyto>/apps/evolution/calendar/other/use_default_reminder</applyto>
- <owner>evolution-calendar</owner>
- <type>bool</type>
- <default>false</default>
- <locale name="C">
- <short>Whether to set a default reminder for events</short>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/calendar/other/default_reminder_interval</key>
- <applyto>/apps/evolution/calendar/other/default_reminder_interval</applyto>
- <owner>evolution-calendar</owner>
- <type>int</type>
- <default>15</default>
- <locale name="C">
- <short>Number of units for default reminder</short>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/calendar/other/default_reminder_units</key>
- <applyto>/apps/evolution/calendar/other/default_reminder_units</applyto>
- <owner>evolution-calendar</owner>
- <type>string</type>
- <default></default>
- <locale name="C">
- <short>Units of default reminder</short>
- </locale>
- </schema>
-
- <!-- Date navigator -->
-
- <schema>
- <key>/schemas/apps/evolution/calendar/date_navigator/show_week_numbers</key>
- <applyto>/apps/evolution/calendar/date_navigator/show_week_numbers</applyto>
- <owner>evolution-calendar</owner>
- <type>bool</type>
- <default>false</default>
- <locale name="C">
- <short>Whether to show week numbers in date navigator</short>
- </locale>
- </schema>
-
- <!-- Alarm notification -->
-
- <schema>
- <key>/schemas/apps/evolution/calendar/notify/last_notification_time</key>
- <applyto>/apps/evolution/calendar/notify/last_notification_time</applyto>
- <owner>evolution-calendar</owner>
- <type>int</type>
- <default>-1</default>
- <locale name="C">
- <short>Time last alarm ran</short>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/calendar/notify/calendars</key>
- <applyto>/apps/evolution/calendar/notify/calendars</applyto>
- <owner>evolution-calendar</owner>
- <type>list</type>
- <list_type>string</list_type>
- <default>[]</default>
- <locale name="C">
- <short>Calendars to run alarms for</short>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/calendar/notify/programs</key>
- <applyto>/apps/evolution/calendar/notify/programs</applyto>
- <owner>evolution-calendar</owner>
- <type>list</type>
- <list_type>string</list_type>
- <default>[]</default>
- <locale name="C">
- <short>Programs that can run as part of alarms</short>
- </locale>
- </schema>
- </schemalist>
-</gconfschemafile>
diff --git a/calendar/gui/cal-search-bar.c b/calendar/gui/cal-search-bar.c
deleted file mode 100644
index 477a6d91a7..0000000000
--- a/calendar/gui/cal-search-bar.c
+++ /dev/null
@@ -1,513 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <string.h>
-#include <glib.h>
-#include <gtk/gtkmenu.h>
-#include <gtk/gtkmenuitem.h>
-#include <gtk/gtkoptionmenu.h>
-#include <gtk/gtksignal.h>
-#include <libgnome/gnome-i18n.h>
-#include <gal/util/e-util.h>
-#include "cal-search-bar.h"
-
-
-
-/* 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_search_activated (ESearchBar *search);
-
-static ESearchBarClass *parent_class = NULL;
-
-/* Signal IDs */
-enum {
- SEXP_CHANGED,
- CATEGORY_CHANGED,
- LAST_SIGNAL
-};
-
-static guint cal_search_bar_signals[LAST_SIGNAL] = { 0 };
-
-
-
-E_MAKE_TYPE (cal_search_bar, "CalSearchBar", CalSearchBar, cal_search_bar_class_init,
- cal_search_bar_init, E_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 = g_type_class_peek_parent (class);
-
- cal_search_bar_signals[SEXP_CHANGED] =
- gtk_signal_new ("sexp_changed",
- GTK_RUN_FIRST,
- G_TYPE_FROM_CLASS (object_class),
- 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,
- G_TYPE_FROM_CLASS (object_class),
- GTK_SIGNAL_OFFSET (CalSearchBarClass, category_changed),
- gtk_marshal_NONE__STRING,
- GTK_TYPE_NONE, 1,
- GTK_TYPE_STRING);
-
- class->sexp_changed = NULL;
- class->category_changed = NULL;
-
- e_search_bar_class->search_activated = cal_search_bar_search_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) {
- 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_e_cal_view_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_e_cal_view_contains (cal_search, "any");
- break;
-
- case SEARCH_SUMMARY_CONTAINS:
- notify_e_cal_view_contains (cal_search, "summary");
- break;
-
- case SEARCH_DESCRIPTION_CONTAINS:
- notify_e_cal_view_contains (cal_search, "description");
- break;
-
- case SEARCH_COMMENT_CONTAINS:
- notify_e_cal_view_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 ();
- }
-}
-
-/* search_activated handler for the calendar search bar */
-static void
-cal_search_bar_search_activated (ESearchBar *search)
-{
- CalSearchBar *cal_search;
-
- cal_search = CAL_SEARCH_BAR (search);
- regen_query (cal_search);
-}
-
-
-
-/* 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 = g_strdup (category ? category : "");
-
- 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), NULL, 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 = g_object_new (TYPE_CAL_SEARCH_BAR, NULL);
- 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 a8910ba7b4..0000000000
--- a/calendar/gui/cal-search-bar.h
+++ /dev/null
@@ -1,70 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 "widgets/misc/e-search-bar.h"
-#include "widgets/misc/e-filter-bar.h"
-
-G_BEGIN_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);
-
-
-
-G_END_DECLS
-
-#endif
diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c
deleted file mode 100644
index 3ed09c3bc7..0000000000
--- a/calendar/gui/calendar-commands.c
+++ /dev/null
@@ -1,810 +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>
- * Rodrigo Moya <rodrigo@ximian.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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/gtklabel.h>
-#include <gtk/gtkmain.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkspinbutton.h>
-#include <gtk/gtkmessagedialog.h>
-#include <libgnome/gnome-util.h>
-#include <libgnomeui/gnome-dialog-util.h>
-#include <libgnomeui/gnome-messagebox.h>
-#include <libgnomeui/gnome-stock-icons.h>
-#include <libgnome/gnome-util.h>
-#include <libgnome/gnome-i18n.h>
-#include <bonobo/bonobo-ui-util.h>
-#include <bonobo/bonobo-exception.h>
-#include <gal/util/e-util.h>
-#include <libecal/e-cal-time-util.h>
-#include "shell/Evolution.h"
-#include "calendar-commands.h"
-#include "calendar-config.h"
-#include "e-day-view.h"
-#include "e-week-view.h"
-#include "gnome-cal.h"
-#include "goto.h"
-#include "print.h"
-#include "dialogs/cal-prefs-dialog.h"
-#include "dialogs/new-calendar.h"
-#include "itip-utils.h"
-#include "evolution-shell-component-utils.h"
-
-/* Focusing information for the calendar view. We have to keep track of this
- * ourselves because with Bonobo controls, we may get unpaired focus_out events.
- */
-typedef struct {
- guint calendar_focused : 1;
- guint taskpad_focused : 1;
-} FocusData;
-
-static void
-file_new_calendar_cb (BonoboUIComponent *uic, gpointer data, const char *path)
-{
- GnomeCalendar *gcal;
-
- gcal = GNOME_CALENDAR (data);
-
- new_calendar_dialog (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (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);
-}
-
-/* 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
-show_list_view_clicked (BonoboUIComponent *uic, gpointer data, const char *path)
-{
- GnomeCalendar *gcal;
-
- gcal = GNOME_CALENDAR (data);
-
- gnome_calendar_set_view (gcal, GNOME_CAL_LIST_VIEW, FALSE, TRUE);
-}
-
-
-static void
-cut_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_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_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_cmd (BonoboUIComponent *uic, gpointer data, const gchar *path)
-{
- GnomeCalendar *gcal;
-
- gcal = GNOME_CALENDAR (data);
-
- set_clock_cursor (gcal);
- gnome_calendar_delete_selection (gcal);
- set_normal_cursor (gcal);
-}
-
-static void
-delete_occurrence_cmd (BonoboUIComponent *uic, gpointer data, const gchar *path)
-{
- GnomeCalendar *gcal;
-
- gcal = GNOME_CALENDAR (data);
-
- set_clock_cursor (gcal);
- gnome_calendar_delete_selected_occurrence (gcal);
- set_normal_cursor (gcal);
-}
-
-static void
-publish_freebusy_cmd (BonoboUIComponent *uic, gpointer data, const gchar *path)
-{
- GnomeCalendar *gcal;
- GList *client_list, *cl;
- GList *comp_list = NULL;
- 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);
-
- /* FIXME Should we aggregate the data? */
- client_list = e_cal_model_get_client_list (gnome_calendar_get_calendar_model (gcal));
- for (cl = client_list; cl != NULL; cl = cl->next) {
- if (e_cal_get_free_busy ((ECal *) cl->data, NULL, start, end, &comp_list, NULL)) {
- GList *l;
-
- for (l = comp_list; l; l = l->next) {
- ECalComponent *comp = E_CAL_COMPONENT (l->data);
- itip_send_comp (E_CAL_COMPONENT_METHOD_PUBLISH, comp, (ECal *) cl->data, NULL);
-
- g_object_unref (comp);
- }
-
- g_list_free (comp_list);
- }
- }
-
- g_list_free (client_list);
-}
-
-static void
-purge_cmd (BonoboUIComponent *uic, gpointer data, const gchar *path)
-{
- GnomeCalendar *gcal;
- GtkWidget *dialog, *parent, *box, *label, *spin;
- int response;
-
- gcal = GNOME_CALENDAR (data);
-
- /* create the dialog */
- parent = gtk_widget_get_toplevel (GTK_WIDGET (gcal));
- dialog = gtk_message_dialog_new (
- (GtkWindow *)parent,
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_WARNING,
- GTK_BUTTONS_OK_CANCEL,
- _("This operation will permanently erase all events older than the selected amount of time. If you continue, you will not be able to recover these events."));
- gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CANCEL);
-
- box = gtk_hbox_new (FALSE, 6);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), box, TRUE, FALSE, 6);
-
- label = gtk_label_new (_("Purge events older than"));
- gtk_box_pack_start (GTK_BOX (box), label, TRUE, FALSE, 6);
- spin = gtk_spin_button_new_with_range (0.0, 1000.0, 1.0);
- gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin), 60.0);
- gtk_box_pack_start (GTK_BOX (box), spin, FALSE, FALSE, 6);
- label = gtk_label_new (_("days"));
- gtk_box_pack_start (GTK_BOX (box), label, TRUE, FALSE, 6);
-
- gtk_widget_show_all (box);
-
- /* run the dialog */
- response = gtk_dialog_run (GTK_DIALOG (dialog));
- if (response == GTK_RESPONSE_OK) {
- gint days;
- time_t tt;
-
- days = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (spin));
- tt = time (NULL);
- tt -= (days * (24 * 3600));
-
- gnome_calendar_purge (gcal, tt);
- }
-
- gtk_widget_destroy (dialog);
-}
-
-
-const gchar *
-calendar_get_text_for_folder_bar_label (GnomeCalendar *gcal)
-{
- icaltimezone *zone;
- struct icaltimetype start_tt, end_tt;
- time_t start_time, end_time;
- struct tm start_tm, end_tm;
- static char buffer[512];
- char 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) {
- e_utf8_strftime (buffer, sizeof (buffer),
- _("%A %d %B %Y"), &start_tm);
- } else if (start_tm.tm_year == end_tm.tm_year) {
- e_utf8_strftime (buffer, sizeof (buffer),
- _("%a %d %b"), &start_tm);
- e_utf8_strftime (end_buffer, sizeof (end_buffer),
- _("%a %d %b %Y"), &end_tm);
- strcat (buffer, " - ");
- strcat (buffer, end_buffer);
- } else {
- e_utf8_strftime (buffer, sizeof (buffer),
- _("%a %d %b %Y"), &start_tm);
- e_utf8_strftime (end_buffer, sizeof (end_buffer),
- _("%a %d %b %Y"), &end_tm);
- strcat (buffer, " - ");
- strcat (buffer, end_buffer);
- }
- break;
- case GNOME_CAL_MONTH_VIEW:
- case GNOME_CAL_LIST_VIEW:
- if (start_tm.tm_year == end_tm.tm_year) {
- if (start_tm.tm_mon == end_tm.tm_mon) {
- if (start_tm.tm_mday == end_tm.tm_mday) {
- buffer [0] = '\0';
- } else {
- e_utf8_strftime (buffer, sizeof (buffer),
- "%d", &start_tm);
- strcat (buffer, " - ");
- }
- e_utf8_strftime (end_buffer, sizeof (end_buffer),
- _("%d %B %Y"), &end_tm);
- strcat (buffer, end_buffer);
- } else {
- e_utf8_strftime (buffer, sizeof (buffer),
- _("%d %B"), &start_tm);
- e_utf8_strftime (end_buffer, sizeof (end_buffer),
- _("%d %B %Y"), &end_tm);
- strcat (buffer, " - ");
- strcat (buffer, end_buffer);
- }
- } else {
- e_utf8_strftime (buffer, sizeof (buffer),
- _("%d %B %Y"), &start_tm);
- e_utf8_strftime (end_buffer, sizeof (end_buffer),
- _("%d %B %Y"), &end_tm);
- strcat (buffer, " - ");
- strcat (buffer, end_buffer);
- }
- break;
- default:
- g_assert_not_reached ();
- return NULL;
- }
- return buffer;
-}
-
-
-/* Sensitizes the UI Component menu/toolbar calendar commands based on the
- * number of selected events. (This will always be 0 or 1 currently.) If enable
- * is FALSE, all will be disabled. Otherwise, the currently-selected number of
- * events will be used.
- */
-void
-calendar_control_sensitize_calendar_commands (BonoboControl *control, GnomeCalendar *gcal, gboolean enable)
-{
- BonoboUIComponent *uic;
- ECalendarViewEvent *event;
- GList *list;
- int n_selected;
- GtkWidget *view;
- ECal *e_cal;
- gboolean read_only = FALSE, has_recurrences;
-
- uic = bonobo_control_get_ui_component (control);
- g_assert (uic != NULL);
-
- view = gnome_calendar_get_current_view_widget (gcal);
- list = e_calendar_view_get_selected_events (E_CALENDAR_VIEW (view));
-
- n_selected = enable ? g_list_length (list) : 0;
-
- event = (ECalendarViewEvent *) list ? list->data : NULL;
- if (event) {
- e_cal_is_read_only (event->comp_data->client, &read_only, NULL);
- } else {
- e_cal = e_cal_model_get_default_client (gnome_calendar_get_calendar_model (gcal));
- if (e_cal)
- e_cal_is_read_only (e_cal, &read_only, NULL);
- else
- read_only = TRUE;
- }
-
- bonobo_ui_component_set_prop (uic, "/commands/Cut", "sensitive",
- n_selected == 0 || read_only ? "0" : "1",
- NULL);
- bonobo_ui_component_set_prop (uic, "/commands/Copy", "sensitive",
- n_selected == 0 ? "0" : "1",
- NULL);
- bonobo_ui_component_set_prop (uic, "/commands/Paste", "sensitive",
- enable && !read_only ? "1" : "0",
- NULL);
- bonobo_ui_component_set_prop (uic, "/commands/Delete", "sensitive",
- n_selected == 0 || read_only ? "0" : "1",
- NULL);
-
- /* occurrence-related menu items */
- has_recurrences = FALSE;
- if (n_selected > 0 && !read_only) {
- if (list) {
- event = (ECalendarViewEvent *) list->data;
- if (e_cal_util_component_has_recurrences (event->comp_data->icalcomp))
- has_recurrences = TRUE;
- }
- }
-
- bonobo_ui_component_set_prop (uic, "/commands/DeleteOccurrence", "sensitive",
- has_recurrences ? "1" : "0",
- NULL);
- bonobo_ui_component_set_prop (uic, "/commands/DeleteAllOccurrences", "sensitive",
- has_recurrences ? "1" : "0",
- NULL);
-
- /* free memory */
- if (list)
- g_list_free (list);
-}
-
-/* Sensitizes the UI Component menu/toolbar tasks commands based on the number
- * of selected tasks. If enable is FALSE, all will be disabled. Otherwise, the
- * currently-selected number of tasks will be used.
- */
-static void
-sensitize_taskpad_commands (GnomeCalendar *gcal, BonoboControl *control, gboolean enable)
-{
- BonoboUIComponent *uic;
- int n_selected;
- ECal *e_cal;
- gboolean read_only = TRUE;
-
- uic = bonobo_control_get_ui_component (control);
- g_assert (uic != NULL);
-
- n_selected = enable ? gnome_calendar_get_num_tasks_selected (gcal) : 0;
- e_cal = gnome_calendar_get_task_pad_e_cal (gcal);
- if (e_cal)
- e_cal_is_read_only (e_cal, &read_only, NULL);
- else
- read_only = TRUE;
-
- bonobo_ui_component_set_prop (uic, "/commands/Cut", "sensitive",
- n_selected == 0 || read_only ? "0" : "1",
- NULL);
- bonobo_ui_component_set_prop (uic, "/commands/Copy", "sensitive",
- n_selected == 0 ? "0" : "1",
- NULL);
- bonobo_ui_component_set_prop (uic, "/commands/Paste", "sensitive",
- enable && !read_only ? "1" : "0",
- NULL);
- bonobo_ui_component_set_prop (uic, "/commands/Delete", "sensitive",
- n_selected == 0 || read_only ? "0" : "1",
- NULL);
-}
-
-/* Callback used when the selection in the calendar views changes */
-static void
-gcal_calendar_selection_changed_cb (GnomeCalendar *gcal, gpointer data)
-{
- BonoboControl *control;
-
- control = BONOBO_CONTROL (data);
-
- calendar_control_sensitize_calendar_commands (control, gcal, TRUE);
-}
-
-/* Callback used when the selection in the taskpad changes */
-static void
-gcal_taskpad_selection_changed_cb (GnomeCalendar *gcal, gpointer data)
-{
- BonoboControl *control;
-
- control = BONOBO_CONTROL (data);
-
- sensitize_taskpad_commands (gcal, control, TRUE);
-}
-
-/* Callback used when the focus changes for a calendar view */
-static void
-gcal_calendar_focus_change_cb (GnomeCalendar *gcal, gboolean in, gpointer data)
-{
- BonoboControl *control;
- FocusData *focus;
-
- control = BONOBO_CONTROL (data);
-
- focus = g_object_get_data (G_OBJECT (control), "focus_data");
- g_assert (focus != NULL);
-
- if (in) {
- g_signal_connect (gcal, "calendar_selection_changed",
- G_CALLBACK (gcal_calendar_selection_changed_cb), control);
- calendar_control_sensitize_calendar_commands (control, gcal, TRUE);
- focus->calendar_focused = TRUE;
- } else if (focus->calendar_focused) {
- gtk_signal_disconnect_by_func (GTK_OBJECT (gcal),
- G_CALLBACK (gcal_calendar_selection_changed_cb),
- control);
- calendar_control_sensitize_calendar_commands (control, gcal, FALSE);
- focus->calendar_focused = FALSE;
- }
-}
-
-/* Callback used when the taskpad focus changes */
-static void
-gcal_taskpad_focus_change_cb (GnomeCalendar *gcal, gboolean in, gpointer data)
-{
- BonoboControl *control;
- FocusData *focus;
-
- control = BONOBO_CONTROL (data);
-
- focus = g_object_get_data (G_OBJECT (control), "focus_data");
- g_assert (focus != NULL);
-
- if (in) {
- g_signal_connect (gcal, "taskpad_selection_changed",
- G_CALLBACK (gcal_taskpad_selection_changed_cb), control);
- sensitize_taskpad_commands (gcal, control, TRUE);
- focus->taskpad_focused = TRUE;
- } else if (focus->taskpad_focused) {
- /* With Bonobo controls, we may get unpaired focus_out events.
- * That is why we have to keep track of this ourselves instead
- * of blindly assumming that we are getting this event because
- * the taskpad was in fact focused.
- */
- gtk_signal_disconnect_by_func (GTK_OBJECT (gcal),
- G_CALLBACK (gcal_taskpad_selection_changed_cb),
- control);
- sensitize_taskpad_commands (gcal, control, FALSE);
- focus->taskpad_focused = FALSE;
- }
-
-}
-
-
-static BonoboUIVerb verbs [] = {
- BONOBO_UI_VERB ("NewCalendar", file_new_calendar_cb),
- BONOBO_UI_VERB ("CalendarPrint", file_print_cb),
- BONOBO_UI_VERB ("CalendarPrintPreview", file_print_preview_cb),
-
- BONOBO_UI_VERB ("Cut", cut_cmd),
- BONOBO_UI_VERB ("Copy", copy_cmd),
- BONOBO_UI_VERB ("Paste", paste_cmd),
- BONOBO_UI_VERB ("Delete", delete_cmd),
- BONOBO_UI_VERB ("DeleteOccurrence", delete_occurrence_cmd),
- BONOBO_UI_VERB ("DeleteAllOccurrences", delete_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 ("ShowListView", show_list_view_clicked),
-
- BONOBO_UI_VERB ("PublishFreeBusy", publish_freebusy_cmd),
- BONOBO_UI_VERB ("CalendarPurge", purge_cmd),
-
- BONOBO_UI_VERB_END
-};
-
-static EPixmap pixmaps [] =
-{
- 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 ("/Toolbar/ListView", "buttons/listview.xpm"),
-
- E_PIXMAP_END
-};
-
-void
-calendar_control_activate (BonoboControl *control,
- GnomeCalendar *gcal)
-{
- Bonobo_UIContainer remote_uih;
- BonoboUIComponent *uic;
- FocusData *focus;
-
- uic = bonobo_control_get_ui_component (control);
- g_assert (uic != NULL);
-
- remote_uih = bonobo_control_get_remote_ui_container (control, NULL);
- bonobo_ui_component_set_container (uic, remote_uih, NULL);
- bonobo_object_release_unref (remote_uih, NULL);
-
- gnome_calendar_set_ui_component (gcal, uic);
-
- bonobo_ui_component_add_verb_list_with_data (uic, verbs, gcal);
-
- bonobo_ui_component_freeze (uic, NULL);
-
- bonobo_ui_util_set_ui (uic, PREFIX,
- EVOLUTION_UIDIR "/evolution-calendar.xml",
- "evolution-calendar",
- NULL);
-
- e_pixmaps_update (uic, pixmaps);
-
- gnome_calendar_setup_view_menus (gcal, uic);
-
- g_signal_connect (gcal, "calendar_focus_change",
- G_CALLBACK (gcal_calendar_focus_change_cb), control);
- g_signal_connect (gcal, "taskpad_focus_change",
- G_CALLBACK (gcal_taskpad_focus_change_cb), control);
-
- calendar_control_sensitize_calendar_commands (control, gcal, FALSE);
- sensitize_taskpad_commands (gcal, control, FALSE);
-
- 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
-
- focus = g_new (FocusData, 1);
- focus->calendar_focused = FALSE;
- focus->taskpad_focused = FALSE;
-
- g_object_set_data (G_OBJECT (control), "focus_data", focus);
-}
-
-void
-calendar_control_deactivate (BonoboControl *control, GnomeCalendar *gcal)
-{
- FocusData *focus;
- BonoboUIComponent *uic;
-
- uic = bonobo_control_get_ui_component (control);
- g_assert (uic != NULL);
-
- gnome_calendar_set_ui_component (gcal, uic);
-
- focus = g_object_get_data (G_OBJECT (control), "focus_data");
- g_assert (focus != NULL);
-
- g_object_set_data (G_OBJECT (control), "focus_data", NULL);
- g_free (focus);
-
- gnome_calendar_discard_view_menus (gcal);
-
- g_signal_handlers_disconnect_matched (gcal, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, control);
-
- bonobo_ui_component_rm (uic, "/", NULL);
- bonobo_ui_component_unset_container (uic, NULL);
-}
diff --git a/calendar/gui/calendar-commands.h b/calendar/gui/calendar-commands.h
deleted file mode 100644
index 901d01d845..0000000000
--- a/calendar/gui/calendar-commands.h
+++ /dev/null
@@ -1,42 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 "gnome-cal.h"
-
-#include <bonobo/bonobo-control.h>
-#include <bonobo/bonobo-ui-component.h>
-
-void calendar_control_activate (BonoboControl *control, GnomeCalendar *gcal);
-void calendar_control_deactivate (BonoboControl *control, GnomeCalendar *gcal);
-
-void calendar_control_sensitize_calendar_commands (BonoboControl *control, GnomeCalendar *gcal, gboolean enable);
-
-void calendar_goto_today (GnomeCalendar *gcal);
-
-const gchar * calendar_get_text_for_folder_bar_label (GnomeCalendar *gcal);
-
-#endif /* CALENDAR_COMMANDS_H */
diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c
deleted file mode 100644
index 455ede19ba..0000000000
--- a/calendar/gui/calendar-component.c
+++ /dev/null
@@ -1,902 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* calendar-component.c
- *
- * Copyright (C) 2003 Ettore Perazzoli
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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>
- * Rodrigo Moya <rodrigo@ximian.com>
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-#include <errno.h>
-#include <bonobo/bonobo-control.h>
-#include <bonobo/bonobo-i18n.h>
-#include <bonobo/bonobo-exception.h>
-#include "calendar-config.h"
-#include "calendar-component.h"
-#include "calendar-commands.h"
-#include "gnome-cal.h"
-#include "migration.h"
-#include "e-comp-editor-registry.h"
-#include "comp-util.h"
-#include "dialogs/new-calendar.h"
-#include "dialogs/comp-editor.h"
-#include "dialogs/copy-source-dialog.h"
-#include "dialogs/event-editor.h"
-#include "widgets/misc/e-source-selector.h"
-
-
-/* IDs for user creatable items */
-#define CREATE_EVENT_ID "event"
-#define CREATE_MEETING_ID "meeting"
-#define CREATE_ALLDAY_EVENT_ID "allday-event"
-
-#define PARENT_TYPE bonobo_object_get_type ()
-static BonoboObjectClass *parent_class = NULL;
-
-struct _CalendarComponentPrivate {
- char *config_directory;
-
- GConfClient *gconf_client;
- ESourceList *source_list;
- GSList *source_selection;
-
- GnomeCalendar *calendar;
- GtkWidget *source_selector;
-
- ECal *create_ecal;
-
- GList *notifications;
-
- EActivityHandler *activity_handler;
-};
-
-/* FIXME This should be gnome cal likely */
-extern ECompEditorRegistry *comp_editor_registry;
-
-/* Utility functions. */
-
-static void
-add_uri_for_source (ESource *source, GnomeCalendar *calendar)
-{
- char *uri = e_source_get_uri (source);
-
- gnome_calendar_add_event_uri (calendar, uri);
- g_free (uri);
-}
-
-static void
-remove_uri_for_source (ESource *source, GnomeCalendar *calendar)
-{
- char *uri = e_source_get_uri (source);
-
- gnome_calendar_remove_event_uri (calendar, uri);
- g_free (uri);
-}
-
-static gboolean
-is_in_selection (GSList *selection, ESource *source)
-{
- GSList *l;
-
- for (l = selection; l; l = l->next) {
- ESource *selected_source = l->data;
-
- if (!strcmp (e_source_peek_uid (selected_source), e_source_peek_uid (source)))
- return TRUE;
- }
-
- return FALSE;
-}
-
-static gboolean
-is_in_uids (GSList *uids, ESource *source)
-{
- GSList *l;
-
- for (l = uids; l; l = l->next) {
- const char *uid = l->data;
-
- if (!strcmp (uid, e_source_peek_uid (source)))
- return TRUE;
- }
-
- return FALSE;
-}
-
-static ESource *
-find_first_source (ESourceList *source_list)
-{
- GSList *groups, *sources, *l, *m;
-
- groups = e_source_list_peek_groups (source_list);
- for (l = groups; l; l = l->next) {
- ESourceGroup *group = l->data;
-
- sources = e_source_group_peek_sources (group);
- for (m = sources; m; m = m->next) {
- ESource *source = m->data;
-
- return source;
- }
- }
-
- return NULL;
-}
-
-static void
-update_uris_for_selection (CalendarComponent *calendar_component)
-{
- CalendarComponentPrivate *priv;
- GSList *selection, *l, *uids_selected = NULL;
-
- priv = calendar_component->priv;
-
- selection = e_source_selector_get_selection (E_SOURCE_SELECTOR (priv->source_selector));
-
- for (l = priv->source_selection; l; l = l->next) {
- ESource *old_selected_source = l->data;
-
- if (!is_in_selection (selection, old_selected_source))
- remove_uri_for_source (old_selected_source, priv->calendar);
- }
-
- for (l = selection; l; l = l->next) {
- ESource *selected_source = l->data;
-
- add_uri_for_source (selected_source, priv->calendar);
- uids_selected = g_slist_append (uids_selected, (char *)e_source_peek_uid (selected_source));
- }
-
- e_source_selector_free_selection (priv->source_selection);
- priv->source_selection = selection;
-
- /* Save the selection for next time we start up */
- calendar_config_set_calendars_selected (uids_selected);
- g_slist_free (uids_selected);
-}
-
-static void
-update_uri_for_primary_selection (CalendarComponent *calendar_component)
-{
- CalendarComponentPrivate *priv;
- ESource *source;
- char *uri;
-
- priv = calendar_component->priv;
-
- source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (priv->source_selector));
- if (!source)
- return;
-
- /* Set the default */
- uri = e_source_get_uri (source);
- gnome_calendar_set_default_uri (priv->calendar, uri);
- g_free (uri);
-
- /* Save the selection for next time we start up */
- calendar_config_set_primary_calendar (e_source_peek_uid (source));
-}
-
-static void
-update_selection (CalendarComponent *calendar_component)
-{
- CalendarComponentPrivate *priv;
- GSList *selection, *uids_selected, *l;
-
- priv = calendar_component->priv;
-
- /* Get the selection in gconf */
- uids_selected = calendar_config_get_calendars_selected ();
-
- /* Remove any that aren't there any more */
- selection = e_source_selector_get_selection (E_SOURCE_SELECTOR (priv->source_selector));
-
- for (l = selection; l; l = l->next) {
- ESource *source = l->data;
-
- if (!is_in_uids (uids_selected, source))
- e_source_selector_unselect_source (E_SOURCE_SELECTOR (priv->source_selector), source);
- }
-
- e_source_selector_free_selection (selection);
-
- /* Make sure the whole selection is there */
- for (l = uids_selected; l; l = l->next) {
- char *uid = l->data;
- ESource *source;
-
- source = e_source_list_peek_source_by_uid (priv->source_list, uid);
- if (source)
- e_source_selector_select_source (E_SOURCE_SELECTOR (priv->source_selector), source);
-
- g_free (uid);
- }
- g_slist_free (uids_selected);
-}
-
-static void
-update_primary_selection (CalendarComponent *calendar_component)
-{
- CalendarComponentPrivate *priv;
- ESource *source;
- char *uid;
-
- priv = calendar_component->priv;
-
- uid = calendar_config_get_primary_calendar ();
- if (uid) {
- source = e_source_list_peek_source_by_uid (priv->source_list, uid);
- g_free (uid);
-
- e_source_selector_set_primary_selection (E_SOURCE_SELECTOR (priv->source_selector), source);
- } else {
- ESource *source;
-
- /* Try to create a default if there isn't one */
- source = find_first_source (priv->source_list);
- if (source)
- e_source_selector_set_primary_selection (E_SOURCE_SELECTOR (priv->source_selector), source);
- }
-}
-
-/* FIXME This is duplicated from comp-editor-factory.c, should it go in comp-util? */
-static ECalComponent *
-get_default_event (ECal *client, gboolean all_day)
-{
- ECalComponent *comp;
- struct icaltimetype itt;
- ECalComponentDateTime dt;
- char *location;
- icaltimezone *zone;
-
- comp = cal_comp_event_new_with_defaults (client);
-
- location = calendar_config_get_timezone ();
- zone = icaltimezone_get_builtin_timezone (location);
-
- if (all_day) {
- itt = icaltime_from_timet_with_zone (time (NULL), 1, zone);
-
- dt.value = &itt;
- dt.tzid = icaltimezone_get_tzid (zone);
-
- e_cal_component_set_dtstart (comp, &dt);
- e_cal_component_set_dtend (comp, &dt);
- } else {
- itt = icaltime_current_time_with_zone (zone);
- icaltime_adjust (&itt, 0, 1, -itt.minute, -itt.second);
-
- dt.value = &itt;
- dt.tzid = icaltimezone_get_tzid (zone);
-
- e_cal_component_set_dtstart (comp, &dt);
- icaltime_adjust (&itt, 0, 1, 0, 0);
- e_cal_component_set_dtend (comp, &dt);
- }
-
- e_cal_component_commit_sequence (comp);
-
- return comp;
-}
-
-/* Callbacks. */
-static void
-add_popup_menu_item (GtkMenu *menu, const char *label, const char *pixmap,
- GCallback callback, gpointer user_data, gboolean sensitive)
-{
- GtkWidget *item, *image;
-
- if (pixmap) {
- item = gtk_image_menu_item_new_with_label (label);
-
- /* load the image */
- image = gtk_image_new_from_stock (pixmap, GTK_ICON_SIZE_MENU);
- if (!image)
- image = gtk_image_new_from_file (pixmap);
-
- if (image) {
- gtk_widget_show (image);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
- }
- } else {
- item = gtk_menu_item_new_with_label (label);
- }
-
- if (callback)
- g_signal_connect (G_OBJECT (item), "activate", callback, user_data);
-
- if (!sensitive)
- gtk_widget_set_sensitive (item, FALSE);
-
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
- gtk_widget_show (item);
-}
-
-static void
-copy_calendar_cb (GtkWidget *widget, CalendarComponent *comp)
-{
- ESource *selected_source;
- CalendarComponentPrivate *priv;
-
- priv = comp->priv;
-
- selected_source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (priv->source_selector));
- if (!selected_source)
- return;
-
- copy_source_dialog (GTK_WINDOW (gtk_widget_get_toplevel (widget)), selected_source, CALOBJ_TYPE_EVENT);
-}
-
-static void
-delete_calendar_cb (GtkWidget *widget, CalendarComponent *comp)
-{
- ESource *selected_source;
- CalendarComponentPrivate *priv;
- GtkWidget *dialog;
-
- priv = comp->priv;
-
- selected_source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (priv->source_selector));
- if (!selected_source)
- return;
-
- /* create the confirmation dialog */
- dialog = gtk_message_dialog_new (
- GTK_WINDOW (gtk_widget_get_toplevel (widget)),
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_QUESTION,
- GTK_BUTTONS_YES_NO,
- _("Calendar '%s' will be removed. Are you sure you want to continue?"),
- e_source_peek_name (selected_source));
- if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_YES) {
- if (e_source_selector_source_is_selected (E_SOURCE_SELECTOR (priv->source_selector),
- selected_source))
- e_source_selector_unselect_source (E_SOURCE_SELECTOR (priv->source_selector),
- selected_source);
-
- e_source_group_remove_source (e_source_peek_group (selected_source), selected_source);
-
- /* FIXME: remove the calendar.ics file and the directory */
- }
-
- gtk_widget_destroy (dialog);
-}
-
-static void
-new_calendar_cb (GtkWidget *widget, CalendarComponent *comp)
-{
- new_calendar_dialog (GTK_WINDOW (gtk_widget_get_toplevel (widget)));
-}
-
-static void
-rename_calendar_cb (GtkWidget *widget, CalendarComponent *comp)
-{
- CalendarComponentPrivate *priv;
- ESource *selected_source;
- GtkWidget *dialog, *entry;
-
- priv = comp->priv;
-
- selected_source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (priv->source_selector));
- if (!selected_source)
- return;
-
- /* create the dialog to prompt the user for the new name */
- dialog = gtk_message_dialog_new (GTK_WINDOW (gtk_widget_get_toplevel (widget)),
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_QUESTION,
- GTK_BUTTONS_OK_CANCEL,
- _("Rename this calendar to"));
- entry = gtk_entry_new ();
- gtk_entry_set_text (GTK_ENTRY (entry), e_source_peek_name (selected_source));
- gtk_widget_show (entry);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), entry, TRUE, FALSE, 6);
-
- if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK)
- e_source_set_name (selected_source, gtk_entry_get_text (GTK_ENTRY (entry)));
-
- gtk_widget_destroy (dialog);
-}
-
-static void
-fill_popup_menu_cb (ESourceSelector *selector, GtkMenu *menu, CalendarComponent *comp)
-{
- gboolean sensitive;
-
- sensitive = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (comp->priv->source_selector)) ?
- TRUE : FALSE;
-
- add_popup_menu_item (menu, _("New Calendar"), GTK_STOCK_NEW, G_CALLBACK (new_calendar_cb), comp, TRUE);
- add_popup_menu_item (menu, _("Copy"), NULL, G_CALLBACK (copy_calendar_cb), comp, sensitive);
- add_popup_menu_item (menu, _("Rename"), NULL, G_CALLBACK (rename_calendar_cb), comp, sensitive);
- add_popup_menu_item (menu, _("Delete"), GTK_STOCK_DELETE, G_CALLBACK (delete_calendar_cb), comp, sensitive);
-}
-
-static void
-source_selection_changed_cb (ESourceSelector *selector,
- CalendarComponent *calendar_component)
-{
- update_uris_for_selection (calendar_component);
-}
-
-static void
-primary_source_selection_changed_cb (ESourceSelector *selector,
- CalendarComponent *calendar_component)
-{
- update_uri_for_primary_selection (calendar_component);
-}
-
-static void
-config_selection_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- update_selection (data);
-}
-
-
-static void
-config_primary_selection_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- update_primary_selection (data);
-}
-
-/* GObject methods. */
-
-static void
-impl_dispose (GObject *object)
-{
- CalendarComponentPrivate *priv = CALENDAR_COMPONENT (object)->priv;
- GList *l;
-
- if (priv->source_list != NULL) {
- g_object_unref (priv->source_list);
- priv->source_list = NULL;
- }
-
- if (priv->source_selection != NULL) {
- e_source_selector_free_selection (priv->source_selection);
- priv->source_selection = NULL;
- }
-
- if (priv->gconf_client != NULL) {
- g_object_unref (priv->gconf_client);
- priv->gconf_client = NULL;
- }
-
- if (priv->create_ecal) {
- g_object_unref (priv->create_ecal);
- priv->create_ecal = NULL;
- }
-
- for (l = priv->notifications; l; l = l->next)
- calendar_config_remove_notification (GPOINTER_TO_UINT (l->data));
- g_list_free (priv->notifications);
- priv->notifications = NULL;
-
- if (priv->activity_handler != NULL) {
- g_object_unref (priv->activity_handler);
- priv->activity_handler = NULL;
- }
-
- (* G_OBJECT_CLASS (parent_class)->dispose) (object);
-}
-
-static void
-impl_finalize (GObject *object)
-{
- CalendarComponentPrivate *priv = CALENDAR_COMPONENT (object)->priv;
-
- g_free (priv->config_directory);
-
- g_free (priv);
-
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
-}
-
-
-/* Evolution::Component CORBA methods. */
-
-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
-impl_createControls (PortableServer_Servant servant,
- Bonobo_Control *corba_sidebar_control,
- Bonobo_Control *corba_view_control,
- Bonobo_Control *corba_statusbar_control,
- CORBA_Environment *ev)
-{
- CalendarComponent *calendar_component = CALENDAR_COMPONENT (bonobo_object_from_servant (servant));
- CalendarComponentPrivate *priv;
- GtkWidget *selector_scrolled_window;
- GtkWidget *statusbar_widget;
- BonoboControl *sidebar_control;
- BonoboControl *view_control;
- BonoboControl *statusbar_control;
- guint not;
-
- priv = calendar_component->priv;
-
- /* Create sidebar selector */
- priv->source_selector = e_source_selector_new (calendar_component->priv->source_list);
- gtk_widget_show (priv->source_selector);
-
- selector_scrolled_window = gtk_scrolled_window_new (NULL, NULL);
- gtk_container_add (GTK_CONTAINER (selector_scrolled_window), priv->source_selector);
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (selector_scrolled_window),
- GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
- gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (selector_scrolled_window),
- GTK_SHADOW_IN);
- gtk_widget_show (selector_scrolled_window);
-
- sidebar_control = bonobo_control_new (selector_scrolled_window);
-
- /* Create main calendar view */
- /* FIXME Instead of returning, we should make a control with a
- * label describing the problem */
- priv->calendar = GNOME_CALENDAR (gnome_calendar_new ());
- if (!priv->calendar) {
- g_warning (G_STRLOC ": could not create the calendar widget!");
- bonobo_exception_set (ev, ex_GNOME_Evolution_Component_Failed);
- return;
- }
-
- gtk_widget_show (GTK_WIDGET (priv->calendar));
-
- view_control = bonobo_control_new (GTK_WIDGET (priv->calendar));
- if (!view_control) {
- g_warning (G_STRLOC ": could not create the control!");
- bonobo_exception_set (ev, ex_GNOME_Evolution_Component_Failed);
- return;
- }
- g_object_set_data (G_OBJECT (priv->calendar), "control", view_control);
-
- g_signal_connect (view_control, "activate", G_CALLBACK (control_activate_cb), priv->calendar);
-
- g_signal_connect_object (priv->source_selector, "selection_changed",
- G_CALLBACK (source_selection_changed_cb),
- G_OBJECT (calendar_component), 0);
- g_signal_connect_object (priv->source_selector, "primary_selection_changed",
- G_CALLBACK (primary_source_selection_changed_cb),
- G_OBJECT (calendar_component), 0);
- g_signal_connect_object (priv->source_selector, "fill_popup_menu",
- G_CALLBACK (fill_popup_menu_cb),
- G_OBJECT (calendar_component), 0);
-
- statusbar_widget = e_task_bar_new ();
- gtk_widget_show (statusbar_widget);
- e_activity_handler_attach_task_bar (priv->activity_handler, E_TASK_BAR (statusbar_widget));
- statusbar_control = bonobo_control_new (statusbar_widget);
-
- /* Load the selection from the last run */
- update_selection (calendar_component);
- update_primary_selection (calendar_component);
-
- /* If it gets fiddled with update */
- not = calendar_config_add_notification_calendars_selected (config_selection_changed_cb,
- calendar_component);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
- not = calendar_config_add_notification_primary_calendar (config_primary_selection_changed_cb,
- calendar_component);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
- /* Return the controls */
- *corba_sidebar_control = CORBA_Object_duplicate (BONOBO_OBJREF (sidebar_control), ev);
- *corba_view_control = CORBA_Object_duplicate (BONOBO_OBJREF (view_control), ev);
- *corba_statusbar_control = CORBA_Object_duplicate (BONOBO_OBJREF (statusbar_control), ev);
-}
-
-
-static GNOME_Evolution_CreatableItemTypeList *
-impl__get_userCreatableItems (PortableServer_Servant servant,
- CORBA_Environment *ev)
-{
- GNOME_Evolution_CreatableItemTypeList *list = GNOME_Evolution_CreatableItemTypeList__alloc ();
-
- list->_length = 3;
- list->_maximum = list->_length;
- list->_buffer = GNOME_Evolution_CreatableItemTypeList_allocbuf (list->_length);
-
- CORBA_sequence_set_release (list, FALSE);
-
- list->_buffer[0].id = CREATE_EVENT_ID;
- list->_buffer[0].description = _("New appointment");
- list->_buffer[0].menuDescription = _("_Appointment");
- list->_buffer[0].tooltip = _("Create a new appointment");
- list->_buffer[0].menuShortcut = 'a';
- list->_buffer[0].iconName = "new_appointment.xpm";
-
- list->_buffer[1].id = CREATE_MEETING_ID;
- list->_buffer[1].description = _("New meeting");
- list->_buffer[1].menuDescription = _("M_eeting");
- list->_buffer[1].tooltip = _("Create a new meeting request");
- list->_buffer[1].menuShortcut = 'e';
- list->_buffer[1].iconName = "meeting-request-16.png";
-
- list->_buffer[2].id = CREATE_ALLDAY_EVENT_ID;
- list->_buffer[2].description = _("New all day appointment");
- list->_buffer[2].menuDescription = _("All _Day Appointment");
- list->_buffer[2].tooltip = _("Create a new all-day appointment");
- list->_buffer[2].menuShortcut = 'd';
- list->_buffer[2].iconName = "new_all_day_event.png";
-
- return list;
-}
-
-static void
-config_create_ecal_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- CalendarComponent *calendar_component = data;
- CalendarComponentPrivate *priv;
-
- priv = calendar_component->priv;
-
- g_object_unref (priv->create_ecal);
- priv->create_ecal = NULL;
-
- priv->notifications = g_list_remove (priv->notifications, GUINT_TO_POINTER (id));
-}
-
-static gboolean
-setup_create_ecal (CalendarComponent *calendar_component)
-{
- CalendarComponentPrivate *priv;
- ESource *source = NULL;
- char *uid;
- guint not;
-
- priv = calendar_component->priv;
-
- if (priv->create_ecal)
- return TRUE;
-
- /* Try to use the client from the calendar first to avoid re-opening things */
- if (priv->calendar) {
- ECal *default_ecal;
-
- default_ecal = gnome_calendar_get_default_client (priv->calendar);
- if (default_ecal) {
- priv->create_ecal = g_object_ref (default_ecal);
- return TRUE;
- }
- }
-
- /* Get the current primary calendar, or try to set one if it doesn't already exist */
- uid = calendar_config_get_primary_calendar ();
- if (uid) {
- source = e_source_list_peek_source_by_uid (priv->source_list, uid);
- g_free (uid);
-
- priv->create_ecal = e_cal_new (source, CALOBJ_TYPE_EVENT);
- }
-
- if (!priv->create_ecal) {
- /* Try to create a default if there isn't one */
- source = find_first_source (priv->source_list);
- if (source)
- priv->create_ecal = e_cal_new (source, CALOBJ_TYPE_EVENT);
- }
-
- if (priv->create_ecal) {
- if (!e_cal_open (priv->create_ecal, FALSE, NULL)) {
- GtkWidget *dialog;
-
- dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
- GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,
- _("Unable to open the calendar '%s' for creating events and meetings"),
- e_source_peek_name (source));
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
-
- return FALSE;
- }
- } else {
- GtkWidget *dialog;
-
- dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
- GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,
- _("There is no calendar available for creating events and meetings"));
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
-
- return FALSE;
- }
-
- /* Handle the fact it may change on us */
- not = calendar_config_add_notification_primary_calendar (config_create_ecal_changed_cb,
- calendar_component);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
- /* Save the primary source for use elsewhere */
- calendar_config_set_primary_calendar (e_source_peek_uid (source));
-
- return TRUE;
-}
-
-static void
-impl_requestCreateItem (PortableServer_Servant servant,
- const CORBA_char *item_type_name,
- CORBA_Environment *ev)
-{
- CalendarComponent *calendar_component = CALENDAR_COMPONENT (bonobo_object_from_servant (servant));
- CalendarComponentPrivate *priv;
- ECalComponent *comp;
- EventEditor *editor;
- gboolean is_meeting = FALSE;
-
- priv = calendar_component->priv;
-
- if (!setup_create_ecal (calendar_component))
- return;
-
- editor = event_editor_new (priv->create_ecal);
-
- if (strcmp (item_type_name, CREATE_EVENT_ID) == 0) {
- comp = get_default_event (priv->create_ecal, FALSE);
- } else if (strcmp (item_type_name, CREATE_ALLDAY_EVENT_ID) == 0) {
- comp = get_default_event (priv->create_ecal, TRUE);
- } else if (strcmp (item_type_name, CREATE_MEETING_ID) == 0) {
- comp = get_default_event (priv->create_ecal, FALSE);
- is_meeting = TRUE;
- } else {
- bonobo_exception_set (ev, ex_GNOME_Evolution_Component_UnknownType);
- return;
- }
-
- comp_editor_edit_comp (COMP_EDITOR (editor), comp);
- if (is_meeting)
- event_editor_show_meeting (editor);
- comp_editor_focus (COMP_EDITOR (editor));
-
- e_comp_editor_registry_add (comp_editor_registry, COMP_EDITOR (editor), TRUE);
-}
-
-
-/* Initialization. */
-
-static void
-calendar_component_class_init (CalendarComponentClass *class)
-{
- POA_GNOME_Evolution_Component__epv *epv = &class->epv;
- GObjectClass *object_class = G_OBJECT_CLASS (class);
-
- parent_class = g_type_class_peek_parent (class);
-
- epv->createControls = impl_createControls;
- epv->_get_userCreatableItems = impl__get_userCreatableItems;
- epv->requestCreateItem = impl_requestCreateItem;
-
- object_class->dispose = impl_dispose;
- object_class->finalize = impl_finalize;
-}
-
-static void
-calendar_component_init (CalendarComponent *component)
-{
- CalendarComponentPrivate *priv;
- GSList *groups;
-
- priv = g_new0 (CalendarComponentPrivate, 1);
-
- priv->config_directory = g_build_filename (g_get_home_dir (),
- ".evolution", "calendar", "config",
- NULL);
-
- /* EPFIXME: Should use a custom one instead? Also we should add
- * calendar_component_peek_gconf_client(). */
- priv->gconf_client = gconf_client_get_default ();
-
- priv->source_list = e_source_list_new_for_gconf (priv->gconf_client,
- "/apps/evolution/calendar/sources");
-
- priv->activity_handler = e_activity_handler_new ();
-
- /* create default calendars if there are no groups */
- groups = e_source_list_peek_groups (priv->source_list);
- if (!groups) {
- ESourceGroup *group;
- ESource *source;
- char *base_uri, *new_dir;
-
- /* create the local source group */
- base_uri = g_build_filename (g_get_home_dir (),
- "/.evolution/calendar/local/OnThisComputer/",
- NULL);
- group = e_source_group_new (_("On This Computer"), base_uri);
- e_source_list_add_group (priv->source_list, group, -1);
-
- /* migrate calendars from older setup */
- if (!migrate_old_calendars (group)) {
- /* create default calendars */
- new_dir = g_build_filename (base_uri, "Personal/", NULL);
- if (!e_mkdir_hier (new_dir, 0700)) {
- source = e_source_new (_("Personal"), "Personal");
- e_source_group_add_source (group, source, -1);
- }
- g_free (new_dir);
-
- new_dir = g_build_filename (base_uri, "Work/", NULL);
- if (!e_mkdir_hier (new_dir, 0700)) {
- source = e_source_new (_("Work"), "Work");
- e_source_group_add_source (group, source, -1);
- }
- g_free (new_dir);
- }
-
- g_free (base_uri);
-
- /* create the remote source group */
- group = e_source_group_new (_("On The Web"), "webcal://");
- e_source_list_add_group (priv->source_list, group, -1);
- }
-
- component->priv = priv;
-}
-
-
-/* Public API. */
-
-CalendarComponent *
-calendar_component_peek (void)
-{
- static CalendarComponent *component = NULL;
-
- if (component == NULL) {
- component = g_object_new (calendar_component_get_type (), NULL);
-
- if (e_mkdir_hier (calendar_component_peek_config_directory (component), 0777) != 0) {
- g_warning (G_STRLOC ": Cannot create directory %s: %s",
- calendar_component_peek_config_directory (component),
- g_strerror (errno));
- g_object_unref (component);
- component = NULL;
- }
- }
-
- return component;
-}
-
-const char *
-calendar_component_peek_config_directory (CalendarComponent *component)
-{
- return component->priv->config_directory;
-}
-
-
-EActivityHandler *
-calendar_component_peek_activity_handler (CalendarComponent *component)
-{
- return component->priv->activity_handler;
-}
-
-
-BONOBO_TYPE_FUNC_FULL (CalendarComponent, GNOME_Evolution_Component, PARENT_TYPE, calendar_component)
diff --git a/calendar/gui/calendar-component.h b/calendar/gui/calendar-component.h
deleted file mode 100644
index 77d2fe9879..0000000000
--- a/calendar/gui/calendar-component.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* calendar-component.h
- *
- * Copyright (C) 2003 Ettore Perazzoli
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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_COMPONENT_H_
-#define _CALENDAR_COMPONENT_H_
-
-
-#include <bonobo/bonobo-object.h>
-#include <libedataserver/e-source-list.h>
-
-#include "e-activity-handler.h"
-#include "Evolution.h"
-
-
-#define CALENDAR_TYPE_COMPONENT (calendar_component_get_type ())
-#define CALENDAR_COMPONENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CALENDAR_TYPE_COMPONENT, CalendarComponent))
-#define CALENDAR_COMPONENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CALENDAR_TYPE_COMPONENT, CalendarComponentClass))
-#define CALENDAR_IS_COMPONENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CALENDAR_TYPE_COMPONENT))
-#define CALENDAR_IS_COMPONENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), CALENDAR_TYPE_COMPONENT))
-
-
-typedef struct _CalendarComponent CalendarComponent;
-typedef struct _CalendarComponentPrivate CalendarComponentPrivate;
-typedef struct _CalendarComponentClass CalendarComponentClass;
-
-struct _CalendarComponent {
- BonoboObject parent;
-
- CalendarComponentPrivate *priv;
-};
-
-struct _CalendarComponentClass {
- BonoboObjectClass parent_class;
-
- POA_GNOME_Evolution_Component__epv epv;
-};
-
-
-GType calendar_component_get_type (void);
-
-CalendarComponent *calendar_component_peek (void);
-
-const char *calendar_component_peek_config_directory (CalendarComponent *component);
-ESourceList *calendar_component_peek_source_list (CalendarComponent *component);
-EActivityHandler *calendar_component_peek_activity_handler (CalendarComponent *component);
-
-
-#endif /* _CALENDAR_COMPONENT_H_ */
diff --git a/calendar/gui/calendar-config-keys.h b/calendar/gui/calendar-config-keys.h
deleted file mode 100644
index ebe16b6539..0000000000
--- a/calendar/gui/calendar-config-keys.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors :
- * JP Rosevear <jpr@ximian.com>
- *
- * Copyright 2003, Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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_CONFIG_KEYS_H_
-#define _CALENDAR_CONFIG_KEYS_H_
-
-G_BEGIN_DECLS
-
-#define CALENDAR_CONFIG_PREFIX "/apps/evolution/calendar"
-
-/* Display settings */
-#define CALENDAR_CONFIG_TIMEZONE CALENDAR_CONFIG_PREFIX "/display/timezone"
-#define CALENDAR_CONFIG_SELECTED_CALENDARS CALENDAR_CONFIG_PREFIX "/display/selected_calendars"
-#define CALENDAR_CONFIG_PRIMARY_CALENDAR CALENDAR_CONFIG_PREFIX "/display/primary_calendar"
-#define CALENDAR_CONFIG_24HOUR CALENDAR_CONFIG_PREFIX "/display/use_24hour_format"
-#define CALENDAR_CONFIG_WEEK_START CALENDAR_CONFIG_PREFIX "/display/week_start_day"
-#define CALENDAR_CONFIG_DAY_START_HOUR CALENDAR_CONFIG_PREFIX "/display/day_start_hour"
-#define CALENDAR_CONFIG_DAY_START_MINUTE CALENDAR_CONFIG_PREFIX "/display/day_start_minute"
-#define CALENDAR_CONFIG_DAY_END_HOUR CALENDAR_CONFIG_PREFIX "/display/day_end_hour"
-#define CALENDAR_CONFIG_DAY_END_MINUTE CALENDAR_CONFIG_PREFIX "/display/day_end_minute"
-#define CALENDAR_CONFIG_TIME_DIVISIONS CALENDAR_CONFIG_PREFIX "/display/time_divisions"
-#define CALENDAR_CONFIG_TIME_DIVISIONS CALENDAR_CONFIG_PREFIX "/display/time_divisions"
-#define CALENDAR_CONFIG_DEFAULT_VIEW CALENDAR_CONFIG_PREFIX "/display/default_view"
-#define CALENDAR_CONFIG_HPANE_POS CALENDAR_CONFIG_PREFIX "/display/hpane_position"
-#define CALENDAR_CONFIG_VPANE_POS CALENDAR_CONFIG_PREFIX "/display/vpane_position"
-#define CALENDAR_CONFIG_MONTH_HPANE_POS CALENDAR_CONFIG_PREFIX "/display/month_hpane_position"
-#define CALENDAR_CONFIG_MONTH_VPANE_POS CALENDAR_CONFIG_PREFIX "/display/month_vpane_position"
-#define CALENDAR_CONFIG_TASK_VPANE_POS CALENDAR_CONFIG_PREFIX "/display/task_vpane_position"
-#define CALENDAR_CONFIG_COMPRESS_WEEKEND CALENDAR_CONFIG_PREFIX "/display/compress_weekend"
-#define CALENDAR_CONFIG_SHOW_EVENT_END CALENDAR_CONFIG_PREFIX "/display/show_event_end"
-#define CALENDAR_CONFIG_WORKING_DAYS CALENDAR_CONFIG_PREFIX "/display/working_days"
-
-/* Date navigator settings */
-#define CALENDAR_CONFIG_DN_SHOW_WEEK_NUMBERS CALENDAR_CONFIG_PREFIX "/date_navigator/show_week_numbers"
-
-/* Task display settings */
-#define CALENDAR_CONFIG_TASKS_SELECTED_TASKS CALENDAR_CONFIG_PREFIX "/tasks/selected_tasks"
-#define CALENDAR_CONFIG_PRIMARY_TASKS CALENDAR_CONFIG_PREFIX "/tasks/primary_tasks"
-#define CALENDAR_CONFIG_TASKS_HIDE_COMPLETED CALENDAR_CONFIG_PREFIX "/tasks/hide_completed"
-#define CALENDAR_CONFIG_TASKS_HIDE_COMPLETED_UNITS CALENDAR_CONFIG_PREFIX "/tasks/hide_completed_units"
-#define CALENDAR_CONFIG_TASKS_HIDE_COMPLETED_VALUE CALENDAR_CONFIG_PREFIX "/tasks/hide_completed_value"
-#define CALENDAR_CONFIG_TASKS_DUE_TODAY_COLOR CALENDAR_CONFIG_PREFIX "/tasks/colors/due_today"
-#define CALENDAR_CONFIG_TASKS_OVERDUE_COLOR CALENDAR_CONFIG_PREFIX "/tasks/colors/overdue"
-
-/* Prompt settings */
-#define CALENDAR_CONFIG_PROMPT_DELETE CALENDAR_CONFIG_PREFIX "/prompts/confirm_delete"
-#define CALENDAR_CONFIG_PROMPT_PURGE CALENDAR_CONFIG_PREFIX "/prompts/confirm_purge"
-
-/* Default reminder */
-#define CALENDAR_CONFIG_DEFAULT_REMINDER CALENDAR_CONFIG_PREFIX "/other/use_default_reminder"
-#define CALENDAR_CONFIG_DEFAULT_REMINDER_INTERVAL CALENDAR_CONFIG_PREFIX "/other/default_reminder_interval"
-#define CALENDAR_CONFIG_DEFAULT_REMINDER_UNITS CALENDAR_CONFIG_PREFIX "/other/default_reminder_units"
-
-G_END_DECLS
-
-#endif
diff --git a/calendar/gui/calendar-config.c b/calendar/gui/calendar-config.c
deleted file mode 100644
index 3c12c381ac..0000000000
--- a/calendar/gui/calendar-config.c
+++ /dev/null
@@ -1,1027 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-#include <time.h>
-#include <gtk/gtksignal.h>
-#include <libgnome/gnome-config.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <gal/util/e-util.h>
-#include <widgets/e-timezone-dialog/e-timezone-dialog.h>
-#include <libecal/e-cal-time-util.h>
-
-#include "calendar-component.h"
-#include "calendar-commands.h"
-#include "e-tasks.h"
-#include "e-cell-date-edit-text.h"
-#include "calendar-config-keys.h"
-#include "calendar-config.h"
-
-
-
-static GConfClient *config = NULL;
-
-static void on_timezone_set (GnomeDialog *dialog,
- int button,
- ETimezoneDialog *etd);
-static gboolean on_timezone_dialog_delete_event (GnomeDialog *dialog,
- GdkEvent *event,
- ETimezoneDialog *etd);
-
-static void
-do_cleanup (void)
-{
- g_object_unref (config);
- config = NULL;
-}
-
-void
-calendar_config_init (void)
-{
- if (config)
- return;
-
- config = gconf_client_get_default ();
- g_atexit ((GVoidFunc) do_cleanup);
-
- gconf_client_add_dir (config, CALENDAR_CONFIG_PREFIX, GCONF_CLIENT_PRELOAD_RECURSIVE, NULL);
-}
-
-void
-calendar_config_remove_notification (guint id)
-{
- gconf_client_notify_remove (config, id);
-}
-
-/* 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;
-
- e_utf8_strftime (s, sizeof s, "%p", gmtime (&t));
- return s[0] != '\0';
-}
-
-/* Returns the string representation of a units value */
-static const char *
-units_to_string (CalUnits units)
-{
- switch (units) {
- case CAL_DAYS:
- return "days";
-
- case CAL_HOURS:
- return "hours";
-
- case CAL_MINUTES:
- return "minutes";
-
- default:
- g_assert_not_reached ();
- return NULL;
- }
-}
-
-/*
- * Calendar Settings.
- */
-
-/* The current list of calendars selected */
-GSList *
-calendar_config_get_calendars_selected (void)
-{
- return gconf_client_get_list (config, CALENDAR_CONFIG_SELECTED_CALENDARS, GCONF_VALUE_STRING, NULL);
-}
-
-void
-calendar_config_set_calendars_selected (GSList *selected)
-{
- gconf_client_set_list (config, CALENDAR_CONFIG_SELECTED_CALENDARS, GCONF_VALUE_STRING, selected, NULL);
-}
-
-guint
-calendar_config_add_notification_calendars_selected (GConfClientNotifyFunc func, gpointer data)
-{
- guint id;
-
- id = gconf_client_notify_add (config, CALENDAR_CONFIG_SELECTED_CALENDARS, func, data, NULL, NULL);
-
- return id;
-}
-
-/* The primary calendar */
-char *
-calendar_config_get_primary_calendar (void)
-{
- return gconf_client_get_string (config, CALENDAR_CONFIG_PRIMARY_CALENDAR, NULL);
-}
-
-void
-calendar_config_set_primary_calendar (const char *primary_uid)
-{
- gconf_client_set_string (config, CALENDAR_CONFIG_PRIMARY_CALENDAR, primary_uid, NULL);
-}
-
-
-guint
-calendar_config_add_notification_primary_calendar (GConfClientNotifyFunc func, gpointer data)
-{
- guint id;
-
- id = gconf_client_notify_add (config, CALENDAR_CONFIG_PRIMARY_CALENDAR, func, data, NULL, NULL);
-
- return id;
-}
-
-
-/* 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)
-{
- /* FIXME Guard against NULL? */
- return gconf_client_get_string (config, CALENDAR_CONFIG_TIMEZONE, NULL);
-}
-
-
-/* Sets the timezone. If set to NULL it defaults to UTC.
- FIXME: Should check it is being set to a valid timezone. */
-void
-calendar_config_set_timezone (gchar *timezone)
-{
- if (timezone && timezone[0])
- gconf_client_set_string (config, CALENDAR_CONFIG_TIMEZONE, timezone, NULL);
- else
- gconf_client_set_string (config, CALENDAR_CONFIG_TIMEZONE, "UTC", NULL);
-}
-
-guint
-calendar_config_add_notification_timezone (GConfClientNotifyFunc func, gpointer data)
-{
- guint id;
-
- id = gconf_client_notify_add (config, CALENDAR_CONFIG_TIMEZONE, func, data, NULL, NULL);
-
- return id;
-}
-
-/* Whether we use 24-hour format or 12-hour format (AM/PM). */
-gboolean
-calendar_config_get_24_hour_format (void)
-{
- /* 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 ())
- return gconf_client_get_bool (config, CALENDAR_CONFIG_24HOUR, NULL);
-
- return TRUE;
-}
-
-
-void
-calendar_config_set_24_hour_format (gboolean use_24_hour)
-{
- gconf_client_set_bool (config, CALENDAR_CONFIG_24HOUR, use_24_hour, NULL);
-}
-
-guint
-calendar_config_add_notification_24_hour_format (GConfClientNotifyFunc func, gpointer data)
-{
- guint id;
-
- id = gconf_client_notify_add (config, CALENDAR_CONFIG_24HOUR, func, data, NULL, NULL);
-
- return id;
-}
-
-/* The start day of the week (0 = Sun to 6 = Mon). */
-gint
-calendar_config_get_week_start_day (void)
-{
- return gconf_client_get_int (config, CALENDAR_CONFIG_WEEK_START, NULL);
-}
-
-
-void
-calendar_config_set_week_start_day (gint week_start_day)
-{
- gconf_client_set_int (config, CALENDAR_CONFIG_WEEK_START, week_start_day, NULL);
-}
-
-guint
-calendar_config_add_notification_week_start_day (GConfClientNotifyFunc func, gpointer data)
-{
- guint id;
-
- id = gconf_client_notify_add (config, CALENDAR_CONFIG_WEEK_START, func, data, NULL, NULL);
-
- return id;
-}
-
-/* The start and end times of the work-day. */
-gint
-calendar_config_get_day_start_hour (void)
-{
- return gconf_client_get_int (config, CALENDAR_CONFIG_DAY_START_HOUR, NULL);
-}
-
-
-void
-calendar_config_set_day_start_hour (gint day_start_hour)
-{
- gconf_client_set_int (config, CALENDAR_CONFIG_DAY_START_HOUR, day_start_hour, NULL);
-}
-
-guint
-calendar_config_add_notification_day_start_hour (GConfClientNotifyFunc func, gpointer data)
-{
- guint id;
-
- id = gconf_client_notify_add (config, CALENDAR_CONFIG_DAY_START_HOUR, func, data, NULL, NULL);
-
- return id;
-}
-
-gint
-calendar_config_get_day_start_minute (void)
-{
- return gconf_client_get_int (config, CALENDAR_CONFIG_DAY_START_MINUTE, NULL);
-}
-
-
-void
-calendar_config_set_day_start_minute (gint day_start_min)
-{
- gconf_client_set_int (config, CALENDAR_CONFIG_DAY_START_MINUTE, day_start_min, NULL);
-}
-
-guint
-calendar_config_add_notification_day_start_minute (GConfClientNotifyFunc func, gpointer data)
-{
- guint id;
-
- id = gconf_client_notify_add (config, CALENDAR_CONFIG_DAY_START_MINUTE, func, data, NULL, NULL);
-
- return id;
-}
-
-gint
-calendar_config_get_day_end_hour (void)
-{
- return gconf_client_get_int (config, CALENDAR_CONFIG_DAY_END_HOUR, NULL);
-}
-
-
-void
-calendar_config_set_day_end_hour (gint day_end_hour)
-{
- gconf_client_set_int (config, CALENDAR_CONFIG_DAY_END_HOUR, day_end_hour, NULL);
-}
-
-guint
-calendar_config_add_notification_day_end_hour (GConfClientNotifyFunc func, gpointer data)
-{
- guint id;
-
- id = gconf_client_notify_add (config, CALENDAR_CONFIG_DAY_END_HOUR, func, data, NULL, NULL);
-
- return id;
-}
-
-gint
-calendar_config_get_day_end_minute (void)
-{
- return gconf_client_get_int (config, CALENDAR_CONFIG_DAY_END_MINUTE, NULL);
-}
-
-
-void
-calendar_config_set_day_end_minute (gint day_end_min)
-{
- gconf_client_set_int (config, CALENDAR_CONFIG_DAY_END_MINUTE, day_end_min, NULL);
-}
-
-guint
-calendar_config_add_notification_day_end_minute (GConfClientNotifyFunc func, gpointer data)
-{
- guint id;
-
- id = gconf_client_notify_add (config, CALENDAR_CONFIG_DAY_END_MINUTE, func, data, NULL, NULL);
-
- return id;
-}
-
-/* The time divisions in the Day/Work-Week view in minutes (5/10/15/30/60). */
-gint
-calendar_config_get_time_divisions (void)
-{
- return gconf_client_get_int (config, CALENDAR_CONFIG_TIME_DIVISIONS, NULL);
-}
-
-
-void
-calendar_config_set_time_divisions (gint divisions)
-{
- gconf_client_set_int (config, CALENDAR_CONFIG_TIME_DIVISIONS, divisions, NULL);
-}
-
-guint
-calendar_config_add_notification_time_divisions (GConfClientNotifyFunc func, gpointer data)
-{
- guint id;
-
- id = gconf_client_notify_add (config, CALENDAR_CONFIG_TIME_DIVISIONS, func, data, NULL, NULL);
-
- return id;
-}
-
-/* Whether we show week numbers in the Date Navigator. */
-gboolean
-calendar_config_get_dnav_show_week_no (void)
-{
- return gconf_client_get_bool (config, CALENDAR_CONFIG_DN_SHOW_WEEK_NUMBERS, NULL);
-}
-
-
-void
-calendar_config_set_dnav_show_week_no (gboolean show_week_no)
-{
- gconf_client_set_bool (config, CALENDAR_CONFIG_DN_SHOW_WEEK_NUMBERS, show_week_no, NULL);
-}
-
-guint
-calendar_config_add_notification_dnav_show_week_no (GConfClientNotifyFunc func, gpointer data)
-{
- guint id;
-
- id = gconf_client_notify_add (config, CALENDAR_CONFIG_DN_SHOW_WEEK_NUMBERS, func, data, NULL, NULL);
-
- return id;
-}
-
-/* The view to show on start-up, 0 = Day, 1 = WorkWeek, 2 = Week, 3 = Month. */
-gint
-calendar_config_get_default_view (void)
-{
- return gconf_client_get_int (config, CALENDAR_CONFIG_DEFAULT_VIEW, NULL);
-}
-
-
-void
-calendar_config_set_default_view (gint view)
-{
- gconf_client_set_int (config, CALENDAR_CONFIG_DEFAULT_VIEW, view, NULL);
-}
-
-
-/* The positions of the panes in the normal and month views. */
-gint
-calendar_config_get_hpane_pos (void)
-{
- return gconf_client_get_int (config, CALENDAR_CONFIG_HPANE_POS, NULL);
-}
-
-
-void
-calendar_config_set_hpane_pos (gint hpane_pos)
-{
- gconf_client_set_int (config, CALENDAR_CONFIG_HPANE_POS, hpane_pos, NULL);
-}
-
-
-gint
-calendar_config_get_vpane_pos (void)
-{
- return gconf_client_get_int (config, CALENDAR_CONFIG_VPANE_POS, NULL);
-}
-
-
-void
-calendar_config_set_vpane_pos (gint vpane_pos)
-{
- gconf_client_set_int (config, CALENDAR_CONFIG_VPANE_POS, vpane_pos, NULL);
-}
-
-
-gint
-calendar_config_get_month_hpane_pos (void)
-{
- return gconf_client_get_int (config, CALENDAR_CONFIG_MONTH_HPANE_POS, NULL);
-}
-
-
-void
-calendar_config_set_month_hpane_pos (gint hpane_pos)
-{
- gconf_client_set_int (config, CALENDAR_CONFIG_MONTH_HPANE_POS, hpane_pos, NULL);
-}
-
-
-gint
-calendar_config_get_month_vpane_pos (void)
-{
- return gconf_client_get_int (config, CALENDAR_CONFIG_MONTH_VPANE_POS, NULL);
-}
-
-
-void
-calendar_config_set_month_vpane_pos (gint vpane_pos)
-{
- gconf_client_set_int (config, CALENDAR_CONFIG_MONTH_VPANE_POS, vpane_pos, NULL);
-}
-
-/* The current list of task lists selected */
-GSList *
-calendar_config_get_tasks_selected (void)
-{
- return gconf_client_get_list (config, CALENDAR_CONFIG_TASKS_SELECTED_TASKS, GCONF_VALUE_STRING, NULL);
-}
-
-void
-calendar_config_set_tasks_selected (GSList *selected)
-{
- gconf_client_set_list (config, CALENDAR_CONFIG_TASKS_SELECTED_TASKS, GCONF_VALUE_STRING, selected, NULL);
-}
-
-guint
-calendar_config_add_notification_tasks_selected (GConfClientNotifyFunc func, gpointer data)
-{
- guint id;
-
- id = gconf_client_notify_add (config, CALENDAR_CONFIG_TASKS_SELECTED_TASKS, func, data, NULL, NULL);
-
- return id;
-}
-
-/* The primary task list */
-char *
-calendar_config_get_primary_tasks (void)
-{
- return gconf_client_get_string (config, CALENDAR_CONFIG_PRIMARY_TASKS, NULL);
-}
-
-void
-calendar_config_set_primary_tasks (const char *primary_uid)
-{
- gconf_client_set_string (config, CALENDAR_CONFIG_PRIMARY_TASKS, primary_uid, NULL);
-}
-
-
-guint
-calendar_config_add_notification_primary_tasks (GConfClientNotifyFunc func, gpointer data)
-{
- guint id;
-
- id = gconf_client_notify_add (config, CALENDAR_CONFIG_PRIMARY_TASKS, func, data, NULL, NULL);
-
- return id;
-}
-
-gint
-calendar_config_get_task_vpane_pos (void)
-{
- return gconf_client_get_int (config, CALENDAR_CONFIG_TASK_VPANE_POS, NULL);
-}
-
-
-void
-calendar_config_set_task_vpane_pos (gint vpane_pos)
-{
- gconf_client_set_int (config, CALENDAR_CONFIG_TASK_VPANE_POS, vpane_pos, NULL);
-}
-
-
-/* Whether we compress the weekend in the week/month views. */
-gboolean
-calendar_config_get_compress_weekend (void)
-{
- return gconf_client_get_bool (config, CALENDAR_CONFIG_COMPRESS_WEEKEND, NULL);
-}
-
-
-void
-calendar_config_set_compress_weekend (gboolean compress)
-{
- gconf_client_set_bool (config, CALENDAR_CONFIG_COMPRESS_WEEKEND, compress, NULL);
-}
-
-guint
-calendar_config_add_notification_compress_weekend (GConfClientNotifyFunc func, gpointer data)
-{
- guint id;
-
- id = gconf_client_notify_add (config, CALENDAR_CONFIG_COMPRESS_WEEKEND, func, data, NULL, NULL);
-
- return id;
-}
-
-/* Whether we show event end times. */
-gboolean
-calendar_config_get_show_event_end (void)
-{
- return gconf_client_get_bool (config, CALENDAR_CONFIG_SHOW_EVENT_END, NULL);
-}
-
-
-void
-calendar_config_set_show_event_end (gboolean show_end)
-{
- gconf_client_set_bool (config, CALENDAR_CONFIG_SHOW_EVENT_END, show_end, NULL);
-}
-
-guint
-calendar_config_add_notification_show_event_end (GConfClientNotifyFunc func, gpointer data)
-{
- guint id;
-
- id = gconf_client_notify_add (config, CALENDAR_CONFIG_SHOW_EVENT_END, func, data, NULL, NULL);
-
- return id;
-}
-
-/* The working days of the week, a bit-wise combination of flags. */
-CalWeekdays
-calendar_config_get_working_days (void)
-{
- return gconf_client_get_int (config, CALENDAR_CONFIG_WORKING_DAYS, NULL);
-}
-
-
-void
-calendar_config_set_working_days (CalWeekdays days)
-{
- gconf_client_set_int (config, CALENDAR_CONFIG_WORKING_DAYS, days, NULL);
-}
-
-guint
-calendar_config_add_notification_working_days (GConfClientNotifyFunc func, gpointer data)
-{
- guint id;
-
- id = gconf_client_notify_add (config, CALENDAR_CONFIG_WORKING_DAYS , func, data, NULL, NULL);
-
- return id;
-}
-
-/* Settings to hide completed tasks. */
-gboolean
-calendar_config_get_hide_completed_tasks (void)
-{
- return gconf_client_get_bool (config, CALENDAR_CONFIG_TASKS_HIDE_COMPLETED, NULL);
-}
-
-
-void
-calendar_config_set_hide_completed_tasks (gboolean hide)
-{
- gconf_client_set_bool (config, CALENDAR_CONFIG_TASKS_HIDE_COMPLETED, hide, NULL);
-}
-
-
-CalUnits
-calendar_config_get_hide_completed_tasks_units (void)
-{
- char *units;
- CalUnits cu;
-
- units = gconf_client_get_string (config, CALENDAR_CONFIG_TASKS_HIDE_COMPLETED_UNITS, NULL);
-
- if (!strcmp (units, "minutes"))
- cu = CAL_MINUTES;
- else if (!strcmp (units, "hours"))
- cu = CAL_HOURS;
- else
- cu = CAL_DAYS;
-
- g_free (units);
-
- return cu;
-}
-
-
-void
-calendar_config_set_hide_completed_tasks_units (CalUnits cu)
-{
- char *units;
-
- switch (cu) {
- case CAL_MINUTES :
- units = g_strdup ("minutes");
- break;
- case CAL_HOURS :
- units = g_strdup ("hours");
- break;
- default :
- units = g_strdup ("days");
- }
-
- gconf_client_set_string (config, CALENDAR_CONFIG_TASKS_HIDE_COMPLETED_UNITS, units, NULL);
-
- g_free (units);
-}
-
-
-gint
-calendar_config_get_hide_completed_tasks_value (void)
-{
- return gconf_client_get_int (config, CALENDAR_CONFIG_TASKS_HIDE_COMPLETED_VALUE, NULL);
-}
-
-
-void
-calendar_config_set_hide_completed_tasks_value (gint value)
-{
- gconf_client_set_int (config, CALENDAR_CONFIG_TASKS_HIDE_COMPLETED_VALUE, value, NULL);
-}
-
-/**
- * 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 gconf_client_get_bool (config, CALENDAR_CONFIG_PROMPT_DELETE, NULL);
-}
-
-/**
- * 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)
-{
- gconf_client_set_bool (config, CALENDAR_CONFIG_PROMPT_DELETE, confirm, NULL);
-}
-
-/**
- * calendar_config_get_confirm_purge:
- *
- * Queries the configuration value for whether a confirmation dialog is
- * presented when purging calendar/tasks items.
- *
- * Return value: Whether confirmation is required when purging items.
- **/
-gboolean
-calendar_config_get_confirm_purge (void)
-{
- return gconf_client_get_bool (config, CALENDAR_CONFIG_PROMPT_PURGE, NULL);
-}
-
-/**
- * calendar_config_set_confirm_purge:
- * @confirm: Whether confirmation is required when purging items.
- *
- * Sets the configuration value for whether a confirmation dialog is presented
- * when purging calendar/tasks items.
- **/
-void
-calendar_config_set_confirm_purge (gboolean confirm)
-{
- gconf_client_set_bool (config, CALENDAR_CONFIG_PROMPT_PURGE, confirm, 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);
-}
-
-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);
-
- g_signal_connect (dialog, "clicked",
- G_CALLBACK (on_timezone_set), timezone_dialog);
- g_signal_connect (dialog, "delete-event",
- G_CALLBACK (on_timezone_dialog_delete_event), timezone_dialog);
-
- gtk_widget_show (dialog);
-}
-
-
-static void
-on_timezone_set (GnomeDialog *dialog,
- int button,
- ETimezoneDialog *etd)
-{
- icaltimezone *zone;
-
- zone = e_timezone_dialog_get_timezone (etd);
- if (zone)
- calendar_config_set_timezone (icaltimezone_get_location (zone));
-
- g_object_unref (etd);
-}
-
-
-static gboolean
-on_timezone_dialog_delete_event (GnomeDialog *dialog,
- GdkEvent *event,
- ETimezoneDialog *etd)
-{
- g_object_unref (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)
-{
- static char *color = NULL;
-
- if (color)
- g_free (color);
-
- color = gconf_client_get_string (config, CALENDAR_CONFIG_TASKS_DUE_TODAY_COLOR, NULL);
- return 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);
-
- gconf_client_set_string (config, CALENDAR_CONFIG_TASKS_DUE_TODAY_COLOR, color, NULL);
-}
-
-/**
- * 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)
-{
- static char *color = NULL;
-
- if (color)
- g_free (color);
-
- color = gconf_client_get_string (config, CALENDAR_CONFIG_TASKS_OVERDUE_COLOR, NULL);
- return 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);
-
- gconf_client_set_string (config, CALENDAR_CONFIG_TASKS_OVERDUE_COLOR, color, NULL);
-}
-
-/**
- * calendar_config_get_use_default_reminder:
- *
- * Queries whether new appointments should be created with a default reminder.
- *
- * Return value: Boolean value indicating whether new appointments should be
- * created with a default reminder from the values of
- * calendar_config_get_default_reminder_interval() and
- * calendar_config_get_default_reminder_units().
- **/
-gboolean
-calendar_config_get_use_default_reminder (void)
-{
- return gconf_client_get_bool (config, CALENDAR_CONFIG_DEFAULT_REMINDER, NULL);
-}
-
-/**
- * calendar_config_set_use_default_reminder:
- * @value: Whether to create new appointments with a default reminder.
- *
- * Sets whether newly-created appointments should get a default reminder set
- * them.
- **/
-void
-calendar_config_set_use_default_reminder (gboolean value)
-{
- gconf_client_set_bool (config, CALENDAR_CONFIG_DEFAULT_REMINDER, value, NULL);
-}
-
-/**
- * calendar_config_get_default_reminder_interval:
- *
- * Queries the interval for the default reminder of newly-created
- * appointments, i.e. 5 in "5 minutes".
- *
- * Return value: Interval for default reminders.
- **/
-int
-calendar_config_get_default_reminder_interval (void)
-{
- return gconf_client_get_int (config, CALENDAR_CONFIG_DEFAULT_REMINDER_INTERVAL, NULL);
-}
-
-/**
- * calendar_config_set_default_reminder_interval:
- * @interval: Interval value, e.g. 5 for "5 minutes".
- *
- * Sets the interval that should be used for the default reminder in new
- * appointments.
- **/
-void
-calendar_config_set_default_reminder_interval (int interval)
-{
- gconf_client_set_int (config, CALENDAR_CONFIG_DEFAULT_REMINDER_INTERVAL, interval, NULL);
-}
-
-/**
- * calendar_config_get_default_reminder_units:
- *
- * Queries the units of time in which default reminders should be created for
- * new appointments, e.g. CAL_MINUTES for "5 minutes".
- *
- * Return value: Time units for default reminders.
- **/
-CalUnits
-calendar_config_get_default_reminder_units (void)
-{
- char *units;
- CalUnits cu;
-
- units = gconf_client_get_string (config, CALENDAR_CONFIG_DEFAULT_REMINDER_UNITS, NULL);
-
- if (units && !strcmp (units, "days"))
- cu = CAL_DAYS;
- else if (units && !strcmp (units, "hours"))
- cu = CAL_HOURS;
- else
- cu = CAL_MINUTES;
- g_free (units);
-
- return cu;
-}
-
-/**
- * calendar_config_set_default_reminder_units:
- * @units: Time units, e.g. CAL_MINUTES for "5 minutes".
- *
- * Sets the units to be used for default reminders in new appointments.
- **/
-void
-calendar_config_set_default_reminder_units (CalUnits units)
-{
- gconf_client_set_string (config, CALENDAR_CONFIG_DEFAULT_REMINDER_UNITS, units_to_string(units), NULL);
-}
-
-/**
- * calendar_config_get_hide_completed_tasks_sexp:
- *
- * Returns the subexpression to use to filter out completed tasks according
- * to the config settings. The returned sexp should be freed.
- **/
-char*
-calendar_config_get_hide_completed_tasks_sexp (void)
-{
- char *sexp = NULL;
-
- 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.*/
- sexp = g_strdup ("(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);
- sexp = g_strdup_printf ("(not (completed-before? (make-time \"%s\")))", isodate);
- }
- }
-
- return sexp;
-}
-
diff --git a/calendar/gui/calendar-config.h b/calendar/gui/calendar-config.h
deleted file mode 100644
index ff34febd91..0000000000
--- a/calendar/gui/calendar-config.h
+++ /dev/null
@@ -1,220 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <gconf/gconf-client.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_remove_notification (guint id);
-
-/*
- * Calendar Settings.
- */
-
-/* The current list of calendars selected */
-GSList *calendar_config_get_calendars_selected (void);
-void calendar_config_set_calendars_selected (GSList *selected);
-guint calendar_config_add_notification_calendars_selected (GConfClientNotifyFunc func, gpointer data);
-
-/* The primary calendar */
-char *calendar_config_get_primary_calendar (void);
-void calendar_config_set_primary_calendar (const char *primary_uid);
-guint calendar_config_add_notification_primary_calendar (GConfClientNotifyFunc func, gpointer data);
-
-/* The current timezone, e.g. "Europe/London". */
-gchar* calendar_config_get_timezone (void);
-void calendar_config_set_timezone (gchar *timezone);
-guint calendar_config_add_notification_timezone (GConfClientNotifyFunc func, gpointer data);
-
-/* 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);
-guint calendar_config_add_notification_working_days (GConfClientNotifyFunc func, gpointer data);
-
-/* 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);
-guint calendar_config_add_notification_week_start_day (GConfClientNotifyFunc func, gpointer data);
-
-/* 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);
-guint calendar_config_add_notification_day_start_hour (GConfClientNotifyFunc func, gpointer data);
-
-gint calendar_config_get_day_start_minute (void);
-void calendar_config_set_day_start_minute (gint day_start_min);
-guint calendar_config_add_notification_day_start_minute (GConfClientNotifyFunc func, gpointer data);
-
-gint calendar_config_get_day_end_hour (void);
-void calendar_config_set_day_end_hour (gint day_end_hour);
-guint calendar_config_add_notification_day_end_hour (GConfClientNotifyFunc func, gpointer data);
-
-gint calendar_config_get_day_end_minute (void);
-void calendar_config_set_day_end_minute (gint day_end_min);
-guint calendar_config_add_notification_day_end_minute (GConfClientNotifyFunc func, gpointer data);
-
-/* 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);
-guint calendar_config_add_notification_24_hour_format (GConfClientNotifyFunc func, gpointer data);
-
-/* 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);
-guint calendar_config_add_notification_time_divisions (GConfClientNotifyFunc func, gpointer data);
-
-/* Whether we show event end times. */
-gboolean calendar_config_get_show_event_end (void);
-void calendar_config_set_show_event_end (gboolean show_end);
-guint calendar_config_add_notification_show_event_end (GConfClientNotifyFunc func, gpointer data);
-
-/* 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);
-guint calendar_config_add_notification_compress_weekend (GConfClientNotifyFunc func, gpointer data);
-
-/* 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);
-guint calendar_config_add_notification_dnav_show_week_no (GConfClientNotifyFunc func, gpointer data);
-
-/* 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. */
-gint calendar_config_get_hpane_pos (void);
-void calendar_config_set_hpane_pos (gint hpane_pos);
-
-gint calendar_config_get_vpane_pos (void);
-void calendar_config_set_vpane_pos (gint vpane_pos);
-
-gint calendar_config_get_month_hpane_pos (void);
-void calendar_config_set_month_hpane_pos (gint hpane_pos);
-
-gint calendar_config_get_month_vpane_pos (void);
-void calendar_config_set_month_vpane_pos (gint vpane_pos);
-
-/* The current list of task lists selected */
-GSList *calendar_config_get_tasks_selected (void);
-void calendar_config_set_tasks_selected (GSList *selected);
-guint calendar_config_add_notification_tasks_selected (GConfClientNotifyFunc func, gpointer data);
-
-/* The primary calendar */
-char *calendar_config_get_primary_tasks (void);
-void calendar_config_set_primary_tasks (const char *primary_uid);
-guint calendar_config_add_notification_primary_tasks (GConfClientNotifyFunc func, gpointer data);
-
-/* The pane position */
-gint calendar_config_get_task_vpane_pos (void);
-void calendar_config_set_task_vpane_pos (gint 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);
-
-char* calendar_config_get_hide_completed_tasks_sexp (void);
-
-/* Confirmation options */
-gboolean calendar_config_get_confirm_delete (void);
-void calendar_config_set_confirm_delete (gboolean confirm);
-
-gboolean calendar_config_get_confirm_purge (void);
-void calendar_config_set_confirm_purge (gboolean confirm);
-
-/* Default reminder options */
-gboolean calendar_config_get_use_default_reminder (void);
-void calendar_config_set_use_default_reminder (gboolean value);
-
-int calendar_config_get_default_reminder_interval (void);
-void calendar_config_set_default_reminder_interval (int interval);
-
-CalUnits calendar_config_get_default_reminder_units (void);
-void calendar_config_set_default_reminder_units (CalUnits units);
-
-
-/* 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-offline-handler.c b/calendar/gui/calendar-offline-handler.c
deleted file mode 100644
index 89a7aab36e..0000000000
--- a/calendar/gui/calendar-offline-handler.c
+++ /dev/null
@@ -1,345 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <bonobo/bonobo-i18n.h>
-#include <gal/util/e-util.h>
-#include "e-util/e-url.h"
-#include <libecal/e-cal.h>
-#include "calendar-offline-handler.h"
-
-#define PARENT_TYPE bonobo_object_get_type ()
-static BonoboObjectClass *parent_class = NULL;
-
-struct _CalendarOfflineHandlerPrivate {
- ECal *client;
-
- GNOME_Evolution_OfflineProgressListener listener_interface;
-
- gboolean is_offline;
-};
-
-static void
-add_connection (gpointer data, gpointer user_data)
-{
- EUri *uri = e_uri_new (data);
- GNOME_Evolution_ConnectionList *list = user_data;
-
- g_return_if_fail (uri != NULL);
-
- if (uri->host != NULL)
- list->_buffer[list->_length].hostName = CORBA_string_dup (uri->host);
- else
- list->_buffer[list->_length].hostName = CORBA_string_dup ("Unknown");
- if (uri->protocol != NULL)
- list->_buffer[list->_length].type = CORBA_string_dup (uri->protocol);
- else
- list->_buffer[list->_length].type = CORBA_string_dup ("Unknown");
- list->_length++;
-
- e_uri_free (uri);
-}
-
-static GNOME_Evolution_ConnectionList *
-create_connection_list (CalendarOfflineHandler *offline_handler)
-{
- CalendarOfflineHandlerPrivate *priv;
- GNOME_Evolution_ConnectionList *list;
- GList *uris;
-
- priv = offline_handler->priv;
-
- uris = e_cal_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 (ECal *client, ECalSetModeStatus status, CalMode mode, gpointer data)
-{
- CalendarOfflineHandler *offline_handler = data;
-
- update_offline (offline_handler);
- g_object_unref (client);
-}
-
-static void
-backend_cal_opened_offline (ECal *client, ECalendarStatus status, gpointer data)
-{
- CalendarOfflineHandler *offline_handler = data;
-
- if (status != E_CALENDAR_STATUS_OK) {
- update_offline (offline_handler);
- g_object_unref (client);
- return;
- }
-
- g_signal_connect (client, "cal_set_mode", G_CALLBACK (backend_cal_set_mode), offline_handler);
- e_cal_set_mode (client, CAL_MODE_LOCAL);
-}
-
-static void
-backend_cal_opened_online (ECal *client, ECalendarStatus status, gpointer data)
-{
- if (status != E_CALENDAR_STATUS_OK) {
- g_object_unref (client);
- return;
- }
-
- e_cal_set_mode (client, CAL_MODE_REMOTE);
- g_object_unref (client);
-}
-
-static void
-backend_go_offline (gpointer data, gpointer user_data)
-{
- CalendarOfflineHandler *offline_handler = user_data;
- char *uri = data;
- ECal *client;
- gboolean success;
- GError *error = NULL;
-
- client = e_cal_new_from_uri (uri, CALOBJ_TYPE_ANY);
- g_signal_connect (client, "cal_opened", G_CALLBACK (backend_cal_opened_offline), offline_handler);
- success = e_cal_open (client, TRUE, &error);
- if (!success) {
- g_warning (_("backend_go_offline(): %s"), error->message);
- update_offline (offline_handler);
- g_object_unref (client);
- g_error_free (error);
- return;
- }
-}
-
-static void
-backend_go_online (gpointer data, gpointer user_data)
-{
- CalendarOfflineHandler *offline_handler = user_data;
- char *uri = data;
- ECal *client;
- gboolean success;
- GError *error = NULL;
-
- client = e_cal_new_from_uri (uri, CALOBJ_TYPE_ANY);
- g_signal_connect (G_OBJECT (client), "cal_opened",
- G_CALLBACK (backend_cal_opened_online), offline_handler);
- success = e_cal_open (client, TRUE, &error);
- if (!success) {
- g_warning (_("backend_go_online(): %s"), error->message);
- g_object_unref (client);
- g_error_free (error);
- return;
- }
-}
-
-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 = e_cal_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;
- GList *uris;
-
- offline_handler = CALENDAR_OFFLINE_HANDLER (bonobo_object_from_servant (servant));
- priv = offline_handler->priv;
-
- uris = e_cal_uri_list (priv->client, CAL_MODE_LOCAL);
-
- g_list_foreach (uris, backend_go_online, offline_handler);
-}
-
-/* GObject methods. */
-
-static void
-impl_dispose (GObject *object)
-{
- CalendarOfflineHandler *offline_handler;
- CalendarOfflineHandlerPrivate *priv;
-
- offline_handler = CALENDAR_OFFLINE_HANDLER (object);
- priv = offline_handler->priv;
-
- if (priv->client) {
- g_object_unref (priv->client);
- priv->client = NULL;
- }
-
- 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);
-
- priv->listener_interface = CORBA_OBJECT_NIL;
- }
-
- if (G_OBJECT_CLASS (parent_class)->dispose)
- (* G_OBJECT_CLASS (parent_class)->dispose) (object);
-}
-
-static void
-impl_finalize (GObject *object)
-{
- CalendarOfflineHandler *offline_handler;
- CalendarOfflineHandlerPrivate *priv;
-
- offline_handler = CALENDAR_OFFLINE_HANDLER (object);
- priv = offline_handler->priv;
-
- g_free (priv);
-
- if (G_OBJECT_CLASS (parent_class)->finalize)
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
-}
-
-/* GTK+ type initialization. */
-
-static void
-calendar_offline_handler_class_init (CalendarOfflineHandlerClass *klass)
-{
- GObjectClass *object_class;
- POA_GNOME_Evolution_Offline__epv *epv;
-
- object_class = G_OBJECT_CLASS (klass);
- object_class->dispose = impl_dispose;
- object_class->finalize = impl_finalize;
-
- 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;
-
- /* FIXME: what URI to use? */
- priv->client = e_cal_new_from_uri ("", CALOBJ_TYPE_ANY);
- priv->listener_interface = CORBA_OBJECT_NIL;
- priv->is_offline = FALSE;
-}
-
-CalendarOfflineHandler *
-calendar_offline_handler_new (void)
-{
- CalendarOfflineHandler *new;
-
- new = g_object_new (calendar_offline_handler_get_type (), NULL);
-
- return new;
-}
-
-BONOBO_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 3cc61b4f25..0000000000
--- a/calendar/gui/calendar-offline-handler.h
+++ /dev/null
@@ -1,69 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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-object.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 {
- BonoboObject parent;
-
- CalendarOfflineHandlerPrivate *priv;
-};
-
-struct _CalendarOfflineHandlerClass {
- BonoboObjectClass 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-view-factory.c b/calendar/gui/calendar-view-factory.c
deleted file mode 100644
index a90e8a46d4..0000000000
--- a/calendar/gui/calendar-view-factory.c
+++ /dev/null
@@ -1,228 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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-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_finalize (GObject *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;
-
-
-
-E_MAKE_TYPE (calendar_view_factory, "CalendarViewFactory", CalendarViewFactory,
- calendar_view_factory_class_init, calendar_view_factory_init, GAL_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;
- GObjectClass *gobject_class;
-
- parent_class = g_type_class_peek_parent (class);
-
- gal_view_factory_class = (GalViewFactoryClass *) class;
- gobject_class = (GObjectClass *) 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;
-
- gobject_class->finalize = calendar_view_factory_finalize;
-}
-
-/* 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;
-}
-
-/* Finalize method for the calendar view factory */
-static void
-calendar_view_factory_finalize (GObject *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 (G_OBJECT_CLASS (parent_class)->finalize)
- (* G_OBJECT_CLASS (parent_class)->finalize) (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");
-
- case GNOME_CAL_LIST_VIEW:
- return _("List 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";
-
- case GNOME_CAL_LIST_VIEW:
- return "list_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 = g_object_new (TYPE_CALENDAR_VIEW_FACTORY, NULL);
- 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 6d1de25590..0000000000
--- a/calendar/gui/calendar-view-factory.h
+++ /dev/null
@@ -1,64 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 <gal/menus/gal-view-factory.h>
-#include "gnome-cal.h"
-
-G_BEGIN_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);
-
-
-
-G_END_DECLS
-
-#endif
diff --git a/calendar/gui/calendar-view.c b/calendar/gui/calendar-view.c
deleted file mode 100644
index 1aec23ef36..0000000000
--- a/calendar/gui/calendar-view.c
+++ /dev/null
@@ -1,288 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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_finalize (GObject *object);
-
-static void calendar_view_edit (GalView *view, GtkWindow *parent_window);
-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;
-
-
-
-E_MAKE_TYPE (calendar_view, "CalendarView", CalendarView, calendar_view_class_init,
- calendar_view_init, GAL_VIEW_TYPE);
-
-/* Class initialization function for the calendar view */
-static void
-calendar_view_class_init (CalendarViewClass *class)
-{
- GalViewClass *gal_view_class;
- GObjectClass *object_class;
-
- parent_class = g_type_class_peek_parent (class);
-
- gal_view_class = (GalViewClass *) class;
- object_class = (GObjectClass *) 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->finalize = calendar_view_finalize;
-}
-
-/* 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_finalize (GObject *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 (G_OBJECT_CLASS (parent_class)->finalize)
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
-}
-
-
-
-/* edit method of the calendar view */
-static void
-calendar_view_edit (GalView *view, GtkWindow *parent_window)
-{
- /* 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 = g_object_new (TYPE_CALENDAR_VIEW, NULL);
- 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 = g_object_new (TYPE_CALENDAR_VIEW, NULL);
- 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 8b85966a90..0000000000
--- a/calendar/gui/calendar-view.h
+++ /dev/null
@@ -1,66 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 <gal/menus/gal-view.h>
-#include "gnome-cal.h"
-
-G_BEGIN_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);
-
-
-
-G_END_DECLS
-
-#endif
diff --git a/calendar/gui/comp-editor-factory.c b/calendar/gui/comp-editor-factory.c
deleted file mode 100644
index a50b135f90..0000000000
--- a/calendar/gui/comp-editor-factory.c
+++ /dev/null
@@ -1,663 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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/gtkmessagedialog.h>
-#include <bonobo/bonobo-exception.h>
-#include <bonobo/bonobo-i18n.h>
-#include <evolution-calendar.h>
-#include <e-util/e-url.h>
-#include <libecal/e-cal.h>
-#include "calendar-config.h"
-#include "e-comp-editor-registry.h"
-#include "comp-editor-factory.h"
-#include "comp-util.h"
-#include "dialogs/event-editor.h"
-#include "dialogs/task-editor.h"
-
-extern ECompEditorRegistry *comp_editor_registry;
-
-
-
-/* A pending request */
-
-typedef enum {
- REQUEST_EXISTING,
- REQUEST_NEW
-} RequestType;
-
-typedef struct {
- RequestType type;
-
- union {
- struct {
- char *uid;
- } existing;
-
- struct {
- GNOME_Evolution_Calendar_CompEditorFactory_CompEditorMode type;
- } 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 */
- char *uri;
-
- /* Client of the calendar */
- ECal *client;
-
- /* Count editors using this client */
- int editor_count;
-
- /* 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;
-
-/* 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_finalize (GObject *object);
-
-static void impl_editExisting (PortableServer_Servant servant,
- const CORBA_char *str_uri,
- const CORBA_char *uid,
- CORBA_Environment *ev);
-static void impl_editNew (PortableServer_Servant servant,
- const CORBA_char *str_uri,
- const GNOME_Evolution_Calendar_CalObjType type,
- CORBA_Environment *ev);
-
-static BonoboObjectClass *parent_class = NULL;
-
-
-
-BONOBO_TYPE_FUNC_FULL (CompEditorFactory,
- GNOME_Evolution_Calendar_CompEditorFactory,
- BONOBO_OBJECT_TYPE,
- comp_editor_factory);
-
-/* Class initialization function for the component editor factory */
-static void
-comp_editor_factory_class_init (CompEditorFactoryClass *class)
-{
- GObjectClass *object_class;
-
- object_class = (GObjectClass *) class;
-
- parent_class = g_type_class_peek_parent (class);
-
- class->epv.editExisting = impl_editExisting;
- class->epv.editNew = impl_editNew;
-
- object_class->finalize = comp_editor_factory_finalize;
-}
-
-/* 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 (g_str_hash, g_str_equal);
-}
-
-/* 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;
-
- g_free (oc->uri);
- oc->uri = NULL;
-
- g_object_unref (oc->client);
- oc->client = 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_finalize (GObject *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 (G_OBJECT_CLASS (parent_class)->finalize)
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
-}
-
-
-
-/* Callback used when a component editor gets destroyed */
-static void
-editor_destroy_cb (GtkObject *object, gpointer data)
-{
- OpenClient *oc;
- CompEditorFactory *factory;
- CompEditorFactoryPrivate *priv;
-
- oc = data;
- factory = oc->factory;
- priv = factory->priv;
-
- oc->editor_count--;
-
- /* See if we need to free the client */
- g_assert (oc->pending == NULL);
-
- if (oc->editor_count != 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)
-{
- ECalComponent *comp;
- icalcomponent *icalcomp;
- CompEditor *editor;
- ECalComponentVType vtype;
-
- g_assert (oc->open);
-
- /* Get the object */
- if (!e_cal_get_object (oc->client, uid, NULL, &icalcomp, NULL)) {
- /* FIXME Better error handling */
- g_warning (G_STRLOC ": Syntax error while getting component `%s'", uid);
-
- return;
- }
-
- comp = e_cal_component_new ();
- if (!e_cal_component_set_icalcomponent (comp, icalcomp)) {
- g_object_unref (comp);
- icalcomponent_free (icalcomp);
- return;
- }
-
- /* Create the appropriate type of editor */
-
- vtype = e_cal_component_get_vtype (comp);
-
- switch (vtype) {
- case E_CAL_COMPONENT_EVENT:
- editor = COMP_EDITOR (event_editor_new (oc->client));
- break;
-
- case E_CAL_COMPONENT_TODO:
- editor = COMP_EDITOR (task_editor_new (oc->client));
- break;
-
- default:
- g_message ("edit_exiting(): Unsupported object type %d", (int) vtype);
- g_object_unref (comp);
- return;
- }
-
- /* Set the object on the editor */
- comp_editor_edit_comp (editor, comp);
- comp_editor_focus (editor);
-
- oc->editor_count++;
- g_signal_connect (editor, "destroy", G_CALLBACK (editor_destroy_cb), oc);
-
- e_comp_editor_registry_add (comp_editor_registry, editor, TRUE);
-}
-
-/* Creates a component with the appropriate defaults for the specified component
- * type.
- */
-static ECalComponent *
-get_default_event (ECal *client, gboolean all_day)
-{
- ECalComponent *comp;
- struct icaltimetype itt;
- ECalComponentDateTime dt;
- char *location;
- icaltimezone *zone;
-
- comp = cal_comp_event_new_with_defaults (client);
-
- location = calendar_config_get_timezone ();
- zone = icaltimezone_get_builtin_timezone (location);
-
- if (all_day) {
- itt = icaltime_from_timet_with_zone (time (NULL), 1, zone);
-
- dt.value = &itt;
- dt.tzid = icaltimezone_get_tzid (zone);
-
- e_cal_component_set_dtstart (comp, &dt);
- e_cal_component_set_dtend (comp, &dt);
- } else {
- itt = icaltime_current_time_with_zone (zone);
- icaltime_adjust (&itt, 0, 1, -itt.minute, -itt.second);
-
- dt.value = &itt;
- dt.tzid = icaltimezone_get_tzid (zone);
-
- e_cal_component_set_dtstart (comp, &dt);
- icaltime_adjust (&itt, 0, 1, 0, 0);
- e_cal_component_set_dtend (comp, &dt);
- }
-
- e_cal_component_commit_sequence (comp);
-
- return comp;
-}
-
-static ECalComponent *
-get_default_task (ECal *client)
-{
- ECalComponent *comp;
-
- comp = cal_comp_task_new_with_defaults (client);
-
- return comp;
-}
-
-/* Edits a new object in the context of a client */
-static void
-edit_new (OpenClient *oc, const GNOME_Evolution_Calendar_CompEditorFactory_CompEditorMode type)
-{
- ECalComponent *comp;
- CompEditor *editor;
-
- switch (type) {
- case GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_EVENT:
- case GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_MEETING:
- editor = COMP_EDITOR (event_editor_new (oc->client));
- comp = get_default_event (oc->client, FALSE);
- break;
- case GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_ALLDAY_EVENT:
- editor = COMP_EDITOR (event_editor_new (oc->client));
- comp = get_default_event (oc->client, TRUE);
- break;
- case GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_TODO:
- editor = COMP_EDITOR (task_editor_new (oc->client));
- comp = get_default_task (oc->client);
- break;
- default:
- g_assert_not_reached ();
- return;
- }
-
- comp_editor_edit_comp (editor, comp);
- if (type == GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_MEETING)
- event_editor_show_meeting (EVENT_EDITOR (editor));
- comp_editor_focus (editor);
-
- oc->editor_count++;
- g_signal_connect (editor, "destroy", G_CALLBACK (editor_destroy_cb), oc);
-
- e_comp_editor_registry_add (comp_editor_registry, editor, TRUE);
-}
-
-/* Resolves all the pending requests for a client */
-static void
-resolve_pending_requests (OpenClient *oc)
-{
- CompEditorFactory *factory;
- CompEditorFactoryPrivate *priv;
- GSList *l;
- char *location;
- icaltimezone *zone;
-
- factory = oc->factory;
- priv = factory->priv;
-
- if (!oc->pending)
- return;
-
- /* Set the default timezone in the backend. */
- location = calendar_config_get_timezone ();
- zone = icaltimezone_get_builtin_timezone (location);
- if (zone)
- /* FIXME Error handling? */
- e_cal_set_default_timezone (oc->client, zone, 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.type);
- 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 (ECal *client, ECalendarStatus status, gpointer data)
-{
- OpenClient *oc;
- CompEditorFactory *factory;
- CompEditorFactoryPrivate *priv;
- GtkWidget *dialog = NULL;
-
- oc = data;
- factory = oc->factory;
- priv = factory->priv;
-
- switch (status) {
- case E_CALENDAR_STATUS_OK:
- oc->open = TRUE;
- resolve_pending_requests (oc);
- return;
-
- case E_CALENDAR_STATUS_OTHER_ERROR:
- dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
- GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
- _("Error while opening the calendar"));
- break;
-
- case E_CALENDAR_STATUS_NO_SUCH_CALENDAR:
- /* oops - we specified only_if_exists = FALSE */
- g_assert_not_reached ();
- return;
-
- case E_CALENDAR_STATUS_PROTOCOL_NOT_SUPPORTED:
- dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
- GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
- _("Method not supported when opening the calendar"));
- break;
-
- case E_CALENDAR_STATUS_PERMISSION_DENIED :
- dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
- GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
- _("Permission denied to open the calendar"));
- break;
-
- default:
- g_assert_not_reached ();
- return;
- }
-
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
-
- 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, const char *uristr)
-{
- CompEditorFactoryPrivate *priv;
- ECal *client;
- OpenClient *oc;
- GError *error = NULL;
-
- priv = factory->priv;
-
- client = e_cal_new_from_uri (uristr, CALOBJ_TYPE_ANY);
- if (!client)
- return NULL;
-
- oc = g_new (OpenClient, 1);
- oc->factory = factory;
-
- oc->uri = g_strdup (uristr);
-
- oc->client = client;
- oc->editor_count = 0;
- oc->pending = NULL;
- oc->open = FALSE;
-
- g_signal_connect (oc->client, "cal_opened", G_CALLBACK (cal_opened_cb), oc);
-
- g_hash_table_insert (priv->uri_client_hash, oc->uri, oc);
-
- if (!e_cal_open (oc->client, FALSE, &error)) {
- g_warning (_("open_client(): %s"), error->message);
- g_free (oc->uri);
- g_object_unref (oc->client);
- g_free (oc);
- g_error_free (error);
-
- return NULL;
- }
-
- 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;
- OpenClient *oc;
- EUri *uri;
-
- priv = factory->priv;
-
- /* Look up the client */
-
- uri = e_uri_new (str_uri);
- if (!uri) {
- bonobo_exception_set (ev, ex_GNOME_Evolution_Calendar_CompEditorFactory_InvalidURI);
- return NULL;
- }
- e_uri_free (uri);
-
- oc = g_hash_table_lookup (priv->uri_client_hash, str_uri);
- if (!oc) {
- oc = open_client (factory, str_uri);
- if (!oc) {
- bonobo_exception_set (ev, ex_GNOME_Evolution_Calendar_CompEditorFactory_BackendContactError);
- return NULL;
- }
- }
-
- 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 CORBA_char *uid,
- CORBA_Environment *ev)
-{
- CompEditorFactory *factory;
- CompEditorFactoryPrivate *priv;
- OpenClient *oc;
- CompEditor *editor;
-
- 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 */
- editor = e_comp_editor_registry_find (comp_editor_registry, uid);
- if (editor == NULL) {
- edit_existing (oc, uid);
- } else {
- comp_editor_focus (editor);
- }
-}
-
-/* Queues a request for creating a new object */
-static void
-queue_edit_new (OpenClient *oc, const GNOME_Evolution_Calendar_CompEditorFactory_CompEditorMode type)
-{
- Request *request;
-
- g_assert (!oc->open);
-
- request = g_new (Request, 1);
- request->type = REQUEST_NEW;
- request->u.new.type = type;
-
- 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_CompEditorFactory_CompEditorMode corba_type,
- CORBA_Environment *ev)
-{
- CompEditorFactory *factory;
- CompEditorFactoryPrivate *priv;
- OpenClient *oc;
-
- 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_new (oc, corba_type);
- else
- edit_new (oc, corba_type);
-}
-
-
-
-/**
- * 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 g_object_new (TYPE_COMP_EDITOR_FACTORY, NULL);
-}
-
-
diff --git a/calendar/gui/comp-editor-factory.h b/calendar/gui/comp-editor-factory.h
deleted file mode 100644
index fca4573497..0000000000
--- a/calendar/gui/comp-editor-factory.h
+++ /dev/null
@@ -1,58 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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-object.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 {
- BonoboObject object;
-
- /* Private data */
- CompEditorFactoryPrivate *priv;
-} CompEditorFactory;
-
-typedef struct {
- BonoboObjectClass 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 170adb0cf5..0000000000
--- a/calendar/gui/comp-util.c
+++ /dev/null
@@ -1,342 +0,0 @@
-/* Evolution calendar - Utilities for manipulating ECalComponent 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 "calendar-config.h"
-#include "comp-util.h"
-#include "dialogs/delete-comp.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 (ECalComponent *comp, time_t t, icaltimezone *zone)
-{
- GSList *list;
- ECalComponentDateTime *cdt;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (E_IS_CAL_COMPONENT (comp));
-
- e_cal_component_get_exdate_list (comp, &list);
-
- cdt = g_new (ECalComponentDateTime, 1);
- cdt->value = g_new (struct icaltimetype, 1);
- *cdt->value = icaltime_from_timet_with_zone (t, FALSE, zone);
- cdt->tzid = g_strdup (icaltimezone_get_tzid (zone));
-
- list = g_slist_append (list, cdt);
- e_cal_component_set_exdate_list (comp, list);
- e_cal_component_free_exdate_list (list);
-}
-
-
-
-/* Returns TRUE if the TZIDs are equivalent, i.e. both NULL or the same. */
-static gboolean
-e_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 #ECal.
- *
- * 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 (ECalComponent *comp,
- ECal *client,
- icaltimezone *zone)
-{
- ECalComponentDateTime start_datetime, end_datetime;
- const char *tzid;
- gboolean retval = FALSE;
- icaltimezone *start_zone, *end_zone;
- int offset1, offset2;
-
- tzid = icaltimezone_get_tzid (zone);
-
- e_cal_component_get_dtstart (comp, &start_datetime);
- e_cal_component_get_dtend (comp, &end_datetime);
-
- /* If either the DTSTART or the DTEND is a DATE value, we return TRUE.
- Maybe if one was a DATE-TIME we should check that, but that should
- not happen often. */
- if ((start_datetime.value && start_datetime.value->is_date)
- || (end_datetime.value && end_datetime.value->is_date)) {
- retval = TRUE;
- goto out;
- }
-
- /* If the event uses UTC for DTSTART & DTEND, return TRUE. Outlook
- will send single events as UTC, so we don't want to mark all of
- these. */
- if ((!start_datetime.value || start_datetime.value->is_utc)
- && (!end_datetime.value || end_datetime.value->is_utc)) {
- retval = TRUE;
- goto out;
- }
-
- /* If the event uses floating time for DTSTART & DTEND, return TRUE.
- Imported vCalendar files will use floating times, so we don't want
- to mark all of these. */
- if (!start_datetime.tzid && !end_datetime.tzid) {
- retval = TRUE;
- goto out;
- }
-
- /* FIXME: DURATION may be used instead. */
- if (e_cal_component_compare_tzid (tzid, start_datetime.tzid)
- && e_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. */
- if (!e_cal_get_timezone (client, start_datetime.tzid,
- &start_zone, NULL))
- goto out;
-
- if (start_datetime.value) {
- offset1 = icaltimezone_get_utc_offset (start_zone,
- start_datetime.value,
- NULL);
- offset2 = icaltimezone_get_utc_offset (zone,
- start_datetime.value,
- NULL);
- if (offset1 != offset2)
- goto out;
- }
-
- if (!e_cal_get_timezone (client, end_datetime.tzid,
- &end_zone, NULL))
- goto out;
-
- if (end_datetime.value) {
- offset1 = icaltimezone_get_utc_offset (end_zone,
- end_datetime.value,
- NULL);
- offset2 = icaltimezone_get_utc_offset (zone,
- end_datetime.value,
- NULL);
- if (offset1 != offset2)
- goto out;
- }
-
- retval = TRUE;
- }
-
- out:
-
- e_cal_component_free_datetime (&start_datetime);
- e_cal_component_free_datetime (&end_datetime);
-
- return retval;
-}
-
-/**
- * cal_comp_confirm_delete_empty_comp:
- * @comp: A calendar component.
- * @client: Calendar client where the component purportedly lives.
- * @widget: Widget to be used as the basis for UTF8 conversion.
- *
- * Assumming a calendar component with an empty SUMMARY property (as per
- * string_is_empty()), asks whether the user wants to delete it based on
- * whether the appointment is on the calendar server or not. If the
- * component is on the server, this function will present a confirmation
- * dialog and delete the component if the user tells it to. If the component
- * is not on the server it will just return TRUE.
- *
- * Return value: A result code indicating whether the component
- * was not on the server and is to be deleted locally, whether it
- * was on the server and the user deleted it, or whether the
- * user cancelled the deletion.
- **/
-gboolean
-cal_comp_is_on_server (ECalComponent *comp, ECal *client)
-{
- const char *uid;
- icalcomponent *icalcomp;
- GError *error = NULL;
-
- g_return_val_if_fail (comp != NULL, FALSE);
- g_return_val_if_fail (E_IS_CAL_COMPONENT (comp), FALSE);
- g_return_val_if_fail (client != NULL, FALSE);
- g_return_val_if_fail (E_IS_CAL (client), FALSE);
-
- /* See if the component is on the server. If it is not, then it likely
- * means that the appointment is new, only in the day view, and we
- * haven't added it yet to the server. In that case, we don't need to
- * confirm and we can just delete the event. Otherwise, we ask
- * the user.
- */
- e_cal_component_get_uid (comp, &uid);
-
- if (e_cal_get_object (client, uid, NULL, &icalcomp, &error)) {
- icalcomponent_free (icalcomp);
-
- return TRUE;
- }
-
- if (error->code != E_CALENDAR_STATUS_OBJECT_NOT_FOUND)
- g_warning (G_STRLOC ": %s", error->message);
-
- g_clear_error (&error);
-
- return FALSE;
-}
-
-/**
- * cal_comp_event_new_with_defaults:
- *
- * Creates a new VEVENT component and adds any default alarms to it as set in
- * the program's configuration values.
- *
- * Return value: A newly-created calendar component.
- **/
-ECalComponent *
-cal_comp_event_new_with_defaults (ECal *client)
-{
- icalcomponent *icalcomp;
- ECalComponent *comp;
- int interval;
- CalUnits units;
- ECalComponentAlarm *alarm;
- icalproperty *icalprop;
- ECalComponentAlarmTrigger trigger;
-
- if (!e_cal_get_default_object (client, &icalcomp, NULL))
- return NULL;
-
- comp = e_cal_component_new ();
- if (!e_cal_component_set_icalcomponent (comp, icalcomp)) {
- g_object_unref (comp);
- icalcomponent_free (icalcomp);
- return NULL;
- }
-
- if (!calendar_config_get_use_default_reminder ())
- return comp;
-
- interval = calendar_config_get_default_reminder_interval ();
- units = calendar_config_get_default_reminder_units ();
-
- alarm = e_cal_component_alarm_new ();
-
- /* We don't set the description of the alarm; we'll copy it from the
- * summary when it gets committed to the server. For that, we add a
- * X-EVOLUTION-NEEDS-DESCRIPTION property to the alarm's component.
- */
- icalcomp = e_cal_component_alarm_get_icalcomponent (alarm);
- icalprop = icalproperty_new_x ("1");
- icalproperty_set_x_name (icalprop, "X-EVOLUTION-NEEDS-DESCRIPTION");
- icalcomponent_add_property (icalcomp, icalprop);
-
- e_cal_component_alarm_set_action (alarm, E_CAL_COMPONENT_ALARM_DISPLAY);
-
- trigger.type = E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START;
-
- memset (&trigger.u.rel_duration, 0, sizeof (trigger.u.rel_duration));
-
- trigger.u.rel_duration.is_neg = TRUE;
-
- switch (units) {
- case CAL_MINUTES:
- trigger.u.rel_duration.minutes = interval;
- break;
-
- case CAL_HOURS:
- trigger.u.rel_duration.hours = interval;
- break;
-
- case CAL_DAYS:
- trigger.u.rel_duration.days = interval;
- break;
-
- default:
- g_assert_not_reached ();
- }
-
- e_cal_component_alarm_set_trigger (alarm, trigger);
-
- e_cal_component_add_alarm (comp, alarm);
- e_cal_component_alarm_free (alarm);
-
- return comp;
-}
-
-ECalComponent *
-cal_comp_task_new_with_defaults (ECal *client)
-{
- ECalComponent *comp;
- icalcomponent *icalcomp;
-
- if (!e_cal_get_default_object (client, &icalcomp, NULL))
- return NULL;
-
- comp = e_cal_component_new ();
- if (!e_cal_component_set_icalcomponent (comp, icalcomp)) {
- g_object_unref (comp);
- icalcomponent_free (icalcomp);
-
- return NULL;
- }
-
- comp = e_cal_component_new ();
- if (!e_cal_component_set_icalcomponent (comp, icalcomp)) {
- g_object_unref (comp);
- icalcomponent_free (icalcomp);
- return NULL;
- }
-
- return comp;
-}
diff --git a/calendar/gui/comp-util.h b/calendar/gui/comp-util.h
deleted file mode 100644
index 0f4542aba1..0000000000
--- a/calendar/gui/comp-util.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Evolution calendar - Utilities for manipulating ECalComponent 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 <gtk/gtkwidget.h>
-#include <libecal/e-cal-component.h>
-#include <libecal/e-cal.h>
-
-void cal_comp_util_add_exdate (ECalComponent *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 (ECalComponent *comp,
- ECal *client,
- icaltimezone *zone);
-
-gboolean cal_comp_is_on_server (ECalComponent *comp,
- ECal *client);
-
-ECalComponent *cal_comp_event_new_with_defaults (ECal *client);
-ECalComponent *cal_comp_task_new_with_defaults (ECal *client);
-
-#endif
diff --git a/calendar/gui/control-factory.c b/calendar/gui/control-factory.c
deleted file mode 100644
index 58436ec841..0000000000
--- a/calendar/gui/control-factory.c
+++ /dev/null
@@ -1,217 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* control-factory.c
- *
- * Copyright (C) 2000, 2001, 2002, 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <string.h>
-#include <gtk/gtksignal.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 <bonobo/bonobo-property-bag.h>
-#include <glade/glade.h>
-#include <libgnomeui/gnome-dialog-util.h>
-
-#include <libecal/e-cal-time-util.h>
-#include <gui/gnome-cal.h>
-#include <gui/calendar-commands.h>
-#include <gui/calendar-config.h>
-
-#include "control-factory.h"
-
-#define PROPERTY_CALENDAR_URI "folder_uri"
-#define PROPERTY_CALENDAR_URI_IDX 1
-
-#define PROPERTY_CALENDAR_VIEW "view"
-#define PROPERTY_CALENDAR_VIEW_IDX 2
-
-
-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;
- const char *uri;
- BonoboControl *control = user_data;
-
- gcal = (GnomeCalendar *) bonobo_control_get_widget (control);
-
- switch (arg_id) {
-
- case PROPERTY_CALENDAR_URI_IDX:
- uri = e_cal_get_uri (e_cal_model_get_default_client (gnome_calendar_get_calendar_model (gcal)));
- BONOBO_ARG_SET_STRING (arg, uri);
- break;
-
- case PROPERTY_CALENDAR_VIEW_IDX:
- switch (gnome_calendar_get_view (gcal)) {
- case GNOME_CAL_DAY_VIEW:
- BONOBO_ARG_SET_STRING (arg, "day");
- break;
- case GNOME_CAL_WEEK_VIEW:
- BONOBO_ARG_SET_STRING (arg, "week");
- break;
- case GNOME_CAL_WORK_WEEK_VIEW:
- BONOBO_ARG_SET_STRING (arg, "workweek");
- break;
- case GNOME_CAL_MONTH_VIEW:
- BONOBO_ARG_SET_STRING (arg, "month");
- break;
- case GNOME_CAL_LIST_VIEW:
- BONOBO_ARG_SET_STRING (arg, "list");
- break;
- default:
- }
- 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;
- char *string;
- GnomeCalendarViewType view;
- BonoboControl *control = user_data;
-
- gcal = (GnomeCalendar *) bonobo_control_get_widget (control);
-
- switch (arg_id) {
- case PROPERTY_CALENDAR_URI_IDX:
- string = BONOBO_ARG_GET_STRING (arg);
- if (gnome_calendar_add_event_uri (gcal, string)) {
- calendar_control_sensitize_calendar_commands (control, gcal, TRUE);
- } else {
- char *msg;
-
- msg = g_strdup_printf (_("Could not open the folder in '%s'"), string);
- gnome_error_dialog_parented (
- msg,
- GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gcal))));
- g_free (msg);
- }
- break;
-
- case PROPERTY_CALENDAR_VIEW_IDX:
- string = BONOBO_ARG_GET_STRING (arg);
- if (!strcmp (string, "week"))
- view = GNOME_CAL_WEEK_VIEW;
- else if (!strcmp (string, "workweek"))
- view = GNOME_CAL_WORK_WEEK_VIEW;
- else if (!strcmp (string, "month"))
- view = GNOME_CAL_MONTH_VIEW;
- else if (!strcmp (string, "day"))
- view = GNOME_CAL_DAY_VIEW;
- else
- view = calendar_config_get_default_view ();
-
- /* This doesn't actually work, because the GalView
- * comes along and resets the view. FIXME.
- */
- gnome_calendar_set_view (gcal, view, FALSE, TRUE);
- 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, control);
-
- 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_property_bag_add (pbag,
- PROPERTY_CALENDAR_VIEW,
- PROPERTY_CALENDAR_VIEW_IDX,
- BONOBO_ARG_STRING,
- NULL,
- _("The type of view to show"),
- 0);
-
- bonobo_control_set_properties (control, bonobo_object_corba_objref (BONOBO_OBJECT (pbag)), NULL);
- bonobo_object_unref (BONOBO_OBJECT (pbag));
-}
-
-BonoboControl *
-control_factory_new_control (void)
-{
- BonoboControl *control;
- GnomeCalendar *gcal;
-
- gcal = GNOME_CALENDAR (gnome_calendar_new ());
- 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;
- }
- g_object_set_data (G_OBJECT (gcal), "control", control);
-
- calendar_properties_init (gcal, control);
-
- g_signal_connect (control, "activate", G_CALLBACK (control_activate_cb), gcal);
-
- return control;
-}
diff --git a/calendar/gui/control-factory.h b/calendar/gui/control-factory.h
deleted file mode 100644
index bab1611c03..0000000000
--- a/calendar/gui/control-factory.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* control-factory.c
- *
- * Copyright (C) 2000, 2001, 2002, 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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_
-
-#include <bonobo/bonobo-control.h>
-
-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 182657d5ac..0000000000
--- a/calendar/gui/dialogs/.cvsignore
+++ /dev/null
@@ -1,8 +0,0 @@
-.deps
-.pure
-Makefile
-Makefile.in
-Evolution-Addressbook-SelectNames-common.c
-Evolution-Addressbook-SelectNames-skels.c
-Evolution-Addressbook-SelectNames-stubs.c
-Evolution-Addressbook-SelectNames.h
diff --git a/calendar/gui/dialogs/Makefile.am b/calendar/gui/dialogs/Makefile.am
deleted file mode 100644
index 7e3b76fd97..0000000000
--- a/calendar/gui/dialogs/Makefile.am
+++ /dev/null
@@ -1,106 +0,0 @@
-IDLS = $(top_srcdir)/addressbook/gui/component/select-names/Evolution-Addressbook-SelectNames.idl
-
-IDL_GENERATED_H = \
- Evolution-Addressbook-SelectNames.h
-IDL_GENERATED = $(IDL_GENERATED_H)
-
-$(IDL_GENERATED_H): $(IDLS)
- $(ORBIT_IDL) -I $(srcdir) $(IDL_INCLUDES) \
- --nostubs --noskels --nocommon \
- $(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_builddir) \
- -I$(top_srcdir)/calendar \
- -I$(top_srcdir)/calendar/cal-client \
- -I$(top_builddir)/calendar/cal-client \
- -I$(top_builddir)/shell \
- -I$(top_srcdir)/shell \
- -DEVOLUTION_DATADIR=\""$(datadir)"\" \
- -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
- -DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\" \
- -DEVOLUTION_UIDIR=\""$(evolutionuidir)"\" \
- -DPREFIX=\""$(prefix)"\" \
- $(EVOLUTION_CALENDAR_CFLAGS)
-
-noinst_LTLIBRARIES = libcal-dialogs.la
-
-libcal_dialogs_la_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 \
- copy-source-dialog.c \
- copy-source-dialog.h \
- delete-comp.c \
- delete-comp.h \
- delete-error.c \
- delete-error.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 \
- new-calendar.c \
- new-calendar.h \
- new-task-list.c \
- new-task-list.h \
- recurrence-page.c \
- recurrence-page.h \
- recur-comp.c \
- recur-comp.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
-
-glade_DATA = \
- alarm-options.glade \
- alarm-page.glade \
- cal-prefs-dialog.glade \
- e-delegate-dialog.glade \
- event-page.glade \
- meeting-page.glade \
- new-calendar.glade \
- new-task-list.glade \
- recurrence-page.glade \
- schedule-page.glade \
- task-details-page.glade \
- task-page.glade
-
-
-CLEANFILES = $(BUILT_SOURCES)
-
-dist-hook:
- cd $(distdir); rm -f $(BUILT_SOURCES)
-
-EXTRA_DIST = \
- $(glade_DATA)
diff --git a/calendar/gui/dialogs/alarm-options.c b/calendar/gui/dialogs/alarm-options.c
deleted file mode 100644
index 512020d4d6..0000000000
--- a/calendar/gui/dialogs/alarm-options.c
+++ /dev/null
@@ -1,811 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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-i18n.h>
-#include <gtk/gtkmain.h>
-#include <gtk/gtkcheckbutton.h>
-#include <gtk/gtkdialog.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkwindow.h>
-#include <gtk/gtkhbox.h>
-#include <gtk/gtktextbuffer.h>
-#include <gtk/gtktextview.h>
-#include <bonobo/bonobo-control.h>
-#include <bonobo/bonobo-exception.h>
-#include <bonobo/bonobo-widget.h>
-#include <libgnomeui/gnome-file-entry.h>
-#include <glade/glade.h>
-#include <addressbook/util/eab-destination.h>
-#include "Evolution-Addressbook-SelectNames.h"
-#include "e-util/e-dialog-widgets.h"
-#include "alarm-options.h"
-
-
-
-typedef struct {
- /* Glade XML data */
- GladeXML *xml;
-
- /* The alarm action selected */
- ECalComponentAlarmAction action;
-
- /* Toplevel */
- GtkWidget *toplevel;
-
- /* Alarm repeat widgets */
- gboolean repeat;
- 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;
-
- /* Mail alarm widgets */
- const char *email;
- GtkWidget *malarm_group;
- GtkWidget *malarm_address_group;
- GtkWidget *malarm_addresses;
- GtkWidget *malarm_addressbook;
- GtkWidget *malarm_description;
- GNOME_Evolution_Addressbook_SelectNames corba_select_names;
-
- /* Procedure alarm widgets */
- GtkWidget *palarm_group;
- GtkWidget *palarm_program;
- GtkWidget *palarm_args;
-} Dialog;
-
-#define SELECT_NAMES_OAFID "OAFIID:GNOME_Evolution_Addressbook_SelectNames:" BASE_VERSION
-static const char *section_name = "Send To";
-
-
-
-/* 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->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->malarm_address_group = GW ("malarm-address-group");
- dialog->malarm_addressbook = GW ("malarm-addressbook");
- dialog->malarm_description = GW ("malarm-description");
-
- dialog->palarm_group = GW ("palarm-group");
- dialog->palarm_program = GW ("palarm-program");
- dialog->palarm_args = GW ("palarm-args");
-
- return (dialog->toplevel
- && 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->malarm_address_group
- && dialog->malarm_addressbook
- && dialog->malarm_description
- && dialog->palarm_group
- && dialog->palarm_program
- && dialog->palarm_args);
-}
-
-static void
-addressbook_clicked_cb (GtkWidget *widget, gpointer data)
-{
- Dialog *dialog = data;
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
-
- GNOME_Evolution_Addressbook_SelectNames_activateDialog (dialog->corba_select_names,
- section_name, &ev);
-
- CORBA_exception_free (&ev);
-}
-
-static gboolean
-setup_select_names (Dialog *dialog)
-{
- Bonobo_Control corba_control;
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
-
- dialog->corba_select_names = bonobo_activation_activate_from_id (SELECT_NAMES_OAFID, 0, NULL, &ev);
- if (BONOBO_EX (&ev))
- return FALSE;
-
- GNOME_Evolution_Addressbook_SelectNames_addSection (dialog->corba_select_names,
- section_name, section_name, &ev);
- if (BONOBO_EX (&ev))
- return FALSE;
-
- corba_control = GNOME_Evolution_Addressbook_SelectNames_getEntryBySection (dialog->corba_select_names,
- section_name, &ev);
-
- if (BONOBO_EX (&ev))
- return FALSE;
-
- CORBA_exception_free (&ev);
-
- dialog->malarm_addresses = bonobo_widget_new_control_from_objref (corba_control, CORBA_OBJECT_NIL);
- gtk_widget_show (dialog->malarm_addresses);
- gtk_box_pack_end_defaults (GTK_BOX (dialog->malarm_address_group), dialog->malarm_addresses);
-
- gtk_signal_connect (GTK_OBJECT (dialog->malarm_addressbook), "clicked",
- GTK_SIGNAL_FUNC (addressbook_clicked_cb), dialog);
-
- return TRUE;
-}
-
-static void
-palarm_options_changed_cb (GtkEditable *entry, gpointer user_data)
-{
- const gchar *text;
- Dialog *dialog = user_data;
-
- text = gtk_entry_get_text (GTK_ENTRY (dialog->palarm_program));
- if (text && *text)
- gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog->toplevel), GTK_RESPONSE_OK, TRUE);
- else
- gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog->toplevel), GTK_RESPONSE_OK, FALSE);
-}
-
-/* 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);
-
- /* activate the 'OK' button */
- if (dialog->action == E_CAL_COMPONENT_ALARM_PROCEDURE)
- palarm_options_changed_cb (GTK_EDITABLE (dialog->palarm_program), dialog);
-}
-
-static void
-repeat_spin_button_changed_cb (GtkWidget *spin, gpointer user_data)
-{
- Dialog *dialog = user_data;
-
- if (dialog->action == E_CAL_COMPONENT_ALARM_PROCEDURE)
- palarm_options_changed_cb (GTK_EDITABLE (dialog->palarm_program), dialog);
-}
-
-
-static void
-repeat_unit_changed_cb (GtkWidget *option_menu, gpointer user_data)
-{
- Dialog *dialog = user_data;
-
- if (dialog->action == E_CAL_COMPONENT_ALARM_PROCEDURE)
- palarm_options_changed_cb (GTK_EDITABLE (dialog->palarm_program), dialog);
-}
-
-/* Hooks the widget signals */
-static void
-init_widgets (Dialog *dialog)
-{
- /* Alarm repeat */
-
- g_signal_connect (G_OBJECT (dialog->repeat_toggle), "toggled",
- G_CALLBACK (repeat_toggle_toggled_cb), dialog);
-
- g_signal_connect (G_OBJECT (dialog->repeat_quantity), "value_changed",
- G_CALLBACK (repeat_spin_button_changed_cb), dialog);
- g_signal_connect (G_OBJECT (dialog->repeat_value), "value_changed",
- G_CALLBACK (repeat_spin_button_changed_cb), dialog);
-
- g_signal_connect (G_OBJECT (dialog->repeat_unit), "changed",
- G_CALLBACK (repeat_unit_changed_cb), dialog);
-}
-
-/* Fills the audio alarm widgets with the values from the alarm component */
-static void
-alarm_to_aalarm_widgets (Dialog *dialog, ECalComponentAlarm *alarm)
-{
- icalattach *attach;
- const char *url;
-
- e_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, ECalComponentAlarm *alarm)
-{
- ECalComponentText description;
- GtkTextBuffer *text_buffer;
-
- e_cal_component_alarm_get_description (alarm, &description);
-
- text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (dialog->dalarm_description));
- gtk_text_buffer_set_text (text_buffer, description.value ? description.value : "", -1);
-}
-
-/* Fills the mail alarm widgets with the values from the alarm component */
-static void
-alarm_to_malarm_widgets (Dialog *dialog, ECalComponentAlarm *alarm)
-{
- ECalComponentText description;
- GtkTextBuffer *text_buffer;
- GSList *attendee_list, *l;
- EABDestination **destv;
- int len, i;
-
- /* Recipients */
- e_cal_component_alarm_get_attendee_list (alarm, &attendee_list);
- len = g_slist_length (attendee_list);
-
- if (len <= 0) {
- destv = g_new0 (EABDestination *, 2);
- destv[0] = eab_destination_new ();
- eab_destination_set_email (destv[0], dialog->email);
- destv[1] = NULL;
- len = 1;
- } else {
- destv = g_new0 (EABDestination *, len + 1);
- for (l = attendee_list, i = 0; l != NULL; l = l->next, i++) {
- ECalComponentAttendee *a = l->data;
- EABDestination *dest;
-
- dest = eab_destination_new ();
- if (a->cn != NULL && *a->cn)
- eab_destination_set_name (dest, a->cn);
- if (a->value != NULL && *a->value)
- eab_destination_set_email (dest, a->value);
-
- destv[i] = dest;
- }
- destv[i] = NULL;
- }
-
- bonobo_widget_set_property (BONOBO_WIDGET (dialog->malarm_addresses),
- "destinations", eab_destination_exportv (destv), NULL);
-
- for (i = 0; i < len; i++)
- g_object_unref (GTK_OBJECT (destv[i]));
- g_free (destv);
-
- e_cal_component_free_attendee_list (attendee_list);
-
- /* Description */
- e_cal_component_alarm_get_description (alarm, &description);
-
- text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (dialog->malarm_description));
- gtk_text_buffer_set_text (text_buffer, description.value ? description.value : "", -1);
-}
-
-/* Fills the procedure alarm widgets with the values from the alarm component */
-static void
-alarm_to_palarm_widgets (Dialog *dialog, ECalComponentAlarm *alarm)
-{
- icalattach *attach;
- ECalComponentText description;
-
- e_cal_component_alarm_get_attach (alarm, &attach);
- e_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, ECalComponentAlarm *alarm)
-{
- ECalComponentAlarmRepeat repeat;
- int value;
- enum duration_units units;
-
- e_cal_component_alarm_get_repeat (alarm, &repeat);
-
- /* Sensitivity */
-
- if (!dialog->repeat || repeat.repetitions == 0) {
- gtk_widget_set_sensitive (dialog->repeat_toggle, dialog->repeat);
- 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, ECalComponentAlarm *alarm)
-{
- ECalComponentAlarmAction action;
-
- alarm_to_repeat_widgets (dialog, alarm);
-
- e_cal_component_alarm_get_action (alarm, &action);
-
- switch (action) {
- case E_CAL_COMPONENT_ALARM_NONE:
- g_assert_not_reached ();
- return;
-
- case E_CAL_COMPONENT_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 E_CAL_COMPONENT_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 E_CAL_COMPONENT_ALARM_EMAIL:
- gtk_window_set_title (GTK_WINDOW (dialog->toplevel), _("Email 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 E_CAL_COMPONENT_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);
-
- /* make sure the 'OK' button is disabled while the program entry is empty */
- gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog->toplevel), GTK_RESPONSE_OK, FALSE);
- g_signal_connect (G_OBJECT (dialog->palarm_program), "changed",
- G_CALLBACK (palarm_options_changed_cb), dialog);
- g_signal_connect (G_OBJECT (dialog->palarm_args), "changed",
- G_CALLBACK (palarm_options_changed_cb), dialog);
- break;
-
- case E_CAL_COMPONENT_ALARM_UNKNOWN:
- gtk_window_set_title (GTK_WINDOW (dialog->toplevel), _("Unknown Alarm Options"));
- break;
-
- default:
- g_assert_not_reached ();
- return;
- }
-
- dialog->action = action;
-}
-
-
-
-/* Fills the alarm data with the values from the repeat/duration widgets */
-static void
-repeat_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm)
-{
- ECalComponentAlarmRepeat repeat;
-
- if (!e_dialog_toggle_get (dialog->repeat_toggle)) {
- repeat.repetitions = 0;
-
- e_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 ();
- }
-
- e_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, ECalComponentAlarm *alarm)
-{
- char *url;
- icalattach *attach;
-
- url = e_dialog_editable_get (dialog->aalarm_attach);
- attach = icalattach_new_from_url (url ? url : "");
- g_free (url);
-
- e_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, ECalComponentAlarm *alarm)
-{
- char *str;
- ECalComponentText description;
- GtkTextBuffer *text_buffer;
- GtkTextIter text_iter_start, text_iter_end;
- icalcomponent *icalcomp;
- icalproperty *icalprop;
-
- text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (dialog->dalarm_description));
- gtk_text_buffer_get_start_iter (text_buffer, &text_iter_start);
- gtk_text_buffer_get_end_iter (text_buffer, &text_iter_end);
- str = gtk_text_buffer_get_text (text_buffer, &text_iter_start, &text_iter_end, FALSE);
-
- description.value = str;
- description.altrep = NULL;
-
- e_cal_component_alarm_set_description (alarm, &description);
- g_free (str);
-
- /* remove the X-EVOLUTION-NEEDS-DESCRIPTION property, so that
- * we don't re-set the alarm's description */
- icalcomp = e_cal_component_alarm_get_icalcomponent (alarm);
- icalprop = icalcomponent_get_first_property (icalcomp, ICAL_X_PROPERTY);
- while (icalprop) {
- const char *x_name;
-
- x_name = icalproperty_get_x_name (icalprop);
- if (!strcmp (x_name, "X-EVOLUTION-NEEDS-DESCRIPTION")) {
- icalcomponent_remove_property (icalcomp, icalprop);
- break;
- }
-
- icalprop = icalcomponent_get_next_property (icalcomp, ICAL_X_PROPERTY);
- }
-}
-
-/* Fills the mail alarm data with the values from the widgets */
-static void
-malarm_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm)
-{
- char *str;
- ECalComponentText description;
- GSList *attendee_list = NULL;
- EABDestination **destv;
- GtkTextBuffer *text_buffer;
- GtkTextIter text_iter_start, text_iter_end;
- icalcomponent *icalcomp;
- icalproperty *icalprop;
- int i;
-
- /* Attendees */
- bonobo_widget_get_property (BONOBO_WIDGET (dialog->malarm_addresses), "destinations",
- TC_CORBA_string, &str, NULL);
- destv = eab_destination_importv (str);
- g_free (str);
-
- for (i = 0; destv[i] != NULL; i++) {
- EABDestination *dest;
- ECalComponentAttendee *a;
-
- dest = destv[i];
-
- a = g_new0 (ECalComponentAttendee, 1);
- a->value = eab_destination_get_email (dest);
- a->cn = eab_destination_get_name (dest);
-
- attendee_list = g_slist_append (attendee_list, a);
- }
-
- e_cal_component_alarm_set_attendee_list (alarm, attendee_list);
-
- e_cal_component_free_attendee_list (attendee_list);
- eab_destination_freev (destv);
-
- /* Description */
- text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (dialog->dalarm_description));
- gtk_text_buffer_get_start_iter (text_buffer, &text_iter_start);
- gtk_text_buffer_get_end_iter (text_buffer, &text_iter_end);
- str = gtk_text_buffer_get_text (text_buffer, &text_iter_start, &text_iter_end, FALSE);
-
- description.value = str;
- description.altrep = NULL;
-
- e_cal_component_alarm_set_description (alarm, &description);
- g_free (str);
-
- /* remove the X-EVOLUTION-NEEDS-DESCRIPTION property, so that
- * we don't re-set the alarm's description */
- icalcomp = e_cal_component_alarm_get_icalcomponent (alarm);
- icalprop = icalcomponent_get_first_property(icalcomp, ICAL_X_PROPERTY);
- while (icalprop) {
- const char *x_name;
-
- x_name = icalproperty_get_x_name (icalprop);
- if (!strcmp (x_name, "X-EVOLUTION-NEEDS-DESCRIPTION")) {
- icalcomponent_remove_property (icalcomp, icalprop);
- break;
- }
-
- icalprop = icalcomponent_get_next_property (icalcomp, ICAL_X_PROPERTY);
- }
-}
-
-/* Fills the procedure alarm data with the values from the widgets */
-static void
-palarm_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm)
-{
- char *program;
- icalattach *attach;
- char *str;
- ECalComponentText description;
- icalcomponent *icalcomp;
- icalproperty *icalprop;
-
- program = e_dialog_editable_get (dialog->palarm_program);
- attach = icalattach_new_from_url (program ? program : "");
- g_free (program);
-
- e_cal_component_alarm_set_attach (alarm, attach);
- icalattach_unref (attach);
-
- str = e_dialog_editable_get (dialog->palarm_args);
- description.value = str;
- description.altrep = NULL;
-
- e_cal_component_alarm_set_description (alarm, &description);
- g_free (str);
-
- /* remove the X-EVOLUTION-NEEDS-DESCRIPTION property, so that
- * we don't re-set the alarm's description */
- icalcomp = e_cal_component_alarm_get_icalcomponent (alarm);
- icalprop = icalcomponent_get_first_property (icalcomp, ICAL_X_PROPERTY);
- while (icalprop) {
- const char *x_name;
-
- x_name = icalproperty_get_x_name (icalprop);
- if (!strcmp (x_name, "X-EVOLUTION-NEEDS-DESCRIPTION")) {
- icalcomponent_remove_property (icalcomp, icalprop);
- break;
- }
-
- icalprop = icalcomponent_get_next_property (icalcomp, ICAL_X_PROPERTY);
- }
-}
-
-/* Fills the alarm data with the values from the widgets */
-static void
-dialog_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm)
-{
- ECalComponentAlarmAction action;
-
- repeat_widgets_to_alarm (dialog, alarm);
-
- e_cal_component_alarm_get_action (alarm, &action);
-
- switch (action) {
- case E_CAL_COMPONENT_ALARM_NONE:
- g_assert_not_reached ();
- break;
-
- case E_CAL_COMPONENT_ALARM_AUDIO:
- aalarm_widgets_to_alarm (dialog, alarm);
- break;
-
- case E_CAL_COMPONENT_ALARM_DISPLAY:
- dalarm_widgets_to_alarm (dialog, alarm);
- break;
-
- case E_CAL_COMPONENT_ALARM_EMAIL:
- malarm_widgets_to_alarm (dialog, alarm);
- break;
-
- case E_CAL_COMPONENT_ALARM_PROCEDURE:
- palarm_widgets_to_alarm (dialog, alarm);
- break;
-
- case E_CAL_COMPONENT_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 (ECalComponentAlarm *alarm, const char *email, gboolean repeat)
-{
- Dialog dialog;
- int response_id;
-
- g_return_val_if_fail (alarm != NULL, FALSE);
-
- dialog.repeat = repeat;
- dialog.email = email;
- dialog.xml = glade_xml_new (EVOLUTION_GLADEDIR "/alarm-options.glade", NULL, NULL);
- if (!dialog.xml) {
- g_message ("alarm_options_dialog_new(): Could not load the Glade XML file!");
- return FALSE;
- }
-
- if (!get_widgets (&dialog)) {
- g_object_unref(dialog.xml);
- return FALSE;
- }
-
- if (!setup_select_names (&dialog)) {
- g_object_unref (dialog.xml);
- return FALSE;
- }
-
- init_widgets (&dialog);
-
- alarm_to_dialog (&dialog, alarm);
-
- response_id = gtk_dialog_run (GTK_DIALOG (dialog.toplevel));
- gtk_widget_hide (dialog.toplevel);
-
- if (response_id == GTK_RESPONSE_OK)
- dialog_to_alarm (&dialog, alarm);
-
- gtk_widget_destroy (dialog.toplevel);
- g_object_unref(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 d58e817ba3..0000000000
--- a/calendar/gui/dialogs/alarm-options.glade
+++ /dev/null
@@ -1,573 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-<requires lib="gnome"/>
-
-<widget class="GtkDialog" id="alarm-options-toplevel">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="title" translatable="yes">dialog1</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">True</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">True</property>
- <property name="has_separator">True</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="cancelbutton1">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">-6</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="okbutton1">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">-5</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox1">
- <property name="border_width">4</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkFrame" id="frame1">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkHBox" id="hbox1">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkCheckButton" id="repeat-toggle">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_focus">True</property>
- <property name="label" translatable="yes">Repeat the alarm</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="repeat-group">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">4</property>
-
- <child>
- <widget class="GtkSpinButton" id="repeat-quantity">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">True</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="snap_to_ticks">False</property>
- <property name="wrap">False</property>
- <property name="adjustment">1 1 999 1 10 10</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">extra times every</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkSpinButton" id="repeat-value">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">True</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="snap_to_ticks">False</property>
- <property name="wrap">False</property>
- <property name="adjustment">1 0 999 1 10 10</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="repeat-unit">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget1">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget2">
- <property name="visible">True</property>
- <property name="label" translatable="yes">minutes</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">hours</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget4">
- <property name="visible">True</property>
- <property name="label" translatable="yes">days</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Alarm Repeat</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="dalarm-group">
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Message to Display:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow1">
- <property name="visible">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTextView" id="dalarm-description">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="justification">GTK_JUSTIFY_LEFT</property>
- <property name="wrap_mode">GTK_WRAP_WORD</property>
- <property name="cursor_visible">True</property>
- <property name="pixels_above_lines">0</property>
- <property name="pixels_below_lines">0</property>
- <property name="pixels_inside_wrap">0</property>
- <property name="left_margin">0</property>
- <property name="right_margin">0</property>
- <property name="indent">0</property>
- <property name="text" translatable="yes"></property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="aalarm-group">
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Play sound:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GnomeFileEntry" id="file-entry1">
- <property name="visible">True</property>
- <property name="max_saved">10</property>
- <property name="directory_entry">False</property>
- <property name="modal">True</property>
-
- <child internal-child="entry">
- <widget class="GtkEntry" id="aalarm-attach">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="malarm-group">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHBox" id="malarm-address-group">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkButton" id="malarm-addressbook">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Send To:</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <placeholder/>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label7">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Message to Send</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow2">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTextView" id="malarm-description">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="justification">GTK_JUSTIFY_LEFT</property>
- <property name="wrap_mode">GTK_WRAP_WORD</property>
- <property name="cursor_visible">True</property>
- <property name="pixels_above_lines">0</property>
- <property name="pixels_below_lines">0</property>
- <property name="pixels_inside_wrap">0</property>
- <property name="left_margin">0</property>
- <property name="right_margin">0</property>
- <property name="indent">0</property>
- <property name="text" translatable="yes"></property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="palarm-group">
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label5">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Run program:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="palarm-program">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label6">
- <property name="visible">True</property>
- <property name="label" translatable="yes">With these arguments:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="palarm-args">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/calendar/gui/dialogs/alarm-options.h b/calendar/gui/dialogs/alarm-options.h
deleted file mode 100644
index 5a07935810..0000000000
--- a/calendar/gui/dialogs/alarm-options.h
+++ /dev/null
@@ -1,28 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 <libecal/e-cal-component.h>
-
-gboolean alarm_options_dialog_run (ECalComponentAlarm *alarm, const char *email, gboolean repeat);
-
-#endif
diff --git a/calendar/gui/dialogs/alarm-page.c b/calendar/gui/dialogs/alarm-page.c
deleted file mode 100644
index 603cd5c8b6..0000000000
--- a/calendar/gui/dialogs/alarm-page.c
+++ /dev/null
@@ -1,869 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/* Evolution calendar - Alarm page of the calendar component dialogs
- *
- * Copyright (C) 2001-2003 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>
- * Hans Petter Jansson <hpj@ximian.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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/gtklabel.h>
-#include <gtk/gtkcellrenderertext.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtktreeview.h>
-#include <gtk/gtktreeselection.h>
-#include <gtk/gtkoptionmenu.h>
-#include <libgnome/gnome-i18n.h>
-#include <glade/glade.h>
-#include "e-util/e-dialog-widgets.h"
-#include "e-util/e-time-utils.h"
-#include <libecal/e-cal-util.h>
-#include <libecal/e-cal-time-util.h>
-#include "../calendar-config.h"
-#include "comp-editor-util.h"
-#include "alarm-options.h"
-#include "../e-alarm-list.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 */
- ECalComponentAlarm *alarm;
-
- /* Alarm store for the GtkTreeView list widget */
- EAlarmList *list_store;
-
- gboolean updating;
-
- /* Old summary, to detect changes */
- gchar *old_summary;
-};
-
-/* "relative" types */
-enum {
- BEFORE,
- AFTER
-};
-
-/* Time units */
-enum {
- MINUTES,
- HOURS,
- DAYS
-};
-
-/* Option menu maps */
-static const int action_map[] = {
- E_CAL_COMPONENT_ALARM_DISPLAY,
- E_CAL_COMPONENT_ALARM_AUDIO,
- E_CAL_COMPONENT_ALARM_PROCEDURE,
- E_CAL_COMPONENT_ALARM_EMAIL,
- -1
-};
-
-static const char *action_map_cap[] = {
- CAL_STATIC_CAPABILITY_NO_DISPLAY_ALARMS,
- CAL_STATIC_CAPABILITY_NO_AUDIO_ALARMS,
- CAL_STATIC_CAPABILITY_NO_PROCEDURE_ALARMS,
- CAL_STATIC_CAPABILITY_NO_EMAIL_ALARMS
-};
-
-static const int value_map[] = {
- MINUTES,
- HOURS,
- DAYS,
- -1
-};
-
-static const int relative_map[] = {
- BEFORE,
- AFTER,
- -1
-};
-
-static const int time_map[] = {
- E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START,
- E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_END,
- -1
-};
-
-
-
-static void alarm_page_class_init (AlarmPageClass *class);
-static void alarm_page_init (AlarmPage *apage);
-static void alarm_page_finalize (GObject *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, ECalComponent *comp);
-static gboolean alarm_page_fill_component (CompEditorPage *page, ECalComponent *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.
- **/
-
-E_MAKE_TYPE (alarm_page, "AlarmPage", AlarmPage, alarm_page_class_init,
- alarm_page_init, TYPE_COMP_EDITOR_PAGE);
-
-/* Class initialization function for the alarm page */
-static void
-alarm_page_class_init (AlarmPageClass *class)
-{
- CompEditorPageClass *editor_page_class;
- GObjectClass *gobject_class;
-
- editor_page_class = (CompEditorPageClass *) class;
- gobject_class = (GObjectClass *) class;
-
- parent_class = g_type_class_ref (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;
-
- gobject_class->finalize = alarm_page_finalize;
-}
-
-/* Object initialization function for the alarm page */
-static void
-alarm_page_init (AlarmPage *apage)
-{
- AlarmPagePrivate *priv;
- icalcomponent *icalcomp;
- icalproperty *icalprop;
-
- 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;
-
- /* create the default alarm, which will contain the
- * X-EVOLUTION-NEEDS-DESCRIPTION property, so that we
- * set a correct description if none is set */
- priv->alarm = e_cal_component_alarm_new ();
-
- icalcomp = e_cal_component_alarm_get_icalcomponent (priv->alarm);
- icalprop = icalproperty_new_x ("1");
- icalproperty_set_x_name (icalprop, "X-EVOLUTION-NEEDS-DESCRIPTION");
- icalcomponent_add_property (icalcomp, icalprop);
-
- priv->updating = FALSE;
- priv->old_summary = NULL;
-}
-
-/* Destroy handler for the alarm page */
-static void
-alarm_page_finalize (GObject *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->main)
- gtk_widget_unref (priv->main);
-
- if (priv->xml) {
- g_object_unref (priv->xml);
- priv->xml = NULL;
- }
-
- if (priv->alarm) {
- e_cal_component_alarm_free (priv->alarm);
- priv->alarm = NULL;
- }
-
- if (priv->list_store) {
- g_object_unref (priv->list_store);
- priv->list_store = NULL;
- }
-
- if (priv->old_summary) {
- g_free (priv->old_summary);
- priv->old_summary = NULL;
- }
-
- g_free (priv);
- apage->priv = NULL;
-
- if (G_OBJECT_CLASS (parent_class)->finalize)
- (* G_OBJECT_CLASS (parent_class)->finalize) (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, E_CAL_COMPONENT_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, E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START, time_map);
-
- /* List data */
- e_alarm_list_clear (priv->list_store);
-}
-
-static void
-sensitize_buttons (AlarmPage *apage)
-{
- AlarmPagePrivate *priv;
- ECal *client;
- GtkTreeSelection *selection;
- GtkTreeIter iter;
- gboolean have_selected;
-
- priv = apage->priv;
-
- client = COMP_EDITOR_PAGE (apage)->client;
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->list));
- have_selected = gtk_tree_selection_get_selected (selection, NULL, &iter);
-
- gtk_widget_set_sensitive (priv->add,
- e_cal_get_one_alarm_only (client) && have_selected ? FALSE : TRUE);
- gtk_widget_set_sensitive (priv->delete, have_selected);
-}
-
-/* Appends an alarm to the list */
-static void
-append_reminder (AlarmPage *apage, ECalComponentAlarm *alarm)
-{
- AlarmPagePrivate *priv;
- GtkTreeView *view;
- GtkTreeIter iter;
-
- priv = apage->priv;
- view = GTK_TREE_VIEW (priv->list);
-
- e_alarm_list_append (priv->list_store, &iter, alarm);
- gtk_tree_selection_select_iter (gtk_tree_view_get_selection (view), &iter);
-
- sensitize_buttons (apage);
-}
-
-/* fill_widgets handler for the alarm page */
-static void
-alarm_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
-{
- AlarmPage *apage;
- AlarmPagePrivate *priv;
- GtkWidget *menu;
- ECalComponentText text;
- GList *alarms, *l;
- CompEditorPageDates dates;
- int i;
-
- 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 */
- e_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 (!e_cal_component_has_alarms (comp))
- goto out;
-
- alarms = e_cal_component_get_alarm_uids (comp);
-
- for (l = alarms; l != NULL; l = l->next) {
- ECalComponentAlarm *ca, *ca_copy;
- const char *auid;
-
- auid = l->data;
- ca = e_cal_component_get_alarm (comp, auid);
- g_assert (ca != NULL);
-
- ca_copy = e_cal_component_alarm_clone (ca);
- e_cal_component_alarm_free (ca);
-
- append_reminder (apage, ca_copy);
- }
- cal_obj_uid_list_free (alarms);
-
- out:
-
- /* Alarm types */
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->action));
- for (i = 0, l = GTK_MENU_SHELL (menu)->children; action_map[i] != -1; i++, l = l->next) {
- if (e_cal_get_static_capability (page->client, action_map_cap[i]))
- gtk_widget_set_sensitive (l->data, FALSE);
- else
- gtk_widget_set_sensitive (l->data, TRUE);
- }
-
- sensitize_buttons (apage);
-
- priv->updating = FALSE;
-}
-
-/* fill_component handler for the alarm page */
-static gboolean
-alarm_page_fill_component (CompEditorPage *page, ECalComponent *comp)
-{
- AlarmPage *apage;
- AlarmPagePrivate *priv;
- GtkTreeView *view;
- GtkTreeModel *model;
- GtkTreeIter iter;
- gboolean valid_iter;
- GList *list, *l;
-
- apage = ALARM_PAGE (page);
- priv = apage->priv;
-
- /* Remove all the alarms from the component */
-
- list = e_cal_component_get_alarm_uids (comp);
- for (l = list; l; l = l->next) {
- const char *auid;
-
- auid = l->data;
- e_cal_component_remove_alarm (comp, auid);
- }
- cal_obj_uid_list_free (list);
-
- /* Add the new alarms */
-
- view = GTK_TREE_VIEW (priv->list);
- model = GTK_TREE_MODEL (priv->list_store);
-
- for (valid_iter = gtk_tree_model_get_iter_first (model, &iter); valid_iter;
- valid_iter = gtk_tree_model_iter_next (model, &iter)) {
- ECalComponentAlarm *alarm, *alarm_copy;
- icalcomponent *icalcomp;
- icalproperty *icalprop;
-
- alarm = (ECalComponentAlarm *) e_alarm_list_get_alarm (priv->list_store, &iter);
- g_assert (alarm != NULL);
-
- /* We set the description of the alarm if it's got
- * the X-EVOLUTION-NEEDS-DESCRIPTION property.
- */
- icalcomp = e_cal_component_alarm_get_icalcomponent (alarm);
- icalprop = icalcomponent_get_first_property (icalcomp, ICAL_X_PROPERTY);
- while (icalprop) {
- const char *x_name;
- ECalComponentText summary;
-
- x_name = icalproperty_get_x_name (icalprop);
- if (!strcmp (x_name, "X-EVOLUTION-NEEDS-DESCRIPTION")) {
- e_cal_component_get_summary (comp, &summary);
- e_cal_component_alarm_set_description (alarm, &summary);
-
- icalcomponent_remove_property (icalcomp, icalprop);
- break;
- }
-
- icalprop = icalcomponent_get_next_property (icalcomp, ICAL_X_PROPERTY);
- }
-
- /* We clone the alarm to maintain the invariant that the alarm
- * structures in the list did *not* come from the component.
- */
-
- alarm_copy = e_cal_component_alarm_clone (alarm);
- e_cal_component_add_alarm (comp, alarm_copy);
- e_cal_component_alarm_free (alarm_copy);
- }
-
- return TRUE;
-}
-
-/* set_summary handler for the alarm page */
-static void
-alarm_page_set_summary (CompEditorPage *page, const char *summary)
-{
- AlarmPage *apage;
- AlarmPagePrivate *priv;
-
- apage = ALARM_PAGE (page);
- priv = apage->priv;
-
- gtk_label_set_text (GTK_LABEL (priv->summary), summary);
-
- /* iterate over all alarms */
- if (priv->old_summary) {
- GtkTreeView *view;
- GtkTreeModel *model;
- GtkTreeIter iter;
- gboolean valid_iter;
-
- view = GTK_TREE_VIEW (priv->list);
- model = GTK_TREE_MODEL (priv->list_store);
-
- for (valid_iter = gtk_tree_model_get_iter_first (model, &iter); valid_iter;
- valid_iter = gtk_tree_model_iter_next (model, &iter)) {
- ECalComponentAlarm *alarm;
- ECalComponentText desc;
-
- alarm = (ECalComponentAlarm *) e_alarm_list_get_alarm (priv->list_store, &iter);
- g_assert (alarm != NULL);
-
- e_cal_component_alarm_get_description (alarm, &desc);
- if (desc.value && *desc.value) {
- if (!strcmp (desc.value, priv->old_summary)) {
- desc.value = summary;
- e_cal_component_alarm_set_description (alarm, &desc);
- }
- }
- }
-
- g_free (priv->old_summary);
- }
-
- /* update old summary */
- priv->old_summary = g_strdup (summary);
-}
-
-/* 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 TRUE if they are all available. */
-static gboolean
-get_widgets (AlarmPage *apage)
-{
- CompEditorPage *page = COMP_EDITOR_PAGE (apage);
- AlarmPagePrivate *priv;
- GSList *accel_groups;
- GtkWidget *toplevel;
-
- priv = apage->priv;
-
-#define GW(name) glade_xml_get_widget (priv->xml, name)
-
- priv->main = GW ("alarm-page");
- if (!priv->main)
- return FALSE;
-
- /* Get the GtkAccelGroup from the toplevel window, so we can install
- it when the notebook page is mapped. */
- toplevel = gtk_widget_get_toplevel (priv->main);
- accel_groups = gtk_accel_groups_from_object (G_OBJECT (toplevel));
- if (accel_groups) {
- page->accel_group = accel_groups->data;
- gtk_accel_group_ref (page->accel_group);
- }
-
- gtk_widget_ref (priv->main);
- gtk_container_remove (GTK_CONTAINER (priv->main->parent), 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;
- ECalComponentAlarm *alarm;
- ECalComponentAlarmTrigger trigger;
- ECalComponentAlarmAction action;
-
- apage = ALARM_PAGE (data);
- priv = apage->priv;
-
- alarm = e_cal_component_alarm_clone (priv->alarm);
-
- memset (&trigger, 0, sizeof (ECalComponentAlarmTrigger));
- 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 ();
- }
- e_cal_component_alarm_set_trigger (alarm, trigger);
-
- action = e_dialog_option_menu_get (priv->action, action_map);
- e_cal_component_alarm_set_action (alarm, action);
- if (action == E_CAL_COMPONENT_ALARM_EMAIL && !e_cal_component_alarm_has_attendees (alarm)) {
- char *email;
-
- if (!e_cal_get_alarm_email_address (COMP_EDITOR_PAGE (apage)->client, &email, NULL)) {
- ECalComponentAttendee *a;
- GSList attendee_list;
-
- a = g_new0 (ECalComponentAttendee, 1);
- a->value = email;
- attendee_list.data = a;
- attendee_list.next = NULL;
- e_cal_component_alarm_set_attendee_list (alarm, &attendee_list);
- g_free (email);
- g_free (a);
- }
- }
-
- append_reminder (apage, alarm);
-}
-
-/* Callback used for the "delete reminder" button */
-static void
-delete_clicked_cb (GtkButton *button, gpointer data)
-{
- AlarmPage *apage;
- AlarmPagePrivate *priv;
- GtkTreeSelection *selection;
- GtkTreeIter iter;
- GtkTreePath *path;
- gboolean valid_iter;
-
- apage = ALARM_PAGE (data);
- priv = apage->priv;
-
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->list));
- if (!gtk_tree_selection_get_selected (selection, NULL, &iter)) {
- g_warning ("Could not get a selection to delete.");
- return;
- }
-
- path = gtk_tree_model_get_path (GTK_TREE_MODEL (priv->list_store), &iter);
- e_alarm_list_remove (priv->list_store, &iter);
-
- /* Select closest item after removal */
- valid_iter = gtk_tree_model_get_iter (GTK_TREE_MODEL (priv->list_store), &iter, path);
- if (!valid_iter) {
- gtk_tree_path_prev (path);
- valid_iter = gtk_tree_model_get_iter (GTK_TREE_MODEL (priv->list_store), &iter, path);
- }
-
- if (valid_iter)
- gtk_tree_selection_select_iter (selection, &iter);
-
- sensitize_buttons (apage);
-
- gtk_tree_path_free (path);
-}
-
-/* Callback used when the alarm options button is clicked */
-static void
-button_options_clicked_cb (GtkWidget *widget, gpointer data)
-{
- AlarmPage *apage;
- AlarmPagePrivate *priv;
- gboolean repeat;
- char *email;
-
- apage = ALARM_PAGE (data);
- priv = apage->priv;
-
- e_cal_component_alarm_set_action (priv->alarm,
- e_dialog_option_menu_get (priv->action, action_map));
-
- repeat = !e_cal_get_static_capability (COMP_EDITOR_PAGE (apage)->client,
- CAL_STATIC_CAPABILITY_NO_ALARM_REPEAT);
-
- if (e_cal_get_alarm_email_address (COMP_EDITOR_PAGE (apage)->client, &email, NULL)) {
- if (!alarm_options_dialog_run (priv->alarm, email, repeat))
- 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;
- GtkTreeViewColumn *column;
- GtkCellRenderer *cell_renderer;
-
- priv = apage->priv;
-
- /* Reminder buttons */
- g_signal_connect ((priv->add), "clicked",
- G_CALLBACK (add_clicked_cb), apage);
- g_signal_connect ((priv->delete), "clicked",
- G_CALLBACK (delete_clicked_cb), apage);
-
- /* Connect the default signal handler to use to make sure we notify
- * upstream of changes to the widget values.
- */
- g_signal_connect ((priv->add), "clicked",
- G_CALLBACK (field_changed_cb), apage);
- g_signal_connect ((priv->delete), "clicked",
- G_CALLBACK (field_changed_cb), apage);
-
- /* Options button */
- g_signal_connect ((priv->button_options), "clicked",
- G_CALLBACK (button_options_clicked_cb), apage);
-
- /* Alarm list */
-
- /* Model */
- priv->list_store = e_alarm_list_new ();
- gtk_tree_view_set_model (GTK_TREE_VIEW (priv->list),
- GTK_TREE_MODEL (priv->list_store));
-
- /* View */
- column = gtk_tree_view_column_new ();
- gtk_tree_view_column_set_title (column, _("Action/Trigger"));
- cell_renderer = GTK_CELL_RENDERER (gtk_cell_renderer_text_new ());
- gtk_tree_view_column_pack_start (column, cell_renderer, TRUE);
- gtk_tree_view_column_add_attribute (column, cell_renderer, "text", E_ALARM_LIST_COLUMN_DESCRIPTION);
- gtk_tree_view_append_column (GTK_TREE_VIEW (priv->list), column);
-
-#if 0
- /* If we want the alarm setup widgets to reflect the currently selected alarm, we
- * need to do something like this */
- g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->list)), "changed",
- G_CALLBACK (alarm_selection_changed_cb), apage);
-#endif
-}
-
-
-
-/**
- * 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, 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 = g_object_new (TYPE_ALARM_PAGE, NULL);
- if (!alarm_page_construct (apage)) {
- g_object_unref (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 7c2f06bae3..0000000000
--- a/calendar/gui/dialogs/alarm-page.glade
+++ /dev/null
@@ -1,490 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-
-<widget class="GtkWindow" id="alarm-toplevel">
- <property name="title" translatable="yes">window1</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
-
- <child>
- <widget class="GtkVBox" id="alarm-page">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkFrame" id="frame33">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkTable" id="table13">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label62">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Summary:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label63">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Date/Time:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="summary">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">4</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="date-time">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xpad">4</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Basics</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frame34">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkVBox" id="vbox53">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHBox" id="hbox54">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkOptionMenu" id="action">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget1">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget2">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Display a message</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Play a sound</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget4">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Run a program</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="send_an_email1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Send an Email</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkSpinButton" id="interval-value">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">True</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="snap_to_ticks">False</property>
- <property name="wrap">False</property>
- <property name="adjustment">1 0 999 1 10 10</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="value-units">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget5">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget6">
- <property name="visible">True</property>
- <property name="label" translatable="yes">minute(s)</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget7">
- <property name="visible">True</property>
- <property name="label" translatable="yes">hour(s)</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget8">
- <property name="visible">True</property>
- <property name="label" translatable="yes">day(s)</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="relative">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget9">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget10">
- <property name="visible">True</property>
- <property name="label" translatable="yes">before</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget11">
- <property name="visible">True</property>
- <property name="label" translatable="yes">after</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="time">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget12">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget13">
- <property name="visible">True</property>
- <property name="label" translatable="yes">start of appointment</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget14">
- <property name="visible">True</property>
- <property name="label" translatable="yes">end of appointment</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="button-options">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Options...</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox55">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow13">
- <property name="visible">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTreeView" id="list">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">True</property>
- <property name="rules_hint">False</property>
- <property name="reorderable">False</property>
- <property name="enable_search">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVButtonBox" id="vbuttonbox2">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_START</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkButton" id="add">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-add</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="delete">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-remove</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label64">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Reminders</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/calendar/gui/dialogs/alarm-page.h b/calendar/gui/dialogs/alarm-page.h
deleted file mode 100644
index d814e850b3..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-2003 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>
- * Hans Petter Jansson <hpj@ximian.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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"
-
-G_BEGIN_DECLS
-
-
-
-#define TYPE_ALARM_PAGE (alarm_page_get_type ())
-#define ALARM_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ALARM_PAGE, AlarmPage))
-#define ALARM_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ALARM_PAGE, AlarmPageClass))
-#define IS_ALARM_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ALARM_PAGE))
-#define IS_ALARM_PAGE_CLASS(klass) (G_TYPE_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);
-
-
-
-G_END_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 83363a3ac0..0000000000
--- a/calendar/gui/dialogs/cal-prefs-dialog.c
+++ /dev/null
@@ -1,686 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Authors :
- * Damon Chaplin <damon@ximian.com>
- * Ettore Perazzoli <ettore@ximian.com>
- *
- * Copyright 2000, 2001, 2002 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "../e-timezone-entry.h"
-#include "cal-prefs-dialog.h"
-#include "../calendar-config.h"
-
-#include <gtk/gtksignal.h>
-#include <gtk/gtkoptionmenu.h>
-#include <gtk/gtktogglebutton.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>
-
-
-struct _DialogData {
- /* Glade XML data */
- GladeXML *xml;
-
- GtkWidget *page;
-
- 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;
-};
-typedef struct _DialogData DialogData;
-
-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
-};
-
-/* The following two are kept separate in case we need to re-order each menu individually */
-static const int hide_completed_units_map[] = {
- CAL_MINUTES, CAL_HOURS, CAL_DAYS, -1
-};
-
-static const int default_reminder_units_map[] = {
- CAL_MINUTES, CAL_HOURS, CAL_DAYS, -1
-};
-
-
-static gboolean get_widgets (DialogData *data);
-
-static void widget_changed_callback (GtkWidget *, void *data);
-static void connect_changed (GtkWidget *widget, const char *signal_name, EvolutionConfigControl *config_control);
-static void setup_changes (DialogData *data, EvolutionConfigControl *config_control);
-
-static void init_widgets (DialogData *data);
-static void show_config (DialogData *data);
-static void update_config (DialogData *dialog_data);
-
-static void config_control_apply_callback (EvolutionConfigControl *config_control, void *data);
-static void config_control_destroy_callback (GtkObject *object, void *data);
-
-static void cal_prefs_dialog_use_24_hour_toggled(GtkWidget *button, void *data);
-static void cal_prefs_dialog_end_of_day_changed (GtkWidget *button, void *data);
-static void cal_prefs_dialog_start_of_day_changed (GtkWidget *button, void *data);
-static void cal_prefs_dialog_hide_completed_tasks_toggled (GtkWidget *button, void *data);
-
-GtkWidget *cal_prefs_dialog_create_time_edit (void);
-
-
-/**
- * cal_prefs_dialog_new:
- *
- * Creates a new #CalPrefsDialog.
- *
- * Return value: a new #CalPrefsDialog.
- **/
-EvolutionConfigControl *
-cal_prefs_dialog_new (void)
-{
- DialogData *dialog_data;
- EvolutionConfigControl *config_control;
-
- dialog_data = g_new0 (DialogData, 1);
-
- /* Load the content widgets */
-
- dialog_data->xml = glade_xml_new (EVOLUTION_GLADEDIR "/cal-prefs-dialog.glade", NULL, NULL);
- if (!dialog_data->xml) {
- g_message ("cal_prefs_dialog_construct(): Could not load the Glade XML file!");
- return NULL;
- }
-
- if (!get_widgets (dialog_data)) {
- g_message ("cal_prefs_dialog_construct(): Could not find all widgets in the XML file!");
- return NULL;
- }
-
- init_widgets (dialog_data);
- show_config (dialog_data);
-
- gtk_widget_ref (dialog_data->page);
- gtk_container_remove (GTK_CONTAINER (dialog_data->page->parent), dialog_data->page);
- config_control = evolution_config_control_new (dialog_data->page);
- gtk_widget_unref (dialog_data->page);
-
- g_signal_connect((config_control), "apply",
- G_CALLBACK (config_control_apply_callback), dialog_data);
- g_signal_connect((config_control), "destroy",
- G_CALLBACK (config_control_destroy_callback), dialog_data);
-
- setup_changes (dialog_data, config_control);
-
- return config_control;
-}
-
-static void
-widget_changed_callback (GtkWidget *widget,
- void *data)
-{
- EvolutionConfigControl *config_control;
-
- config_control = EVOLUTION_CONFIG_CONTROL (data);
-
- evolution_config_control_changed (config_control);
-}
-
-/* ^*&%!!#! GnomeColorPicker. */
-static void
-color_set_callback (GnomeColorPicker *cp,
- guint r,
- guint g,
- guint b,
- guint a,
- void *data)
-{
- EvolutionConfigControl *config_control;
-
- config_control = EVOLUTION_CONFIG_CONTROL (data);
-
- evolution_config_control_changed (config_control);
-}
-
-static void
-connect_changed (GtkWidget *widget,
- const char *signal_name,
- EvolutionConfigControl *config_control)
-{
- g_signal_connect((widget), signal_name,
- G_CALLBACK (widget_changed_callback), config_control);
-}
-
-static void
-setup_changes (DialogData *dialog_data,
- EvolutionConfigControl *config_control)
-{
- int i;
-
- for (i = 0; i < 7; i ++)
- connect_changed (dialog_data->working_days[i], "toggled", config_control);
-
- connect_changed (dialog_data->timezone, "changed", config_control);
-
- connect_changed (dialog_data->start_of_day, "changed", config_control);
- connect_changed (dialog_data->end_of_day, "changed", config_control);
-
- connect_changed (GTK_OPTION_MENU (dialog_data->week_start_day)->menu, "selection_done", config_control);
-
- connect_changed (dialog_data->use_12_hour, "toggled", config_control);
-
- connect_changed (GTK_OPTION_MENU (dialog_data->time_divisions)->menu, "selection_done", config_control);
-
- connect_changed (dialog_data->show_end_times, "toggled", config_control);
- connect_changed (dialog_data->compress_weekend, "toggled", config_control);
- connect_changed (dialog_data->dnav_show_week_no, "toggled", config_control);
-
- connect_changed (dialog_data->tasks_hide_completed_checkbutton, "toggled", config_control);
- connect_changed (dialog_data->tasks_hide_completed_spinbutton, "changed", config_control);
- connect_changed (GTK_OPTION_MENU (dialog_data->tasks_hide_completed_optionmenu)->menu, "selection_done", config_control);
-
- connect_changed (dialog_data->confirm_delete, "toggled", config_control);
- connect_changed (dialog_data->default_reminder, "toggled", config_control);
- connect_changed (dialog_data->default_reminder_interval, "changed", config_control);
- connect_changed (GTK_OPTION_MENU (dialog_data->default_reminder_units)->menu, "selection_done", config_control);
-
- /* These use GnomeColorPicker so we have to use a different signal. */
- g_signal_connect((dialog_data->tasks_due_today_color), "color_set",
- G_CALLBACK (color_set_callback), config_control);
- g_signal_connect((dialog_data->tasks_overdue_color), "color_set",
- G_CALLBACK (color_set_callback), config_control);
-}
-
-/* Gets the widgets from the XML file and returns if they are all available.
- */
-static gboolean
-get_widgets (DialogData *data)
-{
-#define GW(name) glade_xml_get_widget (data->xml, name)
-
- data->page = GW ("toplevel-notebook");
-
- /* The indices must be 0 (Sun) to 6 (Sat). */
- data->working_days[0] = GW ("sun_button");
- data->working_days[1] = GW ("mon_button");
- data->working_days[2] = GW ("tue_button");
- data->working_days[3] = GW ("wed_button");
- data->working_days[4] = GW ("thu_button");
- data->working_days[5] = GW ("fri_button");
- data->working_days[6] = GW ("sat_button");
-
- data->timezone = GW ("timezone");
- data->week_start_day = GW ("first_day_of_week");
- data->start_of_day = GW ("start_of_day");
- gtk_widget_show (data->start_of_day);
- data->end_of_day = GW ("end_of_day");
- gtk_widget_show (data->end_of_day);
- data->use_12_hour = GW ("use_12_hour");
- data->use_24_hour = GW ("use_24_hour");
- data->time_divisions = GW ("time_divisions");
- data->show_end_times = GW ("show_end_times");
- data->compress_weekend = GW ("compress_weekend");
- data->dnav_show_week_no = GW ("dnav_show_week_no");
-
- data->tasks_due_today_color = GW ("tasks_due_today_color");
- data->tasks_overdue_color = GW ("tasks_overdue_color");
-
- data->tasks_hide_completed_checkbutton = GW ("tasks-hide-completed-checkbutton");
- data->tasks_hide_completed_spinbutton = GW ("tasks-hide-completed-spinbutton");
- data->tasks_hide_completed_optionmenu = GW ("tasks-hide-completed-optionmenu");
-
- data->confirm_delete = GW ("confirm-delete");
- data->default_reminder = GW ("default-reminder");
- data->default_reminder_interval = GW ("default-reminder-interval");
- data->default_reminder_units = GW ("default-reminder-units");
-
-#undef GW
-
- return (data->page
- && data->timezone
- && data->working_days[0]
- && data->working_days[1]
- && data->working_days[2]
- && data->working_days[3]
- && data->working_days[4]
- && data->working_days[5]
- && data->working_days[6]
- && data->week_start_day
- && data->start_of_day
- && data->end_of_day
- && data->use_12_hour
- && data->use_24_hour
- && data->time_divisions
- && data->show_end_times
- && data->compress_weekend
- && data->dnav_show_week_no
- && data->tasks_due_today_color
- && data->tasks_overdue_color
- && data->tasks_hide_completed_checkbutton
- && data->tasks_hide_completed_spinbutton
- && data->tasks_hide_completed_optionmenu
- && data->confirm_delete
- && data->default_reminder
- && data->default_reminder_interval
- && data->default_reminder_units);
-}
-
-
-static void
-config_control_destroy_callback (GtkObject *object,
- void *data)
-{
- DialogData *dialog_data;
-
- dialog_data = (DialogData *) data;
-
- g_object_unref (dialog_data->xml);
-
- g_free (dialog_data);
-}
-
-
-static void
-config_control_apply_callback (EvolutionConfigControl *control,
- void *data)
-{
- DialogData *dialog_data;
-
- dialog_data = (DialogData *) data;
-
- update_config (dialog_data);
-}
-
-
-/* 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_use_24_hour_format (E_DATE_EDIT (dedit), calendar_config_get_24_hour_format ());
- 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;
-}
-
-
-/* Connects any necessary signal handlers. */
-static void
-init_widgets (DialogData *dialog_data)
-{
- g_signal_connect((dialog_data->use_24_hour), "toggled",
- G_CALLBACK (cal_prefs_dialog_use_24_hour_toggled),
- dialog_data);
-
- g_signal_connect((dialog_data->start_of_day), "changed",
- G_CALLBACK (cal_prefs_dialog_start_of_day_changed),
- dialog_data);
-
- g_signal_connect((dialog_data->end_of_day), "changed",
- G_CALLBACK (cal_prefs_dialog_end_of_day_changed),
- dialog_data);
-
- g_signal_connect((dialog_data->tasks_hide_completed_checkbutton),
- "toggled",
- G_CALLBACK (cal_prefs_dialog_hide_completed_tasks_toggled),
- dialog_data);
-}
-
-
-static void
-cal_prefs_dialog_use_24_hour_toggled (GtkWidget *button,
- void *data)
-{
- DialogData *dialog_data;
- gboolean use_24_hour;
-
- dialog_data = (DialogData *) data;
-
- use_24_hour = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog_data->use_24_hour));
-
- e_date_edit_set_use_24_hour_format (E_DATE_EDIT (dialog_data->start_of_day), use_24_hour);
- e_date_edit_set_use_24_hour_format (E_DATE_EDIT (dialog_data->end_of_day), use_24_hour);
-}
-
-static void
-cal_prefs_dialog_start_of_day_changed (GtkWidget *button, void *data)
-{
- DialogData *dialog_data;
- EDateEdit *start, *end;
- int start_hour, start_minute, end_hour, end_minute;
-
- dialog_data = (DialogData *) data;
-
- start = E_DATE_EDIT (dialog_data->start_of_day);
- end = E_DATE_EDIT (dialog_data->end_of_day);
-
- e_date_edit_get_time_of_day (start, &start_hour, &start_minute);
- e_date_edit_get_time_of_day (end, &end_hour, &end_minute);
-
- if ((start_hour > end_hour)
- || (start_hour == end_hour && start_minute > end_minute)) {
-
- if (start_hour < 23)
- e_date_edit_set_time_of_day (end, start_hour + 1, start_minute);
- else
- e_date_edit_set_time_of_day (end, 23, 59);
- }
-}
-
-static void
-cal_prefs_dialog_end_of_day_changed (GtkWidget *button, void *data)
-{
- DialogData *dialog_data;
- EDateEdit *start, *end;
- int start_hour, start_minute, end_hour, end_minute;
-
- dialog_data = (DialogData *) data;
-
- start = E_DATE_EDIT (dialog_data->start_of_day);
- end = E_DATE_EDIT (dialog_data->end_of_day);
-
- e_date_edit_get_time_of_day (start, &start_hour, &start_minute);
- e_date_edit_get_time_of_day (end, &end_hour, &end_minute);
-
- if ((end_hour < start_hour)
- || (end_hour == start_hour && end_minute < start_minute)) {
- if (end_hour < 1)
- e_date_edit_set_time_of_day (start, 0, 0);
- else
- e_date_edit_set_time_of_day (start, end_hour - 1, end_minute);
- }
-}
-
-static void
-cal_prefs_dialog_hide_completed_tasks_toggled (GtkWidget *button,
- void *data)
-{
- DialogData *dialog_data;
- gboolean hide_completed_tasks;
-
- dialog_data = (DialogData *) data;
-
- hide_completed_tasks = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog_data->tasks_hide_completed_checkbutton));
-
- gtk_widget_set_sensitive (dialog_data->tasks_hide_completed_spinbutton, hide_completed_tasks);
- gtk_widget_set_sensitive (dialog_data->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 (DialogData *dialog_data)
-{
- CalUnits units;
- gboolean hide_completed_tasks;
-
- set_color_picker (dialog_data->tasks_due_today_color, calendar_config_get_tasks_due_today_color ());
- set_color_picker (dialog_data->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 (dialog_data->tasks_hide_completed_checkbutton,
- hide_completed_tasks);
-
- /* Hide Completed Tasks Units. */
- units = calendar_config_get_hide_completed_tasks_units ();
- e_dialog_option_menu_set (dialog_data->tasks_hide_completed_optionmenu,
- units, hide_completed_units_map);
-
- /* Hide Completed Tasks Value. */
- e_dialog_spin_set (dialog_data->tasks_hide_completed_spinbutton,
- calendar_config_get_hide_completed_tasks_value ());
-
- gtk_widget_set_sensitive (dialog_data->tasks_hide_completed_spinbutton,
- hide_completed_tasks);
- gtk_widget_set_sensitive (dialog_data->tasks_hide_completed_optionmenu,
- hide_completed_tasks);
-}
-
-/* Shows the current config settings in the dialog. */
-static void
-show_config (DialogData *dialog_data)
-{
- CalWeekdays working_days;
- gint mask, day, week_start_day, time_divisions;
- char *zone_name;
- icaltimezone *zone;
- gboolean sensitive;
-
- /* Timezone. */
- zone_name = calendar_config_get_timezone ();
- zone = icaltimezone_get_builtin_timezone (zone_name);
- e_timezone_entry_set_timezone (E_TIMEZONE_ENTRY (dialog_data->timezone),
- zone);
-
- /* Working Days. */
- working_days = calendar_config_get_working_days ();
- mask = 1 << 0;
- for (day = 0; day < 7; day++) {
- e_dialog_toggle_set (dialog_data->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 (dialog_data->week_start_day, week_start_day,
- week_start_day_map);
-
- /* Start of Day. */
- e_date_edit_set_time_of_day (E_DATE_EDIT (dialog_data->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 (dialog_data->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 (dialog_data->use_24_hour, TRUE);
- else
- e_dialog_toggle_set (dialog_data->use_12_hour, TRUE);
-
- sensitive = calendar_config_locale_supports_12_hour_format ();
- gtk_widget_set_sensitive (dialog_data->use_12_hour, sensitive);
- gtk_widget_set_sensitive (dialog_data->use_24_hour, sensitive);
-
-
- /* Time Divisions. */
- time_divisions = calendar_config_get_time_divisions ();
- e_dialog_option_menu_set (dialog_data->time_divisions, time_divisions,
- time_division_map);
-
- /* Show Appointment End Times. */
- e_dialog_toggle_set (dialog_data->show_end_times, calendar_config_get_show_event_end ());
-
- /* Compress Weekend. */
- e_dialog_toggle_set (dialog_data->compress_weekend, calendar_config_get_compress_weekend ());
-
- /* Date Navigator - Show Week Numbers. */
- e_dialog_toggle_set (dialog_data->dnav_show_week_no, calendar_config_get_dnav_show_week_no ());
-
- /* Task list */
-
- show_task_list_config (dialog_data);
-
- /* Other page */
-
- e_dialog_toggle_set (dialog_data->confirm_delete, calendar_config_get_confirm_delete ());
-
- e_dialog_toggle_set (dialog_data->default_reminder,
- calendar_config_get_use_default_reminder ());
- e_dialog_spin_set (dialog_data->default_reminder_interval,
- calendar_config_get_default_reminder_interval ());
- e_dialog_option_menu_set (dialog_data->default_reminder_units,
- calendar_config_get_default_reminder_units (),
- default_reminder_units_map);
-}
-
-/* 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 (DialogData *dialog_data)
-{
- calendar_config_set_tasks_due_today_color (spec_from_picker (dialog_data->tasks_due_today_color));
- calendar_config_set_tasks_overdue_color (spec_from_picker (dialog_data->tasks_overdue_color));
-
- calendar_config_set_hide_completed_tasks (e_dialog_toggle_get (dialog_data->tasks_hide_completed_checkbutton));
- calendar_config_set_hide_completed_tasks_units (e_dialog_option_menu_get (dialog_data->tasks_hide_completed_optionmenu, hide_completed_units_map));
- calendar_config_set_hide_completed_tasks_value (e_dialog_spin_get_int (dialog_data->tasks_hide_completed_spinbutton));
-}
-
-/* Updates the config values based on the settings in the dialog. */
-static void
-update_config (DialogData *dialog_data)
-{
- CalWeekdays working_days;
- gint mask, day, week_start_day, time_divisions, hour, minute;
- icaltimezone *zone;
-
- /* Timezone. */
- zone = e_timezone_entry_get_timezone (E_TIMEZONE_ENTRY (dialog_data->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 (dialog_data->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 (dialog_data->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 (dialog_data->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 (dialog_data->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 (dialog_data->use_24_hour));
-
- /* Time Divisions. */
- time_divisions = e_dialog_option_menu_get (dialog_data->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 (dialog_data->show_end_times));
-
- /* Compress Weekend. */
- calendar_config_set_compress_weekend (e_dialog_toggle_get (dialog_data->compress_weekend));
-
- /* Date Navigator - Show Week Numbers. */
- calendar_config_set_dnav_show_week_no (e_dialog_toggle_get (dialog_data->dnav_show_week_no));
-
- /* Task list */
- update_task_list_config (dialog_data);
-
- /* Other page */
-
- calendar_config_set_confirm_delete (e_dialog_toggle_get (dialog_data->confirm_delete));
-
- calendar_config_set_use_default_reminder (e_dialog_toggle_get (dialog_data->default_reminder));
-
- calendar_config_set_default_reminder_interval (
- e_dialog_spin_get_int (dialog_data->default_reminder_interval));
-
- calendar_config_set_default_reminder_units (
- e_dialog_option_menu_get (dialog_data->default_reminder_units, default_reminder_units_map));
-}
diff --git a/calendar/gui/dialogs/cal-prefs-dialog.glade b/calendar/gui/dialogs/cal-prefs-dialog.glade
deleted file mode 100644
index d566368611..0000000000
--- a/calendar/gui/dialogs/cal-prefs-dialog.glade
+++ /dev/null
@@ -1,1319 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-<requires lib="gnome"/>
-
-<widget class="GtkDialog" id="cal-prefs-dialog">
- <property name="title" translatable="yes">Calendar and Tasks Settings</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="has_separator">True</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="hbuttonbox1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="button1">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">0</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="button2">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-apply</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">0</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="button3">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-close</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">0</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkNotebook" id="toplevel-notebook">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="show_tabs">True</property>
- <property name="show_border">True</property>
- <property name="tab_pos">GTK_POS_TOP</property>
- <property name="scrollable">False</property>
- <property name="enable_popup">False</property>
-
- <child>
- <widget class="GtkVBox" id="vbox10">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkFrame" id="frame12">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkTable" id="table5">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">3</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label22">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Time _zone:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">timezone</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label20">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Time format:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox10">
- <property name="visible">True</property>
- <property name="homogeneous">True</property>
- <property name="spacing">4</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment2">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xscale">3.35276e-08</property>
- <property name="yscale">1</property>
-
- <child>
- <widget class="GtkRadioButton" id="use_12_hour">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_12 hour (AM/PM)</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkRadioButton" id="use_24_hour">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_24 hour</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">use_12_hour</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="timezone">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="creation_function">make_timezone_entry</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Wed, 20 Jun 2001 02:22:46 GMT</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">3</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Time</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frame9">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkTable" id="table8">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="n_rows">3</property>
- <property name="n_columns">4</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label33">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Day begins:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox18">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="Custom" id="start_of_day">
- <property name="visible">True</property>
- <property name="creation_function">cal_prefs_dialog_create_time_edit</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Thu, 30 May 2002 19:26:53 GMT</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label34">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Day _ends:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_RIGHT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="end_of_day">
- <property name="visible">True</property>
- <property name="creation_function">cal_prefs_dialog_create_time_edit</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Thu, 30 May 2002 19:27:35 GMT</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">4</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox17">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkCheckButton" id="mon_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Mon</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="tue_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Tue</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="wed_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Wed</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="thu_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">T_hu</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="fri_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Fri</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="sat_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Sat</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="sun_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">S_un</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">4</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment3">
- <property name="visible">True</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">1</property>
-
- <child>
- <widget class="GtkOptionMenu" id="first_day_of_week">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget1">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget2">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Monday</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Tuesday</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget4">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Wednesday</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget5">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Thursday</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget6">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Friday</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget7">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Saturday</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget8">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Sunday</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label32">
- <property name="visible">True</property>
- <property name="label" translatable="yes">W_eek starts:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">first_day_of_week</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label31">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Work days:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label23">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Work Week</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frame14">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkVBox" id="vbox13">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkCheckButton" id="confirm-delete">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Ask for confirmation when deleting items</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox19">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkCheckButton" id="default-reminder">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Sh_ow a reminder</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkSpinButton" id="default-reminder-interval">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">False</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="snap_to_ticks">False</property>
- <property name="wrap">False</property>
- <property name="adjustment">0 0 9999 1 10 10</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment4">
- <property name="visible">True</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
-
- <child>
- <widget class="GtkOptionMenu" id="default-reminder-units">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget9">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget10">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Minutes</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget11">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Hours</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget12">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Days</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label35">
- <property name="visible">True</property>
- <property name="label" translatable="yes">before every appointment</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label35">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Alerts</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label21">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_General</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox8">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHBox" id="hbox12">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label25">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Time divisions:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">time_divisions</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="time_divisions">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget13">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget14">
- <property name="visible">True</property>
- <property name="label" translatable="yes">60 minutes</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget15">
- <property name="visible">True</property>
- <property name="label" translatable="yes">30 minutes</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget16">
- <property name="visible">True</property>
- <property name="label" translatable="yes">15 minutes</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget17">
- <property name="visible">True</property>
- <property name="label" translatable="yes">10 minutes</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget18">
- <property name="visible">True</property>
- <property name="label" translatable="yes">05 minutes</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="show_end_times">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Show appointment end times in week and month views</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="compress_weekend">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Compress weekends in month view</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="dnav_show_week_no">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Show week _numbers in date navigator</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frame13">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkVBox" id="vbox12">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkTable" id="table7">
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label28">
- <property name="visible">True</property>
- <property name="label" translatable="yes">T_asks due today:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">tasks_due_today_color</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label29">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Overdue tasks:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">tasks_overdue_color</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GnomeColorPicker" id="tasks_overdue_color">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="dither">True</property>
- <property name="use_alpha">False</property>
- <property name="title" translatable="yes">Color for overdue tasks</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GnomeColorPicker" id="tasks_due_today_color">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="dither">True</property>
- <property name="use_alpha">False</property>
- <property name="title" translatable="yes">Color for tasks due today</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox15">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkCheckButton" id="tasks-hide-completed-checkbutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Hide completed tasks after</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkSpinButton" id="tasks-hide-completed-spinbutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">False</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="snap_to_ticks">False</property>
- <property name="wrap">False</property>
- <property name="adjustment">1 0 9999 1 10 10</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="tasks-hide-completed-optionmenu">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget19">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget20">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Minutes</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget21">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Hours</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget22">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Days</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label36">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Task List</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label7">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Display</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/calendar/gui/dialogs/cal-prefs-dialog.h b/calendar/gui/dialogs/cal-prefs-dialog.h
deleted file mode 100644
index db6f5a75fa..0000000000
--- a/calendar/gui/dialogs/cal-prefs-dialog.h
+++ /dev/null
@@ -1,41 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 "evolution-config-control.h"
-
-G_BEGIN_DECLS
-
-EvolutionConfigControl *cal_prefs_dialog_new (void);
-
-G_END_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 27f9b9b91e..0000000000
--- a/calendar/gui/dialogs/cancel-comp.c
+++ /dev/null
@@ -1,99 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <gtk/gtkmessagedialog.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-uidefs.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 (GtkWindow *parent, ECal *client, ECalComponent *comp, gboolean deleting)
-{
- GtkWidget *dialog;
- ECalComponentVType vtype;
- char *str;
- gint response;
-
- if (deleting && e_cal_get_save_schedules (client))
- return TRUE;
-
- vtype = e_cal_component_get_vtype (comp);
-
- switch (vtype) {
- case E_CAL_COMPONENT_EVENT:
- if (deleting)
- str = g_strdup_printf (_("The event being deleted is a meeting, "
- "would you like to send a cancellation notice?"));
- else
- str = g_strdup_printf (_("Are you sure you want to cancel "
- "and delete this meeting?"));
- break;
-
- case E_CAL_COMPONENT_TODO:
- if (deleting)
- str = g_strdup_printf (_("The task being deleted is assigned, "
- "would you like to send a cancellation notice?"));
- else
- str = g_strdup_printf (_("Are you sure you want to cancel "
- "and delete this task?"));
- break;
-
- case E_CAL_COMPONENT_JOURNAL:
- if (deleting)
- str = g_strdup_printf (_("The journal entry being deleted is published, "
- "would you like to send a cancellation notice?"));
- else
- str = g_strdup_printf (_("Are you sure you want to cancel "
- "and delete this journal entry?"));
- break;
-
- default:
- g_message ("cancel_component_dialog(): "
- "Cannot handle object of type %d", vtype);
- return FALSE;
- }
-
- dialog = gtk_message_dialog_new (parent, GTK_DIALOG_MODAL,
- GTK_MESSAGE_QUESTION,
- GTK_BUTTONS_YES_NO, str);
-
- response = gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
-
- if (response == GTK_RESPONSE_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 a43f24f2fe..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 <libecal/e-cal.h>
-#include <libecal/e-cal-component.h>
-
-gboolean cancel_component_dialog (GtkWindow *parent, ECal *client, ECalComponent *comp, gboolean deleting);
-
-#endif
diff --git a/calendar/gui/dialogs/changed-comp.c b/calendar/gui/dialogs/changed-comp.c
deleted file mode 100644
index af595fe1df..0000000000
--- a/calendar/gui/dialogs/changed-comp.c
+++ /dev/null
@@ -1,115 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <gtk/gtkmessagedialog.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-uidefs.h>
-#include "changed-comp.h"
-
-
-
-/**
- * changed_component_dialog:
- * @parent: Parent window for the 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 (GtkWindow *parent, ECalComponent *comp, gboolean deleted, gboolean changed)
-{
- GtkWidget *dialog;
- ECalComponentVType vtype;
- char *str;
- gint response;
-
- vtype = e_cal_component_get_vtype (comp);
-
- if (deleted) {
- switch (vtype) {
- case E_CAL_COMPONENT_EVENT:
- str = _("This event has been deleted.");
- break;
-
- case E_CAL_COMPONENT_TODO:
- str = _("This task has been deleted.");
- break;
-
- case E_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 E_CAL_COMPONENT_EVENT:
- str = _("This event has been changed.");
- break;
-
- case E_CAL_COMPONENT_TODO:
- str = _("This task has been changed.");
- break;
-
- case E_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 = gtk_message_dialog_new (parent, GTK_DIALOG_MODAL,
- GTK_MESSAGE_QUESTION,
- GTK_BUTTONS_YES_NO, str);
-
- response = gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
-
- if (response == GTK_RESPONSE_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 f029f3388e..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 <gtk/gtkwindow.h>
-#include <libecal/e-cal-component.h>
-
-gboolean changed_component_dialog (GtkWindow *window, ECalComponent *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 64771bebed..0000000000
--- a/calendar/gui/dialogs/comp-editor-page.c
+++ /dev/null
@@ -1,416 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-dialog-util.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 (G_OBJECT_GET_CLASS (page)))
-
-
-
-/**
- * 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 = g_type_class_ref(GTK_TYPE_OBJECT);
-
- comp_editor_page_signals[CHANGED] =
- g_signal_new ("changed",
- G_TYPE_FROM_CLASS (class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (CompEditorPageClass, changed),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-
- comp_editor_page_signals[NEEDS_SEND] =
- g_signal_new ("needs_send",
- G_TYPE_FROM_CLASS (class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (CompEditorPageClass, needs_send),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-
- comp_editor_page_signals[SUMMARY_CHANGED] =
- g_signal_new ("summary_changed",
- G_TYPE_FROM_CLASS (class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (CompEditorPageClass, summary_changed),
- NULL, NULL,
- g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
-
- comp_editor_page_signals[DATES_CHANGED] =
- g_signal_new ("dates_changed",
- G_TYPE_FROM_CLASS (class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (CompEditorPageClass, dates_changed),
- NULL, NULL,
- g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
-
- 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;
- page->accel_group = 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) {
- g_object_unref (page->client);
- page->client = NULL;
- }
-
- if (page->accel_group) {
- gtk_accel_group_unref (page->accel_group);
- page->accel_group = 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, ECalComponent *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.
- *
- * Returns: TRUE if the component could be filled, FALSE otherwise
- **/
-gboolean
-comp_editor_page_fill_component (CompEditorPage *page, ECalComponent *comp)
-{
- g_return_val_if_fail (page != NULL, FALSE);
- g_return_val_if_fail (IS_COMP_EDITOR_PAGE (page), FALSE);
- g_return_val_if_fail (comp != NULL, FALSE);
-
- if (CLASS (page)->fill_component != NULL)
- return (* CLASS (page)->fill_component) (page, comp);
-
- return TRUE;
-}
-
-/**
- * comp_editor_page_set_e_cal:
- * @page: An editor page
- * @client: A #ECal object
- *
- * Sets the #ECal for the dialog page to use.
- **/
-void
-comp_editor_page_set_e_cal (CompEditorPage *page, ECal *client)
-{
- g_return_if_fail (page != NULL);
- g_return_if_fail (IS_COMP_EDITOR_PAGE (page));
-
- if (page->client)
- g_object_unref (client);
-
- page->client = client;
- if (page->client)
- g_object_ref (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);
-}
-
-/**
- * comp_editor_page_display_validation_error:
- * @page: An editor page.
- * @msg: Error message to display.
- * @field: Widget that caused the validation error.
- *
- * Displays an error message about a validation problem in the
- * given field. Once the error message has been displayed, the
- * focus is set to the widget that caused the validation error.
- */
-void
-comp_editor_page_display_validation_error (CompEditorPage *page,
- const char *msg,
- GtkWidget *field)
-{
- GtkWidget *dialog;
- char *real_msg;
-
- g_return_if_fail (IS_COMP_EDITOR_PAGE (page));
- g_return_if_fail (msg != NULL);
- g_return_if_fail (GTK_IS_WIDGET (field));
-
- real_msg = g_strdup_printf (_("Validation error: %s"), msg);
- dialog = gnome_error_dialog (real_msg);
- gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
-
- gtk_widget_grab_focus (field);
-
- g_free (real_msg);
-}
diff --git a/calendar/gui/dialogs/comp-editor-page.h b/calendar/gui/dialogs/comp-editor-page.h
deleted file mode 100644
index 6046a7c039..0000000000
--- a/calendar/gui/dialogs/comp-editor-page.h
+++ /dev/null
@@ -1,111 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 <gtk/gtkwidget.h>
-#include <libecal/e-cal-component.h>
-#include <libecal/e-cal.h>
-
-G_BEGIN_DECLS
-
-
-
-#define TYPE_COMP_EDITOR_PAGE (comp_editor_page_get_type ())
-#define COMP_EDITOR_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COMP_EDITOR_PAGE, CompEditorPage))
-#define COMP_EDITOR_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COMP_EDITOR_PAGE, CompEditorPageClass))
-#define IS_COMP_EDITOR_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COMP_EDITOR_PAGE))
-#define IS_COMP_EDITOR_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), TYPE_COMP_EDITOR_PAGE))
-
-typedef struct {
- ECalComponentDateTime *start;
- ECalComponentDateTime *end;
- ECalComponentDateTime *due;
- struct icaltimetype *complete;
-} CompEditorPageDates;
-
-typedef struct {
- GtkObject object;
-
- /* Some of the pages need the ECal to access timezone data. */
- ECal *client;
-
- /* The GtkAccelGroup for the page. We install this when the page is
- mapped, and uninstall when it is unmapped. libglade would do this
- normally, but we create our pages individually so have to do it
- ourselves. */
- GtkAccelGroup *accel_group;
-} 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, ECalComponent *comp);
- gboolean (* fill_component) (CompEditorPage *page, ECalComponent *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,
- ECalComponent *comp);
-gboolean comp_editor_page_fill_component (CompEditorPage *page,
- ECalComponent *comp);
-void comp_editor_page_set_e_cal (CompEditorPage *page,
- ECal *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);
-void comp_editor_page_display_validation_error (CompEditorPage *page,
- const char *msg,
- GtkWidget *field);
-
-
-
-
-G_END_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 bdb66c6c92..0000000000
--- a/calendar/gui/dialogs/comp-editor-util.c
+++ /dev/null
@@ -1,351 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <libical/ical.h>
-#include <glib.h>
-#include <gtk/gtklabel.h>
-#include <libgnome/gnome-i18n.h>
-#include <bonobo-activation/bonobo-activation.h>
-#include <bonobo/bonobo-control.h>
-#include <bonobo/bonobo-widget.h>
-#include <e-util/e-time-utils.h>
-#include <libecal/e-cal-time-util.h>
-#include "../calendar-config.h"
-#include "../e-date-edit-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, ECalComponent *comp)
-{
- ECalComponentDateTime dt;
-
- dates->start = NULL;
- dates->end = NULL;
- dates->due = NULL;
- dates->complete = NULL;
-
- /* Note that the ECalComponentDateTime's returned contain allocated
- icaltimetype and tzid values, so we just take over ownership of
- those. */
- e_cal_component_get_dtstart (comp, &dt);
- if (dt.value) {
- dates->start = g_new (ECalComponentDateTime, 1);
- *dates->start = dt;
- }
-
- e_cal_component_get_dtend (comp, &dt);
- if (dt.value) {
- dates->end = g_new (ECalComponentDateTime, 1);
- *dates->end = dt;
- }
-
- e_cal_component_get_due (comp, &dt);
- if (dt.value) {
- dates->due = g_new (ECalComponentDateTime, 1);
- *dates->due = dt;
- }
-
- e_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)
-{
- /* Note that e_cal_component_free_datetime() only frees the fields in
- the struct. It doesn't free the struct itself, so we do that. */
- if (dates->start) {
- e_cal_component_free_datetime (dates->start);
- g_free (dates->start);
- }
-
- if (dates->end) {
- e_cal_component_free_datetime (dates->end);
- g_free (dates->end);
- }
-
- if (dates->due) {
- e_cal_component_free_datetime (dates->due);
- g_free (dates->due);
- }
-
- if (dates->complete)
- e_cal_component_free_icaltimetype (dates->complete);
-}
-
-
-/* dtstart is only passed in if tt is the dtend. */
-static void
-write_label_piece (struct icaltimetype *tt, char *buffer, int size,
- char *stext, char *etext, struct icaltimetype *dtstart)
-{
- struct tm tmp_tm = { 0 };
- struct icaltimetype tt_copy = *tt;
- int len;
-
- /* FIXME: May want to convert the time to an appropriate zone. */
-
- if (stext != NULL)
- strcat (buffer, stext);
-
- /* If we are writing the DTEND (i.e. DTSTART is set), and
- DTEND > DTSTART, subtract 1 day. The DTEND date is not inclusive. */
- if (tt_copy.is_date && dtstart
- && icaltime_compare_date_only (tt_copy, *dtstart) > 0) {
- icaltime_adjust (&tt_copy, -1, 0, 0, 0);
- }
-
- tmp_tm.tm_year = tt_copy.year - 1900;
- tmp_tm.tm_mon = tt_copy.month - 1;
- tmp_tm.tm_mday = tt_copy.day;
- tmp_tm.tm_hour = tt_copy.hour;
- tmp_tm.tm_min = tt_copy.minute;
- tmp_tm.tm_sec = tt_copy.second;
- tmp_tm.tm_isdst = -1;
-
- tmp_tm.tm_wday = time_day_of_week (tt_copy.day, tt_copy.month - 1,
- tt_copy.year);
-
- len = strlen (buffer);
- e_time_format_date_and_time (&tmp_tm,
- calendar_config_get_24_hour_format (),
- !tt_copy.is_date, 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, NULL);
-
- if (start_set && end_set)
- write_label_piece (dates->end->value, buffer, 1024,
- _(" to "), NULL, dates->start->value);
-
- if (complete_set) {
- if (start_set)
- write_label_piece (dates->complete, buffer, 1024, _(" (Completed "), ")", NULL);
- else
- write_label_piece (dates->complete, buffer, 1024, _("Completed "), NULL, NULL);
- }
-
- if (due_set && dates->complete == NULL) {
- if (start_set)
- write_label_piece (dates->due->value, buffer, 1024, _(" (Due "), ")", NULL);
- else
- write_label_piece (dates->due->value, buffer, 1024, _("Due "), NULL, NULL);
- }
-
- gtk_label_set_text (GTK_LABEL (label), buffer);
-}
-
-static void
-date_edit_destroy_cb (EDateEdit *date_edit, gpointer data)
-{
- EDateEditConfig *config = data;
-
- g_object_unref (config);
-}
-
-/**
- * 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;
- EDateEditConfig *config;
-
- 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
-
- config = e_date_edit_config_new (dedit);
- g_signal_connect (G_OBJECT (dedit), "destroy", G_CALLBACK (date_edit_destroy_cb), config);
-
- 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;
-}
-
-
-
-/**
- * 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 078cd6508c..0000000000
--- a/calendar/gui/dialogs/comp-editor-util.h
+++ /dev/null
@@ -1,40 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 "comp-editor-page.h"
-
-void comp_editor_dates (CompEditorPageDates *date, ECalComponent *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);
-
-
-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 cd270eb423..0000000000
--- a/calendar/gui/dialogs/comp-editor.c
+++ /dev/null
@@ -1,1497 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <glib.h>
-#include <gdk/gdkkeysyms.h>
-#include <gtk/gtkstock.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-uidefs.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-dialog-util.h>
-#include <libgnomeui/gnome-window-icon.h>
-#include <libgnomeui/gnome-messagebox.h>
-#include <bonobo/bonobo-ui-container.h>
-#include <bonobo/bonobo-ui-util.h>
-#include <e-util/e-dialog-utils.h>
-#include <evolution-shell-component-utils.h>
-#include "../print.h"
-#include "../comp-util.h"
-#include "save-comp.h"
-#include "delete-comp.h"
-#include "send-comp.h"
-#include "changed-comp.h"
-#include "cancel-comp.h"
-#include "recur-comp.h"
-#include "comp-editor.h"
-
-
-
-/* Private part of the CompEditor structure */
-struct _CompEditorPrivate {
- /* Client to use */
- ECal *client;
-
- /* Calendar object/uid we are editing; this is an internal copy */
- ECalComponent *comp;
-
- /* The pages we have */
- GList *pages;
-
- /* UI Component for the dialog */
- BonoboUIComponent *uic;
-
- /* Notebook to hold the pages */
- GtkNotebook *notebook;
-
- GtkWidget *filesel;
-
- gboolean changed;
- gboolean needs_send;
-
- CalObjModType mod;
-
- gboolean existing_org;
- gboolean user_org;
-
- gboolean warned;
-
- gboolean updating;
-};
-
-
-
-static void comp_editor_class_init (CompEditorClass *class);
-static void comp_editor_init (CompEditor *editor);
-static gint comp_editor_key_press_event (GtkWidget *d, GdkEventKey *e);
-static void comp_editor_finalize (GObject *object);
-
-static void real_set_e_cal (CompEditor *editor, ECal *client);
-static void real_edit_comp (CompEditor *editor, ECalComponent *comp);
-static gboolean real_send_comp (CompEditor *editor, ECalComponentItipMethod method);
-static gboolean prompt_to_save_changes (CompEditor *editor, gboolean send);
-static void delete_comp (CompEditor *editor);
-static void close_dialog (CompEditor *editor);
-
-static void page_changed_cb (GtkObject *obj, gpointer data);
-static void page_summary_changed_cb (GtkObject *obj, const char *summary, gpointer data);
-static void page_dates_changed_cb (GtkObject *obj, CompEditorPageDates *dates, gpointer data);
-
-static void obj_updated_cb (ECal *client, const char *uid, gpointer data);
-static void obj_removed_cb (ECal *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
-};
-
-static GtkObjectClass *parent_class;
-
-
-
-E_MAKE_TYPE (comp_editor, "CompEditor", CompEditor, comp_editor_class_init, comp_editor_init,
- BONOBO_TYPE_WINDOW);
-
-/* Class initialization function for the calendar component editor */
-static void
-comp_editor_class_init (CompEditorClass *klass)
-{
- GObjectClass *object_class;
- GtkWidgetClass *widget_class;
-
- object_class = G_OBJECT_CLASS (klass);
- widget_class = GTK_WIDGET_CLASS (klass);
-
- parent_class = g_type_class_ref(BONOBO_TYPE_WINDOW);
-
- klass->set_e_cal = real_set_e_cal;
- klass->edit_comp = real_edit_comp;
- klass->send_comp = real_send_comp;
-
- widget_class->key_press_event = comp_editor_key_press_event;
- object_class->finalize = comp_editor_finalize;
-}
-
-/* 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 */
- container = bonobo_ui_container_new ();
- editor = (CompEditor *) bonobo_window_construct (BONOBO_WINDOW (editor), container,
- "event-editor", "iCalendar Editor");
- g_signal_connect((editor), "delete_event",
- G_CALLBACK (delete_event_cb), editor);
-
- priv->uic = bonobo_ui_component_new_default ();
- bonobo_ui_component_set_container (priv->uic,
- bonobo_object_corba_objref (BONOBO_OBJECT (container)),
- NULL);
- bonobo_ui_engine_config_set_path (bonobo_window_get_ui_engine (BONOBO_WINDOW (editor)),
- "/evolution/UIConf/kvps");
-
- bonobo_ui_component_add_verb_list_with_data (priv->uic, verbs, editor);
- bonobo_ui_util_set_ui (priv->uic, PREFIX,
- EVOLUTION_UIDIR "/evolution-comp-editor.xml",
- "evolution-calendar", NULL);
- 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 (editor), 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, 6);
-}
-
-/* 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;
- priv->mod = CALOBJ_MOD_ALL;
- priv->existing_org = FALSE;
- priv->user_org = FALSE;
- priv->warned = FALSE;
-}
-
-
-static gint
-comp_editor_key_press_event (GtkWidget *d, GdkEventKey *e)
-{
- if (e->keyval == GDK_Escape) {
- if (prompt_to_save_changes (COMP_EDITOR (d), TRUE))
- close_dialog (COMP_EDITOR (d));
- return TRUE;
- }
-
- if (GTK_WIDGET_CLASS (parent_class)->key_press_event)
- return (* GTK_WIDGET_CLASS (parent_class)->key_press_event) (d, e);
-
- return FALSE;
-}
-
-/* Destroy handler for the calendar component editor */
-static void
-comp_editor_finalize (GObject *object)
-{
- CompEditor *editor;
- CompEditorPrivate *priv;
- GList *l;
-
- editor = COMP_EDITOR (object);
- priv = editor->priv;
-
- if (priv->client) {
- g_signal_handlers_disconnect_matched (priv->client, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, editor);
- g_object_unref (priv->client);
- priv->client = 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)
- g_object_unref (l->data);
-
- if (priv->comp) {
- g_object_unref (priv->comp);
- priv->comp = NULL;
- }
-
- bonobo_object_unref (priv->uic);
-
- g_free (priv);
- editor->priv = NULL;
-
- if (G_OBJECT_CLASS (parent_class)->finalize)
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
-}
-
-static gboolean
-save_comp (CompEditor *editor)
-{
- CompEditorPrivate *priv;
- ECalComponent *clone;
- GList *l;
- gboolean result;
- GError *error = NULL;
-
- priv = editor->priv;
-
- if (!priv->changed)
- return TRUE;
-
- clone = e_cal_component_clone (priv->comp);
- for (l = priv->pages; l != NULL; l = l->next) {
- if (!comp_editor_page_fill_component (l->data, clone)) {
- g_object_unref (clone);
- comp_editor_show_page (editor, COMP_EDITOR_PAGE (l->data));
- return FALSE;
- }
- }
-
- /* If we are not the organizer, we don't update the sequence number */
- if (!e_cal_component_has_organizer (clone) || itip_organizer_is_user (clone, priv->client))
- e_cal_component_commit_sequence (clone);
- else
- e_cal_component_abort_sequence (clone);
-
- g_object_unref (priv->comp);
- priv->comp = clone;
-
- priv->updating = TRUE;
-
- if (!cal_comp_is_on_server (priv->comp, priv->client)) {
- result = e_cal_create_object (priv->client, e_cal_component_get_icalcomponent (priv->comp), NULL, &error);
- } else {
- result = e_cal_modify_object (priv->client, e_cal_component_get_icalcomponent (priv->comp), priv->mod, &error);
- }
-
- if (!result) {
- GtkWidget *dlg;
- char *msg;
-
- msg = g_strdup (error ? error->message : _("Could not update object"));
-
- dlg = gnome_error_dialog (msg);
- gnome_dialog_run_and_close (GNOME_DIALOG (dlg));
-
- g_free (msg);
- if (error)
- g_error_free (error);
-
- return FALSE;
- } else {
- priv->changed = FALSE;
- }
-
- priv->updating = FALSE;
-
- return TRUE;
-}
-
-static gboolean
-save_comp_with_send (CompEditor *editor)
-{
- CompEditorPrivate *priv;
- gboolean send;
-
- priv = editor->priv;
-
- send = priv->changed && priv->needs_send;
-
- if (!save_comp (editor))
- return FALSE;
-
- if (send && send_component_dialog ((GtkWindow *) editor, priv->client, priv->comp, !priv->existing_org)) {
- if (itip_organizer_is_user (priv->comp, priv->client))
- return comp_editor_send_comp (editor, E_CAL_COMPONENT_METHOD_REQUEST);
- else
- return comp_editor_send_comp (editor, E_CAL_COMPONENT_METHOD_REPLY);
- }
-
- return TRUE;
-}
-
-static void
-delete_comp (CompEditor *editor)
-{
- CompEditorPrivate *priv;
- const char *uid;
-
- priv = editor->priv;
-
- e_cal_component_get_uid (priv->comp, &uid);
- priv->updating = TRUE;
- e_cal_remove_object (priv->client, uid, NULL);
- priv->updating = FALSE;
- close_dialog (editor);
-}
-
-static gboolean
-prompt_to_save_changes (CompEditor *editor, gboolean send)
-{
- CompEditorPrivate *priv;
-
- priv = editor->priv;
-
- if (!priv->changed)
- return TRUE;
-
- switch (save_component_dialog (GTK_WINDOW (editor))) {
- case GTK_RESPONSE_YES: /* Save */
- if (e_cal_component_is_instance (priv->comp))
- if (!recur_component_dialog (priv->client, priv->comp, &priv->mod, GTK_WINDOW (editor)))
- return FALSE;
-
- if (send && save_comp_with_send (editor))
- return TRUE;
- else if (!send && save_comp (editor))
- return TRUE;
- else
- return FALSE;
- case GTK_RESPONSE_NO: /* Discard */
- return TRUE;
- case GTK_RESPONSE_CANCEL: /* Cancel */
- default:
- return FALSE;
- }
-}
-
-/* This sets the focus to the toplevel, so any field being edited is committed.
- FIXME: In future we may also want to check some of the fields are valid,
- e.g. the EDateEdit fields. */
-static void
-commit_all_fields (CompEditor *editor)
-{
- CompEditorPrivate *priv;
-
- priv = editor->priv;
-
- gtk_window_set_focus (GTK_WINDOW (editor), NULL);
-}
-
-/* Closes the dialog box and emits the appropriate signals */
-static void
-close_dialog (CompEditor *editor)
-{
- CompEditorPrivate *priv;
-
- priv = editor->priv;
-
- gtk_widget_destroy (GTK_WIDGET (editor));
-}
-
-
-
-void
-comp_editor_set_existing_org (CompEditor *editor, gboolean existing_org)
-{
- CompEditorPrivate *priv;
-
- g_return_if_fail (editor != NULL);
- g_return_if_fail (IS_COMP_EDITOR (editor));
-
- priv = editor->priv;
-
- priv->existing_org = existing_org;
-}
-
-gboolean
-comp_editor_get_existing_org (CompEditor *editor)
-{
- CompEditorPrivate *priv;
-
- g_return_val_if_fail (editor != NULL, FALSE);
- g_return_val_if_fail (IS_COMP_EDITOR (editor), FALSE);
-
- priv = editor->priv;
-
- return priv->existing_org;
-}
-
-void
-comp_editor_set_user_org (CompEditor *editor, gboolean user_org)
-{
- CompEditorPrivate *priv;
-
- g_return_if_fail (editor != NULL);
- g_return_if_fail (IS_COMP_EDITOR (editor));
-
- priv = editor->priv;
-
- priv->user_org = user_org;
-}
-
-gboolean
-comp_editor_get_user_org (CompEditor *editor)
-{
- CompEditorPrivate *priv;
-
- g_return_val_if_fail (editor != NULL, FALSE);
- g_return_val_if_fail (IS_COMP_EDITOR (editor), FALSE);
-
- priv = editor->priv;
-
- return priv->user_org;
-}
-
-
-/**
- * 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;
-}
-
-static void page_mapped_cb (GtkWidget *page_widget,
- CompEditorPage *page)
-{
- GtkWidget *toplevel;
-
- toplevel = gtk_widget_get_toplevel (page_widget);
- if (!GTK_IS_WINDOW (toplevel))
- return;
-
- if (page->accel_group) {
- gtk_window_add_accel_group (GTK_WINDOW (toplevel),
- page->accel_group);
- }
-}
-
-static void page_unmapped_cb (GtkWidget *page_widget,
- CompEditorPage *page)
-{
- GtkWidget *toplevel;
-
- toplevel = gtk_widget_get_toplevel (page_widget);
- if (!GTK_IS_WINDOW (toplevel))
- return;
-
- if (page->accel_group) {
- gtk_window_remove_accel_group (GTK_WINDOW (toplevel),
- page->accel_group);
- }
-}
-
-/**
- * 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;
-
- g_object_ref (page);
-
- /* If we are editing something, fill the widgets with current info */
- if (priv->comp != NULL) {
- ECalComponent *comp;
-
- comp = comp_editor_get_current_comp (editor);
- comp_editor_page_fill_widgets (page, comp);
- g_object_unref (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 */
- g_signal_connect(page, "changed",
- G_CALLBACK (page_changed_cb), editor);
- g_signal_connect(page, "summary_changed",
- G_CALLBACK (page_summary_changed_cb), editor);
- g_signal_connect(page, "dates_changed",
- G_CALLBACK (page_dates_changed_cb), editor);
-
- /* Listen for when the page is mapped/unmapped so we can
- install/uninstall the appropriate GtkAccelGroup. */
- g_signal_connect((page_widget), "map",
- G_CALLBACK (page_mapped_cb), page);
- g_signal_connect((page_widget), "unmap",
- G_CALLBACK (page_unmapped_cb), page);
-
- /* 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);
- if (page_num == -1)
- return;
-
- /* Disconnect all the signals added in append_page(). */
- g_signal_handlers_disconnect_matched (page, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, editor);
- g_signal_handlers_disconnect_matched (page_widget, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, page);
-
- gtk_notebook_remove_page (priv->notebook, page_num);
-
- priv->pages = g_list_remove (priv->pages, page);
- g_object_unref (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_e_cal:
- * @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_e_cal (CompEditor *editor, ECal *client)
-{
- CompEditorClass *klass;
-
- g_return_if_fail (editor != NULL);
- g_return_if_fail (IS_COMP_EDITOR (editor));
-
- klass = COMP_EDITOR_CLASS (G_OBJECT_GET_CLASS (editor));
-
- if (klass->set_e_cal)
- klass->set_e_cal (editor, client);
-}
-
-/**
- * comp_editor_get_e_cal:
- * @editor: A component editor
- *
- * Returns the calendar client of the editor
- *
- * Return value: The calendar client of the editor
- **/
-ECal *
-comp_editor_get_e_cal (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 (ECalComponent *comp)
-{
- char *title;
- const char *type_string;
- ECalComponentVType type;
- ECalComponentText text;
-
- if (!comp)
- return g_strdup (_("Edit Appointment"));
-
- type = e_cal_component_get_vtype (comp);
- switch (type) {
- case E_CAL_COMPONENT_EVENT:
- type_string = _("Appointment - %s");
- break;
- case E_CAL_COMPONENT_TODO:
- type_string = _("Task - %s");
- break;
- case E_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;
- }
-
- e_cal_component_get_summary (comp, &text);
- if (text.value) {
- title = g_strdup_printf (type_string, text.value);
- } else {
- title = g_strdup_printf (type_string, _("No summary"));
- }
-
- return title;
-}
-
-/* Creates an appropriate title for the event editor dialog */
-static char *
-make_title_from_string (ECalComponent *comp, const char *str)
-{
- char *title;
- const char *type_string;
- ECalComponentVType type;
-
- if (!comp)
- return g_strdup (_("Edit Appointment"));
-
- type = e_cal_component_get_vtype (comp);
- switch (type) {
- case E_CAL_COMPONENT_EVENT:
- type_string = _("Appointment - %s");
- break;
- case E_CAL_COMPONENT_TODO:
- type_string = _("Task - %s");
- break;
- case E_CAL_COMPONENT_JOURNAL:
- type_string = _("Journal entry - %s");
- break;
- default:
- g_message ("make_title_from_string(): Cannot handle object of type %d", type);
- return NULL;
- }
-
- if (str) {
- title = g_strdup_printf (type_string, str);
- } else {
- title = g_strdup_printf (type_string, _("No summary"));
- }
-
- return title;
-}
-
-static const char *
-make_icon_from_comp (ECalComponent *comp)
-{
- ECalComponentVType type;
-
- if (!comp)
- return EVOLUTION_IMAGESDIR "/evolution-calendar-mini.png";
-
- type = e_cal_component_get_vtype (comp);
- switch (type) {
- case E_CAL_COMPONENT_EVENT:
- return EVOLUTION_IMAGESDIR "/buttons/new_appointment.png";
- break;
- case E_CAL_COMPONENT_TODO:
- return EVOLUTION_IMAGESDIR "/buttons/new_task.png";
- break;
- default:
- return EVOLUTION_IMAGESDIR "/evolution-calendar-mini.png";
- }
-}
-
-/* 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 (editor), title);
- g_free (title);
-}
-
-static void
-set_title_from_string (CompEditor *editor, const char *str)
-{
- CompEditorPrivate *priv;
- char *title;
-
- priv = editor->priv;
- title = make_title_from_string (priv->comp, str);
- gtk_window_set_title (GTK_WINDOW (editor), title);
- g_free (title);
-}
-
-static void
-set_icon_from_comp (CompEditor *editor)
-{
- CompEditorPrivate *priv;
- const char *file;
-
- priv = editor->priv;
- file = make_icon_from_comp (priv->comp);
- gnome_window_icon_set_from_file (GTK_WINDOW (editor), file);
-}
-
-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_e_cal (CompEditor *editor, ECal *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 (E_IS_CAL (client));
- g_return_if_fail (e_cal_get_load_state (client) ==
- E_CAL_LOAD_LOADED);
- g_object_ref (client);
- }
-
- if (priv->client) {
- gtk_signal_disconnect_by_data (GTK_OBJECT (priv->client),
- editor);
- g_object_unref (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_e_cal (elem->data, client);
-
- g_signal_connect((priv->client), "obj_updated",
- G_CALLBACK (obj_updated_cb), editor);
-
- g_signal_connect((priv->client), "obj_removed",
- G_CALLBACK (obj_removed_cb), editor);
-}
-
-static void
-real_edit_comp (CompEditor *editor, ECalComponent *comp)
-{
- CompEditorPrivate *priv;
-
- g_return_if_fail (editor != NULL);
- g_return_if_fail (IS_COMP_EDITOR (editor));
-
- priv = editor->priv;
-
- if (priv->comp) {
- g_object_unref (priv->comp);
- priv->comp = NULL;
- }
-
- if (comp)
- priv->comp = e_cal_component_clone (comp);
-
- priv->existing_org = e_cal_component_has_organizer (comp);
- priv->user_org = itip_organizer_is_user (comp, priv->client);
- priv->warned = FALSE;
-
- set_title_from_comp (editor);
- set_icon_from_comp (editor);
- fill_widgets (editor);
-}
-
-
-static gboolean
-real_send_comp (CompEditor *editor, ECalComponentItipMethod method)
-{
- CompEditorPrivate *priv;
- ECalComponent *tmp_comp;
-
- g_return_val_if_fail (editor != NULL, FALSE);
- g_return_val_if_fail (IS_COMP_EDITOR (editor), FALSE);
-
- priv = editor->priv;
-
- if (itip_send_comp (method, priv->comp, priv->client, NULL)) {
- tmp_comp = priv->comp;
- g_object_ref (tmp_comp);
- comp_editor_edit_comp (editor, tmp_comp);
- g_object_unref (tmp_comp);
-
- comp_editor_set_changed (editor, TRUE);
- save_comp (editor);
-
- return TRUE;
- }
-
- comp_editor_set_changed (editor, TRUE);
-
- return FALSE;
-}
-
-
-/**
- * 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, ECalComponent *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 (E_IS_CAL_COMPONENT (comp));
-
- klass = COMP_EDITOR_CLASS (G_OBJECT_GET_CLASS (editor));
-
- if (klass->edit_comp)
- klass->edit_comp (editor, comp);
-}
-
-ECalComponent *
-comp_editor_get_comp (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->comp;
-}
-
-ECalComponent *
-comp_editor_get_current_comp (CompEditor *editor)
-{
- CompEditorPrivate *priv;
- ECalComponent *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 = e_cal_component_clone (priv->comp);
- if (priv->changed) {
- for (l = priv->pages; l != NULL; l = l->next)
- comp_editor_page_fill_component (l->data, comp);
- }
-
- return comp;
-}
-
-/**
- * comp_editor_save_comp:
- * @editor:
- *
- *
- **/
-gboolean
-comp_editor_save_comp (CompEditor *editor, gboolean send)
-{
- return prompt_to_save_changes (editor, send);
-}
-
-/**
- * comp_editor_delete_comp:
- * @editor:
- *
- *
- **/
-void
-comp_editor_delete_comp (CompEditor *editor)
-{
- delete_comp (editor);
-}
-
-/**
- * comp_editor_send_comp:
- * @editor:
- * @method:
- *
- *
- **/
-gboolean
-comp_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method)
-{
- CompEditorClass *klass;
-
- g_return_val_if_fail (editor != NULL, FALSE);
- g_return_val_if_fail (IS_COMP_EDITOR (editor), FALSE);
-
- klass = COMP_EDITOR_CLASS (G_OBJECT_GET_CLASS (editor));
-
- if (klass->send_comp)
- return klass->send_comp (editor, method);
-
- return FALSE;
-}
-
-gboolean
-comp_editor_close (CompEditor *editor)
-{
- gboolean close;
-
- g_return_val_if_fail (editor != NULL, FALSE);
- g_return_val_if_fail (IS_COMP_EDITOR (editor), FALSE);
-
- commit_all_fields (editor);
-
- close = prompt_to_save_changes (editor, TRUE);
- if (close)
- close_dialog (editor);
-
- return close;
-}
-
-/**
- * comp_editor_merge_ui:
- * @editor:
- * @filename:
- * @verbs:
- *
- *
- **/
-void
-comp_editor_merge_ui (CompEditor *editor,
- const char *filename,
- BonoboUIVerb *verbs,
- EPixmap *component_pixmaps)
-{
- CompEditorPrivate *priv;
- char *path;
-
- g_return_if_fail (editor != NULL);
- g_return_if_fail (IS_COMP_EDITOR (editor));
-
- priv = editor->priv;
-
- path = g_strconcat (EVOLUTION_UIDIR "/", filename, NULL);
-
- bonobo_ui_util_set_ui (priv->uic, EVOLUTION_DATADIR, path, "evolution-calendar", NULL);
- bonobo_ui_component_add_verb_list_with_data (priv->uic, verbs, editor);
-
- g_free (path);
-
- if (component_pixmaps != NULL)
- e_pixmaps_update (priv->uic, component_pixmaps);
-}
-
-/**
- * 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 (GTK_WIDGET (editor));
- raise_and_focus (GTK_WIDGET (editor));
-}
-
-/* Menu Commands */
-static void
-save_cmd (GtkWidget *widget, gpointer data)
-{
- CompEditor *editor = COMP_EDITOR (data);
- CompEditorPrivate *priv;
-
- priv = editor->priv;
-
- commit_all_fields (editor);
-
- if (e_cal_component_is_instance (priv->comp))
- if (!recur_component_dialog (priv->client, priv->comp, &priv->mod, GTK_WINDOW (editor)))
- return;
-
- save_comp_with_send (editor);
-}
-
-static void
-save_close_cmd (GtkWidget *widget, gpointer data)
-{
- CompEditor *editor = COMP_EDITOR (data);
- CompEditorPrivate *priv;
-
- priv = editor->priv;
-
- commit_all_fields (editor);
-
- if (e_cal_component_is_instance (priv->comp))
- if (!recur_component_dialog (priv->client, priv->comp, &priv->mod, GTK_WINDOW (editor)))
- return;
-
- if (save_comp_with_send (editor))
- close_dialog (editor);
-}
-
-static void
-save_as_cmd (GtkWidget *widget, gpointer data)
-{
- CompEditor *editor = COMP_EDITOR (data);
- CompEditorPrivate *priv;
- char *filename;
- char *ical_string;
- FILE *file;
-
- priv = editor->priv;
-
- commit_all_fields (editor);
-
- filename = e_file_dialog_save (_("Save as..."));
- if (filename == NULL)
- return;
-
- ical_string = e_cal_get_component_as_string (priv->client,
- e_cal_component_get_icalcomponent (priv->comp));
- if (ical_string == NULL) {
- g_warning ("Couldn't convert item to a string");
- return;
- }
-
- file = fopen (filename, "w");
- if (file == NULL) {
- g_warning ("Couldn't save item");
- return;
- }
-
- fprintf (file, ical_string);
- g_free (ical_string);
- fclose (file);
-}
-
-static void
-delete_cmd (GtkWidget *widget, gpointer data)
-{
- CompEditor *editor = COMP_EDITOR (data);
- CompEditorPrivate *priv;
- ECalComponentVType vtype;
-
- priv = editor->priv;
-
- vtype = e_cal_component_get_vtype (priv->comp);
-
- if (delete_component_dialog (priv->comp, FALSE, 1, vtype, GTK_WIDGET (editor))) {
- if (itip_organizer_is_user (priv->comp, priv->client)
- && cancel_component_dialog ((GtkWindow *) editor,
- priv->client, priv->comp, TRUE))
- itip_send_comp (E_CAL_COMPONENT_METHOD_CANCEL, priv->comp, priv->client, NULL);
-
- delete_comp (editor);
- }
-}
-
-static void
-print_cmd (GtkWidget *widget, gpointer data)
-{
- CompEditor *editor = COMP_EDITOR (data);
- ECalComponent *comp;
-
- commit_all_fields (editor);
-
- comp = comp_editor_get_current_comp (editor);
- print_comp (comp, editor->priv->client, FALSE);
- g_object_unref (comp);
-}
-
-static void
-print_preview_cmd (GtkWidget *widget, gpointer data)
-{
- CompEditor *editor = COMP_EDITOR (data);
- ECalComponent *comp;
-
- commit_all_fields (editor);
-
- comp = comp_editor_get_current_comp (editor);
- print_comp (comp, editor->priv->client, TRUE);
- g_object_unref (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);
-
- commit_all_fields (editor);
-
- if (prompt_to_save_changes (editor, TRUE))
- close_dialog (editor);
-}
-
-static void
-page_changed_cb (GtkObject *obj, gpointer data)
-{
- CompEditor *editor = COMP_EDITOR (data);
- CompEditorPrivate *priv;
-
- priv = editor->priv;
-
- priv->changed = TRUE;
-
- if (!priv->warned && priv->existing_org && !priv->user_org) {
- e_notice (editor, GTK_MESSAGE_INFO,
- _("Changes made to this item may be discarded if an update arrives"));
- priv->warned = TRUE;
- }
-
-}
-
-/* Page signal callbacks */
-static void
-page_summary_changed_cb (GtkObject *obj, 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)
- if (obj != l->data)
- comp_editor_page_set_summary (l->data, summary);
-
- priv->changed = TRUE;
-
- if (!priv->warned && priv->existing_org && !priv->user_org) {
- e_notice (editor, GTK_MESSAGE_INFO,
- _("Changes made to this item may be discarded if an update arrives"));
- priv->warned = TRUE;
- }
-
- set_title_from_string (editor, summary);
-}
-
-static void
-page_dates_changed_cb (GtkObject *obj,
- 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)
- if (obj != l->data)
- comp_editor_page_set_dates (l->data, dates);
-
- priv->changed = TRUE;
-
- if (!priv->warned && priv->existing_org && !priv->user_org) {
- e_notice (editor, GTK_MESSAGE_INFO,
- _("Changes made to this item may be discarded if an update arrives"));
- priv->warned = TRUE;
- }
-}
-
-static void
-obj_updated_cb (ECal *client, const char *uid, gpointer data)
-{
- CompEditor *editor = COMP_EDITOR (data);
- CompEditorPrivate *priv;
- ECalComponent *comp = NULL;
- const char *edit_uid;
-
- priv = editor->priv;
-
- e_cal_component_get_uid (priv->comp, &edit_uid);
-
- if (!strcmp (uid, edit_uid) && !priv->updating) {
- if (changed_component_dialog ((GtkWindow *) editor, priv->comp, FALSE, priv->changed)) {
- icalcomponent *icalcomp;
-
- if (!e_cal_get_object (priv->client, uid, NULL, &icalcomp, NULL)) {
- comp = e_cal_component_new ();
- if (e_cal_component_set_icalcomponent (comp, icalcomp))
- comp_editor_edit_comp (editor, comp);
- else {
- GtkWidget *dlg;
-
- dlg = gnome_error_dialog (_("Unable to obtain current version!"));
- gnome_dialog_run_and_close (GNOME_DIALOG (dlg));
- icalcomponent_free (icalcomp);
- }
-
- g_object_unref (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 (ECal *client, const char *uid, gpointer data)
-{
- CompEditor *editor = COMP_EDITOR (data);
- CompEditorPrivate *priv;
- const char *edit_uid;
-
- priv = editor->priv;
-
- e_cal_component_get_uid (priv->comp, &edit_uid);
-
- if (!strcmp (uid, edit_uid) && !priv->updating) {
- if (changed_component_dialog ((GtkWindow *) editor, 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, TRUE))
- 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 48b332ce4b..0000000000
--- a/calendar/gui/dialogs/comp-editor.h
+++ /dev/null
@@ -1,109 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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-window.h>
-#include <bonobo/bonobo-ui-engine.h>
-#include <bonobo/bonobo-ui-component.h>
-#include <libecal/e-cal.h>
-#include "../itip-utils.h"
-#include "comp-editor-page.h"
-#include "evolution-shell-component-utils.h"
-
-G_BEGIN_DECLS
-
-
-
-#define TYPE_COMP_EDITOR (comp_editor_get_type ())
-#define COMP_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COMP_EDITOR, CompEditor))
-#define COMP_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COMP_EDITOR, CompEditorClass))
-#define IS_COMP_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COMP_EDITOR))
-#define IS_COMP_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COMP_EDITOR))
-
-typedef struct _CompEditorPrivate CompEditorPrivate;
-
-typedef struct {
- BonoboWindow object;
-
- /* Private data */
- CompEditorPrivate *priv;
-} CompEditor;
-
-typedef struct {
- BonoboWindowClass parent_class;
-
- /* Virtual functions */
- void (* set_e_cal) (CompEditor *page, ECal *client);
- void (* edit_comp) (CompEditor *page, ECalComponent *comp);
- gboolean (* send_comp) (CompEditor *page, ECalComponentItipMethod 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_set_existing_org (CompEditor *editor,
- gboolean existing_org);
-gboolean comp_editor_get_existing_org (CompEditor *editor);
-void comp_editor_set_user_org (CompEditor *editor,
- gboolean user_org);
-gboolean comp_editor_get_user_org (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_e_cal (CompEditor *editor,
- ECal *client);
-ECal *comp_editor_get_e_cal (CompEditor *editor);
-void comp_editor_edit_comp (CompEditor *ee,
- ECalComponent *comp);
-ECalComponent *comp_editor_get_comp (CompEditor *editor);
-ECalComponent *comp_editor_get_current_comp (CompEditor *editor);
-gboolean comp_editor_save_comp (CompEditor *editor,
- gboolean send);
-void comp_editor_delete_comp (CompEditor *editor);
-gboolean comp_editor_send_comp (CompEditor *editor,
- ECalComponentItipMethod method);
-gboolean comp_editor_close (CompEditor *editor);
-void comp_editor_merge_ui (CompEditor *editor,
- const char *filename,
- BonoboUIVerb *verbs,
- EPixmap *pixmaps);
-void comp_editor_set_ui_prop (CompEditor *editor,
- const char *path,
- const char *attr,
- const char *val);
-void comp_editor_focus (CompEditor *editor);
-
-
-
-
-G_END_DECLS
-
-#endif
diff --git a/calendar/gui/dialogs/copy-source-dialog.c b/calendar/gui/dialogs/copy-source-dialog.c
deleted file mode 100644
index 11b523a1f8..0000000000
--- a/calendar/gui/dialogs/copy-source-dialog.c
+++ /dev/null
@@ -1,163 +0,0 @@
-/* Evolution calendar - Copy source dialog
- *
- * Copyright (C) 2003 Novell, Inc.
- *
- * Author: Rodrigo Moya <rodrigo@ximian.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <gtk/gtkbox.h>
-#include <gtk/gtkdialog.h>
-#include <gtk/gtklabel.h>
-#include <gtk/gtkstock.h>
-#include <bonobo/bonobo-i18n.h>
-#include <widgets/misc/e-source-option-menu.h>
-#include "copy-source-dialog.h"
-
-typedef struct {
- GtkWidget *dialog;
- GtkWidget *selector;
- ESourceList *source_list;
- GConfClient *conf_client;
- ESource *orig_source;
- CalObjType obj_type;
- ESource *selected_source;
-} CopySourceDialogData;
-
-static void
-source_selected_cb (ESourceOptionMenu *menu, ESource *selected_source, gpointer user_data)
-{
- CopySourceDialogData *csdd = user_data;
-
- csdd->selected_source = selected_source;
- if (selected_source) {
- if (selected_source != csdd->orig_source)
- gtk_dialog_set_response_sensitive (GTK_DIALOG (csdd->dialog), GTK_RESPONSE_OK, TRUE);
- else {
- gtk_dialog_set_response_sensitive (GTK_DIALOG (csdd->dialog), GTK_RESPONSE_OK, FALSE);
- csdd->selected_source = NULL;
- }
- } else
- gtk_dialog_set_response_sensitive (GTK_DIALOG (csdd->dialog), GTK_RESPONSE_OK, FALSE);
-}
-
-static gboolean
-copy_source (CopySourceDialogData *csdd)
-{
- char *uri;
- ECal *source_client, *dest_client;
- GList *obj_list = NULL;
- gboolean result = FALSE;
-
- if (!csdd->selected_source)
- return FALSE;
-
- /* open the source */
- source_client = e_cal_new (csdd->orig_source, csdd->obj_type);
- if (!e_cal_open (source_client, TRUE, NULL)) {
- g_object_unref (source_client);
- g_warning (G_STRLOC ": Could not open source");
- return FALSE;
- }
-
- /* open the destination */
- dest_client = e_cal_new (csdd->selected_source, csdd->obj_type);
- if (!e_cal_open (dest_client, FALSE, NULL)) {
- g_object_unref (dest_client);
- g_object_unref (source_client);
- g_warning (G_STRLOC ": Could not open destination");
- return FALSE;
- }
-
- if (e_cal_get_object_list (source_client, "#t", &obj_list, NULL)) {
- GList *l;
- const char *uid;
- icalcomponent *icalcomp;
-
- for (l = obj_list; l != NULL; l = l->next) {
- /* FIXME: process recurrences */
- /* FIXME: process errors */
- if (e_cal_get_object (dest_client, icalcomponent_get_uid (l->data), NULL,
- &icalcomp, NULL)) {
- e_cal_modify_object (dest_client, icalcomp, CALOBJ_MOD_ALL, NULL);
- } else {
- e_cal_create_object (dest_client, l->data, (char **) &uid, NULL);
- g_free ((gpointer) uid);
- }
- }
-
- e_cal_free_object_list (obj_list);
- }
-
- return result;
-}
-
-/**
- * copy_source_dialog
- *
- * Implements the Copy command for sources, allowing the user to select a target
- * source to copy to.
- */
-gboolean
-copy_source_dialog (GtkWindow *parent, ESource *source, CalObjType obj_type)
-{
- CopySourceDialogData csdd;
- gboolean result = FALSE;
- const char *gconf_key;
- GtkWidget *label;
-
- g_return_val_if_fail (E_IS_SOURCE (source), FALSE);
-
- if (obj_type == CALOBJ_TYPE_EVENT)
- gconf_key = "/apps/evolution/calendar/sources";
- else if (obj_type == CALOBJ_TYPE_TODO)
- gconf_key = "/apps/evolution/tasks/sources";
- else
- return FALSE;
-
- csdd.orig_source = source;
- csdd.selected_source = NULL;
- csdd.obj_type = obj_type;
-
- /* create the dialog */
- csdd.dialog = gtk_dialog_new_with_buttons (_("Copy"), parent, 0,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_OK, GTK_RESPONSE_OK,
- NULL);
- gtk_dialog_set_response_sensitive (GTK_DIALOG (csdd.dialog), GTK_RESPONSE_OK, FALSE);
-
- label = gtk_label_new (_("Select destination source"));
- gtk_widget_show (label);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (csdd.dialog)->vbox), label, FALSE, FALSE, 6);
-
- csdd.conf_client = gconf_client_get_default ();
- csdd.source_list = e_source_list_new_for_gconf (csdd.conf_client, gconf_key);
- csdd.selector = e_source_option_menu_new (csdd.source_list);
- g_signal_connect (G_OBJECT (csdd.selector), "source_selected",
- G_CALLBACK (source_selected_cb), &csdd);
- gtk_widget_show (csdd.selector);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (csdd.dialog)->vbox), csdd.selector, FALSE, FALSE, 6);
-
- if (gtk_dialog_run (GTK_DIALOG (csdd.dialog)) == GTK_RESPONSE_OK) {
- result = copy_source (&csdd);
- }
-
- /* free memory */
- g_object_unref (csdd.conf_client);
- g_object_unref (csdd.source_list);
- gtk_widget_destroy (csdd.dialog);
-
- return result;
-}
diff --git a/calendar/gui/dialogs/copy-source-dialog.h b/calendar/gui/dialogs/copy-source-dialog.h
deleted file mode 100644
index e3c750d8a0..0000000000
--- a/calendar/gui/dialogs/copy-source-dialog.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Evolution calendar - Copy source dialog
- *
- * Copyright (C) 2003 Novell, Inc.
- *
- * Author: Rodrigo Moya <rodrigo@ximian.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#ifndef COPY_SOURCE_DIALOG_H
-#define COPY_SOURCE_DIALOG_H
-
-#include <gtk/gtkwindow.h>
-#include <libedataserver/e-source.h>
-#include <libecal/e-cal.h>
-#include <libecal/e-cal-util.h>
-
-gboolean copy_source_dialog (GtkWindow *parent, ESource *source, CalObjType obj_type);
-
-#endif
diff --git a/calendar/gui/dialogs/delete-comp.c b/calendar/gui/dialogs/delete-comp.c
deleted file mode 100644
index c4f9e5dc3d..0000000000
--- a/calendar/gui/dialogs/delete-comp.c
+++ /dev/null
@@ -1,159 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <gtk/gtkstock.h>
-#include <gtk/gtkmessagedialog.h>
-#include <libgnome/gnome-i18n.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.
- * @consider_as_untitled: If deleting more than one component, this is ignored.
- * Otherwise, whether to consider the component as not having a summary; if
- * FALSE then the component's summary string will be used.
- * @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 (ECalComponent *comp,
- gboolean consider_as_untitled,
- int n_comps, ECalComponentVType vtype,
- GtkWidget *widget)
-{
- char *str;
- GtkWidget *dialog;
- int ret;
-
- if (comp) {
- g_return_val_if_fail (E_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 != E_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) {
- ECalComponentText summary;
- char *tmp;
-
- vtype = e_cal_component_get_vtype (comp);
-
- if (!consider_as_untitled) {
- e_cal_component_get_summary (comp, &summary);
- tmp = g_strdup (summary.value);
- } else
- tmp = NULL;
-
- switch (vtype) {
- case E_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 E_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 E_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 E_CAL_COMPONENT_EVENT:
- str = g_strdup_printf (_("Are you sure you want to delete "
- "%d appointments?"), n_comps);
- break;
-
- case E_CAL_COMPONENT_TODO:
- str = g_strdup_printf (_("Are you sure you want to delete "
- "%d tasks?"), n_comps);
- break;
-
- case E_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 = gtk_message_dialog_new ((GtkWindow *)gtk_widget_get_toplevel (widget),
- 0, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, "%s", str);
- g_free (str);
- ret = gtk_dialog_run ((GtkDialog *)dialog) == GTK_RESPONSE_YES;
- gtk_widget_destroy (dialog);
-
- return ret;
-}
diff --git a/calendar/gui/dialogs/delete-comp.h b/calendar/gui/dialogs/delete-comp.h
deleted file mode 100644
index f8773c25d0..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 <libecal/e-cal-component.h>
-
-gboolean delete_component_dialog (ECalComponent *comp,
- gboolean consider_as_untitled,
- int n_comps, ECalComponentVType vtype,
- GtkWidget *widget);
-
-#endif
diff --git a/calendar/gui/dialogs/delete-error.c b/calendar/gui/dialogs/delete-error.c
deleted file mode 100644
index cb076885c1..0000000000
--- a/calendar/gui/dialogs/delete-error.c
+++ /dev/null
@@ -1,109 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <gtk/gtkmessagedialog.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-uidefs.h>
-#include "delete-error.h"
-
-
-
-/**
- * delete_error_dialog:
- *
- * Shows any applicable error messages as the result of deleting and object
- *
- **/
-void
-delete_error_dialog (GError *error, ECalComponentVType vtype)
-{
- GtkWidget *dialog;
- const char *str;
-
- if (!error)
- return;
-
- switch (error->code) {
- case E_CALENDAR_STATUS_CORBA_EXCEPTION:
- switch (vtype) {
- case E_CAL_COMPONENT_EVENT:
- str = _("The event could not be deleted due to a corba error");
- break;
- case E_CAL_COMPONENT_TODO:
- str = _("The task could not be deleted due to a corba error");
- break;
- case E_CAL_COMPONENT_JOURNAL:
- str = _("The journal entry could not be deleted due to a corba error");
- break;
- default:
- str = _("The item could not be deleted due to a corba error");
- break;
- }
- break;
- case E_CALENDAR_STATUS_PERMISSION_DENIED:
- switch (vtype) {
- case E_CAL_COMPONENT_EVENT:
- str = _("The event could not be deleted because permission was denied");
- break;
- case E_CAL_COMPONENT_TODO:
- str = _("The task could not be deleted because permission was denied");
- break;
- case E_CAL_COMPONENT_JOURNAL:
- str = _("The journal entry could not be deleted because permission was denied");
- break;
- default:
- str = _("The item could not be deleted because permission was denied");
- break;
- }
- break;
- case E_CALENDAR_STATUS_OTHER_ERROR:
- switch (vtype) {
- case E_CAL_COMPONENT_EVENT:
- str = _("The event could not be deleted due to an error");
- break;
- case E_CAL_COMPONENT_TODO:
- str = _("The task could not be deleted due to an error");
- break;
- case E_CAL_COMPONENT_JOURNAL:
- str = _("The journal entry could not be deleted due to an error");
- break;
- default:
- str = _("The item could not be deleted due to an error");
- break;
- }
- break;
- case E_CALENDAR_STATUS_OK:
- case E_CALENDAR_STATUS_OBJECT_NOT_FOUND:
- default:
- /* If not found, we don't care - its gone anyhow */
- return;
- }
-
- dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK, str);
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
-}
diff --git a/calendar/gui/dialogs/delete-error.h b/calendar/gui/dialogs/delete-error.h
deleted file mode 100644
index 68c132e479..0000000000
--- a/calendar/gui/dialogs/delete-error.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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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_ERROR_H
-#define DELETE_ERROR_H
-
-#include <glib.h>
-#include <libecal/e-cal.h>
-#include <libecal/e-cal-component.h>
-
-void delete_error_dialog (GError *error, ECalComponentVType vtype);
-
-#endif
diff --git a/calendar/gui/dialogs/e-delegate-dialog.c b/calendar/gui/dialogs/e-delegate-dialog.c
deleted file mode 100644
index 1a33ca194d..0000000000
--- a/calendar/gui/dialogs/e-delegate-dialog.c
+++ /dev/null
@@ -1,322 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <bonobo-activation/bonobo-activation.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 <libical/ical.h>
-#include <glade/glade.h>
-#include <gal/util/e-util.h>
-#include <widgets/misc/e-map.h>
-#include <addressbook/util/eab-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:" BASE_VERSION
-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_finalize (GObject *object);
-
-static gboolean get_widgets (EDelegateDialog *edd);
-static void addressbook_clicked_cb (GtkWidget *widget, gpointer data);
-
-static GtkObjectClass *parent_class;
-
-E_MAKE_TYPE (e_delegate_dialog, "EDelegateDialog", EDelegateDialog, e_delegate_dialog_class_init,
- e_delegate_dialog_init, G_TYPE_OBJECT);
-
-/* Class initialization function for the event editor */
-static void
-e_delegate_dialog_class_init (EDelegateDialogClass *class)
-{
- GObjectClass *gobject_class;
-
- gobject_class = (GObjectClass *) class;
-
- parent_class = g_type_class_ref (G_TYPE_OBJECT);
-
- gobject_class->finalize = e_delegate_dialog_finalize;
-}
-
-/* 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_finalize (GObject *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 (G_OBJECT_CLASS (parent_class)->finalize)
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
-}
-
-
-EDelegateDialog *
-e_delegate_dialog_construct (EDelegateDialog *edd, const char *name, const char *address)
-{
- EDelegateDialogPrivate *priv;
- EABDestination *dest;
- EABDestination *destv[2] = {NULL, NULL};
- Bonobo_Control corba_control;
- CORBA_Environment ev;
- char *str;
-
- 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, 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 = bonobo_activation_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, 6);
-
- dest = eab_destination_new ();
- destv[0] = dest;
- if (name != NULL && *name)
- eab_destination_set_name (dest, name);
- if (address != NULL && *address)
- eab_destination_set_email (dest, address);
- str = eab_destination_exportv(destv);
- bonobo_widget_set_property (BONOBO_WIDGET (priv->entry), "destinations", TC_CORBA_string, str, NULL);
- g_free(str);
- g_object_unref (dest);
-
- g_signal_connect((priv->addressbook), "clicked",
- G_CALLBACK (addressbook_clicked_cb), edd);
-
- return edd;
-
- error:
-
- g_object_unref (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 (g_object_new (E_TYPE_DELEGATE_DIALOG, NULL));
- return e_delegate_dialog_construct (E_DELEGATE_DIALOG (edd), name, address);
-}
-
-char *
-e_delegate_dialog_get_delegate (EDelegateDialog *edd)
-{
- EDelegateDialogPrivate *priv;
- EABDestination **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", TC_CORBA_string, &string, NULL);
- destv = eab_destination_importv (string);
-
- if (destv && destv[0] != NULL) {
- g_free (priv->address);
- priv->address = g_strdup (eab_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;
- EABDestination **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", TC_CORBA_string, &string, NULL);
- destv = eab_destination_importv (string);
-
- g_message ("importv: [%s]", string);
-
- if (destv && destv[0] != NULL) {
- g_free (priv->name);
- priv->name = g_strdup (eab_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 f08c03ad1d..0000000000
--- a/calendar/gui/dialogs/e-delegate-dialog.glade
+++ /dev/null
@@ -1,113 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-<requires lib="gnome"/>
-
-<widget class="GtkDialog" id="delegate-dialog">
- <property name="title" translatable="yes">Enter Delegate</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="has_separator">True</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">8</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="cancel-button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">-6</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="ok-button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">-5</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="delegate-hbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Delegate To:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="addressbook">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Addressbook...</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/calendar/gui/dialogs/e-delegate-dialog.h b/calendar/gui/dialogs/e-delegate-dialog.h
deleted file mode 100644
index 2acc853e0a..0000000000
--- a/calendar/gui/dialogs/e-delegate-dialog.h
+++ /dev/null
@@ -1,72 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 <gtk/gtkwidget.h>
-
-
-
-#define E_TYPE_DELEGATE_DIALOG (e_delegate_dialog_get_type ())
-#define E_DELEGATE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_DELEGATE_DIALOG, EDelegateDialog))
-#define E_DELEGATE_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_DELEGATE_DIALOG, \
- EDelegateDialogClass))
-#define E_IS_DELEGATE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_DELEGATE_DIALOG))
-#define E_IS_DELEGATE_DIALOG_CLASS(klass) (G_TYPE_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 ac117a0039..0000000000
--- a/calendar/gui/dialogs/event-editor.c
+++ /dev/null
@@ -1,522 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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/util/e-util.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;
-
- EMeetingStore *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_e_cal (CompEditor *editor, ECal *client);
-static void event_editor_edit_comp (CompEditor *editor, ECalComponent *comp);
-static gboolean event_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method);
-static void event_editor_finalize (GObject *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_change_insert_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data);
-static void model_row_delete_cb (GtkTreeModel *model, GtkTreePath *path, gpointer data);
-
-static EPixmap pixmaps [] = {
- E_PIXMAP ("/Toolbar/Actions/ActionScheduleMeeting", "schedule-meeting-24.png"),
- E_PIXMAP_END
-};
-
-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.
- **/
-
-E_MAKE_TYPE (event_editor, "EventEditor", EventEditor, event_editor_class_init,
- event_editor_init, TYPE_COMP_EDITOR);
-
-/* Class initialization function for the event editor */
-static void
-event_editor_class_init (EventEditorClass *klass)
-{
- GObjectClass *gobject_class;
- CompEditorClass *editor_class;
-
- gobject_class = (GObjectClass *) klass;
- editor_class = (CompEditorClass *) klass;
-
- parent_class = g_type_class_ref(TYPE_COMP_EDITOR);
-
- editor_class->set_e_cal = event_editor_set_e_cal;
- editor_class->edit_comp = event_editor_edit_comp;
- editor_class->send_comp = event_editor_send_comp;
-
- gobject_class->finalize = event_editor_finalize;
-}
-
-static void
-set_menu_sens (EventEditor *ee)
-{
- EventEditorPrivate *priv;
- gboolean sens, existing, user, read_only = TRUE;
-
- priv = ee->priv;
-
- existing = comp_editor_get_existing_org (COMP_EDITOR (ee));
- user = comp_editor_get_user_org (COMP_EDITOR (ee));
-
- e_cal_is_read_only (comp_editor_get_e_cal (COMP_EDITOR (ee)), &read_only, NULL);
-
- sens = priv->meeting_shown;
- comp_editor_set_ui_prop (COMP_EDITOR (ee),
- "/commands/ActionScheduleMeeting",
- "sensitive", sens || read_only ? "0" : "1");
-
- sens = priv->meeting_shown && existing && !user && !read_only;
- comp_editor_set_ui_prop (COMP_EDITOR (ee),
- "/commands/ActionRefreshMeeting",
- "sensitive", sens ? "1" : "0");
-
- sens = priv->meeting_shown && existing && user && !read_only;
- comp_editor_set_ui_prop (COMP_EDITOR (ee),
- "/commands/ActionCancelMeeting",
- "sensitive", sens? "1" : "0");
-
- comp_editor_set_ui_prop (COMP_EDITOR (ee),
- "/commands/FileSave",
- "sensitive", read_only ? "0" : "1");
- comp_editor_set_ui_prop (COMP_EDITOR (ee),
- "/commands/FileSaveAndClose",
- "sensitive", read_only ? "0" : "1");
- comp_editor_set_ui_prop (COMP_EDITOR (ee),
- "/commands/FileDelete",
- "sensitive", read_only ? "0" : "1");
-}
-
-static void
-init_widgets (EventEditor *ee)
-{
- EventEditorPrivate *priv;
-
- priv = ee->priv;
-
- g_signal_connect((priv->model), "row_changed",
- G_CALLBACK (model_row_change_insert_cb), ee);
- g_signal_connect((priv->model), "row_inserted",
- G_CALLBACK (model_row_change_insert_cb), ee);
- g_signal_connect((priv->model), "row_deleted",
- G_CALLBACK (model_row_delete_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->model = E_MEETING_STORE (e_meeting_store_new ());
- priv->meeting_shown = TRUE;
- priv->updating = FALSE;
-}
-
-EventEditor *
-event_editor_construct (EventEditor *ee, ECal *client)
-{
- EventEditorPrivate *priv;
-
- priv = ee->priv;
-
- priv->event_page = event_page_new ();
- g_object_ref (priv->event_page);
- gtk_object_sink (GTK_OBJECT (priv->event_page));
- comp_editor_append_page (COMP_EDITOR (ee),
- COMP_EDITOR_PAGE (priv->event_page),
- _("Appointment"));
-
- priv->alarm_page = alarm_page_new ();
- g_object_ref (priv->alarm_page);
- gtk_object_sink (GTK_OBJECT (priv->alarm_page));
- comp_editor_append_page (COMP_EDITOR (ee),
- COMP_EDITOR_PAGE (priv->alarm_page),
- _("Reminder"));
-
- priv->recur_page = recurrence_page_new ();
- g_object_ref (priv->recur_page);
- gtk_object_sink (GTK_OBJECT (priv->recur_page));
- comp_editor_append_page (COMP_EDITOR (ee),
- COMP_EDITOR_PAGE (priv->recur_page),
- _("Recurrence"));
-
- priv->sched_page = schedule_page_new (priv->model);
- g_object_ref (priv->sched_page);
- gtk_object_sink (GTK_OBJECT (priv->sched_page));
- comp_editor_append_page (COMP_EDITOR (ee),
- COMP_EDITOR_PAGE (priv->sched_page),
- _("Scheduling"));
-
- priv->meet_page = meeting_page_new (priv->model, client);
- g_object_ref (priv->meet_page);
- gtk_object_sink (GTK_OBJECT (priv->meet_page));
- comp_editor_append_page (COMP_EDITOR (ee),
- COMP_EDITOR_PAGE (priv->meet_page),
- _("Meeting"));
-
- comp_editor_set_e_cal (COMP_EDITOR (ee), client);
-
- comp_editor_merge_ui (COMP_EDITOR (ee), "evolution-event-editor.xml", verbs, pixmaps);
-
- init_widgets (ee);
- set_menu_sens (ee);
- gtk_window_set_default_size (GTK_WINDOW (ee), 300, 225);
-
- return ee;
-}
-
-static void
-event_editor_set_e_cal (CompEditor *editor, ECal *client)
-{
- EventEditor *ee;
- EventEditorPrivate *priv;
-
- ee = EVENT_EDITOR (editor);
- priv = ee->priv;
-
- e_meeting_store_set_e_cal (priv->model, client);
-
- if (parent_class->set_e_cal)
- parent_class->set_e_cal (editor, client);
-}
-
-static void
-event_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
-{
- EventEditor *ee;
- EventEditorPrivate *priv;
- ECalComponentOrganizer organizer;
- ECal *client;
- GSList *attendees = NULL;
-
- ee = EVENT_EDITOR (editor);
- priv = ee->priv;
-
- priv->updating = TRUE;
-
- if (parent_class->edit_comp)
- parent_class->edit_comp (editor, comp);
-
- client = comp_editor_get_e_cal (COMP_EDITOR (editor));
-
- /* Get meeting related stuff */
- e_cal_component_get_organizer (comp, &organizer);
- e_cal_component_get_attendee_list (comp, &attendees);
-
- /* Clear things up */
- e_meeting_store_remove_all_attendees (priv->model);
-
- /* Set up the 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));
- priv->meeting_shown = FALSE;
- } else {
- GSList *l;
- int row;
-
- 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"));
- }
-
- for (l = attendees; l != NULL; l = l->next) {
- ECalComponentAttendee *ca = l->data;
- EMeetingAttendee *ia;
-
- ia = E_MEETING_ATTENDEE (e_meeting_attendee_new_from_e_cal_component_attendee (ca));
-
- /* If we aren't the organizer or the attendee is just delegating, don't allow editing */
- if (!comp_editor_get_user_org (editor) || e_meeting_attendee_is_set_delto (ia))
- e_meeting_attendee_set_edit_level (ia, E_MEETING_ATTENDEE_EDIT_NONE);
- e_meeting_store_add_attendee (priv->model, ia);
-
- g_object_unref(ia);
- }
-
- /* If we aren't the organizer we can still change our own status */
- if (!comp_editor_get_user_org (editor)) {
- EAccountList *accounts;
- EAccount *account;
- EIterator *it;
-
- accounts = itip_addresses_get ();
- for (it = e_list_get_iterator((EList *)accounts);e_iterator_is_valid(it);e_iterator_next(it)) {
- EMeetingAttendee *ia;
-
- account = (EAccount*)e_iterator_get(it);
-
- ia = e_meeting_store_find_attendee (priv->model, account->id->address, &row);
- if (ia != NULL)
- e_meeting_attendee_set_edit_level (ia, E_MEETING_ATTENDEE_EDIT_STATUS);
- }
- g_object_unref(it);
- } else if (e_cal_get_organizer_must_attend (client)) {
- EMeetingAttendee *ia;
-
- ia = e_meeting_store_find_attendee (priv->model, organizer.value, &row);
- if (ia != NULL)
- e_meeting_attendee_set_edit_level (ia, E_MEETING_ATTENDEE_EDIT_NONE);
- }
-
- priv->meeting_shown = TRUE;
- }
- e_cal_component_free_attendee_list (attendees);
-
- set_menu_sens (ee);
- comp_editor_set_needs_send (COMP_EDITOR (ee), priv->meeting_shown && itip_organizer_is_user (comp, client));
-
- priv->updating = FALSE;
-}
-
-static gboolean
-event_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method)
-{
- EventEditor *ee = EVENT_EDITOR (editor);
- EventEditorPrivate *priv;
- ECalComponent *comp = NULL;
-
- priv = ee->priv;
-
- /* Don't cancel more than once or when just publishing */
- if (method == E_CAL_COMPONENT_METHOD_PUBLISH ||
- method == E_CAL_COMPONENT_METHOD_CANCEL)
- goto parent;
-
- comp = meeting_page_get_cancel_comp (priv->meet_page);
- if (comp != NULL) {
- ECal *client;
- gboolean result;
-
- client = e_meeting_store_get_e_cal (priv->model);
- result = itip_send_comp (E_CAL_COMPONENT_METHOD_CANCEL, comp, client, NULL);
- g_object_unref (comp);
-
- if (!result)
- return FALSE;
- }
-
- parent:
- if (parent_class->send_comp)
- return parent_class->send_comp (editor, method);
-
- return FALSE;
-}
-
-/* Destroy handler for the event editor */
-static void
-event_editor_finalize (GObject *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;
-
- g_object_unref (priv->event_page);
- g_object_unref (priv->alarm_page);
- g_object_unref (priv->recur_page);
- g_object_unref (priv->meet_page);
- g_object_unref (priv->sched_page);
-
- g_object_unref (priv->model);
-
- g_free (priv);
-
- if (G_OBJECT_CLASS (parent_class)->finalize)
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
-}
-
-/**
- * event_editor_new:
- * @client: a ECal
- *
- * 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 (ECal *client)
-{
- EventEditor *ee;
-
- ee = EVENT_EDITOR (g_object_new (TYPE_EVENT_EDITOR, NULL));
- return event_editor_construct (ee, client);
-}
-
-static void
-show_meeting (EventEditor *ee)
-{
- 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_changed (COMP_EDITOR (ee), priv->meeting_shown);
- comp_editor_set_needs_send (COMP_EDITOR (ee), priv->meeting_shown);
- }
-
- comp_editor_show_page (COMP_EDITOR (ee),
- COMP_EDITOR_PAGE (priv->meet_page));
-}
-
-void
-event_editor_show_meeting (EventEditor *ee)
-{
- g_return_if_fail (ee != NULL);
- g_return_if_fail (IS_EVENT_EDITOR (ee));
-
-
- show_meeting (ee);
-}
-
-static void
-schedule_meeting_cmd (GtkWidget *widget, gpointer data)
-{
- EventEditor *ee = EVENT_EDITOR (data);
-
- show_meeting (ee);
-}
-
-static void
-refresh_meeting_cmd (GtkWidget *widget, gpointer data)
-{
- EventEditor *ee = EVENT_EDITOR (data);
-
- comp_editor_send_comp (COMP_EDITOR (ee), E_CAL_COMPONENT_METHOD_REFRESH);
-}
-
-static void
-cancel_meeting_cmd (GtkWidget *widget, gpointer data)
-{
- EventEditor *ee = EVENT_EDITOR (data);
- ECalComponent *comp;
-
- comp = comp_editor_get_current_comp (COMP_EDITOR (ee));
- if (cancel_component_dialog ((GtkWindow *) ee,
- comp_editor_get_e_cal (COMP_EDITOR (ee)), comp, FALSE)) {
- comp_editor_send_comp (COMP_EDITOR (ee), E_CAL_COMPONENT_METHOD_CANCEL);
- comp_editor_delete_comp (COMP_EDITOR (ee));
- }
-}
-
-static void
-forward_cmd (GtkWidget *widget, gpointer data)
-{
- EventEditor *ee = EVENT_EDITOR (data);
-
- if (comp_editor_save_comp (COMP_EDITOR (ee), TRUE))
- comp_editor_send_comp (COMP_EDITOR (ee), E_CAL_COMPONENT_METHOD_PUBLISH);
-}
-
-static void
-model_changed (EventEditor *ee)
-{
- if (!ee->priv->updating) {
- comp_editor_set_changed (COMP_EDITOR (ee), TRUE);
- comp_editor_set_needs_send (COMP_EDITOR (ee), TRUE);
- }
-}
-
-static void
-model_row_change_insert_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
-{
- model_changed (EVENT_EDITOR (data));
-}
-
-static void
-model_row_delete_cb (GtkTreeModel *model, GtkTreePath *path, gpointer data)
-{
- model_changed (EVENT_EDITOR (data));
-}
-
diff --git a/calendar/gui/dialogs/event-editor.h b/calendar/gui/dialogs/event-editor.h
deleted file mode 100644
index 9234b8310e..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 <gtk/gtkobject.h>
-#include "comp-editor.h"
-
-
-
-#define TYPE_EVENT_EDITOR (event_editor_get_type ())
-#define EVENT_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EVENT_EDITOR, EventEditor))
-#define EVENT_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EVENT_EDITOR, EventEditorClass))
-#define IS_EVENT_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EVENT_EDITOR))
-#define IS_EVENT_EDITOR_CLASS(klass) (G_TYPE_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,
- ECal *client);
-EventEditor *event_editor_new (ECal *client);
-void event_editor_show_meeting (EventEditor *ee);
-
-
-
-#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 c943825c84..0000000000
--- a/calendar/gui/dialogs/event-page.c
+++ /dev/null
@@ -1,1371 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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/gtktextview.h>
-#include <gtk/gtktogglebutton.h>
-#include <libgnome/gnome-i18n.h>
-#include <glade/glade.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 <libecal/e-cal-time-util.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 *location;
-
- 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_frame;
- GtkWidget *show_time_as_free;
- GtkWidget *show_time_as_busy;
-
- 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;
-};
-
-
-
-static void event_page_class_init (EventPageClass *class);
-static void event_page_init (EventPage *epage);
-static void event_page_finalize (GObject *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, ECalComponent *comp);
-static gboolean event_page_fill_component (CompEditorPage *page, ECalComponent *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.
- **/
-
-E_MAKE_TYPE (event_page, "EventPage", EventPage, event_page_class_init, event_page_init,
- TYPE_COMP_EDITOR_PAGE);
-
-/* Class initialization function for the event page */
-static void
-event_page_class_init (EventPageClass *class)
-{
- CompEditorPageClass *editor_page_class;
- GObjectClass *object_class;
-
- editor_page_class = (CompEditorPageClass *) class;
- object_class = (GObjectClass *) class;
-
- parent_class = g_type_class_ref (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->finalize = event_page_finalize;
-}
-
-/* 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->location = 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_frame = NULL;
- priv->show_time_as_free = NULL;
- priv->show_time_as_busy = NULL;
- priv->categories_btn = NULL;
- priv->categories = NULL;
-
- priv->updating = FALSE;
- priv->sync_timezones = FALSE;
-}
-
-/* Destroy handler for the event page */
-static void
-event_page_finalize (GObject *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->main)
- gtk_widget_unref (priv->main);
-
- if (priv->xml) {
- g_object_unref (priv->xml);
- priv->xml = NULL;
- }
-
- g_free (priv);
- epage->priv = NULL;
-
- if (G_OBJECT_CLASS (parent_class)->finalize)
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
-}
-
-
-
-static const int classification_map[] = {
- E_CAL_COMPONENT_CLASS_PUBLIC,
- E_CAL_COMPONENT_CLASS_PRIVATE,
- E_CAL_COMPONENT_CLASS_CONFIDENTIAL,
- -1
-};
-
-static const int transparency_map[] = {
- E_CAL_COMPONENT_TRANSP_TRANSPARENT,
- E_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);
-}
-
-/* Sets the 'All Day Event' flag to the given value (without emitting signals),
- * and shows or hides the widgets as appropriate. */
-static void
-set_all_day (EventPage *epage, gboolean all_day)
-{
- EventPagePrivate *priv;
-
- priv = epage->priv;
-
- 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);
-
- /* DATE values do not have timezones, so we hide the fields. */
- 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);
- }
-}
-
-static void
-update_time (EventPage *epage, ECalComponentDateTime *start_date, ECalComponentDateTime *end_date)
-{
- EventPagePrivate *priv;
- struct icaltimetype *start_tt, *end_tt, implied_tt;
- icaltimezone *start_zone = NULL, *end_zone = NULL;
- gboolean all_day_event;
-
- priv = epage->priv;
-
- /* 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) {
- /* FIXME: Handle error better. */
- if (!e_cal_get_timezone (COMP_EDITOR_PAGE (epage)->client,
- start_date->tzid, &start_zone, NULL)) {
- g_warning ("Couldn't get timezone from server: %s",
- start_date->tzid ? start_date->tzid : "");
- }
- }
-
- end_zone = icaltimezone_get_builtin_timezone_from_tzid (end_date->tzid);
- if (!end_zone) {
- if (!e_cal_get_timezone (COMP_EDITOR_PAGE (epage)->client,
- end_date->tzid, &end_zone, NULL)) {
- /* FIXME: Handle error better. */
- g_warning ("Couldn't get timezone from server: %s",
- end_date->tzid ? end_date->tzid : "");
- }
- }
-
- /* If both times are DATE values, we set the 'All Day Event' checkbox.
- Also, if DTEND is after DTSTART, we subtract 1 day from it. */
- all_day_event = FALSE;
- start_tt = start_date->value;
- end_tt = end_date->value;
- if (!end_tt && start_tt->is_date) {
- end_tt = &implied_tt;
- *end_tt = *start_tt;
- icaltime_adjust (end_tt, 1, 0, 0, 0);
- }
-
- if (start_tt->is_date && end_tt->is_date) {
- all_day_event = TRUE;
- if (icaltime_compare_date_only (*end_tt, *start_tt) > 0) {
- icaltime_adjust (end_tt, -1, 0, 0, 0);
- }
- }
-
- set_all_day (epage, all_day_event);
-
- /* If it is an all day event, we set both timezones to the current
- timezone, so that if the user toggles the 'All Day Event' checkbox
- the event uses the current timezone rather than none at all. */
- if (all_day_event) {
- char *location = calendar_config_get_timezone ();
- start_zone = end_zone = icaltimezone_get_builtin_timezone (location);
- }
-
-
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->start_time),
- epage);
- g_signal_handlers_block_matched (priv->end_time, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, 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);
-
- /* Set the timezones, and set sync_timezones to TRUE if both timezones
- are the same. */
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->start_timezone),
- epage);
- g_signal_handlers_block_matched (priv->end_timezone, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage);
-
- 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);
-
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->start_timezone),
- epage);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->end_timezone),
- epage);
-
- priv->sync_timezones = (start_zone == end_zone) ? TRUE : FALSE;
-
-}
-
-/* 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->location, NULL);
- gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->description)), "", 0);
-
- /* Start and end times */
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->start_time),
- epage);
- g_signal_handlers_block_matched (priv->end_time, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, 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);
-
- set_all_day (epage, FALSE);
-
- /* Classification */
- e_dialog_radio_set (priv->classification_public,
- E_CAL_COMPONENT_CLASS_PRIVATE, classification_map);
-
- /* Show Time As (Transparency) */
- e_dialog_radio_set (priv->show_time_as_free,
- E_CAL_COMPONENT_TRANSP_OPAQUE, transparency_map);
-
- /* Categories */
- e_dialog_editable_set (priv->categories, NULL);
-}
-
-
-/* fill_widgets handler for the event page */
-static void
-event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
-{
- EventPage *epage;
- EventPagePrivate *priv;
- ECalComponentText text;
- ECalComponentClassification cl;
- ECalComponentTransparency transparency;
- ECalComponentDateTime start_date, end_date;
- const char *location;
- const char *categories;
- GSList *l;
-
- 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, location, description(s) */
-
- e_cal_component_get_summary (comp, &text);
- e_dialog_editable_set (priv->summary, text.value);
-
- e_cal_component_get_location (comp, &location);
- e_dialog_editable_set (priv->location, location);
-
- e_cal_component_get_description_list (comp, &l);
- if (l) {
- text = *(ECalComponentText *)l->data;
- gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->description)),
- text.value, -1);
- }
- e_cal_component_free_text_list (l);
-
- /* Start and end times */
-
- e_cal_component_get_dtstart (comp, &start_date);
- e_cal_component_get_dtend (comp, &end_date);
-
- update_time (epage, &start_date, &end_date);
-
- e_cal_component_free_datetime (&start_date);
- e_cal_component_free_datetime (&end_date);
-
- /* Classification */
-
- e_cal_component_get_classification (comp, &cl);
-
- switch (cl) {
- case E_CAL_COMPONENT_CLASS_PUBLIC:
- e_dialog_radio_set (priv->classification_public,
- E_CAL_COMPONENT_CLASS_PUBLIC,
- classification_map);
- break;
-
- case E_CAL_COMPONENT_CLASS_PRIVATE:
- e_dialog_radio_set (priv->classification_public,
- E_CAL_COMPONENT_CLASS_PRIVATE,
- classification_map);
- break;
-
- case E_CAL_COMPONENT_CLASS_CONFIDENTIAL:
- e_dialog_radio_set (priv->classification_public,
- E_CAL_COMPONENT_CLASS_CONFIDENTIAL,
- classification_map);
- break;
-
- default:
- /* default to PUBLIC */
- e_dialog_radio_set (priv->classification_public,
- E_CAL_COMPONENT_CLASS_PUBLIC,
- classification_map);
- break;
- }
-
-
- /* Show Time As (Transparency) */
- e_cal_component_get_transparency (comp, &transparency);
- switch (transparency) {
- case E_CAL_COMPONENT_TRANSP_TRANSPARENT:
- e_dialog_radio_set (priv->show_time_as_free,
- E_CAL_COMPONENT_TRANSP_TRANSPARENT,
- transparency_map);
- break;
-
- default:
- e_dialog_radio_set (priv->show_time_as_free,
- E_CAL_COMPONENT_TRANSP_OPAQUE,
- transparency_map);
- break;
- }
- if (e_cal_get_static_capability (page->client, CAL_STATIC_CAPABILITY_NO_TRANSPARENCY))
- gtk_widget_hide (priv->show_time_frame);
- else
- gtk_widget_show (priv->show_time_frame);
-
- /* Categories */
- e_cal_component_get_categories (comp, &categories);
- e_dialog_editable_set (priv->categories, categories);
-
- priv->updating = FALSE;
-}
-
-/* fill_component handler for the event page */
-static gboolean
-event_page_fill_component (CompEditorPage *page, ECalComponent *comp)
-{
- EventPage *epage;
- EventPagePrivate *priv;
- ECalComponentDateTime start_date, end_date;
- struct icaltimetype start_tt, end_tt;
- gboolean all_day_event, start_date_set, end_date_set;
- char *cat, *str;
- ECalComponentClassification classif;
- ECalComponentTransparency transparency;
- GtkTextBuffer *text_buffer;
- GtkTextIter text_iter_start, text_iter_end;
-
- epage = EVENT_PAGE (page);
- priv = epage->priv;
- text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->description));
-
- /* Summary */
-
- str = e_dialog_editable_get (priv->summary);
- if (!str || strlen (str) == 0)
- e_cal_component_set_summary (comp, NULL);
- else {
- ECalComponentText text;
-
- text.value = str;
- text.altrep = NULL;
-
- e_cal_component_set_summary (comp, &text);
- }
-
- if (str)
- g_free (str);
-
- /* Location */
-
- str = e_dialog_editable_get (priv->location);
- if (!str || strlen (str) == 0)
- e_cal_component_set_location (comp, NULL);
- else
- e_cal_component_set_location (comp, str);
-
- if (str)
- g_free (str);
-
- /* Description */
-
- gtk_text_buffer_get_start_iter (text_buffer, &text_iter_start);
- gtk_text_buffer_get_end_iter (text_buffer, &text_iter_end);
- str = gtk_text_buffer_get_text (text_buffer, &text_iter_start, &text_iter_end, FALSE);
-
- if (!str || strlen (str) == 0)
- e_cal_component_set_description_list (comp, NULL);
- else {
- GSList l;
- ECalComponentText text;
-
- text.value = str;
- text.altrep = NULL;
- l.data = &text;
- l.next = NULL;
-
- e_cal_component_set_description_list (comp, &l);
- }
-
- if (str)
- g_free (str);
-
- /* Dates */
-
- start_tt = icaltime_null_time ();
- start_date.value = &start_tt;
- start_date.tzid = NULL;
-
- end_tt = icaltime_null_time ();
- end_date.value = &end_tt;
- end_date.tzid = NULL;
-
- if (!e_date_edit_date_is_valid (E_DATE_EDIT (priv->start_time))) {
- comp_editor_page_display_validation_error (page, _("Start date is wrong"), priv->start_time);
- return FALSE;
- }
- start_date_set = e_date_edit_get_date (E_DATE_EDIT (priv->start_time),
- &start_tt.year,
- &start_tt.month,
- &start_tt.day);
- g_assert (start_date_set);
-
- if (!e_date_edit_date_is_valid (E_DATE_EDIT (priv->end_time))) {
- comp_editor_page_display_validation_error (page, _("End date is wrong"), priv->end_time);
- return FALSE;
- }
- end_date_set = e_date_edit_get_date (E_DATE_EDIT (priv->end_time),
- &end_tt.year,
- &end_tt.month,
- &end_tt.day);
- g_assert (end_date_set);
-
- /* If the all_day toggle is set, we use DATE values for DTSTART and
- DTEND. If not, we fetch the hour & minute from the widgets. */
- all_day_event = e_dialog_toggle_get (priv->all_day_event);
-
- if (all_day_event) {
- start_tt.is_date = TRUE;
- end_tt.is_date = TRUE;
-
- /* We have to add 1 day to DTEND, as it is not inclusive. */
- icaltime_adjust (&end_tt, 1, 0, 0, 0);
- } else {
- icaltimezone *start_zone, *end_zone;
-
- if (!e_date_edit_time_is_valid (E_DATE_EDIT (priv->start_time))) {
- comp_editor_page_display_validation_error (page, _("Start time is wrong"), priv->start_time);
- return FALSE;
- }
- e_date_edit_get_time_of_day (E_DATE_EDIT (priv->start_time),
- &start_tt.hour,
- &start_tt.minute);
- if (!e_date_edit_time_is_valid (E_DATE_EDIT (priv->end_time))) {
- comp_editor_page_display_validation_error (page, _("End time is wrong"), priv->end_time);
- return FALSE;
- }
- e_date_edit_get_time_of_day (E_DATE_EDIT (priv->end_time),
- &end_tt.hour,
- &end_tt.minute);
- start_zone = e_timezone_entry_get_timezone (E_TIMEZONE_ENTRY (priv->start_timezone));
- start_date.tzid = icaltimezone_get_tzid (start_zone);
- end_zone = e_timezone_entry_get_timezone (E_TIMEZONE_ENTRY (priv->end_timezone));
- end_date.tzid = icaltimezone_get_tzid (end_zone);
- }
-
- e_cal_component_set_dtstart (comp, &start_date);
- e_cal_component_set_dtend (comp, &end_date);
-
-
- /* Categories */
-
- cat = e_dialog_editable_get (priv->categories);
- str = comp_editor_strip_categories (cat);
- if (cat)
- g_free (cat);
-
- e_cal_component_set_categories (comp, str);
-
- if (str)
- g_free (str);
-
- /* Classification */
-
- classif = e_dialog_radio_get (priv->classification_public,
- classification_map);
- e_cal_component_set_classification (comp, classif);
-
- /* Show Time As (Transparency) */
-
- transparency = e_dialog_radio_get (priv->show_time_as_free,
- transparency_map);
- e_cal_component_set_transparency (comp, transparency);
-
- return TRUE;
-}
-
-/* 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)
-{
- update_time (EVENT_PAGE (page), dates->start, dates->end);
-}
-
-
-
-/* Gets the widgets from the XML file and returns if they are all available. */
-static gboolean
-get_widgets (EventPage *epage)
-{
- CompEditorPage *page = COMP_EDITOR_PAGE (epage);
- EventPagePrivate *priv;
- GSList *accel_groups;
- GtkWidget *toplevel;
-
- priv = epage->priv;
-
-#define GW(name) glade_xml_get_widget (priv->xml, name)
-
- priv->main = GW ("event-page");
- if (!priv->main)
- return FALSE;
-
- /* Get the GtkAccelGroup from the toplevel window, so we can install
- it when the notebook page is mapped. */
- toplevel = gtk_widget_get_toplevel (priv->main);
- accel_groups = gtk_accel_groups_from_object (G_OBJECT (toplevel));
- if (accel_groups) {
- page->accel_group = accel_groups->data;
- gtk_accel_group_ref (page->accel_group);
- }
-
- gtk_widget_ref (priv->main);
- gtk_container_remove (GTK_CONTAINER (priv->main->parent), priv->main);
-
- priv->summary = GW ("general-summary");
- priv->location = GW ("location");
-
- /* Glade's visibility flag doesn't seem to work for custom widgets */
- priv->start_time = GW ("start-time");
- gtk_widget_show (priv->start_time);
- priv->end_time = GW ("end-time");
- gtk_widget_show (priv->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_frame = GW ("show-time-frame");
- priv->show_time_as_free = GW ("show-time-as-free");
- priv->show_time_as_busy = GW ("show-time-as-busy");
-
- priv->categories_btn = GW ("categories-button");
- priv->categories = GW ("categories");
-
-#undef GW
-
- return (priv->summary
- && priv->location
- && 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_frame
- && priv->show_time_as_free
- && priv->show_time_as_busy
- && 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);
-}
-
-
-/* Note that this assumes that the start_tt and end_tt passed to it are the
- dates visible to the user. For DATE values, we have to add 1 day to the
- end_tt before emitting the signal. */
-static void
-notify_dates_changed (EventPage *epage, struct icaltimetype *start_tt,
- struct icaltimetype *end_tt)
-{
- EventPagePrivate *priv;
- CompEditorPageDates dates;
- ECalComponentDateTime start_dt, end_dt;
- gboolean all_day_event;
- icaltimezone *start_zone = NULL, *end_zone = NULL;
-
- 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) {
- /* The actual DTEND is 1 day after the displayed date for
- DATE values. */
- icaltime_adjust (end_tt, 1, 0, 0, 0);
- } 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);
-}
-
-
-static gboolean
-check_start_before_end (struct icaltimetype *start_tt,
- icaltimezone *start_zone,
- struct icaltimetype *end_tt,
- icaltimezone *end_zone,
- gboolean adjust_end_time)
-{
- struct icaltimetype end_tt_copy;
- int cmp;
-
- /* 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. */
- *end_tt = *start_tt;
- icaltime_adjust (end_tt, 0, 1, 0, 0);
- icaltimezone_convert_time (end_tt, start_zone,
- end_zone);
- } else {
- /* Modify the start time, to be the end - 1 hour. */
- *start_tt = *end_tt;
- icaltime_adjust (start_tt, 0, -1, 0, 0);
- icaltimezone_convert_time (start_tt, end_zone,
- start_zone);
- }
- return TRUE;
- }
-
- return FALSE;
-}
-
-
-/*
- * This is called whenever the start or end dates or timezones is changed.
- * It makes sure that the start date < end date. 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();
- gboolean date_set, all_day_event;
- gboolean set_start_date = FALSE, set_end_date = FALSE;
- 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);
- 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);
- g_assert (date_set);
-
- if (all_day_event) {
- /* All Day Events are simple. We just compare the dates and if
- start > end we copy one of them to the other. */
- int cmp = icaltime_compare_date_only (start_tt, end_tt);
- if (cmp > 0) {
- if (adjust_end_time) {
- end_tt = start_tt;
- set_end_date = TRUE;
- } else {
- start_tt = end_tt;
- set_start_date = TRUE;
- }
- }
-
- start_tt.is_date = TRUE;
- end_tt.is_date = TRUE;
- } else {
- /* For DATE-TIME events, we have to convert to the same
- timezone before comparing. */
- e_date_edit_get_time_of_day (E_DATE_EDIT (priv->start_time),
- &start_tt.hour,
- &start_tt.minute);
- e_date_edit_get_time_of_day (E_DATE_EDIT (priv->end_time),
- &end_tt.hour,
- &end_tt.minute);
-
- 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));
-
- if (check_start_before_end (&start_tt, start_zone,
- &end_tt, end_zone,
- adjust_end_time)) {
- if (adjust_end_time)
- set_end_date = TRUE;
- else
- set_start_date = TRUE;
- }
- }
-
-
- if (set_start_date) {
- g_signal_handlers_block_matched (priv->start_time, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, 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);
- g_signal_handlers_unblock_matched (priv->start_time, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage);
- }
-
- if (set_end_date) {
- g_signal_handlers_block_matched (priv->end_time, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, 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);
- g_signal_handlers_unblock_matched (priv->end_time, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, 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 round it down to the previous day, so the
- * event times stay the same.
- *
- * When the all_day_toggle is turned off, then if the event is within
- * one day, we set the event start to the start of the working day,
- * and set the event end to one hour after it. If the event is longer
- * than one day, we set the event end to the end of the day it is on,
- * so that the actual event times remain the same.
- *
- * This may need tweaking to work well with different timezones used
- * in the event start & end.
- */
- all_day = GTK_TOGGLE_BUTTON (toggle)->active;
-
- set_all_day (epage, all_day);
-
- 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) {
- /* Round down to the start of the day. */
- start_tt.hour = 0;
- start_tt.minute = 0;
- start_tt.second = 0;
- start_tt.is_date = TRUE;
-
- /* Round down to the start of the day, or the start of the
- previous day if it is midnight. */
- icaltime_adjust (&end_tt, 0, 0, 0, -1);
- end_tt.hour = 0;
- end_tt.minute = 0;
- end_tt.second = 0;
- end_tt.is_date = TRUE;
- } else {
- icaltimezone *start_zone, *end_zone;
-
- if (end_tt.year == start_tt.year
- && end_tt.month == start_tt.month
- && end_tt.day == start_tt.day) {
- /* The event is within one day, so we set the event
- start to the start of the working day, and the end
- to one hour later. */
- start_tt.hour = calendar_config_get_day_start_hour ();
- start_tt.minute = calendar_config_get_day_start_minute ();
- start_tt.second = 0;
-
- end_tt = start_tt;
- icaltime_adjust (&end_tt, 0, 1, 0, 0);
- } else {
- /* The event is longer than 1 day, so we keep exactly
- the same times, just using DATE-TIME rather than
- DATE. */
- icaltime_adjust (&end_tt, 1, 0, 0, 0);
- }
-
- /* Make sure that end > start using the timezones. */
- 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));
- check_start_before_end (&start_tt, start_zone,
- &end_tt, end_zone,
- TRUE);
- }
-
- 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);
-
- /* Notify upstream */
- notify_dates_changed (epage, &start_tt, &end_tt);
-}
-
-/* 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;
- GtkTextBuffer *text_buffer;
- 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 */
- g_signal_connect((priv->summary), "changed",
- G_CALLBACK (summary_changed_cb), epage);
-
- /* Description */
- text_buffer = gtk_text_buffer_new (NULL);
- gtk_text_view_set_buffer (GTK_TEXT_VIEW (priv->description), text_buffer);
- g_object_unref (text_buffer);
-
- gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (priv->description), GTK_WRAP_WORD);
-
- /* Start and end times */
- g_signal_connect((priv->start_time), "changed",
- G_CALLBACK (date_changed_cb), epage);
- g_signal_connect((priv->end_time), "changed",
- G_CALLBACK (date_changed_cb), epage);
-
- g_signal_connect((priv->start_timezone), "changed",
- G_CALLBACK (start_timezone_changed_cb), epage);
- g_signal_connect((priv->end_timezone), "changed",
- G_CALLBACK (end_timezone_changed_cb), epage);
-
- g_signal_connect((priv->all_day_event), "toggled",
- G_CALLBACK (all_day_event_toggled_cb), epage);
-
- /* Categories button */
- g_signal_connect((priv->categories_btn), "clicked",
- G_CALLBACK (categories_clicked_cb), epage);
-
- /* Connect the default signal handler to use to make sure we notify
- * upstream of changes to the widget values.
- */
-
- /* Belongs to priv->description */
- g_signal_connect((text_buffer), "changed",
- G_CALLBACK (field_changed_cb), epage);
-
- g_signal_connect((priv->summary), "changed",
- G_CALLBACK (field_changed_cb), epage);
- g_signal_connect((priv->location), "changed",
- G_CALLBACK (field_changed_cb), epage);
- g_signal_connect((priv->start_time), "changed",
- G_CALLBACK (field_changed_cb), epage);
- g_signal_connect((priv->end_time), "changed",
- G_CALLBACK (field_changed_cb), epage);
- g_signal_connect((priv->start_timezone), "changed",
- G_CALLBACK (field_changed_cb), epage);
- g_signal_connect((priv->end_timezone), "changed",
- G_CALLBACK (field_changed_cb), epage);
- g_signal_connect((priv->all_day_event), "toggled",
- G_CALLBACK (field_changed_cb), epage);
- g_signal_connect((priv->classification_public),
- "toggled", G_CALLBACK (field_changed_cb),
- epage);
- g_signal_connect((priv->classification_private),
- "toggled", G_CALLBACK (field_changed_cb),
- epage);
- g_signal_connect((priv->classification_confidential),
- "toggled", G_CALLBACK (field_changed_cb),
- epage);
- g_signal_connect((priv->show_time_as_free),
- "toggled", G_CALLBACK (field_changed_cb),
- epage);
- g_signal_connect((priv->show_time_as_busy),
- "toggled", G_CALLBACK (field_changed_cb),
- epage);
- g_signal_connect((priv->categories), "changed",
- G_CALLBACK (field_changed_cb), epage);
-
- /* 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, 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 = g_object_new (TYPE_EVENT_PAGE, NULL);
- if (!event_page_construct (epage)) {
- g_object_unref (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)
-{
- GtkWidget *w;
-
- w = e_timezone_entry_new ();
- gtk_widget_show (w);
- return w;
-}
diff --git a/calendar/gui/dialogs/event-page.glade b/calendar/gui/dialogs/event-page.glade
deleted file mode 100644
index b59eb61e86..0000000000
--- a/calendar/gui/dialogs/event-page.glade
+++ /dev/null
@@ -1,601 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-
-<widget class="GtkWindow" id="event-toplevel">
- <property name="title" translatable="yes">window1</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
-
- <child>
- <widget class="GtkVBox" id="event-page">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkTable" id="table11">
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label56">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Su_mmary:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">general-summary</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="general-summary">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label61">
- <property name="visible">True</property>
- <property name="label" translatable="yes">L_ocation:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">location</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="location">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frame31">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkTable" id="table12">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">4</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label57">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Start time:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">start-time</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label58">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_End time:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">end-time</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="start-time">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="creation_function">make_date_edit</property>
- <property name="string1"></property>
- <property name="string2"></property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Tue, 16 May 2000 19:11:05 GMT</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="end-time">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="creation_function">make_date_edit</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Tue, 16 May 2000 19:11:10 GMT</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="end-timezone">
- <property name="visible">True</property>
- <property name="creation_function">make_timezone_entry</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Mon, 18 Jun 2001 23:51:40 GMT</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options"></property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="start-timezone">
- <property name="visible">True</property>
- <property name="creation_function">make_timezone_entry</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Mon, 18 Jun 2001 23:51:34 GMT</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="xalign">1</property>
- <property name="yalign">7.45058e-09</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
-
- <child>
- <widget class="GtkCheckButton" id="all-day-event">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">A_ll day event</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">2</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label62">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Date &amp; Time</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow12">
- <property name="visible">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTextView" id="description">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="justification">GTK_JUSTIFY_LEFT</property>
- <property name="wrap_mode">GTK_WRAP_WORD</property>
- <property name="cursor_visible">True</property>
- <property name="pixels_above_lines">0</property>
- <property name="pixels_below_lines">0</property>
- <property name="pixels_inside_wrap">0</property>
- <property name="left_margin">0</property>
- <property name="right_margin">0</property>
- <property name="indent">0</property>
- <property name="text" translatable="yes"></property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox54">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkFrame" id="frame32">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkHBox" id="hbox52">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkRadioButton" id="classification-public">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Pu_blic</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">True</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkRadioButton" id="classification-private">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Pri_vate</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">classification-public</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkRadioButton" id="classification-confidential">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Co_nfidential</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">classification-public</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label63">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Classification</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="show-time-frame">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkHBox" id="hbox55">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkRadioButton" id="show-time-as-free">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">F_ree</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkRadioButton" id="show-time-as-busy">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">B_usy</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">show-time-as-free</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label64">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Show Time As</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox53">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkButton" id="categories-button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Ca_tegories...</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="categories">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/calendar/gui/dialogs/event-page.h b/calendar/gui/dialogs/event-page.h
deleted file mode 100644
index a21f084e01..0000000000
--- a/calendar/gui/dialogs/event-page.h
+++ /dev/null
@@ -1,61 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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"
-
-G_BEGIN_DECLS
-
-
-
-#define TYPE_EVENT_PAGE (event_page_get_type ())
-#define EVENT_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EVENT_PAGE, EventPage))
-#define EVENT_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EVENT_PAGE, EventPageClass))
-#define IS_EVENT_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EVENT_PAGE))
-#define IS_EVENT_PAGE_CLASS(klass) (G_TYPE_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);
-
-
-
-G_END_DECLS
-
-#endif
diff --git a/calendar/gui/dialogs/meeting-page.c b/calendar/gui/dialogs/meeting-page.c
deleted file mode 100644
index fe4ade9363..0000000000
--- a/calendar/gui/dialogs/meeting-page.c
+++ /dev/null
@@ -1,833 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <gtk/gtkcombo.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtktogglebutton.h>
-#include <gtk/gtkvbox.h>
-#include <gtk/gtkwindow.h>
-#include <libgnome/gnome-i18n.h>
-#include <glade/glade.h>
-#include <libgnomeui/gnome-stock-icons.h>
-#include <gal/util/e-util.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-utils.h>
-#include <e-util/e-dialog-widgets.h>
-
-#include "../calendar-component.h"
-#include "../e-meeting-attendee.h"
-#include "../e-meeting-store.h"
-#include "../e-meeting-list-view.h"
-#include "../itip-utils.h"
-#include "comp-editor-util.h"
-#include "e-delegate-dialog.h"
-#include "meeting-page.h"
-
-
-/* Private part of the MeetingPage structure */
-struct _MeetingPagePrivate {
- /* Lists of attendees */
- GPtrArray *deleted_attendees;
-
- /* To use in case of cancellation */
- ECalComponent *comp;
-
- /* List of identities */
- EAccountList *accounts;
- EMeetingAttendee *ia;
- char *default_address;
-
- /* Glade XML data */
- GladeXML *xml;
-
- /* Widgets from the Glade file */
- GtkWidget *main;
- GtkWidget *organizer_table;
- GtkWidget *organizer;
- GtkWidget *existing_organizer_table;
- GtkWidget *existing_organizer;
- GtkWidget *existing_organizer_btn;
- GtkWidget *invite;
-
- /* ListView stuff */
- EMeetingStore *model;
- EMeetingListView *list_view;
- gint row;
-
- /* For handling who the organizer is */
- gboolean existing;
-
- gboolean updating;
-};
-
-
-
-static void meeting_page_class_init (MeetingPageClass *class);
-static void meeting_page_init (MeetingPage *mpage);
-static void meeting_page_finalize (GObject *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, ECalComponent *comp);
-static gboolean meeting_page_fill_component (CompEditorPage *page, ECalComponent *comp);
-
-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.
- **/
-
-E_MAKE_TYPE (meeting_page, "MeetingPage", MeetingPage, meeting_page_class_init, meeting_page_init,
- TYPE_COMP_EDITOR_PAGE);
-
-/* Class initialization function for the task page */
-static void
-meeting_page_class_init (MeetingPageClass *class)
-{
- CompEditorPageClass *editor_page_class;
- GObjectClass *object_class;
-
- editor_page_class = (CompEditorPageClass *) class;
- object_class = (GObjectClass *) class;
-
- parent_class = g_type_class_ref (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->finalize = meeting_page_finalize;
-}
-
-/* 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->accounts = NULL;
- priv->ia = NULL;
- priv->default_address = NULL;
-
- priv->xml = NULL;
- priv->main = NULL;
- priv->invite = NULL;
-
- priv->model = NULL;
- priv->list_view = NULL;
-
- priv->updating = FALSE;
-}
-
-static EAccount *
-get_current_account (MeetingPage *mpage)
-{
- MeetingPagePrivate *priv;
- EIterator *it;
- const char *str;
-
- priv = mpage->priv;
-
- str = gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (priv->organizer)->entry));
- if (!str)
- return NULL;
-
- for (it = e_list_get_iterator((EList *)priv->accounts); e_iterator_is_valid(it); e_iterator_next(it)) {
- EAccount *a = (EAccount *)e_iterator_get(it);
- char *full = g_strdup_printf("%s <%s>", a->id->name, a->id->address);
-
- if (!strcmp (full, str)) {
- g_free (full);
- g_object_unref (it);
-
- return a;
- }
-
- g_free (full);
- }
- g_object_unref (it);
-
- return NULL;
-}
-
-static void
-set_attendees (ECalComponent *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);
- ECalComponentAttendee *ca;
-
- ca = e_meeting_attendee_as_e_cal_component_attendee (ia);
-
- comp_attendees = g_slist_prepend (comp_attendees, ca);
-
- }
- comp_attendees = g_slist_reverse (comp_attendees);
- e_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++)
- g_object_unref (g_ptr_array_index (attendees, i));
-}
-
-/* Destroy handler for the task page */
-static void
-meeting_page_finalize (GObject *object)
-{
- MeetingPage *mpage;
- MeetingPagePrivate *priv;
-
- 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)
- g_object_unref (priv->comp);
-
- cleanup_attendees (priv->deleted_attendees);
- g_ptr_array_free (priv->deleted_attendees, TRUE);
-
- if (priv->ia != NULL)
- g_object_unref (priv->ia);
-
- g_object_unref (priv->model);
-
- if (priv->main)
- gtk_widget_unref (priv->main);
-
- if (priv->xml) {
- g_object_unref (priv->xml);
- priv->xml = NULL;
- }
-
- if (priv->default_address) {
- g_free (priv->default_address);
- priv->default_address = NULL;
- }
-
- g_free (priv);
- mpage->priv = NULL;
-
- if (G_OBJECT_CLASS (parent_class)->finalize)
- (* G_OBJECT_CLASS (parent_class)->finalize) (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), priv->default_address);
- gtk_label_set_text (GTK_LABEL (priv->existing_organizer), _("None"));
-
- gtk_widget_show (priv->organizer_table);
- gtk_widget_hide (priv->existing_organizer_table);
-
- priv->existing = FALSE;
-}
-
-/* fill_widgets handler for the meeting page */
-static void
-meeting_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
-{
- MeetingPage *mpage;
- MeetingPagePrivate *priv;
- ECalComponentOrganizer organizer;
-
- mpage = MEETING_PAGE (page);
- priv = mpage->priv;
-
- priv->updating = TRUE;
-
- /* Clean out old data */
- if (priv->comp != NULL)
- g_object_unref (priv->comp);
- priv->comp = NULL;
-
- cleanup_attendees (priv->deleted_attendees);
- g_ptr_array_set_size (priv->deleted_attendees, 0);
-
- /* Clean the screen */
- clear_widgets (mpage);
-
- /* Component for cancellation */
- priv->comp = e_cal_component_clone (comp);
-
- /* If there is an existing organizer show it properly */
- if (e_cal_component_has_organizer (comp)) {
- e_cal_component_get_organizer (comp, &organizer);
- if (organizer.value != NULL) {
- const gchar *strip = itip_strip_mailto (organizer.value);
- gchar *string;
-
- gtk_widget_hide (priv->organizer_table);
- gtk_widget_show (priv->existing_organizer_table);
- if (itip_organizer_is_user (comp, page->client)) {
- gtk_widget_show (priv->invite);
- if (e_cal_get_static_capability (
- page->client,
- CAL_STATIC_CAPABILITY_ORGANIZER_NOT_EMAIL_ADDRESS))
- gtk_widget_hide (priv->existing_organizer_btn);
- } else {
- if (e_cal_get_static_capability (
- page->client,
- CAL_STATIC_CAPABILITY_ORGANIZER_NOT_EMAIL_ADDRESS))
- gtk_widget_hide (priv->existing_organizer_btn);
- gtk_widget_hide (priv->invite);
- }
-
- if (organizer.cn != NULL)
- string = g_strdup_printf ("%s <%s>", organizer.cn, strip);
- else
- string = g_strdup (strip);
- gtk_label_set_text (GTK_LABEL (priv->existing_organizer), string);
- g_free (string);
-
- priv->existing = TRUE;
- }
- } else {
- EAccount *a;
-
- a = get_current_account (mpage);
- if (a != NULL) {
- priv->ia = e_meeting_store_add_attendee_with_defaults (priv->model);
- g_object_ref (priv->ia);
-
- e_meeting_attendee_set_address (priv->ia, g_strdup_printf ("MAILTO:%s", a->id->address));
- e_meeting_attendee_set_cn (priv->ia, g_strdup (a->id->name));
- e_meeting_attendee_set_status (priv->ia, ICAL_PARTSTAT_ACCEPTED);
- }
- }
-
- priv->updating = FALSE;
-}
-
-/* fill_component handler for the meeting page */
-static gboolean
-meeting_page_fill_component (CompEditorPage *page, ECalComponent *comp)
-{
- MeetingPage *mpage;
- MeetingPagePrivate *priv;
- ECalComponentOrganizer organizer = {NULL, NULL, NULL, NULL};
-
- mpage = MEETING_PAGE (page);
- priv = mpage->priv;
-
- if (!priv->existing) {
- EAccount *a;
- gchar *addr = NULL;
-
- /* Find the identity for the organizer or sentby field */
- a = get_current_account (mpage);
-
- /* Sanity Check */
- if (a == NULL) {
- e_notice (page, GTK_MESSAGE_ERROR,
- _("The organizer selected no longer has an account."));
- return FALSE;
- }
-
- if (a->id->address == NULL || strlen (a->id->address) == 0) {
- e_notice (page, GTK_MESSAGE_ERROR,
- _("An organizer is required."));
- return FALSE;
- }
-
- addr = g_strdup_printf ("MAILTO:%s", a->id->address);
-
- organizer.value = addr;
- organizer.cn = a->id->name;
- e_cal_component_set_organizer (comp, &organizer);
-
- g_free (addr);
- }
-
- if (e_meeting_store_count_actual_attendees (priv->model) < 1) {
- e_notice (page, GTK_MESSAGE_ERROR,
- _("At least one attendee is required."));
- return FALSE;
- }
- set_attendees (comp, e_meeting_store_get_attendees (priv->model));
-
- return TRUE;
-}
-
-
-
-/* Gets the widgets from the XML file and returns if they are all available. */
-static gboolean
-get_widgets (MeetingPage *mpage)
-{
- CompEditorPage *page = COMP_EDITOR_PAGE (mpage);
- MeetingPagePrivate *priv;
- GSList *accel_groups;
- GtkWidget *toplevel;
-
- priv = mpage->priv;
-
-#define GW(name) glade_xml_get_widget (priv->xml, name)
-
- priv->main = GW ("meeting-page");
- if (!priv->main)
- return FALSE;
-
- /* Get the GtkAccelGroup from the toplevel window, so we can install
- it when the notebook page is mapped. */
- toplevel = gtk_widget_get_toplevel (priv->main);
- accel_groups = gtk_accel_groups_from_object (G_OBJECT (toplevel));
- if (accel_groups) {
- page->accel_group = accel_groups->data;
- gtk_accel_group_ref (page->accel_group);
- }
-
- gtk_widget_ref (priv->main);
- gtk_container_remove (GTK_CONTAINER (priv->main->parent), priv->main);
-
- /* For making the user the organizer */
- priv->organizer_table = GW ("organizer-table");
- priv->organizer = GW ("organizer");
- gtk_combo_set_value_in_list (GTK_COMBO (priv->organizer), FALSE, FALSE);
-
- /* For showing existing organizers */
- 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->existing_organizer_table
- && priv->existing_organizer
- && priv->existing_organizer_btn);
-}
-
-static void
-org_changed_cb (GtkWidget *widget, gpointer data)
-{
- MeetingPage *mpage;
- MeetingPagePrivate *priv;
-
- mpage = MEETING_PAGE (data);
- priv = mpage->priv;
-
- if (priv->updating)
- return;
-
- if (!priv->existing && priv->ia != NULL) {
- EAccount *a;
-
- a = get_current_account (mpage);
- if (a != NULL) {
- e_meeting_attendee_set_address (priv->ia, g_strdup_printf ("MAILTO:%s", a->id->address));
- e_meeting_attendee_set_cn (priv->ia, g_strdup (a->id->name));
-
- if (!e_meeting_store_find_attendee (priv->model, e_meeting_attendee_get_address (priv->ia), NULL))
- e_meeting_store_add_attendee (priv->model, priv->ia);
- } else {
- e_meeting_store_remove_attendee (priv->model, priv->ia);
- }
- }
-
- comp_editor_page_notify_changed (COMP_EDITOR_PAGE (mpage));
-}
-
-/* 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);
-
- comp_editor_page_notify_needs_send (COMP_EDITOR_PAGE (mpage));
-
- priv->existing = FALSE;
-}
-
-/* Function called to invite more people */
-static void
-invite_cb (GtkWidget *widget, gpointer data)
-{
- MeetingPage *mpage;
- MeetingPagePrivate *priv;
-
- mpage = MEETING_PAGE (data);
- priv = mpage->priv;
-
- e_meeting_list_view_invite_others_dialog (priv->list_view);
-}
-
-/* Hooks the widget signals */
-static void
-init_widgets (MeetingPage *mpage)
-{
- MeetingPagePrivate *priv;
-
- priv = mpage->priv;
-
- /* Organizer */
- g_signal_connect((GTK_COMBO (priv->organizer)->entry), "changed",
- G_CALLBACK (org_changed_cb), mpage);
-
- g_signal_connect((priv->existing_organizer_btn), "clicked",
- G_CALLBACK (change_clicked_cb), mpage);
-
- /* Invite button */
- g_signal_connect((priv->invite), "clicked",
- G_CALLBACK (invite_cb), mpage);
-}
-
-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_store_find_attendee_at_row (priv->model, priv->row);
-
- /* If the user deletes the attendee explicitly, assume they no
- longer want the organizer showing up */
- if (ia == priv->ia) {
- g_object_unref (priv->ia);
- priv->ia = NULL;
- }
-
- /* If this was a delegatee, no longer delegate */
- if (e_meeting_attendee_is_set_delfrom (ia)) {
- EMeetingAttendee *ib;
-
- ib = e_meeting_store_find_attendee (priv->model, e_meeting_attendee_get_delfrom (ia), &pos);
- if (ib != NULL) {
- e_meeting_attendee_set_delto (ib, NULL);
- e_meeting_attendee_set_edit_level (ib, E_MEETING_ATTENDEE_EDIT_FULL);
- }
- }
-
- /* Handle deleting all attendees in the delegation chain */
- while (ia != NULL) {
- EMeetingAttendee *ib = NULL;
-
- g_object_ref (ia);
- g_ptr_array_add (priv->deleted_attendees, ia);
- e_meeting_store_remove_attendee (priv->model, ia);
-
- if (e_meeting_attendee_get_delto (ia) != NULL)
- ib = e_meeting_store_find_attendee (priv->model, e_meeting_attendee_get_delto (ia), NULL);
- ia = ib;
- }
-}
-
-enum {
- CAN_DELEGATE = 2,
- CAN_DELETE = 4
-};
-
-static EPopupMenu context_menu[] = {
-#if 0
- E_POPUP_ITEM (N_("_Delegate To..."), G_CALLBACK (popup_delegate_cb), CAN_DELEGATE),
-
- E_POPUP_SEPARATOR,
-#endif
- E_POPUP_ITEM (N_("_Delete"), G_CALLBACK (popup_delete_cb), CAN_DELETE),
-
- E_POPUP_TERMINATOR
-};
-
-#if 0
-/* FIXME: handle context menu for treeview */
-/* 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;
- EMeetingAttendee *ia;
- int disable_mask = 0, hide_mask = 0, view_row;
-
- priv = mpage->priv;
-
- view_row = e_table_model_to_view_row (etable, row);
- priv->row = e_meeting_model_etable_view_to_model_row (etable, priv->model, view_row);
-
- ia = e_meeting_model_find_attendee_at_row (priv->model, priv->row);
- if (e_meeting_attendee_get_edit_level (ia) != E_MEETING_ATTENDEE_EDIT_FULL)
- disable_mask = CAN_DELETE;
-
- /* FIXME: if you enable Delegate, then change index to '1'.
- * (This has now been enabled). */
- /* context_menu[1].pixmap_widget = gnome_stock_new_with_icon (GNOME_STOCK_MENU_TRASH); */
- context_menu[1].pixmap_widget =
- gtk_image_new_from_stock (GTK_STOCK_DELETE, GTK_ICON_SIZE_MENU);
-
- menu = e_popup_menu_create (context_menu, disable_mask, hide_mask, data);
- e_auto_kill_popup_menu_on_selection_done (menu);
-
- gtk_menu_popup (menu, NULL, NULL, NULL, NULL,
- event->button.button, event->button.time);
-
- return TRUE;
-}
-#endif
-
-static void
-add_btn_clicked_cb (GtkButton *btn, MeetingPage *mpage)
-{
- e_meeting_store_add_attendee_with_defaults (mpage->priv->model);
-}
-
-/**
- * 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, EMeetingStore *ems,
- ECal *client)
-{
- MeetingPagePrivate *priv;
- char *backend_address;
- EIterator *it;
- EAccount *def_account;
- GList *address_strings = NULL, *l;
- GtkWidget *sw, *btn;
-
- priv = mpage->priv;
-
- priv->xml = glade_xml_new (EVOLUTION_GLADEDIR
- "/meeting-page.glade", NULL, 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;
- }
-
- /* Address information */
- if (!e_cal_get_cal_address (client, &backend_address, NULL))
- return NULL;
-
- priv->accounts = itip_addresses_get ();
- def_account = itip_addresses_get_default();
- for (it = e_list_get_iterator((EList *)priv->accounts);
- e_iterator_is_valid(it);
- e_iterator_next(it)) {
- EAccount *a = (EAccount *)e_iterator_get(it);
- char *full;
-
- full = g_strdup_printf("%s <%s>", a->id->name, a->id->address);
-
- address_strings = g_list_append(address_strings, full);
-
- /* Note that the address specified by the backend gets
- * precedence over the default mail address.
- */
- if (backend_address && !strcmp (backend_address, a->id->address)) {
- if (priv->default_address)
- g_free (priv->default_address);
-
- priv->default_address = g_strdup (full);
- } else if (a == def_account && !priv->default_address) {
- priv->default_address = g_strdup (full);
- }
- }
- g_object_unref(it);
- g_free (backend_address);
-
- if (address_strings)
- gtk_combo_set_popdown_strings (GTK_COMBO (priv->organizer), address_strings);
- else
- g_warning ("No potential organizers!");
-
- for (l = address_strings; l != NULL; l = l->next)
- g_free (l->data);
- g_list_free (address_strings);
-
- /* The etable displaying attendees and their status */
- g_object_ref (ems);
- priv->model = ems;
-
- btn = gtk_button_new_with_label ("Add Attendee");
- g_signal_connect(btn, "clicked", G_CALLBACK (add_btn_clicked_cb), mpage);
- gtk_widget_show (btn);
- gtk_box_pack_start (GTK_BOX (priv->main), btn, FALSE, FALSE, 6);
-
- priv->list_view = e_meeting_list_view_new (priv->model);
-
-#if 0
- /* FIXME: handle context menu for treeview */
- g_signal_connect((real_table),
- "right_click", G_CALLBACK (right_click_cb), mpage);
-#endif
-
- gtk_widget_show (GTK_WIDGET (priv->list_view));
- sw = gtk_scrolled_window_new (NULL, NULL);
- gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), GTK_SHADOW_IN);
- gtk_widget_show (sw);
- gtk_container_add (GTK_CONTAINER (sw), GTK_WIDGET (priv->list_view));
- gtk_box_pack_start (GTK_BOX (priv->main), sw, TRUE, TRUE, 6);
-
- /* 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 (EMeetingStore *ems, ECal *client)
-{
- MeetingPage *mpage;
-
- mpage = g_object_new (TYPE_MEETING_PAGE, NULL);
- if (!meeting_page_construct (mpage, ems, client)) {
- g_object_unref (mpage);
- return NULL;
- }
-
- return mpage;
-}
-
-/**
- * meeting_page_get_cancel_comp:
- * @mpage:
- *
- *
- *
- * Return value:
- **/
-ECalComponent *
-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->len == 0)
- return NULL;
-
- set_attendees (priv->comp, priv->deleted_attendees);
-
- return e_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 3b72c37b47..0000000000
--- a/calendar/gui/dialogs/meeting-page.glade
+++ /dev/null
@@ -1,241 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-
-<widget class="GtkWindow" id="meeting-toplevel">
- <property name="title" translatable="yes">window1</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
-
- <child>
- <widget class="GtkVBox" id="meeting-page">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkVBox" id="vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkTable" id="organizer-table">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="n_rows">1</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkCombo" id="organizer">
- <property name="visible">True</property>
- <property name="value_in_list">True</property>
- <property name="allow_empty">False</property>
- <property name="case_sensitive">False</property>
- <property name="enable_arrow_keys">True</property>
- <property name="enable_arrows_always">False</property>
-
- <child internal-child="entry">
- <widget class="GtkEntry" id="entry2">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- </child>
-
- <child internal-child="list">
- <widget class="GtkList" id="convertwidget1">
- <property name="visible">True</property>
- <property name="selection_mode">GTK_SELECTION_BROWSE</property>
-
- <child>
- <widget class="GtkListItem" id="convertwidget2">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget3">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="organizer-label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Organizer:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTable" id="existing-organizer-table">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="n_rows">1</property>
- <property name="n_columns">3</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Organizer:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options"></property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="existing-organizer-button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Change Organizer</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options"></property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="existing-organizer">
- <property name="visible">True</property>
- <property name="label" translatable="yes">None</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <placeholder/>
- </child>
-
- <child>
- <widget class="GtkButton" id="invite">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Invite Others...</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/calendar/gui/dialogs/meeting-page.h b/calendar/gui/dialogs/meeting-page.h
deleted file mode 100644
index 95533cd771..0000000000
--- a/calendar/gui/dialogs/meeting-page.h
+++ /dev/null
@@ -1,67 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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-store.h"
-#include "../itip-utils.h"
-#include "comp-editor-page.h"
-
-G_BEGIN_DECLS
-
-
-
-#define TYPE_MEETING_PAGE (meeting_page_get_type ())
-#define MEETING_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEETING_PAGE, MeetingPage))
-#define MEETING_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEETING_PAGE, MeetingPageClass))
-#define IS_MEETING_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEETING_PAGE))
-#define IS_MEETING_PAGE_CLASS(klass) (G_TYPE_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,
- EMeetingStore *ems,
- ECal *client);
-MeetingPage *meeting_page_new (EMeetingStore *ems,
- ECal *client);
-ECalComponent *meeting_page_get_cancel_comp (MeetingPage *mpage);
-
-
-
-G_END_DECLS
-
-#endif
diff --git a/calendar/gui/dialogs/new-calendar.c b/calendar/gui/dialogs/new-calendar.c
deleted file mode 100644
index 5cbbd99516..0000000000
--- a/calendar/gui/dialogs/new-calendar.c
+++ /dev/null
@@ -1,268 +0,0 @@
-/* Evolution calendar - New calendar dialog
- *
- * Copyright (C) 2003 Novell, Inc.
- *
- * Author: Rodrigo Moya <rodrigo@ximian.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <bonobo/bonobo-i18n.h>
-#include <gtk/gtkdialog.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtkmenu.h>
-#include <gtk/gtkmenuitem.h>
-#include <gtk/gtkmessagedialog.h>
-#include <gtk/gtkoptionmenu.h>
-#include <glade/glade.h>
-#include <libedataserver/e-source-list.h>
-#include <e-util/e-dialog-utils.h>
-#include <e-util/e-url.h>
-#include "new-calendar.h"
-
-static gchar *
-print_uri_noproto (EUri *uri)
-{
- gchar *uri_noproto;
-
- if (uri->port != 0)
- uri_noproto = g_strdup_printf (
- "%s%s%s%s%s%s%s:%d%s%s%s",
- uri->user ? uri->user : "",
- uri->authmech ? ";auth=" : "",
- uri->authmech ? uri->authmech : "",
- uri->passwd ? ":" : "",
- uri->passwd ? uri->passwd : "",
- uri->user ? "@" : "",
- uri->host ? uri->host : "",
- uri->port,
- uri->path ? uri->path : "",
- uri->query ? "?" : "",
- uri->query ? uri->query : "");
- else
- uri_noproto = g_strdup_printf (
- "%s%s%s%s%s%s%s%s%s%s",
- uri->user ? uri->user : "",
- uri->authmech ? ";auth=" : "",
- uri->authmech ? uri->authmech : "",
- uri->passwd ? ":" : "",
- uri->passwd ? uri->passwd : "",
- uri->user ? "@" : "",
- uri->host ? uri->host : "",
- uri->path ? uri->path : "",
- uri->query ? "?" : "",
- uri->query ? uri->query : "");
-
- return uri_noproto;
-}
-
-static gboolean
-group_is_remote (ESourceGroup *group)
-{
- EUri *uri;
- gboolean is_remote = FALSE;
-
- uri = e_uri_new (e_source_group_peek_base_uri (group));
- if (!uri)
- return FALSE;
-
- if (uri->protocol && strcmp (uri->protocol, "file"))
- is_remote = TRUE;
-
- e_uri_free (uri);
- return is_remote;
-}
-
-static gboolean
-create_new_source_with_group (GtkWindow *parent,
- ESourceGroup *group,
- const char *source_name,
- const char *source_location)
-{
- ESource *source;
-
- if (e_source_group_peek_source_by_name (group, source_name)) {
- e_notice (parent, GTK_MESSAGE_ERROR,
- _("Source with name '%s' already exists in the selected group"),
- source_name);
- return FALSE;
- }
-
- if (group_is_remote (group)) {
- EUri *uri;
- gchar *relative_uri;
- char *cache_dir;
-
- /* Remote source */
-
- if (!source_location || !strlen (source_location)) {
- e_notice (parent, GTK_MESSAGE_ERROR,
- _("The group '%s' is remote. You must specify a location "
- "to get the calendar from"),
- e_source_group_peek_name (group));
- return FALSE;
- }
-
- uri = e_uri_new (source_location);
- if (!uri) {
- e_notice (parent, GTK_MESSAGE_ERROR,
- _("The source location '%s' is not well-formed."),
- source_location);
- return FALSE;
- }
-
- /* Make sure we're in agreement with the protocol. Note that EUri sets it
- * to 'file' if none was specified in the input URI. We don't want to
- * silently translate an explicit file:// into http:// though. */
- if (uri->protocol &&
- strcmp (uri->protocol, "http") &&
- strcmp (uri->protocol, "webcal")) {
- e_uri_free (uri);
- e_notice (parent, GTK_MESSAGE_ERROR,
- _("The source location '%s' is not a webcal source."),
- source_location);
- return FALSE;
- }
-
- /* Our relative_uri is everything but protocol, which is supplied by parent group */
- relative_uri = print_uri_noproto (uri);
- e_uri_free (uri);
-
- /* Set up cache dir */
- cache_dir = g_build_filename (g_get_home_dir (),
- "/.evolution/calendar/webcal/",
- source_name, NULL);
- if (e_mkdir_hier (cache_dir, 0700)) {
- g_free (relative_uri);
- g_free (cache_dir);
- e_notice (parent, GTK_MESSAGE_ERROR,
- _("Could not create cache for new calendar"));
- return FALSE;
- }
-
- /* Create source */
- source = e_source_new (source_name, relative_uri);
-
- g_free (relative_uri);
- g_free (cache_dir);
- } else {
- char *new_dir;
-
- /* Local source */
-
- new_dir = g_build_filename (e_source_group_peek_base_uri (group),
- source_name, NULL);
- if (e_mkdir_hier (new_dir, 0700)) {
- g_free (new_dir);
- e_notice (parent, GTK_MESSAGE_ERROR,
- _("Could not create directory for new calendar"));
- return FALSE;
- }
-
- source = e_source_new (source_name, source_name);
- g_free (new_dir);
- }
-
- e_source_group_add_source (group, source, -1);
- return TRUE;
-}
-
-/**
- * new_calendar_dialog
- *
- * Displays a dialog that allows the user to create a new calendar.
- */
-gboolean
-new_calendar_dialog (GtkWindow *parent)
-{
- GtkWidget *dialog, *cal_group, *cal_name, *cal_location;
- GladeXML *xml;
- ESourceList *source_list;
- GConfClient *gconf_client;
- GSList *groups, *sl;
- gboolean result = FALSE, retry = TRUE;
-
- /* load the Glade file */
- xml = glade_xml_new (EVOLUTION_GLADEDIR "/new-calendar.glade", "new-calendar-dialog", NULL);
- if (!xml) {
- g_warning (G_STRLOC ": cannot load Glade file");
- return FALSE;
- }
-
- dialog = glade_xml_get_widget (xml, "new-calendar-dialog");
- cal_group = glade_xml_get_widget (xml, "calendar-group");
- cal_name = glade_xml_get_widget (xml, "calendar-name");
- cal_location = glade_xml_get_widget (xml, "calendar-location");
-
- /* set up widgets */
- gconf_client = gconf_client_get_default ();
- source_list = e_source_list_new_for_gconf (gconf_client, "/apps/evolution/calendar/sources");
-
- groups = e_source_list_peek_groups (source_list);
- for (sl = groups; sl != NULL; sl = sl->next) {
- GtkWidget *menu_item, *menu;
- ESourceGroup *group = sl->data;
-
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (cal_group));
- if (!GTK_IS_MENU (menu)) {
- menu = gtk_menu_new ();
- gtk_option_menu_set_menu (GTK_OPTION_MENU (cal_group), menu);
- gtk_widget_show (menu);
- }
-
- menu_item = gtk_menu_item_new_with_label (e_source_group_peek_name (group));
- gtk_widget_show (menu_item);
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
- }
-
- if (groups)
- gtk_option_menu_set_history (GTK_OPTION_MENU (cal_group), 0);
-
- /* run the dialog */
- do {
- if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) {
- const char *name;
- const char *location;
-
- name = gtk_entry_get_text (GTK_ENTRY (cal_name));
- location = gtk_entry_get_text (GTK_ENTRY (cal_location));
- sl = g_slist_nth (groups, gtk_option_menu_get_history (GTK_OPTION_MENU (cal_group)));
- if (sl) {
- if (create_new_source_with_group (GTK_WINDOW (dialog),
- sl->data,
- name,
- location))
- retry = FALSE;
- } else {
- e_notice (dialog, GTK_MESSAGE_ERROR,
- _("A group must be selected"));
- continue;
- }
- } else
- retry = FALSE; /* user pressed Cancel */
- } while (retry);
-
- /* free memory */
- g_object_unref (gconf_client);
- g_object_unref (source_list);
- gtk_widget_destroy (dialog);
- g_object_unref (xml);
-
- return result;
-}
diff --git a/calendar/gui/dialogs/new-calendar.glade b/calendar/gui/dialogs/new-calendar.glade
deleted file mode 100644
index 0a136ed7c8..0000000000
--- a/calendar/gui/dialogs/new-calendar.glade
+++ /dev/null
@@ -1,239 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-
-<widget class="GtkDialog" id="new-calendar-dialog">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="title" translatable="yes">Add New Calendar</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_CENTER</property>
- <property name="modal">False</property>
- <property name="resizable">False</property>
- <property name="destroy_with_parent">False</property>
- <property name="has_separator">True</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="cancelbutton1">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">-6</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="okbutton1">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">-5</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTable" id="table1">
- <property name="visible">True</property>
- <property name="n_rows">4</property>
- <property name="n_columns">3</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Calendar Group</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_padding">6</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="calendar-group">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">-1</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_padding">6</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="calendar-name">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_padding">6</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Calendar options&lt;/b&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">3</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_padding">6</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Calendar Name</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_padding">6</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="calendar-source-label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Calendar Location</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_padding">6</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="calendar-location">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_padding">6</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">4</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/calendar/gui/dialogs/new-calendar.h b/calendar/gui/dialogs/new-calendar.h
deleted file mode 100644
index 86c819796e..0000000000
--- a/calendar/gui/dialogs/new-calendar.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Evolution calendar - New calendar dialog
- *
- * Copyright (C) 2003 Novell, Inc.
- *
- * Author: Rodrigo Moya <rodrigo@ximian.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#ifndef NEW_CALENDAR_H
-#define NEW_CALENDAR_H
-
-#include <gtk/gtkwindow.h>
-
-gboolean new_calendar_dialog (GtkWindow *parent);
-
-#endif
diff --git a/calendar/gui/dialogs/new-task-list.c b/calendar/gui/dialogs/new-task-list.c
deleted file mode 100644
index e77d35d4ad..0000000000
--- a/calendar/gui/dialogs/new-task-list.c
+++ /dev/null
@@ -1,145 +0,0 @@
-/* Evolution calendar - New task list dialog
- *
- * Copyright (C) 2003 Novell, Inc.
- *
- * Author: Rodrigo Moya <rodrigo@ximian.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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-i18n.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtkmenu.h>
-#include <gtk/gtkmenuitem.h>
-#include <gtk/gtkmessagedialog.h>
-#include <gtk/gtkoptionmenu.h>
-#include <glade/glade.h>
-#include <e-util/e-dialog-utils.h>
-#include <libedataserver/e-source-list.h>
-#include "new-task-list.h"
-
-static gboolean
-create_new_source_with_group (GtkWindow *parent,
- ESourceGroup *group,
- const char *source_name)
-{
- ESource *source;
- char *new_dir;
-
- if (e_source_group_peek_source_by_name (group, source_name)) {
- e_notice (parent, GTK_MESSAGE_ERROR,
- _("Source with name '%s' already exists in the selected group"),
- source_name);
- return FALSE;
- }
-
- new_dir = g_build_filename (e_source_group_peek_base_uri (group),
- source_name, NULL);
- if (e_mkdir_hier (new_dir, 0700)) {
- g_free (new_dir);
- e_notice (parent, GTK_MESSAGE_ERROR,
- _("Could not create directory for new task list"));
- return FALSE;
- }
-
- source = e_source_new (source_name, source_name);
- g_free (new_dir);
-
- e_source_group_add_source (group, source, -1);
- return TRUE;
-}
-
-/**
- * new_task_list_dialog
- *
- * Displays a dialog that allows the user to create a new task list.
- */
-gboolean
-new_task_list_dialog (GtkWindow *parent)
-{
- GtkWidget *dialog, *task_group, *task_name;
- GladeXML *xml;
- ESourceList *source_list;
- GConfClient *gconf_client;
- GSList *groups, *sl;
- gboolean result = FALSE, retry = TRUE;
-
- /* load the Glade file */
- xml = glade_xml_new (EVOLUTION_GLADEDIR "/new-task-list.glade", "new-task-list-dialog", NULL);
- if (!xml) {
- g_warning (G_STRLOC ": cannot load Glade file");
- return FALSE;
- }
-
- dialog = glade_xml_get_widget (xml, "new-task-list-dialog");
- task_group = glade_xml_get_widget (xml, "task-list-group");
- task_name = glade_xml_get_widget (xml, "task-list-name");
-
- /* set up widgets */
- gconf_client = gconf_client_get_default ();
- source_list = e_source_list_new_for_gconf (gconf_client, "/apps/evolution/tasks/sources");
-
- groups = e_source_list_peek_groups (source_list);
- for (sl = groups; sl != NULL; sl = sl->next) {
- GtkWidget *menu_item, *menu;
- ESourceGroup *group = sl->data;
-
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (task_group));
- if (!GTK_IS_MENU (menu)) {
- menu = gtk_menu_new ();
- gtk_option_menu_set_menu (GTK_OPTION_MENU (task_group), menu);
- gtk_widget_show (menu);
- }
-
- menu_item = gtk_menu_item_new_with_label (e_source_group_peek_name (group));
- gtk_widget_show (menu_item);
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
- }
-
- if (groups)
- gtk_option_menu_set_history (GTK_OPTION_MENU (task_group), 0);
-
- /* run the dialog */
- do {
- if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) {
- const char *name;
-
- name = gtk_entry_get_text (GTK_ENTRY (task_name));
- sl = g_slist_nth (groups, gtk_option_menu_get_history (GTK_OPTION_MENU (task_group)));
- if (sl) {
- if (create_new_source_with_group (GTK_WINDOW (dialog),
- sl->data,
- name))
- retry = FALSE;
- } else {
- e_notice (dialog, GTK_MESSAGE_ERROR,
- _("A group must be selected"));
- continue;
- }
- } else
- retry = FALSE; /* user pressed Cancel */
- } while (retry);
-
- /* free memory */
- g_object_unref (gconf_client);
- g_object_unref (source_list);
- gtk_widget_destroy (dialog);
- g_object_unref (xml);
-
- return result;
-}
diff --git a/calendar/gui/dialogs/new-task-list.glade b/calendar/gui/dialogs/new-task-list.glade
deleted file mode 100644
index ffc38582c8..0000000000
--- a/calendar/gui/dialogs/new-task-list.glade
+++ /dev/null
@@ -1,193 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-<requires lib="gnome"/>
-
-<widget class="GtkDialog" id="new-task-list-dialog">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="title" translatable="yes">Add New Task List</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_CENTER</property>
- <property name="modal">False</property>
- <property name="resizable">False</property>
- <property name="destroy_with_parent">False</property>
- <property name="has_separator">True</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="cancelbutton1">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">-6</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="okbutton1">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">-5</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTable" id="table1">
- <property name="visible">True</property>
- <property name="n_rows">3</property>
- <property name="n_columns">3</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Task List Group</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_padding">6</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="task-list-group">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">-1</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_padding">6</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="task-list-name">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_padding">6</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Task List Options&lt;/b&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">3</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_padding">6</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Task List Name</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_padding">6</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">4</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/calendar/gui/dialogs/new-task-list.h b/calendar/gui/dialogs/new-task-list.h
deleted file mode 100644
index 3f529f39ad..0000000000
--- a/calendar/gui/dialogs/new-task-list.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Evolution calendar - New task list dialog
- *
- * Copyright (C) 2003 Novell, Inc.
- *
- * Author: Rodrigo Moya <rodrigo@ximian.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#ifndef NEW_TASK_LIST_H
-#define NEW_TASK_LIST_H
-
-#include <gtk/gtkwindow.h>
-
-gboolean new_task_list_dialog (GtkWindow *parent);
-
-#endif
diff --git a/calendar/gui/dialogs/recur-comp.c b/calendar/gui/dialogs/recur-comp.c
deleted file mode 100644
index f097d542f7..0000000000
--- a/calendar/gui/dialogs/recur-comp.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/* Evolution calendar - Recurring calendar component dialog
- *
- * Copyright (C) 2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <gtk/gtk.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-uidefs.h>
-#include "recur-comp.h"
-
-
-
-gboolean
-recur_component_dialog (ECal *client,
- ECalComponent *comp,
- CalObjModType *mod,
- GtkWindow *parent)
-{
- char *str;
- GtkWidget *dialog, *rb_this, *rb_prior, *rb_future, *rb_all, *hbox;
- ECalComponentVType vtype;
- gboolean ret;
-
- g_return_val_if_fail (E_IS_CAL_COMPONENT (comp), CALOBJ_MOD_THIS);
-
- vtype = e_cal_component_get_vtype (comp);
-
- switch (vtype) {
- case E_CAL_COMPONENT_EVENT:
- str = g_strdup_printf (_("You are modifying a recurring event, what would you like to modify?"));
- break;
-
- case E_CAL_COMPONENT_TODO:
- str = g_strdup_printf (_("You are modifying a recurring task, what would you like to modify?"));
- break;
-
- case E_CAL_COMPONENT_JOURNAL:
- str = g_strdup_printf (_("You are modifying a recurring journal entry, what would you like to modify?"));
- break;
-
- default:
- g_message ("recur_component_dialog(): Cannot handle object of type %d", vtype);
- return CALOBJ_MOD_THIS;
- }
-
-
- dialog = gtk_message_dialog_new (parent, 0, GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL, "%s", str);
- g_free (str);
-
- hbox = gtk_hbox_new (FALSE, 2);
- gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), hbox);
- rb_this = gtk_radio_button_new_with_label (NULL, _("This Instance Only"));
- gtk_container_add (GTK_CONTAINER (hbox), rb_this);
-
- if (!e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_NO_THISANDPRIOR)) {
- rb_prior = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (rb_this), _("This and Prior Instances"));
- gtk_container_add (GTK_CONTAINER (hbox), rb_prior);
- } else
- rb_prior = NULL;
-
- if (!e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_NO_THISANDFUTURE)) {
- rb_future = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (rb_this), _("This and Future Instances"));
- gtk_container_add (GTK_CONTAINER (hbox), rb_future);
- } else
- rb_future = NULL;
-
- rb_all = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (rb_this), _("All Instances"));
- gtk_container_add (GTK_CONTAINER (hbox), rb_all);
-
- gtk_widget_show_all (hbox);
-
- ret = gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK;
-
- if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (rb_this)))
- *mod = CALOBJ_MOD_THIS;
- else if (rb_prior && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (rb_prior)))
- *mod = CALOBJ_MOD_THISANDPRIOR;
- else if (rb_future && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (rb_future)))
- *mod = CALOBJ_MOD_THISANDFUTURE;
- else if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (rb_all)))
- *mod = CALOBJ_MOD_ALL;
-
- gtk_widget_destroy (dialog);
-
- return ret;
-}
diff --git a/calendar/gui/dialogs/recur-comp.h b/calendar/gui/dialogs/recur-comp.h
deleted file mode 100644
index 94ccbdae87..0000000000
--- a/calendar/gui/dialogs/recur-comp.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Evolution calendar - Recurring calendar component dialog
- *
- * Copyright (C) 2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#ifndef RECUR_COMP_H
-#define RECUR_COMP_H
-
-#include <gtk/gtkwindow.h>
-#include <libecal/e-cal.h>
-#include <libecal/e-cal-component.h>
-#include <libecal/e-cal-util.h>
-
-gboolean recur_component_dialog (ECal *client,
- ECalComponent *comp,
- CalObjModType *mod,
- GtkWindow *parent);
-
-#endif
diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c
deleted file mode 100644
index cdc820e6d6..0000000000
--- a/calendar/gui/dialogs/recurrence-page.c
+++ /dev/null
@@ -1,2411 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/* Evolution calendar - Recurrence page of the calendar component dialogs
- *
- * Copyright (C) 2001-2003 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>
- * Hans Petter Jansson <hpj@ximiman.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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/gtklabel.h>
-#include <gtk/gtkcellrenderertext.h>
-#include <gtk/gtkmenuitem.h>
-#include <gtk/gtkoptionmenu.h>
-#include <gtk/gtktogglebutton.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkspinbutton.h>
-#include <gtk/gtktreeview.h>
-#include <gtk/gtktreeselection.h>
-#include <libgnome/gnome-i18n.h>
-#include <glade/glade.h>
-#include <e-util/e-dialog-widgets.h>
-#include <e-util/e-time-utils.h>
-#include <widgets/misc/e-dateedit.h>
-#include <libecal/e-cal-recur.h>
-#include <libecal/e-cal-time-util.h>
-#include "../calendar-config.h"
-#include "../tag-calendar.h"
-#include "../weekday-picker.h"
-#include "comp-editor-util.h"
-#include "../e-date-time-list.h"
-#include "../e-mini-calendar-config.h"
-#include "recurrence-page.h"
-
-
-
-enum month_num_options {
- MONTH_NUM_FIRST,
- MONTH_NUM_SECOND,
- MONTH_NUM_THIRD,
- MONTH_NUM_FOURTH,
- MONTH_NUM_LAST,
- MONTH_NUM_DAY,
- MONTH_NUM_OTHER
-};
-
-static const int month_num_options_map[] = {
- MONTH_NUM_FIRST,
- MONTH_NUM_SECOND,
- MONTH_NUM_THIRD,
- MONTH_NUM_FOURTH,
- MONTH_NUM_LAST,
- MONTH_NUM_DAY,
- MONTH_NUM_OTHER,
- -1
-};
-
-enum month_day_options {
- MONTH_DAY_NTH,
- MONTH_DAY_MON,
- MONTH_DAY_TUE,
- MONTH_DAY_WED,
- MONTH_DAY_THU,
- MONTH_DAY_FRI,
- MONTH_DAY_SAT,
- MONTH_DAY_SUN
-};
-
-static const int month_day_options_map[] = {
- MONTH_DAY_NTH,
- MONTH_DAY_MON,
- MONTH_DAY_TUE,
- MONTH_DAY_WED,
- MONTH_DAY_THU,
- MONTH_DAY_FRI,
- MONTH_DAY_SAT,
- MONTH_DAY_SUN,
- -1
-};
-
-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 */
- ECalComponent *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 */
- int month_index;
-
- GtkWidget *month_day_menu;
- enum month_day_options month_day;
-
- GtkWidget *month_num_menu;
- enum month_num_options month_num;
-
- /* 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; /* This is a GtkTreeView now */
- GtkWidget *exception_add;
- GtkWidget *exception_modify;
- GtkWidget *exception_delete;
-
- GtkWidget *preview_bin;
-
- /* Store for exception_list */
- EDateTimeList *exception_list_store;
-
- /* For the recurrence preview, the actual widget */
- GtkWidget *preview_calendar;
- EMiniCalendarConfig *preview_calendar_config;
-
- gboolean updating;
-};
-
-
-
-static void recurrence_page_class_init (RecurrencePageClass *class);
-static void recurrence_page_init (RecurrencePage *rpage);
-static void recurrence_page_finalize (GObject *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, ECalComponent *comp);
-static gboolean recurrence_page_fill_component (CompEditorPage *page, ECalComponent *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.
- **/
-
-E_MAKE_TYPE (recurrence_page, "RecurrencePage", RecurrencePage, recurrence_page_class_init,
- recurrence_page_init, TYPE_COMP_EDITOR_PAGE);
-
-/* Class initialization function for the recurrence page */
-static void
-recurrence_page_class_init (RecurrencePageClass *class)
-{
- CompEditorPageClass *editor_page_class;
- GObjectClass *object_class;
-
- editor_page_class = (CompEditorPageClass *) class;
- object_class = (GObjectClass *) class;
-
- parent_class = g_type_class_ref(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->finalize = recurrence_page_finalize;
-}
-
-/* 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_day_menu = NULL;
- priv->month_num_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;
-}
-
-/* Destroy handler for the recurrence page */
-static void
-recurrence_page_finalize (GObject *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->main)
- gtk_widget_unref (priv->main);
-
- if (priv->xml) {
- g_object_unref (priv->xml);
- priv->xml = NULL;
- }
-
- if (priv->comp) {
- g_object_unref (priv->comp);
- priv->comp = NULL;
- }
-
- if (priv->exception_list_store) {
- g_object_unref (priv->exception_list_store);
- priv->exception_list_store = NULL;
- }
-
- if (priv->preview_calendar_config) {
- g_object_unref (priv->preview_calendar_config);
- priv->preview_calendar_config = NULL;
- }
-
- g_free (priv);
- rpage->priv = NULL;
-
- if (G_OBJECT_CLASS (parent_class)->finalize)
- (* G_OBJECT_CLASS (parent_class)->finalize) (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_num = MONTH_NUM_DAY;
- priv->month_day = MONTH_DAY_NTH;
-
- g_signal_handlers_block_matched (priv->none, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- g_signal_handlers_block_matched (priv->simple, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- g_signal_handlers_block_matched (priv->custom, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- e_dialog_radio_set (priv->none, RECUR_NONE, type_map);
- g_signal_handlers_unblock_matched (priv->none, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- g_signal_handlers_unblock_matched (priv->simple, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- g_signal_handlers_unblock_matched (priv->custom, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
-
- adj = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (priv->interval_value));
- g_signal_handlers_block_matched (adj, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- e_dialog_spin_set (priv->interval_value, 1);
- g_signal_handlers_unblock_matched (adj, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
-
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->interval_unit));
- g_signal_handlers_block_matched (menu, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- e_dialog_option_menu_set (priv->interval_unit,
- ICAL_DAILY_RECURRENCE,
- freq_map);
- g_signal_handlers_unblock_matched (menu, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
-
- priv->ending_date_tt = icaltime_today ();
- priv->ending_count = 1;
-
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->ending_menu));
- g_signal_handlers_block_matched (menu, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- e_dialog_option_menu_set (priv->ending_menu,
- ENDING_FOREVER,
- ending_types_map);
- g_signal_handlers_unblock_matched (menu, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
-
- /* Exceptions list */
- e_date_time_list_clear (priv->exception_list_store);
-}
-
-/* Appends an exception date to the list */
-static void
-append_exception (RecurrencePage *rpage, ECalComponentDateTime *datetime)
-{
- RecurrencePagePrivate *priv;
- GtkTreeView *view;
- GtkTreeIter iter;
-
- priv = rpage->priv;
- view = GTK_TREE_VIEW (priv->exception_list);
-
- e_date_time_list_append (priv->exception_list_store, &iter, datetime);
- gtk_tree_selection_select_iter (gtk_tree_view_get_selection (view), &iter);
-}
-
-/* Fills in the exception widgets with the data from the calendar component */
-static void
-fill_exception_widgets (RecurrencePage *rpage, ECalComponent *comp)
-{
- RecurrencePagePrivate *priv;
- GSList *list, *l;
- gboolean added = FALSE;
-
- priv = rpage->priv;
- e_cal_component_get_exdate_list (comp, &list);
-
- for (l = list; l; l = l->next) {
- ECalComponentDateTime *cdt;
-
- added = TRUE;
-
- cdt = l->data;
- append_exception (rpage, cdt);
- }
-
- e_cal_component_free_exdate_list (list);
-}
-
-/* Computes a weekday mask for the start day of a calendar component,
- * for use in a WeekdayPicker widget.
- */
-static guint8
-get_start_weekday_mask (ECalComponent *comp)
-{
- ECalComponentDateTime dt;
- guint8 retval;
-
- e_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;
-
- e_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);
-
- /* We can't preview that well for instances right now */
- if (e_cal_component_is_instance (priv->comp))
- gtk_widget_set_sensitive (priv->preview_calendar, FALSE);
- else
- gtk_widget_set_sensitive (priv->preview_calendar, TRUE);
-
- 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 ();
- }
-}
-
-#if 0
-/* Encondes a position/weekday pair into the proper format for
- * icalrecurrencetype.by_day. Not needed at present.
- */
-static short
-nth_weekday (int pos, icalrecurrencetype_weekday weekday)
-{
- g_assert (pos > 0 && pos <= 5);
-
- return (pos << 3) | (int) weekday;
-}
-#endif
-
-/* Gets the simple recurrence data from the recurrence widgets and stores it in
- * the calendar component.
- */
-static void
-simple_recur_to_comp (RecurrencePage *rpage, ECalComponent *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: {
- enum month_num_options month_num;
- enum month_day_options month_day;
-
- g_assert (GTK_BIN (priv->special)->child != NULL);
- g_assert (priv->month_day_menu != NULL);
- g_assert (GTK_IS_OPTION_MENU (priv->month_day_menu));
- g_assert (priv->month_num_menu != NULL);
- g_assert (GTK_IS_OPTION_MENU (priv->month_num_menu));
-
- month_num = e_dialog_option_menu_get (priv->month_num_menu,
- month_num_options_map );
- month_day = e_dialog_option_menu_get (priv->month_day_menu,
- month_day_options_map);
-
- if (month_num == MONTH_NUM_LAST)
- month_num = -1;
- else
- month_num++;
-
- switch (month_day) {
- case MONTH_DAY_NTH:
- if (month_num == -1)
- r.by_month_day[0] = -1;
- else
- r.by_month_day[0] = priv->month_index;
- break;
-
- /* Outlook 2000 uses BYDAY=TU;BYSETPOS=2, and will not
- accept BYDAY=2TU. So we now use the same as Outlook
- by default. */
- case MONTH_DAY_MON:
- r.by_day[0] = ICAL_MONDAY_WEEKDAY;
- r.by_set_pos[0] = month_num;
- break;
-
- case MONTH_DAY_TUE:
- r.by_day[0] = ICAL_TUESDAY_WEEKDAY;
- r.by_set_pos[0] = month_num;
- break;
-
- case MONTH_DAY_WED:
- r.by_day[0] = ICAL_WEDNESDAY_WEEKDAY;
- r.by_set_pos[0] = month_num;
- break;
-
- case MONTH_DAY_THU:
- r.by_day[0] = ICAL_THURSDAY_WEEKDAY;
- r.by_set_pos[0] = month_num;
- break;
-
- case MONTH_DAY_FRI:
- r.by_day[0] = ICAL_FRIDAY_WEEKDAY;
- r.by_set_pos[0] = month_num;
- break;
-
- case MONTH_DAY_SAT:
- r.by_day[0] = ICAL_SATURDAY_WEEKDAY;
- r.by_set_pos[0] = month_num;
- break;
-
- case MONTH_DAY_SUN:
- r.by_day[0] = ICAL_SUNDAY_WEEKDAY;
- r.by_set_pos[0] = month_num;
- 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;
-
- e_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 gboolean
-fill_component (RecurrencePage *rpage, ECalComponent *comp)
-{
- RecurrencePagePrivate *priv;
- enum recur_type recur_type;
- GtkTreeModel *model;
- GtkTreeIter iter;
- gboolean valid_iter;
- GSList *list;
-
- priv = rpage->priv;
- model = GTK_TREE_MODEL (priv->exception_list_store);
-
- recur_type = e_dialog_radio_get (priv->none, type_map);
-
- switch (recur_type) {
- case RECUR_NONE:
- e_cal_component_set_rdate_list (comp, NULL);
- e_cal_component_set_rrule_list (comp, NULL);
- e_cal_component_set_exrule_list (comp, NULL);
- break;
-
- case RECUR_SIMPLE:
- e_cal_component_set_rdate_list (comp, NULL);
- e_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;
-
- for (valid_iter = gtk_tree_model_get_iter_first (model, &iter); valid_iter;
- valid_iter = gtk_tree_model_iter_next (model, &iter)) {
- const ECalComponentDateTime *dt;
- ECalComponentDateTime *cdt;
-
- cdt = g_new (ECalComponentDateTime, 1);
- cdt->value = g_new (struct icaltimetype, 1);
-
- dt = e_date_time_list_get_date_time (E_DATE_TIME_LIST (model), &iter);
- g_assert (dt != NULL);
-
- if (!icaltime_is_valid_time (*dt->value)) {
- comp_editor_page_display_validation_error (COMP_EDITOR_PAGE (rpage),
- _("Recurrence date is invalid"),
- priv->exception_list);
- return FALSE;
- }
-
- *cdt->value = *dt->value;
- cdt->tzid = g_strdup (dt->tzid);
-
- list = g_slist_prepend (list, cdt);
- }
-
- e_cal_component_set_exdate_list (comp, list);
- e_cal_component_free_exdate_list (list);
-
- return TRUE;
-}
-
-/* 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;
- ECalComponent *comp;
- ECalComponentDateTime cdt;
- GSList *l;
- icaltimezone *zone = NULL;
-
- priv = rpage->priv;
-
- /* If our component has not been set yet through ::fill_widgets(), we
- * cannot preview the recurrence.
- */
- if (!priv->comp || e_cal_component_is_instance (priv->comp))
- return;
-
- /* Create a scratch component with the start/end and
- * recurrence/exception information from the one we are editing.
- */
-
- comp = e_cal_component_new ();
- e_cal_component_set_new_vtype (comp, E_CAL_COMPONENT_EVENT);
-
- e_cal_component_get_dtstart (priv->comp, &cdt);
- if (cdt.tzid != NULL) {
- /* FIXME Will e_cal_get_timezone really not return builtin zones? */
- if (!e_cal_get_timezone (COMP_EDITOR_PAGE (rpage)->client, cdt.tzid, &zone, NULL))
- zone = icaltimezone_get_builtin_timezone_from_tzid (cdt.tzid);
- }
- e_cal_component_set_dtstart (comp, &cdt);
- e_cal_component_free_datetime (&cdt);
-
- e_cal_component_get_dtend (priv->comp, &cdt);
- e_cal_component_set_dtend (comp, &cdt);
- e_cal_component_free_datetime (&cdt);
-
- e_cal_component_get_exdate_list (priv->comp, &l);
- e_cal_component_set_exdate_list (comp, l);
- e_cal_component_free_exdate_list (l);
-
- e_cal_component_get_exrule_list (priv->comp, &l);
- e_cal_component_set_exrule_list (comp, l);
- e_cal_component_free_recur_list (l);
-
- e_cal_component_get_rdate_list (priv->comp, &l);
- e_cal_component_set_rdate_list (comp, l);
- e_cal_component_free_period_list (l);
-
- e_cal_component_get_rrule_list (priv->comp, &l);
- e_cal_component_set_rrule_list (comp, l);
- e_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, zone, TRUE, FALSE);
- g_object_unref(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, 6);
-
- wp = WEEKDAY_PICKER (weekday_picker_new ());
-
- priv->weekday_picker = GTK_WIDGET (wp);
- gtk_box_pack_start (GTK_BOX (hbox), GTK_WIDGET (wp), FALSE, FALSE, 6);
-
- 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);
-
- g_signal_connect((wp), "changed",
- G_CALLBACK (weekday_picker_changed_cb),
- rpage);
-}
-
-
-static void
-month_num_submenu_selection_done_cb (GtkMenuShell *menu_shell, gpointer data)
-{
- GtkWidget *item;
- int month_index;
-
- item = gtk_menu_get_active (GTK_MENU (menu_shell));
- item = gtk_menu_get_active (GTK_MENU (gtk_menu_item_get_submenu (GTK_MENU_ITEM (item))));
-
- month_index = GPOINTER_TO_INT (gtk_object_get_user_data (GTK_OBJECT (item)));
- gtk_object_set_user_data (GTK_OBJECT (data), GINT_TO_POINTER (month_index));
-}
-
-/* Creates the option menu for the monthly recurrence number */
-static GtkWidget *
-make_recur_month_num_submenu (const char *title, int start, int end)
-{
- GtkWidget *submenu, *item;
- int i;
-
- submenu = gtk_menu_new ();
- for (i = start; i < end; i++) {
- item = gtk_menu_item_new_with_label (_(e_cal_recur_nth[i]));
- gtk_menu_shell_append(GTK_MENU_SHELL(submenu), item);
- gtk_object_set_user_data (GTK_OBJECT (item), GINT_TO_POINTER (i + 1));
- gtk_widget_show (item);
- }
-
- item = gtk_menu_item_new_with_label (_(title));
- gtk_widget_show (item);
- gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), submenu);
-
- return item;
-}
-
-static GtkWidget *
-make_recur_month_num_menu (int month_index)
-{
- static const char *options[] = {
- N_("first"),
- N_("second"),
- N_("third"),
- N_("fourth"),
- N_("last")
- };
-
- GtkWidget *menu, *submenu, *item, *submenu_item;
- GtkWidget *omenu;
- int i;
-
- menu = gtk_menu_new ();
-
- /* Relation */
- for (i = 0; i < sizeof (options) / sizeof (options[0]); i++) {
- item = gtk_menu_item_new_with_label (_(options[i]));
- gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
- gtk_widget_show (item);
- }
-
- /* Current date */
- item = gtk_menu_item_new_with_label (_(e_cal_recur_nth[month_index - 1]));
- gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
- gtk_widget_show (item);
-
- /* Other Submenu */
- submenu = gtk_menu_new ();
- submenu_item = gtk_menu_item_new_with_label (_("Other Date"));
- gtk_menu_shell_append(GTK_MENU_SHELL(menu), submenu_item);
- gtk_widget_show (submenu_item);
-
- item = make_recur_month_num_submenu ("1st to 10th", 0, 10);
- gtk_menu_shell_append(GTK_MENU_SHELL(submenu), item);
- item = make_recur_month_num_submenu ("11th to 20th", 10, 20);
- gtk_menu_shell_append(GTK_MENU_SHELL(submenu), item);
- item = make_recur_month_num_submenu ("21st to 31st", 20, 31);
- gtk_menu_shell_append(GTK_MENU_SHELL(submenu), item);
-
- gtk_menu_item_set_submenu (GTK_MENU_ITEM (submenu_item), submenu);
- gtk_object_set_user_data (GTK_OBJECT (submenu_item), GINT_TO_POINTER (month_index));
- g_signal_connect((submenu), "selection_done",
- G_CALLBACK (month_num_submenu_selection_done_cb),
- submenu_item);
-
- omenu = gtk_option_menu_new ();
- gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu);
-
- return omenu;
-}
-
-/* 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_shell_append(GTK_MENU_SHELL(menu), item);
- gtk_widget_show (item);
- }
-
- omenu = gtk_option_menu_new ();
- gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu);
-
- return omenu;
-}
-
-static void
-month_num_menu_selection_done_cb (GtkMenuShell *menu_shell, gpointer data)
-{
- RecurrencePage *rpage;
- RecurrencePagePrivate *priv;
- enum month_num_options month_num;
- enum month_day_options month_day;
-
- rpage = RECURRENCE_PAGE (data);
- priv = rpage->priv;
-
- month_num = e_dialog_option_menu_get (priv->month_num_menu,
- month_num_options_map);
- month_day = e_dialog_option_menu_get (priv->month_day_menu,
- month_day_options_map);
-
- if (month_num == MONTH_NUM_OTHER) {
- GtkWidget *label, *item;
-
- item = gtk_menu_get_active (GTK_MENU (menu_shell));
- priv->month_index = GPOINTER_TO_INT (gtk_object_get_user_data (GTK_OBJECT (item)));
-
- month_num = MONTH_NUM_DAY;
- e_dialog_option_menu_set (priv->month_num_menu, month_num, month_num_options_map);
-
- label = GTK_BIN (priv->month_num_menu)->child;
- gtk_label_set_text (GTK_LABEL (label), _(e_cal_recur_nth[priv->month_index - 1]));
-
- e_dialog_option_menu_set (priv->month_num_menu, 0, month_num_options_map);
- e_dialog_option_menu_set (priv->month_num_menu, month_num, month_num_options_map);
- }
-
- if (month_num == MONTH_NUM_DAY && month_day != MONTH_DAY_NTH)
- e_dialog_option_menu_set (priv->month_day_menu,
- MONTH_DAY_NTH,
- month_day_options_map);
- else if (month_num != MONTH_NUM_DAY && month_num != MONTH_NUM_LAST && month_day == MONTH_DAY_NTH)
- e_dialog_option_menu_set (priv->month_day_menu,
- MONTH_DAY_MON,
- month_num_options_map);
- field_changed (rpage);
- preview_recur (rpage);
-}
-
-/* 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;
- RecurrencePagePrivate *priv;
- enum month_num_options month_num;
- enum month_day_options month_day;
-
- rpage = RECURRENCE_PAGE (data);
- priv = rpage->priv;
-
- month_num = e_dialog_option_menu_get (priv->month_num_menu,
- month_num_options_map);
- month_day = e_dialog_option_menu_get (priv->month_day_menu,
- month_day_options_map);
- if (month_day == MONTH_DAY_NTH && month_num != MONTH_NUM_LAST && month_num != MONTH_NUM_DAY)
- e_dialog_option_menu_set (priv->month_num_menu,
- MONTH_NUM_DAY,
- month_num_options_map);
- else if (month_day != MONTH_DAY_NTH && month_num == MONTH_NUM_DAY)
- e_dialog_option_menu_set (priv->month_num_menu,
- MONTH_NUM_FIRST,
- month_num_options_map);
- 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_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, 6);
-
- adj = GTK_ADJUSTMENT (gtk_adjustment_new (1, 1, 31, 1, 10, 10));
-
- priv->month_num_menu = make_recur_month_num_menu (priv->month_index);
- gtk_box_pack_start (GTK_BOX (hbox), priv->month_num_menu,
- FALSE, FALSE, 6);
-
- priv->month_day_menu = make_recur_month_menu ();
- gtk_box_pack_start (GTK_BOX (hbox), priv->month_day_menu,
- FALSE, FALSE, 6);
-
- gtk_widget_show_all (hbox);
-
- /* Set the options */
- e_dialog_option_menu_set (priv->month_num_menu,
- priv->month_num,
- month_num_options_map);
- e_dialog_option_menu_set (priv->month_day_menu,
- priv->month_day,
- month_day_options_map);
-
- g_signal_connect((adj), "value_changed", G_CALLBACK (month_index_value_changed_cb),
- rpage);
-
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->month_num_menu));
- g_signal_connect((menu), "selection_done",
- G_CALLBACK (month_num_menu_selection_done_cb),
- rpage);
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->month_day_menu));
- g_signal_connect((menu), "selection_done",
- G_CALLBACK (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 (priv->month_num_menu != NULL) {
- gtk_widget_destroy (priv->month_num_menu);
- priv->month_num_menu = NULL;
- }
- if (GTK_BIN (priv->special)->child != NULL) {
- gtk_widget_destroy (GTK_BIN (priv->special)->child);
-
- priv->weekday_picker = 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);
-
- g_signal_connect((de), "changed",
- G_CALLBACK (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_spin_button_set_numeric ((GtkSpinButton *)priv->ending_count_spin, TRUE);
- gtk_box_pack_start (GTK_BOX (hbox), priv->ending_count_spin,
- FALSE, FALSE, 6);
-
- label = gtk_label_new (_("occurrences"));
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 6);
-
- gtk_widget_show_all (hbox);
-
- /* Set the values */
-
- e_dialog_spin_set (priv->ending_count_spin, priv->ending_count);
-
- g_signal_connect((adj), "value_changed",
- G_CALLBACK (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));
- g_signal_handlers_block_matched (menu, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, 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 */
-
- if (!r->until.is_date) {
- ECal *client = COMP_EDITOR_PAGE (rpage)->client;
- ECalComponentDateTime dt;
- icaltimezone *from_zone, *to_zone;
-
- e_cal_component_get_dtstart (priv->comp, &dt);
-
- if (dt.value->is_date)
- to_zone = icaltimezone_get_builtin_timezone (calendar_config_get_timezone ());
- else if (dt.tzid == NULL)
- to_zone = icaltimezone_get_utc_timezone ();
- else
- /* FIXME Error checking? */
- e_cal_get_timezone (client, dt.tzid, &to_zone, NULL);
- from_zone = icaltimezone_get_utc_timezone ();
-
- icaltimezone_convert_time (&r->until, from_zone, to_zone);
-
- r->until.hour = 0;
- r->until.minute = 0;
- r->until.second = 0;
- r->until.is_date = TRUE;
- r->until.is_utc = FALSE;
- }
-
- 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);
- }
-
- g_signal_handlers_unblock_matched (menu, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, 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, ECalComponent *comp)
-{
- RecurrencePage *rpage;
- RecurrencePagePrivate *priv;
- ECalComponentText 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)
- g_object_unref (priv->comp);
-
- priv->comp = e_cal_component_clone (comp);
-
- /* Don't send off changes during this time */
- priv->updating = TRUE;
-
- /* Clean the page */
- clear_widgets (rpage);
-
- /* Summary */
- e_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 (!e_cal_component_has_rdates (comp)
- && !e_cal_component_has_rrules (comp)
- && !e_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 */
-
- e_cal_component_get_rrule_list (comp, &rrule_list);
- len = g_slist_length (rrule_list);
- if (len > 1
- || e_cal_component_has_rdates (comp)
- || e_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));
- g_signal_handlers_block_matched (menu, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- e_dialog_option_menu_set (priv->interval_unit,
- ICAL_DAILY_RECURRENCE,
- freq_map);
- g_signal_handlers_unblock_matched (menu, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, 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));
- g_signal_handlers_block_matched (menu, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- e_dialog_option_menu_set (priv->interval_unit,
- ICAL_WEEKLY_RECURRENCE,
- freq_map);
- g_signal_handlers_unblock_matched (menu, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, 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 > 1)
- goto custom;
-
- if (n_by_month_day == 1) {
- int nth;
-
- if (n_by_set_pos != 0)
- goto custom;
-
- nth = r->by_month_day[0];
- if (nth < 1 && nth != -1)
- goto custom;
-
- if (nth == -1) {
- ECalComponentDateTime dt;
-
- e_cal_component_get_dtstart (comp, &dt);
- priv->month_index = dt.value->day;
- priv->month_num = MONTH_NUM_LAST;
- } else {
- priv->month_index = nth;
- priv->month_num = MONTH_NUM_DAY;
- }
- priv->month_day = MONTH_DAY_NTH;
-
- } else if (n_by_day == 1) {
- enum icalrecurrencetype_weekday weekday;
- int pos;
- enum month_day_options month_day;
-
- /* Outlook 2000 uses BYDAY=TU;BYSETPOS=2, and will not
- accept BYDAY=2TU. So we now use the same as Outlook
- by default. */
-
- weekday = icalrecurrencetype_day_day_of_week (r->by_day[0]);
- pos = icalrecurrencetype_day_position (r->by_day[0]);
-
- if (pos == 0) {
- if (n_by_set_pos != 1)
- goto custom;
- pos = r->by_set_pos[0];
- } else if (pos < 0) {
- 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;
- }
-
- if (pos == -1)
- priv->month_num = MONTH_NUM_LAST;
- else
- priv->month_num = pos - 1;
- priv->month_day = month_day;
- } else
- goto custom;
-
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->interval_unit));
- g_signal_handlers_block_matched (menu, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- e_dialog_option_menu_set (priv->interval_unit,
- ICAL_MONTHLY_RECURRENCE,
- freq_map);
- g_signal_handlers_unblock_matched (menu, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, 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));
- g_signal_handlers_block_matched (menu, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- e_dialog_option_menu_set (priv->interval_unit,
- ICAL_YEARLY_RECURRENCE,
- freq_map);
- g_signal_handlers_unblock_matched (menu, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- break;
-
- default:
- goto custom;
- }
-
- /* If we got here it means it is a simple recurrence */
-
- g_signal_handlers_block_matched (priv->none, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- g_signal_handlers_block_matched (priv->simple, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- g_signal_handlers_block_matched (priv->custom, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- e_dialog_radio_set (priv->simple, RECUR_SIMPLE, type_map);
- g_signal_handlers_unblock_matched (priv->none, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- g_signal_handlers_unblock_matched (priv->simple, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- g_signal_handlers_unblock_matched (priv->custom, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, 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));
- g_signal_handlers_block_matched (adj, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- e_dialog_spin_set (priv->interval_value, r->interval);
- g_signal_handlers_unblock_matched (adj, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
-
- fill_ending_date (rpage, r);
-
- goto out;
-
- custom:
-
- g_signal_handlers_block_matched (priv->none, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- g_signal_handlers_block_matched (priv->simple, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- g_signal_handlers_block_matched (priv->custom, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- e_dialog_radio_set (priv->custom, RECUR_CUSTOM, type_map);
- g_signal_handlers_unblock_matched (priv->none, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- g_signal_handlers_unblock_matched (priv->simple, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- g_signal_handlers_unblock_matched (priv->custom, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
-
- gtk_widget_set_sensitive (priv->custom, TRUE);
- sensitize_recur_widgets (rpage);
-
- out:
-
- e_cal_component_free_recur_list (rrule_list);
- preview_recur (rpage);
-
- priv->updating = FALSE;
-}
-
-/* fill_component handler for the recurrence page */
-static gboolean
-recurrence_page_fill_component (CompEditorPage *page, ECalComponent *comp)
-{
- RecurrencePage *rpage;
-
- rpage = RECURRENCE_PAGE (page);
- return 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;
-
- rpage = RECURRENCE_PAGE (page);
- priv = rpage->priv;
-
- gtk_label_set_text (GTK_LABEL (priv->summary), summary);
-}
-
-/* set_dates handler for the recurrence page */
-static void
-recurrence_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates)
-{
- RecurrencePage *rpage;
- RecurrencePagePrivate *priv;
- ECalComponentDateTime 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;
- e_cal_component_set_dtstart (priv->comp, &dt);
- }
-
- if (dates->end) {
- icaltime = *dates->end->value;
- dt.tzid = dates->end->tzid;
- e_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) {
- 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)
-{
- CompEditorPage *page = COMP_EDITOR_PAGE (rpage);
- RecurrencePagePrivate *priv;
- GSList *accel_groups;
- GtkWidget *toplevel;
-
- priv = rpage->priv;
-
-#define GW(name) glade_xml_get_widget (priv->xml, name)
-
- priv->main = GW ("recurrence-page");
- if (!priv->main)
- return FALSE;
-
- /* Get the GtkAccelGroup from the toplevel window, so we can install
- it when the notebook page is mapped. */
- toplevel = gtk_widget_get_toplevel (priv->main);
- accel_groups = gtk_accel_groups_from_object (G_OBJECT (toplevel));
- if (accel_groups) {
- page->accel_group = accel_groups->data;
- gtk_accel_group_ref (page->accel_group);
- }
-
- gtk_widget_ref (priv->main);
- gtk_container_remove (GTK_CONTAINER (priv->main->parent), 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");
- gtk_widget_show (priv->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;
- ECalComponentDateTime 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;
- GtkTreeSelection *selection;
- ECalComponentDateTime dt;
- struct icaltimetype icaltime = icaltime_null_time ();
- struct icaltimetype *tt;
- GtkTreeIter iter;
-
- rpage = RECURRENCE_PAGE (data);
- priv = rpage->priv;
-
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->exception_list));
- if (!gtk_tree_selection_get_selected (selection, NULL, &iter)) {
- g_warning ("Could not get a selection to modify.");
- return;
- }
- field_changed (rpage);
-
- dt.value = &icaltime;
- 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;
-
- /* No TZID, since we are using a DATE value now. */
- dt.tzid = NULL;
-
- e_date_time_list_set_date_time (priv->exception_list_store, &iter, &dt);
- preview_recur (rpage);
-}
-
-/* Callback for the "delete exception" button */
-static void
-exception_delete_cb (GtkWidget *widget, gpointer data)
-{
- RecurrencePage *rpage;
- RecurrencePagePrivate *priv;
- GtkTreeSelection *selection;
- GtkTreeIter iter;
- GtkTreePath *path;
- gboolean valid_iter;
-
- rpage = RECURRENCE_PAGE (data);
- priv = rpage->priv;
-
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->exception_list));
- if (!gtk_tree_selection_get_selected (selection, NULL, &iter)) {
- g_warning ("Could not get a selection to delete.");
- return;
- }
-
- field_changed (rpage);
-
- path = gtk_tree_model_get_path (GTK_TREE_MODEL (priv->exception_list_store), &iter);
- e_date_time_list_remove (priv->exception_list_store, &iter);
-
- /* Select closest item after removal */
- valid_iter = gtk_tree_model_get_iter (GTK_TREE_MODEL (priv->exception_list_store), &iter, path);
- if (!valid_iter) {
- gtk_tree_path_prev (path);
- valid_iter = gtk_tree_model_get_iter (GTK_TREE_MODEL (priv->exception_list_store), &iter, path);
- }
-
- if (valid_iter)
- gtk_tree_selection_select_iter (selection, &iter);
-
- gtk_tree_path_free (path);
- 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_selection_changed_cb (GtkTreeSelection *selection, gpointer data)
-{
- RecurrencePage *rpage;
- RecurrencePagePrivate *priv;
- const ECalComponentDateTime *dt;
- struct icaltimetype *t;
- GtkTreeIter iter;
-
- rpage = RECURRENCE_PAGE (data);
- priv = rpage->priv;
-
- if (!gtk_tree_selection_get_selected (selection, NULL, &iter)) {
- gtk_widget_set_sensitive (priv->exception_modify, FALSE);
- gtk_widget_set_sensitive (priv->exception_delete, FALSE);
- return;
- }
-
- gtk_widget_set_sensitive (priv->exception_modify, TRUE);
- gtk_widget_set_sensitive (priv->exception_delete, TRUE);
-
- dt = e_date_time_list_get_date_time (priv->exception_list_store, &iter);
- 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;
- GtkTreeViewColumn *column;
- GtkCellRenderer *cell_renderer;
-
- priv = rpage->priv;
-
- /* Recurrence preview */
-
- priv->preview_calendar = e_calendar_new ();
- ecal = E_CALENDAR (priv->preview_calendar);
- priv->preview_calendar_config = e_mini_calendar_config_new (ecal);
- g_signal_connect((ecal->calitem), "date_range_changed",
- G_CALLBACK (preview_date_range_changed_cb),
- rpage);
- 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 */
-
- g_signal_connect((priv->none), "toggled",
- G_CALLBACK (type_toggled_cb), rpage);
- g_signal_connect((priv->simple), "toggled",
- G_CALLBACK (type_toggled_cb), rpage);
- g_signal_connect((priv->custom), "toggled",
- G_CALLBACK (type_toggled_cb), rpage);
-
- /* Recurrence interval */
-
- adj = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (priv->interval_value));
- g_signal_connect((adj), "value_changed",
- G_CALLBACK (interval_value_changed_cb),
- rpage);
-
- /* Recurrence units */
-
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->interval_unit));
- g_signal_connect((menu), "selection_done",
- G_CALLBACK (interval_selection_done_cb),
- rpage);
-
- /* Recurrence ending */
-
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->ending_menu));
- g_signal_connect((menu), "selection_done",
- G_CALLBACK (ending_selection_done_cb), rpage);
-
- /* Exception buttons */
-
- g_signal_connect((priv->exception_add), "clicked",
- G_CALLBACK (exception_add_cb), rpage);
- g_signal_connect((priv->exception_modify), "clicked",
- G_CALLBACK (exception_modify_cb), rpage);
- g_signal_connect((priv->exception_delete), "clicked",
- G_CALLBACK (exception_delete_cb), rpage);
-
- gtk_widget_set_sensitive (priv->exception_modify, FALSE);
- gtk_widget_set_sensitive (priv->exception_delete, FALSE);
-
- /* Exception list */
-
- /* Model */
- priv->exception_list_store = e_date_time_list_new ();
- gtk_tree_view_set_model (GTK_TREE_VIEW (priv->exception_list),
- GTK_TREE_MODEL (priv->exception_list_store));
-
- /* View */
- column = gtk_tree_view_column_new ();
- gtk_tree_view_column_set_title (column, _("Date/Time"));
- cell_renderer = GTK_CELL_RENDERER (gtk_cell_renderer_text_new ());
- gtk_tree_view_column_pack_start (column, cell_renderer, TRUE);
- gtk_tree_view_column_add_attribute (column, cell_renderer, "text", E_DATE_TIME_LIST_COLUMN_DESCRIPTION);
- gtk_tree_view_append_column (GTK_TREE_VIEW (priv->exception_list), column);
-
- g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->exception_list)), "changed",
- G_CALLBACK (exception_selection_changed_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, 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 = g_object_new (TYPE_RECURRENCE_PAGE, NULL);
- if (!recurrence_page_construct (rpage)) {
- g_object_unref (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 c5c2158979..0000000000
--- a/calendar/gui/dialogs/recurrence-page.glade
+++ /dev/null
@@ -1,724 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-
-<widget class="GtkWindow" id="recurrence-toplevel">
- <property name="title" translatable="yes">window1</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
-
- <child>
- <widget class="GtkVBox" id="recurrence-page">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkFrame" id="frame35">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkTable" id="table14">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label66">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Summary:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label67">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Date/Time:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="summary">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">4</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="date-time">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">4</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Basics</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox55">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkFrame" id="frame36">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkVBox" id="vbox56">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHBox" id="hbox56">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkRadioButton" id="none">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_No recurrence</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkRadioButton" id="simple">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Simple recurrence</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">none</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkRadioButton" id="custom">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Custom recurrence</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">none</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox57">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHBox" id="params">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child>
- <widget class="GtkLabel" id="label68">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Every</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkSpinButton" id="interval-value">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">True</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="snap_to_ticks">False</property>
- <property name="wrap">False</property>
- <property name="adjustment">1 1 10000 1 10 10</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="interval-unit">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget1">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget2">
- <property name="visible">True</property>
- <property name="label" translatable="yes">day(s)</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">week(s)</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget4">
- <property name="visible">True</property>
- <property name="label" translatable="yes">month(s)</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget5">
- <property name="visible">True</property>
- <property name="label" translatable="yes">year(s)</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="special">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
-
- <child>
- <placeholder/>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="ending-menu">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget6">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget7">
- <property name="visible">True</property>
- <property name="label" translatable="yes">for</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget8">
- <property name="visible">True</property>
- <property name="label" translatable="yes">until</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget9">
- <property name="visible">True</property>
- <property name="label" translatable="yes">forever</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="ending-special">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
-
- <child>
- <placeholder/>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="custom-warning-bin">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
-
- <child>
- <placeholder/>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label68">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Recurrence Rule</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox59">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkFrame" id="frame37">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkHBox" id="hbox60">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkVBox" id="vbox57">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">4</property>
-
- <child>
- <widget class="GtkButton" id="exception-add">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">A_dd</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="exception-modify">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Modify</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="exception-delete">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Remove</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox58">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="Custom" id="exception-date">
- <property name="visible">True</property>
- <property name="creation_function">make_exdate_date_edit</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Tue, 16 May 2000 01:42:29 GMT</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow14">
- <property name="visible">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTreeView" id="exception-list">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">True</property>
- <property name="rules_hint">False</property>
- <property name="reorderable">False</property>
- <property name="enable_search">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label69">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Exceptions</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox59">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label70">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Preview</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="preview-bin">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
-
- <child>
- <placeholder/>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/calendar/gui/dialogs/recurrence-page.h b/calendar/gui/dialogs/recurrence-page.h
deleted file mode 100644
index 7a10eff069..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-2003 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>
- * Hans Petter Jansson <hpj@ximian.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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"
-
-G_BEGIN_DECLS
-
-
-
-#define TYPE_RECURRENCE_PAGE (recurrence_page_get_type ())
-#define RECURRENCE_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_RECURRENCE_PAGE, RecurrencePage))
-#define RECURRENCE_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_RECURRENCE_PAGE, RecurrencePageClass))
-#define IS_RECURRENCE_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_RECURRENCE_PAGE))
-#define IS_RECURRENCE_PAGE_CLASS(klass) (G_TYPE_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);
-
-
-
-G_END_DECLS
-
-#endif
diff --git a/calendar/gui/dialogs/save-comp.c b/calendar/gui/dialogs/save-comp.c
deleted file mode 100644
index 8041395fb1..0000000000
--- a/calendar/gui/dialogs/save-comp.c
+++ /dev/null
@@ -1,70 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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-i18n.h>
-#include <gtk/gtkmessagedialog.h>
-#include <gtk/gtkstock.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: the response_id of the button selected.
- **/
-
-GtkResponseType
-save_component_dialog (GtkWindow *parent)
-{
- GtkWidget *dialog;
- gint r;
-
- dialog = gtk_message_dialog_new (GTK_WINDOW (parent),
- GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE,
- _("This event has been changed, but has not been saved.\n\n"
- "Do you wish to save your changes?"));
-
- gtk_dialog_add_buttons (GTK_DIALOG (dialog),
- _("_Discard Changes"),GTK_RESPONSE_NO,
- GTK_STOCK_CANCEL,GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE, GTK_RESPONSE_YES,
- NULL);
-
- gtk_window_set_title (GTK_WINDOW (dialog), _("Save Event"));
- gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_YES);
-
- r = gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
-
- return r;
-
-}
diff --git a/calendar/gui/dialogs/save-comp.h b/calendar/gui/dialogs/save-comp.h
deleted file mode 100644
index a9aedd2bce..0000000000
--- a/calendar/gui/dialogs/save-comp.h
+++ /dev/null
@@ -1,29 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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/gtkdialog.h>
-
-GtkResponseType 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 fc91916345..0000000000
--- a/calendar/gui/dialogs/schedule-page.c
+++ /dev/null
@@ -1,517 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <gtk/gtksignal.h>
-#include <gtk/gtktogglebutton.h>
-#include <gtk/gtkvbox.h>
-#include <gtk/gtkwindow.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-dialog-util.h>
-#include <glade/glade.h>
-#include <gal/widgets/e-popup-menu.h>
-#include <e-util/e-dialog-widgets.h>
-#include "../calendar-config.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 */
- EMeetingStore *model;
-
- /* Selector */
- EMeetingTimeSelector *sel;
-
- /* The timezone we use. Note that we use the same timezone for the
- start and end date. We convert the end date if it is passed in in
- another timezone. */
- icaltimezone *zone;
-
- gboolean updating;
-};
-
-
-
-static void schedule_page_class_init (SchedulePageClass *class);
-static void schedule_page_init (SchedulePage *spage);
-static void schedule_page_finalize (GObject *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, ECalComponent *comp);
-static gboolean schedule_page_fill_component (CompEditorPage *page, ECalComponent *comp);
-static void schedule_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates);
-
-static void times_changed_cb (GtkWidget *widget, gpointer data);
-
-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.
- **/
-
-E_MAKE_TYPE (schedule_page, "SchedulePage", SchedulePage, schedule_page_class_init,
- schedule_page_init, TYPE_COMP_EDITOR_PAGE);
-
-/* Class initialization function for the schedule page */
-static void
-schedule_page_class_init (SchedulePageClass *class)
-{
- CompEditorPageClass *editor_page_class;
- GObjectClass *object_class;
-
- editor_page_class = (CompEditorPageClass *) class;
- object_class = (GObjectClass *) class;
-
- parent_class = g_type_class_ref (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 = schedule_page_set_dates;
-
- object_class->finalize = schedule_page_finalize;
-}
-
-/* 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->zone = NULL;
-
- priv->updating = FALSE;
-}
-
-/* Destroy handler for the schedule page */
-static void
-schedule_page_finalize (GObject *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->main)
- gtk_widget_unref (priv->main);
-
- if (priv->xml) {
- g_object_unref (priv->xml);
- priv->xml = NULL;
- }
-
- g_object_unref(priv->model);
-
- g_free (priv);
- spage->priv = NULL;
-
- if (G_OBJECT_CLASS (parent_class)->finalize)
- (* G_OBJECT_CLASS (parent_class)->finalize) (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));
-}
-
-/* Set date/time */
-static void
-update_time (SchedulePage *spage, ECalComponentDateTime *start_date, ECalComponentDateTime *end_date)
-{
- SchedulePagePrivate *priv;
- struct icaltimetype start_tt, end_tt;
- icaltimezone *start_zone = NULL, *end_zone = NULL;
- gboolean all_day;
-
- priv = spage->priv;
-
- /* 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) {
- if (!e_cal_get_timezone (COMP_EDITOR_PAGE (spage)->client,
- start_date->tzid, &start_zone, NULL)) {
- /* FIXME: Handle error better. */
- g_warning ("Couldn't get timezone from server: %s",
- start_date->tzid ? start_date->tzid : "");
- }
- }
-
- end_zone = icaltimezone_get_builtin_timezone_from_tzid (end_date->tzid);
- if (!end_zone) {
- if (!e_cal_get_timezone (COMP_EDITOR_PAGE (spage)->client,
- end_date->tzid, &end_zone, NULL)) {
- /* FIXME: Handle error better. */
- g_warning ("Couldn't get timezone from server: %s",
- end_date->tzid ? end_date->tzid : "");
- }
- }
-
- start_tt = *start_date->value;
- if (!end_date->value && start_tt.is_date) {
- end_tt = start_tt;
- icaltime_adjust (&end_tt, 1, 0, 0, 0);
- } else {
- end_tt = *end_date->value;
- }
-
- /* If the end zone is not the same as the start zone, we convert it. */
- priv->zone = start_zone;
- if (start_zone != end_zone) {
- icaltimezone_convert_time (&end_tt, end_zone, start_zone);
- }
- e_meeting_store_set_zone (priv->model, priv->zone);
-
- all_day = (start_tt.is_date && end_tt.is_date) ? TRUE : FALSE;
-
- /* For All Day Events, if DTEND is after DTSTART, we subtract 1 day
- from it. */
- if (all_day) {
- if (icaltime_compare_date_only (end_tt, start_tt) > 0) {
- icaltime_adjust (&end_tt, -1, 0, 0, 0);
- }
- }
-
- e_meeting_time_selector_set_all_day (priv->sel, all_day);
-
- e_date_edit_set_date (E_DATE_EDIT (priv->sel->start_date_edit), start_tt.year,
- start_tt.month, start_tt.day);
- e_date_edit_set_time_of_day (E_DATE_EDIT (priv->sel->start_date_edit),
- start_tt.hour, start_tt.minute);
-
- e_date_edit_set_date (E_DATE_EDIT (priv->sel->end_date_edit), end_tt.year,
- end_tt.month, end_tt.day);
- e_date_edit_set_time_of_day (E_DATE_EDIT (priv->sel->end_date_edit),
- end_tt.hour, end_tt.minute);
-
-}
-
-
-/* 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, ECalComponent *comp)
-{
- SchedulePage *spage;
- SchedulePagePrivate *priv;
- ECalComponentDateTime start_date, end_date;
-
- spage = SCHEDULE_PAGE (page);
- priv = spage->priv;
-
- priv->updating = TRUE;
-
- /* Clean the screen */
- clear_widgets (spage);
-
- /* Start and end times */
- e_cal_component_get_dtstart (comp, &start_date);
- e_cal_component_get_dtend (comp, &end_date);
- update_time (spage, &start_date, &end_date);
-
- e_cal_component_free_datetime (&start_date);
- e_cal_component_free_datetime (&end_date);
-
- priv->updating = FALSE;
-}
-
-/* fill_component handler for the schedule page */
-static gboolean
-schedule_page_fill_component (CompEditorPage *page, ECalComponent *comp)
-{
- SchedulePage *spage;
- SchedulePagePrivate *priv;
-
- spage = SCHEDULE_PAGE (page);
- priv = spage->priv;
-
- return TRUE;
-}
-
-static void
-schedule_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates)
-{
- SchedulePage *spage;
- SchedulePagePrivate *priv;
-
- spage = SCHEDULE_PAGE (page);
- priv = spage->priv;
-
- priv->updating = TRUE;
-
- update_time (spage, dates->start, dates->end);
-
- priv->updating = FALSE;
-}
-
-
-
-/* Gets the widgets from the XML file and returns if they are all available. */
-static gboolean
-get_widgets (SchedulePage *spage)
-{
- CompEditorPage *page = COMP_EDITOR_PAGE (spage);
- SchedulePagePrivate *priv;
- GSList *accel_groups;
- GtkWidget *toplevel;
-
- priv = spage->priv;
-
-#define GW(name) glade_xml_get_widget (priv->xml, name)
-
- priv->main = GW ("schedule-page");
- if (!priv->main)
- return FALSE;
-
- /* Get the GtkAccelGroup from the toplevel window, so we can install
- it when the notebook page is mapped. */
- toplevel = gtk_widget_get_toplevel (priv->main);
- accel_groups = gtk_accel_groups_from_object (G_OBJECT (toplevel));
- if (accel_groups) {
- page->accel_group = accel_groups->data;
- gtk_accel_group_ref (page->accel_group);
- }
-
- gtk_widget_ref (priv->main);
- gtk_container_remove (GTK_CONTAINER (priv->main->parent), priv->main);
-
-#undef GW
-
- return TRUE;
-}
-
-static gboolean
-init_widgets (SchedulePage *spage)
-{
- SchedulePagePrivate *priv;
-
- priv = spage->priv;
-
- g_signal_connect((priv->sel),
- "changed", G_CALLBACK (times_changed_cb), spage);
-
- 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, EMeetingStore *ems)
-{
- SchedulePagePrivate *priv;
-
- priv = spage->priv;
-
- priv->xml = glade_xml_new (EVOLUTION_GLADEDIR
- "/schedule-page.glade", NULL, 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 */
- g_object_ref (ems);
- priv->model = ems;
-
- /* Selector */
- priv->sel = E_MEETING_TIME_SELECTOR (e_meeting_time_selector_new (ems));
- e_meeting_time_selector_set_working_hours (priv->sel,
- calendar_config_get_day_start_hour (),
- calendar_config_get_day_start_minute (),
- calendar_config_get_day_end_hour (),
- calendar_config_get_day_end_minute ());
- gtk_widget_show (GTK_WIDGET (priv->sel));
- gtk_box_pack_start (GTK_BOX (priv->main), GTK_WIDGET (priv->sel), TRUE, TRUE, 6);
-
- if (!init_widgets (spage)) {
- g_message ("schedule_page_construct(): "
- "Could not initialize the widgets!");
- return NULL;
- }
-
- 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 (EMeetingStore *ems)
-{
- SchedulePage *spage;
-
- spage = g_object_new (TYPE_SCHEDULE_PAGE, NULL);
- if (!schedule_page_construct (spage, ems)) {
- g_object_unref (spage);
- return NULL;
- }
-
- return spage;
-}
-
-static void
-times_changed_cb (GtkWidget *widget, gpointer data)
-{
- SchedulePage *spage = data;
- SchedulePagePrivate *priv;
- CompEditorPageDates dates;
- ECalComponentDateTime start_dt, end_dt;
- struct icaltimetype start_tt = icaltime_null_time ();
- struct icaltimetype end_tt = icaltime_null_time ();
-
- priv = spage->priv;
-
- if (priv->updating)
- return;
-
- e_date_edit_get_date (E_DATE_EDIT (priv->sel->start_date_edit),
- &start_tt.year,
- &start_tt.month,
- &start_tt.day);
- e_date_edit_get_time_of_day (E_DATE_EDIT (priv->sel->start_date_edit),
- &start_tt.hour,
- &start_tt.minute);
- e_date_edit_get_date (E_DATE_EDIT (priv->sel->end_date_edit),
- &end_tt.year,
- &end_tt.month,
- &end_tt.day);
- e_date_edit_get_time_of_day (E_DATE_EDIT (priv->sel->end_date_edit),
- &end_tt.hour,
- &end_tt.minute);
-
- start_dt.value = &start_tt;
- end_dt.value = &end_tt;
-
- if (e_date_edit_get_show_time (E_DATE_EDIT (priv->sel->start_date_edit))) {
- /* We set the start and end to the same timezone. */
- start_dt.tzid = icaltimezone_get_tzid (priv->zone);
- end_dt.tzid = start_dt.tzid;
- } else {
- /* For All-Day Events, we set the timezone to NULL, and add
- 1 day to DTEND. */
- start_dt.value->is_date = TRUE;
- start_dt.tzid = NULL;
- end_dt.value->is_date = TRUE;
- icaltime_adjust (&end_tt, 1, 0, 0, 0);
- end_dt.tzid = NULL;
- }
-
- dates.start = &start_dt;
- dates.end = &end_dt;
- dates.due = NULL;
- dates.complete = NULL;
-
- comp_editor_page_notify_dates_changed (COMP_EDITOR_PAGE (spage),
- &dates);
-}
diff --git a/calendar/gui/dialogs/schedule-page.glade b/calendar/gui/dialogs/schedule-page.glade
deleted file mode 100644
index 2ef8a1d9f5..0000000000
--- a/calendar/gui/dialogs/schedule-page.glade
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-
-<widget class="GtkWindow" id="schedule-toplevel">
- <property name="title" translatable="yes">window1</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
-
- <child>
- <widget class="GtkVBox" id="schedule-page">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/calendar/gui/dialogs/schedule-page.h b/calendar/gui/dialogs/schedule-page.h
deleted file mode 100644
index d4c7eafbdd..0000000000
--- a/calendar/gui/dialogs/schedule-page.h
+++ /dev/null
@@ -1,59 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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-store.h"
-#include "comp-editor-page.h"
-
-G_BEGIN_DECLS
-
-
-
-#define TYPE_SCHEDULE_PAGE (schedule_page_get_type ())
-#define SCHEDULE_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SCHEDULE_PAGE, SchedulePage))
-#define SCHEDULE_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SCHEDULE_PAGE, SchedulePageClass))
-#define IS_SCHEDULE_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SCHEDULE_PAGE))
-#define IS_SCHEDULE_PAGE_CLASS(klass) (G_TYPE_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, EMeetingStore *ems);
-SchedulePage *schedule_page_new (EMeetingStore *ems);
-
-
-
-G_END_DECLS
-
-#endif
diff --git a/calendar/gui/dialogs/send-comp.c b/calendar/gui/dialogs/send-comp.c
deleted file mode 100644
index 65e4743c04..0000000000
--- a/calendar/gui/dialogs/send-comp.c
+++ /dev/null
@@ -1,93 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <gtk/gtkmessagedialog.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-uidefs.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 (GtkWindow *parent, ECal *client, ECalComponent *comp, gboolean new)
-{
- GtkWidget *dialog;
- ECalComponentVType vtype;
- char *str;
- gint response;
-
- if (e_cal_get_save_schedules (client))
- return FALSE;
-
- vtype = e_cal_component_get_vtype (comp);
-
- switch (vtype) {
- case E_CAL_COMPONENT_EVENT:
- if (new)
- str = g_strdup_printf (_("The meeting information has "
- "been created. Send it?"));
- else
- str = g_strdup_printf (_("The meeting information has "
- "changed. Send an updated "
- "version?"));
- break;
-
- case E_CAL_COMPONENT_TODO:
- if (new)
- str = g_strdup_printf (_("The task assignment "
- "information has been "
- "created. Send it?"));
- else
- str = g_strdup_printf (_("The task information has "
- "changed. Send an updated "
- "version?"));
- break;
-
- default:
- g_message ("send_component_dialog(): "
- "Cannot handle object of type %d", vtype);
- return FALSE;
- }
-
- dialog = gtk_message_dialog_new (parent, GTK_DIALOG_MODAL,
- GTK_MESSAGE_QUESTION,
- GTK_BUTTONS_YES_NO, str);
-
- response = gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
-
- if (response == GTK_RESPONSE_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 86be94ccdb..0000000000
--- a/calendar/gui/dialogs/send-comp.h
+++ /dev/null
@@ -1,31 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 <gtk/gtkwindow.h>
-#include <libecal/e-cal.h>
-#include <libecal/e-cal-component.h>
-
-gboolean send_component_dialog (GtkWindow *parent, ECal *client, ECalComponent *comp, gboolean new);
-
-#endif
diff --git a/calendar/gui/dialogs/task-details-page.c b/calendar/gui/dialogs/task-details-page.c
deleted file mode 100644
index 5d75c9b39a..0000000000
--- a/calendar/gui/dialogs/task-details-page.c
+++ /dev/null
@@ -1,781 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <libgnome/gnome-i18n.h>
-#include <glade/glade.h>
-#include <widgets/misc/e-dateedit.h>
-#include <widgets/misc/e-url-entry.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 *date_completed_label;
- GtkWidget *completed_date;
-
- GtkWidget *url_label;
- GtkWidget *url_entry;
- GtkWidget *url;
-
- gboolean updating;
-};
-
-/* Note that these two arrays must match. */
-static const int status_map[] = {
- ICAL_STATUS_NONE,
- 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_finalize (GObject *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, ECalComponent *comp);
-static gboolean task_details_page_fill_component (CompEditorPage *page, ECalComponent *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.
- **/
-
-E_MAKE_TYPE (task_details_page, "TaskDetailsPage", TaskDetailsPage, task_details_page_class_init,
- task_details_page_init, TYPE_COMP_EDITOR_PAGE);
-
-/* Class initialization function for the task page */
-static void
-task_details_page_class_init (TaskDetailsPageClass *class)
-{
- CompEditorPageClass *editor_page_class;
- GObjectClass *object_class;
-
- editor_page_class = (CompEditorPageClass *) class;
- object_class = (GObjectClass *) class;
-
- parent_class = g_type_class_ref(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->finalize = task_details_page_finalize;
-}
-
-/* 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->date_completed_label = NULL;
- priv->completed_date = NULL;
-
- priv->url_label = NULL;
- priv->url_entry = NULL;
- priv->url = NULL;
-
- priv->updating = FALSE;
-}
-
-/* Destroy handler for the task page */
-static void
-task_details_page_finalize (GObject *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->main)
- gtk_widget_unref (priv->main);
-
- if (priv->xml) {
- g_object_unref (priv->xml);
- priv->xml = NULL;
- }
-
- g_free (priv);
- tdpage->priv = NULL;
-
- if (G_OBJECT_CLASS (parent_class)->finalize)
- (* G_OBJECT_CLASS (parent_class)->finalize) (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, ECalComponent *comp)
-{
- TaskDetailsPage *tdpage;
- TaskDetailsPagePrivate *priv;
- int *priority_value, *percent = NULL;
- 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. */
- e_cal_component_get_percent (comp, &percent);
- if (percent) {
- e_dialog_spin_set (priv->percent_complete, *percent);
- } else {
- /* FIXME: Could check if task is completed and set 100%. */
- e_dialog_spin_set (priv->percent_complete, 0);
- }
-
- /* Status. */
- e_cal_component_get_status (comp, &status);
- if (status == ICAL_STATUS_NONE || status == ICAL_STATUS_NEEDSACTION) {
- /* Try to use the percent value. */
- if (percent) {
- if (*percent == 100)
- status = ICAL_STATUS_COMPLETED;
- else if (*percent > 0)
- status = ICAL_STATUS_INPROCESS;
- else
- status = ICAL_STATUS_NONE;
- } else
- status = ICAL_STATUS_NONE;
- }
- e_dialog_option_menu_set (priv->status, status, status_map);
-
- if (percent)
- e_cal_component_free_percent (percent);
-
- /* Completed Date. */
- e_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);
-
- e_cal_component_free_icaltimetype (completed);
- }
-
- /* Priority. */
- e_cal_component_get_priority (comp, &priority_value);
- if (priority_value) {
- priority = priority_value_to_index (*priority_value);
- e_cal_component_free_priority (priority_value);
- } else {
- priority = PRIORITY_UNDEFINED;
- }
- e_dialog_option_menu_set (priv->priority, priority, priority_map);
-
- /* URL */
- e_cal_component_get_url (comp, &url);
- e_dialog_editable_set (priv->url, url);
-
- priv->updating = FALSE;
-}
-
-/* fill_component handler for the task page */
-static gboolean
-task_details_page_fill_component (CompEditorPage *page, ECalComponent *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);
- e_cal_component_set_percent (comp, &percent);
-
- /* Status. */
- status = e_dialog_option_menu_get (priv->status, status_map);
- e_cal_component_set_status (comp, status);
-
- /* Priority. */
- priority = e_dialog_option_menu_get (priv->priority, priority_map);
- priority_value = priority_index_to_value (priority);
- e_cal_component_set_priority (comp, &priority_value);
-
- icaltime = icaltime_null_time ();
-
- /* COMPLETED must be in UTC. */
- icaltime.is_utc = 1;
-
- /* Completed Date. */
- if (!e_date_edit_date_is_valid (E_DATE_EDIT (priv->completed_date)) ||
- !e_date_edit_time_is_valid (E_DATE_EDIT (priv->completed_date))) {
- comp_editor_page_display_validation_error (page, _("Completed date is wrong"), priv->completed_date);
- return FALSE;
- }
-
- 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 ());
- e_cal_component_set_completed (comp, &icaltime);
- } else {
- e_cal_component_set_completed (comp, NULL);
- }
-
- /* URL. */
- url = e_dialog_editable_get (priv->url);
- e_cal_component_set_url (comp, url);
- if (url)
- g_free (url);
-
- return TRUE;
-}
-
-
-
-/* Gets the widgets from the XML file and returns if they are all available. */
-static gboolean
-get_widgets (TaskDetailsPage *tdpage)
-{
- CompEditorPage *page = COMP_EDITOR_PAGE (tdpage);
- TaskDetailsPagePrivate *priv;
- GSList *accel_groups;
- GtkWidget *toplevel;
-
- priv = tdpage->priv;
-
-#define GW(name) glade_xml_get_widget (priv->xml, name)
-
- priv->main = GW ("task-details-page");
- if (!priv->main)
- return FALSE;
-
- /* Get the GtkAccelGroup from the toplevel window, so we can install
- it when the notebook page is mapped. */
- toplevel = gtk_widget_get_toplevel (priv->main);
- accel_groups = gtk_accel_groups_from_object (G_OBJECT (toplevel));
- if (accel_groups) {
- page->accel_group = accel_groups->data;
- gtk_accel_group_ref (page->accel_group);
- }
-
- gtk_widget_ref (priv->main);
- gtk_container_remove (GTK_CONTAINER (priv->main->parent), priv->main);
-
- priv->status = GW ("status");
- priv->priority = GW ("priority");
- priv->percent_complete = GW ("percent-complete");
-
- priv->date_completed_label = GW ("date_completed_label");
-
- priv->completed_date = GW ("completed-date");
- gtk_widget_show (priv->completed_date);
-
- priv->url_label = GW ("url_label");
-
- priv->url_entry = GW ("url_entry");
- gtk_widget_show (priv->url_entry);
- priv->url = e_url_entry_get_entry (E_URL_ENTRY (priv->url_entry));
-
-#undef GW
-
- return (priv->status
- && priv->priority
- && priv->percent_complete
- && priv->date_completed_label
- && priv->completed_date
- && priv->url_label
- && 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 = icaltime_null_time ();
- 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_NONE,
- 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_NONE) {
- 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) {
- gint percent_complete = e_dialog_spin_get_int (priv->percent_complete);
- if (percent_complete <= 0 || percent_complete >= 100)
- 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_NONE;
- 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);
-
- /* These are created by hand, so hook the mnemonics manually */
- gtk_label_set_mnemonic_widget (GTK_LABEL (priv->date_completed_label), priv->completed_date);
- gtk_label_set_mnemonic_widget (GTK_LABEL (priv->url_label), priv->url_entry);
-
- /* Connect signals. The Status, Percent Complete & Date Completed
- properties are closely related so whenever one changes we may need
- to update the other 2. */
- g_signal_connect((GTK_OPTION_MENU (priv->status)->menu),
- "deactivate",
- G_CALLBACK (status_changed), tdpage);
-
- g_signal_connect((GTK_SPIN_BUTTON (priv->percent_complete)->adjustment),
- "value_changed",
- G_CALLBACK (percent_complete_changed), tdpage);
-
- /* Priority */
- g_signal_connect((GTK_OPTION_MENU (priv->priority)->menu),
- "deactivate",
- G_CALLBACK (field_changed_cb), tdpage);
-
- /* Completed Date */
- g_signal_connect((priv->completed_date), "changed",
- G_CALLBACK (date_changed_cb), tdpage);
-
- /* URL */
- g_signal_connect((priv->url), "changed",
- G_CALLBACK (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, 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 = g_object_new (TYPE_TASK_DETAILS_PAGE, NULL);
- if (!task_details_page_construct (tdpage)) {
- g_object_unref (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 23c34c116c..0000000000
--- a/calendar/gui/dialogs/task-details-page.glade
+++ /dev/null
@@ -1,384 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-
-<widget class="GtkWindow" id="task-details-toplevel">
- <property name="title" translatable="yes">window1</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
-
- <child>
- <widget class="GtkVBox" id="task-details-page">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkFrame" id="frame2">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkVBox" id="vbox1">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHBox" id="hbox1">
- <property name="border_width">4</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label17">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Status:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">status</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="status">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget1">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget2">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Not Started</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">In Progress</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget5">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Completed</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget6">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Cancelled</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label18">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Priority:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">priority</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="priority">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget7">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget8">
- <property name="visible">True</property>
- <property name="label" translatable="yes">High</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget9">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Normal</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget10">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Low</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget11">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Undefined</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label19">
- <property name="visible">True</property>
- <property name="label" translatable="yes">% _Complete</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">percent-complete</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkSpinButton" id="percent-complete">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">True</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="snap_to_ticks">False</property>
- <property name="wrap">False</property>
- <property name="adjustment">1 0 100 1 10 10</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTable" id="table1">
- <property name="border_width">4</property>
- <property name="visible">True</property>
- <property name="n_rows">1</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">2</property>
- <property name="column_spacing">4</property>
-
- <child>
- <widget class="GtkLabel" id="date_completed_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Date Completed:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="completed-date">
- <property name="visible">True</property>
- <property name="creation_function">task_details_page_create_date_edit</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Fri, 01 Jun 2001 18:58:51 GMT</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Progress</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTable" id="table2">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="n_rows">1</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="url_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Web Page:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="url_entry">
- <property name="visible">True</property>
- <property name="creation_function">e_url_entry_new</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Fri, 08 Feb 2002 21:02:37 GMT</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/calendar/gui/dialogs/task-details-page.h b/calendar/gui/dialogs/task-details-page.h
deleted file mode 100644
index 98b6832bbf..0000000000
--- a/calendar/gui/dialogs/task-details-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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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"
-
-G_BEGIN_DECLS
-
-
-
-#define TYPE_TASK_DETAILS_PAGE (task_details_page_get_type ())
-#define TASK_DETAILS_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TASK_DETAILS_PAGE, TaskDetailsPage))
-#define TASK_DETAILS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TASK_DETAILS_PAGE, TaskDetailsPageClass))
-#define IS_TASK_DETAILS_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TASK_DETAILS_PAGE))
-#define IS_TASK_DETAILS_PAGE_CLASS(klass) (G_TYPE_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);
-
-
-
-G_END_DECLS
-
-#endif
diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c
deleted file mode 100644
index 166dc538ba..0000000000
--- a/calendar/gui/dialogs/task-editor.c
+++ /dev/null
@@ -1,486 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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/util/e-util.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;
-
- EMeetingStore *model;
-
- gboolean assignment_shown;
- gboolean updating;
-};
-
-
-
-static void task_editor_class_init (TaskEditorClass *class);
-static void task_editor_init (TaskEditor *te);
-static void task_editor_set_e_cal (CompEditor *editor, ECal *client);
-static void task_editor_edit_comp (CompEditor *editor, ECalComponent *comp);
-static gboolean task_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method);
-static void task_editor_finalize (GObject *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_change_insert_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data);
-static void model_row_delete_cb (GtkTreeModel *model, GtkTreePath *path, 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.
- **/
-
-E_MAKE_TYPE (task_editor, "TaskEditor", TaskEditor, task_editor_class_init, task_editor_init,
- TYPE_COMP_EDITOR);
-
-/* Class initialization function for the event editor */
-static void
-task_editor_class_init (TaskEditorClass *klass)
-{
- GObjectClass *object_class;
- CompEditorClass *editor_class;
-
- object_class = (GObjectClass *) klass;
- editor_class = (CompEditorClass *) klass;
-
- parent_class = g_type_class_ref(TYPE_COMP_EDITOR);
-
- editor_class->set_e_cal = task_editor_set_e_cal;
- editor_class->edit_comp = task_editor_edit_comp;
- editor_class->send_comp = task_editor_send_comp;
-
- object_class->finalize = task_editor_finalize;
-}
-
-static void
-set_menu_sens (TaskEditor *te)
-{
- TaskEditorPrivate *priv;
- gboolean sens, existing, user, read_only = TRUE;
-
- priv = te->priv;
-
- existing = comp_editor_get_existing_org (COMP_EDITOR (te));
- user = comp_editor_get_user_org (COMP_EDITOR (te));
-
- e_cal_is_read_only (comp_editor_get_e_cal (COMP_EDITOR (te)), &read_only, NULL);
-
- sens = e_cal_get_static_capability (comp_editor_get_e_cal (COMP_EDITOR (te)),
- CAL_STATIC_CAPABILITY_NO_TASK_ASSIGNMENT)
- || priv->assignment_shown || read_only;
- comp_editor_set_ui_prop (COMP_EDITOR (te),
- "/commands/ActionAssignTask",
- "sensitive", sens ? "0" : "1");
-
- sens = priv->assignment_shown && existing && !user && !read_only;
- comp_editor_set_ui_prop (COMP_EDITOR (te),
- "/commands/ActionRefreshTask",
- "sensitive", sens ? "1" : "0");
-
- sens = priv->assignment_shown && existing && user && !read_only;
- comp_editor_set_ui_prop (COMP_EDITOR (te),
- "/commands/ActionCancelTask",
- "sensitive", sens ? "1" : "0");
-
- comp_editor_set_ui_prop (COMP_EDITOR (te),
- "/commands/FileSave",
- "sensitive", read_only ? "0" : "1");
- comp_editor_set_ui_prop (COMP_EDITOR (te),
- "/commands/FileSaveAndClose",
- "sensitive", read_only ? "0" : "1");
- comp_editor_set_ui_prop (COMP_EDITOR (te),
- "/commands/FileDelete",
- "sensitive", read_only ? "0" : "1");
-}
-
-static void
-init_widgets (TaskEditor *te)
-{
- TaskEditorPrivate *priv;
-
- priv = te->priv;
-
- g_signal_connect((priv->model), "row_changed",
- G_CALLBACK (model_row_change_insert_cb), te);
- g_signal_connect((priv->model), "row_inserted",
- G_CALLBACK (model_row_change_insert_cb), te);
- g_signal_connect((priv->model), "row_deleted",
- G_CALLBACK (model_row_delete_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->model = E_MEETING_STORE (e_meeting_store_new ());
- priv->assignment_shown = TRUE;
- priv->updating = FALSE;
-
-}
-
-TaskEditor *
-task_editor_construct (TaskEditor *te, ECal *client)
-{
- TaskEditorPrivate *priv;
-
- priv = te->priv;
-
- priv->task_page = task_page_new ();
- g_object_ref (priv->task_page);
- gtk_object_sink (GTK_OBJECT (priv->task_page));
- comp_editor_append_page (COMP_EDITOR (te),
- COMP_EDITOR_PAGE (priv->task_page),
- _("Basic"));
-
- priv->task_details_page = task_details_page_new ();
- g_object_ref (priv->task_details_page);
- gtk_object_sink (GTK_OBJECT (priv->task_details_page));
- comp_editor_append_page (COMP_EDITOR (te),
- COMP_EDITOR_PAGE (priv->task_details_page),
- _("Details"));
-
- priv->meet_page = meeting_page_new (priv->model, client);
- g_object_ref (priv->meet_page);
- gtk_object_sink (GTK_OBJECT (priv->meet_page));
- comp_editor_append_page (COMP_EDITOR (te),
- COMP_EDITOR_PAGE (priv->meet_page),
- _("Assignment"));
-
- comp_editor_set_e_cal (COMP_EDITOR (te), client);
-
- comp_editor_merge_ui (COMP_EDITOR (te), "evolution-task-editor.xml", verbs, NULL);
-
- init_widgets (te);
- set_menu_sens (te);
-
- return te;
-}
-
-static void
-task_editor_set_e_cal (CompEditor *editor, ECal *client)
-{
- TaskEditor *te;
- TaskEditorPrivate *priv;
-
- te = TASK_EDITOR (editor);
- priv = te->priv;
-
- e_meeting_store_set_e_cal (priv->model, client);
-
- if (parent_class->set_e_cal)
- parent_class->set_e_cal (editor, client);
-}
-
-static void
-task_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
-{
- TaskEditor *te;
- TaskEditorPrivate *priv;
- ECalComponentOrganizer organizer;
- ECal *client;
- GSList *attendees = NULL;
-
- te = TASK_EDITOR (editor);
- priv = te->priv;
-
- priv->updating = TRUE;
-
- if (parent_class->edit_comp)
- parent_class->edit_comp (editor, comp);
-
- client = comp_editor_get_e_cal (COMP_EDITOR (editor));
-
- /* Get meeting related stuff */
- e_cal_component_get_organizer (comp, &organizer);
- e_cal_component_get_attendee_list (comp, &attendees);
-
- /* Clear things up */
- e_meeting_store_remove_all_attendees (priv->model);
-
- if (attendees == NULL) {
- comp_editor_remove_page (editor, COMP_EDITOR_PAGE (priv->meet_page));
- priv->assignment_shown = FALSE;
- } else {
- GSList *l;
- int row;
-
- if (!priv->assignment_shown)
- comp_editor_append_page (COMP_EDITOR (te),
- COMP_EDITOR_PAGE (priv->meet_page),
- _("Assignment"));
-
- for (l = attendees; l != NULL; l = l->next) {
- ECalComponentAttendee *ca = l->data;
- EMeetingAttendee *ia;
-
- ia = E_MEETING_ATTENDEE (e_meeting_attendee_new_from_e_cal_component_attendee (ca));
- /* If we aren't the organizer or the attendee is just delegating, don't allow editing */
- if (!comp_editor_get_user_org (editor) || e_meeting_attendee_is_set_delto (ia))
- e_meeting_attendee_set_edit_level (ia, E_MEETING_ATTENDEE_EDIT_NONE);
- e_meeting_store_add_attendee (priv->model, ia);
-
- g_object_unref(ia);
- }
-
- /* If we aren't the organizer we can still change our own status */
- if (!comp_editor_get_user_org (editor)) {
- EAccountList *accounts;
- EAccount *account;
- EIterator *it;
-
- accounts = itip_addresses_get ();
- for (it = e_list_get_iterator((EList *)accounts);e_iterator_is_valid(it);e_iterator_next(it)) {
- EMeetingAttendee *ia;
-
- account = (EAccount*)e_iterator_get(it);
-
- ia = e_meeting_store_find_attendee (priv->model, account->id->address, &row);
- if (ia != NULL)
- e_meeting_attendee_set_edit_level (ia, E_MEETING_ATTENDEE_EDIT_STATUS);
- }
- g_object_unref(it);
- } else if (e_cal_get_organizer_must_attend (client)) {
- EMeetingAttendee *ia;
-
- ia = e_meeting_store_find_attendee (priv->model, organizer.value, &row);
- if (ia != NULL)
- e_meeting_attendee_set_edit_level (ia, E_MEETING_ATTENDEE_EDIT_NONE);
- }
-
- priv->assignment_shown = TRUE;
- }
- e_cal_component_free_attendee_list (attendees);
-
- set_menu_sens (te);
- comp_editor_set_needs_send (COMP_EDITOR (te), priv->assignment_shown && itip_organizer_is_user (comp, client));
-
- priv->updating = FALSE;
-}
-
-static gboolean
-task_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method)
-{
- TaskEditor *te = TASK_EDITOR (editor);
- TaskEditorPrivate *priv;
- ECalComponent *comp = NULL;
-
- priv = te->priv;
-
- /* Don't cancel more than once or when just publishing */
- if (method == E_CAL_COMPONENT_METHOD_PUBLISH ||
- method == E_CAL_COMPONENT_METHOD_CANCEL)
- goto parent;
-
- comp = meeting_page_get_cancel_comp (priv->meet_page);
- if (comp != NULL) {
- ECal *client;
- gboolean result;
-
- client = e_meeting_store_get_e_cal (priv->model);
- result = itip_send_comp (E_CAL_COMPONENT_METHOD_CANCEL, comp, client, NULL);
- g_object_unref (comp);
-
- if (!result)
- return FALSE;
- }
-
- parent:
- if (parent_class->send_comp)
- return parent_class->send_comp (editor, method);
-
- return FALSE;
-}
-
-/* Destroy handler for the event editor */
-static void
-task_editor_finalize (GObject *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;
-
- g_object_unref (priv->task_page);
- g_object_unref (priv->task_details_page);
- g_object_unref (priv->meet_page);
-
- g_object_unref (priv->model);
-
- g_free (priv);
-
- if (G_OBJECT_CLASS (parent_class)->finalize)
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
-}
-
-/**
- * task_editor_new:
- * @client: a ECal
- *
- * 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 (ECal *client)
-{
- TaskEditor *te;
-
- te = g_object_new (TYPE_TASK_EDITOR, NULL);
- return task_editor_construct (te, client);
-}
-
-static void
-show_assignment (TaskEditor *te)
-{
- TaskEditorPrivate *priv;
-
- priv = te->priv;
-
- if (!priv->assignment_shown) {
- comp_editor_append_page (COMP_EDITOR (te),
- COMP_EDITOR_PAGE (priv->meet_page),
- _("Assignment"));
- priv->assignment_shown = TRUE;
-
- set_menu_sens (te);
- comp_editor_set_needs_send (COMP_EDITOR (te), priv->assignment_shown);
- comp_editor_set_changed (COMP_EDITOR (te), TRUE);
- }
-
- comp_editor_show_page (COMP_EDITOR (te),
- COMP_EDITOR_PAGE (priv->meet_page));
-}
-
-void
-task_editor_show_assignment (TaskEditor *te)
-{
- g_return_if_fail (te != NULL);
- g_return_if_fail (IS_TASK_EDITOR (te));
-
- show_assignment (te);
-}
-
-static void
-assign_task_cmd (GtkWidget *widget, gpointer data)
-{
- TaskEditor *te = TASK_EDITOR (data);
-
- show_assignment (te);
-}
-
-static void
-refresh_task_cmd (GtkWidget *widget, gpointer data)
-{
- TaskEditor *te = TASK_EDITOR (data);
-
- comp_editor_send_comp (COMP_EDITOR (te), E_CAL_COMPONENT_METHOD_REFRESH);
-}
-
-static void
-cancel_task_cmd (GtkWidget *widget, gpointer data)
-{
- TaskEditor *te = TASK_EDITOR (data);
- ECalComponent *comp;
-
- comp = comp_editor_get_current_comp (COMP_EDITOR (te));
- if (cancel_component_dialog ((GtkWindow *) te,
- comp_editor_get_e_cal (COMP_EDITOR (te)), comp, FALSE)) {
- comp_editor_send_comp (COMP_EDITOR (te), E_CAL_COMPONENT_METHOD_CANCEL);
- comp_editor_delete_comp (COMP_EDITOR (te));
- }
-}
-
-static void
-forward_cmd (GtkWidget *widget, gpointer data)
-{
- TaskEditor *te = TASK_EDITOR (data);
-
- if (comp_editor_save_comp (COMP_EDITOR (te), TRUE))
- comp_editor_send_comp (COMP_EDITOR (te), E_CAL_COMPONENT_METHOD_PUBLISH);
-}
-
-static void
-model_changed (TaskEditor *te)
-{
- if (!te->priv->updating) {
- comp_editor_set_changed (COMP_EDITOR (te), TRUE);
- comp_editor_set_needs_send (COMP_EDITOR (te), TRUE);
- }
-}
-
-static void
-model_row_change_insert_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
-{
- model_changed (TASK_EDITOR (data));
-}
-
-static void
-model_row_delete_cb (GtkTreeModel *model, GtkTreePath *path, gpointer data)
-{
- model_changed (TASK_EDITOR (data));
-}
diff --git a/calendar/gui/dialogs/task-editor.h b/calendar/gui/dialogs/task-editor.h
deleted file mode 100644
index e0e6ac75be..0000000000
--- a/calendar/gui/dialogs/task-editor.h
+++ /dev/null
@@ -1,61 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#ifndef __TASK_EDITOR_H__
-#define __TASK_EDITOR_H__
-
-#include <gtk/gtkobject.h>
-#include "comp-editor.h"
-
-
-
-#define TYPE_TASK_EDITOR (task_editor_get_type ())
-#define TASK_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TASK_EDITOR, TaskEditor))
-#define TASK_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TASK_EDITOR, \
- TaskEditorClass))
-#define IS_TASK_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TASK_EDITOR))
-#define IS_TASK_EDITOR_CLASS(klass) (G_TYPE_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 *te,
- ECal *client);
-TaskEditor *task_editor_new (ECal *client);
-void task_editor_show_assignment(TaskEditor *te);
-
-
-#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 830e5a0bef..0000000000
--- a/calendar/gui/dialogs/task-page.c
+++ /dev/null
@@ -1,926 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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/gtktextview.h>
-#include <gtk/gtktogglebutton.h>
-#include <gtk/gtkspinbutton.h>
-#include <gtk/gtkoptionmenu.h>
-#include <libgnome/gnome-i18n.h>
-#include <glade/glade.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 *categories_btn;
- GtkWidget *categories;
-
- gboolean updating;
-};
-
-static const int classification_map[] = {
- E_CAL_COMPONENT_CLASS_PUBLIC,
- E_CAL_COMPONENT_CLASS_PRIVATE,
- E_CAL_COMPONENT_CLASS_CONFIDENTIAL,
- -1
-};
-
-
-
-static void task_page_class_init (TaskPageClass *class);
-static void task_page_init (TaskPage *tpage);
-static void task_page_finalize (GObject *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, ECalComponent *comp);
-static gboolean task_page_fill_component (CompEditorPage *page, ECalComponent *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.
- **/
-
-E_MAKE_TYPE (task_page, "TaskPage", TaskPage, task_page_class_init, task_page_init,
- TYPE_COMP_EDITOR_PAGE);
-
-/* Class initialization function for the task page */
-static void
-task_page_class_init (TaskPageClass *class)
-{
- CompEditorPageClass *editor_page_class;
- GObjectClass *object_class;
-
- editor_page_class = (CompEditorPageClass *) class;
- object_class = (GObjectClass *) class;
-
- parent_class = g_type_class_ref(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->finalize = task_page_finalize;
-}
-
-/* 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->categories_btn = NULL;
- priv->categories = NULL;
-
- priv->updating = FALSE;
-}
-
-/* Destroy handler for the task page */
-static void
-task_page_finalize (GObject *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->main)
- gtk_widget_unref (priv->main);
-
- if (priv->xml) {
- g_object_unref (priv->xml);
- priv->xml = NULL;
- }
-
- g_free (priv);
- tpage->priv = NULL;
-
- if (G_OBJECT_CLASS (parent_class)->finalize)
- (* G_OBJECT_CLASS (parent_class)->finalize) (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);
- gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->description)), "", 0);
-
- /* 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,
- E_CAL_COMPONENT_CLASS_PRIVATE, classification_map);
-
- /* Categories */
- e_dialog_editable_set (priv->categories, NULL);
-}
-
-/* Decode the radio button group for classifications */
-static ECalComponentClassification
-classification_get (GtkWidget *widget)
-{
- return e_dialog_radio_get (widget, classification_map);
-}
-
-/* fill_widgets handler for the task page */
-static void
-task_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
-{
- TaskPage *tpage;
- TaskPagePrivate *priv;
- ECalComponentText text;
- ECalComponentDateTime d;
- ECalComponentClassification cl;
- GSList *l;
- const char *categories;
- icaltimezone *zone, *default_zone;
- char *location;
-
- tpage = TASK_PAGE (page);
- priv = tpage->priv;
-
- priv->updating = TRUE;
-
- /* Clean the screen */
- clear_widgets (tpage);
-
- /* Summary, description(s) */
- e_cal_component_get_summary (comp, &text);
- e_dialog_editable_set (priv->summary, text.value);
-
- e_cal_component_get_description_list (comp, &l);
- if (l) {
- text = *(ECalComponentText *)l->data;
- gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->description)),
- text.value, -1);
- } else {
- gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->description)),
- "", 0);
- }
- e_cal_component_free_text_list (l);
-
- location = calendar_config_get_timezone ();
- default_zone = icaltimezone_get_builtin_timezone (location);
-
- /* Due Date. */
- e_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);
- if (due_tt->is_date) {
- e_date_edit_set_time_of_day (E_DATE_EDIT (priv->due_date),
- -1, -1);
- zone = default_zone;
- } else {
- e_date_edit_set_time_of_day (E_DATE_EDIT (priv->due_date),
- due_tt->hour,
- due_tt->minute);
- }
- } else {
- 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. */
- zone = default_zone;
- }
-
- /* 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) {
- if (!e_cal_get_timezone (page->client, d.tzid, &zone, NULL))
- /* FIXME: Handle error better. */
- 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);
-
- e_cal_component_free_datetime (&d);
-
-
- /* Start Date. */
- e_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);
- if (start_tt->is_date) {
- e_date_edit_set_time_of_day (E_DATE_EDIT (priv->start_date),
- -1, -1);
- zone = default_zone;
- } else {
- e_date_edit_set_time_of_day (E_DATE_EDIT (priv->start_date),
- start_tt->hour,
- start_tt->minute);
- }
- } else {
- 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. */
- zone = default_zone;
- }
-
- if (!zone)
- zone = icaltimezone_get_builtin_timezone_from_tzid (d.tzid);
- if (!zone) {
- if (!e_cal_get_timezone (page->client, d.tzid, &zone, NULL))
- /* FIXME: Handle error better. */
- 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);
-
- e_cal_component_free_datetime (&d);
-
- /* Classification. */
- e_cal_component_get_classification (comp, &cl);
-
- switch (cl) {
- case E_CAL_COMPONENT_CLASS_PUBLIC:
- e_dialog_radio_set (priv->classification_public,
- E_CAL_COMPONENT_CLASS_PUBLIC,
- classification_map);
- break;
-
- case E_CAL_COMPONENT_CLASS_PRIVATE:
- e_dialog_radio_set (priv->classification_public,
- E_CAL_COMPONENT_CLASS_PRIVATE,
- classification_map);
- break;
-
- case E_CAL_COMPONENT_CLASS_CONFIDENTIAL:
- e_dialog_radio_set (priv->classification_public,
- E_CAL_COMPONENT_CLASS_CONFIDENTIAL,
- classification_map);
- break;
-
- default:
- /* default to PUBLIC */
- e_dialog_radio_set (priv->classification_public,
- E_CAL_COMPONENT_CLASS_PUBLIC,
- classification_map);
- break;
- }
-
- /* Categories */
- e_cal_component_get_categories (comp, &categories);
- e_dialog_editable_set (priv->categories, categories);
-
-
- priv->updating = FALSE;
-}
-
-/* fill_component handler for the task page */
-static gboolean
-task_page_fill_component (CompEditorPage *page, ECalComponent *comp)
-{
- TaskPage *tpage;
- TaskPagePrivate *priv;
- ECalComponentDateTime date;
- struct icaltimetype start_tt, due_tt;
- char *cat, *str;
- gboolean start_date_set, due_date_set, time_set;
- GtkTextBuffer *text_buffer;
- GtkTextIter text_iter_start, text_iter_end;
- struct icaltimetype *due_tt2;
- icaltimezone *start_zone = NULL;
- icaltimezone *due_zone = NULL;
-
- tpage = TASK_PAGE (page);
- priv = tpage->priv;
- text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->description));
-
- /* Summary. */
-
- str = e_dialog_editable_get (priv->summary);
- if (!str || strlen (str) == 0)
- e_cal_component_set_summary (comp, NULL);
- else {
- ECalComponentText text;
-
- text.value = str;
- text.altrep = NULL;
-
- e_cal_component_set_summary (comp, &text);
- }
-
- if (str)
- g_free (str);
-
- /* Description */
-
- gtk_text_buffer_get_start_iter (text_buffer, &text_iter_start);
- gtk_text_buffer_get_end_iter (text_buffer, &text_iter_end);
- str = gtk_text_buffer_get_text (text_buffer, &text_iter_start, &text_iter_end, FALSE);
-
- if (!str || strlen (str) == 0)
- e_cal_component_set_description_list (comp, NULL);
- else {
- GSList l;
- ECalComponentText text;
-
- text.value = str;
- text.altrep = NULL;
- l.data = &text;
- l.next = NULL;
-
- e_cal_component_set_description_list (comp, &l);
- }
-
- if (str)
- g_free (str);
-
- /* Dates */
-
- due_tt = icaltime_null_time ();
-
- date.value = &due_tt;
- date.tzid = NULL;
-
- /* Due Date. */
- if (!e_date_edit_date_is_valid (E_DATE_EDIT (priv->due_date)) ||
- !e_date_edit_time_is_valid (E_DATE_EDIT (priv->due_date))) {
- comp_editor_page_display_validation_error (page, _("Due date is wrong"), priv->due_date);
- return FALSE;
- }
-
- due_date_set = e_date_edit_get_date (E_DATE_EDIT (priv->due_date),
- &due_tt.year,
- &due_tt.month,
- &due_tt.day);
- time_set = e_date_edit_get_time_of_day (E_DATE_EDIT (priv->due_date),
- &due_tt.hour,
- &due_tt.minute);
- if (due_date_set) {
- if (time_set) {
- due_zone = e_timezone_entry_get_timezone (E_TIMEZONE_ENTRY (priv->due_timezone));
- date.tzid = icaltimezone_get_tzid (due_zone);
- } else {
- due_tt.is_date = TRUE;
- date.tzid = NULL;
- }
- e_cal_component_set_due (comp, &date);
- } else {
- e_cal_component_set_due (comp, NULL);
- }
-
- /* Start Date. */
- if (!e_date_edit_date_is_valid (E_DATE_EDIT (priv->start_date)) ||
- !e_date_edit_time_is_valid (E_DATE_EDIT (priv->start_date))) {
- comp_editor_page_display_validation_error (page, _("Start date is wrong"), priv->start_date);
- return FALSE;
- }
-
- start_tt = icaltime_null_time ();
- date.value = &start_tt;
- start_date_set = e_date_edit_get_date (E_DATE_EDIT (priv->start_date),
- &start_tt.year,
- &start_tt.month,
- &start_tt.day);
- time_set = e_date_edit_get_time_of_day (E_DATE_EDIT (priv->start_date),
- &start_tt.hour,
- &start_tt.minute);
- if (start_date_set) {
- if (time_set) {
- start_zone = e_timezone_entry_get_timezone (E_TIMEZONE_ENTRY (priv->start_timezone));
- date.tzid = icaltimezone_get_tzid (start_zone);
- } else {
- start_tt.is_date = TRUE;
- date.tzid = NULL;
- }
- e_cal_component_set_dtstart (comp, &date);
- } else {
- e_cal_component_set_dtstart (comp, NULL);
- }
-
- /* Check whether due datetime is before start datetime */
- if (start_date_set && due_date_set) {
- due_tt2 = g_new (struct icaltimetype, 1);
- memcpy (due_tt2, &due_tt, sizeof(due_tt));
- icaltimezone_convert_time (due_tt2, due_zone, start_zone);
- if (icaltime_compare (start_tt, *due_tt2) > 0) {
- comp_editor_page_display_validation_error (page,
- _("Due date is before start date!"),
- priv->due_date);
- g_free (due_tt2);
- return FALSE;
- }
- g_free (due_tt2);
- }
-
-
- /* Classification. */
- e_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);
-
- e_cal_component_set_categories (comp, str);
-
- if (str)
- g_free (str);
-
- return TRUE;
-}
-
-/* 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)
-{
- CompEditorPage *page = COMP_EDITOR_PAGE (tpage);
- TaskPagePrivate *priv;
- GSList *accel_groups;
- GtkWidget *toplevel;
-
- priv = tpage->priv;
-
-#define GW(name) glade_xml_get_widget (priv->xml, name)
-
- priv->main = GW ("task-page");
- if (!priv->main)
- return FALSE;
-
- /* Get the GtkAccelGroup from the toplevel window, so we can install
- it when the notebook page is mapped. */
- toplevel = gtk_widget_get_toplevel (priv->main);
- accel_groups = gtk_accel_groups_from_object (G_OBJECT (toplevel));
- if (accel_groups) {
- page->accel_group = accel_groups->data;
- gtk_accel_group_ref (page->accel_group);
- }
-
- gtk_widget_ref (priv->main);
- gtk_container_remove (GTK_CONTAINER (priv->main->parent), priv->main);
-
- priv->summary = GW ("summary");
-
- /* Glade's visibility flag doesn't seem to work for custom widgets */
- priv->due_date = GW ("due-date");
- gtk_widget_show (priv->due_date);
- priv->start_date = GW ("start-date");
- gtk_widget_show (priv->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->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->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 due date widgets change. We notify the
- * other pages in the task editor, so they can update any labels.
- */
-static void
-date_changed_cb (EDateEdit *dedit, gpointer data)
-{
- TaskPage *tpage;
- TaskPagePrivate *priv;
- CompEditorPageDates dates;
- gboolean date_set, time_set;
- ECalComponentDateTime 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);
- time_set = e_date_edit_get_time_of_day (E_DATE_EDIT (priv->start_date),
- &start_tt.hour,
- &start_tt.minute);
- if (date_set) {
- if (time_set) {
- icaltimezone *zone = e_timezone_entry_get_timezone (E_TIMEZONE_ENTRY (priv->start_timezone));
- start_dt.tzid = icaltimezone_get_tzid (zone);
- } else {
- start_tt.is_date = TRUE;
- start_dt.tzid = NULL;
- }
- } 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);
- time_set = e_date_edit_get_time_of_day (E_DATE_EDIT (priv->due_date),
- &due_tt.hour,
- &due_tt.minute);
- if (date_set) {
- if (time_set) {
- icaltimezone *zone = e_timezone_entry_get_timezone (E_TIMEZONE_ENTRY (priv->due_timezone));
- due_dt.tzid = icaltimezone_get_tzid (zone);
- } else {
- due_tt.is_date = TRUE;
- due_dt.tzid = NULL;
- }
- } 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 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;
- GtkTextBuffer *text_buffer;
- 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 */
- g_signal_connect((priv->summary), "changed",
- G_CALLBACK (summary_changed_cb), tpage);
-
- /* Description */
- text_buffer = gtk_text_buffer_new (NULL);
- gtk_text_view_set_buffer (GTK_TEXT_VIEW (priv->description), text_buffer);
- g_object_unref (text_buffer);
-
- gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (priv->description), GTK_WRAP_WORD);
-
- /* Dates */
- g_signal_connect((priv->start_date), "changed",
- G_CALLBACK (date_changed_cb), tpage);
- g_signal_connect((priv->due_date), "changed",
- G_CALLBACK (date_changed_cb), tpage);
-
- g_signal_connect((priv->due_timezone), "changed",
- G_CALLBACK (field_changed_cb), tpage);
- g_signal_connect((priv->start_timezone), "changed",
- G_CALLBACK (field_changed_cb), tpage);
-
- /* Classification */
- g_signal_connect((priv->classification_public),
- "toggled",
- G_CALLBACK (field_changed_cb), tpage);
- g_signal_connect((priv->classification_private),
- "toggled",
- G_CALLBACK (field_changed_cb), tpage);
- g_signal_connect((priv->classification_confidential),
- "toggled",
- G_CALLBACK (field_changed_cb), tpage);
-
- /* Connect the default signal handler to use to make sure the "changed"
- field gets set whenever a field is changed. */
-
- /* Belongs to priv->description */
- g_signal_connect ((text_buffer), "changed",
- G_CALLBACK (field_changed_cb), tpage);
-
- g_signal_connect((priv->categories), "changed",
- G_CALLBACK (field_changed_cb), tpage);
-
- /* Categories button */
- g_signal_connect((priv->categories_btn), "clicked",
- G_CALLBACK (categories_clicked_cb), tpage);
-
-
- /* 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, 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)) {
- g_object_unref (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 02a8797b45..0000000000
--- a/calendar/gui/dialogs/task-page.glade
+++ /dev/null
@@ -1,477 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-
-<widget class="GtkWindow" id="task-toplevel">
- <property name="title" translatable="yes">window1</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
-
- <child>
- <widget class="GtkVBox" id="task-page">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkTable" id="table3">
- <property name="visible">True</property>
- <property name="n_rows">1</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Su_mmary:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">summary</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options"></property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="summary">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frame2">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkHBox" id="hbox4">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkTable" id="table1">
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">3</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">2</property>
- <property name="column_spacing">4</property>
-
- <child>
- <widget class="GtkLabel" id="label6">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Sta_rt Date:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">start-date</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label5">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Due Date:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">due-date</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="due-date">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="creation_function">task_page_create_date_edit</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Fri, 01 Jun 2001 18:59:52 GMT</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="start-date">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="creation_function">task_page_create_date_edit</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Fri, 01 Jun 2001 18:59:57 GMT</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="due-timezone">
- <property name="visible">True</property>
- <property name="creation_function">make_timezone_entry</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Tue, 19 Jun 2001 04:43:54 GMT</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="start-timezone">
- <property name="visible">True</property>
- <property name="creation_function">make_timezone_entry</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Tue, 19 Jun 2001 04:43:46 GMT</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label4">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Date &amp; Time</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label18">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Description:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow1">
- <property name="visible">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTextView" id="description">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="justification">GTK_JUSTIFY_LEFT</property>
- <property name="wrap_mode">GTK_WRAP_WORD</property>
- <property name="cursor_visible">True</property>
- <property name="pixels_above_lines">0</property>
- <property name="pixels_below_lines">0</property>
- <property name="pixels_inside_wrap">0</property>
- <property name="left_margin">0</property>
- <property name="right_margin">0</property>
- <property name="indent">0</property>
- <property name="text" translatable="yes"></property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frame24">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkHBox" id="hbox6">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkRadioButton" id="classification-public">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Pu_blic</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">True</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkRadioButton" id="classification-private">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Pri_vate</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">classification-public</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkRadioButton" id="classification-confidential">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Con_fidential</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">classification-public</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label19">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Classification</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkButton" id="categories-button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Ca_tegories...</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="categories">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/calendar/gui/dialogs/task-page.h b/calendar/gui/dialogs/task-page.h
deleted file mode 100644
index 16ced619d7..0000000000
--- a/calendar/gui/dialogs/task-page.h
+++ /dev/null
@@ -1,60 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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"
-
-G_BEGIN_DECLS
-
-
-
-#define TYPE_TASK_PAGE (task_page_get_type ())
-#define TASK_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TASK_PAGE, TaskPage))
-#define TASK_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TASK_PAGE, TaskPageClass))
-#define IS_TASK_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TASK_PAGE))
-#define IS_TASK_PAGE_CLASS(klass) (G_TYPE_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);
-
-
-
-G_END_DECLS
-
-#endif
diff --git a/calendar/gui/e-alarm-list.c b/calendar/gui/e-alarm-list.c
deleted file mode 100644
index c1429f8705..0000000000
--- a/calendar/gui/e-alarm-list.c
+++ /dev/null
@@ -1,690 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/* EAlarmList - list of calendar alarms with GtkTreeModel interface.
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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: Hans Petter Jansson <hpj@ximian.com>
- */
-
-#include <config.h>
-#include <string.h>
-#include <gtk/gtktreemodel.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtktreednd.h>
-#include <libgnome/gnome-i18n.h>
-#include <glib.h>
-#include <libecal/e-cal-time-util.h>
-#include <e-util/e-time-utils.h>
-#include "calendar-config.h"
-#include "e-alarm-list.h"
-
-#define G_LIST(x) ((GList *) x)
-#define E_ALARM_LIST_IS_SORTED(list) (E_ALARM_LIST (list)->sort_column_id != -2)
-#define IS_VALID_ITER(dt_list, iter) (iter!= NULL && iter->user_data != NULL && \
- dt_list->stamp == iter->stamp)
-
-static GType column_types [E_ALARM_LIST_NUM_COLUMNS];
-
-static void e_alarm_list_init (EAlarmList *file_list);
-static void e_alarm_list_class_init (EAlarmListClass *class);
-static void e_alarm_list_tree_model_init (GtkTreeModelIface *iface);
-static void e_alarm_list_finalize (GObject *object);
-static guint e_alarm_list_get_flags (GtkTreeModel *tree_model);
-static gint e_alarm_list_get_n_columns (GtkTreeModel *tree_model);
-static GType e_alarm_list_get_column_type (GtkTreeModel *tree_model,
- gint index);
-static gboolean e_alarm_list_get_iter (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- GtkTreePath *path);
-static GtkTreePath *e_alarm_list_get_path (GtkTreeModel *tree_model,
- GtkTreeIter *iter);
-static void e_alarm_list_get_value (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- gint column,
- GValue *value);
-static gboolean e_alarm_list_iter_next (GtkTreeModel *tree_model,
- GtkTreeIter *iter);
-static gboolean e_alarm_list_iter_children (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- GtkTreeIter *parent);
-static gboolean e_alarm_list_iter_has_child (GtkTreeModel *tree_model,
- GtkTreeIter *iter);
-static gint e_alarm_list_iter_n_children (GtkTreeModel *tree_model,
- GtkTreeIter *iter);
-static gboolean e_alarm_list_iter_nth_child (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- GtkTreeIter *parent,
- gint n);
-static gboolean e_alarm_list_iter_parent (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- GtkTreeIter *child);
-
-static GObjectClass *parent_class = NULL;
-
-GtkType
-e_alarm_list_get_type (void)
-{
- static GType alarm_list_type = 0;
-
- if (!alarm_list_type) {
- static const GTypeInfo alarm_list_info =
- {
- sizeof (EAlarmListClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) e_alarm_list_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EAlarmList),
- 0,
- (GInstanceInitFunc) e_alarm_list_init,
- };
-
- static const GInterfaceInfo tree_model_info =
- {
- (GInterfaceInitFunc) e_alarm_list_tree_model_init,
- NULL,
- NULL
- };
-
- column_types [E_ALARM_LIST_COLUMN_DESCRIPTION] = G_TYPE_STRING;
-
- alarm_list_type = g_type_register_static (G_TYPE_OBJECT, "EAlarmList",
- &alarm_list_info, 0);
- g_type_add_interface_static (alarm_list_type,
- GTK_TYPE_TREE_MODEL,
- &tree_model_info);
- }
-
- return alarm_list_type;
-}
-
-static void
-e_alarm_list_class_init (EAlarmListClass *class)
-{
- GObjectClass *object_class;
-
- parent_class = g_type_class_peek_parent (class);
- object_class = (GObjectClass *) class;
-
- object_class->finalize = e_alarm_list_finalize;
-}
-
-static void
-e_alarm_list_tree_model_init (GtkTreeModelIface *iface)
-{
- iface->get_flags = e_alarm_list_get_flags;
- iface->get_n_columns = e_alarm_list_get_n_columns;
- iface->get_column_type = e_alarm_list_get_column_type;
- iface->get_iter = e_alarm_list_get_iter;
- iface->get_path = e_alarm_list_get_path;
- iface->get_value = e_alarm_list_get_value;
- iface->iter_next = e_alarm_list_iter_next;
- iface->iter_children = e_alarm_list_iter_children;
- iface->iter_has_child = e_alarm_list_iter_has_child;
- iface->iter_n_children = e_alarm_list_iter_n_children;
- iface->iter_nth_child = e_alarm_list_iter_nth_child;
- iface->iter_parent = e_alarm_list_iter_parent;
-}
-
-static void
-e_alarm_list_init (EAlarmList *alarm_list)
-{
- alarm_list->stamp = g_random_int ();
- alarm_list->columns_dirty = FALSE;
- alarm_list->list = NULL;
-}
-
-EAlarmList *
-e_alarm_list_new (void)
-{
- EAlarmList *alarm_list;
-
- alarm_list = E_ALARM_LIST (g_object_new (e_alarm_list_get_type (), NULL));
-
- return alarm_list;
-}
-
-static void
-all_rows_deleted (EAlarmList *alarm_list)
-{
- GtkTreePath *path;
- gint i;
-
- if (!alarm_list->list)
- return;
-
- path = gtk_tree_path_new ();
- i = g_list_length (alarm_list->list);
- gtk_tree_path_append_index (path, i);
-
- for ( ; i >= 0; i--) {
- gtk_tree_model_row_deleted (GTK_TREE_MODEL (alarm_list), path);
- gtk_tree_path_prev (path);
- }
-
- gtk_tree_path_free (path);
-}
-
-static void
-row_deleted (EAlarmList *alarm_list, gint n)
-{
- GtkTreePath *path;
-
- path = gtk_tree_path_new ();
- gtk_tree_path_append_index (path, n);
- gtk_tree_model_row_deleted (GTK_TREE_MODEL (alarm_list), path);
- gtk_tree_path_free (path);
-}
-
-static void
-row_added (EAlarmList *alarm_list, gint n)
-{
- GtkTreePath *path;
- GtkTreeIter iter;
-
- path = gtk_tree_path_new ();
- gtk_tree_path_append_index (path, n);
-
- if (gtk_tree_model_get_iter (GTK_TREE_MODEL (alarm_list), &iter, path))
- gtk_tree_model_row_inserted (GTK_TREE_MODEL (alarm_list), path, &iter);
-
- gtk_tree_path_free (path);
-}
-
-static void
-row_updated (EAlarmList *alarm_list, gint n)
-{
- GtkTreePath *path;
- GtkTreeIter iter;
-
- path = gtk_tree_path_new ();
- gtk_tree_path_append_index (path, n);
-
- if (gtk_tree_model_get_iter (GTK_TREE_MODEL (alarm_list), &iter, path))
- gtk_tree_model_row_changed (GTK_TREE_MODEL (alarm_list), path, &iter);
-
- gtk_tree_path_free (path);
-}
-
-static void
-e_alarm_list_finalize (GObject *object)
-{
- EAlarmList *alarm_list = E_ALARM_LIST (object);
-
- if (G_OBJECT_CLASS (parent_class)->finalize)
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
-}
-
-/* Fulfill the GtkTreeModel requirements */
-static guint
-e_alarm_list_get_flags (GtkTreeModel *tree_model)
-{
- g_return_val_if_fail (E_IS_ALARM_LIST (tree_model), 0);
-
- return GTK_TREE_MODEL_LIST_ONLY;
-}
-
-static gint
-e_alarm_list_get_n_columns (GtkTreeModel *tree_model)
-{
- EAlarmList *alarm_list = (EAlarmList *) tree_model;
-
- g_return_val_if_fail (E_IS_ALARM_LIST (tree_model), 0);
-
- alarm_list->columns_dirty = TRUE;
- return E_ALARM_LIST_NUM_COLUMNS;
-}
-
-static GType
-e_alarm_list_get_column_type (GtkTreeModel *tree_model,
- gint index)
-{
- EAlarmList *alarm_list = (EAlarmList *) tree_model;
-
- g_return_val_if_fail (E_IS_ALARM_LIST (tree_model), G_TYPE_INVALID);
- g_return_val_if_fail (index < E_ALARM_LIST_NUM_COLUMNS &&
- index >= 0, G_TYPE_INVALID);
-
- alarm_list->columns_dirty = TRUE;
- return column_types [index];
-}
-
-const ECalComponentAlarm *
-e_alarm_list_get_alarm (EAlarmList *alarm_list, GtkTreeIter *iter)
-{
- g_return_val_if_fail (IS_VALID_ITER (alarm_list, iter), NULL);
-
- return G_LIST (iter->user_data)->data;
-}
-
-static void
-free_alarm (ECalComponentAlarm *alarm)
-{
- e_cal_component_alarm_free (alarm);
-}
-
-static ECalComponentAlarm *
-copy_alarm (const ECalComponentAlarm *alarm)
-{
- return e_cal_component_alarm_clone ((ECalComponentAlarm *) alarm);
-}
-
-void
-e_alarm_list_set_alarm (EAlarmList *alarm_list, GtkTreeIter *iter,
- const ECalComponentAlarm *alarm)
-{
- ECalComponentAlarm *alarm_old;
-
- g_return_if_fail (IS_VALID_ITER (alarm_list, iter));
-
- alarm_old = G_LIST (iter->user_data)->data;
- free_alarm (alarm_old);
- G_LIST (iter->user_data)->data = copy_alarm (alarm);
- row_updated (alarm_list, g_list_position (alarm_list->list, G_LIST (iter->user_data)));
-}
-
-void
-e_alarm_list_append (EAlarmList *alarm_list, GtkTreeIter *iter,
- const ECalComponentAlarm *alarm)
-{
- g_return_if_fail (alarm != NULL);
-
- alarm_list->list = g_list_append (alarm_list->list, copy_alarm (alarm));
- row_added (alarm_list, g_list_length (alarm_list->list) - 1);
-
- if (iter) {
- iter->user_data = g_list_last (alarm_list->list);
- iter->stamp = alarm_list->stamp;
- }
-}
-
-void
-e_alarm_list_remove (EAlarmList *alarm_list, GtkTreeIter *iter)
-{
- gint n;
-
- g_return_if_fail (IS_VALID_ITER (alarm_list, iter));
-
- n = g_list_position (alarm_list->list, G_LIST (iter->user_data));
- free_alarm ((ECalComponentAlarm *) G_LIST (iter->user_data)->data);
- alarm_list->list = g_list_delete_link (alarm_list->list, G_LIST (iter->user_data));
- row_deleted (alarm_list, n);
-}
-
-void
-e_alarm_list_clear (EAlarmList *alarm_list)
-{
- GList *l;
-
- all_rows_deleted (alarm_list);
-
- for (l = alarm_list->list; l; l = g_list_next (l)) {
- free_alarm ((ECalComponentAlarm *) l->data);
- }
-
- g_list_free (alarm_list->list);
- alarm_list->list = NULL;
-}
-
-static gboolean
-e_alarm_list_get_iter (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreePath *path)
-{
- EAlarmList *alarm_list = (EAlarmList *) tree_model;
- GList *l;
- gint i;
-
- g_return_val_if_fail (E_IS_ALARM_LIST (tree_model), FALSE);
- g_return_val_if_fail (gtk_tree_path_get_depth (path) > 0, FALSE);
-
- if (!alarm_list->list)
- return FALSE;
-
- alarm_list->columns_dirty = TRUE;
-
- i = gtk_tree_path_get_indices (path)[0];
- l = g_list_nth (alarm_list->list, i);
- if (!l)
- return FALSE;
-
- iter->user_data = l;
- iter->stamp = alarm_list->stamp;
- return TRUE;
-}
-
-static GtkTreePath *
-e_alarm_list_get_path (GtkTreeModel *tree_model,
- GtkTreeIter *iter)
-{
- EAlarmList *alarm_list = (EAlarmList *) tree_model;
- GtkTreePath *retval;
- GList *l;
-
- g_return_val_if_fail (E_IS_ALARM_LIST (tree_model), NULL);
- g_return_val_if_fail (iter->stamp == E_ALARM_LIST (tree_model)->stamp, NULL);
-
- l = iter->user_data;
- retval = gtk_tree_path_new ();
- gtk_tree_path_append_index (retval, g_list_position (alarm_list->list, l));
- return retval;
-}
-
-/* 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 (ECalComponentAlarm *alarm)
-{
- ECalComponentAlarmAction action;
- ECalComponentAlarmTrigger trigger;
- char string[256];
- char *base, *str = NULL, *dur;
-
- string [0] = '\0';
-
- e_cal_component_alarm_get_action (alarm, &action);
- e_cal_component_alarm_get_trigger (alarm, &trigger);
-
- switch (action) {
- case E_CAL_COMPONENT_ALARM_AUDIO:
- base = _("Play a sound");
- break;
-
- case E_CAL_COMPONENT_ALARM_DISPLAY:
- base = _("Display a message");
- break;
-
- case E_CAL_COMPONENT_ALARM_EMAIL:
- base = _("Send an email");
- break;
-
- case E_CAL_COMPONENT_ALARM_PROCEDURE:
- base = _("Run a program");
- break;
-
- case E_CAL_COMPONENT_ALARM_NONE:
- case E_CAL_COMPONENT_ALARM_UNKNOWN:
- default:
- base = _("Unknown action to be performed");
- break;
- }
-
- /* FIXME: This does not look like it will localize correctly. */
-
- switch (trigger.type) {
- case E_CAL_COMPONENT_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 E_CAL_COMPONENT_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 E_CAL_COMPONENT_ALARM_TRIGGER_ABSOLUTE: {
- struct icaltimetype itt;
- icaltimezone *utc_zone, *current_zone;
- char *location;
- struct tm tm;
- char buf[256];
-
- /* Absolute triggers come in UTC, so convert them to the local timezone */
-
- itt = trigger.u.abs_time;
-
- utc_zone = icaltimezone_get_utc_timezone ();
- location = calendar_config_get_timezone ();
- current_zone = icaltimezone_get_builtin_timezone (location);
-
- tm = icaltimetype_to_tm_with_zone (&itt, utc_zone, current_zone);
-
- e_time_format_date_and_time (&tm, calendar_config_get_24_hour_format (),
- FALSE, FALSE, buf, sizeof (buf));
-
- str = g_strdup_printf (_("%s at %s"), base, buf);
-
- break; }
-
- case E_CAL_COMPONENT_ALARM_TRIGGER_NONE:
- default:
- str = g_strdup_printf (_("%s for an unknown trigger type"), base);
- break;
- }
-
- return str;
-}
-
-static void
-e_alarm_list_get_value (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- gint column,
- GValue *value)
-{
- EAlarmList *alarm_list = E_ALARM_LIST (tree_model);
- ECalComponentAlarm *alarm;
- GList *l;
- const gchar *str;
-
- g_return_if_fail (E_IS_ALARM_LIST (tree_model));
- g_return_if_fail (column < E_ALARM_LIST_NUM_COLUMNS);
- g_return_if_fail (E_ALARM_LIST (tree_model)->stamp == iter->stamp);
- g_return_if_fail (IS_VALID_ITER (alarm_list, iter));
-
- g_value_init (value, column_types [column]);
-
- if (!alarm_list->list)
- return;
-
- l = iter->user_data;
- alarm = l->data;
-
- if (!alarm)
- return;
-
- switch (column) {
- case E_ALARM_LIST_COLUMN_DESCRIPTION:
- str = get_alarm_string (alarm);
- g_value_set_string (value, str);
- break;
- }
-}
-
-static gboolean
-e_alarm_list_iter_next (GtkTreeModel *tree_model,
- GtkTreeIter *iter)
-{
- GList *l;
-
- g_return_val_if_fail (E_IS_ALARM_LIST (tree_model), FALSE);
- g_return_val_if_fail (IS_VALID_ITER (E_ALARM_LIST (tree_model), iter), FALSE);
-
- if (!E_ALARM_LIST (tree_model)->list)
- return FALSE;
-
- l = iter->user_data;
- l = g_list_next (l);
- if (l) {
- iter->user_data = l;
- return TRUE;
- }
-
- return FALSE;
-}
-
-static gboolean
-e_alarm_list_iter_children (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- GtkTreeIter *parent)
-{
- EAlarmList *alarm_list = E_ALARM_LIST (tree_model);
-
- /* this is a list, nodes have no children */
- if (parent)
- return FALSE;
-
- /* but if parent == NULL we return the list itself as children of the
- * "root" */
-
- if (!alarm_list->list)
- return FALSE;
-
- iter->stamp = E_ALARM_LIST (tree_model)->stamp;
- iter->user_data = alarm_list->list;
- return TRUE;
-}
-
-static gboolean
-e_alarm_list_iter_has_child (GtkTreeModel *tree_model,
- GtkTreeIter *iter)
-{
- g_return_val_if_fail (IS_VALID_ITER (E_ALARM_LIST (tree_model), iter), FALSE);
- return FALSE;
-}
-
-static gint
-e_alarm_list_iter_n_children (GtkTreeModel *tree_model,
- GtkTreeIter *iter)
-{
- EAlarmList *alarm_list = E_ALARM_LIST (tree_model);
-
- g_return_val_if_fail (E_IS_ALARM_LIST (tree_model), -1);
- g_return_val_if_fail (IS_VALID_ITER (alarm_list, iter), -1);
-
- if (iter == NULL)
- return g_list_length (alarm_list->list);
-
- g_return_val_if_fail (E_ALARM_LIST (tree_model)->stamp == iter->stamp, -1);
- return 0;
-}
-
-static gboolean
-e_alarm_list_iter_nth_child (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- GtkTreeIter *parent,
- gint n)
-{
- EAlarmList *alarm_list = E_ALARM_LIST (tree_model);
-
- g_return_val_if_fail (E_IS_ALARM_LIST (tree_model), FALSE);
-
- if (parent)
- return FALSE;
-
- if (alarm_list->list) {
- GList *l;
-
- l = g_list_nth (alarm_list->list, n);
- if (!l)
- return FALSE;
-
- iter->stamp = alarm_list->stamp;
- iter->user_data = l;
- return TRUE;
- }
-
- return FALSE;
-}
-
-static gboolean
-e_alarm_list_iter_parent (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- GtkTreeIter *child)
-{
- return FALSE;
-}
diff --git a/calendar/gui/e-alarm-list.h b/calendar/gui/e-alarm-list.h
deleted file mode 100644
index 93cc8ac58a..0000000000
--- a/calendar/gui/e-alarm-list.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/* EAlarmList - list of calendar alarms with GtkTreeModel interface.
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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: Hans Petter Jansson <hpj@ximian.com>
- */
-
-#ifndef E_ALARM_LIST_H
-#define E_ALARM_LIST_H
-
-#include <gtk/gtktreemodel.h>
-#include <libecal/e-cal-component.h>
-
-G_BEGIN_DECLS
-
-#define E_TYPE_ALARM_LIST (e_alarm_list_get_type ())
-#define E_ALARM_LIST(obj) (GTK_CHECK_CAST ((obj), E_TYPE_ALARM_LIST, EAlarmList))
-#define E_ALARM_LIST_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_ALARM_LIST, EAlarmListClass))
-#define E_IS_ALARM_LIST(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_ALARM_LIST))
-#define E_IS_ALARM_LIST_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), E_TYPE_ALARM_LIST))
-#define E_ALARM_LIST_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), E_TYPE_ALARM_LIST, EAlarmListClass))
-
-typedef struct _EAlarmList EAlarmList;
-typedef struct _EAlarmListClass EAlarmListClass;
-
-typedef enum
-{
- E_ALARM_LIST_COLUMN_DESCRIPTION,
-
- E_ALARM_LIST_NUM_COLUMNS
-}
-EAlarmListColumnType;
-
-struct _EAlarmList
-{
- GObject parent;
-
- /* Private */
-
- gint stamp;
- GList *list;
-
- guint columns_dirty : 1;
-};
-
-struct _EAlarmListClass
-{
- GObjectClass parent_class;
-};
-
-GtkType e_alarm_list_get_type (void);
-EAlarmList *e_alarm_list_new (void);
-
-const ECalComponentAlarm *e_alarm_list_get_alarm (EAlarmList *alarm_list, GtkTreeIter *iter);
-void e_alarm_list_set_alarm (EAlarmList *alarm_list, GtkTreeIter *iter,
- const ECalComponentAlarm *datetime);
-void e_alarm_list_append (EAlarmList *alarm_list, GtkTreeIter *iter,
- const ECalComponentAlarm *datetime);
-void e_alarm_list_remove (EAlarmList *alarm_list, GtkTreeIter *iter);
-void e_alarm_list_clear (EAlarmList *alarm_list);
-
-G_END_DECLS
-
-#endif /* E_ALARM_LIST_H */
diff --git a/calendar/gui/e-cal-list-view-config.c b/calendar/gui/e-cal-list-view-config.c
deleted file mode 100644
index e7d82230df..0000000000
--- a/calendar/gui/e-cal-list-view-config.c
+++ /dev/null
@@ -1,247 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Rodrigo Moya <rodrigo@ximian.com>
- *
- * Copyright 2003, Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 "calendar-config.h"
-#include "e-cal-list-view-config.h"
-
-struct _ECalListViewConfigPrivate {
- ECalListView *view;
-
- GList *notifications;
-};
-
-static GObjectClass *parent_class = NULL;
-
-/* Property IDs */
-enum props {
- PROP_0,
- PROP_VIEW,
-};
-
-static void
-e_cal_list_view_config_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
-{
- ECalListViewConfig *view_config;
- ECalListViewConfigPrivate *priv;
-
- view_config = E_CAL_LIST_VIEW_CONFIG (object);
- priv = view_config->priv;
-
- switch (property_id) {
- case PROP_VIEW:
- e_cal_list_view_config_set_view (view_config, g_value_get_object (value));
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- break;
- }
-}
-
-static void
-e_cal_list_view_config_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
-{
- ECalListViewConfig *view_config;
- ECalListViewConfigPrivate *priv;
-
- view_config = E_CAL_LIST_VIEW_CONFIG (object);
- priv = view_config->priv;
-
- switch (property_id) {
- case PROP_VIEW:
- g_value_set_object (value, e_cal_list_view_config_get_view (view_config));
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- break;
- }
-}
-
-static void
-e_cal_list_view_config_dispose (GObject *object)
-{
- ECalListViewConfig *view_config = E_CAL_LIST_VIEW_CONFIG (object);
- ECalListViewConfigPrivate *priv;
-
- priv = view_config->priv;
-
- e_cal_list_view_config_set_view (view_config, NULL);
-
- if (G_OBJECT_CLASS (parent_class)->dispose)
- G_OBJECT_CLASS (parent_class)->dispose (object);
-}
-
-static void
-e_cal_list_view_config_finalize (GObject *object)
-{
- ECalListViewConfig *view_config = E_CAL_LIST_VIEW_CONFIG (object);
- ECalListViewConfigPrivate *priv;
-
- priv = view_config->priv;
-
- g_free (priv);
-
- if (G_OBJECT_CLASS (parent_class)->finalize)
- G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-static void
-e_cal_list_view_config_class_init (ECalListViewConfigClass *klass)
-{
- GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- GParamSpec *spec;
-
- parent_class = g_type_class_peek_parent (klass);
-
- /* Method override */
- gobject_class->set_property = e_cal_list_view_config_set_property;
- gobject_class->get_property = e_cal_list_view_config_get_property;
- gobject_class->dispose = e_cal_list_view_config_dispose;
- gobject_class->finalize = e_cal_list_view_config_finalize;
-
- spec = g_param_spec_object ("view", NULL, NULL, e_cal_list_view_get_type (),
- G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT);
- g_object_class_install_property (gobject_class, PROP_VIEW, spec);
-}
-
-static void
-e_cal_list_view_config_init (ECalListViewConfig *view_config, ECalListViewConfigClass *klass)
-{
- view_config->priv = g_new0 (ECalListViewConfigPrivate, 1);
-
-}
-
-E_MAKE_TYPE (e_cal_list_view_config, "ECalListViewConfig", ECalListViewConfig, e_cal_list_view_config_class_init,
- e_cal_list_view_config_init, G_TYPE_OBJECT);
-
-ECalListViewConfig *
-e_cal_list_view_config_new (ECalListView *list_view)
-{
- ECalListViewConfig *view_config;
-
- view_config = g_object_new (e_cal_list_view_config_get_type (), "view", list_view, NULL);
-
- return view_config;
-}
-
-ECalListView *
-e_cal_list_view_config_get_view (ECalListViewConfig *view_config)
-{
- ECalListViewConfigPrivate *priv;
-
- g_return_val_if_fail (view_config != NULL, NULL);
- g_return_val_if_fail (E_IS_CAL_LIST_VIEW_CONFIG (view_config), NULL);
-
- priv = view_config->priv;
-
- return priv->view;
-}
-
-static void
-set_timezone (ECalListView *list_view)
-{
- char *location;
- icaltimezone *zone;
-
- location = calendar_config_get_timezone ();
- zone = icaltimezone_get_builtin_timezone (location);
- if (!zone)
- zone = icaltimezone_get_utc_timezone ();
-
- e_calendar_view_set_timezone (E_CALENDAR_VIEW (list_view), zone);
-
- g_free (location);
-}
-
-static void
-timezone_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- ECalListViewConfig *view_config = data;
- ECalListViewConfigPrivate *priv;
-
- priv = view_config->priv;
-
- set_timezone (priv->view);
-}
-
-static void
-set_twentyfour_hour (ECalListView *list_view)
-{
- gboolean use_24_hour;
-
- use_24_hour = calendar_config_get_24_hour_format ();
-
- e_calendar_view_set_use_24_hour_format (E_CALENDAR_VIEW (list_view), use_24_hour);
-}
-
-static void
-twentyfour_hour_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- ECalListViewConfig *view_config = data;
- ECalListViewConfigPrivate *priv;
-
- priv = view_config->priv;
-
- set_twentyfour_hour (priv->view);
-}
-
-void
-e_cal_list_view_config_set_view (ECalListViewConfig *view_config, ECalListView *list_view)
-{
- ECalListViewConfigPrivate *priv;
- guint not;
- GList *l;
-
- g_return_if_fail (view_config != NULL);
- g_return_if_fail (E_IS_CAL_LIST_VIEW_CONFIG (view_config));
-
- priv = view_config->priv;
-
- if (priv->view) {
- g_object_unref (priv->view);
- priv->view = NULL;
- }
-
- for (l = priv->notifications; l; l = l->next)
- calendar_config_remove_notification (GPOINTER_TO_UINT (l->data));
-
- g_list_free (priv->notifications);
- priv->notifications = NULL;
-
- /* If the new view is NULL, return right now */
- if (!list_view)
- return;
-
- priv->view = g_object_ref (list_view);
-
- /* Time zone */
- set_timezone (list_view);
-
- not = calendar_config_add_notification_timezone (timezone_changed_cb, view_config);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
- /* 24 Hour format */
- set_twentyfour_hour (list_view);
-
- not = calendar_config_add_notification_24_hour_format (twentyfour_hour_changed_cb, view_config);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-}
diff --git a/calendar/gui/e-cal-list-view-config.h b/calendar/gui/e-cal-list-view-config.h
deleted file mode 100644
index d2f87c36b3..0000000000
--- a/calendar/gui/e-cal-list-view-config.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
- * JP Rosevear <jpr@ximian.com>
- *
- * Copyright 2003, Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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_CAL_LIST_VIEW_CONFIG_H_
-#define _E_CAL_LIST_VIEW_CONFIG_H_
-
-#include "e-cal-list-view.h"
-
-G_BEGIN_DECLS
-
-#define E_CAL_LIST_VIEW_CONFIG(obj) GTK_CHECK_CAST (obj, e_cal_list_view_config_get_type (), ECalListViewConfig)
-#define E_CAL_LIST_VIEW_CONFIG_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, e_cal_list_view_config_get_type (), ECalListViewConfigClass)
-#define E_IS_CAL_LIST_VIEW_CONFIG(obj) GTK_CHECK_TYPE (obj, e_cal_list_view_config_get_type ())
-
-typedef struct _ECalListViewConfig ECalListViewConfig;
-typedef struct _ECalListViewConfigClass ECalListViewConfigClass;
-typedef struct _ECalListViewConfigPrivate ECalListViewConfigPrivate;
-
-struct _ECalListViewConfig {
- GObject parent;
-
- ECalListViewConfigPrivate *priv;
-};
-
-struct _ECalListViewConfigClass {
- GObjectClass parent_class;
-};
-
-GType e_cal_list_view_config_get_type (void);
-ECalListViewConfig *e_cal_list_view_config_new (ECalListView *list_view);
-ECalListView *e_cal_list_view_config_get_view (ECalListViewConfig *view_config);
-void e_cal_list_view_config_set_view (ECalListViewConfig *view_config, ECalListView *list_view);
-
-G_END_DECLS
-
-#endif
diff --git a/calendar/gui/e-cal-list-view.c b/calendar/gui/e-cal-list-view.c
deleted file mode 100644
index 74973e36f7..0000000000
--- a/calendar/gui/e-cal-list-view.c
+++ /dev/null
@@ -1,525 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Authors:
- * Hans Petter Jansson <hpj@ximian.com>
- *
- * Copyright 2003, Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-/*
- * ECalListView - display calendar events in an ETable.
- */
-
-#include <config.h>
-
-#include "e-cal-list-view.h"
-#include "ea-calendar.h"
-
-#include <math.h>
-#include <time.h>
-#include <sys/stat.h>
-#include <gdk/gdkkeysyms.h>
-#include <gdk/gdkx.h>
-#include <gtk/gtkdnd.h>
-#include <gtk/gtkmain.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkvscrollbar.h>
-#include <gtk/gtkwindow.h>
-#include <gal/widgets/e-gui-utils.h>
-#include <gal/util/e-util.h>
-#include <gal/e-table/e-table-memory-store.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 <libgnome/gnome-i18n.h>
-#include <libgnome/gnome-exec.h>
-#include <libgnome/gnome-util.h>
-#include <e-util/e-categories-config.h>
-#include <e-util/e-dialog-utils.h>
-
-#include <libecal/e-cal-time-util.h>
-#include "e-cal-model-calendar.h"
-#include "e-cell-date-edit-text.h"
-#include "dialogs/delete-comp.h"
-#include "dialogs/delete-error.h"
-#include "dialogs/send-comp.h"
-#include "dialogs/cancel-comp.h"
-#include "dialogs/recur-comp.h"
-#include "comp-util.h"
-#include "itip-utils.h"
-#include "calendar-commands.h"
-#include "calendar-config.h"
-#include "goto.h"
-#include "misc.h"
-
-static void e_cal_list_view_class_init (ECalListViewClass *class);
-static void e_cal_list_view_init (ECalListView *cal_list_view);
-static void e_cal_list_view_destroy (GtkObject *object);
-static void e_cal_list_view_update_query (ECalendarView *cal_view);
-
-static GList *e_cal_list_view_get_selected_events (ECalendarView *cal_view);
-static gboolean e_cal_list_view_get_visible_time_range (ECalendarView *cal_view, time_t *start_time,
- time_t *end_time);
-
-static gboolean e_cal_list_view_popup_menu (GtkWidget *widget);
-
-static void e_cal_list_view_show_popup_menu (ECalListView *cal_list_view, gint row,
- GdkEvent *gdk_event);
-static gboolean e_cal_list_view_on_table_right_click (GtkWidget *table, gint row, gint col,
- GdkEvent *event, gpointer data);
-
-static GtkTableClass *parent_class; /* Should be ECalendarViewClass? */
-
-E_MAKE_TYPE (e_cal_list_view, "ECalListView", ECalListView, e_cal_list_view_class_init,
- e_cal_list_view_init, e_calendar_view_get_type ());
-
-static void
-e_cal_list_view_class_init (ECalListViewClass *class)
-{
- GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
- ECalendarViewClass *view_class;
-
- parent_class = g_type_class_peek_parent (class);
- object_class = (GtkObjectClass *) class;
- widget_class = (GtkWidgetClass *) class;
- view_class = (ECalendarViewClass *) class;
-
- /* Method override */
- object_class->destroy = e_cal_list_view_destroy;
-
- widget_class->popup_menu = e_cal_list_view_popup_menu;
-
- view_class->get_selected_events = e_cal_list_view_get_selected_events;
- view_class->get_visible_time_range = e_cal_list_view_get_visible_time_range;
-
- view_class->update_query = e_cal_list_view_update_query;
-}
-
-static gint
-date_compare_cb (gconstpointer a, gconstpointer b)
-{
- ECellDateEditValue *dv1 = (ECellDateEditValue *) a;
- ECellDateEditValue *dv2 = (ECellDateEditValue *) b;
- struct icaltimetype tt;
-
- /* First check if either is NULL. NULL dates sort last. */
- if (!dv1 || !dv2) {
- if (dv1 == dv2)
- return 0;
- else if (dv1)
- return -1;
- else
- return 1;
- }
-
- /* Copy the 2nd value and convert it to the same timezone as the
- first. */
- tt = dv2->tt;
-
- icaltimezone_convert_time (&tt, dv2->zone, dv1->zone);
-
- /* Now we can compare them. */
-
- return icaltime_compare (dv1->tt, tt);
-}
-
-static void
-e_cal_list_view_init (ECalListView *cal_list_view)
-{
- cal_list_view->query = NULL;
- cal_list_view->table_scrolled = NULL;
- cal_list_view->cursor_event = NULL;
- cal_list_view->set_table_id = 0;
-}
-
-/* Returns the current time, for the ECellDateEdit items. */
-static struct tm
-get_current_time_cb (ECellDateEdit *ecde, gpointer data)
-{
- ECalListView *cal_list_view = data;
- icaltimezone *zone;
- struct tm tmp_tm = { 0 };
- struct icaltimetype tt;
-
- zone = e_calendar_view_get_timezone (E_CALENDAR_VIEW (cal_list_view));
- 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;
-}
-
-static void
-load_table_state (ECalListView *cal_list_view)
-{
- struct stat st;
-
- if (!cal_list_view->table_state_path)
- return;
-
- if (stat (cal_list_view->table_state_path, &st) == 0 && st.st_size > 0 && S_ISREG (st.st_mode)) {
- e_table_load_state (e_table_scrolled_get_table (cal_list_view->table_scrolled),
- cal_list_view->table_state_path);
- }
-}
-
-static void
-save_table_state (ECalListView *cal_list_view)
-{
- if (!cal_list_view->table_state_path)
- return;
-
- e_table_save_state (e_table_scrolled_get_table (cal_list_view->table_scrolled),
- cal_list_view->table_state_path);
-}
-
-static void
-setup_e_table (ECalListView *cal_list_view)
-{
- ECalModelCalendar *model;
- ETableExtras *extras;
- GList *strings;
- ECell *cell, *popup_cell;
- GnomeCanvas *canvas;
- GtkStyle *style;
-
- model = E_CAL_MODEL_CALENDAR (e_calendar_view_get_model (E_CALENDAR_VIEW (cal_list_view)));
-
- if (cal_list_view->table_scrolled) {
- save_table_state (cal_list_view);
- gtk_widget_destroy (GTK_WIDGET (cal_list_view->table_scrolled));
- }
-
- /* Create the header columns */
-
- extras = e_table_extras_new();
-
- /* Normal string fields */
-
- cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT);
- g_object_set (G_OBJECT (cell),
- "bg_color_column", E_CAL_MODEL_FIELD_COLOR,
- NULL);
-
- e_table_extras_add_cell (extras, "calstring", cell);
-
- /* Date fields */
-
- cell = e_cell_date_edit_text_new (NULL, GTK_JUSTIFY_LEFT);
- g_object_set (G_OBJECT (cell),
- "bg_color_column", E_CAL_MODEL_FIELD_COLOR,
- NULL);
-
- popup_cell = e_cell_date_edit_new ();
- e_cell_popup_set_child (E_CELL_POPUP (popup_cell), cell);
- g_object_unref (cell);
- e_table_extras_add_cell (extras, "dateedit", popup_cell);
- cal_list_view->dates_cell = E_CELL_DATE_EDIT (popup_cell);
-
- e_cell_date_edit_set_get_time_callback (E_CELL_DATE_EDIT (popup_cell),
- get_current_time_cb,
- cal_list_view, NULL);
-
- /* Combo fields */
-
- cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT);
- g_object_set (G_OBJECT (cell),
- "bg_color_column", E_CAL_MODEL_FIELD_COLOR,
- "editable", FALSE,
- NULL);
-
- popup_cell = e_cell_combo_new ();
- e_cell_popup_set_child (E_CELL_POPUP (popup_cell), cell);
- g_object_unref (cell);
-
- strings = NULL;
- strings = g_list_append (strings, (char*) _("Public"));
- strings = g_list_append (strings, (char*) _("Private"));
- strings = g_list_append (strings, (char*) _("Confidential"));
- e_cell_combo_set_popdown_strings (E_CELL_COMBO (popup_cell),
- strings);
-
- e_table_extras_add_cell (extras, "classification", popup_cell);
-
- /* Sorting */
-
- e_table_extras_add_compare (extras, "date-compare",
- date_compare_cb);
-
- /* Create table view */
-
- cal_list_view->table_scrolled = E_TABLE_SCROLLED (
- e_table_scrolled_new_from_spec_file (E_TABLE_MODEL (model),
- extras,
- EVOLUTION_ETSPECDIR "/e-cal-list-view.etspec",
- NULL));
-
- /* Make sure text is readable on top of our color coding */
-
- canvas = GNOME_CANVAS (e_table_scrolled_get_table (cal_list_view->table_scrolled)->table_canvas);
- style = gtk_widget_get_style (GTK_WIDGET (canvas));
-
- style->fg [GTK_STATE_SELECTED] = style->text [GTK_STATE_NORMAL];
- style->fg [GTK_STATE_ACTIVE] = style->text [GTK_STATE_NORMAL];
- gtk_widget_set_style (GTK_WIDGET (canvas), style);
-
- /* Load state, if possible */
-
- load_table_state (cal_list_view);
-
- /* Connect signals */
-
- g_signal_connect (e_table_scrolled_get_table (cal_list_view->table_scrolled),
- "right-click", G_CALLBACK (e_cal_list_view_on_table_right_click), cal_list_view);
-
- /* Attach and show widget */
-
- gtk_table_attach (GTK_TABLE (cal_list_view), GTK_WIDGET (cal_list_view->table_scrolled),
- 0, 2, 0, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 1, 1);
- gtk_widget_show (GTK_WIDGET (cal_list_view->table_scrolled));
-}
-
-GtkWidget *
-e_cal_list_view_construct (ECalListView *cal_list_view, const gchar *table_state_path)
-{
- if (table_state_path)
- cal_list_view->table_state_path = g_strdup (table_state_path);
- else
- cal_list_view->table_state_path = NULL;
-
- setup_e_table (cal_list_view);
-
- return GTK_WIDGET (cal_list_view);
-}
-
-/**
- * e_cal_list_view_new:
- * @Returns: a new #ECalListView.
- *
- * Creates a new #ECalListView.
- **/
-GtkWidget *
-e_cal_list_view_new (const gchar *table_state_path)
-{
- ECalListView *cal_list_view;
- ECalModel *model;
-
- model = E_CAL_MODEL (e_cal_model_calendar_new ());
-
- cal_list_view = g_object_new (e_cal_list_view_get_type (), "model", model, NULL);
- if (!e_cal_list_view_construct (cal_list_view, table_state_path)) {
- g_message (G_STRLOC ": Could not construct the calendar list GUI");
- g_object_unref (cal_list_view);
- return NULL;
- }
-
- g_object_unref (model);
-
- return GTK_WIDGET (cal_list_view);
-}
-
-static void
-e_cal_list_view_destroy (GtkObject *object)
-{
- ECalListView *cal_list_view;
-
- cal_list_view = E_CAL_LIST_VIEW (object);
-
- if (cal_list_view->query) {
- g_signal_handlers_disconnect_matched (cal_list_view->query, G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL, cal_list_view);
- g_object_unref (cal_list_view->query);
- cal_list_view->query = NULL;
- }
-
- if (cal_list_view->set_table_id) {
- g_source_remove (cal_list_view->set_table_id);
- cal_list_view->set_table_id = 0;
- }
-
- if (cal_list_view->table_state_path) {
- save_table_state (cal_list_view);
- g_free (cal_list_view->table_state_path);
- cal_list_view->table_state_path = NULL;
- }
-
- if (cal_list_view->cursor_event) {
- g_free (cal_list_view->cursor_event);
- cal_list_view->cursor_event = NULL;
- }
-
- if (cal_list_view->table_scrolled) {
- gtk_widget_destroy (GTK_WIDGET (cal_list_view->table_scrolled));
- cal_list_view->table_scrolled = NULL;
- }
-
- GTK_OBJECT_CLASS (parent_class)->destroy (object);
-}
-
-static gboolean
-setup_e_table_cb (gpointer data)
-{
- setup_e_table (E_CAL_LIST_VIEW (data));
- E_CAL_LIST_VIEW (data)->set_table_id = 0;
- return FALSE;
-}
-
-static void
-e_cal_list_view_update_query (ECalendarView *cal_list_view)
-{
- e_calendar_view_set_status_message (E_CALENDAR_VIEW (cal_list_view), _("Searching"));
-
- if (!E_CAL_LIST_VIEW (cal_list_view)->set_table_id)
- E_CAL_LIST_VIEW (cal_list_view)->set_table_id =
- g_idle_add (setup_e_table_cb, cal_list_view);
-
- e_calendar_view_set_status_message (E_CALENDAR_VIEW (cal_list_view), NULL);
-}
-
-static void
-e_cal_list_view_show_popup_menu (ECalListView *cal_list_view, gint row, GdkEvent *gdk_event)
-{
- GtkMenu *popup;
-
- popup = e_calendar_view_create_popup_menu (E_CALENDAR_VIEW (cal_list_view));
- e_popup_menu (popup, gdk_event);
-}
-
-static gboolean
-e_cal_list_view_popup_menu (GtkWidget *widget)
-{
- ECalListView *cal_list_view = E_CAL_LIST_VIEW (widget);
-
- e_cal_list_view_show_popup_menu (cal_list_view, -1, NULL);
- return TRUE;
-}
-
-static gboolean
-e_cal_list_view_on_table_right_click (GtkWidget *table, gint row, gint col, GdkEvent *event,
- gpointer data)
-{
- ECalListView *cal_list_view = E_CAL_LIST_VIEW (data);
-
- e_cal_list_view_show_popup_menu (cal_list_view, row, event);
- return TRUE;
-}
-
-static GList *
-e_cal_list_view_get_selected_events (ECalendarView *cal_view)
-{
- GList *event_list = NULL;
- gint cursor_row;
-
- if (E_CAL_LIST_VIEW (cal_view)->cursor_event) {
- g_free (E_CAL_LIST_VIEW (cal_view)->cursor_event);
- E_CAL_LIST_VIEW (cal_view)->cursor_event = NULL;
- }
-
- cursor_row = e_table_get_cursor_row (e_table_scrolled_get_table (E_CAL_LIST_VIEW (cal_view)->table_scrolled));
-
- if (cursor_row >= 0) {
- ECalendarViewEvent *event;
-
- event = E_CAL_LIST_VIEW (cal_view)->cursor_event = g_new0 (ECalendarViewEvent, 1);
- event->comp_data =
- e_cal_model_get_component_at (e_calendar_view_get_model (cal_view),
- cursor_row);
- event_list = g_list_prepend (event_list, event);
- }
-
- return event_list;
-}
-
-static void
-adjust_range (icaltimetype icaltime, time_t *earliest, time_t *latest, gboolean *set)
-{
- time_t t;
-
- if (!icaltime_is_valid_time (icaltime))
- return;
-
- t = icaltime_as_timet (icaltime);
- *earliest = MIN (*earliest, t);
- *latest = MAX (*latest, t);
-
- *set = TRUE;
-}
-
-/* NOTE: Time use for this function increases linearly with number of events. This is not
- * ideal, since it's used in a couple of places. We could probably be smarter about it,
- * and use do it less frequently... */
-static gboolean
-e_cal_list_view_get_visible_time_range (ECalendarView *cal_view, time_t *start_time, time_t *end_time)
-{
- time_t earliest = G_MAXINT, latest = 0;
- gboolean set = FALSE;
- gint n_rows, i;
-
- n_rows = e_table_model_row_count (E_TABLE_MODEL (e_calendar_view_get_model (cal_view)));
-
- for (i = 0; i < n_rows; i++) {
- ECalModelComponent *comp;
- icalcomponent *icalcomp;
-
- comp = e_cal_model_get_component_at (e_calendar_view_get_model (cal_view), i);
- if (!comp)
- continue;
-
- icalcomp = comp->icalcomp;
- if (!icalcomp)
- continue;
-
- adjust_range (icalcomponent_get_dtstart (icalcomp), &earliest, &latest, &set);
- adjust_range (icalcomponent_get_dtend (icalcomp), &earliest, &latest, &set);
- }
-
- if (set) {
- *start_time = earliest;
- *end_time = latest;
- return TRUE;
- }
-
- return FALSE;
-}
-
-gboolean
-e_cal_list_view_get_range_shown (ECalListView *cal_list_view, GDate *start_date, gint *days_shown)
-{
- time_t first, last;
- GDate end_date;
-
- if (!e_cal_list_view_get_visible_time_range (E_CALENDAR_VIEW (cal_list_view), &first, &last))
- return FALSE;
-
- time_to_gdate_with_zone (start_date, first, e_calendar_view_get_timezone (E_CALENDAR_VIEW (cal_list_view)));
- time_to_gdate_with_zone (&end_date, last, e_calendar_view_get_timezone (E_CALENDAR_VIEW (cal_list_view)));
-
- *days_shown = g_date_days_between (start_date, &end_date);
- return TRUE;
-}
diff --git a/calendar/gui/e-cal-list-view.etspec b/calendar/gui/e-cal-list-view.etspec
deleted file mode 100644
index e5a2cc0b6d..0000000000
--- a/calendar/gui/e-cal-list-view.etspec
+++ /dev/null
@@ -1,17 +0,0 @@
-<ETableSpecification draw-grid="false" alternating-row-colors="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" priority="-1"/>
- <ETableColumn model_col="2" _title="color" cell="calcolor" priority="-4"/>
- <ETableColumn model_col="3" _title="component" cell="calcomp" priority="-4"/>
- <ETableColumn model_col="4" _title="Description" expansion="2.0" minimum_width="10" resizable="true" cell="calstring" compare="string" priority="-1"/>
- <ETableColumn model_col="5" _title="Start Date" expansion="2.0" minimum_width="10" resizable="true" cell="dateedit" compare="date-compare" priority="-2"/>
- <ETableColumn model_col="8" _title="Summary" expansion="3.0" minimum_width="10" resizable="true" cell="calstring" compare="string" priority="10"/>
-
- <ETableState>
- <column source="4"/>
- <column source="3"/>
- <column source="1"/>
- <column source="0"/>
- <grouping></grouping>
- </ETableState>
-</ETableSpecification>
diff --git a/calendar/gui/e-cal-list-view.h b/calendar/gui/e-cal-list-view.h
deleted file mode 100644
index 08d5b7c0e8..0000000000
--- a/calendar/gui/e-cal-list-view.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Authors:
- * Hans Petter Jansson <hpj@ximian.com>
- *
- * Copyright 2003, Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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_CAL_LIST_VIEW_H_
-#define _E_CAL_LIST_VIEW_H_
-
-#include <time.h>
-#include <gtk/gtktable.h>
-#include <gtk/gtktooltips.h>
-#include <gal/widgets/e-popup-menu.h>
-
-#include "e-cal-view.h"
-#include "gnome-cal.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/*
- * ECalListView - displays calendar events in an ETable.
- */
-
-#define E_CAL_LIST_VIEW(obj) GTK_CHECK_CAST (obj, e_cal_list_view_get_type (), ECalListView)
-#define E_CAL_LIST_VIEW_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, e_cal_list_view_get_type (), ECalListViewClass)
-#define E_IS_CAL_LIST_VIEW(obj) GTK_CHECK_TYPE (obj, e_cal_list_view_get_type ())
-
-
-typedef struct _ECalListView ECalListView;
-typedef struct _ECalListViewClass ECalListViewClass;
-
-struct _ECalListView
-{
- ECalendarView cal_view;
-
- /* The main display table */
- ETableScrolled *table_scrolled;
-
- /* The path to the table's state file */
- gchar *table_state_path;
-
- /* S-expression for query and the query object */
- ECalView *query;
-
- /* The default category for new events */
- gchar *default_category;
-
- /* Date editing cell */
- ECellDateEdit *dates_cell;
-
- /* The last ECalendarViewEvent we returned from e_cal_list_view_get_selected_events(), to be freed */
- ECalendarViewEvent *cursor_event;
-
- /* Idle handler ID for setting a new ETableModel */
- gint set_table_id;
-};
-
-struct _ECalListViewClass
-{
- ECalendarViewClass parent_class;
-};
-
-
-GtkType e_cal_list_view_get_type (void);
-GtkWidget *e_cal_list_view_construct (ECalListView *cal_list_view, const gchar *table_state_path);
-
-GtkWidget *e_cal_list_view_new (const gchar *table_state_path);
-
-void e_cal_list_view_set_query (ECalListView *cal_list_view, const gchar *sexp);
-void e_cal_list_view_set_default_category (ECalListView *cal_list_view, const gchar *category);
-gboolean e_cal_list_view_get_range_shown (ECalListView *cal_list_view, GDate *start_date,
- gint *days_shown);
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _E_CAL_LIST_VIEW_H_ */
diff --git a/calendar/gui/e-cal-model-calendar.c b/calendar/gui/e-cal-model-calendar.c
deleted file mode 100644
index 9fd2db7544..0000000000
--- a/calendar/gui/e-cal-model-calendar.c
+++ /dev/null
@@ -1,465 +0,0 @@
-/* Evolution calendar - Data model for ETable
- *
- * Copyright (C) 2000 Ximian, Inc.
- * Copyright (C) 2000 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <libgnome/gnome-i18n.h>
-#include <gal/util/e-util.h>
-#include "e-cal-model-calendar.h"
-#include "e-cell-date-edit-text.h"
-#include "misc.h"
-
-struct _ECalModelCalendarPrivate {
-};
-
-static void ecmc_class_init (ECalModelCalendarClass *klass);
-static void ecmc_init (ECalModelCalendar *model, ECalModelCalendarClass *klass);
-static void ecmc_finalize (GObject *object);
-static int ecmc_column_count (ETableModel *etm);
-static void *ecmc_value_at (ETableModel *etm, int col, int row);
-static void ecmc_set_value_at (ETableModel *etm, int col, int row, const void *value);
-static gboolean ecmc_is_cell_editable (ETableModel *etm, int col, int row);
-static void *ecmc_duplicate_value (ETableModel *etm, int col, const void *value);
-static void ecmc_free_value (ETableModel *etm, int col, void *value);
-static void *ecmc_initialize_value (ETableModel *etm, int col);
-static gboolean ecmc_value_is_empty (ETableModel *etm, int col, const void *value);
-static char *ecmc_value_to_string (ETableModel *etm, int col, const void *value);
-
-static void ecmc_fill_component_from_model (ECalModel *model, ECalModelComponent *comp_data,
- ETableModel *source_model, gint row);
-
-static GObjectClass *parent_class = NULL;
-
-E_MAKE_TYPE (e_cal_model_calendar, "ECalModelCalendar", ECalModelCalendar, ecmc_class_init,
- ecmc_init, E_TYPE_CAL_MODEL);
-
-static void
-ecmc_class_init (ECalModelCalendarClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- ETableModelClass *etm_class = E_TABLE_MODEL_CLASS (klass);
- ECalModelClass *model_class = E_CAL_MODEL_CLASS (klass);
-
- parent_class = g_type_class_peek_parent (klass);
-
- object_class->finalize = ecmc_finalize;
-
- etm_class->column_count = ecmc_column_count;
- etm_class->value_at = ecmc_value_at;
- etm_class->set_value_at = ecmc_set_value_at;
- etm_class->is_cell_editable = ecmc_is_cell_editable;
- etm_class->duplicate_value = ecmc_duplicate_value;
- etm_class->free_value = ecmc_free_value;
- etm_class->initialize_value = ecmc_initialize_value;
- etm_class->value_is_empty = ecmc_value_is_empty;
- etm_class->value_to_string = ecmc_value_to_string;
-
- model_class->fill_component_from_model = ecmc_fill_component_from_model;
-}
-
-static void
-ecmc_init (ECalModelCalendar *model, ECalModelCalendarClass *klass)
-{
- ECalModelCalendarPrivate *priv;
-
- priv = g_new0 (ECalModelCalendarPrivate, 1);
- model->priv = priv;
-
- e_cal_model_set_component_kind (E_CAL_MODEL (model), ICAL_VEVENT_COMPONENT);
-}
-
-static void
-ecmc_finalize (GObject *object)
-{
- ECalModelCalendarPrivate *priv;
- ECalModelCalendar *model = (ECalModelCalendar *) object;
-
- g_return_if_fail (E_IS_CAL_MODEL_CALENDAR (model));
-
- priv = model->priv;
- if (priv) {
- g_free (priv);
- model->priv = NULL;
- }
-
- if (parent_class->finalize)
- parent_class->finalize (object);
-}
-
-/* ETableModel methods */
-static int
-ecmc_column_count (ETableModel *etm)
-{
- return E_CAL_MODEL_CALENDAR_FIELD_LAST;
-}
-
-static ECellDateEditValue *
-get_dtend (ECalModelComponent *comp_data)
-{
- struct icaltimetype tt_end;
-
- if (!comp_data->dtend) {
- icaltimezone *zone;
-
- tt_end = icalcomponent_get_dtend (comp_data->icalcomp);
- if (!icaltime_is_valid_time (tt_end))
- return NULL;
-
- comp_data->dtend = g_new0 (ECellDateEditValue, 1);
- comp_data->dtend->tt = tt_end;
-
- if (icaltime_get_tzid (tt_end)
- && e_cal_get_timezone (comp_data->client, icaltime_get_tzid (tt_end), &zone, NULL))
- comp_data->dtend->zone = zone;
- else
- comp_data->dtend->zone = NULL;
- }
-
- return comp_data->dtend;
-}
-
-static void *
-get_location (ECalModelComponent *comp_data)
-{
- icalproperty *prop;
-
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_LOCATION_PROPERTY);
- if (prop)
- return (void *) icalproperty_get_location (prop);
-
- return NULL;
-}
-
-static void *
-get_transparency (ECalModelComponent *comp_data)
-{
- icalproperty *prop;
-
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_TRANSP_PROPERTY);
- if (prop) {
- icalproperty_transp transp;
-
- transp = icalproperty_get_transp (prop);
- if (transp == ICAL_TRANSP_TRANSPARENT ||
- transp == ICAL_TRANSP_TRANSPARENTNOCONFLICT)
- return _("Free");
- else if (transp == ICAL_TRANSP_OPAQUE ||
- transp == ICAL_TRANSP_OPAQUENOCONFLICT)
- return _("Busy");
- }
-
- return NULL;
-}
-
-static void *
-ecmc_value_at (ETableModel *etm, int col, int row)
-{
- ECalModelComponent *comp_data;
- ECalModelCalendarPrivate *priv;
- ECalModelCalendar *model = (ECalModelCalendar *) etm;
-
- g_return_val_if_fail (E_IS_CAL_MODEL_CALENDAR (model), NULL);
-
- priv = model->priv;
-
- g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_CALENDAR_FIELD_LAST, NULL);
- g_return_val_if_fail (row >= 0 && row < e_table_model_row_count (etm), NULL);
-
- if (col < E_CAL_MODEL_FIELD_LAST)
- return E_TABLE_MODEL_CLASS (parent_class)->value_at (etm, col, row);
-
- comp_data = e_cal_model_get_component_at (E_CAL_MODEL (model), row);
- if (!comp_data)
- return "";
-
- switch (col) {
- case E_CAL_MODEL_CALENDAR_FIELD_DTEND :
- return get_dtend (comp_data);
- case E_CAL_MODEL_CALENDAR_FIELD_LOCATION :
- return get_location (comp_data);
- case E_CAL_MODEL_CALENDAR_FIELD_TRANSPARENCY :
- return get_transparency (comp_data);
- }
-
- return "";
-}
-
-static void
-set_dtend (ECalModelComponent *comp_data, const void *value)
-{
- icalproperty *prop;
- ECellDateEditValue *dv = (ECellDateEditValue *) value;
-
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_DTEND_PROPERTY);
- if (!dv) {
- if (prop) {
- icalcomponent_remove_property (comp_data->icalcomp, prop);
- icalproperty_free (prop);
- }
- } else
- icalcomponent_set_dtend (comp_data->icalcomp, dv->tt);
-}
-
-static void
-set_location (ECalModelComponent *comp_data, const void *value)
-{
- icalproperty *prop;
-
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_LOCATION_PROPERTY);
-
- if (string_is_empty (value)) {
- if (prop) {
- icalcomponent_remove_property (comp_data->icalcomp, prop);
- icalproperty_free (prop);
- }
- } else {
- if (prop)
- icalproperty_set_location (prop, (const char *) value);
- else {
- prop = icalproperty_new_location ((const char *) value);
- icalcomponent_add_property (comp_data->icalcomp, prop);
- }
- }
-}
-
-static void
-set_transparency (ECalModelComponent *comp_data, const void *value)
-{
- icalproperty *prop;
-
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_TRANSP_PROPERTY);
-
- if (string_is_empty (value)) {
- if (prop) {
- icalcomponent_remove_property (comp_data->icalcomp, prop);
- icalproperty_free (prop);
- }
- } else {
- icalproperty_transp transp;
-
- if (!strcasecmp (value, "FREE"))
- transp = ICAL_TRANSP_TRANSPARENT;
- else if (!strcasecmp (value, "OPAQUE"))
- transp = ICAL_TRANSP_OPAQUE;
- else {
- if (prop) {
- icalcomponent_remove_property (comp_data->icalcomp, prop);
- icalproperty_free (prop);
- }
-
- return;
- }
-
- if (prop)
- icalproperty_set_transp (prop, transp);
- else {
- prop = icalproperty_new_transp (transp);
- icalcomponent_add_property (comp_data->icalcomp, prop);
- }
- }
-}
-
-static void
-ecmc_set_value_at (ETableModel *etm, int col, int row, const void *value)
-{
- ECalModelComponent *comp_data;
- ECalModelCalendar *model = (ECalModelCalendar *) etm;
-
- g_return_if_fail (E_IS_CAL_MODEL_CALENDAR (model));
- g_return_if_fail (col >= 0 && col < E_CAL_MODEL_CALENDAR_FIELD_LAST);
- g_return_if_fail (row >= 0 && row < e_table_model_row_count (etm));
-
- if (col < E_CAL_MODEL_FIELD_LAST) {
- E_TABLE_MODEL_CLASS (parent_class)->set_value_at (etm, col, row, value);
- return;
- }
-
- comp_data = e_cal_model_get_component_at (E_CAL_MODEL (model), row);
- if (!comp_data)
- return;
-
- switch (col) {
- case E_CAL_MODEL_CALENDAR_FIELD_DTEND :
- set_dtend (comp_data, value);
- break;
- case E_CAL_MODEL_CALENDAR_FIELD_LOCATION :
- set_location (comp_data, value);
- break;
- case E_CAL_MODEL_CALENDAR_FIELD_TRANSPARENCY :
- set_transparency (comp_data, value);
- break;
- }
-
- /* FIXME ask about mod type */
- if (!e_cal_modify_object (comp_data->client, comp_data->icalcomp, CALOBJ_MOD_ALL, NULL)) {
- g_warning (G_STRLOC ": Could not modify the object!");
-
- /* FIXME Show error dialog */
- }
-}
-
-static gboolean
-ecmc_is_cell_editable (ETableModel *etm, int col, int row)
-{
- ECalModelCalendar *model = (ECalModelCalendar *) etm;
-
- g_return_val_if_fail (E_IS_CAL_MODEL_CALENDAR (model), FALSE);
- g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_CALENDAR_FIELD_LAST, FALSE);
-
- /* FIXME: We can't check this as 'click-to-add' passes row 0. */
- /* g_return_val_if_fail (row >= 0 && row < e_table_model_get_row_count (etm), FALSE); */
-
- if (col < E_CAL_MODEL_FIELD_LAST)
- return E_TABLE_MODEL_CLASS (parent_class)->is_cell_editable (etm, col, row);
-
- switch (col) {
- case E_CAL_MODEL_CALENDAR_FIELD_DTEND :
- case E_CAL_MODEL_CALENDAR_FIELD_LOCATION :
- case E_CAL_MODEL_CALENDAR_FIELD_TRANSPARENCY :
- return TRUE;
- }
-
- return FALSE;
-}
-
-static void *
-ecmc_duplicate_value (ETableModel *etm, int col, const void *value)
-{
- g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_CALENDAR_FIELD_LAST, NULL);
-
- if (col < E_CAL_MODEL_FIELD_LAST)
- return E_TABLE_MODEL_CLASS (parent_class)->duplicate_value (etm, col, value);
-
- switch (col) {
- case E_CAL_MODEL_CALENDAR_FIELD_DTEND :
- /* FIXME */
- break;
- case E_CAL_MODEL_CALENDAR_FIELD_LOCATION :
- case E_CAL_MODEL_CALENDAR_FIELD_TRANSPARENCY :
- return g_strdup (value);
- }
-
- return NULL;
-}
-
-static void
-ecmc_free_value (ETableModel *etm, int col, void *value)
-{
- g_return_if_fail (col >= 0 && col < E_CAL_MODEL_CALENDAR_FIELD_LAST);
-
- if (col < E_CAL_MODEL_FIELD_LAST) {
- E_TABLE_MODEL_CLASS (parent_class)->free_value (etm, col, value);
- return;
- }
-
- switch (col) {
- case E_CAL_MODEL_CALENDAR_FIELD_DTEND :
- case E_CAL_MODEL_CALENDAR_FIELD_LOCATION :
- case E_CAL_MODEL_CALENDAR_FIELD_TRANSPARENCY :
- if (value)
- g_free (value);
- break;
- }
-}
-
-static void *
-ecmc_initialize_value (ETableModel *etm, int col)
-{
- g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_CALENDAR_FIELD_LAST, NULL);
-
- if (col < E_CAL_MODEL_FIELD_LAST)
- return E_TABLE_MODEL_CLASS (parent_class)->initialize_value (etm, col);
-
- switch (col) {
- case E_CAL_MODEL_CALENDAR_FIELD_DTEND :
- return NULL;
- case E_CAL_MODEL_CALENDAR_FIELD_LOCATION :
- case E_CAL_MODEL_CALENDAR_FIELD_TRANSPARENCY :
- return g_strdup ("");
- }
-
- return NULL;
-}
-
-static gboolean
-ecmc_value_is_empty (ETableModel *etm, int col, const void *value)
-{
- g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_CALENDAR_FIELD_LAST, TRUE);
-
- if (col < E_CAL_MODEL_FIELD_LAST)
- return E_TABLE_MODEL_CLASS (parent_class)->value_is_empty (etm, col, value);
-
- switch (col) {
- case E_CAL_MODEL_CALENDAR_FIELD_DTEND :
- return value ? FALSE : TRUE;
- case E_CAL_MODEL_CALENDAR_FIELD_LOCATION :
- case E_CAL_MODEL_CALENDAR_FIELD_TRANSPARENCY :
- return string_is_empty (value);
- }
-
- return TRUE;
-}
-
-static char *
-ecmc_value_to_string (ETableModel *etm, int col, const void *value)
-{
- g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_CALENDAR_FIELD_LAST, NULL);
-
- if (col < E_CAL_MODEL_FIELD_LAST)
- return E_TABLE_MODEL_CLASS (parent_class)->value_to_string (etm, col, value);
-
- switch (col) {
- case E_CAL_MODEL_CALENDAR_FIELD_DTEND :
- return e_cal_model_date_value_to_string (E_CAL_MODEL (etm), value);
- case E_CAL_MODEL_CALENDAR_FIELD_LOCATION :
- case E_CAL_MODEL_CALENDAR_FIELD_TRANSPARENCY :
- return g_strdup (value);
- }
-
- return NULL;
-}
-
-/* ECalModel class methods */
-
-static void
-ecmc_fill_component_from_model (ECalModel *model, ECalModelComponent *comp_data,
- ETableModel *source_model, gint row)
-{
- g_return_if_fail (E_IS_CAL_MODEL_CALENDAR (model));
- g_return_if_fail (comp_data != NULL);
- g_return_if_fail (E_IS_TABLE_MODEL (source_model));
-
- set_dtend (comp_data,
- e_table_model_value_at (source_model, E_CAL_MODEL_CALENDAR_FIELD_DTEND, row));
- set_location (comp_data,
- e_table_model_value_at (source_model, E_CAL_MODEL_CALENDAR_FIELD_LOCATION, row));
- set_transparency (comp_data,
- e_table_model_value_at (source_model, E_CAL_MODEL_CALENDAR_FIELD_TRANSPARENCY, row));
-}
-
-/**
- * e_cal_model_calendar_new
- */
-ECalModelCalendar *
-e_cal_model_calendar_new (void)
-{
- return g_object_new (E_TYPE_CAL_MODEL_CALENDAR, NULL);
-}
diff --git a/calendar/gui/e-cal-model-calendar.h b/calendar/gui/e-cal-model-calendar.h
deleted file mode 100644
index 450871c88f..0000000000
--- a/calendar/gui/e-cal-model-calendar.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Evolution calendar - Data model for ETable
- *
- * Copyright (C) 2000 Ximian, Inc.
- * Copyright (C) 2000 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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_CAL_MODEL_CALENDAR_H
-#define E_CAL_MODEL_CALENDAR_H
-
-#include "e-cal-model.h"
-
-G_BEGIN_DECLS
-
-#define E_TYPE_CAL_MODEL_CALENDAR (e_cal_model_calendar_get_type ())
-#define E_CAL_MODEL_CALENDAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_CAL_MODEL_CALENDAR, ECalModelCalendar))
-#define E_CAL_MODEL_CALENDAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_CAL_MODEL_CALENDAR, ECalModelCalendarClass))
-#define E_IS_CAL_MODEL_CALENDAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_CAL_MODEL_CALENDAR))
-#define E_IS_CAL_MODEL_CALENDAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_CAL_MODEL_CALENDAR))
-
-typedef struct _ECalModelCalendarPrivate ECalModelCalendarPrivate;
-
-typedef enum {
- /* If you add new items here or reorder them, you have to update the
- .etspec files for the tables using this model */
- E_CAL_MODEL_CALENDAR_FIELD_DTEND = E_CAL_MODEL_FIELD_LAST,
- E_CAL_MODEL_CALENDAR_FIELD_LOCATION,
- E_CAL_MODEL_CALENDAR_FIELD_TRANSPARENCY,
- E_CAL_MODEL_CALENDAR_FIELD_LAST
-} ECalModelCalendarField;
-
-typedef struct {
- ECalModel model;
- ECalModelCalendarPrivate *priv;
-} ECalModelCalendar;
-
-typedef struct {
- ECalModelClass parent_class;
-} ECalModelCalendarClass;
-
-GType e_cal_model_calendar_get_type (void);
-ECalModelCalendar *e_cal_model_calendar_new (void);
-
-G_END_DECLS
-
-#endif
diff --git a/calendar/gui/e-cal-model-tasks.c b/calendar/gui/e-cal-model-tasks.c
deleted file mode 100644
index 2251ec7f88..0000000000
--- a/calendar/gui/e-cal-model-tasks.c
+++ /dev/null
@@ -1,1017 +0,0 @@
-/* Evolution calendar - Data model for ETable
- *
- * Copyright (C) 2000 Ximian, Inc.
- * Copyright (C) 2000 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <gtk/gtkmessagedialog.h>
-#include <libgnome/gnome-i18n.h>
-#include <gal/util/e-util.h>
-#include "calendar-config.h"
-#include "e-cal-model-tasks.h"
-#include "e-cell-date-edit-text.h"
-#include "misc.h"
-
-struct _ECalModelTasksPrivate {
-};
-
-static void ecmt_class_init (ECalModelTasksClass *klass);
-static void ecmt_init (ECalModelTasks *model, ECalModelTasksClass *klass);
-static void ecmt_finalize (GObject *object);
-
-static int ecmt_column_count (ETableModel *etm);
-static void *ecmt_value_at (ETableModel *etm, int col, int row);
-static void ecmt_set_value_at (ETableModel *etm, int col, int row, const void *value);
-static gboolean ecmt_is_cell_editable (ETableModel *etm, int col, int row);
-static void *ecmt_duplicate_value (ETableModel *etm, int col, const void *value);
-static void ecmt_free_value (ETableModel *etm, int col, void *value);
-static void *ecmt_initialize_value (ETableModel *etm, int col);
-static gboolean ecmt_value_is_empty (ETableModel *etm, int col, const void *value);
-static char *ecmt_value_to_string (ETableModel *etm, int col, const void *value);
-
-static const char *ecmt_get_color_for_component (ECalModel *model, ECalModelComponent *comp_data);
-static void ecmt_fill_component_from_model (ECalModel *model, ECalModelComponent *comp_data,
- ETableModel *source_model, gint row);
-
-static GObjectClass *parent_class = NULL;
-
-E_MAKE_TYPE (e_cal_model_tasks, "ECalModelTasks", ECalModelTasks, ecmt_class_init,
- ecmt_init, E_TYPE_CAL_MODEL);
-
-static void
-ecmt_class_init (ECalModelTasksClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- ETableModelClass *etm_class = E_TABLE_MODEL_CLASS (klass);
- ECalModelClass *model_class = E_CAL_MODEL_CLASS (klass);
-
- parent_class = g_type_class_peek_parent (klass);
-
- object_class->finalize = ecmt_finalize;
-
- etm_class->column_count = ecmt_column_count;
- etm_class->value_at = ecmt_value_at;
- etm_class->set_value_at = ecmt_set_value_at;
- etm_class->is_cell_editable = ecmt_is_cell_editable;
- etm_class->duplicate_value = ecmt_duplicate_value;
- etm_class->free_value = ecmt_free_value;
- etm_class->initialize_value = ecmt_initialize_value;
- etm_class->value_is_empty = ecmt_value_is_empty;
- etm_class->value_to_string = ecmt_value_to_string;
-
- model_class->get_color_for_component = ecmt_get_color_for_component;
- model_class->fill_component_from_model = ecmt_fill_component_from_model;
-}
-
-static void
-ecmt_init (ECalModelTasks *model, ECalModelTasksClass *klass)
-{
- ECalModelTasksPrivate *priv;
-
- priv = g_new0 (ECalModelTasksPrivate, 1);
- model->priv = priv;
-
- e_cal_model_set_component_kind (E_CAL_MODEL (model), ICAL_VTODO_COMPONENT);
-}
-
-static void
-ecmt_finalize (GObject *object)
-{
- ECalModelTasksPrivate *priv;
- ECalModelTasks *model = (ECalModelTasks *) object;
-
- g_return_if_fail (E_IS_CAL_MODEL_TASKS (model));
-
- priv = model->priv;
- if (priv) {
- g_free (priv);
- model->priv = NULL;
- }
-
- if (parent_class->finalize)
- parent_class->finalize (object);
-}
-
-/* ETableModel methods */
-static int
-ecmt_column_count (ETableModel *etm)
-{
- return E_CAL_MODEL_TASKS_FIELD_LAST;
-}
-
-/* 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 (ECalModelComponent *comp_data, time_t completed_date)
-{
- icalproperty *prop;
- gboolean set_completed = TRUE;
-
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_COMPLETED_PROPERTY);
-
- /* Date Completed. */
- if (completed_date == -1) {
- if (prop)
- 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);
- if (prop)
- icalproperty_set_completed (prop, new_completed);
- else {
- prop = icalproperty_new_completed (new_completed);
- icalcomponent_add_property (comp_data->icalcomp, prop);
- }
- }
-
- /* Percent. */
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_PERCENTCOMPLETE_PROPERTY);
- if (!prop)
- icalcomponent_add_property (comp_data->icalcomp, icalproperty_new_percentcomplete (100));
- else
- icalproperty_set_percentcomplete (prop, 100);
-
- /* Status. */
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_STATUS_PROPERTY);
- if (prop)
- icalproperty_set_status (prop, ICAL_STATUS_COMPLETED);
- else
- icalcomponent_add_property (comp_data->icalcomp, icalproperty_new_status (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 (ECalModelComponent *comp_data)
-{
- icalproperty *prop;
-
- /* Date Completed. */
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_COMPLETED_PROPERTY);
- if (prop) {
- icalcomponent_remove_property (comp_data->icalcomp, prop);
- icalproperty_free (prop);
- }
-
- /* Percent. */
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_PERCENTCOMPLETE_PROPERTY);
- if (prop) {
- icalcomponent_remove_property (comp_data->icalcomp, prop);
- icalproperty_free (prop);
- }
-
- /* Status. */
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_PERCENTCOMPLETE_PROPERTY);
- if (prop)
- icalproperty_set_status (prop, ICAL_STATUS_NEEDSACTION);
-}
-
-static ECellDateEditValue *
-get_completed (ECalModelComponent *comp_data)
-{
- struct icaltimetype tt_completed;
-
- if (!comp_data->completed) {
- icaltimezone *zone;
- icalproperty *prop;
-
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_COMPLETED_PROPERTY);
- if (!prop)
- return NULL;
-
- tt_completed = icalproperty_get_completed (prop);
- if (!icaltime_is_valid_time (tt_completed))
- return NULL;
-
- comp_data->completed = g_new0 (ECellDateEditValue, 1);
- comp_data->completed->tt = tt_completed;
-
- if (icaltime_get_tzid (tt_completed)
- && e_cal_get_timezone (comp_data->client, icaltime_get_tzid (tt_completed), &zone, NULL))
- comp_data->completed->zone = zone;
- else
- comp_data->completed->zone = NULL;
- }
-
- return comp_data->completed;
-}
-
-static ECellDateEditValue *
-get_due (ECalModelComponent *comp_data)
-{
- struct icaltimetype tt_due;
-
- if (!comp_data->due) {
- icaltimezone *zone;
- icalproperty *prop;
-
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_DUE_PROPERTY);
- if (!prop)
- return NULL;
-
- tt_due = icalproperty_get_due (prop);
- if (!icaltime_is_valid_time (tt_due))
- return NULL;
-
- comp_data->due = g_new0 (ECellDateEditValue, 1);
- comp_data->due->tt = tt_due;
-
- if (icaltime_get_tzid (tt_due)
- && e_cal_get_timezone (comp_data->client, icaltime_get_tzid (tt_due), &zone, NULL))
- comp_data->due->zone = zone;
- else
- comp_data->due->zone = NULL;
- }
-
- return comp_data->due;
-}
-
-static char *
-get_geo (ECalModelComponent *comp_data)
-{
- icalproperty *prop;
- struct icalgeotype geo;
- static gchar buf[32];
-
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_GEO_PROPERTY);
- if (prop) {
- geo = icalproperty_get_geo (prop);
- 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"));
- return buf;
- }
-
- return "";
-}
-
-static int
-get_percent (ECalModelComponent *comp_data)
-{
- icalproperty *prop;
-
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_PERCENTCOMPLETE_PROPERTY);
- if (prop)
- return icalproperty_get_percentcomplete (prop);
-
- return 0;
-}
-
-static char *
-get_priority (ECalModelComponent *comp_data)
-{
- icalproperty *prop;
-
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_PRIORITY_PROPERTY);
- if (prop)
- return e_cal_util_priority_to_string (icalproperty_get_priority (prop));
-
- return "";
-}
-
-static char *
-get_status (ECalModelComponent *comp_data)
-{
- icalproperty *prop;
-
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_STATUS_PROPERTY);
- if (prop) {
- switch (icalproperty_get_status (prop)) {
- 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;
- }
- }
-
- return "";
-}
-
-static char *
-get_url (ECalModelComponent *comp_data)
-{
- icalproperty *prop;
-
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_URL_PROPERTY);
- if (prop)
- return (char *) icalproperty_get_url (prop);
-
- return "";
-}
-
-static gboolean
-is_complete (ECalModelComponent *comp_data)
-{
- icalproperty *prop;
-
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_COMPLETED_PROPERTY);
-
- return prop ? TRUE : FALSE;
-}
-
-typedef enum {
- E_CAL_MODEL_TASKS_DUE_NEVER,
- E_CAL_MODEL_TASKS_DUE_FUTURE,
- E_CAL_MODEL_TASKS_DUE_TODAY,
- E_CAL_MODEL_TASKS_DUE_OVERDUE,
- E_CAL_MODEL_TASKS_DUE_COMPLETE
-} ECalModelTasksDueStatus;
-
-
-static ECalModelTasksDueStatus
-get_due_status (ECalModelTasks *model, ECalModelComponent *comp_data)
-{
- icalproperty *prop;
-
- /* First, do we have a due date? */
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_DUE_PROPERTY);
- if (!prop)
- return E_CAL_MODEL_TASKS_DUE_NEVER;
- else {
- struct icaltimetype now_tt, due_tt;
- icaltimezone *zone;
-
- /* Second, is it already completed? */
- if (is_complete (comp_data))
- return E_CAL_MODEL_TASKS_DUE_COMPLETE;
-
- /* Third, are we overdue as of right now? */
- due_tt = icalproperty_get_due (prop);
- if (due_tt.is_date) {
- int cmp;
-
- now_tt = icaltime_current_time_with_zone (e_cal_model_get_timezone (E_CAL_MODEL (model)));
- cmp = icaltime_compare_date_only (due_tt, now_tt);
-
- if (cmp < 0)
- return E_CAL_MODEL_TASKS_DUE_OVERDUE;
- else if (cmp == 0)
- return E_CAL_MODEL_TASKS_DUE_TODAY;
- else
- return E_CAL_MODEL_TASKS_DUE_FUTURE;
- } else {
- /* Get the current time in the same timezone as the DUE date.*/
- if (!e_cal_get_timezone (comp_data->client, icaltime_get_tzid (due_tt), &zone, NULL))
- return E_CAL_MODEL_TASKS_DUE_FUTURE;
-
- now_tt = icaltime_current_time_with_zone (zone);
-
- if (icaltime_compare (due_tt, now_tt) <= 0)
- return E_CAL_MODEL_TASKS_DUE_OVERDUE;
- else
- if (icaltime_compare_date_only (due_tt, now_tt) == 0)
- return E_CAL_MODEL_TASKS_DUE_TODAY;
- else
- return E_CAL_MODEL_TASKS_DUE_FUTURE;
- }
- }
-
- return E_CAL_MODEL_TASKS_DUE_NEVER;
-}
-
-static gboolean
-is_overdue (ECalModelTasks *model, ECalModelComponent *comp_data)
-{
- switch (get_due_status (model, comp_data)) {
- case E_CAL_MODEL_TASKS_DUE_NEVER:
- case E_CAL_MODEL_TASKS_DUE_FUTURE:
- case E_CAL_MODEL_TASKS_DUE_COMPLETE:
- return FALSE;
- case E_CAL_MODEL_TASKS_DUE_TODAY:
- case E_CAL_MODEL_TASKS_DUE_OVERDUE:
- return TRUE;
- }
-
- return FALSE;
-}
-
-static void *
-ecmt_value_at (ETableModel *etm, int col, int row)
-{
- ECalModelTasksPrivate *priv;
- ECalModelComponent *comp_data;
- ECalModelTasks *model = (ECalModelTasks *) etm;
-
- g_return_val_if_fail (E_IS_CAL_MODEL_TASKS (model), NULL);
-
- priv = model->priv;
-
- g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_TASKS_FIELD_LAST, NULL);
- g_return_val_if_fail (row >= 0 && row < e_table_model_row_count (etm), NULL);
-
- if (col < E_CAL_MODEL_FIELD_LAST)
- return E_TABLE_MODEL_CLASS (parent_class)->value_at (etm, col, row);
-
- comp_data = e_cal_model_get_component_at (E_CAL_MODEL (model), row);
- if (!comp_data)
- return "";
-
- switch (col) {
- case E_CAL_MODEL_TASKS_FIELD_COMPLETED :
- return get_completed (comp_data);
- case E_CAL_MODEL_TASKS_FIELD_COMPLETE :
- return GINT_TO_POINTER (is_complete (comp_data));
- case E_CAL_MODEL_TASKS_FIELD_DUE :
- return get_due (comp_data);
- case E_CAL_MODEL_TASKS_FIELD_GEO :
- return get_geo (comp_data);
- case E_CAL_MODEL_TASKS_FIELD_OVERDUE :
- return GINT_TO_POINTER (is_overdue (model, comp_data));
- case E_CAL_MODEL_TASKS_FIELD_PERCENT :
- return GINT_TO_POINTER (get_percent (comp_data));
- case E_CAL_MODEL_TASKS_FIELD_PRIORITY :
- return get_priority (comp_data);
- case E_CAL_MODEL_TASKS_FIELD_STATUS :
- return get_status (comp_data);
- case E_CAL_MODEL_TASKS_FIELD_URL :
- return get_url (comp_data);
- }
-
- return "";
-}
-
-static void
-set_completed (ECalModelTasks *model, ECalModelComponent *comp_data, const void *value)
-{
- ECellDateEditValue *dv = (ECellDateEditValue *) value;
-
- if (!dv)
- ensure_task_not_complete (comp_data);
- else {
- time_t t;
-
- if (dv->tt.is_date) {
- /* if it's a date, it will be floating,
- but completed needs a date time value */
- dv->tt.is_date = FALSE;
- t = icaltime_as_timet_with_zone (dv->tt, e_cal_model_get_timezone (E_CAL_MODEL (model)));
- } else {
- /* we assume that COMPLETED is entered in the current timezone,
- even though it gets stored in UTC */
- t = icaltime_as_timet_with_zone (dv->tt, dv->zone);
- }
-
- ensure_task_complete (comp_data, t);
- }
-}
-
-static void
-set_complete (ECalModelComponent *comp_data, const void *value)
-{
- gint state = GPOINTER_TO_INT (value);
-
- if (state)
- ensure_task_complete (comp_data, -1);
- else
- ensure_task_not_complete (comp_data);
-}
-
-static void
-set_due (ECalModelComponent *comp_data, const void *value)
-{
- icalproperty *prop;
- ECellDateEditValue *dv = (ECellDateEditValue *) value;
-
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_DUE_PROPERTY);
-
- if (!dv) {
- if (prop) {
- icalcomponent_remove_property (comp_data->icalcomp, prop);
- icalproperty_free (prop);
- }
- } else {
- if (prop)
- icalproperty_set_due (prop, dv->tt);
- else {
- prop = icalproperty_new_due (dv->tt);
- icalcomponent_add_property (comp_data->icalcomp, prop);
- }
- }
-}
-
-/* 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 = gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
- _("The geographical position must be entered "
- "in the format: \n\n45.436845,125.862501"));
- gtk_widget_show (dialog);
-}
-
-static void
-set_geo (ECalModelComponent *comp_data, const char *value)
-{
- double latitude, longitude;
- int matched;
- struct icalgeotype geo;
- icalproperty *prop;
-
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_GEO_PROPERTY);
-
- if (string_is_empty (value)) {
- if (prop) {
- icalcomponent_remove_property (comp_data->icalcomp, prop);
- icalproperty_free (prop);
- }
- } else {
- matched = sscanf (value, "%lg , %lg", &latitude, &longitude);
- if (matched != 2)
- show_geo_warning ();
-
- geo.lat = latitude;
- geo.lon = longitude;
- if (prop)
- icalproperty_set_geo (prop, geo);
- else {
- prop = icalproperty_new_geo (geo);
- icalcomponent_add_property (comp_data->icalcomp, prop);
- }
-
- }
-}
-
-static void
-set_status (ECalModelComponent *comp_data, const char *value)
-{
- icalproperty_status status;
- icalproperty *prop;
-
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_STATUS_PROPERTY);
-
- /* 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;
- }
-
- if (prop)
- icalproperty_set_status (prop, status);
- else {
- prop = icalproperty_new_status (status);
- icalcomponent_add_property (comp_data->icalcomp, prop);
- }
-
-/* if (status == ICAL_STATUS_NEEDSACTION) { */
-/* percent = 0; */
-/* e_cal_component_set_percent (comp, &percent); */
-/* e_cal_component_set_completed (comp, NULL); */
-/* } else if (status == ICAL_STATUS_INPROCESS) { */
-/* ensure_task_not_complete (comp); */
-/* percent = 50; */
-/* e_cal_component_set_percent (comp, &percent); */
-/* } else if (status == ICAL_STATUS_COMPLETED) { */
-/* ensure_task_complete (comp, -1); */
-/* } */
-}
-
-static void
-set_percent (ECalModelComponent *comp_data, const void *value)
-{
- icalproperty *prop;
- gint percent = GPOINTER_TO_INT (value);
-
- g_return_if_fail (percent >= -1);
- g_return_if_fail (percent <= 100);
-
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_PERCENTCOMPLETE_PROPERTY);
-
- /* A value of -1 means it isn't set */
- if (percent == -1) {
- if (prop) {
- icalcomponent_remove_property (comp_data->icalcomp, prop);
- icalproperty_free (prop);
- }
- ensure_task_not_complete (comp_data);
- } else {
- if (prop)
- icalproperty_set_percentcomplete (prop, percent);
- else {
- prop = icalproperty_new_percentcomplete (percent);
- icalcomponent_add_property (comp_data->icalcomp, prop);
- }
-
- if (percent == 100)
- ensure_task_complete (comp_data, -1);
- else {
- ensure_task_not_complete (comp_data);
- if (percent > 0)
- set_status (comp_data, _("In Progress"));
- }
- }
-
-}
-
-static void
-set_priority (ECalModelComponent *comp_data, const char *value)
-{
- icalproperty *prop;
- int priority;
-
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_PRIORITY_PROPERTY);
-
- priority = e_cal_util_priority_from_string (value);
- if (priority == -1) {
- g_warning ("Invalid priority");
- priority = 0;
- }
-
- if (prop)
- icalproperty_set_priority (prop, priority);
- else {
- prop = icalproperty_new_priority (priority);
- icalcomponent_add_property (comp_data->icalcomp, prop);
- }
-}
-
-static void
-set_url (ECalModelComponent *comp_data, const char *value)
-{
- icalproperty *prop;
-
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_URL_PROPERTY);
-
- if (string_is_empty (value)) {
- if (prop) {
- icalcomponent_remove_property (comp_data->icalcomp, prop);
- icalproperty_free (prop);
- }
- } else {
- if (prop)
- icalproperty_set_url (prop, value);
- else {
- prop = icalproperty_new_url (value);
- icalcomponent_add_property (comp_data->icalcomp, prop);
- }
- }
-}
-
-static void
-ecmt_set_value_at (ETableModel *etm, int col, int row, const void *value)
-{
- ECalModelTasksPrivate *priv;
- ECalModelComponent *comp_data;
- ECalModelTasks *model = (ECalModelTasks *) etm;
-
- g_return_if_fail (E_IS_CAL_MODEL_TASKS (model));
-
- priv = model->priv;
-
- g_return_if_fail (col >= 0 && col < E_CAL_MODEL_TASKS_FIELD_LAST);
- g_return_if_fail (row >= 0 && row < e_table_model_row_count (etm));
-
- if (col < E_CAL_MODEL_FIELD_LAST) {
- E_TABLE_MODEL_CLASS (parent_class)->set_value_at (etm, col, row, value);
- return;
- }
-
- comp_data = e_cal_model_get_component_at (E_CAL_MODEL (model), row);
- if (!comp_data)
- return;
-
- switch (col) {
- case E_CAL_MODEL_TASKS_FIELD_COMPLETED :
- set_completed (model, comp_data, value);
- break;
- case E_CAL_MODEL_TASKS_FIELD_COMPLETE :
- set_complete (comp_data, value);
- break;
- case E_CAL_MODEL_TASKS_FIELD_DUE :
- set_due (comp_data, value);
- break;
- case E_CAL_MODEL_TASKS_FIELD_GEO :
- set_geo (comp_data, value);
- break;
- case E_CAL_MODEL_TASKS_FIELD_PERCENT :
- set_percent (comp_data, value);
- break;
- case E_CAL_MODEL_TASKS_FIELD_PRIORITY :
- set_priority (comp_data, value);
- break;
- case E_CAL_MODEL_TASKS_FIELD_URL :
- set_url (comp_data, value);
- break;
- }
-
- /* FIXME ask about mod type */
- if (!e_cal_modify_object (comp_data->client, comp_data->icalcomp, CALOBJ_MOD_ALL, NULL)) {
- g_warning (G_STRLOC ": Could not modify the object!");
-
- /* FIXME Show error dialog */
- }
-}
-
-static gboolean
-ecmt_is_cell_editable (ETableModel *etm, int col, int row)
-{
- ECalModelTasksPrivate *priv;
- ECalModelTasks *model = (ECalModelTasks *) etm;
-
- g_return_val_if_fail (E_IS_CAL_MODEL_TASKS (model), FALSE);
-
- priv = model->priv;
-
- g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_TASKS_FIELD_LAST, FALSE);
-
- /* FIXME: We can't check this as 'click-to-add' passes row 0. */
- /* g_return_val_if_fail (row >= 0 && row < e_table_model_get_row_count (etm), FALSE); */
-
- if (col < E_CAL_MODEL_FIELD_LAST)
- return E_TABLE_MODEL_CLASS (parent_class)->is_cell_editable (etm, col, row);
-
- switch (col) {
- case E_CAL_MODEL_TASKS_FIELD_COMPLETED :
- case E_CAL_MODEL_TASKS_FIELD_COMPLETE :
- case E_CAL_MODEL_TASKS_FIELD_DUE :
- case E_CAL_MODEL_TASKS_FIELD_GEO :
- case E_CAL_MODEL_TASKS_FIELD_PERCENT :
- case E_CAL_MODEL_TASKS_FIELD_PRIORITY :
- case E_CAL_MODEL_TASKS_FIELD_URL :
- return TRUE;
- }
-
- return FALSE;
-}
-
-static void *
-ecmt_duplicate_value (ETableModel *etm, int col, const void *value)
-{
- g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_TASKS_FIELD_LAST, NULL);
-
- if (col < E_CAL_MODEL_FIELD_LAST)
- return E_TABLE_MODEL_CLASS (parent_class)->duplicate_value (etm, col, value);
-
- switch (col) {
- case E_CAL_MODEL_TASKS_FIELD_GEO :
- case E_CAL_MODEL_TASKS_FIELD_PRIORITY :
- case E_CAL_MODEL_TASKS_FIELD_STATUS :
- case E_CAL_MODEL_TASKS_FIELD_URL :
- return g_strdup (value);
- case E_CAL_MODEL_TASKS_FIELD_COMPLETED :
- case E_CAL_MODEL_TASKS_FIELD_DUE :
- /* FIXME */
- break;
- case E_CAL_MODEL_TASKS_FIELD_COMPLETE :
- case E_CAL_MODEL_TASKS_FIELD_PERCENT :
- case E_CAL_MODEL_TASKS_FIELD_OVERDUE :
- return (void *) value;
- }
-
- return NULL;
-}
-
-static void
-ecmt_free_value (ETableModel *etm, int col, void *value)
-{
- g_return_if_fail (col >= 0 && col < E_CAL_MODEL_TASKS_FIELD_LAST);
-
- if (col < E_CAL_MODEL_FIELD_LAST) {
- E_TABLE_MODEL_CLASS (parent_class)->free_value (etm, col, value);
- return;
- }
-
- switch (col) {
- case E_CAL_MODEL_TASKS_FIELD_COMPLETED :
- case E_CAL_MODEL_TASKS_FIELD_DUE :
- case E_CAL_MODEL_TASKS_FIELD_GEO :
- case E_CAL_MODEL_TASKS_FIELD_PRIORITY :
- case E_CAL_MODEL_TASKS_FIELD_STATUS :
- case E_CAL_MODEL_TASKS_FIELD_URL :
- if (value)
- g_free (value);
- break;
- case E_CAL_MODEL_TASKS_FIELD_PERCENT :
- case E_CAL_MODEL_TASKS_FIELD_COMPLETE :
- case E_CAL_MODEL_TASKS_FIELD_OVERDUE :
- break;
- }
-}
-
-static void *
-ecmt_initialize_value (ETableModel *etm, int col)
-{
- ECalModelTasks *model = (ECalModelTasks *) etm;
-
- g_return_val_if_fail (E_IS_CAL_MODEL_TASKS (model), NULL);
- g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_TASKS_FIELD_LAST, NULL);
-
- if (col < E_CAL_MODEL_FIELD_LAST)
- return E_TABLE_MODEL_CLASS (parent_class)->initialize_value (etm, col);
-
- switch (col) {
- case E_CAL_MODEL_TASKS_FIELD_GEO :
- case E_CAL_MODEL_TASKS_FIELD_PRIORITY :
- case E_CAL_MODEL_TASKS_FIELD_STATUS :
- case E_CAL_MODEL_TASKS_FIELD_URL :
- return g_strdup ("");
- case E_CAL_MODEL_TASKS_FIELD_COMPLETED :
- case E_CAL_MODEL_TASKS_FIELD_DUE :
- case E_CAL_MODEL_TASKS_FIELD_COMPLETE :
- case E_CAL_MODEL_TASKS_FIELD_OVERDUE :
- return NULL;
- case E_CAL_MODEL_TASKS_FIELD_PERCENT :
- return GINT_TO_POINTER (-1);
- }
-
- return NULL;
-}
-
-static gboolean
-ecmt_value_is_empty (ETableModel *etm, int col, const void *value)
-{
- ECalModelTasksPrivate *priv;
- ECalModelTasks *model = (ECalModelTasks *) etm;
-
- g_return_val_if_fail (E_IS_CAL_MODEL_TASKS (model), TRUE);
- g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_TASKS_FIELD_LAST, TRUE);
-
- priv = model->priv;
-
- if (col < E_CAL_MODEL_FIELD_LAST)
- return E_TABLE_MODEL_CLASS (parent_class)->value_is_empty (etm, col, value);
-
- switch (col) {
- case E_CAL_MODEL_TASKS_FIELD_GEO :
- case E_CAL_MODEL_TASKS_FIELD_PRIORITY :
- case E_CAL_MODEL_TASKS_FIELD_STATUS :
- case E_CAL_MODEL_TASKS_FIELD_URL :
- return string_is_empty (value);
- case E_CAL_MODEL_TASKS_FIELD_COMPLETED :
- case E_CAL_MODEL_TASKS_FIELD_DUE :
- return value ? FALSE : TRUE;
- case E_CAL_MODEL_TASKS_FIELD_PERCENT :
- return (GPOINTER_TO_INT (value) < 0) ? TRUE : FALSE;
- case E_CAL_MODEL_TASKS_FIELD_COMPLETE :
- case E_CAL_MODEL_TASKS_FIELD_OVERDUE :
- return TRUE;
- }
-
- return TRUE;
-}
-
-static char *
-ecmt_value_to_string (ETableModel *etm, int col, const void *value)
-{
- ECalModelTasks *model = (ECalModelTasks *) etm;
-
- g_return_val_if_fail (E_IS_CAL_MODEL_TASKS (model), NULL);
- g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_TASKS_FIELD_LAST, NULL);
-
- if (col < E_CAL_MODEL_FIELD_LAST)
- return E_TABLE_MODEL_CLASS (parent_class)->value_to_string (etm, col, value);
-
- switch (col) {
- case E_CAL_MODEL_TASKS_FIELD_GEO :
- case E_CAL_MODEL_TASKS_FIELD_PRIORITY :
- case E_CAL_MODEL_TASKS_FIELD_STATUS :
- case E_CAL_MODEL_TASKS_FIELD_URL :
- return g_strdup (value);
- case E_CAL_MODEL_TASKS_FIELD_COMPLETED :
- case E_CAL_MODEL_TASKS_FIELD_DUE :
- return e_cal_model_date_value_to_string (E_CAL_MODEL (model), value);
- case E_CAL_MODEL_TASKS_FIELD_COMPLETE :
- case E_CAL_MODEL_TASKS_FIELD_OVERDUE :
- return value ? _("Yes") : _("No");
- case E_CAL_MODEL_TASKS_FIELD_PERCENT :
- if (GPOINTER_TO_INT (value) < 0)
- return g_strdup ("N/A");
- else
- return g_strdup_printf ("%i%%", GPOINTER_TO_INT (value));
- }
-
- return NULL;
-}
-
-/* ECalModel class methods */
-
-static const char *
-ecmt_get_color_for_component (ECalModel *model, ECalModelComponent *comp_data)
-{
- g_return_val_if_fail (E_IS_CAL_MODEL_TASKS (model), NULL);
- g_return_val_if_fail (comp_data != NULL, NULL);
-
- switch (get_due_status ((ECalModelTasks *) model, comp_data)) {
- case E_CAL_MODEL_TASKS_DUE_TODAY:
- return calendar_config_get_tasks_due_today_color ();
- case E_CAL_MODEL_TASKS_DUE_OVERDUE:
- return calendar_config_get_tasks_overdue_color ();
- case E_CAL_MODEL_TASKS_DUE_NEVER:
- case E_CAL_MODEL_TASKS_DUE_FUTURE:
- case E_CAL_MODEL_TASKS_DUE_COMPLETE:
- break;
- }
-
- return "black";
- /* return E_CAL_MODEL_CLASS (parent_class)->get_color_for_component (model, comp_data); */
-}
-
-static void
-ecmt_fill_component_from_model (ECalModel *model, ECalModelComponent *comp_data,
- ETableModel *source_model, gint row)
-{
- g_return_if_fail (E_IS_CAL_MODEL_TASKS (model));
- g_return_if_fail (comp_data != NULL);
- g_return_if_fail (E_IS_TABLE_MODEL (source_model));
-
- set_completed ((ECalModelTasks *) model, comp_data,
- e_table_model_value_at (source_model, E_CAL_MODEL_TASKS_FIELD_COMPLETED, row));
- set_due (comp_data,
- e_table_model_value_at (source_model, E_CAL_MODEL_TASKS_FIELD_DUE, row));
- set_geo (comp_data,
- e_table_model_value_at (source_model, E_CAL_MODEL_TASKS_FIELD_GEO, row));
- set_percent (comp_data,
- e_table_model_value_at (source_model, E_CAL_MODEL_TASKS_FIELD_PERCENT, row));
- set_priority (comp_data,
- e_table_model_value_at (source_model, E_CAL_MODEL_TASKS_FIELD_PRIORITY, row));
- set_status (comp_data,
- e_table_model_value_at (source_model, E_CAL_MODEL_TASKS_FIELD_STATUS, row));
- set_url (comp_data,
- e_table_model_value_at (source_model, E_CAL_MODEL_TASKS_FIELD_URL, row));
-}
-
-/**
- * e_cal_model_tasks_new
- */
-ECalModelTasks *
-e_cal_model_tasks_new (void)
-{
- return g_object_new (E_TYPE_CAL_MODEL_TASKS, NULL);
-}
-
-/**
- * e_cal_model_tasks_mark_task_complete
- */
-void
-e_cal_model_tasks_mark_task_complete (ECalModelTasks *model, gint model_row)
-{
- ECalModelTasksPrivate *priv;
- ECalModelComponent *comp_data;
-
- g_return_if_fail (E_IS_CAL_MODEL_TASKS (model));
- g_return_if_fail (model_row >= 0 && model_row < e_table_model_row_count (E_TABLE_MODEL (model)));
-
- priv = model->priv;
-
- comp_data = e_cal_model_get_component_at (E_CAL_MODEL (model), model_row);
- if (comp_data)
- ensure_task_complete (comp_data, -1);
-}
diff --git a/calendar/gui/e-cal-model-tasks.h b/calendar/gui/e-cal-model-tasks.h
deleted file mode 100644
index b7c5786ab4..0000000000
--- a/calendar/gui/e-cal-model-tasks.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* Evolution calendar - Data model for ETable
- *
- * Copyright (C) 2000 Ximian, Inc.
- * Copyright (C) 2000 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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_CAL_MODEL_TASKS_H
-#define E_CAL_MODEL_TASKS_H
-
-#include "e-cal-model.h"
-
-G_BEGIN_DECLS
-
-#define E_TYPE_CAL_MODEL_TASKS (e_cal_model_tasks_get_type ())
-#define E_CAL_MODEL_TASKS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_CAL_MODEL_TASKS, ECalModelTasks))
-#define E_CAL_MODEL_TASKS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_CAL_MODEL_TASKS, ECalModelTasksClass))
-#define E_IS_CAL_MODEL_TASKS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_CAL_MODEL_TASKS))
-#define E_IS_CAL_MODEL_TASKS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_CAL_MODEL_TASKS))
-
-typedef struct _ECalModelTasksPrivate ECalModelTasksPrivate;
-
-typedef enum {
- /* If you add new items here or reorder them, you have to update the
- .etspec files for the tables using this model */
- E_CAL_MODEL_TASKS_FIELD_COMPLETED = E_CAL_MODEL_FIELD_LAST,
- E_CAL_MODEL_TASKS_FIELD_COMPLETE,
- E_CAL_MODEL_TASKS_FIELD_DUE,
- E_CAL_MODEL_TASKS_FIELD_GEO,
- E_CAL_MODEL_TASKS_FIELD_OVERDUE,
- E_CAL_MODEL_TASKS_FIELD_PERCENT,
- E_CAL_MODEL_TASKS_FIELD_PRIORITY,
- E_CAL_MODEL_TASKS_FIELD_STATUS,
- E_CAL_MODEL_TASKS_FIELD_URL,
- E_CAL_MODEL_TASKS_FIELD_LAST
-} ECalModelTasksField;
-
-typedef struct {
- ECalModel model;
- ECalModelTasksPrivate *priv;
-} ECalModelTasks;
-
-typedef struct {
- ECalModelClass parent_class;
-} ECalModelTasksClass;
-
-GType e_cal_model_tasks_get_type (void);
-ECalModelTasks *e_cal_model_tasks_new (void);
-
-void e_cal_model_tasks_mark_task_complete (ECalModelTasks *model, gint model_row);
-
-G_END_DECLS
-
-#endif
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c
deleted file mode 100644
index 9ac1104380..0000000000
--- a/calendar/gui/e-cal-model.c
+++ /dev/null
@@ -1,1597 +0,0 @@
-/* Evolution calendar - Data model for ETable
- *
- * Copyright (C) 2000 Ximian, Inc.
- * Copyright (C) 2000 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <glib/garray.h>
-#include <libgnome/gnome-i18n.h>
-#include <gal/util/e-util.h>
-#include <e-util/e-config-listener.h>
-#include <e-util/e-time-utils.h>
-#include <libecal/e-cal-time-util.h>
-#include "calendar-config.h"
-#include "comp-util.h"
-#include "e-cal-model.h"
-#include "itip-utils.h"
-#include "misc.h"
-
-typedef struct {
- ECal *client;
- ECalView *query;
-} ECalModelClient;
-
-struct _ECalModelPrivate {
- /* The list of clients we are managing. Each element is of type ECalModelClient */
- GList *clients;
-
- /* The default client in the list */
- ECal *default_client;
-
- /* Array for storing the objects. Each element is of type ECalModelComponent */
- GPtrArray *objects;
-
- icalcomponent_kind kind;
- icaltimezone *zone;
-
- /* The search regular expression */
- gchar *sexp;
-
- /* The default category */
- gchar *default_category;
-
- /* Addresses for determining icons */
- EAccountList *accounts;
-
- /* Whether we display dates in 24-hour format. */
- gboolean use_24_hour_format;
-};
-
-static void e_cal_model_class_init (ECalModelClass *klass);
-static void e_cal_model_init (ECalModel *model, ECalModelClass *klass);
-static void e_cal_model_finalize (GObject *object);
-
-static int ecm_column_count (ETableModel *etm);
-static int ecm_row_count (ETableModel *etm);
-static void *ecm_value_at (ETableModel *etm, int col, int row);
-static void ecm_set_value_at (ETableModel *etm, int col, int row, const void *value);
-static gboolean ecm_is_cell_editable (ETableModel *etm, int col, int row);
-static void ecm_append_row (ETableModel *etm, ETableModel *source, int row);
-static void *ecm_duplicate_value (ETableModel *etm, int col, const void *value);
-static void ecm_free_value (ETableModel *etm, int col, void *value);
-static void *ecm_initialize_value (ETableModel *etm, int col);
-static gboolean ecm_value_is_empty (ETableModel *etm, int col, const void *value);
-static char *ecm_value_to_string (ETableModel *etm, int col, const void *value);
-
-static const char *ecm_get_color_for_component (ECalModel *model, ECalModelComponent *comp_data);
-
-static GObjectClass *parent_class = NULL;
-
-E_MAKE_TYPE (e_cal_model, "ECalModel", ECalModel, e_cal_model_class_init,
- e_cal_model_init, E_TABLE_MODEL_TYPE);
-
-static void
-e_cal_model_class_init (ECalModelClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- ETableModelClass *etm_class = E_TABLE_MODEL_CLASS (klass);
-
- parent_class = g_type_class_peek_parent (klass);
-
- object_class->finalize = e_cal_model_finalize;
-
- etm_class->column_count = ecm_column_count;
- etm_class->row_count = ecm_row_count;
- etm_class->value_at = ecm_value_at;
- etm_class->set_value_at = ecm_set_value_at;
- etm_class->is_cell_editable = ecm_is_cell_editable;
- etm_class->append_row = ecm_append_row;
- etm_class->duplicate_value = ecm_duplicate_value;
- etm_class->free_value = ecm_free_value;
- etm_class->initialize_value = ecm_initialize_value;
- etm_class->value_is_empty = ecm_value_is_empty;
- etm_class->value_to_string = ecm_value_to_string;
-
- klass->get_color_for_component = ecm_get_color_for_component;
- klass->fill_component_from_model = NULL;
-}
-
-static void
-e_cal_model_init (ECalModel *model, ECalModelClass *klass)
-{
- ECalModelPrivate *priv;
-
- priv = g_new0 (ECalModelPrivate, 1);
- model->priv = priv;
-
- priv->sexp = g_strdup ("#t"); /* match all by default */
-
- priv->objects = g_ptr_array_new ();
- priv->kind = ICAL_NO_COMPONENT;
-
- priv->accounts = itip_addresses_get ();
-
- priv->use_24_hour_format = TRUE;
-}
-
-static void
-free_comp_data (ECalModelComponent *comp_data)
-{
- g_return_if_fail (comp_data != NULL);
-
- comp_data->client = NULL;
-
- if (comp_data->icalcomp) {
- icalcomponent_free (comp_data->icalcomp);
- comp_data->icalcomp = NULL;
- }
-
- if (comp_data->dtstart) {
- g_free (comp_data->dtstart);
- comp_data->dtstart = NULL;
- }
-
- if (comp_data->dtend) {
- g_free (comp_data->dtend);
- comp_data->dtend = NULL;
- }
-
- if (comp_data->due) {
- g_free (comp_data->due);
- comp_data->due = NULL;
- }
-
- if (comp_data->completed) {
- g_free (comp_data->completed);
- comp_data->completed = NULL;
- }
-
- g_free (comp_data);
-}
-
-static void
-clear_objects_array (ECalModelPrivate *priv)
-{
- gint i;
-
- for (i = 0; i < priv->objects->len; i++) {
- ECalModelComponent *comp_data;
-
- comp_data = g_ptr_array_index (priv->objects, i);
- g_assert (comp_data != NULL);
- free_comp_data (comp_data);
- }
-
-
- g_ptr_array_set_size (priv->objects, 0);
-}
-
-static void
-e_cal_model_finalize (GObject *object)
-{
- ECalModelPrivate *priv;
- ECalModel *model = (ECalModel *) object;
-
- g_return_if_fail (E_IS_CAL_MODEL (model));
-
- priv = model->priv;
- if (priv) {
- if (priv->clients) {
- while (priv->clients != NULL) {
- ECalModelClient *client_data = (ECalModelClient *) priv->clients->data;
-
- g_signal_handlers_disconnect_matched (client_data->client, G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL, model);
- g_signal_handlers_disconnect_matched (client_data->query, G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL, model);
-
- priv->clients = g_list_remove (priv->clients, client_data);
- g_object_unref (client_data->client);
- g_object_unref (client_data->query);
- g_free (client_data);
- }
-
- priv->clients = NULL;
- }
-
- if (priv->sexp) {
- g_free (priv->sexp);
- priv->sexp = NULL;
- }
-
- if (priv->default_category) {
- g_free (priv->default_category);
- priv->default_category = NULL;
- }
-
- if (priv->objects) {
- clear_objects_array (priv);
- g_ptr_array_free (priv->objects, FALSE);
- priv->objects = NULL;
- }
-
- if (priv->accounts) {
- priv->accounts = NULL;
- }
-
- g_free (priv);
- model->priv = NULL;
- }
-
- if (parent_class->finalize)
- parent_class->finalize (object);
-}
-
-/* ETableModel methods */
-
-static int
-ecm_column_count (ETableModel *etm)
-{
- return E_CAL_MODEL_FIELD_LAST;
-}
-
-static int
-ecm_row_count (ETableModel *etm)
-{
- ECalModelPrivate *priv;
- ECalModel *model = (ECalModel *) etm;
-
- g_return_val_if_fail (E_IS_CAL_MODEL (model), -1);
-
- priv = model->priv;
-
- return priv->objects->len;
-}
-
-static char *
-get_categories (ECalModelComponent *comp_data)
-{
- icalproperty *prop;
-
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_CATEGORIES_PROPERTY);
- if (prop)
- return (char *) icalproperty_get_categories (prop);
-
- return "";
-}
-
-static char *
-get_classification (ECalModelComponent *comp_data)
-{
- icalproperty *prop;
- icalproperty_class class;
-
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_CLASS_PROPERTY);
-
- if (!prop)
- return _("Public");
-
- class = icalproperty_get_class (prop);
-
- switch (class)
- {
- case ICAL_CLASS_PUBLIC:
- return _("Public");
- case ICAL_CLASS_PRIVATE:
- return _("Private");
- case ICAL_CLASS_CONFIDENTIAL:
- return _("Confidential");
- default:
- return _("Unknown");
- }
-
- return _("Unknown");
-}
-
-static const char *
-get_color (ECalModel *model, ECalModelComponent *comp_data)
-{
- g_return_val_if_fail (E_IS_CAL_MODEL (model), NULL);
-
- return e_cal_model_get_color_for_component (model, comp_data);
-}
-
-static char *
-get_description (ECalModelComponent *comp_data)
-{
- icalproperty *prop;
- static GString *str = NULL;
-
- if (str)
- g_string_free (str, TRUE);
-
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_DESCRIPTION_PROPERTY);
- if (prop) {
- str = g_string_new ("");
- do {
- str = g_string_append (str, icalproperty_get_description (prop));
- } while ((prop = icalcomponent_get_next_property (comp_data->icalcomp, ICAL_DESCRIPTION_PROPERTY)));
-
- return str->str;
- }
-
- return "";
-}
-
-static ECellDateEditValue*
-get_dtstart (ECalModel *model, ECalModelComponent *comp_data)
-{
- ECalModelPrivate *priv;
- struct icaltimetype tt_start;
-
- priv = model->priv;
-
- if (!comp_data->dtstart) {
- icaltimezone *zone;
- icalproperty *prop;
-
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_DTSTART_PROPERTY);
- if (!prop)
- return NULL;
-
- tt_start = icalproperty_get_dtstart (prop);
- if (!icaltime_is_valid_time (tt_start))
- return NULL;
-
- comp_data->dtstart = g_new0 (ECellDateEditValue, 1);
- comp_data->dtstart->tt = tt_start;
-
- if (icaltime_get_tzid (tt_start)
- && e_cal_get_timezone (comp_data->client, icaltime_get_tzid (tt_start), &zone, NULL))
- comp_data->dtstart->zone = zone;
- else
- comp_data->dtstart->zone = NULL;
- }
-
- return comp_data->dtstart;
-}
-
-static char *
-get_summary (ECalModelComponent *comp_data)
-{
- icalproperty *prop;
-
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_SUMMARY_PROPERTY);
- if (prop)
- return (char *) icalproperty_get_summary (prop);
-
- return "";
-}
-
-static char *
-get_uid (ECalModelComponent *comp_data)
-{
- return (char *) icalcomponent_get_uid (comp_data->icalcomp);
-}
-
-static void *
-ecm_value_at (ETableModel *etm, int col, int row)
-{
- ECalModelPrivate *priv;
- ECalModelComponent *comp_data;
- ECalModel *model = (ECalModel *) etm;
-
- g_return_val_if_fail (E_IS_CAL_MODEL (model), NULL);
-
- priv = model->priv;
-
- g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_FIELD_LAST, NULL);
- g_return_val_if_fail (row >= 0 && row < priv->objects->len, NULL);
-
- comp_data = g_ptr_array_index (priv->objects, row);
- g_assert (comp_data != NULL);
-
- switch (col) {
- case E_CAL_MODEL_FIELD_CATEGORIES :
- return get_categories (comp_data);
- case E_CAL_MODEL_FIELD_CLASSIFICATION :
- return get_classification (comp_data);
- case E_CAL_MODEL_FIELD_COLOR :
- return (void *) get_color (model, comp_data);
- case E_CAL_MODEL_FIELD_COMPONENT :
- return comp_data->icalcomp;
- case E_CAL_MODEL_FIELD_DESCRIPTION :
- return get_description (comp_data);
- case E_CAL_MODEL_FIELD_DTSTART :
- return (void *) get_dtstart (model, comp_data);
- case E_CAL_MODEL_FIELD_HAS_ALARMS :
- return GINT_TO_POINTER ((icalcomponent_get_first_component (comp_data->icalcomp,
- ICAL_VALARM_COMPONENT) != NULL));
- case E_CAL_MODEL_FIELD_ICON :
- {
- ECalComponent *comp;
- icalcomponent *icalcomp;
- gint retval = 0;
-
- comp = e_cal_component_new ();
- icalcomp = icalcomponent_new_clone (comp_data->icalcomp);
- if (e_cal_component_set_icalcomponent (comp, icalcomp)) {
- if (e_cal_component_has_recurrences (comp))
- retval = 1;
- else if (itip_organizer_is_user (comp, comp_data->client))
- retval = 3;
- else {
- GSList *attendees = NULL, *sl;
-
- e_cal_component_get_attendee_list (comp, &attendees);
- for (sl = attendees; sl != NULL; sl = sl->next) {
- ECalComponentAttendee *ca = sl->data;
- const char *text;
-
- text = itip_strip_mailto (ca->value);
- if (e_account_list_find (priv->accounts, E_ACCOUNT_FIND_ID_ADDRESS, text) != NULL) {
- if (ca->delto != NULL)
- retval = 3;
- else
- retval = 2;
- break;
- }
- }
-
- e_cal_component_free_attendee_list (attendees);
- }
- } else
- icalcomponent_free (icalcomp);
-
- g_object_unref (comp);
-
- return GINT_TO_POINTER (retval);
- }
- case E_CAL_MODEL_FIELD_SUMMARY :
- return get_summary (comp_data);
- case E_CAL_MODEL_FIELD_UID :
- return get_uid (comp_data);
- }
-
- return "";
-}
-
-static void
-set_categories (ECalModelComponent *comp_data, const char *value)
-{
- icalproperty *prop;
-
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_CATEGORIES_PROPERTY);
- if (!value || !(*value)) {
- if (prop) {
- icalcomponent_remove_property (comp_data->icalcomp, prop);
- icalproperty_free (prop);
- }
- } else {
- if (!prop) {
- prop = icalproperty_new_categories (value);
- icalcomponent_add_property (comp_data->icalcomp, prop);
- } else
- icalproperty_set_categories (prop, value);
- }
-}
-
-static void
-set_classification (ECalModelComponent *comp_data, const char *value)
-{
- icalproperty *prop;
-
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_CLASS_PROPERTY);
- if (!value || !(*value)) {
- if (prop) {
- icalcomponent_remove_property (comp_data->icalcomp, prop);
- icalproperty_free (prop);
- }
- } else {
- icalproperty_class ical_class;
-
- if (!strcasecmp (value, "PUBLIC"))
- ical_class = ICAL_CLASS_PUBLIC;
- else if (!strcasecmp (value, "PRIVATE"))
- ical_class = ICAL_CLASS_PRIVATE;
- else if (!strcasecmp (value, "CONFIDENTIAL"))
- ical_class = ICAL_CLASS_CONFIDENTIAL;
- else
- ical_class = ICAL_CLASS_NONE;
-
- if (!prop) {
- prop = icalproperty_new_class (ical_class);
- icalcomponent_add_property (comp_data->icalcomp, prop);
- } else
- icalproperty_set_class (prop, ical_class);
- }
-}
-
-static void
-set_description (ECalModelComponent *comp_data, const char *value)
-{
- icalproperty *prop;
-
- /* remove old description(s) */
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_DESCRIPTION_PROPERTY);
- while (prop) {
- icalproperty *next;
-
- next = icalcomponent_get_next_property (comp_data->icalcomp, ICAL_DESCRIPTION_PROPERTY);
-
- icalcomponent_remove_property (comp_data->icalcomp, prop);
- icalproperty_free (prop);
-
- prop = next;
- }
-
- /* now add the new description */
- if (!value || !(*value))
- return;
-
- prop = icalproperty_new_description (value);
- icalcomponent_add_property (comp_data->icalcomp, prop);
-}
-
-static void
-set_dtstart (ECalModel *model, ECalModelComponent *comp_data, const void *value)
-{
- icalproperty *prop;
- ECellDateEditValue *dv = (ECellDateEditValue *) value;
-
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_DTSTART_PROPERTY);
- if (!dv) {
- if (prop) {
- icalcomponent_remove_property (comp_data->icalcomp, prop);
- icalproperty_free (prop);
- }
- } else
- icalcomponent_set_dtstart (comp_data->icalcomp, dv->tt);
-}
-
-static void
-set_summary (ECalModelComponent *comp_data, const char *value)
-{
- icalproperty *prop;
-
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_SUMMARY_PROPERTY);
-
- if (string_is_empty (value)) {
- if (prop) {
- icalcomponent_remove_property (comp_data->icalcomp, prop);
- icalproperty_free (prop);
- }
- } else {
- if (prop)
- icalproperty_set_summary (prop, value);
- else {
- prop = icalproperty_new_summary (value);
- icalcomponent_add_property (comp_data->icalcomp, prop);
- }
- }
-}
-
-static void
-ecm_set_value_at (ETableModel *etm, int col, int row, const void *value)
-{
- ECalModelPrivate *priv;
- ECalModelComponent *comp_data;
- ECalModel *model = (ECalModel *) etm;
-
- g_return_if_fail (E_IS_CAL_MODEL (model));
-
- priv = model->priv;
-
- g_return_if_fail (col >= 0 && col < E_CAL_MODEL_FIELD_LAST);
- g_return_if_fail (row >= 0 && row < priv->objects->len);
-
- comp_data = g_ptr_array_index (priv->objects, row);
- g_assert (comp_data != NULL);
-
- switch (col) {
- case E_CAL_MODEL_FIELD_CATEGORIES :
- set_categories (comp_data, value);
- break;
- case E_CAL_MODEL_FIELD_CLASSIFICATION :
- set_classification (comp_data, value);
- break;
- case E_CAL_MODEL_FIELD_DESCRIPTION :
- set_description (comp_data, value);
- break;
- case E_CAL_MODEL_FIELD_DTSTART :
- set_dtstart (model, comp_data, value);
- break;
- case E_CAL_MODEL_FIELD_SUMMARY :
- set_summary (comp_data, value);
- break;
- }
-
- /* FIXME ask about mod type */
- if (!e_cal_modify_object (comp_data->client, comp_data->icalcomp, CALOBJ_MOD_ALL, NULL)) {
- g_warning (G_STRLOC ": Could not modify the object!");
-
- /* FIXME Show error dialog */
- }
-}
-
-static gboolean
-ecm_is_cell_editable (ETableModel *etm, int col, int row)
-{
- ECalModelPrivate *priv;
- ECalModel *model = (ECalModel *) etm;
-
- g_return_val_if_fail (E_IS_CAL_MODEL (model), FALSE);
-
- priv = model->priv;
-
- g_return_val_if_fail (col >= 0 && col <= E_CAL_MODEL_FIELD_LAST, 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 E_CAL_MODEL_FIELD_CATEGORIES :
- case E_CAL_MODEL_FIELD_CLASSIFICATION :
- case E_CAL_MODEL_FIELD_DESCRIPTION :
- case E_CAL_MODEL_FIELD_DTSTART :
- case E_CAL_MODEL_FIELD_SUMMARY :
- return TRUE;
- }
-
- return FALSE;
-}
-
-static void
-ecm_append_row (ETableModel *etm, ETableModel *source, int row)
-{
- ECalModelClass *model_class;
- ECalModelComponent comp_data;
- ECalModel *model = (ECalModel *) etm;
-
- g_return_if_fail (E_IS_CAL_MODEL (model));
- g_return_if_fail (E_IS_TABLE_MODEL (source));
-
- memset (&comp_data, 0, sizeof (comp_data));
- comp_data.client = e_cal_model_get_default_client (model);
-
- /* guard against saving before the calendar is open */
- if (!(comp_data.client && e_cal_get_load_state (comp_data.client) == E_CAL_LOAD_LOADED))
- return;
-
- comp_data.icalcomp = e_cal_model_create_component_with_defaults (model);
-
- /* set values for our fields */
- set_categories (&comp_data, e_table_model_value_at (source, E_CAL_MODEL_FIELD_CATEGORIES, row));
- set_classification (&comp_data, e_table_model_value_at (source, E_CAL_MODEL_FIELD_CLASSIFICATION, row));
- set_description (&comp_data, e_table_model_value_at (source, E_CAL_MODEL_FIELD_DESCRIPTION, row));
- set_dtstart (model, &comp_data, e_table_model_value_at (source, E_CAL_MODEL_FIELD_DTSTART, row));
- set_summary (&comp_data, e_table_model_value_at (source, E_CAL_MODEL_FIELD_SUMMARY, row));
-
- /* call the class' method for filling the component */
- model_class = (ECalModelClass *) G_OBJECT_GET_CLASS (model);
- if (model_class->fill_component_from_model != NULL) {
- model_class->fill_component_from_model (model, &comp_data, source, row);
- }
-
-
- if (!e_cal_create_object (comp_data.client, comp_data.icalcomp, NULL, NULL)) {
- g_warning (G_STRLOC ": Could not create the object!");
-
- /* FIXME: show error dialog */
- }
-
- icalcomponent_free (comp_data.icalcomp);
-}
-
-static void *
-ecm_duplicate_value (ETableModel *etm, int col, const void *value)
-{
- g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_FIELD_LAST, NULL);
-
- switch (col) {
- case E_CAL_MODEL_FIELD_CATEGORIES :
- case E_CAL_MODEL_FIELD_CLASSIFICATION :
- case E_CAL_MODEL_FIELD_SUMMARY :
- return g_strdup (value);
- case E_CAL_MODEL_FIELD_HAS_ALARMS :
- case E_CAL_MODEL_FIELD_ICON :
- case E_CAL_MODEL_FIELD_COLOR :
- return (void *) value;
- case E_CAL_MODEL_FIELD_COMPONENT :
- return icalcomponent_new_clone ((icalcomponent *) value);
- case E_CAL_MODEL_FIELD_DTSTART :
- if (value) {
- ECellDateEditValue *dv, *orig_dv;
-
- orig_dv = (ECellDateEditValue *) value;
- dv = g_new0 (ECellDateEditValue, 1);
- *dv = *orig_dv;
-
- return dv;
- }
- break;
- }
-
- return NULL;
-}
-
-static void
-ecm_free_value (ETableModel *etm, int col, void *value)
-{
- g_return_if_fail (col >= 0 && col < E_CAL_MODEL_FIELD_LAST);
-
- switch (col) {
- case E_CAL_MODEL_FIELD_CATEGORIES :
- case E_CAL_MODEL_FIELD_DESCRIPTION :
- case E_CAL_MODEL_FIELD_SUMMARY :
- if (value)
- g_free (value);
- break;
- case E_CAL_MODEL_FIELD_CLASSIFICATION :
- case E_CAL_MODEL_FIELD_HAS_ALARMS :
- case E_CAL_MODEL_FIELD_ICON :
- case E_CAL_MODEL_FIELD_COLOR :
- break;
- case E_CAL_MODEL_FIELD_DTSTART :
- if (value)
- g_free (value);
- break;
- case E_CAL_MODEL_FIELD_COMPONENT :
- if (value)
- icalcomponent_free ((icalcomponent *) value);
- break;
- }
-}
-
-static void *
-ecm_initialize_value (ETableModel *etm, int col)
-{
- ECalModelPrivate *priv;
- ECalModel *model = (ECalModel *) etm;
-
- g_return_val_if_fail (E_IS_CAL_MODEL (model), NULL);
- g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_FIELD_LAST, NULL);
-
- priv = model->priv;
-
- switch (col) {
- case E_CAL_MODEL_FIELD_CATEGORIES :
- return g_strdup (priv->default_category);
- case E_CAL_MODEL_FIELD_CLASSIFICATION :
- case E_CAL_MODEL_FIELD_DESCRIPTION :
- case E_CAL_MODEL_FIELD_SUMMARY :
- return g_strdup ("");
- case E_CAL_MODEL_FIELD_DTSTART :
- case E_CAL_MODEL_FIELD_HAS_ALARMS :
- case E_CAL_MODEL_FIELD_ICON :
- case E_CAL_MODEL_FIELD_COLOR :
- case E_CAL_MODEL_FIELD_COMPONENT :
- return NULL;
- }
-
- return NULL;
-}
-
-static gboolean
-ecm_value_is_empty (ETableModel *etm, int col, const void *value)
-{
- ECalModelPrivate *priv;
- ECalModel *model = (ECalModel *) etm;
-
- g_return_val_if_fail (E_IS_CAL_MODEL (model), TRUE);
- g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_FIELD_LAST, TRUE);
-
- priv = model->priv;
-
- switch (col) {
- case E_CAL_MODEL_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
- * ecm_initialize_value().
- */
- if (priv->default_category && value && strcmp (priv->default_category, value) == 0)
- return TRUE;
- else
- return string_is_empty (value);
- case E_CAL_MODEL_FIELD_CLASSIFICATION :
- case E_CAL_MODEL_FIELD_DESCRIPTION :
- case E_CAL_MODEL_FIELD_SUMMARY :
- return string_is_empty (value);
- case E_CAL_MODEL_FIELD_DTSTART :
- return value ? FALSE : TRUE;
- case E_CAL_MODEL_FIELD_HAS_ALARMS :
- case E_CAL_MODEL_FIELD_ICON :
- case E_CAL_MODEL_FIELD_COLOR :
- case E_CAL_MODEL_FIELD_COMPONENT :
- return TRUE;
- }
-
- return TRUE;
-}
-
-static char *
-ecm_value_to_string (ETableModel *etm, int col, const void *value)
-{
- g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_FIELD_LAST, NULL);
-
- switch (col) {
- case E_CAL_MODEL_FIELD_CATEGORIES :
- case E_CAL_MODEL_FIELD_CLASSIFICATION :
- case E_CAL_MODEL_FIELD_DESCRIPTION :
- case E_CAL_MODEL_FIELD_SUMMARY :
- return g_strdup (value);
- case E_CAL_MODEL_FIELD_DTSTART :
- return e_cal_model_date_value_to_string (E_CAL_MODEL (etm), value);
- case E_CAL_MODEL_FIELD_ICON :
- if (GPOINTER_TO_INT (value) == 0)
- return _("Normal");
- else if (GPOINTER_TO_INT (value) == 1)
- return _("Recurring");
- else
- return _("Assigned");
- case E_CAL_MODEL_FIELD_HAS_ALARMS :
- return value ? _("Yes") : _("No");
- case E_CAL_MODEL_FIELD_COLOR :
- case E_CAL_MODEL_FIELD_COMPONENT :
- return NULL;
- }
-
- return NULL;
-}
-
-/* ECalModel class methods */
-
-typedef struct {
- const gchar *color;
- GList *uris;
-} AssignedColorData;
-
-static const char *
-ecm_get_color_for_component (ECalModel *model, ECalModelComponent *comp_data)
-{
- ECalModelPrivate *priv;
- gint i, first_empty = 0;
- static AssignedColorData assigned_colors[] = {
- { "#BECEDD", NULL }, /* 190 206 221 Blue */
- { "#E2F0EF", NULL }, /* 226 240 239 Light Blue */
- { "#C6E2B7", NULL }, /* 198 226 183 Green */
- { "#E2F0D3", NULL }, /* 226 240 211 Light Green */
- { "#E2D4B7", NULL }, /* 226 212 183 Khaki */
- { "#EAEAC1", NULL }, /* 234 234 193 Light Khaki */
- { "#F0B8B7", NULL }, /* 240 184 183 Pink */
- { "#FED4D3", NULL }, /* 254 212 211 Light Pink */
- { "#E2C6E1", NULL }, /* 226 198 225 Purple */
- { "#F0E2EF", NULL } /* 240 226 239 Light Purple */
- };
-
- g_return_val_if_fail (E_IS_CAL_MODEL (model), NULL);
-
- priv = model->priv;
-
- for (i = 0; i < G_N_ELEMENTS (assigned_colors); i++) {
- GList *l;
-
- if (assigned_colors[i].uris == NULL) {
- first_empty = i;
- continue;
- }
-
- for (l = assigned_colors[i].uris; l != NULL; l = l->next) {
- if (!strcmp ((const char *) l->data,
- e_cal_get_uri (comp_data->client)))
- {
- return assigned_colors[i].color;
- }
- }
- }
-
- /* return the first unused color */
- assigned_colors[first_empty].uris = g_list_append (assigned_colors[first_empty].uris,
- g_strdup (e_cal_get_uri (comp_data->client)));
-
- return assigned_colors[first_empty].color;
-}
-
-/**
- * e_cal_model_get_component_kind
- */
-icalcomponent_kind
-e_cal_model_get_component_kind (ECalModel *model)
-{
- ECalModelPrivate *priv;
-
- g_return_val_if_fail (E_IS_CAL_MODEL (model), ICAL_NO_COMPONENT);
-
- priv = model->priv;
- return priv->kind;
-}
-
-/**
- * e_cal_model_set_component_kind
- */
-void
-e_cal_model_set_component_kind (ECalModel *model, icalcomponent_kind kind)
-{
- ECalModelPrivate *priv;
-
- g_return_if_fail (E_IS_CAL_MODEL (model));
-
- priv = model->priv;
- priv->kind = kind;
-}
-
-/**
- * e_cal_model_get_timezone
- */
-icaltimezone *
-e_cal_model_get_timezone (ECalModel *model)
-{
- g_return_val_if_fail (E_IS_CAL_MODEL (model), NULL);
- return model->priv->zone;
-}
-
-/**
- * e_cal_model_set_timezone
- */
-void
-e_cal_model_set_timezone (ECalModel *model, icaltimezone *zone)
-{
- ECalModelPrivate *priv;
-
- g_return_if_fail (E_IS_CAL_MODEL (model));
-
- priv = model->priv;
- if (priv->zone != zone) {
- e_table_model_pre_change (E_TABLE_MODEL (model));
- priv->zone = zone;
-
- /* the timezone affects the times shown for date fields,
- so we need to redisplay everything */
- e_table_model_changed (E_TABLE_MODEL (model));
- }
-}
-
-/**
- * e_cal_model_set_default_category
- */
-void
-e_cal_model_set_default_category (ECalModel *model, const gchar *default_cat)
-{
- g_return_if_fail (E_IS_CAL_MODEL (model));
-
- if (model->priv->default_category)
- g_free (model->priv->default_category);
-
- model->priv->default_category = g_strdup (default_cat);
-}
-
-/**
- * e_cal_model_get_use_24_hour_format
- */
-gboolean
-e_cal_model_get_use_24_hour_format (ECalModel *model)
-{
- g_return_val_if_fail (E_IS_CAL_MODEL (model), FALSE);
-
- return model->priv->use_24_hour_format;
-}
-
-/**
- * e_cal_model_set_use_24_hour_format
- */
-void
-e_cal_model_set_use_24_hour_format (ECalModel *model, gboolean use24)
-{
- g_return_if_fail (E_IS_CAL_MODEL (model));
-
- if (model->priv->use_24_hour_format != use24) {
- e_table_model_pre_change (E_TABLE_MODEL (model));
- model->priv->use_24_hour_format = use24;
- /* Get the views to redraw themselves. */
- e_table_model_changed (E_TABLE_MODEL (model));
- }
-}
-
-/**
- * e_cal_model_get_default_client
- */
-ECal *
-e_cal_model_get_default_client (ECalModel *model)
-{
- ECalModelPrivate *priv;
- ECalModelClient *client_data;
-
- g_return_val_if_fail (model != NULL, NULL);
- g_return_val_if_fail (E_IS_CAL_MODEL (model), NULL);
-
- priv = model->priv;
-
- /* we always return a valid ECal, since we rely on it in many places */
- if (priv->default_client)
- return priv->default_client;
-
- if (!priv->clients)
- return NULL;
-
- client_data = (ECalModelClient *) priv->clients->data;
-
- return client_data ? client_data->client : NULL;
-}
-
-void
-e_cal_model_set_default_client (ECalModel *model, ECal *client)
-{
- ECalModelPrivate *priv;
- GList *l;
- gboolean found = FALSE;
-
- g_return_if_fail (model != NULL);
- g_return_if_fail (E_IS_CAL_MODEL (model));
- g_return_if_fail (client != NULL);
- g_return_if_fail (E_IS_CAL (client));
-
- priv = model->priv;
-
- /* See if we already know about the client */
- for (l = priv->clients; l != NULL; l = l->next) {
- ECalModelClient *client_data = l->data;
-
- if (client == client_data->client)
- found = TRUE;
- }
-
- /* If its not found, add it */
- if (!found)
- e_cal_model_add_client (model, client);
-
- /* Store the default client */
- priv->default_client = client;
-}
-
-/**
- * e_cal_model_get_client_list
- */
-GList *
-e_cal_model_get_client_list (ECalModel *model)
-{
- GList *list = NULL, *l;
-
- g_return_val_if_fail (E_IS_CAL_MODEL (model), NULL);
-
- for (l = model->priv->clients; l != NULL; l = l->next) {
- ECalModelClient *client_data = (ECalModelClient *) l->data;
-
- list = g_list_append (list, client_data->client);
- }
-
- return list;
-}
-
-/**
- * e_cal_model_get_client_for_uri
- * @model: A calendar model.
- * @uri: Uri for the client to get.
- */
-ECal *
-e_cal_model_get_client_for_uri (ECalModel *model, const char *uri)
-{
- GList *l;
-
- g_return_val_if_fail (E_IS_CAL_MODEL (model), NULL);
- g_return_val_if_fail (uri != NULL, NULL);
-
- for (l = model->priv->clients; l != NULL; l = l->next) {
- ECalModelClient *client_data = (ECalModelClient *) l->data;
-
- if (!strcmp (uri, e_cal_get_uri (client_data->client)))
- return client_data->client;
- }
-
- return NULL;
-}
-
-static ECalModelComponent *
-search_by_uid_and_client (ECalModelPrivate *priv, ECal *client, const char *uid)
-{
- gint i;
-
- for (i = 0; i < priv->objects->len; i++) {
- ECalModelComponent *comp_data = g_ptr_array_index (priv->objects, i);
-
- if (comp_data) {
- const char *tmp_uid;
-
- tmp_uid = icalcomponent_get_uid (comp_data->icalcomp);
- if (tmp_uid && *tmp_uid) {
- if (comp_data->client == client && !strcmp (uid, tmp_uid))
- return comp_data;
- }
- }
- }
-
- return NULL;
-}
-
-static gint
-get_position_in_array (GPtrArray *objects, gpointer item)
-{
- gint i;
-
- for (i = 0; i < objects->len; i++) {
- if (g_ptr_array_index (objects, i) == item)
- return i;
- }
-
- return -1;
-}
-
-static void
-e_cal_view_objects_added_cb (ECalView *query, GList *objects, gpointer user_data)
-{
- ECalModel *model = (ECalModel *) user_data;
- ECalModelPrivate *priv;
- GList *l;
-
- priv = model->priv;
-
- for (l = objects; l; l = l->next) {
- ECalModelComponent *comp_data;
-
- e_table_model_pre_change (E_TABLE_MODEL (model));
-
- comp_data = g_new0 (ECalModelComponent, 1);
- comp_data->client = e_cal_view_get_client (query);
- comp_data->icalcomp = icalcomponent_new_clone (l->data);
-
- g_ptr_array_add (priv->objects, comp_data);
-
- e_table_model_row_inserted (E_TABLE_MODEL (model), priv->objects->len - 1);
- }
-}
-
-static void
-e_cal_view_objects_modified_cb (ECalView *query, GList *objects, gpointer user_data)
-{
- ECalModelPrivate *priv;
- ECalModel *model = (ECalModel *) user_data;
- GList *l;
-
- priv = model->priv;
-
- for (l = objects; l; l = l->next) {
- ECalModelComponent *comp_data;
-
- e_table_model_pre_change (E_TABLE_MODEL (model));
-
- comp_data = search_by_uid_and_client (priv, e_cal_view_get_client (query), icalcomponent_get_uid (l->data));
- g_assert (comp_data);
-
- if (comp_data->icalcomp)
- icalcomponent_free (comp_data->icalcomp);
- if (comp_data->dtstart) {
- g_free (comp_data->dtstart);
- comp_data->dtstart = NULL;
- }
- if (comp_data->dtend) {
- g_free (comp_data->dtend);
- comp_data->dtend = NULL;
- }
- if (comp_data->due) {
- g_free (comp_data->due);
- comp_data->due = NULL;
- }
- if (comp_data->completed) {
- g_free (comp_data->completed);
- comp_data->completed = NULL;
- }
-
- comp_data->icalcomp = icalcomponent_new_clone (l->data);
-
- e_table_model_row_changed (E_TABLE_MODEL (model), get_position_in_array (priv->objects, comp_data));
- }
-}
-
-static void
-e_cal_view_objects_removed_cb (ECalView *query, GList *uids, gpointer user_data)
-{
- ECalModelPrivate *priv;
- ECalModel *model = (ECalModel *) user_data;
- GList *l;
-
- priv = model->priv;
-
- for (l = uids; l; l = l->next) {
- ECalModelComponent *comp_data;
- int pos;
-
- e_table_model_pre_change (E_TABLE_MODEL (model));
-
- comp_data = search_by_uid_and_client (priv, e_cal_view_get_client (query), l->data);
- g_assert (comp_data);
-
- pos = get_position_in_array (priv->objects, comp_data);
-
- g_ptr_array_remove (priv->objects, comp_data);
- free_comp_data (comp_data);
-
- e_table_model_row_deleted (E_TABLE_MODEL (model), pos);
- }
-}
-
-static void
-e_cal_view_progress_cb (ECalView *query, const char *message, int percent, gpointer user_data)
-{
- ECalModel *model = (ECalModel *) user_data;
-
- g_return_if_fail (E_IS_CAL_MODEL (model));
-
- /* FIXME Update status bar */
-}
-
-static void
-e_cal_view_done_cb (ECalView *query, ECalendarStatus status, gpointer user_data)
-{
- ECalModel *model = (ECalModel *) user_data;
-
- g_return_if_fail (E_IS_CAL_MODEL (model));
-
- /* FIXME Clear status bar */
-}
-
-static void
-update_e_cal_view_for_client (ECalModel *model, ECalModelClient *client_data)
-{
- ECalModelPrivate *priv;
-
- priv = model->priv;
-
- /* free the previous query, if any */
- if (client_data->query) {
- g_signal_handlers_disconnect_matched (client_data->query, G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL, model);
- g_object_unref (client_data->query);
- client_data->query = NULL;
- }
-
- /* prepare the query */
- g_assert (priv->sexp != NULL);
-
- if (!e_cal_get_query (client_data->client, priv->sexp, &client_data->query, NULL)) {
- g_warning (G_STRLOC ": Unable to get query");
-
- return;
- }
-
- g_signal_connect (client_data->query, "objects_added", G_CALLBACK (e_cal_view_objects_added_cb), model);
- g_signal_connect (client_data->query, "objects_modified", G_CALLBACK (e_cal_view_objects_modified_cb), model);
- g_signal_connect (client_data->query, "objects_removed", G_CALLBACK (e_cal_view_objects_removed_cb), model);
- g_signal_connect (client_data->query, "view_progress", G_CALLBACK (e_cal_view_progress_cb), model);
- g_signal_connect (client_data->query, "view_done", G_CALLBACK (e_cal_view_done_cb), model);
-
- e_cal_view_start (client_data->query);
-}
-
-static void
-backend_died_cb (ECal *client, gpointer user_data)
-{
- ECalModel *model;
-
- model = E_CAL_MODEL (user_data);
-
- e_cal_model_remove_client (model, client);
-}
-
-static void
-add_new_client (ECalModel *model, ECal *client)
-{
- ECalModelPrivate *priv;
- ECalModelClient *client_data;
-
- priv = model->priv;
-
- client_data = g_new0 (ECalModelClient, 1);
- client_data->client = client;
- client_data->query = NULL;
- g_object_ref (client_data->client);
-
- priv->clients = g_list_append (priv->clients, client_data);
-
- g_signal_connect (G_OBJECT (client_data->client), "backend_died",
- G_CALLBACK (backend_died_cb), model);
-
- update_e_cal_view_for_client (model, client_data);
-}
-
-static void
-cal_opened_cb (ECal *client, ECalendarStatus status, gpointer user_data)
-{
- ECalModel *model = (ECalModel *) user_data;
-
- if (status != E_CALENDAR_STATUS_OK)
- return;
-
- add_new_client (model, client);
-}
-
-/**
- * e_cal_model_add_client
- */
-void
-e_cal_model_add_client (ECalModel *model, ECal *client)
-{
- ECalModelPrivate *priv;
-
- g_return_if_fail (E_IS_CAL_MODEL (model));
- g_return_if_fail (E_IS_CAL (client));
-
- priv = model->priv;
-
- if (e_cal_get_load_state (client) == E_CAL_LOAD_LOADED)
- add_new_client (model, client);
- else
- g_signal_connect (client, "cal_opened", G_CALLBACK (cal_opened_cb), model);
-}
-
-static void
-remove_client (ECalModel *model, ECalModelClient *client_data)
-{
- gint i;
-
- g_signal_handlers_disconnect_matched (client_data->client, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, model);
- g_signal_handlers_disconnect_matched (client_data->query, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, model);
-
- model->priv->clients = g_list_remove (model->priv->clients, client_data);
-
- /* remove all objects belonging to this client */
- e_table_model_pre_change (E_TABLE_MODEL (model));
- for (i = model->priv->objects->len; i > 0; i--) {
- ECalModelComponent *comp_data = (ECalModelComponent *) g_ptr_array_index (model->priv->objects, i - 1);
-
- g_assert (comp_data != NULL);
-
- if (comp_data->client == client_data->client) {
- g_ptr_array_remove (model->priv->objects, comp_data);
- free_comp_data (comp_data);
- }
- }
- e_table_model_changed (E_TABLE_MODEL (model));
-
- /* free all remaining memory */
- g_object_unref (client_data->client);
- g_object_unref (client_data->query);
- g_free (client_data);
-
-}
-
-/**
- * e_cal_model_remove_client
- */
-void
-e_cal_model_remove_client (ECalModel *model, ECal *client)
-{
- GList *l;
- ECalModelPrivate *priv;
-
- g_return_if_fail (E_IS_CAL_MODEL (model));
- g_return_if_fail (E_IS_CAL (client));
-
- priv = model->priv;
- for (l = priv->clients; l != NULL; l = l->next) {
- ECalModelClient *client_data = (ECalModelClient *) l->data;
-
- if (client_data->client == client) {
- remove_client (model, client_data);
- break;
- }
- }
-}
-
-/**
- * e_cal_model_remove_all_clients
- */
-void
-e_cal_model_remove_all_clients (ECalModel *model)
-{
- ECalModelPrivate *priv;
-
- g_return_if_fail (E_IS_CAL_MODEL (model));
-
- priv = model->priv;
- while (priv->clients != NULL) {
- ECalModelClient *client_data = (ECalModelClient *) priv->clients->data;
- remove_client (model, client_data);
- }
-}
-
-/**
- * e_cal_model_set_query
- */
-void
-e_cal_model_set_query (ECalModel *model, const char *sexp)
-{
- ECalModelPrivate *priv;
- GList *l;
-
- g_return_if_fail (E_IS_CAL_MODEL (model));
- g_return_if_fail (sexp != NULL);
-
- priv = model->priv;
-
- if (priv->sexp)
- g_free (priv->sexp);
-
- priv->sexp = g_strdup (sexp);
-
- /* clean up the current contents */
- e_table_model_pre_change (E_TABLE_MODEL (model));
- clear_objects_array (priv);
- e_table_model_changed (E_TABLE_MODEL (model));
-
- /* update the query for all clients */
- for (l = priv->clients; l != NULL; l = l->next) {
- ECalModelClient *client_data;
-
- client_data = (ECalModelClient *) l->data;
- update_e_cal_view_for_client (model, client_data);
- }
-}
-
-/**
- * e_cal_model_create_component_with_defaults
- */
-icalcomponent *
-e_cal_model_create_component_with_defaults (ECalModel *model)
-{
- ECalModelPrivate *priv;
- ECalComponent *comp;
- icalcomponent *icalcomp;
- ECal *client;
-
- g_return_val_if_fail (E_IS_CAL_MODEL (model), NULL);
-
- priv = model->priv;
-
- g_return_val_if_fail (priv->clients != NULL, NULL);
-
- client = e_cal_model_get_default_client (model);
- if (!client)
- return icalcomponent_new (priv->kind);
-
- switch (priv->kind) {
- case ICAL_VEVENT_COMPONENT :
- comp = cal_comp_event_new_with_defaults (client);
- break;
- case ICAL_VTODO_COMPONENT :
- comp = cal_comp_task_new_with_defaults (client);
- break;
- default:
- return NULL;
- }
-
- if (!comp)
- return icalcomponent_new (priv->kind);
-
- icalcomp = icalcomponent_new_clone (e_cal_component_get_icalcomponent (comp));
- g_object_unref (comp);
-
- /* make sure the component has an UID */
- if (!icalcomponent_get_uid (icalcomp)) {
- char *uid;
-
- uid = e_cal_component_gen_uid ();
- icalcomponent_set_uid (icalcomp, uid);
-
- g_free (uid);
- }
-
- return icalcomp;
-}
-
-/**
- * e_cal_model_get_color_for_component
- */
-const gchar *
-e_cal_model_get_color_for_component (ECalModel *model, ECalModelComponent *comp_data)
-{
- ECalModelClass *model_class;
- const gchar *color = NULL;
-
- g_return_val_if_fail (E_IS_CAL_MODEL (model), NULL);
- g_return_val_if_fail (comp_data != NULL, NULL);
-
- model_class = (ECalModelClass *) G_OBJECT_GET_CLASS (model);
- if (model_class->get_color_for_component != NULL)
- color = model_class->get_color_for_component (model, comp_data);
-
- if (!color)
- color = ecm_get_color_for_component (model, comp_data);
-
- return color;
-}
-
-/**
- * e_cal_model_get_component_at
- */
-ECalModelComponent *
-e_cal_model_get_component_at (ECalModel *model, gint row)
-{
- ECalModelPrivate *priv;
-
- g_return_val_if_fail (E_IS_CAL_MODEL (model), NULL);
-
- priv = model->priv;
-
- g_return_val_if_fail (row >= 0 && row < priv->objects->len, NULL);
-
- return g_ptr_array_index (priv->objects, row);
-}
-
-/**
- * e_cal_model_date_value_to_string
- */
-gchar*
-e_cal_model_date_value_to_string (ECalModel *model, const void *value)
-{
- ECalModelPrivate *priv;
- ECellDateEditValue *dv = (ECellDateEditValue *) value;
- struct icaltimetype tt;
- struct tm tmp_tm;
- char buffer[64];
-
- g_return_val_if_fail (E_IS_CAL_MODEL (model), NULL);
-
- priv = model->priv;
-
- if (!dv)
- return g_strdup ("");
-
- /* We currently convert all the dates to the current timezone. */
- tt = dv->tt;
- icaltimezone_convert_time (&tt, dv->zone, 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);
-
- memset (buffer, 0, sizeof (buffer));
- e_time_format_date_and_time (&tmp_tm, priv->use_24_hour_format,
- TRUE, FALSE,
- buffer, sizeof (buffer));
- return g_strdup (buffer);
-}
-
-/**
- * e_cal_model_free_component_data
- */
-void
-e_cal_model_free_component_data (ECalModelComponent *comp_data)
-{
- g_return_if_fail (comp_data != NULL);
-
- if (comp_data->icalcomp)
- icalcomponent_free (comp_data->icalcomp);
- if (comp_data->dtstart)
- g_free (comp_data->dtstart);
- if (comp_data->dtend)
- g_free (comp_data->dtend);
- if (comp_data->due)
- g_free (comp_data->due);
- if (comp_data->completed)
- g_free (comp_data->completed);
-
- g_free (comp_data);
-}
diff --git a/calendar/gui/e-cal-model.h b/calendar/gui/e-cal-model.h
deleted file mode 100644
index 9f193b4f07..0000000000
--- a/calendar/gui/e-cal-model.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/* Evolution calendar - Data model for ETable
- *
- * Copyright (C) 2000 Ximian, Inc.
- * Copyright (C) 2000 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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_CAL_MODEL_H
-#define E_CAL_MODEL_H
-
-#include <gal/e-table/e-table-model.h>
-#include <libecal/e-cal.h>
-#include "e-cell-date-edit-text.h"
-
-G_BEGIN_DECLS
-
-#define E_TYPE_CAL_MODEL (e_cal_model_get_type ())
-#define E_CAL_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_CAL_MODEL, ECalModel))
-#define E_CAL_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_CAL_MODEL, ECalModelClass))
-#define E_IS_CAL_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_CAL_MODEL))
-#define E_IS_CAL_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_CAL_MODEL))
-
-typedef struct _ECalModelPrivate ECalModelPrivate;
-
-typedef enum {
- /* If you add new items here or reorder them, you have to update the
- .etspec files for the tables using this model */
- E_CAL_MODEL_FIELD_CATEGORIES,
- E_CAL_MODEL_FIELD_CLASSIFICATION,
- E_CAL_MODEL_FIELD_COLOR, /* not a real field */
- E_CAL_MODEL_FIELD_COMPONENT, /* not a real field */
- E_CAL_MODEL_FIELD_DESCRIPTION,
- E_CAL_MODEL_FIELD_DTSTART,
- E_CAL_MODEL_FIELD_HAS_ALARMS, /* not a real field */
- E_CAL_MODEL_FIELD_ICON, /* not a real field */
- E_CAL_MODEL_FIELD_SUMMARY,
- E_CAL_MODEL_FIELD_UID,
- E_CAL_MODEL_FIELD_LAST
-} ECalModelField;
-
-typedef struct {
- ECal *client;
- icalcomponent *icalcomp;
-
- /* private data */
- ECellDateEditValue *dtstart;
- ECellDateEditValue *dtend;
- ECellDateEditValue *due;
- ECellDateEditValue *completed;
-} ECalModelComponent;
-
-typedef struct {
- ETableModel model;
- ECalModelPrivate *priv;
-} ECalModel;
-
-typedef struct {
- ETableModelClass parent_class;
-
- /* virtual methods */
- const gchar * (* get_color_for_component) (ECalModel *model, ECalModelComponent *comp_data);
- void (* fill_component_from_model) (ECalModel *model, ECalModelComponent *comp_data,
- ETableModel *source_model, gint row);
-} ECalModelClass;
-
-GType e_cal_model_get_type (void);
-
-icalcomponent_kind e_cal_model_get_component_kind (ECalModel *model);
-void e_cal_model_set_component_kind (ECalModel *model, icalcomponent_kind kind);
-icaltimezone *e_cal_model_get_timezone (ECalModel *model);
-void e_cal_model_set_timezone (ECalModel *model, icaltimezone *zone);
-
-void e_cal_model_set_default_category (ECalModel *model, const gchar *default_cat);
-gboolean e_cal_model_get_use_24_hour_format (ECalModel *model);
-void e_cal_model_set_use_24_hour_format (ECalModel *model, gboolean use24);
-
-ECal *e_cal_model_get_default_client (ECalModel *model);
-void e_cal_model_set_default_client (ECalModel *model, ECal *client);
-GList *e_cal_model_get_client_list (ECalModel *model);
-ECal *e_cal_model_get_client_for_uri (ECalModel *model, const char *uri);
-void e_cal_model_add_client (ECalModel *model, ECal *client);
-void e_cal_model_remove_client (ECalModel *model, ECal *client);
-void e_cal_model_remove_all_clients (ECalModel *model);
-
-void e_cal_model_set_query (ECalModel *model, const gchar *sexp);
-
-icalcomponent *e_cal_model_create_component_with_defaults (ECalModel *model);
-const gchar *e_cal_model_get_color_for_component (ECalModel *model, ECalModelComponent *comp_data);
-ECalModelComponent *e_cal_model_get_component_at (ECalModel *model, gint row);
-
-gchar *e_cal_model_date_value_to_string (ECalModel *model, const void *value);
-
-void e_cal_model_free_component_data (ECalModelComponent *comp_data);
-
-G_END_DECLS
-
-#endif
diff --git a/calendar/gui/e-cal-view.c b/calendar/gui/e-cal-view.c
deleted file mode 100644
index f93cee6c10..0000000000
--- a/calendar/gui/e-cal-view.c
+++ /dev/null
@@ -1,1492 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Rodrigo Moya <rodrigo@ximian.com>
- *
- * Copyright 2003, Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include <config.h>
-#include <string.h>
-#include <gtk/gtkimage.h>
-#include <gtk/gtkstock.h>
-#include <libgnome/gnome-i18n.h>
-#include <gal/util/e-util.h>
-#include "e-util/e-dialog-utils.h"
-#include "e-calendar-marshal.h"
-#include <libecal/e-cal-time-util.h>
-
-#include "calendar-commands.h"
-#include "calendar-component.h"
-#include "calendar-config.h"
-#include "comp-util.h"
-#include "e-cal-model-calendar.h"
-#include "e-cal-view.h"
-#include "e-comp-editor-registry.h"
-#include "itip-utils.h"
-#include "dialogs/delete-comp.h"
-#include "dialogs/delete-error.h"
-#include "dialogs/event-editor.h"
-#include "dialogs/send-comp.h"
-#include "dialogs/cancel-comp.h"
-#include "dialogs/recur-comp.h"
-#include "print.h"
-#include "goto.h"
-#include "ea-calendar.h"
-
-/* Used for the status bar messages */
-#define EVOLUTION_CALENDAR_PROGRESS_IMAGE "evolution-calendar-mini.png"
-static GdkPixbuf *progress_icon = NULL;
-
-struct _ECalendarViewPrivate {
- /* The GnomeCalendar we are associated to */
- GnomeCalendar *calendar;
-
- /* The calendar model we are monitoring */
- ECalModel *model;
-
- /* Current activity (for the EActivityHandler, i.e. the status bar). */
- guint activity_id;
-
- /* clipboard selections */
- gchar *clipboard_selection;
-
- /* The popup menu */
- EPopupMenu *view_menu;
-
- /* The default category */
- char *default_category;
-};
-
-static void e_calendar_view_class_init (ECalendarViewClass *klass);
-static void e_calendar_view_init (ECalendarView *cal_view, ECalendarViewClass *klass);
-static void e_calendar_view_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
-static void e_calendar_view_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
-static void e_calendar_view_destroy (GtkObject *object);
-
-static GObjectClass *parent_class = NULL;
-static GdkAtom clipboard_atom = GDK_NONE;
-extern ECompEditorRegistry *comp_editor_registry;
-
-/* Property IDs */
-enum props {
- PROP_0,
- PROP_MODEL,
-};
-
-/* FIXME Why are we emitting these event signals here? Can't the model just be listened to? */
-/* Signal IDs */
-enum {
- SELECTION_CHANGED,
- SELECTED_TIME_CHANGED,
- TIMEZONE_CHANGED,
- EVENT_CHANGED,
- EVENT_ADDED,
- LAST_SIGNAL
-};
-
-static guint e_calendar_view_signals[LAST_SIGNAL] = { 0 };
-
-static void
-e_calendar_view_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
-{
- ECalendarView *cal_view;
- ECalendarViewPrivate *priv;
-
- cal_view = E_CALENDAR_VIEW (object);
- priv = cal_view->priv;
-
- switch (property_id) {
- case PROP_MODEL:
- e_calendar_view_set_model (cal_view, E_CAL_MODEL (g_value_get_object (value)));
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- break;
- }
-}
-
-static void
-e_calendar_view_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
-{
- ECalendarView *cal_view;
- ECalendarViewPrivate *priv;
-
- cal_view = E_CALENDAR_VIEW (object);
- priv = cal_view->priv;
-
- switch (property_id) {
- case PROP_MODEL:
- g_value_set_object (value, e_calendar_view_get_model (cal_view));
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- break;
- }
-}
-
-static void
-e_calendar_view_class_init (ECalendarViewClass *klass)
-{
- GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- GtkObjectClass *object_class = GTK_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_peek_parent (klass);
-
- /* Method override */
- gobject_class->set_property = e_calendar_view_set_property;
- gobject_class->get_property = e_calendar_view_get_property;
- object_class->destroy = e_calendar_view_destroy;
-
- klass->selection_changed = NULL;
- klass->selected_time_changed = NULL;
- klass->event_changed = NULL;
- klass->event_added = NULL;
-
- klass->get_selected_events = NULL;
- klass->get_selected_time_range = NULL;
- klass->set_selected_time_range = NULL;
- klass->get_visible_time_range = NULL;
- klass->update_query = NULL;
-
- g_object_class_install_property (gobject_class, PROP_MODEL,
- g_param_spec_object ("model", NULL, NULL, E_TYPE_CAL_MODEL,
- G_PARAM_READABLE | G_PARAM_WRITABLE
- | G_PARAM_CONSTRUCT));
-
- /* Create class' signals */
- e_calendar_view_signals[SELECTION_CHANGED] =
- g_signal_new ("selection_changed",
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ECalendarViewClass, selection_changed),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
- e_calendar_view_signals[SELECTED_TIME_CHANGED] =
- g_signal_new ("selected_time_changed",
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ECalendarViewClass, selected_time_changed),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
- e_calendar_view_signals[TIMEZONE_CHANGED] =
- g_signal_new ("timezone_changed",
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ECalendarViewClass, timezone_changed),
- NULL, NULL,
- e_calendar_marshal_VOID__POINTER_POINTER,
- G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_POINTER);
-
- e_calendar_view_signals[EVENT_CHANGED] =
- g_signal_new ("event_changed",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
- G_STRUCT_OFFSET (ECalendarViewClass, event_changed),
- NULL, NULL,
- g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1,
- G_TYPE_POINTER);
-
- e_calendar_view_signals[EVENT_ADDED] =
- g_signal_new ("event_added",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
- G_STRUCT_OFFSET (ECalendarViewClass, event_added),
- NULL, NULL,
- g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1,
- G_TYPE_POINTER);
-
- /* clipboard atom */
- if (!clipboard_atom)
- clipboard_atom = gdk_atom_intern ("CLIPBOARD", FALSE);
-
- /* init the accessibility support for e_day_view */
- e_cal_view_a11y_init ();
-}
-
-static void
-model_changed_cb (ETableModel *etm, gpointer user_data)
-{
- ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
-
- e_calendar_view_update_query (cal_view);
-}
-
-static void
-model_row_changed_cb (ETableModel *etm, int row, gpointer user_data)
-{
- ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
-
- e_calendar_view_update_query (cal_view);
-}
-
-static void
-model_cell_changed_cb (ETableModel *etm, int col, int row, gpointer user_data)
-{
- ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
-
- e_calendar_view_update_query (cal_view);
-}
-
-static void
-model_rows_changed_cb (ETableModel *etm, int row, int count, gpointer user_data)
-{
- ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
-
- e_calendar_view_update_query (cal_view);
-}
-
-void
-e_calendar_view_add_event (ECalendarView *cal_view, ECal *client, time_t dtstart,
- icaltimezone *default_zone, icalcomponent *icalcomp, gboolean in_top_canvas)
-{
- ECalComponent *comp;
- struct icaltimetype itime, old_dtstart, old_dtend;
- time_t tt_start, tt_end, new_dtstart;
- struct icaldurationtype ic_dur;
- char *uid;
- gint start_offset, end_offset;
- gboolean all_day_event;
-
- start_offset = 0;
- end_offset = 0;
-
- old_dtstart = icalcomponent_get_dtstart (icalcomp);
- tt_start = icaltime_as_timet (old_dtstart);
- old_dtend = icalcomponent_get_dtend (icalcomp);
- tt_end = icaltime_as_timet (old_dtend);
- ic_dur = icaldurationtype_from_int (tt_end - tt_start);
-
- if (icaldurationtype_as_int (ic_dur) > 60*60*24) {
- /* This is a long event */
- start_offset = old_dtstart.hour * 60 + old_dtstart.minute;
- end_offset = old_dtstart.hour * 60 + old_dtend.minute;
- }
-
- if (start_offset == 0 && end_offset == 0 && in_top_canvas)
- all_day_event = TRUE;
- else
- all_day_event = FALSE;
-
- if (in_top_canvas)
- new_dtstart = dtstart + start_offset * 60;
- else
- new_dtstart = dtstart;
-
- itime = icaltime_from_timet_with_zone (new_dtstart, FALSE, default_zone);
- if (all_day_event)
- itime.is_date = TRUE;
- icalcomponent_set_dtstart (icalcomp, itime);
-
- itime = icaltime_add (itime, ic_dur);
- if (all_day_event)
- itime.is_date = TRUE;
- icalcomponent_set_dtend (icalcomp, itime);
-
- /* FIXME The new uid stuff can go away once we actually set it in the backend */
- uid = e_cal_component_gen_uid ();
- comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (
- comp, icalcomponent_new_clone (icalcomp));
- e_cal_component_set_uid (comp, uid);
-
- /* FIXME Error handling */
- if (e_cal_create_object (client, e_cal_component_get_icalcomponent (comp), NULL, NULL)) {
- if (itip_organizer_is_user (comp, client) &&
- send_component_dialog ((GtkWindow *) gtk_widget_get_toplevel (GTK_WIDGET (cal_view)),
- client, comp, TRUE)) {
- itip_send_comp (E_CAL_COMPONENT_METHOD_REQUEST, comp,
- client, NULL);
- }
- } else {
- g_message (G_STRLOC ": Could not create the object!");
- }
-
- free (uid);
- g_object_unref (comp);
-}
-
-static void
-e_calendar_view_init (ECalendarView *cal_view, ECalendarViewClass *klass)
-{
- cal_view->priv = g_new0 (ECalendarViewPrivate, 1);
-
- cal_view->priv->model = (ECalModel *) e_cal_model_calendar_new ();
- g_signal_connect (G_OBJECT (cal_view->priv->model), "model_changed",
- G_CALLBACK (model_changed_cb), cal_view);
- g_signal_connect (G_OBJECT (cal_view->priv->model), "model_row_changed",
- G_CALLBACK (model_row_changed_cb), cal_view);
- g_signal_connect (G_OBJECT (cal_view->priv->model), "model_cell_changed",
- G_CALLBACK (model_cell_changed_cb), cal_view);
- g_signal_connect (G_OBJECT (cal_view->priv->model), "model_rows_inserted",
- G_CALLBACK (model_rows_changed_cb), cal_view);
- g_signal_connect (G_OBJECT (cal_view->priv->model), "model_rows_deleted",
- G_CALLBACK (model_rows_changed_cb), cal_view);
-
- cal_view->priv->clipboard_selection = NULL;
-}
-
-static void
-e_calendar_view_destroy (GtkObject *object)
-{
- ECalendarView *cal_view = (ECalendarView *) object;
-
- g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
-
- if (cal_view->priv) {
- if (cal_view->priv->model) {
- g_signal_handlers_disconnect_matched (cal_view->priv->model,
- G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL, cal_view);
- g_object_unref (cal_view->priv->model);
- cal_view->priv->model = NULL;
- }
-
- if (cal_view->priv->clipboard_selection) {
- g_free (cal_view->priv->clipboard_selection);
- cal_view->priv->clipboard_selection = NULL;
- }
-
- if (cal_view->priv->default_category) {
- g_free (cal_view->priv->default_category);
- cal_view->priv->default_category = NULL;
- }
-
- g_free (cal_view->priv);
- cal_view->priv = NULL;
- }
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- GTK_OBJECT_CLASS (parent_class)->destroy (object);
-}
-
-E_MAKE_TYPE (e_calendar_view, "ECalendarView", ECalendarView, e_calendar_view_class_init,
- e_calendar_view_init, GTK_TYPE_TABLE);
-
-GnomeCalendar *
-e_calendar_view_get_calendar (ECalendarView *cal_view)
-{
- g_return_val_if_fail (E_IS_CALENDAR_VIEW (cal_view), NULL);
-
- return cal_view->priv->calendar;
-}
-
-void
-e_calendar_view_set_calendar (ECalendarView *cal_view, GnomeCalendar *calendar)
-{
- g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
-
- cal_view->priv->calendar = calendar;
-}
-
-ECalModel *
-e_calendar_view_get_model (ECalendarView *cal_view)
-{
- g_return_val_if_fail (E_IS_CALENDAR_VIEW (cal_view), NULL);
-
- return cal_view->priv->model;
-}
-
-void
-e_calendar_view_set_model (ECalendarView *cal_view, ECalModel *model)
-{
- g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
- g_return_if_fail (E_IS_CAL_MODEL (model));
-
- if (cal_view->priv->model) {
- g_signal_handlers_disconnect_matched (cal_view->priv->model, G_SIGNAL_MATCH_DATA,
- 0, 0, 0, NULL, cal_view);
- g_object_unref (cal_view->priv->model);
- }
-
- cal_view->priv->model = model;
- g_object_ref (cal_view->priv->model);
- g_signal_connect (G_OBJECT (cal_view->priv->model), "model_changed", G_CALLBACK (model_changed_cb), cal_view);
- g_signal_connect (G_OBJECT (cal_view->priv->model), "model_row_changed", G_CALLBACK (model_row_changed_cb), cal_view);
- g_signal_connect (G_OBJECT (cal_view->priv->model), "model_cell_changed", G_CALLBACK (model_cell_changed_cb), cal_view);
- g_signal_connect (G_OBJECT (cal_view->priv->model), "model_rows_inserted", G_CALLBACK (model_rows_changed_cb), cal_view);
- g_signal_connect (G_OBJECT (cal_view->priv->model), "model_rows_deleted", G_CALLBACK (model_rows_changed_cb), cal_view);
-
- e_calendar_view_update_query (cal_view);
-}
-
-icaltimezone *
-e_calendar_view_get_timezone (ECalendarView *cal_view)
-{
- g_return_val_if_fail (E_IS_CALENDAR_VIEW (cal_view), NULL);
- return e_cal_model_get_timezone (cal_view->priv->model);
-}
-
-void
-e_calendar_view_set_timezone (ECalendarView *cal_view, icaltimezone *zone)
-{
- icaltimezone *old_zone;
-
- g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
-
- old_zone = e_cal_model_get_timezone (cal_view->priv->model);
- if (old_zone == zone)
- return;
-
- e_cal_model_set_timezone (cal_view->priv->model, zone);
- g_signal_emit (G_OBJECT (cal_view), e_calendar_view_signals[TIMEZONE_CHANGED], 0,
- old_zone, zone);
-}
-
-const char *
-e_calendar_view_get_default_category (ECalendarView *cal_view)
-{
- g_return_val_if_fail (E_IS_CALENDAR_VIEW (cal_view), NULL);
- return (const char *) cal_view->priv->default_category;
-}
-
-/**
- * e_calendar_view_set_default_category
- * @cal_view: A calendar 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 given calendar view.
- */
-void
-e_calendar_view_set_default_category (ECalendarView *cal_view, const char *category)
-{
- g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
-
- if (cal_view->priv->default_category)
- g_free (cal_view->priv->default_category);
-
- cal_view->priv->default_category = g_strdup (category);
-}
-
-/**
- * e_calendar_view_get_use_24_hour_format:
- * @cal_view: A calendar view.
- *
- * Gets whether the view is using 24 hour times or not.
- *
- * Returns: the 24 hour setting.
- */
-gboolean
-e_calendar_view_get_use_24_hour_format (ECalendarView *cal_view)
-{
- g_return_val_if_fail (E_IS_CALENDAR_VIEW (cal_view), FALSE);
-
- return e_cal_model_get_use_24_hour_format (cal_view->priv->model);
-}
-
-/**
- * e_calendar_view_set_use_24_hour_format
- * @cal_view: A calendar view.
- * @use_24_hour: Whether to use 24 hour times or not.
- *
- * Sets the 12/24 hour times setting for the given view.
- */
-void
-e_calendar_view_set_use_24_hour_format (ECalendarView *cal_view, gboolean use_24_hour)
-{
- g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
-
- e_cal_model_set_use_24_hour_format (cal_view->priv->model, use_24_hour);
-}
-
-void
-e_calendar_view_set_status_message (ECalendarView *cal_view, const gchar *message)
-{
- EActivityHandler *activity_handler = calendar_component_peek_activity_handler (calendar_component_peek ());
-
- g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
-
- if (!message || !*message) {
- if (cal_view->priv->activity_id != 0) {
- e_activity_handler_operation_finished (activity_handler, cal_view->priv->activity_id);
- cal_view->priv->activity_id = 0;
- }
- } else if (cal_view->priv->activity_id == 0) {
- char *client_id = g_strdup_printf ("%p", cal_view);
-
- if (progress_icon == NULL)
- progress_icon = gdk_pixbuf_new_from_file (EVOLUTION_IMAGESDIR "/" EVOLUTION_CALENDAR_PROGRESS_IMAGE, NULL);
-
- cal_view->priv->activity_id = e_activity_handler_operation_started (activity_handler, client_id, progress_icon, message, TRUE);
-
- g_free (client_id);
- } else {
- e_activity_handler_operation_progressing (activity_handler, cal_view->priv->activity_id, message, -1.0);
- }
-}
-
-GList *
-e_calendar_view_get_selected_events (ECalendarView *cal_view)
-{
- g_return_val_if_fail (E_IS_CALENDAR_VIEW (cal_view), NULL);
-
- if (E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->get_selected_events)
- return E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->get_selected_events (cal_view);
-
- return NULL;
-}
-
-void
-e_calendar_view_get_selected_time_range (ECalendarView *cal_view, time_t *start_time, time_t *end_time)
-{
- g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
-
- if (E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->get_selected_time_range) {
- E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->get_selected_time_range (
- cal_view, start_time, end_time);
- }
-}
-
-void
-e_calendar_view_set_selected_time_range (ECalendarView *cal_view, time_t start_time, time_t end_time)
-{
- g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
-
- if (E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->set_selected_time_range) {
- E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->set_selected_time_range (
- cal_view, start_time, end_time);
- }
-}
-
-gboolean
-e_calendar_view_get_visible_time_range (ECalendarView *cal_view, time_t *start_time, time_t *end_time)
-{
- g_return_val_if_fail (E_IS_CALENDAR_VIEW (cal_view), FALSE);
-
- if (E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->get_visible_time_range) {
- return E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->get_visible_time_range (
- cal_view, start_time, end_time);
- }
-
- return FALSE;
-}
-
-void
-e_calendar_view_update_query (ECalendarView *cal_view)
-{
- g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
-
- e_calendar_view_set_status_message (cal_view, _("Searching"));
-
- if (E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->update_query) {
- E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->update_query (cal_view);
- }
-
- e_calendar_view_set_status_message (cal_view, NULL);
-}
-
-void
-e_calendar_view_cut_clipboard (ECalendarView *cal_view)
-{
- GList *selected, *l;
- const char *uid;
-
- g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
-
- selected = e_calendar_view_get_selected_events (cal_view);
- if (!selected)
- return;
-
- e_calendar_view_set_status_message (cal_view, _("Deleting selected objects"));
-
- e_calendar_view_copy_clipboard (cal_view);
- for (l = selected; l != NULL; l = l->next) {
- ECalComponent *comp;
- ECalendarViewEvent *event = (ECalendarViewEvent *) l->data;
- GError *error = NULL;
-
- if (!event)
- continue;
-
- comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
-
- if (itip_organizer_is_user (comp, event->comp_data->client)
- && cancel_component_dialog ((GtkWindow *) gtk_widget_get_toplevel (GTK_WIDGET (cal_view)),
- event->comp_data->client, comp, TRUE))
- itip_send_comp (E_CAL_COMPONENT_METHOD_CANCEL, comp,
- event->comp_data->client, NULL);
-
- e_cal_component_get_uid (comp, &uid);
- e_cal_remove_object (event->comp_data->client, uid, &error);
- delete_error_dialog (error, E_CAL_COMPONENT_EVENT);
-
- g_clear_error (&error);
-
- g_object_unref (comp);
- }
-
- e_calendar_view_set_status_message (cal_view, NULL);
-
- g_list_free (selected);
-}
-
-void
-e_calendar_view_copy_clipboard (ECalendarView *cal_view)
-{
- GList *selected, *l;
- gchar *comp_str;
- icalcomponent *vcal_comp;
- icalcomponent *new_icalcomp;
- ECalendarViewEvent *event;
-
- g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
-
- selected = e_calendar_view_get_selected_events (cal_view);
- if (!selected)
- return;
-
- /* create top-level VCALENDAR component and add VTIMEZONE's */
- vcal_comp = e_cal_util_new_top_level ();
- for (l = selected; l != NULL; l = l->next) {
- event = (ECalendarViewEvent *) l->data;
-
- if (event)
- e_cal_util_add_timezones_from_component (vcal_comp, event->comp_data->icalcomp);
- }
-
- for (l = selected; l != NULL; l = l->next) {
- event = (ECalendarViewEvent *) l->data;
-
- new_icalcomp = icalcomponent_new_clone (event->comp_data->icalcomp);
- icalcomponent_add_component (vcal_comp, new_icalcomp);
- }
-
- /* copy the VCALENDAR to the clipboard */
- comp_str = icalcomponent_as_ical_string (vcal_comp);
- if (cal_view->priv->clipboard_selection != NULL)
- g_free (cal_view->priv->clipboard_selection);
- cal_view->priv->clipboard_selection = g_strdup (comp_str);
- gtk_clipboard_set_text (gtk_widget_get_clipboard (GTK_WIDGET (cal_view), clipboard_atom),
- (const gchar *) comp_str,
- g_utf8_strlen (comp_str, -1));
-
- /* free memory */
- icalcomponent_free (vcal_comp);
- g_list_free (selected);
-}
-
-static void
-clipboard_get_text_cb (GtkClipboard *clipboard, const gchar *text, ECalendarView *cal_view)
-{
- char *default_tzid;
- icalcomponent *icalcomp;
- icalcomponent_kind kind;
- time_t selected_time_start, selected_time_end;
- icaltimezone *default_zone;
- ECal *client;
-
- g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
-
- icalcomp = icalparser_parse_string ((const char *) text);
- if (!icalcomp)
- return;
-
- default_tzid = calendar_config_get_timezone ();
-
- client = e_cal_model_get_default_client (cal_view->priv->model);
- /* FIXME Error checking */
- e_cal_get_timezone (client, default_tzid, &default_zone, NULL);
-
- /* check the type of the component */
- /* FIXME An error dialog if we return? */
- kind = icalcomponent_isa (icalcomp);
- if (kind != ICAL_VCALENDAR_COMPONENT && kind != ICAL_VEVENT_COMPONENT)
- return;
-
- e_calendar_view_set_status_message (cal_view, _("Updating objects"));
- e_calendar_view_get_selected_time_range (cal_view, &selected_time_start, &selected_time_end);
-
- /* FIXME Timezone handling */
- if (kind == ICAL_VCALENDAR_COMPONENT) {
- 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)
- e_calendar_view_add_event (cal_view, client, selected_time_start,
- default_zone, subcomp, FALSE);
- else if (child_kind == ICAL_VTIMEZONE_COMPONENT) {
- icaltimezone *zone;
-
- zone = icaltimezone_new ();
- icaltimezone_set_component (zone, subcomp);
- e_cal_add_timezone (client, zone, NULL);
-
- icaltimezone_free (zone, 1);
- }
-
- subcomp = icalcomponent_get_next_component (
- icalcomp, ICAL_ANY_COMPONENT);
- }
-
- icalcomponent_free (icalcomp);
-
- } else {
- e_calendar_view_add_event (cal_view, client, selected_time_start, default_zone, icalcomp, FALSE);
- }
-
- e_calendar_view_set_status_message (cal_view, NULL);
-}
-
-void
-e_calendar_view_paste_clipboard (ECalendarView *cal_view)
-{
- g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
-
- gtk_clipboard_request_text (gtk_widget_get_clipboard (GTK_WIDGET (cal_view), clipboard_atom),
- (GtkClipboardTextReceivedFunc) clipboard_get_text_cb, cal_view);
-}
-
-static void
-delete_event (ECalendarView *cal_view, ECalendarViewEvent *event)
-{
- ECalComponent *comp;
- ECalComponentVType vtype;
-
- comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
- vtype = e_cal_component_get_vtype (comp);
-
- if (delete_component_dialog (comp, FALSE, 1, vtype, GTK_WIDGET (cal_view))) {
- const char *uid;
- GError *error = NULL;
-
- if (itip_organizer_is_user (comp, event->comp_data->client)
- && cancel_component_dialog ((GtkWindow *) gtk_widget_get_toplevel (GTK_WIDGET (cal_view)),
- event->comp_data->client,
- comp, TRUE))
- itip_send_comp (E_CAL_COMPONENT_METHOD_CANCEL, comp,
- event->comp_data->client, NULL);
-
- e_cal_component_get_uid (comp, &uid);
- if (!uid || !*uid) {
- g_object_unref (comp);
- return;
- }
-
- e_cal_remove_object (event->comp_data->client, uid, &error);
- delete_error_dialog (error, E_CAL_COMPONENT_EVENT);
- g_clear_error (&error);
- }
-
- g_object_unref (comp);
-}
-
-void
-e_calendar_view_delete_selected_event (ECalendarView *cal_view)
-{
- GList *selected;
- ECalendarViewEvent *event;
-
- selected = e_calendar_view_get_selected_events (cal_view);
- if (!selected)
- return;
-
- event = (ECalendarViewEvent *) selected->data;
- if (event)
- delete_event (cal_view, event);
-
- g_list_free (selected);
-}
-
-void
-e_calendar_view_delete_selected_events (ECalendarView *cal_view)
-{
- GList *selected, *l;
- ECalendarViewEvent *event;
-
- selected = e_calendar_view_get_selected_events (cal_view);
- if (!selected)
- return;
-
- for (l = selected; l != NULL; l = l->next) {
- event = (ECalendarViewEvent *) l->data;
- if (event)
- delete_event (cal_view, event);
- }
-
- g_list_free (selected);
-}
-
-void
-e_calendar_view_delete_selected_occurrence (ECalendarView *cal_view)
-{
- ECalendarViewEvent *event;
- GList *selected;
- const char *uid;
- GError *error = NULL;
-
- selected = e_calendar_view_get_selected_events (cal_view);
- if (!selected)
- return;
-
- event = (ECalendarViewEvent *) selected->data;
-
- uid = icalcomponent_get_uid (event->comp_data->icalcomp);
- /* FIXME: use 'rid' argument */
- e_cal_remove_object_with_mod (event->comp_data->client, uid, NULL, CALOBJ_MOD_THIS, &error);
-
- delete_error_dialog (error, E_CAL_COMPONENT_EVENT);
- g_clear_error (&error);
-
- /* free memory */
- g_list_free (selected);
-}
-
-static void
-on_new_appointment (GtkWidget *widget, gpointer user_data)
-{
- ECalendarView *cal_view = (ECalendarView *) user_data;
-
- e_calendar_view_new_appointment (cal_view);
-}
-
-static void
-on_new_event (GtkWidget *widget, gpointer user_data)
-{
- time_t dtstart, dtend;
- ECalendarView *cal_view = (ECalendarView *) user_data;
-
- e_calendar_view_get_selected_time_range (cal_view, &dtstart, &dtend);
- e_calendar_view_new_appointment_for (cal_view, dtstart, dtend, TRUE, FALSE);
-}
-
-static void
-on_new_meeting (GtkWidget *widget, gpointer user_data)
-{
- time_t dtstart, dtend;
- ECalendarView *cal_view = (ECalendarView *) user_data;
-
- e_calendar_view_get_selected_time_range (cal_view, &dtstart, &dtend);
- e_calendar_view_new_appointment_for (cal_view, dtstart, dtend, FALSE, TRUE);
-}
-
-static void
-on_new_task (GtkWidget *widget, gpointer user_data)
-{
- ECalendarView *cal_view = (ECalendarView *) user_data;
- gnome_calendar_new_task (cal_view->priv->calendar);
-}
-
-static void
-on_goto_date (GtkWidget *widget, gpointer user_data)
-{
- ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
-
- goto_dialog (cal_view->priv->calendar);
-}
-
-static void
-on_goto_today (GtkWidget *widget, gpointer user_data)
-{
- ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
-
- calendar_goto_today (cal_view->priv->calendar);
-}
-
-static void
-on_edit_appointment (GtkWidget *widget, gpointer user_data)
-{
- GList *selected;
- ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
-
- selected = e_calendar_view_get_selected_events (cal_view);
- if (selected) {
- ECalendarViewEvent *event = (ECalendarViewEvent *) selected->data;
-
- if (event)
- e_calendar_view_edit_appointment (cal_view, event->comp_data->client,
- event->comp_data->icalcomp, FALSE);
-
- g_list_free (selected);
- }
-}
-
-static void
-on_print (GtkWidget *widget, gpointer user_data)
-{
- ECalendarView *cal_view;
- time_t start;
- GnomeCalendarViewType view_type;
- PrintView print_view;
-
- cal_view = E_CALENDAR_VIEW (user_data);
-
- e_calendar_view_get_visible_time_range (cal_view, &start, NULL);
- view_type = gnome_calendar_get_view (cal_view->priv->calendar);
-
- 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 (cal_view->priv->calendar, FALSE, start, print_view);
-}
-
-static void
-on_save_as (GtkWidget *widget, gpointer user_data)
-{
- ECalendarView *cal_view;
- GList *selected;
- char *filename;
- char *ical_string;
- FILE *file;
- ECalendarViewEvent *event;
-
- cal_view = E_CALENDAR_VIEW (user_data);
-
- selected = e_calendar_view_get_selected_events (cal_view);
- if (!selected)
- return;
-
- filename = e_file_dialog_save (_("Save as..."));
- if (filename == NULL)
- return;
-
- event = (ECalendarViewEvent *) selected->data;
- ical_string = e_cal_get_component_as_string (event->comp_data->client, event->comp_data->icalcomp);
- if (ical_string == NULL) {
- g_warning ("Couldn't convert item to a string");
- return;
- }
-
- file = fopen (filename, "w");
- if (file == NULL) {
- g_warning ("Couldn't save item");
- return;
- }
-
- fprintf (file, ical_string);
- g_free (ical_string);
- fclose (file);
-
- g_list_free (selected);
-}
-
-static void
-on_print_event (GtkWidget *widget, gpointer user_data)
-{
- ECalendarView *cal_view;
- GList *selected;
- ECalendarViewEvent *event;
- ECalComponent *comp;
-
- cal_view = E_CALENDAR_VIEW (user_data);
- selected = e_calendar_view_get_selected_events (cal_view);
- if (!selected)
- return;
-
- event = (ECalendarViewEvent *) selected->data;
-
- comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
- print_comp (comp, event->comp_data->client, FALSE);
-
- g_object_unref (comp);
-}
-
-static void
-on_meeting (GtkWidget *widget, gpointer user_data)
-{
- GList *selected;
- ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
-
- selected = e_calendar_view_get_selected_events (cal_view);
- if (selected) {
- ECalendarViewEvent *event = (ECalendarViewEvent *) selected->data;
- e_calendar_view_edit_appointment (cal_view, event->comp_data->client, event->comp_data->icalcomp, TRUE);
-
- g_list_free (selected);
- }
-}
-
-static void
-on_forward (GtkWidget *widget, gpointer user_data)
-{
- GList *selected;
- ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
-
- selected = e_calendar_view_get_selected_events (cal_view);
- if (selected) {
- ECalComponent *comp;
- ECalendarViewEvent *event = (ECalendarViewEvent *) selected->data;
-
- comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
- itip_send_comp (E_CAL_COMPONENT_METHOD_PUBLISH, comp, event->comp_data->client, NULL);
-
- g_list_free (selected);
- g_object_unref (comp);
- }
-}
-
-static void
-on_publish (GtkWidget *widget, gpointer user_data)
-{
- ECalendarView *cal_view;
- icaltimezone *utc;
- time_t start = time (NULL), end;
- GList *comp_list = NULL, *client_list, *cl;
-
- cal_view = E_CALENDAR_VIEW (user_data);
-
- utc = icaltimezone_get_utc_timezone ();
- start = time_day_begin_with_zone (start, utc);
- end = time_add_week_with_zone (start, 6, utc);
-
- client_list = e_cal_model_get_client_list (cal_view->priv->model);
- for (cl = client_list; cl != NULL; cl = cl->next) {
- if (e_cal_get_free_busy ((ECal *) cl->data, NULL, start, end, &comp_list, NULL)) {
- GList *l;
-
- for (l = comp_list; l; l = l->next) {
- ECalComponent *comp = E_CAL_COMPONENT (l->data);
- itip_send_comp (E_CAL_COMPONENT_METHOD_PUBLISH, comp, (ECal *) cl->data, NULL);
-
- g_object_unref (comp);
- }
-
- g_list_free (comp_list);
- }
- }
-
- g_list_free (client_list);
-}
-
-static void
-on_delete_appointment (GtkWidget *widget, gpointer user_data)
-{
- ECalendarView *cal_view;
-
- cal_view = E_CALENDAR_VIEW (user_data);
- e_calendar_view_delete_selected_event (cal_view);
-}
-
-static void
-on_delete_occurrence (GtkWidget *widget, gpointer user_data)
-{
- ECalendarView *cal_view;
-
- cal_view = E_CALENDAR_VIEW (user_data);
- e_calendar_view_delete_selected_occurrence (cal_view);
-}
-
-static void
-on_cut (GtkWidget *widget, gpointer user_data)
-{
- ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
-
- e_calendar_view_cut_clipboard (cal_view);
-}
-
-static void
-on_copy (GtkWidget *widget, gpointer user_data)
-{
- ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
-
- e_calendar_view_copy_clipboard (cal_view);
-}
-
-static void
-on_paste (GtkWidget *widget, gpointer user_data)
-{
- ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
-
- e_calendar_view_paste_clipboard (cal_view);
-}
-
-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,
-
- /*
- * This is used to when an event is already a meeting and
- * we want to disable the schedule meeting command
- */
- MASK_MEETING = 16,
-
- /*
- * To disable cut and copy for meetings the user is not the
- * organizer of
- */
- MASK_MEETING_ORGANIZER = 32,
-
- /*
- * To disable things not valid for instances
- */
- MASK_INSTANCE = 64
-};
-
-static EPopupMenu main_items [] = {
- E_POPUP_ITEM (N_("New _Appointment..."), GTK_SIGNAL_FUNC (on_new_appointment), MASK_EDITABLE),
- E_POPUP_ITEM (N_("New All Day _Event"), GTK_SIGNAL_FUNC (on_new_event), MASK_EDITABLE),
- E_POPUP_ITEM (N_("New Meeting"), GTK_SIGNAL_FUNC (on_new_meeting), MASK_EDITABLE),
- E_POPUP_ITEM (N_("New Task"), GTK_SIGNAL_FUNC (on_new_task), MASK_EDITABLE),
-
- E_POPUP_SEPARATOR,
-
- E_POPUP_ITEM (N_("_Print..."), GTK_SIGNAL_FUNC (on_print), 0),
-
- E_POPUP_SEPARATOR,
-
- E_POPUP_ITEM (N_("_Paste"), GTK_SIGNAL_FUNC (on_paste), MASK_EDITABLE),
-
- E_POPUP_SEPARATOR,
-
- E_POPUP_SUBMENU (N_("Current View"), NULL, 0),
-
- E_POPUP_ITEM (N_("Go to _Today"), GTK_SIGNAL_FUNC (on_goto_today), 0),
- E_POPUP_ITEM (N_("_Go to Date..."), GTK_SIGNAL_FUNC (on_goto_date), 0),
-
- E_POPUP_SEPARATOR,
-
- E_POPUP_ITEM (N_("_Publish Free/Busy Information"), GTK_SIGNAL_FUNC (on_publish), 0),
-
- E_POPUP_TERMINATOR
-};
-
-static EPopupMenu child_items [] = {
- E_POPUP_ITEM (N_("_Open"), GTK_SIGNAL_FUNC (on_edit_appointment), MASK_EDITING),
- E_POPUP_ITEM (N_("_Save As..."), GTK_SIGNAL_FUNC (on_save_as), MASK_EDITING),
- E_POPUP_ITEM (N_("_Print..."), GTK_SIGNAL_FUNC (on_print_event), MASK_EDITING),
-
- /* Only show this separator if one of the above is shown. */
- E_POPUP_SEPARATOR,
-
- E_POPUP_ITEM (N_("C_ut"), GTK_SIGNAL_FUNC (on_cut), MASK_EDITING | MASK_EDITABLE | MASK_MEETING_ORGANIZER),
- E_POPUP_ITEM (N_("_Copy"), GTK_SIGNAL_FUNC (on_copy), MASK_EDITING | MASK_MEETING_ORGANIZER),
- E_POPUP_ITEM (N_("_Paste"), GTK_SIGNAL_FUNC (on_paste), MASK_EDITABLE),
-
- E_POPUP_SEPARATOR,
-
- E_POPUP_ITEM (N_("_Schedule Meeting..."), GTK_SIGNAL_FUNC (on_meeting), MASK_EDITABLE | MASK_EDITING | MASK_MEETING),
- E_POPUP_ITEM (N_("_Forward as iCalendar..."), GTK_SIGNAL_FUNC (on_forward), MASK_EDITING),
-
- E_POPUP_SEPARATOR,
-
- E_POPUP_ITEM (N_("_Delete"), GTK_SIGNAL_FUNC (on_delete_appointment), MASK_EDITABLE | MASK_SINGLE | MASK_EDITING),
- E_POPUP_ITEM (N_("Delete this _Occurrence"), GTK_SIGNAL_FUNC (on_delete_occurrence), MASK_RECURRING | MASK_EDITING | MASK_EDITABLE),
- E_POPUP_ITEM (N_("Delete _All Occurrences"), GTK_SIGNAL_FUNC (on_delete_appointment), MASK_RECURRING | MASK_EDITING | MASK_EDITABLE),
-
- E_POPUP_TERMINATOR
-};
-
-static void
-free_view_popup (GtkWidget *widget, gpointer data)
-{
- ECalendarView *cal_view = E_CALENDAR_VIEW (data);
-
- if (cal_view->priv->view_menu == NULL)
- return;
-
- gnome_calendar_discard_view_popup (cal_view->priv->calendar, cal_view->priv->view_menu);
- cal_view->priv->view_menu = NULL;
-}
-
-static void
-setup_popup_icons (EPopupMenu *context_menu)
-{
- gint i;
-
- for (i = 0; context_menu[i].name; i++) {
- GtkWidget *pixmap_widget = NULL;
-
- if (!strcmp (context_menu[i].name, _("_Copy")))
- pixmap_widget = gtk_image_new_from_stock (GTK_STOCK_COPY, GTK_ICON_SIZE_MENU);
- else if (!strcmp (context_menu[i].name, _("C_ut")))
- pixmap_widget = gtk_image_new_from_stock (GTK_STOCK_CUT, GTK_ICON_SIZE_MENU);
- else if (!strcmp (context_menu[i].name, _("_Delete")) ||
- !strcmp (context_menu[i].name, _("Delete this _Occurrence")) ||
- !strcmp (context_menu[i].name, _("Delete _All Occurrences")))
- pixmap_widget = gtk_image_new_from_stock (GTK_STOCK_DELETE, GTK_ICON_SIZE_MENU);
- else if (!strcmp (context_menu[i].name, _("Go to _Today")))
- pixmap_widget = gtk_image_new_from_stock (GTK_STOCK_HOME, GTK_ICON_SIZE_MENU);
- else if (!strcmp (context_menu[i].name, _("_Go to Date...")))
- pixmap_widget = gtk_image_new_from_stock (GTK_STOCK_JUMP_TO, GTK_ICON_SIZE_MENU);
- else if (!strcmp (context_menu[i].name, _("New _Appointment...")))
- pixmap_widget = gtk_image_new_from_file (EVOLUTION_IMAGESDIR "/new_appointment.xpm");
- else if (!strcmp (context_menu[i].name, _("New All Day _Event")))
- pixmap_widget = gtk_image_new_from_file (EVOLUTION_IMAGESDIR "/new_all_day_event.png");
- else if (!strcmp (context_menu[i].name, _("New Meeting")))
- pixmap_widget = gtk_image_new_from_file (EVOLUTION_IMAGESDIR "/meeting-request-16.png");
- else if (!strcmp (context_menu[i].name, _("New Task")))
- pixmap_widget = gtk_image_new_from_file (EVOLUTION_IMAGESDIR "/new_task-16.png");
- else if (!strcmp (context_menu[i].name, _("_Open")))
- pixmap_widget = gtk_image_new_from_stock (GTK_STOCK_OPEN, GTK_ICON_SIZE_MENU);
- else if (!strcmp (context_menu[i].name, _("_Paste")))
- pixmap_widget = gtk_image_new_from_stock (GTK_STOCK_PASTE, GTK_ICON_SIZE_MENU);
- else if (!strcmp (context_menu[i].name, _("_Print...")))
- pixmap_widget = gtk_image_new_from_stock (GTK_STOCK_PRINT, GTK_ICON_SIZE_MENU);
- else if (!strcmp (context_menu[i].name, _("_Save As...")))
- pixmap_widget = gtk_image_new_from_stock (GTK_STOCK_SAVE_AS, GTK_ICON_SIZE_MENU);
- else if (!strcmp (context_menu[i].name, _("_Settings...")))
- pixmap_widget = gtk_image_new_from_stock (GTK_STOCK_PREFERENCES, GTK_ICON_SIZE_MENU);
-
- if (pixmap_widget)
- gtk_widget_show (pixmap_widget);
- context_menu[i].pixmap_widget = pixmap_widget;
- }
-}
-
-GtkMenu *
-e_calendar_view_create_popup_menu (ECalendarView *cal_view)
-{
- GList *selected;
- EPopupMenu *context_menu;
- guint32 disable_mask = 0, hide_mask = 0;
- GtkMenu *popup;
- ECal *client = NULL;
- gboolean read_only = TRUE;
-
- g_return_val_if_fail (E_IS_CALENDAR_VIEW (cal_view), NULL);
-
- /* get the selection */
- selected = e_calendar_view_get_selected_events (cal_view);
-
- if (selected == NULL) {
- cal_view->priv->view_menu = gnome_calendar_setup_view_popup (cal_view->priv->calendar);
- main_items[9].submenu = cal_view->priv->view_menu;
- context_menu = main_items;
-
- client = e_cal_model_get_default_client (cal_view->priv->model);
- } else {
- ECalendarViewEvent *event;
-
- context_menu = child_items;
-
- event = (ECalendarViewEvent *) selected->data;
- if (e_cal_util_component_has_recurrences (event->comp_data->icalcomp))
- hide_mask |= MASK_SINGLE;
- else
- hide_mask |= MASK_RECURRING;
-
- if (e_cal_util_component_is_instance (event->comp_data->icalcomp))
- hide_mask |= MASK_INSTANCE;
-
- if (e_cal_util_component_has_organizer (event->comp_data->icalcomp)) {
- ECalComponent *comp;
-
- disable_mask |= MASK_MEETING;
-
- comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
- if (!itip_organizer_is_user (comp, event->comp_data->client))
- disable_mask |= MASK_MEETING_ORGANIZER;
-
- g_object_unref (comp);
- }
-
- client = event->comp_data->client;
- }
-
- e_cal_is_read_only (client, &read_only, NULL);
- if (read_only)
- disable_mask |= MASK_EDITABLE;
-
- setup_popup_icons (context_menu);
- popup = e_popup_menu_create (context_menu, disable_mask, hide_mask, cal_view);
- g_signal_connect (popup, "selection-done", G_CALLBACK (free_view_popup), cal_view);
-
- return popup;
-}
-
-/**
- * e_calendar_view_new_appointment_for
- * @cal_view: A calendar view.
- * @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.
- * @meeting: Whether the appointment is a meeting or not.
- *
- * Opens an event editor dialog for a new appointment.
- */
-void
-e_calendar_view_new_appointment_for (ECalendarView *cal_view,
- time_t dtstart, time_t dtend,
- gboolean all_day,
- gboolean meeting)
-{
- ECalendarViewPrivate *priv;
- struct icaltimetype itt;
- ECalComponentDateTime dt;
- ECalComponent *comp;
- icalcomponent *icalcomp;
- ECalComponentTransparency transparency;
-
- g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
-
- priv = cal_view->priv;
-
- dt.value = &itt;
- if (all_day)
- dt.tzid = NULL;
- else
- dt.tzid = icaltimezone_get_tzid (e_cal_model_get_timezone (cal_view->priv->model));
-
- icalcomp = e_cal_model_create_component_with_defaults (priv->model);
- comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomp);
-
- /* DTSTART, DTEND */
- itt = icaltime_from_timet_with_zone (dtstart, FALSE, e_cal_model_get_timezone (cal_view->priv->model));
- if (all_day) {
- itt.hour = itt.minute = itt.second = 0;
- itt.is_date = TRUE;
- }
- e_cal_component_set_dtstart (comp, &dt);
-
- itt = icaltime_from_timet_with_zone (dtend, FALSE, e_cal_model_get_timezone (cal_view->priv->model));
- if (all_day) {
- /* We round it up to the end of the day, unless it is
- already set to midnight */
- if (itt.hour != 0 || itt.minute != 0 || itt.second != 0) {
- icaltime_adjust (&itt, 1, 0, 0, 0);
- }
- itt.hour = itt.minute = itt.second = 0;
- itt.is_date = TRUE;
- }
- e_cal_component_set_dtend (comp, &dt);
-
- /* TRANSPARENCY */
- transparency = all_day ? E_CAL_COMPONENT_TRANSP_TRANSPARENT
- : E_CAL_COMPONENT_TRANSP_OPAQUE;
- e_cal_component_set_transparency (comp, transparency);
-
- /* CATEGORY */
- e_cal_component_set_categories (comp, priv->default_category);
-
- /* edit the object */
- e_cal_component_commit_sequence (comp);
-
- e_calendar_view_edit_appointment (cal_view,
- e_cal_model_get_default_client (priv->model),
- icalcomp, meeting);
-
- g_object_unref (comp);
-}
-
-/**
- * e_calendar_view_new_appointment
- * @cal_view: A calendar view.
- *
- * 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 view.
- */
-void
-e_calendar_view_new_appointment (ECalendarView *cal_view)
-{
- time_t dtstart, dtend;
-
- g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
-
- e_calendar_view_get_selected_time_range (cal_view, &dtstart, &dtend);
- e_calendar_view_new_appointment_for (cal_view, dtstart, dtend, FALSE, FALSE);
-}
-
-/**
- * e_calendar_view_edit_appointment
- * @cal_view: A calendar view.
- * @client: Calendar client.
- * @icalcomp: The object to be edited.
- * @meeting: Whether the appointment is a meeting or not.
- *
- * Opens an editor window to allow the user to edit the selected
- * object.
- */
-void
-e_calendar_view_edit_appointment (ECalendarView *cal_view,
- ECal *client,
- icalcomponent *icalcomp,
- gboolean meeting)
-{
- ECalendarViewPrivate *priv;
- CompEditor *ce;
- const char *uid;
- ECalComponent *comp;
-
- g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
- g_return_if_fail (E_IS_CAL (client));
- g_return_if_fail (icalcomp != NULL);
-
- priv = cal_view->priv;
-
- uid = icalcomponent_get_uid (icalcomp);
-
- ce = e_comp_editor_registry_find (comp_editor_registry, uid);
- if (!ce) {
- EventEditor *ee;
-
- ee = event_editor_new (client);
- ce = COMP_EDITOR (ee);
-
- comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (icalcomp));
- comp_editor_edit_comp (ce, comp);
- if (meeting)
- event_editor_show_meeting (ee);
-
- e_comp_editor_registry_add (comp_editor_registry, ce, FALSE);
-
- g_object_unref (comp);
- }
-
- comp_editor_focus (ce);
-}
diff --git a/calendar/gui/e-cal-view.h b/calendar/gui/e-cal-view.h
deleted file mode 100644
index a1b11023b3..0000000000
--- a/calendar/gui/e-cal-view.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Rodrigo Moya <rodrigo@ximian.com>
- *
- * Copyright 2003, Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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_VIEW_H_
-#define _E_CALENDAR_VIEW_H_
-
-#include <libecal/e-cal.h>
-#include <gtk/gtktable.h>
-#include "e-cal-model.h"
-#include "gnome-cal.h"
-
-G_BEGIN_DECLS
-
-/*
- * EView - base widget class for the calendar views.
- */
-
-#define E_CALENDAR_VIEW(obj) GTK_CHECK_CAST (obj, e_calendar_view_get_type (), ECalendarView)
-#define E_CALENDAR_VIEW_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, e_calendar_view_get_type (), ECalendarViewClass)
-#define E_IS_CALENDAR_VIEW(obj) GTK_CHECK_TYPE (obj, e_calendar_view_get_type ())
-
-typedef enum {
- E_CALENDAR_VIEW_POS_OUTSIDE,
- E_CALENDAR_VIEW_POS_NONE,
- E_CALENDAR_VIEW_POS_EVENT,
- E_CALENDAR_VIEW_POS_LEFT_EDGE,
- E_CALENDAR_VIEW_POS_RIGHT_EDGE,
- E_CALENDAR_VIEW_POS_TOP_EDGE,
- E_CALENDAR_VIEW_POS_BOTTOM_EDGE
-} ECalendarViewPosition;
-
-#define E_CALENDAR_VIEW_EVENT_FIELDS \
- GnomeCanvasItem *canvas_item; \
- ECalModelComponent *comp_data; \
- gboolean allocated_comp_data; \
- time_t start; \
- time_t end; \
- guint16 start_minute; \
- guint16 end_minute; \
- guint different_timezone : 1;
-
-typedef struct {
- E_CALENDAR_VIEW_EVENT_FIELDS
-} ECalendarViewEvent;
-
-typedef struct _ECalendarView ECalendarView;
-typedef struct _ECalendarViewClass ECalendarViewClass;
-typedef struct _ECalendarViewPrivate ECalendarViewPrivate;
-
-struct _ECalendarView {
- GtkTable table;
- ECalendarViewPrivate *priv;
-};
-
-struct _ECalendarViewClass {
- GtkTableClass parent_class;
-
- /* Notification signals */
- void (* selection_changed) (ECalendarView *cal_view);
- void (* selected_time_changed) (ECalendarView *cal_view);
- void (* timezone_changed) (ECalendarView *cal_view, icaltimezone *old_zone, icaltimezone *new_zone);
- void (* event_changed) (ECalendarView *day_view, ECalendarViewEvent *event);
- void (* event_added) (ECalendarView *day_view, ECalendarViewEvent *event);
-
- /* Virtual methods */
- GList * (* get_selected_events) (ECalendarView *cal_view); /* a GList of ECalendarViewEvent's */
- void (* get_selected_time_range) (ECalendarView *cal_view, time_t *start_time, time_t *end_time);
- void (* set_selected_time_range) (ECalendarView *cal_view, time_t start_time, time_t end_time);
- gboolean (* get_visible_time_range) (ECalendarView *cal_view, time_t *start_time, time_t *end_time);
- void (* update_query) (ECalendarView *cal_view);
-};
-
-GType e_calendar_view_get_type (void);
-
-GnomeCalendar *e_calendar_view_get_calendar (ECalendarView *cal_view);
-void e_calendar_view_set_calendar (ECalendarView *cal_view, GnomeCalendar *calendar);
-ECalModel *e_calendar_view_get_model (ECalendarView *cal_view);
-void e_calendar_view_set_model (ECalendarView *cal_view, ECalModel *model);
-icaltimezone *e_calendar_view_get_timezone (ECalendarView *cal_view);
-void e_calendar_view_set_timezone (ECalendarView *cal_view, icaltimezone *zone);
-const char *e_calendar_view_get_default_category (ECalendarView *cal_view);
-void e_calendar_view_set_default_category (ECalendarView *cal_view, const char *category);
-gboolean e_calendar_view_get_use_24_hour_format (ECalendarView *view);
-void e_calendar_view_set_use_24_hour_format (ECalendarView *view, gboolean use_24_hour);
-
-void e_calendar_view_set_status_message (ECalendarView *cal_view, const gchar *message);
-
-GList *e_calendar_view_get_selected_events (ECalendarView *cal_view);
-void e_calendar_view_get_selected_time_range (ECalendarView *cal_view, time_t *start_time, time_t *end_time);
-void e_calendar_view_set_selected_time_range (ECalendarView *cal_view, time_t start_time, time_t end_time);
-gboolean e_calendar_view_get_visible_time_range (ECalendarView *cal_view, time_t *start_time, time_t *end_time);
-void e_calendar_view_update_query (ECalendarView *cal_view);
-
-void e_calendar_view_cut_clipboard (ECalendarView *cal_view);
-void e_calendar_view_copy_clipboard (ECalendarView *cal_view);
-void e_calendar_view_paste_clipboard (ECalendarView *cal_view);
-void e_calendar_view_delete_selected_event (ECalendarView *cal_view);
-void e_calendar_view_delete_selected_events (ECalendarView *cal_view);
-void e_calendar_view_delete_selected_occurrence (ECalendarView *cal_view);
-
-GtkMenu *e_calendar_view_create_popup_menu (ECalendarView *cal_view);
-
-void e_calendar_view_add_event (ECalendarView *cal_view, ECal *client, time_t dtstart,
- icaltimezone *default_zone, icalcomponent *icalcomp, gboolean in_top_canvas);
-void e_calendar_view_new_appointment_for (ECalendarView *cal_view,
- time_t dtstart,
- time_t dtend,
- gboolean all_day,
- gboolean meeting);
-void e_calendar_view_new_appointment (ECalendarView *cal_view);
-void e_calendar_view_edit_appointment (ECalendarView *cal_view,
- ECal *client,
- icalcomponent *icalcomp,
- gboolean meeting);
-
-G_END_DECLS
-
-#endif
diff --git a/calendar/gui/e-calendar-marshal.list b/calendar/gui/e-calendar-marshal.list
deleted file mode 100644
index 86087cf1ae..0000000000
--- a/calendar/gui/e-calendar-marshal.list
+++ /dev/null
@@ -1,15 +0,0 @@
-NONE:INT
-NONE:POINTER
-NONE:INT,STRING
-NONE:INT,BOOL
-NONE:INT,POINTER
-NONE:STRING,INT
-NONE:INT,INT
-NONE:ENUM,ENUM
-NONE:ENUM,STRING
-NONE:STRING,BOOL,INT,INT
-NONE:STRING,STRING
-NONE:STRING,STRING,STRING
-NONE:POINTER,ENUM
-NONE:POINTER,STRING
-NONE:POINTER,POINTER
diff --git a/calendar/gui/e-calendar-table-config.c b/calendar/gui/e-calendar-table-config.c
deleted file mode 100644
index 74be72143f..0000000000
--- a/calendar/gui/e-calendar-table-config.c
+++ /dev/null
@@ -1,263 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
- * JP Rosevear <jpr@ximian.com>
- *
- * Copyright 2003, Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 "calendar-config.h"
-#include "e-cell-date-edit-config.h"
-#include "e-calendar-table-config.h"
-
-struct _ECalendarTableConfigPrivate {
- ECalendarTable *table;
-
- ECellDateEditConfig *cell_config;
-
- GList *notifications;
-};
-
-static GObjectClass *parent_class = NULL;
-
-/* Property IDs */
-enum props {
- PROP_0,
- PROP_TABLE
-};
-
-static void
-e_calendar_table_config_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
-{
- ECalendarTableConfig *table_config;
- ECalendarTableConfigPrivate *priv;
-
- table_config = E_CALENDAR_TABLE_CONFIG (object);
- priv = table_config->priv;
-
- switch (property_id) {
- case PROP_TABLE:
- e_calendar_table_config_set_table (table_config, g_value_get_object (value));
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- break;
- }
-}
-
-static void
-e_calendar_table_config_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
-{
- ECalendarTableConfig *table_config;
- ECalendarTableConfigPrivate *priv;
-
- table_config = E_CALENDAR_TABLE_CONFIG (object);
- priv = table_config->priv;
-
- switch (property_id) {
- case PROP_TABLE:
- g_value_set_object (value, e_calendar_table_config_get_table (table_config));
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- break;
- }
-}
-
-static void
-e_calendar_table_config_dispose (GObject *object)
-{
- ECalendarTableConfig *table_config = E_CALENDAR_TABLE_CONFIG (object);
- ECalendarTableConfigPrivate *priv;
-
- priv = table_config->priv;
-
- e_calendar_table_config_set_table (table_config, NULL);
-
- if (G_OBJECT_CLASS (parent_class)->dispose)
- G_OBJECT_CLASS (parent_class)->dispose (object);
-}
-
-static void
-e_calendar_table_config_finalize (GObject *object)
-{
- ECalendarTableConfig *table_config = E_CALENDAR_TABLE_CONFIG (object);
- ECalendarTableConfigPrivate *priv;
-
- priv = table_config->priv;
-
- g_free (priv);
-
- if (G_OBJECT_CLASS (parent_class)->finalize)
- G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-static void
-e_calendar_table_config_class_init (ECalendarTableConfigClass *klass)
-{
- GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- GParamSpec *spec;
-
- parent_class = g_type_class_peek_parent (klass);
-
- /* Method override */
- gobject_class->set_property = e_calendar_table_config_set_property;
- gobject_class->get_property = e_calendar_table_config_get_property;
- gobject_class->dispose = e_calendar_table_config_dispose;
- gobject_class->finalize = e_calendar_table_config_finalize;
-
- spec = g_param_spec_object ("table", NULL, NULL, e_calendar_table_get_type (),
- G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT);
- g_object_class_install_property (gobject_class, PROP_TABLE, spec);
-}
-
-static void
-e_calendar_table_config_init (ECalendarTableConfig *table_config, ECalendarTableConfigClass *klass)
-{
- table_config->priv = g_new0 (ECalendarTableConfigPrivate, 1);
-
-}
-
-E_MAKE_TYPE (e_calendar_table_config, "ECalendarTableConfig", ECalendarTableConfig, e_calendar_table_config_class_init,
- e_calendar_table_config_init, G_TYPE_OBJECT);
-
-ECalendarTableConfig *
-e_calendar_table_config_new (ECalendarTable *table)
-{
- ECalendarTableConfig *table_config;
-
- table_config = g_object_new (e_calendar_table_config_get_type (), "table", table, NULL);
-
- return table_config;
-}
-
-ECalendarTable *
-e_calendar_table_config_get_table (ECalendarTableConfig *table_config)
-{
- ECalendarTableConfigPrivate *priv;
-
- g_return_val_if_fail (table_config != NULL, NULL);
- g_return_val_if_fail (E_IS_CALENDAR_TABLE_CONFIG (table_config), NULL);
-
- priv = table_config->priv;
-
- return priv->table;
-}
-
-static void
-set_timezone (ECalendarTable *table)
-{
- ECalModel *model;
- char *location;
- icaltimezone *zone;
-
- location = calendar_config_get_timezone ();
- zone = icaltimezone_get_builtin_timezone (location);
- if (!zone)
- zone = icaltimezone_get_utc_timezone ();
-
- model = e_calendar_table_get_model (table);
- if (model)
- e_cal_model_set_timezone (model, zone);
-
- g_free (location);
-}
-
-static void
-timezone_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- ECalendarTableConfig *table_config = data;
- ECalendarTableConfigPrivate *priv;
-
- priv = table_config->priv;
-
- set_timezone (priv->table);
-}
-
-static void
-set_twentyfour_hour (ECalendarTable *table)
-{
- ECalModel *model;
- gboolean use_24_hour;
-
- use_24_hour = calendar_config_get_24_hour_format ();
-
- model = e_calendar_table_get_model (table);
- if (model)
- e_cal_model_set_use_24_hour_format (model, use_24_hour);
-}
-
-static void
-twentyfour_hour_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- ECalendarTableConfig *table_config = data;
- ECalendarTableConfigPrivate *priv;
-
- priv = table_config->priv;
-
- set_twentyfour_hour (priv->table);
-}
-
-void
-e_calendar_table_config_set_table (ECalendarTableConfig *table_config, ECalendarTable *table)
-{
- ECalendarTableConfigPrivate *priv;
- guint not;
- GList *l;
-
- g_return_if_fail (table_config != NULL);
- g_return_if_fail (E_IS_CALENDAR_TABLE_CONFIG (table_config));
-
- priv = table_config->priv;
-
- if (priv->table) {
- g_object_unref (priv->table);
- priv->table = NULL;
- }
-
- if (priv->cell_config) {
- g_object_unref (priv->cell_config);
- priv->cell_config = NULL;
- }
-
- for (l = priv->notifications; l; l = l->next)
- calendar_config_remove_notification (GPOINTER_TO_UINT (l->data));
-
- g_list_free (priv->notifications);
- priv->notifications = NULL;
-
- /* If the new view is NULL, return right now */
- if (!table)
- return;
-
- priv->table = g_object_ref (table);
-
- /* Time zone */
- set_timezone (table);
-
- not = calendar_config_add_notification_timezone (timezone_changed_cb, table_config);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
- /* 24 Hour format */
- set_twentyfour_hour (table);
-
- not = calendar_config_add_notification_24_hour_format (twentyfour_hour_changed_cb, table_config);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
- /* Date cell */
- priv->cell_config = e_cell_date_edit_config_new (table->dates_cell);
-}
diff --git a/calendar/gui/e-calendar-table-config.h b/calendar/gui/e-calendar-table-config.h
deleted file mode 100644
index 399f3254d1..0000000000
--- a/calendar/gui/e-calendar-table-config.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
- * JP Rosevear <jpr@ximian.com>
- *
- * Copyright 2003, Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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_CONFIG_H_
-#define _E_CALENDAR_TABLE_CONFIG_H_
-
-#include "e-calendar-table.h"
-
-G_BEGIN_DECLS
-
-#define E_CALENDAR_TABLE_CONFIG(obj) GTK_CHECK_CAST (obj, e_calendar_table_config_get_type (), ECalendarTableConfig)
-#define E_CALENDAR_TABLE_CONFIG_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, e_calendar_table_config_get_type (), ECalendarTableConfigClass)
-#define E_IS_CALENDAR_TABLE_CONFIG(obj) GTK_CHECK_TYPE (obj, e_calendar_table_config_get_type ())
-
-typedef struct _ECalendarTableConfig ECalendarTableConfig;
-typedef struct _ECalendarTableConfigClass ECalendarTableConfigClass;
-typedef struct _ECalendarTableConfigPrivate ECalendarTableConfigPrivate;
-
-struct _ECalendarTableConfig {
- GObject parent;
-
- ECalendarTableConfigPrivate *priv;
-};
-
-struct _ECalendarTableConfigClass {
- GObjectClass parent_class;
-};
-
-GType e_calendar_table_config_get_type (void);
-ECalendarTableConfig *e_calendar_table_config_new (ECalendarTable *table);
-ECalendarTable *e_calendar_table_config_get_table (ECalendarTableConfig *view_config);
-void e_calendar_table_config_set_table (ECalendarTableConfig *view_config, ECalendarTable *table);
-
-G_END_DECLS
-
-#endif
diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c
deleted file mode 100644
index d9ea59905b..0000000000
--- a/calendar/gui/e-calendar-table.c
+++ /dev/null
@@ -1,1464 +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, 2001, 2002, 2003 Novell, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 ECalComponent 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/widgets/e-gui-utils.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 <e-util/e-dialog-utils.h>
-#include <widgets/misc/e-cell-date-edit.h>
-#include <widgets/misc/e-cell-percent.h>
-
-#include "calendar-component.h"
-#include "calendar-config.h"
-#include "dialogs/delete-comp.h"
-#include "dialogs/delete-error.h"
-#include "dialogs/task-editor.h"
-#include "e-cal-model-tasks.h"
-#include "e-calendar-table.h"
-#include "e-cell-date-edit-text.h"
-#include "e-comp-editor-registry.h"
-#include "print.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"
-
-extern ECompEditorRegistry *comp_editor_registry;
-
-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_show_popup_menu (ETable *table,
- GdkEvent *gdk_event,
- ECalendarTable *cal_table);
-
-static gint e_calendar_table_on_right_click (ETable *table,
- gint row,
- gint col,
- GdkEvent *event,
- ECalendarTable *cal_table);
-static gboolean e_calendar_table_on_popup_menu (GtkWidget *widget,
- gpointer data);
-
-static void e_calendar_table_on_open_task (GtkWidget *menuitem,
- gpointer data);
-static void e_calendar_table_on_save_as (GtkWidget *menuitem,
- gpointer data);
-static void e_calendar_table_on_print_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 void e_calendar_table_on_assign (GtkWidget *menuitem,
- gpointer data);
-static void e_calendar_table_on_forward (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 struct tm e_calendar_table_get_current_time (ECellDateEdit *ecde,
- gpointer data);
-static void mark_row_complete_cb (int model_row, 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;
-
-E_MAKE_TYPE (e_calendar_table, "ECalendarTable", ECalendarTable, e_calendar_table_class_init,
- e_calendar_table_init, GTK_TYPE_TABLE);
-
-static void
-e_calendar_table_class_init (ECalendarTableClass *class)
-{
- GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
-
- parent_class = g_type_class_peek_parent (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 ECalComponents, but I think it
- * may just be passed pointers to the 2 cell values.
- */
-static gint
-task_compare_cb (gconstpointer a, gconstpointer b)
-{
- ECalComponent *ca, *cb;
- ECalComponentDateTime due_a, due_b;
- int *prio_a, *prio_b;
- int retval;
-
- ca = E_CAL_COMPONENT (a);
- cb = E_CAL_COMPONENT (b);
-
- e_cal_component_get_due (ca, &due_a);
- e_cal_component_get_due (cb, &due_b);
- e_cal_component_get_priority (ca, &prio_a);
- e_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
- ECal, 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);
-
- e_cal_component_free_datetime (&due_a);
- e_cal_component_free_datetime (&due_b);
-
- if (prio_a)
- e_cal_component_free_priority (prio_a);
-
- if (prio_b)
- e_cal_component_free_priority (prio_b);
-
- return retval;
-}
-
-static gint
-date_compare_cb (gconstpointer a, gconstpointer b)
-{
- ECellDateEditValue *dv1 = (ECellDateEditValue *) a;
- ECellDateEditValue *dv2 = (ECellDateEditValue *) b;
- struct icaltimetype tt;
-
- /* First check if either is NULL. NULL dates sort last. */
- if (!dv1 || !dv2) {
- if (dv1 == dv2)
- return 0;
- else if (dv1)
- return -1;
- else
- return 1;
- }
-
- /* Copy the 2nd value and convert it to the same timezone as the
- first. */
- tt = dv2->tt;
-
- icaltimezone_convert_time (&tt, dv2->zone, dv1->zone);
-
- /* Now we can compare them. */
-
- return icaltime_compare (dv1->tt, tt);
-}
-
-static gint
-percent_compare_cb (gconstpointer a, gconstpointer b)
-{
- int percent1 = GPOINTER_TO_INT (a);
- int percent2 = GPOINTER_TO_INT (b);
- int retval;
-
- if (percent1 > percent2)
- retval = 1;
- else if (percent1 < percent2)
- retval = -1;
- else
- retval = 0;
-
- return retval;
-}
-
-static gint
-priority_compare_cb (gconstpointer a, gconstpointer b)
-{
- int priority1, priority2;
-
- priority1 = e_cal_util_priority_from_string ((const char*) a);
- priority2 = e_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 = (ECalModel *) e_cal_model_tasks_new ();
-
- /* Create the header columns */
-
- extras = e_table_extras_new();
-
- /*
- * Normal string fields.
- */
- cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT);
- g_object_set (G_OBJECT (cell),
- "strikeout_column", E_CAL_MODEL_TASKS_FIELD_COMPLETE,
- "bold_column", E_CAL_MODEL_TASKS_FIELD_OVERDUE,
- "color_column", E_CAL_MODEL_FIELD_COLOR,
- NULL);
-
- e_table_extras_add_cell (extras, "calstring", cell);
-
-
- /*
- * Date fields.
- */
- cell = e_cell_date_edit_text_new (NULL, GTK_JUSTIFY_LEFT);
- g_object_set (G_OBJECT (cell),
- "strikeout_column", E_CAL_MODEL_TASKS_FIELD_COMPLETE,
- "bold_column", E_CAL_MODEL_TASKS_FIELD_OVERDUE,
- "color_column", E_CAL_MODEL_FIELD_COLOR,
- NULL);
-
- popup_cell = e_cell_date_edit_new ();
- e_cell_popup_set_child (E_CELL_POPUP (popup_cell), cell);
- g_object_unref (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);
- g_object_set (G_OBJECT (cell),
- "strikeout_column", E_CAL_MODEL_TASKS_FIELD_COMPLETE,
- "bold_column", E_CAL_MODEL_TASKS_FIELD_OVERDUE,
- "color_column", E_CAL_MODEL_FIELD_COLOR,
- "editable", FALSE,
- NULL);
-
- popup_cell = e_cell_combo_new ();
- e_cell_popup_set_child (E_CELL_POPUP (popup_cell), cell);
- g_object_unref (cell);
-
- strings = NULL;
- strings = g_list_append (strings, (char*) _("Public"));
- strings = g_list_append (strings, (char*) _("Private"));
- strings = g_list_append (strings, (char*) _("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);
- g_object_set (G_OBJECT (cell),
- "strikeout_column", E_CAL_MODEL_TASKS_FIELD_COMPLETE,
- "bold_column", E_CAL_MODEL_TASKS_FIELD_OVERDUE,
- "color_column", E_CAL_MODEL_FIELD_COLOR,
- "editable", FALSE,
- NULL);
-
- popup_cell = e_cell_combo_new ();
- e_cell_popup_set_child (E_CELL_POPUP (popup_cell), cell);
- g_object_unref (cell);
-
- strings = NULL;
- strings = g_list_append (strings, (char*) _("High"));
- strings = g_list_append (strings, (char*) _("Normal"));
- strings = g_list_append (strings, (char*) _("Low"));
- strings = g_list_append (strings, (char*) _("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_percent_new (NULL, GTK_JUSTIFY_LEFT);
- g_object_set (G_OBJECT (cell),
- "strikeout_column", E_CAL_MODEL_TASKS_FIELD_COMPLETE,
- "bold_column", E_CAL_MODEL_TASKS_FIELD_OVERDUE,
- "color_column", E_CAL_MODEL_FIELD_COLOR,
- NULL);
-
- popup_cell = e_cell_combo_new ();
- e_cell_popup_set_child (E_CELL_POPUP (popup_cell), cell);
- g_object_unref (cell);
-
- strings = NULL;
- strings = g_list_append (strings, (char*) _("0%"));
- strings = g_list_append (strings, (char*) _("10%"));
- strings = g_list_append (strings, (char*) _("20%"));
- strings = g_list_append (strings, (char*) _("30%"));
- strings = g_list_append (strings, (char*) _("40%"));
- strings = g_list_append (strings, (char*) _("50%"));
- strings = g_list_append (strings, (char*) _("60%"));
- strings = g_list_append (strings, (char*) _("70%"));
- strings = g_list_append (strings, (char*) _("80%"));
- strings = g_list_append (strings, (char*) _("90%"));
- strings = g_list_append (strings, (char*) _("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);
- g_object_set (G_OBJECT (cell),
- "strikeout_column", E_CAL_MODEL_TASKS_FIELD_COMPLETE,
- "bold_column", E_CAL_MODEL_TASKS_FIELD_OVERDUE,
- "color_column", E_CAL_MODEL_FIELD_COLOR,
- "editable", FALSE,
- NULL);
-
- popup_cell = e_cell_combo_new ();
- e_cell_popup_set_child (E_CELL_POPUP (popup_cell), cell);
- g_object_unref (cell);
-
- strings = NULL;
- strings = g_list_append (strings, (char*) _("Free"));
- strings = g_list_append (strings, (char*) _("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);
- g_object_set (G_OBJECT (cell),
- "strikeout_column", E_CAL_MODEL_TASKS_FIELD_COMPLETE,
- "bold_column", E_CAL_MODEL_TASKS_FIELD_OVERDUE,
- "color_column", E_CAL_MODEL_FIELD_COLOR,
- "editable", FALSE,
- NULL);
-
- popup_cell = e_cell_combo_new ();
- e_cell_popup_set_child (E_CELL_POPUP (popup_cell), cell);
- g_object_unref (cell);
-
- strings = NULL;
- strings = g_list_append (strings, (char*) _("Not Started"));
- strings = g_list_append (strings, (char*) _("In Progress"));
- strings = g_list_append (strings, (char*) _("Completed"));
- strings = g_list_append (strings, (char*) _("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);
- /* FIXME: this causes a message from GLib about 'extras' having only a floating
- reference */
- /* g_object_unref (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));
- g_signal_connect (e_table, "double_click", G_CALLBACK (e_calendar_table_on_double_click), cal_table);
- g_signal_connect (e_table, "right_click", G_CALLBACK (e_calendar_table_on_right_click), cal_table);
- g_signal_connect (e_table, "key_press", G_CALLBACK (e_calendar_table_on_key_press), cal_table);
- g_signal_connect (e_table, "popup_menu", G_CALLBACK (e_calendar_table_on_popup_menu), 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);
- g_signal_connect (cal_table->invisible, "selection_get",
- G_CALLBACK (selection_get), cal_table);
- g_signal_connect (cal_table->invisible, "selection_clear_event",
- G_CALLBACK (selection_clear_event), cal_table);
- g_signal_connect (cal_table->invisible, "selection_received",
- G_CALLBACK (selection_received), 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 (g_object_new (e_calendar_table_get_type (), NULL));
-
- 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.
- **/
-ECalModel *
-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);
-
- if (cal_table->model) {
- g_object_unref (cal_table->model);
- cal_table->model = NULL;
- }
-
- if (cal_table->invisible) {
- gtk_widget_destroy (cal_table->invisible);
- cal_table->invisible = NULL;
- }
- 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));
-}
-
-/**
- * e_calendar_table_complete_selected:
- * @cal_table: A calendar table
- *
- * Marks the selected items as completed
- **/
-void
-e_calendar_table_complete_selected (ECalendarTable *cal_table)
-{
- ETable *etable;
-
- 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));
- e_table_selected_row_foreach (etable, mark_row_complete_cb, cal_table);
-}
-
-/* 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 ECalModelComponent *
-get_selected_comp (ECalendarTable *cal_table)
-{
- ETable *etable;
- int row;
-
- etable = e_table_scrolled_get_table (E_TABLE_SCROLLED (cal_table->etable));
- if (e_table_selected_count (etable) != 1)
- return NULL;
-
- row = -1;
- e_table_selected_row_foreach (etable,
- get_selected_row_cb,
- &row);
- g_assert (row != -1);
-
- return e_cal_model_get_component_at (cal_table->model, row);
-}
-
-struct get_selected_uids_closure {
- ECalendarTable *cal_table;
- GSList *objects;
-};
-
-/* 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;
- ECalModelComponent *comp_data;
-
- closure = data;
-
- comp_data = e_cal_model_get_component_at (closure->cal_table->model, model_row);
-
- closure->objects = g_slist_prepend (closure->objects, comp_data);
-}
-
-static GSList *
-get_selected_objects (ECalendarTable *cal_table)
-{
- struct get_selected_uids_closure closure;
- ETable *etable;
-
- closure.cal_table = cal_table;
- closure.objects = 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.objects;
-}
-
-/* Deletes all of the selected components in the table */
-static void
-delete_selected_components (ECalendarTable *cal_table)
-{
- GSList *objs, *l;
-
- objs = get_selected_objects (cal_table);
-
- e_calendar_table_set_status_message (cal_table, _("Deleting selected objects"));
-
- for (l = objs; l; l = l->next) {
- ECalModelComponent *comp_data = (ECalModelComponent *) l->data;
- GError *error = NULL;
-
- e_cal_remove_object (comp_data->client,
- icalcomponent_get_uid (comp_data->icalcomp), &error);
- delete_error_dialog (error, E_CAL_COMPONENT_TODO);
- g_clear_error (&error);
- }
-
- e_calendar_table_set_status_message (cal_table, NULL);
-
- g_slist_free (objs);
-}
-
-/**
- * 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;
- ECalModelComponent *comp_data;
- ECalComponent *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);
- if (n_selected <= 0)
- return;
-
- if (n_selected == 1)
- comp_data = get_selected_comp (cal_table);
- else
- comp_data = NULL;
-
- /* FIXME: this may be something other than a TODO component */
-
- comp = e_cal_component_new ();
- if (comp_data)
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp));
-
- if (delete_component_dialog (comp, FALSE, n_selected, E_CAL_COMPONENT_TODO,
- GTK_WIDGET (cal_table)))
- delete_selected_components (cal_table);
-
- /* free memory */
- g_object_unref (comp);
-}
-
-/**
- * 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;
- ECalModelComponent *comp_data;
- gchar *comp_str;
- icalcomponent *child;
-
- cal_table = E_CALENDAR_TABLE (data);
-
- g_return_if_fail (cal_table->tmp_vcal != NULL);
-
- comp_data = e_cal_model_get_component_at (cal_table->model, model_row);
- if (!comp_data)
- return;
-
- /* add timezones to the VCALENDAR component */
- e_cal_util_add_timezones_from_component (cal_table->tmp_vcal, comp_data->icalcomp);
-
- /* add the new component to the VCALENDAR component */
- comp_str = icalcomponent_as_ical_string (comp_data->icalcomp);
- child = icalparser_parse_string (comp_str);
- if (child) {
- icalcomponent_add_component (cal_table->tmp_vcal,
- icalcomponent_new_clone (child));
- icalcomponent_free (child);
- }
-}
-
-/**
- * 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 = e_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, ECalModelComponent *comp_data, gboolean assign)
-{
- CompEditor *tedit;
- const char *uid;
-
- uid = icalcomponent_get_uid (comp_data->icalcomp);
-
- tedit = e_comp_editor_registry_find (comp_editor_registry, uid);
- if (tedit == NULL) {
- ECalComponent *comp;
-
- tedit = COMP_EDITOR (task_editor_new (comp_data->client));
-
- comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp));
- comp_editor_edit_comp (tedit, comp);
- if (assign)
- task_editor_show_assignment (TASK_EDITOR (tedit));
-
- e_comp_editor_registry_add (comp_editor_registry, tedit, FALSE);
- }
-
- comp_editor_focus (tedit);
-}
-
-/* Opens the task in the specified row */
-static void
-open_task_by_row (ECalendarTable *cal_table, int row)
-{
- ECalModelComponent *comp_data;
-
- comp_data = e_cal_model_get_component_at (cal_table->model, row);
- open_task (cal_table, comp_data, FALSE);
-}
-
-static void
-e_calendar_table_on_double_click (ETable *table,
- gint row,
- gint col,
- GdkEvent *event,
- ECalendarTable *cal_table)
-{
- 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);
- e_cal_model_tasks_mark_task_complete (E_CAL_MODEL_TASKS (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);
-}
-
-/* Opens the URL of the task */
-static void
-open_url_cb (GtkWidget *menuitem, gpointer data)
-{
- ECalendarTable *cal_table;
- ECalModelComponent *comp_data;
- icalproperty *prop;
-
- cal_table = E_CALENDAR_TABLE (data);
-
- comp_data = get_selected_comp (cal_table);
- if (!comp_data)
- return;
-
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_URL_PROPERTY);
- if (!prop)
- return;
-
- gnome_url_show (icalproperty_get_url (prop), NULL);
-}
-
-/* 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. */
- MASK_EDITABLE = 1 << 2, /* For commands disabled in read-only folders */
- MASK_ASSIGNABLE = 1 << 3, /* For non-task assignable backends */
- MASK_LACKS_URL = 1 << 4 /* For tasks that don't have the URL property set */
-};
-
-
-static EPopupMenu tasks_popup_menu [] = {
- E_POPUP_ITEM (N_("_Open"), GTK_SIGNAL_FUNC (e_calendar_table_on_open_task), MASK_SINGLE),
- E_POPUP_ITEM (N_("Open _Web Page"), GTK_SIGNAL_FUNC (open_url_cb), MASK_SINGLE | MASK_LACKS_URL),
- E_POPUP_ITEM (N_("_Save As..."), GTK_SIGNAL_FUNC (e_calendar_table_on_save_as), MASK_SINGLE),
- E_POPUP_ITEM (N_("_Print..."), GTK_SIGNAL_FUNC (e_calendar_table_on_print_task), MASK_SINGLE),
-
- E_POPUP_SEPARATOR,
-
- E_POPUP_ITEM (N_("C_ut"), GTK_SIGNAL_FUNC (e_calendar_table_on_cut), MASK_EDITABLE),
- E_POPUP_ITEM (N_("_Copy"), GTK_SIGNAL_FUNC (e_calendar_table_on_copy), 0),
- E_POPUP_ITEM (N_("_Paste"), GTK_SIGNAL_FUNC (e_calendar_table_on_paste), MASK_EDITABLE),
-
- E_POPUP_SEPARATOR,
-
- E_POPUP_ITEM (N_("_Assign Task"), GTK_SIGNAL_FUNC (e_calendar_table_on_assign), MASK_SINGLE | MASK_EDITABLE | MASK_ASSIGNABLE),
- E_POPUP_ITEM (N_("_Forward as iCalendar"), GTK_SIGNAL_FUNC (e_calendar_table_on_forward), MASK_SINGLE),
- E_POPUP_ITEM (N_("_Mark as Complete"), GTK_SIGNAL_FUNC (mark_as_complete_cb), MASK_SINGLE | MASK_EDITABLE),
- E_POPUP_ITEM (N_("_Mark Selected Tasks as Complete"), GTK_SIGNAL_FUNC (mark_as_complete_cb), MASK_MULTIPLE | MASK_EDITABLE),
-
- E_POPUP_SEPARATOR,
-
- E_POPUP_ITEM (N_("_Delete"), GTK_SIGNAL_FUNC (delete_cb), MASK_SINGLE | MASK_EDITABLE),
- E_POPUP_ITEM (N_("_Delete Selected Tasks"), GTK_SIGNAL_FUNC (delete_cb), MASK_MULTIPLE | MASK_EDITABLE),
-
- E_POPUP_TERMINATOR
-};
-
-static void
-setup_popup_icons (EPopupMenu *context_menu)
-{
- gint i;
-
- for (i = 0; context_menu[i].name; i++) {
- GtkWidget *pixmap_widget = NULL;
-
- if (!strcmp (context_menu[i].name, _("_Copy")))
- pixmap_widget = gtk_image_new_from_stock (GTK_STOCK_COPY, GTK_ICON_SIZE_MENU);
- else if (!strcmp (context_menu[i].name, _("C_ut")))
- pixmap_widget = gtk_image_new_from_stock (GTK_STOCK_CUT, GTK_ICON_SIZE_MENU);
- else if (!strcmp (context_menu[i].name, _("_Delete")) ||
- !strcmp (context_menu[i].name, _("_Delete Selected Tasks")))
- pixmap_widget = gtk_image_new_from_stock (GTK_STOCK_DELETE, GTK_ICON_SIZE_MENU);
- else if (!strcmp (context_menu[i].name, _("_Open")))
- pixmap_widget = gtk_image_new_from_stock (GTK_STOCK_OPEN, GTK_ICON_SIZE_MENU);
- else if (!strcmp (context_menu[i].name, _("_Paste")))
- pixmap_widget = gtk_image_new_from_stock (GTK_STOCK_PASTE, GTK_ICON_SIZE_MENU);
- else if (!strcmp (context_menu[i].name, _("_Print...")))
- pixmap_widget = gtk_image_new_from_stock (GTK_STOCK_PRINT, GTK_ICON_SIZE_MENU);
- else if (!strcmp (context_menu[i].name, _("_Save As...")))
- pixmap_widget = gtk_image_new_from_stock (GTK_STOCK_SAVE_AS, GTK_ICON_SIZE_MENU);
-
- if (pixmap_widget)
- gtk_widget_show (pixmap_widget);
- context_menu[i].pixmap_widget = pixmap_widget;
- }
-}
-
-static gint
-e_calendar_table_show_popup_menu (ETable *table,
- GdkEvent *gdk_event,
- ECalendarTable *cal_table)
-{
- int n_selected;
- int hide_mask = 0;
- int disable_mask = 0;
- GtkMenu *gtk_menu;
- icalproperty *prop;
- ECalModelComponent *comp_data;
- gboolean read_only = TRUE;
-
- n_selected = e_table_selected_count (table);
- if (n_selected <= 0)
- return TRUE;
-
- comp_data = get_selected_comp (cal_table);
- g_assert (comp_data != NULL);
-
- if (n_selected == 1) {
- hide_mask = MASK_MULTIPLE;
-
- /* See if the task has the URL property set */
-
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_URL_PROPERTY);
- if (!prop)
- disable_mask |= MASK_LACKS_URL;
- } else
- hide_mask = MASK_SINGLE;
-
- e_cal_is_read_only (comp_data->client, &read_only, NULL);
- if (read_only)
- disable_mask |= MASK_EDITABLE;
-
- if (e_cal_get_static_capability (comp_data->client, CAL_STATIC_CAPABILITY_NO_TASK_ASSIGNMENT))
- disable_mask |= MASK_ASSIGNABLE;
-
- setup_popup_icons (tasks_popup_menu);
- gtk_menu = e_popup_menu_create (tasks_popup_menu, disable_mask,
- hide_mask, cal_table);
-
- e_popup_menu (gtk_menu, gdk_event);
-
- return TRUE;
-}
-
-static gint
-e_calendar_table_on_right_click (ETable *table,
- gint row,
- gint col,
- GdkEvent *event,
- ECalendarTable *cal_table)
-{
- return e_calendar_table_show_popup_menu (table, event, cal_table);
-}
-
-static gboolean
-e_calendar_table_on_popup_menu (GtkWidget *widget, gpointer data)
-{
- ETable *table = E_TABLE(widget);
- g_return_val_if_fail(table, FALSE);
-
- return e_calendar_table_show_popup_menu (table, NULL,
- E_CALENDAR_TABLE(data));
-}
-
-static void
-e_calendar_table_on_open_task (GtkWidget *menuitem,
- gpointer data)
-{
- ECalendarTable *cal_table;
- ECalModelComponent *comp_data;
-
- cal_table = E_CALENDAR_TABLE (data);
-
- comp_data = get_selected_comp (cal_table);
- if (comp_data)
- open_task (cal_table, comp_data, FALSE);
-}
-
-static void
-e_calendar_table_on_save_as (GtkWidget *widget, gpointer data)
-{
- ECalendarTable *cal_table;
- ECalModelComponent *comp_data;
- char *filename;
- char *ical_string;
- FILE *file;
-
- cal_table = E_CALENDAR_TABLE (data);
-
- comp_data = get_selected_comp (cal_table);
- if (comp_data == NULL)
- return;
-
- filename = e_file_dialog_save (_("Save as..."));
- if (filename == NULL)
- return;
-
- ical_string = e_cal_get_component_as_string (comp_data->client, comp_data->icalcomp);
- if (ical_string == NULL) {
- g_warning ("Couldn't convert item to a string");
- return;
- }
-
- file = fopen (filename, "w");
- if (file == NULL) {
- g_warning ("Couldn't save item");
- return;
- }
-
- fprintf (file, ical_string);
- g_free (ical_string);
- fclose (file);
-}
-
-static void
-e_calendar_table_on_print_task (GtkWidget *widget, gpointer data)
-{
- ECalendarTable *cal_table;
- ECalModelComponent *comp_data;
- ECalComponent *comp;
-
- cal_table = E_CALENDAR_TABLE (data);
-
- comp_data = get_selected_comp (cal_table);
- if (comp_data == NULL)
- return;
-
- comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp));
- print_comp (comp, comp_data->client, FALSE);
-
- g_object_unref (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 void
-e_calendar_table_on_assign (GtkWidget *widget, gpointer data)
-{
- ECalendarTable *cal_table;
- ECalModelComponent *comp_data;
-
- cal_table = E_CALENDAR_TABLE (data);
-
- comp_data = get_selected_comp (cal_table);
- if (comp_data)
- open_task (cal_table, comp_data, TRUE);
-}
-
-static void
-e_calendar_table_on_forward (GtkWidget *widget, gpointer data)
-{
- ECalendarTable *cal_table;
- ECalModelComponent *comp_data;
-
- cal_table = E_CALENDAR_TABLE (data);
-
- comp_data = get_selected_comp (cal_table);
- if (comp_data) {
- ECalComponent *comp;
-
- comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp));
- itip_send_comp (E_CAL_COMPONENT_METHOD_PUBLISH, comp, comp_data->client, NULL);
-
- g_object_unref (comp);
- }
-}
-
-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
-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;
- ECalComponent *comp;
- ECal *client;
- 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;
- }
-
- client = e_cal_model_get_default_client (cal_table->model);
-
- e_calendar_table_set_status_message (cal_table, _("Updating objects"));
-
- 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) {
- ECalComponent *tmp_comp;
-
- uid = e_cal_component_gen_uid ();
- tmp_comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (
- tmp_comp, icalcomponent_new_clone (subcomp));
- e_cal_component_set_uid (tmp_comp, uid);
- free (uid);
-
- /* FIXME should we convert start/due/complete times? */
- /* FIXME Error handling */
- e_cal_create_object (client, e_cal_component_get_icalcomponent (tmp_comp), NULL, NULL);
-
- g_object_unref (tmp_comp);
- }
- subcomp = icalcomponent_get_next_component (
- vcal_comp, ICAL_ANY_COMPONENT);
- }
- }
- else {
- comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomp);
- uid = e_cal_component_gen_uid ();
- e_cal_component_set_uid (comp, (const char *) uid);
- free (uid);
-
- e_cal_create_object (client, e_cal_component_get_icalcomponent (comp), NULL, NULL);
-
- g_object_unref (comp);
- }
-
- e_calendar_table_set_status_message (cal_table, NULL);
-}
-
-
-/* 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
-
-/* Displays messages on the status bar */
-#define EVOLUTION_TASKS_PROGRESS_IMAGE "evolution-tasks-mini.png"
-static GdkPixbuf *progress_icon = NULL;
-
-void
-e_calendar_table_set_status_message (ECalendarTable *cal_table, const gchar *message)
-{
- EActivityHandler *activity_handler = calendar_component_peek_activity_handler (calendar_component_peek ());
-
- g_return_if_fail (E_IS_CALENDAR_TABLE (cal_table));
-
- if (!message || !*message) {
- if (cal_table->activity_id != 0) {
- e_activity_handler_operation_finished (activity_handler, cal_table->activity_id);
- cal_table->activity_id = 0;
- }
- } else if (cal_table->activity_id == 0) {
- char *client_id = g_strdup_printf ("%p", cal_table);
-
- if (progress_icon == NULL)
- progress_icon = gdk_pixbuf_new_from_file (EVOLUTION_IMAGESDIR "/" EVOLUTION_TASKS_PROGRESS_IMAGE, NULL);
-
- cal_table->activity_id = e_activity_handler_operation_started (activity_handler, client_id,
- progress_icon, message, TRUE);
-
- g_free (client_id);
- } else {
- e_activity_handler_operation_progressing (activity_handler, cal_table->activity_id, message, -1.0);
- }
-}
diff --git a/calendar/gui/e-calendar-table.etspec b/calendar/gui/e-calendar-table.etspec
deleted file mode 100644
index 2d87771d53..0000000000
--- a/calendar/gui/e-calendar-table.etspec
+++ /dev/null
@@ -1,25 +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" priority="-1"/>
- <ETableColumn model_col="4" _title="Description" expansion="2.0" minimum_width="10" resizable="true" cell="calstring" compare="string" priority="-1"/>
- <ETableColumn model_col= "5" _title="Start Date" expansion="2.0" minimum_width="10" resizable="true" cell="dateedit" compare="date-compare" priority="-2"/>
- <ETableColumn model_col="6" _title="Alarms" expansion="1.0" minimum_width="10" resizable="true" cell="calstring" compare="string" disabled="true"/>
- <ETableColumn model_col="7" pixbuf="icon" _title="Type" expansion="1.0" minimum_width="16" resizable="false" cell="icon" compare="integer" priority="-4"/>
- <ETableColumn model_col= "8" _title="Summary" expansion="3.0" minimum_width="10" resizable="true" cell="calstring" compare="string" priority="10"/>
- <ETableColumn model_col= "10" _title="Completion Date" expansion="2.0" minimum_width="10" resizable="true" cell="dateedit" compare="date-compare" priority="-2"/>
- <ETableColumn model_col="11" pixbuf="complete" _title="Complete" expansion="1.0" minimum_width="16" resizable="false" cell="checkbox" compare="integer" priority="-4"/>
- <ETableColumn model_col= "12" _title="Due Date" expansion="2.0" minimum_width="10" resizable="true" cell="dateedit" compare="date-compare" priority="-2"/>
- <ETableColumn model_col= "13" _title="Geographical Position" expansion="1.0" minimum_width="10" resizable="true" cell="calstring" compare="string"/>
- <ETableColumn model_col= "15" _title="% Complete" expansion="1.0" minimum_width="10" resizable="true" cell="percent" compare="percent-compare" priority="-3"/>
- <ETableColumn model_col= "16" _title="Priority" expansion="1.0" minimum_width="10" resizable="true" cell="priority" compare="priority-compare" priority="-3"/>
- <ETableColumn model_col="17" _title="Status" expansion="1.0" minimum_width="10" resizable="true" cell="calstatus" compare="string" priority="-1"/>
- <ETableColumn model_col="18" _title="URL" expansion="2.0" minimum_width="10" resizable="true" cell="calstring" compare="string"/>
- <ETableColumn model_col="19" _title="Task sort" cell="task-sort" compare="task-sort" priority="-4"/>
-
- <ETableState>
- <column source="7"/>
- <column source="11"/>
- <column source= "8"/>
- <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 810c78254b..0000000000
--- a/calendar/gui/e-calendar-table.h
+++ /dev/null
@@ -1,101 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 "e-cal-model.h"
-
-G_BEGIN_DECLS
-
-/*
- * 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 */
- ECalModel *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;
-
- /* Activity ID for the EActivityHandler (i.e. the status bar). */
- guint activity_id;
-};
-
-struct _ECalendarTableClass {
- GtkTableClass parent_class;
-};
-
-
-GtkType e_calendar_table_get_type (void);
-GtkWidget* e_calendar_table_new (void);
-
-ECalModel *e_calendar_table_get_model (ECalendarTable *cal_table);
-
-ETable *e_calendar_table_get_table (ECalendarTable *cal_table);
-
-void e_calendar_table_complete_selected (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);
-
-void e_calendar_table_set_status_message (ECalendarTable *cal_table,
- const gchar *message);
-
-G_END_DECLS
-
-#endif /* _E_CALENDAR_TABLE_H_ */
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c
deleted file mode 100644
index f93cee6c10..0000000000
--- a/calendar/gui/e-calendar-view.c
+++ /dev/null
@@ -1,1492 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Rodrigo Moya <rodrigo@ximian.com>
- *
- * Copyright 2003, Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include <config.h>
-#include <string.h>
-#include <gtk/gtkimage.h>
-#include <gtk/gtkstock.h>
-#include <libgnome/gnome-i18n.h>
-#include <gal/util/e-util.h>
-#include "e-util/e-dialog-utils.h"
-#include "e-calendar-marshal.h"
-#include <libecal/e-cal-time-util.h>
-
-#include "calendar-commands.h"
-#include "calendar-component.h"
-#include "calendar-config.h"
-#include "comp-util.h"
-#include "e-cal-model-calendar.h"
-#include "e-cal-view.h"
-#include "e-comp-editor-registry.h"
-#include "itip-utils.h"
-#include "dialogs/delete-comp.h"
-#include "dialogs/delete-error.h"
-#include "dialogs/event-editor.h"
-#include "dialogs/send-comp.h"
-#include "dialogs/cancel-comp.h"
-#include "dialogs/recur-comp.h"
-#include "print.h"
-#include "goto.h"
-#include "ea-calendar.h"
-
-/* Used for the status bar messages */
-#define EVOLUTION_CALENDAR_PROGRESS_IMAGE "evolution-calendar-mini.png"
-static GdkPixbuf *progress_icon = NULL;
-
-struct _ECalendarViewPrivate {
- /* The GnomeCalendar we are associated to */
- GnomeCalendar *calendar;
-
- /* The calendar model we are monitoring */
- ECalModel *model;
-
- /* Current activity (for the EActivityHandler, i.e. the status bar). */
- guint activity_id;
-
- /* clipboard selections */
- gchar *clipboard_selection;
-
- /* The popup menu */
- EPopupMenu *view_menu;
-
- /* The default category */
- char *default_category;
-};
-
-static void e_calendar_view_class_init (ECalendarViewClass *klass);
-static void e_calendar_view_init (ECalendarView *cal_view, ECalendarViewClass *klass);
-static void e_calendar_view_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
-static void e_calendar_view_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
-static void e_calendar_view_destroy (GtkObject *object);
-
-static GObjectClass *parent_class = NULL;
-static GdkAtom clipboard_atom = GDK_NONE;
-extern ECompEditorRegistry *comp_editor_registry;
-
-/* Property IDs */
-enum props {
- PROP_0,
- PROP_MODEL,
-};
-
-/* FIXME Why are we emitting these event signals here? Can't the model just be listened to? */
-/* Signal IDs */
-enum {
- SELECTION_CHANGED,
- SELECTED_TIME_CHANGED,
- TIMEZONE_CHANGED,
- EVENT_CHANGED,
- EVENT_ADDED,
- LAST_SIGNAL
-};
-
-static guint e_calendar_view_signals[LAST_SIGNAL] = { 0 };
-
-static void
-e_calendar_view_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
-{
- ECalendarView *cal_view;
- ECalendarViewPrivate *priv;
-
- cal_view = E_CALENDAR_VIEW (object);
- priv = cal_view->priv;
-
- switch (property_id) {
- case PROP_MODEL:
- e_calendar_view_set_model (cal_view, E_CAL_MODEL (g_value_get_object (value)));
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- break;
- }
-}
-
-static void
-e_calendar_view_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
-{
- ECalendarView *cal_view;
- ECalendarViewPrivate *priv;
-
- cal_view = E_CALENDAR_VIEW (object);
- priv = cal_view->priv;
-
- switch (property_id) {
- case PROP_MODEL:
- g_value_set_object (value, e_calendar_view_get_model (cal_view));
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- break;
- }
-}
-
-static void
-e_calendar_view_class_init (ECalendarViewClass *klass)
-{
- GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- GtkObjectClass *object_class = GTK_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_peek_parent (klass);
-
- /* Method override */
- gobject_class->set_property = e_calendar_view_set_property;
- gobject_class->get_property = e_calendar_view_get_property;
- object_class->destroy = e_calendar_view_destroy;
-
- klass->selection_changed = NULL;
- klass->selected_time_changed = NULL;
- klass->event_changed = NULL;
- klass->event_added = NULL;
-
- klass->get_selected_events = NULL;
- klass->get_selected_time_range = NULL;
- klass->set_selected_time_range = NULL;
- klass->get_visible_time_range = NULL;
- klass->update_query = NULL;
-
- g_object_class_install_property (gobject_class, PROP_MODEL,
- g_param_spec_object ("model", NULL, NULL, E_TYPE_CAL_MODEL,
- G_PARAM_READABLE | G_PARAM_WRITABLE
- | G_PARAM_CONSTRUCT));
-
- /* Create class' signals */
- e_calendar_view_signals[SELECTION_CHANGED] =
- g_signal_new ("selection_changed",
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ECalendarViewClass, selection_changed),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
- e_calendar_view_signals[SELECTED_TIME_CHANGED] =
- g_signal_new ("selected_time_changed",
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ECalendarViewClass, selected_time_changed),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
- e_calendar_view_signals[TIMEZONE_CHANGED] =
- g_signal_new ("timezone_changed",
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ECalendarViewClass, timezone_changed),
- NULL, NULL,
- e_calendar_marshal_VOID__POINTER_POINTER,
- G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_POINTER);
-
- e_calendar_view_signals[EVENT_CHANGED] =
- g_signal_new ("event_changed",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
- G_STRUCT_OFFSET (ECalendarViewClass, event_changed),
- NULL, NULL,
- g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1,
- G_TYPE_POINTER);
-
- e_calendar_view_signals[EVENT_ADDED] =
- g_signal_new ("event_added",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
- G_STRUCT_OFFSET (ECalendarViewClass, event_added),
- NULL, NULL,
- g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1,
- G_TYPE_POINTER);
-
- /* clipboard atom */
- if (!clipboard_atom)
- clipboard_atom = gdk_atom_intern ("CLIPBOARD", FALSE);
-
- /* init the accessibility support for e_day_view */
- e_cal_view_a11y_init ();
-}
-
-static void
-model_changed_cb (ETableModel *etm, gpointer user_data)
-{
- ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
-
- e_calendar_view_update_query (cal_view);
-}
-
-static void
-model_row_changed_cb (ETableModel *etm, int row, gpointer user_data)
-{
- ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
-
- e_calendar_view_update_query (cal_view);
-}
-
-static void
-model_cell_changed_cb (ETableModel *etm, int col, int row, gpointer user_data)
-{
- ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
-
- e_calendar_view_update_query (cal_view);
-}
-
-static void
-model_rows_changed_cb (ETableModel *etm, int row, int count, gpointer user_data)
-{
- ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
-
- e_calendar_view_update_query (cal_view);
-}
-
-void
-e_calendar_view_add_event (ECalendarView *cal_view, ECal *client, time_t dtstart,
- icaltimezone *default_zone, icalcomponent *icalcomp, gboolean in_top_canvas)
-{
- ECalComponent *comp;
- struct icaltimetype itime, old_dtstart, old_dtend;
- time_t tt_start, tt_end, new_dtstart;
- struct icaldurationtype ic_dur;
- char *uid;
- gint start_offset, end_offset;
- gboolean all_day_event;
-
- start_offset = 0;
- end_offset = 0;
-
- old_dtstart = icalcomponent_get_dtstart (icalcomp);
- tt_start = icaltime_as_timet (old_dtstart);
- old_dtend = icalcomponent_get_dtend (icalcomp);
- tt_end = icaltime_as_timet (old_dtend);
- ic_dur = icaldurationtype_from_int (tt_end - tt_start);
-
- if (icaldurationtype_as_int (ic_dur) > 60*60*24) {
- /* This is a long event */
- start_offset = old_dtstart.hour * 60 + old_dtstart.minute;
- end_offset = old_dtstart.hour * 60 + old_dtend.minute;
- }
-
- if (start_offset == 0 && end_offset == 0 && in_top_canvas)
- all_day_event = TRUE;
- else
- all_day_event = FALSE;
-
- if (in_top_canvas)
- new_dtstart = dtstart + start_offset * 60;
- else
- new_dtstart = dtstart;
-
- itime = icaltime_from_timet_with_zone (new_dtstart, FALSE, default_zone);
- if (all_day_event)
- itime.is_date = TRUE;
- icalcomponent_set_dtstart (icalcomp, itime);
-
- itime = icaltime_add (itime, ic_dur);
- if (all_day_event)
- itime.is_date = TRUE;
- icalcomponent_set_dtend (icalcomp, itime);
-
- /* FIXME The new uid stuff can go away once we actually set it in the backend */
- uid = e_cal_component_gen_uid ();
- comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (
- comp, icalcomponent_new_clone (icalcomp));
- e_cal_component_set_uid (comp, uid);
-
- /* FIXME Error handling */
- if (e_cal_create_object (client, e_cal_component_get_icalcomponent (comp), NULL, NULL)) {
- if (itip_organizer_is_user (comp, client) &&
- send_component_dialog ((GtkWindow *) gtk_widget_get_toplevel (GTK_WIDGET (cal_view)),
- client, comp, TRUE)) {
- itip_send_comp (E_CAL_COMPONENT_METHOD_REQUEST, comp,
- client, NULL);
- }
- } else {
- g_message (G_STRLOC ": Could not create the object!");
- }
-
- free (uid);
- g_object_unref (comp);
-}
-
-static void
-e_calendar_view_init (ECalendarView *cal_view, ECalendarViewClass *klass)
-{
- cal_view->priv = g_new0 (ECalendarViewPrivate, 1);
-
- cal_view->priv->model = (ECalModel *) e_cal_model_calendar_new ();
- g_signal_connect (G_OBJECT (cal_view->priv->model), "model_changed",
- G_CALLBACK (model_changed_cb), cal_view);
- g_signal_connect (G_OBJECT (cal_view->priv->model), "model_row_changed",
- G_CALLBACK (model_row_changed_cb), cal_view);
- g_signal_connect (G_OBJECT (cal_view->priv->model), "model_cell_changed",
- G_CALLBACK (model_cell_changed_cb), cal_view);
- g_signal_connect (G_OBJECT (cal_view->priv->model), "model_rows_inserted",
- G_CALLBACK (model_rows_changed_cb), cal_view);
- g_signal_connect (G_OBJECT (cal_view->priv->model), "model_rows_deleted",
- G_CALLBACK (model_rows_changed_cb), cal_view);
-
- cal_view->priv->clipboard_selection = NULL;
-}
-
-static void
-e_calendar_view_destroy (GtkObject *object)
-{
- ECalendarView *cal_view = (ECalendarView *) object;
-
- g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
-
- if (cal_view->priv) {
- if (cal_view->priv->model) {
- g_signal_handlers_disconnect_matched (cal_view->priv->model,
- G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL, cal_view);
- g_object_unref (cal_view->priv->model);
- cal_view->priv->model = NULL;
- }
-
- if (cal_view->priv->clipboard_selection) {
- g_free (cal_view->priv->clipboard_selection);
- cal_view->priv->clipboard_selection = NULL;
- }
-
- if (cal_view->priv->default_category) {
- g_free (cal_view->priv->default_category);
- cal_view->priv->default_category = NULL;
- }
-
- g_free (cal_view->priv);
- cal_view->priv = NULL;
- }
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- GTK_OBJECT_CLASS (parent_class)->destroy (object);
-}
-
-E_MAKE_TYPE (e_calendar_view, "ECalendarView", ECalendarView, e_calendar_view_class_init,
- e_calendar_view_init, GTK_TYPE_TABLE);
-
-GnomeCalendar *
-e_calendar_view_get_calendar (ECalendarView *cal_view)
-{
- g_return_val_if_fail (E_IS_CALENDAR_VIEW (cal_view), NULL);
-
- return cal_view->priv->calendar;
-}
-
-void
-e_calendar_view_set_calendar (ECalendarView *cal_view, GnomeCalendar *calendar)
-{
- g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
-
- cal_view->priv->calendar = calendar;
-}
-
-ECalModel *
-e_calendar_view_get_model (ECalendarView *cal_view)
-{
- g_return_val_if_fail (E_IS_CALENDAR_VIEW (cal_view), NULL);
-
- return cal_view->priv->model;
-}
-
-void
-e_calendar_view_set_model (ECalendarView *cal_view, ECalModel *model)
-{
- g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
- g_return_if_fail (E_IS_CAL_MODEL (model));
-
- if (cal_view->priv->model) {
- g_signal_handlers_disconnect_matched (cal_view->priv->model, G_SIGNAL_MATCH_DATA,
- 0, 0, 0, NULL, cal_view);
- g_object_unref (cal_view->priv->model);
- }
-
- cal_view->priv->model = model;
- g_object_ref (cal_view->priv->model);
- g_signal_connect (G_OBJECT (cal_view->priv->model), "model_changed", G_CALLBACK (model_changed_cb), cal_view);
- g_signal_connect (G_OBJECT (cal_view->priv->model), "model_row_changed", G_CALLBACK (model_row_changed_cb), cal_view);
- g_signal_connect (G_OBJECT (cal_view->priv->model), "model_cell_changed", G_CALLBACK (model_cell_changed_cb), cal_view);
- g_signal_connect (G_OBJECT (cal_view->priv->model), "model_rows_inserted", G_CALLBACK (model_rows_changed_cb), cal_view);
- g_signal_connect (G_OBJECT (cal_view->priv->model), "model_rows_deleted", G_CALLBACK (model_rows_changed_cb), cal_view);
-
- e_calendar_view_update_query (cal_view);
-}
-
-icaltimezone *
-e_calendar_view_get_timezone (ECalendarView *cal_view)
-{
- g_return_val_if_fail (E_IS_CALENDAR_VIEW (cal_view), NULL);
- return e_cal_model_get_timezone (cal_view->priv->model);
-}
-
-void
-e_calendar_view_set_timezone (ECalendarView *cal_view, icaltimezone *zone)
-{
- icaltimezone *old_zone;
-
- g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
-
- old_zone = e_cal_model_get_timezone (cal_view->priv->model);
- if (old_zone == zone)
- return;
-
- e_cal_model_set_timezone (cal_view->priv->model, zone);
- g_signal_emit (G_OBJECT (cal_view), e_calendar_view_signals[TIMEZONE_CHANGED], 0,
- old_zone, zone);
-}
-
-const char *
-e_calendar_view_get_default_category (ECalendarView *cal_view)
-{
- g_return_val_if_fail (E_IS_CALENDAR_VIEW (cal_view), NULL);
- return (const char *) cal_view->priv->default_category;
-}
-
-/**
- * e_calendar_view_set_default_category
- * @cal_view: A calendar 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 given calendar view.
- */
-void
-e_calendar_view_set_default_category (ECalendarView *cal_view, const char *category)
-{
- g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
-
- if (cal_view->priv->default_category)
- g_free (cal_view->priv->default_category);
-
- cal_view->priv->default_category = g_strdup (category);
-}
-
-/**
- * e_calendar_view_get_use_24_hour_format:
- * @cal_view: A calendar view.
- *
- * Gets whether the view is using 24 hour times or not.
- *
- * Returns: the 24 hour setting.
- */
-gboolean
-e_calendar_view_get_use_24_hour_format (ECalendarView *cal_view)
-{
- g_return_val_if_fail (E_IS_CALENDAR_VIEW (cal_view), FALSE);
-
- return e_cal_model_get_use_24_hour_format (cal_view->priv->model);
-}
-
-/**
- * e_calendar_view_set_use_24_hour_format
- * @cal_view: A calendar view.
- * @use_24_hour: Whether to use 24 hour times or not.
- *
- * Sets the 12/24 hour times setting for the given view.
- */
-void
-e_calendar_view_set_use_24_hour_format (ECalendarView *cal_view, gboolean use_24_hour)
-{
- g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
-
- e_cal_model_set_use_24_hour_format (cal_view->priv->model, use_24_hour);
-}
-
-void
-e_calendar_view_set_status_message (ECalendarView *cal_view, const gchar *message)
-{
- EActivityHandler *activity_handler = calendar_component_peek_activity_handler (calendar_component_peek ());
-
- g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
-
- if (!message || !*message) {
- if (cal_view->priv->activity_id != 0) {
- e_activity_handler_operation_finished (activity_handler, cal_view->priv->activity_id);
- cal_view->priv->activity_id = 0;
- }
- } else if (cal_view->priv->activity_id == 0) {
- char *client_id = g_strdup_printf ("%p", cal_view);
-
- if (progress_icon == NULL)
- progress_icon = gdk_pixbuf_new_from_file (EVOLUTION_IMAGESDIR "/" EVOLUTION_CALENDAR_PROGRESS_IMAGE, NULL);
-
- cal_view->priv->activity_id = e_activity_handler_operation_started (activity_handler, client_id, progress_icon, message, TRUE);
-
- g_free (client_id);
- } else {
- e_activity_handler_operation_progressing (activity_handler, cal_view->priv->activity_id, message, -1.0);
- }
-}
-
-GList *
-e_calendar_view_get_selected_events (ECalendarView *cal_view)
-{
- g_return_val_if_fail (E_IS_CALENDAR_VIEW (cal_view), NULL);
-
- if (E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->get_selected_events)
- return E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->get_selected_events (cal_view);
-
- return NULL;
-}
-
-void
-e_calendar_view_get_selected_time_range (ECalendarView *cal_view, time_t *start_time, time_t *end_time)
-{
- g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
-
- if (E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->get_selected_time_range) {
- E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->get_selected_time_range (
- cal_view, start_time, end_time);
- }
-}
-
-void
-e_calendar_view_set_selected_time_range (ECalendarView *cal_view, time_t start_time, time_t end_time)
-{
- g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
-
- if (E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->set_selected_time_range) {
- E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->set_selected_time_range (
- cal_view, start_time, end_time);
- }
-}
-
-gboolean
-e_calendar_view_get_visible_time_range (ECalendarView *cal_view, time_t *start_time, time_t *end_time)
-{
- g_return_val_if_fail (E_IS_CALENDAR_VIEW (cal_view), FALSE);
-
- if (E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->get_visible_time_range) {
- return E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->get_visible_time_range (
- cal_view, start_time, end_time);
- }
-
- return FALSE;
-}
-
-void
-e_calendar_view_update_query (ECalendarView *cal_view)
-{
- g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
-
- e_calendar_view_set_status_message (cal_view, _("Searching"));
-
- if (E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->update_query) {
- E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->update_query (cal_view);
- }
-
- e_calendar_view_set_status_message (cal_view, NULL);
-}
-
-void
-e_calendar_view_cut_clipboard (ECalendarView *cal_view)
-{
- GList *selected, *l;
- const char *uid;
-
- g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
-
- selected = e_calendar_view_get_selected_events (cal_view);
- if (!selected)
- return;
-
- e_calendar_view_set_status_message (cal_view, _("Deleting selected objects"));
-
- e_calendar_view_copy_clipboard (cal_view);
- for (l = selected; l != NULL; l = l->next) {
- ECalComponent *comp;
- ECalendarViewEvent *event = (ECalendarViewEvent *) l->data;
- GError *error = NULL;
-
- if (!event)
- continue;
-
- comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
-
- if (itip_organizer_is_user (comp, event->comp_data->client)
- && cancel_component_dialog ((GtkWindow *) gtk_widget_get_toplevel (GTK_WIDGET (cal_view)),
- event->comp_data->client, comp, TRUE))
- itip_send_comp (E_CAL_COMPONENT_METHOD_CANCEL, comp,
- event->comp_data->client, NULL);
-
- e_cal_component_get_uid (comp, &uid);
- e_cal_remove_object (event->comp_data->client, uid, &error);
- delete_error_dialog (error, E_CAL_COMPONENT_EVENT);
-
- g_clear_error (&error);
-
- g_object_unref (comp);
- }
-
- e_calendar_view_set_status_message (cal_view, NULL);
-
- g_list_free (selected);
-}
-
-void
-e_calendar_view_copy_clipboard (ECalendarView *cal_view)
-{
- GList *selected, *l;
- gchar *comp_str;
- icalcomponent *vcal_comp;
- icalcomponent *new_icalcomp;
- ECalendarViewEvent *event;
-
- g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
-
- selected = e_calendar_view_get_selected_events (cal_view);
- if (!selected)
- return;
-
- /* create top-level VCALENDAR component and add VTIMEZONE's */
- vcal_comp = e_cal_util_new_top_level ();
- for (l = selected; l != NULL; l = l->next) {
- event = (ECalendarViewEvent *) l->data;
-
- if (event)
- e_cal_util_add_timezones_from_component (vcal_comp, event->comp_data->icalcomp);
- }
-
- for (l = selected; l != NULL; l = l->next) {
- event = (ECalendarViewEvent *) l->data;
-
- new_icalcomp = icalcomponent_new_clone (event->comp_data->icalcomp);
- icalcomponent_add_component (vcal_comp, new_icalcomp);
- }
-
- /* copy the VCALENDAR to the clipboard */
- comp_str = icalcomponent_as_ical_string (vcal_comp);
- if (cal_view->priv->clipboard_selection != NULL)
- g_free (cal_view->priv->clipboard_selection);
- cal_view->priv->clipboard_selection = g_strdup (comp_str);
- gtk_clipboard_set_text (gtk_widget_get_clipboard (GTK_WIDGET (cal_view), clipboard_atom),
- (const gchar *) comp_str,
- g_utf8_strlen (comp_str, -1));
-
- /* free memory */
- icalcomponent_free (vcal_comp);
- g_list_free (selected);
-}
-
-static void
-clipboard_get_text_cb (GtkClipboard *clipboard, const gchar *text, ECalendarView *cal_view)
-{
- char *default_tzid;
- icalcomponent *icalcomp;
- icalcomponent_kind kind;
- time_t selected_time_start, selected_time_end;
- icaltimezone *default_zone;
- ECal *client;
-
- g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
-
- icalcomp = icalparser_parse_string ((const char *) text);
- if (!icalcomp)
- return;
-
- default_tzid = calendar_config_get_timezone ();
-
- client = e_cal_model_get_default_client (cal_view->priv->model);
- /* FIXME Error checking */
- e_cal_get_timezone (client, default_tzid, &default_zone, NULL);
-
- /* check the type of the component */
- /* FIXME An error dialog if we return? */
- kind = icalcomponent_isa (icalcomp);
- if (kind != ICAL_VCALENDAR_COMPONENT && kind != ICAL_VEVENT_COMPONENT)
- return;
-
- e_calendar_view_set_status_message (cal_view, _("Updating objects"));
- e_calendar_view_get_selected_time_range (cal_view, &selected_time_start, &selected_time_end);
-
- /* FIXME Timezone handling */
- if (kind == ICAL_VCALENDAR_COMPONENT) {
- 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)
- e_calendar_view_add_event (cal_view, client, selected_time_start,
- default_zone, subcomp, FALSE);
- else if (child_kind == ICAL_VTIMEZONE_COMPONENT) {
- icaltimezone *zone;
-
- zone = icaltimezone_new ();
- icaltimezone_set_component (zone, subcomp);
- e_cal_add_timezone (client, zone, NULL);
-
- icaltimezone_free (zone, 1);
- }
-
- subcomp = icalcomponent_get_next_component (
- icalcomp, ICAL_ANY_COMPONENT);
- }
-
- icalcomponent_free (icalcomp);
-
- } else {
- e_calendar_view_add_event (cal_view, client, selected_time_start, default_zone, icalcomp, FALSE);
- }
-
- e_calendar_view_set_status_message (cal_view, NULL);
-}
-
-void
-e_calendar_view_paste_clipboard (ECalendarView *cal_view)
-{
- g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
-
- gtk_clipboard_request_text (gtk_widget_get_clipboard (GTK_WIDGET (cal_view), clipboard_atom),
- (GtkClipboardTextReceivedFunc) clipboard_get_text_cb, cal_view);
-}
-
-static void
-delete_event (ECalendarView *cal_view, ECalendarViewEvent *event)
-{
- ECalComponent *comp;
- ECalComponentVType vtype;
-
- comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
- vtype = e_cal_component_get_vtype (comp);
-
- if (delete_component_dialog (comp, FALSE, 1, vtype, GTK_WIDGET (cal_view))) {
- const char *uid;
- GError *error = NULL;
-
- if (itip_organizer_is_user (comp, event->comp_data->client)
- && cancel_component_dialog ((GtkWindow *) gtk_widget_get_toplevel (GTK_WIDGET (cal_view)),
- event->comp_data->client,
- comp, TRUE))
- itip_send_comp (E_CAL_COMPONENT_METHOD_CANCEL, comp,
- event->comp_data->client, NULL);
-
- e_cal_component_get_uid (comp, &uid);
- if (!uid || !*uid) {
- g_object_unref (comp);
- return;
- }
-
- e_cal_remove_object (event->comp_data->client, uid, &error);
- delete_error_dialog (error, E_CAL_COMPONENT_EVENT);
- g_clear_error (&error);
- }
-
- g_object_unref (comp);
-}
-
-void
-e_calendar_view_delete_selected_event (ECalendarView *cal_view)
-{
- GList *selected;
- ECalendarViewEvent *event;
-
- selected = e_calendar_view_get_selected_events (cal_view);
- if (!selected)
- return;
-
- event = (ECalendarViewEvent *) selected->data;
- if (event)
- delete_event (cal_view, event);
-
- g_list_free (selected);
-}
-
-void
-e_calendar_view_delete_selected_events (ECalendarView *cal_view)
-{
- GList *selected, *l;
- ECalendarViewEvent *event;
-
- selected = e_calendar_view_get_selected_events (cal_view);
- if (!selected)
- return;
-
- for (l = selected; l != NULL; l = l->next) {
- event = (ECalendarViewEvent *) l->data;
- if (event)
- delete_event (cal_view, event);
- }
-
- g_list_free (selected);
-}
-
-void
-e_calendar_view_delete_selected_occurrence (ECalendarView *cal_view)
-{
- ECalendarViewEvent *event;
- GList *selected;
- const char *uid;
- GError *error = NULL;
-
- selected = e_calendar_view_get_selected_events (cal_view);
- if (!selected)
- return;
-
- event = (ECalendarViewEvent *) selected->data;
-
- uid = icalcomponent_get_uid (event->comp_data->icalcomp);
- /* FIXME: use 'rid' argument */
- e_cal_remove_object_with_mod (event->comp_data->client, uid, NULL, CALOBJ_MOD_THIS, &error);
-
- delete_error_dialog (error, E_CAL_COMPONENT_EVENT);
- g_clear_error (&error);
-
- /* free memory */
- g_list_free (selected);
-}
-
-static void
-on_new_appointment (GtkWidget *widget, gpointer user_data)
-{
- ECalendarView *cal_view = (ECalendarView *) user_data;
-
- e_calendar_view_new_appointment (cal_view);
-}
-
-static void
-on_new_event (GtkWidget *widget, gpointer user_data)
-{
- time_t dtstart, dtend;
- ECalendarView *cal_view = (ECalendarView *) user_data;
-
- e_calendar_view_get_selected_time_range (cal_view, &dtstart, &dtend);
- e_calendar_view_new_appointment_for (cal_view, dtstart, dtend, TRUE, FALSE);
-}
-
-static void
-on_new_meeting (GtkWidget *widget, gpointer user_data)
-{
- time_t dtstart, dtend;
- ECalendarView *cal_view = (ECalendarView *) user_data;
-
- e_calendar_view_get_selected_time_range (cal_view, &dtstart, &dtend);
- e_calendar_view_new_appointment_for (cal_view, dtstart, dtend, FALSE, TRUE);
-}
-
-static void
-on_new_task (GtkWidget *widget, gpointer user_data)
-{
- ECalendarView *cal_view = (ECalendarView *) user_data;
- gnome_calendar_new_task (cal_view->priv->calendar);
-}
-
-static void
-on_goto_date (GtkWidget *widget, gpointer user_data)
-{
- ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
-
- goto_dialog (cal_view->priv->calendar);
-}
-
-static void
-on_goto_today (GtkWidget *widget, gpointer user_data)
-{
- ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
-
- calendar_goto_today (cal_view->priv->calendar);
-}
-
-static void
-on_edit_appointment (GtkWidget *widget, gpointer user_data)
-{
- GList *selected;
- ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
-
- selected = e_calendar_view_get_selected_events (cal_view);
- if (selected) {
- ECalendarViewEvent *event = (ECalendarViewEvent *) selected->data;
-
- if (event)
- e_calendar_view_edit_appointment (cal_view, event->comp_data->client,
- event->comp_data->icalcomp, FALSE);
-
- g_list_free (selected);
- }
-}
-
-static void
-on_print (GtkWidget *widget, gpointer user_data)
-{
- ECalendarView *cal_view;
- time_t start;
- GnomeCalendarViewType view_type;
- PrintView print_view;
-
- cal_view = E_CALENDAR_VIEW (user_data);
-
- e_calendar_view_get_visible_time_range (cal_view, &start, NULL);
- view_type = gnome_calendar_get_view (cal_view->priv->calendar);
-
- 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 (cal_view->priv->calendar, FALSE, start, print_view);
-}
-
-static void
-on_save_as (GtkWidget *widget, gpointer user_data)
-{
- ECalendarView *cal_view;
- GList *selected;
- char *filename;
- char *ical_string;
- FILE *file;
- ECalendarViewEvent *event;
-
- cal_view = E_CALENDAR_VIEW (user_data);
-
- selected = e_calendar_view_get_selected_events (cal_view);
- if (!selected)
- return;
-
- filename = e_file_dialog_save (_("Save as..."));
- if (filename == NULL)
- return;
-
- event = (ECalendarViewEvent *) selected->data;
- ical_string = e_cal_get_component_as_string (event->comp_data->client, event->comp_data->icalcomp);
- if (ical_string == NULL) {
- g_warning ("Couldn't convert item to a string");
- return;
- }
-
- file = fopen (filename, "w");
- if (file == NULL) {
- g_warning ("Couldn't save item");
- return;
- }
-
- fprintf (file, ical_string);
- g_free (ical_string);
- fclose (file);
-
- g_list_free (selected);
-}
-
-static void
-on_print_event (GtkWidget *widget, gpointer user_data)
-{
- ECalendarView *cal_view;
- GList *selected;
- ECalendarViewEvent *event;
- ECalComponent *comp;
-
- cal_view = E_CALENDAR_VIEW (user_data);
- selected = e_calendar_view_get_selected_events (cal_view);
- if (!selected)
- return;
-
- event = (ECalendarViewEvent *) selected->data;
-
- comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
- print_comp (comp, event->comp_data->client, FALSE);
-
- g_object_unref (comp);
-}
-
-static void
-on_meeting (GtkWidget *widget, gpointer user_data)
-{
- GList *selected;
- ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
-
- selected = e_calendar_view_get_selected_events (cal_view);
- if (selected) {
- ECalendarViewEvent *event = (ECalendarViewEvent *) selected->data;
- e_calendar_view_edit_appointment (cal_view, event->comp_data->client, event->comp_data->icalcomp, TRUE);
-
- g_list_free (selected);
- }
-}
-
-static void
-on_forward (GtkWidget *widget, gpointer user_data)
-{
- GList *selected;
- ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
-
- selected = e_calendar_view_get_selected_events (cal_view);
- if (selected) {
- ECalComponent *comp;
- ECalendarViewEvent *event = (ECalendarViewEvent *) selected->data;
-
- comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
- itip_send_comp (E_CAL_COMPONENT_METHOD_PUBLISH, comp, event->comp_data->client, NULL);
-
- g_list_free (selected);
- g_object_unref (comp);
- }
-}
-
-static void
-on_publish (GtkWidget *widget, gpointer user_data)
-{
- ECalendarView *cal_view;
- icaltimezone *utc;
- time_t start = time (NULL), end;
- GList *comp_list = NULL, *client_list, *cl;
-
- cal_view = E_CALENDAR_VIEW (user_data);
-
- utc = icaltimezone_get_utc_timezone ();
- start = time_day_begin_with_zone (start, utc);
- end = time_add_week_with_zone (start, 6, utc);
-
- client_list = e_cal_model_get_client_list (cal_view->priv->model);
- for (cl = client_list; cl != NULL; cl = cl->next) {
- if (e_cal_get_free_busy ((ECal *) cl->data, NULL, start, end, &comp_list, NULL)) {
- GList *l;
-
- for (l = comp_list; l; l = l->next) {
- ECalComponent *comp = E_CAL_COMPONENT (l->data);
- itip_send_comp (E_CAL_COMPONENT_METHOD_PUBLISH, comp, (ECal *) cl->data, NULL);
-
- g_object_unref (comp);
- }
-
- g_list_free (comp_list);
- }
- }
-
- g_list_free (client_list);
-}
-
-static void
-on_delete_appointment (GtkWidget *widget, gpointer user_data)
-{
- ECalendarView *cal_view;
-
- cal_view = E_CALENDAR_VIEW (user_data);
- e_calendar_view_delete_selected_event (cal_view);
-}
-
-static void
-on_delete_occurrence (GtkWidget *widget, gpointer user_data)
-{
- ECalendarView *cal_view;
-
- cal_view = E_CALENDAR_VIEW (user_data);
- e_calendar_view_delete_selected_occurrence (cal_view);
-}
-
-static void
-on_cut (GtkWidget *widget, gpointer user_data)
-{
- ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
-
- e_calendar_view_cut_clipboard (cal_view);
-}
-
-static void
-on_copy (GtkWidget *widget, gpointer user_data)
-{
- ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
-
- e_calendar_view_copy_clipboard (cal_view);
-}
-
-static void
-on_paste (GtkWidget *widget, gpointer user_data)
-{
- ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
-
- e_calendar_view_paste_clipboard (cal_view);
-}
-
-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,
-
- /*
- * This is used to when an event is already a meeting and
- * we want to disable the schedule meeting command
- */
- MASK_MEETING = 16,
-
- /*
- * To disable cut and copy for meetings the user is not the
- * organizer of
- */
- MASK_MEETING_ORGANIZER = 32,
-
- /*
- * To disable things not valid for instances
- */
- MASK_INSTANCE = 64
-};
-
-static EPopupMenu main_items [] = {
- E_POPUP_ITEM (N_("New _Appointment..."), GTK_SIGNAL_FUNC (on_new_appointment), MASK_EDITABLE),
- E_POPUP_ITEM (N_("New All Day _Event"), GTK_SIGNAL_FUNC (on_new_event), MASK_EDITABLE),
- E_POPUP_ITEM (N_("New Meeting"), GTK_SIGNAL_FUNC (on_new_meeting), MASK_EDITABLE),
- E_POPUP_ITEM (N_("New Task"), GTK_SIGNAL_FUNC (on_new_task), MASK_EDITABLE),
-
- E_POPUP_SEPARATOR,
-
- E_POPUP_ITEM (N_("_Print..."), GTK_SIGNAL_FUNC (on_print), 0),
-
- E_POPUP_SEPARATOR,
-
- E_POPUP_ITEM (N_("_Paste"), GTK_SIGNAL_FUNC (on_paste), MASK_EDITABLE),
-
- E_POPUP_SEPARATOR,
-
- E_POPUP_SUBMENU (N_("Current View"), NULL, 0),
-
- E_POPUP_ITEM (N_("Go to _Today"), GTK_SIGNAL_FUNC (on_goto_today), 0),
- E_POPUP_ITEM (N_("_Go to Date..."), GTK_SIGNAL_FUNC (on_goto_date), 0),
-
- E_POPUP_SEPARATOR,
-
- E_POPUP_ITEM (N_("_Publish Free/Busy Information"), GTK_SIGNAL_FUNC (on_publish), 0),
-
- E_POPUP_TERMINATOR
-};
-
-static EPopupMenu child_items [] = {
- E_POPUP_ITEM (N_("_Open"), GTK_SIGNAL_FUNC (on_edit_appointment), MASK_EDITING),
- E_POPUP_ITEM (N_("_Save As..."), GTK_SIGNAL_FUNC (on_save_as), MASK_EDITING),
- E_POPUP_ITEM (N_("_Print..."), GTK_SIGNAL_FUNC (on_print_event), MASK_EDITING),
-
- /* Only show this separator if one of the above is shown. */
- E_POPUP_SEPARATOR,
-
- E_POPUP_ITEM (N_("C_ut"), GTK_SIGNAL_FUNC (on_cut), MASK_EDITING | MASK_EDITABLE | MASK_MEETING_ORGANIZER),
- E_POPUP_ITEM (N_("_Copy"), GTK_SIGNAL_FUNC (on_copy), MASK_EDITING | MASK_MEETING_ORGANIZER),
- E_POPUP_ITEM (N_("_Paste"), GTK_SIGNAL_FUNC (on_paste), MASK_EDITABLE),
-
- E_POPUP_SEPARATOR,
-
- E_POPUP_ITEM (N_("_Schedule Meeting..."), GTK_SIGNAL_FUNC (on_meeting), MASK_EDITABLE | MASK_EDITING | MASK_MEETING),
- E_POPUP_ITEM (N_("_Forward as iCalendar..."), GTK_SIGNAL_FUNC (on_forward), MASK_EDITING),
-
- E_POPUP_SEPARATOR,
-
- E_POPUP_ITEM (N_("_Delete"), GTK_SIGNAL_FUNC (on_delete_appointment), MASK_EDITABLE | MASK_SINGLE | MASK_EDITING),
- E_POPUP_ITEM (N_("Delete this _Occurrence"), GTK_SIGNAL_FUNC (on_delete_occurrence), MASK_RECURRING | MASK_EDITING | MASK_EDITABLE),
- E_POPUP_ITEM (N_("Delete _All Occurrences"), GTK_SIGNAL_FUNC (on_delete_appointment), MASK_RECURRING | MASK_EDITING | MASK_EDITABLE),
-
- E_POPUP_TERMINATOR
-};
-
-static void
-free_view_popup (GtkWidget *widget, gpointer data)
-{
- ECalendarView *cal_view = E_CALENDAR_VIEW (data);
-
- if (cal_view->priv->view_menu == NULL)
- return;
-
- gnome_calendar_discard_view_popup (cal_view->priv->calendar, cal_view->priv->view_menu);
- cal_view->priv->view_menu = NULL;
-}
-
-static void
-setup_popup_icons (EPopupMenu *context_menu)
-{
- gint i;
-
- for (i = 0; context_menu[i].name; i++) {
- GtkWidget *pixmap_widget = NULL;
-
- if (!strcmp (context_menu[i].name, _("_Copy")))
- pixmap_widget = gtk_image_new_from_stock (GTK_STOCK_COPY, GTK_ICON_SIZE_MENU);
- else if (!strcmp (context_menu[i].name, _("C_ut")))
- pixmap_widget = gtk_image_new_from_stock (GTK_STOCK_CUT, GTK_ICON_SIZE_MENU);
- else if (!strcmp (context_menu[i].name, _("_Delete")) ||
- !strcmp (context_menu[i].name, _("Delete this _Occurrence")) ||
- !strcmp (context_menu[i].name, _("Delete _All Occurrences")))
- pixmap_widget = gtk_image_new_from_stock (GTK_STOCK_DELETE, GTK_ICON_SIZE_MENU);
- else if (!strcmp (context_menu[i].name, _("Go to _Today")))
- pixmap_widget = gtk_image_new_from_stock (GTK_STOCK_HOME, GTK_ICON_SIZE_MENU);
- else if (!strcmp (context_menu[i].name, _("_Go to Date...")))
- pixmap_widget = gtk_image_new_from_stock (GTK_STOCK_JUMP_TO, GTK_ICON_SIZE_MENU);
- else if (!strcmp (context_menu[i].name, _("New _Appointment...")))
- pixmap_widget = gtk_image_new_from_file (EVOLUTION_IMAGESDIR "/new_appointment.xpm");
- else if (!strcmp (context_menu[i].name, _("New All Day _Event")))
- pixmap_widget = gtk_image_new_from_file (EVOLUTION_IMAGESDIR "/new_all_day_event.png");
- else if (!strcmp (context_menu[i].name, _("New Meeting")))
- pixmap_widget = gtk_image_new_from_file (EVOLUTION_IMAGESDIR "/meeting-request-16.png");
- else if (!strcmp (context_menu[i].name, _("New Task")))
- pixmap_widget = gtk_image_new_from_file (EVOLUTION_IMAGESDIR "/new_task-16.png");
- else if (!strcmp (context_menu[i].name, _("_Open")))
- pixmap_widget = gtk_image_new_from_stock (GTK_STOCK_OPEN, GTK_ICON_SIZE_MENU);
- else if (!strcmp (context_menu[i].name, _("_Paste")))
- pixmap_widget = gtk_image_new_from_stock (GTK_STOCK_PASTE, GTK_ICON_SIZE_MENU);
- else if (!strcmp (context_menu[i].name, _("_Print...")))
- pixmap_widget = gtk_image_new_from_stock (GTK_STOCK_PRINT, GTK_ICON_SIZE_MENU);
- else if (!strcmp (context_menu[i].name, _("_Save As...")))
- pixmap_widget = gtk_image_new_from_stock (GTK_STOCK_SAVE_AS, GTK_ICON_SIZE_MENU);
- else if (!strcmp (context_menu[i].name, _("_Settings...")))
- pixmap_widget = gtk_image_new_from_stock (GTK_STOCK_PREFERENCES, GTK_ICON_SIZE_MENU);
-
- if (pixmap_widget)
- gtk_widget_show (pixmap_widget);
- context_menu[i].pixmap_widget = pixmap_widget;
- }
-}
-
-GtkMenu *
-e_calendar_view_create_popup_menu (ECalendarView *cal_view)
-{
- GList *selected;
- EPopupMenu *context_menu;
- guint32 disable_mask = 0, hide_mask = 0;
- GtkMenu *popup;
- ECal *client = NULL;
- gboolean read_only = TRUE;
-
- g_return_val_if_fail (E_IS_CALENDAR_VIEW (cal_view), NULL);
-
- /* get the selection */
- selected = e_calendar_view_get_selected_events (cal_view);
-
- if (selected == NULL) {
- cal_view->priv->view_menu = gnome_calendar_setup_view_popup (cal_view->priv->calendar);
- main_items[9].submenu = cal_view->priv->view_menu;
- context_menu = main_items;
-
- client = e_cal_model_get_default_client (cal_view->priv->model);
- } else {
- ECalendarViewEvent *event;
-
- context_menu = child_items;
-
- event = (ECalendarViewEvent *) selected->data;
- if (e_cal_util_component_has_recurrences (event->comp_data->icalcomp))
- hide_mask |= MASK_SINGLE;
- else
- hide_mask |= MASK_RECURRING;
-
- if (e_cal_util_component_is_instance (event->comp_data->icalcomp))
- hide_mask |= MASK_INSTANCE;
-
- if (e_cal_util_component_has_organizer (event->comp_data->icalcomp)) {
- ECalComponent *comp;
-
- disable_mask |= MASK_MEETING;
-
- comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
- if (!itip_organizer_is_user (comp, event->comp_data->client))
- disable_mask |= MASK_MEETING_ORGANIZER;
-
- g_object_unref (comp);
- }
-
- client = event->comp_data->client;
- }
-
- e_cal_is_read_only (client, &read_only, NULL);
- if (read_only)
- disable_mask |= MASK_EDITABLE;
-
- setup_popup_icons (context_menu);
- popup = e_popup_menu_create (context_menu, disable_mask, hide_mask, cal_view);
- g_signal_connect (popup, "selection-done", G_CALLBACK (free_view_popup), cal_view);
-
- return popup;
-}
-
-/**
- * e_calendar_view_new_appointment_for
- * @cal_view: A calendar view.
- * @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.
- * @meeting: Whether the appointment is a meeting or not.
- *
- * Opens an event editor dialog for a new appointment.
- */
-void
-e_calendar_view_new_appointment_for (ECalendarView *cal_view,
- time_t dtstart, time_t dtend,
- gboolean all_day,
- gboolean meeting)
-{
- ECalendarViewPrivate *priv;
- struct icaltimetype itt;
- ECalComponentDateTime dt;
- ECalComponent *comp;
- icalcomponent *icalcomp;
- ECalComponentTransparency transparency;
-
- g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
-
- priv = cal_view->priv;
-
- dt.value = &itt;
- if (all_day)
- dt.tzid = NULL;
- else
- dt.tzid = icaltimezone_get_tzid (e_cal_model_get_timezone (cal_view->priv->model));
-
- icalcomp = e_cal_model_create_component_with_defaults (priv->model);
- comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomp);
-
- /* DTSTART, DTEND */
- itt = icaltime_from_timet_with_zone (dtstart, FALSE, e_cal_model_get_timezone (cal_view->priv->model));
- if (all_day) {
- itt.hour = itt.minute = itt.second = 0;
- itt.is_date = TRUE;
- }
- e_cal_component_set_dtstart (comp, &dt);
-
- itt = icaltime_from_timet_with_zone (dtend, FALSE, e_cal_model_get_timezone (cal_view->priv->model));
- if (all_day) {
- /* We round it up to the end of the day, unless it is
- already set to midnight */
- if (itt.hour != 0 || itt.minute != 0 || itt.second != 0) {
- icaltime_adjust (&itt, 1, 0, 0, 0);
- }
- itt.hour = itt.minute = itt.second = 0;
- itt.is_date = TRUE;
- }
- e_cal_component_set_dtend (comp, &dt);
-
- /* TRANSPARENCY */
- transparency = all_day ? E_CAL_COMPONENT_TRANSP_TRANSPARENT
- : E_CAL_COMPONENT_TRANSP_OPAQUE;
- e_cal_component_set_transparency (comp, transparency);
-
- /* CATEGORY */
- e_cal_component_set_categories (comp, priv->default_category);
-
- /* edit the object */
- e_cal_component_commit_sequence (comp);
-
- e_calendar_view_edit_appointment (cal_view,
- e_cal_model_get_default_client (priv->model),
- icalcomp, meeting);
-
- g_object_unref (comp);
-}
-
-/**
- * e_calendar_view_new_appointment
- * @cal_view: A calendar view.
- *
- * 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 view.
- */
-void
-e_calendar_view_new_appointment (ECalendarView *cal_view)
-{
- time_t dtstart, dtend;
-
- g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
-
- e_calendar_view_get_selected_time_range (cal_view, &dtstart, &dtend);
- e_calendar_view_new_appointment_for (cal_view, dtstart, dtend, FALSE, FALSE);
-}
-
-/**
- * e_calendar_view_edit_appointment
- * @cal_view: A calendar view.
- * @client: Calendar client.
- * @icalcomp: The object to be edited.
- * @meeting: Whether the appointment is a meeting or not.
- *
- * Opens an editor window to allow the user to edit the selected
- * object.
- */
-void
-e_calendar_view_edit_appointment (ECalendarView *cal_view,
- ECal *client,
- icalcomponent *icalcomp,
- gboolean meeting)
-{
- ECalendarViewPrivate *priv;
- CompEditor *ce;
- const char *uid;
- ECalComponent *comp;
-
- g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
- g_return_if_fail (E_IS_CAL (client));
- g_return_if_fail (icalcomp != NULL);
-
- priv = cal_view->priv;
-
- uid = icalcomponent_get_uid (icalcomp);
-
- ce = e_comp_editor_registry_find (comp_editor_registry, uid);
- if (!ce) {
- EventEditor *ee;
-
- ee = event_editor_new (client);
- ce = COMP_EDITOR (ee);
-
- comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (icalcomp));
- comp_editor_edit_comp (ce, comp);
- if (meeting)
- event_editor_show_meeting (ee);
-
- e_comp_editor_registry_add (comp_editor_registry, ce, FALSE);
-
- g_object_unref (comp);
- }
-
- comp_editor_focus (ce);
-}
diff --git a/calendar/gui/e-calendar-view.h b/calendar/gui/e-calendar-view.h
deleted file mode 100644
index a1b11023b3..0000000000
--- a/calendar/gui/e-calendar-view.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Rodrigo Moya <rodrigo@ximian.com>
- *
- * Copyright 2003, Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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_VIEW_H_
-#define _E_CALENDAR_VIEW_H_
-
-#include <libecal/e-cal.h>
-#include <gtk/gtktable.h>
-#include "e-cal-model.h"
-#include "gnome-cal.h"
-
-G_BEGIN_DECLS
-
-/*
- * EView - base widget class for the calendar views.
- */
-
-#define E_CALENDAR_VIEW(obj) GTK_CHECK_CAST (obj, e_calendar_view_get_type (), ECalendarView)
-#define E_CALENDAR_VIEW_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, e_calendar_view_get_type (), ECalendarViewClass)
-#define E_IS_CALENDAR_VIEW(obj) GTK_CHECK_TYPE (obj, e_calendar_view_get_type ())
-
-typedef enum {
- E_CALENDAR_VIEW_POS_OUTSIDE,
- E_CALENDAR_VIEW_POS_NONE,
- E_CALENDAR_VIEW_POS_EVENT,
- E_CALENDAR_VIEW_POS_LEFT_EDGE,
- E_CALENDAR_VIEW_POS_RIGHT_EDGE,
- E_CALENDAR_VIEW_POS_TOP_EDGE,
- E_CALENDAR_VIEW_POS_BOTTOM_EDGE
-} ECalendarViewPosition;
-
-#define E_CALENDAR_VIEW_EVENT_FIELDS \
- GnomeCanvasItem *canvas_item; \
- ECalModelComponent *comp_data; \
- gboolean allocated_comp_data; \
- time_t start; \
- time_t end; \
- guint16 start_minute; \
- guint16 end_minute; \
- guint different_timezone : 1;
-
-typedef struct {
- E_CALENDAR_VIEW_EVENT_FIELDS
-} ECalendarViewEvent;
-
-typedef struct _ECalendarView ECalendarView;
-typedef struct _ECalendarViewClass ECalendarViewClass;
-typedef struct _ECalendarViewPrivate ECalendarViewPrivate;
-
-struct _ECalendarView {
- GtkTable table;
- ECalendarViewPrivate *priv;
-};
-
-struct _ECalendarViewClass {
- GtkTableClass parent_class;
-
- /* Notification signals */
- void (* selection_changed) (ECalendarView *cal_view);
- void (* selected_time_changed) (ECalendarView *cal_view);
- void (* timezone_changed) (ECalendarView *cal_view, icaltimezone *old_zone, icaltimezone *new_zone);
- void (* event_changed) (ECalendarView *day_view, ECalendarViewEvent *event);
- void (* event_added) (ECalendarView *day_view, ECalendarViewEvent *event);
-
- /* Virtual methods */
- GList * (* get_selected_events) (ECalendarView *cal_view); /* a GList of ECalendarViewEvent's */
- void (* get_selected_time_range) (ECalendarView *cal_view, time_t *start_time, time_t *end_time);
- void (* set_selected_time_range) (ECalendarView *cal_view, time_t start_time, time_t end_time);
- gboolean (* get_visible_time_range) (ECalendarView *cal_view, time_t *start_time, time_t *end_time);
- void (* update_query) (ECalendarView *cal_view);
-};
-
-GType e_calendar_view_get_type (void);
-
-GnomeCalendar *e_calendar_view_get_calendar (ECalendarView *cal_view);
-void e_calendar_view_set_calendar (ECalendarView *cal_view, GnomeCalendar *calendar);
-ECalModel *e_calendar_view_get_model (ECalendarView *cal_view);
-void e_calendar_view_set_model (ECalendarView *cal_view, ECalModel *model);
-icaltimezone *e_calendar_view_get_timezone (ECalendarView *cal_view);
-void e_calendar_view_set_timezone (ECalendarView *cal_view, icaltimezone *zone);
-const char *e_calendar_view_get_default_category (ECalendarView *cal_view);
-void e_calendar_view_set_default_category (ECalendarView *cal_view, const char *category);
-gboolean e_calendar_view_get_use_24_hour_format (ECalendarView *view);
-void e_calendar_view_set_use_24_hour_format (ECalendarView *view, gboolean use_24_hour);
-
-void e_calendar_view_set_status_message (ECalendarView *cal_view, const gchar *message);
-
-GList *e_calendar_view_get_selected_events (ECalendarView *cal_view);
-void e_calendar_view_get_selected_time_range (ECalendarView *cal_view, time_t *start_time, time_t *end_time);
-void e_calendar_view_set_selected_time_range (ECalendarView *cal_view, time_t start_time, time_t end_time);
-gboolean e_calendar_view_get_visible_time_range (ECalendarView *cal_view, time_t *start_time, time_t *end_time);
-void e_calendar_view_update_query (ECalendarView *cal_view);
-
-void e_calendar_view_cut_clipboard (ECalendarView *cal_view);
-void e_calendar_view_copy_clipboard (ECalendarView *cal_view);
-void e_calendar_view_paste_clipboard (ECalendarView *cal_view);
-void e_calendar_view_delete_selected_event (ECalendarView *cal_view);
-void e_calendar_view_delete_selected_events (ECalendarView *cal_view);
-void e_calendar_view_delete_selected_occurrence (ECalendarView *cal_view);
-
-GtkMenu *e_calendar_view_create_popup_menu (ECalendarView *cal_view);
-
-void e_calendar_view_add_event (ECalendarView *cal_view, ECal *client, time_t dtstart,
- icaltimezone *default_zone, icalcomponent *icalcomp, gboolean in_top_canvas);
-void e_calendar_view_new_appointment_for (ECalendarView *cal_view,
- time_t dtstart,
- time_t dtend,
- gboolean all_day,
- gboolean meeting);
-void e_calendar_view_new_appointment (ECalendarView *cal_view);
-void e_calendar_view_edit_appointment (ECalendarView *cal_view,
- ECal *client,
- icalcomponent *icalcomp,
- gboolean meeting);
-
-G_END_DECLS
-
-#endif
diff --git a/calendar/gui/e-cell-date-edit-config.c b/calendar/gui/e-cell-date-edit-config.c
deleted file mode 100644
index 8993e53d68..0000000000
--- a/calendar/gui/e-cell-date-edit-config.c
+++ /dev/null
@@ -1,339 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
- * JP Rosevear <jpr@ximian.com>
- *
- * Copyright 2003, Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 "calendar-config.h"
-#include "e-mini-calendar-config.h"
-#include "e-cell-date-edit-config.h"
-
-struct _ECellDateEditConfigPrivate {
- ECellDateEdit *cell;
-
- EMiniCalendarConfig *mini_config;
-
- GList *notifications;
-};
-
-static GObjectClass *parent_class = NULL;
-
-/* Property IDs */
-enum props {
- PROP_0,
- PROP_CELL,
-};
-
-static void
-e_cell_date_edit_config_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
-{
- ECellDateEditConfig *view_config;
- ECellDateEditConfigPrivate *priv;
-
- view_config = E_CELL_DATE_EDIT_CONFIG (object);
- priv = view_config->priv;
-
- switch (property_id) {
- case PROP_CELL:
- e_cell_date_edit_config_set_cell (view_config, g_value_get_object (value));
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- break;
- }
-}
-
-static void
-e_cell_date_edit_config_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
-{
- ECellDateEditConfig *view_config;
- ECellDateEditConfigPrivate *priv;
-
- view_config = E_CELL_DATE_EDIT_CONFIG (object);
- priv = view_config->priv;
-
- switch (property_id) {
- case PROP_CELL:
- g_value_set_object (value, e_cell_date_edit_config_get_cell (view_config));
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- break;
- }
-}
-
-static void
-e_cell_date_edit_config_dispose (GObject *object)
-{
- ECellDateEditConfig *view_config = E_CELL_DATE_EDIT_CONFIG (object);
- ECellDateEditConfigPrivate *priv;
-
- priv = view_config->priv;
-
- e_cell_date_edit_config_set_cell (view_config, NULL);
-
- if (G_OBJECT_CLASS (parent_class)->dispose)
- G_OBJECT_CLASS (parent_class)->dispose (object);
-}
-
-static void
-e_cell_date_edit_config_finalize (GObject *object)
-{
- ECellDateEditConfig *view_config = E_CELL_DATE_EDIT_CONFIG (object);
- ECellDateEditConfigPrivate *priv;
-
- priv = view_config->priv;
-
- g_free (priv);
-
- if (G_OBJECT_CLASS (parent_class)->finalize)
- G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-static void
-e_cell_date_edit_config_class_init (ECellDateEditConfigClass *klass)
-{
- GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- GParamSpec *spec;
-
- parent_class = g_type_class_peek_parent (klass);
-
- /* Method override */
- gobject_class->set_property = e_cell_date_edit_config_set_property;
- gobject_class->get_property = e_cell_date_edit_config_get_property;
- gobject_class->dispose = e_cell_date_edit_config_dispose;
- gobject_class->finalize = e_cell_date_edit_config_finalize;
-
- spec = g_param_spec_object ("cell", NULL, NULL, e_cell_date_edit_get_type (),
- G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT);
- g_object_class_install_property (gobject_class, PROP_CELL, spec);
-}
-
-static void
-e_cell_date_edit_config_init (ECellDateEditConfig *view_config, ECellDateEditConfigClass *klass)
-{
- view_config->priv = g_new0 (ECellDateEditConfigPrivate, 1);
-
-}
-
-E_MAKE_TYPE (e_cell_date_edit_config, "ECellDateEditConfig", ECellDateEditConfig, e_cell_date_edit_config_class_init,
- e_cell_date_edit_config_init, G_TYPE_OBJECT);
-
-ECellDateEditConfig *
-e_cell_date_edit_config_new (ECellDateEdit *cell)
-{
- ECellDateEditConfig *view_config;
-
- view_config = g_object_new (e_cell_date_edit_config_get_type (), "cell", cell, NULL);
-
- return view_config;
-}
-
-ECellDateEdit *
-e_cell_date_edit_config_get_cell (ECellDateEditConfig *view_config)
-{
- ECellDateEditConfigPrivate *priv;
-
- g_return_val_if_fail (view_config != NULL, NULL);
- g_return_val_if_fail (E_IS_CELL_DATE_EDIT_CONFIG (view_config), NULL);
-
- priv = view_config->priv;
-
- return priv->cell;
-}
-
-static void
-set_timezone (ECellDateEdit *cell)
-{
- ECellDateEditText *cell_text;
- ECellPopup *cell_popup;
- char *location;
- icaltimezone *zone;
-
- location = calendar_config_get_timezone ();
- zone = icaltimezone_get_builtin_timezone (location);
- if (!zone)
- zone = icaltimezone_get_utc_timezone ();
-
- cell_popup = E_CELL_POPUP (cell);
- cell_text = E_CELL_DATE_EDIT_TEXT (cell_popup->child);
- e_cell_date_edit_text_set_timezone (cell_text, zone);
-
- g_free (location);
-}
-
-static void
-timezone_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- ECellDateEditConfig *view_config = data;
- ECellDateEditConfigPrivate *priv;
-
- priv = view_config->priv;
-
- set_timezone (priv->cell);
-}
-
-static void
-set_twentyfour_hour (ECellDateEdit *cell)
-{
- ECellDateEditText *cell_text;
- ECellPopup *cell_popup;
- gboolean use_24_hour;
-
- use_24_hour = calendar_config_get_24_hour_format ();
-
- e_cell_date_edit_freeze (cell);
- g_object_set (G_OBJECT (cell),
- "use_24_hour_format", use_24_hour,
- NULL);
- e_cell_date_edit_thaw (cell);
-
- cell_popup = E_CELL_POPUP (cell);
- cell_text = E_CELL_DATE_EDIT_TEXT (cell_popup->child);
- e_cell_date_edit_text_set_use_24_hour_format (cell_text, use_24_hour);
-}
-
-static void
-twentyfour_hour_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- ECellDateEditConfig *view_config = data;
- ECellDateEditConfigPrivate *priv;
-
- priv = view_config->priv;
-
- set_twentyfour_hour (priv->cell);
-}
-
-static void
-set_range (ECellDateEdit *cell)
-{
- int start_hour, end_hour;
-
- 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++;
-
- /* Make sure the start hour is ok */
- if (start_hour > end_hour)
- start_hour = end_hour;
-
- /* We use the default 0 - 24 now. */
-#if 0
- g_object_set (G_OBJECT (cell),
- "lower_hour", start_hour,
- "upper_hour", end_hour,
- NULL);
-#endif
-}
-
-static void
-day_start_hour_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- ECellDateEditConfig *view_config = data;
- ECellDateEditConfigPrivate *priv;
-
- priv = view_config->priv;
-
- set_range (priv->cell);
-}
-
-static void
-day_end_hour_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- ECellDateEditConfig *view_config = data;
- ECellDateEditConfigPrivate *priv;
-
- priv = view_config->priv;
-
- set_range (priv->cell);
-}
-
-static void
-day_end_minute_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- ECellDateEditConfig *view_config = data;
- ECellDateEditConfigPrivate *priv;
-
- priv = view_config->priv;
-
- set_range (priv->cell);
-}
-
-void
-e_cell_date_edit_config_set_cell (ECellDateEditConfig *view_config, ECellDateEdit *cell)
-{
- ECellDateEditConfigPrivate *priv;
- guint not;
- GList *l;
-
- g_return_if_fail (view_config != NULL);
- g_return_if_fail (E_IS_CELL_DATE_EDIT_CONFIG (view_config));
-
- priv = view_config->priv;
-
- if (priv->cell) {
- g_object_unref (priv->cell);
- priv->cell = NULL;
- }
-
- if (priv->mini_config) {
- g_object_unref (priv->mini_config);
- priv->mini_config = NULL;
- }
-
- for (l = priv->notifications; l; l = l->next)
- calendar_config_remove_notification (GPOINTER_TO_UINT (l->data));
-
- g_list_free (priv->notifications);
- priv->notifications = NULL;
-
- /* If the new view is NULL, return right now */
- if (!cell)
- return;
-
- priv->cell = g_object_ref (cell);
-
- /* Time zone */
- set_timezone (cell);
-
- not = calendar_config_add_notification_timezone (timezone_changed_cb, view_config);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
- /* 24 Hour format */
- set_twentyfour_hour (cell);
-
- not = calendar_config_add_notification_24_hour_format (twentyfour_hour_changed_cb, view_config);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
- /* Popup time range */
- set_range (cell);
-
- not = calendar_config_add_notification_day_start_hour (day_start_hour_changed_cb, view_config);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
- not = calendar_config_add_notification_day_end_hour (day_end_hour_changed_cb, view_config);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
- not = calendar_config_add_notification_day_end_minute (day_end_minute_changed_cb, view_config);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
- /* The mini calendar */
- priv->mini_config = e_mini_calendar_config_new (E_CALENDAR (cell->calendar));
-}
diff --git a/calendar/gui/e-cell-date-edit-config.h b/calendar/gui/e-cell-date-edit-config.h
deleted file mode 100644
index fad1d9e508..0000000000
--- a/calendar/gui/e-cell-date-edit-config.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
- * JP Rosevear <jpr@ximian.com>
- *
- * Copyright 2003, Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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_CELL_DATE_EDIT_CONFIG_H_
-#define _E_CELL_DATE_EDIT_CONFIG_H_
-
-#include <widgets/misc/e-cell-date-edit.h>
-
-G_BEGIN_DECLS
-
-#define E_CELL_DATE_EDIT_CONFIG(obj) GTK_CHECK_CAST (obj, e_cell_date_edit_config_get_type (), ECellDateEditConfig)
-#define E_CELL_DATE_EDIT_CONFIG_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, e_cell_date_edit_config_get_type (), ECellDateEditConfigClass)
-#define E_IS_CELL_DATE_EDIT_CONFIG(obj) GTK_CHECK_TYPE (obj, e_cell_date_edit_config_get_type ())
-
-typedef struct _ECellDateEditConfig ECellDateEditConfig;
-typedef struct _ECellDateEditConfigClass ECellDateEditConfigClass;
-typedef struct _ECellDateEditConfigPrivate ECellDateEditConfigPrivate;
-
-struct _ECellDateEditConfig {
- GObject parent;
-
- ECellDateEditConfigPrivate *priv;
-};
-
-struct _ECellDateEditConfigClass {
- GObjectClass parent_class;
-};
-
-GType e_cell_date_edit_config_get_type (void);
-ECellDateEditConfig *e_cell_date_edit_config_new (ECellDateEdit *cell);
-ECellDateEdit *e_cell_date_edit_config_get_cell (ECellDateEditConfig *cell_config);
-void e_cell_date_edit_config_set_cell (ECellDateEditConfig *view_config, ECellDateEdit *cell);
-
-G_END_DECLS
-
-#endif
diff --git a/calendar/gui/e-cell-date-edit-text.c b/calendar/gui/e-cell-date-edit-text.c
deleted file mode 100644
index d487a78ae4..0000000000
--- a/calendar/gui/e-cell-date-edit-text.c
+++ /dev/null
@@ -1,234 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-/*
- * ECellDateEditText - a subclass of ECellText used to show and edit the text
- * representation of the date, from a ECalComponentDateTime* model value.
- */
-
-#include <config.h>
-
-#include <sys/time.h>
-#include <time.h>
-#include <unistd.h>
-#include <string.h>
-#include <libgnomeui/gnome-messagebox.h>
-#include <libgnomeui/gnome-stock-icons.h>
-#include <libgnome/gnome-i18n.h>
-#include <gal/util/e-util.h>
-#include <e-util/e-time-utils.h>
-#include <libecal/e-cal-time-util.h>
-
-#include "e-cell-date-edit-text.h"
-
-
-#define PARENT_TYPE e_cell_text_get_type ()
-
-static ECellTextClass *parent_class;
-
-
-void
-e_cell_date_edit_text_set_timezone (ECellDateEditText *ecd,
- icaltimezone *zone)
-{
- g_return_if_fail (E_IS_CELL_DATE_EDIT_TEXT (ecd));
-
- ecd->zone = zone;
-}
-
-
-void
-e_cell_date_edit_text_set_use_24_hour_format (ECellDateEditText *ecd,
- gboolean use_24_hour)
-{
- g_return_if_fail (E_IS_CELL_DATE_EDIT_TEXT (ecd));
-
- ecd->use_24_hour_format = use_24_hour;
-}
-
-
-static char *
-ecd_get_text (ECellText *cell, ETableModel *model, int col, int row)
-{
- ECellDateEditText *ecd = E_CELL_DATE_EDIT_TEXT (cell);
- ECellDateEditValue *dv = e_table_model_value_at (model, col, row);
- struct tm tmp_tm;
- char buffer[64];
-
- if (!dv)
- return g_strdup ("");
-
- /* 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_value(). */
- tmp_tm = icaltimetype_to_tm_with_zone (&dv->tt, dv->zone, ecd->zone);
-
- e_time_format_date_and_time (&tmp_tm, ecd->use_24_hour_format,
- !dv->tt.is_date, FALSE,
- buffer, sizeof (buffer));
- return g_strdup (buffer);
-}
-
-
-static void
-ecd_free_text (ECellText *cell, char *text)
-{
- g_free (text);
-}
-
-
-/* FIXME: We need to set the "transient_for" property for the dialog. */
-static void
-show_date_warning (ECellDateEditText *ecd)
-{
- 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 (ecd->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");
-
- e_utf8_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);
-}
-
-
-static void
-ecd_set_value (ECellText *cell, ETableModel *model, int col, int row,
- const char *text)
-{
- ECellDateEditText *ecd = E_CELL_DATE_EDIT_TEXT (cell);
- ETimeParseStatus status;
- struct tm tmp_tm;
- ECellDateEditValue *value;
- gboolean is_date = TRUE;
-
- /* Try to parse just a date first. If the value is only a date, we
- use a DATE value. */
- status = e_time_parse_date (text, &tmp_tm);
- if (status == E_TIME_PARSE_INVALID) {
- is_date = FALSE;
- status = e_time_parse_date_and_time (text, &tmp_tm);
-
- if (status == E_TIME_PARSE_INVALID) {
- show_date_warning (ecd);
- return;
- }
- }
-
- if (status == E_TIME_PARSE_NONE) {
- value = NULL;
- } else {
- ECellDateEditValue dv;
-
- dv.tt = icaltime_null_time ();
-
- dv.tt.year = tmp_tm.tm_year + 1900;
- dv.tt.month = tmp_tm.tm_mon + 1;
- dv.tt.day = tmp_tm.tm_mday;
- dv.tt.hour = tmp_tm.tm_hour;
- dv.tt.minute = tmp_tm.tm_min;
- dv.tt.second = tmp_tm.tm_sec;
- dv.tt.is_date = is_date;
-
- /* FIXME: We assume it is being set to the current timezone.
- Is that OK? */
- if (is_date) {
- dv.zone = NULL;
- } else {
- dv.zone = ecd->zone;
- }
-
- value = &dv;
- }
-
- e_table_model_set_value_at (model, col, row, value);
-}
-
-
-static void
-e_cell_date_edit_text_class_init (GtkObjectClass *object_class)
-{
- ECellTextClass *ectc = (ECellTextClass *) object_class;
-
- parent_class = gtk_type_class (PARENT_TYPE);
-
- ectc->get_text = ecd_get_text;
- ectc->free_text = ecd_free_text;
- ectc->set_value = ecd_set_value;
-}
-
-
-static void
-e_cell_date_edit_text_init (GtkObject *object)
-{
- ECellDateEditText *ecd = E_CELL_DATE_EDIT_TEXT (object);
-
- ecd->zone = icaltimezone_get_utc_timezone ();
- ecd->use_24_hour_format = TRUE;
-}
-
-
-/**
- * e_cell_date_edit_text_new:
- *
- * Creates a new ECell renderer that can be used to render and edit dates that
- * that come from the model. The value returned from the model is
- * interpreted as being a ECalComponentDateTime*.
- *
- * Returns: an ECell object that can be used to render dates.
- */
-ECell *
-e_cell_date_edit_text_new (const char *fontname,
- GtkJustification justify)
-{
- ECellDateEditText *ecd = g_object_new (e_cell_date_edit_text_get_type (), NULL);
-
- e_cell_text_construct (E_CELL_TEXT (ecd), fontname, justify);
-
- return (ECell *) ecd;
-}
-
-
-E_MAKE_TYPE (e_cell_date_edit_text, "ECellDateEditText", ECellDateEditText,
- e_cell_date_edit_text_class_init, e_cell_date_edit_text_init,
- PARENT_TYPE);
diff --git a/calendar/gui/e-cell-date-edit-text.h b/calendar/gui/e-cell-date-edit-text.h
deleted file mode 100644
index ab00c0b39c..0000000000
--- a/calendar/gui/e-cell-date-edit-text.h
+++ /dev/null
@@ -1,74 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-/*
- * ECellDateEditText - a subclass of ECellText used to show and edit the text
- * representation of the date, from a ECalComponentDateTime* model value.
- */
-
-#ifndef _E_CELL_DATE_EDIT_TEXT_H_
-#define _E_CELL_DATE_EDIT_TEXT_H_
-
-#include <libical/ical.h>
-#include <gal/e-table/e-cell-text.h>
-
-G_BEGIN_DECLS
-
-#define E_CELL_DATE_EDIT_TEXT_TYPE (e_cell_date_edit_text_get_type ())
-#define E_CELL_DATE_EDIT_TEXT(o) (GTK_CHECK_CAST ((o), E_CELL_DATE_EDIT_TEXT_TYPE, ECellDateEditText))
-#define E_CELL_DATE_EDIT_TEXT_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_CELL_DATE_EDIT_TEXT_TYPE, ECellDateEditTextClass))
-#define E_IS_CELL_DATE_EDIT_TEXT(o) (GTK_CHECK_TYPE ((o), E_CELL_DATE_EDIT_TEXT_TYPE))
-#define E_IS_CELL_DATE_EDIT_TEXT_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_CELL_DATE_EDIT_TEXT_TYPE))
-
-typedef struct _ECellDateEditValue ECellDateEditValue;
-struct _ECellDateEditValue {
- struct icaltimetype tt;
- icaltimezone *zone;
-};
-
-typedef struct {
- ECellText base;
-
- /* The timezone to display the date in. */
- icaltimezone *zone;
-
- /* Whether to display in 24-hour format. */
- gboolean use_24_hour_format;
-} ECellDateEditText;
-
-typedef struct {
- ECellTextClass parent_class;
-} ECellDateEditTextClass;
-
-GtkType e_cell_date_edit_text_get_type (void);
-ECell *e_cell_date_edit_text_new (const char *fontname,
- GtkJustification justify);
-
-
-void e_cell_date_edit_text_set_timezone (ECellDateEditText *ecd,
- icaltimezone *zone);
-void e_cell_date_edit_text_set_use_24_hour_format (ECellDateEditText *ecd,
- gboolean use_24_hour);
-G_END_DECLS
-
-#endif /* _E_CELL_DATE_EDIT_TEXT_H_ */
diff --git a/calendar/gui/e-comp-editor-registry.c b/calendar/gui/e-comp-editor-registry.c
deleted file mode 100644
index 9e2a63bd48..0000000000
--- a/calendar/gui/e-comp-editor-registry.c
+++ /dev/null
@@ -1,212 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-comp-editor-registry.c
- *
- * Copyright (C) 2002 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <gnome.h>
-#include <gal/util/e-util.h>
-#include "e-comp-editor-registry.h"
-
-struct _ECompEditorRegistryPrivate {
- GHashTable *editors;
-};
-
-struct _ECompEditorRegistryData
-{
- CompEditor *editor;
- char *uid;
-};
-
-typedef struct _ECompEditorRegistryData ECompEditorRegistryData;
-typedef struct _ECompEditorRegistryForeachData ECompEditorRegistryForeachData;
-
-static GtkObjectClass *parent_class = NULL;
-
-static void editor_destroy_cb (GtkWidget *widget, gpointer data);
-
-static void
-destroy (GtkObject *obj)
-{
- ECompEditorRegistry *reg;
- ECompEditorRegistryPrivate *priv;
-
- reg = E_COMP_EDITOR_REGISTRY (obj);
- priv = reg->priv;
-
- if (priv) {
- if (priv->editors) {
- g_hash_table_destroy (priv->editors);
- priv->editors = NULL;
- }
-
- g_free (priv);
- reg->priv = NULL;
- }
-
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (obj);
-}
-
-static void
-class_init (ECompEditorRegistryClass *klass)
-{
- GtkObjectClass *object_class;
-
- object_class = GTK_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_peek_parent (klass);
-
- object_class->destroy = destroy;
-}
-
-static void
-init (ECompEditorRegistry *reg)
-{
- ECompEditorRegistryPrivate *priv;
-
- priv = g_new0 (ECompEditorRegistryPrivate, 1);
-
- reg->priv = priv;
-
- priv->editors = g_hash_table_new (g_str_hash, g_str_equal);
-}
-
-
-
-E_MAKE_TYPE (e_comp_editor_registry, "ECompEditorRegistry", ECompEditorRegistry,
- class_init, init, gtk_object_get_type ());
-
-GtkObject *
-e_comp_editor_registry_new (void)
-{
- return g_object_new (E_TYPE_COMP_EDITOR_REGISTRY, NULL);
-}
-
-void
-e_comp_editor_registry_add (ECompEditorRegistry *reg, CompEditor *editor, gboolean remote)
-{
- ECompEditorRegistryPrivate *priv;
- ECompEditorRegistryData *rdata;
- ECalComponent *comp;
- const char *uid;
-
- g_return_if_fail (reg != NULL);
- g_return_if_fail (E_IS_COMP_EDITOR_REGISTRY (reg));
- g_return_if_fail (editor != NULL);
- g_return_if_fail (IS_COMP_EDITOR (editor));
-
- priv = reg->priv;
-
- comp = comp_editor_get_comp (editor);
- e_cal_component_get_uid (comp, &uid);
-
- rdata = g_new0 (ECompEditorRegistryData, 1);
-
- rdata->editor = editor;
- rdata->uid = g_strdup (uid);
- g_hash_table_insert (priv->editors, rdata->uid, rdata);
-
- g_signal_connect (editor, "destroy", G_CALLBACK (editor_destroy_cb), reg);
-
-}
-
-CompEditor *
-e_comp_editor_registry_find (ECompEditorRegistry *reg, const char *uid)
-{
- ECompEditorRegistryPrivate *priv;
- ECompEditorRegistryData *rdata;
-
- g_return_val_if_fail (reg != NULL, NULL);
- g_return_val_if_fail (E_IS_COMP_EDITOR_REGISTRY (reg), NULL);
- g_return_val_if_fail (uid != NULL, NULL);
-
- priv = reg->priv;
-
- rdata = g_hash_table_lookup (priv->editors, uid);
- if (rdata != NULL)
- return rdata->editor;
-
- return NULL;
-}
-
-static gboolean
-foreach_close_cb (gpointer key, gpointer value, gpointer data)
-{
- ECompEditorRegistryData *rdata;
-
- rdata = value;
-
- g_signal_handlers_block_matched (rdata->editor, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, data);
-
- comp_editor_focus (rdata->editor);
- if (!comp_editor_close (rdata->editor)) {
- g_signal_handlers_unblock_matched (rdata->editor, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, data);
- return FALSE;
- }
-
- g_free (rdata->uid);
- g_free (rdata);
-
- return TRUE;
-}
-
-gboolean
-e_comp_editor_registry_close_all (ECompEditorRegistry *reg)
-{
- ECompEditorRegistryPrivate *priv;
-
- g_return_val_if_fail (reg != NULL, FALSE);
- g_return_val_if_fail (E_IS_COMP_EDITOR_REGISTRY (reg), FALSE);
-
- priv = reg->priv;
-
- g_hash_table_foreach_remove (priv->editors, foreach_close_cb, reg);
- if (g_hash_table_size (priv->editors) != 0)
- return FALSE;
-
- return TRUE;
-}
-
-static void
-editor_destroy_cb (GtkWidget *widget, gpointer data)
-{
- ECompEditorRegistry *reg;
- ECompEditorRegistryPrivate *priv;
- ECompEditorRegistryData *rdata;
- ECalComponent *comp;
- const char *uid;
-
- reg = E_COMP_EDITOR_REGISTRY (data);
- priv = reg->priv;
-
- comp = comp_editor_get_comp (COMP_EDITOR (widget));
- e_cal_component_get_uid (comp, &uid);
-
- rdata = g_hash_table_lookup (priv->editors, uid);
-
- if (rdata != NULL) {
- g_hash_table_remove (priv->editors, rdata->uid);
- g_free (rdata->uid);
- g_free (rdata);
- }
-}
diff --git a/calendar/gui/e-comp-editor-registry.h b/calendar/gui/e-comp-editor-registry.h
deleted file mode 100644
index dfcc1b21bc..0000000000
--- a/calendar/gui/e-comp-editor-registry.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-comp-editor-registry.h
- *
- * Copyright (C) 2002 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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_COMP_EDITOR_REGISTRY_H_
-#define _E_COMP_EDITOR_REGISTRY_H_
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <gtk/gtk.h>
-#include <dialogs/comp-editor.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#define E_TYPE_COMP_EDITOR_REGISTRY (e_comp_editor_registry_get_type ())
-#define E_COMP_EDITOR_REGISTRY(obj) (GTK_CHECK_CAST ((obj), E_TYPE_COMP_EDITOR_REGISTRY, ECompEditorRegistry))
-#define E_COMP_EDITOR_REGISTRY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_COMP_EDITOR_REGISTRY, ECompEditorRegistryClass))
-#define E_IS_COMP_EDITOR_REGISTRY(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_COMP_EDITOR_REGISTRY))
-#define E_IS_COMP_EDITOR_REGISTRY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_COMP_EDITOR_REGISTRY))
-
-
-typedef struct _ECompEditorRegistry ECompEditorRegistry;
-typedef struct _ECompEditorRegistryPrivate ECompEditorRegistryPrivate;
-typedef struct _ECompEditorRegistryClass ECompEditorRegistryClass;
-
-struct _ECompEditorRegistry {
- GtkObject parent;
-
- ECompEditorRegistryPrivate *priv;
-};
-
-struct _ECompEditorRegistryClass {
- GtkObjectClass parent_class;
-};
-
-typedef void (* ECompEditorRegistryForeachFn) (CompEditor *editor, gpointer data);
-
-
-
-
-GtkType e_comp_editor_registry_get_type (void);
-GtkObject *e_comp_editor_registry_new (void);
-void e_comp_editor_registry_add (ECompEditorRegistry *reg,
- CompEditor *editor,
- gboolean remote);
-CompEditor *e_comp_editor_registry_find (ECompEditorRegistry *reg,
- const char *uid);
-gboolean e_comp_editor_registry_close_all (ECompEditorRegistry *reg);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _E_COMP_EDITOR_REGISTRY_H_ */
-
-
diff --git a/calendar/gui/e-date-edit-config.c b/calendar/gui/e-date-edit-config.c
deleted file mode 100644
index f3d88fdd53..0000000000
--- a/calendar/gui/e-date-edit-config.c
+++ /dev/null
@@ -1,269 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
- * JP Rosevear <jpr@ximian.com>
- *
- * Copyright 2003, Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 "calendar-config.h"
-#include "e-date-edit-config.h"
-
-struct _EDateEditConfigPrivate {
- EDateEdit *edit;
-
- GList *notifications;
-};
-
-static GObjectClass *parent_class = NULL;
-
-/* Property IDs */
-enum props {
- PROP_0,
- PROP_EDIT,
-};
-
-static void
-e_date_edit_config_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
-{
- EDateEditConfig *edit_config;
- EDateEditConfigPrivate *priv;
-
- edit_config = E_DATE_EDIT_CONFIG (object);
- priv = edit_config->priv;
-
- switch (property_id) {
- case PROP_EDIT:
- e_date_edit_config_set_edit (edit_config, g_value_get_object (value));
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- break;
- }
-}
-
-static void
-e_date_edit_config_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
-{
- EDateEditConfig *edit_config;
- EDateEditConfigPrivate *priv;
-
- edit_config = E_DATE_EDIT_CONFIG (object);
- priv = edit_config->priv;
-
- switch (property_id) {
- case PROP_EDIT:
- g_value_set_object (value, e_date_edit_config_get_edit (edit_config));
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- break;
- }
-}
-
-static void
-e_date_edit_config_dispose (GObject *object)
-{
- EDateEditConfig *edit_config = E_DATE_EDIT_CONFIG (object);
- EDateEditConfigPrivate *priv;
-
- priv = edit_config->priv;
-
- e_date_edit_config_set_edit (edit_config, NULL);
-
- if (G_OBJECT_CLASS (parent_class)->dispose)
- G_OBJECT_CLASS (parent_class)->dispose (object);
-}
-
-static void
-e_date_edit_config_finalize (GObject *object)
-{
- EDateEditConfig *edit_config = E_DATE_EDIT_CONFIG (object);
- EDateEditConfigPrivate *priv;
-
- priv = edit_config->priv;
-
- g_free (priv);
-
- if (G_OBJECT_CLASS (parent_class)->finalize)
- G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-static void
-e_date_edit_config_class_init (EDateEditConfigClass *klass)
-{
- GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- GParamSpec *spec;
-
- parent_class = g_type_class_peek_parent (klass);
-
- /* Method override */
- gobject_class->set_property = e_date_edit_config_set_property;
- gobject_class->get_property = e_date_edit_config_get_property;
- gobject_class->dispose = e_date_edit_config_dispose;
- gobject_class->finalize = e_date_edit_config_finalize;
-
- spec = g_param_spec_object ("edit", NULL, NULL, e_date_edit_get_type (),
- G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT);
- g_object_class_install_property (gobject_class, PROP_EDIT, spec);
-}
-
-static void
-e_date_edit_config_init (EDateEditConfig *edit_config, EDateEditConfigClass *klass)
-{
- edit_config->priv = g_new0 (EDateEditConfigPrivate, 1);
-
-}
-
-E_MAKE_TYPE (e_date_edit_config, "EDateEditConfig", EDateEditConfig, e_date_edit_config_class_init,
- e_date_edit_config_init, G_TYPE_OBJECT);
-
-EDateEditConfig *
-e_date_edit_config_new (EDateEdit *date_edit)
-{
- EDateEditConfig *edit_config;
-
- edit_config = g_object_new (e_date_edit_config_get_type (), "edit", date_edit, NULL);
-
- return edit_config;
-}
-
-EDateEdit *
-e_date_edit_config_get_edit (EDateEditConfig *edit_config)
-{
- EDateEditConfigPrivate *priv;
-
- g_return_val_if_fail (edit_config != NULL, NULL);
- g_return_val_if_fail (E_IS_DATE_EDIT_CONFIG (edit_config), NULL);
-
- priv = edit_config->priv;
-
- return priv->edit;
-}
-
-static void
-set_week_start (EDateEdit *date_edit)
-{
- int week_start_day;
-
- 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_date_edit_set_week_start_day (date_edit, week_start_day);
-}
-
-static void
-week_start_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- EDateEditConfig *edit_config = data;
- EDateEditConfigPrivate *priv;
-
- priv = edit_config->priv;
-
- set_week_start (priv->edit);
-}
-
-static void
-set_twentyfour_hour (EDateEdit *date_edit)
-{
- gboolean use_24_hour;
-
- use_24_hour = calendar_config_get_24_hour_format ();
-
- e_date_edit_set_use_24_hour_format (date_edit, use_24_hour);
-}
-
-static void
-twentyfour_hour_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- EDateEditConfig *edit_config = data;
- EDateEditConfigPrivate *priv;
-
- priv = edit_config->priv;
-
- set_twentyfour_hour (priv->edit);
-}
-
-static void
-set_dnav_show_week_no (EDateEdit *date_edit)
-{
- gboolean show_week_no;
-
- show_week_no = calendar_config_get_dnav_show_week_no ();
-
- e_date_edit_set_show_week_numbers (date_edit, show_week_no);
-}
-
-static void
-dnav_show_week_no_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- EDateEditConfig *edit_config = data;
- EDateEditConfigPrivate *priv;
-
- priv = edit_config->priv;
-
- set_dnav_show_week_no (priv->edit);
-}
-void
-e_date_edit_config_set_edit (EDateEditConfig *edit_config, EDateEdit *date_edit)
-{
- EDateEditConfigPrivate *priv;
- guint not;
- GList *l;
-
- g_return_if_fail (edit_config != NULL);
- g_return_if_fail (E_IS_DATE_EDIT_CONFIG (edit_config));
-
- priv = edit_config->priv;
-
- if (priv->edit) {
- g_object_unref (priv->edit);
- priv->edit = NULL;
- }
-
- for (l = priv->notifications; l; l = l->next)
- calendar_config_remove_notification (GPOINTER_TO_UINT (l->data));
-
- g_list_free (priv->notifications);
- priv->notifications = NULL;
-
- /* If the new edit is NULL, return right now */
- if (!date_edit)
- return;
-
- priv->edit = g_object_ref (date_edit);
-
- /* Week start */
- set_week_start (date_edit);
-
- not = calendar_config_add_notification_week_start_day (week_start_changed_cb, edit_config);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
- /* 24 Hour format */
- set_twentyfour_hour (date_edit);
-
- not = calendar_config_add_notification_24_hour_format (twentyfour_hour_changed_cb, edit_config);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
- /* Show week numbers */
- set_dnav_show_week_no (date_edit);
-
- not = calendar_config_add_notification_dnav_show_week_no (dnav_show_week_no_changed_cb, edit_config);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-}
diff --git a/calendar/gui/e-date-edit-config.h b/calendar/gui/e-date-edit-config.h
deleted file mode 100644
index 0707666bff..0000000000
--- a/calendar/gui/e-date-edit-config.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
- * JP Rosevear <jpr@ximian.com>
- *
- * Copyright 2003, Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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_DATE_EDIT_CONFIG_H_
-#define _E_DATE_EDIT_CONFIG_H_
-
-#include <widgets/misc/e-dateedit.h>
-
-G_BEGIN_DECLS
-
-#define E_DATE_EDIT_CONFIG(obj) GTK_CHECK_CAST (obj, e_date_edit_config_get_type (), EDateEditConfig)
-#define E_DATE_EDIT_CONFIG_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, e_date_edit_config_get_type (), EDateEditConfigClass)
-#define E_IS_DATE_EDIT_CONFIG(obj) GTK_CHECK_TYPE (obj, e_date_edit_config_get_type ())
-
-typedef struct _EDateEditConfig EDateEditConfig;
-typedef struct _EDateEditConfigClass EDateEditConfigClass;
-typedef struct _EDateEditConfigPrivate EDateEditConfigPrivate;
-
-struct _EDateEditConfig {
- GObject parent;
-
- EDateEditConfigPrivate *priv;
-};
-
-struct _EDateEditConfigClass {
- GObjectClass parent_class;
-};
-
-GType e_date_edit_config_get_type (void);
-EDateEditConfig *e_date_edit_config_new (EDateEdit *date_edit);
-EDateEdit *e_date_edit_config_get_edit (EDateEditConfig *edit_config);
-void e_date_edit_config_set_edit (EDateEditConfig *edit_config, EDateEdit *date_edit);
-
-G_END_DECLS
-
-#endif
diff --git a/calendar/gui/e-date-time-list.c b/calendar/gui/e-date-time-list.c
deleted file mode 100644
index 348ccc86a9..0000000000
--- a/calendar/gui/e-date-time-list.c
+++ /dev/null
@@ -1,566 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/* EDateTimeList - list of calendar dates/times with GtkTreeModel interface.
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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: Hans Petter Jansson <hpj@ximian.com>
- */
-
-#include <string.h>
-#include <gtk/gtktreemodel.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtktreednd.h>
-#include <glib.h>
-#include <e-util/e-time-utils.h>
-#include "e-date-time-list.h"
-#include <libecal/e-cal-time-util.h>
-#include "calendar-config.h"
-
-#define G_LIST(x) ((GList *) x)
-#define E_DATE_TIME_LIST_IS_SORTED(list) (E_DATE_TIME_LIST (list)->sort_column_id != -2)
-#define IS_VALID_ITER(dt_list, iter) (iter!= NULL && iter->user_data != NULL && \
- dt_list->stamp == iter->stamp)
-
-static GType column_types [E_DATE_TIME_LIST_NUM_COLUMNS];
-
-static void e_date_time_list_init (EDateTimeList *file_list);
-static void e_date_time_list_class_init (EDateTimeListClass *class);
-static void e_date_time_list_tree_model_init (GtkTreeModelIface *iface);
-static void e_date_time_list_finalize (GObject *object);
-static guint e_date_time_list_get_flags (GtkTreeModel *tree_model);
-static gint e_date_time_list_get_n_columns (GtkTreeModel *tree_model);
-static GType e_date_time_list_get_column_type (GtkTreeModel *tree_model,
- gint index);
-static gboolean e_date_time_list_get_iter (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- GtkTreePath *path);
-static GtkTreePath *e_date_time_list_get_path (GtkTreeModel *tree_model,
- GtkTreeIter *iter);
-static void e_date_time_list_get_value (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- gint column,
- GValue *value);
-static gboolean e_date_time_list_iter_next (GtkTreeModel *tree_model,
- GtkTreeIter *iter);
-static gboolean e_date_time_list_iter_children (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- GtkTreeIter *parent);
-static gboolean e_date_time_list_iter_has_child (GtkTreeModel *tree_model,
- GtkTreeIter *iter);
-static gint e_date_time_list_iter_n_children (GtkTreeModel *tree_model,
- GtkTreeIter *iter);
-static gboolean e_date_time_list_iter_nth_child (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- GtkTreeIter *parent,
- gint n);
-static gboolean e_date_time_list_iter_parent (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- GtkTreeIter *child);
-
-static GObjectClass *parent_class = NULL;
-
-GtkType
-e_date_time_list_get_type (void)
-{
- static GType date_time_list_type = 0;
-
- if (!date_time_list_type) {
- static const GTypeInfo date_time_list_info =
- {
- sizeof (EDateTimeListClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) e_date_time_list_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EDateTimeList),
- 0,
- (GInstanceInitFunc) e_date_time_list_init,
- };
-
- static const GInterfaceInfo tree_model_info =
- {
- (GInterfaceInitFunc) e_date_time_list_tree_model_init,
- NULL,
- NULL
- };
-
- column_types [E_DATE_TIME_LIST_COLUMN_DESCRIPTION] = G_TYPE_STRING;
-
- date_time_list_type = g_type_register_static (G_TYPE_OBJECT, "EDateTimeList",
- &date_time_list_info, 0);
- g_type_add_interface_static (date_time_list_type,
- GTK_TYPE_TREE_MODEL,
- &tree_model_info);
- }
-
- return date_time_list_type;
-}
-
-static void
-e_date_time_list_class_init (EDateTimeListClass *class)
-{
- GObjectClass *object_class;
-
- parent_class = g_type_class_peek_parent (class);
- object_class = (GObjectClass*) class;
-
- object_class->finalize = e_date_time_list_finalize;
-}
-
-static void
-e_date_time_list_tree_model_init (GtkTreeModelIface *iface)
-{
- iface->get_flags = e_date_time_list_get_flags;
- iface->get_n_columns = e_date_time_list_get_n_columns;
- iface->get_column_type = e_date_time_list_get_column_type;
- iface->get_iter = e_date_time_list_get_iter;
- iface->get_path = e_date_time_list_get_path;
- iface->get_value = e_date_time_list_get_value;
- iface->iter_next = e_date_time_list_iter_next;
- iface->iter_children = e_date_time_list_iter_children;
- iface->iter_has_child = e_date_time_list_iter_has_child;
- iface->iter_n_children = e_date_time_list_iter_n_children;
- iface->iter_nth_child = e_date_time_list_iter_nth_child;
- iface->iter_parent = e_date_time_list_iter_parent;
-}
-
-static void
-e_date_time_list_init (EDateTimeList *date_time_list)
-{
- date_time_list->stamp = g_random_int ();
- date_time_list->columns_dirty = FALSE;
- date_time_list->list = NULL;
-}
-
-EDateTimeList *
-e_date_time_list_new (void)
-{
- EDateTimeList *date_time_list;
-
- date_time_list = E_DATE_TIME_LIST (g_object_new (e_date_time_list_get_type (), NULL));
-
- return date_time_list;
-}
-
-static void
-all_rows_deleted (EDateTimeList *date_time_list)
-{
- GtkTreePath *path;
- gint i;
-
- if (!date_time_list->list)
- return;
-
- path = gtk_tree_path_new ();
- i = g_list_length (date_time_list->list);
- gtk_tree_path_append_index (path, i);
-
- for ( ; i >= 0; i--) {
- gtk_tree_model_row_deleted (GTK_TREE_MODEL (date_time_list), path);
- gtk_tree_path_prev (path);
- }
-
- gtk_tree_path_free (path);
-}
-
-static void
-row_deleted (EDateTimeList *date_time_list, gint n)
-{
- GtkTreePath *path;
-
- path = gtk_tree_path_new ();
- gtk_tree_path_append_index (path, n);
- gtk_tree_model_row_deleted (GTK_TREE_MODEL (date_time_list), path);
- gtk_tree_path_free (path);
-}
-
-static void
-row_added (EDateTimeList *date_time_list, gint n)
-{
- GtkTreePath *path;
- GtkTreeIter iter;
-
- path = gtk_tree_path_new ();
- gtk_tree_path_append_index (path, n);
-
- if (gtk_tree_model_get_iter (GTK_TREE_MODEL (date_time_list), &iter, path))
- gtk_tree_model_row_inserted (GTK_TREE_MODEL (date_time_list), path, &iter);
-
- gtk_tree_path_free (path);
-}
-
-static void
-row_updated (EDateTimeList *date_time_list, gint n)
-{
- GtkTreePath *path;
- GtkTreeIter iter;
-
- path = gtk_tree_path_new ();
- gtk_tree_path_append_index (path, n);
-
- if (gtk_tree_model_get_iter (GTK_TREE_MODEL (date_time_list), &iter, path))
- gtk_tree_model_row_changed (GTK_TREE_MODEL (date_time_list), path, &iter);
-
- gtk_tree_path_free (path);
-}
-
-static void
-e_date_time_list_finalize (GObject *object)
-{
- EDateTimeList *date_time_list = E_DATE_TIME_LIST (object);
-
- if (G_OBJECT_CLASS (parent_class)->finalize)
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
-}
-
-/* Fulfill the GtkTreeModel requirements */
-static guint
-e_date_time_list_get_flags (GtkTreeModel *tree_model)
-{
- g_return_val_if_fail (E_IS_DATE_TIME_LIST (tree_model), 0);
-
- return GTK_TREE_MODEL_LIST_ONLY;
-}
-
-static gint
-e_date_time_list_get_n_columns (GtkTreeModel *tree_model)
-{
- EDateTimeList *date_time_list = (EDateTimeList *) tree_model;
-
- g_return_val_if_fail (E_IS_DATE_TIME_LIST (tree_model), 0);
-
- date_time_list->columns_dirty = TRUE;
- return E_DATE_TIME_LIST_NUM_COLUMNS;
-}
-
-static GType
-e_date_time_list_get_column_type (GtkTreeModel *tree_model,
- gint index)
-{
- EDateTimeList *date_time_list = (EDateTimeList *) tree_model;
-
- g_return_val_if_fail (E_IS_DATE_TIME_LIST (tree_model), G_TYPE_INVALID);
- g_return_val_if_fail (index < E_DATE_TIME_LIST_NUM_COLUMNS &&
- index >= 0, G_TYPE_INVALID);
-
- date_time_list->columns_dirty = TRUE;
- return column_types [index];
-}
-
-const ECalComponentDateTime *
-e_date_time_list_get_date_time (EDateTimeList *date_time_list, GtkTreeIter *iter)
-{
- g_return_val_if_fail (IS_VALID_ITER (date_time_list, iter), NULL);
-
- return G_LIST (iter->user_data)->data;
-}
-
-static void
-free_datetime (ECalComponentDateTime *datetime)
-{
- g_free (datetime->value);
- if (datetime->tzid)
- g_free ((gchar *) datetime->tzid);
- g_free (datetime);
-}
-
-static ECalComponentDateTime *
-copy_datetime (const ECalComponentDateTime *datetime)
-{
- ECalComponentDateTime *datetime_copy;
-
- datetime_copy = g_new0 (ECalComponentDateTime, 1);
- datetime_copy->value = g_new (struct icaltimetype, 1);
- *datetime_copy->value = *datetime->value;
-
- if (datetime->tzid)
- datetime_copy->tzid = g_strdup (datetime->tzid);
-
- return datetime_copy;
-}
-
-static gint
-compare_datetime (const ECalComponentDateTime *datetime1, const ECalComponentDateTime *datetime2)
-{
- return icaltime_compare (*datetime1->value, *datetime2->value);
-}
-
-void
-e_date_time_list_set_date_time (EDateTimeList *date_time_list, GtkTreeIter *iter,
- const ECalComponentDateTime *datetime)
-{
- ECalComponentDateTime *datetime_old;
-
- g_return_if_fail (IS_VALID_ITER (date_time_list, iter));
-
- datetime_old = G_LIST (iter->user_data)->data;
- free_datetime (datetime_old);
- G_LIST (iter->user_data)->data = copy_datetime (datetime);
- row_updated (date_time_list, g_list_position (date_time_list->list, G_LIST (iter->user_data)));
-}
-
-void
-e_date_time_list_append (EDateTimeList *date_time_list, GtkTreeIter *iter,
- const ECalComponentDateTime *datetime)
-{
- g_return_if_fail (datetime != NULL);
-
- if (g_list_find_custom (date_time_list->list, datetime, (GCompareFunc)compare_datetime) == NULL) {
- date_time_list->list = g_list_append (date_time_list->list, copy_datetime (datetime));
- row_added (date_time_list, g_list_length (date_time_list->list) - 1);
- }
-
- if (iter) {
- iter->user_data = g_list_last (date_time_list->list);
- iter->stamp = date_time_list->stamp;
- }
-}
-
-void
-e_date_time_list_remove (EDateTimeList *date_time_list, GtkTreeIter *iter)
-{
- gint n;
-
- g_return_if_fail (IS_VALID_ITER (date_time_list, iter));
-
- n = g_list_position (date_time_list->list, G_LIST (iter->user_data));
- free_datetime ((ECalComponentDateTime *) G_LIST (iter->user_data)->data);
- date_time_list->list = g_list_delete_link (date_time_list->list, G_LIST (iter->user_data));
- row_deleted (date_time_list, n);
-}
-
-void
-e_date_time_list_clear (EDateTimeList *date_time_list)
-{
- GList *l;
-
- all_rows_deleted (date_time_list);
-
- for (l = date_time_list->list; l; l = g_list_next (l)) {
- free_datetime ((ECalComponentDateTime *) l->data);
- }
-
- g_list_free (date_time_list->list);
- date_time_list->list = NULL;
-}
-
-static gboolean
-e_date_time_list_get_iter (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreePath *path)
-{
- EDateTimeList *date_time_list = (EDateTimeList *) tree_model;
- GList *l;
- gint i;
-
- g_return_val_if_fail (E_IS_DATE_TIME_LIST (tree_model), FALSE);
- g_return_val_if_fail (gtk_tree_path_get_depth (path) > 0, FALSE);
-
- if (!date_time_list->list)
- return FALSE;
-
- date_time_list->columns_dirty = TRUE;
-
- i = gtk_tree_path_get_indices (path)[0];
- l = g_list_nth (date_time_list->list, i);
- if (!l)
- return FALSE;
-
- iter->user_data = l;
- iter->stamp = date_time_list->stamp;
- return TRUE;
-}
-
-static GtkTreePath *
-e_date_time_list_get_path (GtkTreeModel *tree_model,
- GtkTreeIter *iter)
-{
- EDateTimeList *date_time_list = (EDateTimeList *) tree_model;
- GtkTreePath *retval;
- GList *l;
-
- g_return_val_if_fail (E_IS_DATE_TIME_LIST (tree_model), NULL);
- g_return_val_if_fail (iter->stamp == E_DATE_TIME_LIST (tree_model)->stamp, NULL);
-
- l = iter->user_data;
- retval = gtk_tree_path_new ();
- gtk_tree_path_append_index (retval, g_list_position (date_time_list->list, l));
- return retval;
-}
-
-/* Builds a static string out of an exception date */
-static char *
-get_exception_string (ECalComponentDateTime *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);
-
- e_time_format_date_and_time (&tmp_tm, calendar_config_get_24_hour_format (),
- FALSE, FALSE, buf, sizeof (buf));
-
- return buf;
-}
-
-static void
-e_date_time_list_get_value (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- gint column,
- GValue *value)
-{
- EDateTimeList *date_time_list = E_DATE_TIME_LIST (tree_model);
- ECalComponentDateTime *datetime;
- GList *l;
- const gchar *str;
-
- g_return_if_fail (E_IS_DATE_TIME_LIST (tree_model));
- g_return_if_fail (column < E_DATE_TIME_LIST_NUM_COLUMNS);
- g_return_if_fail (E_DATE_TIME_LIST (tree_model)->stamp == iter->stamp);
- g_return_if_fail (IS_VALID_ITER (date_time_list, iter));
-
- g_value_init (value, column_types [column]);
-
- if (!date_time_list->list)
- return;
-
- l = iter->user_data;
- datetime = l->data;
-
- if (!datetime)
- return;
-
- switch (column) {
- case E_DATE_TIME_LIST_COLUMN_DESCRIPTION:
- str = get_exception_string (datetime);
- g_value_set_string (value, str);
- break;
- }
-}
-
-static gboolean
-e_date_time_list_iter_next (GtkTreeModel *tree_model,
- GtkTreeIter *iter)
-{
- GList *l;
-
- g_return_val_if_fail (E_IS_DATE_TIME_LIST (tree_model), FALSE);
- g_return_val_if_fail (IS_VALID_ITER (E_DATE_TIME_LIST (tree_model), iter), FALSE);
-
- if (!E_DATE_TIME_LIST (tree_model)->list)
- return FALSE;
-
- l = iter->user_data;
- l = g_list_next (l);
- if (l) {
- iter->user_data = l;
- return TRUE;
- }
-
- return FALSE;
-}
-
-static gboolean
-e_date_time_list_iter_children (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- GtkTreeIter *parent)
-{
- EDateTimeList *date_time_list = E_DATE_TIME_LIST (tree_model);
-
- /* this is a list, nodes have no children */
- if (parent)
- return FALSE;
-
- /* but if parent == NULL we return the list itself as children of the
- * "root" */
-
- if (!date_time_list->list)
- return FALSE;
-
- iter->stamp = E_DATE_TIME_LIST (tree_model)->stamp;
- iter->user_data = date_time_list->list;
- return TRUE;
-}
-
-static gboolean
-e_date_time_list_iter_has_child (GtkTreeModel *tree_model,
- GtkTreeIter *iter)
-{
- g_return_val_if_fail (IS_VALID_ITER (E_DATE_TIME_LIST (tree_model), iter), FALSE);
- return FALSE;
-}
-
-static gint
-e_date_time_list_iter_n_children (GtkTreeModel *tree_model,
- GtkTreeIter *iter)
-{
- EDateTimeList *date_time_list = E_DATE_TIME_LIST (tree_model);
-
- g_return_val_if_fail (E_IS_DATE_TIME_LIST (tree_model), -1);
- g_return_val_if_fail (IS_VALID_ITER (date_time_list, iter), -1);
-
- if (iter == NULL)
- return g_list_length (date_time_list->list);
-
- g_return_val_if_fail (E_DATE_TIME_LIST (tree_model)->stamp == iter->stamp, -1);
- return 0;
-}
-
-static gboolean
-e_date_time_list_iter_nth_child (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- GtkTreeIter *parent,
- gint n)
-{
- EDateTimeList *date_time_list = E_DATE_TIME_LIST (tree_model);
-
- g_return_val_if_fail (E_IS_DATE_TIME_LIST (tree_model), FALSE);
-
- if (parent)
- return FALSE;
-
- if (date_time_list->list) {
- GList *l;
-
- l = g_list_nth (date_time_list->list, n);
- if (!l)
- return FALSE;
-
- iter->stamp = date_time_list->stamp;
- iter->user_data = l;
- return TRUE;
- }
-
- return FALSE;
-}
-
-static gboolean
-e_date_time_list_iter_parent (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- GtkTreeIter *child)
-{
- return FALSE;
-}
diff --git a/calendar/gui/e-date-time-list.h b/calendar/gui/e-date-time-list.h
deleted file mode 100644
index 83b145c7c6..0000000000
--- a/calendar/gui/e-date-time-list.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/* EDateTimeList - list of calendar dates/times with GtkTreeModel interface.
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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: Hans Petter Jansson <hpj@ximian.com>
- */
-
-#ifndef E_DATE_TIME_LIST_H
-#define E_DATE_TIME_LIST_H
-
-#include <gtk/gtktreemodel.h>
-#include <libecal/e-cal-component.h>
-
-G_BEGIN_DECLS
-
-#define E_TYPE_DATE_TIME_LIST (e_date_time_list_get_type ())
-#define E_DATE_TIME_LIST(obj) (GTK_CHECK_CAST ((obj), E_TYPE_DATE_TIME_LIST, EDateTimeList))
-#define E_DATE_TIME_LIST_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_DATE_TIME_LIST, EDateTimeListClass))
-#define E_IS_DATE_TIME_LIST(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_DATE_TIME_LIST))
-#define E_IS_DATE_TIME_LIST_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), E_TYPE_DATE_TIME_LIST))
-#define E_DATE_TIME_LIST_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), E_TYPE_DATE_TIME_LIST, EDateTimeListClass))
-
-typedef struct _EDateTimeList EDateTimeList;
-typedef struct _EDateTimeListClass EDateTimeListClass;
-
-typedef enum
-{
- E_DATE_TIME_LIST_COLUMN_DESCRIPTION,
-
- E_DATE_TIME_LIST_NUM_COLUMNS
-}
-EDateTimeListColumnType;
-
-struct _EDateTimeList
-{
- GObject parent;
-
- /* Private */
-
- gint stamp;
- GList *list;
-
- guint columns_dirty : 1;
-};
-
-struct _EDateTimeListClass
-{
- GObjectClass parent_class;
-};
-
-GtkType e_date_time_list_get_type (void);
-EDateTimeList *e_date_time_list_new (void);
-
-const ECalComponentDateTime *e_date_time_list_get_date_time (EDateTimeList *date_time_list,
- GtkTreeIter *iter);
-void e_date_time_list_set_date_time (EDateTimeList *date_time_list,
- GtkTreeIter *iter,
- const ECalComponentDateTime *datetime);
-void e_date_time_list_append (EDateTimeList *date_time_list,
- GtkTreeIter *iter,
- const ECalComponentDateTime *datetime);
-void e_date_time_list_remove (EDateTimeList *date_time_list,
- GtkTreeIter *iter);
-void e_date_time_list_clear (EDateTimeList *date_time_list);
-
-G_END_DECLS
-
-#endif /* E_DATE_TIME_LIST_H */
diff --git a/calendar/gui/e-day-view-config.c b/calendar/gui/e-day-view-config.c
deleted file mode 100644
index 4c10451f40..0000000000
--- a/calendar/gui/e-day-view-config.c
+++ /dev/null
@@ -1,475 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Rodrigo Moya <rodrigo@ximian.com>
- *
- * Copyright 2003, Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 "calendar-config.h"
-#include "e-day-view-config.h"
-
-struct _EDayViewConfigPrivate {
- EDayView *view;
-
- GList *notifications;
-};
-
-static GObjectClass *parent_class = NULL;
-
-/* Property IDs */
-enum props {
- PROP_0,
- PROP_VIEW,
-};
-
-static void
-e_day_view_config_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
-{
- EDayViewConfig *view_config;
- EDayViewConfigPrivate *priv;
-
- view_config = E_DAY_VIEW_CONFIG (object);
- priv = view_config->priv;
-
- switch (property_id) {
- case PROP_VIEW:
- e_day_view_config_set_view (view_config, g_value_get_object (value));
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- break;
- }
-}
-
-static void
-e_day_view_config_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
-{
- EDayViewConfig *view_config;
- EDayViewConfigPrivate *priv;
-
- view_config = E_DAY_VIEW_CONFIG (object);
- priv = view_config->priv;
-
- switch (property_id) {
- case PROP_VIEW:
- g_value_set_object (value, e_day_view_config_get_view (view_config));
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- break;
- }
-}
-
-static void
-e_day_view_config_dispose (GObject *object)
-{
- EDayViewConfig *view_config = E_DAY_VIEW_CONFIG (object);
- EDayViewConfigPrivate *priv;
-
- priv = view_config->priv;
-
- e_day_view_config_set_view (view_config, NULL);
-
- if (G_OBJECT_CLASS (parent_class)->dispose)
- G_OBJECT_CLASS (parent_class)->dispose (object);
-}
-
-static void
-e_day_view_config_finalize (GObject *object)
-{
- EDayViewConfig *view_config = E_DAY_VIEW_CONFIG (object);
- EDayViewConfigPrivate *priv;
-
- priv = view_config->priv;
-
- g_free (priv);
-
- if (G_OBJECT_CLASS (parent_class)->finalize)
- G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-static void
-e_day_view_config_class_init (EDayViewConfigClass *klass)
-{
- GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- GParamSpec *spec;
-
- parent_class = g_type_class_peek_parent (klass);
-
- /* Method override */
- gobject_class->set_property = e_day_view_config_set_property;
- gobject_class->get_property = e_day_view_config_get_property;
- gobject_class->dispose = e_day_view_config_dispose;
- gobject_class->finalize = e_day_view_config_finalize;
-
- spec = g_param_spec_object ("view", NULL, NULL, e_day_view_get_type (),
- G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT);
- g_object_class_install_property (gobject_class, PROP_VIEW, spec);
-}
-
-static void
-e_day_view_config_init (EDayViewConfig *view_config, EDayViewConfigClass *klass)
-{
- view_config->priv = g_new0 (EDayViewConfigPrivate, 1);
-
-}
-
-E_MAKE_TYPE (e_day_view_config, "EDayViewConfig", EDayViewConfig, e_day_view_config_class_init,
- e_day_view_config_init, G_TYPE_OBJECT);
-
-EDayViewConfig *
-e_day_view_config_new (EDayView *day_view)
-{
- EDayViewConfig *view_config;
-
- view_config = g_object_new (e_day_view_config_get_type (), "view", day_view, NULL);
-
- return view_config;
-}
-
-EDayView *
-e_day_view_config_get_view (EDayViewConfig *view_config)
-{
- EDayViewConfigPrivate *priv;
-
- g_return_val_if_fail (view_config != NULL, NULL);
- g_return_val_if_fail (E_IS_DAY_VIEW_CONFIG (view_config), NULL);
-
- priv = view_config->priv;
-
- return priv->view;
-}
-
-static void
-set_timezone (EDayView *day_view)
-{
- char *location;
- icaltimezone *zone;
-
- location = calendar_config_get_timezone ();
- zone = icaltimezone_get_builtin_timezone (location);
- if (!zone)
- zone = icaltimezone_get_utc_timezone ();
-
- e_calendar_view_set_timezone (E_CALENDAR_VIEW (day_view), zone);
-
- g_free (location);
-}
-
-static void
-timezone_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- EDayViewConfig *view_config = data;
- EDayViewConfigPrivate *priv;
-
- priv = view_config->priv;
-
- set_timezone (priv->view);
-}
-
-static void
-set_week_start (EDayView *day_view)
-{
- int week_start_day;
-
- 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 (day_view, week_start_day);
-}
-
-static void
-week_start_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- EDayViewConfig *view_config = data;
- EDayViewConfigPrivate *priv;
-
- priv = view_config->priv;
-
- set_week_start (priv->view);
-}
-
-static void
-set_twentyfour_hour (EDayView *day_view)
-{
- gboolean use_24_hour;
-
- use_24_hour = calendar_config_get_24_hour_format ();
-
- e_calendar_view_set_use_24_hour_format (E_CALENDAR_VIEW (day_view), use_24_hour);
-}
-
-static void
-twentyfour_hour_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- EDayViewConfig *view_config = data;
- EDayViewConfigPrivate *priv;
-
- priv = view_config->priv;
-
- set_twentyfour_hour (priv->view);
-}
-
-static void
-set_working_days (EDayView *day_view)
-{
- CalWeekdays working_days;
-
- working_days = calendar_config_get_working_days ();
-
- e_day_view_set_working_days (day_view, working_days);
-}
-
-static void
-working_days_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- EDayViewConfig *view_config = data;
- EDayViewConfigPrivate *priv;
-
- priv = view_config->priv;
-
- set_working_days (priv->view);
-}
-
-static void
-set_day_start_hour (EDayView *day_view)
-{
- int start_hour, start_minute, end_hour, end_minute;
-
- e_day_view_get_working_day (day_view, &start_hour, &start_minute, &end_hour, &end_minute);
-
- start_hour = calendar_config_get_day_start_hour ();
-
- e_day_view_set_working_day (day_view, start_hour, start_minute, end_hour, end_minute);
-}
-
-static void
-day_start_hour_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- EDayViewConfig *view_config = data;
- EDayViewConfigPrivate *priv;
-
- priv = view_config->priv;
-
- set_day_start_hour (priv->view);
-}
-
-static void
-set_day_start_minute (EDayView *day_view)
-{
- int start_hour, start_minute, end_hour, end_minute;
-
- e_day_view_get_working_day (day_view, &start_hour, &start_minute, &end_hour, &end_minute);
-
- start_minute = calendar_config_get_day_start_minute ();
-
- e_day_view_set_working_day (day_view, start_hour, start_minute, end_hour, end_minute);
-}
-
-static void
-day_start_minute_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- EDayViewConfig *view_config = data;
- EDayViewConfigPrivate *priv;
-
- priv = view_config->priv;
-
- set_day_start_minute (priv->view);
-}
-
-static void
-set_day_end_hour (EDayView *day_view)
-{
- int start_hour, start_minute, end_hour, end_minute;
-
- e_day_view_get_working_day (day_view, &start_hour, &start_minute, &end_hour, &end_minute);
-
- end_hour = calendar_config_get_day_end_hour ();
-
- e_day_view_set_working_day (day_view, start_hour, start_minute, end_hour, end_minute);
-}
-
-static void
-day_end_hour_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- EDayViewConfig *view_config = data;
- EDayViewConfigPrivate *priv;
-
- priv = view_config->priv;
-
- set_day_end_hour (priv->view);
-}
-
-
-static void
-set_day_end_minute (EDayView *day_view)
-{
- int start_hour, start_minute, end_hour, end_minute;
-
- e_day_view_get_working_day (day_view, &start_hour, &start_minute, &end_hour, &end_minute);
-
- end_minute = calendar_config_get_day_end_minute ();
-
- e_day_view_set_working_day (day_view, start_hour, start_minute, end_hour, end_minute);
-}
-
-static void
-day_end_minute_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- EDayViewConfig *view_config = data;
- EDayViewConfigPrivate *priv;
-
- priv = view_config->priv;
-
- set_day_end_minute (priv->view);
-}
-
-static void
-set_time_divisions (EDayView *day_view)
-{
- int time_divisions;
-
- time_divisions = calendar_config_get_time_divisions ();
-
- e_day_view_set_mins_per_row (day_view, time_divisions);
-}
-
-static void
-time_divisions_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- EDayViewConfig *view_config = data;
- EDayViewConfigPrivate *priv;
-
- priv = view_config->priv;
-
- set_time_divisions (priv->view);
-}
-
-static void
-set_show_event_end (EDayView *day_view)
-{
- gboolean show_event_end;
-
- show_event_end = calendar_config_get_show_event_end ();
-
- e_day_view_set_show_event_end_times (day_view, show_event_end);
-}
-
-static void
-show_event_end_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- EDayViewConfig *view_config = data;
- EDayViewConfigPrivate *priv;
-
- priv = view_config->priv;
-
- set_show_event_end (priv->view);
-}
-
-void
-e_day_view_config_set_view (EDayViewConfig *view_config, EDayView *day_view)
-{
- EDayViewConfigPrivate *priv;
- guint not;
- GList *l;
-
- g_return_if_fail (view_config != NULL);
- g_return_if_fail (E_IS_DAY_VIEW_CONFIG (view_config));
-
- priv = view_config->priv;
-
- if (priv->view) {
- g_object_unref (priv->view);
- priv->view = NULL;
- }
-
- for (l = priv->notifications; l; l = l->next)
- calendar_config_remove_notification (GPOINTER_TO_UINT (l->data));
-
- g_list_free (priv->notifications);
- priv->notifications = NULL;
-
- /* If the new view is NULL, return right now */
- if (!day_view)
- return;
-
- priv->view = g_object_ref (day_view);
-
- /* Time zone */
- set_timezone (day_view);
-
- not = calendar_config_add_notification_timezone (timezone_changed_cb, view_config);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
- /* Week start */
- set_week_start (day_view);
-
- not = calendar_config_add_notification_week_start_day (week_start_changed_cb, view_config);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
- /* 24 Hour format */
- set_twentyfour_hour (day_view);
-
- not = calendar_config_add_notification_24_hour_format (twentyfour_hour_changed_cb, view_config);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
- /* Working days */
- set_working_days (day_view);
-
- not = calendar_config_add_notification_working_days (working_days_changed_cb, view_config);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
- /* Day start hour */
- set_day_start_hour (day_view);
-
- not = calendar_config_add_notification_day_start_hour (day_start_hour_changed_cb, view_config);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
- /* Day start minute */
- set_day_start_minute (day_view);
-
- not = calendar_config_add_notification_day_start_minute (day_start_minute_changed_cb, view_config);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
- /* Day end hour */
- set_day_end_hour (day_view);
-
- not = calendar_config_add_notification_day_end_hour (day_end_hour_changed_cb, view_config);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
- /* Day start minute */
- set_day_end_minute (day_view);
-
- not = calendar_config_add_notification_day_end_minute (day_end_minute_changed_cb, view_config);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
- /* Time divisions */
- set_time_divisions (day_view);
-
- not = calendar_config_add_notification_time_divisions (time_divisions_changed_cb, view_config);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
- /* Showing event end */
- set_show_event_end (day_view);
-
- not = calendar_config_add_notification_show_event_end (show_event_end_changed_cb, view_config);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-}
diff --git a/calendar/gui/e-day-view-config.h b/calendar/gui/e-day-view-config.h
deleted file mode 100644
index 105cbb4f07..0000000000
--- a/calendar/gui/e-day-view-config.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
- * JP Rosevear <jpr@ximian.com>
- *
- * Copyright 2003, Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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_CONFIG_H_
-#define _E_DAY_VIEW_CONFIG_H_
-
-#include "e-day-view.h"
-
-G_BEGIN_DECLS
-
-#define E_DAY_VIEW_CONFIG(obj) GTK_CHECK_CAST (obj, e_day_view_config_get_type (), EDayViewConfig)
-#define E_DAY_VIEW_CONFIG_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, e_day_view_config_get_type (), EDayViewConfigClass)
-#define E_IS_DAY_VIEW_CONFIG(obj) GTK_CHECK_TYPE (obj, e_day_view_config_get_type ())
-
-typedef struct _EDayViewConfig EDayViewConfig;
-typedef struct _EDayViewConfigClass EDayViewConfigClass;
-typedef struct _EDayViewConfigPrivate EDayViewConfigPrivate;
-
-struct _EDayViewConfig {
- GObject parent;
-
- EDayViewConfigPrivate *priv;
-};
-
-struct _EDayViewConfigClass {
- GObjectClass parent_class;
-};
-
-GType e_day_view_config_get_type (void);
-EDayViewConfig *e_day_view_config_new (EDayView *day_view);
-EDayView *e_day_view_config_get_view (EDayViewConfig *view_config);
-void e_day_view_config_set_view (EDayViewConfig *view_config, EDayView *day_view);
-
-G_END_DECLS
-
-#endif
diff --git a/calendar/gui/e-day-view-layout.c b/calendar/gui/e-day-view-layout.c
deleted file mode 100644
index ba843b828c..0000000000
--- a/calendar/gui/e-day-view-layout.c
+++ /dev/null
@@ -1,352 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 70d0dd6394..0000000000
--- a/calendar/gui/e-day-view-layout.h
+++ /dev/null
@@ -1,56 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 2b7787ded4..0000000000
--- a/calendar/gui/e-day-view-main-item.c
+++ /dev/null
@@ -1,796 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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"
-#include "ea-calendar.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
-};
-
-E_MAKE_TYPE (e_day_view_main_item, "EDayViewMainItem", EDayViewMainItem,
- e_day_view_main_item_class_init, e_day_view_main_item_init, GNOME_TYPE_CANVAS_ITEM);
-
-static void
-e_day_view_main_item_class_init (EDayViewMainItemClass *class)
-{
- GtkObjectClass *object_class;
- GnomeCanvasItemClass *item_class;
-
- parent_class = g_type_class_peek_parent (class);
-
- 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;
-
- /* init the accessibility support for e_day_view */
- e_day_view_main_item_a11y_init ();
-}
-
-
-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;
- gint row, row_y, grid_x1, grid_x2;
- gint day, grid_y1, grid_y2;
- 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_get_style (GTK_WIDGET (day_view));
-
- /* Paint the background colors. */
- gc = day_view->main_gc;
- work_day_start_y = e_day_view_convert_time_to_position (day_view, day_view->work_day_start_hour, day_view->work_day_start_minute) - y;
- work_day_end_y = e_day_view_convert_time_to_position (day_view, day_view->work_day_end_hour, day_view->work_day_end_minute) - y;
-
- for (day = 0; day < day_view->days_shown; day++) {
- day_start_tt = icaltime_from_timet_with_zone (day_view->day_starts[day], FALSE,
- e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
- 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 (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;
-
- if (GTK_WIDGET_HAS_FOCUS(day_view))
- gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_BG_SELECTED]);
- else
- gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_BG_SELECTED_UNFOCUSSED]);
- 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;
- ECalComponentTransparency 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++) {
- ECalComponent *comp;
-
- event = &g_array_index (day_view->events[day], EDayViewEvent,
- event_num);
-
- comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
-
- /* If the event is TRANSPARENT, skip it. */
- e_cal_component_get_transparency (comp, &transparency);
- if (transparency == E_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);
-
- g_object_unref (comp);
- }
-}
-
-
-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;
- ECalComponentTransparency 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++) {
- ECalComponent *comp;
-
- event = &g_array_index (day_view->long_events, EDayViewEvent,
- event_num);
-
- comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
-
- /* If the event is TRANSPARENT, skip it. */
- e_cal_component_get_transparency (comp, &transparency);
- if (transparency == E_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);
- }
- }
-
-
- g_object_unref (comp);
- }
-}
-
-
-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;
- GdkColor bg_color;
- ECalComponent *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, draw_meeting_icon;
- GSList *categories_list, *elem;
- ECalComponentTransparency 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;
-
- /* 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 event 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 (gdk_color_parse (e_cal_model_get_color_for_component (e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)), event->comp_data),
- &bg_color)) {
- GdkColormap *colormap;
-
- colormap = gtk_widget_get_colormap (GTK_WIDGET (day_view));
- if (gdk_colormap_alloc_color (colormap, &bg_color, TRUE, TRUE))
- gdk_gc_set_foreground (gc, &bg_color);
- }
-
-#if 1
- if (event->start_row_or_col == 0)
- gdk_draw_rectangle (drawable, 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, gc, TRUE,
- item_x + 1, item_y + 1,
- MAX (item_w - 2, 0), item_h - 2);
-
- gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_EVENT_VBAR]);
-
- /* 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_CALENDAR_VIEW_POS_NONE
- && day_view->resize_event_day == day
- && day_view->resize_event_num == event_num) {
- if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_TOP_EDGE)
- bar_y1 = item_y + 1;
- else if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_BOTTOM_EDGE)
- bar_y2 = item_y + item_h - 1;
- }
-
- comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
-
- /* Only fill it in if the event isn't TRANSPARENT. */
- e_cal_component_get_transparency (comp, &transparency);
- if (transparency != E_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;
- draw_meeting_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;
-
- if (e_cal_component_has_alarms (comp)) {
- draw_reminder_icon = TRUE;
- num_icons++;
- }
-
- if (e_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++;
- }
-
- if (e_cal_component_has_organizer (comp)) {
- draw_meeting_icon = TRUE;
- num_icons++;
- }
-
- e_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;
- if (e_categories_config_get_icon_for (category, &pixmap, &mask))
- num_icons++;
- }
-
- if (num_icons != 0) {
- if (item_h >= (E_DAY_VIEW_ICON_HEIGHT + E_DAY_VIEW_ICON_Y_PAD)
- * num_icons) {
- icon_x_inc = 0;
- icon_y_inc = E_DAY_VIEW_ICON_HEIGHT
- + E_DAY_VIEW_ICON_Y_PAD;
- } else {
- icon_x_inc = E_DAY_VIEW_ICON_WIDTH
- + E_DAY_VIEW_ICON_X_PAD;
- icon_y_inc = 0;
- }
-
- if (draw_reminder_icon) {
- max_icon_w = item_x + item_w - icon_x
- - E_DAY_VIEW_EVENT_BORDER_WIDTH;
- max_icon_h = item_y + item_h - icon_y
- - E_DAY_VIEW_EVENT_BORDER_HEIGHT;
-
- gdk_gc_set_clip_origin (gc, icon_x, icon_y);
- gdk_gc_set_clip_mask (gc, day_view->reminder_mask);
- gdk_draw_pixmap (drawable, gc,
- day_view->reminder_icon,
- 0, 0, icon_x, icon_y,
- MIN (E_DAY_VIEW_ICON_WIDTH,
- max_icon_w),
- MIN (E_DAY_VIEW_ICON_HEIGHT,
- max_icon_h));
- icon_x += icon_x_inc;
- icon_y += icon_y_inc;
- }
-
- if (draw_recurrence_icon) {
- max_icon_w = item_x + item_w - icon_x
- - E_DAY_VIEW_EVENT_BORDER_WIDTH;
- max_icon_h = item_y + item_h - icon_y
- - E_DAY_VIEW_EVENT_BORDER_HEIGHT;
-
- gdk_gc_set_clip_origin (gc, icon_x, icon_y);
- gdk_gc_set_clip_mask (gc, day_view->recurrence_mask);
- gdk_draw_pixmap (drawable, gc,
- day_view->recurrence_icon,
- 0, 0, icon_x, icon_y,
- MIN (E_DAY_VIEW_ICON_WIDTH,
- max_icon_w),
- MIN (E_DAY_VIEW_ICON_HEIGHT,
- max_icon_h));
-
- 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;
- }
-
-
- if (draw_meeting_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->meeting_mask);
- gdk_draw_pixmap (drawable, gc,
- day_view->meeting_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;
- if (!e_categories_config_get_icon_for (category, &pixmap, &mask))
- 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 */
- e_cal_component_free_categories_list (categories_list);
- g_object_unref (comp);
-}
-
-
-/* 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 be7f130606..0000000000
--- a/calendar/gui/e-day-view-main-item.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 d70b0fd861..0000000000
--- a/calendar/gui/e-day-view-time-item.c
+++ /dev/null
@@ -1,671 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <string.h>
-#include <glib.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkradiomenuitem.h>
-#include <gtk/gtkcheckmenuitem.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
-};
-
-E_MAKE_TYPE (e_day_view_time_item, "EDayViewTimeItem", EDayViewTimeItem,
- e_day_view_time_item_class_init, e_day_view_time_item_init, GNOME_TYPE_CANVAS_ITEM);
-
-static void
-e_day_view_time_item_class_init (EDayViewTimeItemClass *class)
-{
- GtkObjectClass *object_class;
- GnomeCanvasItemClass *item_class;
-
- parent_class = g_type_class_peek_parent (class);
-
- 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;
- 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;
- PangoContext *context;
-
- day_view = dvtmitem->day_view;
- g_return_val_if_fail (day_view != NULL, 0);
-
- style = gtk_widget_get_style (GTK_WIDGET (day_view));
- g_return_val_if_fail (style != NULL, 0);
-
- context = gtk_widget_get_pango_context (GTK_WIDGET (day_view));
-
- /* Find the maximum width a digit can have. FIXME: We could use pango's
- * approximation function, but I worry it won't be precise enough. Also
- * it needs a language tag that I don't know where to get. */
- for (digit = '0'; digit <= '9'; digit++) {
- PangoLayout *layout;
- gchar digit_str [2];
-
- digit_str [0] = digit;
- digit_str [1] = '\0';
-
- layout = gtk_widget_create_pango_layout (GTK_WIDGET (day_view), digit_str);
- pango_layout_set_font_description (layout, day_view->large_font_desc);
- pango_layout_get_pixel_size (layout, &large_digit_width, NULL);
- g_object_unref (layout);
-
- 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;
- 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;
- PangoLayout *layout;
- PangoContext *context;
- PangoFontDescription *small_font_desc;
- PangoFontMetrics *large_font_metrics, *small_font_metrics;
-
- dvtmitem = E_DAY_VIEW_TIME_ITEM (canvas_item);
- day_view = dvtmitem->day_view;
- g_return_if_fail (day_view != NULL);
-
- style = gtk_widget_get_style (GTK_WIDGET (day_view));
- small_font_desc = style->font_desc;
-
- context = gtk_widget_get_pango_context (GTK_WIDGET (day_view));
- large_font_metrics = pango_context_get_metrics (context, day_view->large_font_desc,
- pango_context_get_language (context));
- small_font_metrics = pango_context_get_metrics (context, small_font_desc,
- pango_context_get_language (context));
-
- 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 = E_DVTMI_LARGE_HOUR_Y_PAD;
-
- /* The offset of the small time/minute string from top of row. */
- small_font_y_offset = 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,
- (pango_font_metrics_get_ascent (large_font_metrics) +
- pango_font_metrics_get_descent (large_font_metrics)) / PANGO_SCALE +
- E_DVTMI_LARGE_HOUR_Y_PAD);
-
- /* 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 (e_calendar_view_get_use_24_hour_format (E_CALENDAR_VIEW (day_view))) {
- g_snprintf (buffer, sizeof (buffer), "%i:%02i",
- display_hour, minute);
- } else {
- g_snprintf (buffer, sizeof (buffer), "%i %s",
- display_hour, suffix);
- }
-
- layout = gtk_widget_create_pango_layout (GTK_WIDGET (day_view), buffer);
- pango_layout_get_pixel_size (layout, &minute_width, NULL);
- gdk_draw_layout (drawable, fg_gc,
- minute_x2 - minute_width,
- row_y + small_font_y_offset,
- layout);
- g_object_unref (layout);
- } 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);
-
- layout = gtk_widget_create_pango_layout (GTK_WIDGET (day_view), buffer);
- pango_layout_set_font_description (layout, day_view->large_font_desc);
- pango_layout_get_pixel_size (layout, &hour_width, NULL);
- gdk_draw_layout (drawable, fg_gc,
- large_hour_x2 - hour_width,
- row_y + large_hour_y_offset,
- layout);
- g_object_unref (layout);
- } 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
- && !e_calendar_view_get_use_24_hour_format (E_CALENDAR_VIEW (day_view))) {
- strcpy (buffer, suffix);
- } else {
- g_snprintf (buffer, sizeof (buffer),
- "%02i", minute);
- }
-
- layout = gtk_widget_create_pango_layout (GTK_WIDGET (day_view), buffer);
- pango_layout_get_pixel_size (layout, &minute_width, NULL);
- gdk_draw_layout (drawable, fg_gc,
- minute_x2 - minute_width,
- row_y + small_font_y_offset,
- layout);
- g_object_unref (layout);
- }
- }
-
- e_day_view_time_item_increment_time (&hour, &minute,
- day_view->mins_per_row);
- }
-
- pango_font_metrics_unref (large_font_metrics);
- pango_font_metrics_unref (small_font_metrics);
-}
-
-
-/* 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_selection_done (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);
-
- g_object_set_data (G_OBJECT (item), "divisions",
- GINT_TO_POINTER (divisions[i]));
-
- g_signal_connect (item, "toggled",
- G_CALLBACK (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_get_active (GTK_CHECK_MENU_ITEM (item)))
- return;
-
- divisions = GPOINTER_TO_INT (g_object_get_data (G_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 f425363c98..0000000000
--- a/calendar/gui/e-day-view-time-item.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 d2f60d7e7d..0000000000
--- a/calendar/gui/e-day-view-top-item.c
+++ /dev/null
@@ -1,701 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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-i18n.h>
-#include <gal/util/e-util.h>
-#include "e-util/e-categories-config.h"
-#include <libecal/e-cal-time-util.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
-};
-
-E_MAKE_TYPE (e_day_view_top_item, "EDayViewTopItem", EDayViewTopItem, e_day_view_top_item_class_init,
- e_day_view_top_item_init, GNOME_TYPE_CANVAS_ITEM);
-
-static void
-e_day_view_top_item_class_init (EDayViewTopItemClass *class)
-{
- GtkObjectClass *object_class;
- GnomeCanvasItemClass *item_class;
-
- parent_class = g_type_class_peek_parent (class);
-
- 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];
- GdkRectangle clip_rect;
- gint canvas_width, canvas_height, left_edge, day, date_width, date_x;
- gint item_height, event_num;
- PangoLayout *layout;
-
-#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_get_style (GTK_WIDGET (day_view));
- 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++) {
- e_day_view_top_item_get_day_label (day_view, day,
- buffer, sizeof (buffer));
- 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);
-
- layout = gtk_widget_create_pango_layout (GTK_WIDGET (day_view), buffer);
- pango_layout_get_pixel_size (layout, &date_width, NULL);
- date_x = day_view->day_offsets[day] + (day_view->day_widths[day] - date_width) / 2;
-
- gdk_draw_layout (drawable, fg_gc,
- date_x - x,
- 3 - y,
- layout);
- g_object_unref (layout);
-
- 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;
- gint start_day, end_day;
- gint item_x, item_y, item_w, item_h;
- gint text_x, icon_x, icon_y, icon_x_inc;
- ECalComponent *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;
- PangoLayout *layout;
- GdkColor bg_color;
-
- 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_get_style (GTK_WIDGET (day_view));
- gc = day_view->main_gc;
- fg_gc = style->fg_gc[GTK_STATE_NORMAL];
- bg_gc = style->bg_gc[GTK_STATE_NORMAL];
- comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
-
- /* 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. */
- if (gdk_color_parse (e_cal_model_get_color_for_component (e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)),
- event->comp_data),
- &bg_color)) {
- GdkColormap *colormap;
-
- colormap = gtk_widget_get_colormap (GTK_WIDGET (day_view));
- if (gdk_colormap_alloc_color (colormap, &bg_color, TRUE, TRUE))
- gdk_gc_set_foreground (gc, &bg_color);
- else
- gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BACKGROUND]);
- } else
- 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_CALENDAR_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_CALENDAR_VIEW_POS_LEFT_EDGE)
- draw_start_triangle = FALSE;
-
- if (day_view->resize_drag_pos == E_CALENDAR_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 (e_calendar_view_get_use_24_hour_format (E_CALENDAR_VIEW (day_view))) {
- 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;
-
- layout = gtk_widget_create_pango_layout (GTK_WIDGET (day_view), buffer);
- gdk_draw_layout (drawable, fg_gc,
- time_x,
- item_y + E_DAY_VIEW_LONG_EVENT_BORDER_HEIGHT +
- E_DAY_VIEW_LONG_EVENT_Y_PAD - y,
- layout);
- g_object_unref (layout);
-
- 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 (e_calendar_view_get_use_24_hour_format (E_CALENDAR_VIEW (day_view))) {
- 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;
-
- layout = gtk_widget_create_pango_layout (GTK_WIDGET (day_view), buffer);
- gdk_draw_layout (drawable, fg_gc,
- time_x,
- item_y + E_DAY_VIEW_LONG_EVENT_Y_PAD + 1 - y,
- layout);
- g_object_unref (layout);
-
- 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 && e_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 && e_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 */
- e_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);
- }
-
- e_cal_component_free_categories_list (categories_list);
- g_object_unref (comp);
-
- 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;
-}
-
-void
-e_day_view_top_item_get_day_label (EDayView *day_view, gint day,
- gchar *buffer, gint buffer_len)
-{
- struct icaltimetype day_start_tt;
- struct tm day_start = { 0 };
- gchar *format;
-
- day_start_tt = icaltime_from_timet_with_zone (day_view->day_starts[day],
- FALSE,
- e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
- 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";
-
- e_utf8_strftime (buffer, buffer_len, format, &day_start);
-}
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 9b8342af99..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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);
-void e_day_view_top_item_get_day_label (EDayView *day_view, gint day,
- gchar *buffer, gint buffer_len);
-
-
-#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 0c08468a7d..0000000000
--- a/calendar/gui/e-day-view.c
+++ /dev/null
@@ -1,7229 +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-2003, Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 "ea-calendar.h"
-
-#include <math.h>
-#include <time.h>
-#include <gdk/gdkkeysyms.h>
-#include <gdk/gdkx.h>
-#include <gtk/gtkdnd.h>
-#include <gtk/gtkmain.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkvscrollbar.h>
-#include <gtk/gtkwindow.h>
-#include <gal/e-text/e-text.h>
-#include <gal/widgets/e-canvas-utils.h>
-#include <gal/widgets/e-popup-menu.h>
-#include <gal/widgets/e-gui-utils.h>
-#include <gal/widgets/e-unicode.h>
-#include <gal/util/e-util.h>
-#include <libgnomecanvas/gnome-canvas-rect-ellipse.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnome/gnome-exec.h>
-#include <libgnome/gnome-util.h>
-#include <e-util/e-categories-config.h>
-#include <e-util/e-dialog-utils.h>
-
-#include <libecal/e-cal-time-util.h>
-#include "dialogs/delete-comp.h"
-#include "dialogs/delete-error.h"
-#include "dialogs/send-comp.h"
-#include "dialogs/cancel-comp.h"
-#include "dialogs/recur-comp.h"
-#include "print.h"
-#include "comp-util.h"
-#include "itip-utils.h"
-#include "calendar-commands.h"
-#include "calendar-config.h"
-#include "goto.h"
-#include "e-cal-model-calendar.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"
-#include "misc.h"
-
-/* Images */
-#include "art/bell.xpm"
-#include "art/recur.xpm"
-#include "art/timezone-16.xpm"
-#include "art/schedule-meeting-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_PTSIZE 18
-
-/* 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
-
-typedef struct {
- EDayView *day_view;
- ECalModelComponent *comp_data;
-} AddEventData;
-
-/* Drag and Drop stuff. */
-enum {
- TARGET_CALENDAR_EVENT,
- TARGET_VCALENDAR
-};
-static GtkTargetEntry target_table[] = {
- { "application/x-e-calendar-event", 0, TARGET_CALENDAR_EVENT },
- { "text/x-calendar", 0, TARGET_VCALENDAR },
- { "text/calendar", 0, TARGET_VCALENDAR }
-};
-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 gboolean e_day_view_key_press (GtkWidget *widget,
- GdkEventKey *event);
-static gboolean e_day_view_focus (GtkWidget *widget,
- GtkDirectionType direction);
-static gboolean e_day_view_get_next_tab_event (EDayView *day_view,
- GtkDirectionType direction,
- gint *day, gint *event_num);
-static gboolean e_day_view_get_extreme_long_event (EDayView *day_view,
- gboolean first,
- gint *day_out,
- gint *event_num_out);
-static gboolean e_day_view_get_extreme_event (EDayView *day_view,
- gint start_day,
- gint end_day,
- gboolean first,
- gint *day_out,
- gint *event_num_out);
-static gboolean e_day_view_do_key_press (GtkWidget *widget,
- GdkEventKey *event);
-static gboolean e_day_view_popup_menu (GtkWidget *widget);
-static GList *e_day_view_get_selected_events (ECalendarView *cal_view);
-static void e_day_view_get_selected_time_range (ECalendarView *cal_view, time_t *start_time, time_t *end_time);
-static void e_day_view_set_selected_time_range (ECalendarView *cal_view, time_t start_time, time_t end_time);
-static gboolean e_day_view_get_visible_time_range (ECalendarView *cal_view, time_t *start_time, time_t *end_time);
-static void e_day_view_update_query (ECalendarView *cal_view);
-static void e_day_view_goto_start_of_work_day (EDayView *day_view);
-static void e_day_view_goto_end_of_work_day (EDayView *day_view);
-static void e_day_view_change_duration_to_start_of_work_day (EDayView *day_view);
-static void e_day_view_change_duration_to_end_of_work_day (EDayView *day_view);
-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_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_main_canvas_scroll (GtkWidget *widget,
- GdkEventScroll *scroll,
- EDayView *day_view);
-
-static gboolean e_day_view_on_time_canvas_scroll (GtkWidget *widget,
- GdkEventScroll *scroll,
- 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,
- ECalendarViewPosition 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,
- ECalendarViewPosition pos,
- gint event_x,
- gint event_y);
-static void e_day_view_on_long_event_click (EDayView *day_view,
- gint event_num,
- GdkEventButton *bevent,
- ECalendarViewPosition 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,
- ECalendarViewPosition 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_show_popup_menu (EDayView *day_view,
- GdkEvent *gdk_event,
- 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 ECalendarViewPosition e_day_view_convert_position_in_top_canvas (EDayView *day_view,
- gint x,
- gint y,
- gint *day_return,
- gint *event_num_return);
-static ECalendarViewPosition 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_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 (ECalComponent *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_change_event_end_time_up (EDayView *day_view);
-static void e_day_view_change_event_end_time_down (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 EDayViewEvent* e_day_view_get_popup_menu_event (EDayView *day_view);
-
-static gboolean 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 gboolean 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 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;
-
-E_MAKE_TYPE (e_day_view, "EDayView", EDayView, e_day_view_class_init,
- e_day_view_init, e_calendar_view_get_type ());
-
-static void
-e_day_view_class_init (EDayViewClass *class)
-{
- GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
- ECalendarViewClass *view_class;
-
- parent_class = g_type_class_peek_parent (class);
- object_class = (GtkObjectClass *) class;
- widget_class = (GtkWidgetClass *) class;
- view_class = (ECalendarViewClass *) class;
-
- /* Method override */
- object_class->destroy = e_day_view_destroy;
-
- widget_class->realize = e_day_view_realize;
- widget_class->unrealize = e_day_view_unrealize;
- widget_class->style_set = e_day_view_style_set;
- widget_class->size_allocate = e_day_view_size_allocate;
- widget_class->focus_in_event = e_day_view_focus_in;
- widget_class->focus_out_event = e_day_view_focus_out;
- widget_class->key_press_event = e_day_view_key_press;
- widget_class->focus = e_day_view_focus;
- widget_class->popup_menu = e_day_view_popup_menu;
-
- view_class->get_selected_events = e_day_view_get_selected_events;
- view_class->get_selected_time_range = e_day_view_get_selected_time_range;
- view_class->set_selected_time_range = e_day_view_set_selected_time_range;
- view_class->get_visible_time_range = e_day_view_get_visible_time_range;
- view_class->update_query = e_day_view_update_query;
-
- /* init the accessibility support for e_day_view */
- e_day_view_a11y_init ();
-}
-
-static void
-timezone_changed_cb (ECalendarView *cal_view, icaltimezone *old_zone,
- icaltimezone *new_zone, gpointer user_data)
-{
- struct icaltimetype tt;
- time_t lower;
- EDayView *day_view = (EDayView *) cal_view;
-
- g_return_if_fail (E_IS_DAY_VIEW (day_view));
-
- /* 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, new_zone);
-
- e_day_view_recalc_day_starts (day_view, lower);
- e_day_view_update_query ((ECalendarView *) day_view);
-}
-
-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->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->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_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_CALENDAR_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->large_font_desc = NULL;
-
- /* 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);
- g_signal_connect_after (day_view->top_canvas, "button_press_event",
- G_CALLBACK (e_day_view_on_top_canvas_button_press), day_view);
- g_signal_connect (day_view->top_canvas, "button_release_event",
- G_CALLBACK (e_day_view_on_top_canvas_button_release), day_view);
- g_signal_connect (day_view->top_canvas, "motion_notify_event",
- G_CALLBACK (e_day_view_on_top_canvas_motion), day_view);
- g_signal_connect (day_view->top_canvas, "drag_motion",
- G_CALLBACK (e_day_view_on_top_canvas_drag_motion), day_view);
- g_signal_connect (day_view->top_canvas, "drag_leave",
- G_CALLBACK (e_day_view_on_top_canvas_drag_leave), day_view);
-
- g_signal_connect (day_view->top_canvas, "drag_begin",
- G_CALLBACK (e_day_view_on_drag_begin), day_view);
- g_signal_connect (day_view->top_canvas, "drag_end",
- G_CALLBACK (e_day_view_on_drag_end), day_view);
- g_signal_connect (day_view->top_canvas, "drag_data_get",
- G_CALLBACK (e_day_view_on_drag_data_get), day_view);
- g_signal_connect (day_view->top_canvas, "drag_data_received",
- G_CALLBACK (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(),
- "width_pixels", 1,
- 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);
- g_signal_connect (day_view->main_canvas, "realize",
- G_CALLBACK (e_day_view_on_canvas_realized), day_view);
-
- g_signal_connect (day_view->main_canvas,
- "button_press_event",
- G_CALLBACK (e_day_view_on_main_canvas_button_press),
- day_view);
- g_signal_connect (day_view->main_canvas,
- "button_release_event",
- G_CALLBACK (e_day_view_on_main_canvas_button_release),
- day_view);
- g_signal_connect (day_view->main_canvas,
- "scroll_event",
- G_CALLBACK (e_day_view_on_main_canvas_scroll),
- day_view);
- g_signal_connect (day_view->main_canvas,
- "motion_notify_event",
- G_CALLBACK (e_day_view_on_main_canvas_motion),
- day_view);
- g_signal_connect (day_view->main_canvas,
- "drag_motion",
- G_CALLBACK (e_day_view_on_main_canvas_drag_motion),
- day_view);
- g_signal_connect (day_view->main_canvas,
- "drag_leave",
- G_CALLBACK (e_day_view_on_main_canvas_drag_leave),
- day_view);
-
- g_signal_connect (day_view->main_canvas, "drag_begin",
- G_CALLBACK (e_day_view_on_drag_begin), day_view);
- g_signal_connect (day_view->main_canvas, "drag_end",
- G_CALLBACK (e_day_view_on_drag_end), day_view);
- g_signal_connect (day_view->main_canvas, "drag_data_get",
- G_CALLBACK (e_day_view_on_drag_data_get), day_view);
- g_signal_connect (day_view->main_canvas, "drag_data_received",
- G_CALLBACK (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(),
- "width_pixels", 1,
- 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(),
- "width_pixels", 1,
- 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);
- g_signal_connect_after (day_view->time_canvas, "scroll_event",
- G_CALLBACK (e_day_view_on_time_canvas_scroll), 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);
-
- /* connect to ECalendarView's signals */
- g_signal_connect (G_OBJECT (day_view), "timezone_changed",
- G_CALLBACK (timezone_changed_cb), 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;
- ECalModel *model;
-
- model = E_CAL_MODEL (e_cal_model_calendar_new ());
-
- day_view = GTK_WIDGET (g_object_new (e_day_view_get_type (), "model", model, NULL));
-
- g_object_unref (model);
-
- 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->query) {
- g_signal_handlers_disconnect_matched (day_view->query, G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL, day_view);
- g_object_unref (day_view->query);
- day_view->query = NULL;
- }
-
- if (day_view->large_font_desc) {
- pango_font_description_free (day_view->large_font_desc);
- day_view->large_font_desc = NULL;
- }
-
- if (day_view->normal_cursor) {
- gdk_cursor_unref (day_view->normal_cursor);
- day_view->normal_cursor = NULL;
- }
- if (day_view->move_cursor) {
- gdk_cursor_unref (day_view->move_cursor);
- day_view->move_cursor = NULL;
- }
- if (day_view->resize_width_cursor) {
- gdk_cursor_unref (day_view->resize_width_cursor);
- day_view->resize_width_cursor = NULL;
- }
- if (day_view->resize_height_cursor) {
- gdk_cursor_unref (day_view->resize_height_cursor);
- day_view->resize_height_cursor = NULL;
- }
-
- if (day_view->long_events) {
- 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++) {
- if (day_view->events[day]) {
- g_array_free (day_view->events[day], TRUE);
- day_view->events[day] = NULL;
- }
- }
-
- 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_SELECTED_UNFOCUSSED].red = 16 * 257;
- day_view->colors[E_DAY_VIEW_COLOR_BG_SELECTED_UNFOCUSSED].green = 78 * 257;
- day_view->colors[E_DAY_VIEW_COLOR_BG_SELECTED_UNFOCUSSED].blue = 139 * 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);
- day_view->meeting_icon = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &day_view->meeting_mask, NULL, schedule_meeting_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;
-
- day_view = E_DAY_VIEW (widget);
-
- gdk_gc_unref (day_view->main_gc);
- day_view->main_gc = NULL;
-
- colormap = gtk_widget_get_colormap (widget);
- gdk_colormap_free_colors (colormap, day_view->colors, E_DAY_VIEW_COLOR_LAST);
-
- 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;
- 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;
- PangoFontDescription *font_desc;
- PangoContext *pango_context;
- PangoFontMetrics *font_metrics;
- PangoLayout *layout;
-
- if (GTK_WIDGET_CLASS (parent_class)->style_set)
- (*GTK_WIDGET_CLASS (parent_class)->style_set)(widget, previous_style);
-
- day_view = E_DAY_VIEW (widget);
-
- /* Set up Pango prerequisites */
- font_desc = gtk_widget_get_style (widget)->font_desc;
- pango_context = gtk_widget_get_pango_context (widget);
- font_metrics = pango_context_get_metrics (pango_context, font_desc,
- pango_context_get_language (pango_context));
- layout = pango_layout_new (pango_context);
-
- /* Create the large font. */
- if (day_view->large_font_desc != NULL)
- pango_font_description_free (day_view->large_font_desc);
-
- day_view->large_font_desc = pango_font_description_copy (font_desc);
- pango_font_description_set_size (day_view->large_font_desc,
- E_DAY_VIEW_LARGE_FONT_PTSIZE * PANGO_SCALE);
-
- /* Recalculate the height of each row based on the font size. */
- day_view->row_height =
- PANGO_PIXELS (pango_font_metrics_get_ascent (font_metrics)) +
- PANGO_PIXELS (pango_font_metrics_get_descent (font_metrics)) +
- 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 =
- PANGO_PIXELS (pango_font_metrics_get_ascent (font_metrics)) +
- PANGO_PIXELS (pango_font_metrics_get_descent (font_metrics)) +
- 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;
-
- e_utf8_strftime (buffer, sizeof (buffer), "%B", &date_tm);
- pango_layout_set_text (layout, buffer, -1);
- pango_layout_get_pixel_size (layout, &width, NULL);
-
- if (width > longest_month_width) {
- longest_month_width = width;
- day_view->longest_month_name = month;
- }
-
- e_utf8_strftime (buffer, sizeof (buffer), "%b", &date_tm);
- pango_layout_set_text (layout, buffer, -1);
- pango_layout_get_pixel_size (layout, &width, NULL);
-
- 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;
-
- e_utf8_strftime (buffer, sizeof (buffer), "%A", &date_tm);
- pango_layout_set_text (layout, buffer, -1);
- pango_layout_get_pixel_size (layout, &width, NULL);
-
- if (width > longest_weekday_width) {
- longest_weekday_width = width;
- day_view->longest_weekday_name = day;
- }
-
- e_utf8_strftime (buffer, sizeof (buffer), "%a", &date_tm);
- pango_layout_set_text (layout, buffer, -1);
- pango_layout_get_pixel_size (layout, &width, NULL);
-
- 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);
- pango_layout_set_text (layout, buffer, -1);
- pango_layout_get_pixel_size (layout, &day_view->small_hour_widths [hour], NULL);
-
- 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);
- pango_layout_set_text (layout, buffer, -1);
- pango_layout_get_pixel_size (layout, &minute_width, NULL);
-
- max_minute_width = MAX (max_minute_width, minute_width);
- }
- day_view->max_minute_width = max_minute_width;
-
- pango_layout_set_text (layout, ":", 1);
- pango_layout_get_pixel_size (layout, &day_view->colon_width, NULL);
- pango_layout_set_text (layout, "0", 1);
- pango_layout_get_pixel_size (layout, &day_view->digit_width, NULL);
-
- pango_layout_set_text (layout, day_view->am_string, -1);
- pango_layout_get_pixel_size (layout, &day_view->am_string_width, NULL);
- pango_layout_set_text (layout, day_view->pm_string, -1);
- pango_layout_get_pixel_size (layout, &day_view->pm_string_width, NULL);
-
- /* 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);
-
- g_object_unref (layout);
- pango_font_metrics_unref (font_metrics);
-}
-
-
-/* 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;
- char buffer[128];
- PangoFontDescription *font_desc;
- PangoContext *pango_context;
- PangoLayout *layout;
- gint pango_width;
-
- g_return_if_fail (((GtkWidget*)day_view)->style != NULL);
-
- /* Set up Pango prerequisites */
- font_desc = gtk_widget_get_style (GTK_WIDGET (day_view))->font_desc;
- pango_context = gtk_widget_get_pango_context (GTK_WIDGET (day_view));
- layout = pango_layout_new (pango_context);
-
- /* 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. */
- e_utf8_strftime (buffer, sizeof (buffer), _("%A %d %B"), &date_tm);
- pango_layout_set_text (layout, buffer, -1);
- pango_layout_get_pixel_size (layout, &pango_width, NULL);
-
- if (pango_width < 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. */
- e_utf8_strftime (buffer, sizeof (buffer), _("%a %d %b"), &date_tm);
- pango_layout_set_text (layout, buffer, -1);
- pango_layout_get_pixel_size (layout, &pango_width, NULL);
-
- if (pango_width < 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. */
- e_utf8_strftime (buffer, sizeof (buffer), _("%d %b"), &date_tm);
- pango_layout_set_text (layout, buffer, -1);
- pango_layout_get_pixel_size (layout, &pango_width, NULL);
-
- if (pango_width < max_width)
- day_view->date_format = E_DAY_VIEW_DATE_NO_WEEKDAY;
- else
- day_view->date_format = E_DAY_VIEW_DATE_SHORT;
-
- g_object_unref (layout);
-}
-
-
-static gint
-e_day_view_focus_in (GtkWidget *widget, GdkEventFocus *event)
-{
- EDayView *day_view;
-
- g_return_val_if_fail (widget != NULL, FALSE);
- g_return_val_if_fail (E_IS_DAY_VIEW (widget), FALSE);
- g_return_val_if_fail (event != NULL, FALSE);
-
- day_view = E_DAY_VIEW (widget);
-
- GTK_WIDGET_SET_FLAGS (widget, GTK_HAS_FOCUS);
-
- gtk_widget_queue_draw (day_view->top_canvas);
- gtk_widget_queue_draw (day_view->main_canvas);
-
- return FALSE;
-}
-
-
-static gint
-e_day_view_focus_out (GtkWidget *widget, GdkEventFocus *event)
-{
- EDayView *day_view;
-
- g_return_val_if_fail (widget != NULL, FALSE);
- g_return_val_if_fail (E_IS_DAY_VIEW (widget), FALSE);
- g_return_val_if_fail (event != NULL, FALSE);
-
- day_view = E_DAY_VIEW (widget);
-
- GTK_WIDGET_UNSET_FLAGS (widget, GTK_HAS_FOCUS);
-
- gtk_widget_queue_draw (day_view->top_canvas);
- gtk_widget_queue_draw (day_view->main_canvas);
-
- return FALSE;
-}
-
-static gboolean
-e_day_view_update_event_cb (EDayView *day_view,
- gint day,
- gint event_num,
- gpointer data)
-{
- EDayViewEvent *event;
- ECalModelComponent *comp_data;
-
- comp_data = 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);
- }
-
- if (event->allocated_comp_data)
- e_cal_model_free_component_data (event->comp_data);
- event->comp_data = comp_data;
- event->allocated_comp_data = FALSE;
-
- 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);
- }
-
- g_signal_emit_by_name (G_OBJECT(day_view),
- "event_changed", event);
-
- 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);
-
- u = icalcomponent_get_uid (event->comp_data->icalcomp);
- 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);
-
- u = icalcomponent_get_uid (event->comp_data->icalcomp);
- 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));
-
- if (event->allocated_comp_data) {
- e_cal_model_free_component_data (event->comp_data);
- event->allocated_comp_data = FALSE;
- }
-
- 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;
- const gchar *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;
-
- summary = icalcomponent_get_summary (event->comp_data->icalcomp);
- text = summary ? (char *) summary : "";
-
- if (day_view->editing_event_day == day
- && day_view->editing_event_num == event_num)
- editing_event = TRUE;
-
- if (!editing_event
- && (event->start_minute % day_view->mins_per_row != 0
- || (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 (e_calendar_view_get_use_24_hour_format (E_CALENDAR_VIEW (day_view))) {
- 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;
- const gchar *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;
-
- summary = icalcomponent_get_summary (event->comp_data->icalcomp);
- gnome_canvas_item_set (event->canvas_item,
- "text", summary ? summary : "",
- NULL);
-}
-
-
-/* Finds the day and index of the event with the given canvas item.
- If is is a long event, -1 is returned as the day.
- Returns TRUE if the event was found. */
-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;
-
- if (!uid)
- return FALSE;
-
- 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);
-
- u = icalcomponent_get_uid (event->comp_data->icalcomp);
- 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);
-
- u = icalcomponent_get_uid (event->comp_data->icalcomp);
- 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. */
-static void
-e_day_view_set_selected_time_range (ECalendarView *cal_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;
- EDayView *day_view = E_DAY_VIEW (cal_view);
-
- 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, e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
- } 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);
- e_day_view_update_query ((ECalendarView *) 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);
- }
-}
-
-static void
-e_day_view_set_selected_time_range_in_top_visible (EDayView *day_view,
- time_t start_time,
- time_t end_time)
-{
- 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));
-
- /* 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 (!start_in_grid)
- start_col = 0;
- if (!end_in_grid)
- end_col = day_view->days_shown - 1;
-
- if (start_row != day_view->selection_start_row
- || start_col != day_view->selection_start_day) {
- need_redraw = TRUE;
- day_view->selection_in_top_canvas = TRUE;
- day_view->selection_start_row = -1;
- 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 = TRUE;
- day_view->selection_end_row = -1;
- 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);
- }
-}
-
-static void
-e_day_view_set_selected_time_range_visible (EDayView *day_view,
- time_t start_time,
- time_t end_time)
-{
- 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));
-
- /* 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;
- guint offset;
- struct icaltimetype tt = icaltime_null_time ();
-
- time_to_gdate_with_zone (&date, start_time, e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
-
- /* 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. */
- if (weekday < day) {
- offset = (day - weekday) % 7;
- g_date_add_days (&date, offset);
- } else {
- offset = (weekday - 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, e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
-}
-
-/* Returns the selected time range. */
-static void
-e_day_view_get_selected_time_range (ECalendarView *cal_view, time_t *start_time, time_t *end_time)
-{
- gint start_col, start_row, end_col, end_row;
- time_t start, end;
- EDayView *day_view = E_DAY_VIEW (cal_view);
-
- 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;
-}
-
-/* Gets the visible time range. Returns FALSE if no time range has been set. */
-static gboolean
-e_day_view_get_visible_time_range (ECalendarView *cal_view,
- time_t *start_time,
- time_t *end_time)
-{
- EDayView *day_view = E_DAY_VIEW (cal_view);
-
- /* 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;
-}
-
-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, e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
- }
-
-#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];
-
- e_day_view_update_query (day_view);
-}
-
-
-/* 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);
-
- e_day_view_update_query ((ECalendarView *) 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 display event end times in the main canvas. */
-gboolean
-e_day_view_get_show_event_end_times (EDayView *day_view)
-{
- g_return_val_if_fail (E_IS_DAY_VIEW (day_view), TRUE);
-
- return day_view->show_event_end_times;
-}
-
-
-void
-e_day_view_set_show_event_end_times (EDayView *day_view,
- gboolean show)
-{
- g_return_if_fail (E_IS_DAY_VIEW (day_view));
-
- if (day_view->show_event_end_times != show) {
- day_view->show_event_end_times = show;
- e_day_view_foreach_event (day_view,
- e_day_view_set_show_times_cb, NULL);
- }
-}
-
-/* This is a callback used to update all day event labels. */
-static gboolean
-e_day_view_set_show_times_cb (EDayView *day_view,
- gint day,
- gint event_num,
- gpointer data)
-{
- if (day != E_DAY_VIEW_LONG_EVENT) {
- e_day_view_update_event_label (day_view, day, event_num);
- }
-
- return TRUE;
-}
-
-
-/* The first day of the week, 0 (Monday) to 6 (Sunday). */
-gint
-e_day_view_get_week_start_day (EDayView *day_view)
-{
- g_return_val_if_fail (E_IS_DAY_VIEW (day_view), 0);
-
- return day_view->week_start_day;
-}
-
-
-void
-e_day_view_set_week_start_day (EDayView *day_view,
- gint week_start_day)
-{
- g_return_if_fail (E_IS_DAY_VIEW (day_view));
- g_return_if_fail (week_start_day >= 0);
- g_return_if_fail (week_start_day < 7);
-
- if (day_view->week_start_day == week_start_day)
- return;
-
- day_view->week_start_day = week_start_day;
-
- if (day_view->work_week_view)
- e_day_view_recalc_work_week (day_view);
-}
-
-static void
-e_day_view_recalc_work_week (EDayView *day_view)
-{
- time_t lower;
-
- /* If we aren't showing the work week, just return. */
- if (!day_view->work_week_view)
- return;
-
- e_day_view_recalc_work_week_days_shown (day_view);
-
- /* If the date isn't set, just return. */
- if (day_view->lower == 0 && day_view->upper == 0)
- return;
-
- lower = e_day_view_find_work_week_start (day_view, day_view->lower);
- if (lower != day_view->lower) {
- /* Reset the selection, as it may disappear. */
- day_view->selection_start_day = -1;
-
- e_day_view_recalc_day_starts (day_view, lower);
- e_day_view_update_query ((ECalendarView *) 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, day, event_num;
- ECalendarViewPosition 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;
-
- pos = e_day_view_convert_position_in_top_canvas (day_view,
- event_x, event_y,
- &day, &event_num);
-
- if (pos == E_CALENDAR_VIEW_POS_OUTSIDE)
- return FALSE;
-
- if (pos != E_CALENDAR_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 ((ECalendarView *) day_view, &dtstart, &dtend);
- e_calendar_view_new_appointment_for (E_CALENDAR_VIEW (day_view),
- dtstart, dtend,
- TRUE, 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, -1);
- }
- } else if (event->button == 3) {
- if (!GTK_WIDGET_HAS_FOCUS (day_view))
- gtk_widget_grab_focus (GTK_WIDGET (day_view));
-
- if (day < day_view->selection_start_day || day > day_view->selection_end_day) {
- e_day_view_start_selection (day_view, day, -1);
- e_day_view_finish_selection (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, row, day, event_num;
- ECalendarViewPosition pos;
-
-#if 0
- g_print ("In e_day_view_on_main_canvas_button_press\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*) event,
- GTK_LAYOUT (widget)->bin_window,
- &event_x, &event_y))
- return FALSE;
-
- /* 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_CALENDAR_VIEW_POS_OUTSIDE)
- return FALSE;
-
- if (pos != E_CALENDAR_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 ((ECalendarView *) day_view, &dtstart, &dtend);
- e_calendar_view_new_appointment_for (E_CALENDAR_VIEW (day_view),
- dtstart, dtend,
- FALSE, 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));
-
-
- if ((day < day_view->selection_start_day || day > day_view->selection_end_day)
- || (day == day_view->selection_start_day && row < day_view->selection_start_row)
- || (day == day_view->selection_end_day && row > day_view->selection_end_row)) {
- e_day_view_start_selection (day_view, day, row);
- e_day_view_finish_selection (day_view);
- }
-
- e_day_view_on_event_right_click (day_view, event, -1, -1);
- }
-
- return TRUE;
-}
-
-static gboolean
-e_day_view_on_main_canvas_scroll (GtkWidget *widget,
- GdkEventScroll *scroll,
- EDayView *day_view)
-{
- switch (scroll->direction) {
- case GDK_SCROLL_UP:
- e_day_view_scroll (day_view, E_DAY_VIEW_WHEEL_MOUSE_STEP_SIZE);
- return TRUE;
- case GDK_SCROLL_DOWN:
- e_day_view_scroll (day_view, -E_DAY_VIEW_WHEEL_MOUSE_STEP_SIZE);
- return TRUE;
- default:
- break;
- }
-
- return FALSE;
-}
-
-
-static gboolean
-e_day_view_on_time_canvas_scroll (GtkWidget *widget,
- GdkEventScroll *scroll,
- EDayView *day_view)
-{
-
- switch (scroll->direction) {
- case GDK_SCROLL_UP:
- e_day_view_scroll (day_view, E_DAY_VIEW_WHEEL_MOUSE_STEP_SIZE);
- return TRUE;
- case GDK_SCROLL_DOWN:
- e_day_view_scroll (day_view, -E_DAY_VIEW_WHEEL_MOUSE_STEP_SIZE);
- return TRUE;
- default:
- break;
- }
-
- return FALSE;
-}
-
-static gboolean
-e_day_view_on_long_event_button_press (EDayView *day_view,
- gint event_num,
- GdkEventButton *event,
- ECalendarViewPosition 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) {
- EDayViewEvent *e;
-
- e = &g_array_index (day_view->long_events, EDayViewEvent, event_num);
-
- if (!GTK_WIDGET_HAS_FOCUS (day_view))
- gtk_widget_grab_focus (GTK_WIDGET (day_view));
-
- e_day_view_set_selected_time_range_in_top_visible (day_view, e->start, e->end);
-
- 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,
- ECalendarViewPosition 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) {
- EDayViewEvent *e;
-
- e = &g_array_index (day_view->events[day], EDayViewEvent, event_num);
-
- if (!GTK_WIDGET_HAS_FOCUS (day_view))
- gtk_widget_grab_focus (GTK_WIDGET (day_view));
-
- e_day_view_set_selected_time_range_visible (day_view, e->start, e->end);
-
- 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,
- ECalendarViewPosition 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_CALENDAR_VIEW_POS_EVENT
- && E_TEXT (event->canvas_item)->editing)
- return;
-
- if ((e_cal_util_component_is_instance (event->comp_data->icalcomp) ||
- !e_cal_util_component_has_recurrences (event->comp_data->icalcomp))
- && (pos == E_CALENDAR_VIEW_POS_LEFT_EDGE
- || pos == E_CALENDAR_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,
- ECalendarViewPosition 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_CALENDAR_VIEW_POS_EVENT
- && E_TEXT (event->canvas_item)->editing)
- return;
-
- if ((e_cal_util_component_is_instance (event->comp_data->icalcomp) ||
- !e_cal_util_component_has_recurrences (event->comp_data->icalcomp))
- && (pos == E_CALENDAR_VIEW_POS_TOP_EDGE
- || pos == E_CALENDAR_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_CALENDAR_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_CALENDAR_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);
-
- e_calendar_view_edit_appointment (E_CALENDAR_VIEW (day_view),
- event->comp_data->client,
- event->comp_data->icalcomp, FALSE);
-}
-
-static void
-e_day_view_show_popup_menu (EDayView *day_view,
- GdkEvent *gdk_event,
- gint day,
- gint event_num)
-{
- GtkMenu *popup;
-
- day_view->popup_event_day = day;
- day_view->popup_event_num = event_num;
-
- popup = e_calendar_view_create_popup_menu (E_CALENDAR_VIEW (day_view));
- e_popup_menu (popup, gdk_event);
-}
-
-static gboolean
-e_day_view_popup_menu (GtkWidget *widget)
-{
- EDayView *day_view = E_DAY_VIEW (widget);
- e_day_view_show_popup_menu (day_view, NULL,
- day_view->editing_event_day,
- day_view->editing_event_num);
- return TRUE;
-}
-
-/* Returns the currently-selected event, or NULL if none */
-static GList *
-e_day_view_get_selected_events (ECalendarView *cal_view)
-{
- EDayViewEvent *event = NULL;
- GList *list = NULL;
- EDayView *day_view = (EDayView *) cal_view;
-
- g_return_val_if_fail (E_IS_DAY_VIEW (day_view), NULL);
-
- if (day_view->editing_event_num != -1) {
- 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);
- } else if (day_view->popup_event_num != -1) {
- if (day_view->popup_event_day == E_DAY_VIEW_LONG_EVENT)
- event = &g_array_index (day_view->long_events,
- EDayViewEvent,
- day_view->popup_event_num);
- else
- event = &g_array_index (day_view->events[day_view->popup_event_day],
- EDayViewEvent,
- day_view->popup_event_num);
- }
-
- if (event)
- list = g_list_append (list, event);
-
- return list;
-}
-
-static void
-process_component (EDayView *day_view, ECalModelComponent *comp_data)
-{
- EDayViewEvent *event;
- gint day, event_num;
- const char *uid;
- ECalComponent *comp;
- AddEventData add_event_data;
-
- /* If our time hasn't been set yet, just return. */
- if (day_view->lower == 0 && day_view->upper == 0)
- 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. */
- uid = icalcomponent_get_uid (comp_data->icalcomp);
-
- 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 (!e_cal_util_component_has_recurrences (comp_data->icalcomp)
- && e_cal_util_event_dates_match (event->comp_data->icalcomp, comp_data->icalcomp)) {
-#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_data);
- 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 */
- comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp));
-
- add_event_data.day_view = day_view;
- add_event_data.comp_data = comp_data;
- e_cal_recur_generate_instances (comp, day_view->lower,
- day_view->upper,
- e_day_view_add_event, &add_event_data,
- e_cal_resolve_tzid_cb, comp_data->client,
- e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
-
- g_object_unref (comp);
-
- e_day_view_queue_layout (day_view);
-}
-
-/* Restarts a query for the day view */
-static void
-e_day_view_update_query (ECalendarView *cal_view)
-{
- gint rows, r;
- EDayView *day_view = E_DAY_VIEW (cal_view);
-
- 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);
-
- rows = e_table_model_row_count (E_TABLE_MODEL (e_calendar_view_get_model (E_CALENDAR_VIEW (day_view))));
- for (r = 0; r < rows; r++) {
- ECalModelComponent *comp_data;
-
- comp_data = e_cal_model_get_component_at (e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)), r);
- g_assert (comp_data != NULL);
- process_component (day_view, comp_data);
- }
-}
-
-static void
-e_day_view_on_event_right_click (EDayView *day_view,
- GdkEventButton *bevent,
- gint day,
- gint event_num)
-{
- e_day_view_show_popup_menu (day_view, (GdkEvent*)bevent,
- day, event_num);
-}
-
-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_CALENDAR_VIEW_POS_NONE) {
- gdk_pointer_ungrab (event->time);
- e_day_view_finish_long_event_resize (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 gboolean
-e_day_view_on_main_canvas_button_release (GtkWidget *widget,
- GdkEventButton *event,
- EDayView *day_view)
-{
-#if 0
- g_print ("In e_day_view_on_main_canvas_button_release\n");
-#endif
-
- 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_CALENDAR_VIEW_POS_NONE) {
- gdk_pointer_ungrab (event->time);
- e_day_view_finish_resize (day_view);
- 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;
-}
-
-
-void
-e_day_view_update_calendar_selection_time (EDayView *day_view)
-{
- time_t start, end;
- GnomeCalendar *calendar;
-
- e_day_view_get_selected_time_range ((ECalendarView *) day_view, &start, &end);
-
-#if 0
- g_print ("Start: %s", ctime (&start));
- g_print ("End : %s", ctime (&end));
-#endif
-
- calendar = e_calendar_view_get_calendar (E_CALENDAR_VIEW (day_view));
- if (calendar)
- gnome_calendar_set_selected_time_range (calendar,
- start, end);
-}
-
-
-static gboolean
-e_day_view_on_top_canvas_motion (GtkWidget *widget,
- GdkEventMotion *mevent,
- EDayView *day_view)
-{
- EDayViewEvent *event = NULL;
- ECalendarViewPosition pos;
- gint event_x, event_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;
-
- canvas_x = event_x;
- canvas_y = event_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_CALENDAR_VIEW_POS_NONE) {
- if (pos != E_CALENDAR_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 ((e_cal_util_component_is_instance (event->comp_data->icalcomp) ||
- !e_cal_util_component_has_recurrences (event->comp_data->icalcomp))
- && (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 && (e_cal_util_component_is_instance (event->comp_data->icalcomp) ||
- !e_cal_util_component_has_recurrences (event->comp_data->icalcomp))) {
- switch (pos) {
- case E_CALENDAR_VIEW_POS_LEFT_EDGE:
- case E_CALENDAR_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;
- ECalendarViewPosition pos;
- gint event_x, event_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;
-
- canvas_x = event_x;
- canvas_y = event_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_CALENDAR_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_CALENDAR_VIEW_POS_NONE) {
- if (pos != E_CALENDAR_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 ((e_cal_util_component_is_instance (event->comp_data->icalcomp) ||
- !e_cal_util_component_has_recurrences (event->comp_data->icalcomp))
- && (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 && (e_cal_util_component_is_instance (event->comp_data->icalcomp) ||
- !e_cal_util_component_has_recurrences (event->comp_data->icalcomp))) {
- switch (pos) {
- case E_CALENDAR_VIEW_POS_LEFT_EDGE:
- cursor = day_view->move_cursor;
- break;
- case E_CALENDAR_VIEW_POS_TOP_EDGE:
- case E_CALENDAR_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_CALENDAR_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_CALENDAR_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;
- ECalComponent *comp;
- ECalComponentDateTime date;
- struct icaltimetype itt;
- time_t dt;
- ECal *client;
- CalObjModType mod = CALOBJ_MOD_ALL;
- GtkWindow *toplevel;
-
- event_num = day_view->resize_event_num;
- event = &g_array_index (day_view->long_events, EDayViewEvent,
- event_num);
-
- client = event->comp_data->client;
-
- /* 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 = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
-
- date.value = &itt;
- /* FIXME: Should probably keep the timezone of the original start
- and end times. */
- date.tzid = icaltimezone_get_tzid (e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
-
- if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_LEFT_EDGE) {
- dt = day_view->day_starts[day_view->resize_start_row];
- *date.value = icaltime_from_timet_with_zone (dt, FALSE,
- e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
- e_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,
- e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
- e_cal_component_set_dtend (comp, &date);
- }
-
- if (e_cal_component_has_recurrences (comp)) {
- if (!recur_component_dialog (client, comp, &mod, NULL)) {
- gtk_widget_queue_draw (day_view->top_canvas);
- goto out;
- }
- }
-
- toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (day_view)));
-
- if (e_cal_modify_object (client, e_cal_component_get_icalcomponent (comp), mod, NULL)) {
- if (itip_organizer_is_user (comp, client) &&
- send_component_dialog (toplevel, client, comp, TRUE)) {
- itip_send_comp (E_CAL_COMPONENT_METHOD_REQUEST, comp, client, NULL);
- } else {
- g_message (G_STRLOC ": Could not update the object!");
- }
- }
-
- out:
- gnome_canvas_item_hide (day_view->resize_long_event_rect_item);
-
- day_view->resize_drag_pos = E_CALENDAR_VIEW_POS_NONE;
-
- g_object_unref (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;
- ECalComponent *comp;
- ECalComponentDateTime date;
- struct icaltimetype itt;
- time_t dt;
- ECal *client;
- CalObjModType mod = CALOBJ_MOD_ALL;
- GtkWindow *toplevel;
-
- day = day_view->resize_event_day;
- event_num = day_view->resize_event_num;
- event = &g_array_index (day_view->events[day], EDayViewEvent,
- event_num);
-
- client = event->comp_data->client;
-
- /* 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 = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
-
- date.value = &itt;
- /* FIXME: Should probably keep the timezone of the original start
- and end times. */
- date.tzid = icaltimezone_get_tzid (e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
-
- if (day_view->resize_drag_pos == E_CALENDAR_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,
- e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
- e_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,
- e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
- e_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_CALENDAR_VIEW_POS_NONE;
-
- if (e_cal_component_has_recurrences (comp)) {
- if (!recur_component_dialog (client, comp, &mod, NULL)) {
- gtk_widget_queue_draw (day_view->top_canvas);
- goto out;
- }
- }
-
- toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (day_view)));
-
- e_cal_component_commit_sequence (comp);
- if (e_cal_modify_object (client, e_cal_component_get_icalcomponent (comp), mod, NULL)) {
- if (itip_organizer_is_user (comp, client) &&
- send_component_dialog (toplevel, client, comp, TRUE)) {
- itip_send_comp (E_CAL_COMPONENT_METHOD_REQUEST, comp, client, NULL);
- } else {
- g_message (G_STRLOC ": Could not update the object!");
- }
- }
-
- out:
- g_object_unref (comp);
-}
-
-
-static void
-e_day_view_abort_resize (EDayView *day_view,
- guint32 time)
-{
- gint day, event_num;
-
- if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_NONE)
- return;
-
- day_view->resize_drag_pos = E_CALENDAR_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));
-
- if (event->allocated_comp_data) {
- e_cal_model_free_component_data (event->comp_data);
- event->allocated_comp_data = FALSE;
- }
- }
-
- 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 (ECalComponent *comp,
- time_t start,
- time_t end,
- gpointer data)
-
-{
- EDayViewEvent event;
- gint day, offset;
- struct icaltimetype start_tt, end_tt;
- AddEventData *add_event_data;
-
- add_event_data = data;
-
-#if 0
- g_print ("Day view lower: %s", ctime (&add_event_data->day_view->lower));
- g_print ("Day view upper: %s", ctime (&add_event_data->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 < add_event_data->day_view->upper, TRUE);
- g_return_val_if_fail (end > add_event_data->day_view->lower, TRUE);
-
- start_tt = icaltime_from_timet_with_zone (start, FALSE,
- e_calendar_view_get_timezone (E_CALENDAR_VIEW (add_event_data->day_view)));
- end_tt = icaltime_from_timet_with_zone (end, FALSE,
- e_calendar_view_get_timezone (E_CALENDAR_VIEW (add_event_data->day_view)));
-
- if (add_event_data->comp_data) {
- event.comp_data = add_event_data->comp_data;
- event.allocated_comp_data = FALSE;
- } else {
- event.comp_data = g_new0 (ECalModelComponent, 1);
- event.allocated_comp_data = TRUE;
-
- event.comp_data->client = e_cal_model_get_default_client (e_calendar_view_get_model (E_CALENDAR_VIEW (add_event_data->day_view)));
- e_cal_component_commit_sequence (comp);
- event.comp_data->icalcomp = icalcomponent_new_clone (e_cal_component_get_icalcomponent (comp));
- }
-
- event.start = start;
- event.end = end;
- event.canvas_item = NULL;
-
- /* Calculate the start & end minute, relative to the top of the
- display. */
- offset = add_event_data->day_view->first_hour_shown * 60
- + add_event_data->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,
- event.comp_data->client,
- e_calendar_view_get_timezone (E_CALENDAR_VIEW (add_event_data->day_view))))
- event.different_timezone = TRUE;
-
- /* Find out which array to add the event to. */
- for (day = 0; day < add_event_data->day_view->days_shown; day++) {
- if (start >= add_event_data->day_view->day_starts[day]
- && end <= add_event_data->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 == add_event_data->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 == add_event_data->day_view->day_starts[day])
- break;
-
- event.end_minute = 24 * 60;
- }
-
- g_array_append_val (add_event_data->day_view->events[day], event);
- add_event_data->day_view->events_sorted[day] = FALSE;
- add_event_data->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 (add_event_data->day_view->long_events, event);
- add_event_data->day_view->long_events_sorted = FALSE;
- add_event_data->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;
- 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;
- ECalComponent *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;
- PangoFontDescription *font_desc;
- PangoContext *pango_context;
- PangoLayout *layout;
-
- 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 = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
-
- /* Set up Pango prerequisites */
- font_desc = gtk_widget_get_style (GTK_WIDGET (day_view))->font_desc;
- pango_context = gtk_widget_get_pango_context (GTK_WIDGET (day_view));
- layout = pango_layout_new (pango_context);
-
- if (day_view->resize_drag_pos != E_CALENDAR_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, *elem;
-
- if (e_cal_component_has_alarms (comp))
- num_icons++;
- if (e_cal_component_has_recurrences (comp))
- num_icons++;
- if (event->different_timezone)
- num_icons++;
- if (e_cal_component_has_organizer (comp))
- num_icons++;
-
- e_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;
- if (e_categories_config_get_icon_for (category, &pixmap, &mask))
- num_icons++;
- }
- e_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 (),
- "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),
- "im_context", E_CANVAS (day_view->top_canvas)->im_context,
- NULL);
- g_signal_connect (event->canvas_item, "event",
- G_CALLBACK (e_day_view_on_text_item_event), day_view);
- g_signal_emit_by_name (G_OBJECT(day_view),
- "event_added", event);
-
- 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. */
- g_object_get (G_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);
- pango_layout_set_text (layout, text, line_len);
- pango_layout_get_pixel_size (layout, &text_width, NULL);
- 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);
-
- g_object_unref (layout);
-}
-
-
-/* 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);
- if (event_num == day_view->resize_event_num) {
- EDayViewEvent *event;
- event = &g_array_index (day_view->events[day], EDayViewEvent,
- event_num);
- e_canvas_item_grab_focus (event->canvas_item, TRUE);
- }
- }
-}
-
-
-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;
-
- event = &g_array_index (day_view->events[day], EDayViewEvent,
- event_num);
-
- 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_CALENDAR_VIEW_POS_NONE
- || day_view->resize_event_day != day
- || day_view->resize_event_num != event_num) {
- GSList *categories_list, *elem;
- ECalComponent *comp;
-
- comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
-
- if (e_cal_component_has_alarms (comp))
- num_icons++;
- if (e_cal_component_has_recurrences (comp))
- num_icons++;
- if (event->different_timezone)
- num_icons++;
- if (e_cal_component_has_organizer (comp))
- num_icons++;
-
- e_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;
- if (e_categories_config_get_icon_for (category, &pixmap, &mask))
- num_icons++;
- }
- e_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 (),
- "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),
- "im_context", E_CANVAS (day_view->main_canvas)->im_context,
- NULL);
- g_signal_connect (event->canvas_item, "event",
- G_CALLBACK (e_day_view_on_text_item_event), day_view);
- g_signal_emit_by_name (G_OBJECT(day_view),
- "event_added", event);
-
- 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) {
- g_object_get (G_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 gboolean
-e_day_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
-{
- EDayView *day_view;
- icalcomponent *icalcomp;
- ECalComponent *comp;
- gint day, event_num;
- gchar *initial_text;
- guint keyval;
- gboolean stop_emission;
- time_t dtstart, dtend;
- ECalComponentDateTime start_dt, end_dt;
- struct icaltimetype start_tt, end_tt;
- const char *uid;
- AddEventData add_event_data;
-
- 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_CALENDAR_VIEW_POS_NONE) {
- if (keyval == GDK_Escape) {
- e_day_view_abort_resize (day_view, event->time);
- }
- return FALSE;
- }
-
- /*Go to the start/end of a work day*/
- if ((keyval == GDK_Home)
- &&((event->state & GDK_SHIFT_MASK) != GDK_SHIFT_MASK)
- &&((event->state & GDK_CONTROL_MASK) != GDK_CONTROL_MASK)
- &&((event->state & GDK_MOD1_MASK) != GDK_MOD1_MASK)) {
- e_day_view_goto_start_of_work_day (day_view);
- return TRUE;
- }
- if ((keyval == GDK_End)
- &&((event->state & GDK_SHIFT_MASK) != GDK_SHIFT_MASK)
- &&((event->state & GDK_CONTROL_MASK) != GDK_CONTROL_MASK)
- &&((event->state & GDK_MOD1_MASK) != GDK_MOD1_MASK)) {
- e_day_view_goto_end_of_work_day (day_view);
- return TRUE;
- }
-
- /* In DayView, Shift+Home/End, Change the duration to the time that begins/ends the current work day */
- if ((keyval == GDK_Home)
- &&((event->state & GDK_SHIFT_MASK) == GDK_SHIFT_MASK)
- &&((event->state & GDK_CONTROL_MASK) != GDK_CONTROL_MASK)
- &&((event->state & GDK_MOD1_MASK) != GDK_MOD1_MASK)) {
- e_day_view_change_duration_to_start_of_work_day (day_view);
- return TRUE;
- }
- if ((keyval == GDK_End)
- &&((event->state & GDK_SHIFT_MASK) == GDK_SHIFT_MASK)
- &&((event->state & GDK_CONTROL_MASK) != GDK_CONTROL_MASK)
- &&((event->state & GDK_MOD1_MASK) != GDK_MOD1_MASK)) {
- e_day_view_change_duration_to_end_of_work_day (day_view);
- return TRUE;
- }
-
-
- /* 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 if (!(event->state & GDK_MOD1_MASK)) {
- 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;
- }
- }
- else
- stop_emission = FALSE;
- 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->state & (GDK_CONTROL_MASK | GDK_MOD1_MASK)))
- || (event->length == 0)
- || (keyval == GDK_Tab)) {
- return FALSE;
- } else
- initial_text = e_utf8_from_gtk_event_key (widget, event->keyval, event->string);
-
- /* Add a new event covering the selected range */
-
- icalcomp = e_cal_model_create_component_with_defaults (e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)));
- if (!icalcomp)
- return FALSE;
- uid = icalcomponent_get_uid (icalcomp);
-
- comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomp);
-
- e_day_view_get_selected_time_range ((ECalendarView *) day_view, &dtstart, &dtend);
-
- start_tt = icaltime_from_timet_with_zone (dtstart, FALSE,
- e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
-
- end_tt = icaltime_from_timet_with_zone (dtend, FALSE,
- e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
-
- if (day_view->selection_in_top_canvas) {
- start_dt.tzid = NULL;
- start_tt.is_date = 1;
- end_tt.is_date = 1;
- } else {
- start_dt.tzid = icaltimezone_get_tzid (e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
- }
-
- start_dt.value = &start_tt;
- end_dt.value = &end_tt;
- end_dt.tzid = start_dt.tzid;
- e_cal_component_set_dtstart (comp, &start_dt);
- e_cal_component_set_dtend (comp, &end_dt);
-
- e_cal_component_set_categories (
- comp, e_calendar_view_get_default_category (E_CALENDAR_VIEW (day_view)));
-
- /* We add the event locally and start editing it. We don't send it
- to the server until the user finishes editing it. */
- add_event_data.day_view = day_view;
- add_event_data.comp_data = NULL;
- e_day_view_add_event (comp, dtstart, dtend, &add_event_data);
- e_day_view_check_layout (day_view);
- gtk_widget_queue_draw (day_view->top_canvas);
- gtk_widget_queue_draw (day_view->main_canvas);
-
- if (e_day_view_find_event_from_uid (day_view, 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);
-
- g_object_unref (comp);
-
- return TRUE;
-}
-
-static gboolean
-e_day_view_key_press (GtkWidget *widget, GdkEventKey *event)
-{
- gboolean handled = FALSE;
- handled = e_day_view_do_key_press (widget, event);
-
- /* if not handled, try key bindings */
- if (!handled)
- handled = GTK_WIDGET_CLASS (parent_class)->key_press_event (widget, event);
- return handled;
-}
-
-/* Select the time that begins a work day*/
-static void
-e_day_view_goto_start_of_work_day (EDayView *day_view)
-{
- g_return_if_fail(day_view!=NULL);
-
- if (day_view->selection_in_top_canvas)
- return;
- else
- day_view->selection_start_row =
- e_day_view_convert_time_to_row (day_view,
- day_view->work_day_start_hour,
- day_view->work_day_start_minute);
- day_view->selection_end_row = day_view->selection_start_row;
-
- 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);
-
- gtk_widget_queue_draw (day_view->top_canvas);
- gtk_widget_queue_draw (day_view->main_canvas);
-}
-
-
-/* Select the time that ends a work day*/
-static void
-e_day_view_goto_end_of_work_day (EDayView *day_view)
-{
- if (day_view->selection_in_top_canvas)
- return;
- else
- day_view->selection_start_row =
- e_day_view_convert_time_to_row (day_view,
- day_view->work_day_end_hour-1,
- day_view->work_day_end_minute+30);
- day_view->selection_end_row = day_view->selection_start_row;
-
- 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);
-
- gtk_widget_queue_draw (day_view->top_canvas);
- gtk_widget_queue_draw (day_view->main_canvas);
-}
-
-/* Change the duration to the time that begins the current work day */
-static void
-e_day_view_change_duration_to_start_of_work_day (EDayView *day_view)
-{
- g_return_if_fail(day_view != NULL);
-
- if (day_view->selection_in_top_canvas)
- return;
- else {
- gint work_start_row,work_end_row,selection_start_row,selection_end_row;
-
- work_start_row =
- e_day_view_convert_time_to_row (day_view,
- day_view->work_day_start_hour,
- day_view->work_day_start_minute);
- work_end_row =
- e_day_view_convert_time_to_row (day_view,
- day_view->work_day_end_hour - 1,
- day_view->work_day_end_minute + 30);
- selection_start_row = day_view->selection_start_row;
- selection_end_row = day_view->selection_end_row;
- if (selection_start_row < work_start_row)
- day_view->selection_end_row = work_start_row - 1;
- else day_view->selection_start_row = work_start_row;
- }
-
- 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);
-
- gtk_widget_queue_draw (day_view->top_canvas);
- gtk_widget_queue_draw (day_view->main_canvas);
-}
-
-/* Change the duration to the time that ends the current work day */
-static void
-e_day_view_change_duration_to_end_of_work_day (EDayView *day_view)
-{
- g_return_if_fail(day_view != NULL);
-
- if (day_view->selection_in_top_canvas)
- return;
- else {
- gint work_start_row,work_end_row,selection_start_row,selection_end_row;
- work_start_row =
- e_day_view_convert_time_to_row (day_view,
- day_view->work_day_start_hour,
- day_view->work_day_start_minute);
- work_end_row = e_day_view_convert_time_to_row (day_view,
- day_view->work_day_end_hour-1,
- day_view->work_day_end_minute+30);
- selection_start_row = day_view->selection_start_row;
- selection_end_row = day_view->selection_end_row;
- if (selection_start_row <= work_end_row)
- day_view->selection_end_row = work_end_row;
- else {
- day_view->selection_start_row = work_end_row + 1;
- day_view->selection_end_row = selection_start_row;
- }
- }
-
- 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);
-
- gtk_widget_queue_draw (day_view->top_canvas);
- gtk_widget_queue_draw (day_view->main_canvas);
-}
-
-
-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 gboolean
-e_day_view_focus (GtkWidget *widget, GtkDirectionType direction)
-{
- EDayView *day_view;
- gint new_day;
- gint new_event_num;
- gint start_row, end_row;
-
- g_return_val_if_fail (widget != NULL, FALSE);
- g_return_val_if_fail (E_IS_DAY_VIEW (widget), FALSE);
- day_view = E_DAY_VIEW (widget);
-
- if (!e_day_view_get_next_tab_event (day_view, direction,
- &new_day, &new_event_num))
- return FALSE;
-
- if ((new_day == -1) && (new_event_num == -1)) {
- /* focus should go to the day view widget itself
- */
- gtk_widget_grab_focus (GTK_WIDGET(day_view));
- return TRUE;
- }
-
- if (new_day != E_DAY_VIEW_LONG_EVENT && new_day != -1) {
- if (e_day_view_get_event_rows (day_view, new_day,
- new_event_num,
- &start_row, &end_row))
- /* ensure the event to be seen */
- e_day_view_ensure_rows_visible (day_view,
- start_row, end_row);
- }
- e_day_view_start_editing_event (day_view, new_day,
- new_event_num, NULL);
-
- return TRUE;
-}
-
-/**
- * e_day_view_get_extreme_event
- * @day_view: the day view widget operates on
- * @start_day, @end_day: range of search, both inclusive
- * @first: %TURE indicate to return the data for the first event in the range,
- * %FALSE to return data for the last event in the range.
- * @day_out: out value, day of the event found. -1 for no event found.
- * @event_num_out: out value, event number of the event found.
- * -1 for no event found.
- *
- * Get day and event_num value for the first or last event found in the day range.
- *
- * Return value: %TRUE, if a event found.
- **/
-static gboolean
-e_day_view_get_extreme_event (EDayView *day_view, gint start_day,
- gint end_day, gboolean first,
- gint *day_out, gint *event_num_out)
-{
- gint loop_day;
-
- g_return_val_if_fail (day_view != NULL, FALSE);
- g_return_val_if_fail (start_day >= 0, FALSE);
- g_return_val_if_fail (end_day <= E_DAY_VIEW_LONG_EVENT, FALSE);
- g_return_val_if_fail (day_out && event_num_out, FALSE);
-
- if (start_day > end_day)
- return FALSE;
- if (first) {
- for (loop_day = start_day; loop_day <= end_day; ++loop_day)
- if (day_view->events[loop_day]->len > 0) {
- *day_out = loop_day;
- *event_num_out = 0;
- return TRUE;
- }
- }
- else {
- for (loop_day = end_day; loop_day >= start_day; --loop_day)
- if (day_view->events[loop_day]->len > 0) {
- *day_out = loop_day;
- *event_num_out =
- day_view->events[loop_day]->len - 1;
- return TRUE;
- }
- }
- *day_out = -1;
- *event_num_out = -1;
- return FALSE;
-}
-
-/**
- * e_day_view_get_extreme_long_event
- * @day_view: the day view widget operates on
- * @first: %TURE indicate to return the data for the first event in the range,
- * %FALSE to return data for the last event in the range.
- * @event_num_out: out value, event number of the event found.
- * -1 for no event found.
- *
- * Similar to e_day_view_get_extreme_event, but run for long events.
- *
- * Return value: %TRUE, if a event found.
- **/
-static gboolean
-e_day_view_get_extreme_long_event (EDayView *day_view, gboolean first,
- gint *day_out, gint *event_num_out)
-{
- g_return_val_if_fail (day_view != NULL, FALSE);
- g_return_val_if_fail (day_out && event_num_out, FALSE);
-
- if (first && (day_view->long_events->len > 0)) {
- *day_out = E_DAY_VIEW_LONG_EVENT;
- *event_num_out = 0;
- return TRUE;
- }
- if ((!first) && (day_view->long_events->len > 0)) {
- *day_out = E_DAY_VIEW_LONG_EVENT;
- *event_num_out = day_view->long_events->len - 1;
- return TRUE;
- }
- *day_out = -1;
- *event_num_out = -1;
- return FALSE;
-}
-
-/**
- * e_day_view_get_next_tab_event
- * @day_view: the day view widget operates on
- * @direction: GTK_DIR_TAB_BACKWARD or GTK_DIR_TAB_FORWARD
- * @day_out: out value, day of the event found. -1 for no event found.
- * @event_num_out: out value, event number of the event found.
- * -1 for no event found.
- *
- * Decide on which event the focus should go next.
- * if ((day_out == -1) && (event_num_out == -1)) is true, focus should go
- * to day_view widget itself.
- *
- * Return value: %TRUE, if a event found.
- **/
-static gboolean
-e_day_view_get_next_tab_event (EDayView *day_view, GtkDirectionType direction,
- gint *day_out, gint *event_num_out)
-{
- gint new_day;
- gint new_event_num;
- gint days_shown;
-
- g_return_val_if_fail (day_view != NULL, FALSE);
- g_return_val_if_fail (day_out != NULL, FALSE);
- g_return_val_if_fail (event_num_out != NULL, FALSE);
-
- days_shown = e_day_view_get_days_shown(day_view);
- *day_out = -1;
- *event_num_out = -1;
-
- g_return_val_if_fail (days_shown > 0, FALSE);
-
- switch (direction) {
- case GTK_DIR_TAB_BACKWARD:
- new_event_num = day_view->editing_event_num - 1;
- break;
- case GTK_DIR_TAB_FORWARD:
- new_event_num = day_view->editing_event_num + 1;
- break;
- default:
- return FALSE;
- }
-
- new_day = day_view->editing_event_day;
-
- /* not current editing event, set to first long event if there is one
- */
- if (new_day == -1) {
- if (direction == GTK_DIR_TAB_FORWARD) {
- if (e_day_view_get_extreme_long_event (day_view, TRUE,
- day_out,
- event_num_out))
- return TRUE;
-
- /* no long event, set to first event if there is
- */
- e_day_view_get_extreme_event (day_view, 0,
- days_shown - 1, TRUE,
- day_out, event_num_out);
- /* go to event if found, or day view widget
- */
- return TRUE;
- }
- else {
- if (e_day_view_get_extreme_event (day_view, 0,
- days_shown - 1, FALSE,
- day_out, event_num_out))
- return TRUE;
-
- /* no event, set to last long event if there is
- */
- e_day_view_get_extreme_long_event (day_view, FALSE,
- day_out,
- event_num_out);
-
- /* go to long event if found, or day view widget
- */
- return TRUE;
- }
- }
- /* go backward from the first long event */
- else if ((new_day == E_DAY_VIEW_LONG_EVENT) && (new_event_num < 0)) {
- /* let focus go to day view widget in this case
- */
- return TRUE;
- }
- /* go forward from the last long event */
- else if ((new_day == E_DAY_VIEW_LONG_EVENT) &&
- (new_event_num >= day_view->long_events->len)) {
- e_day_view_get_extreme_event (day_view, 0,
- days_shown - 1, TRUE,
- day_out, event_num_out);
- /* go to the next main item event if found or day view widget
- */
- return TRUE;
- }
-
- /* go backward from the first event in current editting day */
- else if ((new_day < E_DAY_VIEW_LONG_EVENT) && (new_event_num < 0)) {
- /* try to find a event from the previous day in days shown
- */
- if (e_day_view_get_extreme_event (day_view, 0,
- new_day - 1, FALSE,
- day_out, event_num_out))
- return TRUE;
- /* try to find a long event
- */
- e_day_view_get_extreme_long_event (day_view, FALSE,
- day_out, event_num_out);
- /* go to a long event if found, or day view widget
- */
- return TRUE;
- }
- /* go forward from the last event in current editting day */
- else if ((new_day < E_DAY_VIEW_LONG_EVENT) &&
- (new_event_num >= day_view->events[new_day]->len)) {
- /* try to find a event from the next day in days shown
- */
- e_day_view_get_extreme_event (day_view, (new_day + 1),
- days_shown - 1, TRUE,
- day_out, event_num_out);
- /* go to a event found, or day view widget
- */
- return TRUE;
- }
- /* in the normal case
- */
- *day_out = new_day;
- *event_num_out = new_event_num;
- return TRUE;
-}
-
-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);
-
- g_signal_emit_by_name (day_view, "selected_time_changed");
- 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);
-
- g_signal_emit_by_name (day_view, "selected_time_changed");
- 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) {
- gnome_calendar_previous (e_calendar_view_get_calendar (E_CALENDAR_VIEW (day_view)));
- } 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);
- }
- g_signal_emit_by_name (day_view, "selected_time_changed");
-}
-
-
-static void
-e_day_view_cursor_key_right (EDayView *day_view, GdkEventKey *event)
-{
- if (day_view->selection_end_day == day_view->days_shown - 1) {
- gnome_calendar_next (e_calendar_view_get_calendar (E_CALENDAR_VIEW (day_view)));
- } 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);
- }
- g_signal_emit_by_name (day_view, "selected_time_changed");
-}
-
-
-/* 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;
-}
-
-
-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. */
- g_object_get (G_OBJECT (event->canvas_item),
- "event_processor", &event_processor,
- NULL);
- if (event_processor) {
- command.action = E_TEP_MOVE;
- command.position = E_TEP_END_OF_BUFFER;
- g_signal_emit_by_name (event_processor,
- "command", &command);
- }
-}
-
-
-/* This stops the current edit. If accept is TRUE the event summary is updated,
- 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);
-}
-
-
-/* Cancels the current edition by resetting the appointment's text to its original value */
-static void
-cancel_editing (EDayView *day_view)
-{
- int day, event_num;
- EDayViewEvent *event;
- const gchar *summary;
-
- day = day_view->editing_event_day;
- event_num = day_view->editing_event_num;
-
- g_assert (day != -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);
-
- /* Reset the text to what was in the component */
-
- summary = icalcomponent_get_summary (event->comp_data->icalcomp);
- g_object_set (G_OBJECT (event->canvas_item),
- "text", summary ? summary : "",
- NULL);
-
- /* Stop editing */
- e_day_view_stop_editing_event (day_view);
-}
-
-
-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) {
- day_view->resize_event_num = -1;
-
- /* 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;
- } else if (event->key.keyval == GDK_Escape) {
- cancel_editing (day_view);
- gtk_signal_emit_stop_by_name (GTK_OBJECT (item), "event");
- /* focus should go to day view when stop editing */
- gtk_widget_grab_focus (GTK_WIDGET (day_view));
- return TRUE;
- } else if ((event->key.keyval == GDK_Up)
- && (event->key.state & GDK_SHIFT_MASK)
- && (event->key.state & GDK_CONTROL_MASK)
- && (event->key.state & GDK_MOD1_MASK)) {
- e_day_view_change_event_end_time_up (day_view);
- return TRUE;
- } else if ((event->key.keyval == GDK_Down)
- && (event->key.state & GDK_SHIFT_MASK)
- && (event->key.state & GDK_CONTROL_MASK)
- && (event->key.state & GDK_MOD1_MASK)) {
- e_day_view_change_event_end_time_down (day_view);
- return TRUE;
- }
- break;
- case GDK_2BUTTON_PRESS:
-#if 0
- g_print ("Item got double-click\n");
-#endif
- 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_change_event_end_time_up (EDayView *day_view)
-{
- EDayViewEvent *event;
- gint day, event_num, resize_start_row, resize_end_row;
-
- day = day_view->editing_event_day;
- event_num = day_view->editing_event_num;
- if ((day == -1) || (day == E_DAY_VIEW_LONG_EVENT))
- return;
- event = &g_array_index (day_view->events[day], EDayViewEvent,
- event_num);
- day_view->resize_event_day = day;
- day_view->resize_event_num = event_num;
- day_view->resize_bars_event_day = day;
- day_view->resize_bars_event_num = event_num;
- resize_start_row = event->start_minute / day_view->mins_per_row;
- resize_end_row = (event->end_minute - 1) / day_view->mins_per_row;
- if (resize_end_row < resize_start_row)
- resize_end_row = resize_start_row;
- if (resize_end_row == resize_start_row)
- return;
- day_view->resize_drag_pos = E_CALENDAR_VIEW_POS_BOTTOM_EDGE;
- resize_end_row--;
- day_view->resize_start_row = resize_start_row;
- day_view->resize_end_row = resize_end_row;
- e_day_view_finish_resize (day_view);
- e_day_view_ensure_rows_visible (day_view, resize_start_row, resize_end_row);
-}
-
-
-static void
-e_day_view_change_event_end_time_down (EDayView *day_view)
-{
- EDayViewEvent *event;
- gint day, event_num, resize_start_row, resize_end_row;
-
- day = day_view->editing_event_day;
- event_num = day_view->editing_event_num;
- if ((day == -1) || (day == E_DAY_VIEW_LONG_EVENT))
- return;
- event = &g_array_index (day_view->events[day], EDayViewEvent,
- event_num);
- day_view->resize_event_day = day;
- day_view->resize_event_num = event_num;
- day_view->resize_bars_event_day = day;
- day_view->resize_bars_event_num = event_num;
- resize_start_row = event->start_minute / day_view->mins_per_row;
- resize_end_row = (event->end_minute - 1) / day_view->mins_per_row;
- if (resize_end_row < resize_start_row)
- resize_end_row = resize_start_row;
- if (resize_end_row == day_view->rows -1)
- return;
- day_view->resize_drag_pos = E_CALENDAR_VIEW_POS_BOTTOM_EDGE;
- resize_end_row++;
- day_view->resize_start_row = resize_start_row;
- day_view->resize_end_row = resize_end_row;
- e_day_view_finish_resize (day_view);
- e_day_view_ensure_rows_visible (day_view, resize_start_row, resize_end_row);
-}
-
-
-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);
- }
-
- g_signal_emit_by_name (day_view, "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;
- ECalComponentText summary;
- ECalComponent *comp;
- ECal *client;
- gboolean on_server;
-
- /* 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;
-
- g_object_set (event->canvas_item, "handle_popup", FALSE, NULL);
- g_object_get (G_OBJECT (event->canvas_item),
- "text", &text,
- NULL);
- g_assert (text != NULL);
-
- comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
-
- client = event->comp_data->client;
- on_server = cal_comp_is_on_server (comp, client);
-
- if (string_is_empty (text) && !on_server) {
- const char *uid;
-
- e_cal_component_get_uid (comp, &uid);
-
- 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);
- goto out;
- }
-
- /* Only update the summary if necessary. */
- e_cal_component_get_summary (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 if (summary.value || !string_is_empty (text)) {
- icalcomponent *icalcomp = e_cal_component_get_icalcomponent (comp);
-
- summary.value = text;
- summary.altrep = NULL;
- e_cal_component_set_summary (comp, &summary);
-
- if (!on_server) {
- if (!e_cal_create_object (client, icalcomp, NULL, NULL))
- g_message (G_STRLOC ": Could not create the object!");
- } else {
- CalObjModType mod = CALOBJ_MOD_ALL;
- GtkWindow *toplevel;
- if (e_cal_component_has_recurrences (comp)) {
- if (!recur_component_dialog (client, comp, &mod, NULL)) {
- goto out;
- }
- }
-
- /* FIXME When sending here, what exactly should we send? */
- toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (day_view)));
- if (e_cal_modify_object (client, icalcomp, mod, NULL)) {
- if (itip_organizer_is_user (comp, client)
- && send_component_dialog (toplevel, client, comp, FALSE))
- itip_send_comp (E_CAL_COMPONENT_METHOD_REQUEST, comp,
- client, NULL);
- }
- }
-
- }
-
- out:
-
- g_object_unref (comp);
- g_free (text);
-
- g_signal_emit_by_name (day_view, "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, e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
- tt.hour = minutes / 60;
- tt.minute = minutes % 60;
- tt.second = 0;
-
- val = icaltime_as_timet_with_zone (tt, e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
- 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, e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
-
- 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)
-{
- gint scroll_x, scroll_y;
-
- gnome_canvas_get_scroll_offsets (GNOME_CANVAS (day_view->main_canvas),
- &scroll_x, &scroll_y);
-
- event_x -= scroll_x;
- event_y -= scroll_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;
- ECalendarViewPosition 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. */
-
- /* FIXME: Since GNOME 2.0 we can't do this, since the canvas
- * won't update when its's thawed. Is this a bug or should we
- * really be doing something else? Investigate. */
-#if 0
- gtk_layout_freeze (GTK_LAYOUT (day_view->main_canvas));
-#endif
-
- gnome_canvas_scroll_to (GNOME_CANVAS (day_view->main_canvas),
- scroll_x, new_scroll_y);
-#if 0
- gtk_layout_thaw (GTK_LAYOUT (day_view->main_canvas));
-#endif
- }
-
- 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_CALENDAR_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_CALENDAR_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_rows (EDayView *day_view,
- gint day,
- gint event_num,
- gint *start_row_out,
- gint *end_row_out)
-{
- gint start_row, end_row;
- EDayViewEvent *event;
-
- g_return_val_if_fail (day >= 0, FALSE);
- g_return_val_if_fail (day < E_DAY_VIEW_LONG_EVENT, FALSE);
- g_return_val_if_fail (event_num >= 0, FALSE);
-
- event = &g_array_index (day_view->events[day], EDayViewEvent,
- 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;
-
- *start_row_out = start_row;
- *end_row_out = end_row;
- 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;
-
- e_day_view_get_event_rows(day_view, day, event_num, &start_row, &end_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_CALENDAR_VIEW_POS_NONE
- && day_view->resize_event_day == day
- && day_view->resize_event_num == event_num) {
- if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_TOP_EDGE)
- start_row = day_view->resize_start_row;
- else if (day_view->resize_drag_pos == E_CALENDAR_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_CALENDAR_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_CALENDAR_VIEW_POS_LEFT_EDGE)
- *start_day = day_view->resize_start_row;
- else if (day_view->resize_drag_pos == E_CALENDAR_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 ECalendarViewPosition
-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_CALENDAR_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_CALENDAR_VIEW_POS_OUTSIDE;
-
- *day_return = day;
-
- /* If only the grid position is wanted, return. */
- if (event_num_return == NULL)
- return E_CALENDAR_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_CALENDAR_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_CALENDAR_VIEW_POS_RIGHT_EDGE;
-
- return E_CALENDAR_VIEW_POS_EVENT;
- }
-
- return E_CALENDAR_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 ECalendarViewPosition
-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;
-
-#if 0
- g_print ("e_day_view_convert_position_in_main_canvas: (%d, %d)\n", x, y);
-#endif
-
- *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_CALENDAR_VIEW_POS_OUTSIDE;
-
- row = y / day_view->row_height;
- if (row >= day_view->rows)
- return E_CALENDAR_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_CALENDAR_VIEW_POS_OUTSIDE;
-
- *day_return = day;
- *row_return = row;
-
- /* If only the grid position is wanted, return. */
- if (event_num_return == NULL)
- return E_CALENDAR_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_CALENDAR_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_CALENDAR_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_CALENDAR_VIEW_POS_LEFT_EDGE;
-
- if (y < item_y + E_DAY_VIEW_EVENT_BORDER_HEIGHT
- + E_DAY_VIEW_EVENT_Y_PAD)
- return E_CALENDAR_VIEW_POS_TOP_EDGE;
-
- if (y >= item_y + item_h - E_DAY_VIEW_EVENT_BORDER_HEIGHT
- - E_DAY_VIEW_EVENT_Y_PAD)
- return E_CALENDAR_VIEW_POS_BOTTOM_EDGE;
-
- return E_CALENDAR_VIEW_POS_EVENT;
- }
-
- return E_CALENDAR_VIEW_POS_NONE;
-}
-
-
-static gboolean
-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)
-{
- ECalendarViewPosition 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_CALENDAR_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;
- 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);
-
- gnome_canvas_item_set (day_view->drag_long_event_item,
- "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)) {
- const gchar *summary;
-
- if (event) {
- summary = icalcomponent_get_summary (event->comp_data->icalcomp);
- text = g_strdup (summary);
- } else {
- text = NULL;
- }
-
- gnome_canvas_item_set (day_view->drag_long_event_item,
- "text", text ? text : "",
- NULL);
- gnome_canvas_item_raise_to_top (day_view->drag_long_event_item);
- gnome_canvas_item_show (day_view->drag_long_event_item);
-
- g_free (text);
- }
-}
-
-
-static gboolean
-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, day_view->drag_event_x, day_view->drag_event_y);
-
- return TRUE;
-}
-
-
-static void
-e_day_view_reshape_main_canvas_drag_item (EDayView *day_view)
-{
- ECalendarViewPosition 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_CALENDAR_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;
- 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);
-
- gnome_canvas_item_set (day_view->drag_item,
- "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)) {
- const gchar *summary;
-
- if (event) {
- summary = icalcomponent_get_summary (event->comp_data->icalcomp);
- text = g_strdup (summary);
- } else {
- text = NULL;
- }
-
- gnome_canvas_item_set (day_view->drag_item,
- "text", text ? text : "",
- NULL);
- gnome_canvas_item_raise_to_top (day_view->drag_item);
- gnome_canvas_item_show (day_view->drag_item);
-
- 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;
-
- 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);
-
- if (info == TARGET_CALENDAR_EVENT || info == TARGET_VCALENDAR) {
- /* we will pass an icalcalendar component for both types */
- char *comp_str;
- icalcomponent *vcal;
-
- vcal = e_cal_util_new_top_level ();
- e_cal_util_add_timezones_from_component (vcal, event->comp_data->icalcomp);
- icalcomponent_add_component (
- vcal,
- icalcomponent_new_clone (event->comp_data->icalcomp));
-
- comp_str = icalcomponent_as_ical_string (vcal);
- if (comp_str) {
- gtk_selection_data_set (selection_data, selection_data->target,
- 8, comp_str, strlen (comp_str));
- }
-
- icalcomponent_free (vcal);
- }
-}
-
-
-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;
- ECalendarViewPosition pos;
- gint day, start_day, end_day, num_days;
- gint start_offset, end_offset;
- ECalComponent *comp;
- ECalComponentDateTime date;
- struct icaltimetype itt;
- time_t dt;
- gboolean all_day_event;
- ECal *client;
- gboolean drag_from_same_window;
-
- if (day_view->drag_event_day != -1)
- drag_from_same_window = TRUE;
- else
- drag_from_same_window = FALSE;
-
- client = e_cal_model_get_default_client (e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)));
-
- /* Note that we only support DnD within the EDayView at present. */
- if ((data->length >= 0) && (data->format == 8)
- && (day_view->drag_event_day != -1)) {
- /* We are dragging in the same window */
-
- pos = e_day_view_convert_position_in_top_canvas (day_view,
- x, y, &day,
- NULL);
- if (pos != E_CALENDAR_VIEW_POS_OUTSIDE) {
- CalObjModType mod = CALOBJ_MOD_ALL;
- GtkWindow *toplevel;
-
- num_days = 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);
- 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);
- }
-
- client = event->comp_data->client;
-
- /* We clone the event 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 = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
-
- if (start_offset == 0 && end_offset == 0)
- all_day_event = TRUE;
- else
- all_day_event = FALSE;
-
- date.value = &itt;
-
- dt = day_view->day_starts[day] + start_offset * 60;
- itt = icaltime_from_timet_with_zone (dt, FALSE,
- e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
- if (all_day_event) {
- itt.is_date = TRUE;
- date.tzid = NULL;
- } else {
- /* FIXME: Should probably keep the timezone of
- the original start and end times. */
- date.tzid = icaltimezone_get_tzid (e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
- }
- e_cal_component_set_dtstart (comp, &date);
-
- if (end_offset == 0)
- dt = day_view->day_starts[day + num_days];
- else
- dt = day_view->day_starts[day + num_days - 1] + end_offset * 60;
- itt = icaltime_from_timet_with_zone (dt, FALSE,
- e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
- if (all_day_event) {
- itt.is_date = TRUE;
- date.tzid = NULL;
- } else {
- /* FIXME: Should probably keep the timezone of
- the original start and end times. */
- date.tzid = icaltimezone_get_tzid (e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
- }
- e_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 (e_cal_component_has_recurrences (comp)) {
- if (!recur_component_dialog (client, comp, &mod, NULL))
- return;
- }
-
- toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (day_view)));
- e_cal_component_commit_sequence (comp);
-
- if (e_cal_modify_object (client, e_cal_component_get_icalcomponent (comp), mod, NULL)) {
- if (itip_organizer_is_user (comp, client)
- && send_component_dialog (toplevel, client, comp, FALSE))
- itip_send_comp (E_CAL_COMPONENT_METHOD_REQUEST, comp,
- client, NULL);
- }
-
- g_object_unref (comp);
-
- return;
- }
- }
-
- if ((data->length >= 0) && (data->format == 8)
- && !drag_from_same_window) {
- /* We are dragging between different window */
-
- char *comp_str, *default_tzid;
- icalcomponent *icalcomp;
- icalcomponent_kind kind;
- time_t dtstart;
- icaltimezone *default_zone;
-
- pos = e_day_view_convert_position_in_top_canvas (day_view,
- x, y, &day,
- NULL);
- if (pos == E_CALENDAR_VIEW_POS_OUTSIDE)
- goto error;
-
- comp_str = (char *) data->data;
- icalcomp = icalparser_parse_string ((const char *) comp_str);
- if (!icalcomp)
- goto error;
-
- default_tzid = calendar_config_get_timezone ();
- e_cal_get_timezone (client, default_tzid, &default_zone, NULL);
-
- /* check the type of the component */
- kind = icalcomponent_isa (icalcomp);
- if (kind != ICAL_VCALENDAR_COMPONENT && kind != ICAL_VEVENT_COMPONENT)
- goto error;
-
- dtstart = day_view->day_starts[day];
-
- if (kind == ICAL_VCALENDAR_COMPONENT) {
- 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)
- e_calendar_view_add_event (E_CALENDAR_VIEW (day_view), client, dtstart,
- default_zone, subcomp, TRUE);
- else if (child_kind == ICAL_VTIMEZONE_COMPONENT) {
- icaltimezone *zone;
-
- zone = icaltimezone_new ();
- icaltimezone_set_component (zone, subcomp);
- e_cal_add_timezone (client, zone, NULL);
-
- icaltimezone_free (zone, 1);
- }
-
- subcomp = icalcomponent_get_next_component (
- icalcomp, ICAL_ANY_COMPONENT);
- }
-
- icalcomponent_free (icalcomp);
-
- } else {
- e_calendar_view_add_event (E_CALENDAR_VIEW (day_view), client, dtstart, default_zone, icalcomp, TRUE);
- }
-
- gtk_drag_finish (context, TRUE, TRUE, time);
- return;
- }
-
-error:
- 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;
- ECalendarViewPosition pos;
- gint day, row, start_row, end_row, num_rows, scroll_x, scroll_y;
- gint start_offset, end_offset;
- ECalComponent *comp;
- ECalComponentDateTime date;
- struct icaltimetype itt;
- time_t dt;
- ECal *client;
- gboolean drag_from_same_window;
-
- if (day_view->drag_event_day != -1)
- drag_from_same_window = TRUE;
- else
- drag_from_same_window = FALSE;
-
- client = e_cal_model_get_default_client (e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)));
-
- 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)) {
- /* We are dragging in the same window */
-
- pos = e_day_view_convert_position_in_main_canvas (day_view,
- x, y, &day,
- &row, NULL);
- if (pos != E_CALENDAR_VIEW_POS_OUTSIDE) {
- CalObjModType mod = CALOBJ_MOD_ALL;
- GtkWindow *toplevel;
-
- 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;
- }
-
- client = event->comp_data->client;
-
- /* 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 = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
-
- date.value = &itt;
- date.tzid = icaltimezone_get_tzid (e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
-
- 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,
- e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
- e_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,
- e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
- e_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 (e_cal_component_has_recurrences (comp)) {
- if (!recur_component_dialog (client, comp, &mod, NULL)) {
- g_object_unref (comp);
- return;
- }
- }
-
- toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (day_view)));
- e_cal_component_commit_sequence (comp);
-
- if (e_cal_modify_object (client, e_cal_component_get_icalcomponent (comp), mod, NULL)) {
- if (itip_organizer_is_user (comp, client)
- && send_component_dialog (toplevel, client, comp, FALSE))
- itip_send_comp (E_CAL_COMPONENT_METHOD_REQUEST, comp,
- client, NULL);
- }
-
- g_object_unref (comp);
-
- return;
- }
- }
-
- if ((data->length >= 0) && (data->format == 8)
- && !drag_from_same_window) {
- /* We are dragging between different window */
-
- char *comp_str, *default_tzid;
- icalcomponent *icalcomp;
- icalcomponent_kind kind;
- time_t dtstart;
- icaltimezone *default_zone;
-
- pos = e_day_view_convert_position_in_main_canvas (day_view,
- x, y, &day,
- &row, NULL);
- if (pos == E_CALENDAR_VIEW_POS_OUTSIDE)
- goto error;
-
- comp_str = (char *) data->data;
- icalcomp = icalparser_parse_string ((const char *) comp_str);
- if (!icalcomp)
- goto error;
-
- default_tzid = calendar_config_get_timezone ();
- e_cal_get_timezone (client, default_tzid, &default_zone, NULL);
-
- /* check the type of the component */
- kind = icalcomponent_isa (icalcomp);
- if (kind != ICAL_VCALENDAR_COMPONENT && kind != ICAL_VEVENT_COMPONENT)
- goto error;
-
- dtstart = e_day_view_convert_grid_position_to_time (day_view, day, row);
-
- if (kind == ICAL_VCALENDAR_COMPONENT) {
- 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)
- e_calendar_view_add_event (E_CALENDAR_VIEW (day_view), client, dtstart,
- default_zone, subcomp, FALSE);
- else if (child_kind == ICAL_VTIMEZONE_COMPONENT) {
- icaltimezone *zone;
-
- zone = icaltimezone_new ();
- icaltimezone_set_component (zone, subcomp);
- e_cal_add_timezone (client, zone, NULL);
-
- icaltimezone_free (zone, 1);
- }
-
- subcomp = icalcomponent_get_next_component (
- icalcomp, ICAL_ANY_COMPONENT);
- }
-
- icalcomponent_free (icalcomp);
-
- } else {
- e_calendar_view_add_event (E_CALENDAR_VIEW (day_view), client, dtstart, default_zone, icalcomp, FALSE);
- }
-
- gtk_drag_finish (context, TRUE, TRUE, time);
- return;
- }
-
-error:
- 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 (e_calendar_view_get_use_24_hour_format (E_CALENDAR_VIEW (day_view))) {
- *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 (!e_calendar_view_get_use_24_hour_format (E_CALENDAR_VIEW (day_view)))
- time_width += MAX (day_view->am_string_width,
- day_view->pm_string_width);
-
- return time_width;
-}
-
-/* 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 652efc7399..0000000000
--- a/calendar/gui/e-day-view.h
+++ /dev/null
@@ -1,586 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 <gtk/gtktooltips.h>
-#include <libgnomecanvas/gnome-canvas.h>
-#include <gal/widgets/e-popup-menu.h>
-
-#include "e-cal-view.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_SELECTED_UNFOCUSSED,
- 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;
-
-typedef struct _EDayViewEvent EDayViewEvent;
-struct _EDayViewEvent {
- E_CALENDAR_VIEW_EVENT_FIELDS
-
- /* 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;
-};
-
-
-#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
-{
- ECalendarView cal_view;
-
- /* 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;
-
- /* S-expression for query and the query object */
- ECalView *query;
-
- /* The start and end of the days shown. */
- time_t lower;
- time_t upper;
-
- /* Whether we are showing the work-week view. */
- gboolean work_week_view;
-
- /* The number of days we are showing. Usually 1 or 5, but can be up
- to E_DAY_VIEW_MAX_DAYS, e.g. when the user selects a range of
- days in the date navigator. */
- gint days_shown;
-
- /* The start of each day & an extra element to hold the last time. */
- time_t day_starts[E_DAY_VIEW_MAX_DAYS + 1];
-
- /* An array of EDayViewEvent elements for the top view and each day. */
- GArray *long_events;
- GArray *events[E_DAY_VIEW_MAX_DAYS];
-
- /* These are set to FALSE whenever an event in the corresponding array
- is changed. Any function that needs the events sorted calls
- e_day_view_ensure_events_sorted(). */
- gboolean long_events_sorted;
- gboolean events_sorted[E_DAY_VIEW_MAX_DAYS];
-
- /* This is TRUE if we need to relayout the events before drawing. */
- gboolean long_events_need_layout;
- gboolean need_layout[E_DAY_VIEW_MAX_DAYS];
-
- /* This is TRUE if we need to reshape the canvas items, but a full
- layout is not necessary. */
- gboolean long_events_need_reshape;
- gboolean need_reshape[E_DAY_VIEW_MAX_DAYS];
-
- /* The 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 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. */
- PangoFontDescription *large_font_desc;
-
- /* 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;
- GdkPixmap *meeting_icon;
- GdkBitmap *meeting_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;
- ECalendarViewPosition resize_drag_pos;
- gint resize_start_row;
- gint resize_end_row;
-
- /* This is the event the mouse button was pressed on. If the button
- is released we start editing it, but if the mouse is dragged we set
- this to -1. */
- gint pressed_event_day;
- gint pressed_event_num;
-
- /* These are used when dragging events. If drag_event_day is not -1 we
- know that we are dragging one of the EDayView events around. */
- gint drag_event_day;
- gint drag_event_num;
-
- /* The last mouse position when dragging, in the entire canvas. */
- gint drag_event_x;
- gint drag_event_y;
-
- /* The offset of the mouse from the top of the event, in rows.
- In the top canvas this is the offset from the left, in days. */
- gint drag_event_offset;
-
- /* The last day & row dragged to, so we know when we need to update
- the dragged event's position. */
- gint drag_last_day;
- gint drag_last_row;
-
- /* This is a GnomeCanvasRect which is placed around an item while it
- is being resized, so we can raise it above all other EText items. */
- GnomeCanvasItem *drag_long_event_rect_item;
- GnomeCanvasItem *drag_long_event_item;
- GnomeCanvasItem *drag_rect_item;
- GnomeCanvasItem *drag_bar_item;
- GnomeCanvasItem *drag_item;
-
- /* "am" and "pm" in the current locale, and their widths. */
- gchar *am_string;
- gchar *pm_string;
- gint am_string_width;
- gint pm_string_width;
-};
-
-struct _EDayViewClass
-{
- ECalendarViewClass parent_class;
-};
-
-
-GtkType e_day_view_get_type (void);
-GtkWidget* e_day_view_new (void);
-
-void e_day_view_set_query (EDayView *day_view,
- const char *sexp);
-
-/* 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 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);
-
-void e_day_view_delete_occurrence (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_rows (EDayView *day_view,
- gint day,
- gint event_num,
- gint *start_row_out,
- gint *end_row_out);
-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);
-
-gboolean e_day_view_find_event_from_item (EDayView *day_view,
- GnomeCanvasItem *item,
- gint *day_return,
- gint *event_num_return);
-void e_day_view_update_calendar_selection_time (EDayView *day_view);
-void e_day_view_ensure_rows_visible (EDayView *day_view,
- gint start_row,
- gint end_row);
-
-
-#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 44f0a97c2c..0000000000
--- a/calendar/gui/e-itip-control.c
+++ /dev/null
@@ -1,2373 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <unistd.h>
-#include <glib.h>
-#include <gtk/gtkmisc.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnome/gnome-util.h>
-#include <libgnomeui/gnome-stock-icons.h>
-#include <libgnomeui/gnome-uidefs.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-dialog-util.h>
-#include <bonobo/bonobo-object.h>
-#include <bonobo/bonobo-exception.h>
-#include <gtkhtml/gtkhtml.h>
-#include <gtkhtml/gtkhtml-stream.h>
-#include <libical/ical.h>
-#include <libecal/e-cal-component.h>
-#include <libecal/e-cal-time-util.h>
-#include <libecal/e-cal.h>
-#include <e-util/e-time-utils.h>
-#include <e-util/e-dialog-widgets.h>
-#include <camel/camel-mime-filter-tohtml.h>
-#include "dialogs/delete-error.h"
-#include "calendar-config.h"
-#include "itip-utils.h"
-#include "e-itip-control.h"
-
-struct _EItipControlPrivate {
- GtkWidget *html;
-
- GPtrArray *event_clients;
- ECal *event_client;
- GPtrArray *task_clients;
- ECal *task_client;
-
- char *vcalendar;
- ECalComponent *comp;
- icalcomponent *main_comp;
- icalcomponent *ical_comp;
- icalcomponent *top_level;
- icalcompiter iter;
- icalproperty_method method;
-
- int current;
- int total;
-
- gchar *calendar_uri;
-
- EAccountList *accounts;
-
- gchar *from_address;
- gchar *delegator_address;
- gchar *delegator_name;
- gchar *my_address;
- gint view_only;
-
- gboolean destroyed;
-};
-
-/* HTML Strings */
-#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>"
-
-/* We intentionally use "calendar" instead of "calendar / *" here. We
- * don't want public calendars.
- */
-static const char *calendar_types[] = { "calendar", NULL };
-static const char *tasks_types[] = { "tasks", NULL };
-
-static void class_init (EItipControlClass *klass);
-static void init (EItipControl *itip);
-static void destroy (GtkObject *obj);
-static void finalize (GObject *obj);
-
-static void url_requested_cb (GtkHTML *html, const gchar *url, GtkHTMLStream *handle, gpointer data);
-static gboolean object_requested_cb (GtkHTML *html, GtkHTMLEmbedded *eb, 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;
-
-E_MAKE_TYPE (e_itip_control, "EItipControl", EItipControl, class_init, init,
- GTK_TYPE_VBOX);
-
-static void
-class_init (EItipControlClass *klass)
-{
- GObjectClass *object_class;
- GtkObjectClass *gtkobject_class;
-
- object_class = G_OBJECT_CLASS (klass);
- gtkobject_class = GTK_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_peek_parent (klass);
-
- gtkobject_class->destroy = destroy;
-
- object_class->finalize = finalize;
-}
-
-static ECal *
-start_calendar_server (EItipControl *itip, char *uri)
-{
- ECal *client;
- GError *error = NULL;
-
- client = e_cal_new_from_uri (uri, CALOBJ_TYPE_EVENT);
-
- if (!e_cal_open (client, TRUE, &error)) {
- g_warning (_("start_calendar_server(): %s"), error->message);
- g_error_free (error);
- g_object_unref (client);
- return NULL;
- }
-
- return client;
-}
-
-static gboolean
-start_default_server (EItipControl *itip, ECal *client, gboolean tasks)
-{
-#if 0
- if (tasks)
- return e_cal_open_default_tasks (client, FALSE);
- else
- return e_cal_open_default_calendar (client, FALSE);
-#endif
- return FALSE;
-}
-
-#if 0 /* EPFIXME, rewrite this */
-static GPtrArray *
-get_servers (EItipControl *itip, EvolutionShellClient *shell_client, const char *possible_types[], gboolean tasks)
-{
- GNOME_Evolution_StorageRegistry registry;
- GNOME_Evolution_StorageRegistry_StorageList *storage_list;
- GPtrArray *servers;
- int i, j, k;
- CORBA_Environment ev;
-
- servers = g_ptr_array_new ();
-
- g_object_ref (shell_client);
- registry = evolution_shell_client_get_storage_registry_interface (shell_client);
-
- CORBA_exception_init (&ev);
- storage_list = GNOME_Evolution_StorageRegistry_getStorageList (registry, &ev);
- if (BONOBO_EX (&ev)) {
- CORBA_exception_free (&ev);
- return servers;
- }
-
- for (i = 0; i < storage_list->_length; i++) {
- GNOME_Evolution_Storage storage;
- GNOME_Evolution_FolderList *folder_list;
-
- CORBA_exception_init (&ev);
-
- storage = storage_list->_buffer[i];
- folder_list = GNOME_Evolution_Storage__get_folderList (storage, &ev);
- if (BONOBO_EX (&ev)) {
- CORBA_exception_free (&ev);
- continue;
- }
-
- CORBA_exception_free (&ev);
-
- for (j = 0; j < folder_list->_length; j++) {
- GNOME_Evolution_Folder folder;
-
- folder = folder_list->_buffer[j];
- for (k = 0; possible_types[k] != NULL; k++) {
- ECal *client;
- char *uri;
-
- if (itip->priv->destroyed)
- continue;
-
- if (strcmp (possible_types[k], folder.type))
- continue;
-
- uri = e_cal_util_expand_uri (folder.physicalUri, tasks);
- client = start_calendar_server (itip, uri);
- if (client != NULL)
- g_ptr_array_add (servers, client);
- g_free (uri);
-
- break;
- }
- }
-
- CORBA_free (folder_list);
- }
-
- g_object_unref (shell_client);
-
- return servers;
-}
-#endif
-
-static ECal *
-find_server (GPtrArray *servers, ECalComponent *comp)
-{
- const char *uid;
- int i;
-
- e_cal_component_get_uid (comp, &uid);
- for (i = 0; i < servers->len; i++) {
- ECal *client;
- icalcomponent *icalcomp;
-
- client = g_ptr_array_index (servers, i);
- if (e_cal_get_object (client, uid, NULL, &icalcomp, NULL)) {
- icalcomponent_free (icalcomp);
- g_object_ref (client);
-
- return client;
- }
- }
-
- return NULL;
-}
-
-static void
-html_destroyed (gpointer data)
-{
- EItipControl *itip = data;
- EItipControlPrivate *priv;
-
- priv = itip->priv;
-
- priv->html = NULL;
-}
-
-static void
-init (EItipControl *itip)
-{
- EItipControlPrivate *priv;
- GtkWidget *scrolled_window;
-
- priv = g_new0 (EItipControlPrivate, 1);
-
- itip->priv = priv;
-
- /* Addresses */
- priv->accounts = itip_addresses_get ();
-
- /* Initialize the cal clients */
- priv->event_clients = NULL;
- priv->event_client = NULL;
- priv->task_clients = NULL;
- priv->task_client = NULL;
-
- /* Other fields to init */
- priv->calendar_uri = NULL;
- priv->from_address = NULL;
- priv->delegator_address = NULL;
- priv->delegator_name = NULL;
- priv->my_address = NULL;
- priv->view_only = 0;
-
- /* Html Widget */
- priv->html = gtk_html_new ();
- gtk_html_set_default_content_type (GTK_HTML (priv->html),
- "text/html; charset=utf-8");
- gtk_html_load_from_string (GTK_HTML (priv->html), " ", 1);
- 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_object_weakref (GTK_OBJECT (priv->html), html_destroyed, itip);
- gtk_widget_set_usize (scrolled_window, 600, 400);
- gtk_box_pack_start (GTK_BOX (itip), scrolled_window, FALSE, FALSE, 6);
-
- g_signal_connect (priv->html, "url_requested", G_CALLBACK (url_requested_cb), itip);
- g_signal_connect (priv->html, "object_requested", G_CALLBACK (object_requested_cb), itip);
- g_signal_connect (priv->html, "submit", G_CALLBACK (ok_clicked_cb), itip);
-
- priv->destroyed = FALSE;
-}
-
-static void
-clean_up (EItipControl *itip)
-{
- EItipControlPrivate *priv;
-
- priv = itip->priv;
- if (!priv)
- return;
-
- g_free (priv->vcalendar);
- priv->vcalendar = NULL;
-
- if (priv->comp) {
- g_object_unref (priv->comp);
- priv->comp = NULL;
- }
-
- if (priv->top_level) {
- icalcomponent_free (priv->top_level);
- priv->top_level = NULL;
- }
-
- if (priv->main_comp) {
- icalcomponent_free (priv->main_comp);
- priv->main_comp = NULL;
- }
- priv->ical_comp = NULL;
-
- priv->current = 0;
- priv->total = 0;
-
- g_free (priv->calendar_uri);
- priv->calendar_uri = NULL;
-
- g_free (priv->from_address);
- priv->from_address = NULL;
- g_free (priv->delegator_address);
- priv->delegator_address = NULL;
- g_free (priv->delegator_name);
- priv->delegator_name = NULL;
- g_free (priv->my_address);
- priv->my_address = NULL;
-}
-
-static void
-destroy (GtkObject *obj)
-{
- EItipControl *itip = E_ITIP_CONTROL (obj);
- EItipControlPrivate *priv;
-
- priv = itip->priv;
-
- priv->destroyed = TRUE;
-
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (obj);
-}
-
-static void
-finalize (GObject *obj)
-{
- EItipControl *itip = E_ITIP_CONTROL (obj);
- EItipControlPrivate *priv;
- int i;
-
- priv = itip->priv;
-
- clean_up (itip);
-
- if (priv->html)
- gtk_object_weakunref (GTK_OBJECT (priv->html), html_destroyed, itip);
-
- priv->accounts = NULL;
-
- if (priv->event_clients) {
- for (i = 0; i < priv->event_clients->len; i++)
- g_object_unref (g_ptr_array_index (priv->event_clients, i));
- g_ptr_array_free (priv->event_clients, TRUE);
- priv->event_client = NULL;
- priv->event_clients = NULL;
- }
-
- if (priv->task_clients) {
- for (i = 0; i < priv->task_clients->len; i++)
- g_object_unref (g_ptr_array_index (priv->task_clients, i));
- g_ptr_array_free (priv->task_clients, TRUE);
- priv->task_client = NULL;
- priv->task_clients = NULL;
- }
-
- g_free (priv);
- itip->priv = NULL;
-
- if (G_OBJECT_CLASS (parent_class)->finalize)
- (* G_OBJECT_CLASS (parent_class)->finalize) (obj);
-}
-
-GtkWidget *
-e_itip_control_new (void)
-{
- return g_object_new (E_TYPE_ITIP_CONTROL, NULL);
-}
-
-static void
-find_my_address (EItipControl *itip, icalcomponent *ical_comp)
-{
- EItipControlPrivate *priv;
- icalproperty *prop;
- char *my_alt_address = NULL;
-
- priv = itip->priv;
-
- /* If the mailer told us the address to use, use that */
- if (priv->delegator_address != NULL) {
- priv->my_address = g_strdup (itip_strip_mailto (priv->delegator_address));
- priv->my_address = g_strstrip (priv->my_address);
- return;
- }
-
- for (prop = icalcomponent_get_first_property (ical_comp, ICAL_ATTENDEE_PROPERTY);
- prop != NULL;
- prop = icalcomponent_get_next_property (ical_comp, ICAL_ATTENDEE_PROPERTY))
- {
- icalvalue *value;
- icalparameter *param;
- const char *attendee, *name;
- char *attendee_clean, *name_clean;
- EIterator *it;
-
- value = icalproperty_get_value (prop);
- if (value != NULL) {
- attendee = icalvalue_get_string (value);
- attendee_clean = g_strdup (itip_strip_mailto (attendee));
- attendee_clean = g_strstrip (attendee_clean);
- } else {
- attendee = NULL;
- attendee_clean = NULL;
- }
-
- param = icalproperty_get_first_parameter (prop, ICAL_CN_PARAMETER);
- if (param != NULL) {
- name = icalparameter_get_cn (param);
- name_clean = g_strdup (name);
- name_clean = g_strstrip (name_clean);
- } else {
- name = NULL;
- name_clean = NULL;
- }
-
- it = e_list_get_iterator((EList *)priv->accounts);
- while (e_iterator_is_valid(it)) {
- const EAccount *account = e_iterator_get(it);
-
- /* Check for a matching address */
- if (attendee_clean != NULL
- && !g_ascii_strcasecmp (account->id->address, attendee_clean)) {
- priv->my_address = g_strdup (account->id->address);
- g_free (attendee_clean);
- g_free (name_clean);
- g_free (my_alt_address);
- g_object_unref(it);
- return;
- }
-
- /* Check for a matching cname to fall back on */
- if (name_clean != NULL
- && !g_ascii_strcasecmp (account->id->name, name_clean))
- my_alt_address = g_strdup (attendee_clean);
-
- e_iterator_next(it);
- }
- g_free (attendee_clean);
- g_free (name_clean);
- g_object_unref(it);
- }
-
- priv->my_address = my_alt_address;
-}
-
-static icalproperty *
-find_attendee (icalcomponent *ical_comp, const char *address)
-{
- icalproperty *prop;
-
- if (address == NULL)
- return NULL;
-
- for (prop = icalcomponent_get_first_property (ical_comp, ICAL_ATTENDEE_PROPERTY);
- prop != NULL;
- prop = icalcomponent_get_next_property (ical_comp, ICAL_ATTENDEE_PROPERTY)) {
- icalvalue *value;
- const char *attendee;
- char *text;
-
- value = icalproperty_get_value (prop);
- if (!value)
- continue;
-
- attendee = icalvalue_get_string (value);
-
- text = g_strdup (itip_strip_mailto (attendee));
- text = g_strstrip (text);
- if (!g_strcasecmp (address, text)) {
- g_free (text);
- break;
- }
- g_free (text);
- }
-
- return prop;
-}
-
-static void
-write_label_piece (EItipControl *itip, ECalComponentDateTime *dt,
- char *buffer, int size,
- const char *stext, const char *etext,
- gboolean just_date)
-{
- EItipControlPrivate *priv;
- struct tm tmp_tm;
- char time_buf[64];
- icaltimezone *zone = NULL;
- char *display_name;
-
- priv = itip->priv;
-
- /* UTC times get converted to the current timezone. This is done for
- the COMPLETED property, which is always in UTC, and also because
- Outlook sends simple events as UTC times. */
- if (dt->value->is_utc) {
- char *location = calendar_config_get_timezone ();
- zone = icaltimezone_get_builtin_timezone (location);
- icaltimezone_convert_time (dt->value, icaltimezone_get_utc_timezone (), zone);
- }
-
- tmp_tm = icaltimetype_to_tm (dt->value);
- if (just_date)
- tmp_tm.tm_hour = tmp_tm.tm_min = tmp_tm.tm_sec = 0;
-
- if (stext != NULL)
- strcat (buffer, stext);
-
- e_time_format_date_and_time (&tmp_tm,
- calendar_config_get_24_hour_format (),
- FALSE, FALSE,
- time_buf, sizeof (time_buf));
- strcat (buffer, time_buf);
-
- if (!dt->value->is_utc && dt->tzid) {
- zone = icalcomponent_get_timezone (priv->top_level, dt->tzid);
- }
-
- /* Output timezone after time, e.g. " America/New_York". */
- if (zone && !just_date) {
- /* Note that this returns UTF-8, since all iCalendar data is
- UTF-8. But it probably is not translated. */
- display_name = icaltimezone_get_display_name (zone);
- if (display_name && *display_name) {
- strcat (buffer, " <font size=-1>[");
-
- /* We check if it is one of our builtin timezone names,
- in which case we call gettext to translate it. */
- if (icaltimezone_get_builtin_timezone (display_name)) {
- strcat (buffer, _(display_name));
- } else {
- strcat (buffer, display_name);
- }
- strcat (buffer, "]</font>");
- }
- }
-
- if (etext != NULL)
- strcat (buffer, etext);
-}
-
-static const char *
-nth (int n)
-{
- if (n == -1)
- return "last";
- else if (n < 1 || n > 31)
- return "?";
- else
- return e_cal_recur_nth[n];
-}
-
-static const char *dayname[] = {
- N_("Sunday"),
- N_("Monday"),
- N_("Tuesday"),
- N_("Wednesday"),
- N_("Thursday"),
- N_("Friday"),
- N_("Saturday")
-};
-
-static inline char *
-get_dayname (struct icalrecurrencetype *r, int i)
-{
- enum icalrecurrencetype_weekday day;
-
- day = icalrecurrencetype_day_day_of_week (r->by_day[i]);
- g_return_val_if_fail (day > 0 && day < 8, "?");
-
- return _(dayname[day - 1]);
-}
-
-static void
-write_recurrence_piece (EItipControl *itip, ECalComponent *comp,
- char *buffer, int size)
-{
- GSList *rrules;
- struct icalrecurrencetype *r;
- int len, i;
-
- strcpy (buffer, "<b>Recurring:</b> ");
- len = strlen (buffer);
- buffer += len;
- size -= len;
-
- if (!e_cal_component_has_simple_recurrence (comp)) {
- strcpy (buffer, _("Yes. (Complex Recurrence)"));
- return;
- }
-
- e_cal_component_get_rrule_list (comp, &rrules);
- g_return_if_fail (rrules && !rrules->next);
-
- r = rrules->data;
-
- switch (r->freq) {
- case ICAL_DAILY_RECURRENCE:
- if (r->interval == 1)
- strcpy (buffer, _("Every day"));
- else
- sprintf (buffer, _("Every %d days"), r->interval);
- break;
-
- case ICAL_WEEKLY_RECURRENCE:
- if (r->by_day[0] == ICAL_RECURRENCE_ARRAY_MAX) {
- if (r->interval == 1)
- strcpy (buffer, _("Every week"));
- else
- sprintf (buffer, _("Every %d weeks"), r->interval);
- } else {
- if (r->interval == 1)
- strcpy (buffer, _("Every week on "));
- else
- sprintf (buffer, _("Every %d weeks on "), r->interval);
-
- for (i = 1; i < 8 && r->by_day[i] != ICAL_RECURRENCE_ARRAY_MAX; i++) {
- if (i > 1)
- strcat (buffer, ", ");
- strcat (buffer, get_dayname (r, i - 1));
- }
- if (i > 1)
- strcat (buffer, _(" and "));
- strcat (buffer, get_dayname (r, i - 1));
- }
- break;
-
- case ICAL_MONTHLY_RECURRENCE:
- if (r->by_month_day[0] != ICAL_RECURRENCE_ARRAY_MAX) {
- sprintf (buffer, _("The %s day of "),
- nth (r->by_month_day[0]));
- } else {
- int pos;
-
- /* Outlook 2000 uses BYDAY=TU;BYSETPOS=2, and will not
- accept BYDAY=2TU. So we now use the same as Outlook
- by default. */
-
- pos = icalrecurrencetype_day_position (r->by_day[0]);
- if (pos == 0)
- pos = r->by_set_pos[0];
-
- sprintf (buffer, _("The %s %s of "),
- nth (pos), get_dayname (r, 0));
- }
-
- if (r->interval == 1)
- strcat (buffer, _("every month"));
- else {
- len = strlen (buffer);
- buffer += len;
- size -= len;
- sprintf (buffer, _("every %d months"), r->interval);
- }
- break;
-
- case ICAL_YEARLY_RECURRENCE:
- if (r->interval == 1)
- strcpy (buffer, _("Every year"));
- else {
- sprintf (buffer, _("Every %d years"), r->interval);
- }
- break;
-
- default:
- g_assert_not_reached ();
- }
-
- len = strlen (buffer);
- buffer += len;
- size -= len;
- if (r->count) {
- sprintf (buffer, _(" a total of %d times"), r->count);
- } else if (!icaltime_is_null_time (r->until)) {
- ECalComponentDateTime dt;
-
- /* FIXME This should get the tzid id, not the whole zone */
- dt.value = &r->until;
- dt.tzid = r->until.zone;
-
- write_label_piece (itip, &dt, buffer, size,
- _(", ending on "), NULL, TRUE);
- }
-
- strcat (buffer, "<br>");
-}
-
-static void
-set_date_label (EItipControl *itip, GtkHTML *html, GtkHTMLStream *html_stream,
- ECalComponent *comp)
-{
- EItipControlPrivate *priv;
- ECalComponentDateTime datetime;
- static char buffer[1024];
- gboolean wrote = FALSE, task_completed = FALSE;
- ECalComponentVType type;
-
- priv = itip->priv;
-
- type = e_cal_component_get_vtype (comp);
-
- buffer[0] = '\0';
- e_cal_component_get_dtstart (comp, &datetime);
- if (datetime.value) {
- write_label_piece (itip, &datetime, buffer, 1024,
- _("<b>Starts:</b> "),
- "<br>", FALSE);
- gtk_html_write (html, html_stream, buffer, strlen(buffer));
- wrote = TRUE;
- }
- e_cal_component_free_datetime (&datetime);
-
- buffer[0] = '\0';
- e_cal_component_get_dtend (comp, &datetime);
- if (datetime.value){
- write_label_piece (itip, &datetime, buffer, 1024, _("<b>Ends:</b> "), "<br>", FALSE);
- gtk_html_write (html, html_stream, buffer, strlen (buffer));
- wrote = TRUE;
- }
- e_cal_component_free_datetime (&datetime);
-
- buffer[0] = '\0';
- if (e_cal_component_has_recurrences (comp)) {
- write_recurrence_piece (itip, comp, buffer, 1024);
- gtk_html_write (html, html_stream, buffer, strlen (buffer));
- wrote = TRUE;
- }
-
- buffer[0] = '\0';
- datetime.tzid = NULL;
- e_cal_component_get_completed (comp, &datetime.value);
- if (type == E_CAL_COMPONENT_TODO && datetime.value) {
- /* Pass TRUE as is_utc, so it gets converted to the current
- timezone. */
- datetime.value->is_utc = TRUE;
- write_label_piece (itip, &datetime, buffer, 1024, _("<b>Completed:</b> "), "<br>", FALSE);
- gtk_html_write (html, html_stream, buffer, strlen (buffer));
- wrote = TRUE;
- task_completed = TRUE;
- }
- e_cal_component_free_datetime (&datetime);
-
- buffer[0] = '\0';
- e_cal_component_get_due (comp, &datetime);
- if (type == E_CAL_COMPONENT_TODO && !task_completed && datetime.value) {
- write_label_piece (itip, &datetime, buffer, 1024, _("<b>Due:</b> "), "<br>", FALSE);
- gtk_html_write (html, html_stream, buffer, strlen (buffer));
- wrote = TRUE;
- }
-
- e_cal_component_free_datetime (&datetime);
-
- if (wrote)
- gtk_html_stream_printf (html_stream, "<br>");
-}
-
-static void
-set_message (GtkHTML *html, GtkHTMLStream *html_stream, const gchar *message, gboolean err)
-{
- if (message == NULL)
- return;
-
-
- if (err) {
- gtk_html_stream_printf (html_stream, "<b><font color=\"#ff0000\">%s</font></b><br><br>", message);
- } else {
- gtk_html_stream_printf (html_stream, "<b>%s</b><br><br>", message);
- }
-}
-
-static void
-write_error_html (EItipControl *itip, const gchar *itip_err)
-{
- EItipControlPrivate *priv;
- GtkHTMLStream *html_stream;
-
- priv = itip->priv;
-
- /* Html widget */
- html_stream = gtk_html_begin (GTK_HTML (priv->html));
- gtk_html_stream_printf (html_stream,
- "<html><head><title>%s</title></head>",
- _("iCalendar Information"));
-
- gtk_html_write (GTK_HTML (priv->html), html_stream,
- HTML_BODY_START, strlen(HTML_BODY_START));
-
- /* The table */
- gtk_html_stream_printf (html_stream, "<table width=450 cellspacing=\"0\" cellpadding=\"4\" border=\"0\">");
- /* The column for the image */
- gtk_html_stream_printf (html_stream, "<tr><td width=48 align=\"center\" valign=\"top\" rowspan=\"8\">");
- /* The image */
- gtk_html_stream_printf (html_stream, "<img src=\"/meeting-request.png\"></td>");
-
- gtk_html_stream_printf (html_stream, "<td align=\"left\" valign=\"top\">");
-
- /* 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 */
- gtk_html_stream_printf (html_stream, "</td></tr></table>");
-
- 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, const gchar *itip_desc, const gchar *itip_title, const gchar *options)
-{
- EItipControlPrivate *priv;
- GtkHTMLStream *html_stream;
- ECalComponentText text;
- ECalComponentOrganizer organizer;
- ECalComponentAttendee *attendee;
- GSList *attendees, *l = NULL;
- const char *string;
- gchar *html;
- const gchar *const_html;
-
- priv = itip->priv;
-
- if (priv->html == NULL)
- return;
-
- /* Html widget */
- html_stream = gtk_html_begin (GTK_HTML (priv->html));
- gtk_html_stream_printf (html_stream,
- "<html><head><title>%s</title></head>",
- _("iCalendar Information"));
- 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 */
- e_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_REQUEST:
- /* The organizer sent this */
- e_cal_component_get_organizer (priv->comp, &organizer);
- if (priv->delegator_address != NULL) {
- if (organizer.value != NULL)
- html = g_strdup_printf (itip_desc,
- organizer.cn ?
- organizer.cn :
- itip_strip_mailto (organizer.value),
- priv->delegator_name ?
- priv->delegator_name :
- priv->delegator_address);
- else
- html = g_strdup_printf (itip_desc, _("An unknown person"),
- priv->delegator_name ?
- priv->delegator_name :
- priv->delegator_address);
- } else {
- 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;
-
- case ICAL_METHOD_PUBLISH:
- case ICAL_METHOD_ADD:
- case ICAL_METHOD_CANCEL:
- default:
- /* The organizer sent this */
- e_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 = _("<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 (itip, GTK_HTML (priv->html), html_stream, priv->comp);
-
- /* Summary */
- e_cal_component_get_summary (priv->comp, &text);
- html = text.value ? camel_text_to_html (text.value, CAMEL_MIME_FILTER_TOHTML_CONVERT_NL, 0) : _("<i>None</i>");
- gtk_html_stream_printf (html_stream, "<b>%s</b><br>%s<br><br>",
- _("Summary:"), html);
- if (text.value)
- g_free (html);
-
- /* Location */
- e_cal_component_get_location (priv->comp, &string);
- if (string != NULL) {
- html = camel_text_to_html (string, CAMEL_MIME_FILTER_TOHTML_CONVERT_NL, 0);
- gtk_html_stream_printf (html_stream, "<b>%s</b><br>%s<br><br>",
- _("Location:"), html);
- g_free (html);
- }
-
- /* Status */
- if (priv->method == ICAL_METHOD_REPLY) {
- GSList *alist;
-
- e_cal_component_get_attendee_list (priv->comp, &alist);
-
- if (alist != NULL) {
- ECalComponentAttendee *a = alist->data;
-
- gtk_html_stream_printf (html_stream, "<b>%s</b><br>",
- _("Status:"));
-
- switch (a->status) {
- case ICAL_PARTSTAT_ACCEPTED:
- gtk_html_stream_printf (html_stream, "%s<br><br>",
- _("Accepted"));
- break;
- case ICAL_PARTSTAT_TENTATIVE:
- gtk_html_stream_printf (html_stream, "%s<br><br>",
- _("Tentatively Accepted"));
- break;
- case ICAL_PARTSTAT_DECLINED:
- gtk_html_stream_printf (html_stream, "%s<br><br>",
- _("Declined"));
- break;
- default:
- gtk_html_stream_printf (html_stream, "%s<br><br>",
- _("Unknown"));
- }
- }
-
- e_cal_component_free_attendee_list (alist);
- }
-
- /* Description */
- e_cal_component_get_description_list (priv->comp, &l);
- if (l)
- text = *((ECalComponentText *)l->data);
-
- if (l && text.value) {
- html = camel_text_to_html (text.value, CAMEL_MIME_FILTER_TOHTML_CONVERT_NL, 0);
- gtk_html_stream_printf (html_stream, "<b>%s</b><br>%s",
- _("Description:"), html);
- g_free (html);
- }
- e_cal_component_free_text_list (l);
-
- /* Separator */
- gtk_html_write (GTK_HTML (priv->html), html_stream, HTML_SEP, strlen (HTML_SEP));
-
- /* Options */
- if (!e_itip_control_get_view_only (itip)) {
- if (options != NULL) {
- const_html = "</td></tr><tr><td valign=\"center\">";
- gtk_html_write (GTK_HTML (priv->html), html_stream, const_html, strlen (const_html));
- 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 char*
-get_publish_options (gboolean selector)
-{
- char *html;
-
- html = g_strdup_printf ("<form><b>%s</b>&nbsp"
- "<select NAME=\"action\" SIZE=\"1\"> "
- "<option VALUE=\"U\">%s</option>"
- "</select>&nbsp &nbsp "
- "<input TYPE=Submit name=\"ok\" value=\"%s\">"
- "</form>",
- _("Choose an action:"),
- _("Update"),
- _("OK"));
-
- if (selector) {
- char *sel;
-
- sel = g_strconcat (html, "<object classid=\"gtk:label\">", NULL);
- g_free (html);
- html = sel;
- }
-
- return html;
-}
-
-static char*
-get_request_options (gboolean selector)
-{
- char *html;
-
- html = g_strdup_printf ("<form><b>%s</b>&nbsp"
- "<select NAME=\"action\" SIZE=\"1\"> "
- "<option VALUE=\"A\">%s</option> "
- "<option VALUE=\"T\">%s</option> "
- "<option VALUE=\"D\">%s</option></select>&nbsp "
- "<input TYPE=\"checkbox\" name=\"rsvp\" value=\"1\" checked>%s&nbsp&nbsp"
- "<input TYPE=\"submit\" name=\"ok\" value=\"%s\"><br> "
- "</form>",
- _("Choose an action:"),
- _("Accept"),
- _("Tentatively accept"),
- _("Decline"),
- _("RSVP"),
- _("OK"));
-
- if (selector) {
- char *sel;
-
- sel = g_strconcat (html, "<object classid=\"gtk:label\">", NULL);
- g_free (html);
- html = sel;
- }
-
- return html;
-}
-
-static char*
-get_request_fb_options ()
-{
- return g_strdup_printf ("<form><b>%s</b>&nbsp"
- "<select NAME=\"action\" SIZE=\"1\"> "
- "<option VALUE=\"F\">%s</option></select>&nbsp &nbsp "
- "<input TYPE=Submit name=\"ok\" value=\"%s\">"
- "</form>",
- _("Choose an action:"),
- _("Send Free/Busy Information"),
- _("OK"));
-}
-
-static char*
-get_reply_options ()
-{
- return g_strdup_printf ("<form><b>%s</b>&nbsp"
- "<select NAME=\"action\" SIZE=\"1\"> "
- "<option VALUE=\"R\">%s</option></select>&nbsp &nbsp "
- "<input TYPE=Submit name=\"ok\" value=\"%s\">"
- "</form>",
- _("Choose an action:"),
- _("Update respondent status"),
- _("OK"));
-}
-
-static char*
-get_refresh_options ()
-{
- return g_strdup_printf ("<form><b>%s</b>&nbsp"
- "<select NAME=\"action\" SIZE=\"1\"> "
- "<option VALUE=\"S\">%s</option></select>&nbsp &nbsp "
- "<input TYPE=Submit name=\"ok\" value=\"%s\">"
- "</form>",
- _("Choose an action:"),
- _("Send Latest Information"),
- _("OK"));
-}
-
-static char*
-get_cancel_options ()
-{
- return g_strdup_printf ("<form><b>%s</b>&nbsp"
- "<select NAME=\"action\" SIZE=\"1\"> "
- "<option VALUE=\"C\">%s</option></select>&nbsp &nbsp "
- "<input TYPE=Submit name=\"ok\" value=\"%s\">"
- "</form>",
- _("Choose an action:"),
- _("Cancel"),
- _("OK"));
-}
-
-
-static ECalComponent *
-get_real_item (EItipControl *itip)
-{
- EItipControlPrivate *priv;
- ECalComponent *comp;
- icalcomponent *icalcomp;
- ECalComponentVType type;
- gboolean found = FALSE;
- const char *uid;
-
- priv = itip->priv;
-
- type = e_cal_component_get_vtype (priv->comp);
- e_cal_component_get_uid (priv->comp, &uid);
-
- switch (type) {
- case E_CAL_COMPONENT_EVENT:
- if (priv->event_client != NULL)
- found = e_cal_get_object (priv->event_client, uid, NULL, &icalcomp, NULL);
- break;
- case E_CAL_COMPONENT_TODO:
- if (priv->task_client != NULL)
- found = e_cal_get_object (priv->task_client, uid, NULL, &icalcomp, NULL);
- break;
- default:
- found = FALSE;
- }
-
- if (!found)
- return NULL;
-
- comp = e_cal_component_new ();
- if (!e_cal_component_set_icalcomponent (comp, icalcomp)) {
- g_object_unref (comp);
- icalcomponent_free (icalcomp);
- return NULL;
- }
-
- return comp;
-}
-
-static void
-adjust_item (EItipControl *itip, ECalComponent *comp)
-{
- ECalComponent *real_comp;
-
- real_comp = get_real_item (itip);
- if (real_comp != NULL) {
- ECalComponentText text;
- const char *string;
- GSList *l;
-
- e_cal_component_get_summary (real_comp, &text);
- e_cal_component_set_summary (comp, &text);
- e_cal_component_get_location (real_comp, &string);
- e_cal_component_set_location (comp, string);
- e_cal_component_get_description_list (real_comp, &l);
- e_cal_component_set_description_list (comp, l);
- e_cal_component_free_text_list (l);
-
- g_object_unref (real_comp);
- } else {
- ECalComponentText text = {_("Unknown"), NULL};
-
- e_cal_component_set_summary (comp, &text);
- }
-}
-
-static void
-show_current_event (EItipControl *itip)
-{
- EItipControlPrivate *priv;
- const gchar *itip_title, *itip_desc;
- char *options;
-
- priv = itip->priv;
-
- if (priv->calendar_uri)
- priv->event_client = start_calendar_server (itip, priv->calendar_uri);
- else
- priv->event_client = find_server (priv->event_clients, priv->comp);
-
- switch (priv->method) {
- case ICAL_METHOD_PUBLISH:
- itip_desc = _("<b>%s</b> has published meeting information.");
- itip_title = _("Meeting Information");
- options = get_publish_options (priv->event_client ? FALSE : TRUE);
- break;
- case ICAL_METHOD_REQUEST:
- if (priv->delegator_address != NULL)
- itip_desc = _("<b>%s</b> requests the presence of %s at a meeting.");
- else
- itip_desc = _("<b>%s</b> requests your presence at a meeting.");
- itip_title = _("Meeting Proposal");
- options = get_request_options (priv->event_client ? FALSE : TRUE);
- break;
- case ICAL_METHOD_ADD:
- itip_desc = _("<b>%s</b> wishes to add to an existing meeting.");
- itip_title = _("Meeting Update");
- options = get_publish_options (priv->event_client ? FALSE : TRUE);
- break;
- case ICAL_METHOD_REFRESH:
- itip_desc = _("<b>%s</b> wishes to receive the latest meeting information.");
- itip_title = _("Meeting Update Request");
- options = get_refresh_options ();
-
- /* Provide extra info, since its not in the component */
- adjust_item (itip, priv->comp);
- break;
- case ICAL_METHOD_REPLY:
- itip_desc = _("<b>%s</b> has replied to a meeting request.");
- itip_title = _("Meeting Reply");
- options = get_reply_options ();
-
- /* Provide extra info, since might not be in the component */
- adjust_item (itip, priv->comp);
- break;
- case ICAL_METHOD_CANCEL:
- itip_desc = _("<b>%s</b> has cancelled a meeting.");
- itip_title = _("Meeting Cancellation");
- options = get_cancel_options ();
-
- /* Provide extra info, since might not be in the component */
- adjust_item (itip, priv->comp);
- 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);
- g_free (options);
-}
-
-static void
-show_current_todo (EItipControl *itip)
-{
- EItipControlPrivate *priv;
- const gchar *itip_title, *itip_desc;
- char *options;
-
- priv = itip->priv;
-
- if (priv->calendar_uri)
- priv->task_client = start_calendar_server (itip, priv->calendar_uri);
- else
- priv->task_client = find_server (priv->task_clients, priv->comp);
-
- switch (priv->method) {
- case ICAL_METHOD_PUBLISH:
- itip_desc = _("<b>%s</b> has published task information.");
- itip_title = _("Task Information");
- options = get_publish_options (priv->task_client ? FALSE : TRUE);
- break;
- case ICAL_METHOD_REQUEST:
- if (priv->delegator_address != NULL)
- itip_desc = _("<b>%s</b> requests %s to perform a task.");
- else
- itip_desc = _("<b>%s</b> requests you perform a task.");
- itip_title = _("Task Proposal");
- options = get_request_options (priv->task_client ? FALSE : TRUE);
- break;
- case ICAL_METHOD_ADD:
- itip_desc = _("<b>%s</b> wishes to add to an existing task.");
- itip_title = _("Task Update");
- options = get_publish_options (priv->task_client ? FALSE : TRUE);
- break;
- case ICAL_METHOD_REFRESH:
- itip_desc = _("<b>%s</b> wishes to receive the latest task information.");
- itip_title = _("Task Update Request");
- options = get_refresh_options ();
-
- /* Provide extra info, since its not in the component */
- adjust_item (itip, priv->comp);
- break;
- case ICAL_METHOD_REPLY:
- itip_desc = _("<b>%s</b> has replied to a task assignment.");
- itip_title = _("Task Reply");
- options = get_reply_options ();
-
- /* Provide extra info, since might not be in the component */
- adjust_item (itip, priv->comp);
- break;
- case ICAL_METHOD_CANCEL:
- itip_desc = _("<b>%s</b> has cancelled a task.");
- itip_title = _("Task Cancellation");
- options = get_cancel_options ();
-
- /* Provide extra info, since might not be in the component */
- adjust_item (itip, priv->comp);
- 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);
- g_free (options);
-}
-
-static void
-show_current_freebusy (EItipControl *itip)
-{
- EItipControlPrivate *priv;
- const gchar *itip_title, *itip_desc;
- char *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 = get_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);
- g_free (options);
-}
-
-static icalcomponent *
-get_next (icalcompiter *iter)
-{
- icalcomponent *ret = NULL;
- icalcomponent_kind kind;
-
- do {
- icalcompiter_next (iter);
- ret = icalcompiter_deref (iter);
- kind = icalcomponent_isa (ret);
- } while (ret != NULL
- && kind != ICAL_VEVENT_COMPONENT
- && kind != ICAL_VTODO_COMPONENT
- && kind != ICAL_VFREEBUSY_COMPONENT);
-
- return ret;
-}
-
-static void
-show_current (EItipControl *itip)
-{
- EItipControlPrivate *priv;
- ECalComponentVType type;
- icalcomponent *alarm_comp;
- icalcompiter alarm_iter;
- icalproperty *prop;
-
- priv = itip->priv;
-
- g_object_ref (itip);
-
- if (priv->comp)
- g_object_unref (priv->comp);
- if (priv->event_client != NULL)
- g_object_unref (priv->event_client);
- priv->event_client = NULL;
- if (priv->task_client != NULL)
- g_object_unref (priv->task_client);
- priv->task_client = NULL;
-
- /* Determine any delegate sections */
- prop = icalcomponent_get_first_property (priv->ical_comp, ICAL_X_PROPERTY);
- while (prop) {
- const char *x_name, *x_val;
-
- x_name = icalproperty_get_x_name (prop);
- x_val = icalproperty_get_x (prop);
-
- if (!strcmp (x_name, "X-EVOLUTION-DELEGATOR-CALENDAR-URI"))
- e_itip_control_set_calendar_uri (itip, x_val);
- else if (!strcmp (x_name, "X-EVOLUTION-DELEGATOR-ADDRESS"))
- e_itip_control_set_delegator_address (itip, x_val);
- else if (!strcmp (x_name, "X-EVOLUTION-DELEGATOR-NAME"))
- e_itip_control_set_delegator_name (itip, x_val);
-
- prop = icalcomponent_get_next_property (priv->ical_comp, ICAL_X_PROPERTY);
- }
-
- /* 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 = e_cal_component_new ();
- if (!e_cal_component_set_icalcomponent (priv->comp, priv->ical_comp)) {
- write_error_html (itip, _("The message does not appear to be properly formed"));
- g_object_unref (priv->comp);
- priv->comp = NULL;
- g_object_unref (itip);
- return;
- };
-
- /* Add default reminder if the config says so */
- if (calendar_config_get_use_default_reminder ()) {
- ECalComponentAlarm *acomp;
- int interval;
- CalUnits units;
- ECalComponentAlarmTrigger trigger;
-
- interval = calendar_config_get_default_reminder_interval ();
- units = calendar_config_get_default_reminder_units ();
-
- acomp = e_cal_component_alarm_new ();
-
- e_cal_component_alarm_set_action (acomp, E_CAL_COMPONENT_ALARM_DISPLAY);
-
- trigger.type = E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START;
- memset (&trigger.u.rel_duration, 0, sizeof (trigger.u.rel_duration));
-
- trigger.u.rel_duration.is_neg = TRUE;
-
- switch (units) {
- case CAL_MINUTES:
- trigger.u.rel_duration.minutes = interval;
- break;
- case CAL_HOURS:
- trigger.u.rel_duration.hours = interval;
- break;
- case CAL_DAYS:
- trigger.u.rel_duration.days = interval;
- break;
- default:
- g_assert_not_reached ();
- }
-
- e_cal_component_alarm_set_trigger (acomp, trigger);
- e_cal_component_add_alarm (priv->comp, acomp);
-
- e_cal_component_alarm_free (acomp);
- }
-
- type = e_cal_component_get_vtype (priv->comp);
-
- switch (type) {
- case E_CAL_COMPONENT_EVENT:
- if (!priv->event_clients) {
- priv->event_clients = g_ptr_array_new ();
- /* EPFIXME */
- /* priv->event_clients = get_servers (itip, global_shell_client, calendar_types, FALSE); */
- }
- show_current_event (itip);
- break;
- case E_CAL_COMPONENT_TODO:
- if (!priv->task_clients) {
- /* EPFIXME */
- /* priv->task_clients = get_servers (itip, global_shell_client, tasks_types, TRUE); */
- }
- show_current_todo (itip);
- break;
- case E_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);
-
- g_object_unref (itip);
-}
-
-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);
-
- if (text == NULL || *text == '\0') {
- gtk_html_load_from_string (GTK_HTML (priv->html), " ", 1);
- return;
- }
-
- priv->vcalendar = g_strdup (text);
- priv->top_level = e_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);
-
- if (priv->ical_comp == NULL) {
- write_error_html (itip, _("The attachment has no viewable calendar items"));
- return;
- }
-
- 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;
-}
-
-void
-e_itip_control_set_view_only (EItipControl *itip, gint view_only)
-{
- EItipControlPrivate *priv;
-
- priv = itip->priv;
-
- priv->view_only = view_only;
-}
-
-gint
-e_itip_control_get_view_only (EItipControl *itip)
-{
- EItipControlPrivate *priv;
-
- priv = itip->priv;
-
- return priv->view_only;
-}
-
-
-void
-e_itip_control_set_delegator_address (EItipControl *itip, const gchar *address)
-{
- EItipControlPrivate *priv;
-
- priv = itip->priv;
-
- if (priv->delegator_address)
- g_free (priv->delegator_address);
-
- priv->delegator_address = g_strdup (address);
-}
-
-const gchar *
-e_itip_control_get_delegator_address (EItipControl *itip)
-{
- EItipControlPrivate *priv;
-
- priv = itip->priv;
-
- return priv->delegator_address;
-}
-
-
-void
-e_itip_control_set_delegator_name (EItipControl *itip, const gchar *name)
-{
- EItipControlPrivate *priv;
-
- priv = itip->priv;
-
- if (priv->delegator_name)
- g_free (priv->delegator_name);
-
- priv->delegator_name = g_strdup (name);
-}
-
-const gchar *
-e_itip_control_get_delegator_name (EItipControl *itip)
-{
- EItipControlPrivate *priv;
-
- priv = itip->priv;
-
- return priv->delegator_name;
-}
-
-void
-e_itip_control_set_calendar_uri (EItipControl *itip, const gchar *uri)
-{
- EItipControlPrivate *priv;
-
- priv = itip->priv;
-
- if (priv->calendar_uri)
- g_free (priv->calendar_uri);
-
- priv->calendar_uri = g_strdup (uri);
-}
-
-const gchar *
-e_itip_control_get_calendar_uri (EItipControl *itip)
-{
- EItipControlPrivate *priv;
-
- priv = itip->priv;
-
- return priv->calendar_uri;
-}
-
-
-static gboolean
-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);
- } else {
- icalparameter *param;
-
- if (address != NULL) {
- prop = icalproperty_new_attendee (address);
- icalcomponent_add_property (ical_comp, prop);
-
- param = icalparameter_new_role (ICAL_ROLE_OPTPARTICIPANT);
- icalproperty_add_parameter (prop, param);
-
- param = icalparameter_new_partstat (status);
- icalproperty_add_parameter (prop, param);
- } else {
- EAccount *a;
-
- a = itip_addresses_get_default ();
-
- prop = icalproperty_new_attendee (a->id->address);
- icalcomponent_add_property (ical_comp, prop);
-
- param = icalparameter_new_cn (a->id->name);
- icalproperty_add_parameter (prop, param);
-
- param = icalparameter_new_role (ICAL_ROLE_REQPARTICIPANT);
- icalproperty_add_parameter (prop, param);
-
- param = icalparameter_new_partstat (status);
- icalproperty_add_parameter (prop, param);
- }
- }
-
- return TRUE;
-}
-
-static void
-update_item (EItipControl *itip)
-{
- EItipControlPrivate *priv;
- struct icaltimetype stamp;
- icalproperty *prop;
- icalcomponent *clone;
- ECal *client;
- ECalComponentVType type;
- GtkWidget *dialog;
-
- priv = itip->priv;
-
- /* Set X-MICROSOFT-CDO-REPLYTIME to record the time at which
- * the user accepted/declined the request. (Outlook ignores
- * SEQUENCE in REPLY reponses and instead requires that each
- * updated response have a later REPLYTIME than the previous
- * one.) This also ends up getting saved in our own copy of
- * the meeting, though there's currently no way to see that
- * information (unless it's being saved to an Exchange folder
- * and you then look at it in Outlook).
- */
- stamp = icaltime_current_time_with_zone (icaltimezone_get_utc_timezone ());
- prop = icalproperty_new_x (icaltime_as_ical_string (stamp));
- icalproperty_set_x_name (prop, "X-MICROSOFT-CDO-REPLYTIME");
- icalcomponent_add_property (priv->ical_comp, prop);
-
- type = e_cal_component_get_vtype (priv->comp);
- if (type == E_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);
- icalcomponent_set_method (priv->top_level, priv->method);
-
- /* FIXME Better error dialog */
- if (!e_cal_receive_objects (client, priv->top_level, NULL)) {
- 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);
-}
-
-#if 0
-static void
-update_attendee_status (EItipControl *itip)
-{
- EItipControlPrivate *priv;
- ECal *client;
- ECalGetStatus status;
- ECalComponent *comp = NULL;
- icalcomponent *icalcomp = NULL;
- ECalComponentVType type;
- const char *uid;
- GtkWidget *dialog;
- ECalResult result;
-
- priv = itip->priv;
-
- type = e_cal_component_get_vtype (priv->comp);
- if (type == E_CAL_COMPONENT_TODO)
- client = priv->task_client;
- else
- client = priv->event_client;
-
- if (client == NULL) {
- dialog = gnome_warning_dialog (_("Attendee status can not be updated "
- "because the item no longer exists"));
- goto cleanup;
- }
-
- /* Obtain our version */
- e_cal_component_get_uid (priv->comp, &uid);
- status = e_cal_get_object (client, uid, NULL, &icalcomp);
-
- if (status == E_CAL_GET_SUCCESS) {
- GSList *attendees;
-
- comp = e_cal_component_new ();
- if (!e_cal_component_set_icalcomponent (comp, icalcomp)) {
- icalcomponent_free (icalcomp);
-
- dialog = gnome_warning_dialog (_("Object is invalid and cannot be updated\n"));
- } else {
- e_cal_component_get_attendee_list (priv->comp, &attendees);
- if (attendees != NULL) {
- ECalComponentAttendee *a = attendees->data;
- icalproperty *prop;
-
- prop = find_attendee (icalcomp, itip_strip_mailto (a->value));
-
- if (prop == NULL) {
- dialog = gnome_question_dialog_modal (_("This response is not from a current "
- "attendee. Add as an attendee?"),
- NULL, NULL);
- if (gnome_dialog_run_and_close (GNOME_DIALOG (dialog)) == GNOME_YES) {
- change_status (icalcomp,
- itip_strip_mailto (a->value),
- a->status);
- e_cal_component_rescan (comp);
- } else {
- goto cleanup;
- }
- } else if (a->status == ICAL_PARTSTAT_NONE || a->status == ICAL_PARTSTAT_X) {
- dialog = gnome_warning_dialog (_("Attendee status could "
- "not be updated because "
- "of an invalid status!\n"));
- goto cleanup;
- } else {
- change_status (icalcomp,
- itip_strip_mailto (a->value),
- a->status);
- e_cal_component_rescan (comp);
- }
- }
- }
-
- result = e_cal_update_object (client, comp);
- switch (result) {
- case E_CAL_RESULT_INVALID_OBJECT :
- dialog = gnome_warning_dialog (_("Object is invalid and cannot be updated\n"));
- break;
- case E_CAL_RESULT_CORBA_ERROR :
- dialog = gnome_warning_dialog (_("There was an error on the CORBA system\n"));
- break;
- case E_CAL_RESULT_NOT_FOUND :
- dialog = gnome_warning_dialog (_("Object could not be found\n"));
- break;
- case E_CAL_RESULT_PERMISSION_DENIED :
- dialog = gnome_warning_dialog (_("You don't have the right permissions to update the calendar\n"));
- break;
- case E_CAL_RESULT_SUCCESS :
- dialog = gnome_ok_dialog (_("Attendee status updated\n"));
- break;
- default :
- dialog = gnome_warning_dialog (_("Attendee status could not be updated!\n"));
- }
- } else {
- dialog = gnome_warning_dialog (_("Attendee status can not be updated "
- "because the item no longer exists"));
- }
-
- cleanup:
- if (comp != NULL)
- g_object_unref (comp);
- gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
-}
-#endif
-
-static void
-remove_item (EItipControl *itip)
-{
- EItipControlPrivate *priv;
- ECal *client;
- ECalComponentVType type;
- const char *uid;
- GtkWidget *dialog;
- GError *error = NULL;
-
- priv = itip->priv;
-
- type = e_cal_component_get_vtype (priv->comp);
- if (type == E_CAL_COMPONENT_TODO)
- client = priv->task_client;
- else
- client = priv->event_client;
-
- if (client == NULL)
- return;
-
- e_cal_component_get_uid (priv->comp, &uid);
- e_cal_remove_object (client, uid, &error);
- if (!error || error->code == E_CALENDAR_STATUS_OBJECT_NOT_FOUND) {
- dialog = gnome_ok_dialog (_("Removal Complete"));
- gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
- } else {
- delete_error_dialog (error, type);
- }
-
- g_clear_error (&error);
-}
-
-static void
-send_item (EItipControl *itip)
-{
- EItipControlPrivate *priv;
- ECalComponent *comp;
- ECalComponentVType vtype;
- GtkWidget *dialog;
-
- priv = itip->priv;
-
- comp = get_real_item (itip);
- vtype = e_cal_component_get_vtype (comp);
-
- if (comp != NULL) {
- switch (vtype) {
- case E_CAL_COMPONENT_EVENT:
- itip_send_comp (E_CAL_COMPONENT_METHOD_REQUEST, comp, priv->event_client, NULL);
- break;
- case E_CAL_COMPONENT_TODO:
- itip_send_comp (E_CAL_COMPONENT_METHOD_REQUEST, comp, priv->task_client, NULL);
- break;
- default:
- itip_send_comp (E_CAL_COMPONENT_METHOD_REQUEST, comp, NULL, NULL);
- }
- g_object_unref (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;
- ECalComponentDateTime datetime;
- time_t start, end;
- GtkWidget *dialog;
- GList *comp_list = NULL;
- icaltimezone *zone;
-
- priv = itip->priv;
-
- e_cal_component_get_dtstart (priv->comp, &datetime);
- if (datetime.tzid) {
- zone = icalcomponent_get_timezone (priv->top_level,
- datetime.tzid);
- } else {
- zone = NULL;
- }
- start = icaltime_as_timet_with_zone (*datetime.value, zone);
- e_cal_component_free_datetime (&datetime);
-
- e_cal_component_get_dtend (priv->comp, &datetime);
- if (datetime.tzid) {
- zone = icalcomponent_get_timezone (priv->top_level,
- datetime.tzid);
- } else {
- zone = NULL;
- }
- end = icaltime_as_timet_with_zone (*datetime.value, zone);
- e_cal_component_free_datetime (&datetime);
-
- if (e_cal_get_free_busy (priv->event_client, NULL, start, end, &comp_list, NULL)) {
- GList *l;
-
- for (l = comp_list; l; l = l->next) {
- ECalComponent *comp = E_CAL_COMPONENT (l->data);
- itip_send_comp (E_CAL_COMPONENT_METHOD_REPLY, comp, priv->event_client, NULL);
-
- g_object_unref (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));
-}
-
-#if 0 /* FIXME */
-static void
-button_selected_cb (EvolutionFolderSelectorButton *button, GNOME_Evolution_Folder *folder, gpointer data)
-{
- EItipControl *itip = E_ITIP_CONTROL (data);
- EItipControlPrivate *priv;
- ECalComponentVType type;
- char *uri;
-
- priv = itip->priv;
-
- type = e_cal_component_get_vtype (priv->comp);
- if (type == E_CAL_COMPONENT_TODO)
- uri = e_cal_util_expand_uri (folder->physicalUri, TRUE);
- else
- uri = e_cal_util_expand_uri (folder->physicalUri, FALSE);
-
- g_object_unref (priv->event_client);
- priv->event_client = start_calendar_server (itip, uri);
-
- g_free (uri);
-}
-#endif
-
-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_IMAGESDIR, 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);
-}
-
-typedef struct
-{
- EItipControl *itip;
- GtkHTMLEmbedded *eb;
- ECal *client;
-}
-ObjectRequestContext;
-
-static void
-default_server_started_cb (ECal *client, ECalendarStatus status, gpointer data)
-{
- ObjectRequestContext *context = data;
- EItipControlPrivate *priv;
- GtkWidget *button;
- ECalComponentVType vtype;
-
- priv = context->itip->priv;
-
- if (status != E_CALENDAR_STATUS_OK ||
- context->itip->priv->destroyed ||
- context->itip->priv->html == NULL) {
- g_object_unref (context->client);
- g_object_unref (context->itip);
- g_free (context);
- return;
- }
-
- priv->event_client = client;
- vtype = e_cal_component_get_vtype (priv->comp);
-
- switch (vtype) {
-#if 0 /* EPFIXME */
- case E_CAL_COMPONENT_EVENT:
- button = evolution_folder_selector_button_new (
- global_shell_client, _("Select Calendar Folder"),
- calendar_config_default_calendar_folder (),
- calendar_types);
- break;
- case E_CAL_COMPONENT_TODO:
- button = evolution_folder_selector_button_new (
- global_shell_client, _("Select Tasks Folder"),
- calendar_config_default_tasks_folder (),
- tasks_types);
- break;
-#endif
- default:
- button = NULL;
- }
-
-#if 0
- g_signal_connect (button, "selected", G_CALLBACK (button_selected_cb), context->itip);
-#endif
-
- gtk_container_add (GTK_CONTAINER (context->eb), button);
- gtk_widget_show (button);
-
- g_object_unref (context->itip);
- g_free (context);
- return;
-}
-
-static gboolean
-object_requested_cb (GtkHTML *html, GtkHTMLEmbedded *eb, gpointer data)
-{
- EItipControl *itip = E_ITIP_CONTROL (data);
- ObjectRequestContext *context;
- EItipControlPrivate *priv;
- ECalComponentVType vtype;
- gboolean success;
-
- priv = itip->priv;
- vtype = e_cal_component_get_vtype (priv->comp);
-
- context = g_new0 (ObjectRequestContext, 1);
- context->itip = itip;
- context->eb = eb;
-
- switch (vtype) {
- case E_CAL_COMPONENT_EVENT:
- context->client = e_cal_new_from_uri ("", CALOBJ_TYPE_EVENT);
- success = start_default_server (itip, context->client, FALSE);
- break;
- case E_CAL_COMPONENT_TODO:
- context->client = e_cal_new_from_uri ("", CALOBJ_TYPE_TODO);
- success = start_default_server (itip, context->client, TRUE);
- break;
- default:
- g_free (context);
- return FALSE;
- }
-
- if (!success) {
- g_object_unref (context->client);
- g_free (context);
- return FALSE;
- }
-
- g_object_ref (itip);
-
- return TRUE;
-}
-
-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, status = 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':
- status = change_status (priv->ical_comp, priv->my_address,
- ICAL_PARTSTAT_ACCEPTED);
- if (status) {
- e_cal_component_rescan (priv->comp);
- update_item (itip);
- }
- break;
- case 'T':
- status = change_status (priv->ical_comp, priv->my_address,
- ICAL_PARTSTAT_TENTATIVE);
- if (status) {
- e_cal_component_rescan (priv->comp);
- update_item (itip);
- }
- break;
- case 'D':
- status = change_status (priv->ical_comp, priv->my_address,
- ICAL_PARTSTAT_DECLINED);
- if (status) {
- e_cal_component_rescan (priv->comp);
- remove_item (itip);
- }
- break;
- case 'F':
- send_freebusy (itip);
- break;
- case 'R':
- /* FIXME Make sure this does the right thing in the backend */
- update_item (itip);
- break;
- case 'S':
- send_item (itip);
- break;
- case 'C':
- update_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 && status) {
- ECalComponent *comp = NULL;
- ECalComponentVType vtype;
- icalcomponent *ical_comp;
- icalproperty *prop;
- icalvalue *value;
- const char *attendee;
- GSList *l, *list = NULL;
-
- comp = e_cal_component_clone (priv->comp);
- if (comp == NULL)
- return;
- vtype = e_cal_component_get_vtype (comp);
-
- if (priv->my_address == NULL)
- find_my_address (itip, priv->ical_comp);
- g_assert (priv->my_address != NULL);
-
- ical_comp = e_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))
- {
- char *text;
-
- value = icalproperty_get_value (prop);
- if (!value)
- continue;
-
- attendee = icalvalue_get_string (value);
-
- text = g_strdup (itip_strip_mailto (attendee));
- text = g_strstrip (text);
- if (g_strcasecmp (priv->my_address, text))
- list = g_slist_prepend (list, prop);
- g_free (text);
- }
-
- for (l = list; l; l = l->next) {
- prop = l->data;
- icalcomponent_remove_property (ical_comp, prop);
- icalproperty_free (prop);
- }
- g_slist_free (list);
-
- e_cal_component_rescan (comp);
- switch (vtype) {
- case E_CAL_COMPONENT_EVENT:
- itip_send_comp (E_CAL_COMPONENT_METHOD_REPLY, comp,
- priv->event_client, priv->top_level);
- break;
- case E_CAL_COMPONENT_TODO:
- itip_send_comp (E_CAL_COMPONENT_METHOD_REPLY, comp,
- priv->task_client, priv->top_level);
- break;
- default:
- itip_send_comp (E_CAL_COMPONENT_METHOD_REPLY, comp, NULL, NULL);
- }
- g_object_unref (comp);
- }
-}
diff --git a/calendar/gui/e-itip-control.glade b/calendar/gui/e-itip-control.glade
deleted file mode 100644
index 344bcdeced..0000000000
--- a/calendar/gui/e-itip-control.glade
+++ /dev/null
@@ -1,493 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd" >
-
-<glade-interface>
- <widget class="GtkWindow" id="window1">
- <property name="visible">no</property>
- <property name="title" translatable="yes">window1</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="modal">no</property>
- <property name="allow_shrink">no</property>
- <property name="allow_grow">yes</property>
- <property name="window-position">GTK_WIN_POS_NONE</property>
-
- <child>
- <widget class="GtkFrame" id="main_frame">
- <property name="border_width">4</property>
- <property name="label" translatable="yes">Calendar Message</property>
- <property name="label_xalign">0</property>
- <property name="shadow">GTK_SHADOW_ETCHED_IN</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow1">
- <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
- <property name="vscrollbar_policy">GTK_POLICY_NEVER</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkViewport" id="viewport1">
- <property name="shadow_type">GTK_SHADOW_NONE</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkVBox" id="vbox1">
- <property name="homogeneous">no</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkTable" id="table1">
- <property name="border_width">3</property>
- <property name="homogeneous">no</property>
- <property name="row_spacing">3</property>
- <property name="column_spacing">3</property>
- <property name="n-rows">4</property>
- <property name="n-columns">2</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkEntry" id="organizer_entry">
- <property name="can_focus">yes</property>
- <property name="editable">no</property>
- <property name="text" translatable="yes"></property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">expand|fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="summary_entry">
- <property name="can_focus">yes</property>
- <property name="editable">no</property>
- <property name="text" translatable="yes"></property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">expand|fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow2">
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkTextView" id="description_box">
- <property name="can_focus">yes</property>
- <property name="editable">no</property>
- <property name="text" translatable="yes"></property>
- <property name="wrap_mode">GTK_WRAP_WORD</property>
- <property name="visible">yes</property>
- </widget>
- </child>
-
- <child internal-child="hscrollbar">
- <widget class="GtkHScrollbar" id="convertwidget3">
- <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
- <property name="visible">yes</property>
- </widget>
- </child>
-
- <child internal-child="vscrollbar">
- <widget class="GtkVScrollbar" id="convertwidget4">
- <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment1">
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkHBox" id="hbox1">
- <property name="homogeneous">no</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="dtstart_label">
- <property name="label" translatable="yes">date-start</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label3">
- <property name="label" translatable="yes">--to--</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0</property>
- <property name="xpad">19</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="dtend_label">
- <property name="label" translatable="yes">date-end</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">expand|fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label6">
- <property name="label" translatable="yes">Organizer:</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label7">
- <property name="label" translatable="yes">Date:</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label8">
- <property name="label" translatable="yes">Summary:</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label9">
- <property name="label" translatable="yes">Description:</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">6</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label12">
- <property name="label" translatable="yes">Server Message:</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">no</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xpad">3</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow3">
- <property name="border_width">3</property>
- <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="width-request">365</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkTextView" id="message_text">
- <property name="can_focus">yes</property>
- <property name="editable">no</property>
- <property name="text" translatable="yes"></property>
- <property name="wrap_mode">GTK_WRAP_WORD</property>
- <property name="visible">yes</property>
- </widget>
- </child>
-
- <child internal-child="hscrollbar">
- <widget class="GtkHScrollbar" id="convertwidget5">
- <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
- <property name="visible">yes</property>
- </widget>
- </child>
-
- <child internal-child="vscrollbar">
- <widget class="GtkVScrollbar" id="convertwidget6">
- <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="button_box">
- <property name="border_width">3</property>
- <property name="homogeneous">no</property>
- <property name="spacing">0</property>
- <property name="height-request">30</property>
- <property name="visible">yes</property>
-
- <child>
- <placeholder />
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
-
- <child internal-child="hscrollbar">
- <widget class="GtkHScrollbar" id="convertwidget1">
- <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
- <property name="visible">yes</property>
- </widget>
- </child>
-
- <child internal-child="vscrollbar">
- <widget class="GtkVScrollbar" id="convertwidget2">
- <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <widget class="GtkWindow" id="loading_window">
- <property name="visible">no</property>
- <property name="title" translatable="yes">Loading Calendar</property>
- <property name="type">GTK_WINDOW_DIALOG</property>
- <property name="modal">no</property>
- <property name="allow_shrink">no</property>
- <property name="allow_grow">yes</property>
- <property name="window-position">GTK_WIN_POS_CENTER</property>
-
- <child>
- <widget class="GtkFrame" id="frame1">
- <property name="border_width">4</property>
- <property name="label" translatable="yes"></property>
- <property name="label_xalign">0</property>
- <property name="shadow">GTK_SHADOW_ETCHED_OUT</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkVBox" id="vbox2">
- <property name="border_width">7</property>
- <property name="homogeneous">no</property>
- <property name="spacing">1</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkHBox" id="hbox2">
- <property name="border_width">6</property>
- <property name="homogeneous">no</property>
- <property name="spacing">9</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label10">
- <property name="label" translatable="yes">Loading calendar...</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkProgressBar" id="loading_progress">
- <property name="bar_style">GTK_PROGRESS_CONTINUOUS</property>
- <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
- <property name="activity_mode">no</property>
- <property name="show_text">no</property>
- <property name="format" translatable="yes">%P %%</property>
- <property name="text_xalign">0.5</property>
- <property name="text_yalign">0.5</property>
- <property name="visible">yes</property>
- <property name="adjustment">0 0 100 1 10 10</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
-</glade-interface>
diff --git a/calendar/gui/e-itip-control.h b/calendar/gui/e-itip-control.h
deleted file mode 100644
index 12ddf7354e..0000000000
--- a/calendar/gui/e-itip-control.h
+++ /dev/null
@@ -1,82 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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);
-void e_itip_control_set_view_only (EItipControl *itip,
- gboolean view_only);
-gboolean e_itip_control_get_view_only (EItipControl *itip);
-void e_itip_control_set_delegator_address (EItipControl *itip,
- const gchar *address);
-const gchar *e_itip_control_get_delegator_address (EItipControl *itip);
-void e_itip_control_set_delegator_name (EItipControl *itip,
- const gchar *name);
-const gchar *e_itip_control_get_delegator_name (EItipControl *itip);
-void e_itip_control_set_calendar_uri (EItipControl *itip,
- const gchar *uri);
-const gchar *e_itip_control_get_calendar_uri (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 474cf7b1a4..0000000000
--- a/calendar/gui/e-meeting-attendee.c
+++ /dev/null
@@ -1,1000 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <gal/util/e-util.h>
-#include "e-meeting-attendee.h"
-
-struct _EMeetingAttendeePrivate {
- 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;
-
- EMeetingAttendeeEditLevel edit_level;
-
- 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 finalize (GObject *obj);
-
-
-static GObjectClass *parent_class = NULL;
-
-E_MAKE_TYPE (e_meeting_attendee, "EMeetingAttendee", EMeetingAttendee,
- class_init, init, G_TYPE_OBJECT);
-
-static void
-class_init (EMeetingAttendeeClass *klass)
-{
- GObjectClass *object_class;
-
- object_class = G_OBJECT_CLASS (klass);
- parent_class = g_type_class_peek_parent (klass);
-
- signals[CHANGED] =
- g_signal_new ("changed",
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (EMeetingAttendeeClass, changed),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-
- object_class->finalize = finalize;
-}
-
-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)
-{
- g_signal_emit_by_name (G_OBJECT (ia), "changed");
-}
-
-static void
-init (EMeetingAttendee *ia)
-{
- EMeetingAttendeePrivate *priv;
-
- priv = g_new0 (EMeetingAttendeePrivate, 1);
-
- ia->priv = priv;
-
- 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->edit_level = E_MEETING_ATTENDEE_EDIT_FULL;
- 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
-finalize (GObject *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);
-
- if (G_OBJECT_CLASS (parent_class)->finalize)
- (* G_OBJECT_CLASS (parent_class)->finalize) (obj);
-}
-
-GObject *
-e_meeting_attendee_new (void)
-{
- return g_object_new (E_TYPE_MEETING_ATTENDEE, NULL);
-}
-
-GObject *
-e_meeting_attendee_new_from_e_cal_component_attendee (ECalComponentAttendee *ca)
-{
- EMeetingAttendee *ia;
-
- ia = E_MEETING_ATTENDEE (g_object_new (E_TYPE_MEETING_ATTENDEE, NULL));
-
- 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 G_OBJECT (ia);
-}
-
-ECalComponentAttendee *
-e_meeting_attendee_as_e_cal_component_attendee (EMeetingAttendee *ia)
-{
- EMeetingAttendeePrivate *priv;
- ECalComponentAttendee *ca;
-
- priv = ia->priv;
-
- ca = g_new0 (ECalComponentAttendee, 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;
-
- if (priv->cutype == ICAL_CUTYPE_ROOM
- || priv->cutype == ICAL_CUTYPE_RESOURCE)
- return E_MEETING_ATTENDEE_RESOURCE;
-
- if (priv->role == ICAL_ROLE_CHAIR
- || priv->role == ICAL_ROLE_REQPARTICIPANT)
- return E_MEETING_ATTENDEE_REQUIRED_PERSON;
-
- return E_MEETING_ATTENDEE_OPTIONAL_PERSON;
-}
-
-
-EMeetingAttendeeEditLevel
-e_meeting_attendee_get_edit_level (EMeetingAttendee *ia)
-{
- EMeetingAttendeePrivate *priv;
-
- g_return_val_if_fail (ia != NULL, E_MEETING_ATTENDEE_EDIT_NONE);
- g_return_val_if_fail (E_IS_MEETING_ATTENDEE (ia), E_MEETING_ATTENDEE_EDIT_NONE);
-
- priv = ia->priv;
-
- return priv->edit_level;
-}
-
-void
-e_meeting_attendee_set_edit_level (EMeetingAttendee *ia, EMeetingAttendeeEditLevel level)
-{
- EMeetingAttendeePrivate *priv;
-
- g_return_if_fail (ia != NULL);
- g_return_if_fail (E_IS_MEETING_ATTENDEE (ia));
-
- priv = ia->priv;
-
- priv->edit_level = level;
-}
-
-
-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 42c5e13c2e..0000000000
--- a/calendar/gui/e-meeting-attendee.h
+++ /dev/null
@@ -1,172 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <libecal/e-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) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_MEETING_ATTENDEE, EMeetingAttendee))
-#define E_MEETING_ATTENDEE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_MEETING_ATTENDEE, EMeetingAttendeeClass))
-#define E_IS_MEETING_ATTENDEE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_MEETING_ATTENDEE))
-#define E_IS_MEETING_ATTENDEE_CLASS(klass) (G_TYPE_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;
-
-typedef enum
-{
- E_MEETING_ATTENDEE_EDIT_FULL,
- E_MEETING_ATTENDEE_EDIT_STATUS,
- E_MEETING_ATTENDEE_EDIT_NONE
-} EMeetingAttendeeEditLevel;
-
-struct _EMeetingAttendee {
- GtkObject parent;
-
- EMeetingAttendeePrivate *priv;
-};
-
-struct _EMeetingAttendeeClass {
- GtkObjectClass parent_class;
-
- void (* changed) (EMeetingAttendee *ia);
-};
-
-
-GType e_meeting_attendee_get_type (void);
-GObject *e_meeting_attendee_new (void);
-GObject *e_meeting_attendee_new_from_e_cal_component_attendee (ECalComponentAttendee *ca);
-
-ECalComponentAttendee *e_meeting_attendee_as_e_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);
-
-EMeetingAttendeeEditLevel e_meeting_attendee_get_edit_level (EMeetingAttendee *ia);
-void e_meeting_attendee_set_edit_level (EMeetingAttendee *ia, EMeetingAttendeeEditLevel level);
-
-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-list-view.c b/calendar/gui/e-meeting-list-view.c
deleted file mode 100644
index 5613f6adea..0000000000
--- a/calendar/gui/e-meeting-list-view.c
+++ /dev/null
@@ -1,460 +0,0 @@
-/*
- * e-meeting-list-view.c
- *
- * Authors: Mike Kestner <mkestner@ximian.com>
- * JP Rosevear <jpr@ximian.com>
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <gtk/gtktreemodel.h>
-#include <bonobo/bonobo-control.h>
-#include <bonobo/bonobo-widget.h>
-#include <bonobo/bonobo-exception.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnome/gnome-util.h>
-#include <libgnomevfs/gnome-vfs.h>
-#include <libebook/e-book.h>
-#include <libebook/e-vcard.h>
-#include <libecal/e-cal-component.h>
-#include <libecal/e-cal-util.h>
-#include <libecal/e-cal-time-util.h>
-#include "Evolution-Addressbook-SelectNames.h"
-#include "calendar-config.h"
-#include "e-meeting-list-view.h"
-#include <misc/e-cell-renderer-combo.h>
-#include <addressbook/util/eab-destination.h>
-#include "e-select-names-renderer.h"
-
-#define SELECT_NAMES_OAFID "OAFIID:GNOME_Evolution_Addressbook_SelectNames:" BASE_VERSION
-
-struct _EMeetingListViewPrivate
-{
- EMeetingStore *store;
-
- EBook *ebook;
-
- GNOME_Evolution_Addressbook_SelectNames corba_select_names;
-};
-
-#define BUF_SIZE 1024
-
-static char *sections[] = {N_("Chair Persons"),
- N_("Required Participants"),
- N_("Optional Participants"),
- N_("Resources"),
- NULL};
-static icalparameter_role roles[] = {ICAL_ROLE_CHAIR,
- ICAL_ROLE_REQPARTICIPANT,
- ICAL_ROLE_OPTPARTICIPANT,
- ICAL_ROLE_NONPARTICIPANT,
- ICAL_ROLE_NONE};
-
-static GtkTreeViewClass *parent_class = NULL;
-
-static void
-start_addressbook_server (EMeetingListView *view)
-{
- GError *error = NULL;
-
- view->priv->ebook = e_book_new ();
- if (!e_book_load_local_addressbook (view->priv->ebook, &error)) {
- g_warning ("start_addressbook_server(): %s", error->message);
- g_error_free (error);
-
- return;
- }
-}
-
-static void
-emlv_finalize (GObject *obj)
-{
- EMeetingListView *view = E_MEETING_LIST_VIEW (obj);
- EMeetingListViewPrivate *priv = view->priv;
-
- if (priv->ebook != NULL)
- g_object_unref (priv->ebook);
-
- if (priv->corba_select_names != CORBA_OBJECT_NIL) {
- CORBA_Environment ev;
- CORBA_exception_init (&ev);
- bonobo_object_release_unref (priv->corba_select_names, &ev);
- CORBA_exception_free (&ev);
- }
-
- g_free (priv);
-
- if (G_OBJECT_CLASS (parent_class)->finalize)
- (* G_OBJECT_CLASS (parent_class)->finalize) (obj);
-}
-
-static void
-emlv_class_init (GObjectClass *klass)
-{
- parent_class = g_type_class_peek_parent (klass);
-
- klass->finalize = emlv_finalize;
-}
-
-
-static void
-emlv_init (EMeetingListView *view)
-{
- EMeetingListViewPrivate *priv;
-
- priv = g_new0 (EMeetingListViewPrivate, 1);
-
- view->priv = priv;
-
- priv->corba_select_names = CORBA_OBJECT_NIL;
-
- start_addressbook_server (view);
-}
-
-E_MAKE_TYPE (e_meeting_list_view, "EMeetingListView", EMeetingListView, emlv_class_init, emlv_init, GTK_TYPE_TREE_VIEW);
-static GList *
-get_type_strings ()
-{
- GList *strings = NULL;
-
- strings = g_list_append (strings, (char*) _("Individual"));
- strings = g_list_append (strings, (char*) _("Group"));
- strings = g_list_append (strings, (char*) _("Resource"));
- strings = g_list_append (strings, (char*) _("Room"));
- strings = g_list_append (strings, (char*) _("Unknown"));
-
- return strings;
-}
-
-static GList *
-get_role_strings ()
-{
- GList *strings = NULL;
-
- strings = g_list_append (strings, (char*) _("Chair"));
- strings = g_list_append (strings, (char*) _("Required Participant"));
- strings = g_list_append (strings, (char*) _("Optional Participant"));
- strings = g_list_append (strings, (char*) _("Non-Participant"));
- strings = g_list_append (strings, (char*) _("Unknown"));
-
- return strings;
-}
-
-static GList *
-get_rsvp_strings ()
-{
- GList *strings = NULL;
-
- strings = g_list_append (strings, (char*) _("Yes"));
- strings = g_list_append (strings, (char*) _("No"));
-
- return strings;
-}
-
-static GList *
-get_status_strings ()
-{
- GList *strings = NULL;
-
- strings = g_list_append (strings, (char*) _("Needs Action"));
- strings = g_list_append (strings, (char*) _("Accepted"));
- strings = g_list_append (strings, (char*) _("Declined"));
- strings = g_list_append (strings, (char*) _("Tentative"));
- strings = g_list_append (strings, (char*) _("Delegated"));
-
- return strings;
-}
-
-static void
-value_edited (GtkTreeView *view, gint col, const gchar *path, const gchar *text)
-{
- EMeetingStore *model = E_MEETING_STORE (gtk_tree_view_get_model (view));
- GtkTreePath *treepath = gtk_tree_path_new_from_string (path);
- int row = gtk_tree_path_get_indices (treepath)[0];
-
- e_meeting_store_set_value (model, row, col, text);
- gtk_tree_path_free (treepath);
-}
-
-static void
-attendee_edited_cb (GtkCellRenderer *renderer, const gchar *path, const gchar *address, const gchar *name, GtkTreeView *view)
-{
- value_edited (view, E_MEETING_STORE_ADDRESS_COL, path, address);
- value_edited (view, E_MEETING_STORE_CN_COL, path, name);
-}
-
-static void
-type_edited_cb (GtkCellRenderer *renderer, const gchar *path, const gchar *text, GtkTreeView *view)
-{
- value_edited (view, E_MEETING_STORE_TYPE_COL, path, text);
-}
-
-static void
-role_edited_cb (GtkCellRenderer *renderer, const gchar *path, const gchar *text, GtkTreeView *view)
-{
- value_edited (view, E_MEETING_STORE_ROLE_COL, path, text);
-}
-
-static void
-rsvp_edited_cb (GtkCellRenderer *renderer, const gchar *path, const gchar *text, GtkTreeView *view)
-{
- value_edited (view, E_MEETING_STORE_RSVP_COL, path, text);
-}
-
-static void
-status_edited_cb (GtkCellRenderer *renderer, const gchar *path, const gchar *text, GtkTreeView *view)
-{
- value_edited (view, E_MEETING_STORE_STATUS_COL, path, text);
-}
-
-static void
-build_table (GtkTreeView *view)
-{
- GtkCellRenderer *renderer;
-
- gtk_tree_view_set_headers_visible (view, TRUE);
- gtk_tree_view_set_rules_hint (view, TRUE);
-
- renderer = e_select_names_renderer_new ();
- g_object_set (G_OBJECT (renderer), "editable", TRUE, NULL);
- gtk_tree_view_insert_column_with_attributes (view, -1, _("Attendee"), renderer,
- "text", E_MEETING_STORE_ATTENDEE_COL,
- "address", E_MEETING_STORE_ADDRESS_COL,
- "underline", E_MEETING_STORE_ATTENDEE_UNDERLINE_COL,
- NULL);
- g_signal_connect (renderer, "cell_edited", G_CALLBACK (attendee_edited_cb), view);
-
- renderer = e_cell_renderer_combo_new ();
- g_object_set (G_OBJECT (renderer), "list", get_type_strings (), "editable", TRUE, NULL);
- gtk_tree_view_insert_column_with_attributes (view, -1, _("Type"), renderer,
- "text", E_MEETING_STORE_TYPE_COL,
- NULL);
- g_signal_connect (renderer, "edited", G_CALLBACK (type_edited_cb), view);
-
- renderer = e_cell_renderer_combo_new ();
- g_object_set (G_OBJECT (renderer), "list", get_role_strings (), "editable", TRUE, NULL);
- gtk_tree_view_insert_column_with_attributes (view, -1, _("Role"), renderer,
- "text", E_MEETING_STORE_ROLE_COL,
- NULL);
- g_signal_connect (renderer, "edited", G_CALLBACK (role_edited_cb), view);
-
- renderer = e_cell_renderer_combo_new ();
- g_object_set (G_OBJECT (renderer), "list", get_rsvp_strings (), "editable", TRUE, NULL);
- gtk_tree_view_insert_column_with_attributes (view, -1, _("RSVP"), renderer,
- "text", E_MEETING_STORE_RSVP_COL,
- NULL);
- g_signal_connect (renderer, "edited", G_CALLBACK (rsvp_edited_cb), view);
-
- renderer = e_cell_renderer_combo_new ();
- g_object_set (G_OBJECT (renderer), "list", get_status_strings (), "editable", TRUE, NULL);
- gtk_tree_view_insert_column_with_attributes (view, -1, _("Status"), renderer,
- "text", E_MEETING_STORE_STATUS_COL,
- NULL);
- g_signal_connect (renderer, "edited", G_CALLBACK (status_edited_cb), view);
-}
-
-EMeetingListView *
-e_meeting_list_view_new (EMeetingStore *store)
-{
- EMeetingListView *view = g_object_new (E_TYPE_MEETING_LIST_VIEW, NULL);
-
- if (view) {
- view->priv->store = store;
- gtk_tree_view_set_model (GTK_TREE_VIEW (view), GTK_TREE_MODEL (store));
- build_table (GTK_TREE_VIEW (view));
- }
-
- return view;
-}
-
-void
-e_meeting_list_view_column_set_visible (EMeetingListView *view, const gchar *col_name, gboolean visible)
-{
- GList *cols, *l;
-
- cols = gtk_tree_view_get_columns (GTK_TREE_VIEW (view));
-
- for (l = cols; l; l = l->next) {
- GtkTreeViewColumn *col = (GtkTreeViewColumn *) l->data;
-
- if (strcmp (gtk_tree_view_column_get_title (col), col_name) == 0) {
- gtk_tree_view_column_set_visible (col, visible);
- break;
- }
- }
-}
-
-static void
-process_section (EMeetingListView *view, EABDestination **cards, icalparameter_role role)
-{
- EMeetingListViewPrivate *priv;
- int i;
-
- priv = view->priv;
- for (i = 0; i < G_N_ELEMENTS (cards); i++) {
- const char *name, *attendee = NULL;
- char *attr = NULL;
-
- name = eab_destination_get_name (cards[i]);
-
- /* Get the field as attendee from the backend */
- if (e_cal_get_ldap_attribute (e_meeting_store_get_e_cal (priv->store),
- &attr, NULL)) {
- /* FIXME this should be more general */
- if (!g_ascii_strcasecmp (attr, "icscalendar")) {
- EContact *contact;
-
- /* FIXME: this does not work, have to use first
- eab_destination_use_contact() */
- contact = eab_destination_get_contact (cards[i]);
- if (contact) {
- attendee = e_contact_get (contact, E_CONTACT_FREEBUSY_URL);
- if (!attendee)
- attendee = e_contact_get (contact, E_CONTACT_CALENDAR_URI);
- }
- }
- }
-
- /* If we couldn't get the attendee prior, get the email address as the default */
- if (attendee == NULL || *attendee == '\0') {
- attendee = eab_destination_get_email (cards[i]);
- }
-
- if (attendee == NULL || *attendee == '\0')
- continue;
-
- if (e_meeting_store_find_attendee (priv->store, attendee, NULL) == NULL) {
- EMeetingAttendee *ia = e_meeting_store_add_attendee_with_defaults (priv->store);
-
- e_meeting_attendee_set_address (ia, g_strdup_printf ("MAILTO:%s", attendee));
- e_meeting_attendee_set_role (ia, role);
- if (role == ICAL_ROLE_NONPARTICIPANT)
- e_meeting_attendee_set_cutype (ia, ICAL_CUTYPE_RESOURCE);
- e_meeting_attendee_set_cn (ia, g_strdup (name));
- }
- }
-}
-
-static void
-select_names_ok_cb (BonoboListener *listener, const char *event_name, const CORBA_any *arg, CORBA_Environment *ev, gpointer data)
-{
- EMeetingListView *view = E_MEETING_LIST_VIEW (data);
- int i;
-
- for (i = 0; sections[i] != NULL; i++) {
- EABDestination **destv;
- char *string = NULL;
- Bonobo_Control corba_control = GNOME_Evolution_Addressbook_SelectNames_getEntryBySection
- (view->priv->corba_select_names, sections[i], ev);
- GtkWidget *control_widget = bonobo_widget_new_control_from_objref (corba_control, CORBA_OBJECT_NIL);
-
- bonobo_widget_get_property (BONOBO_WIDGET (control_widget), "destinations",
- TC_CORBA_string, &string, NULL);
- destv = eab_destination_importv (string);
- if (destv) {
- process_section (view, destv, roles[i]);
- g_free (destv);
- }
- }
-}
-
-static void
-add_section (GNOME_Evolution_Addressbook_SelectNames corba_select_names, const char *name)
-{
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
-
- GNOME_Evolution_Addressbook_SelectNames_addSection (
- corba_select_names, name, gettext (name), &ev);
-
- CORBA_exception_free (&ev);
-}
-
-static gboolean
-get_select_name_dialog (EMeetingListView *view)
-{
- EMeetingListViewPrivate *priv;
- CORBA_Environment ev;
- int i;
-
- priv = view->priv;
-
- CORBA_exception_init (&ev);
-
- if (priv->corba_select_names != CORBA_OBJECT_NIL) {
- int i;
-
- for (i = 0; sections[i] != NULL; i++) {
- GtkWidget *control_widget;
- Bonobo_Control 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", TC_CORBA_string, "", NULL);
- }
- CORBA_exception_free (&ev);
-
- return TRUE;
- }
-
- priv->corba_select_names = bonobo_activation_activate_from_id (SELECT_NAMES_OAFID, 0, NULL, &ev);
-
- for (i = 0; sections[i] != NULL; i++)
- add_section (priv->corba_select_names, sections[i]);
-
- bonobo_event_source_client_add_listener (priv->corba_select_names,
- (BonoboListenerCallbackFn) select_names_ok_cb,
- "GNOME/Evolution:ok:dialog", NULL, view);
-
- if (BONOBO_EX (&ev)) {
- CORBA_exception_free (&ev);
- return FALSE;
- }
-
- CORBA_exception_free (&ev);
-
- return TRUE;
-}
-
-void
-e_meeting_list_view_invite_others_dialog (EMeetingListView *view)
-{
- CORBA_Environment ev;
-
- if (!get_select_name_dialog (view))
- return;
-
- CORBA_exception_init (&ev);
-
- GNOME_Evolution_Addressbook_SelectNames_activateDialog (
- view->priv->corba_select_names, _("Required Participants"), &ev);
-
- CORBA_exception_free (&ev);
-}
-
diff --git a/calendar/gui/e-meeting-list-view.h b/calendar/gui/e-meeting-list-view.h
deleted file mode 100644
index dd539b9652..0000000000
--- a/calendar/gui/e-meeting-list-view.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * e-meeting-list-view.h
- *
- * Author: Mike Kestner <mkestner@ximian.com>
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_LIST_VIEW_H_
-#define _E_MEETING_LIST_VIEW_H_
-
-#include <gtk/gtktreeview.h>
-#include "e-meeting-store.h"
-
-G_BEGIN_DECLS
-
-#define E_TYPE_MEETING_LIST_VIEW (e_meeting_list_view_get_type ())
-#define E_MEETING_LIST_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_MEETING_LIST_VIEW, EMeetingListView))
-#define E_MEETING_LIST_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_MEETING_LIST_VIEW, EMeetingListViewClass))
-#define E_IS_MEETING_LIST_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_MEETING_LIST_VIEW))
-#define E_IS_MEETING_LIST_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_MEETING_LIST_VIEW))
-
-
-typedef struct _EMeetingListView EMeetingListView;
-typedef struct _EMeetingListViewPrivate EMeetingListViewPrivate;
-typedef struct _EMeetingListViewClass EMeetingListViewClass;
-
-struct _EMeetingListView {
- GtkTreeView parent;
-
- EMeetingListViewPrivate *priv;
-};
-
-struct _EMeetingListViewClass {
- GtkTreeViewClass parent_class;
-};
-
-GType e_meeting_list_view_get_type (void);
-
-EMeetingListView *e_meeting_list_view_new (EMeetingStore *store);
-
-void e_meeting_list_view_column_set_visible (EMeetingListView *emlv, const gchar *col_name, gboolean visible);
-
-void e_meeting_list_view_invite_others_dialog (EMeetingListView *emlv);
-
-G_END_DECLS
-
-#endif
diff --git a/calendar/gui/e-meeting-model.c b/calendar/gui/e-meeting-model.c
deleted file mode 100644
index 559ede9b6c..0000000000
--- a/calendar/gui/e-meeting-model.c
+++ /dev/null
@@ -1,1780 +0,0 @@
-/* -*- Mod:e 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <bonobo/bonobo-control.h>
-#include <bonobo/bonobo-widget.h>
-#include <bonobo/bonobo-exception.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnome/gnome-util.h>
-#include <libgnomevfs/gnome-vfs.h>
-#include <gal/e-table/e-table-without.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 <addressbook/util/eab-destination.h>
-#include <ebook/e-book.h>
-#include <ebook/e-book-async.h>
-#include <ebook/e-contact.h>
-#include <libecal/e-cal-component.h>
-#include <libecal/e-cal-util.h>
-#include <libecal/e-cal-time-util.h>
-#include "Evolution-Addressbook-SelectNames.h"
-#include "calendar-config.h"
-#include "itip-utils.h"
-#include "e-meeting-utils.h"
-#include "e-meeting-attendee.h"
-#include "e-meeting-model.h"
-
-#define SELECT_NAMES_OAFID "OAFIID:GNOME_Evolution_Addressbook_SelectNames:" BASE_VERSION
-
-struct _EMeetingModelPrivate
-{
- GPtrArray *attendees;
-
- GList *tables;
-
- ECal *client;
- icaltimezone *zone;
-
- EBook *ebook;
- gboolean book_loaded;
- gboolean book_load_wait;
-
- GPtrArray *refresh_queue;
- GHashTable *refresh_data;
- guint refresh_idle_id;
-
- /* For invite others dialogs */
- GNOME_Evolution_Addressbook_SelectNames corba_select_names;
-};
-
-#define BUF_SIZE 1024
-
-static char *sections[] = {N_("Chair Persons"),
- N_("Required Participants"),
- N_("Optional Participants"),
- N_("Resources"),
- NULL};
-static icalparameter_role roles[] = {ICAL_ROLE_CHAIR,
- ICAL_ROLE_REQPARTICIPANT,
- ICAL_ROLE_OPTPARTICIPANT,
- ICAL_ROLE_NONPARTICIPANT,
- ICAL_ROLE_NONE};
-
-typedef struct _EMeetingModelQueueData EMeetingModelQueueData;
-struct _EMeetingModelQueueData {
- EMeetingModel *im;
- EMeetingAttendee *ia;
-
- gboolean refreshing;
-
- EMeetingTime start;
- EMeetingTime end;
-
- char buffer[BUF_SIZE];
- GString *string;
-
- GPtrArray *call_backs;
- GPtrArray *data;
-};
-
-
-static void class_init (EMeetingModelClass *klass);
-static void init (EMeetingModel *model);
-static void finalize (GObject *obj);
-
-static void refresh_queue_add (EMeetingModel *im, int row,
- EMeetingTime *start,
- EMeetingTime *end,
- EMeetingModelRefreshCallback call_back,
- gpointer data);
-static void refresh_queue_remove (EMeetingModel *im,
- EMeetingAttendee *ia);
-static gboolean refresh_busy_periods (gpointer data);
-
-static void attendee_changed_cb (EMeetingAttendee *ia, gpointer data);
-static void select_names_ok_cb (BonoboListener *listener,
- const char *event_name,
- const CORBA_any *arg,
- CORBA_Environment *ev,
- gpointer data);
-
-static void table_destroy_state_cb (ETableScrolled *etable, gpointer data);
-static void table_destroy_list_cb (ETableScrolled *etable, gpointer data);
-
-static ETableModelClass *parent_class = NULL;
-
-E_MAKE_TYPE (e_meeting_model, "EMeetingModel", EMeetingModel,
- class_init, init, E_TABLE_MODEL_TYPE);
-
-static void
-book_open_cb (EBook *book, EBookStatus status, gpointer data)
-{
- EMeetingModel *im = E_MEETING_MODEL (data);
- EMeetingModelPrivate *priv;
-
- priv = im->priv;
-
- priv->ebook = book;
-
- if (status == E_BOOK_ERROR_OK)
- priv->book_loaded = TRUE;
- else
- g_warning ("Book not loaded");
-
- if (priv->book_load_wait) {
- priv->book_load_wait = FALSE;
- gtk_main_quit ();
- }
-}
-
-static void
-start_addressbook_server (EMeetingModel *im)
-{
- e_book_async_get_default_addressbook (book_open_cb, im);
-}
-
-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 E_MEETING_MODEL_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, E_MEETING_MODEL_ADDRESS_COL, row);
- if (find_match (im, address, NULL) != NULL) {
- 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, E_MEETING_MODEL_MEMBER_COL, row)));
- e_meeting_attendee_set_cutype (ia, text_to_type (e_table_model_value_at (source, E_MEETING_MODEL_TYPE_COL, row)));
- e_meeting_attendee_set_role (ia, text_to_role (e_table_model_value_at (source, E_MEETING_MODEL_ROLE_COL, row)));
- e_meeting_attendee_set_rsvp (ia, text_to_boolean (e_table_model_value_at (source, E_MEETING_MODEL_RSVP_COL, row)));
- e_meeting_attendee_set_delto (ia, g_strdup (e_table_model_value_at (source, E_MEETING_MODEL_DELTO_COL, row)));
- e_meeting_attendee_set_delfrom (ia, g_strdup (e_table_model_value_at (source, E_MEETING_MODEL_DELFROM_COL, row)));
- e_meeting_attendee_set_status (ia, text_to_partstat (e_table_model_value_at (source, E_MEETING_MODEL_STATUS_COL, row)));
- e_meeting_attendee_set_cn (ia, g_strdup (e_table_model_value_at (source, E_MEETING_MODEL_CN_COL, row)));
- e_meeting_attendee_set_language (ia, g_strdup (e_table_model_value_at (source, E_MEETING_MODEL_LANGUAGE_COL, row)));
-
- e_meeting_model_add_attendee (E_MEETING_MODEL (etm), ia);
- g_object_unref (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 E_MEETING_MODEL_ADDRESS_COL:
- return (void *)itip_strip_mailto (e_meeting_attendee_get_address (ia));
- case E_MEETING_MODEL_MEMBER_COL:
- return (void *)e_meeting_attendee_get_member (ia);
- case E_MEETING_MODEL_TYPE_COL:
- return type_to_text (e_meeting_attendee_get_cutype (ia));
- case E_MEETING_MODEL_ROLE_COL:
- return role_to_text (e_meeting_attendee_get_role (ia));
- case E_MEETING_MODEL_RSVP_COL:
- return boolean_to_text (e_meeting_attendee_get_rsvp (ia));
- case E_MEETING_MODEL_DELTO_COL:
- return (void *)itip_strip_mailto (e_meeting_attendee_get_delto (ia));
- case E_MEETING_MODEL_DELFROM_COL:
- return (void *)itip_strip_mailto (e_meeting_attendee_get_delfrom (ia));
- case E_MEETING_MODEL_STATUS_COL:
- return partstat_to_text (e_meeting_attendee_get_status (ia));
- case E_MEETING_MODEL_CN_COL:
- return (void *)e_meeting_attendee_get_cn (ia);
- case E_MEETING_MODEL_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;
- icalparameter_cutype type;
-
- im = E_MEETING_MODEL (etm);
- priv = im->priv;
-
- ia = g_ptr_array_index (priv->attendees, row);
-
- e_table_model_pre_change (etm);
-
- switch (col) {
- case E_MEETING_MODEL_ADDRESS_COL:
- if (val != NULL && *((char *)val))
- e_meeting_attendee_set_address (ia, g_strdup_printf ("MAILTO:%s", (char *) val));
- break;
- case E_MEETING_MODEL_MEMBER_COL:
- e_meeting_attendee_set_member (ia, g_strdup (val));
- break;
- case E_MEETING_MODEL_TYPE_COL:
- type = text_to_type (val);
- e_meeting_attendee_set_cutype (ia, text_to_type (val));
- if (type == ICAL_CUTYPE_RESOURCE) {
- e_meeting_attendee_set_role (ia, ICAL_ROLE_NONPARTICIPANT);
- e_table_model_cell_changed (etm, E_MEETING_MODEL_ROLE_COL, row);
- }
- break;
- case E_MEETING_MODEL_ROLE_COL:
- e_meeting_attendee_set_role (ia, text_to_role (val));
- break;
- case E_MEETING_MODEL_RSVP_COL:
- e_meeting_attendee_set_rsvp (ia, text_to_boolean (val));
- break;
- case E_MEETING_MODEL_DELTO_COL:
- e_meeting_attendee_set_delto (ia, g_strdup (val));
- break;
- case E_MEETING_MODEL_DELFROM_COL:
- e_meeting_attendee_set_delfrom (ia, g_strdup (val));
- break;
- case E_MEETING_MODEL_STATUS_COL:
- e_meeting_attendee_set_status (ia, text_to_partstat (val));
- break;
- case E_MEETING_MODEL_CN_COL:
- e_meeting_attendee_set_cn (ia, g_strdup (val));
- break;
- case E_MEETING_MODEL_LANGUAGE_COL:
- e_meeting_attendee_set_language (ia, g_strdup (val));
- break;
- }
-
- e_table_model_cell_changed (etm, col, row);
-}
-
-static gboolean
-is_cell_editable (ETableModel *etm, int col, int row)
-{
- EMeetingModel *im;
- EMeetingModelPrivate *priv;
- EMeetingAttendee *ia;
- EMeetingAttendeeEditLevel level;
-
- im = E_MEETING_MODEL (etm);
- priv = im->priv;
-
- if (col == E_MEETING_MODEL_DELTO_COL
- || col == E_MEETING_MODEL_DELFROM_COL)
- return FALSE;
-
- if (row == -1)
- return TRUE;
- if (row >= priv->attendees->len)
- return TRUE;
-
- ia = g_ptr_array_index (priv->attendees, row);
- level = e_meeting_attendee_get_edit_level (ia);
-
- switch (level) {
- case E_MEETING_ATTENDEE_EDIT_FULL:
- return TRUE;
- case E_MEETING_ATTENDEE_EDIT_STATUS:
- return col == E_MEETING_MODEL_STATUS_COL;
- case E_MEETING_ATTENDEE_EDIT_NONE:
- return FALSE;
- }
-
- 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 E_MEETING_MODEL_ADDRESS_COL:
- return g_strdup ("");
- case E_MEETING_MODEL_MEMBER_COL:
- return g_strdup ("");
- case E_MEETING_MODEL_TYPE_COL:
- return g_strdup (_("Individual"));
- case E_MEETING_MODEL_ROLE_COL:
- return g_strdup (_("Required Participant"));
- case E_MEETING_MODEL_RSVP_COL:
- return g_strdup (_("Yes"));
- case E_MEETING_MODEL_DELTO_COL:
- return g_strdup ("");
- case E_MEETING_MODEL_DELFROM_COL:
- return g_strdup ("");
- case E_MEETING_MODEL_STATUS_COL:
- return g_strdup (_("Needs Action"));
- case E_MEETING_MODEL_CN_COL:
- return g_strdup ("");
- case E_MEETING_MODEL_LANGUAGE_COL:
- return g_strdup ("en");
- }
-
- return g_strdup ("");
-}
-
-static gboolean
-value_is_empty (ETableModel *etm, int col, const void *val)
-{
-
- switch (col) {
- case E_MEETING_MODEL_ADDRESS_COL:
- case E_MEETING_MODEL_MEMBER_COL:
- case E_MEETING_MODEL_DELTO_COL:
- case E_MEETING_MODEL_DELFROM_COL:
- case E_MEETING_MODEL_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)
-{
- GObjectClass *gobject_class;
- ETableModelClass *etm_class;
-
- gobject_class = G_OBJECT_CLASS (klass);
- etm_class = E_TABLE_MODEL_CLASS (klass);
-
- parent_class = g_type_class_peek_parent (klass);
-
- gobject_class->finalize = finalize;
-
- 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->tables = NULL;
-
- priv->client = NULL;
- priv->zone = icaltimezone_get_builtin_timezone (calendar_config_get_timezone ());
-
- priv->ebook = NULL;
- priv->book_loaded = FALSE;
- priv->book_load_wait = FALSE;
-
- priv->refresh_queue = g_ptr_array_new ();
- priv->refresh_data = g_hash_table_new (g_direct_hash, g_direct_equal);
- priv->refresh_idle_id = 0;
-
- priv->corba_select_names = CORBA_OBJECT_NIL;
-
- start_addressbook_server (im);
-}
-
-static void
-finalize (GObject *obj)
-{
- EMeetingModel *im = E_MEETING_MODEL (obj);
- EMeetingModelPrivate *priv;
- GList *l;
- int i;
-
- priv = im->priv;
-
- for (i = 0; i < priv->attendees->len; i++)
- g_object_unref (g_ptr_array_index (priv->attendees, i));
- g_ptr_array_free (priv->attendees, TRUE);
-
- for (l = priv->tables; l != NULL; l = l->next)
- g_signal_handlers_disconnect_matched (G_OBJECT (l->data), G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL, im);
- g_list_free (priv->tables);
-
- if (priv->client != NULL)
- g_object_unref (priv->client);
-
- if (priv->ebook != NULL)
- g_object_unref (priv->ebook);
-
- if (priv->corba_select_names != CORBA_OBJECT_NIL) {
- CORBA_Environment ev;
- CORBA_exception_init (&ev);
- bonobo_object_release_unref (priv->corba_select_names, &ev);
- CORBA_exception_free (&ev);
- }
-
- while (priv->refresh_queue->len > 0)
- refresh_queue_remove (im, g_ptr_array_index (priv->refresh_queue, 0));
- g_ptr_array_free (priv->refresh_queue, TRUE);
- g_hash_table_destroy (priv->refresh_data);
-
- if (priv->refresh_idle_id)
- g_source_remove (priv->refresh_idle_id);
-
- g_free (priv);
-
- if (G_OBJECT_CLASS (parent_class)->finalize)
- (* G_OBJECT_CLASS (parent_class)->finalize) (obj);
-}
-
-GtkObject *
-e_meeting_model_new (void)
-{
- return g_object_new (E_TYPE_MEETING_MODEL, NULL);
-}
-
-
-ECal *
-e_meeting_model_get_e_cal (EMeetingModel *im)
-{
- EMeetingModelPrivate *priv;
-
- priv = im->priv;
-
- return priv->client;
-}
-
-void
-e_meeting_model_set_e_cal (EMeetingModel *im, ECal *client)
-{
- EMeetingModelPrivate *priv;
-
- priv = im->priv;
-
- if (priv->client != NULL)
- g_object_unref (priv->client);
-
- if (client != NULL)
- g_object_ref (client);
- priv->client = client;
-}
-
-icaltimezone *
-e_meeting_model_get_zone (EMeetingModel *im)
-{
- EMeetingModelPrivate *priv;
-
- g_return_val_if_fail (im != NULL, NULL);
- g_return_val_if_fail (E_IS_MEETING_MODEL (im), NULL);
-
- priv = im->priv;
-
- return priv->zone;
-}
-
-void
-e_meeting_model_set_zone (EMeetingModel *im, icaltimezone *zone)
-{
- EMeetingModelPrivate *priv;
-
- g_return_if_fail (im != NULL);
- g_return_if_fail (E_IS_MEETING_MODEL (im));
-
- priv = im->priv;
-
- priv->zone = zone;
-}
-
-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);
- g_object_unref (cell);
-
- strings = NULL;
- strings = g_list_append (strings, (char*) _("Individual"));
- strings = g_list_append (strings, (char*) _("Group"));
- strings = g_list_append (strings, (char*) _("Resource"));
- strings = g_list_append (strings, (char*) _("Room"));
- strings = g_list_append (strings, (char*) _("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);
- g_object_unref (cell);
-
- strings = NULL;
- strings = g_list_append (strings, (char*) _("Chair"));
- strings = g_list_append (strings, (char*) _("Required Participant"));
- strings = g_list_append (strings, (char*) _("Optional Participant"));
- strings = g_list_append (strings, (char*) _("Non-Participant"));
- strings = g_list_append (strings, (char*) _("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);
- g_object_unref (cell);
-
- strings = NULL;
- strings = g_list_append (strings, (char*) _("Yes"));
- strings = g_list_append (strings, (char*) _("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);
- g_object_unref (cell);
-
- strings = NULL;
- strings = g_list_append (strings, (char*) _("Needs Action"));
- strings = g_list_append (strings, (char*) _("Accepted"));
- strings = g_list_append (strings, (char*) _("Declined"));
- strings = g_list_append (strings, (char*) _("Tentative"));
- strings = g_list_append (strings, (char*) _("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));
- g_object_set (G_OBJECT (real_table), "uniform_row_height", TRUE, NULL);
- e_table_load_state (real_table, state_file);
-
-#if 0
- g_signal_connect (real_table, "right_click", G_CALLBACK (right_click_cb), mpage);
-#endif
-
- g_signal_connect (etable, "destroy", G_CALLBACK (table_destroy_state_cb), g_strdup (state_file));
-
- g_object_unref (extras);
-
- return E_TABLE_SCROLLED (etable);
-}
-
-void
-e_meeting_model_add_attendee (EMeetingModel *im, EMeetingAttendee *ia)
-{
- EMeetingModelPrivate *priv;
-
- priv = im->priv;
-
- e_table_model_pre_change (E_TABLE_MODEL (im));
-
- g_object_ref (ia);
- g_ptr_array_add (priv->attendees, ia);
-
- g_signal_connect (ia, "changed", G_CALLBACK (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), E_MEETING_MODEL_ADDRESS_COL));
- e_meeting_attendee_set_member (ia, init_value (E_TABLE_MODEL (im), E_MEETING_MODEL_MEMBER_COL));
-
- str = init_value (E_TABLE_MODEL (im), E_MEETING_MODEL_TYPE_COL);
- e_meeting_attendee_set_cutype (ia, text_to_type (str));
- g_free (str);
- str = init_value (E_TABLE_MODEL (im), E_MEETING_MODEL_ROLE_COL);
- e_meeting_attendee_set_role (ia, text_to_role (str));
- g_free (str);
- str = init_value (E_TABLE_MODEL (im), E_MEETING_MODEL_RSVP_COL);
- e_meeting_attendee_set_rsvp (ia, text_to_boolean (str));
- g_free (str);
-
- e_meeting_attendee_set_delto (ia, init_value (E_TABLE_MODEL (im), E_MEETING_MODEL_DELTO_COL));
- e_meeting_attendee_set_delfrom (ia, init_value (E_TABLE_MODEL (im), E_MEETING_MODEL_DELFROM_COL));
-
- str = init_value (E_TABLE_MODEL (im), E_MEETING_MODEL_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), E_MEETING_MODEL_CN_COL));
- e_meeting_attendee_set_language (ia, init_value (E_TABLE_MODEL (im), E_MEETING_MODEL_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) {
- e_table_model_pre_change (E_TABLE_MODEL (im));
-
- g_ptr_array_remove_index (priv->attendees, row);
- g_object_unref (ia);
-
- e_table_model_row_deleted (E_TABLE_MODEL (im), row);
- }
-}
-
-void
-e_meeting_model_remove_all_attendees (EMeetingModel *im)
-{
- EMeetingModelPrivate *priv;
- gint i, len;
-
- priv = im->priv;
-
- e_table_model_pre_change (E_TABLE_MODEL (im));
-
- len = priv->attendees->len;
-
- for (i = 0; i < len; i++) {
- EMeetingAttendee *ia = g_ptr_array_index (priv->attendees, i);
- g_object_unref (ia);
- }
- g_ptr_array_set_size (priv->attendees, 0);
-
- e_table_model_rows_deleted (E_TABLE_MODEL (im), 0, len);
-}
-
-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;
-
- g_return_val_if_fail (im != NULL, NULL);
- g_return_val_if_fail (E_IS_MEETING_MODEL (im), NULL);
- g_return_val_if_fail (row >= 0, NULL);
-
- priv = im->priv;
- g_return_val_if_fail (row < priv->attendees->len, NULL);
-
- return g_ptr_array_index (priv->attendees, row);
-}
-
-gint
-e_meeting_model_count_actual_attendees (EMeetingModel *im)
-{
- EMeetingModelPrivate *priv;
-
- priv = im->priv;
-
- return e_table_model_row_count (E_TABLE_MODEL (im));
-}
-
-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);
- if (param == NULL)
- return NULL;
- 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;
-
- /* FIXME We aren't passing a property here */
- 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 void
-refresh_queue_add (EMeetingModel *im, int row,
- EMeetingTime *start,
- EMeetingTime *end,
- EMeetingModelRefreshCallback call_back,
- gpointer data)
-{
- EMeetingModelPrivate *priv;
- EMeetingAttendee *ia;
- EMeetingModelQueueData *qdata;
-
- priv = im->priv;
-
- ia = g_ptr_array_index (priv->attendees, row);
- if (ia == NULL)
- return;
-
- qdata = g_hash_table_lookup (priv->refresh_data, ia);
- if (qdata == NULL) {
- qdata = g_new0 (EMeetingModelQueueData, 1);
-
- qdata->im = im;
- qdata->ia = ia;
- e_meeting_attendee_clear_busy_periods (ia);
- e_meeting_attendee_set_has_calendar_info (ia, FALSE);
-
- qdata->start = *start;
- qdata->end = *end;
- qdata->string = g_string_new (NULL);
- qdata->call_backs = g_ptr_array_new ();
- qdata->data = g_ptr_array_new ();
- g_ptr_array_add (qdata->call_backs, call_back);
- g_ptr_array_add (qdata->data, data);
-
- g_hash_table_insert (priv->refresh_data, ia, qdata);
- } else {
- if (e_meeting_time_compare_times (start, &qdata->start) == -1)
- qdata->start = *start;
- if (e_meeting_time_compare_times (end, &qdata->end) == 1)
- qdata->end = *end;
- g_ptr_array_add (qdata->call_backs, call_back);
- g_ptr_array_add (qdata->data, data);
- }
-
- g_object_ref (ia);
- g_ptr_array_add (priv->refresh_queue, ia);
-
- if (priv->refresh_idle_id == 0)
- priv->refresh_idle_id = g_idle_add (refresh_busy_periods, im);
-}
-
-static void
-refresh_queue_remove (EMeetingModel *im, EMeetingAttendee *ia)
-{
- EMeetingModelPrivate *priv;
- EMeetingModelQueueData *qdata;
-
- priv = im->priv;
-
- /* Free the queue data */
- qdata = g_hash_table_lookup (priv->refresh_data, ia);
- g_assert (qdata != NULL);
-
- g_hash_table_remove (priv->refresh_data, ia);
- g_ptr_array_free (qdata->call_backs, TRUE);
- g_ptr_array_free (qdata->data, TRUE);
- g_free (qdata);
-
- /* Unref the attendee */
- g_ptr_array_remove (priv->refresh_queue, ia);
- g_object_unref (ia);
-}
-
-static void
-process_callbacks (EMeetingModelQueueData *qdata)
-{
- EMeetingModel *im;
- int i;
-
- for (i = 0; i < qdata->call_backs->len; i++) {
- EMeetingModelRefreshCallback call_back;
- gpointer *data;
-
- call_back = g_ptr_array_index (qdata->call_backs, i);
- data = g_ptr_array_index (qdata->data, i);
-
- call_back (data);
- }
-
- im = qdata->im;
- refresh_queue_remove (qdata->im, qdata->ia);
- g_object_unref (im);
-}
-
-static void
-process_free_busy_comp (EMeetingAttendee *ia,
- icalcomponent *fb_comp,
- icaltimezone *zone,
- icalcomponent *tz_top_level)
-{
- icalproperty *ip;
-
- ip = icalcomponent_get_first_property (fb_comp, ICAL_DTSTART_PROPERTY);
- if (ip != NULL) {
- struct icaltimetype dtstart;
- icaltimezone *ds_zone;
-
- dtstart = icalproperty_get_dtstart (ip);
- if (!dtstart.is_utc)
- ds_zone = find_zone (ip, tz_top_level);
- else
- ds_zone = icaltimezone_get_utc_timezone ();
- icaltimezone_convert_time (&dtstart, ds_zone, 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;
-
- dtend = icalproperty_get_dtend (ip);
- if (!dtend.is_utc)
- de_zone = find_zone (ip, tz_top_level);
- else
- de_zone = icaltimezone_get_utc_timezone ();
- icaltimezone_convert_time (&dtend, de_zone, 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:
- break;
- }
-
- if (busy_type != E_MEETING_FREE_BUSY_LAST) {
- icaltimezone *utc_zone = icaltimezone_get_utc_timezone ();
-
- icaltimezone_convert_time (&fb.start, utc_zone, zone);
- icaltimezone_convert_time (&fb.end, utc_zone, 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 (EMeetingModelQueueData *qdata, char *text)
-{
- EMeetingModel *im = qdata->im;
- EMeetingModelPrivate *priv;
- EMeetingAttendee *ia = qdata->ia;
- icalcomponent *main_comp;
- icalcomponent_kind kind = ICAL_NO_COMPONENT;
-
- priv = im->priv;
-
- main_comp = icalparser_parse_string (text);
- if (main_comp == NULL) {
- process_callbacks (qdata);
- return;
- }
-
- kind = icalcomponent_isa (main_comp);
- if (kind == ICAL_VCALENDAR_COMPONENT) {
- icalcompiter iter;
- icalcomponent *tz_top_level, *sub_comp;
-
- tz_top_level = e_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, priv->zone, tz_top_level);
-
- icalcompiter_next (&iter);
- }
- icalcomponent_free (tz_top_level);
- } else if (kind == ICAL_VFREEBUSY_COMPONENT) {
- process_free_busy_comp (ia, main_comp, priv->zone, NULL);
- }
-
- icalcomponent_free (main_comp);
-
- process_callbacks (qdata);
-}
-
-static void
-async_close (GnomeVFSAsyncHandle *handle,
- GnomeVFSResult result,
- gpointer data)
-{
- EMeetingModelQueueData *qdata = data;
-
- process_free_busy (qdata, qdata->string->str);
-}
-
-static void
-async_read (GnomeVFSAsyncHandle *handle,
- GnomeVFSResult result,
- gpointer buffer,
- GnomeVFSFileSize requested,
- GnomeVFSFileSize read,
- gpointer data)
-{
- EMeetingModelQueueData *qdata = data;
- GnomeVFSFileSize buf_size = BUF_SIZE - 1;
-
- if (result != GNOME_VFS_OK && result != GNOME_VFS_ERROR_EOF) {
- gnome_vfs_async_close (handle, async_close, qdata);
- return;
- }
-
- ((char *)buffer)[read] = '\0';
- qdata->string = g_string_append (qdata->string, buffer);
-
- if (result == GNOME_VFS_ERROR_EOF) {
- gnome_vfs_async_close (handle, async_close, qdata);
- return;
- }
-
- gnome_vfs_async_read (handle, qdata->buffer, buf_size, async_read, qdata);
-}
-
-static void
-async_open (GnomeVFSAsyncHandle *handle,
- GnomeVFSResult result,
- gpointer data)
-{
- EMeetingModelQueueData *qdata = data;
- GnomeVFSFileSize buf_size = BUF_SIZE - 1;
-
- if (result != GNOME_VFS_OK) {
- gnome_vfs_async_close (handle, async_close, qdata);
- return;
- }
-
- gnome_vfs_async_read (handle, qdata->buffer, buf_size, async_read, qdata);
-}
-
-static void
-contacts_cb (EBook *book, EBookStatus status, GList *contacts, gpointer data)
-{
- EMeetingModelQueueData *qdata = data;
- GList *l;
-
- if (status != E_BOOK_ERROR_OK)
- return;
-
- for (l = contacts; l; l = l->next) {
- GnomeVFSAsyncHandle *handle;
- EContact *contact = E_CONTACT (l->data);
- const char *fburl = e_contact_get_const (contact, E_CONTACT_FREEBUSY_URL);
-
- if (!fburl || !*fburl)
- continue;
-
- /* Read in free/busy data from the url */
- gnome_vfs_async_open (&handle, fburl, GNOME_VFS_OPEN_READ,
- GNOME_VFS_PRIORITY_DEFAULT, async_open, qdata);
-
- e_free_object_list (contacts);
- return;
- }
-
- process_callbacks (qdata);
- e_free_object_list (contacts);
-}
-
-static gboolean
-refresh_busy_periods (gpointer data)
-{
- EMeetingModel *im = E_MEETING_MODEL (data);
- EMeetingModelPrivate *priv;
- EMeetingAttendee *ia = NULL;
- EMeetingModelQueueData *qdata = NULL;
- char *query;
- int i;
-
- priv = im->priv;
-
- /* Check to see if there are any remaining attendees in the queue */
- for (i = 0; i < priv->refresh_queue->len; i++) {
- ia = g_ptr_array_index (priv->refresh_queue, i);
- g_assert (ia != NULL);
-
- qdata = g_hash_table_lookup (priv->refresh_data, ia);
- g_assert (qdata != NULL);
-
- if (!qdata->refreshing)
- break;
- }
-
- /* The everything in the queue is being refreshed */
- if (i >= priv->refresh_queue->len) {
- priv->refresh_idle_id = 0;
- return FALSE;
- }
-
- /* Indicate we are trying to refresh it */
- qdata->refreshing = TRUE;
-
- /* We take a ref in case we get destroyed in the gui during a callback */
- g_object_ref (qdata->im);
-
- /* Check the server for free busy data */
- if (priv->client) {
- GList *fb_data = NULL, *users = NULL;
- struct icaltimetype itt;
- time_t startt, endt;
- const char *user;
-
- itt = icaltime_null_time ();
- itt.year = g_date_year (&qdata->start.date);
- itt.month = g_date_month (&qdata->start.date);
- itt.day = g_date_day (&qdata->start.date);
- itt.hour = qdata->start.hour;
- itt.minute = qdata->start.minute;
- startt = icaltime_as_timet_with_zone (itt, priv->zone);
-
- itt = icaltime_null_time ();
- itt.year = g_date_year (&qdata->end.date);
- itt.month = g_date_month (&qdata->end.date);
- itt.day = g_date_day (&qdata->end.date);
- itt.hour = qdata->end.hour;
- itt.minute = qdata->end.minute;
- endt = icaltime_as_timet_with_zone (itt, priv->zone);
-
- user = itip_strip_mailto (e_meeting_attendee_get_address (ia));
- users = g_list_append (users, g_strdup (user));
-
- /* FIXME Error checking */
- e_cal_get_free_busy (priv->client, users, startt, endt, &fb_data, NULL);
-
- g_list_foreach (users, (GFunc)g_free, NULL);
- g_list_free (users);
-
- if (fb_data != NULL) {
- ECalComponent *comp = fb_data->data;
- char *comp_str;
-
- comp_str = e_cal_component_get_as_string (comp);
- process_free_busy (qdata, comp_str);
- g_free (comp_str);
- return TRUE;
- }
- }
-
- /* Look for fburl's of attendee with no free busy info on server */
- if (!priv->book_loaded) {
- priv->book_load_wait = TRUE;
- gtk_main ();
- }
-
- if (!e_meeting_attendee_is_set_address (ia)) {
- process_callbacks (qdata);
- return TRUE;
- }
-
- query = g_strdup_printf ("(is \"email\" \"%s\")",
- itip_strip_mailto (e_meeting_attendee_get_address (ia)));
- if (!e_book_async_get_contacts (priv->ebook, query, contacts_cb, qdata))
- process_callbacks (qdata);
- g_free (query);
-
- return TRUE;
-}
-
-void
-e_meeting_model_refresh_all_busy_periods (EMeetingModel *im,
- EMeetingTime *start,
- EMeetingTime *end,
- EMeetingModelRefreshCallback call_back,
- gpointer data)
-{
- EMeetingModelPrivate *priv;
- int i;
-
- g_return_if_fail (im != NULL);
- g_return_if_fail (E_IS_MEETING_MODEL (im));
-
- priv = im->priv;
-
- for (i = 0; i < priv->attendees->len; i++)
- refresh_queue_add (im, i, start, end, call_back, data);
-}
-
-void
-e_meeting_model_refresh_busy_periods (EMeetingModel *im,
- int row,
- EMeetingTime *start,
- EMeetingTime *end,
- EMeetingModelRefreshCallback call_back,
- gpointer data)
-{
- EMeetingModelPrivate *priv;
-
- g_return_if_fail (im != NULL);
- g_return_if_fail (E_IS_MEETING_MODEL (im));
-
- priv = im->priv;
-
- refresh_queue_add (im, row, start, end, call_back, data);
-}
-
-ETableScrolled *
-e_meeting_model_etable_from_model (EMeetingModel *im, const gchar *spec_file, const gchar *state_file)
-{
- EMeetingModelPrivate *priv;
- ETableScrolled *ets;
-
- g_return_val_if_fail (im != NULL, NULL);
- g_return_val_if_fail (E_IS_MEETING_MODEL (im), NULL);
-
- priv = im->priv;
-
- ets = build_etable (E_TABLE_MODEL (im), spec_file, state_file);
-
- priv->tables = g_list_prepend (priv->tables, ets);
-
- g_signal_connect (ets, "destroy", G_CALLBACK (table_destroy_list_cb), im);
-
- return ets;
-}
-
-void
-e_meeting_model_etable_click_to_add (EMeetingModel *im, gboolean click_to_add)
-{
- EMeetingModelPrivate *priv;
- GList *l;
-
- g_return_if_fail (im != NULL);
- g_return_if_fail (E_IS_MEETING_MODEL (im));
-
- priv = im->priv;
-
- for (l = priv->tables; l != NULL; l = l->next) {
- ETableScrolled *ets;
- ETable *real_table;
-
- ets = l->data;
- real_table = e_table_scrolled_get_table (ets);
-
- g_object_set (G_OBJECT (real_table), "use_click_to_add", click_to_add, NULL);
- }
-}
-
-int
-e_meeting_model_etable_model_to_view_row (ETable *et, EMeetingModel *im, int model_row)
-{
- EMeetingModelPrivate *priv;
-
- g_return_val_if_fail (im != NULL, -1);
- g_return_val_if_fail (E_IS_MEETING_MODEL (im), -1);
-
- priv = im->priv;
-
- return e_table_model_to_view_row (et, model_row);
-}
-
-int
-e_meeting_model_etable_view_to_model_row (ETable *et, EMeetingModel *im, int view_row)
-{
- EMeetingModelPrivate *priv;
-
- g_return_val_if_fail (im != NULL, -1);
- g_return_val_if_fail (E_IS_MEETING_MODEL (im), -1);
-
- priv = im->priv;
-
- return e_table_view_to_model_row (et, view_row);
-}
-
-
-static void
-add_section (GNOME_Evolution_Addressbook_SelectNames corba_select_names, const char *name)
-{
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
-
- GNOME_Evolution_Addressbook_SelectNames_addSection (corba_select_names,
- name,
- gettext (name),
- &ev);
-
- CORBA_exception_free (&ev);
-}
-
-static gboolean
-get_select_name_dialog (EMeetingModel *im)
-{
- EMeetingModelPrivate *priv;
- CORBA_Environment ev;
- int i;
-
- priv = im->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; sections[i] != NULL; 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", TC_CORBA_string, "", NULL);
- }
- CORBA_exception_free (&ev);
-
- return TRUE;
- }
-
- CORBA_exception_init (&ev);
-
- priv->corba_select_names = bonobo_activation_activate_from_id (SELECT_NAMES_OAFID, 0, NULL, &ev);
-
- for (i = 0; sections[i] != NULL; i++)
- add_section (priv->corba_select_names, sections[i]);
-
- bonobo_event_source_client_add_listener (priv->corba_select_names,
- (BonoboListenerCallbackFn) select_names_ok_cb,
- "GNOME/Evolution:ok:dialog",
- NULL, im);
-
- if (BONOBO_EX (&ev)) {
- CORBA_exception_free (&ev);
- return FALSE;
- }
-
- CORBA_exception_free (&ev);
-
- return TRUE;
-}
-
-void
-e_meeting_model_invite_others_dialog (EMeetingModel *im)
-{
- EMeetingModelPrivate *priv;
- CORBA_Environment ev;
-
- priv = im->priv;
-
- if (!get_select_name_dialog (im))
- return;
-
- CORBA_exception_init (&ev);
-
- GNOME_Evolution_Addressbook_SelectNames_activateDialog (
- priv->corba_select_names, _("Required Participants"), &ev);
-
- CORBA_exception_free (&ev);
-}
-
-static void
-process_section (EMeetingModel *im, EABDestination **destv, icalparameter_role role)
-{
- EMeetingModelPrivate *priv;
- int i;
-
- if (!destv)
- return;
-
- priv = im->priv;
- for (i = 0; destv[i]; i++) {
- EMeetingAttendee *ia;
- const char *name, *attendee = NULL;
- char *attr;
- CORBA_Environment ev;
- EABDestination *dest = destv[i];
-
- CORBA_exception_init (&ev);
-
- /* Get the CN */
- name = eab_destination_get_name (dest);
-
- /* Get the field as attendee from the backend */
- if (e_cal_get_ldap_attribute (priv->client, &attr, NULL) && attr) {
- /* FIXME this should be more general */
- if (!strcmp (attr, "icscalendar")) {
- EContact *contact = eab_destination_get_contact (dest);
- if (contact)
- attendee = e_contact_get_const (contact, E_CONTACT_ICS_CALENDAR);
- }
-
- g_free (attr);
- }
-
- CORBA_exception_init (&ev);
-
- /* If we couldn't get the attendee prior, get the email address as the default */
- if (attendee == NULL || *attendee == '\0') {
- attendee = eab_destination_get_email (dest);
- }
-
- CORBA_exception_free (&ev);
-
- if (attendee == NULL || *attendee == '\0')
- continue;
-
- if (e_meeting_model_find_attendee (im, attendee, NULL) == NULL) {
- ia = e_meeting_model_add_attendee_with_defaults (im);
-
- e_meeting_attendee_set_address (ia, g_strdup_printf ("MAILTO:%s", attendee));
- e_meeting_attendee_set_role (ia, role);
- if (role == ICAL_ROLE_NONPARTICIPANT)
- e_meeting_attendee_set_cutype (ia, ICAL_CUTYPE_RESOURCE);
- e_meeting_attendee_set_cn (ia, g_strdup (name));
- }
- }
-}
-
-static void
-select_names_ok_cb (BonoboListener *listener,
- const char *event_name,
- const CORBA_any *arg,
- CORBA_Environment *ev,
- gpointer data)
-{
- EMeetingModel *im = data;
- EMeetingModelPrivate *priv;
- Bonobo_Control corba_control;
- GtkWidget *control_widget;
- BonoboControlFrame *control_frame;
- Bonobo_PropertyBag pb;
- char *dest_str;
- EABDestination **dest;
- int i;
-
- priv = im->priv;
-
- for (i = 0; sections[i] != NULL; i++) {
- corba_control = GNOME_Evolution_Addressbook_SelectNames_getEntryBySection
- (priv->corba_select_names, sections[i], ev);
- control_widget = bonobo_widget_new_control_from_objref
- (corba_control, CORBA_OBJECT_NIL);
-
- control_frame = bonobo_widget_get_control_frame (BONOBO_WIDGET (control_widget));
- pb = bonobo_control_frame_get_control_property_bag (control_frame, NULL);
- dest_str = bonobo_pbclient_get_string (pb, "destinations", NULL);
- dest = eab_destination_importv (dest_str);
- process_section (im, dest, roles[i]);
- eab_destination_freev (dest);
- }
-}
-
-static void
-attendee_changed_cb (EMeetingAttendee *ia, gpointer data)
-{
- EMeetingModel *im = E_MEETING_MODEL (data);
- EMeetingModelPrivate *priv;
- gint row = -1, i;
-
- priv = im->priv;
-
- /* FIXME: Ideally I think you are supposed to call pre_change() before
- the data structures are changed. */
- e_table_model_pre_change (E_TABLE_MODEL (im));
-
- for (i = 0; i < priv->attendees->len; i++) {
- if (ia == g_ptr_array_index (priv->attendees, i)) {
- row = i;
- break;
- }
- }
-
- if (row == -1)
- e_table_model_no_change (E_TABLE_MODEL (im));
- else
- e_table_model_row_changed (E_TABLE_MODEL (im), row);
-}
-
-static void
-table_destroy_state_cb (ETableScrolled *etable, gpointer data)
-{
- ETable *real_table;
- char *filename = data;
-
- real_table = e_table_scrolled_get_table (etable);
- e_table_save_state (real_table, filename);
-
- g_free (data);
-}
-
-static void
-table_destroy_list_cb (ETableScrolled *etable, gpointer data)
-{
- EMeetingModel *im = E_MEETING_MODEL (data);
- EMeetingModelPrivate *priv;
-
- priv = im->priv;
-
- priv->tables = g_list_remove (priv->tables, etable);
-}
-
diff --git a/calendar/gui/e-meeting-model.h b/calendar/gui/e-meeting-model.h
deleted file mode 100644
index e709cd3aa4..0000000000
--- a/calendar/gui/e-meeting-model.h
+++ /dev/null
@@ -1,116 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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_MODEL_H_
-#define _E_MEETING_MODEL_H_
-
-#include <gtk/gtk.h>
-#include <gal/e-table/e-table-scrolled.h>
-#include <gal/e-table/e-table-model.h>
-#include <libecal/e-cal.h>
-#include "e-meeting-attendee.h"
-
-G_BEGIN_DECLS
-
-#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;
-
-typedef enum {
- E_MEETING_MODEL_ADDRESS_COL,
- E_MEETING_MODEL_MEMBER_COL,
- E_MEETING_MODEL_TYPE_COL,
- E_MEETING_MODEL_ROLE_COL,
- E_MEETING_MODEL_RSVP_COL,
- E_MEETING_MODEL_DELTO_COL,
- E_MEETING_MODEL_DELFROM_COL,
- E_MEETING_MODEL_STATUS_COL,
- E_MEETING_MODEL_CN_COL,
- E_MEETING_MODEL_LANGUAGE_COL,
- E_MEETING_MODEL_COLUMN_COUNT
-} EMeetingModelColumns;
-
-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);
-
-ECal *e_meeting_model_get_e_cal (EMeetingModel *im);
-void e_meeting_model_set_e_cal (EMeetingModel *im, ECal *client);
-
-icaltimezone *e_meeting_model_get_zone (EMeetingModel *im);
-void e_meeting_model_set_zone (EMeetingModel *im, icaltimezone *zone);
-
-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_actual_attendees (EMeetingModel *im);
-const GPtrArray *e_meeting_model_get_attendees (EMeetingModel *im);
-
-void e_meeting_model_refresh_all_busy_periods (EMeetingModel *im,
- EMeetingTime *start,
- EMeetingTime *end,
- EMeetingModelRefreshCallback call_back,
- gpointer data);
-void e_meeting_model_refresh_busy_periods (EMeetingModel *im,
- int row,
- EMeetingTime *start,
- EMeetingTime *end,
- EMeetingModelRefreshCallback call_back,
- gpointer data);
-
-
-/* Helpful functions */
-ETableScrolled *e_meeting_model_etable_from_model (EMeetingModel *im, const gchar *spec_file, const gchar *state_file);
-void e_meeting_model_etable_click_to_add (EMeetingModel *im, gboolean click_to_add);
-int e_meeting_model_etable_model_to_view_row (ETable *et, EMeetingModel *im, int model_row);
-int e_meeting_model_etable_view_to_model_row (ETable *et, EMeetingModel *im, int view_row);
-
-void e_meeting_model_invite_others_dialog (EMeetingModel *im);
-
-G_END_DECLS
-
-#endif
diff --git a/calendar/gui/e-meeting-store.c b/calendar/gui/e-meeting-store.c
deleted file mode 100644
index 01ac267fe1..0000000000
--- a/calendar/gui/e-meeting-store.c
+++ /dev/null
@@ -1,1295 +0,0 @@
-/*
- * e-meeting-store.c
- *
- * Copyright (C) 2001-2003 Ximian, Inc.
- *
- * Authors: JP Rosevear <jpr@ximian.com>
- * Mike Kestner <mkestner@ximian.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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-i18n.h>
-#include <libgnome/gnome-util.h>
-#include <libgnomevfs/gnome-vfs.h>
-#include <libebook/e-book.h>
-#include <libecal/e-cal-component.h>
-#include <libecal/e-cal-util.h>
-#include <libecal/e-cal-time-util.h>
-#include "calendar-config.h"
-#include "itip-utils.h"
-#include "e-meeting-utils.h"
-#include "e-meeting-attendee.h"
-#include "e-meeting-store.h"
-
-#define ROW_VALID(store, row) (row >= 0 && row < store->priv->attendees->len)
-
-struct _EMeetingStorePrivate {
- GPtrArray *attendees;
- gint stamp;
-
- ECal *client;
- icaltimezone *zone;
-
- EBook *ebook;
-
- GPtrArray *refresh_queue;
- GHashTable *refresh_data;
- guint refresh_idle_id;
-};
-
-#define BUF_SIZE 1024
-
-typedef struct _EMeetingStoreQueueData EMeetingStoreQueueData;
-struct _EMeetingStoreQueueData {
- EMeetingStore *store;
- EMeetingAttendee *attendee;
-
- gboolean refreshing;
-
- EMeetingTime start;
- EMeetingTime end;
-
- char buffer[BUF_SIZE];
- GString *string;
-
- GPtrArray *call_backs;
- GPtrArray *data;
-};
-
-
-static GObjectClass *parent_class = NULL;
-
-static void
-start_addressbook_server (EMeetingStore *store)
-{
- store->priv->ebook = e_book_new ();
- e_book_load_local_addressbook (store->priv->ebook, 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 GtkTreeModelFlags
-get_flags (GtkTreeModel *model)
-{
- g_return_val_if_fail (E_IS_MEETING_STORE (model), 0);
-
- return GTK_TREE_MODEL_ITERS_PERSIST | GTK_TREE_MODEL_LIST_ONLY;
-}
-
-static int
-get_n_columns (GtkTreeModel *model)
-{
- g_return_val_if_fail (E_IS_MEETING_STORE (model), 0);
-
- return E_MEETING_STORE_COLUMN_COUNT;
-}
-
-static GType
-get_column_type (GtkTreeModel *model, int col)
-{
- g_return_val_if_fail (E_IS_MEETING_STORE (model), G_TYPE_INVALID);
-
- switch (col) {
- case E_MEETING_STORE_ADDRESS_COL:
- case E_MEETING_STORE_MEMBER_COL:
- case E_MEETING_STORE_TYPE_COL:
- case E_MEETING_STORE_ROLE_COL:
- case E_MEETING_STORE_RSVP_COL:
- case E_MEETING_STORE_DELTO_COL:
- case E_MEETING_STORE_DELFROM_COL:
- case E_MEETING_STORE_STATUS_COL:
- case E_MEETING_STORE_CN_COL:
- case E_MEETING_STORE_LANGUAGE_COL:
- case E_MEETING_STORE_ATTENDEE_COL:
- return G_TYPE_STRING;
- case E_MEETING_STORE_ATTENDEE_UNDERLINE_COL:
- return PANGO_TYPE_UNDERLINE;
- default:
- return G_TYPE_INVALID;
- }
-}
-
-static gboolean
-get_iter (GtkTreeModel *model, GtkTreeIter *iter, GtkTreePath *path)
-{
- int row;
-
- g_return_val_if_fail (E_IS_MEETING_STORE (model), FALSE);
- g_return_val_if_fail (gtk_tree_path_get_depth (path) > 0, FALSE);
-
- row = gtk_tree_path_get_indices (path) [0];
-
- if (!ROW_VALID (E_MEETING_STORE (model), row))
- return FALSE;
-
- iter->stamp = E_MEETING_STORE (model)->priv->stamp;
- iter->user_data = GINT_TO_POINTER (row);
-
- return TRUE;
-}
-
-static GtkTreePath *
-get_path (GtkTreeModel *model, GtkTreeIter *iter)
-{
- int row;
- GtkTreePath *result;
-
- g_return_val_if_fail (E_IS_MEETING_STORE (model), NULL);
- g_return_val_if_fail (iter->stamp == E_MEETING_STORE (model)->priv->stamp, NULL);
-
- row = GPOINTER_TO_INT (iter->user_data);
-
- g_return_val_if_fail (ROW_VALID (E_MEETING_STORE (model), row), NULL);
-
- result = gtk_tree_path_new ();
- gtk_tree_path_append_index (result, row);
- return result;
-}
-
-static void
-get_value (GtkTreeModel *model, GtkTreeIter *iter, int col, GValue *value)
-{
- EMeetingStore *store;
- EMeetingAttendee *attendee;
- const gchar *cn;
- int row;
-
- g_return_if_fail (E_IS_MEETING_STORE (model));
- g_return_if_fail (col >= 0 && col < E_MEETING_STORE_COLUMN_COUNT);
-
- row = GPOINTER_TO_INT (iter->user_data);
- store = E_MEETING_STORE (model);
-
- g_return_if_fail (iter->stamp == store->priv->stamp);
- g_return_if_fail (ROW_VALID (E_MEETING_STORE (model), row));
-
- attendee = g_ptr_array_index (store->priv->attendees, row);
-
- switch (col) {
- case E_MEETING_STORE_ADDRESS_COL:
- g_value_init (value, G_TYPE_STRING);
- g_value_set_string (value, itip_strip_mailto (e_meeting_attendee_get_address (attendee)));
- break;
- case E_MEETING_STORE_MEMBER_COL:
- g_value_init (value, G_TYPE_STRING);
- g_value_set_string (value, e_meeting_attendee_get_member (attendee));
- break;
- case E_MEETING_STORE_TYPE_COL:
- g_value_init (value, G_TYPE_STRING);
- g_value_set_string (value, type_to_text (e_meeting_attendee_get_cutype (attendee)));
- break;
- case E_MEETING_STORE_ROLE_COL:
- g_value_init (value, G_TYPE_STRING);
- g_value_set_string (value, role_to_text (e_meeting_attendee_get_role (attendee)));
- break;
- case E_MEETING_STORE_RSVP_COL:
- g_value_init (value, G_TYPE_STRING);
- g_value_set_string (value, boolean_to_text (e_meeting_attendee_get_rsvp (attendee)));
- break;
- case E_MEETING_STORE_DELTO_COL:
- g_value_init (value, G_TYPE_STRING);
- g_value_set_string (value, itip_strip_mailto (e_meeting_attendee_get_delto (attendee)));
- break;
- case E_MEETING_STORE_DELFROM_COL:
- g_value_init (value, G_TYPE_STRING);
- g_value_set_string (value, itip_strip_mailto (e_meeting_attendee_get_delfrom (attendee)));
- break;
- case E_MEETING_STORE_STATUS_COL:
- g_value_init (value, G_TYPE_STRING);
- g_value_set_string (value, partstat_to_text (e_meeting_attendee_get_status (attendee)));
- break;
- case E_MEETING_STORE_CN_COL:
- g_value_init (value, G_TYPE_STRING);
- g_value_set_string (value, e_meeting_attendee_get_cn (attendee));
- break;
- case E_MEETING_STORE_LANGUAGE_COL:
- g_value_init (value, G_TYPE_STRING);
- g_value_set_string (value, e_meeting_attendee_get_language (attendee));
- break;
- case E_MEETING_STORE_ATTENDEE_COL:
- g_value_init (value, G_TYPE_STRING);
- cn = e_meeting_attendee_get_cn (attendee);
- if (strcmp (cn, ""))
- g_value_set_string (value, cn);
- else
- g_value_set_string (value, itip_strip_mailto (e_meeting_attendee_get_address (attendee)));
- break;
- case E_MEETING_STORE_ATTENDEE_UNDERLINE_COL:
- cn = e_meeting_attendee_get_cn (attendee);
- g_value_init (value, PANGO_TYPE_UNDERLINE);
- g_value_set_enum (value, strcmp ("", cn) == 0 ? PANGO_UNDERLINE_NONE : PANGO_UNDERLINE_SINGLE);
- }
-}
-
-static gboolean
-iter_next (GtkTreeModel *model, GtkTreeIter *iter)
-{
- int row;
-
- g_return_val_if_fail (E_IS_MEETING_STORE (model), FALSE);
- g_return_val_if_fail (iter->stamp == E_MEETING_STORE (model)->priv->stamp, FALSE);
-
- row = GPOINTER_TO_INT (iter->user_data) + 1;
- iter->user_data = GINT_TO_POINTER (row);
-
- return ROW_VALID (E_MEETING_STORE (model), row);
-}
-
-static gboolean
-iter_children (GtkTreeModel *model, GtkTreeIter *iter, GtkTreeIter *parent)
-{
- EMeetingStore *store;
-
- g_return_val_if_fail (E_IS_MEETING_STORE (model), FALSE);
-
- store = E_MEETING_STORE (model);
-
- if (parent || store->priv->attendees->len <= 0)
- return FALSE;
-
- iter->stamp = store->priv->stamp;
- iter->user_data = GINT_TO_POINTER (0);
-
- return TRUE;
-}
-
-static gboolean
-iter_has_child (GtkTreeModel *model, GtkTreeIter *iter)
-{
- return FALSE;
-}
-
-static int
-iter_n_children (GtkTreeModel *model, GtkTreeIter *iter)
-{
- g_return_val_if_fail (E_IS_MEETING_STORE (model), -1);
-
- if (!iter)
- return E_MEETING_STORE (model)->priv->attendees->len;
-
- g_return_val_if_fail (iter->stamp == E_MEETING_STORE (model)->priv->stamp, -1);
-
- return 0;
-}
-
-static gboolean
-iter_nth_child (GtkTreeModel *model, GtkTreeIter *iter, GtkTreeIter *parent, int n)
-{
- EMeetingStore *store;
-
- g_return_val_if_fail (E_IS_MEETING_STORE (model), FALSE);
-
- store = E_MEETING_STORE (model);
-
- if (parent || !ROW_VALID (store, n))
- return FALSE;
-
- iter->stamp = store->priv->stamp;
- iter->user_data = GINT_TO_POINTER (n);
-
- return TRUE;
-}
-
-static gboolean
-iter_parent (GtkTreeModel *model, GtkTreeIter *iter, GtkTreeIter *child)
-{
- return FALSE;
-}
-
-static void
-ems_tree_model_init (GtkTreeModelIface *iface)
-{
- iface->get_flags = get_flags;
- iface->get_n_columns = get_n_columns;
- iface->get_column_type = get_column_type;
- iface->get_iter = get_iter;
- iface->get_path = get_path;
- iface->get_value = get_value;
- iface->iter_next = iter_next;
- iface->iter_children = iter_children;
- iface->iter_has_child = iter_has_child;
- iface->iter_n_children = iter_n_children;
- iface->iter_nth_child = iter_nth_child;
- iface->iter_parent = iter_parent;
-}
-
-void
-e_meeting_store_set_value (EMeetingStore *store, int row, int col, const gchar *val)
-{
- icalparameter_cutype type;
- EMeetingAttendee *attendee = g_ptr_array_index (store->priv->attendees, row);
-
- switch (col) {
- case E_MEETING_STORE_ADDRESS_COL:
- if (val != NULL && *((char *)val))
- e_meeting_attendee_set_address (attendee, g_strdup_printf ("MAILTO:%s", (char *) val));
- break;
- case E_MEETING_STORE_MEMBER_COL:
- e_meeting_attendee_set_member (attendee, g_strdup (val));
- break;
- case E_MEETING_STORE_TYPE_COL:
- type = text_to_type (val);
- e_meeting_attendee_set_cutype (attendee, text_to_type (val));
- if (type == ICAL_CUTYPE_RESOURCE) {
- e_meeting_attendee_set_role (attendee, ICAL_ROLE_NONPARTICIPANT);
- }
- break;
- case E_MEETING_STORE_ROLE_COL:
- e_meeting_attendee_set_role (attendee, text_to_role (val));
- break;
- case E_MEETING_STORE_RSVP_COL:
- e_meeting_attendee_set_rsvp (attendee, text_to_boolean (val));
- break;
- case E_MEETING_STORE_DELTO_COL:
- e_meeting_attendee_set_delto (attendee, g_strdup (val));
- break;
- case E_MEETING_STORE_DELFROM_COL:
- e_meeting_attendee_set_delfrom (attendee, g_strdup (val));
- break;
- case E_MEETING_STORE_STATUS_COL:
- e_meeting_attendee_set_status (attendee, text_to_partstat (val));
- break;
- case E_MEETING_STORE_CN_COL:
- e_meeting_attendee_set_cn (attendee, g_strdup (val));
- break;
- case E_MEETING_STORE_LANGUAGE_COL:
- e_meeting_attendee_set_language (attendee, g_strdup (val));
- break;
- }
-}
-
-static gboolean
-is_cell_editable (EMeetingStore *etm, int col, int row)
-{
- EMeetingStore *store;
- EMeetingStorePrivate *priv;
- EMeetingAttendee *attendee;
- EMeetingAttendeeEditLevel level;
-
- store = E_MEETING_STORE (etm);
- priv = store->priv;
-
- if (col == E_MEETING_STORE_DELTO_COL
- || col == E_MEETING_STORE_DELFROM_COL)
- return FALSE;
-
- if (row == -1)
- return TRUE;
- if (row >= priv->attendees->len)
- return TRUE;
-
- attendee = g_ptr_array_index (priv->attendees, row);
- level = e_meeting_attendee_get_edit_level (attendee);
-
- switch (level) {
- case E_MEETING_ATTENDEE_EDIT_FULL:
- return TRUE;
- case E_MEETING_ATTENDEE_EDIT_STATUS:
- return col == E_MEETING_STORE_STATUS_COL;
- case E_MEETING_ATTENDEE_EDIT_NONE:
- return FALSE;
- }
-
- return TRUE;
-}
-
-static void
-refresh_queue_remove (EMeetingStore *store, EMeetingAttendee *attendee)
-{
- EMeetingStorePrivate *priv;
- EMeetingStoreQueueData *qdata;
-
- priv = store->priv;
-
- /* Free the queue data */
- qdata = g_hash_table_lookup (priv->refresh_data, attendee);
- if (qdata) {
- g_hash_table_remove (priv->refresh_data, attendee);
- g_ptr_array_free (qdata->call_backs, TRUE);
- g_ptr_array_free (qdata->data, TRUE);
- g_free (qdata);
- }
-
- /* Unref the attendee */
- g_ptr_array_remove (priv->refresh_queue, attendee);
- g_object_unref (attendee);
-}
-
-static void
-ems_finalize (GObject *obj)
-{
- EMeetingStore *store = E_MEETING_STORE (obj);
- EMeetingStorePrivate *priv;
- int i;
-
- priv = store->priv;
-
- for (i = 0; i < priv->attendees->len; i++)
- g_object_unref (g_ptr_array_index (priv->attendees, i));
- g_ptr_array_free (priv->attendees, TRUE);
-
- if (priv->client != NULL)
- g_object_unref (priv->client);
-
- if (priv->ebook != NULL)
- g_object_unref (priv->ebook);
-
- while (priv->refresh_queue->len > 0)
- refresh_queue_remove (store, g_ptr_array_index (priv->refresh_queue, 0));
- g_ptr_array_free (priv->refresh_queue, TRUE);
- g_hash_table_destroy (priv->refresh_data);
-
- if (priv->refresh_idle_id)
- g_source_remove (priv->refresh_idle_id);
-
- g_free (priv);
-
- if (G_OBJECT_CLASS (parent_class)->finalize)
- (* G_OBJECT_CLASS (parent_class)->finalize) (obj);
-}
-
-static void
-ems_class_init (GObjectClass *klass)
-{
- parent_class = g_type_class_peek_parent (klass);
-
- klass->finalize = ems_finalize;
-}
-
-
-static void
-ems_init (EMeetingStore *store)
-{
- EMeetingStorePrivate *priv;
-
- priv = g_new0 (EMeetingStorePrivate, 1);
-
- store->priv = priv;
-
- priv->attendees = g_ptr_array_new ();
-
- priv->zone = icaltimezone_get_builtin_timezone (calendar_config_get_timezone ());
-
- priv->refresh_queue = g_ptr_array_new ();
- priv->refresh_data = g_hash_table_new (g_direct_hash, g_direct_equal);
-
- start_addressbook_server (store);
-}
-
-GType
-e_meeting_store_get_type (void)
-{
- static GType ems_type = 0;
-
- if (!ems_type) {
- static const GTypeInfo ems_info = {
- sizeof (EMeetingStoreClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) ems_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EMeetingStore),
- 0,
- (GInstanceInitFunc) ems_init };
-
- static const GInterfaceInfo tree_model_info = {
- (GInterfaceInitFunc) ems_tree_model_init,
- NULL,
- NULL };
-
- ems_type = g_type_register_static (GTK_TYPE_LIST_STORE,
- "EMeetingStore",
- &ems_info, 0);
-
- g_type_add_interface_static (ems_type,
- GTK_TYPE_TREE_MODEL,
- &tree_model_info);
- }
-
- return ems_type;
-}
-
-GObject *
-e_meeting_store_new (void)
-{
- return g_object_new (E_TYPE_MEETING_STORE, NULL);
-}
-
-
-ECal *
-e_meeting_store_get_e_cal (EMeetingStore *store)
-{
- return store->priv->client;
-}
-
-void
-e_meeting_store_set_e_cal (EMeetingStore *store, ECal *client)
-{
- if (store->priv->client != NULL)
- g_object_unref (store->priv->client);
-
- if (client != NULL)
- g_object_ref (client);
- store->priv->client = client;
-}
-
-icaltimezone *
-e_meeting_store_get_zone (EMeetingStore *store)
-{
- g_return_val_if_fail (E_IS_MEETING_STORE (store), NULL);
-
- return store->priv->zone;
-}
-
-void
-e_meeting_store_set_zone (EMeetingStore *store, icaltimezone *zone)
-{
- g_return_if_fail (E_IS_MEETING_STORE (store));
-
- store->priv->zone = zone;
-}
-
-static void
-attendee_changed_cb (EMeetingAttendee *attendee, gpointer data)
-{
- EMeetingStore *store = E_MEETING_STORE (data);
- GtkTreePath *path;
- GtkTreeIter iter;
- gint row = -1, i;
-
- for (i = 0; i < store->priv->attendees->len; i++) {
- if (attendee == g_ptr_array_index (store->priv->attendees, i)) {
- row = i;
- break;
- }
- }
-
- if (row == -1)
- return;
-
- path = gtk_tree_path_new ();
- gtk_tree_path_append_index (path, row);
- get_iter (GTK_TREE_MODEL (store), &iter, path);
- gtk_tree_model_row_changed (GTK_TREE_MODEL (store), path, &iter);
- gtk_tree_path_free (path);
-}
-
-void
-e_meeting_store_add_attendee (EMeetingStore *store, EMeetingAttendee *attendee)
-{
- GtkTreePath *path;
- GtkTreeIter iter;
-
- g_return_if_fail (E_IS_MEETING_STORE (store));
-
- g_object_ref (attendee);
- g_ptr_array_add (store->priv->attendees, attendee);
-
- g_signal_connect (attendee, "changed", G_CALLBACK (attendee_changed_cb), store);
-
- path = gtk_tree_path_new ();
- gtk_tree_path_append_index (path, store->priv->attendees->len - 1);
- get_iter (GTK_TREE_MODEL (store), &iter, path);
- gtk_tree_model_row_inserted (GTK_TREE_MODEL (store), path, &iter);
- gtk_tree_path_free (path);
-}
-
-EMeetingAttendee *
-e_meeting_store_add_attendee_with_defaults (EMeetingStore *store)
-{
- EMeetingAttendee *attendee;
- char *str;
-
- attendee = E_MEETING_ATTENDEE (e_meeting_attendee_new ());
-
- e_meeting_attendee_set_address (attendee, g_strdup (""));
- e_meeting_attendee_set_member (attendee, g_strdup (""));
-
- str = g_strdup (_("Individual"));
- e_meeting_attendee_set_cutype (attendee, text_to_type (str));
- g_free (str);
- str = g_strdup (_("Required Participant"));
- e_meeting_attendee_set_role (attendee, text_to_role (str));
- g_free (str);
- str = g_strdup (_("Yes"));
- e_meeting_attendee_set_rsvp (attendee, text_to_boolean (str));
- g_free (str);
-
- e_meeting_attendee_set_delto (attendee, g_strdup (""));
- e_meeting_attendee_set_delfrom (attendee, g_strdup (""));
-
- str = g_strdup (_("Needs Action"));
- e_meeting_attendee_set_status (attendee, text_to_partstat (str));
- g_free (str);
-
- e_meeting_attendee_set_cn (attendee, g_strdup (""));
- e_meeting_attendee_set_language (attendee, g_strdup ("en"));
-
- e_meeting_store_add_attendee (store, attendee);
-
- return attendee;
-}
-
-void
-e_meeting_store_remove_attendee (EMeetingStore *store, EMeetingAttendee *attendee)
-{
- gint i, row = -1;
- GtkTreePath *path;
-
- for (i = 0; i < store->priv->attendees->len; i++) {
- if (attendee == g_ptr_array_index (store->priv->attendees, i)) {
- row = i;
- break;
- }
- }
-
- if (row != -1) {
- g_ptr_array_remove_index (store->priv->attendees, row);
- g_object_unref (attendee);
-
- path = gtk_tree_path_new ();
- gtk_tree_path_append_index (path, row);
- gtk_tree_model_row_deleted (GTK_TREE_MODEL (store), path);
- gtk_tree_path_free (path);
- }
-}
-
-void
-e_meeting_store_remove_all_attendees (EMeetingStore *store)
-{
- gint i;
- GtkTreePath *path = gtk_tree_path_new ();
-
- gtk_tree_path_append_index (path, 0);
-
- for (i = 0; i < store->priv->attendees->len; i++) {
- EMeetingAttendee *attendee = g_ptr_array_index (store->priv->attendees, i);
- g_object_unref (attendee);
-
- gtk_tree_model_row_deleted (GTK_TREE_MODEL (store), path);
- gtk_tree_path_next (path);
- }
-
- g_ptr_array_set_size (store->priv->attendees, 0);
- gtk_tree_path_free (path);
-}
-
-EMeetingAttendee *
-e_meeting_store_find_attendee (EMeetingStore *store, const gchar *address, gint *row)
-{
- EMeetingAttendee *attendee;
- int i;
-
- if (address == NULL)
- return NULL;
-
- for (i = 0; i < store->priv->attendees->len; i++) {
- const gchar *attendee_address;
-
- attendee = g_ptr_array_index (store->priv->attendees, i);
-
- attendee_address = e_meeting_attendee_get_address (attendee);
- if (attendee_address && !g_strcasecmp (itip_strip_mailto (attendee_address), itip_strip_mailto (address))) {
- if (row != NULL)
- *row = i;
-
- return attendee;
- }
- }
-
- return NULL;
-}
-
-EMeetingAttendee *
-e_meeting_store_find_attendee_at_row (EMeetingStore *store, gint row)
-{
- g_return_val_if_fail (E_IS_MEETING_STORE (store), NULL);
- g_return_val_if_fail (ROW_VALID (store, row), NULL);
-
- return g_ptr_array_index (store->priv->attendees, row);
-}
-
-gint
-e_meeting_store_count_actual_attendees (EMeetingStore *store)
-{
- g_return_val_if_fail (E_IS_MEETING_STORE (store), 0);
-
- return store->priv->attendees->len;
-}
-
-const GPtrArray *
-e_meeting_store_get_attendees (EMeetingStore *store)
-{
- g_return_val_if_fail (E_IS_MEETING_STORE (store), NULL);
-
- return store->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);
- if (param == NULL)
- return NULL;
- tzid = icalparameter_get_tzid (param);
-
- iter = icalcomponent_begin_component (tz_top_level, ICAL_VTIMEZONE_COMPONENT);
- while ((sub_comp = icalcompiter_deref (&iter)) != NULL) {
- icalcomponent *clone;
- icalproperty *prop;
- const char *tz_tzid;
-
- prop = icalcomponent_get_first_property (sub_comp, ICAL_TZID_PROPERTY);
- tz_tzid = icalproperty_get_tzid (prop);
- 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 void
-process_callbacks (EMeetingStoreQueueData *qdata)
-{
- EMeetingStore *store;
- int i;
-
- for (i = 0; i < qdata->call_backs->len; i++) {
- EMeetingStoreRefreshCallback call_back;
- gpointer *data;
-
- call_back = g_ptr_array_index (qdata->call_backs, i);
- data = g_ptr_array_index (qdata->data, i);
-
- call_back (data);
- }
-
- store = qdata->store;
- refresh_queue_remove (qdata->store, qdata->attendee);
- g_object_unref (store);
-}
-
-static void
-process_free_busy_comp (EMeetingAttendee *attendee,
- icalcomponent *fb_comp,
- icaltimezone *zone,
- icalcomponent *tz_top_level)
-{
- icalproperty *ip;
-
- ip = icalcomponent_get_first_property (fb_comp, ICAL_DTSTART_PROPERTY);
- if (ip != NULL) {
- struct icaltimetype dtstart;
- icaltimezone *ds_zone;
-
- dtstart = icalproperty_get_dtstart (ip);
- if (!dtstart.is_utc)
- ds_zone = find_zone (ip, tz_top_level);
- else
- ds_zone = icaltimezone_get_utc_timezone ();
- icaltimezone_convert_time (&dtstart, ds_zone, zone);
- e_meeting_attendee_set_start_busy_range (attendee,
- 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;
-
- dtend = icalproperty_get_dtend (ip);
- if (!dtend.is_utc)
- de_zone = find_zone (ip, tz_top_level);
- else
- de_zone = icaltimezone_get_utc_timezone ();
- icaltimezone_convert_time (&dtend, de_zone, zone);
- e_meeting_attendee_set_end_busy_range (attendee,
- 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:
- break;
- }
-
- if (busy_type != E_MEETING_FREE_BUSY_LAST) {
- icaltimezone *utc_zone = icaltimezone_get_utc_timezone ();
-
- icaltimezone_convert_time (&fb.start, utc_zone, zone);
- icaltimezone_convert_time (&fb.end, utc_zone, zone);
- e_meeting_attendee_add_busy_period (attendee,
- 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 (EMeetingStoreQueueData *qdata, char *text)
-{
- EMeetingStore *store = qdata->store;
- EMeetingStorePrivate *priv;
- EMeetingAttendee *attendee = qdata->attendee;
- icalcomponent *main_comp;
- icalcomponent_kind kind = ICAL_NO_COMPONENT;
-
- priv = store->priv;
-
- main_comp = icalparser_parse_string (text);
- if (main_comp == NULL) {
- process_callbacks (qdata);
- return;
- }
-
- kind = icalcomponent_isa (main_comp);
- if (kind == ICAL_VCALENDAR_COMPONENT) {
- icalcompiter iter;
- icalcomponent *tz_top_level, *sub_comp;
-
- tz_top_level = e_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 (attendee, sub_comp, priv->zone, tz_top_level);
-
- icalcompiter_next (&iter);
- }
- icalcomponent_free (tz_top_level);
- } else if (kind == ICAL_VFREEBUSY_COMPONENT) {
- process_free_busy_comp (attendee, main_comp, priv->zone, NULL);
- }
-
- icalcomponent_free (main_comp);
-
- process_callbacks (qdata);
-}
-
-static gboolean
-refresh_busy_periods (gpointer data)
-{
- EMeetingStore *store = E_MEETING_STORE (data);
- EMeetingStorePrivate *priv;
- EMeetingAttendee *attendee = NULL;
- EMeetingStoreQueueData *qdata = NULL;
- char *query;
- int i;
-
- priv = store->priv;
-
- /* Check to see if there are any remaining attendees in the queue */
- for (i = 0; i < priv->refresh_queue->len; i++) {
- attendee = g_ptr_array_index (priv->refresh_queue, i);
- g_assert (attendee != NULL);
-
- qdata = g_hash_table_lookup (priv->refresh_data, attendee);
- if (!qdata)
- continue;
-
- if (!qdata->refreshing)
- break;
- }
-
- /* The everything in the queue is being refreshed */
- if (i >= priv->refresh_queue->len) {
- priv->refresh_idle_id = 0;
- return FALSE;
- }
-
- /* Indicate we are trying to refresh it */
- qdata->refreshing = TRUE;
-
- /* We take a ref in case we get destroyed in the gui during a callback */
- g_object_ref (qdata->store);
-
- /* Check the server for free busy data */
- if (priv->client) {
- GList *fb_data = NULL, *users = NULL;
- struct icaltimetype itt;
- time_t startt, endt;
- const char *user;
-
- itt = icaltime_null_time ();
- itt.year = g_date_year (&qdata->start.date);
- itt.month = g_date_month (&qdata->start.date);
- itt.day = g_date_day (&qdata->start.date);
- itt.hour = qdata->start.hour;
- itt.minute = qdata->start.minute;
- startt = icaltime_as_timet_with_zone (itt, priv->zone);
-
- itt = icaltime_null_time ();
- itt.year = g_date_year (&qdata->end.date);
- itt.month = g_date_month (&qdata->end.date);
- itt.day = g_date_day (&qdata->end.date);
- itt.hour = qdata->end.hour;
- itt.minute = qdata->end.minute;
- endt = icaltime_as_timet_with_zone (itt, priv->zone);
-
- user = itip_strip_mailto (e_meeting_attendee_get_address (attendee));
- users = g_list_append (users, g_strdup (user));
- e_cal_get_free_busy (priv->client, users, startt, endt, &fb_data, NULL);
-
- g_list_foreach (users, (GFunc)g_free, NULL);
- g_list_free (users);
-
- if (fb_data != NULL) {
- ECalComponent *comp = fb_data->data;
- char *comp_str;
-
- comp_str = e_cal_component_get_as_string (comp);
- process_free_busy (qdata, comp_str);
- g_free (comp_str);
- return TRUE;
- }
- }
-
- /* Look for fburl's of attendee with no free busy info on server */
- if (!e_meeting_attendee_is_set_address (attendee)) {
- process_callbacks (qdata);
- return TRUE;
- }
-
- query = g_strdup_printf ("(contains \"email\" \"%s\")",
- itip_strip_mailto (e_meeting_attendee_get_address (attendee)));
- process_callbacks (qdata);
- g_free (query);
-
- return TRUE;
-}
-
-static void
-refresh_queue_add (EMeetingStore *store, int row,
- EMeetingTime *start,
- EMeetingTime *end,
- EMeetingStoreRefreshCallback call_back,
- gpointer data)
-{
- EMeetingStorePrivate *priv;
- EMeetingAttendee *attendee;
- EMeetingStoreQueueData *qdata;
-
- priv = store->priv;
-
- attendee = g_ptr_array_index (priv->attendees, row);
- if (attendee == NULL)
- return;
-
- qdata = g_hash_table_lookup (priv->refresh_data, attendee);
- if (qdata == NULL) {
- qdata = g_new0 (EMeetingStoreQueueData, 1);
-
- qdata->store = store;
- qdata->attendee = attendee;
- e_meeting_attendee_clear_busy_periods (attendee);
- e_meeting_attendee_set_has_calendar_info (attendee, FALSE);
-
- qdata->start = *start;
- qdata->end = *end;
- qdata->string = g_string_new (NULL);
- qdata->call_backs = g_ptr_array_new ();
- qdata->data = g_ptr_array_new ();
- g_ptr_array_add (qdata->call_backs, call_back);
- g_ptr_array_add (qdata->data, data);
-
- g_hash_table_insert (priv->refresh_data, attendee, qdata);
- } else {
- if (e_meeting_time_compare_times (start, &qdata->start) == -1)
- qdata->start = *start;
- if (e_meeting_time_compare_times (end, &qdata->end) == 1)
- qdata->end = *end;
- g_ptr_array_add (qdata->call_backs, call_back);
- g_ptr_array_add (qdata->data, data);
- }
-
- g_object_ref (attendee);
- g_ptr_array_add (priv->refresh_queue, attendee);
-
- if (priv->refresh_idle_id == 0)
- priv->refresh_idle_id = g_idle_add (refresh_busy_periods, store);
-}
-
-static void
-async_close (GnomeVFSAsyncHandle *handle,
- GnomeVFSResult result,
- gpointer data)
-{
- EMeetingStoreQueueData *qdata = data;
-
- process_free_busy (qdata, qdata->string->str);
-}
-
-static void
-async_read (GnomeVFSAsyncHandle *handle,
- GnomeVFSResult result,
- gpointer buffer,
- GnomeVFSFileSize requested,
- GnomeVFSFileSize read,
- gpointer data)
-{
- EMeetingStoreQueueData *qdata = data;
- GnomeVFSFileSize buf_size = BUF_SIZE - 1;
-
- if (result != GNOME_VFS_OK && result != GNOME_VFS_ERROR_EOF) {
- gnome_vfs_async_close (handle, async_close, qdata);
- return;
- }
-
- ((char *)buffer)[read] = '\0';
- qdata->string = g_string_append (qdata->string, buffer);
-
- if (result == GNOME_VFS_ERROR_EOF) {
- gnome_vfs_async_close (handle, async_close, qdata);
- return;
- }
-
- gnome_vfs_async_read (handle, qdata->buffer, buf_size, async_read, qdata);
-}
-
-void
-e_meeting_store_refresh_all_busy_periods (EMeetingStore *store,
- EMeetingTime *start,
- EMeetingTime *end,
- EMeetingStoreRefreshCallback call_back,
- gpointer data)
-{
- int i;
-
- g_return_if_fail (E_IS_MEETING_STORE (store));
-
- for (i = 0; i < store->priv->attendees->len; i++)
- refresh_queue_add (store, i, start, end, call_back, data);
-}
-
-void
-e_meeting_store_refresh_busy_periods (EMeetingStore *store,
- int row,
- EMeetingTime *start,
- EMeetingTime *end,
- EMeetingStoreRefreshCallback call_back,
- gpointer data)
-{
- g_return_if_fail (E_IS_MEETING_STORE (store));
-
- refresh_queue_add (store, row, start, end, call_back, data);
-}
-
diff --git a/calendar/gui/e-meeting-store.h b/calendar/gui/e-meeting-store.h
deleted file mode 100644
index 8454c380b0..0000000000
--- a/calendar/gui/e-meeting-store.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * e-meeting-store.h
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * Author: Mike Kestner
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_STORE_H_
-#define _E_MEETING_STORE_H_
-
-#include <gtk/gtkliststore.h>
-#include <libecal/e-cal.h>
-#include "e-meeting-attendee.h"
-
-G_BEGIN_DECLS
-
-#define E_TYPE_MEETING_STORE (e_meeting_store_get_type ())
-#define E_MEETING_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_MEETING_STORE, EMeetingStore))
-#define E_MEETING_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_MEETING_STORE, EMeetingStoreClass))
-#define E_IS_MEETING_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_MEETING_STORE))
-#define E_IS_MEETING_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_MEETING_STORE))
-
-typedef struct _EMeetingStore EMeetingStore;
-typedef struct _EMeetingStorePrivate EMeetingStorePrivate;
-typedef struct _EMeetingStoreClass EMeetingStoreClass;
-
-typedef enum {
- E_MEETING_STORE_ADDRESS_COL,
- E_MEETING_STORE_MEMBER_COL,
- E_MEETING_STORE_TYPE_COL,
- E_MEETING_STORE_ROLE_COL,
- E_MEETING_STORE_RSVP_COL,
- E_MEETING_STORE_DELTO_COL,
- E_MEETING_STORE_DELFROM_COL,
- E_MEETING_STORE_STATUS_COL,
- E_MEETING_STORE_CN_COL,
- E_MEETING_STORE_LANGUAGE_COL,
- E_MEETING_STORE_ATTENDEE_COL,
- E_MEETING_STORE_ATTENDEE_UNDERLINE_COL,
- E_MEETING_STORE_COLUMN_COUNT
-} EMeetingStoreColumns;
-
-struct _EMeetingStore {
- GtkListStore parent;
-
- EMeetingStorePrivate *priv;
-};
-
-struct _EMeetingStoreClass {
- GtkListStoreClass parent_class;
-};
-
-typedef void (* EMeetingStoreRefreshCallback) (gpointer data);
-
-GType e_meeting_store_get_type (void);
-GObject *e_meeting_store_new (void);
-
-void e_meeting_store_set_value (EMeetingStore *im, int row, int col, const gchar *val);
-
-ECal *e_meeting_store_get_e_cal (EMeetingStore *im);
-void e_meeting_store_set_e_cal (EMeetingStore *im, ECal *client);
-
-icaltimezone *e_meeting_store_get_zone (EMeetingStore *im);
-void e_meeting_store_set_zone (EMeetingStore *im, icaltimezone *zone);
-
-void e_meeting_store_add_attendee (EMeetingStore *im, EMeetingAttendee *ia);
-EMeetingAttendee *e_meeting_store_add_attendee_with_defaults (EMeetingStore *im);
-
-void e_meeting_store_remove_attendee (EMeetingStore *im, EMeetingAttendee *ia);
-void e_meeting_store_remove_all_attendees (EMeetingStore *im);
-
-EMeetingAttendee *e_meeting_store_find_attendee (EMeetingStore *im, const gchar *address, gint *row);
-EMeetingAttendee *e_meeting_store_find_attendee_at_row (EMeetingStore *im, gint row);
-
-gint e_meeting_store_count_actual_attendees (EMeetingStore *im);
-const GPtrArray *e_meeting_store_get_attendees (EMeetingStore *im);
-
-void e_meeting_store_refresh_all_busy_periods (EMeetingStore *im,
- EMeetingTime *start,
- EMeetingTime *end,
- EMeetingStoreRefreshCallback call_back,
- gpointer data);
-void e_meeting_store_refresh_busy_periods (EMeetingStore *im,
- int row,
- EMeetingTime *start,
- EMeetingTime *end,
- EMeetingStoreRefreshCallback call_back,
- gpointer data);
-
-
-G_END_DECLS
-
-#endif
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 c714684569..0000000000
--- a/calendar/gui/e-meeting-time-sel-item.c
+++ /dev/null
@@ -1,999 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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-i18n.h>
-#include "calendar-config.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
-};
-
-E_MAKE_TYPE (e_meeting_time_selector_item, "EMeetingTimeSelectorItem", EMeetingTimeSelectorItem,
- e_meeting_time_selector_item_class_init, e_meeting_time_selector_item_init,
- GNOME_TYPE_CANVAS_ITEM);
-
-static void
-e_meeting_time_selector_item_class_init (EMeetingTimeSelectorItemClass *mts_item_class)
-{
- GtkObjectClass *object_class;
- GnomeCanvasItemClass *item_class;
-
- parent_class = g_type_class_peek_parent (mts_item_class);
-
- 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);
-
- if (mts_item->normal_cursor) {
- gdk_cursor_destroy (mts_item->normal_cursor);
- mts_item->normal_cursor = NULL;
- }
- if (mts_item->resize_cursor) {
- gdk_cursor_destroy (mts_item->resize_cursor);
- mts_item->resize_cursor = NULL;
- }
-
- 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_store_count_actual_attendees (mts->model) && row_y < height) {
- ia = e_meeting_store_find_attendee_at_row (mts->model, row);
-
- if (e_meeting_attendee_get_has_calendar_info (ia)) {
- if (e_meeting_time_selector_item_calculate_busy_range (mts, 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;
- gint y, grid_x;
- gchar buffer[128], *format;
- gint hour, hour_x, hour_y;
- GdkRectangle clip_rect;
- PangoLayout *layout;
-
- mts = mts_item->mts;
- gc = mts_item->main_gc;
-
- gdk_gc_set_foreground (gc, &mts->grid_color);
- layout = gtk_widget_create_pango_layout (GTK_WIDGET (mts), NULL);
-
- /* 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. */
- 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);
- pango_layout_set_text (layout, buffer, -1);
- gdk_draw_layout (drawable, gc,
- x + 2,
- 4 - scroll_y,
- layout);
- gdk_gc_set_clip_rectangle (gc, NULL);
-
- /* Draw the hours. */
- hour = mts->first_hour_shown;
- hour_x = x + 2;
- hour_y = mts->row_height + 4 - scroll_y;
- while (hour < mts->last_hour_shown) {
- if (calendar_config_get_24_hour_format ())
- pango_layout_set_text (layout, EMeetingTimeSelectorHours [hour], -1);
- else
- pango_layout_set_text (layout, EMeetingTimeSelectorHours12 [hour], -1);
-
- gdk_draw_layout (drawable, gc,
- hour_x,
- hour_y,
- layout);
-
- hour += mts->zoomed_out ? 3 : 1;
- hour_x += mts->col_width;
- }
-
- g_object_unref (layout);
-}
-
-
-/* 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_store_count_actual_attendees (mts->model));
- for (row = 0; row < e_meeting_store_count_actual_attendees (mts->model); row++) {
- ia = e_meeting_store_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_store_count_actual_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_store_count_actual_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_store_count_actual_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;
- gint row, y, first_period;
- GdkGC *gc;
-
- mts = mts_item->mts;
- gc = mts_item->main_gc;
-
- /* 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_store_count_actual_attendees (mts->model)) {
-
- /* Find the first visible busy period. */
- first_period = e_meeting_time_selector_item_find_first_busy_period (mts_item, date, 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, 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_store_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_store_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->all_day) {
- 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;
- }
- } else {
- start_time.hour = 0;
- start_time.minute = 0;
- end_time = start_time;
- g_date_add_days (&end_time.date, 1);
- }
-
- /* 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_store_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 11b355dfa0..0000000000
--- a/calendar/gui/e-meeting-time-sel-item.h
+++ /dev/null
@@ -1,78 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 91d915a4d7..0000000000
--- a/calendar/gui/e-meeting-time-sel.c
+++ /dev/null
@@ -1,2850 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <libgnomecanvas/gnome-canvas-widget.h>
-
-#include <gal/widgets/e-canvas.h>
-#include <gal/widgets/e-canvas-utils.h>
-
-#include <widgets/misc/e-dateedit.h>
-
-#include "calendar-component.h"
-#include "calendar-config.h"
-#include "e-meeting-utils.h"
-#include "e-meeting-list-view.h"
-#include "e-meeting-time-sel-item.h"
-
-/* An array of hour strings for 24 hour time, "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"
-};
-
-/* An array of hour strings for 12 hour time, "12:00am" .. "11:00pm". */
-const gchar *EMeetingTimeSelectorHours12[24] = {
- "12:00am", "1:00am", "2:00am", "3:00am", "4:00am", "5:00am", "6:00am",
- "7:00am", "8:00am", "9:00am", "10:00am", "11:00am", "12:00pm",
- "1:00pm", "2:00pm", "3:00pm", "4:00pm", "5:00pm", "6:00pm", "7:00pm",
- "8:00pm", "9:00pm", "10:00pm", "11:00pm"
-};
-
-/* The number of days shown in the entire canvas. */
-#define E_MEETING_TIME_SELECTOR_DAYS_SHOWN 365
-#define E_MEETING_TIME_SELECTOR_DAYS_START_BEFORE 60
-#define E_MEETING_TIME_SELECTOR_FB_DAYS_BEFORE 7
-#define E_MEETING_TIME_SELECTOR_FB_DAYS_AFTER 28
-
-/* 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
-
-/* Signals */
-enum {
- CHANGED,
- LAST_SIGNAL
-};
-
-
-static gint mts_signals [LAST_SIGNAL] = { 0 };
-
-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 void e_meeting_time_selector_style_set (GtkWidget *widget,
- GtkStyle *previous_style);
-static gint e_meeting_time_selector_expose_event (GtkWidget *widget,
- GdkEventExpose *event);
-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 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,
- gboolean *push_in,
- 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 gboolean e_meeting_time_selector_on_invite_others_button_expose (GtkWidget *button,
- GdkEventExpose *event,
- 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,
- gboolean *push_in,
- 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_inserted_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data);
-static void row_changed_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data);
-static void row_deleted_cb (GtkTreeModel *model, GtkTreePath *path, gpointer data);
-
-static GtkTableClass *parent_class;
-
-E_MAKE_TYPE (e_meeting_time_selector, "EMeetingTimeSelector", EMeetingTimeSelector,
- e_meeting_time_selector_class_init, e_meeting_time_selector_init,
- GTK_TYPE_TABLE);
-
-static void
-e_meeting_time_selector_class_init (EMeetingTimeSelectorClass * klass)
-{
- GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
-
- parent_class = g_type_class_peek_parent (klass);
- object_class = (GtkObjectClass *) klass;
- widget_class = (GtkWidgetClass *) klass;
-
- mts_signals [CHANGED] =
- gtk_signal_new ("changed", GTK_RUN_FIRST,
- G_TYPE_FROM_CLASS (object_class),
- GTK_SIGNAL_OFFSET (EMeetingTimeSelectorClass,
- changed),
- gtk_signal_default_marshaller,
- GTK_TYPE_NONE, 0);
-
- 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->style_set = e_meeting_time_selector_style_set;
- widget_class->expose_event = e_meeting_time_selector_expose_event;
-}
-
-
-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->list_view = NULL;
-}
-
-
-void
-e_meeting_time_selector_construct (EMeetingTimeSelector * mts, EMeetingStore *ems)
-{
- char *filename;
- GtkWidget *hbox, *vbox, *separator, *button, *label, *table;
- GtkWidget *alignment, *child_hbox, *arrow, *menuitem;
- GSList *group;
- GdkVisual *visual;
- GdkColormap *colormap;
- guint accel_key;
- time_t meeting_start_time;
- struct tm *meeting_start_tm;
- 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 = 17;
- mts->col_width = 55;
- mts->day_width = 55 * 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);
-
- mts->attendees_vbox_spacer = gtk_vbox_new (FALSE, 0);
- gtk_box_pack_start (GTK_BOX (vbox), mts->attendees_vbox_spacer, FALSE, FALSE, 0);
- gtk_widget_show (mts->attendees_vbox_spacer);
-
- 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_build_filename (calendar_component_peek_config_directory (calendar_component_peek ()),
- "config", "et-header-meeting-time-sel", NULL);
- mts->model = ems;
-
- if (mts->model)
- g_object_ref (mts->model);
-
- g_signal_connect (mts->model, "row_inserted", G_CALLBACK (row_inserted_cb), mts);
- g_signal_connect (mts->model, "row_changed", G_CALLBACK (row_changed_cb), mts);
- g_signal_connect (mts->model, "row_deleted", G_CALLBACK (row_deleted_cb), mts);
-
- mts->list_view = e_meeting_list_view_new (mts->model);
- e_meeting_list_view_column_set_visible (mts->list_view, "Role", FALSE);
- e_meeting_list_view_column_set_visible (mts->list_view, "RSVP", FALSE);
- gtk_widget_show (GTK_WIDGET (mts->list_view));
-
-#if 0
- /* FIXME: do we need sorting here */
- g_signal_connect (real_table->sort_info, "sort_info_changed", G_CALLBACK (sort_info_changed_cb), mts);
-#endif
-
- gtk_box_pack_start (GTK_BOX (mts->attendees_vbox), GTK_WIDGET (mts->list_view), TRUE, TRUE, 6);
-
- /* 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);
- g_signal_connect (mts->display_top, "realize",
- G_CALLBACK (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);
- g_signal_connect (mts->display_main, "realize",
- G_CALLBACK (e_meeting_time_selector_on_canvas_realized), mts);
- g_signal_connect (mts->display_main, "size_allocate",
- G_CALLBACK (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, 6, 6);
- 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 ("");
- gtk_label_set_text_with_mnemonic (GTK_LABEL (GTK_BIN (button)->child),
- _("_Invite Others..."));
- accel_key = gtk_label_get_mnemonic_keyval (GTK_LABEL (GTK_BIN (button)->child));
- gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 6);
- gtk_widget_show (button);
- gtk_widget_add_accelerator (button, "clicked", mts->accel_group,
- accel_key, GDK_MOD1_MASK, 0);
- g_signal_connect (button, "clicked",
- G_CALLBACK (e_meeting_time_selector_on_invite_others_button_clicked), mts);
- g_signal_connect (button, "expose-event",
- G_CALLBACK (e_meeting_time_selector_on_invite_others_button_expose), mts);
-
- mts->options_button = gtk_button_new ();
- gtk_box_pack_start (GTK_BOX (hbox), mts->options_button, TRUE, TRUE, 6);
- gtk_widget_show (mts->options_button);
-
- g_signal_connect (mts->options_button, "clicked",
- G_CALLBACK (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 ("");
- gtk_label_set_text_with_mnemonic (GTK_LABEL (label), _("_Options"));
- accel_key = gtk_label_get_mnemonic_keyval (GTK_LABEL (label));
- gtk_box_pack_start (GTK_BOX (child_hbox), label, TRUE, TRUE, 6);
- 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, 6);
- 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);
-
- menuitem = gtk_check_menu_item_new_with_label ("");
- gtk_label_set_text_with_mnemonic (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);
-
- g_signal_connect (menuitem, "toggled",
- G_CALLBACK (e_meeting_time_selector_on_working_hours_toggled), mts);
- gtk_widget_show (menuitem);
-
- menuitem = gtk_check_menu_item_new_with_label ("");
- gtk_label_set_text_with_mnemonic (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);
-
- g_signal_connect (menuitem, "toggled",
- G_CALLBACK (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 ("");
- gtk_label_set_text_with_mnemonic (GTK_LABEL (GTK_BIN (menuitem)->child), _("_Update Free/Busy"));
- gtk_menu_append (GTK_MENU (mts->options_menu), menuitem);
-
- g_signal_connect (menuitem, "activate",
- G_CALLBACK (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 ("");
- gtk_label_set_text_with_mnemonic (GTK_LABEL (GTK_BIN (button)->child),
- _("_<<"));
- accel_key = gtk_label_get_mnemonic_keyval (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, 6);
- gtk_widget_show (button);
- g_signal_connect (button, "clicked",
- G_CALLBACK (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, 6);
- 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 ("");
- gtk_label_set_text_with_mnemonic (GTK_LABEL (label), _("_Autopick"));
- accel_key = gtk_label_get_mnemonic_keyval (GTK_LABEL (label));
- gtk_box_pack_start (GTK_BOX (child_hbox), label, TRUE, TRUE, 6);
- gtk_widget_show (label);
- gtk_widget_add_accelerator (mts->autopick_button, "clicked", mts->accel_group,
- accel_key, GDK_MOD1_MASK, 0);
- g_signal_connect (mts->autopick_button, "clicked",
- G_CALLBACK (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, 6);
- gtk_widget_show (arrow);
-
- button = gtk_button_new_with_label ("");
- gtk_label_set_text_with_mnemonic (GTK_LABEL (GTK_BIN (button)->child),
- _(">_>"));
- accel_key = gtk_label_get_mnemonic_keyval (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, 6);
- gtk_widget_show (button);
- g_signal_connect (button, "clicked",
- G_CALLBACK (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);
-
- 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));
- gtk_label_set_text_with_mnemonic (GTK_LABEL (GTK_BIN (menuitem)->child), _("_All People and Resources"));
- gtk_menu_append (GTK_MENU (mts->autopick_menu), menuitem);
- g_signal_connect (menuitem, "toggled",
- G_CALLBACK (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));
- gtk_label_set_text_with_mnemonic (GTK_LABEL (GTK_BIN (menuitem)->child), _("All _People and One Resource"));
- gtk_menu_append (GTK_MENU (mts->autopick_menu), menuitem);
- g_signal_connect (menuitem, "toggled",
- G_CALLBACK (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));
- gtk_label_set_text_with_mnemonic (GTK_LABEL (GTK_BIN (menuitem)->child), _("_Required People"));
- gtk_menu_append (GTK_MENU (mts->autopick_menu), menuitem);
- g_signal_connect (menuitem, "activate",
- G_CALLBACK (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));
- gtk_label_set_text_with_mnemonic (GTK_LABEL (GTK_BIN (menuitem)->child), _("Required People and _One Resource"));
- gtk_menu_append (GTK_MENU (mts->autopick_menu), menuitem);
- g_signal_connect (menuitem, "activate",
- G_CALLBACK (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.0, 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 ("");
- gtk_label_set_text_with_mnemonic (GTK_LABEL (label),
- _("Meeting _start time:"));
- accel_key = gtk_label_get_mnemonic_keyval (GTK_LABEL (label));
- 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);
- g_signal_connect (mts->start_date_edit, "changed",
- G_CALLBACK (e_meeting_time_selector_on_start_time_changed), mts);
-
- label = gtk_label_new ("");
- gtk_label_set_text_with_mnemonic (GTK_LABEL (label),
- _("Meeting _end time:"));
- accel_key = gtk_label_get_mnemonic_keyval (GTK_LABEL (label));
- 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);
- g_signal_connect (mts->end_date_edit, "changed",
- G_CALLBACK (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));
- 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 scroll the other items. */
- g_signal_connect (GTK_LAYOUT (mts->display_main)->hadjustment, "value_changed",
- G_CALLBACK (e_meeting_time_selector_hadjustment_changed), mts);
- g_signal_connect (GTK_LAYOUT (mts->display_main)->vadjustment, "value_changed",
- G_CALLBACK (e_meeting_time_selector_vadjustment_changed), mts);
- g_signal_connect (GTK_LAYOUT (mts->display_main)->vadjustment, "changed",
- G_CALLBACK (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);
-
- gtk_signal_emit (GTK_OBJECT (mts), mts_signals [CHANGED]);
-}
-
-
-/* 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, 6);
- gtk_widget_show (label);
-
- g_signal_connect (darea, "expose_event",
- G_CALLBACK (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)
-{
- GdkColormap *colormap;
-
- g_return_if_fail (name != NULL);
- g_return_if_fail (c != NULL);
-
- gdk_color_parse (name, c);
- colormap = gtk_widget_get_colormap (GTK_WIDGET (mts));
- if (!gdk_colormap_alloc_color (colormap, c, TRUE, TRUE))
- 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 (EMeetingStore *ems)
-{
- GtkWidget *mts;
-
- mts = GTK_WIDGET (g_object_new (e_meeting_time_selector_get_type (), NULL));
-
- e_meeting_time_selector_construct (E_MEETING_TIME_SELECTOR (mts), ems);
-
- return mts;
-}
-
-
-static void
-e_meeting_time_selector_destroy (GtkObject *object)
-{
- EMeetingTimeSelector *mts;
-
- mts = E_MEETING_TIME_SELECTOR (object);
-
- e_meeting_time_selector_remove_timeout (mts);
-
- if (mts->stipple) {
- gdk_bitmap_unref (mts->stipple);
- mts->stipple = NULL;
- }
-
- if (mts->model) {
- g_object_unref (mts->model);
- mts->model = NULL;
- }
-
- mts->display_top = NULL;
- mts->display_main = NULL;
-
- 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);
-}
-
-static void
-e_meeting_time_selector_style_set (GtkWidget *widget,
- GtkStyle *previous_style)
-{
- EMeetingTimeSelector *mts;
- EMeetingTime saved_time;
- int hour, max_hour_width;
- int maxheight;
- PangoFontDescription *font_desc;
- PangoContext *pango_context;
- PangoFontMetrics *font_metrics;
- PangoLayout *layout;
- GtkTreePath *path;
- GdkRectangle cell_area;
-
- if (GTK_WIDGET_CLASS (parent_class)->style_set)
- (*GTK_WIDGET_CLASS (parent_class)->style_set)(widget, previous_style);
-
- mts = E_MEETING_TIME_SELECTOR (widget);
-
- /* Set up Pango prerequisites */
- font_desc = gtk_widget_get_style (widget)->font_desc;
- pango_context = gtk_widget_get_pango_context (widget);
- font_metrics = pango_context_get_metrics (pango_context, font_desc,
- pango_context_get_language (pango_context));
- layout = pango_layout_new (pango_context);
-
- /* Calculate the widths of the hour strings in the style's font. */
- max_hour_width = 0;
- for (hour = 0; hour < 24; hour++) {
- if (calendar_config_get_24_hour_format ())
- pango_layout_set_text (layout, EMeetingTimeSelectorHours [hour], -1);
- else
- pango_layout_set_text (layout, EMeetingTimeSelectorHours12 [hour], -1);
-
- pango_layout_get_pixel_size (layout, &mts->hour_widths [hour], NULL);
- max_hour_width = MAX (max_hour_width, mts->hour_widths[hour]);
- }
-
- pango_layout_get_pixel_size (layout, NULL, &mts->row_height);
- mts->col_width = max_hour_width + 6;
-
- 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_set_usize (mts->display_top, -1, mts->row_height * 3 + 4);
-
- /* Calculate header height */
- if (GTK_WIDGET_REALIZED (mts->list_view)) {
- path = gtk_tree_path_new ();
- gtk_tree_path_append_index (path, 0);
- gtk_tree_view_get_cell_area (GTK_TREE_VIEW (mts->list_view), path, NULL, &cell_area);
- gtk_tree_path_free (path);
- maxheight = cell_area.y;
- } else
- maxheight = 10;
-
- gtk_widget_set_usize (mts->attendees_vbox_spacer, 1, mts->row_height * 3 - maxheight);
-
- GTK_LAYOUT (mts->display_main)->hadjustment->step_increment = mts->col_width;
- GTK_LAYOUT (mts->display_main)->vadjustment->step_increment = mts->row_height;
-
- g_object_unref (layout);
- pango_font_metrics_unref (font_metrics);
-}
-
-/* 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_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 = gtk_tree_view_get_vadjustment (GTK_TREE_VIEW (mts->list_view));
- 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 EDateEdit widgets. */
- e_meeting_time_selector_update_start_date_edit (mts);
- e_meeting_time_selector_update_end_date_edit (mts);
-
- gtk_signal_emit (GTK_OBJECT (mts), mts_signals [CHANGED]);
-
- return TRUE;
-}
-
-void
-e_meeting_time_selector_set_all_day (EMeetingTimeSelector *mts,
- gboolean all_day)
-{
- EMeetingTime saved_time;
-
- mts->all_day = all_day;
-
- e_date_edit_set_show_time (E_DATE_EDIT (mts->start_date_edit),
- !all_day);
- e_date_edit_set_show_time (E_DATE_EDIT (mts->end_date_edit),
- !all_day);
-
- 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_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;
-
- /* Make sure we always show atleast an hour */
- if (day_start_hour * 60 + day_start_minute + 60 < day_end_hour * 60 + day_end_minute) {
- mts->day_end_hour = day_end_hour;
- mts->day_end_minute = day_end_minute;
- } else {
- mts->day_end_hour = day_start_hour + 1;
- mts->day_end_minute = day_start_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);
-}
-
-static void
-e_meeting_time_selector_refresh_cb (gpointer data)
-{
- EMeetingTimeSelector *mts = data;
-
- if (mts->display_top != NULL)
- gtk_widget_queue_draw (mts->display_top);
- if (mts->display_main != NULL)
- gtk_widget_queue_draw (mts->display_main);
-
- gtk_object_unref (GTK_OBJECT (mts));
-}
-
-static void
-e_meeting_time_selector_refresh_free_busy (EMeetingTimeSelector *mts, int row, gboolean all)
-{
- EMeetingTime start, end;
-
- start = mts->meeting_start_time;
- g_date_subtract_days (&start.date, E_MEETING_TIME_SELECTOR_FB_DAYS_BEFORE);
- start.hour = 0;
- start.minute = 0;
- end = mts->meeting_end_time;
- g_date_add_days (&end.date, E_MEETING_TIME_SELECTOR_FB_DAYS_AFTER);
- end.hour = 0;
- end.minute = 0;
-
- /* Ref ourselves in case we are called back after destruction,
- * we can do this because we will get a call back even after
- * an error */
- /* FIXME We should really have a mechanism to unqueue the
- * notification */
- if (all) {
- int i;
-
- for (i = 0; i < e_meeting_store_count_actual_attendees (mts->model); i++)
- gtk_object_ref (GTK_OBJECT (mts));
- } else {
- gtk_object_ref (GTK_OBJECT (mts));
- }
-
- if (all)
- e_meeting_store_refresh_all_busy_periods (mts->model, &start, &end,
- e_meeting_time_selector_refresh_cb, mts);
- else
- e_meeting_store_refresh_busy_periods (mts->model, row, &start, &end,
- e_meeting_time_selector_refresh_cb, mts);
-}
-
-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
-
-/*
- * 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 gboolean
-e_meeting_time_selector_on_invite_others_button_expose (GtkWidget *button,
- GdkEventExpose *event,
- EMeetingTimeSelector *mts)
-{
- gboolean click_to_add = TRUE;
-
- gtk_widget_set_sensitive (button, click_to_add);
- return FALSE;
-}
-
-static void
-e_meeting_time_selector_on_invite_others_button_clicked (GtkWidget *button,
- EMeetingTimeSelector *mts)
-{
- e_meeting_list_view_invite_others_dialog (mts->list_view);
-}
-
-
-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,
- gboolean *push_in,
- 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);
- *x += mts->options_button->allocation.x;
- *y += mts->options_button->allocation.y + mts->options_button->allocation.height / 2 - 2;
-
- /* 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_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_time_selector_refresh_free_busy (mts, 0, TRUE);
-}
-
-
-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,
- gboolean *push_in,
- 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);
- *x += mts->autopick_button->allocation.x;
- *y += mts->autopick_button->allocation.y + mts->autopick_button->allocation.height / 2 - 2;
-
- /* 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_store_count_actual_attendees (mts->model); row++) {
- attendee = e_meeting_store_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_compare_times (resource_free, &period->end) > 0)
- resource_free = &period->end;
- } else {
- if (!resource_free || e_meeting_time_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 EDateEdit widgets. */
- e_meeting_time_selector_update_start_date_edit (mts);
- e_meeting_time_selector_update_end_date_edit (mts);
-
- gtk_signal_emit (GTK_OBJECT (mts), mts_signals [CHANGED]);
-
- 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->all_day) {
- if (mts->zoomed_out) {
- start_time->hour++;
- start_time->minute = 0;
- } else {
- start_time->minute += 30;
- start_time->minute -= start_time->minute % 30;
- }
- } else {
- g_date_add_days (&start_time->date, 1);
- start_time->hour = 0;
- start_time->minute = 0;
- }
- 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;
-
- if (!mts->all_day) {
- 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;
- } else {
- g_date_subtract_days (&start_time->date, 1);
- start_time->hour = 0;
- start_time->minute = 0;
- }
-
- *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_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_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);
- e_meeting_time_selector_ensure_meeting_time_shown (mts);
-}
-
-
-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);
- e_meeting_time_selector_ensure_meeting_time_shown (mts);
-}
-
-
-/* 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];
- PangoFontDescription *font_desc;
- PangoContext *pango_context;
- PangoLayout *layout;
-
- /* Set up Pango prerequisites */
- font_desc = gtk_widget_get_style (GTK_WIDGET (mts))->font_desc;
- pango_context = gtk_widget_get_pango_context (GTK_WIDGET (mts));
- layout = pango_layout_new (pango_context);
-
- /* 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);
- pango_layout_set_text (layout, buffer, -1);
- pango_layout_get_pixel_size (layout, &width, NULL);
- 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);
- pango_layout_set_text (layout, buffer, -1);
- pango_layout_get_pixel_size (layout, &width, NULL);
- 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);
-
-#if 0
- g_print ("longest_month: %i longest_weekday: %i date: %s\n",
- longest_month, longest_weekday, buffer);
-#endif
-
- pango_layout_set_text (layout, buffer, -1);
- pango_layout_get_pixel_size (layout, &width, NULL);
- if (width < 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);
- pango_layout_set_text (layout, buffer, -1);
- pango_layout_get_pixel_size (layout, &width, NULL);
- 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);
-
-#if 0
- g_print ("longest_month: %i longest_weekday: %i date: %s\n",
- longest_month, longest_weekday, buffer);
-#endif
-
- pango_layout_set_text (layout, buffer, -1);
- pango_layout_get_pixel_size (layout, &width, NULL);
- if (width < max_date_width)
- mts->date_format = E_MEETING_TIME_SELECTOR_DATE_ABBREVIATED_DAY;
- else
- mts->date_format = E_MEETING_TIME_SELECTOR_DATE_SHORT;
-
- g_object_unref (layout);
-}
-
-
-/* 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;
- gint hour = 0, minute = 0;
- time_t newtime;
-
- /* Date */
- newtime = e_date_edit_get_time (E_DATE_EDIT (mts->start_date_edit));
- g_date_clear (&mtstime.date, 1);
- g_date_set_time (&mtstime.date, newtime);
-
- /* Time */
- e_date_edit_get_time_of_day (E_DATE_EDIT (mts->start_date_edit), &hour, &minute);
- mtstime.hour = hour;
- mtstime.minute = minute;
-
- /* If the time hasn't changed, just return. */
- if (e_meeting_time_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);
-
- gtk_signal_emit (GTK_OBJECT (mts), mts_signals [CHANGED]);
-}
-
-
-/* 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;
- gint hour = 0, minute = 0;
- time_t newtime;
-
- /* Date */
- newtime = e_date_edit_get_time (E_DATE_EDIT (mts->end_date_edit));
- g_date_clear (&mtstime.date, 1);
- g_date_set_time (&mtstime.date, newtime);
- if (mts->all_day)
- g_date_add_days (&mtstime.date, 1);
-
- /* Time */
- e_date_edit_get_time_of_day (E_DATE_EDIT (mts->end_date_edit), &hour, &minute);
- mtstime.hour = hour;
- mtstime.minute = minute;
-
- /* If the time hasn't changed, just return. */
- if (e_meeting_time_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_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;
- if (mts->all_day)
- g_date_subtract_days (&mts->meeting_start_time.date, 1);
- 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);
-
- gtk_signal_emit (GTK_OBJECT (mts), mts_signals [CHANGED]);
-}
-
-
-/* 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_store_count_actual_attendees (mts->model) + 2);
- 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->all_day) {
- 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;
- }
- } else {
- if (first_time.hour > 0 || first_time.minute > 0)
- g_date_add_days (&first_time.date, 1);
- first_time.hour = 0;
- first_time.minute = 0;
- last_time.hour = 0;
- last_time.minute = 0;
- }
- 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->all_day) {
- 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;
- }
- } else {
- if (drag_time.hour > 12)
- g_date_add_days (&drag_time.date, 1);
- drag_time.hour = 0;
- drag_time.minute = 0;
- }
- e_meeting_time_selector_fix_time_overflows (&drag_time);
-
- /* Now make sure we are between first_time & last_time. */
- if (e_meeting_time_compare_times (&drag_time, &first_time) < 0)
- drag_time = first_time;
- if (e_meeting_time_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_compare_times (time_to_set, &drag_time) == 0)
- return;
-
- /* Don't let an empty occur for all day events */
- if (mts->all_day
- && mts->dragging_position == E_MEETING_TIME_SELECTOR_POS_START
- && e_meeting_time_compare_times (&mts->meeting_end_time, &drag_time) == 0)
- return;
- else if (mts->all_day
- && mts->dragging_position == E_MEETING_TIME_SELECTOR_POS_END
- && e_meeting_time_compare_times (&mts->meeting_start_time, &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_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);
-
- if (set_both_times
- || mts->dragging_position == E_MEETING_TIME_SELECTOR_POS_END
- || mts->dragging_position == E_MEETING_TIME_SELECTOR_POS_START)
- gtk_signal_emit (GTK_OBJECT (mts), mts_signals [CHANGED]);
-}
-
-
-/* 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->all_day) {
- if (mts->zoomed_out) {
- drag_time.minute = 0;
- } else {
- drag_time.minute -= drag_time.minute % 30;
- }
- } else {
- drag_time.hour = 0;
- drag_time.minute = 0;
- }
- } else {
- e_meeting_time_selector_calculate_time (mts, scroll_x,
- &drag_time);
- if (!mts->all_day) {
- 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;
- }
- } else {
- if (drag_time.hour > 0 || drag_time.minute > 0)
- g_date_add_days (&drag_time.date, 1);
- drag_time.hour = 0;
- drag_time.minute = 0;
- }
- }
- 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_compare_times (time_to_set, &drag_time) == 0) {
- GDK_THREADS_LEAVE ();
- goto scroll;
- }
-
- /* Don't let an empty occur for all day events */
- if (mts->all_day
- && mts->dragging_position == E_MEETING_TIME_SELECTOR_POS_START
- && e_meeting_time_compare_times (&mts->meeting_end_time, &drag_time) == 0)
- goto scroll;
- else if (mts->all_day
- && mts->dragging_position == E_MEETING_TIME_SELECTOR_POS_END
- && e_meeting_time_compare_times (&mts->meeting_start_time, &drag_time) == 0)
- goto scroll;
-
- *time_to_set = drag_time;
-
- /* Check if the start time and end time need to be switched. */
- if (e_meeting_time_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);
-
- if (set_both_times
- || mts->dragging_position == E_MEETING_TIME_SELECTOR_POS_END
- || mts->dragging_position == E_MEETING_TIME_SELECTOR_POS_START)
- gtk_signal_emit (GTK_OBJECT (mts), mts_signals [CHANGED]);
-
- scroll:
- /* 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)
-{
- e_date_edit_set_date_and_time_of_day (E_DATE_EDIT (mts->start_date_edit),
- g_date_year (&mts->meeting_start_time.date),
- g_date_month (&mts->meeting_start_time.date),
- g_date_day (&mts->meeting_start_time.date),
- mts->meeting_start_time.hour,
- mts->meeting_start_time.minute);
-}
-
-
-/* This updates the GnomeDateEdit widget displaying the meeting end time. */
-static void
-e_meeting_time_selector_update_end_date_edit (EMeetingTimeSelector *mts)
-{
- GDate date;
-
- date = mts->meeting_end_time.date;
- if (mts->all_day)
- g_date_subtract_days (&date, 1);
-
- e_date_edit_set_date_and_time_of_day (E_DATE_EDIT (mts->end_date_edit),
- g_date_year (&date),
- g_date_month (&date),
- g_date_day (&date),
- mts->meeting_end_time.hour,
- mts->meeting_end_time.minute);
-}
-
-
-/* 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,
- E_MEETING_TIME_SELECTOR_DAYS_START_BEFORE);
-
- 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_inserted_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
-{
- EMeetingTimeSelector *mts = E_MEETING_TIME_SELECTOR (data);
- int row = gtk_tree_path_get_indices (path) [0];
- /* 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);
-
- /* Get the latest free/busy info */
- e_meeting_time_selector_refresh_free_busy (mts, row, FALSE);
-}
-
-static void
-row_changed_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
-{
- EMeetingTimeSelector *mts = E_MEETING_TIME_SELECTOR (data);
- int row = gtk_tree_path_get_indices (path) [0];
-
- /* Get the latest free/busy info */
- e_meeting_time_selector_refresh_free_busy (mts, row, FALSE);
-}
-
-static void
-row_deleted_cb (GtkTreeModel *model, GtkTreePath *path, 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);
-}
-
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 ee23dbe672..0000000000
--- a/calendar/gui/e-meeting-time-sel.h
+++ /dev/null
@@ -1,379 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 <libgnomecanvas/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-store.h"
-#include "e-meeting-list-view.h"
-
-G_BEGIN_DECLS
-
-/*
- * 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 for 24 hour time, "0:00" .. "23:00". */
-extern const gchar *EMeetingTimeSelectorHours[24];
-/* An array of hour strings for 12 hour time, "12:00am" .. "11:00pm". */
-extern const gchar *EMeetingTimeSelectorHours12[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;
- GtkWidget *attendees_vbox_spacer;
-
- /* The etable and model */
- EMeetingStore *model;
- EMeetingListView *list_view;
-
- /* 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 EDateEdit widgets for the meeting start & end times. */
- GtkWidget *start_date_edit;
- GtkWidget *end_date_edit;
-
- /* Colors. */
- 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.
- */
-
- /* True if we are selecting all day events */
- gboolean all_day;
-
- /* 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;
-
- void (* changed) (EMeetingTimeSelector *mts);
-};
-
-
-/*
- * 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 (EMeetingStore *ems);
-void e_meeting_time_selector_construct (EMeetingTimeSelector * mts, EMeetingStore *ems);
-
-/* 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_all_day (EMeetingTimeSelector *mts,
- gboolean all_day);
-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 */
-
-G_END_DECLS
-
-#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 ab330a6d40..0000000000
--- a/calendar/gui/e-meeting-types.h
+++ /dev/null
@@ -1,78 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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-meeting-utils.c b/calendar/gui/e-meeting-utils.c
deleted file mode 100644
index 496bb8ebaa..0000000000
--- a/calendar/gui/e-meeting-utils.c
+++ /dev/null
@@ -1,52 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 "e-meeting-utils.h"
-
-gint
-e_meeting_time_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;
-}
diff --git a/calendar/gui/e-meeting-utils.h b/calendar/gui/e-meeting-utils.h
deleted file mode 100644
index 4c2798fcf0..0000000000
--- a/calendar/gui/e-meeting-utils.h
+++ /dev/null
@@ -1,49 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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_UTILS_H_
-#define _E_MEETING_UTILS_H_
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <glib.h>
-#include "e-meeting-types.h"
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-
-
-gint e_meeting_time_compare_times (EMeetingTime *time1,
- EMeetingTime *time2);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _E_MEETING_UTILS_H_ */
-
-
diff --git a/calendar/gui/e-mini-calendar-config.c b/calendar/gui/e-mini-calendar-config.c
deleted file mode 100644
index 2f17b23beb..0000000000
--- a/calendar/gui/e-mini-calendar-config.c
+++ /dev/null
@@ -1,247 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
- * JP Rosevear <jpr@ximian.com>
- *
- * Copyright 2003, Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 "calendar-config.h"
-#include "e-mini-calendar-config.h"
-
-struct _EMiniCalendarConfigPrivate {
- ECalendar *mini_cal;
-
- GList *notifications;
-};
-
-static GObjectClass *parent_class = NULL;
-
-/* Property IDs */
-enum props {
- PROP_0,
- PROP_CALENDAR
-};
-
-static void
-e_mini_calendar_config_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
-{
- EMiniCalendarConfig *mini_config;
- EMiniCalendarConfigPrivate *priv;
-
- mini_config = E_MINI_CALENDAR_CONFIG (object);
- priv = mini_config->priv;
-
- switch (property_id) {
- case PROP_CALENDAR:
- e_mini_calendar_config_set_calendar (mini_config, g_value_get_object (value));
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- break;
- }
-}
-
-static void
-e_mini_calendar_config_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
-{
- EMiniCalendarConfig *mini_config;
- EMiniCalendarConfigPrivate *priv;
-
- mini_config = E_MINI_CALENDAR_CONFIG (object);
- priv = mini_config->priv;
-
- switch (property_id) {
- case PROP_CALENDAR:
- g_value_set_object (value, e_mini_calendar_config_get_calendar (mini_config));
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- break;
- }
-}
-
-static void
-e_mini_calendar_config_dispose (GObject *object)
-{
- EMiniCalendarConfig *mini_config = E_MINI_CALENDAR_CONFIG (object);
- EMiniCalendarConfigPrivate *priv;
-
- priv = mini_config->priv;
-
- e_mini_calendar_config_set_calendar (mini_config, NULL);
-
- if (G_OBJECT_CLASS (parent_class)->dispose)
- G_OBJECT_CLASS (parent_class)->dispose (object);
-}
-
-static void
-e_mini_calendar_config_finalize (GObject *object)
-{
- EMiniCalendarConfig *mini_config = E_MINI_CALENDAR_CONFIG (object);
- EMiniCalendarConfigPrivate *priv;
-
- priv = mini_config->priv;
-
- g_free (priv);
-
- if (G_OBJECT_CLASS (parent_class)->finalize)
- G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-static void
-e_mini_calendar_config_class_init (EMiniCalendarConfigClass *klass)
-{
- GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- GParamSpec *spec;
-
- parent_class = g_type_class_peek_parent (klass);
-
- /* Method override */
- gobject_class->set_property = e_mini_calendar_config_set_property;
- gobject_class->get_property = e_mini_calendar_config_get_property;
- gobject_class->dispose = e_mini_calendar_config_dispose;
- gobject_class->finalize = e_mini_calendar_config_finalize;
-
- spec = g_param_spec_object ("calendar", NULL, NULL, e_calendar_get_type (),
- G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT);
- g_object_class_install_property (gobject_class, PROP_CALENDAR, spec);
-}
-
-static void
-e_mini_calendar_config_init (EMiniCalendarConfig *mini_config, EMiniCalendarConfigClass *klass)
-{
- mini_config->priv = g_new0 (EMiniCalendarConfigPrivate, 1);
-
-}
-
-E_MAKE_TYPE (e_mini_calendar_config, "EMiniCalendarConfig", EMiniCalendarConfig, e_mini_calendar_config_class_init,
- e_mini_calendar_config_init, G_TYPE_OBJECT);
-
-EMiniCalendarConfig *
-e_mini_calendar_config_new (ECalendar *mini_cal)
-{
- EMiniCalendarConfig *mini_config;
-
- mini_config = g_object_new (e_mini_calendar_config_get_type (), "calendar", mini_cal, NULL);
-
- return mini_config;
-}
-
-ECalendar *
-e_mini_calendar_config_get_calendar (EMiniCalendarConfig *mini_config)
-{
- EMiniCalendarConfigPrivate *priv;
-
- g_return_val_if_fail (mini_config != NULL, NULL);
- g_return_val_if_fail (E_IS_MINI_CALENDAR_CONFIG (mini_config), NULL);
-
- priv = mini_config->priv;
-
- return priv->mini_cal;
-}
-
-static void
-set_week_start (ECalendar *mini_cal)
-{
- int week_start_day;
-
- 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 (mini_cal->calitem),
- "week_start_day", week_start_day,
- NULL);
-}
-
-static void
-week_start_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- EMiniCalendarConfig *mini_config = data;
- EMiniCalendarConfigPrivate *priv;
-
- priv = mini_config->priv;
-
- set_week_start (priv->mini_cal);
-}
-
-static void
-set_dnav_show_week_no (ECalendar *mini_cal)
-{
- gboolean show_week_no;
-
- show_week_no = calendar_config_get_dnav_show_week_no ();
-
- gnome_canvas_item_set (GNOME_CANVAS_ITEM (mini_cal->calitem),
- "show_week_numbers", show_week_no,
- NULL);
-}
-
-static void
-dnav_show_week_no_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- EMiniCalendarConfig *mini_config = data;
- EMiniCalendarConfigPrivate *priv;
-
- priv = mini_config->priv;
-
- set_dnav_show_week_no (priv->mini_cal);
-}
-
-void
-e_mini_calendar_config_set_calendar (EMiniCalendarConfig *mini_config, ECalendar *mini_cal)
-{
- EMiniCalendarConfigPrivate *priv;
- guint not;
- GList *l;
-
- g_return_if_fail (mini_config != NULL);
- g_return_if_fail (E_IS_MINI_CALENDAR_CONFIG (mini_config));
-
- priv = mini_config->priv;
-
- if (priv->mini_cal) {
- g_object_unref (priv->mini_cal);
- priv->mini_cal = NULL;
- }
-
- for (l = priv->notifications; l; l = l->next)
- calendar_config_remove_notification (GPOINTER_TO_UINT (l->data));
-
- g_list_free (priv->notifications);
- priv->notifications = NULL;
-
- /* If the new view is NULL, return right now */
- if (!mini_cal)
- return;
-
- priv->mini_cal = g_object_ref (mini_cal);
-
- /* Week start */
- set_week_start (mini_cal);
-
- not = calendar_config_add_notification_week_start_day (week_start_changed_cb, mini_config);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
- /* Show week numbers */
- set_dnav_show_week_no (mini_cal);
-
- not = calendar_config_add_notification_dnav_show_week_no (dnav_show_week_no_changed_cb, mini_config);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-}
diff --git a/calendar/gui/e-mini-calendar-config.h b/calendar/gui/e-mini-calendar-config.h
deleted file mode 100644
index 78b9cfd363..0000000000
--- a/calendar/gui/e-mini-calendar-config.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
- * JP Rosevear <jpr@ximian.com>
- *
- * Copyright 2003, Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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_MINI_CALENDAR_CONFIG_H_
-#define _E_MINI_CALENDAR_CONFIG_H_
-
-#include <widgets/misc/e-calendar.h>
-
-G_BEGIN_DECLS
-
-#define E_MINI_CALENDAR_CONFIG(obj) GTK_CHECK_CAST (obj, e_mini_calendar_config_get_type (), EMiniCalendarConfig)
-#define E_MINI_CALENDAR_CONFIG_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, e_mini_calendar_config_get_type (), EMiniCalendarConfigClass)
-#define E_IS_MINI_CALENDAR_CONFIG(obj) GTK_CHECK_TYPE (obj, e_mini_calendar_config_get_type ())
-
-typedef struct _EMiniCalendarConfig EMiniCalendarConfig;
-typedef struct _EMiniCalendarConfigClass EMiniCalendarConfigClass;
-typedef struct _EMiniCalendarConfigPrivate EMiniCalendarConfigPrivate;
-
-struct _EMiniCalendarConfig {
- GObject parent;
-
- EMiniCalendarConfigPrivate *priv;
-};
-
-struct _EMiniCalendarConfigClass {
- GObjectClass parent_class;
-};
-
-GType e_mini_calendar_config_get_type (void);
-EMiniCalendarConfig *e_mini_calendar_config_new (ECalendar *mini_cal);
-ECalendar *e_mini_calendar_config_get_calendar (EMiniCalendarConfig *mini_config);
-void e_mini_calendar_config_set_calendar (EMiniCalendarConfig *mini_config, ECalendar *mini_cal);
-
-G_END_DECLS
-
-#endif
diff --git a/calendar/gui/e-select-names-editable.c b/calendar/gui/e-select-names-editable.c
deleted file mode 100644
index cf2cd1d661..0000000000
--- a/calendar/gui/e-select-names-editable.c
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- * e-select-names-editable.c
- *
- * Author: Mike Kestner <mkestner@ximian.com>
- *
- * Copyright (C) 2003 Ximian Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <gdk/gdkkeysyms.h>
-#include <gtk/gtkcelleditable.h>
-#include <bonobo/bonobo-exception.h>
-#include <bonobo/bonobo-widget.h>
-#include <addressbook/util/eab-destination.h>
-
-#include "e-select-names-editable.h"
-#include "Evolution-Addressbook-SelectNames.h"
-
-#define SELECT_NAMES_OAFIID "OAFIID:GNOME_Evolution_Addressbook_SelectNames:" BASE_VERSION
-
-struct _ESelectNamesEditablePriv {
- GNOME_Evolution_Addressbook_SelectNames select_names;
- Bonobo_Control control;
- Bonobo_PropertyBag bag;
-};
-
-static BonoboWidgetClass *parent_class;
-
-static void
-esne_start_editing (GtkCellEditable *cell_editable, GdkEvent *event)
-{
- ESelectNamesEditable *esne = E_SELECT_NAMES_EDITABLE (cell_editable);
-
-}
-
-static void
-esne_cell_editable_init (GtkCellEditableIface *iface)
-{
- iface->start_editing = esne_start_editing;
-}
-
-static void
-esne_finalize (GObject *obj)
-{
- ESelectNamesEditable *esne = (ESelectNamesEditable *) obj;
-
- if (esne->priv->select_names != CORBA_OBJECT_NIL)
- bonobo_object_release_unref (esne->priv->select_names, NULL);
- esne->priv->select_names = CORBA_OBJECT_NIL;
-
- if (esne->priv->bag != CORBA_OBJECT_NIL)
- bonobo_object_release_unref (esne->priv->bag, NULL);
- esne->priv->bag = CORBA_OBJECT_NIL;
-
- g_free (esne->priv);
-
- if (G_OBJECT_CLASS (parent_class)->finalize)
- G_OBJECT_CLASS (parent_class)->finalize (obj);
-}
-
-static void
-esne_init (ESelectNamesEditable *esne)
-{
- esne->priv = g_new0 (ESelectNamesEditablePriv, 1);
-
- esne->priv->select_names = CORBA_OBJECT_NIL;
- esne->priv->control = CORBA_OBJECT_NIL;
- esne->priv->bag = CORBA_OBJECT_NIL;
-}
-
-static void
-esne_class_init (GObjectClass *klass)
-{
- klass->finalize = esne_finalize;
-
- parent_class = BONOBO_WIDGET_CLASS (g_type_class_peek_parent (klass));
-}
-
-GType
-e_select_names_editable_get_type (void)
-{
- static GType esne_type = 0;
-
- if (!esne_type) {
- static const GTypeInfo esne_info = {
- sizeof (ESelectNamesEditableClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) esne_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (ESelectNamesEditable),
- 0, /* n_preallocs */
- (GInstanceInitFunc) esne_init,
- };
-
- static const GInterfaceInfo cell_editable_info = {
- (GInterfaceInitFunc) esne_cell_editable_init,
- NULL,
- NULL
- };
-
- esne_type = g_type_register_static (BONOBO_TYPE_WIDGET, "ESelectNamesEditable", &esne_info, 0);
-
- g_type_add_interface_static (esne_type, GTK_TYPE_CELL_EDITABLE, &cell_editable_info);
- }
-
- return esne_type;
-}
-
-static void
-entry_activate (BonoboListener *listener, const char *event_name, const CORBA_any *arg, CORBA_Environment *ev, gpointer esne)
-{
- gtk_cell_editable_editing_done (GTK_CELL_EDITABLE (esne));
- gtk_cell_editable_remove_widget (GTK_CELL_EDITABLE (esne));
-}
-
-ESelectNamesEditable *
-e_select_names_editable_construct (ESelectNamesEditable *esne)
-{
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
-
- esne->priv->select_names = bonobo_activation_activate_from_id (SELECT_NAMES_OAFIID, 0, NULL, &ev);
- if (BONOBO_EX (&ev)) {
- CORBA_exception_free (&ev);
- return NULL;
- }
-
- GNOME_Evolution_Addressbook_SelectNames_addSection (esne->priv->select_names, "A", "A", &ev);
- if (BONOBO_EX (&ev)) {
- CORBA_exception_free (&ev);
- return NULL;
- }
-
- esne->priv->control = GNOME_Evolution_Addressbook_SelectNames_getEntryBySection (
- esne->priv->select_names, "A", &ev);
- if (BONOBO_EX (&ev)) {
- CORBA_exception_free (&ev);
- return NULL;
- }
-
- bonobo_widget_construct_control_from_objref (BONOBO_WIDGET (esne), esne->priv->control, CORBA_OBJECT_NIL, &ev);
-
- CORBA_exception_free (&ev);
-
- esne->priv->bag = bonobo_control_frame_get_control_property_bag (
- bonobo_widget_get_control_frame (BONOBO_WIDGET (esne)), NULL);
- bonobo_event_source_client_add_listener (esne->priv->bag, entry_activate,
- "GNOME/Evolution/Addressbook/SelectNames:activate:entry",
- NULL, esne);
-
- return esne;
-}
-
-ESelectNamesEditable *
-e_select_names_editable_new ()
-{
- ESelectNamesEditable *esne = g_object_new (E_TYPE_SELECT_NAMES_EDITABLE, NULL);
-
- if (!esne)
- return NULL;
-
- if (!e_select_names_editable_construct (esne)) {
- g_object_unref (esne);
- return NULL;
- }
-
- return esne;
-}
-
-gchar *
-e_select_names_editable_get_address (ESelectNamesEditable *esne)
-{
- EABDestination **dest;
- gchar *dest_str;
- gchar *result;
-
- g_return_val_if_fail (E_SELECT_NAMES_EDITABLE (esne), NULL);
-
- dest_str = bonobo_pbclient_get_string (esne->priv->bag, "destinations", NULL);
- dest = eab_destination_importv (dest_str);
- result = g_strdup (eab_destination_get_email (*dest));
- eab_destination_freev (dest);
-
- return result;
-}
-
-gchar *
-e_select_names_editable_get_name (ESelectNamesEditable *esne)
-{
- EABDestination **dest;
- gchar *dest_str;
- gchar *result;
-
- g_return_val_if_fail (E_SELECT_NAMES_EDITABLE (esne), NULL);
-
- dest_str = bonobo_pbclient_get_string (esne->priv->bag, "destinations", NULL);
- dest = eab_destination_importv (dest_str);
- result = g_strdup (eab_destination_get_name (*dest));
- eab_destination_freev (dest);
-
- return result;
-}
-
-void
-e_select_names_editable_set_address (ESelectNamesEditable *esne, const gchar *text)
-{
- g_return_if_fail (E_IS_SELECT_NAMES_EDITABLE (esne));
-
- bonobo_pbclient_set_string (esne->priv->bag, "addresses", text, NULL);
-}
-
diff --git a/calendar/gui/e-select-names-editable.h b/calendar/gui/e-select-names-editable.h
deleted file mode 100644
index 867118fe9e..0000000000
--- a/calendar/gui/e-select-names-editable.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * e-select-names-editable.h
- *
- * Author: Mike Kestner <mkestner@ximian.com>
- *
- * Copyright (C) 2003 Ximian Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_EDITABLE_H__
-#define __E_SELECT_NAMES_EDITABLE_H__
-
-#include <bonobo/bonobo-widget.h>
-
-G_BEGIN_DECLS
-
-#define E_TYPE_SELECT_NAMES_EDITABLE (e_select_names_editable_get_type ())
-#define E_SELECT_NAMES_EDITABLE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_TYPE_SELECT_NAMES_EDITABLE, ESelectNamesEditable))
-#define E_SELECT_NAMES_EDITABLE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), E_TYPE_SELECT_NAMES_EDITABLE, ESelectNamesEditableClass))
-#define E_IS_SELECT_NAMES_EDITABLE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_TYPE_SELECT_NAMES_EDITABLE))
-#define E_IS_SELECT_NAMES_EDITABLE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((o), E_TYPE_SELECT_NAMES_EDITABLE))
-#define E_SELECT_NAMES_EDITABLE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), E_TYPE_SELECT_NAMES_EDITABLE, ESelectNamesEditableClass))
-
-typedef struct _ESelectNamesEditable ESelectNamesEditable;
-typedef struct _ESelectNamesEditableClass ESelectNamesEditableClass;
-typedef struct _ESelectNamesEditablePriv ESelectNamesEditablePriv;
-
-struct _ESelectNamesEditable
-{
- BonoboWidget parent;
-
- ESelectNamesEditablePriv *priv;
-};
-
-struct _ESelectNamesEditableClass
-{
- BonoboWidgetClass parent_class;
-};
-
-GType e_select_names_editable_get_type (void);
-
-ESelectNamesEditable *e_select_names_editable_construct (ESelectNamesEditable *esne);
-ESelectNamesEditable *e_select_names_editable_new (void);
-
-gchar *e_select_names_editable_get_address (ESelectNamesEditable *esne);
-void e_select_names_editable_set_address (ESelectNamesEditable *esne, const gchar *text);
-
-gchar *e_select_names_editable_get_name (ESelectNamesEditable *esne);
-G_END_DECLS
-
-#endif /* __E_SELECT_NAMES_EDITABLE_H__ */
diff --git a/calendar/gui/e-select-names-renderer.c b/calendar/gui/e-select-names-renderer.c
deleted file mode 100644
index fbda387d23..0000000000
--- a/calendar/gui/e-select-names-renderer.c
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * e-select-names-renderer.c
- *
- * Author: Mike Kestner <mkestner@ximian.com>
- *
- * Copyright (C) 2003 Ximian Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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/gtkcellrenderertext.h>
-#include <gal/util/e-util.h>
-
-#include "e-calendar-marshal.h"
-
-#include "e-select-names-editable.h"
-#include "e-select-names-renderer.h"
-
-
-struct _ESelectNamesRendererPriv {
- ESelectNamesEditable *editable;
- gchar *path;
- gchar *address;
-};
-
-enum {
- PROP_0,
- PROP_ADDRESS
-};
-
-enum {
- CELL_EDITED,
- LAST_SIGNAL
-};
-
-static GtkCellRendererTextClass *parent_class;
-static gint signals [LAST_SIGNAL];
-
-static void
-esnr_editing_done (GtkCellEditable *editable, ESelectNamesRenderer *cell)
-{
- gchar *new_address, *new_name;
-
- new_address = e_select_names_editable_get_address (E_SELECT_NAMES_EDITABLE (editable));
- new_name = e_select_names_editable_get_name (E_SELECT_NAMES_EDITABLE (editable));
-
- g_signal_emit (cell, signals [CELL_EDITED], 0, cell->priv->path, new_address, new_name);
- g_free (new_address);
- g_free (new_name);
- g_free (cell->priv->path);
- cell->priv->path = NULL;
-}
-
-static GtkCellEditable *
-esnr_start_editing (GtkCellRenderer *cell, GdkEvent *event, GtkWidget *widget, const gchar *path,
- GdkRectangle *bg_area, GdkRectangle *cell_area, GtkCellRendererState flags)
-{
- ESelectNamesRenderer *sn_cell = E_SELECT_NAMES_RENDERER (cell);
- GtkCellRendererText *text_cell = GTK_CELL_RENDERER_TEXT (cell);
- ESelectNamesEditable *editable;
-
- if (!text_cell->editable)
- return NULL;
-
- editable = E_SELECT_NAMES_EDITABLE (e_select_names_editable_new ());
- e_select_names_editable_set_address (editable, sn_cell->priv->address);
- gtk_widget_show (GTK_WIDGET (editable));
-
- g_signal_connect (editable, "editing-done", G_CALLBACK (esnr_editing_done), sn_cell);
-
- sn_cell->priv->editable = g_object_ref (editable);
- sn_cell->priv->path = g_strdup (path);
-
- return GTK_CELL_EDITABLE (editable);
-}
-
-static void
-esnr_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
-{
- ESelectNamesRenderer *esnr = E_SELECT_NAMES_RENDERER (object);
-
- switch (prop_id) {
- case PROP_ADDRESS:
- g_value_set_string (value, esnr->priv->address);
- break;
- default:
- break;
- }
-}
-
-static void
-esnr_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
-{
- ESelectNamesRenderer *esnr = E_SELECT_NAMES_RENDERER (object);
-
- switch (prop_id) {
- case PROP_ADDRESS:
- g_free (esnr->priv->address);
- esnr->priv->address = g_strdup (g_value_get_string (value));
- break;
- default:
- break;
- }
-}
-
-static void
-esnr_finalize (GObject *obj)
-{
- ESelectNamesRenderer *cell = (ESelectNamesRenderer *) obj;
-
- if (cell->priv->editable)
- g_object_unref (cell->priv->editable);
- cell->priv->editable = NULL;
-
- g_free (cell->priv->path);
- g_free (cell->priv->address);
- g_free (cell->priv);
-
- if (G_OBJECT_CLASS (parent_class)->finalize)
- G_OBJECT_CLASS (parent_class)->finalize (obj);
-}
-
-static void
-esnr_init (ESelectNamesRenderer *cell)
-{
- cell->priv = g_new0 (ESelectNamesRendererPriv, 1);
-}
-
-static void
-esnr_class_init (ESelectNamesRendererClass *class)
-{
- GtkCellRendererClass *cell_class = GTK_CELL_RENDERER_CLASS (class);
- GObjectClass *obj_class = G_OBJECT_CLASS (class);
-
- parent_class = GTK_CELL_RENDERER_TEXT_CLASS (g_type_class_peek_parent (class));
-
- obj_class->finalize = esnr_finalize;
- obj_class->get_property = esnr_get_property;
- obj_class->set_property = esnr_set_property;
-
- cell_class->start_editing = esnr_start_editing;
-
- g_object_class_install_property (obj_class, PROP_ADDRESS,
- g_param_spec_string ("address", "Address", "Email address.", NULL, G_PARAM_READWRITE));
-
- signals [CELL_EDITED] = g_signal_new ("cell_edited",
- G_OBJECT_CLASS_TYPE (obj_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ESelectNamesRendererClass, cell_edited),
- NULL, NULL,
- e_calendar_marshal_VOID__STRING_STRING_STRING,
- G_TYPE_NONE, 3,
- G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
-}
-
-E_MAKE_TYPE (e_select_names_renderer, "ESelectNamesRenderer", ESelectNamesRenderer, esnr_class_init, esnr_init, GTK_TYPE_CELL_RENDERER_TEXT)
-
-GtkCellRenderer *
-e_select_names_renderer_new (void)
-{
- return GTK_CELL_RENDERER (g_object_new (E_TYPE_SELECT_NAMES_RENDERER, NULL));
-}
-
diff --git a/calendar/gui/e-select-names-renderer.h b/calendar/gui/e-select-names-renderer.h
deleted file mode 100644
index fb045d928f..0000000000
--- a/calendar/gui/e-select-names-renderer.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * e-select-names-renderer.h
- *
- * Author: Mike Kestner <mkestner@ximian.com>
- *
- * Copyright (C) 2003 Ximian Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_RENDERER_H__
-#define __E_SELECT_NAMES_RENDERER_H__
-
-#include <gtk/gtkcellrenderertext.h>
-
-G_BEGIN_DECLS
-
-#define E_TYPE_SELECT_NAMES_RENDERER (e_select_names_renderer_get_type ())
-#define E_SELECT_NAMES_RENDERER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_TYPE_SELECT_NAMES_RENDERER, ESelectNamesRenderer))
-#define E_SELECT_NAMES_RENDERER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), E_TYPE_SELECT_NAMES_RENDERER, ESelectNamesRendererClass))
-#define E_IS_SELECT_NAMES_RENDERER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_TYPE_SELECT_NAMES_RENDERER))
-#define E_IS_SELECT_NAMES_RENDERER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((o), E_TYPE_SELECT_NAMES_RENDERER))
-#define E_SELECT_NAMES_RENDERER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), E_TYPE_SELECT_NAMES_RENDERER, ESelectNamesRendererClass))
-
-typedef struct _ESelectNamesRenderer ESelectNamesRenderer;
-typedef struct _ESelectNamesRendererClass ESelectNamesRendererClass;
-typedef struct _ESelectNamesRendererPriv ESelectNamesRendererPriv;
-
-struct _ESelectNamesRenderer
-{
- GtkCellRendererText parent;
-
- ESelectNamesRendererPriv *priv;
-};
-
-struct _ESelectNamesRendererClass
-{
- GtkCellRendererTextClass parent_class;
-
- void (* cell_edited) (ESelectNamesRenderer *renderer,
- const gchar *path,
- const gchar *address,
- const gchar *name);
-};
-
-GType e_select_names_renderer_get_type (void);
-GtkCellRenderer *e_select_names_renderer_new (void);
-
-G_END_DECLS
-
-#endif /* __E_SELECT_NAMES_RENDERER_H__ */
diff --git a/calendar/gui/e-tasks.c b/calendar/gui/e-tasks.c
deleted file mode 100644
index 936344de43..0000000000
--- a/calendar/gui/e-tasks.c
+++ /dev/null
@@ -1,1163 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-tasks.c
- *
- * Copyright (C) 2001-2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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>
- * Rodrigo Moya <rodrigo@ximian.com>
- */
-
-#include <config.h>
-#include <gnome.h>
-#include <libgnomevfs/gnome-vfs-ops.h>
-#include <gal/util/e-util.h>
-#include <gal/e-table/e-table-scrolled.h>
-#include <gal/menus/gal-view-instance.h>
-#include <gal/menus/gal-view-factory-etable.h>
-#include <gal/menus/gal-view-etable.h>
-#include <gtkhtml/gtkhtml.h>
-#include <gtkhtml/gtkhtml-stream.h>
-
-#include "e-util/e-categories-config.h"
-#include "e-util/e-time-utils.h"
-#include "e-util/e-url.h"
-#include <libecal/e-cal-time-util.h>
-#include "widgets/menus/gal-view-menus.h"
-#include "dialogs/delete-error.h"
-#include "dialogs/task-editor.h"
-#include "cal-search-bar.h"
-#include "calendar-config.h"
-#include "calendar-component.h"
-#include "comp-util.h"
-#include "e-calendar-table-config.h"
-#include "misc.h"
-
-#include "e-tasks.h"
-
-
-/* Private part of the GnomeCalendar structure */
-struct _ETasksPrivate {
- /* The task lists for display */
- GHashTable *clients;
- GList *clients_list;
-
- ECalView *query;
-
- /* The ECalendarTable showing the tasks. */
- GtkWidget *tasks_view;
- ECalendarTableConfig *tasks_view_config;
-
- /* Calendar search bar for tasks */
- GtkWidget *search_bar;
-
- /* The HTML widget to display the task's details */
- GtkWidget *html;
- gchar *current_uid;
-
- /* View instance and the view menus handler */
- GalViewInstance *view_instance;
- GalViewMenus *view_menus;
-
- GList *notifications;
-};
-
-
-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 (ECal *client, ECalendarStatus status, gpointer data);
-static void backend_error_cb (ECal *client, const char *message, gpointer data);
-
-/* 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)
-
-/* Converts a time_t to a string, relative to the specified timezone */
-static char *
-timet_to_str_with_zone (time_t t, icaltimezone *zone)
-{
- struct icaltimetype itt;
- struct tm tm;
- char buf[256];
-
- if (t == -1)
- return g_strdup (_("invalid time"));
-
- itt = icaltime_from_timet_with_zone (t, FALSE, zone);
- tm = icaltimetype_to_tm (&itt);
-
- e_time_format_date_and_time (&tm, calendar_config_get_24_hour_format (),
- FALSE, FALSE, buf, sizeof (buf));
- return g_strdup (buf);
-}
-
-static void
-write_html (GtkHTMLStream *stream, ECalComponent *comp)
-{
- ECalComponentText text;
- ECalComponentDateTime dt;
- gchar *buf, *str;
- icaltimezone *current_zone;
- GSList *l;
- icalproperty_status status;
- int *priority_value;
-
- g_return_if_fail (E_IS_CAL_COMPONENT (comp));
-
- str = calendar_config_get_timezone ();
- if (str && str[0]) {
- current_zone = icaltimezone_get_builtin_timezone (str);
- } else
- current_zone = icaltimezone_get_utc_timezone ();
-
- /* write document header */
- e_cal_component_get_summary (comp, &text);
- gtk_html_stream_printf (stream,
- "<HTML><BODY><H1>%s</H1>",
- text.value);
-
- /* write icons for the categories */
- e_cal_component_get_categories_list (comp, &l);
- if (l) {
- GSList *node;
-
- for (node = l; node != NULL; node = node->next) {
- const char *icon_file;
-
- icon_file = e_categories_config_get_icon_file_for ((const char *) node->data);
- if (icon_file) {
- gtk_html_stream_printf (stream, "<IMG ALT=\"%s\" SRC=\"file://%s\">",
- (const char *) node->data, icon_file);
- }
- }
-
- e_cal_component_free_categories_list (l);
- }
-
- /* write summary */
- gtk_html_stream_printf (stream,
- "<BR><BR><BR><TABLE BORDER=\"0\" WIDTH=\"80%%\">"
- "<TR><TD VALIGN=\"TOP\" ALIGN=\"RIGHT\" WIDTH=\"15%%\"><B>%s</B></TD><TD>%s</TD></TR>",
- _("Summary:"), text.value);
-
- /* write start date */
- e_cal_component_get_dtstart (comp, &dt);
- if (dt.value != NULL) {
- buf = timet_to_str_with_zone (icaltime_as_timet (*dt.value), current_zone);
- str = g_locale_to_utf8 (buf, -1, NULL, NULL, NULL);
-
- g_free (buf);
- } else
- str = g_strdup ("");
-
- gtk_html_stream_printf (stream, "<TR><TD VALIGN=\"TOP\" ALIGN=\"RIGHT\"><B>%s</B></TD><TD>%s</TD></TR>",
- _("Start Date:"), str);
-
- e_cal_component_free_datetime (&dt);
- g_free (str);
-
- /* write Due Date */
- e_cal_component_get_due (comp, &dt);
- if (dt.value != NULL) {
- buf = timet_to_str_with_zone (icaltime_as_timet (*dt.value), current_zone);
- str = g_locale_to_utf8 (buf, -1, NULL, NULL, NULL);
-
- g_free (buf);
- } else
- str = g_strdup ("");
-
- gtk_html_stream_printf (stream, "<TR><TD VALIGN=\"TOP\" ALIGN=\"RIGHT\"><B>%s</B></TD><TD>%s</TD></TR>",
- _("Due Date:"), str);
-
- e_cal_component_free_datetime (&dt);
- g_free (str);
-
- /* write status */
- gtk_html_stream_printf (stream, "<TR><TD VALIGN=\"TOP\" ALIGN=\"RIGHT\"><B>%s</B></TD>", _("Status:"));
- e_cal_component_get_status (comp, &status);
- switch (status) {
- case ICAL_STATUS_INPROCESS :
- str = g_strdup (_("In Progress"));
- break;
- case ICAL_STATUS_COMPLETED :
- str = g_strdup (_("Completed"));
- break;
- case ICAL_STATUS_CANCELLED :
- str = g_strdup (_("Cancelled"));
- break;
- case ICAL_STATUS_NONE :
- default :
- str = g_strdup (_("Not Started"));
- break;
- }
-
- gtk_html_stream_printf (stream, "<TD>%s</TD></TR>", str);
- g_free (str);
-
- /* write priority */
- gtk_html_stream_printf (stream, "<TR><TD VALIGN=\"TOP\" ALIGN=\"RIGHT\"><B>%s</B></TD>", _("Priority:"));
- e_cal_component_get_priority (comp, &priority_value);
- if (priority_value) {
- if (*priority_value == 0)
- str = g_strdup ("");
- else if (*priority_value <= 4)
- str = g_strdup (_("High"));
- else if (*priority_value == 5)
- str = g_strdup (_("Normal"));
- else
- str = g_strdup (_("Low"));
-
- gtk_html_stream_printf (stream, "<TD>%s</TD></TR>", str);
-
- g_free (str);
- e_cal_component_free_priority (priority_value);
- } else
- gtk_html_stream_printf (stream, "<TD></TD></TR>");
-
- /* write description and URL */
- gtk_html_stream_printf (stream, "<TR><TD COLSPAN=\"2\"><HR></TD></TR>");
-
- gtk_html_stream_printf (stream, "<TR><TD VALIGN=\"TOP\" ALIGN=\"RIGHT\"><B>%s</B></TD>", _("Description:"));
- e_cal_component_get_description_list (comp, &l);
- if (l) {
- GSList *node;
-
- gtk_html_stream_printf (stream, "<TD>");
-
- for (node = l; node != NULL; node = node->next) {
- gint i;
- GString *str = g_string_new ("");;
-
- text = * (ECalComponentText *) node->data;
- for (i = 0; i < strlen (text.value ? text.value : 0); i++) {
- if (text.value[i] == '\n')
- str = g_string_append (str, "<BR>");
- else if (text.value[i] == '<')
- str = g_string_append (str, "&lt;");
- else if (text.value[i] == '>')
- str = g_string_append (str, "&gt;");
- else
- str = g_string_append_c (str, text.value[i]);
- }
-
- gtk_html_stream_printf (stream, str->str);
- g_string_free (str, TRUE);
- }
-
- gtk_html_stream_printf (stream, "</TD></TR>");
-
- e_cal_component_free_text_list (l);
- } else
- gtk_html_stream_printf (stream, "<TD></TD></TR>");
-
- /* URL */
- gtk_html_stream_printf (stream, "<TR><TD VALIGN=\"TOP\" ALIGN=\"RIGHT\"><B>%s</B></TD>", _("Web Page:"));
- e_cal_component_get_url (comp, (const char **) &str);
- if (str)
- gtk_html_stream_printf (stream, "<TD><A HREF=\"%s\">%s</A></TD></TR>", str, str);
- else
- gtk_html_stream_printf (stream, "<TD></TD></TR>");
-
- gtk_html_stream_printf (stream, "</TABLE>");
-
- /* close document */
- gtk_html_stream_printf (stream, "</BODY></HTML>");
-}
-
-static void
-on_link_clicked (GtkHTML *html, const char *url, gpointer data)
-{
- GError *err = NULL;
-
- gnome_url_show (url, &err);
-
- if (err) {
- g_warning ("gnome_url_show: %s", err->message);
- g_error_free (err);
- }
-}
-
-/* Callback used when the cursor changes in the table */
-static void
-table_cursor_change_cb (ETable *etable, int row, gpointer data)
-{
- ETasks *tasks;
- ETasksPrivate *priv;
- int n_selected;
-
- tasks = E_TASKS (data);
- priv = tasks->priv;
-
- n_selected = e_table_selected_count (etable);
-
- /* update the HTML widget */
- if (n_selected == 1) {
- GtkHTMLStream *stream;
- ECalModel *model;
- ECalModelComponent *comp_data;
- ECalComponent *comp;
- const char *uid;
-
- model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view));
-
- stream = gtk_html_begin (GTK_HTML (priv->html));
-
- comp_data = e_cal_model_get_component_at (model, e_table_get_cursor_row (etable));
- comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp));
- write_html (stream, comp);
-
- gtk_html_stream_close (stream, GTK_HTML_STREAM_OK);
-
- e_cal_component_get_uid (comp, &uid);
- if (priv->current_uid)
- g_free (priv->current_uid);
- priv->current_uid = g_strdup (uid);
-
- g_object_unref (comp);
- } else
- gtk_html_load_empty (GTK_HTML (priv->html));
-}
-
-/* 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;
- ECalModel *model;
-
- tasks = E_TASKS (data);
- priv = tasks->priv;
-
- model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view));
- e_cal_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;
- ECalModel *model;
-
- tasks = E_TASKS (data);
- priv = tasks->priv;
-
- model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view));
- e_cal_model_set_default_category (model, category);
-}
-
-/* Callback used when the user selects a URL in the HTML widget */
-static void
-url_requested_cb (GtkHTML *html, const char *url, GtkHTMLStream *stream, gpointer data)
-{
- if (!strncmp ("file:///", url, strlen ("file:///"))) {
- GnomeVFSHandle *handle;
- GnomeVFSResult result;
- char buffer[4096];
-
- if (gnome_vfs_open (&handle, url, GNOME_VFS_OPEN_READ) == GNOME_VFS_OK) {
- do {
- GnomeVFSFileSize bread;
-
- result = gnome_vfs_read (handle, buffer, sizeof (buffer), &bread);
- if (result == GNOME_VFS_OK)
- gtk_html_stream_write (stream, buffer, bread);
- } while (result == GNOME_VFS_OK);
-
- gnome_vfs_close (handle);
- }
- }
-}
-
-static gboolean
-vpaned_resized_cb (GtkWidget *widget, GdkEventButton *event, ETasks *tasks)
-{
- calendar_config_set_task_vpane_pos (gtk_paned_get_position (GTK_PANED (widget)));
-
- return FALSE;
-}
-
-static void
-set_timezone (ETasks *tasks)
-{
- ETasksPrivate *priv;
- char *location;
- icaltimezone *zone;
- GList *l;
-
- priv = tasks->priv;
-
- location = calendar_config_get_timezone ();
- zone = icaltimezone_get_builtin_timezone (location);
- g_free (location);
-
- if (!zone)
- zone = icaltimezone_get_utc_timezone ();
-
- for (l = priv->clients_list; l != NULL; l = l->next) {
- ECal *client = l->data;
-
- if (e_cal_get_load_state (client) == E_CAL_LOAD_LOADED)
- /* FIXME Error checking */
- e_cal_set_default_timezone (client, zone, NULL);
- }
-}
-
-static void
-timezone_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- ETasks *tasks = data;
-
- set_timezone (tasks);
-}
-
-static void
-setup_config (ETasks *tasks)
-{
- ETasksPrivate *priv;
- guint not;
-
- priv = tasks->priv;
-
- /* Timezone */
- set_timezone (tasks);
-
- not = calendar_config_add_notification_timezone (timezone_changed_cb, tasks);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-}
-
-#define E_TASKS_TABLE_DEFAULT_STATE \
- "<?xml version=\"1.0\"?>" \
- "<ETableState>" \
- "<column source=\"13\"/>" \
- "<column source=\"14\"/>" \
- "<column source=\"9\"/>" \
- "<column source=\"5\"/>" \
- "<grouping/>" \
- "</ETableState>"
-
-static void
-setup_widgets (ETasks *tasks)
-{
- ETasksPrivate *priv;
- ETable *etable;
- GtkWidget *paned, *scroll;
-
- priv = tasks->priv;
-
- priv->search_bar = cal_search_bar_new ();
- g_signal_connect (priv->search_bar, "sexp_changed",
- G_CALLBACK (search_bar_sexp_changed_cb), tasks);
- g_signal_connect (priv->search_bar, "category_changed",
- G_CALLBACK (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);
-
- /* add the paned widget for the task list and task detail areas */
- paned = gtk_vpaned_new ();
- gtk_paned_set_position (GTK_PANED (paned), calendar_config_get_task_vpane_pos ());
- g_signal_connect (G_OBJECT (paned), "button_release_event",
- G_CALLBACK (vpaned_resized_cb), tasks);
- gtk_table_attach (GTK_TABLE (tasks), paned, 0, 1, 1, 2,
- GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
- gtk_widget_show (paned);
-
- /* create the task list */
- priv->tasks_view = e_calendar_table_new ();
- priv->tasks_view_config = e_calendar_table_config_new (E_CALENDAR_TABLE (priv->tasks_view));
-
- 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_paned_add1 (GTK_PANED (paned), priv->tasks_view);
- gtk_widget_show (priv->tasks_view);
-
- g_signal_connect (etable, "cursor_change", G_CALLBACK (table_cursor_change_cb), tasks);
- g_signal_connect (etable, "selection_change", G_CALLBACK (table_selection_change_cb), tasks);
-
- /* create the task detail */
- priv->html = gtk_html_new ();
- gtk_html_set_default_content_type (GTK_HTML (priv->html), "charset=utf-8");
- gtk_html_load_empty (GTK_HTML (priv->html));
-
- g_signal_connect (G_OBJECT (priv->html), "url_requested",
- G_CALLBACK (url_requested_cb), NULL);
- g_signal_connect (G_OBJECT (priv->html), "link_clicked",
- G_CALLBACK (on_link_clicked), tasks);
-
- gtk_widget_pop_colormap ();
- scroll = gtk_scrolled_window_new (NULL, NULL);
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll),
- GTK_POLICY_AUTOMATIC,
- GTK_POLICY_AUTOMATIC);
- gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scroll), GTK_SHADOW_IN);
- gtk_container_add (GTK_CONTAINER (scroll), priv->html);
- gtk_paned_add2 (GTK_PANED (paned), scroll);
- gtk_widget_show_all (scroll);
-}
-
-/* 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,
- G_TYPE_FROM_CLASS (object_class),
- GTK_SIGNAL_OFFSET (ETasksClass, selection_changed),
- gtk_marshal_NONE__INT,
- GTK_TYPE_NONE, 1,
- GTK_TYPE_INT);
-
- 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;
-
- setup_config (tasks);
- setup_widgets (tasks);
-
- priv->clients = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref);
- priv->query = NULL;
- priv->view_instance = NULL;
- priv->view_menus = NULL;
- priv->current_uid = NULL;
-}
-
-/* Callback used when the set of categories changes in the calendar client */
-static void
-client_categories_changed_cb (ECal *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);
-}
-
-static void
-client_obj_updated_cb (ECal *client, const char *uid, gpointer data)
-{
- ETasks *tasks;
- ETasksPrivate *priv;
-
- tasks = E_TASKS (data);
- priv = tasks->priv;
-
- if (priv->current_uid) {
- if (!strcmp (uid, priv->current_uid)) {
- ETable *etable;
-
- etable = e_table_scrolled_get_table (
- E_TABLE_SCROLLED (E_CALENDAR_TABLE (priv->tasks_view)->etable));
- table_cursor_change_cb (etable, 0, tasks);
- }
- }
-}
-
-
-GtkWidget *
-e_tasks_new (void)
-{
- ETasks *tasks;
-
- tasks = g_object_new (e_tasks_get_type (), NULL);
-
- return GTK_WIDGET (tasks);
-}
-
-
-void
-e_tasks_set_ui_component (ETasks *tasks,
- BonoboUIComponent *ui_component)
-{
- g_return_if_fail (E_IS_TASKS (tasks));
- g_return_if_fail (ui_component == NULL || BONOBO_IS_UI_COMPONENT (ui_component));
-
- e_search_bar_set_ui_component (E_SEARCH_BAR (tasks->priv->search_bar), ui_component);
-}
-
-
-static void
-e_tasks_destroy (GtkObject *object)
-{
- ETasks *tasks;
- ETasksPrivate *priv;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (E_IS_TASKS (object));
-
- tasks = E_TASKS (object);
- priv = tasks->priv;
-
- if (priv) {
- GList *l;
-
- /* disconnect from signals on all the clients */
- for (l = priv->clients_list; l != NULL; l = l->next) {
- g_signal_handlers_disconnect_matched (l->data, G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL, tasks);
- }
-
- g_hash_table_destroy (priv->clients);
- g_list_free (priv->clients_list);
-
- if (priv->current_uid) {
- g_free (priv->current_uid);
- priv->current_uid = NULL;
- }
-
- if (priv->tasks_view_config) {
- g_object_unref (priv->tasks_view_config);
- priv->tasks_view_config = NULL;
- }
-
- for (l = priv->notifications; l; l = l->next)
- calendar_config_remove_notification (GPOINTER_TO_UINT (l->data));
- priv->notifications = NULL;
-
- g_free (priv);
- tasks->priv = NULL;
- }
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-static void
-set_status_message (ETasks *tasks, const char *message)
-{
- ETasksPrivate *priv;
-
- priv = tasks->priv;
-
- e_calendar_table_set_status_message (E_CALENDAR_TABLE (priv->tasks_view), message);
-}
-
-/* Displays an error to indicate that loading a calendar failed */
-static void
-load_error (ETasks *tasks,
- const char *uri)
-{
- char *msg;
- char *urinopwd;
-
- urinopwd = get_uri_without_password (uri);
- msg = g_strdup_printf (_("Could not load the tasks in `%s'"), urinopwd);
- gnome_error_dialog_parented (msg, GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (tasks))));
- g_free (msg);
- g_free (urinopwd);
-}
-
-/* Displays an error to indicate that the specified URI method is not supported */
-static void
-method_error (ETasks *tasks,
- const char *uri)
-{
- char *msg;
- char *urinopwd;
-
- urinopwd = get_uri_without_password (uri);
- msg = g_strdup_printf (_("The method required to load `%s' is not supported"), urinopwd);
- gnome_error_dialog_parented (msg, GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (tasks))));
- g_free (msg);
- g_free (urinopwd);
-}
-
-/* Displays an error to indicate permission problems */
-static void
-permission_error (ETasks *tasks, const char *uri)
-{
- char *msg;
- char *urinopwd;
-
- urinopwd = get_uri_without_password (uri);
- msg = g_strdup_printf (_("You don't have permission to open the folder in `%s'"), urinopwd);
- gnome_error_dialog_parented (msg, GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (tasks))));
- g_free (msg);
- g_free (urinopwd);
-}
-
-/* Callback from the calendar client when a calendar is opened */
-static void
-cal_opened_cb (ECal *client,
- ECalendarStatus status,
- gpointer data)
-{
- ETasks *tasks;
- ETasksPrivate *priv;
-
- tasks = E_TASKS (data);
- priv = tasks->priv;
-
- set_status_message (tasks, NULL);
-
- switch (status) {
- case E_CALENDAR_STATUS_OK:
- /* Everything is OK */
- set_timezone (tasks);
- return;
-
- case E_CALENDAR_STATUS_OTHER_ERROR:
- load_error (tasks, e_cal_get_uri (client));
- break;
-
- case E_CALENDAR_STATUS_NO_SUCH_CALENDAR:
- /* bullshit; we did not specify only_if_exists */
- g_assert_not_reached ();
- return;
-
- case E_CALENDAR_STATUS_PROTOCOL_NOT_SUPPORTED:
- method_error (tasks, e_cal_get_uri (client));
- break;
-
- case E_CALENDAR_STATUS_PERMISSION_DENIED:
- permission_error (tasks, e_cal_get_uri (client));
- break;
-
- default:
- g_assert_not_reached ();
- }
-}
-
-/* Callback from the calendar client when an error occurs in the backend */
-static void
-backend_error_cb (ECal *client, const char *message, gpointer data)
-{
- ETasks *tasks;
- ETasksPrivate *priv;
- char *errmsg;
- char *urinopwd;
-
- tasks = E_TASKS (data);
- priv = tasks->priv;
-
- urinopwd = get_uri_without_password (e_cal_get_uri (client));
- errmsg = g_strdup_printf (_("Error on %s:\n %s"), urinopwd, message);
- gnome_error_dialog_parented (errmsg, GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (tasks))));
- g_free (errmsg);
- g_free (urinopwd);
-}
-
-void
-e_tasks_new_task (ETasks *tasks)
-{
- ETasksPrivate *priv;
- TaskEditor *tedit;
- ECalComponent *comp;
- const char *category;
- ECal *ecal;
-
- g_return_if_fail (E_IS_TASKS (tasks));
-
- priv = tasks->priv;
-
- /* FIXME What to do about no default client */
- ecal = e_tasks_get_default_client (tasks);
- if (!ecal)
- return;
-
- comp = cal_comp_task_new_with_defaults (ecal);
-
- category = cal_search_bar_get_category (CAL_SEARCH_BAR (priv->search_bar));
- e_cal_component_set_categories (comp, category);
-
- tedit = task_editor_new (ecal);
- comp_editor_edit_comp (COMP_EDITOR (tedit), comp);
- g_object_unref (comp);
-
- comp_editor_focus (COMP_EDITOR (tedit));
-}
-
-gboolean
-e_tasks_add_todo_uri (ETasks *tasks, const char *str_uri)
-{
- ETasksPrivate *priv;
- ECal *client;
- ECalModel *model;
-
- g_return_val_if_fail (tasks != NULL, FALSE);
- g_return_val_if_fail (E_IS_TASKS (tasks), FALSE);
- g_return_val_if_fail (str_uri != NULL, FALSE);
-
- priv = tasks->priv;
-
- client = g_hash_table_lookup (priv->clients, str_uri);
- if (client)
- return TRUE;
-
- client = e_cal_new_from_uri (str_uri, CALOBJ_TYPE_TODO);
- g_hash_table_insert (priv->clients, g_strdup (str_uri), client);
- priv->clients_list = g_list_prepend (priv->clients_list, client);
-
- g_signal_connect (G_OBJECT (client), "backend_error", G_CALLBACK (backend_error_cb), tasks);
- g_signal_connect (G_OBJECT (client), "categories_changed", G_CALLBACK (client_categories_changed_cb), tasks);
-
- if (!e_cal_open (client, FALSE, NULL)) {
- g_hash_table_remove (priv->clients, str_uri);
- priv->clients_list = g_list_prepend (priv->clients_list, client);
- g_signal_handlers_disconnect_matched (client, G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL, tasks);
-
- return FALSE;
- }
-
- model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view));
- e_cal_model_add_client (model, client);
-
- return TRUE;
-}
-
-gboolean
-e_tasks_remove_todo_uri (ETasks *tasks, const char *str_uri)
-{
- ETasksPrivate *priv;
- ECal *client;
- ECalModel *model;
-
- g_return_val_if_fail (tasks != NULL, FALSE);
- g_return_val_if_fail (E_IS_TASKS (tasks), FALSE);
- g_return_val_if_fail (str_uri != NULL, FALSE);
-
- priv = tasks->priv;
-
- client = g_hash_table_lookup (priv->clients, str_uri);
- if (!client)
- return TRUE;
-
- g_hash_table_remove (priv->clients, str_uri);
- priv->clients_list = g_list_remove (priv->clients_list, client);
- g_signal_handlers_disconnect_matched (client, G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL, tasks);
-
- model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view));
- e_cal_model_remove_client (model, client);
-
- return TRUE;
-}
-
-gboolean
-e_tasks_set_default_uri (ETasks *tasks, const char *str_uri)
-{
- ETasksPrivate *priv;
- ECal *ecal;
- ECalModel *model;
-
- g_return_val_if_fail (tasks != NULL, FALSE);
- g_return_val_if_fail (E_IS_TASKS (tasks), FALSE);
- g_return_val_if_fail (str_uri != NULL, FALSE);
-
- priv = tasks->priv;
-
- ecal = g_hash_table_lookup (priv->clients, str_uri);
- if (!ecal)
- return FALSE;
-
- model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view));
- e_cal_model_set_default_client (model, ecal);
-
- return TRUE;
-}
-
-ECal *
-e_tasks_get_default_client (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_cal_model_get_default_client (e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view)));
-}
-
-/**
- * e_tasks_complete_selected:
- * @tasks: A tasks control widget
- *
- * Marks the selected tasks complete
- **/
-void
-e_tasks_complete_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);
-
- set_status_message (tasks, _("Completing tasks..."));
- e_calendar_table_complete_selected (cal_table);
- set_status_message (tasks, NULL);
-}
-
-/**
- * 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);
- set_status_message (tasks, _("Deleting selected objects..."));
- e_calendar_table_delete_selected (cal_table);
- set_status_message (tasks, NULL);
-}
-
-/**
- * e_tasks_expunge:
- * @tasks: A tasks control widget
- *
- * Removes all tasks marked as completed
- **/
-void
-e_tasks_delete_completed (ETasks *tasks)
-{
- ETasksPrivate *priv;
- char *sexp;
- GList *l;
-
- g_return_if_fail (tasks != NULL);
- g_return_if_fail (E_IS_TASKS (tasks));
-
- priv = tasks->priv;
-
- sexp = g_strdup ("(is-completed?)");
-
- set_status_message (tasks, _("Expunging"));
-
- for (l = priv->clients_list; l != NULL; l = l->next) {
- ECal *client = l->data;
- GList *objects, *m;
- gboolean read_only = TRUE;
-
- e_cal_is_read_only (client, &read_only, NULL);
- if (read_only)
- continue;
-
- if (!e_cal_get_object_list (client, sexp, &objects, NULL)) {
- g_warning (G_STRLOC ": Could not get the objects");
-
- continue;
- }
-
- for (m = objects; m; m = m->next) {
- /* FIXME Better error handling */
- e_cal_remove_object (client, icalcomponent_get_uid (m->data), NULL);
- }
- }
-
- set_status_message (tasks, NULL);
-
- g_free (sexp);
-}
-
-/* Callback used from the view collection when we need to display a new view */
-static void
-display_view_cb (GalViewInstance *instance, GalView *view, gpointer data)
-{
- ETasks *tasks;
-
- tasks = E_TASKS (data);
-
- if (GAL_IS_VIEW_ETABLE (view)) {
- gal_view_etable_attach_table (GAL_VIEW_ETABLE (view), e_table_scrolled_get_table (E_TABLE_SCROLLED (E_CALENDAR_TABLE (tasks->priv->tasks_view)->etable)));
- }
-}
-
-/**
- * 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;
- static GalViewCollection *collection = NULL;
-
- 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_instance == NULL);
-
- g_assert (priv->view_instance == NULL);
- g_assert (priv->view_menus == NULL);
-
- /* Create the view instance */
-
- if (collection == NULL) {
- collection = gal_view_collection_new ();
-
- gal_view_collection_set_title (collection, _("Tasks"));
-
- dir = gnome_util_prepend_user_home ("/evolution/views/tasks/");
- gal_view_collection_set_storage_directories (collection,
- EVOLUTION_GALVIEWSDIR "/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);
- g_object_unref (spec);
- gal_view_collection_add_factory (collection, factory);
- g_object_unref (factory);
-
- /* Load the collection and create the menus */
-
- gal_view_collection_load (collection);
- }
-
- priv->view_instance = gal_view_instance_new (collection, e_cal_get_uri (e_tasks_get_default_client (tasks)));
-
- priv->view_menus = gal_view_menus_new (priv->view_instance);
- gal_view_menus_apply (priv->view_menus, uic, NULL);
- g_signal_connect (priv->view_instance, "display_view", G_CALLBACK (display_view_cb), tasks);
- display_view_cb (priv->view_instance, gal_view_instance_get_current_view (priv->view_instance), 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_instance != NULL);
-
- g_assert (priv->view_instance != NULL);
- g_assert (priv->view_menus != NULL);
-
- g_object_unref (priv->view_instance);
- priv->view_instance = NULL;
-
- g_object_unref (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);
-}
diff --git a/calendar/gui/e-tasks.h b/calendar/gui/e-tasks.h
deleted file mode 100644
index 10e79ef8c3..0000000000
--- a/calendar/gui/e-tasks.h
+++ /dev/null
@@ -1,83 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <bonobo/bonobo-ui-component.h>
-#include <gtk/gtktable.h>
-#include <libecal/e-cal.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);
-
-void e_tasks_set_ui_component (ETasks *tasks,
- BonoboUIComponent *ui_component);
-
-gboolean e_tasks_add_todo_uri (ETasks *tasks, const char *str_uri);
-gboolean e_tasks_remove_todo_uri (ETasks *tasks, const char *str_uri);
-gboolean e_tasks_set_default_uri (ETasks *tasks, const char *str_uri);
-ECal *e_tasks_get_default_client (ETasks *tasks);
-
-void e_tasks_new_task (ETasks *tasks);
-void e_tasks_complete_selected (ETasks *tasks);
-void e_tasks_delete_selected (ETasks *tasks);
-void e_tasks_delete_completed (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);
-
-#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 6f6a965f7a..0000000000
--- a/calendar/gui/e-timezone-entry.c
+++ /dev/null
@@ -1,320 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <gal/util/e-util.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 {
- /* The current timezone, set in e_timezone_entry_set_timezone()
- or from the timezone dialog. 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 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;
-
- GtkWidget *entry;
- GtkWidget *button;
-};
-
-
-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 gboolean e_timezone_entry_mnemonic_activate (GtkWidget *widget,
- gboolean group_cycling);
-static void on_entry_changed (GtkEntry *entry,
- ETimezoneEntry *tentry);
-static void on_button_clicked (GtkWidget *widget,
- ETimezoneEntry *tentry);
-
-static void e_timezone_entry_set_entry (ETimezoneEntry *tentry);
-
-
-static GtkHBoxClass *parent_class;
-static guint timezone_entry_signals[LAST_SIGNAL] = { 0 };
-
-E_MAKE_TYPE (e_timezone_entry, "ETimezoneEntry", ETimezoneEntry,
- e_timezone_entry_class_init, e_timezone_entry_init, GTK_TYPE_HBOX);
-
-static void
-e_timezone_entry_class_init (ETimezoneEntryClass *class)
-{
- GtkObjectClass *object_class = (GtkObjectClass *) class;
- GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class) ;
-
- object_class = (GtkObjectClass*) class;
-
- parent_class = g_type_class_peek_parent (class);
-
- widget_class->mnemonic_activate = e_timezone_entry_mnemonic_activate;
- timezone_entry_signals[CHANGED] =
- gtk_signal_new ("changed",
- GTK_RUN_LAST,
- G_TYPE_FROM_CLASS (object_class),
- GTK_SIGNAL_OFFSET (ETimezoneEntryClass,
- changed),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
-
-
- 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->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, 6);
- gtk_widget_show (priv->entry);
- g_signal_connect (priv->entry, "changed", G_CALLBACK (on_entry_changed), tentry);
-
- priv->button = gtk_button_new ();
- g_signal_connect (priv->button, "clicked", G_CALLBACK (on_button_clicked), tentry);
- gtk_box_pack_start (GTK_BOX (tentry), priv->button, FALSE, FALSE, 6);
- 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 = g_object_new (e_timezone_entry_get_type (), NULL);
-
- GTK_WIDGET_SET_FLAGS (GTK_WIDGET(tentry), GTK_CAN_FOCUS);
-
- 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;
-
- priv = tentry->priv;
-
- timezone_dialog = e_timezone_dialog_new ();
-
- e_timezone_dialog_set_timezone (timezone_dialog, priv->zone);
-
- dialog = e_timezone_dialog_get_toplevel (timezone_dialog);
-
- if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) {
- priv->zone = e_timezone_dialog_get_timezone (timezone_dialog);
- e_timezone_entry_set_entry (tentry);
- }
-
- g_object_unref (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;
-
- g_return_val_if_fail (E_IS_TIMEZONE_ENTRY (tentry), NULL);
-
- priv = tentry->priv;
-
- return priv->zone;
-}
-
-
-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;
-
- e_timezone_entry_set_entry (tentry);
-}
-
-
-/* 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 (tentry);
-}
-
-
-static void
-e_timezone_entry_set_entry (ETimezoneEntry *tentry)
-{
- ETimezoneEntryPrivate *priv;
- const char *display_name;
- char *name_buffer;
-
- priv = tentry->priv;
-
- if (priv->zone) {
- display_name = icaltimezone_get_display_name (priv->zone);
-
- /* We check if it is one of our builtin timezone
- names, in which case we call gettext to translate
- it. If it isn't a builtin timezone name, we
- don't. */
- if (icaltimezone_get_builtin_timezone (display_name))
- display_name = _(display_name);
- } else
- display_name = "";
-
- name_buffer = g_strdup (display_name);
-
- gtk_entry_set_text (GTK_ENTRY (priv->entry), name_buffer);
-
- if (!priv->default_zone || (priv->zone != priv->default_zone))
- gtk_widget_show (priv->entry);
- else
- gtk_widget_hide (priv->entry);
-
- g_free (name_buffer);
-}
-
-
-static gboolean
-e_timezone_entry_mnemonic_activate (GtkWidget *widget,
- gboolean group_cycling)
-{
- GtkButton *button = NULL;
-
- if (GTK_WIDGET_CAN_FOCUS (widget)) {
- button=((ETimezoneEntryPrivate*) ((ETimezoneEntry*) widget)->priv)->button;
- if (button != NULL)
- gtk_widget_grab_focus (button);
- }
-
- return TRUE;
-}
-
diff --git a/calendar/gui/e-timezone-entry.h b/calendar/gui/e-timezone-entry.h
deleted file mode 100644
index 94a7df9efc..0000000000
--- a/calendar/gui/e-timezone-entry.h
+++ /dev/null
@@ -1,80 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <libecal/e-cal.h>
-
-G_BEGIN_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);
-};
-
-GType 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);
-
-G_END_DECLS
-
-#endif /* __E_TIMEZONE_ENTRY_H_ */
diff --git a/calendar/gui/e-week-view-config.c b/calendar/gui/e-week-view-config.c
deleted file mode 100644
index 1257813062..0000000000
--- a/calendar/gui/e-week-view-config.c
+++ /dev/null
@@ -1,332 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Rodrigo Moya <rodrigo@ximian.com>
- *
- * Copyright 2003, Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 "calendar-config.h"
-#include "e-week-view-config.h"
-
-struct _EWeekViewConfigPrivate {
- EWeekView *view;
-
- GList *notifications;
-};
-
-static GObjectClass *parent_class = NULL;
-
-/* Property IDs */
-enum props {
- PROP_0,
- PROP_VIEW,
-};
-
-static void
-e_week_view_config_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
-{
- EWeekViewConfig *view_config;
- EWeekViewConfigPrivate *priv;
-
- view_config = E_WEEK_VIEW_CONFIG (object);
- priv = view_config->priv;
-
- switch (property_id) {
- case PROP_VIEW:
- e_week_view_config_set_view (view_config, g_value_get_object (value));
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- break;
- }
-}
-
-static void
-e_week_view_config_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
-{
- EWeekViewConfig *view_config;
- EWeekViewConfigPrivate *priv;
-
- view_config = E_WEEK_VIEW_CONFIG (object);
- priv = view_config->priv;
-
- switch (property_id) {
- case PROP_VIEW:
- g_value_set_object (value, e_week_view_config_get_view (view_config));
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- break;
- }
-}
-
-static void
-e_week_view_config_dispose (GObject *object)
-{
- EWeekViewConfig *view_config = E_WEEK_VIEW_CONFIG (object);
- EWeekViewConfigPrivate *priv;
-
- priv = view_config->priv;
-
- e_week_view_config_set_view (view_config, NULL);
-
- if (G_OBJECT_CLASS (parent_class)->dispose)
- G_OBJECT_CLASS (parent_class)->dispose (object);
-}
-
-static void
-e_week_view_config_finalize (GObject *object)
-{
- EWeekViewConfig *view_config = E_WEEK_VIEW_CONFIG (object);
- EWeekViewConfigPrivate *priv;
-
- priv = view_config->priv;
-
- g_free (priv);
-
- if (G_OBJECT_CLASS (parent_class)->finalize)
- G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-static void
-e_week_view_config_class_init (EWeekViewConfigClass *klass)
-{
- GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- GParamSpec *spec;
-
- parent_class = g_type_class_peek_parent (klass);
-
- /* Method override */
- gobject_class->set_property = e_week_view_config_set_property;
- gobject_class->get_property = e_week_view_config_get_property;
- gobject_class->dispose = e_week_view_config_dispose;
- gobject_class->finalize = e_week_view_config_finalize;
-
- spec = g_param_spec_object ("view", NULL, NULL, e_week_view_get_type (),
- G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT);
- g_object_class_install_property (gobject_class, PROP_VIEW, spec);
-}
-
-static void
-e_week_view_config_init (EWeekViewConfig *view_config, EWeekViewConfigClass *klass)
-{
- view_config->priv = g_new0 (EWeekViewConfigPrivate, 1);
-
-}
-
-E_MAKE_TYPE (e_week_view_config, "EWeekViewConfig", EWeekViewConfig, e_week_view_config_class_init,
- e_week_view_config_init, G_TYPE_OBJECT);
-
-EWeekViewConfig *
-e_week_view_config_new (EWeekView *week_view)
-{
- EWeekViewConfig *view_config;
-
- view_config = g_object_new (e_week_view_config_get_type (), "view", week_view, NULL);
-
- return view_config;
-}
-
-EWeekView *
-e_week_view_config_get_view (EWeekViewConfig *view_config)
-{
- EWeekViewConfigPrivate *priv;
-
- g_return_val_if_fail (view_config != NULL, NULL);
- g_return_val_if_fail (E_IS_WEEK_VIEW_CONFIG (view_config), NULL);
-
- priv = view_config->priv;
-
- return priv->view;
-}
-
-static void
-set_timezone (EWeekView *week_view)
-{
- char *location;
- icaltimezone *zone;
-
- location = calendar_config_get_timezone ();
- zone = icaltimezone_get_builtin_timezone (location);
- if (!zone)
- zone = icaltimezone_get_utc_timezone ();
-
- e_calendar_view_set_timezone (E_CALENDAR_VIEW (week_view), zone);
-
- g_free (location);
-}
-
-static void
-timezone_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- EWeekViewConfig *view_config = data;
- EWeekViewConfigPrivate *priv;
-
- priv = view_config->priv;
-
- set_timezone (priv->view);
-}
-
-static void
-set_week_start (EWeekView *week_view)
-{
- int week_start_week;
-
- week_start_week = calendar_config_get_week_start_day ();
-
- /* Convert it to 0 (Mon) to 6 (Sun), which is what we use. */
- week_start_week = (week_start_week + 6) % 7;
-
- e_week_view_set_week_start_day (week_view, week_start_week);
-}
-
-static void
-week_start_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- EWeekViewConfig *view_config = data;
- EWeekViewConfigPrivate *priv;
-
- priv = view_config->priv;
-
- set_week_start (priv->view);
-}
-
-static void
-set_twentyfour_hour (EWeekView *week_view)
-{
- gboolean use_24_hour;
-
- use_24_hour = calendar_config_get_24_hour_format ();
-
- e_calendar_view_set_use_24_hour_format (E_CALENDAR_VIEW (week_view), use_24_hour);
-}
-
-static void
-twentyfour_hour_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- EWeekViewConfig *view_config = data;
- EWeekViewConfigPrivate *priv;
-
- priv = view_config->priv;
-
- set_twentyfour_hour (priv->view);
-}
-
-static void
-set_show_event_end (EWeekView *week_view)
-{
- gboolean show_event_end;
-
- show_event_end = calendar_config_get_show_event_end ();
-
- e_week_view_set_show_event_end_times (week_view, show_event_end);
-}
-
-static void
-show_event_end_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- EWeekViewConfig *view_config = data;
- EWeekViewConfigPrivate *priv;
-
- priv = view_config->priv;
-
- set_show_event_end (priv->view);
-}
-
-static void
-set_compress_weekend (EWeekView *week_view)
-{
- gboolean compress_weekend;
-
- compress_weekend = calendar_config_get_compress_weekend ();
-
- e_week_view_set_compress_weekend (week_view, compress_weekend);
-}
-
-static void
-compress_weekend_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- EWeekViewConfig *view_config = data;
- EWeekViewConfigPrivate *priv;
-
- priv = view_config->priv;
-
- set_compress_weekend (priv->view);
-}
-
-void
-e_week_view_config_set_view (EWeekViewConfig *view_config, EWeekView *week_view)
-{
- EWeekViewConfigPrivate *priv;
- guint not;
- GList *l;
-
- g_return_if_fail (view_config != NULL);
- g_return_if_fail (E_IS_WEEK_VIEW_CONFIG (view_config));
-
- priv = view_config->priv;
-
- if (priv->view) {
- g_object_unref (priv->view);
- priv->view = NULL;
- }
-
- for (l = priv->notifications; l; l = l->next)
- calendar_config_remove_notification (GPOINTER_TO_UINT (l->data));
-
- g_list_free (priv->notifications);
- priv->notifications = NULL;
-
- /* If the new view is NULL, return right now */
- if (!week_view)
- return;
-
- priv->view = g_object_ref (week_view);
-
- /* Time zone */
- set_timezone (week_view);
-
- not = calendar_config_add_notification_timezone (timezone_changed_cb, view_config);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
- /* Week start */
- set_week_start (week_view);
-
- not = calendar_config_add_notification_week_start_day (week_start_changed_cb, view_config);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
- /* 24 Hour format */
- set_twentyfour_hour (week_view);
-
- not = calendar_config_add_notification_24_hour_format (twentyfour_hour_changed_cb, view_config);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
- /* Show event end */
- set_show_event_end (week_view);
-
- not = calendar_config_add_notification_show_event_end (show_event_end_changed_cb, view_config);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
- /* Compress weekend */
- set_compress_weekend (week_view);
-
- not = calendar_config_add_notification_compress_weekend (compress_weekend_changed_cb, view_config);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-}
-
diff --git a/calendar/gui/e-week-view-config.h b/calendar/gui/e-week-view-config.h
deleted file mode 100644
index e37cb0cfc0..0000000000
--- a/calendar/gui/e-week-view-config.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
- * JP Rosevear <jpr@ximian.com>
- *
- * Copyright 2003, Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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_CONFIG_H_
-#define _E_WEEK_VIEW_CONFIG_H_
-
-#include "e-week-view.h"
-
-G_BEGIN_DECLS
-
-#define E_WEEK_VIEW_CONFIG(obj) GTK_CHECK_CAST (obj, e_week_view_config_get_type (), EWeekViewConfig)
-#define E_WEEK_VIEW_CONFIG_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, e_week_view_config_get_type (), EWeekViewConfigClass)
-#define E_IS_WEEK_VIEW_CONFIG(obj) GTK_CHECK_TYPE (obj, e_week_view_config_get_type ())
-
-typedef struct _EWeekViewConfig EWeekViewConfig;
-typedef struct _EWeekViewConfigClass EWeekViewConfigClass;
-typedef struct _EWeekViewConfigPrivate EWeekViewConfigPrivate;
-
-struct _EWeekViewConfig {
- GObject parent;
-
- EWeekViewConfigPrivate *priv;
-};
-
-struct _EWeekViewConfigClass {
- GObjectClass parent_class;
-};
-
-GType e_week_view_config_get_type (void);
-EWeekViewConfig *e_week_view_config_new (EWeekView *week_view);
-EWeekView *e_week_view_config_get_view (EWeekViewConfig *view_config);
-void e_week_view_config_set_view (EWeekViewConfig *view_config, EWeekView *week_view);
-
-G_END_DECLS
-
-#endif
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 85e1cf775a..0000000000
--- a/calendar/gui/e-week-view-event-item.c
+++ /dev/null
@@ -1,945 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 ECalendarViewPosition 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
-};
-
-E_MAKE_TYPE (e_week_view_event_item, "EWeekViewEventItem", EWeekViewEventItem,
- e_week_view_event_item_class_init, e_week_view_event_item_init,
- GNOME_TYPE_CANVAS_ITEM);
-
-static void
-e_week_view_event_item_class_init (EWeekViewEventItemClass *class)
-{
- GtkObjectClass *object_class;
- GnomeCanvasItemClass *item_class;
-
- parent_class = g_type_class_peek_parent (class);
-
- 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 *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;
- GdkColor bg_color;
-
-#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;
- 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 + 1;
- 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;
-
- if (gdk_color_parse (e_cal_model_get_color_for_component (e_calendar_view_get_model (E_CALENDAR_VIEW (week_view)),
- event->comp_data),
- &bg_color)) {
- GdkColormap *colormap;
-
- colormap = gtk_widget_get_colormap (GTK_WIDGET (week_view));
- if (gdk_colormap_alloc_color (colormap, &bg_color, TRUE, TRUE))
- gdk_gc_set_foreground (gc, &bg_color);
- else
- gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BACKGROUND]);
- } else
- 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]);
- gdk_draw_line (drawable, gc, rect_x, y1 + 1, rect_x + rect_w, y1 + 1);
- gdk_draw_line (drawable, gc, rect_x, y2, rect_x + rect_w, y2);
- gdk_draw_line (drawable, gc, rect_x, y1 + 1, rect_x, y1 + (y2 - (y1 + 1)));
- gdk_draw_line (drawable, gc, rect_x + rect_w, y1 + 1, rect_x + rect_w, y1 + (y2 - (y1 + 1)));
-
- /* 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;
- }
-
- if (gdk_color_parse (e_cal_model_get_color_for_component (e_calendar_view_get_model (E_CALENDAR_VIEW (week_view)),
- event->comp_data),
- &bg_color)) {
- GdkColormap *colormap;
-
- colormap = gtk_widget_get_colormap (GTK_WIDGET (week_view));
- if (gdk_colormap_alloc_color (colormap, &bg_color, TRUE, TRUE))
- gdk_gc_set_foreground (gc, &bg_color);
- else
- gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BACKGROUND]);
- } else
- 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;
- gint hour_to_display, suffix_width;
- gint time_y_normal_font, time_y_small_font;
- gchar buffer[128], *suffix;
- PangoLayout *layout;
- PangoFontDescription *small_font_desc;
-
- style = gtk_widget_get_style (GTK_WIDGET (week_view));
- small_font_desc = week_view->small_font_desc;
- gc = week_view->main_gc;
-
- gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_EVENT_TEXT]);
-
- layout = gtk_widget_create_pango_layout (GTK_WIDGET (week_view), NULL);
-
- time_y_normal_font = time_y_small_font = time_y;
- if (small_font_desc)
- time_y_small_font = time_y;
-
- 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_desc) {
- g_snprintf (buffer, sizeof (buffer), "%2i:%02i",
- hour_to_display, minute);
-
- /* Draw the hour. */
- if (hour_to_display < 10) {
- pango_layout_set_text (layout, buffer + 1, 1);
- gdk_draw_layout (drawable, gc,
- time_x + week_view->digit_width,
- time_y_normal_font,
- layout);
- } else {
- pango_layout_set_text (layout, buffer, 2);
- gdk_draw_layout (drawable, gc,
- time_x,
- time_y_normal_font,
- layout);
- }
-
- time_x += week_view->digit_width * 2;
-
- /* Draw the start minute, in the small font. */
- pango_layout_set_font_description (layout, week_view->small_font_desc);
- pango_layout_set_text (layout, buffer + 3, 2);
- gdk_draw_layout (drawable, gc,
- time_x,
- time_y_small_font,
- layout);
-
- pango_layout_set_font_description (layout, style->font_desc);
-
- time_x += week_view->small_digit_width * 2;
-
- /* Draw the 'am'/'pm' suffix, if 12-hour format. */
- if (!e_calendar_view_get_use_24_hour_format (E_CALENDAR_VIEW (week_view))) {
- pango_layout_set_text (layout, suffix, -1);
- gdk_draw_layout (drawable, gc,
- time_x,
- time_y_normal_font,
- layout);
- }
- } 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) {
- pango_layout_set_text (layout, buffer + 1, -1);
- gdk_draw_layout (drawable, gc,
- time_x + week_view->digit_width,
- time_y_normal_font,
- layout);
- } else {
- pango_layout_set_text (layout, buffer, -1);
- gdk_draw_layout (drawable, gc,
- time_x,
- time_y_normal_font,
- layout);
- }
-
- }
-
- g_object_unref (layout);
-}
-
-
-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;
- ECalComponent *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 = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
-
- gc = week_view->main_gc;
-
- if (e_cal_component_has_alarms (comp)) {
- draw_reminder_icon = TRUE;
- num_icons++;
- }
-
- if (e_cal_component_has_recurrences (comp)) {
- draw_recurrence_icon = TRUE;
- num_icons++;
- }
-
- if (event->different_timezone) {
- draw_timezone_icon = TRUE;
- num_icons++;
- }
-
- e_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;
- if (e_categories_config_get_icon_for (category, &pixmap, &mask))
- num_icons++;
- }
-
- icon_x_inc = E_WEEK_VIEW_ICON_WIDTH + E_WEEK_VIEW_ICON_X_PAD;
-
- if (right_align)
- icon_x -= icon_x_inc * num_icons;
-
- if (draw_reminder_icon && icon_x + E_WEEK_VIEW_ICON_WIDTH <= x2) {
- gdk_gc_set_clip_origin (gc, icon_x, icon_y);
- gdk_gc_set_clip_mask (gc, week_view->reminder_mask);
- gdk_draw_pixmap (drawable, gc,
- week_view->reminder_icon,
- 0, 0, icon_x, icon_y,
- E_WEEK_VIEW_ICON_WIDTH,
- E_WEEK_VIEW_ICON_HEIGHT);
- icon_x += icon_x_inc;
- }
-
- if (draw_recurrence_icon && icon_x + E_WEEK_VIEW_ICON_WIDTH <= x2) {
- gdk_gc_set_clip_origin (gc, icon_x, icon_y);
- gdk_gc_set_clip_mask (gc, week_view->recurrence_mask);
- gdk_draw_pixmap (drawable, gc,
- week_view->recurrence_icon,
- 0, 0, icon_x, icon_y,
- E_WEEK_VIEW_ICON_WIDTH,
- E_WEEK_VIEW_ICON_HEIGHT);
- icon_x += icon_x_inc;
- }
-
- 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;
- if (!e_categories_config_get_icon_for (category, &pixmap, &mask))
- 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);
- }
-
- e_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;
- ECalendarViewPosition 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_CALENDAR_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_set_selected_time_range_visible (week_view, event->start, event->end);
-
- 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 0
- g_print ("In e_week_view_event_item_button_release\n");
-#endif
-
- if (week_view->pressed_event_num != -1
- && week_view->pressed_event_num == wveitem->event_num
- && week_view->pressed_span_num == wveitem->span_num) {
- e_week_view_start_editing_event (week_view,
- wveitem->event_num,
- wveitem->span_num,
- NULL);
- week_view->pressed_event_num = -1;
- return TRUE;
- }
-
- week_view->pressed_event_num = -1;
-
- return FALSE;
-}
-
-
-static 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);
-
- e_calendar_view_edit_appointment (E_CALENDAR_VIEW (week_view), event->comp_data->client, event->comp_data->icalcomp, FALSE);
-
- return TRUE;
-}
-
-
-static ECalendarViewPosition
-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_CALENDAR_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_CALENDAR_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_CALENDAR_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_CALENDAR_VIEW_POS_RIGHT_EDGE;
- }
-
- return E_CALENDAR_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 20cace0132..0000000000
--- a/calendar/gui/e-week-view-event-item.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 4ab1cf1fd9..0000000000
--- a/calendar/gui/e-week-view-layout.c
+++ /dev/null
@@ -1,425 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 2c6d5a29d8..0000000000
--- a/calendar/gui/e-week-view-layout.h
+++ /dev/null
@@ -1,69 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 ed823c2dcd..0000000000
--- a/calendar/gui/e-week-view-main-item.c
+++ /dev/null
@@ -1,400 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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-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
-};
-
-E_MAKE_TYPE (e_week_view_main_item, "EWeekViewMainItem", EWeekViewMainItem,
- e_week_view_main_item_class_init, e_week_view_main_item_init,
- GNOME_TYPE_CANVAS_ITEM);
-
-static void
-e_week_view_main_item_class_init (EWeekViewMainItemClass *class)
-{
- GtkObjectClass *object_class;
- GnomeCanvasItemClass *item_class;
-
- parent_class = g_type_class_peek_parent (class);
-
- 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;
- 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;
- PangoFontDescription *font_desc;
- PangoContext *pango_context;
- PangoFontMetrics *font_metrics;
- PangoLayout *layout;
-
-#if 0
- g_print ("Drawing Day:%i at %i,%i\n", day, x, y);
-#endif
- week_view = wvmitem->week_view;
- style = gtk_widget_get_style (GTK_WIDGET (week_view));
- gc = week_view->main_gc;
-
- /* Set up Pango prerequisites */
- font_desc = style->font_desc;
- pango_context = gtk_widget_get_pango_context (GTK_WIDGET (week_view));
- font_metrics = pango_context_get_metrics (pango_context, font_desc,
- pango_context_get_language (pango_context));
-
- 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 +
- PANGO_PIXELS (pango_font_metrics_get_ascent (font_metrics)) +
- PANGO_PIXELS (pango_font_metrics_get_descent (font_metrics)) +
- 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 (week_view->selection_start_day == -1
- || week_view->selection_start_day > day
- || week_view->selection_end_day < day)
- selected = FALSE;
- if (selected) {
- if (GTK_WIDGET_HAS_FOCUS (week_view))
- gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_SELECTED]);
- else
- gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_SELECTED_UNFOCUSSED]);
-
- 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 +
- PANGO_PIXELS (pango_font_metrics_get_ascent (font_metrics)) +
- PANGO_PIXELS (pango_font_metrics_get_descent (font_metrics)));
- } 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");
- }
-
- if (selected) {
- gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_DATES_SELECTED]);
- } else if (week_view->multi_week_view) {
- struct icaltimetype tt;
-
- /* Check if we are drawing today */
- tt = icaltime_from_timet_with_zone (time (NULL), FALSE,
- e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
- if (g_date_year (date) == tt.year
- && g_date_month (date) == tt.month
- && g_date_day (date) == tt.day)
- gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_TODAY]);
- else
- gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_DATES]);
- } else {
- gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_DATES]);
- }
-
- g_date_strftime (buffer, sizeof (buffer),
- format_string ? format_string : "%d", date);
-
- layout = gtk_widget_create_pango_layout (GTK_WIDGET (week_view), buffer);
- pango_layout_get_pixel_size (layout, &date_width, NULL);
- date_x = x + width - date_width - E_WEEK_VIEW_DATE_R_PAD;
- date_x = MAX (date_x, x + 1);
-
- gdk_draw_layout (drawable, gc,
- date_x,
- y + E_WEEK_VIEW_DATE_T_PAD,
- layout);
- g_object_unref (layout);
-
- /* 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);
- }
-
- pango_font_metrics_unref (font_metrics);
-}
-
-
-
-
-/* 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 35740479da..0000000000
--- a/calendar/gui/e-week-view-main-item.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 733bec9a81..0000000000
--- a/calendar/gui/e-week-view-titles-item.c
+++ /dev/null
@@ -1,296 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <string.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
-};
-
-E_MAKE_TYPE (e_week_view_titles_item, "EWeekViewTitlesItem", EWeekViewTitlesItem,
- e_week_view_titles_item_class_init, e_week_view_titles_item_init,
- GNOME_TYPE_CANVAS_ITEM);
-
-static void
-e_week_view_titles_item_class_init (EWeekViewTitlesItemClass *class)
-{
- GtkObjectClass *object_class;
- GnomeCanvasItemClass *item_class;
-
- parent_class = g_type_class_peek_parent (class);
-
- 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;
- 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;
- PangoLayout *layout;
-
-#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_get_style (GTK_WIDGET (week_view));
- 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;
- layout = gtk_widget_create_pango_layout (GTK_WIDGET (week_view), NULL);
-
- /* 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]);
-
- pango_layout_set_text (layout, buffer, -1);
- gdk_draw_layout (drawable, fg_gc,
- date_x - x,
- 3 - y,
- layout);
-
- 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);
- }
-
- g_object_unref (layout);
-}
-
-
-/* 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 77fed506c8..0000000000
--- a/calendar/gui/e-week-view-titles-item.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 dfa175c90e..0000000000
--- a/calendar/gui/e-week-view.c
+++ /dev/null
@@ -1,3676 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 "ea-calendar.h"
-
-#include <math.h>
-#include <gdk/gdkkeysyms.h>
-#include <gtk/gtkselection.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkvscrollbar.h>
-#include <gtk/gtkwindow.h>
-#include <gtk/gtkmain.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnome/gnome-exec.h>
-#include <libgnome/gnome-util.h>
-#include <gdk-pixbuf/gdk-pixbuf.h>
-#include <libgnomecanvas/gnome-canvas-pixbuf.h>
-#include <gal/e-text/e-text.h>
-#include <gal/widgets/e-canvas-utils.h>
-#include <gal/widgets/e-gui-utils.h>
-#include <gal/widgets/e-unicode.h>
-#include <e-util/e-categories-config.h>
-#include <e-util/e-dialog-utils.h>
-#include "dialogs/delete-comp.h"
-#include "dialogs/delete-error.h"
-#include "dialogs/send-comp.h"
-#include "dialogs/cancel-comp.h"
-#include "dialogs/recur-comp.h"
-#include "comp-util.h"
-#include "itip-utils.h"
-#include <libecal/e-cal-time-util.h>
-#include "calendar-commands.h"
-#include "calendar-config.h"
-#include "print.h"
-#include "goto.h"
-#include "e-cal-model-calendar.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"
-#include "misc.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_PTSIZE 7
-
-#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
-
-#define E_WEEK_VIEW_JUMP_BUTTON_NO_FOCUS -1
-
-/* 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
-
-
-typedef struct {
- EWeekView *week_view;
- ECalModelComponent *comp_data;
-} AddEventData;
-
-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 gboolean e_week_view_get_next_tab_event (EWeekView *week_view,
- GtkDirectionType direction,
- gint current_event_num,
- gint current_span_num,
- gint *next_event_num,
- gint *next_span_num);
-static gboolean e_week_view_focus (GtkWidget *widget,
- GtkDirectionType direction);
-static GList *e_week_view_get_selected_events (ECalendarView *cal_view);
-static void e_week_view_get_selected_time_range (ECalendarView *cal_view, time_t *start_time, time_t *end_time);
-static void e_week_view_set_selected_time_range (ECalendarView *cal_view, time_t start_time, time_t end_time);
-static gboolean e_week_view_get_visible_time_range (ECalendarView *cal_view, time_t *start_time, time_t *end_time);
-static void e_week_view_update_query (ECalendarView *cal_view);
-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_scroll (GtkWidget *widget,
- GdkEventScroll *scroll,
- 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 (ECalComponent *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_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 gboolean e_week_view_key_press (GtkWidget *widget, GdkEventKey *event);
-static gboolean e_week_view_do_key_press (GtkWidget *widget,
- GdkEventKey *event);
-static void e_week_view_on_key_up (EWeekView *week_view, GdkEventKey *event);
-static void e_week_view_on_key_down (EWeekView *week_view, GdkEventKey *event);
-static void e_week_view_on_key_left (EWeekView *week_view, GdkEventKey *event);
-static void e_week_view_on_key_right (EWeekView *week_view, GdkEventKey *event);
-static gboolean e_week_view_popup_menu (GtkWidget *widget);
-
-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 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 ECalendarViewClass *parent_class;
-
-E_MAKE_TYPE (e_week_view, "EWeekView", EWeekView, e_week_view_class_init,
- e_week_view_init, e_calendar_view_get_type ());
-
-static void
-e_week_view_class_init (EWeekViewClass *class)
-{
- GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
- ECalendarViewClass *view_class;
-
- parent_class = g_type_class_peek_parent (class);
- object_class = (GtkObjectClass *) class;
- widget_class = (GtkWidgetClass *) class;
- view_class = (ECalendarViewClass *) class;
-
- /* Method override */
- object_class->destroy = e_week_view_destroy;
-
- widget_class->realize = e_week_view_realize;
- widget_class->unrealize = e_week_view_unrealize;
- widget_class->style_set = e_week_view_style_set;
- widget_class->size_allocate = e_week_view_size_allocate;
- widget_class->focus_in_event = e_week_view_focus_in;
- widget_class->focus_out_event = e_week_view_focus_out;
- widget_class->key_press_event = e_week_view_key_press;
- widget_class->popup_menu = e_week_view_popup_menu;
- widget_class->expose_event = e_week_view_expose_event;
- widget_class->focus = e_week_view_focus;
-
- view_class->get_selected_events = e_week_view_get_selected_events;
- view_class->get_selected_time_range = e_week_view_get_selected_time_range;
- view_class->set_selected_time_range = e_week_view_set_selected_time_range;
- view_class->get_visible_time_range = e_week_view_get_visible_time_range;
- view_class->update_query = e_week_view_update_query;
-
- /* init the accessibility support for e_week_view */
- e_week_view_a11y_init ();
-}
-
-static void
-timezone_changed_cb (ECalendarView *cal_view, icaltimezone *old_zone,
- icaltimezone *new_zone, gpointer user_data)
-{
- struct icaltimetype tt = icaltime_null_time ();
- time_t lower;
- EWeekView *week_view = (EWeekView *) cal_view;
-
- g_return_if_fail (E_IS_WEEK_VIEW (week_view));
-
- /* 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, new_zone);
-
- e_week_view_recalc_day_starts (week_view, lower);
- e_week_view_update_query ((ECalendarView *) week_view);
-}
-
-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->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->multi_week_view = FALSE;
- week_view->weeks_shown = 6;
- week_view->rows = 6;
- week_view->columns = 2;
- week_view->compress_weekend = TRUE;
- week_view->show_event_end_times = TRUE;
- week_view->week_start_day = 0; /* Monday. */
- week_view->display_start_day = 0; /* Monday. */
-
- g_date_clear (&week_view->base_date, 1);
- g_date_clear (&week_view->first_day_shown, 1);
-
- week_view->row_height = 10;
- week_view->rows_per_cell = 1;
-
- week_view->selection_start_day = -1;
- week_view->selection_drag_pos = E_WEEK_VIEW_DRAG_NONE;
-
- week_view->pressed_event_num = -1;
- week_view->editing_event_num = -1;
-
- week_view->main_gc = NULL;
-
- /* Create the small font. */
- week_view->use_small_font = TRUE;
-
- week_view->small_font_desc =
- pango_font_description_copy (gtk_widget_get_style (GTK_WIDGET (week_view))->font_desc);
- pango_font_description_set_size (week_view->small_font_desc,
- E_WEEK_VIEW_SMALL_FONT_PTSIZE * PANGO_SCALE);
-
- /* 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);
-
- g_signal_connect_after (week_view->main_canvas, "button_press_event",
- G_CALLBACK (e_week_view_on_button_press), week_view);
- g_signal_connect (week_view->main_canvas, "button_release_event",
- G_CALLBACK (e_week_view_on_button_release), week_view);
- g_signal_connect (week_view->main_canvas, "scroll_event",
- G_CALLBACK (e_week_view_on_scroll), week_view);
- g_signal_connect (week_view->main_canvas, "motion_notify_event",
- G_CALLBACK (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);
-
- g_signal_connect (week_view->jump_buttons[i], "event",
- G_CALLBACK (e_week_view_on_jump_button_event), week_view);
- }
- week_view->focused_jump_button = E_WEEK_VIEW_JUMP_BUTTON_NO_FOCUS;
-
- gdk_pixbuf_unref (pixbuf);
-
- /*
- * Scrollbar.
- */
- adjustment = gtk_adjustment_new (0, -52, 52, 1, 1, 1);
- gtk_signal_connect (adjustment, "value_changed",
- G_CALLBACK (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;
-
- /* connect to ECalendarView's signals */
- g_signal_connect (G_OBJECT (week_view), "timezone_changed",
- G_CALLBACK (timezone_changed_cb), NULL);
-}
-
-
-/**
- * e_week_view_new:
- * @Returns: a new #EWeekView.
- *
- * Creates a new #EWeekView.
- **/
-GtkWidget *
-e_week_view_new (void)
-{
- GtkWidget *week_view;
- ECalModel *model;
-
- model = E_CAL_MODEL (e_cal_model_calendar_new ());
-
- week_view = GTK_WIDGET (g_object_new (e_week_view_get_type (), "model", model, NULL));
-
- g_object_unref (model);
-
- 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);
-
- if (week_view->events) {
- e_week_view_free_events (week_view);
- g_array_free (week_view->events, TRUE);
- week_view->events = NULL;
- }
-
- if (week_view->query) {
- g_signal_handlers_disconnect_matched (week_view->query, G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL, week_view);
- g_object_unref (week_view->query);
- week_view->query = NULL;
- }
-
- if (week_view->small_font_desc) {
- pango_font_description_free (week_view->small_font_desc);
- week_view->small_font_desc = NULL;
- }
-
- if (week_view->normal_cursor) {
- gdk_cursor_unref (week_view->normal_cursor);
- week_view->normal_cursor = NULL;
- }
- if (week_view->move_cursor) {
- gdk_cursor_unref (week_view->move_cursor);
- week_view->move_cursor = NULL;
- }
- if (week_view->resize_width_cursor) {
- gdk_cursor_unref (week_view->resize_width_cursor);
- week_view->resize_width_cursor = NULL;
- }
-
- 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_SELECTED_UNFOCUSSED].red = 16 * 257;
- week_view->colors[E_WEEK_VIEW_COLOR_SELECTED_UNFOCUSSED].green = 78 * 257;
- week_view->colors[E_WEEK_VIEW_COLOR_SELECTED_UNFOCUSSED].blue = 139 * 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;
-
- week_view->colors[E_WEEK_VIEW_COLOR_TODAY].red = 65535;
- week_view->colors[E_WEEK_VIEW_COLOR_TODAY].green = 0;
- week_view->colors[E_WEEK_VIEW_COLOR_TODAY].blue = 0;
-
- nfailed = gdk_colormap_alloc_colors (colormap, week_view->colors,
- E_WEEK_VIEW_COLOR_LAST, FALSE,
- TRUE, success);
- if (nfailed)
- g_warning ("Failed to allocate all colors");
-
-
- /* 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;
-
- week_view = E_WEEK_VIEW (widget);
-
- gdk_gc_unref (week_view->main_gc);
- week_view->main_gc = NULL;
-
- colormap = gtk_widget_get_colormap (widget);
- gdk_colormap_free_colors (colormap, week_view->colors, E_WEEK_VIEW_COLOR_LAST);
-
- 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 gint
-get_string_width (PangoLayout *layout, const gchar *string)
-{
- gint width;
-
- pango_layout_set_text (layout, string, -1);
- pango_layout_get_pixel_size (layout, &width, NULL);
- return width;
-}
-
-/* FIXME: This is also needed in e-day-view-time-item.c. We should probably use
- * pango's approximation function, but it needs a language tag. Find out how to
- * get one of those properly. */
-static gint
-get_digit_width (PangoLayout *layout)
-{
- gint digit;
- gint max_digit_width = 1;
-
- for (digit = '0'; digit <= '9'; digit++) {
- gchar digit_char;
- gint digit_width;
-
- digit_char = digit;
-
- pango_layout_set_text (layout, &digit_char, 1);
- pango_layout_get_pixel_size (layout, &digit_width, NULL);
-
- max_digit_width = MAX (max_digit_width, digit_width);
- }
-
- return max_digit_width;
-}
-
-static void
-e_week_view_style_set (GtkWidget *widget,
- GtkStyle *previous_style)
-{
- EWeekView *week_view;
- GtkStyle *style;
- gint day, day_width, max_day_width, max_abbr_day_width;
- gint month, month_width, max_month_width, max_abbr_month_width;
- GDate date;
- gchar buffer[128];
- PangoFontDescription *font_desc;
- PangoContext *pango_context;
- PangoFontMetrics *font_metrics;
- PangoLayout *layout;
-
- if (GTK_WIDGET_CLASS (parent_class)->style_set)
- (*GTK_WIDGET_CLASS (parent_class)->style_set)(widget, previous_style);
-
- week_view = E_WEEK_VIEW (widget);
- style = gtk_widget_get_style (widget);
-
- /* Set up Pango prerequisites */
- font_desc = style->font_desc;
- pango_context = gtk_widget_get_pango_context (widget);
- font_metrics = pango_context_get_metrics (pango_context, font_desc,
- pango_context_get_language (pango_context));
- layout = pango_layout_new (pango_context);
-
- /* Recalculate the height of each row based on the font size. */
- week_view->row_height = PANGO_PIXELS (pango_font_metrics_get_ascent (font_metrics)) +
- PANGO_PIXELS (pango_font_metrics_get_descent (font_metrics)) +
- 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_desc) {
- if (PANGO_PIXELS (pango_font_metrics_get_ascent (font_metrics)) +
- PANGO_PIXELS (pango_font_metrics_get_descent (font_metrics))
- <= E_WEEK_VIEW_SMALL_FONT_PTSIZE)
- week_view->use_small_font = FALSE;
- }
-
- /* Set the height of the top canvas. */
- gtk_widget_set_usize (week_view->titles_canvas, -1,
- PANGO_PIXELS (pango_font_metrics_get_ascent (font_metrics)) +
- PANGO_PIXELS (pango_font_metrics_get_descent (font_metrics)) + 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 = get_string_width (layout, 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 = get_string_width (layout, 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 = get_string_width (layout, 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 = get_string_width (layout, buffer);
- week_view->abbr_month_widths[month] = month_width;
- max_abbr_month_width = MAX (max_abbr_month_width, month_width);
- }
-
- week_view->space_width = get_string_width (layout, " ");
- week_view->colon_width = get_string_width (layout, ":");
- week_view->slash_width = get_string_width (layout, "/");
- week_view->digit_width = get_digit_width (layout);
- if (week_view->small_font_desc) {
- pango_layout_set_font_description (layout, week_view->small_font_desc);
- week_view->small_digit_width = get_digit_width (layout);
- pango_layout_set_font_description (layout, style->font_desc);
- }
- 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 = get_string_width (layout,
- week_view->am_string);
- week_view->pm_string_width = get_string_width (layout,
- week_view->pm_string);
-
- g_object_unref (layout);
- pango_font_metrics_unref (font_metrics);
-}
-
-
-/* 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;
- GtkStyle *style;
- gint width, height, time_width;
- PangoFontDescription *font_desc;
- PangoContext *pango_context;
- PangoFontMetrics *font_metrics;
-
- 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);
- style = gtk_widget_get_style (widget);
- if (!style)
- return;
- font_desc = style->font_desc;
- if (!font_desc)
- return;
-
- pango_context = gtk_widget_get_pango_context (widget);
- font_metrics = pango_context_get_metrics (pango_context, font_desc,
- pango_context_get_language (pango_context));
-
-
- /* 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 +
- + PANGO_PIXELS (pango_font_metrics_get_ascent (font_metrics))
- + PANGO_PIXELS (pango_font_metrics_get_descent (font_metrics))
- + E_WEEK_VIEW_DATE_B_PAD;
- } else {
- week_view->events_y_offset = E_WEEK_VIEW_DATE_T_PAD
- + PANGO_PIXELS (pango_font_metrics_get_ascent (font_metrics))
- + PANGO_PIXELS (pango_font_metrics_get_descent (font_metrics))
- + 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_desc) {
- 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;
- }
-
- pango_font_metrics_unref (font_metrics);
-}
-
-
-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;
-}
-
-/**
- * e_week_view_get_next_tab_event
- * @week_view: the week_view widget operate on
- * @direction: GTK_DIR_TAB_BACKWARD or GTK_DIR_TAB_FORWARD.
- * @current_event_num and @current_span_num: current status.
- * @next_event_num: the event number focus should go next.
- * -1 indicates focus should go to week_view widget.
- * @next_span_num: always return 0.
- **/
-static gboolean
-e_week_view_get_next_tab_event (EWeekView *week_view,
- GtkDirectionType direction,
- gint current_event_num,
- gint current_span_num,
- gint *next_event_num,
- gint *next_span_num)
-{
- gint event_num;
-
- g_return_val_if_fail (week_view != NULL, FALSE);
- g_return_val_if_fail (next_event_num != NULL, FALSE);
- g_return_val_if_fail (next_span_num != NULL, FALSE);
-
- if (week_view->events->len <= 0)
- return FALSE;
-
- /* we only tab through events not spans */
- *next_span_num = 0;
-
- switch (direction) {
- case GTK_DIR_TAB_BACKWARD:
- event_num = current_event_num - 1;
- break;
- case GTK_DIR_TAB_FORWARD:
- event_num = current_event_num + 1;
- break;
- default:
- return FALSE;
- }
-
- if (event_num == -1)
- /* backward, out of event range, go to week view widget
- */
- *next_event_num = -1;
- else if (event_num < -1)
- /* backward from week_view, go to the last event
- */
- *next_event_num = week_view->events->len - 1;
- else if (event_num >= week_view->events->len)
- /* forward, out of event range, go to week view widget
- */
- *next_event_num = -1;
- else
- *next_event_num = event_num;
- return TRUE;
-}
-
-static gboolean
-e_week_view_focus (GtkWidget *widget, GtkDirectionType direction)
-{
- EWeekView *week_view;
- gint new_event_num;
- gint new_span_num;
- gint event_loop;
- gboolean editable = FALSE;
- static gint last_focus_event_num = -1, last_focus_span_num = -1;
-
- g_return_val_if_fail (widget != NULL, FALSE);
- g_return_val_if_fail (E_IS_WEEK_VIEW (widget), FALSE);
-
- week_view = E_WEEK_VIEW (widget);
-
- if (week_view->focused_jump_button == E_WEEK_VIEW_JUMP_BUTTON_NO_FOCUS) {
- last_focus_event_num = week_view->editing_event_num;
- last_focus_span_num = week_view->editing_span_num;
- }
-
- for (event_loop = 0; event_loop < week_view->events->len;
- ++event_loop) {
- if (!e_week_view_get_next_tab_event (week_view, direction,
- last_focus_event_num,
- last_focus_span_num,
- &new_event_num,
- &new_span_num))
- return FALSE;
-
- if (new_event_num == -1) {
- /* focus should go to week_view widget
- */
- gtk_widget_grab_focus (widget);
- return TRUE;
- }
-
- editable = e_week_view_start_editing_event (week_view,
- new_event_num,
- new_span_num,
- NULL);
- if (editable)
- break;
- else {
- /* check if we should go to the jump button */
-
- EWeekViewEvent *event;
- EWeekViewEventSpan *span;
- gint current_day;
-
- event = &g_array_index (week_view->events,
- EWeekViewEvent,
- new_event_num);
- span = &g_array_index (week_view->spans,
- EWeekViewEventSpan,
- event->spans_index + new_span_num);
- current_day = span->start_day;
-
- if ((week_view->focused_jump_button != current_day) &&
- e_week_view_is_jump_button_visible(week_view, current_day)) {
-
- /* focus go to the jump button */
- e_week_view_stop_editing_event (week_view);
- gnome_canvas_item_grab_focus (week_view->jump_buttons[current_day]);
- return TRUE;
- }
- }
- last_focus_event_num = new_event_num;
- last_focus_span_num = new_span_num;
- }
- return editable;
-}
-
-/* Returns the currently-selected event, or NULL if none */
-static GList *
-e_week_view_get_selected_events (ECalendarView *cal_view)
-{
- EWeekViewEvent *event = NULL;
- GList *list = NULL;
- EWeekView *week_view = (EWeekView *) cal_view;
-
- g_return_val_if_fail (E_IS_WEEK_VIEW (week_view), NULL);
-
- if (week_view->editing_event_num != -1) {
- event = &g_array_index (week_view->events, EWeekViewEvent,
- week_view->editing_event_num);
- } else if (week_view->popup_event_num != -1) {
- event = &g_array_index (week_view->events, EWeekViewEvent,
- week_view->popup_event_num);
- }
-
- if (event)
- list = g_list_prepend (list, event);
-
- return list;
-}
-
-static void
-process_component (EWeekView *week_view, ECalModelComponent *comp_data)
-{
- EWeekViewEvent *event;
- gint event_num, num_days;
- ECalComponent *comp = NULL;
- AddEventData add_event_data;
- const char *uid;
-
- /* If we don't have a valid date set yet, just return. */
- if (!g_date_valid (&week_view->first_day_shown))
- return;
-
- comp = e_cal_component_new ();
- if (!e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp))) {
- g_object_unref (comp);
-
- g_message ("process_component(): Could not set icalcomponent on ECalComponent");
- return;
- }
-
- e_cal_component_get_uid (comp, &uid);
-
- /* 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)) {
- ECalComponent *tmp_comp;
-
- event = &g_array_index (week_view->events, EWeekViewEvent,
- event_num);
-
- tmp_comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (tmp_comp, icalcomponent_new_clone (comp_data->icalcomp));
- if (!e_cal_component_has_recurrences (comp)
- && !e_cal_component_has_recurrences (tmp_comp)
- && e_cal_component_event_dates_match (comp, tmp_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_data);
- g_object_unref (comp);
- g_object_unref (tmp_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);
-
- g_object_unref (tmp_comp);
- }
-
- /* Add the occurrences of the event */
- num_days = week_view->multi_week_view ? week_view->weeks_shown * 7 : 7;
-
- add_event_data.week_view = week_view;
- add_event_data.comp_data = comp_data;
- e_cal_recur_generate_instances (comp,
- week_view->day_starts[0],
- week_view->day_starts[num_days],
- e_week_view_add_event, &add_event_data,
- e_cal_resolve_tzid_cb, comp_data->client,
- e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
-
- g_object_unref (comp);
-
- e_week_view_queue_layout (week_view);
-}
-
-/* Restarts a query for the week view */
-static void
-e_week_view_update_query (ECalendarView *cal_view)
-{
- gint rows, r;
- EWeekView *week_view = E_WEEK_VIEW (cal_view);
-
- gtk_widget_queue_draw (week_view->main_canvas);
- e_week_view_free_events (week_view);
- e_week_view_queue_layout (week_view);
-
- rows = e_table_model_row_count (E_TABLE_MODEL (e_calendar_view_get_model (E_CALENDAR_VIEW (week_view))));
- for (r = 0; r < rows; r++) {
- ECalModelComponent *comp_data;
-
- comp_data = e_cal_model_get_component_at (e_calendar_view_get_model (E_CALENDAR_VIEW (week_view)), r);
- g_assert (comp_data != NULL);
- process_component (week_view, comp_data);
- }
-}
-
-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);
-}
-
-/* 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. */
-static void
-e_week_view_set_selected_time_range (ECalendarView *cal_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;
- EWeekView *week_view = E_WEEK_VIEW (cal_view);
-
- g_return_if_fail (E_IS_WEEK_VIEW (week_view));
-
- time_to_gdate_with_zone (&date, start_time, e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
-
- 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,
- e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
- start_time = time_day_begin_with_zone (start_time,
- e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
- e_week_view_recalc_day_starts (week_view, start_time);
- e_week_view_update_query ((ECalendarView *) 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,
- e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view))))
- week_view->selection_end_day = week_view->selection_start_day;
- else {
- time_to_gdate_with_zone (&end_date, end_time - 60, e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
- 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);
-}
-
-void
-e_week_view_set_selected_time_range_visible (EWeekView *week_view,
- time_t start_time,
- time_t end_time)
-{
- GDate date, end_date;
- gint num_days;
-
- g_return_if_fail (E_IS_WEEK_VIEW (week_view));
-
- time_to_gdate_with_zone (&date, start_time, e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
-
- /* Set the selection to the given days. */
- week_view->selection_start_day = g_date_julian (&date)
- - g_date_julian (&week_view->first_day_shown);
- if (end_time == start_time
- || end_time <= time_add_day_with_zone (start_time, 1,
- e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view))))
- week_view->selection_end_day = week_view->selection_start_day;
- else {
- time_to_gdate_with_zone (&end_date, end_time - 60, e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
- week_view->selection_end_day = g_date_julian (&end_date)
- - g_date_julian (&week_view->first_day_shown);
- }
-
- /* 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);
-
- gtk_widget_queue_draw (week_view->main_canvas);
-}
-
-
-/* Returns the selected time range. */
-static void
-e_week_view_get_selected_time_range (ECalendarView *cal_view,
- time_t *start_time,
- time_t *end_time)
-{
- gint start_day, end_day;
- EWeekView *week_view = E_WEEK_VIEW (cal_view);
-
- 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];
-}
-
-/* Gets the visible time range. Returns FALSE if no time range has been set. */
-static gboolean
-e_week_view_get_visible_time_range (ECalendarView *cal_view,
- time_t *start_time,
- time_t *end_time)
-{
- gint num_days;
- EWeekView *week_view = E_WEEK_VIEW (cal_view);
-
- /* 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;
-}
-
-
-/* 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,
- e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
-
- e_week_view_recalc_day_starts (week_view, start_time);
- e_week_view_update_query ((ECalendarView *) 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,
- e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
- 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);
-
- e_week_view_update_query ((ECalendarView *) 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);
- }
-
- gtk_widget_queue_draw (week_view->main_canvas);
-}
-
-/* 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);
-}
-
-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;
- const gchar *text;
- ECalModelComponent *comp_data;
-
- comp_data = data;
-
- event = &g_array_index (week_view->events, EWeekViewEvent, event_num);
-
- if (event->allocated_comp_data)
- e_cal_model_free_component_data (event->comp_data);
- event->comp_data = comp_data;
- event->allocated_comp_data = FALSE;
-
- for (span_num = 0; span_num < event->num_spans; span_num++) {
- span = &g_array_index (week_view->spans, EWeekViewEventSpan,
- event->spans_index + span_num);
-
- if (span->text_item) {
- text = icalcomponent_get_summary (comp_data->icalcomp);
- gnome_canvas_item_set (span->text_item,
- "text", text ? text : "",
- NULL);
-
- e_week_view_reshape_event_span (week_view, event_num,
- span_num);
- }
- }
- g_signal_emit_by_name (G_OBJECT(week_view),
- "event_changed", event);
-
-
- 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);
-
- u = icalcomponent_get_uid (event->comp_data->icalcomp);
- 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;
- }
- }
-
- if (event->allocated_comp_data) {
- e_cal_model_free_component_data (event->comp_data);
- event->allocated_comp_data = FALSE;
- }
-
- 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 0
- 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
-
- /* 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) {
- e_calendar_view_new_appointment (E_CALENDAR_VIEW (week_view));
- 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));
-
- if (day < week_view->selection_start_day || day > week_view->selection_end_day) {
- week_view->selection_start_day = day;
- week_view->selection_end_day = day;
- week_view->selection_drag_pos = E_WEEK_VIEW_DRAG_NONE;
-
- /* FIXME: Optimise? */
- gtk_widget_queue_draw (week_view->main_canvas);
- }
-
- e_week_view_show_popup_menu (week_view, event, -1);
- }
-
- return TRUE;
-}
-
-
-static gboolean
-e_week_view_on_button_release (GtkWidget *widget,
- GdkEventButton *event,
- EWeekView *week_view)
-{
- time_t start, end;
-
-#if 0
- g_print ("In e_week_view_on_button_release\n");
-#endif
-
- if (week_view->selection_drag_pos != E_WEEK_VIEW_DRAG_NONE) {
- week_view->selection_drag_pos = E_WEEK_VIEW_DRAG_NONE;
- gdk_pointer_ungrab (event->time);
- start = week_view->day_starts[week_view->selection_start_day];
- end = week_view->day_starts[week_view->selection_end_day + 1];
-
- gnome_calendar_set_selected_time_range (e_calendar_view_get_calendar (E_CALENDAR_VIEW (week_view)),
- start, end);
- }
-
- return FALSE;
-}
-
-static gboolean
-e_week_view_on_scroll (GtkWidget *widget,
- GdkEventScroll *scroll,
- EWeekView *week_view)
-{
- GtkAdjustment *adj = GTK_RANGE (week_view->vscrollbar)->adjustment;
- gfloat new_value;
-
- switch (scroll->direction){
- case GDK_SCROLL_UP:
- new_value = adj->value - adj->page_increment;
- break;
- case GDK_SCROLL_DOWN:
- new_value = adj->value + adj->page_increment;
- break;
- default:
- return FALSE;
- }
-
- new_value = CLAMP (new_value, adj->lower, adj->upper - adj->page_size);
- gtk_adjustment_set_value (adj, new_value);
-
- return TRUE;
-}
-
-
-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);
- if (event->allocated_comp_data)
- e_cal_model_free_component_data (event->comp_data);
- }
-
- 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 (ECalComponent *comp,
- time_t start,
- time_t end,
- gpointer data)
-
-{
- AddEventData *add_event_data;
- EWeekViewEvent event;
- gint num_days;
- struct icaltimetype start_tt, end_tt;
-
- add_event_data = data;
-
- /* Check that the event times are valid. */
- num_days = add_event_data->week_view->multi_week_view ? add_event_data->week_view->weeks_shown * 7 : 7;
-
-#if 0
- g_print ("View start:%li end:%li Event start:%li end:%li\n",
- add_event_data->week_view->day_starts[0], add_event_data->week_view->day_starts[num_days],
- start, end);
-#endif
- g_return_val_if_fail (start <= end, TRUE);
- g_return_val_if_fail (start < add_event_data->week_view->day_starts[num_days], TRUE);
- g_return_val_if_fail (end > add_event_data->week_view->day_starts[0], TRUE);
-
- start_tt = icaltime_from_timet_with_zone (start, FALSE,
- e_calendar_view_get_timezone (E_CALENDAR_VIEW (add_event_data->week_view)));
- end_tt = icaltime_from_timet_with_zone (end, FALSE,
- e_calendar_view_get_timezone (E_CALENDAR_VIEW (add_event_data->week_view)));
-
- if (add_event_data->comp_data) {
- event.comp_data = add_event_data->comp_data;
- event.allocated_comp_data = FALSE;
- } else {
- event.comp_data = g_new0 (ECalModelComponent, 1);
- event.allocated_comp_data = TRUE;
-
- event.comp_data->client = e_cal_model_get_default_client (e_calendar_view_get_model (E_CALENDAR_VIEW (add_event_data->week_view)));
- e_cal_component_commit_sequence (comp);
- event.comp_data->icalcomp = icalcomponent_new_clone (e_cal_component_get_icalcomponent (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,
- event.comp_data->client,
- e_calendar_view_get_timezone (E_CALENDAR_VIEW (add_event_data->week_view))))
- event.different_timezone = TRUE;
-
- g_array_append_val (add_event_data->week_view->events, event);
- add_event_data->week_view->events_sorted = FALSE;
- add_event_data->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;
- 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;
- ECalComponent *comp;
- gdouble text_x, text_y, text_w, text_h;
- gchar *text, *end_of_line;
- gint line_len, text_width;
- PangoFontDescription *font_desc;
- PangoContext *pango_context;
- PangoFontMetrics *font_metrics;
- PangoLayout *layout;
-
- event = &g_array_index (week_view->events, EWeekViewEvent, event_num);
- span = &g_array_index (week_view->spans, EWeekViewEventSpan,
- event->spans_index + span_num);
- comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
-
- 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;
-
- g_object_unref (comp);
- return;
- }
-
- /* Set up Pango prerequisites */
- font_desc = gtk_widget_get_style (GTK_WIDGET (week_view))->font_desc;
- pango_context = gtk_widget_get_pango_context (GTK_WIDGET (week_view));
- font_metrics = pango_context_get_metrics (pango_context, font_desc,
- pango_context_get_language (pango_context));
- layout = pango_layout_new (pango_context);
-
- /* 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, *elem;
-
- if (e_cal_component_has_alarms (comp))
- num_icons++;
- if (e_cal_component_has_recurrences (comp))
- num_icons++;
- if (event->different_timezone)
- num_icons++;
-
- e_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;
- if (e_categories_config_get_icon_for (category, &pixmap, &mask))
- num_icons++;
- }
-
- e_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) {
- ECalComponentText text;
-
- e_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 (),
- "anchor", GTK_ANCHOR_NW,
- "clip", TRUE,
- "max_lines", 1,
- "editable", TRUE,
- "text", text.value ? text.value : "",
- "use_ellipsis", TRUE,
- "fill_color_rgba", GNOME_CANVAS_COLOR(0, 0, 0),
- "im_context", E_CANVAS (week_view->main_canvas)->im_context,
- NULL);
-
- g_signal_connect (span->text_item, "event",
- G_CALLBACK (e_week_view_on_text_item_event),
- week_view);
- g_signal_emit_by_name (G_OBJECT(week_view),
- "event_added", event);
-
- }
-
- /* 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 =
- PANGO_PIXELS (pango_font_metrics_get_ascent (font_metrics)) +
- PANGO_PIXELS (pango_font_metrics_get_descent (font_metrics));
-
- 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. */
- g_object_get (G_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);
-
- pango_layout_set_text (layout, text, line_len);
- pango_layout_get_pixel_size (layout, &text_width, NULL);
- 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);
-
- g_object_unref (comp);
- g_object_unref (layout);
- pango_font_metrics_unref (font_metrics);
-}
-
-
-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, e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
-
- e_week_view_recalc_day_starts (week_view, lower);
- e_week_view_update_query ((ECalendarView *) week_view);
-
- /* Update the selection, if needed. */
- if (week_view->selection_start_day != -1) {
- start = week_view->day_starts[week_view->selection_start_day];
- end = week_view->day_starts[week_view->selection_end_day + 1];
- gnome_calendar_set_selected_time_range (e_calendar_view_get_calendar (E_CALENDAR_VIEW (week_view)),
- start, end);
- }
-}
-
-
-gboolean
-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 TRUE;
-
- 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 FALSE;
-
- 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. */
- g_object_get (G_OBJECT (span->text_item), "event_processor", &event_processor, NULL);
- if (event_processor) {
- command.action = E_TEP_MOVE;
- command.position = E_TEP_END_OF_BUFFER;
- g_signal_emit_by_name (event_processor,
- "command", &command);
- }
- return TRUE;
-}
-
-
-/* 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);
-}
-
-
-/* Cancels the current edition by resetting the appointment's text to its original value */
-static void
-cancel_editing (EWeekView *week_view)
-{
- int event_num, span_num;
- EWeekViewEvent *event;
- EWeekViewEventSpan *span;
- const gchar *summary;
-
- event_num = week_view->editing_event_num;
- span_num = week_view->editing_span_num;
-
- g_assert (event_num != -1);
-
- 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 text to what was in the component */
-
- summary = icalcomponent_get_summary (event->comp_data->icalcomp);
- g_object_set (G_OBJECT (span->text_item), "text", summary ? summary : "", NULL);
-
- /* Stop editing */
- e_week_view_stop_editing_event (week_view);
-}
-
-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;
- } else if (gdkevent->key.keyval == GDK_Escape) {
- cancel_editing (week_view);
- gtk_signal_emit_stop_by_name (GTK_OBJECT (item), "event");
- /* focus should go to week view when stop editing */
- gtk_widget_grab_focus (GTK_WIDGET (week_view));
- 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);
-
- e_calendar_view_edit_appointment (E_CALENDAR_VIEW (week_view),
- event->comp_data->client,
- event->comp_data->icalcomp, FALSE);
-
- 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 && !E_TEXT (item)->editing) {
- EWeekViewEvent *e;
-
- e = &g_array_index (week_view->events, EWeekViewEvent, event_num);
-
- if (!GTK_WIDGET_HAS_FOCUS (week_view))
- gtk_widget_grab_focus (GTK_WIDGET (week_view));
-
- e_week_view_set_selected_time_range_visible (week_view, e->start, e->end);
-
- 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;
- }
-
- if (gdkevent->button.button != 3) {
- 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);
- }
-
- g_signal_emit_by_name (week_view, "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;
- ECalComponent *comp;
- ECalComponentText summary;
- ECal *client;
- const char *uid;
- gboolean on_server;
-
- /* 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. */
- uid = icalcomponent_get_uid (event->comp_data->icalcomp);
- if (!uid)
- return;
-
- g_object_set (span->text_item, "handle_popup", FALSE, NULL);
- g_object_get (G_OBJECT (span->text_item), "text", &text, NULL);
- g_assert (text != NULL);
-
- comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
-
- client = event->comp_data->client;
- on_server = cal_comp_is_on_server (comp, client);
-
- if (string_is_empty (text) && !on_server) {
- const char *uid;
-
- e_cal_component_get_uid (comp, &uid);
-
- 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);
- goto out;
- }
-
- /* Only update the summary if necessary. */
- e_cal_component_get_summary (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 if (summary.value || !string_is_empty (text)) {
- icalcomponent *icalcomp = e_cal_component_get_icalcomponent (comp);
-
- summary.value = text;
- summary.altrep = NULL;
- e_cal_component_set_summary (comp, &summary);
-
- if (!on_server) {
- if (!e_cal_create_object (client, icalcomp, NULL, NULL))
- g_message (G_STRLOC ": Could not create the object!");
- } else {
- CalObjModType mod = CALOBJ_MOD_ALL;
- GtkWindow *toplevel;
-
- if (e_cal_component_has_recurrences (comp)) {
- if (!recur_component_dialog (client, comp, &mod, NULL)) {
- goto out;
- }
- }
-
- /* FIXME When sending here, what exactly should we send? */
- toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (week_view)));
- if (e_cal_modify_object (client, icalcomp, mod, NULL)) {
- if (itip_organizer_is_user (comp, client)
- && send_component_dialog (toplevel, client, comp, FALSE))
- itip_send_comp (E_CAL_COMPONENT_METHOD_REQUEST, comp,
- client, NULL);
- }
- }
- }
-
- out:
-
- g_free (text);
- g_object_unref (comp);
-
- g_signal_emit_by_name (week_view, "selection_changed");
-}
-
-
-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;
-
- *event_num_return = -1;
- if (!uid)
- return FALSE;
-
- 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);
-
- u = icalcomponent_get_uid (event->comp_data->icalcomp);
- 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 gboolean
-e_week_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
-{
- EWeekView *week_view;
- ECalComponent *comp;
- icalcomponent *icalcomp;
- gint event_num;
- gchar *initial_text;
- ECalComponentDateTime date;
- struct icaltimetype itt;
- time_t dtstart, dtend;
- const char *uid;
- AddEventData add_event_data;
-
- 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_CALENDAR_VIEW_POS_NONE) {
- if (event->keyval == GDK_Escape) {
- e_week_view_abort_resize (week_view, event->time);
- }
- return FALSE;
- }
-#endif
-
- /*Navigation through days with arrow keys*/
- switch (event->keyval) {
- case GDK_Up:
- e_week_view_on_key_up (week_view, event);
- return TRUE;
- case GDK_Down:
- e_week_view_on_key_down (week_view, event);
- return TRUE;
- case GDK_Left:
- e_week_view_on_key_left (week_view, event);
- return TRUE;
- case GDK_Right:
- e_week_view_on_key_right (week_view, event);
- return TRUE;
- default:
- break;
- }
-
- 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->state & (GDK_CONTROL_MASK | GDK_MOD1_MASK)))
- || (event->length == 0)
- || (event->keyval == GDK_Tab)) {
- return FALSE;
- } else
- initial_text = e_utf8_from_gtk_event_key (widget, event->keyval, event->string);
-
- /* Add a new event covering the selected range. */
- icalcomp = e_cal_model_create_component_with_defaults (e_calendar_view_get_model (E_CALENDAR_VIEW (week_view)));
- if (!icalcomp)
- return FALSE;
- uid = icalcomponent_get_uid (icalcomp);
-
- comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomp);
-
- dtstart = week_view->day_starts[week_view->selection_start_day];
- dtend = week_view->day_starts[week_view->selection_end_day + 1];
-
- date.value = &itt;
- date.tzid = NULL;
-
- /* We use DATE values now, so we don't need the timezone. */
- /*date.tzid = icaltimezone_get_tzid (e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));*/
-
- *date.value = icaltime_from_timet_with_zone (dtstart, TRUE,
- e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
- e_cal_component_set_dtstart (comp, &date);
-
- *date.value = icaltime_from_timet_with_zone (dtend, TRUE,
- e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
- e_cal_component_set_dtend (comp, &date);
-
- e_cal_component_set_categories (
- comp, e_calendar_view_get_default_category (E_CALENDAR_VIEW (week_view)));
-
- /* We add the event locally and start editing it. We don't send it
- to the server until the user finishes editing it. */
- add_event_data.week_view = week_view;
- add_event_data.comp_data = NULL;
- e_week_view_add_event (comp, dtstart, dtend, &add_event_data);
- e_week_view_check_layout (week_view);
- gtk_widget_queue_draw (week_view->main_canvas);
-
- if (e_week_view_find_event_from_uid (week_view, 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);
-
- g_object_unref (comp);
-
- return TRUE;
-}
-
-static void
-e_week_view_on_key_up (EWeekView *week_view, GdkEventKey *event)
-{
- gint selection_start_day, selection_end_day;
-
- selection_start_day = week_view->selection_start_day;
- selection_end_day = week_view->selection_end_day;
-
- if (selection_start_day == -1) {
- selection_start_day = 0;
- selection_end_day = 0;
- }
-
- if (week_view->multi_week_view) {
- if (selection_end_day < 7) {
- g_date_subtract_days (&(week_view->first_day_shown), 7);
- } else
- selection_end_day -= 7;
- }
- else {
- if (selection_start_day == selection_end_day) {
- if (selection_end_day == 0) {
- g_date_subtract_days (&(week_view->first_day_shown), 7);
- selection_end_day = 6;
- } else
- selection_end_day--;
- } else {
- selection_end_day =
- (selection_start_day + selection_end_day)/2;
- }
- }
-
- week_view->selection_start_day = selection_end_day;
- week_view->selection_end_day = selection_end_day;
-
- gtk_widget_queue_draw (week_view->main_canvas);
-}
-
-static void
-e_week_view_on_key_down (EWeekView *week_view, GdkEventKey *event)
-{
- gint selection_start_day, selection_end_day;
-
- selection_start_day = week_view->selection_start_day;
- selection_end_day = week_view->selection_end_day;
-
- if (selection_start_day == -1) {
- selection_start_day = 0;
- selection_end_day = 0;
- }
-
- if (week_view->multi_week_view) {
- if ((selection_end_day+7) / 7 >= week_view->weeks_shown) {
- g_date_add_days (&(week_view->first_day_shown), 7);
- } else
- selection_end_day += 7;
- }
- else {
- if (selection_start_day == selection_end_day) {
- if (selection_end_day == 6) {
- g_date_add_days (&(week_view->first_day_shown), 7);
- selection_end_day = 0;
- } else
- selection_end_day++;
- } else {
- selection_end_day =
- (selection_start_day + selection_end_day)/2;
- }
- }
-
- week_view->selection_start_day = selection_end_day;
- week_view->selection_end_day = selection_end_day;
-
- gtk_widget_queue_draw (week_view->main_canvas);
-}
-
-static void
-e_week_view_on_key_left (EWeekView *week_view, GdkEventKey *event)
-{
- gint selection_start_day, selection_end_day;
-
- selection_start_day = week_view->selection_start_day;
- selection_end_day = week_view->selection_end_day;
-
- if (selection_start_day == -1) {
- selection_start_day = 0;
- selection_end_day = 0;
- }
-
- if (week_view->multi_week_view) {
- if (selection_end_day == 0) {
- g_date_subtract_days (&(week_view->first_day_shown), 7);
- selection_end_day = 6;
- } else
- selection_end_day -= 1;
- }
- else {
- switch (selection_end_day) {
- case 0:
- case 1:
- case 2:
- g_date_subtract_days (&(week_view->first_day_shown), 7);
- selection_end_day += 3;
- break;
- case 3:
- case 4:
- case 5:
- selection_end_day -= 3;
- break;
- case 6:
- selection_end_day -= 4;
- break;
- default:
- break;
- }
- }
-
- week_view->selection_start_day = selection_end_day;
- week_view->selection_end_day = selection_end_day;
-
- gtk_widget_queue_draw (week_view->main_canvas);
-
-}
-
-static void
-e_week_view_on_key_right (EWeekView *week_view, GdkEventKey *event)
-{
-
- gint selection_start_day, selection_end_day;
-
- selection_start_day = week_view->selection_start_day;
- selection_end_day = week_view->selection_end_day;
-
- if (selection_start_day == -1) {
- selection_start_day = 0;
- selection_end_day = 0;
- }
-
- if (week_view->multi_week_view) {
- if (selection_end_day == week_view->weeks_shown*7 -1 ) {
- g_date_add_days (&(week_view->first_day_shown), 7);
- selection_end_day -= 6;
- } else
- selection_end_day++;
- }
- else {
- switch (selection_end_day) {
- case 0:
- case 1:
- case 2:
- selection_end_day += 3;
- break;
- case 3:
- case 4:
- case 5:
- g_date_add_days (&(week_view->first_day_shown), 7);
- selection_end_day -= 3;
- break;
- case 6:
- g_date_add_days (&(week_view->first_day_shown), 7);
- selection_end_day -= 4;
- break;
- default:
- break;
- }
- }
-
- week_view->selection_start_day = selection_end_day;
- week_view->selection_end_day = selection_end_day;
-
- gtk_widget_queue_draw (week_view->main_canvas);
-}
-
-static gboolean
-e_week_view_key_press (GtkWidget *widget, GdkEventKey *event)
-{
- gboolean handled = FALSE;
- handled = e_week_view_do_key_press (widget, event);
-
- /* if not handled, try key bindings */
- if (!handled)
- handled = GTK_WIDGET_CLASS (parent_class)->key_press_event (widget, event);
- return handled;
-}
-
-void
-e_week_view_show_popup_menu (EWeekView *week_view,
- GdkEventButton *bevent,
- gint event_num)
-{
- GtkMenu *popup;
-
- week_view->popup_event_num = event_num;
-
- popup = e_calendar_view_create_popup_menu (E_CALENDAR_VIEW (week_view));
- e_popup_menu (popup, (GdkEvent *) bevent);
-}
-
-static gboolean
-e_week_view_popup_menu (GtkWidget *widget)
-{
- EWeekView *week_view = E_WEEK_VIEW (widget);
- e_week_view_show_popup_menu (week_view, NULL,
- week_view->editing_event_num);
- return TRUE;
-}
-
-void
-e_week_view_jump_to_button_item (EWeekView *week_view, GnomeCanvasItem *item)
-{
- gint day;
- GnomeCalendar *calendar;
-
- for (day = 0; day < E_WEEK_VIEW_MAX_WEEKS * 7; ++day) {
- if (item == week_view->jump_buttons[day]) {
- calendar = e_calendar_view_get_calendar (E_CALENDAR_VIEW (week_view));
- if (calendar)
- gnome_calendar_dayjump
- (calendar,
- week_view->day_starts[day]);
- else
- g_warning ("Calendar not set");
- return;
- }
- }
-}
-
-static gboolean
-e_week_view_on_jump_button_event (GnomeCanvasItem *item,
- GdkEvent *event,
- EWeekView *week_view)
-{
- gint day;
-
- if (event->type == GDK_BUTTON_PRESS) {
- e_week_view_jump_to_button_item (week_view, item);
- return TRUE;
- }
- else if (event->type == GDK_KEY_PRESS) {
- /* return, if Tab, Control or Alt is pressed */
- if ((event->key.keyval == GDK_Tab) ||
- (event->key.state & (GDK_CONTROL_MASK | GDK_MOD1_MASK)))
- return FALSE;
- /* with a return key or a simple character (from 0x20 to 0xff),
- * jump to the day
- */
- if ((event->key.keyval == GDK_Return) ||
- ((event->key.keyval >= 0x20) &&
- (event->key.keyval <= 0xFF))) {
- e_week_view_jump_to_button_item (week_view, item);
- return TRUE;
- }
- }
- else if (event->type == GDK_FOCUS_CHANGE) {
- GdkEventFocus *focus_event = (GdkEventFocus *)event;
- GdkPixbuf *pixbuf = NULL;
-
- for (day = 0; day < E_WEEK_VIEW_MAX_WEEKS * 7; day++) {
- if (item == week_view->jump_buttons[day])
- break;
- }
-
- if (focus_event->in) {
- week_view->focused_jump_button = day;
- pixbuf = gdk_pixbuf_new_from_xpm_data ((const char**) jump_xpm_focused);
- gnome_canvas_item_set (week_view->jump_buttons[day],
- "GnomeCanvasPixbuf::pixbuf",
- pixbuf, NULL);
- }
- else {
- week_view->focused_jump_button = E_WEEK_VIEW_JUMP_BUTTON_NO_FOCUS;
- pixbuf = gdk_pixbuf_new_from_xpm_data ((const char**) jump_xpm);
- gnome_canvas_item_set (week_view->jump_buttons[day],
- "GnomeCanvasPixbuf::pixbuf",
- pixbuf, NULL);
- }
- if (pixbuf)
- gdk_pixbuf_unref (pixbuf);
- }
-
- 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 (e_calendar_view_get_use_24_hour_format (E_CALENDAR_VIEW (week_view))) {
- *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_desc)
- 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 (!e_calendar_view_get_use_24_hour_format (E_CALENDAR_VIEW (week_view)))
- time_width += MAX (week_view->am_string_width,
- week_view->pm_string_width);
-
- return time_width;
-}
-
-/* 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;
-}
-
-gboolean
-e_week_view_is_jump_button_visible (EWeekView *week_view, gint day)
-{
- g_return_val_if_fail (E_IS_WEEK_VIEW (week_view), FALSE);
-
- if ((day >= 0) && (day < E_WEEK_VIEW_MAX_WEEKS * 7))
- return week_view->jump_buttons[day]->object.flags & GNOME_CANVAS_ITEM_VISIBLE;
- return FALSE;
-}
diff --git a/calendar/gui/e-week-view.h b/calendar/gui/e-week-view.h
deleted file mode 100644
index aca3f2bc2a..0000000000
--- a/calendar/gui/e-week-view.h
+++ /dev/null
@@ -1,438 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 <libgnomecanvas/gnome-canvas.h>
-#include <gal/widgets/e-popup-menu.h>
-
-#include "e-cal-view.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_SELECTED_UNFOCUSSED,
- E_WEEK_VIEW_COLOR_DATES,
- E_WEEK_VIEW_COLOR_DATES_SELECTED,
- E_WEEK_VIEW_COLOR_TODAY,
-
- 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;
-
-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 {
- E_CALENDAR_VIEW_EVENT_FIELDS
- gint spans_index;
- guint8 num_spans;
-};
-
-
-#define E_WEEK_VIEW(obj) GTK_CHECK_CAST (obj, e_week_view_get_type (), EWeekView)
-#define E_WEEK_VIEW_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, e_week_view_get_type (), EWeekViewClass)
-#define E_IS_WEEK_VIEW(obj) GTK_CHECK_TYPE (obj, e_week_view_get_type ())
-
-
-typedef struct _EWeekView EWeekView;
-typedef struct _EWeekViewClass EWeekViewClass;
-
-struct _EWeekView
-{
- ECalendarView cal_view;
-
- /* 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];
- gint focused_jump_button;
-
- GtkWidget *vscrollbar;
-
- /* The query object */
- ECalView *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 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;
-
- /* 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. */
- PangoFontDescription *small_font_desc;
-
- /* 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;
-};
-
-struct _EWeekViewClass
-{
- ECalendarViewClass parent_class;
-};
-
-
-GtkType e_week_view_get_type (void);
-GtkWidget* e_week_view_new (void);
-
-/* 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);
-
-/* 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_visible (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);
-
-void e_week_view_delete_occurrence (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);
-gboolean 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);
-
-gboolean e_week_view_find_event_from_item (EWeekView *week_view,
- GnomeCanvasItem *item,
- gint *event_num_return,
- gint *span_num_return);
-
-gboolean e_week_view_is_jump_button_visible (EWeekView *week_view,
- gint day);
-void e_week_view_jump_to_button_item (EWeekView *week_view, GnomeCanvasItem *item);
-
-#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 8978f38988..0000000000
--- a/calendar/gui/gnome-cal.c
+++ /dev/null
@@ -1,2925 +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.
- * Copyright (C) 2003 Novell, Inc
- *
- * Authors: Miguel de Icaza <miguel@ximian.com>
- * Federico Mena-Quintero <federico@ximian.com>
- * Seth Alves <alves@hungry.com>
- * Rodrigo Moya <rodrigo@ximian.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <gdk/gdkkeysyms.h>
-#include <gtk/gtkbindings.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnome/gnome-util.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-dialog-util.h>
-#include <bonobo/bonobo-exception.h>
-#include "e-util/e-url.h"
-#include <libecal/e-cal-time-util.h>
-#include "widgets/menus/gal-view-menus.h"
-#include "e-comp-editor-registry.h"
-#include "dialogs/delete-error.h"
-#include "dialogs/event-editor.h"
-#include "dialogs/task-editor.h"
-#include "comp-util.h"
-#include "e-cal-model-calendar.h"
-#include "e-day-view.h"
-#include "e-day-view-config.h"
-#include "e-day-view-time-item.h"
-#include "e-week-view.h"
-#include "e-week-view-config.h"
-#include "e-cal-list-view.h"
-#include "e-cal-list-view-config.h"
-#include "e-mini-calendar-config.h"
-#include "e-calendar-table-config.h"
-#include "evolution-calendar.h"
-#include "gnome-cal.h"
-#include "calendar-component.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"
-#include "misc.h"
-#include "ea-calendar.h"
-
-
-
-/* Private part of the GnomeCalendar structure */
-struct _GnomeCalendarPrivate {
- /* The calendars for display */
- GHashTable *clients;
- GList *clients_list;
-
- /* Set of categories from the calendar client */
- /* FIXME are we getting all the categories? */
- GPtrArray *cal_categories;
-
- /*
- * The TaskPad Folder.
- */
-
- /* The calendar client object we monitor */
- ECal *task_pad_client;
-
- /* Set of categories from the tasks client */
- GPtrArray *tasks_categories;
-
- /*
- * Fields for the calendar view
- */
-
- /* 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;
- EMiniCalendarConfig *date_navigator_config;
- GtkWidget *todo;
- ECalendarTableConfig *todo_config;
-
- GtkWidget *day_view;
- GtkWidget *work_week_view;
- GtkWidget *week_view;
- GtkWidget *month_view;
- GtkWidget *list_view;
-
- /* Calendar query for the date navigator */
- GList *dn_queries; /* list of CalQueries */
- char *sexp;
- guint e_cal_view_timeout;
-
- /* 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. */
- ECalendarView *views[GNOME_CAL_LAST_VIEW];
- GObject *configs[GNOME_CAL_LAST_VIEW];
- GnomeCalendarViewType current_view_type;
- GList *notifications;
-
- 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. */
- gint hpane_pos;
- gint vpane_pos;
- gint hpane_pos_month_view;
- gint vpane_pos_month_view;
-
- /* The signal handler id for our GtkCalendar "day_selected" handler. */
- guint day_selected_id;
-
- /* View instance and menus for the control */
- GalViewInstance *view_instance;
- GalViewMenus *view_menus;
-
- /* 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,
- CALENDAR_SELECTION_CHANGED,
- TASKPAD_SELECTION_CHANGED,
- CALENDAR_FOCUS_CHANGE,
- TASKPAD_FOCUS_CHANGE,
- GOTO_DATE,
- LAST_SIGNAL
-};
-
-/* Used to indicate who has the focus within the calendar view */
-typedef enum {
- FOCUS_CALENDAR,
- FOCUS_TASKPAD,
- FOCUS_OTHER
-} FocusLocation;
-
-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_goto_date (GnomeCalendar *gcal,
- GnomeCalendarGotoDateType goto_date);
-
-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_hpane_realized (GtkWidget *w, GnomeCalendar *gcal);
-static void gnome_calendar_vpane_realized (GtkWidget *w, GnomeCalendar *gcal);
-static gboolean gnome_calendar_vpane_resized (GtkWidget *w, GdkEventButton *e, GnomeCalendar *gcal);
-static gboolean gnome_calendar_hpane_resized (GtkWidget *w, GdkEventButton *e, GnomeCalendar *gcal);
-
-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;
-
-
-
-
-E_MAKE_TYPE (gnome_calendar, "GnomeCalendar", GnomeCalendar, gnome_calendar_class_init,
- gnome_calendar_init, GTK_TYPE_VBOX);
-
-/* Class initialization function for the gnome calendar */
-static void
-gnome_calendar_class_init (GnomeCalendarClass *class)
-{
- GtkObjectClass *object_class;
- GtkBindingSet *binding_set;
-
- object_class = (GtkObjectClass *) class;
-
- parent_class = g_type_class_peek_parent (class);
-
- gnome_calendar_signals[DATES_SHOWN_CHANGED] =
- gtk_signal_new ("dates_shown_changed",
- GTK_RUN_LAST,
- G_TYPE_FROM_CLASS (object_class),
- GTK_SIGNAL_OFFSET (GnomeCalendarClass,
- dates_shown_changed),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
-
- gnome_calendar_signals[CALENDAR_SELECTION_CHANGED] =
- gtk_signal_new ("calendar_selection_changed",
- GTK_RUN_LAST,
- G_TYPE_FROM_CLASS (object_class),
- GTK_SIGNAL_OFFSET (GnomeCalendarClass, calendar_selection_changed),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
-
- gnome_calendar_signals[TASKPAD_SELECTION_CHANGED] =
- gtk_signal_new ("taskpad_selection_changed",
- GTK_RUN_LAST,
- G_TYPE_FROM_CLASS (object_class),
- GTK_SIGNAL_OFFSET (GnomeCalendarClass, taskpad_selection_changed),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
-
- gnome_calendar_signals[CALENDAR_FOCUS_CHANGE] =
- gtk_signal_new ("calendar_focus_change",
- GTK_RUN_FIRST,
- G_TYPE_FROM_CLASS (object_class),
- GTK_SIGNAL_OFFSET (GnomeCalendarClass, calendar_focus_change),
- gtk_marshal_NONE__BOOL,
- GTK_TYPE_NONE, 1,
- GTK_TYPE_BOOL);
-
- gnome_calendar_signals[TASKPAD_FOCUS_CHANGE] =
- gtk_signal_new ("taskpad_focus_change",
- GTK_RUN_FIRST,
- G_TYPE_FROM_CLASS (object_class),
- GTK_SIGNAL_OFFSET (GnomeCalendarClass, taskpad_focus_change),
- gtk_marshal_NONE__BOOL,
- GTK_TYPE_NONE, 1,
- GTK_TYPE_BOOL);
-
- gnome_calendar_signals[GOTO_DATE] =
- g_signal_new ("goto_date",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
- G_STRUCT_OFFSET (GnomeCalendarClass, goto_date),
- NULL, NULL,
- g_cclosure_marshal_VOID__INT,
- G_TYPE_NONE,
- 1,
- G_TYPE_INT);
-
-
- object_class->destroy = gnome_calendar_destroy;
-
- class->dates_shown_changed = NULL;
- class->calendar_selection_changed = NULL;
- class->taskpad_selection_changed = NULL;
- class->calendar_focus_change = NULL;
- class->taskpad_focus_change = NULL;
- class->goto_date = gnome_calendar_goto_date;
-
- /*
- * Key bindings
- */
-
- binding_set = gtk_binding_set_by_class (class);
-
- /* Alt+PageUp/PageDown, go to the first/last day of the month */
- gtk_binding_entry_add_signal (binding_set, GDK_Page_Up,
- GDK_MOD1_MASK,
- "goto_date", 1,
- G_TYPE_ENUM,
- GNOME_CAL_GOTO_FIRST_DAY_OF_MONTH);
- gtk_binding_entry_add_signal (binding_set, GDK_KP_Page_Up,
- GDK_MOD1_MASK,
- "goto_date", 1,
- G_TYPE_ENUM,
- GNOME_CAL_GOTO_FIRST_DAY_OF_MONTH);
- gtk_binding_entry_add_signal (binding_set, GDK_Page_Down,
- GDK_MOD1_MASK,
- "goto_date", 1,
- G_TYPE_ENUM,
- GNOME_CAL_GOTO_LAST_DAY_OF_MONTH);
- gtk_binding_entry_add_signal (binding_set, GDK_KP_Page_Down,
- GDK_MOD1_MASK,
- "goto_date", 1,
- G_TYPE_ENUM,
- GNOME_CAL_GOTO_LAST_DAY_OF_MONTH);
-
- /* Alt+Home/End, go to the first/last day of the week */
- gtk_binding_entry_add_signal (binding_set, GDK_Home,
- GDK_MOD1_MASK,
- "goto_date", 1,
- G_TYPE_ENUM,
- GNOME_CAL_GOTO_FIRST_DAY_OF_WEEK);
- gtk_binding_entry_add_signal (binding_set, GDK_End,
- GDK_MOD1_MASK,
- "goto_date", 1,
- G_TYPE_ENUM,
- GNOME_CAL_GOTO_LAST_DAY_OF_WEEK);
- gtk_binding_entry_add_signal (binding_set, GDK_KP_Home,
- GDK_MOD1_MASK,
- "goto_date", 1,
- G_TYPE_ENUM,
- GNOME_CAL_GOTO_FIRST_DAY_OF_WEEK);
- gtk_binding_entry_add_signal (binding_set, GDK_KP_End,
- GDK_MOD1_MASK,
- "goto_date", 1,
- G_TYPE_ENUM,
- GNOME_CAL_GOTO_LAST_DAY_OF_WEEK);
-
- /*Alt+Left/Right, go to the same day of the previous/next week*/
- gtk_binding_entry_add_signal (binding_set,GDK_Left,
- GDK_MOD1_MASK,
- "goto_date",1,
- G_TYPE_ENUM,
- GNOME_CAL_GOTO_SAME_DAY_OF_PREVIOUS_WEEK);
- gtk_binding_entry_add_signal (binding_set,GDK_KP_Left,
- GDK_MOD1_MASK,
- "goto_date",1,
- G_TYPE_ENUM,
- GNOME_CAL_GOTO_SAME_DAY_OF_PREVIOUS_WEEK);
- gtk_binding_entry_add_signal (binding_set,GDK_Right,
- GDK_MOD1_MASK,
- "goto_date",1,
- G_TYPE_ENUM,
- GNOME_CAL_GOTO_SAME_DAY_OF_NEXT_WEEK);
- gtk_binding_entry_add_signal (binding_set,GDK_KP_Right,
- GDK_MOD1_MASK,
- "goto_date",1,
- G_TYPE_ENUM,
- GNOME_CAL_GOTO_SAME_DAY_OF_NEXT_WEEK);
- /* init the accessibility support for gnome_calendar */
- gnome_calendar_a11y_init ();
-
-}
-
-/* Callback used when the calendar query reports of an updated object */
-static void
-dn_e_cal_view_objects_added_cb (ECalView *query, GList *objects, gpointer data)
-{
- GnomeCalendar *gcal;
- GnomeCalendarPrivate *priv;
- GList *l;
-
- gcal = GNOME_CALENDAR (data);
- priv = gcal->priv;
-
- for (l = objects; l; l = l->next) {
- ECalComponent *comp = NULL;
-
- comp = e_cal_component_new ();
- if (!e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (l->data))) {
- g_object_unref (comp);
-
- continue;
- }
-
- tag_calendar_by_comp (priv->date_navigator, comp, e_cal_view_get_client (query), NULL,
- FALSE, TRUE);
- g_object_unref (comp);
- }
-}
-
-static void
-dn_e_cal_view_objects_modified_cb (ECalView *query, GList *objects, gpointer data)
-{
- GnomeCalendar *gcal;
- GnomeCalendarPrivate *priv;
-
- gcal = GNOME_CALENDAR (data);
- priv = gcal->priv;
-
- /* We have to retag the whole thing: an event may change dates
- * and the tag_calendar_by_comp() below would not know how to
- * untag the old dates.
- */
- update_query (gcal);
-}
-
-/* Callback used when the calendar query reports of a removed object */
-static void
-dn_e_cal_view_objects_removed_cb (ECalView *query, GList *uids, 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_e_cal_view_done_cb (ECalView *query, ECalendarStatus status, gpointer data)
-{
- GnomeCalendar *gcal;
-
- gcal = GNOME_CALENDAR (data);
-
- /* FIXME Better error reporting */
- if (status != E_CALENDAR_STATUS_OK)
- g_warning (G_STRLOC ": Query did not successfully complete");
-}
-
-/* Returns the current view widget, an EDayView, EWeekView or ECalListView. */
-GtkWidget*
-gnome_calendar_get_current_view_widget (GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
-
- priv = gcal->priv;
-
- return GTK_WIDGET (priv->views[priv->current_view_type]);
-}
-
-/* Gets the focus location based on who is the focused widget within the
- * calendar view.
- */
-static FocusLocation
-get_focus_location (GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
- ETable *etable;
-
- priv = gcal->priv;
-
- etable = e_calendar_table_get_table (E_CALENDAR_TABLE (priv->todo));
-
- if (GTK_WIDGET_HAS_FOCUS (etable->table_canvas))
- return FOCUS_TASKPAD;
- else {
- GtkWidget *widget;
- EDayView *dv;
- EWeekView *wv;
- ECalListView *lv;
-
- widget = gnome_calendar_get_current_view_widget (gcal);
-
- switch (priv->current_view_type) {
- case GNOME_CAL_DAY_VIEW:
- case GNOME_CAL_WORK_WEEK_VIEW:
- dv = E_DAY_VIEW (widget);
-
- if (GTK_WIDGET_HAS_FOCUS (dv->top_canvas)
- || GTK_WIDGET_HAS_FOCUS (dv->main_canvas))
- return FOCUS_CALENDAR;
- else
- return FOCUS_OTHER;
-
- case GNOME_CAL_WEEK_VIEW:
- case GNOME_CAL_MONTH_VIEW:
- wv = E_WEEK_VIEW (widget);
-
- if (GTK_WIDGET_HAS_FOCUS (wv->main_canvas))
- return FOCUS_CALENDAR;
- else
- return FOCUS_OTHER;
-
- case GNOME_CAL_LIST_VIEW:
- lv = E_CAL_LIST_VIEW (widget);
-
- if (GTK_WIDGET_HAS_FOCUS (e_table_scrolled_get_table (lv->table_scrolled)))
- return FOCUS_CALENDAR;
- else
- return FOCUS_OTHER;
-
- default:
- g_assert_not_reached ();
- return FOCUS_OTHER;
- }
- }
-}
-
-/* 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_e_cal_view_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 (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;
- ECalView *old_query;
- char *real_sexp;
- GList *l;
-
- priv = gcal->priv;
-
- e_calendar_item_clear_marks (priv->date_navigator->calitem);
-
- e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), _("Searching"));
-
- /* free the previous queries */
- for (l = priv->dn_queries; l != NULL; l = l->next) {
- old_query = l->data;
-
- if (old_query) {
- g_signal_handlers_disconnect_matched (old_query, G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL, gcal);
- g_object_unref (old_query);
- }
- }
-
- g_list_free (priv->dn_queries);
- priv->dn_queries = NULL;
-
- g_assert (priv->sexp != NULL);
-
- real_sexp = adjust_e_cal_view_sexp (gcal, priv->sexp);
- if (!real_sexp) {
- e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), NULL);
- return; /* No time range is set, so don't start a query */
- }
-
- /* create queries for each loaded client */
- for (l = priv->clients_list; l != NULL; l = l->next) {
- if (!e_cal_get_query ((ECal *) l->data, real_sexp, &old_query, NULL)) {
- g_warning (G_STRLOC ": Could not create the query");
-
- continue;
- }
-
- g_signal_connect (old_query, "objects_added",
- G_CALLBACK (dn_e_cal_view_objects_added_cb), gcal);
- g_signal_connect (old_query, "objects_modified",
- G_CALLBACK (dn_e_cal_view_objects_modified_cb), gcal);
- g_signal_connect (old_query, "objects_removed",
- G_CALLBACK (dn_e_cal_view_objects_removed_cb), gcal);
- g_signal_connect (old_query, "view_done",
- G_CALLBACK (dn_e_cal_view_done_cb), gcal);
-
- priv->dn_queries = g_list_append (priv->dn_queries, old_query);
-
- e_cal_view_start (old_query);
- }
-
- g_free (real_sexp);
-
- e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), NULL);
-}
-
-static void
-adjust_e_cal_view_for_view (ECalendarView *cal_view, const char *sexp)
-{
- char *real_sexp, *start, *end;
- time_t ttstart, ttend;
-
- e_calendar_view_get_visible_time_range (cal_view, &ttstart, &ttend);
-
- start = isodate_from_time_t (ttstart);
- end = isodate_from_time_t (ttend);
-
- real_sexp = g_strdup_printf (
- "(and (occur-in-time-range? (make-time \"%s\")"
- " (make-time \"%s\"))"
- " %s)",
- start, end, sexp);
-
- e_cal_model_set_query (e_calendar_view_get_model (cal_view), real_sexp);
-
- g_free (start);
- g_free (end);
- g_free (real_sexp);
-}
-
-/**
- * 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;
- ECalModel *model;
- int i;
-
- 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 views */
- for (i = 0; i < GNOME_CAL_LAST_VIEW; i++)
- adjust_e_cal_view_for_view (E_CALENDAR_VIEW (priv->views[i]), sexp);
-
- /* Set the query on the task pad */
- model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->todo));
- e_cal_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 = icaltimetype_to_tm (&tt);
-
- 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;
- ECalModel *model;
- int i;
-
- gcal = GNOME_CALENDAR (data);
- priv = gcal->priv;
-
- for (i = 0; i < GNOME_CAL_LAST_VIEW; i++) {
- e_calendar_view_set_default_category (E_CALENDAR_VIEW (priv->views[i]),
- category);
- }
-
- model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->todo));
- e_cal_model_set_default_category (model, category);
-}
-
-static void
-view_selection_changed_cb (GtkWidget *view, GnomeCalendar *gcal)
-{
- gtk_signal_emit (GTK_OBJECT (gcal),
- gnome_calendar_signals[CALENDAR_SELECTION_CHANGED]);
-}
-
-
-/* Callback used when the taskpad receives a focus event. We emit the
- * corresponding signal so that parents can change the menus as appropriate.
- */
-static gint
-table_canvas_focus_change_cb (GtkWidget *widget, GdkEventFocus *event, gpointer data)
-{
- GnomeCalendar *gcal;
-
- gcal = GNOME_CALENDAR (data);
-
- gtk_signal_emit (GTK_OBJECT (gcal), gnome_calendar_signals [TASKPAD_FOCUS_CHANGE],
- event->in ? TRUE : FALSE);
-
- return FALSE;
-}
-
-static gint
-calendar_focus_change_cb (GtkWidget *widget, GdkEventFocus *event, gpointer data)
-{
- GnomeCalendar *gcal;
-
- gcal = GNOME_CALENDAR (data);
-
- gtk_signal_emit (GTK_OBJECT (gcal), gnome_calendar_signals [CALENDAR_FOCUS_CHANGE],
- event->in ? TRUE : FALSE);
-
- return FALSE;
-}
-
-/* Connects to the focus change signals of a day view widget */
-static void
-connect_day_view_focus (GnomeCalendar *gcal, EDayView *dv)
-{
- g_signal_connect (dv->top_canvas, "focus_in_event",
- G_CALLBACK (calendar_focus_change_cb), gcal);
- g_signal_connect (dv->top_canvas, "focus_out_event",
- G_CALLBACK (calendar_focus_change_cb), gcal);
-
- g_signal_connect (dv->main_canvas, "focus_in_event",
- G_CALLBACK (calendar_focus_change_cb), gcal);
- g_signal_connect (dv->main_canvas, "focus_out_event",
- G_CALLBACK (calendar_focus_change_cb), gcal);
-}
-
-/* Connects to the focus change signals of a week view widget */
-static void
-connect_week_view_focus (GnomeCalendar *gcal, EWeekView *wv)
-{
- g_signal_connect (wv->main_canvas, "focus_in_event",
- G_CALLBACK (calendar_focus_change_cb), gcal);
- g_signal_connect (wv->main_canvas, "focus_out_event",
- G_CALLBACK (calendar_focus_change_cb), gcal);
-}
-
-static void
-connect_list_view_focus (GnomeCalendar *gcal, ECalListView *lv)
-{
- g_signal_connect (lv, "focus_in_event",
- G_CALLBACK (calendar_focus_change_cb), gcal);
- g_signal_connect (lv, "focus_out_event",
- G_CALLBACK (calendar_focus_change_cb), gcal);
-}
-
-/* Callback used when the selection in the taskpad table changes. We just proxy
- * the signal with our own one.
- */
-static void
-table_selection_change_cb (ETable *etable, gpointer data)
-{
- GnomeCalendar *gcal;
- int n_selected;
-
- gcal = GNOME_CALENDAR (data);
-
- n_selected = e_table_selected_count (etable);
- gtk_signal_emit (GTK_OBJECT (gcal), gnome_calendar_signals[TASKPAD_SELECTION_CHANGED]);
-}
-
-static void
-set_timezone (GnomeCalendar *calendar)
-{
- GnomeCalendarPrivate *priv;
- char *location;
- GList *l;
-
- priv = calendar->priv;
-
- location = calendar_config_get_timezone ();
- priv->zone = icaltimezone_get_builtin_timezone (location);
- g_free (location);
-
- if (!priv->zone)
- priv->zone = icaltimezone_get_utc_timezone ();
-
- for (l = priv->clients_list; l != NULL; l = l->next) {
- ECal *client = l->data;
-
- if (e_cal_get_load_state (client) == E_CAL_LOAD_LOADED)
- /* FIXME Error checking */
- e_cal_set_default_timezone (client, priv->zone, NULL);
- }
-
- if (priv->task_pad_client
- && e_cal_get_load_state (priv->task_pad_client) == E_CAL_LOAD_LOADED) {
- /* FIXME Error Checking */
- e_cal_set_default_timezone (priv->task_pad_client,
- priv->zone, NULL);
- }
-}
-
-static void
-timezone_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- GnomeCalendar *calendar = data;
-
- set_timezone (calendar);
-}
-
-static void
-setup_config (GnomeCalendar *calendar)
-{
- GnomeCalendarPrivate *priv;
- guint not;
-
- priv = calendar->priv;
-
- /* Timezone */
- set_timezone (calendar);
-
- not = calendar_config_add_notification_timezone (timezone_changed_cb, calendar);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
- /* Pane positions */
- 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 ();
-}
-
-static void
-setup_widgets (GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
- GtkWidget *w;
- gchar *filename;
- ETable *etable;
- int i;
-
- priv = gcal->priv;
-
- priv->search_bar = cal_search_bar_new ();
- g_signal_connect (priv->search_bar, "sexp_changed",
- G_CALLBACK (search_bar_sexp_changed_cb), gcal);
- g_signal_connect (priv->search_bar, "category_changed",
- G_CALLBACK (search_bar_category_changed_cb), gcal);
-
- gtk_widget_show (priv->search_bar);
- gtk_box_pack_start (GTK_BOX (gcal), priv->search_bar, FALSE, FALSE, 6);
-
- /* The main HPaned, with the notebook of calendar views on the left
- and the ECalendar and ToDo list on the right. */
- priv->hpane = gtk_hpaned_new ();
- g_signal_connect_after(priv->hpane, "realize",
- G_CALLBACK(gnome_calendar_hpane_realized), gcal);
- g_signal_connect (priv->hpane, "button_release_event",
- G_CALLBACK (gnome_calendar_hpane_resized), gcal);
- gtk_widget_show (priv->hpane);
- gtk_box_pack_start (GTK_BOX (gcal), priv->hpane, TRUE, TRUE, 6);
-
- /* 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);
- gtk_paned_pack1 (GTK_PANED (priv->hpane), priv->notebook, FALSE, TRUE);
-
- /* The VPaned widget, to contain the GtkCalendar & ToDo list. */
- priv->vpane = gtk_vpaned_new ();
- g_signal_connect_after (priv->vpane, "realize",
- G_CALLBACK(gnome_calendar_vpane_realized), gcal);
- g_signal_connect (priv->vpane, "button_release_event",
- G_CALLBACK (gnome_calendar_vpane_resized), gcal);
- gtk_widget_show (priv->vpane);
- gtk_paned_pack2 (GTK_PANED (priv->hpane), priv->vpane, TRUE, TRUE);
-
- /* The ECalendar. */
- w = e_calendar_new ();
- priv->date_navigator = E_CALENDAR (w);
- priv->date_navigator_config = e_mini_calendar_config_new (priv->date_navigator);
- 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);
-
- gtk_paned_pack1 (GTK_PANED (priv->vpane), w, FALSE, TRUE);
-
- g_signal_connect (priv->date_navigator->calitem, "selection_changed",
- G_CALLBACK (gnome_calendar_on_date_navigator_selection_changed), gcal);
- g_signal_connect (priv->date_navigator->calitem, "date_range_changed",
- G_CALLBACK (gnome_calendar_on_date_navigator_date_range_changed), gcal);
-
- /* The ToDo list. */
- priv->todo = e_calendar_table_new ();
- priv->todo_config = e_calendar_table_config_new (E_CALENDAR_TABLE (priv->todo));
- gtk_paned_pack2 (GTK_PANED (priv->vpane), priv->todo, TRUE, TRUE);
- gtk_widget_show (priv->todo);
-
- filename = g_build_filename (calendar_component_peek_config_directory (calendar_component_peek ()),
- "TaskPad", NULL);
- e_calendar_table_load_state (E_CALENDAR_TABLE (priv->todo), filename);
- g_free (filename);
-
- etable = e_calendar_table_get_table (E_CALENDAR_TABLE (priv->todo));
- g_signal_connect (etable->table_canvas, "focus_in_event",
- G_CALLBACK (table_canvas_focus_change_cb), gcal);
- g_signal_connect (etable->table_canvas, "focus_out_event",
- G_CALLBACK (table_canvas_focus_change_cb), gcal);
-
- g_signal_connect (etable, "selection_change",
- G_CALLBACK (table_selection_change_cb), gcal);
-
- /* The Day View. */
- priv->day_view = e_day_view_new ();
- g_signal_connect (priv->day_view, "selection_changed",
- G_CALLBACK (view_selection_changed_cb), gcal);
-
- connect_day_view_focus (gcal, E_DAY_VIEW (priv->day_view));
-
- /* 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_calendar_view_set_calendar (E_CALENDAR_VIEW (priv->work_week_view), gcal);
-
- connect_day_view_focus (gcal, E_DAY_VIEW (priv->work_week_view));
-
- /* The Week View. */
- priv->week_view = e_week_view_new ();
- e_calendar_view_set_calendar (E_CALENDAR_VIEW (priv->week_view), gcal);
- g_signal_connect (priv->week_view, "selection_changed",
- G_CALLBACK (view_selection_changed_cb), gcal);
-
- connect_week_view_focus (gcal, E_WEEK_VIEW (priv->week_view));
-
- /* The Month View. */
- priv->month_view = e_week_view_new ();
- e_calendar_view_set_calendar (E_CALENDAR_VIEW (priv->month_view), gcal);
- e_week_view_set_multi_week_view (E_WEEK_VIEW (priv->month_view), TRUE);
- g_signal_connect (priv->month_view, "selection_changed",
- G_CALLBACK (view_selection_changed_cb), gcal);
-
- connect_week_view_focus (gcal, E_WEEK_VIEW (priv->month_view));
-
- /* The List View. */
- filename = g_strdup_printf (".evolution/config/CalListView");
- priv->list_view = e_cal_list_view_new (filename);
- g_free (filename);
-
- e_calendar_view_set_calendar (E_CALENDAR_VIEW (priv->list_view), gcal);
-
- connect_list_view_focus (gcal, E_CAL_LIST_VIEW (priv->list_view));
-
- priv->views[GNOME_CAL_DAY_VIEW] = E_CALENDAR_VIEW (priv->day_view);
- priv->configs[GNOME_CAL_DAY_VIEW] = e_day_view_config_new (E_DAY_VIEW (priv->views[GNOME_CAL_DAY_VIEW]));
- priv->views[GNOME_CAL_WORK_WEEK_VIEW] = E_CALENDAR_VIEW (priv->work_week_view);
- priv->configs[GNOME_CAL_WORK_WEEK_VIEW] = e_day_view_config_new (E_DAY_VIEW (priv->views[GNOME_CAL_WORK_WEEK_VIEW]));
- priv->views[GNOME_CAL_WEEK_VIEW] = E_CALENDAR_VIEW (priv->week_view);
- priv->configs[GNOME_CAL_WEEK_VIEW] = e_week_view_config_new (E_WEEK_VIEW (priv->views[GNOME_CAL_WEEK_VIEW]));
- priv->views[GNOME_CAL_MONTH_VIEW] = E_CALENDAR_VIEW (priv->month_view);
- priv->configs[GNOME_CAL_MONTH_VIEW] = e_week_view_config_new (E_WEEK_VIEW (priv->views[GNOME_CAL_MONTH_VIEW]));
- priv->views[GNOME_CAL_LIST_VIEW] = E_CALENDAR_VIEW (priv->list_view);
- priv->configs[GNOME_CAL_MONTH_VIEW] = e_cal_list_view_config_new (E_CAL_LIST_VIEW (priv->views[GNOME_CAL_LIST_VIEW]));
- priv->configs[GNOME_CAL_LIST_VIEW] = NULL;
-
- for (i = 0; i < GNOME_CAL_LAST_VIEW; i++) {
- gtk_notebook_append_page (GTK_NOTEBOOK (priv->notebook),
- GTK_WIDGET (priv->views[i]), gtk_label_new (""));
-
- gtk_widget_show (GTK_WIDGET (priv->views[i]));
- }
-}
-
-/* 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->clients = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref);
-
- priv->cal_categories = NULL;
- priv->tasks_categories = NULL;
-
- priv->current_view_type = GNOME_CAL_DAY_VIEW;
- priv->range_selected = FALSE;
-
- setup_config (gcal);
- setup_widgets (gcal);
-
- priv->dn_queries = 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_instance = 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);
-}
-
-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;
-
- if (priv) {
- GList *l;
- int i;
-
- /* disconnect from signals on all the clients */
- for (l = priv->clients_list; l != NULL; l = l->next) {
- g_signal_handlers_disconnect_matched (l->data, G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL, gcal);
- }
-
- g_hash_table_destroy (priv->clients);
- g_list_free (priv->clients_list);
-
- free_categories (priv->cal_categories);
- priv->cal_categories = NULL;
-
- free_categories (priv->tasks_categories);
- priv->tasks_categories = NULL;
-
- for (i = 0; i < GNOME_CAL_LAST_VIEW; i++) {
- if (priv->configs[i])
- g_object_unref (priv->configs[i]);
- priv->configs[i] = NULL;
- }
- g_object_unref (priv->date_navigator_config);
- g_object_unref (priv->todo_config);
-
- for (l = priv->notifications; l; l = l->next)
- calendar_config_remove_notification (GPOINTER_TO_UINT (l->data));
- g_list_free (priv->notifications);
- priv->notifications = NULL;
-
- /* Save the TaskPad layout. */
- filename = g_build_filename (calendar_component_peek_config_directory (calendar_component_peek ()),
- "TaskPad", NULL);
- e_calendar_table_save_state (E_CALENDAR_TABLE (priv->todo), filename);
- g_free (filename);
-
- if (priv->dn_queries) {
- for (l = priv->dn_queries; l != NULL; l = l->next) {
- g_signal_handlers_disconnect_matched ((ECalView *) l->data, G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL, gcal);
- g_object_unref (l->data);
- }
-
- g_list_free (priv->dn_queries);
- priv->dn_queries = NULL;
- }
-
- if (priv->sexp) {
- g_free (priv->sexp);
- priv->sexp = NULL;
- }
-
- if (priv->e_cal_view_timeout) {
- g_source_remove (priv->e_cal_view_timeout);
- priv->e_cal_view_timeout = 0;
- }
-
- if (priv->task_pad_client) {
- g_signal_handlers_disconnect_matched (priv->task_pad_client, G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL, gcal);
- g_object_unref (priv->task_pad_client);
- priv->task_pad_client = NULL;
- }
-
- if (priv->view_instance) {
- g_object_unref (priv->view_instance);
- priv->view_instance = NULL;
- }
-
- if (priv->view_menus) {
- g_object_unref (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);
-}
-
-static void
-gnome_calendar_goto_date (GnomeCalendar *gcal,
- GnomeCalendarGotoDateType goto_date)
-{
- GnomeCalendarPrivate *priv;
- time_t start_time;
- time_t end_time;
- gboolean need_updating = FALSE;
-
- g_return_if_fail (gcal != NULL);
- g_return_if_fail (GNOME_IS_CALENDAR(gcal));
-
- priv = gcal->priv;
-
- gnome_calendar_get_current_time_range (gcal, &start_time, &end_time);
-
- switch (goto_date) {
- /* GNOME_CAL_GOTO_TODAY and GNOME_CAL_GOTO_DATE are
- currently not used
- */
- case GNOME_CAL_GOTO_TODAY:
- break;
- case GNOME_CAL_GOTO_DATE:
- break;
- case GNOME_CAL_GOTO_FIRST_DAY_OF_MONTH:
- priv->selection_start_time =
- time_month_begin_with_zone (start_time, priv->zone);
- priv->selection_end_time =
- time_add_day_with_zone (priv->selection_start_time,
- 1, priv->zone);
- need_updating = TRUE;
- break;
- case GNOME_CAL_GOTO_LAST_DAY_OF_MONTH:
- start_time = time_add_month_with_zone (start_time, 1,
- priv->zone);
- priv->selection_end_time =
- time_month_begin_with_zone (start_time, priv->zone);
- priv->selection_start_time =
- time_add_day_with_zone (priv->selection_end_time,
- -1, priv->zone);
- need_updating = TRUE;
- break;
- case GNOME_CAL_GOTO_FIRST_DAY_OF_WEEK:
- /* 1 for Monday */
- priv->selection_start_time =
- time_week_begin_with_zone (start_time, 1, priv->zone);
- priv->selection_end_time =
- time_add_day_with_zone (priv->selection_start_time,
- 1, priv->zone);
- need_updating = TRUE;
- break;
- case GNOME_CAL_GOTO_LAST_DAY_OF_WEEK:
- /* 1 for Monday */
- start_time = time_week_begin_with_zone (start_time, 1,
- priv->zone);
- if (priv->current_view_type == GNOME_CAL_DAY_VIEW ||
- priv->current_view_type == GNOME_CAL_WORK_WEEK_VIEW) {
- /* goto Friday of this week */
- priv->selection_start_time =
- time_add_day_with_zone (start_time,
- 4, priv->zone);
- }
- else {
- /* goto Sunday of this week */
- priv->selection_start_time =
- time_add_day_with_zone (start_time,
- 6, priv->zone);
- }
- priv->selection_end_time =
- time_add_day_with_zone (priv->selection_start_time,
- 1, priv->zone);
- need_updating = TRUE;
- break;
- case GNOME_CAL_GOTO_SAME_DAY_OF_PREVIOUS_WEEK:
- priv->selection_start_time = time_add_day_with_zone (start_time,
- -7, priv->zone);
- priv->selection_end_time = time_add_day_with_zone (end_time,
- -7,priv->zone);
- need_updating = TRUE;
- break;
- case GNOME_CAL_GOTO_SAME_DAY_OF_NEXT_WEEK:
- priv->selection_start_time = time_add_day_with_zone (start_time,
- 7, priv->zone);
- priv->selection_end_time = time_add_day_with_zone (end_time,
- 7,priv->zone);
- need_updating = TRUE;
- break;
-
- default:
- break;
- }
-
- if (need_updating) {
- gnome_calendar_update_view_times (gcal);
- gnome_calendar_update_date_navigator (gcal);
- gnome_calendar_notify_dates_shown_changed (gcal);
- }
-}
-
-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;
-
- e_calendar_view_set_selected_time_range (E_CALENDAR_VIEW (gnome_calendar_get_current_view_widget (gcal)),
- priv->selection_start_time,
- priv->selection_end_time);
-}
-
-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:
- 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_LIST_VIEW:
- g_warning ("Using month view time interval for list view.");
- 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;
-
- gtk_widget_grab_focus (gnome_calendar_get_current_view_widget (gcal));
-}
-
-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;
- const char *view_id;
- static gboolean updating = FALSE;
-
- if (updating)
- return;
-
- priv = gcal->priv;
-
- round_selection = FALSE;
-
- switch (view_type) {
- case GNOME_CAL_DAY_VIEW:
- view_id = "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:
- view_id = "Work_Week_View";
- break;
-
- case GNOME_CAL_WEEK_VIEW:
- view_id = "Week_View";
- round_selection = TRUE;
- break;
-
- case GNOME_CAL_MONTH_VIEW:
- view_id = "Month_View";
-
- if (!range_selected)
- e_week_view_set_weeks_shown (E_WEEK_VIEW (priv->month_view), 5);
-
- round_selection = TRUE;
- break;
-
- case GNOME_CAL_LIST_VIEW:
- view_id = "List_View";
- break;
-
- default:
- g_warning ("A penguin is loose!");
- g_assert_not_reached ();
- return;
- }
-
- priv->current_view_type = view_type;
- priv->range_selected = range_selected;
-
- calendar_config_set_default_view (view_type);
-
- updating = TRUE;
- gtk_notebook_set_page (GTK_NOTEBOOK (priv->notebook), (int) view_type);
- if (priv->view_instance)
- gal_view_instance_set_current_view_id (priv->view_instance, view_id);
- updating = FALSE;
-
- if (grab_focus)
- gtk_widget_grab_focus (GTK_WIDGET (priv->views[view_type]));
-
- 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. */
- g_object_set (G_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 (GalViewInstance *view_instance, 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;
- static GalViewCollection *collection = NULL;
-
- 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_instance == NULL);
-
- g_assert (priv->view_instance == NULL);
- g_assert (priv->view_menus == NULL);
-
- /* Create the view instance */
-
- if (collection == NULL) {
- collection = gal_view_collection_new ();
-
- gal_view_collection_set_title (collection, _("Calendar"));
-
- path = gnome_util_prepend_user_home ("/evolution/views/calendar/");
- gal_view_collection_set_storage_directories (collection,
- EVOLUTION_GALVIEWSDIR "/calendar/",
- path);
- g_free (path);
-
- /* Create the views */
-
- factory = calendar_view_factory_new (GNOME_CAL_DAY_VIEW);
- gal_view_collection_add_factory (collection, GAL_VIEW_FACTORY (factory));
- g_object_unref (factory);
-
- factory = calendar_view_factory_new (GNOME_CAL_WORK_WEEK_VIEW);
- gal_view_collection_add_factory (collection, GAL_VIEW_FACTORY (factory));
- g_object_unref (factory);
-
- factory = calendar_view_factory_new (GNOME_CAL_WEEK_VIEW);
- gal_view_collection_add_factory (collection, GAL_VIEW_FACTORY (factory));
- g_object_unref (factory);
-
- factory = calendar_view_factory_new (GNOME_CAL_MONTH_VIEW);
- gal_view_collection_add_factory (collection, GAL_VIEW_FACTORY (factory));
- g_object_unref (factory);
-
- factory = calendar_view_factory_new (GNOME_CAL_LIST_VIEW);
- gal_view_collection_add_factory (collection, GAL_VIEW_FACTORY (factory));
- g_object_unref (factory);
-
- /* Load the collection and create the menus */
-
- gal_view_collection_load (collection);
- }
-
- priv->view_instance = gal_view_instance_new (collection,
- e_cal_get_uri (gnome_calendar_get_default_client (gcal)));
-
- priv->view_menus = gal_view_menus_new (priv->view_instance);
- gal_view_menus_set_show_define_views (priv->view_menus, FALSE);
- gal_view_menus_apply (priv->view_menus, uic, NULL);
- gnome_calendar_set_view (gcal, priv->current_view_type, TRUE, FALSE);
-
- g_signal_connect (priv->view_instance, "display_view",
- G_CALLBACK (display_view_cb), gcal);
- display_view_cb (priv->view_instance, gal_view_instance_get_current_view (priv->view_instance), 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_instance != NULL);
-
- g_assert (priv->view_instance != NULL);
- g_assert (priv->view_menus != NULL);
-
- g_object_unref (priv->view_instance);
- priv->view_instance = NULL;
-
- g_object_unref (priv->view_menus);
- priv->view_menus = NULL;
-}
-
-EPopupMenu *
-gnome_calendar_setup_view_popup (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;
-
- g_return_val_if_fail (priv->view_instance != NULL, NULL);
-
- return gal_view_instance_get_popup_menu (priv->view_instance);
-}
-
-void
-gnome_calendar_discard_view_popup (GnomeCalendar *gcal, EPopupMenu *popup)
-{
-
-
- GnomeCalendarPrivate *priv;
-
- g_return_if_fail (gcal != NULL);
- g_return_if_fail (GNOME_IS_CALENDAR (gcal));
-
- priv = gcal->priv;
-
- g_return_if_fail (priv->view_instance != NULL);
-
- gal_view_instance_free_popup_menu (priv->view_instance, popup);
-}
-
-static void
-gnome_calendar_set_pane_positions (GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
-
- priv = gcal->priv;
-
- if (priv->current_view_type == GNOME_CAL_MONTH_VIEW && !priv->range_selected) {
- gtk_paned_set_position (GTK_PANED (priv->hpane), priv->hpane_pos_month_view);
- gtk_paned_set_position (GTK_PANED (priv->vpane), priv->vpane_pos_month_view);
- } else {
- gtk_paned_set_position (GTK_PANED (priv->hpane), priv->hpane_pos);
- gtk_paned_set_position (GTK_PANED (priv->vpane), priv->vpane_pos);
- }
-}
-
-/* Displays an error to indicate that opening a calendar failed */
-static void
-open_error (GnomeCalendar *gcal, const char *uri)
-{
- char *msg;
- char *urinopwd;
-
- urinopwd = get_uri_without_password (uri);
- msg = g_strdup_printf (_("Could not open the folder in `%s'"), urinopwd);
- gnome_error_dialog_parented (msg, GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gcal))));
- g_free (msg);
- g_free (urinopwd);
-}
-
-/* Displays an error to indicate that the specified URI method is not supported */
-static void
-method_error (GnomeCalendar *gcal, const char *uri)
-{
- char *msg;
- char *urinopwd;
-
- urinopwd = get_uri_without_password (uri);
- msg = g_strdup_printf (_("The method required to open `%s' is not supported"), urinopwd);
- gnome_error_dialog_parented (msg, GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gcal))));
- g_free (msg);
- g_free (urinopwd);
-}
-
-/* Displays an error to indicate permission problems */
-static void
-permission_error (GnomeCalendar *gcal, const char *uri)
-{
- char *msg;
- char *urinopwd;
-
- urinopwd = get_uri_without_password (uri);
- msg = g_strdup_printf (_("You don't have permission to open the folder in `%s'"), urinopwd);
- gnome_error_dialog_parented (msg, GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gcal))));
- g_free (msg);
- g_free (urinopwd);
-}
-
-/* Callback from the calendar client when a calendar is loaded */
-static gboolean
-update_e_cal_view_timeout (gpointer data)
-{
- GnomeCalendar *gcal = data;
- GnomeCalendarPrivate *priv;
-
- gcal = GNOME_CALENDAR (data);
- priv = gcal->priv;
-
- update_query (gcal);
- priv->e_cal_view_timeout = 0;
-
- return FALSE;
-}
-
-static void
-client_cal_opened_cb (ECal *client, ECalendarStatus status, gpointer data)
-{
- GnomeCalendar *gcal;
- GnomeCalendarPrivate *priv;
- char *msg;
- char *uristr;
-
- gcal = GNOME_CALENDAR (data);
- priv = gcal->priv;
-
- switch (status) {
- case E_CALENDAR_STATUS_OK:
- /* Set the client's default timezone, if we have one. */
- if (priv->zone) {
- /* FIXME Error checking */
- e_cal_set_default_timezone (client, priv->zone, NULL);
- }
-
- /* add the alarms for this client */
- uristr = get_uri_without_password (e_cal_get_uri (client));
- msg = g_strdup_printf (_("Adding alarms for %s"), uristr);
- g_free (uristr);
- if (client == priv->task_pad_client) {
- e_calendar_table_set_status_message (E_CALENDAR_TABLE (priv->todo), msg);
- e_cal_model_add_client (e_calendar_table_get_model (E_CALENDAR_TABLE (priv->todo)),
- priv->task_pad_client);
- }
- else {
- e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), msg);
- e_cal_model_add_client (e_calendar_view_get_model (E_CALENDAR_VIEW (priv->week_view)), client);
-
- priv->e_cal_view_timeout = g_timeout_add (100, update_e_cal_view_timeout, gcal);
- }
- g_free (msg);
-
- break;
-
- case E_CALENDAR_STATUS_OTHER_ERROR:
- open_error (gcal, e_cal_get_uri (client));
- break;
-
- case E_CALENDAR_STATUS_NO_SUCH_CALENDAR:
- /* bullshit; we did not specify only_if_exists */
- g_assert_not_reached ();
- return;
-
- case E_CALENDAR_STATUS_PROTOCOL_NOT_SUPPORTED:
- method_error (gcal, e_cal_get_uri (client));
- break;
-
- case E_CALENDAR_STATUS_PERMISSION_DENIED :
- permission_error (gcal, e_cal_get_uri (client));
- break;
-
- default:
- g_assert_not_reached ();
- return;
- }
-
- if (client == priv->task_pad_client)
- e_calendar_table_set_status_message (E_CALENDAR_TABLE (priv->todo), NULL);
- else
- e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), NULL);
-}
-
-/* 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 (ECal *client, GPtrArray *categories, gpointer data)
-{
- GnomeCalendar *gcal;
- GnomeCalendarPrivate *priv;
- GPtrArray *merged;
-
- gcal = GNOME_CALENDAR (data);
- priv = gcal->priv;
-
- if (client == priv->task_pad_client) {
- free_categories (priv->tasks_categories);
- priv->tasks_categories = copy_categories (categories);
- } else {
- free_categories (priv->cal_categories);
- priv->cal_categories = copy_categories (categories);
- }
-
- merged = merge_categories (priv->cal_categories, priv->tasks_categories);
- cal_search_bar_set_categories (CAL_SEARCH_BAR (priv->search_bar), merged);
- free_categories (merged);
-}
-
-/* Callback when we get an error message from the backend */
-static void
-backend_error_cb (ECal *client, const char *message, gpointer data)
-{
- GnomeCalendar *gcal;
- GnomeCalendarPrivate *priv;
- char *errmsg;
- char *uristr;
-
- gcal = GNOME_CALENDAR (data);
- priv = gcal->priv;
-
- uristr = get_uri_without_password (e_cal_get_uri (client));
- errmsg = g_strdup_printf (_("Error on %s:\n %s"), uristr, message);
- gnome_error_dialog_parented (errmsg, GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gcal))));
- g_free (errmsg);
- g_free (uristr);
-}
-
-/* Callback when the backend dies */
-static void
-backend_died_cb (ECal *client, gpointer data)
-{
- GnomeCalendar *gcal;
- GnomeCalendarPrivate *priv;
- char *message;
- char *uristr;
-
- gcal = GNOME_CALENDAR (data);
- priv = gcal->priv;
-
- /* FIXME This doesn't remove the calendar from the list or anything */
- uristr = get_uri_without_password (e_cal_get_uri (client));
- if (client == priv->task_pad_client) {
- message = g_strdup_printf (_("The task backend for\n%s\n has crashed. "
- "You will have to restart Evolution in order "
- "to use it again"),
- uristr);
- e_calendar_table_set_status_message (E_CALENDAR_TABLE (priv->todo), NULL);
- } else {
- int i;
-
- message = g_strdup_printf (_("The calendar backend for\n%s\n has crashed. "
- "You will have to restart Evolution in order "
- "to use it again"),
- uristr);
-
- for (i = 0; i < GNOME_CAL_LAST_VIEW; i++)
- e_calendar_view_set_status_message (priv->views[i], NULL);
- }
-
- gnome_error_dialog_parented (message, GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gcal))));
- g_free (message);
- g_free (uristr);
-}
-
-GtkWidget *
-gnome_calendar_construct (GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
- GnomeCalendarViewType view_type;
-
- g_return_val_if_fail (gcal != NULL, NULL);
- g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), NULL);
-
- priv = gcal->priv;
-
- /*
- * TaskPad Folder Client.
- */
- priv->task_pad_client = e_cal_new_from_uri ("", CALOBJ_TYPE_TODO); /* FIXME: use default tasks */
- if (!priv->task_pad_client)
- return NULL;
-
- g_signal_connect (priv->task_pad_client, "cal_opened",
- G_CALLBACK (client_cal_opened_cb), gcal);
- g_signal_connect (priv->task_pad_client, "backend_error",
- G_CALLBACK (backend_error_cb), gcal);
- g_signal_connect (priv->task_pad_client, "categories_changed",
- G_CALLBACK (client_categories_changed_cb), gcal);
- g_signal_connect (priv->task_pad_client, "backend_died",
- G_CALLBACK (backend_died_cb), gcal);
-
- /* Get the default view to show. */
- view_type = calendar_config_get_default_view ();
- if (view_type < GNOME_CAL_DAY_VIEW || view_type > GNOME_CAL_LIST_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 = g_object_new (gnome_calendar_get_type (), NULL);
-
- if (!gnome_calendar_construct (gcal)) {
- g_message ("gnome_calendar_new(): Could not construct the calendar GUI");
- g_object_unref (gcal);
- return NULL;
- }
-
- return GTK_WIDGET (gcal);
-}
-
-void
-gnome_calendar_set_ui_component (GnomeCalendar *gcal,
- BonoboUIComponent *ui_component)
-{
- g_return_if_fail (GNOME_IS_CALENDAR (gcal));
- g_return_if_fail (ui_component == NULL || BONOBO_IS_UI_COMPONENT (ui_component));
-
- e_search_bar_set_ui_component (E_SEARCH_BAR (gcal->priv->search_bar), ui_component);
-}
-
-/**
- * gnome_calendar_get_calendar_model:
- * @gcal: A calendar view.
- *
- * Queries the calendar model object that a calendar view is using.
- *
- * Return value: A calendar client interface object.
- **/
-ECalModel *
-gnome_calendar_get_calendar_model (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 e_calendar_view_get_model (priv->views[priv->current_view_type]);
-}
-
-/**
- * gnome_calendar_get_default_client
- */
-ECal *
-gnome_calendar_get_default_client (GnomeCalendar *gcal)
-{
- g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), NULL);
-
- return e_cal_model_get_default_client (e_calendar_view_get_model (E_CALENDAR_VIEW (gcal->priv->week_view)));
-}
-
-/**
- * gnome_calendar_get_task_pad_e_cal:
- * @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.
- **/
-ECal *
-gnome_calendar_get_task_pad_e_cal (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;
-}
-
-/**
- * gnome_calendar_add_event_uri:
- * @gcal: A GnomeCalendar.
- * @str_uri: URI to add to the calendar views.
- *
- * Adds the given calendar URI to the calendar views.
- *
- * Returns: TRUE if successful, FALSE if error.
- */
-gboolean
-gnome_calendar_add_event_uri (GnomeCalendar *gcal, const char *str_uri)
-{
- GnomeCalendarPrivate *priv;
- ECal *client;
- int i;
-
- 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;
-
- client = g_hash_table_lookup (priv->clients, str_uri);
- if (client)
- return TRUE;
-
- client = e_cal_new_from_uri (str_uri, CALOBJ_TYPE_EVENT);
- g_hash_table_insert (priv->clients, g_strdup (str_uri), client);
- priv->clients_list = g_list_prepend (priv->clients_list, client);
-
- g_signal_connect (G_OBJECT (client), "backend_error", G_CALLBACK (backend_error_cb), gcal);
- g_signal_connect (G_OBJECT (client), "categories_changed", G_CALLBACK (client_categories_changed_cb), gcal);
- g_signal_connect (G_OBJECT (client), "backend_died", G_CALLBACK (backend_died_cb), gcal);
-
- /* FIXME Do this async? */
- if (!e_cal_open (client, FALSE, NULL)) {
- g_hash_table_remove (priv->clients, str_uri);
- priv->clients_list = g_list_prepend (priv->clients_list, client);
- g_signal_handlers_disconnect_matched (client, G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL, gcal);
-
- return FALSE;
- }
-
- for (i = 0; i < GNOME_CAL_LAST_VIEW; i++) {
- ECalModel *model;
-
- model = e_calendar_view_get_model (priv->views[i]);
- e_cal_model_add_client (model, client);
- }
-
- /* update date navigator query */
- update_query (gcal);
-
- return TRUE;
-}
-
-/**
- * gnome_calendar_remove_event_uri
- * @gcal: A #GnomeCalendar.
- * @str_uri: URI to be removed from the clients.
- *
- * Removes the given URI from the list of clients being shown by the
- * calendar views.
- *
- * Returns: TRUE if successful, FALSE otherwise.
- */
-gboolean
-gnome_calendar_remove_event_uri (GnomeCalendar *gcal, const char *str_uri)
-{
- GnomeCalendarPrivate *priv;
- ECal *client;
- int i;
-
- 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;
-
- client = g_hash_table_lookup (priv->clients, str_uri);
- if (!client)
- return TRUE;
-
- g_hash_table_remove (priv->clients, str_uri);
- priv->clients_list = g_list_remove (priv->clients_list, client);
- g_signal_handlers_disconnect_matched (client, G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL, gcal);
-
- for (i = 0; i < GNOME_CAL_LAST_VIEW; i++) {
- ECalModel *model;
-
- model = e_calendar_view_get_model (priv->views[i]);
- e_cal_model_remove_client (model, client);
- }
-
- /* update date navigator query */
- update_query (gcal);
-
- return TRUE;
-}
-
-/**
- * gnome_calendar_set_default_uri:
- * @gcal: A calendar view
- * @uri: The uri to use as default
- *
- * Set the default uri on the given calendar view, the default uri
- * will be used as the default when creating events in the view.
-
- *
- * Return value: TRUE if the uri was already added and is set, FALSE
- * otherwise
- **/
-gboolean
-gnome_calendar_set_default_uri (GnomeCalendar *gcal, const char *str_uri)
-{
- GnomeCalendarPrivate *priv;
- ECal *client;
- int i;
-
- 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;
-
- client = g_hash_table_lookup (priv->clients, str_uri);
- if (!client)
- return FALSE;
-
- for (i = 0; i < GNOME_CAL_LAST_VIEW; i++) {
- e_cal_model_set_default_client (
- e_calendar_view_get_model (E_CALENDAR_VIEW (priv->views[i])),
- client);
- }
-
- return TRUE;
-}
-
-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;
-}
-
-/**
- * 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;
- ECalComponent *comp;
- icalcomponent *icalcomp;
- const char *category;
-
- g_return_if_fail (gcal != NULL);
- g_return_if_fail (GNOME_IS_CALENDAR (gcal));
-
- priv = gcal->priv;
-
- tedit = task_editor_new (priv->task_pad_client);
-
- icalcomp = e_cal_model_create_component_with_defaults (e_calendar_view_get_model (E_CALENDAR_VIEW (priv->week_view)));
- comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomp);
-
- category = cal_search_bar_get_category (CAL_SEARCH_BAR (priv->search_bar));
- e_cal_component_set_categories (comp, category);
-
- comp_editor_edit_comp (COMP_EDITOR (tedit), comp);
- g_object_unref (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;
-
- e_calendar_view_get_selected_time_range (E_CALENDAR_VIEW (gnome_calendar_get_current_view_widget (gcal)),
- start_time, 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)
-{
- GnomeCalendarPrivate *priv;
- gboolean retval = FALSE;
-
- g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), FALSE);
-
- priv = gcal->priv;
-
- retval = e_calendar_view_get_visible_time_range (E_CALENDAR_VIEW (gnome_calendar_get_current_view_widget (gcal)),
- start_time, end_time);
-
- 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;
-
- case GNOME_CAL_LIST_VIEW:
- if (!e_cal_list_view_get_range_shown (E_CAL_LIST_VIEW (priv->list_view),
- start_date, days_shown)) {
- /* No valid items in list */
- time_to_gdate_with_zone (start_date, time (NULL), priv->zone);
- *days_shown = 1;
- }
- else if (*days_shown < 1) {
- *days_shown = 1;
- }
- 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);
-
- 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;
- struct icaltimetype tt;
-
- 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;
-
- /* Update selection to be in the new time range */
- tt = icaltime_null_time ();
- tt.year = g_date_year (&new_start_date);
- tt.month = g_date_month (&new_start_date);
- tt.day = g_date_day (&new_start_date);
- priv->selection_start_time = icaltime_as_timet_with_zone (tt, priv->zone);
- icaltime_adjust (&tt, 1, 0, 0, 0);
- priv->selection_end_time = icaltime_as_timet_with_zone (tt, priv->zone);
-
- /* 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 {
- e_day_view_set_days_shown (E_DAY_VIEW (priv->day_view), new_days_shown);
-
- if (new_days_shown == 5 && priv->current_view_type == GNOME_CAL_WORK_WEEK_VIEW)
- gnome_calendar_set_view (gcal, GNOME_CAL_WORK_WEEK_VIEW, TRUE, FALSE);
- else
- 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)
-{
- update_query (gcal);
-}
-
-static void
-gnome_calendar_hpane_realized (GtkWidget *w, GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
-
- priv = gcal->priv;
-
- if (priv->current_view_type == GNOME_CAL_MONTH_VIEW && !priv->range_selected) {
- gtk_paned_set_position (GTK_PANED (priv->hpane), priv->hpane_pos_month_view);
- } else {
- gtk_paned_set_position (GTK_PANED (priv->hpane), priv->hpane_pos);
- }
-}
-
-static void
-gnome_calendar_vpane_realized (GtkWidget *w, GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
-
- priv = gcal->priv;
-
- if (priv->current_view_type == GNOME_CAL_MONTH_VIEW && !priv->range_selected) {
- gtk_paned_set_position (GTK_PANED (priv->vpane), priv->vpane_pos_month_view);
- } else {
- gtk_paned_set_position (GTK_PANED (priv->vpane), priv->vpane_pos);
- }
-}
-
-static gboolean
-gnome_calendar_vpane_resized (GtkWidget *w, GdkEventButton *e, GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
-
- priv = gcal->priv;
-
- if (priv->current_view_type == GNOME_CAL_MONTH_VIEW && !priv->range_selected) {
- priv->vpane_pos_month_view = gtk_paned_get_position (GTK_PANED (priv->vpane));
- calendar_config_set_month_vpane_pos (priv->vpane_pos_month_view);
- } else {
- priv->vpane_pos = gtk_paned_get_position (GTK_PANED (priv->vpane));
- calendar_config_set_vpane_pos (priv->vpane_pos);
- }
-
- return FALSE;
-}
-
-static gboolean
-gnome_calendar_hpane_resized (GtkWidget *w, GdkEventButton *e, GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
- gint times_width;
-
- priv = gcal->priv;
-
- if (priv->current_view_type == GNOME_CAL_MONTH_VIEW && !priv->range_selected) {
- priv->hpane_pos_month_view = gtk_paned_get_position (GTK_PANED (priv->hpane));
- calendar_config_set_month_hpane_pos (priv->hpane_pos_month_view);
- } else {
- priv->hpane_pos = gtk_paned_get_position (GTK_PANED (priv->hpane));
- calendar_config_set_hpane_pos (priv->hpane_pos);
- }
-
- /* adjust the size of the EDayView's time column */
- times_width = e_day_view_time_item_get_column_width (
- E_DAY_VIEW_TIME_ITEM (E_DAY_VIEW (priv->day_view)->time_canvas_item));
- if (times_width < priv->hpane_pos - 20)
- gtk_widget_set_usize (E_DAY_VIEW (priv->day_view)->time_canvas, times_width, -1);
- else
- gtk_widget_set_usize (E_DAY_VIEW (priv->day_view)->time_canvas, priv->hpane_pos - 20, -1);
-
-
- return FALSE;
-}
-
-void
-gnome_calendar_cut_clipboard (GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
- FocusLocation location;
-
- priv = gcal->priv;
-
- location = get_focus_location (gcal);
-
- if (location == FOCUS_CALENDAR) {
- e_calendar_view_cut_clipboard (E_CALENDAR_VIEW (gnome_calendar_get_current_view_widget (gcal)));
- } else if (location == FOCUS_TASKPAD)
- e_calendar_table_cut_clipboard (E_CALENDAR_TABLE (priv->todo));
- else
- g_assert_not_reached ();
-}
-
-void
-gnome_calendar_copy_clipboard (GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
- FocusLocation location;
-
- priv = gcal->priv;
-
- location = get_focus_location (gcal);
-
- if (location == FOCUS_CALENDAR) {
- e_calendar_view_copy_clipboard (E_CALENDAR_VIEW (gnome_calendar_get_current_view_widget (gcal)));
- } else if (location == FOCUS_TASKPAD)
- e_calendar_table_copy_clipboard (E_CALENDAR_TABLE (priv->todo));
- else
- g_assert_not_reached ();
-}
-
-void
-gnome_calendar_paste_clipboard (GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
- FocusLocation location;
-
- priv = gcal->priv;
-
- location = get_focus_location (gcal);
-
- if (location == FOCUS_CALENDAR) {
- e_calendar_view_paste_clipboard (E_CALENDAR_VIEW (gnome_calendar_get_current_view_widget (gcal)));
- } else if (location == FOCUS_TASKPAD)
- e_calendar_table_paste_clipboard (E_CALENDAR_TABLE (priv->todo));
- else
- g_assert_not_reached ();
-}
-
-
-/* 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;
-
- /* If no time range is set yet, just return. */
- if (!gnome_calendar_get_visible_time_range (gcal, &start_time,
- &end_time))
- return;
-
- /* 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;
-}
-
-/**
- * gnome_calendar_get_num_tasks_selected:
- * @gcal: A calendar view.
- *
- * Queries the number of tasks that are currently selected in the task pad of a
- * calendar view.
- *
- * Return value: Number of selected tasks.
- **/
-gint
-gnome_calendar_get_num_tasks_selected (GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
- ETable *etable;
-
- g_return_val_if_fail (gcal != NULL, -1);
- g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), -1);
-
- priv = gcal->priv;
-
- etable = e_calendar_table_get_table (E_CALENDAR_TABLE (priv->todo));
- return e_table_selected_count (etable);
-}
-
-
-void
-gnome_calendar_delete_selection (GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
- FocusLocation location;
- GtkWidget *view;
-
- g_return_if_fail (GNOME_IS_CALENDAR (gcal));
-
- priv = gcal->priv;
-
- location = get_focus_location (gcal);
-
- if (location == FOCUS_CALENDAR) {
- view = gnome_calendar_get_current_view_widget (gcal);
-
- e_calendar_view_delete_selected_events (E_CALENDAR_VIEW (view));
- } else if (location == FOCUS_TASKPAD)
- e_calendar_table_delete_selected (E_CALENDAR_TABLE (priv->todo));
- else
- g_assert_not_reached ();
-}
-
-void
-gnome_calendar_delete_selected_occurrence (GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
- FocusLocation location;
- GtkWidget *view;
-
- g_return_if_fail (GNOME_IS_CALENDAR (gcal));
-
- priv = gcal->priv;
-
- location = get_focus_location (gcal);
-
- if (location == FOCUS_CALENDAR) {
-
- view = gnome_calendar_get_current_view_widget (gcal);
- e_calendar_view_delete_selected_occurrence (E_CALENDAR_VIEW (view));
- }
-}
-
-static gboolean
-check_instance_cb (ECalComponent *comp,
- time_t instance_start,
- time_t instance_end,
- gpointer data)
-{
- gboolean *remove = data;
-
- *remove = FALSE;
-
- return FALSE;
-}
-
-void
-gnome_calendar_purge (GnomeCalendar *gcal, time_t older_than)
-{
- GnomeCalendarPrivate *priv;
- char *sexp, *start, *end;
- GList *l;
-
- g_return_if_fail (GNOME_IS_CALENDAR (gcal));
-
- priv = gcal->priv;
-
- start = isodate_from_time_t (0);
- end = isodate_from_time_t (older_than);
- sexp = g_strdup_printf ("(occur-in-time-range? (make-time \"%s\")"
- " (make-time \"%s\"))",
- start, end);
-
- e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), _("Purging"));
-
- /* FIXME Confirm expunge */
- for (l = priv->clients_list; l != NULL; l = l->next) {
- ECal *client = l->data;
- GList *objects, *m;
- gboolean read_only = TRUE;
-
- e_cal_is_read_only (client, &read_only, NULL);
- if (!read_only)
- continue;
-
- if (!e_cal_get_object_list (client, sexp, &objects, NULL)) {
- g_warning (G_STRLOC ": Could not get the objects");
-
- continue;
- }
-
- for (m = objects; m; m = m->next) {
- ECalComponent *comp;
- gboolean remove = TRUE;
-
- comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (m->data));
-
- e_cal_recur_generate_instances (comp, older_than, -1,
- (ECalRecurInstanceFn) check_instance_cb,
- &remove,
- (ECalRecurResolveTimezoneFn) e_cal_resolve_tzid_cb,
- client, priv->zone);
-
- /* FIXME Better error handling */
- if (remove)
- e_cal_remove_object (client, icalcomponent_get_uid (m->data), NULL);
-
- g_object_unref (comp);
- }
- }
-
- e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), NULL);
-
- g_free (sexp);
- g_free (start);
- g_free (end);
-
-}
-
-ECalendarTable*
-gnome_calendar_get_task_pad (GnomeCalendar *gcal)
-{
- g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), NULL);
-
- return E_CALENDAR_TABLE (gcal->priv->todo);
-}
-
-GtkWidget *
-gnome_calendar_get_e_calendar_widget (GnomeCalendar *gcal)
-{
- g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), NULL);
-
- return GTK_WIDGET(gcal->priv->date_navigator);
-}
-
-GtkWidget *
-gnome_calendar_get_search_bar_widget (GnomeCalendar *gcal)
-{
- g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), NULL);
-
- return GTK_WIDGET(gcal->priv->search_bar);
-}
-
-GtkWidget *
-gnome_calendar_get_view_notebook_widget (GnomeCalendar *gcal)
-{
- g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), NULL);
-
- return GTK_WIDGET(gcal->priv->notebook);
-}
diff --git a/calendar/gui/gnome-cal.h b/calendar/gui/gnome-cal.h
deleted file mode 100644
index 896faaa13b..0000000000
--- a/calendar/gui/gnome-cal.h
+++ /dev/null
@@ -1,189 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 <gtk/gtkvbox.h>
-#include <bonobo/bonobo-ui-component.h>
-#include <gal/widgets/e-popup-menu.h>
-#include <widgets/misc/e-calendar.h>
-#include <libecal/e-cal.h>
-
-#include "e-calendar-table.h"
-
-G_BEGIN_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,
- GNOME_CAL_LIST_VIEW,
- GNOME_CAL_LAST_VIEW
-} GnomeCalendarViewType;
-
-typedef enum {
- GNOME_CAL_GOTO_TODAY,
- GNOME_CAL_GOTO_DATE,
- GNOME_CAL_GOTO_FIRST_DAY_OF_MONTH,
- GNOME_CAL_GOTO_LAST_DAY_OF_MONTH,
- GNOME_CAL_GOTO_FIRST_DAY_OF_WEEK,
- GNOME_CAL_GOTO_LAST_DAY_OF_WEEK,
- GNOME_CAL_GOTO_SAME_DAY_OF_PREVIOUS_WEEK,
- GNOME_CAL_GOTO_SAME_DAY_OF_NEXT_WEEK
-} GnomeCalendarGotoDateType;
-
-struct _GnomeCalendar {
- GtkVBox vbox;
-
- /* Private data */
- GnomeCalendarPrivate *priv;
-};
-
-struct _GnomeCalendarClass {
- GtkVBoxClass parent_class;
-
- /* Notification signals */
- void (* dates_shown_changed) (GnomeCalendar *gcal);
-
- void (* calendar_selection_changed) (GnomeCalendar *gcal);
- void (* taskpad_selection_changed) (GnomeCalendar *gcal);
-
- void (* calendar_focus_change) (GnomeCalendar *gcal, gboolean in);
- void (* taskpad_focus_change) (GnomeCalendar *gcal, gboolean in);
- void (* goto_date) (GnomeCalendar *gcal,
- GnomeCalendarGotoDateType date);
-
-};
-
-
-GtkType gnome_calendar_get_type (void);
-GtkWidget *gnome_calendar_construct (GnomeCalendar *gcal);
-
-GtkWidget *gnome_calendar_new (void);
-
-void gnome_calendar_set_ui_component (GnomeCalendar *cal,
- BonoboUIComponent *ui_component);
-
-ECalendarTable *gnome_calendar_get_task_pad (GnomeCalendar *gcal);
-
-ECalModel *gnome_calendar_get_calendar_model (GnomeCalendar *gcal);
-ECal *gnome_calendar_get_default_client (GnomeCalendar *gcal);
-ECal *gnome_calendar_get_task_pad_e_cal(GnomeCalendar *gcal);
-
-gboolean gnome_calendar_add_event_uri (GnomeCalendar *gcal, const char *str_uri);
-gboolean gnome_calendar_remove_event_uri (GnomeCalendar *gcal, const char *str_uri);
-gboolean gnome_calendar_set_default_uri (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);
-
-GtkWidget *gnome_calendar_get_current_view_widget (GnomeCalendar *gcal);
-
-ECalendarTable *gnome_calendar_get_task_pad (GnomeCalendar *gcal);
-GtkWidget *gnome_calendar_get_e_calendar_widget (GnomeCalendar *gcal);
-GtkWidget *gnome_calendar_get_search_bar_widget (GnomeCalendar *gcal);
-GtkWidget *gnome_calendar_get_view_notebook_widget (GnomeCalendar *gcal);
-
-void gnome_calendar_setup_view_menus (GnomeCalendar *gcal, BonoboUIComponent *uic);
-void gnome_calendar_discard_view_menus (GnomeCalendar *gcal);
-
-EPopupMenu *gnome_calendar_setup_view_popup (GnomeCalendar *gcal);
-void gnome_calendar_discard_view_popup (GnomeCalendar *gcal, EPopupMenu *popup);
-
-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_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);
-
-/* Returns the number of selected tasks */
-gint gnome_calendar_get_num_tasks_selected (GnomeCalendar *gcal);
-
-/* 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_selection (GnomeCalendar *gcal);
-void gnome_calendar_delete_selected_occurrence (GnomeCalendar *gcal);
-void gnome_calendar_purge (GnomeCalendar *gcal,
- time_t older_than);
-
-
-
-G_END_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 b268e03294..0000000000
--- a/calendar/gui/goto-dialog.glade
+++ /dev/null
@@ -1,225 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-
-<widget class="GtkDialog" id="goto-dialog">
- <property name="title" translatable="yes">Go To Date</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="has_separator">True</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">8</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="button4">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Go To Today</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">0</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="button5">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">-6</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">4</property>
-
- <child>
- <widget class="GtkHBox" id="hbox12">
- <property name="visible">True</property>
- <property name="homogeneous">True</property>
- <property name="spacing">4</property>
-
- <child>
- <widget class="GtkOptionMenu" id="month">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget1">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget2">
- <property name="visible">True</property>
- <property name="label" translatable="yes">January</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">February</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget4">
- <property name="visible">True</property>
- <property name="label" translatable="yes">March</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget5">
- <property name="visible">True</property>
- <property name="label" translatable="yes">April</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget6">
- <property name="visible">True</property>
- <property name="label" translatable="yes">May</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget7">
- <property name="visible">True</property>
- <property name="label" translatable="yes">June</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget8">
- <property name="visible">True</property>
- <property name="label" translatable="yes">July</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget9">
- <property name="visible">True</property>
- <property name="label" translatable="yes">August</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget10">
- <property name="visible">True</property>
- <property name="label" translatable="yes">September</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget11">
- <property name="visible">True</property>
- <property name="label" translatable="yes">October</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget12">
- <property name="visible">True</property>
- <property name="label" translatable="yes">November</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget13">
- <property name="visible">True</property>
- <property name="label" translatable="yes">December</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkSpinButton" id="year">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">True</property>
- <property name="update_policy">GTK_UPDATE_IF_VALID</property>
- <property name="snap_to_ticks">False</property>
- <property name="wrap">False</property>
- <property name="adjustment">1969 1969 2038 1 5 10</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <placeholder/>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/calendar/gui/goto.c b/calendar/gui/goto.c
deleted file mode 100644
index 66c6ecbad4..0000000000
--- a/calendar/gui/goto.c
+++ /dev/null
@@ -1,266 +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 <gtk/gtkdialog.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;
- ECal *client;
-
- client = gnome_calendar_get_default_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);
-
- gtk_dialog_response (GTK_DIALOG (dlg->dialog), GTK_RESPONSE_NONE);
- /* 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;
-
- gnome_canvas_item_set (GNOME_CANVAS_ITEM (calitem),
- "move_selection_when_moving", FALSE,
- NULL);
- 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)
- g_signal_connect (menu, "selection_done", G_CALLBACK (month_changed), dlg);
-
- adj = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (dlg->year));
- g_signal_connect (adj, "value_changed", G_CALLBACK (year_changed), dlg);
-
- g_signal_connect (dlg->ecal->calitem, "date_range_changed", G_CALLBACK (ecal_date_range_changed), dlg);
- g_signal_connect (dlg->ecal->calitem, "selection_changed", G_CALLBACK (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, 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);
-
- gtk_window_set_transient_for (GTK_WINDOW (dlg->dialog),
- GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gcal))));
-
- /* set initial selection to current day */
-
- dlg->ecal->calitem->selection_set = TRUE;
- dlg->ecal->calitem->selection_start_month_offset = 0;
- dlg->ecal->calitem->selection_start_day = tt.day;
- dlg->ecal->calitem->selection_end_month_offset = 0;
- dlg->ecal->calitem->selection_end_day = tt.day;
-
- gnome_canvas_item_grab_focus (GNOME_CANVAS_ITEM (dlg->ecal->calitem));
-
- b = gtk_dialog_run (GTK_DIALOG (dlg->dialog));
- gtk_widget_destroy (dlg->dialog);
-
- if (b == 0)
- goto_today (dlg);
-
- g_object_unref (dlg->xml);
- g_free (dlg);
- dlg = NULL;
-}
diff --git a/calendar/gui/goto.h b/calendar/gui/goto.h
deleted file mode 100644
index 9ecfeeeb83..0000000000
--- a/calendar/gui/goto.h
+++ /dev/null
@@ -1,31 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 391bc1f73d..0000000000
--- a/calendar/gui/itip-bonobo-control.c
+++ /dev/null
@@ -1,265 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <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 <bonobo/bonobo-exception.h>
-#include <libical/ical.h>
-
-#include "e-itip-control.h"
-#include "itip-bonobo-control.h"
-
-extern gchar *evolution_dir;
-
-enum E_ITIP_BONOBO_ARGS {
- FROM_ADDRESS_ARG_ID,
- VIEW_ONLY_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 (BONOBO_EX (&ev)) {
- 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.
- */
-typedef struct {
- EItipControl *itip;
- char *text;
-} idle_data;
-
-static gboolean
-set_data_idle_cb (gpointer data)
-{
- idle_data *id = data;
-
- e_itip_control_set_data (id->itip, id->text);
- g_object_unref (id->itip);
- g_free (id->text);
- g_free (id);
-
- return FALSE;
-}
-
-static void
-pstream_load (BonoboPersistStream *ps, const Bonobo_Stream stream,
- Bonobo_Persist_ContentType type, void *data,
- CORBA_Environment *ev)
-{
- EItipControl *itip = data;
- idle_data *id;
-
- if (type && g_strcasecmp (type, "text/calendar") != 0 &&
- g_strcasecmp (type, "text/x-calendar") != 0) {
- bonobo_exception_set (ev, ex_Bonobo_Persist_WrongDataType);
- return;
- }
-
- id = g_new0 (idle_data, 1);
- if ((id->text = stream_read (stream)) == NULL) {
- bonobo_exception_set (ev, ex_Bonobo_Persist_FileNotFound);
- g_free (id);
- return;
- }
- g_object_ref (itip);
- id->itip = itip;
-
- g_idle_add (set_data_idle_cb, id);
-}
-/*
- * 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) {
- bonobo_exception_set (ev, ex_Bonobo_Persist_WrongDataType);
- 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;
- case VIEW_ONLY_ARG_ID:
- BONOBO_ARG_SET_INT (arg, e_itip_control_get_view_only (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;
- case VIEW_ONLY_ARG_ID:
- e_itip_control_set_view_only (itip, BONOBO_ARG_GET_INT (arg));
- break;
- }
-}
-
-
-BonoboControl *
-itip_bonobo_control_new (void)
-{
- 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_property_bag_add (prop_bag, "view_only", VIEW_ONLY_ARG_ID, BONOBO_ARG_INT, NULL,
- "view_only", 0 );
-
- bonobo_control_set_properties (control, bonobo_object_corba_objref (BONOBO_OBJECT (prop_bag)), NULL);
- bonobo_object_unref (BONOBO_OBJECT (prop_bag));
-
- bonobo_control_set_automerge (control, TRUE);
-
- stream = bonobo_persist_stream_new (pstream_load, pstream_save,
- pstream_get_content_types,
- "OAFIID:GNOME_Evolution_Calendar_iTip_Control:" BASE_VERSION,
- itip);
-
- if (stream == NULL) {
- bonobo_object_unref (BONOBO_OBJECT (control));
- return NULL;
- }
-
- bonobo_object_add_interface (BONOBO_OBJECT (control),
- BONOBO_OBJECT (stream));
-
- return control;
-}
diff --git a/calendar/gui/itip-bonobo-control.h b/calendar/gui/itip-bonobo-control.h
deleted file mode 100644
index 11b33e6602..0000000000
--- a/calendar/gui/itip-bonobo-control.h
+++ /dev/null
@@ -1,31 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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__
-
-#include <bonobo/bonobo-control.h>
-
-BonoboControl *itip_bonobo_control_new (void);
-
-#endif /* __ITIP_CONTROL_H__ */
diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c
deleted file mode 100644
index 30e95dbcfe..0000000000
--- a/calendar/gui/itip-utils.c
+++ /dev/null
@@ -1,979 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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-moniker-util.h>
-#include <libgnome/gnome-i18n.h>
-#include <gtk/gtkmessagedialog.h>
-#include <gtk/gtkwidget.h>
-#include <gal/util/e-util.h>
-#include <libical/ical.h>
-#include <Evolution-Composer.h>
-#include <e-util/e-dialog-utils.h>
-#include <e-util/e-time-utils.h>
-#include <libecal/e-cal-time-util.h>
-#include <libecal/e-cal-util.h>
-#include "calendar-config.h"
-#include "itip-utils.h"
-
-#define GNOME_EVOLUTION_COMPOSER_OAFIID "OAFIID:GNOME_Evolution_Mail_Composer:" BASE_VERSION
-
-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 EAccountList *accounts = NULL;
-
-EAccountList *
-itip_addresses_get (void)
-{
- if (accounts == NULL) {
- GConfClient *gconf_client = gconf_client_get_default ();
- accounts = e_account_list_new (gconf_client);
- g_object_unref (gconf_client);
- }
-
- return accounts;
-}
-
-EAccount *
-itip_addresses_get_default (void)
-{
- return (EAccount *)e_account_list_get_default(itip_addresses_get());
-}
-
-gboolean
-itip_organizer_is_user (ECalComponent *comp, ECal *client)
-{
- ECalComponentOrganizer organizer;
- const char *strip;
- gboolean user_org = FALSE;
-
- if (!e_cal_component_has_organizer (comp))
- return FALSE;
-
- e_cal_component_get_organizer (comp, &organizer);
- if (organizer.value != NULL) {
-
- strip = itip_strip_mailto (organizer.value);
-
- if (e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_ORGANIZER_NOT_EMAIL_ADDRESS)) {
- char *email;
-
- if (e_cal_get_cal_address (client, &email, NULL) && !g_strcasecmp (email, strip)) {
- g_free (email);
-
- return TRUE;
- }
-
- return FALSE;
- }
-
- user_org = e_account_list_find(itip_addresses_get(), E_ACCOUNT_FIND_ID_ADDRESS, strip) != NULL;
- }
-
- return user_org;
-}
-
-gboolean
-itip_sentby_is_user (ECalComponent *comp)
-{
- ECalComponentOrganizer organizer;
- const char *strip;
- gboolean user_sentby = FALSE;
-
- if (!e_cal_component_has_organizer (comp))
- return FALSE;
-
- e_cal_component_get_organizer (comp, &organizer);
- if (organizer.sentby != NULL) {
- strip = itip_strip_mailto (organizer.sentby);
- user_sentby = e_account_list_find(itip_addresses_get(), E_ACCOUNT_FIND_ID_ADDRESS, strip) != NULL;
- }
-
- return user_sentby;
-}
-
-const gchar *
-itip_strip_mailto (const gchar *address)
-{
- if (address == NULL)
- return NULL;
-
- if (!g_strncasecmp (address, "mailto:", 7))
- address += 7;
-
- return address;
-}
-
-static char *
-get_label (struct icaltimetype *tt)
-{
- char buffer[1000];
- struct tm tmp_tm;
-
- tmp_tm = icaltimetype_to_tm (tt);
- e_time_format_date_and_time (&tmp_tm,
- calendar_config_get_24_hour_format (),
- FALSE, FALSE,
- buffer, 1000);
-
- return g_strdup (buffer);
-}
-
-typedef struct {
- GHashTable *tzids;
- icalcomponent *icomp;
- ECal *client;
- icalcomponent *zones;
-} ItipUtilTZData;
-
-
-static void
-foreach_tzid_callback (icalparameter *param, gpointer data)
-{
- ItipUtilTZData *tz_data = data;
- const char *tzid;
- icaltimezone *zone = NULL;
- icalcomponent *vtimezone_comp;
-
- /* Get the TZID string from the parameter. */
- tzid = icalparameter_get_tzid (param);
- if (!tzid || g_hash_table_lookup (tz_data->tzids, tzid))
- return;
-
- /* Look for the timezone */
- if (tz_data->zones != NULL)
- zone = icalcomponent_get_timezone (tz_data->zones, tzid);
- if (zone == NULL)
- zone = icaltimezone_get_builtin_timezone_from_tzid (tzid);
- if (zone == NULL && tz_data->client != NULL)
- e_cal_get_timezone (tz_data->client, tzid, &zone, NULL);
- if (zone == NULL)
- 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 (tz_data->icomp, icalcomponent_new_clone (vtimezone_comp));
- g_hash_table_insert (tz_data->tzids, (char *)tzid, (char *)tzid);
-}
-
-static icalcomponent *
-comp_toplevel_with_zones (ECalComponentItipMethod method, ECalComponent *comp, ECal *client, icalcomponent *zones)
-{
- icalcomponent *top_level, *icomp;
- icalproperty *prop;
- icalvalue *value;
- ItipUtilTZData tz_data;
-
- top_level = e_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 (top_level, prop);
-
- icomp = e_cal_component_get_icalcomponent (comp);
- icomp = icalcomponent_new_clone (icomp);
-
- tz_data.tzids = g_hash_table_new (g_str_hash, g_str_equal);
- tz_data.icomp = top_level;
- tz_data.client = client;
- tz_data.zones = zones;
- icalcomponent_foreach_tzid (icomp, foreach_tzid_callback, &tz_data);
- g_hash_table_destroy (tz_data.tzids);
-
- icalcomponent_add_component (top_level, icomp);
-
- return top_level;
-}
-
-static gboolean
-users_has_attendee (GList *users, const char *address)
-{
- GList *l;
-
- for (l = users; l != NULL; l = l->next) {
- if (!g_strcasecmp (address, l->data))
- return TRUE;
- }
-
- return FALSE;
-}
-
-static CORBA_char *
-comp_from (ECalComponentItipMethod method, ECalComponent *comp)
-{
- ECalComponentOrganizer organizer;
- ECalComponentAttendee *attendee;
- GSList *attendees;
- CORBA_char *str;
-
- switch (method) {
- case E_CAL_COMPONENT_METHOD_PUBLISH:
- return CORBA_string_dup ("");
-
- case E_CAL_COMPONENT_METHOD_REQUEST:
- case E_CAL_COMPONENT_METHOD_CANCEL:
- case E_CAL_COMPONENT_METHOD_ADD:
- e_cal_component_get_organizer (comp, &organizer);
- if (organizer.value == NULL) {
- e_notice (NULL, GTK_MESSAGE_ERROR,
- _("An organizer must be set."));
- return NULL;
- }
-
- return CORBA_string_dup (itip_strip_mailto (organizer.value));
-
- default:
- if (!e_cal_component_has_attendees (comp))
- return CORBA_string_dup ("");
-
- e_cal_component_get_attendee_list (comp, &attendees);
- attendee = attendees->data;
- str = CORBA_string_dup (attendee->value ? itip_strip_mailto (attendee->value) : "");
- e_cal_component_free_attendee_list (attendees);
-
- return str;
- }
-}
-
-static GNOME_Evolution_Composer_RecipientList *
-comp_to_list (ECalComponentItipMethod method, ECalComponent *comp, GList *users)
-{
- GNOME_Evolution_Composer_RecipientList *to_list;
- GNOME_Evolution_Composer_Recipient *recipient;
- ECalComponentOrganizer organizer;
- GSList *attendees, *l;
- gint len;
-
- switch (method) {
- case E_CAL_COMPONENT_METHOD_REQUEST:
- case E_CAL_COMPONENT_METHOD_CANCEL:
- e_cal_component_get_attendee_list (comp, &attendees);
- len = g_slist_length (attendees);
- if (len <= 0) {
- e_notice (NULL, GTK_MESSAGE_ERROR,
- _("At least one attendee is necessary"));
- e_cal_component_free_attendee_list (attendees);
- return NULL;
- }
-
- to_list = GNOME_Evolution_Composer_RecipientList__alloc ();
- to_list->_maximum = len;
- to_list->_length = 0;
- to_list->_buffer = CORBA_sequence_GNOME_Evolution_Composer_Recipient_allocbuf (len);
-
- e_cal_component_get_organizer (comp, &organizer);
- if (organizer.value == NULL) {
- e_notice (NULL, GTK_MESSAGE_ERROR,
- _("An organizer must be set."));
- return NULL;
- }
-
- for (l = attendees; l != NULL; l = l->next) {
- ECalComponentAttendee *att = l->data;
-
- if (users_has_attendee (users, att->value))
- continue;
- else if (!g_strcasecmp (att->value, organizer.value))
- continue;
-
- recipient = &(to_list->_buffer[to_list->_length]);
- 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));
-
- to_list->_length++;
- }
- e_cal_component_free_attendee_list (attendees);
- break;
-
- case E_CAL_COMPONENT_METHOD_REPLY:
- case E_CAL_COMPONENT_METHOD_ADD:
- case E_CAL_COMPONENT_METHOD_REFRESH:
- case E_CAL_COMPONENT_METHOD_COUNTER:
- case E_CAL_COMPONENT_METHOD_DECLINECOUNTER:
- e_cal_component_get_organizer (comp, &organizer);
- if (organizer.value == NULL) {
- e_notice (NULL, GTK_MESSAGE_ERROR,
- _("An organizer must be set."));
- return NULL;
- }
-
- 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;
- }
- CORBA_sequence_set_release (to_list, TRUE);
-
- return to_list;
-}
-
-static CORBA_char *
-comp_subject (ECalComponentItipMethod method, ECalComponent *comp)
-{
- ECalComponentText caltext;
- const char *description, *prefix = NULL;
- GSList *alist;
- CORBA_char *subject;
-
- e_cal_component_get_summary (comp, &caltext);
- if (caltext.value != NULL)
- description = caltext.value;
- else {
- switch (e_cal_component_get_vtype (comp)) {
- case E_CAL_COMPONENT_EVENT:
- description = _("Event information");
- case E_CAL_COMPONENT_TODO:
- description = _("Task information");
- case E_CAL_COMPONENT_JOURNAL:
- description = _("Journal information");
- case E_CAL_COMPONENT_FREEBUSY:
- description = _("Free/Busy information");
- default:
- description = _("Calendar information");
- }
- }
-
- switch (method) {
- case E_CAL_COMPONENT_METHOD_PUBLISH:
- case E_CAL_COMPONENT_METHOD_REQUEST:
- /* FIXME: If this is an update to a previous
- * PUBLISH or REQUEST, then
- prefix = U_("Updated");
- */
- break;
-
- case E_CAL_COMPONENT_METHOD_REPLY:
- e_cal_component_get_attendee_list (comp, &alist);
- if (alist != NULL) {
- ECalComponentAttendee *a = alist->data;
-
- switch (a->status) {
- case ICAL_PARTSTAT_ACCEPTED:
- prefix = _("Accepted");
- break;
- case ICAL_PARTSTAT_TENTATIVE:
- prefix = _("Tentatively Accepted");
- break;
- case ICAL_PARTSTAT_DECLINED:
- prefix = _("Declined");
- break;
- default:
- break;
- }
- e_cal_component_free_attendee_list (alist);
- }
- break;
-
- case E_CAL_COMPONENT_METHOD_ADD:
- prefix = _("Updated");
- break;
-
- case E_CAL_COMPONENT_METHOD_CANCEL:
- prefix = _("Cancel");
- break;
-
- case E_CAL_COMPONENT_METHOD_REFRESH:
- prefix = _("Refresh");
- break;
-
- case E_CAL_COMPONENT_METHOD_COUNTER:
- prefix = _("Counter-proposal");
- break;
-
- case E_CAL_COMPONENT_METHOD_DECLINECOUNTER:
- prefix = _("Declined");
- break;
-
- default:
- break;
- }
-
- if (prefix) {
- subject = CORBA_string_alloc (strlen (description) +
- strlen (prefix) + 3);
- sprintf (subject, "%s: %s", prefix, description);
- } else
- subject = CORBA_string_dup (description);
-
- return subject;
-}
-
-static CORBA_char *
-comp_content_type (ECalComponent *comp, ECalComponentItipMethod method)
-{
- char tmp[256];
-
- sprintf (tmp, "text/calendar; name=\"%s\"; charset=utf-8; METHOD=%s",
- e_cal_component_get_vtype (comp) == E_CAL_COMPONENT_FREEBUSY ?
- "freebusy.ifb" : "calendar.ics", itip_methods[method]);
- return CORBA_string_dup (tmp);
-
-}
-
-static CORBA_char *
-comp_filename (ECalComponent *comp)
-{
- switch (e_cal_component_get_vtype (comp)) {
- case E_CAL_COMPONENT_FREEBUSY:
- return CORBA_string_dup ("freebusy.ifb");
- default:
- return CORBA_string_dup ("calendar.ics");
- }
-}
-
-static CORBA_char *
-comp_description (ECalComponent *comp)
-{
- CORBA_char *description;
- ECalComponentDateTime dt;
- char *start = NULL, *end = NULL;
-
- switch (e_cal_component_get_vtype (comp)) {
- case E_CAL_COMPONENT_EVENT:
- return CORBA_string_dup (_("Event information"));
- case E_CAL_COMPONENT_TODO:
- return CORBA_string_dup (_("Task information"));
- case E_CAL_COMPONENT_JOURNAL:
- return CORBA_string_dup (_("Journal information"));
- case E_CAL_COMPONENT_FREEBUSY:
- e_cal_component_get_dtstart (comp, &dt);
- if (dt.value)
- start = get_label (dt.value);
- e_cal_component_free_datetime (&dt);
-
- e_cal_component_get_dtend (comp, &dt);
- if (dt.value)
- end = get_label (dt.value);
- e_cal_component_free_datetime (&dt);
-
- if (start != NULL && end != NULL) {
- char *tmp;
- tmp = g_strdup_printf (_("Free/Busy information (%s to %s)"), start, end);
- description = CORBA_string_dup (tmp);
- g_free (tmp);
- } else {
- description = CORBA_string_dup (_("Free/Busy information"));
- }
- g_free (start);
- g_free (end);
- return description;
- default:
- return CORBA_string_dup (_("iCalendar information"));
- }
-}
-
-static gboolean
-comp_server_send (ECalComponentItipMethod method, ECalComponent *comp, ECal *client,
- icalcomponent *zones, GList **users)
-{
- icalcomponent *top_level;
- gboolean retval = TRUE;
- GError *error = NULL;
-
- top_level = comp_toplevel_with_zones (method, comp, client, zones);
- if (!e_cal_send_objects (client, top_level, &error)) {
- /* FIXME Really need a book problem status code */
- if (error->code != E_CALENDAR_STATUS_OK) {
- /* FIXME Better error message */
- e_notice (NULL, GTK_MESSAGE_ERROR, "Unable to book");
-
- retval = FALSE;
- }
- }
-
- g_clear_error (&error);
-
- icalcomponent_free (top_level);
-
- return retval;
-}
-
-static gboolean
-comp_limit_attendees (ECalComponent *comp)
-{
- icalcomponent *icomp;
- icalproperty *prop;
- gboolean found = FALSE, match = FALSE;
- GSList *l, *list = NULL;
-
- icomp = e_cal_component_get_icalcomponent (comp);
-
- for (prop = icalcomponent_get_first_property (icomp, ICAL_ATTENDEE_PROPERTY);
- prop != NULL;
- prop = icalcomponent_get_next_property (icomp, ICAL_ATTENDEE_PROPERTY))
- {
- icalvalue *value;
- const char *attendee;
- char *text;
-
- /* If we've already found something, just erase the rest */
- if (found) {
- list = g_slist_prepend (list, prop);
- continue;
- }
-
- value = icalproperty_get_value (prop);
- if (!value)
- continue;
-
- attendee = icalvalue_get_string (value);
-
- text = g_strdup (itip_strip_mailto (attendee));
- text = g_strstrip (text);
- found = match = e_account_list_find(itip_addresses_get(), E_ACCOUNT_FIND_ID_ADDRESS, text) != NULL;
- g_free (text);
-
- if (!match)
- list = g_slist_prepend (list, prop);
- match = FALSE;
- }
-
- for (l = list; l != NULL; l = l->next) {
- prop = l->data;
-
- icalcomponent_remove_property (icomp, prop);
- icalproperty_free (prop);
- }
- g_slist_free (list);
-
- return found;
-}
-
-static void
-comp_sentby (ECalComponent *comp, ECal *client)
-{
- ECalComponentOrganizer organizer;
-
- e_cal_component_get_organizer (comp, &organizer);
- if (!organizer.value) {
- EAccount *a = itip_addresses_get_default ();
-
- organizer.value = g_strdup_printf ("MAILTO:%s", a->id->address);
- organizer.sentby = NULL;
- organizer.cn = a->id->name;
- organizer.language = NULL;
-
- e_cal_component_set_organizer (comp, &organizer);
- g_free ((char *) organizer.value);
-
- return;
- }
-
- if (!itip_organizer_is_user (comp, client) && !itip_sentby_is_user (comp)) {
- EAccount *a = itip_addresses_get_default ();
-
- organizer.value = g_strdup (organizer.value);
- organizer.sentby = g_strdup_printf ("MAILTO:%s", a->id->address);
- organizer.cn = g_strdup (organizer.cn);
- organizer.language = g_strdup (organizer.language);
-
- e_cal_component_set_organizer (comp, &organizer);
-
- g_free ((char *)organizer.value);
- g_free ((char *)organizer.sentby);
- g_free ((char *)organizer.cn);
- g_free ((char *)organizer.language);
- }
-}
-static ECalComponent *
-comp_minimal (ECalComponent *comp, gboolean attendee)
-{
- ECalComponent *clone;
- icalcomponent *icomp, *icomp_clone;
- icalproperty *prop;
- ECalComponentOrganizer organizer;
- const char *uid;
- GSList *comments;
- struct icaltimetype itt;
- ECalComponentRange recur_id;
-
- clone = e_cal_component_new ();
- e_cal_component_set_new_vtype (clone, e_cal_component_get_vtype (comp));
-
- if (attendee) {
- GSList *attendees;
-
- e_cal_component_get_attendee_list (comp, &attendees);
- e_cal_component_set_attendee_list (clone, attendees);
-
- if (!comp_limit_attendees (clone)) {
- e_notice (NULL, GTK_MESSAGE_ERROR,
- _("You must be an attendee of the event."));
- goto error;
- }
- }
-
- itt = icaltime_from_timet_with_zone (time (NULL), FALSE,
- icaltimezone_get_utc_timezone ());
- e_cal_component_set_dtstamp (clone, &itt);
-
- e_cal_component_get_organizer (comp, &organizer);
- if (organizer.value == NULL)
- goto error;
- e_cal_component_set_organizer (clone, &organizer);
-
- e_cal_component_get_uid (comp, &uid);
- e_cal_component_set_uid (clone, uid);
-
- e_cal_component_get_comment_list (comp, &comments);
- if (g_slist_length (comments) <= 1) {
- e_cal_component_set_comment_list (clone, comments);
- } else {
- GSList *l = comments;
-
- comments = g_slist_remove_link (comments, l);
- e_cal_component_set_comment_list (clone, l);
- e_cal_component_free_text_list (l);
- }
- e_cal_component_free_text_list (comments);
-
- e_cal_component_get_recurid (comp, &recur_id);
- if (recur_id.datetime.value != NULL)
- e_cal_component_set_recurid (clone, &recur_id);
-
- icomp = e_cal_component_get_icalcomponent (comp);
- icomp_clone = e_cal_component_get_icalcomponent (clone);
- for (prop = icalcomponent_get_first_property (icomp, ICAL_X_PROPERTY);
- prop != NULL;
- prop = icalcomponent_get_next_property (icomp, ICAL_X_PROPERTY))
- {
- icalproperty *p;
-
- p = icalproperty_new_clone (prop);
- icalcomponent_add_property (icomp_clone, p);
- }
-
- e_cal_component_rescan (clone);
-
- return clone;
-
- error:
- g_object_unref (clone);
- return NULL;
-}
-
-static ECalComponent *
-comp_compliant (ECalComponentItipMethod method, ECalComponent *comp, ECal *client, icalcomponent *zones)
-{
- ECalComponent *clone, *temp_clone;
- struct icaltimetype itt;
-
- clone = e_cal_component_clone (comp);
- itt = icaltime_from_timet_with_zone (time (NULL), FALSE,
- icaltimezone_get_utc_timezone ());
- e_cal_component_set_dtstamp (clone, &itt);
-
- /* Make UNTIL date a datetime in a simple recurrence */
- if (e_cal_component_has_recurrences (clone)
- && e_cal_component_has_simple_recurrence (clone)) {
- GSList *rrule_list;
- struct icalrecurrencetype *r;
-
- e_cal_component_get_rrule_list (clone, &rrule_list);
- r = rrule_list->data;
-
- if (!icaltime_is_null_time (r->until) && r->until.is_date) {
- ECalComponentDateTime dt;
- icaltimezone *from_zone = NULL, *to_zone;
-
- e_cal_component_get_dtstart (clone, &dt);
-
- if (dt.value->is_date) {
- from_zone = icaltimezone_get_builtin_timezone (calendar_config_get_timezone ());
- } else if (dt.tzid == NULL) {
- from_zone = icaltimezone_get_utc_timezone ();
- } else {
- if (zones != NULL)
- from_zone = icalcomponent_get_timezone (zones, dt.tzid);
- if (from_zone == NULL)
- from_zone = icaltimezone_get_builtin_timezone_from_tzid (dt.tzid);
- if (from_zone == NULL && client != NULL)
- /* FIXME Error checking */
- e_cal_get_timezone (client, dt.tzid, &from_zone, NULL);
- }
-
- to_zone = icaltimezone_get_utc_timezone ();
-
- r->until.hour = dt.value->hour;
- r->until.minute = dt.value->minute;
- r->until.second = dt.value->second;
- r->until.is_date = FALSE;
-
- icaltimezone_convert_time (&r->until, from_zone, to_zone);
- r->until.is_utc = TRUE;
-
- e_cal_component_set_rrule_list (clone, rrule_list);
- e_cal_component_abort_sequence (clone);
- }
-
- e_cal_component_free_recur_list (rrule_list);
- }
-
- /* We delete incoming alarms anyhow, and this helps with outlook */
- e_cal_component_remove_all_alarms (clone);
-
- /* Strip X-LIC-ERROR stuff */
- e_cal_component_strip_errors (clone);
-
- /* Comply with itip spec */
- switch (method) {
- case E_CAL_COMPONENT_METHOD_PUBLISH:
- comp_sentby (clone, client);
- e_cal_component_set_attendee_list (clone, NULL);
- break;
- case E_CAL_COMPONENT_METHOD_REQUEST:
- comp_sentby (clone, client);
- break;
- case E_CAL_COMPONENT_METHOD_CANCEL:
- comp_sentby (clone, client);
- break;
- case E_CAL_COMPONENT_METHOD_REPLY:
- break;
- case E_CAL_COMPONENT_METHOD_ADD:
- break;
- case E_CAL_COMPONENT_METHOD_REFRESH:
- /* Need to remove almost everything */
- temp_clone = comp_minimal (clone, TRUE);
- g_object_unref (clone);
- clone = temp_clone;
- break;
- case E_CAL_COMPONENT_METHOD_COUNTER:
- break;
- case E_CAL_COMPONENT_METHOD_DECLINECOUNTER:
- /* Need to remove almost everything */
- temp_clone = comp_minimal (clone, FALSE);
- g_object_unref (clone);
- clone = temp_clone;
- break;
- default:
- break;
- }
-
- return clone;
-}
-
-gboolean
-itip_send_comp (ECalComponentItipMethod method, ECalComponent *send_comp,
- ECal *client, icalcomponent *zones)
-{
- GNOME_Evolution_Composer composer_server;
- ECalComponent *comp = NULL;
- icalcomponent *top_level = NULL;
- GList *users = NULL;
- GNOME_Evolution_Composer_RecipientList *to_list = NULL;
- GNOME_Evolution_Composer_RecipientList *cc_list = NULL;
- GNOME_Evolution_Composer_RecipientList *bcc_list = NULL;
- CORBA_char *subject = NULL, *body = NULL, *content_type = NULL;
- CORBA_char *from = NULL, *filename = NULL, *description = NULL;
- GNOME_Evolution_Composer_AttachmentData *attach_data = NULL;
- char *ical_string;
- CORBA_Environment ev;
- gboolean retval = FALSE;
-
- CORBA_exception_init (&ev);
-
- /* Give the server a chance to manipulate the comp */
- if (method != E_CAL_COMPONENT_METHOD_PUBLISH) {
- if (!comp_server_send (method, send_comp, client, zones, &users))
- goto cleanup;
- }
-
- /* Tidy up the comp */
- comp = comp_compliant (method, send_comp, client, zones);
- if (comp == NULL)
- goto cleanup;
-
- /* Recipients */
- to_list = comp_to_list (method, comp, users);
- if (method != E_CAL_COMPONENT_METHOD_PUBLISH) {
- if (to_list == NULL || to_list->_length == 0) {
- /* We sent them all via the server */
- retval = TRUE;
- goto cleanup;
- }
- }
-
- 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 */
- subject = comp_subject (method, comp);
-
- /* From address */
- from = comp_from (method, comp);
-
- /* Obtain an object reference for the Composer. */
- composer_server = bonobo_activation_activate_from_id (GNOME_EVOLUTION_COMPOSER_OAFIID, 0, NULL, &ev);
- if (BONOBO_EX (&ev)) {
- g_warning ("Could not activate composer: %s", bonobo_exception_get_text (&ev));
- CORBA_exception_free (&ev);
- return FALSE;
- }
-
- /* Set recipients, subject */
- GNOME_Evolution_Composer_setHeaders (composer_server, from, to_list, cc_list, bcc_list, subject, &ev);
- if (BONOBO_EX (&ev)) {
- g_warning ("Unable to set composer headers while sending iTip message: %s",
- bonobo_exception_get_text (&ev));
- goto cleanup;
- }
-
-
- /* Content type */
- content_type = comp_content_type (comp, method);
-
- top_level = comp_toplevel_with_zones (method, comp, client, zones);
- ical_string = icalcomponent_as_ical_string (top_level);
-
- if (e_cal_component_get_vtype (comp) == E_CAL_COMPONENT_EVENT) {
- GNOME_Evolution_Composer_setBody (composer_server, ical_string, content_type, &ev);
- } else {
- GNOME_Evolution_Composer_setMultipartType (composer_server, GNOME_Evolution_Composer_MIXED, &ev);
- if (BONOBO_EX (&ev)) {
- g_warning ("Unable to set multipart type while sending iTip message");
- goto cleanup;
- }
-
- filename = comp_filename (comp);
- description = comp_description (comp);
-
- GNOME_Evolution_Composer_setBody (composer_server, description, "text/plain", &ev);
- if (BONOBO_EX (&ev)) {
- g_warning ("Unable to set body text while sending iTip message");
- goto cleanup;
- }
-
- attach_data = GNOME_Evolution_Composer_AttachmentData__alloc ();
- attach_data->_length = strlen (ical_string) + 1;
- attach_data->_maximum = attach_data->_length;
- attach_data->_buffer = CORBA_sequence_CORBA_char_allocbuf (attach_data->_length);
- strcpy (attach_data->_buffer, ical_string);
-
- GNOME_Evolution_Composer_attachData (composer_server,
- content_type, filename, description,
- TRUE, attach_data,
- &ev);
- }
-
- if (BONOBO_EX (&ev)) {
- g_warning ("Unable to place iTip message in composer");
- goto cleanup;
- }
-
- if (method == E_CAL_COMPONENT_METHOD_PUBLISH) {
- GNOME_Evolution_Composer_show (composer_server, &ev);
- if (BONOBO_EX (&ev))
- g_warning ("Unable to show the composer while sending iTip message");
- else
- retval = TRUE;
- } else {
- GNOME_Evolution_Composer_send (composer_server, &ev);
- if (BONOBO_EX (&ev))
- g_warning ("Unable to send iTip message");
- else
- retval = TRUE;
- }
-
- cleanup:
- CORBA_exception_free (&ev);
-
- if (comp != NULL)
- g_object_unref (comp);
- if (top_level != NULL)
- icalcomponent_free (top_level);
-
- if (to_list != NULL)
- CORBA_free (to_list);
- if (cc_list != NULL)
- CORBA_free (cc_list);
- if (bcc_list != NULL)
- CORBA_free (bcc_list);
-
- if (from != NULL)
- CORBA_free (from);
- if (subject != NULL)
- CORBA_free (subject);
- if (body != NULL)
- CORBA_free (body);
- if (content_type != NULL)
- CORBA_free (content_type);
- if (filename != NULL)
- CORBA_free (filename);
- if (description != NULL)
- CORBA_free (description);
- if (attach_data != NULL) {
- CORBA_free (attach_data->_buffer);
- CORBA_free (attach_data);
- }
-
- return retval;
-}
-
diff --git a/calendar/gui/itip-utils.h b/calendar/gui/itip-utils.h
deleted file mode 100644
index cf9dd37643..0000000000
--- a/calendar/gui/itip-utils.h
+++ /dev/null
@@ -1,35 +0,0 @@
-
-#ifndef ITIP_UTILS_HEADER
-#define ITIP_UTILS_HEADER
-
-#include <libical/ical.h>
-#include <string.h>
-#include <glib.h>
-#include <libecal/e-cal.h>
-#include <libecal/e-cal-component.h>
-#include <e-util/e-account-list.h>
-
-typedef enum {
- E_CAL_COMPONENT_METHOD_PUBLISH,
- E_CAL_COMPONENT_METHOD_REQUEST,
- E_CAL_COMPONENT_METHOD_REPLY,
- E_CAL_COMPONENT_METHOD_ADD,
- E_CAL_COMPONENT_METHOD_CANCEL,
- E_CAL_COMPONENT_METHOD_REFRESH,
- E_CAL_COMPONENT_METHOD_COUNTER,
- E_CAL_COMPONENT_METHOD_DECLINECOUNTER
-} ECalComponentItipMethod;
-
-EAccountList *itip_addresses_get (void);
-EAccount *itip_addresses_get_default (void);
-
-gboolean itip_organizer_is_user (ECalComponent *comp, ECal *client);
-gboolean itip_sentby_is_user (ECalComponent *comp);
-
-const gchar *itip_strip_mailto (const gchar *address);
-
-gboolean itip_send_comp (ECalComponentItipMethod method, ECalComponent *comp,
- ECal *client, icalcomponent *zones);
-
-
-#endif
diff --git a/calendar/gui/main.c b/calendar/gui/main.c
deleted file mode 100644
index 838917244d..0000000000
--- a/calendar/gui/main.c
+++ /dev/null
@@ -1,181 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* main.c
- *
- * Copyright (C) 2000, 2001, 2002, 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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-i18n.h>
-#include <libgnome/gnome-init.h>
-#include <libgnomevfs/gnome-vfs-init.h>
-#include <glade/glade.h>
-
-#include <bonobo/bonobo-main.h>
-#include <bonobo/bonobo-shlib-factory.h>
-#include <bonobo/bonobo-exception.h>
-
-#include <gal/widgets/e-cursors.h>
-
-#include "dialogs/cal-prefs-dialog.h"
-#include "calendar-commands.h"
-#include "calendar-config.h"
-#include "calendar-component.h"
-#include "e-comp-editor-registry.h"
-#include "comp-editor-factory.h"
-#include "control-factory.h"
-#include "itip-bonobo-control.h"
-#include "tasks-control.h"
-#include "tasks-component.h"
-
-
-#define FACTORY_ID "OAFIID:GNOME_Evolution_Calendar_Factory:" BASE_VERSION
-
-#define CALENDAR_COMPONENT_ID "OAFIID:GNOME_Evolution_Calendar_Component:" BASE_VERSION
-#define CALENDAR_CONTROL_ID "OAFIID:GNOME_Evolution_Calendar_Control:" BASE_VERSION
-#define TASKS_COMPONENT_ID "OAFIID:GNOME_Evolution_Tasks_Component:" BASE_VERSION
-#define TASKS_CONTROL_ID "OAFIID:GNOME_Evolution_Tasks_Control:" BASE_VERSION
-#define ITIP_CONTROL_ID "OAFIID:GNOME_Evolution_Calendar_iTip_Control:" BASE_VERSION
-#define CONFIG_CONTROL_ID "OAFIID:GNOME_Evolution_Calendar_ConfigControl:" BASE_VERSION
-#define COMP_EDITOR_FACTORY_ID "OAFIID:GNOME_Evolution_Calendar_CompEditorFactory:" BASE_VERSION
-
-ECompEditorRegistry *comp_editor_registry = NULL;
-
-/* The component editor factory */
-static CompEditorFactory *comp_editor_factory = NULL;
-
-
-/* Factory function for the calendar component factory; just creates and
- * references a singleton service object.
- */
-static BonoboObject *
-comp_editor_factory_fn (void)
-{
- 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);
-}
-
-
-/* Does a simple activation and unreffing of the alarm notification service so
- * that the daemon will be launched if it is not running yet.
- */
-static gboolean
-launch_alarm_daemon_cb (gpointer data)
-{
- CORBA_Environment ev;
- CORBA_Object an;
- guint *idle_id = (guint *) data;
-
- /* remove the idle function */
- g_source_remove (*idle_id);
- g_free (idle_id);
-
- /* activate the alarm daemon */
- CORBA_exception_init (&ev);
- an = bonobo_activation_activate_from_id ("OAFIID:GNOME_Evolution_Calendar_AlarmNotify:" BASE_VERSION, 0, NULL, &ev);
-
- if (BONOBO_EX (&ev)) {
- g_message ("launch_alarm_daemon_cb(): Could not activate the alarm notification service");
- CORBA_exception_free (&ev);
- return FALSE;
- }
- CORBA_exception_free (&ev);
-
- /* Just get rid of it; what we are interested in is that it gets launched */
-
- CORBA_exception_init (&ev);
- bonobo_object_release_unref (an, &ev);
- if (BONOBO_EX (&ev))
- g_message ("add_alarms(): Could not unref the alarm notification service");
-
- CORBA_exception_free (&ev);
-
- return FALSE;
-}
-
-static void
-launch_alarm_daemon (void)
-{
- guint *idle_id;
-
- idle_id = g_new0 (guint, 1);
- *idle_id = g_idle_add ((GSourceFunc) launch_alarm_daemon_cb, idle_id);
-}
-
-static void
-initialize (void)
-{
- comp_editor_registry = E_COMP_EDITOR_REGISTRY (e_comp_editor_registry_new ());
-
- calendar_config_init ();
-
-#if 0
- itip_control_factory_init ();
- component_editor_factory_init ();
-#endif
-
- launch_alarm_daemon ();
-}
-
-
-static BonoboObject *
-factory (BonoboGenericFactory *factory,
- const char *component_id,
- void *closure)
-{
- static gboolean initialized = FALSE;
-
- if (! initialized) {
- initialize ();
- initialized = TRUE;
- }
-
- if (strcmp (component_id, CALENDAR_COMPONENT_ID) == 0) {
- BonoboObject *object = BONOBO_OBJECT (calendar_component_peek ());
- bonobo_object_ref (object);
- return object;
- } else if (strcmp (component_id, CALENDAR_CONTROL_ID) == 0)
- return BONOBO_OBJECT (control_factory_new_control ());
- else if (strcmp (component_id, TASKS_COMPONENT_ID) == 0) {
- BonoboObject *object = BONOBO_OBJECT (tasks_component_peek ());
- bonobo_object_ref (object);
- return object;
- } else if (strcmp (component_id, TASKS_CONTROL_ID) == 0)
- return BONOBO_OBJECT (tasks_control_new ());
- else if (strcmp (component_id, ITIP_CONTROL_ID) == 0)
- return BONOBO_OBJECT (itip_bonobo_control_new ());
- else if (strcmp (component_id, CONFIG_CONTROL_ID) == 0)
- return BONOBO_OBJECT (cal_prefs_dialog_new ());
- else if (strcmp (component_id, COMP_EDITOR_FACTORY_ID) == 0)
- return BONOBO_OBJECT (comp_editor_factory_fn ());
-
- g_warning (FACTORY_ID ": Don't know what to do with %s", component_id);
- return NULL;
-}
-
-BONOBO_ACTIVATION_SHLIB_FACTORY (FACTORY_ID, "Evolution Calendar component factory", factory, NULL)
diff --git a/calendar/gui/migration.c b/calendar/gui/migration.c
deleted file mode 100644
index afb0a59b68..0000000000
--- a/calendar/gui/migration.c
+++ /dev/null
@@ -1,150 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* calendar-component.c
- *
- * Copyright (C) 2003 Ximian, Inc
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Rodrigo Moya <rodrigo@ximian.com>
- */
-
-#include <bonobo/bonobo-i18n.h>
-#include <libgnomevfs/gnome-vfs-uri.h>
-#include <libgnomevfs/gnome-vfs-xfer.h>
-#include <gal/util/e-util.h>
-#include "migration.h"
-
-
-static gboolean
-process_old_dir (ESourceGroup *source_group, const char *path,
- const char *filename, const char *name, const char *base_uri)
-{
- char *s;
- GnomeVFSURI *from, *to;
- GnomeVFSResult vres;
- ESource *source;
- GDir *dir;
- gboolean retval = TRUE;
-
- s = g_build_filename (path, filename, NULL);
- if (!g_file_test (s, G_FILE_TEST_EXISTS)) {
- g_free (s);
- return FALSE;
- }
-
- /* transfer the old file to its new location */
- from = gnome_vfs_uri_new (s);
- g_free (s);
- if (!from)
- return FALSE;
-
- s = g_build_filename (e_source_group_peek_base_uri (source_group), base_uri,
- filename, NULL);
- if (e_mkdir_hier (s, 0700) != 0) {
- gnome_vfs_uri_unref (from);
- g_free (s);
- return FALSE;
- }
- to = gnome_vfs_uri_new (s);
- g_free (s);
- if (!to) {
- gnome_vfs_uri_unref (from);
- return FALSE;
- }
-
- vres = gnome_vfs_xfer_uri ((const GnomeVFSURI *) from,
- (const GnomeVFSURI *) to,
- GNOME_VFS_XFER_DEFAULT,
- GNOME_VFS_XFER_ERROR_MODE_ABORT,
- GNOME_VFS_XFER_OVERWRITE_MODE_REPLACE,
- NULL, NULL);
- gnome_vfs_uri_unref (from);
- gnome_vfs_uri_unref (to);
-
- if (vres != GNOME_VFS_OK)
- return FALSE;
-
- /* create the new source */
- source = e_source_new (name, base_uri);
- e_source_group_add_source (source_group, source, -1);
-
- /* process subfolders */
- s = g_build_filename (path, "subfolders", NULL);
- dir = g_dir_open (s, 0, NULL);
- if (dir) {
- const char *name, *tmp_s;
-
- while ((name = g_dir_read_name (dir))) {
- tmp_s = g_build_filename (s, name, NULL);
- if (g_file_test (tmp_s, G_FILE_TEST_IS_DIR)) {
- retval = process_old_dir (source_group, tmp_s, filename, name, name);
- }
-
- g_free (tmp_s);
- }
-
- g_dir_close (dir);
- }
-
- g_free (s);
-
- return retval;
-}
-
-gboolean
-migrate_old_calendars (ESourceGroup *source_group)
-{
- char *path;
- gboolean retval;
-
- g_return_val_if_fail (E_IS_SOURCE_GROUP (source_group), FALSE);
-
- path = g_build_filename (g_get_home_dir (), "evolution", NULL);
- if (!g_file_test (path, G_FILE_TEST_IS_DIR)) {
- g_free (path);
- return FALSE;
- }
- g_free (path);
-
- /* look for the top-level calendar */
- path = g_build_filename (g_get_home_dir (), "evolution/local/Calendar", NULL);
- retval = process_old_dir (source_group, path, "calendar.ics", _("Personal"), "Personal");
- g_free (path);
-
- return retval;
-}
-
-gboolean
-migrate_old_tasks (ESourceGroup *source_group)
-{
- char *path;
- gboolean retval;
-
- g_return_val_if_fail (E_IS_SOURCE_GROUP (source_group), FALSE);
-
- path = g_build_filename (g_get_home_dir (), "evolution", NULL);
- if (!g_file_test (path, G_FILE_TEST_IS_DIR)) {
- g_free (path);
- return FALSE;
- }
- g_free (path);
-
- /* look for the top-level calendar */
- path = g_build_filename (g_get_home_dir (), "evolution/local/Tasks", NULL);
- retval = process_old_dir (source_group, path, "tasks.ics", _("Personal"), "Personal");
- g_free (path);
-
- return retval;
-}
diff --git a/calendar/gui/migration.h b/calendar/gui/migration.h
deleted file mode 100644
index b217ae97c8..0000000000
--- a/calendar/gui/migration.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* calendar-component.c
- *
- * Copyright (C) 2003 Ximian, Inc
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Rodrigo Moya <rodrigo@ximian.com>
- */
-
-#ifndef MIGRATION_H
-#define MIGRATION_H
-
-#include <libedataserver/e-source-group.h>
-
-gboolean migrate_old_calendars (ESourceGroup *source_group);
-gboolean migrate_old_tasks (ESourceGroup *source_group);
-
-#endif
diff --git a/calendar/gui/misc.c b/calendar/gui/misc.c
deleted file mode 100644
index e286442a89..0000000000
--- a/calendar/gui/misc.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/* Evolution calendar - Miscellaneous utility functions
- *
- * 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <e-util/e-url.h>
-#include "misc.h"
-
-
-
-/**
- * string_is_empty:
- * @value: A string.
- *
- * Returns whether a string is NULL, the empty string, or completely made up of
- * whitespace characters.
- *
- * Return value: TRUE if the string is empty, FALSE otherwise.
- **/
-gboolean
-string_is_empty (const char *value)
-{
- const char *p;
- gboolean empty;
-
- empty = TRUE;
-
- if (value) {
- p = value;
- while (*p) {
- if (!isspace ((unsigned char) *p)) {
- empty = FALSE;
- break;
- }
- p++;
- }
- }
- return empty;
-
-}
-
-/**
- * get_uri_without_password
- */
-char *
-get_uri_without_password (const char *full_uri)
-{
- EUri *uri;
- char *uristr;
-
- uri = e_uri_new (full_uri);
- if (!uri)
- return NULL;
-
- uristr = e_uri_to_string (uri, FALSE);
- e_uri_free (uri);
-
- return uristr;
- }
diff --git a/calendar/gui/misc.h b/calendar/gui/misc.h
deleted file mode 100644
index d32739f9f5..0000000000
--- a/calendar/gui/misc.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Evolution calendar - Miscellaneous utility functions
- *
- * 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef MISC_H
-#define MISC_H
-
-#include <glib.h>
-
-gboolean string_is_empty (const char *value);
-char *get_uri_without_password (const char *uri);
-
-#endif
diff --git a/calendar/gui/print.c b/calendar/gui/print.c
deleted file mode 100644
index 1e647c096b..0000000000
--- a/calendar/gui/print.c
+++ /dev/null
@@ -1,2658 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <string.h>
-#include <time.h>
-#include <glib.h>
-#include <gtk/gtkradiobutton.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-uidefs.h>
-#include <libgnomeui/gnome-stock-icons.h>
-#include <libgnomeprint/gnome-print.h>
-#include <libgnomeprint/gnome-print-paper.h>
-#include <libgnomeprint/gnome-print-job.h>
-#include <libgnomeprintui/gnome-print-job-preview.h>
-#include <libgnomeprintui/gnome-print-paper-selector.h>
-#include <libgnomeprintui/gnome-print-preview.h>
-#include <libgnomeprintui/gnome-print-dialog.h>
-#include <gal/util/e-util.h>
-#include <e-util/e-dialog-widgets.h>
-#include <e-util/e-time-utils.h>
-#include <libecal/e-cal-time-util.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.
- */
-
-/* GtkHTML prints using a fixed margin. It has code to get the margins from
- * gnome-print keys, but it's commented out. The corresponding code here
- * doesn't seem to work either (getting zero margins), so we adopt
- * gtkhtml's cheat. */
-#define TEMP_MARGIN .05
-
-/* The fonts to use */
-#define REGULAR_FONT "Sans Regular"
-#define BOLD_FONT "Sans Bold"
-
-/* 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 GnomePrintConfig *print_config = 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;
-}
-
-static GnomeFont *
-get_font_for_size (double h, GnomeFontWeight weight, gboolean italic)
-{
- GnomeFontFace *face;
- GnomeFont *font;
- double asc, desc, size;
- gchar *font_name;
-
- if (weight <= GNOME_FONT_BOOK)
- font_name = REGULAR_FONT;
- else
- font_name = BOLD_FONT;
-
- if (italic)
- font_name = g_strconcat (font_name, " Italic", NULL);
-
- /* This function is broken in gnome-print (it doesn't find a suitable face).
- * face = gnome_font_face_find_closest_from_weight_slant (DEFAULT_FONT, weight, italic); */
- face = gnome_font_face_find (font_name);
-
- asc = gnome_font_face_get_ascender (face);
- desc = abs (gnome_font_face_get_descender (face));
- size = h * 1000 / (asc + desc);
-
- /* This function is broken in gnome-print (it doesn't find a suitable font).
- * font = gnome_font_find_closest_from_weight_slant (DEFAULT_FONT, weight, italic, size); */
- font = gnome_font_find_closest (font_name, size);
-
- g_object_unref (face);
- if (italic)
- g_free (font_name);
- return font;
-}
-
-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_utf8 (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);
-
- /* Now calculate the baseline. */
- y = t - gnome_font_get_ascender (font);
-
- /* 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 book font */
-static void
-print_text_size(GnomePrintContext *pc, const char *text,
- enum align_box align, double l, double r, double t, double b)
-{
- GnomeFont *font;
-
- font = get_font_for_size (t - b, GNOME_FONT_BOOK, FALSE);
- print_text(pc, font, text, align, l, r, t, b);
- g_object_unref (font);
-}
-
-/* gets/frees the font for you, as a bold font */
-static void
-print_text_size_bold(GnomePrintContext *pc, const char *text,
- enum align_box align, double l, double r, double t, double b)
-{
- GnomeFont *font;
-
- font = get_font_for_size (t - b, GNOME_FONT_BOLD, FALSE);
- print_text(pc, font, text, align, l, r, t, b);
- g_object_unref (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;
-
- 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");
- }
- e_utf8_strftime(buffer, bufflen, fmt, &tm);
- buffer[bufflen - 1] = '\0';
-
- return buffer;
-}
-
-static gboolean
-instance_cb (ECalComponent *comp, time_t instance_start, time_t instance_end, gpointer data)
-{
- gboolean *found = data;
-
- *found = TRUE;
-
- return FALSE;
-}
-
-
-/*
- 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 ();
- ECal *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 = get_font_for_size (header_size, GNOME_FONT_BOLD, FALSE);
- 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, top - header_size);
- g_object_unref (font);
-
- top -= header_size;
-
- client = gnome_calendar_get_default_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;
-
- /* 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 = row_height;
-
- /* 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 = get_font_for_size (font_size, GNOME_FONT_BOOK, FALSE);
- font_bold = get_font_for_size (font_size, GNOME_FONT_BOLD, FALSE);
-
- /* 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_utf8 (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, _(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) {
- gboolean found = FALSE;
-
- sprintf (buf, "%d", day);
-
- /* this is a slow messy way to do this ... but easy ... */
- e_cal_generate_instances (client, now, CALOBJ_TYPE_EVENT,
- time_day_end_with_zone (now, zone),
- instance_cb, &found);
-
- font = found ? font_bold : font_normal;
-
- 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;
- }
- }
- }
- g_object_unref (font_normal);
- g_object_unref (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_utf8_sized(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;
- hour_font_size = MIN (font_size, max_font_size);
- font_hour = get_font_for_size (hour_font_size, GNOME_FONT_BOLD, FALSE);
-
- font_size = yinc * 0.33;
- max_font_size = width * 0.25;
- minute_font_size = MIN (font_size, max_font_size);
- font_minute = get_font_for_size (minute_font_size, GNOME_FONT_BOLD, FALSE);
-
- 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 = _("am");
- else
- minute = _("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++;
- }
-
- g_object_unref (font_hour);
- g_object_unref (font_minute);
-}
-
-
-/* This adds one event to the view, adding it to the appropriate array. */
-static gint
-print_day_add_event (ECalComponent *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; */
-/* g_object_ref (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 (ECalComponent *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));
- }
-
- 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)
-{
- const gchar *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_utf8 (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_utf8 (font, buffer);
- }
-
- /* Print the text. */
- summary = icalcomponent_get_summary (event->comp_data->icalcomp);
- text = summary ? (char*) summary : "";
-
- 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)
-{
- const gchar *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);
-
- summary = icalcomponent_get_summary (event->comp_data->icalcomp);
- text = summary ? (char*) summary : "";
-
-
- 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 ();
- ECal *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_default_client (gcal);
- e_cal_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);
-
- /* Also print events outside of work hours */
- if (pdi.events[0]->len > 0) {
- icaltimezone *zone = get_timezone ();
- struct icaltimetype tt;
-
- event = &g_array_index (pdi.events[0], EDayViewEvent, 0);
- tt = icaltime_from_timet_with_zone (event->start, FALSE, zone);
- if (tt.hour < pdi.start_hour)
- pdi.start_hour = tt.hour;
- pdi.start_minute_offset = pdi.start_hour * 60;
-
- event = &g_array_index (pdi.events[0], EDayViewEvent, pdi.events[0]->len - 1);
- tt = icaltime_from_timet_with_zone (event->end, FALSE, zone);
- if (tt.hour > pdi.end_hour || tt.hour == 0) {
- pdi.end_hour = tt.hour ? tt.hour : 24;
- if (tt.minute > 0)
- pdi.end_hour++;
- }
- pdi.end_minute_offset = pdi.end_hour * 60;
-
- pdi.rows = (pdi.end_hour - pdi.start_hour) * 2;
- }
-
- /* 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 = get_font_for_size (12, GNOME_FONT_BOOK, FALSE);
- 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);
- }
- g_object_unref (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 = get_font_for_size (font_size, GNOME_FONT_BOOK, FALSE);
- 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);
- }
- g_object_unref (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 (ECalComponent *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; */
-/* g_object_ref (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_size (pc, buffer, ALIGN_LEFT, x1, x2, y1, y2);
- x1 += gnome_font_get_width_utf8 (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_size (pc, buffer, ALIGN_RIGHT, x1, x2, y1, y2);
- x2 -= gnome_font_get_width_utf8 (font, buffer);
- }
-
- x1 += 4;
- x2 -= 4;
- print_text_size (pc, 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_size (pc, buffer, ALIGN_LEFT, x1, x2, y1, y2);
- x1 += gnome_font_get_width_utf8 (font, buffer);
-
- x1 += 4;
- print_text_size (pc, 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;
- const gchar *summary;
- char *text;
- int num_days, start_x, start_y, start_h, end_x, end_y, end_h;
- double x1, x2, y1, y2;
-
- summary = icalcomponent_get_summary (event->comp_data->icalcomp);
- text = summary ? (char*) summary : "";
-
- 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];
-
- 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");
-
- }
-
- e_utf8_strftime (buffer, sizeof (buffer), format_string, &tm);
- print_text_size (pc, buffer, ALIGN_RIGHT,
- x1, x2 - 4, y1 - 2, y1 - 2 - font_size);
- }
-}
-
-
-
-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 ();
- ECal *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. */
- if (multi_week_view)
- psi.compress_weekend = calendar_config_get_compress_weekend ();
- else
- psi.compress_weekend = TRUE;
- 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_default_client (gcal);
- e_cal_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 = get_font_for_size (font_size, GNOME_FONT_BOOK, FALSE);
-
- /* 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);
- }
-
- g_object_unref (font);
-
- /* Free everything. */
- for (event_num = 0; event_num < psi.events->len; event_num++) {
- event = &g_array_index (psi.events, EWeekViewEvent, event_num);
- }
- 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 = get_font_for_size (MONTH_NORMAL_FONT_SIZE, GNOME_FONT_BOLD, FALSE);
- 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++) {
- if (tm.tm_wday == 6 && compress_weekend) {
- e_utf8_strftime (buffer, sizeof (buffer), "%a/", &tm);
- len = strlen (buffer);
- tm.tm_mday++;
- tm.tm_wday = (tm.tm_wday + 1) % 7;
- e_utf8_strftime (buffer + len, sizeof (buffer) - len,
- "%a", &tm);
- } else {
- e_utf8_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);
- print_text_size (pc, buffer, ALIGN_CENTER, x1, x2, y1, y2);
-
- tm.tm_mday++;
- tm.tm_wday = (tm.tm_wday + 1) % 7;
- }
- g_object_unref (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)
-{
- ECal *client;
- GnomeFont *font_summary;
- double y, yend, x, xend;
- struct icaltimetype *tt;
- ECalendarTable *task_pad;
- ETable *table;
- ECalModel *model;
- gint rows, row;
-
- /* We get the tasks directly from the TaskPad ETable. This means we
- get them filtered & sorted for free. */
- task_pad = gnome_calendar_get_task_pad (gcal);
- table = e_calendar_table_get_table (task_pad);
- model = e_calendar_table_get_model (task_pad);
- client = gnome_calendar_get_task_pad_e_cal (gcal);
-
- font_summary = get_font_for_size (10, GNOME_FONT_BOOK, FALSE);
-
- gnome_print_setrgbcolor (pc, 0, 0, 0);
- gnome_print_setlinewidth (pc, 0.0);
-
- titled_box (pc, _("Tasks"), font_summary, ALIGN_CENTER | ALIGN_BORDER,
- &left, &right, &top, &bottom, 1.0);
-
- y = top - 3;
- yend = bottom - 2;
-
- rows = e_table_model_row_count (E_TABLE_MODEL (model));
- for (row = 0; row < rows; row++) {
- ECalModelComponent *comp_data;
- ECalComponent *comp;
- ECalComponentText summary;
- int model_row;
-
- model_row = e_table_view_to_model_row (table, row);
- comp_data = e_cal_model_get_component_at (model, model_row);
- if (!comp_data)
- continue;
-
- comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp));
-
- e_cal_component_get_summary (comp, &summary);
- if (!summary.value) {
- g_object_unref (comp);
- 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. */
- e_cal_component_get_completed (comp, &tt);
- if (tt) {
- e_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;
-
- g_object_unref (comp);
- }
-
- g_object_unref (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 */
-
- e_utf8_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 the original date passed in was
- a Saturday, we need to move on to the next Saturday, else we move
- back to the last one. */
- if (week_start_day == 0) {
- if (tm.tm_wday == 6)
- week_begin = time_add_day_with_zone (week_begin, 6, zone);
- else
- 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) {
- e_utf8_strftime (str1, sizeof (str1), _("%a %b %d"), &week_begin_tm);
- e_utf8_strftime (str2, sizeof (str2), _("%a %d %Y"), &week_end_tm);
- } else {
- if (week_begin_tm.tm_year == week_end_tm.tm_year) {
- e_utf8_strftime (str1, sizeof (str1), _("%a %b %d"), &week_begin_tm);
- e_utf8_strftime (str2, sizeof (str2), _("%a %b %d %Y"), &week_end_tm);
- } else {
- e_utf8_strftime (str1, sizeof (str1), _("%a %b %d %Y"), &week_begin_tm);
- e_utf8_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 */
-
- e_utf8_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 */
-
- e_utf8_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;
-
- gnome_print_beginpage (pc, NULL);
-
- /* 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_bold (pc, 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_bold (pc, 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;
- struct tm tm;
-
- header = top - HEADER_HEIGHT;
-
- gnome_print_beginpage (pc, NULL);
-
- tm = *convert_timet_to_struct_tm (date, zone);
- 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) {
- if (tm.tm_wday == 6)
- when = time_add_day_with_zone (when, 6, zone);
- else
- 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_bold (pc, 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_bold (pc, 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;
-
- gnome_print_beginpage (pc, NULL);
-
- /* 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_bold (pc, 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];
-
- gnome_print_beginpage (pc, NULL);
-
- print_year_summary (pc, gcal, date, left, right, top - 50, bottom,
- TRUE);
-
- /* centered title */
- format_date (date, DATE_YEAR, buf, 100);
- print_text_size_bold (pc, 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 icaltimezone*
-get_zone_from_tzid (ECal *client, const char *tzid)
-{
- icaltimezone *zone;
-
- /* Note that the timezones may not be on the server, so we try to get
- the builtin timezone with the TZID first. */
- zone = icaltimezone_get_builtin_timezone_from_tzid (tzid);
- if (!zone) {
- if (!e_cal_get_timezone (client, tzid, &zone, NULL))
- /* FIXME: Handle error better. */
- g_warning ("Couldn't get timezone from server: %s",
- tzid ? tzid : "");
- }
-
- return zone;
-}
-
-static void
-print_date_label (GnomePrintContext *pc, ECalComponent *comp, ECal *client,
- double left, double right, double top, double bottom)
-{
- icaltimezone *start_zone, *end_zone, *due_zone, *completed_zone;
- ECalComponentDateTime datetime;
- time_t start = 0, end = 0, complete = 0, due = 0;
- static char buffer[1024];
-
- e_cal_component_get_dtstart (comp, &datetime);
- if (datetime.value) {
- start_zone = get_zone_from_tzid (client, datetime.tzid);
- start = icaltime_as_timet_with_zone (*datetime.value,
- start_zone);
- }
- e_cal_component_free_datetime (&datetime);
-
- e_cal_component_get_dtend (comp, &datetime);
- if (datetime.value) {
- end_zone = get_zone_from_tzid (client, datetime.tzid);
- end = icaltime_as_timet_with_zone (*datetime.value,
- end_zone);
- }
- e_cal_component_free_datetime (&datetime);
-
- e_cal_component_get_due (comp, &datetime);
- if (datetime.value) {
- due_zone = get_zone_from_tzid (client, datetime.tzid);
- due = icaltime_as_timet_with_zone (*datetime.value,
- due_zone);
- }
- e_cal_component_free_datetime (&datetime);
-
- e_cal_component_get_completed (comp, &datetime.value);
- if (datetime.value) {
- completed_zone = icaltimezone_get_utc_timezone ();
- complete = icaltime_as_timet_with_zone (*datetime.value,
- completed_zone);
- e_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);
- }
-
- print_text_size_bold (pc, buffer, ALIGN_LEFT,
- left, right, top, top - 15);
-}
-
-static void
-print_comp_item (GnomePrintContext *pc, ECalComponent *comp, ECal *client,
- double left, double right, double top, double bottom)
-{
- GnomeFont *font;
- ECalComponentVType vtype;
- ECalComponentText text;
- GSList *desc, *l;
- const char *title, *categories;
- char *categories_string;
- GSList *contact_list, *elem;
- gint header_size;
-
- vtype = e_cal_component_get_vtype (comp);
-
- /* We should only be asked to print VEVENTs or VTODOs. */
- if (vtype == E_CAL_COMPONENT_EVENT)
- title = _("Appointment");
- else if (vtype == E_CAL_COMPONENT_TODO)
- title = _("Task");
- else
- return;
-
- gnome_print_beginpage (pc, NULL);
-
- /* Print the title in a box at the top of the page. */
- font = get_font_for_size (18, GNOME_FONT_BOLD, FALSE);
- header_size = 50;
- print_border (pc, left, right, top, top - header_size,
- 1.0, 0.9);
- print_text (pc, font, title, ALIGN_CENTER, left, right,
- top - header_size * 0.1, top - header_size);
- g_object_unref (font);
-
- top -= header_size + 10;
-
- /* Summary */
- font = get_font_for_size (18, GNOME_FONT_BOLD, FALSE);
- e_cal_component_get_summary (comp, &text);
- top = bound_text (pc, font, text.value, left, right,
- top - 3, bottom, 0);
- g_object_unref (font);
-
- /* Date information */
- print_date_label (pc, comp, client, left, right, top-3, top - 15);
- top -= 20;
-
- font = get_font_for_size (12, GNOME_FONT_BOOK, FALSE);
-
- /* For a VTODO we print the Status, Priority, % Complete and URL. */
- if (vtype == E_CAL_COMPONENT_TODO) {
- icalproperty_status status;
- const char *status_string = NULL;
- int *percent;
- int *priority;
- const char *url;
-
- /* Status */
- e_cal_component_get_status (comp, &status);
- if (status != ICAL_STATUS_NONE) {
- switch (status) {
- case ICAL_STATUS_NEEDSACTION:
- status_string = _("Not Started");
- break;
- case ICAL_STATUS_INPROCESS:
- status_string = _("In Progress");
- break;
- case ICAL_STATUS_COMPLETED:
- status_string = _("Completed");
- break;
- case ICAL_STATUS_CANCELLED:
- status_string = _("Cancelled");
- break;
- default:
- break;
- }
-
- if (status_string) {
- char *text = g_strdup_printf (_("Status: %s"),
- status_string);
- top = bound_text (pc, font, text,
- left, right, top, bottom, 0);
- top += gnome_font_get_size (font) - 6;
- g_free (text);
- }
- }
-
- /* Priority */
- e_cal_component_get_priority (comp, &priority);
- if (priority && *priority >= 0) {
- char *priority_string, *text;
-
- priority_string = e_cal_util_priority_to_string (*priority);
- e_cal_component_free_priority (priority);
-
- text = g_strdup_printf (_("Priority: %s"), priority_string);
- top = bound_text (pc, font, text,
- left, right, top, bottom, 0);
- top += gnome_font_get_size (font) - 6;
- g_free (text);
- }
-
- /* Percent Complete */
- e_cal_component_get_percent (comp, &percent);
- if (percent) {
- char *percent_string;
-
- percent_string = g_strdup_printf (_("Percent Complete: %i"), *percent);
- e_cal_component_free_percent (percent);
-
- top = bound_text (pc, font, percent_string,
- left, right, top, bottom, 0);
- top += gnome_font_get_size (font) - 6;
- }
-
-
- /* URL */
- e_cal_component_get_url (comp, &url);
- if (url && url[0]) {
- char *url_string = g_strdup_printf (_("URL: %s"),
- url);
-
- top = bound_text (pc, font, url_string,
- left, right, top, bottom, 0);
- top += gnome_font_get_size (font) - 6;
-
- g_free (url_string);
- }
- }
-
- /* Categories */
- e_cal_component_get_categories (comp, &categories);
- if (categories && categories[0]) {
- categories_string = g_strdup_printf (_("Categories: %s"),
- categories);
- top = bound_text (pc, font, categories_string,
- left, right, top, bottom, 0);
- top += gnome_font_get_size (font) - 6;
- g_free (categories_string);
- }
-
- /* Contacts */
- e_cal_component_get_contact_list (comp, &contact_list);
- if (contact_list) {
- GString *contacts = g_string_new (_("Contacts: "));
- for (elem = contact_list; elem; elem = elem->next) {
- ECalComponentText *t = elem->data;
- /* Put a comma between contacts. */
- if (elem != contact_list)
- g_string_append (contacts, ", ");
- g_string_append (contacts, t->value);
- }
- e_cal_component_free_text_list (contact_list);
-
- top = bound_text (pc, font, contacts->str,
- left, right, top, bottom, 0);
- top += gnome_font_get_size (font) - 6;
-
- g_string_free (contacts, TRUE);
- }
-
- top -= 16;
-
- /* Description */
- e_cal_component_get_description_list (comp, &desc);
- for (l = desc; l != NULL; l = l->next) {
- ECalComponentText *text = l->data;
-
- if (text->value != NULL)
- top = bound_text (pc, font, text->value, left, right, top-3, bottom, 0);
- }
- e_cal_component_free_text_list (desc);
- g_object_unref (font);
-
- gnome_print_showpage (pc);
-}
-
-void
-print_calendar (GnomeCalendar *gcal, gboolean preview, time_t date,
- PrintView default_view)
-{
- GnomePrintJob *gpm;
- GnomePrintContext *pc;
- int copies, collate;
- double l, r, t, b;
- gchar *old_orientation;
-
- g_return_if_fail (gcal != NULL);
- g_return_if_fail (GNOME_IS_CALENDAR (gcal));
-
- if (!print_config)
- print_config = gnome_print_config_default ();
-
- copies = 1;
- collate = FALSE;
-
- gpm = gnome_print_job_new (print_config);
-
- if (!preview) {
- GtkWidget *gpd;
- GtkWidget *range;
- int view;
-
- gpd = gnome_print_dialog_new (gpm, _("Print"), 0);
-
- view = (int) default_view;
- range = range_selector_new (gpd, date, &view);
- gnome_print_dialog_construct_range_custom (GNOME_PRINT_DIALOG (gpd), range);
-
- gtk_dialog_set_default_response (GTK_DIALOG (gpd),
- GNOME_PRINT_DIALOG_RESPONSE_PRINT);
-
- /* Run dialog */
-
- switch (gtk_dialog_run (GTK_DIALOG (gpd))) {
- case GNOME_PRINT_DIALOG_RESPONSE_PRINT:
- break;
-
- case GNOME_PRINT_DIALOG_RESPONSE_PREVIEW:
- preview = TRUE;
- break;
-
- case -1:
- return;
-
- default:
- gtk_widget_destroy (gpd);
- return;
- }
-
- e_dialog_get_values (gpd);
- default_view = (PrintView) view;
-
- gtk_widget_destroy (gpd);
- }
-
- old_orientation = gnome_print_config_get (print_config, GNOME_PRINT_KEY_PAGE_ORIENTATION);
-
- if (default_view == PRINT_VIEW_MONTH)
- gnome_print_config_set (print_config, GNOME_PRINT_KEY_PAGE_ORIENTATION, "R90");
-
- pc = gnome_print_job_get_context (gpm);
- gnome_print_config_get_page_size (print_config, &r, &t);
-
- /* See top of source for an explanation of this */
-
- /* gnome_print_config_get_double (print_config, GNOME_PRINT_KEY_PAGE_MARGIN_TOP, &temp_d);
- * t -= temp_d;
- * gnome_print_config_get_double (print_config, GNOME_PRINT_KEY_PAGE_MARGIN_RIGHT, &temp_d);
- * r -= temp_d;
- * gnome_print_config_get_double (print_config, GNOME_PRINT_KEY_PAGE_MARGIN_BOTTOM, &b);
- * gnome_print_config_get_double (print_config, GNOME_PRINT_KEY_PAGE_MARGIN_LEFT, &l);
- * b = l = TEMP_MARGIN; */
-
- b = t * TEMP_MARGIN;
- l = r * TEMP_MARGIN;
- t *= (1.0 - TEMP_MARGIN);
- r *= (1.0 - TEMP_MARGIN);
-
- /* 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:
- print_month_view (pc, gcal, date, l, r, t, b);
- break;
- case PRINT_VIEW_YEAR:
- print_year_view (pc, gcal, date, l, r, t, b);
- break;
- default:
- g_assert_not_reached ();
- }
-
- gnome_print_job_close (gpm);
-
- if (preview) {
- GtkWidget *gpmp;
-
- gpmp = gnome_print_job_preview_new (gpm, _("Print Preview"));
- gtk_widget_show (gpmp);
- } else {
- gnome_print_job_print (gpm);
- }
-
- gnome_print_config_set (print_config, GNOME_PRINT_KEY_PAGE_ORIENTATION, old_orientation);
- g_free (old_orientation);
- g_object_unref (gpm);
-}
-
-
-void
-print_comp (ECalComponent *comp, ECal *client, gboolean preview)
-{
- GnomePrintJob *gpm;
- GnomePrintContext *pc;
- int copies, collate;
- double l, r, t, b;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (E_IS_CAL_COMPONENT (comp));
-
- if (!print_config)
- print_config = gnome_print_config_default ();
-
- copies = 1;
- collate = FALSE;
-
- gpm = gnome_print_job_new (print_config);
-
- if (!preview) {
- GtkWidget *gpd;
-
- gpd = gnome_print_dialog_new (gpm, _("Print Item"),
- GNOME_PRINT_DIALOG_COPIES);
-
- gtk_dialog_set_default_response (GTK_DIALOG (gpd),
- GNOME_PRINT_DIALOG_RESPONSE_PRINT);
-
- /* Run dialog */
-
- switch (gtk_dialog_run (GTK_DIALOG (gpd))) {
- case GNOME_PRINT_DIALOG_RESPONSE_PRINT:
- break;
-
- case GNOME_PRINT_DIALOG_RESPONSE_PREVIEW:
- preview = TRUE;
- break;
-
- case -1:
- return;
-
- default:
- gtk_widget_destroy (gpd);
- return;
- }
-
- e_dialog_get_values (gpd);
- gtk_widget_destroy (gpd);
- }
-
- pc = gnome_print_job_get_context (gpm);
- gnome_print_config_get_page_size (print_config, &r, &t);
-
- /* See top of source for an explanation of this */
-
- /* gnome_print_config_get_double (print_config, GNOME_PRINT_KEY_PAGE_MARGIN_TOP, &temp_d);
- * t -= temp_d;
- * gnome_print_config_get_double (print_config, GNOME_PRINT_KEY_PAGE_MARGIN_RIGHT, &temp_d);
- * r -= temp_d;
- * gnome_print_config_get_double (print_config, GNOME_PRINT_KEY_PAGE_MARGIN_BOTTOM, &b);
- * gnome_print_config_get_double (print_config, GNOME_PRINT_KEY_PAGE_MARGIN_LEFT, &l);
- * b = l = TEMP_MARGIN; */
-
- b = t * TEMP_MARGIN;
- l = r * TEMP_MARGIN;
- t *= (1.0 - TEMP_MARGIN);
- r *= (1.0 - TEMP_MARGIN);
-
- print_comp_item (pc, comp, client, l, r, t, b);
- gnome_print_job_close (gpm);
-
- if (preview) {
- GtkWidget *gpmp;
-
- gpmp = gnome_print_job_preview_new (gpm, _("Print Preview"));
- gtk_widget_show (gpmp);
- } else {
- gnome_print_job_print (gpm);
- }
-
- g_object_unref (gpm);
-}
-
-void
-print_setup (void)
-{
- GtkWidget *ps;
-
- if (!print_config)
- print_config = gnome_print_config_default ();
-
- ps = gnome_paper_selector_new (print_config);
- gtk_widget_show (ps);
-
-#if 0
- dlg = gtk_dialog_new_with_buttons (_("Print Setup"),
- NULL, /* FIXME: Set a sensible parent */
- 0,
- GNOME_STOCK_BUTTON_OK,
- GNOME_STOCK_BUTTON_CANCEL,
- NULL);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), ps, TRUE, TRUE, 2);
-
- btn = gtk_dialog_run (GTK_DIALOG (dlg));
- if (btn == 0) {
- gchar *name;
-
- print_config = gnome_paper_selector_get_config (ps);
-
- name = gnome_paper_selector_get_name (GNOME_PAPER_SELECTOR (ps));
- paper_info = gnome_paper_with_name (name);
- }
-
- gtk_widget_destroy (dlg);
-#endif
-}
diff --git a/calendar/gui/print.h b/calendar/gui/print.h
deleted file mode 100644
index 495007d81d..0000000000
--- a/calendar/gui/print.h
+++ /dev/null
@@ -1,43 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 (ECalComponent *comp, ECal *client, 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 8e6937d08a..0000000000
--- a/calendar/gui/tag-calendar.c
+++ /dev/null
@@ -1,230 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <libecal/e-cal-time-util.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, icaltimezone *zone, 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;
-
- if (zone) {
- c->zone = zone;
- } else {
- 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 e_cal_generate_instances() */
-static gboolean
-tag_calendar_cb (ECalComponent *comp,
- time_t istart,
- time_t iend,
- gpointer data)
-{
- struct calendar_tag_closure *c = data;
- struct icaltimetype start_tt, end_tt;
- ECalComponentTransparency transparency;
-
- /* If we are skipping TRANSPARENT events, return if the event is
- transparent. */
- if (c->skip_transparent_events) {
- e_cal_component_get_transparency (comp, &transparency);
- if (transparency == E_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, ECal *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 (E_IS_CAL (client));
-
- /* If the ECalendar isn't visible, we just return. */
- if (!GTK_WIDGET_VISIBLE (ecal))
- return;
-
- if (e_cal_get_load_state (client) != E_CAL_LOAD_LOADED)
- return;
-
- if (!prepare_tag (ecal, &c, NULL, TRUE))
- return;
-
- c.skip_transparent_events = TRUE;
-
-#if 0
- g_print ("DateNavigator generating instances\n");
-#endif
- e_cal_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. */
-static icaltimezone*
-resolve_tzid_cb (const char *tzid, gpointer data)
-{
- ECal *client;
- icaltimezone *zone = NULL;
-
- g_return_val_if_fail (data != NULL, NULL);
- g_return_val_if_fail (E_IS_CAL (data), NULL);
-
- client = E_CAL (data);
-
- /* Try to find the builtin timezone first. */
- zone = icaltimezone_get_builtin_timezone_from_tzid (tzid);
-
- if (!zone) {
- /* FIXME: Handle errors. */
- e_cal_get_timezone (client, tzid, &zone, NULL);
- }
-
- 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, ECalComponent *comp, ECal *client, icaltimezone *display_zone,
- 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 (E_IS_CAL_COMPONENT (comp));
-
- /* If the ECalendar isn't visible, we just return. */
- if (!GTK_WIDGET_VISIBLE (ecal))
- return;
-
- if (!prepare_tag (ecal, &c, display_zone, clear_first))
- return;
-
- c.skip_transparent_events = FALSE;
-
-#if 0
- g_print ("DateNavigator generating instances\n");
-#endif
- if (comp_is_on_server) {
- e_cal_recur_generate_instances (comp, c.start_time, c.end_time,
- tag_calendar_cb, &c,
- e_cal_resolve_tzid_cb,
- client, c.zone);
- } else {
- e_cal_recur_generate_instances (comp, c.start_time, c.end_time,
- tag_calendar_cb, &c,
- resolve_tzid_cb,
- client, c.zone);
- }
-}
diff --git a/calendar/gui/tag-calendar.h b/calendar/gui/tag-calendar.h
deleted file mode 100644
index d31d675543..0000000000
--- a/calendar/gui/tag-calendar.h
+++ /dev/null
@@ -1,33 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 <libecal/e-cal.h>
-
-void tag_calendar_by_client (ECalendar *ecal, ECal *client);
-void tag_calendar_by_comp (ECalendar *ecal, ECalComponent *comp,
- ECal *client, icaltimezone *display_zone,
- gboolean clear_first, gboolean comp_is_on_server);
-
-#endif
diff --git a/calendar/gui/tasks-component.c b/calendar/gui/tasks-component.c
deleted file mode 100644
index db7864bdd7..0000000000
--- a/calendar/gui/tasks-component.c
+++ /dev/null
@@ -1,812 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* tasks-component.c
- *
- * Copyright (C) 2003 Rodrigo Moya
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Rodrigo Moya <rodrigo@ximian.com>
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <errno.h>
-#include <string.h>
-#include <bonobo/bonobo-control.h>
-#include <bonobo/bonobo-i18n.h>
-#include <bonobo/bonobo-exception.h>
-#include <gconf/gconf-client.h>
-#include <libecal/e-cal.h>
-#include "e-cal-model.h"
-#include "e-tasks.h"
-#include "tasks-component.h"
-#include "tasks-control.h"
-#include "e-comp-editor-registry.h"
-#include "migration.h"
-#include "comp-util.h"
-#include "calendar-config.h"
-#include "dialogs/comp-editor.h"
-#include "dialogs/copy-source-dialog.h"
-#include "dialogs/new-task-list.h"
-#include "dialogs/task-editor.h"
-#include "widgets/misc/e-source-selector.h"
-
-
-#define CREATE_TASK_ID "task"
-
-
-#define PARENT_TYPE bonobo_object_get_type ()
-
-static BonoboObjectClass *parent_class = NULL;
-
-/* Tasks should have their own registry */
-extern ECompEditorRegistry *comp_editor_registry;
-
-struct _TasksComponentPrivate {
- char *config_directory;
- GConfClient *gconf_client;
-
- ESourceList *source_list;
- GSList *source_selection;
-
- ETasks *tasks;
- GtkWidget *source_selector;
-
- ECal *create_ecal;
-
- GList *notifications;
-};
-
-/* Utility functions. */
-/* FIXME Some of these are duplicated from calendar-component.c */
-static void
-add_uri_for_source (ESource *source, ETasks *tasks)
-{
- char *uri = e_source_get_uri (source);
-
- e_tasks_add_todo_uri (tasks, uri);
- g_free (uri);
-}
-
-static void
-remove_uri_for_source (ESource *source, ETasks *tasks)
-{
- char *uri = e_source_get_uri (source);
-
- e_tasks_remove_todo_uri (tasks, uri);
- g_free (uri);
-}
-
-static gboolean
-is_in_selection (GSList *selection, ESource *source)
-{
- GSList *l;
-
- for (l = selection; l; l = l->next) {
- ESource *selected_source = l->data;
-
- if (!strcmp (e_source_peek_uid (selected_source), e_source_peek_uid (source)))
- return TRUE;
- }
-
- return FALSE;
-}
-
-static gboolean
-is_in_uids (GSList *uids, ESource *source)
-{
- GSList *l;
-
- for (l = uids; l; l = l->next) {
- const char *uid = l->data;
-
- if (!strcmp (uid, e_source_peek_uid (source)))
- return TRUE;
- }
-
- return FALSE;
-}
-
-static ESource *
-find_first_source (ESourceList *source_list)
-{
- GSList *groups, *sources, *l, *m;
-
- groups = e_source_list_peek_groups (source_list);
- for (l = groups; l; l = l->next) {
- ESourceGroup *group = l->data;
-
- sources = e_source_group_peek_sources (group);
- for (m = sources; m; m = m->next) {
- ESource *source = m->data;
-
- return source;
- }
- }
-
- return NULL;
-}
-
-static void
-update_uris_for_selection (TasksComponent *component)
-{
- TasksComponentPrivate *priv;
- GSList *selection, *l, *uids_selected = NULL;
-
- priv = component->priv;
-
- selection = e_source_selector_get_selection (E_SOURCE_SELECTOR (priv->source_selector));
-
- for (l = priv->source_selection; l; l = l->next) {
- ESource *old_selected_source = l->data;
-
- if (!is_in_selection (selection, old_selected_source))
- remove_uri_for_source (old_selected_source, E_TASKS (priv->tasks));
- }
-
- for (l = selection; l; l = l->next) {
- ESource *selected_source = l->data;
-
- add_uri_for_source (selected_source, E_TASKS (priv->tasks));
- uids_selected = g_slist_append (uids_selected, (char *)e_source_peek_uid (selected_source));
- }
-
- e_source_selector_free_selection (priv->source_selection);
- priv->source_selection = selection;
-
- /* Save the selection for next time we start up */
- calendar_config_set_tasks_selected (uids_selected);
- g_slist_free (uids_selected);
-}
-
-static void
-update_uri_for_primary_selection (TasksComponent *component)
-{
- TasksComponentPrivate *priv;
- ESource *source;
- char *uri;
-
- priv = component->priv;
-
- source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (priv->source_selector));
- if (!source)
- return;
-
- /* Set the default */
- uri = e_source_get_uri (source);
- e_tasks_set_default_uri (priv->tasks, uri);
- g_free (uri);
-
- /* Save the selection for next time we start up */
- calendar_config_set_primary_tasks (e_source_peek_uid (source));
-}
-
-static void
-update_selection (TasksComponent *task_component)
-{
- TasksComponentPrivate *priv;
- GSList *selection, *uids_selected, *l;
-
- priv = task_component->priv;
-
- /* Get the selection in gconf */
- uids_selected = calendar_config_get_tasks_selected ();
-
- /* Remove any that aren't there any more */
- selection = e_source_selector_get_selection (E_SOURCE_SELECTOR (priv->source_selector));
-
- for (l = selection; l; l = l->next) {
- ESource *source = l->data;
-
- if (!is_in_uids (uids_selected, source))
- e_source_selector_unselect_source (E_SOURCE_SELECTOR (priv->source_selector), source);
- }
-
- e_source_selector_free_selection (selection);
-
- /* Make sure the whole selection is there */
- for (l = uids_selected; l; l = l->next) {
- char *uid = l->data;
- ESource *source;
-
- source = e_source_list_peek_source_by_uid (priv->source_list, uid);
- if (source)
- e_source_selector_select_source (E_SOURCE_SELECTOR (priv->source_selector), source);
-
- g_free (uid);
- }
- g_slist_free (uids_selected);
-}
-
-static void
-update_primary_selection (TasksComponent *component)
-{
- TasksComponentPrivate *priv;
- ESource *source;
- char *uid;
-
- priv = component->priv;
-
- uid = calendar_config_get_primary_tasks ();
- if (uid) {
- source = e_source_list_peek_source_by_uid (priv->source_list, uid);
- g_free (uid);
-
- e_source_selector_set_primary_selection (E_SOURCE_SELECTOR (priv->source_selector), source);
- } else {
- ESource *source;
-
- /* Try to create a default if there isn't one */
- source = find_first_source (priv->source_list);
- if (source)
- e_source_selector_set_primary_selection (E_SOURCE_SELECTOR (priv->source_selector), source);
- }
-}
-
-/* FIXME This is duplicated from comp-editor-factory.c, should it go in comp-util? */
-static ECalComponent *
-get_default_task (ECal *ecal)
-{
- ECalComponent *comp;
-
- comp = cal_comp_task_new_with_defaults (ecal);
-
- return comp;
-}
-
-/* Callbacks. */
-static void
-add_popup_menu_item (GtkMenu *menu, const char *label, const char *pixmap,
- GCallback callback, gpointer user_data, gboolean sensitive)
-{
- GtkWidget *item, *image;
-
- if (pixmap) {
- item = gtk_image_menu_item_new_with_label (label);
-
- /* load the image */
- image = gtk_image_new_from_stock (pixmap, GTK_ICON_SIZE_MENU);
- if (!image)
- image = gtk_image_new_from_file (pixmap);
-
- if (image) {
- gtk_widget_show (image);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
- }
- } else {
- item = gtk_menu_item_new_with_label (label);
- }
-
- if (callback)
- g_signal_connect (G_OBJECT (item), "activate", callback, user_data);
-
- if (!sensitive)
- gtk_widget_set_sensitive (item, FALSE);
-
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
- gtk_widget_show (item);
-}
-
-static void
-copy_task_list_cb (GtkWidget *widget, TasksComponent *comp)
-{
- ESource *selected_source;
- TasksComponentPrivate *priv;
-
- priv = comp->priv;
-
- selected_source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (priv->source_selector));
- if (!selected_source)
- return;
-
- copy_source_dialog (GTK_WINDOW (gtk_widget_get_toplevel (widget)), selected_source, CALOBJ_TYPE_TODO);
-}
-
-static void
-delete_task_list_cb (GtkWidget *widget, TasksComponent *comp)
-{
- ESource *selected_source;
- TasksComponentPrivate *priv;
- GtkWidget *dialog;
-
- priv = comp->priv;
-
- selected_source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (priv->source_selector));
- if (!selected_source)
- return;
-
- /* create the confirmation dialog */
- dialog = gtk_message_dialog_new (
- GTK_WINDOW (gtk_widget_get_toplevel (widget)),
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_QUESTION,
- GTK_BUTTONS_YES_NO,
- _("Task List '%s' will be removed. Are you sure you want to continue?"),
- e_source_peek_name (selected_source));
- if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_YES) {
- if (e_source_selector_source_is_selected (E_SOURCE_SELECTOR (priv->source_selector),
- selected_source))
- e_source_selector_unselect_source (E_SOURCE_SELECTOR (priv->source_selector),
- selected_source);
-
- e_source_group_remove_source (e_source_peek_group (selected_source), selected_source);
-
- /* FIXME: remove the tasks.ics file and the directory */
- }
-
- gtk_widget_destroy (dialog);
-}
-
-static void
-new_task_list_cb (GtkWidget *widget, TasksComponent *component)
-{
- new_task_list_dialog (GTK_WINDOW (gtk_widget_get_toplevel (widget)));
-}
-
-static void
-rename_task_list_cb (GtkWidget *widget, TasksComponent *comp)
-{
- TasksComponentPrivate *priv;
- ESource *selected_source;
- GtkWidget *dialog, *entry;
-
- priv = comp->priv;
-
- selected_source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (priv->source_selector));
- if (!selected_source)
- return;
-
- /* create the dialog to prompt the user for the new name */
- dialog = gtk_message_dialog_new (GTK_WINDOW (gtk_widget_get_toplevel (widget)),
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_QUESTION,
- GTK_BUTTONS_OK_CANCEL,
- _("Rename this task list to"));
- entry = gtk_entry_new ();
- gtk_entry_set_text (GTK_ENTRY (entry), e_source_peek_name (selected_source));
- gtk_widget_show (entry);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), entry, TRUE, FALSE, 6);
-
- if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK)
- e_source_set_name (selected_source, gtk_entry_get_text (GTK_ENTRY (entry)));
-
- gtk_widget_destroy (dialog);
-}
-
-static void
-fill_popup_menu_cb (ESourceSelector *selector, GtkMenu *menu, TasksComponent *component)
-{
- gboolean sensitive;
-
- sensitive = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (component->priv->source_selector)) ?
- TRUE : FALSE;
-
- add_popup_menu_item (menu, _("New Task List"), GTK_STOCK_NEW, G_CALLBACK (new_task_list_cb),
- component, TRUE);
- add_popup_menu_item (menu, _("Copy"), NULL, G_CALLBACK (copy_task_list_cb), component, sensitive);
- add_popup_menu_item (menu, _("Rename"), NULL, G_CALLBACK (rename_task_list_cb),
- component, sensitive);
- add_popup_menu_item (menu, _("Delete"), GTK_STOCK_DELETE, G_CALLBACK (delete_task_list_cb),
- component, sensitive);
-}
-
-static void
-source_selection_changed_cb (ESourceSelector *selector, TasksComponent *component)
-{
- update_uris_for_selection (component);
-}
-
-static void
-primary_source_selection_changed_cb (ESourceSelector *selector, TasksComponent *component)
-{
- update_uri_for_primary_selection (component);
-}
-
-static void
-config_selection_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- update_selection (data);
-}
-
-static void
-config_primary_selection_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- update_primary_selection (data);
-}
-
-/* GObject methods */
-
-static void
-impl_dispose (GObject *object)
-{
- TasksComponentPrivate *priv = TASKS_COMPONENT (object)->priv;
- GList *l;
-
- if (priv->source_list != NULL) {
- g_object_unref (priv->source_list);
- priv->source_list = NULL;
- }
-
- if (priv->source_selection != NULL) {
- e_source_selector_free_selection (priv->source_selection);
- priv->source_selection = NULL;
- }
-
- if (priv->gconf_client != NULL) {
- g_object_unref (priv->gconf_client);
- priv->gconf_client = NULL;
- }
-
- if (priv->create_ecal) {
- g_object_unref (priv->create_ecal);
- priv->create_ecal = NULL;
- }
-
- for (l = priv->notifications; l; l = l->next)
- calendar_config_remove_notification (GPOINTER_TO_UINT (l->data));
- g_list_free (priv->notifications);
- priv->notifications = NULL;
-
- (* G_OBJECT_CLASS (parent_class)->dispose) (object);
-}
-
-static void
-impl_finalize (GObject *object)
-{
- TasksComponentPrivate *priv = TASKS_COMPONENT (object)->priv;
-
- g_free (priv->config_directory);
- g_free (priv);
-
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
-}
-
-/* Evolution::Component CORBA methods */
-
-static void
-control_activate_cb (BonoboControl *control, gboolean activate, gpointer data)
-{
- ETasks *tasks = data;
-
- if (activate)
- tasks_control_activate (control, tasks);
- else
- tasks_control_deactivate (control, tasks);
-}
-
-static void
-impl_createControls (PortableServer_Servant servant,
- Bonobo_Control *corba_sidebar_control,
- Bonobo_Control *corba_view_control,
- Bonobo_Control *corba_statusbar_control,
- CORBA_Environment *ev)
-{
- TasksComponent *component = TASKS_COMPONENT (bonobo_object_from_servant (servant));
- TasksComponentPrivate *priv;
- GtkWidget *selector_scrolled_window;
- BonoboControl *sidebar_control, *view_control;
- guint not;
-
- priv = component->priv;
-
- /* create sidebar selector */
- priv->source_selector = e_source_selector_new (priv->source_list);
- gtk_widget_show (priv->source_selector);
-
- selector_scrolled_window = gtk_scrolled_window_new (NULL, NULL);
- gtk_container_add (GTK_CONTAINER (selector_scrolled_window), priv->source_selector);
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (selector_scrolled_window),
- GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
- gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (selector_scrolled_window),
- GTK_SHADOW_IN);
- gtk_widget_show (selector_scrolled_window);
-
- sidebar_control = bonobo_control_new (selector_scrolled_window);
-
- /* create the tasks view */
- priv->tasks = E_TASKS (e_tasks_new ());
- if (!priv->tasks) {
- g_warning (G_STRLOC ": could not create the control!");
- bonobo_exception_set (ev, ex_GNOME_Evolution_Component_Failed);
- return;
- }
-
- gtk_widget_show (GTK_WIDGET (priv->tasks));
-
- view_control = bonobo_control_new (GTK_WIDGET (priv->tasks));
- if (!view_control) {
- g_warning (G_STRLOC ": could not create the control!");
- bonobo_exception_set (ev, ex_GNOME_Evolution_Component_Failed);
- return;
- }
-
- g_signal_connect (view_control, "activate", G_CALLBACK (control_activate_cb), priv->tasks);
-
- g_signal_connect_object (priv->source_selector, "selection_changed",
- G_CALLBACK (source_selection_changed_cb),
- G_OBJECT (component), 0);
- g_signal_connect_object (priv->source_selector, "primary_selection_changed",
- G_CALLBACK (primary_source_selection_changed_cb),
- G_OBJECT (component), 0);
- g_signal_connect_object (priv->source_selector, "fill_popup_menu",
- G_CALLBACK (fill_popup_menu_cb),
- G_OBJECT (component), 0);
-
- /* Load the selection from the last run */
- update_selection (component);
- update_primary_selection (component);
-
- /* If it gets fiddled with update */
- not = calendar_config_add_notification_tasks_selected (config_selection_changed_cb,
- component);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
- not = calendar_config_add_notification_primary_tasks (config_primary_selection_changed_cb,
- component);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
- /* Return the controls */
- *corba_sidebar_control = CORBA_Object_duplicate (BONOBO_OBJREF (sidebar_control), ev);
- *corba_view_control = CORBA_Object_duplicate (BONOBO_OBJREF (view_control), ev);
-
- /* The tasks component doesn't use the status bar so just return an empty label. */
- {
- GtkWidget *label = gtk_label_new ("");
- BonoboControl *control;
-
- gtk_widget_show (label);
- control = bonobo_control_new (label);
- *corba_statusbar_control = CORBA_Object_duplicate (BONOBO_OBJREF (control), ev);
- }
-}
-
-static GNOME_Evolution_CreatableItemTypeList *
-impl__get_userCreatableItems (PortableServer_Servant servant,
- CORBA_Environment *ev)
-{
- GNOME_Evolution_CreatableItemTypeList *list = GNOME_Evolution_CreatableItemTypeList__alloc ();
-
- list->_length = 1;
- list->_maximum = list->_length;
- list->_buffer = GNOME_Evolution_CreatableItemTypeList_allocbuf (list->_length);
-
- CORBA_sequence_set_release (list, FALSE);
-
- list->_buffer[0].id = CREATE_TASK_ID;
- list->_buffer[0].description = _("New task");
- list->_buffer[0].menuDescription = _("_Task");
- list->_buffer[0].tooltip = _("Create a new task");
- list->_buffer[0].menuShortcut = 't';
- list->_buffer[0].iconName = "new_task-16.png";
-
- return list;
-}
-
-static void
-config_create_ecal_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- TasksComponent *component = data;
- TasksComponentPrivate *priv;
-
- priv = component->priv;
-
- g_object_unref (priv->create_ecal);
- priv->create_ecal = NULL;
-
- priv->notifications = g_list_remove (priv->notifications, GUINT_TO_POINTER (id));
-}
-
-static gboolean
-setup_create_ecal (TasksComponent *component)
-{
- TasksComponentPrivate *priv;
- ESource *source = NULL;
- char *uid;
- guint not;
-
- priv = component->priv;
-
- if (priv->create_ecal)
- return TRUE;
-
- /* Try to use the client from the calendar first to avoid re-opening things */
- if (priv->tasks) {
- ECal *default_ecal;
-
- default_ecal = e_tasks_get_default_client (priv->tasks);
- if (default_ecal) {
- priv->create_ecal = g_object_ref (default_ecal);
- return TRUE;
- }
- }
-
- /* Get the current primary calendar, or try to set one if it doesn't already exist */
- uid = calendar_config_get_primary_tasks ();
- if (uid) {
- source = e_source_list_peek_source_by_uid (priv->source_list, uid);
- g_free (uid);
-
- priv->create_ecal = e_cal_new (source, CALOBJ_TYPE_TODO);
- }
-
- if (!priv->create_ecal) {
- /* Try to create a default if there isn't one */
- source = find_first_source (priv->source_list);
- if (source)
- priv->create_ecal = e_cal_new (source, CALOBJ_TYPE_TODO);
- }
-
- if (priv->create_ecal) {
- if (!e_cal_open (priv->create_ecal, FALSE, NULL)) {
- GtkWidget *dialog;
-
- dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
- GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,
- _("Unable to open the task list '%s' for creating events and meetings"),
- e_source_peek_name (source));
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
-
- return FALSE;
- }
- } else {
- GtkWidget *dialog;
-
- dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
- GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,
- _("There is no calendar available for creating tasks"));
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
-
- return FALSE;
- }
-
- /* Handle the fact it may change on us */
- not = calendar_config_add_notification_primary_calendar (config_create_ecal_changed_cb,
- component);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
- /* Save the primary source for use elsewhere */
- calendar_config_set_primary_tasks (e_source_peek_uid (source));
-
- return TRUE;
-}
-
-static void
-impl_requestCreateItem (PortableServer_Servant servant,
- const CORBA_char *item_type_name,
- CORBA_Environment *ev)
-{
- TasksComponent *tasks_component = TASKS_COMPONENT (bonobo_object_from_servant (servant));
- TasksComponentPrivate *priv;
- ECalComponent *comp;
- TaskEditor *editor;
-
- priv = tasks_component->priv;
-
- if (!setup_create_ecal (tasks_component))
- return;
-
- editor = task_editor_new (priv->create_ecal);
-
- if (strcmp (item_type_name, CREATE_TASK_ID) == 0) {
- comp = get_default_task (priv->create_ecal);
- } else {
- bonobo_exception_set (ev, ex_GNOME_Evolution_Component_UnknownType);
- return;
- }
-
- comp_editor_edit_comp (COMP_EDITOR (editor), comp);
- comp_editor_focus (COMP_EDITOR (editor));
-
- e_comp_editor_registry_add (comp_editor_registry, COMP_EDITOR (editor), TRUE);
-}
-
-/* Initialization */
-
-static void
-tasks_component_class_init (TasksComponentClass *klass)
-{
- POA_GNOME_Evolution_Component__epv *epv = &klass->epv;
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_peek_parent (klass);
-
- epv->createControls = impl_createControls;
- epv->_get_userCreatableItems = impl__get_userCreatableItems;
- epv->requestCreateItem = impl_requestCreateItem;
-
- object_class->dispose = impl_dispose;
- object_class->finalize = impl_finalize;
-}
-
-static void
-tasks_component_init (TasksComponent *component, TasksComponentClass *klass)
-{
- TasksComponentPrivate *priv;
- GSList *groups;
-
- priv = g_new0 (TasksComponentPrivate, 1);
- priv->config_directory = g_build_filename (g_get_home_dir (),
- ".evolution", "tasks", "config",
- NULL);
-
- /* load the groups from the configuration */
- priv->gconf_client = gconf_client_get_default ();
- priv->source_list = e_source_list_new_for_gconf (priv->gconf_client,
- "/apps/evolution/tasks/sources");
-
- /* create default tasks folders if there are no groups */
- groups = e_source_list_peek_groups (priv->source_list);
- if (!groups) {
- ESourceGroup *group;
- ESource *source;
- char *base_uri, *new_dir;
-
- /* create the source group */
- base_uri = g_build_filename (g_get_home_dir (),
- ".evolution/tasks/local/OnThisComputer/",
- NULL);
- group = e_source_group_new (_("On This Computer"), base_uri);
- e_source_list_add_group (priv->source_list, group, -1);
-
- /* migrate tasks from older setup */
- if (!migrate_old_tasks (group)) {
- /* create default tasks folders */
- new_dir = g_build_filename (base_uri, "Personal/", NULL);
- if (!e_mkdir_hier (new_dir, 0700)) {
- source = e_source_new (_("Personal"), "Personal");
- e_source_group_add_source (group, source, -1);
- }
-
- g_free (new_dir);
- }
-
- g_free (base_uri);
- }
-
- component->priv = priv;
-}
-
-/* Public API */
-
-TasksComponent *
-tasks_component_peek (void)
-{
- static TasksComponent *component = NULL;
-
- if (component == NULL) {
- component = g_object_new (tasks_component_get_type (), NULL);
-
- if (e_mkdir_hier (component->priv->config_directory, 0777) != 0) {
- g_warning (G_STRLOC ": Cannot create directory %s: %s",
- component->priv->config_directory, g_strerror (errno));
- g_object_unref (component);
- component = NULL;
- }
- }
-
- return component;
-}
-
-const char *
-tasks_component_peek_config_directory (TasksComponent *component)
-{
- return (const char *) component->priv->config_directory;
-}
-
-BONOBO_TYPE_FUNC_FULL (TasksComponent, GNOME_Evolution_Component, PARENT_TYPE, tasks_component)
diff --git a/calendar/gui/tasks-component.h b/calendar/gui/tasks-component.h
deleted file mode 100644
index 1c47c4d9b1..0000000000
--- a/calendar/gui/tasks-component.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* tasks-component.h
- *
- * Copyright (C) 2003 Rodrigo Moya
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Rodrigo Moya <rodrigo@ximian.com>
- */
-
-#ifndef _TASKS_COMPONENT_H_
-#define _TASKS_COMPONENT_H_
-
-#include <bonobo/bonobo-object.h>
-#include <libedataserver/e-source-list.h>
-#include "Evolution.h"
-
-
-#define TASKS_TYPE_COMPONENT (tasks_component_get_type ())
-#define TASKS_COMPONENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TASKS_TYPE_COMPONENT, TasksComponent))
-#define TASKS_COMPONENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TASKS_TYPE_COMPONENT, TasksComponentClass))
-#define TASKS_IS_COMPONENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TASKS_TYPE_COMPONENT))
-#define TASKS_IS_COMPONENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), TASKS_TYPE_COMPONENT))
-
-
-typedef struct _TasksComponent TasksComponent;
-typedef struct _TasksComponentPrivate TasksComponentPrivate;
-typedef struct _TasksComponentClass TasksComponentClass;
-
-struct _TasksComponent {
- BonoboObject parent;
-
- TasksComponentPrivate *priv;
-};
-
-struct _TasksComponentClass {
- BonoboObjectClass parent_class;
-
- POA_GNOME_Evolution_Component__epv epv;
-};
-
-
-GType tasks_component_get_type (void);
-TasksComponent *tasks_component_peek (void);
-const char *tasks_component_peek_config_directory (TasksComponent *component);
-ESourceList *tasks_component_peek_source_list (TasksComponent *component);
-
-#endif /* _TASKS_COMPONENT_H_ */
diff --git a/calendar/gui/tasks-control.c b/calendar/gui/tasks-control.c
deleted file mode 100644
index 0c0a3bd202..0000000000
--- a/calendar/gui/tasks-control.c
+++ /dev/null
@@ -1,627 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* tasks-control.c
- *
- * Copyright (C) 2000, 2001, 2002, 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <gtk/gtklabel.h>
-#include <gtk/gtkcheckbutton.h>
-#include <gtk/gtkmessagedialog.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnome/gnome-util.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-dialog-util.h>
-#include <libgnomeui/gnome-stock-icons.h>
-#include <libgnomeprint/gnome-print.h>
-#include <libgnomeprint/gnome-print-paper.h>
-#include <libgnomeprint/gnome-print-job.h>
-#include <libgnomeprintui/gnome-print-job-preview.h>
-#include <libgnomeprintui/gnome-print-paper-selector.h>
-#include <libgnomeprintui/gnome-print-preview.h>
-#include <libgnomeprintui/gnome-print-dialog.h>
-#include <bonobo/bonobo-control.h>
-#include <bonobo/bonobo-property-bag.h>
-#include <bonobo/bonobo-ui-util.h>
-#include <gal/widgets/e-gui-utils.h>
-#include <e-util/e-dialog-utils.h>
-#include "dialogs/cal-prefs-dialog.h"
-#include "calendar-config.h"
-#include "calendar-commands.h"
-#include "e-tasks.h"
-#include "e-calendar-table.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
-#define FIXED_MARGIN .05
-
-
-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_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_complete_cmd (BonoboUIComponent *uic,
- gpointer data,
- const char *path);
-static void tasks_control_purge_cmd (BonoboUIComponent *uic,
- gpointer data,
- const char *path);
-static void tasks_control_print_cmd (BonoboUIComponent *uic,
- gpointer data,
- const char *path);
-static void tasks_control_print_preview_cmd (BonoboUIComponent *uic,
- gpointer data,
- const char *path);
-
-
-static GnomePrintConfig *print_config = NULL;
-
-
-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) {
- gtk_widget_destroy (tasks);
- g_message ("control_factory_fn(): could not create the control!");
- return NULL;
- }
-
- tasks_control_properties_init (control, E_TASKS (tasks));
-
- g_signal_connect (control, "activate", G_CALLBACK (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, bonobo_object_corba_objref (BONOBO_OBJECT (pbag)), NULL);
- 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)
-{
- ETasks *tasks = user_data;
- const char *uri;
- ECalModel *model;
-
- switch (arg_id) {
-
- case TASKS_CONTROL_PROPERTY_URI_IDX:
- model = e_calendar_table_get_model (e_tasks_get_calendar_table (tasks));
- uri = e_cal_get_uri (e_cal_model_get_default_client (model));
- BONOBO_ARG_SET_STRING (arg, uri);
- 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 *uri;
-
- switch (arg_id) {
-
- case TASKS_CONTROL_PROPERTY_URI_IDX:
- /* FIXME Remove the old uri? */
- uri = BONOBO_ARG_GET_STRING (arg);
- if (!e_tasks_add_todo_uri (tasks, 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);
- }
- 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;
- gboolean read_only = TRUE;
- ECalModel *model;
-
- uic = bonobo_control_get_ui_component (control);
- g_assert (uic != NULL);
-
- model = e_calendar_table_get_model (e_tasks_get_calendar_table (tasks));
- e_cal_is_read_only (e_cal_model_get_default_client (model), &read_only, NULL);
-
- bonobo_ui_component_set_prop (uic, "/commands/TasksCut", "sensitive",
- n_selected == 0 || read_only ? "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/TasksPaste", "sensitive",
- read_only ? "0" : "1",
- NULL);
- bonobo_ui_component_set_prop (uic, "/commands/TasksDelete", "sensitive",
- n_selected == 0 || read_only ? "0" : "1",
- NULL);
- bonobo_ui_component_set_prop (uic, "/commands/TasksMarkComplete", "sensitive",
- n_selected == 0 || read_only ? "0" : "1",
- NULL);
- bonobo_ui_component_set_prop (uic, "/commands/TasksPurge", "sensitive",
- read_only ? "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 ("TasksMarkComplete", tasks_control_complete_cmd),
- BONOBO_UI_VERB ("TasksPurge", tasks_control_purge_cmd),
- BONOBO_UI_VERB ("TasksPrint", tasks_control_print_cmd),
- BONOBO_UI_VERB ("TasksPrintPreview", tasks_control_print_preview_cmd),
-
- BONOBO_UI_VERB_END
-};
-
-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, NULL);
- bonobo_ui_component_set_container (uic, remote_uih, NULL);
- bonobo_object_release_unref (remote_uih, NULL);
-
- e_tasks_set_ui_component (tasks, uic);
-
- bonobo_ui_component_add_verb_list_with_data (uic, verbs, tasks);
-
- bonobo_ui_component_freeze (uic, NULL);
-
- bonobo_ui_util_set_ui (uic, PREFIX,
- EVOLUTION_UIDIR "/evolution-tasks.xml",
- "evolution-tasks",
- NULL);
-
- e_tasks_setup_view_menus (tasks, uic);
-
- /* Signals from the tasks widget; also sensitize the menu items as appropriate */
-
- g_signal_connect (tasks, "selection_changed", G_CALLBACK (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
-}
-
-
-void
-tasks_control_deactivate (BonoboControl *control, ETasks *tasks)
-{
- BonoboUIComponent *uic = bonobo_control_get_ui_component (control);
-
- g_assert (uic != NULL);
-
- e_tasks_set_ui_component (tasks, NULL);
-
- e_tasks_discard_view_menus (tasks);
-
- /* Stop monitoring the "selection_changed" signal */
- g_signal_handlers_disconnect_matched (tasks, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, control);
-
- bonobo_ui_component_rm (uic, "/", NULL);
- bonobo_ui_component_unset_container (uic, NULL);
-}
-
-
-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);
-}
-
-static void
-tasks_control_complete_cmd (BonoboUIComponent *uic,
- gpointer data,
- const char *path)
-{
- ETasks *tasks;
-
- tasks = E_TASKS (data);
- e_tasks_complete_selected (tasks);
-}
-
-static gboolean
-confirm_purge (ETasks *tasks)
-{
- GtkWidget *dialog, *checkbox, *parent;
- int button;
-
- if (!calendar_config_get_confirm_purge ())
- return TRUE;
-
- parent = gtk_widget_get_toplevel (GTK_WIDGET (tasks));
- dialog = gtk_message_dialog_new (
- (GtkWindow *)parent,
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_WARNING,
- GTK_BUTTONS_YES_NO,
- _("This operation will permanently erase all tasks marked as completed. If you continue, you will not be able to recover these tasks.\n\nReally erase these tasks?"));
- gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_NO);
-
- checkbox = gtk_check_button_new_with_label (_("Do not ask me again."));
- gtk_widget_show (checkbox);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), checkbox, TRUE, TRUE, 6);
-
- button = gtk_dialog_run (GTK_DIALOG (dialog));
- if (button == GTK_RESPONSE_YES && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbox)))
- calendar_config_set_confirm_purge (FALSE);
- gtk_widget_destroy (dialog);
-
- return button == GTK_RESPONSE_YES ? TRUE : FALSE;
-}
-
-static void
-tasks_control_purge_cmd (BonoboUIComponent *uic,
- gpointer data,
- const char *path)
-{
- ETasks *tasks;
-
- tasks = E_TASKS (data);
-
- if (confirm_purge (tasks))
- e_tasks_delete_completed (tasks);
-}
-
-
-static void
-print_title (GnomePrintContext *pc,
- double page_width, double page_height)
-{
- GnomeFont *font;
- char *text;
- double w, x, y;
-
- font = gnome_font_find_closest ("Sans Bold", 18);
-
- text = _("Tasks");
- w = gnome_font_get_width_utf8 (font, text);
-
- x = (page_width - w) / 2;
- y = page_height - gnome_font_get_ascender (font);
-
- gnome_print_moveto (pc, x, y);
- gnome_print_setfont (pc, font);
- gnome_print_setrgbcolor (pc, 0, 0, 0);
- gnome_print_show (pc, text);
-
- g_object_unref (font);
-}
-
-static void
-print_tasks (ETasks *tasks, gboolean preview)
-{
- ECalendarTable *cal_table;
- EPrintable *printable;
- ETable *etable;
- GnomePrintContext *pc;
- GnomePrintJob *gpm;
- double l, r, t, b, page_width, page_height, left_margin, bottom_margin;
-
- if (!print_config)
- print_config = gnome_print_config_default ();
-
- cal_table = e_tasks_get_calendar_table (tasks);
- etable = e_calendar_table_get_table (E_CALENDAR_TABLE (cal_table));
- printable = e_table_get_printable (etable);
- g_object_ref (printable);
- gtk_object_sink (GTK_OBJECT (printable));
- e_printable_reset (printable);
-
- gpm = gnome_print_job_new (print_config);
- pc = gnome_print_job_get_context (gpm);
-
- gnome_print_config_get_page_size (print_config, &r, &t);
-
-#if 0
- gnome_print_config_get_double (print_config, GNOME_PRINT_KEY_PAGE_MARGIN_TOP, &temp_d);
- t -= temp_d;
- gnome_print_config_get_double (print_config, GNOME_PRINT_KEY_PAGE_MARGIN_RIGHT, &temp_d);
- r -= temp_d;
- gnome_print_config_get_double (print_config, GNOME_PRINT_KEY_PAGE_MARGIN_BOTTOM, &b);
- gnome_print_config_get_double (print_config, GNOME_PRINT_KEY_PAGE_MARGIN_LEFT, &l);
-#endif
-
- b = t * FIXED_MARGIN;
- l = r * FIXED_MARGIN;
- t *= (1.0 - FIXED_MARGIN);
- r *= (1.0 - FIXED_MARGIN);
-
- page_width = r - l;
- page_height = t - b;
- left_margin = l;
- bottom_margin = b;
-
- while (e_printable_data_left (printable)) {
- gnome_print_beginpage (pc, "Tasks");
- gnome_print_gsave (pc);
-
- gnome_print_translate (pc, left_margin, bottom_margin);
-
- print_title (pc, page_width, page_height);
-
- e_printable_print_page (printable, pc,
- page_width, page_height - 24, TRUE);
-
- gnome_print_grestore (pc);
- gnome_print_showpage (pc);
- }
-
- gnome_print_job_close (gpm);
-
- if (preview) {
- GtkWidget *gpmp;
- gpmp = gnome_print_job_preview_new (gpm, _("Print Preview"));
- gtk_widget_show (gpmp);
- } else {
- gnome_print_job_print (gpm);
- }
-
- g_object_unref (gpm);
- g_object_unref (printable);
-}
-
-
-/* File/Print callback */
-static void
-tasks_control_print_cmd (BonoboUIComponent *uic,
- gpointer data,
- const char *path)
-{
- ETasks *tasks;
- GtkWidget *gpd;
- gboolean preview = FALSE;
- GnomePrintJob *gpm;
-
- tasks = E_TASKS (data);
-
- if (!print_config)
- print_config = gnome_print_config_default ();
-
- gpm = gnome_print_job_new (print_config);
-
- gpd = gnome_print_dialog_new (gpm, _("Print Tasks"), GNOME_PRINT_DIALOG_COPIES);
- gtk_dialog_set_default_response (GTK_DIALOG (gpd), GNOME_PRINT_DIALOG_RESPONSE_PRINT);
-
- /* Run dialog */
- switch (gtk_dialog_run (GTK_DIALOG (gpd))) {
- case GNOME_PRINT_DIALOG_RESPONSE_PRINT:
- break;
-
- case GNOME_PRINT_DIALOG_RESPONSE_PREVIEW:
- preview = TRUE;
- break;
-
- case -1:
- return;
-
- default:
- gtk_widget_destroy (gpd);
- return;
- }
-
- gtk_widget_destroy (gpd);
- print_tasks (tasks, preview);
-}
-
-static void
-tasks_control_print_preview_cmd (BonoboUIComponent *uic,
- gpointer data,
- const char *path)
-{
- ETasks *tasks;
-
- tasks = E_TASKS (data);
-
- print_tasks (tasks, TRUE);
-}
-
diff --git a/calendar/gui/tasks-control.h b/calendar/gui/tasks-control.h
deleted file mode 100644
index eca68c3f0a..0000000000
--- a/calendar/gui/tasks-control.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* tasks-control.h
- *
- * Copyright (C) 2000, 2001, 2002, 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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_
-
-#include "e-tasks.h"
-
-BonoboControl *tasks_control_new (void);
-void tasks_control_activate (BonoboControl *control, ETasks *tasks);
-void tasks_control_deactivate (BonoboControl *control, ETasks *tasks);
-
-
-#endif /* _TASKS_CONTROL_H_ */
diff --git a/calendar/gui/weekday-picker.c b/calendar/gui/weekday-picker.c
deleted file mode 100644
index 87438fd62d..0000000000
--- a/calendar/gui/weekday-picker.c
+++ /dev/null
@@ -1,572 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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-i18n.h>
-#include <libgnomecanvas/gnome-canvas-rect-ellipse.h>
-#include <libgnomecanvas/gnome-canvas-text.h>
-#include <gal/util/e-util.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_destroy (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];
-
-
-
-E_MAKE_TYPE (weekday_picker, "WeekdayPicker", WeekdayPicker,
- weekday_picker_class_init, weekday_picker_init, GNOME_TYPE_CANVAS);
-
-/* 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 = g_type_class_peek_parent (class);
-
- wp_signals[CHANGED] =
- gtk_signal_new ("changed",
- GTK_RUN_FIRST,
- G_TYPE_FROM_CLASS (object_class),
- GTK_SIGNAL_OFFSET (WeekdayPickerClass, changed),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
-
- object_class->destroy = weekday_picker_destroy;
-
- 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);
- g_signal_connect (priv->boxes[i], "event", G_CALLBACK (day_event_cb), wp);
-
- priv->labels[i] = gnome_canvas_item_new (parent,
- GNOME_TYPE_CANVAS_TEXT,
- NULL);
- g_signal_connect (priv->labels[i], "event", G_CALLBACK (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_destroy (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)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (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 char *
-get_day_text (int day_index)
-{
- const char *str = _("SMTWTFS");
- char *day;
- int char_size = 0;
-
- day = g_utf8_offset_to_pointer (str, day_index);
-
- /* we use strlen because we actually want to count bytes */
- if (day_index == 6)
- char_size = strlen (day);
- else
- char_size = strlen (day) - strlen (g_utf8_find_next_char (day, NULL));
-
- return g_strndup (day, char_size);
-}
-
-static void
-configure_items (WeekdayPicker *wp)
-{
- WeekdayPickerPrivate *priv;
- int width, height;
- int box_width;
- int i;
-
- priv = wp->priv;
-
- width = GTK_WIDGET (wp)->allocation.width;
- height = GTK_WIDGET (wp)->allocation.height;
-
- box_width = (width - 1) / 7;
-
- 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 = get_day_text (day);
- gnome_canvas_item_set (priv->labels[i],
- "text", c,
-#if 0
- "font_gdk", gtk_style_get_font (gtk_widget_get_style (GTK_WIDGET (wp))),
-#endif
- "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;
- int i;
- PangoFontDescription *font_desc;
- PangoContext *pango_context;
- PangoFontMetrics *font_metrics;
- PangoLayout *layout;
-
- wp = WEEKDAY_PICKER (widget);
- priv = wp->priv;
-
- /* Set up Pango prerequisites */
- font_desc = gtk_widget_get_style (widget)->font_desc;
- pango_context = gtk_widget_get_pango_context (widget);
- font_metrics = pango_context_get_metrics (pango_context, font_desc,
- pango_context_get_language (pango_context));
- layout = pango_layout_new (pango_context);
-
- priv->font_ascent = PANGO_PIXELS (pango_font_metrics_get_ascent (font_metrics));
- priv->font_descent = PANGO_PIXELS (pango_font_metrics_get_descent (font_metrics));
-
- max_width = 0;
-
- for (i = 0; i < 7; i++) {
- char *c;
- int w;
-
- c = get_day_text (i);
- pango_layout_set_text (layout, c, strlen (c));
- pango_layout_get_pixel_size (layout, &w, NULL);
- g_free (c);
-
- if (w > max_width)
- max_width = w;
- }
-
- priv->max_letter_width = max_width;
-
- configure_items (wp);
- g_object_unref (layout);
- pango_font_metrics_unref (font_metrics);
-
- 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 g_object_new (TYPE_WEEKDAY_PICKER, NULL);
-}
-
-/**
- * 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 67a72f9ebd..0000000000
--- a/calendar/gui/weekday-picker.h
+++ /dev/null
@@ -1,71 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 <libgnomecanvas/gnome-canvas.h>
-
-G_BEGIN_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);
-
-
-
-G_END_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 dd866141fc..0000000000
--- a/calendar/idl/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-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 66f4eb8939..0000000000
--- a/calendar/idl/evolution-calendar.idl
+++ /dev/null
@@ -1,48 +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 unique identifier for a calendar component */
- typedef string CalObjUID;
-
- /* Factory to centralize calendar component editor dialogs */
- interface CompEditorFactory : Bonobo::Unknown {
- exception InvalidURI {};
- exception BackendContactError {};
- exception UnsupportedType {};
-
- typedef long CompEditorMode;
- const CompEditorMode EDITOR_MODE_EVENT = 1 << 0;
- const CompEditorMode EDITOR_MODE_ALLDAY_EVENT = 1 << 1;
- const CompEditorMode EDITOR_MODE_MEETING = 1 << 2;
- const CompEditorMode EDITOR_MODE_TODO = 1 << 3;
-
- /* 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 CompEditorMode mode)
- raises (InvalidURI, BackendContactError, UnsupportedType);
- };
-};
-
-};
-};
-
-#endif
diff --git a/calendar/importers/.cvsignore b/calendar/importers/.cvsignore
deleted file mode 100644
index 99d6030704..0000000000
--- a/calendar/importers/.cvsignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-evolution-calendar-importer
-GNOME_Evolution_Calendar_Importer*.server
diff --git a/calendar/importers/GNOME_Evolution_Calendar_Importer.server.in.in b/calendar/importers/GNOME_Evolution_Calendar_Importer.server.in.in
deleted file mode 100644
index 810905fbfa..0000000000
--- a/calendar/importers/GNOME_Evolution_Calendar_Importer.server.in.in
+++ /dev/null
@@ -1,54 +0,0 @@
-<oaf_info>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Calendar_ImporterFactory:@VERSION@"
- type="shlib"
- location="@IMPORTERSDIR@/libevolution-calendar-importers.so">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/ObjectFactory:1.0"/>
- </oaf_attribute>
- <oaf_attribute name="name" type="string"
- _value="Evolution iCalendar importer"/>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Calendar_iCalendar_Importer:@VERSION@"
- type="factory"
- location="OAFIID:GNOME_Evolution_Calendar_ImporterFactory:@VERSION@">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Evolution/Importer:@VERSION@"/>
- </oaf_attribute>
- <oaf_attribute name="evolution:menu_name" type="string"
- _value="iCalendar files (.ics)"/>
- <oaf_attribute name="name" type="string"
- _value="Evolution iCalendar importer"/>
-
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Calendar_vCalendar_Importer:@VERSION@"
- type="factory"
- location="OAFIID:GNOME_Evolution_Calendar_ImporterFactory:@VERSION@">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Evolution/Importer:@VERSION@"/>
- </oaf_attribute>
- <oaf_attribute name="evolution:menu_name" type="string"
- _value="vCalendar files (.vcf)"/>
- <oaf_attribute name="name" type="string"
- _value="Evolution vCalendar importer"/>
-
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Gnome_Calendar_Intelligent_Importer:@VERSION@"
- type="factory"
- location="OAFIID:GNOME_Evolution_Calendar_ImporterFactory:@VERSION@">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Evolution/IntelligentImporter:@VERSION@"/>
- </oaf_attribute>
-
- <oaf_attribute name="name" type="string"
- _value="Evolution Calendar intelligent importer"/>
-
-</oaf_server>
-</oaf_info>
diff --git a/calendar/importers/Makefile.am b/calendar/importers/Makefile.am
deleted file mode 100644
index a36c7ef4a6..0000000000
--- a/calendar/importers/Makefile.am
+++ /dev/null
@@ -1,53 +0,0 @@
-importersdir = $(privlibdir)/evolution-calendar-importers
-
-importers_LTLIBRARIES = libevolution-calendar-importers.la
-
-# privlibexec_PROGRAMS = evolution-calendar-importer
-
-INCLUDES = \
- -DEVOLUTION_LOCALEDIR=\""$(localedir)"\" \
- -DEVOLUTION_SOUNDDIR=\""$(soundsdir)"\" \
- -DG_LOG_DOMAIN=\"Evolution-Importer\" \
- -I$(top_srcdir) \
- -I$(top_builddir)/shell \
- -I$(top_srcdir)/shell \
- -I$(top_srcdir)/calendar \
- -I$(top_builddir)/calendar \
- $(EVOLUTION_CALENDAR_CFLAGS)
-
-libevolution_calendar_importers_la_SOURCES = \
- evolution-calendar-importer.h \
- icalendar-importer.c \
- main.c
-
-libevolution_calendar_importers_la_LDFLAGS = -avoid-version -module
-
-libevolution_calendar_importers_la_LIBADD = \
- $(top_builddir)/shell/importer/libevolution-importer.la \
- $(IMPORTERS_LIBS)
-
-# evolution_calendar_importer_SOURCES = \
-# evolution-calendar-importer.h \
-# icalendar-importer.c \
-# main.c
-#
-# evolution_calendar_importer_LDADD = \
-# $(top_builddir)/shell/libeshell.la \
-# $(top_builddir)/shell/importer/libevolution-importer.la \
-# $(top_builddir)/calendar/cal-util/libcal-util.la \
-# $(top_builddir)/calendar/cal-client/libcal-client.la \
-# $(top_builddir)/libwombat/libwombat.la \
-# $(EVOLUTION_CALENDAR_LIBS)
-
-server_in_files = GNOME_Evolution_Calendar_Importer.server.in.in
-server_DATA = $(server_in_files:.server.in.in=_$(BASE_VERSION).server)
-@EVO_SERVER_RULE@
-@INTLTOOL_SERVER_RULE@
-
-BUILT_SOURCES = $(server_DATA)
-CLEANFILES = $(BUILT_SOURCES)
-
-EXTRA_DIST = $(server_in_files)
-
-dist-hook:
- cd $(distdir); rm -f $(BUILT_SOURCES) \ No newline at end of file
diff --git a/calendar/importers/evolution-calendar-importer.h b/calendar/importers/evolution-calendar-importer.h
deleted file mode 100644
index 0691ee2cab..0000000000
--- a/calendar/importers/evolution-calendar-importer.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* Evolution calendar importer component
- *
- * Authors: Rodrigo Moya <rodrigo@ximian.com>
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_CALENDAR_IMPORTER_H
-#define EVOLUTION_CALENDAR_IMPORTER_H
-
-#include <bonobo/bonobo-object.h>
-
-G_BEGIN_DECLS
-
-BonoboObject *ical_importer_new (void);
-BonoboObject *vcal_importer_new (void);
-
-BonoboObject *gnome_calendar_importer_new (void);
-
-G_END_DECLS
-
-#endif
diff --git a/calendar/importers/icalendar-importer.c b/calendar/importers/icalendar-importer.c
deleted file mode 100644
index ae9a5c9b21..0000000000
--- a/calendar/importers/icalendar-importer.c
+++ /dev/null
@@ -1,753 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* Evolution calendar importer component
- *
- * Authors: Rodrigo Moya <rodrigo@ximian.com>
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <unistd.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkcheckbutton.h>
-#include <gtk/gtkhbox.h>
-#include <gtk/gtkmain.h>
-#include <libgnome/gnome-util.h>
-#include <libgnome/gnome-i18n.h>
-#include <bonobo/bonobo-control.h>
-#include <bonobo/bonobo-exception.h>
-#include <libecal/e-cal.h>
-#include <importer/evolution-importer.h>
-#include <importer/evolution-intelligent-importer.h>
-#include <importer/GNOME_Evolution_Importer.h>
-#include <libical/icalvcal.h>
-#include "evolution-calendar-importer.h"
-
-/* We timeout after 2 minutes, when opening the folders. */
-#define IMPORTER_TIMEOUT_SECONDS 120
-
-
-typedef struct {
- ECal *client;
- ECal *tasks_client;
- EvolutionImporter *importer;
- icalcomponent *icalcomp;
- gboolean folder_contains_events;
- gboolean folder_contains_tasks;
-} ICalImporter;
-
-typedef struct {
- gboolean do_calendar;
- gboolean do_tasks;
-} ICalIntelligentImporter;
-
-/*
- * Functions shared by iCalendar & vCalendar importer.
- */
-
-static void
-importer_destroy_cb (gpointer user_data)
-{
- ICalImporter *ici = (ICalImporter *) user_data;
-
- g_return_if_fail (ici != NULL);
-
- g_object_unref (ici->client);
- g_object_unref (ici->tasks_client);
-
- if (ici->icalcomp != NULL) {
- icalcomponent_free (ici->icalcomp);
- ici->icalcomp = NULL;
- }
-
- g_free (ici);
-}
-
-/* This reads in an entire file and returns it. It returns NULL on error.
- The returned string should be freed. */
-static char*
-read_file (const char *filename)
-{
- int fd, n;
- GString *str;
- char buffer[2049];
- gboolean error = FALSE;
-
- /* read file contents */
- fd = open (filename, O_RDONLY);
- if (fd == -1)
- return NULL;
-
- str = g_string_new ("");
- while (1) {
- memset (buffer, 0, sizeof(buffer));
- n = read (fd, buffer, sizeof (buffer) - 1);
- if (n > 0) {
- str = g_string_append (str, buffer);
- } else if (n == 0) {
- break;
- } else {
- error = TRUE;
- break;
- }
- }
-
- close (fd);
-
- if (error) {
- g_string_free (str, FALSE);
- return NULL;
- } else {
- gchar *retval = str->str;
- g_string_free (str, FALSE);
- return retval;
- }
-}
-
-/* This removes all components except VEVENTs and VTIMEZONEs from the toplevel
- icalcomponent, and returns a GList of the VTODO components. */
-static GList*
-prepare_events (icalcomponent *icalcomp)
-{
- icalcomponent *subcomp;
- GList *vtodos = NULL;
- icalcompiter iter;
-
- iter = icalcomponent_begin_component (icalcomp, ICAL_ANY_COMPONENT);
- while ((subcomp = icalcompiter_deref (&iter)) != NULL) {
- icalcomponent_kind child_kind = icalcomponent_isa (subcomp);
- if (child_kind != ICAL_VEVENT_COMPONENT
- && child_kind != ICAL_VTIMEZONE_COMPONENT) {
-
- icalcompiter_next (&iter);
-
- icalcomponent_remove_component (icalcomp, subcomp);
- if (child_kind == ICAL_VTODO_COMPONENT)
- vtodos = g_list_prepend (vtodos, subcomp);
- else
- icalcomponent_free (subcomp);
-
- continue;
- }
-
- icalcompiter_next (&iter);
- }
-
- return vtodos;
-}
-
-
-/* This removes all components except VTODOs and VTIMEZONEs from the toplevel
- icalcomponent, and adds the given list of VTODO components. The list is
- freed afterwards. */
-static void
-prepare_tasks (icalcomponent *icalcomp, GList *vtodos)
-{
- icalcomponent *subcomp;
- GList *elem;
- icalcompiter iter;
-
- iter = icalcomponent_begin_component (icalcomp, ICAL_ANY_COMPONENT);
- while ((subcomp = icalcompiter_deref (&iter)) != NULL) {
- icalcomponent_kind child_kind = icalcomponent_isa (subcomp);
- if (child_kind != ICAL_VTODO_COMPONENT
- && child_kind != ICAL_VTIMEZONE_COMPONENT) {
- icalcompiter_next (&iter);
- icalcomponent_remove_component (icalcomp, subcomp);
- icalcomponent_free (subcomp);
-
- continue;
- }
-
- icalcompiter_next (&iter);
- }
-
- for (elem = vtodos; elem; elem = elem->next) {
- icalcomponent_add_component (icalcomp, elem->data);
- }
- g_list_free (vtodos);
-}
-
-static gboolean
-update_single_object (ECal *client, icalcomponent *icalcomp)
-{
- char *uid;
- icalcomponent *tmp_icalcomp;
-
- uid = (char *) icalcomponent_get_uid (icalcomp);
-
- if (e_cal_get_object (client, uid, NULL, &tmp_icalcomp, NULL))
- return e_cal_modify_object (client, icalcomp, CALOBJ_MOD_ALL, NULL);
-
- return e_cal_create_object (client, icalcomp, &uid, NULL);
-}
-
-static gboolean
-update_objects (ECal *client, icalcomponent *icalcomp)
-{
- icalcomponent *subcomp;
- icalcomponent_kind kind;
-
- kind = icalcomponent_isa (icalcomp);
- if (kind == ICAL_VTODO_COMPONENT || kind == ICAL_VEVENT_COMPONENT)
- return update_single_object (client, icalcomp);
- else if (kind != ICAL_VCALENDAR_COMPONENT)
- return FALSE;
-
- subcomp = icalcomponent_get_first_component (icalcomp, ICAL_ANY_COMPONENT);
- while (subcomp) {
- gboolean success;
-
- kind = icalcomponent_isa (subcomp);
- if (kind == ICAL_VTIMEZONE_COMPONENT) {
- icaltimezone *zone;
-
- zone = icaltimezone_new ();
- icaltimezone_set_component (zone, subcomp);
-
- success = e_cal_add_timezone (client, zone, NULL);
- icaltimezone_free (zone, 1);
- if (!success)
- return success;
- } else if (kind == ICAL_VTODO_COMPONENT ||
- kind == ICAL_VEVENT_COMPONENT) {
- success = update_single_object (client, subcomp);
- if (!success)
- return success;
- }
-
- subcomp = icalcomponent_get_next_component (icalcomp, ICAL_ANY_COMPONENT);
- }
-
- return TRUE;
-}
-
-static void
-process_item_fn (EvolutionImporter *importer,
- CORBA_Object listener,
- void *closure,
- CORBA_Environment *ev)
-{
- ECalLoadState state, tasks_state;
- ICalImporter *ici = (ICalImporter *) closure;
- GNOME_Evolution_ImporterListener_ImporterResult result;
-
- result = GNOME_Evolution_ImporterListener_OK;
-
- g_return_if_fail (ici != NULL);
- g_return_if_fail (E_IS_CAL (ici->client));
- g_return_if_fail (ici->icalcomp != NULL);
-
- state = e_cal_get_load_state (ici->client);
- tasks_state = e_cal_get_load_state (ici->tasks_client);
- if (state == E_CAL_LOAD_LOADING
- || tasks_state == E_CAL_LOAD_LOADING) {
- GNOME_Evolution_ImporterListener_notifyResult (
- listener,
- GNOME_Evolution_ImporterListener_BUSY,
- TRUE, ev);
- return;
- } else if (state != E_CAL_LOAD_LOADED
- || tasks_state != E_CAL_LOAD_LOADED) {
- GNOME_Evolution_ImporterListener_notifyResult (
- listener,
- GNOME_Evolution_ImporterListener_UNSUPPORTED_OPERATION,
- FALSE, ev);
- return;
- }
-
- /* If the folder contains events & tasks we can just import everything
- into it. If it contains just events, we have to strip out the
- VTODOs and import them into the default tasks folder. If the folder
- contains just tasks, we strip out the VEVENTs, which do not get
- imported at all. */
- if (ici->folder_contains_events && ici->folder_contains_tasks) {
- if (!update_objects (ici->client, ici->icalcomp))
- result = GNOME_Evolution_ImporterListener_BAD_DATA;
- } else if (ici->folder_contains_events) {
- GList *vtodos = prepare_events (ici->icalcomp);
- if (!update_objects (ici->client, ici->icalcomp))
- result = GNOME_Evolution_ImporterListener_BAD_DATA;
-
- prepare_tasks (ici->icalcomp, vtodos);
- if (!update_objects (ici->tasks_client, ici->icalcomp))
- result = GNOME_Evolution_ImporterListener_BAD_DATA;
- } else {
- prepare_tasks (ici->icalcomp, NULL);
- if (!update_objects (ici->client, ici->icalcomp))
- result = GNOME_Evolution_ImporterListener_BAD_DATA;
- }
-
- GNOME_Evolution_ImporterListener_notifyResult (listener, result, FALSE,
- ev);
-}
-
-
-/*
- * iCalendar importer functions.
- */
-
-static gboolean
-support_format_fn (EvolutionImporter *importer,
- const char *filename,
- void *closure)
-{
- char *contents;
- icalcomponent *icalcomp;
- gboolean ret = FALSE;
-
- contents = read_file (filename);
-
- /* parse the file */
- if (contents) {
- icalcomp = icalparser_parse_string (contents);
- if (icalcomp) {
- if (icalcomponent_is_valid (icalcomp))
- ret = TRUE;
- else
- ret = FALSE;
- icalcomponent_free (icalcomp);
- }
- }
-
- g_free (contents);
-
- return ret;
-}
-
-static gboolean
-load_file_fn (EvolutionImporter *importer,
- const char *filename,
- const char *physical_uri,
- const char *folder_type,
- void *closure)
-{
- char *contents, *f;
- gboolean ret = FALSE;
- ICalImporter *ici = (ICalImporter *) closure;
-
- g_return_val_if_fail (ici != NULL, FALSE);
-
- contents = read_file (filename);
-
- if (!strcmp (folder_type, "calendar")) {
- ici->folder_contains_events = TRUE;
- ici->folder_contains_tasks = FALSE;
-
- f = g_strdup ("calendar.ics");
- } else {
- ici->folder_contains_events = FALSE;
- ici->folder_contains_tasks = TRUE;
-
- f = g_strdup ("tasks.ics");
- }
-
- /* parse the file */
- if (contents) {
- icalcomponent *icalcomp;
-
- icalcomp = icalparser_parse_string (contents);
- if (icalcomp) {
- char *real_uri;
-
- if (!g_strncasecmp (physical_uri, "file", 4) &&
- g_strcasecmp (physical_uri + (strlen (physical_uri) - strlen (f)), f)) {
- real_uri = g_concat_dir_and_file (physical_uri, f);
- } else
- real_uri = g_strdup (physical_uri);
-
- /* create ECal's */
- if (!ici->client)
- ici->client = e_cal_new_from_uri (real_uri, CALOBJ_TYPE_EVENT);
- if (!ici->tasks_client)
- ici->tasks_client = e_cal_new_from_uri ("", CALOBJ_TYPE_TODO); /* FIXME */
-
- if (e_cal_open (ici->client, TRUE, NULL)
- && e_cal_open (ici->tasks_client, FALSE, NULL)) {
- ici->icalcomp = icalcomp;
- ret = TRUE;
- }
-
- g_free (real_uri);
- }
- }
-
- g_free (contents);
- g_free (f);
-
- return ret;
-}
-
-BonoboObject *
-ical_importer_new (void)
-{
- ICalImporter *ici;
-
- ici = g_new0 (ICalImporter, 1);
- ici->client = NULL;
- ici->tasks_client = NULL;
- ici->icalcomp = NULL;
- ici->importer = evolution_importer_new (support_format_fn,
- load_file_fn,
- process_item_fn,
- NULL,
- ici);
-
- g_object_weak_ref (G_OBJECT (ici->importer), (GWeakNotify) importer_destroy_cb, ici);
-
- return BONOBO_OBJECT (ici->importer);
-}
-
-
-
-/*
- * vCalendar importer functions.
- */
-
-static gboolean
-vcal_support_format_fn (EvolutionImporter *importer,
- const char *filename,
- void *closure)
-{
- char *contents;
- gboolean ret = FALSE;
-
- contents = read_file (filename);
-
- /* parse the file */
- if (contents) {
- VObject *vcal;
-
- vcal = Parse_MIME (contents, strlen (contents));
-
- if (vcal) {
- icalcomponent *icalcomp;
-
- icalcomp = icalvcal_convert (vcal);
-
- if (icalcomp) {
- icalcomponent_free (icalcomp);
- ret = TRUE;
- }
-
- cleanVObject (vcal);
- }
- }
-
- g_free (contents);
-
- return ret;
-}
-
-/* This tries to load in a vCalendar file and convert it to an icalcomponent.
- It returns NULL on failure. */
-static icalcomponent*
-load_vcalendar_file (const char *filename)
-{
- icalvcal_defaults defaults = { 0 };
- icalcomponent *icalcomp = NULL;
- char *contents;
-
- defaults.alarm_audio_url = "file://" EVOLUTION_SOUNDDIR "/default_alarm.wav";
- defaults.alarm_audio_fmttype = "audio/x-wav";
- defaults.alarm_description = (char*) _("Reminder!!");
-
- contents = read_file (filename);
-
- /* parse the file */
- if (contents) {
- VObject *vcal;
-
- vcal = Parse_MIME (contents, strlen (contents));
-
- if (vcal) {
- icalcomp = icalvcal_convert_with_defaults (vcal,
- &defaults);
- cleanVObject (vcal);
- }
- }
-
- g_free (contents);
-
- return icalcomp;
-}
-
-static gboolean
-vcal_load_file_fn (EvolutionImporter *importer,
- const char *filename,
- const char *physical_uri,
- const char *folder_type,
- void *closure)
-{
- gboolean ret = FALSE;
- char *f;
- ICalImporter *ici = (ICalImporter *) closure;
- icalcomponent *icalcomp;
-
- g_return_val_if_fail (ici != NULL, FALSE);
-
- if (!strcmp (folder_type, "calendar")) {
- ici->folder_contains_events = TRUE;
- ici->folder_contains_tasks = FALSE;
-
- f = g_strdup ("calendar.ics");
- } else {
- ici->folder_contains_events = FALSE;
- ici->folder_contains_tasks = TRUE;
-
- f = g_strdup ("tasks.ics");
- }
-
- icalcomp = load_vcalendar_file (filename);
- if (icalcomp) {
- char *real_uri;
-
- if (!g_strncasecmp (physical_uri, "file", 4) &&
- g_strcasecmp (physical_uri + (strlen (physical_uri) - strlen (f)), f)) {
- real_uri = g_concat_dir_and_file (physical_uri, f);
- } else
- real_uri = g_strdup (physical_uri);
-
- /* create ECal's */
- if (!ici->client)
- ici->client = e_cal_new_from_uri (real_uri, CALOBJ_TYPE_EVENT);
- if (!ici->tasks_client)
- ici->tasks_client = e_cal_new_from_uri ("", CALOBJ_TYPE_TODO);
-
- if (e_cal_open (ici->client, TRUE, NULL)
- && e_cal_open (ici->tasks_client, FALSE, NULL)) {
- ici->icalcomp = icalcomp;
- ret = TRUE;
- }
-
- g_free (real_uri);
- }
-
- g_free (f);
-
- return ret;
-}
-
-BonoboObject *
-vcal_importer_new (void)
-{
- ICalImporter *ici;
-
- ici = g_new0 (ICalImporter, 1);
- ici->client = NULL;
- ici->tasks_client = NULL;
- ici->icalcomp = NULL;
- ici->importer = evolution_importer_new (vcal_support_format_fn,
- vcal_load_file_fn,
- process_item_fn,
- NULL,
- ici);
-
- g_object_weak_ref (G_OBJECT (ici->importer), (GWeakNotify) importer_destroy_cb, ici);
-
- return BONOBO_OBJECT (ici->importer);
-}
-
-
-
-
-
-
-static void
-gnome_calendar_importer_destroy_cb (gpointer user_data)
-{
- ICalIntelligentImporter *ici = (ICalIntelligentImporter *) user_data;
-
- g_return_if_fail (ici != NULL);
-
- g_free (ici);
-}
-
-
-
-static gboolean
-gnome_calendar_can_import_fn (EvolutionIntelligentImporter *ii,
- void *closure)
-{
- char *filename;
- gboolean gnome_calendar_exists;
-
- filename = gnome_util_home_file ("user-cal.vcf");
- gnome_calendar_exists = g_file_exists (filename);
- g_free (filename);
-
- return gnome_calendar_exists;
-}
-
-
-static void
-gnome_calendar_import_data_fn (EvolutionIntelligentImporter *ii,
- void *closure)
-{
- ICalIntelligentImporter *ici = closure;
- icalcomponent *icalcomp = NULL;
- char *filename;
- GList *vtodos;
- ECal *calendar_client = NULL, *tasks_client = NULL;
- int t;
-
- /* If neither is selected, just return. */
- if (!ici->do_calendar && !ici->do_tasks) {
- return;
- }
-
- /* Try to open the default calendar & tasks folders. */
- if (ici->do_calendar) {
- calendar_client = e_cal_new_from_uri ("", CALOBJ_TYPE_EVENT); /* FIXME: use default folder */
- if (!e_cal_open (calendar_client, FALSE, NULL))
- goto out;
- }
-
- if (ici->do_tasks) {
- tasks_client = e_cal_new_from_uri ("", CALOBJ_TYPE_TODO); /* FIXME: use default folder */
- if (!e_cal_open (tasks_client, FALSE, NULL))
- goto out;
- }
-
- /* Load the Gnome Calendar file and convert to iCalendar. */
- filename = gnome_util_home_file ("user-cal.vcf");
- icalcomp = load_vcalendar_file (filename);
- g_free (filename);
-
- /* If we couldn't load the file, just return. FIXME: Error message? */
- if (!icalcomp)
- goto out;
-
- /*
- * Import the calendar events into the default calendar folder.
- */
- vtodos = prepare_events (icalcomp);
-
- /* Wait for client to finish opening the calendar & tasks folders. */
- for (t = 0; t < IMPORTER_TIMEOUT_SECONDS; t++) {
- ECalLoadState calendar_state, tasks_state;
-
- calendar_state = tasks_state = E_CAL_LOAD_LOADED;
-
- /* We need this so the ECal gets notified that the
- folder is opened, via Corba. */
- while (gtk_events_pending ())
- gtk_main_iteration ();
-
- if (ici->do_calendar)
- calendar_state = e_cal_get_load_state (calendar_client);
-
- if (ici->do_tasks)
- tasks_state = e_cal_get_load_state (tasks_client);
-
- if (calendar_state == E_CAL_LOAD_LOADED
- && tasks_state == E_CAL_LOAD_LOADED)
- break;
-
- sleep (1);
- }
-
- /* If we timed out, just return. */
- if (t == IMPORTER_TIMEOUT_SECONDS)
- goto out;
-
- /* Import the calendar events. */
- /* FIXME: What do intelligent importers do about errors? */
- if (ici->do_calendar)
- update_objects (calendar_client, icalcomp);
-
-
- /*
- * Import the tasks into the default tasks folder.
- */
- prepare_tasks (icalcomp, vtodos);
- if (ici->do_tasks)
- update_objects (tasks_client, icalcomp);
-
- out:
- if (icalcomp)
- icalcomponent_free (icalcomp);
- if (calendar_client)
- g_object_unref (calendar_client);
- if (tasks_client)
- g_object_unref (tasks_client);
-}
-
-
-/* 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 (ICalIntelligentImporter *ici)
-{
- GtkWidget *hbox, *calendar_checkbox, *tasks_checkbox;
- BonoboControl *control;
-
- hbox = gtk_hbox_new (FALSE, 2);
-
- calendar_checkbox = gtk_check_button_new_with_label (_("Calendar Events"));
- g_signal_connect (G_OBJECT (calendar_checkbox), "toggled",
- G_CALLBACK (checkbox_toggle_cb),
- &ici->do_calendar);
- gtk_box_pack_start (GTK_BOX (hbox), calendar_checkbox,
- FALSE, FALSE, 0);
-
- tasks_checkbox = gtk_check_button_new_with_label (_("Tasks"));
- g_signal_connect (G_OBJECT (tasks_checkbox), "toggled",
- G_CALLBACK (checkbox_toggle_cb),
- &ici->do_tasks);
- gtk_box_pack_start (GTK_BOX (hbox), tasks_checkbox,
- FALSE, FALSE, 0);
-
- gtk_widget_show_all (hbox);
- control = bonobo_control_new (hbox);
- return control;
-}
-
-BonoboObject *
-gnome_calendar_importer_new (void)
-{
- EvolutionIntelligentImporter *importer;
- ICalIntelligentImporter *ici;
- BonoboControl *control;
- char *message = N_("Evolution has found Gnome Calendar files.\n"
- "Would you like to import them into Evolution?");
-
- ici = g_new0 (ICalIntelligentImporter, 1);
-
- importer = evolution_intelligent_importer_new (gnome_calendar_can_import_fn,
- gnome_calendar_import_data_fn,
- _("Gnome Calendar"),
- _(message),
- ici);
-
-
- g_object_weak_ref (G_OBJECT (importer), (GWeakNotify) gnome_calendar_importer_destroy_cb, ici);
-
- control = create_checkboxes_control (ici);
- bonobo_object_add_interface (BONOBO_OBJECT (importer),
- BONOBO_OBJECT (control));
-
- return BONOBO_OBJECT (importer);
-}
diff --git a/calendar/importers/main.c b/calendar/importers/main.c
deleted file mode 100644
index d19f98a271..0000000000
--- a/calendar/importers/main.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* Evolution calendar importer component
- *
- * Authors: Rodrigo Moya <rodrigo@ximian.com>
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <bonobo/bonobo-shlib-factory.h>
-#include <bonobo/bonobo-context.h>
-#include <bonobo/bonobo-main.h>
-#include "evolution-calendar-importer.h"
-
-#define IMPORTER_FACTORY_ID "OAFIID:GNOME_Evolution_Calendar_ImporterFactory:" BASE_VERSION
-#define ICALENDAR_IMPORTER_ID "OAFIID:GNOME_Evolution_Calendar_iCalendar_Importer:" BASE_VERSION
-#define VCALENDAR_IMPORTER_ID "OAFIID:GNOME_Evolution_Calendar_vCalendar_Importer:" BASE_VERSION
-#define GNOME_CALENDAR_IMPORTER_ID "OAFIID:GNOME_Evolution_Gnome_Calendar_Intelligent_Importer:" BASE_VERSION
-
-static BonoboObject *
-importer_factory_fn (BonoboGenericFactory *factory, const char *id, void *closure)
-{
- BonoboObject *object = NULL;
-
- g_return_val_if_fail (id != NULL, NULL);
-
- if (!strcmp (id, ICALENDAR_IMPORTER_ID))
- object = ical_importer_new ();
- else if (!strcmp (id, VCALENDAR_IMPORTER_ID))
- object = vcal_importer_new ();
- else if (!strcmp (id, GNOME_CALENDAR_IMPORTER_ID))
- object = gnome_calendar_importer_new ();
- else
- g_warning ("Component not supported by this factory");
-
- return object;
-}
-
-BONOBO_ACTIVATION_SHLIB_FACTORY (IMPORTER_FACTORY_ID, "Evolution Calendar importer factory", importer_factory_fn, NULL)
diff --git a/calendar/zones.h b/calendar/zones.h
deleted file mode 100644
index 5b482255f0..0000000000
--- a/calendar/zones.h
+++ /dev/null
@@ -1,387 +0,0 @@
-/*
- * These are the timezone names from the Olson timezone data.
- * We only place them here so gettext picks them up for translation.
- * Don't include in any C files.
- */
-
-N_("Africa/Abidjan");
-N_("Africa/Accra");
-N_("Africa/Addis_Ababa");
-N_("Africa/Algiers");
-N_("Africa/Asmera");
-N_("Africa/Bamako");
-N_("Africa/Bangui");
-N_("Africa/Banjul");
-N_("Africa/Bissau");
-N_("Africa/Blantyre");
-N_("Africa/Brazzaville");
-N_("Africa/Bujumbura");
-N_("Africa/Cairo");
-N_("Africa/Casablanca");
-N_("Africa/Ceuta");
-N_("Africa/Conakry");
-N_("Africa/Dakar");
-N_("Africa/Dar_es_Salaam");
-N_("Africa/Djibouti");
-N_("Africa/Douala");
-N_("Africa/El_Aaiun");
-N_("Africa/Freetown");
-N_("Africa/Gaborone");
-N_("Africa/Harare");
-N_("Africa/Johannesburg");
-N_("Africa/Kampala");
-N_("Africa/Khartoum");
-N_("Africa/Kigali");
-N_("Africa/Kinshasa");
-N_("Africa/Lagos");
-N_("Africa/Libreville");
-N_("Africa/Lome");
-N_("Africa/Luanda");
-N_("Africa/Lubumbashi");
-N_("Africa/Lusaka");
-N_("Africa/Malabo");
-N_("Africa/Maputo");
-N_("Africa/Maseru");
-N_("Africa/Mbabane");
-N_("Africa/Mogadishu");
-N_("Africa/Monrovia");
-N_("Africa/Nairobi");
-N_("Africa/Ndjamena");
-N_("Africa/Niamey");
-N_("Africa/Nouakchott");
-N_("Africa/Ouagadougou");
-N_("Africa/Porto-Novo");
-N_("Africa/Sao_Tome");
-N_("Africa/Timbuktu");
-N_("Africa/Tripoli");
-N_("Africa/Tunis");
-N_("Africa/Windhoek");
-N_("America/Adak");
-N_("America/Anchorage");
-N_("America/Anguilla");
-N_("America/Antigua");
-N_("America/Araguaina");
-N_("America/Aruba");
-N_("America/Asuncion");
-N_("America/Barbados");
-N_("America/Belem");
-N_("America/Belize");
-N_("America/Boa_Vista");
-N_("America/Bogota");
-N_("America/Boise");
-N_("America/Buenos_Aires");
-N_("America/Cambridge_Bay");
-N_("America/Cancun");
-N_("America/Caracas");
-N_("America/Catamarca");
-N_("America/Cayenne");
-N_("America/Cayman");
-N_("America/Chicago");
-N_("America/Chihuahua");
-N_("America/Cordoba");
-N_("America/Costa_Rica");
-N_("America/Cuiaba");
-N_("America/Curacao");
-N_("America/Danmarkshavn");
-N_("America/Dawson");
-N_("America/Dawson_Creek");
-N_("America/Denver");
-N_("America/Detroit");
-N_("America/Dominica");
-N_("America/Edmonton");
-N_("America/Eirunepe");
-N_("America/El_Salvador");
-N_("America/Fortaleza");
-N_("America/Glace_Bay");
-N_("America/Godthab");
-N_("America/Goose_Bay");
-N_("America/Grand_Turk");
-N_("America/Grenada");
-N_("America/Guadeloupe");
-N_("America/Guatemala");
-N_("America/Guayaquil");
-N_("America/Guyana");
-N_("America/Halifax");
-N_("America/Havana");
-N_("America/Hermosillo");
-N_("America/Indiana/Indianapolis");
-N_("America/Indiana/Knox");
-N_("America/Indiana/Marengo");
-N_("America/Indiana/Vevay");
-N_("America/Indianapolis");
-N_("America/Inuvik");
-N_("America/Iqaluit");
-N_("America/Jamaica");
-N_("America/Jujuy");
-N_("America/Juneau");
-N_("America/Kentucky/Louisville");
-N_("America/Kentucky/Monticello");
-N_("America/La_Paz");
-N_("America/Lima");
-N_("America/Los_Angeles");
-N_("America/Louisville");
-N_("America/Maceio");
-N_("America/Managua");
-N_("America/Manaus");
-N_("America/Martinique");
-N_("America/Mazatlan");
-N_("America/Mendoza");
-N_("America/Menominee");
-N_("America/Merida");
-N_("America/Mexico_City");
-N_("America/Miquelon");
-N_("America/Monterrey");
-N_("America/Montevideo");
-N_("America/Montreal");
-N_("America/Montserrat");
-N_("America/Nassau");
-N_("America/New_York");
-N_("America/Nipigon");
-N_("America/Nome");
-N_("America/Noronha");
-N_("America/North_Dakota/Center");
-N_("America/Panama");
-N_("America/Pangnirtung");
-N_("America/Paramaribo");
-N_("America/Phoenix");
-N_("America/Port-au-Prince");
-N_("America/Port_of_Spain");
-N_("America/Porto_Velho");
-N_("America/Puerto_Rico");
-N_("America/Rainy_River");
-N_("America/Rankin_Inlet");
-N_("America/Recife");
-N_("America/Regina");
-N_("America/Rio_Branco");
-N_("America/Rosario");
-N_("America/Santiago");
-N_("America/Santo_Domingo");
-N_("America/Sao_Paulo");
-N_("America/Scoresbysund");
-N_("America/Shiprock");
-N_("America/St_Johns");
-N_("America/St_Kitts");
-N_("America/St_Lucia");
-N_("America/St_Thomas");
-N_("America/St_Vincent");
-N_("America/Swift_Current");
-N_("America/Tegucigalpa");
-N_("America/Thule");
-N_("America/Thunder_Bay");
-N_("America/Tijuana");
-N_("America/Tortola");
-N_("America/Vancouver");
-N_("America/Whitehorse");
-N_("America/Winnipeg");
-N_("America/Yakutat");
-N_("America/Yellowknife");
-N_("Antarctica/Casey");
-N_("Antarctica/Davis");
-N_("Antarctica/DumontDUrville");
-N_("Antarctica/Mawson");
-N_("Antarctica/McMurdo");
-N_("Antarctica/Palmer");
-N_("Antarctica/South_Pole");
-N_("Antarctica/Syowa");
-N_("Antarctica/Vostok");
-N_("Arctic/Longyearbyen");
-N_("Asia/Aden");
-N_("Asia/Almaty");
-N_("Asia/Amman");
-N_("Asia/Anadyr");
-N_("Asia/Aqtau");
-N_("Asia/Aqtobe");
-N_("Asia/Ashgabat");
-N_("Asia/Baghdad");
-N_("Asia/Bahrain");
-N_("Asia/Baku");
-N_("Asia/Bangkok");
-N_("Asia/Beirut");
-N_("Asia/Bishkek");
-N_("Asia/Brunei");
-N_("Asia/Calcutta");
-N_("Asia/Choibalsan");
-N_("Asia/Chongqing");
-N_("Asia/Colombo");
-N_("Asia/Damascus");
-N_("Asia/Dhaka");
-N_("Asia/Dili");
-N_("Asia/Dubai");
-N_("Asia/Dushanbe");
-N_("Asia/Gaza");
-N_("Asia/Harbin");
-N_("Asia/Hong_Kong");
-N_("Asia/Hovd");
-N_("Asia/Irkutsk");
-N_("Asia/Istanbul");
-N_("Asia/Jakarta");
-N_("Asia/Jayapura");
-N_("Asia/Jerusalem");
-N_("Asia/Kabul");
-N_("Asia/Kamchatka");
-N_("Asia/Karachi");
-N_("Asia/Kashgar");
-N_("Asia/Katmandu");
-N_("Asia/Krasnoyarsk");
-N_("Asia/Kuala_Lumpur");
-N_("Asia/Kuching");
-N_("Asia/Kuwait");
-N_("Asia/Macao");
-N_("Asia/Macau");
-N_("Asia/Magadan");
-N_("Asia/Makassar");
-N_("Asia/Manila");
-N_("Asia/Muscat");
-N_("Asia/Nicosia");
-N_("Asia/Novosibirsk");
-N_("Asia/Omsk");
-N_("Asia/Oral");
-N_("Asia/Phnom_Penh");
-N_("Asia/Pontianak");
-N_("Asia/Pyongyang");
-N_("Asia/Qatar");
-N_("Asia/Qyzylorda");
-N_("Asia/Rangoon");
-N_("Asia/Riyadh");
-N_("Asia/Saigon");
-N_("Asia/Sakhalin");
-N_("Asia/Samarkand");
-N_("Asia/Seoul");
-N_("Asia/Shanghai");
-N_("Asia/Singapore");
-N_("Asia/Taipei");
-N_("Asia/Tashkent");
-N_("Asia/Tbilisi");
-N_("Asia/Tehran");
-N_("Asia/Thimphu");
-N_("Asia/Tokyo");
-N_("Asia/Ujung_Pandang");
-N_("Asia/Ulaanbaatar");
-N_("Asia/Urumqi");
-N_("Asia/Vientiane");
-N_("Asia/Vladivostok");
-N_("Asia/Yakutsk");
-N_("Asia/Yekaterinburg");
-N_("Asia/Yerevan");
-N_("Atlantic/Azores");
-N_("Atlantic/Bermuda");
-N_("Atlantic/Canary");
-N_("Atlantic/Cape_Verde");
-N_("Atlantic/Faeroe");
-N_("Atlantic/Jan_Mayen");
-N_("Atlantic/Madeira");
-N_("Atlantic/Reykjavik");
-N_("Atlantic/South_Georgia");
-N_("Atlantic/St_Helena");
-N_("Atlantic/Stanley");
-N_("Australia/Adelaide");
-N_("Australia/Brisbane");
-N_("Australia/Broken_Hill");
-N_("Australia/Darwin");
-N_("Australia/Hobart");
-N_("Australia/Lindeman");
-N_("Australia/Lord_Howe");
-N_("Australia/Melbourne");
-N_("Australia/Perth");
-N_("Australia/Sydney");
-N_("Europe/Amsterdam");
-N_("Europe/Andorra");
-N_("Europe/Athens");
-N_("Europe/Belfast");
-N_("Europe/Belgrade");
-N_("Europe/Berlin");
-N_("Europe/Bratislava");
-N_("Europe/Brussels");
-N_("Europe/Bucharest");
-N_("Europe/Budapest");
-N_("Europe/Chisinau");
-N_("Europe/Copenhagen");
-N_("Europe/Dublin");
-N_("Europe/Gibraltar");
-N_("Europe/Helsinki");
-N_("Europe/Istanbul");
-N_("Europe/Kaliningrad");
-N_("Europe/Kiev");
-N_("Europe/Lisbon");
-N_("Europe/Ljubljana");
-N_("Europe/London");
-N_("Europe/Luxembourg");
-N_("Europe/Madrid");
-N_("Europe/Malta");
-N_("Europe/Minsk");
-N_("Europe/Monaco");
-N_("Europe/Moscow");
-N_("Europe/Nicosia");
-N_("Europe/Oslo");
-N_("Europe/Paris");
-N_("Europe/Prague");
-N_("Europe/Riga");
-N_("Europe/Rome");
-N_("Europe/Samara");
-N_("Europe/San_Marino");
-N_("Europe/Sarajevo");
-N_("Europe/Simferopol");
-N_("Europe/Skopje");
-N_("Europe/Sofia");
-N_("Europe/Stockholm");
-N_("Europe/Tallinn");
-N_("Europe/Tirane");
-N_("Europe/Uzhgorod");
-N_("Europe/Vaduz");
-N_("Europe/Vatican");
-N_("Europe/Vienna");
-N_("Europe/Vilnius");
-N_("Europe/Warsaw");
-N_("Europe/Zagreb");
-N_("Europe/Zaporozhye");
-N_("Europe/Zurich");
-N_("Indian/Antananarivo");
-N_("Indian/Chagos");
-N_("Indian/Christmas");
-N_("Indian/Cocos");
-N_("Indian/Comoro");
-N_("Indian/Kerguelen");
-N_("Indian/Mahe");
-N_("Indian/Maldives");
-N_("Indian/Mauritius");
-N_("Indian/Mayotte");
-N_("Indian/Reunion");
-N_("Pacific/Apia");
-N_("Pacific/Auckland");
-N_("Pacific/Chatham");
-N_("Pacific/Easter");
-N_("Pacific/Efate");
-N_("Pacific/Enderbury");
-N_("Pacific/Fakaofo");
-N_("Pacific/Fiji");
-N_("Pacific/Funafuti");
-N_("Pacific/Galapagos");
-N_("Pacific/Gambier");
-N_("Pacific/Guadalcanal");
-N_("Pacific/Guam");
-N_("Pacific/Honolulu");
-N_("Pacific/Johnston");
-N_("Pacific/Kiritimati");
-N_("Pacific/Kosrae");
-N_("Pacific/Kwajalein");
-N_("Pacific/Majuro");
-N_("Pacific/Marquesas");
-N_("Pacific/Midway");
-N_("Pacific/Nauru");
-N_("Pacific/Niue");
-N_("Pacific/Norfolk");
-N_("Pacific/Noumea");
-N_("Pacific/Pago_Pago");
-N_("Pacific/Palau");
-N_("Pacific/Pitcairn");
-N_("Pacific/Ponape");
-N_("Pacific/Port_Moresby");
-N_("Pacific/Rarotonga");
-N_("Pacific/Saipan");
-N_("Pacific/Tahiti");
-N_("Pacific/Tarawa");
-N_("Pacific/Tongatapu");
-N_("Pacific/Truk");
-N_("Pacific/Wake");
-N_("Pacific/Wallis");
-N_("Pacific/Yap");
diff --git a/camel.pc.in b/camel.pc.in
deleted file mode 100644
index 1249b1897c..0000000000
--- a/camel.pc.in
+++ /dev/null
@@ -1,15 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-camel_providerdir=@camel_providerdir@
-privlibdir=@privlibdir@
-privincludedir=@privincludedir@
-
-Name: camel
-Description: the Evolution mail library
-Version: @VERSION@
-Requires: gal-2.2 >= @GAL_REQUIRED@
-Libs: -L${privlibdir} -lcamel
-Cflags: -I${privincludedir}
diff --git a/camel/.cvsignore b/camel/.cvsignore
deleted file mode 100644
index 094641c7a6..0000000000
--- a/camel/.cvsignore
+++ /dev/null
@@ -1,13 +0,0 @@
-.deps
-Makefile
-Makefile.in
-.libs
-.deps
-*.lo
-*.la
-*.bb
-*.bbg
-*.da
-*.gcov
-camel-lock-helper
-camel-index-control \ No newline at end of file
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 94ffcdc39b..0000000000
--- a/camel/ChangeLog
+++ /dev/null
@@ -1,1488 +0,0 @@
-2003-12-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.c (header_decode_rfc2184_param): Revert the
- s/is_/camel_mime_is_/ changes or we get really long variable
- names.
- (header_decode_param): Same.
- (header_decode_param_list): Here too.
-
-2003-12-09 Not Zed <NotZed@Ximian.com>
-
- * providers/smtp/camel-smtp-transport.c (smtp_send_to): encode the
- address before sending it out, rather than using the raw/utf8
- version.
-
- * camel-internet-address.c
- (camel_internet_address_encode_address): check for quoting the
- local part of the address before outputting it.
- (cia_encode_addrspec): quote local part if need be.
- (camel_internet_address_encode_address): make folding optional
- based on whether inlen is null or not.
-
- * camel-mime-utils.[ch]: rename is_* to camel_mime_is_* and export
- the type functions.
-
-2003-12-08 Not Zed <NotZed@Ximian.com>
-
- * providers/imap/camel-imap-utils.c (imap_atom_specials): add } to
- the atom specials list. This isn't correct, but some busted
- servers expect it. Bug #50728.
-
-2003-12-08 Jeffrey Stedfast <fejj@ximian.com>
-
- Fixes bug #51881
-
- * providers/local/camel-mbox-store.c (delete_folder): Same.
-
- * providers/local/camel-local-store.c (delete_folder): Unlink the
- cmeta file too.
-
-2003-12-06 JP Rosevear <jpr@ximian.com>
-
- * */Makefile.am: Remove hard coded disable deprecated flags
-
-2003-12-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-gpg-context.c (gpg_ctx_op_start): Properly set the
- O_NONBLOCK flag along with any previously set flags.
-
- * camel-filter-search.c (run_command): Don't set O_NONBLOCK on the
- pipe (1. we don't need to, and 2. we should have been setting
- O_NONBLOCK|prev_flags but we weren't, and so the pipe got
- O_RDONLY|O_NONBLOCK even tho we wanted to write to it).
-
- * camel-filter-driver.c (pipe_to_system): Same.
-
-2003-12-04 Radek Doulik <rodo@ximian.com>
-
- * camel-folder.c (folder_changed): check recent messages for junk
- mail
-
- * camel-session.c (camel_session_check_junk): new wrapper method
- for check_junk flag
- (camel_session_set_check_junk): ditto
-
- * camel-session.h (struct _CamelSession): added check_junk flag
- (if to check incoming mail for junk messages)
-
-2003-12-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-store.c (add_special_info): Free fi->path if we are gonna
- replace it with the vinfo path.
-
- * providers/local/camel-mbox-store.c (create_folder): Treat
- parent_name == NULL and parent_name == "" the same.
-
- * camel-store.c (camel_store_get_folder_info): Only add
- vTrash/vJunk info's if we've requested the toplevel folder tree,
- otherwise we get vTrash/vJunk folders in odd places in the folder
- tree.
- (add_special_info): Use the provider->url_flags to determine if
- the url uses the fragment or not for the path.
-
-2003-12-02 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-local-folder.c (local_setv): remove some
- debug printfs.
-
- ** See bug #51576.
-
- * camel-url.c (camel_url_decode): robustify url decoding for bad
- input, addresses a crash.
-
- ** See bug #51478.
-
- * camel-gpg-context.c (gpg_ctx_free): handle the context being
- NULL, and exit silently.
-
-2003-12-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-process.c (camel_process_fork): Start at fd = 3.
-
- * camel-gpg-context.c (gpg_ctx_op_start): Same.
-
- * camel-filter-driver.c (pipe_to_system): Same.
-
- * camel-filter-search.c (run_command): Start at fd = 3.
-
-2003-12-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-stream-process.c (do_exec_command): Same.
-
- * camel-process.c (camel_process_fork): Same.
-
- * camel-filter-search.c (run_command): Same as below.
-
- * camel-filter-driver.c (pipe_to_system): Same as below.
-
- * camel-gpg-context.c (gpg_ctx_op_start): Use fcntl() to set
- FD_CLOEXEC on each fd rather than close()ing it. Apparently
- Linux's older pthread implementations use sockets and so this
- fouls threading up. GO LINUX! GO!
-
-2003-12-01 Radek Doulik <rodo@ximian.com>
-
- * camel-store.c (add_special_info): set SUBSCRIBED and NOINFERIORS
- flags to special folders, renamed method from
- add_vtrash_or_vjunk_info
- (camel_store_get_folder_info): call add_special_info directly
-
-2003-11-28 Radek Doulik <rodo@ximian.com>
-
- * camel-store.c (camel_store_get_folder_info): use old code from
- mail-ops to add vtrash/vjunk info
-
-2003-11-28 David Woodhouse <dwmw2@redhat.com>
-
- * providers/imap/camel-imap-provider.c: Enable GUI option for
- 'custom command' connection.
- * providers/imap/camel-imap-store.c: Don't g_free strings in
- .rodata. It's considered rude.
-
-2003-11-28 Not Zed <NotZed@Ximian.com>
-
- * camel-mime-utils.c (mail_list_magic[]): Added list-unsubscribe
- header match.
-
-2003-11-26 Not Zed <NotZed@Ximian.com>
-
- * camel-smime-context.c (sm_verify_cmsg): take a stream rather
- than a part for the content.
- (sm_verify): get the content directly as a stream.
-
- * camel-multipart-signed.c
- (camel_multipart_signed_get_content_stream): new api to get the
- content stream which will match the signed version.
-
-2003-11-26 JP Rosevear <jpr@ximian.com>
-
- * Makefile.am: make sure we always dist the smime stuff
-
-2003-11-26 JP Rosevear <jpr@ximian.com>
-
- * Makefile.am (libcamelinclude_HEADERS): conditionally compile
- s/mime support
-
-2003-11-25 Not Zed <NotZed@Ximian.com>
-
- * camel-cipher-context.c (camel_cipher_validity_envelope): change
- args to make it suit storing the validity in a tree.
- (camel_cipher_validity_init): init the list header.
- (camel_cipher_validity_clone): call validity_new so it gets init
- properly.
- (camel_cipher_validity_free): free any children nodes recursively.
-
- * camel-cipher-context.h (CamelCipherValidity): added next/prev
- and list header.
-
-2003-11-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-session.c (camel_session_finalise): Don't destroy the
- providers as it mans we can never ever have more than 1 session
- object. See bug #51119 for details.
-
-2003-11-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/local/camel-mbox-store.c (create_folder): Fixed an
- exception to give a more meaningful description.
- (get_folder_info): We always want to scan at least one level deep.
-
-2003-11-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/local/camel-mbox-store.c (get_folder_info): Handle ""
- as a request for a full dirscan as well (not just NULL). Makes it
- consistant with other stores.
- (scan_dir): Set the fi->flags appropriately.
-
- * providers/local/camel-mbox-folder.c
- (camel_mbox_folder_get_full_path): Removed temporary hack.
-
-2003-11-14 Not Zed <NotZed@Ximian.com>
-
- * camel-mime-parser.c (SCAN_BUF): oops, put the mempool stuff
- back, we don't use e-memory afterall. Damn plane hacking.
-
-2003-11-13 Not Zed <NotZed@Ximian.com>
-
- * camel-mime-parser.c: Remove mempool code, we use the stuff in
- e-util.
- (PRESERVE_HEADERS): new compile option, if on, we preserve headers
- and folding exactly rather than unfolding all input. THIS BREAKS
- EVERYTHING right now, so don't turn it on.
-
- * camel-gpg-context.c (gpg_decrypt): reset the input memstream
- before passing it to the gpg engine.
-
- * tests/smime/pgp-mime.c (main): redirect /dev/null to stdin so it
- doesn't hang waiting for input.
- (main): removed from build - this tests multipart/signed
- explictly, but now the details of this is handled directly by the
- cipher context.
-
- * tests/smime/pgp.c (main): fixes for api changes.
- (main): redirect /dev/null to stdin so it doesn't hang waiting for
- input.
-
- * tests/message/test1.c (main): update for api changes.
-
- * camel-smime-context.c (sm_verify): look at the content object's
- mime type, not the container's type.
-
-2003-11-11 Not Zed <NotZed@Ximian.com>
-
- * camel-cipher-context.c (camel_cipher_validity_set_valid): take
- into account the @valid argument and set validity properly.
- (camel_cipher_validity_clone): new method to copy validities.
-
- * camel-smime-context.c (sm_signing_cmsmessage): removed a todo.
-
-2003-11-10 Not Zed <NotZed@Ximian.com>
-
- * camel-smime-context.c (sm_verify_cmsg): split out the CMSMessage
- verification code so it can be used from enveloped or externally
- signed data.
-
- * camel-cipher-context.c (camel_cipher_verify): only take a
- mimepart, internally handle multiparts and the hash.
-
-2003-11-07 Not Zed <NotZed@Ximian.com>
-
- * camel-cipher-context.c: make ciphervalidity a public structure,
- added encrypt status.
- (camel_cipher_decrypt): changed to return a ciphervalidity. fixed
- implementations.
- (camel_cipher_validity_*): Fixed implementations to match new
- structure, some of this is now redundant.
-
-2003-11-06 Not Zed <NotZed@Ximian.com>
-
- * camel-smime-context.c (camel_smime_context_describe_part):
- implement.
-
-2003-11-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/smtp/camel-smtp-transport.c (connect_to_server): Don't
- bother trying to see if the server advertises EHLO. Simply always
- try EHLO and fall back to HELO if EHLO fails. Fixes bug #50535.
-
-2003-11-05 Not Zed <NotZed@Ximian.com>
-
- * camel-smime-context.c (camel_smime_context_describe_part): new
- (unfinished) api to peek inside smime parts to tell us whats in
- it.
-
-2003-11-03 Not Zed <NotZed@Ximian.com>
-
- * camel-gpg-context.c (gpg_encrypt): Make this output the
- full multipart/encrypted part, not just the encrypted content part.
-
- * camel-cipher-context.c (camel_cipher_sign): change to output
- full mime part, not just a stream.
- (camel_cipher_canonical_to_stream): utility function to
- canonicalise a mimepart to a stream.
-
- * camel-smime-context.c (sm_encode_cmsmessage): removed.
- (sm_sign): change interface to output a full mime-part, not just a
- part of a mime part in multipart/signed mode.
-
-2003-11-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-gpg-context.c (gpg_ctx_parse_status): We might need to
- convert the passwd from UTF-8 into the locale charset. Fixes bug
- #50485.
-
-2003-10-31 Not Zed <NotZed@Ximian.com>
-
- * camel-cms-context.[ch]: removed, now redundant.
-
-2003-10-30 Not Zed <NotZed@Ximian.com>
-
- * camel-smime-context.c (sm_get_passwd): implement something basic.
-
- * camel-cipher-context.h: Added a note about api inconsistencies.
-
-2003-10-30 Not Zed <NotZed@Ximian.com>
-
- * camel-multipart-encrypted.c (camel_multipart_encrypted_decrypt):
- fix for cipher_decrypt changes.
-
- * camel-gpg-context.c, camel-cipher-context.c: moved all the init
- code to the end to save having to keep forward declarations
- around.
- (camel_cipher_decrypt): changed to take mimepart input and return
- a mimepart.
- (gpg_decrypt): fix for changed args.
-
-2003-10-29 Not Zed <NotZed@Ximian.com>
-
- * camel-smime-context.[ch]: replaced entirely with a new
- implementation which inherits from camel-cipher-context, and add
- to build.
-
- * camel-multipart-encrypted.c (camel_multipart_encrypted_encrypt):
- fix for cipher_encrypt api changes.
- (camel_multipart_encrypted_decrypt): use g_ascii_strcasecmp.
-
- * camel-gpg-context.c (gpg_encrypt): Fix to handle input/output as
- parts not streams
-
- * camel-cipher-context.c (camel_cipher_encrypt): change to take
- mimeparts rather than streams as input/output. And remove the
- 'sign' argument, it is implied if userid is supplied.
-
-2003-10-28 Not Zed <NotZed@Ximian.com>
-
- * tests/smime/pgp.c (main): fix for ciphercontext api changes.
-
- * camel-multipart-signed.c (camel_multipart_signed_verify): pass
- in the part to cipher_verify directly.
- (camel_multipart_signed_sign): let the cipher context setup the
- part details.
-
- * camel-gpg-context.c (gpg_sign): put the signature stream into a
- mimepart, with appropriate headers/encoding.
- (swrite): write out a mimepart rather than a stream.
- (gpg_verify): handle changed args.
-
- * camel-cipher-context.c (camel_cipher_sign): write the signature
- to a mimepart rather than a simple stream.
- (camel_cipher_verify): take the signature as a mimepart not a
- stream.
-
-2003-10-22 Not Zed <NotZed@Ximian.com>
-
- * camel-utf8.c (camel_ucs2_utf8, camel_utf8_ucs2): helpers for
- ucs2 stuff. ucs2 is 16 bit truncated unicode.
-
-2003-10-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.c: We should check List-Post before List-Id
- (List-Post has to contain the mailing-list posting address,
- whereas List-Id does not.) WAlso moved X-Loop to after List-Id to
- make FreeBSD lusers happy. Fixes bug #32297.
-
-2003-10-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * Fixes bug #35083
-
- * providers/imap/camel-imap-store.c (connect_to_server): Same
- here.
-
- * providers/pop3/camel-pop3-store.c (connect_to_server): Same as
- the smtp changes.
-
- * providers/smtp/camel-smtp-transport.c (connect_to_server): If
- HAVE_SSL is undefined, don't default to raw connections if the
- option to connect via ssl is set. Instead set an exception and
- return fail.
-
-2003-10-27 Frederic Crozat <fcrozat@mandrakesoft.com>
-
- * camel-mime-utils.c: (camel_header_decode_date):
- better detection of broken date to give to broken_date_parser.
-
-2003-10-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-text-index.c (text_index_name_add_buffer): If a word is
- longer than CAMEL_TEXT_INDEX_MAX_WORDLEN, then ignore it. This
- fixes bug #50096.
-
-2003-10-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * *.c: Removed unneeded CAMEL_OBJECT() casts.
-
-2003-10-21 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-local-folder.c (local_getv, local_setv):
- use the right tag name for the index_body arg.
- (local_sync): write any persistent metadata - to make it
- persistent.
- (camel_local_folder_construct): turn off indexing, for now, it
- should be done in local_setv.
-
- * providers/local/camel-local-folder.h: change body_index to a bool
- type.
-
- * camel-object.c (cobject_state_read, cobject_state_write): handle
- bool types
- (cobject_state_write): make sure we free all arg types.
-
- * camel-arg.c (camel_argv_build):
- (camel_arggetv_build): handle bool type.
-
- * camel-arg.h: Added BOO (bool) type.
-
-2003-10-15 Not Zed <NotZed@Ximian.com>
-
- * camel-store.c (camel_folder_info_build): Fix so we output the
- tree in sorted depth-first order, rather in reverse.
-
-2003-10-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-sasl-kerberos4.c: Fixed a #include.
-
-2003-10-10 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-local-provider.c: set the url fragment
- flag for local providers.
-
- * camel-provider.h: Move the URL_PART_NEED bits to the high 16
- bits, to allow for easier changes in the future. Added a
- URL_PART_FRAGMENT flag for providers that use fragment = folder
- path.
-
-2003-10-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.c (header_decode_date): Allow timezone offsets
- to be up to 14 hours ahead of UTC. Fixes bug #49357.
-
- * broken-date-parser.c (get_tzone): Same.
-
-2003-10-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/smtp/camel-smtp-transport.c (smtp_helo): Removed an
- unused variable.
-
-2003-09-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/smtp/camel-smtp-transport.c (smtp_helo): If the
- localhost lookup results in a numeric IPv6 host, use the form
- "[IPv6:<addr>]" as specified in rfc2821. Fixes bug #46006.
-
-2003-09-23 Ettore Perazzoli <ettore@ximian.com>
-
- * providers/local/camel-local-provider.c: Set the IS_STORAGE bit
- in the mbox provider, since it can now contain a hierarchy of
- folders.
-
-2003-09-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/local/camel-mbox-store.c (get_folder): If the CREATE
- flag is set and the parent .sbd directory does not exist, create
- it.
-
- * camel-mime-utils.c (append_8bit): Don't forget to flush the
- iconv conversion.
-
- * tests/message/test4.c (main): Don't try dot-files.
-
-2003-09-22 Not Zed <NotZed@Ximian.com>
-
- ** See bug #41610
-
- * providers/pop3/camel-pop3-folder.c (cmd_tocache): protect a
- divide by 0 for 0 length messages.
-
-2003-09-22 Not Zed <NotZed@Ximian.com>
-
- * providers/imap/camel-imap-provider.c: Added "offline_sync"
- option, which lets you synchronise all mail to local storage
- automagically.
-
- * camel-disco-folder.c (cdf_folder_changed): hook onto the folder
- changed single, for all new messages, check that they are online
- using another thread, if the offline_sync option has been enabled
- for this store.
-
-2003-09-21 Not Zed <NotZed@Ximian.com>
-
- * camel-session.c (session_thread_destroy): call proper entry
- point for freeing the message.
-
-2003-09-18 Not Zed <NotZed@Ximian.com>
-
- * camel-folder.c (filter_filter): register the filtering process
- for progress, and do progress of the filtering process.
-
-2003-09-17 Not Zed <NotZed@Ximian.com>
-
- * camel.c (camel_init): init camel operation.
-
- * camel-operation.c (camel_operation_reset): removed, not used,
- not worth it.
- (camel_operation_mute): new method to stop all status updates
- permanently.
- (*): Changed to use thread specific data and a list rather than a
- hashtable.
- (cancel_thread): removed.
- (camel_operation_register): return the previously registered op.
-
-2003-09-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/nntp/camel-nntp-store.c (connect_to_server): Fix the
- code that creates a new ssl stream to pass the correct arguments
- and the proper flags.
-
- * providers/imapp/camel-imapp-folder.c (imap_sync): Cast the
- CamelFolder to a CamelIMAPPFolder to hush some compiler warnings.
-
- * camel-mime-utils.h: Define a struct _CamelContentDisposition
- (allows the imapp code to compile)
-
- * providers/imapp/camel-imapp-driver.c: #include <string.h>
-
-2003-09-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.c (camel_transfer_encoding_to_string): New
- function to replace the one from camel-mime-part.c
- (camel_transfer_encoding_from_string): Same.
- (camel_content_transfer_encoding_decode): Renamed from
- camel_header_content_encoding_decode().
-
- * camel-mime-part.c (camel_mime_part_encoding_to_string): Removed.
- (camel_mime_part_encoding_from_string): Removed.
-
- * camel-data-wrapper.[c,h]: updated for CamelTransferEncoding
- namespace changes
-
- * camel-folder-summary.c: updated for CamelTransferEncoding
- namespace changes
-
- * camel-mime-filter-bestenc.[c,h]: updated for CamelTransferEncoding
- namespace changes
-
- * camel-mime-message.c: updated for CamelTransferEncoding
- namespace changes
-
- * camel-mime-part-utils.c: updated for CamelTransferEncoding
- namespace changes
-
- * camel-multipart-signed.c: updated for CamelTransferEncoding
- namespace changes
-
- * camel-smime-context.c: updated for CamelTransferEncoding
- namespace changes
-
- * providers/imapp/camel-imapp-utils.c: updated for
- CamelTransferEncoding namespace changes
-
- * tests/lib/messages.c: updated for CamelTransferEncoding
- namespace changes
-
- * tests/message/test1.c: updated for CamelTransferEncoding
- namespace changes
-
-2003-09-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.[c,h]: namespaced the encoding/decoding
- routines.
-
- * camel-mime-filter-basic.c: updated for namespace changes to the
- encoding/decoding routines in camel-mime-utils.c
-
- * camel-multipart.c: updated for namespace changes to the
- encoding/decoding routines in camel-mime-utils.c
-
- * camel-sasl-digest-md5.c: updated for namespace changes to the
- encoding/decoding routines in camel-mime-utils.c
-
- * camel-sasl.c: updated for namespace changes to the
- encoding/decoding routines in camel-mime-utils.c
-
- * camel-vee-folder.c: updated for namespace changes to the
- encoding/decoding routines in camel-mime-utils.c
-
- * providers/imap/camel-imap-search.c: updated for namespace
- changes to the encoding/decoding routines in camel-mime-utils.c
-
- * providers/pop3/camel-pop3-folder.c: updated for namespace
- changes to the encoding/decoding routines in camel-mime-utils.c
-
-2003-08-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-parser.[c,h]: s/HSCAN_/CAMEL_MIME_PARSER_STATE_/g and
- s/_header_state/_camel_mime_parser_state/g
-
- * camel-filter-driver.c: Same.
-
- * camel-folder-summary.c: Here too.
-
- * camel-http-stream.c: And here.
-
- * camel-mime-message.c: ...
-
- * camel-mime-part-utils.c: ...
-
- * camel-mime-part.c: ...
-
- * camel-movemail.c: ...
-
- * camel-multipart-signed.c: ...
-
- * camel-multipart.c: ...
-
- * providers/local/camel-mbox-folder.c: ...
-
- * providers/local/camel-mbox-summary.c: ...
-
- * providers/local/camel-mh-summary.c: ...
-
- * providers/nntp/camel-nntp-summary.c: ...
-
- * providers/pop3/camel-pop3-folder.c: ...
-
-2003-08-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.[c,h]: Namespaced.
-
- * camel-data-wrapper.c: updated for namespace changed made to
- camel-mime-utils.[c,h]
-
- * camel-digest-folder.c: updated for namespace changed made to
- camel-mime-utils.[c,h]
-
- * camel-filter-driver.c: updated for namespace changed made to
- camel-mime-utils.[c,h]
-
- * camel-filter-search.c: updated for namespace changed made to
- camel-mime-utils.[c,h]
-
- * camel-folder-search.c: updated for namespace changed made to
- camel-mime-utils.[c,h]
-
- * camel-folder-summary.[c,h]: updated for namespace changed made
- to camel-mime-utils.[c,h]
-
- * camel-http-stream.c: updated for namespace changed made to
- camel-mime-utils.[c,h]
-
- * camel-http-stream.h: updated for namespace changed made to
- camel-mime-utils.[c,h]
-
- * camel-internet-address.c: updated for namespace changed made to
- camel-mime-utils.[c,h]
-
- * camel-medium.[c,h]: updated for namespace changed made to
- camel-mime-utils.[c,h]
-
- * camel-mime-message.c: updated for namespace changed made to
- camel-mime-utils.[c,h]
-
- * camel-mime-parser.[c,h]: updated for namespace changed made to
- camel-mime-utils.[c,h]
-
- * camel-mime-part-utils.c: updated for namespace changed made to
- camel-mime-utils.[c,h]
-
- * camel-mime-part.[c,h]: updated for namespace changed made to
- camel-mime-utils.[c,h]
-
- * camel-movemail.c: updated for namespace changed made to
- camel-mime-utils.[c,h]
-
- * camel-multipart-encrypted.c: updated for namespace changed made
- to camel-mime-utils.[c,h]
-
- * camel-multipart-signed.c: updated for namespace changed made to
- camel-mime-utils.[c,h]
-
- * camel-multipart.c: updated for namespace changed made to
- camel-mime-utils.[c,h]
-
- * camel-search-private.[c,h]: updated for namespace changed made
- to camel-mime-utils.[c,h]
-
- * camel-types.h: updated for namespace changed made to
- camel-mime-utils.[c,h]
-
- * providers/imap/camel-imap-folder.c: updated for namespace
- changed made to camel-mime-utils.[c,h]
-
- * providers/imap/camel-imap-store-summary.c: updated for namespace
- changed made to camel-mime-utils.[c,h]
-
- * providers/imap/camel-imap-utils.c: updated for namespace changed
- made to camel-mime-utils.[c,h]
-
- * providers/imapp/camel-imapp-utils.[c,h]: updated for namespace
- changed made to camel-mime-utils.[c,h]
-
- * providers/local/camel-local-summary.[c,h]: updated for namespace
- changed made to camel-mime-utils.[c,h]
-
- * providers/local/camel-maildir-summary.c: updated for namespace
- changed made to camel-mime-utils.[c,h]
-
- * providers/local/camel-mbox-summary.c: updated for namespace
- changed made to camel-mime-utils.[c,h]
-
- * providers/local/camel-spool-summary.h: updated for namespace
- changed made to camel-mime-utils.[c,h]
-
- * providers/nntp/camel-nntp-summary.c: updated for namespace
- changed made to camel-mime-utils.[c,h]
-
- * providers/nntp/camel-nntp-utils.c: updated for namespace changed
- made to camel-mime-utils.[c,h]
-
- * providers/pop3/camel-pop3-folder.c: updated for namespace
- changed made to camel-mime-utils.[c,h]
-
- * providers/sendmail/camel-sendmail-transport.c: updated for
- namespace changed made to camel-mime-utils.[c,h]
-
- * providers/smtp/camel-smtp-transport.c: updated for namespace
- changed made to camel-mime-utils.[c,h]
-
-2003-09-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/local/camel-mbox-folder.c
- (camel_mbox_folder_get_full_path): Implement a temp hack so trunk
- works until we merge in new-ui-branch.
-
- * camel-stream-filter.c (do_flush): Don't warning about how we
- haven't written anything to the stream, this is not an
- error. fflush() doesn't care if you try to fflush() a stream
- without writing to it, so we shouldn't care either.
-
-2003-09-15 Not Zed <NotZed@Ximian.com>
-
- * providers/imapp/camel-imapp-store.c (store_resp_list)
- (imap_login, try_sasl, imap_try_authenticate): removed dead code.
-
- * providers/imapp/camel-imapp-stream.c: return -1 if stream not
- set.
-
- * providers/imapp/camel-imapp-engine.c (iterate_completion): put
- done request on the done queue, so all requests are always
- somewhere.
- (camel_imapp_engine_command_free): just spit warnings of active
- messages being freed, but abort if the item isn't in any list.
- Also remove the node from its list before going on.
- (iterate_untagged, iterate_continuation, iterate_completion):
- staticifiy.
-
- * providers/imapp/camel-imapp-provider.c
- (camel_imapp_module_init): move camel_exception_setup call here.
-
- * providers/imapp/camel-imapp-driver.c
- (camel_imapp_driver_get_type): remove execption setup here, it
- isn't early enough.
- (camel_imapp_driver_list): handle exceptions.
-
-2003-09-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/local/camel-mbox-folder.c
- (camel_mbox_folder_get_full_path): Implements
- CamelLocalFolder::get_full_path() (publicly namespaced so that
- CamelMboxStore can re-use them).
- (camel_mbox_folder_get_meta_path): Same.
-
- * providers/local/camel-mbox-store.c (get_folder): Changed the way
- the path is constructed, since we now handle subdirectories and
- stuff.
- (delete_folder): Try deleting the Folder.sbd directory. We also
- need to manage our own meta files since CamelLocalStore's impl
- constructs paths differently than what we need.
- (create_folder): Implemented.
- (rename_folder): Implemented.
- (scan_dir): Scan an mbox tree
- (get_folder_info): Implemented using scan_dir().
-
- * providers/local/camel-local-store.c (delete_folder): Set fi->url
- to the correct value, meaning we need to prefix it with the
- protocol and the folder_name is not actually part of the path, it
- is a separate component to the url.
-
- * providers/local/camel-local-folder.c
- (camel_local_folder_construct): Use the new class virtual method
- to construct the full folder path and all the meta files.
- (local_get_full_path): Implemented default get_full_path method.
- (local_get_meta_path): Implemented default get_meta_path method.
-
-2003-09-11 Dan Winship <danw@ximian.com>
-
- * Makefile.am (noinst_LTLIBRARIES): Remove libcamel-static.la
-
-2003-09-05 Not Zed <NotZed@Ximian.com>
-
- * providers/imap/camel-imap-store.c (imap_noop): call
- camel_folder_sync bypassing the folder lock. See
- imap_store_refresh_folders too.
-
-2003-09-04 David Woodhouse <dwmw2@infradead.org>
-
- * providers/camel-imap-store.[ch]: Add PREAUTH handling and
- pine/mutt/etpan/etc.-style 'ssh <mailhost> exec imapd' support.
-
-2003-09-03 David Woodhouse <dwmw2@infradead.org>
-
- * camel-stream-process.[ch]: New stream implementation for running
- commands.
- * Makefile.am: Compile the above
-
-2003-08-20 Not Zed <NotZed@Ximian.com>
-
- ** See bug #47765.
-
- * camel-folder-search.h: Removed match1 member.
-
- * camel-folder-search.c (camel_folder_search_match_expression):
- use current directly rather than match1. This method isn't used
- anywhere anyway.
- (search_not): remove match1 stuff.
- (search_match_all): properly handle the match-all against 1
- message as a scalar result, not an array result.
-
-2003-09-03 Not Zed <NotZed@Ximian.com>
-
- * camel-http-stream.c (camel_http_stream_set_proxy): handle NULL
- proxy_url - unset the proxy.
-
-2003-08-29 Not Zed <NotZed@Ximian.com>
-
- * camel-object.c (camel_object_state_write):
- (cobject_getv):
- (cobject_setv, cobject_state_read, cobject_state_read)
- (cobject_state_write): removed debug printfs.
-
- * providers/local/camel-local-folder.c (local_getv): Need to copy
- the local properties list before passing it out, since it's freed.
-
-2003-08-27 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-local-folder.c (local_getv): implement
- PERSISTENT_PROPERTIES, for index mode.
-
- * camel-object.c (cobject_state_read): Also add property reading,
- and bump version to 1.
- (cobject_state_write): add persistent property writing.
-
-2003-08-26 Not Zed <NotZed@Ximian.com>
-
- * camel-folder.c (folder_getv): chain up properly.
-
- * camel-file-utils.c (camel_file_util_savename): helper to create
- a .#filename filename.
-
- * providers/local/camel-local-folder.c
- (camel_local_folder_construct): init meta-data for local folders.
- (local_getv): chain up properly, if args are not processed, rather
- than don't if they aren't.
-
-2003-08-23 Not Zed <NotZed@Ximian.com>
-
- * camel-object.c (cobject_class_init): added a new event,
- meta_changed.
- (camel_object_meta_set, camel_object_meta_get): meta-data api.
- (camel_object_free_hooks): Free meta-data if it is set on the
- object.
-
- * providers/local/camel-local-folder.c
- (camel_local_folder_get_type): setup a property list for local
- folders, just 'index_body' at present.
-
-2003-08-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-filter-driver.c (pipe_to_system): Added some more error
- checking for reading/writing to the pipes. Fixes bug #47880.
-
-2003-08-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-data-wrapper.c (decode_to_stream): Don't poke
- wrapper->stream directly, use camel_data_wrapper_write_to_stream()
- instead as this simplifies things and makes the imap data wrapper
- implementation Just Work (tm).
-
- * providers/imap/camel-imap-wrapper.c: changed prototype of
- write_to_stream() to return ssize_t.
-
-2003-08-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-wrapper.c (imap_wrapper_hydrate): Make
- sure to ref the stream. Fixes bug #47749.
-
-2003-08-18 Not Zed <NotZed@Ximian.com>
-
- * camel-http-stream.c: Various fixes to make it work.
-
- * tests/smime/pgp-mime.c (main): added missing 'ret' variable.
-
- * providers/smtp/camel-smtp-transport.c (connect_to_server):
- * providers/imapp/camel-imapp-store.c (connect_to_server:
- * providers/imap/camel-imap-store.c (connect_to_server):
- * providers/pop3/camel-pop3-store.c (connect_to_server):
- * camel-http-stream.c (http_connect): change service->session for
- tcp_stream_ssl_new.
-
- * camel-tcp-stream-ssl.c: Changed service to session, and fix some
- refcounting of it.
- include camel-operation.h
-
-2003-08-15 Not Zed <NotZed@Ximian.com>
-
- ** See bug #47634.
-
- * tests/lib/messages.c (test_message_compare): check
- write_to_stream returns.
- (message_dump_rec): helper to dump message structure.
-
- * camel-mime-part-utils.c
- (simple_data_wrapper_construct_from_parser): dont set content
- encoding here.
- (camel_mime_part_construct_content_from_parser): set it here
- instead, on every part. basically same as setting the
- mime_type_field always.
-
- * camel-multipart-signed.c (camel_multipart_signed_class_init):
- * camel-mime-message.c (camel_mime_message_class_init):
- * camel-multipart.c (camel_multipart_class_init): override
- decode_to_stream to always do the same as write_to_stream, since
- we can never be encoded.
-
-2003-08-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-wrapper.c (imap_wrapper_hydrate):
- Don't attach any filters to decode base64/qp/etc.
-
-2003-08-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-part.c (write_to_stream): Save errno when
- flushing/unreffing the filter stream.
-
-2003-08-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-part.c (write_to_stream): If the content is
- base64/qp/uu/etc encoded but the part is 7bit/8bit/(or otherwise
- non-encoded), set reencode to TRUE so that we decode the original
- content stream. Fixes a bug noticed on
- evolution-patches@ximian.com where a patch had a
- Content-Transfer-Encoding of 7bit but was base64 encoded.
-
-2003-08-13 Not Zed <NotZed@Ximian.com>
-
- * camel-folder-summary.c (camel_folder_summary_remove_range): Fix
- the range check, we were stopping removal of 1 or 2 removals, for
- some odd and completely uncomprehensible reason. Perhaps debug
- left in?
-
-2003-08-13 Not Zed <NotZed@Ximian.com>
-
- ** See bug #47517.
-
- * camel-vee-folder.c (vee_sync): Always rebuild folder on any
- sync, not just expunge ones.
-
-2003-08-11 Not Zed <NotZed@Ximian.com>
-
- * providers/imapp/camel-imapp-store.c (imap_get_folder_info):
- force connect manually so basics work.
-
- ** See bug #45505.
-
- * camel-service.c (camel_gethostbyname): duh, pthread_create
- returns the error code directly, not via errno.
- (camel_gethostbyaddr): Same, also properly handle the failure
- case.
-
-2003-08-01 Not Zed <NotZed@Ximian.com>
-
- ** See bug #47208.
-
- * camel-filter-search.c (match_all): match-all with no arguments
- should always return TRUE.
-
- * camel-folder-search.c (camel_folder_search_execute_expression):
- print a warning when we get an invalid result type & fixed a leak
- for that case.
-
-2003-08-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * tests/message/test4.c: New test suite for the mime parser (which
- is where the below 2 fixes were noticed).
-
- * camel-mime-parser.c (folder_boundary_check): Calculate 'len' by
- subtracting the boundary start from inend rather than 'atleast'.
- (folder_scan_content): Calculate 'inend' differently depending on
- the EOF state.
-
-2003-08-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-filter-tohtml.c (html_convert): Rather than checking
- *inptr == '\n', check inptr >= inend - this gets rid of an Invalid
- Read report from valgrind.
-
- * camel-mime-part.c (write_to_stream): Don't necessarily re-encode
- just because the encodings differ. Need to look into making it so
- that message/rfc822 and multipart parts ignore the
- Content-Transfer-Encoding header and just keep their 'encoding'
- bits set to DEFAULT.
-
-2003-08-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-folder.c (get_content): Updated.
-
- * camel-mime-message.c (camel_mime_message_init): Don't override
- the mime_type here.
- (process_header): Updated to use CamelDataWrapper's mime_type
- field.
- (find_best_encoding): Same.
- (best_encoding): Here too.
-
- * camel-digest-folder.c (camel_digest_folder_new): Updated for
- CamelMimePart::content_type change.
-
- * camel-mime-part.c (camel_mime_part_init): Override our parent
- class's default mime_type.
- (camel_mime_part_finalize): Don't need to unref the content_type
- anymore.
- (process_header): Updated to use CamelDataWrapper's mime_type
- field.
- (camel_mime_part_set_filename): Same.
- (camel_mime_part_get_filename): Same.
- (camel_mime_part_get_content_type): Same.
- (set_content_object): Here too.
- (write_to_stream): Updated.
- (construct_from_parser): Updated.
-
- * camel-mime-part.h: Remove the content_type field.
-
-2003-07-31 Jeffrey Stedfast <fejj@ximian.com>
-
- * tests/lib/messages.c (test_message_compare_content): If the
- chunks differ, perform a hexdump on the data being compared so
- that we may analyse it easier.
-
- * camel-multipart-signed.c (write_to_stream): Return ssize_t.
-
- * camel-mime-utils.h: Added the CamelMimePartEncodingType enum
- here.
-
- * camel-mime-part.h: Removed the CamelMimePartEncodingType enum
- from here.
-
- * camel-mime-part.c (write_to_stream): Updated to return
- ssize_t. Also minor changes to only re-encode the content stream
- if the charset or encoding changed (this way we write it out in
- the original raw form if nothing changed).
-
- * camel-mime-part-utils.c
- (simple_data_wrapper_construct_from_parser): Drastically
- simplify. We no longer scan html content to try and find the
- charset, nor do we care about converting the content to UTF-8 and
- handling broken windows charsets.
-
- * camel-mime-message.c (find_best_encoding): Use
- decode_to_stream() here. Also updated to not assume the content
- charset is UTF-8 since it is very likely not the case anymore
- since data-wrappers no longer are converted to UTF-8 at parse
- time.
-
- * camel-folder-summary.c (summary_build_content_info_message): Use
- decode_to_stream instead here too.
-
- * camel-folder-search.c (match_words_1message): Use
- decode_to_stream instead of write_to_stream so we can search the
- contents.
-
- * camel-data-wrapper.c (camel_data_wrapper_init): Set the default
- encoding to DEFAULT.
- (write_to_stream): Updated to return ssize_t
- (camel_data_wrapper_decode_to_stream): New virtual function to
- decode a data wrapper to a stream (results in nearly identical
- behaviour to the old write_to_stream method).
- (decode_to_stream): Default implementation of above virtual
- method. Decodes base64/qp/etc streams.
-
- * camel-data-wrapper.h: Removed the rawtext bit and added an
- encoding member.
-
-2003-08-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * tests/smime/pgp-mime.c: Same.
-
- * tests/smime/pgp.c: Updated to build and to import some custom
- gpg keys for use with testing.
-
-2003-07-30 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-message.c (write_to_stream): Also updated.
-
- * camel-data-wrapper.c (write_to_stream): This should return ssize_t
-
- * camel-multipart-signed.c (write_to_stream): Updated.
-
- * camel-multipart.c (write_to_stream): Same.
-
- * camel-mime-part.c (write_to_stream): Here too.
-
-2003-07-11 Suresh Chandrasekharan <suresh.chandrasekharan@sun.com>
-
- * camel-iconv.c: Fix for #46168 'some additional locale aliases
- required for chinese support'.
-
-2003-07-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.c (header_decode_word): Revert NotZed's fix for
- bug #42170 - this causes even more problems than it solves. See
- bug #46331 for info. Basically, each address header would be
- converted to UTF-8 twice which means no raw 8bit address header
- would render correctly.
- (header_decode_mailbox): Perform a sanity check on the resultant
- addr->str to make sure that it is valid UTF-8, if not convert it
- to UTF-8. Fixes bug #42170.
-
-2003-07-23 Ettore Perazzoli <ettore@ximian.com>
-
- * camel-provider.c (camel_provider_init): Print the provider
- directory as well, for debugging.
-
-2003-07-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-message.c (find_best_encoding): Revert my previous
- changes to this function.
-
- * camel-mime-utils.h: Revert previous changes.
-
- * camel-mime-part.h: Revert previous changes.
-
- * camel-mime-part-utils.c: Revert previous changes.
-
- * camel-data-wrapper.c (camel_data_wrapper_init): Revert previous
- changes.
- (write_to_stream): Revert previous changes.
-
-2003-07-23 Dan Winship <danw@ximian.com>
-
- * camel-block-file.c: #include camel-file-utils.h for camel_read()
-
- * camel-uid-cache.c (camel_uid_cache_save): Remove unused variable
- and label.
-
- * camel-url.c: #include camel-string-utils.h for camel_strdown
-
- * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): Cast
- an (unsigned char *) to (char *) to fix a warning
-
-2003-07-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-message.c (find_best_encoding): Updated to convert
- to/from the correct charset (since content is no longer
- necessarily in UTF-8).
- (best_encoding): Free the charset string when we're done with it.
-
- * camel-stream-fs.c (stream_read): Increment the seekable stream
- position by the number of bytes read. Oops.
- (stream_write): Same here.
-
-2003-07-17 Timo Sirainen <tss@iki.fi>
-
- ** See bug #42573
-
- * providers/imap/camel-imap-folder.c (do_append): Only free the
- response after we have finished the literal request, otherwise we
- could try processing folder updates incorrectly.
-
-2003-07-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.h: Add the CamelMimePartEncodingType definition
- here.
-
- * camel-mime-part.h: Remove the CamelMimePartEncodingType
- definition.
-
- * camel-mime-part-utils.c
- (simple_data_wrapper_construct_from_parser): Don't do any of the
- auto-detection we used to do here anymore. Just read the content
- into a memory buffer and record the encoding type.
- (camel_mime_part_construct_content_from_parser): Don't mangle the
- Content-Type struct here anymore.
-
- * camel-data-wrapper.c (camel_data_wrapper_init): Init encoding to
- DEFAULT.
- (write_to_stream): If the stream needs to be decoded, decode it.
-
-2003-07-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-stream-fs.c (stream_read): If we read 0 bytes, then set
- eos to TRUE.
-
-2003-07-09 Jeffrey Stedfast <fejj@ximian.com>
-
- Get rid of the #ifdef ENABLE_THREADS since we no longer plan to
- support/maintain this.
-
- * providers/nntp/camel-nntp-store.c: Here.
-
- * providers/nntp/camel-nntp-newsrc.c: And here.
-
- * providers/nntp/camel-nntp-folder.c: Same.
-
- * providers/local/camel-local-folder.c: And here.
-
- * camel-block-file.c: Here too.
-
- * camel.c: Same.
-
- * camel-certdb.c: Here too.
-
- * camel-charset-map.c: And here.
-
- * camel-cipher-context.c: "
-
- * camel-data-wrapper.c: "
-
- * camel-digest-folder.c: "
-
- * camel-exception.c: "
-
- * camel-folder.c: "
-
- * camel-folder-summary.c: "
-
- * camel-lock-client.c: "
-
- * camel-mime-utils.c: "
-
- * camel-object.c: "
-
- * camel-operation.c: "
-
- * camel-partition-table.c: "
-
- * camel-sasl-popb4smtp.c: "
-
- * camel-service.c: "
-
- * camel-session.c: "
-
- * camel-store.c: "
-
- * camel-store-summary.c: "
-
- * camel-text-index.c: "
-
- * camel-transport.c: "
-
- * camel-vee-folder.c: "
-
- * camel-tcp-stream-openssl.c: Removed pthread.h, it isn't needed.
-
-2003-07-09 Larry Ewing <lewing@ximian.com>
-
- * camel.h: remove reference to camel-pgp-mime.h
-
-2003-07-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-pgp-mime.[c,h]: Removed.
-
- * camel-iconv.c: Updated (new copy/paste from e-iconv).
-
- * camel-block-file.c (camel_block_file_get_block): Use
- camel_read() rather than libc read.
-
- * camel-tcp-stream-raw.c (stream_read): Use camel_read().
- (stream_write): Use camel_write().
-
- * camel-stream-fs.c (stream_read): Use camel_read().
- (stream_write): Use camel_write().
-
-2003-07-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new): Use
- camel_mkdir().
-
- * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Use
- camel_mkdir().
-
- * camel-session.c (get_storage_path): Use camel_mkdir().
-
- * camel-store.c (camel_mkdir_hier): Removed.
-
- * camel-data-cache.c (camel_data_cache_new): Updated to use
- camel_mkdir().
- (data_cache_path): Same.
-
- * camel-file-utils.c (camel_mkdir): Renamed and documented.
- (camel_file_util_safe_filename): Documented.
- (camel_read): Moved here from camel-io.c
- (camel_write): Same.
-
- * camel-io.[c,h]: Removed.
-
- * camel-uid-cache.c (camel_uid_cache_new): Use the
- camel-file-utils.c version of mkdir.
-
-2003-07-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-session.c (camel_session_init): Updated for string-utils
- namespace changes.
-
- * camel-provider.c: Updated for string-utils namespace changes.
-
- * camel-mime-part.c (init_header_name_table): Updated for
- string-utils namespace changes.
-
- * camel-mime-message.c (camel_mime_message_class_init): Updated
- for string-utils namespace changes.
- (camel_mime_message_init): Same.
-
- * camel-mime-filter-enriched.c
- (camel_mime_filter_enriched_class_init): Updated for string-utils
- namespace changes.
-
- * camel-folder-summary.c (camel_folder_summary_init): Updated for
- string-utils namespace changes.
-
- * camel-string-utils.[c,h]: Renamed from string-utils.[c,h] and
- also namespaced all functions.
-
-2003-07-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-sasl-digest-md5.c (digest_response): Don't quote the
- charset value, the qop value, nor the response value. Fixes bug
- #45712.
-
-2003-07-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.c (header_format_date): Use gmtime_r() instead
- of using gmtime() and memcpy() to try and be "atomic".
-
-2003-06-30 Dan Winship <danw@ximian.com>
-
- * camel-folder-search.c (camel_folder_search_finalize): free the
- summary hash
-
-2003-06-24 David Woodhouse <dwmw2@infradead.org>
-
- * camel-mime-utils.c (header_format_date): Put day of week into
- outgoing email.
-
-
-2003-06-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-folder-summary.h: Added prototype for
- camel_folder_summary_remove_range().
-
-2003-06-25 Not Zed <NotZed@Ximian.com>
-
- ** See bug #45386
-
- * camel-service.c (camel_gethostbyname, camel_gethostbyaddr): Make
- sure we have an exception that we test against.
-
-2003-06-20 Not Zed <NotZed@Ximian.com>
-
- ** See bug #43887
-
- * camel-mime-filter-enriched.c (camel_enriched_to_html): simple
- wrapper to convert enriched to html in one go.
-
-2003-06-18 Not Zed <NotZed@Ximian.com>
-
- * camel-service.c (get_hostbyaddr, get_hostbyname): if we got
- cancelled, the message is floating, so free it.
- (struct _lookup_msg): Add a cancelled tag.
- (camel_gethostbyname, camel_gethostbyaddr): if we get a
- failure/cancel, cancel the lookup thread and detach, so we dont
- have to wait for it to return. cleanup changed to handle the case
- where we didn't get a reply message.
-
-2003-06-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/pop3/camel-pop3-folder.c (pop3_finalize): Made static
- (to match the prototype).
-
-2003-06-13 Larry Ewing <lewing@ximian.com>
-
- * camel-folder-thread.c (camel_folder_thread_messages_apply):
- don't leak the summary when reloading it. Fixes a very large
- leak.
-
-2003-06-17 Not Zed <NotZed@Ximian.com>
-
- * camel-vee-folder.c (vee_folder_remove_folder): Calculate ranges
- to remove folder info's more efficiently. affects shutdown
- performance on big vfolders signifinantly.
- (vee_folder_build_folder): do the same here, when rebuilding a
- folder's definition.
-
- * camel-folder-summary.c (camel_folder_summary_remove_index): new
- function to drop a range of index entries in one hit.
-
-2003-06-16 Not Zed <NotZed@Ximian.com>
-
- ** See bug #31745
-
- * providers/imap/camel-imap-store-summary.c
- (camel_imap_store_summary_namespace_new): Workaround a shell bug -
- if the namespace has '#' in it, then strip it.
-
-2003-06-16 Not Zed <NotZed@Ximian.com>
-
- ** See bug #44322
-
- * providers/imap/camel-imap-command.c (imap_command_strdup_vprintf):
- If we are outputting a folder name, make sure we calculate buffer
- size based on the raw/utf7 version
-
- ** See bug #44121
-
- * camel-multipart-signed.c (signed_get_part): If we can't parse
- the content, but we have a stream, just use that as the content.
-
-2003-06-05 Jeffrey Stedfast <fejj@ximian.com>
-
- Fix for bug #40788.
-
- * providers/pop3/camel-pop3-engine.c (camel_pop3_engine_new): Now
- takes a flags argument. Currently there is only 1 flag which can
- be used to disable Pop3 server extensions.
- (get_capabilities): Don't check for Pop3 server extensions if the
- DISABLE_EXTENSIONS flag is set on the engine.
- (camel_pop3_engine_iterate): If we get a response that is neither
- +OK nor -ERR, default to treating it like a -ERR.
-
- * providers/pop3/camel-pop3-store.c (connect_to_server): Check for
- the disable_extensions param.
-
- * providers/pop3/camel-pop3-provider.c: Define a checkbox to
- disable all POP3 extension support.
-
-2003-06-11 Jeffrey Stedfast <fejj@ximian.com>
-
- Partial fix for bug #44457.
-
- * camel-mime-part-utils.c
- (simple_data_wrapper_construct_from_parser): Make sure to set
- rawtext to FALSE if we successfully convert the text to UTF-8.
-
- * camel-data-wrapper.c (camel_data_wrapper_init): Default the
- value of rawtext to TRUE instead of FALSE. This way if the mailer
- decides to try displaying a non-textual part as text, it knows
- that it needs to convert the content to UTF-8.
-
-2003-06-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-uid-cache.c (camel_uid_cache_new): Create the directory
- with mode 0777 and the cache file itself with mode 0666. Let the
- user's umask filter the permissions. Instead of saving the fd on
- the Cache object, instead save the filename. Use camel_read()
- instead of expecting read() to just always work without getting an
- EINTR/etc.
- (maybe_write_uid): Don't do anything if cache->fd == -1, this
- means an error has occured in a previous callback. Replace the 2
- calls to write() with camel_write() and check their return
- values. If either of them fails, set cache->fd to -1 (GHashTable
- doesn't give us a way to abort foreach'ing thru the table).
- (camel_uid_cache_save): Save to a temp file instead of overwriting
- the original. Do proper error checking, etc. Also added some
- smarts about whether to try and overwrite the old cache even if we
- haven't successfully saved all the uids in the cache.
- (camel_uid_cache_destroy): Free the cache->filename, no longer
- need to close (cache->fd).
-
-2003-06-11 Larry Ewing <lewing@ximian.com>
-
- * camel-text-index.c (text_index_normalise): use g_utf8_strdown
- properly.
-
-2003-06-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-message.c (find_best_encoding): Add the
- CAMEL_BESTENC_TEXT bit to enctype if the part is a text part.
-
- * camel-mime-filter-bestenc.c
- (camel_mime_filter_bestenc_get_best_encoding): If we have any
- nul-bytes or if the content is non-text and contains any 8bit
- octets, we need to use base64. Fixes bug #44344.
diff --git a/camel/ChangeLog.pre-1-4 b/camel/ChangeLog.pre-1-4
deleted file mode 100644
index 7ea58c89d4..0000000000
--- a/camel/ChangeLog.pre-1-4
+++ /dev/null
@@ -1,22083 +0,0 @@
-2003-06-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * broken-date-parser.c (d): Turn off debugging.
-
- * providers/pop3/camel-pop3-engine.c (get_capabilities): Move the
- code that prepends the 'password' authtype to the auth list so
- that we don't add it again when regetting the capabilities.
-
-2003-05-30 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-filter-driver.c (run_only_once): Turned off a debugging
- printf.
-
-2003-05-27 Jeffrey Stedfast <fejj@ximian.com>
-
- This should finish fixing all variations of bug #42854, which,
- funnily enough specified "copying" as the scenario for reproducing
- this bug, but somehow I found/fixed it only for expunging for some
- reason? I can't even guess as to how this happened. Oh well,
- expunging needed fixing either way.
-
- * providers/imap/camel-imap-folder.c (imap_transfer_online): Sort
- the uids here too (just like I had fixed for expunge a week or so
- ago).
- (imap_transfer_resyncing): Sort them here too.
- (imap_search_by_uids): Sort here too, even though I don't think it
- is necessary. Can't hurt.
- (imap_expunge_uids_offline): Might as well sort here too.
-
-2003-05-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-object.c (camel_object_bag_destroy): Lets try this
- again. We don't actually want to free the key here, because
- camel_object_bag_remove() does that for us. This should fix bug
- #43406 properly.
-
-2003-05-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-object.c (camel_object_bag_destroy): Create a second
- GPtrArray for the keys. We don't want to use bag->free_key() on
- the object. Fixes bug #43406.
-
-2003-05-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-folder-summary.c (camel_folder_summary_load): Only display
- a warning if errno != EINVAL (EINVAL means there was a version
- mismatch, so we don't really need to warn here since we are
- supposed to be able to handle this situation).
- (perform_content_info_load): Turn off debugging message.
- (summary_assign_uid): Turn off uid-clash warning.
- (camel_folder_summary_decode_token): Turn off debug messages.
- (summary_header_load): Turn off version-mismatch warning.
-
-2003-05-16 Jeremy Katz <katzj@redhat.com>
-
- * providers/smtp/camel-smtp-transport.c (smtp_helo): Ensure cmdbuf
- is initialized to avoid compiler warning.
-
- * providers/local/camel-mbox-summary.c (summary_header_load): Cast
- folder_size to uint32 to fix warning.
- (camel_mbox_summary_sync_mbox): Update for new API.
-
- * providers/imap/camel-imap-utils.c (parse_params):
- imap_parse_nstring expects size_t, not int
- (imap_body_decode): Likewise.
-
- * camel-stream-filter.c (do_read): presize needs to be size_t
- instead of int.
- (do_write): Likewise.
-
- * camel-seekable-substream.c (stream_read): Return ssize_t instead
- of int to match prototypes.
- (stream_write): Likewise.
-
- * camel-mime-part.c (construct_from_parser): len needs to be
- size_t instead of int.
-
- * camel-mime-parser.c (folder_scan_step): datalength needs to be a
- size_t* instead of an int* to make dependent APIs safe.
- (camel_mime_parser_step): Likewise.
- (folder_scan_content): Likewise.
- * camel-mime-parser.h: Likewise.
-
- * camel-mime-message.c (camel_mime_message_class_init): Use glib
- macro for pointer/int conversions.
- (construct_from_parser): Update for new API.
-
- * camel-folder-summary.c
- (camel_folder_summary_info_new_from_parser): Update len to be
- size_t for new API.
- (summary_build_content_info): Likewise.
- * camel-http-stream.c (http_get_headers): Likewise.
- * camel-mime-part-utils.c
- (simple_data_wrapper_construct_from_parser): Likewise.
- * camel-multipart-signed.c (signed_construct_from_parser): Likewise.
- * camel-multipart.c (construct_from_parser): Likewise.
-
- * camel-folder-search.c (match_words_index): Use glib macros for
- pointer/int conversions.
- * camel-html-parser.c (tokenise_setup): Likewise.
- (convert_entity): Likewise.
- * camel-block-file.c (block_hash_func): Likewise.
- (camel_block_file_get_block): Likewise.
- (camel_block_file_get_block): Likewise.
- (camel_block_file_detach_block): Likewise.
- * camel-session.c (session_thread_msg_new): Likewise.
- (session_thread_msg_free): Likewise.
- (session_thread_wait): Likewise.
- * camel-text-index.c (text_index_compress_nosync): Likewise.
- (text_index_compress_nosync): Likewise.
- (camel_text_index_validate): Likewise.
- * camel-vee-folder.c (vee_folder_remove_folder): Likewise.
- (unmatched_check_uid): Likewise.
- (folder_added_uid): Likewise.
- (vee_folder_build_folder): Likewise.
- (folder_changed_add_uid): Likewise.
- (folder_changed_remove_uid): Likewise.
- * providers/imap/camel-imap-search.c (imap_body_contains): Likewise.
- * providers/pop3/camel-pop3-folder.c (cmd_list): Likewise.
- (cmd_uidl): Likewise.
-
- * camel-data-cache.c (data_cache_init): Cast to CamelCopyFunc.
- Fixes a warning.
-
-2003-05-15 Not Zed <NotZed@Ximian.com>
-
- * camel-mime-utils.c (header_decode_word): Simplistic quick-fix
- for #42710. Add a charset argument. If the data is 8 bit, try to
- decode into the passed in charset (i.e. the message header?), at
- worst, fall back to latin1, similarly to header_decode_text.
- Fixed all callers to pass in a charset if available, or NULL.
-
-2003-05-14 Not Zed <NotZed@Ximian.com>
-
- ** See bug #42540
-
- * camel-service.c (camel_gethostbyname): pre-initialise the error
- return to invalid, so if we cancel, we definetly get a bad result.
- Also, for a valid return against result, not herr.
- (camel_gethostbyaddr): Likewise.
-
-2003-05-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/local/camel-local-folder.c (local_delete): Only delete
- the index if it is non-NULL. Fixes bug #42763.
-
-2003-05-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-utils.c (imap_uid_array_to_set): Added
- a note to the comment block for this function noting that uids
- MUST be in sorted order.
-
- * providers/imap/camel-imap-folder.c (imap_expunge_uids_online):
- Sort the uids before splitting them into UID set chunks. The code
- that splits the uid array into sets expects the uids to be in
- sorted order. Fixes bug #42854.
-
- * providers/imap/camel-imap-command.c (imap_command_start):
- Re-enable camel_verbose_debug logging.
-
-2003-05-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/smtp/camel-smtp-transport.c (smtp_helo): If
- host->h_name is NULL or an empty string, default back to using the
- IP address rather than the hostname in the EHLO command.
-
-2003-05-13 Ettore Perazzoli <ettore@ximian.com>
-
- * providers/imap/camel-imap-folder.c (d): Disable debugging.
-
- * providers/imap/camel-imap-command.c (d): Disable debugging.
-
- * providers/imap/camel-imap-search.c (d): Disable debugging.
-
-2003-05-02 Dan Winship <danw@ximian.com>
-
- * camel-mime-part-utils.c
- (simple_data_wrapper_construct_from_parser): Don't call
- g_utf8_validate on an empty message. Fixes a warning.
-
-2003-05-01 Jeffrey Stedfast <fejj@ximian.com>
-
- Workaround for POS mailers like the one in bug #42045.
-
- * camel-mime-utils.c (header_decode_date): Make sure the numeric
- timezone is between -1200 and 1200, otherwise it is invalid.
-
- * broken-date-parser.c (get_tzone): Make sure the numeric timezone
- is between -1200 and 1200, otherwise it is invalid.
-
-2003-04-29 Dan Winship <danw@ximian.com>
-
- * Makefile.am (camel_lock_helper_SOURCES): Remove camel-lock.c
- from here because it upsets automake 1.6 for some reason
- (camel_lock_helper_LDADD): Add camel-lock.o here
-
-2003-04-29 Jeremy Katz <katzj@redhat.com>
-
- * providers/imap/camel-imap-folder.c (parse_fetch_response):
- body_len needs to be a size_t instead of int
-
-2003-04-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-utils.c: Disable debugging printfs.
-
- * providers/imap/camel-imap-store.c (imap_connect_online): #if 0
- out some code that parsed the namespaces since the results aren't
- used and they generate debugging output.
-
-2003-04-23 Not Zed <NotZed@Ximian.com>
-
- * providers/smtp/camel-smtp-transport.c (smtp_helo): only free the
- host if it was set. removes a run-time warning.
-
- * camel-session.c (get_service): oops, the service owns the url
- after we construct it.
-
-2003-04-22 Not Zed <NotZed@Ximian.com>
-
- ** Should fix #41629, #41448, et al.
-
- * tests/folder/test10.c: a new torture test for object bag
- creation/unreffing.
-
- * camel-url.c (camel_url_copy): new function to copy a url.
-
- * camel-object.c (camel_object_bag_new): add arguments for key
- copy and key free functions. Fixed all callers.
- (camel_object_bag_destroy): fix a memleak, free the bag key.
- (camel_object_bag_get, camel_object_bag_reserve)
- (camel_object_bag_abort, save_bag, save_object): Make the key a
- void type, rather than char *.
- (camel_object_bag_add): As above, and also copy the key.
- (camel_object_bag_remove_unlocked): free the key using
- bag->free_key.
-
- * camel-session.c (register_provider)
- (camel_session_destroy_provider, get_service): Changed to use an
- object bag instead of a hash table for the service 'cache'.
- (service_cache_remove): Removed, no longer required.
-
-2003-04-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-gpg-context.c (gpg_ctx_parse_status): Don't set seen_eof1
- here anymore once we get a trust metric.
- (gpg_ctx_new): Init seen_eof1 to TRUE here.
- (gpg_ctx_set_ostream): Change seen_eof1 to FALSE here this way we
- only ever have to set this if we are expecting output.
- (gpg_ctx_parse_status): Don't set seen_eof1 for importing either.
- (gpg_ctx_op_step): Only FD_SET() those fd's that we have not yet
- finished reading.
-
-2003-04-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-url-scanner.c (camel_url_web_end): Urls are unlikely to
- end with punctuation or closing braces, so strip any of those off
- the end of the url. Fixes bug #41461.
-
- * tests/mime-filter/data/html.1.out: Removed a trailing \n at the
- end of the file, this is incorrect (since out input file does not
- contain one).
-
- * camel-mime-filter-tohtml.c (html_convert): Only output a <br> if
- we found an eoln in the input. Along the same lines, don't write a
- '\n' to the output buffer unless we've encountered that eoln in
- the input. Fixes bug #41407.
-
-2003-04-17 Not Zed <NotZed@Ximian.com>
-
- ** for #40989
-
- * camel-text-index.c (text_index_delete): delete the block
- file/key file directly, not just its files.
-
- * providers/local/camel-local-folder.c (local_delete): implement,
- just delete the index file if it exists.
- camel-store-delete-folder will delete other data (maybe it all
- should be done here).
-
- * camel-block-file.c (camel_key_file_finalise): keep lock around
- decrementing key file use count.
- (camel_key_file_delete): new function to delete the key file (&
- close it off).
- (key_file_use): if we've been deleted, always fail.
- (camel_block_file_finalise): only close the file if its a valid
- fd.
- (block_file_use): if we've been deleted, always fail.
- (camel_block_file_delete): delete the block file & close.
- (struct _CamelBlockFilePrivate): fix the !ENABLE_THREADS case to
- still compile this.
-
- ** for #41163
-
- * camel-multipart-signed.c (parse_content): Dont assume adding 1
- to line length will go to the next line. e.g. for dos lines that
- end in \r\n. Fix for #41163.
- (parse_boundary): util function to help above.
-
-2003-04-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-gpg-context.c (gpg_verify): The gpg child process exiting
- does not necessarily mean that we've ready everything that we can
- from its pipes, so don't use gpg_ctx_op_exited() as a loop-exit
- condition. If for some reason the gpg child process does exit (due
- to an error), gpg_ctx_op_step() will eventually fail (as soon as
- it has finished reading any data in the pipes) and cause the loop
- to be terminated anyway. This fixes truncation of the gpg --verify
- stderr output that Evolution displays as the "validity report"
- (for lack of a better description).
- (gpg_ctx_op_step): Removed some debugging printf's
- (gpg_ctx_get_diagnostics): Use a bitfield to decide if we've
- already flushed the diagnostics stream, much simpler (plus we have
- plenty of bits to spare so might as well use them).
- (gpg_ctx_new): Fixed another logic bug which determined whether or
- not we should convert the gpg output from the locale charset into
- UTF-8.
-
-2003-04-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/smtp/camel-smtp-transport.c: Turn off debugging if
- CAMEL_VERBOSE_DEBUG isn't set.
-
-2003-04-10 Not Zed <NotZed@Ximian.com>
-
- * tests/mime-filter/data: filter data test cases.
-
- * tests/mime-filter/test-tohtml.c: New test for html filter.
-
- ** See bug #40969
-
- * camel-mime-filter-tohtml.c (html_convert): Change the logic
- slightly, scan a whole line within the main loop.
-
-2003-04-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-gpg-context.c (gpg_ctx_get_utf8_diagnostics): Removed. I
- just realised that we ALWAYS want to get gpg's stderr in UTF-8, so
- the better solution (plus less code duplication) is to just have
- the diagnostics buffer be a CamelStreamMem with a charset filter.
- (gpg_ctx_new): Setup a filter stream to convert our gpg stderr
- diagnostics into UTF-8 if needed.
- (gpg_ctx_free): Unref the diagnostcis stream.
- (gpg_ctx_parse_status): Flush the diagnostics stream if we are
- going to use the data in an exception.
- (gpg_ctx_op_step): Use camel_stream_write() to append to the
- diagnostics stream rather than appending the buffer to a
- GByteArray like we used to do.
- (gpg_ctx_op_step): Flush the diagnostics stream here too.
- (gpg_verify): Use a const char *diagnostics string here, forcing a
- slight rearrangement of calls - use the const char *dignostics
- before we gpg_ctx_free, otherwise we'll be passing free'd memory
- off to the cipher_validity.
- (gpg_ctx_get_diagnostics): Do the work here to flush the
- diagnostics stream and nul-terminate the buffer. Also return const
- now, instead of strdupping. No need for that.
- (gpg_ctx_parse_status): Convert the user hint to UTF-8.
-
-2003-04-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-gpg-context.c (gpg_ctx_get_utf8_diagnostics): Changed my
- mind a bit on how I wanted this to work. Instead of aborting on an
- illegal sequence, do like we do with camel-mime-filter-charset and
- just skip over invalid sequences. Also, in the noop failure case,
- close the iconv_t so we don't leak it.
-
-2003-04-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-utils.c (imap_body_decode): Save the
- content size in a temp variable until after we've successfully
- parsed all of the body_type_1part expr. Also fixed a type-o in the
- body_type_mpart case that caused the parser to fail.
- (imap_parse_body): On failure to parse the body, as we iterate
- through the child nodes, set their children/parent/next nodes to
- NULL so that content_info_free() won't double-free any of the
- other nodes we have already free'd (or are about to free).
-
- * camel-gpg-context.c (gpg_ctx_get_utf8_diagnostics): New function
- to get the UTF-8 version of the diagnostics (if the locale isn't
- already UTF-8 safe).
- (gpg_verify): Use the utf-8 diagnostics here. Also fixed a memleak
- in the exception case.
-
- * camel-mime-filter-charset.c
- (camel_mime_filter_charset_new_convert): NULL-protect the to/from
- charsets in the g_warning call.
-
-2003-04-08 Jeffrey Stedfast <fejj@ximian.com>
-
- Fixes for bug #40778. Probably others as well.
-
- * providers/imap/camel-imap-utils.c (parse_params): Return 0 on
- success, or -1 on fail. The other small utility functions should
- probably do the same, but I was too lazy to fix them. Setting
- inptr to NULL is just lame.
- (imap_body_decode): New function to correctly parse a BODY
- response.
- (imap_parse_body): Rewritten to use the above function.
-
-2003-04-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/smtp/camel-smtp-transport.c (smtp_helo): Make sure
- host->h_name is not an empty string too? Apparently for one user
- his resolved hostname is "". Go figure. Probably a broken system,
- but easy enough to work around.
-
- * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): If
- store->engine->line is NULL, use _("Unknown error") as the error
- string instead.
-
-2003-04-08 Not Zed <NotZed@Ximian.com>
-
- * camel-folder-summary.c (camel_folder_summary_load): use
- g_strerror, and use errno directly rather than ferrno().
- (summary_header_load): set errno when we get a version mismatch.
-
-2003-04-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-gpg-context.c: Disable debug printf's
-
-2003-03-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-sasl-gssapi.c (gssapi_challenge): If we are using the
- heimdal krb5 implementation, don't free outbuf ever. Seems to
- segfault if we do.
-
-2003-03-31 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-filter-enriched.c (enriched_to_html): Use strncasecmp
- for matching the nofill and /nofill tags. Also fixed to handle
- enriched tags that require <param> tags.
-
-2003-03-28 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-spool-store.c (get_folder): remove unused
- var.
-
- * providers/imap/camel-imap-utils.c (imap_parse_list_response):
- moved an unused var to the #if 0'd out block.
-
- * providers/imap/camel-imap-store.c
- (parse_list_response_as_folder_info): remove unused vars.
-
- * camel-index-control.c (main): deifne camel_init() before using
- it.
-
- * camel-vee-store.c (vee_get_folder): removed unused var.
-
- * camel-stream-mem.c (stream_write): warning -> fixme.
-
- * camel-stream-filter.c (_CamelStreamFilterPrivate): Add a ; to
- the end of the struct definition.
-
- * camel-store.c (camel_store_delete_folder): remove unused var.
- (camel_store_rename_folder): "
- (camel_store_unsubscribe_folder): "
-
- * camel-mime-part.c (write_to_stream): Changed warning into a
- TODO.
- (construct_from_parser): removed warning, the code was fixed.
-
- * camel-mime-message.c (construct_from_parser): Remove the
- warning, the code was fixed.
-
- * camel-mime-filter-enriched.c (camel_mime_filter_enriched_new):
- Remove unused var.
-
- * camel-medium.c (camel_medium_get_header): Removed warning, and
- changed docs to reflect it.
-
- * camel-gpg-context.c (gpg_ctx_parse_status): handle MODE_EXPORT
- as a noop (warning).
-
- * camel-folder.c (get_message_user_tag): changed a warning into a
- fixme (its not that important).
- (camel_folder_get_message_user_tag): "
-
- * camel-data-cache.c (data_cache_finalise): removed unused vars.
- (data_cache_expire): "
-
-2003-03-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-sasl-gssapi.c (gssapi_challenge): Get rid of debug
- printf's that are no longer needed. In the case of errors, don't
- release the outbuf gss_buffer_t since it shouldn't be set. Also
- g_free (str) when we are done with it.
-
- * camel-mime-utils.c (header_encode_phrase_merge_words): When we
- remove a node from the list, make sure to g_list_free_1().
- (header_encode_phrase_merge_words): Don't use
- CAMEL_FOLD_PREENCODED as the upper-bound for merged-word length if
- the merged-word will not be an rfc2047 encoded word. Instead, use
- CAMEL_FOLD_SIZE-8 (which is the value we use in other places for
- determining upper-bound lengths). Solves bug #38659.
-
-2003-03-27 Dan Winship <danw@ximian.com>
-
- * camel-url.c (append_url_encoded): Like camel_url_encode, but
- works directly on an existing GString.
- (camel_url_to_string, output_param): Use it.
- (camel_url_encode): Likewise. Remove "escape_unsafe" arg since the
- "unsafe" chars are the ones that should *always* be escaped, and
- the places we were passing FALSE were wrong.
- (camel_url_decode): replace with a new version
-
- * camel-file-utils.c (camel_file_util_safe_filename): Remove extra
- arg to camel_url_encode.
-
- * tests/misc/url.c (main): Add tests of basic URL parsing and
- unparsing
-
-2003-03-28 Not Zed <NotZed@Ximian.com>
-
- *
- camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser):
- Do a more thorough check for html marked as text/plain. Check
- that the text starts with <html or <!doctype. More complete fix
- for #16817.
-
-2003-03-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-sasl-gssapi.c (camel_sasl_gssapi_finalize): Pass in the
- addresses of the second args to the delete/release functions.
-
-2003-03-27 Not Zed <NotZed@Ximian.com>
-
- * camel-object.c (camel_object_bag_list): Ignore whether or not
- the bag is currently reserved. We'll miss the new potential
- object, but only 1. Should address #40103.
-
-2003-03-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-service.c (camel_gethostbyaddr): Don't use setv when we
- don't need the stdarg interface.
- (camel_gethostbyname): Same.
-
-2003-03-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-folder-search.c (search_user_tag): This expression can
- never return an array. We must always return a string value.
-
-2003-03-24 Timo Sirainen <tss@iki.fi>
-
- * camel-imap-command.c (imap_read_untagged) Integer overflow fix.
- If server sent a huge literal length, only a few bytes of memory
- was allocated to it, but server could write as much data there as
- it wanted.
-
-2003-03-21 Jeffrey Stedfast <fejj@ximian.com>
-
- Camel part of the fix for Lewing's bug #39204. Second half of the
- patch should also fix it so that text/plain parts that are
- detected as being text/html are rendered as html (not that I agree
- with this mind you, but corporate customers want this "feature").
-
- * camel-mime-part-utils.c
- (simple_data_wrapper_construct_from_parser): If the part is
- text/html and doesn't have a charset and we are able to find a
- charset in the meta tags of the html content, set the charset
- param on the content-type.
- (camel_mime_part_construct_content_from_parser): After setting the
- content object on the mime part, re-set the content-type of the
- content object back to the one from the parser (as it may contain
- changes from the original - see changes made to the ct in
- simple_data_wrapper_construct_from_parser for details).
-
-2003-03-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-tcp-stream-ssl.c (camel_certdb_nss_cert_get): continue
- reading the cert file until we've read it all or get a non-EINTR
- errno.
-
-2003-03-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-sasl-gssapi.c: #include <com_err.h> instead of
- #include <et/com_err.h>
-
-2003-03-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-sasl.c: Plug in GSSAPI support.
-
- * camel-sasl-gssapi.[c,h]: Various fixes to make it compile (fixed
- type-o's mostly).
-
-2003-03-20 Dan Winship <danw@ximian.com>
-
- Handle raw 8-bit From data "correctly". (The same way we handle
- raw 8-bit Subject data.)
-
- * camel-mime-utils.c (header_decode_mailbox): Take a charset arg
- and pass it to header_decode_string.
- (header_decode_address): Take a charset arg and pass it to
- header_decode_mailbox.
- (header_mailbox_decode): Likewise.
- (header_address_decode): Take a charset arg and pass it to
- header_decode_address.
-
- * camel-folder-summary.c (summary_format_address): Take a charset
- arg and pass to header_address_decode.
- (message_info_new, camel_message_info_new_from_header): Pass
- charset to summary_format_address
-
- * camel-internet-address.c (internet_decode): Update for
- header_address_decode change. (Unfortunately we don't have a
- charset to pass here.)
-
- * camel-mime-message.c (camel_mime_message_build_mbox_from): Move
- this here from camel-mbox-summary since the same functionality is
- needed by evolution-mail too (and update for header_address_decode
- change)
-
- * providers/local/camel-mbox-summary.c
- (camel_mbox_summary_build_from): Moved to CamelMimeMessage
-
-2003-03-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-part.c (process_header): Removed unused variable left
- over from my previous fix.
-
- * providers/smtp/camel-smtp-transport.c (smtp_send_to): Don't pass
- 'has_8bit_parts' to smtp_data() anymore.
- (smtp_data): No longer takes 'has_8bit_parts' argument. Ignore
- whether or not the message has 8bit parts when deciding what the
- required encoding type we need to enforce. Fixes bug #39744.
-
-2003-03-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-part.c (process_header): Use
- header_contentid_decode() as this new function should be safer
- than the hack that we had before.
-
- * camel-mime-utils.c (header_contentid_decode): New function to
- try and parse a content-id string in such a way as to work around
- some of the known bugs in other MIME implementations. Try to be as
- "safe" as we can - ie. don't allow for more than 1 @ (since the
- mailer uses "@@@%d" as a fake content-id value for parts without
- content-ids) and don't allow for invalid content-type chars.
-
-2003-03-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-folder.c (get_uids): Don't add bogus uids to the uid
- array. Might fix bug #38868 (it's the only way I can figure that
- camel_folder_get_message_info() could possibly return NULL for the
- Outbox folder).
-
-2003-03-12 Not Zed <NotZed@Ximian.com>
-
- * camel-object.c (remove_bag): removed, it was double-freeing the
- key.
- (save_object): Just save the object in an array.
- (camel_object_bag_destroy): first save the object bag's objects in
- a list, then remove them one at a time from the bag since we can't
- remove hash table entries while we're in a foreach (PITA glib
- shit). For #39486.
- (camel_object_bag_*): killed some warnings.
-
-2003-03-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-url-scanner.c (camel_url_addrspec_end): Doh! If inptr ==
- pos + 1, then return FALSE (before it was checking for inptr ==
- pos, but it will never be pos).
-
-2003-03-07 Not Zed <NotZed@Ximian.com>
-
- * camel-vee-folder.c (vee_search_by_expression): handle a null
- return from search_by_expression, for bug #33786.
-
-2003-03-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-utils.c (imap_next_word):
- s/g_strncasecmp/strncasecmp/g
-
- * camel-iconv.c: Updated to be an exact copy of e-iconv (except
- names changed). We don't use this yet, but we may in the future.
-
- * camel-url.c (camel_url_new_with_base): Here too.
-
- * camel-sasl-kerberos4.c (krb4_challenge): Use camel_strdown()
- here instead of g_strdown() since the latter has been deprecated.
-
- * providers/imap/camel-imap-utils.c (imap_parse_body): Use
- camel_strdown() since g_ascii_strdown() does not do what we
- thought.
-
- * providers/imap/camel-imap-store.c:
- s/strstrcase/camel_strstrcase/g
-
- * providers/imap/camel-imap-folder.c (do_append):
- s/strstrcase/camel_strstrcase/
- (handle_copyuid): Same.
-
- * string-utils.c (camel_strdown): New function because the
- g_ascii_strdown interface sucks.
- (camel_strstrcase): Renamed from strstrcase.
-
-2003-03-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-text-index.c (camel_utf8_next): Same as below.
-
- * camel-search-private.c (camel_utf8_getc): Updated since not all
- platforms/compiles support __inline__.
-
-2003-03-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-part.c (camel_mime_part_get_encoding): Get rid of the
- const return - it mismatches the prototype and we don't need it
- anyway. Fixes bug #39173.
-
-2003-03-06 Jeffrey Stedfast <fejj@ximian.com>
-
- Fixes for bug #39170
-
- * camel-store-summary.c (camel_store_info_set_string): Remove
- return keyword.
-
- * camel-session.c (camel_session_thread_msg_free): Remove return
- keyword.
- (camel_session_thread_wait): Same.
-
- * camel-index.c (camel_index_cursor_reset): Remove return keyword.
-
-2003-03-06 Jeffrey Stedfast <fejj@ximian.com>
-
- Fixes for bug #39168
-
- * providers/local/camel-spool-summary.c: Get rid of the empty
- private struct.
-
- * providers/local/camel-mbox-summary.c: Get rid of the empty
- private struct.
-
- * camel-vee-store.c: Get rid of the empty private struct.
-
- * camel-mime-filter-from.c: Get rid of the empty private struct.
-
-2003-03-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/sendmail/camel-sendmail-transport.c
- (sendmail_send_to): Add a CRLF filter to the output stream to
- convert any CRLF sequences into plain old line-feeds to work
- around a bug in some local transport programs.
-
-2003-03-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-object.h: s/class/klass in one place so that the header is
- c++-safe.
-
-2003-03-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-tcp-stream-openssl.c (camel_tcp_stream_ssl_new): Updated
- to use the new API from a fe commits ago for the NSS stream. This
- is just to make it compile, but does not update the behaviour to
- act like the NSS stream. Note that people shouldn't be using
- OpenSSL anyway.
- (camel_tcp_stream_ssl_new_raw): Same.
-
- * camel-process.[c,h]: New source file containing convenience
- functions for process creation/termination mainly for use with
- Pipe filters but should be usable for anything we want.
-
- * camel-io.[c,h]: New source files implementing read/write system
- calls with proper error checking and cancellation
- (ie. StreamFs::read/write and CamelTcpStreamRaw::read/write). No
- sense duplicating the same code over and over. Now I can use this
- same code easily in other i/o code (such as Pipe filters and gpg
- code?).
-
-2003-03-03 Not Zed <NotZed@Ximian.com>
-
- * camel-store.c (camel_store_unsubscribe_folder): Do similar
- folder != NULL checking as for delete_folder before passing a NULL
- to object_bag_remove.
-
-2003-02-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-http-stream.c (http_connect): Here too.
-
- * providers/smtp/camel-smtp-transport.c (connect_to_server): Same
- as IMAP and POP.
-
- * providers/imap/camel-imap-store.c (connect_to_server): Same as
- the POP3 code.
-
- * providers/pop3/camel-pop3-store.c (connect_to_server): Pass in
- appropriate flags for camel_tcp_stream_ssl_new*() functions.
-
- * camel-tcp-stream-ssl.c (enable_ssl): Not all ssl/tls streams
- will want to allow each of SSLv2, SSLv3 and TLSv1 so use flags to
- decide which to enable/disable.
- (camel_tcp_stream_ssl_new): Now takes a flags argument to mask out
- which SSL/TLS versions the stream should be compatable with.
- (camel_tcp_stream_ssl_new_raw): Same.
-
-2003-02-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-stream-filter.c: Add a 'flushed' state variable to the
- private struct.
- (do_read): Set p->flushed to TRUE after we call
- camel_mime_filter_complete() on all the filters.
- (do_reset): Set p->flushed to FALSE.
- (do_eos): Make sure the filters have been flushed before returning
- that the stream is at EOS.
-
- * camel-mime-filter-canon.c (complete): Don't add a eol -
- otherwise we will fail to verify some mutt signatures that do not
- have a blank line before the boundary line (and note that the last
- \n before the boundary really belongs to the boundary anyway) so
- #if 0 this code out for now.
-
-2003-02-27 Not Zed <NotZed@Ximian.com>
-
- * camel-multipart-signed.c: Undo jeff's changes.
-
- * providers/local/camel-spool-store.c (scan_dir): Fix a paste-o in
- the object_bag_get key.
-
-2003-02-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-multipart-signed.c: Updated to use g_alloca instead of
- alloca so that we can skip all the #ifdef checks and skip checking
- for alloca in configure.in and all that foo.
-
- * camel-store.c (camel_store_delete_folder): Make sure the folder
- is non-NULL before trying to remove it from the store's
- object-bag.
-
-2003-02-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-part-utils.c
- (simple_data_wrapper_construct_from_parser): canonicalise the
- charset name (if it is an iso charset) so that our strncasecmp to
- see if it is an iso-8859-# charset will be guarenteed to work on
- all systems.
- (canon_charset_name): New function to return the canonical iso
- charset name.
- (simple_data_wrapper_construct_from_parser): If the charset is
- NULL *or* the charset == "us-ascii" then check that it is 7bit
- clean to decide if it is rawtext (we did not check the case where
- charset was "us-ascii" before).
-
-2003-02-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-message.c: Same as the ones below.
-
- * camel-mime-part.c: Reverted back to pre-camel-iconv
-
- * camel-filter-search.c: Same as below.
-
- * camel-folder-summary.c: Reverted back to pre-camel-iconv
-
- * camel.c (camel_init): Reverted to pre-camel-iconv
-
- * camel-charset-map.c (camel_charset_locale_name): Removed (part
- of the revert).
- (camel_charset_canonical_name): Same.
-
- * camel-mime-filter-charset.c: Revert back to using e_iconv from GAL.
-
- * camel-mime-part-utils.c: Revert back to using e_iconv from GAL.
-
- * camel-mime-utils.c: Revert back to using e_iconv from GAL.
-
- * camel-sasl-digest-md5.c: Revert back to using e-iconv from GAL.
-
-2003-02-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-charset-map.c (camel_charset_canonical_name): g_alloca
- (strlen (charset) + 1) so we don't overflow the buffer.
-
- * providers/pop3/camel-pop3-stream.c (stream_write): Don't write
- the passwd, fixes "bug" #38601.
-
- * camel-iconv.c: Make bucket->refcount 31 bits and bucket->used 1
- bit instead of having each use their own 32bit int.
- (iconv_cache_bucket_expire): Use g_iconv_close() here, missed this
- before.
- (camel_iconv): Might as well call g_iconv here even though it just
- calls iconv directly.
-
-2003-02-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-iconv.c (camel_iconv_charset_name): New function...back
- from the depths of hell from whence it came originally. Turns out
- that g_iconv_open() is lame and can't handle all the stuff we used
- to handle in e_iconv_charset_name().
- (camel_iconv_open): Use camel_iconv_charset_name() on the to/from
- charsets rather than camel_charset_canonical_name(). Now maybe
- g_iconv_open will work for charsets such as "ks_c_5601-1987".
-
- * providers/pop3/camel-pop3-store.c (pop3_connect): Reget the
- capabilities after a successful authentication.
-
- * providers/pop3/camel-pop3-engine.c (get_capabilities): If we are
- in the TRANSACTION state and CAPA did not list UIDL as a supported
- command, try checking for it the hard way.
-
-2003-02-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/smtp/camel-smtp-transport.c (smtp_data): Do it the
- same way we just made the sendmail code do it.
-
- * providers/sendmail/camel-sendmail-transport.c
- (sendmail_send_to): My last change but in a better way.
-
-2003-02-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/smtp/camel-smtp-transport.c (smtp_data): Remove all
- Bcc headers before sending to the smtp server.
-
- * providers/sendmail/camel-sendmail-transport.c
- (sendmail_send_to): Remove all Bcc headers before sending to
- sendmail.
-
-2003-02-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel.c (camel_init): Call camel_iconv_init().
- (camel_shutdown): Call camel_iconv_shutdown().
-
- * camel-sasl-digest-md5.c (digest_response): Updated to use
- camel-iconv and the new camel-charset-map functions.
-
- * camel-mime-utils.c: Updated to use camel-iconv and the new
- camel-charset-map functions.
-
- * camel-mime-part-utils.c (check_html_charset): Use
- camel_charset_canonical_name() instead of e_iconv_charset_name()
- which is longer available.
- (convert_buffer): Use camel-iconv.
- (simple_data_wrapper_construct_from_parser): Since
- camel_charset_iso_to_windows() returns the charset in it's
- canonical format, no need to re-canonicalise it.
-
- * camel-mime-part.c (process_header): Use
- camel_charset_canonical_name() instead of e_iconv_charset_name()
- which is longer available.
-
- * camel-mime-message.c (process_header): Use
- camel_charset_canonical_name() instead of e_iconv_charset_name()
- which is longer available.
-
- * camel-mime-filter-charset.c: Use camel-iconv.
-
- * camel-folder-summary.c (message_info_new): Use
- camel_charset_canonical_name() instead of e_iconv_charset_name()
- which is longer available.
- (content_info_new): Use camel_charset_locale_name().
- (camel_message_info_new_from_header): Same as message_info_new().
-
- * camel-search-private.c: Use g_alloca() instead of alloca().
-
- * camel-filter-search.c (check_header): Use
- camel_charset_canonical_name() instead of e_iconv_charset_name()
- which is longer available.
-
- * camel-charset-map.c (camel_charset_locale_name): New function,
- replaces e_iconv_locale_charset().
- (camel_charset_canonical_name): New function, similar to
- e_iconv_charset_name() but instead of returning the iconv-friendly
- name, it returns the canonical name. (g_iconv will do the
- iconv-friendly name conversions for us).
-
-2003-02-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-filter-search.c (run_command): Redirect program's stdout
- and stderr to /dev/null
-
- * camel-filter-driver.c (pipe_to_system): Redirect the program's
- stderr to /dev/null
- (pipe_to_system): Write the pipe to a mem stream and use the mem
- stream in the parser. Also, when setting an exception get the
- errno from the parser so we can give more info about the error to
- the user.
-
-2003-02-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-tcp-stream-ssl.c (stream_connect): Fixed a type-o in the
- ENABLE_IPv6 ifdef section.
-
-2003-02-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-filter-driver.c (pipe_message): New filter action that
- pipes the message source to the user-program and reads back the
- modified message and replaces driver->priv->message with the new
- message object.
- (do_copy): Check p->modified to make sure the message hasn't been
- modified by the pipe-message action - if it has been modified,
- default to the slower camel_folder_append_message() way of
- copying.
- (do_move): Same.
- (pipe_to_system): Set p->modified to TRUE if the user-program gave
- us back a message stream and we were able to parse it.
- (camel_filter_driver_filter_message): If the message has been
- modified, always use camel_folder_append_message() when appending
- it to the default folder.
-
-2003-02-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-folder-search.c: Added a (get-size ) function to fix bug
- #38073.
- (search_get_size): Implemented.
-
-2003-02-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-url-scanner.c (url_scanner_table_init): Mark chars with
- the high-bit set as CTRL chars.
- (camel_url_web_end): If the char before the start of the url is an
- open-brace, watch out for the matching close-brace.
- (camel_url_file_end): Same.
-
-2003-02-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-smime-context.c (smime_get_password): Same as the gpg and
- pkcs7 contexts.
-
- * camel-sasl-popb4smtp.c (popb4smtp_challenge): Updated for
- camel_session_get_password().
-
- * camel-pkcs7-context.c (get_password): Same as the gpg code.
-
- * camel-gpg-context.c (gpg_ctx_parse_status): Updated for
- camel_session_get_password().
-
- * providers/smtp/camel-smtp-transport.c (smtp_connect): No need to
- set USER_CANCEL exception here as it is done by
- camel_session_get_password(). Also updated for the new
- get_password() API change.
-
- * providers/imap/camel-imap-store.c (imap_auth_loop): Updated for
- camel_session_get_password() changes. We don't need to play the
- "bad passwd" game here too, do we? Bah, probably should but I
- don't feel like it for now. Maybe when we rewrite the IMAP
- provider.
-
- * camel-session.c (camel_session_get_password): Now takes a
- 'reprompt' argument that will force user-input to be given even if
- we have the passwd cached.
-
- * providers/pop3/camel-pop3-store.c (pop3_connect): Instead of
- uncaching the passwd after we receive a -ERR from the POP server,
- set 'reprompt' to TRUE to force user-input for the next password
- prompt (ie, make sure the front-end knows not to just return the
- cached value). The front-end can then decide to fill-in the
- user-input field with the last passwd that the user supplied.
- (pop3_try_authenticate): Now takes a reprompt argument which we
- pass into camel_session_get_password().
-
-2003-02-05 Dan Winship <danw@ximian.com>
-
- * Makefile.am (libcamelincludedir): Define in terms of
- privincludedir.
- (camellibexecdir): Define in terms of privlibexecdir
- (libcamel_la_LDFLAGS): Remove -rpath. (automake will add that)
-
- * providers/imap/Makefile.am (libcamelimapincludedir): Define in
- terms of privincludedir.
- (INCLUDES): Remove -I$(includedir)
- * providers/local/Makefile.am: Likewise
- * providers/nntp/Makefile.am: Likewise
- * providers/pop3/Makefile.am: Likewise
- * providers/sendmail/Makefile.am: Likewise
- * providers/smtp/Makefile.am: Likewise
-
-2003-02-04 Not Zed <NotZed@Ximian.com>
-
- * camel-object.c (camel_object_bag_new): Init bag->owner to 0.
-
-2003-01-31 Not Zed <NotZed@Ximian.com>
-
- * camel-object.c (camel_object_bag_*): Changed to use a posix
- semaphore instead of a condition variable + flag to reserve the
- object bag because e_mutex_cond is broken.
-
-2003-02-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-utils.c (imap_parse_body): Use
- g_ascii_strdown() instead of g_strdown, since g_strdown is
- deprecated.
- (imap_parse_body): Same.
-
- * providers/imap/camel-imap-folder.c (decode_internaldate): Use
- strncasecmp() here too.
- (parse_fetch_response): And here.
- (camel_imap_folder_selected): Here too.
-
- * providers/imap/camel-imap-utils.c (imap_namespace_decode): Use
- strncasecmp() instead of g_strncasecmp() because the latter is
- deprecated.
-
- * providers/imap/camel-imap-store.c (imap_get_capability): Again here.
- (hash_folder_name): Here too.
- (compare_folder_name): And here.
- (get_folder_online): Again.
- (get_folder_offline): And again.
-
- * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
- Same as below again.
-
- * providers/imap/camel-imap-command.c (camel_imap_response_free):
- Same as below.
-
- * providers/smtp/camel-smtp-transport.c (smtp_data): Use
- strcasecmp() because g_strcasecmp() is deprecated.
-
- * camel-url.c (camel_url_new_with_base): Use g_ascii_strdown()
- instead of g_strdown, since g_strdown is deprecated.
-
-2003-01-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-sasl-gssapi.c (gssapi_challenge): Pass in some default
- flags to gss_init_sec_context() (these default flags are defined
- as a MUST in rfc1964).
-
-2003-01-22 Hans Petter Jansson <hpj@ximan.com>
-
- * Makefile.am: $(libexec) -> $(libexecdir)
-
-2003-01-22 Ettore Perazzoli <ettore@ximian.com>
-
- * providers/imap/Makefile.am (libcamelimapincludedir): Update to
- the new $(BASE_VERSION)-versioned path.
- * providers/smtp/Makefile.am (libcamelsmtpincludedir): Likewise.
- * providers/sendmail/Makefile.am (libcamelsendmailincludedir):
- Likewise.
- * providers/pop3/Makefile.am (libcamelpop3includedir): Likewise.
- * providers/nntp/Makefile.am (libcamelnntpincludedir): Likewise.
- * providers/local/Makefile.am (libcamellocalincludedir): Likewise.
-
- * camel-lock-client.c (camel_lock_helper_init): Use
- CAMEL_LIBEXECDIR instead of CAMEL_SBINDIR to find
- camel-lock-helper.
-
- * Makefile.am: Install camel-lock-helper and camel-index-control
- in $(libexec)/evolution/$(BASE_VERSION)/camel. Install
- libcamel.la in $privlibdir.
- (install-exec-hook): Update for the new location of
- camel-lock-helper.
- (libcamelincludedir): Version using $(BASE_VERSION).
- (INCLUDES): Define CAMEL_LIBEXECDIR.
-
-2003-01-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-filter-canon.c (complete): Set the backbuflen to 0 so
- that calling us again won't re-flush the same data.
-
-2003-01-17 Larry Ewing <lewing@ximian.com>
-
- * camel-mime-filter-enriched.c (enriched_to_html): only grow the
- buffer when we are out of space.
-
-2003-01-14 Not Zed <NotZed@Ximian.com>
-
- * camel-mime-parser.c (folder_scan_step): If we have no
- content-type header, set it to text/plain explcitly, rather than
- NULL, because some code doesn't handle NULL.
-
-2003-01-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-sasl-gssapi.[c,h]: New source files implementing the
- GSSAPI SASL mechanism.
-
-2003-01-13 Not Zed <NotZed@Ximian.com>
-
- * camel-mime-filter-tohtml.c: fix header include order.
-
- * camel-object.c (camel_object_bag_reserve): Add an assert to
- check we're not trying to reserve the bag more than once in a
- given thread.
- (camel_object_bag_list): If we have reserved the bag, dont try and
- cond wait. Fixes a deadlock.
-
- * camel-mime-filter-tohtml.c (writeln): Read the characters as
- utf8, rather than as 8 bit bytes. Remove the PRESERVE_8BIT as it
- has no meaning. Also change the default logic slightly so that 8
- bit or greater characters are properly converted to entities.
-
- * camel-utf8.c (camel_utf8_getc_limit): new function, gets a utf8
- char, bounded by an end pointer.
-
-2003-01-07 Dan Winship <danw@ximian.com>
-
- * camel-provider.h (CamelProvider): add a "translation_domain"
- field. (NULL for all providers in the camel source tree itself).
-
- * camel-session.c (register_provider): Translate provider strings
- in the correct domain
-
-2003-01-06 Not Zed <NotZed@Ximian.com>
-
- * camel-store.c (store_sync): init local exception before doing
- anything. fixes a crash.
-
-2003-01-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/smtp/camel-smtp-transport.c (smtp_send_to): Instead of
- checking recipients != NULL, check that camel_address_length
- (recipients) != 0 since it is illegal for recipients to be NULL
- (camel_transport_send_to already checks this).
-
-2002-12-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-utils.c: Replace calls to
- g_string_sprintfa() with g_string_append_printf() since the former
- seems to have been deprecated.
-
- * providers/imap/camel-imap-search.c: Same.
-
- * providers/imap/camel-imap-folder.c: Here too.
-
- * providers/local/camel-mbox-summary.c: And here.
-
- * providers/local/camel-local-summary.c: Replace
- g_string_sprintf() with g_string_printf().
-
- * camel-data-cache.c (data_cache_expire): Replace
- g_string_sprintf() with g_string_printf().
-
- * camel-url.c: Replace calls to g_string_sprintfa() with
- g_string_append_printf() since the former seems to have been
- deprecated.
-
- * camel-service.c: Same.
-
- * camel-mime-utils.c: Here too.
-
-2002-12-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-part-utils.c
- (simple_data_wrapper_construct_from_parser): Detect text/html
- parts that were marked as text/plain and re-tag them as text/html
- parts. Note: currently just checks if the first non-lwsp char is a
- '<' - but we might need to be smarter about this? *sigh* Stupid
- Windows mailers.
-
- * camel-mime-filter-tohtml.c (camel_text_to_html): New convenience
- function to replace calls to e_text_to_html() in the
- mailer/composer etc.
-
- * camel.h: #include some headers we had forgotten to add
- previously, also added camel-mime-filter-enriched.h.
-
- * camel-mime-filter-enriched.[c,h]: New stream filter to convert
- text/enriched and text/richtext into HTML.
-
-2002-12-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-multipart-signed.c (camel_multipart_signed_verify): Don't
- apply the CANON_STRIP filter here, since we are verifying whatever
- raw data we received (all we want to do is convert o the canonical
- CRLF format).
-
-2002-12-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-filter-tohtml.c (html_convert): Use camel-url-scanner
- instead of regex.
-
-2002-12-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-url-scanner.c (camel_url_addrspec_end): Fixed to not be
- fooled in the case where the address is followed immediately by a
- period.
- (camel_url_web_end): Made more robust.
- (camel_url_scanner_scan): Oops. We need to set the match->pattern
- string pointer to the correct pattern before executing the
- start/end methods (as some of them rely on this info).
-
-2002-12-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-url-scanner.c: New code to scan for patterns (used only
- for url pattern matching atm, but we may find other uses for this
- and thus rename it? I dunno). Uses ETrie.
-
-2002-12-07 Not Zed <NotZed@Ximian.com>
-
- * camel-data-cache.c (data_cache_init): Use a bag instead of a
- hashtable to track the cache streams.
- (data_cache_finalise): Same.
- (free_busy): No longer needed.
- (data_cache_expire): use bag instead of hashtable.
- (stream_finalised): No longer required.
- (camel_data_cache_add): objectbagise
- (camel_data_cache_get): "
- (camel_data_cache_remove): "
- (data_cache_path): Set the now expired date before running expiry,
- so it plays better with multiple threads. Still a couple of
- harmless races.
-
-2002-12-06 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-spool-store.c (scan_dir): folders ->
- object bag.
- (get_folder_info_mbox): folders -> object bag.
-
- * providers/local/camel-mh-store.c (folder_info_new): folders ->
- object bag.
-
- * providers/local/camel-maildir-store.c (scan_dir): folders ->
- object bag.
-
- * providers/local/camel-local-store.c (rename_folder): folders ->
- object bag.
-
- * camel-private.h (CamelStorePrivate): Remove 'cache' lock,
- handled by the objectbag.
-
- * providers/imap/camel-imap-store.c (copy_folder): Removed.
- (imap_store_refresh_folders): folders -> object bag.
- (get_folder_counts): folders -> object bag.
-
- * camel-vee-store.c (vee_get_folder): changes for folders
- objectbag.
- (vee_get_folder_info): Change to use folders objectbag. Also,
- dont refresh the base folder if we're in FAST mode.
- (build_info): Removed, no longer needed.
- (vee_rename_folder): Fixed for folders objectbag.
-
- * camel-store.c (camel_store_init): init the folders objectbag.
- (camel_store_finalize): Destroy the folders object bag.
- (folder_matches):
- (folder_finalize): Removed, now handled implicitly by the
- objectbag.
- (camel_store_get_folder): object bag changes.
- (camel_store_delete_folder): "
- (get_subfolders): Removed, now handled without a callback.
- (camel_store_rename_folder): Changed to use object bag of folders.
- (trash_add_folder): Removed.
- (init_trash): use folders object bag.
- (copy_folder_cache):
- (sync_folder): Removed, no longer needed. Weird arsed code anyway.
- (store_sync): Use folder object bag instead of hashtable.
- (camel_store_unsubscribe_folder): "
- (camel_store_init): remove cache_lock init, no longer used.
- (camel_store_finalize): Same for cleanup.
-
-2002-12-05 Not Zed <NotZed@Ximian.com>
-
- * camel-store.h (struct _CamelStore): change folders from a
- hashtable into a CamelObjectBag.
-
- * camel-object.c (camel_object_ref): Use type_lock instead of
- class lock for ref counting.
- (camel_object_unref): Use type_lock instead of class lock for
- unref.
- (camel_object_unref): If the object is 'bagged', then also look
- hooks, and remove it from any bags.
- (camel_object_bag_new):
- (camel_object_bag_destroy):
- (camel_object_bag_add):
- (camel_object_bag_get):
- (camel_object_bag_remove_unlocked):
- (camel_object_bag_list):
- (camel_object_bag_abort):
- (camel_object_bag_remove): New functions to implement a utility
- object which can manage a 'bag' of weakly ref'd children in an
- atomic & threadsafe way.
-
-2002-12-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-store-summary.c
- (camel_imap_store_summary_add_from_full): Properly handle the case
- where the namespace is "". Fixes bug #34975
-
-2002-12-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * broken-date-parser.c (get_tzone): Fixed to not get false
- positives when the token is shorter than the actual timezone
- string (but matches the first little bit of it).
- (datetok): Modified to properly handle when the first char of a
- token is a special char (such as a '-') that is also used as a
- token delimiter.
-
-2002-11-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-tcp-stream-ssl.c (stream_read): Use the new
- camel_operation_cancel_prfd() function to get the cancellation fd
- so we can poll on it for cancellation stuff.
- (stream_write): Same.
-
-2002-11-22 Not Zed <NotZed@Ximian.com>
-
- * camel-operation.c (camel_operation_cancel_prfd): Implement, gets
- a nspr pr filedesc to poll/wait on
- (struct _CamelOperation): include a pr filedesc.
-
-2002-11-21 Not Zed <NotZed@Ximian.com>
-
- * providers/imap/camel-imap-store-summary.c
- (camel_imap_store_summary_namespace_find_path): If we have a
- namespace of "", then always match any path.
- (camel_imap_store_summary_namespace_find_full): Same, for full
- names. Should address #33309 & friends.
-
-2002-11-19 Radek Doulik <rodo@ximian.com>
-
- * camel-mime-filter-tohtml.c (html_convert): added
- CAMEL_MIME_FILTER_TOHTML_PRESERVE_8BIT flag
-
-2002-11-18 Rodney Dawes <dobey@ximian.com>
-
- * tests/*/Makefile.am: Removed $(GNOME_LIBDIR) and $(GNOMEUI_LIBS)
-
-2002-11-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-store.c (imap_connect_online): If the
- namespace is at/below INBOX, check for the INBOX explicitly (since
- it obviously won't show up in a LSUB INBOX.*). If either INBOX is
- not returned in the response or if the folder flags contain
- \NoSelect, subscribe to INBOX and then try LSUB again.
-
-2002-11-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-filter-tohtml.c (html_convert): Rewritten. Much much
- much cleaner implementation now, though uses malloc/free more
- often than I'd like.
-
-2002-11-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-folder.c (get_message_simple): Use
- g_strerror when setting an exception string (we need it to be in
- UTF-8).
-
- * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): Use
- g_strerror when setting an exception string (we need it to be in
- UTF-8).
-
- * providers/pop3/camel-pop3-folder.c (pop3_refresh_info): Use
- g_strerror when setting an exception string (we need it to be in
- UTF-8).
- (pop3_get_message): Same.
-
- * providers/local/camel-spool-summary.c (spool_summary_sync_full):
- Use g_strerror when setting an exception string (we need it to be
- in UTF-8).
- (spool_summary_check): Here too.
-
- * providers/local/camel-spool-store.c (construct): Use g_strerror
- when setting an exception string (we need it to be in UTF-8).
- (get_folder): Same.
- (scan_dir): Here too.
-
- * providers/local/camel-spool-folder.c (spool_lock): Use
- g_strerror when setting an exception string (we need it to be in
- UTF-8).
-
- * providers/local/camel-mh-summary.c (mh_summary_check): Use
- g_strerror when setting an exception string (we need it to be in
- UTF-8).
-
- * providers/local/camel-mh-store.c (delete_folder): Use g_strerror
- when setting an exception string (we need it to be in UTF-8).
-
- * providers/local/camel-mbox-summary.c (summary_update): Use
- g_strerror when setting an exception string (we need it to be in
- UTF-8).
- (mbox_summary_sync_full): Here too.
- (mbox_summary_sync_quick): Same.
- (mbox_summary_sync): Also here.
- (camel_mbox_summary_sync_mbox): Again here.
-
- * providers/local/camel-mbox-folder.c (mbox_lock): Use g_strerror
- when setting an exception string (we need it to be in UTF-8).
- (mbox_append_message): Same.
- (mbox_get_message): Here too.
-
- * providers/local/camel-maildir-summary.c (maildir_summary_load):
- Use g_strerror when setting an exception string (we need it to be
- in UTF-8).
- (maildir_summary_check): Same.
-
- * providers/local/camel-maildir-store.c (get_folder): Use
- g_strerror when setting an exception string (we need it to be in
- UTF-8).
- (delete_folder): Same.
- (delete_folder): Here too.
-
- * providers/local/camel-local-summary.c (local_summary_sync): Use
- g_strerror when setting an exception string (we need it to be in
- UTF-8).
-
- * providers/local/camel-local-store.c (get_folder): Use g_strerror
- when setting an exception string (we need it to be in UTF-8).
- (create_folder): Same.
- (xrename): Here too.
- (rename_folder): And here.
- (delete_folder): Also here.
-
- * camel-provider.c (camel_provider_init): For debugging printfs,
- we want to use normal strerror (we want locale charset, not
- UTF-8).
-
- * camel-movemail.c (camel_movemail): Use g_strerror when setting
- an exception string (we need it to be in UTF-8).
- (movemail_external): Same.
- (camel_movemail_copy_file): Here too.
- (camel_movemail_solaris): Also here.
-
- * camel-mime-utils.c (rfc2047_decode_word): For debugging printfs,
- we want to use normal strerror (we want locale charset, not
- UTF-8).
- (header_encode_param): Same.
-
- * camel-mime-part-utils.c (convert_buffer): For debugging printfs,
- we want to use normal strerror (we want locale charset, not
- UTF-8).
-
- * camel-lock-client.c (camel_lock_helper_init): Use g_strerror
- when setting an exception string (we need it to be in UTF-8).
-
- * camel-data-cache.c (camel_data_cache_remove): Use g_strerror
- when setting an exception string (we need it to be in UTF-8).
-
- * camel-tcp-stream-raw.c (flaky_tcp_write): For debugging printfs,
- we want to use normal strerror (we want locale charset, not
- UTF-8).
- (flaky_tcp_read): Same.
-
- * camel-gpg-context.c (gpg_ctx_op_step): For debugging printfs, we
- want to use normal strerror (we want locale charset, not UTF-8).
-
- * camel-service.c (camel_gethostbyname): Use g_strerror when
- setting an exception string (we need it to be in UTF-8).
-
- * camel-lock.c (camel_lock_dot): Use g_strerror when setting an
- exception string (we need it to be in UTF-8).
- (camel_lock_fcntl): Same.
-
-2002-11-07 Not Zed <NotZed@Ximian.com>
-
- * camel-mime-part.c (camel_mime_part_set_content_type): constify
- the content_type.
-
-2002-11-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-i18n.h: Added.
-
- * camel-object.h: #include camel-i18n.h instead of gnome-i18n.h
-
- * camel-lock.c: Same.
-
-2002-11-07 Rodrigo Moya <rodrigo@ximian.com>
-
- * camel-object.h: removed gnome-defs.h, it does not exist.
-
-2002-11-05 Not Zed <NotZed@Ximian.com>
-
- * Makefile.am (camel_lock_helper_LDADD): Created temporary link
- list, we need to link with something for gettext.
-
- * camel.h: Remove gstring-util.h and hash-table-utils.h.
-
- * camel-text-index.c:
- (text_index_normalise): Changed for g_utf8_strdown api change.
-
- * camel-search-private.c:
- * camel-mime-utils.c:
- * camel-mime-part-utils.c:
- * camel-html-parser.c:
- * camel-charset-map.c: Include glib/gunicode.h from glib instead
- of gal.
-
- * camel-filter-driver.c: Remove include of gtk/gtk.h, should never
- have been there.
-
-2002-11-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.c (g_string_append_len): Removed. Glib2 has
- this function.
-
- * providers/local/camel-local-store.c (delete_folder): Use
- g_path_get_basename instead of g_strdup (g_basename (filename)).
-
- * camel-uid-cache.c (camel_uid_cache_new): Use g_path_get_dirname
- since g_dirname has been deprecated.
-
-2002-10-31 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-gpg-context.c (camel_gpg_context_class_init): Set the
- virtual method pointers to the import/export methods.
- (camel_gpg_context_init): Set the key_protocol string.
- (gpg_hash_to_id): Handle 2 more hash types.
- (gpg_id_to_hash): Same.
- (gpg_ctx_op_step): Slight fixes to support import/export.
- (gpg_ctx_parse_status): Fix to hack around the fact that importing
- keys doesn't write to stdout.
- (gpg_import_keys): Implemented.
- (gpg_export_keys): Implemented.
-
- * camel-cipher-context.c (camel_cipher_context_class_init): Hook
- up default virtual methods for import/export.
- (camel_cipher_import_keys): Implemented.
- (camel_cipher_export_keys): Implemented.
-
-2002-10-31 Jeffrey Stedfast <fejj@ximian.com>
-
- * Makefile.am: Removed hash-table-utils.[c,h] from the build.
-
- * hash-table-utils.[c,h]: Removed.
-
- * string-util.c: Imported g_strcase[hash,equal] into here so we
- can remove hash-table-utils.[c,h].
-
- * camel-medium.c: Removed #include "hash-table-utils.h"
-
- * camel-mime-message.c: Same here.
-
- * camel-mime-part.c: And here.
-
- * camel-session.c: Here too.
-
- * providers/imap/camel-imap-store-summary.c: #include
- string-utils.h instead of hash-table-utils.h
-
- * camel-charset-map.c: Same.
-
- * camel-folder-summary.c: Here too.
-
- * camel-provider.c: Again here.
-
- * camel-store-summary.c: And again...
-
-2002-10-31 Jeffrey Stedfast <fejj@ximian.com>
-
- Remove a ton of useless snot.
-
- * Makefile.am: Remove gstring-util.[c,h] from the build.
-
- * gstring-util.[c,h]: Removed.
-
- * string-utils.c (string_equal_for_glist): Removed.
- (string_split): Removed.
- (string_trim): Removed.
- (string_prefix): Removed.
- (string_unquote): Removed.
- (strip): Removed.
-
- * hash-table-utils.c (g_hash_table_generic_free): Removed.
-
- g_str[n]casecmp functions are deprecated in glib2.
-
- * string-utils.c (strstrcase): Use strncasecmp instead of
- g_strncasecmp.
-
- * hash-table-utils.c (g_strcase_equal): Use strcasecmp
- instead of g_strcasecmp.
-
- * camel-smime-utils.c (camel_smime_is_smime_v3_signed): Same.
- (camel_smime_is_smime_v3_encrypted): Here too.
-
- * camel-sasl-digest-md5.c (decode_data_type): And here.
- (parse_server_challenge): Again here.
-
- * camel-pgp-mime.c (camel_pgp_mime_is_rfc2015_signed): Same.
- (camel_pgp_mime_is_rfc2015_encrypted): Same
-
- * camel-mime-part-utils.c (check_html_charset): Here too.
-
- * camel-folder-summary.c (camel_system_flag): Same.
-
-2002-10-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-gpg-context.c (gpg_ctx_parse_status): Don't prematurely
- set gpg->complete to TRUE. Let gpg_ctx_op_step () set it to TRUE
- when gpg closes the status-fd instead.
-
-2002-10-24 Not Zed <NotZed@Ximian.com>
-
- ** For bug #31647 and bug #31456.
-
- * camel-store-summary.c (store_info_string): for STORE_INFO_NAME,
- skip the leading /.
-
- * providers/imap/camel-imap-store.c
- (parse_list_response_as_folder_info): Remove jeff's last patch,
- and use the store summary to create the name and path of the
- folderinfo so it manages namespace issues.
- (get_folder_info_online): Just pass @top directly to
- build_folder_info always, since namespace is mapped to 1 tree
- level.
- (imap_build_folder_info): Remove jeff's last patch, dont strip
- leading /'s, they shouldn't exist.
- (imap_connect_online): Remove adding the INBOX here, we add it
- later.
- (get_subscribed_folders): Make sure INBOX is always in the list.
- some imap servers dont seem to let you subscribe to it(?), so
- always have it act as subscribed.
-
- * camel-store.c (camel_folder_info_build): back out the last 2
- patches from Jeff (for #31456) to get the original behaviour.
- (camel_folder_info_build): When creating a fake
- parent, dont strip the namespace from the full_name. malloc keys
- in hash since we dont have them anymore.
- (free_name): Helper to free names.
-
- * providers/imap/camel-imap-store-summary.c
- (camel_imap_store_summary_namespace_new): Canonicalise the
- namespace (strip trailing dir_sep), and change the path to remove
- any /'s.
- (camel_imap_store_summary_namespace_find_path):
- (camel_imap_store_summary_namespace_find_full): new, find
- namespace by path/full name.
- (camel_imap_store_summary_full_from_path): Changed to a simple
- wrapper around path_to_full, after checking namespace.
- (camel_imap_store_summary_add_from_full): map the namespace if
- present.
- (camel_imap_store_summary_path_to_full): If namespace exists,
- unmap it.
-
-2002-10-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-filter-driver.c (camel_filter_driver_filter_folder):
- Canonicalise the source_uri to not have a path. Fixes bug #32268.
-
-2002-10-17 Jeffrey Stedfast <fejj@ximian.com>
-
- Possible fix for bug #32270
-
- * providers/pop3/camel-pop3-store.c (try_sasl): If we get an I/O
- error, we should not be setting the CANT_AUTH exception but should
- instead be setting the SYSTEM exception. Also check for EINTR
- which signifies a USER_CANCEL exception.
- (pop3_try_authenticate): If the auth mechanism isn't supported,
- don't set the CANT_AUTH exception since then we will loop and try
- again with the same data which will just cause an infinite loop.
- (pop3_connect): Simplified a bit.
-
-2002-10-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-tcp-stream-ssl.c (camel_certdb_nss_cert_set): If
- ~/.camel_certs doesn't exist, create it.
-
-2002-10-15 Not Zed <NotZed@Ximian.com>
-
- * camel-tcp-stream-ssl.c (cert_fingerprint): helper, build
- fingerprint.
- (camel_certdb_nss_cert_get): Helper for nss certs. Lookup cert.
- As well as fingerprint, the whole raw cert is checked for
- validity.
- (camel_certdb_nss_cert_add): Add an nss cert to a certdb, also
- saves the cert by fingerprint in ~/.camel_certs/.
- (ssl_bad_cert): Changed to use above functions to simplify logic.
- (ssl_bad_cert): Also added non-compiled code which mimics what
- mozilla does, but it doesn't work right :-/
- (camel_certdb_nss_cert_set): Save the raw cert associated with a
- cert.
-
- * camel-certdb.c (certdb_cert_free): Free the raw cert data if
- set.
-
-2002-10-14 Not Zed <NotZed@Ximian.com>
-
- * camel-file-utils.c (camel_file_util_encode_string): Encode a
- length of 0 as 1, not 0, to match the decode code.
-
-2002-10-03 Not Zed <NotZed@Ximian.com>
-
- * camel-folder.c (filter_filter): Do the filtering ourselves.
- This is so a problem like a missing uid (which can happen
- legitemitely) doesn't prematurely abort filtering. Stop on all
- other errors. See #31667.
-
-2002-10-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-gpg-context.c (camel_gpg_context_new): No longer takes a
- path argument.
- (camel_gpg_context_fianlise): No need to free ctx->path.
- (gpg_ctx_new): No longer takes a path argument either.
- (gpg_ctx_free): No need to free ctx->path, it's no longer used.
- (gpg_ctx_op_start): Don't stat the path anymore and change the
- first arg to execvp to "gpg" so that we use the shell's
- environment to find gpg.
- (gpg_sign): Updated.
- (gpg_verify): Updated.
- (gpg_encrypt): Updated.
- (gpg_decrypt): Updated.
- (gpg_ctx_get_argv): Removed some debug printfs.
-
-2002-10-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-gpg-context.c (gpg_id_to_hash): If the hash id is NULL,
- return CAMEL_CIPHER_HASH_DEFAULT. Fixes bug #32229.
-
-2002-10-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-command.c (imap_read_response): If the
- response from the IMAP server is "No", don't set the
- SERVICE_UNAVAILABLE exception, this makes error reporting in the
- UI for deleting IMAP folders that cannot be deleted inaccurate
- (ie, it reports "Cannot delete in offline mode" which is not the
- problem).
-
-2002-10-07 Jeffrey Stedfast <fejj@ximian.com>
-
- Fixes bug #31752
-
- * providers/smtp/camel-smtp-transport.c (connect_to_server): Don't
- forget to send another EHLO command to the server once we toggle
- into STARTTLS mode.
- (smtp_helo): Reset any flags set using the EHLO response and also
- any authtypes.
-
-2002-10-06 Jeffrey Stedfast <fejj@ximian.com>
-
- Fixes bug #31681
-
- * camel-mime-utils.c: Fix all mailing list regex patterns to allow
- any number of spaces *or* tabs as pre-padding for the header
- values.
-
-2002-10-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-part.c (write_to_stream): Use the content-object's
- rawtext flag to decide if it needs to be filtered through the
- charset filter instead of using the mime part's rawtext flag since
- this will never be set. Partial fix for bug #31655.
-
-2002-10-03 Not Zed <NotZed@Ximian.com>
-
- * camel-folder.c (folder_changed): Dont get the filter driver
- inside the change_lock. Its not necessary, and can cause deadlock
- with the way the mailer gets the filter driver via g_mainloop.
- Should fix #31572.
-
-2002-10-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-charset-map.c (camel_charset_iso_to_windows): Map us-ascii
- to windows-1252 also.
-
-2002-10-02 Not Zed <NotZed@Ximian.com>
-
- * providers/imap/camel-imap-folder.c (get_matching): Set *set to
- NULL if we dont get any matches.
- (imap_sync_online): If we get no matches, skip any work, also
- reorder some code to make it easier to skip. See #31031.
-
- * providers/imap/camel-imap-store.c
- (imap_check_folder_still_extant): Default to "TRUE", if the list
- command failed, it probably means a server problem, assume the
- worst. This makes imap_refresh_info not clear the exception and
- crash. Fixes crash of #31000.
-
-2002-10-01 Not Zed <NotZed@Ximian.com>
-
- * providers/imap/camel-imap-folder.c (imap_refresh_info): Make
- sure we pass the exception to imap_folder_selected(), otherwise
- failures can be lost. See bug #31000.
-
-2002-10-01 Not Zed <NotZed@Ximian.com>
-
- * camel-folder.c (thaw): Add an assertion that the frozen count>0.
- (freeze): Same for >= 0.
-
- * camel-vee-folder.c (camel_vee_folder_remove_folder): Use the
- unmatched freeze_count when thawing folders removed from
- unmatched, rather than the folder's freeze_count. Might be
- related to #27391.
-
-2002-10-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-folder.c (decode_internaldate): Use
- strtol when decoding the timezone (since it can be negative) and
- don't forget to increment inptr to the start of the time (ie,
- don't leave inptr pointing to the year when decoding the
- hour:min:sec).
-
-2002-09-30 Jeffrey Stedfast <fejj@ximian.com>
-
- Fixes bug #31456.
-
- * providers/imap/camel-imap-store.c (imap_connect_online): Don't
- LSUB "" "*", instead get both an LSUB containing the subfolders of
- the namespace and an LSUB of INBOX (assuming namespace was
- non-empty). This fix really has nothing to do with bug #31456 but
- is what should have been done in the first place.
- (parse_list_response_as_folder_info): Simplify a tad and strip
- extra leading /'s from fi->path.
- (imap_build_folder_info): Strip extra leading /'s from fi->path.
-
- * camel-store.c (camel_folder_info_build): Don't strip the
- namespace from the fi->full_name when hashing or creating fake
- parent folder-infos. Fixes a bug I found while trying to reproduce
- bug #31456.
- (camel_folder_info_build_path): Strip off extra leading dir_sep
- chars from the path.
-
-2002-09-30 Not Zed <NotZed@Ximian.com>
-
- * providers/imap/camel-imap-folder.c (imap_get_message): Remove
- debug content_info_dump, could cause a crash, and not really
- needed anymore.
-
- * camel-folder-summary.c (camel_content_info_dump): Check ci->type
- != NULL before dereferencing it. Should fix crash #31331.
-
-2002-09-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-folder.c (decode_internaldate): New
- function to decode the INTERNALDATE response from an IMAP server
- so we don't have to use my broken-date-parser routines.
-
-2002-09-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-store.c (connect_to_server):
- NULL-check the streams before unreffing them in the case of a
- failure during ssl negotiations.
-
- * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_enable_ssl): Check
- SSL_ResetHandshake() for errors. Also force a handshake after
- we've reset the handshake state on the socket.
-
-2002-09-27 Not Zed <NotZed@Ximian.com>
-
- * providers/imap/camel-imap-folder.c (imap_update_summary): Use
- the summary's last uid as the one to fetch from, ignoring the
- cache. Use strtoul instead of atoi as well.
-
- * providers/imap/camel-imap-store.c (get_folder_counts): If we
- have the folder open, and the unread count has changed, refresh
- it. Should fix #30399 enough. Also in non-check-all mode, if we
- have the folder open, use it anyway.
-
-2002-09-26 Not Zed <NotZed@Ximian.com>
-
- * tests/folder/test2.c (main): Treat spool as a local folder, so
- the ref checks work right.
-
- * providers/local/camel-spool-store.c (get_folder): Implement
- FOLDER_CREATE flag.
- (scan_dir): Dont free name on exception, its alloca'd.
- (scan_dir): If we start scanning from a file, just add that
- directly.
- (scan_dir): Allow empty files to also show up in folder list, as
- well as files starting with "From ".
- (get_folder): Use creat() instead of open() to create file.
-
- * providers/local/camel-spool-folder.c (camel_spool_folder_new):
- Check folder != NULL before writing to it.
-
- * providers/local/camel-local-store.c (create_folder): Handle a
- parent of NULL for creating top-level dirs. Part of #31186.
-
- * providers/imap/camel-imap-store.c
- (parse_list_response_as_folder_info): Store the folder flags in
- the store summary.
- (get_one_folder_offline): Set the noselect url parameter if this
- is a noselect folder, from the stored summary flags. #30877.
-
-2002-09-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-filter-charset.c (complete): Handle EILSEQ by eating
- bytes in the input buffer until conversion is successful. The old
- behaviour aborted when it got EILSEQ and just dumped the raw data.
- (filter): Same. Fixes bug #30873.
-
-2002-09-24 Not Zed <NotZed@Ximian.com>
-
- * camel-mime-utils.c (mail_list_magic[]): Changed the Mailing-List
- rule to get the complete domain (* in wrong spot). #31087.
-
- * camel-text-index.c (text_index_compress_nosync): If we have no
- data written to a key, dont add it, or its partition header.
-
-2002-09-23 Not Zed <NotZed@Ximian.com>
-
- * camel-block-file.c (sync_nolock): Mark root block dirty if we're
- going to sync it.
- (camel_key_file_finalise): de-count the active list if we close
- it.
-
- * camel-text-index.c (text_index_delete): Implement.
- (text_index_compress_nosync): Use index_delete when we're finished
- with the old one, so it is properly deactivated.
-
- * camel-index.c (camel_index_delete): Remove api call. Mark index
- deleted in new state variable.
- (camel_index_*): Wrap all calls in check for deleted state.
-
-2002-09-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-folder.c (transfer_message_to): If the original message is
- deleted, reset the deleted flag when we're done. Fixes bug #30876.
-
- * providers/imap/camel-imap-folder.c (add_message_from_data):
- Decode the INTERNALDATE if we've got one.
- (imap_update_summary): Instead of requesting a list of specific
- headers, request HEADER.FIELDS.NOT (RECEIVED) to reduce bandwidth
- usage even more.
- (parse_fetch_response): Change slightly to allow HEADER.FIELDS or
- HEADER.FIELDS.NOT so that we can make changes in
- imap_update_summary and not need to keep changing this function to
- match. Also parse an INTERNALDATE response.
-
-2002-09-22 Dan Winship <danw@ximian.com>
-
- * camel-mime-parser.c (folder_scan_drop_step): fix non-ANSI switch
- statement.
-
- * camel-service.c (service_getv): Likewise.
-
- * providers/imap/camel-imap-store.c (imap_getv): Likewise.
-
- * providers/pop3/camel-pop3-folder.c (cmd_builduid): Likewise.
-
-2002-09-20 Not Zed <NotZed@Ximian.com>
-
- * tests/misc/split.c: New regression test for word
- splitting/search input parsing code.
-
- * tests/folder/test9.c (main): Fix for filter_driver api change.
-
- * camel-search-private.c (camel_search_words_split): Handle "'s
- and \'s to escape characters. For fat, lazy, slobs who dont like
- anything changing.
-
-2002-09-19 Not Zed <NotZed@Ximian.com>
-
- * camel-filter-search.c (camel_filter_search_match): Take new
- session arg. Update callers.
- (symbols[]): changed get-source to header-source
- (header_source): Changed from get_source. Now a boolean, returns
- true if source matches one of the arguments. Uses the provider
- url comparison directly for accurate checking. Makes 'filter on
- source' work.
-
- * camel-filter-driver.c (camel_filter_driver_new): Take new arg,
- session.
- (camel_filter_driver_finalise): Free session.
-
-2002-09-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-folder.c (parse_fetch_response): Don't
- increment the response pointer when deciding what type of header
- response we got, this screws up the string that we strdup into the
- part_spec string later. Also, instead of using the entire blob of
- HEADER.FIELDS that we get in the response, shorten it to just
- HEADER.FIELDS to use as the part_spec key.
-
-2002-09-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-folder.c (CAMEL_MESSAGE_INFO_HEADERS):
- Include MIME-VERSION and CONTENT-TYPE.
-
-2002-09-18 Not Zed <NotZed@Ximian.com>
-
- * providers/imap/camel-imap-command.c
- (camel_imap_command_response): If we get an ALERT, pass it to the
- user. An rfc2060 MUST, and bug #22496.
-
-2002-09-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-folder.c (parse_fetch_response):
- Handle when the response is from a HEADER.FIELDS (if so, we don't
- want to cache the result).
- (imap_update_summary): Request specific headers when building the
- CamelMessageInfo's rather than fetching the full headers.
-
-2002-09-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-part.c (process_header): If header_msgid_decode fails
- for the content-id field, just grab whatever is between the <>'s
- (yes, this means that the content-id is invalid - but what can ya
- do?). Addresses bug #21027.
-
-2002-09-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.c (header_encode_string): Revert a patch that I
- had not meant to commit that was aimed at fixing bug #29234.
-
-2002-09-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-store-summary.c (camel_store_summary_load): Same as
- below. Also save errno before closing the file so our caller can
- figure out why we failed.
- (camel_store_summary_save): Same here, but also flush the output
- stream to disk.
-
- * camel-folder-summary.c (camel_folder_summary_load): s/fclose(in)
- == -1/fclose(in) != 0/ since fclose doesn't necessarily return -1
- on fail, all we really know is that it returns 0 on success and
- non-zero on fail.
-
- * camel-certdb.c (camel_certdb_save): fsync() the stream after we
- fflush it.
-
- * camel-folder-summary.c (perform_content_info_save): Do proper
- error checking and return -1 on fail.
- (camel_folder_summary_save): Check the return of
- perform_content_info_save and a few other output calls within the
- message_info_save loop. If any of them fail, save errno, close the
- file, and return -1. If we finish the loop without fail, fflush
- the stream and then fsync (fflush only flushes user-space buffers,
- you still need to fsync afterward to flush the data to disk). If
- either fail, treat it as an exception by saving errno, closing the
- stream, and returning -1. I suspect that this also fixes bug
- #30150 because the old code would fclose if fflush or fclose
- failed in the check after the loop (man fclose(3) states that any
- further calls using the stream (even another call to fclose) will
- have undefined behaviour no matter what the first fclose call
- returned).
-
- * providers/local/camel-local-summary.c
- (camel_local_summary_init): Don't malloc a private struct of 0
- size.
-
- * providers/imap/camel-imap-folder.c
- (camel_imap_folder_fetch_data): Clear the exception even if we
- failed to get the message (part) from the imap-message-cache if we
- are online and able to try fetching it from the IMAP server.
-
-2002-09-10 Not Zed <NotZed@Ximian.com>
-
- * camel-data-cache.c (data_cache_expire): Remove the hash table
- entry using the right path. Related to #29731.
- (camel_data_cache_remove): "
-
-2002-09-09 Jeffrey Stedfast <fejj@ximian.com>
-
- Fixes bug #4224
-
- * providers/imap/camel-imap-folder.c
- (camel_imap_folder_fetch_data): Pass ex into
- camel_imap_message_cache_get().
-
- * providers/imap/camel-imap-message-cache.c
- (camel_imap_message_cache_get): Now takes an exception and sets it
- on fail.
- (camel_imap_message_cache_copy): Updated to properly handle
- cache_get error conditions.
-
-2002-09-04 Dan Winship <danw@ximian.com>
-
- * camel-mime-utils.c (header_decode_date): Use e_mktime_utc.
-
- * camel-mime-message.c (camel_mime_message_set_date): Use
- e_localtime_with_offset.
-
- * broken-date-parser.c (decode_broken_date): Use e_mktime_utc.
-
-2002-09-04 Not Zed <NotZed@Ximian.com>
-
- * tests/folder/test4.c (main): clear nonfatal stuff.
-
- * tests/folder/test6.c (main): check inbox and 'another folder'
- because some servers do different things w/ inbox.
-
- * providers/imap/camel-imap-message-cache.c
- (camel_imap_message_cache_get): Dont try to open the directory
- instead of an empty "" uid.
-
- * providers/imap/camel-imap-folder.c (imap_get_message): we dont
- want to g_return_if_fail, we need to set an exception and always
- handle the case.
- (get_message_simple): Set an exception if we get a construct
- failure.
- (imap_refresh_info): if we're refreshing inbox, force a reselect.
- this is required for at least cyrus. CHECK doesnt work either :(
-
- * tests/lib/folders.c (test_folder_basic): for non-local stores,
- the folder will have an extra ref for selection, take this into
- account when checking ref leaks.
- (test_folder_message_ops): Dont try to delete folder with messages
- in it, it works generally with imap. also, change params so we
- can test different mailbox types.
- (test_folder_message_ops): disconnect remote services before
- finishing off. doesn't need to stricly but makes ref count
- checking more accurate.
- (test_folder_message_ops): removed explicit remote sync, imap does
- it itself now ...
-
- * providers/imap/camel-imap-store.c:
- (camel_imap_store_finalize): call service_disconnect, so it isn't
- called later in the finalise chain, to properly cleanup on exit.
-
- * camel-mime-parser.c (folder_scan_content): If we fake the from
- eof file boundary, also make sure we say we matched nothing. Also
- make the end case a little more robust to make sure we expired all
- hope of finding a sub-boundary.
-
- * providers/imap/camel-imap-store.c,
- providers/imap/camel-imap-folder.c: Lots of changes, too numerous
- to list. Changed to use camel-imap-store-summary to cache list
- requests. Changed to use a canonicalised url path with / instead
- of per-store directory separator. Indirects folder name so
- invalid folder names can still be accessed. Summary now stored in
- a new expandable format in .ev-store-summary.
-
-2002-08-29 Not Zed <NotZed@Ximian.com>
-
- * tests/folder/test3.c: Change the case sensitive search of
- subject to expect case insensitive results, as the behaviour has
- changed.
- (main): Made the search content before sync nonfatal. its
- something that needs to be fixed but not practical concern in
- evolution.
-
- * camel-block-file.c (block_file_validate_root): Only spit out the
- invalid root warnings if the file isn't empty.
-
- * camel-text-index.c (text_index_compress_nosync): Swap the path
- as well when we compress.
-
- * camel-mime-parser.c (folder_scan_content): Treat the end of file
- as a boundary if we're scanning From lines, and drop the last \n.
- (folder_scan_init_with_fd): Dont pre-read from the fd, and init eof.
- (folder_scan_init_with_stream): Similar.
- (folder_read): Handle eof, and set eof on 0 read.
- (folder_seek): Dont pre-read after a seek, and reset eof flag.
- (camel_mime_parser_init_with_fd): Fix doco, no pre-read occurs
- anymore.
- (camel_mime_parser_init_with_stream): Same.
-
- * providers/local/camel-mbox-summary.c
- (camel_mbox_summary_sync_mbox): Add a \n to end of content of each
- message, not at start.
-
- * providers/local/camel-mbox-folder.c (mbox_append_message):
- Instead of appending "\nFrom " to a mailbox, start with "From ",
- and append a \n after the message always. For better mutt/elm
- compatability. Also, unlock after we've stat'd.
- (mbox_append_message): Set the message's from_pos exactly as the
- mbox size.
-
-2002-08-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-tcp-stream-openssl.c (stream_setsockopt): Fixed `set' to
- hold the correct value when setting the flags.
-
- * camel-tcp-stream-raw.c (stream_setsockopt): Fixed `set' to hold
- the correct value when setting the flags.
-
- * camel-mime-filter-tohtml.c (is_protocol): Match file: urls too.
-
-2002-08-28 Not Zed <NotZed@Ximian.com>
-
- * tests/folder/test8.c (test_add_message): Change message number
- to use hex, so its properly unique.
- (worker): Same here.
-
- * tests/misc/utf7.c: some utf7/utf8 tests.
-
- * providers/imap/camel-imap-utils.c (imap_mailbox_encode): Changed
- to use camel_utf8_utf7 code.
- (imap_mailbox_decode): As above, using camel_utf8_utf7. 'UTF-7'
- isn't a widely support iconv() codeset, and besides the new code
- is simpler.
-
- * camel-utf8.[ch]: robust utilities for working with utf8 and utf7.
-
-2002-08-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-folder-thread.c (camel_folder_thread_messages_new): Now
- takes a third argument to specify whether or not to group messages
- by subject when threading. It seems some people don't want this
- feature (see bug #22791 for details).
- (thread_summary): If thread_by_subject is enabled, group
- un-threaded messages by subject otherwise don't bother.
-
-2002-08-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-command.c
- (camel_imap_response_free_without_processing): If the response is
- NULL, just return. (now works the same way as imap_response_free
- which allowed a NULL response argument). Fixes bug #25491.
-
-2002-08-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-store.c:
-
- * providers/imap/camel-imap-folder.c:
-
- * providers/imap/camel-imap-command.c: Lock the
- CamelService->priv->connect_lock instead of using our own
- command_lock. This fixes bug #28177.
-
-2002-08-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/smtp/camel-smtp-transport.c (smtp_helo): If we fail to
- send the EHLO/HELO command successfully, set transport->connected
- to FALSE when we close the tcp connection. Also updated to work on
- an IPv6 network.
- (smtp_connect): transport->authtypes can be NULL, so NULL-protect
- the call to g_hash_table_size() - this should fix a warning that
- was reported on the evolution@ximian.com mailing list.
- (smtp_set_exception): If the status message is multi-line, add a
- \n between lines.
- (connect_to_server): If we are going to ignore the EHLO/HELO error
- as if it were non-fatal, then we should clear the exception.
-
-2002-08-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-store.c (imap_noop): If current_folder
- is not NULL and the summary for that folder is dirty, sync the
- flags rather than sending a NOOP.
-
- * providers/imap/camel-imap-utils.c (imap_parse_list_response):
- Workaround for Courier imap's brokeness when LSUBing the INBOX
- folder when it isn't subscribed to. Fixes bug #28929.
-
-2002-08-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-store.c (connect_to_server): If
- imap_get_capability() fails, after unlocking the command_lock,
- disconnect the service.
-
-2002-08-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-session.c (get_service): Don't register the noop timeout
- here anymore, we're gonna handle all this in the mailer now.
- (camel_session_register_timeout): Removed.
- (camel_session_remove_timeout): Removed.
-
-2002-08-28 Not Zed <NotZed@Ximian.com>
-
- * providers/imap/camel-imap-store.c (construct): Load store
- summary if it exists.
- (can_work_offline): Just see if we have any folders to say whether
- we can work offline or not. Should probably always just return
- true.
-
-2002-08-27 Not Zed <NotZed@Ximian.com>
-
- * providers/imap/camel-imap-store-summary.[ch]: New files to
- handle offline definition of folders, etc.
-
- * camel-url.h: Define CamelURL to be struct _CamelURL rather than
- anonymous struct.
-
- * camel-store-summary.[ch]: a few api tweaks. Also, the summary
- header is versioned separately at each level, so that version
- upgrades can be handled separately. Renamed FolderInfo ->
- StoreInfo to avoid namespace with current FolderInfo code. This
- should be reversed when the FolderInfo code is rationalised to
- this new base.
-
-2002-08-23 Not Zed <NotZed@Ximian.com>
-
- * providers/imap/camel-imap-command.c (camel_imap_command): domt
- encode folder name.
-
- * providers/imap/camel-imap-folder.c (do_copy): dont encode folder
- name.
- (do_append): dont encode folder name.
-
- * providers/imap/camel-imap-store.c (get_folder_status): don
- encode folder name in imap request.
- (get_folder_online): here too for creating folder.
- (rename_folder): Assume the incoming 'new name' is a utf8 path,
- whereas the 'old name' is as from get folder info (raw).
- (create_folder): Dont encode parent_name, assume its the raw
- thing.
-
-2002-08-22 Not Zed <NotZed@Ximian.com>
-
- * providers/imap/camel-imap-store.c (get_folder_online): Select
- based on unconverted name.
- (imap_build_folder_info): New function to create a folderinfo
- properly based on raw name.
- (subscribe_folder): Use above helper.
- (imap_folder_effectively_unsubscribed): Same here.
- (imap_forget_folder): Same here.
- (get_one_folder_offline): "
-
-2002-08-21 Not Zed <NotZed@Ximian.com>
-
- * providers/imap/camel-imap-store.c
- (parse_list_response_as_folder_info): Setup path properly, as
- decoded path with / separator. Setup full_name as non-decoded raw
- name. Keep url as decoded path but with server separator
- ... (ick).
- (create_folder): Dont call build_path anymore, get_folders() does
- it for us.
- (subscribe_folder): Build the path ourself.
- (imap_folder_effectively_unsubscribed): Same here.
- (get_subscribed_folders): list using %S not %F, we're using the
- raw server provided name directly.
- (subscribe_folder): As above, for SUBSCRIBE.
- (unsubscribe_folder): Same here.
- (delete_folder): Same.
- (rename_folder_info): Same here for source name.
- (rename_folder): And here?
- (get_folders_online): Amd here.
-
- * providers/imap/camel-imap-utils.c:
- (imap_parse_list_response): Dont decode the mailbox.
-
- * camel-utf8.[ch]: some new utf8 & utf7 utilities.
-
- * providers/imap/camel-imap-utils.c (imap_mailbox_encode):
- (imap_mailbox_decode): use camel_utf7/8* functions instead.
- : Add config.h and alloca.h headers.
-
-2002-08-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-store.c (imap_noop): Override the
- default noop implementation.
-
- * camel-store.c (camel_store_noop): New virtual method to ping a
- store.
-
- * camel-session.c (get_service): Register a timeout that calls
- camel_store_noop() every 10 minutes.
-
-2002-08-19 Peter Williams <peterw@ximian.com>
-
- Plug some large leaks in the indexing code.
-
- * camel-mime-filter-index.c (camel_mime_filter_index_set_index): Unref
- the old index if necessary.
-
- * camel-text-index.c (camel_text_index_get_type): Give it the correct
- parent type so that finalize handlers chain.
- (camel_text_index_name_get_type): Here too.
- (camel_text_index_cursor_get_type): Here too.
- (camel_text_index_key_cursor_get_type): Here too.
-
-2002-08-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-store.c (get_folders): Don't let the
- minimum recursive depth be negative.
- (get_folders): Pass flags & CAMEL_FOLDER_INFO_SUBSCRIBED as the
- `lsub' argument to get_folders_online() otherwise we'll end up
- doing a LIST when we really wanted to do an LSUB.
-
- * camel-session.c: Set CAMEL_URL_NEED_PATH for the vFolder
- provider.
-
-2002-08-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-store.c: Changed the STOREINFO_VERSION
- - should fix bug #28571, but if it doesn't - oh well, I don't
- care. I'm considering it fixed no matter what.
-
- * camel-gpg-context.c (gpg_sign): If the diagnostics are empty,
- just explain that gpg failed to execute.
- (gpg_encrypt): Same.
- (gpg_decrypt): And here too.
-
- * tests/lib/camel-test.c (camel_test_init): Updated to pass the
- needed arguments to camel_init() and to init gthreads before camel
- (since camel expectes it to be initialised already).
-
- * tests/lib/session.c: #include <config.h> needed for
- ENABLE_THREADS so that sizeof (CamelSessionClass) gives the
- correct size.
-
- * tests/*: Updated to work with camel API changes.
-
-2002-08-16 Dan Winship <danw@ximian.com>
-
- * camel-session.c (get_service): If the passed-in URL contains a
- path, but the service doesn't allow paths, then the path part must
- be a folder name, and we should ignore it here. #29010
-
-2002-08-16 Chris Toshok <toshok@ximian.com>
-
- * camel-arg.h: remove the outer parens from the expansion of
- camel_argv_{start,end} since at least on freebsd va_end is
- #defined to be nothing, so (va_end(..)) causes a syntax error.
-
-2002-08-16 Not Zed <NotZed@Ximian.com>
-
- * providers/imap/camel-imap-store.c (get_folders): Fix the logic
- check for working out if we add inbox or not, we do it if we
- listed the namespace.
-
-2002-08-15 Not Zed <NotZed@Ximian.com>
-
- * camel-store.h (CamelFolderInfo): added a flags field, defined
- some flags, currently only used by imap. This and below is first
- step to getting incremental folder tree loading.
-
- * providers/imap/camel-imap-store.c (get_subscribed_folders): If
- the subscribed list is empty, always add inbox.
- (imap_connect_offline): If the 'storeinfo' namespace isn't the
- same as our own (if its set), then ignore it, assume we changed
- settings. Otherwise you can't change the namespace ...
- (get_folders): allow the env variable CAMEL_IMAP_MAX_DEPTH to
- override the default maximum recursion depth if 10 levels.
- (camel_imap_store_readline): Dont depend the log debug on d(x)
- being defined.
- (get_folder_info_online): changed to use new functions/names.
-
-2002-08-14 Not Zed <NotZed@Ximian.com>
-
- * providers/imap/camel-imap-store.c (get_subscribed_folders):
- Removed the by_hand sillyness. Return an array instead.
- (get_folders): New method to get folders recursively without
- having to use '*'. Uses '%', and stops if it gets too deep
- (current max of 10).
- (get_folder_counts): New method to fill out unread counts on
- folderinfo tree.
- (get_subscribed_folders): Fix some failure logic.
-
- * providers/imap/camel-imap-utils.[ch]: Changed IMAP_LIST_FLAGS to
- use the new CamelFolderInfoFlags directly.
-
-2002-08-09 Peter Williams <peterw@ximian.com>
-
- * providers/imap/camel-imap-folder.c (get_temp_uid): New function,
- generate a UID that has better chances of being unique.
- (imap_append_offline): Use it here.
- (imap_transfer_offline): And here.
-
-2002-08-09 Peter Williams <peterw@ximian.com>
-
- * providers/imap/camel-imap-store.c
- (get_folder_info_online): Tweak how we build the tree based on whether
- a full tree or a subtree is being requested. Fixes subscribe dialog
- on UW servers.
- (get_one_folder_offline): Don't add folders that we're not subscribed
- to; fixes UW folders that weren't being marked as NoSelect because
- the storeinfo doesn't record that information.
-
-2002-08-09 Peter Williams <peterw@ximian.com>
-
- * providers/imap/camel-imap-folder.c (imap_rename): When renaming our
- cache, add the "/folders" to the path.
-
-2002-08-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-folder.c (camel_imap_folder_init): Set
- some default permanent_flags. This is the other cause of bug
- #28038.
- (imap_refresh_info): After calling camel_imap_command() with a
- NULL format value (this is a shortcut to change the current_folder
- by SELECTing it), call camel_imap_folder_selected(). This may have
- been why permanent_flags never got set on the folder even after
- going online in bug #28038.
- (imap_update_summary): Same here. Also NULL-guard
- camel_imap_response_free().
-
-2002-08-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.c (header_encode_param): Oops - outbuf pointed
- to alloca'd memory but we were g_free'ing it after using
- it. Instead use g_malloc for this outbuf buffer since it may be
- kinda large. Also don't depend on a single byte to nul-terminate
- the outbuf buffer so as to be safe with charsets such as UCS2 and
- UCS4, instead keep a pointer to the end of the buffer.
-
- * providers/imap/camel-imap-folder.c (parse_fetch_response): Only
- add the stream to the gdatalist if it is non-NULL.
-
-2002-08-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/sendmail/camel-sendmail-transport.c
- (sendmail_send_to): If writing to the sendmail pipe fails, wait
- for the sendmail process to exit before returning. Fixes bug
- #19636.
-
-2002-08-06 Not Zed <NotZed@Ximian.com>
-
- * providers/pop3/camel-pop3-folder.c (cmd_list): Add messageinfo
- to id table, and store array index in messageinfo too.
- (fi_to_index): Removed, use index member of messageinfo, fixed
- callers.
- (cmd_builduid): Parse the headers of the data, and ignore any
- status or x-status headers.
- (uid_to_fi): Removed, use the hashtable instead.
- (id_to_fi): Same.
- (cmd_uidl): Add messageinfo to uid table.
- (pop3_refresh_info): Setup hash tables, and fill out uid table for
- nonuid capable servers.
- (pop3_finalize): Destroy hash tables. Only free resources if the
- uids table is not null (if finalised before we ran refresh info).
- (id_to_fi): Removed. Use id hash table instead, fixed caller.
-
-2002-08-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel.c (camel_init): Always set a g_atexit handler to
- flush/save the camel-certdb.
-
- * providers/imap/camel-imap-store.c (get_folder_info_online): If
- we are asking for the toplevel folders, use the IMAP store's
- namespace as the toplevel folder rather than an empty
- string. Fixes bug #28574.
- (imap_forget_folder): Rearrange the code so that name can never be
- used uninitialised.
-
- * providers/imap/camel-imap-utils.c (imap_namespace_concat):
- Removed.
-
-2002-08-05 Dan Winship <danw@ximian.com>
-
- * camel-folder-summary.h (CamelMessageFlags): Add
- CAMEL_MESSAGE_ANSWERED_ALL, for folders that can distinguish a
- reply-to-sender from a reply-to-all. (eg, Exchange)
-
- * providers/local/camel-local-folder.c (local_init): Add
- ANSWERED_ALL to permanent_flags too.
-
-2002-08-02 Jeffrey Stedfast <fejj@ximian.com>
-
- Fixes bug #26237.
-
- * providers/imap/camel-imap-command.c
- (imap_command_strdup_vprintf): Don't prepend any namespace shit in
- the %F case.
-
- * providers/imap/camel-imap-utils.c (imap_parse_list_response):
- Don't strip off the namespace.
-
-2002-08-01 Peter Williams <peterw@ximian.com>
-
- * providers/imap/camel-imap-store.c (create_folder): If the folder
- name contains the directory separator, reject it.
-
-2002-08-02 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-mbox-summary.c (mbox_summary_check): Clear
- the summary after building the 'removed uid' list.
-
- * camel-folder-summary.c (message_info_load): revert jeff's patch
- below, and do it slightly differently, and stop the auto-reformatting
- bullshit.
-
-2002-08-02 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-maildir-summary.c (message_info_new): If
- we get a duplicate, just re-use the old info.
- (remove_summary): Add any removed to a change list.
- (maildir_summary_check): If we find new ones in 'cur' track them
- in the change list. Removed FIXME about it. For #18348.
-
-2002-08-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-folder-summary.c (message_info_load): Do more error
- checking to prevent crashing if we fail to read a string for
- example.
-
-2002-07-29 Peter Williams <peterw@ximian.com>
-
- Fix bug #28238
-
- * providers/imap/camel-imap-store.c (imap_forget_folder): New
- function, breaking out the code in delete_folder() to handle when
- a folder is removed.
- (imap_folder_effectively_unsubscribed): New function, breaking out
- the code in unsubscribe_folder() to handle when a folder is
- unsubscribed.
- (imap_check_folder_still_extant): New function, check whether a
- folder exists by LIST'ing it.
- (imap_store_refresh_folders): Add code here to check if the folder
- still exists if we're unable to refresh its info. If so, pretend
- that it was unsubscribed (to get the mailer to remove it from
- the tree) and delete its cache. If somehow this goofs up, the
- worst that can happen is that we must redownload the headers.
- (get_folder_status): If we can't get the status, behave as above.
- (delete_folder): Call imap_forget_folder() where the bulk of this
- code has gone.
- (unsubscribe_folder): Call imap_folder_effectively_unsubscribed()
- where the bulk of this code has gone.
-
-2002-07-31 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-folder.c (parse_fetch_response):
- Disable my fix to not cache headers as it means that each time we
- load the message, we've got to re-fecth the headers.
-
- * camel-mime-filter-tohtml.c (is_addr_char): Don't use
- "isprint(c)" to mean "c >= 32 && c < 128" since it doesn't in most
- locales.
- (is_url_char): Same.
- (is_trailing_garbage): Same.
- (is_domain_name_char): New macro for dns-valid characters
- (email_address_extract): Use is_domain_name_char rather than
- is_addr_char for the part after the @.
-
-2002-07-30 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-tcp-stream.c (camel_tcp_address_new): Update the comment.
-
- * camel-tcp-stream-raw.c (socket_connect): If building with IPv6
- support and the address is an IPv6 address, connect using a
- sockaddr_in6 otherwise use the standard IPv4 sockaddr_in
- structure.
- (stream_get_local_address): Fix to work with IPv6 addresses.
- (stream_get_remote_address): Same.
-
- * camel-tcp-stream-openssl.c (socket_connect): Same as above.
- (stream_get_local_address): Fix to work with IPv6 addresses.
- (stream_get_remote_address): Same.
-
- * camel-tcp-stream-ssl.c (stream_connect): If building with IPv6
- support and the address is an IPv6 address, initialise the
- PRNetAddr accordingly.
- (stream_get_local_address): Fix to work with IPv6 addresses.
- (stream_get_remote_address): Same.
-
-2002-07-30 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-tcp-stream-openssl.c (ssl_verify): X509_digest() needs a
- pointer to an int len. Also fixed some other compiler errors.
-
- * camel-certdb.h: #include <stdio.h>
-
-2002-07-30 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-certdb.c: New source file implementing a very basic
- certificate database. This is mostly just here because the Mozilla
- NSS certdb seems to not be working for everyone's Evolution
- install (works fine for me and Ettore but not many other people).
-
- * camel-tcp-stream-ssl.c (ssl_bad_cert): If we have this
- certificate in our own CamelCertDB, then get the trust value from
- that and only prompt the user if the trust is unknown.
-
- * camel-tcp-stream-openssl.c (ssl_verify): Same.
-
- * camel.c (camel_init): Create our default certdb.
-
-2002-07-30 Peter Williams <peterw@ximian.com>
-
- * providers/imap/camel-imap-folder.c (imap_transfer_offline): Use
- the same command-counter mojo that the append code uses in case
- the use tries to copy the same message to the folder repeatedly.
-
-2002-07-29 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-filter-driver.c (unset_flag): New filter action to unset a
- system flag. The exact opposite of set_flag.
-
-2002-07-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/local/camel-local-store.c (get_folder): If the path
- exists and is a directory, return non-NULL. Missed this before
- which is how we could return NULL even on success. Oops.
-
-2002-07-26 Peter Williams <peterw@ximian.com>
-
- * providers/imap/camel-imap-summary.c
- (camel_imap_summary_add_offline_uncached): The flags'n'tags
- copy was unnecessary. Removed it.
-
-2002-07-25 Jeffrey Stedfast <fejj@ximian.com>
-
- If we're gonna do an elite hack, lets do it right.
-
- * providers/local/camel-local-store.c (get_folder): On success,
- return non-NULL so that our caller doesn't have to depend on 'ex'
- being non-NULL in order to work correctly.
-
- * providers/local/camel-mbox-store.c (get_folder): Don't bother
- checking if an exception was set, just use the return value of
- camel-local-store's get_folder.
-
- * providers/local/camel-maildir-store.c (get_folder): Same as the
- mbox change.
-
- * providers/local/camel-mh-store.c (get_folder): Here too.
-
-2002-07-25 Peter Williams <peterw@ximian.com>
-
- * providers/imap/camel-imap-summary.h
- (camel_imap_summary_add_offline_uncached): Prototype.
-
- * providers/imap/camel-imap-summary.c
- (camel_imap_summary_add_offline_uncached): New function to add an
- uncached message to the summary while offline.
-
- * providers/imap/camel-imap-store.c (imap_connect_online): Only
- refresh the folders if the disco diary is empty (ie, we're not
- resyncing.)
-
- * providers/imap/camel-imap-folder.c (imap_transfer_offline): Emit
- an event for the source if deleting its originals. Also, if we
- can't load the message, still process it, using the new imap
- summary function.
-
-2002-07-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/smtp/camel-smtp-transport.c: Remove "possibly
- non-fatal" exception strings, all exceptions are fatal unless
- their caller decides otherwise.
- (connect_to_server): If smtp_helo() fails due to us getting
- disconnected, treat the exception as fatal.
- (smtp_connect): Abort if smtp_helo() fails and we got
- disconnected.
- (smtp_send_to): If smtp_mail() fails, abort the send operation.
- (smtp_set_exception): If respbuf was NULL, then we got
- disconnected and so update our state accordingly.
- (smtp_disconnect): Only send a QUIT if we are still in the
- connected state (or, at least think we are).
-
-2002-07-24 Peter Williams <peterw@ximian.com>
-
- * providers/imap/camel-imap-folder.c
- (imap_expunge_uids_resyncing): It would help to mark the UIDs as
- deleted before we try to expunge them
- (in the case when no other UIDs were marked deleted this didn't
- happen.) Also fix an FMR.
- (imap_expunge_uids_offline): Trigger a folder_changed event with
- our own changeinfo because camel_imap_response_free won't be able
- to do that for us.
-
-2002-07-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-filter-driver.c (do_shell): Renamed from
- shell_exec(). Also, we now want to pass argc/argv on to the
- CamelFilterDriverShellFunc.
- (camel_filter_driver_set_shell_func): Renamed a bit.
-
- * camel-filter-search.c (pipe_message): Renamed from shell_exec().
-
-2002-07-25 Not Zed <NotZed@Ximian.com>
-
- * camel-folder-summary.c (camel_folder_summary_save): When writing
- the summary, use TRUNC flag, duh. Also, write to a temp file
- first, and rename when closed successfully, and check ferror() and
- fclose() against 0 rather than -1.
-
- * providers/local/camel-mbox-summary.c (summary_update): Decrement
- i if we remove the summary item so we dont skip every 2nd one.
-
- * camel-mime-utils.c (header_decode_mailbox): Use
- rfc2047_decode_word explicitly incase we just found an encoded
- word. Stops us re-decoding the string twice, which fixes memory
- corruption in #26330 when the HUGE string is used later.
-
-2002-07-24 Not Zed <NotZed@Ximian.com>
-
- * camel-partition-table.c (camel_key_table_next): Didn't unlock if
- we exited on an empty key list.
-
- * providers/imap/camel-imap-folder.c (imap_expunge_uids_online):
- Sync before doing an expunge if we dont have uidplus. See #25766.
- (imap_expunge_uids_resyncing): Same here.
-
- * providers/imap/camel-imap-store.c (get_folder_info_online):
- Duplicated the very much hack in imap_store_refresh_folders() to
- avoid a deadlock in #27959. A decent fix has to wait for a
- rewrite.
- (get_folder_online): Move folders to a subdirectory of
- storage_path, rather than in it. Bye bye everyones settings. See
- 24947.
- (get_folder_offline): And here too.
- (delete_folder): And here too.
- (rename_folder): and here too.
- (get_folder_info_offline): And here too. I love code reuse.
-
-2002-07-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-tcp-stream.c: #include <string.h> for memcpy.
-
-2002-07-22 Not Zed <NotZed@Ximian.com>
-
- * camel-vee-folder.c (vee_set_message_user_tag): Oops, forgot to
- implement this. Fixes #24604.
-
-2002-07-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-filter-crlf.c (filter): Only add a \r if the
- character before the \n wasn't already a \r - this covers for when
- people add DOS files as attachments. Fixes bug #28056.
-
-2002-07-19 Not Zed <NotZed@Ximian.com>
-
- * camel-mime-part-utils.c (convert_buffer): Changed to use a
- different length calculator.
-
-2002-07-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-lock.c: Add the appropriate #include for the _() macro.
-
-2002-07-17 Not Zed <NotZed@Ximian.com>
-
- * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): Got
- rid of the stupid "tryagain" semantics, which didn't work.
- (pop3_connect): Fixed here to only retry under proper conditions.
-
-2002-07-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-filter-canon.c (filter): When CRLF encoding, "empty"
- (after stripping trailing whitespace characters) lines need to end
- in CRLF also, not just lines with data in them.
-
-2002-07-16 Peter Williams <peterw@ximian.com>
-
- * providers/imap/camel-imap-folder.c (imap_sync_online): Clean
- up some improper usage of CamelExceptions (looking at
- camel_exception_is_set when ex = NULL).
-
- * providers/imap/camel-imap-store.c (get_folder_online): Here too.
-
- * providers/imap/camel-imap-message-cache.c
- (camel_imap_message_cache_new): Nothing sets the exception so
- don't bother to check it at the end of this function. Prevents
- a warning about checking a NULL exception's value.
-
-2002-07-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/smtp/camel-smtp-transport.c (smtp_helo): Make the
- standard AUTH format take priority over the AUTH= priority, since
- sometimes servers only list a subset of the supported authtypes in
- the AUTH= response while they list all authtypes in the standard
- AUTH response. Fixes "bug" #27841.
-
-2002-07-15 Peter Williams <peterw@ximian.com>
-
- * providers/imap/camel-imap-folder.c (imap_get_message): If we're
- not online and the message isn't in our cache, give up.
-
-2002-07-15 Not Zed <NotZed@Ximian.com>
-
- * camel-filter-search.c (get_label): Removed.
- (get_score): Removed. Labels & scores are stored in tags, we
- already have a function to get tags.
- (user_tag): Fail if we dont get valid arguments, it must be a
- string type.
- (system_flag): Same here.
-
-2002-07-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.c (header_msgid_generate): Try to get the FQDN
- from the results of gethostname(). If that fails, then fall back
- to the results gotten from gethostname() or if that fails just use
- "localhost.localdomain". Addresses bug #17416.
- (header_decode_param): Protect against a NULL value.
-
- * providers/smtp/camel-smtp-transport.c (smtp_data): Get rid of
- the constant 'required' variable, just use the value when calling
- set_best_encoding.
-
- * providers/local/camel-local-provider.c: Changed the mbox and
- spool provider descriptions to try and be more clear. I'm not sure
- I like the mention of Evolution in the mbox provider description,
- but there was no other way to make it clear that it MOVED mail out
- of the mbox folder into a folder managed by Evolution without
- mentioning Evolution. *sigh* Anyways, to me "retrieve" means move,
- but apparently this isn't clear to the weak minded.
-
-2002-07-15 Peter Williams <peterw@ximian.com>
-
- * providers/imap/camel-imap-folder.c (imap_rescan): >= is not
- appropriate here because the sequences are 1-based; so seq =
- summary_len is valid. Hopefully addresses 15646, because this
- caused the last message in a folder to be reloaded, replacing its
- CamelMessageInfo, and the tree view was using the old
- CamelMessageInfo.
-
-2002-07-13 Not Zed <NotZed@Ximian.com>
-
- * camel-folder-summary.c
- (camel_folder_summary_info_new_from_message): Only assign a uid if
- indexing is enabled. This stops us always assigning a uid in the
- imap folder and disco folder?
-
- * providers/imap/camel-imap-folder.c (imap_update_summary): Also
- check the uid is set at all, another bit of a fix for #15667.
-
-2002-07-09 Not Zed <NotZed@Ximian.com>
-
- * providers/imap/camel-imap-folder.c (imap_update_summary): Check
- for existing messages of the same uid before doing anything. If
- it exists, do nothing (perhaps it should merge?). A dirty hack for
- #15667.
-
-2002-07-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-multipart-encrypted.c (camel_multipart_encrypted_decrypt):
- On error, do not unref the parts gotten using
- camel_multipart_get_part() since that function does not ref the
- parts. Also don't forget to reset the decrypted stream before
- trying to parse it ;-)
-
-2002-07-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-multipart.c (camel_multipart_class_init): Updated to not
- use camel_type_get_global_classfuncs() since this is just a cast
- macro now.
-
- * providers/imap/camel-imap-folder.c (get_content): Handle
- multipart/encrypted parts too.
-
- * camel-mime-part-utils.c
- (camel_mime_part_construct_content_from_parser): Handle
- multipart/encrypted types too.
-
-2002-07-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/smtp/camel-smtp-transport.c (smtp_data): Don't let any
- parts have a binary encoding.
-
-2002-07-11 Jeffrey Stedfast <fejj@ximian.com>
-
- Fixes bug #27672
-
- * camel-mime-filter-bestenc.c: Conditionally #include <config.h>
-
- * camel-mime-filter-linewrap.c: Same here... although we could
- probably just get rid of this filter? We don't seem to use it
- anywhere since we try to QP/Base64 encode any text parts with long
- lines. Besides, we couldn't use this filter for SMTP anyway since
- we can't risk possibly linewrapping a binary mime part. I dunno,
- maybe this could be useful in the composer though? *shrug*
-
- * providers/smtp/camel-smtp-transport.c (smtp_data): Always call
- camel_mime_message_set_best_encoding() even if the server allows
- 8BITMIME and even if we don't have any 8bit parts because we may
- have parts with long lines (>998 octets) which also need to be
- encoded.
-
- * camel-mime-message.c (check_8bit): Don't forget to check for the
- binary encoding here as well.
-
-2002-07-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-folder.c (parse_fetch_response): If we
- are fetching HEADERs, don't cache the stream - instead just create
- a mem-stream and return that. This reduces a significant amount of
- overhead due to disk i/o.
-
- * camel-multipart-encrypted.c (camel_multipart_encrypted_decrypt):
- Don't forget to set an appropriate exception before returning
- NULL.
-
-2002-07-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-filter-driver.c (get_message_cb): Make sure message is
- non-NULL before setting the source on it.
-
- * camel-gpg-context.c: Renamed stdin to stdin_fd, stdout to
- stdout_fd, and stderr to stderr_fd in struct _GpgCtx since
- Solaris' stdin/stdout/etderr variables seem to be macros and are
- thus breaking the compilation.
-
-2002-07-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/nntp/camel-nntp-provider.c: Set the IS_SOURCE provider
- flag.
-
- * providers/pop3/camel-pop3-store.c: Change all exceptions to
- report which POP server failed (and tried to make a few of the
- exceptions a bit more clear).
-
-2002-07-03 Not Zed <NotZed@Ximian.com>
-
- * camel-vee-folder.c (vee_sync): If we get an exception from the
- child sync, update the exception string so we know where it really
- was.
-
- * camel-vee-store.c (change_folder): Util to emit created/deleted
- events.
- (vee_get_folder): If the folder has path elements, and its parents
- dont exist, create dummy no-select nodes. This is for bug #4246.
- (vee_delete_folder): Use change_folder() to save code.
-
- * providers/local/camel-mbox-folder.c (mbox_set_message_flags):
- Only set xevchange if we're storing status headers in pine format,
- so we dont do a full sync every time any flag changes.
-
-2002-06-27 Not Zed <NotZed@Ximian.com>
-
- * camel-object.c (camel_object_hook_event): Take a void object arg.
- (camel_object_remove_event): "
- (camel_object_unhook_event): "
- (camel_object_trigger_event): ", also, execute events in the same
- order they were added, i.e. reverse hook-list order.
-
-2002-06-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-gpg-context.c (gpg_ctx_get_argv): Don't use
- --no-auto-key-retrieve, this option has apparently been deprecated
- in gpg 1.0.7.
-
-2002-06-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-gpg-context.c (gpg_ctx_op_step): Loop on our reads while
- errno is EINTR or EAGAIN. Also make sure to completely read stdout
- and stderr by keeping better state.
- (gpg_ctx_parse_status): In the case of a NODATA response from gpg,
- try to use the diagnostics that gpg may have written to its
- stderr.
- (gpg_verify): Check that the gpg process has not exited.
- (gpg_ctx_op_wait): Make sure we haven't already exited (as by
- gpg_ctx_op_is_exited()) and if we have, retrieve the exit status
- from the gpg context.
-
-2002-06-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-pgp-context.[c,h]: Removed.
-
- * camel-pgp-mime.c (pgp_mime_part_sign_restore_part): Removed.
- (pgp_mime_part_sign_prepare_part): Removed.
- (camel_pgp_mime_part_sign): Removed.
- (camel_pgp_mime_part_verify): Removed.
- (camel_pgp_mime_part_encrypt): Removed.
- (camel_pgp_mime_part_decrypt): Removed.
- (camel_pgp_mime_is_rfc2015_signed): Documented.
- (camel_pgp_mime_is_rfc2015_encrypted): Same.
-
-2002-06-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-multipart-encrypted.c (camel_multipart_encrypted_encrypt):
- Oops, this needs to take a userid argument.
-
- * camel-gpg-context.c (gpg_clearsign): Removed (never did anything
- anyway).
-
- * camel-pgp-context.c (pgp_clearsign): Removed.
-
- * camel-cipher-context.c (camel_cipher_clearsign): Removed unused
- method.
-
- * camel-multipart-encrypted.[c,h]: New class implementing the
- multipart/encrypted content type. Contains methods for encrypting
- and decrypting a multipart/encrypted MIME object.
-
- * camel-gpg-context.c (gpg_ctx_parse_status): Check for NODATA
- too.
-
-2002-06-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/local/camel-local-provider.c: Remove the #include for
- camel-spoold-store.h
-
-2002-06-26 Not Zed <NotZed@Ximian.com>
-
- * camel-gpg-context.c: Include <sys/time.h> for struct timeval.
-
- * providers/local/camel-local-provider.c
- (camel_provider_module_init): Removed spoold provider. The spool
- provider does it now.
- (): Spoold doesn't exist anymore, remove its header.
-
-2002-06-25 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-spool-folder.c (camel_spool_folder_new):
- Support a new xstatus option - folders update/honour the
- Status/X-Status headers in addition to X-Evolution.
-
- * providers/local/camel-local-summary.c
- (camel_local_summary_write_headers): If supplied with an
- additional status or xstatus arg, write a Status header and/or
- X-Status. Also fix the case of properly terminating the headers
- if an xev line isn't supplied.
-
- * providers/local/Makefile.am (libcamellocalinclude_HEADERS,SOURCES):
- Removed spoold-store.[ch].
-
- * providers/local/camel-local-provider.c
- (camel_provider_module_init): For the spoold type, just use the
- spool store instead.
-
- * providers/local/camel-spool-store.h: Added a type field, so the
- 1 store can implement different types without having to subclass.
-
- * providers/local/camel-spool-store.c
- (camel_spool_store_get_toplevel_dir): Removed, inherits from local
- store now.
- (construct): If we're pointing to a file, treat it as mbox mode,
- otherwise treat it as 'elm' mode.
- (get_folder): Only test for INBOX in mbox mode.
- (get_folder_info_elm):
- (get_folder_info_mbox): Two alternatives for getting folder info,
- depending on the type of folder we're looking at.
- (get_folder_info_mbox): Make the url include the protocol.
- (scan_dir): "
-
- * providers/local/camel-spoold-store.c
- (camel_spoold_store_get_toplevel_dir): Removed, inherits from
- local store now.
-
- * camel-folder.c (get_message_user_tag): Dont use a
- g_return_if_fail for info==NULL. This is not an error.
- (set_message_user_tag): And same here.
- (set_message_user_flag): Sigh, and here.
- (get_message_user_flag): And here.
- (set_message_flags): and here ...
- (get_message_flags): Dum de dum, de done at last.
-
- * providers/local/camel-mbox-folder.c (mbox_get_message): Check
- for new messages whenever we retrieve one. In the common
- no-update case, this is a single stat.
- (mbox_get_message): If we need to rescan, then force a full rescan
- to make sure it does the right thing.
- (mbox_get_message): Cleanup the exception handling a bit, if we do
- get an error, propagate any folder changes anyway as well.
- (mbox_set_message_user_flag): Argh more of these stupid g_returns
- taht shouldn't be.
- (mbox_set_message_user_tag): Here too.
- (mbox_set_message_flags): If the read flag is being changed, mark
- it as an xevchange (i.e. Status line change).
-
- * providers/local/camel-mbox-summary.c (summary_rebuild): Merged
- into summary_update.
- (summary_update): Changed to allow it to update existing lists of
- messages without clearing out the summary.
- (mbox_summary_check): Dont clear the summary, just re-scan.
- (message_info_new): Attempt to support the 'Status: RO' elm/pine
- thing.
- (camel_mbox_summary_encode_status):
- (camel_mbox_summary_decode_status): Util functions for
- creating/parsing the Status line.
- (camel_mbox_summary_sync_mbox): Write out the status line if we're
- going to try support it.
- (camel_mbox_summary_xstatus): Implement option to control
- read/write of (x-)status.
- (message_info_new): Do x-status stuff based on run-time option.
- (camel_mbox_summary_sync_mbox): "
- (mbox_summary_add): If x-status enabled, then always add
- status/x-status headers to message.
-
- * camel-folder-summary.c (summary_assign_uid): If the messageinfo
- is already in the summary, AND is the same messageinfo, dont do
- anything, return a value to indicate this.
- (camel_folder_summary_add): Do nothing if this info already in the
- summary, so we can perform updates.
-
-2002-06-24 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-local-summary.c
- (camel_local_summary_check_force): New method to force the next
- summary check to be a full check, set if a mismatch occurs.
-
- * camel-folder-summary.c (camel_folder_summary_load): If we have
- no summary path set, dont do any i/o, rather than abort.
- (camel_folder_summary_save): "
- (camel_folder_summary_header_load): "
-
- * providers/local/camel-spool-store.h: Inherit from camel mbox
- store, even if we override almost everything.
-
- * providers/local/camel-local-folder.c
- (camel_local_folder_construct): If the base path points to a file,
- use that as the folder path as well.
-
- * providers/local/camel-spool-folder.h: Inherit from
- camel-mbox-folder.
-
- * providers/local/camel-spool-summary.c (spool_summary_sync_full):
- Use camel_mbox_summary_sync_mbox to do most of the work.
-
- * providers/local/camel-spool-summary.[ch]: Make spool-summary
- inherit from mbox summary rather than foldersummary.
-
- * providers/local/camel-mbox-summary.c (mbox_summary_sync): Make
- sync_full/quick virtual methods.
- (camel_mbox_summary_sync_mbox): The full sync method put into a
- simple function that sync's from fd to fd.
- (mbox_summary_sync_full): Use summary_sync_mbox to do the real
- work.
- (mbox_summary_check): Create removed events if the folder gets
- cleared. Also, dont clear the summary before a rebuild, try to
- merge.
-
-2002-06-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-gpg-context.c: #include <sys/time.h>
-
-2002-06-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-gpg-context.c (gpg_hash_str): Return the option as
- --digest-algo=<micalg>
- (gpg_ctx_parse_status): Decode more status information and keep
- track of trust and such.
- (gpg_ctx_op_complete): Make sure we aren't waiting for gpg to
- write data to stdout (such as encrypted/decrypted data or a
- signature).
- (gpg_encrypt): Remove the fejj@stampede.org hard-coded value
- (which had only meant to be for testing).
-
-2002-06-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-gpg-context.c (gpg_ctx_get_argv): Use --command-fd rather
- than --passphrase-fd since what we really want is an interactive
- mode (besides, --passphrase-fd requires a passphrase to be sent
- before --status-fd will send a NEED_PASSPHRASE status message).
- (gpg_ctx_parse_status): When we encounter a BAD_PASSPHRASE, tell
- the session to uncache it.
- (camel_gpg_context_set_always_trust): Implemented.
-
-2002-06-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-gpg-context.c (gpg_ctx_parse_status): Check for ERRSIG
- also.
- (gpg_ctx_op_step): Don't try writing a passphrase unless our
- operation requires it.
-
-2002-06-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-gpg-context.c (gpg_encrypt): Return -1 on error.
- (gpg_decrypt): Same.
- (gpg_sign): Again here.
- (gpg_ctx_op_step): Only attenmpt to read from the status-fd if we
- are not already 'complete'.
-
- * camel-pgp-mime.c (camel_pgp_mime_part_encrypt): Flush the
- filtered stream.
-
-2002-06-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-gpg-context.[c,h]: New source files implementing the
- CamelCipherContext class for gnupg.
-
- * camel-pgp-context.c (camel_pgp_context_new): Return a
- CamelCipherContext.
-
- * camel-pgp-mime.c (camel_pgp_mime_part_decrypt): Take a
- CamelCipherContext argument rather than a CamelPgpContext since we
- now have a CamelGpgContext also.
- (camel_pgp_mime_part_encrypt): Same.
- (camel_pgp_mime_part_verify): Same.
- (camel_pgp_mime_part_sign): Same.
-
-2002-06-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-digest-folder.c: Updated to support searching as well as
- making it use CamelDigestSummary.
-
- * camel-digest-summary.[c,h]: New class to handle the summary for
- CamelDigestFolder.
-
- * camel-tcp-stream-ssl.c (set_errno): PR_IO_TIMEOUT_ERROR should
- map to ETIMEDOUT and not EAGAIN.
- (stream_connect): Reset the PR_Poll() timeout back to 2 minutes as
- this wasn't the problem afterall.
-
-2002-06-19 Not Zed <NotZed@Ximian.com>
-
- * camel-mime-parser.c (folder_scan_drop_step): Drop back to
- initial state if we came from eof state.
-
-2002-06-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-tcp-stream-ssl.c (stream_connect): Set the poll timeout to
- be PR_INTERVAL_MIN, this one shouldn't need to be 2 minutes (plus
- it blocks my connection at home for far too long).
-
- * providers/imap/camel-imap-folder.c (imap_refresh_info): Make
- sure we hold the command_lock before accessing current_folder.
- (imap_append_online): Same.
- (imap_transfer_online): Same.
-
- * providers/imap/camel-imap-store.c (delete_folder): We need to
- hold the command_lock before we can set the current_folder to
- NULL.
- (rename_folder): Same.
- (get_folder_info_online): We need to make sure we hold the
- command_lock in order to use current_folder.
- (everywhere): Same.
-
-2002-06-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/smtp/camel-smtp-transport.c (smtp_connect): Don't
- bother trying to authenticate (and thus don't throw up an error
- dialog) unless the server is an ESMTP server and supports
- authentication.
-
- * camel-sasl-plain.c: Change the user-friendly name to PLAIN, this
- is what it should be. Not "Password" because user's immediately
- think that they need authentication when they see "Password" even
- if they don't need it at all.
-
-2002-06-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-vee-folder.c (camel_vee_folder_add_folder): Update the
- freeze state of the new source folder.
- (camel_vee_folder_remove_folder): Undo any freeze state that we
- have imposed on this source folder.
-
-2002-06-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-vee-folder.c (vee_freeze): Freeze source folders.
- (vee_thaw): Thaw all source folders. Fixes bug #24317.
-
- * providers/imap/camel-imap-folder.c (imap_sync_online): Unlock
- the command_lock after each UID STORE command so that other
- (probably more important) threads can send their requests.
-
- * camel-arg.c:
- * camel-disco-diary.c:
- * camel-index-control.c:
- * camel-mime-part.c:
- * camel-pgp-mime.c:
- * camel-store.c:
- * camel-tcp-stream-ssl.c:
- * camel-text-index.c: Fixed compiler warnings.
-
- * camel-multipart-signed.c: Updated to use ctx->sign_protocol
- rather than ctx->protocol.
-
- * camel-cipher-context.h: Add an ecnryption protocol member.
-
- * camel-pgp-context.c (camel_pgp_context_init): Set the encryption
- protocol.
-
-2002-06-11 Not Zed <NotZed@Ximian.com>
-
- * camel-vtrash-folder.c (camel_vtrash_folder_class_init): Our
- parent class is camel_vee_folder, not camel_folder, fix setting of
- parent folder (unused anyway, but removes a run-time warning).
-
-2002-06-07 Not Zed <NotZed@Ximian.com>
-
- * camel-pgp-context.c (camel_pgp_context_init): Duh! The protocol
- is application/pgp-signature. TODO: need to have a signed and an
- encrypted protocol specified separately.
-
-2002-06-06 Not Zed <NotZed@Ximian.com>
-
- * camel-folder-thread.c (thread_summary): Do the work here.
- (camel_folder_thread_messages_remove): Implement. Remove some
- uid's from the tree. Disalbe from build, for now.
- (remove_uid_node_rec): Actually do the work.
- (camel_folder_thread_messages_add): Implement. Add some summary
- items to the tree. Disable from build though.
- (camel_folder_thread_messages_apply): Make a thread tree built
- using camel_folder_thread_new() map to a new set of uids,
- preserving some order. Meant primarily to manage deleted + added
- uids in a user-friendly manner.
-
-2002-06-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-multipart-signed.c (camel_multipart_signed_verify): Use
- CAMEL_EXCEPTION_SYSTEM rather than '1' for clarity.
-
-2002-06-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-tcp-stream-ssl.c (stream_connect): Up the timeout on the
- connect code to 2 minutes.
-
-2002-06-05 Dan Winship <danw@ximian.com>
-
- * camel-mime-utils.c (header_decode_mailbox): Parse
- "From: Dan Winship <danw>" (with no domain) in the way the sender
- meant it, even though it's completely wrong.
-
-2002-06-04 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-local-provider.c: Remove the
- CONF_DEFAULT_PATH entry, as this is handled by the url config
- stuff. This made it basically impossible to configure any local
- folder from the gui.
-
- * providers/local/camel-local-folder.c (local_refresh_info): Force
- a refresh. Should work for all local folders to force them to
- refresh.
-
- * providers/local/camel-maildir-folder.c (maildir_refresh_info):
- Removed, moved into camel-local-folder.
-
- * providers/local/camel-mh-summary.c (mh_summary_next_uid_string):
- Once we assign or get a uid, tell the summary of this, so the next
- uid we get will be higher than any previously.
-
- * camel-object.c (camel_object_ref, camel_object_unref): I got
- sick of casting, these now take void * like they should, and
- perform their own run-time type checking.
-
- * providers/local/camel-mh-store.c (recursive_scan): Changed to
- use stat, not lstat (*shrug* maybe someone wants to softlink their
- maildir tree?).
- (inode_hash):
- (inode_equal):
- (inode_free): Copied from camel-maildir store (should put into
- camel-local-store or utils?).
- (recursive_scan): Changed to check for re-visiting inodes. Also,
- it builds the tree itself, rather than using folder_info_build.
- (add_folder): Changed to folder_info_new.
- (recursive_scan): Properly honour the recursive flag. Also,
- lookup unread count from folder.
- (folder_info_new): Init unread message count to -1, since we dont
- know yet.
- (folder_info_new): Take the name as an argument, and perform the
- merging here.
- (folders_update): Util func to add/remove folders from .folders
- file. I'm assuming its sorted.
- (get_folder): Add the folder to .folders if we created a new one,
- and if it exists.
- (delete_folder): Remove from .folders, etc.
- (folders_scan): If we have a .folders file, read and use that
- instead.
- (recursive_scan): Handle scanning from a particular directory
- properly.
- (rename_folder): Implement so we can track any changes to the
- .folders file if its turned on.
-
- ** Applied patch below from Greg Hudson.
-
-2002-05-10 Greg Hudson <ghudson@mit.edu>
-
- * camel-mh-store.c (get_inbox, get_folder_info, recursive_scan,
- add_folder): Implement support for MH stores.
-
- * camel-mh-summary.c (mh_summary_check, sort_uid_cmp): Sort MH
- messages by message number (uid), like we sort maildir messages by
- date.
-
- * camel-local-provider.c (mh_provider): Turn on source and store
- flags.
-
-2002-06-03 Not Zed <NotZed@Ximian.com>
-
- * camel-vee-folder.c (camel_vee_folder_add_folder):
- (folder_changed_change):
- (folder_changed_remove_uid):
- (folder_changed_add_uid):
- (vee_folder_build_folder): Check that any unmatched operation is
- not concerning any vfolder. Other vfolders should never be part of any
- unmatched handling. For #24615, and others probably.
-
-2002-06-02 Not Zed <NotZed@Ximian.com>
-
- * camel-sasl.c (camel_sasl_new):
- (camel_sasl_finalize): setup/free the mech string.
-
- * camel-sasl.h: Added 'mech' mechanism string.
-
-2002-06-01 Not Zed <NotZed@Ximian.com>
-
- * providers/imap/camel-imap-folder.c (imap_getv): Implement. Only
- the object_description arg.
- (camel_imap_folder_get_type): Init parent_class holder.
-
- * providers/local/camel-local-folder.c (local_getv): Implement,
- object_description arg.
-
- * camel-folder.c (folder_getv): Implement, add a bunch of args you
- can get -> camel_folder_get_unread_count etc will be going RSN i
- hope.
- (camel_folder_finalize): Free cached description string.
-
- * camel-object.c (cobject_getv): Implement
- CAMEL_OBJECT_ARG_DESCRIPTION, just return the classname of the
- object.
- (camel_object_getv):
- (camel_object_get):
- (camel_object_setv):
- (camel_object_set): Take object = void *, to simplify usage.
- (camel_object_setv): Removed unecessary locals.
- (camel_object_getv): Same.
- (camel_object_free): New method, free an arg, upto implementations
- whether args are static/const or not.
- (cobject_free): Implement a dummy do nothing free.
-
-2002-05-31 Not Zed <NotZed@Ximian.com>
-
- * camel-vee-folder.c (camel_vee_folder_get_location): new function
- to get the real location (folder) (and uid) of a vfolder object.
- Using the folderinfo, since we already have it, maybe it should
- use the uid.
-
-2002-05-31 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-folder.c (get_content): When the part
- is a multipart/signed, make sure to free the part_spec before
- returning (the other types already did this properly).
-
- * providers/imap/camel-imap-message-cache.c
- (camel_imap_message_cache_get): Free the path buffer when we're
- done with it.
-
- * providers/imap/camel-imap-folder.c (imap_update_summary): Free
- the final tagged response buffer.
-
- * providers/imap/camel-imap-command.c (imap_read_untagged): If we
- fail to read a literal, free the temporary string buffer.
-
- * providers/imap/camel-imap-folder.c (imap_rescan): Revert my fix
- from the other day since camel_imap_command_response() doesn't
- guarentee that resp will be set to NULL on error.
-
- * camel-data-cache.c (camel_data_cache_get): If we fail to be able
- to create a stream to insert into the cache, then free the 'real'
- path.
-
-2002-05-30 Not Zed <NotZed@Ximian.com>
-
- * camel-cipher-context.h: Added a protocol field for users to use.
-
- * camel-stream-filter.c (do_read): Sigh, the pre-size is READ_PAD
- not READ_SIZE. Big difference.
- (READ_PAD): Bumped upto 128 from 64, so we can fit a typical line
- in full.
-
- * providers/imap/camel-imap-folder.c (get_content): Changed to
- load multipart/signed as an opaque block into the right kind of
- object.
-
- * camel-multipart.h (struct _CamelMultipart): Removed the boundary
- field. It wans't actually used anywhere.
-
- * camel-seekable-substream.c
- (camel_seekable_substream_new_with_seekable_stream_and_bounds):
- Shortened this stupidly long name to just :new(), its the only way
- its ever used. Fixed all callers.
-
- * camel-multipart-signed.[ch]: new wrapper for multipart/signed
- types. We need to treat the entire content as a blob of data for
- transport purposes. This also cleans up a lot of the sign/verify
- handling.
-
- * camel-mime-part-utils.c
- (camel_mime_part_construct_content_from_parser): Just call
- camel_multipart_construct_from_parser for multipart parts, also
- use a multipart_signed for multipart/signed types.
-
- * camel-multipart.c (camel_multipart_construct_from_parser): New
- virtual function for multiparts to buld themselves.
- (construct_from_parser): Implement for normal multiparts.
- (toplevel): Got rid of a warning, it'll never be an abstract
- class.
-
- * camel-pgp-context.c (pgp_hash_to_id):
- (pgp_id_to_hash): Implement.
- (camel_pgp_context_init): Init the pgp protocol specifier.
-
- * camel-cipher-context.c (camel_cipher_id_to_hash):
- (camel_cipher_hash_to_id): Util virtual methods to handle the
- cipher id string.
-
- * camel-mime-filter-canon.[ch]: A new filter, end/start of line
- canonicalisation filter. Can escape "From " and strip trailing
- whitespace, and canonicalise the end of line to crlf or to lf.
-
-2002-05-29 Not Zed <NotZed@Ximian.com>
-
- * camel-multipart.h (struct _CamelMultipart): Removed the
- 'parent', nothing used it, anywhere. Cleaned up some formatting
- slightly.
-
-2002-05-30 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-store.c (camel_imap_store_readline):
- On error, don't leak the GByteArray buffer.
-
- * providers/imap/camel-imap-folder.c (imap_rescan): Free the
- response before checking for errors. I'm not sure this'll actually
- fix the memory leak here, but it might? Certainly can't hurt.
-
- * camel-block-file.c (camel_block_file_finalise): Destroy the
- blocks hash table.
-
-2002-05-29 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-store.c (connect_to_server): Only free
- the LOGOUT response if it is non-NULL.
-
-2002-05-28 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-maildir-folder.c (maildir_refresh_info):
- Implement. Run a summary check to update for any newly arrived
- messages.
-
- * providers/local/camel-maildir-store.c (scan_dir): If we have a
- folder, execute a refresh_info on it, to suck in any new stuff.
-
-2002-05-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-filter-driver.c (camel_filter_driver_log): Use the
- CamelMessageInfo rather than the CamelMimeMessage because the
- message may not have been loaded (thus NULL).
-
-2002-05-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/smtp/camel-smtp-transport.c (connect_to_server): On
- connection failure, unref the tcp stream.
-
- * providers/pop3/camel-pop3-store.c (connect_to_server): On
- connection failure, unref the tcp stream.
-
- * providers/imap/camel-imap-store.c (connect_to_server): On
- connection failure, unref the tcp stream.
-
- * providers/nntp/camel-nntp-store.c (nntp_store_query_auth_types):
- Our parent class is no longer CamelRemoteStore.
- (nntp_store_init): Same.
- (camel_nntp_store_get_type): Here too.
- (nntp_connect): Rewritten to try to connect via SSL. Also remove
- code using CamelRemoteStore.
- (camel_nntp_command): Don't call camel_remote_store_connected().
-
-2002-05-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-folder.c (content_info_get_part_spec):
- Helps if we allocate enough space here. Also, start smoking the
- same purple flavoured IMAP crack when counting parts (parts don't
- count if their parent part is a message/* part with a parent
- part). Fixes bug #25260.
-
-2002-05-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-command.c (imap_read_untagged): Use
- the new readline function.
-
- * providers/imap/camel-imap-store.c (connect_to_server): Use the
- new camel_imap_store_readline() function which doesn't suck quite
- as bad as the original camel_remote_store_recv_line() function.
- (camel_imap_store_readline): New function to replace
- camel_remote_store_recv_line(). This function is at least safe
- with embedded nul chars. Not that any of our callers use it
- *sigh*.
-
-2002-05-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-store.c (connect_to_server): Added
- some NULL protection fixes.
-
-2002-05-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-remote-store.c: Removed from the build. Glory glory
- hallelujah.
-
- * camel-disco-store.c: Updated to inherit from
- CamelStore rather than CamelRemoteStore.
-
- * providers/imap/camel-imap-command.c (imap_command_start): Don't
- use the camel-remote-store shit to send a string. Just use
- camel_stream_printf for chrissakes.
-
- * providers/imap/camel-imap-store.c: Updated to not depend on
- CamelRemoteStore and to handle STARTTLS.
- (imap_disconnect_online): Unref the streams.
- (imap_keepalive): Removed.
- (camel_imap_store_connected): New function to replace
- camel_remote_store_connected().
- (camel_imap_store_finalize): Unref the streams.
- (camel_imap_store_recv_line): New function to replace
- camel_remote_store_recv_line().
- (imap_get_capability): Renamed from connect_to_server
- (connect_to_server): New function to try and connect to the
- server.
- (connect_to_server_wrapper): New wrapper function around
- connect_to_server that takes the ssl modes into consideration.
- (query_auth_types): Don't bother calling our parent's
- implementation of query_auth_types() since CamelDiscoStore doesn't
- have any anyway.
- (imap_get_name): New method to implement CamelService::get_name
-
-2002-05-18 Not Zed <NotZed@Ximian.com>
-
- * camel-search-private.c (camel_utf8_getc): If we get an invalid
- start char, just ignore it and goto the next character.
-
-2002-05-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-store.c (get_folder_offline): Don't
- call some retarded function to simply set an exception.
-
- * camel-filter-search.c (get_label): New e-sexp callback function
- to get a user_tag label value.
-
-2002-05-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-utils.c
- (imap_parse_namespace_response): New function to parse a NAMESPACE
- response properly.
- (imap_namespaces_destroy): New function to destroy the returned
- structure from the above function.
-
-2002-05-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-service.c (service_setv): Only reconnect if we are already
- connected, if we are in a disconnected state then no need to
- reconnect.
-
- * providers/imap/camel-imap-folder.c (get_content): If the
- part_spec is an empty string for a leaft part, use "1" since we
- don't actually want to get the raw message headers too.
-
-2002-05-15 Not Zed <NotZed@Ximian.com>
-
- * providers/imap/camel-imap-store.c (refresh_folder_info): removed.
- (imap_store_refresh_folders): Copy the folders first, then refresh
- them, outside of the cache_lock, which could cause deadlocks
- because of a workaround for crappo exchange.
- (imap_disconnect_online): Dont pass an exception to LOGOUT
- command. The required response 'BYE' always sets an exception
- when we call LOGOUT. This also interfered with a lot of other
- processing causing partial failures and messed up offline/online
- state.
-
- * camel-disco-folder.c (disco_prepare_for_offline): Do progress
- reporting.
-
-2002-05-14 Jeffrey Stedfast <fejj@ximian.com>
-
- Fixes bug #24136.
-
- * providers/imap/camel-imap-folder.c (content_info_get_part_spec):
- New function to take a CamelMessageContentInfo and generate a
- part-specification string.
- (get_content): Stop passing around part_spec strings and use
- content_info_get_part_spec instead.
-
- * camel-folder-summary.c (camel_content_info_dump): Made this into
- a public debugging function.
-
- * providers/imap/camel-imap-utils.c (imap_parse_body): Make sure
- to set the parent of any message/rfc822 subparts.
-
-2002-05-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-folder.c (imap_get_message): Previous
- fix reverted.
-
-2002-05-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-store.c (camel_imap_store_class_init):
- Overload the setv/getv CamelObject virtual methods.
- (imap_setv): Implemented.
- (imap_getv): Implemented.
-
-2002-05-13 Dan Winship <danw@ximian.com>
-
- * camel-folder.c (camel_folder_append_message): Add a "char
- **appended_uid" argument, for the caller to optionally pass in a
- variable to receive the UID of the appended message (if the
- provider knows it).
- (camel_folder_transfer_messages_to): Likewise, add "GPtrArray
- **transferred_uids"
- (transfer_messages_to): Update default implementation to handle
- transferred_uids.
-
- * camel-disco-folder.c (disco_append_message,
- disco_transfer_messages_to): Update for API changes.
-
- * camel-disco-diary.c (camel_disco_diary_replay): Update the
- diary's temporary uid->real uid map when replaying appends and
- transfers.
-
- * providers/imap/camel-imap-folder.c (imap_append_offline,
- imap_append_online, imap_transfer_offline): Pass back the new
- UIDs, when requested and available.
- (imap_append_resyncing): Pass back the new UIDs when requested and
- available. Remove the diary uidmap managing code since
- CamelDiscoDiary can handle that itself now.
- (imap_transfer_online, imap_transfer_resyncing): Update for new
- APIs, but don't actually pass back the new UIDs yet. (It's tricky
- since the COPYUID response may not be in the same order as the
- input uids.)
-
- * providers/local/camel-maildir-folder.c (maildir_append_message):
- Pass back the new UID if requested.
-
- * providers/local/camel-mbox-folder.c (mbox_append_message):
- Likewise.
-
- * providers/local/camel-mh-folder.c (mh_append_message): Likewise.
-
- * providers/local/camel-spool-folder.c (spool_append_message):
- Likewise.
-
- * camel-digest-folder.c (digest_append_message,
- digest_transfer_messages_to): Update for API changes.
-
- * camel-filter-driver.c (camel_filter_driver_filter_message,
- do_copy, do_move): Update for API changes.
-
- * camel-vee-folder.c (vee_append_message,
- vee_transfer_messages_to): Likewise.
-
- * camel-vtrash-folder.c (vtrash_append_message,
- vtrash_transfer_messages_to): Likewise.
-
-2002-05-13 Not Zed <NotZed@Ximian.com>
-
- * camel-folder-thread.c
- (camel_folder_thread_messages_new_summary):
- (camel_folder_thread_messages_new): Since the fix for #3357 uses
- 'order=0' to indicate tree structure nodes, make sure we dont
- actually set order=0 for valid messages, otherwise we silently
- lose duplicates of the first message (i==0). Fixes #19920.
-
-2002-05-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-folder.c (imap_get_message): Fetch the
- BODYSTRUCTURE rather than BODY since BODY seems to be lacking some
- of the data we need. This fixes bug #24136.
-
- * camel-transport.c (camel_transport_get_type): Might help if we
- called camel_transport_class_init.
-
-2002-05-10 Dan Winship <danw@ximian.com>
-
- * camel-folder.c (camel_folder_transfer_messages_to): Replace
- copy_messages_to and move_messages_to with a single function that
- just takes a "delete_originals" flag. Also, use the vtrash
- implementation if *either* folder is a vtrash.
- (transfer_messages_to): Make this use camel_operation_progress
- (previously move_messages_to did but copy_messages_to didn't), and
- freeze/thaw the folder(s) if doing multiple messages.
-
- * camel-vtrash-folder.c (vtrash_transfer_messages_to): Update for
- move/copy merge. Move the "move messages into vtrash" code here
- from mail-ops.c. Now all of the vtrash move/copy special casing is
- in camel instead of half of it being here and half in mail/. (This
- should also make it so that "Move to Trash" will work in filter
- rules.)
-
- * camel-vee-folder.c (vee_transfer_messages_to): Make this just
- return an exception, since it will only be called when trying to
- move/copy messages from one vfolder to another.
- (vee_append_message): Add this too so we get a nicer error message
- than the default "unimplemented" one in camel-folder.c.
-
- * camel-digest-folder.c: Replace copy_messages_to and
- move_messages_to with transfer_messages_to.
-
- * camel-disco-folder.c: Likewise
-
- * camel-disco-diary.c (camel_disco_diary_log,
- camel_disco_diary_replay): replace MOVE/COPY with TRANSFER.
-
- * providers/imap/camel-imap-folder.c (imap_transfer_offline,
- imap_transfer_online, imap_transfer_resyncing): Update for
- changes. (This ends up being a bit more complicated than it was
- before for now, but later disconnected operation changes should
- resimplify it.)
-
- * camel-filter-driver.c (camel_filter_driver_filter_message,
- do_copy, do_move): Use transfer_messages_to instead of copy.
-
-2002-05-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-filter-search.c (shell_exec): New filter function to pipe
- a message to another program.
- (run_command): Fixed some bugs to make this work.
-
-2002-05-09 Not Zed <NotZed@Ximian.com>
-
- * camel-service.c (camel_service_disconnect): Instead of testing
- for SERVICE_CONNECTED, we need to also handle SERVICE_CONNECTING
- too, as it will often have setup some details before it failed.
- Make it !DISCONNECTED (and !DISCONNECTING for recursive calls,
- which happen). Fixes #23782, and maybe also #21604 and many other
- random crashes.
-
-2002-05-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-digest-store.c (digest_setv): Implemented.
- (digest_getv): Implemented.
-
- * camel-disco-store.c (disco_setv): Implemented.
- (disco_getv): Implemented.
-
- * camel-remote-store.c (remote_store_setv): Implemented.
- (remote_store_getv): Implemented.
-
- * camel-transport.c (camel_transport_class_init): Implemented.
- (transport_setv): Implemented.
- (transport_getv): Implemented.
-
- * camel-store.c (store_setv): Implemented.
- (store_getv): Implemented.
-
- * camel-service.c (service_setv): Implemented.
- (service_getv): Implemented.
-
- * providers/pop3/camel-pop3-store.c (pop3_try_authenticate):
- camel_pop3_engine_iterate doesn't return the state, it returns -1
- on fail, 0 when finished processing request or >0 if more ops are
- in the queue, so don't check status against CAMEL_POP3_STATE_OK,
- instead check pcp->state against that.
-
-2002-05-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-object.h: s/class/klass for arguments so that c++
- developers don't complain later.
-
-2002-05-07 Dan Winship <danw@ximian.com>
-
- * camel-object.c (camel_object_class_cast): Fix a crash in a
- g_warning.
-
-2002-05-07 Not Zed <NotZed@Ximian.com>
-
- * camel-remote-store.c (remote_send_string): Check for LOGIN xxxx
- as well if debug is on, so we dont print passwords to evolution
- logs.
-
- * providers/imap/camel-imap-utils.c (imap_is_atom_char): This was
- really broken. 1. isprint() is locale dependent, and 2. it looked
- up an 8 bit value in a 7 bit table without truncating it. I've
- removed the isprint() stuff and just put it directly into the
- special table, which i've expanded to the right size too.
-
- * providers/imap/*: Applied patch from Preston Elder
- <prez@magick.tm> to make camel only use literals if it needs to
- for simple strings. Changed slightly to use imap_is_atom() and
- more consistent formatting.
- * providers/imap/camel-imap-utils.c (imap_is_atom): Changed from
- imap_needs_quoting().
-
- ** Merged in camel-object2 branch. Simpler camelobject
- implementation + object args interface.
-
- * camel.c (camel_init): Call camel_object_get_type() to make sure
- camel_object_type is initialised.
-
- * camel-object.h (CAMEL_OBJECT_TYPE): Changed to return global
- camel_object_type pointer, not call camel_object_get_type.
-
-2002-05-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): If
- the pop3 command status is -1, then we probably have a TCP error
- (?) so set a SYSTEM exception so our caller can distinguish
- between a "bad password" and a "tcp error".
- (pop3_connect): Only uncache the password on "bad password"
- errors.
-
- * camel-pgp-mime.c (pgp_mime_part_sign_prepare_part): Use
- CamelMimeFilterBestenc to get a more appropriate encoding rather
- than just blindling assigning QP.
-
- * providers/imap/camel-imap-folder.c (do_append): Call
- camel_mime_message_encode_8bit_parts() which fixes bug #10885.
-
- * camel-tcp-stream-raw.c (socket_connect): Don't bother with
- counting down the timeout.
-
-2002-05-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-stream-fs.c (stream_read): Same fix as the tcp stream.
- (stream_write): Again here. Just like tcp stream's stream_write(),
- also make sure to save errno before calling fcntl to restore the
- fd flags.
-
- * camel-tcp-stream-raw.c (stream_read): Handle EINTR errors for
- select().
- (stream_write): Same and also preserve errno when setting the fd
- flags back. If w == -1, return -1.
-
-2002-05-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.c (header_decode_mailbox): Fixed the fix for
- stupidly-broken-mailer bug #5 to work when multiple unescaped
- characters were in a row. Fixes bug #24140.
-
- * camel-tcp-stream-raw.c (socket_connect): Check select() for
- EINTR errors.
-
- * camel-pgp-context.c (crypto_exec_with_passwd): Change the order
- of some code so that we check if the select() failed before we
- check for user-cancellation.
-
- * camel-service.c (camel_gethostbyname): Check for EINTR when
- select()ing.
- (camel_gethostbyaddr): Same.
-
-2002-04-29 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-provider.c (camel_provider_auto_detect): Now takes a
- CamelURL argument rather than a GHashTable *settings argument.
-
-2002-04-29 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-spool-store.c (get_folder_info): We want
- to set unread_count to get_unread_message_count, not
- get_message_count(). Might fix #17174. Also removed FIXME: as it
- was fixed.
-
-2002-04-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/local/Makefile.am: Don't link to libibex.a anymore.
-
- * providers/nntp/Makefile.am: Same.
-
- * providers/imap/Makefile.am: And again here.
-
- * camel-store-summary.h: No longer want to #include
- <libibex/ibex.h>
-
- * camel-provider.c (camel_provider_auto_detect): New function to
- auto-detect configuration settings.
-
-2002-04-26 Not Zed <NotZed@Ximian.com>
-
- * camel-block-file.c (block_file_validate_root): Remove the
- excessive \n's, after printfs.
-
- * camel-text-index.c (text_index_compress_nosync): @!#$@#$!@$#!.
- Since the rename op was fixed, this broke compression's rename,
- resulting in the index 'vanishing' after every compress
- (i.e. after every reindex). Fix this code to account for the
- fixed rename operation.
-
-2002-04-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/smtp/camel-smtp-transport.c (smtp_rcpt): Don't put a
- space between the "RCPT TO:" and the "<recipient>" strings -
- rfc0821 was not clear on this but it seems rfc2821 defines a
- grammar excluding that SP.
- (smtp_mail): Same.
-
-2002-04-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/local/camel-local-provider.c
- (camel_provider_module_init): Configure the default paths for mh,
- mbox, maildir, spools, etc.
-
- * camel-provider.h: Add a CAMEL_PROVIDER_CONF_LABEL enum and
- define some default CamelProviderConfEntry macros.
-
-2002-04-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/pop3/camel-pop3-folder.c (pop3_refresh_info): Free the
- LIST pop3 command.
-
- * camel-data-cache.c (data_cache_finalise): Free the cdc->path.
-
- * camel-multipart.c (write_to_stream): Don't g_return_val_if_fail
- here if the boundary is an empty string. See bug #23676 for
- details. The way I see it, we have 2 options: 1) leave this fix
- the way it is, thus allowing multipart boundaries to be
- empty-strings; or 2) make camel_multipart_get_boundary() change
- the boundary to something legal if the boundary is an
- empty-string. Since the parser should be able to handle an
- empty-string boundary *and* more importantly because we want to
- keep the same boundaries as the original raw message so as to be
- able to verify multipart/signed parts, I vote for solution #1.
-
-2002-04-19 Not Zed <NotZed@Ximian.com>
-
- * devel-docs/camel-index.txt: Start of a white-paperish document
- describing camel-index and older libibex.
-
-2002-04-18 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-local-store.c (rename_folder): If we get a
- failure, make sure we set an exception.
-
- * camel-text-index.c (camel_text_index_rename): If the file
- doesn't exist, just assume it never did, dont return failure.
- (text_index_rename): Add '.index' to the path name we're using,
- since we dont get it passed in.
-
- * camel-folder-search.c (check_header): When doing a contains
- match, split the words and perform an and on it.
- (match_words_messages): If we have an index, but were forced to do
- a full search, first lookup a subset of messages using
- the index and a simplified word set. Only do a manual search of
- this subset.
-
-2002-04-17 Not Zed <NotZed@Ximian.com>
-
- * camel-folder-search.c (match_message_index): Changed to take a
- utf8 string not a regex pattern.
- (match_words_index): Matches against a camel_search_words list.
- (match_words_1message): Matches a single message against a
- camel_search_words list.
- (match_words_message): Same, but gets the message from the folder
- for you.
- (match_words_messages): Matches a list of messages against a words
- list.
- (search_body_contains): Rewritten to handle multiple word
- searches. For #23371.
-
- * providers/imap/camel-imap-search.c (sync_match): Split words
- when searching, to support multiple search words. Also, try
- searching specifying charset of utf8 if we can, if that fails,
- fall back to not specifying charset. TODO: It should translate
- the strings into the locale default charset?
-
- * providers/imap/camel-imap-store.c (connect_to_server): Added new
- cap - utf8_search, if set, we tell the server we're searching
- using utf8, otherwise we dont (incorrectly, since we always use
- utf8 to search).
-
- * camel-search-private.c (camel_ustrstrcase): Make this class public.
- (camel_search_words_split): Split a word into multiple words based
- on whitespace, and keep track of whether the word is simple
- (indexable directly), or not.
- (camel_search_words_free): Free 'em.
-
-2002-04-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-vee-folder.c (vee_search_by_expression): If the vee-folder
- is the unmatched, we don't have our own expression so we cannot
- merge them. Instead, just use the expression passed in. This fixes
- a Null-Pointer-Read crash on Solaris systems at least.
-
-2002-04-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-filter-driver.c (camel_filter_driver_filter_folder): Get
- rid of an unused variable.
-
- * providers/smtp/camel-smtp-transport.c (smtp_helo): Use
- camel_gethostbyaddr since gethostbyaddr is not reentrant.
-
- * camel-http-stream.c (http_connect): Updated after the rename of
- camel_get_host_byname.
-
- * camel-service.c (camel_gethostbyname): Renamed.
- (camel_gethostbyaddr): New cancellable/reentrant version of
- gethostbyaddr.
-
-2002-04-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/local/camel-spoold-store.c: Added #include
- <sys/types.h> for dirent.h which needs it on MacOS X.
-
- * providers/local/camel-maildir-store.c: Same.
-
- * providers/nntp/camel-nntp-store.c: Same.
-
- * providers/imap/camel-imap-message-cache.c: Same.
-
- * camel-provider.c: Same.
-
- * camel-data-cache.c: Same.
-
-2002-04-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * broken-date-parser.c (datetok): Treat commas as token
- delimeters.
- (WEEKDAY_CHARS): Use full weekday names in case the broken mailer
- used the full names.
- (MONTH_CHARS): Same as above but for months.
-
-2002-04-15 Not Zed <NotZed@Ximian.com>
-
- * *.c: Fix callers for api changes to camel-object, mainly
- declare_event->add_event, and classfuncs->klass, and a couple
- of missing #include <config.h>'s
-
- * camel-arg.[ch], Makefile.am: New support code for
- camel_object_get/set arg.
-
- * *.h: Fixed all uses of get_type to return a CamelType rather
- than a guint (now a pointer).
-
- * camel-object.[ch]: Major cleanup of object implementation. Also
- added a get/set interface, and some debugging options.
-
-2002-04-11 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-spool-summary.c (spool_summary_sync_full):
- If the last message(s) were deleted, and we had any messages
- output, account for the lost \n of the following From line by
- adding an extra \n. fix for #8214.
-
-2002-04-10 Not Zed <NotZed@Ximian.com>
-
- * camel-mime-part-utils.c (convert_buffer): If we get a 0 length
- input, return a 0 lenght output as valid - fixes bugs with some
- iconv impl and its simpler anyway.
-
-2002-04-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-folder.c: Set the UID_SET_LIMIT value
- to 4096. I ran into an issue tonight where apparently the IMAP
- server changed the UIDVALIDITY and so Evo needed to re-fetch all
- headers and it was trying to send a uid set of some 25k (yes, I
- have a very large INBOX). Anyways, it was set to unlimited
- before. Courier IMAPd can safely handle up to ~16k per token, but
- UW IMAPd can only handle 8k per command-line, so I set it to 4k
- just to be safe.
-
-2002-04-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-part-utils.c (convert_buffer): Fixed a bug that would
- miscalculate how much data to copy into the GByteArray (negative
- value) thus causing a segfault. Also optimized it while I was at
- it.
-
-2002-04-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-store.c (camel_store_init): Make the folder_lock
- recursive. See bug #22363 for details. Basically,
- get_folder_info() is requesting a diary folder which in turn
- connects which requests then calls get_folder() but deadlocks
- because get_folder_info already holds the lock.
-
- * camel-mime-message.c (camel_mime_message_set_date): Don't adjust
- the timezone offset if we used tm.tm_gmtoff because it is already
- adjusted.
-
-2002-04-09 Not Zed <NotZed@Ximian.com>
-
- * camel-mime-part.c (construct_from_parser): If we get multiple
- Content-Type header values, change subsequent headers to
- X-Invalid-Content-Type so it doesn't wreck processing. This fixes
- the reported case in #18929, but i dont know if it fixes the
- original posters problems.
-
-2002-04-08 Not Zed <NotZed@Ximian.com>
-
- * camel-vtrash-folder.c (vtrash_move_messages_to): If we find
- we're moving from the vtrash to another folder, we need to convert
- the uid from a vfolder uid to the source uid (+8). Fix for
- #20886. Also changed to batch multiple moves to different folders
- so they are done as efficiently as possible rather than one at a
- time.
-
- * camel-mime-utils.c (base64_decode_step): If we only get passed
- '=', we back track only if we actually output any data. Fix for
- #21716.
- (quoted_decode): Pass out size_t instead of int, and use 0 instead
- of -1 for error since its not signed. This will fix similar bug
- to above in different circumstances since the result is taken as
- unsigned. This is only an internal func.
- (quoted_encode): Return size_t just for consistency.
-
- * camel-block-file.c (block_file_validate_root): Comment out the
- debug and move it into a warning when the validation fails.
-
-2002-04-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.c (uuencode_close): Don't count our filler when
- encoding our line-length octet.
-
-2002-04-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-http-stream.c (http_get_headers): Don't get the statuscode
- here anymore.
- (http_method_invoke): Use a User-Agent header and do basic proxy
- authentication.
- (stream_read): Handle redirects.
- (camel_http_stream_set_user_agent): New function to allow client
- to set the User-Agent string.
- (camel_http_stream_set_proxy): New function for setting the proxy
- server.
- (camel_http_stream_set_proxy_authrealm): New function for setting
- the proxy auth realm.
- (camel_http_stream_set_proxy_authpass): New function for setting
- the proxy auth password.
-
-2002-04-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-folder-summary.c (message_info_new): Simplified since we
- can now decode in-reply-to without getting extra cruft. Get rid of
- the FIXME about having to check scan->id because of the
- possibility of it being NULL, this can no longer happen.
-
- * camel-mime-utils.c (header_references_inreplyto_decode): New
- function to decode in-reply-to headers. Only grabs the first thing
- that looks like a message-id and then returns.
- (header_references_decode): Loop calling
- header_references_decode_single (a new internal function).
-
-2002-04-04 Not Zed <NotZed@Ximian.com>
-
- * providers/imap/camel-imap-search.c (imap_body_contains): If
- (body-contains) is not passed any arguments, return empty/false.
- Fixes a crash exposed by #15001.
-
- * camel-remote-store.c (remote_connect): Reset the keepalive
- timeout to 10 minutes rather than the 30 seconds I was using for
- testing.
-
-2002-04-03 Dan Winship <danw@ximian.com>
-
- * camel-provider.h (CamelProvider): make service_cache be an array
- of CAMEL_NUM_PROVIDER_TYPES elements so you can have a single
- provider offer both stores and transports. (Eg, Exchange, NNTP)
-
- * providers/imap/camel-imap-provider.c: Don't initialize
- service_cache here. (The session code can do it itself since the
- url_hash and url_equal functions are stored as part of the
- provider.)
-
- * providers/nntp/camel-nntp-provider.c: Likewise.
-
- * providers/local/camel-local-provider.c: Likewise.
-
- * providers/pop3/camel-pop3-provider.c: Likewise.
-
- * providers/sendmail/camel-sendmail-provider.c: Likewise.
-
- * providers/smtp/camel-smtp-provider.c: Likewise.
-
- * camel-session.c (register_provider): Initialize the provider's
- service cache(s) here.
- (camel_session_class_init): Don't initialize.
- vee_provider.service_cache here.
- (camel_session_destroy_provider): Update to destroy multiple
- service_caches.
- (service_cache_remove, get_service): Tweak these a bit to deal
- with multiple service_caches.
-
-2002-04-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-tcp-stream-ssl.c (set_errno): Handle a ton more nspr i/o
- errno's.
- (stream_connect): Act as if we are doing a non-blocking
- connect. This is to try and work around bug #15120 where users get
- an EINPROGRESS error. Maybe importing a PRFileDesc into SSL mode
- automagically makes it non-blocking? I dunno.
-
-2002-04-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-folder-summary.c (message_info_new): Updated the
- construction of the references to match JWZ's updated algorithm
- initialization (ie, append any In-Reply-To reference onto any
- References header and never take more than a single message-id
- from the In-Reply-To header since anything after the first will
- probably just be email addresses). Fixes bug #1336.
-
-2002-04-03 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-local-folder.c
- (camel_local_folder_construct): Turn indexing back on, fingers
- crossed ...
-
- * camel-block-file.c (sync_nolock): #!@$@$#@~#$
- DF@#$!Q@$#!@$#!#%. Well it helps if we're iterating a list to
- iterate the node pointer ...
-
- * camel-text-index.c (text_index_sync): Sync the key tables
- explcitly.
- (text_index_sync): Debug out frag info.
- (camel_text_index_dump): Added a (rather large, but optional) raw
- dumping mode for debugging purposes.
-
- * camel-partition-table.c (camel_key_table_finalise): Sync root
- block when done.
- (camel_key_table_sync): New function, sync key table (root) explicitly.
- (camel_partition_table_sync): Method to explicitly sync the
- partition table.
-
-2002-04-02 Not Zed <NotZed@Ximian.com>
-
- * camel-block-file.c (camel_block_file_free_block): Mark root
- block dirty when we change it (this function isn't used yet
- anyway).
-
- * camel-text-index.c (text_index_add_name_to_word): Touch the root
- block when we modify the counts. Also, abort processing on any
- errors.
- (text_index_sync): Fix typo in comments. Sync the block file
- inside the lock.
- (text_index_compress_nosync): Lock the old index while we're
- compressing.
- (text_index_compress_nosync): Remove the bogus while() at the end
- of the while() loops! Also plug a memleak - records weren't
- freed.
- (text_index_rename): Lock around rename op.
- (text_index_add_name): More typos.
- (text_index_sync): Touch root when changing it.
- (text_index_add_name): "
- (text_index_delete_name): "
- (camel_text_index_new): Touch root if we change it.
- (text_index_cursor_reset): Make sure we NULL pointers after we
- free them (nothing uses this yet).
-
- * camel-partition-table.c (hash_key): Remove some debug
- accidentally left in.
- (camel_partition_table_add): When linking in the next block list,
- set the right previous pointer.
- (camel_key_table_add): Simplify the 'left' calculation (it was
- already ok though).
- (camel_key_table_next): Initialise returns before processing.
- Broaden the lock slightly, and simplify validity calculations.
-
- * providers/imap/camel-imap-store.c (imap_keepalive): Put back in
- the exception setup stuff i disabled for debugging.
-
- * providers/local/camel-local-folder.c
- (camel_local_folder_construct): Temporarily disable indexing.
-
-2002-03-28 Not Zed <NotZed@Ximian.com>
-
- * camel-partition-table.c (camel_key_table_lookup): Change range
- checking assert to a warning.
-
- * providers/pop3/camel-pop3-folder.c (pop3_finalize): Make sure we
- flush out all outstanding commands before finalising, stops being
- finalised while outsanding requests are processed by the store
- finalise.
- (pop3_get_message): Instead of pre-fetching all messages, just
- pre-fetch a maxiumum number at any one time, stops us running out
- of cache fd's.
-
- * providers/nntp/camel-nntp-folder.c (nntp_folder_init/finalise):
- Setup priv data + locks, & free.
-
- * providers/imap/camel-imap-folder.c (imap_rescan): Batch all
- message_chagned events into a single folder_changed event
- (otherwise updates can be >>> expensive, like >5 hours for 80K
- messages changing!). Alternately it could use folder
- freeze/unfreeze perhaps.
-
-2002-03-27 Not Zed <NotZed@Ximian.com>
-
- * providers/imap/camel-imap-store.c (imap_keepalive): Pass an
- exception to called code so it behaves properly since it uses the
- passed exception to check returns.
-
-2002-04-01 Dan Winship <danw@ximian.com>
-
- * providers/imap/Makefile.am (libcamelimap_la_LDFLAGS): Use
- -avoid-version instead of -version-info 0:0:0, and specify
- -module. (From Max Horn <max@quendi.de>).
-
- * providers/local/Makefile.am (libcamellocal_la_LDFLAGS): Likewise.
-
- * providers/nntp/Makefile.am (libcamelnntp_la_LDFLAGS): Likewise.
-
- * providers/sendmail/Makefile.am (libcamelsendmail_la_LDFLAGS):
- Likewise.
-
- * providers/smtp/Makefile.am (libcamelsmtp_la_LDFLAGS): Likewise.
-
- * providers/pop3/Makefile.am (libcamelpop3_la_LDFLAGS): Likewise.
- Also remove $(KRB4_LDFLAGS) since KPOP is gone.
- (INCLUDES): and $(KRB4_CFLAGS)
-
-2002-03-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-filter-driver.c (do_copy): We now have to check to make
- sure that p->message is non-NULL because we only load the message
- when we have to.
- (do_move): Same here.
-
-2002-03-28 Dan Winship <danw@ximian.com>
-
- * camel-transport.c (camel_transport_send_to): Change the message
- arg to a CamelMimeMessage instead of a CamelMedium. Even the NNTP
- provider returns CamelMimeMessages, and we're never going to
- support anything more exotic than that. Also do a few more
- g_return_if_fails here instead of in the providers.
- (camel_transport_can_send): No longer needed.
- (camel_transport_send): Remove this too. It wasn't being used any
- more, and it doesn't behave exactly the same in sendmail and smtp.
-
- * providers/smtp/camel-smtp-transport.c (smtp_send,
- smtp_can_send): Gone.
- (smtp_send_to): Update for arg change.
- (smtp_data): Make this take a CamelMimeMessage too.
-
- * providers/sendmail/camel-sendmail-transport.c (sendmail_send,
- sendmail_can_send): Gone.
- (sendmail_send_to): Update for arg change, and merge in the part
- that used to be shared with sendmail_send.
-
-2002-03-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-filter-driver.c (camel_filter_driver_filter_folder):
- Construct the source_url the right way. The previous way was
- generating urls like pop://fejj@ximian.com;keep_on_server/inbox
- which is wrong.
-
-2002-03-26 Not Zed <NotZed@Ximian.com>
-
- * camel-text-index.c (text_index_normalise): Changed to use just
- g_utf8_strdown instead of utf8_normalise, to match the indexing
- code. utf8_normalise is just far too expensive (saves approx 25%
- total processing).
-
-2002-03-25 Not Zed <NotZed@Ximian.com>
-
- * camel-text-index.c (text_index_add_name): When we add a new
- name, up all of the cache limits, because we're probably going to
- be adding more.
- (text_index_sync): Drop the cache limits back down again, we dont
- need them when looking words up.
-
- ** MERGE camel_index branch.
-
- * camel-text-index.[ch]: Added files i forgot to add (eep nearly
- lost all this work!)
-
- * camel-block-file.c (sync_nolock): Fix an infinite loop in syncing.
-
-2002-03-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-folder-summary.c (camel_message_info_new_from_header): Use
- the date in the received header for the received_date.
-
-2002-03-22 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-local-folder.c
- (camel_local_folder_construct): Use the right option to remove the
- index file and reset the index file on creation.
- (camel_local_folder_construct): Remove any existing '.ibex' files
- - these are the old format index files.
-
- * camel-block-file.c (camel_block_file_rename): Lock io lock while
- renaming.
- (camel_key_file_rename): Lock around rename.
- (block_file_validate_root): Implement sync flag checking.
- (camel_block_file_touch_block): Turn off the sync flag if we're
- touching any non-root block and write it to disk. Shoudl this
- fsync()?
- (sync_nolock): sync the root block only if we need to.
-
- * providers/local/camel-local-store.c (rename_folder): Re-enable
- index rename code. Not sure how race-free it is though.
- (delete_folder): Delete the index file properly.
-
- * camel-partition-table.c (camel_key_table_lookup): Initialise
- output values to 0 before doing anything.
- (camel_key_table_add): Do some range-checking on values.
-
- * camel-text-index.c (text_index_compress): Changed to call sync here.
- (text_index_compress_nolock): and not here - stops a recursive
- sync call when sync performs a compress also.
- (text_index_compress_nolock): Change to _nosync, since the locking
- is irrelevent (recursive lock). Fixed callers.
- (text_index_add_name_to_word): If we get a failure with key table
- ops, fail immediately.
- (text_index_compress_nosync): Likewise.
- (text_index_write_name): If the nameid is 0, do nothing.
- (text_index_add_name): If we can't get a keyid, dont add it to the
- partition table.
- (camel_text_index_remove): Function to delete an index file.
- (text_index_compress_nosync): Clean up temp files when done.
-
- * camel-folder-search.c (match_messages_index): New function,
- split from body_contains, matches a regex against all words in an
- index.
- (match_message_index): Similar to above but matches against an
- individual message.
- (search_body_contains): Changed to use above functions for
- matching - substring matches should now work on indexed data.
-
-2002-03-21 Not Zed <NotZed@Ximian.com>
-
- * camel-index.c (camel_index_words/names): New virtual
- methods/stubs to get a cursor of all words and names.
-
- * camel-text-index.c (text_index_compress_nolock): Split from
- text_index_compress, so we can call the compressor while locked
- also, removed lock calls.
- (text_index_compress): Changed to stub which calls
- text_index_compress_nolock.
- (camel_text_index_key_cursor_new): New object to iterate through
- a key table.
- (text_index_words, text_index_names): Implement virtual functions
- for iterating through all words or names.
-
- * camel-block-file.c: Turn off some debug.
-
-2002-03-20 Not Zed <NotZed@Ximian.com>
-
- ** New body index implementation.
-
- * camel-index*: Code for camel index, a new class to replace ibex.
-
- * camel-block-file.[ch]: block-based and link based
- filesystem-in-a-file classes.
-
- * camel-partition-table.[ch]: An implementation of a partition
- table (automatically extending on-disk hash-table using ideal
- hash), and a key-table, a key<>name mapping table. Used by
- camelindex.
-
- * providers/local/*, camel-folder-summary.[ch]: Changed to use
- camel-index interface rather than ibex.
-
-2002-03-05 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-maildir-summary.c (maildir_summary_check):
- Do progress reporting of operations.
- (maildir_summary_sync): Same here.
-
-2002-03-04 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-spoold-store.c (scan_dir): Kill a warning
- with a cast.
-
- * providers/local/camel-*.c: Changed for ibex->camelindex.
-
- * camel-folder-search.c (camel_folder_search_set_summary): Init
- summary_hash to point to 'static' uid strings.
- (search_body_contains): Use the static uid memory to return
- results rather than the values from the index library.
-
- * camel-folder-search.[ch]: Changed to use camelindex object.
-
- * camel-folder-summary.c (summary_build_content_info_message):
- Use a stream to index content, also filter html mail first.
- (camel_folder_summary_info_new_from_message): Use a stream
- filtered to index content.
- (main): Removed the test main code. Added headers for open call
- (ibex must've had them before).
-
- * camel-folder-summary.[ch]: Changed from ibex to CamelIndex.
-
- * camel-mime-filter-index.c (camel_mime_filter_index_finalize):
- Unref index.
-
- * camel-mime-filter-index.[ch]: Changed from ibex to CamelIndex.
-
-2002-03-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.c (header_encode_param): Fix this to work
- right. We need to convert the input buffer to the charset we claim
- in the encoded param (duh).
-
-2002-03-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/smtp/camel-smtp-transport.c
- (connect_to_server_wrapper): Updated to use the same logic as the
- POP code.
-
- * providers/pop3/camel-pop3-store.c (connect_to_server): No longer
- takes a stls_supported argument since we no longer need it with
- the new logic.
- (connect_to_server_wrapper): New logic: First try connecting to
- the SSL port (995 by default), if that fails with
- SERVICE_UNAVAILABLE, then we attempt to connect (to port 110 by
- default) and try to use STARTTLS.
-
-2002-03-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-folder.h:
-
- * camel-private.h: Don't allow any empty structs. If
- !ENABLE_THREADS, provide a gpointer dummy member. Fixes bug #6382.
-
-2002-03-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/smtp/camel-smtp-transport.c (smtp_auth): Added a
- work-around for SMTP servers that can't read the RFCs and thus
- implement SASL incorrectly. Oh well, that's life in the world of
- mail clients I guess.
-
-2002-03-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-digest-store.c (camel_digest_store_new): Now takes a url
- argument.
-
- * camel-digest-folder.c (digest_add_multipart): Fixed some memory
- corruption and also modified to use CAMEL_IS_MIME_MESSAGE() rather
- than comparing content-type strings.
- (digest_get_message): Fixed a logic blooper.
-
- * camel-folder-summary.c (camel_message_info_new_from_header): Set
- the date fields of the CamelMessageInfo as well. This may even fix
- some filter-related bugs where the user was trying to compare
- dates.
-
-2002-03-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-digest-store.c: A pretty empty store implementation to be
- the parent store of a CamelDigestFolder.
-
- * camel-digest-folder.c: Updated to reference it's parent store.
-
-2002-03-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-digest-folder.c (camel_digest_folder_new): Allow any leaf
- part to be a message/rfc822 part.
- (digest_get_uids): Recurse the mime structure and add all
- message/rfc822 parts and use a uid scheme similar to IMAP's mime
- part naming convention.
- (digest_get_message): Decode the uid to get the correct mime part.
-
-2002-03-11 Ettore Perazzoli <ettore@ximian.com>
-
- * camel-mime-utils.c: Change the order of the mailing list magic
- patterns so that the more mailing-list specific ones are on the
- top.
-
-2002-03-11 Jeffrey Stedfast <fejj@ximian.com>
-
- These fixes should fix bug #21737.
-
- * providers/smtp/camel-smtp-transport.c
- (connect_to_server_wrapper): Same as with the POP code.
-
- * providers/pop3/camel-pop3-store.c (connect_to_server_wrapper):
- Slight restructuring of the if-statements for the USE_SSL_ALWAYS
- case so that we can't possibly return TRUE unless we really did
- connect successfully.
-
-2002-03-10 Dan Winship <danw@ximian.com>
-
- Rename the OpenSSL implementation of things to match the NSS
- implementation so that callers don't need to care which one is
- being used.
-
- * camel-tcp-stream-openssl.c: Implement CamelTcpStreamSSL, not
- CamelTcpStreamOpenSSL. Rename methods as well. Replace the
- camel-tcp-stream-openssl.h include with camel-tcp-stream-ssl.h.
-
- * camel-tcp-stream-openssl.h: Gone.
-
- * camel-tcp-stream-ssl.c: Add a note explaining that this
- implementation is only used for NSS, and that OpenSSL's
- implementation is in another file. (Should probably do some CVS
- renaming magic at some point.)
-
- * camel-http-stream.c (http_connect): Remove OpenSSL refs; the
- previously-NSS-specific code works for both now.
-
- * camel-remote-store.c: Likewise.
-
- * providers/smtp/camel-smtp-transport.c: Likewise.
-
- * providers/pop3/camel-pop3-store.c: Likewise.
-
- * Makefile.am (libcamelinclude_HEADERS): Remove
- camel-tcp-stream-openssl.h
-
-2002-03-10 Dan Winship <danw@ximian.com>
-
- * camel-tcp-stream.c (camel_tcp_stream_get_socket): Remove this:
- it couldn't be generically used, because different subclasses
- returned entirely different types of data.
- (camel_tcp_stream_get_local_address,
- camel_tcp_stream_get_remote_address): Add these to replace what
- get_socket was being used for.
- (camel_tcp_address_new, camel_tcp_address_free): Utility functions
- for get_{local,remote}_address.
-
- * providers/smtp/camel-smtp-transport.c: Change localaddr to a
- CamelTcpAddress *.
- (connect_to_server): Call camel_tcp_stream_get_local_address to
- get the local IP address.
- (smtp_disconnect): free localaddr.
- (smtp_helo): Update for localaddr change.
-
- * camel-tcp-stream-raw.c (stream_get_socket): Remove
- (stream_get_local_address, stream_get_remote_address): Implement.
-
- * camel-tcp-stream-ssl.c (stream_get_socket): Remove
- (stream_get_local_address, stream_get_remote_address): Implement.
-
- * camel-tcp-stream-openssl.c (stream_get_socket): Remove
- (stream_get_local_address, stream_get_remote_address): Implement.
-
-2002-03-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/pop3/camel-pop3-provider.c
- (camel_provider_module_init): Don't call
- camel_remote_store_get_authtypes since we no longer subclass
- camel-remote-store.
-
- * providers/pop3/camel-pop3-engine.c: Added STARTTLS to the
- capabilities to look for.
- (camel_pop3_engine_reget_capabilities): New function to re-get
- capabilities.
-
- * providers/pop3/camel-pop3-store.c: Updated to not subclass
- CamelRemoteStore.
- (connect_to_server): Rewritten to not depend on CamelRemoteStore's
- connect implementation. Also added support for STLS (aka
- STARTTLS).
-
-2002-03-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-pgp-mime.c (camel_pgp_mime_part_sign): Add support for
- hash type RIPEMD160.
-
- * camel-cipher-context.h: Add RIPEMD160 hash type.
-
- * camel-pgp-context.c (pgp_sign): Updated to consider hash
- function for pgp5 and pgp6.
- (pgp_clearsign): Same.
-
- * camel-tcp-stream-openssl.c (stream_read): Add a timeout on the
- select.
- (stream_write): Same.
-
-2002-03-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/smtp/camel-smtp-transport.c (connect_to_server): Fix
- to work with OpenSSL.
-
- * camel-tcp-stream-openssl.c: compile fixes.
- (camel_tcp_stream_openssl_enable_ssl): Check to make sure that the
- sockfd != -1, it's not enough to check that it is non-zero. Also
- set the sockfd to -1 on fail (open_ssl_connection will close the
- sockfd on fail).
-
-2002-03-06 Dan Winship <danw@ximian.com>
-
- * providers/smtp/camel-smtp-transport.c (smtp_construct): Make
- this compile.
-
-2002-03-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-tcp-stream-ssl.c (save_ssl_cert): Removed. Glory glory
- hallelujah!
- (ssl_bad_cert): No longer calls ssl_save_cert or
- ssl_cert_is_saved.
-
-2002-03-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_new_raw):
- Start the ssl stream off in non-ssl mode (useful for STARTTLS).
- (camel_tcp_stream_openssl_enable_ssl): New function to toggle an
- ssl stream into ssl mode.
- (open_ssl_connection): Close the sockfd on fail so our caller
- doesn't have to - this also allows us to save the original errno.
- (stream_connect): If we want ssl mode, do our ssl stuff.
- (camel_tcp_stream_openssl_class_init): Init some SSL stuff here
- instead of in open_ssl_connection since these only ever need to be
- called once.
- (stream_read): Only use SSL_read if we are in ssl mode.
- (stream_write): Only use SSL_write if we are in ssl mode.
-
- * providers/smtp/camel-smtp-transport.c (smtp_helo): Check for the
- STARTTLS extension.
- (connect_to_server): Try to use STARTTLS whenever possible rather
- than the old way of doing things.
- (connect_to_server_wrapper): Wrapper around connect_to_server() to
- first try STARTTLS and then attempt normal SSL mode if we can't
- connect via STARTTLS.
-
- * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_enable_ssl): New
- function to toggle an ssl stream into ssl mode.
- (camel_tcp_stream_ssl_new_raw): Start the ssl stream off in
- non-ssl mode (useful for STARTTLS).
- (stream_connect): Only connect in SSL mode if required.
-
-2002-03-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-vtrash-folder.h:
- * camel-vee-store.h:
- * camel-vee-folder.h:
- * camel-stream-null.h:
- * camel-stream-filter.h:
- * camel-store-summary.h:
- * camel-news-address.h:
- * camel-mime-utils.h:
- * camel-mime-parser.h:
- * camel-mime-filter-save.h:
- * camel-mime-filter-linewrap.h:
- * camel-mime-filter-index.h:
- * camel-mime-filter-html.h:
- * camel-mime-filter.h:
- * camel-mime-filter-from.h:
- * camel-mime-filter-crlf.h:
- * camel-mime-filter-chomp.h:
- * camel-mime-filter-charset.h:
- * camel-mime-filter-bestenc.h:
- * camel-mime-filter-basic.h:
- * camel-internet-address.h:
- * camel-folder-thread.h:
- * camel-folder-summary.h:
- * camel-folder-search.h:
- * camel-filter-driver.h:
- * camel-charset-map.h:
- * camel-address.h: Add c++ armoring.
-
- * camel-object.h: s/class/klass
-
-2002-03-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-part-utils.c
- (camel_mime_part_construct_content_from_parser): Reverted my
- pgp/mime fixes here too.
-
- * camel-mime-part.c (write_to_stream): Removed my pgp/mime raw
- stream hack, this is causing problems such as some messages to not
- displaying, view->source not working at all, etc.
-
-2002-02-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-parser.c: Changed offset variables from int's to
- off_t's since the system may support large files.
-
- * camel-mime-part-utils.c
- (camel_mime_part_construct_content_from_parser): Rearrange the
- save filter stuff so that we save raw streams for all mime
- parts. If the mime part turns out to be a multupart, then don't
- bother saving the raw stream, we only need to save the raw stream
- for leaf parts.
-
-2002-02-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-folder-summary.h: Don't #include camel-mime-filter-save.h,
- we don't use it.
-
- * camel-file-utils.c: Fixed a few 'might be used uninitialized'
- warnings which were real problems.
-
- * camel-mime-part-utils.c
- (camel_mime_part_construct_content_from_parser): Save the raw mime
- stream for any/all signed parts.
-
- * camel-mime-part.c (camel_mime_part_init): Initialize our raw
- stream to NULL.
- (camel_mime_part_finalize): Unref our raw stream, if we have one.
- (write_to_stream): If we have a raw stream, write that out instead
- of re-encoding.
-
- * camel-mime-filter-save.[c,h]: Rewritten to save to a stream
- rather than a file.
-
-2002-02-28 Not Zed <NotZed@Ximian.com>
-
- * camel-mime-utils.c (header_fold): Use the FOLD_SIZE as a
- recommended folding size, but add a new FOLD_MAX_SIZE (=998, the
- smtp max line size) as the hard limit for any output.
-
-2002-02-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-filter-chomp.c (camel_mime_filter_chomp_new): New
- stream filter that chomps excess trailing whitespace from the end
- of the stream. This is needed to update the PGP/MIME code to
- comply with rfc3156.
-
- * camel-pgp-mime.c (camel_pgp_mime_part_verify): Don't attach a
- from filter, if it ain't from-filtered already, then we'll just be
- breaking stuff. To become rfc3156 compliant, add a chomp filter
- here.
- (camel_pgp_mime_part_sign): Add a chomp filter here too.
-
-2002-02-27 Not Zed <NotZed@Ximian.com>
-
- * camel-mime-part.c (init_header_name_table): Changed header
- formatted table to contain a pointer to an output function, and
- added in-reply-to and references headers.
- (write_references): New function to write out references header,
- folded properly. It only approximates based on the last >, but it
- should be adequate and will also handle invalid headers.
- (write_fold): Function to write out headers folded. Since this is
- the default it isn't required.
- (write_raw): Write out an already formatted header, e.g. most of
- the rest.
- (write_to_stream): Lookup header output function, if we have one,
- use that, otherwise fold header using basic (dumb) function.
-
- This is all for #14779. A better fix is probably do have the
- headers always stored formatted, but that can wait.
-
-2002-02-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-digest-folder.c (camel_digest_folder_new): Allow all
- multiparts that contain message/rfc822 attachments.
- (digest_get_uids): Only assign uids to message parts.
-
-2002-02-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-part.c (camel_mime_part_set_filename): Set the 'name'
- parameter on the Content-Type too. Fixes bug #20779.
-
-2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-pgp-context.c (pgp_sign): Pass --always-trust to gpg
- (requested by users).
- (pgp_clearsign): Same.
- (pgp_encrypt): Here too.
-
-2002-02-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/smtp/camel-smtp-transport.c (smtp_helo): Since the
- AUTH token sometimes uses '=' instead of whitespace, don't use
- smtp_token_next here.
-
-2002-02-09 Not Zed <NotZed@Ximian.com>
-
- * providers/pop3/camel-pop3-engine.c (get_capabilities): Duh, when
- we grab the apop stamp it needs to include the <> as well, I even
- read the rfc, silly me.
-
- * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): Doh,
- when iterating the authtype list, it helps to goto the next node.
- Found with help from miles.
-
-2002-02-08 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-spool-summary.c
- (camel_spool_summary_build_from): The day number has to be 2 chars
- wide, space filled to work properly with pine, etc.
-
- * providers/local/camel-spoold-store.[ch]: new type of provider
- 'spool directory', which lets you view external mbox dirs without
- adding any extra cruft. Perhaps it should use . files to store
- summaries? Still a bit experimental, there's a warning when you
- select it in the account editor. Finished off most of #1185.
- Can't rename or move folders.
-
- * camel-mime-utils.c (header_decode_date): If the date is
- 100->1900 then we actually want to use it as the year in the tm
- struct, not year+100. e.g. year 102 -> 2002, not 2102.
-
-2002-02-07 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-spool-store.c (get_folder): Pass path into
- spool_folder_new.
-
- * providers/local/camel-spool-folder.c (camel_spool_folder_new):
- (camel_spool_folder_construct): Take the full path to the folder
- and use that as the file path, independent of the full_name we
- use.
-
-2002-02-07 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-local-provider.c: Added new type, spoold
- provider, spoold: for local directories.
-
- * providers/imap/camel-imap-store.c (get_one_folder_offline):
- Create offline uri's in a compatible manner to online ones.
-
-2002-02-07 Dan Winship <danw@ximian.com>
-
- * camel-sasl-ntlm.c: Implementation of NTLM (aka "Secure Password
- Authentication") auth, taken from soup.
-
- * Makefile.am (libcamel_la_SOURCES, libcamel_la_HEADERS): Add
- camel-sasl-ntlm.
-
- * camel-sasl.c: Add refs to camel-sasl-ntlm.
-
- * providers/imap/camel-imap-store.c (try_auth): Use
- imap_next_word() to skip over the "+ " of the continuation rather
- than just "resp + 2" since Exchange (incorrectly) returns "+"
- instead of "+ " for an empty continuation response.
-
-2002-02-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-folder-summary.h: Remove the CAMEL_MESSAGE_NEEDS_REPLY
- flag, we no longer will be using this.
-
-2002-02-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-http-stream.c (stream_read): Use camel_mime_parser_read to
- read internal parser data.
- (camel_http_stream_get_content_type): Implemented.
- (http_method_invoke): Use HTTP/1.0 instead of 1.1
-
- * camel-mime-utils.c (header_decode_int): Made public.
-
- * camel-http-stream.[c,h]: Added. New stream for HTTP requests
- (currently supported are GET and HEAD).
-
- * camel-tcp-stream-ssl.c (stream_connect): Call set_errno
- appropriately.
-
-2002-01-31 Not Zed <NotZed@Ximian.com>
-
- * camel-mime-utils.c (header_decode_domain): Oops, this was
- converting foo@[blah] to foo@[ blah ], fixed.
-
-2002-01-30 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/pop3/camel-pop3-provider.c: Use "pop" instead of
- "pop3" so current configurations continue to work.
-
-2002-01-30 Not Zed <NotZed@Ximian.com>
-
- * camel-sasl-login.c: Changed name from "NT Login" to simply
- "Login".
-
- * providers/pop3/*: Entirely new pop implmentation, supporting
- pipelining.
-
-2002-01-29 Not Zed <NotZed@Ximian.com>
-
- * camel-data-cache.c (free_busy): We dont want to unref the
- stream, instead, stop listening to the finalised events, and free
- the path only.
-
-2002-01-25 Not Zed <NotZed@Ximian.com>
-
- * camel-data-cache.c (stream_finalised): Remove the object from
- the busy_stream hashtable, not the busy_path hashtable.
-
-2002-01-29 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-folder.c (imap_update_summary): Added
- more kludge to an existing Exchange IMAP 5.5 kludge to work around
- it returning multiple messages with the same UIDs.
-
-2002-01-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-message.c (process_header): Handle Resent headers
- too.
-
- * camel-mime-message.h: Added Resent-* #defines.
-
- * camel-filter-driver.c (camel_filter_driver_remove_rule_by_name):
- Use while (node->next) instead of while (node)
-
- * providers/smtp/camel-smtp-transport.c (smtp_decode_status_code):
- New function to decode an enhanced status code.
- (smtp_set_exception): Sets an exception based on the
- Enhanced-Status-Code.
- (esmtp_get_authtypes): Don't diplicate the key in the hash since
- the key and value are the same.
- (smtp_rcpt): Include the failed recipient in the error message to
- be more helpful to the user.
-
- * camel-mime-utils.c (hex_decode): Make sure to allocate enough
- for the NUL byte.
-
-2002-01-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/smtp/camel-smtp-transport.c (smtp_construct):
- (connect_to_server): Use flags rather than a bunch of gboolean
- variables.
- (smtp_connect): Same.
- (smtp_mail): Here too. Use the enhanced status codes if available.
- (smtp_data): And again here.
- (smtp_helo): Finally here. Also detect the ENHANCEDSTATUSCODES
- extension.
- (smtp_rcpt): Use the enhanced status codes if available.
- (smtp_rset): Here too.
- (smtp_quit): And finally here.
-
- * camel-transport.h: Removed gboolean supports_8bit since this is
- pretty local to only SMTP for now.
-
-2002-01-24 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am: Remove some old cruft.
-
-2002-01-24 Ettore Perazzoli <ettore@ximian.com>
-
- * tests/folder/Makefile.am: s/MAILER_LIBS/EVOLUTION_MAIL_LIBS/.
- * tests/message/Makefile.am: Likewise.
- * tests/mime-filter/Makefile.am: Likewise.
- * tests/misc/Makefile.am: Likewise.
- * tests/smime/Makefile.am: Likewise.
- * tests/stream/Makefile.am: Likewise.
-
-2002-01-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-filter-driver.c (do_beep): Call the beep callback
- function.
- (camel_filter_driver_set_system_beep_func): New function to set
- the beep callback.
-
-2002-01-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-filter-driver.c (camel_filter_driver_remove_rule_by_name):
- New function to remove a filter rule by name.
-
-2002-01-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-filter-driver.c (do_beep): As a temporary solution, just
- printf ("\a"); to make a beep :-)
-
- * providers/imap/camel-imap-command.c
- (imap_command_strdup_vprintf): Encode the mailbox to UTF-7 here.
-
- * providers/imap/camel-imap-utils.c (imap_parse_list_response):
- Decode the mailbox name as we parse the list response.
- (imap_mailbox_decode): It's only an illegal mailbox name if it
- didn't switch back to US-ASCII mode.
-
-2002-01-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-utils.c (imap_mailbox_decode): New
- function to decode an IMAP mailbox name from modified UTF-7
- encoding to UTF-8.
- (imap_mailbox_encode): New function to convert a mailbox name from
- UTF-8 to IMAP's modified UTF-7 encoding.
-
-2002-01-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-filter-basic.c (filter): Stop uudecoding once the
- CAMEL_UUDECODE_STATE_END state bit gets set. Set the
- CAMEL_UUDECODE_STATE_BEGIN state bit once we find the begin line.
- (reset): No longer have uu_begin or uulen state variables, these
- are now stuffed into a single state variable.
-
- * camel-mime-utils.c (uudecode_step): No longer needs a uulen
- argument and also keeps track of whether or not the end of the
- encoded data has been found in 'state'.
- (uuencode_step): Now stuffs uulen into state so that the uulen
- argument is no longer needed.
- (uuencode_close): Same.
-
-2002-01-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-filter-basic.c (filter): If we don't want to corrupt
- the uuencoded data by overwriting it with base64 decoded data
- afterward, we need to add a break statement!
-
- * camel-folder-summary.c (summary_build_content_info): Add code to
- add a uu filter.
- (camel_folder_summary_finalize): Unref the uuencode filter.
-
-2002-01-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-filter-basic.c (filter): Fixed slight logic error to
- find the uuencode begin line. Fixes bug #18754.
-
-2002-01-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/smtp/camel-smtp-transport.c (smtp_send_to): Updated to
- match the new send_to API.
- (smtp_send): Get the from address and pass that along to
- smtp_send_to().
-
- * providers/sendmail/camel-sendmail-transport.c
- (sendmail_send_to): Updated to match the new send_to API.
-
- * camel-transport.c (camel_transport_send_to): Now takes a from
- argument too.
-
- * providers/imap/camel-imap-folder.c (imap_update_summary): Sort
- the needheaders UID array and fixed to respect the
- UID_SET_LIMIT. This should now finish the fixification of bug
- #2529. There's still the possible issue that a command-line (The
- only command-line I can think of that can still be too long is a
- SEARCH command, but this can't possibly be fixed until we rewrite
- the imap code to use Zucchi's ImapEngine idea).
-
-2002-01-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-folder.c (imap_expunge_uids_online):
- Move the command-lock outside the loop.
-
-2002-01-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-folder.c (imap_expunge_uids_online):
- Updated to use the new imap_uid_array_to_set() interface.
- (imap_expunge_uids_resyncing): Same.
- (do_copy): Here too.
- (imap_update_summary): Added a FIXME comment to rewrite allowing
- for a uid-set limitation.
- (get_matching): Copy some of the logic over from
- imap_uid_adday_to_set() to limit the length of the uid-set string.
- (imap_sync_online): Added a comment to explain what is going on
- with get_matching() since the behavior has changed slightly.
-
- * providers/imap/camel-imap-utils.c (imap_uid_array_to_set):
- Modify the interface so that we can limit the size of the uid set
- string returned.
-
-2002-01-14 Not Zed <NotZed@Ximian.com>
-
- * providers/imap/camel-imap-search.c (imap_body_contains):
- Rewritten to use a cache for body searches when online. Will need
- some heavy testing but so far seems to be beneficial.
-
- * providers/imap/camel-imap-folder.c (imap_search_by_expression,
- search_by_uids): dont initialise search object here.
- (camel_imap_folder_new): Setup search object here with pointer to
- cache dir.
-
-2001-12-01 Not Zed <NotZed@Ximian.com>
-
- * camel-store-summary.[ch]: New class to store a store's folder
- list in. Not yet completed.
-
-2002-01-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-folder.c (imap_update_summary): Kludge
- around a bug in Exchange 5.5 that reports 2 messages with the same
- UID. Fixes bug #17694. Replaces the fix from yesterday.
-
-2002-01-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/local/camel-local-folder.c: If PATH_MAX doesn't exist,
- use _POSIX_PATH_MAX.
-
- * providers/imap/camel-imap-folder.c (imap_update_summary): If mi
- is NULL, don't bother updating it. Should fix bug #17694.
-
-2002-01-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel.h: #include camel-mime-filter-tohtml.h
-
- * providers/imap/camel-imap-folder.c (imap_update_summary): Kludge
- around Microsoft Exchange 5.5 (bug #5348) by forgetting our
- currently selected folder and re-SELECTing it so that the Exchange
- server has a chance to realise it has new messages.
-
-2002-01-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/local/camel-local-folder.c
- (camel_local_folder_construct): If the mbox file is a symlink,
- follow the symlink and get the One True Path so that we can
- rewrite the mbox later without worrying about clobbering the
- symlink.
-
-2002-01-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-filter-search.c (TODO): There are a few sexp callbacks
- that could be modified to use fms->info rather than using a
- message object (like date and possibly mlist stuff) but *only* if
- the date exists on the CamelMessageInfo object (since it may be
- blank except for message flags).
- (camel_filter_search_get_message): New internal convenience
- function to make sure that the FilterMessageSearch has loaded the
- message (and to load the message if this isn't the case).
- (check_header): Call camel_filter_search_get_message().
- (header_exists): Same.
- (header_regex): Here too.
- (header_full_regex): And here.
- (body_contains): Again here.
- (body_regex): Here too.
- (get_sent_date): Here also.
- (get_received_date): Same.
- (get_source): Here if we need to.
- (camel_filter_search_match): Now takes a callback function/data
- pair for on-demand message loading so that we don't necessarily
- have to load the message if the defined filter rules don't require
- it.
-
- * camel-filter-driver.c (camel_filter_driver_filter_folder): Don't
- bother fetching the message here, let
- camel_filter_driver_filter_message() worry about this.
- (get_message_cb): New utility callback to fetch a message.
- (camel_filter_driver_filter_message): Only fetch the message if we
- absolutely need it to get a CamelMessageInfo. Instead of passing a
- message object to camel_filter_search_match(), pass get_message_cb
- and some user_data so that the matching code can fetch the message
- on demand.
-
-2002-01-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-folder.c (filter_filter): Flush the only-once actions.
-
- * camel-filter-driver.c (camel_filter_driver_filter_message):
- Don't increment a filtered_count here any longer.
- (camel_filter_driver_reset_filtered_count): Removed.
- (camel_filter_driver_get_filtered_count): Removed.
- (do_beep): New action.
- (play_sound): New action to play a sound
- (do_only_once): Another new action.
- (camel_filter_driver_finalise): Free the only_once hash if the
- driver has not been "flushed".
- (camel_filter_driver_flush): Flush all of the only-once actions.
-
- * camel-charset-map.c: Moved windows-1251 to the end of the list
- since it contains the euro and we'd prefer to use iso-8859-15 when
- the euro is requested than a windows charset if possible.
-
- * camel-charset-map-private.h: Regenerated.
-
-2001-12-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-folder-summary.c (content_info_load): Don't try setting a
- content-type parameter if either the name or value is NULL.
-
- * camel-mime-utils.c (header_set_param): NULL-protection.
-
-2002-01-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-tcp-stream-ssl.c (ssl_bad_cert): Do more like what mutt
- does so hopefully this'll fix bug #16363 and #16300.
-
-2001-12-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * broken-date-parser.c (parse_broken_date): Completely
- rewritten. It is now a load faster and a heck of a lot more
- accurate, also now returns a time_t and sets the saveoffset
- variable rather than returning a new char* buffer for the normal
- camel date parser to re-parse. This saves a fair number of cpu
- cycles :-)
-
- * camel-mime-utils.c (header_decode_date): Cleanup the broken date
- parsing code.
-
-2001-12-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-address.h: Change the prototype for camel_address_get_type
- to return a CamelType (since internally this is what it returns
- and also in case we decide to write a replacement for the current
- CamelObject it'd be easier to drop in).
-
- * camel-internet-address.h: Same but for
- camel_internet_address_get_type()
-
- * providers/smtp/camel-smtp-transport.c (smtp_send_to): Updated to
- use a CamelAddress of recipients.
- (smtp_send): Since smtp_send_to now takes a CamelAddress
- recipients argument, our lives have been simplified and we can now
- just concat To/Cc/Bcc into a recipients addr and send away.
-
- * providers/sendmail/camel-sendmail-transport.c
- (sendmail_send_to): Updated to use a CamelAddress of recipients.
-
- * camel-transport.c (camel_transport_send_to): Now takes a
- CamelAddress argument for the recipient list rather than a GList.
-
-2001-12-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/smtp/Makefile.am: Remove the providerdir variable.
-
- * providers/sendmail/Makefile.am: Same.
-
-2001-12-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-charset-map.c (camel_charset_iso_to_windows): New function
- to map ISO charsets to the Windows charsets.
-
- * camel-mime-part-utils.c (broken_windows_charset): Detect Windows
- charsets.
- (simple_data_wrapper_construct_from_parser): Simplify a tad and
- also check for iso-8859-* charsets that are really Windows
- charsets. Fixes bug #12631.
-
-2001-12-17 Dan Winship <danw@ximian.com>
-
- * Makefile.am (INCLUDES): define CAMEL_PROVIDERDIR to be the
- configure.in-defined camel_providerdir.
-
- * providers/Makefile.am: Remove some outdated comments
-
- * providers/imap/Makefile.am (camel_provider_LTLIBRARIES,
- camel_provider_DATA): renamed from provider_LTLIBRARIES,
- provider_DATA.
-
- * providers/local/Makefile.am: Likewise
-
- * providers/nntp/Makefile.am: Likewise
-
- * providers/pop3/Makefile.am: Likewise
-
- * providers/sendmail/Makefile.am: Likewise
-
- * providers/smtp/Makefile.am: Likewise
-
-2001-12-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-folder.c (get_content): Reverted my
- previous changes here since it doesn't actually work afterall.
-
- * providers/imap/camel-imap-wrapper.c (imap_wrapper_hydrate):
- Update to do uudecoding when appropriate.
-
-2001-12-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-folder.c (get_content): Try to use the
- original boundary so luis will stop bugging me about "data
- corruption". Also preserve other params in the multipart
- content-type by dumping it to a string and setting it on the mime
- part.
-
-2001-12-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-filter-driver.c
- (camel_filter_driver_reset_filtered_count): Reset the
- filtered_count to zero.
- (camel_filter_driver_get_filtered_count): Return the private
- filtered_count value.
- (camel_filter_driver_filter_message): Increment the
- filtered_count.
- (camel_filter_driver_set_shell_exec_func): New function to set the
- shell-exec func.
- (shell_exec): New ESExp filter action callback.
-
-2001-12-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-pgp-mime.c (camel_pgp_mime_part_verify): Removed
- x-inline-pgp-hack kludge because it doesn't work.
- (camel_pgp_mime_part_decrypt): Same.
-
-2001-12-13 Chris Toshok <toshok@ximian.com>
-
- * camel-data-cache.c: include stdlib.h (for alloca on freebsd) and
- only include alloca.h if HAVE_ALLOCA_H is defined.
-
-2001-12-11 Zbigniew Chyla <cyba@gnome.pl>
-
- Fixes #17085
-
- * camel-charset-map.c: Added #include <errno.h>.
-
- * camel-charset-map-private.h:
- Recreated (following instructions from camel-charset-map.c)
-
-2001-12-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-object.c (camel_type_register): Keep a name-to-type hash
- so that we can make sure that the type has not yet been registered
- (prevents a race condition such as the one in bug #16559).
-
- * camel-service.c (camel_service_connect): Make sure that the
- connect_op is non-NULL before unregistering/unreffing it.
-
-2001-12-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.c (header_content_type_simple): Protect against
- either of the types being NULL.
-
-2001-12-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-filter-basic.c (filter): If complete() allocates
- len+2 bytes for the out buffer, so should this. See bug #16371 for
- an example case.
-
-2001-12-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-sasl-digest-md5.c: iconv() returns a size_t, not an int.
-
- * camel-pgp-context.c: The return value of iconv() is a size_t,
- not an int.
-
- * camel-mime-part-utils.c (convert_buffer): Always use size_t args
- for iconv().
-
- * camel-mime-filter-charset.c (complete): Always use size_t args
- for iconv().
- (filter): Same.
-
- * camel-mime-utils.c (header_address_fold): Make headerlen a
- size_t instead of an int.
- (header_fold): Same.
- (base64_encode_close): We should be returning a size_t and inlen
- should also be a size_t.
- (base64_encode_step): Same here.
- (base64_decode_step): Here too.
- (base64_encode_simple): And here...
- (base64_decode_simple): Same.
- (uuencode_close): We should also use size_t's here...
- (uuencode_step): And here too.
- (uudecode_step): And also here.
- (quoted_encode_close): Same idea here.
- (quoted_encode_step): Again here.
- (quoted_decode_step): Here too.
- (quoted_encode): Input length should be a size_t.
- (rfc2047_decode_word): Same.
- (g_string_append_len): Here too.
- (append_8bit): "
- (rfc2047_encode_word): "
- (quote_word): "
- (hex_decode): "
- (rfc2184_decode): Use size_t's with iconv().
- (header_decode_param): Same.
-
-2001-12-09 Jon Trowbridge <trow@ximian.com>
-
- * camel-folder-summary.c: Add "NeedsReply" to the flag_names array
- for CAMEL_MESSAGE_NEEDS_REPLY.
-
- * camel-folder-summary.h: Added CAMEL_MESSAGE_NEEDS_REPLY flag.
-
-2001-12-07 Dan Winship <danw@ximian.com>
-
- * camel-mime-message.c (camel_mime_message_set_date): Fix the
- tm_gmtoff case (its sign is the opposite of "timezone"). Fixes
- #14678
-
-2001-11-29 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-folder-search.c (search_body_contains): Don't use regex
- matching. Fixes bug #16227.
-
- * camel-mime-message.c (best_encoding): Check the content-object's
- mime type, not the mime part types. Should fix bug #15843.
-
-2001-11-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-folder.c (get_content): Return NULL if
- construct_from_stream fails.
- (get_message): Same.
- (get_message_simple): Here too.
- (add_message_from_data): And here.
-
-2001-11-14 Not Zed <NotZed@Ximian.com>
-
- * camel-vee-folder.c (folder_changed_remove_uid): Use the uid
- rather than vuid for unmatched. Also add the uid to unmatched if
- it wasn't in the unmatched_uids table at all.
- (folder_changed_change): If checking for added, if the new ones
- dont match, then try to add them to unmatched. Fixes #6893.
-
- * camel-folder-summary.c (camel_folder_summary_index): Change lock
- order, always summary_lock before ref_lock.
- (camel_folder_summary_array): "
- (camel_folder_summary_uid): "
- (camel_folder_summary_remove_uid): " Fixes a deadlock.
-
-2001-11-30 Not Zed <NotZed@Ximian.com>
-
- * providers/nntp/camel-nntp-*.c: Completely new implementation of
- NNTP.
-
- Doesn't support subscriptions yet (lists all folders), but should
- be more reliable (faster?), and has an integrated cache.
-
- * camel-exception.c (camel_exception_new): Use e_memchunks for
- exception blocks.
- (camel_exception_free): Same.
-
- * camel-data-cache.[ch]: New object for managing on-disk caches of
- anything that can be stored in a camel-stream.
-
- * camel-file-utils.c (camel_file_util_mkdir): New function, just a
- nicer place to put this (than camel-store), should be removed from
- camel-store.
- (camel_file_util_safe_filename): New function to url-encode a
- filename.
-
- * camel-mime-parser.c (drop_states): New func to drop the parser
- state to initial state.
- (folder_scan_init_with_fd):
- (folder_scan_init_with_stream): Call above func to reset state if
- the stream is changed on us so we can change streams to reuse a
- parser object.
-
-2001-11-25 Not Zed <NotZed@Ximian.com>
-
- * providers/nntp/camel-nntp-folder.c (nntp_folder_get_message): If
- the uid doesn't have a ',' in it, fail to crash.
-
- * providers/nntp/camel-nntp-newsrc.c
- (camel_nntp_newsrc_article_is_read): check group != NULL before
- scanning.
- (camel_nntp_newsrc_get_highest_article_read): "
- (camel_nntp_newsrc_get_num_articles_read): "
- (camel_nntp_newsrc_mark_range_read): "
-
- * providers/nntp/camel-nntp-store.c
- (camel_nntp_store_get_overview_fmt): IF we dont have
- nntp_list_follows, dont try and get a list response.
- (nntp_store_get_folder_info): Set path part of folderinfo.
-
-2001-11-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/smtp/camel-smtp-transport.c (get_smtp_error_string):
- Check to see that errno is non-zero before returning
- g_strerror. If it's 0, then we have an unknown error.
-
-2001-11-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-filter-basic.c: For the uudecoding mode, garble up
- the "begin <mode> <filename>" line before decoding.
-
- * camel-mime-part-utils.c
- (simple_data_wrapper_construct_from_parser): Add a uudecoder if
- the transfer encoding is x-uuencode.
-
- * camel-mime-part.c (write_to_stream): Handle x-uuencoded content
- too.
-
-2001-11-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-tcp-stream-ssl.c (stream_read): Added a check to see if
- the operation has been cancelled.
- (stream_write): Same.
-
-2001-11-19 Jeffrey Stedfast <fejj@ximian.com>
-
- Updates for compliance with rfc2231
-
- * camel-mime-utils.c (header_encode_param):
- camel_mime_special_table[c] & IS_ESAFE should have been
- !(camel_mime_special_table[c] & IS_ESAFE). Also added a few
- comments for how to improve the code at some future date.
- (header_decode_param): Now takes an argument rfc2184_part so our
- caller can get this information as well.
- (header_decode_param_list): Pass an rfc2184_part argument to
- header_decode_param and also added a few comments on where to
- improve on rfc2184/rfc2231 compliance.
- (rfc2047_decode_word): Updated to respect the updated ABNF syntax
- of rfc2047 encoded words, yay.
-
-2001-11-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-utils.c (imap_parse_body): Abort if
- body == NULL.
-
- * camel-mime-filter-tohtml.c (camel_mime_filter_tohtml_new): New
- mime filter to convert plain text to html.
-
-2001-11-16 Jeffrey Stedfast <fejj@ximian.com>
-
- Since some mail clients like Outlook are broken, we need to set a
- name parameter on pgp signed and encrypted parts.
-
- * camel-pgp-mime.c (camel_pgp_mime_part_encrypt): Set a name
- parameter.
- (camel_pgp_mime_part_sign): Same.
-
-2001-11-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-command.c
- (camel_imap_command_response): If we get a BYE response, call
- camel_service_disconnect() and set an exception. Also do the check
- for "* BYE" first instead of passing it off imap_read_untagged()
- since we'll just waste time in there mallocing left and right only
- to arrive at the single response line "* BYE" again :-)
-
-2001-11-13 Not Zed <NotZed@Ximian.com>
-
- * camel-filter-search.c (get_source): If we have no source string,
- then use undefined, which should always evaluate to FALSE. Fix
- for #15267.
-
-2001-11-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-store.c (camel_store_get_folder): Added a
- g_return_val_if_fail for folder_name != NULL.
-
-2001-11-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-pgp-context.c (crypto_exec_with_passwd): If any of the
- pipe()'s fail, clean up any pipes that may have succeeded. Also
- close the password fds.
-
-2001-11-09 Not Zed <NotZed@Ximian.com>
-
- * providers/imap/camel-imap-store.c (imap_auth_loop): If we get a
- user cancel and that causes us to fail to authenticate, abort
- rather than loop forever. Fix for #14951.
-
-2001-11-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-command.c
- (camel_imap_command_continuation): Now takes a command-length
- argument so we can 1) avoid duping the command string yet again,
- yay. 2) we now don't have to worry about embedded nul-chars
- screwing us over (we still need to avoid allowing them into the
- string but at least now it won't mess us up).
-
- * providers/imap/camel-imap-folder.c (do_append): Instead of
- appending a nul char to the end of the byte array and then passing
- that off as if it were a string to
- camel_imap_command_continuation, instead pass the byte-array
- length since that function now takes a length argument. Yay. Also
- encode any 8bit parts to avoid the possibility of sending embedded
- nul chars to the imap server.
-
- * providers/imap/camel-imap-store.c (try_auth): Updated to pass a
- command-length argument to camel_imap_command_continuation().
-
-2001-11-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-tcp-stream-ssl.c (save_ssl_cert): Oops, pass a mode
- argument to the open() call.
-
- * camel-tcp-stream-openssl.c (save_ssl_cert): Oops, pass a mode
- argument to the open() call.
-
-2001-11-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-pgp-mime.c (camel_pgp_mime_part_decrypt): Add code to
- kludge around any x-inline-pgp-hacks by prepending some content
- headers to the decrypted data.
-
-2001-11-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-data-wrapper.c (camel_data_wrapper_init): Initialize our
- private mutex.
- (camel_data_wrapper_finalize): Destroy our private mutex.
- (write_to_stream): Lock around camel_stream_write_to_stream() so
- that we don't get 2 threads trying to read from our stream at the
- same time.
-
-2001-11-01 Not Zed <NotZed@Ximian.com>
-
- * camel-vee-folder.c (folder_changed_change): Move all searching
- operations outside of any locks except subfolder lock, same as
- build_folder. Fix for #14294.
-
-2001-10-31 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-spool-folder.c (spool_get_message): Same
- as below.
-
- * providers/local/camel-maildir-folder.c (maildir_get_message):
- Same as below.
-
- * providers/local/camel-mbox-folder.c (mbox_get_message): Set
- USER_CANCEL if failed due to EINTR.
-
- * camel-filter-driver.c (camel_filter_driver_filter_mbox): If
- construct from parser fails due to user cancel, set USER_CANCEL on
- exception.
-
- * camel-mime-part.c (construct_from_parser): Return error if the
- parser had an io error.
-
- * camel-mime-message.c (construct_from_parser): Check error on
- parser/return error.
-
- * camel-mime-parser.c (folder_scan_init): Init error number.
- (camel_mime_parser_errno): New function, return errno of any io
- failures.
- (folder_read): Set errno if a failure occured.
- (folder_seek): Same.
- (folder_scan_init_with_fd): Setup errno depeding on ok/failure.
- (folder_scan_init_with_stream): Same.
-
-2001-10-30 Not Zed <NotZed@Ximian.com>
-
- * camel-operation.c (camel_operation_new): Dont setup cancel_fd.
- (camel_operation_cancel_fd): If cancel_fd not created, set it up.
- (camel_operation_cancel): Set cancel flag before sending message.
- (cancel_thread): Same.
-
- * camel-filter-driver.c (camel_filter_driver_filter_mbox): Make
- sure we unref the mimeparse when we're done (successfully). This
- was leaking an fd every get-mail! :(
-
- * camel-lock-client.c (camel_lock_helper_init): Close all fd's
- above 2.
-
- * providers/local/camel-mbox-folder.c (mbox_get_message): Remove
- the X-Evolution header before anyone else gets to see this private
- thing. Shoudl fix 11676 since we were inheriting flags from
- X-Evolution headers we didn't want to.
-
- * camel-folder-search.c (match_message): If we can't retrieve the
- message, ignore it, it can't match.
-
- * providers/imap/camel-imap-search.c
- (camel_imap_search_class_init): Setup parent class pointer.
- (imap_body_contains): If offline, just use the parent
- body_contains method which will get the messages and search them
- manually.
-
- * providers/imap/camel-imap-folder.c (imap_search_by_expression,
- imap_search_by_uids): Remove offline check.
-
-2001-10-30 Dan Winship <danw@ximian.com>
-
- * camel-mime-part.c (free_headers): Fix this to match get_headers.
-
-2001-10-30 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-local-store.c (rename_folder): Dont try to
- move ibex if we have none.
-
- * camel-tcp-stream-openssl.c (stream_write): Fixed compilation
- errors.
-
-2001-10-29 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.c (camel_mime_utils_init): Removed unused
- variable.
-
-2001-10-30 Not Zed <NotZed@Ximian.com>
-
- * camel-mime-utils.c (header_decode_mailbox): w(x) out some warnings.
-
- * providers/local/camel-local-summary.c
- (camel_local_summary_load): Remove the warning about not loading
- summary file - its a valid case for new folders.
-
-2001-10-29 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-tcp-stream-openssl.c (my_SSL_write): Removed.
- (stream_write): Keep looping (non-blocking case) if errno is
- EAGAIN, EINTR or EWOULDBLOCK. For NONBLOCKing I/O, sync up with
- CamelTcpStreamRaw. As with CamelTcpStreamRaw/SSL - make sure to
- write out everything before returning.
- (my_SSL_read): Removed.
- (stream_read): Just call ssl_error_to_errno() and check the errno
- values that we care about so we can keep the general look of all
- this stream code the same. Also when checking the return value of
- SSL_read, check for <0 instead of ==-1 since the man page for
- SSL_read doesn't say it will return -1 on fail, it just says <0.
- (stream_flush): Don't fsync() since syncing on a socket is a Bad
- Thing (tm).
-
- * camel-tcp-stream-ssl.c (stream_write): Make sure we write out
- everything just like in camel-tcp-stream-raw.c.
-
- * camel-stream-buffer.c (camel_stream_buffer_gets): If
- camel_stream_read() returns -1, don't necessarily return -1 to our
- caller since it's possible that we did actually "read" some data
- (ie, we copied some pre-buffered data into the out buffer).
-
- * camel-stream-buffer.h: Removed CAMEL_STREAM_BUFFER_NEWLINE since
- it never got used anywhere and it isn't supported anyway.
-
-2001-10-30 Not Zed <NotZed@Ximian.com>
-
- * providers/imap/camel-imap-store.c
- (parse_list_response_as_folder_info): If we get an empty name,
- then mark that as NoSelect. Workaround fix for #13239.
-
-2001-10-29 Dan Winship <danw@ximian.com>
-
- * providers/imap/camel-imap-folder.c (get_message_simple,
- imap_get_message): Set an X-Evolution-Source header on the
- returned message so replies come from the right identity.
-
-2001-10-29 Not Zed <NotZed@Ximian.com>
-
- * camel-vee-folder.c (folder_changed_change): If we're not going
- to search on a changed uid, make sure we change out copy still.
- Fixes #13916.
-
-2001-10-29 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-store.c (subscribe_folder): Don't emit
- a folder_subscribed signal if we are in the process of renaming
- folders.
- (unsubscribe_folder): Same here but for the unsubscribe signal.
- (rename_folder): Unsubscribe from the folder being renamed and any
- subfolders it may have before actually renaming. Once the folder
- has been renamed, re-subscribe to it and it's subfolders with the
- new name.
-
- * camel-store.c (camel_folder_info_build): Sort the folder info's
- before constructing the tree.
-
- * camel-mime-utils.c (header_decode_param): Minor fix - should
- have been using a strNcmp when checking if it was an rfc2047
- encoded word.
-
- * camel-pgp-context.c (pgp_sign): Notify the user that PGP 2.6.x
- is no longer supported and use camel_exception_set() instead of
- setv() where appropriate.
- (pgp_clearsign): Same.
- (pgp_verify): And again here.
- (pgp_encrypt): Here too.
- (pgp_decrypt): And finally here.
-
-2001-10-29 Dan Winship <danw@ximian.com>
-
- * providers/imap/camel-imap-store.c (unsubscribe_folder): Don't
- free the hash table key if the folder wasn't found in the hash
- table. I'm not sure where the bug is/was that made it possible to
- add a folder to the tree after creating it failed, but now if that
- happens, it won't crash if you try to delete it again. (#11492)
-
- * camel-disco-store.c (camel_disco_store_status): if the service
- is being connected and thinks it's online, but the session is
- offline, then mark the service offline as well. Fixes 13683.
-
-2001-10-29 Not Zed <NotZed@Ximian.com>
-
- * camel-mime-utils.c: Turn off w() -> warnings.
-
- * providers/imap/camel-imap-store.c (rename_folder): Also rename
- the message cache.
- (rename_folder): Fix subscribed folders table with rename(s).
-
- * providers/imap/camel-imap-folder.c (imap_rename): Implement,
- rename the cache dir pointer.
-
- * providers/imap/camel-imap-message-cache.c
- (camel_imap_message_cache_set_path): New method to set the path
- used by a message cache.
-
- * camel-vee-store.c (build_info): Fix the 'is this a matching
- subfolder or subfolder' logic to match camel-store
- get_subfolders'.
-
- * camel-store.c (get_subfolders): Fix the 'is this a matching
- folder or subfolder' logic.
-
-2001-10-28 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-local-store.c (rename_folder): Changed to
- call ibex_move to rename it internally.
-
- * camel-store.c (camel_store_rename_folder): Use the right
- variable, not info.
-
-2001-10-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-stream-buffer.c (camel_stream_buffer_read_line): Make sure
- we've actually read data before checking if p[-] is '\r' or not.
-
- * camel-tcp-stream-raw.c (stream_write): Same.
-
- * camel-stream-fs.c (stream_write): If errno isn't EAGAIN, just
- exit with -1 and instead of using continue (which doesn't go to
- the top of the do-while thus making our logic suck), just set w to
- 0. Still seems to be a bug in select() if it's telling us the
- socket is ready for data when it really isn't but oh well.
-
-2001-10-28 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-local-folder.c
- (camel_local_folder_construct): Use path not protocol as the path
- part of the uri of the folder_created event.
-
- * providers/local/camel-maildir-store.c (scan_dir): If FAST is
- set, dont try and scan for unread counts.
-
- * providers/local/camel-local-store.c (create_folder): Implement,
- just return the folderinfo of the folder matched, not all of it.
-
- * camel-store.c (camel_store_rename_folder): Rename the
- camelfolders before emitting the folderchanged event (otherwise
- vstore fails to pick up change.
-
-2001-10-27 Not Zed <NotZed@Ximian.com>
-
- * camel-store.c (camel_store_init): Always use a default dir_sep
- of '/'.
-
- * camel-store.h (struct _CamelStore): Added a dir_sep to the base
- store so rename and whatnot can work, temporary fix for mixed dir
- separator in folder name api's.
-
- * providers/imap/camel-imap-store.c (rename_folder): Finished
- implementation.
- (imap_connect_online): Also set the store's dir_sep here.
- (imap_connect_offline): "
-
- * providers/local/camel-local-folder.c (local_rename): Implement
- local rename of folder objects.
-
-2001-10-26 Not Zed <NotZed@Ximian.com>
-
- * camel-vee-folder.c (camel_vee_folder_class_init): Hook into
- rename function.
- (vee_rename): Implement the veefolder rename function.
- (camel_vee_folder_class_init):
- (folder_changed_change): Kill a warning with a cast.
-
- * camel-vee-store.c (vee_rename_folder): Emit a folder_renamed
- event properly, also call parent to do some rename stuff.
-
- * camel-store.h: Added a CamelRenameInfo for the rename event.
-
- * camel-folder.c (camel_folder_rename): New function to rename a
- folder object.
- (camel_folder_class_init): Added a renamed event.
- (folder_rename): Default impl, set full_name, and set name
- assuming the dir separator is '/'.
-
- * camel-store.c (camel_store_class_init): Added folder_renamed
- event.
- (camel_store_rename_folder): Rename an active folder object if we
- have one, and update the folder table.
- (rename_folder): Make a default implementation that handles
- updating the folder tree.
-
-2001-10-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-store.c (delete_folder): Don't bother
- checking ex since we can rely on the response being NULL on error.
- (rename_folder): Implemented.
-
-2001-10-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-folder.c (imap_get_message): Check to
- make sure that the dataset is non-NULL before using and/or
- freeing.
-
- * camel-tcp-stream-raw.c (stream_write): Check for EWOULDBLOCK
- too?
- (stream_read): Same.
- (stream_flush): Return 0 always, fsync() and tcp sockets don't
- play nice :-)
-
- * providers/imap/camel-imap-message-cache.c
- (camel_imap_message_cache_get): Lets try putting a
- camel_stream_reset() here. Logic being that the stream may have
- been read from since it was cached and thus our caller may try
- reading from it and get no data from it since it is already at the
- EOS. This may fix bug #12943.
-
-2001-10-25 Not Zed <NotZed@Ximian.com>
-
- * camel-search-private.c (utf8_get): Remove the stupid warning
- that should never have been there in the first place.
-
- * camel-sasl-digest-md5.c (digest_response): s/iconv/e_iconv/
-
- * camel-pgp-context.c (pgp_verify): "
-
- * camel-mime-utils.c (rfc2047_decode_word, rfc2047_decode_word,
- append_8bit, rfc2047_encode_word, rfc2184_decode,
- header_decode_param): "
-
- * camel-mime-part-utils.c (convert_buffer, convert_buffer): "
-
- * camel-mime-filter-charset.c (reset, complete, filter): "
-
-2001-10-24 Not Zed <NotZed@Ximian.com>
-
- * camel-mime-filter-basic.c (complete): For qp decoding, if the
- data isn't really qp encoded, we could possible grow the buffer by
- upto 2 bytes above the input size, fix allocations/assertions
- appropraitely.
-
- * camel-vee-folder.c (folder_changed_change): If we're not
- autoupdate, only search for new matches against changed uid's that
- we dont already have.
-
-2001-10-24 Dan Winship <danw@ximian.com>
-
- * providers/imap/camel-imap-store.c (unsubscribe_folder): Don't
- let fi->name be NULL.
-
-2001-10-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-stream-fs.c (stream_read): Same as in the TcpStreamRaw code.
- (stream_write): And again here...
-
- * camel-tcp-stream-raw.c (stream_read): Handle the EAGAIN error
- case as well.
- (stream_write): Same here, this might fix the SMTP truncation
- thing? I hope?
-
-2001-10-23 Dan Winship <danw@ximian.com>
-
- * camel-mime-utils.c (mail_list_magic): Remove an extra * in one
- of the regexps that glibc apparently doesn't mind but bsd does.
-
-2001-10-23 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-mbox-summary.c: made d(x) x recompile again.
-
-2001-10-22 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-spool-summary.c (summary_rebuild): No, use
- Storing, as the other code does :p
- (spool_summary_check): Check for consistency.
-
-2001-10-22 Jon Trowbridge <trow@ximian.com>
-
- * providers/local/camel-spool-summary.c (summary_rebuild):
- s/summarising/summarizing/.
- (spool_summary_check): s/summarise/summarize/.
-
-2001-10-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-pgp-mime.c (camel_pgp_mime_part_verify): If we are
- kludging around a inline-pgp signed part, do some charset
- conversion to protect any 8bit text.
-
-2001-10-22 Not Zed <NotZed@Ximian.com>
-
- * camel-filter-search.c, camel-folder-search.c (check_header): Use
- search_type_mlist for mailing list searches.
-
- * camel.c (camel_init): call camel-mime-utils-init func.
-
- * camel-mime-utils.c: Changed mail mail_list_magic to include a
- domain part, also pre-compile all the patterns. They are all
- backward compatible except List-Id: which now uses the
- mail-address-like <list-name.host.name> part rather than the
- plain-text part (which might've been blank anyway).
- (camel_mime_utils_init): Initialisation function to setup any
- static data required by camel-mime-utils at run-time. We now
- setup the base64/charset class tables here, so it doesn't need to
- be done statically.
- (camel_mime_special_table, camel_mime_base64_rank): No longer
- statically initialise these.
- (main): Removed + the tests at the end of the file.
- (header_raw_check_mailing_list): Dont compile regex's here,
- already compiled in utils_init. Use the regex patterns to remove
- leading <'s from addresses. Also, if there is a domain part
- matched, add that after a '@' is added.
-
- * camel-search-private.c (camel_search_header_match): Match check
- against all addresses in a multiple address match. Should fix
- #13051.
- (camel_search_header_match): Oops, missing i=0.
- (camel_search_header_match): Added SEARCH_TYPE_MLIST for mlist
- search types. It ignores the domain part if either (but not both)
- of the values dont have it.
-
-2001-10-22 Dan Winship <danw@ximian.com>
-
- * camel-pgp-mime.c (camel_pgp_mime_part_verify): Add a hack: if
- the multipart/signed part has a "x-inline-pgp-hack" parameter in
- its Content-Type, don't pass the MIME headers as part of the data
- to be verified.
-
-2001-10-22 Rodrigo Moya <rodrigo@ximian.com>
-
- * Makefile.am: added $GNOME_INCLUDEDIR to INCLUDES, needed for latest
- libgnome, which install headers in $(prefix)/gnome-1.0
-
-2001-10-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-part-utils.c
- (simple_data_wrapper_construct_from_parser): Only do the rawtext
- checks if the part is a text part, otherwise don't bother wasting
- cpu cycles.
-
- * camel-store.c (camel_folder_info_build): Updated comments to
- make the code a bit more clear.
-
-2001-10-21 Not Zed <NotZed@Ximian.com>
-
- * camel-store.c (CS_CLASS): Dont do the macro stuff - basically so
- you can actually debug calls.
- (camel_store_uri_cmp): New function to compare store objects.
-
- * camel-vee-folder.c (vee_folder_add_info): oops, dont free the
- vuid, since its alloca'd now.
- (folder_changed_change): Kill a compile warning.
-
-2001-10-20 Not Zed <NotZed@Ximian.com>
-
- * camel-folder.c (move_messages_to): If no exception supplied, use
- a local one.
- (move_message_to): Set the seen flag also when we delete it.
-
-2001-10-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-vtrash-folder.c (vtrash_move_messages_to): If the
- destination folder is the vfolder source folder, then
- set_message_flags on it.
-
-2001-10-19 Not Zed <NotZed@Ximian.com>
-
- * camel-session.c (register_provider): When registering provider,
- translate all strings.
-
- * camel-vee-folder.c (camel_vee_folder_remove_folder): Lock the
- right lock for unmatched subfolder list stuff. If the sub folder
- is deleted & part of unmatched, or the last ref to the sub folder
- is gone from unmatched, blow it away completely from unmatched,
- but only do it once.
- (vee_folder_remove_folder): Added arg to kill unmatched
- unconditionally. Also handle deleted folders, always remove
- stuff.
- (folder_changed_change): Lock subfolder lock for entirety of
- operation, and also check to see if the subfolder is still there
- before doing any fancy work (incase it got removed while we were
- waiting to execute).
- (folder_changed_change_uid): Use alloca for vuid, and not
- sprintf(".lengths")
- (vee_search_by_expression): Dont use sprintf for vuid.
- (vee_search_by_uids): "
- (vee_folder_add_info): "
- (folder_changed_remove_uid): "
- (folder_changed_change): "
- (folder_changed_change_uid): Also check folder_unmatched for
- changed uid's so we properly update/propagate unmatched changes.
- (folder_changed_change): Ok, so dont hold the subfolder lock for
- the whole duration of the changed event, although we probably
- should, requires a recursive mutex.
- (folder_changed_change): Change logic, we always add changed stuff
- if it now matches, but dont remove it unless its auto-remove, only
- propagate changes for it.
- (vee_set_message_flags): Call parent method after doing our work.
- (vee_set_message_user_flag): Same here.
-
-2001-10-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-part-utils.c
- (simple_data_wrapper_construct_from_parser): If a charset isn't
- specified or claims to be utf-8, check the validity of the text
- and if it's invalid, set the rawtext bit to TRUE. If the charset
- is x-unknown or some other x- charset, always set the rawtext bit
- to TRUE.
-
-2001-10-18 Not Zed <NotZed@Ximian.com>
-
- * camel-store.c (camel_store_unsubscribe_folder): If we are
- unsubscribing from a folder we have loaded, set the folder
- deleted, as with the delete_folder case.
-
- * providers/(imap|local|pop3|sendmail|smtp)/Makefile.am: Added
- CAMEL_CFLAGS so we get the right iconv stuff, patch from Yanko
- Kaneti <yaneti@declera.com>
-
-2001-10-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-pgp-context.c (crypto_exec_with_passwd): Make sure the
- cancel_fd isn't -1.
-
-2001-10-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-message-cache.c (insert_finish): Flush
- the stream here, not sure it really matters but it might
- (hopefully) fix bug #12943.
-
- * camel-pgp-context.c (crypto_exec_with_passwd): Make
- user-cancellable.
-
- * providers/local/camel-local-provider.c: String cleanup for bug
- #6640.
-
- * providers/imap/camel-imap-folder.c (imap_sync_online): Fix my
- Cyrus imapd workaround...instead of checking to see if info->flags
- == FLAGGED, just check to see if it contains any IMAP flags.
-
-2001-10-17 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-maildir-folder.c
- (camel_maildir_folder_new): Use '.' as the inbox name for filter
- new messages test.
-
- * camel-store.c (camel_folder_info_clone): New function to clone a
- folderinfo tree.
-
-2001-10-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/local/camel-mh-folder.c (mh_append_message): Same as
- maildir and mbox append-message.
-
- * providers/local/camel-maildir-folder.c (maildir_append_message):
- Same as mbox append.
-
- * camel-exception.c (camel_exception_set): Make sure the new
- description isn't the same as the old description pointer before
- freeing the old one.
- (camel_exception_setv): Don't free the old description until we
- set the new one this way we can reuse the old description in the
- new description.
-
- * providers/local/camel-mbox-folder.c (mbox_append_message): If
- errno == EINTR, then we got a user-cancel so set the exception
- appropriately so that we don't make the user shit his pants.
-
- * camel-filter-driver.c (do_copy): Add an optimization for when
- destination folder is the same as the source folder.
-
-2001-10-17 Not Zed <NotZed@Ximian.com>
-
- * providers/imap/camel-imap-store.c (get_folder_info_online):
- (parse_list_response_as_folder_info): Patch from Danw, Use unread
- count of -1 to mark unflagged messages. Make sure any folder we
- dont lookup explicitly is marked as -1. Should fix #9947 and
- friends.
-
- * providers/local/camel-mbox-summary.c (mbox_summary_sync): Only
- touch the summary if the timestamp or size changed.
-
-2001-10-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-filter-driver.c (camel_filter_driver_filter_message): Set
- the DELETED flag on directly on the info if the source folder
- doesn't have summary capability.
-
-2001-10-17 Not Zed <NotZed@Ximian.com>
-
- * camel-tcp-stream-raw.c (stream_write): As below.
-
- * camel-stream-fs.c (stream_write): If not checking cancellation,
- make sure we write out everything asked of us.
-
-2001-10-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-pgp-context.c (pgp_verify): Rearange the order of the gpg
- options slightly otherwise it might try to use "--no-tty" as the
- filename to verify :-)
-
- * camel-object.[c,h]: If CAMEL_DEBUG is defined, print some useful
- ref/unref info.
-
- * providers/imap/camel-imap-store.c (delete_folder): Fixed an
- assignment warning.
-
- * camel-uid-cache.c (camel_uid_cache_new): Make sure that the
- parent directory exists before trying to open the filename, if it
- doesn't, create it.
-
-2001-10-16 Not Zed <NotZed@Ximian.com>
-
- * camel-mime-utils.c (header_address_decode): If no content, dont
- try and decode further and spit meaningless warnings.
-
-2001-10-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-filter-driver.c (do_flag): Only perform the operation on
- the folder if the folder has summary capability, else just poke
- the info directly. Fixes the "Filters don't work" bug.
- (do_score): Same.
- (do_colour): And here too.
-
-2001-10-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-stream-fs.c (stream_read): Save the errno before calling
- fcntl so fcntl doesn't overwrite errno in case of a previous
- error.
- (stream_write): Same.
-
-2001-10-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/smtp/camel-smtp-transport.c (smtp_data): Replace the
- Bcc headers in a single location and don't flush the data unless
- the write was successful.
-
-2001-10-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * Makefile.am: Remove the stripheader filter from the build.
-
- * camel-mime-filter-stripheader.[c,h]: Removed.
-
- * providers/smtp/camel-smtp-transport.c (smtp_data): Check the
- return value of camel_stream_flush to make sure it flushed the
- data successfully before continuing. Don't use the stripheader
- filter, it was completely broken - instead remove the header and
- set it again after we send.
-
-2001-10-12 Not Zed <NotZed@Ximian.com>
-
- * camel-vee-folder.c (camel_vee_folder_remove_folder): Unhook from
- all events before removing folder.
- (camel_vee_folder_add_folder): Hook onto delete event.
- (camel_vee_folder_finalise): Unhook from deleted event for suibfolder.
- (subfolder_deleted): When the folder is deleted, remove it from
- the vfolder automagically.
-
-2001-10-11 Not Zed <NotZed@Ximian.com>
-
- * camel-vee-folder.c (vee_search_by_uids): convert the uids list
- to a subset appropriate for each subfolder before trying to search
- on it.
-
- * camel-charset-map.[ch]: Removed charset/locale charset lookup
- and iconv_open/close functions, moved to gal. Fixed all callers.
-
-2001-10-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-tcp-stream-ssl.c (ssl_cert_is_saved): Same.
-
- * camel-tcp-stream-openssl.c (ssl_cert_is_saved): Instead of
- opening the file, stat it and make sure that it belongs to us.
-
-2001-10-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-tcp-stream-openssl.c (ssl_verify): Same hack as below.
-
- * camel-tcp-stream-ssl.c (ssl_bad_cert): Hack around the fact that
- adding a cert to nss's certdb seems to not work.
-
-2001-10-10 Not Zed <NotZed@Ximian.com>
-
- * camel-vee-folder.c (vee_sync): Only re-build the folder if we're
- expunging. Also only clear out the changed folders list if we're
- expungung and everything worked.
-
-2001-10-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-charset-map.c (camel_charset_map_init): Added a hack for
- Solaris systems.
-
-2001-10-10 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-maildir-store.c (scan_dir): oops, we want
- get_unread_message_count, not get_message_count!
-
-2001-10-09 Not Zed <NotZed@Ximian.com>
-
- * camel-service.c (camel_service_disconnect): Duplicate connect
- code that unregisters a cancel op if we created one.
-
- * camel-operation.c (camel_operation_progress): Another go at
- getting the logic right again. Make transients only update after
- 5 seconds (CAMEL_OPERATION_TRANSIENT_DELAY)
- (camel_operation_end): Likewise.
-
- * providers/local/camel-spool-folder.c (spool_search_by_uids):
- Implement.
-
- * providers/imap/camel-imap-search.c (imap_body_contains): If
- searching a sub-set of the total message count, then use a UID
- range to search only specific messages.
-
- * camel-vee-folder.c (vee_folder_change_match): Removed.
- (folder_changed_add_uid): Helper func for changed code.
- (folder_changed_remove_uid): "
- (folder_changed_change_uid): "
- (folder_changed): Rewritten. Supports proper auto-updating of
- changes, but not removals till a sync occurs.
- (vee_search_by_uids): Implement.
- (folder_changed): Changed to call an async threaded function to do
- the actual folder updating.
-
- * camel-folder-summary.c (camel_flag_list_copy): New func to copy
- a whole list of flags.
- (camel_tag_list_copy): New func to copy a whole list of flags.
-
- * providers/imap/camel-imap-folder.c (imap_search_by_uids):
- Implement.
-
- * providers/local/camel-local-folder.c (local_search_by_uids):
- Implement.
-
- * camel-folder.c (camel_folder_search_by_uids): New function,
- search a subset of uid's.
- (search_by_uids): Default impl, return error.
-
-2001-10-08 Dan Winship <danw@ximian.com>
-
- * camel-folder.h (struct _CamelFolder): replace the ever-growing
- list of gbooleans with a single guint32 for flags.
-
- * camel-folder.c: Update folder flag setting/checking.
-
- * providers/pop3/camel-pop3-folder.c (camel_pop3_folder_init):
- * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new):
- * providers/local/camel-spool-folder.c (spool_init,
- camel_spool_folder_new):
- * providers/local/camel-maildir-folder.c (camel_maildir_folder_new):
- * providers/local/camel-local-folder.c (local_init):
- * providers/imap/camel-imap-folder.c (camel_imap_folder_init,
- camel_imap_folder_new):
- * camel-vtrash-folder.c (camel_vtrash_folder_init):
- * camel-vee-folder.c (camel_vee_folder_init):
- * camel-digest-folder.c (camel_digest_folder_init): update folder
- flag setting.
-
-2001-10-07 Dan Winship <danw@ximian.com>
-
- * providers/imap/camel-imap-store.c (get_folder_online): Unlock
- the store before returning error. (noted by NotZed)
-
-2001-10-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.c (header_decode_text): Fix a slight error in
- logic. Just because the last word was an encoded word doesn't mean
- we ignore the lwsp padding, we only ignore it if the last word and
- *this* word are encoded.
-
-2001-10-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-filter-basic.c (filter): Implemented uuencoding and
- decoding.
- (complete): Implemented uuencoding and decoding.
-
- * camel-mime-utils.c (uuencode_close): New function to flush the
- uu encoder.
- (uuencode_step): New function to uuencode a block of data.
-
-2001-10-05 Not Zed <NotZed@Ximian.com>
-
- * providers/imap/camel-imap-store.c (subscribe_folder): Use a
- folder_subscribed event rather than a folder_created one.
- (unsubscribe_folder): Similarly for unsubscribed/deleted.
- (create_folder): Emit a folder_created event on the folders we
- added. Not sure hsould probably check which ones are new and
- which ones are just existing ones?
- (delete_folder): Emit a folder_deletd event when we've deleted the
- folder. Part of fix for #11831.
-
- * camel-store.c (camel_store_class_init): Added
- folder_subscribed/unsubscribed events.
-
-2001-10-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-service.c (camel_service_finalize): Turn off warnings.
- (get_name): Same.
-
- * camel-sasl.c (sasl_challenge): Turn off warnings.
-
- * camel-tcp-stream.c (tcp_connect): Turn off warnings.
- (tcp_getsockopt): Same.
- (tcp_setsockopt): Here too.
- (tcp_get_socket): And here.
-
- * camel-folder.c (folder_sync): Turn off warnings.
- (expunge): Same.
- (append_message): Here too.
- (get_message): And here.
- (search_by_expression): And again here.
- (folder_changed): Here too.
-
- * camel-store.c (get_folder): Set an exception and turn off
- debugging g_warnings.
- (create_folder): Same.
- (delete_folder): Here too.
- (rename_folder): And here.
- (get_trash): And here.
- (get_folder_info): Same.
- (free_folder_info): And again here.
- (camel_folder_info_build): Here too.
- (folder_subscribed): Same.
- (subscribe_folder): Here too.
- (unsubscribe_folder): And here.
-
-2001-10-05 Not Zed <NotZed@Ximian.com>
-
- * camel-mime-utils.c (header_decode_mailbox): Try harder to get
- broken names out of addresses. Unencoded ,'s in names will still
- break it, but well what can you do eh?
- (header_decode_mailbox): Always add .'s into address we've scanned
- past a '.', even if we can't decode the next part. Fix for some
- annoying bug #.
-
-2001-10-04 Not Zed <NotZed@Ximian.com>
-
- * camel-store.c (camel_store_delete_folder): Change the order of
- execution slightly. We delete the folder first, then call the
- classes delete folder, then cleanup the hashtable afterwards.
- This is so deletes of vfolders work, since vee-store uses the
- folder hashtable to store all of is vfolders :-/
-
-2001-10-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-service.c (camel_service_connect): Unregister the
- operation before unreffing it.
-
-2001-10-03 Not Zed <NotZed@Ximian.com>
-
- * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
- Remove now unused 'recents' array/freeing func.
-
- * camel-object.c (camel_object_trigger_event): Oops, always run
- the prep function, even if we have no hooks listening. Causes
- incoming imap recents to get ignored bythe camel-folder filter
- inbox code.
-
- * providers/local/camel-local-folder.c (local_sync): Dont
- explicitly save metadata, its saved in summary_sync.
-
- * providers/local/camel-mh-summary.c: Call superclass.
- (mh_summary_check): Dont save ibex.
-
- * providers/local/camel-maildir-summary.c: Call superclass method.
- (maildir_summary_check): Dont save ibex explictly.
-
- * providers/local/camel-mbox-summary.c: Call super-class sync when
- done, saves summary/ibex, etc.
- (mbox_summary_check): Dont save ibex.
- (mbox_summary_sync): Call summary_check rather than trying to
- update from our known position.
-
- * providers/local/camel-local-summary.c
- (camel_local_summary_check): Dont save the summary or index here.
- (local_summary_sync): Save the summary/index here.
-
- * camel-search-private.c (camel_search_build_match_regex): Added
- MATCH_NEWLINE flag, -> REG_NEWLINE.
-
- * camel-lock-helper.c: Include <string.h> to kill some warnings.
-
- * camel-filter-search.c (get_full_header): Put \n's between each
- line we generate.
- (header_full_regex): Dont drop the first argument to the command
- -> empty matches!
- (header_full_regex): Set match_newline for building regex.
- (body_regex): And here too. These all fix #9877.
-
-2001-10-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-store.c (camel_store_delete_folder): Call
- camel_folder_delete() on the folder if it's "alive".
-
- * camel-folder.c (camel_folder_delete): Mark the folder as
- deleted, perform any folder specific cleanup and emit the deleted
- event.
- (camel_folder_sync): Only sync the folder if it hasn't been
- deleted.
- (camel_folder_expunge): Same.
-
-2001-10-03 Dan Winship <danw@ximian.com>
-
- * providers/local/camel-local-provider.c (local_url_equal):
- Strange are the ways of alloca. Fixes 11543.
-
-2001-10-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-tcp-stream-ssl.c (ssl_bad_cert): Import the certificate if
- the user accepts it.
-
-2001-10-02 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-local-provider.c (local_url_hash,
- local_url_equal): for hashing/comparing local url's, we ignore
- trailing /'s in paths (maybe shuld handle multiple /'s too).
- (camel_provider_module_init): Use local_url_hash/equal for all
- functions.
-
- * camel-sasl-digest-md5.c (digest_response): Change to
- camel_charset_iconv_open/close.
-
- * camel-pgp-context.c (pgp_verify): Change to
- camel_charset_iconv_open/close.
-
- * camel-mime-part-utils.c (convert_buffer): Change to
- camel_charset_iconv_open().
-
- * camel-mime-filter-charset.c
- (camel_mime_filter_charset_new_convert, finalise): Change to
- camel_charset_iconv_open, etc.
-
- * camel-mime-utils.c: Use the camel_charset_iconv_open/close()
- functions to open/close it.
-
- * camel-charset-map.c (camel_charset_iconv_open): New function,
- wrap iconv_open, so we can cache ic's.
- (camel_charset_iconv_close): Likewise for close.
- (camel_charset_map_init,shutdown): Init/free iconv cache.
-
-2001-10-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-charset-map.c (camel_charset_to_iconv): Revert my
- x-unknown special-case hack - this may mask other problems.
-
- * camel-mime-utils.c (rfc2047_decode_word): If the iconv
- conversion fails, for whatever reason, retry using the user's
- locale charset.
-
-2001-10-02 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-maildir-store.c (get_folder_info): Go back
- to using the store url's path, not the toplevel_dir thing.
-
- * camel-operation.c (camel_operation_progress): Fix the progress
- logic, so we dont update too often.
-
- * camel-object.c (camel_object_get_hooks): Change the lock to a
- recursive e-mutex.
- (camel_object_hook_event): Maintain list length of hook list.
- (camel_object_unhook_event): "
- (camel_object_unhook_event): If we are in an event, just mark the
- pair as removed, without removing it.
- (camel_object_trigger_event): Before running events, copy the
- list, and also ignore 'removed' events. After running events, if
- we're all out of events, then free up any pending-removed events.
- (camel_object_free_hooks): Add some new assertions on the state of
- the hook structure.
- Removed the #error if threads not defined. It _should_ actually
- work without threads.
- (camel_object_free_hooks): Free mutex when done.
-
-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 Not Zed <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 Not Zed <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 Not Zed <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 Not Zed <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 Not Zed <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 Not Zed <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 Not Zed <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 Not Zed <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 Not Zed <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 Not Zed <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 Not Zed <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 Not Zed <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 Not Zed <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 Not Zed <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 Not Zed <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 Not Zed <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 Not Zed <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 Not Zed <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 Not Zed <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 Not Zed <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): Changed 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 8BITMIME
- 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 <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 <notzed@helixcode.com>
-
- * camel-folder-summary.c (camel_folder_summary_finalise): Free
- summary items and charset filters.
-
-2000-05-10 NotZed <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 <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 <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 <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 <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 <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 <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 3924e0cd80..0000000000
--- a/camel/Makefile.am
+++ /dev/null
@@ -1,296 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-SUBDIRS = . providers tests
-
-libcamelincludedir = $(privincludedir)/camel
-
-camellibexecdir = $(privlibexecdir)/camel
-camellibexec_PROGRAMS = camel-lock-helper camel-index-control
-
-privlib_LTLIBRARIES = libcamel.la
-
-INCLUDES = -I.. -I$(srcdir)/.. \
- -I$(top_srcdir)/intl \
- -I$(top_srcdir)/e-util \
- -DCAMEL_LIBEXECDIR=\""$(camellibexecdir)"\" \
- -DCAMEL_PROVIDERDIR=\""$(camel_providerdir)"\" \
- -DG_LOG_DOMAIN=\"camel\" \
- $(CAMEL_CFLAGS)
-
-if ENABLE_SMIME
-SMIME_SOURCES_C = camel-smime-context.c
-SMIME_SOURCES_H = camel-smime-context.h
-else
-SMIME_SOURCES_C =
-SMIME_SOURCES_H =
-endif
-
-libcamel_la_SOURCES = \
- broken-date-parser.c \
- camel-address.c \
- camel-arg.c \
- camel-block-file.c \
- camel-certdb.c \
- camel-charset-map.c \
- camel-cipher-context.c \
- camel-data-cache.c \
- camel-data-wrapper.c \
- camel-digest-folder.c \
- camel-digest-store.c \
- camel-digest-summary.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-gpg-context.c \
- camel-html-parser.c \
- camel-http-stream.c \
- camel-index.c \
- camel-internet-address.c \
- camel-junk-plugin.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-canon.c \
- camel-mime-filter-crlf.c \
- camel-mime-filter-enriched.c \
- camel-mime-filter-from.c \
- camel-mime-filter-html.c \
- camel-mime-filter-tohtml.c \
- camel-mime-filter-index.c \
- camel-mime-filter-linewrap.c \
- camel-mime-filter-save.c \
- camel-mime-filter-windows.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-multipart-encrypted.c \
- camel-multipart-signed.c \
- camel-object.c \
- camel-operation.c \
- camel-partition-table.c \
- camel-provider.c \
- camel-sasl.c \
- camel-sasl-anonymous.c \
- camel-sasl-cram-md5.c \
- camel-sasl-digest-md5.c \
- camel-sasl-gssapi.c \
- camel-sasl-kerberos4.c \
- camel-sasl-login.c \
- camel-sasl-ntlm.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 \
- $(SMIME_SOURCES_C) \
- camel-store.c \
- camel-store-summary.c \
- camel-stream-buffer.c \
- camel-stream-filter.c \
- camel-stream-fs.c \
- camel-stream-mem.c \
- camel-stream-null.c \
- camel-stream-process.c \
- camel-stream.c \
- camel-string-utils.c \
- camel-text-index.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-url-scanner.c \
- camel-utf8.c \
- camel-vee-folder.c \
- camel-vee-store.c \
- camel-vtrash-folder.c \
- camel.c
-
-libcamelinclude_HEADERS = \
- broken-date-parser.h \
- camel-address.h \
- camel-arg.h \
- camel-block-file.h \
- camel-certdb.h \
- camel-charset-map.h \
- camel-cipher-context.h \
- camel-data-cache.h \
- camel-data-wrapper.h \
- camel-digest-folder.h \
- camel-digest-store.h \
- camel-digest-summary.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-gpg-context.h \
- camel-http-stream.h \
- camel-index.h \
- camel-internet-address.h \
- camel-i18n.h \
- camel-junk-plugin.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-canon.h \
- camel-mime-filter-crlf.h \
- camel-mime-filter-enriched.h \
- camel-mime-filter-from.h \
- camel-mime-filter-html.h \
- camel-mime-filter-tohtml.h \
- camel-mime-filter-index.h \
- camel-mime-filter-linewrap.h \
- camel-mime-filter-save.h \
- camel-mime-filter-windows.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-multipart-encrypted.h \
- camel-multipart-signed.h \
- camel-object.h \
- camel-operation.h \
- camel-partition-table.h \
- camel-provider.h \
- camel-sasl.h \
- camel-sasl-anonymous.h \
- camel-sasl-cram-md5.h \
- camel-sasl-digest-md5.h \
- camel-sasl-gssapi.h \
- camel-sasl-kerberos4.h \
- camel-sasl-login.h \
- camel-sasl-ntlm.h \
- camel-sasl-plain.h \
- camel-sasl-popb4smtp.h \
- camel-seekable-stream.h \
- camel-seekable-substream.h \
- camel-service.h \
- camel-session.h \
- $(SMIME_SOURCES_H) \
- camel-store.h \
- camel-store-summary.h \
- camel-stream-buffer.h \
- camel-stream-filter.h \
- camel-stream-fs.h \
- camel-stream-mem.h \
- camel-stream-null.h \
- camel-stream-process.h \
- camel-stream.h \
- camel-string-utils.h \
- camel-text-index.h \
- camel-tcp-stream-raw.h \
- camel-tcp-stream-ssl.h \
- camel-tcp-stream.h \
- camel-transport.h \
- camel-types.h \
- camel-uid-cache.h \
- camel-url.h \
- camel-url-scanner.h \
- camel-utf8.h \
- camel-vee-folder.h \
- camel-vee-store.h \
- camel-vtrash-folder.h \
- camel.h
-
-libcamel_la_LDFLAGS = -version-info 0:0:0
-
-libcamel_la_LIBADD = \
- $(top_builddir)/e-util/libeutil.la \
- $(CAMEL_LIBS)
-
-camel_lock_helper_SOURCES = \
- camel-lock-helper.c \
- camel-lock-helper.h
-
-# NOTE: This needs to be cleaned up, it shouldn't link with all this crap,
-# because it might be setuid.
-camel_lock_helper_LDADD = \
- camel-lock.o \
- $(libcamel_la_LIBADD)
-
-camel_index_control_SOURCES = \
- camel-index-control.c
-
-camel_index_control_LDADD = \
- $(libcamel_la_LIBADD) \
- libcamel.la
-# $(EVOLUTION_MAIL_LIBS)
-
-install-exec-hook:
- @if test -n "$(CAMEL_LOCK_HELPER_USER)"; then \
- if test `whoami` = root ; then \
- chown $(CAMEL_LOCK_HELPER_USER) $(DESTDIR)$(camellibexecdir)/camel-lock-helper ; \
- chmod u+s $(DESTDIR)$(camellibexecdir)/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)$(camellibexecdir)/camel-lock-helper ; \
- chmod g+s $(DESTDIR)$(camellibexecdir)/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)$(camellibexecdir)/camel-lock-helper" ; \
- echo " 3. chmod g+s $(DESTDIR)$(camellibexecdir)/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 = \
- ChangeLog.pre-1-4 \
- camel-smime-context.h \
- camel-smime-context.c \
- README
diff --git a/camel/README b/camel/README
deleted file mode 100644
index 89b57ad3c7..0000000000
--- a/camel/README
+++ /dev/null
@@ -1,54 +0,0 @@
-
- CAMEL
-
-
- A generic Messaging Library
-
-
- ----
-
-
-Introduction:
--------------
-
-Camel is a generic messaging library. It supports the standard
-messaging system for receiving and sending messages. It is the
-messaging backend for Evolution.
-
-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.
-
-
-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 bad1b76eb8..0000000000
--- a/camel/README.COPYRIGHT
+++ /dev/null
@@ -1,46 +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 software with licenses incompatible with the
-GPL. For this reason, the copyright has to be owned by a unique
-entity. Be sure, however, that Camel will always be available under
-the GPL. 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
-GPL.
-
-Thus, when adding code in Camel, always add the following lines at the
-begining of the file:
-
-/*
- * Copyright 1999, 200x Ximian, Inc. (http://www.ximian.com)
- *
- * Author: Your name <your.email@address>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 list inside this
-header.
-
-Please contact Ximian, Inc. (http://www.ximian.com) if you want to discuss
-this copyright issue.
-
-Happy hacking,
-
-Ximian, Inc.
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 19fc0c2271..0000000000
--- a/camel/broken-date-parser.c
+++ /dev/null
@@ -1,532 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <sys/time.h>
-#include <time.h>
-
-#include "broken-date-parser.h"
-#include "e-time-utils.h"
-
-#define d(x)
-
-#define NUMERIC_CHARS "1234567890"
-#define WEEKDAY_CHARS "SundayMondayTuesdayWednesdayThursdayFridaySaturday"
-#define MONTH_CHARS "JanuaryFebruaryMarchAprilMayJuneJulyAugustSeptemberOctoberNovemberDecember"
-#define TIMEZONE_ALPHA_CHARS "UTCGMTESTEDTCSTCDTMSTPSTPDTZAMNY()"
-#define TIMEZONE_NUMERIC_CHARS "-+1234567890"
-#define TIME_CHARS "1234567890:"
-
-#define DATE_TOKEN_NON_NUMERIC (1 << 0)
-#define DATE_TOKEN_NON_WEEKDAY (1 << 1)
-#define DATE_TOKEN_NON_MONTH (1 << 2)
-#define DATE_TOKEN_NON_TIME (1 << 3)
-#define DATE_TOKEN_HAS_COLON (1 << 4)
-#define DATE_TOKEN_NON_TIMEZONE_ALPHA (1 << 5)
-#define DATE_TOKEN_NON_TIMEZONE_NUMERIC (1 << 6)
-#define DATE_TOKEN_HAS_SIGN (1 << 7)
-
-static unsigned char datetok_table[256] = {
- 128,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
- 111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
- 111,111,111,111,111,111,111,111, 79, 79,111,175,111,175,111,111,
- 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,119,111,111,111,111,111,
- 111, 75,111, 79, 75, 79,105, 79,111,111,107,111,111, 73, 75,107,
- 79,111,111, 73, 77, 79,111,109,111, 79, 79,111,111,111,111,111,
- 111,105,107,107,109,105,111,107,105,105,111,111,107,107,105,105,
- 107,111,105,105,105,105,107,111,111,105,111,111,111,111,111,111,
- 111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
- 111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
- 111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
- 111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
- 111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
- 111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
- 111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
- 111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
-};
-
-/* 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 *tm_months[] = {
- "Jan", "Feb", "Mar", "Apr", "May", "Jun",
- "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
-};
-
-static char *tm_days[] = {
- "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
-};
-
-
-struct _date_token {
- struct _date_token *next;
- const unsigned char *start;
- unsigned int len;
- unsigned int mask;
-};
-
-/* This is where it gets ugly... */
-static struct _date_token *
-datetok (const char *date)
-{
- struct _date_token *tokens = NULL, *token, *tail = (struct _date_token *) &tokens;
- const unsigned char *start, *end;
- unsigned int mask;
-
- start = date;
- while (*start) {
- /* kill leading whitespace */
- while (*start && isspace ((int) *start))
- start++;
-
- if (*start == '\0')
- break;
-
- mask = datetok_table[*start];
-
- /* find the end of this token */
- end = start + 1;
- while (*end && !strchr ("-/,\t\r\n ", *end))
- mask |= datetok_table[*end++];
-
- if (end != start) {
- token = g_malloc (sizeof (struct _date_token));
- token->next = NULL;
- token->start = start;
- token->len = end - start;
- token->mask = mask;
-
- tail->next = token;
- tail = token;
- }
-
- if (*end)
- start = end + 1;
- else
- break;
- }
-
- return tokens;
-}
-
-static int
-decode_int (const unsigned char *in, unsigned int inlen)
-{
- register const unsigned char *inptr;
- const unsigned char *inend;
- int sign = 1, val = 0;
-
- inptr = in;
- inend = in + inlen;
-
- if (*inptr == '-') {
- sign = -1;
- inptr++;
- } else if (*inptr == '+')
- inptr++;
-
- for ( ; inptr < inend; inptr++) {
- if (!isdigit ((int) *inptr))
- return -1;
- else
- val = (val * 10) + (*inptr - '0');
- }
-
- val *= sign;
-
- return val;
-}
-
-static int
-get_wday (const unsigned char *in, unsigned int inlen)
-{
- int wday;
-
- if (inlen < 3)
- return -1;
-
- for (wday = 0; wday < 7; wday++)
- if (!strncasecmp (in, tm_days[wday], 3))
- return wday;
-
- return -1; /* unknown week day */
-}
-
-static int
-get_mday (const unsigned char *in, unsigned int inlen)
-{
- int mday;
-
- mday = decode_int (in, inlen);
-
- if (mday < 0 || mday > 31)
- mday = -1;
-
- return mday;
-}
-
-static int
-get_month (const unsigned char *in, unsigned int inlen)
-{
- int i;
-
- if (inlen < 3)
- return -1;
-
- for (i = 0; i < 12; i++)
- if (!strncasecmp (in, tm_months[i], 3))
- return i;
-
- return -1; /* unknown month */
-}
-
-static int
-get_year (const unsigned char *in, unsigned int inlen)
-{
- int year;
-
- year = decode_int (in, inlen);
- if (year == -1)
- return -1;
-
- if (year < 100)
- year += (year < 70) ? 2000 : 1900;
-
- if (year < 1969)
- return -1;
-
- return year;
-}
-
-static gboolean
-get_time (const unsigned char *in, unsigned int inlen, int *hour, int *min, int *sec)
-{
- register const unsigned char *inptr;
- const unsigned char *inend;
- int *val, colons = 0;
-
- *hour = *min = *sec = 0;
-
- inend = in + inlen;
- val = hour;
- for (inptr = in; inptr < inend; inptr++) {
- if (*inptr == ':') {
- colons++;
- switch (colons) {
- case 1:
- val = min;
- break;
- case 2:
- val = sec;
- break;
- default:
- return FALSE;
- }
- } else if (!isdigit ((int) *inptr))
- return FALSE;
- else
- *val = (*val * 10) + (*inptr - '0');
- }
-
- return TRUE;
-}
-
-static int
-get_tzone (struct _date_token **token)
-{
- const unsigned char *inptr, *inend;
- unsigned int inlen;
- int i, t;
-
- for (i = 0; *token && i < 2; *token = (*token)->next, i++) {
- inptr = (*token)->start;
- inlen = (*token)->len;
- inend = inptr + inlen;
-
- if (*inptr == '+' || *inptr == '-') {
- t = decode_int (inptr, inlen);
- if (t < -1200 || t > 1400)
- return -1;
-
- return t;
- } else {
- if (*inptr == '(') {
- inptr++;
- if (*(inend - 1) == ')')
- inlen -= 2;
- else
- inlen--;
- }
-
- for (t = 0; t < 15; t++) {
- unsigned int len = strlen (tz_offsets[t].name);
-
- if (len != inlen)
- continue;
-
- if (!strncmp (inptr, tz_offsets[t].name, len))
- return tz_offsets[t].offset;
- }
- }
- }
-
- return -1;
-}
-
-/* This is where things get interesting... ;-) */
-
-#define date_token_mask(t) (((struct _date_token *) t)->mask)
-#define is_numeric(t) ((date_token_mask (t) & DATE_TOKEN_NON_NUMERIC) == 0)
-#define is_weekday(t) ((date_token_mask (t) & DATE_TOKEN_NON_WEEKDAY) == 0)
-#define is_month(t) ((date_token_mask (t) & DATE_TOKEN_NON_MONTH) == 0)
-#define is_time(t) (((date_token_mask (t) & DATE_TOKEN_NON_TIME) == 0) && (date_token_mask (t) & DATE_TOKEN_HAS_COLON))
-#define is_tzone_alpha(t) ((date_token_mask (t) & DATE_TOKEN_NON_TIMEZONE_ALPHA) == 0)
-#define is_tzone_numeric(t) (((date_token_mask (t) & DATE_TOKEN_NON_TIMEZONE_NUMERIC) == 0) && (date_token_mask (t) & DATE_TOKEN_HAS_SIGN))
-#define is_tzone(t) (is_tzone_alpha (t) || is_tzone_numeric (t))
-
-static time_t
-decode_broken_date (struct _date_token *tokens, int *tzone)
-{
- gboolean got_wday, got_month, got_tzone;
- int hour, min, sec, offset, n;
- struct _date_token *token;
- struct tm tm;
- time_t time;
-
- memset ((void *) &tm, 0, sizeof (struct tm));
- got_wday = got_month = got_tzone = FALSE;
- offset = 0;
-
- token = tokens;
- while (token) {
- if (is_weekday (token) && !got_wday) {
- if ((n = get_wday (token->start, token->len)) != -1) {
- d(printf ("weekday; "));
- got_wday = TRUE;
- tm.tm_wday = n;
- goto next_token;
- }
- }
-
- if (is_month (token) && !got_month) {
- if ((n = get_month (token->start, token->len)) != -1) {
- d(printf ("month; "));
- got_month = TRUE;
- tm.tm_mon = n;
- goto next_token;
- }
- }
-
- if (is_time (token) && !tm.tm_hour && !tm.tm_min && !tm.tm_sec) {
- if (get_time (token->start, token->len, &hour, &min, &sec)) {
- d(printf ("time; "));
- tm.tm_hour = hour;
- tm.tm_min = min;
- tm.tm_sec = sec;
- goto next_token;
- }
- }
-
- if (is_tzone (token) && !got_tzone) {
- struct _date_token *t = token;
-
- if ((n = get_tzone (&t)) != -1) {
- d(printf ("tzone; "));
- got_tzone = TRUE;
- offset = n;
- goto next_token;
- }
- }
-
- if (is_numeric (token)) {
- if (token->len == 4 && !tm.tm_year) {
- if ((n = get_year (token->start, token->len)) != -1) {
- d(printf ("year; "));
- tm.tm_year = n - 1900;
- goto next_token;
- }
- } else {
- if (!got_month && !got_wday && token->next && is_numeric (token->next)) {
- d(printf ("mon; "));
- n = decode_int (token->start, token->len);
- got_month = TRUE;
- tm.tm_mon = n - 1;
- goto next_token;
- } else if (!tm.tm_mday && (n = get_mday (token->start, token->len)) != -1) {
- d(printf ("mday; "));
- tm.tm_mday = n;
- goto next_token;
- } else if (!tm.tm_year) {
- d(printf ("2-digit year; "));
- n = get_year (token->start, token->len);
- tm.tm_year = n - 1900;
- goto next_token;
- }
- }
- }
-
- d(printf ("???; "));
-
- next_token:
-
- token = token->next;
- }
-
- d(printf ("\n"));
-
- time = e_mktime_utc (&tm);
-
- /* time is now GMT of the time we want, but not offset by the timezone ... */
-
- /* this should convert the time to the GMT equiv time */
- time -= ((offset / 100) * 60 * 60) + (offset % 100) * 60;
-
- if (tzone)
- *tzone = offset;
-
- return time;
-}
-
-
-/**
- * parse_broken_date:
- * @datestr: input date string
- * @saveoffset:
- *
- * Decodes the rfc822/broken date string and saves the GMT offset into
- * @saveoffset if non-NULL.
- *
- * Returns the time_t representation of the date string specified by
- * @in. If 'saveoffset' is non-NULL, the value of the timezone offset
- * will be stored.
- **/
-time_t
-parse_broken_date (const char *datestr, int *saveoffset)
-{
- struct _date_token *token, *tokens;
- time_t date;
-
- tokens = datetok (datestr);
-
- date = decode_broken_date (tokens, saveoffset);
-
- /* cleanup */
- while (tokens) {
- token = tokens;
- tokens = tokens->next;
- g_free (token);
- }
-
- return date;
-}
-
-
-
-
-
-#ifdef DATETOK_STANDALONE
-
-static void
-table_init ()
-{
- int i;
-
- memset (datetok_table, 0, sizeof (datetok_table));
-
- for (i = 0; i < 256; i++) {
- if (!strchr (NUMERIC_CHARS, i))
- datetok_table[i] |= DATE_TOKEN_NON_NUMERIC;
-
- if (!strchr (WEEKDAY_CHARS, i))
- datetok_table[i] |= DATE_TOKEN_NON_WEEKDAY;
-
- if (!strchr (MONTH_CHARS, i))
- datetok_table[i] |= DATE_TOKEN_NON_MONTH;
-
- if (!strchr (TIME_CHARS, i))
- datetok_table[i] |= DATE_TOKEN_NON_TIME;
-
- if (!strchr (TIMEZONE_ALPHA_CHARS, i))
- datetok_table[i] |= DATE_TOKEN_NON_TIMEZONE_ALPHA;
-
- if (!strchr (TIMEZONE_NUMERIC_CHARS, i))
- datetok_table[i] |= DATE_TOKEN_NON_TIMEZONE_NUMERIC;
-
- if (((char) i) == ':')
- datetok_table[i] |= DATE_TOKEN_HAS_COLON;
-
- if (strchr ("+-", i))
- datetok_table[i] |= DATE_TOKEN_HAS_SIGN;
- }
-
- printf ("static unsigned int datetok_table[256] = {");
- for (i = 0; i < 256; i++) {
- if (i % 16 == 0)
- printf ("\n\t");
- printf ("%3d,", datetok_table[i]);
- }
- printf ("\n};\n");
-}
-
-
-int main (int argc, char **argv)
-{
- time_t date;
- int offset;
-
- /*table_init ();*/
-
- date = parse_broken_date (argv[1], &offset);
- printf ("%d; %d\n", date, offset);
-
- return 0;
-}
-
-#endif /* DATETOK_STANDALONE */
diff --git a/camel/broken-date-parser.h b/camel/broken-date-parser.h
deleted file mode 100644
index b69d7636d7..0000000000
--- a/camel/broken-date-parser.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 2000 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <time.h>
-
-/* prototypes for functions dealing with broken date formats */
-
-time_t parse_broken_date (const char *datestr, int *saveoffset);
-
-
-
-
-
diff --git a/camel/camel-address.c b/camel/camel-address.c
deleted file mode 100644
index a25e9ba791..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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-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 caf7e97755..0000000000
--- a/camel/camel-address.h
+++ /dev/null
@@ -1,79 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_ADDRESS_H
-#define _CAMEL_ADDRESS_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#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);
-};
-
-CamelType 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);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* ! _CAMEL_ADDRESS_H */
diff --git a/camel/camel-arg.c b/camel/camel-arg.c
deleted file mode 100644
index bcd79bab59..0000000000
--- a/camel/camel-arg.c
+++ /dev/null
@@ -1,130 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- *
- *
- * Author:
- * Michael Zucchi <notzed@ximian.com>
- *
- * Copyright 2002 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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-arg.h"
-
-int camel_argv_build(CamelArgV *tv)
-{
- register guint32 tag;
- register int i;
- register CamelArg *a;
- int more = TRUE;
-
- for (i=0;i<CAMEL_ARGV_MAX;i++) {
- a = &tv->argv[i];
-
- if ( (tag = va_arg(tv->ap, guint32)) == 0) {
- more = FALSE;
- break;
- }
-
- a->tag = tag;
-
- switch((tag & CAMEL_ARG_TYPE)) {
- case CAMEL_ARG_OBJ:
- a->ca_object = va_arg(tv->ap, void *);
- break;
- case CAMEL_ARG_INT:
- a->ca_int = va_arg(tv->ap, int);
- break;
- case CAMEL_ARG_DBL:
- a->ca_double = va_arg(tv->ap, double);
- break;
- case CAMEL_ARG_STR:
- a->ca_str = va_arg(tv->ap, char *);
- break;
- case CAMEL_ARG_PTR:
- a->ca_ptr = va_arg(tv->ap, void *);
- break;
- case CAMEL_ARG_BOO:
- a->ca_int = va_arg(tv->ap, int) != 0;
- break;
- default:
- printf("Error, unknown type, truncating result\n");
- more = FALSE;
- goto fail;
- }
-
- }
-fail:
- tv->argc = i;
-
- return more;
-}
-
-int camel_arggetv_build(CamelArgGetV *tv)
-{
- register guint32 tag;
- register int i;
- register CamelArgGet *a;
- int more = TRUE;
-
- for (i=0;i<CAMEL_ARGV_MAX;i++) {
- a = &tv->argv[i];
-
- if ( (tag = va_arg(tv->ap, guint32)) == 0) {
- more = FALSE;
- break;
- }
-
- a->tag = tag;
-
- switch((tag & CAMEL_ARG_TYPE)) {
- case CAMEL_ARG_OBJ:
- a->ca_object = va_arg(tv->ap, void **);
- *a->ca_object = NULL;
- break;
- case CAMEL_ARG_INT:
- case CAMEL_ARG_BOO:
- a->ca_int = va_arg(tv->ap, int *);
- *a->ca_int = 0;
- break;
- case CAMEL_ARG_DBL:
- a->ca_double = va_arg(tv->ap, double *);
- *a->ca_double = 0.0;
- break;
- case CAMEL_ARG_STR:
- a->ca_str = va_arg(tv->ap, char **);
- *a->ca_str = NULL;
- break;
- case CAMEL_ARG_PTR:
- a->ca_ptr = va_arg(tv->ap, void **);
- *a->ca_ptr = NULL;
- break;
- default:
- printf("Error, unknown type, truncating result\n");
- more = FALSE;
- goto fail;
- }
-
- }
-fail:
- tv->argc = i;
-
- return more;
-}
-
diff --git a/camel/camel-arg.h b/camel/camel-arg.h
deleted file mode 100644
index ebecc0f217..0000000000
--- a/camel/camel-arg.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Author:
- * Michael Zucchi <notzed@ximian.com>
- *
- * Copyright 2002 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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_ARG_H
-#define CAMEL_ARG_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus } */
-
-#include <glib.h>
-#include <stdarg.h>
-
-enum camel_arg_t {
- CAMEL_ARG_END = 0,
- CAMEL_ARG_IGNORE = 1, /* override/ignore an arg in-place */
-
- CAMEL_ARG_FIRST = 1024, /* 1024 args reserved for arg system */
-
- CAMEL_ARG_TYPE = 0xf0000000, /* type field for tags */
- CAMEL_ARG_TAG = 0x0fffffff, /* tag field for args */
-
- CAMEL_ARG_OBJ = 0x00000000, /* object */
- CAMEL_ARG_INT = 0x10000000, /* int */
- CAMEL_ARG_DBL = 0x20000000, /* double */
- CAMEL_ARG_STR = 0x30000000, /* c string */
- CAMEL_ARG_PTR = 0x40000000, /* ptr */
- CAMEL_ARG_BOO = 0x50000000, /* bool */
-};
-
-typedef struct _CamelArg CamelArg;
-typedef struct _CamelArgV CamelArgV;
-
-typedef struct _CamelArgGet CamelArgGet;
-typedef struct _CamelArgGetV CamelArgGetV;
-
-struct _CamelArg {
- guint32 tag;
- union {
- void *ca_object;
- int ca_int;
- double ca_double;
- char *ca_str;
- void *ca_ptr;
- } u;
-};
-struct _CamelArgGet {
- guint32 tag;
- union {
- void **ca_object;
- int *ca_int;
- double *ca_double;
- char **ca_str;
- void **ca_ptr;
- } u;
-};
-#define ca_object u.ca_object
-#define ca_int u.ca_int
-#define ca_double u.ca_double
-#define ca_str u.ca_str
-#define ca_ptr u.ca_ptr
-
-/* maximum no of args processed at any one time, not the max of all args */
-#define CAMEL_ARGV_MAX (20)
-
-struct _CamelArgV {
- va_list ap;
- int argc;
- CamelArg argv[CAMEL_ARGV_MAX];
-};
-
-struct _CamelArgGetV {
- va_list ap;
- int argc;
- CamelArgGet argv[CAMEL_ARGV_MAX];
-};
-
-#define camel_argv_start(tv, last) va_start((tv)->ap, last)
-#define camel_argv_end(tv) va_end((tv)->ap)
-int camel_argv_build(CamelArgV *tv);
-int camel_arggetv_build(CamelArgGetV *tv);
-
-/* set an arg ignored */
-#define camel_argv_ignore(tv, i) ((tv)->argv[i].tag = ((tv)->argv[i].tag & CAMEL_ARG_TYPE) | CAMEL_ARG_IGNORE)
-
-/* 'self-describing' property list */
-typedef struct _CamelProperty CamelProperty;
-
-struct _CamelProperty {
- guint32 tag;
- char *name;
- char *description;
-};
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_ARG_H */
diff --git a/camel/camel-block-file.c b/camel/camel-block-file.c
deleted file mode 100644
index 68008502b4..0000000000
--- a/camel/camel-block-file.c
+++ /dev/null
@@ -1,1181 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2001-2003 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/uio.h>
-#include <pthread.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-
-#include "e-util/e-msgport.h"
-
-#include "camel-block-file.h"
-#include "camel-file-utils.h"
-
-#define d(x) /*(printf("%s(%d):%s: ", __FILE__, __LINE__, __PRETTY_FUNCTION__),(x))*/
-
-/* Locks must be obtained in the order defined */
-
-struct _CamelBlockFilePrivate {
- /* We use the private structure to form our lru list from */
- struct _CamelBlockFilePrivate *next;
- struct _CamelBlockFilePrivate *prev;
-
- struct _CamelBlockFile *base;
-
- pthread_mutex_t root_lock; /* for modifying the root block */
- pthread_mutex_t cache_lock; /* for refcounting, flag manip, cache manip */
- pthread_mutex_t io_lock; /* for all io ops */
-
- unsigned int deleted:1;
-};
-
-
-#define CAMEL_BLOCK_FILE_LOCK(kf, lock) (pthread_mutex_lock(&(kf)->priv->lock))
-#define CAMEL_BLOCK_FILE_TRYLOCK(kf, lock) (pthread_mutex_trylock(&(kf)->priv->lock))
-#define CAMEL_BLOCK_FILE_UNLOCK(kf, lock) (pthread_mutex_unlock(&(kf)->priv->lock))
-
-#define LOCK(x) pthread_mutex_lock(&x)
-#define UNLOCK(x) pthread_mutex_unlock(&x)
-
-static pthread_mutex_t block_file_lock = PTHREAD_MUTEX_INITIALIZER;
-
-/* lru cache of block files */
-static EDList block_file_list = E_DLIST_INITIALISER(block_file_list);
-/* list to store block files that are actually intialised */
-static EDList block_file_active_list = E_DLIST_INITIALISER(block_file_active_list);
-static int block_file_count = 0;
-static int block_file_threshhold = 10;
-
-#define CBF_CLASS(o) ((CamelBlockFileClass *)(((CamelObject *)o)->klass))
-
-static int sync_nolock(CamelBlockFile *bs);
-static int sync_block_nolock(CamelBlockFile *bs, CamelBlock *bl);
-
-static int
-block_file_validate_root(CamelBlockFile *bs)
-{
- struct stat st;
- CamelBlockRoot *br;
- int s;
-
- br = bs->root;
-
- s = fstat(bs->fd, &st);
-
- d(printf("Validate root: '%s'\n", bs->path));
- d(printf("version: %.8s (%.8s)\n", bs->root->version, bs->version));
- d(printf("block size: %d (%d)%s\n", br->block_size, bs->block_size,
- br->block_size != bs->block_size ? " BAD":" OK"));
- d(printf("free: %ld (%d add size < %ld)%s\n", (long)br->free, br->free / bs->block_size * bs->block_size, (long)st.st_size,
- (br->free > st.st_size) || (br->free % bs->block_size) != 0 ? " BAD":" OK"));
- d(printf("last: %ld (%d and size: %ld)%s\n", (long)br->last, br->last / bs->block_size * bs->block_size, (long)st.st_size,
- (br->last != st.st_size) || ((br->last % bs->block_size) != 0) ? " BAD": " OK"));
- d(printf("flags: %s\n", (br->flags & CAMEL_BLOCK_FILE_SYNC)?"SYNC":"unSYNC"));
-
- if (br->last == 0
- || memcmp(bs->root->version, bs->version, 8) != 0
- || br->block_size != bs->block_size
- || (br->free % bs->block_size) != 0
- || (br->last % bs->block_size) != 0
- || fstat(bs->fd, &st) == -1
- || st.st_size != br->last
- || br->free > st.st_size
- || (br->flags & CAMEL_BLOCK_FILE_SYNC) == 0) {
- if (s != -1 && st.st_size > 0) {
- g_warning("Invalid root: '%s'", bs->path);
- g_warning("version: %.8s (%.8s)", bs->root->version, bs->version);
- g_warning("block size: %d (%d)%s", br->block_size, bs->block_size,
- br->block_size != bs->block_size ? " BAD":" OK");
- g_warning("free: %ld (%d add size < %ld)%s", (long)br->free, br->free / bs->block_size * bs->block_size, (long)st.st_size,
- (br->free > st.st_size) || (br->free % bs->block_size) != 0 ? " BAD":" OK");
- g_warning("last: %ld (%d and size: %ld)%s", (long)br->last, br->last / bs->block_size * bs->block_size, (long)st.st_size,
- (br->last != st.st_size) || ((br->last % bs->block_size) != 0) ? " BAD": " OK");
- g_warning("flags: %s", (br->flags & CAMEL_BLOCK_FILE_SYNC)?"SYNC":"unSYNC");
- }
- return -1;
- }
-
- return 0;
-}
-
-static int
-block_file_init_root(CamelBlockFile *bs)
-{
- CamelBlockRoot *br = bs->root;
-
- memset(br, 0, bs->block_size);
- memcpy(br->version, bs->version, 8);
- br->last = bs->block_size;
- br->flags = CAMEL_BLOCK_FILE_SYNC;
- br->free = 0;
- br->block_size = bs->block_size;
-
- return 0;
-}
-
-static void
-camel_block_file_class_init(CamelBlockFileClass *klass)
-{
- klass->validate_root = block_file_validate_root;
- klass->init_root = block_file_init_root;
-}
-
-static guint
-block_hash_func(const void *v)
-{
- return ((camel_block_t) GPOINTER_TO_UINT(v)) >> CAMEL_BLOCK_SIZE_BITS;
-}
-
-static void
-camel_block_file_init(CamelBlockFile *bs)
-{
- struct _CamelBlockFilePrivate *p;
-
- bs->fd = -1;
- bs->block_size = CAMEL_BLOCK_SIZE;
- e_dlist_init(&bs->block_cache);
- bs->blocks = g_hash_table_new((GHashFunc)block_hash_func, NULL);
- /* this cache size and the text index size have been tuned for about the best
- with moderate memory usage. Doubling the memory usage barely affects performance. */
- bs->block_cache_limit = 256;
-
- p = bs->priv = g_malloc0(sizeof(*bs->priv));
- p->base = bs;
-
- pthread_mutex_init(&p->root_lock, NULL);
- pthread_mutex_init(&p->cache_lock, NULL);
- pthread_mutex_init(&p->io_lock, NULL);
-
- /* link into lru list */
- LOCK(block_file_lock);
- e_dlist_addhead(&block_file_list, (EDListNode *)p);
-
-#if 0
- {
- printf("dumping block list\n");
- printf(" head = %p p = %p\n", block_file_list.head, p);
- p = block_file_list.head;
- while (p->next) {
- printf(" '%s'\n", p->base->path);
- p = p->next;
- }
- }
-#endif
-
- UNLOCK(block_file_lock);
-}
-
-static void
-camel_block_file_finalise(CamelBlockFile *bs)
-{
- CamelBlock *bl, *bn;
- struct _CamelBlockFilePrivate *p;
-
- p = bs->priv;
-
- if (bs->root_block)
- camel_block_file_sync(bs);
-
- /* remove from lru list */
- LOCK(block_file_lock);
- if (bs->fd != -1)
- block_file_count--;
- e_dlist_remove((EDListNode *)p);
- UNLOCK(block_file_lock);
-
- bl = (CamelBlock *)bs->block_cache.head;
- bn = bl->next;
- while (bn) {
- if (bl->refcount != 0)
- g_warning("Block '%d' still referenced", bl->id);
- g_free(bl);
- bl = bn;
- bn = bn->next;
- }
-
- g_hash_table_destroy (bs->blocks);
-
- if (bs->root_block)
- camel_block_file_unref_block(bs, bs->root_block);
- g_free(bs->path);
- if (bs->fd != -1)
- close(bs->fd);
-
- pthread_mutex_destroy(&p->io_lock);
- pthread_mutex_destroy(&p->cache_lock);
- pthread_mutex_destroy(&p->root_lock);
-
- g_free(p);
-}
-
-CamelType
-camel_block_file_get_type(void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register(camel_object_get_type(), "CamelBlockFile",
- sizeof (CamelBlockFile),
- sizeof (CamelBlockFileClass),
- (CamelObjectClassInitFunc) camel_block_file_class_init,
- NULL,
- (CamelObjectInitFunc) camel_block_file_init,
- (CamelObjectFinalizeFunc) camel_block_file_finalise);
- }
-
- return type;
-}
-
-/* 'use' a block file for io */
-static int
-block_file_use(CamelBlockFile *bs)
-{
- struct _CamelBlockFilePrivate *nw, *nn, *p = bs->priv;
- CamelBlockFile *bf;
- int err;
-
- /* We want to:
- remove file from active list
- lock it
-
- Then when done:
- unlock it
- add it back to end of active list
- */
-
- CAMEL_BLOCK_FILE_LOCK(bs, io_lock);
-
- if (bs->fd != -1)
- return 0;
- else if (p->deleted) {
- CAMEL_BLOCK_FILE_UNLOCK(bs, io_lock);
- errno = ENOENT;
- return -1;
- } else
- d(printf("Turning block file online: %s\n", bs->path));
-
- if ((bs->fd = open(bs->path, bs->flags, 0600)) == -1) {
- err = errno;
- CAMEL_BLOCK_FILE_UNLOCK(bs, io_lock);
- errno = err;
- return -1;
- }
-
- LOCK(block_file_lock);
- e_dlist_remove((EDListNode *)p);
- e_dlist_addtail(&block_file_active_list, (EDListNode *)p);
-
- block_file_count++;
-
- nw = (struct _CamelBlockFilePrivate *)block_file_list.head;
- nn = nw->next;
- while (block_file_count > block_file_threshhold && nn) {
- /* We never hit the current blockfile here, as its removed from the list first */
- bf = nw->base;
- if (bf->fd != -1) {
- /* Need to trylock, as any of these lock levels might be trying
- to lock the block_file_lock, so we need to check and abort if so */
- if (CAMEL_BLOCK_FILE_TRYLOCK(bf, root_lock) == 0) {
- if (CAMEL_BLOCK_FILE_TRYLOCK(bf, cache_lock) == 0) {
- if (CAMEL_BLOCK_FILE_TRYLOCK(bf, io_lock) == 0) {
- d(printf("[%d] Turning block file offline: %s\n", block_file_count-1, bf->path));
- sync_nolock(bf);
- close(bf->fd);
- bf->fd = -1;
- block_file_count--;
- CAMEL_BLOCK_FILE_UNLOCK(bf, io_lock);
- }
- CAMEL_BLOCK_FILE_UNLOCK(bf, cache_lock);
- }
- CAMEL_BLOCK_FILE_UNLOCK(bf, root_lock);
- }
- }
- nw = nn;
- nn = nw->next;
- }
-
- UNLOCK(block_file_lock);
-
- return 0;
-}
-
-static void
-block_file_unuse(CamelBlockFile *bs)
-{
- LOCK(block_file_lock);
- e_dlist_remove((EDListNode *)bs->priv);
- e_dlist_addtail(&block_file_list, (EDListNode *)bs->priv);
- UNLOCK(block_file_lock);
-
- CAMEL_BLOCK_FILE_UNLOCK(bs, io_lock);
-}
-
-/*
-o = camel_cache_get(c, key);
-camel_cache_unref(c, key);
-camel_cache_add(c, key, o);
-camel_cache_remove(c, key);
-*/
-
-/**
- * camel_block_file_new:
- * @path:
- * @:
- * @block_size:
- *
- * Allocate a new block file, stored at @path. @version contains an 8 character
- * version string which must match the head of the file, or the file will be
- * intitialised.
- *
- * @block_size is currently ignored and is set to CAMEL_BLOCK_SIZE.
- *
- * Return value: The new block file, or NULL if it could not be created.
- **/
-CamelBlockFile *camel_block_file_new(const char *path, int flags, const char version[8], size_t block_size)
-{
- CamelBlockFile *bs;
-
- bs = (CamelBlockFile *)camel_object_new(camel_block_file_get_type());
- memcpy(bs->version, version, 8);
- bs->path = g_strdup(path);
- bs->flags = flags;
-
- bs->root_block = camel_block_file_get_block(bs, 0);
- if (bs->root_block == NULL) {
- camel_object_unref((CamelObject *)bs);
- return NULL;
- }
- camel_block_file_detach_block(bs, bs->root_block);
- bs->root = (CamelBlockRoot *)&bs->root_block->data;
-
- /* we only need these flags on first open */
- bs->flags &= ~(O_CREAT|O_EXCL|O_TRUNC);
-
- /* Do we need to init the root block? */
- if (CBF_CLASS(bs)->validate_root(bs) == -1) {
- d(printf("Initialise root block: %.8s\n", version));
-
- CBF_CLASS(bs)->init_root(bs);
- camel_block_file_touch_block(bs, bs->root_block);
- if (block_file_use(bs) == -1) {
- camel_object_unref((CamelObject *)bs);
- return NULL;
- }
- if (sync_block_nolock(bs, bs->root_block) == -1
- || ftruncate(bs->fd, bs->root->last) == -1) {
- block_file_unuse(bs);
- camel_object_unref((CamelObject *)bs);
- return NULL;
- }
- block_file_unuse(bs);
- }
-
- return bs;
-}
-
-int
-camel_block_file_rename(CamelBlockFile *bs, const char *path)
-{
- int ret;
- struct stat st;
- int err;
-
- CAMEL_BLOCK_FILE_LOCK(bs, io_lock);
-
- ret = rename(bs->path, path);
- if (ret == -1) {
- /* Maybe the rename actually worked */
- err = errno;
- if (stat(path, &st) == 0
- && stat(bs->path, &st) == -1
- && errno == ENOENT)
- ret = 0;
- errno = err;
- }
-
- if (ret != -1) {
- g_free(bs->path);
- bs->path = g_strdup(path);
- }
-
- CAMEL_BLOCK_FILE_UNLOCK(bs, io_lock);
-
- return ret;
-}
-
-int
-camel_block_file_delete(CamelBlockFile *bs)
-{
- int ret;
- struct _CamelBlockFilePrivate *p = bs->priv;
-
- CAMEL_BLOCK_FILE_LOCK(bs, io_lock);
-
- if (bs->fd != -1) {
- LOCK(block_file_lock);
- block_file_count--;
- UNLOCK(block_file_lock);
- close(bs->fd);
- bs->fd = -1;
- }
-
- p->deleted = TRUE;
- ret = unlink(bs->path);
-
- CAMEL_BLOCK_FILE_UNLOCK(bs, io_lock);
-
- return ret;
-
-}
-
-/**
- * camel_block_file_new_block:
- * @bs:
- *
- * Allocate a new block, return a pointer to it. Old blocks
- * may be flushed to disk during this call.
- *
- * Return value: The block, or NULL if an error occured.
- **/
-CamelBlock *camel_block_file_new_block(CamelBlockFile *bs)
-{
- CamelBlock *bl;
-
- CAMEL_BLOCK_FILE_LOCK(bs, root_lock);
-
- if (bs->root->free) {
- bl = camel_block_file_get_block(bs, bs->root->free);
- if (bl == NULL)
- goto fail;
- bs->root->free = ((camel_block_t *)bl->data)[0];
- } else {
- bl = camel_block_file_get_block(bs, bs->root->last);
- if (bl == NULL)
- goto fail;
- bs->root->last += CAMEL_BLOCK_SIZE;
- }
-
- bs->root_block->flags |= CAMEL_BLOCK_DIRTY;
-
- bl->flags |= CAMEL_BLOCK_DIRTY;
- memset(bl->data, 0, CAMEL_BLOCK_SIZE);
-fail:
- CAMEL_BLOCK_FILE_UNLOCK(bs, root_lock);
-
- return bl;
-}
-
-/**
- * camel_block_file_free_block:
- * @bs:
- * @id:
- *
- *
- **/
-int camel_block_file_free_block(CamelBlockFile *bs, camel_block_t id)
-{
- CamelBlock *bl;
-
- bl = camel_block_file_get_block(bs, id);
- if (bl == NULL)
- return -1;
-
- CAMEL_BLOCK_FILE_LOCK(bs, root_lock);
-
- ((camel_block_t *)bl->data)[0] = bs->root->free;
- bs->root->free = bl->id;
- bs->root_block->flags |= CAMEL_BLOCK_DIRTY;
- bl->flags |= CAMEL_BLOCK_DIRTY;
- camel_block_file_unref_block(bs, bl);
-
- CAMEL_BLOCK_FILE_UNLOCK(bs, root_lock);
-
- return 0;
-}
-
-/**
- * camel_block_file_get_block:
- * @bs:
- * @id:
- *
- * Retreive a block @id.
- *
- * Return value: The block, or NULL if blockid is invalid or a file error
- * occured.
- **/
-CamelBlock *camel_block_file_get_block(CamelBlockFile *bs, camel_block_t id)
-{
- CamelBlock *bl, *flush, *prev;
-
- /* Sanity check: Dont allow reading of root block (except before its been read)
- or blocks with invalid block id's */
- if ((bs->root == NULL && id != 0)
- || (bs->root != NULL && (id > bs->root->last || id == 0))
- || (id % bs->block_size) != 0) {
- errno = EINVAL;
- return NULL;
- }
-
- CAMEL_BLOCK_FILE_LOCK(bs, cache_lock);
-
- bl = g_hash_table_lookup(bs->blocks, GUINT_TO_POINTER(id));
-
- d(printf("Get block %08x: %s\n", id, bl?"cached":"must read"));
-
- if (bl == NULL) {
- /* LOCK io_lock */
- if (block_file_use(bs) == -1) {
- CAMEL_BLOCK_FILE_UNLOCK(bs, cache_lock);
- return NULL;
- }
-
- bl = g_malloc0(sizeof(*bl));
- bl->id = id;
- if (lseek(bs->fd, id, SEEK_SET) == -1 ||
- camel_read (bs->fd, bl->data, CAMEL_BLOCK_SIZE) == -1) {
- block_file_unuse(bs);
- CAMEL_BLOCK_FILE_UNLOCK(bs, cache_lock);
- g_free(bl);
- return NULL;
- }
-
- bs->block_cache_count++;
- g_hash_table_insert(bs->blocks, GUINT_TO_POINTER(bl->id), bl);
-
- /* flush old blocks */
- flush = (CamelBlock *)bs->block_cache.tailpred;
- prev = flush->prev;
- while (bs->block_cache_count > bs->block_cache_limit && prev) {
- if (flush->refcount == 0) {
- if (sync_block_nolock(bs, flush) != -1) {
- g_hash_table_remove(bs->blocks, GUINT_TO_POINTER(flush->id));
- e_dlist_remove((EDListNode *)flush);
- g_free(flush);
- bs->block_cache_count--;
- }
- }
- flush = prev;
- prev = prev->prev;
- }
- /* UNLOCK io_lock */
- block_file_unuse(bs);
- } else {
- e_dlist_remove((EDListNode *)bl);
- }
-
- e_dlist_addhead(&bs->block_cache, (EDListNode *)bl);
- bl->refcount++;
-
- CAMEL_BLOCK_FILE_UNLOCK(bs, cache_lock);
-
- d(printf("Got block %08x\n", id));
-
- return bl;
-}
-
-/**
- * camel_block_file_detach_block:
- * @bs:
- * @bl:
- *
- * Detatch a block from the block file's cache. The block should
- * be unref'd or attached when finished with. The block file will
- * perform no writes of this block or flushing of it if the cache
- * fills.
- **/
-void camel_block_file_detach_block(CamelBlockFile *bs, CamelBlock *bl)
-{
- CAMEL_BLOCK_FILE_LOCK(bs, cache_lock);
-
- g_hash_table_remove(bs->blocks, GUINT_TO_POINTER(bl->id));
- e_dlist_remove((EDListNode *)bl);
- bl->flags |= CAMEL_BLOCK_DETACHED;
-
- CAMEL_BLOCK_FILE_UNLOCK(bs, cache_lock);
-}
-
-/**
- * camel_block_file_attach_block:
- * @bs:
- * @bl:
- *
- * Reattach a block that has been detached.
- **/
-void camel_block_file_attach_block(CamelBlockFile *bs, CamelBlock *bl)
-{
- CAMEL_BLOCK_FILE_LOCK(bs, cache_lock);
-
- g_hash_table_insert(bs->blocks, GUINT_TO_POINTER(bl->id), bl);
- e_dlist_addtail(&bs->block_cache, (EDListNode *)bl);
- bl->flags &= ~CAMEL_BLOCK_DETACHED;
-
- CAMEL_BLOCK_FILE_UNLOCK(bs, cache_lock);
-}
-
-/**
- * camel_block_file_touch_block:
- * @bs:
- * @bl:
- *
- * Mark a block as dirty. The block will be written to disk if
- * it ever expires from the cache.
- **/
-void camel_block_file_touch_block(CamelBlockFile *bs, CamelBlock *bl)
-{
- CAMEL_BLOCK_FILE_LOCK(bs, root_lock);
- CAMEL_BLOCK_FILE_LOCK(bs, cache_lock);
-
- bl->flags |= CAMEL_BLOCK_DIRTY;
-
- if ((bs->root->flags & CAMEL_BLOCK_FILE_SYNC) && bl != bs->root_block) {
- d(printf("turning off sync flag\n"));
- bs->root->flags &= ~CAMEL_BLOCK_FILE_SYNC;
- bs->root_block->flags |= CAMEL_BLOCK_DIRTY;
- camel_block_file_sync_block(bs, bs->root_block);
- }
-
- CAMEL_BLOCK_FILE_UNLOCK(bs, cache_lock);
- CAMEL_BLOCK_FILE_UNLOCK(bs, root_lock);
-}
-
-/**
- * camel_block_file_unref_block:
- * @bs:
- * @bl:
- *
- * Mark a block as unused. If a block is used it will not be
- * written to disk, or flushed from memory.
- *
- * If a block is detatched and this is the last reference, the
- * block will be freed.
- **/
-void camel_block_file_unref_block(CamelBlockFile *bs, CamelBlock *bl)
-{
- CAMEL_BLOCK_FILE_LOCK(bs, cache_lock);
-
- if (bl->refcount == 1 && (bl->flags & CAMEL_BLOCK_DETACHED))
- g_free(bl);
- else
- bl->refcount--;
-
- CAMEL_BLOCK_FILE_UNLOCK(bs, cache_lock);
-}
-
-static int
-sync_block_nolock(CamelBlockFile *bs, CamelBlock *bl)
-{
- d(printf("Sync block %08x: %s\n", bl->id, (bl->flags & CAMEL_BLOCK_DIRTY)?"dirty":"clean"));
-
- if (bl->flags & CAMEL_BLOCK_DIRTY) {
- if (lseek(bs->fd, bl->id, SEEK_SET) == -1
- || write(bs->fd, bl->data, CAMEL_BLOCK_SIZE) != CAMEL_BLOCK_SIZE) {
- return -1;
- }
- bl->flags &= ~CAMEL_BLOCK_DIRTY;
- }
-
- return 0;
-}
-
-static int
-sync_nolock(CamelBlockFile *bs)
-{
- CamelBlock *bl, *bn;
- int work = FALSE;
-
- bl = (CamelBlock *)bs->block_cache.head;
- bn = bl->next;
- while (bn) {
- if (bl->flags & CAMEL_BLOCK_DIRTY) {
- work = TRUE;
- if (sync_block_nolock(bs, bl) == -1)
- return -1;
- }
- bl = bn;
- bn = bn->next;
- }
-
- if (!work
- && (bs->root_block->flags & CAMEL_BLOCK_DIRTY) == 0
- && (bs->root->flags & CAMEL_BLOCK_FILE_SYNC) != 0)
- return 0;
-
- d(printf("turning on sync flag\n"));
-
- bs->root->flags |= CAMEL_BLOCK_FILE_SYNC;
- bs->root_block->flags |= CAMEL_BLOCK_DIRTY;
-
- return sync_block_nolock(bs, bs->root_block);
-}
-
-/**
- * camel_block_file_sync_block:
- * @bs:
- * @bl:
- *
- * Flush a block to disk immediately. The block will only
- * be flushed to disk if it is marked as dirty (touched).
- *
- * Return value: -1 on io error.
- **/
-int camel_block_file_sync_block(CamelBlockFile *bs, CamelBlock *bl)
-{
- int ret;
-
- /* LOCK io_lock */
- if (block_file_use(bs) == -1)
- return -1;
-
- ret = sync_block_nolock(bs, bl);
-
- block_file_unuse(bs);
-
- return ret;
-}
-
-/**
- * camel_block_file_sync:
- * @bs:
- *
- * Sync all dirty blocks to disk, including the root block.
- *
- * Return value: -1 on io error.
- **/
-int camel_block_file_sync(CamelBlockFile *bs)
-{
- int ret;
-
- CAMEL_BLOCK_FILE_LOCK(bs, root_lock);
- CAMEL_BLOCK_FILE_LOCK(bs, cache_lock);
-
- /* LOCK io_lock */
- if (block_file_use(bs) == -1)
- ret = -1;
- else {
- ret = sync_nolock(bs);
- block_file_unuse(bs);
- }
-
- CAMEL_BLOCK_FILE_UNLOCK(bs, cache_lock);
- CAMEL_BLOCK_FILE_UNLOCK(bs, root_lock);
-
- return ret;
-}
-
-/* ********************************************************************** */
-
-struct _CamelKeyFilePrivate {
- struct _CamelKeyFilePrivate *next;
- struct _CamelKeyFilePrivate *prev;
-
- struct _CamelKeyFile *base;
- pthread_mutex_t lock;
- unsigned int deleted:1;
-};
-
-#define CAMEL_KEY_FILE_LOCK(kf, lock) (pthread_mutex_lock(&(kf)->priv->lock))
-#define CAMEL_KEY_FILE_TRYLOCK(kf, lock) (pthread_mutex_trylock(&(kf)->priv->lock))
-#define CAMEL_KEY_FILE_UNLOCK(kf, lock) (pthread_mutex_unlock(&(kf)->priv->lock))
-
-static pthread_mutex_t key_file_lock = PTHREAD_MUTEX_INITIALIZER;
-
-/* lru cache of block files */
-static EDList key_file_list = E_DLIST_INITIALISER(key_file_list);
-static EDList key_file_active_list = E_DLIST_INITIALISER(key_file_active_list);
-static int key_file_count = 0;
-static int key_file_threshhold = 10;
-
-static void
-camel_key_file_class_init(CamelKeyFileClass *klass)
-{
-}
-
-static void
-camel_key_file_init(CamelKeyFile *bs)
-{
- struct _CamelKeyFilePrivate *p;
-
- p = bs->priv = g_malloc0(sizeof(*bs->priv));
- p->base = bs;
-
- pthread_mutex_init(&p->lock, NULL);
-
- LOCK(key_file_lock);
- e_dlist_addhead(&key_file_list, (EDListNode *)p);
- UNLOCK(key_file_lock);
-}
-
-static void
-camel_key_file_finalise(CamelKeyFile *bs)
-{
- struct _CamelKeyFilePrivate *p = bs->priv;
-
- LOCK(key_file_lock);
- e_dlist_remove((EDListNode *)p);
-
- if (bs-> fp) {
- key_file_count--;
- fclose(bs->fp);
- }
-
- UNLOCK(key_file_lock);
-
- g_free(bs->path);
-
- pthread_mutex_destroy(&p->lock);
-
- g_free(p);
-}
-
-CamelType
-camel_key_file_get_type(void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register(camel_object_get_type(), "CamelKeyFile",
- sizeof (CamelKeyFile),
- sizeof (CamelKeyFileClass),
- (CamelObjectClassInitFunc) camel_key_file_class_init,
- NULL,
- (CamelObjectInitFunc) camel_key_file_init,
- (CamelObjectFinalizeFunc) camel_key_file_finalise);
- }
-
- return type;
-}
-
-/* 'use' a key file for io */
-static int
-key_file_use(CamelKeyFile *bs)
-{
- struct _CamelKeyFilePrivate *nw, *nn, *p = bs->priv;
- CamelKeyFile *bf;
- int err, fd;
- char *flag;
-
- /* We want to:
- remove file from active list
- lock it
-
- Then when done:
- unlock it
- add it back to end of active list
- */
-
- /* TODO: Check header on reset? */
-
- CAMEL_KEY_FILE_LOCK(bs, lock);
-
- if (bs->fp != NULL)
- return 0;
- else if (p->deleted) {
- CAMEL_KEY_FILE_UNLOCK(bs, lock);
- errno = ENOENT;
- return -1;
- } else
- d(printf("Turning key file online: '%s'\n", bs->path));
-
- if ((bs->flags & O_ACCMODE) == O_RDONLY)
- flag = "r";
- else
- flag = "a+";
-
- if ((fd = open(bs->path, bs->flags, 0600)) == -1
- || (bs->fp = fdopen(fd, flag)) == NULL) {
- err = errno;
- close(fd);
- CAMEL_KEY_FILE_UNLOCK(bs, lock);
- errno = err;
- return -1;
- }
-
- LOCK(key_file_lock);
- e_dlist_remove((EDListNode *)p);
- e_dlist_addtail(&key_file_active_list, (EDListNode *)p);
-
- key_file_count++;
-
- nw = (struct _CamelKeyFilePrivate *)key_file_list.head;
- nn = nw->next;
- while (key_file_count > key_file_threshhold && nn) {
- /* We never hit the current keyfile here, as its removed from the list first */
- bf = nw->base;
- if (bf->fp != NULL) {
- /* Need to trylock, as any of these lock levels might be trying
- to lock the key_file_lock, so we need to check and abort if so */
- if (CAMEL_BLOCK_FILE_TRYLOCK(bf, lock) == 0) {
- d(printf("Turning key file offline: %s\n", bf->path));
- fclose(bf->fp);
- bf->fp = NULL;
- key_file_count--;
- CAMEL_BLOCK_FILE_UNLOCK(bf, lock);
- }
- }
- nw = nn;
- nn = nw->next;
- }
-
- UNLOCK(key_file_lock);
-
- return 0;
-}
-
-static void
-key_file_unuse(CamelKeyFile *bs)
-{
- LOCK(key_file_lock);
- e_dlist_remove((EDListNode *)bs->priv);
- e_dlist_addtail(&key_file_list, (EDListNode *)bs->priv);
- UNLOCK(key_file_lock);
-
- CAMEL_KEY_FILE_UNLOCK(bs, lock);
-}
-
-/**
- * camel_key_file_new:
- * @path:
- * @flags: open flags
- * @version[]: Version string (header) of file. Currently
- * written but not checked.
- *
- * Create a new key file. A linked list of record blocks.
- *
- * Return value: A new key file, or NULL if the file could not
- * be opened/created/initialised.
- **/
-CamelKeyFile *
-camel_key_file_new(const char *path, int flags, const char version[8])
-{
- CamelKeyFile *kf;
- off_t last;
- int err;
-
- d(printf("New key file '%s'\n", path));
-
- kf = (CamelKeyFile *)camel_object_new(camel_key_file_get_type());
- kf->path = g_strdup(path);
- kf->fp = NULL;
- kf->flags = flags;
- kf->last = 8;
-
- if (key_file_use(kf) == -1) {
- camel_object_unref((CamelObject *)kf);
- kf = NULL;
- } else {
- fseek(kf->fp, 0, SEEK_END);
- last = ftell(kf->fp);
- if (last == 0) {
- fwrite(version, 8, 1, kf->fp);
- last += 8;
- }
- kf->last = last;
-
- err = ferror(kf->fp);
- key_file_unuse(kf);
-
- /* we only need these flags on first open */
- kf->flags &= ~(O_CREAT|O_EXCL|O_TRUNC);
-
- if (err) {
- camel_object_unref((CamelObject *)kf);
- kf = NULL;
- }
- }
-
- return kf;
-}
-
-int
-camel_key_file_rename(CamelKeyFile *kf, const char *path)
-{
- int ret;
- struct stat st;
- int err;
-
- CAMEL_KEY_FILE_LOCK(kf, lock);
-
- ret = rename(kf->path, path);
- if (ret == -1) {
- /* Maybe the rename actually worked */
- err = errno;
- if (stat(path, &st) == 0
- && stat(kf->path, &st) == -1
- && errno == ENOENT)
- ret = 0;
- errno = err;
- }
-
- if (ret != -1) {
- g_free(kf->path);
- kf->path = g_strdup(path);
- }
-
- CAMEL_KEY_FILE_UNLOCK(kf, lock);
-
- return ret;
-}
-
-int
-camel_key_file_delete(CamelKeyFile *kf)
-{
- int ret;
- struct _CamelKeyFilePrivate *p = kf->priv;
-
- CAMEL_KEY_FILE_LOCK(kf, lock);
-
- if (kf->fp) {
- LOCK(key_file_lock);
- key_file_count--;
- UNLOCK(key_file_lock);
- fclose(kf->fp);
- kf->fp = NULL;
- }
-
- p->deleted = TRUE;
- ret = unlink(kf->path);
-
- CAMEL_KEY_FILE_UNLOCK(kf, lock);
-
- return ret;
-
-}
-
-/**
- * camel_key_file_write:
- * @kf:
- * @parent:
- * @len:
- * @records:
- *
- * Write a new list of records to the key file.
- *
- * Return value: -1 on io error. The key file will remain unchanged.
- **/
-int
-camel_key_file_write(CamelKeyFile *kf, camel_block_t *parent, size_t len, camel_key_t *records)
-{
- camel_block_t next;
- guint32 size;
- int ret = -1;
-
- d(printf("write key %08x len = %d\n", *parent, len));
-
- if (len == 0) {
- d(printf(" new parent = %08x\n", *parent));
- return 0;
- }
-
- /* LOCK */
- if (key_file_use(kf) == -1)
- return -1;
-
- size = len;
-
- /* FIXME: Use io util functions? */
- next = kf->last;
- fseek(kf->fp, kf->last, SEEK_SET);
- fwrite(parent, sizeof(*parent), 1, kf->fp);
- fwrite(&size, sizeof(size), 1, kf->fp);
- fwrite(records, sizeof(records[0]), len, kf->fp);
-
- if (ferror(kf->fp)) {
- clearerr(kf->fp);
- } else {
- kf->last = ftell(kf->fp);
- *parent = next;
- ret = len;
- }
-
- /* UNLOCK */
- key_file_unuse(kf);
-
- d(printf(" new parent = %08x\n", *parent));
-
- return ret;
-}
-
-/**
- * camel_key_file_read:
- * @kf:
- * @start: The record pointer. This will be set to the next record pointer on success.
- * @len: Number of records read, if != NULL.
- * @records: Records, allocated, must be freed with g_free, if != NULL.
- *
- * Read the next block of data from the key file. Returns the number of
- * records.
- *
- * Return value: -1 on io error.
- **/
-int
-camel_key_file_read(CamelKeyFile *kf, camel_block_t *start, size_t *len, camel_key_t **records)
-{
- guint32 size;
- long pos = *start;
- camel_block_t next;
- int ret = -1;
-
- if (pos == 0)
- return 0;
-
- /* LOCK */
- if (key_file_use(kf) == -1)
- return -1;
-
- if (fseek(kf->fp, pos, SEEK_SET) == -1
- || fread(&next, sizeof(next), 1, kf->fp) != 1
- || fread(&size, sizeof(size), 1, kf->fp) != 1
- || size > 1024) {
- clearerr(kf->fp);
- goto fail;
- }
-
- if (len)
- *len = size;
-
- if (records) {
- camel_key_t *keys = g_malloc(size * sizeof(camel_key_t));
-
- if (fread(keys, sizeof(camel_key_t), size, kf->fp) != size) {
- g_free(keys);
- goto fail;
- }
- *records = keys;
- }
-
- *start = next;
-
- ret = 0;
-fail:
- /* UNLOCK */
- key_file_unuse(kf);
-
- return ret;
-}
diff --git a/camel/camel-block-file.h b/camel/camel-block-file.h
deleted file mode 100644
index eec0ee26f9..0000000000
--- a/camel/camel-block-file.h
+++ /dev/null
@@ -1,144 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_BLOCK_FILE_H
-#define _CAMEL_BLOCK_FILE_H
-
-#include <camel/camel-object.h>
-#include <glib.h>
-#include <e-util/e-msgport.h>
-#include <stdio.h>
-
-typedef guint32 camel_block_t; /* block offset, absolute, bottom BLOCK_SIZE_BITS always 0 */
-typedef guint32 camel_key_t; /* this is a bitfield of (block offset:BLOCK_SIZE_BITS) */
-
-typedef struct _CamelBlockRoot CamelBlockRoot;
-typedef struct _CamelBlock CamelBlock;
-typedef struct _CamelBlockFile CamelBlockFile;
-typedef struct _CamelBlockFileClass CamelBlockFileClass;
-
-#define CAMEL_BLOCK_FILE_SYNC (1<<0)
-
-#define CAMEL_BLOCK_SIZE (1024)
-#define CAMEL_BLOCK_SIZE_BITS (10) /* # bits to contain block_size bytes */
-
-#define CAMEL_BLOCK_DIRTY (1<<0)
-#define CAMEL_BLOCK_DETACHED (1<<1)
-
-struct _CamelBlockRoot {
- char version[8]; /* version number */
-
- guint32 flags; /* flags for file */
- guint32 block_size; /* block size of this file */
- camel_block_t free; /* free block list */
- camel_block_t last; /* pointer to end of blocks */
-
- /* subclasses tack on, but no more than CAMEL_BLOCK_SIZE! */
-};
-
-/* LRU cache of blocks */
-struct _CamelBlock {
- struct _CamelBlock *next;
- struct _CamelBlock *prev;
-
- camel_block_t id;
- guint32 flags;
- guint32 refcount;
- guint32 align00;
-
- unsigned char data[CAMEL_BLOCK_SIZE];
-};
-
-struct _CamelBlockFile {
- CamelObject parent;
-
- struct _CamelBlockFilePrivate *priv;
-
- char version[8];
- char *path;
- int flags;
-
- int fd;
- size_t block_size;
-
- CamelBlockRoot *root;
- CamelBlock *root_block;
-
- /* make private? */
- int block_cache_limit;
- int block_cache_count;
- EDList block_cache;
- GHashTable *blocks;
-};
-
-struct _CamelBlockFileClass {
- CamelObjectClass parent;
-
- int (*validate_root)(CamelBlockFile *);
- int (*init_root)(CamelBlockFile *);
-};
-
-CamelType camel_block_file_get_type(void);
-
-CamelBlockFile *camel_block_file_new(const char *path, int flags, const char version[8], size_t block_size);
-int camel_block_file_rename(CamelBlockFile *bs, const char *path);
-int camel_block_file_delete(CamelBlockFile *kf);
-
-CamelBlock *camel_block_file_new_block(CamelBlockFile *bs);
-int camel_block_file_free_block(CamelBlockFile *bs, camel_block_t id);
-CamelBlock *camel_block_file_get_block(CamelBlockFile *bs, camel_block_t id);
-void camel_block_file_detach_block(CamelBlockFile *bs, CamelBlock *bl);
-void camel_block_file_attach_block(CamelBlockFile *bs, CamelBlock *bl);
-void camel_block_file_touch_block(CamelBlockFile *bs, CamelBlock *bl);
-void camel_block_file_unref_block(CamelBlockFile *bs, CamelBlock *bl);
-int camel_block_file_sync_block(CamelBlockFile *bs, CamelBlock *bl);
-int camel_block_file_sync(CamelBlockFile *bs);
-
-/* ********************************************************************** */
-
-typedef struct _CamelKeyFile CamelKeyFile;
-typedef struct _CamelKeyFileClass CamelKeyFileClass;
-
-struct _CamelKeyFile {
- CamelObject parent;
-
- struct _CamelKeyFilePrivate *priv;
-
- FILE *fp;
- char *path;
- int flags;
- off_t last;
-};
-
-struct _CamelKeyFileClass {
- CamelObjectClass parent;
-};
-
-CamelType camel_key_file_get_type(void);
-
-CamelKeyFile * camel_key_file_new(const char *path, int flags, const char version[8]);
-int camel_key_file_rename(CamelKeyFile *kf, const char *path);
-int camel_key_file_delete(CamelKeyFile *kf);
-
-int camel_key_file_write(CamelKeyFile *kf, camel_block_t *parent, size_t len, camel_key_t *records);
-int camel_key_file_read(CamelKeyFile *kf, camel_block_t *start, size_t *len, camel_key_t **records);
-
-
-#endif /* ! _CAMEL_BLOCK_FILE_H */
diff --git a/camel/camel-certdb.c b/camel/camel-certdb.c
deleted file mode 100644
index 8df6f2e578..0000000000
--- a/camel/camel-certdb.c
+++ /dev/null
@@ -1,665 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2002-2003 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 <glib.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <pthread.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-
-#include "camel-certdb.h"
-#include "camel-private.h"
-
-#include <camel/camel-file-utils.h>
-
-#include <e-util/e-memory.h>
-
-
-#define CAMEL_CERTDB_GET_CLASS(db) ((CamelCertDBClass *) CAMEL_OBJECT_GET_CLASS (db))
-
-#define CAMEL_CERTDB_VERSION 0x100
-
-static void camel_certdb_class_init (CamelCertDBClass *klass);
-static void camel_certdb_init (CamelCertDB *certdb);
-static void camel_certdb_finalize (CamelObject *obj);
-
-static int certdb_header_load (CamelCertDB *certdb, FILE *istream);
-static int certdb_header_save (CamelCertDB *certdb, FILE *ostream);
-static CamelCert *certdb_cert_load (CamelCertDB *certdb, FILE *istream);
-static int certdb_cert_save (CamelCertDB *certdb, CamelCert *cert, FILE *ostream);
-static CamelCert *certdb_cert_new (CamelCertDB *certdb);
-static void certdb_cert_free (CamelCertDB *certdb, CamelCert *cert);
-
-static const char *cert_get_string (CamelCertDB *certdb, CamelCert *cert, int string);
-static void cert_set_string (CamelCertDB *certdb, CamelCert *cert, int string, const char *value);
-
-
-static CamelObjectClass *parent_class = NULL;
-
-
-CamelType
-camel_certdb_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_object_get_type (),
- "CamelCertDB",
- sizeof (CamelCertDB),
- sizeof (CamelCertDBClass),
- (CamelObjectClassInitFunc) camel_certdb_class_init,
- NULL,
- (CamelObjectInitFunc) camel_certdb_init,
- (CamelObjectFinalizeFunc) camel_certdb_finalize);
- }
-
- return type;
-}
-
-
-static void
-camel_certdb_class_init (CamelCertDBClass *klass)
-{
- parent_class = camel_type_get_global_classfuncs (camel_object_get_type ());
-
- klass->header_load = certdb_header_load;
- klass->header_save = certdb_header_save;
-
- klass->cert_new = certdb_cert_new;
- klass->cert_load = certdb_cert_load;
- klass->cert_save = certdb_cert_save;
- klass->cert_free = certdb_cert_free;
- klass->cert_get_string = cert_get_string;
- klass->cert_set_string = cert_set_string;
-}
-
-static void
-camel_certdb_init (CamelCertDB *certdb)
-{
- certdb->priv = g_malloc (sizeof (struct _CamelCertDBPrivate));
-
- certdb->filename = NULL;
- certdb->version = CAMEL_CERTDB_VERSION;
- certdb->saved_certs = 0;
-
- certdb->cert_size = sizeof (CamelCert);
-
- certdb->cert_chunks = NULL;
-
- certdb->certs = g_ptr_array_new ();
- certdb->cert_hash = g_hash_table_new (g_str_hash, g_str_equal);
-
- certdb->priv->db_lock = g_mutex_new ();
- certdb->priv->io_lock = g_mutex_new ();
- certdb->priv->alloc_lock = g_mutex_new ();
- certdb->priv->ref_lock = g_mutex_new ();
-}
-
-static void
-camel_certdb_finalize (CamelObject *obj)
-{
- CamelCertDB *certdb = (CamelCertDB *) obj;
- struct _CamelCertDBPrivate *p;
-
- p = certdb->priv;
-
- if (certdb->flags & CAMEL_CERTDB_DIRTY)
- camel_certdb_save (certdb);
-
- camel_certdb_clear (certdb);
- g_ptr_array_free (certdb->certs, TRUE);
- g_hash_table_destroy (certdb->cert_hash);
-
- g_free (certdb->filename);
-
- if (certdb->cert_chunks)
- e_memchunk_destroy (certdb->cert_chunks);
-
- g_mutex_free (p->db_lock);
- g_mutex_free (p->io_lock);
- g_mutex_free (p->alloc_lock);
- g_mutex_free (p->ref_lock);
-
- g_free (p);
-}
-
-
-CamelCertDB *
-camel_certdb_new (void)
-{
- return (CamelCertDB *) camel_object_new (camel_certdb_get_type ());
-}
-
-
-static CamelCertDB *default_certdb = NULL;
-static pthread_mutex_t default_certdb_lock = PTHREAD_MUTEX_INITIALIZER;
-
-
-void
-camel_certdb_set_default (CamelCertDB *certdb)
-{
- pthread_mutex_lock (&default_certdb_lock);
-
- if (default_certdb)
- camel_object_unref (default_certdb);
-
- if (certdb)
- camel_object_ref (certdb);
-
- default_certdb = certdb;
-
- pthread_mutex_unlock (&default_certdb_lock);
-}
-
-
-CamelCertDB *
-camel_certdb_get_default (void)
-{
- CamelCertDB *certdb;
-
- pthread_mutex_lock (&default_certdb_lock);
-
- if (default_certdb)
- camel_object_ref (default_certdb);
-
- certdb = default_certdb;
-
- pthread_mutex_unlock (&default_certdb_lock);
-
- return certdb;
-}
-
-
-void
-camel_certdb_set_filename (CamelCertDB *certdb, const char *filename)
-{
- g_return_if_fail (CAMEL_IS_CERTDB (certdb));
- g_return_if_fail (filename != NULL);
-
- CAMEL_CERTDB_LOCK (certdb, db_lock);
-
- g_free (certdb->filename);
- certdb->filename = g_strdup (filename);
-
- CAMEL_CERTDB_UNLOCK (certdb, db_lock);
-}
-
-
-static int
-certdb_header_load (CamelCertDB *certdb, FILE *istream)
-{
- if (camel_file_util_decode_uint32 (istream, &certdb->version) == -1)
- return -1;
- if (camel_file_util_decode_uint32 (istream, &certdb->saved_certs) == -1)
- return -1;
-
- return 0;
-}
-
-static CamelCert *
-certdb_cert_load (CamelCertDB *certdb, FILE *istream)
-{
- CamelCert *cert;
-
- cert = camel_certdb_cert_new (certdb);
-
- if (camel_file_util_decode_string (istream, &cert->issuer) == -1)
- goto error;
- if (camel_file_util_decode_string (istream, &cert->subject) == -1)
- goto error;
- if (camel_file_util_decode_string (istream, &cert->hostname) == -1)
- goto error;
- if (camel_file_util_decode_string (istream, &cert->fingerprint) == -1)
- goto error;
- if (camel_file_util_decode_uint32 (istream, &cert->trust) == -1)
- goto error;
-
- return cert;
-
- error:
-
- camel_certdb_cert_unref (certdb, cert);
-
- return NULL;
-}
-
-int
-camel_certdb_load (CamelCertDB *certdb)
-{
- CamelCert *cert;
- FILE *in;
- int i;
-
- g_return_val_if_fail (CAMEL_IS_CERTDB (certdb), -1);
- g_return_val_if_fail (certdb->filename, -1);
-
- in = fopen (certdb->filename, "r");
- if (in == NULL)
- return -1;
-
- CAMEL_CERTDB_LOCK (certdb, io_lock);
- if (CAMEL_CERTDB_GET_CLASS (certdb)->header_load (certdb, in) == -1)
- goto error;
-
- for (i = 0; i < certdb->saved_certs; i++) {
- cert = CAMEL_CERTDB_GET_CLASS (certdb)->cert_load (certdb, in);
-
- if (cert == NULL)
- goto error;
-
- camel_certdb_add (certdb, cert);
- }
-
- CAMEL_CERTDB_UNLOCK (certdb, io_lock);
-
- if (fclose (in) != 0)
- return -1;
-
- certdb->flags &= ~CAMEL_CERTDB_DIRTY;
-
- return 0;
-
- error:
-
- g_warning ("Cannot load certificate database: %s", strerror (ferror (in)));
-
- CAMEL_CERTDB_UNLOCK (certdb, io_lock);
-
- fclose (in);
-
- return -1;
-}
-
-static int
-certdb_header_save (CamelCertDB *certdb, FILE *ostream)
-{
- if (camel_file_util_encode_uint32 (ostream, certdb->version) == -1)
- return -1;
- if (camel_file_util_encode_uint32 (ostream, certdb->saved_certs) == -1)
- return -1;
-
- return 0;
-}
-
-static int
-certdb_cert_save (CamelCertDB *certdb, CamelCert *cert, FILE *ostream)
-{
- if (camel_file_util_encode_string (ostream, cert->issuer) == -1)
- return -1;
- if (camel_file_util_encode_string (ostream, cert->subject) == -1)
- return -1;
- if (camel_file_util_encode_string (ostream, cert->hostname) == -1)
- return -1;
- if (camel_file_util_encode_string (ostream, cert->fingerprint) == -1)
- return -1;
- if (camel_file_util_encode_uint32 (ostream, cert->trust) == -1)
- return -1;
-
- return 0;
-}
-
-int
-camel_certdb_save (CamelCertDB *certdb)
-{
- CamelCert *cert;
- char *filename;
- int fd, i;
- FILE *out;
-
- g_return_val_if_fail (CAMEL_IS_CERTDB (certdb), -1);
- g_return_val_if_fail (certdb->filename, -1);
-
- filename = alloca (strlen (certdb->filename) + 4);
- sprintf (filename, "%s~", certdb->filename);
-
- fd = open (filename, O_WRONLY | O_CREAT | O_TRUNC, 0600);
- if (fd == -1)
- return -1;
-
- out = fdopen (fd, "w");
- if (out == NULL) {
- i = errno;
- close (fd);
- unlink (filename);
- errno = i;
- return -1;
- }
-
- CAMEL_CERTDB_LOCK (certdb, io_lock);
-
- certdb->saved_certs = certdb->certs->len;
- if (CAMEL_CERTDB_GET_CLASS (certdb)->header_save (certdb, out) == -1)
- goto error;
-
- for (i = 0; i < certdb->saved_certs; i++) {
- cert = (CamelCert *) certdb->certs->pdata[i];
-
- if (CAMEL_CERTDB_GET_CLASS (certdb)->cert_save (certdb, cert, out) == -1)
- goto error;
- }
-
- CAMEL_CERTDB_UNLOCK (certdb, io_lock);
-
- if (fflush (out) != 0 || fsync (fileno (out)) == -1) {
- i = errno;
- fclose (out);
- unlink (filename);
- errno = i;
- return -1;
- }
-
- if (fclose (out) != 0) {
- i = errno;
- unlink (filename);
- errno = i;
- return -1;
- }
-
- if (rename (filename, certdb->filename) == -1) {
- i = errno;
- unlink (filename);
- errno = i;
- return -1;
- }
-
- certdb->flags &= ~CAMEL_CERTDB_DIRTY;
-
- return 0;
-
- error:
-
- g_warning ("Cannot save certificate database: %s", strerror (ferror (out)));
-
- CAMEL_CERTDB_UNLOCK (certdb, io_lock);
-
- i = errno;
- fclose (out);
- unlink (filename);
- errno = i;
-
- return -1;
-}
-
-void
-camel_certdb_touch (CamelCertDB *certdb)
-{
- g_return_if_fail (CAMEL_IS_CERTDB (certdb));
-
- certdb->flags |= CAMEL_CERTDB_DIRTY;
-}
-
-CamelCert *
-camel_certdb_get_cert (CamelCertDB *certdb, const char *fingerprint)
-{
- CamelCert *cert;
-
- g_return_val_if_fail (CAMEL_IS_CERTDB (certdb), NULL);
-
- CAMEL_CERTDB_LOCK (certdb, db_lock);
-
- cert = g_hash_table_lookup (certdb->cert_hash, fingerprint);
- if (cert)
- camel_certdb_cert_ref (certdb, cert);
-
- CAMEL_CERTDB_UNLOCK (certdb, db_lock);
-
- return cert;
-}
-
-void
-camel_certdb_add (CamelCertDB *certdb, CamelCert *cert)
-{
- g_return_if_fail (CAMEL_IS_CERTDB (certdb));
-
- CAMEL_CERTDB_LOCK (certdb, db_lock);
-
- if (g_hash_table_lookup (certdb->cert_hash, cert->fingerprint)) {
- CAMEL_CERTDB_UNLOCK (certdb, db_lock);
- return;
- }
-
- camel_certdb_cert_ref (certdb, cert);
- g_ptr_array_add (certdb->certs, cert);
- g_hash_table_insert (certdb->cert_hash, cert->fingerprint, cert);
-
- certdb->flags |= CAMEL_CERTDB_DIRTY;
-
- CAMEL_CERTDB_UNLOCK (certdb, db_lock);
-}
-
-void
-camel_certdb_remove (CamelCertDB *certdb, CamelCert *cert)
-{
- g_return_if_fail (CAMEL_IS_CERTDB (certdb));
-
- CAMEL_CERTDB_LOCK (certdb, db_lock);
-
- if (g_hash_table_lookup (certdb->cert_hash, cert->fingerprint)) {
- g_hash_table_remove (certdb->cert_hash, cert->fingerprint);
- g_ptr_array_remove (certdb->certs, cert);
- camel_certdb_cert_unref (certdb, cert);
-
- certdb->flags |= CAMEL_CERTDB_DIRTY;
- }
-
- CAMEL_CERTDB_UNLOCK (certdb, db_lock);
-}
-
-static CamelCert *
-certdb_cert_new (CamelCertDB *certdb)
-{
- CamelCert *cert;
-
- if (certdb->cert_chunks)
- cert = e_memchunk_alloc0 (certdb->cert_chunks);
- else
- cert = g_malloc0 (certdb->cert_size);
-
- cert->refcount = 1;
-
- return cert;
-}
-
-CamelCert *
-camel_certdb_cert_new (CamelCertDB *certdb)
-{
- CamelCert *cert;
-
- g_return_val_if_fail (CAMEL_IS_CERTDB (certdb), NULL);
-
- CAMEL_CERTDB_LOCK (certdb, alloc_lock);
-
- cert = CAMEL_CERTDB_GET_CLASS (certdb)->cert_new (certdb);
-
- CAMEL_CERTDB_UNLOCK (certdb, alloc_lock);
-
- return cert;
-}
-
-void
-camel_certdb_cert_ref (CamelCertDB *certdb, CamelCert *cert)
-{
- g_return_if_fail (CAMEL_IS_CERTDB (certdb));
- g_return_if_fail (cert != NULL);
-
- CAMEL_CERTDB_LOCK (certdb, ref_lock);
- cert->refcount++;
- CAMEL_CERTDB_UNLOCK (certdb, ref_lock);
-}
-
-static void
-certdb_cert_free (CamelCertDB *certdb, CamelCert *cert)
-{
- g_free (cert->issuer);
- g_free (cert->subject);
- g_free (cert->hostname);
- g_free (cert->fingerprint);
- if (cert->rawcert)
- g_byte_array_free(cert->rawcert, TRUE);
-}
-
-void
-camel_certdb_cert_unref (CamelCertDB *certdb, CamelCert *cert)
-{
- g_return_if_fail (CAMEL_IS_CERTDB (certdb));
- g_return_if_fail (cert != NULL);
-
- CAMEL_CERTDB_LOCK (certdb, ref_lock);
-
- if (cert->refcount <= 1) {
- CAMEL_CERTDB_GET_CLASS (certdb)->cert_free (certdb, cert);
- if (certdb->cert_chunks)
- e_memchunk_free (certdb->cert_chunks, cert);
- else
- g_free (cert);
- } else {
- cert->refcount--;
- }
-
- CAMEL_CERTDB_UNLOCK (certdb, ref_lock);
-}
-
-
-static gboolean
-cert_remove (gpointer key, gpointer value, gpointer user_data)
-{
- return TRUE;
-}
-
-void
-camel_certdb_clear (CamelCertDB *certdb)
-{
- CamelCert *cert;
- int i;
-
- g_return_if_fail (CAMEL_IS_CERTDB (certdb));
-
- CAMEL_CERTDB_LOCK (certdb, db_lock);
-
- g_hash_table_foreach_remove (certdb->cert_hash, cert_remove, NULL);
- for (i = 0; i < certdb->certs->len; i++) {
- cert = (CamelCert *) certdb->certs->pdata[i];
- camel_certdb_cert_unref (certdb, cert);
- }
-
- certdb->saved_certs = 0;
- g_ptr_array_set_size (certdb->certs, 0);
- certdb->flags |= CAMEL_CERTDB_DIRTY;
-
- CAMEL_CERTDB_UNLOCK (certdb, db_lock);
-}
-
-
-static const char *
-cert_get_string (CamelCertDB *certdb, CamelCert *cert, int string)
-{
- switch (string) {
- case CAMEL_CERT_STRING_ISSUER:
- return cert->issuer;
- case CAMEL_CERT_STRING_SUBJECT:
- return cert->subject;
- case CAMEL_CERT_STRING_HOSTNAME:
- return cert->hostname;
- case CAMEL_CERT_STRING_FINGERPRINT:
- return cert->fingerprint;
- default:
- return NULL;
- }
-}
-
-
-const char *
-camel_cert_get_string (CamelCertDB *certdb, CamelCert *cert, int string)
-{
- g_return_val_if_fail (CAMEL_IS_CERTDB (certdb), NULL);
- g_return_val_if_fail (cert != NULL, NULL);
-
- /* FIXME: do locking? */
-
- return CAMEL_CERTDB_GET_CLASS (certdb)->cert_get_string (certdb, cert, string);
-}
-
-static void
-cert_set_string (CamelCertDB *certdb, CamelCert *cert, int string, const char *value)
-{
- switch (string) {
- case CAMEL_CERT_STRING_ISSUER:
- g_free (cert->issuer);
- cert->issuer = g_strdup (value);
- break;
- case CAMEL_CERT_STRING_SUBJECT:
- g_free (cert->subject);
- cert->subject = g_strdup (value);
- break;
- case CAMEL_CERT_STRING_HOSTNAME:
- g_free (cert->hostname);
- cert->hostname = g_strdup (value);
- break;
- case CAMEL_CERT_STRING_FINGERPRINT:
- g_free (cert->fingerprint);
- cert->fingerprint = g_strdup (value);
- break;
- default:
- break;
- }
-}
-
-
-void
-camel_cert_set_string (CamelCertDB *certdb, CamelCert *cert, int string, const char *value)
-{
- g_return_if_fail (CAMEL_IS_CERTDB (certdb));
- g_return_if_fail (cert != NULL);
-
- /* FIXME: do locking? */
-
- CAMEL_CERTDB_GET_CLASS (certdb)->cert_set_string (certdb, cert, string, value);
-}
-
-
-CamelCertTrust
-camel_cert_get_trust (CamelCertDB *certdb, CamelCert *cert)
-{
- g_return_val_if_fail (CAMEL_IS_CERTDB (certdb), CAMEL_CERT_TRUST_UNKNOWN);
- g_return_val_if_fail (cert != NULL, CAMEL_CERT_TRUST_UNKNOWN);
-
- return cert->trust;
-}
-
-
-void
-camel_cert_set_trust (CamelCertDB *certdb, CamelCert *cert, CamelCertTrust trust)
-{
- g_return_if_fail (CAMEL_IS_CERTDB (certdb));
- g_return_if_fail (cert != NULL);
-
- cert->trust = trust;
-}
diff --git a/camel/camel-certdb.h b/camel/camel-certdb.h
deleted file mode 100644
index 60429edcd1..0000000000
--- a/camel/camel-certdb.h
+++ /dev/null
@@ -1,154 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2002 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_CERTDB_H__
-#define __CAMEL_CERTDB_H__
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <stdio.h>
-#include <camel/camel-object.h>
-
-#define CAMEL_CERTDB_TYPE (camel_certdb_get_type ())
-#define CAMEL_CERTDB(obj) (CAMEL_CHECK_CAST (obj, camel_certdb_get_type (), CamelCertDB))
-#define CAMEL_CERTDB_CLASS(klass) (CAMEL_CHECK_CLASS_CAST (klass, camel_certdb_get_type (), CamelCertDBClass))
-#define CAMEL_IS_CERTDB(obj) (CAMEL_CHECK_TYPE (obj, camel_certdb_get_type ()))
-
-typedef struct _CamelCertDB CamelCertDB;
-typedef struct _CamelCertDBClass CamelCertDBClass;
-
-enum {
- CAMEL_CERTDB_DIRTY = (1 << 0),
-};
-
-enum {
- CAMEL_CERT_STRING_ISSUER,
- CAMEL_CERT_STRING_SUBJECT,
- CAMEL_CERT_STRING_HOSTNAME,
- CAMEL_CERT_STRING_FINGERPRINT,
-};
-
-typedef enum {
- CAMEL_CERT_TRUST_UNKNOWN,
- CAMEL_CERT_TRUST_NEVER,
- CAMEL_CERT_TRUST_MARGINAL,
- CAMEL_CERT_TRUST_FULLY,
- CAMEL_CERT_TRUST_ULTIMATE,
-} CamelCertTrust;
-
-typedef struct {
- guint32 refcount;
-
- char *issuer;
- char *subject;
- char *hostname;
- char *fingerprint;
-
- CamelCertTrust trust;
- GByteArray *rawcert;
-} CamelCert;
-
-struct _CamelCertDB {
- CamelObject parent_object;
- struct _CamelCertDBPrivate *priv;
-
- char *filename;
- guint32 version;
- guint32 saved_certs;
- guint32 flags;
-
- guint32 cert_size;
-
- struct _EMemChunk *cert_chunks;
-
- GPtrArray *certs;
- GHashTable *cert_hash;
-};
-
-struct _CamelCertDBClass {
- CamelObjectClass parent_class;
-
- int (*header_load) (CamelCertDB *certdb, FILE *istream);
- int (*header_save) (CamelCertDB *certdb, FILE *ostream);
-
- CamelCert * (*cert_load) (CamelCertDB *certdb, FILE *istream);
- int (*cert_save) (CamelCertDB *certdb, CamelCert *cert, FILE *ostream);
-
- CamelCert * (*cert_new) (CamelCertDB *certdb);
- void (*cert_free) (CamelCertDB *certdb, CamelCert *cert);
-
- const char * (*cert_get_string) (CamelCertDB *certdb, CamelCert *cert, int string);
- void (*cert_set_string) (CamelCertDB *certdb, CamelCert *cert, int string, const char *value);
-};
-
-
-CamelType camel_certdb_get_type (void);
-
-CamelCertDB *camel_certdb_new (void);
-
-void camel_certdb_set_default (CamelCertDB *certdb);
-CamelCertDB *camel_certdb_get_default (void);
-
-void camel_certdb_set_filename (CamelCertDB *certdb, const char *filename);
-
-int camel_certdb_load (CamelCertDB *certdb);
-int camel_certdb_save (CamelCertDB *certdb);
-
-void camel_certdb_touch (CamelCertDB *certdb);
-
-CamelCert *camel_certdb_get_cert (CamelCertDB *certdb, const char *fingerprint);
-
-void camel_certdb_add (CamelCertDB *certdb, CamelCert *cert);
-void camel_certdb_remove (CamelCertDB *certdb, CamelCert *cert);
-
-CamelCert *camel_certdb_cert_new (CamelCertDB *certdb);
-void camel_certdb_cert_ref (CamelCertDB *certdb, CamelCert *cert);
-void camel_certdb_cert_unref (CamelCertDB *certdb, CamelCert *cert);
-
-void camel_certdb_clear (CamelCertDB *certdb);
-
-
-const char *camel_cert_get_string (CamelCertDB *certdb, CamelCert *cert, int string);
-void camel_cert_set_string (CamelCertDB *certdb, CamelCert *cert, int string, const char *value);
-
-#define camel_cert_get_issuer(certdb,cert) camel_cert_get_string (certdb, cert, CAMEL_CERT_STRING_ISSUER)
-#define camel_cert_get_subject(certdb,cert) camel_cert_get_string (certdb, cert, CAMEL_CERT_STRING_SUBJECT)
-#define camel_cert_get_hostname(certdb,cert) camel_cert_get_string (certdb, cert, CAMEL_CERT_STRING_HOSTNAME)
-#define camel_cert_get_fingerprint(certdb,cert) camel_cert_get_string (certdb, cert, CAMEL_CERT_STRING_FINGERPRINT)
-
-#define camel_cert_set_issuer(certdb,cert,issuer) camel_cert_set_string (certdb, cert, CAMEL_CERT_STRING_ISSUER, issuer)
-#define camel_cert_set_subject(certdb,cert,subject) camel_cert_set_string (certdb, cert, CAMEL_CERT_STRING_SUBJECT, subject)
-#define camel_cert_set_hostname(certdb,cert,hostname) camel_cert_set_string (certdb, cert, CAMEL_CERT_STRING_HOSTNAME, hostname)
-#define camel_cert_set_fingerprint(certdb,cert,fingerprint) camel_cert_set_string (certdb, cert, CAMEL_CERT_STRING_FINGERPRINT, fingerprint)
-
-CamelCertTrust camel_cert_get_trust (CamelCertDB *certdb, CamelCert *cert);
-void camel_cert_set_trust (CamelCertDB *certdb, CamelCert *cert, CamelCertTrust trust);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __CAMEL_CERTDB_H__ */
diff --git a/camel/camel-charset-map-private.h b/camel/camel-charset-map-private.h
deleted file mode 100644
index 35556db87e..0000000000
--- a/camel/camel-charset-map-private.h
+++ /dev/null
@@ -1,621 +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, 0xbf, 0xbf, 0xbf, 0xbf,
- 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf,
- 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf,
- 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf,
- 0xbf, 0xbf, 0x9f, 0x9f, 0x9f, 0x9f, 0x9f, 0x9f,
- 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3,
- 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3,
- 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3,
- 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3,
- 0xff, 0x80, 0xc0, 0xe0, 0xc3, 0xc0, 0xe0, 0xf3,
- 0xe3, 0xec, 0x80, 0xe0, 0xe0, 0xf3, 0xc0, 0xc2,
- 0xef, 0xe0, 0xec, 0xe0, 0xc3, 0xc0, 0xc0, 0xec,
- 0xc3, 0xc0, 0x80, 0xe0, 0xc0, 0xe0, 0xc0, 0x80,
- 0x80, 0x83, 0x83, 0x82, 0x83, 0x82, 0x82, 0x81,
- 0x80, 0x83, 0x80, 0x83, 0x80, 0x83, 0x83, 0x80,
- 0x00, 0x80, 0x80, 0x81, 0x83, 0x82, 0x83, 0xc3,
- 0x82, 0x80, 0x83, 0x82, 0x83, 0x01, 0x00, 0x83,
- 0x80, 0x83, 0x83, 0x82, 0x83, 0x82, 0x82, 0x81,
- 0x80, 0x83, 0x80, 0x83, 0x80, 0x83, 0x83, 0x80,
- 0x00, 0x80, 0x80, 0x81, 0x83, 0x82, 0x83, 0xcf,
- 0x82, 0x80, 0x83, 0x82, 0x83, 0x01, 0x00, 0x80,
-};
-
-static unsigned char m001[256] = {
- 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
- 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
- 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
- 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
- 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
- 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
- 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
- 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
- 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
- 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
- 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
- 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
- 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
- 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
- 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
- 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 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,
- 0x07, 0x02, 0x03, 0x03, 0x05, 0x02, 0x05, 0x07,
- 0x00, 0x07, 0x02, 0x07, 0x07, 0x07, 0x07, 0x02,
- 0x07, 0x07, 0x03, 0x03, 0x00, 0x07, 0x07, 0x07,
- 0x00, 0x03, 0x02, 0x07, 0x01, 0x01, 0x01, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x02,
- 0x02, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
- 0x02, 0x02, 0x02, 0x03, 0x02, 0x03, 0x03, 0x03,
- 0x03, 0x02, 0x02, 0x02, 0x03, 0x02, 0x02, 0x03,
- 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x02,
- 0x02, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
- 0x02, 0x02, 0x02, 0x03, 0x02, 0x03, 0x03, 0x03,
- 0x03, 0x02, 0x02, 0x02, 0x03, 0x02, 0x02, 0x02,
-};
-
-static unsigned char m010[256] = {
- 0x02, 0x02, 0x01, 0x01, 0x03, 0x03, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x01, 0x01,
- 0x03, 0x03, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02,
- 0x03, 0x03, 0x01, 0x01, 0x00, 0x00, 0x80, 0x80,
- 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00,
- 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x02, 0x02,
- 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02,
- 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x00,
- 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01,
- 0x01, 0x00, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00,
- 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02,
- 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x81, 0x81,
- 0x03, 0x03, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x01, 0x01, 0x01, 0x01, 0x03, 0x03, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 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] = {
- 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00,
- 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00,
- 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00,
- 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
- 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
- 0x02, 0x01, 0x01, 0x01, 0x01, 0x03, 0x03, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 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, 0x03,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x01, 0x03, 0x00, 0x03, 0x00, 0x01, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m030[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x20, 0x00,
- 0x20, 0x20, 0x20, 0x00, 0x20, 0x00, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m040[256] = {
- 0x00, 0x1c, 0x10, 0x10, 0x18, 0x10, 0x18, 0x18,
- 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x10, 0x10,
- 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c,
- 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c,
- 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c,
- 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c,
- 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c,
- 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c,
- 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c,
- 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c,
- 0x00, 0x1c, 0x10, 0x10, 0x18, 0x10, 0x18, 0x18,
- 0x10, 0x10, 0x10, 0x10, 0x10, 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,
- 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m041[256] = {
- 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
- 0x04, 0x04, 0x04, 0x04, 0x04, 0x00, 0x04, 0x04,
- 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
- 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
- 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
- 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
- 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
- 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
- 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
- 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
- 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
- 0x04, 0x04, 0x04, 0x04, 0x04, 0x00, 0x04, 0x04,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m050[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
- 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
- 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
- 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m200[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x40,
- 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 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, 0x04, 0x04, 0x00, 0x00, 0x00,
- 0x04, 0x05, 0x04, 0x00, 0x05, 0x05, 0x05, 0x00,
- 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 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, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 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, 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, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m211[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 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, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 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,
- 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 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] = {
- 0x0c, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
- 0x0c, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
- 0x0c, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x0c, 0x0c, 0x0c, 0x04, 0x0c, 0x04, 0x04, 0x0c,
- 0x0c, 0x0c, 0x0c, 0x0c, 0x04, 0x0c, 0x0c, 0x0c,
- 0x0c, 0x0c, 0x04, 0x0c, 0x04, 0x04, 0x0c, 0x0c,
- 0x0c, 0x0c, 0x0c, 0x04, 0x0c, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x0c, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
- 0x0c, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
- 0x0c, 0x0c, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 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, m041, }, { m050, 0, }, { 0, 0, }, { 0, 0, },
- { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, },
- { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 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, m211, }, { 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-2", 0x0001 },
- { "iso-8859-4", 0x0002 },
- { "koi8-r", 0x0004 },
- { "koi8-u", 0x0008 },
- { "iso-8859-5", 0x0010 },
- { "iso-8859-7", 0x0020 },
- { "iso-8859-8", 0x0040 },
- { "iso-8859-9", 0x0080 },
- { "iso-8859-13", 0x0100 },
- { "iso-8859-15", 0x0200 },
- { "windows-1251", 0x0400 },
-};
-
-#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 9bd4f4e253..0000000000
--- a/camel/camel-charset-map.c
+++ /dev/null
@@ -1,352 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; -*- */
-/*
- * Authors:
- * Michael Zucchi <notzed@ximian.com>
- * Jeffrey Stedfast <fejj@ximian.com>
- * Dan Winship <danw@ximian.com>
- *
- * Copyright 2000-2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <errno.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 */
- { "koi8-u", 0 }, /* Ukranian */
- { "iso-8859-5", 0 }, /* Least-popular Russian encoding */
- { "iso-8859-7", 0 }, /* Greek */
- { "iso-8859-8", 0 }, /* Hebrew; Visual */
- { "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
- */
- { "windows-1251", 0 }, /* Russian */
- { 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
-
-int 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");
-
- return 0;
-}
-
-#else
-
-#include "camel-charset-map.h"
-#include "camel-charset-map-private.h"
-
-#include <glib.h>
-#include <locale.h>
-#include <ctype.h>
-#include <pthread.h>
-#ifdef HAVE_CODESET
-#include <langinfo.h>
-#endif
-
-void
-camel_charset_init (CamelCharset *c)
-{
- c->mask = (unsigned int) ~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);
-}
-
-
-/**
- * camel_charset_iso_to_windows:
- * @isocharset: a canonicalised ISO charset
- *
- * Returns the equivalent Windows charset.
- **/
-const char *
-camel_charset_iso_to_windows (const char *isocharset)
-{
- /* According to http://czyborra.com/charsets/codepages.html,
- * the charset mapping is as follows:
- *
- * us-ascii maps to windows-cp1252
- * iso-8859-1 maps to windows-cp1252
- * iso-8859-2 maps to windows-cp1250
- * iso-8859-3 maps to windows-cp????
- * iso-8859-4 maps to windows-cp????
- * iso-8859-5 maps to windows-cp1251
- * iso-8859-6 maps to windows-cp1256
- * iso-8859-7 maps to windows-cp1253
- * iso-8859-8 maps to windows-cp1255
- * iso-8859-9 maps to windows-cp1254
- * iso-8859-10 maps to windows-cp????
- * iso-8859-11 maps to windows-cp????
- * iso-8859-12 maps to windows-cp????
- * iso-8859-13 maps to windows-cp1257
- *
- * Assumptions:
- * - I'm going to assume that since iso-8859-4 and
- * iso-8859-13 are Baltic that it also maps to
- * windows-cp1257.
- */
-
- if (!strcasecmp (isocharset, "iso-8859-1") || !strcasecmp (isocharset, "us-ascii"))
- return "windows-cp1252";
- else if (!strcasecmp (isocharset, "iso-8859-2"))
- return "windows-cp1250";
- else if (!strcasecmp (isocharset, "iso-8859-4"))
- return "windows-cp1257";
- else if (!strcasecmp (isocharset, "iso-8859-5"))
- return "windows-cp1251";
- else if (!strcasecmp (isocharset, "iso-8859-6"))
- return "windows-cp1256";
- else if (!strcasecmp (isocharset, "iso-8859-7"))
- return "windows-cp1253";
- else if (!strcasecmp (isocharset, "iso-8859-8"))
- return "windows-cp1255";
- else if (!strcasecmp (isocharset, "iso-8859-9"))
- return "windows-cp1254";
- else if (!strcasecmp (isocharset, "iso-8859-13"))
- return "windows-cp1257";
-
- return isocharset;
-}
-
-#endif /* !BUILD_MAP */
diff --git a/camel/camel-charset-map.h b/camel/camel-charset-map.h
deleted file mode 100644
index cd627ee488..0000000000
--- a/camel/camel-charset-map.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2003 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_CHARSET_MAP_H
-#define _CAMEL_CHARSET_MAP_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-typedef struct _CamelCharset CamelCharset;
-
-struct _CamelCharset {
- unsigned int mask;
- int level;
-};
-
-void camel_charset_init(CamelCharset *);
-void camel_charset_step(CamelCharset *, const char *in, int len);
-
-const char *camel_charset_best_name (CamelCharset *);
-
-/* helper function */
-const char *camel_charset_best(const char *in, int len);
-
-const char *camel_charset_iso_to_windows (const char *isocharset);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* ! _CAMEL_CHARSET_MAP_H */
diff --git a/camel/camel-cipher-context.c b/camel/camel-cipher-context.c
deleted file mode 100644
index b730d927c8..0000000000
--- a/camel/camel-cipher-context.c
+++ /dev/null
@@ -1,585 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001-2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <pthread.h>
-#include <string.h>
-
-#include <glib.h>
-
-#include "camel-cipher-context.h"
-#include "camel-stream.h"
-
-#include "camel-mime-utils.h"
-#include "camel-medium.h"
-#include "camel-multipart.h"
-#include "camel-mime-message.h"
-#include "camel-mime-filter-canon.h"
-#include "camel-stream-filter.h"
-
-#define CIPHER_LOCK(ctx) g_mutex_lock (((CamelCipherContext *) ctx)->priv->lock)
-#define CIPHER_UNLOCK(ctx) g_mutex_unlock (((CamelCipherContext *) ctx)->priv->lock);
-
-#define d(x)
-
-#define CCC_CLASS(o) CAMEL_CIPHER_CONTEXT_CLASS(CAMEL_OBJECT_GET_CLASS(o))
-
-struct _CamelCipherContextPrivate {
- GMutex *lock;
-};
-
-static CamelObjectClass *parent_class = NULL;
-
-/**
- * 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 (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 (session);
- context->session = session;
-}
-
-static int
-cipher_sign (CamelCipherContext *ctx, const char *userid, CamelCipherHash hash,
- struct _CamelMimePart *ipart, struct _CamelMimePart *opart, 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
- * @ipart: Input part.
- * @opart: output part.
- * @ex: exception
- *
- * Converts the (unsigned) part @ipart into a new self-contained mime part @opart.
- * This may be a multipart/signed part, or a simple part for enveloped types.
- *
- * Return value: 0 for success or -1 for failure.
- **/
-int
-camel_cipher_sign (CamelCipherContext *context, const char *userid, CamelCipherHash hash,
- struct _CamelMimePart *ipart, struct _CamelMimePart *opart, 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, ipart, opart, ex);
-
- CIPHER_UNLOCK(context);
-
- return retval;
-}
-
-static CamelCipherValidity *
-cipher_verify (CamelCipherContext *context, struct _CamelMimePart *sigpart, CamelException *ex)
-{
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Verifying is not supported by this cipher"));
- return NULL;
-}
-
-/**
- * camel_cipher_verify:
- * @context: Cipher Context
- * @ipart: part to verify
- * @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, struct _CamelMimePart *ipart, CamelException *ex)
-{
- CamelCipherValidity *valid;
-
- g_return_val_if_fail (CAMEL_IS_CIPHER_CONTEXT (context), NULL);
-
- CIPHER_LOCK(context);
-
- valid = CCC_CLASS (context)->verify (context, ipart, ex);
-
- CIPHER_UNLOCK(context);
-
- return valid;
-}
-
-static int
-cipher_encrypt (CamelCipherContext *context, const char *userid, GPtrArray *recipients,
- struct _CamelMimePart *ipart, struct _CamelMimePart *opart, CamelException *ex)
-{
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Encryption is not supported by this cipher"));
- return -1;
-}
-
-/**
- * camel_cipher_encrypt:
- * @context: Cipher Context
- * @userid: key id (or email address) to use when signing, or NULL to not sign.
- * @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, const char *userid, GPtrArray *recipients,
- struct _CamelMimePart *ipart, struct _CamelMimePart *opart, CamelException *ex)
-{
- int retval;
-
- g_return_val_if_fail (CAMEL_IS_CIPHER_CONTEXT (context), -1);
-
- CIPHER_LOCK(context);
-
- retval = CCC_CLASS (context)->encrypt (context, userid, recipients, ipart, opart, ex);
-
- CIPHER_UNLOCK(context);
-
- return retval;
-}
-
-static CamelCipherValidity *
-cipher_decrypt(CamelCipherContext *context, struct _CamelMimePart *ipart, struct _CamelMimePart *opart, CamelException *ex)
-{
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Decryption is not supported by this cipher"));
- return NULL;
-}
-
-/**
- * camel_cipher_decrypt:
- * @context:
- * @ipart:
- * @opart:
- * @ex:
- *
- * Decrypts @ipart into @opart.
- *
- * Return value: A validity/encryption status.
- **/
-CamelCipherValidity *
-camel_cipher_decrypt(CamelCipherContext *context, struct _CamelMimePart *ipart, struct _CamelMimePart *opart, CamelException *ex)
-{
- CamelCipherValidity *valid;
-
- g_return_val_if_fail (CAMEL_IS_CIPHER_CONTEXT (context), NULL);
-
- CIPHER_LOCK(context);
-
- valid = CCC_CLASS (context)->decrypt (context, ipart, opart, ex);
-
- CIPHER_UNLOCK(context);
-
- return valid;
-}
-
-static int
-cipher_import_keys (CamelCipherContext *context, struct _CamelStream *istream, CamelException *ex)
-{
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
- _("You may not import keys with this cipher"));
-
- return -1;
-}
-
-/**
- * camel_cipher_import_keys:
- * @ctx: Cipher Context
- * @istream: input stream (containing keys)
- * @ex: exception
- *
- * Imports a stream of keys/certificates contained within @istream
- * into the key/certificate database controlled by @ctx.
- *
- * Returns 0 on success or -1 on fail.
- **/
-int
-camel_cipher_import_keys (CamelCipherContext *context, struct _CamelStream *istream, CamelException *ex)
-{
- g_return_val_if_fail (CAMEL_IS_CIPHER_CONTEXT (context), -1);
- g_return_val_if_fail (CAMEL_IS_STREAM (istream), -1);
-
- return CCC_CLASS (context)->import_keys (context, istream, ex);
-}
-
-static int
-cipher_export_keys (CamelCipherContext *context, GPtrArray *keys,
- struct _CamelStream *ostream, CamelException *ex)
-{
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
- _("You may not export keys with this cipher"));
-
- return -1;
-}
-
-/**
- * camel_cipher_export_keys:
- * @ctx: Cipher Context
- * @keys: an array of key ids
- * @ostream: output stream
- * @ex: exception
- *
- * Exports the keys/certificates in @keys to the stream @ostream from
- * the key/certificate database controlled by @ctx.
- *
- * Returns 0 on success or -1 on fail.
- **/
-int
-camel_cipher_export_keys (CamelCipherContext *context, GPtrArray *keys,
- struct _CamelStream *ostream, CamelException *ex)
-{
- g_return_val_if_fail (CAMEL_IS_CIPHER_CONTEXT (context), -1);
- g_return_val_if_fail (CAMEL_IS_STREAM (ostream), -1);
- g_return_val_if_fail (keys != NULL, -1);
-
- return CCC_CLASS (context)->export_keys (context, keys, ostream, ex);
-}
-
-static CamelCipherHash
-cipher_id_to_hash(CamelCipherContext *context, const char *id)
-{
- return CAMEL_CIPHER_HASH_DEFAULT;
-}
-
-/* a couple of util functions */
-CamelCipherHash
-camel_cipher_id_to_hash(CamelCipherContext *context, const char *id)
-{
- g_return_val_if_fail (CAMEL_IS_CIPHER_CONTEXT (context), CAMEL_CIPHER_HASH_DEFAULT);
-
- return CCC_CLASS (context)->id_to_hash (context, id);
-}
-
-static const char *
-cipher_hash_to_id(CamelCipherContext *context, CamelCipherHash hash)
-{
- return NULL;
-}
-
-const char *
-camel_cipher_hash_to_id(CamelCipherContext *context, CamelCipherHash hash)
-{
- g_return_val_if_fail (CAMEL_IS_CIPHER_CONTEXT (context), NULL);
-
- return CCC_CLASS (context)->hash_to_id (context, hash);
-}
-
-/* Cipher Validity stuff */
-
-CamelCipherValidity *
-camel_cipher_validity_new (void)
-{
- CamelCipherValidity *validity;
-
- validity = g_malloc(sizeof(*validity));
- camel_cipher_validity_init(validity);
-
- return validity;
-}
-
-void
-camel_cipher_validity_init (CamelCipherValidity *validity)
-{
- g_assert (validity != NULL);
-
- memset(validity, 0, sizeof(*validity));
- e_dlist_init(&validity->children);
-}
-
-gboolean
-camel_cipher_validity_get_valid (CamelCipherValidity *validity)
-{
- return validity != NULL
- && validity->sign.status == CAMEL_CIPHER_VALIDITY_SIGN_GOOD;
-}
-
-void
-camel_cipher_validity_set_valid (CamelCipherValidity *validity, gboolean valid)
-{
- g_assert (validity != NULL);
-
- validity->sign.status = valid?CAMEL_CIPHER_VALIDITY_SIGN_GOOD:CAMEL_CIPHER_VALIDITY_SIGN_BAD;
-}
-
-gchar *
-camel_cipher_validity_get_description (CamelCipherValidity *validity)
-{
- if (validity == NULL)
- return NULL;
-
- return validity->sign.description;
-}
-
-void
-camel_cipher_validity_set_description (CamelCipherValidity *validity, const gchar *description)
-{
- g_assert (validity != NULL);
-
- g_free(validity->sign.description);
- validity->sign.description = g_strdup(description);
-}
-
-void
-camel_cipher_validity_clear (CamelCipherValidity *validity)
-{
- g_assert (validity != NULL);
-
- g_free(validity->sign.description);
- g_free(validity->encrypt.description);
- camel_cipher_validity_init(validity);
-}
-
-CamelCipherValidity *
-camel_cipher_validity_clone(CamelCipherValidity *vin)
-{
- CamelCipherValidity *vo;
-
- vo = camel_cipher_validity_new();
- vo->sign.status = vin->sign.status;
- vo->sign.description = g_strdup(vin->sign.description);
- vo->encrypt.status = vin->encrypt.status;
- vo->encrypt.description = g_strdup(vin->encrypt.description);
-
- return vo;
-}
-
-/**
- * camel_cipher_validity_envelope:
- * @validity:
- * @outer:
- *
- * Calculate a conglomerate validity based on wrapping one secure part inside
- * another one.
- **/
-void
-camel_cipher_validity_envelope(CamelCipherValidity *parent, CamelCipherValidity *valid)
-{
- if (parent->sign.status != CAMEL_CIPHER_VALIDITY_SIGN_NONE
- && parent->encrypt.status == CAMEL_CIPHER_VALIDITY_ENCRYPT_NONE
- && valid->sign.status == CAMEL_CIPHER_VALIDITY_SIGN_NONE
- && valid->encrypt.status != CAMEL_CIPHER_VALIDITY_ENCRYPT_NONE) {
- /* case 1: only signed inside only encrypted -> merge both */
- parent->encrypt.status = valid->encrypt.status;
- parent->encrypt.description = g_strdup(valid->encrypt.description);
- } else if (parent->sign.status == CAMEL_CIPHER_VALIDITY_SIGN_NONE
- && parent->encrypt.status != CAMEL_CIPHER_VALIDITY_ENCRYPT_NONE
- && valid->sign.status != CAMEL_CIPHER_VALIDITY_SIGN_NONE
- && valid->encrypt.status == CAMEL_CIPHER_VALIDITY_ENCRYPT_NONE) {
- /* case 2: only encrypted inside only signed */
- parent->sign.status = valid->sign.status;
- parent->sign.description = g_strdup(valid->sign.description);
- }
- /* Otherwise, I dunno - what do you do? */
-}
-
-void
-camel_cipher_validity_free (CamelCipherValidity *validity)
-{
- CamelCipherValidity *child;
-
- if (validity == NULL)
- return;
-
- while ((child = (CamelCipherValidity *)e_dlist_remhead(&validity->children)))
- camel_cipher_validity_free(child);
-
- camel_cipher_validity_clear(validity);
- g_free(validity);
-}
-
-/* ********************************************************************** */
-
-static void
-camel_cipher_context_init (CamelCipherContext *context)
-{
- context->priv = g_new0 (struct _CamelCipherContextPrivate, 1);
- context->priv->lock = g_mutex_new ();
-}
-
-static void
-camel_cipher_context_finalise (CamelObject *o)
-{
- CamelCipherContext *context = (CamelCipherContext *)o;
-
- camel_object_unref (CAMEL_OBJECT (context->session));
-
- g_mutex_free (context->priv->lock);
-
- 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->hash_to_id = cipher_hash_to_id;
- camel_cipher_context_class->id_to_hash = cipher_id_to_hash;
- camel_cipher_context_class->sign = cipher_sign;
- camel_cipher_context_class->verify = cipher_verify;
- camel_cipher_context_class->encrypt = cipher_encrypt;
- camel_cipher_context_class->decrypt = cipher_decrypt;
- camel_cipher_context_class->import_keys = cipher_import_keys;
- camel_cipher_context_class->export_keys = cipher_export_keys;
-}
-
-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;
-}
-
-/* See rfc3156, section 2 and others */
-/* We do this simply: Anything not base64 must be qp
- This is so that we can safely translate any occurance of "From "
- into the quoted-printable escaped version safely. */
-static void
-cc_prepare_sign(CamelMimePart *part)
-{
- CamelDataWrapper *dw;
- CamelTransferEncoding encoding;
- int parts, i;
-
- dw = camel_medium_get_content_object((CamelMedium *)part);
- if (!dw)
- return;
-
- if (CAMEL_IS_MULTIPART (dw)) {
- parts = camel_multipart_get_number((CamelMultipart *)dw);
- for (i = 0; i < parts; i++)
- cc_prepare_sign(camel_multipart_get_part((CamelMultipart *)dw, i));
- } else if (CAMEL_IS_MIME_MESSAGE (dw)) {
- cc_prepare_sign((CamelMimePart *)dw);
- } else {
- encoding = camel_mime_part_get_encoding(part);
-
- if (encoding != CAMEL_TRANSFER_ENCODING_BASE64
- && encoding != CAMEL_TRANSFER_ENCODING_QUOTEDPRINTABLE) {
- camel_mime_part_set_encoding(part, CAMEL_TRANSFER_ENCODING_QUOTEDPRINTABLE);
- }
- }
-}
-
-/**
- * camel_cipher_canonical_to_stream:
- * @part: Part to write.
- * @flags: flags for the canonicalisation filter (CamelMimeFilterCanon)
- * @ostream: stream to write canonicalised output to.
- *
- * Writes a part to a stream in a canonicalised format, suitable for signing/encrypting.
- *
- * The transfer encoding paramaters for the part may be changed by this function.
- *
- * Return value: -1 on error;
- **/
-int
-camel_cipher_canonical_to_stream(CamelMimePart *part, guint32 flags, CamelStream *ostream)
-{
- CamelStreamFilter *filter;
- CamelMimeFilter *canon;
- int res = -1;
-
- if (flags & (CAMEL_MIME_FILTER_CANON_FROM|CAMEL_MIME_FILTER_CANON_STRIP))
- cc_prepare_sign(part);
-
- filter = camel_stream_filter_new_with_stream(ostream);
- canon = camel_mime_filter_canon_new(flags);
- camel_stream_filter_add(filter, canon);
- camel_object_unref(canon);
-
- if (camel_data_wrapper_write_to_stream((CamelDataWrapper *)part, (CamelStream *)filter) != -1
- && camel_stream_flush((CamelStream *)filter) != -1)
- res = 0;
-
- camel_object_unref(filter);
- camel_stream_reset(ostream);
-
- return res;
-}
diff --git a/camel/camel-cipher-context.h b/camel/camel-cipher-context.h
deleted file mode 100644
index 1a7387ac2c..0000000000
--- a/camel/camel-cipher-context.h
+++ /dev/null
@@ -1,174 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_CIPHER_CONTEXT_H
-#define CAMEL_CIPHER_CONTEXT_H
-
-#include <camel/camel-session.h>
-#include <camel/camel-exception.h>
-
-/* FIXME: camelise */
-#include "e-util/e-msgport.h"
-
-struct _CamelStream;
-struct _CamelMimePart;
-
-#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,
- CAMEL_CIPHER_HASH_RIPEMD160,
- CAMEL_CIPHER_HASH_TIGER192,
- CAMEL_CIPHER_HASH_HAVAL5160
-} CamelCipherHash;
-
-enum _camel_cipher_validity_sign_t {
- CAMEL_CIPHER_VALIDITY_SIGN_NONE,
- CAMEL_CIPHER_VALIDITY_SIGN_GOOD,
- CAMEL_CIPHER_VALIDITY_SIGN_BAD,
- CAMEL_CIPHER_VALIDITY_SIGN_UNKNOWN,
-};
-
-enum _camel_cipher_validity_encrypt_t {
- CAMEL_CIPHER_VALIDITY_ENCRYPT_NONE,
- CAMEL_CIPHER_VALIDITY_ENCRYPT_WEAK,
- CAMEL_CIPHER_VALIDITY_ENCRYPT_ENCRYPTED, /* encrypted, unknown strenght */
- CAMEL_CIPHER_VALIDITY_ENCRYPT_STRONG,
-};
-
-struct _CamelCipherValidity {
- struct _CamelCipherValidity *next;
- struct _CamelCipherValidity *prev;
- EDList children;
-
- struct {
- enum _camel_cipher_validity_sign_t status;
- char *description;
- } sign;
- struct {
- enum _camel_cipher_validity_encrypt_t status;
- char *description;
- } encrypt;
-};
-
-typedef struct _CamelCipherContext {
- CamelObject parent_object;
-
- struct _CamelCipherContextPrivate *priv;
-
- CamelSession *session;
-
- /* these MUST be set by implementors */
- const char *sign_protocol;
- const char *encrypt_protocol;
- const char *key_protocol;
-} CamelCipherContext;
-
-typedef struct _CamelCipherContextClass {
- CamelObjectClass parent_class;
-
- CamelCipherHash (*id_to_hash)(CamelCipherContext *context, const char *id);
- const char * (*hash_to_id)(CamelCipherContext *context, CamelCipherHash hash);
-
- int (*sign) (CamelCipherContext *context, const char *userid, CamelCipherHash hash,
- struct _CamelMimePart *ipart, struct _CamelMimePart *opart, CamelException *ex);
-
- CamelCipherValidity * (*verify) (CamelCipherContext *context, struct _CamelMimePart *ipart, CamelException *ex);
-
- int (*encrypt) (CamelCipherContext *context, const char *userid,
- GPtrArray *recipients, struct _CamelMimePart *ipart, struct _CamelMimePart *opart,
- CamelException *ex);
-
- CamelCipherValidity *(*decrypt) (CamelCipherContext *context, struct _CamelMimePart *ipart, struct _CamelMimePart *opart,
- CamelException *ex);
-
- int (*import_keys) (CamelCipherContext *context, struct _CamelStream *istream,
- CamelException *ex);
-
- int (*export_keys) (CamelCipherContext *context, GPtrArray *keys,
- struct _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 context util routines */
-CamelCipherHash camel_cipher_id_to_hash (CamelCipherContext *context, const char *id);
-const char * camel_cipher_hash_to_id (CamelCipherContext *context, CamelCipherHash hash);
-
-/* FIXME:
- There are some inconsistencies here, the api's should probably handle CamelMimePart's as input/outputs,
- Something that might generate a multipart/signed should do it as part of that processing, internally
- to the cipher, etc etc. */
-
-/* cipher routines */
-int camel_cipher_sign (CamelCipherContext *context, const char *userid, CamelCipherHash hash,
- struct _CamelMimePart *ipart, struct _CamelMimePart *opart, CamelException *ex);
-CamelCipherValidity *camel_cipher_verify (CamelCipherContext *context, struct _CamelMimePart *ipart, CamelException *ex);
-int camel_cipher_encrypt (CamelCipherContext *context, const char *userid,
- GPtrArray *recipients, struct _CamelMimePart *ipart, struct _CamelMimePart *opart,
- CamelException *ex);
-CamelCipherValidity *camel_cipher_decrypt (CamelCipherContext *context, struct _CamelMimePart *ipart, struct _CamelMimePart *opart,
- CamelException *ex);
-
-/* key/certificate routines */
-int camel_cipher_import_keys (CamelCipherContext *context, struct _CamelStream *istream,
- CamelException *ex);
-int camel_cipher_export_keys (CamelCipherContext *context, GPtrArray *keys,
- struct _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);
-CamelCipherValidity *camel_cipher_validity_clone(CamelCipherValidity *vin);
-void camel_cipher_validity_envelope(CamelCipherValidity *valid, CamelCipherValidity *outer);
-void camel_cipher_validity_free (CamelCipherValidity *validity);
-
-/* utility functions */
-int camel_cipher_canonical_to_stream(CamelMimePart *part, guint32 flags, CamelStream *ostream);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_CIPHER_CONTEXT_H */
diff --git a/camel/camel-data-cache.c b/camel/camel-data-cache.c
deleted file mode 100644
index a585f59a9d..0000000000
--- a/camel/camel-data-cache.c
+++ /dev/null
@@ -1,421 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-message-cache.c: Class for a Camel cache.
- *
- * 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <ctype.h>
-#include <dirent.h>
-#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
-#ifdef HAVE_ALLOCA_H
-#include <alloca.h>
-#endif
-
-#include "camel-data-cache.h"
-#include "camel-exception.h"
-#include "camel-stream-fs.h"
-#include "camel-stream-mem.h"
-#include "camel-file-utils.h"
-
-extern int camel_verbose_debug;
-#define dd(x) (camel_verbose_debug?(x):0)
-#define d(x)
-
-/* how many 'bits' of hash are used to key the toplevel directory */
-#define CAMEL_DATA_CACHE_BITS (6)
-#define CAMEL_DATA_CACHE_MASK ((1<<CAMEL_DATA_CACHE_BITS)-1)
-
-/* timeout before a cache dir is checked again for expired entries,
- once an hour should be enough */
-#define CAMEL_DATA_CACHE_CYCLE_TIME (60*60)
-
-struct _CamelDataCachePrivate {
- CamelObjectBag *busy_bag;
-
- int expire_inc;
- time_t expire_last[1<<CAMEL_DATA_CACHE_BITS];
-};
-
-static CamelObject *camel_data_cache_parent;
-
-static void data_cache_class_init(CamelDataCacheClass *klass)
-{
- camel_data_cache_parent = (CamelObject *)camel_object_get_type ();
-
-#if 0
- klass->add = data_cache_add;
- klass->get = data_cache_get;
- klass->close = data_cache_close;
- klass->remove = data_cache_remove;
- klass->clear = data_cache_clear;
-#endif
-}
-
-static void data_cache_init(CamelDataCache *cdc, CamelDataCacheClass *klass)
-{
- struct _CamelDataCachePrivate *p;
-
- p = cdc->priv = g_malloc0(sizeof(*cdc->priv));
- p->busy_bag = camel_object_bag_new(g_str_hash, g_str_equal, (CamelCopyFunc)g_strdup, g_free);
-}
-
-static void data_cache_finalise(CamelDataCache *cdc)
-{
- struct _CamelDataCachePrivate *p;
-
- p = cdc->priv;
- camel_object_bag_destroy(p->busy_bag);
- g_free(p);
-
- g_free (cdc->path);
-}
-
-CamelType
-camel_data_cache_get_type(void)
-{
- static CamelType camel_data_cache_type = CAMEL_INVALID_TYPE;
-
- if (camel_data_cache_type == CAMEL_INVALID_TYPE) {
- camel_data_cache_type = camel_type_register(
- CAMEL_OBJECT_TYPE, "CamelDataCache",
- sizeof (CamelDataCache),
- sizeof (CamelDataCacheClass),
- (CamelObjectClassInitFunc) data_cache_class_init,
- NULL,
- (CamelObjectInitFunc) data_cache_init,
- (CamelObjectFinalizeFunc) data_cache_finalise);
- }
-
- return camel_data_cache_type;
-}
-
-/**
- * camel_data_cache_new:
- * @path: Base path of cache, subdirectories will be created here.
- * @flags: Open flags, none defined.
- * @ex:
- *
- * Create a new data cache.
- *
- * Return value: A new cache object, or NULL if the base path cannot
- * be written to.
- **/
-CamelDataCache *
-camel_data_cache_new(const char *path, guint32 flags, CamelException *ex)
-{
- CamelDataCache *cdc;
-
- if (camel_mkdir (path, 0700) == -1) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Unable to create cache path"));
- return NULL;
- }
-
- cdc = (CamelDataCache *)camel_object_new(CAMEL_DATA_CACHE_TYPE);
-
- cdc->path = g_strdup(path);
- cdc->flags = flags;
- cdc->expire_age = -1;
- cdc->expire_access = -1;
-
- return cdc;
-}
-
-/**
- * camel_data_cache_set_expire_age:
- * @cdc:
- * @when: Timeout for age expiry, or -1 to disable.
- *
- * Set the cache expiration policy for aged entries.
- *
- * Items in the cache older than @when seconds may be
- * flushed at any time. Items are expired in a lazy
- * manner, so it is indeterminate when the items will
- * physically be removed.
- *
- * Note you can set both an age and an access limit. The
- * age acts as a hard limit on cache entries.
- **/
-void
-camel_data_cache_set_expire_age(CamelDataCache *cdc, time_t when)
-{
- cdc->expire_age = when;
-}
-
-/**
- * camel_data_cache_set_expire_access:
- * @cdc:
- * @when: Timeout for access, or -1 to disable access expiry.
- *
- * Set the cache expiration policy for access times.
- *
- * Items in the cache which haven't been accessed for @when
- * seconds may be expired at any time. Items are expired in a lazy
- * manner, so it is indeterminate when the items will
- * physically be removed.
- *
- * Note you can set both an age and an access limit. The
- * age acts as a hard limit on cache entries.
- **/
-void
-camel_data_cache_set_expire_access(CamelDataCache *cdc, time_t when)
-{
- cdc->expire_access = when;
-}
-
-static void
-data_cache_expire(CamelDataCache *cdc, const char *path, const char *keep, time_t now)
-{
- DIR *dir;
- struct dirent *d;
- GString *s;
- struct stat st;
- CamelStream *stream;
-
- dir = opendir(path);
- if (dir == NULL)
- return;
-
- s = g_string_new("");
- while ( (d = readdir(dir)) ) {
- if (strcmp(d->d_name, keep) == 0)
- continue;
-
- g_string_printf (s, "%s/%s", path, d->d_name);
- dd(printf("Checking '%s' for expiry\n", s->str));
- if (stat(s->str, &st) == 0
- && S_ISREG(st.st_mode)
- && ((cdc->expire_age != -1 && st.st_mtime + cdc->expire_age < now)
- || (cdc->expire_access != -1 && st.st_atime + cdc->expire_access < now))) {
- dd(printf("Has expired! Removing!\n"));
- unlink(s->str);
- stream = camel_object_bag_get(cdc->priv->busy_bag, s->str);
- if (stream) {
- camel_object_bag_remove(cdc->priv->busy_bag, stream);
- camel_object_unref(stream);
- }
- }
- }
- g_string_free(s, TRUE);
- closedir(dir);
-}
-
-/* Since we have to stat the directory anyway, we use this opportunity to
- lazily expire old data.
- If it is this directories 'turn', and we haven't done it for CYCLE_TIME seconds,
- then we perform an expiry run */
-static char *
-data_cache_path(CamelDataCache *cdc, int create, const char *path, const char *key)
-{
- char *dir, *real, *tmp;
- guint32 hash;
-
- hash = g_str_hash(key);
- hash = (hash>>5)&CAMEL_DATA_CACHE_MASK;
- dir = alloca(strlen(cdc->path) + strlen(path) + 8);
- sprintf(dir, "%s/%s/%02x", cdc->path, path, hash);
- if (access(dir, F_OK) == -1) {
- if (create)
- camel_mkdir (dir, 0700);
- } else if (cdc->priv->expire_inc == hash
- && (cdc->expire_age != -1 || cdc->expire_access != -1)) {
- time_t now;
-
- dd(printf("Checking expire cycle time on dir '%s'\n", dir));
-
- /* This has a race, but at worst we re-run an expire cycle which is safe */
- now = time(0);
- if (cdc->priv->expire_last[hash] + CAMEL_DATA_CACHE_CYCLE_TIME < now) {
- cdc->priv->expire_last[hash] = now;
- data_cache_expire(cdc, dir, key, now);
- }
- cdc->priv->expire_inc = (cdc->priv->expire_inc + 1) & CAMEL_DATA_CACHE_MASK;
- }
-
- tmp = camel_file_util_safe_filename(key);
- real = g_strdup_printf("%s/%s", dir, tmp);
- g_free(tmp);
-
- return real;
-}
-
-/**
- * camel_data_cache_add:
- * @cdc:
- * @path: Relative path of item to add.
- * @key: Key of item to add.
- * @ex:
- *
- * Add a new item to the cache.
- *
- * The key and the path combine to form a unique key used to store
- * the item.
- *
- * Potentially, expiry processing will be performed while this call
- * is executing.
- *
- * Return value: A CamelStream (file) opened in read-write mode.
- * The caller must unref this when finished.
- **/
-CamelStream *
-camel_data_cache_add(CamelDataCache *cdc, const char *path, const char *key, CamelException *ex)
-{
- char *real;
- CamelStream *stream;
-
- real = data_cache_path(cdc, TRUE, path, key);
- stream = camel_object_bag_reserve(cdc->priv->busy_bag, real);
- if (stream) {
- unlink(real);
- camel_object_bag_remove(cdc->priv->busy_bag, stream);
- camel_object_unref(stream);
- }
-
- stream = camel_stream_fs_new_with_name(real, O_RDWR|O_CREAT|O_TRUNC, 0600);
- if (stream)
- camel_object_bag_add(cdc->priv->busy_bag, real, stream);
- else
- camel_object_bag_abort(cdc->priv->busy_bag, real);
-
- g_free(real);
-
- return stream;
-}
-
-/**
- * camel_data_cache_get:
- * @cdc:
- * @path: Path to the (sub) cache the item exists in.
- * @key: Key for the cache item.
- * @ex:
- *
- * Lookup an item in the cache. If the item exists, a stream
- * is returned for the item. The stream may be shared by
- * multiple callers, so ensure the stream is in a valid state
- * through external locking.
- *
- * Return value: A cache item, or NULL if the cache item does not exist.
- **/
-CamelStream *
-camel_data_cache_get(CamelDataCache *cdc, const char *path, const char *key, CamelException *ex)
-{
- char *real;
- CamelStream *stream;
-
- real = data_cache_path(cdc, FALSE, path, key);
- stream = camel_object_bag_reserve(cdc->priv->busy_bag, real);
- if (!stream) {
- stream = camel_stream_fs_new_with_name(real, O_RDWR, 0600);
- if (stream)
- camel_object_bag_add(cdc->priv->busy_bag, real, stream);
- else
- camel_object_bag_abort(cdc->priv->busy_bag, real);
- }
- g_free(real);
-
- return stream;
-}
-
-/**
- * camel_data_cache_remove:
- * @cdc:
- * @path:
- * @key:
- * @ex:
- *
- * Remove/expire a cache item.
- *
- * Return value:
- **/
-int
-camel_data_cache_remove(CamelDataCache *cdc, const char *path, const char *key, CamelException *ex)
-{
- CamelStream *stream;
- char *real;
- int ret;
-
- real = data_cache_path(cdc, FALSE, path, key);
- stream = camel_object_bag_get(cdc->priv->busy_bag, real);
- if (stream) {
- camel_object_bag_remove(cdc->priv->busy_bag, stream);
- camel_object_unref(stream);
- }
-
- /* maybe we were a mem stream */
- if (unlink (real) == -1 && errno != ENOENT) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not remove cache entry: %s: %s"),
- real, g_strerror (errno));
- ret = -1;
- } else {
- ret = 0;
- }
-
- g_free(real);
-
- return ret;
-}
-
-/**
- * camel_data_cache_rename:
- * @cache:
- * @old:
- * @new:
- * @ex:
- *
- * Rename a cache path. All cache items accessed from the old path
- * are accessible using the new path.
- *
- * CURRENTLY UNIMPLEMENTED
- *
- * Return value: -1 on error.
- **/
-int camel_data_cache_rename(CamelDataCache *cache,
- const char *old, const char *new, CamelException *ex)
-{
- /* blah dont care yet */
- return -1;
-}
-
-/**
- * camel_data_cache_clear:
- * @cache:
- * @path: Path to clear, or NULL to clear all items in
- * all paths.
- * @ex:
- *
- * Clear all items in a given cache path or all items in the cache.
- *
- * CURRENTLY_UNIMPLEMENTED
- *
- * Return value: -1 on error.
- **/
-int
-camel_data_cache_clear(CamelDataCache *cache, const char *path, CamelException *ex)
-{
- /* nor for this? */
- return -1;
-}
diff --git a/camel/camel-data-cache.h b/camel/camel-data-cache.h
deleted file mode 100644
index ab6c29a622..0000000000
--- a/camel/camel-data-cache.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-data-cache.h: Class for a Camel filesystem cache
- *
- * 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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_CACHE_H
-#define CAMEL_DATA_CACHE_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <glib.h>
-
-#include <camel/camel-stream.h>
-#include <camel/camel-exception.h>
-
-#define CAMEL_DATA_CACHE_TYPE (camel_data_cache_get_type ())
-#define CAMEL_DATA_CACHE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_DATA_CACHE_TYPE, CamelFolder))
-#define CAMEL_DATA_CACHE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_DATA_CACHE_TYPE, CamelFolderClass))
-#define CAMEL_IS_DATA_CACHE(o) (CAMEL_CHECK_TYPE((o), CAMEL_DATA_CACHE_TYPE))
-
-typedef struct _CamelDataCache CamelDataCache;
-typedef struct _CamelDataCacheClass CamelDataCacheClass;
-
-struct _CamelDataCache {
- CamelObject parent_object;
-
- struct _CamelDataCachePrivate *priv;
-
- char *path;
- guint32 flags;
-
- time_t expire_age;
- time_t expire_access;
-};
-
-struct _CamelDataCacheClass {
- CamelObjectClass parent_class;
-
- /* None are virtual yet */
-#if 0
- /* Virtual methods */
- CamelStream *(*add)(CamelDataCache *cmc, const char *path, const char *key, CamelException *ex);
- CamelStream *(*get)(CamelDataCache *cmc, const char *path, const char *key, CamelException *ex);
- int (*close)(CamelDataCache *cmc, CamelStream *stream, CamelException *ex);
- int (*remove)(CamelDataCache *cmc, const char *path, const char *key, CamelException *ex);
-
- int (*clear)(CamelDataCache *cmc, const char *path, CamelException *ex);
-#endif
-};
-
-/* public methods */
-CamelDataCache *camel_data_cache_new(const char *path, guint32 flags, CamelException *ex);
-
-void camel_data_cache_set_expire_age(CamelDataCache *cache, time_t when);
-void camel_data_cache_set_expire_access(CamelDataCache *cdc, time_t when);
-
-int camel_data_cache_rename(CamelDataCache *cache,
- const char *old, const char *new, CamelException *ex);
-
-CamelStream *camel_data_cache_add(CamelDataCache *cache,
- const char *path, const char *key, CamelException *ex);
-CamelStream *camel_data_cache_get(CamelDataCache *cache,
- const char *path, const char *key, CamelException *ex);
-int camel_data_cache_remove(CamelDataCache *cache,
- const char *path, const char *key, CamelException *ex);
-
-int camel_data_cache_clear(CamelDataCache *cache,
- const char *path, CamelException *ex);
-
-/* Standard Camel function */
-CamelType camel_data_cache_get_type (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_DATA_CACHE_H */
diff --git a/camel/camel-data-wrapper.c b/camel/camel-data-wrapper.c
deleted file mode 100644
index e30cd10927..0000000000
--- a/camel/camel-data-wrapper.c
+++ /dev/null
@@ -1,389 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; -*- */
-/*
- *
- * Authors: Bertrand Guiheneuf <bertrand@helixcode.com>
- *
- * Copyright 1999-2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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-stream.h"
-#include "camel-stream-filter.h"
-#include "camel-mime-filter-basic.h"
-#include "camel-mime-filter-crlf.h"
-#include "camel-exception.h"
-#include "camel-private.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 ssize_t write_to_stream (CamelDataWrapper *data_wrapper, CamelStream *stream);
-static ssize_t decode_to_stream (CamelDataWrapper *data_wrapper, CamelStream *stream);
-static void set_mime_type (CamelDataWrapper *data_wrapper, const char *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->decode_to_stream = decode_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->priv = g_malloc (sizeof (struct _CamelDataWrapperPrivate));
- pthread_mutex_init (&camel_data_wrapper->priv->stream_lock, NULL);
-
- camel_data_wrapper->mime_type = camel_content_type_new ("application", "octet-stream");
- camel_data_wrapper->encoding = CAMEL_TRANSFER_ENCODING_DEFAULT;
- camel_data_wrapper->offline = FALSE;
-}
-
-static void
-camel_data_wrapper_finalize (CamelObject *object)
-{
- CamelDataWrapper *camel_data_wrapper = CAMEL_DATA_WRAPPER (object);
-
- pthread_mutex_destroy (&camel_data_wrapper->priv->stream_lock);
-
- g_free (camel_data_wrapper->priv);
-
- if (camel_data_wrapper->mime_type)
- camel_content_type_unref (camel_data_wrapper->mime_type);
-
- if (camel_data_wrapper->stream)
- camel_object_unref (camel_data_wrapper->stream);
-}
-
-CamelType
-camel_data_wrapper_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- 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 type;
-}
-
-
-CamelDataWrapper *
-camel_data_wrapper_new (void)
-{
- return (CamelDataWrapper *) camel_object_new (CAMEL_DATA_WRAPPER_TYPE);
-}
-
-static ssize_t
-write_to_stream (CamelDataWrapper *data_wrapper, CamelStream *stream)
-{
- ssize_t ret;
-
- if (data_wrapper->stream == NULL) {
- return -1;
- }
-
- CAMEL_DATA_WRAPPER_LOCK (data_wrapper, stream_lock);
- if (camel_stream_reset (data_wrapper->stream) == -1) {
- CAMEL_DATA_WRAPPER_UNLOCK (data_wrapper, stream_lock);
- return -1;
- }
-
- ret = camel_stream_write_to_stream (data_wrapper->stream, stream);
-
- CAMEL_DATA_WRAPPER_UNLOCK (data_wrapper, stream_lock);
-
- return ret;
-}
-
-/**
- * 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_wrapper_construct_from_stream().
- *
- * Return value: the number of bytes written, or -1 if an error
- * occurs.
- **/
-ssize_t
-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 ssize_t
-decode_to_stream (CamelDataWrapper *data_wrapper, CamelStream *stream)
-{
- CamelMimeFilter *filter;
- CamelStream *fstream;
- ssize_t ret;
-
- fstream = (CamelStream *) camel_stream_filter_new_with_stream (stream);
-
- switch (data_wrapper->encoding) {
- case CAMEL_TRANSFER_ENCODING_BASE64:
- filter = (CamelMimeFilter *) camel_mime_filter_basic_new_type (CAMEL_MIME_FILTER_BASIC_BASE64_DEC);
- camel_stream_filter_add (CAMEL_STREAM_FILTER (fstream), filter);
- camel_object_unref (filter);
- break;
- case CAMEL_TRANSFER_ENCODING_QUOTEDPRINTABLE:
- filter = (CamelMimeFilter *) camel_mime_filter_basic_new_type (CAMEL_MIME_FILTER_BASIC_QP_DEC);
- camel_stream_filter_add (CAMEL_STREAM_FILTER (fstream), filter);
- camel_object_unref (filter);
- break;
- case CAMEL_TRANSFER_ENCODING_UUENCODE:
- filter = (CamelMimeFilter *) camel_mime_filter_basic_new_type (CAMEL_MIME_FILTER_BASIC_UU_DEC);
- camel_stream_filter_add (CAMEL_STREAM_FILTER (fstream), filter);
- camel_object_unref (filter);
- break;
- default:
- break;
- }
-
- if (camel_content_type_is (data_wrapper->mime_type, "text", "*")) {
- filter = camel_mime_filter_crlf_new (CAMEL_MIME_FILTER_CRLF_DECODE,
- CAMEL_MIME_FILTER_CRLF_MODE_CRLF_ONLY);
- camel_stream_filter_add (CAMEL_STREAM_FILTER (fstream), filter);
- camel_object_unref (filter);
- }
-
- ret = camel_data_wrapper_write_to_stream (data_wrapper, fstream);
- camel_stream_flush (fstream);
- camel_object_unref (fstream);
-
- return ret;
-}
-
-/**
- * camel_data_wrapper_decode_to_stream:
- * @data_wrapper: a data wrapper
- * @stream: stream for decoded data to be written to
- * @ex: a CamelException
- *
- * Writes the decoded data content to @stream.
- *
- * Return value: the number of bytes written, or -1 if an error
- * occurs.
- **/
-ssize_t
-camel_data_wrapper_decode_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)->decode_to_stream (data_wrapper, stream);
-}
-
-
-static int
-construct_from_stream (CamelDataWrapper *data_wrapper, CamelStream *stream)
-{
- if (data_wrapper->stream)
- camel_object_unref (data_wrapper->stream);
-
- data_wrapper->stream = stream;
- camel_object_ref (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 char *mime_type)
-{
- if (data_wrapper->mime_type)
- camel_content_type_unref (data_wrapper->mime_type);
- data_wrapper->mime_type = camel_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 char *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 char *
-get_mime_type (CamelDataWrapper *data_wrapper)
-{
- return camel_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.
- **/
-char *
-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)
- camel_content_type_unref (data_wrapper->mime_type);
- data_wrapper->mime_type = mime_type;
- if (mime_type)
- camel_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 1e22595019..0000000000
--- a/camel/camel-data-wrapper.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Bertrand Guiheneuf <bertrand@helixcode.com>
- * Michael Zucchi <notzed@ximian.com>
- * Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 1999-2003 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_DATA_WRAPPER_H
-#define CAMEL_DATA_WRAPPER_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <glib.h>
-#include <sys/types.h>
-#include <camel/camel-object.h>
-#include <camel/camel-mime-utils.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;
- struct _CamelDataWrapperPrivate *priv;
-
- CamelTransferEncoding encoding;
-
- CamelContentType *mime_type;
- CamelStream *stream;
-
- unsigned int offline:1;
-};
-
-typedef struct {
- CamelObjectClass parent_class;
-
- /* Virtual methods */
- void (*set_mime_type) (CamelDataWrapper *data_wrapper,
- const char *mime_type);
- char * (*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);
-
- ssize_t (*write_to_stream) (CamelDataWrapper *data_wrapper,
- CamelStream *stream);
-
- ssize_t (*decode_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);
-ssize_t camel_data_wrapper_write_to_stream (CamelDataWrapper *data_wrapper,
- CamelStream *stream);
-ssize_t camel_data_wrapper_decode_to_stream (CamelDataWrapper *data_wrapper,
- CamelStream *stream);
-
-void camel_data_wrapper_set_mime_type (CamelDataWrapper *data_wrapper,
- const char *mime_type);
-char *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 b2c81b5d4d..0000000000
--- a/camel/camel-digest-folder.c
+++ /dev/null
@@ -1,396 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001-2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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-digest-folder.h"
-#include "camel-digest-summary.h"
-
-#include "camel-exception.h"
-#include "camel-multipart.h"
-#include "camel-mime-message.h"
-#include "camel-folder-search.h"
-
-#define d(x)
-
-#define _PRIVATE(o) (((CamelDigestFolder *)(o))->priv)
-
-struct _CamelDigestFolderPrivate {
- CamelMimeMessage *message;
- CamelFolderSearch *search;
- GMutex *search_lock;
-};
-
-#define CAMEL_DIGEST_FOLDER_LOCK(f, l) (g_mutex_lock(((CamelDigestFolder *)f)->priv->l))
-#define CAMEL_DIGEST_FOLDER_UNLOCK(f, l) (g_mutex_unlock(((CamelDigestFolder *)f)->priv->l))
-
-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);
-
-/* 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, char **appended_uid, CamelException *ex);
-static void digest_transfer_messages_to (CamelFolder *source, GPtrArray *uids,
- CamelFolder *dest, GPtrArray **transferred_uids,
- gboolean delete_originals, CamelException *ex);
-
-static GPtrArray *digest_search_by_expression (CamelFolder *folder, const char *expression,
- CamelException *ex);
-
-static GPtrArray *digest_search_by_uids (CamelFolder *folder, const char *expression,
- GPtrArray *uids, CamelException *ex);
-
-static void digest_search_free (CamelFolder *folder, GPtrArray *result);
-
-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_message = digest_get_message;
- camel_folder_class->append_message = digest_append_message;
- camel_folder_class->transfer_messages_to = digest_transfer_messages_to;
-
- camel_folder_class->search_by_expression = digest_search_by_expression;
- camel_folder_class->search_by_uids = digest_search_by_uids;
- camel_folder_class->search_free = digest_search_free;
-}
-
-static void
-camel_digest_folder_init (gpointer object, gpointer klass)
-{
- CamelDigestFolder *digest_folder = CAMEL_DIGEST_FOLDER (object);
- CamelFolder *folder = CAMEL_FOLDER (object);
-
- folder->folder_flags |= CAMEL_FOLDER_HAS_SUMMARY_CAPABILITY | CAMEL_FOLDER_HAS_SEARCH_CAPABILITY;
-
- folder->summary = camel_digest_summary_new ();
-
- digest_folder->priv = g_new (struct _CamelDigestFolderPrivate, 1);
- digest_folder->priv->message = NULL;
- digest_folder->priv->search = NULL;
- digest_folder->priv->search_lock = g_mutex_new ();
-}
-
-static void
-digest_finalize (CamelObject *object)
-{
- CamelDigestFolder *digest_folder = CAMEL_DIGEST_FOLDER (object);
- CamelFolder *folder = CAMEL_FOLDER (object);
-
- if (folder->summary) {
- camel_object_unref (folder->summary);
- folder->summary = NULL;
- }
-
- camel_object_unref (digest_folder->priv->message);
-
- if (digest_folder->priv->search)
- camel_object_unref (digest_folder->priv->search);
-
- g_mutex_free (digest_folder->priv->search_lock);
-
- 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;
-}
-
-static gboolean
-multipart_contains_message_parts (CamelMultipart *multipart)
-{
- gboolean has_message_parts = FALSE;
- CamelDataWrapper *wrapper;
- CamelMimePart *part;
- int i, parts;
-
- parts = camel_multipart_get_number (multipart);
- for (i = 0; i < parts && !has_message_parts; i++) {
- part = camel_multipart_get_part (multipart, i);
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (part));
- if (CAMEL_IS_MULTIPART (wrapper)) {
- has_message_parts = multipart_contains_message_parts (CAMEL_MULTIPART (wrapper));
- } else if (CAMEL_IS_MIME_MESSAGE (wrapper)) {
- has_message_parts = TRUE;
- }
- }
-
- return has_message_parts;
-}
-
-static void
-digest_add_multipart (CamelFolder *folder, CamelMultipart *multipart, const char *preuid)
-{
- CamelDataWrapper *wrapper;
- CamelMessageInfo *info;
- CamelMimePart *part;
- int parts, i;
- char *uid;
-
- parts = camel_multipart_get_number (multipart);
- for (i = 0; i < parts; i++) {
- part = camel_multipart_get_part (multipart, i);
-
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (part));
-
- if (CAMEL_IS_MULTIPART (wrapper)) {
- uid = g_strdup_printf ("%s%d.", preuid, i);
- digest_add_multipart (folder, CAMEL_MULTIPART (wrapper), uid);
- g_free (uid);
- continue;
- } else if (!CAMEL_IS_MIME_MESSAGE (wrapper)) {
- continue;
- }
-
- info = camel_folder_summary_info_new_from_message (folder->summary, CAMEL_MIME_MESSAGE (wrapper));
-
- uid = g_strdup_printf ("%s%d", preuid, i);
- camel_message_info_set_uid (info, uid);
- camel_folder_summary_add (folder->summary, info);
- }
-}
-
-static void
-construct_summary (CamelFolder *folder, CamelMultipart *multipart)
-{
- digest_add_multipart (folder, multipart, "");
-}
-
-CamelFolder *
-camel_digest_folder_new (CamelStore *parent_store, 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;
-
- /* Make sure we have a multipart/digest subpart or at least some message/rfc822 attachments... */
- if (!camel_content_type_is (CAMEL_DATA_WRAPPER (message)->mime_type, "multipart", "digest")) {
- if (!multipart_contains_message_parts (CAMEL_MULTIPART (wrapper)))
- return NULL;
- }
-
- folder = CAMEL_FOLDER (camel_object_new (camel_digest_folder_get_type ()));
- digest_folder = CAMEL_DIGEST_FOLDER (folder);
-
- camel_folder_construct (folder, parent_store, "folder_name", "short_name");
-
- camel_object_ref (message);
- digest_folder->priv->message = message;
-
- construct_summary (folder, CAMEL_MULTIPART (wrapper));
-
- return folder;
-}
-
-static void
-digest_refresh_info (CamelFolder *folder, CamelException *ex)
-{
-
-}
-
-static void
-digest_sync (CamelFolder *folder, gboolean expunge, CamelException *ex)
-{
- /* no-op */
-}
-
-static void
-digest_expunge (CamelFolder *folder, CamelException *ex)
-{
- /* no-op */
-}
-
-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, char **appended_uid,
- CamelException *ex)
-{
- /* no-op */
- if (appended_uid)
- *appended_uid = NULL;
-}
-
-static void
-digest_transfer_messages_to (CamelFolder *source, GPtrArray *uids,
- CamelFolder *dest, GPtrArray **transferred_uids,
- gboolean delete_originals, CamelException *ex)
-{
- /* no-op */
- if (transferred_uids)
- *transferred_uids = NULL;
-}
-
-static CamelMimeMessage *
-digest_get_message (CamelFolder *folder, const char *uid, CamelException *ex)
-{
- CamelDigestFolder *digest = CAMEL_DIGEST_FOLDER (folder);
- CamelDataWrapper *wrapper;
- CamelMimeMessage *message;
- CamelMimePart *part;
- char *subuid;
- int id;
-
- part = CAMEL_MIME_PART (digest->priv->message);
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (part));
-
- do {
- id = strtoul (uid, &subuid, 10);
- if (!CAMEL_IS_MULTIPART (wrapper))
- return NULL;
-
- part = camel_multipart_get_part (CAMEL_MULTIPART (wrapper), id);
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (part));
- uid = subuid + 1;
- } while (*subuid == '.');
-
- if (!CAMEL_IS_MIME_MESSAGE (wrapper))
- return NULL;
-
- message = CAMEL_MIME_MESSAGE (wrapper);
- camel_object_ref (message);
-
- return message;
-}
-
-
-static GPtrArray *
-digest_search_by_expression (CamelFolder *folder, const char *expression, CamelException *ex)
-{
- CamelDigestFolder *df = (CamelDigestFolder *) folder;
- CamelFolderSearch *search;
- GPtrArray *summary, *matches;
-
- summary = camel_folder_get_summary (folder);
-
- CAMEL_DIGEST_FOLDER_LOCK (folder, search_lock);
-
- if (!df->priv->search)
- df->priv->search = camel_folder_search_new ();
-
- search = df->priv->search;
- camel_folder_search_set_folder (search, folder);
- camel_folder_search_set_summary (search, summary);
-
- matches = camel_folder_search_execute_expression (search, expression, ex);
-
- CAMEL_DIGEST_FOLDER_UNLOCK (folder, search_lock);
-
- camel_folder_free_summary (folder, summary);
-
- return matches;
-}
-
-static GPtrArray *
-digest_search_by_uids (CamelFolder *folder, const char *expression, GPtrArray *uids, CamelException *ex)
-{
- CamelDigestFolder *df = (CamelDigestFolder *) folder;
- CamelFolderSearch *search;
- GPtrArray *summary, *matches;
- int i;
-
- summary = g_ptr_array_new ();
- for (i = 0; i < uids->len; i++) {
- CamelMessageInfo *info;
-
- info = camel_folder_get_message_info (folder, uids->pdata[i]);
- if (info)
- g_ptr_array_add (summary, info);
- }
-
- if (summary->len == 0)
- return summary;
-
- CAMEL_DIGEST_FOLDER_LOCK (folder, search_lock);
-
- if (!df->priv->search)
- df->priv->search = camel_folder_search_new ();
-
- search = df->priv->search;
- camel_folder_search_set_folder (search, folder);
- camel_folder_search_set_summary (search, summary);
-
- matches = camel_folder_search_execute_expression (search, expression, ex);
-
- CAMEL_DIGEST_FOLDER_UNLOCK (folder, search_lock);
-
- for (i = 0; i < summary->len; i++)
- camel_folder_free_message_info (folder, summary->pdata[i]);
- g_ptr_array_free (summary, TRUE);
-
- return matches;
-}
-
-static void
-digest_search_free (CamelFolder *folder, GPtrArray *result)
-{
- CamelDigestFolder *digest_folder = CAMEL_DIGEST_FOLDER (folder);
-
- CAMEL_DIGEST_FOLDER_LOCK (folder, search_lock);
-
- camel_folder_search_free_result (digest_folder->priv->search, result);
-
- CAMEL_DIGEST_FOLDER_UNLOCK (folder, search_lock);
-}
diff --git a/camel/camel-digest-folder.h b/camel/camel-digest-folder.h
deleted file mode 100644
index 1035930f56..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_DIGEST_FOLDER_H
-#define _CAMEL_DIGEST_FOLDER_H
-
-#include <glib.h>
-#include <camel/camel-store.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 _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 (CamelStore *parent_store, CamelMimeMessage *message);
-
-#endif /* ! _CAMEL_DIGEST_FOLDER_H */
diff --git a/camel/camel-digest-store.c b/camel/camel-digest-store.c
deleted file mode 100644
index 833593ac9f..0000000000
--- a/camel/camel-digest-store.c
+++ /dev/null
@@ -1,203 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2002 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-exception.h"
-#include "camel-digest-store.h"
-#include "camel-digest-folder.h"
-
-#include "camel-private.h"
-
-#define d(x)
-
-static CamelFolder *digest_get_folder (CamelStore *store, const char *folder_name, guint32 flags, CamelException *ex);
-static void digest_delete_folder (CamelStore *store, const char *folder_name, CamelException *ex);
-static void digest_rename_folder (CamelStore *store, const char *old, const char *new, CamelException *ex);
-static void digest_init_trash (CamelStore *store);
-static CamelFolder *digest_get_trash (CamelStore *store, CamelException *ex);
-static void digest_init_junk (CamelStore *store);
-static CamelFolder *digest_get_junk (CamelStore *store, CamelException *ex);
-
-static CamelFolderInfo *digest_get_folder_info (CamelStore *store, const char *top, guint32 flags, CamelException *ex);
-
-static void camel_digest_store_class_init (CamelDigestStoreClass *klass);
-static void camel_digest_store_init (CamelDigestStore *obj);
-static void camel_digest_store_finalise (CamelObject *obj);
-
-static int digest_setv (CamelObject *object, CamelException *ex, CamelArgV *args);
-static int digest_getv (CamelObject *object, CamelException *ex, CamelArgGetV *args);
-
-static CamelStoreClass *parent_class = NULL;
-
-
-CamelType
-camel_digest_store_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_store_get_type (),
- "CamelDigestStore",
- sizeof (CamelDigestStore),
- sizeof (CamelDigestStoreClass),
- (CamelObjectClassInitFunc) camel_digest_store_class_init,
- NULL,
- (CamelObjectInitFunc) camel_digest_store_init,
- (CamelObjectFinalizeFunc) camel_digest_store_finalise);
- }
-
- return type;
-}
-
-static void
-camel_digest_store_class_init (CamelDigestStoreClass *klass)
-{
- CamelObjectClass *object_class = (CamelObjectClass *) klass;
- CamelStoreClass *store_class = (CamelStoreClass *) klass;
-
- parent_class = CAMEL_STORE_CLASS(camel_type_get_global_classfuncs (camel_store_get_type ()));
-
- /* virtual method overload */
- object_class->setv = digest_setv;
- object_class->getv = digest_getv;
-
- store_class->get_folder = digest_get_folder;
- store_class->rename_folder = digest_rename_folder;
- store_class->delete_folder = digest_delete_folder;
- store_class->get_folder_info = digest_get_folder_info;
- store_class->free_folder_info = camel_store_free_folder_info_full;
-
- store_class->init_trash = digest_init_trash;
- store_class->get_trash = digest_get_trash;
- store_class->init_junk = digest_init_junk;
- store_class->get_junk = digest_get_junk;
-}
-
-static void
-camel_digest_store_init (CamelDigestStore *obj)
-{
- CamelStore *store = (CamelStore *) obj;
-
- /* we dont want a vtrash and vjunk on this one */
- store->flags &= ~(CAMEL_STORE_VTRASH | CAMEL_STORE_VJUNK);
-}
-
-static void
-camel_digest_store_finalise (CamelObject *obj)
-{
-
-}
-
-static int
-digest_setv (CamelObject *object, CamelException *ex, CamelArgV *args)
-{
- /* CamelDigestStore doesn't currently have anything to set */
- return CAMEL_OBJECT_CLASS (parent_class)->setv (object, ex, args);
-}
-
-static int
-digest_getv (CamelObject *object, CamelException *ex, CamelArgGetV *args)
-{
- /* CamelDigestStore doesn't currently have anything to get */
- return CAMEL_OBJECT_CLASS (parent_class)->getv (object, ex, args);
-}
-
-
-/**
- * camel_digest_store_new:
- * @url:
- *
- * Create a new CamelDigestStore object.
- *
- * Return value: A new CamelDigestStore widget.
- **/
-CamelStore *
-camel_digest_store_new (const char *url)
-{
- CamelStore *store;
- CamelURL *uri;
-
- uri = camel_url_new (url, NULL);
- if (!uri)
- return NULL;
-
- store = CAMEL_STORE (camel_object_new (camel_digest_store_get_type ()));
- CAMEL_SERVICE (store)->url = uri;
-
- return store;
-}
-
-static CamelFolder *
-digest_get_folder (CamelStore *store, const char *folder_name, guint32 flags, CamelException *ex)
-{
- return NULL;
-}
-
-static void
-digest_init_trash (CamelStore *store)
-{
- /* no-op */
- ;
-}
-
-static CamelFolder *
-digest_get_trash (CamelStore *store, CamelException *ex)
-{
- return NULL;
-}
-
-static void
-digest_init_junk (CamelStore *store)
-{
- /* no-op */
- ;
-}
-
-static CamelFolder *
-digest_get_junk (CamelStore *store, CamelException *ex)
-{
- return NULL;
-}
-
-static CamelFolderInfo *
-digest_get_folder_info (CamelStore *store, const char *top, guint32 flags, CamelException *ex)
-{
- return NULL;
-}
-
-static void
-digest_delete_folder (CamelStore *store, const char *folder_name, CamelException *ex)
-{
-
-}
-
-static void
-digest_rename_folder (CamelStore *store, const char *old, const char *new, CamelException *ex)
-{
-
-}
diff --git a/camel/camel-digest-store.h b/camel/camel-digest-store.h
deleted file mode 100644
index 90e802f09f..0000000000
--- a/camel/camel-digest-store.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 2002 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_STORE_H__
-#define __CAMEL_DIGEST_STORE_H__
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <glib.h>
-#include <camel/camel-store.h>
-
-#define CAMEL_DIGEST_STORE(obj) CAMEL_CHECK_CAST (obj, camel_digest_store_get_type (), CamelDigestStore)
-#define CAMEL_DIGEST_STORE_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_digest_store_get_type (), CamelDigestStoreClass)
-#define CAMEL_IS_DIGEST_STORE(obj) CAMEL_CHECK_TYPE (obj, camel_digest_store_get_type ())
-
-typedef struct _CamelDigestStoreClass CamelDigestStoreClass;
-
-struct _CamelDigestStore {
- CamelStore parent;
-
-};
-
-struct _CamelDigestStoreClass {
- CamelStoreClass parent_class;
-
-};
-
-CamelType camel_digest_store_get_type (void);
-
-CamelStore *camel_digest_store_new (const char *url);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __CAMEL_DIGEST_STORE_H__ */
diff --git a/camel/camel-digest-summary.c b/camel/camel-digest-summary.c
deleted file mode 100644
index f17867e083..0000000000
--- a/camel/camel-digest-summary.c
+++ /dev/null
@@ -1,90 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2002 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-summary.h"
-
-#define CAMEL_DIGEST_SUMMARY_VERSION 0
-
-static void camel_digest_summary_class_init (CamelDigestSummaryClass *klass);
-static void camel_digest_summary_init (CamelDigestSummary *obj);
-static void camel_digest_summary_finalise (CamelObject *obj);
-
-
-static CamelFolderSummaryClass *parent_class = NULL;
-
-
-CamelType
-camel_digest_summary_get_type(void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (
- camel_folder_summary_get_type (),
- "CamelDigestSummary",
- sizeof (CamelDigestSummary),
- sizeof (CamelDigestSummaryClass),
- (CamelObjectClassInitFunc) camel_digest_summary_class_init,
- NULL,
- (CamelObjectInitFunc) camel_digest_summary_init,
- (CamelObjectFinalizeFunc) camel_digest_summary_finalise);
- }
-
- return type;
-}
-
-static void
-camel_digest_summary_class_init (CamelDigestSummaryClass *klass)
-{
- parent_class = CAMEL_FOLDER_SUMMARY_CLASS (camel_type_get_global_classfuncs (camel_folder_summary_get_type ()));
-}
-
-static void
-camel_digest_summary_init (CamelDigestSummary *summary)
-{
- CamelFolderSummary *s = (CamelFolderSummary *) summary;
-
- /* 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_DIGEST_SUMMARY_VERSION;
-}
-
-static void
-camel_digest_summary_finalise (CamelObject *object)
-{
-
-}
-
-
-CamelFolderSummary *
-camel_digest_summary_new (void)
-{
- return (CamelFolderSummary *) camel_object_new (camel_digest_summary_get_type ());
-}
diff --git a/camel/camel-digest-summary.h b/camel/camel-digest-summary.h
deleted file mode 100644
index 16bf5e5c9f..0000000000
--- a/camel/camel-digest-summary.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 2002 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_SUMMARY_H__
-#define __CAMEL_DIGEST_SUMMARY_H__
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <camel/camel-folder-summary.h>
-#include <camel/camel-folder.h>
-#include <camel/camel-exception.h>
-
-#define CAMEL_DIGEST_SUMMARY(obj) CAMEL_CHECK_CAST (obj, camel_digest_summary_get_type (), CamelDigestSummary)
-#define CAMEL_DIGEST_SUMMARY_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_digest_summary_get_type (), CamelDigestSummaryClass)
-#define CAMEL_IS_DIGEST_SUMMARY(obj) CAMEL_CHECK_TYPE (obj, camel_digest_summary_get_type ())
-
-typedef struct _CamelDigestSummary CamelDigestSummary;
-typedef struct _CamelDigestSummaryClass CamelDigestSummaryClass;
-
-struct _CamelDigestSummary {
- CamelFolderSummary parent_object;
-
-};
-
-struct _CamelDigestSummaryClass {
- CamelFolderSummaryClass parent_class;
-
-};
-
-
-CamelType camel_digest_summary_get_type (void);
-
-CamelFolderSummary *camel_digest_summary_new (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __CAMEL_DIGEST_SUMMARY_H__ */
diff --git a/camel/camel-disco-diary.c b/camel/camel-disco-diary.c
deleted file mode 100644
index 927a97f432..0000000000
--- a/camel/camel-disco-diary.c
+++ /dev/null
@@ -1,436 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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
-
-#define __USE_LARGEFILE 1
-#include <stdio.h>
-#include <errno.h>
-
-#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"
-
-
-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_TRANSFER:
- {
- CamelFolder *source = va_arg (ap, CamelFolder *);
- CamelFolder *destination = va_arg (ap, CamelFolder *);
- GPtrArray *uids = va_arg (ap, GPtrArray *);
- gboolean delete_originals = va_arg (ap, gboolean);
-
- 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);
- if (status == -1)
- break;
- status = camel_file_util_encode_uint32 (diary->file, delete_originals);
- 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, *ret_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, &ret_uid, ex);
- camel_folder_free_message_info (folder, info);
-
- if (ret_uid) {
- camel_disco_diary_uidmap_add (diary, uid, ret_uid);
- g_free (ret_uid);
- }
- g_free (uid);
-
- break;
- }
-
- case CAMEL_DISCO_DIARY_FOLDER_TRANSFER:
- {
- CamelFolder *source, *destination;
- GPtrArray *uids, *ret_uids;
- guint32 delete_originals;
- int i;
-
- source = diary_decode_folder (diary);
- destination = diary_decode_folder (diary);
- uids = diary_decode_uids (diary);
- if (!uids)
- goto lose;
- if (camel_file_util_decode_uint32 (diary->file, &delete_originals) == -1)
- goto lose;
-
- if (!source || !destination) {
- free_uids (uids);
- continue;
- }
-
- camel_folder_transfer_messages_to (source, uids, destination, &ret_uids, delete_originals, ex);
-
- if (ret_uids) {
- for (i = 0; i < uids->len; i++) {
- if (!ret_uids->pdata[i])
- continue;
- camel_disco_diary_uidmap_add (diary, uids->pdata[i], ret_uids->pdata[i]);
- g_free (ret_uids->pdata[i]);
- }
- g_ptr_array_free (ret_uids, TRUE);
- }
- 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 (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 b177d8ef6f..0000000000
--- a/camel/camel-disco-diary.h
+++ /dev/null
@@ -1,98 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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_TRANSFER,
-} 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 61e825020c..0000000000
--- a/camel/camel-disco-folder.c
+++ /dev/null
@@ -1,399 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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"
-
-#include "camel-session.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, char **appended_uid, CamelException *ex);
-static void disco_transfer_messages_to (CamelFolder *source, GPtrArray *uids,
- CamelFolder *destination,
- GPtrArray **transferred_uids,
- gboolean delete_originals,
- 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->transfer_messages_to = disco_transfer_messages_to;
-}
-
-struct _cdf_sync_msg {
- CamelSessionThreadMsg msg;
-
- CamelFolder *folder;
- CamelFolderChangeInfo *changes;
-};
-
-static void
-cdf_sync_offline(CamelSession *session, CamelSessionThreadMsg *mm)
-{
- struct _cdf_sync_msg *m = (struct _cdf_sync_msg *)mm;
- int i;
-
- camel_operation_start(NULL, _("Downloading new messages for offline mode"));
-
- if (m->changes) {
- for (i=0;i<m->changes->uid_added->len;i++) {
- int pc = i * 100 / m->changes->uid_added->len;
-
- camel_operation_progress(NULL, pc);
- camel_disco_folder_cache_message((CamelDiscoFolder *)m->folder,
- m->changes->uid_added->pdata[i],
- &mm->ex);
- }
- } else {
- camel_disco_folder_prepare_for_offline((CamelDiscoFolder *)m->folder,
- "(match-all)",
- &mm->ex);
- }
-
- camel_operation_end(NULL);
-}
-
-static void
-cdf_sync_free(CamelSession *session, CamelSessionThreadMsg *mm)
-{
- struct _cdf_sync_msg *m = (struct _cdf_sync_msg *)mm;
-
- if (m->changes)
- camel_folder_change_info_free(m->changes);
- camel_object_unref(m->folder);
-}
-
-static CamelSessionThreadOps cdf_sync_ops = {
- cdf_sync_offline,
- cdf_sync_free,
-};
-
-static void
-cdf_folder_changed(CamelFolder *folder, CamelFolderChangeInfo *changes, void *dummy)
-{
- if (changes->uid_added->len > 0
- && camel_url_get_param(((CamelService *)folder->parent_store)->url, "offline_sync")) {
- CamelSession *session = ((CamelService *)folder->parent_store)->session;
- struct _cdf_sync_msg *m;
-
- m = camel_session_thread_msg_new(session, &cdf_sync_ops, sizeof(*m));
- m->changes = camel_folder_change_info_new();
- camel_folder_change_info_cat(m->changes, changes);
- m->folder = folder;
- camel_object_ref(folder);
- camel_session_thread_queue(session, &m->msg, 0);
- }
-}
-
-static void
-camel_disco_folder_init(CamelDiscoFolder *folder)
-{
- camel_object_hook_event(folder, "folder_changed", (CamelObjectEventHookFunc)cdf_folder_changed, NULL);
-}
-
-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,
- (CamelObjectInitFunc)camel_disco_folder_init, 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, char **appended_uid,
- 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,
- appended_uid, ex);
- break;
-
- case CAMEL_DISCO_STORE_OFFLINE:
- CDF_CLASS (folder)->append_offline (folder, message, info,
- appended_uid, ex);
- break;
-
- case CAMEL_DISCO_STORE_RESYNCING:
- CDF_CLASS (folder)->append_resyncing (folder, message, info,
- appended_uid, ex);
- break;
- }
-}
-
-static void
-disco_transfer_messages_to (CamelFolder *source, GPtrArray *uids,
- CamelFolder *dest, GPtrArray **transferred_uids,
- gboolean delete_originals, CamelException *ex)
-{
- CamelDiscoStore *disco = CAMEL_DISCO_STORE (source->parent_store);
-
- switch (camel_disco_store_status (disco)) {
- case CAMEL_DISCO_STORE_ONLINE:
- CDF_CLASS (source)->transfer_online (source, uids,
- dest, transferred_uids,
- delete_originals, ex);
- break;
-
- case CAMEL_DISCO_STORE_OFFLINE:
- CDF_CLASS (source)->transfer_offline (source, uids,
- dest, transferred_uids,
- delete_originals, ex);
- break;
-
- case CAMEL_DISCO_STORE_RESYNCING:
- CDF_CLASS (source)->transfer_resyncing (source, uids,
- dest, transferred_uids,
- delete_originals, 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;
-
- camel_operation_start(NULL, _("Preparing folder '%s' for offline"), folder->full_name);
-
- if (expression)
- uids = camel_folder_search_by_expression (folder, expression, ex);
- else
- uids = camel_folder_get_uids (folder);
-
- if (!uids) {
- camel_operation_end(NULL);
- return;
- }
-
- for (i = 0; i < uids->len; i++) {
- int pc = i * 100 / uids->len;
-
- camel_disco_folder_cache_message (disco_folder, uids->pdata[i], ex);
- camel_operation_progress(NULL, pc);
- if (camel_exception_is_set (ex))
- break;
- }
-
- if (expression)
- camel_folder_search_free (folder, uids);
- else
- camel_folder_free_uids (folder, uids);
-
- camel_operation_end(NULL);
-}
-
-/**
- * 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 0d857c0b9b..0000000000
--- a/camel/camel-disco-folder.h
+++ /dev/null
@@ -1,121 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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,
- char **appended_uid,
- CamelException *ex);
- void (*append_offline) (CamelFolder *folder,
- CamelMimeMessage *message,
- const CamelMessageInfo *info,
- char **appended_uid,
- CamelException *ex);
- void (*append_resyncing) (CamelFolder *folder,
- CamelMimeMessage *message,
- const CamelMessageInfo *info,
- char **appended_uid,
- CamelException *ex);
-
- void (*transfer_online) (CamelFolder *source, GPtrArray *uids,
- CamelFolder *destination,
- GPtrArray **transferred_uids,
- gboolean delete_originals,
- CamelException *ex);
- void (*transfer_offline) (CamelFolder *source, GPtrArray *uids,
- CamelFolder *destination,
- GPtrArray **transferred_uids,
- gboolean delete_originals,
- CamelException *ex);
- void (*transfer_resyncing) (CamelFolder *source, GPtrArray *uids,
- CamelFolder *destination,
- GPtrArray **transferred_uids,
- gboolean delete_originals,
- 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 7afff575b1..0000000000
--- a/camel/camel-disco-store.c
+++ /dev/null
@@ -1,373 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-disco-store.c: abstract class for a disconnectable 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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-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 CamelStoreClass *parent_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 int disco_setv (CamelObject *object, CamelException *ex, CamelArgV *args);
-static int disco_getv (CamelObject *object, CamelException *ex, CamelArgGetV *args);
-
-static void
-camel_disco_store_class_init (CamelDiscoStoreClass *camel_disco_store_class)
-{
- CamelObjectClass *camel_object_class =
- CAMEL_OBJECT_CLASS (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);
-
- parent_class = CAMEL_STORE_CLASS (camel_type_get_global_classfuncs (camel_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_object_class->setv = disco_setv;
- camel_object_class->getv = disco_getv;
-
- 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_STORE_TYPE,
- "CamelDiscoStore",
- sizeof (CamelDiscoStore),
- sizeof (CamelDiscoStoreClass),
- (CamelObjectClassInitFunc) camel_disco_store_class_init,
- NULL,
- NULL,
- NULL);
- }
-
- return camel_disco_store_type;
-}
-
-static int
-disco_setv (CamelObject *object, CamelException *ex, CamelArgV *args)
-{
- /* CamelDiscoStore doesn't currently have anything to set */
- return CAMEL_OBJECT_CLASS (parent_class)->setv (object, ex, args);
-}
-
-static int
-disco_getv (CamelObject *object, CamelException *ex, CamelArgGetV *args)
-{
- /* CamelDiscoStore doesn't currently have anything to get */
- return CAMEL_OBJECT_CLASS (parent_class)->getv (object, ex, args);
-}
-
-static void
-disco_construct (CamelService *service, CamelSession *session,
- CamelProvider *provider, CamelURL *url,
- CamelException *ex)
-{
- CamelDiscoStore *disco = CAMEL_DISCO_STORE (service);
-
- CAMEL_SERVICE_CLASS (parent_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 (parent_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 (parent_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 (parent_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)
-{
- CamelService *service = CAMEL_SERVICE (store);
-
- g_return_val_if_fail (CAMEL_IS_DISCO_STORE (store), CAMEL_DISCO_STORE_ONLINE);
-
- if (service->status == CAMEL_SERVICE_CONNECTING &&
- store->status == CAMEL_DISCO_STORE_ONLINE &&
- !camel_session_is_online (service->session))
- store->status = CAMEL_DISCO_STORE_OFFLINE;
-
- 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 7c95c96456..0000000000
--- a/camel/camel-disco-store.h
+++ /dev/null
@@ -1,125 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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/camel-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))
-
-enum {
- CAMEL_DISCO_STORE_ARG_FIRST = CAMEL_STORE_ARG_FIRST + 100,
-};
-
-typedef enum {
- CAMEL_DISCO_STORE_ONLINE,
- CAMEL_DISCO_STORE_OFFLINE,
- CAMEL_DISCO_STORE_RESYNCING
-} CamelDiscoStoreStatus;
-
-struct _CamelDiscoStore {
- CamelStore parent_object;
-
- CamelDiscoStoreStatus status;
- CamelDiscoDiary *diary;
-};
-
-
-typedef struct {
- CamelStoreClass 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 95e376624a..0000000000
--- a/camel/camel-exception.c
+++ /dev/null
@@ -1,306 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- *
- * Author :
- * Bertrand Guiheneuf <bertrand@helixcode.com>
- *
- * Copyright 1999-2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <pthread.h>
-
-#include "camel-exception.h"
-#include "e-util/e-memory.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 */
-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))
-
-static EMemChunk *exception_chunks = NULL;
-
-/**
- * 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;
-
- CAMEL_EXCEPTION_LOCK(exception);
-
- if (exception_chunks == NULL)
- exception_chunks = e_memchunk_new(16, sizeof(CamelException));
-
- ex = e_memchunk_alloc(exception_chunks);
- ex->desc = NULL;
-
- /* set the Exception Id to NULL */
- ex->id = CAMEL_EXCEPTION_NONE;
-
- CAMEL_EXCEPTION_UNLOCK(exception);
-
- 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);
-
- CAMEL_EXCEPTION_LOCK(exception);
-
- e_memchunk_free(exception_chunks, exception);
-
- CAMEL_EXCEPTION_UNLOCK(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 (desc != 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;
- char *old;
-
- if (!ex)
- return;
-
- CAMEL_EXCEPTION_LOCK(exception);
-
- old = ex->desc;
-
- va_start(args, format);
- ex->desc = g_strdup_vprintf (format, args);
- va_end (args);
-
- g_free (old);
-
- 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 77c2c16066..0000000000
--- a/camel/camel-exception.h
+++ /dev/null
@@ -1,87 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 540fef2739..0000000000
--- a/camel/camel-file-utils.c
+++ /dev/null
@@ -1,546 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Authors:
- * Michael Zucchi <notzed@ximian.com>
- * Jeffrey Stedfast <fejj@ximian.com>
- * Dan Winship <danw@ximian.com>
- *
- * Copyright (C) 2000, 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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/stat.h>
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-
-#include "camel-file-utils.h"
-#include "camel-operation.h"
-#include "camel-url.h"
-
-#ifndef MAX
-#define MAX(a,b) ((a) > (b) ? (a) : (b))
-#endif
-
-
-/**
- * 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 i = sizeof (time_t) - 1;
- int v = EOF;
-
- 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 i = sizeof(off_t) - 1;
- int v = EOF;
-
- 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, 1);
-
- 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;
-}
-
-
-/**
- * camel_mkdir:
- * @path: directory path to create
- * @mode: permissions
- *
- * Creates the directory path described in @path, creating any parent
- * directories as necessary.
- *
- * Returns 0 on success or -1 on fail. In the case of failure, errno
- * will be set appropriately.
- **/
-int
-camel_mkdir (const char *path, mode_t mode)
-{
- char *copy, *p;
-
- g_assert(path && path[0] == '/');
-
- p = copy = g_alloca (strlen (path) + 1);
- strcpy(copy, path);
- do {
- p = strchr(p + 1, '/');
- if (p)
- *p = '\0';
- if (access(copy, F_OK) == -1) {
- if (mkdir(copy, mode) == -1)
- return -1;
- }
- if (p)
- *p = '/';
- } while (p);
-
- return 0;
-}
-
-
-/**
- * camel_file_util_safe_filename:
- * @name: string to 'flattened' into a safe filename
- *
- * 'Flattens' @name into a safe filename string by hex encoding any
- * chars that may cause problems on the filesystem.
- *
- * Returns a safe filename string.
- **/
-char *
-camel_file_util_safe_filename (const char *name)
-{
- if (name == NULL)
- return NULL;
-
- return camel_url_encode(name, "/?()'*");
-}
-
-
-/* FIXME: poll() might be more efficient and more portable? */
-
-/**
- * camel_read:
- * @fd: file descriptor
- * @buf: buffer to fill
- * @n: number of bytes to read into @buf
- *
- * Cancellable libc read() replacement.
- *
- * Returns number of bytes read or -1 on fail. On failure, errno will
- * be set appropriately.
- **/
-ssize_t
-camel_read (int fd, char *buf, size_t n)
-{
- ssize_t nread;
- int cancel_fd;
-
- if (camel_operation_cancel_check (NULL)) {
- errno = EINTR;
- return -1;
- }
-
- cancel_fd = camel_operation_cancel_fd (NULL);
- if (cancel_fd == -1) {
- do {
- nread = read (fd, buf, n);
- } while (nread == -1 && (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK));
- } else {
- int errnosav, flags, fdmax;
- fd_set rdset;
-
- flags = fcntl (fd, F_GETFL);
- fcntl (fd, F_SETFL, flags | O_NONBLOCK);
-
- do {
- FD_ZERO (&rdset);
- FD_SET (fd, &rdset);
- FD_SET (cancel_fd, &rdset);
- fdmax = MAX (fd, cancel_fd) + 1;
-
- nread = -1;
- if (select (fdmax, &rdset, 0, 0, NULL) != -1) {
- if (FD_ISSET (cancel_fd, &rdset)) {
- fcntl (fd, F_SETFL, flags);
- errno = EINTR;
- return -1;
- }
-
- do {
- nread = read (fd, buf, n);
- } while (nread == -1 && errno == EINTR);
- } else if (errno == EINTR) {
- errno = EAGAIN;
- }
- } while (nread == -1 && (errno == EAGAIN || errno == EWOULDBLOCK));
-
- errnosav = errno;
- fcntl (fd, F_SETFL, flags);
- errno = errnosav;
- }
-
- return nread;
-}
-
-
-/**
- * camel_write:
- * @fd: file descriptor
- * @buf: buffer to write
- * @n: number of bytes of @buf to write
- *
- * Cancellable libc write() replacement.
- *
- * Returns number of bytes written or -1 on fail. On failure, errno will
- * be set appropriately.
- **/
-ssize_t
-camel_write (int fd, const char *buf, size_t n)
-{
- 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 {
- do {
- w = write (fd, buf + written, n - written);
- } while (w == -1 && (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK));
-
- if (w > 0)
- written += w;
- } while (w != -1 && written < n);
- } else {
- int errnosav, flags, fdmax;
- fd_set rdset, wrset;
-
- flags = fcntl (fd, F_GETFL);
- fcntl (fd, F_SETFL, flags | O_NONBLOCK);
-
- fdmax = MAX (fd, cancel_fd) + 1;
- do {
- FD_ZERO (&rdset);
- FD_ZERO (&wrset);
- FD_SET (fd, &wrset);
- FD_SET (cancel_fd, &rdset);
-
- w = -1;
- if (select (fdmax, &rdset, &wrset, 0, NULL) != -1) {
- if (FD_ISSET (cancel_fd, &rdset)) {
- fcntl (fd, F_SETFL, flags);
- errno = EINTR;
- return -1;
- }
-
- do {
- w = write (fd, buf + written, n - written);
- } while (w == -1 && errno == EINTR);
-
- if (w == -1) {
- if (errno == EAGAIN || errno == EWOULDBLOCK) {
- w = 0;
- } else {
- errnosav = errno;
- fcntl (fd, F_SETFL, flags);
- errno = errnosav;
- return -1;
- }
- } else
- written += w;
- } else if (errno == EINTR) {
- w = 0;
- }
- } while (w != -1 && written < n);
-
- errnosav = errno;
- fcntl (fd, F_SETFL, flags);
- errno = errnosav;
- }
-
- if (w == -1)
- return -1;
-
- return written;
-}
-
-/**
- * camel_file_util_savename:
- * @filename:
- *
- * Builds a filename of the form ".#" + @filename, used to create
- * a two-stage commit file write.
- *
- * Return value: ".#" + filename. It must be free'd with g_free().
- **/
-char *
-camel_file_util_savename(const char *filename)
-{
- char *name, *slash;
- int off;
-
- name = g_malloc(strlen(filename)+3);
- slash = strrchr(filename, '/');
- if (slash) {
- off = slash-filename;
-
- memcpy(name, filename, off+1);
- memcpy(name + off+1, ".#", 2);
- strcpy(name + off+3, filename+off+1);
- } else {
- sprintf(name, ".#%s", filename);
- }
-
- return name;
-}
diff --git a/camel/camel-file-utils.h b/camel/camel-file-utils.h
deleted file mode 100644
index 15022d99b3..0000000000
--- a/camel/camel-file-utils.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>
- * Jeffrey Stedfast <fejj@ximian.com>
- * Dan Winship <danw@ximian.com>
- *
- * Copyright (C) 2000, 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 **);
-
-int camel_mkdir (const char *path, mode_t mode);
-char *camel_file_util_safe_filename (const char *name);
-
-ssize_t camel_read (int fd, char *buf, size_t n);
-ssize_t camel_write (int fd, const char *buf, size_t n);
-
-char *camel_file_util_savename(const char *filename);
-
-#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 1282188eb0..0000000000
--- a/camel/camel-filter-driver.c
+++ /dev/null
@@ -1,1473 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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/stat.h>
-#include <sys/wait.h>
-#include <signal.h>
-#include <fcntl.h>
-#include <errno.h>
-
-#include <string.h>
-#include <time.h>
-
-#include <glib.h>
-
-#include "camel-filter-driver.h"
-#include "camel-filter-search.h"
-
-#include "camel-service.h"
-#include "camel-stream-fs.h"
-#include "camel-stream-mem.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 */
-
- CamelSession *session;
-
- CamelFolder *defaultfolder; /* defualt folder */
-
- CamelFilterStatusFunc *statusfunc; /* status callback */
- void *statusdata; /* status callback data */
-
- CamelFilterShellFunc *shellfunc; /* execute shell command callback */
- void *shelldata; /* execute shell command callback data */
-
- CamelFilterPlaySoundFunc *playfunc; /* play-sound command callback */
- void *playdata; /* play-sound command callback data */
-
- CamelFilterSystemBeepFunc *beep; /* system beep callback */
- void *beepdata; /* system beep 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 */
- GHashTable *only_once; /* actions to run only-once */
-
- 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 */
- gboolean modified; /* has the input message been modified? */
-
- 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 *set_flag (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *);
-static ESExpResult *unset_flag (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *);
-static ESExpResult *do_shell (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *);
-static ESExpResult *do_beep (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *);
-static ESExpResult *play_sound (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *);
-static ESExpResult *do_only_once (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *);
-static ESExpResult *pipe_message (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 *) set_flag, 0 },
- { "unset-system-flag", (ESExpFunc *) unset_flag, 0 },
- { "pipe-message", (ESExpFunc *) pipe_message, 0 },
- { "shell", (ESExpFunc *) do_shell, 0 },
- { "beep", (ESExpFunc *) do_beep, 0 },
- { "play-sound", (ESExpFunc *) play_sound, 0 },
- { "only-once", (ESExpFunc *) do_only_once, 0 }
-};
-
-static CamelObjectClass *camel_filter_driver_parent;
-
-CamelType
-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);
-
- p->only_once = 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);
-
- g_hash_table_foreach (p->only_once, free_hash_strings, driver);
- g_hash_table_destroy (p->only_once);
-
- e_sexp_unref(p->eval);
-
- if (p->defaultfolder) {
- camel_folder_thaw (p->defaultfolder);
- camel_object_unref (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);
- }
-
- camel_object_unref(p->session);
-
- g_free (p);
-}
-
-/**
- * camel_filter_driver_new:
- *
- * Return value: A new CamelFilterDriver object
- **/
-CamelFilterDriver *
-camel_filter_driver_new (CamelSession *session)
-{
- CamelFilterDriver *d = (CamelFilterDriver *)camel_object_new(camel_filter_driver_get_type());
-
- d->priv->session = session;
- camel_object_ref((CamelObject *)session);
-
- return d;
-}
-
-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_shell_func (CamelFilterDriver *d, CamelFilterShellFunc *func, void *data)
-{
- struct _CamelFilterDriverPrivate *p = _PRIVATE (d);
-
- p->shellfunc = func;
- p->shelldata = data;
-}
-
-void
-camel_filter_driver_set_play_sound_func (CamelFilterDriver *d, CamelFilterPlaySoundFunc *func, void *data)
-{
- struct _CamelFilterDriverPrivate *p = _PRIVATE (d);
-
- p->playfunc = func;
- p->playdata = data;
-}
-
-void
-camel_filter_driver_set_system_beep_func (CamelFilterDriver *d, CamelFilterSystemBeepFunc *func, void *data)
-{
- struct _CamelFilterDriverPrivate *p = _PRIVATE (d);
-
- p->beep = func;
- p->beepdata = 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 (p->defaultfolder);
- }
-
- p->defaultfolder = def;
-
- if (p->defaultfolder) {
- camel_folder_freeze (p->defaultfolder);
- camel_object_ref (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);
-}
-
-int
-camel_filter_driver_remove_rule_by_name (CamelFilterDriver *d, const char *name)
-{
- struct _CamelFilterDriverPrivate *p = _PRIVATE (d);
- struct _filter_rule *node;
-
- node = (struct _filter_rule *) p->rules.head;
- while (node->next) {
- if (!strcmp (node->name, name)) {
- e_dlist_remove ((EDListNode *) node);
- g_free (node->match);
- g_free (node->action);
- g_free (node->name);
- g_free (node);
-
- return 0;
- }
-
- node = node->next;
- }
-
- return -1;
-}
-
-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 (outbox == p->source)
- break;
-
- if (!p->modified && 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_transfer_messages_to (p->source, uids, outbox, NULL, FALSE, p->ex);
- g_ptr_array_free (uids, TRUE);
- } else {
- if (p->message == NULL)
- p->message = camel_folder_get_message (p->source, p->uid, p->ex);
-
- if (!p->message)
- continue;
-
- camel_folder_append_message (outbox, p->message, p->info, NULL, 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->modified && 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_transfer_messages_to (p->source, uids, outbox, NULL, FALSE, p->ex);
- g_ptr_array_free (uids, TRUE);
- } else {
- if (p->message == NULL)
- p->message = camel_folder_get_message (p->source, p->uid, p->ex);
-
- if (!p->message)
- continue;
-
- camel_folder_append_message (outbox, p->message, p->info, NULL, 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_has_summary_capability (p->source))
- 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_has_summary_capability (p->source))
- 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 *
-set_flag (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
-{
- struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
- guint32 flags;
-
- d(fprintf (stderr, "setting flag\n"));
- if (argc == 1 && argv[0]->type == ESEXP_RES_STRING) {
- flags = camel_system_flag (argv[0]->value.string);
- if (p->source && p->uid && camel_folder_has_summary_capability (p->source))
- camel_folder_set_message_flags (p->source, p->uid, flags, ~0);
- else
- p->info->flags |= flags | CAMEL_MESSAGE_FOLDER_FLAGGED;
- camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Set %s flag", argv[0]->value.string);
- }
-
- return NULL;
-}
-
-static ESExpResult *
-unset_flag (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
-{
- struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
- guint32 flags;
-
- d(fprintf (stderr, "unsetting flag\n"));
- if (argc == 1 && argv[0]->type == ESEXP_RES_STRING) {
- flags = camel_system_flag (argv[0]->value.string);
- if (p->source && p->uid && camel_folder_has_summary_capability (p->source))
- camel_folder_set_message_flags (p->source, p->uid, flags, 0);
- else
- p->info->flags = (p->info->flags & ~flags) | CAMEL_MESSAGE_FOLDER_FLAGGED;
- camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Unset %s flag", argv[0]->value.string);
- }
-
- return NULL;
-}
-
-static int
-pipe_to_system (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
-{
- struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
- int result, status, fds[4], i;
- CamelMimeMessage *message = NULL;
- CamelMimeParser *parser;
- CamelStream *stream, *mem;
- pid_t pid;
-
- if (argc < 1 || argv[0]->value.string[0] == '\0')
- return 0;
-
- /* make sure we have the message... */
- if (p->message == NULL) {
- if (!(p->message = camel_folder_get_message (p->source, p->uid, p->ex)))
- return -1;
- }
-
- for (i = 0; i < 4; i++)
- fds[i] = -1;
-
- for (i = 0; i < 4; i += 2) {
- if (pipe (fds + i) == -1) {
- camel_exception_setv (p->ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to create pipe to '%s': %s"),
- argv[0]->value.string, g_strerror (errno));
-
- for (i = 0; i < 4; i++) {
- if (fds[i] == -1)
- break;
- close (fds[i]);
- }
-
- return -1;
- }
- }
-
- if (!(pid = fork ())) {
- /* child process */
- GPtrArray *args;
- int maxfd, fd;
-
- fd = open ("/dev/null", O_WRONLY);
-
- if (dup2 (fds[0], STDIN_FILENO) < 0 ||
- dup2 (fds[3], STDOUT_FILENO) < 0 ||
- dup2 (fd, STDERR_FILENO) < 0)
- _exit (255);
-
- setsid ();
-
- maxfd = sysconf (_SC_OPEN_MAX);
- for (fd = 3; fd < maxfd; fd++)
- fcntl (fd, F_SETFD, FD_CLOEXEC);
-
- args = g_ptr_array_new ();
- for (i = 0; i < argc; i++)
- g_ptr_array_add (args, argv[i]->value.string);
- g_ptr_array_add (args, NULL);
-
- execvp (argv[0]->value.string, (char **) args->pdata);
-
- g_ptr_array_free (args, TRUE);
-
- d(printf ("Could not execute %s: %s\n", argv[0]->value.string, g_strerror (errno)));
- _exit (255);
- } else if (pid < 0) {
- camel_exception_setv (p->ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to create create child process '%s': %s"),
- argv[0]->value.string, g_strerror (errno));
- return -1;
- }
-
- /* parent process */
- close (fds[0]);
- close (fds[3]);
-
- stream = camel_stream_fs_new_with_fd (fds[1]);
- if (camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (p->message), stream) == -1) {
- camel_object_unref (stream);
- close (fds[2]);
- goto wait;
- }
-
- if (camel_stream_flush (stream) == -1) {
- camel_object_unref (stream);
- close (fds[2]);
- goto wait;
- }
-
- camel_object_unref (stream);
-
- stream = camel_stream_fs_new_with_fd (fds[2]);
- mem = camel_stream_mem_new ();
- if (camel_stream_write_to_stream (stream, mem) == -1) {
- camel_object_unref (stream);
- camel_object_unref (mem);
- goto wait;
- }
-
- camel_object_unref (stream);
- camel_stream_reset (mem);
-
- parser = camel_mime_parser_new ();
- camel_mime_parser_init_with_stream (parser, mem);
- camel_mime_parser_scan_from (parser, FALSE);
- camel_object_unref (mem);
-
- message = camel_mime_message_new ();
- if (camel_mime_part_construct_from_parser ((CamelMimePart *) message, parser) == -1) {
- camel_exception_setv (p->ex, CAMEL_EXCEPTION_SYSTEM,
- _("Invalid message stream received from %s: %s"),
- argv[0]->value.string,
- g_strerror (camel_mime_parser_errno (parser)));
- camel_object_unref (message);
- message = NULL;
- } else {
- camel_object_unref (p->message);
- p->message = message;
- p->modified = TRUE;
- }
-
- camel_object_unref (parser);
-
- wait:
-
- result = waitpid (pid, &status, 0);
-
- if (result == -1 && errno == EINTR) {
- /* child process is hanging... */
- kill (pid, SIGTERM);
- sleep (1);
- result = waitpid (pid, &status, WNOHANG);
- if (result == 0) {
- /* ...still hanging, set phasers to KILL */
- kill (pid, SIGKILL);
- sleep (1);
- result = waitpid (pid, &status, WNOHANG);
- }
- }
-
- if (message && result != -1 && WIFEXITED (status))
- return WEXITSTATUS (status);
- else
- return -1;
-}
-
-static ESExpResult *
-pipe_message (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
-{
- int i;
-
- /* make sure all args are strings */
- for (i = 0; i < argc; i++) {
- if (argv[i]->type != ESEXP_RES_STRING)
- return NULL;
- }
-
- camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Piping message to %s", argv[0]->value.string);
- pipe_to_system (f, argc, argv, driver);
-
- return NULL;
-}
-
-static ESExpResult *
-do_shell (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
-{
- struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
- GString *command;
- GPtrArray *args;
- int i;
-
- d(fprintf (stderr, "executing shell command\n"));
-
- command = g_string_new ("");
-
- args = g_ptr_array_new ();
-
- /* make sure all args are strings */
- for (i = 0; i < argc; i++) {
- if (argv[i]->type != ESEXP_RES_STRING)
- goto done;
-
- g_ptr_array_add (args, argv[i]->value.string);
-
- g_string_append (command, argv[i]->value.string);
- g_string_append_c (command, ' ');
- }
-
- g_string_truncate (command, command->len - 1);
-
- if (p->shellfunc && argc >= 1) {
- p->shellfunc (driver, argc, (char **) args->pdata, p->shelldata);
- camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Executing shell command: [%s]",
- command->str);
- }
-
- done:
-
- g_ptr_array_free (args, TRUE);
- g_string_free (command, TRUE);
-
- return NULL;
-}
-
-static ESExpResult *
-do_beep (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
-{
- struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
-
- d(fprintf (stderr, "beep\n"));
-
- if (p->beep) {
- p->beep (driver, p->beepdata);
- camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Beep");
- }
-
- return NULL;
-}
-
-static ESExpResult *
-play_sound (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
-{
- struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
-
- d(fprintf (stderr, "play sound\n"));
-
- if (p->playfunc && argc == 1 && argv[0]->type == ESEXP_RES_STRING) {
- p->playfunc (driver, argv[0]->value.string, p->playdata);
- camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Play sound");
- }
-
- return NULL;
-}
-
-static ESExpResult *
-do_only_once (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
-{
- struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
-
- d(fprintf (stderr, "only once\n"));
-
- if (argc == 2 && !g_hash_table_lookup (p->only_once, argv[0]->value.string))
- g_hash_table_insert (p->only_once, g_strdup (argv[0]->value.string),
- g_strdup (argv[1]->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 (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;
- const char *from = NULL;
- char date[50];
- time_t t;
-
- /* FIXME: does this need locking? Probably */
-
- from = camel_message_info_from (p->info);
- subject = camel_message_info_subject (p->info);
-
- 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, from ? from : "unknown", subject ? subject : "", date);
-
- 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);
- }
-}
-
-
-struct _run_only_once {
- CamelFilterDriver *driver;
- CamelException *ex;
-};
-
-static gboolean
-run_only_once (gpointer key, char *action, struct _run_only_once *data)
-{
- struct _CamelFilterDriverPrivate *p = _PRIVATE (data->driver);
- CamelException *ex = data->ex;
- ESExpResult *r;
-
- d(printf ("evaluating: %s\n\n", action));
-
- e_sexp_input_text (p->eval, action, strlen (action));
- if (e_sexp_parse (p->eval) == -1) {
- if (!camel_exception_is_set (ex))
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Error parsing filter: %s: %s"),
- e_sexp_error (p->eval), action);
- goto done;
- }
-
- r = e_sexp_eval (p->eval);
- if (r == NULL) {
- if (!camel_exception_is_set (ex))
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Error executing filter: %s: %s"),
- e_sexp_error (p->eval), action);
- goto done;
- }
-
- e_sexp_result_free (p->eval, r);
-
- done:
-
- g_free (key);
- g_free (action);
-
- return TRUE;
-}
-
-
-/**
- * camel_filter_driver_flush:
- * @driver:
- * @ex:
- *
- * Flush all of the only-once filter actions.
- **/
-void
-camel_filter_driver_flush (CamelFilterDriver *driver, CamelException *ex)
-{
- struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
- struct _run_only_once data;
-
- if (!p->only_once)
- return;
-
- data.driver = driver;
- data.ex = ex;
-
- g_hash_table_foreach_remove (p->only_once, (GHRFunc) run_only_once, &data);
-}
-
-/**
- * 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;
- int ret = -1;
-
- 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) == CAMEL_MIME_PARSER_STATE_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) {
- camel_exception_set (ex, (errno==EINTR)?CAMEL_EXCEPTION_USER_CANCEL:CAMEL_EXCEPTION_SYSTEM, _("Cannot open message"));
- report_status (driver, CAMEL_FILTER_STATUS_END, 100, _("Failed on message %d"), i);
- camel_object_unref (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 (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, camel_exception_is_set (ex) ? NULL : ex);
- }
-
- report_status (driver, CAMEL_FILTER_STATUS_END, 100, _("Complete"));
-
- ret = 0;
-fail:
- g_free (source_url);
- if (fd != -1)
- close (fd);
- if (mp)
- camel_object_unref (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);
- gboolean freeuids = FALSE;
- CamelMessageInfo *info;
- char *source_url, *service_url;
- int status = 0;
- CamelURL *url;
- int i;
-
- service_url = camel_service_get_url (CAMEL_SERVICE (camel_folder_get_parent_store (folder)));
- url = camel_url_new (service_url, NULL);
- g_free (service_url);
-
- source_url = camel_url_to_string (url, CAMEL_URL_HIDE_ALL);
- camel_url_free (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);
-
- 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, NULL, 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]);
- }
-
- 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;
-}
-
-
-struct _get_message {
- struct _CamelFilterDriverPrivate *p;
- const char *source_url;
-};
-
-
-static CamelMimeMessage *
-get_message_cb (void *data, CamelException *ex)
-{
- struct _get_message *msgdata = data;
- struct _CamelFilterDriverPrivate *p = msgdata->p;
- const char *source_url = msgdata->source_url;
- CamelMimeMessage *message;
-
- if (p->message) {
- message = p->message;
- camel_object_ref (message);
- } else {
- const char *uid;
-
- if (p->uid)
- uid = p->uid;
- else
- uid = camel_message_info_uid (p->info);
-
- message = camel_folder_get_message (p->source, uid, ex);
- }
-
- if (source_url && message && camel_mime_message_get_source (message) == NULL)
- camel_mime_message_set_source (message, source_url);
-
- return message;
-}
-
-/**
- * camel_filter_driver_filter_message:
- * @driver: CamelFilterDriver
- * @message: message to filter or NULL
- * @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;
-
- /* FIXME: make me into a g_return_if_fail/g_assert or whatever... */
- if (message == NULL && (source == NULL || uid == NULL)) {
- g_warning ("there is no way to fetch the message using the information provided...");
- return -1;
- }
-
- if (info == NULL) {
- struct _camel_header_raw *h;
-
- if (message) {
- camel_object_ref (message);
- } else {
- message = camel_folder_get_message (source, uid, ex);
- if (!message)
- return -1;
- }
-
- 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;
-
- uid = camel_message_info_uid (info);
-
- if (message)
- camel_object_ref (message);
- }
-
- 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 (message && 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) {
- struct _get_message data;
-
- d(fprintf (stderr, "applying rule %s\naction %s\n", node->match, node->action));
-
- data.p = p;
- data.source_url = original_source_url;
-
- result = camel_filter_search_match (p->session, get_message_cb, &data, 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_has_summary_capability (p->source))
- 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->modified && 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_transfer_messages_to (p->source, uids, p->defaultfolder, NULL, FALSE, p->ex);
- g_ptr_array_free (uids, TRUE);
- } else {
- if (p->message == NULL) {
- p->message = camel_folder_get_message (source, uid, ex);
- if (!p->message)
- goto error;
- }
-
- camel_folder_append_message (p->defaultfolder, p->message, p->info, NULL, p->ex);
- }
- }
-
- if (p->message)
- camel_object_unref (p->message);
-
- if (freeinfo)
- camel_message_info_free (info);
-
- return 0;
-
- error:
- if (filtered)
- camel_filter_driver_log (driver, FILTER_LOG_END, NULL);
-
- if (p->message)
- camel_object_unref (p->message);
-
- 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 8295859cb0..0000000000
--- a/camel/camel-filter-driver.h
+++ /dev/null
@@ -1,119 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#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_TYPE, CamelFilterDriver)
-#define CAMEL_FILTER_DRIVER_CLASS(klass) CAMEL__CHECK_CLASS_CAST (klass, CAMEL_FILTER_DRIVER_TYPE, CamelFilterDriverClass)
-#define CAMEL_IS_FILTER_DRIVER(obj) CAMEL_CHECK_TYPE (obj, CAMEL_FILTER_DRIVER_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 *driver, 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);
-
-typedef void (CamelFilterShellFunc) (CamelFilterDriver *driver, int argc, char **argv, void *data);
-typedef void (CamelFilterPlaySoundFunc) (CamelFilterDriver *driver, const char *filename, void *data);
-typedef void (CamelFilterSystemBeepFunc) (CamelFilterDriver *driver, void *data);
-
-CamelType camel_filter_driver_get_type (void);
-CamelFilterDriver *camel_filter_driver_new (CamelSession *);
-
-/* modifiers */
-void camel_filter_driver_set_logfile (CamelFilterDriver *d, FILE *logfile);
-
-void camel_filter_driver_set_status_func (CamelFilterDriver *d, CamelFilterStatusFunc *func, void *data);
-void camel_filter_driver_set_shell_func (CamelFilterDriver *d, CamelFilterShellFunc *func, void *data);
-void camel_filter_driver_set_play_sound_func (CamelFilterDriver *d, CamelFilterPlaySoundFunc *func, void *data);
-void camel_filter_driver_set_system_beep_func (CamelFilterDriver *d, CamelFilterSystemBeepFunc *func, void *data);
-void camel_filter_driver_set_folder_func (CamelFilterDriver *d, CamelFilterGetFolderFunc fetcher, 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);
-int camel_filter_driver_remove_rule_by_name (CamelFilterDriver *d, const char *name);
-
-/*void camel_filter_driver_set_global(CamelFilterDriver *, const char *name, const char *value);*/
-
-void camel_filter_driver_flush (CamelFilterDriver *driver, CamelException *ex);
-
-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
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* ! _CAMEL_FILTER_DRIVER_H */
diff --git a/camel/camel-filter-search.c b/camel/camel-filter-search.c
deleted file mode 100644
index 53fe074b10..0000000000
--- a/camel/camel-filter-search.c
+++ /dev/null
@@ -1,703 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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
-
-/* (from glibc headers:
- POSIX says that <sys/types.h> must be included (by the caller) before <regex.h>. */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <regex.h>
-#include <string.h>
-#include <unistd.h>
-#include <ctype.h>
-#include <fcntl.h>
-#include <errno.h>
-
-#include <signal.h>
-#include <sys/wait.h>
-
-#include <e-util/e-sexp.h>
-
-#include <gal/util/e-iconv.h>
-
-#include "camel-mime-message.h"
-#include "camel-provider.h"
-#include "camel-session.h"
-#include "camel-filter-search.h"
-#include "camel-exception.h"
-#include "camel-multipart.h"
-#include "camel-stream-mem.h"
-#include "camel-stream-fs.h"
-#include "camel-search-private.h"
-
-#include "camel-url.h"
-
-#define d(x)
-
-typedef struct {
- CamelSession *session;
- CamelFilterSearchGetMessageFunc get_message;
- void *get_message_data;
- 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 *header_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);
-static ESExpResult *pipe_message (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *junk_test (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 },
- { "header-source", (ESExpFunc *) header_source, 0 },
- { "get-size", (ESExpFunc *) get_size, 0 },
- { "pipe-message", (ESExpFunc *) pipe_message, 0 },
- { "junk-test", (ESExpFunc *) junk_test, 0 },
-};
-
-
-static CamelMimeMessage *
-camel_filter_search_get_message (FilterMessageSearch *fms, struct _ESExp *sexp)
-{
- if (fms->message)
- return fms->message;
-
- fms->message = fms->get_message (fms->get_message_data, fms->ex);
-
- if (fms->message == NULL)
- e_sexp_fatal_error (sexp, _("Failed to retrieve message"));
-
- return fms->message;
-}
-
-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_MLIST;
- } else {
- CamelMimeMessage *message = camel_filter_search_get_message (fms, f);
-
- header = camel_medium_get_header (CAMEL_MEDIUM (message), argv[0]->value.string);
- /* FIXME: what about Resent-To, Resent-Cc and Resent-From? */
- 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 (message));
- if (ct) {
- charset = camel_content_type_param (ct, "charset");
- charset = e_iconv_charset_name (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)
-{
- CamelMimeMessage *message;
- gboolean matched = FALSE;
- ESExpResult *r;
- int i;
-
- message = camel_filter_search_get_message (fms, f);
-
- for (i = 0; i < argc && !matched; i++) {
- if (argv[i]->type == ESEXP_RES_STRING)
- matched = camel_medium_get_header (CAMEL_MEDIUM (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);
- CamelMimeMessage *message;
- regex_t pattern;
- const char *contents;
-
- message = camel_filter_search_get_message (fms, f);
-
- if (argc > 1 && argv[0]->type == ESEXP_RES_STRING
- && (contents = camel_medium_get_header (CAMEL_MEDIUM (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 _camel_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);
- g_string_append_c(str, '\n');
- }
- }
-
- 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);
- CamelMimeMessage *message;
- regex_t pattern;
- char *contents;
-
- if (camel_search_build_match_regex(&pattern, CAMEL_SEARCH_MATCH_REGEX|CAMEL_SEARCH_MATCH_ICASE|CAMEL_SEARCH_MATCH_NEWLINE,
- argc, argv, fms->ex) == 0) {
- message = camel_filter_search_get_message (fms, f);
- contents = get_full_header (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 = TRUE;
-
- 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);
- CamelMimeMessage *message;
- regex_t pattern;
-
- if (camel_search_build_match_regex (&pattern, CAMEL_SEARCH_MATCH_ICASE, argc, argv, fms->ex) == 0) {
- message = camel_filter_search_get_message (fms, f);
- r->value.bool = camel_search_message_body_contains ((CamelDataWrapper *) 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);
- CamelMimeMessage *message;
- regex_t pattern;
-
- if (camel_search_build_match_regex(&pattern, CAMEL_SEARCH_MATCH_ICASE|CAMEL_SEARCH_MATCH_REGEX|CAMEL_SEARCH_MATCH_NEWLINE,
- argc, argv, fms->ex) == 0) {
- message = camel_filter_search_get_message (fms, f);
- r->value.bool = camel_search_message_body_contains ((CamelDataWrapper *) 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;
-
- if (argc != 1 || argv[0]->type != ESEXP_RES_STRING)
- e_sexp_fatal_error(f, _("Invalid arguments to (system-flag)"));
-
- r = e_sexp_result_new (f, ESEXP_RES_BOOL);
- r->value.bool = camel_system_flag_get (fms->info->flags, argv[0]->value.string);
-
- return r;
-}
-
-static ESExpResult *
-user_tag (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- ESExpResult *r;
- const char *tag;
-
- if (argc != 1 || argv[0]->type != ESEXP_RES_STRING)
- e_sexp_fatal_error(f, _("Invalid arguments to (user-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)
-{
- CamelMimeMessage *message;
- ESExpResult *r;
-
- message = camel_filter_search_get_message (fms, f);
- r = e_sexp_result_new (f, ESEXP_RES_INT);
- r->value.number = camel_mime_message_get_date (message, NULL);
-
- return r;
-}
-
-static ESExpResult *
-get_received_date (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- CamelMimeMessage *message;
- ESExpResult *r;
-
- message = camel_filter_search_get_message (fms, f);
- r = e_sexp_result_new (f, ESEXP_RES_INT);
- r->value.number = camel_mime_message_get_date_received (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 *
-header_source (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- CamelMimeMessage *message;
- ESExpResult *r;
- const char *src;
- int truth = FALSE, i;
- CamelProvider *provider;
- CamelURL *uria, *urib;
-
- if (fms->source) {
- src = fms->source;
- } else {
- message = camel_filter_search_get_message(fms, f);
- src = camel_mime_message_get_source(message);
- }
-
- if (src
- && (provider = camel_session_get_provider(fms->session, src, NULL))
- && provider->url_equal) {
- uria = camel_url_new(src, NULL);
- if (uria) {
- for (i=0;i<argc && !truth;i++) {
- if (argv[i]->type == ESEXP_RES_STRING
- && (urib = camel_url_new(argv[i]->value.string, NULL))) {
- truth = provider->url_equal(uria, urib);
- camel_url_free(urib);
- }
- }
- camel_url_free(uria);
- }
- }
-
- r = e_sexp_result_new(f, ESEXP_RES_BOOL);
- r->value.bool = truth;
-
- 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;
-}
-
-static int
-run_command (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- CamelMimeMessage *message;
- CamelStream *stream;
- int result, status;
- int in_fds[2];
- pid_t pid;
-
- if (argc < 1 || argv[0]->value.string[0] == '\0')
- return 0;
-
- if (pipe (in_fds) == -1) {
- camel_exception_setv (fms->ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to create pipe to '%s': %s"),
- argv[0]->value.string, g_strerror (errno));
- return -1;
- }
-
- if (!(pid = fork ())) {
- /* child process */
- GPtrArray *args;
- int maxfd, fd, i;
-
- fd = open ("/dev/null", O_WRONLY);
-
- if (dup2 (in_fds[0], STDIN_FILENO) < 0 ||
- dup2 (fd, STDOUT_FILENO) < 0 ||
- dup2 (fd, STDERR_FILENO) < 0)
- _exit (255);
-
- setsid ();
-
- maxfd = sysconf (_SC_OPEN_MAX);
- for (fd = 3; fd < maxfd; fd++)
- fcntl (fd, F_SETFD, FD_CLOEXEC);
-
- args = g_ptr_array_new ();
- for (i = 0; i < argc; i++)
- g_ptr_array_add (args, argv[i]->value.string);
- g_ptr_array_add (args, NULL);
-
- execvp (argv[0]->value.string, (char **) args->pdata);
-
- g_ptr_array_free (args, TRUE);
-
- d(printf ("Could not execute %s: %s\n", argv[0]->value.string, g_strerror (errno)));
- _exit (255);
- } else if (pid < 0) {
- camel_exception_setv (fms->ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to create create child process '%s': %s"),
- argv[0]->value.string, g_strerror (errno));
- return -1;
- }
-
- /* parent process */
- close (in_fds[0]);
-
- message = camel_filter_search_get_message (fms, f);
-
- stream = camel_stream_fs_new_with_fd (in_fds[1]);
- camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), stream);
- camel_stream_flush (stream);
- camel_object_unref (stream);
-
- result = waitpid (pid, &status, 0);
-
- if (result == -1 && errno == EINTR) {
- /* child process is hanging... */
- kill (pid, SIGTERM);
- sleep (1);
- result = waitpid (pid, &status, WNOHANG);
- if (result == 0) {
- /* ...still hanging, set phasers to KILL */
- kill (pid, SIGKILL);
- sleep (1);
- result = waitpid (pid, &status, WNOHANG);
- }
- }
-
- if (result != -1 && WIFEXITED (status))
- return WEXITSTATUS (status);
- else
- return -1;
-}
-
-static ESExpResult *
-pipe_message (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- ESExpResult *r;
- int retval, i;
-
- /* make sure all args are strings */
- for (i = 0; i < argc; i++) {
- if (argv[i]->type != ESEXP_RES_STRING) {
- retval = -1;
- goto done;
- }
- }
-
- retval = run_command (f, argc, argv, fms);
-
- done:
- r = e_sexp_result_new (f, ESEXP_RES_INT);
- r->value.number = retval;
-
- return r;
-}
-
-static ESExpResult *
-junk_test (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- ESExpResult *r;
- gboolean retval = FALSE;
-
- if (fms->session->junk_plugin != NULL) {
- retval = camel_junk_plugin_check_junk (fms->session->junk_plugin, camel_filter_search_get_message (fms, f));
-
- fprintf (stderr, "junk filter => %s\n", retval ? "*JUNK*" : "clean");
- }
- r = e_sexp_result_new (f, ESEXP_RES_BOOL);
- r->value.number = retval;
-
- return r;
-}
-
-
-/**
- * camel_filter_search_match:
- * @session:
- * @get_message: function to retrieve the message if necessary
- * @data: data for above
- * @info:
- * @source:
- * @expression:
- * @ex:
- *
- * Returns one of CAMEL_SEARCH_MATCHED, CAMEL_SEARCH_NOMATCH, or CAMEL_SEARCH_ERROR.
- **/
-int
-camel_filter_search_match (CamelSession *session,
- CamelFilterSearchGetMessageFunc get_message, void *data,
- CamelMessageInfo *info, const char *source,
- const char *expression, CamelException *ex)
-{
- FilterMessageSearch fms;
- ESExp *sexp;
- ESExpResult *result;
- gboolean retval;
- int i;
-
- fms.session = session;
- fms.get_message = get_message;
- fms.get_message_data = data;
- fms.message = NULL;
- 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);
-
- if (fms.message)
- camel_object_unref (fms.message);
-
- return retval;
-
- error:
- if (fms.message)
- camel_object_unref (fms.message);
-
- 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 51b988362f..0000000000
--- a/camel/camel-filter-search.h
+++ /dev/null
@@ -1,54 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_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,
-};
-
-typedef CamelMimeMessage * (*CamelFilterSearchGetMessageFunc) (void *data, CamelException *ex);
-
-int camel_filter_search_match (CamelSession *session,
- CamelFilterSearchGetMessageFunc get_message, void *data,
- 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 8262ee3c3a..0000000000
--- a/camel/camel-folder-search.c
+++ /dev/null
@@ -1,1174 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2003 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 "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_get_size(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->get_size = search_get_size;
- 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);
- if (search->summary_hash)
- g_hash_table_destroy(search->summary_hash);
-
- 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 },
- { "get-size", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, get_size), 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)));
- 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)
-{
- int i;
-
- search->summary = summary;
- if (search->summary_hash)
- g_hash_table_destroy(search->summary_hash);
- search->summary_hash = g_hash_table_new(g_str_hash, g_str_equal);
- for (i=0;i<summary->len;i++)
- g_hash_table_insert(search->summary_hash, (char *)camel_message_info_uid(summary->pdata[i]), summary->pdata[i]);
-}
-
-/**
- * camel_folder_search_set_body_index:
- * @search:
- * @index:
- *
- * Set the index 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, CamelIndex *index)
-{
- if (search->body_index)
- camel_object_unref((CamelObject *)search->body_index);
- search->body_index = index;
- if (index)
- camel_object_ref((CamelObject *)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->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)));
- }
- }
- /* 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 {
- g_warning("Search returned an invalid result type");
- }
-
- e_sexp_result_free(search->sexp, r);
-
- 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->current = (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->current = 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->current) {
- int found = FALSE;
-
- 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");
- }
-
- /* we are only matching a single message? or already inside a match-all? */
- if (search->current) {
- d(printf("matching against 1 message: %s\n", camel_message_info_subject(search->current)));
-
- r = e_sexp_result_new(f, ESEXP_RES_BOOL);
- r->value.bool = FALSE;
-
- if (argc>0) {
- r1 = e_sexp_term_eval(f, argv[0]);
- if (r1->type == ESEXP_RES_BOOL) {
- r->value.bool = r1->value.bool;
- } 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 {
- r->value.bool = TRUE;
- }
- return r;
- }
-
- r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
- r->value.ptrarray = g_ptr_array_new();
-
- if (search->summary == NULL) {
- /* TODO: make it work - e.g. use the folder and so forth for a slower search */
- g_warning("No summary supplied, match-all doesn't work with no summary");
- 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, j;
- camel_search_t type = CAMEL_SEARCH_TYPE_ASIS;
- struct _camel_search_words *words;
-
- /* 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);
- type = CAMEL_SEARCH_TYPE_MLIST;
- } 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) {
- if (argv[i]->value.string[0] == 0) {
- truth = TRUE;
- } else if (how == CAMEL_SEARCH_MATCH_CONTAINS) {
- /* doesn't make sense to split words on anything but contains i.e. we can't have an ending match different words */
- words = camel_search_words_split(argv[i]->value.string);
- truth = TRUE;
- for (j=0;j<words->len && truth;j++) {
- truth = camel_search_header_match(header, words->words[j]->word, how, type, NULL);
- }
- camel_search_words_free(words);
- } else {
- 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);
-}
-
-/* and, only store duplicates */
-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);
-}
-
-static int
-match_message_index(CamelIndex *idx, const char *uid, const char *match, CamelException *ex)
-{
- CamelIndexCursor *wc, *nc;
- const char *word, *name;
- int truth = FALSE;
-
- wc = camel_index_words(idx);
- if (wc) {
- while (!truth && (word = camel_index_cursor_next(wc))) {
- if (camel_ustrstrcase(word,match) != NULL) {
- /* perf: could have the wc cursor return the name cursor */
- nc = camel_index_find(idx, word);
- if (nc) {
- while (!truth && (name = camel_index_cursor_next(nc)))
- truth = strcmp(name, uid) == 0;
- camel_object_unref((CamelObject *)nc);
- }
- }
- }
- camel_object_unref((CamelObject *)wc);
- }
-
- return truth;
-}
-
-/*
- "one two" "three" "four five"
-
- one and two
-or
- three
-or
- four and five
-*/
-
-/* returns messages which contain all words listed in words */
-static GPtrArray *
-match_words_index(CamelFolderSearch *search, struct _camel_search_words *words, CamelException *ex)
-{
- GPtrArray *result = g_ptr_array_new();
- GHashTable *ht = g_hash_table_new(g_str_hash, g_str_equal);
- struct _glib_sux_donkeys lambdafoo;
- CamelIndexCursor *wc, *nc;
- const char *word, *name;
- CamelMessageInfo *mi;
- int i;
-
- /* we can have a maximum of 32 words, as we use it as the AND mask */
-
- wc = camel_index_words(search->body_index);
- if (wc) {
- while ((word = camel_index_cursor_next(wc))) {
- for (i=0;i<words->len;i++) {
- if (camel_ustrstrcase(word, words->words[i]->word) != NULL) {
- /* perf: could have the wc cursor return the name cursor */
- nc = camel_index_find(search->body_index, word);
- if (nc) {
- while ((name = camel_index_cursor_next(nc))) {
- mi = g_hash_table_lookup(search->summary_hash, name);
- if (mi) {
- int mask;
- const char *uid = camel_message_info_uid(mi);
-
- mask = (GPOINTER_TO_INT(g_hash_table_lookup(ht, uid))) | (1<<i);
- g_hash_table_insert(ht, (char *)uid, GINT_TO_POINTER(mask));
- }
- }
- camel_object_unref((CamelObject *)nc);
- }
- }
- }
- }
- camel_object_unref((CamelObject *)wc);
-
- lambdafoo.uids = result;
- lambdafoo.count = (1<<words->len) - 1;
- g_hash_table_foreach(ht, (GHFunc)g_lib_sux_htand, &lambdafoo);
- g_hash_table_destroy(ht);
- }
-
- return result;
-}
-
-static gboolean
-match_words_1message (CamelDataWrapper *object, struct _camel_search_words *words, guint32 *mask)
-{
- CamelDataWrapper *containee;
- int truth = FALSE;
- int parts, i;
-
- containee = camel_medium_get_content_object (CAMEL_MEDIUM (object));
-
- if (containee == NULL)
- return FALSE;
-
- /* 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 = match_words_1message(part, words, mask);
- }
- } else if (CAMEL_IS_MIME_MESSAGE (containee)) {
- /* for messages we only look at its contents */
- truth = match_words_1message((CamelDataWrapper *)containee, words, mask);
- } else if (camel_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 ();
-
- /* FIXME: The match should be part of a stream op */
- camel_data_wrapper_decode_to_stream (containee, CAMEL_STREAM (mem));
- camel_stream_write (CAMEL_STREAM (mem), "", 1);
- for (i=0;i<words->len;i++) {
- /* FIXME: This is horridly slow, and should use a real search algorithm */
- if (camel_ustrstrcase(mem->buffer->data, words->words[i]->word) != NULL) {
- *mask |= (1<<i);
- /* shortcut a match */
- if (*mask == (1<<(words->len))-1)
- return TRUE;
- }
- }
-
- camel_object_unref (mem);
- }
-
- return truth;
-}
-
-static gboolean
-match_words_message(CamelFolder *folder, const char *uid, struct _camel_search_words *words, CamelException *ex)
-{
- guint32 mask;
- CamelMimeMessage *msg;
- int truth;
-
- msg = camel_folder_get_message(folder, uid, ex);
- if (msg) {
- mask = 0;
- truth = match_words_1message((CamelDataWrapper *)msg, words, &mask);
- camel_object_unref((CamelObject *)msg);
- } else {
- camel_exception_clear(ex);
- truth = FALSE;
- }
-
- return truth;
-}
-
-static GPtrArray *
-match_words_messages(CamelFolderSearch *search, struct _camel_search_words *words, CamelException *ex)
-{
- int i;
- GPtrArray *matches = g_ptr_array_new();
-
- if (search->body_index) {
- GPtrArray *indexed;
- struct _camel_search_words *simple;
-
- simple = camel_search_words_simple(words);
- indexed = match_words_index(search, simple, ex);
- camel_search_words_free(simple);
-
- for (i=0;i<indexed->len;i++) {
- const char *uid = g_ptr_array_index(indexed, i);
-
- if (match_words_message(search->folder, uid, words, ex))
- g_ptr_array_add(matches, (char *)uid);
- }
-
- g_ptr_array_free(indexed, TRUE);
- } else {
- for (i=0;i<search->summary->len;i++) {
- CamelMessageInfo *info = g_ptr_array_index(search->summary, i);
- const char *uid = camel_message_info_uid(info);
-
- if (match_words_message(search->folder, uid, words, ex))
- g_ptr_array_add(matches, (char *)uid);
- }
- }
-
- return matches;
-}
-
-static ESExpResult *
-search_body_contains(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search)
-{
- int i, j;
- CamelException *ex = search->priv->ex;
- struct _camel_search_words *words;
- ESExpResult *r;
- struct _glib_sux_donkeys lambdafoo;
-
- if (search->current) {
- int truth = FALSE;
-
- if (argc == 1 && argv[0]->value.string[0] == 0) {
- truth = TRUE;
- } else {
- for (i=0;i<argc && !truth;i++) {
- if (argv[i]->type == ESEXP_RES_STRING) {
- words = camel_search_words_split(argv[i]->value.string);
- truth = TRUE;
- if ((words->type & CAMEL_SEARCH_WORD_COMPLEX) == 0 && search->body_index) {
- for (j=0;j<words->len && truth;j++)
- truth = match_message_index(search->body_index, camel_message_info_uid(search->current), words->words[j]->word, ex);
- } else {
- /* TODO: cache current message incase of multiple body search terms */
- truth = match_words_message(search->folder, camel_message_info_uid(search->current), words, ex);
- }
- camel_search_words_free(words);
- }
- }
- }
- 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();
-
- if (argc == 1 && argv[0]->value.string[0] == 0) {
- 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 {
- GHashTable *ht = g_hash_table_new(g_str_hash, g_str_equal);
- GPtrArray *matches;
-
- for (i=0;i<argc;i++) {
- if (argv[i]->type == ESEXP_RES_STRING) {
- words = camel_search_words_split(argv[i]->value.string);
- if ((words->type & CAMEL_SEARCH_WORD_COMPLEX) == 0 && search->body_index) {
- matches = match_words_index(search, words, ex);
- } else {
- matches = match_words_messages(search, words, ex);
- }
- for (j=0;j<matches->len;j++)
- g_hash_table_insert(ht, matches->pdata[j], matches->pdata[j]);
- g_ptr_array_free(matches, TRUE);
- camel_search_words_free(words);
- }
- }
- lambdafoo.uids = r->value.ptrarray;
- g_hash_table_foreach(ht, (GHFunc)g_lib_sux_htor, &lambdafoo);
- g_hash_table_destroy(ht);
- }
- }
-
- 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)
-{
- const char *value = NULL;
- ESExpResult *r;
-
- r(printf("executing user-tag\n"));
-
- 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 : "");
-
- 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_get_size (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s)
-{
- ESExpResult *r;
-
- r(printf("executing get-size\n"));
-
- /* are we inside a match-all? */
- if (s->current) {
- r = e_sexp_result_new (f, ESEXP_RES_INT);
- r->value.number = s->current->size / 1024;
- } else {
- r = e_sexp_result_new (f, ESEXP_RES_ARRAY_PTR);
- r->value.ptrarray = g_ptr_array_new ();
- }
-
- 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 e4d2253224..0000000000
--- a/camel/camel-folder-search.h
+++ /dev/null
@@ -1,133 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <e-util/e-sexp.h>
-#include <camel/camel-folder.h>
-#include <camel/camel-object.h>
-#include <camel/camel-index.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 */
- GHashTable *summary_hash; /* hashtable of summary items */
- CamelMessageInfo *current; /* current message info, when searching one by one */
- CamelMimeMessage *current_message; /* cache of current message, if required */
- CamelIndex *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);
-
- /* (get-size) Retrieve message size as an int (in kilobytes) */
- ESExpResult * (*get_size)(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);
-};
-
-CamelType 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, CamelIndex *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 *);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* ! _CAMEL_FOLDER_SEARCH_H */
diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c
deleted file mode 100644
index 05b3f3a056..0000000000
--- a/camel/camel-folder-summary.c
+++ /dev/null
@@ -1,2831 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2003 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <pthread.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <ctype.h>
-
-#include <gal/util/e-iconv.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-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 <camel/camel-stream-null.h>
-#include <camel/camel-stream-filter.h>
-
-#include <camel/camel-string-utils.h>
-
-#include "e-util/md5-utils.h"
-#include "e-util/e-memory.h"
-
-#include "camel-private.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)
-
-
-/* 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 _camel_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 _camel_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 (camel_strcase_hash, camel_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);
-
- 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();
-}
-
-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_uu)
- camel_object_unref((CamelObject *)p->filter_uu);
- if (p->filter_save)
- camel_object_unref((CamelObject *)p->filter_save);
- if (p->filter_html)
- camel_object_unref((CamelObject *)p->filter_html);
-
- if (p->filter_stream)
- camel_object_unref((CamelObject *)p->filter_stream);
- if (p->index)
- camel_object_unref((CamelObject *)p->index);
-
- 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);
-
- 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, CamelIndex *index)
-{
- struct _CamelFolderSummaryPrivate *p = _PRIVATE(s);
-
- if (p->index)
- camel_object_unref((CamelObject *)p->index);
-
- p->index = index;
- if (index)
- camel_object_ref((CamelObject *)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, summary_lock);
- CAMEL_SUMMARY_LOCK(s, ref_lock);
-
- if (i<s->messages->len)
- info = g_ptr_array_index(s->messages, i);
-
- if (info)
- info->refcount++;
-
- CAMEL_SUMMARY_UNLOCK(s, ref_lock);
- CAMEL_SUMMARY_UNLOCK(s, summary_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, summary_lock);
- CAMEL_SUMMARY_LOCK(s, ref_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, ref_lock);
- CAMEL_SUMMARY_UNLOCK(s, summary_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, summary_lock);
- CAMEL_SUMMARY_LOCK(s, ref_lock);
-
- info = g_hash_table_lookup(s->messages_uid, uid);
-
- if (info)
- info->refcount++;
-
- CAMEL_SUMMARY_UNLOCK(s, ref_lock);
- CAMEL_SUMMARY_UNLOCK(s, summary_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 {
- d(fprintf (stderr, "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;
-
- if (s->summary_path == NULL)
- return 0;
-
- 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) != 0)
- return -1;
-
- s->flags &= ~CAMEL_SUMMARY_DIRTY;
-
- return 0;
-
-error:
- if (errno != EINVAL)
- g_warning ("Cannot load summary file: `%s': %s", s->summary_path, g_strerror (errno));
-
- 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;
-
- if (((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS (s)))->content_info_save (s, out, ci) == -1)
- return -1;
-
- if (camel_file_util_encode_uint32 (out, my_list_size ((struct _node **)&ci->childs)) == -1)
- return -1;
-
- part = ci->childs;
- while (part) {
- if (perform_content_info_save (s, out, part) == -1)
- return -1;
- 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, i;
- guint32 count;
- CamelMessageInfo *mi;
- char *path;
-
- if (s->summary_path == NULL
- || (s->flags & CAMEL_SUMMARY_DIRTY) == 0)
- return 0;
-
- path = alloca(strlen(s->summary_path)+4);
- sprintf(path, "%s~", s->summary_path);
- fd = open(path, O_RDWR|O_CREAT|O_TRUNC, 0600);
- if (fd == -1)
- return -1;
- out = fdopen(fd, "w");
- if (out == NULL) {
- i = errno;
- unlink(path);
- close(fd);
- errno = i;
- 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)
- goto exception;
-
- /* now write out each message ... */
- /* we check ferorr when done for i/o errors */
- count = s->messages->len;
- for (i = 0; i < count; i++) {
- mi = s->messages->pdata[i];
- if (((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS (s)))->message_info_save (s, out, mi) == -1)
- goto exception;
-
- if (s->build_content) {
- if (perform_content_info_save (s, out, mi->content) == -1)
- goto exception;
- }
- }
-
- if (fflush (out) != 0 || fsync (fileno (out)) == -1)
- goto exception;
-
- fclose (out);
-
- CAMEL_SUMMARY_UNLOCK(s, io_lock);
-
- if (rename(path, s->summary_path) == -1) {
- i = errno;
- unlink(path);
- errno = i;
- return -1;
- }
-
- s->flags &= ~CAMEL_SUMMARY_DIRTY;
- return 0;
-
- exception:
-
- i = errno;
-
- fclose (out);
-
- CAMEL_SUMMARY_UNLOCK(s, io_lock);
-
- unlink (path);
- errno = i;
-
- return -1;
-}
-
-/**
- * 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;
-
- if (s->summary_path == NULL)
- return 0;
-
- 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 int
-summary_assign_uid(CamelFolderSummary *s, CamelMessageInfo *info)
-{
- const char *uid;
- CamelMessageInfo *mi;
-
- 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 ((mi = g_hash_table_lookup(s->messages_uid, uid))) {
- CAMEL_SUMMARY_UNLOCK(s, summary_lock);
- if (mi == info)
- return 0;
- d(printf ("Trying to insert message with clashing uid (%s). new uid re-assigned", camel_message_info_uid(info)));
- 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);
- return 1;
-}
-
-/**
- * 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;
-
- if (summary_assign_uid(s, info) == 0)
- return;
-
- 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 _camel_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 _camel_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;
- size_t len;
- struct _CamelFolderSummaryPrivate *p = _PRIVATE(s);
- off_t start;
- CamelIndexName *name = NULL;
-
- /* 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) != CAMEL_MIME_PARSER_STATE_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_index(p->index);
- camel_index_delete_name(p->index, camel_message_info_uid(info));
- name = camel_index_add_name(p->index, camel_message_info_uid(info));
- camel_mime_filter_index_set_name(p->filter_index, name);
- }
-
- /* always scan the content info, even if we dont save it */
- info->content = summary_build_content_info(s, info, mp);
-
- if (name) {
- camel_index_write_name(p->index, name);
- camel_object_unref((CamelObject *)name);
- camel_mime_filter_index_set_name(p->filter_index, NULL);
- }
-
- 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);
- CamelIndexName *name = NULL;
-
- 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 we need it set for indexing */
- 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_index(p->index);
- camel_index_delete_name(p->index, camel_message_info_uid(info));
- name = camel_index_add_name(p->index, camel_message_info_uid(info));
- camel_mime_filter_index_set_name(p->filter_index, name);
-
- if (p->filter_stream == NULL) {
- CamelStream *null = camel_stream_null_new();
-
- p->filter_stream = camel_stream_filter_new_with_stream(null);
- camel_object_unref((CamelObject *)null);
- }
- }
-
- info->content = summary_build_content_info_message(s, info, (CamelMimePart *)msg);
-
- if (name) {
- camel_index_write_name(p->index, name);
- camel_object_unref((CamelObject *)name);
- camel_mime_filter_index_set_name(p->filter_index, NULL);
- }
-
- CAMEL_SUMMARY_UNLOCK(s, filter_lock);
-
- 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, summary_lock);
- CAMEL_SUMMARY_LOCK(s, ref_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, ref_lock);
- CAMEL_SUMMARY_UNLOCK(s, summary_lock);
- camel_folder_summary_remove(s, oldinfo);
- camel_folder_summary_info_free(s, oldinfo);
- } else {
- CAMEL_SUMMARY_UNLOCK(s, ref_lock);
- CAMEL_SUMMARY_UNLOCK(s, summary_lock);
- }
-}
-
-/**
- * camel_folder_summary_remove_index:
- * @s:
- * @index:
- *
- * Remove a specific info record from the summary, by index.
- **/
-void camel_folder_summary_remove_index(CamelFolderSummary *s, int index)
-{
- CAMEL_SUMMARY_LOCK(s, summary_lock);
- if (index < s->messages->len) {
- CamelMessageInfo *info = s->messages->pdata[index];
-
- g_hash_table_remove(s->messages_uid, camel_message_info_uid(info));
- g_ptr_array_remove_index(s->messages, index);
- s->flags |= CAMEL_SUMMARY_DIRTY;
-
- CAMEL_SUMMARY_UNLOCK(s, summary_lock);
- camel_folder_summary_info_free(s, info);
- } else {
- CAMEL_SUMMARY_UNLOCK(s, summary_lock);
- }
-}
-
-/**
- * camel_folder_summary_remove_range:
- * @s:
- * @start: initial index
- * @end: last index to remove
- *
- * Removes an indexed range of info records.
- **/
-void camel_folder_summary_remove_range(CamelFolderSummary *s, int start, int end)
-{
- if (end < start)
- return;
-
- CAMEL_SUMMARY_LOCK(s, summary_lock);
- if (start < s->messages->len) {
- CamelMessageInfo **infos;
- int i;
-
- end = MIN(end+1, s->messages->len);
- infos = g_malloc((end-start)*sizeof(infos[0]));
-
- for (i=start;i<end;i++) {
- CamelMessageInfo *info = s->messages->pdata[i];
-
- infos[i-start] = info;
- g_hash_table_remove(s->messages_uid, camel_message_info_uid(info));
- }
-
- memmove(s->messages->pdata+start, s->messages->pdata+end, (s->messages->len-end)*sizeof(s->messages->pdata[0]));
- g_ptr_array_set_size(s->messages, s->messages->len - (end - start));
- s->flags |= CAMEL_SUMMARY_DIRTY;
-
- CAMEL_SUMMARY_UNLOCK(s, summary_lock);
-
- for (i=start;i<end;i++)
- camel_folder_summary_info_free(s, infos[i-start]);
- g_free(infos);
- } 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) {
- io(printf ("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 {
- io(printf ("Invalid token encountered: %d", len));
- *str = NULL;
- return -1;
- }
- } else if (len > 10240) {
- io(printf ("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) {
- d(printf ("Summary header version mismatch"));
- errno = EINVAL;
- 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 CAMEL_MIME_PARSER_STATE_HEADER:
- case CAMEL_MIME_PARSER_STATE_MESSAGE:
- case CAMEL_MIME_PARSER_STATE_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 CAMEL_MIME_PARSER_STATE_HEADER:
- case CAMEL_MIME_PARSER_STATE_MESSAGE:
- case CAMEL_MIME_PARSER_STATE_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);
- camel_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 _camel_header_raw *h, const char *name, const char *charset)
-{
- struct _camel_header_address *addr;
- const char *text;
- char *ret;
-
- text = camel_header_raw_find (&h, name, NULL);
- addr = camel_header_address_decode (text, charset);
- if (addr) {
- ret = camel_header_address_list_format (addr);
- camel_header_address_list_clear (&addr);
- } else {
- ret = g_strdup (text);
- }
-
- return ret;
-}
-
-static char *
-summary_format_string (struct _camel_header_raw *h, const char *name, const char *charset)
-{
- const char *text;
-
- text = camel_header_raw_find (&h, name, NULL);
- if (text) {
- while (isspace ((unsigned) *text))
- text++;
- return camel_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 _camel_header_raw *h)
-{
- CamelMessageInfo *mi;
- const char *received;
- guchar digest[16];
- struct _camel_header_references *refs, *irt, *scan;
- char *msgid;
- int count;
- char *subject, *from, *to, *cc, *mlist;
- CamelContentType *ct = NULL;
- const char *content, *charset = NULL;
-
- mi = camel_folder_summary_info_new(s);
-
- if ((content = camel_header_raw_find(&h, "Content-Type", NULL))
- && (ct = camel_content_type_decode(content))
- && (charset = camel_content_type_param(ct, "charset"))
- && (strcasecmp(charset, "us-ascii") == 0))
- charset = NULL;
-
- charset = charset ? e_iconv_charset_name (charset) : NULL;
-
- subject = summary_format_string(h, "subject", charset);
- from = summary_format_address(h, "from", charset);
- to = summary_format_address(h, "to", charset);
- cc = summary_format_address(h, "cc", charset);
- mlist = camel_header_raw_check_mailing_list(&h);
-
- if (ct)
- camel_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 = camel_header_decode_date(camel_header_raw_find(&h, "date", NULL), NULL);
- received = camel_header_raw_find(&h, "received", NULL);
- if (received)
- received = strrchr(received, ';');
- if (received)
- mi->date_received = camel_header_decode_date(received + 1, NULL);
- else
- mi->date_received = 0;
-
- msgid = camel_header_msgid_decode(camel_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);
- }
-
- /* decode our references and in-reply-to headers */
- refs = camel_header_references_decode (camel_header_raw_find (&h, "references", NULL));
- irt = camel_header_references_inreplyto_decode (camel_header_raw_find (&h, "in-reply-to", NULL));
- if (refs || irt) {
- if (irt) {
- /* The References field is populated from the ``References'' and/or ``In-Reply-To''
- headers. If both headers exist, take the first thing in the In-Reply-To header
- that looks like a Message-ID, and append it to the References header. */
-
- if (refs)
- irt->next = refs;
-
- refs = irt;
- }
-
- count = camel_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) {
- 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;
- camel_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;
- if (camel_file_util_decode_string(in, &name) == -1 || name == NULL)
- goto error;
- 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;
- if (camel_file_util_decode_string(in, &name) == -1 || name == NULL
- || camel_file_util_decode_string(in, &value) == -1)
- goto error;
- 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 _camel_header_raw *h)
-{
- CamelMessageContentInfo *ci;
- const char *charset;
-
- ci = camel_folder_summary_content_info_new (s);
-
- charset = e_iconv_locale_charset ();
- ci->id = camel_header_msgid_decode (camel_header_raw_find (&h, "content-id", NULL));
- ci->description = camel_header_decode_string (camel_header_raw_find (&h, "content-description", NULL), NULL);
- ci->encoding = camel_content_transfer_encoding_decode (camel_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;
- CamelContentType *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 = camel_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);
- if (!(name && value))
- goto error;
-
- camel_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)
-{
- CamelContentType *ct;
- struct _camel_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)
-{
- camel_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;
- size_t len;
- char *buffer;
- CamelMessageContentInfo *info = NULL;
- CamelContentType *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 CAMEL_MIME_PARSER_STATE_HEADER:
- /* check content type for indexing, then read body */
- ct = camel_mime_parser_content_type(mp);
- /* update attachments flag as we go */
- if (!camel_content_type_is(ct, "text", "*"))
- msginfo->flags |= CAMEL_MESSAGE_ATTACHMENTS;
-
- if (p->index && camel_content_type_is(ct, "text", "*")) {
- char *encoding;
- const char *charset;
-
- d(printf("generating index:\n"));
-
- encoding = camel_content_transfer_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 if (!strcasecmp (encoding, "x-uuencode")) {
- d(printf(" decoding x-uuencode\n"));
- if (p->filter_uu == NULL)
- p->filter_uu = camel_mime_filter_basic_new_type(CAMEL_MIME_FILTER_BASIC_UU_DEC);
- else
- camel_mime_filter_reset((CamelMimeFilter *)p->filter_uu);
- enc_id = camel_mime_parser_filter_add(mp, (CamelMimeFilter *)p->filter_uu);
- } else {
- d(printf(" ignoring encoding %s\n", encoding));
- }
- g_free(encoding);
- }
-
- charset = camel_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 (camel_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) != CAMEL_MIME_PARSER_STATE_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 CAMEL_MIME_PARSER_STATE_MULTIPART:
- d(printf("Summarising multipart\n"));
- /* update attachments flag as we go */
- ct = camel_mime_parser_content_type(mp);
- if (camel_content_type_is(ct, "multipart", "mixed"))
- msginfo->flags |= CAMEL_MESSAGE_ATTACHMENTS;
-
- while (camel_mime_parser_step(mp, &buffer, &len) != CAMEL_MIME_PARSER_STATE_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 CAMEL_MIME_PARSER_STATE_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 != CAMEL_MIME_PARSER_STATE_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 the filter lock since it uses filters to perform indexing */
-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 (camel_content_type_is(CAMEL_DATA_WRAPPER(containee)->mime_type, "multipart", "*")) {
- if (camel_content_type_is(CAMEL_DATA_WRAPPER(containee)->mime_type, "multipart", "mixed"))
- msginfo->flags |= CAMEL_MESSAGE_ATTACHMENTS;
- } else if (!camel_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->filter_stream
- && camel_content_type_is(CAMEL_DATA_WRAPPER(containee)->mime_type, "text", "*")) {
- int html_id = -1, idx_id = -1;
-
- /* pre-attach html filter if required, otherwise just index filter */
- if (camel_content_type_is(CAMEL_DATA_WRAPPER(containee)->mime_type, "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_stream_filter_add(p->filter_stream, (CamelMimeFilter *)p->filter_html);
- }
- idx_id = camel_stream_filter_add(p->filter_stream, (CamelMimeFilter *)p->filter_index);
-
- camel_data_wrapper_decode_to_stream(containee, (CamelStream *)p->filter_stream);
- camel_stream_flush((CamelStream *)p->filter_stream);
-
- camel_stream_filter_remove(p->filter_stream, idx_id);
- camel_stream_filter_remove(p->filter_stream, html_id);
- }
-
- 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;
-}
-
-/**
- * camel_flag_list_copy:
- * @to:
- * @from:
- *
- * Copy a flag list, return true if the destination list @to changed.
- *
- * Return value:
- **/
-gboolean
-camel_flag_list_copy(CamelFlag **to, CamelFlag **from)
-{
- CamelFlag *flag, *tmp;
- int changed = FALSE;
-
- if (*to == NULL && from == NULL)
- return FALSE;
-
- /* Remove any now-missing flags */
- flag = (CamelFlag *)to;
- while (flag->next) {
- tmp = flag->next;
- if (!camel_flag_get(from, tmp->name)) {
- flag->next = tmp->next;
- g_free(tmp);
- changed = TRUE;
- } else {
- flag = tmp;
- }
- }
-
- /* Add any new flags */
- flag = *from;
- while (flag) {
- changed |= camel_flag_set(to, flag->name, TRUE);
- flag = flag->next;
- }
-
- return changed;
-}
-
-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;
-}
-
-static void
-rem_tag(char *key, char *value, CamelTag **to)
-{
- camel_tag_set(to, key, NULL);
-}
-
-/**
- * camel_tag_list_copy:
- * @to:
- * @from:
- *
- * Copy a list of tags.
- *
- * Return value:
- **/
-gboolean
-camel_tag_list_copy(CamelTag **to, CamelTag **from)
-{
- int changed = FALSE;
- CamelTag *tag;
- GHashTable *left;
-
- if (*to == NULL && from == NULL)
- return FALSE;
-
- left = g_hash_table_new(g_str_hash, g_str_equal);
- tag = *to;
- while (tag) {
- g_hash_table_insert(left, tag->name, tag);
- tag = tag->next;
- }
-
- tag = *from;
- while (tag) {
- changed |= camel_tag_set(to, tag->name, tag->value);
- g_hash_table_remove(left, tag->name);
- tag = tag->next;
- }
-
- if (g_hash_table_size(left)>0) {
- g_hash_table_foreach(left, (GHFunc)rem_tag, to);
- changed = TRUE;
- }
- g_hash_table_destroy(left);
-
- return changed;
-}
-
-/**
- * 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 },
- { "junk", CAMEL_MESSAGE_JUNK },
- { 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 (!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 _camel_header_raw *header)
-{
- CamelMessageInfo *info;
- char *subject, *from, *to, *cc, *mlist;
- CamelContentType *ct = NULL;
- const char *content, *date, *charset = NULL;
-
- if ((content = camel_header_raw_find(&header, "Content-Type", NULL))
- && (ct = camel_content_type_decode(content))
- && (charset = camel_content_type_param(ct, "charset"))
- && (strcasecmp(charset, "us-ascii") == 0))
- charset = NULL;
-
- charset = charset ? e_iconv_charset_name (charset) : NULL;
-
- subject = summary_format_string(header, "subject", charset);
- from = summary_format_address(header, "from", charset);
- to = summary_format_address(header, "to", charset);
- cc = summary_format_address(header, "cc", charset);
- date = camel_header_raw_find(&header, "date", NULL);
- mlist = camel_header_raw_check_mailing_list(&header);
-
- if (ct)
- camel_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);
-
- if (date)
- info->date_sent = camel_header_decode_date (date, NULL);
- else
- info->date_sent = time (NULL);
-
- date = camel_header_raw_find (&header, "received", NULL);
- if (date && (date = strrchr (date, ';')))
- date++;
-
- if (date)
- info->date_received = camel_header_decode_date (date, NULL);
- else
- info->date_received = time (NULL);
-
- 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
-
-
-void
-camel_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;
- }
-
- if (ci->type)
- printf ("%scontent-type: %s/%s\n", p, ci->type->type ? ci->type->type : "(null)",
- ci->type->subtype ? ci->type->subtype : "(null)");
- else
- printf ("%scontent-type: <unset>\n", p);
- printf ("%scontent-transfer-encoding: %s\n", p, ci->encoding ? ci->encoding : "(null)");
- printf ("%scontent-description: %s\n", p, ci->description ? ci->description : "(null)");
- printf ("%ssize: %lu\n", p, (unsigned long) ci->size);
- ci = ci->childs;
- while (ci) {
- camel_content_info_dump (ci, depth + 1);
- ci = ci->next;
- }
-}
-
-void
-camel_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);
- camel_content_info_dump(mi->content, 0);
-}
diff --git a/camel/camel-folder-summary.h b/camel/camel-folder-summary.h
deleted file mode 100644
index e57be75ae1..0000000000
--- a/camel/camel-folder-summary.h
+++ /dev/null
@@ -1,350 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <stdio.h>
-#include <time.h>
-#include <camel/camel-mime-parser.h>
-#include <camel/camel-object.h>
-#include <camel/camel-index.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;
-
- CamelContentType *type;
- char *id;
- char *description;
- char *encoding; /* this should be an enum?? */
- 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,
- CAMEL_MESSAGE_ANSWERED_ALL = 1<<6,
- CAMEL_MESSAGE_JUNK = 1<<7,
-
- /* 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 _camel_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 _camel_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 *);
-};
-
-CamelType 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 *, CamelIndex *);
-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 _camel_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 _camel_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);
-void camel_folder_summary_remove_range(CamelFolderSummary *s, int start, int end);
-/* 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 _camel_header_raw *h, const char *name);
-char *camel_folder_summary_format_string(struct _camel_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);
-gboolean camel_flag_list_copy(CamelFlag **to, CamelFlag **from);
-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);
-gboolean camel_tag_list_copy(CamelTag **to, CamelTag **from);
-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 _camel_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
-
-
-/* debugging functions */
-
-void camel_content_info_dump (CamelMessageContentInfo *ci, int depth);
-
-void camel_message_info_dump (CamelMessageInfo *mi);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* ! _CAMEL_FOLDER_SUMMARY_H */
diff --git a/camel/camel-folder-thread.c b/camel/camel-folder-thread.c
deleted file mode 100644
index a67ab5d5b2..0000000000
--- a/camel/camel-folder-thread.c
+++ /dev/null
@@ -1,861 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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;
-}
-
-/* perform actual threading */
-static void
-thread_summary(CamelFolderThread *thread, GPtrArray *summary)
-{
- GHashTable *id_table, *no_id_table;
- int i;
- CamelFolderThreadNode *c, *child, *head;
-#ifdef TIMEIT
- struct timeval start, end;
- unsigned long diff;
-
- gettimeofday(&start, NULL);
-#endif
-
- 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+1;
- 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 - but only if we are allowing threading by subject */
- if (thread->subject)
- 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
-}
-
-/**
- * camel_folder_thread_messages_new:
- * @folder:
- * @uids: The subset of uid's to thread. If NULL. then thread all
- * uid's in @folder.
- * @thread_subject: thread based on subject also
- *
- * Thread a (subset) of the messages in a folder. And sort the result
- * in summary order.
- *
- * If @thread_subject is %TRUE, messages with
- * related subjects will also be threaded. The default behaviour is to
- * only thread based on message-id.
- *
- * 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, gboolean thread_subject)
-{
- CamelFolderThread *thread;
- GHashTable *wanted = NULL;
- GPtrArray *summary;
- GPtrArray *fsummary;
- int i;
-
- thread = g_malloc(sizeof(*thread));
- thread->refcount = 1;
- thread->subject = thread_subject;
- thread->tree = NULL;
- thread->node_chunks = e_memchunk_new(32, sizeof(CamelFolderThreadNode));
- thread->folder = folder;
- camel_object_ref((CamelObject *)folder);
-
- /* get all of the summary items of interest in summary order */
- 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]);
- }
-
- fsummary = camel_folder_get_summary(folder);
- thread->summary = summary = g_ptr_array_new();
-
- for (i=0;i<fsummary->len;i++) {
- CamelMessageInfo *info = fsummary->pdata[i];
-
- if (wanted == NULL || g_hash_table_lookup(wanted, camel_message_info_uid(info)) != NULL) {
- camel_folder_ref_message_info(folder, info);
- g_ptr_array_add(summary, info);
- }
- }
-
- camel_folder_free_summary(folder, fsummary);
-
- thread_summary(thread, summary);
-
- g_hash_table_destroy(wanted);
-
- return thread;
-}
-
-/* add any still there, in the existing order */
-static void
-add_present_rec(CamelFolderThread *thread, GHashTable *have, GPtrArray *summary, CamelFolderThreadNode *node)
-{
- while (node) {
- const char *uid = camel_message_info_uid(node->message);
-
- if (g_hash_table_lookup(have, (char *)uid)) {
- g_hash_table_remove(have, (char *)camel_message_info_uid(node->message));
- g_ptr_array_add(summary, (void *) node->message);
- } else {
- camel_folder_free_message_info(thread->folder, (CamelMessageInfo *)node->message);
- }
-
- if (node->child)
- add_present_rec(thread, have, summary, node->child);
- node = node->next;
- }
-}
-
-void
-camel_folder_thread_messages_apply(CamelFolderThread *thread, GPtrArray *uids)
-{
- int i;
- GPtrArray *all;
- GHashTable *table;
- CamelMessageInfo *info;
-
- all = g_ptr_array_new();
- table = g_hash_table_new(g_str_hash, g_str_equal);
- for (i=0;i<uids->len;i++)
- g_hash_table_insert(table, uids->pdata[i], uids->pdata[i]);
-
- add_present_rec(thread, table, all, thread->tree);
-
- /* add any new ones, in supplied order */
- for (i=0;i<uids->len;i++)
- if (g_hash_table_lookup(table, uids->pdata[i]) && (info = camel_folder_get_message_info(thread->folder, uids->pdata[i])))
- g_ptr_array_add(all, info);
-
- g_hash_table_destroy(table);
-
- thread->tree = NULL;
- e_memchunk_destroy(thread->node_chunks);
- thread->node_chunks = e_memchunk_new(32, sizeof(CamelFolderThreadNode));
- thread_summary(thread, all);
-
- g_ptr_array_free(thread->summary, TRUE);
- thread->summary = all;
-}
-
-void
-camel_folder_thread_messages_ref(CamelFolderThread *thread)
-{
- thread->refcount++;
-}
-
-/**
- * camel_folder_thread_messages_unref:
- * @thread:
- *
- * Free all memory associated with the thread descriptor @thread.
- **/
-void
-camel_folder_thread_messages_unref(CamelFolderThread *thread)
-{
- if (thread->refcount > 1) {
- thread->refcount--;
- return;
- }
-
- if (thread->folder) {
- int i;
-
- for (i=0;i<thread->summary->len;i++)
- camel_folder_free_message_info(thread->folder, thread->summary->pdata[i]);
- g_ptr_array_free(thread->summary, TRUE);
- camel_object_unref((CamelObject *)thread->folder);
- }
- e_memchunk_destroy(thread->node_chunks);
- g_free(thread);
-}
-
-#if 0
-/**
- * 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)
-{
- CamelFolderThread *thread;
-
-#ifdef TIMEIT
- struct timeval start, end;
- unsigned long diff;
-
- gettimeofday(&start, NULL);
-#endif
-
- thread = g_malloc(sizeof(*thread));
- thread->refcount = 1;
- thread->tree = NULL;
- thread->node_chunks = e_memchunk_new(32, sizeof(CamelFolderThreadNode));
- thread->folder = NULL;
- thread->summary = NULL;
-
- thread_summary(thread, summary);
-
- return thread;
-}
-
-/* scan the list in depth-first fashion */
-static void
-build_summary_rec(GHashTable *have, GPtrArray *summary, CamelFolderThreadNode *node)
-{
- while (node) {
- if (node->message)
- g_hash_table_insert(have, (char *)camel_message_info_uid(node->message), node->message);
- g_ptr_array_add(summary, node);
- if (node->child)
- build_summary_rec(have, summary, node->child);
- node = node->next;
- }
-}
-
-void
-camel_folder_thread_messages_add(CamelFolderThread *thread, GPtrArray *summary)
-{
- GPtrArray *all;
- int i;
- GHashTable *table;
-
- /* Instead of working out all the complex in's and out's of
- trying to do an incremental summary generation, just redo the whole
- thing with the summary in the current order - so it comes out
- in the same order */
-
- all = g_ptr_array_new();
- table = g_hash_table_new(g_str_hash, g_str_equal);
- build_summary_rec(table, all, thread->tree);
- for (i=0;i<summary->len;i++) {
- CamelMessageInfo *info = summary->pdata[i];
-
- /* check its not already there, we dont want duplicates */
- if (g_hash_table_lookup(table, camel_message_info_uid(info)) == NULL)
- g_ptr_array_add(all, info);
- }
- g_hash_table_destroy(table);
-
- /* reset the tree, and rebuild fully */
- thread->tree = NULL;
- e_memchunk_empty(thread->node_chunks);
- thread_summary(thread, all);
-}
-
-static void
-remove_uid_node_rec(CamelFolderThread *thread, GHashTable *table, CamelFolderThreadNode **list, CamelFolderThreadNode *parent)
-{
- CamelFolderThreadNode *prev = NULL;
- CamelFolderThreadNode *node, *next, *child, *rest;
-
- node = (CamelFolderThreadNode *)list;
- next = node->next;
- while (next) {
-
- if (next->child)
- remove_uid_node_rec(thread, table, &next->child, next);
-
- /* do we have a node to remove? */
- if (next->message && g_hash_table_lookup(table, (char *)camel_message_info_uid(node->message))) {
- child = next->child;
- if (child) {
- /*
- node
- next
- child
- lchild
- rest
-
- becomes:
- node
- child
- lchild
- rest
- */
-
- rest = next->next;
- node->next = child;
- e_memchunk_free(thread->node_chunks, next);
- next = child;
- do {
- lchild = child;
- child->parent = parent;
- child = child->next;
- } while (child);
- lchild->next = rest;
- } else {
- /*
- node
- next
- rest
- becomes:
- node
- rest */
- node->next = next->next;
- e_memchunk_free(thread->node_chunks, next);
- next = node->next;
- }
- } else {
- node = next;
- next = node->next;
- }
- }
-}
-
-void
-camel_folder_thread_messages_remove(CamelFolderThread *thread, GPtrArray *uids)
-{
- GHashTable *table;
- int i;
-
- table = g_hash_table_new(g_str_hash, g_str_equal);
- for (i=0;i<uids->len;i++)
- g_hash_table_insert(table, uids->pdata[i], uids->pdata[i]);
-
- remove_uid_node_rec(thread, table, &thread->tree, NULL);
- g_hash_table_destroy(table);
-}
-
-#endif
diff --git a/camel/camel-folder-thread.h b/camel/camel-folder-thread.h
deleted file mode 100644
index 8bb78e27a0..0000000000
--- a/camel/camel-folder-thread.h
+++ /dev/null
@@ -1,75 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#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 {
- guint32 refcount : 31;
- guint32 subject : 1;
-
- struct _CamelFolderThreadNode *tree;
- struct _EMemChunk *node_chunks;
- CamelFolder *folder;
- GPtrArray *summary;
-} CamelFolderThread;
-
-/* interface 1: using uid's */
-CamelFolderThread *camel_folder_thread_messages_new(CamelFolder *folder, GPtrArray *uids, gboolean thread_subject);
-void camel_folder_thread_messages_apply(CamelFolderThread *thread, GPtrArray *uids);
-
-/* interface 2: using messageinfo's. Currently disabled. */
-#if 0
-/* new improved interface */
-CamelFolderThread *camel_folder_thread_messages_new_summary(GPtrArray *summary);
-void camel_folder_thread_messages_add(CamelFolderThread *thread, GPtrArray *summary);
-void camel_folder_thread_messages_remove(CamelFolderThread *thread, GPtrArray *uids);
-#endif
-
-void camel_folder_thread_messages_ref(CamelFolderThread *threads);
-void camel_folder_thread_messages_unref(CamelFolderThread *threads);
-
-/* debugging function only */
-int camel_folder_threaded_messages_dump(CamelFolderThreadNode *c);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* !_CAMEL_FOLDER_THREAD_H */
diff --git a/camel/camel-folder.c b/camel/camel-folder.c
deleted file mode 100644
index 08fd816d97..0000000000
--- a/camel/camel-folder.c
+++ /dev/null
@@ -1,2161 +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-2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 "e-util/e-memory.h"
-#include "camel-operation.h"
-
-#include "camel-session.h"
-#include "camel-filter-driver.h"
-#include "camel-private.h"
-#include "camel-vtrash-folder.h"
-#include "filter/filter-rule.h"
-
-#define d(x)
-#define w(x)
-
-static CamelObjectClass *parent_class = NULL;
-
-/* Returns the class for a CamelFolder */
-#define CF_CLASS(so) ((CamelFolderClass *)((CamelObject *)(so))->klass)
-
-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 int folder_getv(CamelObject *object, CamelException *ex, CamelArgGetV *args);
-static void folder_free(CamelObject *o, guint32 tag, void *val);
-
-
-static void append_message (CamelFolder *folder, CamelMimeMessage *message,
- const CamelMessageInfo *info, char **appended_uid,
- 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 GPtrArray *search_by_uids (CamelFolder *folder, const char *exp, GPtrArray *uids, CamelException *ex);
-static void search_free (CamelFolder * folder, GPtrArray *result);
-
-static void transfer_messages_to (CamelFolder *source, GPtrArray *uids, CamelFolder *dest,
- GPtrArray **transferred_uids, gboolean delete_originals, CamelException *ex);
-
-static void delete (CamelFolder *folder);
-static void folder_rename (CamelFolder *folder, const char *new);
-
-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_by_uids = search_by_uids;
- 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->transfer_messages_to = transfer_messages_to;
- camel_folder_class->delete = delete;
- camel_folder_class->rename = folder_rename;
- camel_folder_class->freeze = freeze;
- camel_folder_class->thaw = thaw;
- camel_folder_class->is_frozen = is_frozen;
-
- /* virtual method overload */
- camel_object_class->getv = folder_getv;
- camel_object_class->free = folder_free;
-
- /* events */
- camel_object_class_add_event(camel_object_class, "folder_changed", folder_changed);
- camel_object_class_add_event(camel_object_class, "message_changed", message_changed);
- camel_object_class_add_event(camel_object_class, "deleted", NULL);
- camel_object_class_add_event(camel_object_class, "renamed", NULL);
-}
-
-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();
- folder->priv->lock = e_mutex_new(E_MUTEX_REC);
- folder->priv->change_lock = e_mutex_new(E_MUTEX_SIMPLE);
-}
-
-static void
-camel_folder_finalize (CamelObject *object)
-{
- CamelFolder *camel_folder = CAMEL_FOLDER (object);
- struct _CamelFolderPrivate *p = camel_folder->priv;
-
- g_free(camel_folder->name);
- g_free(camel_folder->full_name);
- g_free(camel_folder->description);
-
- if (camel_folder->parent_store)
- camel_object_unref (camel_folder->parent_store);
-
- if (camel_folder->summary)
- camel_object_unref (camel_folder->summary);
-
- camel_folder_change_info_free(p->changed_frozen);
-
- e_mutex_destroy(p->lock);
- e_mutex_destroy(p->change_lock);
-
- g_free(p);
-}
-
-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(parent_store);
-
- folder->name = g_strdup (name);
- folder->full_name = g_strdup (full_name);
-}
-
-
-static void
-folder_sync (CamelFolder *folder, gboolean expunge, CamelException *ex)
-{
- w(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);
-
- if (!(folder->folder_flags & CAMEL_FOLDER_HAS_BEEN_DELETED))
- 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 int
-folder_getv(CamelObject *object, CamelException *ex, CamelArgGetV *args)
-{
- CamelFolder *folder = (CamelFolder *)object;
- int i;
- guint32 tag;
-
- for (i=0;i<args->argc;i++) {
- CamelArgGet *arg = &args->argv[i];
-
- tag = arg->tag;
-
- switch (tag & CAMEL_ARG_TAG) {
- /* CamelObject args */
- case CAMEL_OBJECT_ARG_DESCRIPTION:
- if (folder->description == NULL)
- folder->description = g_strdup_printf("%s", folder->full_name);
- *arg->ca_str = folder->description;
- break;
-
- /* CamelFolder args */
- case CAMEL_FOLDER_ARG_NAME:
- *arg->ca_str = folder->name;
- break;
- case CAMEL_FOLDER_ARG_FULL_NAME:
- *arg->ca_str = folder->full_name;
- break;
- case CAMEL_FOLDER_ARG_STORE:
- *arg->ca_object = folder->parent_store;
- break;
- case CAMEL_FOLDER_ARG_PERMANENTFLAGS:
- *arg->ca_int = folder->permanent_flags;
- break;
- case CAMEL_FOLDER_ARG_TOTAL:
- *arg->ca_int = camel_folder_summary_count(folder->summary);
- break;
- case CAMEL_FOLDER_ARG_UNREAD: {
- int j, unread = 0, count;
- CamelMessageInfo *info;
-
- count = camel_folder_summary_count(folder->summary);
- for (j=0; j<count; j++) {
- if ((info = camel_folder_summary_index(folder->summary, j))) {
- if (!(info->flags & CAMEL_MESSAGE_SEEN))
- unread++;
- camel_folder_summary_info_free(folder->summary, info);
- }
- }
-
- *arg->ca_int = unread;
- break; }
- case CAMEL_FOLDER_ARG_UID_ARRAY: {
- int j, count;
- CamelMessageInfo *info;
- GPtrArray *array;
-
- count = camel_folder_summary_count(folder->summary);
- array = g_ptr_array_new();
- g_ptr_array_set_size(array, count);
- for (j=0; j<count; j++) {
- if ((info = camel_folder_summary_index(folder->summary, j))) {
- array->pdata[i] = g_strdup(camel_message_info_uid(info));
- camel_folder_summary_info_free(folder->summary, info);
- }
- }
- *arg->ca_ptr = array;
- break; }
- case CAMEL_FOLDER_ARG_INFO_ARRAY:
- *arg->ca_ptr = camel_folder_summary_array(folder->summary);
- break;
- case CAMEL_FOLDER_ARG_PROPERTIES:
- *arg->ca_ptr = NULL;
- break;
- default:
- continue;
- }
-
- arg->tag = (tag & CAMEL_ARG_TYPE) | CAMEL_ARG_IGNORE;
- }
-
- return parent_class->getv(object, ex, args);
-}
-
-static void
-folder_free(CamelObject *o, guint32 tag, void *val)
-{
- CamelFolder *folder = (CamelFolder *)o;
-
- switch (tag & CAMEL_ARG_TAG) {
- case CAMEL_FOLDER_ARG_UID_ARRAY: {
- GPtrArray *array = val;
- int i;
-
- for (i=0; i<array->len; i++)
- g_free(array->pdata[i]);
- g_ptr_array_free(array, TRUE);
- break; }
- case CAMEL_FOLDER_ARG_INFO_ARRAY:
- camel_folder_summary_array_free(folder->summary, val);
- break;
- case CAMEL_FOLDER_ARG_PROPERTIES:
- g_slist_free(val);
- break;
- default:
- parent_class->free(o, tag, val);
- }
-}
-
-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)
-{
- w(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);
-
- if (!(folder->folder_flags & CAMEL_FOLDER_HAS_BEEN_DELETED))
- 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) && (!(info->flags & CAMEL_MESSAGE_JUNK) || (folder->folder_flags & CAMEL_FOLDER_IS_JUNK)))
- 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, char **appended_uid,
- 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)));
-
- w(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
- * @appended_uid: if non-%NULL, the UID of the appended message will
- * be returned here, if it is known.
- * @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, char **appended_uid,
- CamelException *ex)
-{
- g_return_if_fail (CAMEL_IS_FOLDER (folder));
-
- CAMEL_FOLDER_LOCK(folder, lock);
-
- CF_CLASS (folder)->append_message (folder, message, info, appended_uid, 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);
- if (info == NULL)
- return 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);
- if (info == NULL)
- return;
-
- 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 (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);
- if (info == NULL)
- return 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);
- if (info == NULL)
- return;
-
- 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 (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);
- if (info == NULL)
- return NULL;
-
- /* FIXME: 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);
-
- /* FIXME: should duplicate string */
- 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);
- if (info == NULL)
- return;
-
- 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 (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->folder_flags & CAMEL_FOLDER_HAS_SUMMARY_CAPABILITY;
-}
-
-
-/* UIDs stuff */
-
-static CamelMimeMessage *
-get_message (CamelFolder *folder, const gchar *uid, CamelException *ex)
-{
- w(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, j, 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, j = 0; i < count; i++) {
- CamelMessageInfo *info = camel_folder_summary_index(folder->summary, i);
-
- if (info) {
- array->pdata[j++] = g_strdup (camel_message_info_uid (info));
- camel_folder_summary_info_free(folder->summary, info);
- }
- }
-
- g_ptr_array_set_size (array, j);
-
- 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->folder_flags & CAMEL_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)));
-
- w(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->folder_flags & CAMEL_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 GPtrArray *
-search_by_uids(CamelFolder *folder, const char *exp, GPtrArray *uids, CamelException *ex)
-{
- camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_INVALID,
- _("Unsupported operation: search by uids: for %s"),
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (folder)));
-
- w(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_uids:
- * @folder:
- * @expr:
- * @uids: array of uid's to match against.
- * @ex:
- *
- * Search a subset of uid's for an expression match.
- *
- * Return value:
- **/
-GPtrArray *
-camel_folder_search_by_uids(CamelFolder *folder, const char *expr, GPtrArray *uids, CamelException *ex)
-{
- GPtrArray *ret;
-
- g_return_val_if_fail(CAMEL_IS_FOLDER (folder), NULL);
- g_return_val_if_fail(folder->folder_flags & CAMEL_FOLDER_HAS_SEARCH_CAPABILITY, NULL);
-
- /* NOTE: that it is upto the callee to lock */
-
- ret = CF_CLASS(folder)->search_by_uids(folder, expr, uids, 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));
-
- /* NOTE: upto the callee to lock */
- CF_CLASS (folder)->search_free (folder, result);
-}
-
-
-static void
-transfer_message_to (CamelFolder *source, const char *uid, CamelFolder *dest,
- char **transferred_uid, gboolean delete_original,
- 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->folder_flags & CAMEL_FOLDER_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;
- delete_original = TRUE;
- }
-
- camel_folder_append_message (dest, msg, info, transferred_uid, ex);
- camel_object_unref (msg);
-
- if (delete_original && !camel_exception_is_set (ex))
- camel_folder_set_message_flags (source, uid, CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_SEEN, ~0);
-
- if (info) {
- if (source->folder_flags & CAMEL_FOLDER_HAS_SUMMARY_CAPABILITY)
- CF_CLASS (source)->free_message_info (source, info);
- else
- camel_message_info_free (info);
- }
-}
-
-static void
-transfer_messages_to (CamelFolder *source, GPtrArray *uids, CamelFolder *dest, GPtrArray **transferred_uids, gboolean delete_originals, CamelException *ex)
-{
- CamelException local;
- char **ret_uid = NULL;
- int i;
-
- if (transferred_uids) {
- *transferred_uids = g_ptr_array_new ();
- g_ptr_array_set_size (*transferred_uids, uids->len);
- }
-
- camel_exception_init(&local);
- if (ex == NULL)
- ex = &local;
-
- camel_operation_start(NULL, delete_originals ? _("Moving messages") : _("Copying messages"));
-
- if (uids->len > 1) {
- camel_folder_freeze(dest);
- if (delete_originals)
- camel_folder_freeze(source);
- }
- for (i = 0; i < uids->len && !camel_exception_is_set (ex); i++) {
- if (transferred_uids)
- ret_uid = (char **)&((*transferred_uids)->pdata[i]);
- transfer_message_to (source, uids->pdata[i], dest, ret_uid, delete_originals, ex);
- camel_operation_progress(NULL, i * 100 / uids->len);
- }
- if (uids->len > 1) {
- camel_folder_thaw(dest);
- if (delete_originals)
- camel_folder_thaw(source);
- }
-
- camel_operation_end(NULL);
- camel_exception_clear(&local);
-}
-
-/**
- * camel_folder_transfer_messages_to:
- * @source: source folder
- * @uids: message UIDs in @source
- * @dest: destination folder
- * @transferred_uids: if non-%NULL, the UIDs of the resulting messages
- * in @dest will be stored here, if known.
- * @delete_originals: whether or not to delete the original messages
- * @ex: a CamelException
- *
- * This copies or moves messages from one folder to another. If the
- * @source and @dest folders have the same parent_store, this may be
- * more efficient than using camel_folder_append_message().
- **/
-void
-camel_folder_transfer_messages_to (CamelFolder *source, GPtrArray *uids,
- CamelFolder *dest, GPtrArray **transferred_uids,
- gboolean delete_originals, 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) {
- /* If either folder is a vtrash, we need to use the
- * vtrash transfer method.
- */
- if (CAMEL_IS_VTRASH_FOLDER (dest))
- CF_CLASS (dest)->transfer_messages_to (source, uids, dest, transferred_uids, delete_originals, ex);
- else
- CF_CLASS (source)->transfer_messages_to (source, uids, dest, transferred_uids, delete_originals, ex);
- } else
- transfer_messages_to (source, uids, dest, transferred_uids, delete_originals, ex);
-
- CAMEL_FOLDER_UNLOCK(source, lock);
-}
-
-static void
-delete (CamelFolder *folder)
-{
- if (folder->summary)
- camel_folder_summary_clear (folder->summary);
-}
-
-/**
- * camel_folder_delete:
- * @folder: folder
- *
- * Marks a folder object as deleted and performs any required cleanup.
- **/
-void
-camel_folder_delete (CamelFolder *folder)
-{
- g_return_if_fail (CAMEL_IS_FOLDER (folder));
-
- CAMEL_FOLDER_LOCK (folder, lock);
- if (folder->folder_flags & CAMEL_FOLDER_HAS_BEEN_DELETED) {
- CAMEL_FOLDER_UNLOCK (folder, lock);
- return;
- }
-
- folder->folder_flags |= CAMEL_FOLDER_HAS_BEEN_DELETED;
-
- CF_CLASS (folder)->delete (folder);
-
- CAMEL_FOLDER_UNLOCK (folder, lock);
-
- camel_object_trigger_event (folder, "deleted", NULL);
-}
-
-static void
-folder_rename (CamelFolder *folder, const char *new)
-{
- char *tmp;
-
- printf("CamelFolder:rename('%s')\n", new);
-
- g_free(folder->full_name);
- folder->full_name = g_strdup(new);
- g_free(folder->name);
- tmp = strrchr(new, folder->parent_store->dir_sep);
- folder->name = g_strdup(tmp?tmp+1:new);
-}
-
-/**
- * camel_folder_rename:
- * @folder:
- * @new:
- *
- * Mark an active folder object as renamed.
- *
- * NOTE: This is an internal function used by camel stores, no locking
- * is performed on the folder.
- **/
-void
-camel_folder_rename(CamelFolder *folder, const char *new)
-{
- char *old;
-
- old = g_strdup(folder->full_name);
-
- CF_CLASS (folder)->rename(folder, new);
-
- camel_object_trigger_event (folder, "renamed", old);
- g_free(old);
-}
-
-static void
-freeze (CamelFolder *folder)
-{
- CAMEL_FOLDER_LOCK(folder, change_lock);
-
- g_assert(folder->priv->frozen >= 0);
-
- 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);
-
- g_assert(folder->priv->frozen > 0);
-
- 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 (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);
-}
-
-
-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;
- CamelMessageInfo *info;
- int i, status = 0;
- CamelURL *uri;
- char *source_url;
- CamelException ex;
-
- camel_operation_start(NULL, _("Filtering new message(s)"));
-
- source_url = camel_service_get_url((CamelService *)m->folder->parent_store);
- uri = camel_url_new(source_url, NULL);
- g_free(source_url);
- if (m->folder->full_name && m->folder->full_name[0] != '/') {
- char *tmp = alloca(strlen(m->folder->full_name)+2);
-
- sprintf(tmp, "/%s", m->folder->full_name);
- camel_url_set_path(uri, tmp);
- } else
- camel_url_set_path(uri, m->folder->full_name);
- source_url = camel_url_to_string(uri, CAMEL_URL_HIDE_ALL);
- camel_url_free(uri);
-
- for (i=0;status == 0 && i<m->recents->len;i++) {
- char *uid = m->recents->pdata[i];
- int pc = 100 * i / m->recents->len;
-
- camel_operation_progress(NULL, pc);
-
- info = camel_folder_get_message_info(m->folder, uid);
- if (info == NULL) {
- g_warning("uid %s vanished from folder: %s", uid, source_url);
- continue;
- }
-
- status = camel_filter_driver_filter_message(m->driver, NULL, info, uid, m->folder, source_url, source_url, &m->ex);
-
- camel_folder_free_message_info(m->folder, info);
- }
-
- camel_exception_init(&ex);
- camel_filter_driver_flush(m->driver, &ex);
- if (!camel_exception_is_set(&m->ex))
- camel_exception_xfer(&m->ex, &ex);
-
- g_free(source_url);
-
- camel_operation_end(NULL);
-}
-
-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,
-};
-
-
-/* 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 = NULL;
-
- if (((folder->folder_flags & CAMEL_FOLDER_FILTER_RECENT) || camel_session_check_junk (session))
- && changed->uid_recent->len > 0)
- driver = camel_session_get_filter_driver(session,
- (folder->folder_flags & CAMEL_FOLDER_FILTER_RECENT) ? FILTER_SOURCE_INCOMING : FILTER_SOURCE_JUNKTEST, NULL);
-
- CAMEL_FOLDER_LOCK(folder, change_lock);
-
- if (driver) {
- 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);
-
- /* 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 {
- w(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 83df665147..0000000000
--- a/camel/camel-folder.h
+++ /dev/null
@@ -1,348 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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;
-
-enum {
- CAMEL_FOLDER_ARG_FIRST = CAMEL_ARG_FIRST + 0x1000,
- CAMEL_FOLDER_ARG_NAME = CAMEL_FOLDER_ARG_FIRST,
- CAMEL_FOLDER_ARG_FULL_NAME,
- CAMEL_FOLDER_ARG_STORE,
- CAMEL_FOLDER_ARG_PERMANENTFLAGS,
- CAMEL_FOLDER_ARG_TOTAL,
- CAMEL_FOLDER_ARG_UNREAD,
- CAMEL_FOLDER_ARG_UID_ARRAY,
- CAMEL_FOLDER_ARG_INFO_ARRAY,
- CAMEL_FOLDER_ARG_PROPERTIES,
- CAMEL_FOLDER_ARG_LAST = CAMEL_ARG_FIRST + 0x2000,
-};
-
-enum {
- CAMEL_FOLDER_NAME = CAMEL_FOLDER_ARG_NAME | CAMEL_ARG_STR,
- CAMEL_FOLDER_FULL_NAME = CAMEL_FOLDER_ARG_FULL_NAME | CAMEL_ARG_STR,
- CAMEL_FOLDER_STORE = CAMEL_FOLDER_ARG_STORE | CAMEL_ARG_OBJ,
- CAMEL_FOLDER_PERMANENTFLAGS = CAMEL_FOLDER_ARG_PERMANENTFLAGS | CAMEL_ARG_INT,
- CAMEL_FOLDER_TOTAL = CAMEL_FOLDER_ARG_TOTAL | CAMEL_ARG_INT,
- CAMEL_FOLDER_UNREAD = CAMEL_FOLDER_ARG_UNREAD | CAMEL_ARG_INT,
- /* should we only get static data? not stuff that needs to be free'd? */
- CAMEL_FOLDER_UID_ARRAY = CAMEL_FOLDER_ARG_UID_ARRAY | CAMEL_ARG_PTR,
- CAMEL_FOLDER_INFO_ARRAY = CAMEL_FOLDER_ARG_INFO_ARRAY | CAMEL_ARG_PTR,
-
- /* GSList of settable folder properties */
- CAMEL_FOLDER_PROPERTIES = CAMEL_FOLDER_ARG_PROPERTIES | CAMEL_ARG_PTR,
-};
-
-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;
-
- /* get these via the :get() method, they might not be set otherwise */
- char *name;
- char *full_name;
- char *description;
-
- CamelStore *parent_store;
- CamelFolderSummary *summary;
-
- guint32 folder_flags;
- guint32 permanent_flags;
-};
-
-#define CAMEL_FOLDER_HAS_SUMMARY_CAPABILITY (1<<0)
-#define CAMEL_FOLDER_HAS_SEARCH_CAPABILITY (1<<1)
-#define CAMEL_FOLDER_FILTER_RECENT (1<<2)
-#define CAMEL_FOLDER_HAS_BEEN_DELETED (1<<3)
-#define CAMEL_FOLDER_IS_TRASH (1<<4)
-#define CAMEL_FOLDER_IS_JUNK (1<<5)
-
-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,
- char **appended_uid,
- 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 *, const char *, CamelException *);
- GPtrArray * (*search_by_uids) (CamelFolder *, const char *, GPtrArray *uids, CamelException *);
-
- 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 (*transfer_messages_to) (CamelFolder *source,
- GPtrArray *uids,
- CamelFolder *destination,
- GPtrArray **transferred_uids,
- gboolean delete_originals,
- CamelException *ex);
-
- void (*delete) (CamelFolder *folder);
- void (*rename) (CamelFolder *folder, const char *newname);
-
- 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,
- char **appended_uid,
- 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 *expr, CamelException *ex);
-GPtrArray * camel_folder_search_by_uids (CamelFolder *folder, const char *expr, GPtrArray *uids, 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_transfer_messages_to (CamelFolder *source,
- GPtrArray *uids,
- CamelFolder *dest,
- GPtrArray **transferred_uids,
- gboolean delete_originals,
- CamelException *ex);
-
-void camel_folder_delete (CamelFolder *folder);
-void camel_folder_rename (CamelFolder *folder, const char *new);
-
-/* 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-gpg-context.c b/camel/camel-gpg-context.c
deleted file mode 100644
index f7f52fd7fd..0000000000
--- a/camel/camel-gpg-context.c
+++ /dev/null
@@ -1,1794 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2002 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 <sys/time.h>
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <sys/time.h>
-#include <termios.h>
-#include <signal.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <ctype.h>
-
-#include "gal/util/e-iconv.h"
-
-#include "camel-gpg-context.h"
-#include "camel-mime-filter-charset.h"
-#include "camel-stream-filter.h"
-#include "camel-stream-mem.h"
-#include "camel-stream-fs.h"
-#include "camel-operation.h"
-#include "camel-mime-part.h"
-#include "camel-mime-filter-canon.h"
-
-#include "camel-multipart-signed.h"
-#include "camel-multipart-encrypted.h"
-
-#define d(x)
-
-static CamelCipherContextClass *parent_class = NULL;
-
-/**
- * camel_gpg_context_new:
- * @session: session
- *
- * Creates a new gpg cipher context object.
- *
- * Returns a new gpg cipher context object.
- **/
-CamelCipherContext *
-camel_gpg_context_new (CamelSession *session)
-{
- CamelCipherContext *cipher;
- CamelGpgContext *ctx;
-
- g_return_val_if_fail (CAMEL_IS_SESSION (session), NULL);
-
- ctx = (CamelGpgContext *) camel_object_new (camel_gpg_context_get_type ());
-
- cipher = (CamelCipherContext *) ctx;
- cipher->session = session;
- camel_object_ref (session);
-
- return cipher;
-}
-
-
-/**
- * camel_gpg_context_set_always_trust:
- * @ctx: gpg context
- * @always_trust always truct flag
- *
- * Sets the @always_trust flag on the gpg context which is used for
- * encryption.
- **/
-void
-camel_gpg_context_set_always_trust (CamelGpgContext *ctx, gboolean always_trust)
-{
- g_return_if_fail (CAMEL_IS_GPG_CONTEXT (ctx));
-
- ctx->always_trust = always_trust;
-}
-
-
-static const char *
-gpg_hash_to_id (CamelCipherContext *context, CamelCipherHash hash)
-{
- switch (hash) {
- case CAMEL_CIPHER_HASH_MD2:
- return "pgp-md2";
- case CAMEL_CIPHER_HASH_MD5:
- return "pgp-md5";
- case CAMEL_CIPHER_HASH_SHA1:
- case CAMEL_CIPHER_HASH_DEFAULT:
- return "pgp-sha1";
- case CAMEL_CIPHER_HASH_RIPEMD160:
- return "pgp-ripemd160";
- case CAMEL_CIPHER_HASH_TIGER192:
- return "pgp-tiger192";
- case CAMEL_CIPHER_HASH_HAVAL5160:
- return "pgp-haval-5-160";
- }
-
- return NULL;
-}
-
-static CamelCipherHash
-gpg_id_to_hash (CamelCipherContext *context, const char *id)
-{
- if (id) {
- if (!strcmp (id, "pgp-md2"))
- return CAMEL_CIPHER_HASH_MD2;
- else if (!strcmp (id, "pgp-md5"))
- return CAMEL_CIPHER_HASH_MD5;
- else if (!strcmp (id, "pgp-sha1"))
- return CAMEL_CIPHER_HASH_SHA1;
- else if (!strcmp (id, "pgp-ripemd160"))
- return CAMEL_CIPHER_HASH_RIPEMD160;
- else if (!strcmp (id, "tiger192"))
- return CAMEL_CIPHER_HASH_TIGER192;
- else if (!strcmp (id, "haval-5-160"))
- return CAMEL_CIPHER_HASH_HAVAL5160;
- }
-
- return CAMEL_CIPHER_HASH_DEFAULT;
-}
-
-
-enum _GpgCtxMode {
- GPG_CTX_MODE_SIGN,
- GPG_CTX_MODE_VERIFY,
- GPG_CTX_MODE_ENCRYPT,
- GPG_CTX_MODE_DECRYPT,
- GPG_CTX_MODE_IMPORT,
- GPG_CTX_MODE_EXPORT,
-};
-
-enum _GpgTrustMetric {
- GPG_TRUST_UNKNOWN,
- GPG_TRUST_NEVER,
- GPG_TRUST_MARGINAL,
- GPG_TRUST_FULLY,
- GPG_TRUST_ULTIMATE
-};
-
-struct _GpgCtx {
- enum _GpgCtxMode mode;
- CamelSession *session;
- GHashTable *userid_hint;
- pid_t pid;
-
- char *userid;
- char *sigfile;
- GPtrArray *recipients;
- CamelCipherHash hash;
-
- int stdin_fd;
- int stdout_fd;
- int stderr_fd;
- int status_fd;
- int passwd_fd; /* only needed for sign/decrypt */
-
- /* status-fd buffer */
- unsigned char *statusbuf;
- unsigned char *statusptr;
- unsigned int statusleft;
-
- char *passwd;
-
- CamelStream *istream;
- CamelStream *ostream;
-
- GByteArray *diagbuf;
- CamelStream *diagnostics;
-
- int exit_status;
-
- unsigned int exited:1;
- unsigned int complete:1;
- unsigned int seen_eof1:1;
- unsigned int seen_eof2:1;
- unsigned int always_trust:1;
- unsigned int armor:1;
- unsigned int need_passwd:1;
- unsigned int send_passwd:1;
-
- unsigned int bad_passwds:2;
-
- unsigned int validsig:1;
- unsigned int trust:3;
-
- unsigned int diagflushed:1;
-
- unsigned int utf8:1;
-
- unsigned int padding:16;
-};
-
-static struct _GpgCtx *
-gpg_ctx_new (CamelSession *session)
-{
- struct _GpgCtx *gpg;
- const char *charset;
- CamelStream *stream;
-
- gpg = g_new (struct _GpgCtx, 1);
- gpg->mode = GPG_CTX_MODE_SIGN;
- gpg->session = session;
- camel_object_ref (session);
- gpg->userid_hint = g_hash_table_new (g_str_hash, g_str_equal);
- gpg->complete = FALSE;
- gpg->seen_eof1 = TRUE;
- gpg->seen_eof2 = FALSE;
- gpg->pid = (pid_t) -1;
- gpg->exit_status = 0;
- gpg->exited = FALSE;
-
- gpg->userid = NULL;
- gpg->sigfile = NULL;
- gpg->recipients = NULL;
- gpg->hash = CAMEL_CIPHER_HASH_DEFAULT;
- gpg->always_trust = FALSE;
- gpg->armor = FALSE;
-
- gpg->stdin_fd = -1;
- gpg->stdout_fd = -1;
- gpg->stderr_fd = -1;
- gpg->status_fd = -1;
- gpg->passwd_fd = -1;
-
- gpg->statusbuf = g_malloc (128);
- gpg->statusptr = gpg->statusbuf;
- gpg->statusleft = 128;
-
- gpg->bad_passwds = 0;
- gpg->need_passwd = FALSE;
- gpg->send_passwd = FALSE;
- gpg->passwd = NULL;
-
- gpg->validsig = FALSE;
- gpg->trust = GPG_TRUST_UNKNOWN;
-
- gpg->istream = NULL;
- gpg->ostream = NULL;
-
- stream = camel_stream_mem_new ();
- gpg->diagbuf = CAMEL_STREAM_MEM (stream)->buffer;
- gpg->diagflushed = FALSE;
-
- if ((charset = e_iconv_locale_charset ()) && strcasecmp (charset, "UTF-8") != 0) {
- CamelMimeFilterCharset *filter;
- CamelStreamFilter *fstream;
-
- gpg->utf8 = FALSE;
-
- if ((filter = camel_mime_filter_charset_new_convert (charset, "UTF-8"))) {
- fstream = camel_stream_filter_new_with_stream (stream);
- camel_stream_filter_add (fstream, (CamelMimeFilter *) filter);
- camel_object_unref (filter);
- camel_object_unref (stream);
-
- stream = (CamelStream *) fstream;
- }
- } else {
- gpg->utf8 = TRUE;
- }
-
- gpg->diagnostics = stream;
-
- return gpg;
-}
-
-static void
-gpg_ctx_set_mode (struct _GpgCtx *gpg, enum _GpgCtxMode mode)
-{
- gpg->mode = mode;
- gpg->need_passwd = ((gpg->mode == GPG_CTX_MODE_SIGN) || (gpg->mode == GPG_CTX_MODE_DECRYPT));
-}
-
-static void
-gpg_ctx_set_hash (struct _GpgCtx *gpg, CamelCipherHash hash)
-{
- gpg->hash = hash;
-}
-
-static void
-gpg_ctx_set_always_trust (struct _GpgCtx *gpg, gboolean trust)
-{
- gpg->always_trust = trust;
-}
-
-static void
-gpg_ctx_set_userid (struct _GpgCtx *gpg, const char *userid)
-{
- g_free (gpg->userid);
- gpg->userid = g_strdup (userid);
-}
-
-static void
-gpg_ctx_add_recipient (struct _GpgCtx *gpg, const char *keyid)
-{
- if (gpg->mode != GPG_CTX_MODE_ENCRYPT && gpg->mode != GPG_CTX_MODE_EXPORT)
- return;
-
- if (!gpg->recipients)
- gpg->recipients = g_ptr_array_new ();
-
- g_ptr_array_add (gpg->recipients, g_strdup (keyid));
-}
-
-static void
-gpg_ctx_set_sigfile (struct _GpgCtx *gpg, const char *sigfile)
-{
- g_free (gpg->sigfile);
- gpg->sigfile = g_strdup (sigfile);
-}
-
-static void
-gpg_ctx_set_armor (struct _GpgCtx *gpg, gboolean armor)
-{
- gpg->armor = armor;
-}
-
-static void
-gpg_ctx_set_istream (struct _GpgCtx *gpg, CamelStream *istream)
-{
- camel_object_ref (istream);
- if (gpg->istream)
- camel_object_unref (gpg->istream);
- gpg->istream = istream;
-}
-
-static void
-gpg_ctx_set_ostream (struct _GpgCtx *gpg, CamelStream *ostream)
-{
- camel_object_ref (ostream);
- if (gpg->ostream)
- camel_object_unref (gpg->ostream);
- gpg->ostream = ostream;
- gpg->seen_eof1 = FALSE;
-}
-
-static const char *
-gpg_ctx_get_diagnostics (struct _GpgCtx *gpg)
-{
- if (!gpg->diagflushed) {
- gpg->diagflushed = TRUE;
- camel_stream_flush (gpg->diagnostics);
- if (gpg->diagbuf->len == 0)
- return NULL;
-
- g_byte_array_append (gpg->diagbuf, "", 1);
- }
-
- return gpg->diagbuf->data;
-}
-
-static void
-userid_hint_free (gpointer key, gpointer value, gpointer user_data)
-{
- g_free (key);
- g_free (value);
-}
-
-static void
-gpg_ctx_free (struct _GpgCtx *gpg)
-{
- int i;
-
- if (gpg == NULL)
- return;
-
- if (gpg->session)
- camel_object_unref (gpg->session);
-
- g_hash_table_foreach (gpg->userid_hint, userid_hint_free, NULL);
- g_hash_table_destroy (gpg->userid_hint);
-
- g_free (gpg->userid);
-
- g_free (gpg->sigfile);
-
- if (gpg->recipients) {
- for (i = 0; i < gpg->recipients->len; i++)
- g_free (gpg->recipients->pdata[i]);
-
- g_ptr_array_free (gpg->recipients, TRUE);
- }
-
- if (gpg->stdin_fd != -1)
- close (gpg->stdin_fd);
- if (gpg->stdout_fd != -1)
- close (gpg->stdout_fd);
- if (gpg->stderr_fd != -1)
- close (gpg->stderr_fd);
- if (gpg->status_fd != -1)
- close (gpg->status_fd);
- if (gpg->passwd_fd != -1)
- close (gpg->passwd_fd);
-
- g_free (gpg->statusbuf);
-
- if (gpg->passwd)
- g_free (gpg->passwd);
-
- if (gpg->istream)
- camel_object_unref (gpg->istream);
-
- if (gpg->ostream)
- camel_object_unref (gpg->ostream);
-
- camel_object_unref (gpg->diagnostics);
-
- g_free (gpg);
-}
-
-static const char *
-gpg_hash_str (CamelCipherHash hash)
-{
- switch (hash) {
- case CAMEL_CIPHER_HASH_MD2:
- return "--digest-algo=MD2";
- case CAMEL_CIPHER_HASH_MD5:
- return "--digest-algo=MD5";
- case CAMEL_CIPHER_HASH_SHA1:
- return "--digest-algo=SHA1";
- case CAMEL_CIPHER_HASH_RIPEMD160:
- return "--digest-algo=RIPEMD160";
- default:
- return NULL;
- }
-}
-
-static GPtrArray *
-gpg_ctx_get_argv (struct _GpgCtx *gpg, int status_fd, char **sfd, int passwd_fd, char **pfd)
-{
- const char *hash_str;
- GPtrArray *argv;
- char *buf;
- int i;
-
- argv = g_ptr_array_new ();
- 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, "--no-tty");
- if (passwd_fd == -1) {
- /* only use batch mode if we don't intend on using the
- interactive --command-fd option */
- g_ptr_array_add (argv, "--batch");
- g_ptr_array_add (argv, "--yes");
- }
-
- *sfd = buf = g_strdup_printf ("--status-fd=%d", status_fd);
- g_ptr_array_add (argv, buf);
-
- if (passwd_fd != -1) {
- *pfd = buf = g_strdup_printf ("--command-fd=%d", passwd_fd);
- g_ptr_array_add (argv, buf);
- }
-
- switch (gpg->mode) {
- case GPG_CTX_MODE_SIGN:
- g_ptr_array_add (argv, "--sign");
- g_ptr_array_add (argv, "--detach");
- if (gpg->armor)
- g_ptr_array_add (argv, "--armor");
- hash_str = gpg_hash_str (gpg->hash);
- if (hash_str)
- g_ptr_array_add (argv, (char *) hash_str);
- if (gpg->userid) {
- g_ptr_array_add (argv, "-u");
- g_ptr_array_add (argv, (char *) gpg->userid);
- }
- g_ptr_array_add (argv, "--output");
- g_ptr_array_add (argv, "-");
- break;
- case GPG_CTX_MODE_VERIFY:
- if (!camel_session_is_online (gpg->session)) {
- /* this is a deprecated flag to gpg since 1.0.7 */
- /*g_ptr_array_add (argv, "--no-auto-key-retrieve");*/
- g_ptr_array_add (argv, "--keyserver-options");
- g_ptr_array_add (argv, "no-auto-key-retrieve");
- }
- g_ptr_array_add (argv, "--verify");
- if (gpg->sigfile)
- g_ptr_array_add (argv, gpg->sigfile);
- g_ptr_array_add (argv, "-");
- break;
- case GPG_CTX_MODE_ENCRYPT:
- g_ptr_array_add (argv, "--encrypt");
- if (gpg->armor)
- g_ptr_array_add (argv, "--armor");
- if (gpg->always_trust)
- g_ptr_array_add (argv, "--always-trust");
- if (gpg->userid) {
- g_ptr_array_add (argv, "-u");
- g_ptr_array_add (argv, (char *) gpg->userid);
- }
- if (gpg->recipients) {
- for (i = 0; i < gpg->recipients->len; i++) {
- g_ptr_array_add (argv, "-r");
- g_ptr_array_add (argv, gpg->recipients->pdata[i]);
- }
- }
- g_ptr_array_add (argv, "--output");
- g_ptr_array_add (argv, "-");
- break;
- case GPG_CTX_MODE_DECRYPT:
- g_ptr_array_add (argv, "--decrypt");
- g_ptr_array_add (argv, "--output");
- g_ptr_array_add (argv, "-");
- break;
- case GPG_CTX_MODE_IMPORT:
- g_ptr_array_add (argv, "--import");
- g_ptr_array_add (argv, "-");
- break;
- case GPG_CTX_MODE_EXPORT:
- if (gpg->armor)
- g_ptr_array_add (argv, "--armor");
- g_ptr_array_add (argv, "--export");
- for (i = 0; i < gpg->recipients->len; i++)
- g_ptr_array_add (argv, gpg->recipients->pdata[i]);
- break;
- }
-
- g_ptr_array_add (argv, NULL);
-
- return argv;
-}
-
-static int
-gpg_ctx_op_start (struct _GpgCtx *gpg)
-{
- char *status_fd = NULL, *passwd_fd = NULL;
- int i, maxfd, errnosave, fds[10];
- GPtrArray *argv;
- int flags;
-
- for (i = 0; i < 10; i++)
- fds[i] = -1;
-
- maxfd = gpg->need_passwd ? 10 : 8;
- for (i = 0; i < maxfd; i += 2) {
- if (pipe (fds + i) == -1)
- goto exception;
- }
-
- argv = gpg_ctx_get_argv (gpg, fds[7], &status_fd, fds[8], &passwd_fd);
-
- if (!(gpg->pid = fork ())) {
- /* child process */
-
- if ((dup2 (fds[0], STDIN_FILENO) < 0 ) ||
- (dup2 (fds[3], STDOUT_FILENO) < 0 ) ||
- (dup2 (fds[5], STDERR_FILENO) < 0 )) {
- _exit (255);
- }
-
- /* Dissociate from camel's controlling terminal so
- * that gpg won't be able to read from it.
- */
- setsid ();
-
- maxfd = sysconf (_SC_OPEN_MAX);
- /* Loop over all fds. */
- for (i = 3; i < maxfd; i++) {
- /* don't close the status-fd or passwd-fd */
- if (i != fds[7] && i != fds[8])
- fcntl (i, F_SETFD, FD_CLOEXEC);
- }
-
- /* run gpg */
- execvp ("gpg", (char **) argv->pdata);
- _exit (255);
- } else if (gpg->pid < 0) {
- g_ptr_array_free (argv, TRUE);
- g_free (status_fd);
- g_free (passwd_fd);
- goto exception;
- }
-
- g_ptr_array_free (argv, TRUE);
- g_free (status_fd);
- g_free (passwd_fd);
-
- /* Parent */
- close (fds[0]);
- gpg->stdin_fd = fds[1];
- gpg->stdout_fd = fds[2];
- close (fds[3]);
- gpg->stderr_fd = fds[4];
- close (fds[5]);
- gpg->status_fd = fds[6];
- close (fds[7]);
- if (gpg->need_passwd) {
- close (fds[8]);
- gpg->passwd_fd = fds[9];
- flags = fcntl (gpg->passwd_fd, F_GETFL);
- fcntl (gpg->passwd_fd, F_SETFL, flags | O_NONBLOCK);
- }
-
- flags = fcntl (gpg->stdin_fd, F_GETFL);
- fcntl (gpg->stdin_fd, F_SETFL, flags | O_NONBLOCK);
-
- flags = fcntl (gpg->stdout_fd, F_GETFL);
- fcntl (gpg->stdout_fd, F_SETFL, flags | O_NONBLOCK);
-
- flags = fcntl (gpg->stderr_fd, F_GETFL);
- fcntl (gpg->stderr_fd, F_SETFL, flags | O_NONBLOCK);
-
- flags = fcntl (gpg->status_fd, F_GETFL);
- fcntl (gpg->status_fd, F_SETFL, flags | O_NONBLOCK);
-
- return 0;
-
- exception:
-
- errnosave = errno;
-
- for (i = 0; i < 10; i++) {
- if (fds[i] != -1)
- close (fds[i]);
- }
-
- errno = errnosave;
-
- return -1;
-}
-
-static const char *
-next_token (const char *in, char **token)
-{
- const char *start, *inptr = in;
-
- while (*inptr == ' ')
- inptr++;
-
- if (*inptr == '\0' || *inptr == '\n') {
- if (token)
- *token = NULL;
- return inptr;
- }
-
- start = inptr;
- while (*inptr && *inptr != ' ' && *inptr != '\n')
- inptr++;
-
- if (token)
- *token = g_strndup (start, inptr - start);
-
- return inptr;
-}
-
-static int
-gpg_ctx_parse_status (struct _GpgCtx *gpg, CamelException *ex)
-{
- register unsigned char *inptr;
- const unsigned char *status;
- size_t nread, nwritten;
- int len;
-
- parse:
-
- inptr = gpg->statusbuf;
- while (inptr < gpg->statusptr && *inptr != '\n')
- inptr++;
-
- if (*inptr != '\n') {
- /* we don't have enough data buffered to parse this status line */
- return 0;
- }
-
- *inptr++ = '\0';
- status = gpg->statusbuf;
-
- d(printf ("status: %s\n", status));
-
- if (strncmp (status, "[GNUPG:] ", 9) != 0) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Unexpected GnuPG status message encountered:\n\n%s"),
- status);
- return -1;
- }
-
- status += 9;
-
- if (!strncmp (status, "USERID_HINT ", 12)) {
- char *hint, *user;
-
- status += 12;
- status = next_token (status, &hint);
- if (!hint) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to parse gpg userid hint."));
- return -1;
- }
-
- if (g_hash_table_lookup (gpg->userid_hint, hint)) {
- /* we already have this userid hint... */
- g_free (hint);
- goto recycle;
- }
-
- if (gpg->utf8 || !(user = g_locale_to_utf8 (status, -1, &nread, &nwritten, NULL)))
- user = g_strdup (status);
-
- g_strstrip (user);
-
- g_hash_table_insert (gpg->userid_hint, hint, user);
- } else if (!strncmp (status, "NEED_PASSPHRASE ", 16)) {
- char *prompt, *userid, *passwd;
- const char *name;
-
- status += 16;
-
- status = next_token (status, &userid);
- if (!userid) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to parse gpg passphrase request."));
- return -1;
- }
-
- name = g_hash_table_lookup (gpg->userid_hint, userid);
- if (!name)
- name = userid;
-
- prompt = g_strdup_printf (_("You need a passphrase to unlock the key for\n"
- "user: \"%s\""), name);
-
- if ((passwd = camel_session_get_password (gpg->session, prompt, FALSE, TRUE, NULL, userid, ex)) && !gpg->utf8) {
- char *opasswd = passwd;
-
- if ((passwd = g_locale_to_utf8 (passwd, -1, &nread, &nwritten, NULL))) {
- memset (opasswd, 0, strlen (opasswd));
- g_free (opasswd);
- } else {
- passwd = opasswd;
- }
- }
- g_free (prompt);
-
- g_free (gpg->userid);
- gpg->userid = userid;
-
- if (passwd == NULL) {
- if (!camel_exception_is_set (ex))
- camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL, _("Cancelled."));
- return -1;
- }
-
- gpg->passwd = g_strdup_printf ("%s\n", passwd);
- memset (passwd, 0, strlen (passwd));
- g_free (passwd);
-
- gpg->send_passwd = TRUE;
- } else if (!strncmp (status, "GOOD_PASSPHRASE", 15)) {
- gpg->bad_passwds = 0;
- } else if (!strncmp (status, "BAD_PASSPHRASE", 14)) {
- gpg->bad_passwds++;
-
- camel_session_forget_password (gpg->session, NULL, gpg->userid, ex);
-
- if (gpg->bad_passwds == 3) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
- _("Failed to unlock secret key: 3 bad passphrases given."));
- return -1;
- }
- } else if (!strncmp (status, "UNEXPECTED ", 11)) {
- /* this is an error */
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Unexpected response from GnuPG: %s"),
- status + 11);
- return -1;
- } else if (!strncmp (status, "NODATA", 6)) {
- /* this is an error */
- const char *diagnostics;
-
- diagnostics = gpg_ctx_get_diagnostics (gpg);
- if (diagnostics && *diagnostics)
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, diagnostics);
- else
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
- _("No data provided"));
- return -1;
- } else {
- /* check to see if we are complete */
- switch (gpg->mode) {
- case GPG_CTX_MODE_SIGN:
- if (!strncmp (status, "SIG_CREATED ", 12)) {
- /* FIXME: save this state? */
- }
- break;
- case GPG_CTX_MODE_VERIFY:
- if (!strncmp (status, "TRUST_", 6)) {
- status += 6;
- if (!strncmp (status, "NEVER", 5)) {
- gpg->trust = GPG_TRUST_NEVER;
- } else if (!strncmp (status, "MARGINAL", 8)) {
- gpg->trust = GPG_TRUST_MARGINAL;
- } else if (!strncmp (status, "FULLY", 5)) {
- gpg->trust = GPG_TRUST_FULLY;
- } else if (!strncmp (status, "ULTIMATE", 8)) {
- gpg->trust = GPG_TRUST_ULTIMATE;
- }
- } else if (!strncmp (status, "VALIDSIG", 8)) {
- gpg->validsig = TRUE;
- } else if (!strncmp (status, "BADSIG", 6)) {
- gpg->validsig = FALSE;
- } else if (!strncmp (status, "ERRSIG", 6)) {
- /* Note: NO_PUBKEY often comes after an ERRSIG, but do we really care? */
- gpg->validsig = FALSE;
- }
- break;
- case GPG_CTX_MODE_ENCRYPT:
- if (!strncmp (status, "BEGIN_ENCRYPTION", 16)) {
- /* nothing to do... but we know to expect data on stdout soon */
- } else if (!strncmp (status, "END_ENCRYPTION", 14)) {
- /* nothing to do, but we know the end is near? */
- } else if (!strncmp (status, "NO_RECP", 7)) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to encrypt: No valid recipients specified."));
- return -1;
- }
- break;
- case GPG_CTX_MODE_DECRYPT:
- if (!strncmp (status, "BEGIN_DECRYPTION", 16)) {
- /* nothing to do... but we know to expect data on stdout soon */
- } else if (!strncmp (status, "END_DECRYPTION", 14)) {
- /* nothing to do, but we know the end is near? */
- }
- break;
- case GPG_CTX_MODE_IMPORT:
- /* noop */
- break;
- case GPG_CTX_MODE_EXPORT:
- /* noop */
- break;
- }
- }
-
- recycle:
-
- /* recycle our statusbuf by moving inptr to the beginning of statusbuf */
- len = gpg->statusptr - inptr;
- memmove (gpg->statusbuf, inptr, len);
-
- len = inptr - gpg->statusbuf;
- gpg->statusleft += len;
- gpg->statusptr -= len;
-
- /* if we have more data, try parsing the next line? */
- if (gpg->statusptr > gpg->statusbuf)
- goto parse;
-
- return 0;
-}
-
-#define status_backup(gpg, start, len) G_STMT_START { \
- if (gpg->statusleft <= len) { \
- unsigned int slen, soff; \
- \
- slen = soff = gpg->statusptr - gpg->statusbuf; \
- slen = slen ? slen : 1; \
- \
- while (slen < soff + len) \
- slen <<= 1; \
- \
- gpg->statusbuf = g_realloc (gpg->statusbuf, slen + 1); \
- gpg->statusptr = gpg->statusbuf + soff; \
- gpg->statusleft = slen - soff; \
- } \
- \
- memcpy (gpg->statusptr, start, len); \
- gpg->statusptr += len; \
- gpg->statusleft -= len; \
-} G_STMT_END
-
-static int
-gpg_ctx_op_step (struct _GpgCtx *gpg, CamelException *ex)
-{
- fd_set rdset, wrset, *wrsetp = NULL;
- const char *diagnostics;
- struct timeval timeout;
- const char *mode;
- int maxfd = 0;
- int ready;
-
- retry:
- FD_ZERO (&rdset);
-
- if (!gpg->seen_eof1) {
- FD_SET (gpg->stdout_fd, &rdset);
- maxfd = MAX (maxfd, gpg->stdout_fd);
- }
-
- if (!gpg->seen_eof2) {
- FD_SET (gpg->stderr_fd, &rdset);
- maxfd = MAX (maxfd, gpg->stderr_fd);
- }
-
- if (!gpg->complete) {
- FD_SET (gpg->status_fd, &rdset);
- maxfd = MAX (maxfd, gpg->status_fd);
- }
-
- if (gpg->stdin_fd != -1 || gpg->passwd_fd != -1) {
- FD_ZERO (&wrset);
- if (gpg->stdin_fd != -1) {
- FD_SET (gpg->stdin_fd, &wrset);
- maxfd = MAX (maxfd, gpg->stdin_fd);
- }
- if (gpg->passwd_fd != -1) {
- FD_SET (gpg->passwd_fd, &wrset);
- maxfd = MAX (maxfd, gpg->passwd_fd);
- }
-
- wrsetp = &wrset;
- }
-
- g_assert (maxfd > 0);
-
- timeout.tv_sec = 10; /* timeout in seconds */
- timeout.tv_usec = 0;
-
- if ((ready = select (maxfd + 1, &rdset, wrsetp, NULL, &timeout)) == 0)
- return 0;
-
- if (ready < 0) {
- if (errno == EINTR)
- goto retry;
-
- d(printf ("select() failed: %s\n", strerror (errno)));
-
- return -1;
- }
-
- /* Test each and every file descriptor to see if it's 'ready',
- and if so - do what we can with it and then drop through to
- the next file descriptor and so on until we've done what we
- can to all of them. If one fails along the way, return
- -1. */
-
- if (FD_ISSET (gpg->status_fd, &rdset)) {
- /* read the status message and decide what to do... */
- char buffer[4096];
- ssize_t nread;
-
- d(printf ("reading from gpg's status-fd...\n"));
-
- do {
- nread = read (gpg->status_fd, buffer, sizeof (buffer));
- } while (nread == -1 && (errno == EINTR || errno == EAGAIN));
- if (nread == -1)
- goto exception;
-
- if (nread > 0) {
- status_backup (gpg, buffer, nread);
-
- if (gpg_ctx_parse_status (gpg, ex) == -1)
- return -1;
- } else {
- gpg->complete = TRUE;
- }
- }
-
- if (FD_ISSET (gpg->stdout_fd, &rdset) && gpg->ostream) {
- char buffer[4096];
- ssize_t nread;
-
- d(printf ("reading gpg's stdout...\n"));
-
- do {
- nread = read (gpg->stdout_fd, buffer, sizeof (buffer));
- } while (nread == -1 && (errno == EINTR || errno == EAGAIN));
- if (nread == -1)
- goto exception;
-
- if (nread > 0) {
- if (camel_stream_write (gpg->ostream, buffer, (size_t) nread) == -1)
- goto exception;
- } else {
- gpg->seen_eof1 = TRUE;
- }
- }
-
- if (FD_ISSET (gpg->stderr_fd, &rdset)) {
- char buffer[4096];
- ssize_t nread;
-
- d(printf ("reading gpg's stderr...\n"));
-
- do {
- nread = read (gpg->stderr_fd, buffer, sizeof (buffer));
- } while (nread == -1 && (errno == EINTR || errno == EAGAIN));
- if (nread == -1)
- goto exception;
-
- if (nread > 0) {
- camel_stream_write (gpg->diagnostics, buffer, nread);
- } else {
- gpg->seen_eof2 = TRUE;
- }
- }
-
- if (wrsetp && gpg->passwd_fd != -1 && FD_ISSET (gpg->passwd_fd, &wrset) && gpg->need_passwd && gpg->send_passwd) {
- ssize_t w, nwritten = 0;
- size_t n;
-
- d(printf ("sending gpg our passphrase...\n"));
-
- /* send the passphrase to gpg */
- n = strlen (gpg->passwd);
- do {
- do {
- w = write (gpg->passwd_fd, gpg->passwd + nwritten, n - nwritten);
- } while (w == -1 && (errno == EINTR || errno == EAGAIN));
-
- if (w > 0)
- nwritten += w;
- } while (nwritten < n && w != -1);
-
- /* zero and free our passwd buffer */
- memset (gpg->passwd, 0, n);
- g_free (gpg->passwd);
- gpg->passwd = NULL;
-
- if (w == -1)
- goto exception;
-
- gpg->send_passwd = FALSE;
- }
-
- if (gpg->istream && wrsetp && gpg->stdin_fd != -1 && FD_ISSET (gpg->stdin_fd, &wrset)) {
- char buffer[4096];
- ssize_t nread;
-
- d(printf ("writing to gpg's stdin...\n"));
-
- /* write our stream to gpg's stdin */
- nread = camel_stream_read (gpg->istream, buffer, sizeof (buffer));
- if (nread > 0) {
- ssize_t w, nwritten = 0;
-
- do {
- do {
- w = write (gpg->stdin_fd, buffer + nwritten, nread - nwritten);
- } while (w == -1 && (errno == EINTR || errno == EAGAIN));
-
- if (w > 0)
- nwritten += w;
- } while (nwritten < nread && w != -1);
-
- d(printf ("wrote %d (out of %d) bytes to gpg's stdin\n", nwritten, nread));
-
- if (w == -1)
- goto exception;
- }
-
- if (camel_stream_eos (gpg->istream)) {
- d(printf ("closing gpg's stdin\n"));
- close (gpg->stdin_fd);
- gpg->stdin_fd = -1;
- }
- }
-
- return 0;
-
- exception:
-
- switch (gpg->mode) {
- case GPG_CTX_MODE_SIGN:
- mode = "sign";
- break;
- case GPG_CTX_MODE_VERIFY:
- mode = "verify";
- break;
- case GPG_CTX_MODE_ENCRYPT:
- mode = "encrypt";
- break;
- case GPG_CTX_MODE_DECRYPT:
- mode = "decrypt";
- break;
- case GPG_CTX_MODE_IMPORT:
- mode = "import keys";
- break;
- case GPG_CTX_MODE_EXPORT:
- mode = "export keys";
- break;
- default:
- g_assert_not_reached ();
- mode = NULL;
- break;
- }
-
- diagnostics = gpg_ctx_get_diagnostics (gpg);
- if (diagnostics && *diagnostics) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to GPG %s: %s\n\n%s"),
- mode, g_strerror (errno),
- diagnostics);
- } else {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to GPG %s: %s\n"),
- mode, g_strerror (errno));
- }
-
- return -1;
-}
-
-static gboolean
-gpg_ctx_op_complete (struct _GpgCtx *gpg)
-{
- return gpg->complete && gpg->seen_eof1 && gpg->seen_eof2;
-}
-
-#if 0
-static gboolean
-gpg_ctx_op_exited (struct _GpgCtx *gpg)
-{
- pid_t retval;
- int status;
-
- if (gpg->exited)
- return TRUE;
-
- retval = waitpid (gpg->pid, &status, WNOHANG);
- if (retval == gpg->pid) {
- gpg->exit_status = status;
- gpg->exited = TRUE;
- return TRUE;
- }
-
- return FALSE;
-}
-#endif
-
-static void
-gpg_ctx_op_cancel (struct _GpgCtx *gpg)
-{
- pid_t retval;
- int status;
-
- if (gpg->exited)
- return;
-
- kill (gpg->pid, SIGTERM);
- sleep (1);
- retval = waitpid (gpg->pid, &status, WNOHANG);
- if (retval == (pid_t) 0) {
- /* no more mr nice guy... */
- kill (gpg->pid, SIGKILL);
- sleep (1);
- waitpid (gpg->pid, &status, WNOHANG);
- }
-}
-
-static int
-gpg_ctx_op_wait (struct _GpgCtx *gpg)
-{
- sigset_t mask, omask;
- pid_t retval;
- int status;
-
- if (!gpg->exited) {
- sigemptyset (&mask);
- sigaddset (&mask, SIGALRM);
- sigprocmask (SIG_BLOCK, &mask, &omask);
- alarm (1);
- retval = waitpid (gpg->pid, &status, 0);
- alarm (0);
- sigprocmask (SIG_SETMASK, &omask, NULL);
-
- if (retval == (pid_t) -1 && errno == EINTR) {
- /* The child is hanging: send a friendly reminder. */
- kill (gpg->pid, SIGTERM);
- sleep (1);
- retval = waitpid (gpg->pid, &status, WNOHANG);
- if (retval == (pid_t) 0) {
- /* Still hanging; use brute force. */
- kill (gpg->pid, SIGKILL);
- sleep (1);
- retval = waitpid (gpg->pid, &status, WNOHANG);
- }
- }
- } else {
- status = gpg->exit_status;
- retval = gpg->pid;
- }
-
- if (retval != (pid_t) -1 && WIFEXITED (status))
- return WEXITSTATUS (status);
- else
- return -1;
-}
-
-
-
-static int
-gpg_sign (CamelCipherContext *context, const char *userid, CamelCipherHash hash, CamelMimePart *ipart, CamelMimePart *opart, CamelException *ex)
-{
- struct _GpgCtx *gpg;
- CamelStream *ostream = camel_stream_mem_new(), *istream;
- CamelDataWrapper *dw;
- CamelContentType *ct;
- int res = -1;
- CamelMimePart *sigpart;
- CamelMultipartSigned *mps;
-
- /* Note: see rfc2015 or rfc3156, section 5 */
-
- /* FIXME: stream this, we stream output at least */
- istream = camel_stream_mem_new();
- if (camel_cipher_canonical_to_stream(ipart, CAMEL_MIME_FILTER_CANON_STRIP|CAMEL_MIME_FILTER_CANON_CRLF|CAMEL_MIME_FILTER_CANON_FROM,
- istream) == -1) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not generate signing data: %s"), g_strerror(errno));
- goto fail;
- }
-
- gpg = gpg_ctx_new (context->session);
- gpg_ctx_set_mode (gpg, GPG_CTX_MODE_SIGN);
- gpg_ctx_set_hash (gpg, hash);
- gpg_ctx_set_armor (gpg, TRUE);
- gpg_ctx_set_userid (gpg, userid);
- gpg_ctx_set_istream (gpg, istream);
- gpg_ctx_set_ostream (gpg, ostream);
-
- if (gpg_ctx_op_start (gpg) == -1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to execute gpg: %s"), g_strerror (errno));
- goto fail;
- }
-
- while (!gpg_ctx_op_complete (gpg)) {
- if (camel_operation_cancel_check (NULL)) {
- camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL,
- _("Cancelled."));
- gpg_ctx_op_cancel (gpg);
- goto fail;
- }
-
- if (gpg_ctx_op_step (gpg, ex) == -1) {
- gpg_ctx_op_cancel (gpg);
- goto fail;
- }
- }
-
- if (gpg_ctx_op_wait (gpg) != 0) {
- const char *diagnostics;
-
- diagnostics = gpg_ctx_get_diagnostics (gpg);
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
- diagnostics && *diagnostics ? diagnostics :
- _("Failed to execute gpg."));
- goto fail;
- }
-
- res = 0;
-
- dw = camel_data_wrapper_new();
- camel_stream_reset(ostream);
- camel_data_wrapper_construct_from_stream(dw, ostream);
-
- sigpart = camel_mime_part_new();
- ct = camel_content_type_new("application", "pgp-signature");
- camel_content_type_set_param(ct, "name", "signature.asc");
- camel_data_wrapper_set_mime_type_field(dw, ct);
- camel_content_type_unref(ct);
-
- camel_medium_set_content_object((CamelMedium *)sigpart, dw);
- camel_object_unref(dw);
-
- camel_mime_part_set_description(sigpart, _("This is a digitally signed message part"));
-
- mps = camel_multipart_signed_new();
- ct = camel_content_type_new("multipart", "signed");
- camel_content_type_set_param(ct, "micalg", camel_cipher_hash_to_id(context, hash));
- camel_content_type_set_param(ct, "protocol", context->sign_protocol);
- camel_data_wrapper_set_mime_type_field((CamelDataWrapper *)mps, ct);
- camel_content_type_unref(ct);
- camel_multipart_set_boundary((CamelMultipart *)mps, NULL);
-
- mps->signature = sigpart;
- mps->contentraw = istream;
- camel_stream_reset(istream);
- camel_object_ref(istream);
-
- camel_medium_set_content_object((CamelMedium *)opart, (CamelDataWrapper *)mps);
-fail:
- camel_object_unref(ostream);
- gpg_ctx_free (gpg);
-
- return res;
-}
-
-
-static char *
-swrite (CamelMimePart *sigpart)
-{
- CamelStream *ostream;
- char *template;
- int fd, ret;
-
- template = g_strdup ("/tmp/evolution-pgp.XXXXXX");
- fd = mkstemp (template);
- if (fd == -1) {
- g_free (template);
- return NULL;
- }
-
- /* TODO: This should probably just write the decoded message content out, not the part + headers */
-
- ostream = camel_stream_fs_new_with_fd (fd);
- ret = camel_data_wrapper_write_to_stream((CamelDataWrapper *)sigpart, ostream);
- if (ret != -1) {
- ret = camel_stream_flush (ostream);
- if (ret != -1)
- ret = camel_stream_close (ostream);
- }
-
- camel_object_unref(ostream);
-
- if (ret == -1) {
- unlink (template);
- g_free (template);
- return NULL;
- }
-
- return template;
-}
-
-static CamelCipherValidity *
-gpg_verify (CamelCipherContext *context, CamelMimePart *ipart, CamelException *ex)
-{
- CamelCipherValidity *validity;
- const char *diagnostics = NULL, *tmp;
- struct _GpgCtx *gpg = NULL;
- char *sigfile = NULL;
- gboolean valid;
- CamelContentType *ct;
- CamelMimePart *sigpart, *datapart;
- CamelStream *istream = NULL;
- CamelMultipart *mps;
-
- ct = camel_mime_part_get_content_type(ipart);
- tmp = camel_content_type_param(ct, "protocol");
- mps = (CamelMultipart *)camel_medium_get_content_object((CamelMedium *)ipart);
- if (!camel_content_type_is(ct, "multipart", "signed")
- || !CAMEL_IS_MULTIPART_SIGNED(mps)
- || tmp == NULL
- || g_ascii_strcasecmp(tmp, context->sign_protocol) != 0) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot verify message signature: Incorrect message format"));
- return NULL;
- }
-
- datapart = camel_multipart_get_part(mps, CAMEL_MULTIPART_SIGNED_CONTENT);
- sigpart = camel_multipart_get_part(mps, CAMEL_MULTIPART_SIGNED_SIGNATURE);
-
- if (sigpart == NULL || datapart == NULL) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot verify message signature: Incorrect message format"));
- goto exception;
- }
-
- sigfile = swrite (sigpart);
- if (sigfile == NULL) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot verify message signature: could not create temp file: %s"),
- g_strerror (errno));
- goto exception;
- }
-
- istream = camel_stream_mem_new();
- camel_cipher_canonical_to_stream(datapart, CAMEL_MIME_FILTER_CANON_CRLF, istream);
- camel_stream_reset(istream);
-
- gpg = gpg_ctx_new (context->session);
- gpg_ctx_set_mode (gpg, GPG_CTX_MODE_VERIFY);
- gpg_ctx_set_hash (gpg, camel_cipher_id_to_hash(context, camel_content_type_param(ct, "micalg")));
- gpg_ctx_set_sigfile (gpg, sigfile);
- gpg_ctx_set_istream (gpg, istream);
-
- if (gpg_ctx_op_start (gpg) == -1) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to execute gpg."));
- gpg_ctx_free (gpg);
- goto exception;
- }
-
- while (!gpg_ctx_op_complete (gpg)) {
- if (camel_operation_cancel_check (NULL)) {
- camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL,
- _("Cancelled."));
- gpg_ctx_op_cancel (gpg);
- goto exception;
- }
-
- if (gpg_ctx_op_step (gpg, ex) == -1) {
- gpg_ctx_op_cancel (gpg);
- goto exception;
- }
- }
-
- valid = gpg_ctx_op_wait (gpg) == 0;
- validity = camel_cipher_validity_new ();
- diagnostics = gpg_ctx_get_diagnostics (gpg);
- camel_cipher_validity_set_valid (validity, valid);
- camel_cipher_validity_set_description (validity, diagnostics);
- gpg_ctx_free (gpg);
-
- if (sigfile) {
- unlink (sigfile);
- g_free (sigfile);
- }
-
- return validity;
-
- exception:
-
- gpg_ctx_free (gpg);
-
- if (istream)
- camel_object_unref(istream);
-
- if (sigfile) {
- unlink (sigfile);
- g_free (sigfile);
- }
-
- return NULL;
-}
-
-static int
-gpg_encrypt (CamelCipherContext *context, const char *userid, GPtrArray *recipients, struct _CamelMimePart *ipart, struct _CamelMimePart *opart, CamelException *ex)
-{
- CamelGpgContext *ctx = (CamelGpgContext *) context;
- struct _GpgCtx *gpg;
- int i, res = -1;
- CamelStream *istream, *ostream, *vstream;
- CamelMimePart *encpart, *verpart;
- CamelDataWrapper *dw;
- CamelContentType *ct;
- CamelMultipartEncrypted *mpe;
-
- ostream = camel_stream_mem_new();
- istream = camel_stream_mem_new();
- if (camel_cipher_canonical_to_stream(ipart, CAMEL_MIME_FILTER_CANON_CRLF, istream) == -1) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not generate encrypting data: %s"), g_strerror(errno));
- goto fail1;
- }
-
- gpg = gpg_ctx_new (context->session);
- gpg_ctx_set_mode (gpg, GPG_CTX_MODE_ENCRYPT);
- gpg_ctx_set_armor (gpg, TRUE);
- gpg_ctx_set_userid (gpg, userid);
- gpg_ctx_set_istream (gpg, istream);
- gpg_ctx_set_ostream (gpg, ostream);
- gpg_ctx_set_always_trust (gpg, ctx->always_trust);
-
- for (i = 0; i < recipients->len; i++) {
- gpg_ctx_add_recipient (gpg, recipients->pdata[i]);
- }
-
- if (gpg_ctx_op_start (gpg) == -1) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, _("Failed to execute gpg."));
- goto fail;
- }
-
- /* FIXME: move tihs to a common routine */
- while (!gpg_ctx_op_complete(gpg)) {
- if (camel_operation_cancel_check(NULL)) {
- camel_exception_set(ex, CAMEL_EXCEPTION_USER_CANCEL, _("Cancelled."));
- gpg_ctx_op_cancel(gpg);
- goto fail;
- }
-
- if (gpg_ctx_op_step (gpg, ex) == -1) {
- gpg_ctx_op_cancel (gpg);
- goto fail;
- }
- }
-
- if (gpg_ctx_op_wait (gpg) != 0) {
- const char *diagnostics;
-
- diagnostics = gpg_ctx_get_diagnostics (gpg);
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
- diagnostics && *diagnostics ? diagnostics : _("Failed to execute gpg."));
- goto fail;
- }
-
- res = 0;
-
- dw = camel_data_wrapper_new();
- camel_data_wrapper_construct_from_stream(dw, ostream);
-
- encpart = camel_mime_part_new();
- ct = camel_content_type_new("application", "octet-stream");
- camel_content_type_set_param(ct, "name", "encrypted.asc");
- camel_data_wrapper_set_mime_type_field(dw, ct);
- camel_content_type_unref(ct);
-
- camel_medium_set_content_object((CamelMedium *)encpart, dw);
- camel_object_unref(dw);
-
- camel_mime_part_set_description(encpart, _("This is a digitally encrypted message part"));
-
- vstream = camel_stream_mem_new();
- camel_stream_write(vstream, "Version: 1\n", strlen("Version: 1\n"));
- camel_stream_reset(vstream);
-
- verpart = camel_mime_part_new();
- dw = camel_data_wrapper_new();
- camel_data_wrapper_set_mime_type(dw, context->encrypt_protocol);
- camel_data_wrapper_construct_from_stream(dw, vstream);
- camel_object_unref(vstream);
- camel_medium_set_content_object((CamelMedium *)verpart, dw);
- camel_object_unref(dw);
-
- mpe = camel_multipart_encrypted_new();
- ct = camel_content_type_new("multipart", "encrypted");
- camel_content_type_set_param(ct, "protocol", context->encrypt_protocol);
- camel_data_wrapper_set_mime_type_field((CamelDataWrapper *)mpe, ct);
- camel_content_type_unref(ct);
- camel_multipart_set_boundary((CamelMultipart *)mpe, NULL);
-
- mpe->decrypted = ipart;
- camel_object_ref(ipart);
-
- camel_multipart_add_part((CamelMultipart *)mpe, verpart);
- camel_object_unref(verpart);
- camel_multipart_add_part((CamelMultipart *)mpe, encpart);
- camel_object_unref(encpart);
-
- camel_medium_set_content_object((CamelMedium *)opart, (CamelDataWrapper *)mpe);
-fail:
- gpg_ctx_free(gpg);
-fail1:
- camel_object_unref(istream);
- camel_object_unref(ostream);
-
- return res;
-}
-
-static CamelCipherValidity *
-gpg_decrypt(CamelCipherContext *context, CamelMimePart *ipart, CamelMimePart *opart, CamelException *ex)
-{
- struct _GpgCtx *gpg;
- CamelCipherValidity *valid = NULL;
- CamelStream *ostream, *istream;
-
- istream = camel_stream_mem_new();
- camel_data_wrapper_write_to_stream(camel_medium_get_content_object((CamelMedium *)ipart), istream);
- camel_stream_reset(istream);
-
- /* TODO: de-canonicalise end of lines? */
- /*stream = camel_stream_mem_new ();
- filtered_stream = (CamelStream *) camel_stream_filter_new_with_stream (stream);
- crlf_filter = camel_mime_filter_crlf_new (CAMEL_MIME_FILTER_CRLF_DECODE,
- CAMEL_MIME_FILTER_CRLF_MODE_CRLF_ONLY);
- camel_stream_filter_add (CAMEL_STREAM_FILTER (filtered_stream), crlf_filter);
- camel_object_unref (crlf_filter);*/
- ostream = camel_stream_mem_new();
-
- gpg = gpg_ctx_new (context->session);
- gpg_ctx_set_mode (gpg, GPG_CTX_MODE_DECRYPT);
- gpg_ctx_set_istream (gpg, istream);
- gpg_ctx_set_ostream (gpg, ostream);
-
- if (gpg_ctx_op_start (gpg) == -1) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to execute gpg."));
- goto fail;
- }
-
- while (!gpg_ctx_op_complete (gpg)) {
- if (camel_operation_cancel_check (NULL)) {
- camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL,
- _("Cancelled."));
- gpg_ctx_op_cancel (gpg);
- goto fail;
- }
-
- if (gpg_ctx_op_step (gpg, ex) == -1) {
- gpg_ctx_op_cancel (gpg);
- goto fail;
- }
- }
-
- if (gpg_ctx_op_wait (gpg) != 0) {
- const char *diagnostics;
-
- diagnostics = gpg_ctx_get_diagnostics (gpg);
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
- diagnostics && *diagnostics ? diagnostics :
- _("Failed to execute gpg."));
- goto fail;
- }
-
- camel_stream_reset(ostream);
- if (camel_data_wrapper_construct_from_stream((CamelDataWrapper *)opart, ostream) != -1) {
- valid = camel_cipher_validity_new();
- valid->encrypt.description = g_strdup(_("Encrypted content"));
- valid->encrypt.status = CAMEL_CIPHER_VALIDITY_ENCRYPT_ENCRYPTED;
- } else {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Unable to parse message content"));
- }
-fail:
- camel_object_unref(ostream);
- camel_object_unref(istream);
- gpg_ctx_free (gpg);
-
- return valid;
-}
-
-static int
-gpg_import_keys (CamelCipherContext *context, CamelStream *istream, CamelException *ex)
-{
- struct _GpgCtx *gpg;
-
- gpg = gpg_ctx_new (context->session);
- gpg_ctx_set_mode (gpg, GPG_CTX_MODE_IMPORT);
- gpg_ctx_set_istream (gpg, istream);
-
- if (gpg_ctx_op_start (gpg) == -1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to execute gpg: %s"),
- errno ? g_strerror (errno) : _("Unknown"));
- gpg_ctx_free (gpg);
-
- return -1;
- }
-
- while (!gpg_ctx_op_complete (gpg)) {
- if (gpg_ctx_op_step (gpg, ex) == -1) {
- gpg_ctx_op_cancel (gpg);
- gpg_ctx_free (gpg);
-
- return -1;
- }
- }
-
- if (gpg_ctx_op_wait (gpg) != 0) {
- const char *diagnostics;
-
- diagnostics = gpg_ctx_get_diagnostics (gpg);
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
- diagnostics && *diagnostics ? diagnostics :
- _("Failed to execute gpg."));
-
- gpg_ctx_free (gpg);
-
- return -1;
- }
-
- gpg_ctx_free (gpg);
-
- return 0;
-}
-
-static int
-gpg_export_keys (CamelCipherContext *context, GPtrArray *keys, CamelStream *ostream, CamelException *ex)
-{
- struct _GpgCtx *gpg;
- int i;
-
- gpg = gpg_ctx_new (context->session);
- gpg_ctx_set_mode (gpg, GPG_CTX_MODE_EXPORT);
- gpg_ctx_set_armor (gpg, TRUE);
- gpg_ctx_set_ostream (gpg, ostream);
-
- for (i = 0; i < keys->len; i++) {
- gpg_ctx_add_recipient (gpg, keys->pdata[i]);
- }
-
- if (gpg_ctx_op_start (gpg) == -1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to execute gpg: %s"),
- errno ? g_strerror (errno) : _("Unknown"));
- gpg_ctx_free (gpg);
-
- return -1;
- }
-
- while (!gpg_ctx_op_complete (gpg)) {
- if (gpg_ctx_op_step (gpg, ex) == -1) {
- gpg_ctx_op_cancel (gpg);
- gpg_ctx_free (gpg);
-
- return -1;
- }
- }
-
- if (gpg_ctx_op_wait (gpg) != 0) {
- const char *diagnostics;
-
- diagnostics = gpg_ctx_get_diagnostics (gpg);
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
- diagnostics && *diagnostics ? diagnostics :
- _("Failed to execute gpg."));
-
- gpg_ctx_free (gpg);
-
- return -1;
- }
-
- gpg_ctx_free (gpg);
-
- return 0;
-}
-
-/* ********************************************************************** */
-
-static void
-camel_gpg_context_class_init (CamelGpgContextClass *klass)
-{
- CamelCipherContextClass *cipher_class = CAMEL_CIPHER_CONTEXT_CLASS (klass);
-
- parent_class = CAMEL_CIPHER_CONTEXT_CLASS (camel_type_get_global_classfuncs (camel_cipher_context_get_type ()));
-
- cipher_class->hash_to_id = gpg_hash_to_id;
- cipher_class->id_to_hash = gpg_id_to_hash;
- cipher_class->sign = gpg_sign;
- cipher_class->verify = gpg_verify;
- cipher_class->encrypt = gpg_encrypt;
- cipher_class->decrypt = gpg_decrypt;
- cipher_class->import_keys = gpg_import_keys;
- cipher_class->export_keys = gpg_export_keys;
-}
-
-static void
-camel_gpg_context_init (CamelGpgContext *context)
-{
- CamelCipherContext *cipher = (CamelCipherContext *) context;
-
- context->always_trust = FALSE;
-
- cipher->sign_protocol = "application/pgp-signature";
- cipher->encrypt_protocol = "application/pgp-encrypted";
- cipher->key_protocol = "application/pgp-keys";
-}
-
-static void
-camel_gpg_context_finalise (CamelObject *object)
-{
- ;
-}
-
-CamelType
-camel_gpg_context_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_cipher_context_get_type (),
- "CamelGpgContext",
- sizeof (CamelGpgContext),
- sizeof (CamelGpgContextClass),
- (CamelObjectClassInitFunc) camel_gpg_context_class_init,
- NULL,
- (CamelObjectInitFunc) camel_gpg_context_init,
- (CamelObjectFinalizeFunc) camel_gpg_context_finalise);
- }
-
- return type;
-}
-
-
diff --git a/camel/camel-gpg-context.h b/camel/camel-gpg-context.h
deleted file mode 100644
index 0d98fed75d..0000000000
--- a/camel/camel-gpg-context.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 2002 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_GPG_CONTEXT_H__
-#define __CAMEL_GPG_CONTEXT_H__
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <camel/camel-cipher-context.h>
-
-#define CAMEL_GPG_CONTEXT_TYPE (camel_gpg_context_get_type ())
-#define CAMEL_GPG_CONTEXT(obj) (CAMEL_CHECK_CAST((obj), CAMEL_GPG_CONTEXT_TYPE, CamelGpgContext))
-#define CAMEL_GPG_CONTEXT_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_GPG_CONTEXT_TYPE, CamelGpgContextClass))
-#define CAMEL_IS_GPG_CONTEXT(o) (CAMEL_CHECK_TYPE((o), CAMEL_GPG_CONTEXT_TYPE))
-
-typedef struct _CamelGpgContext CamelGpgContext;
-typedef struct _CamelGpgContextClass CamelGpgContextClass;
-
-struct _CamelGpgContext {
- CamelCipherContext parent_object;
-
- gboolean always_trust;
-};
-
-struct _CamelGpgContextClass {
- CamelCipherContextClass parent_class;
-
-};
-
-
-CamelType camel_gpg_context_get_type (void);
-
-CamelCipherContext *camel_gpg_context_new (CamelSession *session);
-
-void camel_gpg_context_set_always_trust (CamelGpgContext *ctx, gboolean trust);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __CAMEL_GPG_CONTEXT_H__ */
diff --git a/camel/camel-html-parser.c b/camel/camel-html-parser.c
deleted file mode 100644
index 31c0aee15b..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, 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 <glib/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, GUINT_TO_POINTER(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 = GPOINTER_TO_UINT(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 2e68e3bdff..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, 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;
-};
-
-CamelType 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-http-stream.c b/camel/camel-http-stream.c
deleted file mode 100644
index b754422a3a..0000000000
--- a/camel/camel-http-stream.c
+++ /dev/null
@@ -1,583 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2002 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 <ctype.h>
-#include <errno.h>
-
-#include "camel-http-stream.h"
-
-#include "camel-mime-utils.h"
-#include "camel-stream-buffer.h"
-#include "camel-tcp-stream-raw.h"
-#ifdef HAVE_SSL
-#include "camel-tcp-stream-ssl.h"
-#endif
-#include "camel-exception.h"
-#include "camel-session.h"
-#include "camel-service.h" /* for hostname stuff */
-
-#define d(x) x
-
-
-static CamelStreamClass *parent_class = NULL;
-
-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_reset (CamelStream *stream);
-
-static void
-camel_http_stream_class_init (CamelHttpStreamClass *camel_http_stream_class)
-{
- CamelStreamClass *camel_stream_class =
- CAMEL_STREAM_CLASS (camel_http_stream_class);
-
- parent_class = CAMEL_STREAM_CLASS (camel_type_get_global_classfuncs (camel_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_stream_class->reset = stream_reset;
-}
-
-static void
-camel_http_stream_init (gpointer object, gpointer klass)
-{
- CamelHttpStream *http = CAMEL_HTTP_STREAM (object);
-
- http->parser = NULL;
- http->content_type = NULL;
- http->headers = NULL;
- http->session = NULL;
- http->url = NULL;
- http->proxy = NULL;
- http->authrealm = NULL;
- http->authpass = NULL;
- http->statuscode = 0;
- http->raw = NULL;
-}
-
-static void
-camel_http_stream_finalize (CamelObject *object)
-{
- CamelHttpStream *http = CAMEL_HTTP_STREAM (object);
-
- if (http->parser)
- camel_object_unref(http->parser);
-
- if (http->content_type)
- camel_content_type_unref (http->content_type);
-
- if (http->headers)
- camel_header_raw_clear (&http->headers);
-
- if (http->session)
- camel_object_unref(http->session);
-
- if (http->url)
- camel_url_free (http->url);
-
- if (http->proxy)
- camel_url_free (http->proxy);
-
- g_free (http->authrealm);
- g_free (http->authpass);
-
- if (http->raw)
- camel_object_unref(http->raw);
- if (http->read)
- camel_object_unref(http->read);
-}
-
-CamelType
-camel_http_stream_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_stream_get_type (),
- "CamelHttpStream",
- sizeof (CamelHttpStream),
- sizeof (CamelHttpStreamClass),
- (CamelObjectClassInitFunc) camel_http_stream_class_init,
- NULL,
- (CamelObjectInitFunc) camel_http_stream_init,
- (CamelObjectFinalizeFunc) camel_http_stream_finalize);
- }
-
- return type;
-}
-
-/**
- * camel_http_stream_new:
- * @method: HTTP method
- * @session: active session
- * @url: URL to act upon
- *
- * Return value: a http stream
- **/
-CamelStream *
-camel_http_stream_new (CamelHttpMethod method, struct _CamelSession *session, CamelURL *url)
-{
- CamelHttpStream *stream;
- char *str;
-
- g_return_val_if_fail(CAMEL_IS_SESSION(session), NULL);
- g_return_val_if_fail(url != NULL, NULL);
-
- stream = CAMEL_HTTP_STREAM (camel_object_new (camel_http_stream_get_type ()));
-
- stream->method = method;
- stream->session = session;
- camel_object_ref(session);
-
- str = camel_url_to_string (url, 0);
- stream->url = camel_url_new (str, NULL);
- g_free (str);
-
- return (CamelStream *)stream;
-}
-
-#define SSL_FLAGS (CAMEL_TCP_STREAM_SSL_ENABLE_SSL2 | CAMEL_TCP_STREAM_SSL_ENABLE_SSL3)
-
-static CamelStream *
-http_connect (CamelHttpStream *http, CamelURL *url)
-{
- CamelStream *stream = NULL;
- struct hostent *host;
- int errsave;
-
- if (!strcasecmp (url->protocol, "https")) {
-#ifdef HAVE_SSL
- stream = camel_tcp_stream_ssl_new (http->session, url->host, SSL_FLAGS);
-#endif
- } else {
- stream = camel_tcp_stream_raw_new ();
- }
-
- if (stream == NULL) {
- errno = EINVAL;
- return NULL;
- }
-
- printf("connecting to http stream @ '%s'\n", url->host);
-
- host = camel_gethostbyname (url->host, NULL);
- if (!host) {
- errno = EHOSTUNREACH;
- return NULL;
- }
-
- if (camel_tcp_stream_connect (CAMEL_TCP_STREAM (stream), host, url->port ? url->port : 80) == -1) {
- errsave = errno;
- camel_object_unref (stream);
- camel_free_host (host);
- errno = errsave;
- return NULL;
- }
-
- camel_free_host (host);
-
- http->raw = stream;
- http->read = camel_stream_buffer_new (stream, CAMEL_STREAM_BUFFER_READ);
-
- return stream;
-}
-
-static void
-http_disconnect(CamelHttpStream *http)
-{
- if (http->raw) {
- camel_object_unref(http->raw);
- http->raw = NULL;
- }
-
- if (http->read) {
- camel_object_unref(http->read);
- http->read = NULL;
- }
-
- if (http->parser) {
- camel_object_unref(http->parser);
- http->parser = NULL;
- }
-}
-
-static const char *
-http_next_token (const unsigned char *in)
-{
- const unsigned char *inptr = in;
-
- while (*inptr && !isspace ((int) *inptr))
- inptr++;
-
- while (*inptr && isspace ((int) *inptr))
- inptr++;
-
- return (const char *) inptr;
-}
-
-static int
-http_get_statuscode (CamelHttpStream *http)
-{
- const char *token;
- char buffer[4096];
-
- if (camel_stream_buffer_gets ((CamelStreamBuffer *)http->read, buffer, sizeof (buffer)) <= 0)
- return -1;
-
- d(printf("HTTP Status: %s\n", buffer));
-
- /* parse the HTTP status code */
- if (!strncasecmp (buffer, "HTTP/", 5)) {
- token = http_next_token (buffer);
- http->statuscode = camel_header_decode_int (&token);
- return http->statuscode;
- }
-
- http_disconnect(http);
-
- return -1;
-}
-
-static int
-http_get_headers (CamelHttpStream *http)
-{
- struct _camel_header_raw *headers, *node, *tail;
- const char *type;
- char *buf;
- size_t len;
- int err;
-
- if (http->parser)
- camel_object_unref (http->parser);
-
- http->parser = camel_mime_parser_new ();
- camel_mime_parser_init_with_stream (http->parser, http->read);
-
- switch (camel_mime_parser_step (http->parser, &buf, &len)) {
- case CAMEL_MIME_PARSER_STATE_MESSAGE:
- case CAMEL_MIME_PARSER_STATE_HEADER:
- headers = camel_mime_parser_headers_raw (http->parser);
- if (http->content_type)
- camel_content_type_unref (http->content_type);
- type = camel_header_raw_find (&headers, "Content-Type", NULL);
- if (type)
- http->content_type = camel_content_type_decode (type);
- else
- http->content_type = NULL;
-
- if (http->headers)
- camel_header_raw_clear (&http->headers);
-
- http->headers = NULL;
- tail = (struct _camel_header_raw *) &http->headers;
-
- d(printf("HTTP Headers:\n"));
- while (headers) {
- d(printf(" %s:%s\n", headers->name, headers->value));
- node = g_new (struct _camel_header_raw, 1);
- node->next = NULL;
- node->name = g_strdup (headers->name);
- node->value = g_strdup (headers->value);
- node->offset = headers->offset;
- tail->next = node;
- tail = node;
- headers = headers->next;
- }
-
- break;
- default:
- g_warning ("Invalid state encountered???: %d", camel_mime_parser_state (http->parser));
- }
-
- err = camel_mime_parser_errno (http->parser);
-
- if (err != 0) {
- camel_object_unref (http->parser);
- http->parser = NULL;
- goto exception;
- }
-
- camel_mime_parser_drop_step (http->parser);
-
- return 0;
-
- exception:
- http_disconnect(http);
-
- return -1;
-}
-
-static int
-http_method_invoke (CamelHttpStream *http)
-{
- const char *method = NULL;
- char *url;
-
- switch (http->method) {
- case CAMEL_HTTP_METHOD_GET:
- method = "GET";
- break;
- case CAMEL_HTTP_METHOD_HEAD:
- method = "HEAD";
- break;
- default:
- g_assert_not_reached ();
- }
-
- url = camel_url_to_string (http->url, 0);
- d(printf("HTTP Stream Sending: %s %s HTTP/1.0\r\nUser-Agent: %s\r\nHost: %s\r\n",
- method,
- http->proxy ? url : http->url->path,
- http->user_agent ? http->user_agent : "CamelHttpStream/1.0",
- http->url->host));
- if (camel_stream_printf (http->raw, "%s %s HTTP/1.0\r\nUser-Agent: %s\r\nHost: %s\r\n",
- method,
- http->proxy ? url : http->url->path,
- http->user_agent ? http->user_agent : "CamelHttpStream/1.0",
- http->url->host) == -1) {
- http_disconnect(http);
- g_free (url);
- return -1;
- }
- g_free (url);
-
- if (http->authrealm)
- d(printf("HTTP Stream Sending: WWW-Authenticate: %s\n", http->authrealm));
-
- if (http->authrealm && camel_stream_printf (http->raw, "WWW-Authenticate: %s\r\n", http->authrealm) == -1) {
- http_disconnect(http);
- return -1;
- }
-
- if (http->authpass && http->proxy && camel_stream_printf (http->raw, "Proxy-Authorization: Basic %s\r\n",
- http->authpass) == -1) {
- http_disconnect(http);
- return -1;
- }
-
- /* end the headers */
- if (camel_stream_write (http->raw, "\r\n", 2) == -1 || camel_stream_flush (http->raw) == -1) {
- http_disconnect(http);
- return -1;
- }
-
- return 0;
-}
-
-static ssize_t
-stream_read (CamelStream *stream, char *buffer, size_t n)
-{
- CamelHttpStream *http = CAMEL_HTTP_STREAM (stream);
- const char *parser_buf;
- ssize_t nread;
-
- if (http->method != CAMEL_HTTP_METHOD_GET && http->method != CAMEL_HTTP_METHOD_HEAD) {
- errno = EIO;
- return -1;
- }
-
- redirect:
-
- if (!http->raw) {
- if (http_connect (http, http->proxy ? http->proxy : http->url) == NULL)
- return -1;
-
- if (http_method_invoke (http) == -1)
- return -1;
-
- if (http_get_statuscode (http) == -1)
- return -1;
-
- if (http_get_headers (http) == -1)
- return -1;
-
- switch (http->statuscode) {
- case 200:
- case 206:
- /* we are OK to go... */
- break;
- case 301:
- case 302: {
- char *loc;
-
- camel_content_type_unref (http->content_type);
- http->content_type = NULL;
- http_disconnect(http);
-
- loc = g_strdup(camel_header_raw_find(&http->headers, "Location", NULL));
- if (loc == NULL) {
- camel_header_raw_clear(&http->headers);
- return -1;
- }
-
- /* redirect... */
- g_strstrip(loc);
- d(printf("HTTP redirect, location = %s\n", loc));
- camel_url_free (http->url);
- http->url = camel_url_new(loc, NULL);
- if (http->url == NULL) {
- printf("redirect url '%s' cannot be parsed\n", loc);
- camel_header_raw_clear (&http->headers);
- return -1;
- }
- d(printf(" redirect url = %p\n", http->url));
- camel_header_raw_clear (&http->headers);
-
- goto redirect;
- break; }
- case 407:
- /* failed proxy authentication? */
- default:
- /* unknown error */
- http_disconnect(http);
- return -1;
- }
- }
-
- nread = camel_mime_parser_read (http->parser, &parser_buf, n);
-
- if (nread > 0)
- memcpy (buffer, parser_buf, nread);
- else if (nread == 0)
- stream->eos = TRUE;
-
- return nread;
-}
-
-static ssize_t
-stream_write (CamelStream *stream, const char *buffer, size_t n)
-{
- return -1;
-}
-
-static int
-stream_flush (CamelStream *stream)
-{
- CamelHttpStream *http = (CamelHttpStream *) stream;
-
- if (http->raw)
- return camel_stream_flush (http->raw);
- else
- return 0;
-}
-
-static int
-stream_close (CamelStream *stream)
-{
- CamelHttpStream *http = (CamelHttpStream *) stream;
-
- if (http->raw) {
- if (camel_stream_close (http->raw) == -1)
- return -1;
-
- http_disconnect(http);
- }
-
- return 0;
-}
-
-static int
-stream_reset (CamelStream *stream)
-{
- CamelHttpStream *http = CAMEL_HTTP_STREAM (stream);
-
- if (http->raw)
- http_disconnect(http);
-
- return 0;
-};
-
-CamelContentType *
-camel_http_stream_get_content_type (CamelHttpStream *http_stream)
-{
- g_return_val_if_fail (CAMEL_IS_HTTP_STREAM (http_stream), NULL);
-
- if (!http_stream->content_type && !http_stream->raw) {
- if (http_connect (http_stream, http_stream->url) == NULL)
- return NULL;
-
- if (http_method_invoke (http_stream) == -1)
- return NULL;
-
- if (http_get_headers (http_stream) == -1)
- return NULL;
- }
-
- if (http_stream->content_type)
- camel_content_type_ref (http_stream->content_type);
-
- return http_stream->content_type;
-}
-
-void
-camel_http_stream_set_user_agent (CamelHttpStream *http_stream, const char *user_agent)
-{
- g_return_if_fail (CAMEL_IS_HTTP_STREAM (http_stream));
-
- g_free (http_stream->user_agent);
- http_stream->user_agent = g_strdup (user_agent);
-}
-
-void
-camel_http_stream_set_proxy (CamelHttpStream *http_stream, const char *proxy_url)
-{
- g_return_if_fail (CAMEL_IS_HTTP_STREAM (http_stream));
-
- if (http_stream->proxy)
- camel_url_free (http_stream->proxy);
-
- if (proxy_url == NULL)
- http_stream->proxy = NULL;
- else
- http_stream->proxy = camel_url_new (proxy_url, NULL);
-}
-
-void
-camel_http_stream_set_proxy_authrealm (CamelHttpStream *http_stream, const char *proxy_authrealm)
-{
- g_return_if_fail (CAMEL_IS_HTTP_STREAM (http_stream));
-
- g_free (http_stream->authrealm);
- http_stream->authrealm = g_strdup (proxy_authrealm);
-}
-
-void
-camel_http_stream_set_proxy_authpass (CamelHttpStream *http_stream, const char *proxy_authpass)
-{
- g_return_if_fail (CAMEL_IS_HTTP_STREAM (http_stream));
-
- g_free (http_stream->authpass);
- http_stream->authpass = g_strdup (proxy_authpass);
-}
diff --git a/camel/camel-http-stream.h b/camel/camel-http-stream.h
deleted file mode 100644
index 94272ee6c3..0000000000
--- a/camel/camel-http-stream.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2002 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_HTTP_STREAM_H__
-#define __CAMEL_HTTP_STREAM_H__
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <camel/camel-mime-parser.h>
-#include <camel/camel-mime-utils.h>
-#include <camel/camel-stream.h>
-#include <camel/camel-url.h>
-
-#define CAMEL_HTTP_STREAM_TYPE (camel_http_stream_get_type ())
-#define CAMEL_HTTP_STREAM(obj) (CAMEL_CHECK_CAST((obj), CAMEL_HTTP_STREAM_TYPE, CamelHttpStream))
-#define CAMEL_HTTP_STREAM_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_HTTP_STREAM_TYPE, CamelHttpStreamClass))
-#define CAMEL_IS_HTTP_STREAM(o) (CAMEL_CHECK_TYPE((o), CAMEL_HTTP_STREAM_TYPE))
-
-typedef enum {
- /*CAMEL_HTTP_METHOD_OPTIONS,*/
- CAMEL_HTTP_METHOD_GET,
- CAMEL_HTTP_METHOD_HEAD,
- /*CAMEL_HTTP_METHOD_POST,*/
- /*CAMEL_HTTP_METHOD_PUT,*/
- /*CAMEL_HTTP_METHOD_DELETE,*/
- /*CAMEL_HTTP_METHOD_TRACE,*/
- /*CAMEL_HTTP_METHOD_CONNECT*/
-} CamelHttpMethod;
-
-
-typedef struct _CamelHttpStreamClass CamelHttpStreamClass;
-
-struct _CamelHttpStream {
- CamelStream parent_object;
-
- CamelMimeParser *parser;
-
- CamelContentType *content_type;
- struct _camel_header_raw *headers;
-
- CamelHttpMethod method;
- struct _CamelSession *session;
- CamelURL *url;
-
- char *user_agent;
-
- /* proxy info */
- CamelURL *proxy;
- char *authrealm;
- char *authpass;
-
- int statuscode;
-
- CamelStream *raw;
- CamelStream *read;
-};
-
-struct _CamelHttpStreamClass {
- CamelStreamClass parent_class;
-
- /* Virtual methods */
-};
-
-/* Standard Camel function */
-CamelType camel_http_stream_get_type (void);
-
-/* public methods */
-CamelStream *camel_http_stream_new (CamelHttpMethod method, struct _CamelSession *session, CamelURL *url);
-
-void camel_http_stream_set_user_agent (CamelHttpStream *http_stream, const char *user_agent);
-
-void camel_http_stream_set_proxy (CamelHttpStream *http_stream, const char *proxy_url);
-void camel_http_stream_set_proxy_authrealm (CamelHttpStream *http_stream, const char *proxy_authrealm);
-void camel_http_stream_set_proxy_authpass (CamelHttpStream *http_stream, const char *proxy_authpass);
-
-CamelContentType *camel_http_stream_get_content_type (CamelHttpStream *http_stream);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __CAMEL_HTTP_STREAM_H__ */
diff --git a/camel/camel-i18n.h b/camel/camel-i18n.h
deleted file mode 100644
index 9330fe68d9..0000000000
--- a/camel/camel-i18n.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 2002 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_I18N_H__
-#define __CAMEL_I18N_H__
-
-#include <glib.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#ifdef ENABLE_NLS
-# include <libintl.h>
-# ifdef CAMEL_EXPLICIT_TRANSLATION_DOMAIN
-# undef _
-# define _(String) dgettext (CAMEL_EXPLICIT_TRANSLATION_DOMAIN, String)
-# else
-# define _(String) gettext (String)
-# endif
-# 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
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __CAMEL_I18N_H__ */
diff --git a/camel/camel-iconv.c b/camel/camel-iconv.c
deleted file mode 100644
index 690ec520ad..0000000000
--- a/camel/camel-iconv.c
+++ /dev/null
@@ -1,646 +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 2003 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 <glib.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-
-#include <locale.h>
-
-#ifdef HAVE_CODESET
-#include <langinfo.h>
-#endif
-
-#include "e-util/e-memory.h"
-#include "camel-charset-map.h"
-#include "string-utils.h"
-#include "camel-iconv.h"
-
-#define d(x)
-
-#ifdef G_THREADS_ENABLED
-static GStaticMutex lock = G_STATIC_MUTEX_INIT;
-#define LOCK() g_static_mutex_lock (&lock)
-#define UNLOCK() g_static_mutex_unlock (&lock)
-#else
-#define LOCK()
-#define UNLOCK()
-#endif
-
-
-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 }
-
-struct _iconv_cache_node {
- struct _iconv_cache_node *next;
- struct _iconv_cache_node *prev;
-
- struct _iconv_cache *parent;
-
- int busy;
- iconv_t cd;
-};
-
-struct _iconv_cache {
- struct _iconv_cache *next;
- struct _iconv_cache *prev;
-
- char *conv;
-
- EDList open; /* stores iconv_cache_nodes, busy ones up front */
-};
-
-#define CAMEL_ICONV_CACHE_SIZE (16)
-
-static EDList iconv_cache_list;
-static GHashTable *iconv_cache;
-static GHashTable *iconv_cache_open;
-static unsigned int iconv_cache_size = 0;
-
-static GHashTable *iconv_charsets = NULL;
-static char *locale_charset = NULL;
-static char *locale_lang = NULL;
-
-struct {
- char *charset;
- char *iconv_name;
-} known_iconv_charsets[] = {
-#if 0
- /* 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 e_iconv_charset_name() 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
- e_iconv_charset_name() so I'm not going to bother
- putting them all in here either... */
-#endif
- /* charset name (lowercase!), iconv-friendly name (sometimes case sensitive) */
- { "utf-8", "UTF-8" },
-
- /* 10646 is a special case, its usually UCS-2 big endian */
- /* This might need some checking but should be ok for solaris/linux */
- { "iso-10646-1", "UCS-2BE" },
- { "iso_10646-1", "UCS-2BE" },
- { "iso10646-1", "UCS-2BE" },
- { "iso-10646", "UCS-2BE" },
- { "iso_10646", "UCS-2BE" },
- { "iso10646", "UCS-2BE" },
-
- { "ks_c_5601-1987", "EUC-KR" },
-
- /* FIXME: Japanese/Korean/Chinese stuff needs checking */
- { "euckr-0", "EUC-KR" },
- { "5601", "EUC-KR" },
- { "zh_TW-euc", "EUC-TW" },
- { "zh_CN.euc", "gb2312" },
- { "zh_TW-big5", "BIG5" },
- { "big5-0", "BIG5" },
- { "big5.eten-0", "BIG5" },
- { "big5hkscs-0", "BIG5HKSCS" },
- { "gb2312-0", "gb2312" },
- { "gb2312.1980-0", "gb2312" },
- { "gb-2312", "gb2312" },
- { "gb18030-0", "gb18030" },
- { "gbk-0", "GBK" },
-
- { "eucjp-0", "eucJP" },
- { "ujis-0", "ujis" },
- { "jisx0208.1983-0","SJIS" },
- { "jisx0212.1990-0","SJIS" },
- { "pck", "SJIS" },
- { NULL, NULL }
-};
-
-
-
-/* Another copy of this trivial list implementation
- Why? This stuff gets called a lot (potentially), should run fast,
- and g_list's are f@@#$ed up to make this a hassle */
-static void
-e_dlist_init (EDList *v)
-{
- v->head = (EDListNode *) &v->tail;
- v->tail = 0;
- v->tailpred = (EDListNode *) &v->head;
-}
-
-static 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;
-}
-
-static 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;
-}
-
-static EDListNode *
-e_dlist_remove (EDListNode *n)
-{
- n->next->prev = n->prev;
- n->prev->next = n->next;
- return n;
-}
-
-
-static void
-locale_parse_lang (const char *locale)
-{
- char *codeset, *lang;
-
- if ((codeset = strchr (locale, '.')))
- lang = g_strndup (locale, codeset - locale);
- else
- lang = g_strdup (locale);
-
- /* validate the language */
- if (strlen (lang) >= 2) {
- if (lang[2] == '-' || lang[2] == '_') {
- /* canonicalise the lang */
- camel_strdown (lang);
-
- /* validate the country code */
- if (strlen (lang + 3) > 2) {
- /* invalid country code */
- lang[2] = '\0';
- } else {
- lang[2] = '-';
- e_strup (lang + 3);
- }
- } else if (lang[2] != '\0') {
- /* invalid language */
- g_free (lang);
- lang = NULL;
- }
-
- locale_lang = lang;
- } else {
- /* invalid language */
- locale_lang = NULL;
- g_free (lang);
- }
-}
-
-
-/**
- * camel_iconv_init:
- *
- * Initialize Camel's iconv cache. This *MUST* be called before any
- * camel-iconv interfaces will work correctly.
- **/
-static void
-camel_iconv_init (int keep)
-{
- char *from, *to, *locale;
- int i;
-
- LOCK ();
-
- if (iconv_charsets != NULL) {
- if (!keep)
- UNLOCK ();
- return;
- }
-
- iconv_charsets = g_hash_table_new (g_str_hash, g_str_equal);
-
- for (i = 0; known_iconv_charsets[i].charset != NULL; i++) {
- from = g_strdup (known_iconv_charsets[i].charset);
- to = g_strdup (known_iconv_charsets[i].iconv_name);
- camel_strdown (from);
- g_hash_table_insert (iconv_charsets, from, to);
- }
-
- e_dlist_init (&iconv_cache_list);
- iconv_cache = g_hash_table_new (g_str_hash, g_str_equal);
- iconv_cache_open = g_hash_table_new (NULL, NULL);
-
- 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;
- locale_lang = NULL;
- } else {
-#ifdef HAVE_CODESET
- locale_charset = g_strdup (nl_langinfo (CODESET));
- camel_strdown (locale_charset);
-#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 *codeset, *p;
-
- codeset = strchr (locale, '.');
- if (codeset) {
- codeset++;
-
- /* ; is a hack for debian systems and / is a hack for Solaris systems */
- for (p = codeset; *p && !strchr ("@;/", *p); p++);
- locale_charset = g_strndup (codeset, p - codeset);
- camel_strdown (locale_charset);
- } else {
- /* charset unknown */
- locale_charset = NULL;
- }
-#endif
-
- /* parse the locale lang */
- locale_parse_lang (locale);
- }
-
- if (!keep)
- UNLOCK ();
-}
-
-
-/**
- * camel_iconv_charset_name:
- * @charset: charset name
- *
- * Maps charset names to the names that iconv_open() is more
- * likely able to handle.
- *
- * Returns an iconv-friendly name for @charset.
- **/
-const char *
-camel_iconv_charset_name (const char *charset)
-{
- char *name, *iname, *tmp;
-
- if (charset == NULL)
- return NULL;
-
- name = g_alloca (strlen (charset) + 1);
- strcpy (name, charset);
- camel_strdown (name);
-
- camel_iconv_init (TRUE);
- if ((iname = g_hash_table_lookup (iconv_charsets, name)) != NULL) {
- UNLOCK ();
- return iname;
- }
-
- /* Unknown, try canonicalise some basic charset types to something that should work */
- if (strncmp (name, "iso", 3) == 0) {
- /* Convert iso-####-# or iso####-# or iso_####-# to iso-####-# or iso####-# */
- int iso, codepage;
- char *p;
-
- tmp = name + 3;
- if (*tmp == '-' || *tmp == '_')
- tmp++;
-
- iso = strtoul (tmp, &p, 10);
-
- if (iso == 10646) {
- /* they all become ICONV_10646 */
- iname = g_strdup (ICONV_10646);
- } else {
- tmp = p;
- if (*tmp == '-' || *tmp == '_')
- tmp++;
-
- codepage = strtoul (tmp, &p, 10);
-
- if (p > tmp) {
- /* codepage is numeric */
-#ifdef __aix__
- if (codepage == 13)
- iname = g_strdup ("IBM-921");
- else
-#endif /* __aix__ */
- iname = g_strdup_printf (ICONV_ISO_D_FORMAT, iso, codepage);
- } else {
- /* codepage is a string - probably iso-2022-jp or something */
- iname = g_strdup_printf (ICONV_ISO_S_FORMAT, iso, p);
- }
- }
- } else if (strncmp (name, "windows-", 8) == 0) {
- /* Convert windows-#### or windows-cp#### to cp#### */
- tmp = name + 8;
- if (!strncmp (tmp, "cp", 2))
- tmp += 2;
- iname = g_strdup_printf ("CP%s", tmp);
- } else if (strncmp (name, "microsoft-", 10) == 0) {
- /* Convert microsoft-#### or microsoft-cp#### to cp#### */
- tmp = name + 10;
- if (!strncmp (tmp, "cp", 2))
- tmp += 2;
- iname = g_strdup_printf ("CP%s", tmp);
- } else {
- /* Just assume its ok enough as is, case and all */
- iname = g_strdup (charset);
- }
-
- g_hash_table_insert (iconv_charsets, g_strdup (name), iname);
- UNLOCK ();
-
- return iname;
-}
-
-static void
-flush_entry (struct _iconv_cache *ic)
-{
- struct _iconv_cache_node *in, *nn;
-
- in = (struct _iconv_cache_node *) ic->open.head;
- nn = in->next;
- while (nn) {
- if (in->cd != (iconv_t) -1) {
- g_hash_table_remove (iconv_cache_open, in->cd);
- iconv_close (in->cd);
- }
-
- g_free (in);
- in = nn;
- nn = in->next;
- }
-
- g_free (ic->conv);
- g_free (ic);
-}
-
-
-/* This should run pretty quick, its called a lot */
-/**
- * camel_iconv_open:
- * @to: charset to convert to
- * @from: charset to convert from
- *
- * Allocates a coversion descriptor suitable for converting byte
- * sequences from charset @from to charset @to. The resulting
- * descriptor can be used with iconv (or the camel_iconv wrapper) any
- * number of times until closed using camel_iconv_close.
- *
- * Returns a new conversion descriptor for use with iconv on success
- * or (iconv_t) -1 on fail as well as setting an appropriate errno
- * value.
- **/
-iconv_t
-camel_iconv_open (const char *to, const char *from)
-{
- struct _iconv_cache *ic;
- struct _iconv_cache_node *in;
- int errnosav;
- iconv_t cd;
- char *key;
-
- if (to == NULL || from == NULL) {
- errno = EINVAL;
- return (iconv_t) -1;
- }
-
- to = camel_iconv_charset_name (to);
- from = camel_iconv_charset_name (from);
- key = g_alloca (strlen (to) + strlen (from) + 2);
- sprintf (key, "%s:%s", to, from);
-
- LOCK ();
-
- ic = g_hash_table_lookup (iconv_cache, key);
- if (ic) {
- e_dlist_remove ((EDListNode *) ic);
- } else {
- struct _iconv_cache *last = (struct _iconv_cache *) iconv_cache_list.tailpred;
- struct _iconv_cache *prev;
-
- prev = last->prev;
- while (prev && iconv_cache_size > CAMEL_ICONV_CACHE_SIZE) {
- in = (struct _iconv_cache_node *) last->open.head;
- if (in->next && !in->busy) {
- d(printf ("Flushing iconv converter '%s'\n", last->conv));
- e_dlist_remove ((EDListNode *) last);
- g_hash_table_remove (iconv_cache, last->conv);
- flush_entry (last);
- iconv_cache_size--;
- }
- last = prev;
- prev = last->prev;
- }
-
- iconv_cache_size++;
-
- ic = g_new (struct _iconv_cache);
- e_dlist_init (&ic->open);
- ic->conv = g_strdup (key);
- g_hash_table_insert (iconv_cache, ic->conv, ic);
-
- d(printf ("Creating iconv converter '%s'\n", ic->conv));
- }
- e_dlist_addhead (&iconv_cache_list, (EDListNode *) ic);
-
- /* If we have a free iconv, use it */
- in = (struct _iconv_cache_node *) ic->open.tailpred;
- if (in->prev && !in->busy) {
- d(printf ("using existing iconv converter '%s'\n", ic->conv));
- cd = in->cd;
- if (cd != (iconv_t) -1) {
- /* work around some broken iconv implementations
- * that die if the length arguments are NULL
- */
- size_t buggy_iconv_len = 0;
- char *buggy_iconv_buf = NULL;
-
- /* resets the converter */
- iconv (cd, &buggy_iconv_buf, &buggy_iconv_len, &buggy_iconv_buf, &buggy_iconv_len);
- in->busy = TRUE;
- e_dlist_remove ((EDListNode *) in);
- e_dlist_addhead (&ic->open, (EDListNode *) in);
- }
- } else {
- d(printf("creating new iconv converter '%s'\n", ic->conv));
- cd = iconv_open (to, from);
- in = g_new (struct _iconv_cache_node);
- in->cd = cd;
- in->parent = ic;
- e_dlist_addhead (&ic->open, (EDListNode *) in);
- if (cd != (iconv_t) -1) {
- g_hash_table_insert (iconv_cache_open, cd, in);
- in->busy = TRUE;
- } else {
- errnosav = errno;
- g_warning ("Could not open converter for '%s' to '%s' charset", from, to);
- in->busy = FALSE;
- errno = errnosav;
- }
- }
-
- UNLOCK ();
-
- return cd;
-}
-
-
-/**
- * camel_iconv:
- * @cd: conversion descriptor
- * @inbuf: address of input buffer
- * @inleft: input bytes left
- * @outbuf: address of output buffer
- * @outleft: output bytes left
- *
- * Read `man 3 iconv`
- **/
-size_t
-camel_iconv (iconv_t cd, const char **inbuf, size_t *inleft, char **outbuf, size_t *outleft)
-{
- return iconv (cd, (ICONV_CONST char **) inbuf, inleft, outbuf, outleft);
-}
-
-
-/**
- * camel_iconv_close:
- * @cd: iconv conversion descriptor
- *
- * Closes the iconv descriptor @cd.
- *
- * Returns 0 on success or -1 on fail as well as setting an
- * appropriate errno value.
- **/
-void
-camel_iconv_close (iconv_t cd)
-{
- struct _iconv_cache_node *in;
-
- if (cd == (iconv_t) -1)
- return;
-
- LOCK ();
-
- in = g_hash_table_lookup (iconv_cache_open, cd);
- if (in) {
- d(printf ("closing iconv converter '%s'\n", in->parent->conv));
- e_dlist_remove ((EDListNode *) in);
- in->busy = FALSE;
- e_dlist_addtail (&in->parent->open, (EDListNode *) in);
- } else {
- g_warning ("trying to close iconv i dont know about: %p", cd);
- iconv_close (cd);
- }
-
- UNLOCK ();
-}
-
-
-const char *
-camel_iconv_locale_charset (void)
-{
- camel_iconv_init (FALSE);
-
- return locale_charset;
-}
-
-
-const char *
-camel_iconv_locale_language (void)
-{
- camel_iconv_init (FALSE);
-
- return locale_lang;
-}
-
-/* map CJKR charsets to their language code */
-/* NOTE: only support charset names that will be returned by
- * e_iconv_charset_name() so that we don't have to keep track of all
- * the aliases too. */
-static struct {
- char *charset;
- char *lang;
-} cjkr_lang_map[] = {
- { "Big5", "zh" },
- { "BIG5HKSCS", "zh" },
- { "gb2312", "zh" },
- { "gb18030", "zh" },
- { "gbk", "zh" },
- { "euc-tw", "zh" },
- { "iso-2022-jp", "ja" },
- { "sjis", "ja" },
- { "ujis", "ja" },
- { "eucJP", "ja" },
- { "euc-jp", "ja" },
- { "euc-kr", "ko" },
- { "koi8-r", "ru" },
- { "koi8-u", "uk" }
-};
-
-#define NUM_CJKR_LANGS (sizeof (cjkr_lang_map) / sizeof (cjkr_lang_map[0]))
-
-const char *
-camel_iconv_charset_language (const char *charset)
-{
- int i;
-
- if (!charset)
- return NULL;
-
- charset = camel_iconv_charset_name (charset);
- for (i = 0; i < NUM_CJKR_LANGS; i++) {
- if (!strcasecmp (cjkr_lang_map[i].charset, charset))
- return cjkr_lang_map[i].lang;
- }
-
- return NULL;
-}
diff --git a/camel/camel-iconv.h b/camel/camel-iconv.h
deleted file mode 100644
index f57346816a..0000000000
--- a/camel/camel-iconv.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>
- *
- * Copyright 2003 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_ICONV_H__
-#define __CAMEL_ICONV_H__
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <sys/types.h>
-#include <iconv.h>
-
-const char *camel_iconv_locale_charset (void);
-const char *camel_iconv_locale_language (void);
-
-const char *camel_iconv_charset_name (const char *charset);
-
-const char *camel_iconv_charset_language (const char *charset);
-
-iconv_t camel_iconv_open (const char *to, const char *from);
-size_t camel_iconv (iconv_t cd, const char **inbuf, size_t *inleft, char **outbuf, size_t *outleft);
-void camel_iconv_close (iconv_t cd);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __CAMEL_ICONV_H__ */
diff --git a/camel/camel-index-control.c b/camel/camel-index-control.c
deleted file mode 100644
index f42819f5a5..0000000000
--- a/camel/camel-index-control.c
+++ /dev/null
@@ -1,213 +0,0 @@
-
-/* Command to manually force a compression/dump of an index file */
-
-#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 <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
-#include "e-util/e-msgport.h"
-#include "e-util/e-memory.h"
-
-#include "camel/camel-object.h"
-
-#include "camel-text-index.h"
-
-#include <stdio.h>
-
-static void
-do_usage(char *argv0)
-{
- fprintf(stderr, "Usage: %s [ compress | dump | info ] file(s) ...\n", argv0);
- fprintf(stderr, " compress - compress (an) index file(s)\n");
- fprintf(stderr, " dump - dump (an) index file's content to stdout\n");
- fprintf(stderr, " info - dump summary info to stdout\n");
- exit(1);
-}
-
-static int
-do_compress(int argc, char **argv)
-{
- int i;
- CamelIndex *idx;
-
- for (i=2;i<argc;i++) {
- printf("Opening index file: %s\n", argv[i]);
- idx = (CamelIndex *)camel_text_index_new(argv[i], O_RDWR);
- if (idx) {
- printf(" Compressing ...\n");
- if (camel_index_compress(idx) == -1) {
- camel_object_unref((CamelObject *)idx);
- return 1;
- }
- camel_object_unref((CamelObject *)idx);
- } else {
- printf(" Failed: %s\n", strerror (errno));
- return 1;
- }
- }
- return 0;
-}
-
-static int
-do_dump(int argc, char **argv)
-{
- int i;
- CamelIndex *idx;
-
- for (i=2;i<argc;i++) {
- printf("Opening index file: %s\n", argv[i]);
- idx = (CamelIndex *)camel_text_index_new(argv[i], O_RDONLY);
- if (idx) {
- printf(" Dumping ...\n");
- camel_text_index_dump((CamelTextIndex *)idx);
- camel_object_unref((CamelObject *)idx);
- } else {
- printf(" Failed: %s\n", strerror (errno));
- return 1;
- }
- }
- return 0;
-}
-
-static int
-do_info(int argc, char **argv)
-{
- int i;
- CamelIndex *idx;
-
- for (i=2;i<argc;i++) {
- printf("Opening index file: %s\n", argv[i]);
- idx = (CamelIndex *)camel_text_index_new(argv[i], O_RDONLY);
- if (idx) {
- camel_text_index_info((CamelTextIndex *)idx);
- camel_object_unref((CamelObject *)idx);
- } else {
- printf(" Failed: %s\n", strerror (errno));
- return 0;
- }
- }
- return 1;
-}
-
-static int
-do_check(int argc, char **argv)
-{
- int i;
- CamelIndex *idx;
-
- for (i=2;i<argc;i++) {
- printf("Opening index file: %s\n", argv[i]);
- idx = (CamelIndex *)camel_text_index_new(argv[i], O_RDONLY);
- if (idx) {
- camel_text_index_validate((CamelTextIndex *)idx);
- camel_object_unref((CamelObject *)idx);
- } else {
- printf(" Failed: %s\n", strerror (errno));
- return 0;
- }
- }
- return 1;
-}
-
-static int do_perf(int argc, char **argv);
-
-int main(int argc, char **argv)
-{
- extern int camel_init(const char *certdb_dir, gboolean nss_init);
-
- if (argc<2)
- do_usage(argv[0]);
-
- g_thread_init(NULL);
- camel_init(NULL, 0);
-
- if (!strcmp(argv[1], "compress"))
- return do_compress(argc, argv);
- else if (!strcmp(argv[1], "dump"))
- return do_dump(argc, argv);
- else if (!strcmp(argv[1], "info"))
- return do_info(argc, argv);
- else if (!strcmp(argv[1], "check"))
- return do_check(argc, argv);
- else if (!strcmp(argv[1], "perf"))
- return do_perf(argc, argv);
-
- do_usage(argv[0]);
- return 1;
-}
-
-#include <sys/types.h>
-#include <dirent.h>
-#include "camel-stream-null.h"
-#include "camel-stream-filter.h"
-#include "camel-mime-filter-index.h"
-#include "camel-stream-fs.h"
-
-static int
-do_perf(int argc, char **argv)
-{
- CamelIndex *idx;
- DIR *dir;
- char *path = "/home/notzed/evolution/local/Inbox/mbox/cur";
- struct dirent *d;
- CamelStream *null, *filter, *stream;
- CamelMimeFilterIndex *filter_index;
- char *name;
- CamelIndexName *idn;
-
- dir = opendir(path);
- if (dir == NULL) {
- perror("open dir");
- return 1;
- }
-
- idx = (CamelIndex *)camel_text_index_new("/tmp/index", O_TRUNC|O_CREAT|O_RDWR);
- if (idx == NULL) {
- perror("open index");
- return 1;
- }
-
- null = camel_stream_null_new();
- filter = (CamelStream *)camel_stream_filter_new_with_stream(null);
- camel_object_unref((CamelObject *)null);
- filter_index = camel_mime_filter_index_new_index(idx);
- camel_stream_filter_add((CamelStreamFilter *)filter, (CamelMimeFilter *)filter_index);
-
- while ((d = readdir(dir))) {
- printf("indexing '%s'\n", d->d_name);
-
- idn = camel_index_add_name(idx, d->d_name);
- camel_mime_filter_index_set_name(filter_index, idn);
- name = g_strdup_printf("%s/%s", path, d->d_name);
- stream = camel_stream_fs_new_with_name(name, O_RDONLY, 0);
- camel_stream_write_to_stream(stream, filter);
- camel_object_unref((CamelObject *)stream);
- g_free(name);
-
- camel_index_write_name(idx, idn);
- camel_object_unref((CamelObject *)idn);
- camel_mime_filter_index_set_name(filter_index, NULL);
- }
-
- closedir(dir);
-
- camel_index_sync(idx);
- camel_object_unref((CamelObject *)idx);
-
- camel_object_unref((CamelObject *)filter);
- camel_object_unref((CamelObject *)filter_index);
-
- return 0;
-}
diff --git a/camel/camel-index.c b/camel/camel-index.c
deleted file mode 100644
index 6a7cba6afe..0000000000
--- a/camel/camel-index.c
+++ /dev/null
@@ -1,396 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; fill-column: 160 -*- */
-/*
- * 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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-index.h"
-#include "camel/camel-object.h"
-
-#define w(x)
-#define io(x)
-#define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
-
-#define CAMEL_INDEX_VERSION (0x01)
-
-struct _CamelIndexPrivate {
- void *dummy;
-};
-
-#define _PRIVATE(o) (((CamelIndex *)(o))->priv)
-
-#define CI_CLASS(o) ((CamelIndexClass *)(((CamelObject *)o)->klass))
-
-/* ********************************************************************** */
-/* CamelIndex */
-/* ********************************************************************** */
-
-static CamelObjectClass *camel_index_parent;
-
-static void
-camel_index_class_init(CamelIndexClass *klass)
-{
- camel_index_parent = CAMEL_OBJECT_CLASS(camel_type_get_global_classfuncs(camel_object_get_type()));
-}
-
-static void
-camel_index_init(CamelIndex *idx)
-{
- struct _CamelIndexPrivate *p;
-
- p = _PRIVATE(idx) = g_malloc0(sizeof(*p));
-
- idx->version = CAMEL_INDEX_VERSION;
-}
-
-static void
-camel_index_finalise(CamelIndex *idx)
-{
- g_free(idx->path);
- g_free(idx->priv);
-}
-
-CamelType
-camel_index_get_type(void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register(camel_object_get_type(), "CamelIndex",
- sizeof (CamelIndex),
- sizeof (CamelIndexClass),
- (CamelObjectClassInitFunc) camel_index_class_init,
- NULL,
- (CamelObjectInitFunc) camel_index_init,
- (CamelObjectFinalizeFunc) camel_index_finalise);
- }
-
- return type;
-}
-
-CamelIndex *
-camel_index_new(const char *path, int flags)
-{
- CamelIndex *idx = (CamelIndex *)camel_object_new(camel_index_get_type());
-
- camel_index_construct(idx, path, flags);
-
- return idx;
-}
-
-void
-camel_index_construct(CamelIndex *idx, const char *path, int flags)
-{
- g_free(idx->path);
- idx->path = g_strdup_printf("%s.index", path);
- idx->flags = flags;
-}
-
-int
-camel_index_rename(CamelIndex *idx, const char *path)
-{
- if ((idx->state & CAMEL_INDEX_DELETED) == 0)
- return CI_CLASS(idx)->rename(idx, path);
- else {
- errno = ENOENT;
- return -1;
- }
-}
-
-void
-camel_index_set_normalise(CamelIndex *idx, CamelIndexNorm func, void *data)
-{
- idx->normalise = func;
- idx->normalise_data = data;
-}
-
-int
-camel_index_sync(CamelIndex *idx)
-{
- if ((idx->state & CAMEL_INDEX_DELETED) == 0)
- return CI_CLASS(idx)->sync(idx);
- else {
- errno = ENOENT;
- return -1;
- }
-}
-
-int
-camel_index_compress(CamelIndex *idx)
-{
- if ((idx->state & CAMEL_INDEX_DELETED) == 0)
- return CI_CLASS(idx)->compress(idx);
- else {
- errno = ENOENT;
- return -1;
- }
-}
-
-int
-camel_index_delete(CamelIndex *idx)
-{
- int ret;
-
- if ((idx->state & CAMEL_INDEX_DELETED) == 0) {
- ret = CI_CLASS(idx)->delete(idx);
- idx->state |= CAMEL_INDEX_DELETED;
- } else {
- errno = ENOENT;
- ret = -1;
- }
-
- return ret;
-}
-
-int
-camel_index_has_name(CamelIndex *idx, const char *name)
-{
- if ((idx->state & CAMEL_INDEX_DELETED) == 0)
- return CI_CLASS(idx)->has_name(idx, name);
- else
- return FALSE;
-}
-
-CamelIndexName *
-camel_index_add_name(CamelIndex *idx, const char *name)
-{
- if ((idx->state & CAMEL_INDEX_DELETED) == 0)
- return CI_CLASS(idx)->add_name(idx, name);
- else
- return NULL;
-}
-
-int
-camel_index_write_name(CamelIndex *idx, CamelIndexName *idn)
-{
- if ((idx->state & CAMEL_INDEX_DELETED) == 0)
- return CI_CLASS(idx)->write_name(idx, idn);
- else {
- errno = ENOENT;
- return -1;
- }
-}
-
-CamelIndexCursor *
-camel_index_find_name(CamelIndex *idx, const char *name)
-{
- if ((idx->state & CAMEL_INDEX_DELETED) == 0)
- return CI_CLASS(idx)->find_name(idx, name);
- else
- return NULL;
-}
-
-void
-camel_index_delete_name(CamelIndex *idx, const char *name)
-{
- if ((idx->state & CAMEL_INDEX_DELETED) == 0)
- CI_CLASS(idx)->delete_name(idx, name);
-}
-
-CamelIndexCursor *
-camel_index_find(CamelIndex *idx, const char *word)
-{
- char *b = (char *)word;
- CamelIndexCursor *ret;
-
- if ((idx->state & CAMEL_INDEX_DELETED) != 0)
- return NULL;
-
- if (idx->normalise)
- b = idx->normalise(idx, word, idx->normalise_data);
-
- ret = CI_CLASS(idx)->find(idx, b);
-
- if (b != word)
- g_free(b);
-
- return ret;
-}
-
-CamelIndexCursor *
-camel_index_words(CamelIndex *idx)
-{
- if ((idx->state & CAMEL_INDEX_DELETED) == 0)
- return CI_CLASS(idx)->words(idx);
- else
- return NULL;
-}
-
-CamelIndexCursor *
-camel_index_names(CamelIndex *idx)
-{
- if ((idx->state & CAMEL_INDEX_DELETED) == 0)
- return CI_CLASS(idx)->names(idx);
- else
- return NULL;
-}
-
-/* ********************************************************************** */
-/* CamelIndexName */
-/* ********************************************************************** */
-
-static CamelObjectClass *camel_index_name_parent;
-
-#define CIN_CLASS(o) ((CamelIndexNameClass *)(((CamelObject *)o)->klass))
-
-static void
-camel_index_name_class_init(CamelIndexNameClass *klass)
-{
- camel_index_name_parent = CAMEL_OBJECT_CLASS(camel_type_get_global_classfuncs(camel_object_get_type()));
-}
-
-static void
-camel_index_name_init(CamelIndexName *idn)
-{
-}
-
-static void
-camel_index_name_finalise(CamelIndexName *idn)
-{
- if (idn->index)
- camel_object_unref((CamelObject *)idn->index);
-}
-
-CamelType
-camel_index_name_get_type(void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register(camel_object_get_type(), "CamelIndexName",
- sizeof (CamelIndexName),
- sizeof (CamelIndexNameClass),
- (CamelObjectClassInitFunc) camel_index_name_class_init,
- NULL,
- (CamelObjectInitFunc) camel_index_name_init,
- (CamelObjectFinalizeFunc) camel_index_name_finalise);
- }
-
- return type;
-}
-
-CamelIndexName *
-camel_index_name_new(CamelIndex *idx, const char *name)
-{
- CamelIndexName *idn = (CamelIndexName *)camel_object_new(camel_index_name_get_type());
-
- idn->index = idx;
- camel_object_ref((CamelObject *)idx);
-
- return idn;
-}
-
-void
-camel_index_name_add_word(CamelIndexName *idn, const char *word)
-{
- char *b = (char *)word;
-
- if (idn->index->normalise)
- b = idn->index->normalise(idn->index, word, idn->index->normalise_data);
-
- CIN_CLASS(idn)->add_word(idn, b);
-
- if (b != word)
- g_free(b);
-}
-
-size_t
-camel_index_name_add_buffer(CamelIndexName *idn, const char *buffer, size_t len)
-{
- return CIN_CLASS(idn)->add_buffer(idn, buffer, len);
-}
-
-/* ********************************************************************** */
-/* CamelIndexCursor */
-/* ********************************************************************** */
-
-static CamelObjectClass *camel_index_cursor_parent;
-
-#define CIC_CLASS(o) ((CamelIndexCursorClass *)(((CamelObject *)o)->klass))
-
-static void
-camel_index_cursor_class_init(CamelIndexCursorClass *klass)
-{
- camel_index_cursor_parent = CAMEL_OBJECT_CLASS(camel_type_get_global_classfuncs(camel_object_get_type()));
-}
-
-static void
-camel_index_cursor_init(CamelIndexCursor *idc)
-{
-}
-
-static void
-camel_index_cursor_finalise(CamelIndexCursor *idc)
-{
- if (idc->index)
- camel_object_unref((CamelObject *)idc->index);
-}
-
-CamelType
-camel_index_cursor_get_type(void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register(camel_object_get_type(), "CamelIndexCursor",
- sizeof (CamelIndexCursor),
- sizeof (CamelIndexCursorClass),
- (CamelObjectClassInitFunc) camel_index_cursor_class_init,
- NULL,
- (CamelObjectInitFunc) camel_index_cursor_init,
- (CamelObjectFinalizeFunc) camel_index_cursor_finalise);
- }
-
- return type;
-}
-
-CamelIndexCursor *
-camel_index_cursor_new(CamelIndex *idx, const char *name)
-{
- CamelIndexCursor *idc = (CamelIndexCursor *)camel_object_new(camel_index_cursor_get_type());
-
- idc->index = idx;
- camel_object_ref((CamelObject *)idx);
-
- return idc;
-}
-
-const char *
-camel_index_cursor_next(CamelIndexCursor *idc)
-{
- return CIC_CLASS(idc)->next(idc);
-}
-
-void
-camel_index_cursor_reset(CamelIndexCursor *idc)
-{
- CIC_CLASS(idc)->reset(idc);
-}
-
diff --git a/camel/camel-index.h b/camel/camel-index.h
deleted file mode 100644
index 0382dc1d0d..0000000000
--- a/camel/camel-index.h
+++ /dev/null
@@ -1,165 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_INDEX_H
-#define _CAMEL_INDEX_H
-
-#include <camel/camel-exception.h>
-#include <camel/camel-object.h>
-
-#define CAMEL_INDEX(obj) CAMEL_CHECK_CAST (obj, camel_index_get_type (), CamelIndex)
-#define CAMEL_INDEX_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_index_get_type (), CamelIndexClass)
-#define CAMEL_IS_INDEX(obj) CAMEL_CHECK_TYPE (obj, camel_index_get_type ())
-
-typedef struct _CamelIndex CamelIndex;
-typedef struct _CamelIndexClass CamelIndexClass;
-
-#define CAMEL_INDEX_NAME(obj) CAMEL_CHECK_CAST (obj, camel_index_name_get_type (), CamelIndexName)
-#define CAMEL_INDEX_NAME_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_index_name_get_type (), CamelIndexNameClass)
-#define CAMEL_IS_INDEX_NAME(obj) CAMEL_CHECK_TYPE (obj, camel_index_name_get_type ())
-
-typedef struct _CamelIndexName CamelIndexName;
-typedef struct _CamelIndexNameClass CamelIndexNameClass;
-
-#define CAMEL_INDEX_CURSOR(obj) CAMEL_CHECK_CAST (obj, camel_index_cursor_get_type (), CamelIndexCursor)
-#define CAMEL_INDEX_CURSOR_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_index_cursor_get_type (), CamelIndexCursorClass)
-#define CAMEL_IS_INDEX_CURSOR(obj) CAMEL_CHECK_TYPE (obj, camel_index_cursor_get_type ())
-
-typedef struct _CamelIndexCursor CamelIndexCursor;
-typedef struct _CamelIndexCursorClass CamelIndexCursorClass;
-
-typedef char * (*CamelIndexNorm)(CamelIndex *idx, const char *word, void *data);
-
-/* ********************************************************************** */
-
-struct _CamelIndexCursor {
- CamelObject parent;
-
- struct _CamelIndexCursorPrivate *priv;
-
- CamelIndex *index;
-};
-
-struct _CamelIndexCursorClass {
- CamelObjectClass parent;
-
- const char * (*next) (CamelIndexCursor *idc);
- void (*reset) (CamelIndexCursor *idc);
-};
-
-CamelType camel_index_cursor_get_type(void);
-
-CamelIndexCursor *camel_index_cursor_new(CamelIndex *idx, const char *name);
-
-const char *camel_index_cursor_next(CamelIndexCursor *idc);
-void camel_index_cursor_reset(CamelIndexCursor *idc);
-
-/* ********************************************************************** */
-
-struct _CamelIndexName {
- CamelObject parent;
-
- struct _CamelIndexNamePrivate *priv;
-
- CamelIndex *index;
-
- char *name; /* name being indexed */
-
- GByteArray *buffer; /* used for normalisation */
- GHashTable *words; /* unique list of words */
-};
-
-struct _CamelIndexNameClass {
- CamelObjectClass parent;
-
- int (*sync)(CamelIndexName *name);
- void (*add_word)(CamelIndexName *name, const char *word);
- size_t (*add_buffer)(CamelIndexName *name, const char *buffer, size_t len);
-};
-
-CamelType camel_index_name_get_type (void);
-
-CamelIndexName *camel_index_name_new(CamelIndex *idx, const char *name);
-
-void camel_index_name_add_word(CamelIndexName *name, const char *word);
-size_t camel_index_name_add_buffer(CamelIndexName *name, const char *buffer, size_t len);
-
-/* ********************************************************************** */
-
-struct _CamelIndex {
- CamelObject parent;
-
- struct _CamelIndexPrivate *priv;
-
- char *path;
- guint32 version;
- guint32 flags; /* open flags */
- guint32 state;
-
- CamelIndexNorm normalise;
- void *normalise_data;
-};
-
-struct _CamelIndexClass {
- CamelObjectClass parent_class;
-
- int (*sync)(CamelIndex *idx);
- int (*compress)(CamelIndex *idx);
- int (*delete)(CamelIndex *idx);
-
- int (*rename)(CamelIndex *idx, const char *path);
-
- int (*has_name)(CamelIndex *idx, const char *name);
- CamelIndexName * (*add_name)(CamelIndex *idx, const char *name);
- int (*write_name)(CamelIndex *idx, CamelIndexName *idn);
- CamelIndexCursor * (*find_name)(CamelIndex *idx, const char *name);
- void (*delete_name)(CamelIndex *idx, const char *name);
- CamelIndexCursor * (*find)(CamelIndex *idx, const char *word);
-
- CamelIndexCursor * (*words)(CamelIndex *idx);
- CamelIndexCursor * (*names)(CamelIndex *idx);
-};
-
-/* flags, stored in 'state', set with set_state */
-#define CAMEL_INDEX_DELETED (1<<0)
-
-CamelType camel_index_get_type (void);
-
-CamelIndex *camel_index_new(const char *path, int flags);
-void camel_index_construct(CamelIndex *, const char *path, int flags);
-int camel_index_rename(CamelIndex *, const char *path);
-
-void camel_index_set_normalise(CamelIndex *idx, CamelIndexNorm func, void *data);
-
-int camel_index_sync(CamelIndex *idx);
-int camel_index_compress(CamelIndex *idx);
-int camel_index_delete(CamelIndex *idx);
-
-int camel_index_has_name(CamelIndex *idx, const char *name);
-CamelIndexName *camel_index_add_name(CamelIndex *idx, const char *name);
-int camel_index_write_name(CamelIndex *idx, CamelIndexName *idn);
-CamelIndexCursor *camel_index_find_name(CamelIndex *idx, const char *name);
-void camel_index_delete_name(CamelIndex *idx, const char *name);
-CamelIndexCursor *camel_index_find(CamelIndex *idx, const char *word);
-
-CamelIndexCursor *camel_index_words(CamelIndex *idx);
-CamelIndexCursor *camel_index_names(CamelIndex *idx);
-
-#endif /* ! _CAMEL_INDEX_H */
diff --git a/camel/camel-internet-address.c b/camel/camel-internet-address.c
deleted file mode 100644
index 6a82393d8d..0000000000
--- a/camel/camel-internet-address.c
+++ /dev/null
@@ -1,551 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <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 _camel_header_address *ha, *n;
- int count = a->addresses->len;
-
- /* Should probably use its own decoder or something */
- ha = camel_header_address_decode(raw, NULL);
- 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 _camel_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;
- }
- camel_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;
-}
-
-static void
-cia_encode_addrspec(GString *out, const char *addr)
-{
- const char *at, *p;
-
- at = strchr(addr, '@');
- if (at == NULL)
- goto append;
-
- p = addr;
- while (p < at) {
- char c = *p++;
-
- /* strictly by rfc, we should split local parts on dots.
- however i think 2822 changes this, and not many clients grok it, so
- just quote the whole local part if need be */
- if (!(camel_mime_is_atom(c) || c=='.')) {
- g_string_append_c(out, '"');
-
- p = addr;
- while (p < at) {
- c = *p++;
- if (c == '"' || c == '\\')
- g_string_append_c(out, '\\');
- g_string_append_c(out, c);
- }
- g_string_append_c(out, '"');
- g_string_append(out, p);
-
- return;
- }
- }
-
-append:
- g_string_append(out, addr);
-}
-
-/**
- * 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 *@inlen. If @inlen
- * is NULL, then no folding will occur.
- *
- * Return value: The encoded address.
- **/
-char *
-camel_internet_address_encode_address(int *inlen, const char *real, const char *addr)
-{
- char *name = camel_header_encode_phrase(real);
- char *ret = NULL;
- int len = 0;
- GString *out = g_string_new("");
-
- g_assert(addr);
-
- if (inlen != NULL)
- len = *inlen;
-
- if (name && name[0]) {
- if (inlen != NULL && (strlen(name) + len) > CAMEL_FOLD_SIZE) {
- char *folded = camel_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);
- }
- }
-
- /* 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 (inlen != NULL && (strlen(addr) + len) > CAMEL_FOLD_SIZE) {
- g_string_append(out, "\n\t");
- len = 1;
- }
-
- len -= out->len;
-
- if (name && name[0])
- g_string_append_printf(out, " <");
- cia_encode_addrspec(out, addr);
- if (name && name[0])
- g_string_append_printf(out, ">");
-
- len += out->len;
-
- if (inlen != NULL)
- *inlen = len;
-
- g_free(name);
-
- 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 9bfa0f44c2..0000000000
--- a/camel/camel-internet-address.h
+++ /dev/null
@@ -1,65 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_INTERNET_ADDRESS_H
-#define _CAMEL_INTERNET_ADDRESS_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#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;
-};
-
-CamelType 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);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* ! _CAMEL_INTERNET_ADDRESS_H */
diff --git a/camel/camel-junk-plugin.c b/camel/camel-junk-plugin.c
deleted file mode 100644
index a203b45c3e..0000000000
--- a/camel/camel-junk-plugin.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author:
- * Radek Doulik <rodo@ximian.com>
- *
- * Copyright 2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <stdio.h>
-#include <glib.h>
-#include <camel/camel-junk-plugin.h>
-#include <camel/camel-mime-message.h>
-
-#define d(x) x
-
-const char *
-camel_junk_plugin_get_name (CamelJunkPlugin *csp)
-{
- g_return_val_if_fail (csp->get_name != NULL, NULL);
-
- d(fprintf (stderr, "camel_junk_plugin_get_namen");)
-
- return (*csp->get_name) ();
-}
-
-int
-camel_junk_plugin_check_junk (CamelJunkPlugin *csp, CamelMimeMessage *message)
-{
- g_return_val_if_fail (csp->check_junk != NULL, FALSE);
-
- d(fprintf (stderr, "camel_junk_plugin_check_junk\n");)
-
- return (*csp->check_junk) (message);
-}
-
-void
-camel_junk_plugin_report_junk (CamelJunkPlugin *csp, CamelMimeMessage *message)
-{
- d(fprintf (stderr, "camel_junk_plugin_report_junk\n");)
-
- if (csp->report_junk)
- (*csp->report_junk) (message);
-}
-
-void
-camel_junk_plugin_report_notjunk (CamelJunkPlugin *csp, CamelMimeMessage *message)
-{
- d(fprintf (stderr, "camel_junk_plugin_report_notjunk\n");)
-
- if (csp->report_notjunk)
- (*csp->report_notjunk) (message);
-}
-
-void
-camel_junk_plugin_commit_reports (CamelJunkPlugin *csp)
-{
- d(fprintf (stderr, "camel_junk_plugin_commit_reports\n");)
-
- if (csp->commit_reports)
- (*csp->commit_reports) ();
-}
diff --git a/camel/camel-junk-plugin.h b/camel/camel-junk-plugin.h
deleted file mode 100644
index 79d1bf6331..0000000000
--- a/camel/camel-junk-plugin.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author:
- * Radek Doulik <rodo@ximian.com>
- *
- * Copyright 2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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_JUNK_PLUGIN_H
-#define _CAMEL_JUNK_PLUGIN_H
-
-#define CAMEL_JUNK_PLUGIN(x) ((CamelJunkPlugin *) x)
-
-typedef struct _CamelJunkPlugin CamelJunkPlugin;
-struct _CamelMimeMessage;
-
-struct _CamelJunkPlugin
-{
- /* junk filter human readable name, translated */
- const char * (*get_name) (void);
-
- /* should be set to 1 */
- int api_version;
-
- /* when called, it should return TRUE if message is identified as junk,
- FALSE otherwise */
- int (*check_junk) (struct _CamelMimeMessage *message);
-
- /* called when user identified a message to be junk */
- void (*report_junk) (struct _CamelMimeMessage *message);
-
- /* called when user identified a message not to be junk */
- void (*report_notjunk) (struct _CamelMimeMessage *message);
-
- /* called after one or more junk/ham(s) reported */
- void (*commit_reports) (void);
-};
-
-const char * camel_junk_plugin_get_name (CamelJunkPlugin *csp);
-int camel_junk_plugin_check_junk (CamelJunkPlugin *csp, struct _CamelMimeMessage *message);
-void camel_junk_plugin_report_junk (CamelJunkPlugin *csp, struct _CamelMimeMessage *message);
-void camel_junk_plugin_report_notjunk (CamelJunkPlugin *csp, struct _CamelMimeMessage *message);
-void camel_junk_plugin_commit_reports (CamelJunkPlugin *csp);
-
-#endif
diff --git a/camel/camel-lock-client.c b/camel/camel-lock-client.c
deleted file mode 100644
index fb245d1eca..0000000000
--- a/camel/camel-lock-client.c
+++ /dev/null
@@ -1,321 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Copyright (C) 2001-2003 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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/types.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <pthread.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-
-#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)
-
-static pthread_mutex_t lock_lock = PTHREAD_MUTEX_INITIALIZER;
-#define LOCK() pthread_mutex_lock(&lock_lock)
-#define UNLOCK() pthread_mutex_unlock(&lock_lock)
-
-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)
-{
- int i;
-
- if (pipe(lock_stdin_pipe) == -1
- || pipe(lock_stdout_pipe) == -1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot build locking helper pipe: %s"),
- g_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"),
- g_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]);
- for (i=3;i<255;i++)
- close(i);
- execl(CAMEL_LIBEXECDIR "/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 fc45e1d127..0000000000
--- a/camel/camel-lock-client.h
+++ /dev/null
@@ -1,41 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 9e5dc012a3..0000000000
--- a/camel/camel-lock-helper.c
+++ /dev/null
@@ -1,390 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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>
-
-#include <string.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 c61a097642..0000000000
--- a/camel/camel-lock-helper.h
+++ /dev/null
@@ -1,69 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 dd52daa882..0000000000
--- a/camel/camel-lock.c
+++ /dev/null
@@ -1,425 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <glib.h>
-
-#include "camel-lock.h"
-#include "camel-i18n.h"
-
-#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, g_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, g_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("Our 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"),
- g_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"),
- g_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 d54f7ed071..0000000000
--- a/camel/camel-lock.h
+++ /dev/null
@@ -1,63 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 6a89682a2c..0000000000
--- a/camel/camel-medium.c
+++ /dev/null
@@ -1,332 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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"
-
-#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 char *name,
- const void *value);
-static void set_header (CamelMedium *medium, const char *name, const void *value);
-static void remove_header (CamelMedium *medium, const char *name);
-static const void *get_header (CamelMedium *medium, const char *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 (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 char *name, const void *value)
-{
- g_warning("No %s::add_header implemented, adding %s", camel_type_to_name(CAMEL_OBJECT_GET_TYPE(medium)), name);
-}
-
-/**
- * camel_medium_add_header:
- * @medium: a CamelMedium
- * @name: name of the 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 char *name, const void *value)
-{
- g_return_if_fail (CAMEL_IS_MEDIUM (medium));
- g_return_if_fail (name != NULL);
- g_return_if_fail (value != NULL);
-
- CM_CLASS (medium)->add_header(medium, name, value);
-}
-
-static void
-set_header (CamelMedium *medium, const char *name, const void *value)
-{
- g_warning("No %s::set_header implemented, setting %s", camel_type_to_name(CAMEL_OBJECT_GET_TYPE(medium)), name);
-}
-
-/**
- * camel_medium_set_header:
- * @medium: a CamelMedium
- * @name: name of the 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 *name, const void *value)
-{
- g_return_if_fail (CAMEL_IS_MEDIUM (medium));
- g_return_if_fail (name != NULL);
-
- if (value == NULL)
- CM_CLASS(medium)->remove_header(medium, name);
- else
- CM_CLASS(medium)->set_header(medium, name, value);
-}
-
-static void
-remove_header(CamelMedium *medium, const char *name)
-{
- g_warning("No %s::remove_header implemented, removing %s", camel_type_to_name(CAMEL_OBJECT_GET_TYPE(medium)), name);
-}
-
-/**
- * camel_medium_remove_header:
- * @medium: a medium
- * @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 *name)
-{
- g_return_if_fail (CAMEL_IS_MEDIUM (medium));
- g_return_if_fail (name != NULL);
-
- CM_CLASS(medium)->remove_header(medium, name);
-}
-
-
-static const void *
-get_header(CamelMedium *medium, const char *name)
-{
- g_warning("No %s::get_header implemented, getting %s", camel_type_to_name(CAMEL_OBJECT_GET_TYPE(medium)), name);
- return NULL;
-}
-
-/**
- * camel_medium_get_header:
- * @medium: a medium
- * @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.
- *
- * If the header occurs more than once, only retrieve the first
- * instance of the header. For multi-occuring headers, use
- * :get_headers().
- *
- * Return value: the value of the named header, or %NULL
- **/
-const void *
-camel_medium_get_header(CamelMedium *medium, const char *name)
-{
- g_return_val_if_fail (CAMEL_IS_MEDIUM (medium), NULL);
- g_return_val_if_fail (name != NULL, NULL);
-
- return CM_CLASS (medium)->get_header (medium, 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 (medium->content);
- camel_object_ref (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 7b01eae39f..0000000000
--- a/camel/camel-medium.h
+++ /dev/null
@@ -1,97 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 char *name, const void *value);
- void (*set_header) (CamelMedium *medium, const char *name, const void *value);
- void (*remove_header) (CamelMedium *medium, const char *name);
- const void * (*get_header) (CamelMedium *medium, const char *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 char *name, const void *value);
-void camel_medium_set_header (CamelMedium *medium, const char *name, const void *value);
-void camel_medium_remove_header (CamelMedium *medium, const char *name);
-const void *camel_medium_get_header (CamelMedium *medium, const char *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 d99d465443..0000000000
--- a/camel/camel-mime-filter-basic.c
+++ /dev/null
@@ -1,291 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include "camel-mime-filter-basic.h"
-
-#include "camel-mime-utils.h"
-#include <string.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;
- size_t 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 = camel_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 = camel_quoted_decode_close(in, len, mf->outbuf, &f->state, &f->save);
- g_assert(newlen <= len*4+4);
- break;
- case CAMEL_MIME_FILTER_BASIC_UU_ENC:
- /* won't go to more than 2 * (x + 2) + 62 */
- camel_mime_filter_set_size (mf, (len + 2) * 2 + 62, FALSE);
- newlen = camel_uuencode_close (in, len, mf->outbuf, f->uubuf, &f->state, &f->save);
- g_assert (newlen <= (len + 2) * 2 + 62);
- 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 = camel_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, well unless its not really qp, then +2 max */
- camel_mime_filter_set_size(mf, len+2, FALSE);
- newlen = camel_quoted_decode_step(in, len, mf->outbuf, &f->state, &f->save);
- g_assert(newlen <= len+2);
- break;
- case CAMEL_MIME_FILTER_BASIC_UU_DEC:
- if ((f->state & CAMEL_UUDECODE_STATE_BEGIN) && !(f->state & CAMEL_UUDECODE_STATE_END)) {
- /* "begin <mode> <filename>\n" has been found, so we can now start decoding */
- camel_mime_filter_set_size (mf, len + 3, FALSE);
- newlen = camel_uudecode_step (in, len, mf->outbuf, &f->state, &f->save);
- } else {
- newlen = 0;
- }
- 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;
- size_t 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 = camel_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 = camel_quoted_encode_step(in, len, mf->outbuf, &f->state, &f->save);
- g_assert(newlen <= len*4+4);
- break;
- case CAMEL_MIME_FILTER_BASIC_UU_ENC:
- /* won't go to more than 2 * (x + 2) + 62 */
- camel_mime_filter_set_size (mf, (len + 2) * 2 + 62, FALSE);
- newlen = camel_uuencode_step (in, len, mf->outbuf, f->uubuf, &f->state, &f->save);
- g_assert (newlen <= (len + 2) * 2 + 62);
- 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 = camel_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 + 2, FALSE);
- newlen = camel_quoted_decode_step(in, len, mf->outbuf, &f->state, &f->save);
- g_assert(newlen <= len + 2);
- break;
- case CAMEL_MIME_FILTER_BASIC_UU_DEC:
- if (!(f->state & CAMEL_UUDECODE_STATE_BEGIN)) {
- register char *inptr, *inend;
- size_t left;
-
- inptr = in;
- inend = inptr + len;
-
- while (inptr < inend) {
- left = inend - inptr;
- if (left < 6) {
- if (!strncmp (inptr, "begin ", left))
- camel_mime_filter_backup (mf, inptr, left);
- break;
- } else if (!strncmp (inptr, "begin ", 6)) {
- for (in = inptr; inptr < inend && *inptr != '\n'; inptr++);
- if (inptr < inend) {
- inptr++;
- f->state |= CAMEL_UUDECODE_STATE_BEGIN;
- /* we can start uudecoding... */
- in = inptr;
- len = inend - in;
- } else {
- camel_mime_filter_backup (mf, in, left);
- }
- break;
- }
-
- /* go to the next line */
- for ( ; inptr < inend && *inptr != '\n'; inptr++);
-
- if (inptr < inend)
- inptr++;
- }
- }
-
- if ((f->state & CAMEL_UUDECODE_STATE_BEGIN) && !(f->state & CAMEL_UUDECODE_STATE_END)) {
- /* "begin <mode> <filename>\n" has been found, so we can now start decoding */
- camel_mime_filter_set_size (mf, len + 3, FALSE);
- newlen = camel_uudecode_step (in, len, mf->outbuf, &f->state, &f->save);
- } else {
- newlen = 0;
- }
- 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:
- case CAMEL_MIME_FILTER_BASIC_UU_ENC:
- case CAMEL_MIME_FILTER_BASIC_UU_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 f380f5e7a4..0000000000
--- a/camel/camel-mime-filter-basic.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2003 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_BASIC_H
-#define _CAMEL_MIME_FILTER_BASIC_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#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,
- CAMEL_MIME_FILTER_BASIC_UU_ENC,
- CAMEL_MIME_FILTER_BASIC_UU_DEC,
-} CamelMimeFilterBasicType;
-
-struct _CamelMimeFilterBasic {
- CamelMimeFilter parent;
-
- struct _CamelMimeFilterBasicPrivate *priv;
-
- CamelMimeFilterBasicType type;
-
- unsigned char uubuf[60];
- int state;
- int save;
-};
-
-struct _CamelMimeFilterBasicClass {
- CamelMimeFilterClass parent_class;
-};
-
-CamelType camel_mime_filter_basic_get_type (void);
-CamelMimeFilterBasic *camel_mime_filter_basic_new (void);
-CamelMimeFilterBasic *camel_mime_filter_basic_new_type (CamelMimeFilterBasicType type);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#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 2752652003..0000000000
--- a/camel/camel-mime-filter-bestenc.c
+++ /dev/null
@@ -1,300 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 "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: bestenc filter object
- * @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:
- **/
-CamelTransferEncoding
-camel_mime_filter_bestenc_get_best_encoding(CamelMimeFilterBestenc *f, CamelBestencEncoding required)
-{
- CamelTransferEncoding bestenc;
- int istext;
-
- istext = (required & CAMEL_BESTENC_TEXT) ? 1 : 0;
- required = required & ~CAMEL_BESTENC_TEXT;
-
-#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_TRANSFER_ENCODING_BASE64;
-
- /* if we need to encode, see how we do it */
- if (required == CAMEL_BESTENC_BINARY)
- bestenc = CAMEL_TRANSFER_ENCODING_BINARY;
- else if (istext && (f->count0 == 0 && f->count8 < (f->total * 17 / 100)))
- bestenc = CAMEL_TRANSFER_ENCODING_QUOTEDPRINTABLE;
- else
- bestenc = CAMEL_TRANSFER_ENCODING_BASE64;
-
- /* 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_TRANSFER_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:
- default:
- if (f->count0 == 0)
- return CAMEL_TRANSFER_ENCODING_8BIT;
- else
- return bestenc;
- }
-
- return CAMEL_TRANSFER_ENCODING_DEFAULT;
-}
-
-/**
- * camel_mime_filter_bestenc_get_best_charset:
- * @f: bestenc filter object
- *
- * 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 be0b8ae37a..0000000000
--- a/camel/camel-mime-filter-bestenc.h
+++ /dev/null
@@ -1,101 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_BESTENC_H
-#define _CAMEL_MIME_FILTER_BESTENC_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#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,
-
- /* is the content stream to be treated as text? */
- CAMEL_BESTENC_TEXT = 1<<8,
-};
-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 \n 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;
-};
-
-CamelType camel_mime_filter_bestenc_get_type (void);
-CamelMimeFilterBestenc *camel_mime_filter_bestenc_new (unsigned int flags);
-
-
-CamelTransferEncoding 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);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* ! _CAMEL_MIME_FILTER_BESTENC_H */
diff --git a/camel/camel-mime-filter-canon.c b/camel/camel-mime-filter-canon.c
deleted file mode 100644
index 43337ae856..0000000000
--- a/camel/camel-mime-filter-canon.c
+++ /dev/null
@@ -1,239 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2002 Ximian, Inc.
- *
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- * Michael Zucchi <notzed@ximian.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/* canonicalisation filter, used for secure mime incoming and outgoing */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-#include <ctype.h>
-
-#include "camel-mime-filter-canon.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_canon_class_init (CamelMimeFilterCanonClass *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_canon_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_mime_filter_get_type(), "CamelMimeFilterCanon",
- sizeof (CamelMimeFilterCanon),
- sizeof (CamelMimeFilterCanonClass),
- (CamelObjectClassInitFunc) camel_mime_filter_canon_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)
-{
- register unsigned char *inptr, c;
- const unsigned char *inend, *start;
- char *starto;
- register char *o;
- int lf = 0;
- guint32 flags;
-
- flags = ((CamelMimeFilterCanon *)f)->flags;
-
- /* first, work out how much space we need */
- inptr = in;
- inend = in+len;
- while (inptr < inend)
- if (*inptr++ == '\n')
- lf++;
-
- /* worst case, extra 3 chars per line
- "From \n" -> "=46rom \r\n"
- We add 1 extra incase we're called from complete, when we didn't end in \n */
-
- camel_mime_filter_set_size(f, len+lf*3+4, FALSE);
-
- o = f->outbuf;
- inptr = in;
- start = inptr;
- starto = o;
- while (inptr < inend) {
- /* first, check start of line, we always start at the start of the line */
- c = *inptr;
- if (flags & CAMEL_MIME_FILTER_CANON_FROM && c == 'F') {
- inptr++;
- if (inptr < inend-4) {
- if (strncmp(inptr, "rom ", 4) == 0) {
- *o++ = '=';
- *o++ = '4';
- *o++ = '6';
- } else
- *o++ = 'F';
- *o++ = *inptr++;
- *o++ = *inptr++;
- *o++ = *inptr++;
- *o++ = *inptr++;
- } else {
- break;
- }
- }
-
- /* now scan for end of line */
- while (inptr < inend) {
- c = *inptr++;
- if (c == '\n') {
- /* check to strip trailing space */
- if (flags & CAMEL_MIME_FILTER_CANON_STRIP) {
- while (o>starto && (o[-1] == ' ' || o[-1] == '\t' || o[-1]=='\r'))
- o--;
- }
- /* check end of line canonicalisation */
- if (o>starto) {
- if (flags & CAMEL_MIME_FILTER_CANON_CRLF) {
- if (o[-1] != '\r')
- *o++ = '\r';
- } else {
- if (o[-1] == '\r')
- o--;
- }
- } else if (flags & CAMEL_MIME_FILTER_CANON_CRLF) {
- /* empty line */
- *o++ = '\r';
- }
-
- *o++ = c;
- start = inptr;
- starto = o;
- break;
- } else
- *o++ = c;
- }
- }
-
- /* TODO: We should probably track if we end somewhere in the middle of a line,
- otherwise we potentially backup a full line, which could be large */
-
- /* we got to the end of the data without finding anything, backup to start and re-process next time around */
- camel_mime_filter_backup(f, start, inend - start);
-
- *out = f->outbuf;
- *outlen = starto - 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)
-{
- unsigned char *inptr, *inend;
- char *o, *starto;
- guint32 flags;
-
- if (len)
- filter(f, in, len, prespace, out, outlen, outprespace);
-
- /* the data didn't contain an eol or was too short for "From ", we only need to check for "From" and add an eol */
- if (f->backlen) {
- inptr = (unsigned char *)f->backbuf;
- inend = (unsigned char *)f->backbuf + f->backlen;
- starto = o = *out + *outlen;
- flags = ((CamelMimeFilterCanon *)f)->flags;
-
- /* Check any embedded "From " */
- if (f->backlen >= 5
- && (flags & CAMEL_MIME_FILTER_CANON_FROM)
- && strcmp(inptr, "From ") == 0) {
- strcpy(o, "=46rom ");
- o += 7;
- inptr += 5;
- }
-
- /* copy the rest of it */
- while (inptr < inend)
- *o++ = *inptr++;
-
- /* check to strip trailing space */
- if (flags & CAMEL_MIME_FILTER_CANON_STRIP) {
- while (o>starto && (o[-1] == ' ' || o[-1] == '\t' || o[-1]=='\r'))
- o--;
- }
-
-#if 0
- /* Note: #if 0'd out because we do not want to add a
- * \r\n for PGP/MIME verification if it isn't there in
- * the original content stream */
-
- /* check end of line canonicalisation */
- if (o>starto) {
- if (flags & CAMEL_MIME_FILTER_CANON_CRLF) {
- if (o[-1] != '\r')
- *o++ = '\r';
- } else {
- if (o[-1] == '\r')
- o--;
- }
- }
-
- /* and always finish with an eol */
- *o++ = '\n';
-#endif
-
- *outlen = o - *out;
-
- f->backlen = 0;
- }
-}
-
-static void
-reset (CamelMimeFilter *f)
-{
- /* no-op */
-}
-
-CamelMimeFilter *
-camel_mime_filter_canon_new(guint32 flags)
-{
- CamelMimeFilterCanon *chomp = CAMEL_MIME_FILTER_CANON (camel_object_new (CAMEL_MIME_FILTER_CANON_TYPE));
-
- chomp->flags = flags;
-
- return (CamelMimeFilter *) chomp;
-}
diff --git a/camel/camel-mime-filter-canon.h b/camel/camel-mime-filter-canon.h
deleted file mode 100644
index d3cffb240e..0000000000
--- a/camel/camel-mime-filter-canon.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2002 Ximian Inc.
- *
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- * Michael Zucchi <notzed@ximian.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_CANON_H
-#define _CAMEL_MIME_FILTER_CANON_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <camel/camel-mime-filter.h>
-
-#define CAMEL_MIME_FILTER_CANON_TYPE (camel_mime_filter_canon_get_type ())
-#define CAMEL_MIME_FILTER_CANON(obj) CAMEL_CHECK_CAST (obj, CAMEL_MIME_FILTER_CANON_TYPE, CamelMimeFilterCanon)
-#define CAMEL_MIME_FILTER_CANON_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, CAMEL_MIME_FILTER_CANON_TYPE, CamelMimeFilterCanonClass)
-#define CAMEL_IS_MIME_FILTER_CANON(obj) CAMEL_CHECK_TYPE (obj, CAMEL_MIME_FILTER_CANON_TYPE)
-
-typedef struct _CamelMimeFilterCanon CamelMimeFilterCanon;
-typedef struct _CamelMimeFilterCanonClass CamelMimeFilterCanonClass;
-
-enum {
- CAMEL_MIME_FILTER_CANON_CRLF = (1<<0), /* canoncialise end of line to crlf, otherwise canonicalise to lf only */
- CAMEL_MIME_FILTER_CANON_FROM = (1<<1), /* escape "^From " using quoted-printable semantics into "=46rom " */
- CAMEL_MIME_FILTER_CANON_STRIP = (1<<2), /* strip trailing space */
-};
-
-struct _CamelMimeFilterCanon {
- CamelMimeFilter parent;
-
- guint32 flags;
-};
-
-struct _CamelMimeFilterCanonClass {
- CamelMimeFilterClass parent_class;
-};
-
-CamelType camel_mime_filter_canon_get_type (void);
-
-CamelMimeFilter *camel_mime_filter_canon_new(guint32 flags);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* ! _CAMEL_MIME_FILTER_CANON_H */
diff --git a/camel/camel-mime-filter-charset.c b/camel/camel-mime-filter-charset.c
deleted file mode 100644
index 012f1897be..0000000000
--- a/camel/camel-mime-filter-charset.c
+++ /dev/null
@@ -1,277 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <errno.h>
-
-#include <gal/util/e-iconv.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) {
- e_iconv_close (f->ic);
- f->ic = (iconv_t) -1;
- }
-}
-
-static void
-reset(CamelMimeFilter *mf)
-{
- CamelMimeFilterCharset *f = (CamelMimeFilterCharset *)mf;
- char buf[16];
- char *buffer;
- size_t outlen = 16;
-
- /* what happens with the output bytes if this resets the state? */
- if (f->ic != (iconv_t) -1) {
- buffer = buf;
- e_iconv (f->ic, NULL, 0, &buffer, &outlen);
- }
-}
-
-static void
-complete(CamelMimeFilter *mf, char *in, size_t len, size_t prespace, char **out, size_t *outlen, size_t *outprespace)
-{
- CamelMimeFilterCharset *charset = (CamelMimeFilterCharset *)mf;
- size_t inleft, outleft, converted = 0;
- const char *inbuf;
- char *outbuf;
-
- if (charset->ic == (iconv_t) -1)
- goto noop;
-
- camel_mime_filter_set_size (mf, len * 5 + 16, FALSE);
- outbuf = mf->outbuf;
- outleft = mf->outsize;
-
- inbuf = in;
- inleft = len;
-
- if (inleft > 0) {
- do {
- converted = e_iconv (charset->ic, &inbuf, &inleft, &outbuf, &outleft);
- if (converted == (size_t) -1) {
- if (errno == E2BIG) {
- /*
- * E2BIG There is not sufficient room at *outbuf.
- *
- * We just need to grow our outbuffer and try again.
- */
-
- converted = outbuf - mf->outbuf;
- camel_mime_filter_set_size (mf, inleft * 5 + mf->outsize + 16, TRUE);
- outbuf = mf->outbuf + converted;
- outleft = mf->outsize - converted;
- } else if (errno == EILSEQ) {
- /*
- * EILSEQ An invalid multibyte sequence has been encountered
- * in the input.
- *
- * What we do here is eat the invalid bytes in the sequence and continue
- */
-
- inbuf++;
- inleft--;
- } else if (errno == EINVAL) {
- /*
- * EINVAL An incomplete multibyte sequence has been encoun
- * tered in the input.
- *
- * We assume that this can only happen if we've run out of
- * bytes for a multibyte sequence, if not we're in trouble.
- */
-
- break;
- } else
- goto noop;
- }
- } while (((int) inleft) > 0);
- }
-
- /* flush the iconv conversion */
- e_iconv (charset->ic, NULL, NULL, &outbuf, &outleft);
-
- *out = mf->outbuf;
- *outlen = mf->outsize - outleft;
- *outprespace = mf->outpre;
-
- return;
-
- noop:
-
- *out = in;
- *outlen = len;
- *outprespace = prespace;
-}
-
-static void
-filter(CamelMimeFilter *mf, char *in, size_t len, size_t prespace, char **out, size_t *outlen, size_t *outprespace)
-{
- CamelMimeFilterCharset *charset = (CamelMimeFilterCharset *)mf;
- size_t inleft, outleft, converted = 0;
- const char *inbuf;
- char *outbuf;
-
- if (charset->ic == (iconv_t) -1)
- goto noop;
-
- camel_mime_filter_set_size (mf, len * 5 + 16, FALSE);
- outbuf = mf->outbuf + converted;
- outleft = mf->outsize - converted;
-
- inbuf = in;
- inleft = len;
-
- do {
- converted = e_iconv (charset->ic, &inbuf, &inleft, &outbuf, &outleft);
- if (converted == (size_t) -1) {
- if (errno == E2BIG || errno == EINVAL)
- break;
-
- if (errno == EILSEQ) {
- /*
- * EILSEQ An invalid multibyte sequence has been encountered
- * in the input.
- *
- * What we do here is eat the invalid bytes in the sequence and continue
- */
-
- inbuf++;
- inleft--;
- } else {
- /* unknown error condition */
- goto noop;
- }
- }
- } while (((int) inleft) > 0);
-
- if (((int) inleft) > 0) {
- /* We've either got an E2BIG or EINVAL. Save the
- remainder of the buffer as we'll process this next
- time through */
- camel_mime_filter_backup (mf, inbuf, inleft);
- }
-
- *out = mf->outbuf;
- *outlen = outbuf - mf->outbuf;
- *outprespace = mf->outpre;
-
- return;
-
- noop:
-
- *out = in;
- *outlen = 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)
-{
- return CAMEL_MIME_FILTER_CHARSET (camel_object_new (camel_mime_filter_charset_get_type ()));
-}
-
-CamelMimeFilterCharset *
-camel_mime_filter_charset_new_convert (const char *from_charset, const char *to_charset)
-{
- CamelMimeFilterCharset *new;
-
- new = CAMEL_MIME_FILTER_CHARSET (camel_object_new (camel_mime_filter_charset_get_type ()));
-
- new->ic = e_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 ? from_charset : "(null)",
- to_charset ? to_charset : "(null)",
- g_strerror (errno));
- camel_object_unref (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 ddc3025eb0..0000000000
--- a/camel/camel-mime-filter-charset.h
+++ /dev/null
@@ -1,62 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_CHARSET_H
-#define _CAMEL_MIME_FILTER_CHARSET_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#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;
-};
-
-CamelType 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);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#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 bd21ef991c..0000000000
--- a/camel/camel-mime-filter-crlf.c
+++ /dev/null
@@ -1,172 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include "camel-mime-filter-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;
- register const char *inptr;
- const char *inend;
- gboolean do_dots;
- char *outptr;
-
- do_dots = crlf->mode == CAMEL_MIME_FILTER_CRLF_MODE_CRLF_DOTS;
-
- inptr = in;
- inend = in + len;
-
- if (crlf->direction == CAMEL_MIME_FILTER_CRLF_ENCODE) {
- camel_mime_filter_set_size (f, 3 * len, FALSE);
-
- outptr = f->outbuf;
- while (inptr < inend) {
- if (*inptr == '\r') {
- crlf->saw_cr = TRUE;
- } else if (*inptr == '\n') {
- crlf->saw_lf = TRUE;
- if (!crlf->saw_cr)
- *outptr++ = '\r';
- crlf->saw_cr = FALSE;
- } else {
- if (do_dots && *inptr == '.' && crlf->saw_lf)
- *outptr++ = '.';
-
- crlf->saw_cr = FALSE;
- crlf->saw_lf = FALSE;
- }
-
- *outptr++ = *inptr++;
- }
- } else {
- camel_mime_filter_set_size (f, len, FALSE);
-
- outptr = f->outbuf;
- while (inptr < inend) {
- if (*inptr == '\r') {
- crlf->saw_cr = TRUE;
- } else {
- if (crlf->saw_cr) {
- crlf->saw_cr = FALSE;
-
- if (*inptr == '\n') {
- crlf->saw_lf = TRUE;
- *outptr++ = *inptr++;
- continue;
- } else
- *outptr++ = '\r';
- }
-
- *outptr++ = *inptr;
- }
-
- if (do_dots && *inptr == '.') {
- if (crlf->saw_lf) {
- crlf->saw_dot = TRUE;
- crlf->saw_lf = FALSE;
- inptr++;
- } else if (crlf->saw_dot) {
- crlf->saw_dot = FALSE;
- }
- }
-
- crlf->saw_lf = FALSE;
-
- inptr++;
- }
- }
-
- *out = f->outbuf;
- *outlen = outptr - 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 1e3526d600..0000000000
--- a/camel/camel-mime-filter-crlf.h
+++ /dev/null
@@ -1,73 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_CRLF_H
-#define _CAMEL_MIME_FILTER_CRLF_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#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);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* ! _CAMEL_MIME_FILTER_CRLF_H */
diff --git a/camel/camel-mime-filter-enriched.c b/camel/camel-mime-filter-enriched.c
deleted file mode 100644
index b31502ead6..0000000000
--- a/camel/camel-mime-filter-enriched.c
+++ /dev/null
@@ -1,591 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2002 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/camel-string-utils.h>
-
-#include "camel-mime-filter-enriched.h"
-
-/* text/enriched is rfc1896 */
-
-typedef char * (*EnrichedParamParser) (const char *inptr, int inlen);
-
-static char *param_parse_colour (const char *inptr, int inlen);
-static char *param_parse_font (const char *inptr, int inlen);
-static char *param_parse_lang (const char *inptr, int inlen);
-
-static struct {
- char *enriched;
- char *html;
- gboolean needs_param;
- EnrichedParamParser parse_param; /* parses *and* validates the input */
-} enriched_tags[] = {
- { "bold", "<b>", FALSE, NULL },
- { "/bold", "</b>", FALSE, NULL },
- { "italic", "<i>", FALSE, NULL },
- { "/italic", "</i>", FALSE, NULL },
- { "fixed", "<tt>", FALSE, NULL },
- { "/fixed", "</tt>", FALSE, NULL },
- { "smaller", "<font size=-1>", FALSE, NULL },
- { "/smaller", "</font>", FALSE, NULL },
- { "bigger", "<font size=+1>", FALSE, NULL },
- { "/bigger", "</font>", FALSE, NULL },
- { "underline", "<u>", FALSE, NULL },
- { "/underline", "</u>", FALSE, NULL },
- { "center", "<p align=center>", FALSE, NULL },
- { "/center", "</p>", FALSE, NULL },
- { "flushleft", "<p align=left>", FALSE, NULL },
- { "/flushleft", "</p>", FALSE, NULL },
- { "flushright", "<p align=right>", FALSE, NULL },
- { "/flushright", "</p>", FALSE, NULL },
- { "excerpt", "<blockquote>", FALSE, NULL },
- { "/excerpt", "</blockquote>", FALSE, NULL },
- { "paragraph", "<p>", FALSE, NULL },
- { "signature", "<address>", FALSE, NULL },
- { "/signature", "</address>", FALSE, NULL },
- { "comment", "<!-- ", FALSE, NULL },
- { "/comment", " -->", FALSE, NULL },
- { "np", "<hr>", FALSE, NULL },
- { "fontfamily", "<font face=\"%s\">", TRUE, param_parse_font },
- { "/fontfamily", "</font>", FALSE, NULL },
- { "color", "<font color=\"%s\">", TRUE, param_parse_colour },
- { "/color", "</font>", FALSE, NULL },
- { "lang", "<span lang=\"%s\">", TRUE, param_parse_lang },
- { "/lang", "</span>", FALSE, NULL },
-
- /* don't handle this tag yet... */
- { "paraindent", "<!-- ", /* TRUE */ FALSE, NULL },
- { "/paraindent", " -->", FALSE, NULL },
-
- /* as soon as we support all the tags that can have a param
- * tag argument, these should be unnecessary, but we'll keep
- * them anyway just in case? */
- { "param", "<!-- ", FALSE, NULL },
- { "/param", " -->", FALSE, NULL },
-};
-
-#define NUM_ENRICHED_TAGS (sizeof (enriched_tags) / sizeof (enriched_tags[0]))
-
-static GHashTable *enriched_hash = NULL;
-
-
-static void camel_mime_filter_enriched_class_init (CamelMimeFilterEnrichedClass *klass);
-static void camel_mime_filter_enriched_init (CamelMimeFilterEnriched *filter);
-static void camel_mime_filter_enriched_finalize (CamelObject *obj);
-
-static void filter_filter (CamelMimeFilter *filter, char *in, size_t len, size_t prespace,
- char **out, size_t *outlen, size_t *outprespace);
-static void filter_complete (CamelMimeFilter *filter, char *in, size_t len, size_t prespace,
- char **out, size_t *outlen, size_t *outprespace);
-static void filter_reset (CamelMimeFilter *filter);
-
-
-static CamelMimeFilterClass *parent_class = NULL;
-
-
-CamelType
-camel_mime_filter_enriched_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_mime_filter_get_type (),
- "CamelMimeFilterEnriched",
- sizeof (CamelMimeFilterEnriched),
- sizeof (CamelMimeFilterEnrichedClass),
- (CamelObjectClassInitFunc) camel_mime_filter_enriched_class_init,
- NULL,
- (CamelObjectInitFunc) camel_mime_filter_enriched_init,
- (CamelObjectFinalizeFunc) camel_mime_filter_enriched_finalize);
- }
-
- return type;
-}
-
-static void
-camel_mime_filter_enriched_class_init (CamelMimeFilterEnrichedClass *klass)
-{
- CamelMimeFilterClass *filter_class = (CamelMimeFilterClass *) klass;
- int i;
-
- parent_class = CAMEL_MIME_FILTER_CLASS (camel_mime_filter_get_type ());
-
- filter_class->reset = filter_reset;
- filter_class->filter = filter_filter;
- filter_class->complete = filter_complete;
-
- if (!enriched_hash) {
- enriched_hash = g_hash_table_new (camel_strcase_hash, camel_strcase_equal);
- for (i = 0; i < NUM_ENRICHED_TAGS; i++)
- g_hash_table_insert (enriched_hash, enriched_tags[i].enriched,
- enriched_tags[i].html);
- }
-}
-
-static void
-camel_mime_filter_enriched_finalize (CamelObject *obj)
-{
- ;
-}
-
-static void
-camel_mime_filter_enriched_init (CamelMimeFilterEnriched *filter)
-{
- filter->flags = 0;
- filter->nofill = 0;
-}
-
-
-#if 0
-static gboolean
-enriched_tag_needs_param (const char *tag)
-{
- int i;
-
- for (i = 0; i < NUM_ENRICHED_TAGS; i++)
- if (!strcasecmp (tag, enriched_tags[i].enriched))
- return enriched_tags[i].needs_param;
-
- return FALSE;
-}
-#endif
-
-static gboolean
-html_tag_needs_param (const char *tag)
-{
- return strstr (tag, "%s") != NULL;
-}
-
-static const char *valid_colours[] = {
- "red", "green", "blue", "yellow", "cyan", "magenta", "black", "white"
-};
-
-#define NUM_VALID_COLOURS (sizeof (valid_colours) / sizeof (valid_colours[0]))
-
-static char *
-param_parse_colour (const char *inptr, int inlen)
-{
- const char *inend, *end;
- guint32 rgb = 0;
- guint v;
- int i;
-
- for (i = 0; i < NUM_VALID_COLOURS; i++) {
- if (!strncasecmp (inptr, valid_colours[i], inlen))
- return g_strdup (valid_colours[i]);
- }
-
- /* check for numeric r/g/b in the format: ####,####,#### */
- if (inptr[4] != ',' || inptr[9] != ',') {
- /* okay, mailer must have used a string name that
- * rfc1896 did not specify? do some simple scanning
- * action, a colour name MUST be [a-zA-Z] */
- end = inptr;
- inend = inptr + inlen;
- while (end < inend && ((*end >= 'a' && *end <= 'z') || (*end >= 'A' && *end <= 'Z')))
- end++;
-
- return g_strndup (inptr, end - inptr);
- }
-
- for (i = 0; i < 3; i++) {
- v = strtoul (inptr, (char **) &end, 16);
- if (end != inptr + 4)
- goto invalid_format;
-
- v >>= 8;
- rgb = (rgb << 8) | (v & 0xff);
-
- inptr += 5;
- }
-
- return g_strdup_printf ("#%.6X", rgb);
-
- invalid_format:
-
- /* default colour? */
- return g_strdup ("black");
-}
-
-static char *
-param_parse_font (const char *fontfamily, int inlen)
-{
- register const char *inptr = fontfamily;
- const char *inend = inptr + inlen;
-
- /* don't allow any of '"', '<', nor '>' */
- while (inptr < inend && *inptr != '"' && *inptr != '<' && *inptr != '>')
- inptr++;
-
- return g_strndup (fontfamily, inptr - fontfamily);
-}
-
-static char *
-param_parse_lang (const char *lang, int inlen)
-{
- register const char *inptr = lang;
- const char *inend = inptr + inlen;
-
- /* don't allow any of '"', '<', nor '>' */
- while (inptr < inend && *inptr != '"' && *inptr != '<' && *inptr != '>')
- inptr++;
-
- return g_strndup (lang, inptr - lang);
-}
-
-static char *
-param_parse (const char *enriched, const char *inptr, int inlen)
-{
- int i;
-
- for (i = 0; i < NUM_ENRICHED_TAGS; i++) {
- if (!strcasecmp (enriched, enriched_tags[i].enriched))
- return enriched_tags[i].parse_param (inptr, inlen);
- }
-
- g_assert_not_reached ();
-
- return NULL;
-}
-
-#define IS_RICHTEXT CAMEL_MIME_FILTER_ENRICHED_IS_RICHTEXT
-
-static void
-enriched_to_html (CamelMimeFilter *filter, char *in, size_t inlen, size_t prespace,
- char **out, size_t *outlen, size_t *outprespace, gboolean flush)
-{
- CamelMimeFilterEnriched *enriched = (CamelMimeFilterEnriched *) filter;
- const char *tag, *inend, *outend;
- register const char *inptr;
- register char *outptr;
-
- camel_mime_filter_set_size (filter, inlen * 2 + 6, FALSE);
-
- inptr = in;
- inend = in + inlen;
- outptr = filter->outbuf;
- outend = filter->outbuf + filter->outsize;
-
- retry:
- do {
- while (inptr < inend && outptr < outend && !strchr (" <>&\n", *inptr))
- *outptr++ = *inptr++;
-
- if (outptr == outend)
- goto backup;
-
- if ((inptr + 1) >= inend)
- break;
-
- switch (*inptr++) {
- case ' ':
- while (inptr < inend && (outptr + 7) < outend && *inptr == ' ') {
- memcpy (outptr, "&nbsp;", 6);
- outptr += 6;
- inptr++;
- }
-
- if (outptr < outend)
- *outptr++ = ' ';
-
- break;
- case '\n':
- if (!(enriched->flags & IS_RICHTEXT) && enriched->nofill <= 0) {
- /* text/enriched */
- while (inptr < inend && (outptr + 4) < outend && *inptr == '\n') {
- memcpy (outptr, "<br>", 4);
- outptr += 4;
- inptr++;
- }
- } else {
- /* text/richtext */
- *outptr++ = ' ';
- }
- break;
- case '>':
- if ((outptr + 4) < outend) {
- memcpy (outptr, "&gt;", 4);
- outptr += 4;
- } else {
- inptr--;
- goto backup;
- }
- break;
- case '&':
- if ((outptr + 5) < outend) {
- memcpy (outptr, "&amp;", 5);
- outptr += 5;
- } else {
- inptr--;
- goto backup;
- }
- break;
- case '<':
- if (!(enriched->flags & IS_RICHTEXT)) {
- /* text/enriched */
- if (*inptr == '<') {
- if ((outptr + 4) < outend) {
- memcpy (outptr, "&lt;", 4);
- outptr += 4;
- inptr++;
- break;
- } else {
- inptr--;
- goto backup;
- }
- }
- } else {
- /* text/richtext */
- if ((inend - inptr) >= 3 && (outptr + 4) < outend) {
- if (strncmp (inptr, "lt>", 3) == 0) {
- memcpy (outptr, "&lt;", 4);
- outptr += 4;
- inptr += 3;
- break;
- } else if (strncmp (inptr, "nl>", 3) == 0) {
- memcpy (outptr, "<br>", 4);
- outptr += 4;
- inptr += 3;
- break;
- }
- } else {
- inptr--;
- goto backup;
- }
- }
-
- tag = inptr;
- while (inptr < inend && *inptr != '>')
- inptr++;
-
- if (inptr == inend) {
- inptr = tag - 1;
- goto need_input;
- }
-
- if (!strncasecmp (tag, "nofill>", 7)) {
- if ((outptr + 5) < outend) {
- memcpy (outptr, "<pre>", 5);
- enriched->nofill++;
- outptr += 5;
- } else {
- inptr = tag - 1;
- goto backup;
- }
- } else if (!strncasecmp (tag, "/nofill>", 8)) {
- if ((outptr + 6) < outend) {
- memcpy (outptr, "</pre>", 6);
- enriched->nofill--;
- outptr += 6;
- } else {
- inptr = tag - 1;
- goto backup;
- }
- } else {
- const char *html_tag;
- char *enriched_tag;
- int len;
-
- len = inptr - tag;
- enriched_tag = g_alloca (len + 1);
- memcpy (enriched_tag, tag, len);
- enriched_tag[len] = '\0';
-
- html_tag = g_hash_table_lookup (enriched_hash, enriched_tag);
-
- if (html_tag) {
- if (html_tag_needs_param (html_tag)) {
- const char *start;
- char *param;
-
- while (inptr < inend && *inptr != '<')
- inptr++;
-
-#define PARAM_TAG_MIN_LEN (sizeof ("<param>") + sizeof ("</param>") - 1)
- if (inptr == inend || (inend - inptr) <= PARAM_TAG_MIN_LEN) {
- inptr = tag - 1;
- goto need_input;
- }
-
- if (strncasecmp (inptr, "<param>", 7) != 0) {
- /* ignore the enriched command tag... */
- inptr -= 1;
- goto loop;
- }
-
- inptr += 7;
- start = inptr;
-
- while (inptr < inend && *inptr != '<')
- inptr++;
-
- if (inptr == inend || (inend - inptr) <= 8) {
- inptr = tag - 1;
- goto need_input;
- }
-
- if (strncasecmp (inptr, "</param>", 8) != 0) {
- /* ignore the enriched command tag... */
- inptr += 7;
- goto loop;
- }
-
- len = inptr - start;
- param = param_parse (enriched_tag, start, len);
- len = strlen (param);
-
- inptr += 7;
-
- len += strlen (html_tag);
-
- if ((outptr + len) < outend) {
- outptr += snprintf (outptr, len, html_tag, param);
- g_free (param);
- } else {
- g_free (param);
- inptr = tag - 1;
- goto backup;
- }
- } else {
- len = strlen (html_tag);
- if ((outptr + len) < outend) {
- memcpy (outptr, html_tag, len);
- outptr += len;
- } else {
- inptr = tag - 1;
- goto backup;
- }
- }
- }
- }
-
- loop:
- inptr++;
- break;
- default:
- break;
- }
- } while (inptr < inend);
-
- need_input:
-
- /* the reason we ignore @flush here is because if there isn't
- enough input to parse a tag, then there's nothing we can
- do. */
-
- if (inptr < inend)
- camel_mime_filter_backup (filter, inptr, (unsigned) (inend - inptr));
-
- *out = filter->outbuf;
- *outlen = outptr - filter->outbuf;
- *outprespace = filter->outpre;
-
- return;
-
- backup:
-
- if (flush) {
- size_t offset, grow;
-
- grow = (inend - inptr) * 2 + 20;
- offset = outptr - filter->outbuf;
- camel_mime_filter_set_size (filter, filter->outsize + grow, TRUE);
- outend = filter->outbuf + filter->outsize;
- outptr = filter->outbuf + offset;
-
- goto retry;
- } else {
- camel_mime_filter_backup (filter, inptr, (unsigned) (inend - inptr));
- }
-
- *out = filter->outbuf;
- *outlen = outptr - filter->outbuf;
- *outprespace = filter->outpre;
-}
-
-static void
-filter_filter (CamelMimeFilter *filter, char *in, size_t len, size_t prespace,
- char **out, size_t *outlen, size_t *outprespace)
-{
- enriched_to_html (filter, in, len, prespace, out, outlen, outprespace, FALSE);
-}
-
-static void
-filter_complete (CamelMimeFilter *filter, char *in, size_t len, size_t prespace,
- char **out, size_t *outlen, size_t *outprespace)
-{
- enriched_to_html (filter, in, len, prespace, out, outlen, outprespace, TRUE);
-}
-
-static void
-filter_reset (CamelMimeFilter *filter)
-{
- CamelMimeFilterEnriched *enriched = (CamelMimeFilterEnriched *) filter;
-
- enriched->nofill = 0;
-}
-
-
-/**
- * camel_mime_filter_enriched_new:
- * @flags:
- *
- * Creates a new CamelMimeFilterEnriched object.
- *
- * Returns a new CamelMimeFilter object.
- **/
-CamelMimeFilter *
-camel_mime_filter_enriched_new (guint32 flags)
-{
- CamelMimeFilterEnriched *new;
-
- new = (CamelMimeFilterEnriched *) camel_object_new (CAMEL_TYPE_MIME_FILTER_ENRICHED);
- new->flags = flags;
-
- return CAMEL_MIME_FILTER (new);
-}
-
-char *
-camel_enriched_to_html(const char *in, guint32 flags)
-{
- CamelMimeFilter *filter;
- size_t outlen, outpre;
- char *outbuf;
-
- if (in == NULL)
- return NULL;
-
- filter = camel_mime_filter_enriched_new(flags);
-
- camel_mime_filter_complete(filter, (char *)in, strlen(in), 0, &outbuf, &outlen, &outpre);
- outbuf = g_strndup (outbuf, outlen);
- camel_object_unref (filter);
-
- return outbuf;
-}
diff --git a/camel/camel-mime-filter-enriched.h b/camel/camel-mime-filter-enriched.h
deleted file mode 100644
index 8561bd65a4..0000000000
--- a/camel/camel-mime-filter-enriched.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2002 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_MIME_FILTER_ENRICHED_H__
-#define __CAMEL_MIME_FILTER_ENRICHED_H__
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <camel/camel-mime-filter.h>
-
-#define CAMEL_TYPE_MIME_FILTER_ENRICHED (camel_mime_filter_enriched_get_type ())
-#define CAMEL_MIME_FILTER_ENRICHED(obj) (CAMEL_CHECK_CAST (obj, CAMEL_TYPE_MIME_FILTER_ENRICHED, CamelMimeFilterEnriched))
-#define CAMEL_MIME_FILTER_ENRICHED_CLASS(klass) (CAMEL_CHECK_CLASS_CAST (klass, CAMEL_TYPE_MIME_FILTER_ENRICHED, CamelMimeFilterEnrichedClass))
-#define CAMEL_IS_MIME_FILTER_ENRICHED(obj) (CAMEL_CHECK_TYPE (obj, CAMEL_TYPE_MIME_FILTER_ENRICHED))
-
-
-#define CAMEL_MIME_FILTER_ENRICHED_IS_RICHTEXT (1 << 0)
-
-
-typedef struct _CamelMimeFilterEnriched CamelMimeFilterEnriched;
-typedef struct _CamelMimeFilterEnrichedClass CamelMimeFilterEnrichedClass;
-
-struct _CamelMimeFilterEnriched {
- CamelMimeFilter parent_object;
-
- guint32 flags;
- int nofill;
-};
-
-struct _CamelMimeFilterEnrichedClass {
- CamelMimeFilterClass parent_class;
-
-};
-
-CamelType camel_mime_filter_enriched_get_type (void);
-
-CamelMimeFilter *camel_mime_filter_enriched_new (guint32 flags);
-char *camel_enriched_to_html(const char *in, guint32 flags);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __CAMEL_MIME_FILTER_ENRICHED_H__ */
diff --git a/camel/camel-mime-filter-from.c b/camel/camel-mime-filter-from.c
deleted file mode 100644
index 092f4d3904..0000000000
--- a/camel/camel-mime-filter-from.c
+++ /dev/null
@@ -1,217 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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-mime-filter-from.h"
-
-#define d(x)
-
-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)
-{
- ;
-}
-
-/**
- * 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 b8f1bb9a4e..0000000000
--- a/camel/camel-mime-filter-from.h
+++ /dev/null
@@ -1,57 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#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;
-
- int midline; /* are we between lines? */
-};
-
-struct _CamelMimeFilterFromClass {
- CamelMimeFilterClass parent_class;
-};
-
-CamelType camel_mime_filter_from_get_type (void);
-CamelMimeFilterFrom *camel_mime_filter_from_new (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#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 3a9bdaba75..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <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 bb9b6aaa4e..0000000000
--- a/camel/camel-mime-filter-html.h
+++ /dev/null
@@ -1,57 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_HTML_H
-#define _CAMEL_MIME_FILTER_HTML_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#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;
-};
-
-CamelType camel_mime_filter_html_get_type (void);
-CamelMimeFilterHTML *camel_mime_filter_html_new (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#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 6648abf860..0000000000
--- a/camel/camel-mime-filter-index.c
+++ /dev/null
@@ -1,157 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include "camel-mime-filter-index.h"
-
-#include "camel-text-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;
-
- if (f->name)
- camel_object_unref((CamelObject *)f->name);
- camel_object_unref((CamelObject *)f->index);
-}
-
-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;
- }
-
- camel_index_name_add_buffer(f->name, in, len);
- camel_index_name_add_buffer(f->name, NULL, 0);
-
-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;
-
- if (f->index == NULL || f->name==NULL) {
- goto donothing;
- }
-
- camel_index_name_add_buffer(f->name, in, len);
-
-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_index (struct _CamelIndex *index)
-{
- CamelMimeFilterIndex *new = camel_mime_filter_index_new();
-
- if (new) {
- new->index = index;
- if (index)
- camel_object_ref((CamelObject *)index);
- }
- return new;
-}
-
-/* Set the match name for any indexed words */
-void camel_mime_filter_index_set_name (CamelMimeFilterIndex *mf, struct _CamelIndexName *name)
-{
- if (mf->name)
- camel_object_unref((CamelObject *)mf->name);
- mf->name = name;
- if (name)
- camel_object_ref((CamelObject *)name);
-}
-
-void camel_mime_filter_index_set_index (CamelMimeFilterIndex *mf, CamelIndex *index)
-{
- if (mf->index) {
- char *out;
- size_t outlen, outspace;
-
- camel_mime_filter_complete((CamelMimeFilter *)mf, "", 0, 0, &out, &outlen, &outspace);
- camel_object_unref ((CamelObject *)index);
- }
-
- mf->index = index;
- if (index)
- camel_object_ref((CamelObject *)index);
-}
-
-
-
diff --git a/camel/camel-mime-filter-index.h b/camel/camel-mime-filter-index.h
deleted file mode 100644
index 3bb1bd532c..0000000000
--- a/camel/camel-mime-filter-index.h
+++ /dev/null
@@ -1,65 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_INDEX_H
-#define _CAMEL_MIME_FILTER_INDEX_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <camel/camel-mime-filter.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;
-
- struct _CamelIndex *index;
- struct _CamelIndexName *name;
-};
-
-struct _CamelMimeFilterIndexClass {
- CamelMimeFilterClass parent_class;
-};
-
-CamelType camel_mime_filter_index_get_type (void);
-CamelMimeFilterIndex *camel_mime_filter_index_new (void);
-
-CamelMimeFilterIndex *camel_mime_filter_index_new_index(struct _CamelIndex *);
-
-/* Set the match name for any indexed words */
-void camel_mime_filter_index_set_name (CamelMimeFilterIndex *, struct _CamelIndexName *name);
-void camel_mime_filter_index_set_index (CamelMimeFilterIndex *mf, struct _CamelIndex *index);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#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 c9a741dacf..0000000000
--- a/camel/camel-mime-filter-linewrap.c
+++ /dev/null
@@ -1,147 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 "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 1d6f444da4..0000000000
--- a/camel/camel-mime-filter-linewrap.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: Jeffrey Stedfast <fejj@ximian.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_LINEWRAP_H
-#define _CAMEL_MIME_FILTER_LINEWRAP_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#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);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#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 3c6bf4b8a3..0000000000
--- a/camel/camel-mime-filter-save.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2002 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 HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "camel-mime-filter-save.h"
-#include "camel-stream-mem.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_save_class_init (CamelMimeFilterSaveClass *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_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,
- 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)
-{
- CamelMimeFilterSave *save = (CamelMimeFilterSave *) f;
-
- if (save->stream)
- camel_stream_write (save->stream, in, len);
-
- *out = in;
- *outlen = len;
- *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)
-{
- /* no-op */
-}
-
-CamelMimeFilter *
-camel_mime_filter_save_new (void)
-{
- CamelMimeFilterSave *save = CAMEL_MIME_FILTER_SAVE (camel_object_new (CAMEL_MIME_FILTER_SAVE_TYPE));
-
- save->stream = camel_stream_mem_new ();
-
- return (CamelMimeFilter *) save;
-}
-
-CamelMimeFilter *
-camel_mime_filter_save_new_with_stream (CamelStream *stream)
-{
- CamelMimeFilterSave *save = CAMEL_MIME_FILTER_SAVE (camel_object_new (CAMEL_MIME_FILTER_SAVE_TYPE));
-
- save->stream = stream;
- camel_object_ref (stream);
-
- return (CamelMimeFilter *) save;
-}
diff --git a/camel/camel-mime-filter-save.h b/camel/camel-mime-filter-save.h
deleted file mode 100644
index 20ebbea6f4..0000000000
--- a/camel/camel-mime-filter-save.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 2002 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_MIME_FILTER_SAVE_H__
-#define __CAMEL_MIME_FILTER_SAVE_H__
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <camel/camel-mime-filter.h>
-#include <camel/camel-seekable-stream.h>
-
-#define CAMEL_MIME_FILTER_SAVE_TYPE (camel_mime_filter_save_get_type ())
-#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;
-
- CamelStream *stream;
-};
-
-struct _CamelMimeFilterSaveClass {
- CamelMimeFilterClass parent_class;
-};
-
-CamelType camel_mime_filter_save_get_type (void);
-
-CamelMimeFilter *camel_mime_filter_save_new (void);
-CamelMimeFilter *camel_mime_filter_save_new_with_stream (CamelStream *stream);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __CAMEL_MIME_FILTER_SAVE_H__ */
diff --git a/camel/camel-mime-filter-tohtml.c b/camel/camel-mime-filter-tohtml.c
deleted file mode 100644
index 678d8005f4..0000000000
--- a/camel/camel-mime-filter-tohtml.c
+++ /dev/null
@@ -1,447 +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-url-scanner.h"
-#include "camel-mime-filter-tohtml.h"
-#include "camel-utf8.h"
-
-/**
- * TODO: convert common text/plain 'markup' to html. eg.:
- *
- * _word_ -> <u>_word_</u>
- * *word* -> <b>*word*</b>
- * /word/ -> <i>/word/</i>
- **/
-
-#define d(x)
-
-#define CONVERT_WEB_URLS CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS
-#define CONVERT_ADDRSPEC CAMEL_MIME_FILTER_TOHTML_CONVERT_ADDRESSES
-
-static struct {
- unsigned int mask;
- urlpattern_t pattern;
-} patterns[] = {
- { CONVERT_WEB_URLS, { "file://", "", camel_url_file_start, camel_url_file_end } },
- { CONVERT_WEB_URLS, { "ftp://", "", camel_url_web_start, camel_url_web_end } },
- { CONVERT_WEB_URLS, { "http://", "", camel_url_web_start, camel_url_web_end } },
- { CONVERT_WEB_URLS, { "https://", "", camel_url_web_start, camel_url_web_end } },
- { CONVERT_WEB_URLS, { "news://", "", camel_url_web_start, camel_url_web_end } },
- { CONVERT_WEB_URLS, { "nntp://", "", camel_url_web_start, camel_url_web_end } },
- { CONVERT_WEB_URLS, { "telnet://", "", camel_url_web_start, camel_url_web_end } },
- { CONVERT_WEB_URLS, { "www.", "http://", camel_url_web_start, camel_url_web_end } },
- { CONVERT_WEB_URLS, { "ftp.", "ftp://", camel_url_web_start, camel_url_web_end } },
- { CONVERT_ADDRSPEC, { "@", "mailto:", camel_url_addrspec_start, camel_url_addrspec_end } },
-};
-
-#define NUM_URL_PATTERNS (sizeof (patterns) / sizeof (patterns[0]))
-
-static void camel_mime_filter_tohtml_class_init (CamelMimeFilterToHTMLClass *klass);
-static void camel_mime_filter_tohtml_init (CamelMimeFilterToHTML *filter);
-static void camel_mime_filter_tohtml_finalize (CamelObject *obj);
-
-static CamelMimeFilterClass *camel_mime_filter_tohtml_parent;
-
-
-CamelType
-camel_mime_filter_tohtml_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_mime_filter_get_type (),
- "CamelMimeFilterToHTML",
- sizeof (CamelMimeFilterToHTML),
- sizeof (CamelMimeFilterToHTMLClass),
- (CamelObjectClassInitFunc) camel_mime_filter_tohtml_class_init,
- NULL,
- (CamelObjectInitFunc) camel_mime_filter_tohtml_init,
- (CamelObjectFinalizeFunc) camel_mime_filter_tohtml_finalize);
- }
-
- return type;
-}
-
-static void
-camel_mime_filter_tohtml_finalize (CamelObject *obj)
-{
- CamelMimeFilterToHTML *filter = (CamelMimeFilterToHTML *) obj;
-
- camel_url_scanner_free (filter->scanner);
-}
-
-static void
-camel_mime_filter_tohtml_init (CamelMimeFilterToHTML *filter)
-{
- filter->scanner = camel_url_scanner_new ();
-
- filter->flags = 0;
- filter->colour = 0;
- filter->column = 0;
- filter->pre_open = FALSE;
-}
-
-
-static char *
-check_size (CamelMimeFilter *filter, char *outptr, char **outend, size_t len)
-{
- size_t offset;
-
- if (*outend - outptr >= len)
- return outptr;
-
- offset = outptr - filter->outbuf;
-
- camel_mime_filter_set_size (filter, filter->outsize + len, TRUE);
-
- *outend = filter->outbuf + filter->outsize;
-
- return filter->outbuf + offset;
-}
-
-static int
-citation_depth (const char *in)
-{
- register const char *inptr = in;
- int depth = 1;
-
- if (*inptr++ != '>')
- return 0;
-
- /* check that it isn't an escaped From line */
- if (!strncmp (inptr, "From", 4))
- return 0;
-
- while (*inptr != '\n') {
- if (*inptr == ' ')
- inptr++;
-
- if (*inptr++ != '>')
- break;
-
- depth++;
- }
-
- return depth;
-}
-
-static char *
-writeln (CamelMimeFilter *filter, const char *in, const char *inend, char *outptr, char **outend)
-{
- CamelMimeFilterToHTML *html = (CamelMimeFilterToHTML *) filter;
- const char *inptr = in;
-
- while (inptr < inend) {
- guint32 u;
-
- outptr = check_size (filter, outptr, outend, 16);
-
- u = camel_utf8_getc_limit ((const unsigned char **) &inptr, inend);
- switch (u) {
- case 0xffff:
- g_warning("Truncated utf8 buffer");
- return outptr;
- case '<':
- outptr = g_stpcpy (outptr, "&lt;");
- html->column++;
- break;
- case '>':
- outptr = g_stpcpy (outptr, "&gt;");
- html->column++;
- break;
- case '&':
- outptr = g_stpcpy (outptr, "&amp;");
- html->column++;
- break;
- case '"':
- outptr = g_stpcpy (outptr, "&quot;");
- html->column++;
- break;
- case '\t':
- if (html->flags & (CAMEL_MIME_FILTER_TOHTML_CONVERT_SPACES)) {
- do {
- outptr = check_size (filter, outptr, outend, 7);
- outptr = g_stpcpy (outptr, "&nbsp;");
- html->column++;
- } while (html->column % 8);
- break;
- }
- /* otherwise, FALL THROUGH */
- case ' ':
- if (html->flags & CAMEL_MIME_FILTER_TOHTML_CONVERT_SPACES
- && ((inptr == (in + 1) || *inptr == ' ' || *inptr == '\t'))) {
- outptr = g_stpcpy (outptr, "&nbsp;");
- html->column++;
- break;
- }
- /* otherwise, FALL THROUGH */
- default:
- if (u >= 20 && u <0x80)
- *outptr++ = u;
- else {
- if (html->flags & CAMEL_MIME_FILTER_TOHTML_ESCAPE_8BIT)
- *outptr++ = '?';
- else
- outptr += sprintf(outptr, "&#%u;", u);
- }
- html->column++;
- break;
- }
- }
-
- return outptr;
-}
-
-static void
-html_convert (CamelMimeFilter *filter, char *in, size_t inlen, size_t prespace,
- char **out, size_t *outlen, size_t *outprespace, gboolean flush)
-{
- CamelMimeFilterToHTML *html = (CamelMimeFilterToHTML *) filter;
- register char *inptr, *outptr;
- char *start, *outend;
- const char *inend;
- int depth;
-
- if (inlen == 0) {
- *out = in;
- *outlen = 0;
- *outprespace = 0;
-
- return;
- }
-
- camel_mime_filter_set_size (filter, inlen * 2 + 6, FALSE);
-
- inptr = in;
- inend = in + inlen;
- outptr = filter->outbuf;
- outend = filter->outbuf + filter->outsize;
-
- if (html->flags & CAMEL_MIME_FILTER_TOHTML_PRE && !html->pre_open) {
- outptr = g_stpcpy (outptr, "<pre>");
- html->pre_open = TRUE;
- }
-
- start = inptr;
- do {
- while (inptr < inend && *inptr != '\n')
- inptr++;
-
- if (inptr >= inend && !flush)
- break;
-
- html->column = 0;
- depth = 0;
-
- if (html->flags & CAMEL_MIME_FILTER_TOHTML_MARK_CITATION) {
- if ((depth = citation_depth (start)) > 0) {
- /* FIXME: we could easily support multiple colour depths here */
-
- outptr = check_size (filter, outptr, &outend, 25);
- outptr += sprintf(outptr, "<font color=\"#%06x\">", (html->colour & 0xffffff));
- } else if (*start == '>') {
- /* >From line */
- start++;
- }
- } else if (html->flags & CAMEL_MIME_FILTER_TOHTML_CITE) {
- outptr = check_size (filter, outptr, &outend, 6);
- outptr = g_stpcpy (outptr, "&gt; ");
- html->column += 2;
- }
-
-#define CONVERT_URLS (CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS | CAMEL_MIME_FILTER_TOHTML_CONVERT_ADDRESSES)
- if (html->flags & CONVERT_URLS) {
- size_t matchlen, buflen, len;
- urlmatch_t match;
-
- len = inptr - start;
-
- do {
- if (camel_url_scanner_scan (html->scanner, start, len, &match)) {
- /* write out anything before the first regex match */
- outptr = writeln (filter, start, start + match.um_so,
- outptr, &outend);
-
- start += match.um_so;
- len -= match.um_so;
-
- matchlen = match.um_eo - match.um_so;
-
- buflen = 20 + strlen (match.prefix) + matchlen + matchlen;
- outptr = check_size (filter, outptr, &outend, buflen);
-
- /* write out the href tag */
- outptr = g_stpcpy (outptr, "<a href=\"");
- outptr = g_stpcpy (outptr, match.prefix);
- memcpy (outptr, start, matchlen);
- outptr += matchlen;
- outptr = g_stpcpy (outptr, "\">");
-
- /* now write the matched string */
- memcpy (outptr, start, matchlen);
- html->column += matchlen;
- outptr += matchlen;
- start += matchlen;
- len -= matchlen;
-
- /* close the href tag */
- outptr = g_stpcpy (outptr, "</a>");
- } else {
- /* nothing matched so write out the remainder of this line buffer */
- outptr = writeln (filter, start, start + len, outptr, &outend);
- break;
- }
- } while (len > 0);
- } else {
- outptr = writeln (filter, start, inptr, outptr, &outend);
- }
-
- if ((html->flags & CAMEL_MIME_FILTER_TOHTML_MARK_CITATION) && depth > 0) {
- outptr = check_size (filter, outptr, &outend, 8);
- outptr = g_stpcpy (outptr, "</font>");
- }
-
- if (inptr < inend) {
- if (html->flags & CAMEL_MIME_FILTER_TOHTML_CONVERT_NL) {
- outptr = check_size (filter, outptr, &outend, 5);
- outptr = g_stpcpy (outptr, "<br>");
- }
-
- *outptr++ = '\n';
- }
-
- start = ++inptr;
- } while (inptr < inend);
-
- if (flush) {
- /* flush the rest of our input buffer */
- if (start < inend)
- outptr = writeln (filter, start, inend, outptr, &outend);
-
- if (html->pre_open) {
- /* close the pre-tag */
- outptr = check_size (filter, outptr, &outend, 10);
- outptr = g_stpcpy (outptr, "</pre>");
- }
- } else if (start < inend) {
- /* backup */
- camel_mime_filter_backup (filter, start, (unsigned) (inend - start));
- }
-
- *out = filter->outbuf;
- *outlen = outptr - filter->outbuf;
- *outprespace = filter->outpre;
-}
-
-static void
-filter_filter (CamelMimeFilter *filter, char *in, size_t len, size_t prespace,
- char **out, size_t *outlen, size_t *outprespace)
-{
- html_convert (filter, in, len, prespace, out, outlen, outprespace, FALSE);
-}
-
-static void
-filter_complete (CamelMimeFilter *filter, char *in, size_t len, size_t prespace,
- char **out, size_t *outlen, size_t *outprespace)
-{
- html_convert (filter, in, len, prespace, out, outlen, outprespace, TRUE);
-}
-
-static void
-filter_reset (CamelMimeFilter *filter)
-{
- CamelMimeFilterToHTML *html = (CamelMimeFilterToHTML *) filter;
-
- html->column = 0;
- html->pre_open = FALSE;
-}
-
-static void
-camel_mime_filter_tohtml_class_init (CamelMimeFilterToHTMLClass *klass)
-{
- CamelMimeFilterClass *filter_class = (CamelMimeFilterClass *) klass;
-
- camel_mime_filter_tohtml_parent = CAMEL_MIME_FILTER_CLASS (camel_type_get_global_classfuncs (camel_mime_filter_get_type ()));
-
- filter_class->reset = filter_reset;
- filter_class->filter = filter_filter;
- filter_class->complete = filter_complete;
-}
-
-
-/**
- * camel_mime_filter_tohtml_new:
- * @flags:
- * @colour:
- *
- * Creates a new CamelMimeFilterToHTML object.
- *
- * Returns a new CamelMimeFilter object.
- **/
-CamelMimeFilter *
-camel_mime_filter_tohtml_new (guint32 flags, guint32 colour)
-{
- CamelMimeFilterToHTML *new;
- int i;
-
- new = CAMEL_MIME_FILTER_TOHTML (camel_object_new (camel_mime_filter_tohtml_get_type ()));
-
- new->flags = flags;
- new->colour = colour;
-
- for (i = 0; i < NUM_URL_PATTERNS; i++) {
- if (patterns[i].mask & flags)
- camel_url_scanner_add (new->scanner, &patterns[i].pattern);
- }
-
- return CAMEL_MIME_FILTER (new);
-}
-
-
-char *
-camel_text_to_html (const char *in, guint32 flags, guint32 colour)
-{
- CamelMimeFilter *filter;
- size_t outlen, outpre;
- char *outbuf;
-
- g_return_val_if_fail (in != NULL, NULL);
-
- filter = camel_mime_filter_tohtml_new (flags, colour);
-
- camel_mime_filter_complete (filter, (char *) in, strlen (in), 0,
- &outbuf, &outlen, &outpre);
-
- outbuf = g_strndup (outbuf, outlen);
-
- camel_object_unref (filter);
-
- return outbuf;
-}
diff --git a/camel/camel-mime-filter-tohtml.h b/camel/camel-mime-filter-tohtml.h
deleted file mode 100644
index de8690a1e0..0000000000
--- a/camel/camel-mime-filter-tohtml.h
+++ /dev/null
@@ -1,82 +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_MIME_FILTER_TOHTML_H__
-#define __CAMEL_MIME_FILTER_TOHTML_H__
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <camel/camel-mime-filter.h>
-
-#define CAMEL_MIME_FILTER_TOHTML(obj) CAMEL_CHECK_CAST (obj, camel_mime_filter_tohtml_get_type (), CamelMimeFilterToHTML)
-#define CAMEL_MIME_FILTER_TOHTML_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_mime_filter_tohtml_get_type (), CamelMimeFilterToHTMLClass)
-#define CAMEL_IS_MIME_FILTER_TOHTML(obj) CAMEL_CHECK_TYPE (obj, camel_mime_filter_tohtml_get_type ())
-
-#define CAMEL_MIME_FILTER_TOHTML_PRE (1 << 0)
-#define CAMEL_MIME_FILTER_TOHTML_CONVERT_NL (1 << 1)
-#define CAMEL_MIME_FILTER_TOHTML_CONVERT_SPACES (1 << 2)
-#define CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS (1 << 3)
-#define CAMEL_MIME_FILTER_TOHTML_MARK_CITATION (1 << 4)
-#define CAMEL_MIME_FILTER_TOHTML_CONVERT_ADDRESSES (1 << 5)
-#define CAMEL_MIME_FILTER_TOHTML_ESCAPE_8BIT (1 << 6)
-#define CAMEL_MIME_FILTER_TOHTML_CITE (1 << 7)
-#define CAMEL_MIME_FILTER_TOHTML_PRESERVE_8BIT (1 << 8)
-#define CAMEL_MIME_FILTER_TOHTML_FORMAT_FLOWED (1 << 9)
-
-typedef struct _CamelMimeFilterToHTMLClass CamelMimeFilterToHTMLClass;
-typedef struct _CamelMimeFilterToHTML CamelMimeFilterToHTML;
-
-struct _CamelMimeFilterToHTML {
- CamelMimeFilter parent;
-
- struct _CamelUrlScanner *scanner;
-
- guint32 flags;
- guint32 colour;
-
- guint32 column : 31;
- guint32 pre_open : 1;
-};
-
-struct _CamelMimeFilterToHTMLClass {
- CamelMimeFilterClass parent_class;
-};
-
-
-CamelType camel_mime_filter_tohtml_get_type (void);
-
-CamelMimeFilter *camel_mime_filter_tohtml_new (guint32 flags, guint32 colour);
-
-
-/* utility functions to replace e_text_to_html shit */
-
-char *camel_text_to_html (const char *in, guint32 flags, guint32 colour);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __CAMEL_MIME_FILTER_TOHTML_H__ */
diff --git a/camel/camel-mime-filter-windows.c b/camel/camel-mime-filter-windows.c
deleted file mode 100644
index 0b6e00dea0..0000000000
--- a/camel/camel-mime-filter-windows.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 2002 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 "camel-mime-filter-windows.h"
-
-#include "camel-charset-map.h"
-
-#define d(x)
-
-static void camel_mime_filter_windows_class_init (CamelMimeFilterWindowsClass *klass);
-static void camel_mime_filter_windows_init (CamelObject *o);
-static void camel_mime_filter_windows_finalize (CamelObject *o);
-
-
-static CamelMimeFilterClass *parent_class = NULL;
-
-
-CamelType
-camel_mime_filter_windows_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_mime_filter_get_type (),
- "CamelMimeFilterWindows",
- sizeof (CamelMimeFilterWindows),
- sizeof (CamelMimeFilterWindowsClass),
- (CamelObjectClassInitFunc) camel_mime_filter_windows_class_init,
- NULL,
- (CamelObjectInitFunc) camel_mime_filter_windows_init,
- (CamelObjectFinalizeFunc) camel_mime_filter_windows_finalize);
- }
-
- return type;
-}
-
-static void
-camel_mime_filter_windows_finalize (CamelObject *o)
-{
- CamelMimeFilterWindows *windows = (CamelMimeFilterWindows *) o;
-
- g_free (windows->claimed_charset);
-}
-
-static void
-camel_mime_filter_windows_init (CamelObject *o)
-{
- CamelMimeFilterWindows *windows = (CamelMimeFilterWindows *) o;
-
- windows->is_windows = FALSE;
- windows->claimed_charset = NULL;
-}
-
-static void
-filter_filter (CamelMimeFilter *filter, char *in, size_t len, size_t prespace,
- char **out, size_t *outlen, size_t *outprespace)
-{
- CamelMimeFilterWindows *windows = (CamelMimeFilterWindows *) filter;
- register unsigned char *inptr;
- unsigned char *inend;
-
- if (!windows->is_windows) {
- inptr = (unsigned char *) in;
- inend = inptr + len;
-
- while (inptr < inend) {
- register unsigned char c = *inptr++;
-
- if (c >= 128 && c <= 159) {
- g_warning ("Encountered Windows charset parading as %s",
- windows->claimed_charset);
- windows->is_windows = TRUE;
- break;
- }
- }
- }
-
- *out = in;
- *outlen = len;
- *outprespace = prespace;
-}
-
-static void
-filter_complete (CamelMimeFilter *filter, char *in, size_t len, size_t prespace,
- char **out, size_t *outlen, size_t *outprespace)
-{
- filter_filter (filter, in, len, prespace, out, outlen, outprespace);
-}
-
-static void
-filter_reset (CamelMimeFilter *filter)
-{
- CamelMimeFilterWindows *windows = (CamelMimeFilterWindows *) filter;
-
- windows->is_windows = FALSE;
-}
-
-static void
-camel_mime_filter_windows_class_init (CamelMimeFilterWindowsClass *klass)
-{
- CamelMimeFilterClass *filter_class = (CamelMimeFilterClass *) klass;
-
- parent_class = CAMEL_MIME_FILTER_CLASS (camel_type_get_global_classfuncs (camel_mime_filter_get_type ()));
-
- filter_class->reset = filter_reset;
- filter_class->filter = filter_filter;
- filter_class->complete = filter_complete;
-}
-
-
-/**
- * camel_mime_filter_windows_new:
- * @claimed_charset:
- *
- * Creates a new CamelMimeFilterWindows object.
- *
- * Returns a new CamelMimeFilter object.
- **/
-CamelMimeFilter *
-camel_mime_filter_windows_new (const char *claimed_charset)
-{
- CamelMimeFilterWindows *new;
-
- g_return_val_if_fail (claimed_charset != NULL, NULL);
-
- new = CAMEL_MIME_FILTER_WINDOWS (camel_object_new (camel_mime_filter_windows_get_type ()));
-
- new->claimed_charset = g_strdup (claimed_charset);
-
- return CAMEL_MIME_FILTER (new);
-}
-
-
-gboolean
-camel_mime_filter_windows_is_windows_charset (CamelMimeFilterWindows *filter)
-{
- g_return_val_if_fail (CAMEL_IS_MIME_FILTER_WINDOWS (filter), FALSE);
-
- return filter->is_windows;
-}
-
-
-const char *
-camel_mime_filter_windows_real_charset (CamelMimeFilterWindows *filter)
-{
- g_return_val_if_fail (CAMEL_IS_MIME_FILTER_WINDOWS (filter), NULL);
-
- if (filter->is_windows)
- return camel_charset_iso_to_windows (filter->claimed_charset);
- else
- return filter->claimed_charset;
-}
diff --git a/camel/camel-mime-filter-windows.h b/camel/camel-mime-filter-windows.h
deleted file mode 100644
index d2dac4fe92..0000000000
--- a/camel/camel-mime-filter-windows.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 2002 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_MIME_FILTER_WINDOWS_H__
-#define __CAMEL_MIME_FILTER_WINDOWS_H__
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <camel/camel-mime-filter.h>
-
-#define CAMEL_MIME_FILTER_WINDOWS(obj) CAMEL_CHECK_CAST (obj, camel_mime_filter_windows_get_type (), CamelMimeFilterWindows)
-#define CAMEL_MIME_FILTER_WINDOWS_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_mime_filter_windows_get_type (), CamelMimeFilterWindowsClass)
-#define CAMEL_IS_MIME_FILTER_WINDOWS(obj) CAMEL_CHECK_TYPE (obj, camel_mime_filter_windows_get_type ())
-
-typedef struct _CamelMimeFilterWindowsClass CamelMimeFilterWindowsClass;
-typedef struct _CamelMimeFilterWindows CamelMimeFilterWindows;
-
-struct _CamelMimeFilterWindows {
- CamelMimeFilter parent;
-
- gboolean is_windows;
- char *claimed_charset;
-};
-
-struct _CamelMimeFilterWindowsClass {
- CamelMimeFilterClass parent_class;
-
-};
-
-
-CamelType camel_mime_filter_windows_get_type (void);
-
-CamelMimeFilter *camel_mime_filter_windows_new (const char *claimed_charset);
-
-gboolean camel_mime_filter_windows_is_windows_charset (CamelMimeFilterWindows *filter);
-const char *camel_mime_filter_windows_real_charset (CamelMimeFilterWindows *filter);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __CAMEL_MIME_FILTER_WINDOWS_H__ */
diff --git a/camel/camel-mime-filter.c b/camel/camel-mime-filter.c
deleted file mode 100644
index 6e94b3cde4..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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.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 3cd65fe8d1..0000000000
--- a/camel/camel-mime-filter.h
+++ /dev/null
@@ -1,94 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/* Abstract class for non-copying filters */
-
-#ifndef _CAMEL_MIME_FILTER_H
-#define _CAMEL_MIME_FILTER_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#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;
- size_t outsize;
- size_t outpre; /* prespace of this buffer */
-
- char *backbuf;
- size_t backsize;
- size_t 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);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* ! _CAMEL_MIME_FILTER_H */
diff --git a/camel/camel-mime-message.c b/camel/camel-mime-message.c
deleted file mode 100644
index 7f4ac93f4b..0000000000
--- a/camel/camel-mime-message.c
+++ /dev/null
@@ -1,963 +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-2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <errno.h>
-
-#include <gal/util/e-iconv.h>
-
-#include <e-util/e-time-utils.h>
-
-#include "camel-mime-message.h"
-#include "camel-multipart.h"
-#include "camel-stream-mem.h"
-#include "camel-string-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_RESENT_TO,
- HEADER_CC,
- HEADER_RESENT_CC,
- HEADER_BCC,
- HEADER_RESENT_BCC,
- HEADER_DATE,
- HEADER_MESSAGE_ID
-} CamelHeaderType;
-
-static char *header_names[] = {
- /* dont include HEADER_UNKNOWN string */
- "From", "Reply-To", "Subject", "To", "Resent-To", "Cc", "Resent-Cc",
- "Bcc", "Resent-Bcc", "Date", "Message-Id", NULL
-};
-
-static GHashTable *header_name_table;
-
-static CamelMimePartClass *parent_class = NULL;
-
-static char *recipient_names[] = {
- "To", "Cc", "Bcc", "Resent-To", "Resent-Cc", "Resent-Bcc", NULL
-};
-
-static ssize_t write_to_stream (CamelDataWrapper *data_wrapper, CamelStream *stream);
-static void add_header (CamelMedium *medium, const char *name, const void *value);
-static void set_header (CamelMedium *medium, const char *name, const void *value);
-static void remove_header (CamelMedium *medium, const char *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 (camel_strcase_hash, camel_strcase_equal);
- for (i = 0;header_names[i]; i++)
- g_hash_table_insert (header_name_table, header_names[i], GINT_TO_POINTER(i+1));
-
- /* virtual method overload */
- camel_data_wrapper_class->write_to_stream = write_to_stream;
- camel_data_wrapper_class->decode_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;
-
- mime_message->recipients = g_hash_table_new (camel_strcase_hash, camel_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 (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);
- e_localtime_with_offset(date, &local, &tz);
- offset = (((tz/60/60) * 100) + (tz/60 % 60));
- }
- message->date = date;
- message->date_offset = offset;
-
- datestr = camel_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 = camel_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 = camel_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 = camel_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;
- size_t len;
- int state;
- int ret;
- int err;
-
- 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 CAMEL_MIME_PARSER_STATE_EOF: case CAMEL_MIME_PARSER_STATE_FROM_END: /* these doesn't belong to us */
- camel_mime_parser_unstep (mp);
- case CAMEL_MIME_PARSER_STATE_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"));
- err = camel_mime_parser_errno(mp);
- if (err != 0) {
- errno = err;
- ret = -1;
- }
-
- return ret;
-}
-
-static ssize_t
-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 *name, const char *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, name);
- switch (header_type) {
- case HEADER_FROM:
- if (message->from)
- camel_object_unref (message->from);
- message->from = camel_internet_address_new ();
- camel_address_decode (CAMEL_ADDRESS (message->from), value);
- break;
- case HEADER_REPLY_TO:
- if (message->reply_to)
- camel_object_unref (message->reply_to);
- message->reply_to = camel_internet_address_new ();
- camel_address_decode (CAMEL_ADDRESS (message->reply_to), value);
- break;
- case HEADER_SUBJECT:
- g_free (message->subject);
- if (((CamelDataWrapper *) message)->mime_type) {
- charset = camel_content_type_param (((CamelDataWrapper *) message)->mime_type, "charset");
- charset = e_iconv_charset_name (charset);
- } else
- charset = NULL;
- message->subject = g_strstrip (camel_header_decode_string (value, charset));
- break;
- case HEADER_TO:
- case HEADER_CC:
- case HEADER_BCC:
- case HEADER_RESENT_TO:
- case HEADER_RESENT_CC:
- case HEADER_RESENT_BCC:
- addr = g_hash_table_lookup (message->recipients, name);
- if (value)
- camel_address_decode (CAMEL_ADDRESS (addr), value);
- else
- camel_address_remove (CAMEL_ADDRESS (addr), -1);
- break;
- case HEADER_DATE:
- if (value) {
- message->date = camel_header_decode_date (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 (value)
- message->message_id = camel_header_msgid_decode (value);
- else
- message->message_id = NULL;
- break;
- default:
- return FALSE;
- }
-
- return TRUE;
-}
-
-static void
-set_header (CamelMedium *medium, const char *name, const void *value)
-{
- process_header (medium, name, value);
- parent_class->parent_class.set_header (medium, name, value);
-}
-
-static void
-add_header (CamelMedium *medium, const char *name, const void *value)
-{
- /* if we process it, then it must be forced unique as well ... */
- if (process_header (medium, name, value))
- parent_class->parent_class.set_header (medium, name, value);
- else
- parent_class->parent_class.add_header (medium, name, value);
-}
-
-static void
-remove_header (CamelMedium *medium, const char *name)
-{
- process_header (medium, name, NULL);
- parent_class->parent_class.remove_header (medium, 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)
-{
- CamelTransferEncoding encoding;
- int *has8bit = data;
-
- /* check this part, and stop as soon as we are done */
- encoding = camel_mime_part_get_encoding (part);
-
- *has8bit = encoding == CAMEL_TRANSFER_ENCODING_8BIT || encoding == CAMEL_TRANSFER_ENCODING_BINARY;
-
- 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 CamelTransferEncoding
-find_best_encoding (CamelMimePart *part, CamelBestencRequired required, CamelBestencEncoding enctype, char **charsetp)
-{
- CamelMimeFilterCharset *charenc = NULL;
- CamelTransferEncoding encoding;
- CamelMimeFilterBestenc *bestenc;
- unsigned int flags, callerflags;
- CamelDataWrapper *content;
- CamelStreamFilter *filter;
- const char *charsetin = NULL;
- char *charset = NULL;
- CamelStream *null;
- int idb, idc = -1;
- gboolean istext;
-
- /* 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_TRANSFER_ENCODING_DEFAULT;
- }
-
- istext = camel_content_type_is (((CamelDataWrapper *) part)->mime_type, "text", "*");
- if (istext) {
- flags = CAMEL_BESTENC_GET_CHARSET | CAMEL_BESTENC_GET_ENCODING;
- enctype |= CAMEL_BESTENC_TEXT;
- } 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 looking for the best charset, then we need to convert to UTF-8 */
- if (istext && (required & CAMEL_BESTENC_GET_CHARSET) != 0
- && (charsetin = camel_content_type_param (content->mime_type, "charset"))) {
- charenc = camel_mime_filter_charset_new_convert (charsetin, "UTF-8");
- 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_decode_to_stream (content, (CamelStream *)filter);
- camel_stream_filter_remove (filter, idb);
- if (idc != -1) {
- camel_stream_filter_remove (filter, idc);
- camel_object_unref (charenc);
- charenc = NULL;
- }
-
- if (istext && (required & CAMEL_BESTENC_GET_CHARSET) != 0) {
- charsetin = camel_mime_filter_bestenc_get_best_charset (bestenc);
- d(printf("best charset = %s\n", charsetin ? charsetin : "(null)"));
- charset = g_strdup (charsetin);
-
- charsetin = camel_content_type_param (content->mime_type, "charset");
- } else {
- charset = NULL;
- }
-
- /* if we have US-ASCII, or we're not doing text, we dont need to bother with the rest */
- if (istext && charsetin && charset && (required & CAMEL_BESTENC_GET_CHARSET) != 0) {
- d(printf("have charset, trying conversion/etc\n"));
-
- /* now that 'bestenc' 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 (charsetin, charset);
- 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 (charenc);
- }
- }
-
- encoding = camel_mime_filter_bestenc_get_best_encoding (bestenc, enctype);
-
- camel_object_unref (filter);
- camel_object_unref (bestenc);
- camel_object_unref (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;
- CamelTransferEncoding encoding;
- CamelDataWrapper *wrapper;
- char *charset;
-
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (part));
- if (!wrapper)
- return FALSE;
-
- /* we only care about actual content objects */
- if (!CAMEL_IS_MULTIPART (wrapper) && !CAMEL_IS_MIME_MESSAGE (wrapper)) {
- 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 (camel_content_type_is (((CamelDataWrapper *) part)->mime_type, "text", "*")) {
- char *newct;
-
- /* FIXME: ick, the part content_type interface needs fixing bigtime */
- camel_content_type_set_param (((CamelDataWrapper *) part)->mime_type, "charset",
- charset ? charset : "us-ascii");
- newct = camel_content_type_format (((CamelDataWrapper *) part)->mime_type);
- if (newct) {
- d(printf("Setting content-type to %s\n", newct));
-
- camel_mime_part_set_content_type (part, newct);
- g_free (newct);
- }
- }
- }
-
- g_free (charset);
- }
-
- 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 (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;
-}
-
-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"
-};
-
-char *
-camel_mime_message_build_mbox_from (CamelMimeMessage *message)
-{
- struct _camel_header_raw *header = ((CamelMimePart *)message)->headers;
- GString *out = g_string_new("From ");
- char *ret;
- const char *tmp;
- time_t thetime;
- int offset;
- struct tm tm;
-
- tmp = camel_header_raw_find (&header, "Sender", NULL);
- if (tmp == NULL)
- tmp = camel_header_raw_find (&header, "From", NULL);
- if (tmp != NULL) {
- struct _camel_header_address *addr = camel_header_address_decode (tmp, NULL);
-
- tmp = NULL;
- if (addr) {
- if (addr->type == HEADER_ADDRESS_NAME) {
- g_string_append (out, addr->v.addr);
- tmp = "";
- }
- camel_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 = camel_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 = camel_header_raw_find (&header, "Date", NULL);
-
- thetime = camel_header_decode_date (tmp, &offset);
- thetime += ((offset / 100) * (60 * 60)) + (offset % 100) * 60;
- gmtime_r (&thetime, &tm);
- g_string_append_printf (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;
-}
diff --git a/camel/camel-mime-message.h b/camel/camel-mime-message.h
deleted file mode 100644
index c1149d5ef5..0000000000
--- a/camel/camel-mime-message.h
+++ /dev/null
@@ -1,140 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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_RECIPIENT_TYPE_RESENT_TO "Resent-To"
-#define CAMEL_RECIPIENT_TYPE_RESENT_CC "Resent-Cc"
-#define CAMEL_RECIPIENT_TYPE_RESENT_BCC "Resent-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_message_get_part_by_content_id (CamelMimeMessage *message, const char *content_id);
-
-char *camel_mime_message_build_mbox_from (CamelMimeMessage *mime_message);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_MIME_MESSAGE_H */
diff --git a/camel/camel-mime-parser.c b/camel/camel-mime-parser.c
deleted file mode 100644
index d3954c069c..0000000000
--- a/camel/camel-mime-parser.c
+++ /dev/null
@@ -1,1982 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2003 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, 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 PRESERVE_HEADERS*/
-
-/*#define PURIFY*/
-
-#define MEMPOOL
-
-#define STRUCT_ALIGN 4
-
-#ifdef PURIFY
-int inend_id = -1,
- inbuffer_id = -1;
-#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)
-
-#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
-
-struct _header_scan_state {
-
- /* global state */
-
- enum _camel_mime_parser_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 */
-
- int ioerrno; /* io error state */
-
- /* 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;
-
- off_t 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? */
- unsigned int eof:1; /* reached eof? */
-
- off_t start_of_from; /* where from started */
- off_t start_of_headers; /* where headers started from the last scan */
-
- off_t 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 _camel_mime_parser_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 _camel_header_raw *headers; /* headers for this part */
-
- CamelContentType *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, size_t *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, size_t *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[] = {
- "CAMEL_MIME_PARSER_STATE_INITIAL",
- "CAMEL_MIME_PARSER_STATE_PRE_FROM", /* pre-from data */
- "CAMEL_MIME_PARSER_STATE_FROM", /* got 'From' line */
- "CAMEL_MIME_PARSER_STATE_HEADER", /* toplevel header */
- "CAMEL_MIME_PARSER_STATE_BODY", /* scanning body of message */
- "CAMEL_MIME_PARSER_STATE_MULTIPART", /* got multipart header */
- "CAMEL_MIME_PARSER_STATE_MESSAGE", /* rfc822/news message */
-
- "CAMEL_MIME_PARSER_STATE_PART", /* part of a multipart */
-
- "CAMEL_MIME_PARSER_STATE_EOF", /* end of file */
- "CAMEL_MIME_PARSER_STATE_PRE_FROM_END",
- "CAMEL_MIME_PARSER_STATE_FROM_END",
- "CAMEL_MIME_PARSER_STATE_HEAER_END",
- "CAMEL_MIME_PARSER_STATE_BODY_END",
- "CAMEL_MIME_PARSER_STATE_MULTIPART_END",
- "CAMEL_MIME_PARSER_STATE_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 CAMEL_MIME_PARSER_STATE_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 camel_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 _camel_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 CAMEL_MIME_PARSER_STATE_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
- * CAMEL_MIME_PARSER_STATE_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 CAMEL_MIME_PARSER_STATE_FROM state. The
- * from line will include the closing \n found (if there was one).
- *
- * The return value will remain valid while in the CAMEL_MIME_PARSER_STATE_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.
- *
- * 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.
- *
- * 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:
- * @parser: MIME parser object
- * @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 CAMEL_MIME_PARSER_STATE_FROM and CAMEL_MIME_PARSER_STATE_FROM_END will be returned
- * to the caller during parsing.
- *
- * This may also be preceeded by an optional
- * CAMEL_MIME_PARSER_STATE_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 *parser, gboolean scan_from)
-{
- struct _header_scan_state *s = _PRIVATE (parser);
-
- s->scan_from = scan_from;
-}
-
-/**
- * camel_mime_parser_scan_pre_from:
- * @parser: MIME parser object
- * @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 CAMEL_MIME_PARSER_STATE_PRE_FROM which returns the specified data.
- **/
-void
-camel_mime_parser_scan_pre_from (CamelMimeParser *parser, gboolean scan_pre_from)
-{
- struct _header_scan_state *s = _PRIVATE (parser);
-
- s->scan_pre_from = scan_pre_from;
-}
-
-/**
- * camel_mime_parser_content_type:
- * @parser: MIME parser object
- *
- * 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.
- **/
-CamelContentType *
-camel_mime_parser_content_type (CamelMimeParser *parser)
-{
- struct _header_scan_state *s = _PRIVATE (parser);
-
- /* 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:
- * @parser: MIME parser object
- *
- * 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 *parser)
-{
- struct _header_scan_state *s = _PRIVATE (parser);
-
- s->unstep++;
-}
-
-/**
- * camel_mime_parser_drop_step:
- * @parser: MIME parser object
- *
- * 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 *parser)
-{
- struct _header_scan_state *s = _PRIVATE (parser);
-
- s->unstep = 0;
- folder_scan_drop_step(s);
-}
-
-/**
- * camel_mime_parser_step:
- * @parser: MIME parser object
- * @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 CAMEL_MIME_PARSER_STATE_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 _camel_mime_parser_state
-camel_mime_parser_step (CamelMimeParser *parser, char **databuffer, size_t *datalength)
-{
- struct _header_scan_state *s = _PRIVATE (parser);
-
- d(printf("OLD STATE: '%s' :\n", states[s->state]));
-
- if (s->unstep <= 0) {
- char *dummy;
- size_t 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:
- * @parser: MIME parser object
- * @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 *parser, const char **databuffer, int len)
-{
- struct _header_scan_state *s = _PRIVATE (parser);
- 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:
- * @parser: MIME parser object
- *
- * 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:
- *
- * CAMEL_MIME_PARSER_STATE_INITIAL, The start of the current message.
- * CAMEL_MIME_PARSER_STATE_HEADER, CAMEL_MIME_PARSER_STATE_MESSAGE, CAMEL_MIME_PARSER_STATE_MULTIPART, the character
- * position immediately after the end of the header.
- * CAMEL_MIME_PARSER_STATE_BODY, Position within the message of the start
- * of the current data block.
- * CAMEL_MIME_PARSER_STATE_*_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 *parser)
-{
- struct _header_scan_state *s = _PRIVATE (parser);
-
- return folder_tell(s);
-}
-
-/**
- * camel_mime_parser_tell_start_headers:
- * @parser: MIME parser object
- *
- * 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 *parser)
-{
- struct _header_scan_state *s = _PRIVATE (parser);
-
- return s->start_of_headers;
-}
-
-/**
- * camel_mime_parser_tell_start_from:
- * @parser: MIME parser object
- *
- * 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 *parser)
-{
- struct _header_scan_state *s = _PRIVATE (parser);
-
- return s->start_of_from;
-}
-
-/**
- * camel_mime_parser_seek:
- * @parser: MIME parser object
- * @offset: 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 *parser, off_t offset, int whence)
-{
- struct _header_scan_state *s = _PRIVATE (parser);
-
- return folder_seek(s, offset, whence);
-}
-
-/**
- * camel_mime_parser_state:
- * @parser: MIME parser object
- *
- * Get the current parser state.
- *
- * Return value: The current parser state.
- **/
-enum _camel_mime_parser_state
-camel_mime_parser_state (CamelMimeParser *parser)
-{
- struct _header_scan_state *s = _PRIVATE (parser);
-
- return s->state;
-}
-
-/**
- * camel_mime_parser_stream:
- * @parser: MIME parser object
- *
- * 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 *parser)
-{
- struct _header_scan_state *s = _PRIVATE (parser);
-
- return s->stream;
-}
-
-/**
- * camel_mime_parser_fd:
- * @parser: MIME parser object
- *
- * 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 *parser)
-{
- struct _header_scan_state *s = _PRIVATE (parser);
-
- return s->fd;
-}
-
-/* Return errno of the parser, incase any error occured during processing */
-int
-camel_mime_parser_errno (CamelMimeParser *parser)
-{
- struct _header_scan_state *s = _PRIVATE (parser);
-
- return s->ioerrno;
-}
-
-/* ********************************************************************** */
-/* 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 || s->eof)
- 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;
- s->eof = (len == 0);
- r(printf("content = %d '%.*s'\n",s->inend - s->inptr, s->inend - s->inptr, s->inptr));
- } else {
- s->ioerrno = errno?errno:EIO;
- }
-
- 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;
-
- 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;
- s->eof = FALSE;
- } else {
- s->ioerrno = errno?errno:EIO;
- }
-#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
- camel_header_raw_clear(&h->headers);
-#endif
- camel_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;
-
- d(printf("skipping line\n"));
-
- 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') {
- d(printf("(%2x,%c)", c, isprint(c)?c:'.'));
- ;
- }
-
- 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->inend - boundary; /* 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", part->boundarylen, 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 _camel_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 _camel_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;
-#ifdef PRESERVE_HEADERS
- header_append(s, start, inptr);
-#else
- header_append(s, start, inptr-1);
-#endif
- /* 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"));
-#ifndef PRESERVE_HEADERS
- /* 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 = ' ';
-#endif
- } else {
- /* otherwise, complete header, add it */
-#ifdef PRESERVE_HEADERS
- s->outptr--;
- if (s->outptr[-1] == '\r')
- s->outptr--;
-#endif
- s->outptr[0] = 0;
-
- h(printf("header '%s' at %d\n", s->outbuf, (int)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, size_t *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", newatleast));
-
- do {
- s->atleast = newatleast;
-
- while ((len = folder_read(s))>0 && len >= s->atleast) { /* ensure we have at least enough room here */
- inptr = s->inptr;
- if (s->eof)
- inend = s->inend;
- else
- 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:
- /* treat eof as the last boundary in From mode */
- if (s->scan_from && s->eof && s->atleast <= 1) {
- onboundary = TRUE;
- part = NULL;
- } else {
- 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->ioerrno = 0;
-
- 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->eof = FALSE;
-
- s->filters = NULL;
- s->filterid = 1;
-
- s->parts = NULL;
-
- s->state = CAMEL_MIME_PARSER_STATE_INITIAL;
- return s;
-}
-
-static void
-drop_states(struct _header_scan_state *s)
-{
- while (s->parts) {
- folder_scan_drop_step(s);
- }
- s->unstep = 0;
- s->state = CAMEL_MIME_PARSER_STATE_INITIAL;
-}
-
-static void
-folder_scan_reset(struct _header_scan_state *s)
-{
- drop_states(s);
- s->inend = s->inbuf;
- s->inptr = s->inbuf;
- s->inend[0] = '\n';
- if (s->fd != -1) {
- close(s->fd);
- s->fd = -1;
- }
- if (s->stream) {
- camel_object_unref((CamelObject *)s->stream);
- s->stream = NULL;
- }
- s->ioerrno = 0;
- s->eof = FALSE;
-}
-
-static int
-folder_scan_init_with_fd(struct _header_scan_state *s, int fd)
-{
- folder_scan_reset(s);
- s->fd = fd;
-
- return 0;
-}
-
-static int
-folder_scan_init_with_stream(struct _header_scan_state *s, CamelStream *stream)
-{
- folder_scan_reset(s);
- s->stream = stream;
- camel_object_ref((CamelObject *)stream);
-
- return 0;
-}
-
-#define USE_FROM
-
-static void
-folder_scan_step(struct _header_scan_state *s, char **databuffer, size_t *datalength)
-{
- struct _header_scan_stack *h, *hb;
- const char *content;
- const char *bound;
- int type;
- int state;
- CamelContentType *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 CAMEL_MIME_PARSER_STATE_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 = CAMEL_MIME_PARSER_STATE_PRE_FROM;
- } else {
- s->start_of_from = -1;
- goto scan_header;
- }
-
- case CAMEL_MIME_PARSER_STATE_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 = CAMEL_MIME_PARSER_STATE_INITIAL;
- s->state = CAMEL_MIME_PARSER_STATE_FROM;
- } else {
- folder_pull_part(s);
- s->state = CAMEL_MIME_PARSER_STATE_EOF;
- }
- return;
-#else
- case CAMEL_MIME_PARSER_STATE_INITIAL:
- case CAMEL_MIME_PARSER_STATE_PRE_FROM:
-#endif /* !USE_FROM */
-
- scan_header:
- case CAMEL_MIME_PARSER_STATE_FROM:
- s->start_of_headers = folder_tell(s);
- h = folder_scan_header(s, &state);
-#ifdef USE_FROM
- if (s->scan_from)
- h->savestate = CAMEL_MIME_PARSER_STATE_FROM_END;
- else
-#endif
- h->savestate = CAMEL_MIME_PARSER_STATE_EOF;
-
- /* FIXME: should this check for MIME-Version: 1.0 as well? */
-
- type = CAMEL_MIME_PARSER_STATE_HEADER;
- if ( (content = camel_header_raw_find(&h->headers, "Content-Type", NULL))
- && (ct = camel_content_type_decode(content))) {
- if (!strcasecmp(ct->type, "multipart")) {
- if (!camel_content_type_is(ct, "multipart", "signed")
- && (bound = camel_content_type_param(ct, "boundary"))) {
- 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 = CAMEL_MIME_PARSER_STATE_MULTIPART;
- } else {
- /*camel_content_type_unref(ct);
- ct = camel_content_type_decode("text/plain");*/
-/* We can't quite do this, as it will mess up all the offsets ... */
-/* camel_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 = CAMEL_MIME_PARSER_STATE_MESSAGE;
- }
- }
- } else {
- /* make the default type for multipart/digest be message/rfc822 */
- if ((s->parts
- && camel_content_type_is(s->parts->content_type, "multipart", "digest"))) {
- ct = camel_content_type_decode("message/rfc822");
- type = CAMEL_MIME_PARSER_STATE_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);*/
- } else {
- ct = camel_content_type_decode("text/plain");
- }
- }
- h->content_type = ct;
- folder_push_part(s, h);
- s->state = type;
- return;
-
- case CAMEL_MIME_PARSER_STATE_HEADER:
- s->state = CAMEL_MIME_PARSER_STATE_BODY;
-
- case CAMEL_MIME_PARSER_STATE_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): '", ((CamelObject *)f->filter)->klass->name));
- 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 = CAMEL_MIME_PARSER_STATE_BODY_END;
- break;
-
- case CAMEL_MIME_PARSER_STATE_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 = CAMEL_MIME_PARSER_STATE_FROM;
- folder_scan_step(s, databuffer, datalength);
- s->parts->savestate = CAMEL_MIME_PARSER_STATE_MULTIPART; /* set return state for the new head part */
- return;
- }
- } else {
- break;
- }
- } while (1);
-
- s->state = CAMEL_MIME_PARSER_STATE_MULTIPART_END;
- break;
-
- case CAMEL_MIME_PARSER_STATE_MESSAGE:
- s->state = CAMEL_MIME_PARSER_STATE_FROM;
- folder_scan_step(s, databuffer, datalength);
- s->parts->savestate = CAMEL_MIME_PARSER_STATE_MESSAGE_END;
- break;
-
- case CAMEL_MIME_PARSER_STATE_FROM_END:
- case CAMEL_MIME_PARSER_STATE_BODY_END:
- case CAMEL_MIME_PARSER_STATE_MULTIPART_END:
- case CAMEL_MIME_PARSER_STATE_MESSAGE_END:
- s->state = s->parts->savestate;
- folder_pull_part(s);
- if (s->state & CAMEL_MIME_PARSER_STATE_END)
- return;
- goto tail_recurse;
-
- case CAMEL_MIME_PARSER_STATE_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 CAMEL_MIME_PARSER_STATE_EOF:
- s->state = CAMEL_MIME_PARSER_STATE_INITIAL;
- case CAMEL_MIME_PARSER_STATE_INITIAL:
- return;
-
- case CAMEL_MIME_PARSER_STATE_FROM:
- case CAMEL_MIME_PARSER_STATE_PRE_FROM:
- s->state = CAMEL_MIME_PARSER_STATE_INITIAL;
- folder_pull_part(s);
- return;
-
- case CAMEL_MIME_PARSER_STATE_MESSAGE:
- case CAMEL_MIME_PARSER_STATE_HEADER:
- case CAMEL_MIME_PARSER_STATE_MULTIPART:
-
- case CAMEL_MIME_PARSER_STATE_FROM_END:
- case CAMEL_MIME_PARSER_STATE_BODY_END:
- case CAMEL_MIME_PARSER_STATE_MULTIPART_END:
- case CAMEL_MIME_PARSER_STATE_MESSAGE_END:
-
- s->state = s->parts->savestate;
- folder_pull_part(s);
- if (s->state & CAMEL_MIME_PARSER_STATE_END) {
- s->state &= ~CAMEL_MIME_PARSER_STATE_END;
- }
- return;
- default:
- /* FIXME: not sure if this is entirely right */
- break;
- }
-}
-
-#ifdef STANDALONE
-int main(int argc, char **argv)
-{
- int fd;
- struct _header_scan_state *s;
- char *data;
- size_t 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 = CAMEL_MIME_PARSER_STATE_EOF;
- folder_push_part(s, h);
-#endif
- while (s->state != CAMEL_MIME_PARSER_STATE_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 CAMEL_MIME_PARSER_STATE_HEADER:
- if (s->parts->content_type
- && (charset = camel_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 = camel_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 CAMEL_MIME_PARSER_STATE_BODY:
- printf("got body %d '%.*s'\n", len, len, data);
- break;
- case CAMEL_MIME_PARSER_STATE_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 db85133cbc..0000000000
--- a/camel/camel-mime-parser.h
+++ /dev/null
@@ -1,146 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2003 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_PARSER_H
-#define _CAMEL_MIME_PARSER_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#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 _camel_mime_parser_state {
- CAMEL_MIME_PARSER_STATE_INITIAL,
- CAMEL_MIME_PARSER_STATE_PRE_FROM, /* data before a 'From' line */
- CAMEL_MIME_PARSER_STATE_FROM, /* got 'From' line */
- CAMEL_MIME_PARSER_STATE_HEADER, /* toplevel header */
- CAMEL_MIME_PARSER_STATE_BODY, /* scanning body of message */
- CAMEL_MIME_PARSER_STATE_MULTIPART, /* got multipart header */
- CAMEL_MIME_PARSER_STATE_MESSAGE, /* rfc822 message */
-
- CAMEL_MIME_PARSER_STATE_PART, /* part of a multipart */
-
- CAMEL_MIME_PARSER_STATE_END = 8, /* bit mask for 'end' flags */
-
- CAMEL_MIME_PARSER_STATE_EOF = 8, /* end of file */
- CAMEL_MIME_PARSER_STATE_PRE_FROM_END, /* pre from end */
- CAMEL_MIME_PARSER_STATE_FROM_END, /* end of whole from bracket */
- CAMEL_MIME_PARSER_STATE_HEADER_END, /* dummy value */
- CAMEL_MIME_PARSER_STATE_BODY_END, /* end of message */
- CAMEL_MIME_PARSER_STATE_MULTIPART_END, /* end of multipart */
- CAMEL_MIME_PARSER_STATE_MESSAGE_END, /* end of message */
-};
-
-struct _CamelMimeParser {
- CamelObject parent;
-
- struct _CamelMimeParserPrivate *priv;
-};
-
-struct _CamelMimeParserClass {
- CamelObjectClass parent_class;
-
- void (*message) (CamelMimeParser *parser, void *headers);
- void (*part) (CamelMimeParser *parser);
- void (*content) (CamelMimeParser *parser);
-};
-
-CamelType camel_mime_parser_get_type (void);
-CamelMimeParser *camel_mime_parser_new (void);
-
-/* quick-fix for parser not erroring, we can find out if it had an error afterwards */
-int camel_mime_parser_errno (CamelMimeParser *parser);
-
-/* using an fd will be a little faster, but not much (over a simple stream) */
-int camel_mime_parser_init_with_fd (CamelMimeParser *parser, int fd);
-int camel_mime_parser_init_with_stream (CamelMimeParser *parser, CamelStream *stream);
-
-/* get the stream or fd back of the parser */
-CamelStream *camel_mime_parser_stream (CamelMimeParser *parser);
-int camel_mime_parser_fd (CamelMimeParser *parser);
-
-/* scan 'From' separators? */
-void camel_mime_parser_scan_from (CamelMimeParser *parser, gboolean scan_from);
-/* Do we want to know about the pre-from data? */
-void camel_mime_parser_scan_pre_from (CamelMimeParser *parser, gboolean scan_pre_from);
-
-/* what headers to save, MUST include ^Content-Type: */
-int camel_mime_parser_set_header_regex (CamelMimeParser *parser, char *matchstr);
-
-/* normal interface */
-enum _camel_mime_parser_state camel_mime_parser_step (CamelMimeParser *parser, char **buf, size_t *buflen);
-void camel_mime_parser_unstep (CamelMimeParser *parser);
-void camel_mime_parser_drop_step (CamelMimeParser *parser);
-enum _camel_mime_parser_state camel_mime_parser_state (CamelMimeParser *parser);
-
-/* read through the parser */
-int camel_mime_parser_read (CamelMimeParser *parser, const char **databuffer, int len);
-
-/* get content type for the current part/header */
-CamelContentType *camel_mime_parser_content_type (CamelMimeParser *parser);
-
-/* get/change raw header by name */
-const char *camel_mime_parser_header (CamelMimeParser *parser, const char *name, int *offset);
-
-/* get all raw headers. READ ONLY! */
-struct _camel_header_raw *camel_mime_parser_headers_raw (CamelMimeParser *parser);
-
-/* get multipart pre/postface */
-const char *camel_mime_parser_preface (CamelMimeParser *parser);
-const char *camel_mime_parser_postface (CamelMimeParser *parser);
-
-/* return the from line content */
-const char *camel_mime_parser_from_line (CamelMimeParser *parser);
-
-/* add a processing filter for body contents */
-int camel_mime_parser_filter_add (CamelMimeParser *parser, CamelMimeFilter *filter);
-void camel_mime_parser_filter_remove (CamelMimeParser *parser, int id);
-
-/* 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 *parser);
-off_t camel_mime_parser_seek (CamelMimeParser *parser, off_t offset, int whence);
-
-off_t camel_mime_parser_tell_start_headers (CamelMimeParser *parser);
-off_t camel_mime_parser_tell_start_from (CamelMimeParser *parser);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#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 f063b3af80..0000000000
--- a/camel/camel-mime-part-utils.c
+++ /dev/null
@@ -1,137 +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>
- * Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 1999-2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <ctype.h>
-#include <errno.h>
-
-#include <gal/util/e-iconv.h>
-
-#include "camel-charset-map.h"
-#include "camel-mime-part-utils.h"
-#include "camel-mime-message.h"
-#include "camel-multipart.h"
-#include "camel-multipart-signed.h"
-#include "camel-multipart-encrypted.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-mime-filter-save.h"
-#include "camel-html-parser.h"
-
-#define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))
- #include <stdio.h>*/
-
-/* simple data wrapper */
-static void
-simple_data_wrapper_construct_from_parser (CamelDataWrapper *dw, CamelMimeParser *mp)
-{
- char *buf;
- GByteArray *buffer;
- CamelStream *mem;
- size_t len;
-
- d(printf ("simple_data_wrapper_construct_from_parser()\n"));
-
- /* read in the entire content */
- buffer = g_byte_array_new ();
- while (camel_mime_parser_step (mp, &buf, &len) != CAMEL_MIME_PARSER_STATE_BODY_END) {
- d(printf("appending o/p data: %d: %.*s\n", len, len, buf));
- g_byte_array_append (buffer, buf, len);
- }
-
- 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 (mem);
-}
-
-/* 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;
- CamelContentType *ct;
- char *encoding;
-
- ct = camel_mime_parser_content_type (mp);
-
- encoding = camel_content_transfer_encoding_decode (camel_mime_parser_header (mp, "Content-Transfer-Encoding", NULL));
-
- switch (camel_mime_parser_state (mp)) {
- case CAMEL_MIME_PARSER_STATE_HEADER:
- d(printf("Creating body part\n"));
- /* multipart/signed is some fucked up type that we must treat as binary data, fun huh, idiots. */
- if (camel_content_type_is (ct, "multipart", "signed")) {
- content = (CamelDataWrapper *) camel_multipart_signed_new ();
- camel_multipart_construct_from_parser ((CamelMultipart *) content, mp);
- } else {
- content = camel_data_wrapper_new ();
- simple_data_wrapper_construct_from_parser (content, mp);
- }
- break;
- case CAMEL_MIME_PARSER_STATE_MESSAGE:
- d(printf("Creating message part\n"));
- content = (CamelDataWrapper *) camel_mime_message_new ();
- camel_mime_part_construct_from_parser ((CamelMimePart *)content, mp);
- break;
- case CAMEL_MIME_PARSER_STATE_MULTIPART:
- d(printf("Creating multi-part\n"));
- if (camel_content_type_is (ct, "multipart", "encrypted"))
- content = (CamelDataWrapper *) camel_multipart_encrypted_new ();
- else if (camel_content_type_is (ct, "multipart", "signed"))
- content = (CamelDataWrapper *) camel_multipart_signed_new ();
- else
- content = (CamelDataWrapper *) camel_multipart_new ();
-
- camel_multipart_construct_from_parser((CamelMultipart *)content, mp);
- d(printf("Created multi-part\n"));
- break;
- default:
- g_warning("Invalid state encountered???: %d", camel_mime_parser_state (mp));
- }
-
- if (content) {
- if (encoding)
- content->encoding = camel_transfer_encoding_from_string (encoding);
-
- /* 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 (dw));
- camel_medium_set_content_object ((CamelMedium *)dw, content);
- camel_object_unref (content);
- }
-
- g_free (encoding);
-}
diff --git a/camel/camel-mime-part-utils.h b/camel/camel-mime-part-utils.h
deleted file mode 100644
index 576f7bd3e4..0000000000
--- a/camel/camel-mime-part-utils.h
+++ /dev/null
@@ -1,44 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 3a57a51970..0000000000
--- a/camel/camel-mime-part.c
+++ /dev/null
@@ -1,912 +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>
- * Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 1999-2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <errno.h>
-
-#include <gal/util/e-iconv.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-mime-utils.h"
-#include "camel-exception.h"
-#include "camel-charset-map.h"
-#include "camel-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 ssize_t write_to_stream (CamelDataWrapper *dw, CamelStream *stream);
-static int construct_from_stream (CamelDataWrapper *dw, CamelStream *stream);
-
-/* from CamelMedium */
-static void add_header (CamelMedium *medium, const char *name, const void *value);
-static void set_header (CamelMedium *medium, const char *name, const void *value);
-static void remove_header (CamelMedium *medium, const char *name);
-static const void *get_header (CamelMedium *medium, const char *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 *mime_part, CamelMimeParser *mp);
-
-/* forward references */
-static void set_disposition (CamelMimePart *mime_part, const char *disposition);
-
-/* format output of headers */
-static int write_references(CamelStream *stream, struct _camel_header_raw *h);
-/*static int write_fold(CamelStream *stream, struct _camel_header_raw *h);*/
-static int write_raw(CamelStream *stream, struct _camel_header_raw *h);
-
-
-/* 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 (camel_strcase_hash, camel_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 (camel_strcase_hash, camel_strcase_equal);
- g_hash_table_insert(header_formatted_table, "Content-Type", write_raw);
- g_hash_table_insert(header_formatted_table, "Content-Disposition", write_raw);
- g_hash_table_insert(header_formatted_table, "To", write_raw);
- g_hash_table_insert(header_formatted_table, "From", write_raw);
- g_hash_table_insert(header_formatted_table, "Reply-To", write_raw);
- g_hash_table_insert(header_formatted_table, "Cc", write_raw);
- g_hash_table_insert(header_formatted_table, "Bcc", write_raw);
- g_hash_table_insert(header_formatted_table, "Message-ID", write_raw);
- g_hash_table_insert(header_formatted_table, "In-Reply-To", write_raw);
- g_hash_table_insert(header_formatted_table, "References", write_references);
-}
-
-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 *mime_part = CAMEL_MIME_PART (object);
-
- if (((CamelDataWrapper *) mime_part)->mime_type)
- camel_content_type_unref (((CamelDataWrapper *) mime_part)->mime_type);
- ((CamelDataWrapper *) mime_part)->mime_type = camel_content_type_new ("text", "plain");
-
- mime_part->description = NULL;
- mime_part->disposition = NULL;
- mime_part->content_id = NULL;
- mime_part->content_MD5 = NULL;
- mime_part->content_location = NULL;
- mime_part->content_languages = NULL;
- mime_part->encoding = CAMEL_TRANSFER_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);
- camel_string_list_free (mime_part->content_languages);
- camel_content_disposition_unref(mime_part->disposition);
-
- camel_header_raw_clear(&mime_part->headers);
-}
-
-
-
-CamelType
-camel_mime_part_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- 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 type;
-}
-
-
-/* **** */
-
-static gboolean
-process_header(CamelMedium *medium, const char *name, const char *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, name);
- switch (header_type) {
- case HEADER_DESCRIPTION: /* raw header->utf8 conversion */
- g_free (mime_part->description);
- if (((CamelDataWrapper *) mime_part)->mime_type) {
- charset = camel_content_type_param (((CamelDataWrapper *) mime_part)->mime_type, "charset");
- charset = e_iconv_charset_name (charset);
- } else
- charset = NULL;
- mime_part->description = g_strstrip (camel_header_decode_string (value, charset));
- break;
- case HEADER_DISPOSITION:
- set_disposition (mime_part, value);
- break;
- case HEADER_CONTENT_ID:
- g_free (mime_part->content_id);
- mime_part->content_id = camel_header_contentid_decode (value);
- break;
- case HEADER_ENCODING:
- text = camel_header_token_decode (value);
- mime_part->encoding = camel_transfer_encoding_from_string (text);
- g_free (text);
- break;
- case HEADER_CONTENT_MD5:
- g_free (mime_part->content_MD5);
- mime_part->content_MD5 = g_strdup (value);
- break;
- case HEADER_CONTENT_LOCATION:
- g_free (mime_part->content_location);
- mime_part->content_location = camel_header_location_decode (value);
- break;
- case HEADER_CONTENT_TYPE:
- if (((CamelDataWrapper *) mime_part)->mime_type)
- camel_content_type_unref (((CamelDataWrapper *) mime_part)->mime_type);
- ((CamelDataWrapper *) mime_part)->mime_type = camel_content_type_decode (value);
- break;
- default:
- return FALSE;
- }
- return TRUE;
-}
-
-static void
-set_header (CamelMedium *medium, const char *name, const void *value)
-{
- CamelMimePart *part = CAMEL_MIME_PART (medium);
-
- process_header(medium, name, value);
- camel_header_raw_replace(&part->headers, name, value, -1);
-}
-
-static void
-add_header (CamelMedium *medium, const char *name, const void *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, name, value))
- camel_header_raw_replace(&part->headers, name, value, -1);
- else
- camel_header_raw_append(&part->headers, name, value, -1);
-}
-
-static void
-remove_header (CamelMedium *medium, const char *name)
-{
- CamelMimePart *part = (CamelMimePart *)medium;
-
- process_header(medium, name, NULL);
- camel_header_raw_remove(&part->headers, name);
-}
-
-static const void *
-get_header (CamelMedium *medium, const char *name)
-{
- CamelMimePart *part = (CamelMimePart *)medium;
-
- return camel_header_raw_find(&part->headers, name, NULL);
-}
-
-static GArray *
-get_headers (CamelMedium *medium)
-{
- CamelMimePart *part = (CamelMimePart *)medium;
- GArray *headers;
- CamelMediumHeader header;
- struct _camel_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)
-{
- g_array_free (gheaders, TRUE);
-}
-
-/* **** Content-Description */
-void
-camel_mime_part_set_description (CamelMimePart *mime_part, const char *description)
-{
- char *text = camel_header_encode_string (description);
-
- camel_medium_set_header (CAMEL_MEDIUM (mime_part),
- "Content-Description", text);
- g_free (text);
-}
-
-const char *
-camel_mime_part_get_description (CamelMimePart *mime_part)
-{
- return mime_part->description;
-}
-
-/* **** Content-Disposition */
-
-static void
-set_disposition (CamelMimePart *mime_part, const char *disposition)
-{
- camel_content_disposition_unref(mime_part->disposition);
- if (disposition)
- mime_part->disposition = camel_content_disposition_decode(disposition);
- else
- mime_part->disposition = NULL;
-}
-
-
-void
-camel_mime_part_set_disposition (CamelMimePart *mime_part, const char *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 = camel_content_disposition_format(mime_part->disposition);
-
- camel_medium_set_header (CAMEL_MEDIUM (mime_part),
- "Content-Disposition", text);
-
- g_free(text);
-}
-
-const char *
-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 char *filename)
-{
- char *str;
-
- if (mime_part->disposition == NULL)
- mime_part->disposition = camel_content_disposition_decode("attachment");
-
- camel_header_set_param(&mime_part->disposition->params, "filename", filename);
- str = camel_content_disposition_format(mime_part->disposition);
-
- camel_medium_set_header (CAMEL_MEDIUM (mime_part),
- "Content-Disposition", str);
- g_free(str);
-
- camel_content_type_set_param (((CamelDataWrapper *) mime_part)->mime_type, "name", filename);
- str = camel_content_type_format (((CamelDataWrapper *) mime_part)->mime_type);
- camel_medium_set_header (CAMEL_MEDIUM (mime_part), "Content-Type", str);
- g_free (str);
-}
-
-const char *
-camel_mime_part_get_filename (CamelMimePart *mime_part)
-{
- if (mime_part->disposition) {
- const char *name = camel_header_param (mime_part->disposition->params, "filename");
- if (name)
- return name;
- }
-
- return camel_content_type_param (((CamelDataWrapper *) mime_part)->mime_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 = camel_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 char *
-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 char *
-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 char *
-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,
- CamelTransferEncoding encoding)
-{
- const char *text;
-
- text = camel_transfer_encoding_to_string (encoding);
- camel_medium_set_header (CAMEL_MEDIUM (mime_part),
- "Content-Transfer-Encoding", text);
-}
-
-CamelTransferEncoding
-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)
- camel_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, const char *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 ((CamelDataWrapper *) mime_part)->mime_type;
-}
-
-
-static void
-set_content_object (CamelMedium *medium, CamelDataWrapper *content)
-{
- CamelDataWrapper *mime_part = CAMEL_DATA_WRAPPER (medium);
- CamelContentType *content_type;
-
- parent_class->set_content_object (medium, content);
-
- content_type = camel_data_wrapper_get_mime_type_field (content);
- if (mime_part->mime_type != content_type) {
- char *txt;
-
- txt = camel_content_type_format (content_type);
- camel_medium_set_header (CAMEL_MEDIUM (mime_part), "Content-Type", txt);
- g_free (txt);
- }
-}
-
-/**********************************************************************/
-
-static ssize_t
-write_references(CamelStream *stream, struct _camel_header_raw *h)
-{
- ssize_t len, out, total;
- char *v, *ids, *ide;
-
- /* this is only approximate, based on the next >, this way it retains any content
- from the original which may not be properly formatted, etc. It also doesn't handle
- the case where an individual messageid is too long, however thats a bad mail to
- start with ... */
-
- v = h->value;
- len = strlen(h->name)+1;
- total = camel_stream_printf(stream, "%s%s", h->name, isspace(v[0])?":":": ");
- if (total == -1)
- return -1;
- while (*v) {
- ids = v;
- ide = strchr(ids+1, '>');
- if (ide)
- v = ++ide;
- else
- ide = v = strlen(ids)+ids;
-
- if (len>0 && len + (ide - ids) >= CAMEL_FOLD_SIZE) {
- out = camel_stream_printf(stream, "\n\t");
- if (out == -1)
- return -1;
- total += out;
- len = 0;
- }
- out = camel_stream_write(stream, ids, ide-ids);
- if (out == -1)
- return -1;
- len += out;
- total += out;
- }
- camel_stream_write(stream, "\n", 1);
-
- return total;
-}
-
-#if 0
-/* not needed - yet - handled by default case */
-static ssize_t
-write_fold(CamelStream *stream, struct _camel_header_raw *h)
-{
- char *val;
- int count;
-
- val = camel_header_fold(h->value, strlen(h->name));
- count = camel_stream_printf(stream, "%s%s%s\n", h->name, isspace(val[0]) ? ":" : ": ", val);
- g_free(val);
-
- return count;
-}
-#endif
-
-static ssize_t
-write_raw(CamelStream *stream, struct _camel_header_raw *h)
-{
- char *val = h->value;
-
- return camel_stream_printf(stream, "%s%s%s\n", h->name, isspace(val[0]) ? ":" : ": ", val);
-}
-
-static ssize_t
-write_to_stream (CamelDataWrapper *dw, CamelStream *stream)
-{
- CamelMimePart *mp = CAMEL_MIME_PART (dw);
- CamelMedium *medium = CAMEL_MEDIUM (dw);
- CamelStream *ostream = stream;
- CamelDataWrapper *content;
- ssize_t total = 0;
- ssize_t count;
- int errnosav;
-
- d(printf("mime_part::write_to_stream\n"));
-
- /* FIXME: something needs to be done about this ... */
- /* TODO: content-languages header? */
-
- if (mp->headers) {
- struct _camel_header_raw *h = mp->headers;
- char *val;
- ssize_t (*writefn)(CamelStream *stream, struct _camel_header_raw *);
-
- /* 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 ((writefn = g_hash_table_lookup(header_formatted_table, h->name)) == NULL) {
- val = camel_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 = writefn(stream, h);
- }
- 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) {
- CamelMimeFilter *filter = NULL;
- CamelStreamFilter *filter_stream = NULL;
- CamelMimeFilter *charenc = NULL;
- const char *content_charset = NULL;
- const char *part_charset = NULL;
- gboolean reencode = FALSE;
- const char *filename;
-
- if (camel_content_type_is (dw->mime_type, "text", "*")) {
- content_charset = camel_content_type_param (content->mime_type, "charset");
- part_charset = camel_content_type_param (dw->mime_type, "charset");
-
- if (content_charset && part_charset) {
- content_charset = e_iconv_charset_name (content_charset);
- part_charset = e_iconv_charset_name (part_charset);
- }
- }
-
- if (mp->encoding != content->encoding) {
- switch (mp->encoding) {
- case CAMEL_TRANSFER_ENCODING_BASE64:
- filter = (CamelMimeFilter *) camel_mime_filter_basic_new_type (CAMEL_MIME_FILTER_BASIC_BASE64_ENC);
- break;
- case CAMEL_TRANSFER_ENCODING_QUOTEDPRINTABLE:
- filter = (CamelMimeFilter *) camel_mime_filter_basic_new_type (CAMEL_MIME_FILTER_BASIC_QP_ENC);
- break;
- case CAMEL_TRANSFER_ENCODING_UUENCODE:
- filename = camel_mime_part_get_filename (mp);
- count = camel_stream_printf (ostream, "begin 644 %s\n", filename ? filename : "untitled");
- if (count == -1)
- return -1;
- total += count;
- filter = (CamelMimeFilter *) camel_mime_filter_basic_new_type (CAMEL_MIME_FILTER_BASIC_UU_ENC);
- break;
- default:
- /* content is encoded but the part doesn't want to be... */
- reencode = TRUE;
- break;
- }
- }
-
- if (content_charset && part_charset && part_charset != content_charset)
- charenc = (CamelMimeFilter *) camel_mime_filter_charset_new_convert (content_charset, part_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 (charenc);
- }
-
- /* we only re-do crlf on encoded blocks */
- if (filter && camel_content_type_is (dw->mime_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 (crlf);
- }
-
- if (filter) {
- camel_stream_filter_add(filter_stream, filter);
- camel_object_unref (filter);
- }
-
- stream = (CamelStream *)filter_stream;
-
- reencode = TRUE;
- }
-
- if (reencode)
- count = camel_data_wrapper_decode_to_stream (content, stream);
- else
- count = camel_data_wrapper_write_to_stream (content, stream);
-
- if (filter_stream) {
- errnosav = errno;
- camel_stream_flush (stream);
- camel_object_unref (filter_stream);
- errno = errnosav;
- }
-
- if (count == -1)
- return -1;
-
- total += count;
-
- if (reencode && mp->encoding == CAMEL_TRANSFER_ENCODING_UUENCODE) {
- count = camel_stream_write (ostream, "end\n", 4);
- 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 *mime_part, CamelMimeParser *mp)
-{
- CamelDataWrapper *dw = (CamelDataWrapper *) mime_part;
- struct _camel_header_raw *headers;
- const char *content;
- char *buf;
- size_t len;
- int err;
-
- d(printf("mime_part::construct_from_parser()\n"));
-
- switch (camel_mime_parser_step(mp, &buf, &len)) {
- case CAMEL_MIME_PARSER_STATE_MESSAGE:
- /* set the default type of a message always */
- if (dw->mime_type)
- camel_content_type_unref (dw->mime_type);
- dw->mime_type = camel_content_type_decode ("message/rfc822");
- case CAMEL_MIME_PARSER_STATE_HEADER:
- case CAMEL_MIME_PARSER_STATE_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 = camel_header_raw_find(&headers, "content-type", NULL);
- if (content)
- process_header((CamelMedium *)dw, "content-type", content);
-
- while (headers) {
- if (strcasecmp(headers->name, "content-type") == 0
- && headers->value != content)
- camel_medium_add_header((CamelMedium *)dw, "X-Invalid-Content-Type", headers->value);
- else
- camel_medium_add_header((CamelMedium *)dw, headers->name, headers->value);
- headers = headers->next;
- }
-
- camel_mime_part_construct_content_from_parser (mime_part, mp);
- break;
- default:
- g_warning("Invalid state encountered???: %d", camel_mime_parser_state(mp));
- }
-
- d(printf("mime_part::construct_from_parser() leaving\n"));
- err = camel_mime_parser_errno(mp);
- if (err != 0) {
- errno = err;
- return -1;
- }
-
- 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;
-}
-
-/******************************/
-/** 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 (stream);
- camel_medium_set_content_object (medium, dw);
- camel_object_unref (dw);
- } else {
- if (medium->content)
- camel_object_unref (medium->content);
- medium->content = NULL;
- }
-}
diff --git a/camel/camel-mime-part.h b/camel/camel-mime-part.h
deleted file mode 100644
index 2e7ea48a9c..0000000000
--- a/camel/camel-mime-part.h
+++ /dev/null
@@ -1,115 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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))
-
-/* Do not change these values directly, you would regret it one day */
-struct _CamelMimePart {
- CamelMedium parent_object;
-
- struct _camel_header_raw *headers; /* mime headers */
-
- /* All fields here are -** PRIVATE **- */
- /* TODO: these should be in a camelcontentinfo */
- char *description;
- CamelContentDisposition *disposition;
- char *content_id;
- char *content_MD5;
- char *content_location;
- GList *content_languages;
- CamelTransferEncoding 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 char *description);
-const char *camel_mime_part_get_description (CamelMimePart *mime_part);
-
-void camel_mime_part_set_disposition (CamelMimePart *mime_part, const char *disposition);
-const char *camel_mime_part_get_disposition (CamelMimePart *mime_part);
-
-void camel_mime_part_set_filename (CamelMimePart *mime_part, const char *filename);
-const char *camel_mime_part_get_filename (CamelMimePart *mime_part);
-
-void camel_mime_part_set_content_id (CamelMimePart *mime_part, const char *contentid);
-const char *camel_mime_part_get_content_id (CamelMimePart *mime_part);
-
-void camel_mime_part_set_content_MD5 (CamelMimePart *mime_part, const char *);
-const char *camel_mime_part_get_content_MD5 (CamelMimePart *mime_part);
-
-void camel_mime_part_set_content_location (CamelMimePart *mime_part, const char *);
-const char *camel_mime_part_get_content_location (CamelMimePart *mime_part);
-
-void camel_mime_part_set_encoding (CamelMimePart *mime_part, CamelTransferEncoding type);
-CamelTransferEncoding 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, const char *content_type);
-CamelContentType *camel_mime_part_get_content_type (CamelMimePart *mime_part);
-
-/* 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 88a7c2ad9b..0000000000
--- a/camel/camel-mime-utils.c
+++ /dev/null
@@ -1,4346 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2003 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/* dont touch this file without my permission - Michael */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/param.h> /* for MAXHOSTNAMELEN */
-#include <sys/stat.h>
-#include <pthread.h>
-#include <unistd.h>
-#include <regex.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <ctype.h>
-#include <time.h>
-
-#ifndef MAXHOSTNAMELEN
-#define MAXHOSTNAMELEN 1024
-#endif
-
-#include <glib.h>
-#include <gal/util/e-iconv.h>
-#include <e-util/e-time-utils.h>
-
-#include "camel-mime-utils.h"
-#include "camel-charset-map.h"
-#include "camel-service.h" /* for camel_gethostbyname() */
-
-#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 non-essential warnings ... */
-#define w(x)
-
-#define d(x)
-#define d2(x)
-
-#define CAMEL_UUENCODE_CHAR(c) ((c) ? (c) + ' ' : '`')
-#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'
-};
-
-unsigned short camel_mime_special_table[256];
-static unsigned char camel_mime_base64_rank[256];
-
-/* Used by table initialisation code for special characters */
-#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] |= CAMEL_MIME_IS_CTRL;
- if ((i>=32 && i<=60) || (i>=62 && i<=126) || i==9)
- camel_mime_special_table[i] |= (CAMEL_MIME_IS_QPSAFE|CAMEL_MIME_IS_ESAFE);
- if ((i>='0' && i<='9') || (i>='a' && i<='z') || (i>='A' && i<= 'Z'))
- camel_mime_special_table[i] |= CAMEL_MIME_IS_PSAFE;
- }
- camel_mime_special_table[127] |= CAMEL_MIME_IS_CTRL;
- camel_mime_special_table[' '] |= CAMEL_MIME_IS_SPACE;
- header_init_bits(CAMEL_MIME_IS_LWSP, 0, 0, CHARS_LWSP);
- header_init_bits(CAMEL_MIME_IS_TSPECIAL, CAMEL_MIME_IS_CTRL, 0, CHARS_TSPECIAL);
- header_init_bits(CAMEL_MIME_IS_SPECIAL, 0, 0, CHARS_SPECIAL);
- header_init_bits(CAMEL_MIME_IS_DSPECIAL, 0, FALSE, CHARS_DSPECIAL);
- header_remove_bits(CAMEL_MIME_IS_ESAFE, CHARS_ESPECIAL);
- header_init_bits(CAMEL_MIME_IS_PSAFE, 0, 0, CHARS_PSPECIAL);
-}
-
-static 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;
-}
-
-/* call this when finished encoding everything, to
- flush off the last little bit */
-size_t
-camel_base64_encode_close(unsigned char *in, size_t inlen, gboolean break_lines, unsigned char *out, int *state, int *save)
-{
- int c1, c2;
- unsigned char *outptr = out;
-
- if (inlen>0)
- outptr += camel_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).
-*/
-size_t
-camel_base64_encode_step(unsigned char *in, size_t 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;
-}
-
-
-/**
- * camel_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
- **/
-size_t
-camel_base64_decode_step(unsigned char *in, size_t 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>out)
- outptr--;
- i--;
- }
- }
-
- /* if i!= 0 then there is a truncation error! */
- return outptr-out;
-}
-
-char *
-camel_base64_encode_simple (const char *data, size_t len)
-{
- unsigned char *out;
- int state = 0, outlen;
- unsigned int save = 0;
-
- out = g_malloc (len * 4 / 3 + 5);
- outlen = camel_base64_encode_close ((unsigned char *)data, len, FALSE,
- out, &state, &save);
- out[outlen] = '\0';
- return (char *)out;
-}
-
-size_t
-camel_base64_decode_simple (char *data, size_t len)
-{
- int state = 0;
- unsigned int save = 0;
-
- return camel_base64_decode_step ((unsigned char *)data, len,
- (unsigned char *)data, &state, &save);
-}
-
-/**
- * camel_uuencode_close: uuencode a chunk of data
- * @in: input stream
- * @len: input stream length
- * @out: output stream
- * @uubuf: temporary buffer of 60 bytes
- * @state: holds the number of bits that are stored in @save
- * @save: leftover bits that have not yet been encoded
- *
- * Returns the number of bytes encoded. Call this when finished
- * encoding data with camel_uuencode_step to flush off the last little
- * bit.
- **/
-size_t
-camel_uuencode_close (unsigned char *in, size_t len, unsigned char *out, unsigned char *uubuf, int *state, guint32 *save)
-{
- register unsigned char *outptr, *bufptr;
- register guint32 saved;
- int uulen, uufill, i;
-
- outptr = out;
-
- if (len > 0)
- outptr += camel_uuencode_step (in, len, out, uubuf, state, save);
-
- uufill = 0;
-
- saved = *save;
- i = *state & 0xff;
- uulen = (*state >> 8) & 0xff;
-
- bufptr = uubuf + ((uulen / 3) * 4);
-
- if (i > 0) {
- while (i < 3) {
- saved <<= 8 | 0;
- uufill++;
- i++;
- }
-
- if (i == 3) {
- /* convert 3 normal bytes into 4 uuencoded bytes */
- unsigned char b0, b1, b2;
-
- b0 = saved >> 16;
- b1 = saved >> 8 & 0xff;
- b2 = saved & 0xff;
-
- *bufptr++ = CAMEL_UUENCODE_CHAR ((b0 >> 2) & 0x3f);
- *bufptr++ = CAMEL_UUENCODE_CHAR (((b0 << 4) | ((b1 >> 4) & 0xf)) & 0x3f);
- *bufptr++ = CAMEL_UUENCODE_CHAR (((b1 << 2) | ((b2 >> 6) & 0x3)) & 0x3f);
- *bufptr++ = CAMEL_UUENCODE_CHAR (b2 & 0x3f);
-
- i = 0;
- saved = 0;
- uulen += 3;
- }
- }
-
- if (uulen > 0) {
- int cplen = ((uulen / 3) * 4);
-
- *outptr++ = CAMEL_UUENCODE_CHAR ((uulen - uufill) & 0xff);
- memcpy (outptr, uubuf, cplen);
- outptr += cplen;
- *outptr++ = '\n';
- uulen = 0;
- }
-
- *outptr++ = CAMEL_UUENCODE_CHAR (uulen & 0xff);
- *outptr++ = '\n';
-
- *save = 0;
- *state = 0;
-
- return outptr - out;
-}
-
-
-/**
- * camel_uuencode_step: uuencode a chunk of data
- * @in: input stream
- * @len: input stream length
- * @out: output stream
- * @uubuf: temporary buffer of 60 bytes
- * @state: holds the number of bits that are stored in @save
- * @save: leftover bits that have not yet been encoded
- *
- * Returns the number of bytes encoded. Performs an 'encode step',
- * only encodes blocks of 45 characters to the output at a time, saves
- * left-over state in @uubuf, @state and @save (initialize to 0 on first
- * invocation).
- **/
-size_t
-camel_uuencode_step (unsigned char *in, size_t len, unsigned char *out, unsigned char *uubuf, int *state, guint32 *save)
-{
- register unsigned char *inptr, *outptr, *bufptr;
- unsigned char *inend;
- register guint32 saved;
- int uulen, i;
-
- saved = *save;
- i = *state & 0xff;
- uulen = (*state >> 8) & 0xff;
-
- inptr = in;
- inend = in + len;
-
- outptr = out;
-
- bufptr = uubuf + ((uulen / 3) * 4);
-
- while (inptr < inend) {
- while (uulen < 45 && inptr < inend) {
- while (i < 3 && inptr < inend) {
- saved = (saved << 8) | *inptr++;
- i++;
- }
-
- if (i == 3) {
- /* convert 3 normal bytes into 4 uuencoded bytes */
- unsigned char b0, b1, b2;
-
- b0 = saved >> 16;
- b1 = saved >> 8 & 0xff;
- b2 = saved & 0xff;
-
- *bufptr++ = CAMEL_UUENCODE_CHAR ((b0 >> 2) & 0x3f);
- *bufptr++ = CAMEL_UUENCODE_CHAR (((b0 << 4) | ((b1 >> 4) & 0xf)) & 0x3f);
- *bufptr++ = CAMEL_UUENCODE_CHAR (((b1 << 2) | ((b2 >> 6) & 0x3)) & 0x3f);
- *bufptr++ = CAMEL_UUENCODE_CHAR (b2 & 0x3f);
-
- i = 0;
- saved = 0;
- uulen += 3;
- }
- }
-
- if (uulen >= 45) {
- *outptr++ = CAMEL_UUENCODE_CHAR (uulen & 0xff);
- memcpy (outptr, uubuf, ((uulen / 3) * 4));
- outptr += ((uulen / 3) * 4);
- *outptr++ = '\n';
- uulen = 0;
- bufptr = uubuf;
- }
- }
-
- *save = saved;
- *state = ((uulen & 0xff) << 8) | (i & 0xff);
-
- return outptr - out;
-}
-
-
-/**
- * camel_uudecode_step: uudecode a chunk of data
- * @in: input stream
- * @inlen: 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
- *
- * Returns the number of bytes decoded. Performs a 'decode step' on
- * a chunk of uuencoded data. Assumes the "begin <mode> <file name>"
- * line has been stripped off.
- **/
-size_t
-camel_uudecode_step (unsigned char *in, size_t len, unsigned char *out, int *state, guint32 *save)
-{
- register unsigned char *inptr, *outptr;
- unsigned char *inend, ch;
- register guint32 saved;
- gboolean last_was_eoln;
- int uulen, i;
-
- if (*state & CAMEL_UUDECODE_STATE_END)
- return 0;
-
- saved = *save;
- i = *state & 0xff;
- uulen = (*state >> 8) & 0xff;
- if (uulen == 0)
- last_was_eoln = TRUE;
- else
- last_was_eoln = FALSE;
-
- inend = in + len;
- outptr = out;
-
- inptr = in;
- while (inptr < inend) {
- if (*inptr == '\n' || last_was_eoln) {
- if (last_was_eoln && *inptr != '\n') {
- uulen = CAMEL_UUDECODE_CHAR (*inptr);
- last_was_eoln = FALSE;
- if (uulen == 0) {
- *state |= CAMEL_UUDECODE_STATE_END;
- break;
- }
- } 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 = (*state & CAMEL_UUDECODE_STATE_MASK) | ((uulen & 0xff) << 8) | (i & 0xff);
-
- return outptr - out;
-}
-
-
-/* complete qp encoding */
-size_t
-camel_quoted_decode_close(unsigned char *in, size_t len, unsigned char *out, int *state, int *save)
-{
- register unsigned char *outptr = out;
- int last;
-
- if (len>0)
- outptr += camel_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 (camel_mime_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 */
-size_t
-camel_quoted_encode_step (unsigned char *in, size_t len, unsigned char *out, int *statep, int *save)
-{
- register guchar *inptr, *outptr, *inend;
- unsigned char 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 (camel_mime_is_qpsafe(last)) {
- *outptr++ = last;
- sofar++;
- } else {
- *outptr++ = '=';
- *outptr++ = tohex[(last >> 4) & 0xf];
- *outptr++ = tohex[last & 0xf];
- sofar += 3;
- }
- }
-
- if (camel_mime_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.
-*/
-
-size_t
-camel_quoted_decode_step(unsigned char *in, size_t 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 size_t
-quoted_decode(const unsigned char *in, size_t 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 0;
-}
-
-/* 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 size_t
-quoted_encode (const unsigned char *in, size_t 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 (camel_mime_is_lwsp(*inptr) || (*inptr =='(' && *inptr != '\0')) {
- while (camel_mime_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, size_t len)
-{
- const char *inptr = in+2;
- const char *inend = in+len-2;
- const char *inbuf;
- const char *charset;
- char *encname, *p;
- int tmplen;
- size_t ret;
- char *decword = NULL;
- char *decoded = NULL;
- char *outbase = NULL;
- char *outbuf;
- size_t inlen, outlen;
- gboolean retried = FALSE;
- 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 = g_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 = camel_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 = g_alloca (tmplen + 1);
- memcpy (encname, in + 2, tmplen);
- encname[tmplen] = '\0';
-
- /* rfc2231 updates rfc2047 encoded words...
- * The ABNF given in RFC 2047 for encoded-words is:
- * encoded-word := "=?" charset "?" encoding "?" encoded-text "?="
- * This specification changes this ABNF to:
- * encoded-word := "=?" charset ["*" language] "?" encoding "?" encoded-text "?="
- */
-
- /* trim off the 'language' part if it's there... */
- p = strchr (encname, '*');
- if (p)
- *p = '\0';
-
- charset = e_iconv_charset_name (encname);
-
- inbuf = decword;
-
- outlen = inlen * 6 + 16;
- outbase = g_alloca (outlen);
- outbuf = outbase;
-
- retry:
- ic = e_iconv_open ("UTF-8", charset);
- if (ic != (iconv_t) -1) {
- ret = e_iconv (ic, &inbuf, &inlen, &outbuf, &outlen);
- if (ret != (size_t) -1) {
- e_iconv (ic, NULL, 0, &outbuf, &outlen);
- *outbuf = 0;
- decoded = g_strdup (outbase);
- }
- e_iconv_close (ic);
- } else {
- w(g_warning ("Cannot decode charset, header display may be corrupt: %s: %s",
- charset, strerror (errno)));
-
- if (!retried) {
- charset = e_iconv_locale_charset ();
- if (!charset)
- charset = "iso-8859-1";
-
- retried = TRUE;
- goto retry;
- }
-
- /* we return the encoded word here because we've got to return valid utf8 */
- decoded = g_strndup (in, inlen);
- }
- }
- }
-
- d(printf("decoded '%s'\n", decoded));
-
- return decoded;
-}
-
-/* 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, size_t 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, size_t inlen, const char *charset)
-{
- char *outbase, *outbuf;
- size_t outlen;
- iconv_t ic;
-
- ic = e_iconv_open ("UTF-8", charset);
- if (ic == (iconv_t) -1)
- return FALSE;
-
- outlen = inlen * 6 + 16;
- outbuf = outbase = g_malloc(outlen);
-
- if (e_iconv (ic, &inbuf, &inlen, &outbuf, &outlen) == (size_t) -1) {
- w(g_warning("Conversion to '%s' failed: %s", charset, strerror (errno)));
- g_free(outbase);
- e_iconv_close (ic);
- return FALSE;
- }
-
- e_iconv (ic, NULL, NULL, &outbuf, &outlen);
-
- *outbuf = 0;
- g_string_append(out, outbase);
- g_free(outbase);
- e_iconv_close (ic);
-
- return TRUE;
-
-}
-
-/* decodes a simple text, rfc822 + rfc2047 */
-static char *
-header_decode_text (const char *in, size_t inlen, const char *default_charset)
-{
- GString *out;
- const char *inptr, *inend, *start, *chunk, *locale_charset;
- char *dword = NULL;
-
- locale_charset = e_iconv_locale_charset ();
-
- out = g_string_new ("");
- inptr = in;
- inend = inptr + inlen;
- chunk = NULL;
-
- while (inptr < inend) {
- start = inptr;
- while (inptr < inend && camel_mime_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);
- } else {
- chunk = start;
- }
-
- start = inptr;
- while (inptr < inend && !camel_mime_is_lwsp(*inptr))
- inptr++;
-
- dword = rfc2047_decode_word(start, inptr-start);
- if (dword) {
- g_string_append(out, dword);
- g_free(dword);
- } else {
- if (!chunk)
- chunk = start;
-
- if ((default_charset == NULL || !append_8bit (out, chunk, inptr-chunk, default_charset))
- && (locale_charset == NULL || !append_8bit(out, chunk, inptr-chunk, locale_charset)))
- append_latin1(out, chunk, inptr-chunk);
- }
-
- chunk = NULL;
- }
-
- dword = out->str;
- g_string_free (out, FALSE);
-
- return dword;
-}
-
-char *
-camel_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, size_t 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 = g_alloca (bufflen);
- inlen = len;
- inptr = in;
-
- ascii = g_alloca (bufflen);
-
- if (strcasecmp (type, "UTF-8") != 0)
- ic = e_iconv_open (type, "UTF-8");
-
- while (inlen) {
- size_t convlen, proclen;
- int i;
-
- /* 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 (e_iconv (ic, &inptr, &convlen, &out, &outlen) == (size_t) -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 */
- e_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)
- e_iconv_close (ic);
-}
-
-
-/* TODO: Should this worry about quotes?? */
-char *
-camel_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", CAMEL_MIME_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), CAMEL_MIME_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", CAMEL_MIME_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), CAMEL_MIME_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, size_t 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 (!camel_mime_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;
-}
-
-#define MERGED_WORD_LT_FOLDLEN(wordlen, type) ((type) == WORD_2047 ? (wordlen) < CAMEL_FOLD_PREENCODED : (wordlen) < (CAMEL_FOLD_SIZE - 8))
-
-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 (MERGED_WORD_LT_FOLDLEN (next->end - word->start, MAX (word->type, next->type))) {
- /* 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_list_free_1 (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 *
-camel_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;
- size_t 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", CAMEL_MIME_IS_PSAFE);
- else
- rfc2047_encode_word (out, start, len,
- camel_charset_best (start, len), CAMEL_MIME_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 (camel_mime_is_ttoken (*inptr))
- inptr++;
- if (inptr > start) {
- *in = inptr;
- return g_strndup (start, inptr - start);
- } else {
- return NULL;
- }
-}
-
-char *
-camel_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;
- size_t 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 (camel_mime_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 (camel_mime_is_ttoken(*inptr)) {
- d(printf("decoding token\n"));
- /* this may not have the right specials for all params? */
- return decode_token(in);
- }
- return NULL;
-}
-
-/* should this return -1 for no int? */
-int
-camel_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, size_t len)
-{
- const unsigned char *inend = in + len;
- unsigned char *inptr, *outptr;
- char *outbuf;
-
- outptr = outbuf = g_malloc (len + 1);
-
- inptr = (unsigned char *) 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, size_t 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 = e_iconv_charset_name (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;
- size_t inlen, outlen;
- iconv_t ic;
-
- inbuf = decword = hex_decode (inptr, inend - inptr);
- inlen = strlen (inbuf);
-
- ic = e_iconv_open ("UTF-8", charset);
- if (ic != (iconv_t) -1) {
- size_t ret;
-
- outlen = inlen * 6 + 16;
- outbuf = outbase = g_malloc (outlen);
-
- ret = e_iconv (ic, &inbuf, &inlen, &outbuf, &outlen);
- if (ret != (size_t) -1) {
- e_iconv (ic, NULL, 0, &outbuf, &outlen);
- *outbuf = '\0';
- g_free (decoded);
- decoded = outbase;
- }
-
- e_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 (camel_mime_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, gboolean *is_encoded, int *part)
-{
- gboolean is_rfc2184 = FALSE;
- const char *inptr = *in;
- char *param;
-
- *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 (is_encoded)
- *is_encoded = TRUE;
- } else {
- /* form := param*#=value or param*#*=value */
- *part = camel_header_decode_int (&inptr);
- header_decode_lwsp (&inptr);
- if (*inptr == '*') {
- /* form := param*#*=value */
- if (is_encoded)
- *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, int *rfc2184_part)
-{
- gboolean is_rfc2184_encoded = FALSE;
- gboolean is_rfc2184 = FALSE;
- const char *inptr = *in;
- char *param = NULL;
- char *value = NULL;
-
- *is_rfc2184_param = FALSE;
- *rfc2184_part = -1;
-
- is_rfc2184 = header_decode_rfc2184_param (&inptr, &param, &is_rfc2184_encoded, rfc2184_part);
-
- if (*inptr == '=') {
- inptr++;
- value = header_decode_value (&inptr);
-
- if (value && 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 && !strncmp (value, "=?", 2)) {
- /* 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;
- size_t inlen, outlen;
- iconv_t ic;
-
- inbuf = value;
- inlen = strlen (inbuf);
-
- charset = e_iconv_locale_charset ();
- ic = e_iconv_open ("UTF-8", charset ? charset : "ISO-8859-1");
- if (ic != (iconv_t) -1) {
- size_t ret;
-
- outlen = inlen * 6 + 16;
- outbuf = outbase = g_malloc (outlen);
-
- ret = e_iconv (ic, &inbuf, &inlen, &outbuf, &outlen);
- if (ret != (size_t) -1) {
- e_iconv (ic, NULL, 0, &outbuf, &outlen);
- *outbuf = '\0';
- }
-
- e_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 *
-camel_header_param (struct _camel_header_param *p, const char *name)
-{
- while (p && strcasecmp (p->name, name) != 0)
- p = p->next;
- if (p)
- return p->value;
- return NULL;
-}
-
-struct _camel_header_param *
-camel_header_set_param (struct _camel_header_param **l, const char *name, const char *value)
-{
- struct _camel_header_param *p = (struct _camel_header_param *)l, *pn;
-
- if (name == NULL)
- return NULL;
-
- 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 *
-camel_content_type_param (CamelContentType *t, const char *name)
-{
- if (t==NULL)
- return NULL;
- return camel_header_param (t->params, name);
-}
-
-void
-camel_content_type_set_param (CamelContentType *t, const char *name, const char *value)
-{
- camel_header_set_param (&t->params, name, value);
-}
-
-/**
- * camel_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
-camel_content_type_is(CamelContentType *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
-camel_header_param_list_free(struct _camel_header_param *p)
-{
- struct _camel_header_param *n;
-
- while (p) {
- n = p->next;
- g_free(p->name);
- g_free(p->value);
- g_free(p);
- p = n;
- }
-}
-
-CamelContentType *
-camel_content_type_new(const char *type, const char *subtype)
-{
- CamelContentType *t = g_malloc(sizeof(*t));
-
- t->type = g_strdup(type);
- t->subtype = g_strdup(subtype);
- t->params = NULL;
- t->refcount = 1;
- return t;
-}
-
-void
-camel_content_type_ref(CamelContentType *ct)
-{
- if (ct)
- ct->refcount++;
-}
-
-
-void
-camel_content_type_unref(CamelContentType *ct)
-{
- if (ct) {
- if (ct->refcount <= 1) {
- camel_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_c(domain, '[');
- inptr++;
- header_decode_lwsp(&inptr);
- start = inptr;
- while (camel_mime_is_dtext(*inptr)) {
- domain = g_string_append_c(domain, *inptr);
- inptr++;
- }
- if (*inptr == ']') {
- domain = g_string_append_c(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 _camel_header_address *
-header_decode_mailbox(const char **in, const char *charset)
-{
- const char *inptr = *in;
- char *pre;
- int closeme = FALSE;
- GString *addr;
- GString *name = NULL;
- struct _camel_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 = camel_header_decode_string (pre, charset);
- g_string_append (name, text);
- last = pre;
- g_free(text);
-
- pre = header_decode_word (&inptr);
- if (pre) {
- size_t l = strlen (last);
- size_t 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 */
- while (!pre && *inptr && *inptr != '<') {
- w(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);
- addr = g_string_append_c(addr, '.');
- if (pre)
- 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 (*inptr != '>' || !closeme) {
- /* If we get a <, the address was probably a name part, lets try again shall we? */
- /* Another fix for seriously-broken-mailers */
- if (*inptr && *inptr != ',') {
- char *text;
-
- w(g_warning("We didn't get an '@' where we expected in '%s', trying again", *in));
- w(g_warning("Name is '%s', Addr is '%s' we're at '%s'\n", name?name->str:"<UNSET>", addr->str, inptr));
-
- /* need to keep *inptr, as try_address_again will drop the current character */
- if (*inptr == '<')
- closeme = TRUE;
- else
- g_string_append_c(addr, *inptr);
-
- /* check for address is encoded word ... */
- text = camel_header_decode_string(addr->str, charset);
- if (name == NULL) {
- name = addr;
- addr = g_string_new("");
- if (text) {
- g_string_truncate(name, 0);
- g_string_append(name, text);
- }
- } else {
- g_string_append(name, text?text:addr->str);
- g_string_truncate(addr, 0);
- }
- g_free(text);
-
- /* or maybe that we've added up a bunch of broken bits to make an encoded word */
- text = rfc2047_decode_word(name->str, name->len);
- if (text) {
- g_string_truncate(name, 0);
- g_string_append(name, text);
- g_free(text);
- }
-
- 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 = camel_header_decode_string (tmp, charset);
- name = g_string_new (text);
- g_free (tmp);
- g_free (text);
- }
- }
- }
-
- *in = inptr;
-
- if (addr->len > 0) {
- if (!g_utf8_validate (addr->str, addr->len, NULL)) {
- /* workaround for invalid addr-specs containing 8bit chars (see bug #42170 for details) */
- const char *locale_charset;
- GString *out;
-
- locale_charset = e_iconv_locale_charset ();
-
- out = g_string_new ("");
-
- if ((charset == NULL || !append_8bit (out, addr->str, addr->len, charset))
- && (locale_charset == NULL || !append_8bit (out, addr->str, addr->len, locale_charset)))
- append_latin1 (out, addr->str, addr->len);
-
- g_string_free (addr, TRUE);
- addr = out;
- }
-
- address = camel_header_address_new_name(name ? name->str : "", addr->str);
- }
-
- d(printf("got mailbox: %s\n", addr->str));
-
- g_string_free(addr, TRUE);
- if (name)
- g_string_free(name, TRUE);
-
- return address;
-}
-
-static struct _camel_header_address *
-header_decode_address(const char **in, const char *charset)
-{
- const char *inptr = *in;
- char *pre;
- GString *group = g_string_new("");
- struct _camel_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 = camel_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, charset);
- if (member)
- camel_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, charset);
- }
-
- 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 *
-camel_header_msgid_decode(const char *in)
-{
- if (in == NULL)
- return NULL;
-
- return header_msgid_decode_internal(&in);
-}
-
-char *
-camel_header_contentid_decode (const char *in)
-{
- const char *inptr = in;
- gboolean at = FALSE;
- GString *addr;
- char *buf;
-
- d(printf("decoding Content-ID: '%s'\n", in));
-
- header_decode_lwsp (&inptr);
-
- /* some lame mailers quote the Content-Id */
- if (*inptr == '"')
- inptr++;
-
- /* make sure the content-id is not "" which can happen if we get a
- * content-id such as <.@> (which Eudora likes to use...) */
- if ((buf = camel_header_msgid_decode (inptr)) != NULL && *buf)
- return buf;
-
- g_free (buf);
-
- /* ugh, not a valid msg-id - try to get something useful out of it then? */
- inptr = in;
- header_decode_lwsp (&inptr);
- if (*inptr == '<') {
- inptr++;
- header_decode_lwsp (&inptr);
- }
-
- /* Eudora has been known to use <.@> as a content-id */
- if (!(buf = header_decode_word (&inptr)) && !strchr (".@", *inptr))
- return NULL;
-
- addr = g_string_new ("");
- header_decode_lwsp (&inptr);
- while (buf != NULL || *inptr == '.' || (*inptr == '@' && !at)) {
- if (buf != NULL) {
- g_string_append (addr, buf);
- g_free (buf);
- buf = NULL;
- }
-
- if (!at) {
- if (*inptr == '.') {
- g_string_append_c (addr, *inptr++);
- buf = header_decode_word (&inptr);
- } else if (*inptr == '@') {
- g_string_append_c (addr, *inptr++);
- buf = header_decode_word (&inptr);
- at = TRUE;
- }
- } else if (strchr (".[]", *inptr)) {
- g_string_append_c (addr, *inptr++);
- buf = header_decode_atom (&inptr);
- }
-
- header_decode_lwsp (&inptr);
- }
-
- buf = addr->str;
- g_string_free (addr, FALSE);
-
- return buf;
-}
-
-void
-camel_header_references_list_append_asis(struct _camel_header_references **list, char *ref)
-{
- struct _camel_header_references *w = (struct _camel_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
-camel_header_references_list_size(struct _camel_header_references **list)
-{
- int count = 0;
- struct _camel_header_references *w = *list;
- while (w) {
- count++;
- w = w->next;
- }
- return count;
-}
-
-void
-camel_header_references_list_clear(struct _camel_header_references **list)
-{
- struct _camel_header_references *w = *list, *n;
- while (w) {
- n = w->next;
- g_free(w->id);
- g_free(w);
- w = n;
- }
- *list = NULL;
-}
-
-static void
-header_references_decode_single (const char **in, struct _camel_header_references **head)
-{
- struct _camel_header_references *ref;
- const char *inptr = *in;
- char *id, *word;
-
- while (*inptr) {
- header_decode_lwsp (&inptr);
- if (*inptr == '<') {
- id = header_msgid_decode_internal (&inptr);
- if (id) {
- ref = g_malloc (sizeof (struct _camel_header_references));
- ref->next = *head;
- ref->id = id;
- *head = ref;
- break;
- }
- } else {
- word = header_decode_word (&inptr);
- if (word)
- g_free (word);
- else if (*inptr != '\0')
- inptr++; /* Stupid mailer tricks */
- }
- }
-
- *in = inptr;
-}
-
-struct _camel_header_references *
-camel_header_references_inreplyto_decode (const char *in)
-{
- struct _camel_header_references *ref = NULL;
-
- if (in == NULL || in[0] == '\0')
- return NULL;
-
- header_references_decode_single (&in, &ref);
-
- return ref;
-}
-
-/* generate a list of references, from most recent up */
-struct _camel_header_references *
-camel_header_references_decode (const char *in)
-{
- struct _camel_header_references *refs = NULL;
-
- if (in == NULL || in[0] == '\0')
- return NULL;
-
- while (*in)
- header_references_decode_single (&in, &refs);
-
- return refs;
-}
-
-struct _camel_header_references *
-camel_header_references_dup(const struct _camel_header_references *list)
-{
- struct _camel_header_references *new = NULL, *tmp;
-
- while (list) {
- tmp = g_new(struct _camel_header_references, 1);
- tmp->next = new;
- tmp->id = g_strdup(list->id);
- new = tmp;
- list = list->next;
- }
- return new;
-}
-
-struct _camel_header_address *
-camel_header_mailbox_decode(const char *in, const char *charset)
-{
- if (in == NULL)
- return NULL;
-
- return header_decode_mailbox(&in, charset);
-}
-
-struct _camel_header_address *
-camel_header_address_decode(const char *in, const char *charset)
-{
- const char *inptr = in, *last;
- struct _camel_header_address *list = NULL, *addr;
-
- d(printf("decoding To: '%s'\n", in));
-
- if (in == NULL)
- return NULL;
-
- header_decode_lwsp(&inptr);
- if (*inptr == 0)
- return NULL;
-
- do {
- last = inptr;
- addr = header_decode_address(&inptr, charset);
- if (addr)
- camel_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;
-}
-
-/* this must be kept in sync with the header */
-static const char *encodings[] = {
- "",
- "7bit",
- "8bit",
- "base64",
- "quoted-printable",
- "binary",
- "x-uuencode",
-};
-
-const char *
-camel_transfer_encoding_to_string (CamelTransferEncoding encoding)
-{
- if (encoding >= sizeof (encodings) / sizeof (encodings[0]))
- encoding = 0;
-
- return encodings[encoding];
-}
-
-CamelTransferEncoding
-camel_transfer_encoding_from_string (const char *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_TRANSFER_ENCODING_DEFAULT;
-}
-
-void
-camel_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 = camel_header_decode_int(&inptr);
- header_decode_lwsp(&inptr);
- if (*inptr == '.') {
- inptr++;
- header_decode_lwsp(&inptr);
- if (isdigit(*inptr))
- minor = camel_header_decode_int(&inptr);
- }
- }
- }
-
- if (maj)
- *maj = major;
- if (min)
- *min = minor;
-
- d(printf("major = %d, minor = %d\n", major, minor));
-}
-
-static struct _camel_header_param *
-header_decode_param_list (const char **in)
-{
- const char *inptr = *in;
- struct _camel_header_param *head = NULL, *tail = NULL;
- gboolean last_was_rfc2184 = FALSE;
- gboolean is_rfc2184 = FALSE;
-
- header_decode_lwsp (&inptr);
-
- while (*inptr == ';') {
- struct _camel_header_param *param;
- char *name, *value;
- int rfc2184_part;
-
- inptr++;
- /* invalid format? */
- if (header_decode_param (&inptr, &name, &value, &is_rfc2184, &rfc2184_part) != 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.
- */
- /* FIXME: we should be ordering these based on rfc2184_part id */
- 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 _camel_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 _camel_header_param *
-camel_header_param_list_decode(const char *in)
-{
- if (in == NULL)
- return NULL;
-
- return header_decode_param_list(&in);
-}
-
-
-static char *
-header_encode_param (const unsigned char *in, gboolean *encoded)
-{
- register const unsigned char *inptr = in;
- unsigned char *outbuf = NULL;
- const unsigned char *inend;
- iconv_t cd = (iconv_t) -1;
- const char *charset;
- char *outstr;
- 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);
-
- inptr = in;
- encoding = 0;
- while (inptr && *inptr) {
- const char *newinptr;
- gunichar c;
-
- 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);
- } else if (c >= 256) {
- encoding = MAX (encoding, 2);
- }
-
- inptr = newinptr;
- }
-
- if (encoding == 2)
- charset = camel_charset_best (in, inptr - in);
- else
- charset = "iso-8859-1";
-
- if (strcasecmp (charset, "UTF-8") != 0)
- cd = e_iconv_open (charset, "UTF-8");
-
- if (cd == (iconv_t) -1) {
- charset = "UTF-8";
- inptr = in;
- inend = inptr + strlen (in);
- } else {
- size_t inleft, outleft;
- const char *inbuf;
- char *outptr;
-
- inleft = (inptr - in);
- outleft = inleft * 6 + 20;
- outptr = outbuf = g_malloc (outleft);
- inbuf = in;
-
- if (e_iconv (cd, &inbuf, &inleft, &outptr, &outleft) == (size_t) -1) {
- w(g_warning ("Conversion problem: conversion truncated: %s", strerror (errno)));
- } else {
- e_iconv (cd, NULL, 0, &outptr, &outleft);
- }
-
- e_iconv_close (cd);
-
- inptr = outbuf;
- inend = outptr;
- }
-
- /* FIXME: set the 'language' as well, assuming we can get that info...? */
- out = g_string_new ("");
- g_string_append_printf (out, "%s''", charset);
-
- while (inptr < inend) {
- unsigned char c = *inptr++;
-
- /* FIXME: make sure that '\'', '*', and ';' are also encoded */
-
- if (c > 127) {
- g_string_append_printf (out, "%%%c%c", tohex[(c >> 4) & 0xf], tohex[c & 0xf]);
- } else if (camel_mime_is_lwsp (c) || !(camel_mime_special_table[c] & CAMEL_MIME_IS_ESAFE)) {
- g_string_append_printf (out, "%%%c%c", tohex[(c >> 4) & 0xf], tohex[c & 0xf]);
- } else {
- g_string_append_c (out, c);
- }
- }
-
- g_free (outbuf);
-
- outstr = out->str;
- g_string_free (out, FALSE);
- *encoded = TRUE;
-
- return outstr;
-}
-
-void
-camel_header_param_list_format_append (GString *out, struct _camel_header_param *p)
-{
- int used = out->len;
-
- while (p) {
- gboolean encoded = FALSE;
- gboolean quote = FALSE;
- int here = out->len;
- size_t nlen, vlen;
- char *value;
-
- if (!p->value) {
- p = p->next;
- continue;
- }
-
- value = header_encode_param (p->value, &encoded);
- if (!value) {
- w(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 (camel_mime_is_tspecial (*ch) || camel_mime_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_append_printf (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_append_printf (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 *
-camel_header_param_list_format(struct _camel_header_param *p)
-{
- GString *out = g_string_new("");
- char *ret;
-
- camel_header_param_list_format_append(out, p);
- ret = out->str;
- g_string_free(out, FALSE);
- return ret;
-}
-
-CamelContentType *
-camel_content_type_decode(const char *in)
-{
- const char *inptr = in;
- char *type, *subtype = NULL;
- CamelContentType *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 = camel_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
-camel_content_type_dump(CamelContentType *ct)
-{
- struct _camel_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 *
-camel_content_type_format (CamelContentType *ct)
-{
- GString *out;
- char *ret;
-
- if (ct == NULL)
- return NULL;
-
- out = g_string_new ("");
- if (ct->type == NULL) {
- g_string_append_printf (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_append_printf (out, "%s/mixed", ct->type);
- else
- g_string_append_printf (out, "%s", ct->type);
- } else {
- g_string_append_printf (out, "%s/%s", ct->type, ct->subtype);
- }
- camel_header_param_list_format_append (out, ct->params);
-
- ret = out->str;
- g_string_free (out, FALSE);
-
- return ret;
-}
-
-char *
-camel_content_type_simple (CamelContentType *ct)
-{
- if (ct->type == NULL) {
- w(g_warning ("Content-Type with no main type"));
- return g_strdup ("text/plain");
- } else if (ct->subtype == NULL) {
- w(g_warning ("Content-Type with no sub type: %s", ct->type));
- if (!strcasecmp (ct->type, "multipart"))
- return g_strdup_printf ("%s/mixed", ct->type);
- else
- return g_strdup (ct->type);
- } else
- return g_strdup_printf ("%s/%s", ct->type, ct->subtype);
-}
-
-char *
-camel_content_transfer_encoding_decode (const char *in)
-{
- if (in)
- return decode_token (&in);
-
- return NULL;
-}
-
-CamelContentDisposition *
-camel_content_disposition_decode(const char *in)
-{
- CamelContentDisposition *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
-camel_content_disposition_ref(CamelContentDisposition *d)
-{
- if (d)
- d->refcount++;
-}
-
-void
-camel_content_disposition_unref(CamelContentDisposition *d)
-{
- if (d) {
- if (d->refcount<=1) {
- camel_header_param_list_free(d->params);
- g_free(d->disposition);
- g_free(d);
- } else {
- d->refcount--;
- }
- }
-}
-
-char *
-camel_content_disposition_format(CamelContentDisposition *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");
- camel_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"
-};
-
-static char *tz_days [] = {
- "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
-};
-
-char *
-camel_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)));
-
- gmtime_r (&time, &tm);
-
- return g_strdup_printf("%s, %02d %s %04d %02d:%02d:%02d %+05d",
- tz_days[tm.tm_wday],
- 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
-camel_header_decode_date(const char *in, int *saveoffset)
-{
- const char *inptr = in;
- char *monthname;
- gboolean foundmonth;
- 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
- return parse_broken_date (in, saveoffset);
-#else
- if (saveoffset)
- *saveoffset = 0;
- return 0;
-#endif /* ! CLEAN_DATE */
- }
- }
- }
- tm.tm_mday = camel_header_decode_int(&inptr);
-#ifndef CLEAN_DATE
- if (tm.tm_mday == 0) {
- return parse_broken_date (in, saveoffset);
- }
-#endif /* ! CLEAN_DATE */
-
- monthname = decode_token(&inptr);
- foundmonth = FALSE;
- if (monthname) {
- for (i=0;i<sizeof(tz_months)/sizeof(tz_months[0]);i++) {
- if (!strcasecmp(tz_months[i], monthname)) {
- tm.tm_mon = i;
- foundmonth = TRUE;
- break;
- }
- }
- g_free(monthname);
- }
-#ifndef CLEAN_DATE
- if (!foundmonth) {
- return parse_broken_date (in, saveoffset);
- }
-#endif /* ! CLEAN_DATE */
-
- year = camel_header_decode_int(&inptr);
- if (year < 69) {
- tm.tm_year = 100 + year;
- } else if (year < 100) {
- tm.tm_year = year;
- } else if (year >= 100 && year < 1900) {
- tm.tm_year = year;
- } else {
- tm.tm_year = year - 1900;
- }
- /* get the time ... yurck */
- tm.tm_hour = camel_header_decode_int(&inptr);
- header_decode_lwsp(&inptr);
- if (*inptr == ':')
- inptr++;
- tm.tm_min = camel_header_decode_int(&inptr);
- header_decode_lwsp(&inptr);
- if (*inptr == ':')
- inptr++;
- tm.tm_sec = camel_header_decode_int(&inptr);
- header_decode_lwsp(&inptr);
- if (*inptr == '+'
- || *inptr == '-') {
- offset = (*inptr++)=='-'?-1:1;
- offset = offset * camel_header_decode_int(&inptr);
- d(printf("abs signed offset = %d\n", offset));
- if (offset < -1200 || offset > 1400)
- offset = 0;
- } else if (isdigit(*inptr)) {
- offset = camel_header_decode_int(&inptr);
- d(printf("abs offset = %d\n", offset));
- if (offset < -1200 || offset > 1400)
- offset = 0;
- } 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 + (camel_header_decode_int(&inptr)*sign);
- }
- d(printf("named offset = %d\n", offset));
- }
-
- t = e_mktime_utc(&tm);
-
- /* 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 = camel_header_format_date(t, offset);
- printf(" encoded again: %s\n", tmp);
- g_free(tmp);
- });
-
- if (saveoffset)
- *saveoffset = offset;
-
- return t;
-}
-
-char *
-camel_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 && !camel_mime_is_lwsp(*p); p++)
- ;
- return g_strndup(in, p - in);
- }
-}
-
-
-/* extra rfc checks */
-#define CHECKS
-
-#ifdef CHECKS
-static void
-check_header(struct _camel_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
-camel_header_raw_append_parse(struct _camel_header_raw **list, const char *header, int offset)
-{
- register const char *in;
- size_t fieldlen;
- char *name;
-
- in = header;
- while (camel_mime_is_fieldname(*in) || *in==':')
- in++;
- fieldlen = in-header-1;
- while (camel_mime_is_lwsp(*in))
- in++;
- if (fieldlen == 0 || header[fieldlen] != ':') {
- printf("Invalid header line: '%s'\n", header);
- return;
- }
- name = g_alloca (fieldlen + 1);
- memcpy(name, header, fieldlen);
- name[fieldlen] = 0;
-
- camel_header_raw_append(list, name, in, offset);
-}
-
-void
-camel_header_raw_append(struct _camel_header_raw **list, const char *name, const char *value, int offset)
-{
- struct _camel_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 _camel_header_raw *)list;
- while (l->next) {
- l = l->next;
- }
- l->next = n;
-
- /* debug */
-#if 0
- if (!strcasecmp(name, "To")) {
- printf("- Decoding To\n");
- camel_header_to_decode(value);
- } else if (!strcasecmp(name, "Content-type")) {
- printf("- Decoding content-type\n");
- camel_content_type_dump(camel_content_type_decode(value));
- } else if (!strcasecmp(name, "MIME-Version")) {
- printf("- Decoding mime version\n");
- camel_header_mime_decode(value);
- }
-#endif
-}
-
-static struct _camel_header_raw *
-header_raw_find_node(struct _camel_header_raw **list, const char *name)
-{
- struct _camel_header_raw *l;
-
- l = *list;
- while (l) {
- if (!strcasecmp(l->name, name))
- break;
- l = l->next;
- }
- return l;
-}
-
-const char *
-camel_header_raw_find(struct _camel_header_raw **list, const char *name, int *offset)
-{
- struct _camel_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 *
-camel_header_raw_find_next(struct _camel_header_raw **list, const char *name, int *offset, const char *last)
-{
- struct _camel_header_raw *l;
-
- if (last == NULL || name == NULL)
- return NULL;
-
- l = *list;
- while (l && l->value != last)
- l = l->next;
- return camel_header_raw_find(&l, name, offset);
-}
-
-static void
-header_raw_free(struct _camel_header_raw *l)
-{
- g_free(l->name);
- g_free(l->value);
- g_free(l);
-}
-
-void
-camel_header_raw_remove(struct _camel_header_raw **list, const char *name)
-{
- struct _camel_header_raw *l, *p;
-
- /* the next pointer is at the head of the structure, so this is safe */
- p = (struct _camel_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
-camel_header_raw_replace(struct _camel_header_raw **list, const char *name, const char *value, int offset)
-{
- camel_header_raw_remove(list, name);
- camel_header_raw_append(list, name, value, offset);
-}
-
-void
-camel_header_raw_clear(struct _camel_header_raw **list)
-{
- struct _camel_header_raw *l, *n;
- l = *list;
- while (l) {
- n = l->next;
- header_raw_free(l);
- l = n;
- }
- *list = NULL;
-}
-
-char *
-camel_header_msgid_generate (void)
-{
- 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)
- char host[MAXHOSTNAMELEN];
- struct hostent *h = NULL;
- static int count = 0;
- char *msgid;
- int retval;
-
- retval = gethostname (host, sizeof (host));
-
- if (retval == 0 && *host)
- h = camel_gethostbyname (host, NULL);
- else
- host[0] = '\0';
-
- COUNT_LOCK ();
- msgid = g_strdup_printf ("%d.%d.%d.camel@%s", (int) time (NULL), getpid (), count++,
- h ? h->h_name : (*host ? host : "localhost.localdomain"));
- COUNT_UNLOCK ();
-
- if (h)
- camel_free_host (h);
-
- return msgid;
-}
-
-
-static struct {
- char *name;
- char *pattern;
- regex_t regex;
-} mail_list_magic[] = {
- /* List-Post: <mailto:gnome-hackers@gnome.org> */
- /* List-Post: <mailto:gnome-hackers> */
- { "List-Post", "[ \t]*<mailto:([^@>]+)@?([^ \n\t\r>]*)" },
- /* List-Id: GNOME stuff <gnome-hackers.gnome.org> */
- /* List-Id: <gnome-hackers.gnome.org> */
- /* List-Id: <gnome-hackers> */
- /* This old one wasn't very useful: { "List-Id", " *([^<]+)" },*/
- { "List-Id", "[^<]*<([^\\.>]+)\\.?([^ \n\t\r>]*)" },
- /* Mailing-List: list gnome-hackers@gnome.org; contact gnome-hackers-owner@gnome.org */
- { "Mailing-List", "[ \t]*list ([^@]+)@?([^ \n\t\r>;]*)" },
- /* Originator: gnome-hackers@gnome.org */
- { "Originator", "[ \t]*([^@]+)@?([^ \n\t\r>]*)" },
- /* X-Mailing-List: <gnome-hackers@gnome.org> arcive/latest/100 */
- /* X-Mailing-List: gnome-hackers@gnome.org */
- /* X-Mailing-List: gnome-hackers */
- /* X-Mailing-List: <gnome-hackers> */
- { "X-Mailing-List", "[ \t]*<?([^@>]+)@?([^ \n\t\r>]*)" },
- /* X-Loop: gnome-hackers@gnome.org */
- { "X-Loop", "[ \t]*([^@]+)@?([^ \n\t\r>]*)" },
- /* X-List: gnome-hackers */
- /* X-List: gnome-hackers@gnome.org */
- { "X-List", "[ \t]*([^@]+)@?([^ \n\t\r>]*)" },
- /* Sender: owner-gnome-hackers@gnome.org */
- /* Sender: owner-gnome-hacekrs */
- { "Sender", "[ \t]*owner-([^@]+)@?([^ @\n\t\r>]*)" },
- /* Sender: gnome-hackers-owner@gnome.org */
- /* Sender: gnome-hackers-owner */
- { "Sender", "[ \t]*([^@]+)-owner@?([^ @\n\t\r>]*)" },
- /* Delivered-To: mailing list gnome-hackers@gnome.org */
- /* Delivered-To: mailing list gnome-hackers */
- { "Delivered-To", "[ \t]*mailing list ([^@]+)@?([^ \n\t\r>]*)" },
- /* Sender: owner-gnome-hackers@gnome.org */
- /* Sender: <owner-gnome-hackers@gnome.org> */
- /* Sender: owner-gnome-hackers */
- /* Sender: <owner-gnome-hackers> */
- { "Return-Path", "[ \t]*<?owner-([^@>]+)@?([^ \n\t\r>]*)" },
- /* X-BeenThere: gnome-hackers@gnome.org */
- /* X-BeenThere: gnome-hackers */
- { "X-BeenThere", "[ \t]*([^@]+)@?([^ \n\t\r>]*)" },
- /* List-Unsubscribe: <mailto:gnome-hackers-unsubscribe@gnome.org> */
- { "List-Unsubscribe", "<mailto:(.+)-unsubscribe@([^ \n\t\r>]*)" },
-};
-
-char *
-camel_header_raw_check_mailing_list(struct _camel_header_raw **list)
-{
- const char *v;
- regmatch_t match[3];
- int i;
-
- for (i = 0; i < sizeof (mail_list_magic) / sizeof (mail_list_magic[0]); i++) {
- v = camel_header_raw_find (list, mail_list_magic[i].name, NULL);
- if (v != NULL && regexec (&mail_list_magic[i].regex, v, 3, match, 0) == 0 && match[1].rm_so != -1) {
- char *list;
- int len1, len2;
-
- len1 = match[1].rm_eo - match[1].rm_so;
- len2 = match[2].rm_eo - match[2].rm_so;
-
- list = g_malloc(len1+len2+2);
- memcpy(list, v + match[1].rm_so, len1);
- if (len2) {
- list[len1] = '@';
- memcpy(list+len1+1, v+match[2].rm_so, len2);
- list[len1+len2+1]=0;
- } else {
- list[len1] = 0;
- }
-
- return list;
- }
- }
-
- return NULL;
-}
-
-/* ok, here's the address stuff, what a mess ... */
-struct _camel_header_address *
-camel_header_address_new (void)
-{
- struct _camel_header_address *h;
- h = g_malloc0(sizeof(*h));
- h->type = HEADER_ADDRESS_NONE;
- h->refcount = 1;
- return h;
-}
-
-struct _camel_header_address *
-camel_header_address_new_name(const char *name, const char *addr)
-{
- struct _camel_header_address *h;
- h = camel_header_address_new();
- h->type = HEADER_ADDRESS_NAME;
- h->name = g_strdup(name);
- h->v.addr = g_strdup(addr);
- return h;
-}
-
-struct _camel_header_address *
-camel_header_address_new_group (const char *name)
-{
- struct _camel_header_address *h;
-
- h = camel_header_address_new();
- h->type = HEADER_ADDRESS_GROUP;
- h->name = g_strdup(name);
- return h;
-}
-
-void
-camel_header_address_ref(struct _camel_header_address *h)
-{
- if (h)
- h->refcount++;
-}
-
-void
-camel_header_address_unref(struct _camel_header_address *h)
-{
- if (h) {
- if (h->refcount <= 1) {
- if (h->type == HEADER_ADDRESS_GROUP) {
- camel_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
-camel_header_address_set_name(struct _camel_header_address *h, const char *name)
-{
- if (h) {
- g_free(h->name);
- h->name = g_strdup(name);
- }
-}
-
-void
-camel_header_address_set_addr(struct _camel_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
-camel_header_address_set_members(struct _camel_header_address *h, struct _camel_header_address *group)
-{
- if (h) {
- if (h->type == HEADER_ADDRESS_GROUP
- || h->type == HEADER_ADDRESS_NONE) {
- h->type = HEADER_ADDRESS_GROUP;
- camel_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
-camel_header_address_add_member(struct _camel_header_address *h, struct _camel_header_address *member)
-{
- if (h) {
- if (h->type == HEADER_ADDRESS_GROUP
- || h->type == HEADER_ADDRESS_NONE) {
- h->type = HEADER_ADDRESS_GROUP;
- camel_header_address_list_append(&h->v.members, member);
- }
- }
-}
-
-void
-camel_header_address_list_append_list(struct _camel_header_address **l, struct _camel_header_address **h)
-{
- if (l) {
- struct _camel_header_address *n = (struct _camel_header_address *)l;
-
- while (n->next)
- n = n->next;
- n->next = *h;
- }
-}
-
-
-void
-camel_header_address_list_append(struct _camel_header_address **l, struct _camel_header_address *h)
-{
- if (h) {
- camel_header_address_list_append_list(l, &h);
- h->next = NULL;
- }
-}
-
-void
-camel_header_address_list_clear(struct _camel_header_address **l)
-{
- struct _camel_header_address *a, *n;
- a = *l;
- while (a) {
- n = a->next;
- camel_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 _camel_header_address *a)
-{
- char *text;
-
- while (a) {
- switch (a->type) {
- case HEADER_ADDRESS_NAME:
- if (encode)
- text = camel_header_encode_phrase (a->name);
- else
- text = a->name;
- if (text && *text)
- g_string_append_printf (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 = camel_header_encode_phrase (a->name);
- else
- text = a->name;
- g_string_append_printf (out, "%s: ", text);
- header_address_list_encode_append (out, encode, a->v.members);
- g_string_append_printf (out, ";");
- if (encode)
- g_free (text);
- break;
- default:
- g_warning ("Invalid address type");
- break;
- }
- a = a->next;
- if (a)
- g_string_append (out, ", ");
- }
-}
-
-char *
-camel_header_address_list_encode (struct _camel_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 *
-camel_header_address_list_format (struct _camel_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 *
-camel_header_address_fold (const char *in, size_t headerlen)
-{
- size_t len, outlen;
- const char *inptr = in, *space, *p, *n;
- GString *out;
- char *ret;
- int i, 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 = camel_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 *
-camel_header_fold(const char *in, size_t headerlen)
-{
- size_t 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 = camel_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_MAX_SIZE) {
- for (i=0;i<CAMEL_FOLD_MAX_SIZE-outlen;i++)
- g_string_append_c(out, inptr[i]);
- inptr += CAMEL_FOLD_MAX_SIZE-outlen;
- len -= CAMEL_FOLD_MAX_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 *
-camel_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 (camel_mime_is_lwsp(*inptr)) {
- do {
- inptr++;
- } while (camel_mime_is_lwsp(*inptr));
- *o++ = ' ';
- } else {
- *o++ = c;
- }
- } else {
- *o++ = c;
- }
- }
- *o = 0;
-
- return out;
-}
-
-void
-camel_mime_utils_init(void)
-{
- int i, errcode, regex_compilation_failed=0;
-
- /* Init tables */
- header_decode_init();
- base64_init();
-
- /* precompile regex's for speed at runtime */
- for (i = 0; i < sizeof(mail_list_magic) / sizeof(mail_list_magic[0]); i++) {
- errcode = regcomp(&mail_list_magic[i].regex, mail_list_magic[i].pattern, REG_EXTENDED|REG_ICASE);
- if (errcode != 0) {
- char *errstr;
- size_t len;
-
- len = regerror(errcode, &mail_list_magic[i].regex, NULL, 0);
- errstr = g_malloc0(len + 1);
- regerror(errcode, &mail_list_magic[i].regex, errstr, len);
-
- g_warning("Internal error, compiling regex failed: %s: %s", mail_list_magic[i].pattern, errstr);
- g_free(errstr);
- regex_compilation_failed++;
- }
- }
-
- g_assert(regex_compilation_failed == 0);
-}
diff --git a/camel/camel-mime-utils.h b/camel/camel-mime-utils.h
deleted file mode 100644
index efa5b7835a..0000000000
--- a/camel/camel-mime-utils.h
+++ /dev/null
@@ -1,273 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2003 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_UTILS_H
-#define _CAMEL_MIME_UTILS_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <time.h>
-#include <glib.h>
-
-/* maximum recommended size of a line from camel_header_fold() */
-#define CAMEL_FOLD_SIZE (77)
-/* maximum hard size of a line from camel_header_fold() */
-#define CAMEL_FOLD_MAX_SIZE (998)
-
-#define CAMEL_UUDECODE_STATE_INIT (0)
-#define CAMEL_UUDECODE_STATE_BEGIN (1 << 16)
-#define CAMEL_UUDECODE_STATE_END (1 << 17)
-#define CAMEL_UUDECODE_STATE_MASK (CAMEL_UUDECODE_STATE_BEGIN | CAMEL_UUDECODE_STATE_END)
-
-/* note, if you change this, make sure you change the 'encodings' array in camel-mime-part.c */
-typedef enum _CamelTransferEncoding {
- CAMEL_TRANSFER_ENCODING_DEFAULT,
- CAMEL_TRANSFER_ENCODING_7BIT,
- CAMEL_TRANSFER_ENCODING_8BIT,
- CAMEL_TRANSFER_ENCODING_BASE64,
- CAMEL_TRANSFER_ENCODING_QUOTEDPRINTABLE,
- CAMEL_TRANSFER_ENCODING_BINARY,
- CAMEL_TRANSFER_ENCODING_UUENCODE,
- CAMEL_TRANSFER_NUM_ENCODINGS
-} CamelTransferEncoding;
-
-/* a list of references for this message */
-struct _camel_header_references {
- struct _camel_header_references *next;
- char *id;
-};
-
-struct _camel_header_param {
- struct _camel_header_param *next;
- char *name;
- char *value;
-};
-
-/* describes a content-type */
-typedef struct {
- char *type;
- char *subtype;
- struct _camel_header_param *params;
- unsigned int refcount;
-} CamelContentType;
-
-/* a raw rfc822 header */
-/* the value MUST be US-ASCII */
-struct _camel_header_raw {
- struct _camel_header_raw *next;
- char *name;
- char *value;
- int offset; /* in file, if known */
-};
-
-typedef struct _CamelContentDisposition {
- char *disposition;
- struct _camel_header_param *params;
- unsigned int refcount;
-} CamelContentDisposition;
-
-enum _camel_header_address_t {
- HEADER_ADDRESS_NONE, /* uninitialised */
- HEADER_ADDRESS_NAME,
- HEADER_ADDRESS_GROUP
-};
-
-struct _camel_header_address {
- struct _camel_header_address *next;
- enum _camel_header_address_t type;
- char *name;
- union {
- char *addr;
- struct _camel_header_address *members;
- } v;
- unsigned int refcount;
-};
-
-/* MUST be called before everything else */
-void camel_mime_utils_init(void);
-
-/* Address lists */
-struct _camel_header_address *camel_header_address_new (void);
-struct _camel_header_address *camel_header_address_new_name (const char *name, const char *addr);
-struct _camel_header_address *camel_header_address_new_group (const char *name);
-void camel_header_address_ref (struct _camel_header_address *);
-void camel_header_address_unref (struct _camel_header_address *);
-void camel_header_address_set_name (struct _camel_header_address *, const char *name);
-void camel_header_address_set_addr (struct _camel_header_address *, const char *addr);
-void camel_header_address_set_members (struct _camel_header_address *, struct _camel_header_address *group);
-void camel_header_address_add_member (struct _camel_header_address *, struct _camel_header_address *member);
-void camel_header_address_list_append_list (struct _camel_header_address **l, struct _camel_header_address **h);
-void camel_header_address_list_append (struct _camel_header_address **, struct _camel_header_address *);
-void camel_header_address_list_clear (struct _camel_header_address **);
-
-struct _camel_header_address *camel_header_address_decode (const char *in, const char *charset);
-struct _camel_header_address *camel_header_mailbox_decode (const char *in, const char *charset);
-/* for mailing */
-char *camel_header_address_list_encode (struct _camel_header_address *a);
-/* for display */
-char *camel_header_address_list_format (struct _camel_header_address *a);
-
-/* structured header prameters */
-struct _camel_header_param *camel_header_param_list_decode (const char *in);
-char *camel_header_param (struct _camel_header_param *p, const char *name);
-struct _camel_header_param *camel_header_set_param (struct _camel_header_param **l, const char *name, const char *value);
-void camel_header_param_list_format_append (GString *out, struct _camel_header_param *p);
-char *camel_header_param_list_format (struct _camel_header_param *p);
-void camel_header_param_list_free (struct _camel_header_param *p);
-
-/* Content-Type header */
-CamelContentType *camel_content_type_new (const char *type, const char *subtype);
-CamelContentType *camel_content_type_decode (const char *in);
-void camel_content_type_unref (CamelContentType *ct);
-void camel_content_type_ref (CamelContentType *ct);
-const char *camel_content_type_param (CamelContentType *t, const char *name);
-void camel_content_type_set_param (CamelContentType *t, const char *name, const char *value);
-int camel_content_type_is (CamelContentType *ct, const char *type, const char *subtype);
-char *camel_content_type_format (CamelContentType *ct);
-char *camel_content_type_simple (CamelContentType *ct);
-
-/* DEBUGGING function */
-void camel_content_type_dump (CamelContentType *ct);
-
-/* Content-Disposition header */
-CamelContentDisposition *camel_content_disposition_decode (const char *in);
-void camel_content_disposition_ref (CamelContentDisposition *);
-void camel_content_disposition_unref (CamelContentDisposition *);
-char *camel_content_disposition_format (CamelContentDisposition *d);
-
-/* decode the contents of a content-encoding header */
-char *camel_content_transfer_encoding_decode (const char *in);
-
-/* raw headers */
-void camel_header_raw_append (struct _camel_header_raw **list, const char *name, const char *value, int offset);
-void camel_header_raw_append_parse (struct _camel_header_raw **list, const char *header, int offset);
-const char *camel_header_raw_find (struct _camel_header_raw **list, const char *name, int *offset);
-const char *camel_header_raw_find_next (struct _camel_header_raw **list, const char *name, int *offset, const char *last);
-void camel_header_raw_replace (struct _camel_header_raw **list, const char *name, const char *value, int offset);
-void camel_header_raw_remove (struct _camel_header_raw **list, const char *name);
-void camel_header_raw_fold (struct _camel_header_raw **list);
-void camel_header_raw_clear (struct _camel_header_raw **list);
-
-char *camel_header_raw_check_mailing_list (struct _camel_header_raw **list);
-
-/* fold a header */
-char *camel_header_address_fold (const char *in, size_t headerlen);
-char *camel_header_fold (const char *in, size_t headerlen);
-char *camel_header_unfold (const char *in);
-
-/* decode a header which is a simple token */
-char *camel_header_token_decode (const char *in);
-
-int camel_header_decode_int (const char **in);
-
-/* decode/encode a string type, like a subject line */
-char *camel_header_decode_string (const char *in, const char *default_charset);
-char *camel_header_encode_string (const unsigned char *in);
-
-/* encode a phrase, like the real name of an address */
-char *camel_header_encode_phrase (const unsigned char *in);
-
-/* decode an email date field into a GMT time, + optional offset */
-time_t camel_header_decode_date (const char *in, int *saveoffset);
-char *camel_header_format_date (time_t time, int offset);
-
-/* decode a message id */
-char *camel_header_msgid_decode (const char *in);
-char *camel_header_contentid_decode (const char *in);
-
-/* generate msg id */
-char *camel_header_msgid_generate (void);
-
-/* decode a References or In-Reply-To header */
-struct _camel_header_references *camel_header_references_inreplyto_decode (const char *in);
-struct _camel_header_references *camel_header_references_decode (const char *in);
-void camel_header_references_list_clear (struct _camel_header_references **list);
-void camel_header_references_list_append_asis (struct _camel_header_references **list, char *ref);
-int camel_header_references_list_size (struct _camel_header_references **list);
-struct _camel_header_references *camel_header_references_dup (const struct _camel_header_references *list);
-
-/* decode content-location */
-char *camel_header_location_decode (const char *in);
-
-const char *camel_transfer_encoding_to_string (CamelTransferEncoding encoding);
-CamelTransferEncoding camel_transfer_encoding_from_string (const char *string);
-
-/* decode the mime-type header */
-void camel_header_mime_decode (const char *in, int *maj, int *min);
-
-/* do incremental base64/quoted-printable (de/en)coding */
-size_t camel_base64_decode_step (unsigned char *in, size_t len, unsigned char *out, int *state, unsigned int *save);
-
-size_t camel_base64_encode_step (unsigned char *in, size_t len, gboolean break_lines, unsigned char *out, int *state, int *save);
-size_t camel_base64_encode_close (unsigned char *in, size_t len, gboolean break_lines, unsigned char *out, int *state, int *save);
-
-size_t camel_uudecode_step (unsigned char *in, size_t len, unsigned char *out, int *state, guint32 *save);
-
-size_t camel_uuencode_step (unsigned char *in, size_t len, unsigned char *out, unsigned char *uubuf, int *state,
- guint32 *save);
-size_t camel_uuencode_close (unsigned char *in, size_t len, unsigned char *out, unsigned char *uubuf, int *state,
- guint32 *save);
-
-size_t camel_quoted_decode_step (unsigned char *in, size_t len, unsigned char *out, int *savestate, int *saveme);
-
-size_t camel_quoted_encode_step (unsigned char *in, size_t len, unsigned char *out, int *state, int *save);
-size_t camel_quoted_decode_close (unsigned char *in, size_t len, unsigned char *out, int *state, int *save);
-
-char *camel_base64_encode_simple (const char *data, size_t len);
-size_t camel_base64_decode_simple (char *data, size_t len);
-
-/* camel ctype type functions for rfc822/rfc2047/other, which are non-locale specific */
-enum {
- CAMEL_MIME_IS_CTRL = 1<<0,
- CAMEL_MIME_IS_LWSP = 1<<1,
- CAMEL_MIME_IS_TSPECIAL = 1<<2,
- CAMEL_MIME_IS_SPECIAL = 1<<3,
- CAMEL_MIME_IS_SPACE = 1<<4,
- CAMEL_MIME_IS_DSPECIAL = 1<<5,
- CAMEL_MIME_IS_QPSAFE = 1<<6,
- CAMEL_MIME_IS_ESAFE = 1<<7, /* encoded word safe */
- CAMEL_MIME_IS_PSAFE = 1<<8, /* encoded word in phrase safe */
-};
-
-extern unsigned short camel_mime_special_table[256];
-
-#define camel_mime_is_ctrl(x) ((camel_mime_special_table[(unsigned char)(x)] & CAMEL_MIME_IS_CTRL) != 0)
-#define camel_mime_is_lwsp(x) ((camel_mime_special_table[(unsigned char)(x)] & CAMEL_MIME_IS_LWSP) != 0)
-#define camel_mime_is_tspecial(x) ((camel_mime_special_table[(unsigned char)(x)] & CAMEL_MIME_IS_TSPECIAL) != 0)
-#define camel_mime_is_type(x, t) ((camel_mime_special_table[(unsigned char)(x)] & (t)) != 0)
-#define camel_mime_is_ttoken(x) ((camel_mime_special_table[(unsigned char)(x)] & (CAMEL_MIME_IS_TSPECIAL|CAMEL_MIME_IS_LWSP|CAMEL_MIME_IS_CTRL)) == 0)
-#define camel_mime_is_atom(x) ((camel_mime_special_table[(unsigned char)(x)] & (CAMEL_MIME_IS_SPECIAL|CAMEL_MIME_IS_SPACE|CAMEL_MIME_IS_CTRL)) == 0)
-#define camel_mime_is_dtext(x) ((camel_mime_special_table[(unsigned char)(x)] & CAMEL_MIME_IS_DSPECIAL) == 0)
-#define camel_mime_is_fieldname(x) ((camel_mime_special_table[(unsigned char)(x)] & (CAMEL_MIME_IS_CTRL|CAMEL_MIME_IS_SPACE)) == 0)
-#define camel_mime_is_qpsafe(x) ((camel_mime_special_table[(unsigned char)(x)] & CAMEL_MIME_IS_QPSAFE) != 0)
-#define camel_mime_is_especial(x) ((camel_mime_special_table[(unsigned char)(x)] & CAMEL_MIME_IS_ESPECIAL) != 0)
-#define camel_mime_is_psafe(x) ((camel_mime_special_table[(unsigned char)(x)] & CAMEL_MIME_IS_PSAFE) != 0)
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* ! _CAMEL_MIME_UTILS_H */
diff --git a/camel/camel-movemail.c b/camel/camel-movemail.c
deleted file mode 100644
index 70807195e5..0000000000
--- a/camel/camel-movemail.c
+++ /dev/null
@@ -1,542 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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, g_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, g_strerror (errno));
- return -1;
- }
-
- dfd = open (dest, O_WRONLY | O_CREAT | O_APPEND, S_IRUSR | S_IWUSR);
- if (dfd == -1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not open temporary mail "
- "file %s: %s"), dest,
- g_strerror (errno));
- close (sfd);
- return -1;
- }
-
- /* 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, g_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"),
- g_strerror (errno));
- return;
- }
-
- pid = fork ();
- switch (pid) {
- case -1:
- close (fd[0]);
- close (fd[1]);
- sigprocmask (SIG_SETMASK, &omask, NULL);
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not fork: %s"),
- g_strerror (errno));
- return;
-
- case 0:
- /* Child */
- close (fd[0]);
- close (STDIN_FILENO);
- dup2 (fd[1], STDOUT_FILENO);
- dup2 (fd[1], STDERR_FILENO);
-
- execl (MOVEMAIL_PATH, MOVEMAIL_PATH, source, dest, NULL);
- _exit (255);
- break;
-
- default:
- break;
- }
-
- /* Parent */
- close (fd[1]);
-
- /* Read movemail's output. */
- while ((nread = read (fd[0], buf, sizeof (buf))) > 0) {
- output = g_realloc (output, len + nread + 1);
- memcpy (output + len, buf, nread);
- len += nread;
- output[len] = '\0';
- }
- close (fd[0]);
-
- /* Now get the exit status. */
- while (waitpid (pid, &status, 0) == -1 && errno == EINTR)
- ;
- sigprocmask (SIG_SETMASK, &omask, NULL);
-
- if (!WIFEXITED (status) || WEXITSTATUS (status) != 0) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Movemail program failed: %s"),
- output ? output : _("(Unknown error)"));
- }
- g_free (output);
-}
-#endif
-
-#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"),
- g_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"),
- g_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 _camel_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"),
- g_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) == CAMEL_MIME_PARSER_STATE_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) != CAMEL_MIME_PARSER_STATE_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"),
- g_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 3e5206f672..0000000000
--- a/camel/camel-movemail.h
+++ /dev/null
@@ -1,44 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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-encrypted.c b/camel/camel-multipart-encrypted.c
deleted file mode 100644
index aa036bec23..0000000000
--- a/camel/camel-multipart-encrypted.c
+++ /dev/null
@@ -1,273 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2002 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-multipart-encrypted.h"
-#include "camel-mime-filter-crlf.h"
-#include "camel-stream-filter.h"
-#include "camel-stream-mem.h"
-#include "camel-stream-fs.h"
-#include "camel-mime-utils.h"
-#include "camel-mime-part.h"
-
-static void camel_multipart_encrypted_class_init (CamelMultipartEncryptedClass *klass);
-static void camel_multipart_encrypted_init (gpointer object, gpointer klass);
-static void camel_multipart_encrypted_finalize (CamelObject *object);
-
-static void set_mime_type_field (CamelDataWrapper *data_wrapper, CamelContentType *mime_type);
-
-
-static CamelMultipartClass *parent_class = NULL;
-
-
-CamelType
-camel_multipart_encrypted_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_multipart_get_type (),
- "CamelMultipartEncrypted",
- sizeof (CamelMultipartEncrypted),
- sizeof (CamelMultipartEncryptedClass),
- (CamelObjectClassInitFunc) camel_multipart_encrypted_class_init,
- NULL,
- (CamelObjectInitFunc) camel_multipart_encrypted_init,
- (CamelObjectFinalizeFunc) camel_multipart_encrypted_finalize);
- }
-
- return type;
-}
-
-
-static void
-camel_multipart_encrypted_class_init (CamelMultipartEncryptedClass *klass)
-{
- CamelDataWrapperClass *camel_data_wrapper_class = CAMEL_DATA_WRAPPER_CLASS (klass);
-
- parent_class = (CamelMultipartClass *) camel_multipart_get_type ();
-
- /* virtual method overload */
- camel_data_wrapper_class->set_mime_type_field = set_mime_type_field;
-}
-
-static void
-camel_multipart_encrypted_init (gpointer object, gpointer klass)
-{
- CamelMultipartEncrypted *multipart = (CamelMultipartEncrypted *) object;
-
- camel_data_wrapper_set_mime_type (CAMEL_DATA_WRAPPER (multipart), "multipart/encrypted");
-
- multipart->decrypted = NULL;
-}
-
-static void
-camel_multipart_encrypted_finalize (CamelObject *object)
-{
- CamelMultipartEncrypted *mpe = (CamelMultipartEncrypted *) object;
-
- g_free (mpe->protocol);
-
- if (mpe->decrypted)
- camel_object_unref (mpe->decrypted);
-}
-
-/* we snoop the mime type to get the protocol */
-static void
-set_mime_type_field (CamelDataWrapper *data_wrapper, CamelContentType *mime_type)
-{
- CamelMultipartEncrypted *mpe = (CamelMultipartEncrypted *) data_wrapper;
-
- if (mime_type) {
- const char *protocol;
-
- protocol = camel_content_type_param (mime_type, "protocol");
- g_free (mpe->protocol);
- mpe->protocol = g_strdup (protocol);
- }
-
- ((CamelDataWrapperClass *) parent_class)->set_mime_type_field (data_wrapper, mime_type);
-}
-
-
-/**
- * camel_multipart_encrypted_new:
- *
- * Create a new CamelMultipartEncrypted object.
- *
- * A MultipartEncrypted should be used to store and create parts of
- * type "multipart/encrypted".
- *
- * Returns a new CamelMultipartEncrypted
- **/
-CamelMultipartEncrypted *
-camel_multipart_encrypted_new (void)
-{
- CamelMultipartEncrypted *multipart;
-
- multipart = (CamelMultipartEncrypted *) camel_object_new (CAMEL_MULTIPART_ENCRYPTED_TYPE);
-
- return multipart;
-}
-
-
-int
-camel_multipart_encrypted_encrypt (CamelMultipartEncrypted *mpe, CamelMimePart *content,
- CamelCipherContext *cipher, const char *userid,
- GPtrArray *recipients, CamelException *ex)
-{
- abort();
-
-#if 0
- CamelMimePart *version_part, *encrypted_part;
- CamelContentType *mime_type;
- CamelDataWrapper *wrapper;
- CamelStream *stream;
-
- g_return_val_if_fail (CAMEL_IS_MULTIPART_ENCRYPTED (mpe), -1);
- g_return_val_if_fail (CAMEL_IS_CIPHER_CONTEXT (cipher), -1);
- g_return_val_if_fail (cipher->encrypt_protocol != NULL, -1);
- g_return_val_if_fail (CAMEL_IS_MIME_PART (content), -1);
-
- /* encrypt the content stream */
- encrypted_part = camel_mime_part_new();
- if (camel_cipher_encrypt (cipher, userid, recipients, content, encrypted_part, ex) == -1) {
- camel_object_unref(encrypted_part);
- return -1;
- }
-
- /* construct the version part */
- stream = camel_stream_mem_new ();
- camel_stream_write_string (stream, "Version: 1\n");
- camel_stream_reset (stream);
-
- version_part = camel_mime_part_new ();
- wrapper = camel_data_wrapper_new ();
- camel_data_wrapper_set_mime_type (wrapper, cipher->encrypt_protocol);
- camel_data_wrapper_construct_from_stream (wrapper, stream);
- camel_object_unref (stream);
- camel_medium_set_content_object ((CamelMedium *) version_part, wrapper);
- camel_object_unref (wrapper);
-
- /* save the version and encrypted parts */
- /* FIXME: make sure there aren't any other parts?? */
- camel_multipart_add_part (CAMEL_MULTIPART (mpe), version_part);
- camel_object_unref (version_part);
- camel_multipart_add_part (CAMEL_MULTIPART (mpe), encrypted_part);
- camel_object_unref (encrypted_part);
-
- /* cache the decrypted content */
- camel_object_ref (content);
- mpe->decrypted = content;
-
- /* set the content-type params for this multipart/encrypted part */
- mime_type = camel_content_type_new ("multipart", "encrypted");
- camel_content_type_set_param (mime_type, "protocol", cipher->encrypt_protocol);
- camel_data_wrapper_set_mime_type_field (CAMEL_DATA_WRAPPER (mpe), mime_type);
- camel_content_type_unref (mime_type);
- camel_multipart_set_boundary ((CamelMultipart *) mpe, NULL);
-#endif
-
- return 0;
-}
-
-
-CamelMimePart *
-camel_multipart_encrypted_decrypt (CamelMultipartEncrypted *mpe,
- CamelCipherContext *cipher,
- CamelException *ex)
-{
- CamelMimePart *version_part, *encrypted_part, *decrypted_part;
- CamelContentType *mime_type;
- CamelCipherValidity *valid;
- CamelDataWrapper *wrapper;
- const char *protocol;
- char *content_type;
-
- g_return_val_if_fail (CAMEL_IS_MULTIPART_ENCRYPTED (mpe), NULL);
- g_return_val_if_fail (CAMEL_IS_CIPHER_CONTEXT (cipher), NULL);
- g_return_val_if_fail (cipher->encrypt_protocol != NULL, NULL);
-
- if (mpe->decrypted) {
- /* we seem to have already decrypted the part */
- camel_object_ref (mpe->decrypted);
- return mpe->decrypted;
- }
-
- protocol = mpe->protocol;
-
- if (protocol) {
- /* make sure the protocol matches the cipher encrypt protocol */
- if (g_ascii_strcasecmp (cipher->encrypt_protocol, protocol) != 0) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to decrypt MIME part: protocol error"));
-
- return NULL;
- }
- } else {
- /* *shrug* - I guess just go on as if they match? */
- protocol = cipher->encrypt_protocol;
- }
-
- /* make sure the protocol matches the version part's content-type */
- version_part = camel_multipart_get_part (CAMEL_MULTIPART (mpe), CAMEL_MULTIPART_ENCRYPTED_VERSION);
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (version_part));
- content_type = camel_data_wrapper_get_mime_type (wrapper);
- if (g_ascii_strcasecmp (content_type, protocol) != 0) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to decrypt MIME part: protocol error"));
-
- g_free (content_type);
-
- return NULL;
- }
- g_free (content_type);
-
- /* get the encrypted part (second part) */
- encrypted_part = camel_multipart_get_part (CAMEL_MULTIPART (mpe), CAMEL_MULTIPART_ENCRYPTED_CONTENT);
- mime_type = camel_mime_part_get_content_type (encrypted_part);
- if (!camel_content_type_is (mime_type, "application", "octet-stream")) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to decrypt MIME part: invalid structure"));
- return NULL;
- }
-
- decrypted_part = camel_mime_part_new();
- valid = camel_cipher_decrypt(cipher, encrypted_part, decrypted_part, ex);
- if (valid) {
- camel_object_ref(decrypted_part);
- mpe->decrypted = decrypted_part;
- camel_cipher_validity_free(valid);
- } else {
- camel_object_ref(decrypted_part);
- decrypted_part = NULL;
- }
-
- return decrypted_part;
-}
diff --git a/camel/camel-multipart-encrypted.h b/camel/camel-multipart-encrypted.h
deleted file mode 100644
index 94bcb792cf..0000000000
--- a/camel/camel-multipart-encrypted.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2002 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_MULTIPART_ENCRYPTED_H__
-#define __CAMEL_MULTIPART_ENCRYPTED_H__
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <camel/camel-multipart.h>
-#include <camel/camel-cipher-context.h>
-
-#define CAMEL_MULTIPART_ENCRYPTED_TYPE (camel_multipart_encrypted_get_type ())
-#define CAMEL_MULTIPART_ENCRYPTED(obj) (CAMEL_CHECK_CAST((obj), CAMEL_MULTIPART_ENCRYPTED_TYPE, CamelMultipartEncrypted))
-#define CAMEL_MULTIPART_ENCRYPTED_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_MULTIPART_ENCRYPTED_TYPE, CamelMultipartEncryptedClass))
-#define CAMEL_IS_MULTIPART_ENCRYPTED(o) (CAMEL_CHECK_TYPE((o), CAMEL_MULTIPART_ENCRYPTED_TYPE))
-
-typedef struct _CamelMultipartEncrypted CamelMultipartEncrypted;
-typedef struct _CamelMultipartEncryptedClass CamelMultipartEncryptedClass;
-
-/* 'handy' enums for getting the internal parts of the multipart */
-enum {
- CAMEL_MULTIPART_ENCRYPTED_VERSION,
- CAMEL_MULTIPART_ENCRYPTED_CONTENT,
-};
-
-struct _CamelMultipartEncrypted {
- CamelMultipart parent_object;
-
- CamelMimePart *version;
- CamelMimePart *content;
- CamelMimePart *decrypted;
-
- char *protocol;
-};
-
-
-struct _CamelMultipartEncryptedClass {
- CamelMultipartClass parent_class;
-
-};
-
-
-CamelType camel_multipart_encrypted_get_type (void);
-
-
-CamelMultipartEncrypted *camel_multipart_encrypted_new (void);
-
-int camel_multipart_encrypted_encrypt (CamelMultipartEncrypted *mpe, CamelMimePart *content,
- CamelCipherContext *cipher, const char *userid,
- GPtrArray *recipients, CamelException *ex);
-
-CamelMimePart *camel_multipart_encrypted_decrypt (CamelMultipartEncrypted *mpe,
- CamelCipherContext *cipher,
- CamelException *ex);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __CAMEL_MULTIPART_ENCRYPTED_H__ */
diff --git a/camel/camel-multipart-signed.c b/camel/camel-multipart-signed.c
deleted file mode 100644
index 5dca448a7f..0000000000
--- a/camel/camel-multipart-signed.c
+++ /dev/null
@@ -1,763 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- * camel-multipart.c : Abstract class for a multipart
- *
- * Authors: Michael Zucchi <notzed@ximian.com>
- *
- * Copyright 2002 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 HAVE_ALLOCA_H
-#include <alloca.h>
-#endif
-
-#include <stdio.h>
-
-#include <string.h>
-#include <unistd.h>
-#include <time.h>
-
-#include <errno.h>
-
-#include "camel-mime-part.h"
-#include "camel-mime-message.h"
-#include "camel-mime-parser.h"
-#include "camel-stream-mem.h"
-#include "camel-multipart-signed.h"
-#include "camel-mime-part.h"
-#include "camel-exception.h"
-#include "md5-utils.h"
-
-#include "camel-stream-filter.h"
-#include "camel-seekable-substream.h"
-#include "camel-mime-filter-crlf.h"
-#include "camel-mime-filter-canon.h"
-
-#define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))
- #include <stdio.h>;*/
-
-static void signed_add_part (CamelMultipart *multipart, CamelMimePart *part);
-static void signed_add_part_at (CamelMultipart *multipart, CamelMimePart *part, guint index);
-static void signed_remove_part (CamelMultipart *multipart, CamelMimePart *part);
-static CamelMimePart *signed_remove_part_at (CamelMultipart *multipart, guint index);
-static CamelMimePart *signed_get_part (CamelMultipart *multipart, guint index);
-static guint signed_get_number (CamelMultipart *multipart);
-
-static ssize_t write_to_stream (CamelDataWrapper *data_wrapper, CamelStream *stream);
-static void set_mime_type_field (CamelDataWrapper *data_wrapper, CamelContentType *mime_type);
-static int construct_from_stream (CamelDataWrapper *data_wrapper, CamelStream *stream);
-static int signed_construct_from_parser (CamelMultipart *multipart, struct _CamelMimeParser *mp);
-
-static CamelMultipartClass *parent_class = NULL;
-
-/* Returns the class for a CamelMultipartSigned */
-#define CMP_CLASS(so) CAMEL_MULTIPART_SIGNED_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_signed_class_init (CamelMultipartSignedClass *camel_multipart_signed_class)
-{
- CamelDataWrapperClass *camel_data_wrapper_class = CAMEL_DATA_WRAPPER_CLASS(camel_multipart_signed_class);
- CamelMultipartClass *mpclass = (CamelMultipartClass *)camel_multipart_signed_class;
-
- parent_class = (CamelMultipartClass *)camel_multipart_get_type();
-
- /* virtual method overload */
- camel_data_wrapper_class->construct_from_stream = construct_from_stream;
- camel_data_wrapper_class->write_to_stream = write_to_stream;
- camel_data_wrapper_class->decode_to_stream = write_to_stream;
- camel_data_wrapper_class->set_mime_type_field = set_mime_type_field;
-
- mpclass->add_part = signed_add_part;
- mpclass->add_part_at = signed_add_part_at;
- mpclass->remove_part = signed_remove_part;
- mpclass->remove_part_at = signed_remove_part_at;
- mpclass->get_part = signed_get_part;
- mpclass->get_number = signed_get_number;
- mpclass->construct_from_parser = signed_construct_from_parser;
-
-/*
- mpclass->get_boundary = signed_get_boundary;
- mpclass->set_boundary = signed_set_boundary;
-*/
-}
-
-static void
-camel_multipart_signed_init (gpointer object, gpointer klass)
-{
- CamelMultipartSigned *multipart = (CamelMultipartSigned *)object;
-
- camel_data_wrapper_set_mime_type(CAMEL_DATA_WRAPPER(multipart), "multipart/signed");
- multipart->start1 = -1;
-}
-
-static void
-camel_multipart_signed_finalize (CamelObject *object)
-{
- CamelMultipartSigned *mps = (CamelMultipartSigned *)object;
-
- g_free(mps->protocol);
- g_free(mps->micalg);
- if (mps->signature)
- camel_object_unref((CamelObject *)mps->signature);
- if (mps->content)
- camel_object_unref((CamelObject *)mps->content);
- if (mps->contentraw)
- camel_object_unref((CamelObject *)mps->contentraw);
-}
-
-CamelType
-camel_multipart_signed_get_type (void)
-{
- static CamelType camel_multipart_signed_type = CAMEL_INVALID_TYPE;
-
- if (camel_multipart_signed_type == CAMEL_INVALID_TYPE) {
- camel_multipart_signed_type = camel_type_register (camel_multipart_get_type (), "CamelMultipartSigned",
- sizeof (CamelMultipartSigned),
- sizeof (CamelMultipartSignedClass),
- (CamelObjectClassInitFunc) camel_multipart_signed_class_init,
- NULL,
- (CamelObjectInitFunc) camel_multipart_signed_init,
- (CamelObjectFinalizeFunc) camel_multipart_signed_finalize);
- }
-
- return camel_multipart_signed_type;
-}
-
-/**
- * camel_multipart_signed_new:
- *
- * Create a new CamelMultipartSigned object.
- *
- * A MultipartSigned should be used to store and create parts of
- * type "multipart/signed". This is because multipart/signed is
- * entirely broken-by-design (tm) and uses completely
- * different semantics to other mutlipart types. It must be treated
- * as opaque data by any transport. See rfc 3156 for details.
- *
- * There are 3 ways to create the part:
- * Use construct_from_stream. If this is used, then you must
- * set the mime_type appropriately to match the data uses, so
- * that the multiple parts my be extracted.
- *
- * Use construct_from_parser. The parser MUST be in the CAMEL_MIME_PARSER_STATE_HEADER
- * state, and the current content_type MUST be "multipart/signed" with
- * the appropriate boundary and it SHOULD include the appropriate protocol
- * and hash specifiers.
- *
- * Use sign_part. A signature part will automatically be created
- * and the whole part may be written using write_to_stream to
- * create a 'transport-safe' version (as safe as can be expected with
- * such a broken specification).
- *
- * Return value: a new CamelMultipartSigned
- **/
-CamelMultipartSigned *
-camel_multipart_signed_new (void)
-{
- CamelMultipartSigned *multipart;
-
- multipart = (CamelMultipartSigned *)camel_object_new(CAMEL_MULTIPART_SIGNED_TYPE);
-
- return multipart;
-}
-
-/* find the next boundary @bound from @start, return the start of the actual data
- @end points to the end of the data BEFORE the boundary */
-static char *parse_boundary(char *start, const char *bound, char **end)
-{
- char *data, *begin;
-
- begin = strstr(start, bound);
- if (begin == NULL)
- return NULL;
-
- data = begin+strlen(bound);
- if (begin > start && begin[-1] == '\n')
- begin--;
- if (begin > start && begin[-1] == '\r')
- begin--;
- if (data[0] == '\r')
- data++;
- if (data[0] == '\n')
- data++;
-
- *end = begin;
- return data;
-}
-
-/* yeah yuck.
- Well, we could probably use the normal mime parser, but then it would change our
- headers.
- This is good enough ... till its not! */
-static int
-parse_content(CamelMultipartSigned *mps)
-{
- CamelMultipart *mp = (CamelMultipart *)mps;
- char *start, *end, *start2, *end2, *last, *post;
- CamelStreamMem *mem;
- char *bound;
- const char *boundary;
-
- boundary = camel_multipart_get_boundary(mp);
- if (boundary == NULL) {
- g_warning("Trying to get multipart/signed content without setting boundary first");
- return -1;
- }
-
- /* turn it into a string, and 'fix' it up */
- /* this is extremely dodgey but should work! */
- mem = (CamelStreamMem *)((CamelDataWrapper *)mps)->stream;
- if (mem == NULL) {
- g_warning("Trying to parse multipart/signed without constructing first");
- return -1;
- }
-
- camel_stream_write((CamelStream *)mem, "", 1);
- g_byte_array_set_size(mem->buffer, mem->buffer->len-1);
- last = mem->buffer->data + mem->buffer->len;
-
- bound = alloca(strlen(boundary)+5);
- sprintf(bound, "--%s", boundary);
-
- start = parse_boundary(mem->buffer->data, bound, &end);
- if (start == NULL || start[0] == 0)
- return -1;
-
- if (end > (char *)mem->buffer->data) {
- char *tmp = g_strndup(mem->buffer->data, start-(char *)mem->buffer->data-1);
- camel_multipart_set_preface(mp, tmp);
- g_free(tmp);
- }
-
- start2 = parse_boundary(start, bound, &end);
- if (start2 == NULL || start2[0] == 0)
- return -1;
-
- sprintf(bound, "--%s--", boundary);
- post = parse_boundary(start2, bound, &end2);
- if (post == NULL)
- return -1;
-
- if (post[0])
- camel_multipart_set_postface(mp, post);
-
- mps->start1 = start-(char *)mem->buffer->data;
- mps->end1 = end-(char *)mem->buffer->data;
- mps->start2 = start2-(char *)mem->buffer->data;
- mps->end2 = end2-(char *)mem->buffer->data;
-
- return 0;
-}
-
-/* we snoop the mime type to get boundary and hash info */
-static void
-set_mime_type_field(CamelDataWrapper *data_wrapper, CamelContentType *mime_type)
-{
- CamelMultipartSigned *mps = (CamelMultipartSigned *)data_wrapper;
-
- ((CamelDataWrapperClass *)parent_class)->set_mime_type_field(data_wrapper, mime_type);
- if (mime_type) {
- const char *micalg, *protocol;
-
- protocol = camel_content_type_param(mime_type, "protocol");
- g_free(mps->protocol);
- mps->protocol = g_strdup(protocol);
-
- micalg = camel_content_type_param(mime_type, "micalg");
- g_free(mps->micalg);
- mps->micalg = g_strdup(micalg);
- }
-}
-
-static void
-signed_add_part(CamelMultipart *multipart, CamelMimePart *part)
-{
- g_warning("Cannot add parts to a signed part using add_part");
-}
-
-static void
-signed_add_part_at(CamelMultipart *multipart, CamelMimePart *part, guint index)
-{
- g_warning("Cannot add parts to a signed part using add_part_at");
-}
-
-static void
-signed_remove_part(CamelMultipart *multipart, CamelMimePart *part)
-{
- g_warning("Cannot remove parts from a signed part using remove_part");
-}
-
-static CamelMimePart *
-signed_remove_part_at (CamelMultipart *multipart, guint index)
-{
- g_warning("Cannot remove parts from a signed part using remove_part");
- return NULL;
-}
-
-static CamelMimePart *
-signed_get_part(CamelMultipart *multipart, guint index)
-{
- CamelMultipartSigned *mps = (CamelMultipartSigned *)multipart;
- CamelDataWrapper *dw = (CamelDataWrapper *)multipart;
- CamelStream *stream;
-
- switch (index) {
- case CAMEL_MULTIPART_SIGNED_CONTENT:
- if (mps->content)
- return mps->content;
- if (mps->contentraw) {
- stream = mps->contentraw;
- camel_object_ref((CamelObject *)stream);
- } else if (mps->start1 == -1
- && parse_content(mps) == -1
- && (stream = ((CamelDataWrapper *)mps)->stream) == NULL) {
- g_warning("Trying to get content on an invalid multipart/signed");
- return NULL;
- } else if (dw->stream == NULL) {
- return NULL;
- } else if (mps->start1 == -1) {
- stream = dw->stream;
- camel_object_ref(stream);
- } else {
- stream = camel_seekable_substream_new((CamelSeekableStream *)dw->stream, mps->start1, mps->end1);
- }
- camel_stream_reset(stream);
- mps->content = camel_mime_part_new();
- camel_data_wrapper_construct_from_stream((CamelDataWrapper *)mps->content, stream);
- camel_object_unref(stream);
- return mps->content;
- case CAMEL_MULTIPART_SIGNED_SIGNATURE:
- if (mps->signature)
- return mps->signature;
- if (mps->start1 == -1
- && parse_content(mps) == -1) {
- g_warning("Trying to get signature on invalid multipart/signed");
- return NULL;
- } else if (dw->stream == NULL) {
- return NULL;
- }
- stream = camel_seekable_substream_new((CamelSeekableStream *)dw->stream, mps->start2, mps->end2);
- camel_stream_reset(stream);
- mps->signature = camel_mime_part_new();
- camel_data_wrapper_construct_from_stream((CamelDataWrapper *)mps->signature, stream);
- camel_object_unref((CamelObject *)stream);
- return mps->signature;
- default:
- g_warning("trying to get object out of bounds for multipart");
- }
-
- return NULL;
-}
-
-static guint
-signed_get_number(CamelMultipart *multipart)
-{
- CamelDataWrapper *dw = (CamelDataWrapper *)multipart;
- CamelMultipartSigned *mps = (CamelMultipartSigned *)multipart;
-
- /* check what we have, so we return something reasonable */
-
- if ((mps->content || mps->contentraw) && mps->signature)
- return 2;
-
- if (mps->start1 == -1 && parse_content(mps) == -1) {
- if (dw->stream == NULL)
- return 0;
- else
- return 1;
- } else {
- return 2;
- }
-}
-
-static void
-set_stream(CamelMultipartSigned *mps, CamelStream *mem)
-{
- CamelDataWrapper *dw = (CamelDataWrapper *)mps;
-
- if (dw->stream)
- camel_object_unref((CamelObject *)dw->stream);
- dw->stream = (CamelStream *)mem;
-
- mps->start1 = -1;
- if (mps->content) {
- camel_object_unref((CamelObject *)mps->content);
- mps->content = NULL;
- }
- if (mps->contentraw) {
- camel_object_unref((CamelObject *)mps->contentraw);
- mps->contentraw = NULL;
- }
- if (mps->signature) {
- camel_object_unref((CamelObject *)mps->signature);
- mps->signature = NULL;
- }
-}
-
-static int
-construct_from_stream(CamelDataWrapper *data_wrapper, CamelStream *stream)
-{
- CamelMultipartSigned *mps = (CamelMultipartSigned *)data_wrapper;
- CamelStream *mem = camel_stream_mem_new();
-
- if (camel_stream_write_to_stream(stream, mem) == -1)
- return -1;
-
- set_stream(mps, mem);
-
- return 0;
-}
-
-static int
-signed_construct_from_parser(CamelMultipart *multipart, struct _CamelMimeParser *mp)
-{
- int err;
- CamelContentType *content_type;
- CamelMultipartSigned *mps = (CamelMultipartSigned *)multipart;
- char *buf;
- size_t len;
- CamelStream *mem;
-
- /* we *must not* be in multipart state, otherwise the mime parser will
- parse the headers which is a no no @#$@# stupid multipart/signed spec */
- g_assert(camel_mime_parser_state(mp) == CAMEL_MIME_PARSER_STATE_HEADER);
-
- /* All we do is copy it to a memstream */
- content_type = camel_mime_parser_content_type(mp);
- camel_multipart_set_boundary(multipart, camel_content_type_param(content_type, "boundary"));
-
- mem = camel_stream_mem_new();
- while (camel_mime_parser_step(mp, &buf, &len) != CAMEL_MIME_PARSER_STATE_BODY_END)
- camel_stream_write(mem, buf, len);
-
- set_stream(mps, mem);
-
- err = camel_mime_parser_errno(mp);
- if (err != 0) {
- errno = err;
- return -1;
- } else
- return 0;
-}
-
-static ssize_t
-write_to_stream (CamelDataWrapper *data_wrapper, CamelStream *stream)
-{
- CamelMultipartSigned *mps = (CamelMultipartSigned *)data_wrapper;
- CamelMultipart *mp = (CamelMultipart *)mps;
- const char *boundary;
- ssize_t total = 0;
- ssize_t count;
-
- /* we have 3 basic cases:
- 1. constructed, we write out the data wrapper stream we got
- 2. signed content, we create and write out a new stream
- 3. invalid
- */
-
- /* 1 */
- /* FIXME: locking? */
- if (data_wrapper->stream) {
- camel_stream_reset(data_wrapper->stream);
- return camel_stream_write_to_stream(data_wrapper->stream, stream);
- }
-
- /* 3 */
- if (mps->signature == NULL || mps->contentraw == NULL)
- return -1;
-
- /* 2 */
- boundary = camel_multipart_get_boundary(mp);
- if (mp->preface) {
- count = camel_stream_write_string(stream, mp->preface);
- if (count == -1)
- return -1;
- total += count;
- }
-
- /* first boundary */
- count = camel_stream_printf(stream, "\n--%s\n", boundary);
- if (count == -1)
- return -1;
- total += count;
-
- /* output content part */
- camel_stream_reset(mps->contentraw);
- count = camel_stream_write_to_stream(mps->contentraw, stream);
- if (count == -1)
- return -1;
- total += count;
-
- /* boundary */
- count = camel_stream_printf(stream, "\n--%s\n", boundary);
- if (count == -1)
- return -1;
- total += count;
-
- /* signature */
- count = camel_data_wrapper_write_to_stream((CamelDataWrapper *)mps->signature, stream);
- if (count == -1)
- return -1;
- total += count;
-
- /* 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 (mp->postface) {
- count = camel_stream_write_string(stream, mp->postface);
- if (count == -1)
- return -1;
- total += count;
- }
-
- return total;
-}
-
-/* See rfc3156, section 2 and others */
-/* We do this simply: Anything not base64 must be qp
- This is so that we can safely translate any occurance of "From "
- into the quoted-printable escaped version safely. */
-static void
-prepare_sign(CamelMimePart *mime_part)
-{
- CamelDataWrapper *wrapper;
- CamelTransferEncoding encoding;
- 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((CamelMultipart *)wrapper);
- for (i = 0; i < parts; i++)
- prepare_sign(camel_multipart_get_part((CamelMultipart *)wrapper, i));
- } else if (CAMEL_IS_MIME_MESSAGE (wrapper)) {
- prepare_sign((CamelMimePart *)wrapper);
- } else {
- encoding = camel_mime_part_get_encoding(mime_part);
-
- if (encoding != CAMEL_TRANSFER_ENCODING_BASE64
- && encoding != CAMEL_TRANSFER_ENCODING_QUOTEDPRINTABLE) {
- camel_mime_part_set_encoding(mime_part, CAMEL_TRANSFER_ENCODING_QUOTEDPRINTABLE);
- }
- }
-}
-
-/**
- * camel_multipart_signed_sign:
- * @mps:
- * @context: The CipherContext to use for signing.
- * @content: CamelMimePart content you wish to sign/transport.
- * @userid: The id of the signing key to use.
- * @hash: The algorithm to use.
- * @ex:
- *
- * Sign the part @content, and attach it as the first part
- * (CAMEL_MULTIPART_SIGNED_CONTENT) of the multipart @mps. A
- * signature object will be created and setup as the second part
- * (CAMEL_MULTIPART_SIGNED_SIGNATURE) of the object. Once a part has
- * been successfully signed the mutlipart is ready for transmission.
- *
- * This method should be used to create multipart/signed objects
- * which are properly canoncalised before signing, etc.
- *
- * Return value: -1 on error, setting @ex appropriately. On error
- * neither the content or signature parts will be setup.
- **/
-int
-camel_multipart_signed_sign(CamelMultipartSigned *mps, CamelCipherContext *context, CamelMimePart *content, const char *userid, CamelCipherHash hash, CamelException *ex)
-{
- abort();
-#if 0
- CamelMimeFilter *canon_filter;
- CamelStream *mem;
- CamelStreamFilter *filter;
- CamelContentType *mime_type;
- CamelMimePart *sigpart;
-
- /* this needs to be set */
- g_return_val_if_fail(context->sign_protocol != NULL, -1);
-
- prepare_sign(content);
-
- mem = camel_stream_mem_new();
- filter = camel_stream_filter_new_with_stream(mem);
-
- /* Note: see rfc2015 or rfc3156, section 5 */
- canon_filter = camel_mime_filter_canon_new(CAMEL_MIME_FILTER_CANON_STRIP|CAMEL_MIME_FILTER_CANON_CRLF|CAMEL_MIME_FILTER_CANON_FROM);
- camel_stream_filter_add(filter, (CamelMimeFilter *)canon_filter);
- camel_object_unref((CamelObject *)canon_filter);
-
- camel_data_wrapper_write_to_stream((CamelDataWrapper *)content, (CamelStream *)filter);
- camel_stream_flush((CamelStream *)filter);
- camel_object_unref((CamelObject *)filter);
- camel_stream_reset(mem);
-
-#if 0
- printf("-- Signing:\n");
- fwrite(((CamelStreamMem *)mem)->buffer->data, ((CamelStreamMem *)mem)->buffer->len, 1, stdout);
- printf("-- end\n");
-#endif
-
- sigpart = camel_mime_part_new();
-
- if (camel_cipher_sign(context, userid, hash, mem, sigpart, ex) == -1) {
- camel_object_unref(mem);
- camel_object_unref(sigpart);
- return -1;
- }
-
- /* setup our mime type and boundary */
- mime_type = camel_content_type_new("multipart", "signed");
- camel_content_type_set_param(mime_type, "micalg", camel_cipher_hash_to_id(context, hash));
- camel_content_type_set_param(mime_type, "protocol", context->sign_protocol);
- camel_data_wrapper_set_mime_type_field(CAMEL_DATA_WRAPPER (mps), mime_type);
- camel_content_type_unref(mime_type);
- camel_multipart_set_boundary((CamelMultipart *)mps, NULL);
-
- /* just keep the whole raw content. We dont *really* need to do this because
- we know how we just proccessed it, but, well, better to be safe than sorry */
- mps->signature = sigpart;
- mps->contentraw = mem;
- camel_stream_reset(mem);
-
- /* clear the data-wrapper stream - tells write_to_stream to use the right object */
- if (((CamelDataWrapper *)mps)->stream) {
- camel_object_unref((CamelObject *) ((CamelDataWrapper *)mps)->stream);
- ((CamelDataWrapper *)mps)->stream = NULL;
- }
-#endif
- return 0;
-}
-
-CamelStream *
-camel_multipart_signed_get_content_stream(CamelMultipartSigned *mps, CamelException *ex)
-{
- CamelStream *constream;
-
- /* we need to be able to verify stuff we just signed as well as stuff we loaded from a stream/parser */
-
- if (mps->contentraw) {
- constream = mps->contentraw;
- camel_object_ref((CamelObject *)constream);
- } else {
- CamelStream *sub;
- CamelMimeFilter *canon_filter;
-
- if (mps->start1 == -1 && parse_content(mps) == -1) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, _("parse error"));
- return NULL;
- }
-
- /* first, prepare our parts */
- sub = camel_seekable_substream_new((CamelSeekableStream *)((CamelDataWrapper *)mps)->stream, mps->start1, mps->end1);
- constream = (CamelStream *)camel_stream_filter_new_with_stream(sub);
- camel_object_unref((CamelObject *)sub);
-
- /* Note: see rfc2015 or rfc3156, section 5 */
- canon_filter = camel_mime_filter_canon_new (CAMEL_MIME_FILTER_CANON_CRLF);
- camel_stream_filter_add((CamelStreamFilter *)constream, (CamelMimeFilter *)canon_filter);
- camel_object_unref((CamelObject *)canon_filter);
- }
-
- return constream;
-}
-
-/**
- * camel_multipart_signed_verify:
- * @mps:
- * @context:
- * @ex:
- *
- * Verify a signed object. This may be used to verify newly signed
- * objects as well as those created from external streams or parsers.
- *
- * Return value: A validity value, or NULL on error, setting @ex
- * appropriately.
- **/
-CamelCipherValidity *
-camel_multipart_signed_verify(CamelMultipartSigned *mps, CamelCipherContext *context, CamelException *ex)
-{
- abort();
-
- return NULL;
-#if 0
- CamelCipherValidity *valid;
- CamelMimePart *sigpart;
- CamelStream *constream;
-
- /* we need to be able to verify stuff we just signed as well as stuff we loaded from a stream/parser */
-
- if (mps->contentraw) {
- constream = mps->contentraw;
- camel_object_ref((CamelObject *)constream);
- } else {
- CamelStream *sub;
- CamelMimeFilter *canon_filter;
-
- if (mps->start1 == -1 && parse_content(mps) == -1) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, _("parse error"));
- return NULL;
- }
-
- /* first, prepare our parts */
- sub = camel_seekable_substream_new((CamelSeekableStream *)((CamelDataWrapper *)mps)->stream, mps->start1, mps->end1);
- constream = (CamelStream *)camel_stream_filter_new_with_stream(sub);
- camel_object_unref((CamelObject *)sub);
-
- /* Note: see rfc2015 or rfc3156, section 5 */
- canon_filter = camel_mime_filter_canon_new (CAMEL_MIME_FILTER_CANON_CRLF);
- camel_stream_filter_add((CamelStreamFilter *)constream, (CamelMimeFilter *)canon_filter);
- camel_object_unref((CamelObject *)canon_filter);
- }
-
- /* we do this as a normal mime part so we can have it handle transfer encoding etc */
- sigpart = camel_multipart_get_part((CamelMultipart *)mps, CAMEL_MULTIPART_SIGNED_SIGNATURE);
-
- /* do the magic, the caller must supply the right context for this kind of object */
- valid = camel_cipher_verify(context, camel_cipher_id_to_hash(context, mps->micalg), constream, sigpart, ex);
-
-#if 0
- {
- CamelStream *sout = camel_stream_fs_new_with_fd(dup(0));
-
- camel_stream_printf(sout, "-- Verifying:\n");
- camel_stream_reset(constream);
- camel_stream_write_to_stream(constream, sout);
- camel_stream_printf(sout, "-- end\n");
- camel_object_unref((CamelObject *)sout);
- }
-#endif
-
- camel_object_unref(constream);
-
- return valid;
-#endif
-}
-
-
diff --git a/camel/camel-multipart-signed.h b/camel/camel-multipart-signed.h
deleted file mode 100644
index 2b0df64189..0000000000
--- a/camel/camel-multipart-signed.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- * camel-signed--multipart.h : class for a signed-multipart
- *
- * Authors: Michael Zucchi <notzed@ximian.com>
- *
- * Copyright 2002 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-/* Should this be a subclass of multipart?
- No, because we dont have different parts?
- I'm not really sure yet ... ? */
-
-#ifndef CAMEL_MULTIPART_SIGNED_H
-#define CAMEL_MULTIPART_SIGNED_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <camel/camel-multipart.h>
-#include <camel/camel-cipher-context.h>
-
-#define CAMEL_MULTIPART_SIGNED_TYPE (camel_multipart_signed_get_type ())
-#define CAMEL_MULTIPART_SIGNED(obj) (CAMEL_CHECK_CAST((obj), CAMEL_MULTIPART_SIGNED_TYPE, CamelMultipartSigned))
-#define CAMEL_MULTIPART_SIGNED_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_MULTIPART_SIGNED_TYPE, CamelMultipartSignedClass))
-#define CAMEL_IS_MULTIPART_SIGNED(o) (CAMEL_CHECK_TYPE((o), CAMEL_MULTIPART_SIGNED_TYPE))
-
-/*
-enum {
- CAMEL_MULTIPART_EMPTY,
- CAMEL_MULTIPART_CONST,
- CAMEL_MULTIPART_SIGN,
- CAMEL_MULTIPART_ENCR,
-};
-*/
-
-/* 'handy' enums for getting the internal parts of the multipart */
-enum {
- CAMEL_MULTIPART_SIGNED_CONTENT,
- CAMEL_MULTIPART_SIGNED_SIGNATURE,
-};
-
-typedef struct _CamelMultipartSigned CamelMultipartSigned;
-
-struct _CamelMultipartSigned
-{
- CamelMultipart parent_object;
-
- /* these are the client visible parts, decoded forms of our data wrapper content */
- CamelMimePart *content;
- CamelMimePart *signature;
-
- /* the raw content which must go over the wire, if we have generated it */
- /* perhaps this should jsut set data_wrapper->stream and update start1/end1 accordingly, as it is done
- for other parts, or visa versa? */
- CamelStream *contentraw;
-
- /*int state;*/
-
- /* just cache some info we use */
- char *protocol;
- char *micalg;
-
- /* offset pointers of start of boundary in content object */
- off_t start1, end1;
- off_t start2, end2;
-};
-
-typedef struct {
- CamelMultipartClass parent_class;
-} CamelMultipartSignedClass;
-
-/* Standard Camel function */
-CamelType camel_multipart_signed_get_type (void);
-
-/* public methods */
-CamelMultipartSigned *camel_multipart_signed_new (void);
-
-CamelStream *camel_multipart_signed_get_content_stream(CamelMultipartSigned *mps, CamelException *ex);
-
-int camel_multipart_signed_sign (CamelMultipartSigned *mps, CamelCipherContext *context,
- CamelMimePart *content, const char *uiserid,
- CamelCipherHash hash, CamelException *ex);
-CamelCipherValidity *camel_multipart_signed_verify (CamelMultipartSigned *mps, CamelCipherContext *context,
- CamelException *ex);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_MULTIPART_SIGNED_H */
-
-
diff --git a/camel/camel-multipart.c b/camel/camel-multipart.c
deleted file mode 100644
index 3ec60147d5..0000000000
--- a/camel/camel-multipart.c
+++ /dev/null
@@ -1,589 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-multipart.c : Abstract 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <errno.h>
-
-#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 ssize_t write_to_stream (CamelDataWrapper *data_wrapper,
- CamelStream *stream);
-static void unref_part (gpointer data, gpointer user_data);
-
-static int construct_from_parser(CamelMultipart *multipart, struct _CamelMimeParser *mp);
-
-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 = (CamelDataWrapperClass *) 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;
- camel_multipart_class->construct_from_parser = construct_from_parser;
-
- /* virtual method overload */
- camel_data_wrapper_class->write_to_stream = write_to_stream;
- camel_data_wrapper_class->decode_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 = 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 (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 (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 (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 (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 += camel_base64_encode_step (digest, 16, FALSE, p, &state, &save);
- *p = '\0';
-
- boundary = bbuf;
- }
-
- camel_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 camel_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 ssize_t
-write_to_stream (CamelDataWrapper *data_wrapper, CamelStream *stream)
-{
- CamelMultipart *multipart = CAMEL_MULTIPART (data_wrapper);
- const gchar *boundary;
- ssize_t total = 0;
- ssize_t 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, -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;
- }
-}
-
-static int
-construct_from_parser(CamelMultipart *multipart, struct _CamelMimeParser *mp)
-{
- int err;
- CamelContentType *content_type;
- CamelMimePart *bodypart;
- char *buf;
- size_t len;
-
- g_assert(camel_mime_parser_state(mp) == CAMEL_MIME_PARSER_STATE_MULTIPART);
-
- /* FIXME: we should use a came-mime-mutlipart, not jsut a camel-multipart, but who cares */
- d(printf("Creating multi-part\n"));
-
- content_type = camel_mime_parser_content_type(mp);
- camel_multipart_set_boundary(multipart,
- camel_content_type_param(content_type, "boundary"));
-
- while (camel_mime_parser_step(mp, &buf, &len) != CAMEL_MIME_PARSER_STATE_MULTIPART_END) {
- camel_mime_parser_unstep(mp);
- bodypart = camel_mime_part_new();
- camel_mime_part_construct_from_parser(bodypart, mp);
- camel_multipart_add_part(multipart, bodypart);
- camel_object_unref((CamelObject *)bodypart);
- }
-
- /* these are only return valid data in the MULTIPART_END state */
- camel_multipart_set_preface(multipart, camel_mime_parser_preface (mp));
- camel_multipart_set_postface(multipart, camel_mime_parser_postface (mp));
-
- err = camel_mime_parser_errno(mp);
- if (err != 0) {
- errno = err;
- return -1;
- } else
- return 0;
-}
-
-int
-camel_multipart_construct_from_parser(CamelMultipart *multipart, struct _CamelMimeParser *mp)
-{
- g_return_val_if_fail(CAMEL_IS_MULTIPART(multipart), -1);
-
- return CMP_CLASS(multipart)->construct_from_parser(multipart, mp);
-}
diff --git a/camel/camel-multipart.h b/camel/camel-multipart.h
deleted file mode 100644
index ac2e37f540..0000000000
--- a/camel/camel-multipart.h
+++ /dev/null
@@ -1,104 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 _CamelMimeParser;
-
-struct _CamelMultipart
-{
- CamelDataWrapper parent_object;
-
- GList *parts;
- 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);
-
- int (*construct_from_parser)(CamelMultipart *, struct _CamelMimeParser *);
- /*int (*construct_from_stream)(CamelMultipart *, CamelStream *);*/
-
-} 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);
-
-int camel_multipart_construct_from_parser(CamelMultipart *multipart, struct _CamelMimeParser *mp);
-
-#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 c8a170781a..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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-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 ca1505e9a6..0000000000
--- a/camel/camel-news-address.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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_NEWS_ADDRESS_H
-#define _CAMEL_NEWS_ADDRESS_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#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;
-};
-
-CamelType camel_news_address_get_type (void);
-CamelNewsAddress *camel_news_address_new (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* ! _CAMEL_NEWS_ADDRESS_H */
diff --git a/camel/camel-object.c b/camel/camel-object.c
deleted file mode 100644
index 744e9f7566..0000000000
--- a/camel/camel-object.c
+++ /dev/null
@@ -1,1834 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- *
- *
- * Author:
- * Michael Zucchi <notzed@ximian.com>
- *
- * Copyright 2000-2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <pthread.h>
-#include <semaphore.h>
-
-#include "camel-object.h"
-#include "camel-file-utils.h"
-
-#include <e-util/e-memory.h>
-#include <e-util/e-msgport.h>
-
-#define d(x)
-
-/* I just mashed the keyboard for these... */
-#define CAMEL_OBJECT_MAGIC 0x77A344ED
-#define CAMEL_OBJECT_CLASS_MAGIC 0xEE26A997
-#define CAMEL_OBJECT_FINALISED_MAGIC 0x84AC365F
-#define CAMEL_OBJECT_CLASS_FINALISED_MAGIC 0x7621ABCD
-
-/* ** Quickie type system ************************************************* */
-
-/* A 'locked' hooklist, that is only allocated on demand */
-typedef struct _CamelHookList {
- EMutex *lock;
-
- unsigned int depth:30; /* recursive event depth */
- unsigned int flags:2; /* flags, see below */
-
- unsigned int list_length;
- struct _CamelHookPair *list;
-} CamelHookList;
-
-#define CAMEL_HOOK_PAIR_REMOVED (1<<0)
-
-/* 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 */
-
- unsigned int id:30;
- unsigned int flags:2; /* removed, etc */
-
- const char *name; /* points to the key field in the classes preplist, static memory */
- union {
- CamelObjectEventHookFunc event;
- CamelObjectEventPrepFunc prep;
- char *filename;
- } func;
- void *data;
-} CamelHookPair;
-
-struct _CamelObjectBag {
- GHashTable *object_table; /* object by key */
- GHashTable *key_table; /* key by object */
- CamelCopyFunc copy_key;
- GFreeFunc free_key;
- pthread_t owner; /* the thread that has reserved the bag for a new entry */
- sem_t reserve_sem; /* used to track ownership */
-};
-
-/* used to tag a bag hookpair */
-static const char *bag_name = "object:bag";
-
-/* meta-data stuff */
-static void co_metadata_free(CamelObject *obj, CamelObjectMeta *meta);
-static CamelObjectMeta *co_metadata_get(CamelObject *obj);
-static CamelHookPair *co_metadata_pair(CamelObject *obj, int create);
-
-static const char *meta_name = "object:meta";
-#define CAMEL_OBJECT_STATE_FILE_MAGIC "CLMD"
-
-/* ********************************************************************** */
-
-static CamelHookList *camel_object_get_hooks(CamelObject *o);
-static void camel_object_free_hooks(CamelObject *o);
-static void camel_object_bag_remove_unlocked(CamelObjectBag *inbag, CamelObject *o, CamelHookList *hooks);
-
-#define camel_object_unget_hooks(o) (e_mutex_unlock((CAMEL_OBJECT(o)->hooks->lock)))
-
-
-/* ********************************************************************** */
-
-static pthread_mutex_t chunks_lock = PTHREAD_MUTEX_INITIALIZER;
-
-static EMemChunk *pair_chunks;
-static EMemChunk *hook_chunks;
-static unsigned int pair_id = 1;
-
-static EMutex *type_lock;
-
-static GHashTable *type_table;
-static EMemChunk *type_chunks;
-
-CamelType camel_object_type;
-
-#define P_LOCK(l) (pthread_mutex_lock(&l))
-#define P_UNLOCK(l) (pthread_mutex_unlock(&l))
-#define E_LOCK(l) (e_mutex_lock(l))
-#define E_UNLOCK(l) (e_mutex_unlock(l))
-#define CLASS_LOCK(k) (g_mutex_lock((((CamelObjectClass *)k)->lock)))
-#define CLASS_UNLOCK(k) (g_mutex_unlock((((CamelObjectClass *)k)->lock)))
-
-
-static struct _CamelHookPair *
-pair_alloc(void)
-{
- CamelHookPair *pair;
-
- P_LOCK(chunks_lock);
- pair = e_memchunk_alloc(pair_chunks);
- pair->id = pair_id++;
- if (pair_id == 0)
- pair_id = 1;
- P_UNLOCK(chunks_lock);
-
- return pair;
-}
-
-static void
-pair_free(CamelHookPair *pair)
-{
- g_assert(pair_chunks != NULL);
-
- P_LOCK(chunks_lock);
- e_memchunk_free(pair_chunks, pair);
- P_UNLOCK(chunks_lock);
-}
-
-static struct _CamelHookList *
-hooks_alloc(void)
-{
- CamelHookList *hooks;
-
- P_LOCK(chunks_lock);
- hooks = e_memchunk_alloc(hook_chunks);
- P_UNLOCK(chunks_lock);
-
- return hooks;
-}
-
-static void
-hooks_free(CamelHookList *hooks)
-{
- g_assert(hook_chunks != NULL);
-
- P_LOCK(chunks_lock);
- e_memchunk_free(hook_chunks, hooks);
- P_UNLOCK(chunks_lock);
-}
-
-/* not checked locked, who cares, only required for people that want to redefine root objects */
-void
-camel_type_init(void)
-{
- static int init = FALSE;
-
- if (init)
- return;
-
- init = TRUE;
- pair_chunks = e_memchunk_new(16, sizeof(CamelHookPair));
- hook_chunks = e_memchunk_new(16, sizeof(CamelHookList));
- type_lock = e_mutex_new(E_MUTEX_REC);
- type_chunks = e_memchunk_new(32, sizeof(CamelType));
- type_table = g_hash_table_new(NULL, NULL);
-}
-
-/* ************************************************************************ */
-
-/* Should this return the object to the caller? */
-static void
-cobject_init (CamelObject *o, CamelObjectClass *klass)
-{
- o->klass = klass;
- o->magic = CAMEL_OBJECT_MAGIC;
- o->ref_count = 1;
- o->flags = 0;
-}
-
-static void
-cobject_finalise(CamelObject *o)
-{
- /*printf("%p: finalise %s\n", o, o->klass->name);*/
-
- g_assert(o->ref_count == 0);
-
- camel_object_free_hooks(o);
-
- o->magic = CAMEL_OBJECT_FINALISED_MAGIC;
- o->klass = NULL;
-}
-
-static int
-cobject_getv(CamelObject *o, CamelException *ex, CamelArgGetV *args)
-{
- int i;
- guint32 tag;
-
- for (i=0;i<args->argc;i++) {
- CamelArgGet *arg = &args->argv[i];
-
- tag = arg->tag;
-
- switch (tag & CAMEL_ARG_TAG) {
- case CAMEL_OBJECT_ARG_DESCRIPTION:
- *arg->ca_str = (char *)o->klass->name;
- break;
- case CAMEL_OBJECT_ARG_METADATA:
- *arg->ca_ptr = co_metadata_get(o);
- break;
- case CAMEL_OBJECT_ARG_STATE_FILE: {
- CamelHookPair *pair = co_metadata_pair(o, FALSE);
-
- if (pair) {
- *arg->ca_str = g_strdup(pair->func.filename);
- camel_object_unget_hooks(o);
- }
- break; }
- }
- }
-
- /* could have flags or stuff here? */
- return 0;
-}
-
-static int
-cobject_setv(CamelObject *o, CamelException *ex, CamelArgV *args)
-{
- int i;
- guint32 tag;
-
- for (i=0;i<args->argc;i++) {
- CamelArg *arg = &args->argv[i];
-
- tag = arg->tag;
-
- switch (tag & CAMEL_ARG_TAG) {
- case CAMEL_OBJECT_ARG_STATE_FILE: {
- CamelHookPair *pair;
-
- /* We store the filename on the meta-data hook-pair */
- pair = co_metadata_pair(o, TRUE);
- g_free(pair->func.filename);
- pair->func.filename = g_strdup(arg->ca_str);
- camel_object_unget_hooks(o);
- break; }
- }
- }
-
- /* could have flags or stuff here? */
- return 0;
-}
-
-static void
-cobject_free(CamelObject *o, guint32 tag, void *value)
-{
- switch(tag & CAMEL_ARG_TAG) {
- case CAMEL_OBJECT_ARG_METADATA:
- co_metadata_free(o, value);
- break;
- case CAMEL_OBJECT_ARG_STATE_FILE:
- g_free(value);
- break;
- case CAMEL_OBJECT_ARG_PERSISTENT_PROPERTIES:
- g_slist_free((GSList *)value);
- break;
- }
-}
-
-static char *
-cobject_meta_get(CamelObject *obj, const char * name)
-{
- CamelHookPair *pair;
- CamelObjectMeta *meta;
- char *res = NULL;
-
- g_return_val_if_fail(CAMEL_IS_OBJECT (obj), 0);
- g_return_val_if_fail(name != NULL, 0);
-
- pair = co_metadata_pair(obj, FALSE);
- if (pair) {
- meta = pair->data;
- while (meta) {
- if (!strcmp(meta->name, name)) {
- res = g_strdup(meta->value);
- break;
- }
- meta = meta->next;
- }
- camel_object_unget_hooks(obj);
- }
-
- return res;
-}
-
-static gboolean
-cobject_meta_set(CamelObject *obj, const char * name, const char *value)
-{
- CamelHookPair *pair;
- int changed = FALSE;
- CamelObjectMeta *meta, *metap;
-
- g_return_val_if_fail(CAMEL_IS_OBJECT (obj), FALSE);
- g_return_val_if_fail(name != NULL, FALSE);
-
- if (obj->hooks == NULL && value == NULL)
- return FALSE;
-
- pair = co_metadata_pair(obj, TRUE);
- meta = pair->data;
- metap = (CamelObjectMeta *)&pair->data;
- while (meta) {
- if (!strcmp(meta->name, name))
- break;
- metap = meta;
- meta = meta->next;
- }
-
- /* TODO: The camelobjectmeta structure is identical to
- CamelTag, they could be merged or share common code */
- if (meta == NULL) {
- if (value == NULL)
- goto done;
- meta = g_malloc(sizeof(*meta) + strlen(name));
- meta->next = pair->data;
- pair->data = meta;
- strcpy(meta->name, name);
- meta->value = g_strdup(value);
- changed = TRUE;
- } else if (value == NULL) {
- metap->next = meta->next;
- g_free(meta->value);
- g_free(meta);
- changed = TRUE;
- } else if (strcmp(meta->value, value) != 0) {
- g_free(meta->value);
- meta->value = g_strdup(value);
- changed = TRUE;
- }
-
-done:
- camel_object_unget_hooks(obj);
-
- return changed;
-}
-
-/* State file for CamelObject data. Any later versions should only append data.
-
- version:uint32
-
- Version 0 of the file:
-
- version:uint32 = 0
- count:uint32 -- count of meta-data items
- ( name:string value:string ) *count -- meta-data items
-
- Version 1 of the file adds:
- count:uint32 -- count of persistent properties
- ( tag:uing32 value:tagtype ) *count -- persistent properties
-
-*/
-
-static int
-cobject_state_read(CamelObject *obj, FILE *fp)
-{
- guint32 i, count, version;
-
- /* NB: for later versions, just check the version is 1 .. known version */
- if (camel_file_util_decode_uint32(fp, &version) == -1
- || version > 1
- || camel_file_util_decode_uint32(fp, &count) == -1)
- return -1;
-
- for (i=0;i<count;i++) {
- char *name = NULL, *value = NULL;
-
- if (camel_file_util_decode_string(fp, &name) == 0
- && camel_file_util_decode_string(fp, &value) == 0) {
- camel_object_meta_set(obj, name, value);
- g_free(name);
- g_free(value);
- } else {
- g_free(name);
- g_free(value);
-
- return -1;
- }
- }
-
- if (version > 0) {
- CamelArgV *argv;
-
- if (camel_file_util_decode_uint32(fp, &count) == -1
- || count == 0) {
- /* maybe it was just version 0 afterall */
- return 0;
- }
-
- /* we batch up the properties and set them in one go */
- argv = g_malloc(sizeof(*argv) + (count - CAMEL_ARGV_MAX) * sizeof(argv->argv[0]));
- argv->argc = 0;
- for (i=0;i<count;i++) {
- if (camel_file_util_decode_uint32(fp, &argv->argv[argv->argc].tag) == -1)
- goto cleanup;
-
- /* so far,only do strings and ints, doubles could be added,
- object's would require a serialisation interface */
-
- switch(argv->argv[argv->argc].tag & CAMEL_ARG_TYPE) {
- case CAMEL_ARG_INT:
- case CAMEL_ARG_BOO:
- if (camel_file_util_decode_uint32(fp, &argv->argv[argv->argc].ca_int) == -1)
- goto cleanup;
- break;
- case CAMEL_ARG_STR:
- if (camel_file_util_decode_string(fp, &argv->argv[argv->argc].ca_str) == -1)
- goto cleanup;
- break;
- default:
- goto cleanup;
- }
-
- argv->argc++;
- }
-
- camel_object_setv(obj, NULL, argv);
- cleanup:
- for (i=0;i<argv->argc;i++) {
- if ((argv->argv[i].tag & CAMEL_ARG_TYPE) == CAMEL_ARG_STR)
- g_free(argv->argv[i].ca_str);
- }
- g_free(argv);
- }
-
- return 0;
-}
-
-/* TODO: should pass exception around */
-static int
-cobject_state_write(CamelObject *obj, FILE *fp)
-{
- gint32 count, i;
- CamelObjectMeta *meta = NULL, *scan;
- int res = -1;
- GSList *props = NULL, *l;
- CamelArgGetV *arggetv = NULL;
- CamelArgV *argv = NULL;
-
- camel_object_get(obj, NULL, CAMEL_OBJECT_METADATA, &meta, NULL);
-
- count = 0;
- scan = meta;
- while (scan) {
- count++;
- scan = scan->next;
- }
-
- /* current version is 1 */
- if (camel_file_util_encode_uint32(fp, 1) == -1
- || camel_file_util_encode_uint32(fp, count) == -1)
- goto abort;
-
- scan = meta;
- while (scan) {
- if (camel_file_util_encode_string(fp, meta->name) == -1
- || camel_file_util_encode_string(fp, meta->value) == -1)
- goto abort;
- scan = scan->next;
- }
-
- camel_object_get(obj, NULL, CAMEL_OBJECT_PERSISTENT_PROPERTIES, &props, NULL);
-
- /* we build an arggetv to query the object atomically,
- we also need an argv to store the results - bit messy */
-
- count = g_slist_length(props);
-
- arggetv = g_malloc0(sizeof(*arggetv) + (count - CAMEL_ARGV_MAX) * sizeof(arggetv->argv[0]));
- argv = g_malloc0(sizeof(*argv) + (count - CAMEL_ARGV_MAX) * sizeof(argv->argv[0]));
- l = props;
- i = 0;
- while (l) {
- CamelProperty *prop = l->data;
-
- argv->argv[i].tag = prop->tag;
- arggetv->argv[i].tag = prop->tag;
- arggetv->argv[i].ca_ptr = &argv->argv[i].ca_ptr;
-
- i++;
- l = l->next;
- }
- arggetv->argc = i;
- argv->argc = i;
-
- camel_object_getv(obj, NULL, arggetv);
-
- if (camel_file_util_encode_uint32(fp, count) == -1)
- goto abort;
-
- for (i=0;i<argv->argc;i++) {
- CamelArg *arg = &argv->argv[i];
-
- if (camel_file_util_encode_uint32(fp, arg->tag) == -1)
- goto abort;
-
- switch (arg->tag & CAMEL_ARG_TYPE) {
- case CAMEL_ARG_INT:
- case CAMEL_ARG_BOO:
- if (camel_file_util_encode_uint32(fp, arg->ca_int) == -1)
- goto abort;
- break;
- case CAMEL_ARG_STR:
- if (camel_file_util_encode_string(fp, arg->ca_str) == -1)
- goto abort;
- break;
- }
- }
-
- res = 0;
-abort:
- for (i=0;i<argv->argc;i++) {
- CamelArg *arg = &argv->argv[i];
-
- if ((argv->argv[i].tag & CAMEL_ARG_TYPE) == CAMEL_ARG_STR)
- camel_object_free(obj, arg->tag, arg->ca_str);
- }
-
- g_free(argv);
- g_free(arggetv);
-
- if (props)
- camel_object_free(obj, CAMEL_OBJECT_PERSISTENT_PROPERTIES, props);
-
- if (meta)
- camel_object_free(obj, CAMEL_OBJECT_METADATA, meta);
-
- return res;
-}
-
-
-static void
-cobject_class_init(CamelObjectClass *klass)
-{
- klass->magic = CAMEL_OBJECT_CLASS_MAGIC;
-
- klass->getv = cobject_getv;
- klass->setv = cobject_setv;
- klass->free = cobject_free;
-
- klass->meta_get = cobject_meta_get;
- klass->meta_set = cobject_meta_set;
- klass->state_read = cobject_state_read;
- klass->state_write = cobject_state_write;
-
- camel_object_class_add_event(klass, "finalize", NULL);
- camel_object_class_add_event(klass, "meta_changed", NULL);
-}
-
-static void
-cobject_class_finalise(CamelObjectClass * klass)
-{
- klass->magic = CAMEL_OBJECT_CLASS_FINALISED_MAGIC;
-
- g_free(klass);
-}
-
-CamelType
-camel_object_get_type (void)
-{
- if (camel_object_type == CAMEL_INVALID_TYPE) {
- camel_type_init();
-
- camel_object_type = camel_type_register(NULL, "CamelObject", /*, 0, 0*/
- sizeof(CamelObject), sizeof(CamelObjectClass),
- cobject_class_init, cobject_class_finalise,
- cobject_init, cobject_finalise);
- }
-
- return camel_object_type;
-}
-
-static void
-camel_type_class_init(CamelObjectClass *klass, CamelObjectClass *type)
-{
- if (type->parent)
- camel_type_class_init(klass, type->parent);
-
- if (type->klass_init)
- type->klass_init(klass);
-}
-
-CamelType
-camel_type_register (CamelType parent, const char * name,
- /*unsigned int ver, unsigned int rev,*/
- size_t object_size, size_t klass_size,
- CamelObjectClassInitFunc class_init,
- CamelObjectClassFinalizeFunc class_finalise,
- CamelObjectInitFunc object_init,
- CamelObjectFinalizeFunc object_finalise)
-{
- CamelObjectClass *klass;
- /*int offset;
- size_t size;*/
-
- if (parent != NULL && parent->magic != CAMEL_OBJECT_CLASS_MAGIC) {
- g_warning("camel_type_register: invalid junk parent class for '%s'", name);
- return NULL;
- }
-
- E_LOCK(type_lock);
-
- /* Have to check creation, it might've happened in another thread before we got here */
- klass = g_hash_table_lookup(type_table, name);
- if (klass != NULL) {
- if (klass->klass_size != klass_size || klass->object_size != object_size
- || klass->klass_init != class_init || klass->klass_finalise != class_finalise
- || klass->init != object_init || klass->finalise != object_finalise) {
- g_warning("camel_type_register: Trying to re-register class '%s'", name);
- klass = NULL;
- }
- E_UNLOCK(type_lock);
- return klass;
- }
-
- /* this is for objects with no parent as part of their struct ('interfaces'?) */
- /*offset = parent?parent->klass_size:0;
- offset = (offset + 3) & (~3);
-
- size = offset + klass_size;
-
- klass = g_malloc0(size);
-
- klass->klass_size = size;
- klass->klass_data = offset;
-
- offset = parent?parent->object_size:0;
- offset = (offset + 3) & (~3);
-
- klass->object_size = offset + object_size;
- klass->object_data = offset;*/
-
- if (parent
- && klass_size < parent->klass_size) {
- g_warning("camel_type_register: '%s' has smaller class size than parent '%s'", name, parent->name);
- E_UNLOCK(type_lock);
- return NULL;
- }
-
- klass = g_malloc0(klass_size);
- klass->klass_size = klass_size;
- klass->object_size = object_size;
- klass->lock = g_mutex_new();
- klass->instance_chunks = e_memchunk_new(8, object_size);
-
- klass->parent = parent;
- if (parent) {
- klass->next = parent->child;
- parent->child = klass;
- }
- klass->name = name;
-
- /*klass->version = ver;
- klass->revision = rev;*/
-
- klass->klass_init = class_init;
- klass->klass_finalise = class_finalise;
-
- klass->init = object_init;
- klass->finalise = object_finalise;
-
- /* setup before class init, incase class init func uses the type or looks it up ? */
- g_hash_table_insert(type_table, (void *)name, klass);
-
- camel_type_class_init(klass, klass);
-
- E_UNLOCK(type_lock);
-
- return klass;
-}
-
-static void
-camel_object_init(CamelObject *o, CamelObjectClass *klass, CamelType type)
-{
- if (type->parent)
- camel_object_init(o, klass, type->parent);
-
- if (type->init)
- type->init(o, klass);
-}
-
-CamelObject *
-camel_object_new(CamelType type)
-{
- CamelObject *o;
-
- if (type == NULL)
- return NULL;
-
- if (type->magic != CAMEL_OBJECT_CLASS_MAGIC)
- return NULL;
-
- CLASS_LOCK(type);
-
- o = e_memchunk_alloc0(type->instance_chunks);
-
-#ifdef CAMEL_OBJECT_TRACK_INSTANCES
- if (type->instances)
- type->instances->prev = o;
- o->next = type->instances;
- o->prev = NULL;
- type->instances = o;
-#endif
-
- CLASS_UNLOCK(type);
-
- camel_object_init(o, type, type);
-
- d(printf("%p: new %s()\n", o, o->klass->name));
-
- return o;
-}
-
-void
-camel_object_ref(void *vo)
-{
- register CamelObject *o = vo;
-
- g_return_if_fail(CAMEL_IS_OBJECT(o));
-
- E_LOCK(type_lock);
-
- o->ref_count++;
- d(printf("%p: ref %s(%d)\n", o, o->klass->name, o->ref_count));
-
- E_UNLOCK(type_lock);
-}
-
-void
-camel_object_unref(void *vo)
-{
- register CamelObject *o = vo;
- register CamelObjectClass *klass, *k;
- CamelHookList *hooks = NULL;
-
- g_return_if_fail(CAMEL_IS_OBJECT(o));
-
- klass = o->klass;
-
- if (o->hooks)
- hooks = camel_object_get_hooks(o);
-
- E_LOCK(type_lock);
-
- o->ref_count--;
-
- d(printf("%p: unref %s(%d)\n", o, o->klass->name, o->ref_count));
-
- if (o->ref_count > 0
- || (o->flags & CAMEL_OBJECT_DESTROY)) {
- E_UNLOCK(type_lock);
- if (hooks)
- camel_object_unget_hooks(o);
- return;
- }
-
- o->flags |= CAMEL_OBJECT_DESTROY;
-
- if (hooks)
- camel_object_bag_remove_unlocked(NULL, o, hooks);
-
- E_UNLOCK(type_lock);
-
- if (hooks)
- camel_object_unget_hooks(o);
-
- camel_object_trigger_event(o, "finalize", NULL);
-
- k = klass;
- while (k) {
- if (k->finalise)
- k->finalise(o);
- k = k->parent;
- }
-
- o->magic = CAMEL_OBJECT_FINALISED_MAGIC;
-
- CLASS_LOCK(klass);
-#ifdef CAMEL_OBJECT_TRACK_INSTANCES
- if (o->prev)
- o->prev->next = o->next;
- else
- klass->instances = o->next;
- if (o->next)
- o->next->prev = o->prev;
-#endif
- e_memchunk_free(klass->instance_chunks, o);
- CLASS_UNLOCK(klass);
-}
-
-const char *
-camel_type_to_name (CamelType type)
-{
- if (type == NULL)
- return "(NULL class)";
-
- if (type->magic == CAMEL_OBJECT_CLASS_MAGIC)
- return type->name;
-
- return "(Junk class)";
-}
-
-CamelType camel_name_to_type(const char *name)
-{
- /* TODO: Load a class off disk (!) */
-
- return g_hash_table_lookup(type_table, name);
-}
-
-static char *
-desc_data(CamelObject *o, int ok)
-{
- char *what;
-
- if (o == NULL)
- what = g_strdup("NULL OBJECT");
- else if (o->magic == ok)
- what = NULL;
- else if (o->magic == CAMEL_OBJECT_MAGIC)
- what = g_strdup_printf("CLASS '%s'", ((CamelObjectClass *)o)->name);
- else if (o->magic == CAMEL_OBJECT_CLASS_MAGIC)
- what = g_strdup_printf("CLASS '%s'", ((CamelObjectClass *)o)->name);
- else if (o->magic == CAMEL_OBJECT_FINALISED_MAGIC)
- what = g_strdup_printf("finalised OBJECT");
- else if (o->magic == CAMEL_OBJECT_CLASS_FINALISED_MAGIC)
- what = g_strdup_printf("finalised CLASS");
- else
- what = g_strdup_printf("junk data");
-
- return what;
-}
-
-static gboolean
-check_magic(void *o, CamelType ctype, int isob)
-{
- char *what, *to;
-
- what = desc_data(o, isob?CAMEL_OBJECT_MAGIC:CAMEL_OBJECT_CLASS_MAGIC);
- to = desc_data((CamelObject *)ctype, CAMEL_OBJECT_CLASS_MAGIC);
-
- if (what || to) {
- if (what == NULL) {
- if (isob)
- what = g_strdup_printf("OBJECT '%s'", ((CamelObject *)o)->klass->name);
- else
- what = g_strdup_printf("OBJECT '%s'", ((CamelObjectClass *)o)->name);
- }
- if (to == NULL)
- to = g_strdup_printf("OBJECT '%s'", ctype->name);
- g_warning("Trying to check %s is %s", what, to);
- g_free(what);
- g_free(to);
-
- return FALSE;
- }
-
- return TRUE;
-}
-
-gboolean
-camel_object_is (CamelObject *o, CamelType ctype)
-{
- CamelObjectClass *k;
-
- g_return_val_if_fail(check_magic(o, ctype, TRUE), FALSE);
-
- k = o->klass;
- while (k) {
- if (k == ctype)
- return TRUE;
- k = k->parent;
- }
-
- return FALSE;
-}
-
-gboolean
-camel_object_class_is (CamelObjectClass *k, CamelType ctype)
-{
- g_return_val_if_fail(check_magic(k, ctype, FALSE), FALSE);
-
- while (k) {
- if (k == ctype)
- return TRUE;
- k = k->parent;
- }
-
- return FALSE;
-}
-
-CamelObject *
-camel_object_cast(CamelObject *o, CamelType ctype)
-{
- CamelObjectClass *k;
-
- g_return_val_if_fail(check_magic(o, ctype, TRUE), NULL);
-
- k = o->klass;
- while (k) {
- if (k == ctype)
- return o;
- k = k->parent;
- }
-
- g_warning("Object %p (class '%s') doesn't have '%s' in its hierarchy", o, o->klass->name, ctype->name);
-
- return NULL;
-}
-
-CamelObjectClass *
-camel_object_class_cast(CamelObjectClass *k, CamelType ctype)
-{
- CamelObjectClass *r = k;
-
- g_return_val_if_fail(check_magic(k, ctype, FALSE), NULL);
-
- while (k) {
- if (k == ctype)
- return r;
- k = k->parent;
- }
-
- g_warning("Class '%s' doesn't have '%s' in its hierarchy", r->name, ctype->name);
-
- return NULL;
-}
-
-void
-camel_object_class_add_event(CamelObjectClass *klass, const char *name, CamelObjectEventPrepFunc prep)
-{
- CamelHookPair *pair;
-
- g_return_if_fail (name);
-
- pair = klass->hooks;
- while (pair) {
- if (strcmp(pair->name, name) == 0) {
- g_warning("camel_object_class_add_event: `%s' is already declared for '%s'\n",
- name, klass->name);
- return;
- }
- pair = pair->next;
- }
-
- pair = pair_alloc();
- pair->name = name;
- pair->func.prep = prep;
- pair->flags = 0;
-
- pair->next = klass->hooks;
- klass->hooks = pair;
-}
-
-/* free hook data */
-static void
-camel_object_free_hooks (CamelObject *o)
-{
- CamelHookPair *pair, *next;
-
- if (o->hooks) {
- g_assert(o->hooks->depth == 0);
- g_assert((o->hooks->flags & CAMEL_HOOK_PAIR_REMOVED) == 0);
-
- pair = o->hooks->list;
- while (pair) {
- next = pair->next;
-
- if (pair->name == meta_name) {
- co_metadata_free(o, pair->data);
- g_free(pair->func.filename);
- }
-
- pair_free(pair);
- pair = next;
- }
- e_mutex_destroy(o->hooks->lock);
- hooks_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)
-{
- static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
- 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 */
- if (o->hooks == NULL) {
- pthread_mutex_lock(&lock);
- if (o->hooks == NULL) {
- hooks = hooks_alloc();
- hooks->lock = e_mutex_new(E_MUTEX_REC);
- hooks->flags = 0;
- hooks->depth = 0;
- hooks->list_length = 0;
- hooks->list = NULL;
- o->hooks = hooks;
- }
- pthread_mutex_unlock(&lock);
- }
-
- e_mutex_lock(o->hooks->lock);
-
- return o->hooks;
-}
-
-unsigned int
-camel_object_hook_event(void *vo, const char * name, CamelObjectEventHookFunc func, void *data)
-{
- CamelObject *obj = vo;
- CamelHookPair *pair, *hook;
- CamelHookList *hooks;
- int id;
-
- g_return_val_if_fail(CAMEL_IS_OBJECT (obj), 0);
- g_return_val_if_fail(name != NULL, 0);
- g_return_val_if_fail(func != NULL, 0);
-
- hook = obj->klass->hooks;
- while (hook) {
- if (strcmp(hook->name, name) == 0)
- goto setup;
- hook = hook->next;
- }
-
- g_warning("camel_object_hook_event: trying to hook event `%s' in class `%s' with no defined events.",
- name, obj->klass->name);
-
- return 0;
-
-setup:
- /* setup hook pair */
- pair = pair_alloc();
- pair->name = hook->name; /* effectively static! */
- pair->func.event = func;
- pair->data = data;
- pair->flags = 0;
- id = pair->id;
-
- /* 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;
- hooks->list_length++;
- camel_object_unget_hooks(obj);
-
- return id;
-}
-
-void
-camel_object_remove_event(void *vo, unsigned int id)
-{
- CamelObject *obj = vo;
- CamelHookList *hooks;
- CamelHookPair *pair, *parent;
-
- g_return_if_fail (CAMEL_IS_OBJECT (obj));
- g_return_if_fail (id != 0);
-
- if (obj->hooks == NULL) {
- g_warning("camel_object_unhook_event: trying to unhook `%d` from an instance of `%s' with no hooks",
- id, obj->klass->name);
- return;
- }
-
- /* scan hooks for this event, remove it, or flag it if we're busy */
- hooks = camel_object_get_hooks(obj);
- parent = (CamelHookPair *)&hooks->list;
- pair = parent->next;
- while (pair) {
- if (pair->id == id
- && (pair->flags & CAMEL_HOOK_PAIR_REMOVED) == 0) {
- if (hooks->depth > 0) {
- pair->flags |= CAMEL_HOOK_PAIR_REMOVED;
- hooks->flags |= CAMEL_HOOK_PAIR_REMOVED;
- } else {
- parent->next = pair->next;
- pair_free(pair);
- hooks->list_length--;
- }
- 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 id %d in instance of `%s'",
- id, obj->klass->name);
-}
-
-void
-camel_object_unhook_event(void *vo, const char * name, CamelObjectEventHookFunc func, void *data)
-{
- CamelObject *obj = vo;
- 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, obj->klass->name);
- return;
- }
-
- /* scan hooks for this event, remove it, or flag it if we're busy */
- hooks = camel_object_get_hooks(obj);
- parent = (CamelHookPair *)&hooks->list;
- pair = parent->next;
- while (pair) {
- if (pair->func.event == func
- && pair->data == data
- && strcmp(pair->name, name) == 0
- && (pair->flags & CAMEL_HOOK_PAIR_REMOVED) == 0) {
- if (hooks->depth > 0) {
- pair->flags |= CAMEL_HOOK_PAIR_REMOVED;
- hooks->flags |= CAMEL_HOOK_PAIR_REMOVED;
- } else {
- parent->next = pair->next;
- pair_free(pair);
- hooks->list_length--;
- }
- 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, obj->klass->name, name);
-}
-
-void
-camel_object_trigger_event(void *vo, const char * name, void *event_data)
-{
- CamelObject *obj = vo;
- CamelHookList *hooks;
- CamelHookPair *pair, **pairs, *parent, *hook;
- int i, size;
- const char *prepname;
-
- g_return_if_fail (CAMEL_IS_OBJECT (obj));
- g_return_if_fail (name);
-
- hook = obj->klass->hooks;
- while (hook) {
- if (strcmp(hook->name, name) == 0)
- goto trigger;
- hook = hook->next;
- }
-
- g_warning("camel_object_trigger_event: trying to trigger unknown event `%s' in class `%s'",
- name, obj->klass->name);
-
- return;
-
-trigger:
- /* try prep function, if false, then quit */
- if (hook->func.prep != NULL && !hook->func.prep(obj, event_data))
- return;
-
- /* also, no hooks, dont bother going further */
- if (obj->hooks == NULL)
- return;
-
- /* lock the object for hook emission */
- camel_object_ref(obj);
- hooks = camel_object_get_hooks(obj);
-
- if (hooks->list) {
- /* first, copy the items in the list, and say we're in an event */
- hooks->depth++;
- pair = hooks->list;
- size = 0;
- pairs = alloca(sizeof(pairs[0]) * hooks->list_length);
- prepname = hook->name;
- while (pair) {
- if (pair->name == prepname)
- pairs[size++] = pair;
- pair = pair->next;
- }
-
- /* now execute the events we have, if they haven't been removed during our calls */
- for (i=size-1;i>=0;i--) {
- pair = pairs[i];
- if ((pair->flags & CAMEL_HOOK_PAIR_REMOVED) == 0)
- (pair->func.event) (obj, event_data, pair->data);
- }
- hooks->depth--;
-
- /* and if we're out of any events, then clean up any pending removes */
- if (hooks->depth == 0 && (hooks->flags & CAMEL_HOOK_PAIR_REMOVED)) {
- parent = (CamelHookPair *)&hooks->list;
- pair = parent->next;
- while (pair) {
- if (pair->flags & CAMEL_HOOK_PAIR_REMOVED) {
- parent->next = pair->next;
- pair_free(pair);
- hooks->list_length--;
- } else {
- parent = pair;
- }
- pair = parent->next;
- }
- hooks->flags &= ~CAMEL_HOOK_PAIR_REMOVED;
- }
- }
-
- camel_object_unget_hooks(obj);
- camel_object_unref(obj);
-}
-
-/* get/set arg methods */
-int camel_object_set(void *vo, CamelException *ex, ...)
-{
- CamelArgV args;
- CamelObject *o = vo;
- CamelObjectClass *klass = o->klass;
- int ret = 0;
-
- g_return_val_if_fail(CAMEL_IS_OBJECT(o), -1);
-
- camel_argv_start(&args, ex);
-
- while (camel_argv_build(&args) && ret == 0)
- ret = klass->setv(o, ex, &args);
- if (ret == 0)
- ret = klass->setv(o, ex, &args);
-
- camel_argv_end(&args);
-
- return ret;
-}
-
-int camel_object_setv(void *vo, CamelException *ex, CamelArgV *args)
-{
- g_return_val_if_fail(CAMEL_IS_OBJECT(vo), -1);
-
- return ((CamelObject *)vo)->klass->setv(vo, ex, args);
-}
-
-int camel_object_get(void *vo, CamelException *ex, ...)
-{
- CamelObject *o = vo;
- CamelArgGetV args;
- CamelObjectClass *klass = o->klass;
- int ret = 0;
-
- g_return_val_if_fail(CAMEL_IS_OBJECT(o), -1);
-
- camel_argv_start(&args, ex);
-
- while (camel_arggetv_build(&args) && ret == 0)
- ret = klass->getv(o, ex, &args);
- if (ret == 0)
- ret = klass->getv(o, ex, &args);
-
- camel_argv_end(&args);
-
- return ret;
-}
-
-int camel_object_getv(void *vo, CamelException *ex, CamelArgGetV *args)
-{
- g_return_val_if_fail(CAMEL_IS_OBJECT(vo), -1);
-
- return ((CamelObject *)vo)->klass->getv(vo, ex, args);
-}
-
-/* NB: If this doesn't return NULL, then you must unget_hooks when done */
-static CamelHookPair *
-co_metadata_pair(CamelObject *obj, int create)
-{
- CamelHookPair *pair;
- CamelHookList *hooks;
-
- if (obj->hooks == NULL && !create)
- return NULL;
-
- hooks = camel_object_get_hooks(obj);
- pair = hooks->list;
- while (pair) {
- if (pair->name == meta_name)
- return pair;
-
- pair = pair->next;
- }
-
- if (create) {
- pair = pair_alloc();
- pair->name = meta_name;
- pair->data = NULL;
- pair->flags = 0;
- pair->func.filename = NULL;
- pair->next = hooks->list;
- hooks->list = pair;
- hooks->list_length++;
- } else {
- camel_object_unget_hooks(obj);
- }
-
- return pair;
-}
-
-static CamelObjectMeta *
-co_metadata_get(CamelObject *obj)
-{
- CamelHookPair *pair;
- CamelObjectMeta *meta = NULL, *metaout = NULL, *metalast;
-
- pair = co_metadata_pair(obj, FALSE);
- if (pair) {
- meta = pair->data;
-
- while (meta) {
- CamelObjectMeta *m;
-
- m = g_malloc(sizeof(*metalast) + strlen(meta->name));
- m->next = NULL;
- strcpy(m->name, meta->name);
- m->value = g_strdup(meta->value);
- if (metaout == NULL)
- metalast = metaout = m;
- else {
- metalast->next = m;
- metalast = m;
- }
- meta = meta->next;
- }
-
- camel_object_unget_hooks(obj);
- }
-
- return metaout;
-}
-
-static void
-co_metadata_free(CamelObject *obj, CamelObjectMeta *meta)
-{
- while (meta) {
- CamelObjectMeta *metan = meta->next;
-
- g_free(meta->value);
- g_free(meta);
- meta = metan;
- }
-}
-
-/**
- * camel_object_meta_get:
- * @vo:
- * @name:
- *
- * Get a meta-data on an object.
- *
- * Return value: NULL if the meta-data is not set.
- **/
-char *
-camel_object_meta_get(void *vo, const char * name)
-{
- CamelObject *obj = vo;
-
- g_return_val_if_fail(CAMEL_IS_OBJECT (obj), 0);
- g_return_val_if_fail(name != NULL, 0);
-
- return obj->klass->meta_get(obj, name);
-}
-
-/**
- * camel_object_meta_set:
- * @vo:
- * @name: Name of meta-data. Should be prefixed with class of setter.
- * @value: Value to set. If NULL, then the meta-data is removed.
- *
- * Set a meta-data item on an object. If the object supports persistent
- * data, then the meta-data will be persistent across sessions.
- *
- * If the meta-data changes, is added, or removed, then a
- * "meta_changed" event will be triggered with the name of the changed
- * data.
- *
- * Return Value: TRUE if the setting caused a change to the object's
- * metadata.
- **/
-gboolean
-camel_object_meta_set(void *vo, const char * name, const char *value)
-{
- CamelObject *obj = vo;
-
- g_return_val_if_fail(CAMEL_IS_OBJECT (obj), FALSE);
- g_return_val_if_fail(name != NULL, FALSE);
-
- if (obj->klass->meta_set(obj, name, value)) {
- camel_object_trigger_event(obj, "meta_changed", (void *)name);
- return TRUE;
- }
-
- return FALSE;
-}
-
-/**
- * camel_object_state_read:
- * @vo:
- *
- * Read persistent object state from object_set(CAMEL_OBJECT_STATE_FILE).
- *
- * Return value: -1 on error.
- **/
-int camel_object_state_read(void *vo)
-{
- CamelObject *obj = vo;
- int res = -1;
- char *file;
- FILE *fp;
- char magic[4];
-
- camel_object_get(vo, NULL, CAMEL_OBJECT_STATE_FILE, &file, NULL);
- if (file == NULL)
- return 0;
-
- fp = fopen(file, "r");
- if (fp != NULL) {
- if (fread(magic, 4, 1, fp) == 1
- && memcmp(magic, CAMEL_OBJECT_STATE_FILE_MAGIC, 4) == 0)
- res = obj->klass->state_read(obj, fp);
- else
- res = -1;
- fclose(fp);
- }
-
- camel_object_free(vo, CAMEL_OBJECT_STATE_FILE, file);
-
- return res;
-}
-
-/**
- * camel_object_state_write:
- * @vo:
- *
- * Write persistent state to the file as set by object_set(CAMEL_OBJECT_STATE_FILE).
- *
- * Return value: -1 on error.
- **/
-int camel_object_state_write(void *vo)
-{
- CamelObject *obj = vo;
- int res = -1;
- char *file, *savename;
- FILE *fp;
-
- camel_object_get(vo, NULL, CAMEL_OBJECT_STATE_FILE, &file, NULL);
- if (file == NULL)
- return 0;
-
- savename = camel_file_util_savename(file);
- fp = fopen(savename, "w");
- if (fp != NULL) {
- if (fwrite(CAMEL_OBJECT_STATE_FILE_MAGIC, 4, 1, fp) == 1
- && obj->klass->state_write(obj, fp) == 0) {
- if (fclose(fp) == 0) {
- res = 0;
- rename(savename, file);
- }
- } else {
- fclose(fp);
- }
- }
-
- g_free(savename);
- camel_object_free(vo, CAMEL_OBJECT_STATE_FILE, file);
-
- return res;
-}
-
-/* free an arg object, you can only free objects 1 at a time */
-void camel_object_free(void *vo, guint32 tag, void *value)
-{
- g_return_if_fail(CAMEL_IS_OBJECT(vo));
-
- /* We could also handle freeing of args differently
-
- Add a 'const' bit to the arg type field,
- specifying that the object should not be freed.
-
- And, add free handlers for any pointer objects which are
- not const. The free handlers would be hookpairs off of the
- class.
-
- Then we handle the basic types OBJ,STR here, and pass PTR
- types to their appropriate handler, without having to pass
- through the invocation heirarchy of the free method.
-
- This would also let us copy and do other things with args
- we can't do, but i can't see a use for that yet ... */
-
- ((CamelObject *)vo)->klass->free(vo, tag, value);
-}
-
-static void
-object_class_dump_tree_rec(CamelType root, int depth)
-{
- char *p;
-#ifdef CAMEL_OBJECT_TRACK_INSTANCES
- struct _CamelObject *o;
-#endif
-
- p = alloca(depth*2+1);
- memset(p, ' ', depth*2);
- p[depth*2] = 0;
-
- while (root) {
- CLASS_LOCK(root);
- printf("%sClass: %s\n", p, root->name);
- /*printf("%sVersion: %u.%u\n", p, root->version, root->revision);*/
- if (root->hooks) {
- CamelHookPair *pair = root->hooks;
-
- while (pair) {
- printf("%s event '%s' prep %p\n", p, pair->name, pair->func.prep);
- pair = pair->next;
- }
- }
-#ifdef CAMEL_OBJECT_TRACK_INSTANCES
- o = root->instances;
- while (o) {
- printf("%s instance %p [%d]\n", p, o, o->ref_count);
- /* todo: should lock hooks while it scans them */
- if (o->hooks) {
- CamelHookPair *pair = o->hooks->list;
-
- while (pair) {
- printf("%s hook '%s' func %p data %p\n", p, pair->name, pair->func.event, pair->data);
- pair = pair->next;
- }
- }
- o = o->next;
- }
-#endif
- CLASS_UNLOCK(root);
-
- if (root->child)
- object_class_dump_tree_rec(root->child, depth+1);
-
- root = root->next;
- }
-}
-
-void
-camel_object_class_dump_tree(CamelType root)
-{
- object_class_dump_tree_rec(root, 0);
-}
-
-CamelObjectBag *
-camel_object_bag_new (GHashFunc hash, GEqualFunc equal, CamelCopyFunc keycopy, GFreeFunc keyfree)
-{
- CamelObjectBag *bag;
-
- bag = g_malloc(sizeof(*bag));
- bag->object_table = g_hash_table_new(hash, equal);
- bag->copy_key = keycopy;
- bag->free_key = keyfree;
- bag->key_table = g_hash_table_new(NULL, NULL);
- bag->owner = 0;
-
- /* init the semaphore to 1 owner, this is who has reserved the bag for adding */
- sem_init(&bag->reserve_sem, 0, 1);
-
- return bag;
-}
-
-static void
-save_object(void *key, CamelObject *o, GPtrArray *objects)
-{
- g_ptr_array_add(objects, o);
-}
-
-void
-camel_object_bag_destroy (CamelObjectBag *bag)
-{
- GPtrArray *objects = g_ptr_array_new();
- int i;
-
- sem_getvalue(&bag->reserve_sem, &i);
- g_assert(i == 1);
-
- g_hash_table_foreach(bag->object_table, (GHFunc)save_object, objects);
- for (i=0;i<objects->len;i++)
- camel_object_bag_remove(bag, objects->pdata[i]);
-
- g_ptr_array_free(objects, TRUE);
- g_hash_table_destroy(bag->object_table);
- g_hash_table_destroy(bag->key_table);
- sem_destroy(&bag->reserve_sem);
- g_free(bag);
-}
-
-void
-camel_object_bag_add (CamelObjectBag *bag, const void *key, void *vo)
-{
- CamelObject *o = vo;
- CamelHookList *hooks;
- CamelHookPair *pair;
- void *k;
-
- hooks = camel_object_get_hooks(o);
- E_LOCK(type_lock);
-
- pair = hooks->list;
- while (pair) {
- if (pair->name == bag_name && pair->data == bag) {
- E_UNLOCK(type_lock);
- camel_object_unget_hooks(o);
- return;
- }
- pair = pair->next;
- }
-
- pair = pair_alloc();
- pair->name = bag_name;
- pair->data = bag;
- pair->flags = 0;
-
- pair->next = hooks->list;
- hooks->list = pair;
- hooks->list_length++;
-
- k = bag->copy_key(key);
- g_hash_table_insert(bag->object_table, k, vo);
- g_hash_table_insert(bag->key_table, vo, k);
-
- if (bag->owner == pthread_self()) {
- bag->owner = 0;
- sem_post(&bag->reserve_sem);
- }
-
- E_UNLOCK(type_lock);
- camel_object_unget_hooks(o);
-}
-
-void *
-camel_object_bag_get (CamelObjectBag *bag, const void *key)
-{
- CamelObject *o;
-
- E_LOCK(type_lock);
-
- o = g_hash_table_lookup(bag->object_table, key);
- if (o) {
- /* we use the same lock as the refcount */
- o->ref_count++;
- } else if (bag->owner != pthread_self()) {
- E_UNLOCK(type_lock);
- sem_wait(&bag->reserve_sem);
- E_LOCK(type_lock);
- /* re-check if it slipped in */
- o = g_hash_table_lookup(bag->object_table, key);
- if (o)
- o->ref_count++;
- /* we dont want to reserve the bag */
- sem_post(&bag->reserve_sem);
- }
-
- E_UNLOCK(type_lock);
-
- return o;
-}
-
-/* like get, but also reserve a spot for key if it isn't there */
-/* After calling reserve, you MUST call bag_abort or bag_add */
-/* Also note that currently you can only reserve a single key
- at any one time in a given thread */
-void *
-camel_object_bag_reserve (CamelObjectBag *bag, const void *key)
-{
- CamelObject *o;
-
- E_LOCK(type_lock);
-
- o = g_hash_table_lookup(bag->object_table, key);
- if (o) {
- o->ref_count++;
- } else {
- g_assert(bag->owner != pthread_self());
- E_UNLOCK(type_lock);
- sem_wait(&bag->reserve_sem);
- E_LOCK(type_lock);
- /* incase its slipped in while we were waiting */
- o = g_hash_table_lookup(bag->object_table, key);
- if (o) {
- o->ref_count++;
- /* in which case we dont need to reserve the bag either */
- sem_post(&bag->reserve_sem);
- } else {
- bag->owner = pthread_self();
- }
- }
-
- E_UNLOCK(type_lock);
-
- return o;
-}
-
-/* abort a reserved key */
-void
-camel_object_bag_abort (CamelObjectBag *bag, const void *key)
-{
- g_assert(bag->owner == pthread_self());
-
- bag->owner = 0;
- sem_post(&bag->reserve_sem);
-}
-
-static void
-save_bag(void *key, CamelObject *o, GPtrArray *list)
-{
- /* we have the refcount lock already */
- o->ref_count++;
- g_ptr_array_add(list, o);
-}
-
-/* get a list of all objects in the bag, ref'd
- ignores any reserved keys */
-GPtrArray *
-camel_object_bag_list (CamelObjectBag *bag)
-{
- GPtrArray *list;
-
- list = g_ptr_array_new();
-
- E_LOCK(type_lock);
- g_hash_table_foreach(bag->object_table, (GHFunc)save_bag, list);
- E_UNLOCK(type_lock);
-
- return list;
-}
-
-/* if bag is NULL, remove all bags from object */
-static void
-camel_object_bag_remove_unlocked (CamelObjectBag *inbag, CamelObject *o, CamelHookList *hooks)
-{
- CamelHookPair *pair, *parent;
- void *oldkey;
- CamelObjectBag *bag;
-
- parent = (CamelHookPair *)&hooks->list;
- pair = parent->next;
- while (pair) {
- if (pair->name == bag_name
- && (inbag == NULL || inbag == pair->data)) {
- bag = pair->data;
- /* lookup object in table? */
- oldkey = g_hash_table_lookup(bag->key_table, o);
- if (oldkey) {
- g_hash_table_remove(bag->key_table, o);
- g_hash_table_remove(bag->object_table, oldkey);
- bag->free_key(oldkey);
- }
- parent->next = pair->next;
- pair_free(pair);
- hooks->list_length--;
- } else {
- parent = pair;
- }
- pair = parent->next;
- }
-}
-
-void
-camel_object_bag_remove (CamelObjectBag *inbag, void *vo)
-{
- CamelObject *o = vo;
- CamelHookList *hooks;
-
- if (o->hooks == NULL)
- return;
-
- hooks = camel_object_get_hooks(o);
- E_LOCK(type_lock);
-
- camel_object_bag_remove_unlocked(inbag, o, hooks);
-
- E_UNLOCK(type_lock);
- camel_object_unget_hooks(o);
-}
diff --git a/camel/camel-object.h b/camel/camel-object.h
deleted file mode 100644
index 33ecefbb0a..0000000000
--- a/camel/camel-object.h
+++ /dev/null
@@ -1,290 +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>
- * 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 <glib.h>
-#include <stdio.h> /* FILE */
-#include <stdlib.h> /* size_t */
-#include <stdarg.h>
-#include <pthread.h>
-
-#include <camel/camel-arg.h>
-#include <camel/camel-types.h> /* this is a @##$@#SF stupid header */
-
-/* this crap shouldn't be here */
-#include <camel/camel-i18n.h>
-
-/* turn on so that camel_object_class_dump_tree() dumps object instances as well */
-#define CAMEL_OBJECT_TRACK_INSTANCES
-
-typedef struct _CamelObjectClass *CamelType;
-
-#ifdef G_DISABLE_CHECKS
-#define CAMEL_CHECK_CAST(obj, ctype, ptype) ((ptype *) obj)
-#define CAMEL_CHECK_CLASS_CAST(klass, ctype, ptype) ((ptype *) klass)
-#else
-#define CAMEL_CHECK_CAST(obj, ctype, ptype) ((ptype *) camel_object_cast ((CamelObject *)(obj), (CamelType)(ctype)))
-#define CAMEL_CHECK_CLASS_CAST(klass, ctype, ptype) ((ptype *) camel_object_class_cast ((CamelObjectClass *)(klass), (CamelType)(ctype) ))
-#endif
-#define CAMEL_CHECK_TYPE(obj, ctype) (camel_object_is ((CamelObject *)(obj), (CamelType)(ctype) ))
-#define CAMEL_CHECK_CLASS_TYPE(klass, ctype) (camel_object_class_is ((CamelObjectClass *)(klass), (CamelType)(ctype)))
-
-extern CamelType camel_object_type;
-
-#define CAMEL_OBJECT_TYPE (camel_object_type)
-
-/* we can't check casts till we've got the type, use the global type variable because its cheaper */
-#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))->klass)
-#define CAMEL_OBJECT_GET_TYPE(o) ((CamelType)(CAMEL_OBJECT(o))->klass)
-
-typedef struct _CamelObjectClass CamelObjectClass;
-typedef struct _CamelObject CamelObject;
-typedef unsigned int CamelObjectHookID;
-typedef struct _CamelObjectMeta CamelObjectMeta;
-
-typedef void (*CamelObjectClassInitFunc) (CamelObjectClass *);
-typedef void (*CamelObjectClassFinalizeFunc) (CamelObjectClass *);
-typedef void (*CamelObjectInitFunc) (CamelObject *, CamelObjectClass *);
-typedef void (*CamelObjectFinalizeFunc) (CamelObject *);
-
-typedef gboolean (*CamelObjectEventPrepFunc) (CamelObject *, gpointer);
-typedef void (*CamelObjectEventHookFunc) (CamelObject *, gpointer, gpointer);
-
-#define CAMEL_INVALID_TYPE (NULL)
-
-/* camel object args. */
-enum {
- /* Get a description of the object. */
- CAMEL_OBJECT_ARG_DESCRIPTION = CAMEL_ARG_FIRST, /* Get a copy of the meta-data list (should be freed) */
- CAMEL_OBJECT_ARG_METADATA,
- CAMEL_OBJECT_ARG_STATE_FILE,
- CAMEL_OBJECT_ARG_PERSISTENT_PROPERTIES,
-};
-
-enum {
- CAMEL_OBJECT_DESCRIPTION = CAMEL_OBJECT_ARG_DESCRIPTION | CAMEL_ARG_STR,
- /* Returns a CamelObjectMeta list */
- CAMEL_OBJECT_METADATA = CAMEL_OBJECT_ARG_METADATA | CAMEL_ARG_PTR,
- /* sets where the persistent data should reside, otherwise it isn't persistent */
- CAMEL_OBJECT_STATE_FILE = CAMEL_OBJECT_ARG_STATE_FILE | CAMEL_ARG_STR,
- /* returns a GSList CamelProperties of persistent properties */
- CAMEL_OBJECT_PERSISTENT_PROPERTIES = CAMEL_OBJECT_ARG_PERSISTENT_PROPERTIES | CAMEL_ARG_PTR,
-};
-
-enum _CamelObjectFlags {
- CAMEL_OBJECT_DESTROY = (1<<0),
-};
-
-/* returned by get::CAMEL_OBJECT_METADATA */
-struct _CamelObjectMeta {
- struct _CamelObjectMeta *next;
-
- char *value;
- char name[1]; /* allocated as part of structure */
-};
-
-/* TODO: create a simpleobject which has no events on it, or an interface for events */
-struct _CamelObject {
- struct _CamelObjectClass *klass;
-
- guint32 magic; /* only really needed for debugging ... */
-
- /* current hooks on this object */
- struct _CamelHookList *hooks;
-
- guint32 ref_count:24;
- guint32 flags:8;
-
-#ifdef CAMEL_OBJECT_TRACK_INSTANCES
- struct _CamelObject *next, *prev;
-#endif
-};
-
-struct _CamelObjectClass
-{
- struct _CamelObjectClass *parent;
-
- guint32 magic; /* in same spot for validation */
-
- struct _CamelObjectClass *next, *child; /* maintain heirarchy, just for kicks */
-
- const char *name;
-
- void *lock; /* lock when used in threading, else just pads struct */
-
- /*unsigned short version, revision;*/
-
- /* if the object's bigger than 64K, it could use redesigning */
- unsigned short object_size/*, object_data*/;
- unsigned short klass_size/*, klass_data*/;
-
- /* available hooks for this class */
- struct _CamelHookPair *hooks;
-
- /* memchunks for this type */
- struct _EMemChunk *instance_chunks;
-#ifdef CAMEL_OBJECT_TRACK_INSTANCES
- struct _CamelObject *instances;
-#endif
-
- /* init class */
- void (*klass_init)(struct _CamelObjectClass *);
- void (*klass_finalise)(struct _CamelObjectClass *);
-
- /* init/finalise object */
- void (*init)(struct _CamelObject *, struct _CamelObjectClass *);
- void (*finalise)(struct _CamelObject *);
-
- /* get/set interface */
- int (*setv)(struct _CamelObject *, struct _CamelException *ex, CamelArgV *args);
- int (*getv)(struct _CamelObject *, struct _CamelException *ex, CamelArgGetV *args);
- /* we only free 1 at a time, and only pointer types, obviously */
- void (*free)(struct _CamelObject *, guint32 tag, void *ptr);
-
- /* get/set meta-data interface */
- char *(*meta_get)(struct _CamelObject *, const char * name);
- gboolean (*meta_set)(struct _CamelObject *, const char * name, const char *value);
-
- /* persistence stuff */
- int (*state_read)(struct _CamelObject *, FILE *fp);
- int (*state_write)(struct _CamelObject *, FILE *fp);
-};
-
-/* The type system .... it's pretty simple..... */
-void camel_type_init (void);
-CamelType camel_type_register(CamelType parent, const char * name, /*unsigned int ver, unsigned int rev,*/
- size_t instance_size,
- size_t classfuncs_size,
- CamelObjectClassInitFunc class_init,
- CamelObjectClassFinalizeFunc class_finalize,
- CamelObjectInitFunc instance_init,
- CamelObjectFinalizeFunc instance_finalize);
-
-/* deprecated interface */
-#define camel_type_get_global_classfuncs(x) ((CamelObjectClass *)(x))
-
-/* object class methods (types == classes now) */
-const char *camel_type_to_name (CamelType type);
-CamelType camel_name_to_type (const char *name);
-void camel_object_class_add_event (CamelObjectClass *klass, const char *name, CamelObjectEventPrepFunc prep);
-
-void camel_object_class_dump_tree (CamelType root);
-
-/* casting */
-CamelObject *camel_object_cast(CamelObject *obj, CamelType ctype);
-gboolean camel_object_is(CamelObject *obj, CamelType ctype);
-
-CamelObjectClass *camel_object_class_cast (CamelObjectClass *klass, CamelType ctype);
-gboolean camel_object_class_is (CamelObjectClass *klass, CamelType ctype);
-
-CamelType camel_object_get_type (void);
-
-CamelObject *camel_object_new (CamelType type);
-CamelObject *camel_object_new_name (const char *name);
-
-void camel_object_ref(void *);
-void camel_object_unref(void *);
-
-#ifdef CAMEL_DEBUG
-#define camel_object_ref(o) (printf("%s (%s:%d):ref (%p)\n", __FUNCTION__, __FILE__, __LINE__, o), camel_object_ref(o))
-#define camel_object_unref(o) (printf("%s (%s:%d):unref (%p)\n", __FUNCTION__, __FILE__, __LINE__, o), camel_object_unref (o))
-#endif
-
-/* hooks */
-CamelObjectHookID camel_object_hook_event(void *obj, const char *name, CamelObjectEventHookFunc hook, void *data);
-void camel_object_remove_event(void *obj, CamelObjectHookID id);
-void camel_object_unhook_event(void *obj, const char *name, CamelObjectEventHookFunc hook, void *data);
-void camel_object_trigger_event(void *obj, const char *name, void *event_data);
-
-/* get/set methods */
-int camel_object_set(void *obj, struct _CamelException *ex, ...);
-int camel_object_setv(void *obj, struct _CamelException *ex, CamelArgV *);
-int camel_object_get(void *obj, struct _CamelException *ex, ...);
-int camel_object_getv(void *obj, struct _CamelException *ex, CamelArgGetV *);
-
-/* meta-data for user-specific data */
-char *camel_object_meta_get(void *vo, const char * name);
-gboolean camel_object_meta_set(void *vo, const char * name, const char *value);
-
-/* reads/writes the state from/to the CAMEL_OBJECT_STATE_FILE */
-int camel_object_state_read(void *vo);
-int camel_object_state_write(void *vo);
-
-/* free a bunch of objects, list must be 0 terminated */
-void camel_object_free(void *vo, guint32 tag, void *value);
-
-/* for managing bags of weakly-ref'd 'child' objects */
-typedef struct _CamelObjectBag CamelObjectBag;
-typedef void *(*CamelCopyFunc)(const void *vo);
-
-CamelObjectBag *camel_object_bag_new(GHashFunc hash, GEqualFunc equal, CamelCopyFunc keycopy, GFreeFunc keyfree);
-void *camel_object_bag_get(CamelObjectBag *bag, const void *key);
-void *camel_object_bag_reserve(CamelObjectBag *bag, const void *key);
-void camel_object_bag_add(CamelObjectBag *bag, const void *key, void *o);
-void camel_object_bag_abort(CamelObjectBag *bag, const void *key);
-GPtrArray *camel_object_bag_list(CamelObjectBag *bag);
-void camel_object_bag_remove(CamelObjectBag *bag, void *o);
-void camel_object_bag_destroy(CamelObjectBag *bag);
-
-#define CAMEL_MAKE_CLASS(type, tname, parent, pname) \
-static CamelType type##_type; \
-static pname##Class * type##_parent_class; \
- \
-CamelType \
-type##_get_type(void) \
-{ \
- if (type##_type == 0) { \
- type##_parent_class = (pname##Class *)parent##_get_type(); \
- type##_type = camel_type_register( \
- type##_parent_class, #tname "Class", \
- sizeof(tname), \
- sizeof(tname ## Class), \
- (CamelObjectClassInitFunc) type##_class_init, \
- NULL, \
- (CamelObjectInitFunc) type##_init, \
- (CamelObjectFinalizeFunc) type##_finalise); \
- } \
- \
- return type##_type; \
-}
-
-#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 03c0c77617..0000000000
--- a/camel/camel-operation.c
+++ /dev/null
@@ -1,687 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Michael Zucchi <NotZed@ximian.com>
- *
- * Copyright 2003 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 <glib.h>
-
-#include <stdio.h>
-#include <sys/time.h>
-#include <unistd.h>
-#include <pthread.h>
-#ifdef HAVE_NSS
-#include <nspr.h>
-#endif
-
-#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 {
- struct _CamelOperation *next;
- struct _CamelOperation *prev;
-
- 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;
-
- EMsgPort *cancel_port;
- int cancel_fd;
-#ifdef HAVE_NSS
- PRFileDesc *cancel_prfd;
-#endif
-};
-
-#define CAMEL_OPERATION_CANCELLED (1<<0)
-#define CAMEL_OPERATION_TRANSIENT (1<<1)
-
-/* Delay before a transient operation has any effect on the status */
-#define CAMEL_OPERATION_TRANSIENT_DELAY (5)
-
-static pthread_mutex_t operation_lock = PTHREAD_MUTEX_INITIALIZER;
-#define LOCK() pthread_mutex_lock(&operation_lock)
-#define UNLOCK() pthread_mutex_unlock(&operation_lock)
-
-
-static unsigned int stamp (void);
-static EDList operation_list = E_DLIST_INITIALISER(operation_list);
-static pthread_key_t operation_key;
-
-typedef struct _CamelOperationMsg {
- EMsg msg;
-} CamelOperationMsg ;
-
-/**
- * camel_operation_init:
- * @void:
- *
- * Init internal variables. Only call this once.
- **/
-void
-camel_operation_init(void)
-{
- pthread_key_create(&operation_key, NULL);
-}
-
-/**
- * camel_operation_new:
- * @status: Callback for receiving status messages. This will always
- * be called with an internal lock held.
- * @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;
- cc->cancel_port = e_msgport_new();
- cc->cancel_fd = -1;
-
- LOCK();
- e_dlist_addtail(&operation_list, (EDListNode *)cc);
- UNLOCK();
-
- return cc;
-}
-
-/**
- * camel_operation_mute:
- * @cc:
- *
- * mutes a camel operation permanently. from this point on you will never
- * receive operation updates, even if more are sent.
- **/
-void
-camel_operation_mute(CamelOperation *cc)
-{
- LOCK();
- cc->status = NULL;
- cc->status_data = NULL;
- UNLOCK();
-}
-
-/**
- * camel_operation_registered:
- *
- * Returns the registered operation, or %NULL if none registered.
- **/
-CamelOperation *
-camel_operation_registered (void)
-{
- CamelOperation *cc = (CamelOperation *)pthread_getspecific(operation_key);
-
- if (cc)
- camel_operation_ref(cc);
-
- return cc;
-}
-
-/**
- * camel_operation_ref:
- * @cc: operation context
- *
- * Add a reference to the CamelOperation @cc.
- **/
-void
-camel_operation_ref (CamelOperation *cc)
-{
- g_assert(cc->refcount > 0);
-
- LOCK();
- cc->refcount++;
- UNLOCK();
-}
-
-/**
- * camel_operation_unref:
- * @cc: operation context
- *
- * Unref and potentially free @cc.
- **/
-void
-camel_operation_unref (CamelOperation *cc)
-{
- GSList *n;
-
- g_assert(cc->refcount > 0);
-
- LOCK();
- if (cc->refcount == 1) {
- CamelOperationMsg *msg;
-
- e_dlist_remove((EDListNode *)cc);
-
- while ((msg = (CamelOperationMsg *)e_msgport_get(cc->cancel_port)))
- g_free(msg);
-
- e_msgport_destroy(cc->cancel_port);
-
- 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--;
- }
- UNLOCK();
-}
-
-/**
- * camel_operation_cancel_block:
- * @cc: operation context
- *
- * Block cancellation for this operation. If @cc is NULL, then the
- * current thread is blocked.
- **/
-void
-camel_operation_cancel_block (CamelOperation *cc)
-{
- if (cc == NULL)
- cc = (CamelOperation *)pthread_getspecific(operation_key);
-
- if (cc) {
- LOCK();
- cc->blocked++;
- UNLOCK();
- }
-}
-
-/**
- * camel_operation_cancel_unblock:
- * @cc: operation context
- *
- * 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)
-{
- if (cc == NULL)
- cc = (CamelOperation *)pthread_getspecific(operation_key);
-
- if (cc) {
- LOCK();
- cc->blocked--;
- UNLOCK();
- }
-}
-
-/**
- * camel_operation_cancel:
- * @cc: operation context
- *
- * Cancel a given operation. If @cc is NULL then all outstanding
- * operations are cancelled.
- **/
-void
-camel_operation_cancel (CamelOperation *cc)
-{
- CamelOperationMsg *msg;
-
- LOCK();
-
- if (cc == NULL) {
- CamelOperation *cn;
-
- cc = (CamelOperation *)operation_list.head;
- cn = cc->next;
- while (cn) {
- cc->flags |= CAMEL_OPERATION_CANCELLED;
- msg = g_malloc0(sizeof(*msg));
- e_msgport_put(cc->cancel_port, (EMsg *)msg);
- cc = cn;
- cn = cn->next;
- }
- } else if ((cc->flags & CAMEL_OPERATION_CANCELLED) == 0) {
- d(printf("cancelling thread %d\n", cc->id));
-
- cc->flags |= CAMEL_OPERATION_CANCELLED;
- msg = g_malloc0(sizeof(*msg));
- e_msgport_put(cc->cancel_port, (EMsg *)msg);
- }
-
- UNLOCK();
-}
-
-/**
- * camel_operation_register:
- * @cc: operation context
- *
- * Register a thread or the main thread for cancellation through @cc.
- * If @cc is NULL, then a new cancellation is created for this thread.
- *
- * All calls to operation_register() should be matched with calls to
- * operation_unregister(), or resources will be lost.
- *
- * Return Value: Returns @cc, or if NULL, the new operation.
- *
- **/
-CamelOperation *
-camel_operation_register (CamelOperation *cc)
-{
- CamelOperation *oldcc = pthread_getspecific(operation_key);
-
- pthread_setspecific(operation_key, cc);
-
- return oldcc;
-}
-
-/**
- * camel_operation_unregister:
- * @cc: operation context
- *
- * Unregister the current thread.
- **/
-void
-camel_operation_unregister (CamelOperation *cc)
-{
- pthread_setspecific(operation_key, NULL);
-}
-
-/**
- * camel_operation_cancel_check:
- * @cc: operation context
- *
- * 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()));
-
- if (cc == NULL)
- cc = (CamelOperation *)pthread_getspecific(operation_key);
-
- LOCK();
-
- 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;
-
- UNLOCK();
-
- return cancelled;
-}
-
-/**
- * camel_operation_cancel_fd:
- * @cc: operation context
- *
- * 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)
- cc = (CamelOperation *)pthread_getspecific(operation_key);
-
- if (cc == NULL || cc->blocked)
- return -1;
-
- LOCK();
-
- if (cc->cancel_fd == -1)
- cc->cancel_fd = e_msgport_fd(cc->cancel_port);
-
- UNLOCK();
-
- return cc->cancel_fd;
-}
-
-#ifdef HAVE_NSS
-/**
- * camel_operation_cancel_prfd:
- * @cc: operation context
- *
- * Retrieve a file descriptor that can be waited on (select, or poll)
- * for read, to asynchronously detect cancellation.
- *
- * Return value: The fd, or NULL if cancellation is not available
- * (blocked, or has not been registered for this thread).
- **/
-PRFileDesc *
-camel_operation_cancel_prfd (CamelOperation *cc)
-{
- if (cc == NULL)
- cc = (CamelOperation *)pthread_getspecific(operation_key);
-
- if (cc == NULL || cc->blocked)
- return NULL;
-
- LOCK();
-
- if (cc->cancel_prfd == NULL)
- cc->cancel_prfd = e_msgport_prfd(cc->cancel_port);
-
- UNLOCK();
-
- return cc->cancel_prfd;
-}
-#endif /* HAVE_NSS */
-
-/**
- * camel_operation_start:
- * @cc: operation context
- * @what: action being performed (printf-style format string)
- * @Varargs: varargs
- *
- * 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 (cc == NULL)
- cc = (CamelOperation *)pthread_getspecific(operation_key);
-
- if (cc == NULL)
- return;
-
- LOCK();
-
- if (cc->status == NULL) {
- 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);
-
- UNLOCK();
-
- cc->status(cc, msg, CAMEL_OPERATION_START, cc->status_data);
-
- d(printf("start '%s'\n", msg, pc));
-}
-
-/**
- * camel_operation_start_transient:
- * @cc: operation context
- * @what: printf-style format string describing the action being performed
- * @Varargs: varargs
- *
- * 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 (cc == NULL)
- cc = (CamelOperation *)pthread_getspecific(operation_key);
-
- if (cc == NULL || cc->status == NULL)
- return;
-
- LOCK();
-
- 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));
-
- 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 (cc == NULL)
- cc = (CamelOperation *)pthread_getspecific(operation_key);
-
- if (cc == NULL)
- return;
-
- LOCK();
-
- if (cc->status == NULL || cc->status_stack == NULL) {
- UNLOCK();
- return;
- }
-
- s = cc->status_stack->data;
- s->pc = pc;
-
- /* Transient messages dont start updating till 4 seconds after
- they started, then they update every second */
- now = stamp();
- if (cc->status_update == now) {
- cc = NULL;
- } else if (s->flags & CAMEL_OPERATION_TRANSIENT) {
- if (s->stamp + CAMEL_OPERATION_TRANSIENT_DELAY > now) {
- cc = NULL;
- } else {
- cc->status_update = now;
- cc->lastreport = s;
- msg = g_strdup(s->msg);
- }
- } else {
- s->stamp = cc->status_update = now;
- cc->lastreport = s;
- msg = g_strdup(s->msg);
- }
-
- UNLOCK();
-
- if (cc) {
- cc->status(cc, msg, pc, cc->status_data);
- g_free(msg);
- }
-}
-
-/**
- * camel_operation_progress_count:
- * @cc: operation context
- * @sofar:
- *
- **/
-void
-camel_operation_progress_count (CamelOperation *cc, int sofar)
-{
- camel_operation_progress(cc, sofar);
-}
-
-/**
- * camel_operation_end:
- * @cc: operation context
- * @what: Format string.
- * @Varargs: varargs
- *
- * 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 (cc == NULL)
- cc = (CamelOperation *)pthread_getspecific(operation_key);
-
- if (cc == NULL)
- return;
-
- LOCK();
-
- if (cc->status == NULL || cc->status_stack == NULL) {
- 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 + CAMEL_OPERATION_TRANSIENT_DELAY < now) {
- 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);
-
- 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 62e29dc2ac..0000000000
--- a/camel/camel-operation.h
+++ /dev/null
@@ -1,74 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 */
-void camel_operation_init(void);
-
-CamelOperation *camel_operation_new(CamelOperationStatusFunc status, void *status_data);
-void camel_operation_mute(CamelOperation *cc);
-void camel_operation_ref(CamelOperation *cc);
-void camel_operation_unref(CamelOperation *cc);
-void camel_operation_cancel(CamelOperation *cc);
-/* subthread functions */
-CamelOperation *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);
-#ifdef HAVE_NSS
-struct PRFileDesc *camel_operation_cancel_prfd(CamelOperation *cc);
-#endif
-/* 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-partition-table.c b/camel/camel-partition-table.c
deleted file mode 100644
index e5b2639a4a..0000000000
--- a/camel/camel-partition-table.c
+++ /dev/null
@@ -1,998 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2001-2003 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/uio.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-
-#include "e-util/e-msgport.h"
-
-#include "camel-block-file.h"
-#include "camel-partition-table.h"
-
-/* Do we synchronously write table updates - makes the
- tables consistent after program crash without sync */
-/*#define SYNC_UPDATES*/
-
-#define d(x) /*(printf("%s(%d):%s: ", __FILE__, __LINE__, __PRETTY_FUNCTION__),(x))*/
-/* key index debug */
-#define k(x) /*(printf("%s(%d):%s: ", __FILE__, __LINE__, __PRETTY_FUNCTION__),(x))*/
-
-
-struct _CamelPartitionTablePrivate {
- pthread_mutex_t lock; /* for locking partition */
-};
-
-#define CAMEL_PARTITION_TABLE_LOCK(kf, lock) (pthread_mutex_lock(&(kf)->priv->lock))
-#define CAMEL_PARTITION_TABLE_UNLOCK(kf, lock) (pthread_mutex_unlock(&(kf)->priv->lock))
-
-
-static void
-camel_partition_table_class_init(CamelPartitionTableClass *klass)
-{
-}
-
-static void
-camel_partition_table_init(CamelPartitionTable *cpi)
-{
- struct _CamelPartitionTablePrivate *p;
-
- e_dlist_init(&cpi->partition);
-
- p = cpi->priv = g_malloc0(sizeof(*cpi->priv));
- pthread_mutex_init(&p->lock, NULL);
-}
-
-static void
-camel_partition_table_finalise(CamelPartitionTable *cpi)
-{
- CamelBlock *bl;
- struct _CamelPartitionTablePrivate *p;
-
- p = cpi->priv;
-
- if (cpi->blocks) {
- while ((bl = (CamelBlock *)e_dlist_remhead(&cpi->partition))) {
- camel_block_file_sync_block(cpi->blocks, bl);
- camel_block_file_unref_block(cpi->blocks, bl);
- }
- camel_block_file_sync(cpi->blocks);
-
- camel_object_unref((CamelObject *)cpi->blocks);
- }
-
- pthread_mutex_destroy(&p->lock);
-
- g_free(p);
-
-}
-
-CamelType
-camel_partition_table_get_type(void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register(camel_object_get_type(), "CamelPartitionTable",
- sizeof (CamelPartitionTable),
- sizeof (CamelPartitionTableClass),
- (CamelObjectClassInitFunc) camel_partition_table_class_init,
- NULL,
- (CamelObjectInitFunc) camel_partition_table_init,
- (CamelObjectFinalizeFunc) camel_partition_table_finalise);
- }
-
- return type;
-}
-
-/* ********************************************************************** */
-
-/*
- Have 2 hashes:
- Name -> nameid
- Word -> wordid
-
-nameid is pointer to name file, includes a bit to say if name is deleted
-wordid is a pointer to word file, includes pointer to start of word entries
-
-delete a name -> set it as deleted, do nothing else though
-
-lookup word, if nameid is deleted, mark it in wordlist as unused and mark for write (?)
-*/
-
-/* ********************************************************************** */
-
-/* This simple hash seems to work quite well */
-static camel_hash_t hash_key(const char *key)
-{
- camel_hash_t hash = 0xABADF00D;
-
- while (*key) {
- hash = hash * (*key) ^ (*key);
- key++;
- }
-
- return hash;
-}
-
-/* Call with lock held */
-static CamelBlock *find_partition(CamelPartitionTable *cpi, camel_hash_t id, int *indexp)
-{
- int index, jump;
- CamelBlock *bl;
- CamelPartitionMapBlock *ptb;
- CamelPartitionMap *part;
-
- /* first, find the block this key might be in, then binary search the block */
- bl = (CamelBlock *)cpi->partition.head;
- while (bl->next) {
- ptb = (CamelPartitionMapBlock *)&bl->data;
- part = ptb->partition;
- if (ptb->used > 0 && id <= part[ptb->used-1].hashid) {
- index = ptb->used/2;
- jump = ptb->used/4;
-
- if (jump == 0)
- jump = 1;
-
- while (1) {
- if (id <= part[index].hashid) {
- if (index == 0 || id > part[index-1].hashid)
- break;
- index -= jump;
- } else {
- if (index >= ptb->used-1)
- break;
- index += jump;
- }
- jump = jump/2;
- if (jump == 0)
- jump = 1;
- }
- *indexp = index;
-
- return bl;
- }
- bl = bl->next;
- }
-
- g_warning("could not find a partition that could fit ! partition table corrupt!");
-
- /* This should never be reached */
-
- return NULL;
-}
-
-CamelPartitionTable *camel_partition_table_new(struct _CamelBlockFile *bs, camel_block_t root)
-{
- CamelPartitionTable *cpi;
- CamelPartitionMapBlock *ptb;
- CamelPartitionKeyBlock *kb;
- CamelBlock *block, *pblock;
-
- cpi = (CamelPartitionTable *)camel_object_new(camel_partition_table_get_type());
- cpi->rootid = root;
- cpi->blocks = bs;
- camel_object_ref((CamelObject *)bs);
-
- /* read the partition table into memory */
- do {
- block = camel_block_file_get_block(bs, root);
- if (block == NULL)
- goto fail;
-
- ptb = (CamelPartitionMapBlock *)&block->data;
-
- d(printf("Adding partition block, used = %d, hashid = %08x\n", ptb->used, ptb->partition[0].hashid));
-
- /* if we have no data, prime initial block */
- if (ptb->used == 0 && e_dlist_empty(&cpi->partition) && ptb->next == 0) {
- pblock = camel_block_file_new_block(bs);
- if (pblock == NULL) {
- camel_block_file_unref_block(bs, block);
- goto fail;
- }
- kb = (CamelPartitionKeyBlock *)&pblock->data;
- kb->used = 0;
- ptb->used = 1;
- ptb->partition[0].hashid = 0xffffffff;
- ptb->partition[0].blockid = pblock->id;
- camel_block_file_touch_block(bs, pblock);
- camel_block_file_unref_block(bs, pblock);
- camel_block_file_touch_block(bs, block);
-#ifdef SYNC_UPDATES
- camel_block_file_sync_block(bs, block);
-#endif
- }
-
- root = ptb->next;
- camel_block_file_detach_block(bs, block);
- e_dlist_addtail(&cpi->partition, (EDListNode *)block);
- } while (root);
-
- return cpi;
-
-fail:
- camel_object_unref((CamelObject *)cpi);
- return NULL;
-}
-
-/* sync our blocks, the caller must still sync the blockfile itself */
-int
-camel_partition_table_sync(CamelPartitionTable *cpi)
-{
- CamelBlock *bl, *bn;
- struct _CamelPartitionTablePrivate *p;
- int ret = 0;
-
- CAMEL_PARTITION_TABLE_LOCK(cpi, lock);
-
- p = cpi->priv;
-
- if (cpi->blocks) {
- bl = (CamelBlock *)cpi->partition.head;
- bn = bl->next;
- while (bn) {
- ret = camel_block_file_sync_block(cpi->blocks, bl);
- if (ret == -1)
- goto fail;
- bl = bn;
- bn = bn->next;
- }
- }
-fail:
- CAMEL_PARTITION_TABLE_UNLOCK(cpi, lock);
-
- return ret;
-}
-
-camel_key_t camel_partition_table_lookup(CamelPartitionTable *cpi, const char *key)
-{
- CamelPartitionKeyBlock *pkb;
- CamelPartitionMapBlock *ptb;
- CamelBlock *block, *ptblock;
- camel_hash_t hashid;
- camel_key_t keyid = 0;
- int index, i;
-
- hashid = hash_key(key);
-
- CAMEL_PARTITION_TABLE_LOCK(cpi, lock);
-
- ptblock = find_partition(cpi, hashid, &index);
- if (ptblock == NULL) {
- CAMEL_PARTITION_TABLE_UNLOCK(cpi, lock);
- return 0;
- }
- ptb = (CamelPartitionMapBlock *)&ptblock->data;
- block = camel_block_file_get_block(cpi->blocks, ptb->partition[index].blockid);
- if (block == NULL) {
- CAMEL_PARTITION_TABLE_UNLOCK(cpi, lock);
- return 0;
- }
-
- pkb = (CamelPartitionKeyBlock *)&block->data;
-
- /* What to do about duplicate hash's? */
- for (i=0;i<pkb->used;i++) {
- if (pkb->keys[i].hashid == hashid) {
- /* !! need to: lookup and compare string value */
- /* get_key() if key == key ... */
- keyid = pkb->keys[i].keyid;
- break;
- }
- }
-
- CAMEL_PARTITION_TABLE_UNLOCK(cpi, lock);
-
- camel_block_file_unref_block(cpi->blocks, block);
-
- return keyid;
-}
-
-void camel_partition_table_remove(CamelPartitionTable *cpi, const char *key)
-{
- CamelPartitionKeyBlock *pkb;
- CamelPartitionMapBlock *ptb;
- CamelBlock *block, *ptblock;
- camel_hash_t hashid;
- camel_key_t keyid = 0;
- int index, i;
-
- hashid = hash_key(key);
-
- CAMEL_PARTITION_TABLE_LOCK(cpi, lock);
-
- ptblock = find_partition(cpi, hashid, &index);
- if (ptblock == NULL) {
- CAMEL_PARTITION_TABLE_UNLOCK(cpi, lock);
- return;
- }
- ptb = (CamelPartitionMapBlock *)&ptblock->data;
- block = camel_block_file_get_block(cpi->blocks, ptb->partition[index].blockid);
- if (block == NULL) {
- CAMEL_PARTITION_TABLE_UNLOCK(cpi, lock);
- return;
- }
- pkb = (CamelPartitionKeyBlock *)&block->data;
-
- /* What to do about duplicate hash's? */
- for (i=0;i<pkb->used;i++) {
- if (pkb->keys[i].hashid == hashid) {
- /* !! need to: lookup and compare string value */
- /* get_key() if key == key ... */
- keyid = pkb->keys[i].keyid;
-
- /* remove this key */
- pkb->used--;
- for (;i<pkb->used;i++) {
- pkb->keys[i].keyid = pkb->keys[i+1].keyid;
- pkb->keys[i].hashid = pkb->keys[i+1].hashid;
- }
- camel_block_file_touch_block(cpi->blocks, block);
- break;
- }
- }
-
- CAMEL_PARTITION_TABLE_UNLOCK(cpi, lock);
-
- camel_block_file_unref_block(cpi->blocks, block);
-}
-
-static int
-keys_cmp(const void *ap, const void *bp)
-{
- const CamelPartitionKey *a = ap;
- const CamelPartitionKey *b = bp;
-
- if (a->hashid < b->hashid)
- return -1;
- else if (a->hashid > b->hashid)
- return 1;
-
- return 0;
-}
-
-int
-camel_partition_table_add(CamelPartitionTable *cpi, const char *key, camel_key_t keyid)
-{
- camel_hash_t hashid, partid;
- int index, newindex = 0; /* initialisation of this and pkb/nkb is just to silence compiler */
- CamelPartitionMapBlock *ptb, *ptn;
- CamelPartitionKeyBlock *kb, *newkb, *nkb = NULL, *pkb = NULL;
- CamelBlock *block, *ptblock, *ptnblock;
- int i, half, len;
- struct _CamelPartitionKey keys[CAMEL_BLOCK_SIZE/4];
- int ret = -1;
-
-#define KEY_SIZE (sizeof(kb->keys)/sizeof(kb->keys[0]))
-
- hashid = hash_key(key);
-
- CAMEL_PARTITION_TABLE_LOCK(cpi, lock);
- ptblock = find_partition(cpi, hashid, &index);
- if (ptblock == NULL) {
- CAMEL_PARTITION_TABLE_UNLOCK(cpi, lock);
- return -1;
- }
- ptb = (CamelPartitionMapBlock *)&ptblock->data;
- block = camel_block_file_get_block(cpi->blocks, ptb->partition[index].blockid);
- if (block == NULL) {
- CAMEL_PARTITION_TABLE_UNLOCK(cpi, lock);
- return -1;
- }
- kb = (CamelPartitionKeyBlock *)&block->data;
-
- /* TODO: Keep the key array in sorted order, cheaper lookups and split operation */
-
- if (kb->used < sizeof(kb->keys)/sizeof(kb->keys[0])) {
- /* Have room, just put it in */
- kb->keys[kb->used].hashid = hashid;
- kb->keys[kb->used].keyid = keyid;
- kb->used++;
- } else {
- CamelBlock *newblock = NULL, *nblock = NULL, *pblock = NULL;
-
- /* Need to split? See if previous or next has room, then split across that instead */
-
- /* TODO: Should look at next/previous partition table block as well ... */
-
- if (index > 0) {
- pblock = camel_block_file_get_block(cpi->blocks, ptb->partition[index-1].blockid);
- if (pblock == NULL)
- goto fail;
- pkb = (CamelPartitionKeyBlock *)&pblock->data;
- }
- if (index < (ptb->used-1)) {
- nblock = camel_block_file_get_block(cpi->blocks, ptb->partition[index+1].blockid);
- if (nblock == NULL) {
- if (pblock)
- camel_block_file_unref_block(cpi->blocks, pblock);
- goto fail;
- }
- nkb = (CamelPartitionKeyBlock *)&nblock->data;
- }
-
- if (pblock && pkb->used < KEY_SIZE) {
- if (nblock && nkb->used < KEY_SIZE) {
- if (pkb->used < nkb->used) {
- newindex = index+1;
- newblock = nblock;
- } else {
- newindex = index-1;
- newblock = pblock;
- }
- } else {
- newindex = index-1;
- newblock = pblock;
- }
- } else {
- if (nblock && nkb->used < KEY_SIZE) {
- newindex = index+1;
- newblock = nblock;
- }
- }
-
- /* We had no room, need to split across another block */
- if (newblock == NULL) {
- /* See if we have room in the partition table for this block or need to split that too */
- if (ptb->used >= sizeof(ptb->partition)/sizeof(ptb->partition[0])) {
- /* TODO: Could check next block to see if it'll fit there first */
- ptnblock = camel_block_file_new_block(cpi->blocks);
- if (ptnblock == NULL) {
- if (nblock)
- camel_block_file_unref_block(cpi->blocks, nblock);
- if (pblock)
- camel_block_file_unref_block(cpi->blocks, pblock);
- goto fail;
- }
- camel_block_file_detach_block(cpi->blocks, ptnblock);
-
- /* split block and link on-disk, always sorted */
- ptn = (CamelPartitionMapBlock *)&ptnblock->data;
- ptn->next = ptb->next;
- ptb->next = ptnblock->id;
- len = ptb->used / 2;
- ptn->used = ptb->used - len;
- ptb->used = len;
- memcpy(ptn->partition, &ptb->partition[len], ptn->used * sizeof(ptb->partition[0]));
-
- /* link in-memory */
- ptnblock->next = ptblock->next;
- ptblock->next->prev = ptnblock;
- ptblock->next = ptnblock;
- ptnblock->prev = ptblock;
-
- /* write in right order to ensure structure */
- camel_block_file_touch_block(cpi->blocks, ptnblock);
-#ifdef SYNC_UPDATES
- camel_block_file_sync_block(cpi->blocks, ptnblock);
-#endif
- if (index > len) {
- camel_block_file_touch_block(cpi->blocks, ptblock);
-#ifdef SYNC_UPDATES
- camel_block_file_sync_block(cpi->blocks, ptblock);
-#endif
- index -= len;
- ptb = ptn;
- ptblock = ptnblock;
- }
- }
-
- /* try get newblock before modifying existing */
- newblock = camel_block_file_new_block(cpi->blocks);
- if (newblock == NULL) {
- if (nblock)
- camel_block_file_unref_block(cpi->blocks, nblock);
- if (pblock)
- camel_block_file_unref_block(cpi->blocks, pblock);
- goto fail;
- }
-
- for (i=ptb->used-1;i>index;i--) {
- ptb->partition[i+1].hashid = ptb->partition[i].hashid;
- ptb->partition[i+1].blockid = ptb->partition[i].blockid;
- }
- ptb->used++;
-
- newkb = (CamelPartitionKeyBlock *)&newblock->data;
- newkb->used = 0;
- newindex = index+1;
-
- ptb->partition[newindex].hashid = ptb->partition[index].hashid;
- ptb->partition[newindex].blockid = newblock->id;
-
- if (nblock)
- camel_block_file_unref_block(cpi->blocks, nblock);
- if (pblock)
- camel_block_file_unref_block(cpi->blocks, pblock);
- } else {
- newkb = (CamelPartitionKeyBlock *)&newblock->data;
-
- if (newblock == pblock) {
- if (nblock)
- camel_block_file_unref_block(cpi->blocks, nblock);
- } else {
- if (pblock)
- camel_block_file_unref_block(cpi->blocks, pblock);
- }
- }
-
- /* sort keys to find midpoint */
- len = kb->used;
- memcpy(keys, kb->keys, sizeof(kb->keys[0])*len);
- memcpy(keys+len, newkb->keys, sizeof(newkb->keys[0])*newkb->used);
- len += newkb->used;
- keys[len].hashid = hashid;
- keys[len].keyid = keyid;
- len++;
- qsort(keys, len, sizeof(keys[0]), keys_cmp);
-
- /* Split keys, fix partition table */
- half = len/2;
- partid = keys[half-1].hashid;
-
- if (index < newindex) {
- memcpy(kb->keys, keys, sizeof(keys[0])*half);
- kb->used = half;
- memcpy(newkb->keys, keys+half, sizeof(keys[0])*(len-half));
- newkb->used = len-half;
- ptb->partition[index].hashid = partid;
- } else {
- memcpy(newkb->keys, keys, sizeof(keys[0])*half);
- newkb->used = half;
- memcpy(kb->keys, keys+half, sizeof(keys[0])*(len-half));
- kb->used = len-half;
- ptb->partition[newindex].hashid = partid;
- }
-
- camel_block_file_touch_block(cpi->blocks, ptblock);
-#ifdef SYNC_UPDATES
- camel_block_file_sync_block(cpi->blocks, ptblock);
-#endif
- camel_block_file_touch_block(cpi->blocks, newblock);
- camel_block_file_unref_block(cpi->blocks, newblock);
- }
-
- camel_block_file_touch_block(cpi->blocks, block);
- camel_block_file_unref_block(cpi->blocks, block);
-
- ret = 0;
-fail:
- CAMEL_PARTITION_TABLE_UNLOCK(cpi, lock);
-
- return ret;
-}
-
-/* ********************************************************************** */
-
-
-struct _CamelKeyTablePrivate {
- pthread_mutex_t lock; /* for locking key */
-};
-
-#define CAMEL_KEY_TABLE_LOCK(kf, lock) (pthread_mutex_lock(&(kf)->priv->lock))
-#define CAMEL_KEY_TABLE_UNLOCK(kf, lock) (pthread_mutex_unlock(&(kf)->priv->lock))
-
-
-static void
-camel_key_table_class_init(CamelKeyTableClass *klass)
-{
-}
-
-static void
-camel_key_table_init(CamelKeyTable *ki)
-{
- struct _CamelKeyTablePrivate *p;
-
- p = ki->priv = g_malloc0(sizeof(*ki->priv));
- pthread_mutex_init(&p->lock, NULL);
-}
-
-static void
-camel_key_table_finalise(CamelKeyTable *ki)
-{
- struct _CamelKeyTablePrivate *p;
-
- p = ki->priv;
-
- if (ki->blocks) {
- if (ki->root_block) {
- camel_block_file_sync_block(ki->blocks, ki->root_block);
- camel_block_file_unref_block(ki->blocks, ki->root_block);
- }
- camel_block_file_sync(ki->blocks);
- camel_object_unref((CamelObject *)ki->blocks);
- }
-
- pthread_mutex_destroy(&p->lock);
-
- g_free(p);
-
-}
-
-CamelType
-camel_key_table_get_type(void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register(camel_object_get_type(), "CamelKeyTable",
- sizeof (CamelKeyTable),
- sizeof (CamelKeyTableClass),
- (CamelObjectClassInitFunc) camel_key_table_class_init,
- NULL,
- (CamelObjectInitFunc) camel_key_table_init,
- (CamelObjectFinalizeFunc) camel_key_table_finalise);
- }
-
- return type;
-}
-
-
-CamelKeyTable *
-camel_key_table_new(CamelBlockFile *bs, camel_block_t root)
-{
- CamelKeyTable *ki;
-
- ki = (CamelKeyTable *)camel_object_new(camel_key_table_get_type());
-
- ki->blocks = bs;
- camel_object_ref((CamelObject *)bs);
- ki->rootid = root;
-
- ki->root_block = camel_block_file_get_block(bs, ki->rootid);
- if (ki->root_block == NULL) {
- camel_object_unref((CamelObject *)ki);
- ki = NULL;
- } else {
- camel_block_file_detach_block(bs, ki->root_block);
- ki->root = (CamelKeyRootBlock *)&ki->root_block->data;
-
- k(printf("Opening key index\n"));
- k(printf(" first %u\n last %u\n free %u\n", ki->root->first, ki->root->last, ki->root->free));
- }
-
- return ki;
-}
-
-int
-camel_key_table_sync(CamelKeyTable *ki)
-{
-#ifdef SYNC_UPDATES
- return 0;
-#else
- return camel_block_file_sync_block(ki->blocks, ki->root_block);
-#endif
-}
-
-camel_key_t
-camel_key_table_add(CamelKeyTable *ki, const char *key, camel_block_t data, unsigned int flags)
-{
- CamelBlock *last, *next;
- CamelKeyBlock *kblast, *kbnext;
- int len, left;
- unsigned int offset;
- camel_key_t keyid = 0;
-
- /* Maximum key size = 128 chars */
- len = strlen(key);
- if (len > CAMEL_KEY_TABLE_MAX_KEY)
- len = 128;
-
- CAMEL_KEY_TABLE_LOCK(ki, lock);
-
- if (ki->root->last == 0) {
- last = camel_block_file_new_block(ki->blocks);
- if (last == NULL)
- goto fail;
- ki->root->last = ki->root->first = last->id;
- camel_block_file_touch_block(ki->blocks, ki->root_block);
- k(printf("adding first block, first = %u\n", ki->root->first));
- } else {
- last = camel_block_file_get_block(ki->blocks, ki->root->last);
- if (last == NULL)
- goto fail;
- }
-
- kblast = (CamelKeyBlock *)&last->data;
-
- if (kblast->used >= 127)
- goto fail;
-
- if (kblast->used > 0) {
- /*left = &kblast->u.keydata[kblast->u.keys[kblast->used-1].offset] - (char *)(&kblast->u.keys[kblast->used+1]);*/
- left = kblast->u.keys[kblast->used-1].offset - sizeof(kblast->u.keys[0])*(kblast->used+1);
- d(printf("key '%s' used = %d (%d), filled = %d, left = %d len = %d?\n",
- key, kblast->used, kblast->used * sizeof(kblast->u.keys[0]),
- sizeof(kblast->u.keydata) - kblast->u.keys[kblast->used-1].offset,
- left, len));
- if (left < len) {
- next = camel_block_file_new_block(ki->blocks);
- if (next == NULL) {
- camel_block_file_unref_block(ki->blocks, last);
- goto fail;
- }
- kbnext = (CamelKeyBlock *)&next->data;
- kblast->next = next->id;
- ki->root->last = next->id;
- d(printf("adding new block, first = %u, last = %u\n", ki->root->first, ki->root->last));
- camel_block_file_touch_block(ki->blocks, ki->root_block);
- camel_block_file_touch_block(ki->blocks, last);
- camel_block_file_unref_block(ki->blocks, last);
- kblast = kbnext;
- last = next;
- }
- }
-
- if (kblast->used > 0)
- offset = kblast->u.keys[kblast->used-1].offset - len;
- else
- offset = sizeof(kblast->u.keydata)-len;
-
- kblast->u.keys[kblast->used].flags = flags;
- kblast->u.keys[kblast->used].data = data;
- kblast->u.keys[kblast->used].offset = offset;
- memcpy(kblast->u.keydata + offset, key, len);
-
- keyid = (last->id & (~(CAMEL_BLOCK_SIZE-1))) | kblast->used;
-
- kblast->used++;
-
- g_assert(kblast->used < 127);
-
- camel_block_file_touch_block(ki->blocks, last);
- camel_block_file_unref_block(ki->blocks, last);
-
-#ifdef SYNC_UPDATES
- camel_block_file_sync_block(ki->blocks, ki->root_block);
-#endif
-fail:
- CAMEL_KEY_TABLE_UNLOCK(ki, lock);
-
- return keyid;
-}
-
-void
-camel_key_table_set_data(CamelKeyTable *ki, camel_key_t keyid, camel_block_t data)
-{
- CamelBlock *bl;
- camel_block_t blockid;
- int index;
- CamelKeyBlock *kb;
-
- if (keyid == 0)
- return;
-
- blockid = keyid & (~(CAMEL_BLOCK_SIZE-1));
- index = keyid & (CAMEL_BLOCK_SIZE-1);
-
- bl = camel_block_file_get_block(ki->blocks, blockid);
- if (bl == NULL)
- return;
- kb = (CamelKeyBlock *)&bl->data;
-
- CAMEL_KEY_TABLE_LOCK(ki, lock);
-
- if (kb->u.keys[index].data != data) {
- kb->u.keys[index].data = data;
- camel_block_file_touch_block(ki->blocks, bl);
- }
-
- CAMEL_KEY_TABLE_UNLOCK(ki, lock);
-
- camel_block_file_unref_block(ki->blocks, bl);
-}
-
-void
-camel_key_table_set_flags(CamelKeyTable *ki, camel_key_t keyid, unsigned int flags, unsigned int set)
-{
- CamelBlock *bl;
- camel_block_t blockid;
- int index;
- CamelKeyBlock *kb;
- unsigned int old;
-
- if (keyid == 0)
- return;
-
- blockid = keyid & (~(CAMEL_BLOCK_SIZE-1));
- index = keyid & (CAMEL_BLOCK_SIZE-1);
-
- bl = camel_block_file_get_block(ki->blocks, blockid);
- if (bl == NULL)
- return;
- kb = (CamelKeyBlock *)&bl->data;
-
- g_assert(kb->used < 127);
- g_assert(index < kb->used);
-
- CAMEL_KEY_TABLE_LOCK(ki, lock);
-
- old = kb->u.keys[index].flags;
- if ((old & set) != (flags & set)) {
- kb->u.keys[index].flags = (old & (~set)) | (flags & set);
- camel_block_file_touch_block(ki->blocks, bl);
- }
-
- CAMEL_KEY_TABLE_UNLOCK(ki, lock);
-
- camel_block_file_unref_block(ki->blocks, bl);
-}
-
-camel_block_t
-camel_key_table_lookup(CamelKeyTable *ki, camel_key_t keyid, char **keyp, unsigned int *flags)
-{
- CamelBlock *bl;
- camel_block_t blockid;
- int index, len, off;
- char *key;
- CamelKeyBlock *kb;
-
- if (keyp)
- *keyp = 0;
- if (flags)
- *flags = 0;
- if (keyid == 0)
- return 0;
-
- blockid = keyid & (~(CAMEL_BLOCK_SIZE-1));
- index = keyid & (CAMEL_BLOCK_SIZE-1);
-
- bl = camel_block_file_get_block(ki->blocks, blockid);
- if (bl == NULL)
- return 0;
-
- kb = (CamelKeyBlock *)&bl->data;
-
-#if 1
- g_assert(kb->used < 127); /* this should be more accurate */
- g_assert(index < kb->used);
-#else
- if (kb->used >=127 || index >= kb->used) {
- g_warning("Block %x: Invalid index or content: index %d used %d\n", blockid, index, kb->used);
- return 0;
- }
-#endif
-
- CAMEL_KEY_TABLE_LOCK(ki, lock);
-
- blockid = kb->u.keys[index].data;
- if (flags)
- *flags = kb->u.keys[index].flags;
-
- if (keyp) {
- off = kb->u.keys[index].offset;
- if (index == 0)
- len = sizeof(kb->u.keydata) - off;
- else
- len = kb->u.keys[index-1].offset - off;
- *keyp = key = g_malloc(len+1);
- memcpy(key, kb->u.keydata + off, len);
- key[len] = 0;
- }
-
- CAMEL_KEY_TABLE_UNLOCK(ki, lock);
-
- camel_block_file_unref_block(ki->blocks, bl);
-
- return blockid;
-}
-
-/* iterate through all keys */
-camel_key_t
-camel_key_table_next(CamelKeyTable *ki, camel_key_t next, char **keyp, unsigned int *flagsp, camel_block_t *datap)
-{
- CamelBlock *bl;
- CamelKeyBlock *kb;
- camel_block_t blockid;
- int index;
-
- if (keyp)
- *keyp = 0;
- if (flagsp)
- *flagsp = 0;
- if (datap)
- *datap = 0;
-
- CAMEL_KEY_TABLE_LOCK(ki, lock);
-
- if (next == 0) {
- next = ki->root->first;
- if (next == 0) {
- CAMEL_KEY_TABLE_UNLOCK(ki, lock);
- return 0;
- }
- } else
- next++;
-
- do {
- blockid = next & (~(CAMEL_BLOCK_SIZE-1));
- index = next & (CAMEL_BLOCK_SIZE-1);
-
- bl = camel_block_file_get_block(ki->blocks, blockid);
- if (bl == NULL) {
- CAMEL_KEY_TABLE_UNLOCK(ki, lock);
- return 0;
- }
-
- kb = (CamelKeyBlock *)&bl->data;
-
- /* see if we need to goto the next block */
- if (index >= kb->used) {
- /* FIXME: check for loops */
- next = kb->next;
- camel_block_file_unref_block(ki->blocks, bl);
- bl = NULL;
- }
- } while (bl == NULL);
-
- /* invalid block data */
- if ((kb->u.keys[index].offset >= sizeof(kb->u.keydata)
- /*|| kb->u.keys[index].offset < kb->u.keydata - (char *)&kb->u.keys[kb->used])*/
- || kb->u.keys[index].offset < sizeof(kb->u.keys[0]) * kb->used
- || (index > 0 &&
- (kb->u.keys[index-1].offset >= sizeof(kb->u.keydata)
- /*|| kb->u.keys[index-1].offset < kb->u.keydata - (char *)&kb->u.keys[kb->used]))) {*/
- || kb->u.keys[index-1].offset < sizeof(kb->u.keys[0]) * kb->used)))) {
- g_warning("Block %u invalid scanning keys", bl->id);
- camel_block_file_unref_block(ki->blocks, bl);
- CAMEL_KEY_TABLE_UNLOCK(ki, lock);
- return 0;
- }
-
- if (datap)
- *datap = kb->u.keys[index].data;
-
- if (flagsp)
- *flagsp = kb->u.keys[index].flags;
-
- if (keyp) {
- int len, off = kb->u.keys[index].offset;
- char *key;
-
- if (index == 0)
- len = sizeof(kb->u.keydata) - off;
- else
- len = kb->u.keys[index-1].offset - off;
- *keyp = key = g_malloc(len+1);
- memcpy(key, kb->u.keydata + off, len);
- key[len] = 0;
- }
-
- CAMEL_KEY_TABLE_UNLOCK(ki, lock);
-
- camel_block_file_unref_block(ki->blocks, bl);
-
- return next;
-}
-
-/* ********************************************************************** */
diff --git a/camel/camel-partition-table.h b/camel/camel-partition-table.h
deleted file mode 100644
index 3433da3cf1..0000000000
--- a/camel/camel-partition-table.h
+++ /dev/null
@@ -1,152 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_PARTITION_TABLE_H
-#define _CAMEL_PARTITION_TABLE_H
-
-#include <camel/camel-object.h>
-#include <glib.h>
-#include <e-util/e-msgport.h>
-
-#include "camel-block-file.h"
-
-/* ********************************************************************** */
-
-/* CamelPartitionTable - index of key to keyid */
-
-typedef guint32 camel_hash_t; /* a hashed key */
-
-typedef struct _CamelPartitionKey CamelPartitionKey;
-typedef struct _CamelPartitionKeyBlock CamelPartitionKeyBlock;
-typedef struct _CamelPartitionMap CamelPartitionMap;
-typedef struct _CamelPartitionMapBlock CamelPartitionMapBlock;
-
-typedef struct _CamelPartitionTable CamelPartitionTable;
-typedef struct _CamelPartitionTableClass CamelPartitionTableClass;
-
-struct _CamelPartitionKey {
- camel_hash_t hashid;
- camel_key_t keyid;
-};
-
-struct _CamelPartitionKeyBlock {
- guint32 used;
- struct _CamelPartitionKey keys[(CAMEL_BLOCK_SIZE-4)/sizeof(struct _CamelPartitionKey)];
-};
-
-struct _CamelPartitionMap {
- camel_hash_t hashid;
- camel_block_t blockid;
-};
-
-struct _CamelPartitionMapBlock {
- camel_block_t next;
- guint32 used;
- struct _CamelPartitionMap partition[(CAMEL_BLOCK_SIZE-8)/sizeof(struct _CamelPartitionMap)];
-};
-
-struct _CamelPartitionTable {
- CamelObject parent;
-
- struct _CamelPartitionTablePrivate *priv;
-
- CamelBlockFile *blocks;
- camel_block_t rootid;
-
- int (*is_key)(CamelPartitionTable *cpi, const char *key, camel_key_t keyid, void *data);
- void *is_key_data;
-
- /* we keep a list of partition blocks active at all times */
- EDList partition;
-};
-
-struct _CamelPartitionTableClass {
- CamelObjectClass parent;
-};
-
-CamelType camel_partition_table_get_type(void);
-
-CamelPartitionTable *camel_partition_table_new(struct _CamelBlockFile *bs, camel_block_t root);
-int camel_partition_table_sync(CamelPartitionTable *cpi);
-int camel_partition_table_add(CamelPartitionTable *cpi, const char *key, camel_key_t keyid);
-camel_key_t camel_partition_table_lookup(CamelPartitionTable *cpi, const char *key);
-void camel_partition_table_remove(CamelPartitionTable *cpi, const char *key);
-
-/* ********************************************************************** */
-
-/* CamelKeyTable - index of keyid to key and flag and data mapping */
-
-typedef struct _CamelKeyBlock CamelKeyBlock;
-typedef struct _CamelKeyRootBlock CamelKeyRootBlock;
-
-typedef struct _CamelKeyTable CamelKeyTable;
-typedef struct _CamelKeyTableClass CamelKeyTableClass;
-
-struct _CamelKeyRootBlock {
- camel_block_t first;
- camel_block_t last;
- camel_key_t free; /* free list */
-};
-
-struct _CamelKeyKey {
- camel_block_t data;
- unsigned int offset:10;
- unsigned int flags:22;
-};
-
-struct _CamelKeyBlock {
- camel_block_t next;
- guint32 used;
- union {
- struct _CamelKeyKey keys[(CAMEL_BLOCK_SIZE-8)/sizeof(struct _CamelKeyKey)];
- char keydata[CAMEL_BLOCK_SIZE-8];
- } u;
-};
-
-#define CAMEL_KEY_TABLE_MAX_KEY (128) /* max size of any key */
-
-struct _CamelKeyTable {
- CamelObject parent;
-
- struct _CamelKeyTablePrivate *priv;
-
- CamelBlockFile *blocks;
-
- camel_block_t rootid;
-
- CamelKeyRootBlock *root;
- CamelBlock *root_block;
-};
-
-struct _CamelKeyTableClass {
- CamelObjectClass parent;
-};
-
-CamelType camel_key_table_get_type(void);
-
-CamelKeyTable * camel_key_table_new(CamelBlockFile *bs, camel_block_t root);
-int camel_key_table_sync(CamelKeyTable *ki);
-camel_key_t camel_key_table_add(CamelKeyTable *ki, const char *key, camel_block_t data, unsigned int flags);
-void camel_key_table_set_data(CamelKeyTable *ki, camel_key_t keyid, camel_block_t data);
-void camel_key_table_set_flags(CamelKeyTable *ki, camel_key_t keyid, unsigned int flags, unsigned int set);
-camel_block_t camel_key_table_lookup(CamelKeyTable *ki, camel_key_t keyid, char **key, unsigned int *flags);
-camel_key_t camel_key_table_next(CamelKeyTable *ki, camel_key_t next, char **keyp, unsigned int *flagsp, camel_block_t *datap);
-
-#endif /* ! _CAMEL_PARTITION_TABLE_H */
diff --git a/camel/camel-private.h b/camel/camel-private.h
deleted file mode 100644
index 87aeeff4b7..0000000000
--- a/camel/camel-private.h
+++ /dev/null
@@ -1,168 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <pthread.h>
-#include <e-util/e-msgport.h>
-
-struct _CamelFolderPrivate {
- EMutex *lock;
- EMutex *change_lock;
- /* must require the 'change_lock' to access this */
- int frozen;
- struct _CamelFolderChangeInfo *changed_frozen; /* queues changed events */
-};
-
-#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))
-
-
-struct _CamelStorePrivate {
- EMutex *folder_lock; /* for locking folder operations */
-};
-
-#define CAMEL_STORE_LOCK(f, l) (e_mutex_lock(((CamelStore *)f)->priv->l))
-#define CAMEL_STORE_UNLOCK(f, l) (e_mutex_unlock(((CamelStore *)f)->priv->l))
-
-
-struct _CamelTransportPrivate {
- GMutex *send_lock; /* for locking send operations */
-};
-
-#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))
-
-
-struct _CamelServicePrivate {
- EMutex *connect_lock; /* for locking connection operations */
- EMutex *connect_op_lock;/* for locking the connection_op */
-};
-
-#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))
-#define CAMEL_SERVICE_ASSERT_LOCKED(f, l) (e_mutex_assert_locked (((CamelService *)f)->priv->l))
-
-
-struct _CamelSessionPrivate {
- GMutex *lock; /* for locking everything basically */
- GMutex *thread_lock; /* locking threads */
-
- int thread_id;
- GHashTable *thread_active;
- EThread *thread_queue;
-
- GHashTable *thread_msg_op;
-};
-
-#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))
-
-
-/* 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 _CamelMimeFilterBasic *filter_uu;
- struct _CamelMimeFilterSave *filter_save;
- struct _CamelMimeFilterHTML *filter_html;
-
- struct _CamelStreamFilter *filter_stream;
-
- struct _CamelIndex *index;
-
- 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 */
-};
-
-#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))
-
-
-struct _CamelStoreSummaryPrivate {
- GMutex *summary_lock; /* for the summary hashtable/array */
- GMutex *io_lock; /* load/save lock, for access to saved_count, etc */
- GMutex *alloc_lock; /* for setting up and using allocators */
- GMutex *ref_lock; /* for reffing/unreffing messageinfo's ALWAYS obtain before summary_lock */
-};
-
-#define CAMEL_STORE_SUMMARY_LOCK(f, l) (g_mutex_lock(((CamelStoreSummary *)f)->priv->l))
-#define CAMEL_STORE_SUMMARY_UNLOCK(f, l) (g_mutex_unlock(((CamelStoreSummary *)f)->priv->l))
-
-
-struct _CamelVeeFolderPrivate {
- GList *folders; /* lock using subfolder_lock before changing/accessing */
- GList *folders_changed; /* for list of folders that have changed between updates */
- int freeze_count;
-
- GMutex *summary_lock; /* for locking vfolder summary */
- GMutex *subfolder_lock; /* for locking the subfolder list */
- GMutex *changed_lock; /* for locking the folders-changed list */
-};
-
-#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))
-
-
-struct _CamelDataWrapperPrivate {
- pthread_mutex_t stream_lock;
-};
-
-#define CAMEL_DATA_WRAPPER_LOCK(dw, l) (pthread_mutex_lock(&((CamelDataWrapper *)dw)->priv->l))
-#define CAMEL_DATA_WRAPPER_UNLOCK(dw, l) (pthread_mutex_unlock(&((CamelDataWrapper *)dw)->priv->l))
-
-
-/* most of this stuff really is private, but the lock can be used by subordinate classes */
-struct _CamelCertDBPrivate {
- GMutex *db_lock; /* for the db hashtable/array */
- GMutex *io_lock; /* load/save lock, for access to saved_count, etc */
- GMutex *alloc_lock; /* for setting up and using allocators */
- GMutex *ref_lock; /* for reffing/unreffing certs */
-};
-
-#define CAMEL_CERTDB_LOCK(db, l) (g_mutex_lock (((CamelCertDB *) db)->priv->l))
-#define CAMEL_CERTDB_UNLOCK(db, l) (g_mutex_unlock (((CamelCertDB *) db)->priv->l))
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_PRIVATE_H */
diff --git a/camel/camel-process.c b/camel/camel-process.c
deleted file mode 100644
index 04de281294..0000000000
--- a/camel/camel-process.c
+++ /dev/null
@@ -1,151 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2003 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 <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-
-#include "camel-process.h"
-
-
-pid_t
-camel_process_fork (const char *path, char **argv, int *infd, int *outfd, int *errfd, CamelException *ex)
-{
- int errnosav, fd[6], i;
- pid_t pid;
-
- for (i = 0; i < 6; i++)
- fds[i] = -1;
-
- for (i = 0; i < 6; i += 2) {
- if (pipe (fd + i) == -1) {
- errnosav = errno;
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to create pipe to '%s': %s"),
- argv[0], strerror (errno));
-
- for (i = 0; i < 6; i++) {
- if (fd[i] == -1)
- break;
- close (fd[i]);
- }
-
- errno = errnosav;
-
- return -1;
- }
- }
-
- if (!(pid = fork ())) {
- /* child process */
- int maxfd, nullfd = -1;
-
- if (!outfd || !errfd)
- nullfd = open ("/dev/null", O_WRONLY);
-
- if (dup2 (fd[0], STDIN_FILENO) == -1)
- _exit (255);
-
- if (dup2 (outfd ? fd[3] : nullfd, STDOUT_FILENO) == -1)
- _exit (255);
-
- if (dup2 (errfd ? fd[5] : nullfd, STDERR_FILENO) == -1)
- _exit (255);
-
- setsid ();
-
- if ((maxfd = sysconf (_SC_OPEN_MAX)) > 0) {
- for (i = 3; i < maxfd; i++)
- fcntl (i, F_SETFD, FD_CLOEXEC);
- }
-
- execv (path, argv);
- _exit (255);
- } else if (pid == -1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to create create child process '%s': %s"),
- argv[0], strerror (errno));
- return -1;
- }
-
- /* parent process */
- close (fd[0]);
- close (fd[3]);
- close (fd[5]);
-
- if (infd)
- *infd = fd[1];
- else
- close (fd[1]);
-
- if (outfd)
- *outfd = fd[2];
- else
- close (fd[2]);
-
- if (errfd)
- *errfd = fd[4];
- else
- close (fd[4]);
-
- return pid;
-}
-
-
-int
-camel_process_wait (pid_t pid)
-{
- sigset_t mask, omask;
- int status;
- pid_t r;
-
- sigemptyset (&mask);
- sigaddset (&mask, SIGALRM);
- sigprocmask (SIG_BLOCK, &mask, &omask);
- alarm (1);
-
- r = waitpid (pid, &status, 0);
-
- alarm (0);
- sigprocmask (SIG_SETMASK, &omask, NULL);
-
- if (r == (pid_t) -1 && errno == EINTR) {
- kill (pid, SIGTERM);
- sleep (1);
- r = waitpid (pid, &status, WNOHANG);
- if (r == (pid_t) 0) {
- kill (pid, SIGKILL);
- sleep (1);
- r = waitpid (pid, &status, WNOHANG);
- }
- }
-
- if (r != (pid_t) -1 && WIFEXITED (status))
- return WEXITSTATUS (status);
- else
- return -1;
-}
diff --git a/camel/camel-process.h b/camel/camel-process.h
deleted file mode 100644
index a87db24d5c..0000000000
--- a/camel/camel-process.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2003 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_PROCESS_H__
-#define __CAMEL_PROCESS_H__
-
-#include <sys/types.h>
-
-#include <camel/camel-exception.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-pid_t camel_process_fork (const char *path, char **argv, int *infd, int *outfd, int *errfd, CamelException *ex);
-
-int camel_process_wait (pid_t pid);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __CAMEL_PROCESS_H__ */
diff --git a/camel/camel-provider.c b/camel/camel-provider.c
deleted file mode 100644
index 321b3077cd..0000000000
--- a/camel/camel-provider.c
+++ /dev/null
@@ -1,192 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <sys/types.h>
-#include <dirent.h>
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-
-#include <gmodule.h>
-
-#include "camel-provider.h"
-#include "camel-exception.h"
-#include "camel-string-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 (camel_strcase_hash, camel_strcase_equal);
-
- dir = opendir (CAMEL_PROVIDERDIR);
- if (!dir) {
- g_error ("Could not open camel provider directory (%s): %s",
- CAMEL_PROVIDERDIR, 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);
-}
-
-
-/**
- * camel_provider_auto_detect:
- * @provider: camel provider
- * @settings: currently set settings
- * @auto_detected: output hash table of auto-detected values
- * @ex: exception
- *
- * After filling in the standard Username/Hostname/Port/Path settings
- * (which must be set in @settings), if the provider supports it, you
- * may wish to have the provider auto-detect further settings based on
- * the aformentioned settings.
- *
- * If the provider does not support auto-detection, @auto_detected
- * will be set to %NULL. Otherwise the provider will attempt to
- * auto-detect whatever it can and file them into @auto_detected. If
- * for some reason it cannot auto-detect anything (not enough
- * information provided in @settings?) then @auto_deetected will be
- * set to %NULL and an exception may be set to explain why it failed.
- *
- * Returns 0 on success or -1 on fail.
- **/
-int
-camel_provider_auto_detect (CamelProvider *provider, CamelURL *url,
- GHashTable **auto_detected, CamelException *ex)
-{
- g_return_val_if_fail (provider != NULL, -1);
-
- if (provider->auto_detect) {
- return provider->auto_detect (url, auto_detected, ex);
- } else {
- *auto_detected = NULL;
- return 0;
- }
-}
diff --git a/camel/camel-provider.h b/camel/camel-provider.h
deleted file mode 100644
index 98c5a3ed6a..0000000000
--- a/camel/camel-provider.h
+++ /dev/null
@@ -1,201 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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>
-#include <camel/camel-exception.h>
-#include <camel/camel-url.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 8
-
-/* 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_FRAGMENT_IS_PATH (1 << 30) /* url uses fragment for folder name path, not path */
-#define CAMEL_URL_PATH_IS_ABSOLUTE (1 << 31)
-
-
-#define CAMEL_PROVIDER_IS_STORE_AND_TRANSPORT(prov) (prov->object_types[CAMEL_PROVIDER_STORE] && prov->object_types[CAMEL_PROVIDER_TRANSPORT])
-
-/* 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,
- CAMEL_PROVIDER_CONF_LABEL,
-} CamelProviderConfType;
-
-typedef struct {
- CamelProviderConfType type;
- char *name, *depname;
- char *text, *value;
-} CamelProviderConfEntry;
-
-
-/* Some defaults */
-#define CAMEL_PROVIDER_CONF_DEFAULT_USERNAME { CAMEL_PROVIDER_CONF_LABEL, "username", NULL, N_("User_name:"), NULL }
-#define CAMEL_PROVIDER_CONF_DEFAULT_HOSTNAME { CAMEL_PROVIDER_CONF_LABEL, "hostname", NULL, N_("_Host:"), NULL }
-#define CAMEL_PROVIDER_CONF_DEFAULT_PATH { CAMEL_PROVIDER_CONF_ENTRY, "path", NULL, N_("_Path:"), "" }
-
-typedef int (*CamelProviderAutoDetectFunc) (CamelURL *url, GHashTable **auto_detected, CamelException *ex);
-
-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;
-
- /* auto-detection function */
- CamelProviderAutoDetectFunc auto_detect;
-
- /* CamelType(s) of its store and/or transport. If both are
- * set, then they are assumed to be linked together and the
- * transport type can only be used in an account that also
- * uses the store type (eg, Exchange or NNTP).
- */
- CamelType object_types[CAMEL_NUM_PROVIDER_TYPES];
-
- /* GList of CamelServiceAuthTypes the provider supports */
- GList *authtypes;
-
- CamelObjectBag *service_cache[CAMEL_NUM_PROVIDER_TYPES];
-
- GHashFunc url_hash;
- GCompareFunc url_equal;
-
- /* gettext translation domain (NULL for providers in the
- * evolution source tree).
- */
- char *translation_domain;
-} 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);
-
-
-int camel_provider_auto_detect (CamelProvider *provider, CamelURL *url,
- GHashTable **auto_detected, CamelException *ex);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_PROVIDER_H */
diff --git a/camel/camel-sasl-anonymous.c b/camel/camel-sasl-anonymous.c
deleted file mode 100644
index 9b97fdbc07..0000000000
--- a/camel/camel-sasl-anonymous.c
+++ /dev/null
@@ -1,152 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001-2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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-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 (cia);
- return NULL;
- }
- camel_object_unref (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 5c8bed4a4b..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_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 f544d48a22..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 "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 2404b453f6..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_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 e421bd5294..0000000000
--- a/camel/camel-sasl-digest-md5.c
+++ /dev/null
@@ -1,898 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001-2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <ctype.h>
-#include <unistd.h>
-
-#include <e-util/md5-utils.h>
-
-#include <gal/util/e-iconv.h>
-
-#include "camel-charset-map.h"
-#include "camel-mime-utils.h"
-#include "camel-sasl-digest-md5.h"
-
-#define d(x)
-
-#define PARANOID(x) x
-
-/* Implements rfc2831 */
-
-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 (!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 (!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 = camel_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 *inbuf;
- iconv_t cd;
-
- charset = e_iconv_locale_charset ();
- if (!charset)
- charset = "iso-8859-1";
-
- cd = e_iconv_open (resp->charset, charset);
-
- len = strlen (resp->username);
- outlen = 2 * len; /* plenty of space */
-
- outbuf = username = g_malloc0 (outlen + 1);
- inbuf = resp->username;
- if (cd == (iconv_t) -1 || e_iconv (cd, &inbuf, &len, &outbuf, &outlen) == (size_t) -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)
- e_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=", 5);
- str = qop_to_string (resp->qop);
- g_byte_array_append (buffer, str, strlen (str));
-
- g_byte_array_append (buffer, ",digest-uri=\"", 13);
- buf = digest_uri_to_string (resp->uri);
- g_byte_array_append (buffer, buf, strlen (buf));
- g_free (buf);
-
- g_byte_array_append (buffer, "\",response=", 11);
- g_byte_array_append (buffer, resp->resp, 32);
-
- 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=", 9);
- g_byte_array_append (buffer, resp->charset, strlen (resp->charset));
- }
-
- 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 b71abaa1df..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_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-gssapi.c b/camel/camel-sasl-gssapi.c
deleted file mode 100644
index 4f15c43821..0000000000
--- a/camel/camel-sasl-gssapi.c
+++ /dev/null
@@ -1,340 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2003 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_KRB5
-
-#include <string.h>
-#include <com_err.h>
-#ifdef HAVE_MIT_KRB5
-#include <gssapi/gssapi.h>
-#include <gssapi/gssapi_generic.h>
-#else /* HAVE_HEIMDAL_KRB5 */
-#include <gssapi.h>
-#define gss_nt_service_name GSS_C_NT_HOSTBASED_SERVICE
-#endif
-#include <errno.h>
-
-#ifndef GSS_C_OID_KRBV5_DES
-#define GSS_C_OID_KRBV5_DES GSS_C_NO_OID
-#endif
-
-#include "camel-sasl-gssapi.h"
-
-CamelServiceAuthType camel_sasl_gssapi_authtype = {
- N_("GSSAPI"),
-
- N_("This option will connect to the server using "
- "Kerberos 5 authentication."),
-
- "GSSAPI",
- FALSE
-};
-
-enum {
- GSSAPI_STATE_INIT,
- GSSAPI_STATE_CONTINUE_NEEDED,
- GSSAPI_STATE_COMPLETE,
- GSSAPI_STATE_AUTHENTICATED
-};
-
-#define GSSAPI_SECURITY_LAYER_NONE (1 << 0)
-#define GSSAPI_SECURITY_LAYER_INTEGRITY (1 << 1)
-#define GSSAPI_SECURITY_LAYER_PRIVACY (1 << 2)
-
-#define DESIRED_SECURITY_LAYER GSSAPI_SECURITY_LAYER_NONE
-
-struct _CamelSaslGssapiPrivate {
- int state;
- gss_ctx_id_t ctx;
- gss_name_t target;
-};
-
-
-static GByteArray *gssapi_challenge (CamelSasl *sasl, GByteArray *token, CamelException *ex);
-
-
-static CamelSaslClass *parent_class = NULL;
-
-
-static void
-camel_sasl_gssapi_class_init (CamelSaslGssapiClass *klass)
-{
- CamelSaslClass *camel_sasl_class = CAMEL_SASL_CLASS (klass);
-
- parent_class = CAMEL_SASL_CLASS (camel_type_get_global_classfuncs (camel_sasl_get_type ()));
-
- /* virtual method overload */
- camel_sasl_class->challenge = gssapi_challenge;
-}
-
-static void
-camel_sasl_gssapi_init (gpointer object, gpointer klass)
-{
- CamelSaslGssapi *gssapi = CAMEL_SASL_GSSAPI (object);
-
- gssapi->priv = g_new (struct _CamelSaslGssapiPrivate, 1);
- gssapi->priv->state = GSSAPI_STATE_INIT;
- gssapi->priv->ctx = GSS_C_NO_CONTEXT;
- gssapi->priv->target = GSS_C_NO_NAME;
-}
-
-static void
-camel_sasl_gssapi_finalize (CamelObject *object)
-{
- CamelSaslGssapi *gssapi = CAMEL_SASL_GSSAPI (object);
- guint32 status;
-
- if (gssapi->priv->ctx != GSS_C_NO_CONTEXT)
- gss_delete_sec_context (&status, &gssapi->priv->ctx, GSS_C_NO_BUFFER);
-
- if (gssapi->priv->target != GSS_C_NO_NAME)
- gss_release_name (&status, &gssapi->priv->target);
-
- g_free (gssapi->priv);
-}
-
-
-CamelType
-camel_sasl_gssapi_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (
- camel_sasl_get_type (),
- "CamelSaslGssapi",
- sizeof (CamelSaslGssapi),
- sizeof (CamelSaslGssapiClass),
- (CamelObjectClassInitFunc) camel_sasl_gssapi_class_init,
- NULL,
- (CamelObjectInitFunc) camel_sasl_gssapi_init,
- (CamelObjectFinalizeFunc) camel_sasl_gssapi_finalize);
- }
-
- return type;
-}
-
-static void
-gssapi_set_exception (OM_uint32 major, OM_uint32 minor, CamelException *ex)
-{
- const char *str;
-
- switch (major) {
- case GSS_S_BAD_MECH:
- str = _("The specified mechanism is not supported by the "
- "provided credential, or is unrecognized by the "
- "implementation.");
- break;
- case GSS_S_BAD_NAME:
- str = _("The provided target_name parameter was ill-formed.");
- break;
- case GSS_S_BAD_NAMETYPE:
- str = _("The provided target_name parameter contained an "
- "invalid or unsupported type of name.");
- break;
- case GSS_S_BAD_BINDINGS:
- str = _("The input_token contains different channel "
- "bindings to those specified via the "
- "input_chan_bindings parameter.");
- break;
- case GSS_S_BAD_SIG:
- str = _("The input_token contains an invalid signature, or a "
- "signature that could not be verified.");
- break;
- case GSS_S_NO_CRED:
- str = _("The supplied credentials were not valid for context "
- "initiation, or the credential handle did not "
- "reference any credentials.");
- break;
- case GSS_S_NO_CONTEXT:
- str = _("The supplied context handle did not refer to a valid context.");
- break;
- case GSS_S_DEFECTIVE_TOKEN:
- str = _("The consistency checks performed on the input_token failed.");
- break;
- case GSS_S_DEFECTIVE_CREDENTIAL:
- str = _("The consistency checks performed on the credential failed.");
- break;
- case GSS_S_CREDENTIALS_EXPIRED:
- str = _("The referenced credentials have expired.");
- break;
- case GSS_S_FAILURE:
- str = error_message (minor);
- break;
- default:
- str = _("Bad authentication response from server.");
- }
-
- camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE, str);
-}
-
-static GByteArray *
-gssapi_challenge (CamelSasl *sasl, GByteArray *token, CamelException *ex)
-{
- struct _CamelSaslGssapiPrivate *priv = CAMEL_SASL_GSSAPI (sasl)->priv;
- OM_uint32 major, minor, flags, time;
- gss_buffer_desc inbuf, outbuf;
- GByteArray *challenge = NULL;
- gss_buffer_t input_token;
- struct hostent *h;
- int conf_state;
- gss_qop_t qop;
- gss_OID mech;
- char *str;
-
- switch (priv->state) {
- case GSSAPI_STATE_INIT:
- if (!(h = camel_service_gethost (sasl->service, ex))) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to resolve host `%s': %s"),
- sasl->service->url->host, g_strerror (errno));
- return NULL;
- }
-
- str = g_strdup_printf ("%s@%s", sasl->service_name, h->h_name);
- camel_free_host (h);
-
- inbuf.value = str;
- inbuf.length = strlen (str);
- major = gss_import_name (&minor, &inbuf, gss_nt_service_name, &priv->target);
- g_free (str);
-
- if (major != GSS_S_COMPLETE) {
- gssapi_set_exception (major, minor, ex);
- return NULL;
- }
-
- input_token = GSS_C_NO_BUFFER;
-
- goto challenge;
- break;
- case GSSAPI_STATE_CONTINUE_NEEDED:
- if (token == NULL) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
- _("Bad authentication response from server."));
- return NULL;
- }
-
- inbuf.value = token->data;
- inbuf.length = token->len;
- input_token = &inbuf;
-
- challenge:
- major = gss_init_sec_context (&minor, GSS_C_NO_CREDENTIAL, &priv->ctx, priv->target,
- GSS_C_OID_KRBV5_DES, GSS_C_MUTUAL_FLAG |
- GSS_C_REPLAY_FLAG | GSS_C_SEQUENCE_FLAG,
- 0, GSS_C_NO_CHANNEL_BINDINGS,
- input_token, &mech, &outbuf, &flags, &time);
-
- switch (major) {
- case GSS_S_COMPLETE:
- priv->state = GSSAPI_STATE_COMPLETE;
- break;
- case GSS_S_CONTINUE_NEEDED:
- priv->state = GSSAPI_STATE_CONTINUE_NEEDED;
- break;
- default:
- gssapi_set_exception (major, minor, ex);
- return NULL;
- }
-
- challenge = g_byte_array_new ();
- g_byte_array_append (challenge, outbuf.value, outbuf.length);
-#ifndef HAVE_HEIMDAL_KRB5
- gss_release_buffer (&minor, &outbuf);
-#endif
- break;
- case GSSAPI_STATE_COMPLETE:
- if (token == NULL) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
- _("Bad authentication response from server."));
- return NULL;
- }
-
- inbuf.value = token->data;
- inbuf.length = token->len;
-
- major = gss_unwrap (&minor, priv->ctx, &inbuf, &outbuf, &conf_state, &qop);
- if (major != GSS_S_COMPLETE) {
- gssapi_set_exception (major, minor, ex);
- return NULL;
- }
-
- if (outbuf.length < 4) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
- _("Bad authentication response from server."));
-#ifndef HAVE_HEIMDAL_KRB5
- gss_release_buffer (&minor, &outbuf);
-#endif
- return NULL;
- }
-
- /* check that our desired security layer is supported */
- if ((((unsigned char *) outbuf.value)[0] & DESIRED_SECURITY_LAYER) != DESIRED_SECURITY_LAYER) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
- _("Unsupported security layer."));
- gss_release_buffer (&minor, &outbuf);
- return NULL;
- }
-
- inbuf.length = 4 + strlen (sasl->service->url->user);
- inbuf.value = str = g_malloc (inbuf.length);
- memcpy (inbuf.value, outbuf.value, 4);
- str[0] = DESIRED_SECURITY_LAYER;
- memcpy (str + 4, sasl->service->url->user, inbuf.length - 4);
-
-#ifndef HAVE_HEIMDAL_KRB5
- gss_release_buffer (&minor, &outbuf);
-#endif
-
- major = gss_wrap (&minor, priv->ctx, FALSE, qop, &inbuf, &conf_state, &outbuf);
- if (major != GSS_S_COMPLETE) {
- gssapi_set_exception (major, minor, ex);
- g_free (str);
- return NULL;
- }
-
- g_free (str);
- challenge = g_byte_array_new ();
- g_byte_array_append (challenge, outbuf.value, outbuf.length);
-
-#ifndef HAVE_HEIMDAL_KRB5
- gss_release_buffer (&minor, &outbuf);
-#endif
-
- priv->state = GSSAPI_STATE_AUTHENTICATED;
-
- sasl->authenticated = TRUE;
- break;
- default:
- return NULL;
- }
-
- return challenge;
-}
-
-#endif /* HAVE_KRB5 */
diff --git a/camel/camel-sasl-gssapi.h b/camel/camel-sasl-gssapi.h
deleted file mode 100644
index b4a3fbc1a5..0000000000
--- a/camel/camel-sasl-gssapi.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 2003 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_GSSAPI_H__
-#define __CAMEL_SASL_GSSAPI_H__
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <sys/types.h>
-#include <camel/camel-sasl.h>
-
-#define CAMEL_SASL_GSSAPI_TYPE (camel_sasl_gssapi_get_type ())
-#define CAMEL_SASL_GSSAPI(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SASL_GSSAPI_TYPE, CamelSaslGssapi))
-#define CAMEL_SASL_GSSAPI_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SASL_GSSAPI_TYPE, CamelSaslGssapiClass))
-#define CAMEL_IS_SASL_GSSAPI(o) (CAMEL_CHECK_TYPE((o), CAMEL_SASL_GSSAPI_TYPE))
-
-typedef struct _CamelSaslGssapi CamelSaslGssapi;
-typedef struct _CamelSaslGssapiClass CamelSaslGssapiClass;
-
-struct _CamelSaslGssapi {
- CamelSasl parent_object;
-
- struct _CamelSaslGssapiPrivate *priv;
-
-};
-
-struct _CamelSaslGssapiClass {
- CamelSaslClass parent_class;
-
-};
-
-/* Standard Camel function */
-CamelType camel_sasl_gssapi_get_type (void);
-
-extern CamelServiceAuthType camel_sasl_gssapi_authtype;
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __CAMEL_SASL_GSSAPI_H__ */
diff --git a/camel/camel-sasl-kerberos4.c b/camel/camel-sasl-kerberos4.c
deleted file mode 100644
index e225c1a26c..0000000000
--- a/camel/camel-sasl-kerberos4.c
+++ /dev/null
@@ -1,224 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 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-string-utils.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, "."));
- camel_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 d807fc70bc..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_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 f6c3c9e5f8..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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-sasl-login.h"
-#include "camel-service.h"
-
-CamelServiceAuthType camel_sasl_login_authtype = {
- N_("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 dffa657202..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_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-ntlm.c b/camel/camel-sasl-ntlm.c
deleted file mode 100644
index ad341353c4..0000000000
--- a/camel/camel-sasl-ntlm.c
+++ /dev/null
@@ -1,706 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright 2002 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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-sasl-ntlm.h"
-
-#include <ctype.h>
-#include <string.h>
-
-CamelServiceAuthType camel_sasl_ntlm_authtype = {
- N_("NTLM / SPA"),
-
- N_("This option will connect to a Windows-based server using "
- "NTLM / Secure Password Authentication."),
-
- "NTLM",
- TRUE
-};
-
-static CamelSaslClass *parent_class = NULL;
-
-static GByteArray *ntlm_challenge (CamelSasl *sasl, GByteArray *token, CamelException *ex);
-
-static void
-camel_sasl_ntlm_class_init (CamelSaslNTLMClass *camel_sasl_ntlm_class)
-{
- CamelSaslClass *camel_sasl_class = CAMEL_SASL_CLASS (camel_sasl_ntlm_class);
-
- parent_class = CAMEL_SASL_CLASS (camel_type_get_global_classfuncs (camel_sasl_get_type ()));
-
- /* virtual method overload */
- camel_sasl_class->challenge = ntlm_challenge;
-}
-
-CamelType
-camel_sasl_ntlm_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (
- camel_sasl_get_type (), "CamelSaslNTLM",
- sizeof (CamelSaslNTLM),
- sizeof (CamelSaslNTLMClass),
- (CamelObjectClassInitFunc) camel_sasl_ntlm_class_init,
- NULL, NULL, NULL);
- }
-
- return type;
-}
-
-#define NTLM_REQUEST "NTLMSSP\x00\x01\x00\x00\x00\x06\x82\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x30\x00\x00\x00\x00\x00\x00\x00\x30\x00\x00\x00"
-
-#define NTLM_CHALLENGE_NONCE_OFFSET 24
-#define NTLM_CHALLENGE_DOMAIN_OFFSET 48
-#define NTLM_CHALLENGE_DOMAIN_LEN_OFFSET 44
-
-#define NTLM_RESPONSE_HEADER "NTLMSSP\x00\x03\x00\x00\x00"
-#define NTLM_RESPONSE_FLAGS "\x82\x01"
-#define NTLM_RESPONSE_BASE_SIZE 64
-#define NTLM_RESPONSE_LM_RESP_OFFSET 12
-#define NTLM_RESPONSE_NT_RESP_OFFSET 20
-#define NTLM_RESPONSE_DOMAIN_OFFSET 28
-#define NTLM_RESPONSE_USER_OFFSET 36
-#define NTLM_RESPONSE_HOST_OFFSET 44
-#define NTLM_RESPONSE_FLAGS_OFFSET 60
-
-static void ntlm_calc_response (const guchar key[21],
- const guchar plaintext[8],
- guchar results[24]);
-static void ntlm_lanmanager_hash (const char *password, char hash[21]);
-static void ntlm_nt_hash (const char *password, char hash[21]);
-static void ntlm_set_string (GByteArray *ba, int offset,
- const char *data, int len);
-
-static GByteArray *
-ntlm_challenge (CamelSasl *sasl, GByteArray *token, CamelException *ex)
-{
- GByteArray *ret;
- guchar nonce[8], hash[21], lm_resp[24], nt_resp[24];
-
- ret = g_byte_array_new ();
-
- if (!token || !token->len) {
- g_byte_array_append (ret, NTLM_REQUEST,
- sizeof (NTLM_REQUEST) - 1);
- return ret;
- }
-
- memcpy (nonce, token->data + NTLM_CHALLENGE_NONCE_OFFSET, 8);
- ntlm_lanmanager_hash (sasl->service->url->passwd, hash);
- ntlm_calc_response (hash, nonce, lm_resp);
- ntlm_nt_hash (sasl->service->url->passwd, hash);
- ntlm_calc_response (hash, nonce, nt_resp);
-
- ret = g_byte_array_new ();
- g_byte_array_set_size (ret, NTLM_RESPONSE_BASE_SIZE);
- memset (ret->data, 0, NTLM_RESPONSE_BASE_SIZE);
- memcpy (ret->data, NTLM_RESPONSE_HEADER,
- sizeof (NTLM_RESPONSE_HEADER) - 1);
- memcpy (ret->data + NTLM_RESPONSE_FLAGS_OFFSET,
- NTLM_RESPONSE_FLAGS, sizeof (NTLM_RESPONSE_FLAGS) - 1);
-
- ntlm_set_string (ret, NTLM_RESPONSE_DOMAIN_OFFSET,
- token->data + NTLM_CHALLENGE_DOMAIN_OFFSET,
- atoi (token->data + NTLM_CHALLENGE_DOMAIN_LEN_OFFSET));
- ntlm_set_string (ret, NTLM_RESPONSE_USER_OFFSET,
- sasl->service->url->user,
- strlen (sasl->service->url->user));
- ntlm_set_string (ret, NTLM_RESPONSE_HOST_OFFSET,
- "UNKNOWN", sizeof ("UNKNOWN") - 1);
- ntlm_set_string (ret, NTLM_RESPONSE_LM_RESP_OFFSET,
- lm_resp, sizeof (lm_resp));
- ntlm_set_string (ret, NTLM_RESPONSE_NT_RESP_OFFSET,
- nt_resp, sizeof (nt_resp));
-
- sasl->authenticated = TRUE;
- return ret;
-}
-
-/* MD4 */
-static void md4sum (const unsigned char *in,
- int nbytes,
- unsigned char digest[16]);
-
-/* DES */
-typedef unsigned long DES_KS[16][2]; /* Single-key DES key schedule */
-
-static void deskey (DES_KS, unsigned char *, int);
-
-static void des (DES_KS, unsigned char *);
-
-static void setup_schedule (const guchar *key_56, DES_KS ks);
-
-
-
-#define LM_PASSWORD_MAGIC "\x4B\x47\x53\x21\x40\x23\x24\x25" \
- "\x4B\x47\x53\x21\x40\x23\x24\x25" \
- "\x00\x00\x00\x00\x00"
-
-static void
-ntlm_lanmanager_hash (const char *password, char hash[21])
-{
- guchar lm_password [15];
- DES_KS ks;
- int i;
-
- for (i = 0; i < 14 && password [i]; i++)
- lm_password [i] = toupper ((unsigned char) password [i]);
-
- for (; i < 15; i++)
- lm_password [i] = '\0';
-
- memcpy (hash, LM_PASSWORD_MAGIC, 21);
-
- setup_schedule (lm_password, ks);
- des (ks, hash);
-
- setup_schedule (lm_password + 7, ks);
- des (ks, hash + 8);
-}
-
-static void
-ntlm_nt_hash (const char *password, char hash[21])
-{
- unsigned char *buf, *p;
-
- p = buf = g_malloc (strlen (password) * 2);
-
- while (*password) {
- *p++ = *password++;
- *p++ = '\0';
- }
-
- md4sum (buf, p - buf, hash);
- memset (hash + 16, 0, 5);
-
- g_free (buf);
-}
-
-static void
-ntlm_set_string (GByteArray *ba, int offset, const char *data, int len)
-{
- ba->data[offset ] = ba->data[offset + 2] = len & 0xFF;
- ba->data[offset + 1] = ba->data[offset + 3] = (len >> 8) & 0xFF;
- ba->data[offset + 4] = ba->len & 0xFF;
- ba->data[offset + 5] = (ba->len >> 8) & 0xFF;
- g_byte_array_append (ba, data, len);
-}
-
-
-#define KEYBITS(k,s) \
- (((k[(s)/8] << ((s)%8)) & 0xFF) | (k[(s)/8+1] >> (8-(s)%8)))
-
-/* DES utils */
-/* Set up a key schedule based on a 56bit key */
-static void
-setup_schedule (const guchar *key_56, DES_KS ks)
-{
- guchar key[8];
- int i, c, bit;
-
- for (i = 0; i < 8; i++) {
- key [i] = KEYBITS (key_56, i * 7);
-
- /* Fix parity */
- for (c = bit = 0; bit < 8; bit++)
- if (key [i] & (1 << bit))
- c++;
- if (!(c & 1))
- key [i] ^= 0x01;
- }
-
- deskey (ks, key, 0);
-}
-
-static void
-ntlm_calc_response (const guchar key[21], const guchar plaintext[8],
- guchar results[24])
-{
- DES_KS ks;
-
- memcpy (results, plaintext, 8);
- memcpy (results + 8, plaintext, 8);
- memcpy (results + 16, plaintext, 8);
-
- setup_schedule (key, ks);
- des (ks, results);
-
- setup_schedule (key + 7, ks);
- des (ks, results + 8);
-
- setup_schedule (key + 14, ks);
- des (ks, results + 16);
-}
-
-
-/*
- * MD4 encoder. (The one everyone else uses is not GPL-compatible;
- * this is a reimplementation from spec.) This doesn't need to be
- * efficient for our purposes, although it would be nice to fix
- * it to not malloc()...
- */
-
-#define F(X,Y,Z) ( ((X)&(Y)) | ((~(X))&(Z)) )
-#define G(X,Y,Z) ( ((X)&(Y)) | ((X)&(Z)) | ((Y)&(Z)) )
-#define H(X,Y,Z) ( (X)^(Y)^(Z) )
-#define ROT(val, n) ( ((val) << (n)) | ((val) >> (32 - (n))) )
-
-static void
-md4sum (const unsigned char *in, int nbytes, unsigned char digest[16])
-{
- unsigned char *M;
- guint32 A, B, C, D, AA, BB, CC, DD, X[16];
- int pbytes, nbits = nbytes * 8, i, j;
-
- pbytes = (120 - (nbytes % 64)) % 64;
- M = alloca (nbytes + pbytes + 8);
- memcpy (M, in, nbytes);
- memset (M + nbytes, 0, pbytes + 8);
- M[nbytes] = 0x80;
- M[nbytes + pbytes] = nbits & 0xFF;
- M[nbytes + pbytes + 1] = (nbits >> 8) & 0xFF;
- M[nbytes + pbytes + 2] = (nbits >> 16) & 0xFF;
- M[nbytes + pbytes + 3] = (nbits >> 24) & 0xFF;
-
- A = 0x67452301;
- B = 0xEFCDAB89;
- C = 0x98BADCFE;
- D = 0x10325476;
-
- for (i = 0; i < nbytes + pbytes + 8; i += 64) {
- for (j = 0; j < 16; j++) {
- X[j] = (M[i + j*4]) |
- (M[i + j*4 + 1] << 8) |
- (M[i + j*4 + 2] << 16) |
- (M[i + j*4 + 3] << 24);
- }
-
- AA = A;
- BB = B;
- CC = C;
- DD = D;
-
- A = ROT (A + F(B, C, D) + X[0], 3);
- D = ROT (D + F(A, B, C) + X[1], 7);
- C = ROT (C + F(D, A, B) + X[2], 11);
- B = ROT (B + F(C, D, A) + X[3], 19);
- A = ROT (A + F(B, C, D) + X[4], 3);
- D = ROT (D + F(A, B, C) + X[5], 7);
- C = ROT (C + F(D, A, B) + X[6], 11);
- B = ROT (B + F(C, D, A) + X[7], 19);
- A = ROT (A + F(B, C, D) + X[8], 3);
- D = ROT (D + F(A, B, C) + X[9], 7);
- C = ROT (C + F(D, A, B) + X[10], 11);
- B = ROT (B + F(C, D, A) + X[11], 19);
- A = ROT (A + F(B, C, D) + X[12], 3);
- D = ROT (D + F(A, B, C) + X[13], 7);
- C = ROT (C + F(D, A, B) + X[14], 11);
- B = ROT (B + F(C, D, A) + X[15], 19);
-
- A = ROT (A + G(B, C, D) + X[0] + 0x5A827999, 3);
- D = ROT (D + G(A, B, C) + X[4] + 0x5A827999, 5);
- C = ROT (C + G(D, A, B) + X[8] + 0x5A827999, 9);
- B = ROT (B + G(C, D, A) + X[12] + 0x5A827999, 13);
- A = ROT (A + G(B, C, D) + X[1] + 0x5A827999, 3);
- D = ROT (D + G(A, B, C) + X[5] + 0x5A827999, 5);
- C = ROT (C + G(D, A, B) + X[9] + 0x5A827999, 9);
- B = ROT (B + G(C, D, A) + X[13] + 0x5A827999, 13);
- A = ROT (A + G(B, C, D) + X[2] + 0x5A827999, 3);
- D = ROT (D + G(A, B, C) + X[6] + 0x5A827999, 5);
- C = ROT (C + G(D, A, B) + X[10] + 0x5A827999, 9);
- B = ROT (B + G(C, D, A) + X[14] + 0x5A827999, 13);
- A = ROT (A + G(B, C, D) + X[3] + 0x5A827999, 3);
- D = ROT (D + G(A, B, C) + X[7] + 0x5A827999, 5);
- C = ROT (C + G(D, A, B) + X[11] + 0x5A827999, 9);
- B = ROT (B + G(C, D, A) + X[15] + 0x5A827999, 13);
-
- A = ROT (A + H(B, C, D) + X[0] + 0x6ED9EBA1, 3);
- D = ROT (D + H(A, B, C) + X[8] + 0x6ED9EBA1, 9);
- C = ROT (C + H(D, A, B) + X[4] + 0x6ED9EBA1, 11);
- B = ROT (B + H(C, D, A) + X[12] + 0x6ED9EBA1, 15);
- A = ROT (A + H(B, C, D) + X[2] + 0x6ED9EBA1, 3);
- D = ROT (D + H(A, B, C) + X[10] + 0x6ED9EBA1, 9);
- C = ROT (C + H(D, A, B) + X[6] + 0x6ED9EBA1, 11);
- B = ROT (B + H(C, D, A) + X[14] + 0x6ED9EBA1, 15);
- A = ROT (A + H(B, C, D) + X[1] + 0x6ED9EBA1, 3);
- D = ROT (D + H(A, B, C) + X[9] + 0x6ED9EBA1, 9);
- C = ROT (C + H(D, A, B) + X[5] + 0x6ED9EBA1, 11);
- B = ROT (B + H(C, D, A) + X[13] + 0x6ED9EBA1, 15);
- A = ROT (A + H(B, C, D) + X[3] + 0x6ED9EBA1, 3);
- D = ROT (D + H(A, B, C) + X[11] + 0x6ED9EBA1, 9);
- C = ROT (C + H(D, A, B) + X[7] + 0x6ED9EBA1, 11);
- B = ROT (B + H(C, D, A) + X[15] + 0x6ED9EBA1, 15);
-
- A += AA;
- B += BB;
- C += CC;
- D += DD;
- }
-
- digest[0] = A & 0xFF;
- digest[1] = (A >> 8) & 0xFF;
- digest[2] = (A >> 16) & 0xFF;
- digest[3] = (A >> 24) & 0xFF;
- digest[4] = B & 0xFF;
- digest[5] = (B >> 8) & 0xFF;
- digest[6] = (B >> 16) & 0xFF;
- digest[7] = (B >> 24) & 0xFF;
- digest[8] = C & 0xFF;
- digest[9] = (C >> 8) & 0xFF;
- digest[10] = (C >> 16) & 0xFF;
- digest[11] = (C >> 24) & 0xFF;
- digest[12] = D & 0xFF;
- digest[13] = (D >> 8) & 0xFF;
- digest[14] = (D >> 16) & 0xFF;
- digest[15] = (D >> 24) & 0xFF;
-}
-
-
-/* Public domain DES implementation from Phil Karn */
-static unsigned long Spbox[8][64] = {
- { 0x01010400, 0x00000000, 0x00010000, 0x01010404,
- 0x01010004, 0x00010404, 0x00000004, 0x00010000,
- 0x00000400, 0x01010400, 0x01010404, 0x00000400,
- 0x01000404, 0x01010004, 0x01000000, 0x00000004,
- 0x00000404, 0x01000400, 0x01000400, 0x00010400,
- 0x00010400, 0x01010000, 0x01010000, 0x01000404,
- 0x00010004, 0x01000004, 0x01000004, 0x00010004,
- 0x00000000, 0x00000404, 0x00010404, 0x01000000,
- 0x00010000, 0x01010404, 0x00000004, 0x01010000,
- 0x01010400, 0x01000000, 0x01000000, 0x00000400,
- 0x01010004, 0x00010000, 0x00010400, 0x01000004,
- 0x00000400, 0x00000004, 0x01000404, 0x00010404,
- 0x01010404, 0x00010004, 0x01010000, 0x01000404,
- 0x01000004, 0x00000404, 0x00010404, 0x01010400,
- 0x00000404, 0x01000400, 0x01000400, 0x00000000,
- 0x00010004, 0x00010400, 0x00000000, 0x01010004 },
- { 0x80108020, 0x80008000, 0x00008000, 0x00108020,
- 0x00100000, 0x00000020, 0x80100020, 0x80008020,
- 0x80000020, 0x80108020, 0x80108000, 0x80000000,
- 0x80008000, 0x00100000, 0x00000020, 0x80100020,
- 0x00108000, 0x00100020, 0x80008020, 0x00000000,
- 0x80000000, 0x00008000, 0x00108020, 0x80100000,
- 0x00100020, 0x80000020, 0x00000000, 0x00108000,
- 0x00008020, 0x80108000, 0x80100000, 0x00008020,
- 0x00000000, 0x00108020, 0x80100020, 0x00100000,
- 0x80008020, 0x80100000, 0x80108000, 0x00008000,
- 0x80100000, 0x80008000, 0x00000020, 0x80108020,
- 0x00108020, 0x00000020, 0x00008000, 0x80000000,
- 0x00008020, 0x80108000, 0x00100000, 0x80000020,
- 0x00100020, 0x80008020, 0x80000020, 0x00100020,
- 0x00108000, 0x00000000, 0x80008000, 0x00008020,
- 0x80000000, 0x80100020, 0x80108020, 0x00108000 },
- { 0x00000208, 0x08020200, 0x00000000, 0x08020008,
- 0x08000200, 0x00000000, 0x00020208, 0x08000200,
- 0x00020008, 0x08000008, 0x08000008, 0x00020000,
- 0x08020208, 0x00020008, 0x08020000, 0x00000208,
- 0x08000000, 0x00000008, 0x08020200, 0x00000200,
- 0x00020200, 0x08020000, 0x08020008, 0x00020208,
- 0x08000208, 0x00020200, 0x00020000, 0x08000208,
- 0x00000008, 0x08020208, 0x00000200, 0x08000000,
- 0x08020200, 0x08000000, 0x00020008, 0x00000208,
- 0x00020000, 0x08020200, 0x08000200, 0x00000000,
- 0x00000200, 0x00020008, 0x08020208, 0x08000200,
- 0x08000008, 0x00000200, 0x00000000, 0x08020008,
- 0x08000208, 0x00020000, 0x08000000, 0x08020208,
- 0x00000008, 0x00020208, 0x00020200, 0x08000008,
- 0x08020000, 0x08000208, 0x00000208, 0x08020000,
- 0x00020208, 0x00000008, 0x08020008, 0x00020200 },
- { 0x00802001, 0x00002081, 0x00002081, 0x00000080,
- 0x00802080, 0x00800081, 0x00800001, 0x00002001,
- 0x00000000, 0x00802000, 0x00802000, 0x00802081,
- 0x00000081, 0x00000000, 0x00800080, 0x00800001,
- 0x00000001, 0x00002000, 0x00800000, 0x00802001,
- 0x00000080, 0x00800000, 0x00002001, 0x00002080,
- 0x00800081, 0x00000001, 0x00002080, 0x00800080,
- 0x00002000, 0x00802080, 0x00802081, 0x00000081,
- 0x00800080, 0x00800001, 0x00802000, 0x00802081,
- 0x00000081, 0x00000000, 0x00000000, 0x00802000,
- 0x00002080, 0x00800080, 0x00800081, 0x00000001,
- 0x00802001, 0x00002081, 0x00002081, 0x00000080,
- 0x00802081, 0x00000081, 0x00000001, 0x00002000,
- 0x00800001, 0x00002001, 0x00802080, 0x00800081,
- 0x00002001, 0x00002080, 0x00800000, 0x00802001,
- 0x00000080, 0x00800000, 0x00002000, 0x00802080 },
- { 0x00000100, 0x02080100, 0x02080000, 0x42000100,
- 0x00080000, 0x00000100, 0x40000000, 0x02080000,
- 0x40080100, 0x00080000, 0x02000100, 0x40080100,
- 0x42000100, 0x42080000, 0x00080100, 0x40000000,
- 0x02000000, 0x40080000, 0x40080000, 0x00000000,
- 0x40000100, 0x42080100, 0x42080100, 0x02000100,
- 0x42080000, 0x40000100, 0x00000000, 0x42000000,
- 0x02080100, 0x02000000, 0x42000000, 0x00080100,
- 0x00080000, 0x42000100, 0x00000100, 0x02000000,
- 0x40000000, 0x02080000, 0x42000100, 0x40080100,
- 0x02000100, 0x40000000, 0x42080000, 0x02080100,
- 0x40080100, 0x00000100, 0x02000000, 0x42080000,
- 0x42080100, 0x00080100, 0x42000000, 0x42080100,
- 0x02080000, 0x00000000, 0x40080000, 0x42000000,
- 0x00080100, 0x02000100, 0x40000100, 0x00080000,
- 0x00000000, 0x40080000, 0x02080100, 0x40000100 },
- { 0x20000010, 0x20400000, 0x00004000, 0x20404010,
- 0x20400000, 0x00000010, 0x20404010, 0x00400000,
- 0x20004000, 0x00404010, 0x00400000, 0x20000010,
- 0x00400010, 0x20004000, 0x20000000, 0x00004010,
- 0x00000000, 0x00400010, 0x20004010, 0x00004000,
- 0x00404000, 0x20004010, 0x00000010, 0x20400010,
- 0x20400010, 0x00000000, 0x00404010, 0x20404000,
- 0x00004010, 0x00404000, 0x20404000, 0x20000000,
- 0x20004000, 0x00000010, 0x20400010, 0x00404000,
- 0x20404010, 0x00400000, 0x00004010, 0x20000010,
- 0x00400000, 0x20004000, 0x20000000, 0x00004010,
- 0x20000010, 0x20404010, 0x00404000, 0x20400000,
- 0x00404010, 0x20404000, 0x00000000, 0x20400010,
- 0x00000010, 0x00004000, 0x20400000, 0x00404010,
- 0x00004000, 0x00400010, 0x20004010, 0x00000000,
- 0x20404000, 0x20000000, 0x00400010, 0x20004010 },
- { 0x00200000, 0x04200002, 0x04000802, 0x00000000,
- 0x00000800, 0x04000802, 0x00200802, 0x04200800,
- 0x04200802, 0x00200000, 0x00000000, 0x04000002,
- 0x00000002, 0x04000000, 0x04200002, 0x00000802,
- 0x04000800, 0x00200802, 0x00200002, 0x04000800,
- 0x04000002, 0x04200000, 0x04200800, 0x00200002,
- 0x04200000, 0x00000800, 0x00000802, 0x04200802,
- 0x00200800, 0x00000002, 0x04000000, 0x00200800,
- 0x04000000, 0x00200800, 0x00200000, 0x04000802,
- 0x04000802, 0x04200002, 0x04200002, 0x00000002,
- 0x00200002, 0x04000000, 0x04000800, 0x00200000,
- 0x04200800, 0x00000802, 0x00200802, 0x04200800,
- 0x00000802, 0x04000002, 0x04200802, 0x04200000,
- 0x00200800, 0x00000000, 0x00000002, 0x04200802,
- 0x00000000, 0x00200802, 0x04200000, 0x00000800,
- 0x04000002, 0x04000800, 0x00000800, 0x00200002 },
- { 0x10001040, 0x00001000, 0x00040000, 0x10041040,
- 0x10000000, 0x10001040, 0x00000040, 0x10000000,
- 0x00040040, 0x10040000, 0x10041040, 0x00041000,
- 0x10041000, 0x00041040, 0x00001000, 0x00000040,
- 0x10040000, 0x10000040, 0x10001000, 0x00001040,
- 0x00041000, 0x00040040, 0x10040040, 0x10041000,
- 0x00001040, 0x00000000, 0x00000000, 0x10040040,
- 0x10000040, 0x10001000, 0x00041040, 0x00040000,
- 0x00041040, 0x00040000, 0x10041000, 0x00001000,
- 0x00000040, 0x10040040, 0x00001000, 0x00041040,
- 0x10001000, 0x00000040, 0x10000040, 0x10040000,
- 0x10040040, 0x10000000, 0x00040000, 0x10001040,
- 0x00000000, 0x10041040, 0x00040040, 0x10000040,
- 0x10040000, 0x10001000, 0x10001040, 0x00000000,
- 0x10041040, 0x00041000, 0x00041000, 0x00001040,
- 0x00001040, 0x00040040, 0x10000000, 0x10041000 }
-};
-
-#undef F
-#define F(l,r,key){\
- work = ((r >> 4) | (r << 28)) ^ key[0];\
- l ^= Spbox[6][work & 0x3f];\
- l ^= Spbox[4][(work >> 8) & 0x3f];\
- l ^= Spbox[2][(work >> 16) & 0x3f];\
- l ^= Spbox[0][(work >> 24) & 0x3f];\
- work = r ^ key[1];\
- l ^= Spbox[7][work & 0x3f];\
- l ^= Spbox[5][(work >> 8) & 0x3f];\
- l ^= Spbox[3][(work >> 16) & 0x3f];\
- l ^= Spbox[1][(work >> 24) & 0x3f];\
-}
-/* Encrypt or decrypt a block of data in ECB mode */
-static void
-des(ks,block)
-unsigned long ks[16][2]; /* Key schedule */
-unsigned char block[8]; /* Data block */
-{
- unsigned long left,right,work;
-
- /* Read input block and place in left/right in big-endian order */
- left = ((unsigned long)block[0] << 24)
- | ((unsigned long)block[1] << 16)
- | ((unsigned long)block[2] << 8)
- | (unsigned long)block[3];
- right = ((unsigned long)block[4] << 24)
- | ((unsigned long)block[5] << 16)
- | ((unsigned long)block[6] << 8)
- | (unsigned long)block[7];
-
- /* Hoey's clever initial permutation algorithm, from Outerbridge
- * (see Schneier p 478)
- *
- * The convention here is the same as Outerbridge: rotate each
- * register left by 1 bit, i.e., so that "left" contains permuted
- * input bits 2, 3, 4, ... 1 and "right" contains 33, 34, 35, ... 32
- * (using origin-1 numbering as in the FIPS). This allows us to avoid
- * one of the two rotates that would otherwise be required in each of
- * the 16 rounds.
- */
- work = ((left >> 4) ^ right) & 0x0f0f0f0f;
- right ^= work;
- left ^= work << 4;
- work = ((left >> 16) ^ right) & 0xffff;
- right ^= work;
- left ^= work << 16;
- work = ((right >> 2) ^ left) & 0x33333333;
- left ^= work;
- right ^= (work << 2);
- work = ((right >> 8) ^ left) & 0xff00ff;
- left ^= work;
- right ^= (work << 8);
- right = (right << 1) | (right >> 31);
- work = (left ^ right) & 0xaaaaaaaa;
- left ^= work;
- right ^= work;
- left = (left << 1) | (left >> 31);
-
- /* Now do the 16 rounds */
- F(left,right,ks[0]);
- F(right,left,ks[1]);
- F(left,right,ks[2]);
- F(right,left,ks[3]);
- F(left,right,ks[4]);
- F(right,left,ks[5]);
- F(left,right,ks[6]);
- F(right,left,ks[7]);
- F(left,right,ks[8]);
- F(right,left,ks[9]);
- F(left,right,ks[10]);
- F(right,left,ks[11]);
- F(left,right,ks[12]);
- F(right,left,ks[13]);
- F(left,right,ks[14]);
- F(right,left,ks[15]);
-
- /* Inverse permutation, also from Hoey via Outerbridge and Schneier */
- right = (right << 31) | (right >> 1);
- work = (left ^ right) & 0xaaaaaaaa;
- left ^= work;
- right ^= work;
- left = (left >> 1) | (left << 31);
- work = ((left >> 8) ^ right) & 0xff00ff;
- right ^= work;
- left ^= work << 8;
- work = ((left >> 2) ^ right) & 0x33333333;
- right ^= work;
- left ^= work << 2;
- work = ((right >> 16) ^ left) & 0xffff;
- left ^= work;
- right ^= work << 16;
- work = ((right >> 4) ^ left) & 0x0f0f0f0f;
- left ^= work;
- right ^= work << 4;
-
- /* Put the block back into the user's buffer with final swap */
- block[0] = right >> 24;
- block[1] = right >> 16;
- block[2] = right >> 8;
- block[3] = right;
- block[4] = left >> 24;
- block[5] = left >> 16;
- block[6] = left >> 8;
- block[7] = left;
-}
-
-/* Key schedule-related tables from FIPS-46 */
-
-/* permuted choice table (key) */
-static unsigned char pc1[] = {
- 57, 49, 41, 33, 25, 17, 9,
- 1, 58, 50, 42, 34, 26, 18,
- 10, 2, 59, 51, 43, 35, 27,
- 19, 11, 3, 60, 52, 44, 36,
-
- 63, 55, 47, 39, 31, 23, 15,
- 7, 62, 54, 46, 38, 30, 22,
- 14, 6, 61, 53, 45, 37, 29,
- 21, 13, 5, 28, 20, 12, 4
-};
-
-/* number left rotations of pc1 */
-static unsigned char totrot[] = {
- 1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28
-};
-
-/* permuted choice key (table) */
-static unsigned char pc2[] = {
- 14, 17, 11, 24, 1, 5,
- 3, 28, 15, 6, 21, 10,
- 23, 19, 12, 4, 26, 8,
- 16, 7, 27, 20, 13, 2,
- 41, 52, 31, 37, 47, 55,
- 30, 40, 51, 45, 33, 48,
- 44, 49, 39, 56, 34, 53,
- 46, 42, 50, 36, 29, 32
-};
-
-/* End of DES-defined tables */
-
-
-/* bit 0 is left-most in byte */
-static int bytebit[] = {
- 0200,0100,040,020,010,04,02,01
-};
-
-
-/* Generate key schedule for encryption or decryption
- * depending on the value of "decrypt"
- */
-static void
-deskey(k,key,decrypt)
-DES_KS k; /* Key schedule array */
-unsigned char *key; /* 64 bits (will use only 56) */
-int decrypt; /* 0 = encrypt, 1 = decrypt */
-{
- unsigned char pc1m[56]; /* place to modify pc1 into */
- unsigned char pcr[56]; /* place to rotate pc1 into */
- register int i,j,l;
- int m;
- unsigned char ks[8];
-
- for (j=0; j<56; j++) { /* convert pc1 to bits of key */
- l=pc1[j]-1; /* integer bit location */
- m = l & 07; /* find bit */
- pc1m[j]=(key[l>>3] & /* find which key byte l is in */
- bytebit[m]) /* and which bit of that byte */
- ? 1 : 0; /* and store 1-bit result */
- }
- for (i=0; i<16; i++) { /* key chunk for each iteration */
- memset(ks,0,sizeof(ks)); /* Clear key schedule */
- for (j=0; j<56; j++) /* rotate pc1 the right amount */
- pcr[j] = pc1m[(l=j+totrot[decrypt? 15-i : i])<(j<28? 28 : 56) ? l: l-28];
- /* rotate left and right halves independently */
- for (j=0; j<48; j++){ /* select bits individually */
- /* check bit that goes to ks[j] */
- if (pcr[pc2[j]-1]){
- /* mask it in if it's there */
- l= j % 6;
- ks[j/6] |= bytebit[l] >> 2;
- }
- }
- /* Now convert to packed odd/even interleaved form */
- k[i][0] = ((long)ks[0] << 24)
- | ((long)ks[2] << 16)
- | ((long)ks[4] << 8)
- | ((long)ks[6]);
- k[i][1] = ((long)ks[1] << 24)
- | ((long)ks[3] << 16)
- | ((long)ks[5] << 8)
- | ((long)ks[7]);
- }
-}
diff --git a/camel/camel-sasl-ntlm.h b/camel/camel-sasl-ntlm.h
deleted file mode 100644
index 3818081c74..0000000000
--- a/camel/camel-sasl-ntlm.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright 2002 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_SASL_NTLM_H
-#define CAMEL_SASL_NTLM_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <camel/camel-sasl.h>
-
-#define CAMEL_SASL_NTLM_TYPE (camel_sasl_ntlm_get_type ())
-#define CAMEL_SASL_NTLM(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SASL_NTLM_TYPE, CamelSaslNTLM))
-#define CAMEL_SASL_NTLM_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SASL_NTLM_TYPE, CamelSaslNTLMClass))
-#define CAMEL_IS_SASL_NTLM(o) (CAMEL_CHECK_TYPE((o), CAMEL_SASL_NTLM_TYPE))
-
-typedef struct _CamelSaslNTLM {
- CamelSasl parent_object;
-
-} CamelSaslNTLM;
-
-
-typedef struct _CamelSaslNTLMClass {
- CamelSaslClass parent_class;
-
-} CamelSaslNTLMClass;
-
-
-/* Standard Camel function */
-CamelType camel_sasl_ntlm_get_type (void);
-
-extern CamelServiceAuthType camel_sasl_ntlm_authtype;
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_SASL_NTLM_H */
diff --git a/camel/camel-sasl-plain.c b/camel/camel-sasl-plain.c
deleted file mode 100644
index 48d1fc9a01..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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-sasl-plain.h"
-#include "camel-service.h"
-
-CamelServiceAuthType camel_sasl_plain_authtype = {
- N_("PLAIN"),
-
- 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 a23568047e..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_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 329151872e..0000000000
--- a/camel/camel-sasl-popb4smtp.c
+++ /dev/null
@@ -1,151 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Michael Zucchi <notzed@ximian.com>
- *
- * Copyright 2001-2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <pthread.h>
-#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)
-
-static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
-#define POPB4SMTP_LOCK(l) pthread_mutex_lock(&l)
-#define POPB4SMTP_UNLOCK(l) pthread_mutex_unlock(&l)
-
-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, 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 b94bed0d49..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_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 24ee6e4d94..0000000000
--- a/camel/camel-sasl.c
+++ /dev/null
@@ -1,285 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001-2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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-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-gssapi.h"
-#include "camel-sasl-kerberos4.h"
-#include "camel-sasl-login.h"
-#include "camel-sasl-plain.h"
-#include "camel-sasl-popb4smtp.h"
-#include "camel-sasl-ntlm.h"
-
-
-#define w(x)
-
-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);
- g_free (sasl->mech);
- camel_object_unref (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)
-{
- w(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 = camel_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 = camel_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_KRB5
- else if (!strcmp (mechanism, "GSSAPI"))
- sasl = (CamelSasl *) camel_object_new (CAMEL_SASL_GSSAPI_TYPE);
-#endif
-#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 if (!strcmp (mechanism, "NTLM"))
- sasl = (CamelSasl *) camel_object_new (CAMEL_SASL_NTLM_TYPE);
- else
- return NULL;
-
- sasl->mech = g_strdup (mechanism);
- sasl->service_name = g_strdup (service_name);
- sasl->service = service;
- camel_object_ref (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_KRB5
- types = g_list_prepend (types, &camel_sasl_gssapi_authtype);
-#endif
-#ifdef HAVE_KRB4
- types = g_list_prepend (types, &camel_sasl_kerberos4_authtype);
-#endif
- types = g_list_prepend (types, &camel_sasl_ntlm_authtype);
- 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_KRB5
- else if (!strcmp (mechanism, "GSSAPI"))
- return &camel_sasl_gssapi_authtype;
-#endif
-#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 if (!strcmp (mechanism, "NTLM"))
- return &camel_sasl_ntlm_authtype;
- else
- return NULL;
-}
diff --git a/camel/camel-sasl.h b/camel/camel-sasl.h
deleted file mode 100644
index 2b5db5c447..0000000000
--- a/camel/camel-sasl.h
+++ /dev/null
@@ -1,78 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_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;
- char *mech; /* mechanism */
- 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 2ba908bea3..0000000000
--- a/camel/camel-search-private.c
+++ /dev/null
@@ -1,684 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 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 <glib.h>
-#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 <glib/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;
- if (type & CAMEL_SEARCH_MATCH_NEWLINE)
- flags |= REG_NEWLINE;
- 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;
-}
-
-/* FIXME: This is stupidly slow and needs to be removed */
-static gunichar
-utf8_get (const char **inp)
-{
- const unsigned char *p = *inp;
- gunichar c;
-
- if (p == NULL)
- return 0;
-
- c = g_utf8_get_char (p);
- *inp = g_unichar_validate (c) ? g_utf8_next_char (p) : NULL;
-
- return c;
-}
-
-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 = g_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, i;
- CamelInternetAddress *cia;
- char *v, *vdom, *mdom;
-
- while (*value && isspace (*value))
- value++;
-
- switch(type) {
- case CAMEL_SEARCH_TYPE_ENCODED:
- v = camel_header_decode_string(value, default_charset); /* FIXME: Find header charset */
- truth = header_match(v, match, how);
- g_free(v);
- break;
- case CAMEL_SEARCH_TYPE_MLIST:
- /* Special mailing list old-version domain hack
- If one of the mailing list names doesn't have an @ in it, its old-style, so
- only match against the pre-domain part, which should be common */
-
- vdom = strchr(value, '@');
- mdom = strchr(match, '@');
- if (mdom == NULL && vdom != NULL) {
- v = g_alloca(vdom-value+1);
- memcpy(v, value, vdom-value);
- v[vdom-value] = 0;
- value = (char *)v;
- } else if (mdom != NULL && vdom == NULL) {
- v = g_alloca(mdom-match+1);
- memcpy(v, match, mdom-match);
- v[mdom-match] = 0;
- match = (char *)v;
- }
- /* Falls through */
- 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);
-
- for (i=0; !truth && camel_internet_address_get(cia, i, &name, &addr);i++)
- truth = (name && header_match(name, match, how)) || (addr && header_match(addr, match, how));
-
- camel_object_unref (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;
-
- /* 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 (camel_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 (mem);
- }
-
- return truth;
-}
-
-static inline guint32
-camel_utf8_getc(const unsigned char **ptr)
-{
- register unsigned char *p = (unsigned char *)*ptr;
- register unsigned char c, r;
- register guint32 v, m;
-
-again:
- r = *p++;
-loop:
- if (r < 0x80) {
- *ptr = p;
- v = r;
- } else if (r < 0xfe) { /* valid start char? */
- v = r;
- m = 0x7f80; /* used to mask out the length bits */
- do {
- c = *p++;
- if ((c & 0xc0) != 0x80) {
- r = c;
- goto loop;
- }
- v = (v<<6) | (c & 0x3f);
- r<<=1;
- m<<=5;
- } while (r & 0x40);
-
- *ptr = p;
-
- v &= ~m;
- } else {
- goto again;
- }
-
- return v;
-}
-
-static void
-output_c(GString *w, guint32 c, int *type)
-{
- int utf8len;
- char utf8[8];
-
- if (!g_unichar_isalnum(c))
- *type = CAMEL_SEARCH_WORD_COMPLEX | (*type & CAMEL_SEARCH_WORD_8BIT);
- else
- c = g_unichar_tolower(c);
-
- if (c > 0x80)
- *type |= CAMEL_SEARCH_WORD_8BIT;
-
- /* FIXME: use camel_utf8_putc */
- utf8len = g_unichar_to_utf8(c, utf8);
- utf8[utf8len] = 0;
- g_string_append(w, utf8);
-}
-
-static void
-output_w(GString *w, GPtrArray *list, int type)
-{
- struct _camel_search_word *word;
-
- if (w->len) {
- word = g_malloc0(sizeof(*word));
- word->word = g_strdup(w->str);
- word->type = type;
- g_ptr_array_add(list, word);
- g_string_truncate(w, 0);
- }
-}
-
-struct _camel_search_words *
-camel_search_words_split(const unsigned char *in)
-{
- int type = CAMEL_SEARCH_WORD_SIMPLE, all = 0;
- GString *w;
- struct _camel_search_words *words;
- GPtrArray *list = g_ptr_array_new();
- guint32 c;
- int inquote = 0;
-
- words = g_malloc0(sizeof(*words));
- w = g_string_new("");
-
- do {
- c = camel_utf8_getc(&in);
-
- if (c == 0
- || (inquote && c == '"')
- || (!inquote && g_unichar_isspace(c))) {
- output_w(w, list, type);
- all |= type;
- type = CAMEL_SEARCH_WORD_SIMPLE;
- inquote = 0;
- } else {
- if (c == '\\') {
- c = camel_utf8_getc(&in);
- if (c)
- output_c(w, c, &type);
- else {
- output_w(w, list, type);
- all |= type;
- }
- } else if (c == '\"') {
- inquote = 1;
- } else {
- output_c(w, c, &type);
- }
- }
- } while (c);
-
- g_string_free(w, TRUE);
- words->len = list->len;
- words->words = (struct _camel_search_word **)list->pdata;
- words->type = all;
- g_ptr_array_free(list, FALSE);
-
- return words;
-}
-
-/* takes an existing 'words' list, and converts it to another consisting of
- only simple words, with any punctuation etc stripped */
-struct _camel_search_words *
-camel_search_words_simple(struct _camel_search_words *wordin)
-{
- int i;
- const unsigned char *ptr, *start, *last;
- int type = CAMEL_SEARCH_WORD_SIMPLE, all = 0;
- GPtrArray *list = g_ptr_array_new();
- struct _camel_search_word *word;
- struct _camel_search_words *words;
- guint32 c;
-
- words = g_malloc0(sizeof(*words));
-
- for (i=0;i<wordin->len;i++) {
- if ((wordin->words[i]->type & CAMEL_SEARCH_WORD_COMPLEX) == 0) {
- word = g_malloc0(sizeof(*word));
- word->type = wordin->words[i]->type;
- word->word = g_strdup(wordin->words[i]->word);
- g_ptr_array_add(list, word);
- } else {
- ptr = wordin->words[i]->word;
- start = last = ptr;
- do {
- c = camel_utf8_getc(&ptr);
- if (c == 0 || !g_unichar_isalnum(c)) {
- if (last > start) {
- word = g_malloc0(sizeof(*word));
- word->word = g_strndup(start, last-start);
- word->type = type;
- g_ptr_array_add(list, word);
- all |= type;
- type = CAMEL_SEARCH_WORD_SIMPLE;
- }
- start = ptr;
- }
- if (c > 0x80)
- type = CAMEL_SEARCH_WORD_8BIT;
- last = ptr;
- } while (c);
- }
- }
-
- words->len = list->len;
- words->words = (struct _camel_search_word **)list->pdata;
- words->type = all;
- g_ptr_array_free(list, FALSE);
-
- return words;
-}
-
-void
-camel_search_words_free(struct _camel_search_words *words)
-{
- int i;
-
- for (i=0;i<words->len;i++) {
- struct _camel_search_word *word = words->words[i];
-
- g_free(word->word);
- g_free(word);
- }
- g_free(words->words);
- g_free(words);
-}
-
diff --git a/camel/camel-search-private.h b/camel/camel-search-private.h
deleted file mode 100644
index 8e83f7aed3..0000000000
--- a/camel/camel-search-private.h
+++ /dev/null
@@ -1,82 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_SEARCH_PRIVATE_H
-#define _CAMEL_SEARCH_PRIVATE_H
-
-#include <regex.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_MATCH_NEWLINE = 1<<4,
-} 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_TYPE_MLIST, /* its a mailing list pseudo-header */
-} 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_camel_header_soundex(const char *header, const char *match);
-
-/* TODO: replace with a real search function */
-const char *camel_ustrstrcase(const char *haystack, const char *needle);
-
-/* Some crappy utility functions for handling multiple search words */
-enum _camel_search_word_t {
- CAMEL_SEARCH_WORD_SIMPLE = 1,
- CAMEL_SEARCH_WORD_COMPLEX = 2,
- CAMEL_SEARCH_WORD_8BIT = 4,
-};
-struct _camel_search_word {
- enum _camel_search_word_t type;
- char *word;
-};
-
-struct _camel_search_words {
- int len;
- enum _camel_search_word_t type; /* OR of all word types in list */
- struct _camel_search_word **words;
-};
-
-struct _camel_search_words *camel_search_words_split(const unsigned char *in);
-struct _camel_search_words *camel_search_words_simple(struct _camel_search_words *wordin);
-void camel_search_words_free(struct _camel_search_words *);
-
-#endif /* ! _CAMEL_SEARCH_PRIVATE_H */
-
diff --git a/camel/camel-seekable-stream.c b/camel/camel-seekable-stream.c
deleted file mode 100644
index 874d68e40c..0000000000
--- a/camel/camel-seekable-stream.c
+++ /dev/null
@@ -1,202 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 9ac73c7ee8..0000000000
--- a/camel/camel-seekable-stream.h
+++ /dev/null
@@ -1,87 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 e92f4e0549..0000000000
--- a/camel/camel-seekable-substream.c
+++ /dev/null
@@ -1,302 +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-2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 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 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 (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:
- * @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(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 (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 ssize_t
-stream_read (CamelStream *stream, char *buffer, size_t n)
-{
- CamelSeekableStream *parent;
- CamelSeekableStream *seekable_stream = CAMEL_SEEKABLE_STREAM (stream);
- CamelSeekableSubstream *seekable_substream = CAMEL_SEEKABLE_SUBSTREAM (stream);
- ssize_t 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 ssize_t
-stream_write (CamelStream *stream, const char *buffer, size_t n)
-{
- CamelSeekableStream *parent;
- CamelSeekableStream *seekable_stream = CAMEL_SEEKABLE_STREAM(stream);
- CamelSeekableSubstream *seekable_substream = CAMEL_SEEKABLE_SUBSTREAM(stream);
- ssize_t 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 b500944298..0000000000
--- a/camel/camel-seekable-substream.h
+++ /dev/null
@@ -1,68 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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(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 cd66bb9cb1..0000000000
--- a/camel/camel-service.c
+++ /dev/null
@@ -1,958 +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-2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <pthread.h>
-#include <errno.h>
-
-#include "e-util/e-msgport.h"
-
-#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)
-#define w(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 int service_setv (CamelObject *object, CamelException *ex, CamelArgV *args);
-static int service_getv (CamelObject *object, CamelException *ex, CamelArgGetV *args);
-
-
-static void
-camel_service_class_init (CamelServiceClass *camel_service_class)
-{
- CamelObjectClass *object_class = CAMEL_OBJECT_CLASS (camel_service_class);
-
- parent_class = camel_type_get_global_classfuncs (CAMEL_OBJECT_TYPE);
-
- /* virtual method overloading */
- object_class->setv = service_setv;
- object_class->getv = service_getv;
-
- /* 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));
- service->priv->connect_lock = e_mutex_new(E_MUTEX_REC);
- service->priv->connect_op_lock = e_mutex_new(E_MUTEX_SIMPLE);
-}
-
-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)) {
- w(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 (service->session);
-
- e_mutex_destroy (service->priv->connect_lock);
- e_mutex_destroy (service->priv->connect_op_lock);
-
- 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 int
-service_setv (CamelObject *object, CamelException *ex, CamelArgV *args)
-{
- CamelService *service = (CamelService *) object;
- CamelURL *url = service->url;
- gboolean reconnect = FALSE;
- guint32 tag;
- int i;
-
- for (i = 0; i < args->argc; i++) {
- tag = args->argv[i].tag;
-
- /* make sure this arg wasn't already handled */
- if (tag & CAMEL_ARG_IGNORE)
- continue;
-
- /* make sure this is an arg we're supposed to handle */
- if ((tag & CAMEL_ARG_TAG) <= CAMEL_SERVICE_ARG_FIRST ||
- (tag & CAMEL_ARG_TAG) >= CAMEL_SERVICE_ARG_FIRST + 100)
- continue;
-
- if (tag == CAMEL_SERVICE_USERNAME) {
- /* set the username */
- if (strcmp (url->user, args->argv[i].ca_str) != 0) {
- camel_url_set_user (url, args->argv[i].ca_str);
- reconnect = TRUE;
- }
- } else if (tag == CAMEL_SERVICE_AUTH) {
- /* set the auth mechanism */
- if (strcmp (url->authmech, args->argv[i].ca_str) != 0) {
- camel_url_set_authmech (url, args->argv[i].ca_str);
- reconnect = TRUE;
- }
- } else if (tag == CAMEL_SERVICE_HOSTNAME) {
- /* set the hostname */
- if (strcmp (url->host, args->argv[i].ca_str) != 0) {
- camel_url_set_host (url, args->argv[i].ca_str);
- reconnect = TRUE;
- }
- } else if (tag == CAMEL_SERVICE_PORT) {
- /* set the port */
- if (url->port != args->argv[i].ca_int) {
- camel_url_set_port (url, args->argv[i].ca_int);
- reconnect = TRUE;
- }
- } else if (tag == CAMEL_SERVICE_PATH) {
- /* set the path */
- if (strcmp (url->path, args->argv[i].ca_str) != 0) {
- camel_url_set_host (url, args->argv[i].ca_str);
- reconnect = TRUE;
- }
- } else {
- /* error? */
- continue;
- }
-
- /* let our parent know that we've handled this arg */
- camel_argv_ignore (args, i);
- }
-
- /* FIXME: what if we are in the process of connecting? */
- if (reconnect && service->status == CAMEL_SERVICE_CONNECTED) {
- /* reconnect the service using the new URL */
- if (camel_service_disconnect (service, TRUE, ex))
- camel_service_connect (service, ex);
- }
-
- return CAMEL_OBJECT_CLASS (parent_class)->setv (object, ex, args);
-}
-
-static int
-service_getv (CamelObject *object, CamelException *ex, CamelArgGetV *args)
-{
- CamelService *service = (CamelService *) object;
- CamelURL *url = service->url;
- guint32 tag;
- int i;
-
- for (i = 0; i < args->argc; i++) {
- tag = args->argv[i].tag;
-
- /* make sure this is an arg we're supposed to handle */
- if ((tag & CAMEL_ARG_TAG) <= CAMEL_SERVICE_ARG_FIRST ||
- (tag & CAMEL_ARG_TAG) >= CAMEL_SERVICE_ARG_FIRST + 100)
- continue;
-
- switch (tag) {
- case CAMEL_SERVICE_USERNAME:
- /* get the username */
- *args->argv[i].ca_str = url->user;
- break;
- case CAMEL_SERVICE_AUTH:
- /* get the auth mechanism */
- *args->argv[i].ca_str = url->authmech;
- break;
- case CAMEL_SERVICE_HOSTNAME:
- /* get the hostname */
- *args->argv[i].ca_str = url->host;
- break;
- case CAMEL_SERVICE_PORT:
- /* get the port */
- *args->argv[i].ca_int = url->port;
- break;
- case CAMEL_SERVICE_PATH:
- /* get the path */
- *args->argv[i].ca_str = url->path;
- break;
- default:
- /* error? */
- break;
- }
- }
-
- return CAMEL_OBJECT_CLASS (parent_class)->getv (object, ex, args);
-}
-
-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 (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;
- gboolean unreg = 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);
- unreg = TRUE;
- }
- 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);
- if (service->connect_op) {
- if (unreg)
- camel_operation_unregister (service->connect_op);
-
- 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;
- int unreg = FALSE;
-
- CAMEL_SERVICE_LOCK (service, connect_lock);
-
- if (service->status != CAMEL_SERVICE_DISCONNECTED
- && service->status != CAMEL_SERVICE_DISCONNECTING) {
- 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);
- unreg = TRUE;
- }
- 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);
- if (unreg)
- camel_operation_unregister (service->connect_op);
-
- 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)
-{
- w(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)
-{
- CamelProvider *prov = service->provider;
- CamelURL *url = service->url;
- GString *gpath;
- char *path;
-
- /* 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_append_printf (gpath, "/%s@%s",
- url->user ? url->user : "",
- url->host ? url->host : "");
-
- if (url->port)
- g_string_append_printf (gpath, ":%d", url->port);
- } else {
- g_string_append_printf (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_append_printf (gpath, "/%s%s",
- CAMEL_PROVIDER_NEEDS (prov, CAMEL_URL_PART_HOST) ? "" : "@",
- url->host ? url->host : "");
-
- if (url->port)
- g_string_append_printf (gpath, ":%d", url->port);
- }
-
- if (CAMEL_PROVIDER_NEEDS (prov, CAMEL_URL_PART_PATH))
- g_string_append_printf (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_gethostbyname (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 {
- EMsg msg;
- unsigned int cancelled:1;
- const char *name;
- int len;
- int type;
- int result;
- int herr;
- struct hostent hostbuf;
- int hostbuflen;
- char *hostbufmem;
-};
-
-static void *
-get_hostbyname(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"));
- pthread_testcancel();
- info->hostbuflen *= 2;
- info->hostbufmem = g_realloc(info->hostbufmem, info->hostbuflen);
- }
-
- d(printf("gethostbyname ok?\n"));
-
- /* If we got cancelled, dont reply, just free it */
- if (info->cancelled) {
- g_free(info->hostbufmem);
- g_free(info);
- } else {
- e_msgport_reply((EMsg *)info);
- }
-
- return NULL;
-}
-
-struct hostent *
-camel_gethostbyname (const char *name, CamelException *exout)
-{
- int fdmax, status, fd, cancel_fd;
- struct _lookup_msg *msg;
- CamelException ex;
-
- g_return_val_if_fail(name != NULL, NULL);
-
- if (camel_operation_cancel_check(NULL)) {
- camel_exception_set (exout, CAMEL_EXCEPTION_USER_CANCEL, _("Cancelled"));
- return NULL;
- }
-
- camel_exception_init(&ex);
- 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;
- msg->result = -1;
-
- cancel_fd = camel_operation_cancel_fd(NULL);
- if (cancel_fd == -1) {
- get_hostbyname(msg);
- } else {
- EMsgPort *reply_port;
- pthread_t id;
- fd_set rdset;
- int err;
-
- reply_port = msg->msg.reply_port = e_msgport_new();
- fd = e_msgport_fd(msg->msg.reply_port);
- if ((err = pthread_create(&id, NULL, get_hostbyname, msg)) == 0) {
- d(printf("waiting for name return/cancellation in main process\n"));
- do {
- FD_ZERO(&rdset);
- FD_SET(cancel_fd, &rdset);
- FD_SET(fd, &rdset);
- fdmax = MAX(fd, cancel_fd) + 1;
- status = select(fdmax, &rdset, NULL, 0, NULL);
- } while (status == -1 && errno == EINTR);
-
- if (status == -1 || FD_ISSET(cancel_fd, &rdset)) {
- if (status == -1)
- camel_exception_setv(&ex, CAMEL_EXCEPTION_SYSTEM, _("Failure in name lookup: %s"), g_strerror(errno));
- else
- camel_exception_setv(&ex, CAMEL_EXCEPTION_USER_CANCEL, _("Cancelled"));
-
- /* We cancel so if the thread impl is decent it causes immediate exit.
- We detach so we dont need to wait for it to exit if it isn't.
- We check the reply port incase we had a reply in the mean time, which we free later */
- d(printf("Cancelling lookup thread and leaving it\n"));
- msg->cancelled = 1;
- pthread_detach(id);
- pthread_cancel(id);
- msg = (struct _lookup_msg *)e_msgport_get(reply_port);
- } 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"));
- }
- } else {
- camel_exception_setv(&ex, CAMEL_EXCEPTION_SYSTEM, _("Host lookup failed: cannot create thread: %s"), g_strerror(err));
- }
- e_msgport_destroy(reply_port);
- }
-
- camel_operation_end(NULL);
-
- if (!camel_exception_is_set(&ex)) {
- if (msg->result == 0)
- return &msg->hostbuf;
-
- if (msg->herr == HOST_NOT_FOUND || msg->herr == NO_DATA)
- camel_exception_setv (&ex, CAMEL_EXCEPTION_SYSTEM,
- _("Host lookup failed: %s: host not found"), name);
- else
- camel_exception_setv (&ex, CAMEL_EXCEPTION_SYSTEM,
- _("Host lookup failed: %s: unknown reason"), name);
- }
-
- if (msg) {
- g_free(msg->hostbufmem);
- g_free(msg);
- }
-
- camel_exception_xfer(exout, &ex);
-
- return NULL;
-}
-
-static void *
-get_hostbyaddr (void *data)
-{
- struct _lookup_msg *info = data;
-
- while ((info->result = e_gethostbyaddr_r (info->name, info->len, info->type, &info->hostbuf,
- info->hostbufmem, info->hostbuflen, &info->herr)) == ERANGE) {
- d(printf ("gethostbyaddr fialed?\n"));
- pthread_testcancel ();
- info->hostbuflen *= 2;
- info->hostbufmem = g_realloc (info->hostbufmem, info->hostbuflen);
- }
-
- d(printf ("gethostbyaddr ok?\n"));
-
- if (info->cancelled) {
- g_free(info->hostbufmem);
- g_free(info);
- } else {
- e_msgport_reply((EMsg *)info);
- }
-
- return NULL;
-}
-
-
-struct hostent *
-camel_gethostbyaddr (const char *addr, int len, int type, CamelException *exout)
-{
- int fdmax, status, fd, cancel_fd;
- struct _lookup_msg *msg;
- CamelException ex;
-
- g_return_val_if_fail (addr != NULL, NULL);
-
- if (camel_operation_cancel_check (NULL)) {
- camel_exception_set (exout, CAMEL_EXCEPTION_USER_CANCEL, _("Cancelled"));
- return NULL;
- }
-
- camel_exception_init(&ex);
- camel_operation_start_transient (NULL, _("Resolving address"));
-
- msg = g_malloc0 (sizeof (struct _lookup_msg));
- msg->hostbuflen = 1024;
- msg->hostbufmem = g_malloc (msg->hostbuflen);
- msg->name = addr;
- msg->len = len;
- msg->type = type;
- msg->result = -1;
-
- cancel_fd = camel_operation_cancel_fd (NULL);
- if (cancel_fd == -1) {
- get_hostbyaddr (msg);
- } else {
- EMsgPort *reply_port;
- pthread_t id;
- fd_set rdset;
- int err;
-
- reply_port = msg->msg.reply_port = e_msgport_new ();
- fd = e_msgport_fd (msg->msg.reply_port);
- if ((err = pthread_create (&id, NULL, get_hostbyaddr, msg)) == 0) {
- d(printf("waiting for name return/cancellation in main process\n"));
- do {
- FD_ZERO(&rdset);
- FD_SET(cancel_fd, &rdset);
- FD_SET(fd, &rdset);
- fdmax = MAX(fd, cancel_fd) + 1;
- status = select (fdmax, &rdset, NULL, 0, NULL);
- } while (status == -1 && errno == EINTR);
-
- if (status == -1 || FD_ISSET(cancel_fd, &rdset)) {
- if (status == -1)
- camel_exception_setv(&ex, CAMEL_EXCEPTION_SYSTEM, _("Failure in name lookup: %s"), g_strerror(errno));
- else
- camel_exception_setv(&ex, CAMEL_EXCEPTION_USER_CANCEL, _("Cancelled"));
-
- /* We cancel so if the thread impl is decent it causes immediate exit.
- We detach so we dont need to wait for it to exit if it isn't.
- We check the reply port incase we had a reply in the mean time, which we free later */
- d(printf("Cancelling lookup thread and leaving it\n"));
- msg->cancelled = 1;
- pthread_detach(id);
- pthread_cancel(id);
- msg = (struct _lookup_msg *)e_msgport_get(reply_port);
- } 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"));
- }
- } else {
- camel_exception_setv(&ex, CAMEL_EXCEPTION_SYSTEM, _("Host lookup failed: cannot create thread: %s"), g_strerror(err));
- }
-
-
- e_msgport_destroy (reply_port);
- }
-
- camel_operation_end (NULL);
-
- if (!camel_exception_is_set(&ex)) {
- if (msg->result == 0)
- return &msg->hostbuf;
-
- if (msg->herr == HOST_NOT_FOUND || msg->herr == NO_DATA)
- camel_exception_setv (&ex, CAMEL_EXCEPTION_SYSTEM,
- _("Host lookup failed: host not found"));
- else
- camel_exception_setv (&ex, CAMEL_EXCEPTION_SYSTEM,
- _("Host lookup failed: unknown reason"));
- }
-
- if (msg) {
- g_free(msg->hostbufmem);
- g_free(msg);
- }
-
- camel_exception_xfer(exout, &ex);
-
- return NULL;
-}
-
-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 587749e242..0000000000
--- a/camel/camel-service.h
+++ /dev/null
@@ -1,155 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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))
-
-enum {
- CAMEL_SERVICE_ARG_FIRST = CAMEL_ARG_FIRST + 100,
- CAMEL_SERVICE_ARG_USERNAME,
- CAMEL_SERVICE_ARG_AUTH,
- CAMEL_SERVICE_ARG_HOSTNAME,
- CAMEL_SERVICE_ARG_PORT,
- CAMEL_SERVICE_ARG_PATH,
-};
-
-#define CAMEL_SERVICE_USERNAME (CAMEL_SERVICE_ARG_USERNAME | CAMEL_ARG_STR)
-#define CAMEL_SERVICE_AUTH (CAMEL_SERVICE_ARG_AUTH | CAMEL_ARG_STR)
-#define CAMEL_SERVICE_HOSTNAME (CAMEL_SERVICE_ARG_HOSTNAME | CAMEL_ARG_STR)
-#define CAMEL_SERVICE_PORT (CAMEL_SERVICE_ARG_PORT | CAMEL_ARG_INT)
-#define CAMEL_SERVICE_PATH (CAMEL_SERVICE_ARG_PATH | CAMEL_ARG_STR)
-
-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_gethostbyname (const char *name, CamelException *ex);
-struct hostent * camel_gethostbyaddr (const char *addr, int len, int type, 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 fc31530768..0000000000
--- a/camel/camel-session.c
+++ /dev/null
@@ -1,901 +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 - 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <sys/stat.h>
-#include <unistd.h>
-#include <errno.h>
-
-#include "camel-session.h"
-#include "camel-store.h"
-#include "camel-transport.h"
-#include "camel-exception.h"
-#include "camel-file-utils.h"
-#include "camel-string-utils.h"
-#include "camel-url.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);
-
-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);
-static void session_thread_status(CamelSession *session, CamelSessionThreadMsg *msg, const char *text, int pc);
-
-/* The vfolder provider is always available */
-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,
-
- CAMEL_URL_NEED_PATH, /* url_flags */
-
- /* ... */
-};
-
-static void
-camel_session_init (CamelSession *session)
-{
- session->online = TRUE;
- session->modules = camel_provider_init ();
- session->providers = g_hash_table_new (camel_strcase_hash, camel_strcase_equal);
- session->priv = g_malloc0(sizeof(*session->priv));
-
- 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;
-}
-
-#if 0
-/* NOTE: this code ruins all chance of ever having more than 1 session object */
-static gboolean
-camel_session_destroy_provider (gpointer key, gpointer value, gpointer user_data)
-{
- CamelProvider *prov = (CamelProvider *)value;
- int i;
-
- for (i = 0; i < CAMEL_NUM_PROVIDER_TYPES; i++) {
- if (prov->service_cache[i])
- camel_object_bag_destroy (prov->service_cache[i]);
- }
- return TRUE;
-}
-#endif
-
-static void
-camel_session_finalise (CamelObject *o)
-{
- CamelSession *session = (CamelSession *)o;
-
- g_hash_table_destroy(session->priv->thread_active);
- if (session->priv->thread_queue)
- e_thread_destroy(session->priv->thread_queue);
-
- g_free(session->storage_path);
- /*g_hash_table_foreach_remove (session->providers, camel_session_destroy_provider, NULL);*/
- g_hash_table_destroy (session->providers);
-
- g_mutex_free(session->priv->lock);
- g_mutex_free(session->priv->thread_lock);
-
- 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;
-
- 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;
- camel_session_class->thread_status = session_thread_status;
-
- vee_provider.object_types[CAMEL_PROVIDER_STORE] = camel_vee_store_get_type ();
- 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)
-{
- int i;
- CamelProviderConfEntry *conf;
- GList *l;
-
- for (i = 0; i < CAMEL_NUM_PROVIDER_TYPES; i++) {
- if (provider->object_types[i])
- provider->service_cache[i] = camel_object_bag_new (provider->url_hash, provider->url_equal,
- (CamelCopyFunc)camel_url_copy, (GFreeFunc)camel_url_free);
- }
-
- /* Translate all strings here */
-
-#define P_(string) dgettext (provider->translation_domain, string)
-
- provider->name = P_(provider->name);
- provider->description = P_(provider->description);
- conf = provider->extra_conf;
- if (conf) {
- for (i=0;conf[i].type != CAMEL_PROVIDER_CONF_END;i++) {
- if (conf[i].text)
- conf[i].text = P_(conf[i].text);
- }
- }
- l = provider->authtypes;
- while (l) {
- CamelServiceAuthType *auth = l->data;
-
- auth->name = P_(auth->name);
- auth->description = P_(auth->description);
- l = l->next;
- }
-
- 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 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;
- }
-
- /* If the provider doesn't use paths but the URL contains one,
- * ignore it.
- */
- if (url->path && !CAMEL_PROVIDER_ALLOWS (provider, CAMEL_URL_PART_PATH))
- camel_url_set_path (url, NULL);
-
- /* Now look up the service in the provider's cache */
- service = camel_object_bag_reserve(provider->service_cache[type], url);
- if (service != NULL) {
- camel_url_free (url);
- 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 (service);
- service = NULL;
- camel_object_bag_abort(provider->service_cache[type], url);
- } else {
- camel_object_bag_add(provider->service_cache[type], url, service);
- }
-
- 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 (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 (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
- * @reprompt: TRUE if the prompt should force a reprompt
- * @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 reprompt, 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, reprompt, 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_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);
-}
-
-static void
-cs_thread_status(CamelOperation *op, const char *what, int pc, void *data)
-{
- CamelSessionThreadMsg *m = data;
-
- CS_CLASS(m->session)->thread_status(m->session, m, what, pc);
-}
-
-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;
- m->session = session;
- camel_object_ref(session);
- m->op = camel_operation_new(cs_thread_status, m);
- camel_exception_init(&m->ex);
- CAMEL_SESSION_LOCK(session, thread_lock);
- m->id = session->priv->thread_id++;
- g_hash_table_insert(session->priv->thread_active, GINT_TO_POINTER(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, GINT_TO_POINTER(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);
- if (msg->op)
- camel_operation_unref(msg->op);
- camel_exception_clear(&msg->ex);
- camel_object_unref(msg->session);
- g_free(msg);
-}
-
-static void session_thread_destroy(EThread *thread, CamelSessionThreadMsg *msg, CamelSession *session)
-{
- d(printf("destroy message %p session %p\n", msg, session));
- camel_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) {
- CamelOperation *oldop;
-
- oldop = camel_operation_register(msg->op);
- msg->ops->receive(session, msg);
- camel_operation_register(oldop);
- }
-}
-
-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, GINT_TO_POINTER(id)) != NULL;
- CAMEL_SESSION_UNLOCK(session, thread_lock);
- if (wait) {
- usleep(20000);
- }
- } while (wait);
-}
-
-static void session_thread_status(CamelSession *session, CamelSessionThreadMsg *msg, const char *text, int pc)
-{
-}
-
-/**
- * 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);
-
- 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;
-
- CS_CLASS (session)->thread_wait(session, id);
-}
-
-/**
- * camel_session_check_junk:
- * @session:
- *
- * Do we have to check incoming messages to be junk?
- **/
-gboolean
-camel_session_check_junk (CamelSession *session)
-{
- g_assert(CAMEL_IS_SESSION(session));
-
- return session->check_junk;
-}
-
-/**
- * camel_session_set_check_junk:
- * @session:
- * @check_junk:
- *
- * Set check_junk flag, if set, incoming mail will be checked for being junk.
- **/
-void
-camel_session_set_check_junk (CamelSession *session, gboolean check_junk)
-{
- g_assert(CAMEL_IS_SESSION(session));
-
- session->check_junk = check_junk;
-}
diff --git a/camel/camel-session.h b/camel/camel-session.h
deleted file mode 100644
index e99d31a334..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 <camel/camel-junk-plugin.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;
-
- CamelJunkPlugin *junk_plugin;
- gboolean check_junk;
-};
-
-#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 reprompt,
- 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);
-
- 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);
- void (*thread_status)(CamelSession *session, CamelSessionThreadMsg *msg, const char *text, int pc);
-#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 reprompt,
- 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);
-
-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);
-
-gboolean camel_session_check_junk (CamelSession *session);
-void camel_session_set_check_junk (CamelSession *session, gboolean check_junk);
-
-#ifdef ENABLE_THREADS
-struct _CamelSessionThreadOps {
- void (*receive)(CamelSession *session, struct _CamelSessionThreadMsg *m);
- void (*free)(CamelSession *session, struct _CamelSessionThreadMsg *m);
-};
-
-struct _CamelSessionThreadMsg {
- EMsg msg;
-
- int id;
-
- CamelException ex;
- CamelSessionThreadOps *ops;
- struct _CamelOperation *op;
- CamelSession *session;
-
- void *data; /* free for implementation to define, not used by camel, do not use in client code */
- /* 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 dd7ed68b3f..0000000000
--- a/camel/camel-smime-context.c
+++ /dev/null
@@ -1,1061 +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>
- *
- * The Initial Developer of the Original Code is Netscape
- * Communications Corporation. Portions created by Netscape are
- * Copyright (C) 1994-2000 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Copyright 2003 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 "nss.h"
-#include <cms.h>
-#include <cert.h>
-#include <certdb.h>
-#include <pkcs11.h>
-#include <smime.h>
-#include <pkcs11t.h>
-#include <pk11func.h>
-
-#include <errno.h>
-
-#include <camel/camel-exception.h>
-#include <camel/camel-stream-mem.h>
-#include <camel/camel-data-wrapper.h>
-
-#include <camel/camel-mime-part.h>
-#include <camel/camel-multipart-signed.h>
-#include <camel/camel-stream-fs.h>
-#include <camel/camel-stream-filter.h>
-#include <camel/camel-mime-filter-basic.h>
-#include <camel/camel-mime-filter-canon.h>
-
-#include "camel-smime-context.h"
-#include "camel-operation.h"
-
-#define d(x)
-
-struct _CamelSMIMEContextPrivate {
- CERTCertDBHandle *certdb;
-
- char *encrypt_key;
- camel_smime_sign_t sign_mode;
-
- unsigned int send_encrypt_key_prefs:1;
-};
-
-static CamelCipherContextClass *parent_class = NULL;
-
-/* used for decode content callback, for streaming decode */
-static void
-sm_write_stream(void *arg, const char *buf, unsigned long len)
-{
- camel_stream_write((CamelStream *)arg, buf, len);
-}
-
-static PK11SymKey *
-sm_decrypt_key(void *arg, SECAlgorithmID *algid)
-{
- printf("Decrypt key called\n");
- return (PK11SymKey *)arg;
-}
-
-static char *
-sm_get_passwd(PK11SlotInfo *info, PRBool retry, void *arg)
-{
- CamelSMIMEContext *context = arg;
- char *pass, *nsspass = NULL;
- char *prompt;
- CamelException *ex;
-
- printf("get passwd called '%s'\n", PK11_GetTokenName(info));
-
- ex = camel_exception_new();
- prompt = g_strdup_printf(_("Enter security pass-phrase for `%s'"), PK11_GetTokenName(info));
- pass = camel_session_get_password(((CamelCipherContext *)context)->session, prompt, FALSE, TRUE, NULL, PK11_GetTokenName(info), ex);
- camel_exception_free(ex);
- g_free(prompt);
- if (pass) {
- nsspass = PORT_Strdup(pass);
- g_free(pass);
- }
-
- return nsspass;
-}
-
-/**
- * camel_smime_context_new:
- * @session: session
- *
- * Creates a new sm cipher context object.
- *
- * Returns a new sm cipher context object.
- **/
-CamelCipherContext *
-camel_smime_context_new(CamelSession *session)
-{
- CamelCipherContext *cipher;
- CamelSMIMEContext *ctx;
-
- g_return_val_if_fail(CAMEL_IS_SESSION(session), NULL);
-
- ctx =(CamelSMIMEContext *) camel_object_new(camel_smime_context_get_type());
-
- cipher =(CamelCipherContext *) ctx;
- cipher->session = session;
- camel_object_ref(session);
-
- return cipher;
-}
-
-void
-camel_smime_context_set_encrypt_key(CamelSMIMEContext *context, gboolean use, const char *key)
-{
- context->priv->send_encrypt_key_prefs = use;
- g_free(context->priv->encrypt_key);
- context->priv->encrypt_key = g_strdup(key);
-}
-
-/* set signing mode, clearsigned multipart/signed or enveloped */
-void
-camel_smime_context_set_sign_mode(CamelSMIMEContext *context, camel_smime_sign_t type)
-{
- context->priv->sign_mode = type;
-}
-
-/* TODO: This is suboptimal, but the only other solution is to pass around NSSCMSMessages */
-guint32
-camel_smime_context_describe_part(CamelSMIMEContext *context, CamelMimePart *part)
-{
- guint32 flags = 0;
- CamelContentType *ct;
- const char *tmp;
-
- ct = camel_mime_part_get_content_type(part);
-
- if (camel_content_type_is(ct, "multipart", "signed")) {
- tmp = camel_content_type_param(ct, "protocol");
- if (tmp && g_ascii_strcasecmp(tmp, ((CamelCipherContext *)context)->sign_protocol))
- flags = CAMEL_SMIME_SIGNED;
- } else if (camel_content_type_is(ct, "application", "x-pkcs7-mime")) {
- CamelStreamMem *istream;
- NSSCMSMessage *cmsg;
- NSSCMSDecoderContext *dec;
-
- /* FIXME: stream this to the decoder incrementally */
- istream = (CamelStreamMem *)camel_stream_mem_new();
- camel_data_wrapper_decode_to_stream(camel_medium_get_content_object((CamelMedium *)part), (CamelStream *)istream);
- camel_stream_reset((CamelStream *)istream);
-
- dec = NSS_CMSDecoder_Start(NULL,
- NULL, NULL,
- sm_get_passwd, context, /* password callback */
- NULL, NULL); /* decrypt key callback */
-
- NSS_CMSDecoder_Update(dec, istream->buffer->data, istream->buffer->len);
- camel_object_unref(istream);
-
- cmsg = NSS_CMSDecoder_Finish(dec);
- if (cmsg) {
- if (NSS_CMSMessage_IsSigned(cmsg)) {
- printf("message is signed\n");
- flags |= CAMEL_SMIME_SIGNED;
- }
-
- if (NSS_CMSMessage_IsEncrypted(cmsg)) {
- printf("message is encrypted\n");
- flags |= CAMEL_SMIME_ENCRYPTED;
- }
-#if 0
- if (NSS_CMSMessage_ContainsCertsOrCrls(cmsg)) {
- printf("message contains certs or crls\n");
- flags |= CAMEL_SMIME_CERTS;
- }
-#endif
- NSS_CMSMessage_Destroy(cmsg);
- } else {
- printf("Message could not be parsed\n");
- }
- }
-
- return flags;
-}
-
-static const char *
-sm_hash_to_id(CamelCipherContext *context, CamelCipherHash hash)
-{
- switch(hash) {
- case CAMEL_CIPHER_HASH_MD5:
- return "md5";
- case CAMEL_CIPHER_HASH_SHA1:
- case CAMEL_CIPHER_HASH_DEFAULT:
- return "sha1";
- default:
- return NULL;
- }
-}
-
-static CamelCipherHash
-sm_id_to_hash(CamelCipherContext *context, const char *id)
-{
- if (id) {
- if (!strcmp(id, "md5"))
- return CAMEL_CIPHER_HASH_MD5;
- else if (!strcmp(id, "sha1"))
- return CAMEL_CIPHER_HASH_SHA1;
- }
-
- return CAMEL_CIPHER_HASH_DEFAULT;
-}
-
-static NSSCMSMessage *
-sm_signing_cmsmessage(CamelSMIMEContext *context, const char *nick, SECOidTag hash, int detached, CamelException *ex)
-{
- struct _CamelSMIMEContextPrivate *p = context->priv;
- NSSCMSMessage *cmsg = NULL;
- NSSCMSContentInfo *cinfo;
- NSSCMSSignedData *sigd;
- NSSCMSSignerInfo *signerinfo;
- CERTCertificate *cert= NULL, *ekpcert = NULL;
-
- if ((cert = CERT_FindUserCertByUsage(p->certdb,
- (char *)nick,
- certUsageEmailSigner,
- PR_FALSE,
- NULL)) == NULL) {
- camel_exception_setv(ex, 1, "Can't find certificate for '%s'", nick);
- return NULL;
- }
-
- cmsg = NSS_CMSMessage_Create(NULL); /* create a message on its own pool */
- if (cmsg == NULL) {
- camel_exception_setv(ex, 1, "Can't create CMS message");
- goto fail;
- }
-
- if ((sigd = NSS_CMSSignedData_Create(cmsg)) == NULL) {
- camel_exception_setv(ex, 1, "Can't create CMS signedData");
- goto fail;
- }
-
- cinfo = NSS_CMSMessage_GetContentInfo(cmsg);
- if (NSS_CMSContentInfo_SetContent_SignedData(cmsg, cinfo, sigd) != SECSuccess) {
- camel_exception_setv(ex, 1, "Can't attach CMS signedData");
- goto fail;
- }
-
- /* if !detatched, the contentinfo will alloc a data item for us */
- cinfo = NSS_CMSSignedData_GetContentInfo(sigd);
- if (NSS_CMSContentInfo_SetContent_Data(cmsg, cinfo, NULL, detached) != SECSuccess) {
- camel_exception_setv(ex, 1, "Can't attach CMS data");
- goto fail;
- }
-
- signerinfo = NSS_CMSSignerInfo_Create(cmsg, cert, hash);
- if (signerinfo == NULL) {
- camel_exception_setv(ex, 1, "Can't create CMS SignerInfo");
- goto fail;
- }
-
- /* we want the cert chain included for this one */
- if (NSS_CMSSignerInfo_IncludeCerts(signerinfo, NSSCMSCM_CertChain, certUsageEmailSigner) != SECSuccess) {
- camel_exception_setv(ex, 1, "Can't find cert chain");
- goto fail;
- }
-
- /* SMIME RFC says signing time should always be added */
- if (NSS_CMSSignerInfo_AddSigningTime(signerinfo, PR_Now()) != SECSuccess) {
- camel_exception_setv(ex, 1, "Can't add CMS SigningTime");
- goto fail;
- }
-
-#if 0
- /* this can but needn't be added. not sure what general usage is */
- if (NSS_CMSSignerInfo_AddSMIMECaps(signerinfo) != SECSuccess) {
- fprintf(stderr, "ERROR: cannot add SMIMECaps attribute.\n");
- goto loser;
- }
-#endif
-
- /* Check if we need to send along our return encrypt cert, rfc2633 2.5.3 */
- if (p->send_encrypt_key_prefs) {
- CERTCertificate *enccert = NULL;
-
- if (p->encrypt_key) {
- /* encrypt key has its own nick */
- if ((ekpcert = CERT_FindUserCertByUsage(
- p->certdb,
- p->encrypt_key,
- certUsageEmailRecipient, PR_FALSE, NULL)) == NULL) {
- camel_exception_setv(ex, 1, "encryption cert for '%s' does not exist", p->encrypt_key);
- goto fail;
- }
- enccert = ekpcert;
- } else if (CERT_CheckCertUsage(cert, certUsageEmailRecipient) == SECSuccess) {
- /* encrypt key is signing key */
- enccert = cert;
- } else {
- /* encrypt key uses same nick */
- if ((ekpcert = CERT_FindUserCertByUsage(
- p->certdb, (char *)nick,
- certUsageEmailRecipient, PR_FALSE, NULL)) == NULL) {
- camel_exception_setv(ex, 1, "encryption cert for '%s' does not exist", nick);
- goto fail;
- }
- enccert = ekpcert;
- }
-
- if (NSS_CMSSignerInfo_AddSMIMEEncKeyPrefs(signerinfo, enccert, p->certdb) != SECSuccess) {
- camel_exception_setv(ex, 1, "can't add SMIMEEncKeyPrefs attribute");
- goto fail;
- }
-
- if (NSS_CMSSignerInfo_AddMSSMIMEEncKeyPrefs(signerinfo, enccert, p->certdb) != SECSuccess) {
- camel_exception_setv(ex, 1, "can't add MS SMIMEEncKeyPrefs attribute");
- goto fail;
- }
-
- if (ekpcert != NULL && NSS_CMSSignedData_AddCertificate(sigd, ekpcert) != SECSuccess) {
- camel_exception_setv(ex, 1, "can't add add encryption certificate");
- goto fail;
- }
- }
-
- if (NSS_CMSSignedData_AddSignerInfo(sigd, signerinfo) != SECSuccess) {
- camel_exception_setv(ex, 1, "can't add CMS SignerInfo");
- goto fail;
- }
-
- if (ekpcert)
- CERT_DestroyCertificate(ekpcert);
-
- if (cert)
- CERT_DestroyCertificate(cert);
-
- return cmsg;
-fail:
- if (ekpcert)
- CERT_DestroyCertificate(ekpcert);
-
- if (cert)
- CERT_DestroyCertificate(cert);
-
- NSS_CMSMessage_Destroy(cmsg);
-
- return NULL;
-}
-
-static int
-sm_sign(CamelCipherContext *context, const char *userid, CamelCipherHash hash, CamelMimePart *ipart, CamelMimePart *opart, CamelException *ex)
-{
- int res = -1;
- NSSCMSMessage *cmsg;
- CamelStream *ostream, *istream;
- SECOidTag sechash;
- NSSCMSEncoderContext *enc;
- CamelDataWrapper *dw;
- CamelContentType *ct;
-
- switch (hash) {
- case CAMEL_CIPHER_HASH_SHA1:
- case CAMEL_CIPHER_HASH_DEFAULT:
- default:
- sechash = SEC_OID_SHA1;
- break;
- case CAMEL_CIPHER_HASH_MD5:
- sechash = SEC_OID_MD5;
- break;
- }
-
- cmsg = sm_signing_cmsmessage((CamelSMIMEContext *)context, userid, sechash,
- ((CamelSMIMEContext *)context)->priv->sign_mode == CAMEL_SMIME_SIGN_CLEARSIGN, ex);
- if (cmsg == NULL)
- return -1;
-
- ostream = camel_stream_mem_new();
-
- /* FIXME: stream this, we stream output at least */
- istream = camel_stream_mem_new();
- if (camel_cipher_canonical_to_stream(ipart,
- CAMEL_MIME_FILTER_CANON_STRIP
- |CAMEL_MIME_FILTER_CANON_CRLF
- |CAMEL_MIME_FILTER_CANON_FROM, istream) == -1) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not generate signing data: %s"), g_strerror(errno));
- goto fail;
- }
-
- enc = NSS_CMSEncoder_Start(cmsg,
- sm_write_stream, ostream, /* DER output callback */
- NULL, NULL, /* destination storage */
- sm_get_passwd, context, /* password callback */
- NULL, NULL, /* decrypt key callback */
- NULL, NULL ); /* detached digests */
- if (!enc) {
- camel_exception_setv(ex, 1, "Cannot create encoder context");
- goto fail;
- }
-
- if (NSS_CMSEncoder_Update(enc, ((CamelStreamMem *)istream)->buffer->data, ((CamelStreamMem *)istream)->buffer->len) != SECSuccess) {
- NSS_CMSEncoder_Cancel(enc);
- camel_exception_setv(ex, 1, "Failed to add data to CMS encoder");
- goto fail;
- }
-
- if (NSS_CMSEncoder_Finish(enc) != SECSuccess) {
- camel_exception_setv(ex, 1, "Failed to encode data");
- goto fail;
- }
-
- res = 0;
-
- dw = camel_data_wrapper_new();
- camel_stream_reset(ostream);
- camel_data_wrapper_construct_from_stream(dw, ostream);
- dw->encoding = CAMEL_TRANSFER_ENCODING_BINARY;
-
- if (((CamelSMIMEContext *)context)->priv->sign_mode == CAMEL_SMIME_SIGN_CLEARSIGN) {
- CamelMultipartSigned *mps;
- CamelMimePart *sigpart;
-
- sigpart = camel_mime_part_new();
- ct = camel_content_type_new("application", "x-pkcs7-signature");
- camel_content_type_set_param(ct, "name", "smime.p7s");
- camel_data_wrapper_set_mime_type_field(dw, ct);
- camel_content_type_unref(ct);
-
- camel_medium_set_content_object((CamelMedium *)sigpart, dw);
-
- camel_mime_part_set_filename(sigpart, "smime.p7s");
- camel_mime_part_set_disposition(sigpart, "attachment");
- camel_mime_part_set_encoding(sigpart, CAMEL_TRANSFER_ENCODING_BASE64);
-
- mps = camel_multipart_signed_new();
- ct = camel_content_type_new("multipart", "signed");
- camel_content_type_set_param(ct, "micalg", camel_cipher_hash_to_id(context, hash));
- camel_content_type_set_param(ct, "protocol", context->sign_protocol);
- camel_data_wrapper_set_mime_type_field((CamelDataWrapper *)mps, ct);
- camel_content_type_unref(ct);
- camel_multipart_set_boundary((CamelMultipart *)mps, NULL);
-
- mps->signature = sigpart;
- mps->contentraw = istream;
- camel_stream_reset(istream);
- camel_object_ref(istream);
-
- camel_medium_set_content_object((CamelMedium *)opart, (CamelDataWrapper *)mps);
- } else {
- ct = camel_content_type_new("application", "x-pkcs7-mime");
- camel_content_type_set_param(ct, "name", "smime.p7m");
- camel_content_type_set_param(ct, "smime-type", "signed-data");
- camel_data_wrapper_set_mime_type_field(dw, ct);
- camel_content_type_unref(ct);
-
- camel_medium_set_content_object((CamelMedium *)opart, dw);
-
- camel_mime_part_set_filename(opart, "smime.p7m");
- camel_mime_part_set_description(opart, "S/MIME Signed Message");
- camel_mime_part_set_disposition(opart, "attachment");
- camel_mime_part_set_encoding(opart, CAMEL_TRANSFER_ENCODING_BASE64);
- }
-
- camel_object_unref(dw);
-fail:
- camel_object_unref(ostream);
- camel_object_unref(istream);
-
- return res;
-}
-
-static const char *
-sm_status_description(NSSCMSVerificationStatus status)
-{
- /* could use this but then we can't control i18n? */
- /*NSS_CMSUtil_VerificationStatusToString(status));*/
-
- switch(status) {
- case NSSCMSVS_Unverified:
- default:
- return _("Unverified");
- case NSSCMSVS_GoodSignature:
- return _("Good signature");
- case NSSCMSVS_BadSignature:
- return _("Bad signature");
- case NSSCMSVS_DigestMismatch:
- return _("Content tampered with or altered in transit");
- case NSSCMSVS_SigningCertNotFound:
- return _("Signing certificate not found");
- case NSSCMSVS_SigningCertNotTrusted:
- return _("Signing certificate not trusted");
- case NSSCMSVS_SignatureAlgorithmUnknown:
- return _("Signature algorithm unknown");
- case NSSCMSVS_SignatureAlgorithmUnsupported:
- return _("Siganture algorithm unsupported");
- case NSSCMSVS_MalformedSignature:
- return _("Malformed signature");
- case NSSCMSVS_ProcessingError:
- return _("Processing error");
- }
-}
-
-static CamelCipherValidity *
-sm_verify_cmsg(CamelCipherContext *context, NSSCMSMessage *cmsg, CamelStream *extstream, CamelException *ex)
-{
- struct _CamelSMIMEContextPrivate *p = ((CamelSMIMEContext *)context)->priv;
- NSSCMSSignedData *sigd = NULL;
- NSSCMSEnvelopedData *envd;
- NSSCMSEncryptedData *encd;
- SECAlgorithmID **digestalgs;
- NSSCMSDigestContext *digcx;
- int count, i, nsigners, j;
- SECItem **digests;
- PLArenaPool *poolp = NULL;
- CamelStreamMem *mem;
- NSSCMSVerificationStatus status;
- CamelCipherValidity *valid;
- GString *description;
-
- description = g_string_new("");
- valid = camel_cipher_validity_new();
- camel_cipher_validity_set_valid(valid, TRUE);
- status = NSSCMSVS_Unverified;
-
- /* NB: this probably needs to go into a decoding routine that can be used for processing
- enveloped data too */
- count = NSS_CMSMessage_ContentLevelCount(cmsg);
- for (i = 0; i < count; i++) {
- NSSCMSContentInfo *cinfo = NSS_CMSMessage_ContentLevel(cmsg, i);
- SECOidTag typetag = NSS_CMSContentInfo_GetContentTypeTag(cinfo);
-
- switch (typetag) {
- case SEC_OID_PKCS7_SIGNED_DATA:
- sigd = (NSSCMSSignedData *)NSS_CMSContentInfo_GetContent(cinfo);
- if (sigd == NULL) {
- camel_exception_setv(ex, 1, "No signedData in signature");
- goto fail;
- }
-
- /* need to build digests of the content */
- if (!NSS_CMSSignedData_HasDigests(sigd)) {
- if (extstream == NULL) {
- camel_exception_setv(ex, 1, "Digests missing from enveloped data");
- goto fail;
- }
-
- if ((poolp = PORT_NewArena(1024)) == NULL) {
- camel_exception_setv(ex, 1, "out of memory");
- goto fail;
- }
-
- digestalgs = NSS_CMSSignedData_GetDigestAlgs(sigd);
-
- digcx = NSS_CMSDigestContext_StartMultiple(digestalgs);
- if (digcx == NULL) {
- camel_exception_setv(ex, 1, "Cannot calculate digests");
- goto fail;
- }
-
- mem = (CamelStreamMem *)camel_stream_mem_new();
- camel_stream_write_to_stream(extstream, (CamelStream *)mem);
- NSS_CMSDigestContext_Update(digcx, mem->buffer->data, mem->buffer->len);
- camel_object_unref(mem);
-
- if (NSS_CMSDigestContext_FinishMultiple(digcx, poolp, &digests) != SECSuccess) {
- camel_exception_setv(ex, 1, "Cannot calculate digests");
- goto fail;
- }
-
- if (NSS_CMSSignedData_SetDigests(sigd, digestalgs, digests) != SECSuccess) {
- camel_exception_setv(ex, 1, "Cannot set message digests");
- goto fail;
- }
-
- PORT_FreeArena(poolp, PR_FALSE);
- poolp = NULL;
- }
-
- /* import the certificates */
- if (NSS_CMSSignedData_ImportCerts(sigd, p->certdb, certUsageEmailSigner, PR_FALSE) != SECSuccess) {
- camel_exception_setv(ex, 1, "cert import failed");
- goto fail;
- }
-
- /* check for certs-only message */
- nsigners = NSS_CMSSignedData_SignerInfoCount(sigd);
- if (nsigners == 0) {
- /* ?? Should we check other usages? */
- NSS_CMSSignedData_ImportCerts(sigd, p->certdb, certUsageEmailSigner, PR_TRUE);
- if (NSS_CMSSignedData_VerifyCertsOnly(sigd, p->certdb, certUsageEmailSigner) != SECSuccess) {
- g_string_printf(description, "Certficate only message, cannot verify certificates");
- } else {
- status = NSSCMSVS_GoodSignature;
- g_string_printf(description, "Certficate only message, certificates imported and verified");
- }
- } else {
- if (!NSS_CMSSignedData_HasDigests(sigd)) {
- camel_exception_setv(ex, 1, "Can't find signature digests");
- goto fail;
- }
-
- for (j = 0; j < nsigners; j++) {
- NSSCMSSignerInfo *si;
- char *cn, *em;
-
- si = NSS_CMSSignedData_GetSignerInfo(sigd, j);
- NSS_CMSSignedData_VerifySignerInfo(sigd, j, p->certdb, certUsageEmailSigner);
-
- status = NSS_CMSSignerInfo_GetVerificationStatus(si);
-
- cn = NSS_CMSSignerInfo_GetSignerCommonName(si);
- em = NSS_CMSSignerInfo_GetSignerEmailAddress(si);
-
- g_string_append_printf(description, _("Signer: %s <%s>: %s\n"),
- cn?cn:"<unknown>", em?em:"<unknown>",
- sm_status_description(status));
-
- if (cn)
- PORT_Free(cn);
- if (em)
- PORT_Free(em);
-
- if (status != NSSCMSVS_GoodSignature)
- camel_cipher_validity_set_valid(valid, FALSE);
- }
- }
- break;
- case SEC_OID_PKCS7_ENVELOPED_DATA:
- envd = (NSSCMSEnvelopedData *)NSS_CMSContentInfo_GetContent(cinfo);
- break;
- case SEC_OID_PKCS7_ENCRYPTED_DATA:
- encd = (NSSCMSEncryptedData *)NSS_CMSContentInfo_GetContent(cinfo);
- break;
- case SEC_OID_PKCS7_DATA:
- break;
- default:
- break;
- }
- }
-
- camel_cipher_validity_set_valid(valid, status == NSSCMSVS_GoodSignature);
- camel_cipher_validity_set_description(valid, description->str);
- g_string_free(description, TRUE);
-
- return valid;
-
-fail:
- camel_cipher_validity_free(valid);
- g_string_free(description, TRUE);
-
- return NULL;
-}
-
-static CamelCipherValidity *
-sm_verify(CamelCipherContext *context, CamelMimePart *ipart, CamelException *ex)
-{
- NSSCMSDecoderContext *dec;
- NSSCMSMessage *cmsg;
- CamelStreamMem *mem;
- CamelStream *constream;
- CamelCipherValidity *valid = NULL;
- CamelContentType *ct;
- const char *tmp;
- CamelMimePart *sigpart;
- CamelDataWrapper *dw;
-
- dw = camel_medium_get_content_object((CamelMedium *)ipart);
- ct = dw->mime_type;
-
- /* FIXME: we should stream this to the decoder */
- mem = (CamelStreamMem *)camel_stream_mem_new();
-
- if (camel_content_type_is(ct, "multipart", "signed")) {
- CamelMultipart *mps = (CamelMultipart *)dw;
-
- tmp = camel_content_type_param(ct, "protocol");
- if (!CAMEL_IS_MULTIPART_SIGNED(mps)
- || tmp == NULL
- || g_ascii_strcasecmp(tmp, context->sign_protocol) != 0) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot verify message signature: Incorrect message format"));
- goto fail;
- }
-
- constream = camel_multipart_signed_get_content_stream((CamelMultipartSigned *)mps, ex);
- if (constream == NULL)
- goto fail;
-
- sigpart = camel_multipart_get_part(mps, CAMEL_MULTIPART_SIGNED_SIGNATURE);
- if (sigpart == NULL) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot verify message signature: Incorrect message format"));
- goto fail;
- }
- } else if (camel_content_type_is(ct, "application", "x-pkcs7-mime")) {
- sigpart = ipart;
- } else {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot verify message signature: Incorrect message format"));
- goto fail;
- }
-
- dec = NSS_CMSDecoder_Start(NULL,
- NULL, NULL, /* content callback */
- sm_get_passwd, context, /* password callback */
- NULL, NULL); /* decrypt key callback */
-
- camel_data_wrapper_decode_to_stream(camel_medium_get_content_object((CamelMedium *)sigpart), (CamelStream *)mem);
- (void)NSS_CMSDecoder_Update(dec, mem->buffer->data, mem->buffer->len);
- cmsg = NSS_CMSDecoder_Finish(dec);
- if (cmsg == NULL) {
- camel_exception_setv(ex, 1, "Decoder failed");
- goto fail;
- }
-
- valid = sm_verify_cmsg(context, cmsg, constream, ex);
-
- NSS_CMSMessage_Destroy(cmsg);
-fail:
- camel_object_unref(mem);
- if (constream)
- camel_object_unref(constream);
-
- return valid;
-}
-
-static int
-sm_encrypt(CamelCipherContext *context, const char *userid, GPtrArray *recipients, CamelMimePart *ipart, CamelMimePart *opart, CamelException *ex)
-{
- struct _CamelSMIMEContextPrivate *p = ((CamelSMIMEContext *)context)->priv;
- /*NSSCMSRecipientInfo **recipient_infos;*/
- CERTCertificate **recipient_certs = NULL;
- NSSCMSContentInfo *cinfo;
- PK11SymKey *bulkkey = NULL;
- SECOidTag bulkalgtag;
- int bulkkeysize, i;
- CK_MECHANISM_TYPE type;
- PK11SlotInfo *slot;
- PLArenaPool *poolp;
- NSSCMSMessage *cmsg = NULL;
- NSSCMSEnvelopedData *envd;
- NSSCMSEncoderContext *enc = NULL;
- CamelStreamMem *mem;
- CamelStream *ostream = NULL;
- CamelDataWrapper *dw;
- CamelContentType *ct;
-
- poolp = PORT_NewArena(1024);
- if (poolp == NULL) {
- camel_exception_setv(ex, 1, "Out of memory");
- return -1;
- }
-
- /* Lookup all recipients certs, for later working */
- recipient_certs = (CERTCertificate **)PORT_ArenaZAlloc(poolp, sizeof(*recipient_certs[0])*(recipients->len + 1));
- if (recipient_certs == NULL) {
- camel_exception_setv(ex, 1, "Out of memory");
- goto fail;
- }
-
- for (i=0;i<recipients->len;i++) {
- recipient_certs[i] = CERT_FindCertByNicknameOrEmailAddr(p->certdb, recipients->pdata[i]);
- if (recipient_certs[i] == NULL) {
- camel_exception_setv(ex, 1, "Can't find certificate for `%s'", recipients->pdata[i]);
- goto fail;
- }
- }
-
- /* Find a common algorithm, probably 3DES anyway ... */
- if (NSS_SMIMEUtil_FindBulkAlgForRecipients(recipient_certs, &bulkalgtag, &bulkkeysize) != SECSuccess) {
- camel_exception_setv(ex, 1, "Can't find common bulk encryption algorithm");
- goto fail;
- }
-
- /* Generate a new bulk key based on the common algorithm - expensive */
- type = PK11_AlgtagToMechanism(bulkalgtag);
- slot = PK11_GetBestSlot(type, context);
- if (slot == NULL) {
- /* PORT_GetError(); ?? */
- camel_exception_setv(ex, 1, "Can't allocate slot for encryption bulk key");
- goto fail;
- }
-
- bulkkey = PK11_KeyGen(slot, type, NULL, bulkkeysize/8, context);
- PK11_FreeSlot(slot);
-
- /* Now we can start building the message */
- /* msg->envelopedData->data */
- cmsg = NSS_CMSMessage_Create(NULL);
- if (cmsg == NULL) {
- camel_exception_setv(ex, 1, "Can't create CMS Message");
- goto fail;
- }
-
- envd = NSS_CMSEnvelopedData_Create(cmsg, bulkalgtag, bulkkeysize);
- if (envd == NULL) {
- camel_exception_setv(ex, 1, "Can't create CMS EnvelopedData");
- goto fail;
- }
-
- cinfo = NSS_CMSMessage_GetContentInfo(cmsg);
- if (NSS_CMSContentInfo_SetContent_EnvelopedData(cmsg, cinfo, envd) != SECSuccess) {
- camel_exception_setv(ex, 1, "Can't attach CMS EnvelopedData");
- goto fail;
- }
-
- cinfo = NSS_CMSEnvelopedData_GetContentInfo(envd);
- if (NSS_CMSContentInfo_SetContent_Data(cmsg, cinfo, NULL, PR_FALSE) != SECSuccess) {
- camel_exception_setv(ex, 1, "Can't attach CMS data object");
- goto fail;
- }
-
- /* add recipient certs */
- for (i=0;recipient_certs[i];i++) {
- NSSCMSRecipientInfo *ri = NSS_CMSRecipientInfo_Create(cmsg, recipient_certs[i]);
-
- if (ri == NULL) {
- camel_exception_setv(ex, 1, "Can't create CMS RecipientInfo");
- goto fail;
- }
-
- if (NSS_CMSEnvelopedData_AddRecipient(envd, ri) != SECSuccess) {
- camel_exception_setv(ex, 1, "Can't add CMS RecipientInfo");
- goto fail;
- }
- }
-
- /* dump it out */
- ostream = camel_stream_mem_new();
- enc = NSS_CMSEncoder_Start(cmsg,
- sm_write_stream, ostream,
- NULL, NULL,
- sm_get_passwd, context,
- sm_decrypt_key, bulkkey,
- NULL, NULL);
- if (enc == NULL) {
- camel_exception_setv(ex, 1, "Can't create encoder context");
- goto fail;
- }
-
- /* FIXME: Stream the input */
- /* FIXME: Canonicalise the input? */
- mem = (CamelStreamMem *)camel_stream_mem_new();
- camel_data_wrapper_write_to_stream((CamelDataWrapper *)ipart, (CamelStream *)mem);
- if (NSS_CMSEncoder_Update(enc, mem->buffer->data, mem->buffer->len) != SECSuccess) {
- NSS_CMSEncoder_Cancel(enc);
- camel_object_unref(mem);
- camel_exception_setv(ex, 1, "Failed to add data to encoder");
- goto fail;
- }
- camel_object_unref(mem);
-
- if (NSS_CMSEncoder_Finish(enc) != SECSuccess) {
- camel_exception_setv(ex, 1, "Failed to encode data");
- goto fail;
- }
-
- PK11_FreeSymKey(bulkkey);
- NSS_CMSMessage_Destroy(cmsg);
- for (i=0;recipient_certs[i];i++)
- CERT_DestroyCertificate(recipient_certs[i]);
- PORT_FreeArena(poolp, PR_FALSE);
-
- dw = camel_data_wrapper_new();
- camel_data_wrapper_construct_from_stream(dw, ostream);
- camel_object_unref(ostream);
- dw->encoding = CAMEL_TRANSFER_ENCODING_BINARY;
-
- ct = camel_content_type_new("application", "x-pkcs7-mime");
- camel_content_type_set_param(ct, "name", "smime.p7m");
- camel_content_type_set_param(ct, "smime-type", "enveloped-data");
- camel_data_wrapper_set_mime_type_field(dw, ct);
- camel_content_type_unref(ct);
-
- camel_medium_set_content_object((CamelMedium *)opart, dw);
- camel_object_unref(dw);
-
- camel_mime_part_set_disposition(opart, "attachment");
- camel_mime_part_set_filename(opart, "smime.p7m");
- camel_mime_part_set_description(opart, "S/MIME Encrypted Message");
- camel_mime_part_set_encoding(opart, CAMEL_TRANSFER_ENCODING_BASE64);
-
- return 0;
-
-fail:
- if (ostream)
- camel_object_unref(ostream);
- if (cmsg)
- NSS_CMSMessage_Destroy(cmsg);
- if (bulkkey)
- PK11_FreeSymKey(bulkkey);
-
- if (recipient_certs) {
- for (i=0;recipient_certs[i];i++)
- CERT_DestroyCertificate(recipient_certs[i]);
- }
-
- PORT_FreeArena(poolp, PR_FALSE);
-
- return -1;
-}
-
-static CamelCipherValidity *
-sm_decrypt(CamelCipherContext *context, CamelMimePart *ipart, CamelMimePart *opart, CamelException *ex)
-{
- NSSCMSDecoderContext *dec;
- NSSCMSMessage *cmsg;
- CamelStreamMem *istream;
- CamelStream *ostream;
- CamelCipherValidity *valid = NULL;
-
- /* FIXME: This assumes the content is only encrypted. Perhaps its ok for
- this api to do this ... */
-
- ostream = camel_stream_mem_new();
-
- /* FIXME: stream this to the decoder incrementally */
- istream = (CamelStreamMem *)camel_stream_mem_new();
- camel_data_wrapper_decode_to_stream(camel_medium_get_content_object((CamelMedium *)ipart), (CamelStream *)istream);
- camel_stream_reset((CamelStream *)istream);
-
- dec = NSS_CMSDecoder_Start(NULL,
- sm_write_stream, ostream, /* content callback */
- sm_get_passwd, context, /* password callback */
- NULL, NULL); /* decrypt key callback */
-
- if (NSS_CMSDecoder_Update(dec, istream->buffer->data, istream->buffer->len) != SECSuccess) {
- printf("decoder update failed\n");
- }
- camel_object_unref(istream);
-
- cmsg = NSS_CMSDecoder_Finish(dec);
- if (cmsg == NULL) {
- camel_exception_setv(ex, 1, "Decoder failed, error %d", PORT_GetError());
- goto fail;
- }
-
-#if 0
- /* not sure if we really care about this? */
- if (!NSS_CMSMessage_IsEncrypted(cmsg)) {
- camel_exception_setv(ex, 1, "S/MIME Decrypt: No encrypted content found");
- NSS_CMSMessage_Destroy(cmsg);
- goto fail;
- }
-#endif
-
- camel_stream_reset(ostream);
- camel_data_wrapper_construct_from_stream((CamelDataWrapper *)opart, ostream);
-
- if (NSS_CMSMessage_IsSigned(cmsg)) {
- valid = sm_verify_cmsg(context, cmsg, NULL, ex);
- } else {
- valid = camel_cipher_validity_new();
- valid->encrypt.description = g_strdup(_("Encrypted content"));
- valid->encrypt.status = CAMEL_CIPHER_VALIDITY_ENCRYPT_ENCRYPTED;
- }
-
- NSS_CMSMessage_Destroy(cmsg);
-fail:
- camel_object_unref(ostream);
-
- return valid;
-}
-
-static int
-sm_import_keys(CamelCipherContext *context, CamelStream *istream, CamelException *ex)
-{
- camel_exception_setv(ex, 1, "import keys: unimplemented");
-
- return -1;
-}
-
-static int
-sm_export_keys(CamelCipherContext *context, GPtrArray *keys, CamelStream *ostream, CamelException *ex)
-{
- camel_exception_setv(ex, 1, "export keys: unimplemented");
-
- return -1;
-}
-
-/* ********************************************************************** */
-
-static void
-camel_smime_context_class_init(CamelSMIMEContextClass *klass)
-{
- CamelCipherContextClass *cipher_class = CAMEL_CIPHER_CONTEXT_CLASS(klass);
-
- parent_class = CAMEL_CIPHER_CONTEXT_CLASS(camel_type_get_global_classfuncs(camel_cipher_context_get_type()));
-
- cipher_class->hash_to_id = sm_hash_to_id;
- cipher_class->id_to_hash = sm_id_to_hash;
- cipher_class->sign = sm_sign;
- cipher_class->verify = sm_verify;
- cipher_class->encrypt = sm_encrypt;
- cipher_class->decrypt = sm_decrypt;
- cipher_class->import_keys = sm_import_keys;
- cipher_class->export_keys = sm_export_keys;
-}
-
-static void
-camel_smime_context_init(CamelSMIMEContext *context)
-{
- CamelCipherContext *cipher =(CamelCipherContext *) context;
-
- cipher->sign_protocol = "application/x-pkcs7-signature";
- cipher->encrypt_protocol = "application/x-pkcs7-mime";
- cipher->key_protocol = "application/x-pkcs7-signature";
-
- context->priv = g_malloc0(sizeof(*context->priv));
- context->priv->certdb = CERT_GetDefaultCertDB();
- context->priv->sign_mode = CAMEL_SMIME_SIGN_CLEARSIGN;
-}
-
-static void
-camel_smime_context_finalise(CamelObject *object)
-{
- CamelSMIMEContext *context = (CamelSMIMEContext *)object;
-
- /* FIXME: do we have to free the certdb? */
-
- g_free(context->priv);
-}
-
-CamelType
-camel_smime_context_get_type(void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register(camel_cipher_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;
-}
diff --git a/camel/camel-smime-context.h b/camel/camel-smime-context.h
deleted file mode 100644
index 19f0e8464b..0000000000
--- a/camel/camel-smime-context.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>
- * Michael Zucchi <notzed@ximian.com>
- *
- * Copyright 2002,2003 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__
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <camel/camel-cipher-context.h>
-
-#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 enum _camel_smime_sign_t {
- CAMEL_SMIME_SIGN_CLEARSIGN,
- CAMEL_SMIME_SIGN_ENVELOPED
-} camel_smime_sign_t;
-
-typedef enum _camel_smime_describe_t {
- CAMEL_SMIME_SIGNED = 1<<0,
- CAMEL_SMIME_ENCRYPTED = 1<<1,
- CAMEL_SMIME_CERTS = 1<<2,
- CAMEL_SMIME_CRLS = 1<<3,
-} camel_smime_describe_t;
-
-typedef struct _CamelSMIMEContext CamelSMIMEContext;
-typedef struct _CamelSMIMEContextClass CamelSMIMEContextClass;
-
-struct _CamelSMIMEContext {
- CamelCipherContext cipher;
-
- struct _CamelSMIMEContextPrivate *priv;
-};
-
-struct _CamelSMIMEContextClass {
- CamelCipherContextClass cipher_class;
-};
-
-CamelType camel_smime_context_get_type(void);
-
-CamelCipherContext *camel_smime_context_new(CamelSession *session);
-
-/* nick to use for SMIMEEncKeyPrefs attribute for signed data */
-void camel_smime_context_set_encrypt_key(CamelSMIMEContext *context, gboolean use, const char *key);
-/* set signing mode, clearsigned multipart/signed or enveloped */
-void camel_smime_context_set_sign_mode(CamelSMIMEContext *context, camel_smime_sign_t type);
-
-guint32 camel_smime_context_describe_part(CamelSMIMEContext *, struct _CamelMimePart *);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __CAMEL_SMIME_CONTEXT_H__ */
diff --git a/camel/camel-store-summary.c b/camel/camel-store-summary.c
deleted file mode 100644
index 86e42fc98c..0000000000
--- a/camel/camel-store-summary.c
+++ /dev/null
@@ -1,928 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2001-2003 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <ctype.h>
-#include <fcntl.h>
-#include <errno.h>
-
-#include "camel-store-summary.h"
-
-#include "camel-file-utils.h"
-
-#include "e-util/md5-utils.h"
-#include "e-util/e-memory.h"
-
-#include "camel-private.h"
-#include "camel-url.h"
-
-#define d(x)
-#define io(x) /* io debug */
-
-/* possible versions, for versioning changes */
-#define CAMEL_STORE_SUMMARY_VERSION_0 (1)
-
-/* current version */
-#define CAMEL_STORE_SUMMARY_VERSION (1)
-
-#define _PRIVATE(o) (((CamelStoreSummary *)(o))->priv)
-
-static int summary_header_load(CamelStoreSummary *, FILE *);
-static int summary_header_save(CamelStoreSummary *, FILE *);
-
-static CamelStoreInfo * store_info_new(CamelStoreSummary *, const char *);
-static CamelStoreInfo * store_info_load(CamelStoreSummary *, FILE *);
-static int store_info_save(CamelStoreSummary *, FILE *, CamelStoreInfo *);
-static void store_info_free(CamelStoreSummary *, CamelStoreInfo *);
-
-static const char *store_info_string(CamelStoreSummary *, const CamelStoreInfo *, int);
-static void store_info_set_string(CamelStoreSummary *, CamelStoreInfo *, int, const char *);
-
-static void camel_store_summary_class_init (CamelStoreSummaryClass *klass);
-static void camel_store_summary_init (CamelStoreSummary *obj);
-static void camel_store_summary_finalise (CamelObject *obj);
-
-static CamelObjectClass *camel_store_summary_parent;
-
-static void
-camel_store_summary_class_init (CamelStoreSummaryClass *klass)
-{
- camel_store_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->store_info_new = store_info_new;
- klass->store_info_load = store_info_load;
- klass->store_info_save = store_info_save;
- klass->store_info_free = store_info_free;
-
- klass->store_info_string = store_info_string;
- klass->store_info_set_string = store_info_set_string;
-}
-
-static void
-camel_store_summary_init (CamelStoreSummary *s)
-{
- struct _CamelStoreSummaryPrivate *p;
-
- p = _PRIVATE(s) = g_malloc0(sizeof(*p));
-
- s->store_info_size = sizeof(CamelStoreInfo);
-
- s->store_info_chunks = NULL;
-
- s->version = CAMEL_STORE_SUMMARY_VERSION;
- s->flags = 0;
- s->count = 0;
- s->time = 0;
-
- s->folders = g_ptr_array_new();
- s->folders_path = g_hash_table_new(g_str_hash, g_str_equal);
-
- p->summary_lock = g_mutex_new();
- p->io_lock = g_mutex_new();
- p->alloc_lock = g_mutex_new();
- p->ref_lock = g_mutex_new();
-}
-
-static void
-camel_store_summary_finalise (CamelObject *obj)
-{
- struct _CamelStoreSummaryPrivate *p;
- CamelStoreSummary *s = (CamelStoreSummary *)obj;
-
- p = _PRIVATE(obj);
-
- camel_store_summary_clear(s);
- g_ptr_array_free(s->folders, TRUE);
- g_hash_table_destroy(s->folders_path);
-
- g_free(s->summary_path);
-
- if (s->store_info_chunks)
- e_memchunk_destroy(s->store_info_chunks);
-
- g_mutex_free(p->summary_lock);
- g_mutex_free(p->io_lock);
- g_mutex_free(p->alloc_lock);
- g_mutex_free(p->ref_lock);
-
- g_free(p);
-}
-
-CamelType
-camel_store_summary_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_object_get_type (), "CamelStoreSummary",
- sizeof (CamelStoreSummary),
- sizeof (CamelStoreSummaryClass),
- (CamelObjectClassInitFunc) camel_store_summary_class_init,
- NULL,
- (CamelObjectInitFunc) camel_store_summary_init,
- (CamelObjectFinalizeFunc) camel_store_summary_finalise);
- }
-
- return type;
-}
-
-/**
- * camel_store_summary_new:
- *
- * Create a new CamelStoreSummary object.
- *
- * Return value: A new CamelStoreSummary widget.
- **/
-CamelStoreSummary *
-camel_store_summary_new (void)
-{
- CamelStoreSummary *new = CAMEL_STORE_SUMMARY ( camel_object_new (camel_store_summary_get_type ())); return new;
-}
-
-/**
- * camel_store_summary_set_filename:
- * @s:
- * @name:
- *
- * Set the filename where the summary will be loaded to/saved from.
- **/
-void camel_store_summary_set_filename(CamelStoreSummary *s, const char *name)
-{
- CAMEL_STORE_SUMMARY_LOCK(s, summary_lock);
-
- g_free(s->summary_path);
- s->summary_path = g_strdup(name);
-
- CAMEL_STORE_SUMMARY_UNLOCK(s, summary_lock);
-}
-
-void camel_store_summary_set_uri_base(CamelStoreSummary *s, CamelURL *base)
-{
- CAMEL_STORE_SUMMARY_LOCK(s, summary_lock);
-
- if (s->uri_base)
- camel_url_free(s->uri_base);
- s->uri_base = camel_url_new_with_base(base, "");
-
- CAMEL_STORE_SUMMARY_UNLOCK(s, summary_lock);
-}
-
-/**
- * camel_store_summary_count:
- * @s:
- *
- * Get the number of summary items stored in this summary.
- *
- * Return value: The number of items int he summary.
- **/
-int
-camel_store_summary_count(CamelStoreSummary *s)
-{
- return s->folders->len;
-}
-
-/**
- * camel_store_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_store_summary_info_free().
- **/
-CamelStoreInfo *
-camel_store_summary_index(CamelStoreSummary *s, int i)
-{
- CamelStoreInfo *info = NULL;
-
- CAMEL_STORE_SUMMARY_LOCK(s, ref_lock);
- CAMEL_STORE_SUMMARY_LOCK(s, summary_lock);
-
- if (i<s->folders->len)
- info = g_ptr_array_index(s->folders, i);
-
- CAMEL_STORE_SUMMARY_UNLOCK(s, summary_lock);
-
- if (info)
- info->refcount++;
-
- CAMEL_STORE_SUMMARY_UNLOCK(s, ref_lock);
-
- return info;
-}
-
-/**
- * camel_store_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_store_summary_array_free().
- **/
-GPtrArray *
-camel_store_summary_array(CamelStoreSummary *s)
-{
- CamelStoreInfo *info;
- GPtrArray *res = g_ptr_array_new();
- int i;
-
- CAMEL_STORE_SUMMARY_LOCK(s, ref_lock);
- CAMEL_STORE_SUMMARY_LOCK(s, summary_lock);
-
- g_ptr_array_set_size(res, s->folders->len);
- for (i=0;i<s->folders->len;i++) {
- info = res->pdata[i] = g_ptr_array_index(s->folders, i);
- info->refcount++;
- }
-
- CAMEL_STORE_SUMMARY_UNLOCK(s, summary_lock);
- CAMEL_STORE_SUMMARY_UNLOCK(s, ref_lock);
-
- return res;
-}
-
-/**
- * camel_store_summary_array_free:
- * @s:
- * @array:
- *
- * Free the folder summary array.
- **/
-void
-camel_store_summary_array_free(CamelStoreSummary *s, GPtrArray *array)
-{
- int i;
-
- for (i=0;i<array->len;i++)
- camel_store_summary_info_free(s, array->pdata[i]);
-
- g_ptr_array_free(array, TRUE);
-}
-
-/**
- * camel_store_summary_path:
- * @s:
- * @path:
- *
- * Retrieve a summary item by path name.
- *
- * 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 @path name
- * is not available.
- * It must be freed using camel_store_summary_info_free().
- **/
-CamelStoreInfo *
-camel_store_summary_path(CamelStoreSummary *s, const char *path)
-{
- CamelStoreInfo *info;
-
- CAMEL_STORE_SUMMARY_LOCK(s, ref_lock);
- CAMEL_STORE_SUMMARY_LOCK(s, summary_lock);
-
- info = g_hash_table_lookup(s->folders_path, path);
-
- CAMEL_STORE_SUMMARY_UNLOCK(s, summary_lock);
-
- if (info)
- info->refcount++;
-
- CAMEL_STORE_SUMMARY_UNLOCK(s, ref_lock);
-
- return info;
-}
-
-int
-camel_store_summary_load(CamelStoreSummary *s)
-{
- FILE *in;
- int i;
- CamelStoreInfo *mi;
-
- g_assert(s->summary_path);
-
- in = fopen(s->summary_path, "r");
- if (in == NULL)
- return -1;
-
- CAMEL_STORE_SUMMARY_LOCK(s, io_lock);
- if ( ((CamelStoreSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->summary_header_load(s, in) == -1)
- goto error;
-
- /* now read in each message ... */
- for (i=0;i<s->count;i++) {
- mi = ((CamelStoreSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->store_info_load(s, in);
-
- if (mi == NULL)
- goto error;
-
- camel_store_summary_add(s, mi);
- }
-
- CAMEL_STORE_SUMMARY_UNLOCK(s, io_lock);
-
- if (fclose (in) != 0)
- return -1;
-
- s->flags &= ~CAMEL_STORE_SUMMARY_DIRTY;
-
- return 0;
-
-error:
- i = ferror (in);
- g_warning ("Cannot load summary file: %s", strerror (ferror (in)));
- CAMEL_STORE_SUMMARY_UNLOCK(s, io_lock);
- fclose (in);
- s->flags |= ~CAMEL_STORE_SUMMARY_DIRTY;
- errno = i;
-
- return -1;
-}
-
-/**
- * camel_store_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_store_summary_save(CamelStoreSummary *s)
-{
- FILE *out;
- int fd;
- int i;
- guint32 count;
- CamelStoreInfo *mi;
-
- g_assert(s->summary_path);
-
- io(printf("** saving summary\n"));
-
- if ((s->flags & CAMEL_STORE_SUMMARY_DIRTY) == 0) {
- io(printf("** summary clean no save\n"));
- return 0;
- }
-
- fd = open(s->summary_path, O_RDWR|O_CREAT|O_TRUNC, 0600);
- if (fd == -1) {
- io(printf("** open error: %s\n", strerror (errno)));
- return -1;
- }
- out = fdopen(fd, "w");
- if ( out == NULL ) {
- i = errno;
- printf("** fdopen error: %s\n", strerror (errno));
- close(fd);
- errno = i;
- return -1;
- }
-
- io(printf("saving header\n"));
-
- CAMEL_STORE_SUMMARY_LOCK(s, io_lock);
-
- if ( ((CamelStoreSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->summary_header_save(s, out) == -1) {
- i = errno;
- fclose(out);
- CAMEL_STORE_SUMMARY_UNLOCK(s, io_lock);
- errno = i;
- return -1;
- }
-
- /* now write out each message ... */
-
- /* FIXME: Locking? */
-
- count = s->folders->len;
- for (i=0;i<count;i++) {
- mi = s->folders->pdata[i];
- ((CamelStoreSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->store_info_save(s, out, mi);
- }
-
- CAMEL_STORE_SUMMARY_UNLOCK(s, io_lock);
-
- if (fflush (out) != 0 || fsync (fileno (out)) == -1) {
- i = errno;
- fclose (out);
- errno = i;
- return -1;
- }
-
- if (fclose (out) != 0)
- return -1;
-
- s->flags &= ~CAMEL_STORE_SUMMARY_DIRTY;
- return 0;
-}
-
-/**
- * camel_store_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_store_summary_header_load(CamelStoreSummary *s)
-{
- FILE *in;
- int ret;
-
- g_assert(s->summary_path);
-
- in = fopen(s->summary_path, "r");
- if (in == NULL)
- return -1;
-
- CAMEL_STORE_SUMMARY_LOCK(s, io_lock);
- ret = ((CamelStoreSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->summary_header_load(s, in);
- CAMEL_STORE_SUMMARY_UNLOCK(s, io_lock);
-
- fclose(in);
- s->flags &= ~CAMEL_STORE_SUMMARY_DIRTY;
- return ret;
-}
-
-/**
- * camel_store_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_store_summary_add(CamelStoreSummary *s, CamelStoreInfo *info)
-{
- if (info == NULL)
- return;
-
- if (camel_store_info_path(s, info) == NULL) {
- g_warning("Trying to add a folder info with missing required path name\n");
- return;
- }
-
- CAMEL_STORE_SUMMARY_LOCK(s, summary_lock);
-
- g_ptr_array_add(s->folders, info);
- g_hash_table_insert(s->folders_path, (char *)camel_store_info_path(s, info), info);
- s->flags |= CAMEL_STORE_SUMMARY_DIRTY;
-
- CAMEL_STORE_SUMMARY_UNLOCK(s, summary_lock);
-}
-
-/**
- * camel_store_summary_add_from_path:
- * @s:
- * @h:
- *
- * Build a new info record based on the name, and add it to the summary.
- *
- * Return value: The newly added record.
- **/
-CamelStoreInfo *camel_store_summary_add_from_path(CamelStoreSummary *s, const char *path)
-{
- CamelStoreInfo *info;
-
- CAMEL_STORE_SUMMARY_LOCK(s, summary_lock);
-
- info = g_hash_table_lookup(s->folders_path, path);
- if (info != NULL) {
- g_warning("Trying to add folder '%s' to summary that already has it", path);
- info = NULL;
- } else {
- info = camel_store_summary_info_new_from_path(s, path);
- g_ptr_array_add(s->folders, info);
- g_hash_table_insert(s->folders_path, (char *)camel_store_info_path(s, info), info);
- s->flags |= CAMEL_STORE_SUMMARY_DIRTY;
- }
-
- CAMEL_STORE_SUMMARY_UNLOCK(s, summary_lock);
-
- return info;
-}
-
-/**
- * camel_store_summary_info_new_from_path:
- * @s:
- * @h:
- *
- * Create a new info record from a name.
- *
- * Return value: Guess? This info record MUST be freed using
- * camel_store_summary_info_free(), camel_store_info_free() will not work.
- **/
-CamelStoreInfo *camel_store_summary_info_new_from_path(CamelStoreSummary *s, const char *f)
-{
- return ((CamelStoreSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s))) -> store_info_new(s, f);
-}
-
-/**
- * camel_store_summary_info_free:
- * @s:
- * @mi:
- *
- * Unref and potentially free the message info @mi, and all associated memory.
- **/
-void camel_store_summary_info_free(CamelStoreSummary *s, CamelStoreInfo *mi)
-{
- g_assert(mi);
- g_assert(s);
-
- CAMEL_STORE_SUMMARY_LOCK(s, ref_lock);
-
- g_assert(mi->refcount >= 1);
-
- mi->refcount--;
- if (mi->refcount > 0) {
- CAMEL_STORE_SUMMARY_UNLOCK(s, ref_lock);
- return;
- }
-
- CAMEL_STORE_SUMMARY_UNLOCK(s, ref_lock);
-
- ((CamelStoreSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->store_info_free(s, mi);
-}
-
-/**
- * camel_store_summary_info_ref:
- * @s:
- * @mi:
- *
- * Add an extra reference to @mi.
- **/
-void camel_store_summary_info_ref(CamelStoreSummary *s, CamelStoreInfo *mi)
-{
- g_assert(mi);
- g_assert(s);
-
- CAMEL_STORE_SUMMARY_LOCK(s, ref_lock);
- g_assert(mi->refcount >= 1);
- mi->refcount++;
- CAMEL_STORE_SUMMARY_UNLOCK(s, ref_lock);
-}
-
-/**
- * camel_store_summary_touch:
- * @s:
- *
- * Mark the summary as changed, so that a save will save it.
- **/
-void
-camel_store_summary_touch(CamelStoreSummary *s)
-{
- CAMEL_STORE_SUMMARY_LOCK(s, summary_lock);
- s->flags |= CAMEL_STORE_SUMMARY_DIRTY;
- CAMEL_STORE_SUMMARY_UNLOCK(s, summary_lock);
-}
-
-/**
- * camel_store_summary_clear:
- * @s:
- *
- * Empty the summary contents.
- **/
-void
-camel_store_summary_clear(CamelStoreSummary *s)
-{
- int i;
-
- CAMEL_STORE_SUMMARY_LOCK(s, summary_lock);
- if (camel_store_summary_count(s) == 0) {
- CAMEL_STORE_SUMMARY_UNLOCK(s, summary_lock);
- return;
- }
-
- for (i=0;i<s->folders->len;i++)
- camel_store_summary_info_free(s, s->folders->pdata[i]);
-
- g_ptr_array_set_size(s->folders, 0);
- g_hash_table_destroy(s->folders_path);
- s->folders_path = g_hash_table_new(g_str_hash, g_str_equal);
- s->flags |= CAMEL_STORE_SUMMARY_DIRTY;
- CAMEL_STORE_SUMMARY_UNLOCK(s, summary_lock);
-}
-
-/**
- * camel_store_summary_remove:
- * @s:
- * @info:
- *
- * Remove a specific @info record from the summary.
- **/
-void camel_store_summary_remove(CamelStoreSummary *s, CamelStoreInfo *info)
-{
- CAMEL_STORE_SUMMARY_LOCK(s, summary_lock);
- g_hash_table_remove(s->folders_path, camel_store_info_path(s, info));
- g_ptr_array_remove(s->folders, info);
- s->flags |= CAMEL_STORE_SUMMARY_DIRTY;
- CAMEL_STORE_SUMMARY_UNLOCK(s, summary_lock);
-
- camel_store_summary_info_free(s, info);
-}
-
-/**
- * camel_store_summary_remove_uid:
- * @s:
- * @path:
- *
- * Remove a specific info record from the summary, by @path.
- **/
-void camel_store_summary_remove_path(CamelStoreSummary *s, const char *path)
-{
- CamelStoreInfo *oldinfo;
- char *oldpath;
-
- CAMEL_STORE_SUMMARY_LOCK(s, ref_lock);
- CAMEL_STORE_SUMMARY_LOCK(s, summary_lock);
- if (g_hash_table_lookup_extended(s->folders_path, path, (void *)&oldpath, (void *)&oldinfo)) {
- /* make sure it doesn't vanish while we're removing it */
- oldinfo->refcount++;
- CAMEL_STORE_SUMMARY_UNLOCK(s, summary_lock);
- CAMEL_STORE_SUMMARY_UNLOCK(s, ref_lock);
- camel_store_summary_remove(s, oldinfo);
- camel_store_summary_info_free(s, oldinfo);
- } else {
- CAMEL_STORE_SUMMARY_UNLOCK(s, summary_lock);
- CAMEL_STORE_SUMMARY_UNLOCK(s, ref_lock);
- }
-}
-
-/**
- * camel_store_summary_remove_index:
- * @s:
- * @index:
- *
- * Remove a specific info record from the summary, by index.
- **/
-void camel_store_summary_remove_index(CamelStoreSummary *s, int index)
-{
- CAMEL_STORE_SUMMARY_LOCK(s, summary_lock);
- if (index < s->folders->len) {
- CamelStoreInfo *info = s->folders->pdata[index];
-
- g_hash_table_remove(s->folders_path, camel_store_info_path(s, info));
- g_ptr_array_remove_index(s->folders, index);
- s->flags |= CAMEL_STORE_SUMMARY_DIRTY;
-
- CAMEL_STORE_SUMMARY_UNLOCK(s, summary_lock);
- camel_store_summary_info_free(s, info);
- } else {
- CAMEL_STORE_SUMMARY_UNLOCK(s, summary_lock);
- }
-}
-
-static int
-summary_header_load(CamelStoreSummary *s, FILE *in)
-{
- gint32 version, flags, 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_time_t(in, &time) == -1
- || camel_file_util_decode_fixed_int32(in, &count) == -1) {
- return -1;
- }
-
- s->flags = flags;
- s->time = time;
- s->count = count;
- s->version = version;
-
- if (version < CAMEL_STORE_SUMMARY_VERSION_0) {
- g_warning("Store summary header version too low");
- return -1;
- }
-
- return 0;
-}
-
-static int
-summary_header_save(CamelStoreSummary *s, FILE *out)
-{
- fseek(out, 0, SEEK_SET);
-
- io(printf("Savining header\n"));
-
- /* always write latest version */
- camel_file_util_encode_fixed_int32(out, CAMEL_STORE_SUMMARY_VERSION);
- camel_file_util_encode_fixed_int32(out, s->flags);
- camel_file_util_encode_time_t(out, s->time);
- return camel_file_util_encode_fixed_int32(out, camel_store_summary_count(s));
-}
-
-/**
- * camel_store_summary_info_new:
- * @s:
- *
- * Allocate a new camel message info, suitable for adding
- * to this summary.
- *
- * Return value:
- **/
-CamelStoreInfo *
-camel_store_summary_info_new(CamelStoreSummary *s)
-{
- CamelStoreInfo *mi;
-
- CAMEL_STORE_SUMMARY_LOCK(s, alloc_lock);
- if (s->store_info_chunks == NULL)
- s->store_info_chunks = e_memchunk_new(32, s->store_info_size);
- mi = e_memchunk_alloc0(s->store_info_chunks);
- CAMEL_STORE_SUMMARY_UNLOCK(s, alloc_lock);
- mi->refcount = 1;
- return mi;
-}
-
-const char *camel_store_info_string(CamelStoreSummary *s, const CamelStoreInfo *mi, int type)
-{
- return ((CamelStoreSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->store_info_string(s, mi, type);
-}
-
-void camel_store_info_set_string(CamelStoreSummary *s, CamelStoreInfo *mi, int type, const char *value)
-{
- ((CamelStoreSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->store_info_set_string(s, mi, type, value);
-}
-
-static CamelStoreInfo *
-store_info_new(CamelStoreSummary *s, const char *f)
-{
- CamelStoreInfo *mi;
-
- mi = camel_store_summary_info_new(s);
-
- mi->path = g_strdup(f);
- mi->unread = CAMEL_STORE_INFO_FOLDER_UNKNOWN;
- mi->total = CAMEL_STORE_INFO_FOLDER_UNKNOWN;
-
- return mi;
-}
-
-static CamelStoreInfo *
-store_info_load(CamelStoreSummary *s, FILE *in)
-{
- CamelStoreInfo *mi;
-
- mi = camel_store_summary_info_new(s);
-
- io(printf("Loading folder info\n"));
-
- camel_file_util_decode_string(in, &mi->path);
- camel_file_util_decode_uint32(in, &mi->flags);
- camel_file_util_decode_uint32(in, &mi->unread);
- camel_file_util_decode_uint32(in, &mi->total);
-
- if (!ferror(in))
- return mi;
-
- camel_store_summary_info_free(s, mi);
-
- return NULL;
-}
-
-static int
-store_info_save(CamelStoreSummary *s, FILE *out, CamelStoreInfo *mi)
-{
- io(printf("Saving folder info\n"));
-
- camel_file_util_encode_string(out, camel_store_info_path(s, mi));
- camel_file_util_encode_uint32(out, mi->flags);
- camel_file_util_encode_uint32(out, mi->unread);
- camel_file_util_encode_uint32(out, mi->total);
-
- return ferror(out);
-}
-
-static void
-store_info_free(CamelStoreSummary *s, CamelStoreInfo *mi)
-{
- g_free(mi->path);
- g_free(mi->uri);
- e_memchunk_free(s->store_info_chunks, mi);
-}
-
-static const char *
-store_info_string(CamelStoreSummary *s, const CamelStoreInfo *mi, int type)
-{
- const char *p;
-
- /* FIXME: Locks? */
-
- g_assert (mi != NULL);
-
- switch (type) {
- case CAMEL_STORE_INFO_PATH:
- return mi->path;
- case CAMEL_STORE_INFO_NAME:
- p = strrchr(mi->path, '/');
- if (p)
- return p+1;
- else
- return mi->path;
- case CAMEL_STORE_INFO_URI:
- if (mi->uri == NULL) {
- CamelURL *uri;
-
- uri = camel_url_new_with_base(s->uri_base, mi->path);
- ((CamelStoreInfo *)mi)->uri = camel_url_to_string(uri, 0);
- camel_url_free(uri);
- }
- return mi->uri;
- }
-
- return "";
-}
-
-static void
-store_info_set_string (CamelStoreSummary *s, CamelStoreInfo *mi, int type, const char *str)
-{
- const char *p;
- char *v;
- int len;
-
- g_assert (mi != NULL);
-
- switch(type) {
- case CAMEL_STORE_INFO_PATH:
- CAMEL_STORE_SUMMARY_LOCK(s, summary_lock);
- g_hash_table_remove(s->folders_path, (char *)camel_store_info_path(s, mi));
- g_free(mi->path);
- g_free(mi->uri);
- mi->path = g_strdup(str);
- g_hash_table_insert(s->folders_path, (char *)camel_store_info_path(s, mi), mi);
- s->flags |= CAMEL_STORE_SUMMARY_DIRTY;
- CAMEL_STORE_SUMMARY_UNLOCK(s, summary_lock);
- break;
- case CAMEL_STORE_INFO_NAME:
- CAMEL_STORE_SUMMARY_LOCK(s, summary_lock);
- g_hash_table_remove(s->folders_path, (char *)camel_store_info_path(s, mi));
- p = strrchr(mi->path, '/');
- if (p) {
- len = p-mi->path+1;
- v = g_malloc(len+strlen(str)+1);
- memcpy(v, mi->path, len);
- strcpy(v+len, str);
- } else {
- v = g_strdup(str);
- }
- g_free(mi->path);
- mi->path = v;
- g_hash_table_insert(s->folders_path, (char *)camel_store_info_path(s, mi), mi);
- CAMEL_STORE_SUMMARY_UNLOCK(s, summary_lock);
- break;
- case CAMEL_STORE_INFO_URI:
- g_warning("Cannot set store info uri, aborting");
- abort();
- break;
- }
-}
diff --git a/camel/camel-store-summary.h b/camel/camel-store-summary.h
deleted file mode 100644
index dbcd6119b7..0000000000
--- a/camel/camel-store-summary.h
+++ /dev/null
@@ -1,176 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_SUMMARY_H
-#define _CAMEL_STORE_SUMMARY_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <stdio.h>
-
-#include <glib.h>
-
-#include <camel/camel-mime-parser.h>
-#include <camel/camel-object.h>
-#include <camel/camel-url.h>
-
-#define CAMEL_STORE_SUMMARY(obj) CAMEL_CHECK_CAST (obj, camel_store_summary_get_type (), CamelStoreSummary)
-#define CAMEL_STORE_SUMMARY_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_store_summary_get_type (), CamelStoreSummaryClass)
-#define CAMEL_IS_STORE_SUMMARY(obj) CAMEL_CHECK_TYPE (obj, camel_store_summary_get_type ())
-
-typedef struct _CamelStoreSummary CamelStoreSummary;
-typedef struct _CamelStoreSummaryClass CamelStoreSummaryClass;
-
-typedef struct _CamelStoreInfo CamelStoreInfo;
-
-enum _CamelStoreInfoFlags {
- CAMEL_STORE_INFO_FOLDER_NOSELECT,
- CAMEL_STORE_INFO_FOLDER_READONLY,
- CAMEL_STORE_INFO_FOLDER_SUBSCRIBED,
- CAMEL_STORE_INFO_FOLDER_FLAGGED,
-};
-
-#define CAMEL_STORE_INFO_FOLDER_UNKNOWN (~0)
-
-enum {
- CAMEL_STORE_INFO_PATH = 0,
- CAMEL_STORE_INFO_NAME,
- CAMEL_STORE_INFO_URI,
- CAMEL_STORE_INFO_LAST,
-};
-
-struct _CamelStoreInfo {
- guint32 refcount;
- char *uri;
- char *path;
- guint32 flags;
- guint32 unread;
- guint32 total;
-};
-
-enum _CamelStoreSummaryFlags {
- CAMEL_STORE_SUMMARY_DIRTY = 1<<0,
- CAMEL_STORE_SUMMARY_FRAGMENT = 1<<1, /* path name is stored in fragment rather than path */
-};
-
-struct _CamelStoreSummary {
- CamelObject parent;
-
- struct _CamelStoreSummaryPrivate *priv;
-
- /* header info */
- guint32 version; /* version of base part of file */
- guint32 flags; /* flags */
- guint32 count; /* how many were saved/loaded */
- time_t time; /* timestamp for this summary (for implementors to use) */
- struct _CamelURL *uri_base; /* url of base part of summary */
-
- /* sizes of memory objects */
- guint32 store_info_size;
-
- /* memory allocators (setup automatically) */
- struct _EMemChunk *store_info_chunks;
-
- char *summary_path;
-
- GPtrArray *folders; /* CamelStoreInfo's */
- GHashTable *folders_path; /* CamelStoreInfo's by path name */
-};
-
-struct _CamelStoreSummaryClass {
- CamelObjectClass parent_class;
-
- /* load/save the global info */
- int (*summary_header_load)(CamelStoreSummary *, FILE *);
- int (*summary_header_save)(CamelStoreSummary *, FILE *);
-
- /* create/save/load an individual message info */
- CamelStoreInfo * (*store_info_new)(CamelStoreSummary *, const char *path);
- CamelStoreInfo * (*store_info_load)(CamelStoreSummary *, FILE *);
- int (*store_info_save)(CamelStoreSummary *, FILE *, CamelStoreInfo *);
- void (*store_info_free)(CamelStoreSummary *, CamelStoreInfo *);
-
- /* virtualise access methods */
- const char *(*store_info_string)(CamelStoreSummary *, const CamelStoreInfo *, int);
- void (*store_info_set_string)(CamelStoreSummary *, CamelStoreInfo *, int, const char *);
-};
-
-CamelType camel_store_summary_get_type (void);
-CamelStoreSummary *camel_store_summary_new (void);
-
-void camel_store_summary_set_filename(CamelStoreSummary *, const char *);
-void camel_store_summary_set_uri_base(CamelStoreSummary *s, CamelURL *base);
-
-/* load/save the summary in its entirety */
-int camel_store_summary_load(CamelStoreSummary *);
-int camel_store_summary_save(CamelStoreSummary *);
-
-/* only load the header */
-int camel_store_summary_header_load(CamelStoreSummary *);
-
-/* set the dirty bit on the summary */
-void camel_store_summary_touch(CamelStoreSummary *s);
-
-/* add a new raw summary item */
-void camel_store_summary_add(CamelStoreSummary *, CamelStoreInfo *info);
-
-/* build/add raw summary items */
-CamelStoreInfo *camel_store_summary_add_from_path(CamelStoreSummary *, const char *);
-
-/* Just build raw summary items */
-CamelStoreInfo *camel_store_summary_info_new(CamelStoreSummary *s);
-CamelStoreInfo *camel_store_summary_info_new_from_path(CamelStoreSummary *s, const char *);
-
-void camel_store_summary_info_ref(CamelStoreSummary *, CamelStoreInfo *);
-void camel_store_summary_info_free(CamelStoreSummary *, CamelStoreInfo *);
-
-/* removes a summary item */
-void camel_store_summary_remove(CamelStoreSummary *s, CamelStoreInfo *info);
-void camel_store_summary_remove_path(CamelStoreSummary *s, const char *path);
-void camel_store_summary_remove_index(CamelStoreSummary *s, int);
-
-/* remove all items */
-void camel_store_summary_clear(CamelStoreSummary *s);
-
-/* lookup functions */
-int camel_store_summary_count(CamelStoreSummary *);
-CamelStoreInfo *camel_store_summary_index(CamelStoreSummary *, int);
-CamelStoreInfo *camel_store_summary_path(CamelStoreSummary *, const char *uid);
-GPtrArray *camel_store_summary_array(CamelStoreSummary *s);
-void camel_store_summary_array_free(CamelStoreSummary *s, GPtrArray *array);
-
-const char *camel_store_info_string(CamelStoreSummary *, const CamelStoreInfo *, int type);
-void camel_store_info_set_string(CamelStoreSummary *, CamelStoreInfo *, int type, const char *value);
-
-/* helper macro's */
-#define camel_store_info_path(s, i) (camel_store_info_string((CamelStoreSummary *)s, (const CamelStoreInfo *)i, CAMEL_STORE_INFO_PATH))
-#define camel_store_info_uri(s, i) (camel_store_info_string((CamelStoreSummary *)s, (const CamelStoreInfo *)i, CAMEL_STORE_INFO_URI))
-#define camel_store_info_name(s, i) (camel_store_info_string((CamelStoreSummary *)s, (const CamelStoreInfo *)i, CAMEL_STORE_INFO_NAME))
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* ! _CAMEL_STORE_SUMMARY_H */
diff --git a/camel/camel-store.c b/camel/camel-store.c
deleted file mode 100644
index 8d576d4583..0000000000
--- a/camel/camel-store.c
+++ /dev/null
@@ -1,1228 +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-2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 "camel-session.h"
-#include "camel-store.h"
-#include "camel-folder.h"
-#include "camel-vtrash-folder.h"
-#include "camel-exception.h"
-#include "camel-private.h"
-
-#define d(x)
-#define w(x)
-
-static CamelServiceClass *parent_class = NULL;
-
-/* Returns the class for a CamelStore */
-#define CS_CLASS(so) ((CamelStoreClass *)((CamelObject *)(so))->klass)
-
-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 void init_junk (CamelStore *store);
-static CamelFolder *get_junk (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 noop (CamelStore *store, CamelException *ex);
-
-static void construct (CamelService *service, CamelSession *session,
- CamelProvider *provider, CamelURL *url,
- CamelException *ex);
-
-static int store_setv (CamelObject *object, CamelException *ex, CamelArgV *args);
-static int store_getv (CamelObject *object, CamelException *ex, CamelArgGetV *args);
-
-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->init_junk = init_junk;
- camel_store_class->get_junk = get_junk;
- 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;
- camel_store_class->noop = noop;
-
- /* virtual method overload */
- camel_service_class->construct = construct;
-
- camel_object_class->setv = store_setv;
- camel_object_class->getv = store_getv;
-
- camel_object_class_add_event(camel_object_class, "folder_created", NULL);
- camel_object_class_add_event(camel_object_class, "folder_deleted", NULL);
- camel_object_class_add_event(camel_object_class, "folder_renamed", NULL);
- camel_object_class_add_event(camel_object_class, "folder_subscribed", NULL);
- camel_object_class_add_event(camel_object_class, "folder_unsubscribed", 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 = camel_object_bag_new(store_class->hash_folder_name,
- store_class->compare_folder_name,
- (CamelCopyFunc)g_strdup, g_free);
- } else
- store->folders = NULL;
-
- /* set vtrash and vjunk on by default */
- store->flags = CAMEL_STORE_VTRASH | CAMEL_STORE_VJUNK;
-
- store->dir_sep = '/';
-
- store->priv = g_malloc0 (sizeof (*store->priv));
- store->priv->folder_lock = e_mutex_new (E_MUTEX_REC);
-}
-
-static void
-camel_store_finalize (CamelObject *object)
-{
- CamelStore *store = CAMEL_STORE (object);
-
- if (store->folders)
- camel_object_bag_destroy(store->folders);
-
- e_mutex_destroy (store->priv->folder_lock);
-
- 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 int
-store_setv (CamelObject *object, CamelException *ex, CamelArgV *args)
-{
- /* CamelStore doesn't currently have anything to set */
- return CAMEL_OBJECT_CLASS (parent_class)->setv (object, ex, args);
-}
-
-static int
-store_getv (CamelObject *object, CamelException *ex, CamelArgGetV *args)
-{
- /* CamelStore doesn't currently have anything to get */
- return CAMEL_OBJECT_CLASS (parent_class)->getv (object, ex, args);
-}
-
-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)
-{
- w(g_warning ("CamelStore::get_folder not implemented for `%s'",
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (store))));
-
- camel_exception_setv (ex, CAMEL_EXCEPTION_STORE_INVALID,
- _("Cannot get folder: Invalid operation on this 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;
-
- g_return_val_if_fail (folder_name != NULL, NULL);
-
- CAMEL_STORE_LOCK(store, folder_lock);
-
- if (store->folders)
- /* Try cache first. */
- folder = camel_object_bag_reserve(store->folders, folder_name);
-
- if (!folder) {
- folder = CS_CLASS (store)->get_folder (store, folder_name, flags, ex);
- if (folder) {
- /* Add the folder to the vTrash/vJunk folder if this store implements it */
- if (store->vtrash)
- camel_vee_folder_add_folder (CAMEL_VEE_FOLDER (store->vtrash), folder);
- if (store->vjunk)
- camel_vee_folder_add_folder (CAMEL_VEE_FOLDER (store->vjunk), folder);
-
- if (store->folders)
- camel_object_bag_add(store->folders, folder_name, folder);
- } else {
- if (store->folders)
- camel_object_bag_abort(store->folders, folder_name);
- }
- }
-
- CAMEL_STORE_UNLOCK(store, folder_lock);
- return folder;
-}
-
-static CamelFolderInfo *
-create_folder (CamelStore *store, const char *parent_name,
- const char *folder_name, CamelException *ex)
-{
- w(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)
-{
- w(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)
-{
- CamelFolder *folder = NULL;
-
- CAMEL_STORE_LOCK(store, folder_lock);
-
- /* NB: Note similarity of this code to unsubscribe_folder */
-
- /* if we deleted a folder, force it out of the cache, and also out of the vtrash/vjunk if setup */
- if (store->folders) {
- folder = camel_object_bag_get(store->folders, folder_name);
- if (folder) {
- if (store->vtrash)
- camel_vee_folder_remove_folder((CamelVeeFolder *)store->vtrash, folder);
- if (store->vjunk)
- camel_vee_folder_remove_folder((CamelVeeFolder *)store->vjunk, folder);
- camel_folder_delete (folder);
- }
- }
-
- CS_CLASS (store)->delete_folder (store, folder_name, ex);
-
- if (folder) {
- if (store->folders)
- camel_object_bag_remove (store->folders, folder);
-
- camel_object_unref (folder);
- }
-
- CAMEL_STORE_UNLOCK(store, folder_lock);
-}
-
-static void
-rename_folder (CamelStore *store, const char *old_name, const char *new_name, CamelException *ex)
-{
- w(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)
-{
- CamelFolder *folder;
- int i, oldlen, namelen;
- GPtrArray *folders;
-
- d(printf("store rename folder %s '%s' '%s'\n", ((CamelService *)store)->url->protocol, old_name, new_name));
-
- if (strcmp(old_name, new_name) == 0)
- return;
-
- oldlen = strlen(old_name);
-
- CAMEL_STORE_LOCK(store, folder_lock);
-
- /* If the folder is open (or any subfolders of the open folder)
- We need to rename them atomically with renaming the actual folder path */
- if (store->folders) {
- folders = camel_object_bag_list(store->folders);
- for (i=0;i<folders->len;i++) {
- folder = folders->pdata[i];
- namelen = strlen(folder->full_name);
- if ((namelen == oldlen &&
- strcmp(folder->full_name, old_name) == 0)
- || ((namelen > oldlen)
- && strncmp(folder->full_name, old_name, oldlen) == 0
- && folder->full_name[oldlen] == store->dir_sep)) {
- d(printf("Found subfolder of '%s' == '%s'\n", old_name, folder->full_name));
- CAMEL_FOLDER_LOCK(folder, lock);
- } else {
- g_ptr_array_remove_index_fast(folders, i);
- i--;
- camel_object_unref(folder);
- }
- }
- }
-
- /* Now try the real rename (will emit renamed event) */
- CS_CLASS (store)->rename_folder (store, old_name, new_name, ex);
-
- /* If it worked, update all open folders/unlock them */
- if (!camel_exception_is_set(ex)) {
- guint32 flags = CAMEL_STORE_FOLDER_INFO_RECURSIVE;
- CamelRenameInfo reninfo;
-
- for (i=0;i<folders->len;i++) {
- char *new;
-
- folder = folders->pdata[i];
-
- new = g_strdup_printf("%s%s", new_name, folder->full_name+strlen(old_name));
- camel_object_bag_remove(store->folders, folder);
- camel_object_bag_add(store->folders, new, folder);
- camel_folder_rename(folder, new);
-
- CAMEL_FOLDER_UNLOCK(folder, lock);
- camel_object_unref(folder);
- }
-
- /* Emit changed signal */
- if (store->flags & CAMEL_STORE_SUBSCRIPTIONS)
- flags |= CAMEL_STORE_FOLDER_INFO_SUBSCRIBED;
-
- reninfo.old_base = (char *)old_name;
- reninfo.new = ((CamelStoreClass *)((CamelObject *)store)->klass)->get_folder_info(store, new_name, flags, ex);
- if (reninfo.new != NULL) {
- camel_object_trigger_event (store, "folder_renamed", &reninfo);
- ((CamelStoreClass *)((CamelObject *)store)->klass)->free_folder_info(store, reninfo.new);
- }
- } else {
- /* Failed, just unlock our folders for re-use */
- for (i=0;i<folders->len;i++) {
- folder = folders->pdata[i];
- CAMEL_FOLDER_UNLOCK(folder, lock);
- camel_object_unref(folder);
- }
- }
-
- CAMEL_STORE_UNLOCK(store, folder_lock);
-
- g_ptr_array_free(folders, TRUE);
-}
-
-
-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_finalize (CamelObject *trash, gpointer event_data, gpointer user_data)
-{
- CamelStore *store = CAMEL_STORE (user_data);
-
- store->vtrash = NULL;
-}
-
-static void
-junk_finalize (CamelObject *junk, gpointer event_data, gpointer user_data)
-{
- CamelStore *store = CAMEL_STORE (user_data);
-
- store->vjunk = NULL;
-}
-
-/* FIXME: derive vjunk folder object from vee_folder */
-#include "camel-vee-store.h"
-static CamelFolder *
-camel_vjunk_folder_new (CamelStore *parent_store, const char *name)
-{
- CamelFolder *vjunk;
-
- vjunk = (CamelFolder *)camel_object_new (camel_vee_folder_get_type ());
- vjunk->folder_flags |= CAMEL_FOLDER_IS_JUNK;
- camel_vee_folder_construct (CAMEL_VEE_FOLDER (vjunk), parent_store, name,
- CAMEL_STORE_FOLDER_PRIVATE | CAMEL_STORE_FOLDER_CREATE | CAMEL_STORE_VEE_FOLDER_AUTO);
- camel_vee_folder_set_expression((CamelVeeFolder *)vjunk, "(match-all (system-flag \"Junk\"))");
-
- return vjunk;
-}
-
-static void
-init_trash_or_junk (CamelStore *store, CamelFolder *folder, void (*finalize) (CamelObject *o, gpointer event_data, gpointer user_data))
-{
- if (folder) {
- /* FIXME: this should probably use the object bag or another one ? ... */
- /* attach to the finalise event of the vtrash/vjunk */
- camel_object_hook_event (folder, "finalize", finalize, store);
-
- /* add all the pre-opened folders to the vtrash/vjunk */
- if (store->folders) {
- GPtrArray *folders = camel_object_bag_list(store->folders);
- int i;
-
- for (i=0;i<folders->len;i++) {
- camel_vee_folder_add_folder (CAMEL_VEE_FOLDER (folder), (CamelFolder *)folders->pdata[i]);
- camel_object_unref(folders->pdata[i]);
- }
- g_ptr_array_free(folders, TRUE);
- }
- }
-}
-
-static void
-init_trash (CamelStore *store)
-{
- if ((store->flags & CAMEL_STORE_VTRASH) == 0)
- return;
-
- store->vtrash = camel_vtrash_folder_new (store, CAMEL_VTRASH_NAME);
- init_trash_or_junk (store, store->vtrash, trash_finalize);
-}
-
-static void
-init_junk (CamelStore *store)
-{
- if ((store->flags & CAMEL_STORE_VJUNK) == 0)
- return;
-
- store->vjunk = camel_vjunk_folder_new (store, CAMEL_VJUNK_NAME);
- init_trash_or_junk (store, store->vjunk, junk_finalize);
-}
-
-static CamelFolder *
-get_trash (CamelStore *store, CamelException *ex)
-{
- if (store->vtrash) {
- camel_object_ref (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 (store->vtrash);*/
- return store->vtrash;
- } else {
- w(g_warning ("This store does not support vTrash."));
- return NULL;
- }
- }
-}
-
-static CamelFolder *
-get_junk (CamelStore *store, CamelException *ex)
-{
- if (store->vjunk) {
- camel_object_ref (CAMEL_OBJECT (store->vjunk));
- return store->vjunk;
- } else {
- CS_CLASS (store)->init_junk (store);
- if (store->vjunk) {
- /* We don't ref here because we don't want the
- store to own a ref on the junk folder */
- /*camel_object_ref (CAMEL_OBJECT (store->vjunk));*/
- return store->vjunk;
- } else {
- w(g_warning ("This store does not support vJunk."));
- 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;
-}
-
-/**
- * camel_store_get_junk:
- * @store: a CamelStore
- * @ex: a CamelException
- *
- * Return value: the folder in the store into which junk is
- * delivered, or %NULL if no such folder exists.
- **/
-CamelFolder *
-camel_store_get_junk (CamelStore *store, CamelException *ex)
-{
- CamelFolder *folder;
-
- if ((store->flags & CAMEL_STORE_VJUNK) == 0)
- return NULL;
-
- CAMEL_STORE_LOCK(store, folder_lock);
- folder = CS_CLASS (store)->get_junk (store, ex);
- CAMEL_STORE_UNLOCK(store, folder_lock);
-
- return folder;
-}
-
-static void
-store_sync (CamelStore *store, CamelException *ex)
-{
- if (store->folders) {
- GPtrArray *folders;
- CamelFolder *folder;
- CamelException x;
- int i;
-
- camel_exception_init(&x);
- folders = camel_object_bag_list(store->folders);
- for (i=0;i<folders->len;i++) {
- folder = folders->pdata[i];
- if (!camel_exception_is_set(&x))
- camel_folder_sync(folder, FALSE, &x);
- camel_object_unref(folder);
- }
- camel_exception_xfer(ex, &x);
- g_ptr_array_free(folders, TRUE);
- }
-}
-
-/**
- * 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)
-{
- w(g_warning ("CamelStore::get_folder_info not implemented for `%s'",
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (store))));
-
- return NULL;
-}
-
-static void
-add_special_info (CamelStore *store, CamelFolderInfo *info, const char *name, const char *full_name,
- const char *url_base, gboolean unread_count)
-{
- CamelFolderInfo *fi, *vinfo, *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, name))
- break;
- parent = fi;
- }
-
- /* create our vTrash/vJunk URL */
- url = camel_url_new (info->url, NULL);
- if (((CamelService *) store)->provider->url_flags & CAMEL_URL_FRAGMENT_IS_PATH) {
- camel_url_set_fragment (url, name);
- } else {
- path = g_strdup_printf ("/%s", 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/Junk folder with our vTrash/vJunk folder */
- vinfo = fi;
- g_free (vinfo->full_name);
- g_free (vinfo->name);
- g_free (vinfo->url);
- g_free (vinfo->path);
- } else {
- /* There wasn't a Trash/Junk folder so create a new folder entry */
- vinfo = g_new0 (CamelFolderInfo, 1);
-
- g_assert(parent != NULL);
-
- vinfo->flags |= CAMEL_FOLDER_NOINFERIORS | CAMEL_FOLDER_SUBSCRIBED;
-
- /* link it into the right spot */
- vinfo->sibling = parent->sibling;
- parent->sibling = vinfo;
- }
-
- /* Fill in the new fields */
- vinfo->full_name = g_strdup (full_name);
- vinfo->name = g_strdup (vinfo->full_name);
- vinfo->url = g_strdup_printf ("%s:%s", url_base, uri);
- if (!unread_count)
- vinfo->unread_message_count = -1;
- vinfo->path = g_strdup_printf ("/%s", vinfo->name);
- g_free (uri);
-}
-
-/**
- * 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 *info;
-
- 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);
- info = CS_CLASS (store)->get_folder_info (store, top, flags, ex);
- CAMEL_STORE_UNLOCK(store, folder_lock);
-
- if (info && (top == NULL || *top == '\0')) {
- if (info->url && (store->flags & CAMEL_STORE_VTRASH))
- add_special_info (store, info, CAMEL_VTRASH_NAME, _("Trash"), "vtrash", FALSE);
- if (info->url && (store->flags & CAMEL_STORE_VJUNK))
- add_special_info (store, info, CAMEL_VJUNK_NAME, _("Junk"), "vjunk", TRUE);
- }
-
- return info;
-}
-
-
-static void
-free_folder_info (CamelStore *store, CamelFolderInfo *fi)
-{
- w(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)
-{
- const char *full_name;
- char *p;
-
- full_name = fi->full_name;
- while (*full_name == separator)
- full_name++;
-
- fi->path = g_strdup_printf ("/%s", full_name);
- if (separator != '/') {
- for (p = fi->path; *p; p++) {
- if (*p == separator)
- *p = '/';
- }
- }
-}
-
-static int
-folder_info_cmp (const void *ap, const void *bp)
-{
- const CamelFolderInfo *a = ((CamelFolderInfo **)ap)[0];
- const CamelFolderInfo *b = ((CamelFolderInfo **)bp)[0];
-
- return strcmp (a->full_name, b->full_name);
-}
-
-static void
-free_name(void *key, void *data, void *user)
-{
- g_free(key);
-}
-
-/**
- * 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, *tail = NULL;
- GHashTable *hash;
- char *name, *p, *pname;
- int i, nlen;
-
- if (!namespace)
- namespace = "";
- nlen = strlen (namespace);
-
- qsort (folders->pdata, folders->len, sizeof (folders->pdata[0]), folder_info_cmp);
-
- /* 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, g_strdup(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 {
- /* we are missing a folder in the heirarchy so
- create a fake folder node */
- CamelURL *url;
- char *sep;
-
- pfi = g_new0 (CamelFolderInfo, 1);
- 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);
-
- /* FIXME: url's with fragments should have the fragment truncated, not path */
- url = camel_url_new (fi->url, NULL);
- sep = strrchr (url->path, separator);
- if (sep)
- *sep = '\0';
- else
- d(g_warning ("huh, no \"%c\" in \"%s\"?", separator, fi->url));
-
- pfi->full_name = g_strdup(url->path+1);
-
- /* since this is a "fake" folder node, it is not 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);
- }
- tail = pfi->child;
- if (tail == NULL) {
- pfi->child = fi;
- } else {
- while (tail->sibling)
- tail = tail->sibling;
- tail->sibling = fi;
- }
- fi->parent = pfi;
- } else if (!top)
- top = fi;
- }
- g_hash_table_foreach(hash, free_name, NULL);
- g_hash_table_destroy (hash);
-
- /* Link together the top-level folders */
- tail = top;
- for (i = 0; i < folders->len; i++) {
- fi = folders->pdata[i];
- if (fi->parent || fi == top)
- continue;
- if (tail == NULL) {
- tail = fi;
- top = fi;
- } else {
- tail->sibling = fi;
- tail = fi;
- }
- }
-
- return top;
-}
-
-static CamelFolderInfo *folder_info_clone_rec(CamelFolderInfo *fi, CamelFolderInfo *parent)
-{
- CamelFolderInfo *info;
-
- info = g_malloc(sizeof(*info));
- info->parent = parent;
- info->url = g_strdup(fi->url);
- info->name = g_strdup(fi->name);
- info->full_name = g_strdup(fi->full_name);
- info->path = g_strdup(fi->path);
- info->unread_message_count = fi->unread_message_count;
-
- if (fi->sibling)
- info->sibling = folder_info_clone_rec(fi->sibling, parent);
- else
- info->sibling = NULL;
-
- if (fi->child)
- info->child = folder_info_clone_rec(fi->child, info);
- else
- info->child = NULL;
-
- return info;
-}
-
-CamelFolderInfo *
-camel_folder_info_clone(CamelFolderInfo *fi)
-{
- if (fi == NULL)
- return NULL;
-
- return folder_info_clone_rec(fi, NULL);
-}
-
-gboolean
-camel_store_supports_subscriptions (CamelStore *store)
-{
- return (store->flags & CAMEL_STORE_SUBSCRIPTIONS);
-}
-
-
-static gboolean
-folder_subscribed (CamelStore *store, const char *folder_name)
-{
- w(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)
-{
- w(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)
-{
- w(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)
-{
- CamelFolder *folder = NULL;
-
- g_return_if_fail (CAMEL_IS_STORE (store));
- g_return_if_fail (store->flags & CAMEL_STORE_SUBSCRIPTIONS);
-
- CAMEL_STORE_LOCK(store, folder_lock);
-
- /* NB: Note similarity of this code to delete_folder */
-
- /* if we deleted a folder, force it out of the cache, and also out of the vtrash/vjunk if setup */
- if (store->folders) {
- folder = camel_object_bag_get(store->folders, folder_name);
- if (folder) {
- if (store->vtrash)
- camel_vee_folder_remove_folder((CamelVeeFolder *)store->vtrash, folder);
- if (store->vjunk)
- camel_vee_folder_remove_folder((CamelVeeFolder *)store->vjunk, folder);
- camel_folder_delete (folder);
- }
- }
-
- CS_CLASS (store)->unsubscribe_folder (store, folder_name, ex);
-
- if (folder) {
- if (store->folders)
- camel_object_bag_remove(store->folders, folder);
-
- camel_object_unref(folder);
- }
-
- CAMEL_STORE_UNLOCK(store, folder_lock);
-}
-
-
-static void
-noop (CamelStore *store, CamelException *ex)
-{
- /* no-op */
- ;
-}
-
-
-/**
- * camel_store_noop:
- * @store: CamelStore
- * @ex: exception
- *
- * Pings @store so that its connection doesn't timeout.
- **/
-void
-camel_store_noop (CamelStore *store, CamelException *ex)
-{
- CS_CLASS (store)->noop (store, ex);
-}
-
-
-/* Return true if these uri's refer to the same object */
-gboolean
-camel_store_uri_cmp(CamelStore *store, const char *uria, const char *urib)
-{
- g_assert(CAMEL_IS_STORE(store));
-
- return CS_CLASS(store)->compare_folder_name(uria, urib);
-}
diff --git a/camel/camel-store.h b/camel/camel-store.h
deleted file mode 100644
index 2b65751aac..0000000000
--- a/camel/camel-store.h
+++ /dev/null
@@ -1,242 +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>
- * Michael Zucchi <NotZed@ximian.com>
- * Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 1999, 2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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>
-
-enum {
- CAMEL_STORE_ARG_FIRST = CAMEL_SERVICE_ARG_FIRST + 100,
-};
-
-typedef struct _CamelFolderInfo {
- struct _CamelFolderInfo *parent,
- *sibling,
- *child;
- char *url;
- char *name;
- char *full_name;
- char *path;
- int unread_message_count;
- guint32 flags;
-} CamelFolderInfo;
-
-/* Note: these are abstractions (duh), its upto the provider to make them make sense */
-
-/* a folder which can't contain messages */
-#define CAMEL_FOLDER_NOSELECT (1<<0)
-/* a folder which cannot have children */
-#define CAMEL_FOLDER_NOINFERIORS (1<<1)
-/* a folder which has children (not yet fully implemented) */
-#define CAMEL_FOLDER_CHILDREN (1<<2)
-/* a folder which is subscribed */
-#define CAMEL_FOLDER_SUBSCRIBED (1<<3)
-
-/* Structure of rename event's event_data */
-typedef struct _CamelRenameInfo {
- char *old_base;
- struct _CamelFolderInfo *new;
-} CamelRenameInfo;
-
-#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)
-#define CAMEL_STORE_VJUNK (1 << 3)
-
-struct _CamelStore
-{
- CamelService parent_object;
- struct _CamelStorePrivate *priv;
-
- CamelFolder *vtrash;
- CamelFolder *vjunk;
-
- CamelObjectBag *folders;
-
- int flags;
-
- /* FIXME: This is a temporary measure until IMAP namespaces are properly implemented,
- after that, all external folder api's will assume a dir separator of '/' */
- /* This is always a copy of IMAP_STORE()->dir_sep, or '/' */
- char dir_sep;
-};
-
-
-/* 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);
- void (*init_junk) (CamelStore *store);
- CamelFolder * (*get_junk) (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);
- void (*noop) (CamelStore *store,
- 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);
-CamelFolder * camel_store_get_junk (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);
-CamelFolderInfo *camel_folder_info_clone (CamelFolderInfo *fi);
-
-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);
-
-void camel_store_noop (CamelStore *store,
- CamelException *ex);
-
-gboolean camel_store_uri_cmp (CamelStore *store, const char *uria, const char *urib);
-
-#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 8051441ae7..0000000000
--- a/camel/camel-stream-buffer.c
+++ /dev/null
@@ -1,471 +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-2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 (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 (sbf->stream);
- sbf->stream = s;
- camel_object_ref (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) {
- if (buf == outptr)
- return -1;
- else
- bytes_read = 0;
- }
- 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 > sbf->linebuf && 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 03a8517066..0000000000
--- a/camel/camel-stream-buffer.h
+++ /dev/null
@@ -1,106 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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_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 059a5198f1..0000000000
--- a/camel/camel-stream-filter.c
+++ /dev/null
@@ -1,406 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 "camel-stream-filter.h"
-
-#define d(x)
-
-/* use my malloc debugger? */
-/*extern void g_check(void *mp);*/
-#define g_check(x)
-
-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:1; /* was the last op read or write? */
- int flushed:1; /* were the filters flushed? */
-};
-
-#define READ_PAD (128) /* 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;
- p->flushed = FALSE;
-}
-
-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;
-
- g_check(p->realbuffer);
-
- if (p->filteredlen<=0) {
- size_t presize = READ_PAD;
-
- 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);
- g_check(p->realbuffer);
- f = f->next;
- }
- size = p->filteredlen;
- p->flushed = TRUE;
- }
- if (size <= 0)
- return size;
- } else {
- f = p->filters;
- p->filtered = p->buffer;
- p->filteredlen = size;
-
- d(printf ("\n\nOriginal content (%s): '", ((CamelObject *)filter->source)->klass->name));
- 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);
- g_check(p->realbuffer);
-
- d(printf ("Filtered content (%s): '", ((CamelObject *)f->filter)->klass->name));
- 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;
-
- g_check(p->realbuffer);
-
- 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;
- size_t presize;
- char *buffer = (char *)buf;
- size_t len = n;
-
- p->last_was_read = FALSE;
-
- d(printf ("\n\nWriting: Original content (%s): '", ((CamelObject *)filter->source)->klass->name));
- d(fwrite(buffer, sizeof(char), len, stdout));
- d(printf("'\n"));
-
- g_check(p->realbuffer);
-
- f = p->filters;
- presize = 0;
- while (f) {
- camel_mime_filter_filter(f->filter, buffer, len, presize, &buffer, &len, &presize);
-
- g_check(p->realbuffer);
-
- d(printf ("Filtered content (%s): '", ((CamelObject *)f->filter)->klass->name));
- d(fwrite(buffer, sizeof(char), len, stdout));
- d(printf("'\n"));
-
- f = f->next;
- }
-
- if (camel_stream_write(filter->source, buffer, len) != len)
- return -1;
-
- g_check(p->realbuffer);
-
- return n;
-}
-
-static int
-do_flush (CamelStream *stream)
-{
- CamelStreamFilter *filter = (CamelStreamFilter *)stream;
- struct _CamelStreamFilterPrivate *p = _PRIVATE(filter);
- struct _filter *f;
- char *buffer;
- size_t presize;
- size_t len;
-
- if (p->last_was_read)
- return 0;
-
- buffer = "";
- len = 0;
- presize = 0;
- f = p->filters;
-
- d(printf ("\n\nFlushing: Original content (%s): '", ((CamelObject *)filter->source)->klass->name));
- 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): '", ((CamelObject *)f->filter)->klass->name));
- 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;
-
- if (!p->flushed)
- 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;
- p->flushed = FALSE;
-
- /* 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 3d265e8b4c..0000000000
--- a/camel/camel-stream-filter.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: Michael Zucchi <notzed@ximian.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_FILTER_H
-#define _CAMEL_STREAM_FILTER_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#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;
-};
-
-CamelType 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);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* ! _CAMEL_STREAM_FILTER_H */
diff --git a/camel/camel-stream-fs.c b/camel/camel-stream-fs.c
deleted file mode 100644
index 6560512d0c..0000000000
--- a/camel/camel-stream-fs.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-2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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-file-utils.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
- *
- * Creates a new fs stream using the given file descriptor @fd as the
- * backing store. When the stream is destroyed, the file descriptor
- * will be closed.
- *
- * Returns a new fs 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;
-
- if (seekable->bound_end != CAMEL_STREAM_UNBOUND)
- n = MIN (seekable->bound_end - seekable->position, n);
-
- if ((nread = camel_read (stream_fs->fd, buffer, n)) > 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 nwritten;
-
- if (seekable->bound_end != CAMEL_STREAM_UNBOUND)
- n = MIN (seekable->bound_end - seekable->position, n);
-
- if ((nwritten = camel_write (stream_fs->fd, buffer, n)) > 0)
- seekable->position += nwritten;
-
- return nwritten;
-}
-
-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 7db13ac244..0000000000
--- a/camel/camel-stream-fs.h
+++ /dev/null
@@ -1,74 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 7b93b7864b..0000000000
--- a/camel/camel-stream-mem.c
+++ /dev/null
@@ -1,248 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-stream-mem.c: memory buffer based stream */
-
-/*
- * Authors: Bertrand Guiheneuf <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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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);
-
- /* FIXME: we shouldn't use g_byte_arrays or g_malloc perhaps? */
- 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 af51c36ff7..0000000000
--- a/camel/camel-stream-mem.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-stream-mem.h: stream based on memory buffer */
-
-/*
- * Authors: Bertrand Guiheneuf <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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 3c0fdee47b..0000000000
--- a/camel/camel-stream-null.c
+++ /dev/null
@@ -1,91 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 be11da7741..0000000000
--- a/camel/camel-stream-null.h
+++ /dev/null
@@ -1,57 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_NULL_H
-#define _CAMEL_STREAM_NULL_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#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;
-};
-
-CamelType camel_stream_null_get_type (void);
-
-CamelStream *camel_stream_null_new (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* ! _CAMEL_STREAM_NULL_H */
diff --git a/camel/camel-stream-process.c b/camel/camel-stream-process.c
deleted file mode 100644
index 6a48ae40d0..0000000000
--- a/camel/camel-stream-process.c
+++ /dev/null
@@ -1,273 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; fill-column: 160 -*- */
-/* camel-stream-process.c : stream over piped process */
-
-/*
- * Copyright (C) 2003 Ximian Inc.
- *
- * Authors: David Woodhouse <dwmw2@infradead.org>,
- * Jeffrey Stedfast <fejj@ximian.com>
- *
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <sys/ioctl.h>
-#include <sys/wait.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <limits.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "camel-stream-process.h"
-#include "camel-file-utils.h"
-
-extern int camel_verbose_debug;
-
-static CamelObjectClass *parent_class = NULL;
-
-/* Returns the class for a CamelStream */
-#define CS_CLASS(so) CAMEL_STREAM_PROCESS_CLASS(CAMEL_OBJECT_GET_CLASS(so))
-
-/* dummy implementations, for a PROCESS stream */
-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_close (CamelStream *stream);
-static int stream_flush (CamelStream *stream);
-
-static void
-camel_stream_process_finalise (CamelObject *object)
-{
- /* Ensure we clean up after ourselves -- kill
- the child process and reap it. */
- stream_close (CAMEL_STREAM (object));
-}
-
-static void
-camel_stream_process_class_init (CamelStreamProcessClass *camel_stream_process_class)
-{
- CamelStreamClass *camel_stream_class = (CamelStreamClass *) camel_stream_process_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;
-}
-
-static void
-camel_stream_process_init (gpointer object, gpointer klass)
-{
- CamelStreamProcess *stream = CAMEL_STREAM_PROCESS (object);
-
- stream->sockfd = -1;
- stream->childpid = 0;
-}
-
-
-CamelType
-camel_stream_process_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_stream_get_type (),
- "CamelStreamProcess",
- sizeof (CamelStreamProcess),
- sizeof (CamelStreamProcessClass),
- (CamelObjectClassInitFunc) camel_stream_process_class_init,
- NULL,
- (CamelObjectInitFunc) camel_stream_process_init,
- (CamelObjectFinalizeFunc) camel_stream_process_finalise);
- }
-
- return type;
-}
-
-/**
- * camel_stream_process_new:
- *
- * Returns a PROCESS stream.
- *
- * Return value: the stream
- **/
-CamelStream *
-camel_stream_process_new (void)
-{
- return (CamelStream *) camel_object_new (camel_stream_process_get_type ());
-}
-
-
-static ssize_t
-stream_read (CamelStream *stream, char *buffer, size_t n)
-{
- CamelStreamProcess *stream_process = CAMEL_STREAM_PROCESS (stream);
-
- return camel_read (stream_process->sockfd, buffer, n);
-}
-
-static ssize_t
-stream_write (CamelStream *stream, const char *buffer, size_t n)
-{
- CamelStreamProcess *stream_process = CAMEL_STREAM_PROCESS (stream);
-
- return camel_write (stream_process->sockfd, buffer, n);
-}
-
-static int
-stream_flush (CamelStream *stream)
-{
- return 0;
-}
-
-static int
-stream_close (CamelStream *object)
-{
- CamelStreamProcess *stream = CAMEL_STREAM_PROCESS (object);
-
- if (camel_verbose_debug)
- fprintf (stderr, "Process stream close. sockfd %d, childpid %d\n",
- stream->sockfd, stream->childpid);
-
- if (stream->sockfd != -1) {
- close (stream->sockfd);
- stream->sockfd = -1;
- }
-
- if (stream->childpid) {
- int ret, i;
- for (i = 0; i < 4; i++) {
- ret = waitpid (stream->childpid, NULL, WNOHANG);
- if (camel_verbose_debug)
- fprintf (stderr, "waitpid() for pid %d returned %d (errno %d)\n",
- stream->childpid, ret, ret == -1 ? errno : 0);
- if (ret == stream->childpid || errno == ECHILD)
- break;
- switch (i) {
- case 0:
- if (camel_verbose_debug)
- fprintf (stderr, "Sending SIGTERM to pid %d\n",
- stream->childpid);
- kill (stream->childpid, SIGTERM);
- break;
- case 2:
- if (camel_verbose_debug)
- fprintf (stderr, "Sending SIGKILL to pid %d\n",
- stream->childpid);
- kill (stream->childpid, SIGKILL);
- break;
- case 1:
- case 3:
- sleep (1);
- break;
- }
- }
-
- stream->childpid = 0;
- }
-
- return 0;
-}
-
-static void
-do_exec_command (int fd, const char *command, char **env)
-{
- int i, maxopen;
-
- /* Not a lot we can do if there's an error other than bail. */
- if (dup2 (fd, 0) == -1)
- exit (1);
- if (dup2 (fd, 1) == -1)
- exit (1);
-
- /* What to do with stderr? Possibly put it through a separate pipe
- and bring up a dialog box with its output if anything does get
- spewed to it? It'd help the user understand what was going wrong
- with their command, but it's hard to do cleanly. For now we just
- leave it as it is. Perhaps we should close it and reopen /dev/null? */
-
- maxopen = sysconf (_SC_OPEN_MAX);
- for (i = 3; i < maxopen; i++)
- fcntl (i, F_SETFD, FD_CLOEXEC);
-
- setsid ();
-#ifdef TIOCNOTTY
- /* Detach from the controlling tty if we have one. Otherwise,
- SSH might do something stupid like trying to use it instead
- of running $SSH_ASKPASS. Doh. */
- if ((fd = open ("/dev/tty", O_RDONLY)) != -1) {
- ioctl (fd, TIOCNOTTY, NULL);
- close (fd);
- }
-#endif /* TIOCNOTTY */
-
- /* Set up child's environment. We _add_ to it, don't use execle,
- because otherwise we'd destroy stuff like SSH_AUTH_SOCK etc. */
- for ( ; env && *env; env++) {
- char *eq = strchr (*env, '=');
-
- if (!eq) {
- unsetenv (*env);
- continue;
- }
-
- *eq++ = '\0';
-
- setenv (*env, eq, 1);
- }
-
- execl ("/bin/sh", "/bin/sh", "-c", command, NULL);
-
- if (camel_verbose_debug)
- fprintf (stderr, "exec failed %d\n", errno);
-
- exit (1);
-}
-
-int
-camel_stream_process_connect (CamelStreamProcess *stream, const char *command, const char **env)
-{
- int sockfds[2];
-
- if (stream->sockfd != -1 || stream->childpid)
- stream_close (CAMEL_STREAM (stream));
-
- if (socketpair (AF_UNIX, SOCK_STREAM, 0, sockfds))
- return -1;
-
- stream->childpid = fork ();
- if (!stream->childpid) {
- do_exec_command (sockfds[1], command, (char **)env);
- } else if (stream->childpid == -1) {
- close (sockfds[0]);
- close (sockfds[1]);
- stream->sockfd = -1;
- return -1;
- }
-
- close (sockfds[1]);
- stream->sockfd = sockfds[0];
-
- return 0;
-}
diff --git a/camel/camel-stream-process.h b/camel/camel-stream-process.h
deleted file mode 100644
index 15a68e9a60..0000000000
--- a/camel/camel-stream-process.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2003 Ximian Inc.
- *
- * Authors: David Woodhouse <dwmw2@infradead.org>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_NULL_H
-#define _CAMEL_STREAM_NULL_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <camel/camel-stream.h>
-
-#define CAMEL_STREAM_PROCESS(obj) CAMEL_CHECK_CAST (obj, camel_stream_process_get_type (), CamelStreamProcess)
-#define CAMEL_STREAM_PROCESS_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_stream_process_get_type (), CamelStreamProcessClass)
-#define CAMEL_IS_STREAM_PROCESS(obj) CAMEL_CHECK_TYPE (obj, camel_stream_process_get_type ())
-
-typedef struct _CamelStreamProcessClass CamelStreamProcessClass;
-typedef struct _CamelStreamProcess CamelStreamProcess;
-
-struct _CamelStreamProcess {
- CamelStream parent;
-
- int sockfd;
- pid_t childpid;
-};
-
-struct _CamelStreamProcessClass {
- CamelStreamClass parent_class;
-};
-
-CamelType camel_stream_process_get_type (void);
-CamelStream *camel_stream_process_new (void);
-int camel_stream_process_connect(CamelStreamProcess *, const char *, const char **);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* ! _CAMEL_STREAM_PROCESS_H */
diff --git a/camel/camel-stream.c b/camel/camel-stream.c
deleted file mode 100644
index bcc4640697..0000000000
--- a/camel/camel-stream.c
+++ /dev/null
@@ -1,281 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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: output buffer
- * @n: max number of bytes to read.
- *
- * Attempts to read up to @len bytes from @stream into @buf.
- *
- * Returns the 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
- *
- * Attempts to write up to @n bytes of @buffer into @stream.
- *
- * Returns the number of bytes written to the stream, or -1 on error
- * along with setting errno.
- **/
-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: stream
- *
- * Flushes any buffered data to the stream's backing store. Only
- * meaningful for writable streams.
- *
- * Returns 0 on success or -1 on fail along with setting errno.
- **/
-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:
- *
- * Closes the stream.
- *
- * Returns 0 on success or -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
- *
- * Tests if there are bytes left to read on the @stream object.
- *
- * Returns %TRUE on EOS or %FALSE otherwise.
- **/
-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:
- * @stream: the stream object
- *
- * Resets the 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.
- *
- * Returns 0 on success or -1 on error along with setting errno.
- **/
-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.
- *
- * Returns the number of characters written or -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
- *
- * Write formatted output to a stream.
- *
- * Returns the number of characters written or -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.
- *
- * 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 f75e882a70..0000000000
--- a/camel/camel-stream.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; fill-column: 160 -*- */
-/* camel-stream.h : class for an abstract stream */
-
-/*
- * Author:
- * Bertrand Guiheneuf <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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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-string-utils.c b/camel/camel-string-utils.c
deleted file mode 100644
index d9927d629a..0000000000
--- a/camel/camel-string-utils.c
+++ /dev/null
@@ -1,110 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2002 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-string-utils.h"
-
-
-int
-camel_strcase_equal (gconstpointer a, gconstpointer b)
-{
- return (g_ascii_strcasecmp ((const char *) a, (const char *) b) == 0);
-}
-
-guint
-camel_strcase_hash (gconstpointer v)
-{
- const char *p = (char *) v;
- guint h = 0, g;
-
- for ( ; *p != '\0'; p++) {
- h = (h << 4) + g_ascii_toupper (*p);
- if ((g = h & 0xf0000000)) {
- h = h ^ (g >> 24);
- h = h ^ g;
- }
- }
-
- return h;
-}
-
-
-static void
-free_string (gpointer string, gpointer user_data)
-{
- g_free (string);
-}
-
-void
-camel_string_list_free (GList *string_list)
-{
- if (string_list == NULL)
- return;
-
- g_list_foreach (string_list, free_string, NULL);
- g_list_free (string_list);
-}
-
-char *
-camel_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 (!strncasecmp (ptr, needle, len))
- return (char *) ptr;
-
- return NULL;
-}
-
-
-const char *
-camel_strdown (char *str)
-{
- register char *s = str;
-
- while (*s) {
- if (*s >= 'A' && *s <= 'Z')
- *s += 0x20;
- s++;
- }
-
- return str;
-}
diff --git a/camel/camel-string-utils.h b/camel/camel-string-utils.h
deleted file mode 100644
index 54cbad3fad..0000000000
--- a/camel/camel-string-utils.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2002 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_STRING_UTILS_H__
-#define __CAMEL_STRING_UTILS_H__
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <glib.h>
-
-int camel_strcase_equal (gconstpointer a, gconstpointer b);
-guint camel_strcase_hash (gconstpointer v);
-
-void camel_string_list_free (GList *string_list);
-
-char *camel_strstrcase (const char *haystack, const char *needle);
-
-const char *camel_strdown (char *str);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __CAMEL_STRING_UTILS_H__ */
diff --git a/camel/camel-tcp-stream-openssl.c b/camel/camel-tcp-stream-openssl.c
deleted file mode 100644
index c7250a84d1..0000000000
--- a/camel/camel-tcp-stream-openssl.c
+++ /dev/null
@@ -1,954 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 HAVE_OPENSSL
-
-#include "camel-tcp-stream-ssl.h"
-
-#include <openssl/ssl.h>
-#include <openssl/x509.h>
-#include <openssl/err.h>
-#include <string.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-#include "camel-session.h"
-#include "camel-service.h"
-#include "camel-operation.h"
-#include "camel-certdb.h"
-
-#define d(x)
-
-#define TIMEOUT_USEC (10000)
-
-static CamelTcpStreamClass *parent_class = NULL;
-
-/* Returns the class for a CamelTcpStreamSSL */
-#define CTSR_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 CamelTcpAddress *stream_get_local_address (CamelTcpStream *stream);
-static CamelTcpAddress *stream_get_remote_address (CamelTcpStream *stream);
-
-static SSL *open_ssl_connection (CamelService *service, int sockfd, CamelTcpStreamSSL *openssl);
-
-struct _CamelTcpStreamSSLPrivate {
- int sockfd;
- SSL *ssl;
-
- CamelService *service;
- char *expected_host;
- gboolean ssl_mode;
- guint32 flags;
-};
-
-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_local_address = stream_get_local_address;
- camel_tcp_stream_class->get_remote_address = stream_get_remote_address;
-
- /* init OpenSSL stuff */
- SSLeay_add_ssl_algorithms ();
- SSL_load_error_strings ();
-}
-
-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);
- stream->priv->sockfd = -1;
-}
-
-static void
-camel_tcp_stream_ssl_finalize (CamelObject *object)
-{
- CamelTcpStreamSSL *stream = CAMEL_TCP_STREAM_SSL (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_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 expecting to connect with.
- * @flags: flags
- *
- * 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 ssl stream (in ssl mode)
- **/
-CamelStream *
-camel_tcp_stream_ssl_new (CamelService *service, const char *expected_host, guint32 flags)
-{
- 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);
- stream->priv->ssl_mode = TRUE;
- stream->priv->flags = flags;
-
- return CAMEL_STREAM (stream);
-}
-
-
-/**
- * camel_tcp_stream_ssl_new_raw:
- * @service: camel service
- * @expected_host: host that the stream is expecting to connect with.
- * @flags: flags
- *
- * 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 ssl-capable stream (in non ssl mode)
- **/
-CamelStream *
-camel_tcp_stream_ssl_new_raw (CamelService *service, const char *expected_host, guint32 flags)
-{
- 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);
- stream->priv->ssl_mode = FALSE;
- stream->priv->flags = flags;
-
- return CAMEL_STREAM (stream);
-}
-
-
-static int
-ssl_errno (SSL *ssl, int ret)
-{
- switch (SSL_get_error (ssl, ret)) {
- case SSL_ERROR_NONE:
- return 0;
- case SSL_ERROR_ZERO_RETURN:
- /* this one does not map well at all */
- d(printf ("ssl_errno: SSL_ERROR_ZERO_RETURN\n"));
- return EINVAL;
- case SSL_ERROR_WANT_READ: /* non-fatal; retry */
- case SSL_ERROR_WANT_WRITE: /* non-fatal; retry */
- d(printf ("ssl_errno: SSL_ERROR_WANT_[READ,WRITE]\n"));
- return EAGAIN;
- case SSL_ERROR_SYSCALL:
- d(printf ("ssl_errno: SSL_ERROR_SYSCALL\n"));
- return EINTR;
- case SSL_ERROR_SSL:
- d(printf ("ssl_errno: SSL_ERROR_SSL <-- very useful error...riiiiight\n"));
- return EINTR;
- default:
- d(printf ("ssl_errno: default error\n"));
- return EINTR;
- }
-}
-
-
-/**
- * camel_tcp_stream_ssl_enable_ssl:
- * @stream: ssl stream
- *
- * Toggles an ssl-capable stream into ssl mode (if it isn't already).
- *
- * Returns 0 on success or -1 on fail.
- **/
-int
-camel_tcp_stream_ssl_enable_ssl (CamelTcpStreamSSL *stream)
-{
- SSL *ssl;
-
- g_return_val_if_fail (CAMEL_IS_TCP_STREAM_SSL (stream), -1);
-
- if (stream->priv->sockfd != -1 && !stream->priv->ssl_mode) {
- ssl = open_ssl_connection (stream->priv->service, stream->priv->sockfd, stream);
- if (ssl == NULL) {
- stream->priv->sockfd = -1;
- return -1;
- }
-
- stream->priv->ssl = ssl;
- }
-
- stream->priv->ssl_mode = TRUE;
-
- return 0;
-}
-
-
-static ssize_t
-stream_read (CamelStream *stream, char *buffer, size_t n)
-{
- CamelTcpStreamSSL *openssl = CAMEL_TCP_STREAM_SSL (stream);
- SSL *ssl = openssl->priv->ssl;
- 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 {
- if (ssl) {
- nread = SSL_read (ssl, buffer, n);
- if (nread < 0)
- errno = ssl_errno (ssl, nread);
- } else {
- nread = read (openssl->priv->sockfd, buffer, n);
- }
- } while (nread < 0 && (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK));
- } else {
- int error, flags, fdmax;
- struct timeval timeout;
- fd_set rdset;
-
- flags = fcntl (openssl->priv->sockfd, F_GETFL);
- fcntl (openssl->priv->sockfd, F_SETFL, flags | O_NONBLOCK);
-
- fdmax = MAX (openssl->priv->sockfd, cancel_fd) + 1;
-
- do {
- FD_ZERO (&rdset);
- FD_SET (openssl->priv->sockfd, &rdset);
- FD_SET (cancel_fd, &rdset);
-
- timeout.tv_sec = 0;
- timeout.tv_usec = TIMEOUT_USEC;
- select (fdmax, &rdset, 0, 0, &timeout);
- if (FD_ISSET (cancel_fd, &rdset)) {
- fcntl (openssl->priv->sockfd, F_SETFL, flags);
- errno = EINTR;
- return -1;
- }
-
- do {
- if (ssl) {
- nread = SSL_read (ssl, buffer, n);
- if (nread < 0)
- errno = ssl_errno (ssl, nread);
- } else {
- nread = read (openssl->priv->sockfd, buffer, n);
- }
- } while (nread < 0 && errno == EINTR);
- } while (nread < 0 && (errno == EAGAIN || errno == EWOULDBLOCK));
-
- error = errno;
- fcntl (openssl->priv->sockfd, F_SETFL, flags);
- errno = error;
- }
-
- return nread;
-}
-
-static ssize_t
-stream_write (CamelStream *stream, const char *buffer, size_t n)
-{
- CamelTcpStreamSSL *openssl = CAMEL_TCP_STREAM_SSL (stream);
- SSL *ssl = openssl->priv->ssl;
- 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 {
- do {
- if (ssl) {
- w = SSL_write (ssl, buffer + written, n - written);
- if (w < 0)
- errno = ssl_errno (ssl, w);
- } else {
- w = write (openssl->priv->sockfd, buffer + written, n - written);
- }
- } while (w < 0 && (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK));
-
- if (w > 0)
- written += w;
- } while (w != -1 && written < n);
- } else {
- int error, flags, fdmax;
- struct timeval timeout;
- fd_set rdset, wrset;
-
- flags = fcntl (openssl->priv->sockfd, F_GETFL);
- fcntl (openssl->priv->sockfd, F_SETFL, flags | O_NONBLOCK);
-
- fdmax = MAX (openssl->priv->sockfd, cancel_fd) + 1;
- do {
- FD_ZERO (&rdset);
- FD_ZERO (&wrset);
- FD_SET (openssl->priv->sockfd, &wrset);
- FD_SET (cancel_fd, &rdset);
-
- timeout.tv_sec = 0;
- timeout.tv_usec = TIMEOUT_USEC;
- select (fdmax, &rdset, &wrset, 0, &timeout);
- if (FD_ISSET (cancel_fd, &rdset)) {
- fcntl (openssl->priv->sockfd, F_SETFL, flags);
- errno = EINTR;
- return -1;
- }
-
- do {
- if (ssl) {
- w = SSL_write (ssl, buffer + written, n - written);
- if (w < 0)
- errno = ssl_errno (ssl, w);
- } else {
- w = write (openssl->priv->sockfd, buffer + written, n - written);
- }
- } while (w < 0 && errno == EINTR);
-
- if (w < 0) {
- if (errno == EAGAIN || errno == EWOULDBLOCK) {
- w = 0;
- } else {
- error = errno;
- fcntl (openssl->priv->sockfd, F_SETFL, flags);
- errno = error;
- return -1;
- }
- } else
- written += w;
- } while (w >= 0 && written < n);
-
- fcntl (openssl->priv->sockfd, F_SETFL, flags);
- }
-
- return written;
-}
-
-static int
-stream_flush (CamelStream *stream)
-{
- return 0;
-}
-
-
-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 (((CamelTcpStreamSSL *)stream)->priv->ssl);
- ((CamelTcpStreamSSL *)stream)->priv->ssl = NULL;
-
- if (close (((CamelTcpStreamSSL *)stream)->priv->sockfd) == -1)
- return -1;
-
- ((CamelTcpStreamSSL *)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)
-{
-#ifdef ENABLE_IPv6
- struct sockaddr_in6 sin6;
-#endif
- struct sockaddr_in sin;
- struct sockaddr *saddr;
- struct timeval tv;
- socklen_t len;
- int cancel_fd;
- int ret, 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 */
-#ifdef ENABLE_IPv6
- if (h->h_addrtype == AF_INET6) {
- sin6.sin6_port = htons (port);
- sin6.sin6_family = h->h_addrtype;
- memcpy (&sin6.sin6_addr, h->h_addr, sizeof (sin6.sin6_addr));
- saddr = (struct sockaddr *) &sin6;
- len = sizeof (sin6);
- } else {
-#endif
- sin.sin_port = htons (port);
- sin.sin_family = h->h_addrtype;
- memcpy (&sin.sin_addr, h->h_addr, sizeof (sin.sin_addr));
- saddr = (struct sockaddr *) &sin;
- len = sizeof (sin);
-#ifdef ENABLE_IPv6
- }
-#endif
-
- fd = socket (h->h_addrtype, SOCK_STREAM, 0);
-
- cancel_fd = camel_operation_cancel_fd (NULL);
- if (cancel_fd == -1) {
- ret = connect (fd, saddr, len);
- 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, saddr, len);
- 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 const char *
-x509_strerror (int err)
-{
- switch (err) {
- case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT:
- return _("Unable to get issuer's certificate");
- case X509_V_ERR_UNABLE_TO_GET_CRL:
- return _("Unable to get Certificate Revocation List");
- case X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE:
- return _("Unable to decrypt certificate signature");
- case X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE:
- return _("Unable to decrypt Certificate Revocation List signature");
- case X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY:
- return _("Unable to decode issuer's public key");
- case X509_V_ERR_CERT_SIGNATURE_FAILURE:
- return _("Certificate signature failure");
- case X509_V_ERR_CRL_SIGNATURE_FAILURE:
- return _("Certificate Revocation List signature failure");
- case X509_V_ERR_CERT_NOT_YET_VALID:
- return _("Certificate not yet valid");
- case X509_V_ERR_CERT_HAS_EXPIRED:
- return _("Certificate has expired");
- case X509_V_ERR_CRL_NOT_YET_VALID:
- return _("CRL not yet valid");
- case X509_V_ERR_CRL_HAS_EXPIRED:
- return _("CRL has expired");
- case X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD:
- case X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD:
- case X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD:
- case X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD:
- return _("Error in CRL");
- case X509_V_ERR_OUT_OF_MEM:
- return _("Out of memory");
- case X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT:
- return _("Zero-depth self-signed certificate");
- case X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN:
- return _("Self-signed certificate in chain");
- case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY:
- return _("Unable to get issuer's certificate locally");
- case X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE:
- return _("Unable to verify leaf signature");
- case X509_V_ERR_CERT_CHAIN_TOO_LONG:
- return _("Certificate chain too long");
- case X509_V_ERR_CERT_REVOKED:
- return _("Certificate Revoked");
- case X509_V_ERR_INVALID_CA:
- return _("Invalid Certificate Authority (CA)");
- case X509_V_ERR_PATH_LENGTH_EXCEEDED:
- return _("Path length exceeded");
- case X509_V_ERR_INVALID_PURPOSE:
- return _("Invalid purpose");
- case X509_V_ERR_CERT_UNTRUSTED:
- return _("Certificate untrusted");
- case X509_V_ERR_CERT_REJECTED:
- return _("Certificate rejected");
- /* These are 'informational' when looking for issuer cert */
- case X509_V_ERR_SUBJECT_ISSUER_MISMATCH:
- return _("Subject/Issuer mismatch");
- case X509_V_ERR_AKID_SKID_MISMATCH:
- return _("AKID/SKID mismatch");
- case X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH:
- return _("AKID/Issuer serial mismatch");
- case X509_V_ERR_KEYUSAGE_NO_CERTSIGN:
- return _("Key usage does not support certificate signing");
- /* The application is not happy */
- case X509_V_ERR_APPLICATION_VERIFICATION:
- return _("Error in application verification");
- default:
- return _("Unknown");
- }
-}
-
-static int
-ssl_verify (int ok, X509_STORE_CTX *ctx)
-{
- unsigned char md5sum[16], fingerprint[40], *f;
- CamelTcpStreamSSL *stream;
- CamelService *service;
- CamelCertDB *certdb = NULL;
- CamelCert *ccert = NULL;
- char *prompt, *cert_str;
- int err, md5len, i;
- char buf[257];
- X509 *cert;
- SSL *ssl;
-
- if (ok)
- return TRUE;
-
- ssl = X509_STORE_CTX_get_ex_data (ctx, SSL_get_ex_data_X509_STORE_CTX_idx ());
-
- stream = SSL_CTX_get_app_data (ssl->ctx);
- if (!stream)
- return FALSE;
-
- service = stream->priv->service;
-
- cert = X509_STORE_CTX_get_current_cert (ctx);
- err = X509_STORE_CTX_get_error (ctx);
-
- /* calculate the MD5 hash of the raw certificate */
- md5len = sizeof (md5sum);
- X509_digest (cert, EVP_md5 (), md5sum, &md5len);
- for (i = 0, f = fingerprint; i < 16; i++, f += 3)
- sprintf (f, "%.2x%c", md5sum[i], i != 15 ? ':' : '\0');
-
-#define GET_STRING(name) X509_NAME_oneline (name, buf, 256)
-
- certdb = camel_certdb_get_default ();
- if (certdb) {
- ccert = camel_certdb_get_cert (certdb, fingerprint);
- if (ccert) {
- if (ccert->trust != CAMEL_CERT_TRUST_UNKNOWN) {
- ok = ccert->trust != CAMEL_CERT_TRUST_NEVER;
- camel_certdb_cert_unref (certdb, ccert);
- camel_object_unref (certdb);
-
- return ok;
- }
- } else {
- /* create a new camel-cert */
- ccert = camel_certdb_cert_new (certdb);
- camel_cert_set_issuer (certdb, ccert, GET_STRING (X509_get_issuer_name (cert)));
- camel_cert_set_subject (certdb, ccert, GET_STRING (X509_get_subject_name (cert)));
- camel_cert_set_hostname (certdb, ccert, stream->priv->expected_host);
- camel_cert_set_fingerprint (certdb, ccert, fingerprint);
- camel_cert_set_trust (certdb, ccert, CAMEL_CERT_TRUST_UNKNOWN);
-
- /* Add the certificate to our db */
- camel_certdb_add (certdb, ccert);
- }
- }
-
- cert_str = g_strdup_printf (_("Issuer: %s\n"
- "Subject: %s\n"
- "Fingerprint: %s\n"
- "Signature: %s"),
- GET_STRING (X509_get_issuer_name (cert)),
- GET_STRING (X509_get_subject_name (cert)),
- fingerprint, cert->valid ? _("GOOD") : _("BAD"));
-
- prompt = g_strdup_printf (_("Bad certificate from %s:\n\n%s\n\n%s\n\n"
- "Do you wish to accept anyway?"),
- service->url->host, cert_str, x509_strerror (err));
-
- ok = camel_session_alert_user (service->session, CAMEL_SESSION_ALERT_WARNING, prompt, TRUE);
- g_free (prompt);
-
- if (ok && ccert) {
- camel_cert_set_trust (certdb, ccert, CAMEL_CERT_TRUST_FULLY);
- camel_certdb_touch (certdb);
- }
-
- if (certdb) {
- camel_certdb_cert_unref (certdb, ccert);
- camel_object_unref (certdb);
- }
-
- return ok;
-}
-
-static SSL *
-open_ssl_connection (CamelService *service, int sockfd, CamelTcpStreamSSL *openssl)
-{
- SSL_CTX *ssl_ctx = NULL;
- SSL *ssl = NULL;
- int n;
-
- /* SSLv23_client_method will negotiate with SSL v2, v3, or TLS v1 */
- ssl_ctx = SSL_CTX_new (SSLv23_client_method ());
- 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) {
- int errnosave = ssl_errno (ssl, n);
-
- SSL_shutdown (ssl);
-
- if (ssl->ctx)
- SSL_CTX_free (ssl->ctx);
-
- SSL_free (ssl);
- ssl = NULL;
-
- close (sockfd);
-
- errno = errnosave;
- }
-
- return ssl;
-}
-
-static int
-stream_connect (CamelTcpStream *stream, struct hostent *host, int port)
-{
- CamelTcpStreamSSL *openssl = CAMEL_TCP_STREAM_SSL (stream);
- SSL *ssl = NULL;
- int fd;
-
- g_return_val_if_fail (host != NULL, -1);
-
- fd = socket_connect (host, port);
- if (fd == -1)
- return -1;
-
- if (openssl->priv->ssl_mode) {
- 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 (((CamelTcpStreamSSL *) stream)->priv->sockfd, F_GETFL);
- if (flags == -1)
- return -1;
-
- data->value.non_blocking = flags & O_NONBLOCK ? TRUE : FALSE;
-
- return 0;
- }
-
- return getsockopt (((CamelTcpStreamSSL *) 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 (((CamelTcpStreamSSL *) stream)->priv->sockfd, F_GETFL);
- if (flags == -1)
- return -1;
-
- set = data->value.non_blocking ? O_NONBLOCK : 0;
- flags = (flags & ~O_NONBLOCK) | set;
-
- if (fcntl (((CamelTcpStreamSSL *) stream)->priv->sockfd, F_SETFL, flags) == -1)
- return -1;
-
- return 0;
- }
-
- return setsockopt (((CamelTcpStreamSSL *) stream)->priv->sockfd,
- get_sockopt_level (data),
- optname,
- (void *) &data->value,
- sizeof (data->value));
-}
-
-#ifdef ENABLE_IPv6
-#define MIN_SOCKADDR_BUFLEN (sizeof (struct sockaddr_in6))
-#else
-#define MIN_SOCKADDR_BUFLEN (sizeof (struct sockaddr_in))
-#endif
-
-static CamelTcpAddress *
-stream_get_local_address (CamelTcpStream *stream)
-{
- unsigned char buf[MIN_SOCKADDR_BUFLEN];
-#ifdef ENABLE_IPv6
- struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) buf;
-#endif
- struct sockaddr_in *sin = (struct sockaddr_in *) buf;
- struct sockaddr *saddr = (struct sockaddr *) buf;
- gpointer address;
- socklen_t len;
- int family;
-
- len = MIN_SOCKADDR_BUFLEN;
-
- if (getsockname (CAMEL_TCP_STREAM_SSL (stream)->priv->sockfd, saddr, &len) == -1)
- return NULL;
-
- if (saddr->sa_family == AF_INET) {
- family = CAMEL_TCP_ADDRESS_IPv4;
- address = &sin->sin_addr;
-#ifdef ENABLE_IPv6
- } else if (saddr->sa_family == AF_INET6) {
- family = CAMEL_TCP_ADDRESS_IPv6;
- address = &sin6->sin6_addr;
-#endif
- } else
- return NULL;
-
- return camel_tcp_address_new (family, sin->sin_port, len, address);
-}
-
-static CamelTcpAddress *
-stream_get_remote_address (CamelTcpStream *stream)
-{
- unsigned char buf[MIN_SOCKADDR_BUFLEN];
-#ifdef ENABLE_IPv6
- struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) buf;
-#endif
- struct sockaddr_in *sin = (struct sockaddr_in *) buf;
- struct sockaddr *saddr = (struct sockaddr *) buf;
- gpointer address;
- socklen_t len;
- int family;
-
- len = MIN_SOCKADDR_BUFLEN;
-
- if (getpeername (CAMEL_TCP_STREAM_SSL (stream)->priv->sockfd, saddr, &len) == -1)
- return NULL;
-
- if (saddr->sa_family == AF_INET) {
- family = CAMEL_TCP_ADDRESS_IPv4;
- address = &sin->sin_addr;
-#ifdef ENABLE_IPv6
- } else if (saddr->sa_family == AF_INET6) {
- family = CAMEL_TCP_ADDRESS_IPv6;
- address = &sin6->sin6_addr;
-#endif
- } else
- return NULL;
-
- return camel_tcp_address_new (family, sin->sin_port, len, address);
-}
-
-#endif /* HAVE_OPENSSL */
diff --git a/camel/camel-tcp-stream-raw.c b/camel/camel-tcp-stream-raw.c
deleted file mode 100644
index 819647cff6..0000000000
--- a/camel/camel-tcp-stream-raw.c
+++ /dev/null
@@ -1,562 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001-2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <sys/time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-
-#include "camel-tcp-stream-raw.h"
-#include "camel-file-utils.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 CamelTcpAddress *stream_get_local_address (CamelTcpStream *stream);
-static CamelTcpAddress *stream_get_remote_address (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_local_address = stream_get_local_address;
- camel_tcp_stream_class->get_remote_address = stream_get_remote_address;
-}
-
-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;
-}
-
-#ifdef SIMULATE_FLAKY_NETWORK
-static ssize_t
-flaky_tcp_write (int fd, const char *buffer, size_t buflen)
-{
- size_t len = buflen;
- ssize_t nwritten;
- int val;
-
- if (buflen == 0)
- return 0;
-
- val = 1 + (int) (10.0 * rand () / (RAND_MAX + 1.0));
-
- switch (val) {
- case 1:
- printf ("flaky_tcp_write (%d, ..., %d): (-1) EINTR\n", fd, buflen);
- errno = EINTR;
- return -1;
- case 2:
- printf ("flaky_tcp_write (%d, ..., %d): (-1) EAGAIN\n", fd, buflen);
- errno = EAGAIN;
- return -1;
- case 3:
- printf ("flaky_tcp_write (%d, ..., %d): (-1) EWOULDBLOCK\n", fd, buflen);
- errno = EWOULDBLOCK;
- return -1;
- case 4:
- case 5:
- case 6:
- len = 1 + (size_t) (buflen * rand () / (RAND_MAX + 1.0));
- len = MIN (len, buflen);
- /* fall through... */
- default:
- printf ("flaky_tcp_write (%d, ..., %d): (%d) '%.*s'", fd, buflen, len, (int) len, buffer);
- nwritten = write (fd, buffer, len);
- if (nwritten < 0)
- printf (" errno => %s\n", strerror (errno));
- else if (nwritten < len)
- printf (" only wrote %d bytes\n", nwritten);
- else
- printf ("\n");
-
- return nwritten;
- }
-}
-
-#define write(fd, buffer, buflen) flaky_tcp_write (fd, buffer, buflen)
-
-static ssize_t
-flaky_tcp_read (int fd, char *buffer, size_t buflen)
-{
- size_t len = buflen;
- ssize_t nread;
- int val;
-
- if (buflen == 0)
- return 0;
-
- val = 1 + (int) (10.0 * rand () / (RAND_MAX + 1.0));
-
- switch (val) {
- case 1:
- printf ("flaky_tcp_read (%d, ..., %d): (-1) EINTR\n", fd, buflen);
- errno = EINTR;
- return -1;
- case 2:
- printf ("flaky_tcp_read (%d, ..., %d): (-1) EAGAIN\n", fd, buflen);
- errno = EAGAIN;
- return -1;
- case 3:
- printf ("flaky_tcp_read (%d, ..., %d): (-1) EWOULDBLOCK\n", fd, buflen);
- errno = EWOULDBLOCK;
- return -1;
- case 4:
- case 5:
- case 6:
- case 7:
- case 8:
- case 9:
- case 10:
- len = 1 + (size_t) (10.0 * rand () / (RAND_MAX + 1.0));
- len = MIN (len, buflen);
- /* fall through... */
- default:
- printf ("flaky_tcp_read (%d, ..., %d): (%d)", fd, buflen, len);
- nread = read (fd, buffer, len);
- if (nread < 0)
- printf (" errno => %s\n", strerror (errno));
- else if (nread < len)
- printf (" only read %d bytes\n", nread);
- else
- printf ("\n");
-
- return nread;
- }
-}
-
-#define read(fd, buffer, buflen) flaky_tcp_read (fd, buffer, buflen)
-
-#endif /* SIMULATE_FLAKY_NETWORK */
-
-
-
-/**
- * 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 *raw = CAMEL_TCP_STREAM_RAW (stream);
-
- return camel_read (raw->sockfd, buffer, n);
-}
-
-static ssize_t
-stream_write (CamelStream *stream, const char *buffer, size_t n)
-{
- CamelTcpStreamRaw *raw = CAMEL_TCP_STREAM_RAW (stream);
-
- return camel_write (raw->sockfd, buffer, n);
-}
-
-static int
-stream_flush (CamelStream *stream)
-{
- return 0;
-}
-
-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)
-{
-#ifdef ENABLE_IPv6
- struct sockaddr_in6 sin6;
-#endif
- struct sockaddr_in sin;
- struct sockaddr *saddr;
- struct timeval tv;
- socklen_t len;
- int cancel_fd;
- int ret, 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 */
-#ifdef ENABLE_IPv6
- if (h->h_addrtype == AF_INET6) {
- sin6.sin6_port = htons (port);
- sin6.sin6_family = h->h_addrtype;
- memcpy (&sin6.sin6_addr, h->h_addr, sizeof (sin6.sin6_addr));
- saddr = (struct sockaddr *) &sin6;
- len = sizeof (sin6);
- } else {
-#endif
- sin.sin_port = htons (port);
- sin.sin_family = h->h_addrtype;
- memcpy (&sin.sin_addr, h->h_addr, sizeof (sin.sin_addr));
- saddr = (struct sockaddr *) &sin;
- len = sizeof (sin);
-#ifdef ENABLE_IPv6
- }
-#endif
-
- fd = socket (h->h_addrtype, SOCK_STREAM, 0);
-
- cancel_fd = camel_operation_cancel_fd (NULL);
- if (cancel_fd == -1) {
- ret = connect (fd, saddr, len);
- if (ret == -1) {
- close (fd);
- return -1;
- }
-
- return fd;
- } else {
- int flags, fdmax, status;
- fd_set rdset, wrset;
-
- flags = fcntl (fd, F_GETFL);
- fcntl (fd, F_SETFL, flags | O_NONBLOCK);
-
- ret = connect (fd, saddr, len);
- if (ret == 0) {
- fcntl (fd, F_SETFL, flags);
- return fd;
- }
-
- if (errno != EINPROGRESS) {
- close (fd);
- return -1;
- }
-
- do {
- FD_ZERO (&rdset);
- FD_ZERO (&wrset);
- FD_SET (fd, &wrset);
- FD_SET (cancel_fd, &rdset);
- fdmax = MAX (fd, cancel_fd) + 1;
- tv.tv_sec = 60 * 4;
- tv.tv_usec = 0;
-
- status = select (fdmax, &rdset, &wrset, 0, &tv);
- } while (status == -1 && errno == EINTR);
-
- if (status <= 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 ? TRUE : FALSE;
-
- 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 ? O_NONBLOCK : 0;
- flags = (flags & ~O_NONBLOCK) | set;
-
- 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));
-}
-
-#ifdef ENABLE_IPv6
-#define MIN_SOCKADDR_BUFLEN (sizeof (struct sockaddr_in6))
-#else
-#define MIN_SOCKADDR_BUFLEN (sizeof (struct sockaddr_in))
-#endif
-
-static CamelTcpAddress *
-stream_get_local_address (CamelTcpStream *stream)
-{
- unsigned char buf[MIN_SOCKADDR_BUFLEN];
-#ifdef ENABLE_IPv6
- struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) buf;
-#endif
- struct sockaddr_in *sin = (struct sockaddr_in *) buf;
- struct sockaddr *saddr = (struct sockaddr *) buf;
- gpointer address;
- socklen_t len;
- int family;
-
- len = MIN_SOCKADDR_BUFLEN;
-
- if (getsockname (CAMEL_TCP_STREAM_RAW (stream)->sockfd, saddr, &len) == -1)
- return NULL;
-
- if (saddr->sa_family == AF_INET) {
- family = CAMEL_TCP_ADDRESS_IPv4;
- address = &sin->sin_addr;
-#ifdef ENABLE_IPv6
- } else if (saddr->sa_family == AF_INET6) {
- family = CAMEL_TCP_ADDRESS_IPv6;
- address = &sin6->sin6_addr;
-#endif
- } else
- return NULL;
-
- return camel_tcp_address_new (family, sin->sin_port, len, address);
-}
-
-static CamelTcpAddress *
-stream_get_remote_address (CamelTcpStream *stream)
-{
- unsigned char buf[MIN_SOCKADDR_BUFLEN];
-#ifdef ENABLE_IPv6
- struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) buf;
-#endif
- struct sockaddr_in *sin = (struct sockaddr_in *) buf;
- struct sockaddr *saddr = (struct sockaddr *) buf;
- gpointer address;
- socklen_t len;
- int family;
-
- len = MIN_SOCKADDR_BUFLEN;
-
- if (getpeername (CAMEL_TCP_STREAM_RAW (stream)->sockfd, saddr, &len) == -1)
- return NULL;
-
- if (saddr->sa_family == AF_INET) {
- family = CAMEL_TCP_ADDRESS_IPv4;
- address = &sin->sin_addr;
-#ifdef ENABLE_IPv6
- } else if (saddr->sa_family == AF_INET6) {
- family = CAMEL_TCP_ADDRESS_IPv6;
- address = &sin6->sin6_addr;
-#endif
- } else
- return NULL;
-
- return camel_tcp_address_new (family, sin->sin_port, len, address);
-}
diff --git a/camel/camel-tcp-stream-raw.h b/camel/camel-tcp-stream-raw.h
deleted file mode 100644
index 0ffec5cd5c..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_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 1c8f1b34de..0000000000
--- a/camel/camel-tcp-stream-ssl.c
+++ /dev/null
@@ -1,1211 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-/* NOTE: This is the default implementation of CamelTcpStreamSSL,
- * used when the Mozilla NSS libraries are used. If you configured
- * OpenSSL support instead, then this file won't be compiled and
- * the CamelTcpStreamSSL implementation in camel-tcp-stream-openssl.c
- * will be used instead.
- */
-
-
-#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 <secerr.h>
-#include <sslerr.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>
-
-/* this is commented because otherwise we get an error about the
- redefinition of MD5Context...yay */
-/*#include <e-util/md5-utils.h>*/
-
-#include "camel-tcp-stream-ssl.h"
-#include "camel-stream-fs.h"
-#include "camel-session.h"
-#include "camel-certdb.h"
-#include "camel-operation.h"
-
-/* from md5-utils.h */
-void md5_get_digest (const char *buffer, int buffer_size, unsigned char digest[16]);
-
-
-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 PRFileDesc *enable_ssl (CamelTcpStreamSSL *ssl, PRFileDesc *fd);
-
-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 CamelTcpAddress *stream_get_local_address (CamelTcpStream *stream);
-static CamelTcpAddress *stream_get_remote_address (CamelTcpStream *stream);
-
-struct _CamelTcpStreamSSLPrivate {
- PRFileDesc *sockfd;
-
- struct _CamelSession *session;
- char *expected_host;
- gboolean ssl_mode;
- guint32 flags;
-};
-
-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_local_address = stream_get_local_address;
- camel_tcp_stream_class->get_remote_address = stream_get_remote_address;
-}
-
-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);
-
- if (stream->priv->session)
- camel_object_unref(stream->priv->session);
-
- 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:
- * @session: active session
- * @expected_host: host that the stream is expected to connect with.
- * @flags: ENABLE_SSL2, ENABLE_SSL3 and/or ENABLE_TLS
- *
- * Since the SSL certificate authenticator may need to prompt the
- * user, a CamelSession is needed. @expected_host is needed as a
- * protection against an MITM attack.
- *
- * Return value: a ssl stream (in ssl mode)
- **/
-CamelStream *
-camel_tcp_stream_ssl_new (CamelSession *session, const char *expected_host, guint32 flags)
-{
- CamelTcpStreamSSL *stream;
-
- g_assert(CAMEL_IS_SESSION(session));
-
- stream = CAMEL_TCP_STREAM_SSL (camel_object_new (camel_tcp_stream_ssl_get_type ()));
-
- stream->priv->session = session;
- camel_object_ref(session);
- stream->priv->expected_host = g_strdup (expected_host);
- stream->priv->ssl_mode = TRUE;
- stream->priv->flags = flags;
-
- return CAMEL_STREAM (stream);
-}
-
-
-/**
- * camel_tcp_stream_ssl_new_raw:
- * @session: active session
- * @expected_host: host that the stream is expected to connect with.
- * @flags: ENABLE_SSL2, ENABLE_SSL3 and/or ENABLE_TLS
- *
- * Since the SSL certificate authenticator may need to prompt the
- * user, a CamelSession is needed. @expected_host is needed as a
- * protection against an MITM attack.
- *
- * Return value: a ssl-capable stream (in non ssl mode)
- **/
-CamelStream *
-camel_tcp_stream_ssl_new_raw (CamelSession *session, const char *expected_host, guint32 flags)
-{
- CamelTcpStreamSSL *stream;
-
- g_assert(CAMEL_IS_SESSION(session));
-
- stream = CAMEL_TCP_STREAM_SSL (camel_object_new (camel_tcp_stream_ssl_get_type ()));
-
- stream->priv->session = session;
- camel_object_ref(session);
- stream->priv->expected_host = g_strdup (expected_host);
- stream->priv->ssl_mode = FALSE;
- stream->priv->flags = flags;
-
- return CAMEL_STREAM (stream);
-}
-
-
-static void
-set_errno (int code)
-{
- /* FIXME: this should handle more. */
- switch (code) {
- case PR_INVALID_ARGUMENT_ERROR:
- errno = EINVAL;
- break;
- case PR_PENDING_INTERRUPT_ERROR:
- errno = EINTR;
- break;
- case PR_IO_PENDING_ERROR:
- errno = EAGAIN;
- break;
- case PR_WOULD_BLOCK_ERROR:
- errno = EWOULDBLOCK;
- break;
- case PR_IN_PROGRESS_ERROR:
- errno = EINPROGRESS;
- break;
- case PR_ALREADY_INITIATED_ERROR:
- errno = EALREADY;
- break;
- case PR_NETWORK_UNREACHABLE_ERROR:
- errno = EHOSTUNREACH;
- break;
- case PR_CONNECT_REFUSED_ERROR:
- errno = ECONNREFUSED;
- break;
- case PR_CONNECT_TIMEOUT_ERROR:
- case PR_IO_TIMEOUT_ERROR:
- errno = ETIMEDOUT;
- break;
- case PR_NOT_CONNECTED_ERROR:
- errno = ENOTCONN;
- break;
- case PR_CONNECT_RESET_ERROR:
- errno = ECONNRESET;
- break;
- case PR_IO_ERROR:
- default:
- errno = EIO;
- break;
- }
-}
-
-
-/**
- * camel_tcp_stream_ssl_enable_ssl:
- * @ssl: ssl stream
- *
- * Toggles an ssl-capable stream into ssl mode (if it isn't already).
- *
- * Returns 0 on success or -1 on fail.
- **/
-int
-camel_tcp_stream_ssl_enable_ssl (CamelTcpStreamSSL *ssl)
-{
- PRFileDesc *fd;
-
- g_return_val_if_fail (CAMEL_IS_TCP_STREAM_SSL (ssl), -1);
-
- if (ssl->priv->sockfd && !ssl->priv->ssl_mode) {
- if (!(fd = enable_ssl (ssl, NULL))) {
- set_errno (PR_GetError ());
- return -1;
- }
-
- ssl->priv->sockfd = fd;
-
- if (SSL_ResetHandshake (fd, FALSE) == SECFailure) {
- set_errno (PR_GetError ());
- return -1;
- }
-
- if (SSL_ForceHandshake (fd) == -1) {
- set_errno (PR_GetError ());
- return -1;
- }
- }
-
- ssl->priv->ssl_mode = TRUE;
-
- return 0;
-}
-
-
-static ssize_t
-stream_read (CamelStream *stream, char *buffer, size_t n)
-{
- CamelTcpStreamSSL *tcp_stream_ssl = CAMEL_TCP_STREAM_SSL (stream);
- PRFileDesc *cancel_fd;
- ssize_t nread;
-
- if (camel_operation_cancel_check (NULL)) {
- errno = EINTR;
- return -1;
- }
-
- cancel_fd = camel_operation_cancel_prfd (NULL);
- if (cancel_fd == NULL) {
- do {
- nread = PR_Read (tcp_stream_ssl->priv->sockfd, buffer, n);
- if (nread == -1)
- set_errno (PR_GetError ());
- } while (nread == -1 && (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK));
- } else {
- PRSocketOptionData sockopts;
- PRPollDesc pollfds[2];
- gboolean nonblock;
- int error;
-
- /* get O_NONBLOCK options */
- sockopts.option = PR_SockOpt_Nonblocking;
- PR_GetSocketOption (tcp_stream_ssl->priv->sockfd, &sockopts);
- sockopts.option = PR_SockOpt_Nonblocking;
- nonblock = sockopts.value.non_blocking;
- sockopts.value.non_blocking = TRUE;
- PR_SetSocketOption (tcp_stream_ssl->priv->sockfd, &sockopts);
-
- pollfds[0].fd = tcp_stream_ssl->priv->sockfd;
- pollfds[0].in_flags = PR_POLL_READ;
- pollfds[1].fd = cancel_fd;
- pollfds[1].in_flags = PR_POLL_READ;
-
- do {
- pollfds[0].out_flags = 0;
- pollfds[1].out_flags = 0;
-
- nread = -1;
- if (PR_Poll (pollfds, 2, -1) != -1) {
- if (pollfds[1].out_flags == PR_POLL_READ) {
- sockopts.option = PR_SockOpt_Nonblocking;
- sockopts.value.non_blocking = nonblock;
- PR_SetSocketOption (tcp_stream_ssl->priv->sockfd, &sockopts);
- errno = EINTR;
- return -1;
- }
-
- do {
- nread = PR_Read (tcp_stream_ssl->priv->sockfd, buffer, n);
- if (nread == -1)
- set_errno (PR_GetError ());
- } while (nread == -1 && errno == EINTR);
- } else {
- errno = EAGAIN;
- }
- } while (nread == -1 && (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK));
-
- /* restore O_NONBLOCK options */
- error = errno;
- sockopts.option = PR_SockOpt_Nonblocking;
- sockopts.value.non_blocking = nonblock;
- PR_SetSocketOption (tcp_stream_ssl->priv->sockfd, &sockopts);
- errno = error;
- }
-
- 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 w, written = 0;
- PRFileDesc *cancel_fd;
-
- if (camel_operation_cancel_check (NULL)) {
- errno = EINTR;
- return -1;
- }
-
- cancel_fd = camel_operation_cancel_prfd (NULL);
- if (cancel_fd == NULL) {
- do {
- do {
- w = PR_Write (tcp_stream_ssl->priv->sockfd, buffer + written, n - written);
- if (w == -1)
- set_errno (PR_GetError ());
- } while (w == -1 && (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK));
-
- if (w > 0)
- written += w;
- } while (w != -1 && written < n);
- } else {
- PRSocketOptionData sockopts;
- PRPollDesc pollfds[2];
- gboolean nonblock;
- int error;
-
- /* get O_NONBLOCK options */
- sockopts.option = PR_SockOpt_Nonblocking;
- PR_GetSocketOption (tcp_stream_ssl->priv->sockfd, &sockopts);
- sockopts.option = PR_SockOpt_Nonblocking;
- nonblock = sockopts.value.non_blocking;
- sockopts.value.non_blocking = TRUE;
- PR_SetSocketOption (tcp_stream_ssl->priv->sockfd, &sockopts);
-
- pollfds[0].fd = tcp_stream_ssl->priv->sockfd;
- pollfds[0].in_flags = PR_POLL_WRITE;
- pollfds[1].fd = cancel_fd;
- pollfds[1].in_flags = PR_POLL_READ;
-
- do {
- pollfds[0].out_flags = 0;
- pollfds[1].out_flags = 0;
-
- w = -1;
- if (PR_Poll (pollfds, 2, -1) != -1) {
- if (pollfds[1].out_flags == PR_POLL_READ) {
- sockopts.option = PR_SockOpt_Nonblocking;
- sockopts.value.non_blocking = nonblock;
- PR_SetSocketOption (tcp_stream_ssl->priv->sockfd, &sockopts);
- errno = EINTR;
- return -1;
- }
-
- do {
- w = PR_Write (tcp_stream_ssl->priv->sockfd, buffer + written, n - written);
- if (w == -1)
- set_errno (PR_GetError ());
- } while (w == -1 && errno == EINTR);
-
- if (w == -1) {
- if (errno == EAGAIN || errno == EWOULDBLOCK) {
- w = 0;
- } else {
- error = errno;
- sockopts.option = PR_SockOpt_Nonblocking;
- sockopts.value.non_blocking = nonblock;
- PR_SetSocketOption (tcp_stream_ssl->priv->sockfd, &sockopts);
- errno = error;
- return -1;
- }
- } else
- written += w;
- } else {
- set_errno (PR_GetError ());
- if (errno == EINTR)
- w = 0;
- }
- } while (w != -1 && written < n);
-
- /* restore O_NONBLOCK options */
- error = errno;
- sockopts.option = PR_SockOpt_Nonblocking;
- sockopts.value.non_blocking = nonblock;
- PR_SetSocketOption (tcp_stream_ssl->priv->sockfd, &sockopts);
- errno = error;
- }
-
- if (w == -1)
- return -1;
-
- 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 (host);
-
- return secStatus;
-}
-#endif
-
-CamelCert *camel_certdb_nss_cert_get(CamelCertDB *certdb, CERTCertificate *cert);
-CamelCert *camel_certdb_nss_cert_add(CamelCertDB *certdb, CERTCertificate *cert);
-void camel_certdb_nss_cert_set(CamelCertDB *certdb, CamelCert *ccert, CERTCertificate *cert);
-
-static char *
-cert_fingerprint(CERTCertificate *cert)
-{
- unsigned char md5sum[16], fingerprint[50], *f;
- int i;
- const char tohex[16] = "0123456789abcdef";
-
- md5_get_digest (cert->derCert.data, cert->derCert.len, md5sum);
- for (i=0,f = fingerprint; i<16; i++) {
- unsigned int c = md5sum[i];
-
- *f++ = tohex[(c >> 4) & 0xf];
- *f++ = tohex[c & 0xf];
- *f++ = ':';
- }
-
- fingerprint[47] = 0;
-
- return g_strdup(fingerprint);
-}
-
-/* lookup a cert uses fingerprint to index an on-disk file */
-CamelCert *
-camel_certdb_nss_cert_get(CamelCertDB *certdb, CERTCertificate *cert)
-{
- char *fingerprint, *path;
- CamelCert *ccert;
- struct stat st;
- size_t nread;
- ssize_t n;
- int fd;
-
- fingerprint = cert_fingerprint (cert);
- ccert = camel_certdb_get_cert (certdb, fingerprint);
- if (ccert == NULL) {
- g_free (fingerprint);
- return ccert;
- }
-
- if (ccert->rawcert == NULL) {
- path = g_strdup_printf ("%s/.camel_certs/%s", getenv ("HOME"), fingerprint);
- if (stat (path, &st) == -1
- || (fd = open (path, O_RDONLY)) == -1) {
- g_warning ("could not load cert %s: %s", path, strerror (errno));
- g_free (fingerprint);
- g_free (path);
- camel_cert_set_trust (certdb, ccert, CAMEL_CERT_TRUST_UNKNOWN);
- camel_certdb_touch (certdb);
-
- return ccert;
- }
- g_free(path);
-
- ccert->rawcert = g_byte_array_new ();
- g_byte_array_set_size (ccert->rawcert, st.st_size);
-
- nread = 0;
- do {
- do {
- n = read (fd, ccert->rawcert->data + nread, st.st_size - nread);
- } while (n == -1 && errno == EINTR);
-
- if (n > 0)
- nread += n;
- } while (nread < st.st_size && n != -1);
-
- close (fd);
-
- if (nread != st.st_size) {
- g_warning ("cert size read truncated %s: %d != %ld", path, nread, st.st_size);
- g_byte_array_free(ccert->rawcert, TRUE);
- ccert->rawcert = NULL;
- g_free(fingerprint);
- camel_cert_set_trust(certdb, ccert, CAMEL_CERT_TRUST_UNKNOWN);
- camel_certdb_touch(certdb);
-
- return ccert;
- }
- }
-
- g_free(fingerprint);
- if (ccert->rawcert->len != cert->derCert.len
- || memcmp(ccert->rawcert->data, cert->derCert.data, cert->derCert.len) != 0) {
- g_warning("rawcert != derCer");
- camel_cert_set_trust(certdb, ccert, CAMEL_CERT_TRUST_UNKNOWN);
- camel_certdb_touch(certdb);
- }
-
- return ccert;
-}
-
-/* add a cert to the certdb */
-CamelCert *
-camel_certdb_nss_cert_add(CamelCertDB *certdb, CERTCertificate *cert)
-{
- CamelCert *ccert;
- char *fingerprint;
-
- fingerprint = cert_fingerprint(cert);
-
- ccert = camel_certdb_cert_new(certdb);
- camel_cert_set_issuer(certdb, ccert, CERT_NameToAscii(&cert->issuer));
- camel_cert_set_subject(certdb, ccert, CERT_NameToAscii(&cert->subject));
- /* hostname is set in caller */
- /*camel_cert_set_hostname(certdb, ccert, ssl->priv->expected_host);*/
- camel_cert_set_fingerprint(certdb, ccert, fingerprint);
- camel_cert_set_trust(certdb, ccert, CAMEL_CERT_TRUST_UNKNOWN);
- g_free(fingerprint);
-
- camel_certdb_nss_cert_set(certdb, ccert, cert);
-
- camel_certdb_add(certdb, ccert);
-
- return ccert;
-}
-
-/* set the 'raw' cert (& save it) */
-void
-camel_certdb_nss_cert_set(CamelCertDB *certdb, CamelCert *ccert, CERTCertificate *cert)
-{
- char *dir, *path, *fingerprint;
- CamelStream *stream;
- struct stat st;
-
- fingerprint = ccert->fingerprint;
-
- if (ccert->rawcert == NULL)
- ccert->rawcert = g_byte_array_new ();
-
- g_byte_array_set_size (ccert->rawcert, cert->derCert.len);
- memcpy (ccert->rawcert->data, cert->derCert.data, cert->derCert.len);
-
- dir = g_strdup_printf ("%s/.camel_certs", getenv ("HOME"));
- if (stat (dir, &st) == -1 && mkdir (dir, 0700) == -1) {
- g_warning ("Could not create cert directory '%s': %s", dir, strerror (errno));
- g_free (dir);
- return;
- }
-
- path = g_strdup_printf ("%s/%s", dir, fingerprint);
- g_free (dir);
-
- stream = camel_stream_fs_new_with_name (path, O_WRONLY | O_CREAT | O_TRUNC, 0600);
- if (stream != NULL) {
- if (camel_stream_write (stream, ccert->rawcert->data, ccert->rawcert->len) == -1) {
- g_warning ("Could not save cert: %s: %s", path, strerror (errno));
- unlink (path);
- }
- camel_stream_close (stream);
- camel_object_unref (stream);
- } else {
- g_warning ("Could not save cert: %s: %s", path, strerror (errno));
- }
-
- g_free (path);
-}
-
-
-#if 0
-/* used by the mozilla-like code below */
-static char *
-get_nickname(CERTCertificate *cert)
-{
- char *server, *nick = NULL;
- int i;
- PRBool status = PR_TRUE;
-
- server = CERT_GetCommonName(&cert->subject);
- if (server == NULL)
- return NULL;
-
- for (i=1;status == PR_TRUE;i++) {
- if (nick) {
- g_free(nick);
- nick = g_strdup_printf("%s #%d", server, i);
- } else {
- nick = g_strdup(server);
- }
- status = SEC_CertNicknameConflict(server, &cert->derSubject, cert->dbhandle);
- }
-
- return nick;
-}
-#endif
-
-static SECStatus
-ssl_bad_cert (void *data, PRFileDesc *sockfd)
-{
- gboolean accept;
- CamelCertDB *certdb = NULL;
- CamelCert *ccert = NULL;
- char *prompt, *cert_str, *fingerprint;
- CamelTcpStreamSSL *ssl;
- CERTCertificate *cert;
- SECStatus status = SECFailure;
-
- g_return_val_if_fail (data != NULL, SECFailure);
- g_return_val_if_fail (CAMEL_IS_TCP_STREAM_SSL (data), SECFailure);
-
- ssl = data;
-
- cert = SSL_PeerCertificate (sockfd);
- if (cert == NULL)
- return SECFailure;
-
- certdb = camel_certdb_get_default();
- ccert = camel_certdb_nss_cert_get(certdb, cert);
- if (ccert == NULL) {
- ccert = camel_certdb_nss_cert_add(certdb, cert);
- camel_cert_set_hostname(certdb, ccert, ssl->priv->expected_host);
- }
-
- if (ccert->trust == CAMEL_CERT_TRUST_UNKNOWN) {
- status = CERT_VerifyCertNow(cert->dbhandle, cert, TRUE, certUsageSSLClient, NULL);
- fingerprint = cert_fingerprint(cert);
- cert_str = g_strdup_printf (_("Issuer: %s\n"
- "Subject: %s\n"
- "Fingerprint: %s\n"
- "Signature: %s"),
- CERT_NameToAscii (&cert->issuer),
- CERT_NameToAscii (&cert->subject),
- fingerprint, status == SECSuccess?_("GOOD"):_("BAD"));
- g_free(fingerprint);
-
- /* construct our user prompt */
- prompt = g_strdup_printf (_("SSL Certificate check for %s:\n\n%s\n\nDo you wish to accept?"),
- ssl->priv->expected_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 (ssl->priv->session, CAMEL_SESSION_ALERT_WARNING, prompt, TRUE);
- g_free(prompt);
- if (accept) {
- camel_certdb_nss_cert_set(certdb, ccert, cert);
- camel_cert_set_trust(certdb, ccert, CAMEL_CERT_TRUST_FULLY);
- camel_certdb_touch(certdb);
- }
- } else {
- accept = ccert->trust != CAMEL_CERT_TRUST_NEVER;
- }
-
- camel_certdb_cert_unref(certdb, ccert);
- camel_object_unref(certdb);
-
- return accept ? SECSuccess : SECFailure;
-
-#if 0
- int i, error;
- CERTCertTrust trust;
- SECItem *certs[1];
- int go = 1;
- char *host, *nick;
-
- error = PR_GetError();
-
- /* This code is basically what mozilla does - however it doesn't seem to work here
- very reliably :-/ */
- while (go && status != SECSuccess) {
- char *prompt = NULL;
-
- printf("looping, error '%d'\n", error);
-
- switch(error) {
- case SEC_ERROR_UNKNOWN_ISSUER:
- case SEC_ERROR_CA_CERT_INVALID:
- case SEC_ERROR_UNTRUSTED_ISSUER:
- case SEC_ERROR_EXPIRED_ISSUER_CERTIFICATE:
- /* add certificate */
- printf("unknown issuer, adding ... \n");
- prompt = g_strdup_printf(_("Certificate problem: %s\nIssuer: %s"), cert->subjectName, cert->issuerName);
-
- if (camel_session_alert_user(ssl->priv->session, CAMEL_SESSION_ALERT_WARNING, prompt, TRUE)) {
-
- nick = get_nickname(cert);
- if (NULL == nick) {
- g_free(prompt);
- status = SECFailure;
- break;
- }
-
- printf("adding cert '%s'\n", nick);
-
- if (!cert->trust) {
- cert->trust = (CERTCertTrust*)PORT_ArenaZAlloc(cert->arena, sizeof(CERTCertTrust));
- CERT_DecodeTrustString(cert->trust, "P");
- }
-
- certs[0] = &cert->derCert;
- /*CERT_ImportCerts (cert->dbhandle, certUsageSSLServer, 1, certs, NULL, TRUE, FALSE, nick);*/
- CERT_ImportCerts(cert->dbhandle, certUsageUserCertImport, 1, certs, NULL, TRUE, FALSE, nick);
- g_free(nick);
-
- printf(" cert type %08x\n", cert->nsCertType);
-
- memset((void*)&trust, 0, sizeof(trust));
- if (CERT_GetCertTrust(cert, &trust) != SECSuccess) {
- CERT_DecodeTrustString(&trust, "P");
- }
- trust.sslFlags |= CERTDB_VALID_PEER | CERTDB_TRUSTED;
- if (CERT_ChangeCertTrust(cert->dbhandle, cert, &trust) != SECSuccess) {
- printf("couldn't change cert trust?\n");
- }
-
- /*status = SECSuccess;*/
-#if 1
- /* re-verify? */
- status = CERT_VerifyCertNow(cert->dbhandle, cert, TRUE, certUsageSSLServer, NULL);
- error = PR_GetError();
- printf("re-verify status %d, error %d\n", status, error);
-#endif
-
- printf(" cert type %08x\n", cert->nsCertType);
- } else {
- printf("failed/cancelled\n");
- go = 0;
- }
-
- break;
- case SSL_ERROR_BAD_CERT_DOMAIN:
- printf("bad domain\n");
-
- prompt = g_strdup_printf(_("Bad certificate domain: %s\nIssuer: %s"), cert->subjectName, cert->issuerName);
-
- if (camel_session_alert_user (ssl->priv->session, CAMEL_SESSION_ALERT_WARNING, prompt, TRUE)) {
- host = SSL_RevealURL(sockfd);
- status = CERT_AddOKDomainName(cert, host);
- printf("add ok domain name : %s\n", status == SECFailure?"fail":"ok");
- error = PR_GetError();
- if (status == SECFailure)
- go = 0;
- } else {
- go = 0;
- }
-
- break;
-
- case SEC_ERROR_EXPIRED_CERTIFICATE:
- printf("expired\n");
-
- prompt = g_strdup_printf(_("Certificate expired: %s\nIssuer: %s"), cert->subjectName, cert->issuerName);
-
- if (camel_session_alert_user(ssl->priv->session, CAMEL_SESSION_ALERT_WARNING, prompt, TRUE)) {
- cert->timeOK = PR_TRUE;
- status = CERT_VerifyCertNow(cert->dbhandle, cert, TRUE, certUsageSSLClient, NULL);
- error = PR_GetError();
- if (status == SECFailure)
- go = 0;
- } else {
- go = 0;
- }
-
- break;
-
- case SEC_ERROR_CRL_EXPIRED:
- printf("crl expired\n");
-
- prompt = g_strdup_printf(_("Certificate revocation list expired: %s\nIssuer: %s"), cert->subjectName, cert->issuerName);
-
- if (camel_session_alert_user(ssl->priv->session, CAMEL_SESSION_ALERT_WARNING, prompt, TRUE)) {
- host = SSL_RevealURL(sockfd);
- status = CERT_AddOKDomainName(cert, host);
- }
-
- go = 0;
- break;
-
- default:
- printf("generic error\n");
- go = 0;
- break;
- }
-
- g_free(prompt);
- }
-
- CERT_DestroyCertificate(cert);
-
- return status;
-#endif
-}
-
-static PRFileDesc *
-enable_ssl (CamelTcpStreamSSL *ssl, PRFileDesc *fd)
-{
- PRFileDesc *ssl_fd;
-
- ssl_fd = SSL_ImportFD (NULL, fd ? fd : ssl->priv->sockfd);
- if (!ssl_fd)
- return NULL;
-
- SSL_OptionSet (ssl_fd, SSL_SECURITY, PR_TRUE);
- if (ssl->priv->flags & CAMEL_TCP_STREAM_SSL_ENABLE_SSL2)
- SSL_OptionSet (ssl_fd, SSL_ENABLE_SSL2, PR_TRUE);
- else
- SSL_OptionSet (ssl_fd, SSL_ENABLE_SSL2, PR_FALSE);
- if (ssl->priv->flags & CAMEL_TCP_STREAM_SSL_ENABLE_SSL3)
- SSL_OptionSet (ssl_fd, SSL_ENABLE_SSL3, PR_TRUE);
- else
- SSL_OptionSet (ssl_fd, SSL_ENABLE_SSL3, PR_FALSE);
- if (ssl->priv->flags & CAMEL_TCP_STREAM_SSL_ENABLE_TLS)
- SSL_OptionSet (ssl_fd, SSL_ENABLE_TLS, PR_TRUE);
- else
- SSL_OptionSet (ssl_fd, SSL_ENABLE_TLS, PR_FALSE);
-
- SSL_SetURL (ssl_fd, ssl->priv->expected_host);
-
- /*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->ssl_mode = TRUE;
-
- return ssl_fd;
-}
-
-#define CONNECT_TIMEOUT PR_TicksPerSecond () * 120
-
-static int
-stream_connect (CamelTcpStream *stream, struct hostent *host, int port)
-{
- CamelTcpStreamSSL *ssl = CAMEL_TCP_STREAM_SSL (stream);
- PRIntervalTime timeout = CONNECT_TIMEOUT;
- PRNetAddr netaddr;
- PRFileDesc *fd;
-
- g_return_val_if_fail (host != NULL, -1);
-
- memset ((void *) &netaddr, 0, sizeof (PRNetAddr));
-#ifdef ENABLE_IPv6
- if (host->h_addrtype == AF_INET6)
- memcpy (&netaddr.ipv6.ip, host->h_addr, sizeof (netaddr.ipv6.ip));
- else
- memcpy (&netaddr.inet.ip, host->h_addr, sizeof (netaddr.inet.ip));
-#else
- memcpy (&netaddr.inet.ip, host->h_addr, sizeof (netaddr.inet.ip));
-#endif
-
- if (PR_InitializeNetAddr (PR_IpAddrNull, port, &netaddr) == PR_FAILURE) {
- set_errno (PR_GetError ());
- return -1;
- }
-
- fd = PR_OpenTCPSocket (host->h_addrtype);
- if (fd == NULL) {
- set_errno (PR_GetError ());
- return -1;
- }
-
- if (ssl->priv->ssl_mode) {
- PRFileDesc *ssl_fd;
-
- ssl_fd = enable_ssl (ssl, fd);
- if (ssl_fd == NULL) {
- int errnosave;
-
- set_errno (PR_GetError ());
- errnosave = errno;
- PR_Close (fd);
- errno = errnosave;
-
- return -1;
- }
-
- fd = ssl_fd;
- }
-
- if (PR_Connect (fd, &netaddr, timeout) == PR_FAILURE) {
- int errnosave;
-
- set_errno (PR_GetError ());
- if (errno == EINPROGRESS) {
- gboolean connected = FALSE;
- PRPollDesc poll;
-
- do {
- poll.fd = fd;
- poll.in_flags = PR_POLL_WRITE | PR_POLL_EXCEPT;
- poll.out_flags = 0;
-
- timeout = CONNECT_TIMEOUT;
-
- if (PR_Poll (&poll, 1, timeout) == PR_FAILURE) {
- set_errno (PR_GetError ());
- goto exception;
- }
-
- if (PR_GetConnectStatus (&poll) == PR_FAILURE) {
- set_errno (PR_GetError ());
- if (errno != EINPROGRESS)
- goto exception;
- } else {
- connected = TRUE;
- }
- } while (!connected);
- } else {
- exception:
- errnosave = errno;
- PR_Close (fd);
- ssl->priv->sockfd = NULL;
- errno = errnosave;
-
- return -1;
- }
-
- errno = 0;
- }
-
- ssl->priv->sockfd = 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 CamelTcpAddress *
-stream_get_local_address (CamelTcpStream *stream)
-{
- PRFileDesc *sockfd = CAMEL_TCP_STREAM_SSL (stream)->priv->sockfd;
- int family, length;
- gpointer address;
- PRNetAddr addr;
-
- PR_GetSockName (sockfd, &addr);
-
- if (addr.inet.family == PR_AF_INET) {
- family = CAMEL_TCP_ADDRESS_IPv4;
- address = &addr.inet.ip;
- length = 4;
-#ifdef ENABLE_IPv6
- } else if (addr.inet.family == PR_AF_INET6) {
- family = CAMEL_TCP_ADDRESS_IPv6;
- address = &addr.ipv6.ip;
- length = 16;
-#endif
- } else
- return NULL;
-
- return camel_tcp_address_new (family, addr.inet.port, length, address);
-}
-
-static CamelTcpAddress *
-stream_get_remote_address (CamelTcpStream *stream)
-{
- PRFileDesc *sockfd = CAMEL_TCP_STREAM_SSL (stream)->priv->sockfd;
- int family, length;
- gpointer address;
- PRNetAddr addr;
-
- PR_GetPeerName (sockfd, &addr);
-
- if (addr.inet.family == PR_AF_INET) {
- family = CAMEL_TCP_ADDRESS_IPv4;
- address = &addr.inet.ip;
- length = sizeof (addr.inet.ip);
-#ifdef ENABLE_IPv6
- } else if (addr.inet.family == PR_AF_INET6) {
- family = CAMEL_TCP_ADDRESS_IPv6;
- address = &addr.ipv6.ip;
- length = sizeof (addr.ipv6.ip);
-#endif
- } else
- return NULL;
-
- return camel_tcp_address_new (family, addr.inet.port, length, address);
-}
-
-#endif /* HAVE_NSS */
diff --git a/camel/camel-tcp-stream-ssl.h b/camel/camel-tcp-stream-ssl.h
deleted file mode 100644
index d11c2efdcb..0000000000
--- a/camel/camel-tcp-stream-ssl.h
+++ /dev/null
@@ -1,75 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_TCP_STREAM_SSL_H
-#define CAMEL_TCP_STREAM_SSL_H
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <camel/camel-tcp-stream.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 _CamelSession;
-
-enum {
- CAMEL_TCP_STREAM_SSL_ENABLE_SSL2 = (1 << 0),
- CAMEL_TCP_STREAM_SSL_ENABLE_SSL3 = (1 << 1),
- CAMEL_TCP_STREAM_SSL_ENABLE_TLS = (1 << 2),
-};
-
-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 (struct _CamelSession *session, const char *expected_host, guint32 flags);
-
-CamelStream *camel_tcp_stream_ssl_new_raw (struct _CamelSession *session, const char *expected_host, guint32 flags);
-
-int camel_tcp_stream_ssl_enable_ssl (CamelTcpStreamSSL *ssl);
-
-#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 fbbcbec451..0000000000
--- a/camel/camel-tcp-stream.c
+++ /dev/null
@@ -1,249 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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-tcp-stream.h"
-
-#define w(x)
-
-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 CamelTcpAddress *tcp_get_local_address (CamelTcpStream *stream);
-static CamelTcpAddress *tcp_get_remote_address (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_local_address = tcp_get_local_address;
- camel_tcp_stream_class->get_remote_address = tcp_get_remote_address;
-}
-
-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)
-{
- w(g_warning ("CamelTcpStream::connect called on default implementation"));
- 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)
-{
- w(g_warning ("CamelTcpStream::getsockopt called on default implementation"));
- 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)
-{
- w(g_warning ("CamelTcpStream::setsockopt called on default implementation"));
- 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 CamelTcpAddress *
-tcp_get_local_address (CamelTcpStream *stream)
-{
- w(g_warning ("CamelTcpStream::get_local_address called on default implementation"));
- return NULL;
-}
-
-/**
- * camel_tcp_stream_get_local_address:
- * @stream: tcp stream object
- *
- * Get the local address of @stream.
- *
- * Return value: the stream's local address (which must be freed with
- * camel_tcp_address_free()) if the stream is connected, or %NULL if not.
- **/
-CamelTcpAddress *
-camel_tcp_stream_get_local_address (CamelTcpStream *stream)
-{
- g_return_val_if_fail (CAMEL_IS_TCP_STREAM (stream), NULL);
-
- return CTS_CLASS (stream)->get_local_address (stream);
-}
-
-
-static CamelTcpAddress *
-tcp_get_remote_address (CamelTcpStream *stream)
-{
- w(g_warning ("CamelTcpStream::get_remote_address called on default implementation"));
- return NULL;
-}
-
-/**
- * camel_tcp_stream_get_remote_address:
- * @stream: tcp stream object
- *
- * Get the remote address of @stream.
- *
- * Return value: the stream's remote address (which must be freed with
- * camel_tcp_address_free()) if the stream is connected, or %NULL if not.
- **/
-CamelTcpAddress *
-camel_tcp_stream_get_remote_address (CamelTcpStream *stream)
-{
- g_return_val_if_fail (CAMEL_IS_TCP_STREAM (stream), NULL);
-
- return CTS_CLASS (stream)->get_remote_address (stream);
-}
-
-
-/**
- * camel_tcp_address_new:
- * @family: the address family
- * @port: the port number (in network byte order)
- * @length: the length of @address
- * @address: the address data (family dependent, in network byte order)
- *
- * Return value: a new CamelTcpAddress.
- **/
-CamelTcpAddress *
-camel_tcp_address_new (CamelTcpAddressFamily family, gushort port,
- gushort length, gpointer address)
-{
- CamelTcpAddress *addr;
-
- addr = g_malloc (sizeof (CamelTcpAddress) + length - 1);
- addr->family = family;
- addr->port = port;
- addr->length = length;
- memcpy (&addr->address, address, length);
-
- return addr;
-}
-
-
-/**
- * camel_tcp_address_free:
- * @address: the address
- *
- * Frees @address.
- **/
-void
-camel_tcp_address_free (CamelTcpAddress *address)
-{
- g_free (address);
-}
diff --git a/camel/camel-tcp-stream.h b/camel/camel-tcp-stream.h
deleted file mode 100644
index 9472da10ee..0000000000
--- a/camel/camel-tcp-stream.h
+++ /dev/null
@@ -1,140 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_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;
-
-typedef enum {
- CAMEL_TCP_ADDRESS_IPv4,
- CAMEL_TCP_ADDRESS_IPv6
-} CamelTcpAddressFamily;
-
-typedef struct {
- CamelTcpAddressFamily family;
- gushort port, length;
- guint8 address[1];
-} CamelTcpAddress;
-
-
-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);
-
- CamelTcpAddress * (*get_local_address) (CamelTcpStream *stream);
- CamelTcpAddress * (*get_remote_address) (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);
-
-CamelTcpAddress *camel_tcp_stream_get_local_address (CamelTcpStream *stream);
-CamelTcpAddress *camel_tcp_stream_get_remote_address (CamelTcpStream *stream);
-
-CamelTcpAddress *camel_tcp_address_new (CamelTcpAddressFamily family,
- gushort port, gushort length,
- gpointer address);
-void camel_tcp_address_free (CamelTcpAddress *address);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_TCP_STREAM_H */
diff --git a/camel/camel-text-index.c b/camel/camel-text-index.c
deleted file mode 100644
index 0e8b1ca96f..0000000000
--- a/camel/camel-text-index.c
+++ /dev/null
@@ -1,1948 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; fill-column: 160 -*- */
-/*
- * Copyright (C) 2001-2003 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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/types.h>
-#include <sys/stat.h>
-#include <sys/uio.h>
-#include <unistd.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <ctype.h>
-
-#include "e-util/e-msgport.h"
-#include "e-util/e-memory.h"
-
-#include "camel/camel-object.h"
-
-#include "camel-text-index.h"
-#include "camel-block-file.h"
-#include "camel-partition-table.h"
-
-#include <glib/gunicode.h>
-
-
-#define w(x)
-#define io(x)
-#define d(x) /*(printf("%s(%d):%s: ", __FILE__, __LINE__, __PRETTY_FUNCTION__),(x))*/
-
-/* cursor debug */
-#define c(x)
-
-#define CAMEL_TEXT_INDEX_MAX_WORDLEN (36)
-
-#define CAMEL_TEXT_INDEX_LOCK(kf, lock) (e_mutex_lock(((CamelTextIndex *)kf)->priv->lock))
-#define CAMEL_TEXT_INDEX_UNLOCK(kf, lock) (e_mutex_unlock(((CamelTextIndex *)kf)->priv->lock))
-
-static int text_index_compress_nosync(CamelIndex *idx);
-
-/* ********************************************************************** */
-
-/* "private" data, shared between index/cursor/name classes */
-typedef struct _CamelTextIndexNamePrivate CamelTextIndexNamePrivate;
-
-struct _CamelTextIndexNamePrivate {
- GString *buffer;
- camel_key_t nameid;
- EMemPool *pool;
-};
-
-CamelTextIndexName *camel_text_index_name_new(CamelTextIndex *idx, const char *name, camel_key_t nameid);
-
-/* ****************************** */
-
-typedef struct _CamelTextIndexCursorPrivate CamelTextIndexCursorPrivate;
-
-struct _CamelTextIndexCursorPrivate {
- camel_block_t first;
- camel_block_t next;
-
- int record_index;
-
- size_t record_count;
- camel_key_t *records;
-
- char *current;
-};
-
-CamelTextIndexCursor *camel_text_index_cursor_new(CamelTextIndex *idx, camel_block_t data);
-
-/* ****************************** */
-typedef struct _CamelTextIndexKeyCursorPrivate CamelTextIndexKeyCursorPrivate;
-
-struct _CamelTextIndexKeyCursorPrivate {
- CamelKeyTable *table;
-
- camel_key_t keyid;
- unsigned int flags;
- camel_block_t data;
- char *current;
-};
-
-CamelTextIndexKeyCursor *camel_text_index_key_cursor_new(CamelTextIndex *idx, CamelKeyTable *table);
-
-/* ********************************************************************** */
-
-#define CAMEL_TEXT_INDEX_VERSION "TEXT.000"
-#define CAMEL_TEXT_INDEX_KEY_VERSION "KEYS.000"
-
-struct _CamelTextIndexPrivate {
- CamelBlockFile *blocks;
- CamelKeyFile *links;
-
- CamelKeyTable *word_index;
- CamelPartitionTable *word_hash;
-
- CamelKeyTable *name_index;
- CamelPartitionTable *name_hash;
-
- /* Cache of words to write */
- int word_cache_limit;
- int word_cache_count;
- EDList word_cache;
- GHashTable *words;
- EMutex *lock;
-};
-
-/* Root block of text index */
-struct _CamelTextIndexRoot {
- struct _CamelBlockRoot root;
-
- /* FIXME: the index root could contain a pointer to the hash root */
- camel_block_t word_index_root; /* a keyindex containing the keyid -> word mapping */
- camel_block_t word_hash_root; /* a partitionindex containing word -> keyid mapping */
-
- camel_block_t name_index_root; /* same, for names */
- camel_block_t name_hash_root;
-
- guint32 words; /* total words */
- guint32 names; /* total names */
- guint32 deleted; /* deleted names */
- guint32 keys; /* total key 'chunks' written, used with deleted to determine fragmentation */
-};
-
-struct _CamelTextIndexWord {
- struct _CamelTextIndexWord *next;
- struct _CamelTextIndexWord *prev;
-
- camel_block_t data; /* where the data starts */
- camel_key_t wordid;
- char *word;
- unsigned int used;
- camel_key_t names[32];
-};
-
-#define CTI_PRIVATE(o) (((CamelTextIndex *)(o))->priv)
-
-#define CI_CLASS(o) ((CamelTextIndexClass *)(((CamelObject *)o)->classfuncs))
-
-/* ********************************************************************** */
-/* CamelTextIndex */
-/* ********************************************************************** */
-
-static CamelObjectClass *camel_text_index_parent;
-
-/* call locked */
-static void
-text_index_add_name_to_word(CamelIndex *idx, const char *word, camel_key_t nameid)
-{
- struct _CamelTextIndexWord *w, *wp, *ww;
- struct _CamelTextIndexPrivate *p = CTI_PRIVATE(idx);
- camel_key_t wordid;
- camel_block_t data;
- struct _CamelTextIndexRoot *rb = (struct _CamelTextIndexRoot *)p->blocks->root;
-
- w = g_hash_table_lookup(p->words, word);
- if (w == NULL) {
- wordid = camel_partition_table_lookup(p->word_hash, word);
- if (wordid == 0) {
- data = 0;
- wordid = camel_key_table_add(p->word_index, word, 0, 0);
- if (wordid == 0){
- g_warning ("Could not create key entry for word '%s': %s\n",
- word, strerror (errno));
- return;
- }
- if (camel_partition_table_add(p->word_hash, word, wordid) == -1) {
- g_warning ("Could not create hash entry for word '%s': %s\n",
- word, strerror (errno));
- return;
- }
- rb->words++;
- camel_block_file_touch_block(p->blocks, p->blocks->root_block);
- } else {
- data = camel_key_table_lookup(p->word_index, wordid, NULL, 0);
- if (data == 0) {
- g_warning ("Could not find key entry for word '%s': %s\n",
- word, strerror (errno));
- return;
- }
- }
-
- w = g_malloc0(sizeof(*w));
- w->word = g_strdup(word);
- w->wordid = wordid;
- w->used = 1;
- w->data = data;
-
- w->names[0] = nameid;
- g_hash_table_insert(p->words, w->word, w);
- e_dlist_addhead(&p->word_cache, (EDListNode *)w);
- p->word_cache_count++;
- ww = (struct _CamelTextIndexWord *)p->word_cache.tailpred;
- wp = ww->prev;
- while (wp && p->word_cache_count > p->word_cache_limit) {
- io(printf("writing key file entry '%s' [%x]\n", ww->word, ww->data));
- if (camel_key_file_write(p->links, &ww->data, ww->used, ww->names) != -1) {
- io(printf(" new data [%x]\n", ww->data));
- rb->keys++;
- camel_block_file_touch_block(p->blocks, p->blocks->root_block);
- /* if this call fails - we still point to the old data - not fatal */
- camel_key_table_set_data(p->word_index, ww->wordid, ww->data);
- e_dlist_remove((EDListNode *)ww);
- g_hash_table_remove(p->words, ww->word);
- g_free(ww->word);
- g_free(ww);
- p->word_cache_count--;
- }
- ww = wp;
- wp = wp->prev;
- }
- } else {
- e_dlist_remove((EDListNode *)w);
- e_dlist_addhead(&p->word_cache, (EDListNode *)w);
- w->names[w->used] = nameid;
- w->used++;
- if (w->used == sizeof(w->names)/sizeof(w->names[0])) {
- io(printf("writing key file entry '%s' [%x]\n", w->word, w->data));
- if (camel_key_file_write(p->links, &w->data, w->used, w->names) != -1) {
- rb->keys++;
- camel_block_file_touch_block(p->blocks, p->blocks->root_block);
- /* if this call fails - we still point to the old data - not fatal */
- camel_key_table_set_data(p->word_index, w->wordid, w->data);
- }
- /* FIXME: what to on error? lost data? */
- w->used = 0;
- }
- }
-}
-
-static int
-text_index_sync(CamelIndex *idx)
-{
- struct _CamelTextIndexPrivate *p = CTI_PRIVATE(idx);
- struct _CamelTextIndexWord *ww;
- struct _CamelTextIndexRoot *rb;
- int ret = 0, wfrag, nfrag, work = FALSE;
-
- d(printf("sync: blocks = %p\n", p->blocks));
-
- if (p->blocks == NULL)
- return 0;
-
- rb = (struct _CamelTextIndexRoot *)p->blocks->root;
-
- /* sync/flush word cache */
-
- CAMEL_TEXT_INDEX_LOCK(idx, lock);
-
- /* we sync, bump down the cache limits since we dont need them for reading */
- p->blocks->block_cache_limit = 128;
- /* this doesn't really need to be dropped, its only used in updates anyway */
- p->word_cache_limit = 1024;
-
- work = !e_dlist_empty(&p->word_cache);
-
- while ( (ww = (struct _CamelTextIndexWord *)e_dlist_remhead(&p->word_cache)) ) {
- if (ww->used > 0) {
- io(printf("writing key file entry '%s' [%x]\n", ww->word, ww->data));
- if (camel_key_file_write(p->links, &ww->data, ww->used, ww->names) != -1) {
- io(printf(" new data [%x]\n", ww->data));
- rb->keys++;
- camel_block_file_touch_block(p->blocks, p->blocks->root_block);
- camel_key_table_set_data(p->word_index, ww->wordid, ww->data);
- } else {
- ret = -1;
- }
- ww->used = 0;
- }
- g_hash_table_remove(p->words, ww->word);
- g_free(ww->word);
- g_free(ww);
- }
-
- if (camel_key_table_sync(p->word_index) == -1
- || camel_key_table_sync(p->name_index) == -1
- || camel_partition_table_sync(p->word_hash) == -1
- || camel_partition_table_sync(p->name_hash) == -1)
- ret = -1;
-
- /* only do the frag/compress check if we did some new writes on this index */
- wfrag = rb->words ? (((rb->keys - rb->words) * 100)/ rb->words) : 0;
- nfrag = rb->names ? ((rb->deleted * 100) / rb->names) : 0;
- d(printf("wfrag = %d, nfrag = %d, work = %s, ret = %d\n", wfrag, nfrag, work?"true":"false", ret));
- d(printf(" words = %d, keys = %d\n", rb->words, rb->keys));
-
- if (ret == 0) {
- if (wfrag > 30 || nfrag > 20)
- ret = text_index_compress_nosync(idx);
- }
-
- ret = camel_block_file_sync(p->blocks);
-
- CAMEL_TEXT_INDEX_UNLOCK(idx, lock);
-
- return ret;
-}
-
-static void tmp_name(const char *in, char *o)
-{
- char *s;
-
- s = strrchr(in, '/');
- if (s) {
- memcpy(o, in, s-in+1);
- memcpy(o+(s-in+1), ".#", 2);
- strcpy(o+(s-in+3), s+1);
- } else {
- sprintf(o, ".#%s", in);
- }
-}
-
-static int
-text_index_compress(CamelIndex *idx)
-{
- int ret;
-
- CAMEL_TEXT_INDEX_LOCK(idx, lock);
-
- ret = camel_index_sync(idx);
- if (ret != -1)
- ret = text_index_compress_nosync(idx);
-
- CAMEL_TEXT_INDEX_UNLOCK(idx, lock);
-
- return ret;
-}
-
-/* Attempt to recover index space by compressing the indices */
-static int
-text_index_compress_nosync(CamelIndex *idx)
-{
- CamelTextIndex *newidx;
- struct _CamelTextIndexPrivate *newp, *oldp;
- camel_key_t oldkeyid, newkeyid;
- GHashTable *remap;
- unsigned int deleted;
- camel_block_t data, newdata;
- int i, ret = -1;
- char *name = NULL;
- unsigned int flags;
- char *newpath, *savepath, *oldpath;
- size_t count, newcount;
- camel_key_t *records, newrecords[256];
- struct _CamelTextIndexRoot *rb;
-
- i = strlen(idx->path)+16;
- oldpath = alloca(i);
- newpath = alloca(i);
- savepath = alloca(i);
-
- strcpy(oldpath, idx->path);
- oldpath[strlen(oldpath)-strlen(".index")] = 0;
-
- tmp_name(oldpath, newpath);
- sprintf(savepath, "%s~", oldpath);
-
- d(printf("Old index: %s\n", idx->path));
- d(printf("Old path: %s\n", oldpath));
- d(printf("New: %s\n", newpath));
- d(printf("Save: %s\n", savepath));
-
- newidx = camel_text_index_new(newpath, O_RDWR|O_CREAT);
- if (newidx == NULL)
- return -1;
-
- newp = CTI_PRIVATE(newidx);
- oldp = CTI_PRIVATE(idx);
-
- CAMEL_TEXT_INDEX_LOCK(idx, lock);
-
- rb = (struct _CamelTextIndexRoot *)newp->blocks->root;
-
- rb->words = 0;
- rb->names = 0;
- rb->deleted = 0;
- rb->keys = 0;
-
- /* Process:
- For each name we still have:
- Add it to the new index & setup remap table
-
- For each word:
- Copy word's data to a new file
- Add new word to index(*) (can we just copy blocks?) */
-
- /* Copy undeleted names to new index file, creating new indices */
- io(printf("Copying undeleted names to new file\n"));
- remap = g_hash_table_new(NULL, NULL);
- oldkeyid = 0;
- deleted = 0;
- while ( (oldkeyid = camel_key_table_next(oldp->name_index, oldkeyid, &name, &flags, &data)) ) {
- if ((flags&1) == 0) {
- io(printf("copying name '%s'\n", name));
- newkeyid = camel_key_table_add(newp->name_index, name, data, flags);
- if (newkeyid == 0)
- goto fail;
- rb->names++;
- camel_partition_table_add(newp->name_hash, name, newkeyid);
- g_hash_table_insert(remap, GINT_TO_POINTER(oldkeyid), GINT_TO_POINTER(newkeyid));
- } else
- io(printf("deleted name '%s'\n", name));
- g_free(name);
- name = NULL;
- deleted |= flags;
- }
-
- /* Copy word data across, remapping/deleting and create new index for it */
- /* We re-block the data into 256 entry lots while we're at it, since we only
- have to do 1 at a time and its cheap */
- oldkeyid = 0;
- while ( (oldkeyid = camel_key_table_next(oldp->word_index, oldkeyid, &name, &flags, &data)) ) {
- io(printf("copying word '%s'\n", name));
- newdata = 0;
- newcount = 0;
- if (data) {
- rb->words++;
- rb->keys++;
- }
- while (data) {
- if (camel_key_file_read(oldp->links, &data, &count, &records) == -1) {
- io(printf("could not read from old keys at %d for word '%s'\n", (int)data, name));
- goto fail;
- }
- for (i=0;i<count;i++) {
- newkeyid = (camel_key_t)GPOINTER_TO_INT(g_hash_table_lookup(remap, GINT_TO_POINTER(records[i])));
- if (newkeyid) {
- newrecords[newcount++] = newkeyid;
- if (newcount == sizeof(newrecords)/sizeof(newrecords[0])) {
- if (camel_key_file_write(newp->links, &newdata, newcount, newrecords) == -1) {
- g_free(records);
- goto fail;
- }
- newcount = 0;
- }
- }
- }
- g_free(records);
- }
-
- if (newcount > 0) {
- if (camel_key_file_write(newp->links, &newdata, newcount, newrecords) == -1)
- goto fail;
- }
-
- if (newdata != 0) {
- newkeyid = camel_key_table_add(newp->word_index, name, newdata, flags);
- if (newkeyid == 0)
- goto fail;
- camel_partition_table_add(newp->word_hash, name, newkeyid);
- }
- g_free(name);
- name = NULL;
- }
-
- camel_block_file_touch_block(newp->blocks, newp->blocks->root_block);
-
- if (camel_index_sync((CamelIndex *)newidx) == -1)
- goto fail;
-
- /* Rename underlying files to match */
- ret = camel_index_rename(idx, savepath);
- if (ret == -1)
- goto fail;
-
- /* If this fails, we'll pick up something during restart? */
- ret = camel_index_rename((CamelIndex *)newidx, oldpath);
-
-#define myswap(a, b) { void *tmp = a; a = b; b = tmp; }
- /* Poke the private data across to the new object */
- /* And change the fd's over, etc? */
- /* Yes: This is a hack */
- myswap(newp->blocks, oldp->blocks);
- myswap(newp->links, oldp->links);
- myswap(newp->word_index, oldp->word_index);
- myswap(newp->word_hash, oldp->word_hash);
- myswap(newp->name_index, oldp->name_index);
- myswap(newp->name_hash, oldp->name_hash);
- myswap(((CamelIndex *)newidx)->path, ((CamelIndex *)idx)->path);
-#undef myswap
-
- ret = 0;
-fail:
- CAMEL_TEXT_INDEX_UNLOCK(idx, lock);
-
- camel_index_delete((CamelIndex *)newidx);
-
- camel_object_unref((CamelObject *)newidx);
- g_free(name);
- g_hash_table_destroy(remap);
-
- /* clean up temp files always */
- sprintf(savepath, "%s~.index", oldpath);
- unlink(savepath);
- sprintf(newpath, "%s.data", savepath);
- unlink(newpath);
-
- return ret;
-}
-
-static int
-text_index_delete(CamelIndex *idx)
-{
- struct _CamelTextIndexPrivate *p = CTI_PRIVATE(idx);
- int ret = 0;
-
- if (camel_block_file_delete(p->blocks) == -1)
- ret = -1;
- if (camel_key_file_delete(p->links) == -1)
- ret = -1;
-
- return ret;
-}
-
-static int
-text_index_rename(CamelIndex *idx, const char *path)
-{
- struct _CamelTextIndexPrivate *p = CTI_PRIVATE(idx);
- char *newlink, *newblock;
- int err, ret;
-
- CAMEL_TEXT_INDEX_LOCK(idx, lock);
-
- newblock = alloca(strlen(path)+8);
- sprintf(newblock, "%s.index", path);
- ret = camel_block_file_rename(p->blocks, newblock);
- if (ret == -1) {
- CAMEL_TEXT_INDEX_UNLOCK(idx, lock);
- return -1;
- }
-
- newlink = alloca(strlen(path)+16);
- sprintf(newlink, "%s.index.data", path);
- ret = camel_key_file_rename(p->links, newlink);
- if (ret == -1) {
- err = errno;
- camel_block_file_rename(p->blocks, idx->path);
- CAMEL_TEXT_INDEX_UNLOCK(idx, lock);
- errno = err;
- return -1;
- }
-
- g_free(idx->path);
- idx->path = g_strdup(newblock);
-
- CAMEL_TEXT_INDEX_UNLOCK(idx, lock);
-
- return 0;
-}
-
-static int
-text_index_has_name(CamelIndex *idx, const char *name)
-{
- struct _CamelTextIndexPrivate *p = CTI_PRIVATE(idx);
-
- return camel_partition_table_lookup(p->name_hash, name) != 0;
-}
-
-static CamelIndexName *
-text_index_add_name(CamelIndex *idx, const char *name)
-{
- struct _CamelTextIndexPrivate *p = CTI_PRIVATE(idx);
- camel_key_t keyid;
- CamelIndexName *idn;
- struct _CamelTextIndexRoot *rb = (struct _CamelTextIndexRoot *)p->blocks->root;
-
- CAMEL_TEXT_INDEX_LOCK(idx, lock);
-
- /* if we're adding words, up the cache limits a lot */
- if (p->blocks) {
- p->blocks->block_cache_limit = 1024;
- p->word_cache_limit = 8192;
- }
-
- /* If we have it already replace it */
- keyid = camel_partition_table_lookup(p->name_hash, name);
- if (keyid != 0) {
- /* TODO: We could just update the partition table's
- key pointer rather than having to delete it */
- rb->deleted++;
- camel_key_table_set_flags(p->name_index, keyid, 1, 1);
- camel_partition_table_remove(p->name_hash, name);
- }
-
- keyid = camel_key_table_add(p->name_index, name, 0, 0);
- if (keyid != 0) {
- camel_partition_table_add(p->name_hash, name, keyid);
- rb->names++;
- }
-
- camel_block_file_touch_block(p->blocks, p->blocks->root_block);
-
- /* TODO: if keyid == 0, we had a failure, we should somehow flag that, but for
- now just return a valid object but discard its results, see text_index_write_name */
-
- CAMEL_TEXT_INDEX_UNLOCK(idx, lock);
-
- idn = (CamelIndexName *)camel_text_index_name_new((CamelTextIndex *)idx, name, keyid);
-
- return idn;
-}
-
-/* call locked */
-static void
-hash_write_word(char *word, void *data, CamelIndexName *idn)
-{
- CamelTextIndexName *tin = (CamelTextIndexName *)idn;
-
- text_index_add_name_to_word(idn->index, word, tin->priv->nameid);
-}
-
-static int
-text_index_write_name(CamelIndex *idx, CamelIndexName *idn)
-{
- /* force 'flush' of any outstanding data */
- camel_index_name_add_buffer(idn, NULL, 0);
-
- /* see text_index_add_name for when this can be 0 */
- if (((CamelTextIndexName *)idn)->priv->nameid != 0) {
- CAMEL_TEXT_INDEX_LOCK(idx, lock);
-
- g_hash_table_foreach(idn->words, (GHFunc)hash_write_word, idn);
-
- CAMEL_TEXT_INDEX_UNLOCK(idx, lock);
- }
-
- return 0;
-}
-
-static CamelIndexCursor *
-text_index_find_name(CamelIndex *idx, const char *name)
-{
- /* what was this for, umm */
- return NULL;
-}
-
-static void
-text_index_delete_name(CamelIndex *idx, const char *name)
-{
- struct _CamelTextIndexPrivate *p = CTI_PRIVATE(idx);
- camel_key_t keyid;
- struct _CamelTextIndexRoot *rb = (struct _CamelTextIndexRoot *)p->blocks->root;
-
- d(printf("Delete name: %s\n", name));
-
- /* probably doesn't really need locking, but oh well */
- CAMEL_TEXT_INDEX_LOCK(idx, lock);
-
- /* We just mark the key deleted, and remove it from the hash table */
- keyid = camel_partition_table_lookup(p->name_hash, name);
- if (keyid != 0) {
- rb->deleted++;
- camel_block_file_touch_block(p->blocks, p->blocks->root_block);
- camel_key_table_set_flags(p->name_index, keyid, 1, 1);
- camel_partition_table_remove(p->name_hash, name);
- }
-
- CAMEL_TEXT_INDEX_UNLOCK(idx, lock);
-}
-
-static CamelIndexCursor *
-text_index_find(CamelIndex *idx, const char *word)
-{
- struct _CamelTextIndexPrivate *p = CTI_PRIVATE(idx);
- camel_key_t keyid;
- camel_block_t data = 0;
- unsigned int flags;
- CamelIndexCursor *idc;
-
- CAMEL_TEXT_INDEX_LOCK(idx, lock);
-
- keyid = camel_partition_table_lookup(p->word_hash, word);
- if (keyid != 0) {
- data = camel_key_table_lookup(p->word_index, keyid, NULL, &flags);
- if (flags & 1)
- data = 0;
- }
-
- CAMEL_TEXT_INDEX_UNLOCK(idx, lock);
-
- idc = (CamelIndexCursor *)camel_text_index_cursor_new((CamelTextIndex *)idx, data);
-
- return idc;
-}
-
-static CamelIndexCursor *
-text_index_words(CamelIndex *idx)
-{
- struct _CamelTextIndexPrivate *p = CTI_PRIVATE(idx);
-
- return (CamelIndexCursor *)camel_text_index_key_cursor_new((CamelTextIndex *)idx, p->word_index);
-}
-
-static CamelIndexCursor *
-text_index_names(CamelIndex *idx)
-{
- struct _CamelTextIndexPrivate *p = CTI_PRIVATE(idx);
-
- return (CamelIndexCursor *)camel_text_index_key_cursor_new((CamelTextIndex *)idx, p->name_index);
-}
-
-static void
-camel_text_index_class_init(CamelTextIndexClass *klass)
-{
- CamelIndexClass *iklass = (CamelIndexClass *)klass;
-
- camel_text_index_parent = CAMEL_OBJECT_CLASS(camel_type_get_global_classfuncs(camel_object_get_type()));
-
- iklass->sync = text_index_sync;
- iklass->compress = text_index_compress;
- iklass->delete = text_index_delete;
-
- iklass->rename = text_index_rename;
-
- iklass->has_name = text_index_has_name;
- iklass->add_name = text_index_add_name;
- iklass->write_name = text_index_write_name;
- iklass->find_name = text_index_find_name;
- iklass->delete_name = text_index_delete_name;
- iklass->find = text_index_find;
-
- iklass->words = text_index_words;
- iklass->names = text_index_names;
-}
-
-static void
-camel_text_index_init(CamelTextIndex *idx)
-{
- struct _CamelTextIndexPrivate *p;
-
- p = CTI_PRIVATE(idx) = g_malloc0(sizeof(*p));
-
- e_dlist_init(&p->word_cache);
- p->words = g_hash_table_new(g_str_hash, g_str_equal);
- p->word_cache_count = 0;
- /* this cache size and the block cache size have been tuned for about the best
- with moderate memory usage. Doubling the memory usage barely affects performance. */
- p->word_cache_limit = 4096; /* 1024 = 128K */
-
- p->lock = e_mutex_new(E_MUTEX_REC);
-}
-
-static void
-camel_text_index_finalise(CamelTextIndex *idx)
-{
- struct _CamelTextIndexPrivate *p = CTI_PRIVATE(idx);
-
- camel_index_sync((CamelIndex *)idx);
-
- g_assert(e_dlist_empty(&p->word_cache));
- g_assert(g_hash_table_size(p->words) == 0);
-
- g_hash_table_destroy(p->words);
-
- if (p->word_index)
- camel_object_unref((CamelObject *)p->word_index);
- if (p->word_hash)
- camel_object_unref((CamelObject *)p->word_hash);
- if (p->name_index)
- camel_object_unref((CamelObject *)p->name_index);
- if (p->name_hash)
- camel_object_unref((CamelObject *)p->name_hash);
-
- if (p->blocks)
- camel_object_unref((CamelObject *)p->blocks);
- if (p->links)
- camel_object_unref((CamelObject *)p->links);
-
- e_mutex_destroy(p->lock);
-
- g_free(p);
-}
-
-CamelType
-camel_text_index_get_type(void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register(camel_index_get_type(), "CamelTextIndex",
- sizeof (CamelTextIndex),
- sizeof (CamelTextIndexClass),
- (CamelObjectClassInitFunc) camel_text_index_class_init,
- NULL,
- (CamelObjectInitFunc) camel_text_index_init,
- (CamelObjectFinalizeFunc) camel_text_index_finalise);
- }
-
- return type;
-}
-
-static char *
-text_index_normalise(CamelIndex *idx, const char *in, void *data)
-{
- char *word;
-
- /* Sigh, this is really expensive */
- /*g_utf8_normalize(in, strlen(in), G_NORMALIZE_ALL);*/
- word = g_utf8_strdown(in, -1);
-
- return word;
-}
-
-CamelTextIndex *
-camel_text_index_new(const char *path, int flags)
-{
- CamelTextIndex *idx = (CamelTextIndex *)camel_object_new(camel_text_index_get_type());
- struct _CamelTextIndexPrivate *p = CTI_PRIVATE(idx);
- struct _CamelTextIndexRoot *rb;
- char *link;
- CamelBlock *bl;
-
- camel_index_construct((CamelIndex *)idx, path, flags);
- camel_index_set_normalise((CamelIndex *)idx, text_index_normalise, NULL);
-
- p->blocks = camel_block_file_new(idx->parent.path, flags, CAMEL_TEXT_INDEX_VERSION, CAMEL_BLOCK_SIZE);
- link = alloca(strlen(idx->parent.path)+7);
- sprintf(link, "%s.data", idx->parent.path);
- p->links = camel_key_file_new(link, flags, CAMEL_TEXT_INDEX_KEY_VERSION);
-
- if (p->blocks == NULL || p->links == NULL) {
- camel_object_unref((CamelObject *)idx);
- return NULL;
- }
-
- rb = (struct _CamelTextIndexRoot *)p->blocks->root;
-
- if (rb->word_index_root == 0) {
- bl = camel_block_file_new_block(p->blocks);
- rb->word_index_root = bl->id;
- camel_block_file_unref_block(p->blocks, bl);
- camel_block_file_touch_block(p->blocks, p->blocks->root_block);
- }
-
- if (rb->word_hash_root == 0) {
- bl = camel_block_file_new_block(p->blocks);
- rb->word_hash_root = bl->id;
- camel_block_file_unref_block(p->blocks, bl);
- camel_block_file_touch_block(p->blocks, p->blocks->root_block);
- }
-
- if (rb->name_index_root == 0) {
- bl = camel_block_file_new_block(p->blocks);
- rb->name_index_root = bl->id;
- camel_block_file_unref_block(p->blocks, bl);
- camel_block_file_touch_block(p->blocks, p->blocks->root_block);
- }
-
- if (rb->name_hash_root == 0) {
- bl = camel_block_file_new_block(p->blocks);
- rb->name_hash_root = bl->id;
- camel_block_file_unref_block(p->blocks, bl);
- camel_block_file_touch_block(p->blocks, p->blocks->root_block);
- }
-
- p->word_index = camel_key_table_new(p->blocks, rb->word_index_root);
- p->word_hash = camel_partition_table_new(p->blocks, rb->word_hash_root);
- p->name_index = camel_key_table_new(p->blocks, rb->name_index_root);
- p->name_hash = camel_partition_table_new(p->blocks, rb->name_hash_root);
-
- if (p->word_index == NULL || p->word_hash == NULL
- || p->name_index == NULL || p->name_hash == NULL) {
- camel_object_unref((CamelObject *)idx);
- idx = NULL;
- }
-
- return idx;
-}
-
-/* returns 0 if the index exists, is valid, and synced, -1 otherwise */
-int
-camel_text_index_check(const char *path)
-{
- char *block, *key;
- CamelBlockFile *blocks;
- CamelKeyFile *keys;
-
- block = alloca(strlen(path)+7);
- sprintf(block, "%s.index", path);
- blocks = camel_block_file_new(block, O_RDONLY, CAMEL_TEXT_INDEX_VERSION, CAMEL_BLOCK_SIZE);
- if (blocks == NULL) {
- io(printf("Check failed: No block file: %s\n", strerror (errno)));
- return -1;
- }
- key = alloca(strlen(path)+12);
- sprintf(key, "%s.index.data", path);
- keys = camel_key_file_new(key, O_RDONLY, CAMEL_TEXT_INDEX_KEY_VERSION);
- if (keys == NULL) {
- io(printf("Check failed: No key file: %s\n", strerror (errno)));
- camel_object_unref((CamelObject *)blocks);
- return -1;
- }
-
- camel_object_unref((CamelObject *)keys);
- camel_object_unref((CamelObject *)blocks);
-
- return 0;
-}
-
-int
-camel_text_index_rename(const char *old, const char *new)
-{
- char *oldname, *newname;
- int err;
-
- /* TODO: camel_text_index_rename should find out if we have an active index and use that instead */
-
- oldname = alloca(strlen(old)+12);
- newname = alloca(strlen(new)+12);
- sprintf(oldname, "%s.index", old);
- sprintf(newname, "%s.index", new);
-
- if (rename(oldname, newname) == -1 && errno != ENOENT)
- return -1;
-
- sprintf(oldname, "%s.index.data", old);
- sprintf(newname, "%s.index.data", new);
-
- if (rename(oldname, newname) == -1 && errno != ENOENT) {
- err = errno;
- sprintf(oldname, "%s.index", old);
- sprintf(newname, "%s.index", new);
- rename(newname, oldname);
- errno = err;
- return -1;
- }
-
- return 0;
-}
-
-int
-camel_text_index_remove(const char *old)
-{
- char *block, *key;
- int ret = 0;
-
- /* TODO: needs to poke any active indices to remain unlinked */
-
- block = alloca(strlen(old)+12);
- key = alloca(strlen(old)+12);
- sprintf(block, "%s.index", old);
- sprintf(key, "%s.index.data", old);
-
- if (unlink(block) == -1 && errno != ENOENT)
- ret = -1;
- if (unlink(key) == -1 && errno != ENOENT)
- ret = -1;
-
- return ret;
-}
-
-/* Debug */
-void
-camel_text_index_info(CamelTextIndex *idx)
-{
- struct _CamelTextIndexPrivate *p = CTI_PRIVATE(idx);
- struct _CamelTextIndexRoot *rb = (struct _CamelTextIndexRoot *)p->blocks->root;
- int frag;
-
- printf("Path: '%s'\n", idx->parent.path);
- printf("Version: %d\n", idx->parent.version);
- printf("Flags: %08x\n", idx->parent.flags);
- printf("Total words: %d\n", rb->words);
- printf("Total names: %d\n", rb->names);
- printf("Total deleted: %d\n", rb->deleted);
- printf("Total key blocks: %d\n", rb->keys);
-
- if (rb->words > 0) {
- frag = ((rb->keys - rb->words) * 100)/ rb->words;
- printf("Word fragmentation: %d%%\n", frag);
- }
-
- if (rb->names > 0) {
- frag = (rb->deleted * 100)/ rb->names;
- printf("Name fragmentation: %d%%\n", frag);
- }
-}
-
-/* #define DUMP_RAW */
-
-#ifdef DUMP_RAW
-enum { KEY_ROOT = 1, KEY_DATA = 2, PARTITION_MAP = 4, PARTITION_DATA = 8 };
-
-static void
-add_type(GHashTable *map, camel_block_t id, int type)
-{
- camel_block_t old;
-
- old = g_hash_table_lookup(map, id);
- if (old == type)
- return;
-
- if (old != 0 && old != type)
- g_warning("block %x redefined as type %d, already type %d\n", id, type, old);
- g_hash_table_insert(map, id, type|old);
-}
-
-static void
-add_partition(GHashTable *map, CamelBlockFile *blocks, camel_block_t id)
-{
- CamelBlock *bl;
- CamelPartitionMapBlock *pm;
- int i;
-
- while (id) {
- add_type(map, id, PARTITION_MAP);
- bl = camel_block_file_get_block(blocks, id);
- if (bl == NULL) {
- g_warning("couldn't get parition: %x\n", id);
- return;
- }
-
- pm = (CamelPartitionMapBlock *)&bl->data;
- if (pm->used > sizeof(pm->partition)/sizeof(pm->partition[0])) {
- g_warning("Partition block %x invalid\n", id);
- camel_block_file_unref_block(blocks, bl);
- return;
- }
-
- for (i=0;i<pm->used;i++)
- add_type(map, pm->partition[i].blockid, PARTITION_DATA);
-
- id = pm->next;
- camel_block_file_unref_block(blocks, bl);
- }
-}
-
-static void
-add_keys(GHashTable *map, CamelBlockFile *blocks, camel_block_t id)
-{
- CamelBlock *rbl, *bl;
- CamelKeyRootBlock *root;
- CamelKeyBlock *kb;
-
- add_type(map, id, KEY_ROOT);
- rbl = camel_block_file_get_block(blocks, id);
- if (rbl == NULL) {
- g_warning("couldn't get key root: %x\n", id);
- return;
- }
- root = (CamelKeyRootBlock *)&rbl->data;
- id = root->first;
-
- while (id) {
- add_type(map, id, KEY_DATA);
- bl = camel_block_file_get_block(blocks, id);
- if (bl == NULL) {
- g_warning("couldn't get key: %x\n", id);
- break;
- }
-
- kb = (CamelKeyBlock *)&bl->data;
- id = kb->next;
- camel_block_file_unref_block(blocks, bl);
- }
-
- camel_block_file_unref_block(blocks, rbl);
-}
-
-static void
-dump_raw(GHashTable *map, char *path)
-{
- char buf[1024];
- char line[256];
- char *p, c, *e, *a, *o;
- int v, n, len, i, type;
- char hex[16] = "0123456789ABCDEF";
- int fd;
- camel_block_t id, total;
-
- fd = open(path, O_RDONLY);
- if (fd == -1)
- return;
-
- total = 0;
- while ((len = read(fd, buf, 1024)) == 1024) {
- id = total;
-
-
-
- type = g_hash_table_lookup(map, id);
- switch(type) {
- case 0:
- printf(" - unknown -\n");
- break;
- default:
- printf(" - invalid -\n");
- break;
- case KEY_ROOT: {
- CamelKeyRootBlock *r = (CamelKeyRootBlock *)buf;
- printf("Key root:\n");
- printf("First: %08x Last: %08x Free: %08x\n", r->first, r->last, r->free);
- } break;
- case KEY_DATA: {
- CamelKeyBlock *k = (CamelKeyBlock *)buf;
- printf("Key data:\n");
- printf("Next: %08x Used: %u\n", k->next, k->used);
- for (i=0;i<k->used;i++) {
- if (i == 0)
- len = sizeof(k->u.keydata);
- else
- len = k->u.keys[i-1].offset;
- len -= k->u.keys[i].offset;
- printf("[%03d]: %08x %5d %06x %3d '%.*s'\n", i,
- k->u.keys[i].data, k->u.keys[i].offset, k->u.keys[i].flags,
- len, len, k->u.keydata+k->u.keys[i].offset);
- }
- } break;
- case PARTITION_MAP: {
- CamelPartitionMapBlock *m = (CamelPartitionMapBlock *)buf;
- printf("Partition map\n");
- printf("Next: %08x Used: %u\n", m->next, m->used);
- for (i=0;i<m->used;i++) {
- printf("[%03d]: %08x -> %08x\n", i, m->partition[i].hashid, m->partition[i].blockid);
- }
- } break;
- case PARTITION_DATA: {
- CamelPartitionKeyBlock *k = (CamelPartitionKeyBlock *)buf;
- printf("Partition data\n");
- printf("Used: %u\n", k->used);
- } break;
- }
-
-
- printf("--raw--\n");
-
- len = 1024;
- p = buf;
- do {
- sprintf(line, "%08x: ", total);
- total += 16;
- o = line+10;
- a = o+16*2+2;
- i = 0;
- while (len && i<16) {
- c = *p++;
- *a++ = isprint(c)?c:'.';
- *o++ = hex[(c>>4)&0x0f];
- *o++ = hex[c&0x0f];
- i++;
- if (i==8)
- *o++ = ' ';
- len--;
- }
- *a = 0;
- printf("%s\n", line);
- } while (len);
- printf("\n");
- }
-}
-#endif
-
-/* Debug */
-void
-camel_text_index_dump(CamelTextIndex *idx)
-{
- struct _CamelTextIndexPrivate *p = CTI_PRIVATE(idx);
-#ifndef DUMP_RAW
- camel_key_t keyid;
- char *word;
- const char *name;
- unsigned int flags;
- camel_block_t data;
-
- /* Iterate over all names in the file first */
-
- printf("UID's in index\n");
-
- keyid = 0;
- while ( (keyid = camel_key_table_next(p->name_index, keyid, &word, &flags, &data)) ) {
- if ((flags & 1) == 0)
- printf(" %s\n", word);
- else
- printf(" %s (deleted)\n", word);
- g_free(word);
- }
-
- printf("Word's in index\n");
-
- keyid = 0;
- while ( (keyid = camel_key_table_next(p->word_index, keyid, &word, &flags, &data)) ) {
- CamelIndexCursor *idc;
-
- printf("Word: '%s':\n", word);
-
- idc = camel_index_find((CamelIndex *)idx, word);
- while ( (name = camel_index_cursor_next(idc)) ) {
- printf(" %s", name);
- }
- printf("\n");
- camel_object_unref((CamelObject *)idc);
- g_free(word);
- }
-#else
- /* a more low-level dump routine */
- GHashTable *block_type = g_hash_table_new(NULL, NULL);
- camel_block_t id;
- struct stat st;
- int type;
-
- add_keys(block_type, p->blocks, p->word_index->rootid);
- add_keys(block_type, p->blocks, p->name_index->rootid);
-
- add_partition(block_type, p->blocks, p->word_hash->rootid);
- add_partition(block_type, p->blocks, p->name_hash->rootid);
-
- dump_raw(block_type, p->blocks->path);
- g_hash_table_destroy(block_type);
-#endif
-}
-
-/* more debug stuff */
-void
-camel_text_index_validate(CamelTextIndex *idx)
-{
- struct _CamelTextIndexPrivate *p = CTI_PRIVATE(idx);
- camel_key_t keyid;
- char *word;
- const char *name;
- unsigned int flags;
- camel_block_t data;
- char *oldword;
- camel_key_t *records;
- size_t count;
-
- GHashTable *names, *deleted, *words, *keys, *name_word, *word_word;
-
- names = g_hash_table_new(NULL, NULL);
- deleted = g_hash_table_new(NULL, NULL);
-
- name_word = g_hash_table_new(g_str_hash, g_str_equal);
-
- words = g_hash_table_new(NULL, NULL);
- keys = g_hash_table_new(NULL, NULL);
-
- word_word = g_hash_table_new(g_str_hash, g_str_equal);
-
- /* Iterate over all names in the file first */
-
- printf("Checking UID consistency\n");
-
- keyid = 0;
- while ( (keyid = camel_key_table_next(p->name_index, keyid, &word, &flags, &data)) ) {
- if ((oldword = g_hash_table_lookup(names, GINT_TO_POINTER(keyid))) != NULL
- || (oldword = g_hash_table_lookup(deleted, GINT_TO_POINTER(keyid))) != NULL) {
- printf("Warning, name '%s' duplicates key (%x) with name '%s'\n", word, keyid, oldword);
- g_free(word);
- } else {
- g_hash_table_insert(name_word, word, (void *)1);
- if ((flags & 1) == 0) {
- g_hash_table_insert(names, GINT_TO_POINTER(keyid), word);
- } else {
- g_hash_table_insert(deleted, GINT_TO_POINTER(keyid), word);
- }
- }
- }
-
- printf("Checking WORD member consistency\n");
-
- keyid = 0;
- while ( (keyid = camel_key_table_next(p->word_index, keyid, &word, &flags, &data)) ) {
- CamelIndexCursor *idc;
- GHashTable *used;
-
- /* first, check for duplicates of keyid, and data */
- if ((oldword = g_hash_table_lookup(words, GINT_TO_POINTER(keyid))) != NULL) {
- printf("Warning, word '%s' duplicates key (%x) with name '%s'\n", word, keyid, oldword);
- g_free(word);
- word = oldword;
- } else {
- g_hash_table_insert(words, GINT_TO_POINTER(keyid), word);
- }
-
- if (data == 0) {
- /* This may not be an issue if things have been removed over time,
- though it is a problem if its a fresh index */
- printf("Word '%s' has no data associated with it\n", word);
- } else {
- if ((oldword = g_hash_table_lookup(keys, GUINT_TO_POINTER(data))) != NULL) {
- printf("Warning, word '%s' duplicates data (%x) with name '%s'\n", word, data, oldword);
- } else {
- g_hash_table_insert(keys, GUINT_TO_POINTER(data), word);
- }
- }
-
- if ((oldword = g_hash_table_lookup(word_word, word)) != NULL) {
- printf("Warning, word '%s' occurs more than once\n", word);
- } else {
- g_hash_table_insert(word_word, word, word);
- }
-
- used = g_hash_table_new(g_str_hash, g_str_equal);
-
- idc = camel_index_find((CamelIndex *)idx, word);
- while ( (name = camel_index_cursor_next(idc)) ) {
- if (g_hash_table_lookup(name_word, name) == NULL) {
- printf("word '%s' references non-existant name '%s'\n", word, name);
- }
- if (g_hash_table_lookup(used, name) != NULL) {
- printf("word '%s' uses word '%s' more than once\n", word, name);
- } else {
- g_hash_table_insert(used, g_strdup(name), (void *)1);
- }
- }
- camel_object_unref((CamelObject *)idc);
-
- g_hash_table_foreach(used, (GHFunc)g_free, NULL);
- g_hash_table_destroy(used);
-
- printf("word '%s'\n", word);
-
- while (data) {
- printf(" data %x ", data);
- if (camel_key_file_read(p->links, &data, &count, &records) == -1) {
- printf("Warning, read failed for word '%s', at data '%d'\n", word, data);
- data = 0;
- } else {
- printf("(%d)\n", count);
- g_free(records);
- }
- }
- }
-
- g_hash_table_destroy(names);
- g_hash_table_destroy(deleted);
- g_hash_table_destroy(words);
- g_hash_table_destroy(keys);
-
- g_hash_table_foreach(name_word, (GHFunc)g_free, NULL);
- g_hash_table_destroy(name_word);
-
- g_hash_table_foreach(word_word, (GHFunc)g_free, NULL);
- g_hash_table_destroy(word_word);
-}
-
-/* ********************************************************************** */
-/* CamelTextIndexName */
-/* ********************************************************************** */
-
-static CamelIndexNameClass *camel_text_index_name_parent;
-
-#define CIN_CLASS(o) ((CamelTextIndexNameClass *)(((CamelObject *)o)->classfuncs))
-#define CIN_PRIVATE(o) (((CamelTextIndexName *)(o))->priv)
-
-static void
-text_index_name_add_word(CamelIndexName *idn, const char *word)
-{
- struct _CamelTextIndexNamePrivate *p = ((CamelTextIndexName *)idn)->priv;
-
- if (g_hash_table_lookup(idn->words, word) == NULL) {
- char *w = e_mempool_strdup(p->pool, word);
-
- g_hash_table_insert(idn->words, w, w);
- }
-}
-
-/* Why?
- Because it doesn't hang/loop forever on bad data
- Used to clean up utf8 before it gets further */
-
-static inline guint32
-camel_utf8_next(const unsigned char **ptr, const unsigned char *ptrend)
-{
- register unsigned char *p = (unsigned char *)*ptr;
- register unsigned int c;
- register guint32 v;
- int l;
-
- if (p == ptrend)
- return 0;
-
- while ( (c = *p++) ) {
- if (c < 0x80) {
- *ptr = p;
- return c;
- } else if ((c&0xe0) == 0xc0) {
- v = c & 0x1f;
- l = 1;
- } else if ((c&0xf0) == 0xe0) {
- v = c & 0x0f;
- l = 2;
- } else if ((c&0xf8) == 0xf0) {
- v = c & 0x07;
- l = 3;
- } else if ((c&0xfc) == 0xf8) {
- v = c & 0x03;
- l = 4;
- } else if ((c&0xfe) == 0xfc) {
- v = c & 0x01;
- l = 5;
- } else
- /* Invalid, ignore and look for next start char if room */
- if (p == ptrend) {
- return 0;
- } else {
- continue;
- }
-
- /* bad data or truncated buffer */
- if (p + l > ptrend)
- return 0;
-
- while (l && ((c = *p) & 0xc0) == 0x80) {
- p++;
- l--;
- v = (v << 6) | (c & 0x3f);
- }
-
- /* valid char */
- if (l == 0) {
- *ptr = p;
- return v;
- }
-
- /* else look for a start char again */
- }
-
- return 0;
-}
-
-static size_t
-text_index_name_add_buffer(CamelIndexName *idn, const char *buffer, size_t len)
-{
- CamelTextIndexNamePrivate *p = CIN_PRIVATE(idn);
- const unsigned char *ptr, *ptrend;
- guint32 c;
- unsigned char utf8[8];
- size_t utf8len;
-
- if (buffer == NULL) {
- if (p->buffer->len) {
- camel_index_name_add_word(idn, p->buffer->str);
- g_string_truncate(p->buffer, 0);
- }
- return 0;
- }
-
- ptr = buffer;
- ptrend = buffer+len;
- while ((c = camel_utf8_next(&ptr, ptrend))) {
- if (g_unichar_isalnum(c)) {
- c = g_unichar_tolower(c);
- utf8len = g_unichar_to_utf8(c, utf8);
- utf8[utf8len] = 0;
- g_string_append(p->buffer, utf8);
- } else {
- if (p->buffer->len > 0 && p->buffer->len <= CAMEL_TEXT_INDEX_MAX_WORDLEN) {
- text_index_name_add_word(idn, p->buffer->str);
- /*camel_index_name_add_word(idn, p->buffer->str);*/
- }
-
- g_string_truncate (p->buffer, 0);
- }
- }
-
- return 0;
-}
-
-static void
-camel_text_index_name_class_init(CamelTextIndexNameClass *klass)
-{
- CamelIndexNameClass *nklass = (CamelIndexNameClass *)klass;
-
- camel_text_index_name_parent = CAMEL_INDEX_NAME_CLASS(camel_type_get_global_classfuncs(camel_index_name_get_type()));
-
- nklass->add_word = text_index_name_add_word;
- nklass->add_buffer = text_index_name_add_buffer;
-}
-
-static void
-camel_text_index_name_init(CamelTextIndexName *idn)
-{
- CamelTextIndexNamePrivate *p;
-
- idn->parent.words = g_hash_table_new(g_str_hash, g_str_equal);
-
- p = idn->priv = g_malloc0(sizeof(*idn->priv));
- p->buffer = g_string_new("");
- p->pool = e_mempool_new(256, 128, E_MEMPOOL_ALIGN_BYTE);
-}
-
-static void
-camel_text_index_name_finalise(CamelTextIndexName *idn)
-{
- CamelTextIndexNamePrivate *p = CIN_PRIVATE(idn);
-
- g_hash_table_destroy(idn->parent.words);
-
- g_string_free(p->buffer, TRUE);
- e_mempool_destroy(p->pool);
-
- g_free(p);
-}
-
-CamelType
-camel_text_index_name_get_type(void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register(camel_index_name_get_type(), "CamelTextIndexName",
- sizeof (CamelTextIndexName),
- sizeof (CamelTextIndexNameClass),
- (CamelObjectClassInitFunc) camel_text_index_name_class_init,
- NULL,
- (CamelObjectInitFunc) camel_text_index_name_init,
- (CamelObjectFinalizeFunc) camel_text_index_name_finalise);
- }
-
- return type;
-}
-
-CamelTextIndexName *
-camel_text_index_name_new(CamelTextIndex *idx, const char *name, camel_key_t nameid)
-{
- CamelTextIndexName *idn = (CamelTextIndexName *)camel_object_new(camel_text_index_name_get_type());
- CamelIndexName *cin = &idn->parent;
- CamelTextIndexNamePrivate *p = CIN_PRIVATE(idn);
-
- cin->index = (CamelIndex *)idx;
- camel_object_ref((CamelObject *)idx);
- cin->name = e_mempool_strdup(p->pool, name);
- p->nameid = nameid;
-
- return idn;
-}
-
-/* ********************************************************************** */
-/* CamelTextIndexCursor */
-/* ********************************************************************** */
-
-static CamelIndexCursorClass *camel_text_index_cursor_parent;
-
-#define CIC_CLASS(o) ((CamelTextIndexCursorClass *)(((CamelObject *)o)->classfuncs))
-#define CIC_PRIVATE(o) (((CamelTextIndexCursor *)(o))->priv)
-
-static const char *
-text_index_cursor_next(CamelIndexCursor *idc)
-{
- struct _CamelTextIndexCursorPrivate *p = CIC_PRIVATE(idc);
- struct _CamelTextIndexPrivate *tip = CTI_PRIVATE(idc->index);
- unsigned int flags;
-
- c(printf("Going to next cursor for word with data '%08x' next %08x\n", p->first, p->next));
-
- do {
- while (p->record_index >= p->record_count) {
- g_free(p->records);
- p->records = NULL;
- p->record_index = 0;
- p->record_count = 0;
- if (p->next == 0)
- return NULL;
- if (camel_key_file_read(tip->links, &p->next, &p->record_count, &p->records) == -1)
- return NULL;
- }
-
- g_free(p->current);
- camel_key_table_lookup(tip->name_index, p->records[p->record_index], &p->current, &flags);
- if (flags & 1) {
- g_free(p->current);
- p->current = NULL;
- }
- p->record_index++;
- } while (p->current == NULL);
-
- return p->current;
-}
-
-static void
-text_index_cursor_reset(CamelIndexCursor *idc)
-{
- struct _CamelTextIndexCursorPrivate *p = CIC_PRIVATE(idc);
-
- g_free(p->records);
- p->records = NULL;
- g_free(p->current);
- p->current = NULL;
- p->record_count = 0;
- p->record_index = 0;
- p->next = p->first;
-}
-
-static void
-camel_text_index_cursor_class_init(CamelTextIndexCursorClass *klass)
-{
- CamelIndexCursorClass *cklass = (CamelIndexCursorClass *)klass;
-
- camel_text_index_cursor_parent = CAMEL_INDEX_CURSOR_CLASS(camel_type_get_global_classfuncs(camel_index_cursor_get_type()));
-
- cklass->next = text_index_cursor_next;
- cklass->reset = text_index_cursor_reset;
-}
-
-static void
-camel_text_index_cursor_init(CamelTextIndexCursor *idc)
-{
- CIC_PRIVATE(idc) = g_malloc0(sizeof(struct _CamelTextIndexCursorPrivate));
-}
-
-static void
-camel_text_index_cursor_finalise(CamelTextIndexCursor *idc)
-{
- struct _CamelTextIndexCursorPrivate *p = CIC_PRIVATE(idc);
-
- g_free(p->records);
- g_free(p->current);
- g_free(p);
-}
-
-CamelType
-camel_text_index_cursor_get_type(void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register(camel_index_cursor_get_type(), "CamelTextIndexCursor",
- sizeof (CamelTextIndexCursor),
- sizeof (CamelTextIndexCursorClass),
- (CamelObjectClassInitFunc) camel_text_index_cursor_class_init,
- NULL,
- (CamelObjectInitFunc) camel_text_index_cursor_init,
- (CamelObjectFinalizeFunc) camel_text_index_cursor_finalise);
- }
-
- return type;
-}
-
-CamelTextIndexCursor *
-camel_text_index_cursor_new(CamelTextIndex *idx, camel_block_t data)
-{
- CamelTextIndexCursor *idc = (CamelTextIndexCursor *)camel_object_new(camel_text_index_cursor_get_type());
- CamelIndexCursor *cic = &idc->parent;
- struct _CamelTextIndexCursorPrivate *p = CIC_PRIVATE(idc);
-
- cic->index = (CamelIndex *)idx;
- camel_object_ref((CamelObject *)idx);
- p->first = data;
- p->next = data;
- p->record_count = 0;
- p->record_index = 0;
-
- return idc;
-}
-
-/* ********************************************************************** */
-/* CamelTextIndexKeyCursor */
-/* ********************************************************************** */
-
-static CamelIndexCursorClass *camel_text_index_key_cursor_parent;
-
-#define CIKC_CLASS(o) ((CamelTextIndexKeyCursorClass *)(((CamelObject *)o)->classfuncs))
-#define CIKC_PRIVATE(o) (((CamelTextIndexKeyCursor *)(o))->priv)
-
-static const char *
-text_index_key_cursor_next(CamelIndexCursor *idc)
-{
- struct _CamelTextIndexKeyCursorPrivate *p = CIKC_PRIVATE(idc);
-
- c(printf("Going to next cursor for keyid %08x\n", p->keyid));
-
- g_free(p->current);
- p->current = NULL;
-
- while ( (p->keyid = camel_key_table_next(p->table, p->keyid, &p->current, &p->flags, &p->data)) ) {
- if ((p->flags & 1) == 0) {
- return p->current;
- } else {
- g_free(p->current);
- p->current = NULL;
- }
- }
-
- return NULL;
-}
-
-static void
-text_index_key_cursor_reset(CamelIndexCursor *idc)
-{
- struct _CamelTextIndexKeyCursorPrivate *p = CIKC_PRIVATE(idc);
-
- p->keyid = 0;
- p->flags = 0;
- p->data = 0;
- g_free(p->current);
- p->current = NULL;
-}
-
-static void
-camel_text_index_key_cursor_class_init(CamelTextIndexKeyCursorClass *klass)
-{
- CamelIndexCursorClass *cklass = (CamelIndexCursorClass *)klass;
-
- camel_text_index_key_cursor_parent = CAMEL_INDEX_CURSOR_CLASS(camel_type_get_global_classfuncs(camel_index_cursor_get_type()));
-
- cklass->next = text_index_key_cursor_next;
- cklass->reset = text_index_key_cursor_reset;
-}
-
-static void
-camel_text_index_key_cursor_init(CamelTextIndexKeyCursor *idc)
-{
- struct _CamelTextIndexKeyCursorPrivate *p;
-
- p = idc->priv = g_malloc0(sizeof(struct _CamelTextIndexKeyCursorPrivate));
- p->keyid = 0;
- p->flags = 0;
- p->data = 0;
- p->current = NULL;
-}
-
-static void
-camel_text_index_key_cursor_finalise(CamelTextIndexKeyCursor *idc)
-{
- struct _CamelTextIndexKeyCursorPrivate *p = CIKC_PRIVATE(idc);
-
- g_free(p->current);
- if (p->table)
- camel_object_unref((CamelObject *)p->table);
- g_free(p);
-}
-
-CamelType
-camel_text_index_key_cursor_get_type(void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register(camel_index_cursor_get_type(), "CamelTextIndexKeyCursor",
- sizeof (CamelTextIndexKeyCursor),
- sizeof (CamelTextIndexKeyCursorClass),
- (CamelObjectClassInitFunc) camel_text_index_key_cursor_class_init,
- NULL,
- (CamelObjectInitFunc) camel_text_index_key_cursor_init,
- (CamelObjectFinalizeFunc) camel_text_index_key_cursor_finalise);
- }
-
- return type;
-}
-
-CamelTextIndexKeyCursor *
-camel_text_index_key_cursor_new(CamelTextIndex *idx, CamelKeyTable *table)
-{
- CamelTextIndexKeyCursor *idc = (CamelTextIndexKeyCursor *)camel_object_new(camel_text_index_key_cursor_get_type());
- CamelIndexCursor *cic = &idc->parent;
- struct _CamelTextIndexKeyCursorPrivate *p = CIKC_PRIVATE(idc);
-
- cic->index = (CamelIndex *)idx;
- camel_object_ref((CamelObject *)idx);
- p->table = table;
- camel_object_ref((CamelObject *)table);
-
- return idc;
-}
-
-/* ********************************************************************** */
-
-#define m(x)
-
-#if 0
-
-struct _CamelIndexRoot {
- struct _CamelBlockRoot root;
-
- camel_block_t word_root; /* a keyindex containing the keyid -> word mapping */
- camel_block_t word_hash_root; /* a partitionindex containing word -> keyid mapping */
-
- camel_block_t name_root; /* same, for names */
- camel_block_t name_hash_root;
-};
-
-char wordbuffer[] = "This is a buffer of multiple words. Some of the words are duplicates"
-" while other words are the same, some are in difFerenT Different different case cAsE casE,"
-" with,with:with;with-with'with\"'\"various punctuation as well. So much for those Words. and 10"
-" numbers in a row too 1,2,3,4,5,6,7,8,9,10! Yay!.";
-
-int main(int argc, char **argv)
-{
-#if 0
- CamelBlockFile *bs;
- CamelKeyTable *ki;
- CamelPartitionTable *cpi;
- CamelBlock *keyroot, *partroot;
- struct _CamelIndexRoot *root;
- FILE *fp;
- char line[256], *key;
- camel_key_t keyid;
- int index = 0, flags, data;
-#endif
- CamelIndex *idx;
- CamelIndexName *idn;
- CamelIndexCursor *idc;
- const char *word;
- int i;
-
- printf("Camel text index tester!\n");
-
- g_thread_init(NULL);
- camel_init(NULL, 0);
-
- idx = (CamelIndex *)camel_text_index_new("textindex", O_CREAT|O_RDWR|O_TRUNC);
-
-
-#if 1
- camel_index_compress(idx);
-
- return 0;
-#endif
-
- for (i=0;i<100;i++) {
- char name[16];
-
- sprintf(name, "%d", i);
- printf("Adding words to name '%s'\n", name);
- idn = camel_index_add_name(idx, name);
- camel_index_name_add_buffer(idn, wordbuffer, sizeof(wordbuffer)-1);
- camel_index_write_name(idx, idn);
- camel_object_unref((CamelObject *)idn);
- }
-
- printf("Looking up which names contain word 'word'\n");
- idc = camel_index_find(idx, "words");
- while ( (word = camel_index_cursor_next(idc)) != NULL ) {
- printf(" name is '%s'\n", word);
- }
- camel_object_unref((CamelObject *)idc);
- printf("done.\n");
-
- printf("Looking up which names contain word 'truncate'\n");
- idc = camel_index_find(idx, "truncate");
- while ( (word = camel_index_cursor_next(idc)) != NULL ) {
- printf(" name is '%s'\n", word);
- }
- camel_object_unref((CamelObject *)idc);
- printf("done.\n");
-
- camel_index_sync(idx);
- camel_object_unref((CamelObject *)idx);
-
-#if 0
- bs = camel_block_file_new("blocks", "TESTINDX", CAMEL_BLOCK_SIZE);
-
- root = (struct _CamelIndexRoot *)bs->root;
- if (root->word_root == 0) {
- keyroot = camel_block_file_new_block(bs);
- root->word_root = keyroot->id;
- camel_block_file_touch_block(bs, bs->root_block);
- }
- if (root->word_hash_root == 0) {
- partroot = camel_block_file_new_block(bs);
- root->word_hash_root = partroot->id;
- camel_block_file_touch_block(bs, bs->root_block);
- }
-
- ki = camel_key_table_new(bs, root->word_root);
- cpi = camel_partition_table_new(bs, root->word_hash_root);
-
- fp = fopen("/usr/dict/words", "r");
- if (fp == NULL) {
- perror("fopen");
- return 1;
- }
-
- while (fgets(line, sizeof(line), fp) != NULL) {
- line[strlen(line)-1] = 0;
-
- /* see if its already there */
- keyid = camel_partition_table_lookup(cpi, line);
- if (keyid == 0) {
- m(printf("Adding word '%s' %d\n", line, index));
-
- keyid = camel_key_table_add(ki, line, index, 0);
- m(printf(" key = %08x\n", keyid));
-
- camel_partition_table_add(cpi, line, keyid);
-
- m(printf("Lookup word '%s'\n", line));
- keyid = camel_partition_table_lookup(cpi, line);
- m(printf(" key = %08x\n", keyid));
- }
-
- m(printf("Lookup key %08x\n", keyid));
-
- camel_key_table_set_flags(ki, keyid, index, 1);
-
- data = camel_key_table_lookup(ki, keyid, &key, &flags);
- m(printf(" word = '%s' %d %04x\n", key, data, flags));
-
- g_assert(data == index && strcmp(key, line) == 0);
-
- g_free(key);
-
- index++;
- }
-
- printf("Scanning again\n");
- fseek(fp, SEEK_SET, 0);
- index = 0;
- while (fgets(line, sizeof(line), fp) != NULL) {
- line[strlen(line)-1] = 0;
- m(printf("Lookup word '%s' %d\n", line, index));
- keyid = camel_partition_table_lookup(cpi, line);
- m(printf(" key = %08d\n", keyid));
-
- m(printf("Lookup key %08x\n", keyid));
- data = camel_key_table_lookup(ki, keyid, &key, &flags);
- m(printf(" word = '%s' %d\n", key, data));
-
- g_assert(data == index && strcmp(key, line) == 0);
-
- g_free(key);
-
- index++;
- }
-
- printf("Freeing partition index\n");
- camel_partition_table_free(cpi);
-
- printf("Syncing block file\n");
- camel_block_file_sync(bs);
-#endif
- return 0;
-}
-
-#endif
diff --git a/camel/camel-text-index.h b/camel/camel-text-index.h
deleted file mode 100644
index fd9e6aa116..0000000000
--- a/camel/camel-text-index.h
+++ /dev/null
@@ -1,114 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_TEXT_INDEX_H
-#define _CAMEL_TEXT_INDEX_H
-
-#include <camel/camel-exception.h>
-#include <camel/camel-object.h>
-#include "camel-index.h"
-
-#define CAMEL_TEXT_INDEX(obj) CAMEL_CHECK_CAST (obj, camel_text_index_get_type (), CamelTextIndex)
-#define CAMEL_TEXT_INDEX_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_text_index_get_type (), CamelTextIndexClass)
-#define CAMEL_IS_TEXT_INDEX(obj) CAMEL_CHECK_TYPE (obj, camel_text_index_get_type ())
-
-typedef struct _CamelTextIndex CamelTextIndex;
-typedef struct _CamelTextIndexClass CamelTextIndexClass;
-
-typedef struct _CamelTextIndexName CamelTextIndexName;
-typedef struct _CamelTextIndexNameClass CamelTextIndexNameClass;
-
-typedef struct _CamelTextIndexCursor CamelTextIndexCursor;
-typedef struct _CamelTextIndexCursorClass CamelTextIndexCursorClass;
-
-typedef struct _CamelTextIndexKeyCursor CamelTextIndexKeyCursor;
-typedef struct _CamelTextIndexKeyCursorClass CamelTextIndexKeyCursorClass;
-
-typedef void (*CamelTextIndexFunc)(CamelTextIndex *idx, const char *word, char *buffer);
-
-/* ********************************************************************** */
-
-struct _CamelTextIndexCursor {
- CamelIndexCursor parent;
-
- struct _CamelTextIndexCursorPrivate *priv;
-};
-
-struct _CamelTextIndexCursorClass {
- CamelIndexCursorClass parent;
-};
-
-CamelType camel_text_index_cursor_get_type(void);
-
-/* ********************************************************************** */
-
-struct _CamelTextIndexKeyCursor {
- CamelIndexCursor parent;
-
- struct _CamelTextIndexKeyCursorPrivate *priv;
-};
-
-struct _CamelTextIndexKeyCursorClass {
- CamelIndexCursorClass parent;
-};
-
-CamelType camel_text_index_key_cursor_get_type(void);
-
-/* ********************************************************************** */
-
-struct _CamelTextIndexName {
- CamelIndexName parent;
-
- struct _CamelTextIndexNamePrivate *priv;
-};
-
-struct _CamelTextIndexNameClass {
- CamelIndexNameClass parent;
-};
-
-CamelType camel_text_index_name_get_type(void);
-
-/* ********************************************************************** */
-
-struct _CamelTextIndex {
- CamelIndex parent;
-
- struct _CamelTextIndexPrivate *priv;
-};
-
-struct _CamelTextIndexClass {
- CamelIndexClass parent_class;
-};
-
-CamelType camel_text_index_get_type (void);
-CamelTextIndex *camel_text_index_new(const char *path, int flags);
-
-/* static utility functions */
-int camel_text_index_check(const char *path);
-int camel_text_index_rename(const char *old, const char *new);
-int camel_text_index_remove(const char *old);
-
-void camel_text_index_dump(CamelTextIndex *idx);
-void camel_text_index_info(CamelTextIndex *idx);
-void camel_text_index_validate(CamelTextIndex *idx);
-
-#endif /* ! _CAMEL_TEXT_INDEX_H */
-
diff --git a/camel/camel-transport.c b/camel/camel-transport.c
deleted file mode 100644
index a708b1757d..0000000000
--- a/camel/camel-transport.c
+++ /dev/null
@@ -1,141 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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-address.h"
-#include "camel-mime-message.h"
-#include "camel-private.h"
-
-static CamelServiceClass *parent_class = NULL;
-
-/* Returns the class for a CamelTransport */
-#define CT_CLASS(so) CAMEL_TRANSPORT_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-
-static int transport_setv (CamelObject *object, CamelException *ex, CamelArgV *args);
-static int transport_getv (CamelObject *object, CamelException *ex, CamelArgGetV *args);
-
-
-static void
-camel_transport_class_init (CamelTransportClass *camel_transport_class)
-{
- CamelObjectClass *camel_object_class = CAMEL_OBJECT_CLASS (camel_transport_class);
-
- parent_class = CAMEL_SERVICE_CLASS (camel_type_get_global_classfuncs (camel_service_get_type ()));
-
- /* virtual method overload */
- camel_object_class->setv = transport_setv;
- camel_object_class->getv = transport_getv;
-}
-
-static void
-camel_transport_init (gpointer object, gpointer klass)
-{
- CamelTransport *xport = object;
-
- xport->priv = g_malloc0 (sizeof (struct _CamelTransportPrivate));
- xport->priv->send_lock = g_mutex_new ();
-}
-
-static void
-camel_transport_finalize (CamelObject *object)
-{
- CamelTransport *xport = CAMEL_TRANSPORT (object);
-
- g_mutex_free (xport->priv->send_lock);
- 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),
- (CamelObjectClassInitFunc) camel_transport_class_init,
- NULL,
- (CamelObjectInitFunc) camel_transport_init,
- (CamelObjectFinalizeFunc) camel_transport_finalize);
- }
-
- return type;
-}
-
-
-static int
-transport_setv (CamelObject *object, CamelException *ex, CamelArgV *args)
-{
- /* CamelTransport doesn't currently have anything to set */
- return CAMEL_OBJECT_CLASS (parent_class)->setv (object, ex, args);
-}
-
-static int
-transport_getv (CamelObject *object, CamelException *ex, CamelArgGetV *args)
-{
- /* CamelTransport doesn't currently have anything to get */
- return CAMEL_OBJECT_CLASS (parent_class)->getv (object, ex, args);
-}
-
-
-/**
- * camel_transport_send_to:
- * @transport: the transport
- * @message: the message
- * @from: from address
- * @recipients: the recipients
- * @ex: a CamelException
- *
- * Sends the message to the given recipients, regardless of the contents
- * of @message. If the message contains a "Bcc" header, the transport
- * is responsible for stripping it.
- *
- * Return value: success or failure.
- **/
-gboolean
-camel_transport_send_to (CamelTransport *transport, CamelMimeMessage *message,
- CamelAddress *from, CamelAddress *recipients,
- CamelException *ex)
-{
- gboolean sent;
-
- g_return_val_if_fail (CAMEL_IS_TRANSPORT (transport), FALSE);
- g_return_val_if_fail (CAMEL_IS_MIME_MESSAGE (message), FALSE);
- g_return_val_if_fail (CAMEL_IS_ADDRESS (from), FALSE);
- g_return_val_if_fail (CAMEL_IS_ADDRESS (recipients), FALSE);
-
- CAMEL_TRANSPORT_LOCK (transport, send_lock);
- sent = CT_CLASS (transport)->send_to (transport, message,
- from, 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 d2c1e5b72c..0000000000
--- a/camel/camel-transport.h
+++ /dev/null
@@ -1,82 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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))
-
-
-enum {
- CAMEL_TRANSPORT_ARG_FIRST = CAMEL_SERVICE_ARG_FIRST + 100,
-};
-
-struct _CamelTransport
-{
- CamelService parent_object;
-
- struct _CamelTransportPrivate *priv;
-};
-
-
-
-typedef struct {
- CamelServiceClass parent_class;
-
- gboolean (*send_to) (CamelTransport *transport,
- CamelMimeMessage *message,
- CamelAddress *from, CamelAddress *recipients,
- CamelException *ex);
-} CamelTransportClass;
-
-
-/* public methods */
-gboolean camel_transport_send_to (CamelTransport *transport,
- CamelMimeMessage *message,
- CamelAddress *from,
- CamelAddress *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 8345bbf206..0000000000
--- a/camel/camel-types.h
+++ /dev/null
@@ -1,83 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 _CamelDigestFolder CamelDigestFolder;
-typedef struct _CamelDigestStore CamelDigestStore;
-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 _CamelMimeFilterChomp CamelMimeFilterChomp;
-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 _CamelHttpStream CamelHttpStream;
-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 2a2a52daeb..0000000000
--- a/camel/camel-uid-cache.c
+++ /dev/null
@@ -1,334 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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"
-#include "camel-file-utils.h"
-
-struct _uid_state {
- int level;
- gboolean save;
-};
-
-
-/**
- * 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 *dirname, *buf, **uids;
- int fd, i;
-
- dirname = g_path_get_dirname (filename);
- if (camel_mkdir (dirname, 0777) == -1) {
- g_free (dirname);
- return NULL;
- }
-
- g_free (dirname);
-
- if ((fd = open (filename, O_RDONLY | O_CREAT, 0666)) == -1)
- return NULL;
-
- if (fstat (fd, &st) == -1) {
- close (fd);
- return NULL;
- }
-
- buf = g_malloc (st.st_size + 1);
-
- if (st.st_size > 0 && camel_read (fd, buf, st.st_size) == -1) {
- close (fd);
- g_free (buf);
- return NULL;
- }
-
- buf[st.st_size] = '\0';
-
- close (fd);
-
- cache = g_new (CamelUIDCache, 1);
- cache->uids = g_hash_table_new (g_str_hash, g_str_equal);
- cache->filename = g_strdup (filename);
- cache->level = 1;
- cache->expired = 0;
- cache->size = 0;
- cache->fd = -1;
-
- 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;
-}
-
-
-static void
-maybe_write_uid (gpointer key, gpointer value, gpointer data)
-{
- CamelUIDCache *cache = data;
- struct _uid_state *state = value;
-
- if (cache->fd == -1)
- return;
-
- if (state && state->level == cache->level && state->save) {
- if (camel_write (cache->fd, key, strlen (key)) == -1 ||
- camel_write (cache->fd, "\n", 1) == -1) {
- cache->fd = -1;
- } else {
- cache->size += strlen (key) + 1;
- }
- } else {
- /* keep track of how much space the expired uids would
- * have taken up in the cache */
- cache->expired += strlen (key) + 1;
- }
-}
-
-
-/**
- * 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)
-{
- char *filename;
- int errnosav;
- int fd;
-
- filename = g_strdup_printf ("%s~", cache->filename);
- if ((fd = open (filename, O_WRONLY | O_CREAT | O_EXCL, 0666)) == -1) {
- g_free (filename);
- return FALSE;
- }
-
- cache->fd = fd;
- cache->size = 0;
- cache->expired = 0;
- g_hash_table_foreach (cache->uids, maybe_write_uid, cache);
-
- if (cache->fd == -1)
- goto exception;
-
- if (fsync (fd) == -1)
- goto exception;
-
- close (fd);
- fd = -1;
-
- if (rename (filename, cache->filename) == -1)
- goto exception;
-
- g_free (filename);
-
- return TRUE;
-
- exception:
-
- errnosav = errno;
-
-#ifdef ENABLE_SPASMOLYTIC
- if (fd != -1) {
- /**
- * If our new cache size is larger than the old cache,
- * even if we haven't finished writing it out
- * successfully, we should still attempt to replace
- * the old cache with the new cache because it will at
- * least avoid re-downloading a few extra messages
- * than if we just kept the old cache.
- *
- * Similarly, even if the new cache size is smaller
- * than the old cache size, but we've expired enough
- * uids to make up for the difference in size (or
- * more), then we should replace the old cache with
- * the new cache as well.
- **/
-
- if (stat (cache->filename, &st) == 0 &&
- (cache->size > st.st_size || cache->size + cache->expired > st.st_size)) {
- if (ftruncate (fd, (off_t) cache->size) != -1) {
- cache->size = 0;
- cache->expired = 0;
- goto overwrite;
- }
- }
-
- close (fd);
- }
-#endif
-
- unlink (filename);
- g_free (filename);
-
- errno = errnosav;
-
- return FALSE;
-}
-
-
-static void
-free_uid (gpointer key, gpointer value, gpointer data)
-{
- g_free (key);
- g_free (value);
-}
-
-
-/**
- * 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);
- g_free (cache->filename);
- g_free (cache);
-}
-
-
-/**
- * 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, (void **)&old_uid, (void **)&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, (void **)&old_uid, (void **)&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 37d90c89e6..0000000000
--- a/camel/camel-uid-cache.h
+++ /dev/null
@@ -1,60 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 <glib.h>
-
-#include <stdio.h>
-#include <sys/types.h>
-
-typedef struct {
- char *filename;
- GHashTable *uids;
- unsigned int level;
- size_t expired;
- size_t size;
- int fd;
-} 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-scanner.c b/camel/camel-url-scanner.c
deleted file mode 100644
index 8a43b05aee..0000000000
--- a/camel/camel-url-scanner.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 2002 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 "e-util/e-trie.h"
-#include "camel-url-scanner.h"
-
-
-struct _CamelUrlScanner {
- GPtrArray *patterns;
- ETrie *trie;
-};
-
-
-CamelUrlScanner *
-camel_url_scanner_new (void)
-{
- CamelUrlScanner *scanner;
-
- scanner = g_new (CamelUrlScanner, 1);
- scanner->patterns = g_ptr_array_new ();
- scanner->trie = e_trie_new (TRUE);
-
- return scanner;
-}
-
-
-void
-camel_url_scanner_free (CamelUrlScanner *scanner)
-{
- g_return_if_fail (scanner != NULL);
-
- g_ptr_array_free (scanner->patterns, TRUE);
- e_trie_free (scanner->trie);
- g_free (scanner);
-}
-
-
-void
-camel_url_scanner_add (CamelUrlScanner *scanner, urlpattern_t *pattern)
-{
- g_return_if_fail (scanner != NULL);
-
- e_trie_add (scanner->trie, pattern->pattern, scanner->patterns->len);
- g_ptr_array_add (scanner->patterns, pattern);
-}
-
-
-gboolean
-camel_url_scanner_scan (CamelUrlScanner *scanner, const char *in, size_t inlen, urlmatch_t *match)
-{
- const char *pos, *inend;
- urlpattern_t *pat;
- int pattern;
-
- g_return_val_if_fail (scanner != NULL, FALSE);
- g_return_val_if_fail (in != NULL, FALSE);
-
- if (!(pos = e_trie_search (scanner->trie, in, inlen, &pattern)))
- return FALSE;
-
- pat = g_ptr_array_index (scanner->patterns, pattern);
-
- match->pattern = pat->pattern;
- match->prefix = pat->prefix;
-
- inend = in + inlen;
- if (!pat->start (in, pos, inend, match))
- return FALSE;
-
- if (!pat->end (in, pos, inend, match))
- return FALSE;
-
- return TRUE;
-}
-
-
-static unsigned char url_scanner_table[256] = {
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 1, 1, 9, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 24,128,160,128,128,128,128,128,160,160,128,128,160,192,160,160,
- 68, 68, 68, 68, 68, 68, 68, 68, 68, 68,160,160, 32,128, 32,128,
- 160, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66,
- 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66,160,160,160,128,128,
- 128, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66,
- 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66,128,128,128,128, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
-};
-
-enum {
- IS_CTRL = (1 << 0),
- IS_ALPHA = (1 << 1),
- IS_DIGIT = (1 << 2),
- IS_LWSP = (1 << 3),
- IS_SPACE = (1 << 4),
- IS_SPECIAL = (1 << 5),
- IS_DOMAIN = (1 << 6),
- IS_URLSAFE = (1 << 7),
-};
-
-#define is_ctrl(x) ((url_scanner_table[(unsigned char)(x)] & IS_CTRL) != 0)
-#define is_lwsp(x) ((url_scanner_table[(unsigned char)(x)] & IS_LWSP) != 0)
-#define is_atom(x) ((url_scanner_table[(unsigned char)(x)] & (IS_SPECIAL|IS_SPACE|IS_CTRL)) == 0)
-#define is_alpha(x) ((url_scanner_table[(unsigned char)(x)] & IS_ALPHA) != 0)
-#define is_digit(x) ((url_scanner_table[(unsigned char)(x)] & IS_DIGIT) != 0)
-#define is_domain(x) ((url_scanner_table[(unsigned char)(x)] & IS_DOMAIN) != 0)
-#define is_urlsafe(x) ((url_scanner_table[(unsigned char)(x)] & (IS_ALPHA|IS_DIGIT|IS_URLSAFE)) != 0)
-
-
-gboolean
-camel_url_addrspec_start (const char *in, const char *pos, const char *inend, urlmatch_t *match)
-{
- register const char *inptr = pos;
-
- g_assert (*inptr == '@');
-
- inptr--;
-
- while (inptr > in) {
- if (is_atom (*inptr))
- inptr--;
- else
- break;
-
- while (inptr > in && is_atom (*inptr))
- inptr--;
-
- if (inptr > in && *inptr == '.')
- inptr--;
- }
-
- if (!is_atom (*inptr))
- inptr++;
-
- if (inptr == pos)
- return FALSE;
-
- match->um_so = (inptr - in);
-
- return TRUE;
-}
-
-gboolean
-camel_url_addrspec_end (const char *in, const char *pos, const char *inend, urlmatch_t *match)
-{
- const char *inptr = pos;
- int parts = 0, digits;
-
- g_assert (*inptr == '@');
-
- inptr++;
-
- if (*inptr == '[') {
- /* domain literal */
- do {
- inptr++;
-
- digits = 0;
- while (inptr < inend && is_digit (*inptr) && digits < 3) {
- inptr++;
- digits++;
- }
-
- parts++;
-
- if (*inptr != '.' && parts != 4)
- return FALSE;
- } while (parts < 4);
-
- if (*inptr == ']')
- inptr++;
- else
- return FALSE;
- } else {
- while (inptr < inend) {
- if (is_domain (*inptr))
- inptr++;
- else
- break;
-
- while (inptr < inend && is_domain (*inptr))
- inptr++;
-
- if (inptr < inend && *inptr == '.' && is_domain (inptr[1]))
- inptr++;
- }
- }
-
- if (inptr == pos + 1)
- return FALSE;
-
- match->um_eo = (inptr - in);
-
- return TRUE;
-}
-
-static struct {
- char open;
- char close;
-} url_braces[] = {
- { '(', ')' },
- { '{', '}' },
- { '[', ']' },
- { '<', '>' },
-};
-
-static char
-url_stop_at_brace (const char *in, size_t so)
-{
- int i;
-
- if (so > 0) {
- for (i = 0; i < 4; i++) {
- if (in[so - 1] == url_braces[i].open)
- return url_braces[i].close;
- }
- }
-
- return '\0';
-}
-
-gboolean
-camel_url_file_start (const char *in, const char *pos, const char *inend, urlmatch_t *match)
-{
- match->um_so = (pos - in);
-
- return TRUE;
-}
-
-gboolean
-camel_url_file_end (const char *in, const char *pos, const char *inend, urlmatch_t *match)
-{
- register const char *inptr = pos;
- char close_brace;
-
- inptr += strlen (match->pattern);
-
- if (*inptr == '/')
- inptr++;
-
- close_brace = url_stop_at_brace (in, match->um_so);
-
- while (inptr < inend && is_urlsafe (*inptr) && *inptr != close_brace)
- inptr++;
-
- if (inptr == pos)
- return FALSE;
-
- match->um_eo = (inptr - in);
-
- return TRUE;
-}
-
-gboolean
-camel_url_web_start (const char *in, const char *pos, const char *inend, urlmatch_t *match)
-{
- match->um_so = (pos - in);
-
- return TRUE;
-}
-
-gboolean
-camel_url_web_end (const char *in, const char *pos, const char *inend, urlmatch_t *match)
-{
- register const char *inptr = pos;
- int parts = 0, digits, port;
- char close_brace;
-
- inptr += strlen (match->pattern);
-
- close_brace = url_stop_at_brace (in, match->um_so);
-
- /* find the end of the domain */
- if (is_digit (*inptr)) {
- /* domain-literal */
- do {
- digits = 0;
- while (inptr < inend && is_digit (*inptr) && digits < 3) {
- inptr++;
- digits++;
- }
-
- parts++;
-
- if (*inptr != '.' && parts != 4)
- return FALSE;
- else if (*inptr == '.')
- inptr++;
-
- } while (parts < 4);
- } else if (is_domain (*inptr)) {
- while (inptr < inend) {
- if (is_domain (*inptr))
- inptr++;
- else
- break;
-
- while (inptr < inend && is_domain (*inptr))
- inptr++;
-
- if (inptr < inend && *inptr == '.' && is_domain (inptr[1]))
- inptr++;
- }
- } else {
- return FALSE;
- }
-
- if (inptr < inend) {
- switch (*inptr) {
- case ':': /* port notation */
- inptr++;
- port = 0;
-
- while (inptr < inend && is_digit (*inptr) && port < 65536)
- port = (port * 10) + (*inptr++ - '0');
-
- if (port >= 65536)
- inptr--;
-
- if (inptr >= inend || *inptr != '/')
- break;
-
- /* we have a '/' so there could be a path - fall through */
- case '/': /* we've detected a path component to our url */
- inptr++;
-
- while (inptr < inend && is_urlsafe (*inptr) && *inptr != close_brace)
- inptr++;
-
- /* urls are extremely unlikely to end with any
- * punctuation, so strip any trailing
- * punctuation off. Also strip off any closing
- * braces. */
- while (inptr > pos && strchr (",.?!)}]", inptr[-1]))
- inptr--;
-
- break;
- default:
- break;
- }
- }
-
- match->um_eo = (inptr - in);
-
- return TRUE;
-}
-
-
-
-#ifdef BUILD_TABLE
-
-#include <stdio.h>
-
-/* got these from rfc1738 */
-#define CHARS_LWSP " \t\n\r" /* linear whitespace chars */
-#define CHARS_SPECIAL "()<>@,;:\\\".[]"
-
-/* got these from rfc1738 */
-#define CHARS_URLSAFE "$-_.+!*'(),{}|\\^~[]`#%\";/?:@&="
-
-
-static void
-table_init_bits (unsigned int mask, const unsigned char *vals)
-{
- int i;
-
- for (i = 0; vals[i] != '\0'; i++)
- url_scanner_table[vals[i]] |= mask;
-}
-
-static void
-url_scanner_table_init (void)
-{
- int i;
-
- for (i = 0; i < 256; i++) {
- url_scanner_table[i] = 0;
- if (i < 32)
- url_scanner_table[i] |= IS_CTRL;
- if ((i >= '0' && i <= '9'))
- url_scanner_table[i] |= IS_DIGIT | IS_DOMAIN;
- if ((i >= 'a' && i <= 'z') || (i >= 'A' && i <= 'Z'))
- url_scanner_table[i] |= IS_ALPHA | IS_DOMAIN;
- if (i >= 127)
- url_scanner_table[i] |= IS_CTRL;
- }
-
- url_scanner_table[' '] |= IS_SPACE;
- url_scanner_table['-'] |= IS_DOMAIN;
-
- /* not defined to be special in rfc0822, but when scanning
- backwards to find the beginning of the email address we do
- not want to include this char if we come accross it - so
- this is kind of a hack */
- url_scanner_table['/'] |= IS_SPECIAL;
-
- table_init_bits (IS_LWSP, CHARS_LWSP);
- table_init_bits (IS_SPECIAL, CHARS_SPECIAL);
- table_init_bits (IS_URLSAFE, CHARS_URLSAFE);
-}
-
-int main (int argc, char **argv)
-{
- int i;
-
- url_scanner_table_init ();
-
- printf ("static unsigned char url_scanner_table[256] = {");
- for (i = 0; i < 256; i++) {
- printf ("%s%3d%s", (i % 16) ? "" : "\n\t",
- url_scanner_table[i], i != 255 ? "," : "\n");
- }
- printf ("};\n\n");
-
- return 0;
-}
-
-#endif /* BUILD_TABLE */
diff --git a/camel/camel-url-scanner.h b/camel/camel-url-scanner.h
deleted file mode 100644
index d464c2dbf0..0000000000
--- a/camel/camel-url-scanner.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 2002 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_URL_SCANNER_H__
-#define __CAMEL_URL_SCANNER_H__
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <glib.h>
-#include <sys/types.h>
-
-
-typedef struct {
- const char *pattern;
- const char *prefix;
- off_t um_so;
- off_t um_eo;
-} urlmatch_t;
-
-typedef gboolean (*CamelUrlScanFunc) (const char *in, const char *pos, const char *inend, urlmatch_t *match);
-
-/* some default CamelUrlScanFunc's */
-gboolean camel_url_file_start (const char *in, const char *pos, const char *inend, urlmatch_t *match);
-gboolean camel_url_file_end (const char *in, const char *pos, const char *inend, urlmatch_t *match);
-gboolean camel_url_web_start (const char *in, const char *pos, const char *inend, urlmatch_t *match);
-gboolean camel_url_web_end (const char *in, const char *pos, const char *inend, urlmatch_t *match);
-gboolean camel_url_addrspec_start (const char *in, const char *pos, const char *inend, urlmatch_t *match);
-gboolean camel_url_addrspec_end (const char *in, const char *pos, const char *inend, urlmatch_t *match);
-
-typedef struct {
- char *pattern;
- char *prefix;
- CamelUrlScanFunc start;
- CamelUrlScanFunc end;
-} urlpattern_t;
-
-typedef struct _CamelUrlScanner CamelUrlScanner;
-
-CamelUrlScanner *camel_url_scanner_new (void);
-void camel_url_scanner_free (CamelUrlScanner *scanner);
-
-void camel_url_scanner_add (CamelUrlScanner *scanner, urlpattern_t *pattern);
-
-gboolean camel_url_scanner_scan (CamelUrlScanner *scanner, const char *in, size_t inlen, urlmatch_t *match);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __CAMEL_URL_SCANNER_H__ */
diff --git a/camel/camel-url.c b/camel/camel-url.c
deleted file mode 100644
index 86eb4fa104..0000000000
--- a/camel/camel-url.c
+++ /dev/null
@@ -1,584 +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>
- * 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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"
-#include "camel-string-utils.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);
-
-static void append_url_encoded (GString *str, const char *in, const char *extra_enc_chars);
-
-/**
- * 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);
- camel_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 *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_append_printf (str, "%s:", url->protocol);
-
- if (url->host) {
- g_string_append (str, "//");
- if (url->user) {
- append_url_encoded (str, url->user, ":;@/");
- if (url->authmech && *url->authmech) {
- g_string_append (str, ";auth=");
- append_url_encoded (str, url->authmech, ":@/");
- }
- if (url->passwd && !(flags & CAMEL_URL_HIDE_PASSWORD)) {
- g_string_append_c (str, ':');
- append_url_encoded (str, url->passwd, "@/");
- }
- g_string_append_c (str, '@');
- }
- append_url_encoded (str, url->host, ":/");
- if (url->port)
- g_string_append_printf (str, ":%d", url->port);
- if (!url->path && (url->params || url->query || url->fragment))
- g_string_append_c (str, '/');
- }
-
- if (url->path)
- append_url_encoded (str, url->path, ";?");
- if (url->params && !(flags & CAMEL_URL_HIDE_PARAMS))
- g_datalist_foreach (&url->params, output_param, str);
- if (url->query) {
- g_string_append_c (str, '?');
- append_url_encoded (str, url->query, NULL);
- }
- if (url->fragment) {
- g_string_append_c (str, '#');
- append_url_encoded (str, url->fragment, NULL);
- }
-
- 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;
-
- g_string_append_c (str, ';');
- append_url_encoded (str, g_quark_to_string (key_id), "?=");
- if (*(char *)data) {
- g_string_append_c (str, '=');
- append_url_encoded (str, data, "?");
- }
-}
-
-/**
- * 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);
-}
-
-/* From RFC 2396 2.4.3, the characters that should always be encoded */
-static const char url_encoded_char[] = {
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x00 - 0x0f */
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x10 - 0x1f */
- 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* ' ' - '/' */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, /* '0' - '?' */
- 0, 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, 1, 1, 0, /* 'P' - '_' */
- 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, 1, 0, 1, /* 'p' - 0x7f */
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
-};
-
-static void
-append_url_encoded (GString *str, const char *in, const char *extra_enc_chars)
-{
- const unsigned char *s = (const unsigned char *)in;
-
- while (*s) {
- if (url_encoded_char[*s] ||
- (extra_enc_chars && strchr (extra_enc_chars, *s)))
- g_string_append_printf (str, "%%%02x", (int)*s++);
- else
- g_string_append_c (str, *s++);
- }
-}
-
-/**
- * camel_url_encode:
- * @part: a URL part
- * @escape_extra: additional characters beyond " \"%#<>{}|\^[]`"
- * to escape (or %NULL)
- *
- * 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, const char *escape_extra)
-{
- GString *str;
- char *encoded;
-
- str = g_string_new (NULL);
- append_url_encoded (str, part, escape_extra);
- encoded = str->str;
- g_string_free (str, FALSE);
-
- return encoded;
-}
-
-/**
- * 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)
-{
- unsigned char *s, *d;
-
-#define XDIGIT(c) ((c) <= '9' ? (c) - '0' : ((c) & 0x4F) - 'A' + 10)
-
- s = d = (unsigned char *)part;
- do {
- if (*s == '%' && isxdigit(s[1]) && isxdigit(s[2])) {
- *d++ = (XDIGIT (s[1]) << 4) + XDIGIT (s[2]);
- s += 2;
- } else
- *d++ = *s;
- } while (*s++);
-}
-
-
-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;
-}
-
-CamelURL *
-camel_url_copy(const CamelURL *in)
-{
- CamelURL *out;
-
- out = g_malloc(sizeof(*out));
- out->protocol = g_strdup(in->protocol);
- out->user = g_strdup(in->user);
- out->authmech = g_strdup(in->authmech);
- out->passwd = g_strdup(in->passwd);
- out->host = g_strdup(in->host);
- out->port = in->port;
- out->path = g_strdup(in->path);
- out->params = NULL;
- if (in->params)
- g_datalist_foreach(&((CamelURL *)in)->params, copy_param, &out->params);
- out->query = g_strdup(in->query);
- out->fragment = g_strdup(in->fragment);
-
- return out;
-}
diff --git a/camel/camel-url.h b/camel/camel-url.h
deleted file mode 100644
index 4efa315b3f..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 */
-
-/* if this changes, remember to change camel_url_copy */
-typedef struct _CamelURL {
- 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, 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);
-CamelURL *camel_url_copy(const CamelURL *in);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* URL_UTIL_H */
diff --git a/camel/camel-utf8.c b/camel/camel-utf8.c
deleted file mode 100644
index 8fd422c944..0000000000
--- a/camel/camel-utf8.c
+++ /dev/null
@@ -1,400 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Michael Zucchi <notzed@ximian.com>
- *
- * Copyright 2003 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 <glib.h>
-#include "camel-utf8.h"
-
-#include <netinet/in.h>
-
-/**
- * camel_utf8_putc:
- * @ptr:
- * @c:
- *
- * Output a 32 bit unicode character as utf8 octets. At most 4 octets will
- * be written to @ptr. @ptr will be advanced to the next character position.
- **/
-void
-camel_utf8_putc(unsigned char **ptr, guint32 c)
-{
- register unsigned char *p = *ptr;
-
- if (c <= 0x7f)
- *p++ = c;
- else if (c <= 0x7ff) {
- *p++ = 0xc0 | c >> 6;
- *p++ = 0x80 | (c & 0x3f);
- } else if (c <= 0xffff) {
- *p++ = 0xe0 | c >> 12;
- *p++ = 0x80 | ((c >> 6) & 0x3f);
- *p++ = 0x80 | (c & 0x3f);
- } else {
- /* see unicode standard 3.0, S 3.8, max 4 octets */
- *p++ = 0xf0 | c >> 18;
- *p++ = 0x80 | ((c >> 12) & 0x3f);
- *p++ = 0x80 | ((c >> 6) & 0x3f);
- *p++ = 0x80 | (c & 0x3f);
- }
-
- *ptr = p;
-}
-
-/**
- * camel_utf8_getc:
- * @ptr:
- *
- * Get a Unicode character from a utf8 stream. @ptr will be advanced
- * to the next character position. Invalid utf8 characters will be
- * silently skipped. @ptr should point to a NUL terminated array.
- *
- * Return value: The next Unicode character. @ptr will be advanced to
- * the next character always.
- **/
-guint32
-camel_utf8_getc(const unsigned char **ptr)
-{
- register unsigned char *p = (unsigned char *)*ptr;
- register unsigned char c, r;
- register guint32 v, m;
-
-again:
- r = *p++;
-loop:
- if (r < 0x80) {
- *ptr = p;
- v = r;
- } else if (r < 0xf8) { /* valid start char? (max 4 octets) */
- v = r;
- m = 0x7f80; /* used to mask out the length bits */
- do {
- c = *p++;
- if ((c & 0xc0) != 0x80) {
- r = c;
- goto loop;
- }
- v = (v<<6) | (c & 0x3f);
- r<<=1;
- m<<=5;
- } while (r & 0x40);
-
- *ptr = p;
-
- v &= ~m;
- } else {
- goto again;
- }
-
- return v;
-}
-
-/**
- * camel_utf8_getc_limit:
- * @ptr:
- * @end: must not be NULL.
- *
- * Get the next utf8 char at @ptr, and return it, advancing @ptr to
- * the next character. If @end is reached before a full utf8
- * character can be read, then the invalid Unicode char 0xffff is
- * returned as a sentinel (Unicode 3.1, section 2.7), and @ptr is not
- * advanced.
- *
- * Return value: The next utf8 char, or 0xffff.
- **/
-guint32
-camel_utf8_getc_limit(const unsigned char **ptr, const unsigned char *end)
-{
- register unsigned char *p = (unsigned char *)*ptr;
- register unsigned char c, r;
- register guint32 v = 0xffff, m;
-
-again:
- while (p < end) {
- r = *p++;
-loop:
- if (r < 0x80) {
- *ptr = p;
- return r;
- } else if (r < 0xf8) { /* valid start char? (max 4 octets) */
- v = r;
- m = 0x7f80; /* used to mask out the length bits */
- do {
- if (p >= end)
- return 0xffff;
-
- c = *p++;
- if ((c & 0xc0) != 0x80) {
- r = c;
- goto loop;
- }
- v = (v<<6) | (c & 0x3f);
- r<<=1;
- m<<=5;
- } while (r & 0x40);
-
- *ptr = p;
-
- v &= ~m;
- return v;
- } else {
- goto again;
- }
- }
-
- return 0xffff;
-}
-
-void
-g_string_append_u(GString *out, guint32 c)
-{
- unsigned char buffer[8];
- unsigned char *p = buffer;
-
- camel_utf8_putc(&p, c);
- *p = 0;
- g_string_append(out, buffer);
-}
-
-static char *utf7_alphabet =
- "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+,";
-
-static unsigned char utf7_rank[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,0x3e,0x3f,0xff,0xff,0xff,
- 0x34,0x35,0x36,0x37,0x38,0x39,0x3a,0x3b,0x3c,0x3d,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,
- 0x0f,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
- 0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,0x30,0x31,0x32,0x33,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
-};
-
-/**
- * camel_utf7_utf8:
- * @ptr:
- *
- * Convert a modified utf7 string to utf8. If the utf7 string
- * contains 8 bit characters, they are treated as iso-8859-1.
- *
- * The IMAP rules [rfc2060] are used in the utf7 encoding.
- *
- * Return value: The converted string.
- **/
-char *
-camel_utf7_utf8(const char *ptr)
-{
- const unsigned char *p = (unsigned char *)ptr;
- unsigned int c;
- guint32 v=0, x;
- GString *out;
- int i=0;
- int state = 0;
- char *ret;
-
- out = g_string_new("");
- do {
- c = *p++;
- switch(state) {
- case 0:
- if (c == '&')
- state = 1;
- else
- g_string_append_u(out, c);
- break;
- case 1:
- if (c == '-') {
- g_string_append_c(out, '&');
- state = 0;
- } else if (utf7_rank[c] != 0xff) {
- v = utf7_rank[c];
- i = 6;
- state = 2;
- } else {
- /* invalid */
- g_string_append(out, "&-");
- state = 0;
- }
- break;
- case 2:
- if (c == '-') {
- state = 0;
- } else if (utf7_rank[c] != 0xff) {
- v = (v<<6) | utf7_rank[c];
- i+=6;
- if (i >= 16) {
- x = (v >> (i-16)) & 0xffff;
- g_string_append_u(out, x);
- i-=16;
- }
- } else {
- g_string_append_u(out, c);
- state = 0;
- }
- break;
- }
- } while (c);
-
- ret = g_strdup(out->str);
- g_string_free(out, TRUE);
-
- return ret;
-}
-
-static void utf7_closeb64(GString *out, guint32 v, guint32 i)
-{
- guint32 x;
-
- if (i>0) {
- x = (v << (6-i)) & 0x3f;
- g_string_append_c(out, utf7_alphabet[x]);
- }
- g_string_append_c(out, '-');
-}
-
-/**
- * camel_utf8_utf7:
- * @ptr:
- *
- * Convert a utf8 string to a modified utf7 format.
- *
- * The IMAP rules [rfc2060] are used in the utf7 encoding.
- *
- * Return value:
- **/
-char *
-camel_utf8_utf7(const char *ptr)
-{
- const unsigned char *p = (unsigned char *)ptr;
- unsigned int c;
- guint32 x, v = 0;
- int state = 0;
- GString *out;
- int i = 0;
- char *ret;
-
- out = g_string_new("");
-
- while ( (c = camel_utf8_getc(&p)) ) {
- if (c >= 0x20 && c <= 0x7e) {
- if (state == 1) {
- utf7_closeb64(out, v, i);
- state = 0;
- i = 0;
- }
- if (c == '&')
- g_string_append(out, "&-");
- else
- g_string_append_c(out, c);
- } else {
- if (state == 0) {
- g_string_append_c(out, '&');
- state = 1;
- }
- v = (v << 16) | c;
- i += 16;
- while (i >= 6) {
- x = (v >> (i-6)) & 0x3f;
- g_string_append_c(out, utf7_alphabet[x]);
- i -= 6;
- }
- }
- }
-
- if (state == 1)
- utf7_closeb64(out, v, i);
-
- ret = g_strdup(out->str);
- g_string_free(out, TRUE);
-
- return ret;
-}
-
-/**
- * camel_utf8_ucs2:
- * @ptr:
- *
- * Convert a utf8 string into a ucs2 one. The ucs string will be in
- * network byte order, and terminated with a 16 bit NULL.
- *
- * Return value:
- **/
-char *
-camel_utf8_ucs2(const char *ptr)
-{
- GByteArray *work = g_byte_array_new();
- guint32 c;
- char *out;
-
- /* what if c is > 0xffff ? */
-
- while ( (c = camel_utf8_getc((const unsigned char **)&ptr)) ) {
- guint16 s = htons(c);
-
- g_byte_array_append(work, (char *)&s, 2);
- }
-
- g_byte_array_append(work, "\000\000", 2);
- out = g_malloc(work->len);
- memcpy(out, work->data, work->len);
- g_byte_array_free(work, TRUE);
-
- return out;
-}
-
-/**
- * camel_ucs2_utf8:
- * @ptr:
- *
- * Convert a ucs2 string into a utf8 one. The ucs2 string is treated
- * as network byte ordered, and terminated with a 16 bit NUL.
- *
- * Return value:
- **/
-char *camel_ucs2_utf8(const char *ptr)
-{
- guint16 *ucs = (guint16 *)ptr;
- guint32 c;
- GString *work = g_string_new("");
- char *out;
-
- while ( (c = *ucs++) )
- g_string_append_u(work, ntohs(c));
-
- out = g_strdup(work->str);
- g_string_free(work, TRUE);
-
- return out;
-}
diff --git a/camel/camel-utf8.h b/camel/camel-utf8.h
deleted file mode 100644
index fadce2c7e6..0000000000
--- a/camel/camel-utf8.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Michael Zucchi <notzed@ximian.com>
- *
- * Copyright 2003 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_UTF8_H
-#define _CAMEL_UTF8_H
-
-void camel_utf8_putc(unsigned char **ptr, guint32 c);
-guint32 camel_utf8_getc(const unsigned char **ptr);
-guint32 camel_utf8_getc_limit (const unsigned char **ptr, const unsigned char *end);
-
-/* utility func for utf8 gstrings */
-void g_string_append_u(GString *out, guint32 c);
-
-/* convert utf7 to/from utf8, actually this is modified IMAP utf7 */
-char *camel_utf7_utf8(const char *ptr);
-char *camel_utf8_utf7(const char *ptr);
-
-/* convert ucs2 to/from utf8 */
-char *camel_utf8_ucs2(const char *ptr);
-char *camel_ucs2_utf8(const char *ptr);
-
-#endif /* ! _CAMEL_UTF8_H */
diff --git a/camel/camel-vee-folder.c b/camel/camel-vee-folder.c
deleted file mode 100644
index f7ceb12d59..0000000000
--- a/camel/camel-vee-folder.c
+++ /dev/null
@@ -1,1683 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2003 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <pthread.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-session.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)
-extern int camel_verbose_debug;
-#define dd(x) (camel_verbose_debug?(x):0)
-
-#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 void vee_freeze (CamelFolder *folder);
-static void vee_thaw (CamelFolder *folder);
-
-static CamelMimeMessage *vee_get_message (CamelFolder *folder, const gchar *uid, CamelException *ex);
-static void vee_append_message(CamelFolder *folder, CamelMimeMessage *message, const CamelMessageInfo *info, char **appended_uid, CamelException *ex);
-static void vee_transfer_messages_to(CamelFolder *source, GPtrArray *uids, CamelFolder *dest, GPtrArray **transferred_uids, gboolean delete_originals, CamelException *ex);
-
-static GPtrArray *vee_search_by_expression(CamelFolder *folder, const char *expression, CamelException *ex);
-static GPtrArray *vee_search_by_uids(CamelFolder *folder, const char *expression, GPtrArray *uids, 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 vee_set_message_user_tag(CamelFolder *folder, const char *uid, const char *name, const char *value);
-static void vee_rename(CamelFolder *folder, const char *new);
-
-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, int killun);
-
-static void message_changed(CamelFolder *f, const char *uid, CamelVeeFolder *vf);
-static void folder_changed(CamelFolder *sub, CamelFolderChangeInfo *changes, CamelVeeFolder *vf);
-static void subfolder_deleted(CamelFolder *f, void *event_data, CamelVeeFolder *vf);
-
-static void folder_changed_remove_uid(CamelFolder *sub, const char *uid, const char hash[8], int keep, 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 */
-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)
-
-
-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->append_message = vee_append_message;
- folder_class->transfer_messages_to = vee_transfer_messages_to;
-
- folder_class->search_by_expression = vee_search_by_expression;
- folder_class->search_by_uids = vee_search_by_uids;
-
- folder_class->set_message_flags = vee_set_message_flags;
- folder_class->set_message_user_flag = vee_set_message_user_flag;
- folder_class->set_message_user_tag = vee_set_message_user_tag;
-
- folder_class->rename = vee_rename;
-
- folder_class->freeze = vee_freeze;
- folder_class->thaw = vee_thaw;
-}
-
-static void
-camel_vee_folder_init (CamelVeeFolder *obj)
-{
- struct _CamelVeeFolderPrivate *p;
- CamelFolder *folder = (CamelFolder *)obj;
-
- p = _PRIVATE(obj) = g_malloc0(sizeof(*p));
-
- folder->folder_flags |= (CAMEL_FOLDER_HAS_SUMMARY_CAPABILITY |
- CAMEL_FOLDER_HAS_SEARCH_CAPABILITY);
-
- /* 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();
-
- p->summary_lock = g_mutex_new();
- p->subfolder_lock = g_mutex_new();
- p->changed_lock = g_mutex_new();
-}
-
-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);
- camel_object_unhook_event((CamelObject *)f, "deleted", (CamelObjectEventHookFunc) subfolder_deleted, vf);
- /* this updates the vfolder */
- if ((vf->flags & CAMEL_STORE_FOLDER_PRIVATE) == 0)
- vee_folder_remove_folder(vf, f, FALSE);
- }
- 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);
-
- g_mutex_free(p->summary_lock);
- g_mutex_free(p->subfolder_lock);
- g_mutex_free(p->changed_lock);
-
- 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);
- int i;
-
- 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);
-
- /* update the freeze state of 'sub' to match our freeze state */
- for (i = 0; i < p->freeze_count; i++)
- camel_folder_freeze (sub);
- }
- if ((vf->flags & CAMEL_STORE_FOLDER_PRIVATE) == 0 && !CAMEL_IS_VEE_FOLDER(sub)) {
- camel_object_ref((CamelObject *)sub);
- up->folders = g_list_append(up->folders, sub);
- /* update the freeze state of 'sub' to match Unmatched's freeze state */
- for (i = 0; i < up->freeze_count; i++)
- camel_folder_freeze (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);
- camel_object_hook_event((CamelObject *)sub, "deleted", (CamelObjectEventHookFunc)subfolder_deleted, 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);
- int killun = FALSE;
- int i;
-
- 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;
- }
-
- camel_object_unhook_event((CamelObject *)sub, "folder_changed", (CamelObjectEventHookFunc) folder_changed, vf);
- camel_object_unhook_event((CamelObject *)sub, "message_changed", (CamelObjectEventHookFunc) message_changed, vf);
- camel_object_unhook_event((CamelObject *)sub, "deleted", (CamelObjectEventHookFunc) subfolder_deleted, vf);
-
- p->folders = g_list_remove(p->folders, sub);
-
- /* undo the freeze state that we have imposed on this source folder */
- for (i = 0; i < p->freeze_count; i++)
- camel_folder_thaw (sub);
-
- CAMEL_VEE_FOLDER_UNLOCK(vf, subfolder_lock);
-
- CAMEL_VEE_FOLDER_LOCK(folder_unmatched, subfolder_lock);
- /* if folder deleted, then blow it away from unmatched always, and remove all refs to it */
- if (sub->folder_flags & CAMEL_FOLDER_HAS_BEEN_DELETED) {
- while (g_list_find(up->folders, sub)) {
- killun = TRUE;
- up->folders = g_list_remove(up->folders, sub);
- camel_object_unref((CamelObject *)sub);
-
- /* undo the freeze state that Unmatched has imposed on this source folder */
- for (i = 0; i < up->freeze_count; i++)
- camel_folder_thaw (sub);
- }
- } else if ((vf->flags & CAMEL_STORE_FOLDER_PRIVATE) == 0) {
- if (g_list_find(up->folders, sub) != NULL) {
- up->folders = g_list_remove(up->folders, sub);
- camel_object_unref((CamelObject *)sub);
-
- /* undo the freeze state that Unmatched has imposed on this source folder */
- for (i = 0; i < up->freeze_count; i++)
- camel_folder_thaw (sub);
- }
- if (g_list_find(up->folders, sub) == NULL) {
- killun = TRUE;
- }
- }
- CAMEL_VEE_FOLDER_UNLOCK(folder_unmatched, subfolder_lock);
-
- vee_folder_remove_folder(vf, sub, killun);
-
- 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);
- camel_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] = '_';
- }
-}
-
-/**
- * camel_vee_folder_get_location:
- * @vf:
- * @vinfo:
- * @realuid: if not NULL, set to the uid of the real message, must be
- * g_free'd by caller.
- *
- * Find the real folder (and uid)
- *
- * Return value:
- **/
-CamelFolder *
-camel_vee_folder_get_location(CamelVeeFolder *vf, const CamelVeeMessageInfo *vinfo, char **realuid)
-{
- /* locking? yes? no? although the vfolderinfo is valid when obtained
- the folder in it might not necessarily be so ...? */
- if (CAMEL_IS_VEE_FOLDER(vinfo->folder)) {
- CamelFolder *folder;
- const CamelVeeMessageInfo *vfinfo;
-
- vfinfo = (CamelVeeMessageInfo *)camel_folder_get_message_info(vinfo->folder, camel_message_info_uid(vinfo)+8);
- folder = camel_vee_folder_get_location((CamelVeeFolder *)vinfo->folder, vfinfo, realuid);
- camel_folder_free_message_info(vinfo->folder, (CamelMessageInfo *)vfinfo);
- return folder;
- } else {
- if (realuid)
- *realuid = g_strdup(camel_message_info_uid(vinfo)+8);
-
- return vinfo->folder;
- }
-}
-
-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)) {
- char *desc;
-
- camel_object_get(f, NULL, CAMEL_OBJECT_DESCRIPTION, &desc, NULL);
- camel_exception_setv(ex, ex->id, _("Error storing `%s': %s"), desc, ex->desc);
- break;
- }
-
- if (vee_folder_build_folder(vf, f, ex) == -1)
- break;
-
- node = node->next;
- }
-
- if (node == NULL) {
- 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)->klass)->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);
-
- if (vf != folder_unmatched)
- expr = g_strdup_printf ("(and %s %s)", vf->expression, expression);
- else
- expr = g_strdup (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);
- /* FIXME: shouldn't ignore search exception */
- matches = camel_folder_search_by_expression(f, expression, NULL);
- if (matches) {
- for (i = 0; i < matches->len; i++) {
- char *uid = matches->pdata[i], *vuid;
-
- vuid = g_malloc(strlen(uid)+9);
- memcpy(vuid, hash, 8);
- strcpy(vuid+8, uid);
- g_ptr_array_add(result, vuid);
- }
- 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 GPtrArray *
-vee_search_by_uids(CamelFolder *folder, const char *expression, GPtrArray *uids, CamelException *ex)
-{
- GList *node;
- GPtrArray *matches, *result = g_ptr_array_new ();
- GPtrArray *folder_uids = 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);
-
- /* map the vfolder uid's to the source folder uid's first */
- g_ptr_array_set_size(folder_uids, 0);
- for (i=0;i<uids->len;i++) {
- char *uid = uids->pdata[i];
-
- if (strlen(uid) >= 8 && strncmp(uid, hash, 8) == 0)
- g_ptr_array_add(folder_uids, uid+8);
- }
- if (folder_uids->len > 0) {
- matches = camel_folder_search_by_uids(f, expression, folder_uids, ex);
- if (matches) {
- for (i = 0; i < matches->len; i++) {
- char *uid = matches->pdata[i], *vuid;
-
- vuid = g_malloc(strlen(uid)+9);
- memcpy(vuid, hash, 8);
- strcpy(vuid+8, uid);
- g_ptr_array_add(result, vuid);
- }
- camel_folder_search_free(f, matches);
- } else {
- g_warning("Search failed: %s", camel_exception_get_description(ex));
- }
- }
- 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);
- g_ptr_array_free(folder_uids, 0);
-
- 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) {
- camel_folder_set_message_flags(mi->folder, camel_message_info_uid(mi) + 8, flags, set);
- camel_folder_summary_info_free(folder->summary, (CamelMessageInfo *)mi);
- ((CamelFolderClass *)camel_vee_folder_parent)->set_message_flags(folder, uid, flags, set);
- }
-}
-
-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) {
- 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);
- ((CamelFolderClass *)camel_vee_folder_parent)->set_message_user_flag(folder, uid, name, value);
- }
-}
-
-static void
-vee_set_message_user_tag(CamelFolder *folder, const char *uid, const char *name, const char *value)
-{
- CamelVeeMessageInfo *mi;
-
- mi = (CamelVeeMessageInfo *)camel_folder_summary_uid(folder->summary, uid);
- if (mi) {
- camel_folder_set_message_user_tag(mi->folder, camel_message_info_uid(mi) + 8, name, value);
- camel_folder_summary_info_free(folder->summary, (CamelMessageInfo *)mi);
- ((CamelFolderClass *)camel_vee_folder_parent)->set_message_user_tag(folder, uid, name, value);
- }
-}
-
-static void
-vee_append_message(CamelFolder *folder, CamelMimeMessage *message, const CamelMessageInfo *info, char **appended_uid, CamelException *ex)
-{
- camel_exception_set(ex, CAMEL_EXCEPTION_SYSTEM, _("Cannot copy or move messages into a Virtual Folder"));
-}
-
-static void
-vee_transfer_messages_to (CamelFolder *folder, GPtrArray *uids, CamelFolder *dest, GPtrArray **transferred_uids, gboolean delete_originals, CamelException *ex)
-{
- camel_exception_set(ex, CAMEL_EXCEPTION_SYSTEM, _("Cannot copy or move messages into a Virtual Folder"));
-}
-
-static void vee_rename(CamelFolder *folder, const char *new)
-{
- CamelVeeFolder *vf = (CamelVeeFolder *)folder;
-
- g_free(vf->vname);
- vf->vname = g_strdup(new);
-
- ((CamelFolderClass *)camel_vee_folder_parent)->rename(folder, new);
-}
-
-/* ********************************************************************** *
- 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 *vuid;
- const char *uid;
- CamelFolder *folder = (CamelFolder *)vf;
- CamelMessageInfo *dinfo;
-
- uid = camel_message_info_uid(info);
- vuid = alloca(strlen(uid)+9);
- memcpy(vuid, hash, 8);
- strcpy(vuid+8, uid);
- dinfo = camel_folder_summary_uid(folder->summary, vuid);
- if (dinfo) {
- d(printf("w:clash, we already have '%s' in summary\n", vuid));
- camel_folder_summary_info_free(folder->summary, dinfo);
- return NULL;
- }
-
- d(printf("adding vuid %s to %s\n", vuid, 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, vuid, FALSE);
-#elif defined (DOESTRV)
- mi->info.strings = e_strv_set_ref(mi->info.strings, CAMEL_MESSAGE_INFO_UID, vuid);
- mi->info.strings = e_strv_pack(mi->info.strings);
-#else
- g_free(mi->info.uid);
- mi->info.uid = g_strdup(vuid);
-#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 killun)
-{
- int i, count, n, still, start, last;
- 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 && !killun) {
- CAMEL_VEE_FOLDER_LOCK(folder_unmatched, subfolder_lock);
- still = g_list_find(_PRIVATE(folder_unmatched)->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);
-
- /* See if we just blow all uid's from this folder away from unmatched, regardless */
- if (killun) {
- start = -1;
- last = -1;
- 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) {
- camel_folder_change_info_remove_uid(folder_unmatched->changes, camel_message_info_uid(mi));
- if (last == -1) {
- last = start = i;
- } else if (last+1 == i) {
- last = i;
- } else {
- camel_folder_summary_remove_range(((CamelFolder *)folder_unmatched)->summary, start, last);
- i -= (last-start)+1;
- start = last = i;
- }
- }
- camel_folder_summary_info_free(((CamelFolder *)folder_unmatched)->summary, (CamelMessageInfo *)mi);
- }
- }
- if (last != -1)
- camel_folder_summary_remove_range(((CamelFolder *)folder_unmatched)->summary, start, last);
- }
-
- start = -1;
- last = -1;
- 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);
-
- if (last == -1) {
- last = start = i;
- } else if (last+1 == i) {
- last = i;
- } else {
- camel_folder_summary_remove_range(folder->summary, start, last);
- i -= (last-start)+1;
- start = last = 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, GINT_TO_POINTER(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_info_free(folder->summary, (CamelMessageInfo *)mi);
- }
- }
-
- if (last != -1)
- camel_folder_summary_remove_range(folder->summary, start, last);
-
- 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);
- memcpy(uid, u->hash, 8);
- strcpy(uid+8, uidin);
- n = GPOINTER_TO_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 (!CAMEL_IS_VEE_FOLDER(u->source)) {
- if (g_hash_table_lookup_extended(unmatched_uids, camel_message_info_uid(mi), (void **)&oldkey, (void **)&n)) {
- g_hash_table_insert(unmatched_uids, oldkey, GINT_TO_POINTER(n+1));
- } else {
- g_hash_table_insert(unmatched_uids, g_strdup(camel_message_info_uid(mi)), GINT_TO_POINTER(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, start, last;
- 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 */
- start = -1;
- last = -1;
- 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) {
- if (last == -1) {
- last = start = i;
- } else if (last+1 == i) {
- last = i;
- } else {
- camel_folder_summary_remove_range(folder->summary, start, last);
- i -= (last-start)+1;
- start = last = i;
- }
- camel_folder_change_info_remove_uid(vf->changes, camel_message_info_uid(mi));
- if (!CAMEL_IS_VEE_FOLDER(source)
- && 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, GINT_TO_POINTER(n-1));
- }
- }
- } else {
- g_hash_table_remove(matchhash, uid+8);
- }
- }
- camel_folder_summary_info_free(folder->summary, (CamelMessageInfo *)mi);
- }
- }
- if (last != -1)
- camel_folder_summary_remove_range(folder->summary, start, last);
-
- /* 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 */
- if (!CAMEL_IS_VEE_FOLDER(source))
- 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")
-
- */
-
-
-/* Hold all these with summary lock and unmatched summary lock held */
-static void
-folder_changed_add_uid(CamelFolder *sub, const char *uid, const char hash[8], CamelVeeFolder *vf)
-{
- CamelVeeMessageInfo *vinfo;
- const char *vuid;
- char *oldkey;
- int n;
-
- vinfo = vee_folder_add_uid(vf, sub, uid, hash);
- if (vinfo == NULL)
- return;
-
- vuid = camel_message_info_uid(vinfo);
- camel_folder_change_info_add_uid(vf->changes, vuid);
-
- if ((vf->flags & CAMEL_STORE_FOLDER_PRIVATE) == 0 && !CAMEL_IS_VEE_FOLDER(sub)) {
- if (g_hash_table_lookup_extended(unmatched_uids, vuid, (void **)&oldkey, (void **)&n)) {
- g_hash_table_insert(unmatched_uids, oldkey, GINT_TO_POINTER(n+1));
- } else {
- g_hash_table_insert(unmatched_uids, g_strdup(vuid), (void *)1);
- }
- vinfo = (CamelVeeMessageInfo *)camel_folder_get_message_info((CamelFolder *)folder_unmatched, vuid);
- if (vinfo) {
- camel_folder_change_info_remove_uid(folder_unmatched->changes, vuid);
- camel_folder_summary_remove(((CamelFolder *)folder_unmatched)->summary, (CamelMessageInfo *)vinfo);
- camel_folder_free_message_info((CamelFolder *)folder_unmatched, (CamelMessageInfo *)vinfo);
- }
- }
-}
-
-static void
-folder_changed_remove_uid(CamelFolder *sub, const char *uid, const char hash[8], int keep, CamelVeeFolder *vf)
-{
- CamelFolder *folder = (CamelFolder *)vf;
- char *vuid, *oldkey;
- int n;
- CamelVeeMessageInfo *vinfo;
-
- vuid = alloca(strlen(uid)+9);
- memcpy(vuid, hash, 8);
- strcpy(vuid+8, uid);
-
- 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 && !CAMEL_IS_VEE_FOLDER(sub)) {
- if (keep) {
- if (g_hash_table_lookup_extended(unmatched_uids, vuid, (void **)&oldkey, (void **)&n)) {
- if (n == 1) {
- g_hash_table_remove(unmatched_uids, oldkey);
- if (vee_folder_add_uid(folder_unmatched, sub, uid, hash))
- camel_folder_change_info_add_uid(folder_unmatched->changes, oldkey);
- g_free(oldkey);
- } else {
- g_hash_table_insert(unmatched_uids, oldkey, GINT_TO_POINTER(n-1));
- }
- } else {
- if (vee_folder_add_uid(folder_unmatched, sub, uid, hash))
- camel_folder_change_info_add_uid(folder_unmatched->changes, oldkey);
- }
- } else {
- if (g_hash_table_lookup_extended(unmatched_uids, vuid, (void **)&oldkey, (void **)&n)) {
- g_hash_table_remove(unmatched_uids, oldkey);
- g_free(oldkey);
- }
-
- vinfo = (CamelVeeMessageInfo *)camel_folder_get_message_info((CamelFolder *)folder_unmatched, vuid);
- if (vinfo) {
- camel_folder_change_info_remove_uid(folder_unmatched->changes, vuid);
- camel_folder_summary_remove_uid(((CamelFolder *)folder_unmatched)->summary, vuid);
- camel_folder_free_message_info((CamelFolder *)folder_unmatched, (CamelMessageInfo *)vinfo);
- }
- }
- }
-}
-
-static void
-folder_changed_change_uid(CamelFolder *sub, const char *uid, const char hash[8], CamelVeeFolder *vf)
-{
- char *vuid;
- CamelVeeMessageInfo *vinfo, *uinfo;
- CamelMessageInfo *info;
- CamelFolder *folder = (CamelFolder *)vf;
-
- vuid = alloca(strlen(uid)+9);
- memcpy(vuid, hash, 8);
- strcpy(vuid+8, uid);
-
- vinfo = (CamelVeeMessageInfo *)camel_folder_summary_uid(folder->summary, vuid);
- uinfo = (CamelVeeMessageInfo *)camel_folder_summary_uid(((CamelFolder *)folder_unmatched)->summary, vuid);
- if (vinfo || uinfo) {
- info = camel_folder_get_message_info(sub, uid);
- if (info) {
- if (vinfo) {
- int changed = FALSE;
-
- if (vinfo->info.flags != info->flags){
- vinfo->info.flags = info->flags;
- changed = TRUE;
- }
-
- changed |= camel_flag_list_copy(&vinfo->info.user_flags, &info->user_flags);
- changed |= camel_tag_list_copy(&vinfo->info.user_tags, &info->user_tags);
- if (changed)
- camel_folder_change_info_change_uid(vf->changes, vuid);
-
- camel_folder_summary_info_free(folder->summary, (CamelMessageInfo *)vinfo);
- }
-
- if (uinfo) {
- int changed = FALSE;
-
- if (uinfo->info.flags != info->flags){
- uinfo->info.flags = info->flags;
- changed = TRUE;
- }
-
- changed |= camel_flag_list_copy(&uinfo->info.user_flags, &info->user_flags);
- changed |= camel_tag_list_copy(&uinfo->info.user_tags, &info->user_tags);
- if (changed)
- camel_folder_change_info_change_uid(folder_unmatched->changes, vuid);
-
- camel_folder_summary_info_free(((CamelFolder *)folder_unmatched)->summary, (CamelMessageInfo *)uinfo);
- }
-
- camel_folder_free_message_info(sub, info);
- } else {
- if (vinfo) {
- folder_changed_remove_uid(sub, uid, hash, FALSE, vf);
- camel_folder_summary_info_free(folder->summary, (CamelMessageInfo *)vinfo);
- }
- if (uinfo)
- camel_folder_summary_info_free(((CamelFolder *)folder_unmatched)->summary, (CamelMessageInfo *)uinfo);
- }
- }
-}
-
-struct _folder_changed_msg {
- CamelSessionThreadMsg msg;
- CamelFolderChangeInfo *changes;
- CamelFolder *sub;
- CamelVeeFolder *vf;
-};
-
-static void
-folder_changed_change(CamelSession *session, CamelSessionThreadMsg *msg)
-{
- struct _folder_changed_msg *m = (struct _folder_changed_msg *)msg;
- CamelFolder *sub = m->sub;
- CamelFolder *folder = (CamelFolder *)m->vf;
- CamelVeeFolder *vf = m->vf;
- CamelFolderChangeInfo *changes = m->changes;
- char *vuid = NULL, hash[8];
- const char *uid;
- CamelVeeMessageInfo *vinfo;
- int i, vuidlen = 0;
- CamelFolderChangeInfo *vf_changes = NULL, *unmatched_changes = NULL;
- GPtrArray *matches_added = NULL, /* newly added, that match */
- *matches_changed = NULL, /* newly changed, that now match */
- *newchanged = NULL,
- *changed;
- GPtrArray *always_changed = NULL;
- GHashTable *matches_hash;
-
- /* Check the folder hasn't beem removed while we weren't watching */
- CAMEL_VEE_FOLDER_LOCK(vf, subfolder_lock);
- if (g_list_find(_PRIVATE(vf)->folders, sub) == NULL) {
- CAMEL_VEE_FOLDER_UNLOCK(vf, subfolder_lock);
- return;
- }
-
- camel_vee_folder_hash_folder(sub, hash);
-
- /* Lookup anything before we lock anything, to avoid deadlock with build_folder */
-
- /* Find newly added that match */
- if (changes->uid_added->len > 0) {
- dd(printf(" Searching for added matches '%s'\n", vf->expression));
- matches_added = camel_folder_search_by_uids(sub, vf->expression, changes->uid_added, NULL);
- }
-
- /* TODO:
- In this code around here, we can work out if the search will affect the changes
- we had, and only re-search against them if they might have */
-
- /* Search for changed items that newly match, but only if we dont have them */
- changed = changes->uid_changed;
- if (changed->len > 0) {
- dd(printf(" Searching for changed matches '%s'\n", vf->expression));
-
- if ((vf->flags & CAMEL_STORE_VEE_FOLDER_AUTO) == 0) {
- newchanged = g_ptr_array_new();
- always_changed = g_ptr_array_new();
- for (i=0;i<changed->len;i++) {
- uid = changed->pdata[i];
- if (strlen(uid)+9 > vuidlen) {
- vuidlen = strlen(uid)+64;
- vuid = g_realloc(vuid, vuidlen);
- }
- memcpy(vuid, hash, 8);
- strcpy(vuid+8, uid);
- vinfo = (CamelVeeMessageInfo *)camel_folder_summary_uid(folder->summary, vuid);
- if (vinfo == NULL) {
- g_ptr_array_add(newchanged, (char *)uid);
- } else {
- g_ptr_array_add(always_changed, (char *)uid);
- camel_folder_summary_info_free(folder->summary, (CamelMessageInfo *)vinfo);
- }
- }
- changed = newchanged;
- }
-
- if (changed->len)
- matches_changed = camel_folder_search_by_uids(sub, vf->expression, changed, NULL);
- }
-
- CAMEL_VEE_FOLDER_LOCK(vf, summary_lock);
- CAMEL_VEE_FOLDER_LOCK(folder_unmatched, summary_lock);
-
- dd(printf("Vfolder '%s' subfolder changed '%s'\n", folder->full_name, sub->full_name));
- dd(printf(" changed %d added %d removed %d\n", changes->uid_changed->len, changes->uid_added->len, changes->uid_removed->len));
-
- /* Always remove removed uid's, in any case */
- for (i=0;i<changes->uid_removed->len;i++) {
- dd(printf(" removing uid '%s'\n", (char *)changes->uid_removed->pdata[i]));
- folder_changed_remove_uid(sub, changes->uid_removed->pdata[i], hash, FALSE, vf);
- }
-
- /* Add any newly matched or to unmatched folder if they dont */
- if (matches_added) {
- matches_hash = g_hash_table_new(g_str_hash, g_str_equal);
- for (i=0;i<matches_added->len;i++) {
- dd(printf(" %s", (char *)matches_added->pdata[i]));
- g_hash_table_insert(matches_hash, matches_added->pdata[i], matches_added->pdata[i]);
- }
- for (i=0;i<changes->uid_added->len;i++) {
- uid = changes->uid_added->pdata[i];
- if (g_hash_table_lookup(matches_hash, uid)) {
- dd(printf(" adding uid '%s' [newly matched]\n", (char *)uid));
- folder_changed_add_uid(sub, uid, hash, vf);
- } else if ((vf->flags & CAMEL_STORE_FOLDER_PRIVATE) == 0) {
- if (strlen(uid)+9 > vuidlen) {
- vuidlen = strlen(uid)+64;
- vuid = g_realloc(vuid, vuidlen);
- }
- memcpy(vuid, hash, 8);
- strcpy(vuid+8, uid);
-
- if (!CAMEL_IS_VEE_FOLDER(sub) && g_hash_table_lookup(unmatched_uids, vuid) == NULL) {
- dd(printf(" adding uid '%s' to Unmatched [newly unmatched]\n", (char *)uid));
- vinfo = (CamelVeeMessageInfo *)camel_folder_get_message_info((CamelFolder *)folder_unmatched, vuid);
- if (vinfo == NULL) {
- if (vee_folder_add_uid(folder_unmatched, sub, uid, hash))
- camel_folder_change_info_add_uid(folder_unmatched->changes, vuid);
- } else {
- camel_folder_free_message_info((CamelFolder *)folder_unmatched, (CamelMessageInfo *)vinfo);
- }
- }
- }
- }
- g_hash_table_destroy(matches_hash);
- }
-
- /* Change any newly changed */
- if (always_changed) {
- for (i=0;i<always_changed->len;i++)
- folder_changed_change_uid(sub, always_changed->pdata[i], hash, vf);
- g_ptr_array_free(always_changed, TRUE);
- }
-
- /* Change/add/remove any changed */
- if (matches_changed) {
- /* If we are auto-updating, then re-check changed uids still match */
- dd(printf(" Vfolder %supdate\nuids match:", (vf->flags & CAMEL_STORE_VEE_FOLDER_AUTO)?"auto-":""));
- matches_hash = g_hash_table_new(g_str_hash, g_str_equal);
- for (i=0;i<matches_changed->len;i++) {
- dd(printf(" %s", (char *)matches_changed->pdata[i]));
- g_hash_table_insert(matches_hash, matches_changed->pdata[i], matches_changed->pdata[i]);
- }
- dd(printf("\n"));
- for (i=0;i<changed->len;i++) {
- uid = changed->pdata[i];
- if (strlen(uid)+9 > vuidlen) {
- vuidlen = strlen(uid)+64;
- vuid = g_realloc(vuid, vuidlen);
- }
- memcpy(vuid, hash, 8);
- strcpy(vuid+8, uid);
- vinfo = (CamelVeeMessageInfo *)camel_folder_summary_uid(folder->summary, vuid);
- if (vinfo == NULL) {
- /* A uid we dont have, but now it matches, add it */
- if (g_hash_table_lookup(matches_hash, uid)) {
- dd(printf(" adding uid '%s' [newly matched]\n", uid));
- folder_changed_add_uid(sub, uid, hash, vf);
- }
- } else {
- if ((vf->flags & CAMEL_STORE_VEE_FOLDER_AUTO) == 0
- || g_hash_table_lookup(matches_hash, uid)) {
- /* still match, or we're not auto-updating, change event, (if it changed) */
- dd(printf(" changing uid '%s' [still matches]\n", uid));
- folder_changed_change_uid(sub, uid, hash, vf);
- } else {
- /* No longer matches, remove it, but keep it in unmatched (potentially) */
- dd(printf(" removing uid '%s' [did match]\n", uid));
- folder_changed_remove_uid(sub, uid, hash, TRUE, vf);
- }
- camel_folder_summary_info_free(folder->summary, (CamelMessageInfo *)vinfo);
- }
- }
- g_hash_table_destroy(matches_hash);
- }
-
- 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);
-
- /* Cleanup stuff on our folder */
- if (matches_added)
- camel_folder_search_free(sub, matches_added);
-
- if (matches_changed)
- camel_folder_search_free(sub, matches_changed);
-
- CAMEL_VEE_FOLDER_UNLOCK(vf, subfolder_lock);
-
- /* cleanup the rest */
- if (newchanged)
- g_ptr_array_free(newchanged, TRUE);
-
- g_free(vuid);
-
- if (unmatched_changes) {
- camel_object_trigger_event((CamelObject *)folder_unmatched, "folder_changed", unmatched_changes);
- camel_folder_change_info_free(unmatched_changes);
- }
-
- if (vf_changes) {
- /* If not auto-updating, keep track of changed folders for later re-sync */
- if ((vf->flags & CAMEL_STORE_VEE_FOLDER_AUTO) == 0) {
- CAMEL_VEE_FOLDER_LOCK(vf, changed_lock);
- 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_object_trigger_event((CamelObject *)vf, "folder_changed", vf_changes);
- camel_folder_change_info_free(vf_changes);
- }
-}
-
-static void
-folder_changed_free(CamelSession *session, CamelSessionThreadMsg *msg)
-{
- struct _folder_changed_msg *m = (struct _folder_changed_msg *)msg;
-
- camel_folder_change_info_free(m->changes);
- camel_object_unref((CamelObject *)m->vf);
- camel_object_unref((CamelObject *)m->sub);
-}
-
-static CamelSessionThreadOps folder_changed_ops = {
- folder_changed_change,
- folder_changed_free,
-};
-
-static void
-folder_changed(CamelFolder *sub, CamelFolderChangeInfo *changes, CamelVeeFolder *vf)
-{
- struct _folder_changed_msg *m;
- CamelSession *session = ((CamelService *)((CamelFolder *)vf)->parent_store)->session;
-
- m = camel_session_thread_msg_new(session, &folder_changed_ops, sizeof(*m));
- m->changes = camel_folder_change_info_new();
- camel_folder_change_info_cat(m->changes, changes);
- m->sub = sub;
- camel_object_ref((CamelObject *)sub);
- m->vf = vf;
- camel_object_ref((CamelObject *)vf);
- camel_session_thread_queue(session, &m->msg, 0);
-}
-
-/* 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);
-}
-
-/* track vanishing folders */
-static void
-subfolder_deleted(CamelFolder *f, void *event_data, CamelVeeFolder *vf)
-{
- camel_vee_folder_remove_folder(vf, f);
-}
-
-
-static void
-vee_freeze (CamelFolder *folder)
-{
- CamelVeeFolder *vfolder = (CamelVeeFolder *) folder;
- struct _CamelVeeFolderPrivate *p = _PRIVATE (vfolder);
- GList *node;
-
- CAMEL_VEE_FOLDER_LOCK (vfolder, subfolder_lock);
-
- p->freeze_count++;
-
- node = p->folders;
- while (node) {
- CamelFolder *f = node->data;
-
- camel_folder_freeze (f);
- node = node->next;
- }
-
- CAMEL_VEE_FOLDER_UNLOCK (vfolder, subfolder_lock);
-
- /* call parent implementation */
- CAMEL_FOLDER_CLASS (camel_vee_folder_parent)->freeze (folder);
-}
-
-static void
-vee_thaw (CamelFolder *folder)
-{
- CamelVeeFolder *vfolder = (CamelVeeFolder *) folder;
- struct _CamelVeeFolderPrivate *p = _PRIVATE (vfolder);
- GList *node;
-
- CAMEL_VEE_FOLDER_LOCK (vfolder, subfolder_lock);
-
- p->freeze_count--;
-
- node = p->folders;
- while (node) {
- CamelFolder *f = node->data;
-
- camel_folder_thaw (f);
- node = node->next;
- }
-
- CAMEL_VEE_FOLDER_UNLOCK (vfolder, subfolder_lock);
-
- /* call parent implementation */
- CAMEL_FOLDER_CLASS (camel_vee_folder_parent)->thaw (folder);
-}
diff --git a/camel/camel-vee-folder.h b/camel/camel-vee-folder.h
deleted file mode 100644
index 3339b3a1d9..0000000000
--- a/camel/camel-vee-folder.h
+++ /dev/null
@@ -1,84 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#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"
-
-CamelType 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);
-
-CamelFolder *camel_vee_folder_get_location(CamelVeeFolder *vf, const CamelVeeMessageInfo *vinfo, char **realuid);
-
-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]);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* ! _CAMEL_VEE_FOLDER_H */
diff --git a/camel/camel-vee-store.c b/camel/camel-vee-store.c
deleted file mode 100644
index b13522b8de..0000000000
--- a/camel/camel-vee-store.c
+++ /dev/null
@@ -1,324 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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-exception.h"
-#include "camel-vee-store.h"
-#include "camel-vee-folder.h"
-
-#include "camel-private.h"
-
-#include <string.h>
-
-#define d(x)
-
-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 void vee_init_junk (CamelStore *store);
-static CamelFolder *vee_get_junk (CamelStore *store, CamelException *ex);
-
-static CamelFolderInfo *vee_get_folder_info(CamelStore *store, const char *top, guint32 flags, CamelException *ex);
-
-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 = (CamelStoreClass *)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;
- store_class->init_junk = vee_init_junk;
- store_class->get_junk = vee_get_junk;
-}
-
-static void
-camel_vee_store_init (CamelVeeStore *obj)
-{
- CamelStore *store = (CamelStore *)obj;
-
- /* we dont want a vtrash/vjunk on this one */
- store->flags &= ~(CAMEL_STORE_VTRASH | CAMEL_STORE_VJUNK);
-}
-
-static void
-camel_vee_store_finalise (CamelObject *obj)
-{
- ;
-}
-
-/**
- * camel_vee_store_new:
- *
- * Create a new CamelVeeStore object.
- *
- * Return value: A new CamelVeeStore widget.
- **/
-CamelVeeStore *
-camel_vee_store_new (void)
-{
- CamelVeeStore *new = CAMEL_VEE_STORE(camel_object_new(camel_vee_store_get_type ()));
- return new;
-}
-
-/* flags
- 1 = delete (0 = add)
- 2 = noselect
-*/
-#define CHANGE_ADD (0)
-#define CHANGE_DELETE (1)
-#define CHANGE_NOSELECT (2)
-
-static void
-change_folder(CamelStore *store, const char *name, guint32 flags, int count)
-{
- CamelFolderInfo *fi;
- const char *tmp;
-
- fi = g_malloc0(sizeof(*fi));
- fi->full_name = g_strdup(name);
- tmp = strrchr(name, '/');
- if (tmp == NULL)
- tmp = name;
- else
- tmp++;
- fi->name = g_strdup(tmp);
- fi->url = g_strdup_printf("vfolder:%s%s#%s", ((CamelService *)store)->url->path, (flags&CHANGE_NOSELECT)?";noselect=yes":"", name);
- fi->unread_message_count = count;
- camel_folder_info_build_path(fi, '/');
- camel_object_trigger_event(store, (flags&CHANGE_DELETE)?"folder_deleted":"folder_created", fi);
- camel_folder_info_free(fi);
-}
-
-static CamelFolder *
-vee_get_folder (CamelStore *store, const char *folder_name, guint32 flags, CamelException *ex)
-{
- CamelVeeFolder *vf;
- CamelFolder *folder;
- char *name, *p;
-
- vf = (CamelVeeFolder *)camel_vee_folder_new(store, folder_name, flags);
- if ((vf->flags & CAMEL_STORE_FOLDER_PRIVATE) == 0) {
- /* Check that parents exist, if not, create dummy ones */
- name = alloca(strlen(vf->vname)+1);
- strcpy(name, vf->vname);
- p = name;
- while ( (p = strchr(p, '/'))) {
- *p = 0;
-
- folder = camel_object_bag_get(store->folders, name);
- if (folder == NULL)
- change_folder(store, name, CHANGE_ADD|CHANGE_NOSELECT, -1);
- else
- camel_object_unref(folder);
- *p++='/';
- }
-
- change_folder(store, vf->vname, CHANGE_ADD, camel_folder_get_message_count((CamelFolder *)vf));
- }
-
- return (CamelFolder *)vf;
-}
-
-static void
-vee_init_trash (CamelStore *store)
-{
- /* no-op */
- ;
-}
-
-static CamelFolder *
-vee_get_trash (CamelStore *store, CamelException *ex)
-{
- return NULL;
-}
-
-static void
-vee_init_junk (CamelStore *store)
-{
- /* no-op */
- ;
-}
-
-static CamelFolder *
-vee_get_junk (CamelStore *store, CamelException *ex)
-{
- return NULL;
-}
-
-static CamelFolderInfo *
-vee_get_folder_info(CamelStore *store, const char *top, guint32 flags, CamelException *ex)
-{
- CamelFolderInfo *info;
- GPtrArray *folders, *infos;
- int i;
-
- infos = g_ptr_array_new();
- folders = camel_object_bag_list(store->folders);
- for (i=0;i<folders->len;i++) {
- CamelVeeFolder *folder = folders->pdata[i];
- int add = FALSE;
- char *name = ((CamelFolder *)folder)->full_name;
-
- /* check we have to include this one */
- if (top) {
- if (flags & CAMEL_STORE_FOLDER_INFO_RECURSIVE) {
- int namelen = strlen(name);
- int toplen = strlen(top);
-
- add = ((namelen == toplen &&
- strcmp(name, top) == 0)
- || ((namelen > toplen)
- && strncmp(name, top, toplen) == 0
- && name[toplen] == '/'));
- } else {
- add = strcmp(name, top) == 0;
- }
- } else {
- if ((flags & CAMEL_STORE_FOLDER_INFO_RECURSIVE) == 0)
- add = strchr(name, '/') == NULL;
- }
-
- if (add) {
- /* ensures unread is correct */
- if ((flags & CAMEL_STORE_FOLDER_INFO_FAST) == 0)
- camel_folder_refresh_info((CamelFolder *)folder, NULL);
-
- 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 = camel_folder_get_unread_message_count((CamelFolder *)folder);
- g_ptr_array_add(infos, info);
- }
- camel_object_unref(folder);
- }
- g_ptr_array_free(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(infos, info);
- }
-
- /* convert it into a tree */
- info = camel_folder_info_build(infos, (top&&top[0])?top:"", '/', TRUE);
- g_ptr_array_free(infos, TRUE);
-
- return info;
-}
-
-static void
-vee_delete_folder(CamelStore *store, const char *folder_name, CamelException *ex)
-{
- CamelFolder *folder;
-
- 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;
- }
-
- folder = camel_object_bag_get(store->folders, folder_name);
- if (folder) {
- camel_object_bag_remove(store->folders, folder);
-
- if (store->vtrash)
- camel_vee_folder_remove_folder((CamelVeeFolder *)store->vtrash, folder);
- if (store->vjunk)
- camel_vee_folder_remove_folder((CamelVeeFolder *)store->vjunk, folder);
-
- if ((((CamelVeeFolder *)folder)->flags & CAMEL_STORE_FOLDER_PRIVATE) == 0) {
- /* what about now-empty parents? ignore? */
- change_folder(store, folder_name, CHANGE_DELETE, -1);
- }
-
- camel_object_unref(folder);
- } else {
- 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;
-
- d(printf("vee rename folder '%s' '%s'\n", old, new));
-
- if (strcmp(old, CAMEL_UNMATCHED_NAME) == 0) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- _("Cannot rename folder: %s: Invalid operation"), old);
- return;
- }
-
- /* See if it exists, for vfolders, all folders are in the folders hash */
- folder = camel_object_bag_get(store->folders, old);
- if (folder == NULL) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- _("Cannot rename folder: %s: No such folder"), old);
- } else {
- camel_object_unref(folder);
- }
-}
diff --git a/camel/camel-vee-store.h b/camel/camel-vee-store.h
deleted file mode 100644
index d0352046be..0000000000
--- a/camel/camel-vee-store.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: Michael Zucchi <notzed@ximian.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#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 _CamelVeeStoreClass {
- CamelStoreClass parent_class;
-};
-
-CamelType camel_vee_store_get_type (void);
-CamelVeeStore *camel_vee_store_new (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* ! _CAMEL_VEE_STORE_H */
diff --git a/camel/camel-vtrash-folder.c b/camel/camel-vtrash-folder.c
deleted file mode 100644
index aa21ce3c4c..0000000000
--- a/camel/camel-vtrash-folder.c
+++ /dev/null
@@ -1,209 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-#include <config.h>
-
-#include "camel-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, char **appended_uid,
- CamelException *ex);
-static void vtrash_transfer_messages_to (CamelFolder *folder, GPtrArray *uids,
- CamelFolder *dest, GPtrArray **transferred_uids,
- gboolean delete_originals, 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_vee_folder_get_type());
-
- folder_class->append_message = vtrash_append_message;
- folder_class->transfer_messages_to = vtrash_transfer_messages_to;
-}
-
-static void
-camel_vtrash_folder_init (CamelVTrashFolder *vtrash)
-{
- CamelFolder *folder = CAMEL_FOLDER (vtrash);
-
- folder->folder_flags |= CAMEL_FOLDER_IS_TRASH;
-}
-
-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,
- (CamelObjectInitFunc) camel_vtrash_folder_init,
- NULL);
- }
-
- return type;
-}
-
-/**
- * camel_vtrash_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, char **appended_uid,
- CamelException *ex)
-{
- /* no-op */
-}
-
-struct _transfer_data {
- CamelFolder *folder;
- CamelFolder *dest;
- GPtrArray *uids;
- gboolean delete;
-};
-
-static void
-transfer_messages(CamelFolder *folder, struct _transfer_data *md, CamelException *ex)
-{
- int i;
-
- if (!camel_exception_is_set (ex))
- camel_folder_transfer_messages_to(md->folder, md->uids, md->dest, NULL, md->delete, ex);
-
- for (i=0;i<md->uids->len;i++)
- g_free(md->uids->pdata[i]);
- g_ptr_array_free(md->uids, TRUE);
- camel_object_unref((CamelObject *)md->folder);
- g_free(md);
-}
-
-static void
-vtrash_transfer_messages_to (CamelFolder *source, GPtrArray *uids,
- CamelFolder *dest, GPtrArray **transferred_uids,
- gboolean delete_originals, CamelException *ex)
-{
- CamelVeeMessageInfo *mi;
- int i;
- GHashTable *batch = NULL;
- const char *tuid;
- struct _transfer_data *md;
-
- /* This is a special case of transfer_messages_to: Either the
- * source or the destination is a vtrash folder (but not both
- * since a store should never have more than one).
- */
-
- if (transferred_uids)
- *transferred_uids = NULL;
-
- if (CAMEL_IS_VTRASH_FOLDER (dest)) {
- /* Copy to trash is meaningless. */
- if (!delete_originals)
- return;
-
- /* Move to trash is the same as deleting the message */
- for (i = 0; i < uids->len; i++)
- camel_folder_delete_message (source, uids->pdata[i]);
- return;
- }
-
- g_return_if_fail (CAMEL_IS_VTRASH_FOLDER (source));
-
- /* Moving/Copying from the trash to the original folder = undelete.
- * Moving/Copying from the trash to a different folder = move/copy.
- *
- * Need to check this uid by uid, but we batch up the copies.
- */
-
- 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 transfer", (char *) uids->pdata[i]);
- continue;
- }
-
- if (dest == mi->folder) {
- /* Just undelete the original message */
- camel_folder_set_message_flags (source, uids->pdata[i], CAMEL_MESSAGE_DELETED, 0);
- } else {
- if (batch == NULL)
- batch = g_hash_table_new(NULL, NULL);
- md = g_hash_table_lookup(batch, mi->folder);
- if (md == NULL) {
- md = g_malloc0(sizeof(*md));
- md->folder = mi->folder;
- camel_object_ref((CamelObject *)md->folder);
- md->uids = g_ptr_array_new();
- md->dest = dest;
- g_hash_table_insert(batch, mi->folder, md);
- }
-
- tuid = uids->pdata[i];
- if (strlen(tuid)>8)
- tuid += 8;
- g_ptr_array_add(md->uids, g_strdup(tuid));
- }
- camel_folder_free_message_info (source, (CamelMessageInfo *)mi);
- }
-
- if (batch) {
- g_hash_table_foreach(batch, (GHFunc)transfer_messages, ex);
- g_hash_table_destroy(batch);
- }
-}
diff --git a/camel/camel-vtrash-folder.h b/camel/camel-vtrash-folder.h
deleted file mode 100644
index 089c969e71..0000000000
--- a/camel/camel-vtrash-folder.h
+++ /dev/null
@@ -1,63 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_VTRASH_FOLDER_H
-#define _CAMEL_VTRASH_FOLDER_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <camel/camel-folder.h>
-#include <camel/camel-vee-folder.h>
-
-#define CAMEL_VTRASH_NAME "Trash"
-#define CAMEL_VJUNK_NAME "Junk"
-
-#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);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* ! _CAMEL_VTRASH_FOLDER_H */
diff --git a/camel/camel.c b/camel/camel.c
deleted file mode 100644
index ae99da74c2..0000000000
--- a/camel/camel.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- * Bertrand Guiheneuf <bertrand@helixcode.com>
- *
- * Copyright 1999-2003 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 <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-certdb.h"
-#include "camel-mime-utils.h"
-
-gboolean camel_verbose_debug = FALSE;
-
-static void
-camel_shutdown (void)
-{
- CamelCertDB *certdb;
-
-#ifdef HAVE_NSS
- NSS_Shutdown ();
-
- PR_Cleanup ();
-#endif /* HAVE_NSS */
-
- certdb = camel_certdb_get_default ();
- if (certdb) {
- camel_certdb_save (certdb);
- camel_object_unref (certdb);
- }
-}
-
-int
-camel_init (const char *configdir, gboolean nss_init)
-{
- CamelCertDB *certdb;
- char *path;
- void camel_operation_init(void);
-
- if (getenv ("CAMEL_VERBOSE_DEBUG"))
- camel_verbose_debug = TRUE;
-
- /* initialise global camel_object_type */
- camel_object_get_type ();
-
- camel_mime_utils_init ();
- camel_operation_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 ();
-
- 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 */
-
- path = g_strdup_printf ("%s/camel-cert.db", configdir);
- certdb = camel_certdb_new ();
- camel_certdb_set_filename (certdb, path);
- g_free (path);
-
- /* if we fail to load, who cares? it'll just be a volatile certdb */
- camel_certdb_load (certdb);
-
- /* set this certdb as the default db */
- camel_certdb_set_default (certdb);
-
- camel_object_unref (certdb);
-
- g_atexit (camel_shutdown);
-
- return 0;
-}
diff --git a/camel/camel.h b/camel/camel.h
deleted file mode 100644
index 9aba4ebd1a..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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-data-wrapper.h>
-#include <camel/camel-exception.h>
-#include <camel/camel-folder.h>
-#include <camel/camel-digest-folder.h>
-#include <camel/camel-digest-store.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-canon.h>
-#include <camel/camel-mime-filter-charset.h>
-#include <camel/camel-mime-filter-enriched.h>
-#include <camel/camel-mime-filter-from.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-tohtml.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-multipart-encrypted.h>
-#include <camel/camel-multipart-signed.h>
-#include <camel/camel-gpg-context.h>
-#include <camel/camel-provider.h>
-#include <camel/camel-seekable-stream.h>
-#include <camel/camel-seekable-substream.h>
-#include <camel/camel-service.h>
-#include <camel/camel-session.h>
-#include <camel/camel-store.h>
-#include <camel/camel-stream-buffer.h>
-#include <camel/camel-stream-filter.h>
-#include <camel/camel-stream-fs.h>
-#include <camel/camel-stream-mem.h>
-#include <camel/camel-stream.h>
-#include <camel/camel-tcp-stream-raw.h>
-#include <camel/camel-tcp-stream-ssl.h>
-#include <camel/camel-tcp-stream.h>
-#include <camel/camel-transport.h>
-#include <camel/camel-uid-cache.h>
-#include <camel/camel-url.h>
-#include <camel/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-index.txt b/camel/devel-docs/camel-index.txt
deleted file mode 100644
index 0ebc250db0..0000000000
--- a/camel/devel-docs/camel-index.txt
+++ /dev/null
@@ -1,407 +0,0 @@
-
-The history of text-indexing in evolution.
-
-CamelTextIndex was written to address several shortcomings in the
-existing libibex (referred to as libibex2), which had been written to
-address shortcomings in the original libibex.
-
-Mail indexing characteristics
-
-First, i'll cover some of the scenarios that a mail indexing system
-must cover. They are slightly different from other indexing systems,
-at least we wanted them to be.
-
-1. Indexing a few new messages, they may potentially reference most of
- the alphabet in the index.
-2. Indexing a whole mailbox for the first time
-3. Unindexing anywhere from a few to all existing messages during expunge.
-4. Searching.
-
-Cases 1, 3, and 4 occur the most often, however 2 is the most noticeable
-at first use, or if the index must be reset. So the code needs to
-work fast in all cases, which generally leads to trade-offs being
-made. Each implementation aimed to address or ignore these
-requirements in different ways, with the final implementation probably
-having the best balance so far.
-
-The main issue is that the indexing be performed real time. We index
-as we add the messages. We index before we open the mailbox. We
-index as we remove messages. Because of this we need to approach
-things differently to many other indexing systems; most of which work
-with static data in an off-line mode. This allows them to index the
-whole body of content and use as much memory and cpu time as required.
-
-We probably need to look at doing offline, or at least delayed
-indexing in the future - but this introduces some coherency problems
-with vFolders and any body searches. However, having the indexing
-library a base part of Camel helps in implementing a mechanism to
-achieve this.
-
-Ibex the first
-
-The original ibex used a memory-based hash table to store words. This made
-the index very fast for both lookups and modifications. However any
-queries required a full load of the index into memory, and any updates
-required a full write of the index to disk. After about 5-10 000
-messages occasionaly adding to the index became appreciably slower as
-the whole index needed to be loaded into memory first. This obviously
-took a toll on memory as well.
-
-I wont cover the algorithms used, they were all pretty basic, the only
-real smarts were that index deletes were only flagged and that data
-not written to disk when the index saved.
-
-Evolution 1.x, ibex 2.
-
-In an attempt to rectify the incremental update performance of
-libibex, it was completely rewritten to use an on-disk block-based
-filesystem.
-
-Note: the first attempt used libdb - however performance was so slow
-and the indices were so large it was dropped in favour of a custom
-filesystem-like data file.
-
-The motivation was that a few extra disk lookups during
-retrieval wouldn't be noticeably slower, however it should be able to
-scale up to many more messages with lower memory overhead and slower
-startup time.
-
-The block filesystem contains 3 major components:
-
-1. A hash table that mapped message's to a word id sequence list.
-2. A hash table that mapped word's to a message id sequence list.
-3. A sequence filesystem that stored sequences of id's.
-
-The id's are 32 bit identifiers that are unique for each word or
-message. They are also designed to be reversible and static.
-That is, given the id, you can map it to the string identifier that it
-represents directly, without having to look it up in the hash table.
-
-Other features of this design is that the database file should be
-kept in sync at all times with the state of the index. The message to
-wordid tables are used to remove the messageid's from the word's it
-contains when the message is expunged, and so on.
-
-Indexing operation
-
-The indexing operation consists of the basic steps:
-
-1. Lookup the messageid from the message name, using the messageid table.
-2. Generate a list of words in the message
-3. For each word:
-4. Lookup the wordid and sequence information
-5. If the word doesn't exist, create a new word/wordid
-6. Add the messageid to the word sequence.
-7. Add the wordid to the message sequence.
-
-The initial implementation only used caching at the disk-block level.
-Unfortunately, the simple hash table design chosen (fixed sized base
-table with chained buckets) scaled very poorly above about 10 000
-messages. So this approach proved to be too i/o intensive for
-practical use, and several other caches were added to improve
-performance:
-
-1. Stage (1) above is done entirely in memory. At initial startup
- the whole list of potential names is read into an in-memory hash
- table.
-2. Stage (4) above is also done entirely in memory. Even a large
- cache provided little benefit due to wide distribution of potential
- words. This cache is only created when adding to the index.
-3. Stage (6) uses the table from stage (4) and concatenates upto
- approximately one disk blocks worth of messageid's before writing
- them out to the word sequence.
-4. Stage (7) concatenates all wordid's for a given message before
- writing them out at once.
-
-As you can see, the added complexity meant we nearly have to cache as
-much as the original version! This also almost removed all of the
-startup-time benefit for incremental update of the index, as the table
-was not stored as compactly on disk as the original version.
-
-However, we only ever stored a subset of the index in memory, and only
-during updates, with some tricks to reduce memory usage for very rare
-words, so the overall memory use was still much lower.
-
-Removing a message
-
-Removing a message is fairly involved:
-
-1. Lookup the messageid and word sequence list from the messageid table.
-2. For each wordid in the sequence list
-3. Lookup the message sequence list directly from the wordid table.
-4. Scan each block in the sequence, and remove any instances of the
- messageid.
-5. Remove the message to messageid mapping in the messageid table.
-
-Unfortunately caching helped very little here, particularly if many
-messages were removed. Also note that the file could never shrink as
-the data could be spread randomly over it. Removal is an extremely
-expensive an unbounded process. Deleting all of the messages in a
-mailbox is extremely i/o intensive, with blocks potentially being
-accessed dozens of times.
-
-Performing a query
-
-Performing a query is fast:
-
-1. Lookup the messageid sequence list from the wordid table.
-2. For each messageid
-3. Lookup the message name directly from the messageid table.
-
-Even without caching this performs at a very acceptable level.
-
-Summary
-
-This index performs reasonably well upto about 10 000 messages for a
-complete re-index. However with incremental updates it degrads much
-faster, only a few thousand messages added and it becomes tiresomely
-slow and i/o bound. The index becomes more fragmented with random
-updates and removals and heavily bogs down the system as you go much
-beyond those few thousand messages.
-
-The code is also very complicated and hard to follow. There are too
-many special cases, and it is buggy. Detected on-disk structure
-errors result in the index being reset, which although it shrinks the
-index, is very slow.
-
-The indices created are bulky, and never shrink. Because of the
-reverse index used for message removal, there is 50% redundant data at
-all times. Some overly tricky techniques (very much like ReiserFS's
-tail packing) are used to waste as little space as possible, with a
-great impact on performance.
-
-One other problem is that because the index is disk based, we
-use a file descriptor continuously. With some users having
->100 folders, they quickly run out of process file descriptors and
-evolution fails. To get around this a cache of least recently used
-index files is used to flush away and free file descriptors so they
-can be re-used. This makes it hard to lock the files; this problem
-still exists with the next implementation.
-
-Anyway, a better solution is required.
-
-CamelIndex
-
-The first problem to address was the api. It was starting to age.
-Although adequate, the api wasn't terribly clean, reusable, or
-scalable. The first thing was to objectise the library, and since we
-needed to use it in Camel, the best way was to create a CamelObject.
-
-CamelIndex was born. A mostly abstract class that provides a simple
-common interface for accessing indices, including cursors and utility
-and maintenance functions.
-
-In addition, a number of the features in libibex2 were simplified or
-rewritten and abstracted into the re-usable classes that follow.
-
-By providing simple cursors, more complex queries were easier to write
-and can execute more efficiently; camel searching now does sub-string
-searches for all body queries, and still runs at a very healthy speed
-and uses less memory than before.
-
-CamelBlockFile
-
-This is basically the same block filesystem used in libibex2. It
-handles disk i/o based on blocks (CamelBlock), flushing modified
-blocks to disk, and caching of recently accessed blocks. It was
-enhanced slightly to allow blocks to be locked in memory.
-
-CamelKeyFile
-
-This is a simple reverse-linked list of sequences of keyid's.
-
-The main property of this file is that updates are only ever appended
-to the end of the file, which improves i/o characteristics markedly.
-
-When an existing keyid sequence is updated, it simply points back to
-the start of the previous one, and provides a pointer to the new
-entry. i.e. a simple linked list.
-
-CamelKeyTable
-
-This is taken from the libibex2 code for mapping keys, with few
-changes. It uses a CamelBlockFile for its i/o.
-
-The key table is a linked list of blocks (CamelKeyBlock) which contain
-key strings and and a data pointer and flags for each key. Each block
-is a packed array of string descriptors (CamelKeyKey's).
-
-A keyid (camel_key_t) is a 32 bit descriptor which identifies this key
-in a reversible way. In this case the bottom 10 bits are used to
-identify the index of the key within the key block, and the top 22
-bits are used to identify the key block itself. In this way, given
-the 32 bit key id, we can reference the block containing the key
-directly (with at most 1 access), and access the flags and key string
-using the key index.
-
-Keys can potentially be removed and their keyid's reused by simply
-re-packing the key block. This was used in libibex2, but not in
-CamelIndex.
-
-[diagram - camelkeyblock]
-
-CamelPartitionTable
-
-An implementation of a scalable, on-disk 'perfect' hash table. It
-uses the CamelBlockFile to handle its i/o. This is a completely new
-hash table implementation which was not present in libibex2.
-
-[FIXME: Reference the original paper the algorithm is based on.]
-
-A partition table consists of a list of mapping blocks
-(CamelPartitionMapBlock), which is a compact table that maps a range
-of hashid's to a partition block (CamelPartitionKeyBlock), which
-contains hashid's of that range.
-
-[diagram - camelpartitiontable]
-
-The partition block only maps the hashid to a keyid (see CamelKeyTable)
-which means it can store a lot of keys in each block.
-
-To add a new value to the partition table:
-
-1. Calculate the hash value of the key
-2. Find out which partition block the key will fit into, using the
- partition table.
-3. If the partition block is full:
-4. If there is room in the next or previous block:
-5. Merge the 2 blocks together, and split at the half-way point
-6. Update the partition table hash indices to match the blocks
-7. Else
-8. Create a new block, and split the existing block across it
-9. Insert the new block into the partition table
-10. Else
-11. Just add the key to the end of the block.
-
-Steps 5 and 8 perform a sorting of the partition key entries by hashid
-to find the midpoint. It may be beneficial to store the hashid's
-sorted always, it would then not require a sort to split the blocks.
-This would also benefit key lookups by being able to use a binary
-search. However, the incremental sort may be more expensive.
-
-If the partition table itself fills up, then perform a similar
-splitting function on its blocks, and store it over multiple blocks.
-With a block size of 1024 bytes, we can fit 127 blocks pointers, each
-with 127 keys in it - around 16000 keys. So we only need 1024 bytes
-of memory for each 16000 on-disk keys (assuming full tables).
-
-Removal is basically the same, but if we end up with an empty block we
-just remove it from the partition table. CamelTextIndex doesn't
-actually use removal although it is implemented in
-CamelPartitionTable.
-
-Lookup is very simple. We basically follow steps 1 and 2, and then
-perform a linear search through the block to find a matching hash id.
-That is our key. This is assuming a perfect hash, additionally the
-code could use the keyid to lookup in a keytable to verify the key is
-indeed the right one. This would require having to support duplicate
-hashid's and would make block splitting slightly more complex, but
-only by a couple of lines of code. This is something that will
-probably have to be addressed in the future.
-
-Using a partition table means that we can tell with 1 disk access
-whether or not a key exists (assuming a perfect hash function), and 1
-more access to look up all of the details of the key since the keyid
-is reversible. Another feature is that the partition table is always
-self-balancing for any data processed in any order.
-
-Yet one more feature is that it is quite easy to order the writes to
-the partition table so that its structure is always consistent, even
-in the event of program failure. Although this has been disabled in
-the current code to take maximal advantage of the block cache.
-
-CamelTextIndex
-
-CamelTextIndex is the implementation of CamelIndex now used by camel
-for indexing mail. It shares some features with the second
-incarnation of libibex, but is generally simpler. It uses the
-previously described classes to implement the CamelIndex interface.
-
-Indexing operation
-
-Indexing operation is similar to libibex2, but without the requirement
-to maintain the reverse index.
-
-1. Lookup the messageid from the message name, using the messageid
- partition table.
-2. Generate a list of words in the message
-3. For each word
-4. Lookup the wordid and sequence information.
-5. Append the messageid to the word sequence.
-
-In practice we also have a word cache which caches upto 32 messageid's
-for each word before it is written to the key file.
-
-Removing a message
-
-Removal is not immediate. This is one of the major performance
-improvements in CamelIndex.
-
-1. Lookup the messageid from the message name partition table
-2. Use the messageid to set a flag in the message key table to
- indicate the message has been deleted.
-3. Remove the key hash from the partition table.
-
-This comes down to a maximum of 2 disk reads and 2 disk writes.
-libibex2 had unbounded maximums, depending on the number of words in a
-given message. The key file is not changed.
-
-Because data is not removed from the files at all, an additional
-optional step is required, that of compressing the indices.
-
-Performing a query
-
-Performing a query is much the same as with libibex2. We usually have
-slightly less disk i/o because of a more efficient and scalable hash
-table implementation, and improved locality of reference of the key
-table data.
-
-1. Lookup the messageid from the message name partition table
-2. Use the messageid to get the data pointer directly from the key
- table.
-3. Iterate through the key file, reading blocks backwards through the
- file.
-
-Compressing
-
-Although it could have benefited from it, libibex2 did not ever
-compress indices - the only way to compress an index was to remove it
-and have it be rebuilt.
-
-CamelIndex requires a compression stage as data is never removed from
-it otherwise. Because of the much greater locality of reference, the
-compression stage is actually much faster than an incremental removal
-of data inside the data files.
-
-Compressing comprises the following steps:
-
-1. Open a new temporary index, an index block file and an index key
- file.
-2. For each message in the message partition table
-3. If the message is not marked deleted, add it to the new message
- partition table, and recored the old messageid to new messageid
- mapping.
-4. For each word in the word partition table
-5. For each messageid's in the word sequence list
-6. If the messageid maps to a new messageid, remap the messageid,
- else discard it.
-7. Concatenate upto 256 messageid's in a row before writing to the
- key file, to improve lookups.
-8. Create a new word in the new word key table
-9. Add the wordid and new sequence id to the word partition table.
-
-Note that at step 8 we could (should?) also check if the word has any
-messages associated with it, and discard the word from the new index.
-
-After compression, the name partition index only contains names which
-are not deleted, and the key file is compressed into larger blocks
-which takes up less space and is faster to retrieve.
-
-During index operations a number of statistics are taken which trigger
-an automatic compress when the file fragmentation or number of deleted
-messages exceed a threshold. So the index maintains itself, and does
-not need manual compression.
-
-
-
-
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/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 119966aacb..0000000000
--- a/camel/providers/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-if ENABLE_NNTP
-NNTP_DIR=nntp
-endif
-
-if ENABLE_IMAPP
-IMAPP_DIR=imapp
-endif
-
-SUBDIRS = pop3 sendmail smtp imap $(NNTP_DIR) local $(IMAPP_DIR)
-
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 1a2f46faf9..0000000000
--- a/camel/providers/imap/Makefile.am
+++ /dev/null
@@ -1,48 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-libcamelimapincludedir = $(privincludedir)/camel
-
-camel_provider_LTLIBRARIES = libcamelimap.la
-camel_provider_DATA = libcamelimap.urls
-
-INCLUDES = -I.. \
- -I$(srcdir)/.. \
- -I$(top_srcdir)/camel \
- -I$(top_srcdir)/intl \
- -I$(top_srcdir)/e-util \
- -I$(top_srcdir) \
- $(CAMEL_CFLAGS) \
- $(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-store-summary.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-store-summary.h \
- camel-imap-summary.h \
- camel-imap-types.h \
- camel-imap-utils.h \
- camel-imap-wrapper.h
-
-libcamelimap_la_LDFLAGS = -avoid-version -module
-
-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 45e5751b87..0000000000
--- a/camel/providers/imap/camel-imap-command.c
+++ /dev/null
@@ -1,822 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <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-store-summary.h"
-#include "camel-imap-private.h"
-#include <camel/camel-exception.h>
-#include <camel/camel-private.h>
-#include <camel/camel-utf8.h>
-#include <camel/camel-session.h>
-
-
-extern int camel_verbose_debug;
-
-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 connect_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_SERVICE_LOCK (store, connect_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_SERVICE_UNLOCK (store, connect_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 connect_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_SERVICE_LOCK (store, connect_lock);
- ok = imap_command_start (store, folder, cmd, ex);
- g_free (cmd);
-
- if (!ok)
- CAMEL_SERVICE_UNLOCK (store, connect_lock);
- return ok;
-}
-
-static gboolean
-imap_command_start (CamelImapStore *store, CamelFolder *folder,
- const char *cmd, CamelException *ex)
-{
- ssize_t nwritten;
-
- /* 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 */
- if (camel_verbose_debug) {
- const char *mask;
-
- if (!strncmp ("LOGIN \"", cmd, 7))
- mask = "LOGIN \"xxx\" xxx";
- else if (!strncmp ("LOGIN {", cmd, 7))
- mask = "LOGIN {N+}\r\nxxx {N+}\r\nxxx";
- else if (!strncmp ("LOGIN ", cmd, 6))
- mask = "LOGIN xxx xxx";
- else
- mask = cmd;
-
- fprintf (stderr, "sending : %c%.5d %s\r\n", store->tag_prefix, store->command, mask);
- }
-
- nwritten = camel_stream_printf (store->ostream, "%c%.5d %s\r\n",
- store->tag_prefix, store->command++, cmd);
-
- if (nwritten == -1) {
- if (errno == EINTR)
- camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL,
- _("Operation cancelled"));
- else
- camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- g_strerror (errno));
-
- camel_service_disconnect (CAMEL_SERVICE (store), FALSE, NULL);
- return FALSE;
- }
-
- return TRUE;
-}
-
-/**
- * camel_imap_command_continuation:
- * @store: the IMAP store
- * @cmd: buffer containing the response/request data
- * @cmdlen: command length
- * @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 imap stream.
- *
- * Return value: as for camel_imap_command(). On failure, the store's
- * connect_lock will be released.
- **/
-CamelImapResponse *
-camel_imap_command_continuation (CamelImapStore *store, const char *cmd,
- size_t cmdlen, CamelException *ex)
-{
- if (!camel_imap_store_connected (store, ex))
- return NULL;
-
- if (camel_stream_write (store->ostream, cmd, cmdlen) == -1 ||
- camel_stream_write (store->ostream, "\r\n", 2) == -1) {
- if (errno == EINTR)
- camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL,
- _("Operation cancelled"));
- else
- camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- g_strerror (errno));
- camel_service_disconnect (CAMEL_SERVICE (store), FALSE, NULL);
- CAMEL_SERVICE_UNLOCK (store, connect_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_imap_store_readline (store, &respbuf, ex) < 0) {
- CAMEL_SERVICE_UNLOCK (store, connect_lock);
- return CAMEL_IMAP_RESPONSE_ERROR;
- }
-
- switch (*respbuf) {
- case '*':
- if (!strncasecmp (respbuf, "* BYE", 5)) {
- /* Connection was lost, no more data to fetch */
- camel_service_disconnect (CAMEL_SERVICE (store), FALSE, NULL);
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("Server unexpectedly disconnected: %s"),
- _("Unknown error")); /* g_strerror (104)); FIXME after 1.0 is released */
- store->connected = FALSE;
- g_free (respbuf);
- respbuf = NULL;
- type = CAMEL_IMAP_RESPONSE_ERROR;
- break;
- }
-
- /* Read the rest of the response. */
- type = CAMEL_IMAP_RESPONSE_UNTAGGED;
- respbuf = imap_read_untagged (store, respbuf, ex);
- if (!respbuf)
- type = CAMEL_IMAP_RESPONSE_ERROR;
- else if (!strncasecmp (respbuf, "* OK [ALERT]", 12)) {
- char *msg;
-
- /* for imap ALERT codes, account user@host */
- msg = g_strdup_printf(_("Alert from IMAP server %s@%s:\n%s"),
- ((CamelService *)store)->url->user, ((CamelService *)store)->url->host, respbuf+12);
- camel_session_alert_user(((CamelService *)store)->session, CAMEL_SESSION_ALERT_WARNING, msg, FALSE);
- g_free(msg);
- }
-
- 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_SERVICE_UNLOCK (store, connect_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_SERVICE_LOCK (store, connect_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 && !strncasecmp (p, " OK", 3))
- return response;
-
- /* We should never get BAD, or anything else but +, OK, or NO
- * for that matter.
- */
- if (!p || 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_SYSTEM,
- _("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, ldigits, nread, i;
- unsigned int length;
- 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 || length >= UINT_MAX - 2)
- break;
- ldigits = end - (p + 1);
-
- /* Read the literal */
- str = g_string_sized_new (length + 2);
- str->str[0] = '\n';
- nread = camel_stream_read (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,
- g_strerror (errno));
- camel_service_disconnect (CAMEL_SERVICE (store), FALSE, NULL);
- g_string_free (str, TRUE);
- goto lose;
- }
- if (nread < length) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("Server response ended too soon."));
- camel_service_disconnect (CAMEL_SERVICE (store), FALSE, NULL);
- g_string_free (str, TRUE);
- 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
- */
-
- 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_imap_store_readline (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 connect_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 (!strcasecmp (p, " EXISTS")) {
- exists = number;
- } else if (!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_SERVICE_UNLOCK (store, connect_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)
- return;
-
- 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 connect_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;
-
- len = strlen (type);
-
- 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 = (char *) imap_next_word (resp);
-
- if (!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 connect_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, *outptr, *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 *);
- if (*p == 'F') {
- /* NB: this is freed during output */
- char *s = camel_imap_store_summary_full_from_path(store->summary, string);
- string = s?s:camel_utf8_utf7(string);
- }
- arglen = strlen (string);
- g_ptr_array_add (args, string);
- if (imap_is_atom (string)) {
- len += arglen;
- } else {
- 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 */
- outptr = out = g_malloc (len + 1);
- p = start = fmt;
- i = 0;
- while (*p) {
- p = strchr (start, '%');
- if (!p) {
- strcpy (outptr, start);
- break;
- } else {
- strncpy (outptr, start, p - start);
- outptr += p - start;
- }
-
- switch (*++p) {
- case 'd':
- num = GPOINTER_TO_INT (args->pdata[i++]);
- outptr += sprintf (outptr, "%d", num);
- break;
-
- case 's':
- string = args->pdata[i++];
- outptr += sprintf (outptr, "%s", string);
- break;
- case 'S':
- case 'F':
- string = args->pdata[i++];
- if (imap_is_atom (string)) {
- outptr += sprintf (outptr, "%s", string);
- } else {
- if (store->capabilities & IMAP_CAPABILITY_LITERALPLUS) {
- outptr += sprintf (outptr, "{%d+}\r\n%s", strlen (string), string);
- } else {
- char *quoted = imap_quote_string (string);
-
- outptr += sprintf (outptr, "%s", quoted);
- g_free (quoted);
- }
- }
-
- if (*p == 'F')
- g_free (string);
- break;
- default:
- *outptr++ = '%';
- *outptr++ = *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 3539ac63d2..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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,
- size_t cmdlen,
- 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 4db0c7a43f..0000000000
--- a/camel/providers/imap/camel-imap-folder.c
+++ /dev/null
@@ -1,2729 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 "e-util/e-path.h"
-#include "e-util/e-time-utils.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-multipart-signed.h"
-#include "camel-multipart-encrypted.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 "camel-private.h"
-#include "camel-string-utils.h"
-#include "camel-file-utils.h"
-
-
-#define d(x)
-
-/* set to -1 for infinite size */
-#define UID_SET_LIMIT (4096)
-
-
-#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 int imap_getv(CamelObject *object, CamelException *ex, CamelArgGetV *args);
-
-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);
-static void imap_rename (CamelFolder *folder, const char *new);
-
-/* 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, char **appended_uid,
- CamelException *ex);
-static void imap_append_offline (CamelFolder *folder, CamelMimeMessage *message,
- const CamelMessageInfo *info, char **appended_uid,
- CamelException *ex);
-static void imap_append_resyncing (CamelFolder *folder, CamelMimeMessage *message,
- const CamelMessageInfo *info, char **appended_uid,
- CamelException *ex);
-
-static void imap_transfer_online (CamelFolder *source, GPtrArray *uids,
- CamelFolder *dest, GPtrArray **transferred_uids,
- gboolean delete_originals,
- CamelException *ex);
-static void imap_transfer_offline (CamelFolder *source, GPtrArray *uids,
- CamelFolder *dest, GPtrArray **transferred_uids,
- gboolean delete_originals,
- CamelException *ex);
-static void imap_transfer_resyncing (CamelFolder *source, GPtrArray *uids,
- CamelFolder *dest, GPtrArray **transferred_uids,
- gboolean delete_originals,
- CamelException *ex);
-
-/* searching */
-static GPtrArray *imap_search_by_expression (CamelFolder *folder, const char *expression, CamelException *ex);
-static GPtrArray *imap_search_by_uids (CamelFolder *folder, const char *expression, GPtrArray *uids, CamelException *ex);
-static void imap_search_free (CamelFolder *folder, GPtrArray *uids);
-
-static void imap_thaw (CamelFolder *folder);
-
-static CamelObjectClass *parent_class;
-
-static 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 */
- ((CamelObjectClass *)camel_imap_folder_class)->getv = imap_getv;
-
- camel_folder_class->get_message = imap_get_message;
- camel_folder_class->rename = imap_rename;
- camel_folder_class->search_by_expression = imap_search_by_expression;
- camel_folder_class->search_by_uids = imap_search_by_uids;
- 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->transfer_online = imap_transfer_online;
- camel_disco_folder_class->transfer_offline = imap_transfer_offline;
- camel_disco_folder_class->transfer_resyncing = imap_transfer_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->permanent_flags = CAMEL_MESSAGE_ANSWERED | CAMEL_MESSAGE_DELETED |
- CAMEL_MESSAGE_DRAFT | CAMEL_MESSAGE_FLAGGED | CAMEL_MESSAGE_SEEN;
-
- folder->folder_flags |= (CAMEL_FOLDER_HAS_SUMMARY_CAPABILITY |
- CAMEL_FOLDER_HAS_SEARCH_CAPABILITY);
-
- 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) {
- parent_class = camel_disco_folder_get_type();
- camel_imap_folder_type =
- camel_type_register (parent_class, "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 (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) &&
- !strcasecmp (folder_name, "INBOX"))
- folder->folder_flags |= CAMEL_FOLDER_FILTER_RECENT;
-
- imap_folder->search = camel_imap_search_new(folder_dir);
-
- return folder;
-}
-
-/* Called with the store's connect_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_SERVICE_ASSERT_LOCKED (folder->parent_store, connect_lock);
-
- count = camel_folder_summary_count (folder->summary);
-
- for (i = 0; i < response->untagged->len; i++) {
- resp = response->untagged->pdata[i] + 2;
- if (!strncasecmp (resp, "FLAGS ", 6) &&
- !folder->permanent_flags) {
- resp += 6;
- folder->permanent_flags = imap_parse_flag_list (&resp);
- } else if (!strncasecmp (resp, "OK [PERMANENTFLAGS ", 19)) {
- resp += 19;
- folder->permanent_flags = imap_parse_flag_list (&resp);
- } else if (!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 (!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 (!strcasecmp (resp, " EXISTS")) {
- /* Another one?? */
- exists = val;
- continue;
- }
- if (uid != 0 || val != count || 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 int
-imap_getv(CamelObject *object, CamelException *ex, CamelArgGetV *args)
-{
- CamelFolder *folder = (CamelFolder *)object;
- int i, count=args->argc;
- guint32 tag;
-
- for (i=0;i<args->argc;i++) {
- CamelArgGet *arg = &args->argv[i];
-
- tag = arg->tag;
-
- switch (tag & CAMEL_ARG_TAG) {
- /* CamelObject args */
- case CAMEL_OBJECT_ARG_DESCRIPTION:
- if (folder->description == NULL) {
- CamelURL *uri = ((CamelService *)folder->parent_store)->url;
-
- /* what if the full name doesn't incclude /'s? does it matter? */
- folder->description = g_strdup_printf("%s@%s:%s", uri->user, uri->host, folder->full_name);
- }
- *arg->ca_str = folder->description;
- break;
- default:
- count--;
- continue;
- }
-
- arg->tag = (tag & CAMEL_ARG_TYPE) | CAMEL_ARG_IGNORE;
- }
-
- if (count)
- return ((CamelObjectClass *)parent_class)->getv(object, ex, args);
-
- return 0;
-}
-
-static void
-imap_rename (CamelFolder *folder, const char *new)
-{
- CamelImapFolder *imap_folder = (CamelImapFolder *)folder;
- CamelImapStore *imap_store = (CamelImapStore *)folder->parent_store;
- char *folder_dir, *summary_path;
- char *folders;
-
- folders = g_strconcat (imap_store->storage_path, "/folders", NULL);
- folder_dir = e_path_to_physical (folders, new);
- g_free (folders);
- summary_path = g_strdup_printf("%s/summary", folder_dir);
-
- CAMEL_IMAP_FOLDER_LOCK (folder, cache_lock);
- camel_imap_message_cache_set_path(imap_folder->cache, folder_dir);
- CAMEL_IMAP_FOLDER_UNLOCK (folder, cache_lock);
-
- camel_folder_summary_set_filename(folder->summary, summary_path);
-
- g_free(summary_path);
- g_free(folder_dir);
-
- ((CamelFolderClass *)disco_folder_class)->rename(folder, new);
-}
-
-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).
- * Also, if this is the INBOX, some servers (cryus) wont tell
- * us with a NOOP of new messages, so force a reselect which
- * should do it. */
- CAMEL_SERVICE_LOCK (imap_store, connect_lock);
- if (imap_store->current_folder != folder
- || strcasecmp(folder->full_name, "INBOX") == 0) {
- CAMEL_SERVICE_UNLOCK (imap_store, connect_lock);
- response = camel_imap_command (imap_store, folder, ex, NULL);
- if (response) {
- camel_imap_folder_selected (folder, response, ex);
- camel_imap_response_free (imap_store, response);
- }
- return;
- }
- CAMEL_SERVICE_UNLOCK (imap_store, connect_lock);
-
- /* 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 {
-#if 0
- /* on some servers need to CHECKpoint INBOX to recieve new messages?? */
- /* rfc2060 suggests this, but havent seen a server that requires it */
- if (strcasecmp(folder->full_name, "INBOX") == 0) {
- response = camel_imap_command (imap_store, folder, ex, "CHECK");
- camel_imap_response_free (imap_store, response);
- }
-#endif
- response = camel_imap_command (imap_store, folder, ex, "NOOP");
- camel_imap_response_free (imap_store, response);
- }
-}
-
-/* Called with the store's connect_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;
- CamelFolderChangeInfo *changes = NULL;
-
- CAMEL_SERVICE_ASSERT_LOCKED (store, connect_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;
-
- if (changes == NULL)
- changes = camel_folder_change_info_new();
- camel_folder_change_info_change_uid(changes, new[i].uid);
- }
-
- camel_folder_summary_info_free (folder->summary, info);
- g_free (new[i].uid);
- }
-
- if (changes) {
- camel_object_trigger_event(CAMEL_OBJECT (folder), "folder_changed", changes);
- camel_folder_change_info_free(changes);
- }
-
- 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);
-}
-
-/* the max number of chars that an unsigned 32-bit int can be is 10 chars plus 1 for a possible : */
-#define UID_SET_FULL(setlen, maxlen) (maxlen > 0 ? setlen + 11 >= maxlen : FALSE)
-
-/* 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 (up to @UID_SET_LIMIT bytes). 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 && !UID_SET_FULL (gset->len, UID_SET_LIMIT); 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_append_printf (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_append_printf (gset, "%s", camel_message_info_uid (info));
- }
-
- if (range != -1 && range != max - 1) {
- info = matches->pdata[matches->len - 1];
- g_string_append_printf (gset, ":%s", camel_message_info_uid (info));
- }
-
- if (matches->len) {
- *set = gset->str;
- g_string_free (gset, FALSE);
- return matches;
- } else {
- *set = NULL;
- 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;
- CamelException local_ex;
- GPtrArray *matches;
- char *set, *flaglist;
- gboolean unset;
- int i, j, max;
-
- camel_exception_init (&local_ex);
- CAMEL_SERVICE_LOCK (store, connect_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 is broken and 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_IMAP_SERVER_FLAGS);
-
- /* Note: get_matching() uses UID_SET_LIMIT to limit
- the size of the uid-set string. We don't have to
- loop here to flush all the matching uids because
- they will be scooped up later by our parent loop (I
- think?). -- Jeff */
- 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);
- if (matches == NULL)
- continue;
-
- /* FIXME: since we don't know the previously set flags,
- if unset is TRUE then just unset all the flags? */
- flaglist = imap_create_flag_list (unset ? CAMEL_IMAP_SERVER_FLAGS : info->flags);
-
- /* Note: to `unset' flags, use -FLAGS.SILENT (<flag list>) */
- response = camel_imap_command (store, folder, &local_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 (&local_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);
-
- /* We unlock here so that other threads can have a chance to grab the connect_lock */
- CAMEL_SERVICE_UNLOCK (store, connect_lock);
-
- /* check for an exception */
- if (camel_exception_is_set (&local_ex)) {
- camel_exception_xfer (ex, &local_ex);
- return;
- }
-
- /* Re-lock the connect_lock */
- CAMEL_SERVICE_LOCK (store, connect_lock);
- }
-
- /* Save the summary */
- imap_sync_offline (folder, ex);
-
- CAMEL_SERVICE_UNLOCK (store, connect_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_offline (CamelFolder *folder, GPtrArray *uids, CamelException *ex)
-{
- CamelFolderChangeInfo *changes;
- int i;
-
- qsort (uids->pdata, uids->len, sizeof (void *), uid_compar);
-
- changes = camel_folder_change_info_new ();
-
- for (i = 0; i < uids->len; i++) {
- camel_folder_summary_remove_uid (folder->summary, uids->pdata[i]);
- camel_folder_change_info_remove_uid (changes, 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);
-
- camel_object_trigger_event (CAMEL_OBJECT (folder), "folder_changed", changes);
- camel_folder_change_info_free (changes);
-}
-
-static void
-imap_expunge_uids_online (CamelFolder *folder, GPtrArray *uids, CamelException *ex)
-{
- CamelImapStore *store = CAMEL_IMAP_STORE (folder->parent_store);
- CamelImapResponse *response;
- int uid = 0;
- char *set;
-
- CAMEL_SERVICE_LOCK (store, connect_lock);
-
- if ((store->capabilities & IMAP_CAPABILITY_UIDPLUS) == 0) {
- ((CamelFolderClass *)CAMEL_OBJECT_GET_CLASS(folder))->sync(folder, 0, ex);
- if (camel_exception_is_set(ex)) {
- CAMEL_SERVICE_UNLOCK (store, connect_lock);
- return;
- }
- }
-
- qsort (uids->pdata, uids->len, sizeof (void *), uid_compar);
-
- while (uid < uids->len) {
- set = imap_uid_array_to_set (folder->summary, uids, uid, UID_SET_LIMIT, &uid);
- 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_SERVICE_UNLOCK (store, connect_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_SERVICE_UNLOCK (store, connect_lock);
-}
-
-static void
-imap_expunge_uids_resyncing (CamelFolder *folder, GPtrArray *uids, CamelException *ex)
-{
- CamelImapStore *store = CAMEL_IMAP_STORE (folder->parent_store);
- GPtrArray *keep_uids, *mark_uids;
- CamelImapResponse *response;
- char *result;
-
- 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_SERVICE_LOCK (store, connect_lock);
-
- ((CamelFolderClass *)CAMEL_OBJECT_GET_CLASS(folder))->sync(folder, 0, ex);
- if (camel_exception_is_set(ex)) {
- CAMEL_SERVICE_UNLOCK (store, connect_lock);
- return;
- }
-
- response = camel_imap_command (store, folder, ex, "UID SEARCH DELETED");
- if (!response) {
- CAMEL_SERVICE_UNLOCK (store, connect_lock);
- return;
- }
- result = camel_imap_response_extract (store, response, "SEARCH", ex);
- if (!result) {
- CAMEL_SERVICE_UNLOCK (store, connect_lock);
- return;
- }
-
- if (result[8] == ' ') {
- 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]);
- }
- } else {
- /* Empty SEARCH result, meaning nothing is marked deleted
- * on server.
- */
-
- keep_uids = NULL;
- mark_uids = uids;
- }
-
- /* Unmark messages to be kept */
-
- if (keep_uids) {
- char *uidset;
- int uid = 0;
-
- while (uid < keep_uids->len) {
- uidset = imap_uid_array_to_set (folder->summary, keep_uids, uid, UID_SET_LIMIT, &uid);
-
- response = camel_imap_command (store, folder, ex,
- "UID STORE %s -FLAGS.SILENT \\Deleted",
- uidset);
-
- g_free (uidset);
-
- if (!response) {
- g_ptr_array_free (keep_uids, TRUE);
- g_ptr_array_free (mark_uids, TRUE);
- CAMEL_SERVICE_UNLOCK (store, connect_lock);
- return;
- }
- camel_imap_response_free (store, response);
- }
- }
-
- /* Mark any messages that still need to be marked */
- if (mark_uids) {
- char *uidset;
- int uid = 0;
-
- while (uid < mark_uids->len) {
- uidset = imap_uid_array_to_set (folder->summary, mark_uids, uid, UID_SET_LIMIT, &uid);
-
- response = camel_imap_command (store, folder, ex,
- "UID STORE %s +FLAGS.SILENT \\Deleted",
- uidset);
-
- g_free (uidset);
-
- if (!response) {
- g_ptr_array_free (keep_uids, TRUE);
- g_ptr_array_free (mark_uids, TRUE);
- CAMEL_SERVICE_UNLOCK (store, connect_lock);
- return;
- }
- camel_imap_response_free (store, response);
- }
-
- if (mark_uids != uids)
- g_ptr_array_free (mark_uids, TRUE);
- }
-
- /* 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_uids) {
- char *uidset;
- int uid = 0;
-
- while (uid < keep_uids->len) {
- uidset = imap_uid_array_to_set (folder->summary, keep_uids, uid, UID_SET_LIMIT, &uid);
-
- /* 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",
- uidset);
-
- g_free (uidset);
- if (response)
- camel_imap_response_free (store, response);
- }
-
- g_ptr_array_free (keep_uids, TRUE);
- }
-
- /* now we can free this, now that we're done with keep_uids */
- g_free (result);
-
- CAMEL_SERVICE_UNLOCK (store, connect_lock);
-}
-
-static gchar *
-get_temp_uid (void)
-{
- gchar *res;
-
- static int counter = 0;
- G_LOCK_DEFINE_STATIC (lock);
-
- G_LOCK (lock);
- res = g_strdup_printf ("tempuid-%lx-%d",
- (unsigned long) time (NULL),
- counter++);
- G_UNLOCK (lock);
-
- return res;
-}
-
-static void
-imap_append_offline (CamelFolder *folder, CamelMimeMessage *message,
- const CamelMessageInfo *info, char **appended_uid,
- CamelException *ex)
-{
- CamelImapStore *imap_store = CAMEL_IMAP_STORE (folder->parent_store);
- CamelImapMessageCache *cache = CAMEL_IMAP_FOLDER (folder)->cache;
- CamelFolderChangeInfo *changes;
- char *uid;
-
- uid = get_temp_uid ();
-
- 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);
- if (appended_uid)
- *appended_uid = uid;
- else
- 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, *response2;
- CamelStream *memstream;
- CamelMimeFilter *crlf_filter;
- CamelStreamFilter *streamfilter;
- GByteArray *ba;
- char *flagstr, *end;
-
- /* create flag string param */
- if (info && info->flags)
- flagstr = imap_create_flag_list (info->flags);
- else
- flagstr = NULL;
-
- /* encode any 8bit parts so we avoid sending embedded nul-chars and such */
- camel_mime_message_encode_8bit_parts (message);
-
- /* 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;
- }
-
- if (*response->status != '+') {
- camel_imap_response_free (store, response);
- g_byte_array_free (ba, TRUE);
- return NULL;
- }
-
- /* send the rest of our data - the mime message */
- response2 = camel_imap_command_continuation (store, ba->data, ba->len, ex);
- g_byte_array_free (ba, TRUE);
-
- /* free it only after message is sent. This may cause more FETCHes. */
- camel_imap_response_free (store, response);
- if (!response2)
- return response2;
-
- if (store->capabilities & IMAP_CAPABILITY_UIDPLUS) {
- *uid = camel_strstrcase (response2->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 response2;
-}
-
-static void
-imap_append_online (CamelFolder *folder, CamelMimeMessage *message,
- const CamelMessageInfo *info, char **appended_uid,
- 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);
- if (appended_uid)
- *appended_uid = uid;
- else
- g_free (uid);
- } else if (appended_uid)
- *appended_uid = NULL;
-
- camel_imap_response_free (store, response);
-
- /* Make sure a "folder_changed" is emitted. */
- CAMEL_SERVICE_LOCK (store, connect_lock);
- if (store->current_folder != folder ||
- camel_folder_summary_count (folder->summary) == count)
- imap_refresh_info (folder, ex);
- CAMEL_SERVICE_UNLOCK (store, connect_lock);
-}
-
-static void
-imap_append_resyncing (CamelFolder *folder, CamelMimeMessage *message,
- const CamelMessageInfo *info, char **appended_uid,
- 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);
-
- if (appended_uid)
- *appended_uid = uid;
- else
- g_free (uid);
- } else if (appended_uid)
- *appended_uid = NULL;
-
- camel_imap_response_free (store, response);
-}
-
-
-static void
-imap_transfer_offline (CamelFolder *source, GPtrArray *uids,
- CamelFolder *dest, GPtrArray **transferred_uids,
- gboolean delete_originals, CamelException *ex)
-{
- CamelImapStore *store = CAMEL_IMAP_STORE (source->parent_store);
- CamelImapMessageCache *sc = CAMEL_IMAP_FOLDER (source)->cache;
- CamelImapMessageCache *dc = CAMEL_IMAP_FOLDER (dest)->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_SERVICE_LOCK (store, connect_lock);
- CAMEL_IMAP_FOLDER_LOCK (source, cache_lock);
- CAMEL_IMAP_FOLDER_LOCK (dest, cache_lock);
- CAMEL_SERVICE_UNLOCK (store, connect_lock);
-
- if (transferred_uids) {
- *transferred_uids = g_ptr_array_new ();
- g_ptr_array_set_size (*transferred_uids, uids->len);
- }
-
- changes = camel_folder_change_info_new ();
-
- for (i = 0; i < uids->len; i++) {
- uid = uids->pdata[i];
-
- destuid = get_temp_uid ();
-
- mi = camel_folder_summary_uid (source->summary, uid);
- g_return_if_fail (mi != NULL);
-
- message = camel_folder_get_message (source, uid, NULL);
-
- if (message) {
- camel_imap_summary_add_offline (dest->summary, destuid, message, mi);
- camel_object_unref (CAMEL_OBJECT (message));
- } else
- camel_imap_summary_add_offline_uncached (dest->summary, destuid, mi);
-
- camel_imap_message_cache_copy (sc, uid, dc, destuid, ex);
- camel_folder_summary_info_free (source->summary, mi);
-
- camel_folder_change_info_add_uid (changes, destuid);
- if (transferred_uids)
- (*transferred_uids)->pdata[i] = destuid;
- else
- g_free (destuid);
-
- if (delete_originals)
- camel_folder_delete_message (source, uid);
- }
-
- CAMEL_IMAP_FOLDER_UNLOCK (dest, cache_lock);
- CAMEL_IMAP_FOLDER_UNLOCK (source, cache_lock);
-
- camel_object_trigger_event (CAMEL_OBJECT (dest), "folder_changed", changes);
- camel_folder_change_info_free (changes);
-
- camel_disco_diary_log (CAMEL_DISCO_STORE (store)->diary,
- CAMEL_DISCO_DIARY_FOLDER_TRANSFER,
- source, dest, uids, delete_originals);
-}
-
-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 = camel_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 *uidset;
- int uid = 0;
-
- while (uid < uids->len && !camel_exception_is_set (ex)) {
- uidset = imap_uid_array_to_set (source->summary, uids, uid, UID_SET_LIMIT, &uid);
-
- response = camel_imap_command (store, source, ex, "UID COPY %s %F",
- uidset, destination->full_name);
-
- g_free (uidset);
-
- if (response && (store->capabilities & IMAP_CAPABILITY_UIDPLUS))
- handle_copyuid (response, source, destination);
-
- camel_imap_response_free (store, response);
- }
-}
-
-static void
-imap_transfer_online (CamelFolder *source, GPtrArray *uids,
- CamelFolder *dest, GPtrArray **transferred_uids,
- gboolean delete_originals, CamelException *ex)
-{
- CamelImapStore *store = CAMEL_IMAP_STORE (source->parent_store);
- int count, i;
-
- /* Sync message flags if needed. */
- imap_sync_online (source, ex);
- if (camel_exception_is_set (ex))
- return;
-
- count = camel_folder_summary_count (dest->summary);
-
- qsort (uids->pdata, uids->len, sizeof (void *), uid_compar);
-
- /* Now copy the messages */
- do_copy (source, uids, dest, ex);
- if (camel_exception_is_set (ex))
- return;
-
- /* Make the destination notice its new messages */
- CAMEL_SERVICE_LOCK (store, connect_lock);
- if (store->current_folder != dest ||
- camel_folder_summary_count (dest->summary) == count)
- camel_folder_refresh_info (dest, ex);
- CAMEL_SERVICE_UNLOCK (store, connect_lock);
-
- if (delete_originals) {
- for (i = 0; i < uids->len; i++)
- camel_folder_delete_message (source, uids->pdata[i]);
- }
-
- /* FIXME */
- if (transferred_uids)
- *transferred_uids = NULL;
-}
-
-static void
-imap_transfer_resyncing (CamelFolder *source, GPtrArray *uids,
- CamelFolder *dest, GPtrArray **transferred_uids,
- gboolean delete_originals, CamelException *ex)
-{
- CamelDiscoDiary *diary = CAMEL_DISCO_STORE (source->parent_store)->diary;
- GPtrArray *realuids;
- int first, i;
- const char *uid;
- CamelMimeMessage *message;
- CamelMessageInfo *info;
-
- qsort (uids->pdata, uids->len, sizeof (void *), uid_compar);
-
- /* 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 (delete_originals)
- camel_folder_delete_message (source, uid);
- }
-
- /* If we saw any real UIDs, do a COPY */
- if (i != first) {
- do_copy (source, realuids, dest, 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)) {
- uid = uids->pdata[i];
- message = camel_folder_get_message (source, uid, NULL);
- if (!message) {
- /* Message must have been expunged */
- continue;
- }
- info = camel_folder_get_message_info (source, uid);
- g_return_if_fail (info != NULL);
-
- imap_append_online (dest, message, info, NULL, ex);
- camel_folder_free_message_info (source, info);
- camel_object_unref (CAMEL_OBJECT (message));
- if (delete_originals)
- camel_folder_delete_message (source, uid);
- i++;
- }
- }
-
- g_ptr_array_free (realuids, FALSE);
-
- /* FIXME */
- if (transferred_uids)
- *transferred_uids = NULL;
-}
-
-static GPtrArray *
-imap_search_by_expression (CamelFolder *folder, const char *expression, CamelException *ex)
-{
- CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (folder);
- GPtrArray *matches, *summary;
-
- /* 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);
-
- 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 GPtrArray *
-imap_search_by_uids(CamelFolder *folder, const char *expression, GPtrArray *uids, CamelException *ex)
-{
- CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER(folder);
- GPtrArray *summary, *matches;
- int i;
-
- /* NOTE: could get away without the search lock by creating a new
- search object each time */
-
- qsort (uids->pdata, uids->len, sizeof (void *), uid_compar);
-
- summary = g_ptr_array_new();
- for (i=0;i<uids->len;i++) {
- CamelMessageInfo *info;
-
- info = camel_folder_get_message_info(folder, uids->pdata[i]);
- if (info)
- g_ptr_array_add(summary, info);
- }
-
- if (summary->len == 0)
- return summary;
-
- CAMEL_IMAP_FOLDER_LOCK(folder, search_lock);
-
- camel_folder_search_set_folder(imap_folder->search, 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);
-
- for (i=0;i<summary->len;i++)
- camel_folder_free_message_info(folder, summary->pdata[i]);
- g_ptr_array_free(summary, TRUE);
-
- 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);
-
-struct _part_spec_stack {
- struct _part_spec_stack *parent;
- int part;
-};
-
-static void
-part_spec_push (struct _part_spec_stack **stack, int part)
-{
- struct _part_spec_stack *node;
-
- node = g_new (struct _part_spec_stack, 1);
- node->parent = *stack;
- node->part = part;
-
- *stack = node;
-}
-
-static int
-part_spec_pop (struct _part_spec_stack **stack)
-{
- struct _part_spec_stack *node;
- int part;
-
- g_return_val_if_fail (*stack != NULL, 0);
-
- node = *stack;
- *stack = node->parent;
-
- part = node->part;
- g_free (node);
-
- return part;
-}
-
-static char *
-content_info_get_part_spec (CamelMessageContentInfo *ci)
-{
- struct _part_spec_stack *stack = NULL;
- CamelMessageContentInfo *node;
- char *part_spec, *buf;
- size_t len = 1;
- int part;
-
- node = ci;
- while (node->parent) {
- CamelMessageContentInfo *child;
-
- /* FIXME: is this only supposed to apply if 'node' is a multipart? */
- if (node->parent->parent && camel_content_type_is (node->parent->type, "message", "*")) {
- node = node->parent;
- continue;
- }
-
- child = node->parent->childs;
- for (part = 1; child; part++) {
- if (child == node)
- break;
-
- child = child->next;
- }
-
- part_spec_push (&stack, part);
-
- len += 2;
- while ((part = part / 10))
- len++;
-
- node = node->parent;
- }
-
- buf = part_spec = g_malloc (len);
- part_spec[0] = '\0';
-
- while (stack) {
- part = part_spec_pop (&stack);
- buf += sprintf (buf, "%d%s", part, stack ? "." : "");
- }
-
- return part_spec;
-}
-
-/* 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,
- CamelMimePart *part, CamelMessageContentInfo *ci,
- CamelException *ex)
-{
- CamelDataWrapper *content = NULL;
- CamelStream *stream;
- char *part_spec;
-
- part_spec = content_info_get_part_spec (ci);
-
- /* There are three cases: multipart/signed, multipart, message/rfc822, and "other" */
- if (camel_content_type_is (ci->type, "multipart", "signed")) {
- CamelMultipartSigned *body_mp;
- char *spec;
- int ret;
-
- /* Note: because we get the content parts uninterpreted anyway, we could potentially
- just use the normalmultipart code, except that multipart/signed wont let you yet! */
-
- body_mp = camel_multipart_signed_new ();
- /* need to set this so it grabs the boundary and other info about the signed type */
- /* we assume that part->content_type is more accurate/full than ci->type */
- camel_data_wrapper_set_mime_type_field (CAMEL_DATA_WRAPPER (body_mp), CAMEL_DATA_WRAPPER (part)->mime_type);
-
- spec = g_alloca (strlen (part_spec) + 6);
- sprintf (spec, part_spec[0] ? "%s.TEXT" : "TEXT", part_spec);
- g_free (part_spec);
-
- stream = camel_imap_folder_fetch_data (imap_folder, uid, spec, FALSE, ex);
- if (stream) {
- ret = camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (body_mp), stream);
- camel_object_unref (CAMEL_OBJECT (stream));
- if (ret == -1) {
- camel_object_unref ((CamelObject *) body_mp);
- return NULL;
- }
- }
-
- return (CamelDataWrapper *) body_mp;
- } else if (camel_content_type_is (ci->type, "multipart", "*")) {
- CamelMultipart *body_mp;
- char *child_spec;
- int speclen, num;
-
- if (camel_content_type_is (ci->type, "multipart", "encrypted"))
- body_mp = (CamelMultipart *) camel_multipart_encrypted_new ();
- else
- body_mp = camel_multipart_new ();
-
- /* need to set this so it grabs the boundary and other info about the multipart */
- /* we assume that part->content_type is more accurate/full than ci->type */
- camel_data_wrapper_set_mime_type_field (CAMEL_DATA_WRAPPER (body_mp), CAMEL_DATA_WRAPPER (part)->mime_type);
-
- speclen = strlen (part_spec);
- child_spec = g_malloc (speclen + 17); /* dot + 10 + dot + MIME + nul */
- memcpy (child_spec, part_spec, speclen);
- if (speclen > 0)
- child_spec[speclen++] = '.';
- g_free (part_spec);
-
- 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) {
- int ret;
-
- part = camel_mime_part_new ();
- ret = camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (part), stream);
- camel_object_unref (CAMEL_OBJECT (stream));
- if (ret == -1) {
- camel_object_unref (CAMEL_OBJECT (part));
- camel_object_unref (CAMEL_OBJECT (body_mp));
- g_free (child_spec);
- return NULL;
- }
-
- content = get_content (imap_folder, uid, part, ci, ex);
- }
-
- if (!stream || !content) {
- camel_object_unref (CAMEL_OBJECT (body_mp));
- g_free (child_spec);
- 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 (camel_content_type_is (ci->type, "message", "rfc822")) {
- content = (CamelDataWrapper *) get_message (imap_folder, uid, part_spec, ci->childs, ex);
- g_free (part_spec);
- return content;
- } else {
- content = camel_imap_wrapper_new (imap_folder, ci->type, uid, *part_spec ? part_spec : "1", part);
- g_free (part_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;
- int ret;
-
- 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 ();
- ret = camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (msg), stream);
- camel_object_unref (CAMEL_OBJECT (stream));
- if (ret == -1) {
- camel_object_unref (CAMEL_OBJECT (msg));
- return NULL;
- }
-
- content = get_content (imap_folder, uid, 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;
- CamelImapStore *imap_store =
- CAMEL_IMAP_STORE (CAMEL_FOLDER (imap_folder)->parent_store);
- int ret;
-
- if (!stream) {
- stream = camel_imap_folder_fetch_data (imap_folder, uid, "",
- FALSE, ex);
- if (!stream)
- return NULL;
- }
-
- msg = camel_mime_message_new ();
- ret = camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (msg),
- stream);
- camel_object_unref (CAMEL_OBJECT (stream));
- if (ret == -1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("Unable to retrieve message: %s"),
- g_strerror (errno));
- camel_object_unref (CAMEL_OBJECT (msg));
- return NULL;
- }
-
- /* FIXME, this shouldn't be done this way. */
- camel_medium_set_header (CAMEL_MEDIUM (msg), "X-Evolution-Source",
- imap_store->base_url);
- 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);
-
- /* If we're not actually connected and it's not in the cache,
- * that's as far as we can go.
- */
- if (camel_disco_store_check_online (CAMEL_DISCO_STORE (store), ex) == FALSE)
- return NULL;
-
- mi = camel_folder_summary_uid (folder->summary, uid);
- if (mi == NULL) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID,
- _("Cannot get message: %s\n %s"), uid, _("No such message"));
- return 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 = NULL;
- 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]);
- if (fetch_data) {
- 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);
- fetch_data = NULL;
- body = NULL;
- }
- }
-
- if (body)
- imap_parse_body ((const char **) &body, folder, mi->content);
-
- if (fetch_data)
- 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);
- /* FIXME, this shouldn't be done this way. */
- camel_medium_set_header (CAMEL_MEDIUM (msg), "X-Evolution-Source",
- store->base_url);
- 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 char *tm_months[] = {
- "Jan", "Feb", "Mar", "Apr", "May", "Jun",
- "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
-};
-
-static gboolean
-decode_time (const unsigned char **in, int *hour, int *min, int *sec)
-{
- register const unsigned char *inptr;
- int *val, colons = 0;
-
- *hour = *min = *sec = 0;
-
- val = hour;
- for (inptr = *in; *inptr && !isspace ((int) *inptr); inptr++) {
- if (*inptr == ':') {
- colons++;
- switch (colons) {
- case 1:
- val = min;
- break;
- case 2:
- val = sec;
- break;
- default:
- return FALSE;
- }
- } else if (!isdigit ((int) *inptr))
- return FALSE;
- else
- *val = (*val * 10) + (*inptr - '0');
- }
-
- *in = inptr;
-
- return TRUE;
-}
-
-static time_t
-decode_internaldate (const unsigned char *in)
-{
- const unsigned char *inptr = in;
- int hour, min, sec, n;
- unsigned char *buf;
- struct tm tm;
- time_t date;
-
- memset ((void *) &tm, 0, sizeof (struct tm));
-
- tm.tm_mday = strtoul (inptr, (char **) &buf, 10);
- if (buf == inptr || *buf != '-')
- return (time_t) -1;
-
- inptr = buf + 1;
- if (inptr[3] != '-')
- return (time_t) -1;
-
- for (n = 0; n < 12; n++) {
- if (!strncasecmp (inptr, tm_months[n], 3))
- break;
- }
-
- if (n >= 12)
- return (time_t) -1;
-
- tm.tm_mon = n;
-
- inptr += 4;
-
- n = strtoul (inptr, (char **) &buf, 10);
- if (buf == inptr || *buf != ' ')
- return (time_t) -1;
-
- tm.tm_year = n - 1900;
-
- inptr = buf + 1;
- if (!decode_time (&inptr, &hour, &min, &sec))
- return (time_t) -1;
-
- tm.tm_hour = hour;
- tm.tm_min = min;
- tm.tm_sec = sec;
-
- n = strtol (inptr, NULL, 10);
-
- date = e_mktime_utc (&tm);
-
- /* date is now GMT of the time we want, but not offset by the timezone ... */
-
- /* this should convert the time to the GMT equiv time */
- date -= ((n / 100) * 60 * 60) + (n % 100) * 60;
-
- return date;
-}
-
-static void
-add_message_from_data (CamelFolder *folder, GPtrArray *messages,
- int first, GData *data)
-{
- CamelMimeMessage *msg;
- CamelStream *stream;
- CamelMessageInfo *mi;
- const char *idate;
- int seq;
-
- 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 ();
- if (camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (msg), stream) == -1) {
- camel_object_unref (CAMEL_OBJECT (msg));
- return;
- }
-
- mi = camel_folder_summary_info_new_from_message (folder->summary, msg);
- camel_object_unref (CAMEL_OBJECT (msg));
-
- if ((idate = g_datalist_get_data (&data, "INTERNALDATE")))
- mi->date_received = decode_internaldate (idate);
-
- if (mi->date_received == -1)
- mi->date_received = mi->date_sent;
-
- messages->pdata[seq - first] = mi;
-}
-
-
-#define CAMEL_MESSAGE_INFO_HEADERS "DATE FROM TO CC SUBJECT REFERENCES IN-REPLY-TO MESSAGE-ID MIME-VERSION CONTENT-TYPE"
-
-/* FIXME: this needs to be kept in sync with camel-mime-utils.c's list
- of mailing-list headers and so might be best if this were
- auto-generated? */
-#define MAILING_LIST_HEADERS "X-MAILING-LIST X-LOOP LIST-ID LIST-POST MAILING-LIST ORIGINATOR X-LIST SENDER RETURN-PATH X-BEENTHERE"
-
-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;
- int i, seq, first, size, got;
- CamelImapResponseType type;
- const char *header_spec;
- CamelMessageInfo *mi, *info;
- CamelStream *stream;
- char *uid, *resp;
- GData *data;
-
- CAMEL_SERVICE_ASSERT_LOCKED (store, connect_lock);
- if (store->server_level >= IMAP_LEVEL_IMAP4REV1)
- header_spec = "HEADER.FIELDS.NOT (RECEIVED)";
- 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 = strtoul(camel_message_info_uid (mi), NULL, 10);
- camel_folder_summary_info_free (folder->summary, mi);
- } else
- uidval = 0;
-
- size = (exists - seq) * (IMAP_PRETEND_SIZEOF_FLAGS + IMAP_PRETEND_SIZEOF_SIZE + IMAP_PRETEND_SIZEOF_HEADERS);
- got = 0;
- if (!camel_imap_command_start (store, folder, ex,
- "UID FETCH %d:* (FLAGS RFC822.SIZE INTERNALDATE BODY.PEEK[%s])",
- uidval + 1, header_spec))
- return;
- camel_operation_start (NULL, _("Fetching summary information 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;
-
- /* Free the final tagged response */
- g_free (resp);
-
- /* 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 *uidset;
- int uid = 0;
-
- qsort (needheaders->pdata, needheaders->len,
- sizeof (void *), uid_compar);
-
- camel_operation_start (NULL, _("Fetching summary information for new messages"));
-
- while (uid < needheaders->len) {
- uidset = imap_uid_array_to_set (folder->summary, needheaders, uid, UID_SET_LIMIT, &uid);
- if (!camel_imap_command_start (store, folder, ex,
- "UID FETCH %s BODY.PEEK[%s]",
- uidset, header_spec)) {
- g_ptr_array_free (needheaders, TRUE);
- camel_operation_end (NULL);
- g_free (uidset);
- goto lose;
- }
- g_free (uidset);
-
- 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);
- }
-
- if (type == CAMEL_IMAP_RESPONSE_ERROR) {
- g_ptr_array_free (needheaders, TRUE);
- camel_operation_end (NULL);
- goto lose;
- }
- }
-
- g_ptr_array_free (needheaders, TRUE);
- camel_operation_end (NULL);
- }
-
- /* 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];
- if (mi == NULL) {
- CamelMessageInfo *pmi = NULL;
- int j;
-
- /* This is a kludge around a bug in Exchange
- * 5.5 that sometimes claims multiple messages
- * have the same UID. See bug #17694 for
- * details. The "solution" is to create a fake
- * message-info with the same details as the
- * previously valid message. Yes, the user
- * will have a clone in his/her message-list,
- * but at least we don't crash.
- */
-
- /* find the previous valid message info */
- for (j = seq - first - 1; j >= 0; j--) {
- pmi = messages->pdata[j];
- if (pmi != NULL)
- break;
- }
-
- if (pmi == NULL) {
- /* Server response is *really* fucked up,
- I guess we just pretend it never happened? */
- continue;
- }
-
- mi = camel_message_info_new ();
- camel_message_info_dup_to (pmi, mi);
- }
-
- 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;
- }
- uid = (char *)camel_message_info_uid(mi);
- if (uid[0] == 0) {
- g_warning("Server provided no uid: message %d", i + first);
- continue;
- }
- info = camel_folder_summary_uid(folder->summary, uid);
- if (info) {
- g_warning("Message already present? %s", camel_message_info_uid(mi));
- camel_folder_summary_info_free(folder->summary, info);
- camel_folder_summary_info_free(folder->summary, mi);
- 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);
-
- /* Kludge around Microsoft Exchange 5.5 IMAP - See bug #5348 for details */
- if (camel_folder_summary_count (folder->summary) != exists) {
- CamelImapStore *imap_store = (CamelImapStore *) folder->parent_store;
- CamelImapResponse *response;
-
- /* forget the currently selected folder */
- if (imap_store->current_folder) {
- camel_object_unref (CAMEL_OBJECT (imap_store->current_folder));
- imap_store->current_folder = NULL;
- }
-
- /* now re-select it and process the EXISTS response */
- response = camel_imap_command (imap_store, folder, ex, NULL);
- if (response) {
- camel_imap_folder_selected (folder, response, NULL);
- camel_imap_response_free (imap_store, response);
- }
- }
-
- 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 connect_lock locked */
-void
-camel_imap_folder_changed (CamelFolder *folder, int exists,
- GArray *expunged, CamelException *ex)
-{
- CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (folder);
- CamelFolderChangeInfo *changes;
- CamelMessageInfo *info;
- int len;
-
- CAMEL_SERVICE_ASSERT_LOCKED (folder->parent_store, connect_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);
- 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
- * connect_lock. So we grab the connect_lock now, in case
- * we're going to need it below, since we can't grab it
- * after the cache_lock.
- */
- CAMEL_SERVICE_LOCK (store, connect_lock);
-
- CAMEL_IMAP_FOLDER_LOCK (imap_folder, cache_lock);
- stream = camel_imap_message_cache_get (imap_folder->cache, uid, section_text, ex);
- if (!stream && (!strcmp (section_text, "HEADER") || !strcmp (section_text, "0"))) {
- camel_exception_clear (ex);
- stream = camel_imap_message_cache_get (imap_folder->cache, uid, "", ex);
- }
-
- if (stream || cache_only) {
- CAMEL_IMAP_FOLDER_UNLOCK (imap_folder, cache_lock);
- CAMEL_SERVICE_UNLOCK (store, connect_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_SERVICE_UNLOCK (store, connect_lock);
- return NULL;
- }
-
- camel_exception_clear (ex);
- 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 connect_lock again after this. */
- CAMEL_SERVICE_UNLOCK (store, connect_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;
-}
-
-static GData *
-parse_fetch_response (CamelImapFolder *imap_folder, char *response)
-{
- GData *data = NULL;
- char *start, *part_spec = NULL, *body = NULL, *uid = NULL, *idate = NULL;
- gboolean cache_header = TRUE, header = FALSE;
- size_t 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 (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 (!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 (!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 (!strncasecmp (response, "BODY[", 5) ||
- !strncasecmp (response, "RFC822 ", 7)) {
- char *p;
-
- if (*response == 'B') {
- response += 5;
-
- /* HEADER], HEADER.FIELDS (...)], or 0] */
- if (!strncasecmp (response, "HEADER", 6)) {
- header = TRUE;
- if (!strncasecmp (response + 6, ".FIELDS", 7))
- cache_header = FALSE;
- } else if (!strncasecmp (response, "0]", 2))
- header = TRUE;
-
- p = strchr (response, ']');
- if (!p || *(p + 1) != ' ')
- break;
-
- if (cache_header)
- part_spec = g_strndup (response, p - response);
- else
- part_spec = g_strdup ("HEADER.FIELDS");
-
- response = p + 2;
- } else {
- part_spec = g_strdup ("");
- response += 7;
-
- if (!strncasecmp (response, "HEADER", 6))
- header = TRUE;
- }
-
- body = imap_parse_nstring ((const char **) &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 (!strncasecmp (response, "BODY ", 5) ||
- !strncasecmp (response, "BODYSTRUCTURE ", 14)) {
- response = strchr (response, ' ') + 1;
- start = response;
- imap_skip_list ((const char **) &response);
- g_datalist_set_data_full (&data, "BODY", g_strndup (start, response - start), g_free);
- } else if (!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 if (!strncasecmp (response, "INTERNALDATE ", 13)) {
- int len;
-
- response += 13;
- if (*response == '"') {
- response++;
- len = strcspn (response, "\"");
- idate = g_strndup (response, len);
- g_datalist_set_data_full (&data, "INTERNALDATE", idate, g_free);
- response += len + 1;
- }
- } 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;
-
- if (header && !cache_header) {
- stream = camel_stream_mem_new_with_buffer (body, body_len);
- } else {
- 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);
- }
-
- if (stream)
- 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 a49f7bd497..0000000000
--- a/camel/providers/imap/camel-imap-folder.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-imap-folder.h: 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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/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 559c6d2f88..0000000000
--- a/camel/providers/imap/camel-imap-message-cache.c
+++ /dev/null
@@ -1,527 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <dirent.h>
-#include <errno.h>
-#include <string.h>
-#include <ctype.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);
-
- 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;
-}
-
-/**
- * camel_imap_message_cache_set_path:
- * @cache:
- * @path:
- *
- * Set the path used for the message cache.
- **/
-void
-camel_imap_message_cache_set_path (CamelImapMessageCache *cache, const char *path)
-{
- g_free(cache->path);
- cache->path = g_strdup(path);
-}
-
-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_flush (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
- * @ex: exception
- *
- * 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, CamelException *ex)
-{
- CamelStream *stream;
- char *path, *key;
-
- if (uid[0] == 0)
- return NULL;
-
- 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_stream_reset (CAMEL_STREAM (stream));
- camel_object_ref (CAMEL_OBJECT (stream));
- g_free (path);
- return stream;
- }
-
- stream = camel_stream_fs_new_with_name (path, O_RDONLY, 0);
- if (stream) {
- cache_put (cache, uid, key, stream);
- } else {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to cache %s: %s"),
- part_spec, g_strerror (errno));
- }
-
- 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;
-
- if ((stream = camel_imap_message_cache_get (source, source_uid, part, ex))) {
- 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 c79195cfa4..0000000000
--- a/camel/providers/imap/camel-imap-message-cache.h
+++ /dev/null
@@ -1,111 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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);
-
-void camel_imap_message_cache_set_path (CamelImapMessageCache *cache,
- const char *path);
-
-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,
- CamelException *ex);
-
-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 0f80dbfd1c..0000000000
--- a/camel/providers/imap/camel-imap-private.h
+++ /dev/null
@@ -1,76 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#ifdef ENABLE_THREADS
-#include "e-util/e-msgport.h"
-#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 abda8f89a0..0000000000
--- a/camel/providers/imap/camel-imap-provider.c
+++ /dev/null
@@ -1,158 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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-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, "cmdsection", NULL,
- N_("Connection to Server") },
- { CAMEL_PROVIDER_CONF_CHECKBOX, "use_command", NULL,
- N_("Use custom command to connect to server"), "0" },
- { CAMEL_PROVIDER_CONF_ENTRY, "command", "use_command",
- N_("Command:"), "ssh -C -l %u %h exec /usr/sbin/imapd" },
- { CAMEL_PROVIDER_CONF_SECTION_END },
- { 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_CHECKBOX, "offline_sync", NULL,
- N_("Automatically synchronize remote mail locally"), "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.url_hash = imap_url_hash;
- imap_provider.url_equal = imap_url_equal;
- imap_provider.authtypes = 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 eacb839cb2..0000000000
--- a/camel/providers/imap/camel-imap-search.c
+++ /dev/null
@@ -1,499 +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>
- * Michael Zucchi <notzed@ximian.com>
- *
- * Copyright 2000, 2001, 2002 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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-imap-command.h"
-#include "camel-imap-folder.h"
-#include "camel-imap-store.h"
-#include "camel-imap-search.h"
-#include "camel-imap-private.h"
-#include "camel-imap-utils.h"
-#include "camel-imap-summary.h"
-
-#include "e-util/md5-utils.h" /* md5 hash building */
-#include "camel-mime-utils.h" /* base64 encoding */
-
-#include "camel-seekable-stream.h"
-#include "camel-search-private.h"
-
-#define d(x)
-
-/*
- File is:
- BODY (as in body search)
- Last uid when search performed
- termcount: number of search terms
- matchcount: number of matches
- term0, term1 ...
- match0, match1, match2, ...
-*/
-
-/* size of in-memory cache */
-#define MATCH_CACHE_SIZE (32)
-
-/* Also takes care of 'endianness' file magic */
-#define MATCH_MARK (('B' << 24) | ('O' << 16) | ('D' << 8) | 'Y')
-
-/* on-disk header, in native endianness format, matches follow */
-struct _match_header {
- guint32 mark;
- guint32 validity; /* uidvalidity for this folder */
- guint32 lastuid;
- guint32 termcount;
- guint32 matchcount;
-};
-
-/* in-memory record */
-struct _match_record {
- struct _match_record *next;
- struct _match_record *prev;
-
- char hash[17];
-
- guint32 lastuid;
- guint32 validity;
-
- unsigned int termcount;
- char **terms;
- GArray *matches;
-};
-
-
-static void free_match(CamelImapSearch *is, struct _match_record *mr);
-static ESExpResult *imap_body_contains (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-
-static CamelFolderSearchClass *imap_search_parent_class;
-
-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);
-
- imap_search_parent_class = (CamelFolderSearchClass *)camel_type_get_global_classfuncs (camel_folder_search_get_type ());
-
- /* virtual method overload */
- camel_folder_search_class->body_contains = imap_body_contains;
-}
-
-static void
-camel_imap_search_init(CamelImapSearch *is)
-{
- e_dlist_init(&is->matches);
- is->matches_hash = g_hash_table_new(g_str_hash, g_str_equal);
- is->matches_count = 0;
- is->lastuid = 0;
-}
-
-static void
-camel_imap_search_finalise(CamelImapSearch *is)
-{
- struct _match_record *mr;
-
- while ( (mr = (struct _match_record *)e_dlist_remtail(&is->matches)) )
- free_match(is, mr);
- g_hash_table_destroy(is->matches_hash);
- if (is->cache)
- camel_object_unref((CamelObject *)is->cache);
-}
-
-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,
- (CamelObjectInitFunc) camel_imap_search_init,
- (CamelObjectFinalizeFunc) camel_imap_search_finalise);
- }
-
- return camel_imap_search_type;
-}
-
-/**
- * camel_imap_search_new:
- *
- * Return value: A new CamelImapSearch widget.
- **/
-CamelFolderSearch *
-camel_imap_search_new (const char *cachedir)
-{
- CamelFolderSearch *new = CAMEL_FOLDER_SEARCH (camel_object_new (camel_imap_search_get_type ()));
- CamelImapSearch *is = (CamelImapSearch *)new;
-
- camel_folder_search_construct (new);
-
- is->cache = camel_data_cache_new(cachedir, 0, NULL);
- if (is->cache) {
- /* Expire entries after 14 days of inactivity */
- camel_data_cache_set_expire_access(is->cache, 60*60*24*14);
- }
-
- return new;
-}
-
-
-static void
-hash_match(char hash[17], int argc, struct _ESExpResult **argv)
-{
- MD5Context ctx;
- unsigned char digest[16];
- unsigned int state = 0, save = 0;
- int i;
-
- md5_init(&ctx);
- for (i=0;i<argc;i++) {
- if (argv[i]->type == ESEXP_RES_STRING)
- md5_update(&ctx, argv[i]->value.string, strlen(argv[i]->value.string));
- }
- md5_final(&ctx, digest);
-
- camel_base64_encode_close(digest, 12, FALSE, hash, &state, &save);
-
- for (i=0;i<16;i++) {
- if (hash[i] == '+')
- hash[i] = ',';
- if (hash[i] == '/')
- hash[i] = '_';
- }
-
- hash[16] = 0;
-}
-
-static int
-save_match(CamelImapSearch *is, struct _match_record *mr)
-{
- guint32 mark = MATCH_MARK;
- int ret = 0;
- struct _match_header header;
- CamelStream *stream;
-
- /* since its a cache, doesn't matter if it doesn't save, at least we have the in-memory cache
- for this session */
- if (is->cache == NULL)
- return -1;
-
- stream = camel_data_cache_add(is->cache, "search/body-contains", mr->hash, NULL);
- if (stream == NULL)
- return -1;
-
- d(printf("Saving search cache entry to '%s': %s\n", mr->hash, mr->terms[0]));
-
- /* we write the whole thing, then re-write the header magic, saves fancy sync code */
- memcpy(&header.mark, " ", 4);
- header.termcount = 0;
- header.matchcount = mr->matches->len;
- header.lastuid = mr->lastuid;
- header.validity = mr->validity;
-
- if (camel_stream_write(stream, (char *)&header, sizeof(header)) != sizeof(header)
- || camel_stream_write(stream, mr->matches->data, mr->matches->len*sizeof(guint32)) != mr->matches->len*sizeof(guint32)
- || camel_seekable_stream_seek((CamelSeekableStream *)stream, 0, CAMEL_STREAM_SET) == -1
- || camel_stream_write(stream, (char *)&mark, sizeof(mark)) != sizeof(mark)) {
- d(printf(" saving failed, removing cache entry\n"));
- camel_data_cache_remove(is->cache, "search/body-contains", mr->hash, NULL);
- ret = -1;
- }
-
- camel_object_unref((CamelObject *)stream);
- return ret;
-}
-
-static void
-free_match(CamelImapSearch *is, struct _match_record *mr)
-{
- int i;
-
- for (i=0;i<mr->termcount;i++)
- g_free(mr->terms[i]);
- g_free(mr->terms);
- g_array_free(mr->matches, TRUE);
- g_free(mr);
-}
-
-static struct _match_record *
-load_match(CamelImapSearch *is, char hash[17], int argc, struct _ESExpResult **argv)
-{
- struct _match_record *mr;
- CamelStream *stream = NULL;
- struct _match_header header;
- int i;
-
- mr = g_malloc0(sizeof(*mr));
- mr->matches = g_array_new(0, 0, sizeof(guint32));
- g_assert(strlen(hash) == 16);
- strcpy(mr->hash, hash);
- mr->terms = g_malloc0(sizeof(mr->terms[0]) * argc);
- for (i=0;i<argc;i++) {
- if (argv[i]->type == ESEXP_RES_STRING) {
- mr->termcount++;
- mr->terms[i] = g_strdup(argv[i]->value.string);
- }
- }
-
- d(printf("Loading search cache entry to '%s': %s\n", mr->hash, mr->terms[0]));
-
- memset(&header, 0, sizeof(header));
- if (is->cache)
- stream = camel_data_cache_get(is->cache, "search/body-contains", mr->hash, NULL);
- if (stream != NULL) {
- /* 'cause i'm gonna be lazy, i'm going to have the termcount == 0 for now,
- and not load or save them since i can't think of a nice way to do it, the hash
- should be sufficient to key it */
- /* This check should also handle endianness changes, we just throw away
- the data (its only a cache) */
- if (camel_stream_read(stream, (char *)&header, sizeof(header)) == sizeof(header)
- && header.validity == is->validity
- && header.mark == MATCH_MARK
- && header.termcount == 0) {
- d(printf(" found %d matches\n", header.matchcount));
- g_array_set_size(mr->matches, header.matchcount);
- camel_stream_read(stream, mr->matches->data, sizeof(guint32)*header.matchcount);
- } else {
- d(printf(" file format invalid/validity changed\n"));
- memset(&header, 0, sizeof(header));
- }
- camel_object_unref((CamelObject *)stream);
- } else {
- d(printf(" no cache entry found\n"));
- }
-
- mr->validity = header.validity;
- if (mr->validity != is->validity)
- mr->lastuid = 0;
- else
- mr->lastuid = header.lastuid;
-
- return mr;
-}
-
-static int
-sync_match(CamelImapSearch *is, struct _match_record *mr)
-{
- char *p, *result, *lasts = NULL;
- CamelImapResponse *response = NULL;
- guint32 uid;
- CamelFolder *folder = ((CamelFolderSearch *)is)->folder;
- CamelImapStore *store = (CamelImapStore *)folder->parent_store;
- struct _camel_search_words *words;
- GString *search;
- int i;
-
- if (mr->lastuid >= is->lastuid && mr->validity == is->validity)
- return 0;
-
- d(printf ("updating match record for uid's %d:%d\n", mr->lastuid+1, is->lastuid));
-
- /* TODO: Handle multiple search terms */
-
- /* This handles multiple search words within a single term */
- words = camel_search_words_split (mr->terms[0]);
- search = g_string_new ("");
- g_string_append_printf (search, "UID %d:%d", mr->lastuid + 1, is->lastuid);
- for (i = 0; i < words->len; i++) {
- char *w = words->words[i]->word, c;
-
- g_string_append_printf (search, " BODY \"");
- while ((c = *w++)) {
- if (c == '\\' || c == '"')
- g_string_append_c (search, '\\');
- g_string_append_c (search, c);
- }
- g_string_append_c (search, '"');
- }
- camel_search_words_free (words);
-
- /* We only try search using utf8 if its non us-ascii text? */
- if ((words->type & CAMEL_SEARCH_WORD_8BIT) && (store->capabilities & IMAP_CAPABILITY_utf8_search)) {
- response = camel_imap_command (store, folder, NULL,
- "UID SEARCH CHARSET UTF-8 %s", search->str);
- /* We can't actually tell if we got a NO response, so assume always */
- if (response == NULL)
- store->capabilities &= ~IMAP_CAPABILITY_utf8_search;
- }
- if (response == NULL)
- response = camel_imap_command (store, folder, NULL,
- "UID SEARCH %s", search->str);
- g_string_free(search, TRUE);
-
- if (!response)
- return -1;
- result = camel_imap_response_extract (store, response, "SEARCH", NULL);
- if (!result)
- return -1;
-
- p = result + sizeof ("* SEARCH");
- for (p = strtok_r (p, " ", &lasts); p; p = strtok_r (NULL, " ", &lasts)) {
- uid = strtoul(p, NULL, 10);
- g_array_append_vals(mr->matches, &uid, 1);
- }
- g_free(result);
-
- mr->validity = is->validity;
- mr->lastuid = is->lastuid;
- save_match(is, mr);
-
- return 0;
-}
-
-static struct _match_record *
-get_match(CamelImapSearch *is, int argc, struct _ESExpResult **argv)
-{
- char hash[17];
- struct _match_record *mr;
-
- hash_match(hash, argc, argv);
-
- mr = g_hash_table_lookup(is->matches_hash, hash);
- if (mr == NULL) {
- while (is->matches_count >= MATCH_CACHE_SIZE) {
- mr = (struct _match_record *)e_dlist_remtail(&is->matches);
- if (mr) {
- printf("expiring match '%s' (%s)\n", mr->hash, mr->terms[0]);
- g_hash_table_remove(is->matches_hash, mr->hash);
- free_match(is, mr);
- is->matches_count--;
- } else {
- is->matches_count = 0;
- }
- }
- mr = load_match(is, hash, argc, argv);
- g_hash_table_insert(is->matches_hash, mr->hash, mr);
- is->matches_count++;
- } else {
- e_dlist_remove((EDListNode *)mr);
- }
-
- e_dlist_addhead(&is->matches, (EDListNode *)mr);
-
- /* what about offline mode? */
- /* We could cache those results too, or should we cache them elsewhere? */
- sync_match(is, mr);
-
- return mr;
-}
-
-static ESExpResult *
-imap_body_contains (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s)
-{
- CamelImapStore *store = CAMEL_IMAP_STORE (s->folder->parent_store);
- CamelImapSearch *is = (CamelImapSearch *)s;
- char *uid;
- ESExpResult *r;
- CamelMessageInfo *info;
- GHashTable *uid_hash = NULL;
- GPtrArray *array;
- int i, j;
- struct _match_record *mr;
- guint32 uidn, *uidp;
-
- d(printf("Performing body search '%s'\n", argv[0]->value.string));
-
- /* TODO: Cache offline searches too? */
-
- /* If offline, search using the parent class, which can handle this manually */
- if (!camel_disco_store_check_online (CAMEL_DISCO_STORE (store), NULL))
- return imap_search_parent_class->body_contains(f, argc, argv, s);
-
- /* optimise the match "" case - match everything */
- if (argc == 1 && argv[0]->value.string[0] == '\0') {
- if (s->current) {
- r = e_sexp_result_new(f, ESEXP_RES_BOOL);
- r->value.bool = TRUE;
- } else {
- r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
- r->value.ptrarray = g_ptr_array_new ();
- for (i = 0; i < s->summary->len; i++) {
- info = g_ptr_array_index(s->summary, i);
- g_ptr_array_add(r->value.ptrarray, (char *)camel_message_info_uid(info));
- }
- }
- } else if (argc == 0 || s->summary->len == 0) {
- /* nothing to match case, do nothing (should be handled higher up?) */
- if (s->current) {
- 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 ();
- }
- } else {
- int truth = FALSE;
-
- /* setup lastuid/validity for synchronising */
- info = g_ptr_array_index(s->summary, s->summary->len-1);
- is->lastuid = strtoul(camel_message_info_uid(info), NULL, 10);
- is->validity = ((CamelImapSummary *)(s->folder->summary))->validity;
-
- mr = get_match(is, argc, argv);
-
- if (s->current) {
- uidn = strtoul(camel_message_info_uid(s->current), NULL, 10);
- uidp = (guint32 *)mr->matches->data;
- j = mr->matches->len;
- for (i=0;i<j && !truth;i++)
- truth = *uidp++ == uidn;
- r = e_sexp_result_new(f, ESEXP_RES_BOOL);
- r->value.bool = truth;
- } else {
- r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
- array = r->value.ptrarray = g_ptr_array_new();
-
- /* We use a hash to map the uid numbers to uid strings as required by the search api */
- /* We use the summary's strings so we dont need to alloc more */
- uid_hash = g_hash_table_new(NULL, NULL);
- for (i = 0; i < s->summary->len; i++) {
- info = s->summary->pdata[i];
- uid = (char *)camel_message_info_uid(info);
- uidn = strtoul(uid, NULL, 10);
- g_hash_table_insert(uid_hash, GUINT_TO_POINTER(uidn), uid);
- }
-
- uidp = (guint32 *)mr->matches->data;
- j = mr->matches->len;
- for (i=0;i<j && !truth;i++) {
- uid = g_hash_table_lookup(uid_hash, GUINT_TO_POINTER(*uidp++));
- if (uid)
- g_ptr_array_add(array, uid);
- }
-
- g_hash_table_destroy(uid_hash);
- }
- }
-
- return r;
-}
diff --git a/camel/providers/imap/camel-imap-search.h b/camel/providers/imap/camel-imap-search.h
deleted file mode 100644
index 7664c4c2ed..0000000000
--- a/camel/providers/imap/camel-imap-search.h
+++ /dev/null
@@ -1,62 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_SEARCH_H
-#define _CAMEL_IMAP_SEARCH_H
-
-#include <camel/camel-folder-search.h>
-#include <e-util/e-msgport.h>
-#include <camel/camel-data-cache.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;
-
- guint32 lastuid; /* current 'last uid' for the folder */
- guint32 validity; /* validity of the current folder */
-
- CamelDataCache *cache; /* disk-cache for searches */
-
- /* cache of body search matches */
- unsigned int matches_count;
- EDList matches;
- GHashTable *matches_hash;
-};
-
-struct _CamelImapSearchClass {
- CamelFolderSearchClass parent_class;
-
-};
-
-CamelType camel_imap_search_get_type (void);
-CamelFolderSearch *camel_imap_search_new (const char *cachedir);
-
-#endif /* ! _CAMEL_IMAP_SEARCH_H */
diff --git a/camel/providers/imap/camel-imap-store-summary.c b/camel/providers/imap/camel-imap-store-summary.c
deleted file mode 100644
index 32530d3c3f..0000000000
--- a/camel/providers/imap/camel-imap-store-summary.c
+++ /dev/null
@@ -1,619 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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-imap-store-summary.h"
-
-#include "camel-file-utils.h"
-
-#include "e-util/md5-utils.h"
-#include "e-util/e-memory.h"
-
-#include "camel-private.h"
-#include "camel-utf8.h"
-
-#define d(x)
-#define io(x) /* io debug */
-
-#define CAMEL_IMAP_STORE_SUMMARY_VERSION_0 (0)
-
-#define CAMEL_IMAP_STORE_SUMMARY_VERSION (0)
-
-#define _PRIVATE(o) (((CamelImapStoreSummary *)(o))->priv)
-
-static int summary_header_load(CamelStoreSummary *, FILE *);
-static int summary_header_save(CamelStoreSummary *, FILE *);
-
-/*static CamelStoreInfo * store_info_new(CamelStoreSummary *, const char *);*/
-static CamelStoreInfo * store_info_load(CamelStoreSummary *, FILE *);
-static int store_info_save(CamelStoreSummary *, FILE *, CamelStoreInfo *);
-static void store_info_free(CamelStoreSummary *, CamelStoreInfo *);
-
-static const char *store_info_string(CamelStoreSummary *, const CamelStoreInfo *, int);
-static void store_info_set_string(CamelStoreSummary *, CamelStoreInfo *, int, const char *);
-
-static void camel_imap_store_summary_class_init (CamelImapStoreSummaryClass *klass);
-static void camel_imap_store_summary_init (CamelImapStoreSummary *obj);
-static void camel_imap_store_summary_finalise (CamelObject *obj);
-
-static CamelStoreSummaryClass *camel_imap_store_summary_parent;
-
-static void
-camel_imap_store_summary_class_init (CamelImapStoreSummaryClass *klass)
-{
- CamelStoreSummaryClass *ssklass = (CamelStoreSummaryClass *)klass;
-
- ssklass->summary_header_load = summary_header_load;
- ssklass->summary_header_save = summary_header_save;
-
- /*ssklass->store_info_new = store_info_new;*/
- ssklass->store_info_load = store_info_load;
- ssklass->store_info_save = store_info_save;
- ssklass->store_info_free = store_info_free;
-
- ssklass->store_info_string = store_info_string;
- ssklass->store_info_set_string = store_info_set_string;
-}
-
-static void
-camel_imap_store_summary_init (CamelImapStoreSummary *s)
-{
- /*struct _CamelImapStoreSummaryPrivate *p;
-
- p = _PRIVATE(s) = g_malloc0(sizeof(*p));*/
-
- ((CamelStoreSummary *)s)->store_info_size = sizeof(CamelImapStoreInfo);
- s->version = CAMEL_IMAP_STORE_SUMMARY_VERSION;
-}
-
-static void
-camel_imap_store_summary_finalise (CamelObject *obj)
-{
- /*struct _CamelImapStoreSummaryPrivate *p;*/
- /*CamelImapStoreSummary *s = (CamelImapStoreSummary *)obj;*/
-
- /*p = _PRIVATE(obj);
- g_free(p);*/
-}
-
-CamelType
-camel_imap_store_summary_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- camel_imap_store_summary_parent = (CamelStoreSummaryClass *)camel_store_summary_get_type();
- type = camel_type_register((CamelType)camel_imap_store_summary_parent, "CamelImapStoreSummary",
- sizeof (CamelImapStoreSummary),
- sizeof (CamelImapStoreSummaryClass),
- (CamelObjectClassInitFunc) camel_imap_store_summary_class_init,
- NULL,
- (CamelObjectInitFunc) camel_imap_store_summary_init,
- (CamelObjectFinalizeFunc) camel_imap_store_summary_finalise);
- }
-
- return type;
-}
-
-/**
- * camel_imap_store_summary_new:
- *
- * Create a new CamelImapStoreSummary object.
- *
- * Return value: A new CamelImapStoreSummary widget.
- **/
-CamelImapStoreSummary *
-camel_imap_store_summary_new (void)
-{
- CamelImapStoreSummary *new = CAMEL_IMAP_STORE_SUMMARY ( camel_object_new (camel_imap_store_summary_get_type ()));
-
- return new;
-}
-
-/**
- * camel_imap_store_summary_full_name:
- * @s:
- * @path:
- *
- * Retrieve a summary item by full name.
- *
- * 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 @full_name name
- * is not available.
- * It must be freed using camel_store_summary_info_free().
- **/
-CamelImapStoreInfo *
-camel_imap_store_summary_full_name(CamelImapStoreSummary *s, const char *full_name)
-{
- int count, i;
- CamelImapStoreInfo *info;
-
- count = camel_store_summary_count((CamelStoreSummary *)s);
- for (i=0;i<count;i++) {
- info = (CamelImapStoreInfo *)camel_store_summary_index((CamelStoreSummary *)s, i);
- if (info) {
- if (strcmp(info->full_name, full_name) == 0)
- return info;
- camel_store_summary_info_free((CamelStoreSummary *)s, (CamelStoreInfo *)info);
- }
- }
-
- return NULL;
-}
-
-char *
-camel_imap_store_summary_full_to_path(CamelImapStoreSummary *s, const char *full_name, char dir_sep)
-{
- char *path, *p;
- int c;
- const char *f;
-
- if (dir_sep != '/') {
- p = path = alloca(strlen(full_name)*3+1);
- f = full_name;
- while ( (c = *f++ & 0xff) ) {
- if (c == dir_sep)
- *p++ = '/';
- else if (c == '/' || c == '%')
- p += sprintf(p, "%%%02X", c);
- else
- *p++ = c;
- }
- *p = 0;
- } else
- path = (char *)full_name;
-
- return camel_utf7_utf8(path);
-}
-
-static guint32 hexnib(guint32 c)
-{
- if (c >= '0' && c <= '9')
- return c-'0';
- else if (c>='A' && c <= 'Z')
- return c-'A'+10;
- else
- return 0;
-}
-
-char *
-camel_imap_store_summary_path_to_full(CamelImapStoreSummary *s, const char *path, char dir_sep)
-{
- unsigned char *full, *f;
- guint32 c, v = 0;
- const char *p;
- int state=0;
- char *subpath, *last = NULL;
- CamelStoreInfo *si;
- CamelImapStoreNamespace *ns;
-
- /* check to see if we have a subpath of path already defined */
- subpath = alloca(strlen(path)+1);
- strcpy(subpath, path);
- do {
- si = camel_store_summary_path((CamelStoreSummary *)s, subpath);
- if (si == NULL) {
- last = strrchr(subpath, '/');
- if (last)
- *last = 0;
- }
- } while (si == NULL && last);
-
- /* path is already present, use the raw version we have */
- if (si && strlen(subpath) == strlen(path)) {
- f = g_strdup(camel_imap_store_info_full_name(s, si));
- camel_store_summary_info_free((CamelStoreSummary *)s, si);
- return f;
- }
-
- ns = camel_imap_store_summary_namespace_find_path(s, path);
-
- f = full = alloca(strlen(path)*2+1);
- if (si)
- p = path + strlen(subpath);
- else if (ns)
- p = path + strlen(ns->path);
- else
- p = path;
-
- while ( (c = camel_utf8_getc((const unsigned char **)&p)) ) {
- switch(state) {
- case 0:
- if (c == '%')
- state = 1;
- else {
- if (c == '/')
- c = dir_sep;
- camel_utf8_putc(&f, c);
- }
- break;
- case 1:
- state = 2;
- v = hexnib(c)<<4;
- break;
- case 2:
- state = 0;
- v |= hexnib(c);
- camel_utf8_putc(&f, v);
- break;
- }
- }
- camel_utf8_putc(&f, c);
-
- /* merge old path part if required */
- f = camel_utf8_utf7(full);
- if (si) {
- full = g_strdup_printf("%s%s", camel_imap_store_info_full_name(s, si), f);
- g_free(f);
- camel_store_summary_info_free((CamelStoreSummary *)s, si);
- f = full;
- } else if (ns) {
- full = g_strdup_printf("%s%s", ns->full_name, f);
- g_free(f);
- f = full;
- }
-
- return f;
-}
-
-CamelImapStoreInfo *
-camel_imap_store_summary_add_from_full(CamelImapStoreSummary *s, const char *full, char dir_sep)
-{
- CamelImapStoreInfo *info;
- char *pathu8, *prefix;
- int len;
- char *full_name;
- CamelImapStoreNamespace *ns;
-
- d(printf("adding full name '%s' '%c'\n", full, dir_sep));
-
- len = strlen(full);
- full_name = alloca(len+1);
- strcpy(full_name, full);
- if (full_name[len-1] == dir_sep)
- full_name[len-1] = 0;
-
- info = camel_imap_store_summary_full_name(s, full_name);
- if (info) {
- camel_store_summary_info_free((CamelStoreSummary *)s, (CamelStoreInfo *)info);
- d(printf(" already there\n"));
- return info;
- }
-
- ns = camel_imap_store_summary_namespace_find_full(s, full_name);
- if (ns) {
- d(printf("(found namespace for '%s' ns '%s') ", full_name, ns->path));
- len = strlen(ns->full_name);
- if (len >= strlen(full_name)) {
- pathu8 = g_strdup(ns->path);
- } else {
- if (full_name[len] == ns->sep)
- len++;
-
- prefix = camel_imap_store_summary_full_to_path(s, full_name+len, ns->sep);
- if (*ns->path) {
- pathu8 = g_strdup_printf ("%s/%s", ns->path, prefix);
- g_free (prefix);
- } else {
- pathu8 = prefix;
- }
- }
- d(printf(" (pathu8 = '%s')", pathu8));
- } else {
- d(printf("(Cannot find namespace for '%s')\n", full_name));
- pathu8 = camel_imap_store_summary_full_to_path(s, full_name, dir_sep);
- }
-
- info = (CamelImapStoreInfo *)camel_store_summary_add_from_path((CamelStoreSummary *)s, pathu8);
- if (info) {
- d(printf(" '%s' -> '%s'\n", pathu8, full_name));
- camel_store_info_set_string((CamelStoreSummary *)s, (CamelStoreInfo *)info, CAMEL_IMAP_STORE_INFO_FULL_NAME, full_name);
- } else
- d(printf(" failed\n"));
-
- return info;
-}
-
-/* should this be const? */
-/* TODO: deprecate/merge this function with path_to_full */
-char *
-camel_imap_store_summary_full_from_path(CamelImapStoreSummary *s, const char *path)
-{
- CamelImapStoreNamespace *ns;
- char *name = NULL;
-
- ns = camel_imap_store_summary_namespace_find_path(s, path);
- if (ns)
- name = camel_imap_store_summary_path_to_full(s, path, ns->sep);
-
- d(printf("looking up path %s -> %s\n", path, name?name:"not found"));
-
- return name;
-}
-
-/* TODO: this api needs some more work */
-CamelImapStoreNamespace *camel_imap_store_summary_namespace_new(CamelImapStoreSummary *s, const char *full_name, char dir_sep)
-{
- CamelImapStoreNamespace *ns;
- char *p, *o, c;
- int len;
-
- ns = g_malloc0(sizeof(*ns));
- ns->full_name = g_strdup(full_name);
- len = strlen(ns->full_name)-1;
- if (len >= 0 && ns->full_name[len] == dir_sep)
- ns->full_name[len] = 0;
- ns->sep = dir_sep;
-
- o = p = ns->path = camel_imap_store_summary_full_to_path(s, ns->full_name, dir_sep);
- while ((c = *p++)) {
- if (c != '#') {
- if (c == '/')
- c = '.';
- *o++ = c;
- }
- }
- *o = 0;
-
- return ns;
-}
-
-void camel_imap_store_summary_namespace_set(CamelImapStoreSummary *s, CamelImapStoreNamespace *ns)
-{
- static void namespace_clear(CamelStoreSummary *s);
-
- d(printf("Setting namesapce to '%s' '%c' -> '%s'\n", ns->full_name, ns->sep, ns->path));
- namespace_clear((CamelStoreSummary *)s);
- s->namespace = ns;
- camel_store_summary_touch((CamelStoreSummary *)s);
-}
-
-CamelImapStoreNamespace *
-camel_imap_store_summary_namespace_find_path(CamelImapStoreSummary *s, const char *path)
-{
- int len;
- CamelImapStoreNamespace *ns;
-
- /* NB: this currently only compares against 1 namespace, in future compare against others */
- ns = s->namespace;
- while (ns) {
- len = strlen(ns->path);
- if (len == 0
- || (strncmp(ns->path, path, len) == 0
- && (path[len] == '/' || path[len] == 0)))
- break;
- ns = NULL;
- }
-
- /* have a default? */
- return ns;
-}
-
-CamelImapStoreNamespace *
-camel_imap_store_summary_namespace_find_full(CamelImapStoreSummary *s, const char *full)
-{
- int len;
- CamelImapStoreNamespace *ns;
-
- /* NB: this currently only compares against 1 namespace, in future compare against others */
- ns = s->namespace;
- while (ns) {
- len = strlen(ns->full_name);
- d(printf("find_full: comparing namespace '%s' to name '%s'\n", ns->full_name, full));
- if (len == 0
- || (strncmp(ns->full_name, full, len) == 0
- && (full[len] == ns->sep || full[len] == 0)))
- break;
- ns = NULL;
- }
-
- /* have a default? */
- return ns;
-}
-
-static void
-namespace_free(CamelStoreSummary *s, CamelImapStoreNamespace *ns)
-{
- g_free(ns->path);
- g_free(ns->full_name);
- g_free(ns);
-}
-
-static void
-namespace_clear(CamelStoreSummary *s)
-{
- CamelImapStoreSummary *is = (CamelImapStoreSummary *)s;
-
- if (is->namespace)
- namespace_free(s, is->namespace);
- is->namespace = NULL;
-}
-
-static CamelImapStoreNamespace *
-namespace_load(CamelStoreSummary *s, FILE *in)
-{
- CamelImapStoreNamespace *ns;
- guint32 sep = '/';
-
- ns = g_malloc0(sizeof(*ns));
- if (camel_file_util_decode_string(in, &ns->path) == -1
- || camel_file_util_decode_string(in, &ns->full_name) == -1
- || camel_file_util_decode_uint32(in, &sep) == -1) {
- namespace_free(s, ns);
- ns = NULL;
- } else {
- ns->sep = sep;
- }
-
- return ns;
-}
-
-static int
-namespace_save(CamelStoreSummary *s, FILE *in, CamelImapStoreNamespace *ns)
-{
- if (camel_file_util_encode_string(in, ns->path) == -1
- || camel_file_util_encode_string(in, ns->full_name) == -1
- || camel_file_util_encode_uint32(in, (guint32)ns->sep) == -1)
- return -1;
-
- return 0;
-}
-
-static int
-summary_header_load(CamelStoreSummary *s, FILE *in)
-{
- CamelImapStoreSummary *is = (CamelImapStoreSummary *)s;
- gint32 version, capabilities, count;
-
- namespace_clear(s);
-
- if (camel_imap_store_summary_parent->summary_header_load((CamelStoreSummary *)s, in) == -1
- || camel_file_util_decode_fixed_int32(in, &version) == -1)
- return -1;
-
- is->version = version;
-
- if (version < CAMEL_IMAP_STORE_SUMMARY_VERSION_0) {
- g_warning("Store summary header version too low");
- return -1;
- }
-
- /* note file format can be expanded to contain more namespaces, but only 1 at the moment */
- if (camel_file_util_decode_fixed_int32(in, &capabilities) == -1
- || camel_file_util_decode_fixed_int32(in, &count) == -1
- || count > 1)
- return -1;
-
- is->capabilities = capabilities;
- if (count == 1) {
- if ((is->namespace = namespace_load(s, in)) == NULL)
- return -1;
- }
-
- return 0;
-}
-
-static int
-summary_header_save(CamelStoreSummary *s, FILE *out)
-{
- CamelImapStoreSummary *is = (CamelImapStoreSummary *)s;
- guint32 count;
-
- count = is->namespace?1:0;
-
- /* always write as latest version */
- if (camel_imap_store_summary_parent->summary_header_save((CamelStoreSummary *)s, out) == -1
- || camel_file_util_encode_fixed_int32(out, CAMEL_IMAP_STORE_SUMMARY_VERSION) == -1
- || camel_file_util_encode_fixed_int32(out, is->capabilities) == -1
- || camel_file_util_encode_fixed_int32(out, count) == -1)
- return -1;
-
- if (is->namespace && namespace_save(s, out, is->namespace) == -1)
- return -1;
-
- return 0;
-}
-
-static CamelStoreInfo *
-store_info_load(CamelStoreSummary *s, FILE *in)
-{
- CamelImapStoreInfo *mi;
-
- mi = (CamelImapStoreInfo *)camel_imap_store_summary_parent->store_info_load(s, in);
- if (mi) {
- if (camel_file_util_decode_string(in, &mi->full_name) == -1) {
- camel_store_summary_info_free(s, (CamelStoreInfo *)mi);
- mi = NULL;
- }
- }
-
- return (CamelStoreInfo *)mi;
-}
-
-static int
-store_info_save(CamelStoreSummary *s, FILE *out, CamelStoreInfo *mi)
-{
- CamelImapStoreInfo *isi = (CamelImapStoreInfo *)mi;
-
- if (camel_imap_store_summary_parent->store_info_save(s, out, mi) == -1
- || camel_file_util_encode_string(out, isi->full_name) == -1)
- return -1;
-
- return 0;
-}
-
-static void
-store_info_free(CamelStoreSummary *s, CamelStoreInfo *mi)
-{
- CamelImapStoreInfo *isi = (CamelImapStoreInfo *)mi;
-
- g_free(isi->full_name);
- camel_imap_store_summary_parent->store_info_free(s, mi);
-}
-
-static const char *
-store_info_string(CamelStoreSummary *s, const CamelStoreInfo *mi, int type)
-{
- CamelImapStoreInfo *isi = (CamelImapStoreInfo *)mi;
-
- /* FIXME: Locks? */
-
- g_assert (mi != NULL);
-
- switch (type) {
- case CAMEL_IMAP_STORE_INFO_FULL_NAME:
- return isi->full_name;
- default:
- return camel_imap_store_summary_parent->store_info_string(s, mi, type);
- }
-}
-
-static void
-store_info_set_string(CamelStoreSummary *s, CamelStoreInfo *mi, int type, const char *str)
-{
- CamelImapStoreInfo *isi = (CamelImapStoreInfo *)mi;
-
- g_assert(mi != NULL);
-
- switch(type) {
- case CAMEL_IMAP_STORE_INFO_FULL_NAME:
- d(printf("Set full name %s -> %s\n", isi->full_name, str));
- CAMEL_STORE_SUMMARY_LOCK(s, summary_lock);
- g_free(isi->full_name);
- isi->full_name = g_strdup(str);
- CAMEL_STORE_SUMMARY_UNLOCK(s, summary_lock);
- break;
- default:
- camel_imap_store_summary_parent->store_info_set_string(s, mi, type, str);
- break;
- }
-}
diff --git a/camel/providers/imap/camel-imap-store-summary.h b/camel/providers/imap/camel-imap-store-summary.h
deleted file mode 100644
index 0fa6be0df3..0000000000
--- a/camel/providers/imap/camel-imap-store-summary.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_SUMMARY_H
-#define _CAMEL_IMAP_STORE_SUMMARY_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <camel/camel-object.h>
-#include <camel/camel-store-summary.h>
-
-#define CAMEL_IMAP_STORE_SUMMARY(obj) CAMEL_CHECK_CAST (obj, camel_imap_store_summary_get_type (), CamelImapStoreSummary)
-#define CAMEL_IMAP_STORE_SUMMARY_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_imap_store_summary_get_type (), CamelImapStoreSummaryClass)
-#define CAMEL_IS_IMAP_STORE_SUMMARY(obj) CAMEL_CHECK_TYPE (obj, camel_imap_store_summary_get_type ())
-
-typedef struct _CamelImapStoreSummary CamelImapStoreSummary;
-typedef struct _CamelImapStoreSummaryClass CamelImapStoreSummaryClass;
-
-typedef struct _CamelImapStoreInfo CamelImapStoreInfo;
-
-enum {
- CAMEL_IMAP_STORE_INFO_FULL_NAME = CAMEL_STORE_INFO_LAST,
- CAMEL_IMAP_STORE_INFO_LAST,
-};
-
-struct _CamelImapStoreInfo {
- CamelStoreInfo info;
- char *full_name;
-};
-
-typedef struct _CamelImapStoreNamespace CamelImapStoreNamespace;
-
-struct _CamelImapStoreNamespace {
- char *path; /* display path */
- char *full_name; /* real name */
- char sep; /* directory separator */
-};
-
-struct _CamelImapStoreSummary {
- CamelStoreSummary summary;
-
- struct _CamelImapStoreSummaryPrivate *priv;
-
- /* header info */
- guint32 version; /* version of base part of file */
- guint32 capabilities;
- CamelImapStoreNamespace *namespace; /* eventually to be a list */
-};
-
-struct _CamelImapStoreSummaryClass {
- CamelStoreSummaryClass summary_class;
-};
-
-CamelType camel_imap_store_summary_get_type (void);
-CamelImapStoreSummary *camel_imap_store_summary_new (void);
-
-/* TODO: this api needs some more work, needs to support lists */
-CamelImapStoreNamespace *camel_imap_store_summary_namespace_new(CamelImapStoreSummary *s, const char *full_name, char dir_sep);
-void camel_imap_store_summary_namespace_set(CamelImapStoreSummary *s, CamelImapStoreNamespace *ns);
-CamelImapStoreNamespace *camel_imap_store_summary_namespace_find_path(CamelImapStoreSummary *s, const char *path);
-CamelImapStoreNamespace *camel_imap_store_summary_namespace_find_full(CamelImapStoreSummary *s, const char *full_name);
-
-/* converts to/from utf8 canonical nasmes */
-char *camel_imap_store_summary_full_to_path(CamelImapStoreSummary *s, const char *full_name, char dir_sep);
-char *camel_imap_store_summary_path_to_full(CamelImapStoreSummary *s, const char *path, char dir_sep);
-
-CamelImapStoreInfo *camel_imap_store_summary_full_name(CamelImapStoreSummary *s, const char *full_name);
-CamelImapStoreInfo *camel_imap_store_summary_add_from_full(CamelImapStoreSummary *s, const char *full_name, char dir_sep);
-
-/* a convenience lookup function. always use this if path known */
-char *camel_imap_store_summary_full_from_path(CamelImapStoreSummary *s, const char *path);
-
-/* helper macro's */
-#define camel_imap_store_info_full_name(s, i) (camel_store_info_string((CamelStoreSummary *)s, (const CamelStoreInfo *)i, CAMEL_IMAP_STORE_INFO_FULL_NAME))
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* ! _CAMEL_IMAP_STORE_SUMMARY_H */
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
deleted file mode 100644
index 07152eef87..0000000000
--- a/camel/providers/imap/camel-imap-store.c
+++ /dev/null
@@ -1,2845 +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, 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <unistd.h>
-#include <errno.h>
-
-#include "e-util/e-path.h"
-
-#include "camel-imap-store.h"
-#include "camel-imap-store-summary.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-stream-process.h"
-#include "camel-tcp-stream-raw.h"
-#include "camel-tcp-stream-ssl.h"
-#include "camel-url.h"
-#include "camel-sasl.h"
-#include "camel-utf8.h"
-#include "camel-string-utils.h"
-
-#include "camel-imap-private.h"
-#include "camel-private.h"
-
-#define d(x)
-
-/* Specified in RFC 2060 */
-#define IMAP_PORT 143
-#define SIMAP_PORT 993
-
-
-extern int camel_verbose_debug;
-
-static CamelDiscoStoreClass *parent_class = NULL;
-
-static char imap_tag_prefix = 'A';
-
-static void construct (CamelService *service, CamelSession *session,
- CamelProvider *provider, CamelURL *url,
- CamelException *ex);
-
-static int imap_setv (CamelObject *object, CamelException *ex, CamelArgV *args);
-static int imap_getv (CamelObject *object, CamelException *ex, CamelArgGetV *args);
-
-static char *imap_get_name (CamelService *service, gboolean brief);
-
-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 void imap_noop (CamelStore *store, 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 void rename_folder (CamelStore *store, const char *old_name, const char *new_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 get_folders_online (CamelImapStore *imap_store, const char *pattern,
- GPtrArray *folders, gboolean lsub, CamelException *ex);
-
-
-static void imap_folder_effectively_unsubscribed(CamelImapStore *imap_store, const char *folder_name, CamelException *ex);
-static gboolean imap_check_folder_still_extant (CamelImapStore *imap_store, const char *full_name, CamelException *ex);
-static void imap_forget_folder(CamelImapStore *imap_store, const char *folder_name, CamelException *ex);
-static void imap_set_server_level (CamelImapStore *store);
-
-static void
-camel_imap_store_class_init (CamelImapStoreClass *camel_imap_store_class)
-{
- CamelObjectClass *camel_object_class =
- CAMEL_OBJECT_CLASS (camel_imap_store_class);
- CamelServiceClass *camel_service_class =
- CAMEL_SERVICE_CLASS (camel_imap_store_class);
- CamelStoreClass *camel_store_class =
- CAMEL_STORE_CLASS (camel_imap_store_class);
- CamelDiscoStoreClass *camel_disco_store_class =
- CAMEL_DISCO_STORE_CLASS (camel_imap_store_class);
-
- parent_class = CAMEL_DISCO_STORE_CLASS (camel_type_get_global_classfuncs (camel_disco_store_get_type ()));
-
- /* virtual method overload */
- camel_object_class->setv = imap_setv;
- camel_object_class->getv = imap_getv;
-
- camel_service_class->construct = construct;
- camel_service_class->query_auth_types = query_auth_types;
- camel_service_class->get_name = imap_get_name;
-
- 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->rename_folder = rename_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_store_class->noop = imap_noop;
-
- 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, streams, and namespace. */
- camel_service_disconnect((CamelService *)imap_store, TRUE, NULL);
-
- if (imap_store->summary) {
- camel_store_summary_save((CamelStoreSummary *)imap_store->summary);
- camel_object_unref(imap_store->summary);
- }
-
- 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_thread_destroy (imap_store->async_thread);
-#endif
-}
-
-#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)
-{
- CamelImapStore *imap_store = CAMEL_IMAP_STORE (object);
-
- imap_store->istream = NULL;
- imap_store->ostream = NULL;
-
- imap_store->dir_sep = '\0';
- imap_store->current_folder = NULL;
- imap_store->connected = FALSE;
- imap_store->preauthed = FALSE;
-
- imap_store->tag_prefix = imap_tag_prefix++;
- if (imap_tag_prefix > 'Z')
- imap_tag_prefix = 'A';
-
-#ifdef ENABLE_THREADS
- 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 /* ENABLE_THREADS */
-}
-
-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);
- char *tmp;
- CamelURL *summary_url;
-
- CAMEL_SERVICE_CLASS (parent_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;
- g_free(imap_store->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;
- }
-
- /* setup/load the store summary */
- tmp = alloca(strlen(imap_store->storage_path)+32);
- sprintf(tmp, "%s/.ev-store-summary", imap_store->storage_path);
- imap_store->summary = camel_imap_store_summary_new();
- camel_store_summary_set_filename((CamelStoreSummary *)imap_store->summary, tmp);
- summary_url = camel_url_new(imap_store->base_url, NULL);
- camel_store_summary_set_uri_base((CamelStoreSummary *)imap_store->summary, summary_url);
- camel_url_free(summary_url);
- if (camel_store_summary_load((CamelStoreSummary *)imap_store->summary) == 0) {
- CamelImapStoreSummary *is = imap_store->summary;
-
- if (is->namespace) {
- /* if namespace has changed, clear folder list */
- if (imap_store->namespace && strcmp(imap_store->namespace, is->namespace->full_name) != 0) {
- camel_store_summary_clear((CamelStoreSummary *)is);
- } else {
- imap_store->namespace = g_strdup(is->namespace->full_name);
- imap_store->dir_sep = is->namespace->sep;
- store->dir_sep = is->namespace->sep;
- }
- }
-
- imap_store->capabilities = is->capabilities;
- imap_set_server_level(imap_store);
- }
-}
-
-static int
-imap_setv (CamelObject *object, CamelException *ex, CamelArgV *args)
-{
- CamelImapStore *store = (CamelImapStore *) object;
- guint32 tag, flags;
- int i;
-
- for (i = 0; i < args->argc; i++) {
- tag = args->argv[i].tag;
-
- /* make sure this arg wasn't already handled */
- if (tag & CAMEL_ARG_IGNORE)
- continue;
-
- /* make sure this is an arg we're supposed to handle */
- if ((tag & CAMEL_ARG_TAG) <= CAMEL_IMAP_STORE_ARG_FIRST ||
- (tag & CAMEL_ARG_TAG) >= CAMEL_IMAP_STORE_ARG_FIRST + 100)
- continue;
-
- if (tag == CAMEL_IMAP_STORE_NAMESPACE) {
- if (strcmp (store->namespace, args->argv[i].ca_str) != 0) {
- g_free (store->namespace);
- store->namespace = g_strdup (args->argv[i].ca_str);
- /* the current imap code will need to do a reconnect for this to take effect */
- /*reconnect = TRUE;*/
- }
- } else if (tag == CAMEL_IMAP_STORE_OVERRIDE_NAMESPACE) {
- flags = args->argv[i].ca_int ? IMAP_PARAM_OVERRIDE_NAMESPACE : 0;
- flags |= (store->parameters & ~IMAP_PARAM_OVERRIDE_NAMESPACE);
-
- if (store->parameters != flags) {
- store->parameters = flags;
- /* the current imap code will need to do a reconnect for this to take effect */
- /*reconnect = TRUE;*/
- }
- } else if (tag == CAMEL_IMAP_STORE_CHECK_ALL) {
- flags = args->argv[i].ca_int ? IMAP_PARAM_CHECK_ALL : 0;
- flags |= (store->parameters & ~IMAP_PARAM_CHECK_ALL);
- store->parameters = flags;
- /* no need to reconnect for this option to take effect... */
- } else if (tag == CAMEL_IMAP_STORE_FILTER_INBOX) {
- flags = args->argv[i].ca_int ? IMAP_PARAM_FILTER_INBOX : 0;
- flags |= (store->parameters & ~IMAP_PARAM_FILTER_INBOX);
- store->parameters = flags;
- /* no need to reconnect for this option to take effect... */
- } else {
- /* error?? */
- continue;
- }
-
- /* let our parent know that we've handled this arg */
- camel_argv_ignore (args, i);
- }
-
- /* FIXME: if we need to reconnect for a change to take affect,
- we need to do it here... or, better yet, somehow chain it
- up to CamelService's setv implementation. */
-
- return CAMEL_OBJECT_CLASS (parent_class)->setv (object, ex, args);
-}
-
-static int
-imap_getv (CamelObject *object, CamelException *ex, CamelArgGetV *args)
-{
- CamelImapStore *store = (CamelImapStore *) object;
- guint32 tag;
- int i;
-
- for (i = 0; i < args->argc; i++) {
- tag = args->argv[i].tag;
-
- /* make sure this is an arg we're supposed to handle */
- if ((tag & CAMEL_ARG_TAG) <= CAMEL_IMAP_STORE_ARG_FIRST ||
- (tag & CAMEL_ARG_TAG) >= CAMEL_IMAP_STORE_ARG_FIRST + 100)
- continue;
-
- switch (tag) {
- case CAMEL_IMAP_STORE_NAMESPACE:
- /* get the username */
- *args->argv[i].ca_str = store->namespace;
- break;
- case CAMEL_IMAP_STORE_OVERRIDE_NAMESPACE:
- /* get the auth mechanism */
- *args->argv[i].ca_int = store->parameters & IMAP_PARAM_OVERRIDE_NAMESPACE ? TRUE : FALSE;
- break;
- case CAMEL_IMAP_STORE_CHECK_ALL:
- /* get the hostname */
- *args->argv[i].ca_int = store->parameters & IMAP_PARAM_CHECK_ALL ? TRUE : FALSE;
- break;
- case CAMEL_IMAP_STORE_FILTER_INBOX:
- /* get the port */
- *args->argv[i].ca_int = store->parameters & IMAP_PARAM_FILTER_INBOX ? TRUE : FALSE;
- break;
- default:
- /* error? */
- break;
- }
- }
-
- return CAMEL_OBJECT_CLASS (parent_class)->getv (object, ex, args);
-}
-
-static char *
-imap_get_name (CamelService *service, gboolean brief)
-{
- if (brief)
- return g_strdup_printf (_("IMAP server %s"), service->url->host);
- else
- return g_strdup_printf (_("IMAP service for %s on %s"),
- service->url->user, service->url->host);
-}
-
-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 },
- { "STARTTLS", IMAP_CAPABILITY_STARTTLS },
- { NULL, 0 }
-};
-
-
-static gboolean
-imap_get_capability (CamelService *service, CamelException *ex)
-{
- CamelImapStore *store = CAMEL_IMAP_STORE (service);
- CamelImapResponse *response;
- char *result, *capa, *lasts;
- int i;
-
- CAMEL_SERVICE_ASSERT_LOCKED (store, connect_lock);
-
- /* Find out the IMAP capabilities */
- /* We assume we have utf8 capable search until a failed search tells us otherwise */
- store->capabilities = IMAP_CAPABILITY_utf8_search;
- 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 (strcasecmp (capa, capabilities[i].name) == 0) {
- store->capabilities |= capabilities[i].flag;
- break;
- }
- }
- }
- g_free (result);
-
- imap_set_server_level (store);
-
- if (store->summary->capabilities != store->capabilities) {
- store->summary->capabilities = store->capabilities;
- camel_store_summary_touch((CamelStoreSummary *)store->summary);
- camel_store_summary_save((CamelStoreSummary *)store->summary);
- }
-
- return TRUE;
-}
-
-enum {
- USE_SSL_NEVER,
- USE_SSL_ALWAYS,
- USE_SSL_WHEN_POSSIBLE
-};
-
-#define SSL_PORT_FLAGS (CAMEL_TCP_STREAM_SSL_ENABLE_SSL2 | CAMEL_TCP_STREAM_SSL_ENABLE_SSL3)
-#define STARTTLS_FLAGS (CAMEL_TCP_STREAM_SSL_ENABLE_TLS)
-
-static gboolean
-connect_to_server (CamelService *service, int ssl_mode, int try_starttls, CamelException *ex)
-{
- CamelImapStore *store = (CamelImapStore *) service;
- CamelImapResponse *response;
- CamelStream *tcp_stream;
- struct hostent *h;
- int clean_quit;
- int port, ret;
- char *buf;
-
- h = camel_service_gethost (service, ex);
- if (!h)
- return FALSE;
-
- port = service->url->port ? service->url->port : 143;
-
- if (ssl_mode != USE_SSL_NEVER) {
-#ifdef HAVE_SSL
- if (try_starttls) {
- tcp_stream = camel_tcp_stream_ssl_new_raw (service->session, service->url->host, STARTTLS_FLAGS);
- } else {
- port = service->url->port ? service->url->port : 993;
- tcp_stream = camel_tcp_stream_ssl_new (service->session, service->url->host, SSL_PORT_FLAGS);
- }
-#else
- if (!try_starttls)
- port = service->url->port ? service->url->port : 993;
-
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("Could not connect to %s (port %d): %s"),
- service->url->host, port,
- _("SSL unavailable"));
-
- camel_free_host (h);
-
- return FALSE;
-#endif /* HAVE_SSL */
- } else {
- tcp_stream = camel_tcp_stream_raw_new ();
- }
-
- 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, port, g_strerror (errno));
-
- camel_object_unref (CAMEL_OBJECT (tcp_stream));
-
- return FALSE;
- }
-
- store->ostream = tcp_stream;
- store->istream = camel_stream_buffer_new (tcp_stream, CAMEL_STREAM_BUFFER_READ);
-
- store->connected = TRUE;
- store->preauthed = FALSE;
- store->command = 0;
-
- /* Read the greeting, if any, and deal with PREAUTH */
- if (camel_imap_store_readline (store, &buf, ex) < 0) {
- 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;
- }
-
- store->connected = FALSE;
-
- return FALSE;
- }
- if (!strncmp(buf, "* PREAUTH", 9))
- store->preauthed = TRUE;
- g_free (buf);
-
- /* get the imap server capabilities */
- if (!imap_get_capability (service, ex)) {
- 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;
- }
-
- store->connected = FALSE;
- return FALSE;
- }
-
-#ifdef HAVE_SSL
- if (ssl_mode == USE_SSL_WHEN_POSSIBLE) {
- if (store->capabilities & IMAP_CAPABILITY_STARTTLS)
- goto starttls;
- } else if (ssl_mode == USE_SSL_ALWAYS) {
- if (try_starttls) {
- if (store->capabilities & IMAP_CAPABILITY_STARTTLS) {
- /* attempt to toggle STARTTLS mode */
- goto starttls;
- } else {
- /* server doesn't support STARTTLS, abort */
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to connect to IMAP server %s in secure mode: %s"),
- service->url->host, _("SSL/TLS extension not supported."));
- /* we have the possibility of quitting cleanly here */
- clean_quit = TRUE;
- goto exception;
- }
- }
- }
-#endif /* HAVE_SSL */
-
- return TRUE;
-
-#ifdef HAVE_SSL
- starttls:
-
- /* as soon as we send a STARTTLS command, all hope is lost of a clean QUIT if problems arise */
- clean_quit = FALSE;
-
- response = camel_imap_command (store, NULL, ex, "STARTTLS");
- if (!response) {
- camel_object_unref (CAMEL_OBJECT (store->istream));
- camel_object_unref (CAMEL_OBJECT (store->ostream));
- store->istream = store->ostream = NULL;
- return FALSE;
- }
-
- camel_imap_response_free_without_processing (store, response);
-
- /* Okay, now toggle SSL/TLS mode */
- if (camel_tcp_stream_ssl_enable_ssl (CAMEL_TCP_STREAM_SSL (tcp_stream)) == -1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to connect to IMAP server %s in secure mode: %s"),
- service->url->host, _("SSL negotiations failed"));
- goto exception;
- }
-
- /* rfc2595, section 4 states that after a successful STLS
- command, the client MUST discard prior CAPA responses */
- if (!imap_get_capability (service, ex)) {
- 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;
- }
-
- store->connected = FALSE;
-
- return FALSE;
- }
-
- return TRUE;
-
- exception:
-
- if (clean_quit && store->connected) {
- /* try to disconnect cleanly */
- response = camel_imap_command (store, NULL, ex, "LOGOUT");
- if (response)
- camel_imap_response_free_without_processing (store, response);
- }
-
- 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;
- }
-
- store->connected = FALSE;
-
- return FALSE;
-#endif /* HAVE_SSL */
-}
-
-static gboolean
-connect_to_server_process (CamelService *service, const char *cmd, CamelException *ex)
-{
- CamelImapStore *store = (CamelImapStore *) service;
- CamelStream *cmd_stream;
- int ret, i = 0;
- char *buf;
- char *cmd_copy;
- char *full_cmd;
- char *child_env[7];
-
- /* Put full details in the environment, in case the connection
- program needs them */
- buf = camel_url_to_string(service->url, 0);
- child_env[i++] = g_strdup_printf("URL=%s", buf);
- g_free(buf);
-
- child_env[i++] = g_strdup_printf("URLHOST=%s", service->url->host);
- if (service->url->port)
- child_env[i++] = g_strdup_printf("URLPORT=%d", service->url->port);
- if (service->url->user)
- child_env[i++] = g_strdup_printf("URLUSER=%s", service->url->user);
- if (service->url->passwd)
- child_env[i++] = g_strdup_printf("URLPASSWD=%s", service->url->passwd);
- if (service->url->path)
- child_env[i++] = g_strdup_printf("URLPATH=%s", service->url->path);
- child_env[i] = NULL;
-
- /* Now do %h, %u, etc. substitution in cmd */
- buf = cmd_copy = g_strdup(cmd);
-
- full_cmd = g_strdup("");
-
- for(;;) {
- char *pc;
- char *tmp;
- char *var;
- int len;
-
- pc = strchr(buf, '%');
- ignore:
- if (!pc) {
- tmp = g_strdup_printf("%s%s", full_cmd, buf);
- g_free(full_cmd);
- full_cmd = tmp;
- break;
- }
-
- len = pc - buf;
-
- var = NULL;
-
- switch(pc[1]) {
- case 'h':
- var = service->url->host;
- break;
- case 'u':
- var = service->url->user;
- break;
- }
- if (!var) {
- /* If there wasn't a valid %-code, with an actual
- variable to insert, pretend we didn't see the % */
- pc = strchr(pc + 1, '%');
- goto ignore;
- }
- tmp = g_strdup_printf("%s%.*s%s", full_cmd, len, buf, var);
- g_free(full_cmd);
- full_cmd = tmp;
- buf = pc + 2;
- }
-
- g_free(cmd_copy);
-
- cmd_stream = camel_stream_process_new ();
-
- ret = camel_stream_process_connect (CAMEL_STREAM_PROCESS(cmd_stream),
- full_cmd, (const char **)child_env);
-
- while (i)
- g_free(child_env[--i]);
-
- 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 with command \"%s\": %s"),
- full_cmd, g_strerror (errno));
-
- camel_object_unref (CAMEL_OBJECT (cmd_stream));
- g_free(full_cmd);
- return FALSE;
- }
- g_free(full_cmd);
-
- store->ostream = cmd_stream;
- store->istream = camel_stream_buffer_new (cmd_stream, CAMEL_STREAM_BUFFER_READ);
-
- store->connected = TRUE;
- store->preauthed = FALSE;
- store->command = 0;
-
- /* Read the greeting, if any, and deal with PREAUTH */
- if (camel_imap_store_readline (store, &buf, ex) < 0) {
- 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;
- }
-
- store->connected = FALSE;
- return FALSE;
- }
- if (!strncmp(buf, "* PREAUTH", 9))
- store->preauthed = TRUE;
- g_free (buf);
-
- /* get the imap server capabilities */
- if (!imap_get_capability (service, ex)) {
- 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;
- }
-
- store->connected = FALSE;
- return FALSE;
- }
-
- return TRUE;
-
-}
-
-static struct {
- char *value;
- int mode;
-} ssl_options[] = {
- { "", USE_SSL_ALWAYS },
- { "always", USE_SSL_ALWAYS },
- { "when-possible", USE_SSL_WHEN_POSSIBLE },
- { "never", USE_SSL_NEVER },
- { NULL, USE_SSL_NEVER },
-};
-
-static gboolean
-connect_to_server_wrapper (CamelService *service, CamelException *ex)
-{
- const char *command;
-#ifdef HAVE_SSL
- const char *use_ssl;
- int i, ssl_mode;
-#endif
- command = camel_url_get_param (service->url, "command");
- if (command)
- return connect_to_server_process (service, command, ex);
-
-#ifdef HAVE_SSL
- use_ssl = camel_url_get_param (service->url, "use_ssl");
- if (use_ssl) {
- for (i = 0; ssl_options[i].value; i++)
- if (!strcmp (ssl_options[i].value, use_ssl))
- break;
- ssl_mode = ssl_options[i].mode;
- } else
- ssl_mode = USE_SSL_NEVER;
-
- if (ssl_mode == USE_SSL_ALWAYS) {
- /* First try the ssl port */
- if (!connect_to_server (service, ssl_mode, FALSE, ex)) {
- if (camel_exception_get_id (ex) == CAMEL_EXCEPTION_SERVICE_UNAVAILABLE) {
- /* The ssl port seems to be unavailable, lets try STARTTLS */
- camel_exception_clear (ex);
- return connect_to_server (service, ssl_mode, TRUE, ex);
- } else {
- return FALSE;
- }
- }
-
- return TRUE;
- } else if (ssl_mode == USE_SSL_WHEN_POSSIBLE) {
- /* If the server supports STARTTLS, use it */
- return connect_to_server (service, ssl_mode, TRUE, ex);
- } else {
- /* User doesn't care about SSL */
- return connect_to_server (service, ssl_mode, FALSE, ex);
- }
-#else
- return connect_to_server (service, USE_SSL_NEVER, FALSE, ex);
-#endif
-}
-
-extern CamelServiceAuthType camel_imap_password_authtype;
-
-static GList *
-query_auth_types (CamelService *service, CamelException *ex)
-{
- CamelImapStore *store = CAMEL_IMAP_STORE (service);
- CamelServiceAuthType *authtype;
- GList *sasl_types, *t, *next;
- gboolean connected;
-
- if (!camel_disco_store_check_online (CAMEL_DISCO_STORE (store), ex))
- return NULL;
-
- CAMEL_SERVICE_LOCK (store, connect_lock);
- connected = connect_to_server_wrapper (service, ex);
- CAMEL_SERVICE_UNLOCK (store, connect_lock);
- if (!connected)
- return NULL;
-
- 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);
- }
- }
-
- return g_list_prepend (sasl_types, &camel_imap_password_authtype);
-}
-
-/* folder_name is path name */
-static CamelFolderInfo *
-imap_build_folder_info(CamelImapStore *imap_store, const char *folder_name)
-{
- CamelURL *url;
- const char *name;
- CamelFolderInfo *fi;
-
- fi = g_malloc0(sizeof(*fi));
-
- fi->full_name = g_strdup(folder_name);
- fi->unread_message_count = 0;
-
- url = camel_url_new (imap_store->base_url, NULL);
- g_free (url->path);
- url->path = g_strdup_printf ("/%s", folder_name);
- fi->url = camel_url_to_string (url, CAMEL_URL_HIDE_ALL);
- camel_url_free(url);
- fi->path = g_strdup_printf("/%s", folder_name);
- name = strrchr (fi->path, '/');
- if (name)
- name++;
- else
- name = fi->path;
-
- fi->name = g_strdup (name);
-
- return fi;
-}
-
-static void
-imap_folder_effectively_unsubscribed(CamelImapStore *imap_store,
- const char *folder_name, CamelException *ex)
-{
- CamelFolderInfo *fi;
- CamelStoreInfo *si;
-
- si = camel_store_summary_path((CamelStoreSummary *)imap_store->summary, folder_name);
- if (si) {
- if (si->flags & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED) {
- si->flags &= ~CAMEL_STORE_INFO_FOLDER_SUBSCRIBED;
- camel_store_summary_touch((CamelStoreSummary *)imap_store->summary);
- camel_store_summary_save((CamelStoreSummary *)imap_store->summary);
- }
- camel_store_summary_info_free((CamelStoreSummary *)imap_store->summary, si);
- }
-
- if (imap_store->renaming) {
- /* we don't need to emit a "folder_unsubscribed" signal
- if we are in the process of renaming folders, so we
- are done here... */
- return;
-
- }
-
- fi = imap_build_folder_info(imap_store, folder_name);
- camel_object_trigger_event (CAMEL_OBJECT (imap_store), "folder_unsubscribed", fi);
- camel_folder_info_free (fi);
-}
-
-static void
-imap_forget_folder (CamelImapStore *imap_store, const char *folder_name, CamelException *ex)
-{
- CamelFolderSummary *summary;
- CamelImapMessageCache *cache;
- char *summary_file;
- char *journal_file;
- char *folder_dir, *storage_path;
- CamelFolderInfo *fi;
- const char *name;
-
- name = strrchr (folder_name, imap_store->dir_sep);
- if (name)
- name++;
- else
- name = folder_name;
-
- storage_path = g_strdup_printf ("%s/folders", imap_store->storage_path);
- folder_dir = e_path_to_physical (storage_path, folder_name);
- g_free (storage_path);
- if (access (folder_dir, F_OK) != 0) {
- g_free (folder_dir);
- goto event;
- }
-
- 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);
- goto event;
- }
-
- cache = camel_imap_message_cache_new (folder_dir, summary, ex);
- if (cache)
- camel_imap_message_cache_clear (cache);
-
- camel_object_unref (cache);
- camel_object_unref (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);
-
- event:
-
- camel_store_summary_remove_path((CamelStoreSummary *)imap_store->summary, folder_name);
- camel_store_summary_save((CamelStoreSummary *)imap_store->summary);
-
- fi = imap_build_folder_info(imap_store, folder_name);
- camel_object_trigger_event (CAMEL_OBJECT (imap_store), "folder_deleted", fi);
- camel_folder_info_free (fi);
-}
-
-static gboolean
-imap_check_folder_still_extant (CamelImapStore *imap_store, const char *full_name,
- CamelException *ex)
-{
- CamelImapResponse *response;
-
- response = camel_imap_command (imap_store, NULL, ex, "LIST \"\" %S",
- full_name);
-
- if (response) {
- gboolean stillthere = response->untagged->len != 0;
-
- camel_imap_response_free_without_processing (imap_store, response);
-
- return stillthere;
- }
-
- /* if the command was rejected, there must be some other error,
- assume it worked so we dont blow away the folder unecessarily */
- return TRUE;
-}
-
-/* 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 */
-/* No, its definetly not safe. So its been changed to copy the folders first */
-/* 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 */
-/* also see get_folder_info_online() for the same hack repeated */
-static void
-imap_store_refresh_folders (CamelImapStore *store, CamelException *ex)
-{
- GPtrArray *folders;
- int i;
-
- folders = camel_object_bag_list(CAMEL_STORE (store)->folders);
-
- for (i = 0; i <folders->len; i++) {
- CamelFolder *folder = folders->pdata[i];
-
- CAMEL_IMAP_FOLDER (folder)->need_rescan = TRUE;
- if (!camel_exception_is_set(ex))
- CAMEL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(folder))->refresh_info(folder, ex);
-
- if (camel_exception_is_set (ex) &&
- imap_check_folder_still_extant (store, folder->full_name, ex) == FALSE) {
- gchar *namedup;
-
- /* the folder was deleted (may happen when we come back online
- * after being offline */
-
- namedup = g_strdup (folder->full_name);
- camel_object_unref(folder);
- imap_folder_effectively_unsubscribed (store, namedup, ex);
- imap_forget_folder (store, namedup, ex);
- g_free (namedup);
- } else
- camel_object_unref(folder);
- }
-
- g_ptr_array_free (folders, TRUE);
-}
-
-static gboolean
-try_auth (CamelImapStore *store, const char *mech, CamelException *ex)
-{
- CamelSasl *sasl;
- CamelImapResponse *response;
- char *resp;
- char *sasl_resp;
-
- CAMEL_SERVICE_ASSERT_LOCKED (store, connect_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, imap_next_word (resp), ex);
- g_free (resp);
- if (camel_exception_is_set (ex))
- goto break_and_lose;
-
- response = camel_imap_command_continuation (store, sasl_resp, strlen (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, "*", 1, 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_SERVICE_ASSERT_LOCKED (store, connect_lock);
-
- if (store->preauthed) {
- if (camel_verbose_debug)
- fprintf(stderr, "Server %s has preauthenticated us.\n",
- service->url->host);
- return TRUE;
- }
-
- 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, FALSE, 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_wrapper (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) {
- if (camel_exception_get_id(ex) == CAMEL_EXCEPTION_USER_CANCEL)
- return FALSE;
-
- errbuf = g_strdup_printf (_("Unable to authenticate "
- "to IMAP server.\n%s\n\n"),
- camel_exception_get_description (ex));
- camel_exception_clear (ex);
- }
- }
-
- return TRUE;
-}
-
-static gboolean
-can_work_offline (CamelDiscoStore *disco_store)
-{
- CamelImapStore *store = CAMEL_IMAP_STORE (disco_store);
-
- return camel_store_summary_count((CamelStoreSummary *)store->summary) != 0;
-}
-
-static gboolean
-imap_connect_online (CamelService *service, CamelException *ex)
-{
- CamelImapStore *store = CAMEL_IMAP_STORE (service);
- CamelDiscoStore *disco_store = CAMEL_DISCO_STORE (service);
- CamelImapResponse *response;
- /*struct _namespaces *namespaces;*/
- char *result, *name, *path;
- int i;
- size_t len;
- CamelImapStoreNamespace *ns;
-
- CAMEL_SERVICE_LOCK (store, connect_lock);
- if (!connect_to_server_wrapper (service, ex) ||
- !imap_auth_loop (service, ex)) {
- CAMEL_SERVICE_UNLOCK (store, connect_lock);
- camel_service_disconnect (service, TRUE, NULL);
- return FALSE;
- }
-
- /* 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;
-
-#if 0
- /* new code... */
- namespaces = imap_parse_namespace_response (result);
- imap_namespaces_destroy (namespaces);
- /* end new code */
-#endif
-
- name = camel_strstrcase (result, "NAMESPACE ((");
- if (name) {
- char *sep;
-
- name += 12;
- store->namespace = imap_parse_string ((const char **) &name, &len);
- if (name && *name++ == ' ') {
- sep = imap_parse_string ((const char **) &name, &len);
- if (sep) {
- store->dir_sep = *sep;
- ((CamelStore *)store)->dir_sep = store->dir_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 */
- ((CamelStore *)store)->dir_sep = store->dir_sep;
- }
- }
-
- /* 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;
- }
-
- ns = camel_imap_store_summary_namespace_new(store->summary, store->namespace, store->dir_sep);
- camel_imap_store_summary_namespace_set(store->summary, ns);
-
- if (CAMEL_STORE (store)->flags & CAMEL_STORE_SUBSCRIPTIONS) {
- gboolean haveinbox = FALSE;
- GPtrArray *folders;
- char *pattern;
-
- /* this pre-fills the summary, and checks that lsub is useful */
- folders = g_ptr_array_new ();
- pattern = g_strdup_printf ("%s*", store->namespace);
- get_folders_online (store, pattern, folders, TRUE, ex);
- g_free (pattern);
-
- for (i = 0; i < folders->len; i++) {
- CamelFolderInfo *fi = folders->pdata[i];
-
- haveinbox = haveinbox || !strcasecmp (fi->full_name, "INBOX");
-
- if (fi->flags & (CAMEL_IMAP_FOLDER_MARKED | CAMEL_IMAP_FOLDER_UNMARKED))
- store->capabilities |= IMAP_CAPABILITY_useful_lsub;
- camel_folder_info_free (fi);
- }
-
- /* if the namespace is under INBOX, check INBOX explicitly */
- if (!strncasecmp (store->namespace, "INBOX", 5) && !camel_exception_is_set (ex)) {
- gboolean just_subscribed = FALSE;
- gboolean need_subscribe = FALSE;
-
- recheck:
- g_ptr_array_set_size (folders, 0);
- get_folders_online (store, "INBOX", folders, TRUE, ex);
-
- for (i = 0; i < folders->len; i++) {
- CamelFolderInfo *fi = folders->pdata[i];
-
- /* this should always be TRUE if folders->len > 0 */
- if (!strcasecmp (fi->full_name, "INBOX")) {
- haveinbox = TRUE;
-
- /* if INBOX is marked as \NoSelect then it is probably
- because it has not been subscribed to */
- if (!need_subscribe)
- need_subscribe = fi->flags & CAMEL_FOLDER_NOSELECT;
- }
-
- camel_folder_info_free (fi);
- }
-
- need_subscribe = !haveinbox || need_subscribe;
- if (need_subscribe && !just_subscribed && !camel_exception_is_set (ex)) {
- /* in order to avoid user complaints, force a subscription to INBOX */
- response = camel_imap_command (store, NULL, ex, "SUBSCRIBE INBOX");
- if (response != NULL) {
- /* force a re-check which will pre-fill the summary and
- also get any folder flags present on the INBOX */
- camel_imap_response_free (store, response);
- just_subscribed = TRUE;
- goto recheck;
- }
- }
- }
-
- g_ptr_array_free (folders, TRUE);
- }
-
- path = g_strdup_printf ("%s/journal", store->storage_path);
- disco_store->diary = camel_disco_diary_new (disco_store, path, ex);
- g_free (path);
-
- done:
- /* save any changes we had */
- camel_store_summary_save((CamelStoreSummary *)store->summary);
-
- CAMEL_SERVICE_UNLOCK (store, connect_lock);
-
- if (camel_exception_is_set (ex))
- camel_service_disconnect (service, TRUE, NULL);
- else if (camel_disco_diary_empty (disco_store->diary))
- imap_store_refresh_folders (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 *path;
-
- 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;
-
- imap_store_refresh_folders (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->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, NULL, "LOGOUT");
- camel_imap_response_free (store, response);
- }
-
- 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;
- }
-
- imap_disconnect_offline (service, clean, ex);
-
- return TRUE;
-}
-
-
-static gboolean
-imap_summary_is_dirty (CamelFolderSummary *summary)
-{
- CamelMessageInfo *info;
- int max, i;
-
- max = camel_folder_summary_count (summary);
- for (i = 0; i < max; i++) {
- info = camel_folder_summary_index (summary, i);
- if (info && (info->flags & CAMEL_MESSAGE_FOLDER_FLAGGED))
- return TRUE;
- }
-
- return FALSE;
-}
-
-static void
-imap_noop (CamelStore *store, CamelException *ex)
-{
- CamelImapStore *imap_store = (CamelImapStore *) store;
- CamelDiscoStore *disco = (CamelDiscoStore *) store;
- CamelImapResponse *response;
- CamelFolder *current_folder;
-
- if (camel_disco_store_status (disco) != CAMEL_DISCO_STORE_ONLINE)
- return;
-
- CAMEL_SERVICE_LOCK (imap_store, connect_lock);
-
- current_folder = imap_store->current_folder;
- if (current_folder && imap_summary_is_dirty (current_folder->summary)) {
- /* let's sync the flags instead. NB: must avoid folder lock */
- ((CamelFolderClass *)((CamelObject *)current_folder)->klass)->sync(current_folder, FALSE, ex);
- } else {
- response = camel_imap_command (imap_store, NULL, ex, "NOOP");
- if (response)
- camel_imap_response_free (imap_store, response);
- }
-
- CAMEL_SERVICE_UNLOCK (imap_store, connect_lock);
-}
-
-static guint
-hash_folder_name (gconstpointer key)
-{
- if (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 (strcasecmp (a, "INBOX") == 0)
- aname = "INBOX";
- if (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) {
- CamelException ex;
-
- camel_exception_init (&ex);
- if (imap_check_folder_still_extant (imap_store, folder_name, &ex) == FALSE) {
- imap_folder_effectively_unsubscribed (imap_store, folder_name, &ex);
- imap_forget_folder (imap_store, folder_name, &ex);
- }
- camel_exception_clear (&ex);
- return -1;
- }
-
- status = camel_imap_response_extract (imap_store, response,
- "STATUS", NULL);
- if (!status)
- return -1;
-
- p = camel_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, *storage_path;
-
- if (!camel_imap_store_connected (imap_store, ex))
- return NULL;
-
- if (!strcasecmp (folder_name, "INBOX"))
- folder_name = "INBOX";
-
- /* Lock around the whole lot to check/create atomically */
- CAMEL_SERVICE_LOCK (imap_store, connect_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) {
- char *folder_real;
-
- if (!flags & CAMEL_STORE_FOLDER_CREATE) {
- CAMEL_SERVICE_UNLOCK (imap_store, connect_lock);
- return no_such_folder (folder_name, ex);
- }
-
- folder_real = camel_imap_store_summary_path_to_full(imap_store->summary, folder_name, store->dir_sep);
-
- response = camel_imap_command (imap_store, NULL, ex, "CREATE %S", folder_real);
-
- if (response) {
- camel_imap_store_summary_add_from_full(imap_store->summary, folder_real, store->dir_sep);
-
- camel_imap_response_free (imap_store, response);
-
- response = camel_imap_command (imap_store, NULL, NULL, "SELECT %F", folder_name);
- }
- g_free(folder_real);
- if (!response) {
- CAMEL_SERVICE_UNLOCK (imap_store, connect_lock);
- return NULL;
- }
- }
-
- storage_path = g_strdup_printf("%s/folders", imap_store->storage_path);
- folder_dir = e_path_to_physical (storage_path, folder_name);
- g_free(storage_path);
- new_folder = camel_imap_folder_new (store, folder_name, folder_dir, ex);
- g_free (folder_dir);
- if (new_folder) {
- CamelException local_ex;
-
- imap_store->current_folder = new_folder;
- camel_object_ref (CAMEL_OBJECT (new_folder));
- camel_exception_init (&local_ex);
- camel_imap_folder_selected (new_folder, response, &local_ex);
-
- if (camel_exception_is_set (&local_ex)) {
- camel_exception_xfer (ex, &local_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_SERVICE_UNLOCK (imap_store, connect_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, *storage_path;
-
- if (!imap_store->connected &&
- !camel_service_connect (CAMEL_SERVICE (store), ex))
- return NULL;
-
- if (!strcasecmp (folder_name, "INBOX"))
- folder_name = "INBOX";
-
- storage_path = g_strdup_printf("%s/folders", imap_store->storage_path);
- folder_dir = e_path_to_physical (storage_path, folder_name);
- g_free(storage_path);
- if (!folder_dir || access (folder_dir, F_OK) != 0) {
- g_free (folder_dir);
- camel_exception_setv (ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- _("No such folder %s"), folder_name);
- return NULL;
- }
-
- 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);
-
- CAMEL_SERVICE_LOCK (imap_store, connect_lock);
-
- 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;
-
- CAMEL_SERVICE_UNLOCK (imap_store, connect_lock);
- } else
- return;
-
- response = camel_imap_command (imap_store, NULL, ex, "DELETE %F",
- folder_name);
-
- if (response) {
- camel_imap_response_free (imap_store, response);
- imap_forget_folder (imap_store, folder_name, ex);
- }
-}
-
-static void
-manage_subscriptions (CamelStore *store, const char *old_name, gboolean subscribe)
-{
- CamelImapStore *imap_store = CAMEL_IMAP_STORE (store);
- CamelStoreInfo *si;
- int olen = strlen(old_name);
- const char *path;
- int i, count;
-
- count = camel_store_summary_count((CamelStoreSummary *)imap_store->summary);
- for (i=0;i<count;i++) {
- si = camel_store_summary_index((CamelStoreSummary *)imap_store->summary, i);
- if (si) {
- path = camel_store_info_path(imap_store->summary, si);
- if (strncmp(path, old_name, olen) == 0) {
- if (subscribe)
- subscribe_folder(store, path, NULL);
- else
- unsubscribe_folder(store, path, NULL);
- }
- camel_store_summary_info_free((CamelStoreSummary *)imap_store->summary, si);
- }
- }
-}
-
-static void
-rename_folder_info (CamelImapStore *imap_store, const char *old_name, const char *new_name)
-{
- int i, count;
- CamelStoreInfo *si;
- int olen = strlen(old_name);
- const char *path;
- char *npath, *nfull;
-
- count = camel_store_summary_count((CamelStoreSummary *)imap_store->summary);
- for (i=0;i<count;i++) {
- si = camel_store_summary_index((CamelStoreSummary *)imap_store->summary, i);
- if (si == NULL)
- continue;
- path = camel_store_info_path(imap_store->summary, si);
- if (strncmp(path, old_name, olen) == 0) {
- if (strlen(path) > olen)
- npath = g_strdup_printf("%s/%s", new_name, path+olen+1);
- else
- npath = g_strdup(new_name);
- nfull = camel_imap_store_summary_path_to_full(imap_store->summary, npath, imap_store->dir_sep);
-
- /* workaround for broken server (courier uses '.') that doesn't rename
- subordinate folders as required by rfc 2060 */
- if (imap_store->dir_sep == '.') {
- CamelImapResponse *response;
-
- response = camel_imap_command (imap_store, NULL, NULL, "RENAME %F %S", path, nfull);
- if (response)
- camel_imap_response_free (imap_store, response);
- }
-
- camel_store_info_set_string((CamelStoreSummary *)imap_store->summary, si, CAMEL_STORE_INFO_PATH, npath);
- camel_store_info_set_string((CamelStoreSummary *)imap_store->summary, si, CAMEL_IMAP_STORE_INFO_FULL_NAME, nfull);
-
- camel_store_summary_touch((CamelStoreSummary *)imap_store->summary);
- g_free(nfull);
- g_free(npath);
- }
- camel_store_summary_info_free((CamelStoreSummary *)imap_store->summary, si);
- }
-}
-
-static void
-rename_folder (CamelStore *store, const char *old_name, const char *new_name_in, CamelException *ex)
-{
- CamelImapStore *imap_store = CAMEL_IMAP_STORE (store);
- CamelImapResponse *response;
- char *oldpath, *newpath, *storage_path, *new_name;
-
- if (!camel_disco_store_check_online (CAMEL_DISCO_STORE (store), ex))
- return;
-
- /* make sure this folder isn't currently SELECTed - it's
- actually possible to rename INBOX but if you do another
- INBOX will immediately be created by the server */
- response = camel_imap_command (imap_store, NULL, ex, "SELECT INBOX");
- if (response) {
- camel_imap_response_free_without_processing (imap_store, response);
-
- CAMEL_SERVICE_LOCK (imap_store, connect_lock);
-
- 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;
-
- CAMEL_SERVICE_UNLOCK (imap_store, connect_lock);
- } else
- return;
-
- imap_store->renaming = TRUE;
-
- if (store->flags & CAMEL_STORE_SUBSCRIPTIONS)
- manage_subscriptions(store, old_name, FALSE);
-
- new_name = camel_imap_store_summary_path_to_full(imap_store->summary, new_name_in, store->dir_sep);
- response = camel_imap_command (imap_store, NULL, ex, "RENAME %F %S", old_name, new_name);
-
- if (!response) {
- if (store->flags & CAMEL_STORE_SUBSCRIPTIONS)
- manage_subscriptions(store, old_name, TRUE);
- g_free(new_name);
- imap_store->renaming = FALSE;
- return;
- }
-
- camel_imap_response_free (imap_store, response);
-
- /* rename summary, and handle broken server */
- rename_folder_info(imap_store, old_name, new_name_in);
-
- if (store->flags & CAMEL_STORE_SUBSCRIPTIONS)
- manage_subscriptions(store, new_name_in, TRUE);
-
- storage_path = g_strdup_printf("%s/folders", imap_store->storage_path);
- oldpath = e_path_to_physical (storage_path, old_name);
- newpath = e_path_to_physical (storage_path, new_name_in);
- g_free(storage_path);
-
- /* So do we care if this didn't work? Its just a cache? */
- if (rename (oldpath, newpath) == -1) {
- g_warning ("Could not rename message cache '%s' to '%s': %s: cache reset",
- oldpath, newpath, strerror (errno));
- }
-
- g_free (oldpath);
- g_free (newpath);
- g_free(new_name);
-
- imap_store->renaming = FALSE;
-}
-
-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, *parent_real, *real_name;
- CamelImapResponse *response;
- CamelException internal_ex;
- CamelFolderInfo *root = NULL;
- gboolean need_convert;
- int i = 0, flags;
-
- if (!camel_disco_store_check_online (CAMEL_DISCO_STORE (store), ex))
- return NULL;
- if (!parent_name)
- parent_name = "";
-
- if (strchr (folder_name, imap_store->dir_sep)) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_INVALID_PATH,
- _("The folder name \"%s\" is invalid because "
- "it containes the character \"%c\""),
- folder_name, imap_store->dir_sep);
- return NULL;
- }
-
- /* check if the parent allows inferiors */
-
- /* FIXME: use storesummary directly */
- parent_real = camel_imap_store_summary_full_from_path(imap_store->summary, parent_name);
- if (parent_real == NULL) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID_STATE,
- _("Unknown parent folder: %s"), parent_name);
- return NULL;
- }
-
- need_convert = FALSE;
- response = camel_imap_command (imap_store, NULL, ex, "LIST \"\" %S",
- parent_real);
- if (!response) /* whoa, this is bad */ {
- g_free(parent_real);
- 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 & CAMEL_FOLDER_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"));
- g_free(parent_real);
- 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_real, imap_store->dir_sep);
- response = camel_imap_command (imap_store, NULL, ex, "CREATE %S",
- name);
- g_free (name);
-
- if (!response) {
- g_free(parent_real);
- return NULL;
- } else
- camel_imap_response_free (imap_store, response);
-
- root = imap_build_folder_info(imap_store, parent_name);
- }
-
- /* ok now we can create the folder */
- real_name = camel_imap_store_summary_path_to_full(imap_store->summary, folder_name, store->dir_sep);
- full_name = imap_concat (imap_store, parent_real, real_name);
- g_free(real_name);
- response = camel_imap_command (imap_store, NULL, ex, "CREATE %S", full_name);
-
- if (response) {
- CamelImapStoreInfo *si;
- CamelFolderInfo *fi;
-
- camel_imap_response_free (imap_store, response);
-
- si = camel_imap_store_summary_add_from_full(imap_store->summary, full_name, store->dir_sep);
- camel_store_summary_save((CamelStoreSummary *)imap_store->summary);
- fi = imap_build_folder_info(imap_store, camel_store_info_path(imap_store->summary, si));
- if (root) {
- root->child = fi;
- fi->parent = root;
- } else {
- root = fi;
- }
- camel_object_trigger_event (CAMEL_OBJECT (store), "folder_created", root);
- } else if (root) {
- /* need to re-recreate the folder we just deleted */
- camel_object_trigger_event (CAMEL_OBJECT (store), "folder_created", root);
- camel_folder_info_free(root);
- root = NULL;
- }
-
- g_free (full_name);
- g_free(parent_real);
-
- return root;
-}
-
-static CamelFolderInfo *
-parse_list_response_as_folder_info (CamelImapStore *imap_store,
- const char *response)
-{
- CamelFolderInfo *fi;
- int flags;
- char sep, *dir;
- CamelURL *url;
- CamelImapStoreInfo *si;
- guint32 newflags;
-
- if (!imap_parse_list_response (imap_store, response, &flags, &sep, &dir))
- return NULL;
-
- /* FIXME: should use imap_build_folder_info, note the differences with param setting tho */
-
- si = camel_imap_store_summary_add_from_full(imap_store->summary, dir, sep?sep:'/');
- newflags = (si->info.flags & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED) | (flags & ~CAMEL_STORE_INFO_FOLDER_SUBSCRIBED);
- if (si->info.flags != newflags) {
- si->info.flags = newflags;
- camel_store_summary_touch((CamelStoreSummary *)imap_store->summary);
- }
-
- fi = g_new0 (CamelFolderInfo, 1);
- fi->flags = flags;
- fi->name = g_strdup(camel_store_info_name(imap_store->summary, si));
- fi->path = g_strdup_printf("/%s", camel_store_info_path(imap_store->summary, si));
- fi->full_name = g_strdup(fi->path+1);
-
- url = camel_url_new (imap_store->base_url, NULL);
- camel_url_set_path(url, fi->path);
-
- if (flags & CAMEL_FOLDER_NOSELECT || fi->name[0] == 0)
- camel_url_set_param (url, "noselect", "yes");
- fi->url = camel_url_to_string (url, 0);
- camel_url_free (url);
-
- /* FIXME: redundant */
- if (flags & CAMEL_IMAP_FOLDER_UNMARKED)
- fi->unread_message_count = -1;
-
- return fi;
-}
-
-/* this is used when lsub doesn't provide very useful information */
-static GPtrArray *
-get_subscribed_folders (CamelImapStore *imap_store, const char *top, CamelException *ex)
-{
- GPtrArray *names, *folders;
- int i, toplen = strlen (top);
- CamelStoreInfo *si;
- CamelImapResponse *response;
- CamelFolderInfo *fi;
- char *result;
- int haveinbox = FALSE;
-
- folders = g_ptr_array_new ();
- names = g_ptr_array_new ();
- for (i=0;(si = camel_store_summary_index((CamelStoreSummary *)imap_store->summary, i));i++) {
- if (si->flags & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED) {
- g_ptr_array_add(names, (char *)camel_imap_store_info_full_name(imap_store->summary, si));
- haveinbox = haveinbox || strcasecmp(camel_imap_store_info_full_name(imap_store->summary, si), "INBOX") == 0;
- }
- camel_store_summary_info_free((CamelStoreSummary *)imap_store->summary, si);
- }
-
- if (!haveinbox)
- g_ptr_array_add (names, "INBOX");
-
- for (i = 0; i < names->len; i++) {
- response = camel_imap_command (imap_store, NULL, ex,
- "LIST \"\" %S",
- names->pdata[i]);
- if (!response)
- break;
-
- result = camel_imap_response_extract (imap_store, response, "LIST", NULL);
- if (!result) {
- camel_store_summary_remove_path((CamelStoreSummary *)imap_store->summary, names->pdata[i]);
- g_ptr_array_remove_index_fast (names, i);
- 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);
-
- return folders;
-}
-
-static int imap_match_pattern(char dir_sep, const char *pattern, const char *name)
-{
- char p, n;
-
- p = *pattern++;
- n = *name++;
- while (n && p) {
- if (n == p) {
- p = *pattern++;
- n = *name++;
- } else if (p == '%') {
- if (n != dir_sep) {
- n = *name++;
- } else {
- p = *pattern++;
- }
- } else if (p == '*') {
- return TRUE;
- } else
- return FALSE;
- }
-
- return n == 0 && (p == '%' || p == 0);
-}
-
-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, count;
- GHashTable *present;
- CamelStoreInfo *si;
-
- response = camel_imap_command (imap_store, NULL, ex,
- "%s \"\" %S", lsub ? "LSUB" : "LIST",
- pattern);
- if (!response)
- return;
-
- present = g_hash_table_new(g_str_hash, g_str_equal);
- 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);
- g_hash_table_insert(present, fi->full_name, fi);
- }
- }
- camel_imap_response_free (imap_store, response);
-
- /* update our summary to match the server */
- count = camel_store_summary_count((CamelStoreSummary *)imap_store->summary);
- for (i=0;i<count;i++) {
- si = camel_store_summary_index((CamelStoreSummary *)imap_store->summary, i);
- if (si == NULL)
- continue;
-
- if (imap_match_pattern(((CamelStore *)imap_store)->dir_sep, pattern, camel_imap_store_info_full_name(imap_store->summary, si))) {
- if (g_hash_table_lookup(present, camel_store_info_path(imap_store->summary, si)) != NULL) {
- if (lsub && (si->flags & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED) == 0) {
- si->flags |= CAMEL_STORE_INFO_FOLDER_SUBSCRIBED;
- camel_store_summary_touch((CamelStoreSummary *)imap_store->summary);
- }
- } else {
- if (lsub) {
- if (si->flags & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED) {
- si->flags &= ~CAMEL_STORE_INFO_FOLDER_SUBSCRIBED;
- camel_store_summary_touch((CamelStoreSummary *)imap_store->summary);
- }
- } else {
- camel_store_summary_remove((CamelStoreSummary *)imap_store->summary, si);
- count--;
- i--;
- }
- }
- }
- camel_store_summary_info_free((CamelStoreSummary *)imap_store->summary, si);
- }
- g_hash_table_destroy(present);
-}
-
-#if 0
-static void
-dumpfi(CamelFolderInfo *fi)
-{
- int depth;
- CamelFolderInfo *n = fi;
-
- if (fi == NULL)
- return;
-
- depth = 0;
- while (n->parent) {
- depth++;
- n = n->parent;
- }
-
- while (fi) {
- printf("%-40s %-30s %*s\n", fi->path, fi->full_name, depth*2+strlen(fi->url), fi->url);
- if (fi->child)
- dumpfi(fi->child);
- fi = fi->sibling;
- }
-}
-#endif
-
-static void
-get_folder_counts(CamelImapStore *imap_store, CamelFolderInfo *fi, CamelException *ex)
-{
- GSList *q;
- CamelFolder *folder;
-
- /* non-recursive breath first search */
-
- q = g_slist_append(NULL, fi);
-
- while (q) {
- fi = q->data;
- q = g_slist_remove_link(q, q);
-
- while (fi) {
- /* ignore noselect folders, and check only inbox if we only check inbox */
- if ((fi->flags & CAMEL_FOLDER_NOSELECT) == 0
- && ( (imap_store->parameters & IMAP_PARAM_CHECK_ALL)
- || strcasecmp(fi->full_name, "inbox") == 0) ) {
-
- CAMEL_SERVICE_LOCK (imap_store, connect_lock);
- /* 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) == 0) {
- /* we bypass the folder locking otherwise we can deadlock. we use the command lock for
- any operations anyway so this is 'safe'. See comment above imap_store_refresh_folders() for info */
- CAMEL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(imap_store->current_folder))->refresh_info(imap_store->current_folder, ex);
- 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");
- /* if we have this folder open, and the unread count has changed, update */
- folder = camel_object_bag_get(CAMEL_STORE(imap_store)->folders, fi->full_name);
- if (folder && fi->unread_message_count != camel_folder_get_unread_message_count(folder)) {
- CAMEL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(folder))->refresh_info(folder, ex);
- fi->unread_message_count = camel_folder_get_unread_message_count(folder);
- }
- if (folder)
- camel_object_unref(folder);
-
- }
-
- CAMEL_SERVICE_UNLOCK (imap_store, connect_lock);
- } else {
- /* since its cheap, get it if they're open */
- folder = camel_object_bag_get(CAMEL_STORE(imap_store)->folders, fi->full_name);
- if (folder) {
- fi->unread_message_count = camel_folder_get_unread_message_count(folder);
- camel_object_unref(folder);
- } else
- fi->unread_message_count = -1;
- }
-
- if (fi->child)
- q = g_slist_append(q, fi->child);
- fi = fi->sibling;
- }
- }
-}
-
-/* imap needs to treat inbox case insensitive */
-/* we'll assume the names are normalised already */
-static guint folder_hash(const void *ap)
-{
- const char *a = ap;
-
- if (strcasecmp(a, "INBOX") == 0)
- a = "INBOX";
-
- return g_str_hash(a);
-}
-
-static int folder_eq(const void *ap, const void *bp)
-{
- const char *a = ap;
- const char *b = bp;
-
- if (strcasecmp(a, "INBOX") == 0)
- a = "INBOX";
- if (strcasecmp(b, "INBOX") == 0)
- b = "INBOX";
-
- return g_str_equal(a, b);
-}
-
-static GPtrArray *
-get_folders(CamelStore *store, const char *top, guint32 flags, CamelException *ex)
-{
- CamelImapStore *imap_store = CAMEL_IMAP_STORE (store);
- GSList *p = NULL;
- GHashTable *infos;
- int i;
- GPtrArray *folders, *folders_out;
- CamelFolderInfo *fi;
- char *name;
- int depth = 0;
- int haveinbox = 0;
- static int imap_max_depth = 0;
-
- if (!camel_imap_store_connected (imap_store, ex))
- return NULL;
-
- /* allow megalomaniacs to override the max of 10 */
- if (imap_max_depth == 0) {
- name = getenv("CAMEL_IMAP_MAX_DEPTH");
- if (name) {
- imap_max_depth = atoi (name);
- imap_max_depth = MIN (MAX (imap_max_depth, 0), 2);
- } else
- imap_max_depth = 10;
- }
-
- infos = g_hash_table_new(folder_hash, folder_eq);
-
- /* get starting point & strip trailing '/' */
- if (top[0] == 0) {
- if (imap_store->namespace) {
- top = imap_store->namespace;
- i = strlen(top)-1;
- name = g_malloc(i+2);
- strcpy(name, top);
- while (i>0 && name[i] == store->dir_sep)
- name[i--] = 0;
- } else
- name = g_strdup("");
- } else {
- name = camel_imap_store_summary_full_from_path(imap_store->summary, top);
- if (name == NULL)
- name = camel_imap_store_summary_path_to_full(imap_store->summary, top, store->dir_sep);
- }
-
- d(printf("\n\nList '%s' %s\n", name, flags&CAMEL_STORE_FOLDER_INFO_RECURSIVE?"RECURSIVE":"NON-RECURSIVE"));
-
- folders_out = g_ptr_array_new();
- folders = g_ptr_array_new();
-
- /* first get working list of names */
- get_folders_online (imap_store, name[0]?name:"%", folders, flags & CAMEL_STORE_FOLDER_INFO_SUBSCRIBED, ex);
- if (camel_exception_is_set(ex))
- goto fail;
- for (i=0; i<folders->len && !haveinbox; i++) {
- fi = folders->pdata[i];
- haveinbox = (strcasecmp(fi->full_name, "INBOX")) == 0;
- }
-
- if (!haveinbox && top == imap_store->namespace) {
- get_folders_online (imap_store, "INBOX", folders,
- flags & CAMEL_STORE_FOLDER_INFO_SUBSCRIBED, ex);
-
- if (camel_exception_is_set (ex))
- goto fail;
- }
-
- for (i=0; i<folders->len; i++)
- p = g_slist_prepend(p, folders->pdata[i]);
-
- g_ptr_array_set_size(folders, 0);
-
- /* p is a reversed list of pending folders for the next level, q is the list of folders for this */
- while (p) {
- GSList *q = g_slist_reverse(p);
-
- p = NULL;
- while (q) {
- fi = q->data;
-
- q = g_slist_remove_link(q, q);
- g_ptr_array_add(folders_out, fi);
-
- d(printf("Checking folder '%s'\n", fi->full_name));
-
- /* First if we're not recursive mode on the top level, and we know it has or doesn't
- or can't have children, no need to go further - a bit ugly */
- if ( top == imap_store->namespace
- && (flags & CAMEL_STORE_FOLDER_INFO_RECURSIVE) == 0
- && (fi->flags & (CAMEL_FOLDER_CHILDREN|CAMEL_IMAP_FOLDER_NOCHILDREN|CAMEL_FOLDER_NOINFERIORS)) != 0) {
- /* do nothing */
- }
- /* Otherwise, if this has (or might have) children, scan it */
- else if ( (fi->flags & (CAMEL_IMAP_FOLDER_NOCHILDREN|CAMEL_FOLDER_NOINFERIORS)) == 0
- || (fi->flags & CAMEL_FOLDER_CHILDREN) != 0) {
- char *n, *real;
-
- real = camel_imap_store_summary_full_from_path(imap_store->summary, fi->full_name);
- n = imap_concat(imap_store, real?real:fi->full_name, "%");
- get_folders_online(imap_store, n, folders, flags & CAMEL_STORE_FOLDER_INFO_SUBSCRIBED, ex);
- g_free(n);
- g_free(real);
-
- if (folders->len > 0)
- fi->flags |= CAMEL_FOLDER_CHILDREN;
-
- for (i=0;i<folders->len;i++) {
- fi = folders->pdata[i];
- if (g_hash_table_lookup(infos, fi->full_name) == NULL) {
- g_hash_table_insert(infos, fi->full_name, fi);
- if ((flags & CAMEL_STORE_FOLDER_INFO_RECURSIVE) && depth<imap_max_depth)
- p = g_slist_prepend(p, fi);
- else
- g_ptr_array_add(folders_out, fi);
- } else {
- camel_folder_info_free(fi);
- }
- }
- g_ptr_array_set_size(folders, 0);
- }
- }
- depth++;
- }
-
- g_ptr_array_free(folders, TRUE);
- g_hash_table_destroy(infos);
- g_free(name);
-
- return folders_out;
-fail:
- g_ptr_array_free(folders, TRUE);
- g_ptr_array_free(folders_out, TRUE);
- g_hash_table_destroy(infos);
- g_free(name);
-
- return NULL;
-}
-
-static CamelFolderInfo *
-get_folder_info_online (CamelStore *store, const char *top, guint32 flags, CamelException *ex)
-{
- CamelImapStore *imap_store = CAMEL_IMAP_STORE (store);
- CamelFolderInfo *tree;
- GPtrArray *folders;
-
- if (top == NULL)
- top = "";
-
- if ((flags & CAMEL_STORE_FOLDER_INFO_SUBSCRIBED)
- && !(imap_store->capabilities & IMAP_CAPABILITY_useful_lsub)
- && (imap_store->parameters & IMAP_PARAM_CHECK_ALL))
- folders = get_subscribed_folders(imap_store, top, ex);
- else
- folders = get_folders(store, top, flags, ex);
-
- if (folders == NULL)
- return NULL;
-
- tree = camel_folder_info_build(folders, top, '/', TRUE);
- g_ptr_array_free(folders, TRUE);
-
- if (!(flags & CAMEL_STORE_FOLDER_INFO_FAST))
- get_folder_counts(imap_store, tree, ex);
-
- d(dumpfi(tree));
- camel_store_summary_save((CamelStoreSummary *)imap_store->summary);
-
- 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;
- CamelStoreInfo *si;
-
- if (*path != '/')
- return TRUE;
-
- /* folder_info_build will insert parent nodes as necessary and mark
- * them as noselect, which is information we actually don't have at
- * the moment. So let it do the right thing by bailing out if it's
- * not a folder we're explicitly interested in.
- */
-
- si = camel_store_summary_path((CamelStoreSummary *)imap_store->summary, path+1);
- if (si) {
- if ((((CamelStore *)imap_store)->flags & CAMEL_STORE_SUBSCRIPTIONS) == 0
- || (si->flags & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED)) {
- fi = imap_build_folder_info(imap_store, path+1);
- fi->flags = si->flags;
- if (si->flags & CAMEL_FOLDER_NOSELECT) {
- CamelURL *url = camel_url_new(fi->url, NULL);
-
- camel_url_set_param (url, "noselect", "yes");
- g_free(fi->url);
- fi->url = camel_url_to_string (url, 0);
- camel_url_free (url);
- }
- g_ptr_array_add (folders, fi);
- }
- camel_store_summary_info_free((CamelStoreSummary *)imap_store->summary, si);
- }
-
- 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;
- char *storage_path;
-
- 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);
- storage_path = g_strdup_printf("%s/folders", imap_store->storage_path);
- if (!e_path_find_folders (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, "", '/', TRUE);
- }
- g_free(storage_path);
-
- 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);
- CamelStoreInfo *si;
- int truth = FALSE;
-
- si = camel_store_summary_path((CamelStoreSummary *)imap_store->summary, folder_name);
- if (si) {
- truth = (si->flags & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED) != 0;
- camel_store_summary_info_free((CamelStoreSummary *)imap_store->summary, si);
- }
-
- return truth;
-}
-
-/* Note: folder_name must match a folder as listed with get_folder_info() -> full_name */
-static void
-subscribe_folder (CamelStore *store, const char *folder_name,
- CamelException *ex)
-{
- CamelImapStore *imap_store = CAMEL_IMAP_STORE (store);
- CamelImapResponse *response;
- CamelFolderInfo *fi;
- CamelStoreInfo *si;
-
- if (!camel_disco_store_check_online (CAMEL_DISCO_STORE (store), ex))
- return;
- if (!camel_imap_store_connected (imap_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);
-
- si = camel_store_summary_path((CamelStoreSummary *)imap_store->summary, folder_name);
- if (si) {
- if ((si->flags & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED) == 0) {
- si->flags |= CAMEL_STORE_INFO_FOLDER_SUBSCRIBED;
- camel_store_summary_touch((CamelStoreSummary *)imap_store->summary);
- camel_store_summary_save((CamelStoreSummary *)imap_store->summary);
- }
- camel_store_summary_info_free((CamelStoreSummary *)imap_store->summary, si);
- }
-
- if (imap_store->renaming) {
- /* we don't need to emit a "folder_subscribed" signal
- if we are in the process of renaming folders, so we
- are done here... */
- return;
- }
-
- fi = imap_build_folder_info(imap_store, folder_name);
- camel_object_trigger_event (CAMEL_OBJECT (store), "folder_subscribed", 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;
-
- if (!camel_disco_store_check_online (CAMEL_DISCO_STORE (store), ex))
- return;
- if (!camel_imap_store_connected (imap_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);
-
- imap_folder_effectively_unsubscribed (imap_store, folder_name, ex);
-}
-
-#if 0
-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;
-}
-#endif
-
-
-gboolean
-camel_imap_store_connected (CamelImapStore *store, CamelException *ex)
-{
- if (store->istream == NULL || !store->connected)
- return camel_service_connect (CAMEL_SERVICE (store), ex);
- return TRUE;
-}
-
-
-/* FIXME: please god, when will the hurting stop? Thus function is so
- fucking broken it's not even funny. */
-ssize_t
-camel_imap_store_readline (CamelImapStore *store, char **dest, CamelException *ex)
-{
- CamelStreamBuffer *stream;
- char linebuf[1024];
- GByteArray *ba;
- ssize_t nread;
-
- g_return_val_if_fail (CAMEL_IS_IMAP_STORE (store), -1);
- g_return_val_if_fail (dest, -1);
-
- *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_imap_store_connected (store, ex)) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_NOT_CONNECTED,
- g_strerror (errno));
- return -1;
- }
-
- stream = CAMEL_STREAM_BUFFER (store->istream);
-
- ba = g_byte_array_new ();
- while ((nread = camel_stream_buffer_gets (stream, linebuf, sizeof (linebuf))) > 0) {
- g_byte_array_append (ba, linebuf, nread);
- if (linebuf[nread - 1] == '\n')
- break;
- }
-
- if (nread <= 0) {
- if (errno == EINTR)
- camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL, _("Operation cancelled"));
- else
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("Server unexpectedly disconnected: %s"),
- g_strerror (errno));
-
- camel_service_disconnect (CAMEL_SERVICE (store), FALSE, NULL);
- g_byte_array_free (ba, TRUE);
- return -1;
- }
-
- if (camel_verbose_debug) {
- fprintf (stderr, "received: ");
- fwrite (ba->data, 1, ba->len, stderr);
- }
-
- /* camel-imap-command.c:imap_read_untagged expects the CRLFs
- to be stripped off and be nul-terminated *sigh* */
- nread = ba->len - 1;
- ba->data[nread] = '\0';
- if (ba->data[nread - 1] == '\r') {
- ba->data[nread - 1] = '\0';
- nread--;
- }
-
- *dest = ba->data;
- g_byte_array_free (ba, FALSE);
-
- return nread;
-}
diff --git a/camel/providers/imap/camel-imap-store.h b/camel/providers/imap/camel-imap-store.h
deleted file mode 100644
index b45fb2110e..0000000000
--- a/camel/providers/imap/camel-imap-store.h
+++ /dev/null
@@ -1,148 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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/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))
-
-enum {
- CAMEL_IMAP_STORE_ARG_FIRST = CAMEL_DISCO_STORE_ARG_FIRST + 100,
- CAMEL_IMAP_STORE_ARG_NAMESPACE,
- CAMEL_IMAP_STORE_ARG_OVERRIDE_NAMESPACE,
- CAMEL_IMAP_STORE_ARG_CHECK_ALL,
- CAMEL_IMAP_STORE_ARG_FILTER_INBOX
-};
-
-#define CAMEL_IMAP_STORE_NAMESPACE (CAMEL_IMAP_STORE_ARG_NAMESPACE | CAMEL_ARG_STR)
-#define CAMEL_IMAP_STORE_OVERRIDE_NAMESPACE (CAMEL_IMAP_STORE_ARG_OVERRIDE_NAMESPACE | CAMEL_ARG_INT)
-#define CAMEL_IMAP_STORE_CHECK_ALL (CAMEL_IMAP_STORE_ARG_CHECK_ALL | CAMEL_ARG_INT)
-#define CAMEL_IMAP_STORE_FILTER_INBOX (CAMEL_IMAP_STORE_ARG_FILTER_INBOX | CAMEL_ARG_INT)
-
-/* CamelFolderInfo flags */
-#define CAMEL_IMAP_FOLDER_MARKED (1<<16)
-#define CAMEL_IMAP_FOLDER_UNMARKED (1<<17)
-#define CAMEL_IMAP_FOLDER_NOCHILDREN (1<<18)
-
-
-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_STARTTLS (1 << 6)
-#define IMAP_CAPABILITY_useful_lsub (1 << 7)
-#define IMAP_CAPABILITY_utf8_search (1 << 8)
-
-#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;
-
- CamelStream *istream;
- CamelStream *ostream;
-
- struct _CamelImapStoreSummary *summary;
-
- /* Information about the command channel / connection status */
- gboolean connected;
- gboolean preauthed;
- char tag_prefix;
- guint32 command;
- CamelFolder *current_folder;
-
- /* Information about the server */
- CamelImapServerLevel server_level;
- guint32 capabilities, parameters;
- /* NB: namespace should be handled by summary->namespace */
- char *namespace, dir_sep, *base_url, *storage_path;
- GHashTable *authtypes;
-
- gboolean renaming;
-
-#ifdef ENABLE_THREADS
- EThread *async_thread;
-#endif
-};
-
-
-typedef struct {
- CamelDiscoStoreClass parent_class;
-
-} CamelImapStoreClass;
-
-
-/* Standard Camel function */
-CamelType camel_imap_store_get_type (void);
-
-
-gboolean camel_imap_store_connected (CamelImapStore *store, CamelException *ex);
-
-ssize_t camel_imap_store_readline (CamelImapStore *store, char **dest, CamelException *ex);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_IMAP_STORE_H */
diff --git a/camel/providers/imap/camel-imap-summary.c b/camel/providers/imap/camel-imap-summary.c
deleted file mode 100644
index dba1134fa1..0000000000
--- a/camel/providers/imap/camel-imap-summary.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>
- * Dan Winship <danw@ximian.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <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);
-}
-
-void
-camel_imap_summary_add_offline_uncached (CamelFolderSummary *summary, const char *uid,
- const CamelMessageInfo *info)
-{
- CamelMessageInfo *mi;
- CamelMessageContentInfo *ci;
-
- /* Create summary entry */
- mi = camel_folder_summary_info_new (summary);
- ci = camel_folder_summary_content_info_new (summary);
-
- camel_message_info_dup_to (info, mi);
- mi->content = ci;
-
- /* copy our private fields */
- ((CamelImapMessageInfo *)mi)->server_flags =
- ((CamelImapMessageInfo *)info)->server_flags;
-
- /* 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 817e884408..0000000000
--- a/camel/providers/imap/camel-imap-summary.h
+++ /dev/null
@@ -1,79 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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;
-
-};
-
-CamelType 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);
-
-void camel_imap_summary_add_offline_uncached (CamelFolderSummary *summary,
- const char *uid,
- 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 c5ea41acff..0000000000
--- a/camel/providers/imap/camel-imap-types.h
+++ /dev/null
@@ -1,39 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 879cc23cca..0000000000
--- a/camel/providers/imap/camel-imap-utils.c
+++ /dev/null
@@ -1,1261 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <time.h>
-#include <errno.h>
-
-#include "camel-imap-utils.h"
-#include "camel-imap-summary.h"
-#include "camel-imap-store.h"
-#include "camel-folder.h"
-#include "camel-string-utils.h"
-#include "camel-utf8.h"
-
-#define d(x)
-
-const char *
-imap_next_word (const char *buf)
-{
- const char *word;
-
- /* skip over current word */
- word = buf;
- while (*word && *word != ' ')
- word++;
-
- /* skip over white space */
- while (*word && *word == ' ')
- word++;
-
- return word;
-}
-
-
-static void
-imap_namespace_destroy (struct _namespace *namespace)
-{
- struct _namespace *node, *next;
-
- node = namespace;
- while (node) {
- next = node->next;
- g_free (node->prefix);
- g_free (node);
- node = next;
- }
-}
-
-void
-imap_namespaces_destroy (struct _namespaces *namespaces)
-{
- if (namespaces) {
- imap_namespace_destroy (namespaces->personal);
- imap_namespace_destroy (namespaces->other);
- imap_namespace_destroy (namespaces->shared);
- g_free (namespaces);
- }
-}
-
-static gboolean
-imap_namespace_decode (const char **in, struct _namespace **namespace)
-{
- struct _namespace *list, *tail, *node;
- const char *inptr;
- char *astring;
- size_t len;
-
- inptr = *in;
-
- list = NULL;
- tail = (struct _namespace *) &list;
-
- if (strncasecmp (inptr, "NIL", 3) != 0) {
- if (*inptr++ != '(')
- goto exception;
-
- while (*inptr && *inptr != ')') {
- if (*inptr++ != '(')
- goto exception;
-
- node = g_new (struct _namespace, 1);
- node->next = NULL;
-
- /* get the namespace prefix */
- astring = imap_parse_astring (&inptr, &len);
- if (!astring) {
- g_free (node);
- goto exception;
- }
-
- /* decode IMAP's modified UTF-7 into UTF-8 */
- node->prefix = imap_mailbox_decode (astring, len);
- g_free (astring);
- if (!node->prefix) {
- g_free (node);
- goto exception;
- }
-
- tail->next = node;
- tail = node;
-
- /* get the namespace directory delimiter */
- inptr = imap_next_word (inptr);
-
- if (!strncasecmp (inptr, "NIL", 3)) {
- inptr = imap_next_word (inptr);
- node->delim = '\0';
- } else if (*inptr++ == '"') {
- if (*inptr == '\\')
- inptr++;
-
- node->delim = *inptr++;
-
- if (*inptr++ != '"')
- goto exception;
- } else
- goto exception;
-
- if (*inptr == ' ') {
- /* parse extra flags... for now we
- don't save them, but in the future
- we may want to? */
- while (*inptr == ' ')
- inptr++;
-
- while (*inptr && *inptr != ')') {
- /* this should be a QSTRING or ATOM */
- inptr = imap_next_word (inptr);
- if (*inptr == '(') {
- /* skip over the param list */
- imap_skip_list (&inptr);
- }
-
- while (*inptr == ' ')
- inptr++;
- }
- }
-
- if (*inptr++ != ')')
- goto exception;
-
- /* there shouldn't be spaces according to the
- ABNF grammar, but we all know how closely
- people follow specs */
- while (*inptr == ' ')
- inptr++;
- }
-
- if (*inptr == ')')
- inptr++;
- } else {
- inptr += 3;
- }
-
- *in = inptr;
- *namespace = list;
-
- return TRUE;
-
- exception:
-
- /* clean up any namespaces we may have allocated */
- imap_namespace_destroy (list);
-
- return FALSE;
-}
-
-#if d(!)0
-static void
-namespace_dump (struct _namespace *namespace)
-{
- struct _namespace *node;
-
- if (namespace) {
- printf ("(");
- node = namespace;
- while (node) {
- printf ("(\"%s\" ", node->prefix);
- if (node->delim)
- printf ("\"%c\")", node->delim);
- else
- printf ("NUL)");
-
- node = node->next;
- if (node)
- printf (" ");
- }
-
- printf (")");
- } else {
- printf ("NIL");
- }
-}
-
-static void
-namespaces_dump (struct _namespaces *namespaces)
-{
- printf ("namespace dump: ");
- namespace_dump (namespaces->personal);
- printf (" ");
- namespace_dump (namespaces->other);
- printf (" ");
- namespace_dump (namespaces->shared);
- printf ("\n");
-}
-#endif
-
-struct _namespaces *
-imap_parse_namespace_response (const char *response)
-{
- struct _namespaces *namespaces;
- const char *inptr;
-
- d(printf ("parsing: %s\n", response));
-
- if (*response != '*')
- return NULL;
-
- inptr = imap_next_word (response);
- if (strncasecmp (inptr, "NAMESPACE", 9) != 0)
- return NULL;
-
- inptr = imap_next_word (inptr);
-
- namespaces = g_new (struct _namespaces, 1);
- namespaces->personal = NULL;
- namespaces->other = NULL;
- namespaces->shared = NULL;
-
- if (!imap_namespace_decode (&inptr, &namespaces->personal))
- goto exception;
-
- if (*inptr != ' ')
- goto exception;
-
- while (*inptr == ' ')
- inptr++;
-
- if (!imap_namespace_decode (&inptr, &namespaces->other))
- goto exception;
-
- if (*inptr != ' ')
- goto exception;
-
- while (*inptr == ' ')
- inptr++;
-
- if (!imap_namespace_decode (&inptr, &namespaces->shared))
- goto exception;
-
- d(namespaces_dump (namespaces));
-
- return namespaces;
-
- exception:
-
- imap_namespaces_destroy (namespaces);
-
- return NULL;
-}
-
-/**
- * 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)
-{
- gboolean is_lsub = FALSE;
- const char *word;
- size_t len;
-
- if (*buf != '*')
- return FALSE;
-
- word = imap_next_word (buf);
- if (strncasecmp (word, "LIST", 4) && strncasecmp (word, "LSUB", 4))
- return FALSE;
-
- /* check if we are looking at an LSUB response */
- if (word[1] == 'S' || word[1] == 's')
- is_lsub = TRUE;
-
- /* 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 (!strncasecmp (word, "\\NoInferiors", len))
- *flags |= CAMEL_FOLDER_NOINFERIORS;
- else if (!strncasecmp (word, "\\NoSelect", len))
- *flags |= CAMEL_FOLDER_NOSELECT;
- else if (!strncasecmp (word, "\\Marked", len))
- *flags |= CAMEL_IMAP_FOLDER_MARKED;
- else if (!strncasecmp (word, "\\Unmarked", len))
- *flags |= CAMEL_IMAP_FOLDER_UNMARKED;
- else if (!strncasecmp (word, "\\HasChildren", len))
- *flags |= CAMEL_FOLDER_CHILDREN;
- else if (!strncasecmp (word, "\\HasNoChildren", len))
- *flags |= CAMEL_IMAP_FOLDER_NOCHILDREN;
- }
-
- 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 *astring;
-
- /* get the folder name */
- word = imap_next_word (word);
- astring = imap_parse_astring (&word, &len);
- if (!astring)
- return FALSE;
-
- *folder = astring;
-#if 0
- char *mailbox;
-
- mailbox = imap_mailbox_decode (astring, strlen (astring));
- g_free (astring);
- if (!mailbox)
- return FALSE;
-
- /* Kludge around Courier imap's LSUB response for INBOX when it
- * isn't subscribed to.
- *
- * Ignore any \Noselect flags for INBOX when parsing
- * an LSUB response to work around the following response:
- *
- * * LSUB (\Noselect \HasChildren) "." "INBOX"
- *
- * Fixes bug #28929 (albeight in a very dodgy way imho, but what
- * can ya do when ya got the ignorance of marketing breathing
- * down your neck?)
- */
- if (is_lsub && flags && !strcasecmp (mailbox, "INBOX"))
- *flags &= ~CAMEL_FOLDER_NOSELECT;
-
- *folder = mailbox;
-#endif
- }
-
- 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 (!strncasecmp (flag_list, "\\Answered", len))
- flags |= CAMEL_MESSAGE_ANSWERED;
- else if (!strncasecmp (flag_list, "\\Deleted", len))
- flags |= CAMEL_MESSAGE_DELETED;
- else if (!strncasecmp (flag_list, "\\Draft", len))
- flags |= CAMEL_MESSAGE_DRAFT;
- else if (!strncasecmp (flag_list, "\\Flagged", len))
- flags |= CAMEL_MESSAGE_FLAGGED;
- else if (!strncasecmp (flag_list, "\\Seen", len))
- flags |= CAMEL_MESSAGE_SEEN;
- else if (!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;
-}
-
-/*
- From rfc2060
-
-ATOM_CHAR ::= <any CHAR except atom_specials>
-
-atom_specials ::= "(" / ")" / "{" / SPACE / CTL / list_wildcards /
- quoted_specials
-
-CHAR ::= <any 7-bit US-ASCII character except NUL,
- 0x01 - 0x7f>
-
-CTL ::= <any ASCII control character and DEL,
- 0x00 - 0x1f, 0x7f>
-
-SPACE ::= <ASCII SP, space, 0x20>
-
-list_wildcards ::= "%" / "*"
-
-quoted_specials ::= <"> / "\"
-*/
-
-static unsigned char imap_atom_specials[256] = {
-/* 00 */0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-/* 10 */0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-/* 20 */0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1,
-/* 30 */1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-/* 40 */1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-/* 50 */1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1,
-/* 60 */1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-/* 70 */1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 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, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-#define imap_is_atom_char(c) ((imap_atom_specials[(c)&0xff] & 0x01) != 0)
-
-gboolean
-imap_is_atom(const char *in)
-{
- register unsigned char c;
- register const char *p = in;
-
- while ((c = (unsigned char)*p)) {
- if (!imap_is_atom_char(c))
- return FALSE;
- p++;
- }
-
- /* check for empty string */
- return p!=in;
-}
-
-/**
- * imap_parse_string_generic:
- * @str_p: a pointer to a string
- * @len: a pointer to a size_t 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 (const char **str_p, size_t *len, int type)
-{
- const char *str = *str_p;
- char *out;
-
- if (!str)
- return NULL;
- else if (*str == '"') {
- char *p;
- size_t 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 && !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;
- out = g_strndup (*str_p, *len);
- *str_p += *len;
- return out;
- } else {
- *str_p = NULL;
- return NULL;
- }
-}
-
-static inline void
-skip_char (const char **in, char ch)
-{
- if (*in && **in == ch)
- *in = *in + 1;
- else
- *in = NULL;
-}
-
-/* Skip atom, string, or number */
-static void
-skip_asn (const char **str_p)
-{
- const 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, (char **) &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 (const 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 int
-parse_params (const char **parms_p, CamelContentType *type)
-{
- const char *parms = *parms_p;
- char *name, *value;
- size_t len;
-
- if (!strncasecmp (parms, "nil", 3)) {
- *parms_p += 3;
- return 0;
- }
-
- if (*parms++ != '(')
- return -1;
-
- while (parms && *parms != ')') {
- name = imap_parse_nstring (&parms, &len);
- skip_char (&parms, ' ');
- value = imap_parse_nstring (&parms, &len);
-
- if (name && value)
- camel_content_type_set_param (type, name, value);
- g_free (name);
- g_free (value);
-
- if (parms && *parms == ' ')
- parms++;
- }
-
- if (!parms || *parms++ != ')')
- return -1;
-
- *parms_p = parms;
-
- return 0;
-}
-
-
-static CamelMessageContentInfo *
-imap_body_decode (const char **in, CamelMessageContentInfo *ci, CamelFolder *folder, GPtrArray *cis)
-{
- const char *inptr = *in;
- CamelMessageContentInfo *child = NULL;
- char *type, *subtype, *id = NULL;
- CamelContentType *ctype = NULL;
- char *description = NULL;
- char *encoding = NULL;
- size_t len;
- size_t size;
- char *p;
-
- if (*inptr++ != '(')
- return NULL;
-
- if (ci == NULL) {
- ci = camel_folder_summary_content_info_new (folder->summary);
- g_ptr_array_add (cis, ci);
- }
-
- if (*inptr == '(') {
- /* body_type_mpart */
- CamelMessageContentInfo *tail, *children = NULL;
-
- tail = (CamelMessageContentInfo *) &children;
-
- do {
- if (!(child = imap_body_decode (&inptr, NULL, folder, cis)))
- return NULL;
-
- child->parent = ci;
- tail->next = child;
- tail = child;
- } while (*inptr == '(');
-
- if (*inptr++ != ' ')
- return NULL;
-
- if (!strncasecmp (inptr, "nil", 3) != 0) {
- subtype = imap_parse_string (&inptr, &len);
- } else {
- subtype = NULL;
- inptr += 3;
- }
-
- ctype = camel_content_type_new ("multipart", subtype ? subtype : "mixed");
- g_free (subtype);
-
- if (*inptr++ != ')') {
- camel_content_type_unref (ctype);
- return NULL;
- }
-
- ci->type = ctype;
- ci->childs = children;
- } else {
- /* body_type_1part */
- if (strncasecmp (inptr, "nil", 3) != 0) {
- type = imap_parse_string (&inptr, &len);
- if (inptr == NULL)
- return NULL;
- } else {
- return NULL;
- }
-
- if (*inptr++ != ' ') {
- g_free (type);
- return NULL;
- }
-
- if (strncasecmp (inptr, "nil", 3) != 0) {
- subtype = imap_parse_string (&inptr, &len);
- if (inptr == NULL) {
- g_free (type);
- return NULL;
- }
- } else {
- if (!strcasecmp (type, "text"))
- subtype = g_strdup ("plain");
- else
- subtype = NULL;
- inptr += 3;
- }
-
- camel_strdown (type);
- camel_strdown (subtype);
- ctype = camel_content_type_new (type, subtype);
- g_free (subtype);
- g_free (type);
-
- if (*inptr++ != ' ')
- goto exception;
-
- /* content-type params */
- if (parse_params (&inptr, ctype) == -1)
- goto exception;
-
- if (*inptr++ != ' ')
- goto exception;
-
- /* content-id */
- if (strncasecmp (inptr, "nil", 3) != 0) {
- id = imap_parse_string (&inptr, &len);
- if (inptr == NULL)
- goto exception;
- } else
- inptr += 3;
-
- if (*inptr++ != ' ')
- goto exception;
-
- /* description */
- if (strncasecmp (inptr, "nil", 3) != 0) {
- description = imap_parse_string (&inptr, &len);
- if (inptr == NULL)
- goto exception;
- } else
- inptr += 3;
-
- if (*inptr++ != ' ')
- goto exception;
-
- /* encoding */
- if (strncasecmp (inptr, "nil", 3) != 0) {
- encoding = imap_parse_string (&inptr, &len);
- if (inptr == NULL)
- goto exception;
- } else
- inptr += 3;
-
- if (*inptr++ != ' ')
- goto exception;
-
- /* size */
- size = strtoul ((const char *) inptr, &p, 10);
- inptr = (const unsigned char *) p;
-
- if (camel_content_type_is (ctype, "message", "rfc822")) {
- /* body_type_msg */
- if (*inptr++ != ' ')
- goto exception;
-
- /* envelope */
- imap_skip_list (&inptr);
-
- if (*inptr++ != ' ')
- goto exception;
-
- /* body */
- if (!(child = imap_body_decode (&inptr, NULL, folder, cis)))
- goto exception;
- child->parent = ci;
-
- if (*inptr++ != ' ')
- goto exception;
-
- /* lines */
- strtoul ((const char *) inptr, &p, 10);
- inptr = (const unsigned char *) p;
- } else if (camel_content_type_is (ctype, "text", "*")) {
- if (*inptr++ != ' ')
- goto exception;
-
- /* lines */
- strtoul ((const char *) inptr, &p, 10);
- inptr = (const unsigned char *) p;
- } else {
- /* body_type_basic */
- }
-
- if (*inptr++ != ')')
- goto exception;
-
- ci->type = ctype;
- ci->id = id;
- ci->description = description;
- ci->encoding = encoding;
- ci->size = size;
- ci->childs = child;
- }
-
- *in = inptr;
-
- return ci;
-
- exception:
-
- camel_content_type_unref (ctype);
- g_free (id);
- g_free (description);
- g_free (encoding);
-
- return NULL;
-}
-
-
-/**
- * imap_parse_body:
- * @body_p: pointer to the start of an IMAP "body"
- * @folder: an imap folder
- * @ci: a CamelMessageContentInfo to fill in
- *
- * This fills 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 (const char **body_p, CamelFolder *folder,
- CamelMessageContentInfo *ci)
-{
- const char *inptr = *body_p;
- CamelMessageContentInfo *child;
- GPtrArray *children;
- int i;
-
- if (!inptr || *inptr != '(') {
- *body_p = NULL;
- return;
- }
-
- children = g_ptr_array_new ();
-
- if (!(imap_body_decode (&inptr, ci, folder, children))) {
- for (i = 0; i < children->len; i++) {
- child = children->pdata[i];
-
- /* content_info_free will free all the child
- * nodes, but we don't want that. */
- child->next = NULL;
- child->parent = NULL;
- child->childs = NULL;
-
- camel_folder_summary_content_info_free (folder->summary, child);
- }
- *body_p = NULL;
- } else {
- *body_p = inptr;
- }
-
- g_ptr_array_free (children, TRUE);
-}
-
-
-/**
- * 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;
-}
-
-/* the max number of chars that an unsigned 32-bit int can be is 10 chars plus 1 for a possible : */
-#define UID_SET_FULL(setlen, maxlen) (maxlen > 0 ? setlen + 11 >= maxlen : FALSE)
-
-/**
- * imap_uid_array_to_set:
- * @summary: summary for the folder the UIDs come from
- * @uids: a (sorted) array of UIDs
- * @uid: uid index to start at
- * @maxlen: max length of the set string (or -1 for infinite)
- * @lastuid: index offset of the last uid used
- *
- * Creates an IMAP "set" up to @maxlen bytes long, covering the listed
- * UIDs starting at index @uid 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.
- *
- * After calling, @lastuid will be set the index of the first uid
- * *not* included in the returned set string.
- *
- * Note: @uids MUST be in sorted order for this code to work properly.
- *
- * Return value: the set, which the caller must free with g_free()
- **/
-char *
-imap_uid_array_to_set (CamelFolderSummary *summary, GPtrArray *uids, int uid, ssize_t maxlen, int *lastuid)
-{
- unsigned long last_uid, next_summary_uid, this_uid;
- gboolean range = FALSE;
- int si, scount;
- GString *gset;
- char *set;
-
- g_return_val_if_fail (uids->len > uid, NULL);
-
- gset = g_string_new (uids->pdata[uid]);
- last_uid = strtoul (uids->pdata[uid], NULL, 10);
- next_summary_uid = 0;
- scount = camel_folder_summary_count (summary);
-
- for (uid++, si = 0; uid < uids->len && !UID_SET_FULL (gset->len, maxlen); uid++) {
- /* 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[uid], NULL, 10);
- if (this_uid == next_summary_uid || this_uid == last_uid + 1)
- range = TRUE;
- else {
- if (range) {
- g_string_append_printf (gset, ":%lu", last_uid);
- range = FALSE;
- }
- g_string_append_printf (gset, ",%lu", this_uid);
- }
-
- last_uid = this_uid;
- }
-
- if (range)
- g_string_append_printf (gset, ":%lu", last_uid);
-
- *lastuid = 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)
-{
- size_t 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_mailbox_encode (const unsigned char *in, size_t inlen)
-{
- char *buf;
-
- buf = g_alloca (inlen + 1);
- memcpy (buf, in, inlen);
- buf[inlen] = 0;
-
- return camel_utf8_utf7 (buf);
-}
-
-char *
-imap_mailbox_decode (const unsigned char *in, size_t inlen)
-{
- char *buf;
-
- buf = g_alloca (inlen + 1);
- memcpy (buf, in, inlen);
- buf[inlen] = 0;
-
- return camel_utf7_utf8 (buf);
-}
diff --git a/camel/providers/imap/camel-imap-utils.h b/camel/providers/imap/camel-imap-utils.h
deleted file mode 100644
index e8f570137f..0000000000
--- a/camel/providers/imap/camel-imap-utils.h
+++ /dev/null
@@ -1,95 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_UTILS_H
-#define CAMEL_IMAP_UTILS_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <sys/types.h>
-
-#include "camel-folder-summary.h"
-#include "camel-imap-types.h"
-
-const char *imap_next_word (const char *buf);
-
-struct _namespace {
- struct _namespace *next;
- char *prefix;
- char delim;
-};
-
-struct _namespaces {
- struct _namespace *personal;
- struct _namespace *other;
- struct _namespace *shared;
-};
-
-void imap_namespaces_destroy (struct _namespaces *namespaces);
-struct _namespaces *imap_parse_namespace_response (const char *response);
-
-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 (const char **str_p, size_t *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 (const char **body_p, CamelFolder *folder,
- CamelMessageContentInfo *ci);
-
-gboolean imap_is_atom (const char *in);
-char *imap_quote_string (const char *str);
-
-void imap_skip_list (const char **str_p);
-
-char *imap_uid_array_to_set (CamelFolderSummary *summary, GPtrArray *uids, int uid, ssize_t maxlen, int *lastuid);
-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);
-
-char *imap_mailbox_encode (const unsigned char *in, size_t inlen);
-char *imap_mailbox_decode (const unsigned char *in, size_t inlen);
-
-#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 2cb07b3012..0000000000
--- a/camel/providers/imap/camel-imap-wrapper.c
+++ /dev/null
@@ -1,185 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 ssize_t 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 type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- 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 type;
-}
-
-
-static void
-imap_wrapper_hydrate (CamelImapWrapper *imap_wrapper, CamelStream *stream)
-{
- CamelDataWrapper *data_wrapper = (CamelDataWrapper *) imap_wrapper;
-
- camel_object_ref (stream);
- data_wrapper->stream = stream;
- data_wrapper->offline = FALSE;
-
- camel_object_unref (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 ssize_t
-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 (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 (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 (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 4f7ca5097a..0000000000
--- a/camel/providers/imap/camel-imap-wrapper.h
+++ /dev/null
@@ -1,70 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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/imapp/.cvsignore b/camel/providers/imapp/.cvsignore
deleted file mode 100644
index 3fa8afaa38..0000000000
--- a/camel/providers/imapp/.cvsignore
+++ /dev/null
@@ -1,11 +0,0 @@
-.deps
-Makefile
-Makefile.in
-.libs
-.deps
-*.lo
-*.la
-*.bb
-*.bbg
-*.da
-*.gcov
diff --git a/camel/providers/imapp/Makefile.am b/camel/providers/imapp/Makefile.am
deleted file mode 100644
index 7ce8c65fcd..0000000000
--- a/camel/providers/imapp/Makefile.am
+++ /dev/null
@@ -1,45 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-libcamelimappincludedir = $(privincludedir)/camel
-
-camel_provider_LTLIBRARIES = libcamelimapp.la
-camel_provider_DATA = libcamelimapp.urls
-
-INCLUDES = -I.. \
- -I$(srcdir)/.. \
- -I$(top_srcdir)/camel \
- -I$(top_srcdir)/intl \
- -I$(top_srcdir)/e-util \
- -I$(top_srcdir) \
- $(CAMEL_CFLAGS) \
- $(GNOME_INCLUDEDIR) \
- $(GTK_INCLUDEDIR) \
- -DG_LOG_DOMAIN=\"camel-imapp-provider\"
-
-libcamelimapp_la_SOURCES = \
- camel-imapp-utils.c \
- camel-imapp-engine.c \
- camel-imapp-stream.c \
- camel-imapp-store.c \
- camel-imapp-folder.c \
- camel-imapp-provider.c \
- camel-imapp-store-summary.c \
- camel-imapp-driver.c \
- camel-imapp-summary.c
-
-libcamelimappinclude_HEADERS = \
- camel-imapp-utils.h \
- camel-imapp-engine.h \
- camel-imapp-stream.h \
- camel-imapp-store.h \
- camel-imapp-folder.h \
- camel-imapp-store-summary.h \
- camel-imapp-driver.h \
- camel-imapp-summary.h
-
-libcamelimapp_la_LDFLAGS = -avoid-version -module
-
-#noinst_HEADERS = \
-# camel-imap-private.h
-
-EXTRA_DIST = libcamelimapp.urls
diff --git a/camel/providers/imapp/camel-imapp-driver.c b/camel/providers/imapp/camel-imapp-driver.c
deleted file mode 100644
index 106e98fbb3..0000000000
--- a/camel/providers/imapp/camel-imapp-driver.c
+++ /dev/null
@@ -1,771 +0,0 @@
-
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <ctype.h>
-
-#include "camel-imapp-driver.h"
-#include "camel-imapp-utils.h"
-#include "camel-imapp-folder.h"
-#include "camel-imapp-engine.h"
-#include "camel-imapp-summary.h"
-#include "camel-imapp-exception.h"
-
-#include <camel/camel-stream-mem.h>
-#include <camel/camel-stream-null.h>
-
-#include <camel/camel-folder-summary.h>
-#include <camel/camel-store.h>
-#include <camel/camel-mime-utils.h>
-#include <camel/camel-sasl.h>
-
-#define d(x) x
-
-static int driver_resp_fetch(CamelIMAPPEngine *ie, guint32 id, CamelIMAPPDriver *sdata);
-static int driver_resp_expunge(CamelIMAPPEngine *ie, guint32 id, CamelIMAPPDriver *sdata);
-static int driver_resp_exists(CamelIMAPPEngine *ie, guint32 id, CamelIMAPPDriver *sdata);
-static int driver_resp_list(CamelIMAPPEngine *ie, guint32 id, CamelIMAPPDriver *sdata);
-
-static void driver_status(CamelIMAPPEngine *ie, struct _status_info *sinfo, CamelIMAPPDriver *sdata);
-
-static void
-class_init(CamelIMAPPDriverClass *ieclass)
-{
-}
-
-static void
-object_init(CamelIMAPPDriver *ie, CamelIMAPPDriverClass *ieclass)
-{
- ie->summary = g_ptr_array_new();
- e_dlist_init(&ie->body_fetch);
- e_dlist_init(&ie->body_fetch_done);
-}
-
-static void
-object_finalise(CamelIMAPPDriver *ie, CamelIMAPPDriverClass *ieclass)
-{
- if (ie->folder)
- camel_object_unref((CamelObject *)ie->folder);
- if (ie->engine)
- camel_object_unref((CamelObject *)ie->engine);
- if (ie->summary)
- g_ptr_array_free(ie->summary, TRUE);
-}
-
-CamelType
-camel_imapp_driver_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (
- camel_object_get_type (),
- "CamelIMAPPDriver",
- sizeof (CamelIMAPPDriver),
- sizeof (CamelIMAPPDriverClass),
- (CamelObjectClassInitFunc) class_init,
- NULL,
- (CamelObjectInitFunc) object_init,
- (CamelObjectFinalizeFunc) object_finalise);
- }
-
- return type;
-}
-
-CamelIMAPPDriver *
-camel_imapp_driver_new(CamelIMAPPStream *stream)
-{
- CamelIMAPPDriver *driver;
- CamelIMAPPEngine *ie;
-
- driver = CAMEL_IMAPP_DRIVER (camel_object_new (CAMEL_IMAPP_DRIVER_TYPE));
- ie = driver->engine = camel_imapp_engine_new(stream);
-
- camel_imapp_engine_add_handler(ie, "FETCH", (CamelIMAPPEngineFunc)driver_resp_fetch, driver);
- camel_imapp_engine_add_handler(ie, "EXPUNGE", (CamelIMAPPEngineFunc)driver_resp_expunge, driver);
- camel_imapp_engine_add_handler(ie, "EXISTS", (CamelIMAPPEngineFunc)driver_resp_exists, driver);
- camel_imapp_engine_add_handler(ie, "LIST", (CamelIMAPPEngineFunc)driver_resp_list, driver);
- camel_object_hook_event(ie, "status", (CamelObjectEventHookFunc)driver_status, driver);
-
- return driver;
-}
-
-void
-camel_imapp_driver_set_sasl_factory(CamelIMAPPDriver *id, CamelIMAPPSASLFunc get_sasl, void *sasl_data)
-{
- id->get_sasl = get_sasl;
- id->get_sasl_data = sasl_data;
-}
-
-void
-camel_imapp_driver_set_login_query(CamelIMAPPDriver *id, CamelIMAPPLoginFunc get_login, void *login_data)
-{
- id->get_login = get_login;
- id->get_login_data = login_data;
-}
-
-void
-camel_imapp_driver_login(CamelIMAPPDriver *id)
-/* throws SERVICE_CANT_AUTHENTICATE, SYSTEM_IO */
-{
- CamelIMAPPCommand * volatile ic = NULL;
-
- /* connect? */
- /* camel_imapp_engine_connect() */
- /* or above? */
-
- CAMEL_TRY {
- CamelSasl *sasl;
-
- if (id->get_sasl
- && (sasl = id->get_sasl(id, id->get_sasl_data))) {
- ic = camel_imapp_engine_command_new(id->engine, "AUTHENTICATE", NULL, "AUTHENTICATE %A", sasl);
- camel_object_unref(sasl);
- } else {
- char *user, *pass;
-
- g_assert(id->get_login);
- id->get_login(id, &user, &pass, id->get_login_data);
- ic = camel_imapp_engine_command_new(id->engine, "LOGIN", NULL, "LOGIN %s %s", user, pass);
- g_free(user);
- g_free(pass);
- }
-
- camel_imapp_engine_command_queue(id->engine, ic);
- while (camel_imapp_engine_iterate(id->engine, ic) > 0)
- ;
-
- if (ic->status->result != IMAP_OK)
- camel_exception_throw(CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE, "Login failed: %s", ic->status->text);
- camel_imapp_engine_command_free(id->engine, ic);
- } CAMEL_CATCH(ex) {
- if (ic)
- camel_imapp_engine_command_free(id->engine, ic);
- camel_exception_throw_ex(ex);
- } CAMEL_DONE;
-}
-
-void
-camel_imapp_driver_select(CamelIMAPPDriver *id, struct _CamelIMAPPFolder *folder)
-{
- CamelIMAPPSelectResponse *sr;
- CamelIMAPPCommand * volatile ic = NULL;
- CamelIMAPPCommand * volatile ic2 = NULL;
- guint32 count;
- CamelFolderSummary *summary;
-
- if (id->folder) {
- if (folder == id->folder)
- return;
- camel_imapp_driver_sync(id, FALSE, id->folder);
- if (camel_folder_change_info_changed(id->folder->changes)) {
- camel_object_trigger_event(id->folder, "folder_changed", id->folder->changes);
- camel_folder_change_info_clear(id->folder->changes);
- }
- camel_object_unref(id->folder);
- id->folder = NULL;
- }
-
- summary = ((CamelFolder *)folder)->summary;
-
- ic = camel_imapp_engine_command_new(id->engine, "SELECT", NULL, "SELECT %t", folder->raw_name);
- camel_imapp_engine_command_queue(id->engine, ic);
- while (camel_imapp_engine_iterate(id->engine, ic)>0)
- ;
- camel_imapp_engine_command_free(id->engine, ic);
-
- id->folder = folder;
- camel_object_ref(folder);
-
- count = camel_folder_summary_count(summary);
- if (count > 0 && count <= id->exists) {
- ic = camel_imapp_engine_command_new(id->engine, "FETCH", NULL,
- "FETCH 1:%u (UID FLAGS)", count);
- camel_imapp_engine_command_queue(id->engine, ic);
- if (count < id->exists) {
- ic2 = camel_imapp_engine_command_new(id->engine, "FETCH", NULL,
- "FETCH %u:* (UID FLAGS ENVELOPE)", count+1);
- camel_imapp_engine_command_queue(id->engine, ic2);
- } else {
- ic2 = NULL;
- }
-
- while (camel_imapp_engine_iterate(id->engine, ic2?ic2:ic)>0)
- ;
-
- camel_imapp_engine_command_free(id->engine, ic);
- if (ic2)
- camel_imapp_engine_command_free(id->engine, ic2);
- } else {
- ic = camel_imapp_engine_command_new(id->engine, "FETCH", NULL,
- "FETCH 1:* (UID FLAGS ENVELOPE)");
- camel_imapp_engine_command_queue(id->engine, ic);
- while (camel_imapp_engine_iterate(id->engine, ic)>0)
- ;
- camel_imapp_engine_command_free(id->engine, ic);
- }
-
- /* TODO: need to set exists/etc in summary */
- folder->exists = id->exists;
- folder->uidvalidity = id->uidvalidity;
-
- printf("saving summary '%s'\n", summary->summary_path);
- camel_folder_summary_save(summary);
-
- if (camel_folder_change_info_changed(id->folder->changes)) {
- camel_object_trigger_event(id->folder, "folder_changed", id->folder->changes);
- camel_folder_change_info_clear(id->folder->changes);
- }
-}
-
-static void
-imapp_driver_check(CamelIMAPPDriver *id)
-{
- guint32 count;
- CamelIMAPPCommand *ic;
-
- /* FIXME: exception handling */
-
- if (id->folder->exists != id->exists) {
- count = camel_folder_summary_count(((CamelFolder *)id->folder)->summary);
- if (count < id->exists) {
- printf("fetching new messages\n");
- ic = camel_imapp_engine_command_new(id->engine, "FETCH", NULL,
- "FETCH %u:* (UID FLAGS ENVELOPE)", count+1);
- camel_imapp_engine_command_queue(id->engine, ic);
- while (camel_imapp_engine_iterate(id->engine, ic)>0)
- ;
- camel_imapp_engine_command_free(id->engine, ic);
- } else if (count > id->exists) {
- printf("folder shrank with no expunge notificaitons!? uh, dunno what to do\n");
- }
- }
-
- printf("checking for change info changes\n");
- if (camel_folder_change_info_changed(id->folder->changes)) {
- printf("got somechanges! added=%d changed=%d removed=%d\n",
- id->folder->changes->uid_added->len,
- id->folder->changes->uid_changed->len,
- id->folder->changes->uid_removed->len);
- camel_object_trigger_event(id->folder, "folder_changed", id->folder->changes);
- camel_folder_change_info_clear(id->folder->changes);
- }
-}
-
-void
-camel_imapp_driver_update(CamelIMAPPDriver *id, CamelIMAPPFolder *folder)
-{
- if (id->folder == folder) {
- CamelIMAPPCommand *ic;
-
- /* this will automagically update flags & expunge items */
- ic = camel_imapp_engine_command_new(id->engine, "NOOP", NULL, "NOOP");
- camel_imapp_engine_command_queue(id->engine, ic);
- while (camel_imapp_engine_iterate(id->engine, ic)>0)
- ;
- camel_imapp_engine_command_free(id->engine, ic);
-
- imapp_driver_check(id);
- } else {
- camel_imapp_driver_select(id, folder);
- }
-}
-
-/* FIXME: this is basically a copy of the same in camel-imapp-utils.c */
-static struct {
- char *name;
- guint32 flag;
-} flag_table[] = {
- { "\\ANSWERED", CAMEL_MESSAGE_ANSWERED },
- { "\\DELETED", CAMEL_MESSAGE_DELETED },
- { "\\DRAFT", CAMEL_MESSAGE_DRAFT },
- { "\\FLAGGED", CAMEL_MESSAGE_FLAGGED },
- { "\\SEEN", CAMEL_MESSAGE_SEEN },
- /* { "\\RECENT", CAMEL_IMAPP_MESSAGE_RECENT }, */
-};
-
-/*
- flags 00101000
- sflags 01001000
- ^ 01100000
-~flags 11010111
-& 01000000
-
-&flags 00100000
-*/
-
-static void
-imapp_write_flags(CamelIMAPPDriver *id, guint32 orset, gboolean on, CamelFolderSummary *summary)
-{
- guint32 i, j, count;
- CamelIMAPPMessageInfo *info;
- CamelIMAPPCommand *ic = NULL;
- struct _uidset_state ss;
- GSList *commands = NULL;
-
- /* FIXME: exception handling */
-
- count = camel_folder_summary_count(summary);
- for (j=0;j<sizeof(flag_table)/sizeof(flag_table[0]);j++) {
- int flush;
-
- if ((orset & flag_table[j].flag) == 0)
- continue;
-
- printf("checking/storing %s flags '%s'\n", on?"on":"off", flag_table[j].name);
-
- flush = 0;
- imapp_uidset_init(&ss, id->engine);
- for (i=0;i<count;i++) {
- info = (CamelIMAPPMessageInfo *)camel_folder_summary_index(summary, i);
- if (info) {
- guint32 flags = info->info.flags & CAMEL_IMAPP_SERVER_FLAGS;
- guint32 sflags = info->server_flags & CAMEL_IMAPP_SERVER_FLAGS;
-
- if ( (on && (((flags ^ sflags) & flags) & flag_table[j].flag))
- || (!on && (((flags ^ sflags) & ~flags) & flag_table[j].flag))) {
- if (ic == NULL)
- ic = camel_imapp_engine_command_new(id->engine, "STORE", NULL, "UID STORE ");
- flush = imapp_uidset_add(&ss, ic, camel_message_info_uid(info));
- }
- camel_folder_summary_info_free(summary, (CamelMessageInfo *)info);
- }
-
- if (i == count-1 && ic != NULL)
- flush |= imapp_uidset_done(&ss, ic);
-
- if (flush) {
- flush = 0;
- camel_imapp_engine_command_add(id->engine, ic, " %tFLAGS.SILENT (%t)", on?"+":"-", flag_table[j].name);
- camel_imapp_engine_command_queue(id->engine, ic);
- commands = g_slist_prepend(commands, ic);
- ic = NULL;
- }
- }
- }
-
- /* flush off any requests we may have outstanding */
- /* TODO: for max benefit, should have this routine do both on and off flags in one go */
- while (commands) {
- GSList *next = commands->next;
-
- ic = commands->data;
- g_slist_free_1(commands);
- commands = next;
-
- while (camel_imapp_engine_iterate(id->engine, ic)>0)
- ;
- camel_imapp_engine_command_free(id->engine, ic);
- }
-}
-
-void
-camel_imapp_driver_sync(CamelIMAPPDriver *id, gboolean expunge, CamelIMAPPFolder *folder)
-{
- CamelFolderSummary *summary;
- guint i, count, on_orset, off_orset;
- CamelIMAPPMessageInfo *info;
- CamelIMAPPCommand *ic;
-
- /* FIXME: exception handling */
-
- camel_imapp_driver_update(id, folder);
-
- summary = ((CamelFolder *)folder)->summary;
- count = camel_folder_summary_count(summary);
- /* find out which flags have turned on, which have tunred off */
- off_orset = on_orset = 0;
- for (i=0;i<count;i++) {
- guint32 flags, sflags;
-
- info = (CamelIMAPPMessageInfo *)camel_folder_summary_index(summary, i);
- if (info == NULL)
- continue;
- flags = info->info.flags & CAMEL_IMAPP_SERVER_FLAGS;
- sflags = info->server_flags & CAMEL_IMAPP_SERVER_FLAGS;
- if (flags != sflags) {
- off_orset |= ( flags ^ sflags ) & ~flags;
- on_orset |= (flags ^ sflags) & flags;
- }
- camel_folder_summary_info_free(summary, (CamelMessageInfo *)info);
- }
-
- if (on_orset || off_orset) {
- /* turn on or off all messages matching */
- if (on_orset)
- imapp_write_flags(id, on_orset, TRUE, summary);
- if (off_orset)
- imapp_write_flags(id, off_orset, FALSE, summary);
-
- /* success (no exception), make sure we match what we're supposed to */
- for (i=0;i<count;i++) {
- guint32 flags, sflags;
-
- info = (CamelIMAPPMessageInfo *)camel_folder_summary_index(summary, i);
- if (info == NULL)
- continue;
- info->server_flags = info->info.flags & CAMEL_IMAPP_SERVER_FLAGS;
- camel_folder_summary_info_free(summary, (CamelMessageInfo *)info);
- }
- camel_folder_summary_touch(summary);
- /* could save summary here, incase of failure? */
- }
-
- if (expunge) {
- ic = camel_imapp_engine_command_new(id->engine, "EXPUNGE", NULL, "EXPUNGE");
- camel_imapp_engine_command_queue(id->engine, ic);
- while (camel_imapp_engine_iterate(id->engine, ic)>0)
- ;
- camel_imapp_engine_command_free(id->engine, ic);
- }
-
- printf("saving summary '%s'\n", summary->summary_path);
- camel_folder_summary_save(summary);
-
- if (camel_folder_change_info_changed(id->folder->changes)) {
- camel_object_trigger_event(id->folder, "folder_changed", id->folder->changes);
- camel_folder_change_info_clear(id->folder->changes);
- }
-}
-
-struct _fetch_data {
- struct _fetch_data *next;
- struct _fetch_data *prev;
-
- CamelStream *data;
- const char *uid;
- const char *section;
-};
-
-CamelStream *
-camel_imapp_driver_fetch(CamelIMAPPDriver *id, CamelIMAPPFolder *folder, const char *uid, const char *section)
-{
- struct _fetch_data fd;
- CamelIMAPPCommand *ic;
-
- fd.data = NULL;
- fd.uid = uid;
- fd.section = section;
- e_dlist_addtail(&id->body_fetch, (EDListNode *)&fd);
-
- CAMEL_TRY {
- camel_imapp_driver_select(id, folder);
-
- ic = camel_imapp_engine_command_new(id->engine, "FETCH", NULL, "UID FETCH %t (BODY.PEEK[%t])", uid, section);
- camel_imapp_engine_command_queue(id->engine, ic);
- while (camel_imapp_engine_iterate(id->engine, ic)>0)
- ;
- camel_imapp_engine_command_free(id->engine, ic);
- imapp_driver_check(id);
- } CAMEL_CATCH(e) {
- /* FIXME: do exception properly */
- } CAMEL_DONE;
-
- e_dlist_remove((EDListNode *)&fd);
-
- return fd.data;
-}
-
-GPtrArray *
-camel_imapp_driver_list(CamelIMAPPDriver *id, const char *name, guint32 flags)
-{
- CamelIMAPPCommand * volatile ic;
- GPtrArray *res;
-
- g_assert(id->list_commands == NULL);
- g_assert(id->list_result == NULL);
-
- /* FIXME: make sure we only have a single list running at a time */
- /* sem_wait(id->list_sem); */
-
- /* FIXME: namespace stuff (done in store code?) */
-
- /* FIXME: if name != "", we need to also do list "name.%" (. == sep) */
-
- id->list_result = g_ptr_array_new();
- id->list_flags = flags;
- CAMEL_TRY {
- ic = camel_imapp_engine_command_new(id->engine, "LIST", NULL, "LIST \"\" %f", name[0]?name:"%");
- camel_imapp_engine_command_queue(id->engine, ic);
- while (ic) {
- while (camel_imapp_engine_iterate(id->engine, ic)>0)
- ;
- camel_imapp_engine_command_free(id->engine, ic);
-
- if (id->list_commands) {
- GSList *top = id->list_commands;
-
- id->list_commands = top->next;
- ic = top->data;
- g_slist_free_1(top);
- } else {
- ic = NULL;
- }
- }
- } CAMEL_CATCH(e) {
- GSList *top = id->list_commands;
- int i;
-
- camel_imapp_engine_command_free(id->engine, ic);
-
- while (top) {
- GSList *topn = top->next;
-
- camel_imapp_engine_command_free(id->engine, ic);
- g_slist_free_1(top);
- top = topn;
- }
- id->list_commands = NULL;
-
- res = id->list_result;
- for (i=0;i<res->len;i++)
- imap_free_list(res->pdata[i]);
- g_ptr_array_free(res, TRUE);
- id->list_result = NULL;
-
- camel_exception_throw_ex(e);
- } CAMEL_DONE;
-
- res = id->list_result;
- id->list_result = NULL;
-
- /* sem_post(id->list_sem); */
-
- return res;
-}
-
-static int
-driver_resp_list(CamelIMAPPEngine *ie, guint32 idx, CamelIMAPPDriver *id)
-{
- struct _list_info *linfo;
-
- /* FIXME: exceptions */
-
- linfo = imap_parse_list(ie->stream);
- printf("store list: '%s' ('%c')\n", linfo->name, linfo->separator);
- if (id->list_result) {
- if ((linfo->flags & CAMEL_FOLDER_NOINFERIORS) == 0
- && (id->list_flags & CAMEL_STORE_FOLDER_INFO_RECURSIVE)
- && linfo->separator) {
- int depth = 0;
- char *p = linfo->name;
- char c = linfo->separator;
-
- /* this is expensive ... but if we've listed this deep we're going slow anyway */
- while (*p && depth < 10) {
- if (*p == c)
- depth++;
- p++;
- }
-
- if (depth < 10
- && (linfo->name[0] == 0 || linfo->name[strlen(linfo->name)-1] != c)) {
- CamelIMAPPCommand *ic;
-
- ic = camel_imapp_engine_command_new(id->engine, "LIST", NULL, "LIST \"\" %t%c%%", linfo->name, c);
- id->list_commands = g_slist_prepend(id->list_commands, ic);
- camel_imapp_engine_command_queue(id->engine, ic);
- }
- }
- /* FIXME: dont add to list if name ends in separator */
- g_ptr_array_add(id->list_result, linfo);
- } else {
- g_warning("unexpected list response\n");
- imap_free_list(linfo);
- }
-
- return camel_imapp_engine_skip(ie);
-}
-
-/* ********************************************************************** */
-
-static void
-driver_status(CamelIMAPPEngine *ie, struct _status_info *sinfo, CamelIMAPPDriver *sdata)
-{
- printf("got status response ...\n");
- switch(sinfo->condition) {
- case IMAP_READ_WRITE:
- printf("folder is read-write\n");
- break;
- case IMAP_READ_ONLY:
- printf("folder is read-only\n");
- break;
- case IMAP_UIDVALIDITY:
- sdata->uidvalidity = sinfo->u.uidvalidity;
- break;
-#if 0
- /* not defined yet ... */
- case IMAP_UIDNEXT:
- printf("got uidnext for folder: %d\n", sinfo->u.uidnext);
- break;
-#endif
- case IMAP_UNSEEN:
- sdata->unseen = sinfo->u.unseen;
- break;
- case IMAP_PERMANENTFLAGS:
- sdata->permanentflags = sinfo->u.permanentflags;
- break;
- case IMAP_ALERT:
- printf("ALERT!: %s\n", sinfo->text);
- break;
- case IMAP_PARSE:
- printf("PARSE: %s\n", sinfo->text);
- break;
- default:
- break;
- }
-}
-
-static int
-driver_resp_exists(CamelIMAPPEngine *ie, guint32 id, CamelIMAPPDriver *sdata)
-{
- /* should this be an event instead? */
-
- sdata->exists = id;
-
- return camel_imapp_engine_skip(ie);
-}
-
-static int
-driver_resp_expunge(CamelIMAPPEngine *ie, guint32 id, CamelIMAPPDriver *sdata)
-{
- printf("got expunge response %u\n", id);
- if (sdata->folder != NULL) {
- CamelMessageInfo *info;
- CamelFolderSummary *summary = ((CamelFolder *)sdata->folder)->summary;
-
- info = camel_folder_summary_index(summary, id-1);
- if (info) {
- printf("expunging msg %d\n", id);
- camel_folder_summary_remove(summary, info);
- camel_folder_summary_info_free(summary, info);
- camel_folder_change_info_remove_uid(sdata->folder->changes, camel_message_info_uid(info));
- } else {
- printf("can not find msg %u from expunge\n", id);
- }
- }
-
- return camel_imapp_engine_skip(ie);
-}
-
-static int
-driver_resp_fetch(CamelIMAPPEngine *ie, guint32 id, CamelIMAPPDriver *sdata)
-{
- struct _fetch_info *finfo = NULL;
- CamelMessageInfo *info, *uinfo;
- unsigned int i;
- CamelFolderSummary *summary;
-
- printf("got fetch response %d\n", id);
-
- if (sdata->folder == NULL)
- goto done;
-
- summary = ((CamelFolder *)sdata->folder)->summary;
-
- finfo = imap_parse_fetch(ie->stream);
- imap_dump_fetch(finfo);
-
- info = camel_folder_summary_index(summary, id-1);
- if (info == NULL) {
- if (finfo->uid == NULL) {
- printf("got fetch response for currently unknown message %u\n", id);
- goto done;
- }
- uinfo = camel_folder_summary_uid(summary, finfo->uid);
- if (uinfo) {
- /* we have a problem ... index mismatch */
- printf("index mismatch, uid '%s' not at index '%u'\n",
- finfo->uid, id);
- camel_folder_summary_info_free(summary, uinfo);
- }
- /* pad out the summary till we have enough indexes */
- for (i=camel_folder_summary_count(summary);i<id;i++) {
- info = camel_folder_summary_info_new(summary);
- if (i == id-1) {
- printf("inserting new info @ %u\n", i);
- camel_message_info_set_uid(info, g_strdup(finfo->uid));
- } else {
- char uidtmp[32];
-
- sprintf(uidtmp, "blank-%u", i);
- camel_message_info_set_uid(info, g_strdup(uidtmp));
- printf("inserting empty uid %s\n", uidtmp);
- }
-
- camel_folder_summary_add(summary, info);
- }
- info = camel_folder_summary_index(summary, id-1);
- g_assert(info != NULL);
- } else {
- if (finfo->uid) {
- /* FIXME: need to handle blank-* uids, somehow */
- while (info && strcmp(camel_message_info_uid(info), finfo->uid) != 0) {
- printf("index mismatch, uid '%s' not at index '%u', got '%s' instead (removing)\n",
- finfo->uid, id, camel_message_info_uid(info));
-
- camel_folder_change_info_remove_uid(sdata->folder->changes, camel_message_info_uid(info));
- camel_folder_summary_remove(summary, info);
- camel_folder_summary_info_free(summary, info);
- info = camel_folder_summary_index(summary, id-1);
- }
- } else {
- printf("got info for unknown message %u\n", id);
- }
- }
-
- if (info) {
- if (finfo->got & FETCH_MINFO) {
- /* if we only use ENVELOPE? */
- camel_message_info_set_subject(info, g_strdup(camel_message_info_subject(finfo->minfo)));
- camel_message_info_set_from(info, g_strdup(camel_message_info_from(finfo->minfo)));
- camel_message_info_set_to(info, g_strdup(camel_message_info_to(finfo->minfo)));
- camel_message_info_set_cc(info, g_strdup(camel_message_info_cc(finfo->minfo)));
- info->date_sent = finfo->minfo->date_sent;
- camel_folder_change_info_add_uid(sdata->folder->changes, camel_message_info_uid(info));
- printf("adding change info uid '%s'\n", camel_message_info_uid(info));
- }
-
- if (finfo->got & FETCH_FLAGS) {
- if ((info->flags & CAMEL_IMAPP_SERVER_FLAGS) != (finfo->flags & CAMEL_IMAPP_SERVER_FLAGS)) {
- camel_folder_change_info_change_uid(sdata->folder->changes, camel_message_info_uid(info));
- info->flags = (info->flags & ~(CAMEL_IMAPP_SERVER_FLAGS)) | (finfo->flags & CAMEL_IMAPP_SERVER_FLAGS);
- camel_folder_summary_touch(summary);
- }
- ((CamelIMAPPMessageInfo *)info)->server_flags = finfo->flags & CAMEL_IMAPP_SERVER_FLAGS;
- }
-
- if ((finfo->got & (FETCH_BODY|FETCH_UID)) == (FETCH_BODY|FETCH_UID)) {
- struct _fetch_data *fd, *fn;
-
- fd = (struct _fetch_data *)sdata->body_fetch.head;
- fn = fd->next;
- while (fn) {
- if (!strcmp(finfo->uid, fd->uid) && !strcmp(finfo->section, fd->section)) {
- if (fd->data)
- camel_object_unref(fd->data);
- fd->data = finfo->body;
- camel_object_ref(fd->data);
- e_dlist_remove((EDListNode *)fd);
- e_dlist_addtail(&sdata->body_fetch_done, (EDListNode *)fd);
- break;
- }
- fd = fn;
- fn = fn->next;
- }
- }
-
- camel_folder_summary_info_free(summary, info);
- } else {
- printf("dont know what to do with message\n");
- }
- done:
- imap_free_fetch(finfo);
-
- return camel_imapp_engine_skip(ie);
-}
diff --git a/camel/providers/imapp/camel-imapp-driver.h b/camel/providers/imapp/camel-imapp-driver.h
deleted file mode 100644
index 3124700619..0000000000
--- a/camel/providers/imapp/camel-imapp-driver.h
+++ /dev/null
@@ -1,81 +0,0 @@
-
-#ifndef _CAMEL_IMAPP_DRIVER_H
-#define _CAMEL_IMAPP_DRIVER_H
-
-#include <camel/camel-object.h>
-#include "camel-imapp-stream.h"
-#include <e-util/e-msgport.h>
-
-#define CAMEL_IMAPP_DRIVER_TYPE (camel_imapp_driver_get_type ())
-#define CAMEL_IMAPP_DRIVER(obj) (CAMEL_CHECK_CAST((obj), CAMEL_IMAPP_DRIVER_TYPE, CamelIMAPPDriver))
-#define CAMEL_IMAPP_DRIVER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_IMAPP_DRIVER_TYPE, CamelIMAPPDriverClass))
-#define CAMEL_IS_IMAP_DRIVER(o) (CAMEL_CHECK_TYPE((o), CAMEL_IMAPP_DRIVER_TYPE))
-
-typedef struct _CamelIMAPPDriver CamelIMAPPDriver;
-typedef struct _CamelIMAPPDriverClass CamelIMAPPDriverClass;
-
-typedef int (*CamelIMAPPDriverFunc)(struct _CamelIMAPPDriver *driver, void *data);
-typedef struct _CamelSasl * (*CamelIMAPPSASLFunc)(struct _CamelIMAPPDriver *driver, void *data);
-typedef void (*CamelIMAPPLoginFunc)(struct _CamelIMAPPDriver *driver, char **login, char **pass, void *data);
-
-struct _CamelMimeMessage;
-
-struct _CamelIMAPPDriver {
- CamelObject parent_object;
-
- struct _CamelIMAPPEngine *engine;
-
- struct _CamelIMAPPFolder *folder;
-
- /* current folder stuff */
- GPtrArray *summary;
- guint32 uidvalidity;
- guint32 exists;
- guint32 recent;
- guint32 unseen;
- guint32 permanentflags;
-
- /* list stuff */
- GPtrArray *list_result;
- GSList *list_commands;
- guint32 list_flags;
-
- /* sem_t list_sem; for controlled access to list variables */
-
- /* this is so the node is always in a list - easier exception management */
- EDList body_fetch;
- EDList body_fetch_done;
-
- /* factory to get an appropriate sasl mech */
- CamelIMAPPSASLFunc get_sasl;
- void *get_sasl_data;
-
- /* callbacks, get login username/pass */
- CamelIMAPPLoginFunc get_login;
- void *get_login_data;
-};
-
-struct _CamelIMAPPDriverClass {
- CamelObjectClass parent_class;
-};
-
-CamelType camel_imapp_driver_get_type (void);
-
-CamelIMAPPDriver * camel_imapp_driver_new(CamelIMAPPStream *stream);
-
-void camel_imapp_driver_set_sasl_factory(CamelIMAPPDriver *id, CamelIMAPPSASLFunc get_sasl, void *sasl_data);
-void camel_imapp_driver_set_login_query(CamelIMAPPDriver *id, CamelIMAPPLoginFunc get_login, void *login_data);
-
-void camel_imapp_driver_login(CamelIMAPPDriver *id);
-
-void camel_imapp_driver_select(CamelIMAPPDriver *id, struct _CamelIMAPPFolder *folder);
-void camel_imapp_driver_update(CamelIMAPPDriver *id, struct _CamelIMAPPFolder *folder);
-void camel_imapp_driver_sync(CamelIMAPPDriver *id, gboolean expunge, struct _CamelIMAPPFolder *folder);
-
-struct _CamelStream * camel_imapp_driver_fetch(CamelIMAPPDriver *id, struct _CamelIMAPPFolder *folder, const char *uid, const char *body);
-GPtrArray * camel_imapp_driver_list(CamelIMAPPDriver *id, const char *name, guint32 flags);
-
-struct _CamelStream *camel_imapp_driver_get(CamelIMAPPDriver *id, struct _CamelIMAPPFolder *folder, const char *uid);
-void camel_imapp_driver_append(CamelIMAPPDriver *id, struct _CamelIMAPPFolder *folder, struct _CamelDataWrapper *);
-
-#endif
diff --git a/camel/providers/imapp/camel-imapp-engine.c b/camel/providers/imapp/camel-imapp-engine.c
deleted file mode 100644
index df14903c5a..0000000000
--- a/camel/providers/imapp/camel-imapp-engine.c
+++ /dev/null
@@ -1,1180 +0,0 @@
-
-#include "config.h"
-
-#include <stdio.h>
-#include <string.h>
-
-#include "camel-imapp-engine.h"
-#include "camel-imapp-stream.h"
-#include "camel-imapp-utils.h"
-#include "camel-imapp-exception.h"
-
-#include <camel/camel-folder-summary.h>
-#include <camel/camel-stream-mem.h>
-#include <camel/camel-stream-null.h>
-#include <camel/camel-data-wrapper.h>
-#include <camel/camel-sasl.h>
-
-#include <ctype.h>
-
-#define e(x)
-#define c(x) /* command build debug */
-
-static void imap_engine_command_addv(CamelIMAPPEngine *imap, CamelIMAPPCommand *ic, const char *fmt, va_list ap);
-static void imap_engine_command_complete(CamelIMAPPEngine *imap, CamelIMAPPCommand *ic);
-
-struct _handler {
- CamelIMAPPEngineFunc func;
- void *data;
- char name[1];
-};
-
-static void
-class_init(CamelIMAPPEngineClass *ieclass)
-{
- ieclass->tagprefix = 'A';
-
- camel_object_class_add_event((CamelObjectClass *)ieclass, "status", NULL);
-}
-
-static void
-object_init(CamelIMAPPEngine *ie, CamelIMAPPEngineClass *ieclass)
-{
- ie->handlers = g_hash_table_new(g_str_hash, g_str_equal);
- e_dlist_init(&ie->active);
- e_dlist_init(&ie->queue);
- e_dlist_init(&ie->done);
-
- ie->tagprefix = ieclass->tagprefix;
- ieclass->tagprefix++;
- if (ieclass->tagprefix > 'Z')
- ieclass->tagprefix = 'A';
- ie->tagprefix = 'A';
-
- ie->state = IMAP_ENGINE_DISCONNECT;
-}
-
-static void
-handler_free(void *key, void *mem, void *data)
-{
- g_free(mem);
-}
-
-static void
-object_finalise(CamelIMAPPEngine *ie, CamelIMAPPEngineClass *ieclass)
-{
- /* FIXME: need to free the commands ... */
- while (camel_imapp_engine_iterate(ie, NULL) > 0)
- ;
-
- g_hash_table_foreach(ie->handlers, (GHFunc)handler_free, NULL);
- g_hash_table_destroy(ie->handlers);
-}
-
-CamelType
-camel_imapp_engine_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (
- camel_object_get_type (),
- "CamelIMAPPEngine",
- sizeof (CamelIMAPPEngine),
- sizeof (CamelIMAPPEngineClass),
- (CamelObjectClassInitFunc) class_init,
- NULL,
- (CamelObjectInitFunc) object_init,
- (CamelObjectFinalizeFunc) object_finalise);
- }
-
- return type;
-}
-
-/* FIXME: check this, just taken from old code, not rfc */
-struct {
- char *name;
- guint32 flag;
-} capa_table[] = {
- { "IMAP4", IMAP_CAPABILITY_IMAP4 },
- { "IMAP4REV1", IMAP_CAPABILITY_IMAP4REV1 },
- { "STATUS", IMAP_CAPABILITY_STATUS } ,
- { "NAMESPACE", IMAP_CAPABILITY_NAMESPACE },
- { "UIDPLUS", IMAP_CAPABILITY_UIDPLUS },
- { "LITERAL+", IMAP_CAPABILITY_LITERALPLUS },
- { "STARTTLS", IMAP_CAPABILITY_STARTTLS },
-};
-
-
-/*
-capability_data ::= "CAPABILITY" SPACE [1#capability SPACE] "IMAP4rev1"
- [SPACE 1#capability]
- ;; IMAP4rev1 servers which offer RFC 1730
- ;; compatibility MUST list "IMAP4" as the first
- ;; capability.
-*/
-static int resp_capability(CamelIMAPPEngine *ie, guint32 id, void *data)
-{
- int tok, len, i;
- unsigned char *token, *p, c;
-
- /* FIXME: handle auth types */
-
- printf("got capability response:\n");
- while (1) {
- tok = camel_imapp_stream_token(ie->stream, &token, &len);
- switch(tok) {
- case IMAP_TOK_TOKEN:
- p = token;
- while ((c = *p))
- *p++ = toupper(c);
- case IMAP_TOK_INT:
- printf(" cap: '%s'\n", token);
- for (i=0;i<(int)(sizeof(capa_table)/sizeof(capa_table[0]));i++)
- if (strcmp(token, capa_table[i].name))
- ie->capa |= capa_table[i].flag;
- break;
- case '\n':
- return 0;
- case IMAP_TOK_ERROR:
- case IMAP_TOK_PROTOCOL:
- camel_imapp_engine_skip(ie);
- return -1;
- default:
- printf("Unknown Response token %02x '%c'\n", tok, isprint(tok)?tok:'.');
- }
- } while (tok != '\n');
-
- return 0;
-}
-
-/* expunge command, id is expunged seq number */
-/* message_data ::= nz_number SPACE ("EXPUNGE" /
- ("FETCH" SPACE msg_att)) */
-static int resp_expunge(CamelIMAPPEngine *ie, guint32 id, void *data)
-{
- printf("message expunged: %d\n", id);
-
- return camel_imapp_engine_skip(ie);
-}
-
-static int resp_flags(CamelIMAPPEngine *ie, guint32 id, void *data)
-{
- guint32 flags;
-
- imap_parse_flags(ie->stream, &flags);
-
- printf("flags: %08x\n", flags);
-
- return camel_imapp_engine_skip(ie);
-}
-
-/* exists count */
-static int resp_exists(CamelIMAPPEngine *ie, guint32 id, void *data)
-{
- printf("messages exist: %d\n", id);
-
- if (ie->select_response)
- ie->select_response->exists = id;
-
- return camel_imapp_engine_skip(ie);
-}
-
-static int resp_recent(CamelIMAPPEngine *ie, guint32 id, void *data)
-{
- printf("messages recent: %d\n", id);
-
- if (ie->select_response)
- ie->select_response->recent = id;
-
- return camel_imapp_engine_skip(ie);
-}
-
-static int resp_fetch(CamelIMAPPEngine *ie, guint32 id, void *data)
-{
- struct _fetch_info *finfo;
-
- finfo = imap_parse_fetch(ie->stream);
- imap_dump_fetch(finfo);
- imap_free_fetch(finfo);
-
- return camel_imapp_engine_skip(ie);
-}
-
-#if 0
-static int resp_list(CamelIMAPPEngine *ie, guint32 id, void *data)
-{
- struct _list_info *linfo;
-
- linfo = imap_parse_list(ie->stream);
- printf("list: '%s' (%c)\n", linfo->name, linfo->separator);
- imap_free_list(linfo);
-
- return camel_imapp_engine_skip(ie);
-}
-#endif
-
-CamelIMAPPEngine *
-camel_imapp_engine_new(CamelIMAPPStream *stream)
-{
- CamelIMAPPEngine * volatile engine;
-
- engine = CAMEL_IMAPP_ENGINE (camel_object_new (CAMEL_IMAPP_ENGINE_TYPE));
- engine->stream = stream;
- camel_object_ref((CamelObject *)stream);
-
- camel_imapp_engine_add_handler(engine, "CAPABILITY", resp_capability, engine);
-
- /* mailbox_data */
- camel_imapp_engine_add_handler(engine, "FLAGS", (CamelIMAPPEngineFunc)resp_flags, engine);
- camel_imapp_engine_add_handler(engine, "EXISTS", (CamelIMAPPEngineFunc)resp_exists, engine);
- camel_imapp_engine_add_handler(engine, "RECENT", (CamelIMAPPEngineFunc)resp_recent, engine);
-
-#if 0
- camel_imapp_engine_add_handler(engine, "LIST", (CamelIMAPPEngineFunc)resp_list, engine);
- camel_imapp_engine_add_handler(engine, "LSUB", (CamelIMAPPEngineFunc)resp_list, engine);
-#endif
- /* message_data */
- camel_imapp_engine_add_handler(engine, "EXPUNGE", (CamelIMAPPEngineFunc)resp_expunge, engine);
- camel_imapp_engine_add_handler(engine, "FETCH", (CamelIMAPPEngineFunc)resp_fetch, engine);
-
- /* TODO: move this to a driver:connect call? */
- CAMEL_TRY {
- unsigned char *token;
- unsigned int len;
- int tok;
-
- tok = camel_imapp_stream_token(stream, &token, &len);
- if (tok == '*') {
- struct _status_info *sinfo = imap_parse_status(stream);
-
- switch (sinfo->result) {
- case IMAP_OK:
- engine->state = IMAP_ENGINE_CONNECT;
- printf("Server connected ok: %s\n", sinfo->text);
- break;
- case IMAP_PREAUTH:
- printf("pre-authenticated ...\n");
- engine->state = IMAP_ENGINE_AUTH;
- break;
- default:
- imap_free_status(sinfo);
- camel_exception_throw(1, "Server refused connection: %s", sinfo->text);
- break;
- }
- imap_free_status(sinfo);
- } else {
- engine->state = IMAP_ENGINE_CONNECT;
- printf("unknwon server greeting, ignored\n");
- camel_imapp_engine_skip(engine);
- }
- camel_imapp_engine_capabilities(engine);
- } CAMEL_CATCH(ex) {
- printf("connection failed: %s\n", ex->desc);
- camel_object_unref((CamelObject *)engine);
- engine = NULL;
- } CAMEL_DONE;
-
- return engine;
-}
-
-void
-camel_imapp_engine_add_handler(CamelIMAPPEngine *imap, const char *response, CamelIMAPPEngineFunc func, void *data)
-{
- struct _handler *h;
- const unsigned char *p;
- unsigned char *o, c;
-
- h = g_malloc0(sizeof(*h) + strlen(response));
- h->func = func;
- h->data = data;
-
- p = response;
- o = h->name;
- while ((c = *p++))
- *o++ = toupper(c);
- *o = 0;
-
- g_hash_table_insert(imap->handlers, h->name, h);
-}
-
-int
-camel_imapp_engine_capabilities(CamelIMAPPEngine *ie)
-{
- CamelIMAPPCommand *ic;
-
- /* reset capabilities */
- ie->capa = 0;
-
- ic = camel_imapp_engine_command_new(ie, "CAPABILITY", NULL, "CAPABILITY");
- camel_imapp_engine_command_queue(ie, ic);
- while (camel_imapp_engine_iterate(ie, ic)>0)
- ;
- camel_imapp_engine_command_free(ie, ic);
-
- return 0;
-}
-
-/* skip the rest of the line of tokens */
-int
-camel_imapp_engine_skip(CamelIMAPPEngine *imap)
-{
- int tok;
- unsigned char *token;
- unsigned int len;
-
- do {
- tok = camel_imapp_stream_token(imap->stream, &token, &len);
- if (tok == IMAP_TOK_LITERAL) {
- camel_imapp_stream_set_literal(imap->stream, len);
- while ((tok = camel_imapp_stream_getl(imap->stream, &token, &len)) > 0) {
- printf("Skip literal data '%.*s'\n", (int)len, token);
- }
- }
- } while (tok != '\n' && tok >= 0);
-
- if (tok < 0)
- return -1;
-
- return 0;
-}
-
-/* handle any untagged responses */
-static int
-iterate_untagged(CamelIMAPPEngine *imap)
-{
- unsigned int id, len;
- unsigned char *token, *p, c;
- int tok;
- struct _handler *h;
- struct _status_info *sinfo;
-
- e(printf("got untagged response\n"));
- id = 0;
- tok = camel_imapp_stream_token(imap->stream, &token, &len);
- if (tok == IMAP_TOK_INT) {
- id = strtoul(token, NULL, 10);
- tok = camel_imapp_stream_token(imap->stream, &token, &len);
- }
-
- if (tok == '\n')
- camel_exception_throw(1, "truncated server response");
-
- e(printf("Have token '%s' id %d\n", token, id));
- p = token;
- while ((c = *p))
- *p++ = toupper(c);
-
- /* first, check for generic unsolicited response */
- h = g_hash_table_lookup(imap->handlers, token);
- if (h) {
- tok = h->func(imap, id, h->data);
- if (tok < 0)
- return tok;
- return 1;
- }
-
- /* TODO: apart from bye/preauth, these could be callbacks/events? */
-
- /* now, check for status responses */
- switch (imap_tokenise(token, len)) {
- case IMAP_BYE:
- case IMAP_OK:
- case IMAP_NO:
- case IMAP_BAD:
- case IMAP_PREAUTH:
- /* TODO: validate which ones of these can happen as unsolicited responses */
- /* TODO: handle bye/preauth differently */
- /* FIXME: free sinfo */
- camel_imapp_stream_ungettoken(imap->stream, tok, token, len);
- sinfo = imap_parse_status(imap->stream);
- camel_object_trigger_event(imap, "status", sinfo);
- imap_free_status(sinfo);
-#if 0
- switch(sinfo->condition) {
- case IMAP_READ_WRITE:
- printf("folder is read-write\n");
- break;
- case IMAP_READ_ONLY:
- printf("folder is read-only\n");
- break;
- case IMAP_UIDVALIDITY:
- if (imap->select_response)
- imap->select_response->uidvalidity = sinfo->u.uidvalidity;
- break;
-#if 0
- /* not defined yet ... */
- case IMAP_UIDNEXT:
- printf("got uidnext for folder: %d\n", sinfo->u.uidnext);
- break;
-#endif
- case IMAP_UNSEEN:
- if (imap->select_response)
- imap->select_response->unseen = sinfo->u.unseen;
- break;
- case IMAP_PERMANENTFLAGS:
- if (imap->select_response)
- imap->select_response->permanentflags = sinfo->u.permanentflags;
- break;
- case IMAP_ALERT:
- printf("ALERT!: %s\n", sinfo->text);
- break;
- case IMAP_PARSE:
- printf("PARSE: %s\n", sinfo->text);
- break;
- default:
- break;
- }
-#endif
- break;
- default:
- printf("unknown token: %s\n", token);
- camel_imapp_engine_skip(imap);
- /* unknown response, just ignore it */
- }
-
- return 1;
-}
-
-/* handle any continuation requests
- either data continuations, or auth continuation */
-int
-iterate_continuation(CamelIMAPPEngine *imap)
-{
- CamelIMAPPCommand *ic;
- CamelIMAPPCommandPart *cp;
-
- printf("got continuation response\n");
-
- ic = imap->literal;
- imap->literal = NULL;
- if (ic == NULL) {
- camel_imapp_engine_skip(imap);
- printf("got continuation response with no outstanding continuation requests?\n");
- return 1;
- }
-
- printf("got continuation response for data\n");
- cp = ic->current;
- switch(cp->type & CAMEL_IMAPP_COMMAND_MASK) {
- case CAMEL_IMAPP_COMMAND_DATAWRAPPER:
- printf("writing data wrapper to literal\n");
- camel_data_wrapper_write_to_stream((CamelDataWrapper *)cp->ob, (CamelStream *)imap->stream);
- break;
- case CAMEL_IMAPP_COMMAND_STREAM:
- printf("writing stream to literal\n");
- camel_stream_write_to_stream((CamelStream *)cp->ob, (CamelStream *)imap->stream);
- break;
- case CAMEL_IMAPP_COMMAND_AUTH: {
- CamelException *ex = camel_exception_new();
- char *resp;
- unsigned char *token;
- int tok, len;
-
- tok = camel_imapp_stream_token(imap->stream, &token, &len);
- resp = camel_sasl_challenge_base64((CamelSasl *)cp->ob, token, ex);
- if (camel_exception_is_set(ex))
- camel_exception_throw_ex(ex);
- camel_exception_free(ex);
-
- printf("got auth continuation, feeding token '%s' back to auth mech\n", resp);
-
- camel_stream_write((CamelStream *)imap->stream, resp, strlen(resp));
-
- /* we want to keep getting called until we get a status reponse from the server
- ignore what sasl tells us */
- imap->literal = ic;
-
- break; }
- default:
- /* should we just ignore? */
- camel_exception_throw(1, "continuation response for non-continuation request");
- }
-
- camel_imapp_engine_skip(imap);
-
- cp = cp->next;
- if (cp->next) {
- ic->current = cp;
- printf("next part of command \"A%05u: %s\"\n", ic->tag, cp->data);
- camel_stream_printf((CamelStream *)imap->stream, "%s\r\n", cp->data);
- if (cp->type & CAMEL_IMAPP_COMMAND_CONTINUATION) {
- imap->literal = ic;
- } else {
- g_assert(cp->next->next == NULL);
- }
- } else {
- printf("%p: queueing continuation\n", ic);
- camel_stream_printf((CamelStream *)imap->stream, "\r\n");
- }
-
- if (imap->literal == NULL) {
- ic = (CamelIMAPPCommand *)e_dlist_remhead(&imap->queue);
- if (ic) {
- printf("found outstanding op, queueing\n");
- camel_imapp_engine_command_queue(imap, ic);
- }
- }
-
- return 1;
-}
-
-/* handle a completion line */
-int
-iterate_completion(CamelIMAPPEngine *imap, unsigned char *token)
-{
- CamelIMAPPCommand *ic;
- unsigned int tag;
-
- if (token[0] != imap->tagprefix)
- camel_exception_throw(1, "Server sent unexpected response: %s", token);
-
- tag = strtoul(token+1, NULL, 10);
- ic = camel_imapp_engine_command_find_tag(imap, tag);
- if (ic) {
- printf("Got completion response for command %05u '%s'\n", ic->tag, ic->name);
- printf("%p: removing command from qwueue, we were at '%s'\n", ic, ic->current->data);
- printf("%p: removing command\n", ic);
- e_dlist_remove((EDListNode *)ic);
- e_dlist_addtail(&imap->done, (EDListNode *)ic);
- if (imap->literal == ic)
- imap->literal = NULL;
- ic->status = imap_parse_status(imap->stream);
- printf("got response code: %s\n", ic->status->text);
-
- /* TODO: remove this stuff and use a completion handler? */
- /* TODO: handle 'SELECT' command cleanup here */
- /* FIXME: have this use tokeniser, have this handle close/logout/select etc as well */
- /* ok response from login/authenticate, then we're in happy land */
- if ((!strcmp(ic->name, "LOGIN") || !strcmp(ic->name, "AUTHENTICATE"))
- && ic->status->result == IMAP_OK)
- imap->state = IMAP_ENGINE_AUTH;
-
- if (ic->complete)
- ic->complete(imap, ic, ic->complete_data);
- } else {
- camel_exception_throw(1, "got response tag unexpectedly: %s", token);
- }
-
- if (imap->literal != NULL) {
- printf("Warning: continuation command '%s' finished with outstanding continuation\n", imap->literal->name);
- ic = imap->literal;
- /* set the command complete with a failure code? */
- e_dlist_remove((EDListNode *)ic);
- e_dlist_addtail(&imap->done, (EDListNode *)ic);
- imap->literal = NULL;
- }
-
- ic = (CamelIMAPPCommand *)e_dlist_remhead(&imap->queue);
- if (ic) {
- printf("found outstanding op, queueing\n");
- camel_imapp_engine_command_queue(imap, ic);
- }
-
- return 1;
-}
-
-
-/* Do work if there's any to do */
-int
-camel_imapp_engine_iterate(CamelIMAPPEngine *imap, CamelIMAPPCommand *icwait)
-/* throws IO,PARSE exception */
-{
- unsigned int len;
- unsigned char *token;
- int tok;
-
- if ((icwait && icwait->status != NULL) || e_dlist_empty(&imap->active))
- return 0;
-
- /* handle exceptions here? */
-
- /* lock here? */
-
- tok = camel_imapp_stream_token(imap->stream, &token, &len);
- if (tok == '*')
- iterate_untagged(imap);
- else if (tok == IMAP_TOK_TOKEN)
- iterate_completion(imap, token);
- else if (tok == '+')
- iterate_continuation(imap);
- else
- camel_exception_throw(1, "unexpected server response: %s", token);
-
- if (e_dlist_empty(&imap->active))
- return 0;
-
- return 1;
-}
-
-CamelIMAPPCommand *
-camel_imapp_engine_command_new(CamelIMAPPEngine *imap, const char *name, const char *select, const char *fmt, ...)
-{
- CamelIMAPPCommand *ic;
- va_list ap;
-
- ic = g_malloc0(sizeof(*ic));
- ic->tag = imap->tag++;
- ic->name = name;
- ic->mem = (CamelStreamMem *)camel_stream_mem_new();
- ic->select = g_strdup(select);
- e_dlist_init(&ic->parts);
-
- if (fmt && fmt[0]) {
- va_start(ap, fmt);
- imap_engine_command_addv(imap, ic, fmt, ap);
- va_end(ap);
- }
-
- return ic;
-}
-
-void
-camel_imapp_engine_command_add(CamelIMAPPEngine *imap, CamelIMAPPCommand *ic, const char *fmt, ...)
-{
- va_list ap;
-
- g_assert(ic->mem); /* gets reset on queue */
-
- if (fmt && fmt[0]) {
- va_start(ap, fmt);
- imap_engine_command_addv(imap, ic, fmt, ap);
- va_end(ap);
- }
-}
-
-void
-camel_imapp_engine_command_complete(CamelIMAPPEngine *imap, struct _CamelIMAPPCommand *ic, CamelIMAPPCommandFunc func, void *data)
-{
- ic->complete = func;
- ic->complete_data = data;
-}
-
-/* FIXME: make imap command's refcounted */
-void
-camel_imapp_engine_command_free (CamelIMAPPEngine *imap, CamelIMAPPCommand *ic)
-{
- CamelIMAPPCommandPart *cp, *cn;
-
- if (ic == NULL)
- return;
-
- /* validity check - we cant' free items still in any queue ... */
- /* maybe we should just have another queue to keep them? */
- {
- CamelIMAPPCommand *iw;
- int found = 0;
-
- iw = (CamelIMAPPCommand *)imap->active.head;
- while (iw->next) {
- if (iw == ic) {
- found = 1;
- g_warning("command '%s' still in active queue", iw->name);
- break;
- }
- iw = iw->next;
- }
- iw = (CamelIMAPPCommand *)imap->queue.head;
- while (iw->next) {
- if (iw == ic) {
- found = 1;
- g_warning("command '%s' still in waiting queue", iw->name);
- break;
- }
- iw = iw->next;
- }
- iw = (CamelIMAPPCommand *)imap->done.head;
- while (iw->next) {
- if (iw == ic) {
- found = 1;
- break;
- }
- iw = iw->next;
- }
- if (!found) {
- g_warning("command '%s' not found anywhere", ic->name);
- abort();
- }
- }
-
- e_dlist_remove((EDListNode *)ic);
-
- if (ic->mem)
- camel_object_unref((CamelObject *)ic->mem);
- imap_free_status(ic->status);
- g_free(ic->select);
-
- cp = (CamelIMAPPCommandPart *)ic->parts.head;
- cn = cp->next;
- while (cn) {
- g_free(cp->data);
- if (cp->ob)
- camel_object_unref(cp->ob);
- g_free(cp);
- cp = cn;
- cn = cn->next;
- }
-
- g_free(ic);
-}
-
-/* FIXME: error handling */
-void
-camel_imapp_engine_command_queue(CamelIMAPPEngine *imap, CamelIMAPPCommand *ic)
-{
- CamelIMAPPCommandPart *cp;
-
- if (ic->mem)
- imap_engine_command_complete(imap, ic);
-
- /* FIXME: remove select stuff */
-
- /* see if we need to pre-queue a select command to select the right folder first */
- if (ic->select && (imap->last_select == NULL || strcmp(ic->select, imap->last_select) != 0)) {
- CamelIMAPPCommand *select;
-
- /* of course ... we can't do anything like store/search if we have to select
- first, because it'll mess up all the sequence numbers ... hrm ... bugger */
-
- select = camel_imapp_engine_command_new(imap, "SELECT", NULL, "SELECT %s", ic->select);
- g_free(imap->last_select);
- imap->last_select = g_strdup(ic->select);
- camel_imapp_engine_command_queue(imap, select);
- /* how does it get freed? handle inside engine? */
- }
-
- /* first, check if command can be sent yet ... queue if not */
- if (imap->literal != NULL) {
- printf("%p: queueing while literal active\n", ic);
- e_dlist_addtail(&imap->queue, (EDListNode *)ic);
- return;
- }
-
- cp = (CamelIMAPPCommandPart *)ic->parts.head;
- g_assert(cp);
- ic->current = cp;
-
- /* how to handle exceptions here? */
-
- printf("queueing command \"%c%05u %s\"\n", imap->tagprefix, ic->tag, cp->data);
- camel_stream_printf((CamelStream *)imap->stream, "%c%05u %s\r\n", imap->tagprefix, ic->tag, cp->data);
-
- if (cp->type & CAMEL_IMAPP_COMMAND_CONTINUATION) {
- printf("%p: active literal\n", ic);
- g_assert(cp->next);
- imap->literal = ic;
- e_dlist_addtail(&imap->active, (EDListNode *)ic);
- } else {
- printf("%p: active non-literal\n", ic);
- g_assert(cp->next && cp->next->next == NULL);
- e_dlist_addtail(&imap->active, (EDListNode *)ic);
- }
-}
-
-CamelIMAPPCommand *
-camel_imapp_engine_command_find (CamelIMAPPEngine *imap, const char *name)
-{
- CamelIMAPPCommand *ic, *in;
-
- ic = imap->literal;
- if (ic && strcmp(ic->name, name) == 0)
- return ic;
-
- /* first, try active */
- ic = (CamelIMAPPCommand *)imap->active.head;
- in = ic->next;
- while (in) {
- if (strcmp(ic->name, name) == 0)
- return ic;
- ic = in;
- in = in->next;
- }
-
- return NULL;
-}
-
-CamelIMAPPCommand *
-camel_imapp_engine_command_find_tag(CamelIMAPPEngine *imap, unsigned int tag)
-{
- CamelIMAPPCommand *ic, *in;
-
- ic = imap->literal;
- if (ic && ic->tag == tag)
- return ic;
-
- ic = (CamelIMAPPCommand *)imap->active.head;
- in = ic->next;
- while (in) {
- if (ic->tag == tag)
- return ic;
- ic = in;
- in = in->next;
- }
-
- return NULL;
-}
-
-/* ********************************************************************** */
-
-CamelIMAPPSelectResponse *
-camel_imapp_engine_select(CamelIMAPPEngine *imap, const char *name)
-{
- CamelIMAPPSelectResponse * volatile resp;
- CamelIMAPPCommand * volatile ic = NULL;
-
- resp = g_malloc0(sizeof(*resp));
- imap->select_response = resp;
-
- CAMEL_TRY {
- ic = camel_imapp_engine_command_new(imap, "SELECT", NULL, "SELECT %s", name);
- camel_imapp_engine_command_queue(imap, ic);
- while (camel_imapp_engine_iterate(imap, ic) > 0)
- ;
-
- if (ic->status->result != IMAP_OK)
- camel_exception_throw(1, "select failed: %s", ic->status->text);
- resp->status = ic->status;
- ic->status = NULL;
- } CAMEL_CATCH (e) {
- camel_imapp_engine_command_free(imap, ic);
- camel_imapp_engine_select_free(imap, resp);
- imap->select_response = NULL;
- camel_exception_throw_ex(e);
- } CAMEL_DONE;
-
- camel_imapp_engine_command_free(imap, ic);
- imap->select_response = NULL;
-
- return resp;
-}
-
-void
-camel_imapp_engine_select_free(CamelIMAPPEngine *imap, CamelIMAPPSelectResponse *select)
-{
- if (select) {
- imap_free_status(select->status);
- g_free(select);
- }
-}
-
-/* ********************************************************************** */
-
-static void
-imap_engine_command_add_part(CamelIMAPPEngine *imap, CamelIMAPPCommand *ic, camel_imapp_command_part_t type, CamelObject *ob)
-{
- CamelIMAPPCommandPart *cp;
- CamelStreamNull *null;
- unsigned int ob_size = 0;
-
- switch(type & CAMEL_IMAPP_COMMAND_MASK) {
- case CAMEL_IMAPP_COMMAND_DATAWRAPPER:
- case CAMEL_IMAPP_COMMAND_STREAM:
- null = (CamelStreamNull *)camel_stream_null_new();
- if ( (type & CAMEL_IMAPP_COMMAND_MASK) == CAMEL_IMAPP_COMMAND_DATAWRAPPER) {
- camel_data_wrapper_write_to_stream((CamelDataWrapper *)ob, (CamelStream *)null);
- } else {
- camel_stream_reset((CamelStream *)ob);
- camel_stream_write_to_stream((CamelStream *)ob, (CamelStream *)null);
- camel_stream_reset((CamelStream *)ob);
- }
- type |= CAMEL_IMAPP_COMMAND_CONTINUATION;
- camel_object_ref(ob);
- ob_size = null->written;
- camel_object_unref((CamelObject *)null);
- camel_stream_printf((CamelStream *)ic->mem, "{%u}", ob_size);
- break;
- case CAMEL_IMAPP_COMMAND_AUTH:
- /* we presume we'll need to get additional data only if we're not authenticated yet */
- camel_object_ref(ob);
- camel_stream_printf((CamelStream *)ic->mem, "%s", ((CamelSasl *)ob)->mech);
- if (!camel_sasl_authenticated((CamelSasl *)ob))
- type |= CAMEL_IMAPP_COMMAND_CONTINUATION;
- break;
- default:
- ob_size = 0;
- }
-
- cp = g_malloc0(sizeof(*cp));
- cp->type = type;
- cp->ob_size = ob_size;
- cp->ob = ob;
- cp->data_size = ic->mem->buffer->len;
- cp->data = g_malloc(cp->data_size+1);
- memcpy(cp->data, ic->mem->buffer->data, cp->data_size);
- cp->data[cp->data_size] = 0;
-
- camel_stream_reset((CamelStream *)ic->mem);
- /* FIXME: hackish? */
- g_byte_array_set_size(ic->mem->buffer, 0);
-
- e_dlist_addtail(&ic->parts, (EDListNode *)cp);
-}
-
-static int len(EDList *list)
-{
- int count = 0;
- EDListNode *n = list->head;
-
- while (n->next) {
- n = n->next;
- count++;
- }
- return count;
-}
-
-static void
-imap_engine_command_complete(CamelIMAPPEngine *imap, CamelIMAPPCommand *ic)
-{
- c(printf("completing command buffer is [%d] '%.*s'\n", ic->mem->buffer->len, (int)ic->mem->buffer->len, ic->mem->buffer->data));
- c(printf("command has %d parts\n", len(&ic->parts)));
- if (ic->mem->buffer->len > 0)
- imap_engine_command_add_part(imap, ic, CAMEL_IMAPP_COMMAND_SIMPLE, NULL);
-
- c(printf("command has %d parts\n", len(&ic->parts)));
-
- camel_object_unref((CamelObject *)ic->mem);
- ic->mem = NULL;
-}
-
-static void
-imap_engine_command_addv(CamelIMAPPEngine *imap, CamelIMAPPCommand *ic, const char *fmt, va_list ap)
-{
- const unsigned char *p, *ps, *start;
- unsigned char c;
- unsigned int width;
- char ch;
- int llong;
- int left;
- int fill;
- int zero;
- char *s;
- int d;
- long int l;
- guint32 f;
- CamelStream *S;
- CamelDataWrapper *D;
- CamelSasl *A;
- char buffer[16];
-
- c(printf("adding command, fmt = '%s'\n", fmt));
-
- p = fmt;
- ps = fmt;
- while ( ( c = *p++ ) ) {
- switch(c) {
- case '%':
- if (*p == '%') {
- camel_stream_write((CamelStream *)ic->mem, ps, p-ps);
- p++;
- ps = p;
- } else {
- camel_stream_write((CamelStream *)ic->mem, ps, p-ps-1);
- start = p-1;
- width = 0;
- left = FALSE;
- fill = FALSE;
- zero = FALSE;
- llong = FALSE;
-
- do {
- c = *p++;
- if (c == '0')
- zero = TRUE;
- else if ( c== '-')
- left = TRUE;
- else
- break;
- } while (c);
-
- do {
- if (isdigit(c))
- width = width * 10 + (c-'0');
- else
- break;
- } while ((c = *p++));
-
- if (c == 'l') {
- llong = TRUE;
- c = *p++;
- }
-
- switch(c) {
- case 'A': /* auth object - sasl auth, treat as special kind of continuation */
- A = va_arg(ap, CamelSasl *);
- imap_engine_command_add_part(imap, ic, CAMEL_IMAPP_COMMAND_AUTH, (CamelObject *)A);
- break;
- case 'S': /* stream */
- S = va_arg(ap, CamelStream *);
- c(printf("got stream '%p'\n", S));
- imap_engine_command_add_part(imap, ic, CAMEL_IMAPP_COMMAND_STREAM, (CamelObject *)S);
- break;
- case 'D': /* datawrapper */
- D = va_arg(ap, CamelDataWrapper *);
- c(printf("got data wrapper '%p'\n", D));
- imap_engine_command_add_part(imap, ic, CAMEL_IMAPP_COMMAND_DATAWRAPPER, (CamelObject *)D);
- break;
- case 't': /* token */
- s = va_arg(ap, char *);
- camel_stream_write((CamelStream *)ic->mem, s, strlen(s));
- break;
- case 's': /* simple string */
- s = va_arg(ap, char *);
- c(printf("got string '%s'\n", s));
- /* FIXME: escpae chars, convert to literal or literal+, etc */
- camel_stream_printf((CamelStream *)ic->mem, "\"%s\"", s);
- break;
- case 'f': /* imap folder name */
- s = va_arg(ap, char *);
- c(printf("got folder '%s'\n", s));
- /* FIXME: encode folder name */
- /* FIXME: namespace? */
- camel_stream_printf((CamelStream *)ic->mem, "\"%s\"", s?s:"");
- break;
- case 'F': /* IMAP flags set */
- f = va_arg(ap, guint32);
- imap_write_flags((CamelStream *)ic->mem, f);
- break;
- case 'c':
- d = va_arg(ap, int);
- ch = d;
- camel_stream_write((CamelStream *)ic->mem, &ch, 1);
- break;
- case 'd': /* int/unsigned */
- case 'u':
- if (llong) {
- l = va_arg(ap, long int);
- c(printf("got long int '%d'\n", (int)l));
- memcpy(buffer, start, p-start);
- buffer[p-start] = 0;
- camel_stream_printf((CamelStream *)ic->mem, buffer, l);
- } else {
- d = va_arg(ap, int);
- c(printf("got int '%d'\n", d));
- memcpy(buffer, start, p-start);
- buffer[p-start] = 0;
- camel_stream_printf((CamelStream *)ic->mem, buffer, d);
- }
- break;
- }
-
- ps = p;
- }
- break;
- case '\\': /* only for \\ really, we dont support \n\r etc at all */
- c = *p;
- if (c) {
- g_assert(c == '\\');
- camel_stream_write((CamelStream *)ic->mem, ps, p-ps);
- p++;
- ps = p;
- }
- }
- }
-
- camel_stream_write((CamelStream *)ic->mem, ps, p-ps-1);
-}
-
-
-/* here temporarily while its experimental */
-
-
-#ifdef ENABLE_THREADS
-#include <pthread.h>
-
-static pthread_key_t handler_key = 0;
-
-void camel_exception_setup(void)
-{
- pthread_key_create(&handler_key, NULL);
-}
-
-#else
-/* this is per-thread in threaded mode */
-static struct _CamelExceptionEnv *handler = NULL;
-
-void camel_exception_setup(void)
-{
-}
-#endif
-
-void
-camel_exception_try(struct _CamelExceptionEnv *env)
-{
-#ifdef ENABLE_THREADS
- struct _CamelExceptionEnv *handler;
-
- handler = pthread_getspecific(handler_key);
-#endif
- env->parent = handler;
- handler = env;
- env->ex = NULL;
-
-#ifdef ENABLE_THREADS
- pthread_setspecific(handler_key, handler);
-#endif
-}
-
-void
-camel_exception_throw_ex(CamelException *ex)
-{
- struct _CamelExceptionEnv *env;
-#ifdef ENABLE_THREADS
- struct _CamelExceptionEnv *handler;
-
- handler = pthread_getspecific(handler_key);
-#endif
- printf("throwing exception '%s'\n", ex->desc);
-
- env = handler;
- if (env != NULL) {
- env->ex = ex;
- handler = env->parent;
-#ifdef ENABLE_THREADS
- pthread_setspecific(handler_key, handler);
-#endif
- longjmp(env->env, ex->id);
- } else {
- g_warning("Uncaught exception: %s\n", ex->desc);
- /* we just crash and burn, this is a code problem */
- /* we dont use g_assert_not_reached() since its not a noreturn function */
- abort();
- }
-}
-
-void
-camel_exception_throw(int id, char *fmt, ...)
-{
- CamelException *ex;
- va_list ap;
-
- ex = camel_exception_new();
- ex->id = id;
- va_start(ap, fmt);
- ex->desc = g_strdup_vprintf(fmt, ap);
- va_end(ap);
-
- camel_exception_throw_ex(ex);
-}
-
-void
-camel_exception_drop(struct _CamelExceptionEnv *env)
-{
-#ifdef ENABLE_THREADS
- pthread_setspecific(handler_key, env->parent);
-#else
- handler = env->parent;
-#endif
-}
-
-void
-camel_exception_done(struct _CamelExceptionEnv *env)
-{
-#ifdef ENABLE_THREADS
- pthread_setspecific(handler_key, env->parent);
-#else
- handler = env->parent;
-#endif
- if (env->ex != NULL) {
- camel_exception_free(env->ex);
- }
-}
diff --git a/camel/providers/imapp/camel-imapp-engine.h b/camel/providers/imapp/camel-imapp-engine.h
deleted file mode 100644
index 5f74d0654a..0000000000
--- a/camel/providers/imapp/camel-imapp-engine.h
+++ /dev/null
@@ -1,155 +0,0 @@
-
-#ifndef _CAMEL_IMAPP_ENGINE_H
-#define _CAMEL_IMAPP_ENGINE_H
-
-#include <camel/camel-object.h>
-
-#include "camel-imapp-stream.h"
-#include <e-util/e-msgport.h>
-#include "camel-imapp-folder.h"
-
-#define CAMEL_IMAPP_ENGINE_TYPE (camel_imapp_engine_get_type ())
-#define CAMEL_IMAPP_ENGINE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_IMAPP_ENGINE_TYPE, CamelIMAPPEngine))
-#define CAMEL_IMAPP_ENGINE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_IMAPP_ENGINE_TYPE, CamelIMAPPEngineClass))
-#define CAMEL_IS_IMAP_ENGINE(o) (CAMEL_CHECK_TYPE((o), CAMEL_IMAPP_ENGINE_TYPE))
-
-typedef struct _CamelIMAPPEngine CamelIMAPPEngine;
-typedef struct _CamelIMAPPEngineClass CamelIMAPPEngineClass;
-
-typedef struct _CamelIMAPPCommandPart CamelIMAPPCommandPart;
-typedef struct _CamelIMAPPCommand CamelIMAPPCommand;
-
-typedef enum {
- CAMEL_IMAPP_COMMAND_SIMPLE = 0,
- CAMEL_IMAPP_COMMAND_DATAWRAPPER,
- CAMEL_IMAPP_COMMAND_STREAM,
- CAMEL_IMAPP_COMMAND_AUTH,
- CAMEL_IMAPP_COMMAND_MASK = 0xff,
- CAMEL_IMAPP_COMMAND_CONTINUATION = 0x8000 /* does this command expect continuation? */
-} camel_imapp_command_part_t;
-
-struct _CamelIMAPPCommandPart {
- struct _CamelIMAPPCommandPart *next;
- struct _CamelIMAPPCommandPart *prev;
-
- struct _CamelIMAPPCommand *parent;
-
- int data_size;
- char *data;
-
- camel_imapp_command_part_t type;
-
- int ob_size;
- CamelObject *ob;
-};
-
-typedef int (*CamelIMAPPEngineFunc)(struct _CamelIMAPPEngine *engine, guint32 id, void *data);
-typedef void (*CamelIMAPPCommandFunc)(struct _CamelIMAPPEngine *engine, struct _CamelIMAPPCommand *, void *data);
-
-/* FIXME: make this refcounted */
-struct _CamelIMAPPCommand {
- struct _CamelIMAPPCommand *next;
- struct _CamelIMAPPCommand *prev;
-
- const char *name; /* command name/type (e.g. FETCH) */
-
- /* FIXME: remove this select stuff */
- char *select; /* if we need to run against a specific folder */
- struct _status_info *status; /* status for command, indicates it is complete if != NULL */
-
- unsigned int tag;
-
- struct _CamelStreamMem *mem; /* for building the part */
- EDList parts;
- CamelIMAPPCommandPart *current;
-
- CamelIMAPPCommandFunc complete;
- void *complete_data;
-};
-
-typedef struct _CamelIMAPPSelectResponse CamelIMAPPSelectResponse;
-
-struct _CamelIMAPPSelectResponse {
- struct _status_info *status;
- guint32 exists;
- guint32 recent;
- guint32 uidvalidity;
- guint32 unseen;
- guint32 permanentflags;
-};
-
-enum {
- IMAP_CAPABILITY_IMAP4 = (1 << 0),
- IMAP_CAPABILITY_IMAP4REV1 = (1 << 1),
- IMAP_CAPABILITY_STATUS = (1 << 2),
- IMAP_CAPABILITY_NAMESPACE = (1 << 3),
- IMAP_CAPABILITY_UIDPLUS = (1 << 4),
- IMAP_CAPABILITY_LITERALPLUS = (1 << 5),
- IMAP_CAPABILITY_STARTTLS = (1 << 6),
-};
-
-/* currently selected states */
-typedef enum _camel_imapp_engine_state_t {
- IMAP_ENGINE_DISCONNECT, /* only happens during shutdown */
- IMAP_ENGINE_CONNECT, /* connected, not authenticated */
- IMAP_ENGINE_AUTH, /* connected, and authenticated */
- IMAP_ENGINE_SELECT, /* and selected, select holds selected folder */
-} camel_imapp_engine_state_t;
-
-struct _CamelIMAPPEngine {
- CamelObject parent_object;
-
- CamelIMAPPStream *stream;
-
- camel_imapp_engine_state_t state;
-
- guint32 capa; /* capabilities for this server, refresh with :capabilities() */
-
- GHashTable *handlers;
-
- unsigned char tagprefix; /* out tag prefix 'A' 'B' ... 'Z' */
- unsigned int tag; /* next command tag */
-
- char *select; /* *currently* selected folder */
- char *last_select; /* last selected or to-be selected folder (e.g. outstanding queued select) */
- CamelIMAPPCommand *literal;/* current literal op */
- EDList active; /* active queue */
- EDList queue; /* outstanding queue */
- EDList done; /* done queue, awaiting reclamation */
-
- /* keep track of running a select */
- struct _CamelIMAPPSelectResponse *select_response;
-};
-
-struct _CamelIMAPPEngineClass {
- CamelObjectClass parent_class;
-
- unsigned char tagprefix;
-
- /* Events:
- status(struct _status_info *);
- */
-};
-
-CamelType camel_imapp_engine_get_type (void);
-
-CamelIMAPPEngine *camel_imapp_engine_new(CamelIMAPPStream *stream);
-
-void camel_imapp_engine_add_handler(CamelIMAPPEngine *imap, const char *response, CamelIMAPPEngineFunc func, void *data);
-int camel_imapp_engine_iterate(CamelIMAPPEngine *imap, CamelIMAPPCommand *wait); /* throws PARSE,IO exception */
-int camel_imapp_engine_skip(CamelIMAPPEngine *imap);
-int camel_imapp_engine_capabilities(CamelIMAPPEngine *imap);
-
-CamelIMAPPCommand *camel_imapp_engine_command_new (CamelIMAPPEngine *imap, const char *name, const char *select, const char *fmt, ...);
-void camel_imapp_engine_command_complete(CamelIMAPPEngine *imap, struct _CamelIMAPPCommand *, CamelIMAPPCommandFunc func, void *data);
-void camel_imapp_engine_command_add (CamelIMAPPEngine *imap, CamelIMAPPCommand *ic, const char *fmt, ...);
-void camel_imapp_engine_command_free (CamelIMAPPEngine *imap, CamelIMAPPCommand *ic);
-void camel_imapp_engine_command_queue(CamelIMAPPEngine *imap, CamelIMAPPCommand *ic); /* throws IO exception */
-CamelIMAPPCommand *camel_imapp_engine_command_find (CamelIMAPPEngine *imap, const char *name);
-CamelIMAPPCommand *camel_imapp_engine_command_find_tag(CamelIMAPPEngine *imap, unsigned int tag);
-
-/* util functions */
-CamelIMAPPSelectResponse *camel_imapp_engine_select(CamelIMAPPEngine *imap, const char *name);
-void camel_imapp_engine_select_free(CamelIMAPPEngine *imap, CamelIMAPPSelectResponse *select);
-
-#endif
diff --git a/camel/providers/imapp/camel-imapp-exception.h b/camel/providers/imapp/camel-imapp-exception.h
deleted file mode 100644
index 5e18b6c815..0000000000
--- a/camel/providers/imapp/camel-imapp-exception.h
+++ /dev/null
@@ -1,35 +0,0 @@
-
-/* This implements 'real' exceptions that work a bit like c++/java exceptions */
-
-/* Still experimental code */
-
-#ifndef __CAMEL_IMAPP_EXCEPTION_H
-#define __CAMEL_IMAPP_EXCEPTION_H
-
-#include <setjmp.h>
-#include "camel/camel-exception.h"
-
-struct _CamelExceptionEnv {
- struct _CamelExceptionEnv *parent;
- CamelException *ex;
- jmp_buf env;
-};
-
-#define CAMEL_TRY { struct _CamelExceptionEnv __env; camel_exception_try(&__env); if (setjmp(__env.env) == 0)
-#define CAMEL_IGNORE camel_exception_done(&__env); }
-#define CAMEL_CATCH(x) { CamelException *x; x=__env.ex; if (x != NULL)
-#define CAMEL_DONE } camel_exception_done(&__env); }
-#define CAMEL_DROP() camel_exception_drop(&__env)
-
-void camel_exception_setup(void);
-
-/* internal functions, use macro's above */
-void camel_exception_try(struct _CamelExceptionEnv *env);
-void camel_exception_done(struct _CamelExceptionEnv *env);
-void camel_exception_drop(struct _CamelExceptionEnv *env);
-
-/* user functions */
-void camel_exception_throw_ex(CamelException *ex) __attribute__ ((noreturn));
-void camel_exception_throw(int id, char *fmt, ...) __attribute__ ((noreturn));
-
-#endif
diff --git a/camel/providers/imapp/camel-imapp-fetch-stream.c b/camel/providers/imapp/camel-imapp-fetch-stream.c
deleted file mode 100644
index bf18aac57b..0000000000
--- a/camel/providers/imapp/camel-imapp-fetch-stream.c
+++ /dev/null
@@ -1,183 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; fill-column: 160 -*-
- *
- * 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <errno.h>
-
-#include <glib.h>
-
-#include <camel/camel-stream-mem.h>
-
-#include "camel-imapp-stream.h"
-#include "camel-imapp-exception.h"
-
-#define t(x)
-#define io(x) x
-
-static CamelObjectClass *parent_class = NULL;
-
-/* Returns the class for a CamelStream */
-#define CS_CLASS(so) CAMEL_IMAPP_FETCH_STREAM_CLASS(CAMEL_OBJECT_GET_CLASS(so))
-
-static ssize_t
-stream_read(CamelStream *stream, char *buffer, size_t n)
-{
- CamelIMAPPFetchStream *is = (CamelIMAPPFetchStream *)stream;
- ssize_t max;
-
- /* make sure we have all the data read in */
- while (camel_imapp_engine_iterate(is->engine, is->command)>0)
- ;
-
- if (is->literal == 0 || n == 0)
- return 0;
-
- max = is->end - is->ptr;
- if (max > 0) {
- max = MIN(max, is->literal);
- max = MIN(max, n);
- memcpy(buffer, is->ptr, max);
- is->ptr += max;
- } else {
- max = MIN(is->literal, n);
- max = camel_stream_read(is->source, buffer, max);
- if (max <= 0)
- return max;
- }
-
- is->literal -= max;
-
- return max;
-}
-
-static ssize_t
-stream_write(CamelStream *stream, const char *buffer, size_t n)
-{
- CamelIMAPPFetchStream *is = (CamelIMAPPFetchStream *)stream;
-
- return camel_stream_write(is->source, buffer, n);
-}
-
-static int
-stream_close(CamelStream *stream)
-{
- /* nop? */
- return 0;
-}
-
-static int
-stream_flush(CamelStream *stream)
-{
- /* nop? */
- return 0;
-}
-
-static gboolean
-stream_eos(CamelStream *stream)
-{
- CamelIMAPPFetchStream *is = (CamelIMAPPFetchStream *)stream;
-
- return is->literal == 0;
-}
-
-static int
-stream_reset(CamelStream *stream)
-{
- /* nop? reset literal mode? */
- return 0;
-}
-
-static void
-camel_imapp_fetch_stream_class_init (CamelStreamClass *camel_imapp_fetch_stream_class)
-{
- CamelStreamClass *camel_stream_class = (CamelStreamClass *)camel_imapp_fetch_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;
-}
-
-static void
-camel_imapp_fetch_stream_init(CamelIMAPPFetchStream *is, CamelIMAPPFetchStreamClass *isclass)
-{
- ;
-}
-
-static void
-camel_imapp_fetch_stream_finalise(CamelIMAPPFetchStream *is)
-{
- if (is->engine)
- camel_object_unref(is->engine);
-}
-
-CamelType
-camel_imapp_fetch_stream_get_type (void)
-{
- static CamelType camel_imapp_fetch_stream_type = CAMEL_INVALID_TYPE;
-
- if (camel_imapp_fetch_stream_type == CAMEL_INVALID_TYPE) {
- setup_table();
- camel_imapp_fetch_stream_type = camel_type_register( camel_stream_get_type(),
- "CamelIMAPPFetchStream",
- sizeof( CamelIMAPPFetchStream ),
- sizeof( CamelIMAPPFetchStreamClass ),
- (CamelObjectClassInitFunc) camel_imapp_fetch_stream_class_init,
- NULL,
- (CamelObjectInitFunc) camel_imapp_fetch_stream_init,
- (CamelObjectFinalizeFunc) camel_imapp_fetch_stream_finalise );
- }
-
- return camel_imapp_fetch_stream_type;
-}
-
-/**
- * camel_imapp_fetch_stream_new:
- *
- * Return value: the stream
- **/
-CamelStream *
-camel_imapp_fetch_stream_new(CamelIMAPPEngine *ie, const char *uid, const char *body)
-{
- CamelIMAPPFetchStream *is;
-
- is = (CamelIMAPPFetchStream *)camel_object_new(camel_imapp_fetch_stream_get_type ());
- is->engine = ie;
- camel_object_ref(ie);
-
- is->command = camel_imapp_engine_command_new(ie, "FETCH", NULL, "FETCH %t (BODY[%t]<0.4096>", uid, body);
- camel_imapp_engine_command_queue(ie, command);
-
- return (CamelStream *)is;
-}
-
diff --git a/camel/providers/imapp/camel-imapp-fetch-stream.h b/camel/providers/imapp/camel-imapp-fetch-stream.h
deleted file mode 100644
index c9281ff64f..0000000000
--- a/camel/providers/imapp/camel-imapp-fetch-stream.h
+++ /dev/null
@@ -1,47 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_IMAPP_FETCH_STREAM_H
-#define _CAMEL_IMAPP_FETCH_STREAM_H
-
-#include <camel/camel-stream.h>
-
-#define CAMEL_IMAPP_FETCH_STREAM(obj) CAMEL_CHECK_CAST (obj, camel_imapp_fetch_stream_get_type (), CamelIMAPPFetchStream)
-#define CAMEL_IMAPP_FETCH_STREAM_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_imapp_fetch_stream_get_type (), CamelIMAPPFetchStreamClass)
-#define CAMEL_IS_IMAP_FETCH_STREAM(obj) CAMEL_CHECK_TYPE (obj, camel_imapp_fetch_stream_get_type ())
-
-typedef struct _CamelIMAPPFetchStreamClass CamelIMAPPFetchStreamClass;
-typedef struct _CamelIMAPPFetchStream CamelIMAPPFetchStream;
-
-struct _CamelIMAPPFetchStream {
- CamelStream parent;
-
- struct _CamelIMAPPEngine *engine;
-};
-
-struct _CamelIMAPPFetchStreamClass {
- CamelStreamClass parent_class;
-};
-
-CamelType camel_imapp_fetch_stream_get_type (void);
-
-CamelStream *camel_imapp_fetch_stream_new (struct _CamelIMAPPEngine *src, const char *uid, const char *spec);
-
-#endif /* ! _CAMEL_IMAPP_FETCH_STREAM_H */
diff --git a/camel/providers/imapp/camel-imapp-folder.c b/camel/providers/imapp/camel-imapp-folder.c
deleted file mode 100644
index 967ab541f6..0000000000
--- a/camel/providers/imapp/camel-imapp-folder.c
+++ /dev/null
@@ -1,269 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-imap-folder.c : class for a imap folder */
-
-/*
- * Authors: Michael Zucchi <notzed@ximian.com>
- *
- * Copyright (C) 2002 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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/camel-exception.h"
-#include "camel/camel-stream-mem.h"
-#include "camel/camel-stream-filter.h"
-#include "camel/camel-mime-message.h"
-#include "camel/camel-operation.h"
-#include "camel/camel-data-cache.h"
-#include "camel/camel-session.h"
-#include "camel/camel-file-utils.h"
-
-#include "camel-imapp-store.h"
-#include "camel-imapp-folder.h"
-#include "camel-imapp-summary.h"
-#include "camel-imapp-exception.h"
-
-#include <e-util/md5-utils.h>
-
-#include <stdlib.h>
-#include <string.h>
-
-#define d(x)
-
-#define CF_CLASS(o) (CAMEL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(o)))
-static CamelFolderClass *parent_class;
-
-static void imap_finalize (CamelObject *object);
-static void imap_refresh_info (CamelFolder *folder, CamelException *ex);
-static void imap_sync (CamelFolder *folder, gboolean expunge, CamelException *ex);
-static CamelMimeMessage *imap_get_message (CamelFolder *folder, const char *uid, CamelException *ex);
-
-static void
-imap_folder_class_init (CamelIMAPPFolderClass *camel_imapp_folder_class)
-{
- CamelFolderClass *camel_folder_class = CAMEL_FOLDER_CLASS(camel_imapp_folder_class);
-
- parent_class = CAMEL_FOLDER_CLASS(camel_folder_get_type());
-
- /* virtual method overload */
- camel_folder_class->refresh_info = imap_refresh_info;
- camel_folder_class->sync = imap_sync;
-
- camel_folder_class->get_message = imap_get_message;
- /*camel_folder_class->set_message_flags = imap_set_message_flags;*/
-}
-
-static void
-imap_folder_init(CamelObject *o, CamelObjectClass *klass)
-{
- CamelFolder *folder = (CamelFolder *)o;
- CamelIMAPPFolder *ifolder = (CamelIMAPPFolder *)o;
-
- folder->folder_flags |= (CAMEL_FOLDER_HAS_SUMMARY_CAPABILITY |
- CAMEL_FOLDER_HAS_SEARCH_CAPABILITY);
-
- folder->permanent_flags = CAMEL_MESSAGE_ANSWERED |
- CAMEL_MESSAGE_DELETED | CAMEL_MESSAGE_DRAFT |
- CAMEL_MESSAGE_FLAGGED | CAMEL_MESSAGE_SEEN | CAMEL_MESSAGE_USER;
-
- /* FIXME: this is just a skeleton */
-
- ifolder->changes = camel_folder_change_info_new();
-}
-
-CamelType
-camel_imapp_folder_get_type (void)
-{
- static CamelType camel_imapp_folder_type = CAMEL_INVALID_TYPE;
-
- if (!camel_imapp_folder_type) {
- camel_imapp_folder_type = camel_type_register (CAMEL_FOLDER_TYPE, "CamelIMAPPFolder",
- sizeof (CamelIMAPPFolder),
- sizeof (CamelIMAPPFolderClass),
- (CamelObjectClassInitFunc) imap_folder_class_init,
- NULL,
- imap_folder_init,
- (CamelObjectFinalizeFunc) imap_finalize);
- }
-
- return camel_imapp_folder_type;
-}
-
-void
-imap_finalize (CamelObject *object)
-{
- CamelIMAPPFolder *folder = (CamelIMAPPFolder *)object;
-
- camel_folder_change_info_free(folder->changes);
-}
-
-CamelFolder *
-camel_imapp_folder_new(CamelStore *store, const char *path)
-{
- CamelFolder *folder;
- char *root;
-
- d(printf("opening imap folder '%s'\n", path));
-
- folder = CAMEL_FOLDER (camel_object_new (CAMEL_IMAPP_FOLDER_TYPE));
- camel_folder_construct(folder, store, path, path);
-
- ((CamelIMAPPFolder *)folder)->raw_name = g_strdup(path);
-
- folder->summary = camel_imapp_summary_new();
-
- root = camel_session_get_storage_path(((CamelService *)store)->session, (CamelService *)store, NULL);
- if (root) {
- char *base = g_build_filename(root, path, NULL);
- char *file = g_build_filename(base, ".ev-summary", NULL);
-
- camel_mkdir(base, 0777);
- g_free(base);
-
- camel_folder_summary_set_filename(folder->summary, file);
- printf("loading summary from '%s' (root=%s)\n", file, root);
- g_free(file);
- camel_folder_summary_load(folder->summary);
- g_free(root);
- }
-
- return folder;
-}
-
-void
-camel_imapp_folder_open(CamelIMAPPFolder *folder, CamelException *ex)
-{
- /* */
-}
-
-void
-camel_imapp_folder_delete(CamelIMAPPFolder *folder, CamelException *ex)
-{
-}
-
-void
-camel_imapp_folder_rename(CamelIMAPPFolder *folder, const char *new, CamelException *ex)
-{
-}
-
-void
-camel_imapp_folder_close(CamelIMAPPFolder *folder, CamelException *ex)
-{
-}
-
-static void
-imap_refresh_info (CamelFolder *folder, CamelException *ex)
-{
- printf("imapp refresh info?\n");
-}
-
-static void
-imap_sync (CamelFolder *folder, gboolean expunge, CamelException *ex)
-{
- camel_imapp_driver_sync(((CamelIMAPPStore *)(folder->parent_store))->driver, expunge, (CamelIMAPPFolder *) folder);
-}
-
-static CamelMimeMessage *
-imap_get_message (CamelFolder *folder, const char *uid, CamelException *ex)
-{
- CamelMimeMessage * volatile msg = NULL;
- CamelStream * volatile stream = NULL;
-
- printf("get message '%s'\n", uid);
-
- CAMEL_TRY {
- /* simple implementation, just get whole message in 1 go */
- stream = camel_imapp_driver_fetch(((CamelIMAPPStore *)(folder->parent_store))->driver, (CamelIMAPPFolder *)folder, uid, "");
- camel_stream_reset(stream);
- msg = camel_mime_message_new();
- if (camel_data_wrapper_construct_from_stream((CamelDataWrapper *)msg, stream) != -1) {
- /* do we care? */
- }
- } CAMEL_CATCH(e) {
- if (msg)
- camel_object_unref(msg);
- msg = NULL;
- camel_exception_xfer(ex, e);
- } CAMEL_DONE;
-
- if (stream)
- camel_object_unref(stream);
-
- return msg;
-}
-
-
-/* Algorithm for selecting a folder:
-
- - If uidvalidity == old uidvalidity
- and exsists == old exists
- and recent == old recent
- and unseen == old unseen
- Assume our summary is correct
- for each summary item
- mark the summary item as 'old/not updated'
- rof
- fetch flags from 1:*
- for each fetch response
- info = summary[index]
- if info.uid != uid
- info = summary_by_uid[uid]
- fi
- if info == NULL
- create new info @ index
- fi
- if got.flags
- update flags
- fi
- if got.header
- update based on header
- mark as retrieved
- else if got.body
- update based on imap body
- mark as retrieved
- fi
-
- Async fetch response:
- info = summary[index]
- if info == null
- if uid == null
- force resync/select?
- info = empty @ index
- else if uid && info.uid != uid
- force a resync?
- return
- fi
-
- if got.flags {
- info.flags = flags
- }
- if got.header {
- info.init(header)
- info.empty = false
- }
-
-info.state - 2 bit field in flags
- 0 = empty, nothing set
- 1 = uid & flags set
- 2 = update required
- 3 = up to date
-*/
-
diff --git a/camel/providers/imapp/camel-imapp-folder.h b/camel/providers/imapp/camel-imapp-folder.h
deleted file mode 100644
index 329c66b7fc..0000000000
--- a/camel/providers/imapp/camel-imapp-folder.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-imap-folder.h : Class for a IMAP folder */
-
-/*
- * Authors: Michael Zucchi <notzed@ximian.com>
- *
- * Copyright (C) 2002 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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_IMAPP_FOLDER_H
-#define CAMEL_IMAPP_FOLDER_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <camel/camel-folder.h>
-
-#define CAMEL_IMAPP_FOLDER_TYPE (camel_imapp_folder_get_type ())
-#define CAMEL_IMAPP_FOLDER(obj) (CAMEL_CHECK_CAST((obj), CAMEL_IMAPP_FOLDER_TYPE, CamelIMAPPFolder))
-#define CAMEL_IMAPP_FOLDER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_IMAPP_FOLDER_TYPE, CamelIMAPPFolderClass))
-#define CAMEL_IS_IMAP_FOLDER(o) (CAMEL_CHECK_TYPE((o), CAMEL_IMAPP_FOLDER_TYPE))
-
-typedef struct _CamelIMAPPFolder {
- CamelFolder parent_object;
-
- char *raw_name;
- CamelFolderChangeInfo *changes;
-
- guint32 exists;
- guint32 recent;
- guint32 uidvalidity;
- guint32 unseen;
- guint32 permanentflags;
-} CamelIMAPPFolder;
-
-typedef struct _CamelIMAPPFolderClass {
- CamelFolderClass parent_class;
-} CamelIMAPPFolderClass;
-
-/* Standard Camel function */
-CamelType camel_imapp_folder_get_type (void);
-
-/* public methods */
-CamelFolder *camel_imapp_folder_new(CamelStore *parent, const char *path);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_IMAPP_FOLDER_H */
diff --git a/camel/providers/imapp/camel-imapp-provider.c b/camel/providers/imapp/camel-imapp-provider.c
deleted file mode 100644
index 6b0cdd2d43..0000000000
--- a/camel/providers/imapp/camel-imapp-provider.c
+++ /dev/null
@@ -1,97 +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>
- * Michael Zucchi <notzed@ximian.com>
- *
- * Copyright (C) 2002 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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/camel-provider.h"
-#include "camel/camel-session.h"
-#include "camel/camel-url.h"
-#include "camel/camel-sasl.h"
-
-#include "camel-imapp-store.h"
-
-CamelProviderConfEntry imapp_conf_entries[] = {
- { CAMEL_PROVIDER_CONF_SECTION_START, NULL, NULL,
- N_("Message storage") },
- { CAMEL_PROVIDER_CONF_SECTION_END },
- { CAMEL_PROVIDER_CONF_END }
-};
-
-static CamelProvider imapp_provider = {
- "imapp",
-
- N_("IMAP+"),
-
- N_("Experimental IMAP 4(.1) client\n"
- "This is untested and unsupported code, you want to use plain imap instead.\n\n"
- " !!! DO NOT USE THIS FOR PRODUCTION EMAIL !!!\n"),
- "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,
-
- imapp_conf_entries,
-
- /* ... */
-};
-
-CamelServiceAuthType camel_imapp_password_authtype = {
- N_("Password"),
-
- N_("This option will connect to the IMAP server using a "
- "plaintext password."),
-
- "",
- TRUE
-};
-
-void
-camel_imapp_module_init(CamelSession *session)
-{
- extern void camel_exception_setup(void);
-
- imapp_provider.object_types[CAMEL_PROVIDER_STORE] = camel_imapp_store_get_type();
- imapp_provider.url_hash = camel_url_hash;
- imapp_provider.url_equal = camel_url_equal;
-
- imapp_provider.authtypes = g_list_prepend(imapp_provider.authtypes, camel_sasl_authtype_list(FALSE));
- imapp_provider.authtypes = g_list_prepend(imapp_provider.authtypes, &camel_imapp_password_authtype);
-
- /* blah ... could just use it in object setup? */
- /* TEMPORARY */
- camel_exception_setup();
-
- camel_session_register_provider(session, &imapp_provider);
-}
-
-void
-camel_provider_module_init(CamelSession *session)
-{
- camel_imapp_module_init(session);
-}
diff --git a/camel/providers/imapp/camel-imapp-store-summary.c b/camel/providers/imapp/camel-imapp-store-summary.c
deleted file mode 100644
index a3ad57fb11..0000000000
--- a/camel/providers/imapp/camel-imapp-store-summary.c
+++ /dev/null
@@ -1,616 +0,0 @@
-/*
- * Copyright (C) 2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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-imapp-store-summary.h"
-
-#include "camel/camel-file-utils.h"
-
-#include "camel-string-utils.h"
-#include "e-util/md5-utils.h"
-#include "e-util/e-memory.h"
-
-#include "camel-private.h"
-#include "camel-utf8.h"
-
-#define d(x)
-#define io(x) /* io debug */
-
-#define CAMEL_IMAPP_STORE_SUMMARY_VERSION_0 (0)
-
-#define CAMEL_IMAPP_STORE_SUMMARY_VERSION (0)
-
-#define _PRIVATE(o) (((CamelIMAPPStoreSummary *)(o))->priv)
-
-static int summary_header_load(CamelStoreSummary *, FILE *);
-static int summary_header_save(CamelStoreSummary *, FILE *);
-
-/*static CamelStoreInfo * store_info_new(CamelStoreSummary *, const char *);*/
-static CamelStoreInfo * store_info_load(CamelStoreSummary *, FILE *);
-static int store_info_save(CamelStoreSummary *, FILE *, CamelStoreInfo *);
-static void store_info_free(CamelStoreSummary *, CamelStoreInfo *);
-
-static const char *store_info_string(CamelStoreSummary *, const CamelStoreInfo *, int);
-static void store_info_set_string(CamelStoreSummary *, CamelStoreInfo *, int, const char *);
-
-static void camel_imapp_store_summary_class_init (CamelIMAPPStoreSummaryClass *klass);
-static void camel_imapp_store_summary_init (CamelIMAPPStoreSummary *obj);
-static void camel_imapp_store_summary_finalise (CamelObject *obj);
-
-static CamelStoreSummaryClass *camel_imapp_store_summary_parent;
-
-static void
-camel_imapp_store_summary_class_init (CamelIMAPPStoreSummaryClass *klass)
-{
- CamelStoreSummaryClass *ssklass = (CamelStoreSummaryClass *)klass;
-
- ssklass->summary_header_load = summary_header_load;
- ssklass->summary_header_save = summary_header_save;
-
- /*ssklass->store_info_new = store_info_new;*/
- ssklass->store_info_load = store_info_load;
- ssklass->store_info_save = store_info_save;
- ssklass->store_info_free = store_info_free;
-
- ssklass->store_info_string = store_info_string;
- ssklass->store_info_set_string = store_info_set_string;
-}
-
-static void
-camel_imapp_store_summary_init (CamelIMAPPStoreSummary *s)
-{
- /*struct _CamelIMAPPStoreSummaryPrivate *p;
-
- p = _PRIVATE(s) = g_malloc0(sizeof(*p));*/
-
- ((CamelStoreSummary *)s)->store_info_size = sizeof(CamelIMAPPStoreInfo);
- s->version = CAMEL_IMAPP_STORE_SUMMARY_VERSION;
-}
-
-static void
-camel_imapp_store_summary_finalise (CamelObject *obj)
-{
- /*struct _CamelIMAPPStoreSummaryPrivate *p;*/
- /*CamelIMAPPStoreSummary *s = (CamelIMAPPStoreSummary *)obj;*/
-
- /*p = _PRIVATE(obj);
- g_free(p);*/
-}
-
-CamelType
-camel_imapp_store_summary_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- camel_imapp_store_summary_parent = (CamelStoreSummaryClass *)camel_store_summary_get_type();
- type = camel_type_register((CamelType)camel_imapp_store_summary_parent, "CamelIMAPPStoreSummary",
- sizeof (CamelIMAPPStoreSummary),
- sizeof (CamelIMAPPStoreSummaryClass),
- (CamelObjectClassInitFunc) camel_imapp_store_summary_class_init,
- NULL,
- (CamelObjectInitFunc) camel_imapp_store_summary_init,
- (CamelObjectFinalizeFunc) camel_imapp_store_summary_finalise);
- }
-
- return type;
-}
-
-/**
- * camel_imapp_store_summary_new:
- *
- * Create a new CamelIMAPPStoreSummary object.
- *
- * Return value: A new CamelIMAPPStoreSummary widget.
- **/
-CamelIMAPPStoreSummary *
-camel_imapp_store_summary_new (void)
-{
- CamelIMAPPStoreSummary *new = CAMEL_IMAPP_STORE_SUMMARY ( camel_object_new (camel_imapp_store_summary_get_type ()));
-
- return new;
-}
-
-/**
- * camel_imapp_store_summary_full_name:
- * @s:
- * @path:
- *
- * Retrieve a summary item by full name.
- *
- * 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 @full_name name
- * is not available.
- * It must be freed using camel_store_summary_info_free().
- **/
-CamelIMAPPStoreInfo *
-camel_imapp_store_summary_full_name(CamelIMAPPStoreSummary *s, const char *full_name)
-{
- int count, i;
- CamelIMAPPStoreInfo *info;
-
- count = camel_store_summary_count((CamelStoreSummary *)s);
- for (i=0;i<count;i++) {
- info = (CamelIMAPPStoreInfo *)camel_store_summary_index((CamelStoreSummary *)s, i);
- if (info) {
- if (strcmp(info->full_name, full_name) == 0)
- return info;
- camel_store_summary_info_free((CamelStoreSummary *)s, (CamelStoreInfo *)info);
- }
- }
-
- return NULL;
-}
-
-char *
-camel_imapp_store_summary_full_to_path(CamelIMAPPStoreSummary *s, const char *full_name, char dir_sep)
-{
- char *path, *p;
- int c;
- const char *f;
-
- if (dir_sep != '/') {
- p = path = alloca(strlen(full_name)*3+1);
- f = full_name;
- while ( (c = *f++ & 0xff) ) {
- if (c == dir_sep)
- *p++ = '/';
- else if (c == '/' || c == '%')
- p += sprintf(p, "%%%02X", c);
- else
- *p++ = c;
- }
- *p = 0;
- } else
- path = (char *)full_name;
-
- return camel_utf7_utf8(path);
-}
-
-static guint32 hexnib(guint32 c)
-{
- if (c >= '0' && c <= '9')
- return c-'0';
- else if (c>='A' && c <= 'Z')
- return c-'A'+10;
- else
- return 0;
-}
-
-char *
-camel_imapp_store_summary_path_to_full(CamelIMAPPStoreSummary *s, const char *path, char dir_sep)
-{
- unsigned char *full, *f;
- guint32 c, v = 0;
- const char *p;
- int state=0;
- char *subpath, *last = NULL;
- CamelStoreInfo *si;
- CamelIMAPPStoreNamespace *ns;
-
- /* check to see if we have a subpath of path already defined */
- subpath = alloca(strlen(path)+1);
- strcpy(subpath, path);
- do {
- si = camel_store_summary_path((CamelStoreSummary *)s, subpath);
- if (si == NULL) {
- last = strrchr(subpath, '/');
- if (last)
- *last = 0;
- }
- } while (si == NULL && last);
-
- /* path is already present, use the raw version we have */
- if (si && strlen(subpath) == strlen(path)) {
- f = g_strdup(camel_imapp_store_info_full_name(s, si));
- camel_store_summary_info_free((CamelStoreSummary *)s, si);
- return f;
- }
-
- ns = camel_imapp_store_summary_namespace_find_path(s, path);
-
- f = full = alloca(strlen(path)*2+1);
- if (si)
- p = path + strlen(subpath);
- else if (ns)
- p = path + strlen(ns->path);
- else
- p = path;
-
- while ( (c = camel_utf8_getc((const unsigned char **)&p)) ) {
- switch(state) {
- case 0:
- if (c == '%')
- state = 1;
- else {
- if (c == '/')
- c = dir_sep;
- camel_utf8_putc(&f, c);
- }
- break;
- case 1:
- state = 2;
- v = hexnib(c)<<4;
- break;
- case 2:
- state = 0;
- v |= hexnib(c);
- camel_utf8_putc(&f, v);
- break;
- }
- }
- camel_utf8_putc(&f, c);
-
- /* merge old path part if required */
- f = camel_utf8_utf7(full);
- if (si) {
- full = g_strdup_printf("%s%s", camel_imapp_store_info_full_name(s, si), f);
- g_free(f);
- camel_store_summary_info_free((CamelStoreSummary *)s, si);
- f = full;
- } else if (ns) {
- full = g_strdup_printf("%s%s", ns->full_name, f);
- g_free(f);
- f = full;
- }
-
- return f;
-}
-
-CamelIMAPPStoreInfo *
-camel_imapp_store_summary_add_from_full(CamelIMAPPStoreSummary *s, const char *full, char dir_sep)
-{
- CamelIMAPPStoreInfo *info;
- char *pathu8, *prefix;
- int len;
- char *full_name;
- CamelIMAPPStoreNamespace *ns;
-
- d(printf("adding full name '%s' '%c'\n", full, dir_sep));
-
- len = strlen(full);
- full_name = alloca(len+1);
- strcpy(full_name, full);
- if (full_name[len-1] == dir_sep)
- full_name[len-1] = 0;
-
- info = camel_imapp_store_summary_full_name(s, full_name);
- if (info) {
- camel_store_summary_info_free((CamelStoreSummary *)s, (CamelStoreInfo *)info);
- d(printf(" already there\n"));
- return info;
- }
-
- ns = camel_imapp_store_summary_namespace_find_full(s, full_name);
- if (ns) {
- d(printf("(found namespace for '%s' ns '%s') ", full_name, ns->path));
- len = strlen(ns->full_name);
- if (len >= strlen(full_name)) {
- pathu8 = g_strdup(ns->path);
- } else {
- if (full_name[len] == ns->sep)
- len++;
-
- prefix = camel_imapp_store_summary_full_to_path(s, full_name+len, ns->sep);
- if (*ns->path) {
- pathu8 = g_strdup_printf ("%s/%s", ns->path, prefix);
- g_free (prefix);
- } else {
- pathu8 = prefix;
- }
- }
- d(printf(" (pathu8 = '%s')", pathu8));
- } else {
- d(printf("(Cannot find namespace for '%s')\n", full_name));
- pathu8 = camel_imapp_store_summary_full_to_path(s, full_name, dir_sep);
- }
-
- info = (CamelIMAPPStoreInfo *)camel_store_summary_add_from_path((CamelStoreSummary *)s, pathu8);
- if (info) {
- d(printf(" '%s' -> '%s'\n", pathu8, full_name));
- camel_store_info_set_string((CamelStoreSummary *)s, (CamelStoreInfo *)info, CAMEL_IMAPP_STORE_INFO_FULL_NAME, full_name);
- } else
- d(printf(" failed\n"));
-
- return info;
-}
-
-/* should this be const? */
-/* TODO: deprecate/merge this function with path_to_full */
-char *
-camel_imapp_store_summary_full_from_path(CamelIMAPPStoreSummary *s, const char *path)
-{
- CamelIMAPPStoreNamespace *ns;
- char *name = NULL;
-
- ns = camel_imapp_store_summary_namespace_find_path(s, path);
- if (ns)
- name = camel_imapp_store_summary_path_to_full(s, path, ns->sep);
-
- d(printf("looking up path %s -> %s\n", path, name?name:"not found"));
-
- return name;
-}
-
-/* TODO: this api needs some more work */
-CamelIMAPPStoreNamespace *camel_imapp_store_summary_namespace_new(CamelIMAPPStoreSummary *s, const char *full_name, char dir_sep)
-{
- CamelIMAPPStoreNamespace *ns;
- char *p;
- int len;
-
- ns = g_malloc0(sizeof(*ns));
- ns->full_name = g_strdup(full_name);
- len = strlen(ns->full_name)-1;
- if (len >= 0 && ns->full_name[len] == dir_sep)
- ns->full_name[len] = 0;
- ns->sep = dir_sep;
-
- p = ns->path = camel_imapp_store_summary_full_to_path(s, ns->full_name, dir_sep);
- while (*p) {
- if (*p == '/')
- *p = '.';
- p++;
- }
-
- return ns;
-}
-
-void camel_imapp_store_summary_namespace_set(CamelIMAPPStoreSummary *s, CamelIMAPPStoreNamespace *ns)
-{
- static void namespace_clear(CamelStoreSummary *s);
-
- d(printf("Setting namesapce to '%s' '%c' -> '%s'\n", ns->full_name, ns->sep, ns->path));
- namespace_clear((CamelStoreSummary *)s);
- s->namespace = ns;
- camel_store_summary_touch((CamelStoreSummary *)s);
-}
-
-CamelIMAPPStoreNamespace *
-camel_imapp_store_summary_namespace_find_path(CamelIMAPPStoreSummary *s, const char *path)
-{
- int len;
- CamelIMAPPStoreNamespace *ns;
-
- /* NB: this currently only compares against 1 namespace, in future compare against others */
- ns = s->namespace;
- while (ns) {
- len = strlen(ns->path);
- if (len == 0
- || (strncmp(ns->path, path, len) == 0
- && (path[len] == '/' || path[len] == 0)))
- break;
- ns = NULL;
- }
-
- /* have a default? */
- return ns;
-}
-
-CamelIMAPPStoreNamespace *
-camel_imapp_store_summary_namespace_find_full(CamelIMAPPStoreSummary *s, const char *full)
-{
- int len;
- CamelIMAPPStoreNamespace *ns;
-
- /* NB: this currently only compares against 1 namespace, in future compare against others */
- ns = s->namespace;
- while (ns) {
- len = strlen(ns->full_name);
- d(printf("find_full: comparing namespace '%s' to name '%s'\n", ns->full_name, full));
- if (len == 0
- || (strncmp(ns->full_name, full, len) == 0
- && (full[len] == ns->sep || full[len] == 0)))
- break;
- ns = NULL;
- }
-
- /* have a default? */
- return ns;
-}
-
-static void
-namespace_free(CamelStoreSummary *s, CamelIMAPPStoreNamespace *ns)
-{
- g_free(ns->path);
- g_free(ns->full_name);
- g_free(ns);
-}
-
-static void
-namespace_clear(CamelStoreSummary *s)
-{
- CamelIMAPPStoreSummary *is = (CamelIMAPPStoreSummary *)s;
-
- if (is->namespace)
- namespace_free(s, is->namespace);
- is->namespace = NULL;
-}
-
-static CamelIMAPPStoreNamespace *
-namespace_load(CamelStoreSummary *s, FILE *in)
-{
- CamelIMAPPStoreNamespace *ns;
- guint32 sep = '/';
-
- ns = g_malloc0(sizeof(*ns));
- if (camel_file_util_decode_string(in, &ns->path) == -1
- || camel_file_util_decode_string(in, &ns->full_name) == -1
- || camel_file_util_decode_uint32(in, &sep) == -1) {
- namespace_free(s, ns);
- ns = NULL;
- } else {
- ns->sep = sep;
- }
-
- return ns;
-}
-
-static int
-namespace_save(CamelStoreSummary *s, FILE *in, CamelIMAPPStoreNamespace *ns)
-{
- if (camel_file_util_encode_string(in, ns->path) == -1
- || camel_file_util_encode_string(in, ns->full_name) == -1
- || camel_file_util_encode_uint32(in, (guint32)ns->sep) == -1)
- return -1;
-
- return 0;
-}
-
-static int
-summary_header_load(CamelStoreSummary *s, FILE *in)
-{
- CamelIMAPPStoreSummary *is = (CamelIMAPPStoreSummary *)s;
- gint32 version, capabilities, count;
-
- namespace_clear(s);
-
- if (camel_imapp_store_summary_parent->summary_header_load((CamelStoreSummary *)s, in) == -1
- || camel_file_util_decode_fixed_int32(in, &version) == -1)
- return -1;
-
- is->version = version;
-
- if (version < CAMEL_IMAPP_STORE_SUMMARY_VERSION_0) {
- g_warning("Store summary header version too low");
- return -1;
- }
-
- /* note file format can be expanded to contain more namespaces, but only 1 at the moment */
- if (camel_file_util_decode_fixed_int32(in, &capabilities) == -1
- || camel_file_util_decode_fixed_int32(in, &count) == -1
- || count > 1)
- return -1;
-
- is->capabilities = capabilities;
- if (count == 1) {
- if ((is->namespace = namespace_load(s, in)) == NULL)
- return -1;
- }
-
- return 0;
-}
-
-static int
-summary_header_save(CamelStoreSummary *s, FILE *out)
-{
- CamelIMAPPStoreSummary *is = (CamelIMAPPStoreSummary *)s;
- guint32 count;
-
- count = is->namespace?1:0;
-
- /* always write as latest version */
- if (camel_imapp_store_summary_parent->summary_header_save((CamelStoreSummary *)s, out) == -1
- || camel_file_util_encode_fixed_int32(out, CAMEL_IMAPP_STORE_SUMMARY_VERSION) == -1
- || camel_file_util_encode_fixed_int32(out, is->capabilities) == -1
- || camel_file_util_encode_fixed_int32(out, count) == -1)
- return -1;
-
- if (is->namespace && namespace_save(s, out, is->namespace) == -1)
- return -1;
-
- return 0;
-}
-
-static CamelStoreInfo *
-store_info_load(CamelStoreSummary *s, FILE *in)
-{
- CamelIMAPPStoreInfo *mi;
-
- mi = (CamelIMAPPStoreInfo *)camel_imapp_store_summary_parent->store_info_load(s, in);
- if (mi) {
- if (camel_file_util_decode_string(in, &mi->full_name) == -1) {
- camel_store_summary_info_free(s, (CamelStoreInfo *)mi);
- mi = NULL;
- }
- }
-
- return (CamelStoreInfo *)mi;
-}
-
-static int
-store_info_save(CamelStoreSummary *s, FILE *out, CamelStoreInfo *mi)
-{
- CamelIMAPPStoreInfo *isi = (CamelIMAPPStoreInfo *)mi;
-
- if (camel_imapp_store_summary_parent->store_info_save(s, out, mi) == -1
- || camel_file_util_encode_string(out, isi->full_name) == -1)
- return -1;
-
- return 0;
-}
-
-static void
-store_info_free(CamelStoreSummary *s, CamelStoreInfo *mi)
-{
- CamelIMAPPStoreInfo *isi = (CamelIMAPPStoreInfo *)mi;
-
- g_free(isi->full_name);
- camel_imapp_store_summary_parent->store_info_free(s, mi);
-}
-
-static const char *
-store_info_string(CamelStoreSummary *s, const CamelStoreInfo *mi, int type)
-{
- CamelIMAPPStoreInfo *isi = (CamelIMAPPStoreInfo *)mi;
-
- /* FIXME: Locks? */
-
- g_assert (mi != NULL);
-
- switch (type) {
- case CAMEL_IMAPP_STORE_INFO_FULL_NAME:
- return isi->full_name;
- default:
- return camel_imapp_store_summary_parent->store_info_string(s, mi, type);
- }
-}
-
-static void
-store_info_set_string(CamelStoreSummary *s, CamelStoreInfo *mi, int type, const char *str)
-{
- CamelIMAPPStoreInfo *isi = (CamelIMAPPStoreInfo *)mi;
-
- g_assert(mi != NULL);
-
- switch(type) {
- case CAMEL_IMAPP_STORE_INFO_FULL_NAME:
- d(printf("Set full name %s -> %s\n", isi->full_name, str));
- CAMEL_STORE_SUMMARY_LOCK(s, summary_lock);
- g_free(isi->full_name);
- isi->full_name = g_strdup(str);
- CAMEL_STORE_SUMMARY_UNLOCK(s, summary_lock);
- break;
- default:
- camel_imapp_store_summary_parent->store_info_set_string(s, mi, type, str);
- break;
- }
-}
diff --git a/camel/providers/imapp/camel-imapp-store-summary.h b/camel/providers/imapp/camel-imapp-store-summary.h
deleted file mode 100644
index 154fe8798e..0000000000
--- a/camel/providers/imapp/camel-imapp-store-summary.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_IMAPP_STORE_SUMMARY_H
-#define _CAMEL_IMAPP_STORE_SUMMARY_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <camel/camel-object.h>
-#include <camel/camel-store-summary.h>
-
-#define CAMEL_IMAPP_STORE_SUMMARY(obj) CAMEL_CHECK_CAST (obj, camel_imapp_store_summary_get_type (), CamelIMAPPStoreSummary)
-#define CAMEL_IMAPP_STORE_SUMMARY_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_imapp_store_summary_get_type (), CamelIMAPPStoreSummaryClass)
-#define CAMEL_IS_IMAP_STORE_SUMMARY(obj) CAMEL_CHECK_TYPE (obj, camel_imapp_store_summary_get_type ())
-
-typedef struct _CamelIMAPPStoreSummary CamelIMAPPStoreSummary;
-typedef struct _CamelIMAPPStoreSummaryClass CamelIMAPPStoreSummaryClass;
-
-typedef struct _CamelIMAPPStoreInfo CamelIMAPPStoreInfo;
-
-enum {
- CAMEL_IMAPP_STORE_INFO_FULL_NAME = CAMEL_STORE_INFO_LAST,
- CAMEL_IMAPP_STORE_INFO_LAST,
-};
-
-struct _CamelIMAPPStoreInfo {
- CamelStoreInfo info;
- char *full_name;
-};
-
-typedef struct _CamelIMAPPStoreNamespace CamelIMAPPStoreNamespace;
-
-struct _CamelIMAPPStoreNamespace {
- char *path; /* display path */
- char *full_name; /* real name */
- char sep; /* directory separator */
-};
-
-struct _CamelIMAPPStoreSummary {
- CamelStoreSummary summary;
-
- struct _CamelIMAPPStoreSummaryPrivate *priv;
-
- /* header info */
- guint32 version; /* version of base part of file */
- guint32 capabilities;
- CamelIMAPPStoreNamespace *namespace; /* eventually to be a list */
-};
-
-struct _CamelIMAPPStoreSummaryClass {
- CamelStoreSummaryClass summary_class;
-};
-
-CamelType camel_imapp_store_summary_get_type (void);
-CamelIMAPPStoreSummary *camel_imapp_store_summary_new (void);
-
-/* TODO: this api needs some more work, needs to support lists */
-CamelIMAPPStoreNamespace *camel_imapp_store_summary_namespace_new(CamelIMAPPStoreSummary *s, const char *full_name, char dir_sep);
-void camel_imapp_store_summary_namespace_set(CamelIMAPPStoreSummary *s, CamelIMAPPStoreNamespace *ns);
-CamelIMAPPStoreNamespace *camel_imapp_store_summary_namespace_find_path(CamelIMAPPStoreSummary *s, const char *path);
-CamelIMAPPStoreNamespace *camel_imapp_store_summary_namespace_find_full(CamelIMAPPStoreSummary *s, const char *full_name);
-
-/* converts to/from utf8 canonical nasmes */
-char *camel_imapp_store_summary_full_to_path(CamelIMAPPStoreSummary *s, const char *full_name, char dir_sep);
-char *camel_imapp_store_summary_path_to_full(CamelIMAPPStoreSummary *s, const char *path, char dir_sep);
-
-CamelIMAPPStoreInfo *camel_imapp_store_summary_full_name(CamelIMAPPStoreSummary *s, const char *full_name);
-CamelIMAPPStoreInfo *camel_imapp_store_summary_add_from_full(CamelIMAPPStoreSummary *s, const char *full_name, char dir_sep);
-
-/* a convenience lookup function. always use this if path known */
-char *camel_imapp_store_summary_full_from_path(CamelIMAPPStoreSummary *s, const char *path);
-
-/* helper macro's */
-#define camel_imapp_store_info_full_name(s, i) (camel_store_info_string((CamelStoreSummary *)s, (const CamelStoreInfo *)i, CAMEL_IMAPP_STORE_INFO_FULL_NAME))
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* ! _CAMEL_IMAPP_STORE_SUMMARY_H */
diff --git a/camel/providers/imapp/camel-imapp-store.c b/camel/providers/imapp/camel-imapp-store.c
deleted file mode 100644
index 9123102a03..0000000000
--- a/camel/providers/imapp/camel-imapp-store.c
+++ /dev/null
@@ -1,1006 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-imap-store.c : class for a imap store */
-
-/*
- * Authors: Michael Zucchi <notzed@ximian.com>
- *
- * Copyright (C) 2000-2002 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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/camel-operation.h"
-
-#include "camel/camel-stream-buffer.h"
-#include "camel/camel-session.h"
-#include "camel/camel-exception.h"
-#include "camel/camel-url.h"
-#include "camel/camel-sasl.h"
-#include "camel/camel-data-cache.h"
-#include "camel/camel-tcp-stream.h"
-#include "camel/camel-tcp-stream-raw.h"
-#ifdef HAVE_SSL
-#include "camel/camel-tcp-stream-ssl.h"
-#endif
-
-#include "camel-imapp-store-summary.h"
-#include "camel-imapp-store.h"
-#include "camel-imapp-folder.h"
-#include "camel-imapp-engine.h"
-#include "camel-imapp-exception.h"
-#include "camel-imapp-utils.h"
-#include "camel-imapp-driver.h"
-
-/* Specified in RFC 2060 section 2.1 */
-#define IMAP_PORT 143
-
-static CamelStoreClass *parent_class = NULL;
-
-static void finalize (CamelObject *object);
-
-static void imap_construct(CamelService *service, CamelSession *session, CamelProvider *provider, CamelURL *url, CamelException *ex);
-/* static char *imap_get_name(CamelService *service, gboolean brief);*/
-static gboolean imap_connect (CamelService *service, CamelException *ex);
-static gboolean imap_disconnect (CamelService *service, gboolean clean, CamelException *ex);
-static GList *imap_query_auth_types (CamelService *service, CamelException *ex);
-
-static void imap_init_trash (CamelStore *store);
-static CamelFolder *imap_get_trash (CamelStore *store, CamelException *ex);
-
-static CamelFolder *imap_get_folder(CamelStore * store, const char *folder_name, guint32 flags, CamelException * ex);
-static CamelFolder *imap_get_inbox (CamelStore *store, CamelException *ex);
-static void imap_rename_folder(CamelStore *store, const char *old_name, const char *new_name, CamelException *ex);
-static CamelFolderInfo *imap_get_folder_info (CamelStore *store, const char *top, guint32 flags, CamelException *ex);
-static void imap_delete_folder(CamelStore *store, const char *folder_name, CamelException *ex);
-static void imap_rename_folder(CamelStore *store, const char *old, const char *new, CamelException *ex);
-static CamelFolderInfo *imap_create_folder(CamelStore *store, const char *parent_name, const char *folder_name, CamelException *ex);
-
-static int store_resp_list(CamelIMAPPEngine *ie, guint32 id, void *data);
-
-/* yet to see if this should go global or not */
-void camel_imapp_store_folder_selected(CamelIMAPPStore *store, CamelIMAPPFolder *folder, CamelIMAPPSelectResponse *select);
-
-static void
-camel_imapp_store_class_init (CamelIMAPPStoreClass *camel_imapp_store_class)
-{
- CamelServiceClass *camel_service_class = CAMEL_SERVICE_CLASS(camel_imapp_store_class);
- CamelStoreClass *camel_store_class = CAMEL_STORE_CLASS(camel_imapp_store_class);
-
- parent_class = CAMEL_STORE_CLASS(camel_type_get_global_classfuncs(camel_store_get_type()));
-
- /* virtual method overload */
- camel_service_class->construct = imap_construct;
- /*camel_service_class->get_name = imap_get_name;*/
- camel_service_class->query_auth_types = imap_query_auth_types;
- camel_service_class->connect = imap_connect;
- camel_service_class->disconnect = imap_disconnect;
-
- camel_store_class->init_trash = imap_init_trash;
- camel_store_class->get_trash = imap_get_trash;
-
- camel_store_class->get_folder = imap_get_folder;
- camel_store_class->get_inbox = imap_get_inbox;
-
- camel_store_class->create_folder = imap_create_folder;
- camel_store_class->rename_folder = imap_rename_folder;
- camel_store_class->delete_folder = imap_delete_folder;
- camel_store_class->get_folder_info = imap_get_folder_info;
-}
-
-static void
-camel_imapp_store_init (gpointer object, gpointer klass)
-{
- CamelIMAPPStore *istore = object;
-}
-
-CamelType
-camel_imapp_store_get_type (void)
-{
- static CamelType camel_imapp_store_type = CAMEL_INVALID_TYPE;
-
- if (!camel_imapp_store_type) {
- camel_imapp_store_type = camel_type_register(CAMEL_STORE_TYPE,
- "CamelIMAPPStore",
- sizeof (CamelIMAPPStore),
- sizeof (CamelIMAPPStoreClass),
- (CamelObjectClassInitFunc) camel_imapp_store_class_init,
- NULL,
- (CamelObjectInitFunc) camel_imapp_store_init,
- finalize);
- }
-
- return camel_imapp_store_type;
-}
-
-static void
-finalize (CamelObject *object)
-{
- CamelIMAPPStore *imap_store = CAMEL_IMAPP_STORE (object);
-
- /* force disconnect so we dont have it run later, after we've cleaned up some stuff */
- /* SIGH */
-
- camel_service_disconnect((CamelService *)imap_store, TRUE, NULL);
-
- if (imap_store->driver)
- camel_object_unref(imap_store->driver);
- if (imap_store->cache)
- camel_object_unref(imap_store->cache);
-}
-
-static void imap_construct(CamelService *service, CamelSession *session, CamelProvider *provider, CamelURL *url, CamelException *ex)
-{
- char *root, *summary;
- CamelIMAPPStore *store = (CamelIMAPPStore *)service;
-
- CAMEL_SERVICE_CLASS (parent_class)->construct (service, session, provider, url, ex);
- if (camel_exception_is_set(ex))
- return;
-
- CAMEL_TRY {
- store->summary = camel_imapp_store_summary_new();
- root = camel_session_get_storage_path(service->session, service, ex);
- if (root) {
- summary = g_build_filename(root, ".ev-store-summary", NULL);
- camel_store_summary_set_filename((CamelStoreSummary *)store->summary, summary);
- /* FIXME: need to remove params, passwords, etc */
- camel_store_summary_set_uri_base((CamelStoreSummary *)store->summary, service->url);
- camel_store_summary_load((CamelStoreSummary *)store->summary);
- }
- } CAMEL_CATCH(e) {
- camel_exception_xfer(ex, e);
- } CAMEL_DONE;
-}
-
-enum {
- USE_SSL_NEVER,
- USE_SSL_ALWAYS,
- USE_SSL_WHEN_POSSIBLE
-};
-
-#define SSL_PORT_FLAGS (CAMEL_TCP_STREAM_SSL_ENABLE_SSL2 | CAMEL_TCP_STREAM_SSL_ENABLE_SSL3)
-#define STARTTLS_FLAGS (CAMEL_TCP_STREAM_SSL_ENABLE_TLS)
-
-static void
-connect_to_server (CamelService *service, int ssl_mode, int try_starttls)
-/* throws IO exception */
-{
- CamelIMAPPStore *store = CAMEL_IMAPP_STORE (service);
- CamelStream * volatile tcp_stream = NULL;
- CamelIMAPPStream * volatile imap_stream = NULL;
- struct hostent *h = NULL;
- int ret, port;
- CamelException *ex;
-
- ex = camel_exception_new();
- CAMEL_TRY {
- /* parent class connect initialization */
- CAMEL_SERVICE_CLASS (parent_class)->connect (service, ex);
- if (ex->id)
- camel_exception_throw_ex(ex);
-
- h = camel_service_gethost(service, ex);
- if (ex->id)
- camel_exception_throw_ex(ex);
-
- port = service->url->port ? service->url->port : IMAP_PORT;
-
-#ifdef HAVE_SSL
- if (camel_url_get_param (service->url, "use_ssl")) {
- if (try_starttls)
- tcp_stream = camel_tcp_stream_ssl_new_raw (service->session, service->url->host, STARTTLS_FLAGS);
- else {
- port = service->url->port ? service->url->port : 995;
- tcp_stream = camel_tcp_stream_ssl_new (service->session, service->url->host, SSL_PORT_FLAGS);
- }
- } else {
- tcp_stream = camel_tcp_stream_raw_new ();
- }
-#else
- tcp_stream = camel_tcp_stream_raw_new ();
-#endif /* HAVE_SSL */
-
- ret = camel_tcp_stream_connect (CAMEL_TCP_STREAM (tcp_stream), h, port);
- camel_free_host (h);
- if (ret == -1) {
- if (errno == EINTR)
- camel_exception_throw(CAMEL_EXCEPTION_USER_CANCEL, _("Connection cancelled"));
- else
- camel_exception_throw(CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("Could not connect to %s (port %d): %s"),
- service->url->host, port, strerror(errno));
- }
-
- imap_stream = (CamelIMAPPStream *)camel_imapp_stream_new(tcp_stream);
- store->driver = camel_imapp_driver_new(imap_stream);
-
- camel_object_unref(imap_stream);
- camel_object_unref(tcp_stream);
- } CAMEL_CATCH(e) {
- if (tcp_stream)
- camel_object_unref(tcp_stream);
- if (imap_stream)
- camel_object_unref((CamelObject *)imap_stream);
- camel_exception_throw_ex(e);
- } CAMEL_DONE;
-
- camel_exception_free(ex);
-}
-
-#if 0
-
-/* leave this stuff out for now */
-
-
-static struct {
- char *value;
- int mode;
-} ssl_options[] = {
- { "", USE_SSL_ALWAYS },
- { "always", USE_SSL_ALWAYS },
- { "when-possible", USE_SSL_WHEN_POSSIBLE },
- { "never", USE_SSL_NEVER },
- { NULL, USE_SSL_NEVER },
-};
-
-static gboolean
-connect_to_server_wrapper (CamelService *service, CamelException *ex)
-{
-#ifdef HAVE_SSL
- const char *use_ssl;
- int i, ssl_mode;
-
- use_ssl = camel_url_get_param (service->url, "use_ssl");
- if (use_ssl) {
- for (i = 0; ssl_options[i].value; i++)
- if (!strcmp (ssl_options[i].value, use_ssl))
- break;
- ssl_mode = ssl_options[i].mode;
- } else
- ssl_mode = USE_SSL_NEVER;
-
- if (ssl_mode == USE_SSL_ALWAYS) {
- /* First try the ssl port */
- if (!connect_to_server (service, ssl_mode, FALSE, ex)) {
- if (camel_exception_get_id (ex) == CAMEL_EXCEPTION_SERVICE_UNAVAILABLE) {
- /* The ssl port seems to be unavailable, lets try STARTTLS */
- camel_exception_clear (ex);
- return connect_to_server (service, ssl_mode, TRUE, ex);
- } else {
- return FALSE;
- }
- }
-
- return TRUE;
- } else if (ssl_mode == USE_SSL_WHEN_POSSIBLE) {
- /* If the server supports STARTTLS, use it */
- return connect_to_server (service, ssl_mode, TRUE, ex);
- } else {
- /* User doesn't care about SSL */
- return connect_to_server (service, ssl_mode, FALSE, ex);
- }
-#else
- return connect_to_server (service, USE_SSL_NEVER, FALSE, ex);
-#endif
-}
-#endif
-
-extern CamelServiceAuthType camel_imapp_password_authtype;
-extern CamelServiceAuthType camel_imapp_apop_authtype;
-
-static GList *
-imap_query_auth_types (CamelService *service, CamelException *ex)
-{
- /*CamelIMAPPStore *store = CAMEL_IMAPP_STORE (service);*/
- GList *types = NULL;
-
- types = CAMEL_SERVICE_CLASS (parent_class)->query_auth_types (service, ex);
- if (types == NULL)
- return NULL;
-
-#if 0
- if (connect_to_server_wrapper (service, NULL)) {
- types = g_list_concat(types, g_list_copy(store->engine->auth));
- imap_disconnect (service, TRUE, NULL);
- } else {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("Could not connect to POP server on %s"),
- service->url->host);
- }
-#endif
- return types;
-}
-
-static void
-store_get_pass(CamelIMAPPStore *store)
-{
- if (((CamelService *)store)->url->passwd == NULL) {
- char *prompt;
- CamelException ex;
-
- camel_exception_init(&ex);
-
- prompt = g_strdup_printf (_("%sPlease enter the IMAP password for %s@%s"),
- store->login_error?store->login_error:"",
- ((CamelService *)store)->url->user,
- ((CamelService *)store)->url->host);
- ((CamelService *)store)->url->passwd = camel_session_get_password(camel_service_get_session((CamelService *)store),
- prompt, FALSE, TRUE, (CamelService*)store, "password", &ex);
- g_free (prompt);
- if (camel_exception_is_set(&ex))
- camel_exception_throw_ex(&ex);
- }
-}
-
-static struct _CamelSasl *
-store_get_sasl(struct _CamelIMAPPDriver *driver, CamelIMAPPStore *store)
-{
- store_get_pass(store);
-
- if (((CamelService *)store)->url->authmech)
- return camel_sasl_new("imap", ((CamelService *)store)->url->authmech, (CamelService *)store);
-
- return NULL;
-}
-
-static void
-store_get_login(struct _CamelIMAPPDriver *driver, char **login, char **pass, CamelIMAPPStore *store)
-{
- store_get_pass(store);
-
- *login = g_strdup(((CamelService *)store)->url->user);
- *pass = g_strdup(((CamelService *)store)->url->passwd);
-}
-
-static gboolean
-imap_connect (CamelService *service, CamelException *ex)
-{
- CamelIMAPPStore *store = (CamelIMAPPStore *)service;
- volatile int ret = FALSE;
-
- CAMEL_TRY {
- volatile int retry = TRUE;
-
- if (store->cache == NULL) {
- char *root;
-
- root = camel_session_get_storage_path(service->session, service, ex);
- if (root) {
- store->cache = camel_data_cache_new(root, 0, ex);
- g_free(root);
- if (store->cache) {
- /* Default cache expiry - 1 week or not visited in a day */
- camel_data_cache_set_expire_age(store->cache, 60*60*24*7);
- camel_data_cache_set_expire_access(store->cache, 60*60*24);
- }
- }
- if (camel_exception_is_set(ex))
- camel_exception_throw_ex(ex);
- }
-
- connect_to_server(service, USE_SSL_NEVER, FALSE);
-
- camel_imapp_driver_set_sasl_factory(store->driver, (CamelIMAPPSASLFunc)store_get_sasl, store);
- camel_imapp_driver_set_login_query(store->driver, (CamelIMAPPLoginFunc)store_get_login, store);
- store->login_error = NULL;
-
- do {
- CAMEL_TRY {
- if (store->driver->engine->state != IMAP_ENGINE_AUTH)
- camel_imapp_driver_login(store->driver);
- ret = TRUE;
- retry = FALSE;
- } CAMEL_CATCH(e) {
- g_free(store->login_error);
- store->login_error = NULL;
- switch (e->id) {
- case CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE:
- store->login_error = g_strdup_printf("%s\n\n", e->desc);
- camel_session_forget_password(service->session, service, "password", ex);
- camel_url_set_passwd(service->url, NULL);
- break;
- default:
- camel_exception_throw_ex(e);
- break;
- }
- } CAMEL_DONE;
- } while (retry);
- } CAMEL_CATCH(e) {
- camel_exception_xfer(ex, e);
- camel_service_disconnect(service, TRUE, NULL);
- ret = FALSE;
- } CAMEL_DONE;
-
- g_free(store->login_error);
- store->login_error = NULL;
-
- return ret;
-}
-
-static gboolean
-imap_disconnect (CamelService *service, gboolean clean, CamelException *ex)
-{
- CamelIMAPPStore *store = CAMEL_IMAPP_STORE (service);
-
- /* FIXME: logout */
-
- if (!CAMEL_SERVICE_CLASS (parent_class)->disconnect (service, clean, ex))
- return FALSE;
-
- /* logout/disconnect */
- if (store->driver) {
- camel_object_unref(store->driver);
- store->driver = NULL;
- }
-
- return TRUE;
-}
-
-static void
-imap_init_trash (CamelStore *store)
-{
- /* no-op */
- ;
-}
-
-static CamelFolder *
-imap_get_trash (CamelStore *store, CamelException *ex)
-{
- /* no-op */
- return NULL;
-}
-
-static CamelFolder *
-imap_get_folder (CamelStore *store, const char *folder_name, guint32 flags, CamelException *ex)
-{
- CamelIMAPPStore *istore = (CamelIMAPPStore *)store;
- CamelIMAPPFolder * volatile folder = NULL;
-
- /* ??? */
-
- /* 1. create the folder */
- /* 2. run select? */
- /* 3. update the folder */
-
- CAMEL_TRY {
- folder = (CamelIMAPPFolder *)camel_imapp_folder_new(store, folder_name);
- camel_imapp_driver_select(istore->driver, folder);
- } CAMEL_CATCH (e) {
- if (folder) {
- camel_object_unref(folder);
- folder = NULL;
- }
- camel_exception_xfer(ex, e);
- } CAMEL_DONE;
-
- return (CamelFolder *)folder;
-}
-
-static CamelFolder *
-imap_get_inbox(CamelStore *store, CamelException *ex)
-{
- camel_exception_setv(ex, 1, "get_inbox::unimplemented");
-
- return NULL;
-}
-
-/* 8 bit, string compare */
-static int folders_build_cmp(const void *app, const void *bpp)
-{
- struct _list_info *a = *((struct _list_info **)app);
- struct _list_info *b = *((struct _list_info **)bpp);
- unsigned char *ap = (unsigned char *)(a->name);
- unsigned char *bp = (unsigned char *)(b->name);
-
- printf("qsort, cmp '%s' <> '%s'\n", ap, bp);
-
- while (*ap && *ap == *bp) {
- ap++;
- bp++;
- }
-
- if (*ap < *bp)
- return -1;
- else if (*ap > *bp)
- return 1;
- return 0;
-}
-
-/* FIXME: this should go via storesummary? */
-static CamelFolderInfo *
-folders_build_info(CamelURL *base, struct _list_info *li)
-{
- char *path, *full_name, *name;
- CamelFolderInfo *fi;
-
- full_name = imapp_list_get_path(li);
- name = strrchr(full_name, '/');
- if (name)
- name++;
- else
- name = full_name;
-
- path = alloca(strlen(full_name)+2);
- sprintf(path, "/%s", full_name);
- camel_url_set_path(base, path);
-
- fi = g_malloc0(sizeof(*fi));
- fi->url = camel_url_to_string(base, CAMEL_URL_HIDE_ALL);
- fi->name = g_strdup(name);
- fi->full_name = full_name;
- fi->path = g_strdup(path);
- fi->unread_message_count = -1;
- fi->flags = li->flags;
-
- /* TODO: could look up count here ... */
- /* ?? */
- /*folder = camel_object_bag_get(store->folders, "INBOX");*/
-
- return fi;
-}
-
-/*
- a
- a/b
- a/b/c
- a/d
- b
- c/d
-
-*/
-
-/* note, pname is the raw name, not the folderinfo name */
-/* note also this free's as we go, since we never go 'backwards' */
-static CamelFolderInfo *
-folders_build_rec(CamelURL *base, GPtrArray *folders, int *ip, CamelFolderInfo *pfi, char *pname)
-{
- int plen = 0;
- CamelFolderInfo *last = NULL, *first = NULL;
-
- if (pfi)
- plen = strlen(pname);
-
- for(;(*ip)<(int)folders->len;) {
- CamelFolderInfo *fi;
- struct _list_info *li;
-
- li = folders->pdata[*ip];
- printf("checking '%s' is child of '%s'\n", li->name, pname);
-
- /* is this a child of the parent? */
- if (pfi != NULL
- && (strncmp(pname, li->name, strlen(pname)) != 0
- || li->name[plen] != li->separator)) {
- printf(" nope\n");
- break;
- }
- printf(" yep\n");
-
- /* is this not an immediate child of the parent? */
-#if 0
- char *p;
- if (pfi != NULL
- && li->separator != 0
- && (p = strchr(li->name + plen + 1, li->separator)) != NULL) {
- if (last == NULL) {
- struct _list_info tli;
-
- tli.flags = CAMEL_FOLDER_NOSELECT|CAMEL_FOLDER_CHILDREN;
- tli.separator = li->separator;
- tli.name = g_strndup(li->name, p-li->name+1);
- fi = folders_build_info(base, &tli);
- fi->parent = pfi;
- if (pfi && pfi->child == NULL)
- pfi->child = fi;
- i = folders_build_rec(folders, i, fi, tli.name);
- break;
- }
- }
-#endif
-
- fi = folders_build_info(base, li);
- fi->parent = pfi;
- if (last != NULL)
- last->sibling = fi;
- last = fi;
- if (first == NULL)
- first = fi;
-
- (*ip)++;
- fi->child = folders_build_rec(base, folders, ip, fi, li->name);
- imap_free_list(li);
- }
-
- return first;
-}
-
-static void
-folder_info_dump(CamelFolderInfo *fi, int depth)
-{
- char *s;
-
- s = alloca(depth+1);
- memset(s, ' ', depth);
- s[depth] = 0;
- while (fi) {
- printf("%s%s (%s)\n", s, fi->name, fi->url);
- if (fi->child)
- folder_info_dump(fi->child, depth+2);
- fi = fi->sibling;
- }
-
-}
-
-static CamelFolderInfo *
-imap_get_folder_info(CamelStore *store, const char *top, guint32 flags, CamelException *ex)
-{
- CamelIMAPPStore *istore = (CamelIMAPPStore *)store;
- CamelFolderInfo * fi= NULL;
- char *name;
-
- /* FIXME: temporary, since this is not a disco store */
- if (istore->driver == NULL
- && !camel_service_connect((CamelService *)store, ex))
- return NULL;
-
- name = (char *)top;
- if (name == NULL || name[0] == 0) {
- /* namespace? */
- name = "";
- }
-
- name = "";
-
- CAMEL_TRY {
- CamelURL *base;
- int i;
- GPtrArray *folders;
-
- /* FIXME: subscriptions? lsub? */
- folders = camel_imapp_driver_list(istore->driver, name, flags);
-
- /* this greatly simplifies the tree algorithm ... but it might
- be faster just to use a hashtable to find parents? */
- qsort(folders->pdata, folders->len, sizeof(folders->pdata[0]), folders_build_cmp);
-
- i = 0;
- base = camel_url_copy(((CamelService *)store)->url);
- fi = folders_build_rec(base, folders, &i, NULL, NULL);
- camel_url_free(base);
- g_ptr_array_free(folders, TRUE);
- } CAMEL_CATCH(e) {
- camel_exception_xfer(ex, e);
- } CAMEL_DONE;
-
- printf("built folder info:\n");
- folder_info_dump(fi, 2);
-
- return fi;
-
-#if 0
- if (top == NULL || !g_ascii_strcasecmp(top, "inbox")) {
- CamelURL *uri = camel_url_copy(((CamelService *)store)->url);
-
- camel_url_set_path(uri, "/INBOX");
- fi = g_malloc0(sizeof(*fi));
- fi->url = camel_url_to_string(uri, CAMEL_URL_HIDE_ALL);
- camel_url_free(uri);
- fi->name = g_strdup("INBOX");
- fi->full_name = g_strdup("INBOX");
- fi->path = g_strdup("/INBOX");
- fi->unread_message_count = -1;
- fi->flags = 0;
-
- folder = camel_object_bag_get(store->folders, "INBOX");
- if (folder) {
- /*if (!cflags & FAST)*/
- camel_imapp_driver_update(istore->driver, (CamelIMAPPFolder *)folder);
- fi->unread_message_count = camel_folder_get_unread_message_count(folder);
- camel_object_unref(folder);
- }
- } else {
- camel_exception_setv(ex, 1, "not implemented");
- }
-#endif
- return fi;
-
-#if 0
- istore->pending_list = g_ptr_array_new();
-
- CAMEL_TRY {
- ic = camel_imapp_engine_command_new(istore->driver->engine, "LIST", NULL, "LIST \"\" %f", top);
- camel_imapp_engine_command_queue(istore->driver->engine, ic);
- while (camel_imapp_engine_iterate(istore->driver->engine, ic) > 0)
- ;
-
- if (ic->status->result != IMAP_OK)
- camel_exception_throw(1, "list failed: %s", ic->status->text);
- } CAMEL_CATCH (e) {
- camel_exception_xfer(ex, e);
- } CAMEL_DONE;
-
- camel_imapp_engine_command_free(istore->driver->engine, ic);
-
- printf("got folder list:\n");
- for (i=0;i<(int)istore->pending_list->len;i++) {
- struct _list_info *linfo = istore->pending_list->pdata[i];
-
- printf("%s (%c)\n", linfo->name, linfo->separator);
- imap_free_list(linfo);
- }
- istore->pending_list = NULL;
-
- return NULL;
-#endif
-}
-
-static void
-imap_delete_folder(CamelStore *store, const char *folder_name, CamelException *ex)
-{
- camel_exception_setv(ex, 1, "delete_folder::unimplemented");
-}
-
-static void
-imap_rename_folder(CamelStore *store, const char *old, const char *new, CamelException *ex)
-{
- camel_exception_setv(ex, 1, "rename_folder::unimplemented");
-}
-
-static CamelFolderInfo *
-imap_create_folder(CamelStore *store, const char *parent_name, const char *folder_name, CamelException *ex)
-{
- camel_exception_setv(ex, 1, "create_folder::unimplemented");
- return NULL;
-}
-
-/* ********************************************************************** */
-#if 0
-static int store_resp_fetch(CamelIMAPPEngine *ie, guint32 id, void *data)
-{
- struct _fetch_info *finfo;
- CamelIMAPPStore *istore = data;
- CamelMessageInfo *info;
- struct _pending_fetch *pending;
-
- finfo = imap_parse_fetch(ie->stream);
- if (istore->selected) {
- if ((finfo->got & FETCH_UID) == 0) {
- printf("didn't get uid in fetch response?\n");
- } else {
- info = camel_folder_summary_index(((CamelFolder *)istore->selected)->summary, id-1);
- /* exists, check/update */
- if (info) {
- if (strcmp(finfo->uid, camel_message_info_uid(info)) != 0) {
- printf("summary at index %d has uid %s expected %s\n", id, camel_message_info_uid(info), finfo->uid);
- /* uid mismatch??? try do it based on uid instead? try to reorder? i dont know? */
- camel_folder_summary_info_free(((CamelFolder *)istore->selected)->summary, info);
- info = camel_folder_summary_uid(((CamelFolder *)istore->selected)->summary, finfo->uid);
- }
- }
-
- if (info) {
- if (finfo->got & (FETCH_FLAGS)) {
- printf("updating flags for uid '%s'\n", finfo->uid);
- info->flags = finfo->flags;
- camel_folder_change_info_change_uid(istore->selected->changes, finfo->uid);
- }
- if (finfo->got & FETCH_MINFO) {
- printf("got envelope unexpectedly?\n");
- }
- /* other things go here, like body fetches */
- } else {
- pending = g_hash_table_lookup(istore->pending_fetch_table, finfo->uid);
-
- /* we need to create a new info, we only care about flags and minfo */
-
- if (pending)
- info = pending->info;
- else {
- info = camel_folder_summary_info_new(((CamelFolder *)istore->selected)->summary);
- camel_message_info_set_uid(info, g_strdup(finfo->uid));
- }
-
- if (finfo->got & FETCH_FLAGS)
- info->flags = finfo->flags;
-
- if (finfo->got & FETCH_MINFO) {
- /* if we only use ENVELOPE? */
- camel_message_info_set_subject(info, g_strdup(camel_message_info_subject(finfo->minfo)));
- camel_message_info_set_from(info, g_strdup(camel_message_info_from(finfo->minfo)));
- camel_message_info_set_to(info, g_strdup(camel_message_info_to(finfo->minfo)));
- camel_message_info_set_cc(info, g_strdup(camel_message_info_cc(finfo->minfo)));
- info->date_sent = finfo->minfo->date_sent;
- camel_folder_summary_add(((CamelFolder *)istore->selected)->summary, info);
- camel_folder_change_info_add_uid(istore->selected->changes, finfo->uid);
- if (pending) {
- e_dlist_remove((EDListNode *)pending);
- g_hash_table_remove(istore->pending_fetch_table, finfo->uid);
- /*e_memchunk_free(istore->pending_fetch_chunks, pending);*/
- }
- } else if (finfo->got & FETCH_HEADER) {
- /* if we only use HEADER? */
- CamelMimeParser *mp;
-
- if (pending == NULL)
- camel_folder_summary_info_free(((CamelFolder *)istore->selected)->summary, info);
- mp = camel_mime_parser_new();
- camel_mime_parser_init_with_stream(mp, finfo->header);
- info = camel_folder_summary_info_new_from_parser(((CamelFolder *)istore->selected)->summary, mp);
- camel_object_unref(mp);
- camel_message_info_set_uid(info, g_strdup(finfo->uid));
-
- camel_folder_summary_add(((CamelFolder *)istore->selected)->summary, info);
- camel_folder_change_info_add_uid(istore->selected->changes, finfo->uid);
- if (pending) {
- /* FIXME: use a dlist */
- e_dlist_remove((EDListNode *)pending);
- g_hash_table_remove(istore->pending_fetch_table, camel_message_info_uid(pending->info));
- camel_folder_summary_info_free(((CamelFolder *)istore->selected)->summary, pending->info);
- /*e_memchunk_free(istore->pending_fetch_chunks, pending);*/
- }
- } else if (finfo->got & FETCH_FLAGS) {
- if (pending == NULL) {
- pending = e_memchunk_alloc(istore->pending_fetch_chunks);
- pending->info = info;
- g_hash_table_insert(istore->pending_fetch_table, (char *)camel_message_info_uid(info), pending);
- e_dlist_addtail(&istore->pending_fetch_list, (EDListNode *)pending);
- }
- } else {
- if (pending == NULL)
- camel_folder_summary_info_free(((CamelFolder *)istore->selected)->summary, info);
- printf("got unexpected fetch response?\n");
- imap_dump_fetch(finfo);
- }
- }
- }
- } else {
- printf("unexpected fetch response, no folder selected?\n");
- }
- /*imap_dump_fetch(finfo);*/
- imap_free_fetch(finfo);
-
- return camel_imapp_engine_skip(ie);
-}
-#endif
-
-/* ********************************************************************** */
-
-/* should be moved to imapp-utils?
- stuff in imapp-utils should be moved to imapp-parse? */
-
-/* ********************************************************************** */
-
-#if 0
-void
-camel_imapp_store_folder_selected(CamelIMAPPStore *store, CamelIMAPPFolder *folder, CamelIMAPPSelectResponse *select)
-{
- CamelIMAPPCommand * volatile ic = NULL;
- CamelIMAPPStore *istore = (CamelIMAPPStore *)store;
- int i;
- struct _uidset_state ss;
- GPtrArray *fetch;
- CamelMessageInfo *info;
- struct _pending_fetch *fw, *fn;
-
- printf("imap folder selected\n");
-
- if (select->uidvalidity == folder->uidvalidity
- && select->exists == folder->exists
- && select->recent == folder->recent
- && select->unseen == folder->unseen) {
- /* no work to do? */
- return;
- }
-
- istore->pending_fetch_table = g_hash_table_new(g_str_hash, g_str_equal);
- istore->pending_fetch_chunks = e_memchunk_new(256, sizeof(struct _pending_fetch));
-
- /* perform an update - flags first (and see what we have) */
- CAMEL_TRY {
- ic = camel_imapp_engine_command_new(istore->engine, "FETCH", NULL, "FETCH 1:%d (UID FLAGS)", select->exists);
- camel_imapp_engine_command_queue(istore->engine, ic);
- while (camel_imapp_engine_iterate(istore->engine, ic) > 0)
- ;
-
- if (ic->status->result != IMAP_OK)
- camel_exception_throw(1, "fetch failed: %s", ic->status->text);
-
- /* pending_fetch_list now contains any new messages */
- /* FIXME: how do we work out no-longer present messages? */
- printf("now fetching info for messages?\n");
- uidset_init(&ss, store->engine);
- ic = camel_imapp_engine_command_new(istore->engine, "FETCH", NULL, "UID FETCH ");
- fw = (struct _pending_fetch *)istore->pending_fetch_list.head;
- fn = fw->next;
- while (fn) {
- info = fw->info;
- /* if the uid set fills, then flush the command out */
- if (uidset_add(&ss, ic, camel_message_info_uid(info))
- || (fn->next == NULL && uidset_done(&ss, ic))) {
- camel_imapp_engine_command_add(istore->engine, ic, " (FLAGS RFC822.HEADER)");
- camel_imapp_engine_command_queue(istore->engine, ic);
- while (camel_imapp_engine_iterate(istore->engine, ic) > 0)
- ;
- if (ic->status->result != IMAP_OK)
- camel_exception_throw(1, "fetch failed: %s", ic->status->text);
- /* if not end ... */
- camel_imapp_engine_command_free(istore->engine, ic);
- ic = camel_imapp_engine_command_new(istore->engine, "FETCH", NULL, "UID FETCH ");
- }
- fw = fn;
- fn = fn->next;
- }
-
- printf("The pending list should now be empty: %s\n", e_dlist_empty(&istore->pending_fetch_list)?"TRUE":"FALSE");
- for (i=0;i<10;i++) {
- info = camel_folder_summary_index(((CamelFolder *)istore->selected)->summary, i);
- if (info) {
- printf("message info [%d] =\n", i);
- camel_message_info_dump(info);
- camel_folder_summary_info_free(((CamelFolder *)istore->selected)->summary, info);
- }
- }
- } CAMEL_CATCH (e) {
- /* FIXME: cleanup */
- camel_exception_throw_ex(e);
- } CAMEL_DONE;
-
- g_hash_table_destroy(istore->pending_fetch_table);
- istore->pending_fetch_table = NULL;
- e_memchunk_destroy(istore->pending_fetch_chunks);
-
- camel_imapp_engine_command_free(istore->engine, ic);
-}
-#endif
-
-#if 0
-/*char *uids[] = {"1", "2", "4", "5", "6", "7", "9", "11", "12", 0};*/
-/*char *uids[] = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", 0};*/
-char *uids[] = {"1", "3", "5", "7", "9", "11", "12", "13", "14", "15", "20", "21", "24", "25", "26", 0};
-
-void
-uidset_test(CamelIMAPPEngine *ie)
-{
- struct _uidset_state ss;
- CamelIMAPPCommand *ic;
- int i;
-
- /*ic = camel_imapp_engine_command_new(ie, 0, "FETCH", NULL, "FETCH ");*/
- uidset_init(&ss, 0, 0);
- for (i=0;uids[i];i++) {
- if (uidset_add(&ss, uids[i])) {
- printf("\n[%d] flushing uids\n", i);
- }
- }
-
- if (uidset_done(&ss)) {
- printf("\nflushing uids\n");
- }
-}
-#endif
diff --git a/camel/providers/imapp/camel-imapp-store.h b/camel/providers/imapp/camel-imapp-store.h
deleted file mode 100644
index 97b7afd1d1..0000000000
--- a/camel/providers/imapp/camel-imapp-store.h
+++ /dev/null
@@ -1,77 +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: Michael Zucchi <notzed@ximian.com>
- *
- * Copyright (C) 2002 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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_IMAPP_STORE_H
-#define CAMEL_IMAPP_STORE_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <camel/camel-types.h>
-#include <camel/camel-store.h>
-#include "camel-imapp-driver.h"
-#include "e-util/e-memory.h"
-
-#define CAMEL_IMAPP_STORE_TYPE (camel_imapp_store_get_type ())
-#define CAMEL_IMAPP_STORE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_IMAPP_STORE_TYPE, CamelIMAPPStore))
-#define CAMEL_IMAPP_STORE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_IMAPP_STORE_TYPE, CamelIMAPPStoreClass))
-#define CAMEL_IS_IMAP_STORE(o) (CAMEL_CHECK_TYPE((o), CAMEL_IMAPP_STORE_TYPE))
-
-struct _pending_fetch {
- struct _pending_fetch *next;
- struct _pending_fetch *prev;
-
- CamelMessageInfo *info;
-};
-
-typedef struct {
- CamelStore parent_object;
-
- struct _CamelIMAPPStoreSummary *summary; /* in-memory list of folders */
- struct _CamelIMAPPDriver *driver; /* IMAP processing engine */
- struct _CamelDataCache *cache;
-
- /* if we had a login error, what to show to user */
- char *login_error;
-
- GPtrArray *pending_list;
-} CamelIMAPPStore;
-
-typedef struct {
- CamelStoreClass parent_class;
-
-} CamelIMAPPStoreClass;
-
-/* Standard Camel function */
-CamelType camel_imapp_store_get_type (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_IMAPP_STORE_H */
-
-
diff --git a/camel/providers/imapp/camel-imapp-stream.c b/camel/providers/imapp/camel-imapp-stream.c
deleted file mode 100644
index 20876beae2..0000000000
--- a/camel/providers/imapp/camel-imapp-stream.c
+++ /dev/null
@@ -1,761 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; fill-column: 160 -*-
- *
- * 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <errno.h>
-
-#include <glib.h>
-
-#include <camel/camel-stream-mem.h>
-
-#include "camel-imapp-stream.h"
-#include "camel-imapp-exception.h"
-
-#define t(x)
-#define io(x) x
-
-static void setup_table(void);
-
-static CamelObjectClass *parent_class = NULL;
-
-/* Returns the class for a CamelStream */
-#define CS_CLASS(so) CAMEL_IMAPP_STREAM_CLASS(CAMEL_OBJECT_GET_CLASS(so))
-
-#define CAMEL_IMAPP_STREAM_SIZE (4096)
-#define CAMEL_IMAPP_STREAM_TOKEN (4096) /* maximum token size */
-
-static int
-stream_fill(CamelIMAPPStream *is)
-{
- int left = 0;
-
- if (is->source) {
- left = is->end - is->ptr;
- memcpy(is->buf, is->ptr, left);
- is->end = is->buf + left;
- is->ptr = is->buf;
- left = camel_stream_read(is->source, is->end, CAMEL_IMAPP_STREAM_SIZE - (is->end - is->buf));
- if (left > 0) {
- is->end += left;
- io(printf("camel_imapp_read: buffer is '%.*s'\n", is->end - is->ptr, is->ptr));
- return is->end - is->ptr;
- } else {
- io(printf("camel_imapp_read: -1\n"));
- return -1;
- }
- }
-
- printf("camel_imapp_read: -1\n");
-
- return -1;
-}
-
-static ssize_t
-stream_read(CamelStream *stream, char *buffer, size_t n)
-{
- CamelIMAPPStream *is = (CamelIMAPPStream *)stream;
- ssize_t max;
-
- if (is->literal == 0 || n == 0)
- return 0;
-
- max = is->end - is->ptr;
- if (max > 0) {
- max = MIN(max, is->literal);
- max = MIN(max, n);
- memcpy(buffer, is->ptr, max);
- is->ptr += max;
- } else {
- max = MIN(is->literal, n);
- max = camel_stream_read(is->source, buffer, max);
- if (max <= 0)
- return max;
- }
-
- is->literal -= max;
-
- return max;
-}
-
-static ssize_t
-stream_write(CamelStream *stream, const char *buffer, size_t n)
-{
- CamelIMAPPStream *is = (CamelIMAPPStream *)stream;
-
- return camel_stream_write(is->source, buffer, n);
-}
-
-static int
-stream_close(CamelStream *stream)
-{
- /* nop? */
- return 0;
-}
-
-static int
-stream_flush(CamelStream *stream)
-{
- /* nop? */
- return 0;
-}
-
-static gboolean
-stream_eos(CamelStream *stream)
-{
- CamelIMAPPStream *is = (CamelIMAPPStream *)stream;
-
- return is->literal == 0;
-}
-
-static int
-stream_reset(CamelStream *stream)
-{
- /* nop? reset literal mode? */
- return 0;
-}
-
-static void
-camel_imapp_stream_class_init (CamelStreamClass *camel_imapp_stream_class)
-{
- CamelStreamClass *camel_stream_class = (CamelStreamClass *)camel_imapp_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;
-}
-
-static void
-camel_imapp_stream_init(CamelIMAPPStream *is, CamelIMAPPStreamClass *isclass)
-{
- /* +1 is room for appending a 0 if we need to for a token */
- is->ptr = is->end = is->buf = g_malloc(CAMEL_IMAPP_STREAM_SIZE+1);
- is->tokenptr = is->tokenbuf = g_malloc(CAMEL_IMAPP_STREAM_SIZE+1);
- is->tokenend = is->tokenbuf + CAMEL_IMAPP_STREAM_SIZE;
-}
-
-static void
-camel_imapp_stream_finalise(CamelIMAPPStream *is)
-{
- g_free(is->buf);
- if (is->source)
- camel_object_unref((CamelObject *)is->source);
-}
-
-CamelType
-camel_imapp_stream_get_type (void)
-{
- static CamelType camel_imapp_stream_type = CAMEL_INVALID_TYPE;
-
- if (camel_imapp_stream_type == CAMEL_INVALID_TYPE) {
- setup_table();
- camel_imapp_stream_type = camel_type_register( camel_stream_get_type(),
- "CamelIMAPPStream",
- sizeof( CamelIMAPPStream ),
- sizeof( CamelIMAPPStreamClass ),
- (CamelObjectClassInitFunc) camel_imapp_stream_class_init,
- NULL,
- (CamelObjectInitFunc) camel_imapp_stream_init,
- (CamelObjectFinalizeFunc) camel_imapp_stream_finalise );
- }
-
- return camel_imapp_stream_type;
-}
-
-/**
- * camel_imapp_stream_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_imapp_stream_new(CamelStream *source)
-{
- CamelIMAPPStream *is;
-
- is = (CamelIMAPPStream *)camel_object_new(camel_imapp_stream_get_type ());
- camel_object_ref((CamelObject *)source);
- is->source = source;
-
- return (CamelStream *)is;
-}
-
-
-/*
- From rfc2060
-
-ATOM_CHAR ::= <any CHAR except atom_specials>
-
-atom_specials ::= "(" / ")" / "{" / SPACE / CTL / list_wildcards /
- quoted_specials
-
-CHAR ::= <any 7-bit US-ASCII character except NUL,
- 0x01 - 0x7f>
-
-CTL ::= <any ASCII control character and DEL,
- 0x00 - 0x1f, 0x7f>
-
-SPACE ::= <ASCII SP, space, 0x20>
-
-list_wildcards ::= "%" / "*"
-
-quoted_specials ::= <"> / "\"
-*/
-
-static unsigned char imap_specials[256] = {
-/* 00 */0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-/* 10 */0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-/* 20 */0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1,
-/* 30 */1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-/* 40 */1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-/* 50 */1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1,
-/* 60 */1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-/* 70 */1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-#define imap_is_atom(c) ((imap_specials[(c)&0xff] & 0x01) != 0)
-#define imap_is_simple(c) ((imap_specials[(c)&0xff] & 0x02) != 0)
-#define imap_not_id(c) ((imap_specials[(c)&0xff] & 0x04) != 0)
-
-/* could be pregenerated, but this is cheap */
-static struct {
- unsigned char *chars;
- unsigned char mask;
-} is_masks[] = {
- { "\n*()[]+", 2 },
- { " \r\n()[]+", 4 },
-};
-
-static void setup_table(void)
-{
- int i;
- unsigned char *p, c;
-
- for (i=0;i<(int)(sizeof(is_masks)/sizeof(is_masks[0]));i++) {
- p = is_masks[i].chars;
- while ((c = *p++))
- imap_specials[c] |= is_masks[i].mask;
- }
-}
-
-#if 0
-
-static int
-skip_ws(CamelIMAPPStream *is, unsigned char *pp, unsigned char *pe)
-{
- register unsigned char c, *p;
- unsigned char *e;
-
- p = is->ptr;
- e = is->end;
-
- do {
- while (p >= e ) {
- is->ptr = p;
- if (stream_fill(is) == IMAP_TOK_ERROR)
- return IMAP_TOK_ERROR;
- p = is->ptr;
- e = is->end;
- }
- c = *p++;
- } while (c == ' ' || c == '\r');
-
- is->ptr = p;
- is->end = e;
-
- return c;
-}
-#endif
-
-/* FIXME: these should probably handle it themselves,
- and get rid of the token interface? */
-int
-camel_imapp_stream_atom(CamelIMAPPStream *is, unsigned char **data, unsigned int *lenp)
-{
- unsigned char *p, c;
-
- /* this is only 'approximate' atom */
- switch(camel_imapp_stream_token(is, data, lenp)) {
- case IMAP_TOK_TOKEN:
- p = *data;
- while ((c = *p))
- *p++ = toupper(c);
- case IMAP_TOK_INT:
- return 0;
- case IMAP_TOK_ERROR:
- return IMAP_TOK_ERROR;
- default:
- camel_exception_throw(1, "expecting atom");
- printf("expecting atom!\n");
- return IMAP_TOK_PROTOCOL;
- }
-}
-
-/* gets an atom, a quoted_string, or a literal */
-int
-camel_imapp_stream_astring(CamelIMAPPStream *is, unsigned char **data)
-{
- unsigned char *p, *start;
- unsigned int len, inlen;
-
- switch(camel_imapp_stream_token(is, data, &len)) {
- case IMAP_TOK_TOKEN:
- case IMAP_TOK_INT:
- case IMAP_TOK_STRING:
- return 0;
- case IMAP_TOK_LITERAL:
- /* FIXME: just grow buffer */
- if (len >= CAMEL_IMAPP_STREAM_TOKEN) {
- camel_exception_throw(1, "astring: literal too long");
- printf("astring too long\n");
- return IMAP_TOK_PROTOCOL;
- }
- p = is->tokenptr;
- camel_imapp_stream_set_literal(is, len);
- do {
- len = camel_imapp_stream_getl(is, &start, &inlen);
- if (len < 0)
- return len;
- memcpy(p, start, inlen);
- p += inlen;
- } while (len > 0);
- *data = is->tokenptr;
- return 0;
- case IMAP_TOK_ERROR:
- /* wont get unless no exception hanlder*/
- return IMAP_TOK_ERROR;
- default:
- camel_exception_throw(1, "expecting astring");
- printf("expecting astring!\n");
- return IMAP_TOK_PROTOCOL;
- }
-}
-
-/* check for NIL or (small) quoted_string or literal */
-int
-camel_imapp_stream_nstring(CamelIMAPPStream *is, unsigned char **data)
-{
- unsigned char *p, *start;
- unsigned int len, inlen;
-
- switch(camel_imapp_stream_token(is, data, &len)) {
- case IMAP_TOK_STRING:
- return 0;
- case IMAP_TOK_LITERAL:
- /* FIXME: just grow buffer */
- if (len >= CAMEL_IMAPP_STREAM_TOKEN) {
- camel_exception_throw(1, "nstring: literal too long");
- return IMAP_TOK_PROTOCOL;
- }
- p = is->tokenptr;
- camel_imapp_stream_set_literal(is, len);
- do {
- len = camel_imapp_stream_getl(is, &start, &inlen);
- if (len < 0)
- return len;
- memcpy(p, start, inlen);
- p += inlen;
- } while (len > 0);
- *data = is->tokenptr;
- return 0;
- case IMAP_TOK_TOKEN:
- p = *data;
- if (toupper(p[0]) == 'N' && toupper(p[1]) == 'I' && toupper(p[2]) == 'L' && p[3] == 0) {
- *data = NULL;
- return 0;
- }
- default:
- camel_exception_throw(1, "expecting nstring");
- return IMAP_TOK_PROTOCOL;
- case IMAP_TOK_ERROR:
- /* we'll never get this unless there are no exception handlers anyway */
- return IMAP_TOK_ERROR;
-
- }
-}
-
-/* parse an nstring as a stream */
-int
-camel_imapp_stream_nstring_stream(CamelIMAPPStream *is, CamelStream **stream)
-/* throws IO,PARSE exception */
-{
- unsigned char *token;
- unsigned int len;
- int ret = 0;
- CamelStream * volatile mem = NULL;
-
- *stream = NULL;
-
- CAMEL_TRY {
- switch(camel_imapp_stream_token(is, &token, &len)) {
- case IMAP_TOK_STRING:
- mem = camel_stream_mem_new_with_buffer(token, len);
- *stream = mem;
- break;
- case IMAP_TOK_LITERAL:
- /* if len is big, we could automatically use a file backing */
- camel_imapp_stream_set_literal(is, len);
- mem = camel_stream_mem_new();
- if (camel_stream_write_to_stream((CamelStream *)is, mem) == -1)
- camel_exception_throw(1, "nstring: io error: %s", strerror(errno));
- camel_stream_reset(mem);
- *stream = mem;
- break;
- case IMAP_TOK_TOKEN:
- if (toupper(token[0]) == 'N' && toupper(token[1]) == 'I' && toupper(token[2]) == 'L' && token[3] == 0) {
- *stream = NULL;
- break;
- }
- default:
- ret = -1;
- camel_exception_throw(1, "nstring: token not string");
- }
- } CAMEL_CATCH(ex) {
- if (mem)
- camel_object_unref((CamelObject *)mem);
- camel_exception_throw_ex(ex);
- } CAMEL_DONE;
-
- /* never reaches here anyway */
- return ret;
-}
-
-guint32
-camel_imapp_stream_number(CamelIMAPPStream *is)
-{
- unsigned char *token;
- unsigned int len;
-
- if (camel_imapp_stream_token(is, &token, &len) != IMAP_TOK_INT) {
- camel_exception_throw(1, "expecting number");
- return 0;
- }
-
- return strtoul(token, 0, 10);
-}
-
-int
-camel_imapp_stream_text(CamelIMAPPStream *is, unsigned char **text)
-{
- GByteArray *build = g_byte_array_new();
- unsigned char *token;
- unsigned int len;
- int tok;
-
- CAMEL_TRY {
- while (is->unget > 0) {
- switch (is->unget_tok) {
- case IMAP_TOK_TOKEN:
- case IMAP_TOK_STRING:
- case IMAP_TOK_INT:
- g_byte_array_append(build, is->unget_token, is->unget_len);
- g_byte_array_append(build, " ", 1);
- default: /* invalid, but we'll ignore */
- break;
- }
- is->unget--;
- }
-
- do {
- tok = camel_imapp_stream_gets(is, &token, &len);
- if (tok < 0)
- camel_exception_throw(1, "io error: %s", strerror(errno));
- if (len)
- g_byte_array_append(build, token, len);
- } while (tok > 0);
- } CAMEL_CATCH(ex) {
- *text = NULL;
- g_byte_array_free(build, TRUE);
- camel_exception_throw_ex(ex);
- } CAMEL_DONE;
-
- g_byte_array_append(build, "", 1);
- *text = build->data;
- g_byte_array_free(build, FALSE);
-
- return 0;
-}
-
-/* Get one token from the imap stream */
-camel_imapp_token_t
-/* throws IO,PARSE exception */
-camel_imapp_stream_token(CamelIMAPPStream *is, unsigned char **data, unsigned int *len)
-{
- register unsigned char c, *p, *o, *oe;
- unsigned char *e;
- unsigned int literal;
- int digits;
-
- if (is->unget > 0) {
- is->unget--;
- *data = is->unget_token;
- *len = is->unget_len;
- /*printf("token UNGET '%c' %s\n", is->unget_tok, is->unget_token);*/
- return is->unget_tok;
- }
-
- if (is->literal > 0)
- g_warning("stream_token called with literal %d", is->literal);
-
- p = is->ptr;
- e = is->end;
-
- /* skip whitespace/prefill buffer */
- do {
- while (p >= e ) {
- is->ptr = p;
- if (stream_fill(is) == IMAP_TOK_ERROR)
- goto io_error;
- p = is->ptr;
- e = is->end;
- }
- c = *p++;
- } while (c == ' ' || c == '\r');
-
- /*strchr("\n*()[]+", c)*/
- if (imap_is_simple(c)) {
- is->ptr = p;
- t(printf("token '%c'\n", c));
- return c;
- } else if (c == '{') {
- literal = 0;
- *data = p;
- while (1) {
- while (p < e) {
- c = *p++;
- if (isdigit(c) && literal < (UINT_MAX/10)) {
- literal = literal * 10 + (c - '0');
- } else if (c == '}') {
- while (1) {
- while (p < e) {
- c = *p++;
- if (c == '\n') {
- *len = literal;
- is->ptr = p;
- is->literal = literal;
- t(printf("token LITERAL %d\n", literal));
- return IMAP_TOK_LITERAL;
- }
- }
- is->ptr = p;
- if (stream_fill(is) == IMAP_TOK_ERROR)
- goto io_error;
- p = is->ptr;
- e = is->end;
- }
- } else {
- if (isdigit(c))
- printf("Protocol error: literal too big\n");
- else
- printf("Protocol error: literal contains invalid char %02x '%c'\n", c, isprint(c)?c:c);
- goto protocol_error;
- }
- }
- is->ptr = p;
- if (stream_fill(is) == IMAP_TOK_ERROR)
- goto io_error;
- p = is->ptr;
- e = is->end;
- }
- } else if (c == '"') {
- o = is->tokenptr;
- oe = is->tokenptr + CAMEL_IMAPP_STREAM_TOKEN - 1;
- while (1) {
- while (p < e) {
- c = *p++;
- if (c == '\\') {
- while (p >= e) {
- is->ptr = p;
- if (stream_fill(is) == IMAP_TOK_ERROR)
- goto io_error;
- p = is->ptr;
- e = is->end;
- }
- c = *p++;
- } else if (c == '\"') {
- is->ptr = p;
- *o = 0;
- *data = is->tokenbuf;
- *len = o - is->tokenbuf;
- t(printf("token STRING '%s'\n", is->tokenbuf));
- return IMAP_TOK_STRING;
- }
-
- if (c == '\n' || c == '\r' || o>=oe) {
- if (o >= oe)
- printf("Protocol error: string too long\n");
- else
- printf("Protocol error: truncated string\n");
- goto protocol_error;
- } else {
- *o++ = c;
- }
- }
- is->ptr = p;
- if (stream_fill(is) == IMAP_TOK_ERROR)
- goto io_error;
- p = is->ptr;
- e = is->end;
- }
- } else {
- o = is->tokenptr;
- oe = is->tokenptr + CAMEL_IMAPP_STREAM_TOKEN - 1;
- digits = isdigit(c);
- *o++ = c;
- while (1) {
- while (p < e) {
- c = *p++;
- /*if (strchr(" \r\n*()[]+", c) != NULL) {*/
- if (imap_not_id(c)) {
- if (c == ' ' || c == '\r')
- is->ptr = p;
- else
- is->ptr = p-1;
- *o = 0;
- *data = is->tokenbuf;
- *len = o - is->tokenbuf;
- t(printf("token TOKEN '%s'\n", is->tokenbuf));
- return digits?IMAP_TOK_INT:IMAP_TOK_TOKEN;
- } else if (o < oe) {
- digits &= isdigit(c);
- *o++ = c;
- } else {
- printf("Protocol error: token too long\n");
- goto protocol_error;
- }
- }
- is->ptr = p;
- if (stream_fill(is) == IMAP_TOK_ERROR)
- goto io_error;
- p = is->ptr;
- e = is->end;
- }
- }
-
- /* Had an i/o erorr */
-io_error:
- printf("Got io error\n");
- camel_exception_throw(1, "io error");
- return IMAP_TOK_ERROR;
-
- /* Protocol error, skip until next lf? */
-protocol_error:
- printf("Got protocol error\n");
-
- if (c == '\n')
- is->ptr = p-1;
- else
- is->ptr = p;
-
- camel_exception_throw(1, "protocol error");
- return IMAP_TOK_PROTOCOL;
-}
-
-void
-camel_imapp_stream_ungettoken(CamelIMAPPStream *is, camel_imapp_token_t tok, unsigned char *token, unsigned int len)
-{
- /*printf("ungettoken: '%c' '%s'\n", tok, token);*/
- is->unget_tok = tok;
- is->unget_token = token;
- is->unget_len = len;
- is->unget++;
-}
-
-/* returns -1 on error, 0 if last lot of data, >0 if more remaining */
-int camel_imapp_stream_gets(CamelIMAPPStream *is, unsigned char **start, unsigned int *len)
-{
- int max;
- unsigned char *end;
-
- *len = 0;
-
- max = is->end - is->ptr;
- if (max == 0) {
- max = stream_fill(is);
- if (max <= 0)
- return max;
- }
-
- *start = is->ptr;
- end = memchr(is->ptr, '\n', max);
- if (end)
- max = (end - is->ptr) + 1;
- *start = is->ptr;
- *len = max;
- is->ptr += max;
-
- return end == NULL?1:0;
-}
-
-void camel_imapp_stream_set_literal(CamelIMAPPStream *is, unsigned int literal)
-{
- is->literal = literal;
-}
-
-/* returns -1 on erorr, 0 if last data, >0 if more data left */
-int camel_imapp_stream_getl(CamelIMAPPStream *is, unsigned char **start, unsigned int *len)
-{
- int max;
-
- *len = 0;
-
- if (is->literal > 0) {
- max = is->end - is->ptr;
- if (max == 0) {
- max = stream_fill(is);
- if (max <= 0)
- return max;
- }
-
- max = MIN(max, is->literal);
- *start = is->ptr;
- *len = max;
- is->ptr += max;
- is->literal -= max;
- }
-
- if (is->literal > 0)
- return 1;
-
- return 0;
-}
diff --git a/camel/providers/imapp/camel-imapp-stream.h b/camel/providers/imapp/camel-imapp-stream.h
deleted file mode 100644
index 802c018672..0000000000
--- a/camel/providers/imapp/camel-imapp-stream.h
+++ /dev/null
@@ -1,90 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_IMAPP_STREAM_H
-#define _CAMEL_IMAPP_STREAM_H
-
-#include <camel/camel-stream.h>
-
-#define CAMEL_IMAPP_STREAM(obj) CAMEL_CHECK_CAST (obj, camel_imapp_stream_get_type (), CamelIMAPPStream)
-#define CAMEL_IMAPP_STREAM_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_imapp_stream_get_type (), CamelIMAPPStreamClass)
-#define CAMEL_IS_IMAP_STREAM(obj) CAMEL_CHECK_TYPE (obj, camel_imapp_stream_get_type ())
-
-typedef struct _CamelIMAPPStreamClass CamelIMAPPStreamClass;
-typedef struct _CamelIMAPPStream CamelIMAPPStream;
-
-typedef enum {
- IMAP_TOK_PROTOCOL = -2,
- IMAP_TOK_ERROR = -1,
- IMAP_TOK_TOKEN = 256,
- IMAP_TOK_STRING,
- IMAP_TOK_INT,
- IMAP_TOK_LITERAL,
-} camel_imapp_token_t;
-
-struct _CamelIMAPPStream {
- CamelStream parent;
-
- CamelStream *source;
-
- /*int state;*/
- unsigned char *buf, *ptr, *end;
- unsigned int literal;
-
- unsigned int unget;
- camel_imapp_token_t unget_tok;
- unsigned char *unget_token;
- unsigned int unget_len;
-
- unsigned char *tokenbuf, *tokenptr, *tokenend;
-};
-
-struct _CamelIMAPPStreamClass {
- CamelStreamClass parent_class;
-};
-
-CamelType camel_imapp_stream_get_type (void);
-
-CamelStream *camel_imapp_stream_new (CamelStream *source);
-
-camel_imapp_token_t camel_imapp_stream_token (CamelIMAPPStream *is, unsigned char **start, unsigned int *len); /* throws IO,PARSE exception */
-void camel_imapp_stream_ungettoken (CamelIMAPPStream *is, camel_imapp_token_t tok, unsigned char *token, unsigned int len);
-
-void camel_imapp_stream_set_literal (CamelIMAPPStream *is, unsigned int literal);
-int camel_imapp_stream_gets (CamelIMAPPStream *is, unsigned char **start, unsigned int *len);
-int camel_imapp_stream_getl (CamelIMAPPStream *is, unsigned char **start, unsigned int *len);
-
-/* all throw IO,PARSE exceptions */
-
-/* gets an atom, upper-cases */
-int camel_imapp_stream_atom (CamelIMAPPStream *is, unsigned char **start, unsigned int *len);
-/* gets an atom or string */
-int camel_imapp_stream_astring (CamelIMAPPStream *is, unsigned char **start);
-/* gets a NIL or a string, start==NULL if NIL */
-int camel_imapp_stream_nstring (CamelIMAPPStream *is, unsigned char **start);
-/* gets a NIL or string into a stream, stream==NULL if NIL */
-int camel_imapp_stream_nstring_stream(CamelIMAPPStream *is, CamelStream **stream);
-/* gets 'text' */
-int camel_imapp_stream_text (CamelIMAPPStream *is, unsigned char **text);
-
-/* gets a 'number' */
-guint32 camel_imapp_stream_number(CamelIMAPPStream *is);
-
-#endif /* ! _CAMEL_IMAPP_STREAM_H */
diff --git a/camel/providers/imapp/camel-imapp-summary.c b/camel/providers/imapp/camel-imapp-summary.c
deleted file mode 100644
index a0df21bcb0..0000000000
--- a/camel/providers/imapp/camel-imapp-summary.c
+++ /dev/null
@@ -1,166 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <unistd.h>
-#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include "camel-imapp-summary.h"
-#include <camel/camel-file-utils.h>
-
-#define CAMEL_IMAPP_SUMMARY_VERSION (0x1000)
-
-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 void camel_imapp_summary_class_init(CamelIMAPPSummaryClass *klass);
-static void camel_imapp_summary_init (CamelIMAPPSummary *obj);
-
-static CamelFolderSummaryClass *camel_imapp_summary_parent;
-
-CamelType
-camel_imapp_summary_get_type(void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register(
- camel_folder_summary_get_type(), "CamelIMAPPSummary",
- sizeof(CamelIMAPPSummary),
- sizeof(CamelIMAPPSummaryClass),
- (CamelObjectClassInitFunc) camel_imapp_summary_class_init,
- NULL,
- (CamelObjectInitFunc) camel_imapp_summary_init,
- NULL);
- }
-
- return type;
-}
-
-static void
-camel_imapp_summary_class_init(CamelIMAPPSummaryClass *klass)
-{
- CamelFolderSummaryClass *cfs_class =(CamelFolderSummaryClass *) klass;
-
- camel_imapp_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;
-}
-
-static void
-camel_imapp_summary_init(CamelIMAPPSummary *obj)
-{
- CamelFolderSummary *s =(CamelFolderSummary *)obj;
-
- /* subclasses need to set the right instance data sizes */
- s->message_info_size = sizeof(CamelIMAPPMessageInfo);
- s->content_info_size = sizeof(CamelMessageContentInfo);
-
- /* and a unique file version */
- s->version += CAMEL_IMAPP_SUMMARY_VERSION;
-}
-
-/**
- * camel_imapp_summary_new:
- * @filename: the file to store the summary in.
- *
- * This will create a new CamelIMAPPSummary object and read in the
- * summary data from disk, if it exists.
- *
- * Return value: A new CamelIMAPPSummary object.
- **/
-CamelFolderSummary *
-camel_imapp_summary_new(void)
-{
- CamelFolderSummary *summary = CAMEL_FOLDER_SUMMARY(camel_object_new(camel_imapp_summary_get_type()));
-
- return summary;
-}
-
-
-static int
-summary_header_load(CamelFolderSummary *s, FILE *in)
-{
- CamelIMAPPSummary *ims = CAMEL_IMAPP_SUMMARY(s);
-
- if (camel_imapp_summary_parent->summary_header_load(s, in) == -1)
- return -1;
-
- return camel_file_util_decode_uint32(in, &ims->uidvalidity);
-}
-
-static int
-summary_header_save(CamelFolderSummary *s, FILE *out)
-{
- CamelIMAPPSummary *ims = CAMEL_IMAPP_SUMMARY(s);
-
- if (camel_imapp_summary_parent->summary_header_save(s, out) == -1)
- return -1;
-
- return camel_file_util_encode_uint32(out, ims->uidvalidity);
-}
-
-
-static CamelMessageInfo *
-message_info_load(CamelFolderSummary *s, FILE *in)
-{
- CamelMessageInfo *info;
- CamelIMAPPMessageInfo *iinfo;
-
- info = camel_imapp_summary_parent->message_info_load(s, in);
- if (info) {
- iinfo =(CamelIMAPPMessageInfo *)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)
-{
- CamelIMAPPMessageInfo *iinfo =(CamelIMAPPMessageInfo *)info;
-
- if (camel_imapp_summary_parent->message_info_save(s, out, info) == -1)
- return -1;
-
- return camel_file_util_encode_uint32(out, iinfo->server_flags);
-}
diff --git a/camel/providers/imapp/camel-imapp-summary.h b/camel/providers/imapp/camel-imapp-summary.h
deleted file mode 100644
index e9783625f4..0000000000
--- a/camel/providers/imapp/camel-imapp-summary.h
+++ /dev/null
@@ -1,65 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_IMAPP_SUMMARY_H
-#define _CAMEL_IMAPP_SUMMARY_H
-
-#include <camel/camel-folder-summary.h>
-#include <camel/camel-exception.h>
-
-#define CAMEL_IMAPP_SUMMARY(obj) CAMEL_CHECK_CAST (obj, camel_imapp_summary_get_type (), CamelIMAPPSummary)
-#define CAMEL_IMAPP_SUMMARY_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_imapp_summary_get_type (), CamelIMAPPSummaryClass)
-#define CAMEL_IS_IMAPP_SUMMARY(obj) CAMEL_CHECK_TYPE (obj, camel_imapp_summary_get_type ())
-
-#define CAMEL_IMAPP_SERVER_FLAGS (CAMEL_MESSAGE_ANSWERED | \
- CAMEL_MESSAGE_DELETED | \
- CAMEL_MESSAGE_DRAFT | \
- CAMEL_MESSAGE_FLAGGED | \
- CAMEL_MESSAGE_SEEN)
-
-#define CAMEL_IMAPP_MESSAGE_RECENT (1 << 8)
-
-typedef struct _CamelIMAPPSummaryClass CamelIMAPPSummaryClass;
-typedef struct _CamelIMAPPSummary CamelIMAPPSummary;
-
-typedef struct _CamelIMAPPMessageInfo {
- CamelMessageInfo info;
-
- guint32 server_flags;
-} CamelIMAPPMessageInfo;
-
-struct _CamelIMAPPSummary {
- CamelFolderSummary parent;
-
- guint32 uidvalidity;
-};
-
-struct _CamelIMAPPSummaryClass {
- CamelFolderSummaryClass parent_class;
-
-};
-
-CamelType camel_imapp_summary_get_type (void);
-CamelFolderSummary *camel_imapp_summary_new (void);
-
-#endif /* ! _CAMEL_IMAPP_SUMMARY_H */
-
diff --git a/camel/providers/imapp/camel-imapp-utils.c b/camel/providers/imapp/camel-imapp-utils.c
deleted file mode 100644
index e20499689d..0000000000
--- a/camel/providers/imapp/camel-imapp-utils.c
+++ /dev/null
@@ -1,1339 +0,0 @@
-
-#include <ctype.h>
-#include <errno.h>
-#include <string.h>
-
-#include <camel/camel-folder-summary.h>
-#include <camel/camel-store.h>
-#include <camel/camel-utf8.h>
-
-#include "camel-imapp-folder.h"
-#include "camel-imapp-stream.h"
-#include "camel-imapp-utils.h"
-#include "camel-imapp-exception.h"
-#include "camel-imapp-engine.h"
-#include "e-util/e-memory.h"
-
-/* high-level parser state */
-#define p(x)
-/* debug */
-#define d(x)
-
-/* ANSI-C code produced by gperf version 2.7 */
-/* Command-line: gperf -H imap_hash -N imap_tokenise -L ANSI-C -o -t -k1,$ imap-tokens.txt */
-struct _imap_keyword { char *name; enum _imap_id id; };
-/*
- gperf input file
- best hash generated using: gperf -o -s-2 -k1,'$' -t -H imap_hash -N imap_tokenise -L ANSI-C
-*/
-
-#define TOTAL_KEYWORDS 23
-#define MIN_WORD_LENGTH 2
-#define MAX_WORD_LENGTH 14
-#define MIN_HASH_VALUE 2
-#define MAX_HASH_VALUE 38
-/* maximum key range = 37, duplicates = 0 */
-
-#ifdef __GNUC__
-__inline
-#endif
-static unsigned int
-imap_hash (register const char *str, register unsigned int len)
-{
- static unsigned char asso_values[] =
- {
- 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
- 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
- 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
- 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
- 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
- 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
- 39, 39, 39, 39, 39, 10, 15, 39, 20, 0,
- 0, 39, 0, 10, 39, 0, 39, 39, 10, 0,
- 0, 39, 0, 10, 5, 10, 39, 39, 39, 0,
- 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
- 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
- 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
- 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
- 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
- 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
- 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
- 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
- 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
- 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
- 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
- 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
- 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
- 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
- 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
- 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
- 39, 39, 39, 39, 39, 39
- };
- return len + asso_values[(unsigned char)str[len - 1]] + asso_values[(unsigned char)str[0]];
-}
-
-#ifdef __GNUC__
-__inline
-#endif
-enum _imap_id
-imap_tokenise (register const char *str, register unsigned int len)
-{
- static struct _imap_keyword wordlist[] =
- {
- {""}, {""},
- {"OK", IMAP_OK},
- {""}, {""},
- {"PARSE", IMAP_PARSE},
- {""},
- {"PREAUTH", IMAP_PREAUTH},
- {"ENVELOPE", IMAP_ENVELOPE},
- {"READ-ONLY", IMAP_READ_ONLY},
- {"READ-WRITE", IMAP_READ_WRITE},
- {"RFC822.SIZE", IMAP_RFC822_SIZE},
- {"NO", IMAP_NO},
- {"RFC822.HEADER", IMAP_RFC822_HEADER},
- {"TRYCREATE", IMAP_TRYCREATE},
- {"FLAGS", IMAP_FLAGS},
- {"RFC822.TEXT", IMAP_RFC822_TEXT},
- {"NEWNAME", IMAP_NEWNAME},
- {"BYE", IMAP_BYE},
- {"BODY", IMAP_BODY},
- {"ALERT", IMAP_ALERT},
- {"UIDVALIDITY", IMAP_UIDVALIDITY},
- {"INTERNALDATE", IMAP_INTERNALDATE},
- {""},
- {"PERMANENTFLAGS", IMAP_PERMANENTFLAGS},
- {""},
- {"UNSEEN", IMAP_UNSEEN},
- {""},
- {"BODYSTRUCTURE", IMAP_BODYSTRUCTURE},
- {""}, {""}, {""}, {""},
- {"UID", IMAP_UID},
- {""}, {""}, {""}, {""},
- {"BAD", IMAP_BAD}
- };
-
- if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
- {
- register int key = imap_hash (str, len);
-
- if (key <= MAX_HASH_VALUE && key >= 0)
- {
- register const char *s = wordlist[key].name;
-
- if (*str == *s && !strcmp (str + 1, s + 1))
- return wordlist[key].id;
- }
- }
- return 0;
-}
-
-/* flag table */
-static struct {
- char *name;
- guint32 flag;
-} flag_table[] = {
- { "\\ANSWERED", CAMEL_MESSAGE_ANSWERED },
- { "\\DELETED", CAMEL_MESSAGE_DELETED },
- { "\\DRAFT", CAMEL_MESSAGE_DRAFT },
- { "\\FLAGGED", CAMEL_MESSAGE_FLAGGED },
- { "\\SEEN", CAMEL_MESSAGE_SEEN },
- { "\\RECENT", CAMEL_IMAPP_MESSAGE_RECENT },
- { "\\*", CAMEL_MESSAGE_USER },
-};
-
-/* utility functions
- shoudl this be part of imapp-driver? */
-/* mabye this should be a stream op? */
-void
-imap_parse_flags(CamelIMAPPStream *stream, guint32 *flagsp)
-/* throws IO,PARSE exception */
-{
- int tok, len, i;
- unsigned char *token, *p, c;
- guint32 flags = 0;
-
- *flagsp = flags;
-
- tok = camel_imapp_stream_token(stream, &token, &len);
- if (tok == '(') {
- do {
- tok = camel_imapp_stream_token(stream, &token, &len);
- if (tok == IMAP_TOK_TOKEN) {
- p = token;
- while ((c=*p))
- *p++ = toupper(c);
- for (i=0;i<(int)(sizeof(flag_table)/sizeof(flag_table[0]));i++)
- if (!strcmp(token, flag_table[i].name))
- flags |= flag_table[i].flag;
- } else if (tok != ')') {
- camel_exception_throw(1, "expecting flag");
- }
- } while (tok != ')');
- } else {
- camel_exception_throw(1, "expecting flag list");
- }
-
- *flagsp = flags;
-}
-
-void
-imap_write_flags(CamelStream *stream, guint32 flags)
-/* throws IO exception */
-{
- int i;
-
- /* all this ugly exception throwing goes away once camel streams throw their own? */
- if (camel_stream_write(stream, "(", 1) == -1)
- camel_exception_throw(1, "io error: %s", strerror(errno));
-
- for (i=0;flags!=0 && i<(int)(sizeof(flag_table)/sizeof(flag_table[0]));i++) {
- if (flag_table[i].flag & flags) {
- if (camel_stream_write(stream, flag_table[i].name, strlen(flag_table[i].name)) == -1)
- camel_exception_throw(1, "io error: %s", strerror(errno));
- flags &= ~flag_table[i].flag;
- if (flags != 0)
- if (camel_stream_write(stream, " ", 1) == -1)
- camel_exception_throw(1, "io error: %s", strerror(errno));
- }
- }
-
- if (camel_stream_write(stream, ")", 1) == -1)
- camel_exception_throw(1, "io error: %s", strerror(errno));
-}
-
-/*
-body ::= "(" body_type_1part / body_type_mpart ")"
-
-body_extension ::= nstring / number / "(" 1#body_extension ")"
- ;; Future expansion. Client implementations
- ;; MUST accept body_extension fields. Server
- ;; implementations MUST NOT generate
- ;; body_extension fields except as defined by
- ;; future standard or standards-track
- ;; revisions of this specification.
-
-body_ext_1part ::= body_fld_md5 [SPACE body_fld_dsp
- [SPACE body_fld_lang
- [SPACE 1#body_extension]]]
- ;; MUST NOT be returned on non-extensible
- ;; "BODY" fetch
-
-body_ext_mpart ::= body_fld_param
- [SPACE body_fld_dsp SPACE body_fld_lang
- [SPACE 1#body_extension]]
- ;; MUST NOT be returned on non-extensible
- ;; "BODY" fetch
-
-body_fields ::= body_fld_param SPACE body_fld_id SPACE
- body_fld_desc SPACE body_fld_enc SPACE
- body_fld_octets
-
-body_fld_desc ::= nstring
-
-body_fld_dsp ::= "(" string SPACE body_fld_param ")" / nil
-
-body_fld_enc ::= (<"> ("7BIT" / "8BIT" / "BINARY" / "BASE64"/
- "QUOTED-PRINTABLE") <">) / string
-
-body_fld_id ::= nstring
-
-body_fld_lang ::= nstring / "(" 1#string ")"
-
-body_fld_lines ::= number
-
-body_fld_md5 ::= nstring
-
-body_fld_octets ::= number
-
-body_fld_param ::= "(" 1#(string SPACE string) ")" / nil
-
-body_type_1part ::= (body_type_basic / body_type_msg / body_type_text)
- [SPACE body_ext_1part]
-
-body_type_basic ::= media_basic SPACE body_fields
- ;; MESSAGE subtype MUST NOT be "RFC822"
-
-body_type_mpart ::= 1*body SPACE media_subtype
- [SPACE body_ext_mpart]
-
-body_type_msg ::= media_message SPACE body_fields SPACE envelope
- SPACE body SPACE body_fld_lines
-
-body_type_text ::= media_text SPACE body_fields SPACE body_fld_lines
-
-envelope ::= "(" env_date SPACE env_subject SPACE env_from
- SPACE env_sender SPACE env_reply_to SPACE env_to
- SPACE env_cc SPACE env_bcc SPACE env_in_reply_to
- SPACE env_message_id ")"
-
-env_bcc ::= "(" 1*address ")" / nil
-
-env_cc ::= "(" 1*address ")" / nil
-
-env_date ::= nstring
-
-env_from ::= "(" 1*address ")" / nil
-
-env_in_reply_to ::= nstring
-
-env_message_id ::= nstring
-
-env_reply_to ::= "(" 1*address ")" / nil
-
-env_sender ::= "(" 1*address ")" / nil
-
-env_subject ::= nstring
-
-env_to ::= "(" 1*address ")" / nil
-
-media_basic ::= (<"> ("APPLICATION" / "AUDIO" / "IMAGE" /
- "MESSAGE" / "VIDEO") <">) / string)
- SPACE media_subtype
- ;; Defined in [MIME-IMT]
-
-media_message ::= <"> "MESSAGE" <"> SPACE <"> "RFC822" <">
- ;; Defined in [MIME-IMT]
-
-media_subtype ::= string
- ;; Defined in [MIME-IMT]
-
-media_text ::= <"> "TEXT" <"> SPACE media_subtype
- ;; Defined in [MIME-IMT]
-
-
-
- ( "type" "subtype" body_fields [envelope body body_fld_lines]
- [body_fld_lines]
-
-
-
- (("TEXT" "PLAIN" ("CHARSET"
- "US-ASCII") NIL NIL "7BIT" 1152 23)("TEXT" "PLAIN"
- ("CHARSET" "US-ASCII" "NAME" "cc.diff")
- "<960723163407.20117h@cac.washington.edu>"
- "Compiler diff" "BASE64" 4554 73) "MIXED"))
-
-*/
-
-/*
-struct _body_fields {
- CamelContentType *ct;
- char *msgid, *desc;
- CamelTransferEncoding encoding;
- guint32 size;
- };*/
-
-void
-imap_free_body(struct _CamelMessageContentInfo *cinfo)
-{
- struct _CamelMessageContentInfo *list, *next;
-
- list = cinfo->childs;
- while (list) {
- next = list->next;
- imap_free_body(list);
- list = next;
- }
-
- if (cinfo->type)
- camel_content_type_unref(cinfo->type);
- g_free(cinfo->id);
- g_free(cinfo->description);
- g_free(cinfo->encoding);
- g_free(cinfo);
-}
-
-void
-imap_parse_param_list(CamelIMAPPStream *is, struct _camel_header_param **plist)
-{
- int tok, len;
- unsigned char *token, *param;
-
- p(printf("body_fld_param\n"));
-
- /* body_fld_param ::= "(" 1#(string SPACE string) ")" / nil */
- tok = camel_imapp_stream_token(is, &token, &len);
- if (tok == '(') {
- while (1) {
- tok = camel_imapp_stream_token(is, &token, &len);
- if (tok == ')')
- break;
- camel_imapp_stream_ungettoken(is, tok, token, len);
-
- camel_imapp_stream_astring(is, &token);
- param = alloca(strlen(token)+1);
- strcpy(param, token);
- camel_imapp_stream_astring(is, &token);
- camel_header_set_param(plist, param, token);
- }
- } /* else check nil? no need */
-}
-
-struct _CamelContentDisposition *
-imap_parse_ext_optional(CamelIMAPPStream *is)
-{
- int tok, len;
- unsigned char *token;
- struct _CamelContentDisposition * volatile dinfo = NULL;
-
- /* this parses both extension types, from the body_fld_dsp onwards */
- /* although the grammars are different, they can be parsed the same way */
-
- /* body_ext_1part ::= body_fld_md5 [SPACE body_fld_dsp
- [SPACE body_fld_lang
- [SPACE 1#body_extension]]]
- ;; MUST NOT be returned on non-extensible
- ;; "BODY" fetch */
-
- /* body_ext_mpart ::= body_fld_param
- [SPACE body_fld_dsp SPACE body_fld_lang
- [SPACE 1#body_extension]]
- ;; MUST NOT be returned on non-extensible
- ;; "BODY" fetch */
-
- CAMEL_TRY {
- /* body_fld_dsp ::= "(" string SPACE body_fld_param ")" / nil */
-
- tok = camel_imapp_stream_token(is, &token, &len);
- switch (tok) {
- case '(':
- dinfo = g_malloc0(sizeof(*dinfo));
- dinfo->refcount = 1;
- /* should be string */
- camel_imapp_stream_astring(is, &token);
-
- dinfo->disposition = g_strdup(token);
- imap_parse_param_list(is, &dinfo->params);
- case IMAP_TOK_TOKEN:
- d(printf("body_fld_dsp: NIL\n"));
- break;
- default:
- camel_exception_throw(1, "body_fld_disp: expecting nil or list");
- }
-
- p(printf("body_fld_lang\n"));
-
- /* body_fld_lang ::= nstring / "(" 1#string ")" */
-
- /* we just drop the lang string/list, save it somewhere? */
-
- tok = camel_imapp_stream_token(is, &token, &len);
- switch (tok) {
- case '(':
- while (1) {
- tok = camel_imapp_stream_token(is, &token, &len);
- if (tok == ')') {
- break;
- } else if (tok != IMAP_TOK_STRING) {
- camel_exception_throw(1, "expecting string");
- }
- }
- break;
- case IMAP_TOK_TOKEN:
- d(printf("body_fld_lang = nil\n"));
- /* treat as 'nil' */
- break;
- case IMAP_TOK_STRING:
- /* we have a string */
- break;
- case IMAP_TOK_LITERAL:
- /* we have a literal string */
- camel_imapp_stream_set_literal(is, len);
- while ((tok = camel_imapp_stream_getl(is, &token, &len)) > 0) {
- d(printf("Skip literal data '%.*s'\n", (int)len, token));
- }
- break;
-
- }
- } CAMEL_CATCH(ex) {
- if (dinfo)
- camel_content_disposition_unref(dinfo);
- camel_exception_throw_ex(ex);
- } CAMEL_DONE;
-
- return dinfo;
-}
-
-struct _CamelMessageContentInfo *
-imap_parse_body_fields(CamelIMAPPStream *is)
-{
- unsigned char *token, *type;
- struct _CamelMessageContentInfo *cinfo;
-
- /* body_fields ::= body_fld_param SPACE body_fld_id SPACE
- body_fld_desc SPACE body_fld_enc SPACE
- body_fld_octets */
-
- p(printf("body_fields\n"));
-
- cinfo = g_malloc0(sizeof(*cinfo));
-
- CAMEL_TRY {
- /* this should be string not astring */
- camel_imapp_stream_astring(is, &token);
- type = alloca(strlen(token)+1);
- strcpy(type, token);
- camel_imapp_stream_astring(is, &token);
- cinfo->type = camel_content_type_new(type, token);
- imap_parse_param_list(is, &cinfo->type->params);
-
- /* body_fld_id ::= nstring */
- camel_imapp_stream_nstring(is, &token);
- cinfo->id = g_strdup(token);
-
- /* body_fld_desc ::= nstring */
- camel_imapp_stream_nstring(is, &token);
- cinfo->description = g_strdup(token);
-
- /* body_fld_enc ::= (<"> ("7BIT" / "8BIT" / "BINARY" / "BASE64"/
- "QUOTED-PRINTABLE") <">) / string */
- camel_imapp_stream_astring(is, &token);
- cinfo->encoding = g_strdup(token);
-
- /* body_fld_octets ::= number */
- cinfo->size = camel_imapp_stream_number(is);
- } CAMEL_CATCH(ex) {
- imap_free_body(cinfo);
- camel_exception_throw_ex(ex);
- } CAMEL_DONE;
-
- return cinfo;
-}
-
-struct _camel_header_address *
-imap_parse_address_list(CamelIMAPPStream *is)
-/* throws PARSE,IO exception */
-{
- int tok, len;
- unsigned char *token, *host, *mbox;
- struct _camel_header_address *list = NULL;
-
- /* "(" 1*address ")" / nil */
-
- CAMEL_TRY {
- tok = camel_imapp_stream_token(is, &token, &len);
- if (tok == '(') {
- while (1) {
- struct _camel_header_address *addr, *group = NULL;
-
- /* address ::= "(" addr_name SPACE addr_adl SPACE addr_mailbox
- SPACE addr_host ")" */
- tok = camel_imapp_stream_token(is, &token, &len);
- if (tok == ')')
- break;
- if (tok != '(')
- camel_exception_throw(1, "missing '(' for address");
-
- addr = camel_header_address_new();
- addr->type = HEADER_ADDRESS_NAME;
- tok = camel_imapp_stream_nstring(is, &token);
- addr->name = g_strdup(token);
- /* we ignore the route, nobody uses it in the real world */
- tok = camel_imapp_stream_nstring(is, &token);
-
- /* [RFC-822] group syntax is indicated by a special
- form of address structure in which the host name
- field is NIL. If the mailbox name field is also
- NIL, this is an end of group marker (semi-colon in
- RFC 822 syntax). If the mailbox name field is
- non-NIL, this is a start of group marker, and the
- mailbox name field holds the group name phrase. */
-
- tok = camel_imapp_stream_nstring(is, &mbox);
- mbox = g_strdup(mbox);
- tok = camel_imapp_stream_nstring(is, &host);
- if (host == NULL) {
- if (mbox == NULL) {
- group = NULL;
- } else {
- d(printf("adding group '%s'\n", mbox));
- g_free(addr->name);
- addr->name = mbox;
- addr->type = HEADER_ADDRESS_GROUP;
- camel_header_address_list_append(&list, addr);
- group = addr;
- }
- } else {
- addr->v.addr = g_strdup_printf("%s%s%s", mbox?(char *)mbox:"", host?"@":"", host?(char *)host:"");
- g_free(mbox);
- d(printf("adding address '%s'\n", addr->v.addr));
- if (group != NULL)
- camel_header_address_add_member(group, addr);
- else
- camel_header_address_list_append(&list, addr);
- }
- do {
- tok = camel_imapp_stream_token(is, &token, &len);
- } while (tok != ')');
- }
- } else {
- d(printf("empty, nil '%s'\n", token));
- }
- } CAMEL_CATCH(ex) {
- camel_header_address_list_clear(&list);
- camel_exception_throw_ex(ex);
- } CAMEL_DONE;
-
- return list;
-}
-
-struct _CamelMessageInfo *
-imap_parse_envelope(CamelIMAPPStream *is)
-{
- int tok, len;
- unsigned char *token;
- struct _camel_header_address *addr, *addr_from;
- char *addrstr;
- struct _CamelMessageInfo *minfo;
-
- /* envelope ::= "(" env_date SPACE env_subject SPACE env_from
- SPACE env_sender SPACE env_reply_to SPACE env_to
- SPACE env_cc SPACE env_bcc SPACE env_in_reply_to
- SPACE env_message_id ")" */
-
- p(printf("envelope\n"));
-
- minfo = camel_message_info_new();
-
- CAMEL_TRY {
- tok = camel_imapp_stream_token(is, &token, &len);
- if (tok != '(')
- camel_exception_throw(1, "envelope: expecting '('");
-
- /* env_date ::= nstring */
- camel_imapp_stream_nstring(is, &token);
- minfo->date_sent = camel_header_decode_date(token, NULL);
-
- /* env_subject ::= nstring */
- tok = camel_imapp_stream_nstring(is, &token);
- /* DUH: this free's it!: camel_message_info_set_subject(minfo, token); */
- e_poolv_set(minfo->strings, CAMEL_MESSAGE_INFO_SUBJECT, token, FALSE);
-
- /* we merge from/sender into from, append should probably merge more smartly? */
-
- /* env_from ::= "(" 1*address ")" / nil */
- addr_from = imap_parse_address_list(is);
-
- /* env_sender ::= "(" 1*address ")" / nil */
- addr = imap_parse_address_list(is);
- if (addr_from) {
- camel_header_address_list_clear(&addr);
-#if 0
- if (addr)
- camel_header_address_list_append_list(&addr_from, &addr);
-#endif
- } else {
- if (addr)
- addr_from = addr;
- }
-
- if (addr_from) {
- addrstr = camel_header_address_list_format(addr_from);
- camel_message_info_set_from(minfo, addrstr);
- camel_header_address_list_clear(&addr_from);
- }
-
- /* we dont keep reply_to */
-
- /* env_reply_to ::= "(" 1*address ")" / nil */
- addr = imap_parse_address_list(is);
- camel_header_address_list_clear(&addr);
-
- /* env_to ::= "(" 1*address ")" / nil */
- addr = imap_parse_address_list(is);
- if (addr) {
- addrstr = camel_header_address_list_format(addr);
- camel_message_info_set_to(minfo, addrstr);
- camel_header_address_list_clear(&addr);
- }
-
- /* env_cc ::= "(" 1*address ")" / nil */
- addr = imap_parse_address_list(is);
- if (addr) {
- addrstr = camel_header_address_list_format(addr);
- camel_message_info_set_cc(minfo, addrstr);
- camel_header_address_list_clear(&addr);
- }
-
- /* we dont keep bcc either */
-
- /* env_bcc ::= "(" 1*address ")" / nil */
- addr = imap_parse_address_list(is);
- camel_header_address_list_clear(&addr);
-
- /* FIXME: need to put in-reply-to into references hash list */
-
- /* env_in_reply_to ::= nstring */
- tok = camel_imapp_stream_nstring(is, &token);
-
- /* FIXME: need to put message-id into message-id hash */
-
- /* env_message_id ::= nstring */
- tok = camel_imapp_stream_nstring(is, &token);
-
- tok = camel_imapp_stream_token(is, &token, &len);
- if (tok != ')')
- camel_exception_throw(1, "expecting ')'");
- } CAMEL_CATCH(ex) {
- camel_message_info_free(minfo);
- camel_exception_throw_ex(ex);
- } CAMEL_DONE;
-
- return minfo;
-}
-
-struct _CamelMessageContentInfo *
-imap_parse_body(CamelIMAPPStream *is)
-{
- int tok, len;
- unsigned char *token;
- struct _CamelMessageContentInfo * volatile cinfo = NULL;
- struct _CamelMessageContentInfo *subinfo, *last;
- struct _CamelContentDisposition * volatile dinfo = NULL;
- struct _CamelMessageInfo * volatile minfo = NULL;
-
- /* body ::= "(" body_type_1part / body_type_mpart ")" */
-
- p(printf("body\n"));
-
- CAMEL_TRY {
- tok = camel_imapp_stream_token(is, &token, &len);
- if (tok != '(')
- camel_exception_throw(1, "body: expecting '('");
-
- /* 1*body (optional for multiparts) */
- tok = camel_imapp_stream_token(is, &token, &len);
- camel_imapp_stream_ungettoken(is, tok, token, len);
- if (tok == '(') {
- /* body_type_mpart ::= 1*body SPACE media_subtype
- [SPACE body_ext_mpart] */
-
- cinfo = g_malloc0(sizeof(*cinfo));
- last = (struct _CamelMessageContentInfo *)&cinfo->childs;
- do {
- subinfo = imap_parse_body(is);
- last->next = subinfo;
- last = subinfo;
- subinfo->parent = cinfo;
- tok = camel_imapp_stream_token(is, &token, &len);
- camel_imapp_stream_ungettoken(is, tok, token, len);
- } while (tok == '(');
-
- d(printf("media_subtype\n"));
-
- camel_imapp_stream_astring(is, &token);
- cinfo->type = camel_content_type_new("multipart", token);
-
- /* body_ext_mpart ::= body_fld_param
- [SPACE body_fld_dsp SPACE body_fld_lang
- [SPACE 1#body_extension]]
- ;; MUST NOT be returned on non-extensible
- ;; "BODY" fetch */
-
- d(printf("body_ext_mpart\n"));
-
- tok = camel_imapp_stream_token(is, &token, &len);
- camel_imapp_stream_ungettoken(is, tok, token, len);
- if (tok == '(') {
- imap_parse_param_list(is, &cinfo->type->params);
-
- /* body_fld_dsp ::= "(" string SPACE body_fld_param ")" / nil */
-
- tok = camel_imapp_stream_token(is, &token, &len);
- camel_imapp_stream_ungettoken(is, tok, token, len);
- if (tok == '(' || tok == IMAP_TOK_TOKEN) {
- dinfo = imap_parse_ext_optional(is);
- /* other extension fields?, soaked up below */
- } else {
- camel_imapp_stream_ungettoken(is, tok, token, len);
- }
- }
- } else {
- /* body_type_1part ::= (body_type_basic / body_type_msg / body_type_text)
- [SPACE body_ext_1part]
-
- body_type_basic ::= media_basic SPACE body_fields
- body_type_text ::= media_text SPACE body_fields SPACE body_fld_lines
- body_type_msg ::= media_message SPACE body_fields SPACE envelope
- SPACE body SPACE body_fld_lines */
-
- d(printf("Single part body\n"));
-
- cinfo = imap_parse_body_fields(is);
-
- d(printf("envelope?\n"));
-
- /* do we have an envelope following */
- tok = camel_imapp_stream_token(is, &token, &len);
- camel_imapp_stream_ungettoken(is, tok, token, len);
- if (tok == '(') {
- /* what do we do with the envelope?? */
- minfo = imap_parse_envelope(is);
- /* what do we do with the message content info?? */
- minfo->content = imap_parse_body(is);
- camel_message_info_free(minfo);
- minfo = NULL;
- d(printf("Scanned envelope - what do i do with it?\n"));
- }
-
- d(printf("fld_lines?\n"));
-
- /* do we have fld_lines following? */
- tok = camel_imapp_stream_token(is, &token, &len);
- if (tok == IMAP_TOK_INT) {
- d(printf("field lines: %s\n", token));
- tok = camel_imapp_stream_token(is, &token, &len);
- }
- camel_imapp_stream_ungettoken(is, tok, token, len);
-
- /* body_ext_1part ::= body_fld_md5 [SPACE body_fld_dsp
- [SPACE body_fld_lang
- [SPACE 1#body_extension]]]
- ;; MUST NOT be returned on non-extensible
- ;; "BODY" fetch */
-
- d(printf("extension data?\n"));
-
- if (tok != ')') {
- camel_imapp_stream_nstring(is, &token);
-
- d(printf("md5: %s\n", token?(char *)token:"NIL"));
-
- /* body_fld_dsp ::= "(" string SPACE body_fld_param ")" / nil */
-
- tok = camel_imapp_stream_token(is, &token, &len);
- camel_imapp_stream_ungettoken(is, tok, token, len);
- if (tok == '(' || tok == IMAP_TOK_TOKEN) {
- dinfo = imap_parse_ext_optional(is);
- /* then other extension fields, soaked up below */
- }
- }
- }
-
- /* soak up any other extension fields that may be present */
- /* there should only be simple tokens, no lists */
- do {
- tok = camel_imapp_stream_token(is, &token, &len);
- if (tok != ')')
- d(printf("Dropping extension data '%s'\n", token));
- } while (tok != ')');
- } CAMEL_CATCH(ex) {
- if (cinfo)
- imap_free_body(cinfo);
- if (dinfo)
- camel_content_disposition_unref(dinfo);
- if (minfo)
- camel_message_info_free(minfo);
- camel_exception_throw_ex(ex);
- } CAMEL_DONE;
-
- /* FIXME: do something with the disposition, currently we have no way to pass it out? */
- if (dinfo)
- camel_content_disposition_unref(dinfo);
-
- return cinfo;
-}
-
-char *
-imap_parse_section(CamelIMAPPStream *is)
-{
- int tok, len;
- unsigned char *token;
- char * volatile section = NULL;
-
- /* currently we only return the part within the [section] specifier
- any header fields are parsed, but dropped */
-
- /*
- section ::= "[" [section_text /
- (nz_number *["." nz_number] ["." (section_text / "MIME")])] "]"
-
- section_text ::= "HEADER" / "HEADER.FIELDS" [".NOT"]
- SPACE header_list / "TEXT"
- */
-
- CAMEL_TRY {
- tok = camel_imapp_stream_token(is, &token, &len);
- if (tok != '[')
- camel_exception_throw(1, "section: expecting '['");
-
- tok = camel_imapp_stream_token(is, &token, &len);
- if (tok == IMAP_TOK_INT || tok == IMAP_TOK_TOKEN)
- section = g_strdup(token);
- else if (tok == ']') {
- section = g_strdup("");
- camel_imapp_stream_ungettoken(is, tok, token, len);
- } else
- camel_exception_throw(1, "section: expecting token");
-
- /* header_list ::= "(" 1#header_fld_name ")"
- header_fld_name ::= astring */
-
- /* we dont need the header specifiers */
- tok = camel_imapp_stream_token(is, &token, &len);
- if (tok == '(') {
- do {
- tok = camel_imapp_stream_token(is, &token, &len);
- if (tok == IMAP_TOK_STRING || tok == IMAP_TOK_TOKEN || tok == IMAP_TOK_INT) {
- /* ?do something? */
- } else if (tok != ')')
- camel_exception_throw(1, "section: header fields: expecting string");
- } while (tok != ')');
- tok = camel_imapp_stream_token(is, &token, &len);
- }
-
- if (tok != ']')
- camel_exception_throw(1, "section: expecting ']'");
- } CAMEL_CATCH(ex) {
- g_free(section);
- camel_exception_throw_ex(ex);
- } CAMEL_DONE;
-
- return section;
-}
-
-void
-imap_free_fetch(struct _fetch_info *finfo)
-{
- if (finfo == NULL)
- return;
-
- if (finfo->body)
- camel_object_unref((CamelObject *)finfo->body);
- if (finfo->text)
- camel_object_unref((CamelObject *)finfo->text);
- if (finfo->header)
- camel_object_unref((CamelObject *)finfo->header);
- if (finfo->minfo)
- camel_message_info_free(finfo->minfo);
- if (finfo->cinfo)
- imap_free_body(finfo->cinfo);
- g_free(finfo->date);
- g_free(finfo->section);
- g_free(finfo->uid);
- g_free(finfo);
-}
-
-extern void camel_content_info_dump(CamelMessageContentInfo *ci, int depth);
-extern void camel_message_info_dump(CamelMessageInfo *mi);
-
-#include <camel/camel-stream-fs.h>
-
-/* debug, dump one out */
-void
-imap_dump_fetch(struct _fetch_info *finfo)
-{
- CamelStream *sout;
- int fd;
-
- printf("Fetch info:\n");
- if (finfo == NULL) {
- printf("Empty\n");
- return;
- }
-
- fd = dup(1);
- sout = camel_stream_fs_new_with_fd(fd);
- if (finfo->body) {
- camel_stream_printf(sout, "Body content:\n");
- camel_stream_write_to_stream(finfo->body, sout);
- }
- if (finfo->text) {
- camel_stream_printf(sout, "Text content:\n");
- camel_stream_write_to_stream(finfo->text, sout);
- }
- if (finfo->header) {
- camel_stream_printf(sout, "Header content:\n");
- camel_stream_write_to_stream(finfo->header, sout);
- }
- if (finfo->minfo) {
- camel_stream_printf(sout, "Message Info:\n");
- camel_message_info_dump(finfo->minfo);
- }
- if (finfo->cinfo) {
- camel_stream_printf(sout, "Content Info:\n");
- camel_content_info_dump(finfo->cinfo, 0);
- }
- if (finfo->got & FETCH_SIZE)
- camel_stream_printf(sout, "Size: %d\n", (int)finfo->size);
- if (finfo->got & FETCH_BODY)
- camel_stream_printf(sout, "Offset: %d\n", (int)finfo->offset);
- if (finfo->got & FETCH_FLAGS)
- camel_stream_printf(sout, "Flags: %08x\n", (int)finfo->flags);
- if (finfo->date)
- camel_stream_printf(sout, "Date: '%s'\n", finfo->date);
- if (finfo->section)
- camel_stream_printf(sout, "Section: '%s'\n", finfo->section);
- if (finfo->date)
- camel_stream_printf(sout, "UID: '%s'\n", finfo->uid);
- camel_object_unref((CamelObject *)sout);
-}
-
-struct _fetch_info *
-imap_parse_fetch(CamelIMAPPStream *is)
-{
- int tok, len;
- unsigned char *token, *p, c;
- struct _fetch_info *finfo;
-
- finfo = g_malloc0(sizeof(*finfo));
-
- CAMEL_TRY {
- tok = camel_imapp_stream_token(is, &token, &len);
- if (tok != '(')
- camel_exception_throw(1, "fetch: expecting '('");
-
- while ( (tok = camel_imapp_stream_token(is, &token, &len)) == IMAP_TOK_TOKEN ) {
-
- p = token;
- while ((c=*p))
- *p++ = toupper(c);
-
- switch(imap_tokenise(token, len)) {
- case IMAP_ENVELOPE:
- finfo->minfo = imap_parse_envelope(is);
- finfo->got |= FETCH_MINFO;
- break;
- case IMAP_FLAGS:
- imap_parse_flags(is, &finfo->flags);
- finfo->got |= FETCH_FLAGS;
- break;
- case IMAP_INTERNALDATE:
- camel_imapp_stream_nstring(is, &token);
- /* TODO: convert to camel format? */
- finfo->date = g_strdup(token);
- finfo->got |= FETCH_DATE;
- break;
- case IMAP_RFC822_HEADER:
- camel_imapp_stream_nstring_stream(is, &finfo->header);
- finfo->got |= FETCH_HEADER;
- break;
- case IMAP_RFC822_TEXT:
- camel_imapp_stream_nstring_stream(is, &finfo->text);
- finfo->got |= FETCH_TEXT;
- break;
- case IMAP_RFC822_SIZE:
- finfo->size = camel_imapp_stream_number(is);
- finfo->got |= FETCH_SIZE;
- break;
- case IMAP_BODYSTRUCTURE:
- finfo->cinfo = imap_parse_body(is);
- finfo->got |= FETCH_CINFO;
- break;
- case IMAP_BODY:
- tok = camel_imapp_stream_token(is, &token, &len);
- camel_imapp_stream_ungettoken(is, tok, token, len);
- if (tok == '(') {
- finfo->cinfo = imap_parse_body(is);
- finfo->got |= FETCH_CINFO;
- } else if (tok == '[') {
- finfo->section = imap_parse_section(is);
- finfo->got |= FETCH_SECTION;
- tok = camel_imapp_stream_token(is, &token, &len);
- if (token[0] == '<') {
- finfo->offset = strtoul(token+1, NULL, 10);
- } else {
- camel_imapp_stream_ungettoken(is, tok, token, len);
- }
- camel_imapp_stream_nstring_stream(is, &finfo->body);
- finfo->got |= FETCH_BODY;
- } else {
- camel_exception_throw(1, "unknown body response");
- }
- break;
- case IMAP_UID:
- tok = camel_imapp_stream_token(is, &token, &len);
- if (tok != IMAP_TOK_INT)
- camel_exception_throw(1, "uid not integer");
- finfo->uid = g_strdup(token);
- finfo->got |= FETCH_UID;
- break;
- default:
- camel_exception_throw(1, "unknown body response");
- }
- }
-
- if (tok != ')')
- camel_exception_throw(1, "missing closing ')' on fetch response");
- } CAMEL_CATCH(ex) {
- imap_free_fetch(finfo);
- camel_exception_throw_ex(ex);
- } CAMEL_DONE;
-
- return finfo;
-}
-
-/* rfc 2060 section 7.1 Status Responses */
-/* shoudl this start after [ or before the [? token_unget anyone? */
-struct _status_info *
-imap_parse_status(CamelIMAPPStream *is)
-{
- int tok, len;
- unsigned char *token;
- struct _status_info *sinfo;
-
- sinfo = g_malloc0(sizeof(*sinfo));
-
- CAMEL_TRY {
- camel_imapp_stream_atom(is, &token, &len);
-
- /*
- resp_cond_auth ::= ("OK" / "PREAUTH") SPACE resp_text
- ;; Authentication condition
-
- resp_cond_bye ::= "BYE" SPACE resp_text
-
- resp_cond_state ::= ("OK" / "NO" / "BAD") SPACE resp_text
- ;; Status condition
- */
-
- sinfo->result = imap_tokenise(token, len);
- switch (sinfo->result) {
- case IMAP_OK:
- case IMAP_NO:
- case IMAP_BAD:
- case IMAP_PREAUTH:
- case IMAP_BYE:
- break;
- default:
- camel_exception_throw(1, "expecting OK/NO/BAD");
- }
-
- tok = camel_imapp_stream_token(is, &token, &len);
- if (tok == '[') {
- camel_imapp_stream_atom(is, &token, &len);
- sinfo->condition = imap_tokenise(token, len);
-
- /* parse any details */
- switch (sinfo->condition) {
- case IMAP_READ_ONLY:
- case IMAP_READ_WRITE:
- case IMAP_ALERT:
- case IMAP_PARSE:
- case IMAP_TRYCREATE:
- break;
- case IMAP_NEWNAME:
- /* the rfc doesn't specify the bnf for this */
- camel_imapp_stream_astring(is, &token);
- sinfo->u.newname.oldname = g_strdup(token);
- camel_imapp_stream_astring(is, &token);
- sinfo->u.newname.newname = g_strdup(token);
- break;
- case IMAP_PERMANENTFLAGS:
- imap_parse_flags(is, &sinfo->u.permanentflags);
- break;
- case IMAP_UIDVALIDITY:
- sinfo->u.uidvalidity = camel_imapp_stream_number(is);
- break;
- case IMAP_UNSEEN:
- sinfo->u.unseen = camel_imapp_stream_number(is);
- break;
- default:
- sinfo->condition = IMAP_UNKNOWN;
- printf("Got unknown response code: %s: ignored\n", token);
- }
-
- /* ignore anything we dont know about */
- do {
- tok = camel_imapp_stream_token(is, &token, &len);
- if (tok == '\n')
- camel_exception_throw(1, "server response truncated");
- } while (tok != ']');
- } else {
- camel_imapp_stream_ungettoken(is, tok, token, len);
- }
-
- /* and take the human readable response */
- camel_imapp_stream_text(is, (unsigned char **)&sinfo->text);
- } CAMEL_CATCH(ex) {
- imap_free_status(sinfo);
- camel_exception_throw_ex(ex);
- } CAMEL_DONE;
-
- return sinfo;
-}
-
-void
-imap_free_status(struct _status_info *sinfo)
-{
- if (sinfo == NULL)
- return;
-
- switch (sinfo->condition) {
- case IMAP_NEWNAME:
- g_free(sinfo->u.newname.oldname);
- g_free(sinfo->u.newname.newname);
- default:
- break;
- }
-
- g_free(sinfo->text);
- g_free(sinfo);
-}
-
-/* FIXME: use tokeniser? */
-/* FIXME: real flags */
-static struct {
- char *name;
- guint32 flag;
-} list_flag_table[] = {
- { "\\NOINFERIORS", CAMEL_FOLDER_NOINFERIORS },
- { "\\NOSELECT", CAMEL_FOLDER_NOSELECT },
- { "\\MARKED", 1<<8 },
- { "\\UNMARKED", 1<<9 },
-};
-
-struct _list_info *
-imap_parse_list(CamelIMAPPStream *is)
-/* throws io, parse */
-{
- int tok, len, i;
- unsigned char *token, *p, c;
- struct _list_info * volatile linfo;
-
- linfo = g_malloc0(sizeof(*linfo));
-
- CAMEL_TRY {
- /* mailbox_list ::= "(" #("\Marked" / "\Noinferiors" /
- "\Noselect" / "\Unmarked" / flag_extension) ")"
- SPACE (<"> QUOTED_CHAR <"> / nil) SPACE mailbox */
-
- tok = camel_imapp_stream_token(is, &token, &len);
- if (tok != '(')
- camel_exception_throw(1, "list: expecting '('");
-
- while ( (tok = camel_imapp_stream_token(is, &token, &len)) != ')' ) {
- if (tok == IMAP_TOK_STRING || tok == IMAP_TOK_TOKEN) {
- p = token;
- while ((c=*p))
- *p++ = toupper(c);
- for (i=0;i<(int)(sizeof(list_flag_table)/sizeof(list_flag_table[0]));i++)
- if (!strcmp(token, list_flag_table[i].name))
- linfo->flags |= list_flag_table[i].flag;
- } else {
- camel_exception_throw(1, "list: expecting flag or ')'");
- }
- }
-
- camel_imapp_stream_nstring(is, &token);
- linfo->separator = token?*token:0;
- camel_imapp_stream_astring(is, &token);
- linfo->name = g_strdup(token);
- } CAMEL_CATCH(ex) {
- imap_free_list(linfo);
- camel_exception_throw_ex(ex);
- } CAMEL_DONE;
-
- return linfo;
-}
-
-char *
-imapp_list_get_path(struct _list_info *li)
-{
- char *path, *p;
- int c;
- const char *f;
-
- if (li->separator != 0 && li->separator != '/') {
- p = path = alloca(strlen(li->name)*3+1);
- f = li->name;
- while ( (c = *f++ & 0xff) ) {
- if (c == li->separator)
- *p++ = '/';
- else if (c == '/' || c == '%')
- p += sprintf(p, "%%%02X", c);
- else
- *p++ = c;
- }
- *p = 0;
- } else
- path = li->name;
-
- return camel_utf7_utf8(path);
-}
-
-void
-imap_free_list(struct _list_info *linfo)
-{
- if (linfo) {
- g_free(linfo->name);
- g_free(linfo);
- }
-}
-
-
-/* ********************************************************************** */
-/* utility functions */
-
-/* should the rest of imapp-utils go into imapp-parse? */
-
-/* this creates a uid (or sequence number) set directly into the command,
- optionally breaking it into smaller chunks */
-
-void
-imapp_uidset_init(struct _uidset_state *ss, CamelIMAPPEngine *ie)
-{
- ss->ie = ie;
- ss->len = 0;
- ss->start = 0;
- ss->last = 0;
-}
-
-int
-imapp_uidset_done(struct _uidset_state *ss, CamelIMAPPCommand *ic)
-{
- int ret = 0;
-
- if (ss->last != 0 && ss->last != ss->start) {
- camel_imapp_engine_command_add(ss->ie, ic, ":%d", ss->last);
- printf(":%d", ss->last);
- }
-
- ret = ss->last != 0;
-
- ss->start = 0;
- ss->last = 0;
- ss->len = 0;
-
- return ret;
-}
-
-int
-imapp_uidset_add(struct _uidset_state *ss, CamelIMAPPCommand *ic, const char *uid)
-{
- guint32 uidn;
-
- uidn = strtoul(uid, NULL, 10);
- if (uidn == 0)
- return -1;
-
- if (ss->last == 0) {
- camel_imapp_engine_command_add(ss->ie, ic, "%d", uidn);
- printf("%d", uidn);
- ss->len ++;
- ss->start = uidn;
- } else {
- if (ss->last != uidn-1) {
- if (ss->last == ss->start) {
- camel_imapp_engine_command_add(ss->ie, ic, ",%d", uidn);
- printf(",%d", uidn);
- ss->len ++;
- } else {
- camel_imapp_engine_command_add(ss->ie, ic, ":%d,%d", ss->last, uidn);
- printf(":%d,%d", ss->last, uidn);
- ss->len+=2;
- }
- ss->start = uidn;
- }
- }
-
- ss->last = uidn;
-
- if (ss->len > 10) {
- imapp_uidset_done(ss, ic);
- return 1;
- }
-
- return 0;
-}
diff --git a/camel/providers/imapp/camel-imapp-utils.h b/camel/providers/imapp/camel-imapp-utils.h
deleted file mode 100644
index e0974bdc96..0000000000
--- a/camel/providers/imapp/camel-imapp-utils.h
+++ /dev/null
@@ -1,145 +0,0 @@
-
-#ifndef _CAMEL_IMAPP_UTILS_H
-#define _CAMEL_IMAPP_UTILS_H
-
-#include <camel/camel-mime-utils.h>
-
-/* FIXME: the enum should be split up into logical groups, so that testing
- can be done more accurately? */
-
-/* list of strings we know about that can be *quickly* tokenised */
-enum _imap_id {
- IMAP_UNKNOWN = 0,
- IMAP_ALERT,
- IMAP_BYE,
- IMAP_BAD,
- IMAP_NO,
- IMAP_OK,
- IMAP_PREAUTH,
- IMAP_NEWNAME,
- IMAP_PARSE,
- IMAP_PERMANENTFLAGS,
- IMAP_READ_ONLY,
- IMAP_READ_WRITE,
- IMAP_TRYCREATE,
- IMAP_UIDVALIDITY,
- IMAP_UNSEEN,
- IMAP_ENVELOPE,
- IMAP_FLAGS,
- IMAP_INTERNALDATE,
- IMAP_RFC822_HEADER,
- IMAP_RFC822_TEXT,
- IMAP_RFC822_SIZE,
- IMAP_BODYSTRUCTURE,
- IMAP_BODY,
- IMAP_UID,
-};
-
-/* str MUST be in upper case, tokenised using gperf function */
-enum _imap_id imap_tokenise(register const char *str, register unsigned int len);
-
-/* this flag should be part of imapfoldersummary */
-enum {
- CAMEL_IMAPP_MESSAGE_RECENT = (1<<8),
-};
-
-/* ********************************************************************** */
-void imap_parse_flags(CamelIMAPPStream *stream, guint32 *flagsp) /* IO,PARSE */;
-void imap_write_flags(CamelStream *stream, guint32 flags) /* IO */;
-
-/* ********************************************************************** */
-void imap_parse_param_list(CamelIMAPPStream *is, struct _camel_header_param **plist) /* IO,PARSE */;
-struct _CamelContentDisposition *imap_parse_ext_optional(CamelIMAPPStream *is) /* IO,PARSE */;
-struct _CamelMessageContentInfo *imap_parse_body_fields(CamelIMAPPStream *is) /* IO,PARSE */;
-struct _camel_header_address *imap_parse_address_list(CamelIMAPPStream *is) /* IO,PARSE */;
-struct _CamelMessageInfo *imap_parse_envelope(CamelIMAPPStream *is) /* IO, PARSE */;
-struct _CamelMessageContentInfo *imap_parse_body(CamelIMAPPStream *is) /* IO,PARSE */;
-char *imap_parse_section(CamelIMAPPStream *is) /* IO,PARSE */;
-void imap_free_body(struct _CamelMessageContentInfo *cinfo);
-
-/* ********************************************************************** */
-/* all the possible stuff we might get from a fetch request */
-/* this assumes the caller/server doesn't send any one of these types twice */
-struct _fetch_info {
- guint32 got; /* what we got, see below */
- CamelStream *body; /* BODY[.*](<.*>)? */
- CamelStream *text; /* RFC822.TEXT */
- CamelStream *header; /* RFC822.HEADER */
- CamelMessageInfo *minfo; /* ENVELOPE */
- CamelMessageContentInfo *cinfo; /* BODYSTRUCTURE,BODY */
- guint32 size; /* RFC822.SIZE */
- guint32 offset; /* start offset of a BODY[]<offset.length> request */
- guint32 flags; /* FLAGS */
- char *date; /* INTERNALDATE */
- char *section; /* section for a BODY[section] request */
- char *uid; /* UID */
-};
-
-#define FETCH_BODY (1<<0)
-#define FETCH_TEXT (1<<1)
-#define FETCH_HEADER (1<<2)
-#define FETCH_MINFO (1<<3)
-#define FETCH_CINFO (1<<4)
-#define FETCH_SIZE (1<<5)
-#define FETCH_OFFSET (1<<6)
-#define FETCH_FLAGS (1<<7)
-#define FETCH_DATE (1<<8)
-#define FETCH_SECTION (1<<9)
-#define FETCH_UID (1<<10)
-
-struct _fetch_info *imap_parse_fetch(CamelIMAPPStream *is);
-void imap_free_fetch(struct _fetch_info *finfo);
-void imap_dump_fetch(struct _fetch_info *finfo);
-
-/* ********************************************************************** */
-
-struct _status_info {
- enum _imap_id result; /* ok/no/bad/preauth only */
- enum _imap_id condition; /* read-only/read-write/alert/parse/trycreate/newname/permanentflags/uidvalidity/unseen */
-
- union {
- struct {
- char *oldname;
- char *newname;
- } newname;
- guint32 permanentflags;
- guint32 uidvalidity;
- guint32 unseen;
- } u;
-
- char *text;
-};
-
-struct _status_info *imap_parse_status(CamelIMAPPStream *is);
-void imap_free_status(struct _status_info *sinfo);
-
-/* ********************************************************************** */
-
-/* should this just return a FolderInfo?
- should this just return the name & flags & separator by reference? */
-struct _list_info {
- guint32 flags:24;
- char separator;
- char *name;
-};
-
-struct _list_info *imap_parse_list(CamelIMAPPStream *is);
-char *imapp_list_get_path(struct _list_info *li);
-void imap_free_list(struct _list_info *linfo);
-
-/* ********************************************************************** */
-
-struct _uidset_state {
- struct _CamelIMAPPEngine *ie;
- int len;
- guint32 start;
- guint32 last;
-};
-
-struct _CamelIMAPPEngine;
-struct _CamelIMAPPCommand;
-void imapp_uidset_init(struct _uidset_state *ss, struct _CamelIMAPPEngine *ie);
-int imapp_uidset_done(struct _uidset_state *ss, struct _CamelIMAPPCommand *ic);
-int imapp_uidset_add(struct _uidset_state *ss, struct _CamelIMAPPCommand *ic, const char *uid);
-
-#endif
diff --git a/camel/providers/imapp/libcamelimapp.urls b/camel/providers/imapp/libcamelimapp.urls
deleted file mode 100644
index aad1347834..0000000000
--- a/camel/providers/imapp/libcamelimapp.urls
+++ /dev/null
@@ -1 +0,0 @@
-imapp
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 ad07472e85..0000000000
--- a/camel/providers/local/Makefile.am
+++ /dev/null
@@ -1,61 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-libcamellocalincludedir = $(privincludedir)/camel
-
-camel_provider_LTLIBRARIES = libcamellocal.la
-camel_provider_DATA = libcamellocal.urls
-
-INCLUDES = -I.. \
- -I$(srcdir)/.. \
- -I$(top_srcdir)/camel \
- -I$(top_srcdir)/intl \
- -I$(top_srcdir)/e-util \
- -I$(top_srcdir) \
- $(CAMEL_CFLAGS) \
- $(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 = -avoid-version -module
-
-libcamellocal_la_LIBADD = $(top_builddir)/e-util/libeutil.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 5bf2142f35..0000000000
--- a/camel/providers/local/camel-local-folder.c
+++ /dev/null
@@ -1,646 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Michael Zucchi <notzed@ximian.com>
- *
- * Copyright 1999-2003 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 <limits.h>
-#include <sys/types.h>
-#include <dirent.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-#include <fcntl.h>
-
-#ifndef _POSIX_PATH_MAX
-#include <posix1_lim.h>
-#endif
-
-#include "camel-local-folder.h"
-#include "camel-local-store.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"
-
-#include "camel-text-index.h"
-
-#define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
-
-#ifndef PATH_MAX
-#define PATH_MAX _POSIX_PATH_MAX
-#endif
-
-static CamelFolderClass *parent_class;
-static GSList *local_folder_properties;
-
-/* 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_getv(CamelObject *object, CamelException *ex, CamelArgGetV *args);
-static int local_setv(CamelObject *object, CamelException *ex, CamelArgV *args);
-
-static int local_lock(CamelLocalFolder *lf, CamelLockType type, CamelException *ex);
-static void local_unlock(CamelLocalFolder *lf);
-
-static char *local_get_full_path (const char *toplevel_dir, const char *full_name);
-static char *local_get_meta_path (const char *toplevel_dir, const char *full_name, const char *ext);
-
-static void local_refresh_info(CamelFolder *folder, CamelException *ex);
-
-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 GPtrArray *local_search_by_uids(CamelFolder *folder, const char *expression, GPtrArray *uids, CamelException *ex);
-static void local_search_free(CamelFolder *folder, GPtrArray * result);
-
-static void local_delete(CamelFolder *folder);
-static void local_rename(CamelFolder *folder, const char *newname);
-
-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);
- CamelObjectClass *oklass = (CamelObjectClass *)camel_local_folder_class;
-
- /* virtual method definition */
-
- /* virtual method overload */
- oklass->getv = local_getv;
- oklass->setv = local_setv;
-
- camel_folder_class->refresh_info = local_refresh_info;
- 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_by_uids = local_search_by_uids;
- camel_folder_class->search_free = local_search_free;
-
- camel_folder_class->delete = local_delete;
- camel_folder_class->rename = local_rename;
-
- camel_local_folder_class->get_full_path = local_get_full_path;
- camel_local_folder_class->get_meta_path = local_get_meta_path;
-
- 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->folder_flags |= (CAMEL_FOLDER_HAS_SUMMARY_CAPABILITY |
- CAMEL_FOLDER_HAS_SEARCH_CAPABILITY);
-
- folder->permanent_flags = CAMEL_MESSAGE_ANSWERED |
- CAMEL_MESSAGE_DELETED | CAMEL_MESSAGE_DRAFT |
- CAMEL_MESSAGE_FLAGGED | CAMEL_MESSAGE_SEEN |
- CAMEL_MESSAGE_ANSWERED_ALL | CAMEL_MESSAGE_USER;
-
- folder->summary = NULL;
- local_folder->search = NULL;
-
- local_folder->priv = g_malloc0(sizeof(*local_folder->priv));
- local_folder->priv->search_lock = g_mutex_new();
-}
-
-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);
- }
-
- if (local_folder->index)
- camel_object_unref((CamelObject *)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);
-
- g_mutex_free(local_folder->priv->search_lock);
-
- g_free(local_folder->priv);
-}
-
-static CamelProperty local_property_list[] = {
- { CAMEL_LOCAL_FOLDER_INDEX_BODY, "index_body", N_("Index message body data") },
-};
-
-CamelType
-camel_local_folder_get_type(void)
-{
- static CamelType camel_local_folder_type = CAMEL_INVALID_TYPE;
-
- if (camel_local_folder_type == CAMEL_INVALID_TYPE) {
- int i;
-
- parent_class = (CamelFolderClass *)camel_folder_get_type();
- camel_local_folder_type = camel_type_register(camel_folder_get_type(), "CamelLocalFolder",
- sizeof(CamelLocalFolder),
- sizeof(CamelLocalFolderClass),
- (CamelObjectClassInitFunc) camel_local_folder_class_init,
- NULL,
- (CamelObjectInitFunc) local_init,
- (CamelObjectFinalizeFunc) local_finalize);
-
- for (i=0;i<sizeof(local_property_list)/sizeof(local_property_list[0]);i++) {
- local_property_list[i].description = _(local_property_list[i].description);
- local_folder_properties = g_slist_prepend(local_folder_properties, &local_property_list[i]);
- }
- }
-
- 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;
- char *tmp, *statepath;
- char folder_path[PATH_MAX];
- struct stat st;
- int forceindex, len;
-
- 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));
- /* strip the trailing '/' which is always present */
- len = strlen (root_dir_path);
- tmp = g_alloca (len + 1);
- strcpy (tmp, root_dir_path);
- if (len>1 && tmp[len-1] == '/')
- tmp[len-1] = 0;
-
- lf->base_path = g_strdup(root_dir_path);
-
- /* if the base store points to a file, then use that */
- if (stat(tmp, &st) != -1 && S_ISREG(st.st_mode)) {
- lf->folder_path = g_strdup(tmp);
- /* not really sure to do with these for now? */
- lf->summary_path = g_strdup_printf("%s.ev-summary", tmp);
- lf->index_path = g_strdup_printf("%s.ibex", tmp);
- statepath = g_strdup_printf ("%s.cmeta", tmp);
- } else {
- lf->folder_path = CLOCALF_CLASS (lf)->get_full_path (root_dir_path, full_name);
- lf->summary_path = CLOCALF_CLASS (lf)->get_meta_path (root_dir_path, full_name, ".ev-summary");
- lf->index_path = CLOCALF_CLASS (lf)->get_meta_path (root_dir_path, full_name, ".ibex");
- statepath = CLOCALF_CLASS (lf)->get_meta_path (root_dir_path, full_name, ".cmeta");
- }
- camel_object_set(lf, NULL, CAMEL_OBJECT_STATE_FILE, statepath, NULL);
- g_free (statepath);
-
- lf->flags = flags;
-
- if (camel_object_state_read(lf) == -1) {
- /* FIXME: load defaults? */
- }
-
- /* follow any symlinks to the mailbox */
- if (lstat (lf->folder_path, &st) != -1 && S_ISLNK (st.st_mode) &&
- realpath (lf->folder_path, folder_path) != NULL) {
- g_free (lf->folder_path);
- lf->folder_path = g_strdup (folder_path);
- }
-
- lf->changes = camel_folder_change_info_new();
-
- /* TODO: Remove the following line, it is a temporary workaround to remove
- the old-format 'ibex' files that might be lying around */
- unlink(lf->index_path);
-
- /* FIXME: Need to run indexing off of the setv method */
-#if 1
- forceindex = FALSE;
-#else
- /* if we have no/invalid index file, force it */
- forceindex = camel_text_index_check(lf->index_path) == -1;
- if (flags & CAMEL_STORE_FOLDER_BODY_INDEX) {
- int flag = O_RDWR|O_CREAT;
- if (forceindex)
- flag |= O_TRUNC;
- lf->index = (CamelIndex *)camel_text_index_new(lf->index_path, flag);
- 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)
- camel_text_index_remove(lf->index_path);
- forceindex = FALSE;
- }
- lf->flags = flags;
-#endif
-
- 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) {*/
- /* we sync here so that any hard work setting up the folder isn't lost */
- if (camel_local_summary_sync((CamelLocalSummary *)folder->summary, FALSE, 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->path, 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_getv(CamelObject *object, CamelException *ex, CamelArgGetV *args)
-{
- CamelFolder *folder = (CamelFolder *)object;
- int i;
- guint32 tag;
-
- for (i=0;i<args->argc;i++) {
- CamelArgGet *arg = &args->argv[i];
-
- tag = arg->tag;
-
- switch (tag & CAMEL_ARG_TAG) {
- case CAMEL_OBJECT_ARG_DESCRIPTION:
- if (folder->description == NULL) {
- char *tmp, *path;
-
- /* check some common prefixes to shorten the name */
- tmp = ((CamelService *)folder->parent_store)->url->path;
- if (tmp == NULL)
- goto skip;
-
- path = g_alloca (strlen (tmp) + strlen (folder->full_name) + 1);
- sprintf (path, "%s/%s", tmp, folder->full_name);
-
- if ((tmp = getenv("HOME")) && strncmp(tmp, path, strlen(tmp)) == 0)
- /* $HOME relative path + protocol string */
- folder->description = g_strdup_printf(_("~%s (%s)"), path+strlen(tmp),
- ((CamelService *)folder->parent_store)->url->protocol);
- else if ((tmp = "/var/spool/mail") && strncmp(tmp, path, strlen(tmp)) == 0)
- /* /var/spool/mail relative path + protocol */
- folder->description = g_strdup_printf(_("mailbox:%s (%s)"), path+strlen(tmp),
- ((CamelService *)folder->parent_store)->url->protocol);
- else if ((tmp = "/var/mail") && strncmp(tmp, path, strlen(tmp)) == 0)
- folder->description = g_strdup_printf(_("mailbox:%s (%s)"), path+strlen(tmp),
- ((CamelService *)folder->parent_store)->url->protocol);
- else
- /* a full path + protocol */
- folder->description = g_strdup_printf(_("%s (%s)"), path,
- ((CamelService *)folder->parent_store)->url->protocol);
- }
- *arg->ca_str = folder->description;
- break;
-
- case CAMEL_OBJECT_ARG_PERSISTENT_PROPERTIES:
- case CAMEL_FOLDER_ARG_PROPERTIES: {
- CamelArgGetV props;
-
- props.argc = 1;
- props.argv[0] = *arg;
- ((CamelObjectClass *)parent_class)->getv(object, ex, &props);
- *arg->ca_ptr = g_slist_concat(*arg->ca_ptr, g_slist_copy(local_folder_properties));
-
- break; }
-
- case CAMEL_LOCAL_FOLDER_ARG_INDEX_BODY:
- printf("getv:'%s' flags %08x\n", ((CamelFolder *)object)->full_name, ((CamelLocalFolder *)object)->flags);
-
- /* FIXME: remove this from sotre flags */
- *arg->ca_int = (((CamelLocalFolder *)folder)->flags & CAMEL_STORE_FOLDER_BODY_INDEX) != 0;
- break;
-
- default: skip:
- continue;
- }
-
- arg->tag = (tag & CAMEL_ARG_TYPE) | CAMEL_ARG_IGNORE;
- }
-
- return ((CamelObjectClass *)parent_class)->getv(object, ex, args);
-}
-
-static int
-local_setv(CamelObject *object, CamelException *ex, CamelArgV *args)
-{
- int i;
- guint32 tag;
-
- for (i=0;i<args->argc;i++) {
- CamelArg *arg = &args->argv[i];
-
- tag = arg->tag;
-
- switch (tag & CAMEL_ARG_TAG) {
- case CAMEL_LOCAL_FOLDER_ARG_INDEX_BODY:
- /* FIXME: implement */
- /* TODO: When turning on (off?) the index, we want to launch a task for it,
- and make sure we dont have multiple tasks doing the same job */
- if (arg->ca_int)
- ((CamelLocalFolder *)object)->flags |= CAMEL_STORE_FOLDER_BODY_INDEX;
- else
- ((CamelLocalFolder *)object)->flags &= ~CAMEL_STORE_FOLDER_BODY_INDEX;
- break;
- default:
- continue;
- }
-
- arg->tag = (tag & CAMEL_ARG_TYPE) | CAMEL_ARG_IGNORE;
- }
-
- return ((CamelObjectClass *)parent_class)->setv(object, ex, args);
-}
-
-static char *
-local_get_full_path (const char *toplevel_dir, const char *full_name)
-{
- return g_strdup_printf ("%s/%s", toplevel_dir, full_name);
-}
-
-static char *
-local_get_meta_path (const char *toplevel_dir, const char *full_name, const char *ext)
-{
- return g_strdup_printf ("%s/%s%s", toplevel_dir, full_name, ext);
-}
-
-static int
-local_lock(CamelLocalFolder *lf, CamelLockType type, CamelException *ex)
-{
- return 0;
-}
-
-static void
-local_unlock(CamelLocalFolder *lf)
-{
- /* nothing */
-}
-
-/* for auto-check to work */
-static void
-local_refresh_info(CamelFolder *folder, CamelException *ex)
-{
- CamelLocalFolder *lf = (CamelLocalFolder *)folder;
-
- if (camel_local_summary_check((CamelLocalSummary *)folder->summary, lf->changes, ex) == -1)
- return;
-
- 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 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;
-
- camel_object_state_write(lf);
-
- /* 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);
- }
-}
-
-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 void
-local_delete(CamelFolder *folder)
-{
- CamelLocalFolder *lf = (CamelLocalFolder *)folder;
-
- if (lf->index)
- camel_index_delete(lf->index);
-
- parent_class->delete(folder);
-}
-
-static void
-local_rename(CamelFolder *folder, const char *newname)
-{
- CamelLocalFolder *lf = (CamelLocalFolder *)folder;
-
- d(printf("renaming local folder paths to '%s'\n", newname));
-
- /* Sync? */
-
- g_free(lf->folder_path);
- g_free(lf->summary_path);
- g_free(lf->index_path);
- lf->folder_path = g_strdup_printf("%s/%s", lf->base_path, newname);
- lf->summary_path = g_strdup_printf("%s/%s.ev-summary", lf->base_path, newname);
- lf->index_path = g_strdup_printf("%s/%s.ibex", lf->base_path, newname);
-
- /* FIXME: Poke some internals, sigh */
- camel_folder_summary_set_filename(folder->summary, lf->summary_path);
- g_free(((CamelLocalSummary *)folder->summary)->folder_path);
- ((CamelLocalSummary *)folder->summary)->folder_path = g_strdup(lf->folder_path);
-
- parent_class->rename(folder, newname);
-}
-
-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 GPtrArray *
-local_search_by_uids(CamelFolder *folder, const char *expression, GPtrArray *uids, CamelException *ex)
-{
- CamelLocalFolder *local_folder = CAMEL_LOCAL_FOLDER(folder);
- GPtrArray *summary, *matches;
- int i;
-
- /* NOTE: could get away without the search lock by creating a new
- search object each time */
-
- summary = g_ptr_array_new();
- for (i=0;i<uids->len;i++) {
- CamelMessageInfo *info;
-
- info = camel_folder_get_message_info(folder, uids->pdata[i]);
- if (info)
- g_ptr_array_add(summary, info);
- }
-
- if (summary->len == 0)
- return summary;
-
- 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);
- 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);
-
- for (i=0;i<summary->len;i++)
- camel_folder_free_message_info(folder, summary->pdata[i]);
- g_ptr_array_free(summary, TRUE);
-
- 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 73059f03b3..0000000000
--- a/camel/providers/local/camel-local-folder.h
+++ /dev/null
@@ -1,109 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 <camel/camel-index.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))
-
-enum {
- CAMEL_LOCAL_FOLDER_ARG_INDEX_BODY = CAMEL_FOLDER_ARG_LAST,
-
- CAMEL_LOCAL_FOLDER_ARG_LAST = CAMEL_FOLDER_ARG_LAST + 0x100
-};
-
-enum {
- CAMEL_LOCAL_FOLDER_INDEX_BODY = CAMEL_LOCAL_FOLDER_ARG_INDEX_BODY | CAMEL_ARG_BOO,
-};
-
-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 */
-
- CamelIndex *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 */
-
- /* path construction, only used at init */
- char * (* get_full_path) (const char *toplevel_dir, const char *full_name);
- char * (* get_meta_path) (const char *toplevel_dir, const char *full_name, const char *ext);
-
- /* summary factory, only used at init */
- CamelLocalSummary *(*create_summary)(const char *path, const char *folder, CamelIndex *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 e8e5061fae..0000000000
--- a/camel/providers/local/camel-local-private.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Michael Zucchi <notzed@ximian.com>
- *
- * Copyright 1999-2003 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_LOCAL_PRIVATE_H
-#define CAMEL_LOCAL_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 */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <pthread.h>
-
-struct _CamelLocalFolderPrivate {
- GMutex *search_lock; /* for locking the search object */
-};
-
-#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))
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_LOCAL_PRIVATE_H */
-
diff --git a/camel/providers/local/camel-local-provider.c b/camel/providers/local/camel-local-provider.c
deleted file mode 100644
index a52dfbde5f..0000000000
--- a/camel/providers/local/camel-local-provider.c
+++ /dev/null
@@ -1,222 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 "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"
-
-#define d(x)
-
-static CamelProviderConfEntry mh_conf_entries[] = {
- CAMEL_PROVIDER_CONF_DEFAULT_PATH,
- { CAMEL_PROVIDER_CONF_CHECKBOX, "dotfolders", NULL,
- N_("Use the `.folders' folder summary file (exmh)"), "0" },
- { CAMEL_PROVIDER_CONF_END }
-};
-
-static CamelProvider mh_provider = {
- "mh",
- N_("MH-format mail directories"),
- N_("For storing local mail in MH-like mail directories."),
- "mail",
- CAMEL_PROVIDER_IS_SOURCE | CAMEL_PROVIDER_IS_STORAGE | CAMEL_PROVIDER_IS_LOCAL,
- CAMEL_URL_NEED_PATH | CAMEL_URL_PATH_IS_ABSOLUTE | CAMEL_URL_FRAGMENT_IS_PATH,
- mh_conf_entries,
- /* ... */
-};
-
-static CamelProviderConfEntry mbox_conf_entries[] = {
- CAMEL_PROVIDER_CONF_DEFAULT_PATH,
- { CAMEL_PROVIDER_CONF_END }
-};
-
-static CamelProvider mbox_provider = {
- "mbox",
- N_("Local delivery"),
- N_("For retrieving (moving) local mail from standard mbox formated spools into folders managed by Evolution."),
- "mail",
- CAMEL_PROVIDER_IS_SOURCE | CAMEL_PROVIDER_IS_STORAGE | CAMEL_PROVIDER_IS_LOCAL,
- CAMEL_URL_NEED_PATH | CAMEL_URL_PATH_IS_ABSOLUTE | CAMEL_URL_FRAGMENT_IS_PATH,
- mbox_conf_entries,
- /* ... */
-};
-
-static CamelProviderConfEntry maildir_conf_entries[] = {
- CAMEL_PROVIDER_CONF_DEFAULT_PATH,
- { 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_("Maildir-format mail directories"),
- N_("For storing local mail in maildir directories."),
- "mail",
- CAMEL_PROVIDER_IS_SOURCE | CAMEL_PROVIDER_IS_STORAGE | CAMEL_PROVIDER_IS_LOCAL,
- CAMEL_URL_NEED_PATH | CAMEL_URL_PATH_IS_ABSOLUTE | CAMEL_URL_FRAGMENT_IS_PATH,
- maildir_conf_entries,
- /* ... */
-};
-
-static CamelProviderConfEntry spool_conf_entries[] = {
- CAMEL_PROVIDER_CONF_DEFAULT_PATH,
- { CAMEL_PROVIDER_CONF_CHECKBOX, "filter", NULL, N_("Apply filters to new messages in INBOX"), "0" },
- { CAMEL_PROVIDER_CONF_CHECKBOX, "xstatus", NULL, N_("Store status headers in Elm/Pine/Mutt format"), "0" },
- { CAMEL_PROVIDER_CONF_END }
-};
-
-static CamelProvider spool_provider = {
- "spool",
- N_("Standard Unix mbox spool or directory"),
- N_("For reading and storing local mail in external standard mbox spool files.\nMay also be used to read a tree of Elm, Pine, or Mutt style folders."),
- "mail",
- CAMEL_PROVIDER_IS_SOURCE | CAMEL_PROVIDER_IS_STORAGE,
- CAMEL_URL_NEED_PATH | CAMEL_URL_PATH_IS_ABSOLUTE | CAMEL_URL_FRAGMENT_IS_PATH,
- spool_conf_entries,
- /* ... */
-};
-
-/* build a canonical 'path' */
-static char *
-make_can_path(char *p, char *o)
-{
- char c, last, *start = o;
-
- d(printf("canonical '%s' = ", p));
-
- last = 0;
- while ((c = *p++)) {
- if (c!='/'
- || (c=='/' && last != '/'))
- *o++ = c;
- last = c;
- }
- if (o>start && o[-1] == '/')
- o[-1] = 0;
- else
- *o = 0;
-
- d(printf("'%s'\n", start));
-
- return start;
-}
-
-/* 'helper' function for it */
-#define get_can_path(p) ((p == NULL) ? NULL : (make_can_path ((p), g_alloca (strlen (p) + 1))))
-
-static guint
-local_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);
- if (u->path)
- hash ^= g_str_hash(get_can_path(u->path));
- 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;
-}
-
-static int
-local_url_equal(const void *v, const void *v2)
-{
- const CamelURL *u1 = v, *u2 = v2;
- char *p1, *p2;
-
- p1 = get_can_path(u1->path);
- p2 = get_can_path(u2->path);
- return check_equal(p1, p2)
- && 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->query, u2->query)
- && u1->port == u2->port;
-}
-
-void camel_provider_module_init(CamelSession * session)
-{
- char *path;
-
- mh_conf_entries[0].value = ""; /* default path */
- mh_provider.object_types[CAMEL_PROVIDER_STORE] = camel_mh_store_get_type ();
- mh_provider.url_hash = local_url_hash;
- mh_provider.url_equal = local_url_equal;
- camel_session_register_provider(session, &mh_provider);
-
- if (!(path = getenv ("MAIL")))
- path = g_strdup_printf (SYSTEM_MAIL_DIR "/%s", g_get_user_name ());
- mbox_conf_entries[0].value = path; /* default path */
- mbox_provider.object_types[CAMEL_PROVIDER_STORE] = camel_mbox_store_get_type ();
- mbox_provider.url_hash = local_url_hash;
- mbox_provider.url_equal = local_url_equal;
- camel_session_register_provider(session, &mbox_provider);
-
- spool_conf_entries[0].value = path; /* default path - same as mbox */
- spool_provider.object_types[CAMEL_PROVIDER_STORE] = camel_spool_store_get_type ();
- spool_provider.url_hash = local_url_hash;
- spool_provider.url_equal = local_url_equal;
- camel_session_register_provider(session, &spool_provider);
-
- path = getenv ("MAILDIR");
- maildir_conf_entries[0].value = path ? path : ""; /* default path */
- maildir_provider.object_types[CAMEL_PROVIDER_STORE] = camel_maildir_store_get_type ();
- maildir_provider.url_hash = local_url_hash;
- maildir_provider.url_equal = local_url_equal;
- camel_session_register_provider(session, &maildir_provider);
-}
diff --git a/camel/providers/local/camel-local-store.c b/camel/providers/local/camel-local-store.c
deleted file mode 100644
index a0eaf9d68f..0000000000
--- a/camel/providers/local/camel-local-store.c
+++ /dev/null
@@ -1,442 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <glib.h>
-
-#include "camel-private.h"
-
-#include "camel-local-store.h"
-#include "camel-exception.h"
-#include "camel-url.h"
-
-#include "camel-local-folder.h"
-#include <camel/camel-text-index.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 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 CamelFolderInfo *create_folder(CamelStore *store, const char *parent_name, const char *folder_name, 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->create_folder = create_folder;
- 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;
- }
- return (CamelFolder *) 0xdeadbeef;
- }
-
- if (errno != ENOENT
- || (flags & CAMEL_STORE_FOLDER_CREATE) == 0) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- _("Cannot get folder: %s: %s"),
- path, g_strerror (errno));
- return NULL;
- }
-
- /* need to create the dir heirarchy */
- sub = g_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, g_strerror (errno));
- return NULL;
- }
- }
- if (slash)
- *slash = '/';
- } while (slash);
-
- return (CamelFolder *) 0xdeadbeef;
-}
-
-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 STORE -- get folder info: %s\n", top));
-
- return NULL;
-}
-
-static CamelFolderInfo *
-create_folder(CamelStore *store, const char *parent_name, const char *folder_name, CamelException *ex)
-{
- char *path = ((CamelLocalStore *)store)->toplevel_dir;
- char *name;
- CamelFolder *folder;
- CamelFolderInfo *info = NULL;
- struct stat st;
-
- /* This is a pretty hacky version of create folder, but should basically work */
-
- if (path[0] != '/') {
- camel_exception_setv(ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- _("Store root %s is not an absolute path"), path);
- return NULL;
- }
-
- if (parent_name)
- name = g_strdup_printf("%s/%s/%s", path, parent_name, folder_name);
- else
- name = g_strdup_printf("%s/%s", path, folder_name);
-
- if (stat(name, &st) == 0 || errno != ENOENT) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- _("Cannot get folder: %s: %s"),
- name, g_strerror (errno));
- g_free(name);
- return NULL;
- }
-
- g_free(name);
-
- if (parent_name)
- name = g_strdup_printf("%s/%s", parent_name, folder_name);
- else
- name = g_strdup_printf("%s", folder_name);
-
- folder = ((CamelStoreClass *)((CamelObject *)store)->klass)->get_folder(store, name, CAMEL_STORE_FOLDER_CREATE, ex);
- if (folder) {
- camel_object_unref((CamelObject *)folder);
- info = ((CamelStoreClass *)((CamelObject *)store)->klass)->get_folder_info(store, name, 0, ex);
-
- /* get_folder(CREATE) will emit a folder_created event for us */
- /*if (info)
- camel_object_trigger_event((CamelObject *)store, "folder_created", info);*/
- }
-
- g_free(name);
-
- return info;
-}
-
-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, g_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;
- CamelLocalFolder *folder = NULL;
- char *newibex = g_strdup_printf("%s%s.ibex", path, new);
- char *oldibex = g_strdup_printf("%s%s.ibex", path, old);
-
- /* try to rollback failures, has obvious races */
-
- d(printf("local rename folder '%s' '%s'\n", old, new));
-
- folder = camel_object_bag_get(store->folders, old);
- if (folder && folder->index) {
- if (camel_index_rename(folder->index, newibex) == -1)
- goto ibex_failed;
- } else {
- /* TODO: camel_text_index_rename should find out if we have an active index itself? */
- if (camel_text_index_rename(oldibex, newibex) == -1)
- goto ibex_failed;
- }
-
- if (xrename(old, new, path, ".ev-summary", TRUE, ex))
- goto summary_failed;
-
- if (xrename(old, new, path, "", FALSE, ex))
- goto base_failed;
-
- g_free(newibex);
- g_free(oldibex);
-
- if (folder)
- camel_object_unref(folder);
-
- return;
-
-base_failed:
- xrename(new, old, path, ".ev-summary", TRUE, ex);
-
-summary_failed:
- if (folder) {
- if (folder->index)
- camel_index_rename(folder->index, oldibex);
- } else
- camel_text_index_rename(newibex, oldibex);
-ibex_failed:
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not rename '%s': %s"),
- old, g_strerror (errno));
-
- g_free(newibex);
- g_free(oldibex);
-
- if (folder)
- camel_object_unref(folder);
-}
-
-/* default implementation, only delete metadata */
-static void
-delete_folder(CamelStore *store, const char *folder_name, CamelException *ex)
-{
- CamelFolderInfo *fi;
- CamelException lex;
- CamelFolder *lf;
- 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, g_strerror (errno));
- g_free(str);
- g_free (name);
- return;
- }
- g_free(str);
- str = g_strdup_printf("%s.ibex", name);
- if (camel_text_index_remove(str) == -1 && errno != ENOENT) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not delete folder index file `%s': %s"),
- str, g_strerror (errno));
- g_free(str);
- g_free (name);
- return;
- }
- g_free(str);
-
- camel_exception_init (&lex);
- if ((lf = camel_store_get_folder (store, folder_name, 0, &lex))) {
- camel_object_get (lf, NULL, CAMEL_OBJECT_STATE_FILE, &str, NULL);
- camel_object_set (lf, NULL, CAMEL_OBJECT_STATE_FILE, NULL, NULL);
- camel_object_unref (lf);
- } else {
- camel_exception_clear (&lex);
- }
-
- if (str == NULL)
- str = g_strdup_printf ("%s.cmeta", name);
-
- if (unlink (str) == -1 && errno != ENOENT) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not delete folder meta file `%s': %s"),
- str, g_strerror (errno));
- g_free (name);
- g_free (str);
- return;
- }
-
- g_free (str);
- g_free (name);
-
- fi = g_new0 (CamelFolderInfo, 1);
- fi->full_name = g_strdup (folder_name);
- fi->name = g_path_get_basename (folder_name);
- fi->url = g_strdup_printf ("%s:%s#%s", ((CamelService *) store)->url->protocol,
- CAMEL_LOCAL_STORE(store)->toplevel_dir, folder_name);
- fi->unread_message_count = -1;
- camel_folder_info_build_path(fi, '/');
-
- camel_object_trigger_event (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 21d854c562..0000000000
--- a/camel/providers/local/camel-local-store.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-mbox-store.h : class for an mbox store */
-
-/*
- *
- * Copyright (C) 2000 Ximian, Inc. <bertrand@helixcode.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 42534b361d..0000000000
--- a/camel/providers/local/camel-local-summary.c
+++ /dev/null
@@ -1,614 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 w(x)
-#define io(x)
-#define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
-
-#define CAMEL_LOCAL_SUMMARY_VERSION (0x200)
-
-static CamelMessageInfo * message_info_new (CamelFolderSummary *, struct _camel_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 _CamelFolderSummary *s = (CamelFolderSummary *)obj;
-
- /* 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);
-
- if (mbs->index)
- camel_object_unref((CamelObject *)mbs->index);
- g_free(mbs->folder_path);
-}
-
-void
-camel_local_summary_construct(CamelLocalSummary *new, const char *filename, const char *local_name, CamelIndex *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;
- if (index)
- camel_object_ref((CamelObject *)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) {
- w(g_warning("Could not load summary: flags may be reset"));
- camel_folder_summary_clear((CamelFolderSummary *)cls);
- return -1;
- }
-
- return 0;
-}
-
-void camel_local_summary_check_force(CamelLocalSummary *cls)
-{
- cls->check_force = 1;
-}
-
-char *
-camel_local_summary_encode_x_evolution(CamelLocalSummary *cls, const CamelMessageInfo *info)
-{
- return ((CamelLocalSummaryClass *)(CAMEL_OBJECT_GET_CLASS(cls)))->encode_x_evolution(cls, info);
-}
-
-int
-camel_local_summary_decode_x_evolution(CamelLocalSummary *cls, const char *xev, CamelMessageInfo *info)
-{
- return ((CamelLocalSummaryClass *)(CAMEL_OBJECT_GET_CLASS(cls)))->decode_x_evolution(cls, xev, info);
-}
-
-/*#define DOSTATS*/
-#ifdef DOSTATS
-struct _stat_info {
- int mitotal;
- int micount;
- int citotal;
- int cicount;
- int msgid;
- int msgcount;
-};
-
-static void
-do_stat_ci(CamelLocalSummary *cls, struct _stat_info *info, CamelMessageContentInfo *ci)
-{
- info->cicount++;
- info->citotal += ((CamelFolderSummary *)cls)->content_info_size /*+ 4 memchunks are 1/4 byte overhead per mi */;
- if (ci->id)
- info->citotal += strlen(ci->id) + 4;
- if (ci->description)
- info->citotal += strlen(ci->description) + 4;
- if (ci->encoding)
- info->citotal += strlen(ci->encoding) + 4;
- if (ci->type) {
- CamelContentType *ct = ci->type;
- struct _camel_header_param *param;
-
- info->citotal += sizeof(*ct) + 4;
- if (ct->type)
- info->citotal += strlen(ct->type) + 4;
- if (ct->subtype)
- info->citotal += strlen(ct->subtype) + 4;
- param = ct->params;
- while (param) {
- info->citotal += sizeof(*param) + 4;
- if (param->name)
- info->citotal += strlen(param->name)+4;
- if (param->value)
- info->citotal += strlen(param->value)+4;
- param = param->next;
- }
- }
- ci = ci->childs;
- while (ci) {
- do_stat_ci(cls, info, ci);
- ci = ci->next;
- }
-}
-
-static void
-do_stat_mi(CamelLocalSummary *cls, struct _stat_info *info, CamelMessageInfo *mi)
-{
- info->micount++;
- info->mitotal += ((CamelFolderSummary *)cls)->content_info_size /*+ 4*/;
-
- if (mi->subject)
- info->mitotal += strlen(mi->subject) + 4;
- if (mi->to)
- info->mitotal += strlen(mi->to) + 4;
- if (mi->from)
- info->mitotal += strlen(mi->from) + 4;
- if (mi->cc)
- info->mitotal += strlen(mi->cc) + 4;
- if (mi->uid)
- info->mitotal += strlen(mi->uid) + 4;
-
- if (mi->references) {
- info->mitotal += (mi->references->size-1) * sizeof(CamelSummaryMessageID) + sizeof(CamelSummaryReferences) + 4;
- info->msgid += (mi->references->size) * sizeof(CamelSummaryMessageID);
- info->msgcount += mi->references->size;
- }
-
- /* dont have any user flags yet */
-
- if (mi->content) {
- do_stat_ci(cls, info, mi->content);
- }
-}
-
-#endif
-
-int
-camel_local_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changeinfo, CamelException *ex)
-{
- int ret;
-
- ret = ((CamelLocalSummaryClass *)(CAMEL_OBJECT_GET_CLASS(cls)))->check(cls, changeinfo, ex);
-
-#ifdef DOSTATS
- if (ret != -1) {
- int i;
- CamelFolderSummary *s = (CamelFolderSummary *)cls;
- struct _stat_info stats = { 0 };
-
- for (i=0;i<camel_folder_summary_count(s);i++) {
- CamelMessageInfo *info = camel_folder_summary_index(s, i);
- do_stat_mi(cls, &stats, info);
- camel_folder_summary_info_free(s, info);
- }
-
- printf("\nMemory used by summary:\n\n");
- printf("Total of %d messages\n", camel_folder_summary_count(s));
- printf("Total: %d bytes (ave %f)\n", stats.citotal + stats.mitotal,
- (double)(stats.citotal+stats.mitotal)/(double)camel_folder_summary_count(s));
- printf("Message Info: %d (ave %f)\n", stats.mitotal, (double)stats.mitotal/(double)stats.micount);
- printf("Content Info; %d (ave %f) count %d\n", stats.citotal, (double)stats.citotal/(double)stats.cicount, stats.cicount);
- printf("message id's: %d (ave %f) count %d\n", stats.msgid, (double)stats.msgid/(double)stats.msgcount, stats.msgcount);
- }
-#endif
- return ret;
-}
-
-int
-camel_local_summary_sync(CamelLocalSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, CamelException *ex)
-{
- return ((CamelLocalSummaryClass *)(CAMEL_OBJECT_GET_CLASS(cls)))->sync(cls, expunge, changeinfo, ex);
-}
-
-CamelMessageInfo *
-camel_local_summary_add(CamelLocalSummary *cls, CamelMimeMessage *msg, const CamelMessageInfo *info, CamelFolderChangeInfo *ci, CamelException *ex)
-{
- return ((CamelLocalSummaryClass *)(CAMEL_OBJECT_GET_CLASS(cls)))->add(cls, msg, info, ci, ex);
-}
-
-/**
- * camel_local_summary_write_headers:
- * @fd:
- * @header:
- * @xevline:
- * @status:
- * @xstatus:
- *
- * 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.
- * If @status is non NULL, then a Status header line is also written.
- * 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 _camel_header_raw *header, const char *xevline, const char *status, const char *xstatus)
-{
- 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") != 0
- && (status == NULL || strcmp(header->name, "Status") != 0)
- && (xstatus == NULL || strcmp(header->name, "X-Status") != 0)) {
- len = fprintf(out, "%s:%s\n", header->name, header->value);
- if (len == -1) {
- fclose(out);
- return -1;
- }
- outlen += len;
- }
- header = header->next;
- }
-
- if (status) {
- len = fprintf(out, "Status: %s\n", status);
- if (len == -1) {
- fclose(out);
- return -1;
- }
- outlen += len;
- }
-
- if (xstatus) {
- len = fprintf(out, "X-Status: %s\n", xstatus);
- if (len == -1) {
- fclose(out);
- return -1;
- }
- outlen += len;
- }
-
- if (xevline) {
- len = fprintf(out, "X-Evolution: %s\n", xevline);
- if (len == -1) {
- fclose(out);
- return -1;
- }
- outlen += len;
- }
-
- len = fprintf(out, "\n");
- 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)
-{
- int ret = 0;
-
- ret = camel_folder_summary_save((CamelFolderSummary *)cls);
- if (ret == -1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not save summary: %s: %s"),
- cls->folder_path, g_strerror (errno));
-
- g_warning ("Could not save summary for %s: %s", cls->folder_path, strerror (errno));
- }
-
- if (cls->index && camel_index_sync(cls->index) == -1)
- g_warning ("Could not sync index for %s: %s", cls->folder_path, strerror (errno));
-
- return ret;
-}
-
-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, CAMEL_EXCEPTION_SYSTEM,
- _("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 _camel_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_printf (out, "%08x-%04x", uid, mi->flags & 0xffff);
- } else {
- g_string_printf (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;
- }
- camel_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;
- }
- camel_header_set_param (&params, "tags", val->str);
- }
- g_string_free (val, TRUE);
- camel_header_param_list_format_append (out, params);
- camel_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 _camel_header_param *params, *scan;
- guint32 uid, flags;
- char *header;
- int i;
-
- /* check for uid/flags */
- header = camel_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 = camel_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;
- }
- camel_header_param_list_free(params);
- }
- return 0;
-}
-
-static CamelMessageInfo *
-message_info_new(CamelFolderSummary *s, struct _camel_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 = camel_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
- || !camel_index_has_name(cls->index, 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 25d77e62c3..0000000000
--- a/camel/providers/local/camel-local-summary.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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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 <camel/camel-index.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,
- CAMEL_MESSAGE_FOLDER_NOTSEEN = 1<<19, /* have we seen this in processing this loop? */
-};
-
-struct _CamelLocalSummary {
- CamelFolderSummary parent;
-
- char *folder_path; /* name of matching folder */
-
- CamelIndex *index;
- unsigned int index_force:1; /* do we force index during creation? */
- unsigned int check_force:1; /* does a check force a full check? */
-};
-
-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);
-};
-
-CamelType camel_local_summary_get_type (void);
-void camel_local_summary_construct (CamelLocalSummary *new, const char *filename, const char *local_name, CamelIndex *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);
-
-/* force the next check to be a full check/rebuild */
-void camel_local_summary_check_force(CamelLocalSummary *cls);
-
-/* 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 and/or status header */
-int camel_local_summary_write_headers(int fd, struct _camel_header_raw *header, const char *xevline, const char *status, const char *xstatus);
-
-#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 eca07efbef..0000000000
--- a/camel/providers/local/camel-maildir-folder.c
+++ /dev/null
@@ -1,245 +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, 2003 Ximian Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 "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, CamelIndex *index);
-
-static void maildir_append_message(CamelFolder * folder, CamelMimeMessage * message, const CamelMessageInfo *info, char **appended_uid, 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->folder_flags |= CAMEL_FOLDER_FILTER_RECENT;
-
- 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, CamelIndex *index)
-{
- return (CamelLocalSummary *)camel_maildir_summary_new(path, folder, index);
-}
-
-static void
-maildir_append_message (CamelFolder *folder, CamelMimeMessage *message, const CamelMessageInfo *info, char **appended_uid, 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);
-
- if (appended_uid)
- *appended_uid = g_strdup(camel_message_info_uid(mi));
-
- 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));
-
- if (errno == EINTR)
- camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL,
- _("Maildir append message cancelled"));
- else
- 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, (errno==EINTR)?CAMEL_EXCEPTION_USER_CANCEL: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 c495d9b14d..0000000000
--- a/camel/providers/local/camel-maildir-folder.h
+++ /dev/null
@@ -1,58 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 c84c37158c..0000000000
--- a/camel/providers/local/camel-maildir-store.c
+++ /dev/null
@@ -1,416 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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/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;
-
- if (!((CamelStoreClass *)parent_class)->get_folder(store, folder_name, flags, 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, g_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, g_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 ? g_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, g_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' '%s'\n", fi->path, fi->name, fi->full_name, fi->url));
-
- 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 */
- folder = camel_object_bag_get(store->folders, path);
- if (folder) {
- if ((flags & CAMEL_STORE_FOLDER_INFO_FAST) == 0)
- camel_folder_refresh_info(folder, NULL);
- unread = camel_folder_get_unread_message_count(folder);
- camel_object_unref(folder);
- } else {
- unread = -1;
- }
-
- /* 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
- && (flags & CAMEL_STORE_FOLDER_INFO_FAST) == 0) {
- 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, g_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, ((CamelService *)local_store)->url->path, 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 f7725bc189..0000000000
--- a/camel/providers/local/camel-maildir-store.h
+++ /dev/null
@@ -1,55 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 37e1ac2ce7..0000000000
--- a/camel/providers/local/camel-maildir-summary.c
+++ /dev/null
@@ -1,807 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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/stat.h>
-#include <fcntl.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/camel-operation.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 _camel_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, CamelIndex *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)
-{
- const char *uid;
- char *p, *buf;
- int i;
-
- uid = camel_message_info_uid (info);
- buf = g_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 _camel_header_raw *h)
-{
- CamelMessageInfo *mi, *info;
- 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));
-
- /* handle 'duplicates' */
- info = camel_folder_summary_uid(s, uid);
- if (info) {
- d(printf("already seen uid '%s', just summarising instead\n", uid));
- camel_folder_summary_info_free(s, mi);
- mdi = (CamelMaildirMessageInfo *)mi = info;
- }
-
- /* 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, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot open maildir directory path: %s: %s"),
- cls->folder_path, g_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 || !camel_index_has_name(cls->index, 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;
-}
-
-struct _remove_data {
- CamelLocalSummary *cls;
- CamelFolderChangeInfo *changes;
-};
-
-static void
-remove_summary(char *key, CamelMessageInfo *info, struct _remove_data *rd)
-{
- d(printf("removing message %s from summary\n", key));
- if (rd->cls->index)
- camel_index_delete_name(rd->cls->index, camel_message_info_uid(info));
- if (rd->changes)
- camel_folder_change_info_remove_uid(rd->changes, key);
- camel_folder_summary_remove((CamelFolderSummary *)rd->cls, info);
- camel_folder_summary_info_free((CamelFolderSummary *)rd->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, total;
- int forceindex;
- char *new, *cur;
- char *uid;
- struct _remove_data rd = { cls, changes };
-
- new = g_strdup_printf("%s/new", cls->folder_path);
- cur = g_strdup_printf("%s/cur", cls->folder_path);
-
- d(printf("checking summary ...\n"));
-
- camel_operation_start(NULL, _("Checking folder consistency"));
-
- /* 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, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot open maildir directory path: %s: %s"),
- cls->folder_path, g_strerror (errno));
- g_free(cur);
- g_free(new);
- camel_operation_end(NULL);
- 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);
- }
- }
-
- /* joy, use this to pre-count the total, so we can report progress meaningfully */
- total = 0;
- count = 0;
- while ( (d = readdir(dir)) )
- total++;
- rewinddir(dir);
-
- while ( (d = readdir(dir)) ) {
- int pc = count * 100 / total;
-
- camel_operation_progress(NULL, pc);
- count++;
-
- /* 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 = g_hash_table_lookup(left, uid);
- if (info) {
- camel_folder_summary_info_free((CamelFolderSummary *)cls, info);
- g_hash_table_remove(left, uid);
- }
-
- info = camel_folder_summary_uid((CamelFolderSummary *)cls, uid);
- if (info == NULL) {
- /* must be a message incorporated by another client, this is not a 'recent' uid */
- if (camel_maildir_summary_add(cls, d->d_name, forceindex) == 0)
- if (changes)
- camel_folder_change_info_add_uid(changes, uid);
- } else {
- const char *filename;
-
- if (cls->index && (!camel_index_has_name(cls->index, uid))) {
- /* message_info_new will handle duplicates */
- camel_maildir_summary_add(cls, d->d_name, forceindex);
- }
-
- 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, &rd);
- g_hash_table_destroy(left);
-
- camel_operation_end(NULL);
-
- camel_operation_start(NULL, _("Checking for new messages"));
-
- /* now, scan new for new messages, and copy them to cur, and so forth */
- dir = opendir(new);
- if (dir != NULL) {
- total = 0;
- count = 0;
- while ( (d = readdir(dir)) )
- total++;
- rewinddir(dir);
-
- while ( (d = readdir(dir)) ) {
- char *name, *newname, *destname, *destfilename;
- char *src, *dest;
- int pc = count * 100 / total;
-
- camel_operation_progress(NULL, pc);
- count++;
-
- 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);
- }
- camel_operation_end(NULL);
- }
- 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);
-
- 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;
-
- camel_operation_start(NULL, _("Storing folder"));
-
- count = camel_folder_summary_count((CamelFolderSummary *)cls);
- for (i=count-1;i>=0;i--) {
- camel_operation_progress(NULL, (count-i)*100/count);
-
- 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)
- camel_index_delete_name(cls->index, 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);
- }
-
- camel_operation_end(NULL);
-
- return ((CamelLocalSummaryClass *)parent_class)->sync(cls, expunge, changes, ex);
-}
-
diff --git a/camel/providers/local/camel-maildir-summary.h b/camel/providers/local/camel-maildir-summary.h
deleted file mode 100644
index 0cae785c6c..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_SUMMARY_H
-#define _CAMEL_MAILDIR_SUMMARY_H
-
-#include "camel-local-summary.h"
-#include <camel/camel-folder.h>
-#include <camel/camel-exception.h>
-#include <camel/camel-index.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, CamelIndex *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 9c3a7036f2..0000000000
--- a/camel/providers/local/camel-mbox-folder.c
+++ /dev/null
@@ -1,549 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; fill-column: 160 -*-
- *
- * Authors: Michael Zucchi <notzed@ximian.com>
- * Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright (C) 1999, 2003 Ximian Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 "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))
-
-char *camel_mbox_folder_get_full_path (const char *toplevel_dir, const char *full_name);
-char *camel_mbox_folder_get_meta_path (const char *toplevel_dir, const char *full_name, const char *ext);
-
-static int mbox_lock(CamelLocalFolder *lf, CamelLockType type, CamelException *ex);
-static void mbox_unlock(CamelLocalFolder *lf);
-
-#ifdef STATUS_PINE
-static void mbox_set_message_flags(CamelFolder *folder, const char *uid, guint32 flags, guint32 set);
-#endif
-
-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, char **appended_uid, 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, CamelIndex *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;
-
-#ifdef STATUS_PINE
- camel_folder_class->set_message_flags = mbox_set_message_flags;
-#endif
- 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->get_full_path = camel_mbox_folder_get_full_path;
- lclass->get_meta_path = camel_mbox_folder_get_meta_path;
- 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;
-}
-
-char *
-camel_mbox_folder_get_full_path (const char *toplevel_dir, const char *full_name)
-{
- const char *inptr = full_name;
- int subdirs = 0;
- char *path, *p;
-
- while (*inptr != '\0') {
- if (*inptr == '/')
- subdirs++;
- inptr++;
- }
-
- path = g_malloc (strlen (toplevel_dir) + (inptr - full_name) + (4 * subdirs) + 1);
- p = g_stpcpy (path, toplevel_dir);
-
- inptr = full_name;
- while (*inptr != '\0') {
- while (*inptr != '/' && *inptr != '\0')
- *p++ = *inptr++;
-
- if (*inptr == '/') {
- p = g_stpcpy (p, ".sbd/");
- inptr++;
-
- /* strip extranaeous '/'s */
- while (*inptr == '/')
- inptr++;
- }
- }
-
- *p = '\0';
-
- return path;
-}
-
-char *
-camel_mbox_folder_get_meta_path (const char *toplevel_dir, const char *full_name, const char *ext)
-{
-/*#define USE_HIDDEN_META_FILES*/
-#ifdef USE_HIDDEN_META_FILES
- char *name, *slash;
-
- name = g_alloca (strlen (full_name) + strlen (ext) + 2);
- if ((slash = strrchr (full_name, '/')))
- sprintf (name, "%.*s.%s%s", slash - full_name + 1, full_name, slash + 1, ext);
- else
- sprintf (name, ".%s%s", full_name, ext);
-
- return camel_mbox_folder_get_full_path (toplevel_dir, name);
-#else
- char *full_path, *path;
-
- full_path = camel_mbox_folder_get_full_path (toplevel_dir, full_name);
- path = g_strdup_printf ("%s%s", full_path, ext);
- g_free (full_path);
-
- return path;
-#endif
-}
-
-static CamelLocalSummary *mbox_create_summary(const char *path, const char *folder, CamelIndex *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, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot create folder lock on %s: %s"),
- lf->folder_path, g_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, char **appended_uid, 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, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot open mailbox: %s: %s\n"),
- lf->folder_path, g_strerror (errno));
- goto fail;
- }
-
- /* and we need to set the frompos/XEV explicitly */
- ((CamelMboxMessageInfo *)mi)->frompos = mbs->folder_size;
-#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 ... */
- fromline = camel_mime_message_build_mbox_from(message);
- if (camel_stream_write(output_stream, fromline, strlen(fromline)) == -1)
- goto fail_write;
-
- /* and write the content to the filtering stream, that translates '\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
- || camel_stream_write(filter_stream, "\n", 1) == -1
- || camel_stream_close(filter_stream) == -1)
- goto fail_write;
-
- /* 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;
- }
-
- /* unlock as soon as we can */
- camel_local_folder_unlock(lf);
-
- 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);
- }
-
- if (appended_uid)
- *appended_uid = g_strdup(camel_message_info_uid(mi));
-
- return;
-
-fail_write:
- if (errno == EINTR)
- camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL,
- _("Mail append cancelled"));
- else
- 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 = NULL;
- CamelMboxMessageInfo *info;
- CamelMimeParser *parser = NULL;
- int fd, retval;
- int retried = FALSE;
- off_t frompos;
-
- d(printf("Getting message %s\n", uid));
-
- /* lock the folder first, burn if we can't, need write lock for summary check */
- if (camel_local_folder_lock(lf, CAMEL_LOCK_WRITE, ex) == -1)
- return NULL;
-
- /* check for new messages always */
- if (camel_local_summary_check((CamelLocalSummary *)folder->summary, lf->changes, ex) == -1) {
- camel_local_folder_unlock(lf);
- 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"));
- goto fail;
- }
-
- /* no frompos, its an error in the library (and we can't do anything with it) */
- g_assert(info->frompos != -1);
-
- frompos = info->frompos;
- camel_folder_summary_info_free(folder->summary, (CamelMessageInfo *)info);
-
- /* 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, g_strerror (errno));
- goto fail;
- }
-
- /* we use a parser to verify the message is correct, and in the correct position */
- parser = camel_mime_parser_new();
- camel_mime_parser_init_with_fd(parser, fd);
- camel_mime_parser_scan_from(parser, TRUE);
-
- camel_mime_parser_seek(parser, frompos, SEEK_SET);
- if (camel_mime_parser_step(parser, NULL, NULL) != CAMEL_MIME_PARSER_STATE_FROM
- || camel_mime_parser_tell_start_from(parser) != frompos) {
-
- g_warning("Summary doesn't match the folder contents! eek!\n"
- " expecting offset %ld got %ld, state = %d", (long int)frompos,
- (long int)camel_mime_parser_tell_start_from(parser),
- camel_mime_parser_state(parser));
-
- camel_object_unref((CamelObject *)parser);
- parser = NULL;
-
- if (!retried) {
- retried = TRUE;
- camel_local_summary_check_force((CamelLocalSummary *)folder->summary);
- 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."));
- goto fail;
- }
-
- message = camel_mime_message_new();
- if (camel_mime_part_construct_from_parser((CamelMimePart *)message, parser) == -1) {
- camel_exception_setv(ex, errno==EINTR?CAMEL_EXCEPTION_USER_CANCEL: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 *)message);
- message = NULL;
- goto fail;
- }
-
- camel_medium_remove_header((CamelMedium *)message, "X-Evolution");
-fail:
- /* and unlock now we're finished with it */
- camel_local_folder_unlock(lf);
-
- if (parser)
- 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;
-}
-
-#ifdef STATUS_PINE
-static void
-mbox_set_message_flags(CamelFolder *folder, const char *uid, guint32 flags, guint32 set)
-{
- /* Basically, if anything could change the Status line, presume it does */
- if (((CamelMboxSummary *)folder->summary)->xstatus
- && (flags & (CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_FLAGGED|CAMEL_MESSAGE_ANSWERED|CAMEL_MESSAGE_DELETED))) {
- flags |= CAMEL_MESSAGE_FOLDER_XEVCHANGE|CAMEL_MESSAGE_FOLDER_FLAGGED;
- set |= CAMEL_MESSAGE_FOLDER_XEVCHANGE|CAMEL_MESSAGE_FOLDER_FLAGGED;
- }
-
- ((CamelFolderClass *)parent_class)->set_message_flags(folder, uid, flags, set);
-}
-#endif
-
-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);
- if (info == NULL)
- return;
-
- 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);
- if (info == NULL)
- return;
-
- 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 aa0b67201f..0000000000
--- a/camel/providers/local/camel-mbox-folder.h
+++ /dev/null
@@ -1,62 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 ffce19171f..0000000000
--- a/camel/providers/local/camel-mbox-store.c
+++ /dev/null
@@ -1,753 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <unistd.h>
-#include <dirent.h>
-#include <fcntl.h>
-#include <errno.h>
-
-#include "camel-mbox-store.h"
-#include "camel-mbox-folder.h"
-#include "camel-file-utils.h"
-#include "camel-text-index.h"
-#include "camel-exception.h"
-#include "camel-url.h"
-
-#define d(x)
-
-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))
-
-extern char *camel_mbox_folder_get_full_path (const char *toplevel_dir, const char *full_name);
-extern char *camel_mbox_folder_get_meta_path (const char *toplevel_dir, const char *full_name, const char *ext);
-
-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 rename_folder (CamelStore *store, const char *old, const char *new, CamelException *ex);
-static CamelFolderInfo *create_folder (CamelStore *store, const char *parent_name, const char *folder_name, CamelException *ex);
-static CamelFolderInfo *get_folder_info (CamelStore *store, const char *top, guint32 flags, 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;
- camel_store_class->rename_folder = rename_folder;
- camel_store_class->create_folder = create_folder;
-
- camel_store_class->get_folder_info = get_folder_info;
- camel_store_class->free_folder_info = camel_store_free_folder_info_full;
-}
-
-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 char *
-mbox_folder_name_to_path (CamelStore *store, const char *folder_name)
-{
- const char *toplevel_dir = CAMEL_LOCAL_STORE (store)->toplevel_dir;
-
- return camel_mbox_folder_get_full_path (toplevel_dir, folder_name);
-}
-
-static char *
-mbox_folder_name_to_meta_path (CamelStore *store, const char *folder_name, const char *ext)
-{
- const char *toplevel_dir = CAMEL_LOCAL_STORE (store)->toplevel_dir;
-
- return camel_mbox_folder_get_meta_path (toplevel_dir, folder_name, ext);
-}
-
-static char *extensions[] = {
- ".msf", ".ev-summary", ".ibex.index", ".ibex.index.data", ".cmeta"
-};
-
-static gboolean
-ignore_file (const char *filename, gboolean sbd)
-{
- int flen, len, i;
-
- flen = strlen (filename);
- for (i = 0; i < (sizeof (extensions) / sizeof (extensions[0])); i++) {
- len = strlen (extensions[i]);
- if (len < flen && !strcmp (filename + flen - len, extensions[i]))
- return TRUE;
- }
-
- if (sbd && flen > 4 && !strcmp (filename + flen - 4, ".sbd"))
- return TRUE;
-
- return FALSE;
-}
-
-static CamelFolder *
-get_folder (CamelStore *store, const char *folder_name, guint32 flags, CamelException *ex)
-{
- struct stat st;
- char *name;
-
- if (!((CamelStoreClass *) parent_class)->get_folder (store, folder_name, flags, ex))
- return NULL;
-
- name = mbox_folder_name_to_path (store, folder_name);
-
- if (stat (name, &st) == -1) {
- char *dirname;
- 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;
- }
-
- dirname = g_path_get_dirname (name);
- if (camel_mkdir (dirname, 0777) == -1 && errno != EEXIST) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- _("Could not create directory `%s':\n%s"),
- dirname, g_strerror (errno));
- g_free (dirname);
- g_free (name);
- return NULL;
- }
-
- g_free (dirname);
-
- fd = open (name, O_WRONLY | O_CREAT | O_APPEND, 0666);
- 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)
-{
- CamelFolderInfo *fi;
- CamelException lex;
- CamelFolder *lf;
- char *name, *path;
- struct stat st;
-
- name = mbox_folder_name_to_path (store, folder_name);
- path = g_strdup_printf ("%s.sbd", name);
-
- if (rmdir (path) == -1 && errno != ENOENT) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not delete folder `%s':\n%s"),
- folder_name, g_strerror (errno));
- g_free (path);
- g_free (name);
- return;
- }
-
- g_free (path);
-
- 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;
- }
-
- /* FIXME: we have to do our own meta cleanup here rather than
- * calling our parent class' delete_folder() method since our
- * naming convention is different. Need to find a way for
- * CamelLocalStore to be able to construct the folder & meta
- * paths itself */
- path = mbox_folder_name_to_meta_path (store, folder_name, ".ev-summary");
- if (unlink (path) == -1 && errno != ENOENT) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not delete folder summary file `%s': %s"),
- path, g_strerror (errno));
- g_free (path);
- g_free (name);
- return;
- }
-
- g_free (path);
-
- path = mbox_folder_name_to_meta_path (store, folder_name, ".ibex");
- if (camel_text_index_remove (path) == -1 && errno != ENOENT) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not delete folder index file `%s': %s"),
- path, g_strerror (errno));
- g_free (path);
- g_free (name);
- return;
- }
-
- g_free (path);
-
- camel_exception_init (&lex);
- if ((lf = camel_store_get_folder (store, folder_name, 0, &lex))) {
- camel_object_get (lf, NULL, CAMEL_OBJECT_STATE_FILE, &path, NULL);
- camel_object_set (lf, NULL, CAMEL_OBJECT_STATE_FILE, NULL, NULL);
- camel_object_unref (lf);
- } else {
- camel_exception_clear (&lex);
- }
-
- if (path == NULL)
- path = mbox_folder_name_to_meta_path (store, folder_name, ".cmeta");
-
- if (unlink (path) == -1 && errno != ENOENT) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not delete folder meta file `%s': %s"),
- path, g_strerror (errno));
-
- g_free (path);
- g_free (name);
- return;
- }
-
- g_free (path);
- g_free (name);
-
- fi = g_new0 (CamelFolderInfo, 1);
- fi->full_name = g_strdup (folder_name);
- fi->name = g_path_get_basename (folder_name);
- fi->url = g_strdup_printf ("mbox:%s#%s", ((CamelService *) store)->url->path, folder_name);
- fi->unread_message_count = -1;
- camel_folder_info_build_path (fi, '/');
-
- camel_object_trigger_event (store, "folder_deleted", fi);
-
- camel_folder_info_free (fi);
-}
-
-static CamelFolderInfo *
-create_folder (CamelStore *store, const char *parent_name, const char *folder_name, CamelException *ex)
-{
- /* FIXME: this is almost an exact copy of CamelLocalStore::create_folder() except that we use
- * different path schemes... need to find a way to share parent's code? */
- const char *toplevel_dir = ((CamelLocalStore *) store)->toplevel_dir;
- CamelFolderInfo *info = NULL;
- char *path, *name, *dir;
- CamelFolder *folder;
- struct stat st;
-
- if (toplevel_dir[0] != '/') {
- camel_exception_setv (ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- _("Store root %s is not an absolute path"), toplevel_dir);
- return NULL;
- }
-
- if (folder_name[0] == '.' || ignore_file (folder_name, TRUE)) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot create a folder by this name."));
- return NULL;
- }
-
- if (parent_name && *parent_name)
- name = g_strdup_printf ("%s/%s", parent_name, folder_name);
- else
- name = g_strdup (folder_name);
-
- path = mbox_folder_name_to_path (store, name);
-
- dir = g_path_get_dirname (path);
- if (camel_mkdir (dir, 0777) == -1 && errno != EEXIST) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, _("Cannot create directory `%s': %s."),
- dir, g_strerror (errno));
-
- g_free (path);
- g_free (name);
- g_free (dir);
-
- return NULL;
- }
-
- g_free (dir);
-
- if (stat (path, &st) == 0 || errno != ENOENT) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- _("Cannot create folder: %s: %s"),
- path, errno ? g_strerror (errno) :
- _("Folder already exists"));
-
- g_free (path);
- g_free (name);
-
- return NULL;
- }
-
- g_free (path);
-
- folder = ((CamelStoreClass *) ((CamelObject *) store)->klass)->get_folder (store, name, CAMEL_STORE_FOLDER_CREATE, ex);
- if (folder) {
- camel_object_unref (folder);
- info = ((CamelStoreClass *) ((CamelObject *) store)->klass)->get_folder_info (store, name, 0, ex);
- }
-
- g_free (name);
-
- return info;
-}
-
-static int
-xrename (CamelStore *store, const char *old_name, const char *new_name, const char *ext, gboolean missingok, CamelException *ex)
-{
- const char *toplevel_dir = ((CamelLocalStore *) store)->toplevel_dir;
- char *oldpath, *newpath;
- struct stat st;
- int ret = -1;
- int err = 0;
-
- if (ext != NULL) {
- oldpath = camel_mbox_folder_get_meta_path (toplevel_dir, old_name, ext);
- newpath = camel_mbox_folder_get_meta_path (toplevel_dir, new_name, ext);
- } else {
- oldpath = camel_mbox_folder_get_full_path (toplevel_dir, old_name);
- newpath = camel_mbox_folder_get_full_path (toplevel_dir, new_name);
- }
-
- if (stat (oldpath, &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 (oldpath, newpath) == 0 || stat (newpath, &st) == 0) {
- ret = 0;
- } else {
- err = errno;
- ret = -1;
- }
- } else if (link (oldpath, newpath) == 0 /* and link for files */
- || (stat (newpath, &st) == 0 && st.st_nlink == 2)) {
- if (unlink (oldpath) == 0) {
- ret = 0;
- } else {
- err = errno;
- unlink (newpath);
- ret = -1;
- }
- } else {
- err = errno;
- ret = -1;
- }
-
- if (ret == -1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not rename %s to %s: %s"),
- oldpath, newpath, g_strerror (err));
- }
-
- g_free (oldpath);
- g_free (newpath);
-
- return ret;
-}
-
-static void
-rename_folder (CamelStore *store, const char *old, const char *new, CamelException *ex)
-{
- CamelLocalFolder *folder = NULL;
- char *oldibex, *newibex;
-
- if (new[0] == '.' || ignore_file (new, TRUE)) {
- printf ("exception: The new folder name is illegal.\n");
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("The new folder name is illegal."));
- return;
- }
-
- /* try to rollback failures, has obvious races */
-
- oldibex = mbox_folder_name_to_meta_path (store, old, ".ibex");
- newibex = mbox_folder_name_to_meta_path (store, new, ".ibex");
-
- folder = camel_object_bag_get (store->folders, old);
- if (folder && folder->index) {
- if (camel_index_rename (folder->index, newibex) == -1)
- goto ibex_failed;
- } else {
- /* TODO: camel_text_index_rename should find out if we have an active index itself? */
- if (camel_text_index_rename (oldibex, newibex) == -1)
- goto ibex_failed;
- }
-
- if (xrename (store, old, new, ".ev-summary", TRUE, ex))
- goto summary_failed;
-
- if (xrename (store, old, new, NULL, FALSE, ex))
- goto base_failed;
-
- g_free (oldibex);
- g_free (newibex);
-
- if (folder)
- camel_object_unref (folder);
-
- return;
-
- base_failed:
-
- xrename (store, new, old, ".ev-summary", TRUE, ex);
-
- summary_failed:
-
- if (folder) {
- if (folder->index)
- camel_index_rename (folder->index, oldibex);
- } else
- camel_text_index_rename (newibex, oldibex);
- ibex_failed:
-
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not rename '%s': %s"),
- old, g_strerror (errno));
-
- g_free (newibex);
- g_free (oldibex);
-
- if (folder)
- camel_object_unref (folder);
-}
-
-
-/* used to find out where we've visited already */
-struct _inode {
- dev_t dnode;
- ino_t inode;
-};
-
-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 *
-scan_dir (CamelStore *store, GHashTable *visited, CamelFolderInfo *parent, const char *root,
- const char *name, guint32 flags, CamelException *ex)
-{
- CamelFolderInfo *folders, *tail, *fi;
- GHashTable *folder_hash;
- struct dirent *dent;
- DIR *dir;
-
- tail = folders = NULL;
-
- if (!(dir = opendir (root)))
- return NULL;
-
- folder_hash = g_hash_table_new (g_str_hash, g_str_equal);
-
- /* FIXME: it would be better if we queue'd up the recursive
- * scans till the end so that we can limit the number of
- * directory descriptors open at any given time... */
-
- while ((dent = readdir (dir))) {
- char *short_name, *full_name, *path, *ext;
- CamelFolder *folder;
- struct stat st;
- int unread = -1;
-
- if (dent->d_name[0] == '.')
- continue;
-
- if (ignore_file (dent->d_name, FALSE))
- continue;
-
- path = g_strdup_printf ("%s/%s", root, dent->d_name);
- if (stat (path, &st) == -1) {
- g_free (path);
- continue;
- }
-
- if (S_ISDIR (st.st_mode)) {
- struct _inode in = { st.st_dev, st.st_ino };
-
- if (g_hash_table_lookup (visited, &in)) {
- g_free (path);
- continue;
- }
- }
-
- short_name = g_strdup (dent->d_name);
- if ((ext = strrchr (short_name, '.')) && !strcmp (ext, ".sbd"))
- *ext = '\0';
-
- if (name != NULL)
- full_name = g_strdup_printf ("%s/%s", name, short_name);
- else
- full_name = g_strdup (short_name);
-
- if (!S_ISDIR (st.st_mode)) {
- folder = camel_object_bag_get (store->folders, full_name);
- if (folder) {
- if ((flags & CAMEL_STORE_FOLDER_INFO_FAST) == 0)
- camel_folder_refresh_info (folder, NULL);
- unread = camel_folder_get_unread_message_count (folder);
- camel_object_unref (folder);
- }
- }
-
- if ((fi = g_hash_table_lookup (folder_hash, short_name)) != NULL) {
- g_free (short_name);
- g_free (full_name);
-
- if (S_ISDIR (st.st_mode)) {
- fi->flags = (fi->flags & ~CAMEL_FOLDER_NOINFERIORS) | CAMEL_FOLDER_CHILDREN;
- } else {
- fi->unread_message_count = unread;
- fi->flags &= ~CAMEL_FOLDER_NOSELECT;
- if ((ext = strchr (fi->url, ';')) && !strncmp (ext, ";noselect=yes", 13))
- memmove (ext, ext + 13, strlen (ext + 13) + 1);
- }
- } else {
- fi = g_new0 (CamelFolderInfo, 1);
- fi->parent = parent;
-
- /* add ";noselect=yes" if we haven't found the mbox file yet. when we find it, remove the noselect */
- fi->url = g_strdup_printf ("mbox:%s%s#%s", ((CamelService *) store)->url->path,
- S_ISDIR (st.st_mode) ? ";noselect=yes" : "", full_name);
- fi->name = short_name;
- fi->full_name = full_name;
- fi->path = g_strdup_printf ("/%s", full_name);
- fi->unread_message_count = unread;
-
- if (S_ISDIR (st.st_mode))
- fi->flags = CAMEL_FOLDER_NOSELECT;
- else
- fi->flags = CAMEL_FOLDER_NOINFERIORS;
-
- if (tail == NULL)
- folders = fi;
- else
- tail->sibling = fi;
-
- tail = fi;
-
- g_hash_table_insert (folder_hash, fi->name, fi);
- }
-
- if ((flags & CAMEL_STORE_FOLDER_INFO_RECURSIVE) && S_ISDIR (st.st_mode)) {
- struct _inode in = { st.st_dev, st.st_ino };
-
- if (g_hash_table_lookup (visited, &in) == NULL) {
- struct _inode *inew = g_new (struct _inode, 1);
-
- *inew = in;
-
- g_hash_table_insert (visited, inew, inew);
-
- if ((fi->child = scan_dir (store, visited, fi, path, fi->full_name, flags, ex)))
- fi->flags |= CAMEL_FOLDER_CHILDREN;
- }
- }
-
- g_free (path);
- }
-
- closedir (dir);
-
- g_hash_table_destroy (folder_hash);
-
- return folders;
-}
-
-static CamelFolderInfo *
-get_folder_info (CamelStore *store, const char *top, guint32 flags, CamelException *ex)
-{
- GHashTable *visited;
- struct _inode *inode;
- char *path, *subdir;
- CamelFolderInfo *fi;
- CamelFolder *folder;
- const char *base;
- struct stat st;
- int unread = -1;
-
- top = top ? top : "";
- path = mbox_folder_name_to_path (store, top);
-
- if (*top == '\0') {
- /* requesting root dir scan */
- if (stat (path, &st) == -1 || !S_ISDIR (st.st_mode)) {
- g_free (path);
- return NULL;
- }
-
- visited = g_hash_table_new (inode_hash, inode_equal);
-
- inode = g_new (struct _inode, 1);
- inode->dnode = st.st_dev;
- inode->inode = st.st_ino;
-
- g_hash_table_insert (visited, inode, inode);
-
- fi = scan_dir (store, visited, NULL, path, NULL, flags, ex);
- g_hash_table_foreach (visited, inode_free, NULL);
- g_hash_table_destroy (visited);
- g_free (path);
-
- return fi;
- }
-
- /* requesting scan of specific folder */
- if (stat (path, &st) == -1 || !S_ISREG (st.st_mode)) {
- g_free (path);
- return NULL;
- }
-
- visited = g_hash_table_new (inode_hash, inode_equal);
-
- if (!(base = strrchr (top, '/')))
- base = top;
- else
- base++;
-
- folder = camel_object_bag_get (store->folders, top);
- if (folder) {
- if ((flags & CAMEL_STORE_FOLDER_INFO_FAST) == 0)
- camel_folder_refresh_info (folder, NULL);
- unread = camel_folder_get_unread_message_count (folder);
- camel_object_unref (folder);
- }
-
- fi = g_new0 (CamelFolderInfo, 1);
- fi->parent = NULL;
- fi->url = g_strdup_printf ("mbox:%s#%s", ((CamelService *) store)->url->path, top);
- fi->name = g_strdup (base);
- fi->full_name = g_strdup (top);
- fi->unread_message_count = unread;
- fi->path = g_strdup_printf ("/%s", top);
-
- subdir = g_strdup_printf ("%s.sbd", path);
- if (stat (subdir, &st) == 0 && S_ISDIR (st.st_mode))
- fi->child = scan_dir (store, visited, fi, subdir, top, flags, ex);
-
- if (fi->child)
- fi->flags |= CAMEL_FOLDER_CHILDREN;
- else
- fi->flags |= CAMEL_FOLDER_NOINFERIORS;
-
- g_free (subdir);
-
- g_hash_table_foreach (visited, inode_free, NULL);
- g_hash_table_destroy (visited);
- g_free (path);
-
- return fi;
-}
diff --git a/camel/providers/local/camel-mbox-store.h b/camel/providers/local/camel-mbox-store.h
deleted file mode 100644
index 5b6fbdd926..0000000000
--- a/camel/providers/local/camel-mbox-store.h
+++ /dev/null
@@ -1,58 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 4018fc93c9..0000000000
--- a/camel/providers/local/camel-mbox-summary.c
+++ /dev/null
@@ -1,1029 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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/types.h>
-#include <sys/stat.h>
-#include <fcntl.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)
-
-static int summary_header_load (CamelFolderSummary *, FILE *);
-static int summary_header_save (CamelFolderSummary *, FILE *);
-
-static CamelMessageInfo * message_info_new (CamelFolderSummary *, struct _camel_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);
-#ifdef STATUS_PINE
-static CamelMessageInfo *mbox_summary_add(CamelLocalSummary *cls, CamelMimeMessage *msg, const CamelMessageInfo *info, CamelFolderChangeInfo *ci, CamelException *ex);
-#endif
-
-static int mbox_summary_sync_quick(CamelMboxSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, CamelException *ex);
-static int mbox_summary_sync_full(CamelMboxSummary *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);
-
-#ifdef STATUS_PINE
-/* Which status flags are stored in each separate header */
-#define STATUS_XSTATUS (CAMEL_MESSAGE_FLAGGED|CAMEL_MESSAGE_ANSWERED|CAMEL_MESSAGE_DELETED)
-#define STATUS_STATUS (CAMEL_MESSAGE_SEEN)
-
-static void encode_status(guint32 flags, char status[8]);
-static guint32 decode_status(const char *status);
-#endif
-
-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;
-#ifdef STATUS_PINE
- lklass->add = mbox_summary_add;
-#endif
-
- klass->sync_quick = mbox_summary_sync_quick;
- klass->sync_full = mbox_summary_sync_full;
-}
-
-static void
-camel_mbox_summary_init(CamelMboxSummary *obj)
-{
- struct _CamelFolderSummary *s = (CamelFolderSummary *)obj;
-
- /* 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, CamelIndex *index)
-{
- CamelMboxSummary *new = (CamelMboxSummary *)camel_object_new(camel_mbox_summary_get_type());
-
- camel_local_summary_construct((CamelLocalSummary *)new, filename, mbox_name, index);
- return new;
-}
-
-void camel_mbox_summary_xstatus(CamelMboxSummary *mbs, int state)
-{
- mbs->xstatus = state;
-}
-
-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, (guint32 *) &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 _camel_header_raw *h)
-{
- CamelMessageInfo *mi;
- CamelMboxSummary *mbs = (CamelMboxSummary *)s;
-
- mi = ((CamelFolderSummaryClass *)camel_mbox_summary_parent)->message_info_new(s, h);
- if (mi) {
- CamelMboxMessageInfo *mbi = (CamelMboxMessageInfo *)mi;
- const char *xev, *uid;
- CamelMessageInfo *info = NULL;
- int add = 0; /* bitmask of things to add, 1 assign uid, 2, just add as new, 4 = recent */
-#ifdef STATUS_PINE
- const char *status = NULL, *xstatus = NULL;
- guint32 flags = 0;
-
- if (mbs->xstatus) {
- /* check for existance of status & x-status headers */
- status = camel_header_raw_find(&h, "Status", NULL);
- if (status)
- flags = decode_status(status);
- xstatus = camel_header_raw_find(&h, "X-Status", NULL);
- if (xstatus)
- flags |= decode_status(xstatus);
- }
-#endif
- /* if we have an xev header, use it, else assign a new one */
- xev = camel_header_raw_find(&h, "X-Evolution", NULL);
- if (xev != NULL
- && camel_local_summary_decode_x_evolution((CamelLocalSummary *)s, xev, mi) == 0) {
- uid = camel_message_info_uid(mi);
- d(printf("found valid x-evolution: %s\n", uid));
- info = camel_folder_summary_uid(s, uid);
- if (info) {
- if ((info->flags & CAMEL_MESSAGE_FOLDER_NOTSEEN)) {
- info->flags &= ~CAMEL_MESSAGE_FOLDER_NOTSEEN;
- camel_folder_summary_info_free(s, mi);
- mbi = (CamelMboxMessageInfo *)mi = info;
- } else {
- add = 7;
- d(printf("seen '%s' before, adding anew\n", uid));
- camel_folder_summary_info_free(s, info);
- }
- } else {
- add = 2;
- d(printf("but isn't present in summary\n"));
- }
- } else {
- d(printf("didn't find x-evolution\n"));
- add = 7;
- }
-
- if (add&1) {
- mi->flags |= CAMEL_MESSAGE_FOLDER_FLAGGED | CAMEL_MESSAGE_FOLDER_NOXEV;
- camel_message_info_set_uid(mi, camel_folder_summary_next_uid_string(s));
- } else {
- camel_folder_summary_set_uid(s, strtoul(camel_message_info_uid(mi), NULL, 10));
- }
-#ifdef STATUS_PINE
- if (mbs->xstatus && add&2) {
- /* use the status as the flags when we read it the first time */
- if (status)
- mi->flags = (mi->flags & ~(STATUS_STATUS)) | (flags & STATUS_STATUS);
- if (xstatus)
- mi->flags = (mi->flags & ~(STATUS_XSTATUS)) | (flags & STATUS_XSTATUS);
- }
-#endif
- if (mbs->changes) {
- if (add&2)
- camel_folder_change_info_add_uid(mbs->changes, camel_message_info_uid(mi));
- if ((add&4) && status == NULL)
- camel_folder_change_info_recent_uid(mbs->changes, camel_message_info_uid(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;
-}
-
-/* like summary_rebuild, but also do changeinfo stuff (if supplied) */
-static int
-summary_update(CamelLocalSummary *cls, off_t offset, CamelFolderChangeInfo *changeinfo, CamelException *ex)
-{
- int i, count;
- CamelFolderSummary *s = (CamelFolderSummary *)cls;
- CamelMboxSummary *mbs = (CamelMboxSummary *)cls;
- CamelMimeParser *mp;
- CamelMessageInfo *mi;
- int fd;
- int ok = 0;
- struct stat st;
- off_t size = 0;
-
- d(printf("Calling summary update, from pos %d\n", (int)offset));
-
- cls->index_force = FALSE;
-
- 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, CAMEL_EXCEPTION_SYSTEM,
- _("Could not open folder: %s: %s"),
- cls->folder_path, g_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) == CAMEL_MIME_PARSER_STATE_FROM
- && camel_mime_parser_tell_start_from(mp) == offset) {
- camel_mime_parser_unstep(mp);
- } else {
- 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);
- }
- }
-
- /* we mark messages as to whether we've seen them or not.
- If we're not starting from the start, we must be starting
- from the old end, so everything must be treated as new */
- count = camel_folder_summary_count(s);
- for (i=0;i<count;i++) {
- mi = camel_folder_summary_index(s, i);
- if (offset == 0)
- mi->flags |= CAMEL_MESSAGE_FOLDER_NOTSEEN;
- else
- mi->flags &= ~CAMEL_MESSAGE_FOLDER_NOTSEEN;
- camel_folder_summary_info_free(s, mi);
- }
- mbs->changes = changeinfo;
-
- while (camel_mime_parser_step(mp, NULL, NULL) == CAMEL_MIME_PARSER_STATE_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) == CAMEL_MIME_PARSER_STATE_FROM_END);
- }
-
- camel_object_unref(CAMEL_OBJECT (mp));
-
- count = camel_folder_summary_count(s);
- for (i=0;i<count;i++) {
- mi = camel_folder_summary_index(s, i);
- /* must've dissapeared from the file? */
- if (mi->flags & CAMEL_MESSAGE_FOLDER_NOTSEEN) {
- d(printf("uid '%s' vanished, removing", camel_message_info_uid(mi)));
- if (changeinfo)
- camel_folder_change_info_remove_uid(changeinfo, camel_message_info_uid(mi));
- camel_folder_summary_remove(s, mi);
- count--;
- i--;
- }
- camel_folder_summary_info_free(s, mi);
- }
- mbs->changes = NULL;
-
- /* 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;
-}
-
-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;
- int i, count;
-
- 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, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot check folder: %s: %s"),
- cls->folder_path, g_strerror (errno));
- return -1;
- }
-
- if (cls->check_force)
- mbs->folder_size = 0;
- cls->check_force = 0;
-
- if (st.st_size == 0) {
- /* empty? No need to scan at all */
- d(printf("Empty mbox, clearing summary\n"));
- count= camel_folder_summary_count(s);
- for (i=0;i<count;i++) {
- CamelMessageInfo *info = camel_folder_summary_index(s, i);
-
- if (info) {
- camel_folder_change_info_remove_uid(changes, camel_message_info_uid(info));
- camel_folder_summary_info_free(s, info);
- }
- }
- camel_folder_summary_clear(s);
- ret = 0;
- } 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"));
- ret = summary_update(cls, 0, changes, ex);
- }
- } else {
- d(printf("Folder unchanged, do nothing\n"));
- }
- }
-
- /* FIXME: move upstream? */
-
- if (ret != -1) {
- if (mbs->folder_size != st.st_size || s->time != st.st_mtime) {
- mbs->folder_size = st.st_size;
- s->time = st.st_mtime;
- camel_folder_summary_touch(s);
- }
- }
-
- return ret;
-}
-
-/* perform a full sync */
-static int
-mbox_summary_sync_full(CamelMboxSummary *mbs, gboolean expunge, CamelFolderChangeInfo *changeinfo, CamelException *ex)
-{
- CamelLocalSummary *cls = (CamelLocalSummary *)mbs;
- int fd = -1, fdout = -1;
- char *tmpname = NULL;
- guint32 flags = (expunge?1:0);
-
- 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, g_strerror (errno));
- camel_operation_end(NULL);
- return -1;
- }
-
- tmpname = g_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"),
- g_strerror (errno));
- goto error;
- }
-
- if (camel_mbox_summary_sync_mbox((CamelMboxSummary *)cls, flags, changeinfo, fd, fdout, ex) == -1)
- goto error;
-
- 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, g_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"),
- g_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"),
- g_strerror (errno));
- goto error;
- }
- tmpname = NULL;
-
- camel_operation_end(NULL);
-
- return 0;
- error:
- if (fd != -1)
- close(fd);
-
- if (fdout != -1)
- close(fdout);
-
- if (tmpname)
- unlink(tmpname);
-
- camel_operation_end(NULL);
-
- return -1;
-}
-
-/* perform a quick sync - only system flags have changed */
-static int
-mbox_summary_sync_quick(CamelMboxSummary *mbs, gboolean expunge, CamelFolderChangeInfo *changeinfo, CamelException *ex)
-{
- CamelLocalSummary *cls = (CamelLocalSummary *)mbs;
- 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, g_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", 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) != CAMEL_MIME_PARSER_STATE_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) == CAMEL_MIME_PARSER_STATE_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 = camel_header_unfold(xevnew);
- /* the raw header contains a leading ' ', so (dis)count that too */
- if (strlen(xev)-1 != strlen(xevtmp)) {
- printf ("strlen(xev)-1 = %d; strlen(xevtmp) = %d\n", strlen(xev)-1, strlen(xevtmp));
- printf ("xev='%s'; xevtmp='%s'\n", xev, 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, g_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 (camel_local_summary_check(cls, 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 = ((CamelMboxSummaryClass *)((CamelObject *)cls)->klass)->sync_quick(mbs, 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 = ((CamelMboxSummaryClass *)((CamelObject *)cls)->klass)->sync_full(mbs, 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"), g_strerror (errno));
- return -1;
- }
-
- if (mbs->folder_size != st.st_size || s->time != st.st_mtime) {
- s->time = st.st_mtime;
- mbs->folder_size = st.st_size;
- camel_folder_summary_touch(s);
- }
-
- return ((CamelLocalSummaryClass *)camel_mbox_summary_parent)->sync(cls, expunge, changeinfo, ex);
-}
-
-int
-camel_mbox_summary_sync_mbox(CamelMboxSummary *cls, guint32 flags, CamelFolderChangeInfo *changeinfo, int fd, int fdout, CamelException *ex)
-{
- CamelMboxSummary *mbs = (CamelMboxSummary *)cls;
- CamelFolderSummary *s = (CamelFolderSummary *)mbs;
- CamelMimeParser *mp = NULL;
- int i, count;
- CamelMboxMessageInfo *info = NULL;
- char *buffer, *xevnew = NULL;
- size_t len;
- const char *fromline;
- int lastdel = FALSE;
-#ifdef STATUS_PINE
- char statnew[8], xstatnew[8];
-#endif
-
- d(printf("performing full summary/sync\n"));
-
- /* need to dup this because the mime-parser owns the fd after we give it to it */
- fd = dup(fd);
- if (fd == -1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not store folder: %s"),
- g_strerror (errno));
- 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 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", 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) != CAMEL_MIME_PARSER_STATE_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 ((flags&1) && info->info.flags & CAMEL_MESSAGE_DELETED) {
- const char *uid = camel_message_info_uid(info);
-
- d(printf("Deleting %s\n", uid));
-
- if (((CamelLocalSummary *)cls)->index)
- camel_index_delete_name(((CamelLocalSummary *)cls)->index, 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 0
- if (i>0)
- write(fdout, "\n", 1);
-#endif
- 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) == CAMEL_MIME_PARSER_STATE_FROM_END) {
- g_warning("camel_mime_parser_step failed (2)");
- goto error;
- }
-
- xevnew = camel_local_summary_encode_x_evolution((CamelLocalSummary *)cls, (CamelMessageInfo *)info);
-#ifdef STATUS_PINE
- if (mbs->xstatus) {
- encode_status(((CamelMessageInfo *)info)->flags & STATUS_STATUS, statnew);
- encode_status(((CamelMessageInfo *)info)->flags & STATUS_XSTATUS, xstatnew);
- len = camel_local_summary_write_headers(fdout, camel_mime_parser_headers_raw(mp), xevnew, statnew, xstatnew);
- } else {
-#endif
- len = camel_local_summary_write_headers(fdout, camel_mime_parser_headers_raw(mp), xevnew, NULL, NULL);
-#ifdef STATUS_PINE
- }
-#endif
- if (len == -1) {
- d(printf("Error writing to tmp mailbox\n"));
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Error writing to temp mailbox: %s"),
- g_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) == CAMEL_MIME_PARSER_STATE_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"),
- ((CamelLocalSummary *)cls)->folder_path,
- g_strerror (errno));
- goto error;
- }
- }
-
- if (write(fdout, "\n", 1) != 1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Error writing to temp mailbox: %s"),
- g_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;
- }
- }
-
-#if 0
- /* if last was deleted, append the \n we removed */
- if (lastdel && count > 0)
- write(fdout, "\n", 1);
-#endif
-
- camel_object_unref((CamelObject *)mp);
-
- return 0;
- error:
- g_free(xevnew);
-
- if (mp)
- camel_object_unref((CamelObject *)mp);
- if (info)
- camel_folder_summary_info_free(s, (CamelMessageInfo *)info);
-
- return -1;
-}
-
-#ifdef STATUS_PINE
-static CamelMessageInfo *
-mbox_summary_add(CamelLocalSummary *cls, CamelMimeMessage *msg, const CamelMessageInfo *info, CamelFolderChangeInfo *ci, CamelException *ex)
-{
- CamelMessageInfo *mi;
-
- mi = ((CamelLocalSummaryClass *)camel_mbox_summary_parent)->add(cls, msg, info, ci, ex);
- if (mi && ((CamelMboxSummary *)cls)->xstatus) {
- char status[8];
-
- /* we snoop and add status/x-status headers to suit */
- encode_status(mi->flags & STATUS_STATUS, status);
- camel_medium_set_header((CamelMedium *)msg, "Status", status);
- encode_status(mi->flags & STATUS_XSTATUS, status);
- camel_medium_set_header((CamelMedium *)msg, "X-Status", status);
- }
-
- return mi;
-}
-
-static struct {
- char tag;
- guint32 flag;
-} status_flags[] = {
- { 'F', CAMEL_MESSAGE_FLAGGED },
- { 'A', CAMEL_MESSAGE_ANSWERED },
- { 'D', CAMEL_MESSAGE_DELETED },
- { 'R', CAMEL_MESSAGE_SEEN },
-};
-
-static void
-encode_status(guint32 flags, char status[8])
-{
- char *p;
- int i;
-
- p = status;
- for (i=0;i<sizeof(status_flags)/sizeof(status_flags[0]);i++)
- if (status_flags[i].flag & flags)
- *p++ = status_flags[i].tag;
- *p++ = 'O';
- *p=0;
-}
-
-static guint32
-decode_status(const char *status)
-{
- const char *p;
- char c;
- guint32 flags = 0;
- int i;
-
- p = status;
- while ((c = *p++)) {
- for (i=0;i<sizeof(status_flags)/sizeof(status_flags[0]);i++)
- if (status_flags[i].tag == *p)
- flags |= status_flags[i].flag;
- }
-
- return flags;
-}
-
-#endif /* STATUS_PINE */
diff --git a/camel/providers/local/camel-mbox-summary.h b/camel/providers/local/camel-mbox-summary.h
deleted file mode 100644
index dc64aa23fa..0000000000
--- a/camel/providers/local/camel-mbox-summary.h
+++ /dev/null
@@ -1,75 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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"
-
-/* Enable the use of elm/pine style "Status" & "X-Status" headers */
-#define STATUS_PINE
-
-#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;
-
- CamelFolderChangeInfo *changes; /* used to build change sets */
-
- size_t folder_size; /* size of the mbox file, last sync */
-
- unsigned int xstatus:1; /* do we store/honour xstatus/status headers */
-};
-
-struct _CamelMboxSummaryClass {
- CamelLocalSummaryClass parent_class;
-
- /* sync in-place */
- int (*sync_quick)(CamelMboxSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, CamelException *ex);
- /* sync requires copy */
- int (*sync_full)(CamelMboxSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, CamelException *ex);
-};
-
-CamelType camel_mbox_summary_get_type (void);
-CamelMboxSummary *camel_mbox_summary_new (const char *filename, const char *mbox_name, CamelIndex *index);
-
-/* do we honour/use xstatus headers, etc */
-void camel_mbox_summary_xstatus(CamelMboxSummary *mbs, int state);
-
-/* build a new mbox from an existing mbox storing summary information */
-int camel_mbox_summary_sync_mbox(CamelMboxSummary *cls, guint32 flags, CamelFolderChangeInfo *changeinfo, int fd, int fdout, CamelException *ex);
-
-#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 25dbacc49a..0000000000
--- a/camel/providers/local/camel-mh-folder.c
+++ /dev/null
@@ -1,231 +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, 2003 Ximian Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 "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, CamelIndex *index);
-
-static void mh_append_message(CamelFolder * folder, CamelMimeMessage * message, const CamelMessageInfo *info, char **appended_uid, 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, CamelIndex *index)
-{
- return (CamelLocalSummary *)camel_mh_summary_new(path, folder, index);
-}
-
-static void
-mh_append_message (CamelFolder *folder, CamelMimeMessage *message, const CamelMessageInfo *info, char **appended_uid, 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);
-
- if (appended_uid)
- *appended_uid = g_strdup(camel_message_info_uid(mi));
-
- 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));
-
- if (errno == EINTR)
- camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL,
- _("MH append message cancelled"));
- else
- 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 125f8c8ac5..0000000000
--- a/camel/providers/local/camel-mh-folder.h
+++ /dev/null
@@ -1,58 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 73a3d2046f..0000000000
--- a/camel/providers/local/camel-mh-store.c
+++ /dev/null
@@ -1,533 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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-mh-store.h"
-#include "camel-mh-folder.h"
-#include "camel-exception.h"
-#include "camel-url.h"
-#include "camel-private.h"
-
-#include <camel/camel-stream-fs.h>
-#include <camel/camel-stream-buffer.h>
-
-static CamelLocalStoreClass *parent_class = NULL;
-
-#define d(x)
-
-/* 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 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 CamelFolder *get_inbox (CamelStore *store, 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 CamelFolderInfo * get_folder_info (CamelStore *store, const char *top, guint32 flags, 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_service_class->construct = construct;
-
- camel_store_class->get_folder = get_folder;
- camel_store_class->get_inbox = get_inbox;
- camel_store_class->delete_folder = delete_folder;
- camel_store_class->rename_folder = rename_folder;
- camel_store_class->get_folder_info = get_folder_info;
-}
-
-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 void
-construct (CamelService *service, CamelSession *session, CamelProvider *provider, CamelURL *url, CamelException *ex)
-{
- CamelMhStore *mh_store = (CamelMhStore *)service;
-
- CAMEL_SERVICE_CLASS (parent_class)->construct (service, session, provider, url, ex);
- if (camel_exception_is_set (ex))
- return;
-
- if (camel_url_get_param(url, "dotfolders"))
- mh_store->flags |= CAMEL_MH_DOTFOLDERS;
-}
-
-enum {
- UPDATE_NONE,
- UPDATE_ADD,
- UPDATE_REMOVE,
-};
-
-/* update the .folders file if it exists, or create it if it doesn't */
-static void
-folders_update(const char *root, const char *folder, int mode)
-{
- char *tmp, *tmpnew, *line = NULL;
- CamelStream *stream, *in = NULL, *out = NULL;
-
- tmpnew = g_alloca (strlen (root) + 16);
- sprintf (tmpnew, "%s.folders~", root);
-
- out = camel_stream_fs_new_with_name(tmpnew, O_WRONLY|O_CREAT|O_TRUNC, 0666);
- if (out == NULL)
- goto fail;
-
- tmp = g_alloca (strlen (root) + 16);
- sprintf (tmp, "%s.folders", root);
- stream = camel_stream_fs_new_with_name(tmp, O_RDONLY, 0);
- if (stream) {
- in = camel_stream_buffer_new(stream, CAMEL_STREAM_BUFFER_READ);
- camel_object_unref(stream);
- }
- if (in == NULL || stream == NULL) {
- if (mode == UPDATE_ADD && camel_stream_printf(out, "%s\n", folder) == -1)
- goto fail;
- goto done;
- }
-
- while ((line = camel_stream_buffer_read_line((CamelStreamBuffer *)in))) {
- int copy = TRUE;
-
- switch (mode) {
- case UPDATE_REMOVE:
- if (strcmp(line, folder) == 0)
- copy = FALSE;
- break;
- case UPDATE_ADD: {
- int cmp = strcmp(line, folder);
-
- if (cmp > 0) {
- /* found insertion point */
- if (camel_stream_printf(out, "%s\n", folder) == -1)
- goto fail;
- mode = UPDATE_NONE;
- } else if (tmp == 0) {
- /* already there */
- mode = UPDATE_NONE;
- }
- break; }
- case UPDATE_NONE:
- break;
- }
-
- if (copy && camel_stream_printf(out, "%s\n", line) == -1)
- goto fail;
-
- g_free(line);
- line = NULL;
- }
-
- /* add to end? */
- if (mode == UPDATE_ADD && camel_stream_printf(out, "%s\n", folder) == -1)
- goto fail;
-
- if (camel_stream_close(out) == -1)
- goto fail;
-
-done:
- /* should we care if this fails? I suppose so ... */
- rename(tmpnew, tmp);
-fail:
- unlink(tmpnew); /* remove it if its there */
- g_free(line);
- if (in)
- camel_object_unref(in);
- if (out)
- camel_object_unref(out);
-}
-
-static CamelFolder *
-get_folder(CamelStore * store, const char *folder_name, guint32 flags, CamelException * ex)
-{
- char *name;
- struct stat st;
-
- if (!((CamelStoreClass *)parent_class)->get_folder(store, folder_name, flags, 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;
- }
-
- /* add to .folders if we are supposed to */
- /* FIXME: throw exception on error */
- if (((CamelMhStore *)store)->flags & CAMEL_MH_DOTFOLDERS)
- folders_update(((CamelLocalStore *)store)->toplevel_dir, folder_name, UPDATE_ADD);
-
- } 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 CamelFolder *
-get_inbox (CamelStore *store, CamelException *ex)
-{
- return get_folder (store, "inbox", 0, 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, g_strerror (errno));
- g_free(name);
- return;
- }
- g_free(name);
-
- /* remove from .folders if we are supposed to */
- if (((CamelMhStore *)store)->flags & CAMEL_MH_DOTFOLDERS)
- folders_update(((CamelLocalStore *)store)->toplevel_dir, folder_name, UPDATE_REMOVE);
-
- /* and remove metadata */
- ((CamelStoreClass *)parent_class)->delete_folder(store, folder_name, ex);
-}
-
-static void
-rename_folder(CamelStore *store, const char *old, const char *new, CamelException *ex)
-{
- CamelException e;
-
- camel_exception_init(&e);
- ((CamelStoreClass *)parent_class)->rename_folder(store, old, new, &e);
- if (camel_exception_is_set(&e)) {
- camel_exception_xfer(ex, &e);
- return;
- }
- camel_exception_clear(&e);
-
- if (((CamelMhStore *)store)->flags & CAMEL_MH_DOTFOLDERS) {
- /* yeah this is messy, but so is mh! */
- folders_update(((CamelLocalStore *)store)->toplevel_dir, new, UPDATE_ADD);
- folders_update(((CamelLocalStore *)store)->toplevel_dir, old, UPDATE_REMOVE);
- }
-}
-
-static CamelFolderInfo *folder_info_new(CamelStore *store, const char *root, const char *path)
-{
- CamelFolderInfo *fi;
- char *base;
- CamelFolder *folder;
-
- base = strrchr(path, '/');
-
- /* Build the folder info structure. */
- fi = g_malloc0(sizeof(*fi));
- fi->url = g_strdup_printf("mh:%s#%s", root, path);
- fi->full_name = g_strdup(path);
- fi->name = g_strdup(base?base+1:path);
- fi->unread_message_count = 0;
-
- /* check unread count if open */
- folder = camel_object_bag_get(store->folders, path);
- if (folder) {
- if ((((CamelMhStore *)store)->flags & CAMEL_STORE_FOLDER_INFO_FAST) == 0)
- camel_folder_refresh_info(folder, NULL);
- fi->unread_message_count = camel_folder_get_unread_message_count(folder);
- camel_object_unref(folder);
- }
-
- /* We could: if we have no folder, and FAST isn't specified, perform a full
- scan of all messages for their status flags. But its probably not worth
- it as we need to read the top of every file, i.e. very very slow */
-
- camel_folder_info_build_path(fi, '/');
-
- d(printf("New folderinfo:\n '%s'\n '%s'\n '%s'\n", fi->full_name, fi->url, fi->path));
-
- return fi;
-}
-
-/* used to find out where we've visited already */
-struct _inode {
- dev_t dnode;
- ino_t inode;
-};
-
-/* Scan path, under root, for directories to add folders for. Both
- * root and path should have a trailing "/" if they aren't empty. */
-static void recursive_scan(CamelStore *store, CamelFolderInfo **fip, CamelFolderInfo *parent, GHashTable *visited, const char *root, const char *path)
-{
- char *fullpath, *tmp;
- DIR *dp;
- struct dirent *d;
- struct stat st;
- CamelFolderInfo *fi;
- struct _inode in, *inew;
-
- /* Open the specified directory. */
- if (path[0]) {
- fullpath = alloca (strlen (root) + strlen (path) + 2);
- sprintf (fullpath, "%s/%s", root, path);
- } else
- fullpath = (char *)root;
-
- if (stat(fullpath, &st) == -1 || !S_ISDIR(st.st_mode))
- return;
-
- in.dnode = st.st_dev;
- in.inode = st.st_ino;
-
- /* see if we've visited already */
- if (g_hash_table_lookup(visited, &in) != NULL)
- return;
-
- inew = g_malloc(sizeof(*inew));
- *inew = in;
- g_hash_table_insert(visited, inew, inew);
-
- /* link in ... */
- fi = folder_info_new(store, root, path);
- fi->parent = parent;
- fi->sibling = *fip;
- *fip = fi;
-
- if ((( ((CamelMhStore *)store)->flags & CAMEL_STORE_FOLDER_INFO_RECURSIVE) || parent == NULL)) {
- /* now check content for possible other directories */
- dp = opendir(fullpath);
- if (dp == NULL)
- return;
-
- /* Look for subdirectories to add and scan. */
- while ((d = readdir(dp)) != NULL) {
- /* Skip current and parent directory. */
- if (strcmp(d->d_name, ".") == 0
- || strcmp(d->d_name, "..") == 0)
- continue;
-
- /* skip fully-numerical entries (i.e. mh messages) */
- strtoul(d->d_name, &tmp, 10);
- if (*tmp == 0)
- continue;
-
- /* otherwise, treat at potential node, and recurse, a bit more expensive than needed, but tough! */
- if (path[0]) {
- tmp = g_strdup_printf("%s/%s", path, d->d_name);
- recursive_scan(store, &fi->child, fi, visited, root, tmp);
- g_free(tmp);
- } else {
- recursive_scan(store, &fi->child, fi, visited, root, d->d_name);
- }
- }
-
- closedir(dp);
- }
-}
-
-/* scan a .folders file */
-static void
-folders_scan(CamelStore *store, const char *root, const char *top, CamelFolderInfo **fip)
-{
- CamelFolderInfo *fi;
- char line[512], *path, *tmp;
- CamelStream *stream, *in;
- struct stat st;
- GPtrArray *folders;
- GHashTable *visited;
- int len;
-
- tmp = g_alloca (strlen (root) + 16);
- sprintf (tmp, "%s/.folders", root);
- stream = camel_stream_fs_new_with_name(tmp, 0, O_RDONLY);
- if (stream == NULL)
- return;
-
- in = camel_stream_buffer_new(stream, CAMEL_STREAM_BUFFER_READ);
- camel_object_unref(stream);
- if (in == NULL)
- return;
-
- visited = g_hash_table_new(g_str_hash, g_str_equal);
- folders = g_ptr_array_new();
-
- while ( (len = camel_stream_buffer_gets((CamelStreamBuffer *)in, line, sizeof(line))) > 0) {
- /* ignore blank lines */
- if (len <= 1)
- continue;
- /* check for invalidly long lines, we abort evreything and fallback */
- if (line[len-1] != '\n') {
- int i;
-
- for (i=0;i<folders->len;i++)
- camel_folder_info_free(folders->pdata[i]);
- g_ptr_array_set_size(folders, 0);
- break;
- }
- line[len-1] = 0;
-
- /* check for \r ? */
-
- if (top && top[0]) {
- int toplen = strlen(top);
-
- /* check is subdir */
- if (strncmp(top, line, len) != 0)
- continue;
-
- /* check is not sub-subdir if not recursive */
- if (( ((CamelMhStore *)store)->flags & CAMEL_STORE_FOLDER_INFO_RECURSIVE) == 0
- && (tmp = strrchr(line, '/'))
- && tmp > line+toplen)
- continue;
- }
-
- if (g_hash_table_lookup(visited, line) != NULL)
- continue;
-
- tmp = g_strdup(line);
- g_hash_table_insert(visited, tmp, tmp);
-
- path = g_strdup_printf("%s/%s", root, line);
- if (stat(path, &st) == 0 && S_ISDIR(st.st_mode)) {
- fi = folder_info_new(store, root, line);
- g_ptr_array_add(folders, fi);
- }
- g_free(path);
- }
-
- if (folders->len)
- *fip = camel_folder_info_build(folders, NULL, '/', TRUE);
- g_ptr_array_free(folders, TRUE);
-
- g_hash_table_foreach(visited, (GHFunc)g_free, NULL);
- g_hash_table_destroy(visited);
-
- camel_object_unref(in);
-}
-
-/* FIXME: move to camel-local, this is shared with maildir code */
-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;
- char *root;
-
- root = ((CamelService *)store)->url->path;
-
- /* use .folders if we are supposed to */
- if (((CamelMhStore *)store)->flags & CAMEL_MH_DOTFOLDERS) {
- folders_scan(store, root, top, &fi);
- } else {
- GHashTable *visited = g_hash_table_new(inode_hash, inode_equal);
-
- if (top == NULL)
- top = "";
-
- recursive_scan(store, &fi, NULL, visited, root, top);
-
- /* if we actually scanned from root, we have a "" root node we dont want */
- if (fi != NULL && top[0] == 0) {
- CamelFolderInfo *rfi;
-
- rfi = fi;
- fi = rfi->child;
- rfi->child = NULL;
- camel_folder_info_free(rfi);
- }
-
- g_hash_table_foreach(visited, inode_free, NULL);
- g_hash_table_destroy(visited);
- }
-
- return fi;
-}
diff --git a/camel/providers/local/camel-mh-store.h b/camel/providers/local/camel-mh-store.h
deleted file mode 100644
index 96522cb01f..0000000000
--- a/camel/providers/local/camel-mh-store.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: Michael Zucchi <notzed@ximian.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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))
-
-enum {
- CAMEL_MH_DOTFOLDERS = (1<<0), /* update/use .folders file */
-};
-
-typedef struct {
- CamelLocalStore parent_object;
-
- guint32 flags;
-} 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 5dd26ac9ba..0000000000
--- a/camel/providers/local/camel-mh-summary.c
+++ /dev/null
@@ -1,420 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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/stat.h>
-#include <fcntl.h>
-
-#include <sys/uio.h>
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include <dirent.h>
-
-#include <ctype.h>
-
-#include "camel-mh-summary.h"
-#include <camel/camel-mime-message.h>
-
-#include "camel-private.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, CamelIndex *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;
- char *uidstr;
-
- /* if we are working to add an existing file, then use current_uid */
- if (mhs->priv->current_uid) {
- uidstr = g_strdup(mhs->priv->current_uid);
- /* tell the summary of this, so we always append numbers to the end */
- camel_folder_summary_set_uid(s, strtoul(uidstr, NULL, 10)+1);
- } else {
- /* 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);
-
- uidstr = g_strdup_printf("%u", uid);
- }
-
- return uidstr;
-}
-
-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 || !camel_index_has_name(cls->index, 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)
- camel_index_delete_name(cls->index, camel_message_info_uid(info));
- camel_folder_summary_remove((CamelFolderSummary *)cls, info);
- camel_folder_summary_info_free((CamelFolderSummary *)cls, info);
-}
-
-static int
-sort_uid_cmp(const void *ap, const void *bp)
-{
- const CamelMessageInfo
- *a = *((CamelMessageInfo **)ap),
- *b = *((CamelMessageInfo **)bp);
- const char
- *auid = camel_message_info_uid(a),
- *buid = camel_message_info_uid(b);
- int aval = atoi(auid), bval = atoi(buid);
-
- return (aval < bval) ? -1 : (aval > bval) ? 1 : 0;
-}
-
-static int
-mh_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changeinfo, CamelException *ex)
-{
- DIR *dir;
- struct dirent *d;
- char *p, c;
- CamelMessageInfo *info;
- CamelFolderSummary *s = (CamelFolderSummary *)cls;
- 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, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot open MH directory path: %s: %s"),
- cls->folder_path, g_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 && (!camel_index_has_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);
-
- /* sort the summary based on message number (uid), since the directory order is not useful */
- CAMEL_SUMMARY_LOCK(s, summary_lock);
- qsort(s->messages->pdata, s->messages->len, sizeof(CamelMessageInfo *), sort_uid_cmp);
- CAMEL_SUMMARY_UNLOCK(s, summary_lock);
-
- 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) != CAMEL_MIME_PARSER_STATE_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, NULL, NULL);
- 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)
- camel_index_delete_name(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 ((CamelLocalSummaryClass *)parent_class)->sync(cls, expunge, changes, ex);
-}
diff --git a/camel/providers/local/camel-mh-summary.h b/camel/providers/local/camel-mh-summary.h
deleted file mode 100644
index 4ee30df63b..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_SUMMARY_H
-#define _CAMEL_MH_SUMMARY_H
-
-#include "camel-local-summary.h"
-#include <camel/camel-folder.h>
-#include <camel/camel-exception.h>
-#include <camel/camel-index.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, CamelIndex *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 4c4a49fbf9..0000000000
--- a/camel/providers/local/camel-spool-folder.c
+++ /dev/null
@@ -1,186 +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-2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 "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 CamelLocalSummary *spool_create_summary(const char *path, const char *folder, CamelIndex *index);
-
-static int spool_lock(CamelLocalFolder *lf, CamelLockType type, CamelException *ex);
-static void spool_unlock(CamelLocalFolder *lf);
-
-static void spool_finalize(CamelObject * object);
-
-static void
-camel_spool_folder_class_init(CamelSpoolFolderClass *klass)
-{
- CamelLocalFolderClass *lklass = (CamelLocalFolderClass *)klass;
-
- parent_class = (CamelFolderClass *)camel_mbox_folder_get_type();
-
- /* virtual method overload */
- lklass->create_summary = spool_create_summary;
- lklass->lock = spool_lock;
- lklass->unlock = spool_unlock;
-}
-
-static void
-spool_init(gpointer object, gpointer klass)
-{
- CamelSpoolFolder *spool_folder = object;
-
- spool_folder->lockid = -1;
-}
-
-static void
-spool_finalize(CamelObject * object)
-{
- /*CamelSpoolFolder *spool_folder = CAMEL_SPOOL_FOLDER(object);*/
-}
-
-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_mbox_folder_get_type(), "CamelSpoolFolder",
- sizeof(CamelSpoolFolder),
- sizeof(CamelSpoolFolderClass),
- (CamelObjectClassInitFunc) camel_spool_folder_class_init,
- NULL,
- (CamelObjectInitFunc) spool_init,
- (CamelObjectFinalizeFunc) spool_finalize);
- }
-
- return camel_spool_folder_type;
-}
-
-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->folder_flags |= CAMEL_FOLDER_FILTER_RECENT;
- flags &= CAMEL_STORE_FOLDER_BODY_INDEX;
-
- folder = (CamelFolder *)camel_local_folder_construct((CamelLocalFolder *)folder, parent_store, full_name, flags, ex);
- if (folder) {
- if (camel_url_get_param(((CamelService *)parent_store)->url, "xstatus"))
- camel_mbox_summary_xstatus((CamelMboxSummary *)folder->summary, TRUE);
- }
-
- return folder;
-}
-
-static CamelLocalSummary *
-spool_create_summary(const char *path, const char *folder, CamelIndex *index)
-{
- return (CamelLocalSummary *)camel_spool_summary_new(folder);
-}
-
-static int
-spool_lock(CamelLocalFolder *lf, CamelLockType type, CamelException *ex)
-{
- int retry = 0;
- CamelMboxFolder *mf = (CamelMboxFolder *)lf;
- CamelSpoolFolder *sf = (CamelSpoolFolder *)lf;
-
- mf->lockfd = open(lf->folder_path, O_RDWR, 0);
- if (mf->lockfd == -1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot create folder lock on %s: %s"),
- lf->folder_path, g_strerror (errno));
- return -1;
- }
-
- while (retry < CAMEL_LOCK_RETRY) {
- if (retry > 0)
- sleep(CAMEL_LOCK_DELAY);
-
- camel_exception_clear(ex);
-
- if (camel_lock_fcntl(mf->lockfd, type, ex) == 0) {
- if (camel_lock_flock(mf->lockfd, type, ex) == 0) {
- if ((sf->lockid = camel_lock_helper_lock(lf->folder_path, ex)) != -1)
- return 0;
- camel_unlock_flock(mf->lockfd);
- }
- camel_unlock_fcntl(mf->lockfd);
- }
- retry++;
- }
-
- return -1;
-}
-
-static void
-spool_unlock(CamelLocalFolder *lf)
-{
- CamelMboxFolder *mf = (CamelMboxFolder *)lf;
- CamelSpoolFolder *sf = (CamelSpoolFolder *)lf;
-
- camel_lock_helper_unlock(sf->lockid);
- sf->lockid = -1;
- camel_unlock_flock(mf->lockfd);
- camel_unlock_fcntl(mf->lockfd);
-
- close(mf->lockfd);
- mf->lockfd = -1;
-}
diff --git a/camel/providers/local/camel-spool-folder.h b/camel/providers/local/camel-spool-folder.h
deleted file mode 100644
index e778cdecf7..0000000000
--- a/camel/providers/local/camel-spool-folder.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) 2001 Ximian Inc (www.ximian.com/)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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-mbox-folder.h"
-#include <camel/camel-folder-search.h>
-#include <camel/camel-index.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 {
- CamelMboxFolder parent;
-
- struct _CamelSpoolFolderPrivate *priv;
-
- int lockid; /* lock id for dot locking */
-} CamelSpoolFolder;
-
-typedef struct {
- CamelMboxFolderClass parent_class;
-} CamelSpoolFolderClass;
-
-/* 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);
-
-#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 09720e4a01..0000000000
--- a/camel/providers/local/camel-spool-store.c
+++ /dev/null
@@ -1,483 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 HAVE_ALLOCA_H
-#include <alloca.h>
-#endif
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <dirent.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_mbox_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_mbox_store_get_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) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- _("Spool `%s' cannot be opened: %s"),
- service->url->path, g_strerror (errno));
- return;
- }
-
- if (S_ISREG(st.st_mode))
- ((CamelSpoolStore *)service)->type = CAMEL_SPOOL_STORE_MBOX;
- else if (S_ISDIR(st.st_mode))
- /* we could check here for slight variations */
- ((CamelSpoolStore *)service)->type = CAMEL_SPOOL_STORE_ELM;
- else {
- camel_exception_setv(ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- _("Spool `%s' is not a regular file or directory"),
- service->url->path);
- return;
- }
-}
-
-static CamelFolder *
-get_folder(CamelStore * store, const char *folder_name, guint32 flags, CamelException * ex)
-{
- CamelFolder *folder = NULL;
- struct stat st;
- char *name;
-
- d(printf("opening folder %s on path %s\n", folder_name, path));
-
- /* we only support an 'INBOX' in mbox mode */
- if (((CamelSpoolStore *)store)->type == CAMEL_SPOOL_STORE_MBOX) {
- if (strcmp(folder_name, "INBOX") != 0) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- _("Folder `%s/%s' does not exist."),
- ((CamelService *)store)->url->path, folder_name);
- } else {
- folder = camel_spool_folder_new(store, folder_name, flags, ex);
- }
- } else {
- 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));
- } 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 (creat (name, 0600) == -1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not create folder `%s':\n%s"),
- folder_name, g_strerror (errno));
- } else {
- folder = camel_spool_folder_new(store, folder_name, flags, ex);
- }
- }
- } else if (!S_ISREG(st.st_mode)) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- _("`%s' is not a mailbox file."), name);
- } else {
- folder = camel_spool_folder_new(store, folder_name, flags, ex);
- }
- g_free(name);
- }
-
- return folder;
-}
-
-static CamelFolder *
-get_inbox(CamelStore *store, CamelException *ex)
-{
- if (((CamelSpoolStore *)store)->type == CAMEL_SPOOL_STORE_MBOX)
- return get_folder (store, "INBOX", CAMEL_STORE_FOLDER_CREATE, ex);
- else {
- camel_exception_setv(ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- _("Store does not support an INBOX"));
- return NULL;
- }
-}
-
-static char *
-get_name (CamelService *service, gboolean brief)
-{
- if (brief)
- return g_strdup(service->url->path);
- else
- return g_strdup_printf(((CamelSpoolStore *)service)->type == CAMEL_SPOOL_STORE_MBOX?
- _("Spool mail file %s"):_("Spool folder tree %s"), service->url->path);
-}
-
-/* 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"));
-}
-
-static void free_folder_info (CamelStore *store, CamelFolderInfo *fi)
-{
- if (fi) {
- g_free(fi->url);
- g_free(fi->name);
- g_free(fi->full_name);
- g_free(fi->path);
- g_free(fi);
- }
-}
-
-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 spoold info: '%s' '%s' '%s' '%s'\n", fi->path, fi->name, fi->full_name, fi->url));
-
- 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, *fname;
- CamelFolderInfo *fi = NULL;
- struct stat st;
- CamelFolder *folder;
- int unread;
- char from[80];
- FILE *fp;
-
- d(printf("checking dir '%s' part '%s' for mbox content\n", root, path));
-
- /* look for folders matching the right structure, recursively */
- if (path) {
- name = alloca(strlen(root) + strlen(path) + 2);
- sprintf(name, "%s/%s", root, path);
- } else
- name = root;
-
- if (stat(name, &st) == -1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not scan folder `%s': %s"),
- name, g_strerror (errno));
- } else if (S_ISREG(st.st_mode)) {
- /* incase we start scanning from a file. messy duplication :-/ */
- if (path) {
- folder = camel_object_bag_get(store->folders, path);
- if (folder) {
- /* should this refresh if ! FAST? */
- unread = camel_folder_get_unread_message_count(folder);
- camel_object_unref(folder);
- } else
- unread = -1;
- tmp = strrchr(path, '/');
- if (tmp)
- tmp++;
- else
- tmp = (char *)path;
- uri = g_strdup_printf("%s:%s#%s", ((CamelService *)store)->url->protocol, root, path);
- fi = camel_folder_info_new(uri, path, tmp, unread);
- fi->parent = parent;
- fi->sibling = *fip;
- *fip = fi;
- g_free(uri);
- }
- return 0;
- }
-
- dir = opendir(name);
- if (dir == NULL) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not scan folder `%s': %s"),
- name, g_strerror (errno));
- return -1;
- }
-
- if (path != NULL) {
- uri = g_strdup_printf("%s:%s;noselect=yes#%s", ((CamelService *)store)->url->protocol, root, path);
- tmp = strrchr(path, '/');
- if (tmp == NULL)
- tmp = (char *)path;
- else
- tmp++;
- fi = camel_folder_info_new(uri, path, tmp, -1);
- fi->parent = parent;
- fi->sibling = *fip;
- *fip = fi;
- g_free(uri);
-
- fip = &fi->child;
- parent = fi;
- }
-
- while ( (d = readdir(dir)) ) {
- if (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) {
- if (path)
- fname = g_strdup_printf("%s/%s", path, d->d_name);
- else
- fname = g_strdup(d->d_name);
-
- if (S_ISREG(st.st_mode)) {
- /* first, see if we already have it open */
- folder = camel_object_bag_get(store->folders, fname);
- if (folder) {
- /* should this refresh if ! FAST? */
- unread = camel_folder_get_unread_message_count(folder);
- camel_object_unref(folder);
- } else
- unread = -1;
-
- /* no? check its content to see if its a folder or not */
- if (folder == NULL) {
- fp = fopen(tmp, "r");
- if (fp != NULL) {
- if (st.st_size == 0
- || (fgets(from, sizeof(from), fp) != NULL
- && strncmp(from, "From ", 5) == 0)) {
- folder = (CamelFolder *)1;
- /* TODO: if slow mode selected, we could look up unread counts here -
- but its pretty expensive */
- }
- fclose(fp);
- }
- }
-
- if (folder != NULL) {
- uri = g_strdup_printf("%s:%s#%s", ((CamelService *)store)->url->protocol, root, fname);
- fi = camel_folder_info_new(uri, fname, d->d_name, unread);
- fi->parent = parent;
- fi->sibling = *fip;
- *fip = fi;
- g_free(uri);
- }
-
- } else if (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);
-
- if (scan_dir(store, visited, root, fname, flags, parent, fip, ex) == -1) {
- g_free(tmp);
- g_free(fname);
- closedir(dir);
- return -1;
- }
- }
- }
- g_free(fname);
-
- }
- g_free(tmp);
- }
- closedir(dir);
-
- 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_elm(CamelStore *store, const char *top, guint32 flags, CamelException *ex)
-{
- CamelFolderInfo *fi = NULL;
- GHashTable *visited;
-
- visited = g_hash_table_new(inode_hash, inode_equal);
-
- if (scan_dir(store, visited, ((CamelService *)store)->url->path, 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;
-}
-
-static CamelFolderInfo *
-get_folder_info_mbox(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) {
- fi = g_malloc0(sizeof(*fi));
- fi->full_name = g_strdup("INBOX");
- fi->name = g_strdup("INBOX");
- fi->url = g_strdup_printf("%s:%s#%s", service->url->protocol, service->url->path, fi->name);
-
- folder = camel_object_bag_get(store->folders, fi->full_name);
- if (folder) {
- fi->unread_message_count = camel_folder_get_unread_message_count(folder);
- camel_object_unref(folder);
- } else
- fi->unread_message_count = -1;
-
- camel_folder_info_build_path(fi, '/');
- }
-
- return fi;
-}
-
-static CamelFolderInfo *
-get_folder_info(CamelStore *store, const char *top, guint32 flags, CamelException *ex)
-{
- if (((CamelSpoolStore *)store)->type == CAMEL_SPOOL_STORE_MBOX)
- return get_folder_info_mbox(store, top, flags, ex);
- else
- return get_folder_info_elm(store, top, flags, ex);
-}
diff --git a/camel/providers/local/camel-spool-store.h b/camel/providers/local/camel-spool-store.h
deleted file mode 100644
index 1e1753481b..0000000000
--- a/camel/providers/local/camel-spool-store.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 (C) 2001 Ximian Inc (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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-mbox-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 enum _camel_spool_store_t {
- CAMEL_SPOOL_STORE_MBOX, /* a single mbox */
- CAMEL_SPOOL_STORE_ELM, /* elm/pine/etc tree of mbox files in folders */
-} camel_spool_store_t;
-
-typedef struct {
- CamelMboxStore parent_object;
-
- camel_spool_store_t type;
-} CamelSpoolStore;
-
-
-
-typedef struct {
- CamelMboxStoreClass parent_class;
-
-} CamelSpoolStoreClass;
-
-
-/* public methods */
-
-/* Standard Camel function */
-CamelType camel_spool_store_get_type (void);
-
-#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 7991a881cc..0000000000
--- a/camel/providers/local/camel-spool-summary.c
+++ /dev/null
@@ -1,344 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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/stat.h>
-#include <fcntl.h>
-#include <sys/uio.h>
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include <ctype.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)
-
-static int spool_summary_load(CamelLocalSummary *cls, int forceindex, CamelException *ex);
-static int spool_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changeinfo, CamelException *ex);
-
-static int spool_summary_sync_full(CamelMboxSummary *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_mbox_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)
-{
- CamelLocalSummaryClass *lklass = (CamelLocalSummaryClass *)klass;
- CamelMboxSummaryClass *mklass = (CamelMboxSummaryClass *)klass;
-
- camel_spool_summary_parent = CAMEL_FOLDER_SUMMARY_CLASS(camel_mbox_summary_get_type());
-
- lklass->load = spool_summary_load;
- lklass->check = spool_summary_check;
-
- mklass->sync_full = spool_summary_sync_full;
-}
-
-static void
-camel_spool_summary_init(CamelSpoolSummary *obj)
-{
- struct _CamelFolderSummary *s = (CamelFolderSummary *)obj;
-
- /* message info size is from mbox parent */
-
- /* 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);*/
-}
-
-CamelSpoolSummary *
-camel_spool_summary_new(const char *mbox_name)
-{
- CamelSpoolSummary *new = (CamelSpoolSummary *)camel_object_new(camel_spool_summary_get_type());
-
- camel_local_summary_construct((CamelLocalSummary *)new, NULL, mbox_name, NULL);
- return new;
-}
-
-static int
-spool_summary_load(CamelLocalSummary *cls, int forceindex, CamelException *ex)
-{
- g_warning("spool summary - not loading anything\n");
- return 0;
-}
-
-/* perform a full sync */
-static int
-spool_summary_sync_full(CamelMboxSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, CamelException *ex)
-{
- int fd = -1, fdout = -1;
- char *tmpname = NULL;
- char *buffer, *p;
- off_t spoollen, outlen;
- int size, sizeout;
- struct stat st;
- guint32 flags = (expunge?1:0);
-
- d(printf("performing full summary/sync\n"));
-
- camel_operation_start(NULL, _("Storing folder"));
-
- fd = open(((CamelLocalSummary *)cls)->folder_path, O_RDWR);
- if (fd == -1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not open file: %s: %s"),
- ((CamelLocalSummary *)cls)->folder_path,
- g_strerror (errno));
- camel_operation_end(NULL);
- return -1;
- }
-
-#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"),
- g_strerror (errno));
- goto error;
- }
-
- if (camel_mbox_summary_sync_mbox((CamelMboxSummary *)cls, flags, changeinfo, fd, fdout, ex) == -1)
- goto error;
-
-
- /* 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"),
- ((CamelLocalSummary *)cls)->folder_path,
- g_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"),
- ((CamelLocalSummary *)cls)->folder_path,
- g_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"),
- ((CamelLocalSummary *)cls)->folder_path,
- g_strerror (errno));
- goto error;
- }
- outlen = st.st_size;
-
- /* I think this is the right way to do this - checking that the file will fit the new data */
- 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"),
- ((CamelLocalSummary *)cls)->folder_path,
- g_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'"),
- ((CamelLocalSummary *)cls)->folder_path,
- g_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'"),
- ((CamelLocalSummary *)cls)->folder_path,
- g_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'"),
- ((CamelLocalSummary *)cls)->folder_path,
- g_strerror (errno), tmpnam);
- close(fdout);
- tmpname = NULL;
- fdout = -1;
- fd = -1;
- goto error;
- }
-
- close(fdout);
- unlink(tmpname);
-
- camel_operation_end(NULL);
-
- return 0;
- error:
- if (fd != -1)
- close(fd);
-
- if (fdout != -1)
- close(fdout);
-
- if (tmpname)
- unlink(tmpname);
-
- camel_operation_end(NULL);
-
- return -1;
-}
-
-static int
-spool_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changeinfo, CamelException *ex)
-{
- int i, work, count;
- struct stat st;
- CamelFolderSummary *s = (CamelFolderSummary *)cls;
-
- if (((CamelLocalSummaryClass *)camel_spool_summary_parent)->check(cls, changeinfo, ex) == -1)
- return -1;
-
- /* 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"));
- if (((CamelMboxSummaryClass *)((CamelObject *)cls)->klass)->sync_full((CamelMboxSummary *)cls, FALSE, changeinfo, ex) == -1)
- return -1;
-
- if (stat(cls->folder_path, &st) == -1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Unknown error: %s"),
- g_strerror (errno));
- return -1;
- }
-
- ((CamelMboxSummary *)cls)->folder_size = st.st_size;
- ((CamelFolderSummary *)cls)->time = st.st_mtime;
- }
-
- 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 b72aeda527..0000000000
--- a/camel/providers/local/camel-spool-summary.h
+++ /dev/null
@@ -1,69 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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 <camel/camel-index.h>
-#include "camel-mbox-summary.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;
-
-struct _CamelSpoolSummary {
- CamelMboxSummary parent;
-
-};
-
-struct _CamelSpoolSummaryClass {
- CamelMboxSummaryClass parent_class;
-};
-
-CamelType camel_spool_summary_get_type (void);
-void camel_spool_summary_construct (CamelSpoolSummary *new, const char *filename, const char *spool_name, CamelIndex *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 _camel_header_raw *header, char *xevline);
-
-#endif /* ! _CAMEL_SPOOL_SUMMARY_H */
-
diff --git a/camel/providers/local/libcamellocal.urls b/camel/providers/local/libcamellocal.urls
deleted file mode 100644
index e2279ed72a..0000000000
--- a/camel/providers/local/libcamellocal.urls
+++ /dev/null
@@ -1,5 +0,0 @@
-mh
-mbox
-maildir
-spool
-spoold
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 464624b82d..0000000000
--- a/camel/providers/nntp/Makefile.am
+++ /dev/null
@@ -1,36 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-libcamelnntpincludedir = $(privincludedir)/camel
-
-camel_provider_LTLIBRARIES = libcamelnntp.la
-camel_provider_DATA = libcamelnntp.urls
-
-INCLUDES = -I../.. \
- -I$(top_srcdir)/camel \
- -I$(top_srcdir)/intl \
- -I$(top_srcdir)/e-util \
- -I$(top_srcdir) \
- $(CAMEL_CFLAGS) \
- $(GNOME_INCLUDEDIR) \
- $(GTK_INCLUDEDIR) \
- -DG_LOG_DOMAIN=\"camel-nntp-provider\"
-
-libcamelnntp_la_SOURCES = \
- camel-nntp-provider.c \
- camel-nntp-store.c \
- camel-nntp-folder.c \
- camel-nntp-stream.c \
- camel-nntp-summary.c
-
-libcamelnntpinclude_HEADERS = \
- camel-nntp-store.h \
- camel-nntp-folder.h \
- camel-nntp-stream.h \
- camel-nntp-summary.h
-
-noinst_HEADERS = \
- camel-nntp-private.h
-
-libcamelnntp_la_LDFLAGS = -avoid-version -module
-
-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 f8d3a62e27..0000000000
--- a/camel/providers/nntp/camel-nntp-auth.c
+++ /dev/null
@@ -1,92 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 fc96cf6a4e..0000000000
--- a/camel/providers/nntp/camel-nntp-auth.h
+++ /dev/null
@@ -1,42 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 9f0832bc33..0000000000
--- a/camel/providers/nntp/camel-nntp-folder.c
+++ /dev/null
@@ -1,405 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-nntp-folder.c : Class for a news folder
- *
- * Authors : Chris Toshok <toshok@ximian.com>
- * Michael Zucchi <notzed@ximian.com>
- *
- * Copyright (C) 2001-2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <dirent.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-
-#include "camel/camel-file-utils.h"
-#include "camel/camel-stream-mem.h"
-#include "camel/camel-data-wrapper.h"
-#include "camel/camel-mime-message.h"
-#include "camel/camel-folder-search.h"
-#include "camel/camel-exception.h"
-#include "camel/camel-session.h"
-#include "camel/camel-data-cache.h"
-
-#include "camel-nntp-summary.h"
-#include "camel-nntp-store.h"
-#include "camel-nntp-folder.h"
-#include "camel-nntp-store.h"
-#include "camel-nntp-private.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 *nntp_store;
- CamelFolderChangeInfo *changes = NULL;
- CamelNNTPFolder *nntp_folder;
-
- nntp_store = (CamelNNTPStore *)folder->parent_store;
- nntp_folder = (CamelNNTPFolder *)folder;
-
- CAMEL_NNTP_STORE_LOCK(nntp_store, command_lock);
-
- if (camel_nntp_summary_check((CamelNNTPSummary *)folder->summary, nntp_folder->changes, ex) != -1)
- camel_folder_summary_save (folder->summary);
-
- if (camel_folder_change_info_changed(nntp_folder->changes)) {
- changes = nntp_folder->changes;
- nntp_folder->changes = camel_folder_change_info_new();
- }
-
- CAMEL_NNTP_STORE_UNLOCK(nntp_store, command_lock);
-
- if (changes) {
- camel_object_trigger_event((CamelObject *)folder, "folder_changed", changes);
- camel_folder_change_info_free(changes);
- }
-}
-
-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);
-}
-
-static CamelMimeMessage *
-nntp_folder_get_message (CamelFolder *folder, const char *uid, CamelException *ex)
-{
- CamelMimeMessage *message = NULL;
- CamelNNTPStore *nntp_store;
- CamelFolderChangeInfo *changes;
- CamelNNTPFolder *nntp_folder;
- CamelStream *stream = NULL;
- int ret;
- char *line;
- const char *msgid;
-
- nntp_store = (CamelNNTPStore *)folder->parent_store;
- nntp_folder = (CamelNNTPFolder *)folder;
-
- CAMEL_NNTP_STORE_LOCK(nntp_store, command_lock);
-
- msgid = strchr(uid, ',');
- if (msgid == 0) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Internal error: uid in invalid format: %s"), uid);
- goto fail;
- }
- msgid++;
-
- /* Lookup in cache, NEWS is global messageid's so use a global cache path */
- stream = camel_data_cache_get(nntp_store->cache, "cache", msgid, NULL);
- if (stream == NULL) {
- /* Not in cache, retrieve and put in cache */
- if (camel_nntp_store_set_folder(nntp_store, folder, nntp_folder->changes, ex) == -1)
- goto fail;
-
- ret = camel_nntp_command(nntp_store, &line, "article %s", msgid);
- if (ret == -1)
- goto error;
-
- if (ret == 220) {
- stream = camel_data_cache_add(nntp_store->cache, "cache", msgid, NULL);
- if (stream) {
- if (camel_stream_write_to_stream((CamelStream *)nntp_store->stream, stream) == -1)
- goto error;
- if (camel_stream_reset(stream) == -1)
- goto error;
- } else {
- stream = (CamelStream *)nntp_store->stream;
- camel_object_ref((CamelObject *)stream);
- }
- }
- }
-
- if (stream) {
- message = camel_mime_message_new();
- if (camel_data_wrapper_construct_from_stream((CamelDataWrapper *)message, stream) == -1)
- goto error;
-
- CAMEL_NNTP_STORE_UNLOCK(nntp_store, command_lock);
-
- camel_object_unref((CamelObject *)stream);
- return message;
- }
-
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, _("Cannot get message %s: %s"), uid, line);
-
-error:
- if (errno == EINTR)
- camel_exception_setv(ex, CAMEL_EXCEPTION_USER_CANCEL, _("User cancelled"));
- else
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, _("Cannot get message %s: %s"), uid, strerror(errno));
-
-fail:
- if (message)
- camel_object_unref((CamelObject *)message);
-
- if (stream)
- camel_object_unref((CamelObject *)stream);
-
- if (camel_folder_change_info_changed(nntp_folder->changes)) {
- changes = nntp_folder->changes;
- nntp_folder->changes = camel_folder_change_info_new();
- } else {
- changes = NULL;
- }
-
- CAMEL_NNTP_STORE_UNLOCK(nntp_store, command_lock);
-
- if (changes) {
- camel_object_trigger_event((CamelObject *)folder, "folder_changed", changes);
- camel_folder_change_info_free(changes);
- }
-
- return NULL;
-}
-
-static GPtrArray*
-nntp_folder_search_by_expression (CamelFolder *folder, const char *expression, CamelException *ex)
-{
- CamelNNTPFolder *nntp_folder = CAMEL_NNTP_FOLDER (folder);
- GPtrArray *matches, *summary;
-
- CAMEL_NNTP_FOLDER_LOCK(nntp_folder, search_lock);
-
- 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_NNTP_FOLDER_UNLOCK(nntp_folder, search_lock);
-
- camel_folder_free_summary(folder, summary);
-
- return matches;
-}
-
-static GPtrArray *
-nntp_folder_search_by_uids(CamelFolder *folder, const char *expression, GPtrArray *uids, CamelException *ex)
-{
- CamelNNTPFolder *nntp_folder = CAMEL_NNTP_FOLDER(folder);
- GPtrArray *summary, *matches;
- int i;
-
- /* NOTE: could get away without the search lock by creating a new
- search object each time */
-
- summary = g_ptr_array_new();
- for (i=0;i<uids->len;i++) {
- CamelMessageInfo *info;
-
- info = camel_folder_get_message_info(folder, uids->pdata[i]);
- if (info)
- g_ptr_array_add(summary, info);
- }
-
- if (summary->len == 0)
- return summary;
-
- CAMEL_NNTP_FOLDER_LOCK(folder, search_lock);
-
- if (nntp_folder->search == NULL)
- nntp_folder->search = camel_folder_search_new();
-
- camel_folder_search_set_folder(nntp_folder->search, folder);
- camel_folder_search_set_summary(nntp_folder->search, summary);
-
- matches = camel_folder_search_execute_expression(nntp_folder->search, expression, ex);
-
- CAMEL_NNTP_FOLDER_UNLOCK(folder, search_lock);
-
- for (i=0;i<summary->len;i++)
- camel_folder_free_message_info(folder, summary->pdata[i]);
- g_ptr_array_free(summary, TRUE);
-
- 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_init(CamelNNTPFolder *nntp_folder, CamelNNTPFolderClass *klass)
-{
- struct _CamelNNTPFolderPrivate *p;
-
- nntp_folder->changes = camel_folder_change_info_new();
- p = nntp_folder->priv = g_malloc0(sizeof(*nntp_folder->priv));
- p->search_lock = g_mutex_new();
- p->cache_lock = g_mutex_new();
-}
-
-static void
-nntp_folder_finalise (CamelNNTPFolder *nntp_folder)
-{
- struct _CamelNNTPFolderPrivate *p;
-
- g_free(nntp_folder->storage_path);
-
- p = nntp_folder->priv;
- g_mutex_free(p->search_lock);
- g_mutex_free(p->cache_lock);
- g_free(p);
-}
-
-static void
-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_by_uids = nntp_folder_search_by_uids;
- 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) nntp_folder_class_init,
- NULL,
- (CamelObjectInitFunc) nntp_folder_init,
- (CamelObjectFinalizeFunc) nntp_folder_finalise);
- }
-
- return camel_nntp_folder_type;
-}
-
-
-/* not yet */
-/* Idea is we update in stages, but this requires a different xover command, etc */
-#ifdef ASYNC_SUMMARY
-struct _folder_check_msg {
- CamelSessionThreadMsg msg;
- CamelNNTPFolder *folder;
-};
-
-static void
-folder_check(CamelSession *session, CamelSessionThreadMsg *msg)
-{
- struct _folder_check_msg *m = (struct _folder_check_msg *)msg;
- CamelException *ex;
- CamelNNTPStore *nntp_store;
-
- nntp_store = (CamelNNTPStore *)m->folder->parent.parent_store;
-
- CAMEL_NNTP_STORE_LOCK(nntp_store, command_lock);
-
- ex = camel_exception_new();
- camel_nntp_summary_check((CamelNNTPSummary *)m->folder->parent.summary, m->folder->changes, ex);
- camel_exception_free(ex);
-
- CAMEL_NNTP_STORE_UNLOCK(nntp_store, command_lock);
-}
-
-static void
-folder_check_free(CamelSession *session, CamelSessionThreadMsg *msg)
-{
- struct _folder_check_msg *m = (struct _folder_check_msg *)msg;
-
- camel_object_unref((CamelObject *)m->folder);
-}
-
-static CamelSessionThreadOps folder_check_ops = {
- folder_check,
- folder_check_free,
-};
-#endif
-
-CamelFolder *
-camel_nntp_folder_new (CamelStore *parent, const char *folder_name, CamelException *ex)
-{
- CamelFolder *folder;
- CamelNNTPFolder *nntp_folder;
- char *root;
- CamelService *service;
-#ifdef ASYNC_SUMMARY
- struct _folder_check_msg *m;
-#endif
-
- service = (CamelService *)parent;
- root = camel_session_get_storage_path(service->session, service, ex);
- if (root == NULL)
- return NULL;
-
- /* If this doesn't work, stuff wont save, but let it continue anyway */
- camel_mkdir (root, 0777);
-
- folder = (CamelFolder *) camel_object_new (CAMEL_NNTP_FOLDER_TYPE);
- nntp_folder = (CamelNNTPFolder *)folder;
-
- camel_folder_construct (folder, parent, folder_name, folder_name);
- folder->folder_flags |= CAMEL_FOLDER_HAS_SUMMARY_CAPABILITY|CAMEL_FOLDER_HAS_SEARCH_CAPABILITY;
-
- nntp_folder->storage_path = g_strdup_printf("%s/%s", root, folder->full_name);
- g_free(root);
-
- folder->summary = (CamelFolderSummary *)camel_nntp_summary_new(nntp_folder);
- camel_folder_summary_load (folder->summary);
-#ifdef ASYNC_SUMMARY
- m = camel_session_thread_msg_new(service->session, &folder_check_ops, sizeof(*m));
- m->folder = nntp_folder;
- camel_object_ref((CamelObject *)folder);
- camel_session_thread_queue(service->session, &m->msg, 0);
-#else
- if (camel_nntp_summary_check((CamelNNTPSummary *)folder->summary, nntp_folder->changes, ex) == -1) {
- camel_object_unref((CamelObject *)folder);
- folder = NULL;
- }
-#endif
-
- 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 300d61762d..0000000000
--- a/camel/providers/nntp/camel-nntp-folder.h
+++ /dev/null
@@ -1,72 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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/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 _CamelNNTPFolder {
- CamelFolder parent;
-
- struct _CamelNNTPFolderPrivate *priv;
-
- struct _CamelFolderChangeInfo *changes;
- char *storage_path;
- CamelFolderSearch *search;
-} CamelNNTPFolder;
-
-typedef struct _CamelNNTPFolderClass {
- CamelFolderClass parent;
-
- /* 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 7f3850f9c1..0000000000
--- a/camel/providers/nntp/camel-nntp-grouplist.c
+++ /dev/null
@@ -1,219 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 edd1e64cb9..0000000000
--- a/camel/providers/nntp/camel-nntp-grouplist.h
+++ /dev/null
@@ -1,48 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 309e1f45c8..0000000000
--- a/camel/providers/nntp/camel-nntp-newsrc.c
+++ /dev/null
@@ -1,651 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Chris Toshok <toshok@ximian.com>
- *
- * Copyright 2000-2003 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 <glib.h>
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <pthread.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-
-#include "camel-nntp-newsrc.h"
-#include <camel/camel-folder-summary.h>
-
-#define NEWSRC_LOCK(f, l) (g_mutex_lock(((CamelNNTPNewsrc *)f)->l))
-#define NEWSRC_UNLOCK(f, l) (g_mutex_unlock(((CamelNNTPNewsrc *)f)->l))
-
-typedef struct {
- guint low;
- guint high;
-} ArticleRange;
-
-typedef struct {
- char *name;
- GArray *ranges;
- gboolean subscribed;
-} NewsrcGroup;
-
-struct CamelNNTPNewsrc {
- gchar *filename;
- GHashTable *groups;
- gboolean dirty;
- GMutex *lock;
-};
-
-
-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);
-
- if (group)
- ret = camel_nntp_newsrc_group_get_highest_article_read (newsrc, group);
- else
- ret = 0;
-
- 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);
-
- if (group)
- ret = camel_nntp_newsrc_group_get_num_articles_read (newsrc, group);
- else
- ret = 0;
-
- 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);
-
- if (group)
- 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);
-
- if (group) {
- 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);
- newsrc->lock = g_mutex_new();
-
- 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-private.h b/camel/providers/nntp/camel-nntp-private.h
deleted file mode 100644
index f2cca4e187..0000000000
--- a/camel/providers/nntp/camel-nntp-private.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- * camel-nntp-private.h: Private info for nntp.
- *
- * 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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_PRIVATE_H
-#define CAMEL_NNTP_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 */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "e-util/e-msgport.h"
-
-struct _CamelNNTPStorePrivate {
- EMutex *command_lock; /* for locking the command stream for a complete operation */
-};
-
-#define CAMEL_NNTP_STORE_LOCK(f, l) (e_mutex_lock(((CamelNNTPStore *)f)->priv->l))
-#define CAMEL_NNTP_STORE_UNLOCK(f, l) (e_mutex_unlock(((CamelNNTPStore *)f)->priv->l))
-
-
-struct _CamelNNTPFolderPrivate {
- GMutex *search_lock; /* for locking the search object */
- GMutex *cache_lock; /* for locking the cache object */
-};
-
-#define CAMEL_NNTP_FOLDER_LOCK(f, l) (g_mutex_lock(((CamelNNTPFolder *)f)->priv->l))
-#define CAMEL_NNTP_FOLDER_UNLOCK(f, l) (g_mutex_unlock(((CamelNNTPFolder *)f)->priv->l))
-#else
-#define CAMEL_NNTP_FOLDER_LOCK(f, l)
-#define CAMEL_NNTP_FOLDER_UNLOCK(f, l)
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_NNTP_PRIVATE_H */
-
diff --git a/camel/providers/nntp/camel-nntp-provider.c b/camel/providers/nntp/camel-nntp-provider.c
deleted file mode 100644
index 8f54b3ee98..0000000000
--- a/camel/providers/nntp/camel-nntp-provider.c
+++ /dev/null
@@ -1,113 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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_SOURCE |
- 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.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 d9aace81ef..0000000000
--- a/camel/providers/nntp/camel-nntp-resp-codes.h
+++ /dev/null
@@ -1,55 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 531d4aefdf..0000000000
--- a/camel/providers/nntp/camel-nntp-store.c
+++ /dev/null
@@ -1,576 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- *
- * Copyright (C) 2001-2003 Ximian, Inc. <www.ximain.com>
- *
- * Authors: Christopher Toshok <toshok@ximian.com>
- * Michael Zucchi <notzed@ximian.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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/types.h>
-#include <unistd.h>
-#include <dirent.h>
-#include <errno.h>
-
-#include <camel/camel-url.h>
-#include <camel/camel-string-utils.h>
-#include <camel/camel-session.h>
-#include <camel/camel-tcp-stream-raw.h>
-#include <camel/camel-tcp-stream-ssl.h>
-
-#include "camel-nntp-summary.h"
-#include "camel-nntp-store.h"
-#include "camel-nntp-folder.h"
-#include "camel-nntp-private.h"
-
-#define w(x)
-extern int camel_verbose_debug;
-#define dd(x) (camel_verbose_debug?(x):0)
-
-#define NNTP_PORT 119
-#define NNTPS_PORT 563
-
-#define DUMP_EXTENSIONS
-
-/* define if you want the subscribe ui to show folders in tree form */
-/* #define INFO_AS_TREE */
-
-static CamelStoreClass *parent_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))
-
-
-enum {
- USE_SSL_NEVER,
- USE_SSL_ALWAYS,
- USE_SSL_WHEN_POSSIBLE
-};
-
-static gboolean
-connect_to_server (CamelService *service, int ssl_mode, CamelException *ex)
-{
- CamelNNTPStore *store = (CamelNNTPStore *) service;
- CamelStream *tcp_stream;
- gboolean retval = FALSE;
- unsigned char *buf;
- unsigned int len;
- struct hostent *h;
- int port, ret;
-
- CAMEL_NNTP_STORE_LOCK(store, command_lock);
-
- /* setup store-wide cache */
- if (store->cache == NULL) {
- char *root;
-
- root = camel_session_get_storage_path (service->session, service, ex);
- if (root == NULL)
- goto fail;
-
- store->cache = camel_data_cache_new (root, 0, ex);
- g_free (root);
- if (store->cache == NULL)
- goto fail;
-
- /* Default cache expiry - 2 weeks old, or not visited in 5 days */
- camel_data_cache_set_expire_age (store->cache, 60*60*24*14);
- camel_data_cache_set_expire_access (store->cache, 60*60*24*5);
- }
-
- h = camel_service_gethost (service, ex);
- if (!h)
- goto fail;
-
- port = service->url->port ? service->url->port : NNTP_PORT;
-
-#ifdef HAVE_SSL
- if (ssl_mode != USE_SSL_NEVER) {
- port = service->url->port ? service->url->port : NNTPS_PORT;
- tcp_stream = camel_tcp_stream_ssl_new (service->session, service->url->host, CAMEL_TCP_STREAM_SSL_ENABLE_SSL2 | CAMEL_TCP_STREAM_SSL_ENABLE_SSL3);
- } else {
- tcp_stream = camel_tcp_stream_raw_new ();
- }
-#else
- tcp_stream = camel_tcp_stream_raw_new ();
-#endif /* HAVE_SSL */
-
- 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, port, g_strerror (errno));
-
- camel_object_unref (CAMEL_OBJECT (tcp_stream));
-
- goto fail;
- }
-
- store->stream = (CamelNNTPStream *) camel_nntp_stream_new (tcp_stream);
- camel_object_unref (CAMEL_OBJECT (tcp_stream));
-
- /* Read the greeting, if any. */
- if (camel_nntp_stream_line (store->stream, &buf, &len) == -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 read greeting from %s: %s"),
- service->url->host, g_strerror (errno));
-
- camel_object_unref (CAMEL_OBJECT (store->stream));
- store->stream = NULL;
-
- goto fail;
- }
-
- len = strtoul (buf, (char **) &buf, 10);
- if (len != 200 && len != 201) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("NNTP server %s returned error code %d: %s"),
- service->url->host, len, buf);
-
- camel_object_unref (CAMEL_OBJECT (store->stream));
- store->stream = NULL;
-
- goto fail;
- }
-
- /* set 'reader' mode & ignore return code */
- camel_nntp_command (store, (char **) &buf, "mode reader");
- retval = TRUE;
-
- fail:
- CAMEL_NNTP_STORE_UNLOCK(store, command_lock);
-
- return retval;
-}
-
-static struct {
- char *value;
- int mode;
-} ssl_options[] = {
- { "", USE_SSL_ALWAYS },
- { "always", USE_SSL_ALWAYS },
- { "when-possible", USE_SSL_WHEN_POSSIBLE },
- { "never", USE_SSL_NEVER },
- { NULL, USE_SSL_NEVER },
-};
-
-static gboolean
-nntp_connect (CamelService *service, CamelException *ex)
-{
-#ifdef HAVE_SSL
- const char *use_ssl;
- int i, ssl_mode;
-
- use_ssl = camel_url_get_param (service->url, "use_ssl");
- if (use_ssl) {
- for (i = 0; ssl_options[i].value; i++)
- if (!strcmp (ssl_options[i].value, use_ssl))
- break;
- ssl_mode = ssl_options[i].mode;
- } else
- ssl_mode = USE_SSL_NEVER;
-
- if (ssl_mode == USE_SSL_ALWAYS) {
- /* Connect via SSL */
- return connect_to_server (service, ssl_mode, ex);
- } else if (ssl_mode == USE_SSL_WHEN_POSSIBLE) {
- /* If the server supports SSL, use it */
- if (!connect_to_server (service, ssl_mode, ex)) {
- if (camel_exception_get_id (ex) == CAMEL_EXCEPTION_SERVICE_UNAVAILABLE) {
- /* The ssl port seems to be unavailable, fall back to plain NNTP */
- camel_exception_clear (ex);
- return connect_to_server (service, USE_SSL_NEVER, ex);
- } else {
- return FALSE;
- }
- }
-
- return TRUE;
- } else {
- /* User doesn't care about SSL */
- return connect_to_server (service, ssl_mode, ex);
- }
-#else
- return connect_to_server (service, USE_SSL_NEVER, ex);
-#endif
-}
-
-static gboolean
-nntp_disconnect (CamelService *service, gboolean clean, CamelException *ex)
-{
- CamelNNTPStore *store = CAMEL_NNTP_STORE (service);
- char *line;
-
- CAMEL_NNTP_STORE_LOCK(store, command_lock);
-
- if (clean)
- camel_nntp_command (store, &line, "quit");
-
- if (!service_class->disconnect (service, clean, ex))
- return FALSE;
-
- camel_object_unref((CamelObject *)store->stream);
- store->stream = NULL;
-
- CAMEL_NNTP_STORE_UNLOCK(store, command_lock);
-
- 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)
-{
- g_warning ("nntp::query_auth_types: not implemented. Defaulting.");
-
- return g_list_append (NULL, &password_authtype);
-}
-
-static CamelFolder *
-nntp_store_get_folder(CamelStore *store, const char *folder_name, guint32 flags, CamelException *ex)
-{
- CamelNNTPStore *nntp_store = CAMEL_NNTP_STORE (store);
- CamelFolder *folder;
-
- CAMEL_NNTP_STORE_LOCK(nntp_store, command_lock);
-
- folder = camel_nntp_folder_new(store, folder_name, ex);
-
- CAMEL_NNTP_STORE_UNLOCK(nntp_store, command_lock);
-
- return folder;
-}
-
-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;
- CamelFolderInfo *groups = NULL, *last = NULL, *fi;
- unsigned int len;
- unsigned char *line, *space;
- int ret = -1;
-
- CAMEL_NNTP_STORE_LOCK(nntp_store, command_lock);
-
- ret = camel_nntp_command(nntp_store, (char **)&line, "list");
- if (ret != 215) {
- ret = -1;
- goto error;
- }
-
- while ( (ret = camel_nntp_stream_line(nntp_store->stream, &line, &len)) > 0) {
- space = strchr(line, ' ');
- if (space)
- *space = 0;
-
- if (top == NULL || top[0] == 0 || strcmp(top, line) == 0) {
- fi = g_malloc0(sizeof(*fi));
- fi->name = g_strdup(line);
- fi->full_name = g_strdup(line);
- if (url->user)
- fi->url = g_strdup_printf ("nntp://%s@%s/%s", url->user, url->host, line);
- else
- fi->url = g_strdup_printf ("nntp://%s/%s", url->host, line);
- fi->unread_message_count = -1;
- camel_folder_info_build_path(fi, '/');
-
- if (last)
- last->sibling = fi;
- else
- groups = fi;
- last = fi;
- }
- }
-
- if (ret < 0)
- goto error;
-
- CAMEL_NNTP_STORE_UNLOCK(nntp_store, command_lock);
-
- return groups;
-
-error:
- CAMEL_NNTP_STORE_UNLOCK(nntp_store, command_lock);
-
- if (groups)
- camel_store_free_folder_info(store, groups);
-
- return NULL;
-}
-
-static gboolean
-nntp_store_folder_subscribed (CamelStore *store, const char *folder_name)
-{
- CamelNNTPStore *nntp_store = CAMEL_NNTP_STORE (store);
-
- nntp_store = nntp_store;
-
- /* FIXME: implement */
-
- return TRUE;
-}
-
-static void
-nntp_store_subscribe_folder (CamelStore *store, const char *folder_name,
- CamelException *ex)
-{
- CamelNNTPStore *nntp_store = CAMEL_NNTP_STORE (store);
-
- nntp_store = nntp_store;
-
- /* FIXME: implement */
-}
-
-static void
-nntp_store_unsubscribe_folder (CamelStore *store, const char *folder_name,
- CamelException *ex)
-{
- CamelNNTPStore *nntp_store = CAMEL_NNTP_STORE (store);
-
- nntp_store = nntp_store;
-
- /* FIXME: implement */
-}
-
-static void
-nntp_store_finalise (CamelObject *object)
-{
- CamelNNTPStore *nntp_store = CAMEL_NNTP_STORE (object);
- struct _CamelNNTPStorePrivate *p = nntp_store->priv;
-
- camel_service_disconnect((CamelService *)object, TRUE, NULL);
-
- camel_object_unref((CamelObject *)nntp_store->mem);
- nntp_store->mem = NULL;
- if (nntp_store->stream)
- camel_object_unref((CamelObject *)nntp_store->stream);
-
- e_mutex_destroy(p->command_lock);
-
- g_free(p);
-}
-
-static void
-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);
-
- parent_class = CAMEL_STORE_CLASS (camel_type_get_global_classfuncs (camel_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_connect;
- camel_service_class->disconnect = nntp_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
-nntp_store_init (gpointer object, gpointer klass)
-{
- CamelNNTPStore *nntp_store = CAMEL_NNTP_STORE(object);
- CamelStore *store = CAMEL_STORE (object);
- struct _CamelNNTPStorePrivate *p;
-
- store->flags = CAMEL_STORE_SUBSCRIPTIONS;
-
- nntp_store->mem = (CamelStreamMem *)camel_stream_mem_new();
-
- p = nntp_store->priv = g_malloc0(sizeof(*p));
- p->command_lock = e_mutex_new(E_MUTEX_REC);
-}
-
-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_STORE_TYPE,
- "CamelNNTPStore",
- sizeof (CamelNNTPStore),
- sizeof (CamelNNTPStoreClass),
- (CamelObjectClassInitFunc) nntp_store_class_init,
- NULL,
- (CamelObjectInitFunc) nntp_store_init,
- (CamelObjectFinalizeFunc) nntp_store_finalise);
- }
-
- return camel_nntp_store_type;
-}
-
-/* enter owning lock */
-int
-camel_nntp_store_set_folder (CamelNNTPStore *store, CamelFolder *folder, CamelFolderChangeInfo *changes, CamelException *ex)
-{
- int ret;
-
- if (store->current_folder && strcmp(folder->full_name, store->current_folder) == 0)
- return 0;
-
- /* FIXME: Do something with changeinfo */
- ret = camel_nntp_summary_check((CamelNNTPSummary *)folder->summary, changes, ex);
-
- g_free(store->current_folder);
- store->current_folder = g_strdup(folder->full_name);
-
- return ret;
-}
-
-static gboolean
-nntp_connected (CamelNNTPStore *store, CamelException *ex)
-{
- if (store->stream == NULL)
- return camel_service_connect (CAMEL_SERVICE (store), ex);
- return TRUE;
-}
-
-/* Enter owning lock */
-int
-camel_nntp_command(CamelNNTPStore *store, char **line, const char *fmt, ...)
-{
- const unsigned char *p, *ps;
- unsigned char c;
- va_list ap;
- char *s;
- int d;
- unsigned int u, u2;
-
- e_mutex_assert_locked(store->priv->command_lock);
-
- if (!nntp_connected (store, NULL))
- return -1;
-
- /* Check for unprocessed data, ! */
- if (store->stream->mode == CAMEL_NNTP_STREAM_DATA) {
- g_warning("Unprocessed data left in stream, flushing");
- while (camel_nntp_stream_getd(store->stream, (unsigned char **)&p, &u) > 0)
- ;
- }
- camel_nntp_stream_set_mode(store->stream, CAMEL_NNTP_STREAM_LINE);
-
- va_start(ap, fmt);
- ps = p = fmt;
- while ( (c = *p++) ) {
- switch (c) {
- case '%':
- c = *p++;
- camel_stream_write((CamelStream *)store->mem, ps, p-ps-(c=='%'?1:2));
- ps = p;
- switch (c) {
- case 's':
- s = va_arg(ap, char *);
- camel_stream_write((CamelStream *)store->mem, s, strlen(s));
- break;
- case 'd':
- d = va_arg(ap, int);
- camel_stream_printf((CamelStream *)store->mem, "%d", d);
- break;
- case 'u':
- u = va_arg(ap, unsigned int);
- camel_stream_printf((CamelStream *)store->mem, "%u", u);
- break;
- case 'm':
- s = va_arg(ap, char *);
- camel_stream_printf((CamelStream *)store->mem, "<%s>", s);
- break;
- case 'r':
- u = va_arg(ap, unsigned int);
- u2 = va_arg(ap, unsigned int);
- if (u == u2)
- camel_stream_printf((CamelStream *)store->mem, "%u", u);
- else
- camel_stream_printf((CamelStream *)store->mem, "%u-%u", u, u2);
- break;
- default:
- g_warning("Passing unknown format to nntp_command: %c\n", c);
- g_assert(0);
- }
- }
- }
-
- camel_stream_write((CamelStream *)store->mem, ps, p-ps-1);
- dd(printf("NNTP_COMMAND: '%.*s'\n", (int)store->mem->buffer->len, store->mem->buffer->data));
- camel_stream_write((CamelStream *)store->mem, "\r\n", 2);
- camel_stream_write((CamelStream *)store->stream, store->mem->buffer->data, store->mem->buffer->len);
- camel_stream_reset((CamelStream *)store->mem);
- /* FIXME: hack */
- g_byte_array_set_size(store->mem->buffer, 0);
-
- if (camel_nntp_stream_line(store->stream, (unsigned char **)line, &u) == -1)
- return -1;
-
- u = strtoul(*line, NULL, 10);
-
- /* Handle all switching to data mode here, to make callers job easier */
- if (u == 215 || (u >= 220 && u <=224) || (u >= 230 && u <= 231))
- camel_nntp_stream_set_mode(store->stream, CAMEL_NNTP_STREAM_DATA);
-
- return u;
-}
-
diff --git a/camel/providers/nntp/camel-nntp-store.h b/camel/providers/nntp/camel-nntp-store.h
deleted file mode 100644
index a201c2cea2..0000000000
--- a/camel/providers/nntp/camel-nntp-store.h
+++ /dev/null
@@ -1,92 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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/camel-store.h>
-#include <camel/camel-stream-mem.h>
-#include <camel/camel-data-cache.h>
-#include <camel/camel-exception.h>
-#include <camel/camel-folder.h>
-
-#include "camel-nntp-stream.h"
-
-#define CAMEL_NNTP_STORE_TYPE (camel_nntp_store_get_type ())
-#define CAMEL_NNTP_STORE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_NNTP_STORE_TYPE, CamelNNTPStore))
-#define CAMEL_NNTP_STORE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_NNTP_STORE_TYPE, CamelNNTPStoreClass))
-#define CAMEL_IS_NNTP_STORE(o) (CAMEL_CHECK_TYPE((o), CAMEL_NNTP_STORE_TYPE))
-
-#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)
-
-typedef struct _CamelNNTPStore CamelNNTPStore;
-typedef struct _CamelNNTPStoreClass CamelNNTPStoreClass;
-
-struct _CamelNNTPStore {
- CamelStore parent_object;
-
- struct _CamelNNTPStorePrivate *priv;
-
- guint32 extensions;
-
- gboolean posting_allowed;
-
- CamelNNTPStream *stream;
- CamelStreamMem *mem;
-
- CamelDataCache *cache;
-
- char *current_folder;
-};
-
-struct _CamelNNTPStoreClass {
- CamelStoreClass parent_class;
-
-};
-
-/* Standard Camel function */
-CamelType camel_nntp_store_get_type (void);
-
-int camel_nntp_command(CamelNNTPStore *store, char **line, const char *fmt, ...);
-int camel_nntp_store_set_folder(CamelNNTPStore *store, CamelFolder *folder, CamelFolderChangeInfo *changes, CamelException *ex);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_NNTP_STORE_H */
-
-
diff --git a/camel/providers/nntp/camel-nntp-stream.c b/camel/providers/nntp/camel-nntp-stream.c
deleted file mode 100644
index 1e2dcb23f9..0000000000
--- a/camel/providers/nntp/camel-nntp-stream.c
+++ /dev/null
@@ -1,462 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; fill-column: 160 -*-
- *
- * 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <stdio.h>
-
-#include <glib.h>
-
-#include "camel-nntp-stream.h"
-
-extern int camel_verbose_debug;
-#define dd(x) (camel_verbose_debug?(x):0)
-
-static CamelObjectClass *parent_class = NULL;
-
-/* Returns the class for a CamelStream */
-#define CS_CLASS(so) CAMEL_NNTP_STREAM_CLASS(CAMEL_OBJECT_GET_CLASS(so))
-
-#define CAMEL_NNTP_STREAM_SIZE (4096)
-#define CAMEL_NNTP_STREAM_LINE (1024) /* maximum line size */
-
-static int
-stream_fill(CamelNNTPStream *is)
-{
- int left = 0;
-
- if (is->source) {
- left = is->end - is->ptr;
- memcpy(is->buf, is->ptr, left);
- is->end = is->buf + left;
- is->ptr = is->buf;
- left = camel_stream_read(is->source, is->end, CAMEL_NNTP_STREAM_SIZE - (is->end - is->buf));
- if (left > 0) {
- is->end += left;
- is->end[0] = '\n';
- return is->end - is->ptr;
- } else {
- dd(printf("NNTP_STREAM_FILL(ERROR): '%s'\n", strerror(errno)));
- return -1;
- }
- }
-
- return 0;
-}
-
-static ssize_t
-stream_read(CamelStream *stream, char *buffer, size_t n)
-{
- CamelNNTPStream *is = (CamelNNTPStream *)stream;
- char *o, *oe;
- unsigned char *p, *e, c;
- int state;
-
- if (is->mode != CAMEL_NNTP_STREAM_DATA || n == 0)
- return 0;
-
- o = buffer;
- oe = buffer + n;
- state = is->state;
-
- /* Need to copy/strip '.'s and whatnot */
- p = is->ptr;
- e = is->end;
-
- switch(state) {
- state_0:
- case 0: /* start of line, always read at least 3 chars */
- while (e - p < 3) {
- is->ptr = p;
- if (stream_fill(is) == -1)
- return -1;
- p = is->ptr;
- e = is->end;
- }
- if (p[0] == '.') {
- if (p[1] == '\r' && p[2] == '\n') {
- is->ptr = p+3;
- is->mode = CAMEL_NNTP_STREAM_EOD;
- is->state = 0;
- dd(printf("NNTP_STREAM_READ(%d):\n%.*s\n", o-buffer, o-buffer, buffer));
- return o-buffer;
- }
- p++;
- }
- state = 1;
- /* FALLS THROUGH */
- case 1: /* looking for next sol */
- while (o < oe) {
- c = *p++;
- if (c == '\n') {
- /* end of input sentinal check */
- if (p > e) {
- is->ptr = e;
- if (stream_fill(is) == -1)
- return -1;
- p = is->ptr;
- e = is->end;
- } else {
- *o++ = '\n';
- state = 0;
- goto state_0;
- }
- } else if (c != '\r') {
- *o++ = c;
- }
- }
- break;
- }
-
- is->ptr = p;
- is->state = state;
-
- dd(printf("NNTP_STREAM_READ(%d):\n%.*s\n", o-buffer, o-buffer, buffer));
-
- return o-buffer;
-}
-
-static ssize_t
-stream_write(CamelStream *stream, const char *buffer, size_t n)
-{
- CamelNNTPStream *is = (CamelNNTPStream *)stream;
-
- return camel_stream_write(is->source, buffer, n);
-}
-
-static int
-stream_close(CamelStream *stream)
-{
- /* nop? */
- return 0;
-}
-
-static int
-stream_flush(CamelStream *stream)
-{
- /* nop? */
- return 0;
-}
-
-static gboolean
-stream_eos(CamelStream *stream)
-{
- CamelNNTPStream *is = (CamelNNTPStream *)stream;
-
- return is->mode != CAMEL_NNTP_STREAM_DATA;
-}
-
-static int
-stream_reset(CamelStream *stream)
-{
- /* nop? reset literal mode? */
- return 0;
-}
-
-static void
-camel_nntp_stream_class_init (CamelStreamClass *camel_nntp_stream_class)
-{
- CamelStreamClass *camel_stream_class = (CamelStreamClass *)camel_nntp_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;
-}
-
-static void
-camel_nntp_stream_init(CamelNNTPStream *is, CamelNNTPStreamClass *isclass)
-{
- /* +1 is room for appending a 0 if we need to for a line */
- is->ptr = is->end = is->buf = g_malloc(CAMEL_NNTP_STREAM_SIZE+1);
- is->lineptr = is->linebuf = g_malloc(CAMEL_NNTP_STREAM_LINE+1);
- is->lineend = is->linebuf + CAMEL_NNTP_STREAM_LINE;
-
- /* init sentinal */
- is->ptr[0] = '\n';
-
- is->state = 0;
- is->mode = CAMEL_NNTP_STREAM_LINE;
-}
-
-static void
-camel_nntp_stream_finalise(CamelNNTPStream *is)
-{
- g_free(is->buf);
- g_free(is->linebuf);
- if (is->source)
- camel_object_unref((CamelObject *)is->source);
-}
-
-CamelType
-camel_nntp_stream_get_type (void)
-{
- static CamelType camel_nntp_stream_type = CAMEL_INVALID_TYPE;
-
- if (camel_nntp_stream_type == CAMEL_INVALID_TYPE) {
- camel_nntp_stream_type = camel_type_register( camel_stream_get_type(),
- "CamelNNTPStream",
- sizeof( CamelNNTPStream ),
- sizeof( CamelNNTPStreamClass ),
- (CamelObjectClassInitFunc) camel_nntp_stream_class_init,
- NULL,
- (CamelObjectInitFunc) camel_nntp_stream_init,
- (CamelObjectFinalizeFunc) camel_nntp_stream_finalise );
- }
-
- return camel_nntp_stream_type;
-}
-
-/**
- * camel_nntp_stream_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_nntp_stream_new(CamelStream *source)
-{
- CamelNNTPStream *is;
-
- is = (CamelNNTPStream *)camel_object_new(camel_nntp_stream_get_type ());
- camel_object_ref((CamelObject *)source);
- is->source = source;
-
- return (CamelStream *)is;
-}
-
-/* Get one line from the nntp stream */
-int
-camel_nntp_stream_line(CamelNNTPStream *is, unsigned char **data, unsigned int *len)
-{
- register unsigned char c, *p, *o, *oe;
- int newlen, oldlen;
- unsigned char *e;
-
- if (is->mode == CAMEL_NNTP_STREAM_EOD) {
- *data = is->linebuf;
- *len = 0;
- return 0;
- }
-
- o = is->linebuf;
- oe = is->lineend - 1;
- p = is->ptr;
- e = is->end;
-
- /* Data mode, convert leading '..' to '.', and stop when we reach a solitary '.' */
- if (is->mode == CAMEL_NNTP_STREAM_DATA) {
- /* need at least 3 chars in buffer */
- while (e-p < 3) {
- is->ptr = p;
- if (stream_fill(is) == -1)
- return -1;
- p = is->ptr;
- e = is->end;
- }
-
- /* check for isolated '.\r\n' or begging of line '.' */
- if (p[0] == '.') {
- if (p[1] == '\r' && p[2] == '\n') {
- is->ptr = p+3;
- is->mode = CAMEL_NNTP_STREAM_EOD;
- *data = is->linebuf;
- *len = 0;
- is->linebuf[0] = 0;
-
- dd(printf("NNTP_STREAM_LINE(END)\n"));
-
- return 0;
- }
- p++;
- }
- }
-
- while (1) {
- while (o < oe) {
- c = *p++;
- if (c == '\n') {
- /* sentinal? */
- if (p> e) {
- is->ptr = e;
- if (stream_fill(is) == -1)
- return -1;
- p = is->ptr;
- e = is->end;
- } else {
- is->ptr = p;
- *data = is->linebuf;
- *len = o - is->linebuf;
- *o = 0;
-
- dd(printf("NNTP_STREAM_LINE(%d): '%s'\n", *len, *data));
-
- return 1;
- }
- } else if (c != '\r') {
- *o++ = c;
- }
- }
-
- /* limit this for bad server data? */
- oldlen = o - is->linebuf;
- newlen = (is->lineend - is->linebuf) * 3 / 2;
- is->lineptr = is->linebuf = g_realloc(is->linebuf, newlen);
- is->lineend = is->linebuf + newlen;
- oe = is->lineend - 1;
- o = is->linebuf + oldlen;
- }
-
- return -1;
-}
-
-/* returns -1 on error, 0 if last lot of data, >0 if more remaining */
-int camel_nntp_stream_gets(CamelNNTPStream *is, unsigned char **start, unsigned int *len)
-{
- int max;
- unsigned char *end;
-
- *len = 0;
-
- max = is->end - is->ptr;
- if (max == 0) {
- max = stream_fill(is);
- if (max <= 0)
- return max;
- }
-
- *start = is->ptr;
- end = memchr(is->ptr, '\n', max);
- if (end)
- max = (end - is->ptr) + 1;
- *start = is->ptr;
- *len = max;
- is->ptr += max;
-
- dd(printf("NNTP_STREAM_GETS(%s,%d): '%.*s'\n", end==NULL?"more":"last", *len, (int)*len, *start));
-
- return end == NULL?1:0;
-}
-
-void camel_nntp_stream_set_mode(CamelNNTPStream *is, camel_nntp_stream_mode_t mode)
-{
- is->mode = mode;
-}
-
-/* returns -1 on erorr, 0 if last data, >0 if more data left */
-int camel_nntp_stream_getd(CamelNNTPStream *is, unsigned char **start, unsigned int *len)
-{
- unsigned char *p, *e, *s;
- int state;
-
- *len = 0;
-
- if (is->mode == CAMEL_NNTP_STREAM_EOD)
- return 0;
-
- if (is->mode == CAMEL_NNTP_STREAM_LINE) {
- g_warning("nntp_stream reading data in line mode\n");
- return 0;
- }
-
- state = is->state;
- p = is->ptr;
- e = is->end;
-
- while (e - p < 3) {
- is->ptr = p;
- if (stream_fill(is) == -1)
- return -1;
- p = is->ptr;
- e = is->end;
- }
-
- s = p;
-
- do {
- switch(state) {
- case 0:
- /* check leading '.', ... */
- if (p[0] == '.') {
- if (p[1] == '\r' && p[2] == '\n') {
- is->ptr = p+3;
- *len = p-s;
- *start = s;
- is->mode = CAMEL_NNTP_STREAM_EOD;
- is->state = 0;
-
- dd(printf("NNTP_STREAM_GETD(%s,%d): '%.*s'\n", "last", *len, (int)*len, *start));
-
- return 0;
- }
-
- /* If at start, just skip '.', else return data upto '.' but skip it */
- if (p == s) {
- s++;
- p++;
- } else {
- is->ptr = p+1;
- *len = p-s;
- *start = s;
- is->state = 1;
-
- dd(printf("NNTP_STREAM_GETD(%s,%d): '%.*s'\n", "more", *len, (int)*len, *start));
-
- return 1;
- }
- }
- state = 1;
- case 1:
- /* Scan for sentinal */
- while ((*p++)!='\n')
- ;
-
- if (p > e) {
- p = e;
- } else {
- state = 0;
- }
- break;
- }
- } while ((e-p) >= 3);
-
- is->state = state;
- is->ptr = p;
- *len = p-s;
- *start = s;
-
- dd(printf("NNTP_STREAM_GETD(%s,%d): '%.*s'\n", "more", *len, (int)*len, *start));
- return 1;
-}
-
diff --git a/camel/providers/nntp/camel-nntp-stream.h b/camel/providers/nntp/camel-nntp-stream.h
deleted file mode 100644
index eef217cef2..0000000000
--- a/camel/providers/nntp/camel-nntp-stream.h
+++ /dev/null
@@ -1,66 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_STREAM_H
-#define _CAMEL_NNTP_STREAM_H
-
-#include <camel/camel-stream.h>
-
-#define CAMEL_NNTP_STREAM(obj) CAMEL_CHECK_CAST (obj, camel_nntp_stream_get_type (), CamelNNTPStream)
-#define CAMEL_NNTP_STREAM_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_nntp_stream_get_type (), CamelNNTPStreamClass)
-#define CAMEL_IS_NNTP_STREAM(obj) CAMEL_CHECK_TYPE (obj, camel_nntp_stream_get_type ())
-
-typedef struct _CamelNNTPStreamClass CamelNNTPStreamClass;
-typedef struct _CamelNNTPStream CamelNNTPStream;
-
-typedef enum {
- CAMEL_NNTP_STREAM_LINE,
- CAMEL_NNTP_STREAM_DATA,
- CAMEL_NNTP_STREAM_EOD, /* end of data, acts as if end of stream */
-} camel_nntp_stream_mode_t;
-
-struct _CamelNNTPStream {
- CamelStream parent;
-
- CamelStream *source;
-
- camel_nntp_stream_mode_t mode;
- int state;
-
- unsigned char *buf, *ptr, *end;
- unsigned char *linebuf, *lineptr, *lineend;
-};
-
-struct _CamelNNTPStreamClass {
- CamelStreamClass parent_class;
-};
-
-CamelType camel_nntp_stream_get_type (void);
-
-CamelStream *camel_nntp_stream_new (CamelStream *source);
-
-
-void camel_nntp_stream_set_mode (CamelNNTPStream *is, camel_nntp_stream_mode_t mode);
-
-int camel_nntp_stream_line (CamelNNTPStream *is, unsigned char **data, unsigned int *len);
-int camel_nntp_stream_gets (CamelNNTPStream *is, unsigned char **start, unsigned int *len);
-int camel_nntp_stream_getd (CamelNNTPStream *is, unsigned char **start, unsigned int *len);
-
-#endif /* ! _CAMEL_NNTP_STREAM_H */
diff --git a/camel/providers/nntp/camel-nntp-summary.c b/camel/providers/nntp/camel-nntp-summary.c
deleted file mode 100644
index 2a9669d697..0000000000
--- a/camel/providers/nntp/camel-nntp-summary.c
+++ /dev/null
@@ -1,584 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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/camel-file-utils.h"
-#include "camel/camel-mime-message.h"
-#include "camel/camel-stream-null.h"
-#include "camel/camel-operation.h"
-#include "camel/camel-data-cache.h"
-
-#include "camel-nntp-summary.h"
-#include "camel-nntp-folder.h"
-#include "camel-nntp-store.h"
-#include "camel-nntp-stream.h"
-
-#define w(x)
-#define io(x)
-#define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
-extern int camel_verbose_debug;
-#define dd(x) (camel_verbose_debug?(x):0)
-
-#define CAMEL_NNTP_SUMMARY_VERSION (0x200)
-
-static int xover_setup(CamelNNTPSummary *cns, CamelException *ex);
-static int add_range_xover(CamelNNTPSummary *cns, unsigned int high, unsigned int low, CamelFolderChangeInfo *changes, CamelException *ex);
-static int add_range_head(CamelNNTPSummary *cns, unsigned int high, unsigned int low, CamelFolderChangeInfo *changes, CamelException *ex);
-
-enum _xover_t {
- XOVER_STRING = 0,
- XOVER_MSGID,
- XOVER_SIZE,
-};
-
-struct _xover_header {
- struct _xover_header *next;
-
- const char *name;
- unsigned int skip:8;
- enum _xover_t type:8;
-};
-
-struct _CamelNNTPSummaryPrivate {
- char *uid;
-
- struct _xover_header *xover; /* xoverview format */
- int xover_setup;
-};
-
-#define _PRIVATE(o) (((CamelNNTPSummary *)(o))->priv)
-
-static CamelMessageInfo * message_info_new (CamelFolderSummary *, struct _camel_header_raw *);
-static int summary_header_load(CamelFolderSummary *, FILE *);
-static int summary_header_save(CamelFolderSummary *, FILE *);
-
-static void camel_nntp_summary_class_init (CamelNNTPSummaryClass *klass);
-static void camel_nntp_summary_init (CamelNNTPSummary *obj);
-static void camel_nntp_summary_finalise (CamelObject *obj);
-static CamelFolderSummaryClass *camel_nntp_summary_parent;
-
-CamelType
-camel_nntp_summary_get_type(void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register(camel_folder_summary_get_type(), "CamelNNTPSummary",
- sizeof (CamelNNTPSummary),
- sizeof (CamelNNTPSummaryClass),
- (CamelObjectClassInitFunc) camel_nntp_summary_class_init,
- NULL,
- (CamelObjectInitFunc) camel_nntp_summary_init,
- (CamelObjectFinalizeFunc) camel_nntp_summary_finalise);
- }
-
- return type;
-}
-
-static void
-camel_nntp_summary_class_init(CamelNNTPSummaryClass *klass)
-{
- CamelFolderSummaryClass *sklass = (CamelFolderSummaryClass *) klass;
-
- camel_nntp_summary_parent = CAMEL_FOLDER_SUMMARY_CLASS(camel_type_get_global_classfuncs(camel_folder_summary_get_type()));
-
- sklass->message_info_new = message_info_new;
- sklass->summary_header_load = summary_header_load;
- sklass->summary_header_save = summary_header_save;
-}
-
-static void
-camel_nntp_summary_init(CamelNNTPSummary *obj)
-{
- struct _CamelNNTPSummaryPrivate *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_NNTP_SUMMARY_VERSION;
-}
-
-static void
-camel_nntp_summary_finalise(CamelObject *obj)
-{
- CamelNNTPSummary *cns = CAMEL_NNTP_SUMMARY(obj);
- struct _xover_header *xover, *xn;
-
- xover = cns->priv->xover;
- while (xover) {
- xn = xover->next;
- g_free(xover);
- xover = xn;
- }
-
- g_free(cns->priv);
-}
-
-CamelNNTPSummary *
-camel_nntp_summary_new(CamelNNTPFolder *folder)
-{
- CamelNNTPSummary *cns = (CamelNNTPSummary *)camel_object_new(camel_nntp_summary_get_type());
- char *path;
-
- cns->folder = folder;
- path = g_strdup_printf("%s.ev-summary", folder->storage_path);
- camel_folder_summary_set_filename((CamelFolderSummary *)cns, path);
- g_free(path);
-
- camel_folder_summary_set_build_content((CamelFolderSummary *)cns, FALSE);
-
- return cns;
-}
-
-static CamelMessageInfo *
-message_info_new(CamelFolderSummary *s, struct _camel_header_raw *h)
-{
- CamelMessageInfo *mi;
- CamelNNTPSummary *cns = (CamelNNTPSummary *)s;
-
- /* error to call without this setup */
- if (cns->priv->uid == NULL)
- return NULL;
-
- /* we shouldn't be here if we already have this uid */
- g_assert(camel_folder_summary_uid(s, cns->priv->uid) == NULL);
-
- mi = ((CamelFolderSummaryClass *)camel_nntp_summary_parent)->message_info_new(s, h);
- if (mi) {
- camel_message_info_set_uid(mi, cns->priv->uid);
- cns->priv->uid = NULL;
- }
-
- return mi;
-}
-
-static int
-summary_header_load(CamelFolderSummary *s, FILE *in)
-{
- CamelNNTPSummary *cns = CAMEL_NNTP_SUMMARY(s);
-
- if (((CamelFolderSummaryClass *)camel_nntp_summary_parent)->summary_header_load(s, in) == -1
- || camel_file_util_decode_fixed_int32(in, &cns->high) == -1
- || camel_file_util_decode_fixed_int32(in, &cns->low) == -1)
- return -1;
-
- return 0;
-}
-
-static int
-summary_header_save(CamelFolderSummary *s, FILE *out)
-{
- CamelNNTPSummary *cns = CAMEL_NNTP_SUMMARY(s);
-
- if (((CamelFolderSummaryClass *)camel_nntp_summary_parent)->summary_header_save(s, out) == -1
- || camel_file_util_encode_fixed_int32(out, cns->high) == -1
- || camel_file_util_encode_fixed_int32(out, cns->low) == -1)
- return -1;
-
- return 0;
-}
-
-/* Assumes we have the stream */
-int
-camel_nntp_summary_check(CamelNNTPSummary *cns, CamelFolderChangeInfo *changes, CamelException *ex)
-{
- CamelNNTPStore *store;
- CamelFolder *folder;
- CamelFolderSummary *s;
- int ret, i;
- char *line;
- unsigned int n, f, l;
- int count;
-
- if (xover_setup(cns, ex) == -1)
- return -1;
-
- folder = (CamelFolder *)cns->folder;
- store = (CamelNNTPStore *)folder->parent_store;
- s = (CamelFolderSummary *)cns;
-
- ret = camel_nntp_command(store, &line, "group %s", folder->full_name);
- if (ret == 411) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID,
- _("No such folder: %s"), line);
- return -1;
- } else if (ret != 211) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("Could not get group: %s"), line);
- return -1;
- }
-
- line +=3;
- n = strtoul(line, &line, 10);
- f = strtoul(line, &line, 10);
- l = strtoul(line, &line, 10);
-
- dd(printf("nntp_summary: got last '%u' first '%u'\n"
- "nntp_summary: high '%u' low '%u'\n", l, f, cns->high, cns->low));
-
- if (cns->low == f && cns->high == l) {
- dd(printf("nntp_summary: no work to do!\n"));
- return 0;
- }
-
- /* Need to work out what to do with our messages */
-
- /* Check for messages no longer on the server */
- if (cns->low != f) {
- count = camel_folder_summary_count(s);
- for (i = 0; i < count; i++) {
- CamelMessageInfo *mi = camel_folder_summary_index(s, i);
-
- if (mi) {
- const char *uid = camel_message_info_uid(mi);
- const char *msgid;
-
- n = strtoul(uid, NULL, 10);
- if (n < f || n > l) {
- dd(printf("nntp_summary: %u is lower/higher than lowest/highest article, removed\n", n));
- /* Since we use a global cache this could prematurely remove
- a cached message that might be in another folder - not that important as
- it is a true cache */
- msgid = strchr(uid, ',');
- if (msgid)
- camel_data_cache_remove(store->cache, "cache", msgid+1, NULL);
- camel_folder_change_info_remove_uid(changes, uid);
- camel_folder_summary_remove(s, mi);
- count--;
- i--;
- }
-
- camel_folder_summary_info_free(s, mi);
- }
- }
- cns->low = f;
- }
-
- if (cns->high < l) {
- if (cns->high < f)
- cns->high = f-1;
-
- if (cns->priv->xover) {
- ret = add_range_xover(cns, l, cns->high+1, changes, ex);
- } else {
- ret = add_range_head(cns, l, cns->high+1, changes, ex);
- }
- }
-
- camel_folder_summary_touch(s);
-
- return ret;
-}
-
-static struct {
- const char *name;
- int type;
-} headers[] = {
- { "subject", 0 },
- { "from", 0 },
- { "date", 0 },
- { "message-id", 1 },
- { "references", 0 },
- { "bytes", 2 },
-};
-
-static int
-xover_setup(CamelNNTPSummary *cns, CamelException *ex)
-{
- CamelNNTPStore *store;
- CamelFolder *folder;
- CamelFolderSummary *s;
- int ret, i;
- char *line;
- unsigned int len;
- unsigned char c, *p;
- struct _xover_header *xover, *last;
-
- if (cns->priv->xover_setup)
- return 0;
-
- /* manual override */
- if (getenv("CAMEL_NNTP_DISABLE_XOVER") != NULL) {
- cns->priv->xover_setup = TRUE;
- return 0;
- }
-
- folder = (CamelFolder *)cns->folder;
- store = (CamelNNTPStore *)folder->parent_store;
- s = (CamelFolderSummary *)cns;
-
- ret = camel_nntp_command(store, &line, "list overview.fmt");
- if (ret == -1) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("NNTP Command failed: %s"), strerror(errno));
- return -1;
- }
-
- cns->priv->xover_setup = TRUE;
-
- /* unsupported command? */
- if (ret != 215)
- return 0;
-
- last = (struct _xover_header *)&cns->priv->xover;
-
- /* supported command */
- while ((ret = camel_nntp_stream_line(store->stream, (unsigned char **)&line, &len)) > 0) {
- p = line;
- xover = g_malloc0(sizeof(*xover));
- last->next = xover;
- last = xover;
- while ((c = *p++)) {
- if (c == ':') {
- p[-1] = 0;
- for (i=0;i<sizeof(headers)/sizeof(headers[0]);i++) {
- if (strcmp(line, headers[i].name) == 0) {
- xover->name = headers[i].name;
- if (strncmp(p, "full", 4) == 0)
- xover->skip = strlen(xover->name)+1;
- else
- xover->skip = 0;
- xover->type = headers[i].type;
- break;
- }
- }
- break;
- } else {
- p[-1] = tolower(c);
- }
- }
- }
-
- return ret;
-}
-
-static int
-add_range_xover(CamelNNTPSummary *cns, unsigned int high, unsigned int low, CamelFolderChangeInfo *changes, CamelException *ex)
-{
- CamelNNTPStore *store;
- CamelFolder *folder;
- CamelFolderSummary *s;
- CamelMessageInfo *mi;
- struct _camel_header_raw *headers = NULL;
- char *line, *tab;
- int len, ret;
- unsigned int n, count, total, size;
- struct _xover_header *xover;
- time_t last, now;
-
- folder = (CamelFolder *)cns->folder;
- store = (CamelNNTPStore *)folder->parent_store;
- s = (CamelFolderSummary *)cns;
-
- camel_operation_start(NULL, _("%s: Scanning new messages"), ((CamelService *)store)->url->host);
-
- ret = camel_nntp_command(store, &line, "xover %r", low, high);
- if (ret != 224) {
- camel_operation_end(NULL);
- return -1;
- }
-
- last = time(0);
- count = 0;
- total = high-low+1;
- while ((ret = camel_nntp_stream_line(store->stream, (unsigned char **)&line, &len)) > 0) {
- camel_operation_progress(NULL, (count * 100) / total);
- count++;
- n = strtoul(line, &tab, 10);
- if (*tab != '\t')
- continue;
- tab++;
- xover = cns->priv->xover;
- size = 0;
- for (;tab[0] && xover;xover = xover->next) {
- line = tab;
- tab = strchr(line, '\t');
- if (tab)
- *tab++ = 0;
- else
- tab = line+strlen(line);
-
- /* do we care about this column? */
- if (xover->name) {
- line += xover->skip;
- if (line < tab) {
- camel_header_raw_append(&headers, xover->name, line, -1);
- switch(xover->type) {
- case XOVER_STRING:
- break;
- case XOVER_MSGID:
- cns->priv->uid = g_strdup_printf("%u,%s", n, line);
- break;
- case XOVER_SIZE:
- size = strtoul(line, NULL, 10);
- break;
- }
- }
- }
- }
-
- /* truncated line? ignore? */
- if (xover == NULL) {
- mi = camel_folder_summary_uid(s, cns->priv->uid);
- if (mi == NULL) {
- mi = camel_folder_summary_add_from_header(s, headers);
- if (mi) {
- mi->size = size;
- cns->high = n;
- camel_folder_change_info_add_uid(changes, camel_message_info_uid(mi));
- }
- } else {
- camel_folder_summary_info_free(s, mi);
- }
- }
-
- if (cns->priv->uid) {
- g_free(cns->priv->uid);
- cns->priv->uid = NULL;
- }
-
- camel_header_raw_clear(&headers);
-
- now = time(0);
- if (last + 2 < now) {
- camel_object_trigger_event((CamelObject *)folder, "folder_changed", changes);
- camel_folder_change_info_clear(changes);
- last = now;
- }
- }
-
- camel_operation_end(NULL);
-
- return ret;
-}
-
-static int
-add_range_head(CamelNNTPSummary *cns, unsigned int high, unsigned int low, CamelFolderChangeInfo *changes, CamelException *ex)
-{
- CamelNNTPStore *store;
- CamelFolder *folder;
- CamelFolderSummary *s;
- int i, ret = -1;
- char *line, *msgid;
- unsigned int n, count, total;
- CamelMessageInfo *mi;
- CamelMimeParser *mp;
- time_t now, last;
-
- folder = (CamelFolder *)cns->folder;
- store = (CamelNNTPStore *)folder->parent_store;
- s = (CamelFolderSummary *)cns;
-
- mp = camel_mime_parser_new();
-
- camel_operation_start(NULL, _("%s: Scanning new messages"), ((CamelService *)store)->url->host);
-
- last = time(0);
- count = 0;
- total = high-low+1;
- for (i=low;i<high+1;i++) {
- camel_operation_progress(NULL, (count * 100) / total);
- count++;
- ret = camel_nntp_command(store, &line, "head %u", i);
- /* unknown article, ignore */
- if (ret == 423)
- continue;
- else if (ret == -1)
- goto error;
- else if (ret != 221) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, _("Unknown server response: %s"), line);
- goto ioerror;
- }
- line += 3;
- n = strtoul(line, &line, 10);
- if (n != i)
- g_warning("retrieved message '%d' when i expected '%d'?\n", n, i);
-
- if ((msgid = strchr(line, '<')) && (line = strchr(msgid+1, '>'))){
- line[1] = 0;
- cns->priv->uid = g_strdup_printf("%u,%s\n", n, msgid);
- mi = camel_folder_summary_uid(s, cns->priv->uid);
- if (mi == NULL) {
- if (camel_mime_parser_init_with_stream(mp, (CamelStream *)store->stream) == -1)
- goto error;
- mi = camel_folder_summary_add_from_parser(s, mp);
- while (camel_mime_parser_step(mp, NULL, NULL) != CAMEL_MIME_PARSER_STATE_EOF)
- ;
- if (mi == NULL) {
- goto error;
- }
- cns->high = i;
- camel_folder_change_info_add_uid(changes, camel_message_info_uid(mi));
- } else {
- /* already have, ignore */
- camel_folder_summary_info_free(s, mi);
- }
- if (cns->priv->uid) {
- g_free(cns->priv->uid);
- cns->priv->uid = NULL;
- }
- }
-
- now = time(0);
- if (last + 2 < now) {
- camel_object_trigger_event((CamelObject *)folder, "folder_changed", changes);
- camel_folder_change_info_clear(changes);
- last = now;
- }
- }
-
- ret = 0;
-error:
-
- if (ret == -1) {
- if (errno == EINTR)
- camel_exception_setv(ex, CAMEL_EXCEPTION_USER_CANCEL, _("Use cancel"));
- else
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, _("Operation failed: %s"), strerror(errno));
- }
-ioerror:
-
- if (cns->priv->uid) {
- g_free(cns->priv->uid);
- cns->priv->uid = NULL;
- }
- camel_object_unref((CamelObject *)mp);
-
- camel_operation_end(NULL);
-
- return ret;
-}
diff --git a/camel/providers/nntp/camel-nntp-summary.h b/camel/providers/nntp/camel-nntp-summary.h
deleted file mode 100644
index 82070cdc31..0000000000
--- a/camel/providers/nntp/camel-nntp-summary.h
+++ /dev/null
@@ -1,67 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_SUMMARY_H
-#define _CAMEL_NNTP_SUMMARY_H
-
-#include <camel/camel-folder-summary.h>
-#include <camel/camel-folder.h>
-#include <camel/camel-exception.h>
-#include <libibex/ibex.h>
-
-#define CAMEL_NNTP_SUMMARY(obj) CAMEL_CHECK_CAST (obj, camel_nntp_summary_get_type (), CamelNNTPSummary)
-#define CAMEL_NNTP_SUMMARY_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_nntp_summary_get_type (), CamelNNTPSummaryClass)
-#define CAMEL_IS_LOCAL_SUMMARY(obj) CAMEL_CHECK_TYPE (obj, camel_nntp_summary_get_type ())
-
-typedef struct _CamelNNTPSummary CamelNNTPSummary;
-typedef struct _CamelNNTPSummaryClass CamelNNTPSummaryClass;
-
-struct _CamelNNTPSummary {
- CamelFolderSummary parent;
-
- struct _CamelNNTPSummaryPrivate *priv;
-
- struct _CamelNNTPFolder *folder;
-
- guint32 high, low;
-};
-
-struct _CamelNNTPSummaryClass {
- CamelFolderSummaryClass parent_class;
-};
-
-CamelType camel_nntp_summary_get_type (void);
-CamelNNTPSummary *camel_nntp_summary_new(struct _CamelNNTPFolder *folder);
-
-int camel_nntp_summary_check(CamelNNTPSummary *cns, CamelFolderChangeInfo *, CamelException *ex);
-
-#if 0
-/* load/check the summary */
-int camel_nntp_summary_load(CamelNNTPSummary *cls, CamelException *ex);
-/* check for new/removed messages */
-int camel_nntp_summary_check(CamelNNTPSummary *cls, CamelFolderChangeInfo *, CamelException *ex);
-/* perform a folder sync or expunge, if needed */
-int camel_nntp_summary_sync(CamelNNTPSummary *cls, gboolean expunge, CamelFolderChangeInfo *, CamelException *ex);
-/* add a new message to the summary */
-CamelMessageInfo *camel_nntp_summary_add(CamelNNTPSummary *cls, CamelMimeMessage *msg, const CamelMessageInfo *info, CamelFolderChangeInfo *, CamelException *ex);
-#endif
-
-#endif /* ! _CAMEL_NNTP_SUMMARY_H */
-
diff --git a/camel/providers/nntp/camel-nntp-types.h b/camel/providers/nntp/camel-nntp-types.h
deleted file mode 100644
index a37179c521..0000000000
--- a/camel/providers/nntp/camel-nntp-types.h
+++ /dev/null
@@ -1,33 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 d8000a85ee..0000000000
--- a/camel/providers/nntp/camel-nntp-utils.c
+++ /dev/null
@@ -1,299 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 = camel_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 = camel_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 48fd7490c9..0000000000
--- a/camel/providers/nntp/camel-nntp-utils.h
+++ /dev/null
@@ -1,41 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 84f5477f97..0000000000
--- a/camel/providers/pop3/Makefile.am
+++ /dev/null
@@ -1,38 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-libcamelpop3includedir = $(privincludedir)/camel
-
-camel_provider_LTLIBRARIES = libcamelpop3.la
-camel_provider_DATA = libcamelpop3.urls
-
-INCLUDES = \
- -I.. \
- -I$(srcdir)/.. \
- -I$(srcdir)/../../.. \
- -I$(top_srcdir)/intl \
- -I$(top_srcdir)/camel \
- -I$(top_srcdir)/e-util \
- $(CAMEL_CFLAGS) \
- $(GNOME_INCLUDEDIR) \
- $(GTK_INCLUDEDIR) \
- -DG_LOG_DOMAIN=\"camel-pop3-provider\"
-
-libcamelpop3_la_SOURCES = \
- camel-pop3-engine.c \
- camel-pop3-folder.c \
- camel-pop3-provider.c \
- camel-pop3-stream.c \
- camel-pop3-store.c
-
-libcamelpop3include_HEADERS = \
- camel-pop3-engine.h \
- camel-pop3-folder.h \
- camel-pop3-stream.h \
- camel-pop3-store.h
-
-
-libcamelpop3_la_LDFLAGS = -avoid-version -module
-
-libcamelpop3_la_LIBADD = $(top_builddir)/e-util/libeutil.la
-
-EXTRA_DIST = libcamelpop3.urls
diff --git a/camel/providers/pop3/camel-pop3-engine.c b/camel/providers/pop3/camel-pop3-engine.c
deleted file mode 100644
index 2186136f95..0000000000
--- a/camel/providers/pop3/camel-pop3-engine.c
+++ /dev/null
@@ -1,382 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; fill-column: 160 -*-
- *
- * 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <stdio.h>
-
-#include <glib.h>
-
-#include "camel-pop3-engine.h"
-#include "camel-pop3-stream.h"
-#include <camel/camel-service.h>
-#include <camel/camel-sasl.h>
-
-/* max 'outstanding' bytes in output stream, so we can't deadlock waiting
- for the server to accept our data when pipelining */
-#define CAMEL_POP3_SEND_LIMIT (1024)
-
-
-extern int camel_verbose_debug;
-#define dd(x) (camel_verbose_debug?(x):0)
-
-static void get_capabilities(CamelPOP3Engine *pe, int read_greeting);
-
-static CamelObjectClass *parent_class = NULL;
-
-/* Returns the class for a CamelStream */
-#define CS_CLASS(so) CAMEL_POP3_ENGINE_CLASS(CAMEL_OBJECT_GET_CLASS(so))
-
-static void
-camel_pop3_engine_class_init (CamelPOP3EngineClass *camel_pop3_engine_class)
-{
- parent_class = camel_type_get_global_classfuncs( CAMEL_OBJECT_TYPE );
-}
-
-static void
-camel_pop3_engine_init(CamelPOP3Engine *pe, CamelPOP3EngineClass *peclass)
-{
- e_dlist_init(&pe->active);
- e_dlist_init(&pe->queue);
- e_dlist_init(&pe->done);
- pe->state = CAMEL_POP3_ENGINE_DISCONNECT;
-}
-
-static void
-camel_pop3_engine_finalise(CamelPOP3Engine *pe)
-{
- /* FIXME: Also flush/free any outstanding requests, etc */
-
- if (pe->stream)
- camel_object_unref((CamelObject *)pe->stream);
-}
-
-CamelType
-camel_pop3_engine_get_type (void)
-{
- static CamelType camel_pop3_engine_type = CAMEL_INVALID_TYPE;
-
- if (camel_pop3_engine_type == CAMEL_INVALID_TYPE) {
- camel_pop3_engine_type = camel_type_register(camel_object_get_type(),
- "CamelPOP3Engine",
- sizeof( CamelPOP3Engine ),
- sizeof( CamelPOP3EngineClass ),
- (CamelObjectClassInitFunc) camel_pop3_engine_class_init,
- NULL,
- (CamelObjectInitFunc) camel_pop3_engine_init,
- (CamelObjectFinalizeFunc) camel_pop3_engine_finalise );
- }
-
- return camel_pop3_engine_type;
-}
-
-/**
- * camel_pop3_engine_new:
- * @source: source stream
- * @flags: engine flags
- *
- * Returns a NULL stream. A null stream is always at eof, and
- * always returns success for all reads and writes.
- *
- * Return value: the stream
- **/
-CamelPOP3Engine *
-camel_pop3_engine_new(CamelStream *source, guint32 flags)
-{
- CamelPOP3Engine *pe;
-
- pe = (CamelPOP3Engine *)camel_object_new(camel_pop3_engine_get_type ());
-
- pe->stream = (CamelPOP3Stream *)camel_pop3_stream_new(source);
- pe->state = CAMEL_POP3_ENGINE_AUTH;
- pe->flags = flags;
-
- get_capabilities(pe, TRUE);
-
- return pe;
-}
-
-
-/**
- * camel_pop3_engine_reget_capabilities:
- * @engine: pop3 engine
- *
- * Regets server capabilities (needed after a STLS command is issued for example).
- **/
-void
-camel_pop3_engine_reget_capabilities (CamelPOP3Engine *engine)
-{
- g_return_if_fail (CAMEL_IS_POP3_ENGINE (engine));
-
- get_capabilities (engine, FALSE);
-}
-
-
-/* TODO: read implementation too?
- etc? */
-struct {
- char *cap;
- guint32 flag;
-} capa[] = {
- { "APOP" , CAMEL_POP3_CAP_APOP },
- { "TOP" , CAMEL_POP3_CAP_TOP },
- { "UIDL", CAMEL_POP3_CAP_UIDL },
- { "PIPELINING", CAMEL_POP3_CAP_PIPE },
- { "STLS", CAMEL_POP3_CAP_STLS }, /* STARTTLS */
-};
-
-static void
-cmd_capa(CamelPOP3Engine *pe, CamelPOP3Stream *stream, void *data)
-{
- unsigned char *line, *tok, *next;
- unsigned int len;
- int ret;
- int i;
- CamelServiceAuthType *auth;
-
- dd(printf("cmd_capa\n"));
-
- do {
- ret = camel_pop3_stream_line(stream, &line, &len);
- if (ret >= 0) {
- if (strncmp(line, "SASL ", 5) == 0) {
- tok = line+5;
- dd(printf("scanning tokens '%s'\n", tok));
- while (tok) {
- next = strchr(tok, ' ');
- if (next)
- *next++ = 0;
- auth = camel_sasl_authtype(tok);
- if (auth) {
- dd(printf("got auth type '%s'\n", tok));
- pe->auth = g_list_prepend(pe->auth, auth);
- } else {
- dd(printf("unsupported auth type '%s'\n", tok));
- }
- tok = next;
- }
- } else {
- for (i=0;i<sizeof(capa)/sizeof(capa[0]);i++) {
- if (strcmp(capa[i].cap, line) == 0)
- pe->capa |= capa[i].flag;
- }
- }
- }
- } while (ret>0);
-}
-
-static void
-get_capabilities(CamelPOP3Engine *pe, int read_greeting)
-{
- CamelPOP3Command *pc;
- unsigned char *line, *apop, *apopend;
- unsigned int len;
- extern CamelServiceAuthType camel_pop3_password_authtype;
- extern CamelServiceAuthType camel_pop3_apop_authtype;
-
- if (read_greeting) {
- /* first, read the greeting */
- if (camel_pop3_stream_line(pe->stream, &line, &len) == -1
- || strncmp(line, "+OK", 3) != 0)
- return;
-
- if ((apop = strchr(line+3, '<'))
- && (apopend = strchr(apop, '>'))) {
- apopend[1] = 0;
- pe->apop = g_strdup(apop);
- pe->capa = CAMEL_POP3_CAP_APOP;
- pe->auth = g_list_append(pe->auth, &camel_pop3_apop_authtype);
- }
-
- pe->auth = g_list_prepend(pe->auth, &camel_pop3_password_authtype);
- }
-
- if (!(pe->flags & CAMEL_POP3_ENGINE_DISABLE_EXTENSIONS)) {
- pc = camel_pop3_engine_command_new(pe, CAMEL_POP3_COMMAND_MULTI, cmd_capa, NULL, "CAPA\r\n");
- while (camel_pop3_engine_iterate(pe, pc) > 0)
- ;
- camel_pop3_engine_command_free(pe, pc);
-
- if (pe->state == CAMEL_POP3_ENGINE_TRANSACTION && !(pe->capa & CAMEL_POP3_CAP_UIDL)) {
- /* check for UIDL support manually */
- pc = camel_pop3_engine_command_new (pe, CAMEL_POP3_COMMAND_SIMPLE, NULL, NULL, "UIDL 1\r\n");
- while (camel_pop3_engine_iterate (pe, pc) > 0)
- ;
-
- if (pc->state == CAMEL_POP3_COMMAND_OK)
- pe->capa |= CAMEL_POP3_CAP_UIDL;
-
- camel_pop3_engine_command_free (pe, pc);
- }
- }
-}
-
-/* returns true if the command was sent, false if it was just queued */
-static int
-engine_command_queue(CamelPOP3Engine *pe, CamelPOP3Command *pc)
-{
- if (((pe->capa & CAMEL_POP3_CAP_PIPE) == 0 || (pe->sentlen + strlen(pc->data)) > CAMEL_POP3_SEND_LIMIT)
- && pe->current != NULL) {
- e_dlist_addtail(&pe->queue, (EDListNode *)pc);
- return FALSE;
- } else {
- /* ??? */
- if (camel_stream_write((CamelStream *)pe->stream, pc->data, strlen(pc->data)) == -1) {
- e_dlist_addtail(&pe->queue, (EDListNode *)pc);
- return FALSE;
- }
-
- pe->sentlen += strlen(pc->data);
-
- pc->state = CAMEL_POP3_COMMAND_DISPATCHED;
-
- if (pe->current == NULL)
- pe->current = pc;
- else
- e_dlist_addtail(&pe->active, (EDListNode *)pc);
-
- return TRUE;
- }
-}
-
-/* returns -1 on error (sets errno), 0 when no work to do, or >0 if work remaining */
-int
-camel_pop3_engine_iterate(CamelPOP3Engine *pe, CamelPOP3Command *pcwait)
-{
- unsigned char *p;
- unsigned int len;
- CamelPOP3Command *pc, *pw, *pn;
-
- if (pcwait && pcwait->state >= CAMEL_POP3_COMMAND_OK)
- return 0;
-
- pc = pe->current;
- if (pc == NULL)
- return 0;
-
- /* LOCK */
-
- if (camel_pop3_stream_line(pe->stream, &pe->line, &pe->linelen) == -1)
- return -1;
-
- p = pe->line;
- switch (p[0]) {
- case '+':
- dd(printf("Got + response\n"));
- if (pc->flags & CAMEL_POP3_COMMAND_MULTI) {
- pc->state = CAMEL_POP3_COMMAND_DATA;
- camel_pop3_stream_set_mode(pe->stream, CAMEL_POP3_STREAM_DATA);
-
- if (pc->func)
- pc->func(pe, pe->stream, pc->func_data);
-
- /* Make sure we get all data before going back to command mode */
- while (camel_pop3_stream_getd(pe->stream, &p, &len) > 0)
- ;
- camel_pop3_stream_set_mode(pe->stream, CAMEL_POP3_STREAM_LINE);
- } else {
- pc->state = CAMEL_POP3_COMMAND_OK;
- }
- break;
- case '-':
- pc->state = CAMEL_POP3_COMMAND_ERR;
- break;
- default:
- /* what do we do now? f'knows! */
- g_warning("Bad server response: %s\n", p);
- pc->state = CAMEL_POP3_COMMAND_ERR;
- break;
- }
-
- e_dlist_addtail(&pe->done, (EDListNode *)pc);
- pe->sentlen -= strlen(pc->data);
-
- /* Set next command */
- pe->current = (CamelPOP3Command *)e_dlist_remhead(&pe->active);
-
- /* check the queue for sending any we can now send also */
- pw = (CamelPOP3Command *)pe->queue.head;
- pn = pw->next;
- while (pn) {
- if (((pe->capa & CAMEL_POP3_CAP_PIPE) == 0 || (pe->sentlen + strlen(pw->data)) > CAMEL_POP3_SEND_LIMIT)
- && pe->current != NULL)
- break;
-
- if (camel_stream_write((CamelStream *)pe->stream, pw->data, strlen(pw->data)) == -1)
- return -1;
-
- e_dlist_remove((EDListNode *)pw);
-
- pe->sentlen += strlen(pw->data);
- pw->state = CAMEL_POP3_COMMAND_DISPATCHED;
-
- if (pe->current == NULL)
- pe->current = pw;
- else
- e_dlist_addtail(&pe->active, (EDListNode *)pw);
-
- pw = pn;
- pn = pn->next;
- }
-
- /* UNLOCK */
-
- if (pcwait && pcwait->state >= CAMEL_POP3_COMMAND_OK)
- return 0;
-
- return pe->current==NULL?0:1;
-}
-
-CamelPOP3Command *
-camel_pop3_engine_command_new(CamelPOP3Engine *pe, guint32 flags, CamelPOP3CommandFunc func, void *data, const char *fmt, ...)
-{
- CamelPOP3Command *pc;
- va_list ap;
-
- pc = g_malloc0(sizeof(*pc));
- pc->func = func;
- pc->func_data = data;
- pc->flags = flags;
-
- va_start(ap, fmt);
- pc->data = g_strdup_vprintf(fmt, ap);
- pc->state = CAMEL_POP3_COMMAND_IDLE;
-
- /* TODO: what about write errors? */
- engine_command_queue(pe, pc);
-
- return pc;
-}
-
-void
-camel_pop3_engine_command_free(CamelPOP3Engine *pe, CamelPOP3Command *pc)
-{
- if (pe->current != pc)
- e_dlist_remove((EDListNode *)pc);
- g_free(pc->data);
- g_free(pc);
-}
diff --git a/camel/providers/pop3/camel-pop3-engine.h b/camel/providers/pop3/camel-pop3-engine.h
deleted file mode 100644
index 3114980311..0000000000
--- a/camel/providers/pop3/camel-pop3-engine.h
+++ /dev/null
@@ -1,134 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_ENGINE_H
-#define _CAMEL_POP3_ENGINE_H
-
-#include <camel/camel-object.h>
-#include "e-util/e-msgport.h"
-#include "camel-pop3-stream.h"
-
-#define CAMEL_POP3_ENGINE(obj) CAMEL_CHECK_CAST (obj, camel_pop3_engine_get_type (), CamelPOP3Engine)
-#define CAMEL_POP3_ENGINE_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_pop3_engine_get_type (), CamelPOP3EngineClass)
-#define CAMEL_IS_POP3_ENGINE(obj) CAMEL_CHECK_TYPE (obj, camel_pop3_engine_get_type ())
-
-typedef struct _CamelPOP3EngineClass CamelPOP3EngineClass;
-typedef struct _CamelPOP3Engine CamelPOP3Engine;
-typedef struct _CamelPOP3Command CamelPOP3Command;
-
-/* pop 3 connection states, actually since we're given a connected socket, we always start in auth state */
-typedef enum {
- CAMEL_POP3_ENGINE_DISCONNECT = 0,
- CAMEL_POP3_ENGINE_AUTH,
- CAMEL_POP3_ENGINE_TRANSACTION,
- CAMEL_POP3_ENGINE_UPDATE,
-} camel_pop3_engine_t;
-
-/* state of a command */
-typedef enum {
- CAMEL_POP3_COMMAND_IDLE = 0, /* command created or queued, not yet sent (e.g. non pipelined server) */
- CAMEL_POP3_COMMAND_DISPATCHED, /* command sent to server */
-
- /* completion codes */
- CAMEL_POP3_COMMAND_OK, /* plain ok response */
- CAMEL_POP3_COMMAND_DATA, /* processing command response */
- CAMEL_POP3_COMMAND_ERR, /* error response */
-} camel_pop3_command_t;
-
-/* flags for command types */
-enum {
- CAMEL_POP3_COMMAND_SIMPLE = 0, /* dont expect multiline response */
- CAMEL_POP3_COMMAND_MULTI = 1, /* expect multiline response */
-};
-
-/* flags for server options */
-enum {
- CAMEL_POP3_CAP_APOP = 1<<0,
- CAMEL_POP3_CAP_UIDL = 1<<1,
- CAMEL_POP3_CAP_SASL = 1<<2,
- CAMEL_POP3_CAP_TOP = 1<<3,
- CAMEL_POP3_CAP_PIPE = 1<<4,
- CAMEL_POP3_CAP_STLS = 1<<5
-};
-
-/* enable/disable flags for the engine itself */
-enum {
- CAMEL_POP3_ENGINE_DISABLE_EXTENSIONS = 1<<0,
-};
-
-typedef void (*CamelPOP3CommandFunc)(CamelPOP3Engine *pe, CamelPOP3Stream *stream, void *data);
-
-struct _CamelPOP3Command {
- struct _CamelPOP3Command *next;
- struct _CamelPOP3Command *prev;
-
- guint32 flags;
- camel_pop3_command_t state;
-
- CamelPOP3CommandFunc func;
- void *func_data;
-
- int data_size;
- char *data;
-};
-
-struct _CamelPOP3Engine {
- CamelObject parent;
-
- guint32 flags;
-
- camel_pop3_engine_t state;
-
- GList *auth; /* authtypes supported */
-
- guint32 capa; /* capabilities */
- char *apop; /* apop time string */
-
- unsigned char *line; /* current line buffer */
- unsigned int linelen;
-
- struct _CamelPOP3Stream *stream;
-
- unsigned int sentlen; /* data sent (so we dont overflow network buffer) */
-
- EDList active; /* active commands */
- EDList queue; /* queue of waiting commands */
- EDList done; /* list of done commands, awaiting free */
-
- CamelPOP3Command *current; /* currently busy (downloading) response */
-};
-
-struct _CamelPOP3EngineClass {
- CamelObjectClass parent_class;
-};
-
-CamelType camel_pop3_engine_get_type (void);
-
-CamelPOP3Engine *camel_pop3_engine_new (CamelStream *source, guint32 flags);
-
-void camel_pop3_engine_reget_capabilities (CamelPOP3Engine *engine);
-
-void camel_pop3_engine_command_free(CamelPOP3Engine *pe, CamelPOP3Command *pc);
-
-int camel_pop3_engine_iterate (CamelPOP3Engine *pe, CamelPOP3Command *pc);
-
-CamelPOP3Command *camel_pop3_engine_command_new (CamelPOP3Engine *pe, guint32 flags, CamelPOP3CommandFunc func, void *data, const char *fmt, ...);
-
-#endif /* ! _CAMEL_POP3_ENGINE_H */
diff --git a/camel/providers/pop3/camel-pop3-folder.c b/camel/providers/pop3/camel-pop3-folder.c
deleted file mode 100644
index db77ad8191..0000000000
--- a/camel/providers/pop3/camel-pop3-folder.c
+++ /dev/null
@@ -1,558 +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>
- * Michael Zucchi <notzed@ximian.com>
- *
- * Copyright (C) 2002 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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-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 "camel-data-cache.h"
-
-#include <e-util/md5-utils.h>
-
-#include <stdlib.h>
-#include <string.h>
-
-#define d(x)
-
-#define CF_CLASS(o) (CAMEL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(o)))
-static CamelFolderClass *parent_class;
-
-static void pop3_finalize (CamelObject *object);
-static void pop3_refresh_info (CamelFolder *folder, CamelException *ex);
-static void pop3_sync (CamelFolder *folder, gboolean expunge, CamelException *ex);
-static gint pop3_get_message_count (CamelFolder *folder);
-static GPtrArray *pop3_get_uids (CamelFolder *folder);
-static CamelMimeMessage *pop3_get_message (CamelFolder *folder, const char *uid, CamelException *ex);
-static void pop3_set_message_flags (CamelFolder *folder, const char *uid, guint32 flags, guint32 set);
-
-static 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_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_shallow;
-
- camel_folder_class->get_message = pop3_get_message;
- camel_folder_class->set_message_flags = pop3_set_message_flags;
-}
-
-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,
- NULL,
- (CamelObjectFinalizeFunc) pop3_finalize);
- }
-
- return camel_pop3_folder_type;
-}
-
-static void
-pop3_finalize (CamelObject *object)
-{
- CamelPOP3Folder *pop3_folder = CAMEL_POP3_FOLDER (object);
- CamelPOP3FolderInfo **fi = (CamelPOP3FolderInfo **)pop3_folder->uids->pdata;
- CamelPOP3Store *pop3_store = (CamelPOP3Store *)((CamelFolder *)pop3_folder)->parent_store;
- int i;
-
- if (pop3_folder->uids) {
- for (i=0;i<pop3_folder->uids->len;i++,fi++) {
- if (fi[0]->cmd) {
- while (camel_pop3_engine_iterate(pop3_store->engine, fi[0]->cmd) > 0)
- ;
- camel_pop3_engine_command_free(pop3_store->engine, fi[0]->cmd);
- }
-
- g_free(fi[0]->uid);
- g_free(fi[0]);
- }
-
- g_ptr_array_free(pop3_folder->uids, TRUE);
- g_hash_table_destroy(pop3_folder->uids_uid);
- }
-}
-
-CamelFolder *
-camel_pop3_folder_new (CamelStore *parent, CamelException *ex)
-{
- CamelFolder *folder;
-
- d(printf("opening pop3 INBOX folder\n"));
-
- 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;
-}
-
-/* create a uid from md5 of 'top' output */
-static void
-cmd_builduid(CamelPOP3Engine *pe, CamelPOP3Stream *stream, void *data)
-{
- CamelPOP3FolderInfo *fi = data;
- MD5Context md5;
- unsigned char digest[16];
- struct _camel_header_raw *h;
- CamelMimeParser *mp;
-
- /* TODO; somehow work out the limit and use that for proper progress reporting
- We need a pointer to the folder perhaps? */
- camel_operation_progress_count(NULL, fi->id);
-
- md5_init(&md5);
- mp = camel_mime_parser_new();
- camel_mime_parser_init_with_stream(mp, (CamelStream *)stream);
- switch (camel_mime_parser_step(mp, NULL, NULL)) {
- case CAMEL_MIME_PARSER_STATE_HEADER:
- case CAMEL_MIME_PARSER_STATE_MESSAGE:
- case CAMEL_MIME_PARSER_STATE_MULTIPART:
- h = camel_mime_parser_headers_raw(mp);
- while (h) {
- if (strcasecmp(h->name, "status") != 0
- && strcasecmp(h->name, "x-status") != 0) {
- md5_update(&md5, h->name, strlen(h->name));
- md5_update(&md5, h->value, strlen(h->value));
- }
- h = h->next;
- }
- default:
- break;
- }
- camel_object_unref(mp);
- md5_final(&md5, digest);
- fi->uid = camel_base64_encode_simple(digest, 16);
-
- d(printf("building uid for id '%d' = '%s'\n", fi->id, fi->uid));
-}
-
-static void
-cmd_list(CamelPOP3Engine *pe, CamelPOP3Stream *stream, void *data)
-{
- int ret;
- unsigned int len, id, size;
- unsigned char *line;
- CamelFolder *folder = data;
- CamelPOP3Store *pop3_store = CAMEL_POP3_STORE (folder->parent_store);
- CamelPOP3FolderInfo *fi;
-
- do {
- ret = camel_pop3_stream_line(stream, &line, &len);
- if (ret>=0) {
- if (sscanf(line, "%u %u", &id, &size) == 2) {
- fi = g_malloc0(sizeof(*fi));
- fi->size = size;
- fi->id = id;
- fi->index = ((CamelPOP3Folder *)folder)->uids->len;
- if ((pop3_store->engine->capa & CAMEL_POP3_CAP_UIDL) == 0)
- fi->cmd = camel_pop3_engine_command_new(pe, CAMEL_POP3_COMMAND_MULTI, cmd_builduid, fi, "TOP %u 0\r\n", id);
- g_ptr_array_add(((CamelPOP3Folder *)folder)->uids, fi);
- g_hash_table_insert(((CamelPOP3Folder *)folder)->uids_id, GINT_TO_POINTER(id), fi);
- }
- }
- } while (ret>0);
-}
-
-static void
-cmd_uidl(CamelPOP3Engine *pe, CamelPOP3Stream *stream, void *data)
-{
- int ret;
- unsigned int len;
- unsigned char *line;
- char uid[1025];
- unsigned int id;
- CamelPOP3FolderInfo *fi;
- CamelPOP3Folder *folder = data;
-
- do {
- ret = camel_pop3_stream_line(stream, &line, &len);
- if (ret>=0) {
- if (strlen(line) > 1024)
- line[1024] = 0;
- if (sscanf(line, "%u %s", &id, uid) == 2) {
- fi = g_hash_table_lookup(folder->uids_id, GINT_TO_POINTER(id));
- if (fi) {
- camel_operation_progress(NULL, (fi->index+1) * 100 / folder->uids->len);
- fi->uid = g_strdup(uid);
- g_hash_table_insert(folder->uids_uid, fi->uid, fi);
- } else {
- g_warning("ID %u (uid: %s) not in previous LIST output", id, uid);
- }
- }
- }
- } while (ret>0);
-}
-
-static void
-pop3_refresh_info (CamelFolder *folder, CamelException *ex)
-{
- CamelPOP3Store *pop3_store = CAMEL_POP3_STORE (folder->parent_store);
- CamelPOP3Folder *pop3_folder = (CamelPOP3Folder *) folder;
- CamelPOP3Command *pcl, *pcu = NULL;
- int i;
-
- camel_operation_start (NULL, _("Retrieving POP summary"));
-
- pop3_folder->uids = g_ptr_array_new ();
- pop3_folder->uids_uid = g_hash_table_new(g_str_hash, g_str_equal);
- /* only used during setup */
- pop3_folder->uids_id = g_hash_table_new(NULL, NULL);
-
- pcl = camel_pop3_engine_command_new(pop3_store->engine, CAMEL_POP3_COMMAND_MULTI, cmd_list, folder, "LIST\r\n");
- if (pop3_store->engine->capa & CAMEL_POP3_CAP_UIDL) {
- pcu = camel_pop3_engine_command_new(pop3_store->engine, CAMEL_POP3_COMMAND_MULTI, cmd_uidl, folder, "UIDL\r\n");
- }
- while ((i = camel_pop3_engine_iterate(pop3_store->engine, NULL)) > 0)
- ;
-
- if (i == -1) {
- if (errno == EINTR)
- camel_exception_setv(ex, CAMEL_EXCEPTION_USER_CANCEL, _("User cancelled"));
- else
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot get POP summary: %s"),
- g_strerror (errno));
- }
-
- /* TODO: check every id has a uid & commands returned OK too? */
-
- camel_pop3_engine_command_free(pop3_store->engine, pcl);
-
- if (pop3_store->engine->capa & CAMEL_POP3_CAP_UIDL) {
- camel_pop3_engine_command_free(pop3_store->engine, pcu);
- } else {
- for (i=0;i<pop3_folder->uids->len;i++) {
- CamelPOP3FolderInfo *fi = pop3_folder->uids->pdata[i];
- if (fi->cmd) {
- camel_pop3_engine_command_free(pop3_store->engine, fi->cmd);
- fi->cmd = NULL;
- }
- if (fi->uid)
- g_hash_table_insert(pop3_folder->uids_uid, fi->uid, fi);
- }
- }
-
- /* dont need this anymore */
- g_hash_table_destroy(pop3_folder->uids_id);
-
- camel_operation_end (NULL);
- return;
-}
-
-static void
-pop3_sync (CamelFolder *folder, gboolean expunge, CamelException *ex)
-{
- CamelPOP3Folder *pop3_folder;
- CamelPOP3Store *pop3_store;
- int i;
- CamelPOP3FolderInfo *fi;
-
- 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++) {
- fi = pop3_folder->uids->pdata[i];
- /* busy already? wait for that to finish first */
- if (fi->cmd) {
- while (camel_pop3_engine_iterate(pop3_store->engine, fi->cmd) > 0)
- ;
- camel_pop3_engine_command_free(pop3_store->engine, fi->cmd);
- fi->cmd = NULL;
- }
-
- if (fi->flags & CAMEL_MESSAGE_DELETED) {
- fi->cmd = camel_pop3_engine_command_new(pop3_store->engine, 0, NULL, NULL, "DELE %u\r\n", fi->id);
-
- /* also remove from cache */
- if (pop3_store->cache && fi->uid)
- camel_data_cache_remove(pop3_store->cache, "cache", fi->uid, NULL);
- }
- }
-
- for (i = 0; i < pop3_folder->uids->len; i++) {
- fi = pop3_folder->uids->pdata[i];
- /* wait for delete commands to finish */
- if (fi->cmd) {
- while (camel_pop3_engine_iterate(pop3_store->engine, fi->cmd) > 0)
- ;
- camel_pop3_engine_command_free(pop3_store->engine, fi->cmd);
- fi->cmd = NULL;
- }
- camel_operation_progress(NULL, (i+1) * 100 / pop3_folder->uids->len);
- }
-
- camel_operation_end(NULL);
-
- camel_pop3_store_expunge (pop3_store, ex);
-}
-
-static void
-cmd_tocache(CamelPOP3Engine *pe, CamelPOP3Stream *stream, void *data)
-{
- CamelPOP3FolderInfo *fi = data;
- char buffer[2048];
- int w = 0, n;
-
- /* What if it fails? */
-
- /* We write an '*' to the start of the stream to say its not complete yet */
- /* This should probably be part of the cache code */
- if ((n = camel_stream_write(fi->stream, "*", 1)) == -1)
- goto done;
-
- while ((n = camel_stream_read((CamelStream *)stream, buffer, sizeof(buffer))) > 0) {
- n = camel_stream_write(fi->stream, buffer, n);
- if (n == -1)
- break;
-
- w += n;
- if (w > fi->size)
- w = fi->size;
- if (fi->size != 0)
- camel_operation_progress(NULL, (w * 100) / fi->size);
- }
-
- /* it all worked, output a '#' to say we're a-ok */
- if (n != -1) {
- camel_stream_reset(fi->stream);
- n = camel_stream_write(fi->stream, "#", 1);
- }
-done:
- if (n == -1) {
- fi->err = errno;
- g_warning("POP3 retrieval failed: %s", strerror(errno));
- } else {
- fi->err = 0;
- }
-
- camel_object_unref((CamelObject *)fi->stream);
- fi->stream = NULL;
-}
-
-static CamelMimeMessage *
-pop3_get_message (CamelFolder *folder, const char *uid, CamelException *ex)
-{
- CamelMimeMessage *message = NULL;
- CamelPOP3Store *pop3_store = CAMEL_POP3_STORE (folder->parent_store);
- CamelPOP3Folder *pop3_folder = (CamelPOP3Folder *)folder;
- CamelPOP3Command *pcr;
- CamelPOP3FolderInfo *fi;
- char buffer[1];
- int ok, i, last;
- CamelStream *stream = NULL;
-
- fi = g_hash_table_lookup(pop3_folder->uids_uid, uid);
- if (fi == NULL) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID,
- _("No message with uid %s"), uid);
- return NULL;
- }
-
- /* Sigh, most of the crap in this function is so that the cancel button
- returns the proper exception code. Sigh. */
-
- camel_operation_start_transient(NULL, _("Retrieving POP message %d"), fi->id);
-
- /* If we have an oustanding retrieve message running, wait for that to complete
- & then retrieve from cache, otherwise, start a new one, and similar */
-
- if (fi->cmd != NULL) {
- while ((i = camel_pop3_engine_iterate(pop3_store->engine, fi->cmd)) > 0)
- ;
-
- if (i == -1)
- fi->err = errno;
-
- /* getting error code? */
- ok = fi->cmd->state == CAMEL_POP3_COMMAND_DATA;
- camel_pop3_engine_command_free(pop3_store->engine, fi->cmd);
- fi->cmd = NULL;
-
- if (fi->err != 0) {
- if (fi->err == EINTR)
- camel_exception_setv(ex, CAMEL_EXCEPTION_USER_CANCEL, _("User cancelled"));
- else
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot get message %s: %s"),
- uid, g_strerror (fi->err));
- goto fail;
- }
- }
-
- /* check to see if we have safely written flag set */
- if (pop3_store->cache == NULL
- || (stream = camel_data_cache_get(pop3_store->cache, "cache", fi->uid, NULL)) == NULL
- || camel_stream_read(stream, buffer, 1) != 1
- || buffer[0] != '#') {
-
- /* Initiate retrieval, if disk backing fails, use a memory backing */
- if (pop3_store->cache == NULL
- || (stream = camel_data_cache_add(pop3_store->cache, "cache", fi->uid, NULL)) == NULL)
- stream = camel_stream_mem_new();
-
- /* ref it, the cache storage routine unref's when done */
- camel_object_ref((CamelObject *)stream);
- fi->stream = stream;
- fi->err = EIO;
- pcr = camel_pop3_engine_command_new(pop3_store->engine, CAMEL_POP3_COMMAND_MULTI, cmd_tocache, fi, "RETR %u\r\n", fi->id);
-
- /* Also initiate retrieval of some of the following messages, assume we'll be receiving them */
- if (pop3_store->cache != NULL) {
- /* This should keep track of the last one retrieved, also how many are still
- oustanding incase of random access on large folders */
- i = fi->index+1;
- last = MIN(i+10, pop3_folder->uids->len);
- for (;i<last;i++) {
- CamelPOP3FolderInfo *pfi = pop3_folder->uids->pdata[i];
-
- if (pfi->uid && pfi->cmd == NULL) {
- pfi->stream = camel_data_cache_add(pop3_store->cache, "cache", pfi->uid, NULL);
- if (pfi->stream) {
- pfi->err = EIO;
- pfi->cmd = camel_pop3_engine_command_new(pop3_store->engine, CAMEL_POP3_COMMAND_MULTI,
- cmd_tocache, pfi, "RETR %u\r\n", pfi->id);
- }
- }
- }
- }
-
- /* now wait for the first one to finish */
- while ((i = camel_pop3_engine_iterate(pop3_store->engine, pcr)) > 0)
- ;
-
- if (i == -1)
- fi->err = errno;
-
- /* getting error code? */
- ok = pcr->state == CAMEL_POP3_COMMAND_DATA;
- camel_pop3_engine_command_free(pop3_store->engine, pcr);
- camel_stream_reset(stream);
-
- /* Check to see we have safely written flag set */
- if (fi->err != 0) {
- if (fi->err == EINTR)
- camel_exception_setv(ex, CAMEL_EXCEPTION_USER_CANCEL, _("User cancelled"));
- else
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot get message %s: %s"),
- uid, g_strerror (fi->err));
- goto done;
- }
-
- if (camel_stream_read(stream, buffer, 1) != 1 || buffer[0] != '#') {
- camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID,
- _("Cannot get message %s: %s"), uid, _("Unknown reason"));
- goto done;
- }
- }
-
- message = camel_mime_message_new ();
- if (camel_data_wrapper_construct_from_stream((CamelDataWrapper *)message, stream) == -1) {
- if (errno == EINTR)
- camel_exception_setv(ex, CAMEL_EXCEPTION_USER_CANCEL, _("User cancelled"));
- else
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot get message %s: %s"),
- uid, g_strerror (errno));
- camel_object_unref((CamelObject *)message);
- message = NULL;
- }
-done:
- camel_object_unref((CamelObject *)stream);
-fail:
- camel_operation_end(NULL);
-
- return message;
-}
-
-static void
-pop3_set_message_flags (CamelFolder *folder, const char *uid, guint32 flags, guint32 set)
-{
- CamelPOP3Folder *pop3_folder = CAMEL_POP3_FOLDER (folder);
- CamelPOP3FolderInfo *fi;
-
- fi = g_hash_table_lookup(pop3_folder->uids_uid, uid);
- if (fi)
- fi->flags = (fi->flags & ~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);
- GPtrArray *uids = g_ptr_array_new();
- CamelPOP3FolderInfo **fi = (CamelPOP3FolderInfo **)pop3_folder->uids->pdata;
- int i;
-
- for (i=0;i<pop3_folder->uids->len;i++,fi++) {
- if (fi[0]->uid)
- g_ptr_array_add(uids, fi[0]->uid);
- }
-
- return uids;
-}
diff --git a/camel/providers/pop3/camel-pop3-folder.h b/camel/providers/pop3/camel-pop3-folder.h
deleted file mode 100644
index 7dab07124c..0000000000
--- a/camel/providers/pop3/camel-pop3-folder.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-pop3-folder.h : Class for a POP3 folder */
-
-/*
- * Authors:
- * Dan Winship <danw@ximian.com>
- * Michael Zucchi <notzed@ximian.com>
- *
- * Copyright (C) 2002 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 {
- guint32 id;
- guint32 size;
- guint32 flags;
- guint32 index; /* index of request */
- char *uid;
- int err;
- struct _CamelPOP3Command *cmd;
- struct _CamelStream *stream;
-} CamelPOP3FolderInfo;
-
-typedef struct {
- CamelFolder parent_object;
-
- GPtrArray *uids;
- GHashTable *uids_uid; /* messageinfo by uid */
- GHashTable *uids_id; /* messageinfo by id */
-} 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 1354470e69..0000000000
--- a/camel/providers/pop3/camel-pop3-provider.c
+++ /dev/null
@@ -1,108 +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>
- * Michael Zucchi <notzed@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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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"
-#include "camel-sasl.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_CHECKBOX, "disable_extensions", NULL,
- N_("Disable support for all POP3 extensions"), "0" },
- { 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
-};
-
-void
-camel_provider_module_init (CamelSession *session)
-{
- CamelServiceAuthType *auth;
-
- pop3_provider.object_types[CAMEL_PROVIDER_STORE] = camel_pop3_store_get_type();
- pop3_provider.url_hash = camel_url_hash;
- pop3_provider.url_equal = camel_url_equal;
-
- pop3_provider.authtypes = camel_sasl_authtype_list (FALSE);
- auth = camel_sasl_authtype("LOGIN");
- if (auth)
- pop3_provider.authtypes = g_list_prepend(pop3_provider.authtypes, auth);
- 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 fbdae86833..0000000000
--- a/camel/providers/pop3/camel-pop3-store.c
+++ /dev/null
@@ -1,657 +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>
- * Michael Zucchi <notzed@ximian.com>
- *
- * Copyright (C) 2000-2002 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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"
-
-#include "camel-pop3-store.h"
-#include "camel-pop3-folder.h"
-#include "camel-stream-buffer.h"
-#include "camel-session.h"
-#include "camel-exception.h"
-#include "camel-url.h"
-#include "e-util/md5-utils.h"
-#include "camel-pop3-engine.h"
-#include "camel-sasl.h"
-#include "camel-data-cache.h"
-#include "camel-tcp-stream.h"
-#include "camel-tcp-stream-raw.h"
-#ifdef HAVE_SSL
-#include "camel-tcp-stream-ssl.h"
-#endif
-
-/* Specified in RFC 1939 */
-#define POP3_PORT 110
-
-static CamelStoreClass *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 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_STORE_CLASS (camel_type_get_global_classfuncs (camel_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)
-{
- ;
-}
-
-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_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);
-
- /* force disconnect so we dont have it run later, after we've cleaned up some stuff */
- /* SIGH */
-
- camel_service_disconnect((CamelService *)pop3_store, TRUE, NULL);
-
- if (pop3_store->engine)
- camel_object_unref((CamelObject *)pop3_store->engine);
- if (pop3_store->cache)
- camel_object_unref((CamelObject *)pop3_store->cache);
-}
-
-enum {
- USE_SSL_NEVER,
- USE_SSL_ALWAYS,
- USE_SSL_WHEN_POSSIBLE
-};
-
-#define SSL_PORT_FLAGS (CAMEL_TCP_STREAM_SSL_ENABLE_SSL2 | CAMEL_TCP_STREAM_SSL_ENABLE_SSL3)
-#define STARTTLS_FLAGS (CAMEL_TCP_STREAM_SSL_ENABLE_TLS)
-
-static gboolean
-connect_to_server (CamelService *service, int ssl_mode, int try_starttls, CamelException *ex)
-{
- CamelPOP3Store *store = CAMEL_POP3_STORE (service);
- CamelStream *tcp_stream;
- CamelPOP3Command *pc;
- struct hostent *h;
- guint32 flags = 0;
- int clean_quit;
- int ret, port;
-
- h = camel_service_gethost (service, ex);
- if (!h)
- return FALSE;
-
- port = service->url->port ? service->url->port : 110;
-
- if (ssl_mode != USE_SSL_NEVER) {
-#ifdef HAVE_SSL
- if (try_starttls) {
- tcp_stream = camel_tcp_stream_ssl_new_raw (service->session, service->url->host, STARTTLS_FLAGS);
- } else {
- port = service->url->port ? service->url->port : 995;
- tcp_stream = camel_tcp_stream_ssl_new (service->session, service->url->host, SSL_PORT_FLAGS);
- }
-#else
- if (!try_starttls)
- port = service->url->port ? service->url->port : 995;
-
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("Could not connect to %s (port %d): %s"),
- service->url->host, port,
- _("SSL unavailable"));
-
- camel_free_host (h);
-
- return FALSE;
-#endif /* HAVE_SSL */
- } else {
- tcp_stream = camel_tcp_stream_raw_new ();
- }
-
- 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 POP server %s (port %d): %s"),
- service->url->host, port, g_strerror (errno));
-
- camel_object_unref (CAMEL_OBJECT (tcp_stream));
-
- return FALSE;
- }
-
- /* parent class connect initialization */
- if (CAMEL_SERVICE_CLASS (parent_class)->connect (service, ex) == FALSE) {
- camel_object_unref (CAMEL_OBJECT (tcp_stream));
- return FALSE;
- }
-
- if (camel_url_get_param (service->url, "disable_extensions"))
- flags |= CAMEL_POP3_ENGINE_DISABLE_EXTENSIONS;
-
- store->engine = camel_pop3_engine_new (tcp_stream, flags);
-
-#ifdef HAVE_SSL
- if (store->engine) {
- if (ssl_mode == USE_SSL_WHEN_POSSIBLE) {
- if (store->engine->capa & CAMEL_POP3_CAP_STLS)
- goto starttls;
- } else if (ssl_mode == USE_SSL_ALWAYS) {
- if (try_starttls) {
- if (store->engine->capa & CAMEL_POP3_CAP_STLS) {
- /* attempt to toggle STARTTLS mode */
- goto starttls;
- } else {
- /* server doesn't support STARTTLS, abort */
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to connect to POP server %s in secure mode: %s"),
- service->url->host, _("SSL/TLS extension not supported."));
- /* we have the possibility of quitting cleanly here */
- clean_quit = TRUE;
- goto stls_exception;
- }
- }
- }
- }
-#endif /* HAVE_SSL */
-
- camel_object_unref (CAMEL_OBJECT (tcp_stream));
-
- return store->engine != NULL;
-
-#ifdef HAVE_SSL
- starttls:
- /* as soon as we send a STLS command, all hope is lost of a clean QUIT if problems arise */
- clean_quit = FALSE;
-
- pc = camel_pop3_engine_command_new (store->engine, 0, NULL, NULL, "STLS\r\n");
- while (camel_pop3_engine_iterate (store->engine, NULL) > 0)
- ;
-
- ret = pc->state == CAMEL_POP3_COMMAND_OK;
- camel_pop3_engine_command_free (store->engine, pc);
-
- if (ret == FALSE) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to connect to POP server %s in secure mode: %s"),
- service->url->host, store->engine->line);
- goto stls_exception;
- }
-
- /* Okay, now toggle SSL/TLS mode */
- ret = camel_tcp_stream_ssl_enable_ssl (CAMEL_TCP_STREAM_SSL (tcp_stream));
-
- camel_object_unref (CAMEL_OBJECT (tcp_stream));
-
- if (ret == -1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to connect to POP server %s in secure mode: %s"),
- service->url->host, _("SSL negotiations failed"));
- goto stls_exception;
- }
-
- /* rfc2595, section 4 states that after a successful STLS
- command, the client MUST discard prior CAPA responses */
- camel_pop3_engine_reget_capabilities (store->engine);
-
- return TRUE;
-
- stls_exception:
- if (clean_quit) {
- /* try to disconnect cleanly */
- pc = camel_pop3_engine_command_new (store->engine, 0, NULL, NULL, "QUIT\r\n");
- while (camel_pop3_engine_iterate (store->engine, NULL) > 0)
- ;
- camel_pop3_engine_command_free (store->engine, pc);
- }
-
- camel_object_unref (CAMEL_OBJECT (store->engine));
- camel_object_unref (CAMEL_OBJECT (tcp_stream));
- store->engine = NULL;
-
- return FALSE;
-#endif /* HAVE_SSL */
-}
-
-static struct {
- char *value;
- int mode;
-} ssl_options[] = {
- { "", USE_SSL_ALWAYS },
- { "always", USE_SSL_ALWAYS },
- { "when-possible", USE_SSL_WHEN_POSSIBLE },
- { "never", USE_SSL_NEVER },
- { NULL, USE_SSL_NEVER },
-};
-
-static gboolean
-connect_to_server_wrapper (CamelService *service, CamelException *ex)
-{
-#ifdef HAVE_SSL
- const char *use_ssl;
- int i, ssl_mode;
-
- use_ssl = camel_url_get_param (service->url, "use_ssl");
- if (use_ssl) {
- for (i = 0; ssl_options[i].value; i++)
- if (!strcmp (ssl_options[i].value, use_ssl))
- break;
- ssl_mode = ssl_options[i].mode;
- } else
- ssl_mode = USE_SSL_NEVER;
-
- if (ssl_mode == USE_SSL_ALWAYS) {
- /* First try the ssl port */
- if (!connect_to_server (service, ssl_mode, FALSE, ex)) {
- if (camel_exception_get_id (ex) == CAMEL_EXCEPTION_SERVICE_UNAVAILABLE) {
- /* The ssl port seems to be unavailable, lets try STARTTLS */
- camel_exception_clear (ex);
- return connect_to_server (service, ssl_mode, TRUE, ex);
- } else {
- return FALSE;
- }
- }
-
- return TRUE;
- } else if (ssl_mode == USE_SSL_WHEN_POSSIBLE) {
- /* If the server supports STARTTLS, use it */
- return connect_to_server (service, ssl_mode, TRUE, ex);
- } else {
- /* User doesn't care about SSL */
- return connect_to_server (service, ssl_mode, FALSE, ex);
- }
-#else
- return connect_to_server (service, USE_SSL_NEVER, FALSE, ex);
-#endif
-}
-
-extern CamelServiceAuthType camel_pop3_password_authtype;
-extern CamelServiceAuthType camel_pop3_apop_authtype;
-
-static GList *
-query_auth_types (CamelService *service, CamelException *ex)
-{
- CamelPOP3Store *store = CAMEL_POP3_STORE (service);
- GList *types = NULL;
-
- types = CAMEL_SERVICE_CLASS (parent_class)->query_auth_types (service, ex);
- if (camel_exception_is_set (ex))
- return NULL;
-
- if (connect_to_server_wrapper (service, NULL)) {
- types = g_list_concat(types, g_list_copy(store->engine->auth));
- pop3_disconnect (service, TRUE, NULL);
- } else {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("Could not connect to POP server %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)
-{
- CamelPOP3Command *pc;
-
- pc = camel_pop3_engine_command_new(store->engine, 0, NULL, NULL, "QUIT\r\n");
- while (camel_pop3_engine_iterate(store->engine, NULL) > 0)
- ;
- camel_pop3_engine_command_free(store->engine, pc);
-
- camel_service_disconnect (CAMEL_SERVICE (store), FALSE, ex);
-}
-
-static int
-try_sasl(CamelPOP3Store *store, const char *mech, CamelException *ex)
-{
- CamelPOP3Stream *stream = store->engine->stream;
- unsigned char *line, *resp;
- CamelSasl *sasl;
- unsigned int len;
- int ret;
-
- sasl = camel_sasl_new("pop3", mech, (CamelService *)store);
- if (sasl == NULL) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_URL_INVALID,
- _("Unable to connect to POP server %s: "
- "No support for requested authentication mechanism."),
- CAMEL_SERVICE (store)->url->host);
- return -1;
- }
-
- if (camel_stream_printf((CamelStream *)stream, "AUTH %s\r\n", mech) == -1)
- goto ioerror;
-
- while (1) {
- if (camel_pop3_stream_line(stream, &line, &len) == -1)
- goto ioerror;
- if (strncmp(line, "+OK", 3) == 0)
- break;
- if (strncmp(line, "-ERR", 4) == 0) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
- _("SASL `%s' Login failed for POP server %s: %s"),
- mech, CAMEL_SERVICE (store)->url->host, line);
- goto done;
- }
- /* If we dont get continuation, or the sasl object's run out of work, or we dont get a challenge,
- its a protocol error, so fail, and try reset the server */
- if (strncmp(line, "+ ", 2) != 0
- || camel_sasl_authenticated(sasl)
- || (resp = camel_sasl_challenge_base64(sasl, line+2, ex)) == NULL) {
- camel_stream_printf((CamelStream *)stream, "*\r\n");
- camel_pop3_stream_line(stream, &line, &len);
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
- _("Cannot login to POP server %s: SASL Protocol error"),
- CAMEL_SERVICE (store)->url->host);
- goto done;
- }
-
- ret = camel_stream_printf((CamelStream *)stream, "%s\r\n", resp);
- g_free(resp);
- if (ret == -1)
- goto ioerror;
-
- }
- camel_object_unref((CamelObject *)sasl);
- return 0;
-
- ioerror:
- if (errno == EINTR) {
- camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL, _("Cancelled"));
- } else {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to authenticate on POP server %s: %s"),
- CAMEL_SERVICE (store)->url->host, g_strerror (errno));
- }
- done:
- camel_object_unref((CamelObject *)sasl);
- return -1;
-}
-
-static int
-pop3_try_authenticate (CamelService *service, gboolean reprompt, const char *errmsg, CamelException *ex)
-{
- CamelPOP3Store *store = (CamelPOP3Store *)service;
- CamelPOP3Command *pcu = NULL, *pcp = NULL;
- int status;
-
- /* override, testing only */
- /*printf("Forcing authmech to 'login'\n");
- service->url->authmech = g_strdup("LOGIN");*/
-
- if (!service->url->passwd) {
- char *prompt;
-
- prompt = g_strdup_printf (_("%sPlease enter the POP 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, reprompt, TRUE, service, "password", ex);
- g_free (prompt);
- if (!service->url->passwd)
- return FALSE;
- }
-
- if (!service->url->authmech) {
- /* pop engine will take care of pipelining ability */
- pcu = camel_pop3_engine_command_new(store->engine, 0, NULL, NULL, "USER %s\r\n", service->url->user);
- pcp = camel_pop3_engine_command_new(store->engine, 0, NULL, NULL, "PASS %s\r\n", service->url->passwd);
- } else if (strcmp(service->url->authmech, "+APOP") == 0 && store->engine->apop) {
- char *secret, md5asc[33], *d;
- unsigned char md5sum[16], *s;
-
- secret = g_alloca(strlen(store->engine->apop)+strlen(service->url->passwd)+1);
- sprintf(secret, "%s%s", store->engine->apop, service->url->passwd);
- md5_get_digest(secret, strlen (secret), md5sum);
-
- for (s = md5sum, d = md5asc; d < md5asc + 32; s++, d += 2)
- sprintf (d, "%.2x", *s);
-
- pcp = camel_pop3_engine_command_new(store->engine, 0, NULL, NULL, "APOP %s %s\r\n",
- service->url->user, md5asc);
- } else {
- CamelServiceAuthType *auth;
- GList *l;
-
- l = store->engine->auth;
- while (l) {
- auth = l->data;
- if (strcmp(auth->authproto, service->url->authmech) == 0)
- return try_sasl(store, service->url->authmech, ex) == -1;
- l = l->next;
- }
-
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_URL_INVALID,
- _("Unable to connect to POP server %s: "
- "No support for requested authentication mechanism."),
- CAMEL_SERVICE (store)->url->host);
- return FALSE;
- }
-
- while ((status = camel_pop3_engine_iterate(store->engine, pcp)) > 0)
- ;
-
- if (status == -1) {
- if (errno == EINTR) {
- camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL, _("Cancelled"));
- } else {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Unable to connect to POP server %s.\n"
- "Error sending password: %s"),
- CAMEL_SERVICE (store)->url->host,
- errno ? g_strerror (errno) : _("Unknown error"));
- }
- } else if (pcp->state != CAMEL_POP3_COMMAND_OK)
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
- _("Unable to connect to POP server %s.\n"
- "Error sending password: %s"),
- CAMEL_SERVICE (store)->url->host,
- store->engine->line ? (char *)store->engine->line : _("Unknown error"));
-
- camel_pop3_engine_command_free(store->engine, pcp);
-
- if (pcu)
- camel_pop3_engine_command_free(store->engine, pcu);
-
- return status;
-}
-
-static gboolean
-pop3_connect (CamelService *service, CamelException *ex)
-{
- CamelPOP3Store *store = (CamelPOP3Store *)service;
- gboolean reprompt = FALSE;
- CamelSession *session;
- char *errbuf = NULL;
- int status;
-
- session = camel_service_get_session (service);
-
- if (store->cache == NULL) {
- char *root;
-
- root = camel_session_get_storage_path (session, service, ex);
- if (root) {
- store->cache = camel_data_cache_new(root, 0, ex);
- g_free(root);
- if (store->cache) {
- /* Default cache expiry - 1 week or not visited in a day */
- camel_data_cache_set_expire_age(store->cache, 60*60*24*7);
- camel_data_cache_set_expire_access(store->cache, 60*60*24);
- }
- }
- }
-
- if (!connect_to_server_wrapper (service, ex))
- return FALSE;
-
- do {
- camel_exception_clear (ex);
- status = pop3_try_authenticate (service, reprompt, errbuf, ex);
- g_free (errbuf);
- errbuf = NULL;
-
- /* we only re-prompt if we failed to authenticate, any other error and we just abort */
- if (camel_exception_get_id (ex) == CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE) {
- errbuf = g_strdup_printf ("%s\n\n", camel_exception_get_description (ex));
- g_free (service->url->passwd);
- service->url->passwd = NULL;
- reprompt = TRUE;
- }
- } while (status != -1 && ex->id == CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE);
-
- g_free (errbuf);
-
- if (status == -1 || camel_exception_is_set(ex)) {
- camel_service_disconnect(service, TRUE, ex);
- return FALSE;
- }
-
- /* Now that we are in the TRANSACTION state, try regetting the capabilities */
- store->engine->state = CAMEL_POP3_ENGINE_TRANSACTION;
- camel_pop3_engine_reget_capabilities (store->engine);
-
- return TRUE;
-}
-
-static gboolean
-pop3_disconnect (CamelService *service, gboolean clean, CamelException *ex)
-{
- CamelPOP3Store *store = CAMEL_POP3_STORE (service);
-
- if (clean) {
- CamelPOP3Command *pc;
-
- pc = camel_pop3_engine_command_new(store->engine, 0, NULL, NULL, "QUIT\r\n");
- while (camel_pop3_engine_iterate(store->engine, NULL) > 0)
- ;
- camel_pop3_engine_command_free(store->engine, pc);
- }
-
- if (!CAMEL_SERVICE_CLASS (parent_class)->disconnect (service, clean, ex))
- return FALSE;
-
- camel_object_unref((CamelObject *)store->engine);
- store->engine = NULL;
-
- return TRUE;
-}
-
-static CamelFolder *
-get_folder (CamelStore *store, const char *folder_name, guint32 flags, CamelException *ex)
-{
- if (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;
-}
diff --git a/camel/providers/pop3/camel-pop3-store.h b/camel/providers/pop3/camel-pop3-store.h
deleted file mode 100644
index 3b9b1f7ae1..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>
- * Michael Zucchi <notzed@ximian.com>
- *
- * Copyright (C) 2000-2002 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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/camel-types.h>
-#include <camel/camel-store.h>
-#include "camel-pop3-engine.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 {
- CamelStore parent_object;
-
- CamelPOP3Engine *engine; /* pop processing engine */
-
- struct _CamelDataCache *cache;
-} CamelPOP3Store;
-
-
-
-typedef struct {
- CamelStoreClass 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/camel-pop3-stream.c b/camel/providers/pop3/camel-pop3-stream.c
deleted file mode 100644
index cb27bece26..0000000000
--- a/camel/providers/pop3/camel-pop3-stream.c
+++ /dev/null
@@ -1,471 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; fill-column: 160 -*-
- *
- * Author:
- * Michael Zucchi <notzed@ximian.com>
- *
- * Copyright 2002 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 *identical* to the camel-nntp-stream, so should probably
- work out a way to merge them */
-
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <errno.h>
-
-#include <string.h>
-#include <stdio.h>
-
-#include <glib.h>
-
-#include "camel-pop3-stream.h"
-
-extern int camel_verbose_debug;
-#define dd(x) (camel_verbose_debug?(x):0)
-
-static CamelObjectClass *parent_class = NULL;
-
-/* Returns the class for a CamelStream */
-#define CS_CLASS(so) CAMEL_POP3_STREAM_CLASS(CAMEL_OBJECT_GET_CLASS(so))
-
-#define CAMEL_POP3_STREAM_SIZE (4096)
-#define CAMEL_POP3_STREAM_LINE (1024) /* maximum line size */
-
-static int
-stream_fill(CamelPOP3Stream *is)
-{
- int left = 0;
-
- if (is->source) {
- left = is->end - is->ptr;
- memcpy(is->buf, is->ptr, left);
- is->end = is->buf + left;
- is->ptr = is->buf;
- left = camel_stream_read(is->source, is->end, CAMEL_POP3_STREAM_SIZE - (is->end - is->buf));
- if (left > 0) {
- is->end += left;
- is->end[0] = '\n';
- return is->end - is->ptr;
- } else {
- dd(printf("POP3_STREAM_FILL(ERROR): '%s'\n", strerror (errno)));
- return -1;
- }
- }
-
- return 0;
-}
-
-static ssize_t
-stream_read(CamelStream *stream, char *buffer, size_t n)
-{
- CamelPOP3Stream *is = (CamelPOP3Stream *)stream;
- char *o, *oe;
- unsigned char *p, *e, c;
- int state;
-
- if (is->mode != CAMEL_POP3_STREAM_DATA || n == 0)
- return 0;
-
- o = buffer;
- oe = buffer + n;
- state = is->state;
-
- /* Need to copy/strip '.'s and whatnot */
- p = is->ptr;
- e = is->end;
-
- switch(state) {
- state_0:
- case 0: /* start of line, always read at least 3 chars */
- while (e - p < 3) {
- is->ptr = p;
- if (stream_fill(is) == -1)
- return -1;
- p = is->ptr;
- e = is->end;
- }
- if (p[0] == '.') {
- if (p[1] == '\r' && p[2] == '\n') {
- is->ptr = p+3;
- is->mode = CAMEL_POP3_STREAM_EOD;
- is->state = 0;
- dd(printf("POP3_STREAM_READ(%d):\n%.*s\n", o-buffer, o-buffer, buffer));
- return o-buffer;
- }
- p++;
- }
- state = 1;
- /* FALLS THROUGH */
- case 1: /* looking for next sol */
- while (o < oe) {
- c = *p++;
- if (c == '\n') {
- /* end of input sentinal check */
- if (p > e) {
- is->ptr = e;
- if (stream_fill(is) == -1)
- return -1;
- p = is->ptr;
- e = is->end;
- } else {
- *o++ = '\n';
- state = 0;
- goto state_0;
- }
- } else if (c != '\r') {
- *o++ = c;
- }
- }
- break;
- }
-
- is->ptr = p;
- is->state = state;
-
- dd(printf("POP3_STREAM_READ(%d):\n%.*s\n", o-buffer, o-buffer, buffer));
-
- return o-buffer;
-}
-
-static ssize_t
-stream_write(CamelStream *stream, const char *buffer, size_t n)
-{
- CamelPOP3Stream *is = (CamelPOP3Stream *)stream;
-
- if (strncmp (buffer, "PASS ", 5) != 0)
- dd(printf("POP3_STREAM_WRITE(%d):\n%.*s\n", n, (int)n, buffer));
- else
- dd(printf("POP3_STREAM_WRITE(%d):\nPASS xxxxxxxx\n", n));
-
- return camel_stream_write(is->source, buffer, n);
-}
-
-static int
-stream_close(CamelStream *stream)
-{
- /* nop? */
- return 0;
-}
-
-static int
-stream_flush(CamelStream *stream)
-{
- /* nop? */
- return 0;
-}
-
-static gboolean
-stream_eos(CamelStream *stream)
-{
- CamelPOP3Stream *is = (CamelPOP3Stream *)stream;
-
- return is->mode != CAMEL_POP3_STREAM_DATA;
-}
-
-static int
-stream_reset(CamelStream *stream)
-{
- /* nop? reset literal mode? */
- return 0;
-}
-
-static void
-camel_pop3_stream_class_init (CamelStreamClass *camel_pop3_stream_class)
-{
- CamelStreamClass *camel_stream_class = (CamelStreamClass *)camel_pop3_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;
-}
-
-static void
-camel_pop3_stream_init(CamelPOP3Stream *is, CamelPOP3StreamClass *isclass)
-{
- /* +1 is room for appending a 0 if we need to for a line */
- is->ptr = is->end = is->buf = g_malloc(CAMEL_POP3_STREAM_SIZE+1);
- is->lineptr = is->linebuf = g_malloc(CAMEL_POP3_STREAM_LINE+1);
- is->lineend = is->linebuf + CAMEL_POP3_STREAM_LINE;
-
- /* init sentinal */
- is->ptr[0] = '\n';
-
- is->state = 0;
- is->mode = CAMEL_POP3_STREAM_LINE;
-}
-
-static void
-camel_pop3_stream_finalise(CamelPOP3Stream *is)
-{
- g_free(is->buf);
- g_free(is->linebuf);
- if (is->source)
- camel_object_unref((CamelObject *)is->source);
-}
-
-CamelType
-camel_pop3_stream_get_type (void)
-{
- static CamelType camel_pop3_stream_type = CAMEL_INVALID_TYPE;
-
- if (camel_pop3_stream_type == CAMEL_INVALID_TYPE) {
- camel_pop3_stream_type = camel_type_register( camel_stream_get_type(),
- "CamelPOP3Stream",
- sizeof( CamelPOP3Stream ),
- sizeof( CamelPOP3StreamClass ),
- (CamelObjectClassInitFunc) camel_pop3_stream_class_init,
- NULL,
- (CamelObjectInitFunc) camel_pop3_stream_init,
- (CamelObjectFinalizeFunc) camel_pop3_stream_finalise );
- }
-
- return camel_pop3_stream_type;
-}
-
-/**
- * camel_pop3_stream_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_pop3_stream_new(CamelStream *source)
-{
- CamelPOP3Stream *is;
-
- is = (CamelPOP3Stream *)camel_object_new(camel_pop3_stream_get_type ());
- camel_object_ref((CamelObject *)source);
- is->source = source;
-
- return (CamelStream *)is;
-}
-
-/* Get one line from the pop3 stream */
-int
-camel_pop3_stream_line(CamelPOP3Stream *is, unsigned char **data, unsigned int *len)
-{
- register unsigned char c, *p, *o, *oe;
- int newlen, oldlen;
- unsigned char *e;
-
- if (is->mode == CAMEL_POP3_STREAM_EOD) {
- *data = is->linebuf;
- *len = 0;
- return 0;
- }
-
- o = is->linebuf;
- oe = is->lineend - 1;
- p = is->ptr;
- e = is->end;
-
- /* Data mode, convert leading '..' to '.', and stop when we reach a solitary '.' */
- if (is->mode == CAMEL_POP3_STREAM_DATA) {
- /* need at least 3 chars in buffer */
- while (e-p < 3) {
- is->ptr = p;
- if (stream_fill(is) == -1)
- return -1;
- p = is->ptr;
- e = is->end;
- }
-
- /* check for isolated '.\r\n' or begging of line '.' */
- if (p[0] == '.') {
- if (p[1] == '\r' && p[2] == '\n') {
- is->ptr = p+3;
- is->mode = CAMEL_POP3_STREAM_EOD;
- *data = is->linebuf;
- *len = 0;
- is->linebuf[0] = 0;
-
- dd(printf("POP3_STREAM_LINE(END)\n"));
-
- return 0;
- }
- p++;
- }
- }
-
- while (1) {
- while (o < oe) {
- c = *p++;
- if (c == '\n') {
- /* sentinal? */
- if (p> e) {
- is->ptr = e;
- if (stream_fill(is) == -1)
- return -1;
- p = is->ptr;
- e = is->end;
- } else {
- is->ptr = p;
- *data = is->linebuf;
- *len = o - is->linebuf;
- *o = 0;
-
- dd(printf("POP3_STREAM_LINE(%d): '%s'\n", *len, *data));
-
- return 1;
- }
- } else if (c != '\r') {
- *o++ = c;
- }
- }
-
- /* limit this for bad server data? */
- oldlen = o - is->linebuf;
- newlen = (is->lineend - is->linebuf) * 3 / 2;
- is->lineptr = is->linebuf = g_realloc(is->linebuf, newlen);
- is->lineend = is->linebuf + newlen;
- oe = is->lineend - 1;
- o = is->linebuf + oldlen;
- }
-
- return -1;
-}
-
-/* returns -1 on error, 0 if last lot of data, >0 if more remaining */
-int camel_pop3_stream_gets(CamelPOP3Stream *is, unsigned char **start, unsigned int *len)
-{
- int max;
- unsigned char *end;
-
- *len = 0;
-
- max = is->end - is->ptr;
- if (max == 0) {
- max = stream_fill(is);
- if (max <= 0)
- return max;
- }
-
- *start = is->ptr;
- end = memchr(is->ptr, '\n', max);
- if (end)
- max = (end - is->ptr) + 1;
- *start = is->ptr;
- *len = max;
- is->ptr += max;
-
- dd(printf("POP3_STREAM_GETS(%s,%d): '%.*s'\n", end==NULL?"more":"last", *len, (int)*len, *start));
-
- return end == NULL?1:0;
-}
-
-void camel_pop3_stream_set_mode(CamelPOP3Stream *is, camel_pop3_stream_mode_t mode)
-{
- is->mode = mode;
-}
-
-/* returns -1 on erorr, 0 if last data, >0 if more data left */
-int camel_pop3_stream_getd(CamelPOP3Stream *is, unsigned char **start, unsigned int *len)
-{
- unsigned char *p, *e, *s;
- int state;
-
- *len = 0;
-
- if (is->mode == CAMEL_POP3_STREAM_EOD)
- return 0;
-
- if (is->mode == CAMEL_POP3_STREAM_LINE) {
- g_warning("pop3_stream reading data in line mode\n");
- return 0;
- }
-
- state = is->state;
- p = is->ptr;
- e = is->end;
-
- while (e - p < 3) {
- is->ptr = p;
- if (stream_fill(is) == -1)
- return -1;
- p = is->ptr;
- e = is->end;
- }
-
- s = p;
-
- do {
- switch(state) {
- case 0:
- /* check leading '.', ... */
- if (p[0] == '.') {
- if (p[1] == '\r' && p[2] == '\n') {
- is->ptr = p+3;
- *len = p-s;
- *start = s;
- is->mode = CAMEL_POP3_STREAM_EOD;
- is->state = 0;
-
- dd(printf("POP3_STREAM_GETD(%s,%d): '%.*s'\n", "last", *len, (int)*len, *start));
-
- return 0;
- }
-
- /* If at start, just skip '.', else return data upto '.' but skip it */
- if (p == s) {
- s++;
- p++;
- } else {
- is->ptr = p+1;
- *len = p-s;
- *start = s;
- is->state = 1;
-
- dd(printf("POP3_STREAM_GETD(%s,%d): '%.*s'\n", "more", *len, (int)*len, *start));
-
- return 1;
- }
- }
- state = 1;
- case 1:
- /* Scan for sentinal */
- while ((*p++)!='\n')
- ;
-
- if (p > e) {
- p = e;
- } else {
- state = 0;
- }
- break;
- }
- } while ((e-p) >= 3);
-
- is->state = state;
- is->ptr = p;
- *len = p-s;
- *start = s;
-
- dd(printf("POP3_STREAM_GETD(%s,%d): '%.*s'\n", "more", *len, (int)*len, *start));
-
- return 1;
-}
diff --git a/camel/providers/pop3/camel-pop3-stream.h b/camel/providers/pop3/camel-pop3-stream.h
deleted file mode 100644
index 2a4ebc01f2..0000000000
--- a/camel/providers/pop3/camel-pop3-stream.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 *identical* to the camel-nntp-stream, so should probably
- work out a way to merge them */
-
-#ifndef _CAMEL_POP3_STREAM_H
-#define _CAMEL_POP3_STREAM_H
-
-#include <camel/camel-stream.h>
-
-#define CAMEL_POP3_STREAM(obj) CAMEL_CHECK_CAST (obj, camel_pop3_stream_get_type (), CamelPOP3Stream)
-#define CAMEL_POP3_STREAM_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_pop3_stream_get_type (), CamelPOP3StreamClass)
-#define CAMEL_IS_POP3_STREAM(obj) CAMEL_CHECK_TYPE (obj, camel_pop3_stream_get_type ())
-
-typedef struct _CamelPOP3StreamClass CamelPOP3StreamClass;
-typedef struct _CamelPOP3Stream CamelPOP3Stream;
-
-typedef enum {
- CAMEL_POP3_STREAM_LINE,
- CAMEL_POP3_STREAM_DATA,
- CAMEL_POP3_STREAM_EOD, /* end of data, acts as if end of stream */
-} camel_pop3_stream_mode_t;
-
-struct _CamelPOP3Stream {
- CamelStream parent;
-
- CamelStream *source;
-
- camel_pop3_stream_mode_t mode;
- int state;
-
- unsigned char *buf, *ptr, *end;
- unsigned char *linebuf, *lineptr, *lineend;
-};
-
-struct _CamelPOP3StreamClass {
- CamelStreamClass parent_class;
-};
-
-CamelType camel_pop3_stream_get_type (void);
-
-CamelStream *camel_pop3_stream_new (CamelStream *source);
-
-
-void camel_pop3_stream_set_mode (CamelPOP3Stream *is, camel_pop3_stream_mode_t mode);
-
-int camel_pop3_stream_line (CamelPOP3Stream *is, unsigned char **data, unsigned int *len);
-int camel_pop3_stream_gets (CamelPOP3Stream *is, unsigned char **start, unsigned int *len);
-int camel_pop3_stream_getd (CamelPOP3Stream *is, unsigned char **start, unsigned int *len);
-
-#endif /* ! _CAMEL_POP3_STREAM_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 8c75af2de8..0000000000
--- a/camel/providers/sendmail/Makefile.am
+++ /dev/null
@@ -1,28 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-libcamelsendmailincludedir = $(privincludedir)/camel
-
-camel_provider_LTLIBRARIES = libcamelsendmail.la
-camel_provider_DATA = libcamelsendmail.urls
-
-INCLUDES = \
- -I.. \
- -I$(srcdir)/.. \
- -I$(srcdir)/../../.. \
- -I$(top_srcdir)/intl \
- -I$(top_srcdir)/camel \
- $(CAMEL_CFLAGS) \
- $(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 = -avoid-version -module
-
-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 9615dff1b4..0000000000
--- a/camel/providers/sendmail/camel-sendmail-provider.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-sendmail-provider.c: sendmail provider registration code */
-
-/*
- * Authors :
- * Dan Winship <danw@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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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.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 fbf6f08a6b..0000000000
--- a/camel/providers/sendmail/camel-sendmail-transport.c
+++ /dev/null
@@ -1,262 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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-filter-crlf.h"
-#include "camel-stream-filter.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_send_to (CamelTransport *transport,
- CamelMimeMessage *message,
- CamelAddress *from, CamelAddress *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->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_send_to (CamelTransport *transport, CamelMimeMessage *message,
- CamelAddress *from, CamelAddress *recipients,
- CamelException *ex)
-{
- struct _camel_header_raw *header, *savedbcc, *n, *tail;
- const char *from_addr, *addr, **argv;
- int i, len, fd[2], nullfd, wstat;
- CamelStreamFilter *filter;
- CamelMimeFilter *crlf;
- sigset_t mask, omask;
- CamelStream *out;
- pid_t pid;
-
- if (!camel_internet_address_get (CAMEL_INTERNET_ADDRESS (from), 0, NULL, &from_addr))
- return FALSE;
-
- len = camel_address_length (recipients);
- argv = g_malloc ((len + 6) * sizeof (char *));
- argv[0] = "sendmail";
- argv[1] = "-i";
- argv[2] = "-f";
- argv[3] = from_addr;
- argv[4] = "--";
-
- for (i = 0; i < len; i++) {
- if (!camel_internet_address_get (CAMEL_INTERNET_ADDRESS (recipients), i, NULL, &addr)) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not parse recipient list"));
- g_free (argv);
- return FALSE;
- }
-
- argv[i + 5] = addr;
- }
-
- argv[i + 5] = NULL;
-
- /* unlink the bcc headers */
- savedbcc = NULL;
- tail = (struct _camel_header_raw *) &savedbcc;
-
- header = (struct _camel_header_raw *) &CAMEL_MIME_PART (message)->headers;
- n = header->next;
- while (n != NULL) {
- if (!strcasecmp (n->name, "Bcc")) {
- header->next = n->next;
- tail->next = n;
- n->next = NULL;
- tail = n;
- } else {
- header = n;
- }
-
- n = header->next;
- }
-
- if (pipe (fd) == -1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not create pipe to sendmail: "
- "%s: mail not sent"),
- g_strerror (errno));
-
- /* restore the bcc headers */
- header->next = savedbcc;
-
- 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);
- g_free (argv);
-
- /* restore the bcc headers */
- header->next = savedbcc;
-
- 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);
- }
- g_free (argv);
-
- /* Parent process. Write the message out. */
- close (fd[0]);
- out = camel_stream_fs_new_with_fd (fd[1]);
-
- /* workaround for lame sendmail implementations that can't handle CRLF eoln sequences */
- filter = camel_stream_filter_new_with_stream (out);
- crlf = camel_mime_filter_crlf_new (CAMEL_MIME_FILTER_CRLF_DECODE, CAMEL_MIME_FILTER_CRLF_MODE_CRLF_ONLY);
- camel_stream_filter_add (filter, crlf);
- camel_object_unref (crlf);
- camel_object_unref (out);
-
- out = (CamelStream *) filter;
- 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"),
- g_strerror (errno));
-
- /* Wait for sendmail to exit. */
- while (waitpid (pid, &wstat, 0) == -1 && errno == EINTR)
- ;
-
- sigprocmask (SIG_SETMASK, &omask, NULL);
-
- /* restore the bcc headers */
- header->next = savedbcc;
-
- 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);
-
- /* restore the bcc headers */
- header->next = savedbcc;
-
- 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 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 056be03bc8..0000000000
--- a/camel/providers/sendmail/camel-sendmail-transport.h
+++ /dev/null
@@ -1,63 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 b6bba766d6..0000000000
--- a/camel/providers/smtp/Makefile.am
+++ /dev/null
@@ -1,35 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-libcamelsmtpincludedir = $(privincludedir)/camel
-
-camel_provider_LTLIBRARIES = libcamelsmtp.la
-camel_provider_DATA = libcamelsmtp.urls
-
-INCLUDES = \
- -I.. \
- -I$(srcdir)/.. \
- -I$(srcdir)/../../.. \
- -I$(top_srcdir)/intl \
- -I$(top_srcdir)/camel \
- -I$(top_srcdir)/e-util \
- $(CAMEL_CFLAGS) \
- $(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 = -avoid-version -module
-
-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 07991eb695..0000000000
--- a/camel/providers/smtp/camel-smtp-provider.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-smtp-provider.c: smtp provider registration code */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2002 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-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.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 5bf5add2ee..0000000000
--- a/camel/providers/smtp/camel-smtp-transport.c
+++ /dev/null
@@ -1,1455 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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-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_SSL
-#include "camel-tcp-stream-ssl.h"
-#endif
-#include "camel-session.h"
-#include "camel-exception.h"
-#include "camel-sasl.h"
-
-
-extern int camel_verbose_debug;
-#define d(x) (camel_verbose_debug ? (x) : 0)
-
-/* Specified in RFC 821 */
-#define SMTP_PORT 25
-
-/* camel smtp transport class prototypes */
-static gboolean smtp_send_to (CamelTransport *transport, CamelMimeMessage *message,
- CamelAddress *from, CamelAddress *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 (const unsigned char *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, CamelMimeMessage *message, CamelException *ex);
-static gboolean smtp_rset (CamelSmtpTransport *transport, CamelException *ex);
-static gboolean smtp_quit (CamelSmtpTransport *transport, CamelException *ex);
-
-static void smtp_set_exception (CamelSmtpTransport *transport, const char *respbuf,
- const char *message, 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->send_to = smtp_send_to;
-}
-
-static void
-camel_smtp_transport_init (gpointer object)
-{
- CamelSmtpTransport *smtp = CAMEL_SMTP_TRANSPORT (object);
-
- smtp->flags = 0;
- smtp->connected = FALSE;
-}
-
-CamelType
-camel_smtp_transport_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- 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 type;
-}
-
-static void
-smtp_construct (CamelService *service, CamelSession *session,
- CamelProvider *provider, CamelURL *url,
- CamelException *ex)
-{
- CamelSmtpTransport *smtp_transport = CAMEL_SMTP_TRANSPORT (service);
- const char *use_ssl;
-
- CAMEL_SERVICE_CLASS (parent_class)->construct (service, session, provider, url, ex);
-
- if ((use_ssl = camel_url_get_param (url, "use_ssl"))) {
- /* Note: previous versions would use "" to toggle use_ssl to 'on' */
- if (!*use_ssl || !strcmp (use_ssl, "always"))
- smtp_transport->flags |= CAMEL_SMTP_TRANSPORT_USE_SSL_ALWAYS;
- else if (!strcmp (use_ssl, "when-possible"))
- smtp_transport->flags |= CAMEL_SMTP_TRANSPORT_USE_SSL_WHEN_POSSIBLE;
- }
-}
-
-static const char *
-smtp_error_string (int error)
-{
- /* SMTP error codes grabbed from rfc821 */
- switch (error) {
- case 0:
- /* looks like a read problem, check errno */
- if (errno)
- return g_strerror (errno);
- else
- return _("Unknown");
- 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");
- }
-}
-
-#define SSL_PORT_FLAGS (CAMEL_TCP_STREAM_SSL_ENABLE_SSL2 | CAMEL_TCP_STREAM_SSL_ENABLE_SSL3)
-#define STARTTLS_FLAGS (CAMEL_TCP_STREAM_SSL_ENABLE_TLS)
-
-static gboolean
-connect_to_server (CamelService *service, int try_starttls, CamelException *ex)
-{
- CamelSmtpTransport *transport = CAMEL_SMTP_TRANSPORT (service);
- CamelStream *tcp_stream;
- char *respbuf = NULL;
- struct hostent *h;
- 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->flags &= CAMEL_SMTP_TRANSPORT_USE_SSL; /* reset all but ssl flags */
- transport->authtypes = NULL;
-
- port = service->url->port ? service->url->port : SMTP_PORT;
-
- if (transport->flags & CAMEL_SMTP_TRANSPORT_USE_SSL) {
-#ifdef HAVE_SSL
- if (try_starttls) {
- tcp_stream = camel_tcp_stream_ssl_new_raw (service->session, service->url->host, STARTTLS_FLAGS);
- } else {
- port = service->url->port ? service->url->port : 465;
- tcp_stream = camel_tcp_stream_ssl_new (service->session, service->url->host, SSL_PORT_FLAGS);
- }
-#else
- if (!try_starttls)
- port = service->url->port ? service->url->port : 465;
-
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("Could not connect to %s (port %d): %s"),
- service->url->host, port,
- _("SSL unavailable"));
-
- camel_free_host (h);
-
- return FALSE;
-#endif /* HAVE_SSL */
- } else {
- tcp_stream = camel_tcp_stream_raw_new ();
- }
-
- 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));
-
- camel_object_unref (tcp_stream);
-
- return FALSE;
- }
-
- transport->connected = TRUE;
-
- /* get the localaddr - needed later by smtp_helo */
- transport->localaddr = camel_tcp_stream_get_local_address (CAMEL_TCP_STREAM (tcp_stream));
-
- 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)) {
- smtp_set_exception (transport, respbuf, _("Welcome response error"), ex);
- g_free (respbuf);
- return FALSE;
- }
- } while (*(respbuf+3) == '-'); /* if we got "220-" then loop again */
- g_free (respbuf);
-
- /* Try sending EHLO */
- transport->flags |= CAMEL_SMTP_TRANSPORT_IS_ESMTP;
- if (!smtp_helo (transport, ex)) {
- if (!transport->connected)
- return FALSE;
-
- /* Fall back to HELO */
- camel_exception_clear (ex);
- transport->flags &= ~CAMEL_SMTP_TRANSPORT_IS_ESMTP;
- if (!smtp_helo (transport, ex) && !transport->connected)
- return FALSE;
- }
-
- /* clear any EHLO/HELO exception and assume that any SMTP errors encountered were non-fatal */
- camel_exception_clear (ex);
-
-#ifdef HAVE_SSL
- if (transport->flags & CAMEL_SMTP_TRANSPORT_USE_SSL_WHEN_POSSIBLE) {
- /* try_starttls is always TRUE here */
- if (transport->flags & CAMEL_SMTP_TRANSPORT_STARTTLS)
- goto starttls;
- } else if (transport->flags & CAMEL_SMTP_TRANSPORT_USE_SSL_ALWAYS) {
- if (try_starttls) {
- if (transport->flags & CAMEL_SMTP_TRANSPORT_STARTTLS) {
- goto starttls;
- } else {
- /* server doesn't support STARTTLS, abort */
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to connect to SMTP server %s in secure mode: %s"),
- service->url->host, _("server does not appear to support SSL"));
- goto exception_cleanup;
- }
- }
- }
-#endif /* HAVE_SSL */
-
- return TRUE;
-
-#ifdef HAVE_SSL
- starttls:
- d(fprintf (stderr, "sending : STARTTLS\r\n"));
- if (camel_stream_write (tcp_stream, "STARTTLS\r\n", 10) == -1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("STARTTLS request timed out: %s"),
- g_strerror (errno));
- goto exception_cleanup;
- }
-
- respbuf = NULL;
-
- do {
- /* Check for "220 Ready for TLS" */
- 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, "220", 3)) {
- smtp_set_exception (transport, respbuf, _("STARTTLS response error"), ex);
- g_free (respbuf);
- goto exception_cleanup;
- }
- } while (*(respbuf+3) == '-'); /* if we got "220-" then loop again */
-
- /* Okay, now toggle SSL/TLS mode */
- if (camel_tcp_stream_ssl_enable_ssl (CAMEL_TCP_STREAM_SSL (tcp_stream)) == -1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to connect to SMTP server %s in secure mode: %s"),
- service->url->host, g_strerror (errno));
- goto exception_cleanup;
- }
-
- /* We are supposed to re-EHLO after a successful STARTTLS to
- re-fetch any supported extensions. */
- if (!smtp_helo (transport, ex) && !transport->connected)
- return FALSE;
-
- return TRUE;
-
- exception_cleanup:
-
- camel_object_unref (transport->istream);
- transport->istream = NULL;
- camel_object_unref (transport->ostream);
- transport->ostream = NULL;
-
- transport->connected = FALSE;
-
- return FALSE;
-#endif /* HAVE_SSL */
-}
-
-static gboolean
-connect_to_server_wrapper (CamelService *service, CamelException *ex)
-{
-#ifdef HAVE_SSL
- CamelSmtpTransport *transport = (CamelSmtpTransport *) service;
-
- if (transport->flags & CAMEL_SMTP_TRANSPORT_USE_SSL_ALWAYS) {
- /* First try connecting to the SSL port */
- if (!connect_to_server (service, FALSE, ex)) {
- if (camel_exception_get_id (ex) == CAMEL_EXCEPTION_SERVICE_UNAVAILABLE) {
- /* Seems the SSL port is unavailable, lets try STARTTLS */
- camel_exception_clear (ex);
- return connect_to_server (service, TRUE, ex);
- } else {
- return FALSE;
- }
- }
-
- return TRUE;
- } else if (transport->flags & CAMEL_SMTP_TRANSPORT_USE_SSL_WHEN_POSSIBLE) {
- /* If the server supports STARTTLS, use it */
- return connect_to_server (service, TRUE, ex);
- } else {
- /* User doesn't care about SSL */
- return connect_to_server (service, FALSE, ex);
- }
-#else
- return connect_to_server (service, FALSE, ex);
-#endif
-}
-
-static gboolean
-smtp_connect (CamelService *service, CamelException *ex)
-{
- CamelSmtpTransport *transport = CAMEL_SMTP_TRANSPORT (service);
- gboolean has_authtypes;
-
- /* 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 (sasl);
-
- if (!truth)
- return FALSE;
-
- return connect_to_server_wrapper (service, ex);
- }
-
- if (!connect_to_server_wrapper (service, ex))
- return FALSE;
-
- /* check to see if AUTH is required, if so...then AUTH ourselves */
- has_authtypes = transport->authtypes ? g_hash_table_size (transport->authtypes) > 0 : FALSE;
- if (service->url->authmech && (transport->flags & CAMEL_SMTP_TRANSPORT_IS_ESMTP) && has_authtypes) {
- CamelSession *session = camel_service_get_session (service);
- CamelServiceAuthType *authtype;
- gboolean authenticated = FALSE;
- char *errbuf = NULL;
-
- if (!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", NULL);
- 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, FALSE, TRUE,
- service, "password", ex);
-
- g_free (prompt);
- g_free (errbuf);
- errbuf = NULL;
-
- if (!service->url->passwd) {
- 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.
- */
- if (!smtp_helo (transport, ex) && !transport->connected)
- return FALSE;
-
- camel_exception_clear (ex);
- }
-
- return TRUE;
-}
-
-static void
-authtypes_free (gpointer key, gpointer value, gpointer data)
-{
- g_free (value);
-}
-
-static gboolean
-smtp_disconnect (CamelService *service, gboolean clean, CamelException *ex)
-{
- CamelSmtpTransport *transport = CAMEL_SMTP_TRANSPORT (service);
-
- /*if (!service->connected)
- * return TRUE;
- */
-
- if (transport->connected && 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 (transport->authtypes, authtypes_free, NULL);
- g_hash_table_destroy (transport->authtypes);
- transport->authtypes = NULL;
- }
-
- if (transport->istream) {
- camel_object_unref (transport->istream);
- transport->istream = NULL;
- }
-
- if (transport->ostream) {
- camel_object_unref (transport->ostream);
- transport->ostream = NULL;
- }
-
- camel_tcp_address_free (transport->localaddr);
- transport->localaddr = NULL;
-
- transport->connected = FALSE;
-
- return TRUE;
-}
-
-static GHashTable *
-esmtp_get_authtypes (const unsigned char *buffer)
-{
- const unsigned char *start, *end;
- GHashTable *table = NULL;
-
- /* advance to the first token */
- start = buffer;
- while (isspace ((int) *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 */
- end = start;
- while (*end && !isspace ((int) *end))
- end++;
-
- type = g_strndup (start, end - start);
- g_hash_table_insert (table, type, type);
-
- /* advance to the next token */
- start = end;
- while (isspace ((int) *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_wrapper (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_send_to (CamelTransport *transport, CamelMimeMessage *message,
- CamelAddress *from, CamelAddress *recipients,
- CamelException *ex)
-{
- CamelSmtpTransport *smtp_transport = CAMEL_SMTP_TRANSPORT (transport);
- const CamelInternetAddress *cia;
- gboolean has_8bit_parts;
- const char *addr;
- int i, len;
-
- if (!camel_internet_address_get (CAMEL_INTERNET_ADDRESS (from), 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 (message);
-
- /* rfc1652 (8BITMIME) requires that you notify the ESMTP daemon that
- you'll be sending an 8bit mime message at "MAIL FROM:" time. */
- if (!smtp_mail (smtp_transport, addr, has_8bit_parts, ex)) {
- camel_operation_end (NULL);
- return FALSE;
- }
-
- len = camel_address_length (recipients);
- if (len == 0) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot send message: no recipients defined."));
- camel_operation_end (NULL);
- return FALSE;
- }
-
- cia = CAMEL_INTERNET_ADDRESS (recipients);
- for (i = 0; i < len; i++) {
- char *enc;
-
- if (!camel_internet_address_get (cia, i, NULL, &addr)) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot send message: one or more invalid recipients"));
- camel_operation_end (NULL);
- return FALSE;
- }
-
- enc = camel_internet_address_encode_address(NULL, NULL, addr);
- if (!smtp_rcpt (smtp_transport, enc, ex)) {
- g_free(enc);
- camel_operation_end (NULL);
- return FALSE;
- }
- g_free(enc);
- }
-
- if (!smtp_data (smtp_transport, message, 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 const char *
-smtp_next_token (const char *buf)
-{
- const unsigned char *token;
-
- token = (const unsigned char *) buf;
- while (*token && !isspace ((int) *token))
- token++;
-
- while (*token && isspace ((int) *token))
- token++;
-
- return (const char *) token;
-}
-
-#define HEXVAL(c) (isdigit (c) ? (c) - '0' : (c) - 'A' + 10)
-
-/**
- * example (rfc2034):
- * 5.1.1 Mailbox "nosuchuser" does not exist
- *
- * The human-readable status code is what we want. Since this text
- * could possibly be encoded, we must decode it.
- *
- * "xtext" is formally defined as follows:
- *
- * xtext = *( xchar / hexchar / linear-white-space / comment )
- *
- * xchar = any ASCII CHAR between "!" (33) and "~" (126) inclusive,
- * except for "+", "\" and "(".
- *
- * "hexchar"s are intended to encode octets that cannot be represented
- * as plain text, either because they are reserved, or because they are
- * non-printable. However, any octet value may be represented by a
- * "hexchar".
- *
- * hexchar = ASCII "+" immediately followed by two upper case
- * hexadecimal digits
- **/
-static char *
-smtp_decode_status_code (const char *in, size_t len)
-{
- unsigned char *inptr, *outptr;
- const unsigned char *inend;
- char *outbuf;
-
- outptr = outbuf = g_malloc (len + 1);
-
- inptr = (unsigned char *) in;
- inend = inptr + len;
- 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;
-}
-
-static void
-smtp_set_exception (CamelSmtpTransport *transport, const char *respbuf, const char *message, CamelException *ex)
-{
- const char *token, *rbuf = respbuf;
- char *buffer = NULL;
- GString *string;
- int error;
-
- if (!respbuf || !(transport->flags & CAMEL_SMTP_TRANSPORT_ENHANCEDSTATUSCODES)) {
- fake_status_code:
- error = respbuf ? atoi (respbuf) : 0;
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, "%s: %s", message,
- smtp_error_string (error));
- } else {
- string = g_string_new ("");
- do {
- token = smtp_next_token (rbuf + 4);
- if (*token == '\0') {
- g_free (buffer);
- g_string_free (string, TRUE);
- goto fake_status_code;
- }
-
- g_string_append (string, token);
- if (*(rbuf + 3) == '-') {
- g_free (buffer);
- buffer = camel_stream_buffer_read_line (CAMEL_STREAM_BUFFER (transport->istream));
- g_string_append_c (string, '\n');
- } else {
- g_free (buffer);
- buffer = NULL;
- }
-
- rbuf = buffer;
- } while (rbuf);
-
- buffer = smtp_decode_status_code (string->str, string->len);
- g_string_free (string, TRUE);
- if (!buffer)
- goto fake_status_code;
-
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- "%s: %s", message, buffer);
-
- g_free (buffer);
- }
-
- if (!respbuf) {
- /* we got disconnected */
- transport->connected = FALSE;
- }
-}
-
-static gboolean
-smtp_helo (CamelSmtpTransport *transport, CamelException *ex)
-{
- /* say hello to the server */
- char *name = NULL, *cmdbuf = NULL, *respbuf = NULL;
- struct hostent *host;
- CamelException err;
- const char *token;
- int af;
-
- /* these are flags that we set, so unset them in case we
- are being called a second time (ie, after a STARTTLS) */
- transport->flags &= ~(CAMEL_SMTP_TRANSPORT_8BITMIME |
- CAMEL_SMTP_TRANSPORT_ENHANCEDSTATUSCODES |
- CAMEL_SMTP_TRANSPORT_STARTTLS);
-
- if (transport->authtypes) {
- g_hash_table_foreach (transport->authtypes, authtypes_free, NULL);
- g_hash_table_destroy (transport->authtypes);
- transport->authtypes = NULL;
- }
-
- camel_operation_start_transient (NULL, _("SMTP Greeting"));
-
- /* get the local host name */
- camel_exception_init (&err);
-#ifdef ENABLE_IPv6
- af = transport->localaddr->family == CAMEL_TCP_ADDRESS_IPv6 ? AF_INET6 : AF_INET;
-#else
- af = AF_INET;
-#endif
- host = camel_gethostbyaddr ((char *) &transport->localaddr->address,
- transport->localaddr->length, af, &err);
-
- camel_exception_clear (&err);
-
- if (host && host->h_name && *host->h_name) {
- name = g_strdup (host->h_name);
- } else {
-#ifdef ENABLE_IPv6
- char ip[MAXHOSTNAMELEN + 1];
- const char *proto;
-
- proto = transport->localaddr->family == CAMEL_TCP_ADDRESS_IPv6 ? "IPv6:" : "";
- name = g_strdup_printf ("[%s%s]", proto, inet_ntop (af, transport->localaddr->address, ip, MAXHOSTNAMELEN));
-#else
- /* We *could* use inet_ntoa() here, but it's probably
- not worth it since we would have to worry about
- some systems not having inet_ntoa() */
- name = g_strdup_printf ("[%d.%d.%d.%d]",
- transport->localaddr->address[0],
- transport->localaddr->address[1],
- transport->localaddr->address[2],
- transport->localaddr->address[3]);
-#endif
- }
-
- if (host)
- camel_free_host (host);
-
- /* hiya server! how are you today? */
- if (transport->flags & CAMEL_SMTP_TRANSPORT_IS_ESMTP)
- cmdbuf = g_strdup_printf ("EHLO %s\r\n", name);
- else
- cmdbuf = g_strdup_printf ("HELO %s\r\n", name);
- g_free (name);
-
- 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"),
- g_strerror (errno));
- camel_operation_end (NULL);
-
- transport->connected = FALSE;
- camel_object_unref (transport->istream);
- transport->istream = NULL;
- camel_object_unref (transport->ostream);
- transport->ostream = 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)) {
- smtp_set_exception (transport, respbuf, _("HELO response error"), ex);
- camel_operation_end (NULL);
- g_free (respbuf);
-
- return FALSE;
- }
-
- token = respbuf + 4;
-
- if (transport->flags & CAMEL_SMTP_TRANSPORT_IS_ESMTP) {
- if (!strncmp (token, "8BITMIME", 8)) {
- d(fprintf (stderr, "This server supports 8bit MIME\n"));
- transport->flags |= CAMEL_SMTP_TRANSPORT_8BITMIME;
- } else if (!strncmp (token, "ENHANCEDSTATUSCODES", 19)) {
- d(fprintf (stderr, "This server supports enhanced status codes\n"));
- transport->flags |= CAMEL_SMTP_TRANSPORT_ENHANCEDSTATUSCODES;
- } else if (!strncmp (token, "STARTTLS", 8)) {
- d(fprintf (stderr, "This server supports STARTTLS\n"));
- transport->flags |= CAMEL_SMTP_TRANSPORT_STARTTLS;
- } else if (!strncmp (token, "AUTH", 4)) {
- if (!transport->authtypes || transport->flags & CAMEL_SMTP_TRANSPORT_AUTH_EQUAL) {
- /* Don't bother parsing any authtypes if we already have a list.
- * Some servers will list AUTH twice, once the standard way and
- * once the way Microsoft Outlook requires them to be:
- *
- * 250-AUTH LOGIN PLAIN DIGEST-MD5 CRAM-MD5
- * 250-AUTH=LOGIN PLAIN DIGEST-MD5 CRAM-MD5
- *
- * Since they can come in any order, parse each list that we get
- * until we parse an authtype list that does not use the AUTH=
- * format. We want to let the standard way have priority over the
- * broken way.
- **/
-
- if (token[4] == '=')
- transport->flags |= CAMEL_SMTP_TRANSPORT_AUTH_EQUAL;
- else
- transport->flags &= ~CAMEL_SMTP_TRANSPORT_AUTH_EQUAL;
-
- /* parse for supported AUTH types */
- token += 5;
-
- if (transport->authtypes) {
- g_hash_table_foreach (transport->authtypes, authtypes_free, NULL);
- g_hash_table_destroy (transport->authtypes);
- }
-
- transport->authtypes = esmtp_get_authtypes (token);
- }
- }
- }
- } 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)
-{
- char *cmdbuf, *respbuf = NULL, *challenge;
- gboolean auth_challenge = FALSE;
- 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) {
- auth_challenge = TRUE;
- 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;
- }
-
- if (FALSE) {
- broken_smtp_server:
- d(fprintf (stderr, "Your SMTP server's implementation of the %s SASL\n"
- "authentication mechanism is broken. Please report this to the\n"
- "appropriate vendor and suggest that they re-read rfc2554 again\n"
- "for the first time (specifically Section 4).\n",
- mech));
- }
-
- /* 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)) {
- if (respbuf && auth_challenge && !strncmp (respbuf, "334", 3)) {
- /* broken server, but lets try and work around it anyway... */
- goto broken_smtp_server;
- }
- g_free (respbuf);
- goto lose;
- }
-
- camel_object_unref (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 (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) */
- char *cmdbuf, *respbuf = NULL;
-
- if (transport->flags & CAMEL_SMTP_TRANSPORT_8BITMIME && 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));
-
- camel_object_unref (transport->istream);
- transport->istream = NULL;
- camel_object_unref (transport->ostream);
- transport->ostream = NULL;
-
- 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)) {
- smtp_set_exception (transport, respbuf, _("MAIL FROM response error"), ex);
- g_free (respbuf);
- 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 */
- char *cmdbuf, *respbuf = NULL;
-
- 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));
-
- camel_object_unref (transport->istream);
- transport->istream = NULL;
- camel_object_unref (transport->ostream);
- transport->ostream = NULL;
-
- return FALSE;
- }
- g_free (cmdbuf);
-
- do {
- /* Check for "250 Recipient 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)) {
- char *message;
-
- message = g_strdup_printf (_("RCPT TO <%s> failed"), recipient);
- smtp_set_exception (transport, respbuf, message, ex);
- g_free (message);
- g_free (respbuf);
- return FALSE;
- }
- } while (*(respbuf+3) == '-'); /* if we got "250-" then loop again */
- g_free (respbuf);
-
- return TRUE;
-}
-
-static gboolean
-smtp_data (CamelSmtpTransport *transport, CamelMimeMessage *message, CamelException *ex)
-{
- CamelBestencEncoding enctype = CAMEL_BESTENC_8BIT;
- struct _camel_header_raw *header, *savedbcc, *n, *tail;
- char *cmdbuf, *respbuf = NULL;
- CamelStreamFilter *filtered_stream;
- CamelMimeFilter *crlffilter;
- int ret;
-
- /* If the server doesn't support 8BITMIME, set our required encoding to be 7bit */
- if (!(transport->flags & CAMEL_SMTP_TRANSPORT_8BITMIME))
- enctype = CAMEL_BESTENC_7BIT;
-
- /* FIXME: should we get the best charset too?? */
- /* Changes the encoding of all mime parts to fit within our required
- encoding type and also force any text parts with long lines (longer
- than 998 octets) to wrap by QP or base64 encoding them. */
- camel_mime_message_set_best_encoding (message, CAMEL_BESTENC_GET_ENCODING, enctype);
-
- 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));
-
- camel_object_unref (transport->istream);
- transport->istream = NULL;
- camel_object_unref (transport->ostream);
- transport->ostream = NULL;
-
- 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
- */
- smtp_set_exception (transport, respbuf, _("DATA response error"), ex);
- g_free (respbuf);
- return FALSE;
- }
-
- g_free (respbuf);
- respbuf = NULL;
-
- /* setup stream filtering */
- crlffilter = camel_mime_filter_crlf_new (CAMEL_MIME_FILTER_CRLF_ENCODE, CAMEL_MIME_FILTER_CRLF_MODE_CRLF_DOTS);
- filtered_stream = camel_stream_filter_new_with_stream (transport->ostream);
- camel_stream_filter_add (filtered_stream, CAMEL_MIME_FILTER (crlffilter));
- camel_object_unref (crlffilter);
-
- /* unlink the bcc headers */
- savedbcc = NULL;
- tail = (struct _camel_header_raw *) &savedbcc;
-
- header = (struct _camel_header_raw *) &CAMEL_MIME_PART (message)->headers;
- n = header->next;
- while (n != NULL) {
- if (!strcasecmp (n->name, "Bcc")) {
- header->next = n->next;
- tail->next = n;
- n->next = NULL;
- tail = n;
- } else {
- header = n;
- }
-
- n = header->next;
- }
-
- /* write the message */
- ret = camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), CAMEL_STREAM (filtered_stream));
-
- /* restore the bcc headers */
- header->next = savedbcc;
-
- if (ret == -1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("DATA send timed out: message termination: "
- "%s: mail not sent"),
- g_strerror (errno));
-
- camel_object_unref (filtered_stream);
-
- camel_object_unref (transport->istream);
- transport->istream = NULL;
- camel_object_unref (transport->ostream);
- transport->ostream = NULL;
-
- return FALSE;
- }
-
- camel_stream_flush (CAMEL_STREAM (filtered_stream));
- camel_object_unref (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));
-
- camel_object_unref (transport->istream);
- transport->istream = NULL;
- camel_object_unref (transport->ostream);
- transport->ostream = NULL;
-
- 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)) {
- smtp_set_exception (transport, respbuf, _("DATA termination response error"), ex);
- g_free (respbuf);
- 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) */
- char *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));
-
- camel_object_unref (transport->istream);
- transport->istream = NULL;
- camel_object_unref (transport->ostream);
- transport->ostream = 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)) {
- smtp_set_exception (transport, respbuf, _("RSET response error"), ex);
- g_free (respbuf);
- 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) */
- char *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"),
- g_strerror (errno));
-
- camel_object_unref (transport->istream);
- transport->istream = NULL;
- camel_object_unref (transport->ostream);
- transport->ostream = NULL;
-
- 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)) {
- smtp_set_exception (transport, respbuf, _("QUIT response error"), ex);
- g_free (respbuf);
- 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 ef15f2b07d..0000000000
--- a/camel/providers/smtp/camel-smtp-transport.h
+++ /dev/null
@@ -1,89 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 "camel-transport.h"
-#include "camel-tcp-stream.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))
-
-
-#define CAMEL_SMTP_TRANSPORT_IS_ESMTP (1 << 0)
-#define CAMEL_SMTP_TRANSPORT_8BITMIME (1 << 1)
-#define CAMEL_SMTP_TRANSPORT_ENHANCEDSTATUSCODES (1 << 2)
-#define CAMEL_SMTP_TRANSPORT_STARTTLS (1 << 3)
-
-#define CAMEL_SMTP_TRANSPORT_USE_SSL_ALWAYS (1 << 4)
-#define CAMEL_SMTP_TRANSPORT_USE_SSL_WHEN_POSSIBLE (1 << 5)
-
-#define CAMEL_SMTP_TRANSPORT_USE_SSL (CAMEL_SMTP_TRANSPORT_USE_SSL_ALWAYS | \
- CAMEL_SMTP_TRANSPORT_USE_SSL_WHEN_POSSIBLE)
-
-#define CAMEL_SMTP_TRANSPORT_AUTH_EQUAL (1 << 6) /* set if we are using authtypes from a broken AUTH= */
-
-typedef struct {
- CamelTransport parent_object;
-
- CamelStream *istream, *ostream;
-
- guint32 flags;
-
- gboolean connected;
- CamelTcpAddress *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/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/camel-test.gpg.pub b/camel/tests/data/camel-test.gpg.pub
deleted file mode 100644
index fdf28a59bd..0000000000
--- a/camel/tests/data/camel-test.gpg.pub
+++ /dev/null
@@ -1,24 +0,0 @@
------BEGIN PGP PUBLIC KEY BLOCK-----
-Version: GnuPG v1.0.7 (GNU/Linux)
-
-mQGiBD8qsjARBACkS39GA1e6pDUumC9sQyZaE2PEZW6VEHMGQ9IlJ/Qi2wJBFKgl
-Myl2Cko9Rpj2DmgGkBnoL6fPJNM9aCV0RvclvE15EViURU7mjYzF41uspvVMBg7b
-y3cwAzkkgyhLc/V0Inzm9UpJZ6JvrqYO5OvJUA+ka5SHrhuX4ptmjKLjNwCgwNCx
-CQHx9RIbPggYtfci1w9npm8D/3vks1q+G9r91JkRBqGTboBZ7HI1yU2tHJ38wsKp
-kamloFr3j0hmN0s5PY4wgz4daJ120yTmweJQfIljcN2+aHeI5838u7f3Wk5LJtLG
-+0xKBpBeejzqT/FzhxLIOoQl3L8aF+KAY+Oz7Bm/J/5MRPEPdxWGIB1LhnkoDP5F
-5szGA/9POpFU7y34ACid5Grzk77LUVyHMGob+vgqoVITfCNGjfGf7tnXn1LlRf6N
-TE81p1vYDz2K4bpPmOgBXuESmpaTfXvlDy6oW7buslFqgddm/MfzzM0wC2jdx5TV
-NdNApku4PKA4pE2oTSg5EuGgxQLjJG/PHkoiRiK6yG8gign8vrQbTm8gVXNlciA8
-bm8udXNlckBuby5kb21haW4+iFkEExECABkFAj8qsjAECwcDAgMVAgMDFgIBAh4B
-AheAAAoJEOvMhgJ6QMoGIQcAoIweyKELWnksPUk5mmZz26JFsmQVAJ9aTm+OO289
-+fdwq95xw/6KH2dEtrkBDQQ/KrIxEAQA26Y+QRaR7RymzyUW7MQlDbshD/vInLtb
-36FusuOWzL5TgYn6fiiu/e/J+qjZO5psucWelnBIbnLTZZJs06EgybLPCeEP34X7
-cSsAPZ2JE+TKPM93pxpQpRdWKhv+ocjJ4xPlwI8LTrQIHKxB3yF2WNCh/TQDi0hm
-6ktEi2RVusMAAwUD/3Wp0UbJ2/bgM9wOMAD8celvbl9V/L+9/UVBJrw4tH87FMZi
-NMNg13TbMrARqJjdpOoHzozMv1GOumC5sE8A0/pwbIdU9oSYA07D3+02dCQq+52a
-qtCGJoRq5okccQelRcs0cZIy/z5lzwsNnbshrmnqNdmuVf7BSdw7DjoFj5OLiEYE
-GBECAAYFAj8qsjEACgkQ68yGAnpAygZaCgCfZu68SOUfcUZC3CWi4ITBvcKGvmUA
-n1wrC5ZGv0SIRo5G1PswsKRZuEpl
-=SWoX
------END PGP PUBLIC KEY BLOCK-----
diff --git a/camel/tests/data/camel-test.gpg.sec b/camel/tests/data/camel-test.gpg.sec
deleted file mode 100644
index f2af11e82e..0000000000
--- a/camel/tests/data/camel-test.gpg.sec
+++ /dev/null
@@ -1,33 +0,0 @@
------BEGIN PGP PRIVATE KEY BLOCK-----
-Version: GnuPG v1.0.7 (GNU/Linux)
-
-lQHhBD8qsjARBACkS39GA1e6pDUumC9sQyZaE2PEZW6VEHMGQ9IlJ/Qi2wJBFKgl
-Myl2Cko9Rpj2DmgGkBnoL6fPJNM9aCV0RvclvE15EViURU7mjYzF41uspvVMBg7b
-y3cwAzkkgyhLc/V0Inzm9UpJZ6JvrqYO5OvJUA+ka5SHrhuX4ptmjKLjNwCgwNCx
-CQHx9RIbPggYtfci1w9npm8D/3vks1q+G9r91JkRBqGTboBZ7HI1yU2tHJ38wsKp
-kamloFr3j0hmN0s5PY4wgz4daJ120yTmweJQfIljcN2+aHeI5838u7f3Wk5LJtLG
-+0xKBpBeejzqT/FzhxLIOoQl3L8aF+KAY+Oz7Bm/J/5MRPEPdxWGIB1LhnkoDP5F
-5szGA/9POpFU7y34ACid5Grzk77LUVyHMGob+vgqoVITfCNGjfGf7tnXn1LlRf6N
-TE81p1vYDz2K4bpPmOgBXuESmpaTfXvlDy6oW7buslFqgddm/MfzzM0wC2jdx5TV
-NdNApku4PKA4pE2oTSg5EuGgxQLjJG/PHkoiRiK6yG8gign8vv4DAwJKsiNZxDAs
-LGBFwzjlfD8Wpo+OQQSuw8kHCJRhMpjBlkWYXuAIXrPVJBZmr3hYQbaL413EFp0w
-DeQUzP0mIzpEU0FfZmFjdG9yOgAAr2ShZqfqP4RkV02MsarSDNg/K9RXc5f9JiM6
-RFNBX2ZhY3RvcjoAAK9F/Ldv8ksX8Ns3uqh8GEEDq88XZIeh/SYjOkRTQV9mYWN0
-b3I6AACvaOM+Tasvvj5+aQ3E44IHW8xzeXdM5bQbTm8gVXNlciA8bm8udXNlckBu
-by5kb21haW4+iFkEExECABkFAj8qsjAECwcDAgMVAgMDFgIBAh4BAheAAAoJEOvM
-hgJ6QMoGIQcAniz8Z+AESmwwrtQpllkLWaXQhkNMAJ4yqLAKSsfimKf3BDjxUzJ5
-6RKTE50BVwQ/KrIxEAQA26Y+QRaR7RymzyUW7MQlDbshD/vInLtb36FusuOWzL5T
-gYn6fiiu/e/J+qjZO5psucWelnBIbnLTZZJs06EgybLPCeEP34X7cSsAPZ2JE+TK
-PM93pxpQpRdWKhv+ocjJ4xPlwI8LTrQIHKxB3yF2WNCh/TQDi0hm6ktEi2RVusMA
-AwUD/3Wp0UbJ2/bgM9wOMAD8celvbl9V/L+9/UVBJrw4tH87FMZiNMNg13TbMrAR
-qJjdpOoHzozMv1GOumC5sE8A0/pwbIdU9oSYA07D3+02dCQq+52aqtCGJoRq5okc
-cQelRcs0cZIy/z5lzwsNnbshrmnqNdmuVf7BSdw7DjoFj5OL/gMDAkqyI1nEMCws
-YMk7XUGj7+BY1uyYyNpYp50F52HFsGXEffiKYPGIuybuP+Yz3ic4W9aQTJJPcIJg
-ZqUP9b14WfY4mgIm1Tz9JiM6RUxHX2ZhY3RvcjoAAKsH4JdVQugM+lGnuNuGoj7I
-V8O8bIsP/SYjOkVMR19mYWN0b3I6AACrBzvFd1NLrbYGMjsN3SKhgBtuHjGQx/0m
-IzpFTEdfZmFjdG9yOgAAqwR77L22dgo/dV8XO8NThXMbEmQgoY39JiM6RUxHX2Zh
-Y3RvcjoAAKsFRPzjSodiTFMeiwWHgpdgf4e2qzEN/SYjOkVMR19mYWN0b3I6AACr
-BX9hqiLZJKfgpo/hs/0wK8yHq6GXh4hGBBgRAgAGBQI/KrIxAAoJEOvMhgJ6QMoG
-WgoAoKwAHwpedO9qQNBu0REM1jNR9PuuAJ9ZtHyuOiziV/JageUT+hZ8s27U3A==
-=xLRp
------END PGP PRIVATE KEY BLOCK-----
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/data/messages/.cvsignore b/camel/tests/data/messages/.cvsignore
deleted file mode 100644
index e358dd1903..0000000000
--- a/camel/tests/data/messages/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-*.msg
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 e49fd92a87..0000000000
--- a/camel/tests/folder/Makefile.am
+++ /dev/null
@@ -1,28 +0,0 @@
-
-INCLUDES = \
- -I$(includedir) \
- -I$(top_srcdir) \
- -I$(top_srcdir)/intl \
- -I$(top_srcdir)/e-util \
- -I$(top_srcdir)/camel \
- -I$(top_srcdir)/camel/tests/lib \
- -DG_LOG_DOMAIN=\"evolution-tests\" \
- $(CAMEL_CFLAGS)
-
-LDADD = \
- $(top_builddir)/camel/libcamel.la \
- $(top_builddir)/e-util/libeutil.la \
- $(top_builddir)/camel/tests/lib/libcameltest.a \
- $(INTLLIBS) \
- $(EVOLUTION_MAIL_LIBS)
-
-check_PROGRAMS = \
- test1 test2 test3 \
- test4 test5 test6 \
- test7 test8 test9 \
- test10
-
-TESTS = test1 test2 test3 \
- test4 test5 test6 \
- test7 test8 test9 \
- test10
diff --git a/camel/tests/folder/README b/camel/tests/folder/README
deleted file mode 100644
index 3ab64ecd1c..0000000000
--- a/camel/tests/folder/README
+++ /dev/null
@@ -1,12 +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
-test10 multithreaded folder/store object bag torture test
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/test10.c b/camel/tests/folder/test10.c
deleted file mode 100644
index f96c885ef0..0000000000
--- a/camel/tests/folder/test10.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/* threaded folder testing */
-
-#include <string.h>
-#include <pthread.h>
-
-#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_LOOP (10000)
-#define MAX_THREADS (5)
-
-#define d(x)
-
-#define ARRAY_LEN(x) (sizeof(x)/sizeof(x[0]))
-
-static char *local_providers[] = {
- "mbox",
- "mh",
- "maildir"
-};
-
-static char *path;
-static CamelSession *session;
-static int testid;
-
-static void *
-worker(void *d)
-{
- int i;
- CamelException *ex = camel_exception_new();
- CamelStore *store;
- CamelFolder *folder;
-
- for (i=0;i<MAX_LOOP;i++) {
- store = camel_session_get_store(session, path, ex);
- camel_exception_clear(ex);
- folder = camel_store_get_folder(store, "testbox", CAMEL_STORE_FOLDER_CREATE, ex);
- camel_exception_clear(ex);
- if (testid == 0) {
- camel_object_unref(folder);
- camel_object_unref(store);
- } else {
- camel_object_unref(store);
- camel_object_unref(folder);
- }
- }
-
- camel_exception_free(ex);
-
- return NULL;
-}
-
-int main(int argc, char **argv)
-{
- CamelException *ex;
- int i, j;
- pthread_t threads[MAX_THREADS];
-
- 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 (testid=0;testid<2;testid++) {
- if (testid == 0)
- camel_test_start("store and folder bag torture test, stacked references");
- else
- camel_test_start("store and folder bag torture test, unstacked references");
-
- for (j=0;j<ARRAY_LEN(local_providers);j++) {
-
- camel_test_push("provider %s", local_providers[j]);
- path = g_strdup_printf("%s:///tmp/camel-test/%s", local_providers[j], local_providers[j]);
-
- for (i=0;i<MAX_THREADS;i++)
- pthread_create(&threads[i], 0, worker, NULL);
-
- for (i=0;i<MAX_THREADS;i++)
- pthread_join(threads[i], NULL);
-
- test_free(path);
-
- camel_test_pull();
- }
-
- camel_test_end();
- }
-
- 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 57a449ff59..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, "testbox");
- }
-
- /* create a pseudo-spool file, and check that */
- creat("/tmp/camel-test/testbox", 0600);
- test_folder_message_ops(session, "spool:///tmp/camel-test/testbox", TRUE, "INBOX");
-
- 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 1449821d91..0000000000
--- a/camel/tests/folder/test3.c
+++ /dev/null
@@ -1,339 +0,0 @@
-/* folder/index testing */
-
-#include <gtk/gtk.h>
-
-#include <string.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\")" },
- { { 100, 50, 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, 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();
-
- camel_test_nonfatal("Index not guaranteed to be accurate before sync: should be fixed eventually");
- push("Search before sync");
- run_search(folder, 100);
- pull();
- camel_test_fatal();
-
- 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 e6c58e023d..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 f0fd8a25ee..0000000000
--- a/camel/tests/folder/test6.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/* folder 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>
-
-#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, "testbox");
- test_folder_message_ops(session, path, FALSE, "INBOX");
- /*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 3dee12916d..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, "testbox");
- 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 c035f6227c..0000000000
--- a/camel/tests/folder/test8.c
+++ /dev/null
@@ -1,205 +0,0 @@
-/* threaded folder testing */
-
-#include <string.h>
-#include <pthread.h>
-
-#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)
-
-#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 %08x 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 %08x subject", j);
- camel_mime_message_set_subject(msg, subject);
- pull();
-
- push("appending simple message %d", j);
- camel_folder_append_message(folder, msg, NULL, 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 %08x 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();
-
- content = g_strdup_printf("Test message %08x contents\n\n", id+i);
- push("comparing content '%s': '%s'", res->pdata[0], content);
- 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;
-}
diff --git a/camel/tests/folder/test9.c b/camel/tests/folder/test9.c
deleted file mode 100644
index 79d34c76a5..0000000000
--- a/camel/tests/folder/test9.c
+++ /dev/null
@@ -1,229 +0,0 @@
-/* folder/index testing */
-
-#include <string.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"
-#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(session);
- 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(session);
- 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(session);
- 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 93ec07abd5..0000000000
--- a/camel/tests/lib/Makefile.am
+++ /dev/null
@@ -1,22 +0,0 @@
-
-INCLUDES = \
- -I$(includedir) \
- -I$(top_srcdir) \
- -I$(top_srcdir)/intl \
- -I$(top_srcdir)/e-util \
- -I$(top_srcdir)/camel \
- $(CAMEL_CFLAGS)
-
-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
-
-libcameltest_a_LIBADD = \
- $(top_builddir)/e-util/libeutil.la
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 57275511c4..0000000000
--- a/camel/tests/lib/addresses.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-#include <string.h>
-
-#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 41622cb3ea..0000000000
--- a/camel/tests/lib/camel-test.c
+++ /dev/null
@@ -1,355 +0,0 @@
-
-#include "camel-test.h"
-
-#include <stdio.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <pthread.h>
-#include <unistd.h>
-#include <signal.h>
-#include <errno.h>
-
-#include <camel/camel.h>
-
-/* 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())
-
-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;
-
- printf("\nThread %d:\n", id);
-
- 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);
-
- if (camel_test_verbose > 2) {
- printf("Attach debugger to pid %d to debug\n", getpid());
- sleep(1000);
- }
- }
-
- _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)
-{
- struct stat st;
- char *path;
- int i;
-
- setup = 1;
-
- /* yeah, we do need ot thread init, even though camel isn't compiled with enable threads */
- g_thread_init (NULL);
-
- path = g_strdup_printf ("/tmp/camel-test");
- if (mkdir (path, 0700) == -1 && errno != EEXIST)
- abort ();
-
- if (stat (path, &st) == -1)
- abort ();
-
- if (!S_ISDIR (st.st_mode) || access (path, R_OK | W_OK | X_OK) == -1)
- abort ();
-
- camel_init (path, FALSE);
- g_free (path);
-
- camel_type_init ();
-
- info_table = g_hash_table_new(0, 0);
-
- 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 a670576564..0000000000
--- a/camel/tests/lib/folders.c
+++ /dev/null
@@ -1,568 +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 */
- push("no message info");
- info = camel_folder_get_message_info(folder, uid);
- check(info == NULL);
- pull();
-
- /* then, getting message */
- push("no message");
- msg = camel_folder_get_message(folder, uid, ex);
- check(camel_exception_is_set(ex));
- check(msg == NULL);
- camel_exception_clear(ex);
- pull();
-
- /* see if it is not in the summary (only once) */
- push("not in summary list");
- 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);
- pull();
-
- /* check it is not in the uid list */
- push("not in 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);
- pull();
-
- 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, 2);
- }
- 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);
- if (local)
- check_unref(folder, 1);
- else
- check_unref(folder, 2);
- 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);
- if (local)
- check_unref(folder, 1);
- else
- check_unref(folder, 2);
- 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);
- if (local)
- check_unref(folder, 1);
- else
- check_unref(folder, 2);
- 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, const char *mailbox)
-{
- CamelStore *store;
- CamelException *ex = camel_exception_new();
- CamelFolder *folder;
- CamelMimeMessage *msg;
- int j;
- int indexed, max;
- GPtrArray *uids;
- CamelMessageInfo *info;
-
- max=local?2:1;
-
- for (indexed = 0;indexed<max;indexed++) {
- char *what = g_strdup_printf("folder ops: %s %s", name, local?(indexed?"indexed":"non-indexed"):"");
- int flags;
-
- camel_test_start(what);
- test_free(what);
-
- push("getting store");
- store = camel_session_get_store(session, name, ex);
- check_msg(!camel_exception_is_set(ex), "getting store: %s", camel_exception_get_description(ex));
- check(store != NULL);
- pull();
-
- push("creating %sindexed folder", indexed?"":"non-");
- if (indexed)
- flags = CAMEL_STORE_FOLDER_CREATE|CAMEL_STORE_FOLDER_BODY_INDEX;
- else
- flags = CAMEL_STORE_FOLDER_CREATE;
- folder = camel_store_get_folder(store, mailbox, flags, ex);
-
- /* we can't create mailbox outside of namespace, since we have no api for it, try
- using inbox namespace, works for courier */
- if (folder == NULL) {
- char *mbox = g_strdup_printf("INBOX/%s", mailbox);
- mailbox = mbox;
- camel_exception_clear(ex);
- 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, NULL, ex);
- check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex));
-
-#if 0
- /* 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();
- }
-#endif
- /*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);
- if (uids->len > j)
- test_folder_message(folder, uids->pdata[j]);
- pull();
-
- push("checking it is the right message (subject): %s", subject);
- if (uids->len > j) {
- info = camel_folder_get_message_info(folder, uids->pdata[j]);
- check(info != NULL);
- check_msg(strcmp(camel_message_info_subject(info), subject)==0,
- "info->subject %s", camel_message_info_subject(info));
- camel_folder_free_message_info(folder, info);
- }
- camel_folder_free_uids(folder, uids);
- pull();
-
- test_free(subject);
-
- /*if (!local)
- camel_test_fatal();*/
-
- check_unref(msg, 1);
- pull();
- }
-
- if (local)
- check_unref(folder, 1);
- else
- check_unref(folder, 2);
- pull();
-
-#if 0
- 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();
-#endif
-
- 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();
-
- if (local)
- check_unref(folder, 1);
- else
- check_unref(folder, 2);
- pull(); /* re-opening folder */
-
- if (strcasecmp(mailbox, "INBOX") != 0) {
- 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();
- }
-
- if (!local) {
- push("disconneect service");
- camel_service_disconnect((CamelService *)store, TRUE, 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 ae981611d3..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, const char *foldername);
diff --git a/camel/tests/lib/messages.c b/camel/tests/lib/messages.c
deleted file mode 100644
index ff3485f9c2..0000000000
--- a/camel/tests/lib/messages.c
+++ /dev/null
@@ -1,290 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-
-#include "messages.h"
-#include "camel-test.h"
-
-#include <camel/camel-multipart.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;
-}
-
-static void
-hexdump (const unsigned char *in, int inlen)
-{
- const unsigned char *inptr = in, *start = inptr;
- const unsigned char *inend = in + inlen;
- int octets;
-
- while (inptr < inend) {
- octets = 0;
- while (inptr < inend && octets < 16) {
- printf ("%.2X ", *inptr++);
- octets++;
- }
-
- while (octets < 16) {
- printf (" ");
- octets++;
- }
-
- printf (" ");
-
- while (start < inptr) {
- fputc (isprint ((int) *start) ? *start : '.', stdout);
- start++;
- }
-
- fputc ('\n', stdout);
- }
-}
-
-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_decode_to_stream(dw, (CamelStream *)content);
-
- if (content->buffer->len != len) {
- printf ("original text:\n");
- hexdump (text, len);
-
- printf ("new text:\n");
- hexdump (content->buffer->data, content->buffer->len);
- }
-
- 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 (CamelMimeMessage *msg)
-{
- CamelMimeMessage *msg2;
- CamelStreamMem *mem1, *mem2;
-
- mem1 = (CamelStreamMem *) camel_stream_mem_new ();
- check_msg(camel_data_wrapper_write_to_stream ((CamelDataWrapper *) msg, (CamelStream *) mem1) != -1, "write_to_stream 1 failed");
- camel_stream_reset ((CamelStream *) mem1);
-
- msg2 = camel_mime_message_new ();
- check_msg(camel_data_wrapper_construct_from_stream ((CamelDataWrapper *) msg2, (CamelStream *) mem1) != -1, "construct_from_stream 1 failed");
- camel_stream_reset ((CamelStream *) mem1);
-
- mem2 = (CamelStreamMem *) camel_stream_mem_new ();
- check_msg(camel_data_wrapper_write_to_stream ((CamelDataWrapper *) msg2, (CamelStream *) mem2) != -1, "write_to_stream 2 failed");
- camel_stream_reset ((CamelStream *) mem2);
-
- if (mem1->buffer->len != mem2->buffer->len) {
- CamelDataWrapper *content;
-
- printf ("mem1 stream:\n%.*s\n", mem1->buffer->len, mem1->buffer->data);
- printf ("mem2 stream:\n%.*s\n\n", mem2->buffer->len, mem2->buffer->data);
-
- printf("msg1:\n");
- test_message_dump_structure(msg);
- printf("msg2:\n");
- test_message_dump_structure(msg2);
-
- content = camel_medium_get_content_object ((CamelMedium *) msg);
- }
-
- check_unref(msg2, 1);
-
- check_msg (mem1->buffer->len == mem2->buffer->len,
- "mem1->buffer->len = %d, mem2->buffer->len = %d",
- mem1->buffer->len, mem2->buffer->len);
-
- check_msg (memcmp (mem1->buffer->data, mem2->buffer->data, mem1->buffer->len) == 0, "msg/stream compare");
-
- camel_object_unref (mem1);
- camel_object_unref (mem2);
-
- return 0;
-}
-
-int
-test_message_compare_header(CamelMimeMessage *m1, CamelMimeMessage *m2)
-{
- return 0;
-}
-
-int
-test_message_compare_messages(CamelMimeMessage *m1, CamelMimeMessage *m2)
-{
- return 0;
-}
-
-static void
-message_dump_rec(CamelMimeMessage *msg, CamelMimePart *part, int depth)
-{
- CamelDataWrapper *containee;
- int parts, i;
- char *s;
- char *mime_type;
-
- s = alloca(depth+1);
- memset(s, ' ', depth);
- s[depth] = 0;
-
- mime_type = camel_data_wrapper_get_mime_type((CamelDataWrapper *)part);
- printf("%sPart <%s>\n", s, ((CamelObject *)part)->klass->name);
- printf("%sContent-Type: %s\n", s, mime_type);
- g_free(mime_type);
- printf("%s encoding: %s\n", s, camel_transfer_encoding_to_string(((CamelDataWrapper *)part)->encoding));
- printf("%s part encoding: %s\n", s, camel_transfer_encoding_to_string(part->encoding));
-
- containee = camel_medium_get_content_object (CAMEL_MEDIUM (part));
-
- if (containee == NULL)
- return;
-
- mime_type = camel_data_wrapper_get_mime_type(containee);
- printf("%sContent <%s>\n", s, ((CamelObject *)containee)->klass->name);
- printf ("%sContent-Type: %s\n", s, mime_type);
- g_free (mime_type);
- printf("%s encoding: %s\n", s, camel_transfer_encoding_to_string(((CamelDataWrapper *)containee)->encoding));
-
- /* 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);
-
- message_dump_rec(msg, part, depth+1);
- }
- } else if (CAMEL_IS_MIME_MESSAGE (containee)) {
- message_dump_rec(msg, (CamelMimePart *)containee, depth+1);
- }
-}
-
-void
-test_message_dump_structure(CamelMimeMessage *m)
-{
- message_dump_rec(m, (CamelMimePart *)m, 0);
-}
diff --git a/camel/tests/lib/messages.h b/camel/tests/lib/messages.h
deleted file mode 100644
index 1f892c3cc8..0000000000
--- a/camel/tests/lib/messages.h
+++ /dev/null
@@ -1,15 +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);
-int test_message_compare (CamelMimeMessage *msg);
-
-void test_message_dump_structure(CamelMimeMessage *m);
diff --git a/camel/tests/lib/session.c b/camel/tests/lib/session.c
deleted file mode 100644
index bf23fbe377..0000000000
--- a/camel/tests/lib/session.c
+++ /dev/null
@@ -1,44 +0,0 @@
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "session.h"
-
-static void
-class_init (CamelTestSessionClass *camel_test_session_class)
-{
- CamelSessionClass *camel_session_class =
- CAMEL_SESSION_CLASS (camel_test_session_class);
-}
-
-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 32b4294aa2..0000000000
--- a/camel/tests/message/Makefile.am
+++ /dev/null
@@ -1,25 +0,0 @@
-
-INCLUDES = \
- -I$(includedir) \
- -I$(top_srcdir) \
- -I$(top_srcdir)/intl \
- -I$(top_srcdir)/e-util \
- -I$(top_srcdir)/camel \
- -I$(top_srcdir)/camel/tests/lib \
- -DG_LOG_DOMAIN=\"evolution-tests\" \
- $(CAMEL_CFLAGS)
-
-LDADD = \
- $(top_builddir)/camel/libcamel.la \
- $(top_builddir)/e-util/libeutil.la \
- $(top_builddir)/camel/tests/lib/libcameltest.a \
- $(INTLLIBS) \
- $(EVOLUTION_MAIL_LIBS)
-
-check_PROGRAMS = \
- test1 \
- test2 \
- test3 \
- test4
-
-TESTS = test1 test2 test3 test4
diff --git a/camel/tests/message/README b/camel/tests/message/README
deleted file mode 100644
index 4b3c953a63..0000000000
--- a/camel/tests/message/README
+++ /dev/null
@@ -1,9 +0,0 @@
-
-test1 creating, saving, loading simple messages
-test2 camelinternetaddress tests, internationalised addresses, etc.
-test3 multipart messages
-test4 more encompassing mime parser tests that test real-world messages.
- Note: In order to test this, though, you'll need to fetch
- http://primates.ximian.com/~fejj/camel-mime-tests.tar.gz and
- untar it into camel/tests/data/
-
diff --git a/camel/tests/message/test1.c b/camel/tests/message/test1.c
deleted file mode 100644
index 8dcf84c92c..0000000000
--- a/camel/tests/message/test1.c
+++ /dev/null
@@ -1,201 +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 <string.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_TRANSFER_NUM_ENCODINGS;i++) {
-
- push("test simple message, encoding %s", camel_transfer_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/message/test4.c b/camel/tests/message/test4.c
deleted file mode 100644
index ff3b08af30..0000000000
--- a/camel/tests/message/test4.c
+++ /dev/null
@@ -1,129 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2003 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 <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <dirent.h>
-
-#include "camel-test.h"
-#include "messages.h"
-
-#include <camel/camel-multipart.h>
-#include <camel/camel-mime-message.h>
-#include <camel/camel-stream-fs.h>
-#include <camel/camel-stream-mem.h>
-
-
-#if 0
-static void
-dump_mime_struct (CamelMimePart *mime_part, int depth)
-{
- CamelDataWrapper *content;
- char *mime_type;
- int i = 0;
-
- while (i < depth) {
- printf (" ");
- i++;
- }
-
- content = camel_medium_get_content_object ((CamelMedium *) mime_part);
-
- mime_type = camel_data_wrapper_get_mime_type (content);
- printf ("Content-Type: %s\n", mime_type);
- g_free (mime_type);
-
- if (CAMEL_IS_MULTIPART (content)) {
- guint num, index = 0;
-
- num = camel_multipart_get_number ((CamelMultipart *) content);
- while (index < num) {
- mime_part = camel_multipart_get_part ((CamelMultipart *) content, index);
- dump_mime_struct (mime_part, depth + 1);
- index++;
- }
- } else if (CAMEL_IS_MIME_MESSAGE (content)) {
- dump_mime_struct ((CamelMimePart *) content, depth + 1);
- }
-}
-#endif
-
-int main (int argc, char **argv)
-{
- struct dirent *dent;
- DIR *dir;
- int fd;
-
- camel_test_init (argc, argv);
-
- camel_test_start ("Message Test Suite");
-
- if (!(dir = opendir ("../data/messages")))
- return 77;
-
- while ((dent = readdir (dir)) != NULL) {
- CamelMimeMessage *message;
- CamelStream *stream;
- char *filename;
- struct stat st;
-
- if (dent->d_name[0] == '.')
- continue;
-
- filename = g_strdup_printf ("../data/messages/%s", dent->d_name);
- if (stat (filename, &st) == -1 || !S_ISREG (st.st_mode)) {
- g_free (filename);
- continue;
- }
-
- if ((fd = open (filename, O_RDONLY)) == -1) {
- g_free (filename);
- continue;
- }
-
- push ("testing message `%s`", filename);
- g_free (filename);
-
- stream = camel_stream_fs_new_with_fd (fd);
- message = camel_mime_message_new ();
- camel_data_wrapper_construct_from_stream ((CamelDataWrapper *) message, stream);
- camel_stream_reset (stream);
-
- /*dump_mime_struct ((CamelMimePart *) message, 0);*/
- test_message_compare (message);
-
- camel_object_unref (message);
- camel_object_unref (stream);
-
- pull ();
- }
-
- closedir (dir);
-
- camel_test_end ();
-
- return 0;
-}
diff --git a/camel/tests/mime-filter/.cvsignore b/camel/tests/mime-filter/.cvsignore
deleted file mode 100644
index f8d627b581..0000000000
--- a/camel/tests/mime-filter/.cvsignore
+++ /dev/null
@@ -1,8 +0,0 @@
-.deps
-Makefile
-Makefile.in
-.libs
-*.lo
-*.la
-test-crlf
-test-charset \ No newline at end of file
diff --git a/camel/tests/mime-filter/Makefile.am b/camel/tests/mime-filter/Makefile.am
deleted file mode 100644
index 21635f839f..0000000000
--- a/camel/tests/mime-filter/Makefile.am
+++ /dev/null
@@ -1,36 +0,0 @@
-
-INCLUDES = \
- -I$(includedir) \
- -I$(top_srcdir) \
- -I$(top_srcdir)/intl \
- -I$(top_srcdir)/e-util \
- -I$(top_srcdir)/camel \
- -I$(top_srcdir)/camel/tests/lib \
- -DG_LOG_DOMAIN=\"evolution-tests\" \
- -DSOURCEDIR=\"$(srcdir)\" \
- $(CAMEL_CFLAGS)
-
-LDADD = \
- $(top_builddir)/camel/libcamel.la \
- $(top_builddir)/e-util/libeutil.la \
- $(top_builddir)/camel/tests/lib/libcameltest.a \
- $(INTLLIBS) \
- $(EVOLUTION_MAIL_LIBS)
-
-EXTRA_DIST = \
- crlf-1.in \
- crlf-1.out \
- charset-iso-2022-jp.0.in \
- charset-iso-2022-jp.0.out \
- charset-gb2312.0.in \
- charset-gb2312.0.out
-
-check_PROGRAMS = \
- test-crlf \
- test-charset \
- test-tohtml
-
-TESTS = test-crlf test-charset test-tohtml
-
-
-
diff --git a/camel/tests/mime-filter/charset-gb2312.0.in b/camel/tests/mime-filter/charset-gb2312.0.in
deleted file mode 100644
index 82520ac916..0000000000
--- a/camel/tests/mime-filter/charset-gb2312.0.in
+++ /dev/null
@@ -1,448 +0,0 @@
-<html><head>
-<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
-<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
-<meta name="ProgId" content="FrontPage.Editor.Document">
-<title>һվʽóס漰ƹϵͳ An all-in-one solution for trading, inventory, accounting management</title>
-
-
-<style>
-<!--
-#fps0 {font-style: normal}
-#fps1 {background-color: #339933}
-#fps2 {font-family:times new roman;font-size:24pt;color:#0066ff;}
-#fps3 {font-family:times new roman;font-size:18pt;color:#0066ff;}
-#fps4 {font-family:SimSun;font-size:14pt}
-#fps5 {color:#0066ff;font-weight:bold;}
-#fps6 {font-size:10pt;}
-#fps7 {color:#ffffff;}
-#fps8 {font-family:times new roman;color:#ffffff;font-weight:bold;}
-#fps9 {font-family:times new roman;font-size:10pt;}
-#fps10 {font-size:10pt;color:#0066ff;}
--->
-</style>
-
-</head>
-
-<body topmargin="0" leftmargin="10" bgcolor="#FFFFFF" >
- <table border=0 cellpadding=0 cellspacing=0 style="border-collapse: collapse" bordercolor=#111111 id=AutoNumber1 height=233>
- <tr valign=top>
- <td height=165>
- <p align=justify>
-
-
- <em id=fps0>
- <strong>
- <span id=fps2>TRADE</span><span id=fps3>dot</span><span id=fps2>NET</span></strong></em><span lang=zh-tw><!----><span id=fps4> </span>
- </span><font color=#FF0000>
- <strong><font size=2>&nbsp;<br>
- </font></strong></font><font face=SimSun size=2>һվʽóס漰ƹϵͳܶʼ롢ݴ౨ۡƱ֡ռʡƱļЧعóס漰</font></td>
- <td height=165>
- <p align=justify>
-
-
- <em id=fps0>
- <strong>
- <span id=fps2>TRADE</span><span id=fps3>dot</span><span id=fps2>NET</span></strong></em><span lang=zh-tw><!----><span id=fps4> </span>
- </span><font size=2><!----><font color=#FF0000>
- <strong>&nbsp;<br>
- <font face="Times New Roman">What's the most annoying part during your
- work? </font>
- </strong></font><font face="Times New Roman">Endless repetitive data
- entry, calculation and paper work on quotation, invoice, inventory
- management, daily voucher, journal and reporting? Once you have installed<span id=fps5>
- TRADEdotNET</span>,<span id=fps5> </span>all of these
- annoying work will never appear in your office again!<span id=fps5><br>
- TRADEdotNET</span> is an all-in-one solution for trading, inventory,
- accounting management. In the <span id=fps5>TRADEdotNET</span>&nbsp;
- environment, all data can be continuously retrieved and reused. This will
- help you for minimizing time consumed on data entry and enhancing
- efficiency.</font></font></td>
- </tr>
- <tr valign=top>
- <td height=68><em id=fps0>
- <strong>
- <span id=fps2>TRADE</span><span id=fps3>dot</span><span id=fps2>NET</span></strong></em><span lang=zh-tw><!----><span id=fps4> </span>
- </span>ֱ<span lang=zh-tw></span>ϵͳɣó׶<font face=SimSun></font>ϵͳ</td>
- <td height=68><em id=fps0>
- <strong>
- <span id=fps2>TRADE</span><span id=fps3>dot</span><span id=fps2>NET</span></strong></em><span lang=zh-tw><!----><span id=fps4> </span>
- </span><font face="Times New Roman">Containing Trading Management
- Module, Inventory Management Module and Accounting Management Module.</font></td>
- </tr>
- </table>
- <p align=center><span id=fps6>
- <img border=0 src=Flow2.gif width=600 height=420></span></p>
- <table border=0 cellpadding=0 cellspacing=0 style="border-collapse: collapse" bordercolor=#111111 id=AutoNumber2 height=15>
- <tr valign=top>
- <td height=129>
- <em id=fps0>
- <strong>
- <span id=fps2>TRADE</span><span id=fps3>dot</span><span id=fps2>NET</span></strong></em><span lang=zh-tw><!----><span id=fps4> </span>
- </span><span id=fps6>ŵ</span><span lang=zh-tw><!----><span id=fps6></span></span><span id=fps6><br>
- </span>
- <span id=fps7><!----><span id=fps1><b>&nbsp;ϵͳ
- </b> <span id=fps6>
- <br>
- </span>
- </span></span> <span id=fps6> <br>
- IJͼʾϵͳҪ̣û˳ÿһ衣ûֻ밴ͼͼ񣬼ϵͳݷʽɽضĹܻ档</span></td>
- <td height=129>
-
-
- <p align=justify>
-
-
- <em id=fps0>
- <strong>
- <span id=fps2>TRADE</span><span id=fps3>dot</span><span id=fps2>NET</span></strong></em><span lang=zh-tw><!----><span id=fps4> </span>
- </span><font size=4 face="Times New Roman">Highlights :</font><span id=fps6><br>
- </span>
- <font color=#FFFFFF><span id=fps1>
- <span id=fps8>&nbsp;Easy Access
- </span> <span id=fps6>
- <br>
- </span>
- </span></font> <font size=2> <br>
- <span id=fps9>A Road Map showing the user-friendly system
- flow guides users throughout all steps. User can click on the menu icons,
- which act as shortcuts, and enter into the desired function.</span></font></p>
- </td>
- </tr>
- <tr valign=top>
- <td height=135>
- <span id=fps7><!----><span id=fps1><b>&nbsp;ƵIJѯѰ
- </b> <span id=fps6>
- <br>
- </span>
- </span></span> <span id=fps6>
- <br>
- Աشͻѯ򷢳ʱ׼¼̲˷ʱ䣬һش׼ȷӴʧȥⱦĿͻѯѰֲͬʵʱѯܣܿѰݼ¼ֻҪûͻšƷšƱڵһѰѰ漴ʾ </span>
- </td>
- <td height=135>
- <font color=#FFFFFF><span id=fps1>
- <span id=fps8>&nbsp;Perfect On-line Enquiry
- </span> <span id=fps6>
- <br>
- </span>
- </span></font> <font size=2>
- <br>
- <span id=fps9>Under many circumstances, staff also need to
- retrieve past transaction history for handing customer enquiry or placing
- an order, however they cannot get the required information immediately and
- this may drive away the customers. On-line Enquiry engine enables staff to
- check past transaction with searching parameters such as key words, client
- code, item code, invoice date. </span>
- </font></td>
- </tr>
- <tr valign=top>
- <td height=83>
- <span style="background-color: #339933; font-weight:700" id="fps7">&nbsp;ļ </span><span id=fps6>
- <br>
- <br>
- ϵͳʽӿԳõĴƱΪûʱӦͬռʸʽܸЧʵشճ</span></td>
- <td height=83>
- <font color=#FFFFFF face="Times New Roman">
- <span style="background-color: #339933; font-weight:700">&nbsp;Input
- Template </span></font><font size=2>
- <br>
- <br>
- <span id=fps9>The data entry journal interface is similar
- to paper voucher, so that users can handle their daily accounting
- transaction as they used to, yet more efficient.</span></font></td>
- </tr>
- <tr valign=top>
- <td height=76>
- <b>
- <font color=#FFFFFF><span id=fps1>&nbsp;޼¼ </span></font>&nbsp;</b><font size=2><br>
- <br>
- ϵͳǿ󣬲¼ޣûʱκʱڵĽ׼¼
- </font>
- </td>
- <td height=76>
- <font face="Times New Roman">
- <b>
- <font color=#FFFFFF><span id=fps1>&nbsp;Unlimited
- Data Record </span></font>&nbsp;</b></font><font size=2><br>
- <br>
- <font face="Times New Roman">The system can store unlimited number of
- records, so that users can retrieve data of any time whenever they need
- it.</font></font></td>
- </tr>
- <tr valign=top>
- <td height=105>
- <span id=fps7><!----><span id=fps1><b>&nbsp;ϵͳ
- </b> <br>
- </span></span> <span id=fps6>
- <br>
- Ƚĵϵͳ()ֻȨûģϵͳԱӦûְ趨ûȨޡ </span></td>
- <td height=105>
- <font color=#FFFFFF><span id=fps1>
- <span id=fps8>&nbsp;Login Control
- </span> <br>
- </span></font> <font size=2>
- <br>
- <span id=fps9>Advanced access control ensures access right
- is only granted to authorized users. System administrator can also define
- access level of each user according to their capacity, so that confidential
- information can only be retrieved and viewed by senior management.</span></font></td>
- </tr>
- <tr valign=top>
- <td height=87>
- <span id=fps7><!----><span id=fps1><b>&nbsp;ѡʽ
- </b> <br>
- </span></span> <span id=fps6>
- <br>
- ϵͳԿʽƣֻҪSeagate Crystal Report ()Ʊʽӱ</span></td>
- <td height=87>
- <font color=#FFFFFF><span id=fps1>
- <span id=fps8>&nbsp;Customize Report
- </span> <br>
- </span></font> <font size=2>
- <br>
- <span id=fps9>The system is designed with an open architecture
- format. When the system is used with&nbsp; Seagate Crystal Report Software, Users can
- customize report content and format of the system.</span></font></td>
- </tr>
- <tr valign=top>
- <td height=100>
- <font color=#FFFFFF><span id=fps1>
- <b>&nbsp;Ѕn <br>
- </b>
- </span></font> <span id=fps6>
- <br>
- 80%ıMS Excel/WordʽҪͼݷ֮á <br>
- MS Excel/WordȸʽԵʸ͸йԱ </span></td>
- <td height=100>
- <font color=#FFFFFF><span id=fps1>
- <b><font face="Times New Roman">&nbsp;Multi-Report Export Tools </font> <br>
- </b>
- </span></font> <font size=2>
- <br>
- <font face="Times New Roman">Over 80% of reports can be exported to MS
- Excel /&nbsp; Word and data can be translated into graphs and tables for
- further analysis.<br>
- Reports can also be export to MS Excel / Word format independently or send
- to email client with attachment directly.</font></font></td>
- </tr>
- <tr valign=top>
- <td height=118>
- <span id=fps7><!----><span id=fps1><b>&nbsp;ʻ֧
- </b> <br>
- </span>
- </span> <span id=fps6>
- <br>
- Ϊϲó׹˾ڹڻ賧ֹ˾Ҫݻͨ</span><strong><font size=2><span id=fps10>TRADEdotNET</span><font color=#FF0000> </font>
- </font></strong>
- <span id=fps6>ṩȫ氲ȫƽ̨װ</span><font color=#0066FF><strong><span id=fps10> TRADEdotNET </span></strong></font><span id=fps6>ָ֧͸ûʱ԰װ </span><strong><font size=2>
- <span id=fps10>TRADEdotNET</span><font color=#FF0000> </font>
- </font></strong>
- <span id=fps6>ı׼ MS ϵͳʹá</span></td>
- <td height=118>
- <font color=#FFFFFF><span id=fps1>
- <span id=fps8>&nbsp;Internet Ready
- </span> <br>
- </span>
- </font> <font size=2>
- <br>
- <span id=fps9>To facilitate data exchange between trading companies and their offices in
- the Mainland China or Southeast Asia Country, </span> </font>
- <font face="Times New Roman"> <span id=fps9>
- Install and makes use of<strong><font color=#0066FF> TRADEdotNET</font>
- Internet Kit </strong>&nbsp;to provide a secured platform enabling user
- to access the data from different locations anytime through the internet
- with </span><font color=#0066FF><strong><span id=fps10> TRADEdotNET </span></strong></font>
- </font>
- <span id=fps9>system. </span></td>
- </tr>
- <tr valign=top>
- <td height=90>
- <span id=fps7><!----><span id=fps1><b>&nbsp;ݿ֧
- </b> <br>
- </span>
- </span> <span id=fps6>
- <br>
- ΪϲͬС˾ıҪ</span><strong><span id=fps10>TRADEdotNET</span></strong><span id=fps6> ṩͬݿ汾ԹѡƳ MS AccessMS SQLƳ Oracle ݿ⡣<br>
- </span></td>
- <td height=90>
- <font color=#FFFFFF><span id=fps1>
- <span id=fps8>&nbsp;Multi-Database Format
- </span> <br>
- </span>
- </font> <span id=fps6>
- <br>
- </span><font face="Times New Roman"><strong><font size=2><!----><font color=#0066FF>TRADEdotNET</font><font color=#FF0000> </font>
- </font></strong>
- </font><span id=fps9>enables user to select
- different database format versions to fit their company requirements. Now
- users can choose from MS
- Access and MS SQL version.&nbsp; Oracle and other database formats are coming soon.</span></td>
- </tr>
- <tr valign=top>
- <td height=70>
- <span id=fps7><!----><span id=fps1><b>&nbsp;ֹ֧
- </b> <br>
- </span></span>
- <span id=fps6> <br>
- ֶ֧ûֶ֧๫˾ֶ֧ңֶ֧棬ֶ֧(/Ӣ)
- </span></td>
- <td height=70>
- <font color=#FFFFFF><span id=fps1>
- <span id=fps8>&nbsp;Multiple Functionality
- </span> <br>
- </span></font>
- <font size=2> <br>
- <span id=fps9>Support multi-users, multi-companies,
- multi-currencies, multi-inventory, multi-languages (Chinese / English).</span></font></td>
- </tr>
- <tr valign=top>
- <td height=142>
- <span id=fps7>
- <span id=fps1>
- <b>&nbsp;ϵͳҪ
- </b>
- <br>
- </span></span><span id=fps6><br>
- ̨<br>
- Intel Pentium II () Processor PC<br>
- Windows 98, ME, 2000 Windows NT 4.0<br>
- 64 MB RAMƼ128MB<br>
- 256ɫ֮SVGAʾ<br>
- 50MBӲ̿ռ<br>
- Windows 98, ME, 2000 Windows NT 4.0 ֧֮ӡ</span></td>
- <td height=142>
- <font color=#FFFFFF>
- <span id=fps1>
- <span id=fps8>
- &nbsp;System
- Requirements
-
- </span>
- <br>
- </span></font><font size=2><br>
- <span id=fps9>
- Workstation<br>
- Intel Pentium II (or above) Processor PC<br>
- Windows 98, ME, 2000 or Windows NT 4.0<br>
- 64MB RAM
- minimum 128MB
- recommended<br>
- 256 color SVGA display or higher<br>
- 50MB free Hard Disk<br>
- Printers
- supported by
- Windows 98, ME, 2000 Windows NT 4.0<br>
- </span></font></td>
- </tr>
- <tr valign=top>
- <td height=436>
- <span id=fps7>
- <span id=fps1>&nbsp;Χ
- </span></span><span id=fps6>
- <br>
- <br>
- ϵͳʾ<br>
- &nbsp;&nbsp;&nbsp;&nbsp; ϵͳʾ
- <br>
- <br>
- ϵͳװ<br>
- &nbsp;&nbsp;&nbsp;&nbsp; ϵͳװɱ˾רҵʦ
- <br>
- <br>
- ݱݼԭ<br>
- &nbsp;&nbsp;&nbsp;&nbsp; Ϊͻ趨ݱݼԭťϿͻ֮豸<br>
- <br>
- ļʽ<br>
- &nbsp;&nbsp;&nbsp;&nbsp; Ϊͻļʽ߹˾()<br>
- <br>
- ϵͳִ<br>
- &nbsp;&nbsp;&nbsp;&nbsp; Ϊ趨ϵͳ̱ŵִ
- <br>
- <br>
- ûѵ<br>
- &nbsp;&nbsp;&nbsp;&nbsp; ûѵڿͻ칫ңҲ޴
- <br>
- <br>
- ϵͳѯ<br>
- &nbsp;&nbsp;&nbsp;&nbsp; ṩЧֱӵѯ񣬴ϵͳ
- <br>
- <br>
- ϵͳ<br>
- &nbsp;&nbsp;&nbsp;&nbsp; ѱ
- <br>
- &nbsp;&nbsp;&nbsp;&nbsp; ڱΪͻϵͳ
- </span></td>
- <td height=436>
- <font color=#FFFFFF face="Times New Roman">
- <span id=fps1>&nbsp;Services
- Provided
- </span></font><font size=2>
- <br>
- <br>
- <span id=fps9>System Demonstration<br>
- &nbsp;&nbsp;&nbsp;&nbsp; Free-of-charge system demonstration in client's office<br>
- <br>
- System Installation<br>
- &nbsp;&nbsp;&nbsp;&nbsp;
- On-site
- installation
- by our
- professional
- engineers <br>
- <br>
- Backup/Restore<br>
- &nbsp;&nbsp;&nbsp;&nbsp; Setups of backup and restore icons associated with client's backup device (e.g. Zip Drive, MO)<br>
- <br>
- Tailored Format<br>
- &nbsp;&nbsp;&nbsp;&nbsp; Tailored designs on document formats to highlight and promote company image<br>
- <br>
- System Implementation<br>
- &nbsp;&nbsp;&nbsp;&nbsp;
- Implementation
- procedures
- customized for
- each
- organization <br>
- <br>
- User Training<br>
- &nbsp;&nbsp;&nbsp;&nbsp; Unlimited training is provided in the client's office
- <br>
- <br>
- Hot-line Enquiry<br>
- &nbsp;&nbsp;&nbsp;&nbsp; Efficient hot-line support for all system enquiries<br>
- <br>
- System Maintenance<br>
- &nbsp;&nbsp;&nbsp;&nbsp; Half-a-year free maintenance <br>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Free
- upgrade
- services
- throughout
- warranty
- periods </span>
- </font>
- </td>
- </tr>
- </table>
- <table border=0 cellpadding=0 cellspacing=0 style="border-collapse: collapse" bordercolor=#111111 width=100% id=AutoNumber3>
- <tr>
- <td width=100%><b><font size=6 color=#FFFFFF>
- <span style="background-color: #0000FF"><br>
- ӭ Ԥ Լ ʾ &nbsp; : (852) 2591 9377</span></font></b><p> Ѷ
- ˾&nbsp; Superdata International Ltd.<br>
- Tel: (852) 2591 9377 </td>
- </tr>
- </table>
- <p>
- <font size=1>
- <font face="Times New Roman">
- *All prices,
- conditions and
- system
- specifications
- are subject to
- change without
- prior notice.
- </font>м۸漰ϵͳ֮޸ģ֪ͨ</font><span id=fps6>
-
-</span> </p>
-
- </body></html>
diff --git a/camel/tests/mime-filter/charset-gb2312.0.out b/camel/tests/mime-filter/charset-gb2312.0.out
deleted file mode 100644
index 8dcae6bdfc..0000000000
--- a/camel/tests/mime-filter/charset-gb2312.0.out
+++ /dev/null
@@ -1,448 +0,0 @@
-<html><head>
-<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
-<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
-<meta name="ProgId" content="FrontPage.Editor.Document">
-<title>一站式的贸易、库存及会计管理系统 An all-in-one solution for trading, inventory, accounting management</title>
-
-
-<style>
-<!--
-#fps0 {font-style: normal}
-#fps1 {background-color: #339933}
-#fps2 {font-family:times new roman;font-size:24pt;color:#0066ff;}
-#fps3 {font-family:times new roman;font-size:18pt;color:#0066ff;}
-#fps4 {font-family:SimSun;font-size:14pt}
-#fps5 {color:#0066ff;font-weight:bold;}
-#fps6 {font-size:10pt;}
-#fps7 {color:#ffffff;}
-#fps8 {font-family:times new roman;color:#ffffff;font-weight:bold;}
-#fps9 {font-family:times new roman;font-size:10pt;}
-#fps10 {font-size:10pt;color:#0066ff;}
--->
-</style>
-
-</head>
-
-<body topmargin="0" leftmargin="10" bgcolor="#FFFFFF" >
- <table border=0 cellpadding=0 cellspacing=0 style="border-collapse: collapse" bordercolor=#111111 id=AutoNumber1 height=233>
- <tr valign=top>
- <td height=165>
- <p align=justify>
-
-
- <em id=fps0>
- <strong>
- <span id=fps2>TRADE</span><span id=fps3>dot</span><span id=fps2>NET</span></strong></em><span lang=zh-tw><!----><span id=fps4> </span>
- </span><font color=#FF0000>
- <strong><font size=2>&nbsp;<br>
- </font></strong></font><font face=SimSun size=2>是一站式的贸易、库存及会计管理系统,助您精简周而复始的资料输入、数据处理及各类报价、发票、存仓、日记帐、传票、报表等所需的文件行政工作,让您更有效地管理贸易、库存及会计事务。</font></td>
- <td height=165>
- <p align=justify>
-
-
- <em id=fps0>
- <strong>
- <span id=fps2>TRADE</span><span id=fps3>dot</span><span id=fps2>NET</span></strong></em><span lang=zh-tw><!----><span id=fps4> </span>
- </span><font size=2><!----><font color=#FF0000>
- <strong>&nbsp;<br>
- <font face="Times New Roman">What's the most annoying part during your
- work? </font>
- </strong></font><font face="Times New Roman">Endless repetitive data
- entry, calculation and paper work on quotation, invoice, inventory
- management, daily voucher, journal and reporting? Once you have installed<span id=fps5>
- TRADEdotNET</span>,<span id=fps5> </span>all of these
- annoying work will never appear in your office again!<span id=fps5><br>
- TRADEdotNET</span> is an all-in-one solution for trading, inventory,
- accounting management. In the <span id=fps5>TRADEdotNET</span>&nbsp;
- environment, all data can be continuously retrieved and reused. This will
- help you for minimizing time consumed on data entry and enhancing
- efficiency.</font></font></td>
- </tr>
- <tr valign=top>
- <td height=68><em id=fps0>
- <strong>
- <span id=fps2>TRADE</span><span id=fps3>dot</span><span id=fps2>NET</span></strong></em><span lang=zh-tw><!----><span id=fps4> </span>
- </span>分别由<span lang=zh-tw>三</span>组系统组成:贸易订单管理<font face=SimSun>、库存</font>管理及会计系统</td>
- <td height=68><em id=fps0>
- <strong>
- <span id=fps2>TRADE</span><span id=fps3>dot</span><span id=fps2>NET</span></strong></em><span lang=zh-tw><!----><span id=fps4> </span>
- </span><font face="Times New Roman">Containing Trading Management
- Module, Inventory Management Module and Accounting Management Module.</font></td>
- </tr>
- </table>
- <p align=center><span id=fps6>
- <img border=0 src=Flow2.gif width=600 height=420></span></p>
- <table border=0 cellpadding=0 cellspacing=0 style="border-collapse: collapse" bordercolor=#111111 id=AutoNumber2 height=15>
- <tr valign=top>
- <td height=129>
- <em id=fps0>
- <strong>
- <span id=fps2>TRADE</span><span id=fps3>dot</span><span id=fps2>NET</span></strong></em><span lang=zh-tw><!----><span id=fps4> </span>
- </span><span id=fps6>的优点</span><span lang=zh-tw><!----><span id=fps6>:</span></span><span id=fps6><br>
- </span>
- <span id=fps7><!----><span id=fps1><b>&nbsp;简易系统登入
- </b> <span id=fps6>
- <br>
- </span>
- </span></span> <span id=fps6> <br>
- 简单易明的操作流程图显示整个系统的主要流程,引导用户顺利完成每一个步骤。用户只须按下流程图的图像,即系统快捷方式,便可进入特定的功能画面。</span></td>
- <td height=129>
-
-
- <p align=justify>
-
-
- <em id=fps0>
- <strong>
- <span id=fps2>TRADE</span><span id=fps3>dot</span><span id=fps2>NET</span></strong></em><span lang=zh-tw><!----><span id=fps4> </span>
- </span><font size=4 face="Times New Roman">Highlights :</font><span id=fps6><br>
- </span>
- <font color=#FFFFFF><span id=fps1>
- <span id=fps8>&nbsp;Easy Access
- </span> <span id=fps6>
- <br>
- </span>
- </span></font> <font size=2> <br>
- <span id=fps9>A Road Map showing the user-friendly system
- flow guides users throughout all steps. User can click on the menu icons,
- which act as shortcuts, and enter into the desired function.</span></font></p>
- </td>
- </tr>
- <tr valign=top>
- <td height=135>
- <span id=fps7><!----><span id=fps1><b>&nbsp;完善的查询搜寻器
- </b> <span id=fps6>
- <br>
- </span>
- </span></span> <span id=fps6>
- <br>
- 当员工回答客户查询或发出订单,经常需时翻查以往交易纪录,这个过程不仅浪费时间,万一回答不准确,更可能令您从此失去这宝贵的客户。查询搜寻器多种不同的实时查询功能,能快速搜寻所需的数据纪录,只要用户输入客户编号、货品编号、发票日期等其中一项搜寻参数,搜寻结果随即显示。 </span>
- </td>
- <td height=135>
- <font color=#FFFFFF><span id=fps1>
- <span id=fps8>&nbsp;Perfect On-line Enquiry
- </span> <span id=fps6>
- <br>
- </span>
- </span></font> <font size=2>
- <br>
- <span id=fps9>Under many circumstances, staff also need to
- retrieve past transaction history for handing customer enquiry or placing
- an order, however they cannot get the required information immediately and
- this may drive away the customers. On-line Enquiry engine enables staff to
- check past transaction with searching parameters such as key words, client
- code, item code, invoice date. </span>
- </font></td>
- </tr>
- <tr valign=top>
- <td height=83>
- <span style="background-color: #339933; font-weight:700" id="fps7">&nbsp;文件输入 </span><span id=fps6>
- <br>
- <br>
- 系统的总帐接口设计以常用的传票为蓝本,用户无需费时重新适应不同日记帐格式,而且能更有效率地处理日常会计帐项数据输入程序。</span></td>
- <td height=83>
- <font color=#FFFFFF face="Times New Roman">
- <span style="background-color: #339933; font-weight:700">&nbsp;Input
- Template </span></font><font size=2>
- <br>
- <br>
- <span id=fps9>The data entry journal interface is similar
- to paper voucher, so that users can handle their daily accounting
- transaction as they used to, yet more efficient.</span></font></td>
- </tr>
- <tr valign=top>
- <td height=76>
- <b>
- <font color=#FFFFFF><span id=fps1>&nbsp;无限纪录储存 </span></font>&nbsp;</b><font size=2><br>
- <br>
- 系统容量强大,不设纪录储存年期上限,因此用户可以随时查阅任何时期的交易纪录。
- </font>
- </td>
- <td height=76>
- <font face="Times New Roman">
- <b>
- <font color=#FFFFFF><span id=fps1>&nbsp;Unlimited
- Data Record </span></font>&nbsp;</b></font><font size=2><br>
- <br>
- <font face="Times New Roman">The system can store unlimited number of
- records, so that users can retrieve data of any time whenever they need
- it.</font></font></td>
- </tr>
- <tr valign=top>
- <td height=105>
- <span id=fps7><!----><span id=fps1><b>&nbsp;系统登入监控
- </b> <br>
- </span></span> <span id=fps6>
- <br>
- 先进的登入监控系统保障(机密)数据只供授权用户查阅,系统管理员亦可以因应用户的职级而设定个别用户的阅览权限。 </span></td>
- <td height=105>
- <font color=#FFFFFF><span id=fps1>
- <span id=fps8>&nbsp;Login Control
- </span> <br>
- </span></font> <font size=2>
- <br>
- <span id=fps9>Advanced access control ensures access right
- is only granted to authorized users. System administrator can also define
- access level of each user according to their capacity, so that confidential
- information can only be retrieved and viewed by senior management.</span></font></td>
- </tr>
- <tr valign=top>
- <td height=87>
- <span id=fps7><!----><span id=fps1><b>&nbsp;自选报表格式
- </b> <br>
- </span></span> <span id=fps6>
- <br>
- 系统报表以开放式设计,只需要配合Seagate Crystal Report (另购),即可自行设计报表格式或增加报表。</span></td>
- <td height=87>
- <font color=#FFFFFF><span id=fps1>
- <span id=fps8>&nbsp;Customize Report
- </span> <br>
- </span></font> <font size=2>
- <br>
- <span id=fps9>The system is designed with an open architecture
- format. When the system is used with&nbsp; Seagate Crystal Report Software, Users can
- customize report content and format of the system.</span></font></td>
- </tr>
- <tr valign=top>
- <td height=100>
- <font color=#FFFFFF><span id=fps1>
- <b>&nbsp;多向列n报表工具 <br>
- </b>
- </span></font> <span id=fps6>
- <br>
- 超过80%的报表可以MS Excel/Word格式输出,按需要而制作图表供数据分析之用。 <br>
- 报表可以MS Excel/Word等格式独立输出或以电邮附带传送给有关人员。 </span></td>
- <td height=100>
- <font color=#FFFFFF><span id=fps1>
- <b><font face="Times New Roman">&nbsp;Multi-Report Export Tools </font> <br>
- </b>
- </span></font> <font size=2>
- <br>
- <font face="Times New Roman">Over 80% of reports can be exported to MS
- Excel /&nbsp; Word and data can be translated into graphs and tables for
- further analysis.<br>
- Reports can also be export to MS Excel / Word format independently or send
- to email client with attachment directly.</font></font></td>
- </tr>
- <tr valign=top>
- <td height=118>
- <span id=fps7><!----><span id=fps1><b>&nbsp;国际互联支持
- </b> <br>
- </span>
- </span> <span id=fps6>
- <br>
- 为了配合不少贸易公司于国内或东南亚设厂或分公司而需要数据数据互通,</span><strong><font size=2><span id=fps10>TRADEdotNET</span><font color=#FF0000> </font>
- </font></strong>
- <span id=fps6>提供全面安全的整合平台,安装</span><font color=#0066FF><strong><span id=fps10> TRADEdotNET </span></strong></font><span id=fps6>互联网支持附件,透过互联网,用户即可随时随地以安装了 </span><strong><font size=2>
- <span id=fps10>TRADEdotNET</span><font color=#FF0000> </font>
- </font></strong>
- <span id=fps6>的标准 MS 操作系统登入使用。</span></td>
- <td height=118>
- <font color=#FFFFFF><span id=fps1>
- <span id=fps8>&nbsp;Internet Ready
- </span> <br>
- </span>
- </font> <font size=2>
- <br>
- <span id=fps9>To facilitate data exchange between trading companies and their offices in
- the Mainland China or Southeast Asia Country, </span> </font>
- <font face="Times New Roman"> <span id=fps9>
- Install and makes use of<strong><font color=#0066FF> TRADEdotNET</font>
- Internet Kit </strong>&nbsp;to provide a secured platform enabling user
- to access the data from different locations anytime through the internet
- with </span><font color=#0066FF><strong><span id=fps10> TRADEdotNET </span></strong></font>
- </font>
- <span id=fps9>system. </span></td>
- </tr>
- <tr valign=top>
- <td height=90>
- <span id=fps7><!----><span id=fps1><b>&nbsp;多种数据库支持
- </b> <br>
- </span>
- </span> <span id=fps6>
- <br>
- 为了配合不同大小公司的本身需要,</span><strong><span id=fps10>TRADEdotNET</span></strong><span id=fps6> 提供不同数据库版本以供选择。已推出有 MS Access、MS SQL,即将推出有 Oracle 及其它数据库。<br>
-  </span></td>
- <td height=90>
- <font color=#FFFFFF><span id=fps1>
- <span id=fps8>&nbsp;Multi-Database Format
- </span> <br>
- </span>
- </font> <span id=fps6>
- <br>
- </span><font face="Times New Roman"><strong><font size=2><!----><font color=#0066FF>TRADEdotNET</font><font color=#FF0000> </font>
- </font></strong>
- </font><span id=fps9>enables user to select
- different database format versions to fit their company requirements. Now
- users can choose from MS
- Access and MS SQL version.&nbsp; Oracle and other database formats are coming soon.</span></td>
- </tr>
- <tr valign=top>
- <td height=70>
- <span id=fps7><!----><span id=fps1><b>&nbsp;其它支持功能
- </b> <br>
- </span></span>
- <span id=fps6> <br>
- 支持多用户,支持多公司,支持多货币,支持多库存,支持多语言(中文/英文)
- </span></td>
- <td height=70>
- <font color=#FFFFFF><span id=fps1>
- <span id=fps8>&nbsp;Multiple Functionality
- </span> <br>
- </span></font>
- <font size=2> <br>
- <span id=fps9>Support multi-users, multi-companies,
- multi-currencies, multi-inventory, multi-languages (Chinese / English).</span></font></td>
- </tr>
- <tr valign=top>
- <td height=142>
- <span id=fps7>
- <span id=fps1>
- <b>&nbsp;系统要求
- </b>
- <br>
- </span></span><span id=fps6><br>
- 工作台<br>
- Intel Pentium II (或以上) Processor PC<br>
- Windows 98, ME, 2000 或 Windows NT 4.0<br>
- 最少用 64 MB RAM,推荐用128MB<br>
- 256色或以上之SVGA显示器<br>
- 50MB硬盘空间<br>
- Windows 98, ME, 2000 或 Windows NT 4.0 支持之打印机</span></td>
- <td height=142>
- <font color=#FFFFFF>
- <span id=fps1>
- <span id=fps8>
- &nbsp;System
- Requirements
-
- </span>
- <br>
- </span></font><font size=2><br>
- <span id=fps9>
- Workstation<br>
- Intel Pentium II (or above) Processor PC<br>
- Windows 98, ME, 2000 or Windows NT 4.0<br>
- 64MB RAM
- minimum, 128MB
- recommended<br>
- 256 color SVGA display or higher<br>
- 50MB free Hard Disk<br>
- Printers
- supported by
- Windows 98, ME, 2000 或 Windows NT 4.0<br>
-  </span></font></td>
- </tr>
- <tr valign=top>
- <td height=436>
- <span id=fps7>
- <span id=fps1>&nbsp;服务范围
- </span></span><span id=fps6>
- <br>
- <br>
- 系统示范<br>
- &nbsp;&nbsp;&nbsp;&nbsp; 免费上门作系统示范
- 。<br>
- <br>
- 系统安装<br>
- &nbsp;&nbsp;&nbsp;&nbsp; 系统安装会由本公司专业工程师负责
- 。<br>
- <br>
- 数据备份及还原<br>
- &nbsp;&nbsp;&nbsp;&nbsp; 免费为客户设定数据备份及还原按钮,以配合客户之‘备份设备’。<br>
- <br>
- 度身订做文件式样<br>
- &nbsp;&nbsp;&nbsp;&nbsp; 为客户度身订做文件式样,提高公司形象(另费)。<br>
- <br>
- 系统执行<br>
- &nbsp;&nbsp;&nbsp;&nbsp; 为各机构设定系统流程表及监察各部门的执行情况
- 。<br>
- <br>
- 用户培训<br>
- &nbsp;&nbsp;&nbsp;&nbsp; 用户培训可设在客户办公室,而且不限次数
- 。<br>
- <br>
- 系统咨询热线<br>
- &nbsp;&nbsp;&nbsp;&nbsp; 提供有效直接的热线咨询服务,处理系统疑难
- 。<br>
- <br>
- 系统保养<br>
- &nbsp;&nbsp;&nbsp;&nbsp; 半年免费保养
- ; <br>
- &nbsp;&nbsp;&nbsp;&nbsp; 于保养期内免费为客户作系统提升
- 。</span></td>
- <td height=436>
- <font color=#FFFFFF face="Times New Roman">
- <span id=fps1>&nbsp;Services
- Provided
- </span></font><font size=2>
- <br>
- <br>
- <span id=fps9>System Demonstration<br>
- &nbsp;&nbsp;&nbsp;&nbsp; Free-of-charge system demonstration in client's office<br>
- <br>
- System Installation<br>
- &nbsp;&nbsp;&nbsp;&nbsp;
- On-site
- installation
- by our
- professional
- engineers <br>
- <br>
- Backup/Restore<br>
- &nbsp;&nbsp;&nbsp;&nbsp; Setups of backup and restore icons associated with client's backup device (e.g. Zip Drive, MO)<br>
- <br>
- Tailored Format<br>
- &nbsp;&nbsp;&nbsp;&nbsp; Tailored designs on document formats to highlight and promote company image<br>
- <br>
- System Implementation<br>
- &nbsp;&nbsp;&nbsp;&nbsp;
- Implementation
- procedures
- customized for
- each
- organization <br>
- <br>
- User Training<br>
- &nbsp;&nbsp;&nbsp;&nbsp; Unlimited training is provided in the client's office
- <br>
- <br>
- Hot-line Enquiry<br>
- &nbsp;&nbsp;&nbsp;&nbsp; Efficient hot-line support for all system enquiries<br>
- <br>
- System Maintenance<br>
- &nbsp;&nbsp;&nbsp;&nbsp; Half-a-year free maintenance <br>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Free
- upgrade
- services
- throughout
- warranty
- periods </span>
- </font>
- </td>
- </tr>
- </table>
- <table border=0 cellpadding=0 cellspacing=0 style="border-collapse: collapse" bordercolor=#111111 width=100% id=AutoNumber3>
- <tr>
- <td width=100%><b><font size=6 color=#FFFFFF>
- <span style="background-color: #0000FF"><br>
- 欢 迎 预 约 示 范&nbsp;请电 : (852) 2591 9377</span></font></b><p>精 讯 国 际 有
- 限 公 司&nbsp; Superdata International Ltd.<br>
- Tel: (852) 2591 9377 </td>
- </tr>
- </table>
- <p>
- <font size=1>
- <font face="Times New Roman">
- *All prices,
- conditions and
- system
- specifications
- are subject to
- change without
- prior notice.
- </font>所有价格,条规及系统规格之修改,将不另行通知。</font><span id=fps6>
-
- </span> </p>
-
- </body></html>
diff --git a/camel/tests/mime-filter/charset-iso-2022-jp.0.in b/camel/tests/mime-filter/charset-iso-2022-jp.0.in
deleted file mode 100644
index 8c23b208ce..0000000000
--- a/camel/tests/mime-filter/charset-iso-2022-jp.0.in
+++ /dev/null
@@ -1,5 +0,0 @@
-$B$($m$$#t#y$&$H$&$#$&$$$(#y$F#r$A$&$(#r#y$H#y#r$H$($D$*#3#9#4#5#0#9#8#0#9#4$($$#r(B
-$B$H$($D$*$($&$H$($k$H$&#t(B
-
-Thanks & Regards,
-Sures
diff --git a/camel/tests/mime-filter/charset-iso-2022-jp.0.out b/camel/tests/mime-filter/charset-iso-2022-jp.0.out
deleted file mode 100644
index c66c5f79ce..0000000000
--- a/camel/tests/mime-filter/charset-iso-2022-jp.0.out
+++ /dev/null
@@ -1,5 +0,0 @@
-えろいtyうとうぃういえyてrちうえryとyrとえつお3945098094えいr
-とえつおえうとえるとうt
-
-Thanks & Regards,
-Sures
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/data/html.0.in b/camel/tests/mime-filter/data/html.0.in
deleted file mode 100644
index 217f85b4ff..0000000000
--- a/camel/tests/mime-filter/data/html.0.in
+++ /dev/null
@@ -1,10 +0,0 @@
-
-College of Engineering Students,
-
-We are contacting you to request that you consider nominating a College
-of Engineering faculty member for the College's 2003 Excellence in
-Teaching Award. The award criteria and nomination form are attached.
-They can also be found on the web at:
-
- <http://www.ce.udel.edu/teaching_award.html>
- <http://www.ce.udel.edu/nomination_form.html>
diff --git a/camel/tests/mime-filter/data/html.0.out b/camel/tests/mime-filter/data/html.0.out
deleted file mode 100644
index 3f19310dd4..0000000000
--- a/camel/tests/mime-filter/data/html.0.out
+++ /dev/null
@@ -1,10 +0,0 @@
-
-College of Engineering Students,
-
-We are contacting you to request that you consider nominating a College
-of Engineering faculty member for the College's 2003 Excellence in
-Teaching Award. The award criteria and nomination form are attached.
-They can also be found on the web at:
-
-&#9;&lt;<a href="http://www.ce.udel.edu/teaching_award.html">http://www.ce.udel.edu/teaching_award.html</a>&gt;
-&#9;&lt;<a href="http://www.ce.udel.edu/nomination_form.html">http://www.ce.udel.edu/nomination_form.html</a>&gt;
diff --git a/camel/tests/mime-filter/data/html.1.in b/camel/tests/mime-filter/data/html.1.in
deleted file mode 100644
index 8dece6113d..0000000000
--- a/camel/tests/mime-filter/data/html.1.in
+++ /dev/null
@@ -1,10 +0,0 @@
-
-College of Engineering Students,
-
-We are contacting you to request that you consider nominating a College
-of Engineering faculty member for the College's 2003 Excellence in
-Teaching Award. The award criteria and nomination form are attached.
-They can also be found on the web at:
-
- <http://www.ce.udel.edu/teaching_award.html>
- <http://www.ce.udel.edu/nomination_form.html> \ No newline at end of file
diff --git a/camel/tests/mime-filter/data/html.1.out b/camel/tests/mime-filter/data/html.1.out
deleted file mode 100644
index 71a977e7ff..0000000000
--- a/camel/tests/mime-filter/data/html.1.out
+++ /dev/null
@@ -1,10 +0,0 @@
-
-College of Engineering Students,
-
-We are contacting you to request that you consider nominating a College
-of Engineering faculty member for the College's 2003 Excellence in
-Teaching Award. The award criteria and nomination form are attached.
-They can also be found on the web at:
-
-&#9;&lt;<a href="http://www.ce.udel.edu/teaching_award.html">http://www.ce.udel.edu/teaching_award.html</a>&gt;
-&#9;&lt;<a href="http://www.ce.udel.edu/nomination_form.html">http://www.ce.udel.edu/nomination_form.html</a>&gt; \ No newline at end of file
diff --git a/camel/tests/mime-filter/test-charset.c b/camel/tests/mime-filter/test-charset.c
deleted file mode 100644
index 301cf3b2b7..0000000000
--- a/camel/tests/mime-filter/test-charset.c
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- test-crlf.c
-
- Test the CamelMimeFilterCharset class
-*/
-
-#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <dirent.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-charset.h>
-
-#define d(x) x
-
-#define CHUNK_SIZE 4096
-
-int
-main (int argc, char **argv)
-{
- ssize_t comp_progress, comp_correct_chunk, comp_filter_chunk;
- char comp_correct[CHUNK_SIZE], comp_filter[CHUNK_SIZE];
- CamelStream *source;
- CamelStream *correct;
- CamelStreamFilter *filter;
- CamelMimeFilter *f;
- struct dirent *dent;
- int i, test = 0;
- DIR *dir;
-
- camel_test_init(argc, argv);
-
- dir = opendir (SOURCEDIR);
-
- while ((dent = readdir (dir))) {
- char *outfile, *charset, *work;
- const char *ext;
-
- ext = strrchr (dent->d_name, '.');
- if (!(!strncmp (dent->d_name, "charset-", 8) && ext && !strcmp (ext, ".in")))
- continue;
-
- work = g_strdup_printf ("Charset filter, test case %d (%s)", test++, dent->d_name);
- camel_test_start (work);
- g_free (work);
-
- if (!(source = camel_stream_fs_new_with_name (dent->d_name, 0, O_RDONLY))) {
- camel_test_fail ("Failed to open input case in \"%s\"", dent->d_name);
- continue;
- }
-
- outfile = g_strdup_printf ("%.*s.out", ext - dent->d_name, dent->d_name);
-
- if (!(correct = camel_stream_fs_new_with_name (outfile, 0, O_RDONLY))) {
- camel_test_fail ("Failed to open correct output in \"%s\"", outfile);
- g_free (outfile);
- continue;
- }
- g_free (outfile);
-
- if (!(filter = camel_stream_filter_new_with_stream (CAMEL_STREAM (source)))) {
- camel_test_fail ("Couldn't create CamelStreamFilter??");
- continue;
- }
-
- charset = g_strdup (dent->d_name + 8);
- ext = strchr (charset, '.');
- *((char *) ext) = '\0';
-
- if (!(f = (CamelMimeFilter *) camel_mime_filter_charset_new_convert (charset, "UTF-8"))) {
- camel_test_fail ("Couldn't create CamelMimeFilterCharset??");
- g_free (charset);
- continue;
- }
- g_free (charset);
-
- camel_stream_filter_add (filter, f);
- camel_object_unref (f);
-
- 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;
- }
-
- for (i = 0; i < comp_filter_chunk; i++) {
- if (comp_correct[i] != comp_filter[i]) {
- camel_test_fail ("Difference: correct is %c, filter is %c, "
- "%d bytes into stream",
- comp_correct[i],
- comp_filter[i],
- comp_progress + 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_test_pull ();
-
- camel_test_end ();
- }
-
- closedir (dir);
-
- return 0;
-}
diff --git a/camel/tests/mime-filter/test-crlf.c b/camel/tests/mime-filter/test-crlf.c
deleted file mode 100644
index bbf443be09..0000000000
--- a/camel/tests/mime-filter/test-crlf.c
+++ /dev/null
@@ -1,160 +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 4096
-
-enum {
- CRLF_ENCODE,
- CRLF_DECODE,
- CRLF_DONE
-};
-
-int
-main (int argc, char **argv)
-{
- CamelStream *source;
- CamelStream *correct;
- CamelStreamFilter *filter;
- CamelMimeFilter *sh;
- char *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 = NULL, *outfile = NULL;
-
- 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;
- }
-
- 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-tohtml.c b/camel/tests/mime-filter/test-tohtml.c
deleted file mode 100644
index 5b7842fefe..0000000000
--- a/camel/tests/mime-filter/test-tohtml.c
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- test-html.c
-
- Test the CamelMimeFilterToHTML class
-*/
-
-#include <sys/stat.h>
-#include <unistd.h>
-
-#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <dirent.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-tohtml.h>
-
-#define d(x) x
-
-#define CHUNK_SIZE 4096
-
-static void
-test_filter(CamelMimeFilter *f, const char *inname, const char *outname)
-{
- CamelStreamMem *in, *out;
- CamelStream *indisk, *outdisk, *filter;
- int id;
-
- camel_test_push("Data file `%s'", inname);
-
- camel_test_push("setup");
-
- indisk = camel_stream_fs_new_with_name(inname, O_RDONLY, 0);
- check(indisk);
- outdisk = camel_stream_fs_new_with_name(outname, O_RDONLY, 0);
- check(outdisk);
-
- out = (CamelStreamMem *)camel_stream_mem_new();
- check(camel_stream_write_to_stream(outdisk, (CamelStream *)out) > 0);
-
- camel_test_pull();
-
- camel_test_push("reading through filter stream");
-
- in = (CamelStreamMem *)camel_stream_mem_new();
-
- filter = (CamelStream *)camel_stream_filter_new_with_stream(indisk);
- check_count(indisk, 2);
- id = camel_stream_filter_add((CamelStreamFilter *)filter, f);
- check_count(f, 2);
-
- check(camel_stream_write_to_stream(filter, (CamelStream *)in) > 0);
- check_msg(in->buffer->len == out->buffer->len
- && memcmp(in->buffer->data, out->buffer->data, in->buffer->len) == 0,
- "Buffer content mismatch, %d != %d, in = '%.*s' != out = '%.*s'", in->buffer->len, out->buffer->len,
- in->buffer->len, in->buffer->data, out->buffer->len, out->buffer->data);
-
- camel_test_pull();
-
- camel_stream_filter_remove((CamelStreamFilter *)filter, id);
- check_count(f, 1);
- camel_mime_filter_reset(f);
-
- check_unref(filter, 1);
- check_count(indisk, 1);
- check_count(f, 1);
- check_unref(in, 1);
-
- check(camel_stream_reset(indisk) == 0);
-
- camel_test_push("writing through filter stream");
-
- in = (CamelStreamMem *)camel_stream_mem_new();
- filter = (CamelStream *)camel_stream_filter_new_with_stream((CamelStream *)in);
- check_count(in, 2);
- id = camel_stream_filter_add((CamelStreamFilter *)filter, f);
- check_count(f, 2);
-
- check(camel_stream_write_to_stream(indisk, filter) > 0);
- check(camel_stream_flush(filter) == 0);
- check_msg(in->buffer->len == out->buffer->len
- && memcmp(in->buffer->data, out->buffer->data, in->buffer->len) == 0,
- "Buffer content mismatch, %d != %d, in = '%.*s' != out = '%.*s'", in->buffer->len, out->buffer->len,
- in->buffer->len, in->buffer->data, out->buffer->len, out->buffer->data);
-
- camel_stream_filter_remove((CamelStreamFilter *)filter, id);
- check_unref(filter, 1);
- check_unref(in, 1);
- check_unref(indisk, 1);
- check_unref(outdisk, 1);
- check_unref(out, 1);
-
- camel_test_pull();
-
- camel_test_pull();
-}
-
-int
-main (int argc, char **argv)
-{
- int i;
-
- camel_test_init(argc, argv);
-
- camel_test_start("HTML Stream filtering");
-
- for (i=0;i<100;i++) {
- char inname[32], outname[32];
- CamelMimeFilter *f;
- struct stat st;
-
- sprintf(inname, "data/html.%d.in", i);
- sprintf(outname, "data/html.%d.out", i);
-
- if (stat(inname, &st) == -1)
- break;
-
- f = camel_mime_filter_tohtml_new(CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS, 0);
-
- test_filter(f, inname, outname);
-
- check_unref(f, 1);
- }
-
- camel_test_end();
-
- return 0;
-}
diff --git a/camel/tests/misc/.cvsignore b/camel/tests/misc/.cvsignore
deleted file mode 100644
index fbb8316a8b..0000000000
--- a/camel/tests/misc/.cvsignore
+++ /dev/null
@@ -1,14 +0,0 @@
-.deps
-Makefile
-Makefile.in
-.libs
-.deps
-*.lo
-*.la
-*.bb
-*.bbg
-*.da
-*.gcov
-split
-url
-utf7 \ 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 d3ed29f2e6..0000000000
--- a/camel/tests/misc/Makefile.am
+++ /dev/null
@@ -1,27 +0,0 @@
-
-INCLUDES = \
- -I$(includedir) \
- -I$(top_srcdir) \
- -I$(top_srcdir)/intl \
- -I$(top_srcdir)/e-util \
- -I$(top_srcdir)/camel \
- -I$(top_srcdir)/camel/tests/lib \
- -DG_LOG_DOMAIN=\"evolution-tests\" \
- $(CAMEL_CFLAGS)
-
-LDADD = \
- $(top_builddir)/camel/libcamel.la \
- $(top_builddir)/e-util/libeutil.la \
- $(top_builddir)/camel/tests/lib/libcameltest.a \
- $(INTLLIBS) \
- $(EVOLUTION_MAIL_LIBS)
-
-check_PROGRAMS = \
- url \
- utf7 \
- split
-
-TESTS = url utf7 split
-
-
-
diff --git a/camel/tests/misc/README b/camel/tests/misc/README
deleted file mode 100644
index e92f579cf6..0000000000
--- a/camel/tests/misc/README
+++ /dev/null
@@ -1,4 +0,0 @@
-
-url URL parsing
-utf7 UTF7 and UTF8 processing
-split word splitting for searching
diff --git a/camel/tests/misc/split.c b/camel/tests/misc/split.c
deleted file mode 100644
index 254b91974f..0000000000
--- a/camel/tests/misc/split.c
+++ /dev/null
@@ -1,113 +0,0 @@
-#include <config.h>
-
-#include <ctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <glib.h>
-#include <e-util/e-sexp.h>
-#include <camel/camel-exception.h>
-#include <camel/camel-search-private.h>
-
-#include "camel-test.h"
-
-/* TODO: should put utf8 stuff here too */
-
-static struct {
- char *word;
- int count;
- struct {
- char *word;
- int type;
- } splits[5];
-} split_tests[] = {
- { "simple", 1, { { "simple", CAMEL_SEARCH_WORD_SIMPLE } } },
- { "two words", 2, { { "two", CAMEL_SEARCH_WORD_SIMPLE }, {"words" , CAMEL_SEARCH_WORD_SIMPLE } } },
- { "compl;ex", 1, { { "compl;ex", CAMEL_SEARCH_WORD_COMPLEX } } },
- { "compl;ex simple", 2, { { "compl;ex", CAMEL_SEARCH_WORD_COMPLEX} , {"simple", CAMEL_SEARCH_WORD_SIMPLE} } },
- { "\"quoted\"", 1, { { "quoted", CAMEL_SEARCH_WORD_SIMPLE } } },
- { "\"quoted double\"", 1, { { "quoted double", CAMEL_SEARCH_WORD_COMPLEX } } },
- { "\"quoted double\" compl;ex", 2, { { "quoted double", CAMEL_SEARCH_WORD_COMPLEX }, { "compl;ex", CAMEL_SEARCH_WORD_COMPLEX } } },
- { "\"quoted double \\\" escaped\"", 1, { { "quoted double \" escaped", CAMEL_SEARCH_WORD_COMPLEX } } },
- { "\"quoted\\\"double\" \\\" escaped\\\"", 3, { { "quoted\"double", CAMEL_SEARCH_WORD_COMPLEX }, {"\"", CAMEL_SEARCH_WORD_COMPLEX}, { "escaped\"", CAMEL_SEARCH_WORD_COMPLEX } } },
- { "\\\"escaped", 1, { { "\"escaped", CAMEL_SEARCH_WORD_COMPLEX } } },
-
-};
-#define SPLIT_LENGTH (sizeof(split_tests)/sizeof(split_tests[0]))
-
-static struct {
- char *word;
- int count;
- struct {
- char *word;
- int type;
- } splits[5];
-} simple_tests[] = {
- { "simple", 1, { {"simple", CAMEL_SEARCH_WORD_SIMPLE } } },
- { "simpleCaSe", 1, { { "simplecase", CAMEL_SEARCH_WORD_SIMPLE } } },
- { "two words", 2, { { "two", CAMEL_SEARCH_WORD_SIMPLE }, { "words", CAMEL_SEARCH_WORD_SIMPLE } } },
- { "two wordscAsE", 2, { { "two", CAMEL_SEARCH_WORD_SIMPLE} , { "wordscase", CAMEL_SEARCH_WORD_SIMPLE } } },
- { "compl;ex", 2, { { "compl", CAMEL_SEARCH_WORD_SIMPLE }, { "ex", CAMEL_SEARCH_WORD_SIMPLE } } },
- { "compl;ex simple", 3, { { "compl", CAMEL_SEARCH_WORD_SIMPLE }, { "ex", CAMEL_SEARCH_WORD_SIMPLE }, { "simple", CAMEL_SEARCH_WORD_SIMPLE } } },
- { "\"quoted compl;ex\" simple", 4, { { "quoted", CAMEL_SEARCH_WORD_SIMPLE}, { "compl", CAMEL_SEARCH_WORD_SIMPLE }, { "ex", CAMEL_SEARCH_WORD_SIMPLE }, { "simple", CAMEL_SEARCH_WORD_SIMPLE } } },
- { "\\\" \"quoted\"compl;ex\" simple", 4, { { "quoted", CAMEL_SEARCH_WORD_SIMPLE}, { "compl", CAMEL_SEARCH_WORD_SIMPLE }, { "ex", CAMEL_SEARCH_WORD_SIMPLE }, { "simple", CAMEL_SEARCH_WORD_SIMPLE } } },
-};
-
-#define SIMPLE_LENGTH (sizeof(simple_tests)/sizeof(simple_tests[0]))
-
-int
-main (int argc, char **argv)
-{
- int i, j;
- struct _camel_search_words *words, *tmp;
-
- camel_test_init(argc, argv);
-
- camel_test_start("Search splitting");
-
- for (i=0; i<SPLIT_LENGTH; i++) {
- camel_test_push("split %d '%s'", i, split_tests[i].word);
-
- words = camel_search_words_split(split_tests[i].word);
- check(words != NULL);
- check_msg(words->len == split_tests[i].count, "words->len = %d, count = %d", words->len, split_tests[i].count);
-
- for (j=0;j<words->len;j++) {
- check_msg(strcmp(split_tests[i].splits[j].word, words->words[j]->word) == 0,
- "'%s' != '%s'", split_tests[i].splits[j].word, words->words[j]->word);
- check(split_tests[i].splits[j].type == words->words[j]->type);
- }
-
- camel_search_words_free(words);
- camel_test_pull();
- }
-
- camel_test_end();
-
- camel_test_start("Search splitting - simple");
-
- for (i=0; i<SIMPLE_LENGTH; i++) {
- camel_test_push("simple split %d '%s'", i, simple_tests[i].word);
-
- tmp = camel_search_words_split(simple_tests[i].word);
- check(tmp != NULL);
-
- words = camel_search_words_simple(tmp);
- check(words != NULL);
- check_msg(words->len == simple_tests[i].count, "words->len = %d, count = %d", words->len, simple_tests[i].count);
-
- for (j=0;j<words->len;j++) {
- check_msg(strcmp(simple_tests[i].splits[j].word, words->words[j]->word) == 0,
- "'%s' != '%s'", simple_tests[i].splits[j].word, words->words[j]->word);
- check(simple_tests[i].splits[j].type == words->words[j]->type);
- }
-
- camel_search_words_free(words);
- camel_search_words_free(tmp);
- camel_test_pull();
- }
-
- camel_test_end();
-
- return 0;
-}
diff --git a/camel/tests/misc/url.c b/camel/tests/misc/url.c
deleted file mode 100644
index c2db806621..0000000000
--- a/camel/tests/misc/url.c
+++ /dev/null
@@ -1,123 +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:" },
-
- /* (not from rfc 1808) */
- { "sendmail:", "sendmail:" },
- { "mbox:/var/mail/user", "mbox:/var/mail/user" },
- { "pop://user@host", "pop://user@host" },
- { "pop://user@host:99", "pop://user@host:99" },
- { "pop://user:password@host", "pop://user:password@host" },
- { "pop://user:password@host:99", "pop://user:password@host:99" },
- { "pop://user;auth=APOP@host", "pop://user;auth=APOP@host" },
- { "pop://user@host/;keep_on_server", "pop://user@host/;keep_on_server" },
- { "pop://user@host/;keep_on_server=1", "pop://user@host/;keep_on_server=1" },
- { "pop://us%65r@host", "pop://user@host" },
- { "pop://us%40r@host", "pop://us%40r@host" },
- { "pop://us%3ar@host", "pop://us%3ar@host" },
- { "pop://us%2fr@host", "pop://us%2fr@host" }
-};
-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 ("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/misc/utf7.c b/camel/tests/misc/utf7.c
deleted file mode 100644
index dec0f4b7e5..0000000000
--- a/camel/tests/misc/utf7.c
+++ /dev/null
@@ -1,106 +0,0 @@
-#include <config.h>
-
-#include <ctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <glib.h>
-#include <camel/camel-utf8.h>
-#include <camel/camel-exception.h>
-
-#include "camel-test.h"
-
-static struct {
- unsigned char *utf8;
- char *utf7;
- guint32 unicode[200];
-} tests[] = {
- /* the escape char */
- { "&", "&-",
- { 0x0026, } },
- /* part of set D */
- { "+", "+",
- { 0x002b, } },
- { "plain ascii text", "plain ascii text",
- { 0x0070, 0x006c, 0x0061, 0x0069, 0x006e, 0x0020, 0x0061, 0x0073, 0x0063, 0x0069, 0x0069, 0x0020, 0x0074, 0x0065, 0x0078, 0x0074, } },
- /* part of set O */
- { "'(),-./:?", "'(),-./:?",
- { 0x0027, 0x0028, 0x0029, 0x002c, 0x002d, 0x002e, 0x002f, 0x003a, 0x003f, } },
- { "!\"#$%*+-;<=>@[]^_`{|}", "!\"#$%*+-;<=>@[]^_`{|}",
- { 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x002a, 0x002b, 0x002d, 0x003b, 0x003c, 0x003d, 0x003e, 0x0040, 0x005b, 0x005d, 0x005e, 0x005f, 0x0060, 0x007b, 0x007c, 0x007d, } },
- /* example strings from rfc1642 (modified for imap utf7) */
- { "A\xe2\x89\xa2\xce\x91" ".", "A&ImIDkQ-.",
- { 0x0041, 0x2262, 0x0391, 0x002e, } },
- { "Hi Mum \xe2\x98\xba!", "Hi Mum &Jjo-!",
- { 0x0048, 0x0069, 0x0020, 0x004d, 0x0075, 0x006d, 0x0020, 0x263a, 0x0021, } },
- { "\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e", "&ZeVnLIqe-",
- { 0x65e5, 0x672c, 0x8a9e, } },
- { "Item 3 is \xc2\xa3" "1.", "Item 3 is &AKM-1.",
- { 0x0049, 0x0074, 0x0065, 0x006d, 0x0020, 0x0033, 0x0020, 0x0069, 0x0073, 0x0020, 0x00a3, 0x0031, 0x002e, } },
- { "\"The sayings of Confucius,\" James R. Ware, trans. \xe5\x8f\xb0\xe5\x8c\x97:\xe6\x96\x87\xe8\x87\xb4\xe5\x87\xba\xe7\x89\x88\xe7\xa4\xbe, 1980. (Chinese text with English translation)\xe5\x9b\x9b\xe6\x9b\xb8\xe4\xba\x94\xe7\xb6\x93, \xe5\xae\x8b\xe5\x85\x83\xe4\xba\xba\xe6\xb3\xa8, \xe5\x8c\x97\xe4\xba\xac: \xe4\xb8\xad\xe5\x9c\x8b\xe6\x9b\xb8\xe5\xba\x97, 1990.",
- "\"The sayings of Confucius,\" James R. Ware, trans. &U,BTFw-:&ZYeB9FH6ckh5Pg-, 1980. (Chinese text with English translation)&Vttm+E6UfZM-, &W4tRQ066bOg-, &UxdOrA-: &Ti1XC2b4Xpc-, 1990.",
- { 0x0022, 0x0054, 0x0068, 0x0065, 0x0020, 0x0073, 0x0061, 0x0079, 0x0069, 0x006e, 0x0067, 0x0073, 0x0020, 0x006f, 0x0066, 0x0020, 0x0043, 0x006f, 0x006e, 0x0066, 0x0075, 0x0063, 0x0069, 0x0075, 0x0073, 0x002c, 0x0022, 0x0020, 0x004a, 0x0061, 0x006d, 0x0065, 0x0073, 0x0020, 0x0052, 0x002e, 0x0020, 0x0057, 0x0061, 0x0072, 0x0065, 0x002c, 0x0020, 0x0074, 0x0072, 0x0061, 0x006e, 0x0073, 0x002e, 0x0020, 0x0020, 0x53f0, 0x5317, 0x003a, 0x6587, 0x81f4, 0x51fa, 0x7248, 0x793e, 0x002c, 0x0020, 0x0031, 0x0039, 0x0038, 0x0030, 0x002e, 0x0020, 0x0020, 0x0028, 0x0043, 0x0068, 0x0069, 0x006e, 0x0065, 0x0073, 0x0065, 0x0020, 0x0074, 0x0065, 0x0078, 0x0074, 0x0020, 0x0077, 0x0069, 0x0074, 0x0068, 0x0020, 0x0045, 0x006e, 0x0067, 0x006c, 0x0069, 0x0073, 0x0068, 0x0020, 0x0074, 0x0072, 0x0061, 0x006e, 0x0073, 0x006c, 0x0061, 0x0074, 0x0069, 0x006f, 0x006e, 0x0029, 0x56db, 0x66f8, 0x4e94, 0x7d93, 0x002c, 0x0020, 0x5b8b, 0x5143, 0x4eba, 0x6ce8, 0x002c, 0x0020, 0x5317, 0x4eac, 0x003a, 0x0020, 0x0020, 0x4e2d, 0x570b, 0x66f8, 0x5e97, 0x002c, 0x0020, 0x0031, 0x0039, 0x0039, 0x0030, 0x002e, } },
-};
-#define TESTS_LENGTH (sizeof(tests)/sizeof(tests[0]))
-
-int
-main (int argc, char **argv)
-{
- char *utf8, *utf7, *p;
- int i, j;
- guint32 u;
- char utf8enc[256];
- GString *out;
-
- camel_test_init(argc, argv);
-
- out = g_string_new("");
-
- camel_test_start("UTF8, UTF7 RFC1642+RFC2060");
-
- for (i=0; i<TESTS_LENGTH; i++) {
-
- camel_test_push("%2d: %s utf8 decode", i, tests[i].utf7);
- p = tests[i].utf8;
- j = 0;
- do {
- u = camel_utf8_getc((const unsigned char **)&p);
- check(u == tests[i].unicode[j]);
- j++;
- } while (u);
- camel_test_pull();
-
- camel_test_push("%2d: %s utf7->utf8", i, tests[i].utf7);
- utf8 = camel_utf7_utf8(tests[i].utf7);
- check_msg(strcmp(utf8, tests[i].utf8) == 0, "utf8 = '%s'", utf8);
- camel_test_pull();
-
- camel_test_push("%2d: %s utf7->utf8->utf7", i, tests[i].utf7);
- utf7 = camel_utf8_utf7(utf8);
- check_msg(strcmp(utf7, tests[i].utf7) == 0, "utf7 = '%s'", utf7);
- camel_test_pull();
-
- g_free(utf7);
- g_free(utf8);
-
- camel_test_push("%2d: %s utf8 encode", i, tests[i].utf7);
-
- g_string_truncate(out, 0);
- p = utf8enc;
- j = 0;
- do {
- u = tests[i].unicode[j++];
- camel_utf8_putc((unsigned char **)&p, u);
- g_string_append_u(out, u);
- } while (u);
-
- check(strcmp(utf8enc, out->str) == 0);
- check(strcmp(utf8enc, tests[i].utf8) == 0);
-
- 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 b14d804dc3..0000000000
--- a/camel/tests/smime/Makefile.am
+++ /dev/null
@@ -1,24 +0,0 @@
-
-INCLUDES = \
- -I$(includedir) \
- -I$(top_srcdir) \
- -I$(top_srcdir)/intl \
- -I$(top_srcdir)/e-util \
- -I$(top_srcdir)/camel \
- -I$(top_srcdir)/camel/tests/lib \
- -DG_LOG_DOMAIN=\"evolution-tests\" \
- $(CAMEL_CFLAGS)
-
-LDADD = \
- $(top_builddir)/camel/libcamel.la \
- $(top_builddir)/e-util/libeutil.la \
- $(top_builddir)/camel/tests/lib/libcameltest.a \
- $(INTLLIBS) \
- $(EVOLUTION_MAIL_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 102092679a..0000000000
--- a/camel/tests/smime/pgp-mime.c
+++ /dev/null
@@ -1,214 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2003 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 <sys/wait.h>
-#include <camel/camel-gpg-context.h>
-#include <camel/camel-multipart-signed.h>
-#include <camel/camel-multipart-encrypted.h>
-#include <camel/camel-mime-part.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 reprompt, 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 reprompt, gboolean secret,
- CamelService *service, const char *item, CamelException *ex)
-{
- return g_strdup ("no.secret");
-}
-
-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;
- CamelCipherContext *ctx;
- CamelException *ex;
- CamelCipherValidity *valid;
- CamelMimePart *mime_part;
- CamelMultipartSigned *mps;
- CamelMultipartEncrypted *mpe;
- GPtrArray *recipients;
- int ret;
-
- camel_test_init (argc, argv);
-
- /* clear out any camel-test data */
- system ("/bin/rm -rf /tmp/camel-test");
- system ("/bin/mkdir /tmp/camel-test");
- setenv ("GNUPGHOME", "/tmp/camel-test/.gnupg", 1);
-
- /* import the gpg keys */
- if ((ret = system ("gpg < /dev/null > /dev/null 2>&1")) == -1)
- return 77;
- else if (WEXITSTATUS (ret) == 127)
- return 77;
-
- system ("gpg --import ../data/camel-test.gpg.pub > /dev/null 2>&1");
- system ("gpg --import ../data/camel-test.gpg.sec > /dev/null 2>&1");
-
- session = camel_pgp_session_new ("/tmp/camel-test");
-
- ex = camel_exception_new ();
-
- ctx = camel_gpg_context_new (session);
- camel_gpg_context_set_always_trust (CAMEL_GPG_CONTEXT (ctx), TRUE);
-
- 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");
- mps = camel_multipart_signed_new ();
- camel_multipart_signed_sign (mps, ctx, mime_part, "no.user@no.domain", CAMEL_CIPHER_HASH_SHA1, ex);
- check_msg (!camel_exception_is_set (ex), "%s", camel_exception_get_description (ex));
- camel_test_pull ();
-
- camel_object_unref (mime_part);
- camel_exception_clear (ex);
-
- camel_test_push ("PGP/MIME verify");
- valid = camel_multipart_signed_verify (mps, ctx, 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 (mps);
- 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, "no.user@no.domain");
-
- mpe = camel_multipart_encrypted_new ();
- camel_multipart_encrypted_encrypt (mpe, mime_part, ctx, "no.user@no.domain", recipients, ex);
- check_msg (!camel_exception_is_set (ex), "%s", camel_exception_get_description (ex));
- g_ptr_array_free (recipients, TRUE);
- camel_test_pull ();
-
- camel_exception_clear (ex);
- camel_object_unref (mime_part);
-
- camel_test_push ("PGP/MIME decrypt");
- mime_part = camel_multipart_encrypted_decrypt (mpe, ctx, ex);
- check_msg (!camel_exception_is_set (ex), "%s", camel_exception_get_description (ex));
- camel_object_unref (mime_part);
- camel_object_unref (mpe);
- 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/pgp.c b/camel/tests/smime/pgp.c
deleted file mode 100644
index 81ea6fabdf..0000000000
--- a/camel/tests/smime/pgp.c
+++ /dev/null
@@ -1,246 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2003 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 <sys/wait.h>
-#include <camel/camel-gpg-context.h>
-#include <camel/camel-stream-mem.h>
-#include <camel/camel-mime-part.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 reprompt, 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 reprompt, gboolean secret,
- CamelService *service, const char *item, CamelException *ex)
-{
- return g_strdup ("no.secret");
-}
-
-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;
- CamelCipherContext *ctx;
- CamelException *ex;
- CamelCipherValidity *valid;
- CamelStream *stream1, *stream2;
- struct _CamelMimePart *sigpart, *conpart, *encpart, *outpart;
- CamelDataWrapper *dw;
- GPtrArray *recipients;
- GByteArray *buf;
- char *before, *after;
- int ret;
-
- camel_test_init (argc, argv);
-
- /* clear out any camel-test data */
- system ("/bin/rm -rf /tmp/camel-test");
- system ("/bin/mkdir /tmp/camel-test");
- setenv ("GNUPGHOME", "/tmp/camel-test/.gnupg", 1);
-
- /* import the gpg keys */
- if ((ret = system ("gpg < /dev/null > /dev/null 2>&1")) == -1)
- return 77;
- else if (WEXITSTATUS (ret) == 127)
- return 77;
-
- system ("gpg --import ../data/camel-test.gpg.pub > /dev/null 2>&1");
- system ("gpg --import ../data/camel-test.gpg.sec > /dev/null 2>&1");
-
- session = camel_pgp_session_new ("/tmp/camel-test");
-
- ex = camel_exception_new ();
-
- ctx = camel_gpg_context_new (session);
- camel_gpg_context_set_always_trust (CAMEL_GPG_CONTEXT (ctx), TRUE);
-
- 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);
-
- conpart = camel_mime_part_new();
- dw = camel_data_wrapper_new();
- camel_data_wrapper_construct_from_stream(dw, stream1);
- camel_medium_set_content_object((CamelMedium *)conpart, dw);
- camel_object_unref(stream1);
- camel_object_unref(dw);
-
- sigpart = camel_mime_part_new();
-
- camel_test_push ("PGP signing");
- camel_cipher_sign (ctx, "no.user@no.domain", CAMEL_CIPHER_HASH_SHA1, conpart, sigpart, 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");
- valid = camel_cipher_verify (ctx, sigpart, 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(conpart);
- camel_object_unref(sigpart);
-
- stream1 = camel_stream_mem_new ();
- camel_stream_write (stream1, "Hello, I am a test of encryption/decryption.", 44);
- camel_stream_reset (stream1);
-
- conpart = camel_mime_part_new();
- dw = camel_data_wrapper_new();
- camel_stream_reset(stream1);
- camel_data_wrapper_construct_from_stream(dw, stream1);
- camel_medium_set_content_object((CamelMedium *)conpart, dw);
- camel_object_unref(stream1);
- camel_object_unref(dw);
-
- encpart = camel_mime_part_new();
-
- camel_exception_clear (ex);
-
- camel_test_push ("PGP encrypt");
- recipients = g_ptr_array_new ();
- g_ptr_array_add (recipients, "no.user@no.domain");
- camel_cipher_encrypt (ctx, "no.user@no.domain", recipients, conpart, encpart, ex);
- check_msg (!camel_exception_is_set (ex), "%s", camel_exception_get_description (ex));
- g_ptr_array_free (recipients, TRUE);
- camel_test_pull ();
-
- camel_exception_clear (ex);
-
- camel_test_push ("PGP decrypt");
- outpart = camel_mime_part_new();
- valid = camel_cipher_decrypt (ctx, encpart, outpart, ex);
- check_msg (!camel_exception_is_set (ex), "%s", camel_exception_get_description (ex));
- check_msg (valid->encrypt.status == CAMEL_CIPHER_VALIDITY_ENCRYPT_ENCRYPTED, "%s", valid->encrypt.description);
-
- stream1 = camel_stream_mem_new();
- stream2 = camel_stream_mem_new();
-
- camel_data_wrapper_write_to_stream((CamelDataWrapper *)conpart, stream1);
- camel_data_wrapper_write_to_stream((CamelDataWrapper *)outpart, stream2);
-
- buf = CAMEL_STREAM_MEM (stream1)->buffer;
- before = g_strndup (buf->data, buf->len);
- buf = CAMEL_STREAM_MEM (stream2)->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_object_unref(stream1);
- camel_object_unref(stream2);
- camel_object_unref(conpart);
- camel_object_unref(encpart);
- camel_object_unref(outpart);
-
- 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 25bd84eafd..0000000000
--- a/camel/tests/stream/Makefile.am
+++ /dev/null
@@ -1,25 +0,0 @@
-
-INCLUDES = \
- -I$(includedir) \
- -I$(top_srcdir) \
- -I$(top_srcdir)/intl \
- -I$(top_srcdir)/e-util \
- -I$(top_srcdir)/camel \
- -I$(top_srcdir)/camel/tests/lib \
- -DG_LOG_DOMAIN=\"evolution-tests\" \
- $(CAMEL_CFLAGS)
-
-LDADD = \
- $(top_builddir)/camel/libcamel.la \
- $(top_builddir)/e-util/libeutil.la \
- $(top_builddir)/camel/tests/lib/libcameltest.a \
- $(INTLLIBS) \
- $(EVOLUTION_MAIL_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 f85a8ce105..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(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(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(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(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 730f98b91f..0000000000
--- a/composer/.cvsignore
+++ /dev/null
@@ -1,22 +0,0 @@
-.deps
-.libs
-.pure
-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]
-composer-marshal.[ch] \ No newline at end of file
diff --git a/composer/ChangeLog b/composer/ChangeLog
deleted file mode 100644
index 7ba1e67a3a..0000000000
--- a/composer/ChangeLog
+++ /dev/null
@@ -1,399 +0,0 @@
-2003-12-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-hdrs.c (create_headers): Unifdef out the post-to
- code and fix it to use the new folder selection button.
- (e_msg_composer_hdrs_set_post_to): Same.
- (e_msg_composer_hdrs_get_post_to): Same.
-
-2003-12-03 Ettore Perazzoli <ettore@ximian.com>
-
- * e-msg-composer-hdrs.c: Do not #include
- <evolution-folder-selector-button.h>.
- (e_msg_composer_hdrs_set_post_to): #if 0 out for now.
- (e_msg_composer_hdrs_get_post_to): Likewise.
-
-2003-12-01 Rodney Dawes <dobey@ximian.com>
-
- * e-msg-composer-hdrs.h: Use BASE_VERSION for repo_ids and OAFIIDs
-
-2003-11-11 Radek Doulik <rodo@ximian.com>
-
- * e-msg-composer.c (e_msg_composer_set_autosaved): new method to
- wrap autosaved flag setting
- (e_msg_composer_unset_autosaved): ditto
- (e_msg_composer_is_autosaved): new method, says if composer was
- autosaved only
- (autosave_save_draft): unset changed so that we don't autosave all
- the time when anything else than gtkhtml control changed
-
-2003-11-06 Radek Doulik <rodo@ximian.com>
-
- * e-msg-composer.c (autosave_save_draft): call gtkhtml's saved
- command to clean is-saved flag, set composer's autosaved flag
- (do_exit): complain if last save was just autosave
- (e_msg_composer_unset_changed): reset autosaved flag
- (save): reset autosaved flag
-
- * e-msg-composer.h: added autosaved flag, it tells whether last
- save was autosave or regular save, when changed flag is reset the
- autosaved one is reset too
-
-2003-11-30 Ettore Perazzoli <ettore@ximian.com>
-
- * e-msg-composer-hdrs.c (create_headers): #if 0 the "post to"
- stuff for now (it requires the global_shell_client and the
- evolution_folder_selector_button which we don't have anymore).
-
-2003-11-26 Chris Toshok <toshok@ximian.com>
-
- * e-msg-composer.c (build_message): switch from just checking
- SMIME_SUPPORTED to checking both HAVE_NSS and SMIME_SUPPORTED.
-
-2003-11-26 JP Rosevear <jpr@ximian.com>
-
- * Makefile.am: turn on deprecated gtk widgets
-
-2003-11-03 Not Zed <NotZed@Ximian.com>
-
- * e-msg-composer.c (build_message): changed to use ciphercontext
- directly to sign the message, no multipart-signed usage.
- (build_message): do the same for multipart/encryption for gpg encrypting.
-
-2003-11-03 Ettore Perazzoli <ettore@ximian.com>
-
- * e-msg-composer-hdrs.h (SELECT_NAMES_OAFIID): Append "_2".
-
-2003-10-31 Not Zed <NotZed@Ximian.com>
-
- * e-msg-composer.c (build_message): fix for e-account smime info
- changes. Also enforce having a signing certificate set in
- preferences before doing any signing.
- (from_changed_cb): handle smime sign/encrypt default for account
- (create_composer): force a from-changed when we start, to properly
- setup signing options.
-
-2003-10-30 Not Zed <NotZed@Ximian.com>
-
- * e-msg-composer.c: Turn on SMIME_SUPPORTED.
- (build_message): move some of the security code around, and fix
- up smime code.
-
-2003-10-08 Chris Toshok <toshok@ximian.com>
-
- * evolution-composer.c (corba_recipientlist_to_destv): EDestination =>
- EABDestination, and e_destination => eab_destination.
- (impl_Composer_set_headers): same.
-
- * e-msg-composer.c (update_auto_recipients): EDestination =>
- EABDestination, and e_destination => eab_destination.
- (e_msg_composer_new_with_message): same.
- (add_recipients): same.
- (handle_mailto): same.
- (e_msg_composer_set_headers): same.
- (e_msg_composer_get_recipients): same.
- (e_msg_composer_get_to): same.
- (e_msg_composer_get_cc): same.
- (e_msg_composer_get_bcc): same.
-
- * e-msg-composer.h: EDestination => EABDestination, and
- e_destination => eab_destination.
-
- * e-msg-composer-hdrs.c (set_recipients_from_destv): EDestination
- => EABDestination, and e_destination => eab_destination.
- (e_msg_composer_hdrs_to_message_internal): same.
- (e_msg_composer_hdrs_set_to): same.
- (e_msg_composer_hdrs_set_cc): same.
- (e_msg_composer_hdrs_set_bcc): same.
- (e_msg_composer_hdrs_get_to): same.
- (e_msg_composer_hdrs_get_cc): same.
- (e_msg_composer_hdrs_get_bcc): same.
- (e_msg_composer_hdrs_get_recipients): same.
-
- * e-msg-composer-hdrs.h: EDestination => EABDestination, and
- e_destination => eab_destination.
-
-2003-09-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (save): Don't blindly claim that the file
- exists and then ask the user if he/she would like to overwrite
- it. First check that the file even exists, if not - then we've got
- a different error. Fixes bug #48759.
-
- * e-msg-composer-select-file.c (e_msg_composer_select_file): Use
- the proper selector title, otherwise it says "Attach files" when
- we are trying to save a message.
-
-2003-09-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-attachment-bar.c (get_default_charset): Same as
- below.
-
- * e-msg-composer.c (composer_get_default_charset_setting): Handle
- empty-string as the charset value gotten from gconf as this can
- happen. Partial fix for bug #47638.
-
-2003-09-13 Charles Zhang <charles.zhang@sun.com>
-
- * e-msg-composer-attachment-bar.c (remove_attachment): Add some
- assertion. Send Close response signal to the properties dialog
- while removeing an attachment.
- * e-msg-composer-attachment-bar.c (remove_selected): Fix a re-
- remove-attachment bug. [#48466]
-
-2003-09-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-attachment-bar.c: updated for
- CamelTransferEncoding namespace changes
-
- * e-msg-composer.c: updated for CamelTransferEncoding namespace
- changes
-
-2003-09-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-attachment-bar.c:
- * e-msg-composer-attachment.c:
- * e-msg-composer.c: Updated for namespace changes in Camel.
-
-2003-09-17 Not Zed <NotZed@Ximian.com>
-
- ** Merge in mail-refactor-2-branch
-
-2003-09-15 Ettore Perazzoli <ettore@ximian.com>
-
- * e-msg-composer-hdrs.c (header_new_recipient): Make the entry
- non-focusable again. The right fix for A11Y is to add
- accelerators.
-
-2003-09-11 Federico Mena Quintero <federico@ximian.com>
-
- * e-msg-composer.h (EMsgComposer): Added an entry_uic field for a
- BonoboUIComponent for the non-control entries (e.g. the Subject
- line).
-
- * e-msg-composer.c (create_composer): Set autoactivate to true on
- the HTML control's BonoboControlFrame.
- (setup_ui): Create the composer->entry_uic.
- (destroy): Free the composer->entry_uic.
- (entry_verbs): New array of verbs for the non-control entries.
- Moved the Edit* verbs to here, as they should not be part of the
- main set.
- (composer_entry_focus_in_event_cb): Load
- evolution-composer-entries.xml here for the non-control entries' UI.
- (composer_entry_focus_out_event_cb): Remove the menu items.
-
-2003-09-10 Not Zed <NotZed@Ximian.com>
-
- * listener.c (impl_event): We want to use decode to stream for
- attachment parts.
-
-2003-09-08 Not Zed <NotZed@Ximian.com>
-
- * e-msg-composer.c (autosave_load_draft): ugh, direct linking to
- evolution-mail suckage. Should these callbacks just be handled
- internally?
- (handle_multipart_encrypted, handle_multipart_signed)
- (handle_multipart_alternative, handle_multipart)
- (e_msg_composer_new_with_message): Use new em_utils stuff for
- message formatting.
-
-2003-08-22 Antonio Xu <antonio.xu@sun.com>
-
- * e-msg-composer-attachment.c (): Connect response signal to
- attachment properties dialog, fix bug #47950.
-
-2003-08-21 Antonio Xu <antonio.xu@sun.com>
-
- * Makefile.am (INCLUDES): add EVOLUTION_IMAGESDIR define
- * e-msg-composer.c (create_composer): use EVOLUTION_IMAGESDIR
- and composer icon name to get the path of composer icon.
- [#47781]
-
-2003-08-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * Original patch from David Woodhouse, but modified a bit by me.
-
- * e-msg-composer.c (handle_mailto): Fix insertion of arbitrary
- headers from mailto: links. Ignore From: and Reply-To: headers.
-
-2003-08-13 Lorenzo Gil Sanchez <lgs@sicem.biz>
-
- * e-msg-composer-hdrs.c (account_removed_cb): fixed an insulting
- error message. Fixes bug #47413.
-
-2003-08-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-attachment-bar.c (update): This needs to use
- camel_data_wrapper_decode_to_stream() rather than
- write_to_stream(). Also simplify a bit - no sense looping to load
- the pixbuf data into the gdk-pixbuf loader 4K at a time when we
- have the whole thing in a memory buffer already. Once done, unref
- the stream instead of closing it so we don't leak.
- (attach_to_multipart): Use decode_to_stream().
-
- * e-msg-composer-attachment.c (e_msg_composer_attachment_new):
- Avoid constructing thwe data-wrapper from the stream twice for
- message/rfc822 parts.
-
-2003-07-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-attachment-bar.c (attach_to_multipart): don't set
- the rawtext bit anymore.
-
- * e-msg-composer.c (build_message): Convert the plain part's
- content stream from UTF-8 to whatever charset we want.
-
-2003-07-31 Antonio Xu <antonio.xu@sun.com>
-
- * e-msg-composer.c (drag_data_received): add the drop type of
- mozilla browser link to make composer support to handle mozilla
- DnD data. [#47131]
-
-2003-07-28 Antonio Xu <antonio.xu@sun.com>
-
- * e-msg-composer-attachment-bar.c (update): add
- gdk_pixbuf_loader_close to close pix buffer loading. [#45908]
-
-2003-07-25 Larry Ewing <lewing@ximian.com>
-
- * e-msg-composer.c (GNOME_GTKHTML_EDITOR_CONTROL_ID): require the
- new composer control version.
-
-2003-07-17 Michel Daenzer <michel@daenzer.net>
-
- * e-msg-composer.c (autosave_manager_query_load_orphans): Set
- default answer of dialog to 'yes' to try and prevent autosaved
- messages from getting lost accidentally.
-
-2003-07-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-attachment-bar.c (attach_to_multipart): Revert my
- previous changes here too.
-
- * e-msg-composer.c (build_message): Revert my previous changes.
-
-2003-07-23 Dan Winship <danw@ximian.com>
-
- * bad-icon.xpm: Remove this. It was only used by e-icon-list,
- which is no longer there.
-
- * composer-marshal.list: Likewise
-
- * Makefile.am: Update
-
-2003-07-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (build_message): Init charset to NULL.
-
-2003-07-21 Dan Winship <danw@ximian.com>
-
- * e-msg-composer.c (build_message): Make this work again.
-
-2003-07-17 Maxx Cao <maxx.cao@sun.com>
-
- ** For bug #46013
-
- * e-msg-composer-hdrs.c (header_new_recipient): To/cc/bcc buttons
- made focusable.
-
-2003-07-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-attachment-bar.c (attach_to_multipart): don't set
- the rawtext bit anymore.
-
- * e-msg-composer.c (build_message): Convert the plain part's
- content stream from UTF-8 to whatever charset we want.
-
-2003-07-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-attachment-bar.c (popup_menu_event): Fix warnings
- and other breakage introduced by Maxx.
-
-2002-07-14 Maxx Cao <maxx.cao@sun.com>
-
- ** For bug #45826
-
- * e-msg-composer-attachment-bar.c (class_init): connect the
- "popup_menu" signal, so that S-F10 keybinding will work.
- (popup_menu_event): funcion added to handle "popup_menu" (S-F10 key).
- (popup_menu_placement_callback): function added to place the popup
- menu to the center of attachment icon, in case it is activated by
- keyboard.
-
-2003-07-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (e_msg_composer_new_with_message): Updated to
- use camel_strcase_hash/equal.
-
-2003-07-01 Dan Winship <danw@ximian.com>
-
- * e-msg-composer-attachment-bar.c (pixbuf_for_mime_type): Gone.
- (update): Use e_icon_for_mime_type instead.
-
- * Makefile.am (INCLUDES): remove EVOLUTION_IMAGESDIR define
-
-2003-06-25 Antonio Xu <antonio.xu@sun.com>
-
- * e-msg-composer.c (handle_mailto): Change file url to absolute
- path. Fixes bug #44065.
-
-2003-07-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (autosave_load_draft): Connect to the
- save-draft signal too. Fixes bug #45531.
-
-2003-06-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (build_message): Set the rawtext bits for the
- 'plain' and 'html' data wrappers to FALSE.
-
-2003-06-19 Larry Ewing <lewing@ximian.com>
-
- * listener.c (insert_paragraph_after): free the return value.
- (impl_event): free the return value.
-
-2003-06-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (best_encoding): Use e_iconv_open/close so that
- we get charset aliasing for free. Fixes bug #44991.
-
-2003-06-16 Jeffrey Stedfast <fejj@ximian.com>
-
- Fixes bug #44139.
-
- * e-msg-composer-hdrs.c (attach_couple): Set the vertical and
- horizontal padding to 3 always.
- (create_from_optionmenu): Change the hbox spacing to 6 pixels.
-
- * e-msg-composer.c (create_composer): Set the border width around
- the composer's vbox to HIG specification and make the box_spacing
- 6 pixels as well.
-
-2003-06-10 Larry Ewing <lewing@ximian.com>
-
- * e-msg-composer-hdrs.c (e_msg_composer_hdrs_and_string_free):
- free the structure as well.
-
-2003-06-09 Larry Ewing <lewing@ximian.com>
-
- * listener.c (insert_paragraph_before): free the return values.
-
-2003-05-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (composer_get_default_charset_setting): Same as
- the rest.
- (setup_ui): We didn't even seem to be using the gconf client
- here. Removed.
- (e_msg_composer_load_config): Unref the gconf client after we're
- finished.
- (e_msg_composer_new): Same.
- (e_msg_composer_new_post): Here too.
- (e_msg_composer_set_view_from): And here.
- (e_msg_composer_set_view_replyto): And here.
- (e_msg_composer_set_view_cc): Here too.
- (e_msg_composer_set_view_bcc): Again here.
-
- * e-msg-composer-hdrs.c (create_from_optionmenu): Same as below.
- (e_msg_composer_hdrs_set_from_account): Here too.
-
- * e-msg-composer-attachment-bar.c (get_default_charset): Unref the
- gconf client.
diff --git a/composer/ChangeLog.pre-1-4 b/composer/ChangeLog.pre-1-4
deleted file mode 100644
index 58f0eebec1..0000000000
--- a/composer/ChangeLog.pre-1-4
+++ /dev/null
@@ -1,4037 +0,0 @@
-2003-05-20 Larry Ewing <lewing@ximian.com>
-
- * e-msg-composer.c (composer_settings_update): set the various
- bonobo properties that are composer preferences.
- (create_composer): add notification of gconf changes.
- (destroy): disconnect notification.
-
- * e-msg-composer.h: keep the gcond notify handler id.
-
-2003-05-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-attachment.c (e_msg_composer_attachment_edit):
- Don't connect to the focus-out-event in order to update the
- mime-type. Simply don't update the mime-type ever. Fixes bug
- #42798.
-
-2003-04-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (autosave_manager_query_load_orphans): Change
- the "would you like to recover unsaved drafts?" dialog a QUESTION
- dialog rather than an ERROR dialog. Fixes bug #42024.
-
-2003-04-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-attachment-bar.c (pixbuf_for_mime_type): If we
- fail to load the icon that gnome_vfs_get_icon() gave us, the
- default back to gnome-unknown.png. This is the only POSSIBLE way
- for Anna to be getting a NULL pixbuf if she has gnome-unknown.png
- that I can see. Should fix bug #41513.
-
-2003-04-23 Not Zed <NotZed@Ximian.com>
-
- * e-msg-composer.c (map_default_cb): removed debug printfs.
-
-2003-04-22 Radek Doulik <rodo@ximian.com>
-
- * e-msg-composer.c (add_attachments_handle_mime_part): added
- related argument, TRUE means that container of mime_part is
- multipart/related
- (add_attachments_handle_mime_part): add images as inline when
- related is TRUE
- (add_attachments_from_multipart): pass related to
- add_attachments_handle_mime_part
-
-2003-04-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (add_attachments_handle_mime_part): Don't ever
- attach non-inlined text or message parts. Reverts a prior fix.
-
-2003-04-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-attachment.glade: Change the order of the
- ok/cancel buttons.
-
-2003-04-19 Chris Toshok <toshok@ximian.com>
-
- [ fixes #40694 ]
- * e-msg-composer-hdrs.c (create_addressbook_entry): this can't
- hurt - set the frame to autoactivate so if by some chance the
- widget is focused the control will end up being activated.
-
- * e-msg-composer.c (map_default_cb): activate the To: control
- instead of focusing the widget.
-
-2003-04-18 Rodney Dawes <dobey@ximian.com>
-
- * Makefile.am:
- * e-msg-composer.c:
- Use PREFIX instead of EVOLUTION_DATADIR for bonobo_ui_util_set_ui ().
- Fixes bug #21499.
-
-2003-04-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-attachment.c (file_name_focus_out_cb): Return
- FALSE so the signal gets propogated further up the chain. Fixes
- bug #41238.
- (e_msg_composer_attachment_edit): The focus-out-event signal name
- changed (although the old name still works...for now?).
-
-2003-04-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-attachment.glade: Updated to comply with the
- HIG. Fixes bug #41239 and bug #41241.
-
-2003-04-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (composer_get_default_charset_setting): Use
- e_iconv_locale_charset() instead of e_iconv_locale_name(), dunno
- what I was thinking. locale_name() doesn't even exist.
- (setup_ui): Don't free the default_charset, it's a const char*.
-
- * e-msg-composer-attachment-bar.c (get_default_charset): Same.
-
-2003-04-09 Chris Toshok <toshok@ximian.com>
-
- * e-msg-composer.c (setup_ui): fix build, it's
- composer_get_default_charset_setting.
-
-2003-04-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (composer_get_default_charset_setting): Same as
- with attachment-bar's get_default_charset().
- (setup_ui): Instead of pulling the default charset from gconf,
- call our helper function above.
-
- * e-msg-composer-attachment-bar.c (get_default_charset): If gconf
- returns a NULL string, default back to the locale charset.
-
-2003-04-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (map_default_cb): Added some debug printfs.
- (create_composer): Call map_default_cb directly instead of having
- it in a "map" callback. Ettore says we shouldn't be doing this
- *shrug*. Still doesn't work tho.
-
-2003-04-07 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #39763 ]
- * e-msg-composer.c (setup_cut_copy_paste): remove the
- control_entry_focus_{in,out}_event_cb signal stuff.
- (control_entry_focus_in_event_cb): nuke
- (control_entry_focus_in_event_cb): same.
-
- * e-msg-composer-hdrs.c (create_addressbook_entry): pass the
- contain to bonobo_widget_new_control_from_objref when creating the
- entries.
-
-2003-04-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (autosave_save_draft): If the composer isn't
- 'dirty', then don't autosave the draft (no need to). Fixes bug
- #40764.
-
-2003-04-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (menu_edit_select_all_cb): Add a select-all
- callback and verb.
- (composer_entry_focus_in_event_cb): Set our bonobo-ui verbs.
-
-2003-04-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-select-file.c (e_msg_composer_select_file): Guard
- against the filesel's selection being NULL. Fixes bug #40679.
-
-2003-04-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (composer_entry_focus_in_event_cb): Keep track
- of which entry widget has focus.
- (composer_entry_focus_out_event_cb): Same.
- (control_entry_focus_in_event_cb): Same idea, but since this is in
- another component, tell that component that its widget has focus
- so it can merge bonoboui cut/copy/paste (and anything else) menus.
- (control_entry_focus_out_event_cb): Same.
- (setup_cut_copy_paste): Connect to the focus-in and focus-out
- events for all the entry widgets and the html editor.
- (menu_edit_cut_cb): New callback function since the composer will
- now own the Cut/Copy/Paste menu items sometimes (depending on
- which widget is in focus... confused yet? good).
-
- * e-msg-composer-hdrs.c (from_changed): Update the Reply-To entry
- to be a normal GtkEntry.
- (create_headers): Same.
- (e_msg_composer_hdrs_set_reply_to): Here too.
- (e_msg_composer_hdrs_get_reply_to): And finally here.
-
-2003-04-01 Not Zed <NotZed@Ximian.com>
-
- ** See bug #40300 & probably others.
-
- * e-msg-composer.c (autosave_manager_query_load_orphans): make the
- composer arg a parent arg, its only used parent the dialogue.
- Fix caller casts.
- (e_msg_composer_check_autosave): new function, checks for
- autosave files, and recovers them per user instructions.
-
-2003-03-31 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-attachment.glade: Convert to libglade-2's format.
-
- * e-msg-composer.c (set_editor_signature): E_MSG_COMPOSER_HDRS
- (composer->hdrs)->account->id can never be NULL anymore.
-
-2003-03-25 Dan Winship <danw@ximian.com>
-
- * e-msg-composer.c: Update for e_notice move
-
-2003-03-20 Jeffrey Stedfast <fejj@ximian.com>
-
- Fixes for bug #39813
-
- * e-msg-composer.c (composer_finalise): Don't unregister the
- signature event handler here.
- (destroy): Unregister it here instead.
-
-2003-03-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (add_attachments_handle_mime_part): Change the
- logic to attach text parts when appropriate.
- (map_default_cb): Grab the focus of the To entry widget. Fixes bug
- #39800. Fixes another #warning too.
-
-2003-03-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (do_exit): e_msg_composer_hdrs_get_subject()
- now returns const so don't g_free() it :-)
- (map_default_cb): Same as above. Also, the subject entry no longer
- derives from GnomeCanvas so eliminate the now unneeded casting to
- grab the focus of the subject widget.
- (e_msg_composer_get_subject): Return a const char * now.
-
- * e-msg-composer-hdrs.c (create_headers): Make the subject entry
- into a GtkEntry so we don't have to worry about i18n and other
- EEntry bugs anymore. Fixes numerous bugs (including #39924).
- (e_msg_composer_hdrs_set_subject): Use gtk_entry_set_text().
- (e_msg_composer_hdrs_to_message_internal):
- e_msg_composer_hdrs_get_subject() now returns const.
- (e_msg_composer_hdrs_get_subject): Return a const char *.
- (entry_changed): e_msg_composer_hdrs_get_subject() now returns
- const.
-
-2003-03-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (create_composer): Default the composer's title
- to "Create a message". Fixes bug #39696.
-
-2003-03-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-attachment-bar.c: Use GnomeIconList instead of
- EIconList so we don't have to maintain an exact copy/paste of
- GnomeIconList ourselves. I don't udnerstand why we ever did.
-
- * e-icon-list.[c,h]: Removed.
-
-2003-03-11 Not Zed <NotZed@Ximian.com>
-
- * evolution-composer.c (evolution_composer_new): add
- send_cb/save_draft_cb arguments.
- (impl_Composer_send): use the local send_cb.
- (evolution_composer_init): dont init send, save-draft signals
- here.
- (evolution_composer_new): init signals here, fix params to
- composer_construct().
- (evolution_composer_factory_init): remove, part of mailer now.
- (factory_fn): same.
- (finalise): disconnect from callbacks first.
-
- * evolution-composer.h: add send_cb/save_draft_cb to composer object.
-
-2003-03-10 Not Zed <NotZed@Ximian.com>
-
- * evolution-composer.c (finalise): from destroy.
- (evolution_composer_class_init): gtkobject->gobject stuff.
- (evolution_composer_new): remove old redundant stuff.
-
-2003-03-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (composer_get_default_charset_setting): Don't
- allow the returned charset to be NULL.
- (get_file_content): Make sure there is buffered data before trying
- to convert it to UTF-8.
-
-2003-03-04 Not Zed <NotZed@Ximian.com>
-
- * e-msg-composer-hdrs.c (destroy): disconnect any signal handlers
- on the accounts object. For bug #37873.
-
-2003-02-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c: Same as below.
-
- * e-msg-composer-attachment-bar.c: Go back to using
- e_iconv_charset_name().
-
-2003-02-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (drag_data_received): Make sure the url is !=
- NULL? I can't think of anything else in this code that could
- possibly cause bug #38382.
-
- * e-msg-composer-attachment-bar.c (pixbuf_for_mime_type): Fixed a
- memory leak.
-
-2003-02-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (e_msg_composer_set_send_html): Don't save the
- HTML format setting to gconf. This option menu is meant for a
- per-essage setting (ie. once the composer closes, the next
- composer will again use the default and not what the user chose
- last time).
-
-2003-02-21 Dan Winship <danw@ximian.com>
-
- * Makefile.am: build libcomposer as a shared library so it can be
- linked into libevolution-mail.so without portability problems
-
-2003-02-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (composer_get_default_charset_setting): Same as
- below.
-
- * e-msg-composer-attachment-bar.c (get_default_charset): Use
- camel_charset_canonical_name() rather than e_iconv_charset_name()
- as the latter will be removed shortly.
-
-2003-02-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-hdrs.c (e_msg_composer_hdrs_set_from_account):
- default_account is now a string value, not an int.
- (create_from_optionmenu): Same.
- (header_new_recipient): Use g_signal_connect_data() instead of the
- now deprecated gtk_signal_connect_full().
-
-2003-02-06 Dan Winship <danw@ximian.com>
-
- * Makefile.am: clean up
-
- * e-msg-composer.c (autosave_manager_query_load_orphans): #include
- string.h
- (menu_file_send_cb): s/gtk_signal_emit/g_signal_emit/
-
- * e-msg-composer-attachment.c: #include string.h
- (e_msg_composer_attachment_edit): s/E_GLADEDIR/EVOLUTION_GLADEDIR
-
- * e-msg-composer-attachment-bar.c: #include string.h
- (pixbuf_for_mime_type): s/ICONSDIR/IMAGESDIR/
-
- * e-msg-composer-hdrs.c: #include string.h
-
- * e-msg-composer-select-file.c (run_selector): Remove unused var
-
- * evolution-composer.c: #include string.h
- (evolution_composer_init): Remove unused var
-
- * listener.c: #include string.h
- (listener_new): Remove unused var
-
-2003-02-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (e_msg_composer_new_from_url): Split out the
- mailto handling code from here so we can use it in the drag-n-drop
- code too.
- (drag_data_received): If we find a mailto: url in the
- text/uri-list drop, pass that off to handle_mailto() so it can
- fill in the fields for us.
-
-2003-02-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-attachment.c: Just use
- gnome_vfs_get_mime_type_from_name().
-
-2003-02-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-attachment.c (update_mime_type): Give
- gnome_vfs_get_uri_from_local_path a full path.
-
-2003-01-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (e_msg_composer_new_from_url): If the subject
- or body components of the mailto url are not in UTF-8, convert
- them to UTF-8.
-
- * e-msg-composer-attachment.c (update_mime_type): Fixed a #warning
- by converting the filename into a uri before passing it into
- gnome_vfs_get_mime_type() since that function really needs a uri.
-
-2003-01-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-hdrs.c (init): Get the list of accounts here and
- ref the account-list.
- (destroy): Unref the accounts list here.
- (create_from_optionmenu): Connect to the added/changed/removed
- account-list signals here.
- (account_added_cb): New callback function that adds the newly
- added account to the from-dropdown menu.
- (account_changed_cb): New callback that changes the label for the
- account that got changed in the dropdown menu.
- (account_removed_cb): Removes the account from the from dropdown
- menu.
-
-2003-01-24 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am (iconsdir): Remove, this is now defined in
- configure.in.
-
-2003-01-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (e_msg_composer_load_config): Load the view
- menu states from gconf.
- (e_msg_composer_set_send_html): Save the setting via gconf instead
- of bonobo-config.
- (e_msg_composer_set_view_from): Same.
- (e_msg_composer_set_view_replyto): Here too.
- (e_msg_composer_set_view_cc): Again here.
- (e_msg_composer_set_view_bcc): And finally here.
- (setup_ui): Fixed a #warning - use gconf instead of bonobo-conf.
- (destroy): No need to sync/destroy the bonobo-conf db, we don't
- use it anymore.
-
-2003-01-16 Ettore Perazzoli <ettore@ximian.com>
-
- * e-msg-composer.c (setup_ui): Get evolution-message-composer.xml
- from EVOLUTION_UI_DIRECTORY.
-
- * Makefile.am (gladedir): Version it using $(BASE_VERSION).
- (iconsdir): Likewise.
- (libcomposerincludedir): Removed.
-
-2003-01-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * evolution-composer.c (impl_Composer_set_headers): Updated to use
- EAccountList and iterators.
- (evolution_composer_init): Updated to use EAccount.
-
- * e-msg-composer.c (from_changed_cb): Updated to use the EAccount
- object.
- (e_msg_composer_new_with_message): Same.
- (e_msg_composer_get_preferred_account): Updated to return an
- EAccount object.
- (set_editor_signature): Updated to use an EAccountIdentity pointer.
- (get_signature_html): Same.
-
- * e-msg-composer-hdrs.c (create_from_optionmenu): Updated to use
- EAccount and EAccountList foo.
- (destroy): Same here.
- (e_msg_composer_hdrs_set_from_account): Here too.
- (e_msg_composer_hdrs_get_from): Updated.
-
-2003-01-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (signature_cb): mail_config_get_signature_list
- now returns a GSList.
- (setup_signatures_menu): Same.
- (set_signature_gui): Here too.
-
-2003-01-14 Ettore Perazzoli <ettore@ximian.com>
-
- * e-msg-composer.c (do_exit): Make dialog HIG compliant
- [Discard/Cancel/Save].
-
-2003-01-09 Chris Toshok <toshok@ximian.com>
-
- * e-msg-composer-hdrs.c (e_msg_composer_hdrs_set_to): don't pass
- NULL to bonobo_widget_set_property.
- (e_msg_composer_hdrs_set_cc): same.
- (e_msg_composer_hdrs_set_bcc): same.
-
-2003-01-09 Chris Toshok <toshok@ximian.com>
-
- * e-msg-composer-hdrs.c (e_msg_composer_hdrs_new): need to
- ref/sink "new" so that the g_object_unref doesn't spew a warning.
-
-2003-01-08 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am: Icons are now in $(datadir)/evolution/images
- instead of $(datadir)/images/evolution.
-
-2003-01-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-hdrs.c (create_from_optionmenu): Use gconf to get
- the default account index.
- (e_msg_composer_hdrs_set_from_account): Same.
-
-2003-01-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-attachment-bar.c (get_default_charset): New
- convenience function.
- (attach_to_multipart): Use get_default_charset().
-
- * e-msg-composer.c (composer_get_default_charset): Convenience
- function.
- (get_file_content): Use the convenience function to get the
- default charset setting.
- (best_charset): Same.
- (e_msg_composer_new): Use gconf to get the send_html setting.
- (e_msg_composer_new_post): Same.
-
-2003-01-06 Dan Winship <danw@ximian.com>
-
- * Makefile.am: Remove idldir definition. (It's defined in
- configure.in now)
-
-2002-12-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (get_signature_html): Use camel_text_to_html().
- (e_msg_composer_new_from_url): Same.
-
- * evolution-composer.c (impl_Composer_set_body): Use
- camel_text_to_html().
-
-2002-12-07 Jeffrey Stedfast <fejj@ximian.com>
-
- Fix for bug #33295
-
- * e-msg-composer-attachment.c: Change the parent_class to a
- GObjectClass pointer instead of a GtkObjectClass pointer.
- (e_msg_composer_attachment_edit): Ref the attachment object so
- that if the attachment is removed while it is still being edited,
- the attachment object will still exist and therefor foil the
- user's attempt to make Evolution crash when they close the
- properties dialog for this attachment.
- (close_cb): Unref the attachment object.
-
-2002-12-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (message_rfc822_dnd): Get rid of the unused
- exception variable.
-
-2002-11-27 Not Zed <NotZed@Ximian.com>
-
- * e-msg-composer.c (save): removed warning about e_notice. its
- used too much, its here to stay.
-
- * *.[ch]: run fix.sh over everything.
-
-2002-12-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c: s/g_str[n]casecmp/str[n]casecmp
-
-2002-11-26 Not Zed <NotZed@Ximian.com>
-
- * e-msg-composer.c (composer_finalise): properly chain finalise.
-
-2002-11-25 Not Zed <NotZed@Ximian.com>
-
- * e-msg-composer-attachment-bar.c (init): Remove the window size
- setting.
- (e_msg_composer_attachment_bar_new): Move the window size setting
- here. Also set icon width based on 15 approximate characters, so
- the icon text is more readable.
-
-2002-11-22 Not Zed <NotZed@Ximian.com>
-
- * e-msg-composer-select-file.c: rewrote most of this. Just use
- gtkfileselection directly, no e-file-selector, much
- smaller/simpler.
-
-2002-11-21 Not Zed <NotZed@Ximian.com>
-
- * e-msg-composer-attachment-bar.c (remove_attachment): fix
- g_signal_emit params, detail in wrong spot.
- (add_common): Same.
-
- * e-icon-list.c (icon_new_from_pixbuf): remove the
- 'use_broken_event_handling' set.
- (emit_select): Add detail to signal emit.
- (text_changed): Same.
-
- * e-msg-composer.c (subject_changed_cb): Duh! dont free subject &
- simplify logic a little.
-
-2002-11-20 Not Zed <NotZed@Ximian.com>
-
- * e-msg-composer-hdrs.c (entry_changed): duh, emit the signal
- using an initialised value(!).
-
-2002-11-19 Radek Doulik <rodo@ximian.com>
-
- * e-msg-composer.c (e_msg_composer_get_sig_file_content): use
- CAMEL_MIME_FILTER_TOHTML_PRESERVE_8BIT flag
-
-2002-11-19 Not Zed <NotZed@Ximian.com>
-
- * e-msg-composer-attachment-bar.c (add_from_file): dont unref
- after destroy. duh.
-
- * e-msg-composer-hdrs.c (e_msg_composer_hdrs_set_to): Add type
- code to set_property call.
- (e_msg_composer_hdrs_set_cc): "
- (e_msg_composer_hdrs_set_bcc): "
- (e_msg_composer_hdrs_get_to): Do the same for get_property calls.
- (init): ref/sink the tooltip object.
- (e_msg_composer_hdrs_get_type): fix return type.
-
- * e-msg-composer.c (GNOME_GTKHTML_EDITOR_CONTROL_ID): we want
- version 3.0 not 1.1.
- (create_composer): Add type code to set property call.
- (autosave_manager_query_load_orphans): my bad, we dont unref
- dialog's once we've destroyed 'em.
- (build_message): "
- (get_file_content): "
- (save): "
- (do_exit): "
- (composer_dispose): moved the autosave shutdown here.
-
-2002-11-18 Not Zed <NotZed@Ximian.com>
-
- * e-msg-composer.c (create_composer): Remove check for
- gtk_main_level(). as far as i can tell it serves no real purpose,
- and i think gtkmain is now redundant.
- (e_msg_composer_new_with_message): Same here.
- (destroy): moved some stuff into finalise, and made destroy
- mulitcall safe.
-
-2002-11-13 Ettore Perazzoli <ettore@ximian.com>
-
- * listener.h: Removed {BEGIN,END}_GNOME_DECLS.
-
- * e-msg-composer-select-file.c: Do not #include
- <libgnome/gnome-defs.h>.
- * e-msg-composer.c: Likewise.
- * listener.h: Likewise.
-
-2002-11-13 Not Zed <NotZed@Ximian.com>
-
- * e-msg-composer.c (setup_ui): bonobo api changes.
-
- * e-icon-list.c (e_icon_list_new): Use the right object_new method.
-
- * e-icon-list.h: get rid of BEGIN/END_GNOME_DECLS stuff.
-
-2002-11-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-attachment-bar.c: Remove some unused ehaders and
- ones that cause compilation failures (such as gnome-defs.h).
-
- * e-icon-list.h: Same.
-
-2002-11-08 Not Zed <NotZed@Ximian.com>
-
- * listener.c: Fix bonobo object setup.
-
- * e-msg-composer-hdrs.c: Remove oaf stuff, fix destroy to be
- multi-call safe.
-
- * e-msg-composer-attachment.c (e_msg_composer_attachment_new):
- Remove utf8 from locale conversions, & glib api changes.
- (ok_cb): "
-
- * e-msg-composer-attachment-bar.c (add_from_file): gtk message
- dialog.
- (pixbuf_for_mime_type): glib,gnome-vfs api changes.
- (init): Estimate the icon_height based on the pango font
- description size, this is probably not correct.
- (properties_cb):
- (remove_cb): Changed signature for gnomeui callbacks.
- (popup_icon_context_menu):
- (popup_context_menu): popup_menu api change
- (destroy): Protect from multiple calls.
- (e_msg_composer_attachment_bar_new): Remove push/pop
- visual/colormap stuff.
-
- * composer-marshal.list: The list of marshallers used by the
- composer.
-
- * Makefile.am (composer-marshal.h): Added composer marshal builder.
-
- * evolution-composer.c (class_init): bonobo object epv setup change.
- (factory_fn): Fix changes to factory callback.
-
- * e-icon-list.c: (icon_get_height): Use bounding box to calc
- height.
- (icon_event): drop gtk_selection_extended.
- (e_icon_list_remove): "
- (select_icon):
- (unselect_icon): "
-
- * e-msg-composer.c (autosave_save_draft): Dup fd rather than poke
- camel_stream_fd's data. Also, use camel_stream_close() rather
- than flush.
- (autosave_manager_query_load_orphans): Port to gtk dialog.
- (autosave_query_cb): Removed, redundant.
- (save): Port to gtkdialog.
- (prepare_engine): Fix bonobo-object-client code.
- (get_file_content): gtk dialog
- (do_exit): gtk dialog.
- (setup_signatures_menu): dump gtkutf8 stuff.
- (marshal_NONE__NONE_INT): What WAS jeff thinking? Removed :)
- (class_init): g object setup.
- (e_msg_composer_get_type): "
- (create_composer): remove bonobo_window_construct, use create
- property instead. g_signal stuff. bonobo stuff.
- (is_special_header): Use ascii_strncasecmp
- (e_msg_composer_set_pending_body): gtk->g_object_get/set_data.
- (e_msg_composer_set_body): use ascii_strncasecmp
- (e_msg_composer_add_inline_image_from_mime_part): make cid const.
- (autosave_manager_register):
- (autosave_manager_unregister): Use g_path_get_basename() & account
- for differences.
- (composer_shutdown): rename to finalise/etc.
- (class_init): Use object:finalize instead of shutdown.
- (e_msg_composer_set_body): Use _() rather than U_().
- (build_message): gtk dialog.
-
-2002-11-06 Not Zed <NotZed@Ximian.com>
-
- * e-msg-composer-attachment-bar.c (pixbuf_for_mime_type): Add
- error return to gdk_pixbuf_new_from_file().
-
-2002-11-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (e_msg_composer_new_from_url): Add support for
- an attach option in the mailto: url.
-
-2002-10-29 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (e_msg_composer_new_with_message): Make sure to
- save References and In-Reply-To headers. Fixes bug #32932.
-
-2002-10-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-attachment-bar.c (attach_to_multipart): Don't set
- the charset param on text parts nor tha rawtext bit on the content
- if a charset for the part is already specified.
-
-2002-10-25 Ettore Perazzoli <ettore@ximian.com>
-
- * e-msg-composer-attachment-bar.c (size_to_string): Return NULL
- instead of the empty string if the size is less than one K.
- (update): Only put the size if size_to_string() doesn't return
- NULL. [#32751]
-
-2002-10-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-hdrs.c (create_from_optionmenu): Only add the
- account address to the list of addresses if it is non-NULL. Fixes
- bug #32446 although it shouldn't ever happen anyway (an account
- address is not allowed to be NULL).
-
-2002-10-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-attachment.c (e_msg_composer_attachment_new): We
- need to treat message/rfc822 streams differently. Fixes bug
- #32378.
-
-2002-10-16 Not Zed <NotZed@Ximian.com>
-
- * e-msg-composer-select-file.c (select_file_internal): Mark the
- file selector modal. Quick fix for bug #32256.
-
-2002-10-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-attachment-bar.c (attach_to_multipart): Set
- content->rawtext to TRUE for text parts because the content is in
- its raw form (since we didn't know the charset when we created
- it). Also only write out the content-object to discover the best
- encoding, we don't want to include the headers of the MIME
- part. Second half of the fix for bug #31655.
-
-2002-10-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (get_file_content): Don't create a new file if
- the file doesn't exist.
-
-2002-10-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (build_message): If the user hits cancel when
- signing/encrypting, don't continue constructing the message,
- instead abort (and just don't pop up a dialog).
-
-2002-10-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (build_message): When signing/encrypting a
- part, if a USER_CANCEL occurs, re-use the part otherwise unref it
- and replace it with the new part.
-
-2002-09-30 Aaron Weber <aaron@ximian.com>
-
- * evolution-composer.c (evolution_composer_factory_init): adjust
- string on line 391
-
- * e-msg-composer.c (create_composer): adjust string on 2872
-
-2002-09-27 Dan Winship <danw@ximian.com>
-
- * Evolution-Composer.idl (setHeaders): let the caller set the
- "From" account too (by name or address).
-
- * evolution-composer.c (impl_Composer_set_headers): Update for
- that.
-
-2002-09-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (build_message): Don't reuse the part that
- we've signed and/or encrypted, create a new part container
- instead. Fixes bug #31379.
-
-2002-09-25 Dan Winship <danw@ximian.com>
-
- * e-msg-composer-hdrs.c (create_headers): Use "mail/*" for the
- allowed_types for the posting folder selector.
-
-2002-09-24 Dan Winship <danw@ximian.com>
-
- * e-msg-composer-hdrs.c (create_from_optionmenu): Only append the
- account name to the end of the From menu item if the email address
- is not unique. (That was added for people who have multiple
- accounts with the same email address but different transports. The
- rest of us don't need to be reminded of the account name, and
- having it there can make the window very wide.)
-
-2002-09-24 Zbigniew Chyla <cyba@gnome.pl>
-
- * e-msg-composer-attachment-bar.c (size_to_string):
- Don't mark empty string with _().
-
-2002-09-23 Ettore Perazzoli <ettore@ximian.com>
-
- * e-icon-list.c (icon_new_from_pixbuf): Removed a #warning.
-
- * e-msg-composer-attachment-bar.c (size_to_string): Don't use dots
- here so we don't get funny wrapping from GnomeIconList. [#236]
-
-2002-09-22 Dan Winship <danw@ximian.com>
-
- * e-msg-composer.c (save): Fix non-ANSI switch statement
-
-2002-09-19 Radek Doulik <rodo@ximian.com>
-
- * e-msg-composer.c (signature_cb): allow to select last 2 menu
- items
-
-2002-09-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (add_attachments_from_multipart): Handle
- multipart/signed and multipart/encrypted parts in a more expected
- way. Fixes bug #28453.
-
-2002-09-15 Kjartan Maraas <kmaraas@gnome.org>
-
- * e-msg-composer.c: Mark a string for translation.
-
-2002-09-05 Ettore Perazzoli <ettore@ximian.com>
-
- * e-msg-composer.c (composer_key_pressed): Don't chain the event
- handler here -- that's just wrong! Also stop emission of the
- signal when we catch Escape.
-
-2002-09-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (create_composer): Make it so that the composer
- will close when the user hits Escape.
-
-2002-08-27 Radek Doulik <rodo@ximian.com>
-
- * e-msg-composer.c (signature_cb): removed "Set as default" menu item
-
-2002-08-26 Peter Williams <peterw@ximian.com>
-
- * e-msg-composer.c (handle_multipart): Oops, we were overwriting
- 'multipart' with our child multipart. Fixes 29399.
- (handle_multipart_alternative): Here too.
-
-2002-08-22 Jeffrey Stedfast <fejj@ximian.com>
-
- Fixes bug #29016
-
- * e-msg-composer.c (e_msg_composer_new_with_message): If the
- X-Evolution-PostTo header exists, then treat this message composer
- as a PostTo composer rather than a mail composer.
-
- * e-msg-composer-hdrs.c (e_msg_composer_hdrs_to_message_internal):
- Set the X-Evolution-PostTo header if that is the mdoe we are in.
-
-2002-08-16 Dan Winship <danw@ximian.com>
-
- * e-msg-composer-hdrs.c (create_headers): Use an
- EvolutionFolderSelectorButton instead of a label to indicate the
- posting destination. #27920.
- (e_msg_composer_hdrs_set_post_to): Use
- evolution_folder_button_set_uri.
- (e_msg_composer_hdrs_get_post_to): Use
- evolution_folder_button_get_folder.
-
-2002-08-14 Dan Winship <danw@ximian.com>
-
- * e-msg-composer.c (from_changed_cb): Don't turn on pgp signing if
- this is an iMIP message and pgp_no_imip_sign is set.
- (e_msg_composer_set_body): If setting a text/calendar body and
- pgp_no_imip_sign is true, turn off signing.
-
-2002-08-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (do_exit): Make the warning dialog display the
- message subject so that it is more clear which composer the dialog
- is referring to. Fixes bug #25467.
-
-2002-08-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-select-file.c (create_file_selection): Set the
- file-selection window icon. Fixes the mailer part of bug #7368.
-
- * e-msg-composer-attachment.c (e_msg_composer_attachment_new):
- Don't call new_from_mime_part() since that function now does some
- copying of the mime part rather than simply reffing it.
- (e_msg_composer_attachment_new_from_mime_part): Make a copy of the
- MIME part so that if the message that this part belongs to gets
- deleted from the the remote store, the composer will still have a
- copy of it. Fixes bug #20308.
-
-2002-07-31 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (e_msg_composer_new_with_message): Parse the
- auto-cc/bcc recipients and then later when parsing the cc/bcc
- recipients into EDestination objects, if the address is an
- auto-*cc address, then set auto_recipient to TRUE on that
- EDestination. This fixes bug #28339.
-
-2002-07-29 Radek Doulik <rodo@ximian.com>
-
- * e-msg-composer.c (encode_signature_name): new helper function
- (decode_signature_name): new helper function
- (get_signature_html): use encode_signature_name
- (set_signature_gui): use decode_signature_name
-
-2002-07-26 Radek Doulik <rodo@ximian.com>
-
- * e-msg-composer.c (do_exit): don't assert on default, when ESC is
- pressed, the dialog is closed as well and we get button number -1
- (set_signature_gui): new helper method to set signature from draft
- message
- (e_msg_composer_new_with_message): use set_signature_gui
-
-2002-07-26 Ettore Perazzoli <ettore@ximian.com>
-
- * e-msg-composer-attachment-bar.c (pixbuf_for_mime_type):
- Special-case message/digest, multipart/digest and message/rfc822
- and give them a nice icon. [#9786]
-
- * Makefile.am (INCLUDES): Add -D for EVOLUTION_ICONSDIR.
-
-2002-07-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-hdrs.c (create_headers): Create the Post-To
- header.
- (headers_set_visibility): Possibly show the Post-To header.
- (attach_headers): Attach the Post-To header.
- (e_msg_composer_hdrs_set_post_to): Set the text for the Post-To
- header.
- (e_msg_composer_hdrs_get_post_to_label): Return the label widget
- for this header pair.
- (e_msg_composer_hdrs_set_visible_mask): New function to set the
- visible mask (so we can disallow certain headers to be shown).
- (e_msg_composer_hdrs_new): Save the visible mask argument.
- (setup_headers): To: does not always have to be visible anymore.
- (e_msg_composer_hdrs_get_post_to): New function to get the url for
- the Post-To folder.
-
- * e-msg-composer.c (e_msg_composer_get_visible_flags): Set the
- Post-To bit when it is supposed to be visible.
- (e_msg_composer_new_post): Set the visible_mask to only allow the
- headers needed for Posting.
-
-2002-07-25 Dan Winship <danw@ximian.com>
-
- * e-msg-composer.c (e_msg_composer_set_body): Fix spelling.
-
-2002-07-23 Radek Doulik <rodo@ximian.com>
-
- * e-msg-composer.c (autosave_run): restart automanager to avoid
- multiple dialog apearing
-
-2002-07-23 Not Zed <NotZed@Ximian.com>
-
- * Applied patch below.
-
-2002-07-19 Christian Kreibich <christian@whoop.org>
-
- * e.msg-composer.c (get_signature_html): Test for the signature
- delimiter not only at the beginning of a signature file, but also
- inside the signature.
-
-2002-07-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (e_msg_composer_set_view_bcc): Reverted some
- code that got committed by accident.
- (e_msg_composer_set_view_cc): Same.
- (e_msg_composer_set_view_replyto): Here too.
- (e_msg_composer_set_view_from): And here.
-
-2002-07-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c: Removed a lot of extra g_return_if_fail's that
- we don't need (if we are going to check if the pointer is a a
- composer widget using the gtk type-check macros, then there is no
- need to first check that it isn't NULL).
- (get_file_content): Signatures are now supposed to be in UTF-8 and
- not the user's locale charset, so we must first read in the
- content, then check that it is valid UTF-8. If it isn't, then we
- need to try to convert it to UTF-8.
-
-2002-07-22 Radek Doulik <rodo@ximian.com>
-
- * e-msg-composer.c: removed Insert File menu item
-
-2002-07-19 Not Zed <NotZed@Ximian.com>
-
- * e-msg-composer-hdrs.c (e_msg_composer_hdrs_to_message_internal):
- This should use address_encode, since its an rfc822 address, not
- address_format which is for display.
-
-2002-07-17 Radek Doulik <rodo@ximian.com>
-
- * e-msg-composer.c (save): use "saved" gtkhtml command
- (e_msg_composer_is_dirty): use "is-saved" gtkhtml command
-
-2002-07-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (e_msg_composer_set_headers): Set the
- from-account last so that auto-cc/bcc recipients don't get
- overwritten when setting the cc/bcc recipient fields.
-
-2002-07-16 Peter Williams <peterw@ximian.com>
-
- * e-msg-composer.c (create_composer): Instead of doing this with a
- weakref, do it by connecting to the destroy signal. The weakref was
- not getting notified in certain conditions that I could never really
- pin down, and this caused problems at exit.
-
- * e-msg-composer-hdrs.c (create_headers): Reorder to create reply_to
- before from, because create_from_optionmenu causes from_changed to
- be called, which expects reply_to.entry to exist.
-
-2002-07-15 Radek Doulik <rodo@ximian.com>
-
- * e-msg-composer.c (build_message): added save_html_object_data
- parameter, use gtkhtml command to save object data when wanted
-
-2002-07-08 Peter Williams <peterw@ximian.com>
-
- * Makefile.am (INCLUDES): Fix cflags for ebook header namespacing.
-
-2002-07-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * evolution-composer.c (init): Don't connect to the postpone
- signal, but do connect to the save-draft signal.
- (evolution_composer_factory_init): No longer takes a postpone_cb
- argument, but does now take a save_draft_cb argument.
-
- * e-msg-composer.c (menu_file_send_later_cb): Removed.
- (class_init): Removed the POSTPONE signal.
- (setup_ui): Don't need to swap the Send/SendLater tooltips and
- accels anymore, since SendLater no longer exists.
-
-2002-06-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (build_message): Use the new
- CamelMultipartEncrypted class to do our encryption work for us. We
- also need to always get the user's userid before encrypting since
- pgp/gpg need that.
- (e_msg_composer_new_with_message): Handle multipart/signed and
- multipart/encrypted parts by adding the (decrypted) content and
- setting the composer to pgp sign/encrypt the message when the user
- re-sends it.
-
-2002-06-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (build_message): Use
- mail_crypto_get_pgp_cipher_context() so that the PGP/GPG decision
- is done for us.
-
-2002-06-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (build_message): Use the new gpg cipher context
- rather than the old pgp context.
-
-2002-06-19 Radek Doulik <rodo@ximian.com>
-
- * e-msg-composer.c (get_signature_html): don't convert text to
- html twice
-
-2002-06-10 Radek Doulik <rodo@ximian.com>
-
- * e-msg-composer.c (signature_cb): added "Set as default" menu
- item
-
- * e-msg-composer-hdrs.c (e_msg_composer_hdrs_get_from_omenu): new
- method
- (e_msg_composer_hdrs_set_from_account): use
- e_msg_composer_hdrs_get_from_omenu
-
-2002-06-07 Radek Doulik <rodo@ximian.com>
-
- * e-msg-composer.c (get_signature_html): use new script signature
- interface
-
-2002-06-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-hdrs.c (e_msg_composer_hdrs_set_from_account):
- Agh, priv->from.entry is no longer a GtkOptionMenu - it is an hbox
- containing the GtkOptionMenu.
-
- * e-msg-composer.c (setup_ui): Remove the customize toolbar thingy
- since Michael said that this would fix bug #17952.
-
- * e-msg-composer-hdrs.c (e_msg_composer_hdrs_set_from_account):
- Clean up the logic in this. For one, we don't need to do strstr
- using the account address (wtf??).
-
-2002-06-05 Radek Doulik <rodo@ximian.com>
-
- * e-msg-composer-hdrs.c (create_from_optionmenu): put option menu
- to hbox to make space for signatures menu
- (e_msg_composer_hdrs_get_from_hbox): new helper function
-
- * e-msg-composer.c: moved signatures from menu to option menu next
- to From:
-
-2002-06-03 Not Zed <NotZed@Ximian.com>
-
- * e-msg-composer.c (build_message): Properly handle user
- cancellation for signing/encrypting, just dont sign but create
- anyway.
- (e_msg_composer_get_subject): Wrapper function to get the subject
- from the header object.
- (e_msg_composer_get_to):
- (e_msg_composer_get_cc):
- (e_msg_composer_get_bcc): Same for the destination types.
-
-2002-06-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (e_msg_composer_guess_mime_type): Allocate a
- new FileInfo struct here rather than using and unref it when we're
- finished with it.
-
-2002-05-30 Not Zed <NotZed@Ximian.com>
-
- * e-msg-composer.c (build_message): Changes for multipart/signed
- api changes.
-
-2002-05-16 Ettore Perazzoli <ettore@ximian.com>
-
- * e-msg-composer.c: New local `all_composers'; keeps a list of all
- the composer windows created. Changed type of `parent_class' to
- BonoboWindowClass *.
- (do_exit): Cleaned up a bit. Raise the composer window before
- showing the message box dialog.
- (exit_dialog_cb): Removed.
- (e_msg_composer_request_close_all): New.
- (create_composer): Add the composer to the all_composers list and
- weakref it.
- (msg_composer_destroy_notify): GtkDestroyNotify function for the
- composer's weakref; remove the composer from the all_composers
- list.
-
-2002-05-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-attachment.c (e_msg_composer_attachment_new):
- Just use g_basename.
-
-2002-04-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (build_message): Check for empty-string pgp-key
- ids and don't use them.
-
-2002-04-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-hdrs.c (destroy): Unref the priv->tooltips object
- here.
-
- * e-msg-composer-attachment-bar.c (destroy): Free the priv struct.
-
- * e-msg-composer.c (set_editor_signature): We don't need a 'name'?
- So don't strdup it.
-
-2002-04-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-hdrs.c (from_changed): Change the Reply-To header
- contents.
- (e_msg_composer_hdrs_set_reply_to): The Reply-To entry was an
- EEntry, not a bonobo control so fix this to set the text using
- e_entry_set_text.
- (e_msg_composer_hdrs_get_reply_to): Use e_entry_get_text here for
- the same reason.
-
-2002-04-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (set_editor_text): No need to query for the
- persist-stream interface here, just re-use
- composer->persist_stream_interface - this might improve the speed
- at which a reply action brings up the composer.
-
-2002-04-09 Not Zed <NotZed@Ximian.com>
-
- * e-msg-composer-hdrs.c (set_recipients_from_destv): Use decode
- rather than unformat - the e_destination was changed (long time
- ago) to rfc2047 encode the addresses, so we should decode
- likewise. Should fix #16158.
-
- * e-msg-composer.c (next_word): g_utf8_next_char never returns
- NULL, it just skips to the next character. So like normal string
- code, we just check for a nul explicitly. Fixes a bug found while
- checking #16158.
-
-2002-04-05 Jeffrey Stedfast <fejj@ximian.com>
-
- Fixes bug #3980.
-
- * e-msg-composer-hdrs.c (e_msg_composer_hdrs_set_cc): If a Cc list
- is set to something non-empty, make sure to show the Cc widgets.
- (e_msg_composer_hdrs_set_bcc): Same but for Bcc.
- (e_msg_composer_hdrs_set_reply_to): And here.
-
-2002-03-28 Christopher James Lahey <clahey@ximian.com>
-
- * e-msg-composer-select-file.c: Switch to using EFileSelection
- here instead of GtkFileSelection.
-
-2002-03-27 Larry Ewing <lewing@ximian.com>
-
- * Makefile.am: fix for the changes to GTKHTML_DATADIR that include
- the release number.
-
-2002-03-18 Dan Winship <danw@ximian.com>
-
- * Evolution-Composer.idl, evolution-composer.c
- (impl_Composer_show): "Forward as iCalendar" uses set_body, so we
- can't make the composer un-showable after doing that. So get rid
- of the "cannot show" exception.
-
- * e-msg-composer.c (e_msg_composer_set_body): Prepare the composer
- to be shown in its weird state: Put an explanatory message in the
- body, then call disable_editor.
- (disable_editor): Common editor-disabling code - makes the editor
- and attachment bar insensitive and disables any menu items that
- could be used to modify them.
- (e_msg_composer_new_redirect): Use disable_editor here now.
-
-2002-03-15 Radek Doulik <rodo@ximian.com>
-
- * e-msg-composer.c: use gtkhtml editor API version 1.1
-
-2002-03-11 Dan Winship <danw@ximian.com>
-
- * listener.c (impl_event): Remove the extremely verbose printf
- here.
-
-2002-03-07 Radek Doulik <rodo@ximian.com>
-
- * e-msg-composer.c (destroy): ops, unregister and not register new
- one sig_event_client
-
-2002-03-04 Dan Winship <danw@ximian.com>
-
- * e-msg-composer.c (build_message): Fix a dumb bug in previous
- commit that broke iMIP containing 8-bit data.
-
-2002-02-25 Dan Winship <danw@ximian.com>
-
- Mailer side of 14705.
-
- * Evolution-Composer.idl (setBody): Change setBodyText to setBody
- and take a MIME type as well.
- (show): Add an exception.
-
- * evolution-composer.c (impl_Composer_set_body, etc): Update for
- IDL change. While I'm here, fix this to DTRT with both plaintext
- and HTML bodies. (It claimed to take plain text before, but then
- passed it to the composer as HTML.)
- (impl_Composer_show): Raise an exception if setBody has been
- called, since the composer window will not display the real data
- in that case.
-
- * e-msg-composer.c (e_msg_composer_set_body): interface for
- impl_Composer_set_body.
- (build_message): If e_msg_composer_set_body has been called, use
- the body and MIME type supplied to it rather than the contents of
- the HTML editor.
-
-2002-02-14 Radek Doulik <rodo@ximian.com>
-
- * e-msg-composer.c (delete_old_signature): don't insert paragraph
- here, also delete paragraph where signature was
- (e_msg_composer_show_sig_file): test if we are in empty document
- and if so, insert new paragraph for signature
-
-2002-02-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (e_msg_composer_flush_pending_body): Use
- set_editor_text()
- (e_msg_composer_new_from_url): Same.
- (e_msg_composer_set_body_text): Re-Show the signature.
-
-2002-02-12 Radek Doulik <rodo@ximian.com>
-
- * e-msg-composer.c (e_msg_composer_is_dirty): reflect gtkhtml API
- change
-
-2002-02-11 Radek Doulik <rodo@ximian.com>
-
- * e-msg-composer.c (e_msg_composer_drop_editor_undo): new method,
- drops undo in editor and resets dirty flag in editor
- (do_exit): remove TRUE from condition as dirty flag in editor
- should work now
- (e_msg_composer_is_dirty): use new editor API for dirty flag
-
-2002-02-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (update_auto_recipients): Update the
- auto-cc/bcc recipients in the composer header fields to match the
- ones chosen in the account configuration.
-
-2002-01-31 Radek Doulik <rodo@ximian.com>
-
- * e-msg-composer.c (e_msg_composer_ignore): new method, tells
- composer to ignore all word in str string
- (next_word): helper function to get next word from s, saves rest
- of s to sr
-
-2002-01-29 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (build_message): If we are in redirect mode,
- use the original message and set the resent-* headers using
- e_msg_composer_hdrs_to_redirect() and then return.
- (destroy): Unref the redirected message if it exists.
-
- * e-msg-composer-hdrs.c (e_msg_composer_hdrs_to_redirect): New
- function for a composer in redirect mode.
-
-2002-01-27 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am: Use GNOME_FULL_CFLAGS.
-
-2002-01-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (get_file_content): Rewrote to use CamelStreams
- and also convert the file contents to UTF-8 (assums the file
- charset is the same charset that the composer is set to).
- (menu_file_insert_file_cb): Pass the composer into
- get_file_content().
- (e_msg_composer_get_sig_file_content): Pass NULL as the composer
- argument.
-
-2002-01-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (class_init): Fixed the setup of the
- "save-draft" signal so that it would actually work.
-
-2002-01-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (is_special_header): Greatly simplified. No
- need to have a list of headers to not accept - we can just refuse
- all headers that are not X-* headers (other than X-Evolution
- headers).
-
-2002-01-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (e_msg_composer_get_message_draft): Set the
- X-Evolution-Format header to text/plain if that is the editing
- mode we are really in. This fixes bug #11499.
-
-2002-01-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (e_msg_composer_new_from_url): A few minor
- fixes to make it more compliant with rfc2368. Should now be fully
- rfc compliant as far as I can tell.
-
-2002-01-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-attachment.c (e_msg_composer_attachment_edit):
- Only connect to the parent's destroy/hide signals while the
- attachment editor dialog is "alive".
-
-2001-12-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-select-file.c (composer_hide_cb): Only cancel the
- selection dialog if it is currently in use, otherwise we'll get an
- extra gtk_main_quit and the mailer will exit :-(
-
-2001-12-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (read_file_content): Don't block forever if we
- are reading a fifo with no data.
-
-2001-12-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (class_init): Setup the SAVE_DRAFT signal.
- (menu_file_save_draft_cb): Emit the SAVE_DRAFT signal.
- (exit_dialog_cb): Same here.
- (save_draft): Removed. This code is now a signal that
- mail-callbacks will connect to.
-
-2001-12-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-attachment.c (e_msg_composer_attachment_edit):
- Attach to the parent widget's destroy signal - when that gets
- destroyed, we need to cancel the editor dialog too. Also connect
- to our parent window's "hide" signal so that when the composer
- gets hidden (ie, it's being sent), we also close the dialogs.
-
- * e-msg-composer.c (init): Default composer->enable_autosave to
- TRUE.
-
-2001-12-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-select-file.c (confirm): If multiple-selection is
- enabled but nothing is slected, fall back to using the filename in
- the entry box as the "selected" file.
- (create_file_selection): If the composer gets hidden (ie it's
- being "sent") then cancel the file selection dialog.
-
-2001-12-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-select-file.c
- (file_selection_info_destroy_notify): If the widget is non-NULL,
- then gtk_widget_destroy that bad boy...
-
-2001-12-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-attachment-bar.c (add_from_user):
- select_file_attachments now returns a GPtrArray so handle that and
- loop until we've added all the attachment files.
-
- * e-msg-composer-select-file.c (confirm): Add an evil kludge to
- get a list of filenames from the GtkFileSelection widget based on
- the label in the history option menu item and the base filenames
- of the selected items in the filename clist.
- (create_file_selection): Setup the clist to allow multiple
- selection.
- (file_selection_info_destroy_notify): Destroy the GPtrArray
- containing the list of xselected files.
- (select_file_internal): Return a GPtrArray of files instead of a
- char *.
-
-2001-12-10 Jon Trowbridge <trow@ximian.com>
-
- * e-msg-composer.c (get_file_content): Only execute an executable
- sig file if a magic environment variable is set.
-
-2001-12-06 Jon Trowbridge <trow@ximian.com>
-
- * e-msg-composer.c (executed_file_output): Added. Executes the
- given file and returns its output as a string.
- (get_file_content): Stats the file to see if it is executable.
- If it is, execute it and return the string. If not, just read
- the file and return the contents.
-
-2001-11-30 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (setup_ui): Change the FileSend tooltip the be
- the same as the FileSendLater tooltip if we are in offline mode.
-
-2001-11-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (drag_data_received): Allow drag & drop for
- vcards.
-
-2001-11-30 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (setup_ui): Change the FileSend tooltip the be
- the same as the FileSendLater tooltip if we are in offline mode.
-
-2001-11-14 Larry Ewing <lewing@ximian.com>
-
- * e-msg-composer.c (create_composer): popup failure dialog if we
- cannot get a valid editor_engine.
- (prepare_engine): make the checks robust and make sure that we
- unset the engine if any part fails.
-
-2001-11-02 Radek Doulik <rodo@ximian.com>
-
- * e-msg-composer.c (add_inlined_images): use hash table to
- eliminate duplicates
-
-2001-11-02 <NotZed@Ximian.com>
-
- * e-msg-composer.c (e_msg_composer_set_enable_autosave): New
- function, enable/disable autosave for the composer temporarily.
- (autosave_run_foreach_cb): Only save if we have enable autosave
- turned on. In other cases we want to save it regardless.
-
-2001-10-30 Dan Winship <danw@ximian.com>
-
- * e-msg-composer.c (build_message): Add back the "remove
- Content-Disposition when sending itip" hack.
-
- * Evolution-Composer.idl (setMultipartType): New.
-
- * evolution-composer.c (impl_Composer_set_multipart_type): Allow
- caller to specify a multipart/alternative rather than
- multipart/mixed.
-
- * e-msg-composer.c (build_message): Revert yesterday's changes.
- Add new ones for sending multipart/alternative.
-
-2001-10-30 Larry Ewing <lewing@ximian.com>
-
- * e-msg-composer.h: add dirty prototype.
-
- * e-msg-composer.c: add dirty implementation.
-
-2001-10-30 Radek Doulik <rodo@ximian.com>
-
- * listener.c (insert_paragraph_before): new helper function,
- extracted
- (insert_paragraph_after): ditto
- (impl_event): process command_before and command_after, use new
- functions
- (clear_signature): reset style to be sure
- (reply_indent): ditto
-
-2001-10-30 Dan Winship <danw@ximian.com>
-
- * e-msg-composer.c (build_message): Remove Content-Disposition in
- the no_body case. (More kludging around Outlook iCalendar
- brokenness.)
-
-2001-10-29 Ettore Perazzoli <ettore@ximian.com>
-
- * e-msg-composer.c (setup_ui): Put the charset encoding submenu in
- the EncodingPlaceholder.
-
-2001-10-29 Dan Winship <danw@ximian.com>
-
- * evolution-composer.c (init): Set the (new) "no_body" flag on the
- composer.
- (impl_Composer_set_body_text): And unset it here.
- (unset_no_body): And here (called if/when the composer is
- realized).
-
- * e-msg-composer.c (build_message): If the composer has the
- "no_body" flag set, and a single attachment, promote that
- attachment to be the message body.
-
-2001-10-30 Radek Doulik <rodo@ximian.com>
-
- * listener.c (reply_indent): simplified, requires new gtkhtml
-
-2001-10-29 Larry Ewing <lewing@ximian.com>
-
- * e-msg-composer.h: add GList to hold the current images.
-
- * listener.c (resolve_image_url): keep track of the images that
- the editor is currently uses in current_images as well as storing
- the images in the hash.
-
- * e-msg-composer.c (clear_current_images): clear the list of
- images actually in the message.
- (add_inlined_images): use the current image list rather than the
- hash tables.
- (build_message): clear the current image list when appropriate.
- (init): initialize current_images.
-
-2001-10-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (add_attachments_from_multipart): New function
- that replaces handle_multpart() and handle_multipart_alternative()
- for add_message_attachments().
- (e_msg_composer_add_message_attachments): Call
- add_attachments_from_multipart().
- (handle_multipart_alternative): Now only used by
- new_with_message() and is really only designed to work well with
- messages generated by Evolution (ie for editing Drafts and such).
- (handle_multipart): Same.
- (e_msg_composer_new_with_message): No longer calls
- add_message_attachments() because we can't ever have this fail and
- the logic in add_message_attachments() is impossible
- logic. Instead do like what we used to do before the addition of
- add_message_attachments() came along.
-
-2001-10-24 Larry Ewing <lewing@ximian.com>
-
- * e-msg-composer.c
- (e_msg_composer_add_inline_image_from_mime_part): rework this so
- that we don't end up freeing the cid then reading from it.
-
-2001-10-22 Jon Trowbridge <trow@ximian.com>
-
- * e-msg-composer-hdrs.c (create_from_optionmenu): Check that
- account->id->address != NULL.
-
-2001-10-21 Dan Winship <danw@ximian.com>
-
- Make inline images used for replies not show up as
- attachments. Also, I think this should make replies to HTML
- messages containing inline images referenced via Content-Location
- work, but that's not tested.
-
- * e-msg-composer.c (various): Keep two hash tables of inline image
- data: one mapping from cid: URLs to CamelMimeParts for all
- attachments, the other mapping from file: and Content-Location
- urls to CamelMimeParts (for those inline images that came from a
- file or have a Content-Location).
- (add_inlined_images): Simplify. Most of this code is in
- e_msg_composer_add_inline_image_from_file() now.
- (e_msg_composer_add_message_attachments, handle_multipart): Change
- "attach_all" arg to "just_inlines". If it is set, call
- e_msg_composer_add_inline_image_from_mime_part on any attachment
- with a Content-Id or Content-Location.
- (e_msg_composer_add_inline_image_from_file): Create a mime part
- from a file and add it to the inline images hash.
- (e_msg_composer_add_inline_image_from_mime_part): Add a mime part
- directly to the inline images hash.
-
- * listener.c (resolve_image_url): If asked to resolve a file: URL
- that isn't in the inline images hash, call
- e_msg_composer_add_inline_image_from_file to get a cid for it.
- (impl_event): Look up the URL in the inline_images and
- inline_images_by_url hashes.
-
- * e-msg-composer-attachment-bar.c
- (e_msg_composer_attachment_bar_find_message): Gone. No longer
- used.
-
-2001-10-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (handle_multipart): Now takes a 'attach_all'
- argument. If !attach_all, then only attach the attachment if the
- part has a content-id, otherwise we can safely assume that nothing
- references it thus we don't need to attach it.
- (e_msg_composer_add_message_attachments): Now takes a 'attach_all'
- argument that overrides the "only attach attachments if they have
- a content-id header" behavior.
- (e_msg_composer_new_with_message): Pass TRUE as the attach_all
- argument to add_message_attachments.
-
-2001-10-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (best_encoding): Don't use a
- g_return_val_if_fail after iconv_open, this is a valid error
- condition and so should use check it for real.
-
- * e-msg-composer-attachment-bar.c (attach_to_multipart): Correctly
- set the charset parameter and use camel's bestenc filter to
- determine which content transfer encoding to use.
-
-2001-10-15 Larry Ewing <lewing@ximian.com>
-
- * e-msg-composer.c (e_msg_composer_add_message_attachments):
- s/apply/flush/.
- (e_msg_composer_flush_pending_body): renamed from apply now takes
- apply as an argument.
- (e_msg_composer_show_sig_file): s/g_assert/g_return_if_fail/
- warnings make for less painful bugs than crashes.
- (set_editor_text): s/g_assert/g_return_if_fail/
-
-2001-10-13 Dan Winship <danw@ximian.com>
-
- * e-msg-composer.c (autosave_manager_unregister): Don't pop up an
- "unable to retrieve message" if the composer never finished
- initializing.
- (init): Don't call autosave_manager_register here: wait until the
- end of create_composer.
- (create_composer): Remove the distinction between this and
- e_msg_composer_construct since there's no need for the latter. Use
- e_activation_failure_dialog if either the selectnames component or
- the gtkhtml editor fails.
-
- * e-msg-composer-hdrs.c (setup_corba): Don't g_warn if the oaf
- activation fails. create_composer() will tell the user.
-
-2001-10-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * listener.c (impl_event): Deleted declaration of len.
-
- * e-msg-composer.c (e_msg_composer_add_message_attachments): Take
- a settext argument.
- (e_msg_composer_new_with_message): Updated to pass the settext argument.
-
-2001-10-10 Jon Trowbridge <trow@ximian.com>
-
- * e-msg-composer-hdrs.c (e_msg_composer_hdrs_set_from_account):
- Check for either a matching account name, or for a matching e-mail
- address embedded in the passed-in string. (Fixes half of bug
- #3255)
- (destroy): Call bonobo_object_release_unref on corba_select_names,
- not CORBA_Object_release. Otherwise we leak stuff all over the
- place. (Bug #11878)
-
- * e-msg-composer.c (e_msg_composer_new_with_message): If our message
- doesn't contain an X-Evolution-Account header, pass in the From
- header as the account name. (Fixes the other half of #3255)
-
-2001-10-10 Larry Ewing <lewing@ximian.com>
-
- * e-msg-composer.h: add prototype.
-
- * e-msg-composer.c (e_msg_composer_add_message_attachments): new
- function to copy attachments from the a message to a composer.
- (e_msg_composer_set_pending_body): make simple function to
- abstract this.
- (e_msg_composer_apply_pending_body): apply the pending body to
- the composer.
- (e_msg_composer_new_with_message): use
- e_msg_composer_add_message_attachments to copy attachments.
-
-2001-10-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-attachment-bar.c (add_from_file): If the
- attachment fails, report the error to the user.
-
- * e-msg-composer-attachment.c (e_msg_composer_attachment_new): Now
- takes a CamelException argument.
-
- * e-msg-composer.c (setup_ui): Pass /menu/Edit as the menu path to
- e_charset_picker thingy.
-
-2001-10-05 Larry Ewing <lewing@ximian.com>
-
- * e-msg-composer-attachment-bar.c
- (e_msg_composer_attachment_bar_find_message): fix cut&pasteo.
-
- * e-msg-composer-attachment.c (e_msg_composer_attachment_new):
- remove unused variable.
-
- * e-msg-composer-attachment-bar.c
- (e_msg_composer_attachment_bar_find_message): generalize this to
- lookup content locations as well.
-
- * e-msg-composer-attachment-bar.h: change prototype to match the
- new function.
-
- * listener.c (impl_event): handle the url_requested event, look up
- parts in the attachment part and feed them down the stream if it
- is found.
-
- * e-msg-composer.c (handle_multipart_alternative): delay setting
- the body text.
- (handle_multipart): delay setting body text
- (e_msg_composer_new_with_message): set the body text from the
- object data. Doing this ensures that we will have the attachments
- processed before we try to look them up.
-
-2001-10-04 Larry Ewing <lewing@ximian.com>
-
- * e-msg-composer-attachment-bar.c
- (e_msg_composer_attachment_bar_find_content_id): change to return
- a CamelMimePart.
-
- * e-msg-composer-attachment-bar.h: update prototype.
-
- * e-msg-composer-attachment-bar.c
- (e_msg_composer_attachment_bar_find_content_id): look up an
- attachment by it's content id.
-
- * e-msg-composer-attachment-bar.h: add prototype for
- e_msg_composer_attachment_bar_find_content_id.
-
-2001-10-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (autosave_save_draft): Make sure to unref the
- message object so we don't leak it or any references to
- attachments (child mime parts).
-
- * e-msg-composer-attachment.c (e_msg_composer_attachment_new):
- Unref the mime part after passing it along to new_from_mime_part.
-
-2001-10-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (save_draft): Pass an empty flags argument to
- mail_get_folder.
-
-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 5dc62a3317..0000000000
--- a/composer/Evolution-Composer.idl
+++ /dev/null
@@ -1,141 +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;
-
- enum MultipartType {
- MIXED,
- ALTERNATIVE
- };
-
- /**
- * setHeaders:
- * @from: the "From" account or address
- * @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. If @from is empty or invalid, the
- * default account will be used. Otherwise is
- * specifies an account name or email address to send
- * from.
- **/
- void setHeaders (in string from, in RecipientList to,
- in RecipientList cc, in RecipientList bcc,
- in string subject);
-
- /**
- * setMultipartType:
- * @type: a multipart subtype
- *
- * Sets the kind of multipart message that is being
- * created.
- *
- * If @type is MIXED (the default), setBody()
- * will create the body, and attachMIME() and
- * attachData() will create attachments.
- *
- * If @type is ALTERNATIVE, setBody() will create
- * text/plain alternative, and each following
- * attachMIME() or attachData() call will create
- * another alternative.
- *
- * Other values of @type are not currently supported,
- * although "related" probably should be.
- **/
- void setMultipartType (in MultipartType type);
-
- /**
- * setBody:
- * @body: the body
- * @mime_type: the MIME type of @body
- *
- * Sets the body of the composer to @body. If
- * @mime_type is something other than "text/plain" or
- * "text/html", the composer will not be editable
- * and it will not attempt to assign a non-UTF8
- * character set to the data. However, @mime_type may
- * include parameters in that case.
- **/
- void setBody (in string body, in string mime_type);
-
- /**
- * 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 fcd91d787c..0000000000
--- a/composer/Makefile.am
+++ /dev/null
@@ -1,87 +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 $(IDL_INCLUDES) \
- -I $(selectnamesdir) $(srcdir)/Composer.idl
-
-Editor-commmon.c: $(GTKHTML_DATADIR)/Editor.idl
-
-$(HTML_EDITOR_GENERATED): $(GTKHTML_DATADIR)/Editor.idl
- $(ORBIT_IDL) -I $(srcdir) $(IDL_INCLUDES) -I $(GTKHTML_DATADIR)/gtkhtml $(GTKHTML_DATADIR)/Editor.idl
-
-##
-
-idl_DATA = $(IDLS)
-
-glade_DATA = \
- e-msg-composer-attachment.glade
-
-noinst_LTLIBRARIES = libcomposer.la
-
-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 \
- -I$(top_builddir)/addressbook/backend \
- -I$(top_builddir)/addressbook/gui/component/select-names \
- -I$(top_builddir)/shell \
- -I$(top_srcdir)/shell \
- -DEVOLUTION_DATADIR=\"$(datadir)\" \
- -DEVOLUTION_IMAGESDIR=\"$(imagesdir)\" \
- -DEVOLUTION_UIDIR=\"$(evolutionuidir)\" \
- -DEVOLUTION_GLADEDIR=\"$(gladedir)\" \
- -DPREFIX=\"$(prefix)\" \
- -DG_LOG_DOMAIN=\"composer\" \
- -DG_DISABLE_DEPRECATED \
- $(EVOLUTION_MAIL_CFLAGS)
-
-libcomposer_la_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 \
- evolution-composer.c \
- evolution-composer.h \
- listener.c \
- listener.h
-
-EXTRA_DIST = \
- $(glade_DATA) \
- $(IDLS) \
- ChangeLog.pre-1-4
-
-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-msg-composer-attachment-bar.c b/composer/e-msg-composer-attachment-bar.c
deleted file mode 100644
index 9e7b42dfca..0000000000
--- a/composer/e-msg-composer-attachment-bar.c
+++ /dev/null
@@ -1,850 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/*
- * Authors: Ettore Perazzoli <ettore@ximian.com>
- * Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 1999-2002 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 <gtk/gtk.h>
-#include <glade/glade.h>
-#include <gconf/gconf.h>
-#include <gconf/gconf-client.h>
-#include <libgnome/gnome-util.h>
-#include <libgnomeui/gnome-app.h>
-#include <libgnomeui/gnome-app-helper.h>
-#include <libgnomeui/gnome-popup-menu.h>
-#include <libgnomevfs/gnome-vfs-mime-handlers.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 <gal/util/e-iconv.h>
-
-#include <camel/camel-data-wrapper.h>
-#include <camel/camel-stream-fs.h>
-#include <camel/camel-stream-null.h>
-#include <camel/camel-stream-filter.h>
-#include <camel/camel-mime-filter-bestenc.h>
-#include <camel/camel-mime-part.h>
-
-#include "e-util/e-gui-utils.h"
-
-#define ICON_WIDTH 64
-#define ICON_SEPARATORS " /-_"
-#define ICON_SPACING 2
-#define ICON_ROW_SPACING ICON_SPACING
-#define ICON_COL_SPACING ICON_SPACING
-#define ICON_BORDER 2
-#define ICON_TEXT_SPACING 2
-
-
-static GnomeIconListClass *parent_class = NULL;
-
-struct _EMsgComposerAttachmentBarPrivate {
- GList *attachments;
- guint num_attachments;
-
- GtkWidget *context_menu;
- GtkWidget *icon_context_menu;
-};
-
-
-enum {
- CHANGED,
- LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-
-static void update (EMsgComposerAttachmentBar *bar);
-
-
-static char *
-size_to_string (gulong size)
-{
- char *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) {
- size_string = NULL;
- } else {
- gdouble displayed_size;
-
- if (size < 1e6L) {
- displayed_size = (gdouble) size / 1.0e3;
- size_string = g_strdup_printf (_("%.0fK"), displayed_size);
- } else if (size < 1e9L) {
- displayed_size = (gdouble) size / 1.0e6;
- size_string = g_strdup_printf (_("%.0fM"), displayed_size);
- } else {
- displayed_size = (gdouble) size / 1.0e9;
- size_string = g_strdup_printf (_("%.0fG"), 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)
- g_object_unref (p->data);
-
- priv->attachments = NULL;
-}
-
-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);
-
- g_signal_connect (attachment, "changed",
- G_CALLBACK (attachment_changed_cb),
- bar);
-
- bar->priv->attachments = g_list_append (bar->priv->attachments,
- attachment);
- bar->priv->num_attachments++;
-
- update (bar);
-
- g_signal_emit (bar, signals[CHANGED], 0);
-}
-
-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 char *file_name,
- const char *disposition)
-{
- EMsgComposerAttachment *attachment;
- EMsgComposer *composer;
- CamelException ex;
- GtkWidget *dialog;
-
- camel_exception_init (&ex);
- attachment = e_msg_composer_attachment_new (file_name, disposition, &ex);
- if (attachment) {
- add_common (bar, attachment);
- } else {
- composer = E_MSG_COMPOSER (gtk_widget_get_toplevel (GTK_WIDGET (bar)));
- dialog = gtk_message_dialog_new(GTK_WINDOW(composer),
- GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
- "%s", camel_exception_get_description (&ex));
- gtk_dialog_run(GTK_DIALOG(dialog));
- gtk_widget_destroy(dialog);
- camel_exception_clear (&ex);
- }
-}
-
-static void
-remove_attachment (EMsgComposerAttachmentBar *bar,
- EMsgComposerAttachment *attachment)
-{
- g_return_if_fail (E_IS_MSG_COMPOSER_ATTACHMENT_BAR (bar));
- g_return_if_fail (g_list_find (bar->priv->attachments, attachment) != NULL);
-
- bar->priv->attachments = g_list_remove (bar->priv->attachments,
- attachment);
- bar->priv->num_attachments--;
- if (attachment->editor_gui != NULL) {
- GtkWidget *dialog = glade_xml_get_widget (attachment->editor_gui, "dialog");
- g_signal_emit_by_name (dialog, "response", GTK_RESPONSE_CLOSE);
- }
-
- g_object_unref(attachment);
-
- g_signal_emit (bar, signals[CHANGED], 0);
-}
-
-
-/* Icon list contents handling. */
-
-static void
-update (EMsgComposerAttachmentBar *bar)
-{
- EMsgComposerAttachmentBarPrivate *priv;
- GnomeIconList *icon_list;
- GList *p;
-
- priv = bar->priv;
- icon_list = GNOME_ICON_LIST (bar);
-
- gnome_icon_list_freeze (icon_list);
-
- gnome_icon_list_clear (icon_list);
-
- /* FIXME could be faster, but we don't care. */
- for (p = priv->attachments; p != NULL; p = p->next) {
- EMsgComposerAttachment *attachment;
- CamelContentType *content_type;
- char *size_string, *label;
- GdkPixbuf *pixbuf;
- gboolean image;
- const 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 = camel_content_type_is (content_type, "image", "*");
-
- if (image && attachment->pixbuf_cache == NULL) {
- CamelDataWrapper *wrapper;
- CamelStreamMem *mstream;
- GdkPixbufLoader *loader;
- gboolean error = TRUE;
-
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (attachment->body));
- mstream = (CamelStreamMem *) camel_stream_mem_new ();
-
- camel_data_wrapper_decode_to_stream (wrapper, (CamelStream *) mstream);
-
- /* Stream image into pixbuf loader */
- loader = gdk_pixbuf_loader_new ();
- error = !gdk_pixbuf_loader_write (loader, mstream->buffer->data, mstream->buffer->len, NULL);
- gdk_pixbuf_loader_close (loader, NULL);
-
- 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 */
- g_object_unref (loader);
- camel_object_unref (mstream);
- }
-
- desc = camel_mime_part_get_description (attachment->body);
- if (!desc || *desc == '\0')
- desc = camel_mime_part_get_filename (attachment->body);
-
- if (!desc)
- desc = _("attachment");
-
- if (attachment->size
- && (size_string = size_to_string (attachment->size))) {
- label = g_strdup_printf ("%s (%s)", desc, size_string);
- g_free (size_string);
- } else
- label = g_strdup (desc);
-
- if (image) {
- gnome_icon_list_append_pixbuf (icon_list, attachment->pixbuf_cache, NULL, label);
- } else {
- char *mime_type;
-
- mime_type = camel_content_type_simple (content_type);
- pixbuf = e_icon_for_mime_type (mime_type, 48);
- g_free (mime_type);
- gnome_icon_list_append_pixbuf (icon_list, pixbuf, NULL, label);
- if (pixbuf)
- g_object_unref (pixbuf);
- }
-
- g_free (label);
- }
-
- gnome_icon_list_thaw (icon_list);
-}
-
-static void
-remove_selected (EMsgComposerAttachmentBar *bar)
-{
- GnomeIconList *icon_list;
- EMsgComposerAttachment *attachment;
- GList *attachment_list, *p;
- int num;
-
- icon_list = GNOME_ICON_LIST (bar);
-
- /* Weee! I am especially proud of this piece of cheesy code: it is
- truly awful. But unless one attaches a huge number of files, it
- will not be as greedy as intended. FIXME of course. */
-
- attachment_list = NULL;
- p = gnome_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_data (bar->priv->attachments, num));
-
- /* We need to check if there are duplicated index in the return list of
- gnome_icon_list_get_selection() because of gnome bugzilla bug #122356.
- FIXME in the future. */
-
- if (g_list_find (attachment_list, attachment) == NULL) {
- attachment_list = g_list_prepend (attachment_list, attachment);
- }
- }
-
- for (p = attachment_list; p != NULL; p = p->next)
- remove_attachment (bar, E_MSG_COMPOSER_ATTACHMENT (p->data));
-
- g_list_free (attachment_list);
-
- update (bar);
-}
-
-static void
-edit_selected (EMsgComposerAttachmentBar *bar)
-{
- GnomeIconList *icon_list;
- EMsgComposerAttachment *attachment;
- GList *selection;
- int num;
-
- icon_list = GNOME_ICON_LIST (bar);
-
- selection = gnome_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;
- GPtrArray *file_list;
- gboolean is_inline = FALSE;
- int i;
-
- composer = E_MSG_COMPOSER (gtk_widget_get_toplevel (GTK_WIDGET (bar)));
-
- file_list = e_msg_composer_select_file_attachments (composer, &is_inline);
- if (!file_list)
- return;
-
- for (i = 0; i < file_list->len; i++) {
- add_from_file (bar, file_list->pdata[i], is_inline ? "inline" : "attachment");
- g_free (file_list->pdata[i]);
- }
-
- g_ptr_array_free (file_list, TRUE);
-}
-
-
-/* Callbacks. */
-
-static void
-add_cb (GtkWidget *widget, gpointer data, GtkWidget *for_widget)
-{
- 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, GtkWidget *for_widget)
-{
- 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, GtkWidget *for_widget)
-{
- 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, NULL);
-}
-
-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, NULL);
-}
-
-
-/* GtkObject methods. */
-
-static void
-destroy (GtkObject *object)
-{
- EMsgComposerAttachmentBar *bar;
-
- bar = E_MSG_COMPOSER_ATTACHMENT_BAR (object);
-
- if (bar->priv) {
- free_attachment_list (bar);
- g_free (bar->priv);
- bar->priv = NULL;
- }
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy != NULL)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-/* GtkWidget methods. */
-
-
-static void
-popup_menu_placement_callback (GtkMenu *menu, int *x, int *y, gboolean *push_in, gpointer user_data)
-{
- EMsgComposerAttachmentBar *bar;
- GnomeIconList *icon_list;
- GList *selection;
- GnomeCanvasPixbuf *image;
-
- bar = E_MSG_COMPOSER_ATTACHMENT_BAR (user_data);
- icon_list = GNOME_ICON_LIST (user_data);
-
- gdk_window_get_origin (((GtkWidget*) bar)->window, x, y);
-
- selection = gnome_icon_list_get_selection (icon_list);
- if (selection == NULL)
- return;
-
- image = gnome_icon_list_get_icon_pixbuf_item (icon_list, (gint)selection->data);
- if (image == NULL)
- return;
-
- /* Put menu to the center of icon. */
- *x += (int)(image->item.x1 + image->item.x2) / 2;
- *y += (int)(image->item.y1 + image->item.y2) / 2;
-}
-
-static gboolean
-popup_menu_event (GtkWidget *widget)
-{
- EMsgComposerAttachmentBar *bar = E_MSG_COMPOSER_ATTACHMENT_BAR (widget);
- GnomeIconList *icon_list = GNOME_ICON_LIST (widget);
- GList *selection = gnome_icon_list_get_selection (icon_list);
- GtkWidget *menu;
-
- if (selection == NULL)
- menu = get_context_menu (bar);
- else
- menu = get_icon_context_menu (bar);
-
- gnome_popup_menu_do_popup (menu, popup_menu_placement_callback,
- widget, NULL, widget, NULL);
-
- return TRUE;
-}
-
-
-static int
-button_press_event (GtkWidget *widget,
- GdkEventButton *event)
-{
- EMsgComposerAttachmentBar *bar;
- GnomeIconList *icon_list;
- int icon_number;
-
- bar = E_MSG_COMPOSER_ATTACHMENT_BAR (widget);
- icon_list = GNOME_ICON_LIST (widget);
-
- if (event->button != 3)
- return GTK_WIDGET_CLASS (parent_class)->button_press_event (widget, event);
-
- icon_number = gnome_icon_list_get_icon_at (icon_list, event->x, event->y);
-
- if (icon_number >= 0) {
- gnome_icon_list_select_icon (icon_list, icon_number);
- popup_icon_context_menu (bar, icon_number, event);
- } else {
- popup_context_menu (bar, event);
- }
-
- return TRUE;
-}
-
-
-/* Initialization. */
-
-static void
-class_init (EMsgComposerAttachmentBarClass *klass)
-{
- GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
- GnomeIconListClass *icon_list_class;
-
- object_class = GTK_OBJECT_CLASS (klass);
- widget_class = GTK_WIDGET_CLASS (klass);
- icon_list_class = GNOME_ICON_LIST_CLASS (klass);
-
- parent_class = g_type_class_ref (gnome_icon_list_get_type ());
-
- object_class->destroy = destroy;
-
- widget_class->button_press_event = button_press_event;
- widget_class->popup_menu = popup_menu_event;
-
-
- /* Setup signals. */
-
- signals[CHANGED] =
- g_signal_new ("changed",
- E_TYPE_MSG_COMPOSER_ATTACHMENT_BAR,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EMsgComposerAttachmentBarClass, changed),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-}
-
-static void
-init (EMsgComposerAttachmentBar *bar)
-{
- EMsgComposerAttachmentBarPrivate *priv;
-
- priv = g_new (EMsgComposerAttachmentBarPrivate, 1);
-
- priv->attachments = NULL;
- priv->context_menu = NULL;
- priv->icon_context_menu = NULL;
-
- priv->num_attachments = 0;
-
- bar->priv = priv;
-}
-
-
-GType
-e_msg_composer_attachment_bar_get_type (void)
-{
- static GType type = 0;
-
- if (type == 0) {
- static const GTypeInfo info = {
- sizeof (EMsgComposerAttachmentBarClass),
- NULL, NULL,
- (GClassInitFunc) class_init,
- NULL, NULL,
- sizeof (EMsgComposerAttachmentBar),
- 0,
- (GInstanceInitFunc) init,
- };
-
- type = g_type_register_static (GNOME_TYPE_ICON_LIST, "EMsgComposerAttachmentBar", &info, 0);
- }
-
- return type;
-}
-
-GtkWidget *
-e_msg_composer_attachment_bar_new (GtkAdjustment *adj)
-{
- EMsgComposerAttachmentBar *new;
- GnomeIconList *icon_list;
- int width, height, icon_width, window_height;
- PangoFontMetrics *metrics;
- PangoContext *context;
-
- new = g_object_new (e_msg_composer_attachment_bar_get_type (), NULL);
-
- icon_list = GNOME_ICON_LIST (new);
-
- context = gtk_widget_get_pango_context ((GtkWidget *) new);
- metrics = pango_context_get_metrics (context, ((GtkWidget *) new)->style->font_desc, pango_context_get_language (context));
- width = PANGO_PIXELS (pango_font_metrics_get_approximate_char_width (metrics)) * 15;
- /* This should be *2, but the icon list creates too much space above ... */
- height = PANGO_PIXELS (pango_font_metrics_get_ascent (metrics) + pango_font_metrics_get_descent (metrics)) * 3;
- pango_font_metrics_unref (metrics);
-
- icon_width = ICON_WIDTH + ICON_SPACING + ICON_BORDER + ICON_TEXT_SPACING;
- icon_width = MAX (icon_width, width);
-
- gnome_icon_list_construct (icon_list, icon_width, adj, 0);
-
- window_height = ICON_WIDTH + ICON_SPACING + ICON_BORDER + ICON_TEXT_SPACING + height;
- gtk_widget_set_size_request (GTK_WIDGET (new), icon_width * 4, window_height);
-
- gnome_icon_list_set_separators (icon_list, ICON_SEPARATORS);
- gnome_icon_list_set_row_spacing (icon_list, ICON_ROW_SPACING);
- gnome_icon_list_set_col_spacing (icon_list, ICON_COL_SPACING);
- gnome_icon_list_set_icon_border (icon_list, ICON_BORDER);
- gnome_icon_list_set_text_spacing (icon_list, ICON_TEXT_SPACING);
- gnome_icon_list_set_selection_mode (icon_list, GTK_SELECTION_MULTIPLE);
-
- return GTK_WIDGET (new);
-}
-
-static const char *
-get_default_charset (void)
-{
- GConfClient *gconf;
- const char *charset;
- char *buf;
-
- gconf = gconf_client_get_default ();
- buf = gconf_client_get_string (gconf, "/apps/evolution/mail/composer/charset", NULL);
- if (buf && buf[0] == '\0') {
- g_free (buf);
- buf = NULL;
- }
-
- g_object_unref (gconf);
-
- if (buf != NULL) {
- charset = e_iconv_charset_name (buf);
- g_free (buf);
- } else
- charset = e_iconv_locale_charset ();
-
- return charset;
-}
-
-static void
-attach_to_multipart (CamelMultipart *multipart,
- EMsgComposerAttachment *attachment,
- const char *default_charset)
-{
- CamelContentType *content_type;
- CamelDataWrapper *content;
-
- content_type = camel_mime_part_get_content_type (attachment->body);
- content = camel_medium_get_content_object (CAMEL_MEDIUM (attachment->body));
-
- if (!CAMEL_IS_MULTIPART (content)) {
- if (camel_content_type_is (content_type, "text", "*")) {
- CamelTransferEncoding encoding;
- CamelStreamFilter *filter_stream;
- CamelMimeFilterBestenc *bestenc;
- CamelStream *stream;
- const char *charset;
- char *type;
-
- charset = camel_content_type_param (content_type, "charset");
-
- stream = camel_stream_null_new ();
- filter_stream = camel_stream_filter_new_with_stream (stream);
- bestenc = camel_mime_filter_bestenc_new (CAMEL_BESTENC_GET_ENCODING);
- camel_stream_filter_add (filter_stream, CAMEL_MIME_FILTER (bestenc));
- camel_object_unref (stream);
-
- camel_data_wrapper_decode_to_stream (content, CAMEL_STREAM (filter_stream));
- camel_object_unref (filter_stream);
-
- encoding = camel_mime_filter_bestenc_get_best_encoding (bestenc, CAMEL_BESTENC_8BIT);
- camel_mime_part_set_encoding (attachment->body, encoding);
-
- if (encoding == CAMEL_TRANSFER_ENCODING_7BIT) {
- /* the text fits within us-ascii so this is safe */
- /* FIXME: check that this isn't iso-2022-jp? */
- default_charset = "us-ascii";
- } else if (!charset) {
- if (!default_charset)
- default_charset = get_default_charset ();
-
- /* FIXME: We should really check that this fits within the
- default_charset and if not find one that does and/or
- allow the user to specify? */
- }
-
- if (!charset) {
- /* looks kinda nasty, but this is how ya have to do it */
- camel_content_type_set_param (content_type, "charset", default_charset);
- type = camel_content_type_format (content_type);
- camel_mime_part_set_content_type (attachment->body, type);
- g_free (type);
- }
-
- camel_object_unref (bestenc);
- } else if (!CAMEL_IS_MIME_MESSAGE (content)) {
- camel_mime_part_set_encoding (attachment->body, CAMEL_TRANSFER_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 (E_IS_MSG_COMPOSER_ATTACHMENT_BAR (bar));
- 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 a43b466633..0000000000
--- a/composer/e-msg-composer-attachment-bar.h
+++ /dev/null
@@ -1,77 +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 version 2 of the GNU General Public
- * published by the Free Software Foundation; either version 2 of the
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <libgnomeui/gnome-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) \
- (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_MSG_COMPOSER_ATTACHMENT_BAR, EMsgComposerAttachmentBar))
-#define E_MSG_COMPOSER_ATTACHMENT_BAR_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_MSG_COMPOSER_ATTACHMENT_BAR, EMsgComposerAttachmentBarClass))
-#define E_IS_MSG_COMPOSER_ATTACHMENT_BAR(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_MSG_COMPOSER_ATTACHMENT_BAR))
-#define E_IS_MSG_COMPOSER_ATTACHMENT_BAR_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_MSG_COMPOSER_ATTACHMENT_BAR))
-
-typedef struct _EMsgComposerAttachmentBar EMsgComposerAttachmentBar;
-typedef struct _EMsgComposerAttachmentBarClass EMsgComposerAttachmentBarClass;
-typedef struct _EMsgComposerAttachmentBarPrivate EMsgComposerAttachmentBarPrivate;
-
-struct _EMsgComposerAttachmentBar {
- GnomeIconList parent;
-
- EMsgComposerAttachmentBarPrivate *priv;
-};
-
-struct _EMsgComposerAttachmentBarClass {
- GnomeIconListClass parent_class;
-
- void (* changed) (EMsgComposerAttachmentBar *bar);
-};
-
-
-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 char *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 2e8a0c61c5..0000000000
--- a/composer/e-msg-composer-attachment.c
+++ /dev/null
@@ -1,457 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/*
- * Authors: Ettore Perazzoli <ettore@ximian.com>
- * Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 1999-2002 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 is the object representing an email attachment. It is implemented as a
- GObject 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 <string.h>
-#include <errno.h>
-
-#include <camel/camel.h>
-#include <gtk/gtknotebook.h>
-#include <gtk/gtktogglebutton.h>
-#include <libgnomevfs/gnome-vfs-mime.h>
-
-#include "e-util/e-mktemp.h"
-
-#include "e-msg-composer.h"
-#include "e-msg-composer-attachment.h"
-
-
-enum {
- CHANGED,
- LAST_SIGNAL
-};
-static guint signals[LAST_SIGNAL] = { 0 };
-
-static GObjectClass *parent_class = NULL;
-
-
-static void
-changed (EMsgComposerAttachment *attachment)
-{
- g_signal_emit (attachment, signals[CHANGED], 0);
-}
-
-
-/* GtkObject methods. */
-
-static void
-finalise(GObject *object)
-{
- EMsgComposerAttachment *attachment;
-
- attachment = E_MSG_COMPOSER_ATTACHMENT (object);
-
- camel_object_unref (attachment->body);
- if (attachment->pixbuf_cache != NULL)
- g_object_unref (attachment->pixbuf_cache);
-
- G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-
-/* Signals. */
-
-static void
-real_changed (EMsgComposerAttachment *msg_composer_attachment)
-{
- g_return_if_fail (E_IS_MSG_COMPOSER_ATTACHMENT (msg_composer_attachment));
-}
-
-
-static void
-class_init (EMsgComposerAttachmentClass *klass)
-{
- GObjectClass *object_class;
-
- object_class = (GObjectClass*) klass;
- parent_class = g_type_class_ref (G_TYPE_OBJECT);
-
- object_class->finalize = finalise;
- klass->changed = real_changed;
-
- signals[CHANGED] = g_signal_new ("changed",
- E_TYPE_MSG_COMPOSER_ATTACHMENT,
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (EMsgComposerAttachmentClass, changed),
- NULL,
- NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-}
-
-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;
-}
-
-GType
-e_msg_composer_attachment_get_type (void)
-{
- static GType type = 0;
-
- if (type == 0) {
- static const GTypeInfo info = {
- sizeof (EMsgComposerAttachmentClass),
- NULL,
- NULL,
- (GClassInitFunc) class_init,
- NULL,
- NULL,
- sizeof (EMsgComposerAttachment),
- 0,
- (GInstanceInitFunc) init,
- };
-
- type = g_type_register_static (G_TYPE_OBJECT, "EMsgComposerAttachment", &info, 0);
- }
-
- return type;
-}
-
-
-/**
- * e_msg_composer_attachment_new:
- * @file_name: filename to attach
- * @disposition: Content-Disposition of the attachment
- * @ex: exception
- *
- * Return value: the new attachment, or %NULL on error
- **/
-EMsgComposerAttachment *
-e_msg_composer_attachment_new (const char *file_name,
- const char *disposition,
- CamelException *ex)
-{
- EMsgComposerAttachment *new;
- CamelMimePart *part;
- CamelDataWrapper *wrapper;
- CamelStream *stream;
- struct stat statbuf;
- char *mime_type;
- char *filename;
-
- g_return_val_if_fail (file_name != NULL, NULL);
-
- if (stat (file_name, &statbuf) < 0) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot attach file %s: %s"),
- file_name, g_strerror (errno));
- return NULL;
- }
-
- /* return if it's not a regular file */
- if (!S_ISREG (statbuf.st_mode)) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot attach file %s: not a regular file"),
- file_name);
- return NULL;
- }
-
- stream = camel_stream_fs_new_with_name (file_name, O_RDONLY, 0);
- if (!stream) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot attach file %s: %s"),
- file_name, g_strerror (errno));
- return NULL;
- }
-
- mime_type = e_msg_composer_guess_mime_type (file_name);
- if (mime_type) {
- if (!strcasecmp (mime_type, "message/rfc822")) {
- wrapper = (CamelDataWrapper *) camel_mime_message_new ();
- } else {
- wrapper = camel_data_wrapper_new ();
- }
-
- camel_data_wrapper_construct_from_stream (wrapper, stream);
- camel_data_wrapper_set_mime_type (wrapper, mime_type);
- g_free (mime_type);
- } else {
- wrapper = camel_data_wrapper_new ();
- camel_data_wrapper_construct_from_stream (wrapper, stream);
- camel_data_wrapper_set_mime_type (wrapper, "application/octet-stream");
- }
-
- camel_object_unref (stream);
-
- part = camel_mime_part_new ();
- camel_medium_set_content_object (CAMEL_MEDIUM (part), wrapper);
- camel_object_unref (wrapper);
-
- camel_mime_part_set_disposition (part, disposition);
- filename = g_path_get_basename (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
- workaround, don't set a Content-Id on these parts. Fixes
- bug #10032 */
- /* set the Content-Id */
- content_id = camel_header_msgid_generate ();
- camel_mime_part_set_content_id (part, content_id);
- g_free (content_id);
-#endif
-
- new = g_object_new (E_TYPE_MSG_COMPOSER_ATTACHMENT, NULL);
- new->editor_gui = NULL;
- new->body = 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;
- CamelMimePart *mime_part;
- CamelStream *stream;
-
- g_return_val_if_fail (CAMEL_IS_MIME_PART (part), NULL);
-
- stream = camel_stream_mem_new ();
- if (camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (part), stream) == -1) {
- camel_object_unref (stream);
- return NULL;
- }
-
- camel_stream_reset (stream);
- mime_part = camel_mime_part_new ();
-
- if (camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (mime_part), stream) == -1) {
- camel_object_unref (mime_part);
- camel_object_unref (stream);
- return NULL;
- }
-
- camel_object_unref (stream);
-
- new = g_object_new (E_TYPE_MSG_COMPOSER_ATTACHMENT, NULL);
- new->editor_gui = NULL;
- new->body = mime_part;
- new->guessed_type = FALSE;
- new->size = 0;
-
- return new;
-}
-
-
-/* The attachment property dialog. */
-
-typedef struct {
- GtkWidget *dialog;
- GtkEntry *file_name_entry;
- GtkEntry *description_entry;
- GtkEntry *mime_type_entry;
- GtkToggleButton *disposition_checkbox;
- EMsgComposerAttachment *attachment;
-} 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
-set_entry (GladeXML *xml, const char *widget_name, const char *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
- gtk_entry_set_text (entry, value ? value : "");
-}
-
-static void
-connect_widget (GladeXML *gui, const char *name, const char *signal_name,
- GCallback func, gpointer data)
-{
- GtkWidget *widget;
-
- widget = glade_xml_get_widget (gui, name);
- g_signal_connect (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 (dialog_data->dialog);
- g_object_unref (attachment->editor_gui);
- attachment->editor_gui = NULL;
-
- g_object_unref (attachment);
-
- destroy_dialog_data (dialog_data);
-}
-
-static void
-ok_cb (GtkWidget *widget, gpointer data)
-{
- DialogData *dialog_data;
- EMsgComposerAttachment *attachment;
- const char *str;
-
- dialog_data = (DialogData *) data;
- attachment = dialog_data->attachment;
-
- str = gtk_entry_get_text (dialog_data->file_name_entry);
- camel_mime_part_set_filename (attachment->body, str);
-
- str = gtk_entry_get_text (dialog_data->description_entry);
- camel_mime_part_set_description (attachment->body, str);
-
- str = 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);
-
- 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
-response_cb (GtkWidget *widget, gint response, gpointer data)
-{
- if (response == GTK_RESPONSE_OK)
- ok_cb (widget, data);
- else
- close_cb (widget, data);
-}
-
-void
-e_msg_composer_attachment_edit (EMsgComposerAttachment *attachment, GtkWidget *parent)
-{
- CamelContentType *content_type;
- const char *disposition;
- DialogData *dialog_data;
- GladeXML *editor_gui;
- char *type;
-
- 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 (EVOLUTION_GLADEDIR "/e-msg-composer-attachment.glade",
- NULL, 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);
- g_object_ref (attachment);
- 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"));
-
- 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 = camel_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_ascii_strcasecmp (disposition, "inline"));
-
- connect_widget (editor_gui, "dialog", "response", (GCallback)response_cb, dialog_data);
-#warning "signal connect while alive"
- /* make sure that when the composer gets hidden/closed that our windows also close */
- parent = gtk_widget_get_toplevel (parent);
- gtk_signal_connect_while_alive (GTK_OBJECT (parent), "destroy", (GCallback)close_cb, dialog_data,
- GTK_OBJECT (dialog_data->dialog));
- gtk_signal_connect_while_alive (GTK_OBJECT (parent), "hide", (GCallback)close_cb, dialog_data,
- GTK_OBJECT (dialog_data->dialog));
-}
diff --git a/composer/e-msg-composer-attachment.glade b/composer/e-msg-composer-attachment.glade
deleted file mode 100644
index dc228eef70..0000000000
--- a/composer/e-msg-composer-attachment.glade
+++ /dev/null
@@ -1,237 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-
-<widget class="GtkDialog" id="dialog">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="title" translatable="yes">Attachment Properties</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="has_separator">True</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="close_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">-6</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="ok_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">-5</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTable" id="table1">
- <property name="visible">True</property>
- <property name="n_rows">4</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkEntry" id="description_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="mime_type_entry">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="editable">False</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="mime_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">MIME type:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="description_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Description:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="filename_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">File name:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="file_name_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="disposition_checkbox">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Suggest automatic display of attachment</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/composer/e-msg-composer-attachment.h b/composer/e-msg-composer-attachment.h
deleted file mode 100644
index caef6ebc58..0000000000
--- a/composer/e-msg-composer-attachment.h
+++ /dev/null
@@ -1,77 +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 version 2 of the GNU General Public
- * published by the Free Software Foundation; either version 2 of the
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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>
-#include <camel/camel-exception.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) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_MSG_COMPOSER_ATTACHMENT, EMsgComposerAttachment))
-#define E_MSG_COMPOSER_ATTACHMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_MSG_COMPOSER_ATTACHMENT, EMsgComposerAttachmentClass))
-#define E_IS_MSG_COMPOSER_ATTACHMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_MSG_COMPOSER_ATTACHMENT))
-#define E_IS_MSG_COMPOSER_ATTACHMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_MSG_COMPOSER_ATTACHMENT))
-
-
-typedef struct _EMsgComposerAttachment EMsgComposerAttachment;
-typedef struct _EMsgComposerAttachmentClass EMsgComposerAttachmentClass;
-
-struct _EMsgComposerAttachment {
- GObject parent;
-
- GladeXML *editor_gui;
-
- CamelMimePart *body;
- gboolean guessed_type;
- gulong size;
-
- GdkPixbuf *pixbuf_cache;
-};
-
-struct _EMsgComposerAttachmentClass {
- GObjectClass parent_class;
-
- void (*changed) (EMsgComposerAttachment *msg_composer_attachment);
-};
-
-
-GType e_msg_composer_attachment_get_type (void);
-EMsgComposerAttachment *e_msg_composer_attachment_new (const char *file_name,
- const char *disposition,
- CamelException *ex);
-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 4e222b0bfd..0000000000
--- a/composer/e-msg-composer-hdrs.c
+++ /dev/null
@@ -1,1342 +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 version 2 of the GNU General Public
- * published by the Free Software Foundation; either version 2 of the
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <string.h>
-
-#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 "Composer.h"
-
-#include <gtk/gtkmenuitem.h>
-#include <gtk/gtkoptionmenu.h>
-#include <gtk/gtktooltips.h>
-
-#include <gconf/gconf.h>
-#include <gconf/gconf-client.h>
-
-#include <gal/e-text/e-entry.h>
-
-#include <camel/camel.h>
-#include "e-msg-composer-hdrs.h"
-#include "mail/mail-config.h"
-#include "mail/em-folder-selection-button.h"
-
-
-
-/* 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_POSTTO 5
-#define LINE_SUBJECT 6
-
-
-typedef struct {
- GtkWidget *label;
- GtkWidget *entry;
-} EMsgComposerHdrPair;
-
-struct _EMsgComposerHdrsPrivate {
- GNOME_Evolution_Addressbook_SelectNames corba_select_names;
-
- /* ui component */
- BonoboUIComponent *uic;
-
- /* The tooltips. */
- GtkTooltips *tooltips;
-
- EAccountList *accounts;
- GSList *from_options;
-
- /* Standard headers. */
- EMsgComposerHdrPair from, reply_to, to, cc, bcc, post_to, subject;
-};
-
-
-static GtkTableClass *parent_class = NULL;
-
-enum {
- SHOW_ADDRESS_DIALOG,
- SUBJECT_CHANGED,
- HDRS_CHANGED,
- FROM_CHANGED,
- LAST_SIGNAL
-};
-
-static int 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 = bonobo_activation_activate_from_id (SELECT_NAMES_OAFIID, 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) {
- 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)
- g_object_unref (emchas->hdrs);
- g_free (emchas->string);
- g_free (emchas);
-}
-
-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)
- g_object_ref (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);
- const char *reply_to;
-
- hdrs->account = g_object_get_data ((GObject *) item, "account");
-
- /* we do this rather than calling e_msg_composer_hdrs_set_reply_to()
- because we don't want to change the visibility of the header */
- reply_to = hdrs->account->id->reply_to;
- gtk_entry_set_text (GTK_ENTRY (hdrs->priv->reply_to.entry), reply_to ? reply_to : "");
-
- g_signal_emit (hdrs, signals [FROM_CHANGED], 0);
-}
-
-static void
-account_added_cb (EAccountList *accounts, EAccount *account, EMsgComposerHdrs *hdrs)
-{
- GtkWidget *item, *menu, *omenu, *toplevel;
- char *label;
-
- omenu = e_msg_composer_hdrs_get_from_omenu (hdrs);
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (omenu));
-
- label = g_strdup_printf ("%s <%s>", account->id->name, account->id->address);
- item = gtk_menu_item_new_with_label (label);
- gtk_widget_show (item);
- g_free (label);
-
- g_object_ref (account);
- g_object_set_data ((GObject *) item, "account", account);
- g_signal_connect (item, "activate", G_CALLBACK (from_changed), hdrs);
-
- /* 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_shell_append (GTK_MENU_SHELL (menu), item);
-
- toplevel = gtk_widget_get_toplevel ((GtkWidget *) hdrs);
- gtk_widget_set_sensitive (toplevel, TRUE);
-}
-
-static void
-account_changed_cb (EAccountList *accounts, EAccount *account, EMsgComposerHdrs *hdrs)
-{
- GtkWidget *item, *label;
- EAccount *acnt;
- GSList *node;
- char *text;
-
- node = hdrs->priv->from_options;
- while (node != NULL) {
- item = node->data;
- acnt = g_object_get_data ((GObject *) item, "account");
- if (acnt == account) {
- text = g_strdup_printf ("%s <%s>", account->id->name, account->id->address);
- label = gtk_bin_get_child ((GtkBin *) item);
- gtk_label_set_text ((GtkLabel *) label, text);
- g_free (text);
- break;
- }
-
- node = node->next;
- }
-}
-
-static void
-account_removed_cb (EAccountList *accounts, EAccount *account, EMsgComposerHdrs *hdrs)
-{
- struct _EMsgComposerHdrsPrivate *priv = hdrs->priv;
- GtkWidget *item, *omenu, *toplevel, *dialog;
- EAccount *acnt;
- GSList *node;
-
- node = priv->from_options;
- while (node != NULL) {
- item = node->data;
- acnt = g_object_get_data ((GObject *) item, "account");
- if (acnt == account) {
- if (hdrs->account == account)
- hdrs->account = NULL;
-
- priv->from_options = g_slist_remove_link (priv->from_options, node);
- g_slist_free_1 (node);
- g_object_unref (account);
- gtk_widget_destroy (item);
- break;
- }
-
- node = node->next;
- }
-
- if (hdrs->account == NULL) {
- if (priv->from_options) {
- /* the previously selected account was removed,
- default the new selection to the first account in
- the menu list */
- omenu = e_msg_composer_hdrs_get_from_omenu (hdrs);
-
- item = priv->from_options->data;
- gtk_option_menu_set_history (GTK_OPTION_MENU (omenu), 0);
- g_signal_emit_by_name (item, "activate", hdrs);
- } else {
- toplevel = gtk_widget_get_toplevel ((GtkWidget *) hdrs);
- gtk_widget_set_sensitive (toplevel, FALSE);
-
- dialog = gtk_message_dialog_new ((GtkWindow *) toplevel, GTK_DIALOG_MODAL |
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_WARNING, GTK_BUTTONS_OK, "%s",
- _("You need to configure an account before you can compose mail."));
- }
- }
-}
-
-static GtkWidget *
-create_from_optionmenu (EMsgComposerHdrs *hdrs)
-{
- struct _EMsgComposerHdrsPrivate *priv = hdrs->priv;
- GtkWidget *hbox, *omenu, *menu, *item, *first = NULL;
- int i = 0, history = 0, m, matches;
- GPtrArray *addresses;
- GConfClient *gconf;
- EAccount *account;
- EIterator *iter;
- char *uid;
-
- omenu = gtk_option_menu_new ();
- menu = gtk_menu_new ();
-
- gconf = gconf_client_get_default ();
- uid = gconf_client_get_string (gconf, "/apps/evolution/mail/default_account", NULL);
- g_object_unref (gconf);
-
- /* Make list of account email addresses */
- addresses = g_ptr_array_new ();
- iter = e_list_get_iterator ((EList *) priv->accounts);
- while (e_iterator_is_valid (iter)) {
- account = (EAccount *) e_iterator_get (iter);
-
- if (account->id->address)
- g_ptr_array_add (addresses, account->id->address);
-
- e_iterator_next (iter);
- }
-
- e_iterator_reset (iter);
-
- while (e_iterator_is_valid (iter)) {
- char *label;
-
- account = (EAccount *) e_iterator_get (iter);
-
- /* this should never ever fail */
- if (!account || !account->name || !account->id) {
- g_assert_not_reached ();
- continue;
- }
-
- if (account->id->address && *account->id->address) {
- /* If the account has a unique email address, just
- * show that. Otherwise include the account name.
- */
- for (m = matches = 0; m < addresses->len; m++) {
- if (!strcmp (account->id->address, addresses->pdata[m]))
- matches++;
- }
-
- if (matches > 1)
- 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);
-
- item = gtk_menu_item_new_with_label (label);
- g_free (label);
-
- g_object_ref (account);
- g_object_set_data ((GObject *) item, "account", account);
- g_signal_connect (item, "activate", G_CALLBACK (from_changed), hdrs);
-
- if (uid && !strcmp (account->uid, uid)) {
- 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_shell_append (GTK_MENU_SHELL (menu), item);
- gtk_widget_show (item);
- i++;
- }
-
- e_iterator_next (iter);
- }
-
- g_free (uid);
- g_object_unref (iter);
-
- g_ptr_array_free (addresses, TRUE);
-
- gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu);
-
- if (first) {
- gtk_option_menu_set_history (GTK_OPTION_MENU (omenu), history);
- g_signal_emit_by_name (first, "activate", hdrs);
- }
-
- hbox = gtk_hbox_new (FALSE, 6);
- gtk_box_pack_start_defaults (GTK_BOX (hbox), omenu);
- gtk_widget_show (omenu);
- gtk_widget_show (hbox);
-
- g_object_set_data ((GObject *) hbox, "from_menu", omenu);
-
- /* listen for changes to the account list so we can auto-update the from menu */
- g_signal_connect (priv->accounts, "account-added", G_CALLBACK (account_added_cb), hdrs);
- g_signal_connect (priv->accounts, "account-changed", G_CALLBACK (account_changed_cb), hdrs);
- g_signal_connect (priv->accounts, "account-removed", G_CALLBACK (account_removed_cb), hdrs);
-
- return hbox;
-}
-
-static void
-addressbook_entry_changed (BonoboListener *listener,
- const char *event_name,
- const CORBA_any *arg,
- CORBA_Environment *ev,
- gpointer user_data)
-{
- EMsgComposerHdrs *hdrs = E_MSG_COMPOSER_HDRS (user_data);
-
- g_signal_emit (hdrs, signals[HDRS_CHANGED], 0);
-}
-
-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, bonobo_ui_component_get_container (priv->uic));
-
- cf = bonobo_widget_get_control_frame (BONOBO_WIDGET (control_widget));
- pb = bonobo_control_frame_get_control_property_bag (cf, NULL);
-
- bonobo_control_frame_set_autoactivate (cf, TRUE);
-
- 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 char *name, const char *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);
- g_signal_connect_data (ret.label, "clicked",
- G_CALLBACK (address_button_clicked_cb),
- e_msg_composer_hdrs_and_string_create (hdrs, name),
- (GClosureNotify) e_msg_composer_hdrs_and_string_free,
- 0);
-
- 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)
-{
- const char *subject;
-
- subject = e_msg_composer_hdrs_get_subject (hdrs);
- g_signal_emit (hdrs, signals[SUBJECT_CHANGED], 0, subject);
- g_signal_emit (hdrs, signals[HDRS_CHANGED], 0);
-}
-
-static void
-create_headers (EMsgComposerHdrs *hdrs)
-{
- EMsgComposerHdrsPrivate *priv = hdrs->priv;
-
- /*
- * Reply-To:
- *
- * Create this before we call create_from_optionmenu,
- * because that causes from_changed to be called, which
- * expects the reply_to fields to be initialized.
- */
- priv->reply_to.label = gtk_label_new (_("Reply-To:"));
- priv->reply_to.entry = gtk_entry_new ();
-
- /*
- * From
- */
- priv->from.label = gtk_label_new (_("From:"));
- priv->from.entry = create_from_optionmenu (hdrs);
-
- /*
- * Subject
- */
- priv->subject.label = gtk_label_new (_("Subject:"));
- priv->subject.entry = gtk_entry_new ();
- g_signal_connect (priv->subject.entry, "changed",
- G_CALLBACK (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."));
-
- /*
- * Post-To
- */
- priv->post_to.label = gtk_label_new (_("Post To:"));
- priv->post_to.entry = em_folder_selection_button_new (_("Posting destination"), _("Choose a folder to post the message to."));
-}
-
-static void
-attach_couple (EMsgComposerHdrs *hdrs, EMsgComposerHdrPair *pair, int line)
-{
- gtk_table_attach (GTK_TABLE (hdrs),
- pair->label, 0, 1,
- line, line + 1,
- GTK_FILL, GTK_FILL, 3, 3);
-
- gtk_table_attach (GTK_TABLE (hdrs),
- pair->entry, 1, 2,
- line, line + 1,
- GTK_FILL | GTK_EXPAND, 0, 3, 3);
-}
-
-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->post_to, LINE_POSTTO);
- attach_couple (hdrs, &p->subject, LINE_SUBJECT);
-}
-
-static void
-set_pair_visibility (EMsgComposerHdrs *h, EMsgComposerHdrPair *pair, int visible)
-{
- if (visible & h->visible_mask) {
- 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, int visible_flags)
-{
- EMsgComposerHdrsPrivate *p = h->priv;
-
- /* To is always visible if we're not doing Post-To */
- if (!(h->visible_mask & E_MSG_COMPOSER_VISIBLE_POSTTO))
- visible_flags |= E_MSG_COMPOSER_VISIBLE_TO;
- else
- visible_flags |= E_MSG_COMPOSER_VISIBLE_POSTTO;
-
- 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->to, visible_flags & E_MSG_COMPOSER_VISIBLE_TO);
- 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->post_to, visible_flags & E_MSG_COMPOSER_VISIBLE_POSTTO);
- set_pair_visibility (h, &p->subject, visible_flags & E_MSG_COMPOSER_VISIBLE_SUBJECT);
-}
-
-static void
-headers_set_sensitivity (EMsgComposerHdrs *h)
-{
- bonobo_ui_component_set_prop (
- h->priv->uic, "/commands/ViewFrom", "sensitive",
- h->visible_mask & E_MSG_COMPOSER_VISIBLE_FROM ? "1" : "0", NULL);
-
- bonobo_ui_component_set_prop (
- h->priv->uic, "/commands/ViewReplyTo", "sensitive",
- h->visible_mask & E_MSG_COMPOSER_VISIBLE_REPLYTO ? "1" : "0", NULL);
-
- bonobo_ui_component_set_prop (
- h->priv->uic, "/commands/ViewCC", "sensitive",
- h->visible_mask & E_MSG_COMPOSER_VISIBLE_CC ? "1" : "0", NULL);
-
- bonobo_ui_component_set_prop (
- h->priv->uic, "/commands/ViewBCC", "sensitive",
- h->visible_mask & E_MSG_COMPOSER_VISIBLE_BCC ? "1" : "0", NULL);
-}
-
-void
-e_msg_composer_hdrs_set_visible_mask (EMsgComposerHdrs *hdrs, int visible_mask)
-{
- g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
-
- hdrs->visible_mask = visible_mask;
- headers_set_sensitivity (hdrs);
-}
-
-void
-e_msg_composer_hdrs_set_visible (EMsgComposerHdrs *hdrs, int visible_flags)
-{
- 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, int visible_flags)
-{
- create_headers (hdrs);
- attach_headers (hdrs);
-
- headers_set_sensitivity (hdrs);
- headers_set_visibility (hdrs, visible_flags);
-}
-
-
-/* GtkObject methods. */
-
-static void
-destroy (GtkObject *object)
-{
- EMsgComposerHdrs *hdrs;
- EMsgComposerHdrsPrivate *priv;
- GSList *l, *n;
-
- hdrs = E_MSG_COMPOSER_HDRS (object);
- priv = hdrs->priv;
-
- if (priv) {
- if (priv->corba_select_names != CORBA_OBJECT_NIL) {
- CORBA_Environment ev;
- CORBA_exception_init (&ev);
- bonobo_object_release_unref (priv->corba_select_names, &ev);
- CORBA_exception_free (&ev);
- priv->corba_select_names = CORBA_OBJECT_NIL;
- }
-
- if (priv->tooltips) {
- gtk_object_destroy (GTK_OBJECT (priv->tooltips));
- g_object_unref (priv->tooltips);
- priv->tooltips = NULL;
- }
-
- if (priv->accounts) {
- g_signal_handlers_disconnect_matched(priv->accounts, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, hdrs);
- g_object_unref (priv->accounts);
- priv->accounts = NULL;
- }
-
- l = priv->from_options;
- while (l) {
- EAccount *account;
- GtkWidget *item = l->data;
-
- account = g_object_get_data ((GObject *) item, "account");
- g_object_unref (account);
-
- n = l->next;
- g_slist_free_1 (l);
- l = n;
- }
-
- priv->from_options = NULL;
-
- g_free (priv);
- hdrs->priv = NULL;
- }
-
- 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 = g_type_class_ref (gtk_table_get_type ());
-
- signals[SHOW_ADDRESS_DIALOG] =
- g_signal_new ("show_address_dialog",
- E_TYPE_MSG_COMPOSER_HDRS,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET(EMsgComposerHdrsClass, show_address_dialog),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-
- signals[SUBJECT_CHANGED] =
- g_signal_new ("subject_changed",
- E_TYPE_MSG_COMPOSER_HDRS,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET(EMsgComposerHdrsClass, subject_changed),
- NULL, NULL,
- g_cclosure_marshal_VOID__STRING,
- G_TYPE_NONE,
- 1, G_TYPE_STRING);
-
- signals[HDRS_CHANGED] =
- g_signal_new ("hdrs_changed",
- E_TYPE_MSG_COMPOSER_HDRS,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET(EMsgComposerHdrsClass, hdrs_changed),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-
- signals[FROM_CHANGED] =
- g_signal_new ("from_changed",
- E_TYPE_MSG_COMPOSER_HDRS,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET(EMsgComposerHdrsClass, from_changed),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-}
-
-static void
-init (EMsgComposerHdrs *hdrs)
-{
- EMsgComposerHdrsPrivate *priv;
-
- priv = g_new0 (EMsgComposerHdrsPrivate, 1);
-
- priv->tooltips = gtk_tooltips_new ();
- g_object_ref (priv->tooltips);
- gtk_object_sink ((GtkObject *) priv->tooltips);
-
- priv->accounts = mail_config_get_accounts ();
- g_object_ref (priv->accounts);
-
- hdrs->priv = priv;
-}
-
-
-GType
-e_msg_composer_hdrs_get_type (void)
-{
- static GType type = 0;
-
- if (type == 0) {
- static const GTypeInfo info = {
- sizeof (EMsgComposerHdrsClass),
- NULL,
- NULL,
- (GClassInitFunc) class_init,
- NULL,
- NULL,
- sizeof (EMsgComposerHdrs),
- 0,
- (GInstanceInitFunc) init,
- };
-
- type = g_type_register_static (gtk_table_get_type (), "EMsgComposerHdrs", &info, 0);
- }
-
- return type;
-}
-
-GtkWidget *
-e_msg_composer_hdrs_new (BonoboUIComponent *uic, int visible_mask, int visible_flags)
-{
- EMsgComposerHdrs *new;
- EMsgComposerHdrsPrivate *priv;
-
- new = g_object_new (e_msg_composer_hdrs_get_type (), NULL);
- priv = new->priv;
- priv->uic = uic;
-
- g_object_ref (new);
- gtk_object_sink (GTK_OBJECT (new));
-
- if (!setup_corba (new)) {
- g_object_unref (new);
- return NULL;
- }
-
- new->visible_mask = visible_mask;
-
- setup_headers (new, visible_flags);
-
- return GTK_WIDGET (new);
-}
-
-static void
-set_recipients_from_destv (CamelMimeMessage *msg,
- EABDestination **to_destv,
- EABDestination **cc_destv,
- EABDestination **bcc_destv,
- gboolean redirect)
-{
- CamelInternetAddress *to_addr;
- CamelInternetAddress *cc_addr;
- CamelInternetAddress *bcc_addr;
- CamelInternetAddress *target;
- const char *text_addr, *header;
- gboolean seen_hidden_list = FALSE;
- int i;
-
- 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 = eab_destination_get_address (to_destv[i]);
-
- if (text_addr && *text_addr) {
- target = to_addr;
- if (eab_destination_is_evolution_list (to_destv[i])
- && !eab_destination_list_show_addresses (to_destv[i])) {
- target = bcc_addr;
- seen_hidden_list = TRUE;
- }
-
- camel_address_decode (CAMEL_ADDRESS (target), text_addr);
- }
- }
- }
-
- if (cc_destv) {
- for (i = 0; cc_destv[i] != NULL; ++i) {
- text_addr = eab_destination_get_address (cc_destv[i]);
- if (text_addr && *text_addr) {
- target = cc_addr;
- if (eab_destination_is_evolution_list (cc_destv[i])
- && !eab_destination_list_show_addresses (cc_destv[i])) {
- target = bcc_addr;
- seen_hidden_list = TRUE;
- }
-
- camel_address_decode (CAMEL_ADDRESS (target), text_addr);
- }
- }
- }
-
- if (bcc_destv) {
- for (i = 0; bcc_destv[i] != NULL; ++i) {
- text_addr = eab_destination_get_address (bcc_destv[i]);
- if (text_addr && *text_addr) {
- camel_address_decode (CAMEL_ADDRESS (bcc_addr), text_addr);
- }
- }
- }
-
- header = redirect ? CAMEL_RECIPIENT_TYPE_RESENT_TO : CAMEL_RECIPIENT_TYPE_TO;
- if (camel_address_length (CAMEL_ADDRESS (to_addr)) > 0) {
- camel_mime_message_set_recipients (msg, header, to_addr);
- } else if (seen_hidden_list) {
- camel_medium_set_header (CAMEL_MEDIUM (msg), header, "Undisclosed-Recipient:;");
- }
-
- header = redirect ? CAMEL_RECIPIENT_TYPE_RESENT_CC : CAMEL_RECIPIENT_TYPE_CC;
- if (camel_address_length (CAMEL_ADDRESS (cc_addr)) > 0) {
- camel_mime_message_set_recipients (msg, header, cc_addr);
- }
-
- header = redirect ? CAMEL_RECIPIENT_TYPE_RESENT_BCC : CAMEL_RECIPIENT_TYPE_BCC;
- if (camel_address_length (CAMEL_ADDRESS (bcc_addr)) > 0) {
- camel_mime_message_set_recipients (msg, header, bcc_addr);
- }
-
- camel_object_unref (to_addr);
- camel_object_unref (cc_addr);
- camel_object_unref (bcc_addr);
-}
-
-static void
-e_msg_composer_hdrs_to_message_internal (EMsgComposerHdrs *hdrs,
- CamelMimeMessage *msg,
- gboolean redirect)
-{
- EABDestination **to_destv, **cc_destv, **bcc_destv;
- CamelInternetAddress *addr;
- const char *subject;
- char *header;
-
- g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
- g_return_if_fail (CAMEL_IS_MIME_MESSAGE (msg));
-
- subject = e_msg_composer_hdrs_get_subject (hdrs);
- camel_mime_message_set_subject (msg, subject);
-
- addr = e_msg_composer_hdrs_get_from (hdrs);
- if (redirect) {
- header = camel_address_encode (CAMEL_ADDRESS (addr));
- camel_medium_set_header (CAMEL_MEDIUM (msg), "Resent-From", header);
- g_free (header);
- } else {
- camel_mime_message_set_from (msg, addr);
- }
- camel_object_unref (addr);
-
- addr = e_msg_composer_hdrs_get_reply_to (hdrs);
- if (addr) {
- camel_mime_message_set_reply_to (msg, addr);
- camel_object_unref (addr);
- }
-
- if (hdrs->visible_mask & E_MSG_COMPOSER_VISIBLE_MASK_RECIPIENTS) {
- 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, redirect);
-
- eab_destination_freev (to_destv);
- eab_destination_freev (cc_destv);
- eab_destination_freev (bcc_destv);
- }
-
- if (hdrs->visible_mask & E_MSG_COMPOSER_VISIBLE_POSTTO) {
- header = e_msg_composer_hdrs_get_post_to (hdrs);
- camel_medium_set_header (CAMEL_MEDIUM (msg), "X-Evolution-PostTo", header);
- g_free (header);
- }
-}
-
-
-void
-e_msg_composer_hdrs_to_message (EMsgComposerHdrs *hdrs,
- CamelMimeMessage *msg)
-{
- e_msg_composer_hdrs_to_message_internal (hdrs, msg, FALSE);
-}
-
-
-void
-e_msg_composer_hdrs_to_redirect (EMsgComposerHdrs *hdrs,
- CamelMimeMessage *msg)
-{
- e_msg_composer_hdrs_to_message_internal (hdrs, msg, TRUE);
-}
-
-
-/* FIXME: yea, this could be better... but it's doubtful it'll be used much */
-void
-e_msg_composer_hdrs_set_from_account (EMsgComposerHdrs *hdrs,
- const char *account_name)
-{
- GtkOptionMenu *omenu;
- GConfClient *gconf;
- GtkWidget *item;
- char *uid = NULL;
- GSList *l;
- int i = 0;
-
- g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
-
- omenu = GTK_OPTION_MENU (e_msg_composer_hdrs_get_from_omenu (hdrs));
-
- if (!account_name) {
- gconf = gconf_client_get_default ();
- uid = gconf_client_get_string (gconf, "/apps/evolution/mail/default_account", NULL);
- g_object_unref (gconf);
- }
-
- /* find the item that represents the account and activate it */
- l = hdrs->priv->from_options;
- while (l) {
- EAccount *account;
- item = l->data;
-
- account = g_object_get_data ((GObject *) item, "account");
- if (account_name) {
- if (account->name && !strcmp (account_name, account->name)) {
- /* set the correct optionlist item */
- gtk_option_menu_set_history (omenu, i);
- g_signal_emit_by_name (item, "activate", hdrs);
- g_free (uid);
-
- return;
- }
- } else if (uid && !strcmp (account->uid, uid)) {
- /* set the default optionlist item */
- gtk_option_menu_set_history (omenu, i);
- g_signal_emit_by_name (item, "activate", hdrs);
- g_free (uid);
-
- return;
- }
-
- l = l->next;
- i++;
- }
-
- g_free (uid);
-}
-
-void
-e_msg_composer_hdrs_set_reply_to (EMsgComposerHdrs *hdrs,
- const char *reply_to)
-{
- g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
-
- gtk_entry_set_text (GTK_ENTRY (hdrs->priv->reply_to.entry), reply_to ? reply_to : "");
-
- if (reply_to && *reply_to)
- set_pair_visibility (hdrs, &hdrs->priv->cc, TRUE);
-}
-
-void
-e_msg_composer_hdrs_set_to (EMsgComposerHdrs *hdrs,
- EABDestination **to_destv)
-{
- char *str;
-
- g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
-
- str = eab_destination_exportv (to_destv);
- bonobo_widget_set_property (BONOBO_WIDGET (hdrs->priv->to.entry), "destinations", TC_CORBA_string, str ? str : "", NULL);
- g_free (str);
-}
-
-void
-e_msg_composer_hdrs_set_cc (EMsgComposerHdrs *hdrs,
- EABDestination **cc_destv)
-{
- char *str;
-
- g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
-
- str = eab_destination_exportv (cc_destv);
- bonobo_widget_set_property (BONOBO_WIDGET (hdrs->priv->cc.entry), "destinations", TC_CORBA_string, str ? str :"", NULL);
- if (str && *str)
- set_pair_visibility (hdrs, &hdrs->priv->cc, TRUE);
- g_free (str);
-}
-
-void
-e_msg_composer_hdrs_set_bcc (EMsgComposerHdrs *hdrs,
- EABDestination **bcc_destv)
-{
- char *str;
-
- g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
-
- str = eab_destination_exportv (bcc_destv);
- bonobo_widget_set_property (BONOBO_WIDGET (hdrs->priv->bcc.entry), "destinations", TC_CORBA_string, str ? str : "", NULL);
- if (str && *str)
- set_pair_visibility (hdrs, &hdrs->priv->bcc, TRUE);
- g_free (str);
-}
-
-
-void
-e_msg_composer_hdrs_set_post_to (EMsgComposerHdrs *hdrs,
- const char *post_to)
-{
- g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
- g_return_if_fail (post_to != NULL);
-
- em_folder_selection_button_set_selection ((EMFolderSelectionButton *) hdrs->priv->post_to.entry, post_to);
-}
-
-
-void
-e_msg_composer_hdrs_set_subject (EMsgComposerHdrs *hdrs,
- const char *subject)
-{
- g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
- g_return_if_fail (subject != NULL);
-
- gtk_entry_set_text ((GtkEntry *) hdrs->priv->subject.entry, subject);
-}
-
-
-CamelInternetAddress *
-e_msg_composer_hdrs_get_from (EMsgComposerHdrs *hdrs)
-{
- CamelInternetAddress *addr;
- EAccount *account;
-
- g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
- if (!(account = hdrs->account)) {
- /* 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;
- const char *reply_to;
-
- g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
- reply_to = gtk_entry_get_text (GTK_ENTRY (hdrs->priv->reply_to.entry));
-
- if (!reply_to || *reply_to == '\0')
- return NULL;
-
- addr = camel_internet_address_new ();
- if (camel_address_unformat (CAMEL_ADDRESS (addr), reply_to) == -1) {
- camel_object_unref (CAMEL_OBJECT (addr));
- return NULL;
- }
-
- return addr;
-}
-
-EABDestination **
-e_msg_composer_hdrs_get_to (EMsgComposerHdrs *hdrs)
-{
- char *str = NULL;
- EABDestination **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", TC_CORBA_string, &str, NULL);
-
- if (str != NULL) {
- destv = eab_destination_importv (str);
- g_free (str);
- }
-
- return destv;
-}
-
-EABDestination **
-e_msg_composer_hdrs_get_cc (EMsgComposerHdrs *hdrs)
-{
- char *str = NULL;
- EABDestination **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", TC_CORBA_string, &str, NULL);
-
- if (str != NULL) {
- destv = eab_destination_importv (str);
- g_free (str);
- }
-
- return destv;
-}
-
-EABDestination **
-e_msg_composer_hdrs_get_bcc (EMsgComposerHdrs *hdrs)
-{
- char *str = NULL;
- EABDestination **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", TC_CORBA_string, &str, NULL);
-
- if (str != NULL) {
- destv = eab_destination_importv (str);
- g_free (str);
- }
-
- return destv;
-}
-
-EABDestination **
-e_msg_composer_hdrs_get_recipients (EMsgComposerHdrs *hdrs)
-{
- EABDestination **to_destv;
- EABDestination **cc_destv;
- EABDestination **bcc_destv;
- EABDestination **recip_destv;
- int 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 (EABDestination *, 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_post_to (EMsgComposerHdrs *hdrs)
-{
- const char *uri;
-
- g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
- uri = em_folder_selection_button_get_selection ((EMFolderSelectionButton *) hdrs->priv->post_to.entry);
-
- return g_strdup (uri);
-}
-
-
-const char *
-e_msg_composer_hdrs_get_subject (EMsgComposerHdrs *hdrs)
-{
- g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
- return gtk_entry_get_text ((GtkEntry *) hdrs->priv->subject.entry);
-}
-
-
-GtkWidget *
-e_msg_composer_hdrs_get_reply_to_entry (EMsgComposerHdrs *hdrs)
-{
- 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 (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 (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 (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
- return hdrs->priv->bcc.entry;
-}
-
-GtkWidget *
-e_msg_composer_hdrs_get_post_to_label (EMsgComposerHdrs *hdrs)
-{
- g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
- return hdrs->priv->post_to.entry;
-}
-
-GtkWidget *
-e_msg_composer_hdrs_get_subject_entry (EMsgComposerHdrs *hdrs)
-{
- g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
- return hdrs->priv->subject.entry;
-}
-
-GtkWidget *
-e_msg_composer_hdrs_get_from_hbox (EMsgComposerHdrs *hdrs)
-{
- g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
- return hdrs->priv->from.entry;
-}
-
-GtkWidget *
-e_msg_composer_hdrs_get_from_omenu (EMsgComposerHdrs *hdrs)
-{
- g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
- return GTK_WIDGET (g_object_get_data ((GObject *) hdrs->priv->from.entry, "from_menu"));
-}
diff --git a/composer/e-msg-composer-hdrs.h b/composer/e-msg-composer-hdrs.h
deleted file mode 100644
index f3bedb1c34..0000000000
--- a/composer/e-msg-composer-hdrs.h
+++ /dev/null
@@ -1,152 +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 version 2 of the GNU General Public
- * published by the Free Software Foundation; either version 2 of the
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <bonobo/bonobo-ui-component.h>
-
-#include <e-util/e-account.h>
-#include <camel/camel-mime-message.h>
-#include <addressbook/util/eab-destination.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) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_MSG_COMPOSER_HDRS, EMsgComposerHdrs))
-#define E_MSG_COMPOSER_HDRS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_MSG_COMPOSER_HDRS, EMsgComposerHdrsClass))
-#define E_IS_MSG_COMPOSER_HDRS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_MSG_COMPOSER_HDRS))
-#define E_IS_MSG_COMPOSER_HDRS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_MSG_COMPOSER_HDRS))
-
-
-#define SELECT_NAMES_OAFIID "OAFIID:GNOME_Evolution_Addressbook_SelectNames:" BASE_VERSION
-
-typedef struct _EMsgComposerHdrs EMsgComposerHdrs;
-typedef struct _EMsgComposerHdrsClass EMsgComposerHdrsClass;
-typedef struct _EMsgComposerHdrsPrivate EMsgComposerHdrsPrivate;
-
-struct _EMsgComposerHdrs {
- GtkTable parent;
-
- EMsgComposerHdrsPrivate *priv;
-
- EAccount *account;
-
- guint32 visible_mask;
-
- 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 << 0),
- E_MSG_COMPOSER_VISIBLE_REPLYTO = (1 << 1),
- E_MSG_COMPOSER_VISIBLE_TO = (1 << 2),
- E_MSG_COMPOSER_VISIBLE_CC = (1 << 3),
- E_MSG_COMPOSER_VISIBLE_BCC = (1 << 4),
- E_MSG_COMPOSER_VISIBLE_POSTTO = (1 << 5), /* for posting to folders */
- E_MSG_COMPOSER_VISIBLE_NEWSGROUP = (1 << 6), /* for posting to newsgroups */
- E_MSG_COMPOSER_VISIBLE_SUBJECT = (1 << 7)
-} EMsgComposerHeaderVisibleFlags;
-
-#define E_MSG_COMPOSER_VISIBLE_MASK_SENDER (E_MSG_COMPOSER_VISIBLE_FROM | E_MSG_COMPOSER_VISIBLE_REPLYTO)
-#define E_MSG_COMPOSER_VISIBLE_MASK_BASIC (E_MSG_COMPOSER_VISIBLE_MASK_SENDER | E_MSG_COMPOSER_VISIBLE_SUBJECT)
-#define E_MSG_COMPOSER_VISIBLE_MASK_RECIPIENTS (E_MSG_COMPOSER_VISIBLE_TO | E_MSG_COMPOSER_VISIBLE_CC | E_MSG_COMPOSER_VISIBLE_BCC)
-
-#define E_MSG_COMPOSER_VISIBLE_MASK_MAIL (E_MSG_COMPOSER_VISIBLE_MASK_BASIC | E_MSG_COMPOSER_VISIBLE_MASK_RECIPIENTS)
-#define E_MSG_COMPOSER_VISIBLE_MASK_NEWS (E_MSG_COMPOSER_VISIBLE_MASK_BASIC | E_MSG_COMPOSER_VISIBLE_NEWSGROUP)
-#define E_MSG_COMPOSER_VISIBLE_MASK_POST (E_MSG_COMPOSER_VISIBLE_MASK_BASIC | E_MSG_COMPOSER_VISIBLE_POSTTO)
-
-
-GtkType e_msg_composer_hdrs_get_type (void);
-GtkWidget *e_msg_composer_hdrs_new (BonoboUIComponent *uic, int visible_mask, int visible_flags);
-
-void e_msg_composer_hdrs_to_message (EMsgComposerHdrs *hdrs,
- CamelMimeMessage *msg);
-
-void e_msg_composer_hdrs_to_redirect (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,
- EABDestination **to_destv);
-void e_msg_composer_hdrs_set_cc (EMsgComposerHdrs *hdrs,
- EABDestination **cc_destv);
-void e_msg_composer_hdrs_set_bcc (EMsgComposerHdrs *hdrs,
- EABDestination **bcc_destv);
-void e_msg_composer_hdrs_set_post_to (EMsgComposerHdrs *hdrs,
- const char *post_to);
-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);
-
-EABDestination **e_msg_composer_hdrs_get_to (EMsgComposerHdrs *hdrs);
-EABDestination **e_msg_composer_hdrs_get_cc (EMsgComposerHdrs *hdrs);
-EABDestination **e_msg_composer_hdrs_get_bcc (EMsgComposerHdrs *hdrs);
-EABDestination **e_msg_composer_hdrs_get_recipients (EMsgComposerHdrs *hdrs);
-char *e_msg_composer_hdrs_get_post_to (EMsgComposerHdrs *hdrs);
-const char *e_msg_composer_hdrs_get_subject (EMsgComposerHdrs *hdrs);
-
-GtkWidget *e_msg_composer_hdrs_get_from_hbox (EMsgComposerHdrs *hdrs);
-GtkWidget *e_msg_composer_hdrs_get_from_omenu (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_post_to_label (EMsgComposerHdrs *hdrs);
-GtkWidget *e_msg_composer_hdrs_get_subject_entry (EMsgComposerHdrs *hdrs);
-
-void e_msg_composer_hdrs_set_visible_mask (EMsgComposerHdrs *hdrs,
- int visible_mask);
-void e_msg_composer_hdrs_set_visible (EMsgComposerHdrs *hdrs,
- int visible_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 3726124837..0000000000
--- a/composer/e-msg-composer-select-file.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/*
- * Authors: Ettore Perazzoli <ettore@ximian.com>
- * Jeffrey Stedfast <fejj@ximian.com>
- * Michael Zucchi <notzed@ximian.com>
- *
- * Copyright 2002 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 <gtk/gtkbox.h>
-#include <gtk/gtkcheckbutton.h>
-#include <gtk/gtkfilesel.h>
-#include <gtk/gtkmain.h>
-#include <gtk/gtksignal.h>
-
-#include <libgnomeui/gnome-uidefs.h>
-#include <libgnomeui/gnome-window-icon.h>
-
-#include "e-msg-composer-select-file.h"
-
-static GtkFileSelection *
-run_selector(EMsgComposer *composer, const char *title, int multi, gboolean *showinline_p)
-{
- GtkFileSelection *selection;
- GtkWidget *showinline = NULL;
- char *path;
-
- selection = (GtkFileSelection *)gtk_file_selection_new(title);
- gtk_window_set_transient_for((GtkWindow *)selection, (GtkWindow *)composer);
- gtk_window_set_wmclass((GtkWindow *)selection, "fileselection", "Evolution:composer");
- gtk_window_set_modal((GtkWindow *)selection, TRUE);
- gnome_window_icon_set_from_file((GtkWindow *)selection, EVOLUTION_DATADIR "/images/evolution/compose-message.png");
- gtk_file_selection_set_select_multiple((GtkFileSelection *)selection, multi);
-
- /* restore last path used */
- path = g_object_get_data((GObject *)composer, "attach_path");
- if (path == NULL) {
- path = g_strdup_printf("%s/", g_get_home_dir());
- gtk_file_selection_set_filename(selection, path);
- g_free(path);
- } else {
- gtk_file_selection_set_filename(selection, path);
- }
-
- if (showinline_p) {
- showinline = gtk_check_button_new_with_label (_("Suggest automatic display of attachment"));
- gtk_widget_show (showinline);
- gtk_box_pack_end (GTK_BOX (selection->main_vbox), showinline, FALSE, FALSE, 4);
- }
-
- if (gtk_dialog_run((GtkDialog *)selection) == GTK_RESPONSE_OK) {
- if (showinline_p)
- *showinline_p = gtk_toggle_button_get_active((GtkToggleButton *)showinline);
- path = g_path_get_dirname(gtk_file_selection_get_filename(selection));
- g_object_set_data_full((GObject *)composer, "attach_path", g_strdup_printf("%s/", path), g_free);
- g_free(path);
- } else {
- gtk_widget_destroy((GtkWidget *)selection);
- selection = NULL;
- }
-
- return selection;
-}
-
-/**
- * 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)
-{
- GtkFileSelection *selection;
- char *name = NULL;
-
- selection = run_selector (composer, title, TRUE, NULL);
- if (selection) {
- name = g_strdup(gtk_file_selection_get_filename(selection));
- gtk_widget_destroy((GtkWidget *)selection);
- }
-
- return name;
-}
-
-GPtrArray *
-e_msg_composer_select_file_attachments (EMsgComposer *composer, gboolean *showinline_p)
-{
- GtkFileSelection *selection;
- GPtrArray *list = NULL;
- char **files;
- int i;
-
- selection = run_selector(composer, _("Attach file(s)"), TRUE, showinline_p);
- if (selection) {
- files = gtk_file_selection_get_selections(selection);
-
- if (files != NULL) {
- list = g_ptr_array_new ();
- for (i = 0; files[i]; i++)
- g_ptr_array_add (list, g_strdup (files[i]));
-
- g_strfreev (files);
- }
-
- gtk_widget_destroy((GtkWidget *)selection);
- }
-
- return list;
-}
-
diff --git a/composer/e-msg-composer-select-file.h b/composer/e-msg-composer-select-file.h
deleted file mode 100644
index 8216089130..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 version 2 of the GNU General Public
- * published by the Free Software Foundation; either version 2 of the
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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);
-
-GPtrArray *e_msg_composer_select_file_attachments (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 c5f59ae298..0000000000
--- a/composer/e-msg-composer.c
+++ /dev/null
@@ -1,5055 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-msg-composer.c
- *
- * Copyright (C) 1999-2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * published by the Free Software Foundation; either version 2 of the
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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)
- * Radek Doulik (rodo@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
-
-#define SMIME_SUPPORTED 1
-
-#include <string.h>
-#include <stdlib.h>
-#include <dirent.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <unistd.h>
-#include <errno.h>
-#include <ctype.h>
-
-#include <gtk/gtkoptionmenu.h>
-#include <gtk/gtkscrolledwindow.h>
-
-#include <gconf/gconf.h>
-#include <gconf/gconf-client.h>
-
-#include <libgnome/gnome-exec.h>
-#include <libgnomeui/gnome-uidefs.h>
-#include <libgnomeui/gnome-window-icon.h>
-
-#include <bonobo/bonobo-exception.h>
-#include <bonobo/bonobo-moniker-util.h>
-#include <bonobo/bonobo-stream-memory.h>
-#include <bonobo/bonobo-ui-util.h>
-#include <bonobo/bonobo-widget.h>
-
-#include <libgnomevfs/gnome-vfs.h>
-
-#include <gtkhtml/htmlselection.h>
-
-#include <glade/glade.h>
-
-#include <gal/util/e-iconv.h>
-#include <gal/e-text/e-entry.h>
-
-#include "e-util/e-dialog-utils.h"
-#include "widgets/misc/e-charset-picker.h"
-
-#include <camel/camel-session.h>
-#include <camel/camel-charset-map.h>
-#include <camel/camel-stream-filter.h>
-#include <camel/camel-mime-filter-charset.h>
-#if defined (HAVE_NSS) && defined (SMIME_SUPPORTED)
-#include <camel/camel-smime-context.h>
-#endif
-
-#include "mail/em-utils.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-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:3.1"
-
-#define d(x) x
-
-
-#define DEFAULT_WIDTH 600
-#define DEFAULT_HEIGHT 500
-
-enum {
- SEND,
- SAVE_DRAFT,
- LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-enum {
- DND_TYPE_MESSAGE_RFC822,
- DND_TYPE_TEXT_URI_LIST,
- DND_TYPE_NETSCAPE_URL,
- DND_TYPE_TEXT_VCARD,
-};
-
-static GtkTargetEntry drop_types[] = {
- { "message/rfc822", 0, DND_TYPE_MESSAGE_RFC822 },
- { "text/uri-list", 0, DND_TYPE_TEXT_URI_LIST },
- { "_NETSCAPE_URL", 0, DND_TYPE_NETSCAPE_URL },
- { "text/x-vcard", 0, DND_TYPE_TEXT_VCARD },
-};
-
-static int num_drop_types = sizeof (drop_types) / sizeof (drop_types[0]);
-
-
-/* The parent class. */
-static BonoboWindowClass *parent_class = NULL;
-
-/* All the composer windows open, for bookkeeping purposes. */
-static GSList *all_composers = NULL;
-
-
-/* local prototypes */
-static GList *add_recipients (GList *list, const char *recips, gboolean decode);
-
-static void handle_mailto (EMsgComposer *composer, const char *mailto);
-
-static void message_rfc822_dnd (EMsgComposer *composer, CamelStream *stream);
-
-/* used by e_msg_composer_add_message_attachments() */
-static void add_attachments_from_multipart (EMsgComposer *composer, CamelMultipart *multipart,
- gboolean just_inlines, int depth);
-
-/* used by e_msg_composer_new_with_message() */
-static void handle_multipart (EMsgComposer *composer, CamelMultipart *multipart, int depth);
-static void handle_multipart_alternative (EMsgComposer *composer, CamelMultipart *multipart, int depth);
-static void handle_multipart_encrypted (EMsgComposer *composer, CamelMultipart *multipart, int depth);
-static void handle_multipart_signed (EMsgComposer *composer, CamelMultipart *multipart, int depth);
-
-static void set_editor_signature (EMsgComposer *composer);
-
-
-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 CamelTransferEncoding
-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 = e_iconv_open (charset, "utf-8");
- if (cd == (iconv_t) -1)
- return -1;
-
- in = buf->data;
- inlen = buf->len;
- do {
- out = outbuf;
- outlen = sizeof (outbuf);
- status = e_iconv (cd, (const char **) &in, &inlen, &out, &outlen);
- for (ch = out - 1; ch >= outbuf; ch--) {
- if ((unsigned char)*ch > 127)
- count++;
- }
- } while (status == (size_t) -1 && errno == E2BIG);
- e_iconv_close (cd);
-
- if (status == (size_t) -1)
- return -1;
-
- if (count == 0)
- return CAMEL_TRANSFER_ENCODING_7BIT;
- else if (count <= buf->len * 0.17)
- return CAMEL_TRANSFER_ENCODING_QUOTEDPRINTABLE;
- else
- return CAMEL_TRANSFER_ENCODING_BASE64;
-}
-
-static const char *
-composer_get_default_charset_setting (void)
-{
- GConfClient *gconf;
- const char *charset;
- char *buf;
-
- gconf = gconf_client_get_default ();
- buf = gconf_client_get_string (gconf, "/apps/evolution/mail/composer/charset", NULL);
-
- if (buf == NULL || buf[0] == '\0') {
- g_free (buf);
- buf = gconf_client_get_string (gconf, "/apps/evolution/mail/format/charset", NULL);
- if (buf && buf[0] == '\0') {
- g_free (buf);
- buf = NULL;
- }
- }
-
- g_object_unref (gconf);
-
- if (buf != NULL) {
- charset = e_iconv_charset_name (buf);
- g_free (buf);
- } else
- charset = e_iconv_locale_charset ();
-
- return charset ? charset : "us-ascii";
-}
-
-static const char *
-best_charset (GByteArray *buf, const char *default_charset, CamelTransferEncoding *encoding)
-{
- const char *charset;
-
- /* First try US-ASCII */
- *encoding = best_encoding (buf, "US-ASCII");
- if (*encoding == CAMEL_TRANSFER_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 = composer_get_default_charset_setting ();
- *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_TRANSFER_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);
- camel_object_unref (value);
-
- return TRUE;
-}
-
-static void
-clear_current_images (EMsgComposer *composer)
-{
- g_list_free (composer->current_images);
- composer->current_images = NULL;
-}
-
-static gboolean
-clear_url (gpointer key, gpointer value, gpointer user_data)
-{
- g_free (key);
-
- return TRUE;
-}
-
-void
-e_msg_composer_clear_inlined_table (EMsgComposer *composer)
-{
- g_hash_table_foreach_remove (composer->inline_images, clear_inline_images, NULL);
- g_hash_table_foreach_remove (composer->inline_images_by_url, clear_url, NULL);
-}
-
-static void
-add_inlined_images (EMsgComposer *composer, CamelMultipart *multipart)
-{
- GList *d = composer->current_images;
- GHashTable *added;
-
- added = g_hash_table_new (g_direct_hash, g_direct_equal);
- while (d) {
- CamelMimePart *part = d->data;
-
- if (!g_hash_table_lookup (added, part)) {
- camel_multipart_add_part (multipart, part);
- g_hash_table_insert (added, part, part);
- }
- d = d->next;
- }
- g_hash_table_destroy (added);
-}
-
-/* This functions builds a CamelMimeMessage for the message that the user has
- * composed in `composer'.
- */
-static CamelMimeMessage *
-build_message (EMsgComposer *composer, gboolean save_html_object_data)
-{
- EMsgComposerAttachmentBar *attachment_bar =
- E_MSG_COMPOSER_ATTACHMENT_BAR (composer->attachment_bar);
- EMsgComposerHdrs *hdrs = E_MSG_COMPOSER_HDRS (composer->hdrs);
- CamelDataWrapper *plain, *html, *current;
- CamelTransferEncoding plain_encoding;
- GPtrArray *recipients = NULL;
- CamelMultipart *body = NULL;
- CamelContentType *type;
- CamelMimeMessage *new;
- const char *charset = NULL;
- CamelStream *stream;
- CamelMimePart *part;
- CamelException ex;
- GByteArray *data;
- int i;
-
- if (composer->persist_stream_interface == CORBA_OBJECT_NIL)
- return NULL;
-
- /* evil kludgy hack for Redirect */
- if (composer->redirect) {
- e_msg_composer_hdrs_to_redirect (hdrs, composer->redirect);
- camel_object_ref (composer->redirect);
- return composer->redirect;
- }
-
- 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]);
- }
-
- if (composer->mime_body) {
- plain_encoding = CAMEL_TRANSFER_ENCODING_7BIT;
- for (i = 0; composer->mime_body[i]; i++) {
- if ((unsigned char) composer->mime_body[i] > 127) {
- plain_encoding = CAMEL_TRANSFER_ENCODING_QUOTEDPRINTABLE;
- break;
- }
- }
- data = g_byte_array_new ();
- g_byte_array_append (data, composer->mime_body, strlen (composer->mime_body));
- type = camel_content_type_decode (composer->mime_type);
- } else {
- 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 = camel_content_type_new ("text", "plain");
- if (charset)
- camel_content_type_set_param (type, "charset", charset);
- }
-
- stream = camel_stream_mem_new_with_byte_array (data);
-
- /* convert the stream to the appropriate charset */
- if (charset && strcasecmp (charset, "UTF-8") != 0) {
- CamelStreamFilter *filter_stream;
- CamelMimeFilterCharset *filter;
-
- filter_stream = camel_stream_filter_new_with_stream (stream);
- camel_object_unref (stream);
-
- stream = (CamelStream *) filter_stream;
- filter = camel_mime_filter_charset_new_convert ("UTF-8", charset);
- camel_stream_filter_add (filter_stream, (CamelMimeFilter *) filter);
- camel_object_unref (filter);
- }
-
- /* construct the content object */
- plain = camel_data_wrapper_new ();
- camel_data_wrapper_construct_from_stream (plain, stream);
- camel_object_unref (stream);
-
- camel_data_wrapper_set_mime_type_field (plain, type);
- camel_content_type_unref (type);
-
- if (composer->send_html) {
- CORBA_Environment ev;
- clear_current_images (composer);
-
- if (save_html_object_data) {
- CORBA_exception_init (&ev);
- GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "save-data-on", &ev);
- }
- data = get_text (composer->persist_stream_interface, "text/html");
- if (save_html_object_data) {
- GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "save-data-off", &ev);
- CORBA_exception_free (&ev);
- }
-
- if (!data) {
- /* The component has probably died */
- camel_object_unref (new);
- camel_object_unref (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 (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 (plain);
- camel_mime_part_set_encoding (part, plain_encoding);
- camel_multipart_add_part (body, part);
- camel_object_unref (part);
-
- part = camel_mime_part_new ();
- camel_medium_set_content_object (CAMEL_MEDIUM (part), html);
- camel_object_unref (html);
- camel_multipart_add_part (body, part);
- camel_object_unref (part);
-
- /* If there are inlined images, construct a
- * multipart/related containing the
- * multipart/alternative and the images.
- */
- if (composer->current_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 (body);
- camel_multipart_add_part (html_with_images, part);
- camel_object_unref (part);
-
- add_inlined_images (composer, html_with_images);
- clear_current_images (composer);
-
- 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 ();
-
- if (composer->is_alternative) {
- camel_data_wrapper_set_mime_type (CAMEL_DATA_WRAPPER (multipart),
- "multipart/alternative");
- }
-
- /* 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 (current);
- camel_multipart_add_part (multipart, part);
- camel_object_unref (part);
-
- e_msg_composer_attachment_bar_to_multipart (attachment_bar, multipart, composer->charset);
-
- if (composer->is_alternative) {
- int i;
-
- for (i = camel_multipart_get_number (multipart); i > 1; i--) {
- part = camel_multipart_get_part (multipart, i - 1);
- camel_medium_remove_header (CAMEL_MEDIUM (part), "Content-Disposition");
- }
- }
-
- current = CAMEL_DATA_WRAPPER (multipart);
- }
-
- camel_exception_init (&ex);
-
- /* Setup working recipient list if we're encrypting */
- if (composer->pgp_encrypt
-#if defined (HAVE_NSS) && defined (SMIME_SUPPORTED)
- || composer->smime_encrypt
-#endif
- ) {
- int i, j;
- const char *types[] = { CAMEL_RECIPIENT_TYPE_TO, CAMEL_RECIPIENT_TYPE_CC, CAMEL_RECIPIENT_TYPE_BCC };
-
- recipients = g_ptr_array_new();
- for (i=0; i < sizeof(types)/sizeof(types[0]); i++) {
- const CamelInternetAddress *addr;
- const char *address;
-
- addr = camel_mime_message_get_recipients(new, types[i]);
- for (j=0;camel_internet_address_get(addr, j, NULL, &address); j++)
- g_ptr_array_add(recipients, g_strdup (address));
-
- }
- }
-
- if (composer->pgp_sign || composer->pgp_encrypt) {
- const char *pgp_userid;
- CamelInternetAddress *from = NULL;
- CamelCipherContext *cipher;
-
- 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 (current);
-
- if (hdrs->account && hdrs->account->pgp_key && *hdrs->account->pgp_key) {
- pgp_userid = hdrs->account->pgp_key;
- } else {
- from = e_msg_composer_hdrs_get_from(hdrs);
- camel_internet_address_get(from, 0, NULL, &pgp_userid);
- }
-
- if (composer->pgp_sign) {
- CamelMimePart *npart = camel_mime_part_new();
-
- cipher = mail_crypto_get_pgp_cipher_context(hdrs->account);
- camel_cipher_sign(cipher, pgp_userid, CAMEL_CIPHER_HASH_SHA1, part, npart, &ex);
- camel_object_unref(cipher);
-
- if (camel_exception_is_set(&ex)) {
- camel_object_unref(npart);
- goto exception;
- }
-
- camel_object_unref(part);
- part = npart;
- }
-
- if (composer->pgp_encrypt) {
- CamelMimePart *npart = camel_mime_part_new();
-
- /* check to see if we should encrypt to self, NB gets removed immediately after use */
- if (hdrs->account && hdrs->account->pgp_encrypt_to_self && pgp_userid)
- g_ptr_array_add (recipients, (char *)pgp_userid);
-
- cipher = mail_crypto_get_pgp_cipher_context (hdrs->account);
- camel_cipher_encrypt(cipher, pgp_userid, recipients, part, npart, &ex);
- camel_object_unref (cipher);
-
- if (hdrs->account && hdrs->account->pgp_encrypt_to_self && pgp_userid)
- g_ptr_array_set_size(recipients, recipients->len - 1);
-
- if (camel_exception_is_set (&ex)) {
- camel_object_unref(npart);
- goto exception;
- }
-
- camel_object_unref (part);
- part = npart;
- }
-
- if (from)
- camel_object_unref (from);
-
- current = camel_medium_get_content_object (CAMEL_MEDIUM (part));
- camel_object_ref (current);
- camel_object_unref (part);
- }
-
-#if defined (HAVE_NSS) && defined (SMIME_SUPPORTED)
- if (composer->smime_sign || composer->smime_encrypt) {
- CamelInternetAddress *from = NULL;
- CamelCipherContext *cipher;
-
- part = camel_mime_part_new();
- camel_medium_set_content_object((CamelMedium *)part, current);
- if (current == plain)
- camel_mime_part_set_encoding(part, plain_encoding);
- camel_object_unref(current);
-
- if (composer->smime_sign
- && (hdrs->account == NULL || hdrs->account->smime_sign_key == NULL || hdrs->account->smime_sign_key[0] == 0)) {
- camel_exception_setv(&ex, 1, _("Cannot sign outgoing message: No signing certificate set for from account"));
- goto exception;
- }
-
- if (composer->smime_encrypt
- && (hdrs->account == NULL || hdrs->account->smime_sign_key == NULL || hdrs->account->smime_sign_key[0] == 0)) {
- camel_exception_setv(&ex, 1, _("Cannot encrypt outgoing message: No encryption certificate set for from account"));
- goto exception;
- }
-
- if (composer->smime_sign) {
- CamelMimePart *npart = camel_mime_part_new();
-
- cipher = camel_smime_context_new(session);
-
- /* if we're also encrypting, envelope-sign rather than clear-sign */
- if (composer->smime_encrypt) {
- camel_smime_context_set_sign_mode((CamelSMIMEContext *)cipher, CAMEL_SMIME_SIGN_ENVELOPED);
- camel_smime_context_set_encrypt_key((CamelSMIMEContext *)cipher, TRUE, hdrs->account->smime_encrypt_key);
- } else if (hdrs->account && hdrs->account->smime_encrypt_key && *hdrs->account->smime_encrypt_key) {
- camel_smime_context_set_encrypt_key((CamelSMIMEContext *)cipher, TRUE, hdrs->account->smime_encrypt_key);
- }
-
- camel_cipher_sign(cipher, hdrs->account->smime_sign_key, CAMEL_CIPHER_HASH_SHA1, part, npart, &ex);
- camel_object_unref(cipher);
-
- if (camel_exception_is_set(&ex)) {
- camel_object_unref(npart);
- goto exception;
- }
-
- camel_object_unref(part);
- part = npart;
- }
-
- if (composer->smime_encrypt) {
- /* check to see if we should encrypt to self, NB removed after use */
- if (hdrs->account->smime_encrypt_to_self)
- g_ptr_array_add(recipients, hdrs->account->smime_encrypt_key);
-
- cipher = camel_smime_context_new(session);
- camel_smime_context_set_encrypt_key((CamelSMIMEContext *)cipher, TRUE, hdrs->account->smime_encrypt_key);
-
- camel_cipher_encrypt(cipher, NULL, recipients, part, (CamelMimePart *)new, &ex);
- camel_object_unref(cipher);
-
- if (camel_exception_is_set(&ex))
- goto exception;
-
- if (hdrs->account->smime_encrypt_to_self)
- g_ptr_array_set_size(recipients, recipients->len - 1);
- }
-
- if (from)
- camel_object_unref(from);
-
- /* we replaced the message directly, we don't want to do reparenting foo */
- if (composer->smime_encrypt) {
- camel_object_unref(part);
- goto skip_content;
- } else {
- current = camel_medium_get_content_object((CamelMedium *)part);
- camel_object_ref(current);
- camel_object_unref(part);
- }
- }
-#endif /* HAVE_NSS */
-
- 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 (current);
-
-skip_content:
-
- if (recipients) {
- for (i=0; i<recipients->len; i++)
- g_free(recipients->pdata[i]);
- g_ptr_array_free(recipients, TRUE);
- }
-
- /* 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 (part);
-
- camel_object_unref (new);
-
- if (ex.id != CAMEL_EXCEPTION_USER_CANCEL) {
- GtkWidget *dialog;
-
- dialog = gtk_message_dialog_new(GTK_WINDOW(composer),
- GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
- "%s", camel_exception_get_description (&ex));
- gtk_dialog_run(GTK_DIALOG(dialog));
- gtk_widget_destroy(dialog);
- }
-
- camel_exception_clear (&ex);
-
- if (recipients) {
- for (i=0; i<recipients->len; i++)
- g_free(recipients->pdata[i]);
- g_ptr_array_free(recipients, TRUE);
- }
-
- return NULL;
-}
-
-
-static char *
-get_file_content (EMsgComposer *composer, const char *file_name, gboolean want_html, guint flags, gboolean warn)
-{
- CamelStreamFilter *filtered_stream;
- CamelStreamMem *memstream;
- CamelMimeFilter *html, *charenc;
- CamelStream *stream;
- GByteArray *buffer;
- const char *charset;
- char *content;
- int fd;
-
- fd = open (file_name, O_RDONLY);
- if (fd == -1) {
- if (warn) {
- GtkWidget *dialog;
-
- dialog = gtk_message_dialog_new(GTK_WINDOW(composer),
- GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
- _("Error while reading file %s:\n%s"),
- file_name, g_strerror (errno));
- gtk_dialog_run(GTK_DIALOG(dialog));
- gtk_widget_destroy(dialog);
- }
- return g_strdup ("");
- }
-
- stream = camel_stream_fs_new_with_fd (fd);
-
- if (want_html) {
- filtered_stream = camel_stream_filter_new_with_stream (stream);
- camel_object_unref (stream);
-
- html = camel_mime_filter_tohtml_new (flags, 0);
- camel_stream_filter_add (filtered_stream, html);
- camel_object_unref (html);
-
- stream = (CamelStream *) filtered_stream;
- }
-
- memstream = (CamelStreamMem *) camel_stream_mem_new ();
- buffer = g_byte_array_new ();
- camel_stream_mem_set_byte_array (memstream, buffer);
-
- camel_stream_write_to_stream (stream, (CamelStream *) memstream);
- camel_object_unref (stream);
-
- /* The newer signature UI saves signatures in UTF-8, but we still need to check that
- the signature is valid UTF-8 because it is possible that the user imported a
- signature file that is in his/her locale charset. If it's not in UTF-8 and not in
- the charset the composer is in (or their default mail charset) then fuck it,
- there's nothing we can do. */
- if (buffer->len && !g_utf8_validate (buffer->data, buffer->len, NULL)) {
- stream = (CamelStream *) memstream;
- memstream = (CamelStreamMem *) camel_stream_mem_new ();
- camel_stream_mem_set_byte_array (memstream, g_byte_array_new ());
-
- filtered_stream = camel_stream_filter_new_with_stream (stream);
- camel_object_unref (stream);
-
- charset = composer ? composer->charset : composer_get_default_charset_setting ();
- charenc = (CamelMimeFilter *) camel_mime_filter_charset_new_convert (charset, "utf-8");
- camel_stream_filter_add (filtered_stream, charenc);
- camel_object_unref (charenc);
-
- camel_stream_write_to_stream ((CamelStream *) filtered_stream, (CamelStream *) memstream);
- camel_object_unref (filtered_stream);
- g_byte_array_free (buffer, TRUE);
-
- buffer = memstream->buffer;
- }
-
- camel_object_unref (memstream);
-
- g_byte_array_append (buffer, "", 1);
- content = buffer->data;
- g_byte_array_free (buffer, FALSE);
-
- return content;
-}
-
-char *
-e_msg_composer_get_sig_file_content (const char *sigfile, gboolean in_html)
-{
- if (!sigfile || !*sigfile) {
- return NULL;
- }
-
- return get_file_content (NULL, sigfile, !in_html, CAMEL_MIME_FILTER_TOHTML_PRESERVE_8BIT, FALSE);
-}
-
-static void
-prepare_engine (EMsgComposer *composer)
-{
- CORBA_Environment ev;
-
- g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
- /* printf ("prepare_engine\n"); */
-
- CORBA_exception_init (&ev);
- composer->editor_engine = (GNOME_GtkHTML_Editor_Engine) Bonobo_Unknown_queryInterface
- (bonobo_widget_get_objref (BONOBO_WIDGET (composer->editor)), "IDL:GNOME/GtkHTML/Editor/Engine:1.0", &ev);
- if ((composer->editor_engine != CORBA_OBJECT_NIL) && (ev._major == CORBA_NO_EXCEPTION)) {
-
- /* printf ("trying set listener\n"); */
- composer->editor_listener = BONOBO_OBJECT (listener_new (composer));
- if (composer->editor_listener != NULL)
- 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);
-
- if ((ev._major != CORBA_NO_EXCEPTION) || (composer->editor_listener == NULL)) {
- CORBA_Environment err_ev;
-
- CORBA_exception_init (&err_ev);
-
- Bonobo_Unknown_unref (composer->editor_engine, &err_ev);
- CORBA_Object_release (composer->editor_engine, &err_ev);
-
- CORBA_exception_free (&err_ev);
-
- composer->editor_engine = CORBA_OBJECT_NIL;
- g_warning ("Can't establish Editor Listener\n");
- }
- } else {
- composer->editor_engine = CORBA_OBJECT_NIL;
- g_warning ("Can't get Editor Engine\n");
- }
-
- CORBA_exception_free (&ev);
-}
-
-static gchar *
-encode_signature_name (const gchar *name)
-{
- const gchar *s;
- gchar *ename, *e;
- gint len = 0;
-
- s = name;
- while (*s) {
- len ++;
- if (*s == '"' || *s == '.' || *s == '=')
- len ++;
- s ++;
- }
-
- ename = g_new (gchar, len + 1);
-
- s = name;
- e = ename;
- while (*s) {
- if (*s == '"') {
- *e = '.';
- e ++;
- *e = '1';
- e ++;
- } else if (*s == '=') {
- *e = '.';
- e ++;
- *e = '2';
- e ++;
- } else {
- *e = *s;
- e ++;
- }
- if (*s == '.') {
- *e = '.';
- e ++;
- }
- s ++;
- }
- *e = 0;
-
- return ename;
-}
-
-static gchar *
-decode_signature_name (const gchar *name)
-{
- const gchar *s;
- gchar *dname, *d;
- gint len = 0;
-
- s = name;
- while (*s) {
- len ++;
- if (*s == '.') {
- s ++;
- if (!*s || !(*s == '.' || *s == '1' || *s == '2'))
- return NULL;
- }
- s ++;
- }
-
- dname = g_new (gchar, len + 1);
-
- s = name;
- d = dname;
- while (*s) {
- if (*s == '.') {
- s ++;
- if (!*s || !(*s == '.' || *s == '1' || *s == '2')) {
- g_free (dname);
- return NULL;
- }
- if (*s == '1')
- *d = '"';
- else if (*s == '2')
- *d = '=';
- else
- *d = '.';
- } else
- *d = *s;
- d ++;
- s ++;
- }
- *d = 0;
-
- return dname;
-}
-
-#define CONVERT_SPACES CAMEL_MIME_FILTER_TOHTML_CONVERT_SPACES
-
-static char *
-get_signature_html (EMsgComposer *composer)
-{
- gboolean format_html = FALSE;
- char *text = NULL, *html = NULL, *sig_file = NULL, *script = NULL;
-
- if (composer->signature) {
- sig_file = composer->signature->filename;
- format_html = composer->signature->html;
- script = composer->signature->script;
- } else if (composer->auto_signature) {
- EAccountIdentity *id;
- char *organization;
- char *address;
- char *name;
-
- id = E_MSG_COMPOSER_HDRS (composer->hdrs)->account->id;
- address = id->address ? camel_text_to_html (id->address, CONVERT_SPACES, 0) : NULL;
- name = id->name ? camel_text_to_html (id->name, CONVERT_SPACES, 0) : NULL;
- organization = id->organization ? camel_text_to_html (id->organization, CONVERT_SPACES, 0) : NULL;
-
- text = g_strdup_printf ("-- <BR>%s%s%s%s%s%s%s%s",
- name ? name : "",
- (address && *address) ? " &lt;<A HREF=\"mailto:" : "",
- address ? address : "",
- (address && *address) ? "\">" : "",
- address ? address : "",
- (address && *address) ? "</A>&gt;" : "",
- (organization && *organization) ? "<BR>" : "",
- organization ? organization : "");
- g_free (address);
- g_free (name);
- g_free (organization);
- format_html = TRUE;
- }
-
- if (!text) {
- if (script)
- text = mail_config_signature_run_script (script);
- else {
- if (!sig_file)
- return NULL;
- /* printf ("sig file: %s\n", sig_file); */
- text = e_msg_composer_get_sig_file_content (sig_file, format_html);
- }
- }
-
- /* printf ("text: %s\n", text); */
- if (text) {
- gchar *encoded_name = NULL;
-
- if (composer->signature)
- encoded_name = encode_signature_name (composer->signature->name);
-
- /* 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\">-->"
- "<!--+GtkHTML:<DATA class=\"ClueFlow\" key=\"signature_name\" value=\"%s%s\">-->"
- "<TABLE WIDTH=\"100%%\" CELLSPACING=\"0\" CELLPADDING=\"0\"><TR><TD>"
- "%s%s%s%s"
- "</TD></TR></TABLE>",
- composer->signature ? "name:" : "auto",
- composer->signature ? encoded_name : "",
- format_html ? "" : "<PRE>\n",
- format_html || (!strncmp ("-- \n", text, 4) || strstr(text, "\n-- \n")) ? "" : "-- \n",
- text,
- format_html ? "" : "</PRE>\n");
- g_free (text);
- g_free (encoded_name);
- text = html;
- }
-
- return text;
-}
-
-static void
-set_editor_text (EMsgComposer *composer, const char *text)
-{
- Bonobo_PersistStream persist;
- BonoboStream *stream;
- BonoboWidget *editor;
- CORBA_Environment ev;
- Bonobo_Unknown object;
-
- g_return_if_fail (composer->persist_stream_interface != CORBA_OBJECT_NIL);
-
- persist = composer->persist_stream_interface;
-
- editor = BONOBO_WIDGET (composer->editor);
-
- CORBA_exception_init (&ev);
-
- stream = bonobo_stream_mem_create (text, strlen (text), TRUE, FALSE);
- object = bonobo_object_corba_objref (BONOBO_OBJECT (stream));
- Bonobo_PersistStream_load (persist, (Bonobo_Stream) object, "text/html", &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- /* FIXME. Some error message. */
- bonobo_object_unref (BONOBO_OBJECT (stream));
- CORBA_exception_free (&ev);
- return;
- }
-
- CORBA_exception_free (&ev);
-
- bonobo_object_unref (BONOBO_OBJECT (stream));
-}
-
-/* Commands. */
-
-static void
-show_attachments (EMsgComposer *composer,
- gboolean show)
-{
- if (show) {
- gtk_widget_show (composer->attachment_scrolled_window);
- gtk_widget_show (composer->attachment_bar);
- } else {
- gtk_widget_hide (composer->attachment_scrolled_window);
- gtk_widget_hide (composer->attachment_bar);
- }
-
- composer->attachment_bar_visible = show;
-
- /* Update the GUI. */
- bonobo_ui_component_set_prop (
- composer->uic, "/commands/ViewAttach",
- "state", show ? "1" : "0", NULL);
-}
-
-static void
-save (EMsgComposer *composer, const char *default_filename)
-{
- CORBA_Environment ev;
- char *filename;
- int fd;
-
- if (default_filename != NULL)
- filename = g_strdup (default_filename);
- else
- filename = e_msg_composer_select_file (composer, _("Save as..."));
-
- if (filename == NULL)
- return;
-
- /* check to see if we already have the file and that we can create it */
- if ((fd = open (filename, O_RDONLY | O_CREAT | O_EXCL, 0777)) == -1) {
- int resp, errnosav = errno;
- GtkWidget *dialog;
- struct stat st;
-
- if (stat (filename, &st) == 0 && S_ISREG (st.st_mode)) {
- dialog = gtk_message_dialog_new (GTK_WINDOW (composer),
- GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO,
- _("File exists, overwrite?"));
- resp = gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
- if (resp != GTK_RESPONSE_YES) {
- g_free (filename);
- return;
- }
- } else {
- dialog = gtk_message_dialog_new (GTK_WINDOW (composer),
- GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
- _("Error saving file: %s"), g_strerror (errnosav));
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
- g_free (filename);
- return;
- }
- } else
- close (fd);
-
- CORBA_exception_init (&ev);
-
- Bonobo_PersistFile_save (composer->persist_file_interface, filename, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- char *tmp = g_path_get_basename (filename);
-
- e_notice (composer, GTK_MESSAGE_ERROR, _("Error saving file: %s"), tmp);
- g_free(tmp);
- } else {
- GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "saved", &ev);
- e_msg_composer_unset_autosaved (composer);
- }
- CORBA_exception_free (&ev);
-
- g_free (filename);
-}
-
-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) {
- char *tmp = g_path_get_basename(file_name);
-
- e_notice (composer, GTK_MESSAGE_ERROR,
- _("Error loading file: %s"), tmp);
- g_free(tmp);
- }
-
- CORBA_exception_free (&ev);
-}
-
-#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 void autosave_manager_start (AutosaveManager *am);
-static void autosave_manager_stop (AutosaveManager *am);
-
-static gboolean
-autosave_save_draft (EMsgComposer *composer)
-{
- CamelMimeMessage *message;
- CamelStream *stream;
- char *file;
- int fd, camelfd;
- gboolean success = TRUE;
-
- if (!e_msg_composer_is_dirty (composer))
- return TRUE;
-
- fd = composer->autosave_fd;
- file = composer->autosave_file;
-
- if (fd == -1) {
- e_notice (composer, GTK_MESSAGE_ERROR,
- _("Error accessing file: %s"), file);
- return FALSE;
- }
-
- message = e_msg_composer_get_message_draft (composer);
-
- if (message == NULL) {
- e_notice (composer, GTK_MESSAGE_ERROR,
- _("Unable to retrieve message from editor"));
- return FALSE;
- }
-
- if (lseek (fd, (off_t)0, SEEK_SET) == -1) {
- camel_object_unref (message);
- e_notice (composer, GTK_MESSAGE_ERROR,
- _("Unable to seek on file: %s\n%s"), file, g_strerror (errno));
- return FALSE;
- }
-
- if (ftruncate (fd, (off_t)0) == -1) {
- camel_object_unref (message);
- e_notice (composer, GTK_MESSAGE_ERROR,
- _("Unable to truncate file: %s\n%s"), file, g_strerror (errno));
- return FALSE;
- }
-
- /* dup the fd because we dont want camel to close it when done */
- camelfd = dup(fd);
- if (fd == -1) {
- camel_object_unref (message);
- e_notice (composer, GTK_MESSAGE_ERROR,
- _("Unable to copy file descriptor: %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 (camelfd);
- if (camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), stream) == -1
- || camel_stream_close (CAMEL_STREAM (stream)) == -1) {
- e_notice (composer, GTK_MESSAGE_ERROR,
- _("Error autosaving message: %s\n %s"), file, strerror(errno));
-
- success = FALSE;
- } else {
- CORBA_Environment ev;
- CORBA_exception_init (&ev);
- GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "saved", &ev);
- CORBA_exception_free (&ev);
- e_msg_composer_unset_changed (composer);
- e_msg_composer_set_autosaved (composer);
- }
-
- camel_object_unref (stream);
-
- camel_object_unref (message);
-
- 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);
-
- g_signal_connect (GTK_OBJECT (composer), "send",
- G_CALLBACK (em_utils_composer_send_cb), NULL);
-
- g_signal_connect (GTK_OBJECT (composer), "save-draft",
- G_CALLBACK (em_utils_composer_save_draft_cb), NULL);
-
- gtk_widget_show (GTK_WIDGET (composer));
- }
-
- camel_object_unref (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_manager_query_load_orphans (AutosaveManager *am, GtkWindow *parent)
-{
- 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) == -1 || st.st_size == 0) {
- unlink (filename);
- g_free (filename);
- continue;
- }
- match = g_slist_prepend (match, filename);
- }
- }
-
- closedir (dir);
-
- if (match != NULL) {
- GtkWidget *dialog;
-
- dialog = gtk_message_dialog_new (parent,
- GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO,
- _("Ximian Evolution has found unsaved files from a previous session.\n"
- "Would you like to try to recover them?"));
- gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_YES);
- load = gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_YES;
- gtk_widget_destroy (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);
-
- if (composer->enable_autosave)
- 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);
-
- autosave_manager_stop (am);
- autosave_manager_start (am);
-
- return FALSE;
-}
-
-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_path_get_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, (GtkWindow *)composer);
- am->ask = TRUE;
- }
- }
- autosave_manager_start (am);
-}
-
-static void
-autosave_manager_unregister (AutosaveManager *am, EMsgComposer *composer)
-{
- char *key, *oldkey;
- void *olddata;
-
- if (!composer->autosave_file)
- return;
-
- key = g_path_get_basename(composer->autosave_file);
- if (g_hash_table_lookup_extended(am->table, key, (void **)&oldkey, &olddata)) {
- g_hash_table_remove(am->table, oldkey);
- g_free(oldkey);
- g_free(key);
- }
-
- /* 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);
- composer->autosave_file = NULL;
-
- 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)
-{
- g_signal_emit (data, signals[SAVE_DRAFT], 0, FALSE);
- e_msg_composer_unset_changed (E_MSG_COMPOSER (data));
- e_msg_composer_unset_autosaved (E_MSG_COMPOSER (data));
-}
-
-/* Exit dialog. (Displays a "Save composition to 'Drafts' before exiting?" warning before actually exiting.) */
-
-static void
-do_exit (EMsgComposer *composer)
-{
- const char *subject;
- GtkWidget *dialog;
- int button;
-
- if (!e_msg_composer_is_dirty (composer) && !e_msg_composer_is_autosaved (composer)) {
- gtk_widget_destroy (GTK_WIDGET (composer));
- return;
- }
-
- gdk_window_raise (GTK_WIDGET (composer)->window);
-
- subject = e_msg_composer_hdrs_get_subject (E_MSG_COMPOSER_HDRS (composer->hdrs));
-
- dialog = gtk_message_dialog_new (GTK_WINDOW (composer),
- GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR, GTK_BUTTONS_NONE,
- _("The message \"%s\" has not been sent.\n\n"
- "Do you wish to save your changes?"),
- subject);
-
- gtk_dialog_add_buttons (GTK_DIALOG (dialog),
- _("_Discard Changes"), GTK_RESPONSE_NO,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE, GTK_RESPONSE_YES,
- NULL);
- gtk_window_set_title (GTK_WINDOW (dialog), _("Warning: Modified Message"));
- gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_YES);
- button = gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
-
- switch (button) {
- case GTK_RESPONSE_YES:
- /* Save */
- g_signal_emit (GTK_OBJECT (composer), signals[SAVE_DRAFT], 0, TRUE);
- e_msg_composer_unset_changed (composer);
- e_msg_composer_unset_autosaved (composer);
- break;
- case GTK_RESPONSE_NO:
- /* Don't save */
- gtk_widget_destroy (GTK_WIDGET (composer));
- break;
- case GTK_RESPONSE_CANCEL:
- break;
- }
-}
-
-/* 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)
-{
- g_signal_emit (GTK_OBJECT (data), signals[SEND], 0);
-}
-
-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_cut_cb (BonoboUIComponent *uic, void *data, const char *path)
-{
- EMsgComposer *composer = data;
-
- g_return_if_fail (composer->focused_entry != NULL);
-
- if (GTK_IS_ENTRY (composer->focused_entry)) {
- gtk_editable_cut_clipboard (GTK_EDITABLE (composer->focused_entry));
- } else {
- /* happy happy joy joy, an EEntry. */
- g_assert_not_reached ();
- }
-}
-
-static void
-menu_edit_copy_cb (BonoboUIComponent *uic, void *data, const char *path)
-{
- EMsgComposer *composer = data;
-
- g_return_if_fail (composer->focused_entry != NULL);
-
- if (GTK_IS_ENTRY (composer->focused_entry)) {
- gtk_editable_copy_clipboard (GTK_EDITABLE (composer->focused_entry));
- } else {
- /* happy happy joy joy, an EEntry. */
- g_assert_not_reached ();
- }
-}
-
-static void
-menu_edit_paste_cb (BonoboUIComponent *uic, void *data, const char *path)
-{
- EMsgComposer *composer = data;
-
- g_return_if_fail (composer->focused_entry != NULL);
-
- if (GTK_IS_ENTRY (composer->focused_entry)) {
- gtk_editable_paste_clipboard (GTK_EDITABLE (composer->focused_entry));
- } else {
- /* happy happy joy joy, an EEntry. */
- g_assert_not_reached ();
- }
-}
-
-static void
-menu_edit_select_all_cb (BonoboUIComponent *uic, void *data, const char *path)
-{
- EMsgComposer *composer = data;
-
- g_return_if_fail (composer->focused_entry != NULL);
-
- if (GTK_IS_ENTRY (composer->focused_entry)) {
- gtk_editable_set_position (GTK_EDITABLE (composer->focused_entry), -1);
- gtk_editable_select_region (GTK_EDITABLE (composer->focused_entry), 0, -1);
- } else {
- /* happy happy joy joy, an EEntry. */
- g_assert_not_reached ();
- }
-}
-
-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_undoBegin (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_undoEnd (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_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_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_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_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 ("FileAttach", menu_file_add_attachment_cb),
-
- BONOBO_UI_VERB ("FileSend", menu_file_send_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/FileSave", "save-16.png"),
- E_PIXMAP ("/commands/FileSaveAs", "save-as-16.png"),
-
- E_PIXMAP_END
-};
-
-static void sig_select_item (EMsgComposer *composer);
-
-static void
-signature_cb (GtkWidget *w, EMsgComposer *composer)
-{
- MailConfigSignature *old_sig;
- gboolean old_auto;
- int idx = g_list_index (GTK_MENU_SHELL (w)->children, gtk_menu_get_active (GTK_MENU (w)));
- int len = g_list_length (GTK_MENU_SHELL (w)->children);
-
- /* printf ("signature_cb: %d\n", idx); */
-
- old_sig = composer->signature;
- old_auto = composer->auto_signature;
-
- if (idx < len) {
- if (idx == 0) { /* none */
- composer->signature = NULL;
- composer->auto_signature = FALSE;
- } else if (idx == 1) { /* auto */
- composer->signature = NULL;
- composer->auto_signature = TRUE;
- } else {
- composer->signature = g_slist_nth_data (mail_config_get_signature_list (), idx - 2);
- composer->auto_signature = FALSE;
- }
- if (old_sig != composer->signature || old_auto != composer->auto_signature)
- e_msg_composer_show_sig_file (composer);
- }
- /* printf ("signature_cb end\n"); */
-}
-
-static void setup_signatures_menu (EMsgComposer *composer);
-
-static void
-sig_event_client (MailConfigSigEvent event, MailConfigSignature *sig, EMsgComposer *composer)
-{
- switch (event) {
- case MAIL_CONFIG_SIG_EVENT_DELETED:
- if (sig == composer->signature) {
- composer->signature = NULL;
- composer->auto_signature = TRUE;
- e_msg_composer_show_sig_file (composer);
- }
- setup_signatures_menu (composer);
- break;
- case MAIL_CONFIG_SIG_EVENT_ADDED:
- case MAIL_CONFIG_SIG_EVENT_NAME_CHANGED:
- setup_signatures_menu (composer);
- default:
- ;
- }
-}
-
-static void
-prepare_signatures_menu (EMsgComposer *composer)
-{
- GtkWidget *hbox;
- GtkWidget *label;
-
- hbox = e_msg_composer_hdrs_get_from_hbox (E_MSG_COMPOSER_HDRS (composer->hdrs));
-
- label = gtk_label_new (_("Signature:"));
- gtk_widget_show (label);
-
- composer->sig_omenu = gtk_option_menu_new ();
- gtk_widget_show (composer->sig_omenu);
-
- gtk_box_pack_end_defaults (GTK_BOX (hbox), composer->sig_omenu);
- gtk_box_pack_end (GTK_BOX (hbox), label, FALSE, TRUE, 0);
-}
-
-static void
-sig_select_item (EMsgComposer *composer)
-{
- int idx;
-
- if (composer->auto_signature) {
- idx = 1;
- } else if (composer->signature == NULL) {
- idx = 0;
- } else {
- idx = composer->signature->id + 2;
- }
-
- gtk_option_menu_set_history (GTK_OPTION_MENU (composer->sig_omenu), idx);
-}
-
-static void
-setup_signatures_menu (EMsgComposer *composer)
-{
- GtkWidget *menu;
- GtkWidget *mi;
- GSList *node;
-
-#define ADD(x) \
- mi = (x ? gtk_menu_item_new_with_label (x) : gtk_menu_item_new ()); \
- gtk_widget_show (mi); \
- gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi);
-
- menu = gtk_menu_new ();
- ADD (_("None"));
- ADD (_("Autogenerated"));
-
- node = mail_config_get_signature_list ();
- while (node != NULL) {
- ADD (((MailConfigSignature *) node->data)->name);
- node = node->next;
- }
-#undef ADD
-
- gtk_widget_show (menu);
- gtk_option_menu_set_menu (GTK_OPTION_MENU (composer->sig_omenu), menu);
- sig_select_item (composer);
-
- g_signal_connect (menu, "selection-done", (GCallback)signature_cb, composer);
-}
-
-static void
-setup_ui (EMsgComposer *composer)
-{
- BonoboUIContainer *container;
- const char *default_charset;
- gboolean hide_smime;
-
- container = bonobo_window_get_ui_container (BONOBO_WINDOW (composer));
-
- composer->uic = bonobo_ui_component_new_default ();
- /* FIXME: handle bonobo exceptions */
- bonobo_ui_component_set_container (composer->uic, bonobo_object_corba_objref (BONOBO_OBJECT (container)), NULL);
-
- bonobo_ui_component_add_verb_list_with_data (composer->uic, verbs, composer);
-
- bonobo_ui_component_freeze (composer->uic, NULL);
-
- bonobo_ui_util_set_ui (composer->uic, PREFIX,
- EVOLUTION_UIDIR "/evolution-message-composer.xml",
- "evolution-message-composer", NULL);
-
- 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 = composer_get_default_charset_setting ();
- e_charset_picker_bonobo_ui_populate (composer->uic, "/menu/Edit/EncodingPlaceholder",
- default_charset,
- menu_changed_charset_cb,
- composer);
-
- /* Format -> HTML */
- bonobo_ui_component_set_prop (
- composer->uic, "/commands/FormatHtml",
- "state", composer->send_html ? "1" : "0", NULL);
- bonobo_ui_component_add_listener (
- composer->uic, "FormatHtml",
- menu_format_html_cb, composer);
-
- /* View/From */
- bonobo_ui_component_set_prop (
- composer->uic, "/commands/ViewFrom",
- "state", composer->view_from ? "1" : "0", NULL);
- bonobo_ui_component_add_listener (
- composer->uic, "ViewFrom",
- menu_view_from_cb, composer);
-
- /* View/ReplyTo */
- bonobo_ui_component_set_prop (
- composer->uic, "/commands/ViewReplyTo",
- "state", composer->view_replyto ? "1" : "0", NULL);
- bonobo_ui_component_add_listener (
- composer->uic, "ViewReplyTo",
- menu_view_replyto_cb, composer);
-
- /* View/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);
-
- /* 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);
-
- /* 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);
-
- mail_config_signature_register_client ((MailConfigSignatureClient) sig_event_client, composer);
-
- bonobo_ui_component_thaw (composer->uic, NULL);
-
- /* Create the UIComponent for the non-control entries */
-
- composer->entry_uic = bonobo_ui_component_new_default ();
-}
-
-
-/* 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);
-
- gtk_window_set_title (GTK_WINDOW (composer), subject[0] ? subject : _("Compose a message"));
-}
-
-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);
-}
-
-enum {
- UPDATE_AUTO_CC,
- UPDATE_AUTO_BCC,
-};
-
-static void
-update_auto_recipients (EMsgComposerHdrs *hdrs, int mode, const char *auto_addrs)
-{
- EABDestination *dest, **destv = NULL;
- CamelInternetAddress *iaddr;
- GList *list, *tail, *node;
- int i, n = 0;
-
- tail = list = NULL;
-
- if (auto_addrs) {
- iaddr = camel_internet_address_new ();
- if (camel_address_decode (CAMEL_ADDRESS (iaddr), auto_addrs) != -1) {
- for (i = 0; i < camel_address_length (CAMEL_ADDRESS (iaddr)); i++) {
- const char *name, *addr;
-
- if (!camel_internet_address_get (iaddr, i, &name, &addr))
- continue;
-
- dest = eab_destination_new ();
- eab_destination_set_auto_recipient (dest, TRUE);
-
- if (name)
- eab_destination_set_name (dest, name);
-
- if (addr)
- eab_destination_set_email (dest, addr);
-
- node = g_list_alloc ();
- node->data = dest;
- node->next = NULL;
-
- if (tail) {
- node->prev = tail;
- tail->next = node;
- } else {
- node->prev = NULL;
- list = node;
- }
-
- tail = node;
- n++;
- }
- }
-
- camel_object_unref (iaddr);
- }
-
- switch (mode) {
- case UPDATE_AUTO_CC:
- destv = e_msg_composer_hdrs_get_cc (hdrs);
- break;
- case UPDATE_AUTO_BCC:
- destv = e_msg_composer_hdrs_get_bcc (hdrs);
- break;
- default:
- g_assert_not_reached ();
- }
-
- if (destv) {
- for (i = 0; destv[i]; i++) {
- if (!eab_destination_is_auto_recipient (destv[i])) {
- node = g_list_alloc ();
- node->data = eab_destination_copy (destv[i]);
- node->next = NULL;
-
- if (tail) {
- node->prev = tail;
- tail->next = node;
- } else {
- node->prev = NULL;
- list = node;
- }
-
- tail = node;
- n++;
- }
- }
-
- eab_destination_freev (destv);
- }
-
- destv = eab_destination_list_to_vector_sized (list, n);
- g_list_free (list);
-
- switch (mode) {
- case UPDATE_AUTO_CC:
- e_msg_composer_hdrs_set_cc (hdrs, destv);
- break;
- case UPDATE_AUTO_BCC:
- e_msg_composer_hdrs_set_bcc (hdrs, destv);
- break;
- default:
- g_assert_not_reached ();
- }
-
- eab_destination_freev (destv);
-}
-
-static void
-from_changed_cb (EMsgComposerHdrs *hdrs, void *data)
-{
- EMsgComposer *composer;
-
- composer = E_MSG_COMPOSER (data);
-
- if (hdrs->account) {
- EAccount *account = hdrs->account;
-
- e_msg_composer_set_pgp_sign (composer,
- account->pgp_always_sign &&
- (!account->pgp_no_imip_sign || !composer->mime_type ||
- strncasecmp (composer->mime_type, "text/calendar", 13) != 0));
- e_msg_composer_set_smime_sign (composer, account->smime_sign_default);
- e_msg_composer_set_smime_encrypt (composer, account->smime_encrypt_default);
- update_auto_recipients (hdrs, UPDATE_AUTO_CC, account->always_cc ? account->cc_addrs : NULL);
- update_auto_recipients (hdrs, UPDATE_AUTO_BCC, account->always_bcc ? account->bcc_addrs : NULL);
- } else {
- update_auto_recipients (hdrs, UPDATE_AUTO_CC, NULL);
- update_auto_recipients (hdrs, UPDATE_AUTO_BCC, NULL);
- }
-
- set_editor_signature (composer);
- e_msg_composer_show_sig_file (composer);
-}
-
-
-/* GObject methods. */
-
-static void
-composer_finalise (GObject *object)
-{
- EMsgComposer *composer;
-
- composer = E_MSG_COMPOSER (object);
-
- 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_hash_table_destroy (composer->inline_images_by_url);
-
- g_free (composer->charset);
- g_free (composer->mime_type);
- g_free (composer->mime_body);
-
- if (composer->redirect)
- camel_object_unref (composer->redirect);
-
- if (G_OBJECT_CLASS (parent_class)->finalize != NULL)
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
-}
-
-static void
-composer_dispose(GObject *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 (G_OBJECT_CLASS (parent_class)->dispose != NULL)
- (* G_OBJECT_CLASS (parent_class)->dispose) (object);
-}
-
-/* GtkObject methods */
-static void
-destroy (GtkObject *object)
-{
- EMsgComposer *composer;
- CORBA_Environment ev;
-
- composer = E_MSG_COMPOSER (object);
-
- CORBA_exception_init (&ev);
-
- if (composer->uic) {
- bonobo_object_unref (BONOBO_OBJECT (composer->uic));
- composer->uic = NULL;
- }
-
- if (composer->entry_uic) {
- bonobo_object_unref (BONOBO_OBJECT (composer->entry_uic));
- composer->entry_uic = NULL;
- }
-
- /* FIXME? I assume the Bonobo widget will get destroyed
- normally? */
- if (composer->address_dialog != NULL) {
- gtk_widget_destroy (composer->address_dialog);
- composer->address_dialog = NULL;
- }
- if (composer->hdrs != NULL) {
- gtk_widget_destroy (composer->hdrs);
- composer->hdrs = NULL;
- }
-
- if (composer->notify_id) {
- GConfClient *gconf = gconf_client_get_default ();
- gconf_client_notify_remove (gconf, composer->notify_id);
- composer->notify_id = 0;
- g_object_unref (gconf);
- }
-
- if (composer->persist_stream_interface != CORBA_OBJECT_NIL) {
- Bonobo_Unknown_unref (composer->persist_stream_interface, &ev);
- CORBA_Object_release (composer->persist_stream_interface, &ev);
- composer->persist_stream_interface = CORBA_OBJECT_NIL;
- }
-
- if (composer->persist_file_interface != CORBA_OBJECT_NIL) {
- Bonobo_Unknown_unref (composer->persist_file_interface, &ev);
- CORBA_Object_release (composer->persist_file_interface, &ev);
- composer->persist_file_interface = CORBA_OBJECT_NIL;
- }
-
- if (composer->editor_engine != CORBA_OBJECT_NIL) {
- Bonobo_Unknown_unref (composer->editor_engine, &ev);
- CORBA_Object_release (composer->editor_engine, &ev);
- composer->editor_engine = CORBA_OBJECT_NIL;
- }
-
- CORBA_exception_free (&ev);
-
- if (composer->editor_listener) {
- bonobo_object_unref (composer->editor_listener);
- composer->editor_listener = NULL;
- }
-
- mail_config_signature_unregister_client ((MailConfigSignatureClient) sig_event_client, composer);
-
- 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;
-
- 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) == CAMEL_MIME_PARSER_STATE_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 (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 (message);
- camel_object_unref (part);
-
- /* skip over the FROM_END state */
- camel_mime_parser_step (mp, 0, 0);
- }
-
- camel_object_unref (mp);
-}
-
-static void
-drag_data_received (EMsgComposer *composer, GdkDragContext *context,
- int x, int y, GtkSelectionData *selection,
- guint info, guint time)
-{
- char *tmp, *str, **urls;
- CamelMimePart *mime_part;
- CamelStream *stream;
- CamelURL *url;
- int i;
-
- switch (info) {
- case DND_TYPE_MESSAGE_RFC822:
- d(printf ("dropping a message/rfc822\n"));
- /* 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 (stream);
- break;
- case DND_TYPE_TEXT_URI_LIST:
- case DND_TYPE_NETSCAPE_URL:
- d(printf ("dropping a text/uri-list\n"));
- tmp = g_strndup (selection->data, selection->length);
- urls = g_strsplit (tmp, "\n", 0);
- g_free (tmp);
-
- for (i = 0; urls[i] != NULL; i++) {
- str = g_strstrip (urls[i]);
-
- if (!strncasecmp (str, "mailto:", 7)) {
- handle_mailto (composer, str);
- g_free (str);
- } else {
- url = camel_url_new (str, NULL);
- g_free (str);
-
- if (url == NULL)
- continue;
-
- if (!strcasecmp (url->protocol, "file"))
- e_msg_composer_attachment_bar_attach
- (E_MSG_COMPOSER_ATTACHMENT_BAR (composer->attachment_bar),
- url->path);
-
- camel_url_free (url);
- }
- }
-
- g_free (urls);
- break;
- case DND_TYPE_TEXT_VCARD:
- d(printf ("dropping a text/x-vcard\n"));
- mime_part = camel_mime_part_new ();
- camel_mime_part_set_content (mime_part, selection->data,
- selection->length, "text/x-vcard");
- camel_mime_part_set_disposition (mime_part, "inline");
-
- e_msg_composer_attachment_bar_attach_mime_part
- (E_MSG_COMPOSER_ATTACHMENT_BAR (composer->attachment_bar),
- mime_part);
-
- camel_object_unref (mime_part);
- default:
- d(printf ("dropping an unknown\n"));
- break;
- }
-}
-
-static void
-class_init (EMsgComposerClass *klass)
-{
- GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
- GObjectClass *gobject_class;
-
- gobject_class = G_OBJECT_CLASS(klass);
- object_class = GTK_OBJECT_CLASS (klass);
- widget_class = GTK_WIDGET_CLASS (klass);
-
- gobject_class->finalize = composer_finalise;
- gobject_class->dispose = composer_dispose;
- object_class->destroy = destroy;
- widget_class->delete_event = delete_event;
-
- parent_class = g_type_class_ref(bonobo_window_get_type ());
-
- signals[SEND] =
- g_signal_new ("send",
- E_TYPE_MSG_COMPOSER,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EMsgComposerClass, send),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-
- signals[SAVE_DRAFT] =
- g_signal_new ("save-draft",
- E_TYPE_MSG_COMPOSER,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EMsgComposerClass, save_draft),
- NULL, NULL,
- g_cclosure_marshal_VOID__BOOLEAN,
- G_TYPE_NONE,
- 1, G_TYPE_BOOLEAN);
-}
-
-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->focused_entry = NULL;
-
- composer->editor = NULL;
-
- composer->address_dialog = NULL;
-
- composer->attachment_bar = NULL;
- composer->attachment_scrolled_window = 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->inline_images_by_url = g_hash_table_new (g_str_hash, g_str_equal);
- composer->current_images = NULL;
-
- 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->autosaved = FALSE;
-
- composer->redirect = FALSE;
-
- composer->charset = NULL;
-
- composer->enable_autosave = TRUE;
- composer->autosave_file = NULL;
- composer->autosave_fd = -1;
-}
-
-
-GtkType
-e_msg_composer_get_type (void)
-{
- static GType type = 0;
-
- if (type == 0) {
- static const GTypeInfo info = {
- sizeof (EMsgComposerClass),
- NULL, NULL,
- (GClassInitFunc) class_init,
- NULL, NULL,
- sizeof (EMsgComposer),
- 0,
- (GInstanceInitFunc) init,
- };
-
- type = g_type_register_static (bonobo_window_get_type (), "EMsgComposer", &info, 0);
- }
-
- return type;
-}
-
-static void
-e_msg_composer_load_config (EMsgComposer *composer)
-{
- GConfClient *gconf;
-
- gconf = gconf_client_get_default ();
-
- composer->view_from = gconf_client_get_bool (
- gconf, "/apps/evolution/mail/composer/view/From", NULL);
- composer->view_replyto = gconf_client_get_bool (
- gconf, "/apps/evolution/mail/composer/view/ReplyTo", NULL);
- composer->view_cc = gconf_client_get_bool (
- gconf, "/apps/evolution/mail/composer/view/Cc", NULL);
- composer->view_bcc = gconf_client_get_bool (
- gconf, "/apps/evolution/mail/composer/view/Bcc", NULL);
- composer->view_subject = gconf_client_get_bool (
- gconf, "/apps/evolution/mail/composer/view/Subject", NULL);
-
- g_object_unref (gconf);
-}
-
-static int
-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 *widget;
- BonoboControlFrame *cf;
- Bonobo_PropertyBag pb = CORBA_OBJECT_NIL;
- CORBA_Environment ev;
- const char *subject;
- char *text;
-
- /* If the 'To:' field is empty, focus it (This is ridiculously complicated) */
-
- widget = e_msg_composer_hdrs_get_to_entry (E_MSG_COMPOSER_HDRS (composer->hdrs));
- cf = bonobo_widget_get_control_frame (BONOBO_WIDGET (widget));
- pb = bonobo_control_frame_get_control_property_bag (cf, NULL);
- text = bonobo_pbclient_get_string (pb, "text", NULL);
- bonobo_object_release_unref (pb, NULL);
-
- if (!text || text[0] == '\0') {
- bonobo_control_frame_control_activate (cf);
-
- g_free (text);
- return;
- }
- g_free (text);
-
- /* If not, check the subject field */
-
- subject = e_msg_composer_hdrs_get_subject (E_MSG_COMPOSER_HDRS (composer->hdrs));
-
- if (!subject || subject[0] == '\0') {
- widget = e_msg_composer_hdrs_get_subject_entry (E_MSG_COMPOSER_HDRS (composer->hdrs));
- gtk_widget_grab_focus (widget);
- return;
- }
-
- /* 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);
-}
-
-static void
-msg_composer_destroy_notify (void *data)
-{
- EMsgComposer *composer = E_MSG_COMPOSER (data);
-
- all_composers = g_slist_remove (all_composers, composer);
-}
-
-static int
-composer_key_pressed (GtkWidget *widget, GdkEventKey *event, gpointer user_data)
-{
- if (event->keyval == GDK_Escape) {
- do_exit (E_MSG_COMPOSER (widget));
-
- g_signal_stop_emission_by_name (widget, "key-press-event");
- return TRUE; /* Handled. */
- }
-
- return FALSE; /* Not handled. */
-}
-
-/* Verbs for non-control entries */
-static BonoboUIVerb entry_verbs [] = {
- BONOBO_UI_VERB ("EditCut", menu_edit_cut_cb),
- BONOBO_UI_VERB ("EditCopy", menu_edit_copy_cb),
- BONOBO_UI_VERB ("EditPaste", menu_edit_paste_cb),
- BONOBO_UI_VERB ("EditSelectAll", menu_edit_select_all_cb),
- BONOBO_UI_VERB_END
-};
-
-/* All this snot is so that Cut/Copy/Paste work. */
-static gboolean
-composer_entry_focus_in_event_cb (GtkWidget *widget, GdkEventFocus *event, gpointer user_data)
-{
- EMsgComposer *composer = user_data;
- BonoboUIContainer *container;
-
- composer->focused_entry = widget;
-
- container = bonobo_window_get_ui_container (BONOBO_WINDOW (composer));
- bonobo_ui_component_set_container (composer->entry_uic, bonobo_object_corba_objref (BONOBO_OBJECT (container)), NULL);
-
- bonobo_ui_component_add_verb_list_with_data (composer->entry_uic, entry_verbs, composer);
-
- bonobo_ui_component_freeze (composer->entry_uic, NULL);
-
- bonobo_ui_util_set_ui (composer->entry_uic, PREFIX,
- EVOLUTION_UIDIR "/evolution-composer-entries.xml",
- "evolution-composer-entries", NULL);
-
- bonobo_ui_component_thaw (composer->entry_uic, NULL);
-
- return FALSE;
-}
-
-static gboolean
-composer_entry_focus_out_event_cb (GtkWidget *widget, GdkEventFocus *event, gpointer user_data)
-{
- EMsgComposer *composer = user_data;
-
- g_assert (composer->focused_entry == widget);
- composer->focused_entry = NULL;
-
- bonobo_ui_component_unset_container (composer->entry_uic, NULL);
-
- return FALSE;
-}
-
-static void
-setup_cut_copy_paste (EMsgComposer *composer)
-{
- EMsgComposerHdrs *hdrs;
- GtkWidget *entry;
-
- hdrs = (EMsgComposerHdrs *) composer->hdrs;
-
- entry = e_msg_composer_hdrs_get_subject_entry (hdrs);
- g_signal_connect (entry, "focus_in_event", G_CALLBACK (composer_entry_focus_in_event_cb), composer);
- g_signal_connect (entry, "focus_out_event", G_CALLBACK (composer_entry_focus_out_event_cb), composer);
-
- entry = e_msg_composer_hdrs_get_reply_to_entry (hdrs);
- g_signal_connect (entry, "focus_in_event", G_CALLBACK (composer_entry_focus_in_event_cb), composer);
- g_signal_connect (entry, "focus_out_event", G_CALLBACK (composer_entry_focus_out_event_cb), composer);
-}
-
-static void
-composer_settings_update (GConfClient *gconf, guint cnxn_id, GConfEntry *entry, gpointer data)
-{
- gboolean bool;
- EMsgComposer *composer = data;
-
- bool = gconf_client_get_bool (gconf, "/apps/evolution/mail/composer/magic_smileys", NULL);
- bonobo_widget_set_property (BONOBO_WIDGET (composer->editor),
- "MagicSmileys", TC_CORBA_boolean, bool,
- NULL);
-
- bool = gconf_client_get_bool (gconf, "/apps/evolution/mail/composer/magic_links", NULL);
- bonobo_widget_set_property (BONOBO_WIDGET (composer->editor),
- "MagicLinks", TC_CORBA_boolean, bool,
- NULL);
-
- bool = gconf_client_get_bool (gconf, "/apps/evolution/mail/composer/inline_spelling", NULL);
- bonobo_widget_set_property (BONOBO_WIDGET (composer->editor),
- "InlineSpelling", TC_CORBA_boolean, bool,
- NULL);
-}
-
-static EMsgComposer *
-create_composer (int visible_mask)
-{
- EMsgComposer *composer;
- GtkWidget *vbox;
- Bonobo_Unknown editor_server;
- CORBA_Environment ev;
- GConfClient *gconf;
- int vis;
- BonoboControlFrame *control_frame;
-
- composer = g_object_new (E_TYPE_MSG_COMPOSER, "win_name", _("Compose a message"), NULL);
- gtk_window_set_title ((GtkWindow *) composer, _("Compose a message"));
-
- all_composers = g_slist_prepend (all_composers, composer);
-
- g_signal_connect (composer, "key-press-event",
- G_CALLBACK (composer_key_pressed),
- NULL);
- g_signal_connect (composer, "destroy",
- G_CALLBACK (msg_composer_destroy_notify),
- NULL);
-
- gtk_window_set_default_size (GTK_WINDOW (composer),
- DEFAULT_WIDTH, DEFAULT_HEIGHT);
- gnome_window_icon_set_from_file (GTK_WINDOW (composer), EVOLUTION_IMAGESDIR
- "/compose-message.png");
-
- /* DND support */
- gtk_drag_dest_set (GTK_WIDGET (composer), GTK_DEST_DEFAULT_ALL,
- drop_types, num_drop_types, GDK_ACTION_COPY);
- g_signal_connect (composer, "drag_data_received",
- G_CALLBACK (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 (composer->uic, visible_mask, vis);
- if (!composer->hdrs) {
- e_activation_failure_dialog (GTK_WINDOW (composer),
- _("Could not create composer window:\n"
- "Unable to activate address selector control."),
- SELECT_NAMES_OAFIID,
- "IDL:Bonobo/Control:1.0");
- gtk_object_destroy (GTK_OBJECT (composer));
- return NULL;
- }
-
- gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
- gtk_box_set_spacing (GTK_BOX (vbox), 6);
- gtk_box_pack_start (GTK_BOX (vbox), composer->hdrs, FALSE, FALSE, 0);
- g_signal_connect (composer->hdrs, "subject_changed",
- G_CALLBACK (subject_changed_cb), composer);
- g_signal_connect (composer->hdrs, "hdrs_changed",
- G_CALLBACK (hdrs_changed_cb), composer);
- g_signal_connect (composer->hdrs, "from_changed",
- G_CALLBACK (from_changed_cb), composer);
- gtk_widget_show (composer->hdrs);
-
- prepare_signatures_menu (composer);
- setup_signatures_menu (composer);
-
- from_changed_cb(composer->hdrs, composer);
-
- /* Editor component. */
- composer->editor = bonobo_widget_new_control (
- GNOME_GTKHTML_EDITOR_CONTROL_ID,
- bonobo_ui_component_get_container (composer->uic));
- if (!composer->editor) {
- e_activation_failure_dialog (GTK_WINDOW (composer),
- _("Could not create composer window:\n"
- "Unable to activate HTML editor component.\n"
- "Please make sure you have the correct version\n"
- "of gtkhtml and libgtkhtml installed.\n"),
- GNOME_GTKHTML_EDITOR_CONTROL_ID,
- "IDL:Bonobo/Control:1.0");
- gtk_object_destroy (GTK_OBJECT (composer));
- return NULL;
- }
-
- control_frame = bonobo_widget_get_control_frame (BONOBO_WIDGET (composer->editor));
- bonobo_control_frame_set_autoactivate (control_frame, TRUE);
-
- /* let the editor know which mode we are in */
- bonobo_widget_set_property (BONOBO_WIDGET (composer->editor),
- "FormatHTML", TC_CORBA_boolean, composer->send_html,
- NULL);
-
- gconf = gconf_client_get_default ();
- composer_settings_update (gconf, 0, NULL, composer);
- gconf_client_add_dir (gconf, "/apps/evolution/mail/composer", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
- composer->notify_id = gconf_client_notify_add (gconf, "/apps/evolution/mail/composer",
- composer_settings_update, composer, NULL, NULL);
- g_object_unref (gconf);
-
- editor_server = bonobo_widget_get_objref (BONOBO_WIDGET (composer->editor));
-
- /* FIXME: handle exceptions */
- CORBA_exception_init (&ev);
- composer->persist_file_interface
- = Bonobo_Unknown_queryInterface (editor_server, "IDL:Bonobo/PersistFile:1.0", &ev);
- composer->persist_stream_interface
- = Bonobo_Unknown_queryInterface (editor_server, "IDL:Bonobo/PersistStream:1.0", &ev);
- CORBA_exception_free (&ev);
-
- 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_scrolled_window = gtk_scrolled_window_new (NULL, NULL);
- gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (composer->attachment_scrolled_window),
- GTK_SHADOW_IN);
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (composer->attachment_scrolled_window),
- GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-
- composer->attachment_bar = e_msg_composer_attachment_bar_new (NULL);
- GTK_WIDGET_SET_FLAGS (composer->attachment_bar, GTK_CAN_FOCUS);
- gtk_container_add (GTK_CONTAINER (composer->attachment_scrolled_window),
- composer->attachment_bar);
- gtk_box_pack_start (GTK_BOX (vbox),
- composer->attachment_scrolled_window,
- FALSE, FALSE, GNOME_PAD_SMALL);
-
- g_signal_connect (composer->attachment_bar, "changed",
- G_CALLBACK (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);
- if (composer->editor_engine == CORBA_OBJECT_NIL) {
- e_activation_failure_dialog (GTK_WINDOW (composer),
- _("Could not create composer window:\n"
- "Unable to activate HTML editor component."),
- GNOME_GTKHTML_EDITOR_CONTROL_ID,
- "IDL:GNOME/GtkHTML/Editor/Engine:1.0");
- gtk_object_destroy (GTK_OBJECT (composer));
- return NULL;
- }
-
- setup_cut_copy_paste (composer);
-
- g_signal_connect (composer, "map", (GCallback) map_default_cb, NULL);
-
- if (am == NULL)
- am = autosave_manager_new ();
-
- autosave_manager_register (am, composer);
-
- return composer;
-}
-
-static void
-set_editor_signature (EMsgComposer *composer)
-{
- EAccountIdentity *id;
- GSList *signatures;
-
- /* printf ("set_editor_signature\n"); */
- id = E_MSG_COMPOSER_HDRS (composer->hdrs)->account->id;
-
- signatures = mail_config_get_signature_list ();
-
- composer->signature = g_slist_nth_data (signatures, id->def_signature);
- composer->auto_signature = id->auto_signature;
-
- /* printf ("auto: %d\n", id->auto_signature); */
-
- sig_select_item (composer);
-
- /* printf ("set_editor_signature end\n"); */
-}
-
-
-/**
- * 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)
-{
- gboolean send_html;
- GConfClient *gconf;
- EMsgComposer *new;
-
- gconf = gconf_client_get_default ();
- send_html = gconf_client_get_bool (gconf, "/apps/evolution/mail/composer/send_html", NULL);
- g_object_unref (gconf);
-
- new = create_composer (E_MSG_COMPOSER_VISIBLE_MASK_MAIL);
- if (new) {
- e_msg_composer_set_send_html (new, send_html);
- set_editor_text (new, "");
- set_editor_signature (new);
- }
-
- return new;
-}
-
-/**
- * e_msg_composer_new_post:
- *
- * Create a new message composer widget.
- *
- * Return value: A pointer to the newly created widget
- **/
-EMsgComposer *
-e_msg_composer_new_post (void)
-{
- gboolean send_html;
- GConfClient *gconf;
- EMsgComposer *new;
-
- gconf = gconf_client_get_default ();
- send_html = gconf_client_get_bool (gconf, "/apps/evolution/mail/composer/send_html", NULL);
- g_object_unref (gconf);
-
- new = create_composer (E_MSG_COMPOSER_VISIBLE_MASK_POST);
- if (new) {
- e_msg_composer_set_send_html (new, send_html);
- set_editor_text (new, "");
- set_editor_signature (new);
- }
-
- return new;
-}
-
-
-static gboolean
-is_special_header (const char *hdr_name)
-{
- /* Note: a header is a "special header" if it has any meaning:
- 1. it's not a X-* header or
- 2. it's an X-Evolution* header
- */
- if (strncasecmp (hdr_name, "X-", 2))
- return TRUE;
-
- if (!strncasecmp (hdr_name, "X-Evolution", 11))
- return TRUE;
-
- /* we can keep all other X-* headers */
-
- return FALSE;
-}
-
-static void
-e_msg_composer_set_pending_body (EMsgComposer *composer, char *text)
-{
- char *old;
-
- old = g_object_get_data ((GObject *) composer, "body:text");
- g_free (old);
- g_object_set_data ((GObject *) composer, "body:text", text);
-}
-
-static void
-e_msg_composer_flush_pending_body (EMsgComposer *composer, gboolean apply)
-{
- char *body;
-
- body = g_object_get_data ((GObject *) composer, "body:text");
- if (body) {
- if (apply)
- set_editor_text (composer, body);
-
- g_object_set_data ((GObject *) composer, "body:text", NULL);
- g_free (body);
- }
-}
-
-static void
-add_attachments_handle_mime_part (EMsgComposer *composer, CamelMimePart *mime_part,
- gboolean just_inlines, gboolean related, int depth)
-{
- CamelContentType *content_type;
- CamelDataWrapper *wrapper;
-
- content_type = camel_mime_part_get_content_type (mime_part);
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
-
- if (CAMEL_IS_MULTIPART (wrapper)) {
- /* another layer of multipartness... */
- add_attachments_from_multipart (composer, (CamelMultipart *) wrapper, just_inlines, depth + 1);
- } else if (just_inlines) {
- if (camel_mime_part_get_content_id (mime_part) ||
- camel_mime_part_get_content_location (mime_part))
- e_msg_composer_add_inline_image_from_mime_part (composer, mime_part);
- } else if (CAMEL_IS_MIME_MESSAGE (wrapper)) {
- /* do nothing */
- } else if (related && camel_content_type_is (content_type, "image", "*")) {
- e_msg_composer_add_inline_image_from_mime_part (composer, mime_part);
- } else {
- if (camel_content_type_is (content_type, "text", "*")) {
- /* do nothing */
- } else {
- e_msg_composer_attach (composer, mime_part);
- }
- }
-}
-
-static void
-add_attachments_from_multipart (EMsgComposer *composer, CamelMultipart *multipart,
- gboolean just_inlines, int depth)
-{
- /* find appropriate message attachments to add to the composer */
- CamelMimePart *mime_part;
- gboolean related;
- int i, nparts;
-
- related = camel_content_type_is (CAMEL_DATA_WRAPPER (multipart)->mime_type, "multipart", "related");
-
- if (CAMEL_IS_MULTIPART_SIGNED (multipart)) {
- mime_part = camel_multipart_get_part (multipart, CAMEL_MULTIPART_SIGNED_CONTENT);
- add_attachments_handle_mime_part (composer, mime_part, just_inlines, related, depth);
- } else if (CAMEL_IS_MULTIPART_ENCRYPTED (multipart)) {
- /* what should we do in this case? */
- } else {
- nparts = camel_multipart_get_number (multipart);
-
- for (i = 0; i < nparts; i++) {
- mime_part = camel_multipart_get_part (multipart, i);
- add_attachments_handle_mime_part (composer, mime_part, just_inlines, related, depth);
- }
- }
-}
-
-
-/**
- * e_msg_composer_add_message_attachments:
- * @composer: the composer to add the attachments to.
- * @message: the source message to copy the attachments from.
- * @just_inlines: whether to attach all attachments or just add
- * inline images.
- *
- * Walk through all the mime parts in @message and add them to the composer
- * specified in @composer.
- */
-void
-e_msg_composer_add_message_attachments (EMsgComposer *composer, CamelMimeMessage *message,
- gboolean just_inlines)
-{
- CamelDataWrapper *wrapper;
-
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (message));
- if (!CAMEL_IS_MULTIPART (wrapper))
- return;
-
- /* there must be attachments... */
- add_attachments_from_multipart (composer, (CamelMultipart *) wrapper, just_inlines, 0);
-}
-
-
-static void
-handle_multipart_signed (EMsgComposer *composer, CamelMultipart *multipart, int depth)
-{
- CamelContentType *content_type;
- CamelDataWrapper *content;
- CamelMimePart *mime_part;
-
- /* FIXME: make sure this isn't an s/mime signed part?? */
- e_msg_composer_set_pgp_sign (composer, TRUE);
-
- mime_part = camel_multipart_get_part (multipart, CAMEL_MULTIPART_SIGNED_CONTENT);
- content_type = camel_mime_part_get_content_type (mime_part);
-
- content = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
-
- if (CAMEL_IS_MULTIPART (content)) {
- multipart = CAMEL_MULTIPART (content);
-
- /* Note: depth is preserved here because we're not
- counting multipart/signed as a multipart, instead
- we want to treat the content part as our mime part
- here. */
-
- if (CAMEL_IS_MULTIPART_SIGNED (content)) {
- /* handle the signed content and configure the composer to sign outgoing messages */
- handle_multipart_signed (composer, multipart, depth);
- } else if (CAMEL_IS_MULTIPART_ENCRYPTED (content)) {
- /* decrypt the encrypted content and configure the composer to encrypt outgoing messages */
- handle_multipart_encrypted (composer, multipart, depth);
- } else if (camel_content_type_is (content_type, "multipart", "alternative")) {
- /* this contains the text/plain and text/html versions of the message body */
- handle_multipart_alternative (composer, multipart, depth);
- } else {
- /* there must be attachments... */
- handle_multipart (composer, multipart, depth);
- }
- } else if (camel_content_type_is (content_type, "text", "*")) {
- e_msg_composer_set_pending_body (composer, em_utils_part_to_html (mime_part));
- } else {
- e_msg_composer_attach (composer, mime_part);
- }
-}
-
-static void
-handle_multipart_encrypted (EMsgComposer *composer, CamelMultipart *multipart, int depth)
-{
- CamelMultipartEncrypted *mpe = (CamelMultipartEncrypted *) multipart;
- CamelContentType *content_type;
- CamelCipherContext *cipher;
- CamelDataWrapper *content;
- CamelMimePart *mime_part;
- CamelException ex;
-
- /* FIXME: make sure this is a PGP/MIME encrypted part?? */
- e_msg_composer_set_pgp_encrypt (composer, TRUE);
-
- camel_exception_init (&ex);
- cipher = mail_crypto_get_pgp_cipher_context (NULL);
- mime_part = camel_multipart_encrypted_decrypt (mpe, cipher, &ex);
- camel_object_unref (cipher);
- camel_exception_clear (&ex);
-
- if (!mime_part)
- return;
-
- content_type = camel_mime_part_get_content_type (mime_part);
-
- content = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
-
- if (CAMEL_IS_MULTIPART (content)) {
- multipart = CAMEL_MULTIPART (content);
-
- /* Note: depth is preserved here because we're not
- counting multipart/encrypted as a multipart, instead
- we want to treat the content part as our mime part
- here. */
-
- if (CAMEL_IS_MULTIPART_SIGNED (content)) {
- /* handle the signed content and configure the composer to sign outgoing messages */
- handle_multipart_signed (composer, multipart, depth);
- } else if (CAMEL_IS_MULTIPART_ENCRYPTED (content)) {
- /* decrypt the encrypted content and configure the composer to encrypt outgoing messages */
- handle_multipart_encrypted (composer, multipart, depth);
- } else if (camel_content_type_is (content_type, "multipart", "alternative")) {
- /* this contains the text/plain and text/html versions of the message body */
- handle_multipart_alternative (composer, multipart, depth);
- } else {
- /* there must be attachments... */
- handle_multipart (composer, multipart, depth);
- }
- } else if (camel_content_type_is (content_type, "text", "*")) {
- e_msg_composer_set_pending_body (composer, em_utils_part_to_html (mime_part));
- } else {
- e_msg_composer_attach (composer, mime_part);
- }
-
- camel_object_unref (mime_part);
-}
-
-static void
-handle_multipart_alternative (EMsgComposer *composer, CamelMultipart *multipart, int depth)
-{
- /* Find the text/html part and set the composer body to it's contents */
- CamelMimePart *text_part = NULL;
- int i, nparts;
-
- nparts = camel_multipart_get_number (multipart);
-
- for (i = 0; i < nparts; i++) {
- CamelContentType *content_type;
- CamelDataWrapper *content;
- CamelMimePart *mime_part;
-
- mime_part = camel_multipart_get_part (multipart, i);
- content_type = camel_mime_part_get_content_type (mime_part);
- content = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
-
- if (CAMEL_IS_MULTIPART (content)) {
- CamelMultipart *mp;
-
- mp = CAMEL_MULTIPART (content);
-
- if (CAMEL_IS_MULTIPART_SIGNED (content)) {
- /* handle the signed content and configure the composer to sign outgoing messages */
- handle_multipart_signed (composer, mp, depth + 1);
- } else if (CAMEL_IS_MULTIPART_ENCRYPTED (content)) {
- /* decrypt the encrypted content and configure the composer to encrypt outgoing messages */
- handle_multipart_encrypted (composer, mp, depth + 1);
- } else {
- /* depth doesn't matter so long as we don't pass 0 */
- handle_multipart (composer, mp, depth + 1);
- }
- } else if (camel_content_type_is (content_type, "text", "html")) {
- /* text/html is preferable, so once we find it we're done... */
- text_part = mime_part;
- break;
- } else if (camel_content_type_is (content_type, "text", "*")) {
- /* anyt text part not text/html is second rate so the first
- text part we find isn't necessarily the one we'll use. */
- if (!text_part)
- text_part = mime_part;
- } else {
- e_msg_composer_attach (composer, mime_part);
- }
- }
-
- if (text_part)
- e_msg_composer_set_pending_body(composer, em_utils_part_to_html(text_part));
-}
-
-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;
- CamelDataWrapper *content;
- CamelMimePart *mime_part;
-
- mime_part = camel_multipart_get_part (multipart, i);
- content_type = camel_mime_part_get_content_type (mime_part);
- content = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
-
- if (CAMEL_IS_MULTIPART (content)) {
- CamelMultipart *mp;
-
- mp = CAMEL_MULTIPART (content);
-
- if (CAMEL_IS_MULTIPART_SIGNED (content)) {
- /* handle the signed content and configure the composer to sign outgoing messages */
- handle_multipart_signed (composer, mp, depth + 1);
- } else if (CAMEL_IS_MULTIPART_ENCRYPTED (content)) {
- /* decrypt the encrypted content and configure the composer to encrypt outgoing messages */
- handle_multipart_encrypted (composer, mp, depth + 1);
- } else if (camel_content_type_is (content_type, "multipart", "alternative")) {
- handle_multipart_alternative (composer, mp, depth + 1);
- } else {
- /* depth doesn't matter so long as we don't pass 0 */
- handle_multipart (composer, mp, depth + 1);
- }
- } else if (depth == 0 && i == 0) {
- /* Since the first part is not multipart/alternative, then this must be the body */
- e_msg_composer_set_pending_body(composer, em_utils_part_to_html(mime_part));
- } else if (camel_mime_part_get_content_id (mime_part) ||
- camel_mime_part_get_content_location (mime_part)) {
- /* special in-line attachment */
- e_msg_composer_add_inline_image_from_mime_part (composer, mime_part);
- } else {
- /* normal attachment */
- e_msg_composer_attach (composer, mime_part);
- }
- }
-}
-
-static void
-set_signature_gui (EMsgComposer *composer)
-{
- CORBA_Environment ev;
-
- composer->auto_signature = FALSE;
- composer->signature = NULL;
-
- CORBA_exception_init (&ev);
- if (GNOME_GtkHTML_Editor_Engine_searchByData (composer->editor_engine, 1, "ClueFlow", "signature", "1", &ev)) {
- gchar *str = NULL;
-
- str = GNOME_GtkHTML_Editor_Engine_getParagraphData (composer->editor_engine, "signature_name", &ev);
- if (ev._major == CORBA_NO_EXCEPTION && str) {
- if (!strncmp (str, "name:", 5)) {
- GSList *list = NULL;
- char *decoded_signature_name = decode_signature_name (str + 5);
-
- list = mail_config_get_signature_list ();
- if (list && decoded_signature_name)
- for (; list; list = list->next) {
- if (!strcmp (decoded_signature_name,
- ((MailConfigSignature *) list->data)->name))
- break;
- }
- if (list && decoded_signature_name)
- composer->signature = (MailConfigSignature *) list->data;
- else
- composer->auto_signature = TRUE;
- g_free (decoded_signature_name);
- } else if (!strcmp (str, "auto")) {
- composer->auto_signature = TRUE;
- }
- }
- sig_select_item (composer);
- }
- CORBA_exception_free (&ev);
-}
-
-
-static void
-auto_recip_free (gpointer key, gpointer value, gpointer user_data)
-{
- g_free (key);
-}
-
-/**
- * e_msg_composer_new_with_message:
- * @message: The message to use as the source
- *
- * Create a new message composer widget.
- *
- * Note: Designed to work only for messages constructed using Evolution.
- *
- * Return value: A pointer to the newly created widget
- **/
-EMsgComposer *
-e_msg_composer_new_with_message (CamelMimeMessage *message)
-{
- const CamelInternetAddress *to, *cc, *bcc;
- GList *To = NULL, *Cc = NULL, *Bcc = NULL;
- const char *format, *subject, *postto;
- EABDestination **Tov, **Ccv, **Bccv;
- GHashTable *auto_cc, *auto_bcc;
- CamelContentType *content_type;
- struct _camel_header_raw *headers;
- CamelDataWrapper *content;
- EAccount *account = NULL;
- char *account_name;
- EMsgComposer *new;
- XEvolution *xev;
- int len, i;
-
- postto = camel_medium_get_header (CAMEL_MEDIUM (message), "X-Evolution-PostTo");
-
- new = create_composer (postto ? E_MSG_COMPOSER_VISIBLE_MASK_POST : E_MSG_COMPOSER_VISIBLE_MASK_MAIL);
- if (!new)
- return NULL;
-
- if (postto)
- e_msg_composer_hdrs_set_post_to (E_MSG_COMPOSER_HDRS (new->hdrs), postto);
-
- /* Restore the Account preference */
- account_name = (char *) camel_medium_get_header (CAMEL_MEDIUM (message), "X-Evolution-Account");
- if (account_name) {
- account_name = g_strdup (account_name);
- g_strstrip (account_name);
-
- account = mail_config_get_account_by_name (account_name);
- }
-
- if (postto == NULL) {
- auto_cc = g_hash_table_new (camel_strcase_hash, camel_strcase_equal);
- auto_bcc = g_hash_table_new (camel_strcase_hash, camel_strcase_equal);
-
- if (account) {
- CamelInternetAddress *iaddr;
-
- /* hash our auto-recipients for this account */
- if (account->always_cc) {
- iaddr = camel_internet_address_new ();
- if (camel_address_decode (CAMEL_ADDRESS (iaddr), account->cc_addrs) != -1) {
- for (i = 0; i < camel_address_length (CAMEL_ADDRESS (iaddr)); i++) {
- const char *name, *addr;
-
- if (!camel_internet_address_get (iaddr, i, &name, &addr))
- continue;
-
- g_hash_table_insert (auto_cc, g_strdup (addr), GINT_TO_POINTER (TRUE));
- }
- }
- camel_object_unref (iaddr);
- }
-
- if (account->always_bcc) {
- iaddr = camel_internet_address_new ();
- if (camel_address_decode (CAMEL_ADDRESS (iaddr), account->bcc_addrs) != -1) {
- for (i = 0; i < camel_address_length (CAMEL_ADDRESS (iaddr)); i++) {
- const char *name, *addr;
-
- if (!camel_internet_address_get (iaddr, i, &name, &addr))
- continue;
-
- g_hash_table_insert (auto_bcc, g_strdup (addr), GINT_TO_POINTER (TRUE));
- }
- }
- camel_object_unref (iaddr);
- }
- }
-
- to = camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_TO);
- cc = camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_CC);
- bcc = camel_mime_message_get_recipients (message, 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)) {
- EABDestination *dest = eab_destination_new ();
- eab_destination_set_name (dest, name);
- eab_destination_set_email (dest, addr);
- To = g_list_append (To, dest);
- }
- }
- Tov = eab_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)) {
- EABDestination *dest = eab_destination_new ();
- eab_destination_set_name (dest, name);
- eab_destination_set_email (dest, addr);
-
- if (g_hash_table_lookup (auto_cc, addr))
- eab_destination_set_auto_recipient (dest, TRUE);
-
- Cc = g_list_append (Cc, dest);
- }
- }
-
- Ccv = eab_destination_list_to_vector (Cc);
- g_hash_table_foreach (auto_cc, auto_recip_free, NULL);
- g_hash_table_destroy (auto_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)) {
- EABDestination *dest = eab_destination_new ();
- eab_destination_set_name (dest, name);
- eab_destination_set_email (dest, addr);
-
- if (g_hash_table_lookup (auto_bcc, addr))
- eab_destination_set_auto_recipient (dest, TRUE);
-
- Bcc = g_list_append (Bcc, dest);
- }
- }
-
- Bccv = eab_destination_list_to_vector (Bcc);
- g_hash_table_foreach (auto_bcc, auto_recip_free, NULL);
- g_hash_table_destroy (auto_bcc);
- g_list_free (Bcc);
- } else {
- Tov = NULL;
- Ccv = NULL;
- Bccv = NULL;
- }
-
- subject = camel_mime_message_get_subject (message);
-
- e_msg_composer_set_headers (new, account_name, Tov, Ccv, Bccv, subject);
-
- g_free (account_name);
-
- eab_destination_freev (Tov);
- eab_destination_freev (Ccv);
- eab_destination_freev (Bccv);
-
- /* Restore the format editing preference */
- format = camel_medium_get_header (CAMEL_MEDIUM (message), "X-Evolution-Format");
- if (format) {
- while (*format && isspace ((unsigned) *format))
- format++;
-
- if (!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 (message);
- mail_tool_destroy_xevolution (xev);
-
- /* set extra headers */
- headers = CAMEL_MIME_PART (message)->headers;
- while (headers) {
- if (!is_special_header (headers->name) ||
- !strcasecmp (headers->name, "References") ||
- !strcasecmp (headers->name, "In-Reply-To")) {
- 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;
- }
-
- /* Restore the attachments and body text */
- content = camel_medium_get_content_object (CAMEL_MEDIUM (message));
- if (CAMEL_IS_MULTIPART (content)) {
- CamelMultipart *multipart;
-
- multipart = CAMEL_MULTIPART (content);
- content_type = camel_mime_part_get_content_type (CAMEL_MIME_PART (message));
-
- if (CAMEL_IS_MULTIPART_SIGNED (content)) {
- /* handle the signed content and configure the composer to sign outgoing messages */
- handle_multipart_signed (new, multipart, 0);
- } else if (CAMEL_IS_MULTIPART_ENCRYPTED (content)) {
- /* decrypt the encrypted content and configure the composer to encrypt outgoing messages */
- handle_multipart_encrypted (new, multipart, 0);
- } else if (camel_content_type_is (content_type, "multipart", "alternative")) {
- /* this contains the text/plain and text/html versions of the message body */
- handle_multipart_alternative (new, multipart, 0);
- } else {
- /* there must be attachments... */
- handle_multipart (new, multipart, 0);
- }
- } else {
- e_msg_composer_set_pending_body(new, em_utils_part_to_html((CamelMimePart *)message));
- }
-
- /* We wait until now to set the body text because we need to ensure that
- * the attachment bar has all the attachments, before we request them.
- */
- e_msg_composer_flush_pending_body (new, TRUE);
-
- set_signature_gui (new);
-
- return new;
-}
-
-static void
-disable_editor (EMsgComposer *composer)
-{
- gtk_widget_set_sensitive (composer->editor, FALSE);
- gtk_widget_set_sensitive (composer->attachment_bar, FALSE);
-
- bonobo_ui_component_set_prop (composer->uic, "/menu/Edit", "sensitive", "0", NULL);
- bonobo_ui_component_set_prop (composer->uic, "/menu/Format", "sensitive", "0", NULL);
- bonobo_ui_component_set_prop (composer->uic, "/menu/Insert", "sensitive", "0", NULL);
-}
-
-/**
- * e_msg_composer_new_redirect:
- * @message: The message to use as the source
- *
- * Create a new message composer widget.
- *
- * Return value: A pointer to the newly created widget
- **/
-EMsgComposer *
-e_msg_composer_new_redirect (CamelMimeMessage *message, const char *resent_from)
-{
- EMsgComposer *composer;
- const char *subject;
-
- g_return_val_if_fail (CAMEL_IS_MIME_MESSAGE (message), NULL);
-
- composer = e_msg_composer_new_with_message (message);
- subject = camel_mime_message_get_subject (message);
-
- composer->redirect = message;
- camel_object_ref (message);
-
- e_msg_composer_set_headers (composer, resent_from, NULL, NULL, NULL, subject);
-
- disable_editor (composer);
-
- return composer;
-}
-
-
-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)) {
- EABDestination *dest = eab_destination_new ();
- eab_destination_set_name (dest, name);
- eab_destination_set_email (dest, addr);
-
- list = g_list_append (list, dest);
- }
- }
-
- return list;
-}
-
-static void
-handle_mailto (EMsgComposer *composer, const char *mailto)
-{
- EMsgComposerHdrs *hdrs;
- GList *to = NULL, *cc = NULL, *bcc = NULL;
- EABDestination **tov, **ccv, **bccv;
- char *subject = NULL, *body = NULL;
- char *header, *content, *buf;
- size_t nread, nwritten;
- const char *p;
- int len, clen;
- CamelURL *url;
-
- buf = g_strdup (mailto);
-
- /* Parse recipients (everything after ':' until '?' or eos). */
- p = buf + 7;
- len = strcspn (p, "?");
- if (len) {
- content = g_strndup (p, len);
- camel_url_decode (content);
- 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 = (char *) p;
- header[len] = '\0';
- p += len + 1;
-
- clen = strcspn (p, "&");
-
- content = g_strndup (p, clen);
- camel_url_decode (content);
-
- if (!strcasecmp (header, "to")) {
- to = add_recipients (to, content, FALSE);
- } else if (!strcasecmp (header, "cc")) {
- cc = add_recipients (cc, content, FALSE);
- } else if (!strcasecmp (header, "bcc")) {
- bcc = add_recipients (bcc, content, FALSE);
- } else if (!strcasecmp (header, "subject")) {
- g_free (subject);
- if (g_utf8_validate (content, -1, NULL)) {
- subject = content;
- content = NULL;
- } else {
- subject = g_locale_to_utf8 (content, clen, &nread,
- &nwritten, NULL);
- if (subject) {
- subject = g_realloc (subject, nwritten + 1);
- subject[nwritten] = '\0';
- }
- }
- } else if (!strcasecmp (header, "body")) {
- g_free (body);
- if (g_utf8_validate (content, -1, NULL)) {
- body = content;
- content = NULL;
- } else {
- body = g_locale_to_utf8 (content, clen, &nread,
- &nwritten, NULL);
- if (body) {
- body = g_realloc (body, nwritten + 1);
- body[nwritten] = '\0';
- }
- }
- } else if (!strcasecmp (header, "attach")) {
- /* Change file url to absolute path */
- if (!strncasecmp (content, "file:", 5)) {
- url = camel_url_new (content, NULL);
- e_msg_composer_attachment_bar_attach (E_MSG_COMPOSER_ATTACHMENT_BAR (composer->attachment_bar),
- url->path);
- camel_url_free (url);
- } else {
- e_msg_composer_attachment_bar_attach (E_MSG_COMPOSER_ATTACHMENT_BAR (composer->attachment_bar),
- content);
- }
- } else if (!strcasecmp (header, "from")) {
- /* Ignore */
- } else if (!strcasecmp (header, "reply-to")) {
- /* ignore */
- } else {
- /* add an arbitrary header? */
- e_msg_composer_add_header (composer, header, content);
- }
-
- g_free (content);
-
- p += clen;
- if (*p == '&') {
- p++;
- if (!strcmp (p, "amp;"))
- p += 4;
- }
- }
- }
-
- g_free (buf);
-
- tov = eab_destination_list_to_vector (to);
- ccv = eab_destination_list_to_vector (cc);
- bccv = eab_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);
-
- eab_destination_freev (tov);
- eab_destination_freev (ccv);
- eab_destination_freev (bccv);
-
- if (subject) {
- e_msg_composer_hdrs_set_subject (hdrs, subject);
- g_free (subject);
- }
-
- if (body) {
- char *htmlbody;
-
- htmlbody = camel_text_to_html (body, CAMEL_MIME_FILTER_TOHTML_PRE, 0);
- set_editor_text (composer, htmlbody);
- g_free (htmlbody);
- }
-}
-
-/**
- * e_msg_composer_new_from_url:
- * @url: a mailto URL
- *
- * Create a new message composer widget, and fill in fields as
- * defined by the provided URL.
- **/
-EMsgComposer *
-e_msg_composer_new_from_url (const char *url)
-{
- EMsgComposer *composer;
-
- g_return_val_if_fail (strncasecmp (url, "mailto:", 7) == 0, NULL);
-
- composer = e_msg_composer_new ();
- if (!composer)
- return NULL;
-
- handle_mailto (composer, url);
-
- 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 (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,
- EABDestination **to,
- EABDestination **cc,
- EABDestination **bcc,
- const char *subject)
-{
- EMsgComposerHdrs *hdrs;
-
- g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
- hdrs = E_MSG_COMPOSER_HDRS (composer->hdrs);
-
- e_msg_composer_hdrs_set_to (hdrs, to);
- e_msg_composer_hdrs_set_cc (hdrs, cc);
- e_msg_composer_hdrs_set_bcc (hdrs, bcc);
- e_msg_composer_hdrs_set_subject (hdrs, subject);
- e_msg_composer_hdrs_set_from_account (hdrs, from);
-}
-
-
-/**
- * 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);
-
- /* set editor text unfortunately kills the signature so we
- have to re-show it */
- e_msg_composer_show_sig_file (composer);
-}
-
-
-/**
- * e_msg_composer_set_body:
- * @composer: a composer object
- * @body: the data to initialize the composer with
- * @mime_type: the MIME type of data
- *
- * Loads the given data into the composer as the message body.
- * This function should only be used by the CORBA composer factory.
- **/
-void
-e_msg_composer_set_body (EMsgComposer *composer, const char *body,
- const char *mime_type)
-{
- g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
- set_editor_text (composer, _("<b>(The composer contains a non-text "
- "message body, which cannot be "
- "edited.)<b>"));
- e_msg_composer_set_send_html (composer, FALSE);
- disable_editor (composer);
-
- g_free (composer->mime_body);
- composer->mime_body = g_strdup (body);
- g_free (composer->mime_type);
- composer->mime_type = g_strdup (mime_type);
-
- if (g_ascii_strncasecmp (composer->mime_type, "text/calendar", 13) == 0) {
- EMsgComposerHdrs *hdrs = E_MSG_COMPOSER_HDRS (composer->hdrs);
- if (hdrs->account && hdrs->account->pgp_no_imip_sign)
- e_msg_composer_set_pgp_sign (composer, FALSE);
- }
-}
-
-
-/**
- * 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_add_inline_image_from_file:
- * @composer: a composer object
- * @file_name: the name of the file containing the image
- *
- * This reads in the image in @file_name and adds it to @composer
- * as an inline image, to be wrapped in a multipart/related.
- *
- * Return value: the newly-created CamelMimePart (which must be reffed
- * if the caller wants to keep its own reference), or %NULL on error.
- **/
-CamelMimePart *
-e_msg_composer_add_inline_image_from_file (EMsgComposer *composer,
- const char *file_name)
-{
- char *mime_type, *cid, *url, *name;
- 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 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);
- 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 (wrapper);
-
- cid = camel_header_msgid_generate ();
- camel_mime_part_set_content_id (part, cid);
- name = g_path_get_basename(file_name);
- camel_mime_part_set_filename (part, name);
- g_free(name);
- camel_mime_part_set_encoding (part, CAMEL_TRANSFER_ENCODING_BASE64);
-
- url = g_strdup_printf ("file:%s", file_name);
- g_hash_table_insert (composer->inline_images_by_url, url, part);
-
- url = g_strdup_printf ("cid:%s", cid);
- g_hash_table_insert (composer->inline_images, url, part);
- g_free (cid);
-
- return part;
-}
-
-
-/**
- * e_msg_composer_add_inline_image_from_mime_part:
- * @composer: a composer object
- * @part: a CamelMimePart containing image data
- *
- * This adds the mime part @part to @composer as an inline image, to
- * be wrapped in a multipart/related.
- **/
-void
-e_msg_composer_add_inline_image_from_mime_part (EMsgComposer *composer,
- CamelMimePart *part)
-{
- char *url;
- const char *location, *cid;
-
- cid = camel_mime_part_get_content_id (part);
- if (!cid) {
- camel_mime_part_set_content_id (part, NULL);
- cid = camel_mime_part_get_content_id (part);
- }
-
- url = g_strdup_printf ("cid:%s", cid);
- g_hash_table_insert (composer->inline_images, url, part);
- camel_object_ref (part);
-
- location = camel_mime_part_get_content_location (part);
- if (location) {
- g_hash_table_insert (composer->inline_images_by_url,
- g_strdup (location), part);
- }
-}
-
-
-/**
- * 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, gboolean save_html_object_data)
-{
- g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), NULL);
-
- return build_message (composer, save_html_object_data);
-}
-
-
-CamelMimeMessage *
-e_msg_composer_get_message_draft (EMsgComposer *composer)
-{
- CamelMimeMessage *msg;
- EAccount *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, TRUE);
-
- 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);
-
- /* build_message() set this to text/html since we set composer->send_html to
- TRUE before calling e_msg_composer_get_message() */
- if (!composer->send_html)
- camel_medium_set_header (CAMEL_MEDIUM (msg), "X-Evolution-Format", "text/plain");
-
- 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);
- GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "delete-back", &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;
- char *html;
-
- g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
- /* printf ("e_msg_composer_show_sig_file\n"); */
- /* 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_undoBegin (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);
- if (!GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "cursor-backward", &ev))
- GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "insert-paragraph", &ev);
- else
- GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "cursor-forward", &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_undoEnd (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;
-
- /* printf ("e_msg_composer_show_sig_file end\n"); */
-}
-
-
-/**
- * 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 (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);
- CORBA_exception_free (&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", TC_CORBA_boolean,
- composer->send_html, NULL);
-
- CORBA_exception_init (&ev);
- 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 (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).
- */
-EAccount *
-e_msg_composer_get_preferred_account (EMsgComposer *composer)
-{
- EMsgComposerHdrs *hdrs;
-
- 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 (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 (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 (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 (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 (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 (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 (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 (E_IS_MSG_COMPOSER (composer), FALSE);
-
- return composer->smime_encrypt;
-}
-
-
-/**
- * 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 (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_from (EMsgComposer *composer, gboolean view_from)
-{
- GConfClient *gconf;
-
- 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);
-
- gconf = gconf_client_get_default ();
- gconf_client_set_bool (gconf, "/apps/evolution/mail/composer/view/From", view_from, NULL);
- g_object_unref (gconf);
-
- e_msg_composer_hdrs_set_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 (E_IS_MSG_COMPOSER (composer), FALSE);
-
- return composer->view_replyto;
-}
-
-
-/**
- * e_msg_composer_set_view_replyto:
- * @composer: A message composer widget
- * @state: whether to show or hide the Reply-To selector
- *
- * Controls the state of the Reply-To selector
- */
-void
-e_msg_composer_set_view_replyto (EMsgComposer *composer, gboolean view_replyto)
-{
- GConfClient *gconf;
-
- 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);
-
- gconf = gconf_client_get_default ();
- gconf_client_set_bool (gconf, "/apps/evolution/mail/composer/view/ReplyTo", view_replyto, NULL);
- g_object_unref (gconf);
-
- e_msg_composer_hdrs_set_visible (E_MSG_COMPOSER_HDRS (composer->hdrs),
- e_msg_composer_get_visible_flags (composer));
-}
-
-
-/**
- * e_msg_composer_get_view_cc:
- * @composer: A message composer widget
- *
- * Get the status of the "View CC header" flag.
- *
- * Return value: The status of the "View CC header" flag.
- **/
-gboolean
-e_msg_composer_get_view_cc (EMsgComposer *composer)
-{
- g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), FALSE);
-
- return composer->view_cc;
-}
-
-
-/**
- * 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)
-{
- GConfClient *gconf;
-
- 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);
-
- gconf = gconf_client_get_default ();
- gconf_client_set_bool (gconf, "/apps/evolution/mail/composer/view/Cc", view_cc, NULL);
- g_object_unref (gconf);
-
- e_msg_composer_hdrs_set_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 (E_IS_MSG_COMPOSER (composer), FALSE);
-
- return composer->view_bcc;
-}
-
-
-/**
- * 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)
-{
- GConfClient *gconf;
-
- 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);
-
- gconf = gconf_client_get_default ();
- gconf_client_set_bool (gconf, "/apps/evolution/mail/composer/view/Bcc", view_bcc, NULL);
- g_object_unref (gconf);
-
- e_msg_composer_hdrs_set_visible (E_MSG_COMPOSER_HDRS (composer->hdrs),
- e_msg_composer_get_visible_flags (composer));
-}
-
-
-EABDestination **
-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;
-}
-
-EABDestination **
-e_msg_composer_get_to (EMsgComposer *composer)
-{
- g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), NULL);
-
- return composer->hdrs ? e_msg_composer_hdrs_get_to (E_MSG_COMPOSER_HDRS (composer->hdrs)) : NULL;
-}
-
-EABDestination **
-e_msg_composer_get_cc (EMsgComposer *composer)
-{
- g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), NULL);
-
- return composer->hdrs ? e_msg_composer_hdrs_get_cc (E_MSG_COMPOSER_HDRS (composer->hdrs)) : NULL;
-}
-
-EABDestination **
-e_msg_composer_get_bcc (EMsgComposer *composer)
-{
- g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), NULL);
-
- return composer->hdrs ? e_msg_composer_hdrs_get_bcc (E_MSG_COMPOSER_HDRS (composer->hdrs)) : NULL;
-}
-
-const char *
-e_msg_composer_get_subject (EMsgComposer *composer)
-{
- g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), NULL);
-
- return composer->hdrs ? e_msg_composer_hdrs_get_subject (E_MSG_COMPOSER_HDRS (composer->hdrs)) : NULL;
-}
-
-
-/**
- * e_msg_composer_guess_mime_type:
- * @file_name: filename
- *
- * Returns the guessed mime type of the file given by #file_name.
- **/
-char *
-e_msg_composer_guess_mime_type (const char *file_name)
-{
- GnomeVFSFileInfo *info;
- GnomeVFSResult result;
-
- info = gnome_vfs_file_info_new ();
- 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) {
- char *type;
-
- type = g_strdup (gnome_vfs_file_info_get_mime_type (info));
- gnome_vfs_file_info_unref (info);
- return type;
- } else {
- gnome_vfs_file_info_unref (info);
- 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 (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 (E_IS_MSG_COMPOSER (composer));
-
- composer->has_changed = FALSE;
-}
-
-gboolean
-e_msg_composer_is_dirty (EMsgComposer *composer)
-{
- CORBA_Environment ev;
- gboolean rv;
-
- CORBA_exception_init (&ev);
- rv = composer->has_changed
- || (GNOME_GtkHTML_Editor_Engine_hasUndo (composer->editor_engine, &ev) &&
- !GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "is-saved", &ev));
- CORBA_exception_free (&ev);
-
- return rv;
-}
-
-/**
- * e_msg_composer_set_autosaved:
- * @composer: An EMsgComposer object.
- *
- * Mark the composer as autosaved, so before the composer gets destroyed
- * the user will be prompted about unsaved changes.
- **/
-void
-e_msg_composer_set_autosaved (EMsgComposer *composer)
-{
- g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
- composer->autosaved = TRUE;
-}
-
-
-/**
- * e_msg_composer_unset_autosaved:
- * @composer: An EMsgComposer object.
- *
- * Mark the composer as unautosaved, so no prompt about unsaved changes
- * will appear before destroying the composer.
- **/
-void
-e_msg_composer_unset_autosaved (EMsgComposer *composer)
-{
- g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
- composer->autosaved = FALSE;
-}
-
-gboolean
-e_msg_composer_is_autosaved (EMsgComposer *composer)
-{
- g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), FALSE);
-
- return composer->autosaved;
-}
-
-void
-e_msg_composer_set_enable_autosave (EMsgComposer *composer, gboolean enabled)
-{
- g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
- composer->enable_autosave = enabled;
-}
-
-static char *
-next_word (const char *s, const char **sr)
-{
- if (!s || !*s)
- return NULL;
- else {
- const char *begin;
- gunichar uc;
- gboolean cited;
-
- do {
- begin = s;
- cited = FALSE;
- uc = g_utf8_get_char (s);
- if (uc == 0)
- return NULL;
- s = g_utf8_next_char (s);
- } while (!html_selection_spell_word (uc, &cited) && !cited && s);
-
- /* we are at beginning of word */
- if (s && *s) {
- gboolean cited_end;
-
- cited_end = FALSE;
- uc = g_utf8_get_char (s);
-
- /* go to end of word */
- while (html_selection_spell_word (uc, &cited_end) || (!cited && cited_end)) {
- cited_end = FALSE;
- s = g_utf8_next_char (s);
- uc = g_utf8_get_char (s);
- if (uc == 0)
- break;
- }
- *sr = s;
- return s ? g_strndup (begin, s - begin) : g_strdup (begin);
- } else
- return NULL;
- }
-}
-
-
-void
-e_msg_composer_ignore (EMsgComposer *composer, const char *str)
-{
- CORBA_Environment ev;
- char *word;
-
- if (!str)
- return;
-
- CORBA_exception_init (&ev);
- while ((word = next_word (str, &str))) {
- /* printf ("ignore word %s\n", word); */
- GNOME_GtkHTML_Editor_Engine_ignoreWord (composer->editor_engine, word, &ev);
- g_free (word);
- }
- CORBA_exception_free (&ev);
-}
-
-
-void
-e_msg_composer_drop_editor_undo (EMsgComposer *composer)
-{
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
- GNOME_GtkHTML_Editor_Engine_dropUndo (composer->editor_engine, &ev);
- CORBA_exception_free (&ev);
-}
-
-
-gboolean
-e_msg_composer_request_close_all (void)
-{
- GSList *p, *pnext;
-
- for (p = all_composers; p != NULL; p = pnext) {
- pnext = p->next;
- do_exit (E_MSG_COMPOSER (p->data));
- }
-
- if (all_composers == NULL)
- return TRUE;
- else
- return FALSE;
-}
-
-void
-e_msg_composer_check_autosave(GtkWindow *parent)
-{
- if (am == NULL)
- am = autosave_manager_new();
-
- if (am->ask) {
- am->ask = FALSE;
- autosave_manager_query_load_orphans (am, parent);
- am->ask = TRUE;
- }
-}
diff --git a/composer/e-msg-composer.h b/composer/e-msg-composer.h
deleted file mode 100644
index dcc308cac0..0000000000
--- a/composer/e-msg-composer.h
+++ /dev/null
@@ -1,226 +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 version 2 of the GNU General Public
- * published by the Free Software Foundation; either version 2 of the
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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-window.h>
-#include <bonobo/bonobo-ui-component.h>
-
-#include "e-msg-composer-attachment-bar.h"
-#include "e-msg-composer-hdrs.h"
-#include "Editor.h"
-
-#include <mail/mail-config.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-
-#define E_TYPE_MSG_COMPOSER (e_msg_composer_get_type ())
-#define E_MSG_COMPOSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_MSG_COMPOSER, EMsgComposer))
-#define E_MSG_COMPOSER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_MSG_COMPOSER, EMsgComposerClass))
-#define E_IS_MSG_COMPOSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_MSG_COMPOSER))
-#define E_IS_MSG_COMPOSER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_MSG_COMPOSER))
-
-
-
-struct _EMsgComposer {
- BonoboWindow parent;
-
- /* Main UIComponent */
- BonoboUIComponent *uic;
-
- /* UIComponent for the non-control GtkEntries */
- BonoboUIComponent *entry_uic;
-
- GtkWidget *hdrs;
- GPtrArray *extra_hdr_names, *extra_hdr_values;
-
- GtkWidget *focused_entry;
-
- GtkWidget *editor;
-
- GtkWidget *attachment_bar;
- GtkWidget *attachment_scrolled_window;
-
- 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, *inline_images_by_url;
- GList *current_images;
-
- char *mime_type, *mime_body, *charset;
-
- char *autosave_file;
- int autosave_fd;
- guint32 enable_autosave : 1;
-
- guint32 attachment_bar_visible : 1;
- guint32 send_html : 1;
- guint32 is_alternative : 1;
- guint32 pgp_sign : 1;
- guint32 pgp_encrypt : 1;
- guint32 smime_sign : 1;
- guint32 smime_encrypt : 1;
- guint32 view_from : 1;
- guint32 view_replyto : 1;
- guint32 view_bcc : 1;
- guint32 view_cc : 1;
- guint32 view_subject : 1;
- guint32 has_changed : 1;
- guint32 autosaved : 1;
-
- guint32 mode_post : 1;
-
- guint32 in_signature_insert : 1;
- guint32 auto_signature : 1;
-
- MailConfigSignature *signature;
- GtkWidget *sig_omenu;
-
- CamelMimeMessage *redirect;
-
- guint notify_id;
-};
-
-struct _EMsgComposerClass {
- BonoboWindowClass parent_class;
-
- void (* send) (EMsgComposer *composer);
- void (* save_draft) (EMsgComposer *composer, int quit);
-};
-
-
-GtkType e_msg_composer_get_type (void);
-
-EMsgComposer *e_msg_composer_new (void);
-EMsgComposer *e_msg_composer_new_post (void);
-
-EMsgComposer *e_msg_composer_new_with_message (CamelMimeMessage *msg);
-EMsgComposer *e_msg_composer_new_from_url (const char *url);
-EMsgComposer *e_msg_composer_new_redirect (CamelMimeMessage *message,
- const char *resent_from);
-
-void e_msg_composer_show_attachments (EMsgComposer *composer,
- gboolean show);
-void e_msg_composer_set_headers (EMsgComposer *composer,
- const char *from,
- EABDestination **to,
- EABDestination **cc,
- EABDestination **bcc,
- const char *subject);
-void e_msg_composer_set_body_text (EMsgComposer *composer,
- const char *text);
-void e_msg_composer_set_body (EMsgComposer *composer,
- const char *body,
- const char *mime_type);
-void e_msg_composer_add_header (EMsgComposer *composer,
- const char *name,
- const char *value);
-void e_msg_composer_attach (EMsgComposer *composer,
- CamelMimePart *attachment);
-CamelMimePart *e_msg_composer_add_inline_image_from_file (EMsgComposer *composer,
- const char *filename);
-void e_msg_composer_add_inline_image_from_mime_part (EMsgComposer *composer,
- CamelMimePart *part);
-CamelMimeMessage *e_msg_composer_get_message (EMsgComposer *composer,
- gboolean save_html_object_data);
-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_cc (EMsgComposer *composer);
-void e_msg_composer_set_view_cc (EMsgComposer *composer,
- gboolean view_cc);
-gboolean e_msg_composer_get_view_bcc (EMsgComposer *composer);
-void e_msg_composer_set_view_bcc (EMsgComposer *composer,
- gboolean view_bcc);
-
-EABDestination **e_msg_composer_get_recipients (EMsgComposer *composer);
-EABDestination **e_msg_composer_get_to (EMsgComposer *composer);
-EABDestination **e_msg_composer_get_cc (EMsgComposer *composer);
-EABDestination **e_msg_composer_get_bcc (EMsgComposer *composer);
-const char *e_msg_composer_get_subject (EMsgComposer *composer);
-
-EAccount *e_msg_composer_get_preferred_account (EMsgComposer *composer);
-void e_msg_composer_clear_inlined_table (EMsgComposer *composer);
-char *e_msg_composer_guess_mime_type (const char *file_name);
-void e_msg_composer_set_changed (EMsgComposer *composer);
-void e_msg_composer_unset_changed (EMsgComposer *composer);
-gboolean e_msg_composer_is_dirty (EMsgComposer *composer);
-void e_msg_composer_set_autosaved (EMsgComposer *composer);
-void e_msg_composer_unset_autosaved (EMsgComposer *composer);
-gboolean e_msg_composer_is_autosaved (EMsgComposer *composer);
-void e_msg_composer_set_enable_autosave (EMsgComposer *composer,
- gboolean enabled);
-
-/* 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);
-char *e_msg_composer_get_sig_file_content (const char *sigfile,
- gboolean in_html);
-void e_msg_composer_add_message_attachments (EMsgComposer *composer,
- CamelMimeMessage *message,
- gboolean just_inlines);
-void e_msg_composer_ignore (EMsgComposer *composer,
- const char *str);
-void e_msg_composer_drop_editor_undo (EMsgComposer *composer);
-
-gboolean e_msg_composer_request_close_all (void);
-void e_msg_composer_check_autosave (GtkWindow *parent);
-
-#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 31da13c342..0000000000
--- a/composer/evolution-composer.c
+++ /dev/null
@@ -1,397 +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 version 2 of the GNU General Public
- * published by the Free Software Foundation; either version 2 of the
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <string.h>
-#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;
-
-struct _EvolutionComposerPrivate {
- int send_id;
- int save_draft_id;
-
- void (*send_cb) (EMsgComposer *, gpointer);
- void (*save_draft_cb) (EMsgComposer *, int, gpointer);
-};
-
-/* CORBA interface implementation. */
-static EABDestination **
-corba_recipientlist_to_destv (const GNOME_Evolution_Composer_RecipientList *cl)
-{
- GNOME_Evolution_Composer_Recipient *recip;
- EABDestination **destv;
- int i;
-
- if (cl->_length == 0)
- return NULL;
-
- destv = g_new (EABDestination *, cl->_length+1);
-
- for (i = 0; i < cl->_length; ++i) {
- recip = &(cl->_buffer[i]);
-
- destv[i] = eab_destination_new ();
-
- if (*recip->name)
- eab_destination_set_name (destv[i], recip->name);
- eab_destination_set_email (destv[i], recip->address);
-
- }
- destv[cl->_length] = NULL;
-
- return destv;
-}
-
-static void
-impl_Composer_set_headers (PortableServer_Servant servant,
- const CORBA_char *from,
- 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;
- EABDestination **tov, **ccv, **bccv;
- EAccountList *accounts;
- EAccount *account;
- EIterator *iter;
- int found = 0;
-
- bonobo_object = bonobo_object_from_servant (servant);
- composer = EVOLUTION_COMPOSER (bonobo_object);
-
- account = mail_config_get_account_by_name (from);
- if (!account) {
- accounts = mail_config_get_accounts ();
- iter = e_list_get_iterator ((EList *) accounts);
- while (e_iterator_is_valid (iter)) {
- account = (EAccount *) e_iterator_get (iter);
-
- if (!strcasecmp (account->id->address, from)) {
- found = TRUE;
- break;
- }
-
- e_iterator_next (iter);
- }
-
- g_object_unref (iter);
-
- if (!found)
- account = mail_config_get_default_account ();
- }
-
- 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, account->name,
- tov, ccv, bccv, subject);
-
- eab_destination_freev (tov);
- eab_destination_freev (ccv);
- eab_destination_freev (bccv);
-}
-
-static void
-impl_Composer_set_multipart_type (PortableServer_Servant servant,
- GNOME_Evolution_Composer_MultipartType type,
- CORBA_Environment *ev)
-{
- BonoboObject *bonobo_object;
- EvolutionComposer *composer;
-
- bonobo_object = bonobo_object_from_servant (servant);
- composer = EVOLUTION_COMPOSER (bonobo_object);
-
- if (type == GNOME_Evolution_Composer_ALTERNATIVE) {
- composer->composer->is_alternative = TRUE;
- composer->composer->send_html = FALSE;
- }
-}
-
-static void
-impl_Composer_set_body (PortableServer_Servant servant,
- const CORBA_char *body,
- const CORBA_char *mime_type,
- CORBA_Environment *ev)
-{
- BonoboObject *bonobo_object;
- EvolutionComposer *composer;
-
- bonobo_object = bonobo_object_from_servant (servant);
- composer = EVOLUTION_COMPOSER (bonobo_object);
-
- if (!strcasecmp (mime_type, "text/plain")) {
- char *htmlbody = camel_text_to_html (body, CAMEL_MIME_FILTER_TOHTML_PRE, 0);
-
- e_msg_composer_set_body_text (composer->composer, htmlbody);
- g_free (htmlbody);
- } else if (!strcasecmp (mime_type, "text/html"))
- e_msg_composer_set_body_text (composer->composer, body);
- else
- e_msg_composer_set_body (composer->composer, body, mime_type);
-}
-
-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 (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 (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);
-
- composer->priv->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->setMultipartType = impl_Composer_set_multipart_type;
- epv->setBody = impl_Composer_set_body;
- epv->attachMIME = impl_Composer_attach_MIME;
- epv->attachData = impl_Composer_attach_data;
- epv->show = impl_Composer_show;
- epv->send = impl_Composer_send;
-
- return epv;
-}
-
-
-/* GObject stuff */
-
-static void
-finalise (GObject *object)
-{
- EvolutionComposer *composer = EVOLUTION_COMPOSER (object);
- struct _EvolutionComposerPrivate *p = composer->priv;
-
- g_signal_handler_disconnect(composer->composer, p->send_id);
- g_signal_handler_disconnect(composer->composer, p->save_draft_id);
- g_free(p);
-
- if (composer->composer) {
- g_object_unref(composer->composer);
- composer->composer = NULL;
- }
-
- G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-static void
-evolution_composer_class_init (EvolutionComposerClass *klass)
-{
- GObjectClass *object_class;
- POA_GNOME_Evolution_Composer__epv *epv;
-
- object_class = G_OBJECT_CLASS (klass);
- object_class->finalize = finalise;
-
- parent_class = g_type_class_ref(bonobo_object_get_type ());
-
- epv = &klass->epv;
-
- epv->setHeaders = impl_Composer_set_headers;
- epv->setMultipartType = impl_Composer_set_multipart_type;
- epv->setBody = impl_Composer_set_body;
- epv->attachMIME = impl_Composer_attach_MIME;
- epv->attachData = impl_Composer_attach_data;
- epv->show = impl_Composer_show;
- epv->send = impl_Composer_send;
-}
-
-static void
-evolution_composer_init (EvolutionComposer *composer)
-{
- EAccount *account;
-
- account = mail_config_get_default_account ();
- composer->composer = e_msg_composer_new ();
- composer->priv = g_malloc0(sizeof(*composer->priv));
-}
-
-#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 (*send) (EMsgComposer *, gpointer),
- void (*save_draft) (EMsgComposer *, int, gpointer))
-{
- EvolutionComposer *new;
- struct _EvolutionComposerPrivate *p;
-
- new = g_object_new(EVOLUTION_TYPE_COMPOSER, NULL);
- evolution_composer_construct (new, bonobo_object_corba_objref((BonoboObject *)new));
- p = new->priv;
- p->send_cb = send;
- p->save_draft_cb = save_draft;
- p->send_id = g_signal_connect (new->composer, "send", G_CALLBACK (send), NULL);
- p->save_draft_id = g_signal_connect (new->composer, "save-draft", G_CALLBACK (save_draft), NULL);
-
- return new;
-}
-
-BONOBO_TYPE_FUNC_FULL(EvolutionComposer, GNOME_Evolution_Composer, BONOBO_TYPE_OBJECT, evolution_composer)
diff --git a/composer/evolution-composer.h b/composer/evolution-composer.h
deleted file mode 100644
index 8928801583..0000000000
--- a/composer/evolution-composer.h
+++ /dev/null
@@ -1,75 +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 version 2 of the GNU General Public
- * published by the Free Software Foundation; either version 2 of the
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EVOLUTION_TYPE_COMPOSER, EvolutionComposer))
-#define EVOLUTION_COMPOSER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EVOLUTION_TYPE_COMPOSER, EvolutionComposerClass))
-#define EVOLUTION_IS_COMPOSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EVOLUTION_TYPE_COMPOSER))
-#define EVOLUTION_IS_COMPOSER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), EVOLUTION_TYPE_COMPOSER))
-
-typedef struct _EvolutionComposer EvolutionComposer;
-typedef struct _EvolutionComposerClass EvolutionComposerClass;
-
-struct _EvolutionComposer {
- BonoboObject parent;
-
- struct _EvolutionComposerPrivate *priv;
-
- EMsgComposer *composer;
-};
-
-struct _EvolutionComposerClass {
- BonoboObjectClass parent_class;
-
- POA_GNOME_Evolution_Composer__epv epv;
-};
-
-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 (*send_cb) (EMsgComposer *, gpointer),
- void (*save_draft_cb) (EMsgComposer *, int, gpointer));
-
-void evolution_composer_factory_init (void (*send) (EMsgComposer *, gpointer),
- void (*save_draft) (EMsgComposer *, int, gpointer));
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __EVOLUTION_COMPOSER_H__ */
diff --git a/composer/listener.c b/composer/listener.c
deleted file mode 100644
index 0d0dc2f652..0000000000
--- a/composer/listener.c
+++ /dev/null
@@ -1,275 +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 program is free software; you can redistribute it and/or
- modify it under the terms of version 2 of the GNU General Public
- License as published by the Free Software Foundation.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public
- 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 <bonobo/bonobo-arg.h>
-#include <bonobo/bonobo-object.h>
-#include <bonobo/bonobo-stream-client.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)
-{
- CamelMimePart *part;
- const char *cid;
-
- part = g_hash_table_lookup (l->composer->inline_images_by_url, url);
- if (!part && !strncmp (url, "file:", 5)) {
- part = e_msg_composer_add_inline_image_from_file (l->composer,
- url + 5);
- }
- if (!part && !strncmp (url, "cid:", 4)) {
- part = g_hash_table_lookup (l->composer->inline_images, url);
- }
- if (!part)
- return NULL;
-
- l->composer->current_images = g_list_prepend (l->composer->current_images, part);
-
- cid = camel_mime_part_get_content_id (part);
- if (!cid)
- return NULL;
-
- return g_strconcat ("cid:", cid, NULL);
-}
-
-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, "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);
- return;
- }
- }
-
- GNOME_GtkHTML_Editor_Engine_runCommand (l->composer->editor_engine, "style-normal", ev);
- GNOME_GtkHTML_Editor_Engine_runCommand (l->composer->editor_engine, "indent-zero", ev);
- GNOME_GtkHTML_Editor_Engine_runCommand (l->composer->editor_engine, "text-default-color", ev);
- GNOME_GtkHTML_Editor_Engine_runCommand (l->composer->editor_engine, "italic-off", ev);
-}
-
-static 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);
- }
- GNOME_GtkHTML_Editor_Engine_runCommand (e, "text-default-color", ev);
- GNOME_GtkHTML_Editor_Engine_runCommand (e, "italic-off", ev);
-}
-
-static void
-insert_paragraph_before (EditorListener *l, CORBA_Environment * ev)
-{
- if (!l->composer->in_signature_insert) {
- CORBA_char *orig, *signature;
- gboolean changed = FALSE;
- /* 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') {
- 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);
- changed = TRUE;
- }
- CORBA_free (orig);
- }
- if (!changed) {
- signature = GNOME_GtkHTML_Editor_Engine_getParagraphData (l->composer->editor_engine, "signature", ev);
- if (ev->_major == CORBA_NO_EXCEPTION) {
- if (signature && *signature == '1') {
- 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);
- }
- CORBA_free (signature);
- }
- }
- }
-}
-
-static void
-insert_paragraph_after (EditorListener *l, CORBA_Environment * ev)
-{
- if (!l->composer->in_signature_insert) {
- CORBA_char *orig, *signature;
- /* FIXME check for insert-paragraph command */
- 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);
-
- 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);
- CORBA_free (orig);
- }
- 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);
- CORBA_free (signature);
- }
- }
-}
-
-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;
- gchar *command;
-
- if (!strcmp (name, "command_before")) {
- command = BONOBO_ARG_GET_STRING (arg);
- if (!strcmp (command, "insert-paragraph")) {
- insert_paragraph_before (l, ev);
- }
- } else if (!strcmp (name, "command_after")) {
- command = BONOBO_ARG_GET_STRING (arg);
- if (!strcmp (command, "insert-paragraph")) {
- insert_paragraph_after (l, ev);
- }
- } else if (!strcmp (name, "image_url")) {
- gchar *url;
-
- if ((url = resolve_image_url (l, BONOBO_ARG_GET_STRING (arg)))) {
- rv = bonobo_arg_new (BONOBO_ARG_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);
- }
- CORBA_free (orig);
- }
- }
- } else if (!strcmp (name, "url_requested")) {
- GNOME_GtkHTML_Editor_URLRequestEvent *e;
- CamelMimePart *part;
- GByteArray *ba;
- CamelStream *cstream;
- CamelDataWrapper *wrapper;
-
- e = (GNOME_GtkHTML_Editor_URLRequestEvent *)arg->_value;
-
- if (!e->url || e->stream == CORBA_OBJECT_NIL)
- return get_any_null ();
-
- part = g_hash_table_lookup (l->composer->inline_images_by_url, e->url);
- if (!part)
- part = g_hash_table_lookup (l->composer->inline_images, e->url);
- if (!part)
- return get_any_null ();
-
- /* 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 (CAMEL_MEDIUM (part));
- camel_data_wrapper_decode_to_stream (wrapper, cstream);
-
- bonobo_stream_client_write (e->stream, ba->data, ba->len, ev);
-
- camel_object_unref (cstream);
- }
-
- return rv ? rv : get_any_null ();
-}
-
-static void
-listener_class_init (EditorListenerClass *klass)
-{
- POA_GNOME_GtkHTML_Editor_Listener__epv *epv;
-
- listener_parent_class = g_type_class_ref(bonobo_object_get_type ());
-
- epv = &klass->epv;
- epv->event = impl_event;
-}
-
-static void
-listener_init(EditorListener *object)
-{
-}
-
-BONOBO_TYPE_FUNC_FULL(EditorListener, GNOME_GtkHTML_Editor_Listener, BONOBO_TYPE_OBJECT, listener);
-
-EditorListener *
-listener_new (EMsgComposer *composer)
-{
- EditorListener *listener;
-
- listener = g_object_new (EDITOR_LISTENER_TYPE, NULL);
- listener->composer = composer;
-
- return listener;
-}
diff --git a/composer/listener.h b/composer/listener.h
deleted file mode 100644
index d238583453..0000000000
--- a/composer/listener.h
+++ /dev/null
@@ -1,51 +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 program is free software; you can redistribute it and/or
- modify it under the terms of version 2 of the GNU General Public
- License as published by the Free Software Foundation.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public
- License along with this program; 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 <bonobo/bonobo-object.h>
-#include "Editor.h"
-#include "e-msg-composer.h"
-
-#define EDITOR_LISTENER_TYPE (listener_get_type ())
-#define EDITOR_LISTENER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EDITOR_LISTENER_TYPE, EditorListener))
-#define EDITOR_LISTENER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), EDITOR_LISTENER_TYPE, EditorListenerClass))
-#define IS_EDITOR_LISTENER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EDITOR_LISTENER_TYPE))
-#define IS_EDITOR_LISTENER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EDITOR_LISTENER_TYPE))
-
-typedef struct {
- BonoboObject parent;
- EMsgComposer *composer;
-} EditorListener;
-
-typedef struct {
- BonoboObjectClass parent_class;
-
- POA_GNOME_GtkHTML_Editor_Listener__epv epv;
-} EditorListenerClass;
-
-GtkType listener_get_type (void);
-EditorListener *listener_construct (EditorListener *listener,
- GNOME_GtkHTML_Editor_Listener corba_listener);
-EditorListener *listener_new (EMsgComposer *composer);
-
-#endif /* LISTENER_H_ */
diff --git a/configure.in b/configure.in
deleted file mode 100644
index 605b1c73ef..0000000000
--- a/configure.in
+++ /dev/null
@@ -1,1384 +0,0 @@
-# Process this file with autoconf to produce a configure script.
-AC_PREREQ(2.52)
-
-AC_INIT(evolution, 1.5, http://bugzilla.ximian.com/enter_bug.cgi?product=Evolution)
-AC_CONFIG_SRCDIR(README)
-AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
-
-AM_CONFIG_HEADER(config.h)
-
-AC_CANONICAL_HOST
-AC_DEFINE_UNQUOTED(VERSION_COMMENT, "", [Define if you want a comment appended to the version number])
-
-dnl Put the ACLOCAL flags in the Makefile
-ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
-
-dnl Initialize maintainer mode
-AM_MAINTAINER_MODE
-
-AC_ISC_POSIX
-AC_PROG_CC
-AC_PROG_CPP
-AC_C_INLINE
-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 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 I18N stuff
-AC_PROG_INTLTOOL
-
-ALL_LINGUAS="am az be bg ca cs da de el en_AU en_GB es et eu fi fr ga gl hu it ja ko lt lv ms nl nn no pl pt pt_BR ro ru sk sl sr sr@Latn sv tr uk vi zh_CN zh_TW"
-AM_GLIB_GNU_GETTEXT
-
-GETTEXT_PACKAGE=evolution-1.5
-AC_SUBST(GETTEXT_PACKAGE)
-AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Package name for gettext])
-
-localedir='$(prefix)/$(DATADIRNAME)/locale'
-AC_SUBST(localedir)
-
-dnl Initialize libtool
-AM_DISABLE_STATIC
-AM_PROG_LIBTOOL
-
-dnl alloca()
-AC_CHECK_HEADERS(alloca.h)
-
-dnl check for socklen_t (in Unix98)
-AC_MSG_CHECKING(for socklen_t)
-AC_TRY_COMPILE([#include <sys/socket.h>
-socklen_t x;
-],[],[AC_MSG_RESULT(yes)],[
-AC_TRY_COMPILE([#include <sys/socket.h>
-int accept (int, struct sockaddr *, size_t *);
-],[],[
-AC_MSG_RESULT(size_t)
-AC_DEFINE(socklen_t,size_t,[Define to appropriate type if socklen_t is not defined])], [
-AC_MSG_RESULT(int)
-AC_DEFINE(socklen_t,int)])])
-
-dnl
-dnl Purify support
-dnl
-EVO_PURIFY_SUPPORT
-
-dnl
-dnl system mail stuff
-dnl
-AC_PATH_PROG(SENDMAIL, sendmail, /usr/sbin/sendmail, /usr/sbin:/usr/lib)
-AC_DEFINE_UNQUOTED(SENDMAIL_PATH, "$SENDMAIL", [Path to a sendmail binary, or equivalent])
-
-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", [Directory local mail is delivered to])
-
-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 ***************
-dnl Timezone checks
-dnl ***************
-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, 1, [Define if struct tm has a tm_gmtoff member])
-else
- 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, 1, [Define if libc defines a timezone variable])
- AC_CACHE_CHECK(for altzone variable, ac_cv_var_altzone,
- AC_TRY_COMPILE([
- #include <time.h>
- ], [
- altzone = 1;
- ], ac_cv_var_altzone=yes, ac_cv_var_altzone=no))
- if test $ac_cv_var_altzone = yes; then
- AC_DEFINE(HAVE_ALTZONE, 1, [Define if libc defines an altzone variable])
- fi
- 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, 1, [Solaris-style ctime_r])
-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, 1, [Solaris-style gethostbyname_r])
-fi
-
-dnl **************************************************
-dnl gethostbyaddr_r prototype
-dnl **************************************************
-
-AC_CHECK_FUNCS(gethostbyaddr_r,[
-AC_CACHE_CHECK([if gethostbyaddr_r wants seven arguments], ac_cv_gethostbyaddr_r_seven_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)gethostbyaddr_r ("www.ximian.com", 14, AF_INET, &hent, buffer, bufsize, &h_errno);
- ],[
- ac_cv_gethostbyaddr_r_seven_args=yes
- ],[
- ac_cv_gethostbyaddr_r_seven_args=no
- ])
-])])
-
-if test "x$ac_cv_gethostbyaddr_r_seven_args" = "xyes" ; then
- AC_DEFINE(GETHOSTBYADDR_R_SEVEN_ARGS, 1, [Solaris-style gethostbyaddr_r])
-fi
-
-
-dnl **************************************************
-dnl * Accessibility support
-dnl **************************************************
-PKG_CHECK_MODULES(A11Y, atk)
-AC_SUBST(A11Y_CFLAGS)
-AC_SUBST(A11Y_LIBS)
-
-dnl **************************************************
-dnl * IPv6 support
-dnl **************************************************
-AC_ARG_ENABLE(ipv6, [ --enable-ipv6=[no/yes] Enable support for resolving IPv6 addresses.],,enable_ipv6=no)
-if test "x$enable_ipv6" = "xyes"; then
-AC_CACHE_CHECK([if system has necessary structs and functions for IPv6 support], msg_ipv6,
-[
- AC_TRY_COMPILE([
- #include "confdefs.h"
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <netdb.h>
-
- ],[
- struct addrinfo hints, *res;
- struct sockaddr_in6 sin6;
- int af = AF_INET6;
-
- getaddrinfo ("www.ximian.com", NULL, &hints, &res);
- freeaddrinfo (res);
- ],[
- msg_ipv6=yes
- ],[
- enable_ipv6=no
- msg_ipv6=no
- ])
-])
-else
- msg_ipv6=no
-fi
-
-if test "x$enable_ipv6" = "xyes"; then
- AC_DEFINE(ENABLE_IPv6,1,[Enable IPv6 support])
- AC_TRY_COMPILE([
- #include "confdefs.h"
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <netdb.h>
-
- ],[
- struct addrinfo hints;
-
- hints.ai_flags = AI_ADDRCONFIG;
- ],[
- AC_DEFINE(HAVE_AI_ADDRCONFIG,1,[Define if the system defines the AI_ADDRCONFIG flag for getaddrinfo])
- ])
-fi
-AM_CONDITIONAL(ENABLE_IPv6, test "x$enable_ipv6" = "xyes")
-
-
-dnl **************************************************
-dnl LDAP support.
-dnl **************************************************
-EVO_LDAP_CHECK(no)
-case $with_openldap in
-no)
- msg_ldap=no
- ;;
-*)
- case $with_static_ldap in
- yes)
- msg_ldap="yes (static)"
- ;;
- *)
- msg_ldap="yes (dynamic)"
- ;;
- esac
-esac
-
-dnl **************************************************
-dnl NNTP support.
-dnl **************************************************
-AC_ARG_ENABLE(nntp,
-[ --enable-nntp=[no/yes] Attempt to compile incomplete, unsupported NNTP code],,enable_nntp=no)
-if test "x$enable_nntp" = "xyes"; then
- AC_DEFINE(ENABLE_NNTP,1,[Don't try this at home])
- msg_nntp=yes
-else
- msg_nntp=no
-fi
-AM_CONDITIONAL(ENABLE_NNTP, test x$enable_nntp = xyes)
-
-dnl **************************************************
-dnl New IMAP code support.
-dnl **************************************************
-AC_ARG_ENABLE(imapp,
-[ --enable-imapp=[no/yes] Attempt to compile alternative, incomplete, very unsupported IMAPv4r1 code],,enable_imapp=no)
-if test "x$enable_imapp" = "xyes"; then
- AC_DEFINE(ENABLE_IMAPP,1,[Really don't try this at home])
- msg_imapp=yes
-else
- msg_imapp=no
-fi
-AM_CONDITIONAL(ENABLE_IMAPP, test x$enable_imapp = xyes)
-
-
-dnl **************************************************
-dnl * Posix thread support
-dnl **************************************************
-
-dnl GLIB_CONFIG=${GLIB_CONFIG-glib-config}
-dnl GNOME_PTHREAD_CHECK
-
-dnl if test "x$PTHREAD_LIB" = "x" ; then
-dnl AC_MSG_ERROR([POSIX threads are currently required for Evolution])
-dnl 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
-
-EVO_PTHREAD_CHECK
-
-THREADS_LIBS="$PTHREAD_LIB"
-THREADS_CFLAGS="$PTHREAD_CFLAGS"
-
-AC_SUBST(THREADS_LIBS)
-AC_SUBST(THREADS_CFLAGS)
-AC_DEFINE(ENABLE_THREADS,1,[Required])
-
-
-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,1,[Define to use dot locking for mbox files])
- 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,1,[Define to use fcntl locking for mbox files])
- msg_file=fcntl
-else
- if test "x$enable_file_locking" = "xflock"; then
- AC_DEFINE(USE_FLOCK,1,[Define to use flock locking for mbox files])
- 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,1,[Define if mail delivered to the system mail directory is in broken Content-Length format])
-fi
-
-AC_MSG_RESULT($with_broken_spool)
-
-
-dnl *********
-dnl Libraries
-dnl *********
-
-PKG_CHECK_MODULES(GTKHTML, libgtkhtml-3.1)
-AC_SUBST(GTKHTML_CFLAGS)
-AC_SUBST(GTKHTML_LIBS)
-GTKHTML_DATADIR=`$PKG_CONFIG --variable gtkhtml_datadir libgtkhtml-3.1`
-AC_SUBST(GTKHTML_DATADIR)
-
-
-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
- PKG_CHECK_MODULES(GNOME_PILOT, gnome-pilot-2.0)
-
- CFLAGS_save="$CFLAGS"
- CFLAGS="$CFLAGS $GNOME_PILOT_CFLAGS"
- LDFLAGS_save="$LDFLAGS"
- LDFLAGS="$LDFLAGS $GNOME_PILOT_LIBS"
-
- AC_CACHE_CHECK([if pilot-link handles UTF-8 conversions], ac_cv_pilot_link_utf8, AC_TRY_RUN([
-
-#include <stdlib.h>
-#include <string.h>
-#include <pi-util.h>
-
-int main (int argc, char **argv)
-{
- const char *utf8 = "\x66\x66\x66\x66\x66\x66\x66\xC2\xA9";
- size_t utf8_real_len = strlen (utf8);
- char *pstring;
-
- if (convert_ToPilotChar ("UTF-8", utf8, utf8_real_len, &pstring) == -1)
- exit (1);
-
- exit (0);
-}
-], ac_cv_pilot_link_utf8=yes, ac_cv_pilot_link_utf8=no, ac_cv_pilot_link_utf8=no))
-
- CFLAGS="$CFLAGS_save"
- LDFLAGS="$LDFLAGS_save"
-
- if test "$ac_cv_pilot_link_utf8" = no; then
- AC_MSG_ERROR(evolution requires pilot-link to have working UTF-8 conversion routines)
- fi
-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
-AC_SUBST(GNOME_PILOT_CFLAGS)
-AC_SUBST(GNOME_PILOT_LIBS)
-
-dnl ********
-dnl Kerberos
-dnl ********
-AC_ARG_WITH(krb5, [ --with-krb5=PREFIX Location of Kerberos 5 libs/includes], with_krb5="$withval", with_krb5="no")
-AC_ARG_WITH(krb4, [ --with-krb4=PREFIX Location of Kerberos 4 libs/includes], with_krb4="$withval", with_krb4="no")
-
-msg_krb5="no"
-if test "x${with_krb5}" != "xno"; then
- LDFLAGS_save="$LDFLAGS"
-
- mitlibs="-lkrb5 -lk5crypto -lcom_err -lgssapi_krb5"
- heimlibs="-lkrb5 -lcrypto -lasn1 -lcom_err -lroken -lgssapi"
- 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,1,[Define if you have Krb5])
- if test "$ac_cv_lib_kerberos5" = "$mitlibs"; then
- AC_DEFINE(HAVE_MIT_KRB5,1,[Define if you have MIT Krb5])
- KRB5_CFLAGS="-I$with_krb5/include"
- msg_krb5="yes (MIT)"
- else
- AC_DEFINE(HAVE_HEIMDAL_KRB5,1,[Define if you have Heimdal])
- KRB5_CFLAGS="-I$with_krb5/include/heimdal"
- msg_krb5="yes (Heimdal)"
- fi
- 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}" != "xno"; then
- LDFLAGS_save="$LDFLAGS"
- AC_CACHE_CHECK(for Kerberos 4, ac_cv_lib_kerberos4,
- [
- ac_cv_lib_kerberos4="no"
-
- mitcompatlibs="-lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
- # Look for MIT krb5 compat krb4
- LDFLAGS="$LDFLAGS -L$with_krb4/lib $mitcompatlibs"
- AC_TRY_LINK_FUNC(krb_mk_req, ac_cv_lib_kerberos4="$mitcompatlibs")
-
- 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,1,[Define if you 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"
- fi
- if test -d "$with_krb4/include/kerberosIV"; then
- KRB4_CFLAGS="$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,1,[Need krb_sendauth proto])],)
- CFLAGS="$CFLAGS_save"
- fi
-else
- AC_MSG_CHECKING(for Kerberos 4)
- AC_MSG_RESULT(${with_krb4})
-fi
-
-AC_SUBST(KRB5_CFLAGS)
-AC_SUBST(KRB5_LDFLAGS)
-AC_SUBST(KRB4_CFLAGS)
-AC_SUBST(KRB4_LDFLAGS)
-
-
-dnl ********************************************************************************
-dnl security extension support (SSL and S/MIME)
-dnl
-dnl The following voodoo does detection of mozilla libraries (nspr and nss)
-dnl needed by Camel (SSL and S/MIME).
-dnl
-dnl The Evolution security extensions are only built if these libraries are found
-dnl ********************************************************************************
-msg_ssl="no"
-msg_smime="no"
-
-dnl these 2 enable's are inverses of each other
-AC_ARG_ENABLE(nss, [ --enable-nss=[yes,no,static] Attempt to use Mozilla libnss for SSL support.],
- enable_nss="$enableval", enable_nss="yes")
-
-AC_ARG_ENABLE(openssl, [ --enable-openssl=[no,yes] Attempt to use OpenSSL for SSL support.],
- enable_openssl="$enableval", enable_openssl="no")
-
-if test "x${enable_openssl}" = "xyes"; then
-dnl User wants to override nss with OpenSSL
- enable_nss="no"
- AC_MSG_WARN([OpenSSL enabled, disabling NSS.])
-fi
-
-AC_ARG_WITH(nspr-includes, [ --with-nspr-includes=PREFIX Location of Mozilla nspr4 includes.],
- with_nspr_includes="$withval")
-
-AC_ARG_WITH(nspr-libs, [ --with-nspr-libs=PREFIX Location of Mozilla nspr4 libs.],
- with_nspr_libs="$withval")
-
-AC_ARG_WITH(nss-includes, [ --with-nss-includes=PREFIX Location of Mozilla nss3 includes.],
- with_nss_includes="$withval")
-
-AC_ARG_WITH(nss-libs, [ --with-nss-libs=PREFIX Location of Mozilla nss3 libs.],
- with_nss_libs="$withval")
-
-if test "x${enable_nss}" = "xyes" || test "x${enable_nss}" = "xstatic"; then
- if test -n "${with_nspr_includes}" || test -n "${with_nspr_libs}" || test -n "${with_nss_includes}" || test -n "${with_nss_libs}" || test "x${enable_nss}" = "xstatic"; then
-dnl If the user specifies --with-foo or --enable-nss=static, then we have to do this manually
- check_manually="yes"
- else
- check_manually="no"
- fi
-
- if test "x${check_manually}" = "xno" && `$PKG_CONFIG --exists mozilla-nss`; then
- PKG_CHECK_MODULES(NSS, mozilla-nss, have_nss="yes")
- if test "x${have_nss}" = "xyes"; then
- msg_ssl="yes (Mozilla NSS)"
- msg_smime="yes (Mozilla NSS)"
- enable_smime="yes"
- mozilla_nspr="mozilla-nspr"
- mozilla_nss="mozilla-nss"
- AC_DEFINE(HAVE_NSS,1,[Define if you have NSS])
- AC_DEFINE(HAVE_SSL,1,[Define if you have a supported SSL library])
- MANUAL_NSPR_CFLAGS=""
- MANUAL_NSPR_LIBS=""
- MANUAL_NSS_CFLAGS=""
- MANUAL_NSS_LIBS=""
- else
- check_manually="yes"
- fi
- fi
-
- if test "x${check_manually}" = "xyes"; then
- mozilla_nss=""
- 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"
- MANUAL_NSPR_CFLAGS="-I$with_nspr_includes"
- fi
- else
- AC_MSG_CHECKING(for Mozilla nspr4 includes)
- AC_MSG_RESULT(no)
- fi
-
- have_nspr_libs="no"
- if test "x${with_nspr_libs}" != "xno" -a "x${have_nspr_includes}" != "xno"; then
- CFLAGS_save="$CFLAGS"
- LDFLAGS_save="$LDFLAGS"
-
- if test "$enable_nss" = "static"; then
- if test -z "${with_nspr_libs}"; then
- AC_MSG_ERROR([Static linkage requested, but path to nspr libraries not set.]
-[Please specify the path to libnspr4.a]
-[Example: --with-nspr-libs=/usr/lib])
- else
- nsprlibs="-ldl $with_nspr_libs/libplc4.a $with_nspr_libs/libplds4.a $with_nspr_libs/libnspr4.a $PTHREAD_LIB"
- fi
- else
- nsprlibs="-ldl -lplc4 -lplds4 -lnspr4 $PTHREAD_LIB"
- fi
-
- AC_CACHE_CHECK([for Mozilla nspr libraries], moz_nspr_libs,
- [
- LIBS_save="$LIBS"
- CFLAGS="$CFLAGS $MANUAL_NSPR_CFLAGS"
-
- if test "x${with_nspr_libs}" != "x"; then
- LIBS="$nsprlibs"
- LDFLAGS="$LDFLAGS -L$with_nspr_libs"
- else
- LIBS="$nsprlibs"
- LDFLAGS="$LDFLAGS"
- fi
-
- AC_TRY_LINK_FUNC(PR_Init, moz_nspr_libs="yes", moz_nspr_libs="no")
- CFLAGS="$CFLAGS_save"
- LDFLAGS="$LDFLAGS_save"
- LIBS="$LIBS_save"
- ])
- if test "x$moz_nspr_libs" != "xno"; then
- have_nspr_libs="yes"
- MANUAL_NSPR_LIBS="-L$with_nspr_libs $nsprlibs"
- else
- MANUAL_NSPR_CLFAGS=""
- fi
- else
- AC_MSG_CHECKING(for Mozilla nspr4 libraries)
- AC_MSG_RESULT(no)
- fi
-
- 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"
- MANUAL_NSS_CFLAGS="-I$with_nss_includes"
- else
- MANUAL_NSPR_CFLAGS=""
- MANUAL_NSPR_LIBS=""
- fi
- else
- AC_MSG_CHECKING(for Mozilla nss3 includes)
- AC_MSG_RESULT(no)
- fi
-
- if test "x${with_nss_libs}" != "xno" -a "x${have_nss_includes}" != "xno"; then
- LDFLAGS_save="$LDFLAGS"
-
- if test "$enable_nss" = "static"; then
- if test -z "${with_nss_libs}"; then
- AC_MSG_ERROR([Static linkage requested, but path to nss libraries not set.]
-[Please specify the path to libnss3.a]
-[Example: --with-nspr-libs=/usr/lib/mozilla])
- else
- nsslibs="-ldb1 $with_nss_libs/libnssckfw.a $with_nss_libs/libasn1.a $with_nss_libs/libcrmf.a $with_nss_libs/libswfci.a $with_nss_libs/libjar.a $with_nss_libs/libpkcs12.a $with_nss_libs/libpkcs7.a $with_nss_libs/libpki1.a $with_nss_libs/libsmime.a $with_nss_libs/libssl.a $with_nss_libs/libnss.a $with_nss_libs/libpk11wrap.a $with_nss_libs/libsoftokn.a $with_nss_libs/libfreebl.a $with_nss_libs/libnsspki.a $with_nss_libs/libnssdev.a $with_nss_libs/libcryptohi.a $with_nss_libs/libcerthi.a $with_nss_libs/libcertdb.a $with_nss_libs/libsecutil.a $with_nss_libs/libnssb.a"
- case "$host" in
- *solaris*)
- nsslibs="$nsslibs $with_nss_libs/libfreebl.a"
- ;;
- esac
- fi
- else
- nsslibs="-lssl3 -lsmime3 -lnss3 -lsoftokn3"
- fi
-
- AC_CACHE_CHECK([for Mozilla nss libraries], moz_nss_libs,
- [
- LIBS_save="$LIBS"
- LDFLAGS="$LDFLAGS -L$with_nspr_libs $nsprlibs -L$with_nss_libs $nsslibs"
- LIBS="$nsslibs $nsprlibs"
- AC_TRY_LINK_FUNC(NSS_Init, moz_nss_libs="yes", moz_nss_libs="no")
- if test "$moz_nss_libs" = no; then
- nsslibs="-lssl3 -lsmime3 -lnss3 -lsoftokn3"
- 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")
- fi
- LDFLAGS="$LDFLAGS_save"
- LIBS="$LIBS_save"
- ])
- if test "$moz_nss_libs" != no; then
- AC_DEFINE(HAVE_NSS)
- AC_DEFINE(HAVE_SSL)
- if test "$enable_nss" = "static"; then
- msg_ssl="yes (Mozilla NSS:static)"
- else
- msg_ssl="yes (Mozilla NSS)"
- fi # static_nss
- msg_smime="yes (Mozilla NSS)"
- enable_smime="yes"
- MANUAL_NSS_LIBS="-L$with_nss_libs $nsslibs"
- else
- MANUAL_NSS_CFLAGS=""
- MANUAL_NSPR_CFLAGS=""
- MANUAL_NSPR_LIBS=""
- fi
- else
- AC_MSG_CHECKING(for Mozilla nss libraries)
- AC_MSG_RESULT(no)
- fi
-
- MANUAL_NSS_CFLAGS="$MANUAL_NSPR_CFLAGS $MANUAL_NSS_CFLAGS"
- MANUAL_NSS_LIBS="$MANUAL_NSPR_LIBS $MANUAL_NSS_LIBS"
- fi
-fi
-
-AM_CONDITIONAL(ENABLE_SMIME, test x$enable_smime = xyes)
-
-AC_SUBST(MANUAL_NSPR_CFLAGS)
-AC_SUBST(MANUAL_NSPR_LIBS)
-AC_SUBST(MANUAL_NSS_CFLAGS)
-AC_SUBST(MANUAL_NSS_LIBS)
-
-dnl ******************
-dnl CDE dtappintegrate
-dnl ******************
-
-AC_ARG_WITH(cde-path, [ --with-cde-path=PATH Location of CDE installation],
- [with_cde_path="$withval"])
-if test -z "$with_cde_path"; then
- with_cde_path="/usr/dt"
-fi
-
-AC_MSG_CHECKING(for dtappintegrate)
-if test -x "$with_cde_path/bin/dtappintegrate" ; then
- DTAPPINTEGRATE="$with_cde_path/bin/dtappintegrate"
-else
- DTAPPINTEGRATE="no"
-fi
-AC_MSG_RESULT([$DTAPPINTEGRATE])
-
-AC_SUBST(DTAPPINTEGRATE)
-AM_CONDITIONAL(HAVE_DTAPPINTEGRATE, test "x$DTAPPINTEGRATE" != "xno")
-
-dnl *****************
-dnl killall or pkill?
-dnl *****************
-
-AC_MSG_CHECKING(for command to kill processes)
-
-if test `uname -s` = "SunOS" ; then
- KILL_PROCESS_CMD="pkill";
-else
- KILL_PROCESS_CMD="killall";
-fi
-
-KILL_PROCESS_CMD=`which $KILL_PROCESS_CMD`
-if test -z "$KILL_PROCESS_CMD" ; then
- AC_MSG_RESULT(none)
-else
- AC_MSG_RESULT($KILL_PROCESS_CMD)
- AC_DEFINE_UNQUOTED([KILL_PROCESS_CMD], "$KILL_PROCESS_CMD", [Command to kill processes by name])
-fi
-
-dnl ******************************
-dnl OpenSSL
-dnl ******************************
-
-dnl only continue detecting OpenSSL if we haven't already found all of the
-dnl Mozilla libnss includes/libraries and if user actually wants ssl support
-if test "$msg_ssl" = "no" -a "x${enable_openssl}" != "xno"; 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")
- 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,1,[Define if you have OpenSSL])
- AC_DEFINE(HAVE_SSL)
- msg_ssl="yes (OpenSSL)"
- 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=""
-fi
-
-AC_SUBST(OPENSSL_CFLAGS)
-AC_SUBST(OPENSSL_LDFLAGS)
-
-dnl *******************
-dnl GObject marshalling
-dnl *******************
-AM_PATH_GLIB_2_0
-
-dnl We use AC_SUBST_FILE because AC_SUBST won't deal with newlines
-EVO_MARSHAL_RULE=$srcdir/marshal.mk
-AC_SUBST_FILE(EVO_MARSHAL_RULE)
-
-dnl *************************
-dnl CFLAGS and LIBS and stuff
-dnl *************************
-
-GNOME_COMPILE_WARNINGS(yes)
-CFLAGS="$CFLAGS $WARN_CFLAGS"
-case $CFLAGS in
-*-Wall*)
- # Turn off the annoying "comparison between signed and unsigned"
- # warning in gcc 3.3
- CFLAGS="$CFLAGS -Wno-sign-compare"
- ;;
-esac
-
-AM_PATH_ORBIT2(2.8.0)
-
-AC_MSG_CHECKING(for CORBA include paths)
-IDL_INCLUDES="-I "`pkg-config --variable=idldir libbonobo-2.0`" -I "`pkg-config --variable=idldir bonobo-activation-2.0`" -I "`pkg-config --variable=idldir evolution-data-server-1.0`
-AC_MSG_RESULT($IDL_INCLUDES)
-AC_SUBST(IDL_INCLUDES)
-
-dnl Utility macro to set compiler flags for a specific lib.
-AC_DEFUN(EVO_SET_COMPILE_FLAGS, [
- deps="$2"
- extra_cflags="$3"
- extra_libs="$4"
- PKG_CHECK_MODULES(EVOLUTION, $deps)
- $1_CFLAGS="$EVOLUTION_CFLAGS \$(WERROR) $extra_cflags"
- $1_LIBS="$EVOLUTION_LIBS $extra_libs"
-])
-
-dnl --- Required version numbers
-
-GAL_REQUIRED=2.1.1
-GTKHTML_REQUIRED=3.1.4
-EDS_REQUIRED=0.0.3
-
-AC_SUBST(GAL_REQUIRED)
-AC_SUBST(GTKHTML_REQUIRED)
-
-dnl --- Flags to get all the GNOME stuff
-
-FULL_GNOME_DEPS="libbonoboui-2.0 gnome-vfs-2.0 libgnomeui-2.0 libglade-2.0 libgnomecanvas-2.0 libxml-2.0 gconf-2.0 gal-2.2 >= $GAL_REQUIRED"
-
-EVO_SET_COMPILE_FLAGS(GNOME_FULL, $FULL_GNOME_DEPS)
-AC_SUBST(GNOME_FULL_CFLAGS)
-AC_SUBST(GNOME_FULL_LIBS)
-
-CPPFLAGS_save="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags-only-I libgnomeui-2.0`"
-AC_CHECK_HEADERS(libgnomeui/gnome-icon-lookup.h)
-AC_CHECK_HEADERS(libgnomeui/gnome-thumbnail.h)
-CPPFLAGS="$CPPFLAGS_save"
-
-dnl --- Flags for the various libraries we build
-
-EVO_SET_COMPILE_FLAGS(CAMEL, glib-2.0 gthread-2.0 gal-2.2 >= $GAL_REQUIRED $mozilla_nss,
- $THREADS_CFLAGS $KRB4_CFLAGS $KRB5_CFLAGS $MANUAL_NSS_CFLAGS $OPENSSL_CFLAGS,
- $THREADS_LIBS $KRB4_LDFLAGS $KRB5_LDFLAGS $MANUAL_NSS_LIBS $OPENSSL_LDFLAGS)
-AC_SUBST(CAMEL_CFLAGS)
-AC_SUBST(CAMEL_LIBS)
-
-if test "x$mozilla_nss" != "x"; then
- EVO_SET_COMPILE_FLAGS(MOZILLA_NSS, $mozilla_nss)
- MOZILLA_L_DIR=`pkg-config --libs-only-L $mozilla_nss`
-else
- if test "x$MOZILLA_MANUAL_LIBS" != "x"; then
- MOZILLA_L_DIR="-L$with_nss_lib"
- fi
-fi
-
-EVO_SET_COMPILE_FLAGS(CERT_UI, glib-2.0 gobject-2.0 gthread-2.0,
- $MANUAL_NSS_CFLAGS $MOZILLA_NSS_CFLAGS,
- $MOZILLA_L_DIR $MANUAL_NSS_LIBS $MOZILLA_NSS_LIBS)
-AC_SUBST(CERT_UI_CFLAGS)
-AC_SUBST(CERT_UI_LIBS)
-
-EVO_SET_COMPILE_FLAGS(E_NAME, libgnomeui-2.0 libbonoboui-2.0 gal-2.2 >= $GAL_REQUIRED)
-AC_SUBST(E_NAME_CFLAGS)
-AC_SUBST(E_NAME_LIBS)
-
-EVO_SET_COMPILE_FLAGS(E_UTIL, gthread-2.0 gconf-2.0 libxml-2.0 libbonoboui-2.0 libglade-2.0 gal-2.2 >= $GAL_REQUIRED libgnomeui-2.0 libgnome-2.0 libgnomecanvas-2.0 $mozilla_nspr, $THREADS_CFLAGS $MANUAL_NSPR_CFLAGS, $THREADS_LIBS $MANUAL_NSPR_LIBS)
-AC_SUBST(E_UTIL_CFLAGS)
-AC_SUBST(E_UTIL_LIBS)
-
-EVO_SET_COMPILE_FLAGS(TZDIALOG, libecal-1.0, $GNOME_FULL_CFLAGS, $GNOME_FULL_LIBS)
-AC_SUBST(TZDIALOG_CFLAGS)
-AC_SUBST(TZDIALOG_LIBS)
-
-EVO_SET_COMPILE_FLAGS(SOURCE_SEL, libedataserver-1.0, $GNOME_FULL_CFLAGS, $GNOME_FULL_LIBS)
-AC_SUBST(SOURCE_SEL_CFLAGS)
-AC_SUBST(SOURCE_SEL_LIBS)
-
-
-dnl
-dnl EVO_SET_COMPILE_FLAGS(E_WIDGETS, bonobo_conf bonobox_print gdk_pixbuf gnomecanvaspixbuf gnomeui libglade oaf vfs)
-dnl AC_SUBST(E_WIDGETS_CFLAGS)
-dnl AC_SUBST(E_WIDGETS_LIBS)
-dnl
-EVO_SET_COMPILE_FLAGS(IMPORTERS, gconf-2.0 libglade-2.0 libbonoboui-2.0 libgnomeui-2.0)
-AC_SUBST(IMPORTERS_CFLAGS)
-AC_SUBST(IMPORTERS_LIBS)
-
-EVO_SET_COMPILE_FLAGS(LIBFILTER, libgnome-2.0 libgnomeui-2.0 libglade-2.0 libxml-2.0 gconf-2.0 gal-2.2 >= $GAL_REQUIRED)
-AC_SUBST(LIBFILTER_CFLAGS)
-AC_SUBST(LIBFILTER_LIBS)
-
-dnl --- evolution (shell) flags
-
-EVO_SET_COMPILE_FLAGS(SHELL, libgnome-2.0 libgnomeui-2.0 libbonoboui-2.0 gal-2.2 >= $GAL_REQUIRED libglade-2.0 gnome-vfs-2.0 libgtkhtml-3.1 >= $GTKHTML_REQUIRED)
-AC_SUBST(SHELL_CFLAGS)
-AC_SUBST(SHELL_LIBS)
-
-dnl --- evolution-addressbook flags
-
-EVOLUTION_ADDRESSBOOK_DEPS="gconf-2.0 libbonoboui-2.0 libglade-2.0 gal-2.2 >= $GAL_REQUIRED libgnomeui-2.0 libgnome-2.0 libgnomecanvas-2.0 gnome-vfs-2.0 libgnomeprintui-2.2 libgtkhtml-3.1 >= $GTKHTML_REQUIRED libebook-1.0 >= $EDS_REQUIRED"
-
-EVO_SET_COMPILE_FLAGS(EVOLUTION_ADDRESSBOOK, $EVOLUTION_ADDRESSBOOK_DEPS)
-AC_SUBST(EVOLUTION_ADDRESSBOOK_CFLAGS)
-AC_SUBST(EVOLUTION_ADDRESSBOOK_LIBS)
-
-if test x$enable_pilot_conduits = xyes; then
-EVO_SET_COMPILE_FLAGS(EVOLUTION_ADDRESSBOOK_CONDUIT, gnome-pilot-2.0 $EVOLUTION_ADDRESSBOOK_DEPS)
-AC_SUBST(EVOLUTION_ADDRESSBOOK_CONDUIT_CFLAGS)
-AC_SUBST(EVOLUTION_ADDRESSBOOK_CONDUIT_LIBS)
-fi
-
-dnl --- evolution-calendar flags
-
-EVO_SET_COMPILE_FLAGS(EVOLUTION_CALENDAR, libgnome-2.0 libgnomeui-2.0 libbonoboui-2.0 gal-2.2 >= $GAL_REQUIRED libglade-2.0 gnome-vfs-2.0 libgnomeprint-2.2 libgnomeprintui-2.2 libgtkhtml-3.1 >= $GTKHTML_REQUIRED libebook-1.0 >= $EDS_REQUIRED libecal-1.0 >= $EDS_REQUIRED)
-AC_SUBST(EVOLUTION_CALENDAR_CFLAGS)
-AC_SUBST(EVOLUTION_CALENDAR_LIBS)
-
-if test x$enable_pilot_conduits = xyes; then
-EVO_SET_COMPILE_FLAGS(EVOLUTION_CALENDAR_CONDUIT, gnome-pilot-2.0, $EVOLUTION_CALENDAR_CFLAGS, $EVOLUTION_CALENDAR_LIBS)
-AC_SUBST(EVOLUTION_CALENDAR_CONDUIT_CFLAGS)
-AC_SUBST(EVOLUTION_CALENDAR_CONDUIT_LIBS)
-fi
-
-dnl --- evolution-mail flags
-
-EVO_SET_COMPILE_FLAGS(EVOLUTION_MAIL, libgnome-2.0 libgnomeui-2.0 libbonoboui-2.0 gal-2.2 >= $GAL_REQUIRED libglade-2.0 gnome-vfs-module-2.0 libgnomeprint-2.2 libgnomeprintui-2.2 libgtkhtml-3.1 >= $GTKHTML_REQUIRED libxml-2.0 bonobo-activation-2.0 gthread-2.0 gconf-2.0 $mozilla_nss libebook-1.0)
-AC_SUBST(EVOLUTION_MAIL_CFLAGS)
-AC_SUBST(EVOLUTION_MAIL_LIBS)
-
-dnl -- evolution-data-server IDL and version
-
-AC_DEFINE_UNQUOTED(DATASERVER_VERSION, "`pkg-config --modversion evolution-data-server-1.0`", evolution-data-server version)
-
-AC_MSG_CHECKING(for evolution-data-server IDL)
-DATASERVER_IDL=`pkg-config --variable=idldir evolution-data-server-1.0`/Evolution-DataServer.idl
-if test -f "$DATASERVER_IDL"; then
- AC_MSG_RESULT($DATASERVER_IDL)
- AC_SUBST(DATASERVER_IDL)
-else
- AC_MSG_ERROR(no)
-fi
-
-dnl *******************
-dnl Special directories
-dnl *******************
-
-dnl --- If you add something here, consider whether or not you also
-dnl --- need to add it to one or more .pc.in files (for Connector,
-dnl --- etc)
-
-BASE_VERSION=`echo $VERSION | awk -F. '{print $1 "." $2;}'`
-AC_SUBST(BASE_VERSION)
-AC_DEFINE_UNQUOTED(BASE_VERSION, "$BASE_VERSION", [Base version (Major.Minor)])
-
-privlibdir='${libdir}'/evolution/$BASE_VERSION
-AC_SUBST(privlibdir)
-
-privlibexecdir='${libexecdir}'/evolution/$BASE_VERSION
-AC_SUBST(privlibexecdir)
-
-privdatadir='${datadir}'/evolution/$BASE_VERSION
-AC_SUBST(privdatadir)
-
-privincludedir='${includedir}'/evolution-$BASE_VERSION
-AC_SUBST(privincludedir)
-
-camel_providerdir="$privlibdir/camel-providers"
-AC_SUBST(camel_providerdir)
-
-componentdir="$privlibdir/components"
-AC_SUBST(componentdir)
-
-idldir="$datadir/idl/evolution-$BASE_VERSION"
-AC_SUBST(idldir)
-
-serverdir="$libdir/bonobo/servers"
-AC_SUBST(serverdir)
-
-evolutionuidir="$privdatadir/ui"
-AC_SUBST(evolutionuidir)
-
-imagesdir="$privdatadir/images"
-AC_SUBST(imagesdir)
-
-buttonsdir="$privdatadir/images/buttons"
-AC_SUBST(buttonsdir)
-
-soundsdir="$privdatadir/sounds"
-AC_SUBST(soundsdir)
-
-gladedir="$privdatadir/glade"
-AC_SUBST(gladedir)
-
-etspecdir="$privdatadir/etspec"
-AC_SUBST(etspecdir)
-
-viewsdir="$privdatadir/views"
-AC_SUBST(viewsdir)
-
-privconduitdir='${libdir}'/evolution/$BASE_VERSION/conduits
-AC_SUBST(privconduitdir)
-
-dnl ************************
-dnl IDL/Component Versioning
-dnl ************************
-
-INTERFACE_VERSION="$BASE_VERSION"
-AC_SUBST(INTERFACE_VERSION)
-AC_DEFINE_UNQUOTED(INTERFACE_VERSION, "INTERFACE_VERSION", [IDL interface version (Major.Minor)])
-
-EVO_SERVER_RULE=$srcdir/server.mk
-AC_SUBST_FILE(EVO_SERVER_RULE)
-
-##################################################
-# 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 GConf stuff
-dnl ***********
-AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
-AM_GCONF_SOURCE_2
-
-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", [Version substring, for packagers])
-
-AC_ARG_ENABLE(default-binary, [ --disable-default-binary Do not install as the default "evolution" binary ], , enable_default_binary=no)
-AM_CONDITIONAL(DEFAULT_BINARY, test x$enable_default_binary = xyes)
-
-
-dnl ********************
-dnl KDE applnk directory
-dnl ********************
-AC_ARG_WITH(kde-applnk-path, [ --with-kde-applnk-path=PATH Location of KDE applnk files],
- [with_kde_applnk_path="$withval"],
- [with_kde_applnk_path="no"])
-if test x"$with_kde_applnk_path" != x"no"; then
- if test -z "$with_kde_applnk_path"; then
- with_kde_applnk_path="$datadir/applnk"
- fi
- KDE_APPLNK_DIR="$with_kde_applnk_path"
-else
- KDE_APPLNK_DIR=""
-fi
-AM_CONDITIONAL(HAVE_KDE_APPLNK, test x"$KDE_APPLNK_DIR" != x)
-AC_SUBST(KDE_APPLNK_DIR)
-
-dnl ******************************
-dnl Makefiles
-dnl ******************************
-
-export privlibdir
-export privincludedir
-export privdatadir
-
-EVOLUTION_DIR=`(cd $srcdir; pwd)`
-AC_SUBST(EVOLUTION_DIR)
-
-AC_OUTPUT([ po/Makefile.in
-Makefile
-a11y/Makefile
-a11y/calendar/Makefile
-a11y/widgets/Makefile
-addressbook/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/conduit/Makefile
-addressbook/printing/Makefile
-addressbook/util/Makefile
-art/Makefile
-camel/Makefile
-camel/providers/Makefile
-camel/providers/imap/Makefile
-camel/providers/imapp/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
-data/Makefile
-data/cde_app_root/Makefile
-data/cde_app_root/dt/Makefile
-data/cde_app_root/dt/appconfig/Makefile
-data/cde_app_root/dt/appconfig/appmanager/Makefile
-data/cde_app_root/dt/appconfig/appmanager/C/Makefile
-data/cde_app_root/dt/appconfig/appmanager/C/Ximian/Makefile
-data/cde_app_root/dt/appconfig/icons/Makefile
-data/cde_app_root/dt/appconfig/icons/C/Makefile
-data/cde_app_root/dt/appconfig/types/Makefile
-data/cde_app_root/dt/appconfig/types/C/Makefile
-data/cde_app_root/dt/appconfig/types/C/Ximian.dt
-default_user/Makefile
-default_user/local/Makefile
-default_user/local/Calendar/Makefile
-default_user/local/Contacts/Makefile
-default_user/local/Drafts/Makefile
-default_user/local/Inbox/Makefile
-default_user/local/Outbox/Makefile
-default_user/local/Sent/Makefile
-default_user/local/Tasks/Makefile
-default_user/local/Trash/Makefile
-e-util/Makefile
-filter/Makefile
-help/Makefile
-help/C/Makefile
-shell/Makefile
-shell/evolution-nognome
-shell/glade/Makefile
-shell/importer/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
-calendar/Makefile
-calendar/importers/Makefile
-calendar/idl/Makefile
-calendar/conduits/Makefile
-calendar/conduits/todo/Makefile
-calendar/conduits/calendar/Makefile
-calendar/gui/Makefile
-calendar/gui/alarm-notify/Makefile
-calendar/gui/dialogs/Makefile
-composer/Makefile
-mail/Makefile
-smime/Makefile
-smime/lib/Makefile
-smime/gui/Makefile
-tools/Makefile
-evolution-shell.pc
-camel.pc
-])
-
-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"
-if test "$msg_nntp" = "yes"; then
-echo "\
- NNTP support: $msg_nntp"
-fi
-echo "\
- Pilot conduits: $msg_pilot
- Kerberos 4/5: $msg_krb4/$msg_krb5
- SSL support: $msg_ssl
- SMIME support: $msg_smime
- IPv6 support: $msg_ipv6
- 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 f33f034bf0..0000000000
--- a/data/Makefile.am
+++ /dev/null
@@ -1,65 +0,0 @@
-desktopdir = $(datadir)/applications
-desktop_in_in_file = evolution.desktop.in.in
-desktop_file = $(desktop_in_in_file:.desktop.in.in=.desktop)
-%.desktop.in: %.desktop.in.in
- sed -e "s|\@BASE_VERSION\@|$(BASE_VERSION)|" $< > $@
-@INTLTOOL_DESKTOP_RULE@
-
-keysdir = $(datadir)/mime-info
-keys_in_file = evolution.keys.in
-keys_file = $(keys_in_file:.keys.in=.keys)
-@INTLTOOL_KEYS_RULE@
-
-mimedir = $(datadir)/mime-info
-mime_file = evolution.mime
-
-if HAVE_KDE_APPLNK
-
-kdedesktopdir = $(KDE_APPLNK_DIR)/Applications
-kdedesktop_file = $(desktop_in_in_file:.desktop.in.in=.desktop)
-
-install-kde-applnk:
- $(mkinstalldirs) $(DESTDIR)$(kdedesktopdir); \
- $(INSTALL_DATA) $(kdedesktop_file) \
- $(DESTDIR)$(kdedesktopdir)/$(kdedesktop_file:.desktop=-$(BASE_VERSION).desktop)
-else
-
-install-kde-applnk:
-
-endif
-
-noinst_MANS = evolution.1
-noinst_DATA = $(keys_file) $(desktop_file)
-
-SUBDIRS = cde_app_root
-
-install-data-local: install-kde-applnk $(desktop_file) $(keys_file) $(mime_file)
- $(mkinstalldirs) $(DESTDIR)$(desktopdir); \
- $(INSTALL_DATA) $(desktop_file) \
- $(DESTDIR)$(desktopdir)/$(desktop_file:.desktop=-$(BASE_VERSION).desktop) ; \
- $(mkinstalldirs) $(DESTDIR)$(keysdir); \
- $(INSTALL_DATA) $(keys_file) $(DESTDIR)$(keysdir)/$(keys_file:.keys=-$(BASE_VERSION).keys) ; \
- $(mkinstalldirs) $(DESTDIR)$(mimedir); \
- $(INSTALL_DATA) $(mime_file) $(DESTDIR)$(mimedir)/$(mime_file:.mime=-$(BASE_VERSION).mime) ;
-
-# CDE Stuff
-
-if HAVE_DTAPPINTEGRATE
-
-# This installs Evolution into the Application Manager on CDE
-dtappintegrate:
- $(DTAPPINTEGRATE) -s $(privdatadir)/cde_app_root
-
-# ...And this uninstalls it
-dtappunintegrate:
- $(DTAPPINTEGRATE) -u -s $(privdatadir)/cde_app_root
-
-endif
-
-EXTRA_DIST = \
- $(desktop_in_in_file) \
- $(mime_file) \
- $(keys_file) \
- $(keys_in_file) \
- $(noinst_MANS)
-
diff --git a/data/cde_app_root/.cvsignore b/data/cde_app_root/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/data/cde_app_root/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/data/cde_app_root/Makefile.am b/data/cde_app_root/Makefile.am
deleted file mode 100644
index 56b759c9eb..0000000000
--- a/data/cde_app_root/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-SUBDIRS = dt \ No newline at end of file
diff --git a/data/cde_app_root/dt/.cvsignore b/data/cde_app_root/dt/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/data/cde_app_root/dt/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/data/cde_app_root/dt/Makefile.am b/data/cde_app_root/dt/Makefile.am
deleted file mode 100644
index 8c9d98022f..0000000000
--- a/data/cde_app_root/dt/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-SUBDIRS = appconfig \ No newline at end of file
diff --git a/data/cde_app_root/dt/appconfig/.cvsignore b/data/cde_app_root/dt/appconfig/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/data/cde_app_root/dt/appconfig/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/data/cde_app_root/dt/appconfig/Makefile.am b/data/cde_app_root/dt/appconfig/Makefile.am
deleted file mode 100644
index 3bc34b8d0b..0000000000
--- a/data/cde_app_root/dt/appconfig/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-SUBDIRS = appmanager icons types \ No newline at end of file
diff --git a/data/cde_app_root/dt/appconfig/appmanager/.cvsignore b/data/cde_app_root/dt/appconfig/appmanager/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/data/cde_app_root/dt/appconfig/appmanager/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/data/cde_app_root/dt/appconfig/appmanager/C/.cvsignore b/data/cde_app_root/dt/appconfig/appmanager/C/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/data/cde_app_root/dt/appconfig/appmanager/C/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/data/cde_app_root/dt/appconfig/appmanager/C/Makefile.am b/data/cde_app_root/dt/appconfig/appmanager/C/Makefile.am
deleted file mode 100644
index ea9b837cf0..0000000000
--- a/data/cde_app_root/dt/appconfig/appmanager/C/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-SUBDIRS = Ximian \ No newline at end of file
diff --git a/data/cde_app_root/dt/appconfig/appmanager/C/Ximian/.cvsignore b/data/cde_app_root/dt/appconfig/appmanager/C/Ximian/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/data/cde_app_root/dt/appconfig/appmanager/C/Ximian/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/data/cde_app_root/dt/appconfig/appmanager/C/Ximian/Evolution b/data/cde_app_root/dt/appconfig/appmanager/C/Ximian/Evolution
deleted file mode 100755
index cad83932e6..0000000000
--- a/data/cde_app_root/dt/appconfig/appmanager/C/Ximian/Evolution
+++ /dev/null
@@ -1,17 +0,0 @@
-################################################
-#
-# action
-#
-# Common Desktop Environment (CDE)
-#
-# $Revision: 1.2 $
-#
-################################################
-
-# This file represents a CDE Dt action. The contents of the file do
-# not matter; however, the file must have executable permission and the
-# name of the file must match an entry in the action database (*.dt files).
-#
-# For more information on Dt actions, see the CDE Dt manuals.
-
-echo "Common Desktop Environment Dt action"
diff --git a/data/cde_app_root/dt/appconfig/appmanager/C/Ximian/Makefile.am b/data/cde_app_root/dt/appconfig/appmanager/C/Ximian/Makefile.am
deleted file mode 100644
index 0d3ff391ec..0000000000
--- a/data/cde_app_root/dt/appconfig/appmanager/C/Ximian/Makefile.am
+++ /dev/null
@@ -1,6 +0,0 @@
-EXTRA_DIST = Evolution
-
-if HAVE_DTAPPINTEGRATE
-cdeappmanagerdir = $(privdatadir)/cde_app_root/dt/appconfig/appmanager/C/Ximian
-cdeappmanager_SCRIPTS = Evolution
-endif
diff --git a/data/cde_app_root/dt/appconfig/appmanager/Makefile.am b/data/cde_app_root/dt/appconfig/appmanager/Makefile.am
deleted file mode 100644
index 9f660cf34e..0000000000
--- a/data/cde_app_root/dt/appconfig/appmanager/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-SUBDIRS = C \ No newline at end of file
diff --git a/data/cde_app_root/dt/appconfig/icons/.cvsignore b/data/cde_app_root/dt/appconfig/icons/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/data/cde_app_root/dt/appconfig/icons/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/data/cde_app_root/dt/appconfig/icons/C/.cvsignore b/data/cde_app_root/dt/appconfig/icons/C/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/data/cde_app_root/dt/appconfig/icons/C/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/data/cde_app_root/dt/appconfig/icons/C/Evolution.l.pm b/data/cde_app_root/dt/appconfig/icons/C/Evolution.l.pm
deleted file mode 100644
index 907f0ad825..0000000000
--- a/data/cde_app_root/dt/appconfig/icons/C/Evolution.l.pm
+++ /dev/null
@@ -1,307 +0,0 @@
-/* XPM */
-static char * evo_cde_48_xpm[] = {
-"48 48 256 2",
-" c None",
-". c #020202",
-"+ c #3C2E06",
-"@ c #6E6E6E",
-"# c #AA8616",
-"$ c #AA8E2A",
-"% c #BA9E32",
-"& c #BAA65E",
-"* c #C6AE4A",
-"= c #AEAEAE",
-"- c #AE5A0A",
-"; c #D6C26E",
-"> c #DAC276",
-", c #7E7E7E",
-"' c #FEFEF6",
-") c #864E0A",
-"! c #8A6E0E",
-"~ c #EAB216",
-"{ c #2E1A02",
-"] c #6A5A1A",
-"^ c #C2C2C2",
-"/ c #FCDE8A",
-"( c #6A3606",
-"_ c #9E720E",
-": c #2A1E02",
-"< c #664A0A",
-"[ c #E6DA9E",
-"} c #D2A612",
-"| c #BA9A32",
-"1 c #DEDEDE",
-"2 c #A26E0E",
-"3 c #121212",
-"4 c #3E320A",
-"5 c #FEEEC2",
-"6 c #CEA212",
-"7 c #B26E0E",
-"8 c #5A5A5A",
-"9 c #C6A632",
-"0 c #AE820E",
-"a c #0B0602",
-"b c #D8BA46",
-"c c #3E3A22",
-"d c #FAE69E",
-"e c #FAE6A2",
-"f c #82560A",
-"g c #8A8A8A",
-"h c #5A4A0E",
-"i c #CABA7E",
-"j c #E6BA1E",
-"k c #8A7E4A",
-"l c #FCF2CA",
-"m c #FEE6AA",
-"n c #BE8E12",
-"o c #462606",
-"p c #E6C646",
-"q c #CA9212",
-"r c #5E4E16",
-"s c #4E3206",
-"t c #EEBA16",
-"u c #BAAA6E",
-"v c #F6C626",
-"w c #70500A",
-"x c #EEEEEE",
-"y c #2E260C",
-"z c #DACA82",
-"A c #AA9A5E",
-"B c #8E5A0A",
-"C c #FEEAB6",
-"D c #BE6A0E",
-"E c #663E0A",
-"F c #5A5226",
-"G c #BE6E0E",
-"H c #B6B6B6",
-"I c #FEF2CE",
-"J c #C27A0E",
-"K c #E6D272",
-"L c #DED6BA",
-"M c #8A8252",
-"N c #3E320E",
-"O c #B6720E",
-"P c #E6CA58",
-"Q c #E6D682",
-"R c #1A1202",
-"S c #1E1E16",
-"T c #9E9E9E",
-"U c #0E0A02",
-"V c #969696",
-"W c #88640C",
-"X c #F6F6F6",
-"Y c #C2720E",
-"Z c #2E2E2E",
-"` c #E3A614",
-" . c #E2E2E2",
-".. c #8E7A3E",
-"+. c #7A620B",
-"@. c #C67A0E",
-"#. c #AE5E0A",
-"$. c #362606",
-"%. c #D18612",
-"&. c #F2BE16",
-"*. c #3E3612",
-"=. c #828281",
-"-. c #C6C6C6",
-";. c #F6CA2A",
-">. c #6A420A",
-",. c #E6E6E6",
-"'. c #4E4E4E",
-"). c #7A6212",
-"!. c #8E6A0E",
-"~. c #3A3A3A",
-"{. c #0A0A0A",
-"]. c #F6C61B",
-"^. c #CE8212",
-"/. c #FAD258",
-"(. c #CE9212",
-"_. c #D2A212",
-":. c #C68E12",
-"<. c #5E3206",
-"[. c #261602",
-"}. c #F6CE42",
-"|. c #DA9612",
-"1. c #2E2204",
-"2. c #4E4626",
-"3. c #6A6A6A",
-"4. c #965A0A",
-"5. c #E6AE16",
-"6. c #F6DA66",
-"7. c #AAAAAA",
-"8. c #D2D2D0",
-"9. c #1A0E02",
-"0. c #964E0A",
-"a. c #FADA80",
-"b. c #F7D660",
-"c. c #F6D252",
-"d. c #F6CA2E",
-"e. c #262626",
-"f. c #D28A12",
-"g. c #92620E",
-"h. c #464646",
-"i. c #BA660E",
-"j. c #FEFAEA",
-"k. c #BE760E",
-"l. c #767676",
-"m. c #523606",
-"n. c #CECECC",
-"o. c #0E0E06",
-"p. c #BABABA",
-"q. c #7E420A",
-"r. c #DE9E12",
-"s. c #F7CE3B",
-"t. c #B6961A",
-"u. c #A6760E",
-"v. c #F2C216",
-"w. c #603C06",
-"x. c #8A8E8E",
-"y. c #D6D6D2",
-"z. c #3E2606",
-"A. c #CA7E12",
-"B. c #7A6A28",
-"C. c #BA620E",
-"D. c #4E3E06",
-"E. c #F2F2F2",
-"F. c #0E0E0A",
-"G. c #A2620E",
-"H. c #F6E280",
-"I. c #CE8E12",
-"J. c #1E1A06",
-"K. c #C6760E",
-"L. c #BEBEBE",
-"M. c #D68E12",
-"N. c #D29212",
-"O. c #6A3A06",
-"P. c #825E0A",
-"Q. c #FAD672",
-"R. c #F6D24B",
-"S. c #522A06",
-"T. c #9A8232",
-"U. c #FCE49A",
-"V. c #323232",
-"W. c #8E520A",
-"X. c #EDB616",
-"Y. c #D69A12",
-"Z. c #F6DA6D",
-"`. c #E1A212",
-" + c #F6D246",
-".+ c #362206",
-"++ c #F6CE35",
-"@+ c #0E0E02",
-"#+ c #E6AA16",
-"$+ c #321E05",
-"%+ c #9E5A0A",
-"&+ c #8E8E8E",
-"*+ c #AE760E",
-"=+ c #6A5612",
-"-+ c #866A0E",
-";+ c #EAEAE2",
-">+ c #563E06",
-",+ c #764A0A",
-"'+ c #B89A2A",
-")+ c #221202",
-"!+ c #1E1E1E",
-"~+ c #DD9A12",
-"{+ c #F6D659",
-"]+ c #F6C216",
-"^+ c #F6DE72",
-"/+ c #D69212",
-"(+ c #5E5E5E",
-"_+ c #8A4A0A",
-":+ c #8A560A",
-"<+ c #C26E0E",
-"[+ c #F6C622",
-"}+ c #F6CA26",
-"|+ c #9A620E",
-"1+ c #160E02",
-"2+ c #291A02",
-"3+ c #F6DE7A",
-"4+ c #DADADA",
-"5+ c #BE660E",
-"6+ c #3E361E",
-"7+ c #C6720E",
-"8+ c #72460A",
-"9+ c #5A3A06",
-"0+ c #723E06",
-"a+ c #A2A2A2",
-"b+ c #3E3E3E",
-"c+ c #929292",
-"d+ c #222222",
-"e+ c #8E4E0A",
-"f+ c #CE7E12",
-"g+ c #CA7A0F",
-"h+ c #FEF6D7",
-"i+ c #FAFAFA",
-"j+ c #F6CA33",
-"k+ c #3E3206",
-"l+ c #C07E10",
-"m+ c #9A9A9A",
-"n+ c #F6D652",
-"o+ c #F2BA16",
-"p+ c #3A2A06",
-"q+ c #422A06",
-"r+ c #FEFEFE",
-"s+ c #EAEAEA",
-"t+ c #0E0E0E",
-"u+ c #FAD244",
-"v+ c #161616",
-"w+ c #FAF2C6",
-"x+ c #2E2A12",
-"y+ c #B6760E",
-"z+ c #9A5E0E",
-"A+ c #A27A0E",
-"B+ c #6E3E06",
-"C+ c #1E1602",
-"D+ c #865A0A",
-"E+ c #EAAE16",
-"F+ c #D28E12",
-"G+ c #DA9212",
-" ",
-" ",
-" . . . . . . . . . ",
-" . . . . . . . . . . . . . . . ",
-" . . . . . . . . . . . . . . . . . . . . . ",
-" . . . . . . . . 4 h ).+.+.+.+ C+. . . . . . . ",
-" . . . . . . o.r $ ++s.++d.v ].].v.&._.W 1.. . . . . . ",
-" . . . . . @+B.p R.}.}.}.}.}.++v [+].v.&.&.~ 0 p+. . . . . ",
-" . . . . . N b c.c.b.b.{+c.R.}. +++d.v ].&.&.t ~ 5.P.. . . . . ",
-" . . . . . B.b.5 l ; Z.Z.Z.6.6.{+c.}.j+d.[+].v.&.X.E+#+:.: . . . . ",
-" . . . . . T.Z.j.r+y.@+2.K 3+Z.Z.b.{+{+% '+;.].v.&.t ~ #+`.N.: . . . . ",
-" . . . . T.Z.h+j.5 6+@ '.o.A H.3+^+Z.p {.{.=+j v.v.o+~ 5.#+`.I.2+. . . ",
-" . . . . ] {+5 l l M S r+n.t+i u K H.^+F Z g V.o.# v.&.t E+` r.~+l+. . . . ",
-" . . . . y R.U.5 l z o.^ r+= S [ !+t+A & . b+V T 3.{.D.} o+~ 5.` ~+/+g.. . . . ",
-" . . . . '+b.m C e 6+@ r+r+x b+. b+= t+. , b+{.@ T c+h.U -+~ #+` r.G+f.q+. . . ",
-" . . . N R./ U.U.M !+x r+r+r+r+r+r+r+x '.t+= = t+V.&+T l.3 + n ` r.|.F+O . . . ",
-" . . . . t.c.a./ > t+L.r+s+r+r+r+r+r+r+r+r+a+. a+x t+{.8 T T '.. w ~+|.F+^.z.. . . ",
-" . . . C+}.c.Q.a.6+@ r+,.p.8.i+r+r+r+E.r+r+, @ r+b+. = !+e.=.T , e.C+2 f.%.:+. . . ",
-" . . . =+j+c./...d+E.E.-.1 ^ ^ ,.r+ .&+L.X T t+@ t+!+b+ ., . '.a+T 8 {.9+J @.. . . ",
-" . . . . t.j+}.b o.T r+E.L.= y.n.p.n.X -.x.m+ .T =.n.E.d+@ r+= . 3 l.T g V.a 4.$+. . . ",
-" . . . . j d.}. +B.. , r+@ {., ^ y.L.L. .E.7.x.L.X r+&+!+x r+b+, &+t+h.V g . G.( . . . ",
-" . . . . v.}+++}.R.* x+d+t+&+!+Z a+8.n.p.n.E.n.c+y.1 t+. @ &+d+x r+1 '.a !+w.Y B+. . . ",
-" . . . k+v.].d.++}.c.p t+. .E.@ t+3.^ y.^ L. .x r+b+@ .b+. =.r+r+r+r+(+9.k.k.W.. . . ",
-" . . . + &.v.[+j+}.R.B.b+'.&+r+r+L.Z d+V 8.n.p.X a+d+x r+'.b+t+'. .r+E.3 |+@.<+e+. . . ",
-" . . . 1.&.v.v.}+j+9 . n.T Z r+r+r+r+=.. 8 H x x t+L.r+^ t+x E.@ 3 &+'.p+f+K.<+e+. . . ",
-" . . . . t &.v.v.}+y , r+x . .r+r+r+r+4+h.v+L.'.. V.= !+&+r+r+r+L.Z a @.A.K.D ( . . . ",
-" . . . . 6 o+v.v.! Z r+r+r+'.c+r+r+r+r+r+r+&+t+. 1 c+t+3 E.r+r+r+x d+f f+K.Y D S.. . . ",
-" . . . . A+X.t } @+^ r+r+r+&+Z r+r+r+r+r+r+r+E.'.t+&+. '.t+a+r+r+@ 1.^.A.K.D C.{ . . . ",
-" . . . r ~ X.+ @ .a+(+!+t+. .r+r+r+r+r+r+r+r+= !+!+1 = d+h.= a y+A.K.Y i.- . . . ",
-" . . . R #+_ . t+t+'.c+8.r+'.&+r+r+r+r+r+r+r+r+r+x !+@ r+x @ . >.^.g+7+D C.0+. . . ",
-" . . . . _ !.U b+x r+r+r+r+T V.^ a+=.=., =.=.=.h.Z d+x r+r+&+2+^.A.k.<+5+C.{ . . . ",
-" . . . p+`.q p+!+= r+r+r+x b+b+b+!+'.=., , , T . &+r+r+1 F.|+A.K.<+5+C._+. . . ",
-" . . . . W `.` _ U '.E.r+r+r+r+r+@ @ r+r+r+r+'.: U @ E.b+9+A.K.<+D i.C.)+. . . ",
-" . . . . a I.r.`.Y.>+t+c+r+r+r+r+L.!+r+r+r+= {.f.l+$.!+R O K.<+D C.C.( . . . . ",
-" . . . . .+/+|.r.r.u.C+h.1 r+r+r+3 1 r+E.S P.N.f.%.:+:+K.Y D i.C.0.. . . . ",
-" . . . . m./+/+|.|.I.< . =.r+r+(+c+r+@ .+f.%.^.A.g+7+<+D i.C.0.a . . . ",
-" . . . . . s f.F+M.G+M.*+2+V.L.T '.L.{.y+^.A.g+K.7+G i.C.C.0.a . . . . ",
-" . . . . . p+J %.%.f.%.f.,+U (+. Z 8+g+@.K.Y <+D i.C.#._+a . . . . ",
-" . . . . . 1+z+A.A.A.A.A.7 $+. [.@.K.Y <+D i.C.C.#.S.. . . . . ",
-" . . . . . . : 4.K.K.K.K.K.) %+<+D D i.C.C.- <.a . . . . . ",
-" . . . . . . . [.B+4.D D D 5+i.C.C.#.q.o a . . . . . . ",
-" . . . . . . . . . { { { { { 1+. . . . . . . . ",
-" . . . . . . . . . . . . . . . . . . . . . ",
-" . . . . . . . . . . . . . . . ",
-" . . . . . . . . . ",
-" ",
-" ",
-" "};
diff --git a/data/cde_app_root/dt/appconfig/icons/C/Evolution.m.pm b/data/cde_app_root/dt/appconfig/icons/C/Evolution.m.pm
deleted file mode 100644
index 72b591dd3f..0000000000
--- a/data/cde_app_root/dt/appconfig/icons/C/Evolution.m.pm
+++ /dev/null
@@ -1,291 +0,0 @@
-/* XPM */
-static char * evo_cde_32_xpm[] = {
-"32 32 256 2",
-" c None",
-". c #020202",
-"+ c #121212",
-"@ c #7A620C",
-"# c #767676",
-"$ c #BA8E12",
-"% c #B6962A",
-"& c #C6AA3A",
-"* c #DABA46",
-"= c #E2C24A",
-"- c #E2CA6E",
-"; c #7E420A",
-"> c #B25E0E",
-", c #E6D276",
-"' c #362A06",
-") c #D2D2D2",
-"! c #AA7A0E",
-"~ c #FEF6DE",
-"{ c #66520E",
-"] c #825E12",
-"^ c #CAA212",
-"/ c #FEDE8A",
-"( c #D6D6D6",
-"_ c #6C3C08",
-": c #EAE6DA",
-"< c #A28E52",
-"[ c #DAB216",
-"} c #7A6216",
-"| c #E6E6E6",
-"1 c #5E4E1A",
-"2 c #323232",
-"3 c #5E5E5E",
-"4 c #B07610",
-"5 c #C2AA5A",
-"6 c #EAEADE",
-"7 c #482E06",
-"8 c #CEBE8A",
-"9 c #EAEAEA",
-"0 c #D6B236",
-"a c #3A2206",
-"b c #A29666",
-"c c #8A5E0E",
-"d c #5A4E1E",
-"e c #7A723E",
-"f c #EEB616",
-"g c #F6DE92",
-"h c #463A16",
-"i c #BE7612",
-"j c #AAAAAA",
-"k c #9A520E",
-"l c #E2B622",
-"m c #3E3E3E",
-"n c #B66A0E",
-"o c #7B7A7A",
-"p c #BE860E",
-"q c #665A22",
-"r c #88480A",
-"s c #FEEAA6",
-"t c #BEBEBE",
-"u c #B2A65E",
-"v c #E2BA2E",
-"w c #262212",
-"x c #BE9212",
-"y c #928A62",
-"z c #965E0A",
-"A c #EEE6DE",
-"B c #524E3A",
-"C c #B6B6B6",
-"D c #5E5A42",
-"E c #824E0A",
-"F c #7A6A32",
-"G c #A6A6A6",
-"H c #2E2E2E",
-"I c #5E3206",
-"J c #F6C622",
-"K c #F6CA2E",
-"L c #FEEAB2",
-"M c #DADADA",
-"N c #6E6E6E",
-"O c #EEEADE",
-"P c #828282",
-"Q c #54400C",
-"R c #8E560E",
-"S c #EECA4A",
-"T c #EABA16",
-"U c #9A720E",
-"V c #8E8E8D",
-"W c #BA7E0E",
-"X c #D2CAA2",
-"Y c #CA9412",
-"Z c #F2F2F2",
-"` c #EEEAD6",
-" . c #BE6A0E",
-".. c #C2C2C2",
-"+. c #584816",
-"@. c #FAFAFA",
-"#. c #FEF2C6",
-"$. c #6A6A6A",
-"%. c #9A9A98",
-"&. c #4A3A26",
-"*. c #EAE6E2",
-"=. c #726A62",
-"-. c #281804",
-";. c #464646",
-">. c #C27A12",
-",. c #F2E6CE",
-"'. c #DE9A12",
-"). c #F3C218",
-"!. c #9E620E",
-"~. c #BE720E",
-"{. c #AE8612",
-"]. c #F6DA66",
-"^. c #EAEAE6",
-"/. c #66665E",
-"(. c #CACACA",
-"_. c #EEEADA",
-":. c #6E520E",
-"<. c #3A3622",
-"[. c #C68612",
-"}. c #221E1A",
-"|. c #F6DA6A",
-"1. c #FCEEC0",
-"2. c #BAA23E",
-"3. c #DEDEDE",
-"4. c #CE9212",
-"5. c #AA8A1E",
-"6. c #B29E52",
-"7. c #8E6E0E",
-"8. c #C28212",
-"9. c #EECA42",
-"0. c #5A5646",
-"a. c #524E42",
-"b. c #ADAEAE",
-"c. c #BA660E",
-"d. c #E6AA16",
-"e. c #FEFEFE",
-"f. c #3A3A3A",
-"g. c #878685",
-"h. c #F6D046",
-"i. c #AC680E",
-"j. c #E2B216",
-"k. c #46361E",
-"l. c #78560A",
-"m. c #78400A",
-"n. c #F6F6F6",
-"o. c #DE9E12",
-"p. c #7E6C26",
-"q. c #B69A3A",
-"r. c #362606",
-"s. c #AA5A0E",
-"t. c #161202",
-"u. c #969696",
-"v. c #F6D24A",
-"w. c #96520A",
-"x. c #565656",
-"y. c #56421E",
-"z. c #CA8612",
-"A. c #3E2206",
-"B. c #CE8212",
-"C. c #463E2E",
-"D. c #666256",
-"E. c #4E4E46",
-"F. c #865E0A",
-"G. c #402C06",
-"H. c #522E06",
-"I. c #524A3E",
-"J. c #EEEEEE",
-"K. c #76726A",
-"L. c #F3EACD",
-"M. c #7E560A",
-"N. c #423E2E",
-"O. c #92560A",
-"P. c #525252",
-"Q. c #463612",
-"R. c #4A4222",
-"S. c #5E3E0A",
-"T. c #D68E12",
-"U. c #4A4232",
-"V. c #2E221A",
-"W. c #1E1810",
-"X. c #6A561A",
-"Y. c #A25E0A",
-"Z. c #7A4E0A",
-"`. c #C16E0E",
-" + c #EEE6DA",
-".+ c #F2DA72",
-"++ c #9E5A0A",
-"@+ c #B2720E",
-"#+ c #262626",
-"$+ c #F6D242",
-"%+ c #B2B2B2",
-"&+ c #AE6E0E",
-"*+ c #3E320E",
-"=+ c #DA9612",
-"-+ c #CA7A11",
-";+ c #EEBA16",
-">+ c #5A5A59",
-",+ c #F6CE3C",
-"'+ c #C5760E",
-")+ c #EAAE16",
-"!+ c #E2E2E2",
-"~+ c #F2EAD2",
-"{+ c #F4C61A",
-"]+ c #C97E12",
-"^+ c #EAEAE2",
-"/+ c #524A22",
-"(+ c #F6D24E",
-"_+ c #626262",
-":+ c #C2720E",
-"<+ c #929292",
-"[+ c #4A4A49",
-"}+ c #CECECE",
-"|+ c #BA620E",
-"1+ c #2A2206",
-"2+ c #D18A12",
-"3+ c #FADA76",
-"4+ c #423826",
-"5+ c #C2A246",
-"6+ c #462606",
-"7+ c #BABAB9",
-"8+ c #422E12",
-"9+ c #2E2612",
-"0+ c #723A06",
-"a+ c #1E1602",
-"b+ c #52422A",
-"c+ c #B6620E",
-"d+ c #C6C6C6",
-"e+ c #8A8A8A",
-"f+ c #5A3E14",
-"g+ c #B29A46",
-"h+ c #F6CA26",
-"i+ c #F2BE16",
-"j+ c #DFA213",
-"k+ c #E9B216",
-"l+ c #F6D656",
-"m+ c #BE660E",
-"n+ c #B27A0E",
-"o+ c #424242",
-"p+ c #B66E0E",
-"q+ c #82520A",
-"r+ c #5E3606",
-"s+ c #8C5A0E",
-"t+ c #765A0A",
-"u+ c #945A0A",
-"v+ c #D69212",
-"w+ c #F6DE72",
-"x+ c #4E4E4E",
-"y+ c #727272",
-"z+ c #3E3A34",
-"A+ c #C6720E",
-"B+ c #676666",
-"C+ c #F6CE42",
-"D+ c #86827E",
-"E+ c #F6D256",
-"F+ c #B6921A",
-"G+ c #866212",
-" ",
-" . . . . . . . ",
-" . . . . . . . . . . . . . ",
-" . . . . . . 1+{ @ @ Q . . . . . . ",
-" . . . . q p.0 ,+,+K {+{+T x t+. . . . ",
-" . . . . p.* E+(+(+C+$+K J ).i+)+$ . . . . ",
-" . . . 9+5 1.X 6..+|.l+E+S v J {+;+k+j+F.. . . ",
-" . . . 9+6.#.#.D.[+e , w+|.q.h F+i+i+f )+j+M.. . . ",
-" . . . q.s 1.y V ( B b u - <.N [+d ^ f )+j+v+4 . . ",
-" . . . q w+L 8 0.J.| f.f./.4+x+f.P y+R.7.)+d.'.z.. . . ",
-" . . *+& / g 0.t @.e.e.e.e.j P.%.[+x+g.x.+.! '.4.&+. . ",
-" . . +.S 3+< P J.) Z e.e.n.e.# b.P.P.f.# y+N.l.z.&+. . . ",
-" . . . 5.C+5+P.n.) }+d+3.^.G (.e+_+x.;.C _+[+g.3 k.z E . . ",
-" . . . l ,+q.z+..b.3 7+(.}+( %+b.d+( x+( u.>+o+y+o a _ . . ",
-" . . t.).,+$+= +.+ <+E.g...d+M d+) P o+3 x+n.J.B+}.z O.. . ",
-" . . G.).J K v.F 2 ..3.N x+C (.( ) 3 | m H j @.%+f+'+++. . ",
-" . . a+i+).{+% /.d+/.@.e.d+E.y+) o+j j o n.P _+&.i.:+w.. . ",
-" . . . [ ).[ /+!+@.>+!+e.e.!+g.f.N _+w 3.e.Z _+q+]+`.; . . ",
-" . . . {.f } u.M 7+x+b.e.e.e.e.) >+[+>+P.j %+y.]+>.c._ . . ",
-" . . { Y }.[+y+<+g.P e.e.e.e.e.J.o $.) # <.!.-+`.s.. . . ",
-" . . ' U Q.P 9 e.9 _+V $.# P P N H 7+@.<+Z.-+:+m+r . . ",
-" . . . :.Y G+>+) @.) t # e+) ) e+}.o (.b+i A+ .c.6+. . ",
-" . . . n+o.p Q g.!+e.!+_+@.) U.2+s+*+u+:+ .> r . . ",
-" . . . r.W '.4.] I.(.e.B+!+K.c z.B.n p+`.|+; . . . ",
-" . . . -.@+2+T.W f+=.N y+S.]+>.'+`.c.> ; . . . ",
-" . . . 8+R B.B.W R V.t.&+'+A+ .|+c+m.. . . ",
-" . . . . G.E i.p+n s. .m+> k 0+a+. . . ",
-" . . . . . H.A.r+r+I H.6+. . . . . ",
-" . . . . . . . . . . . . . ",
-" . . . . . . . . . ",
-" ",
-" "};
diff --git a/data/cde_app_root/dt/appconfig/icons/C/Evolution.t.pm b/data/cde_app_root/dt/appconfig/icons/C/Evolution.t.pm
deleted file mode 100644
index 27995ddcd9..0000000000
--- a/data/cde_app_root/dt/appconfig/icons/C/Evolution.t.pm
+++ /dev/null
@@ -1,103 +0,0 @@
-/* XPM */
-static char * evo_cde_16_xpm[] = {
-"16 16 84 1",
-" c None",
-". c #020202",
-"+ c #E6C750",
-"@ c #F8E191",
-"# c #F8E6A4",
-"$ c #F7E499",
-"% c #F2DD8B",
-"& c #BDA752",
-"* c #685617",
-"= c #C9A92F",
-"- c #F8E395",
-"; c #F8E8AE",
-"> c #F7DD7E",
-", c #F7D65D",
-"' c #F7D455",
-") c #F6CF42",
-"! c #DEC054",
-"~ c #B49E4E",
-"{ c #BC9F33",
-"] c #000000",
-"^ c #363326",
-"/ c #F8E18C",
-"( c #F9E499",
-"_ c #F6D148",
-": c #F6CE3B",
-"< c #ECC63F",
-"[ c #B59B3A",
-"} c #060300",
-"| c #100E0B",
-"1 c #E7D184",
-"2 c #F8E393",
-"3 c #DEBA35",
-"4 c #A68C26",
-"5 c #282623",
-"6 c #F1D97F",
-"7 c #F8DE7D",
-"8 c #848484",
-"9 c #FFFFFF",
-"0 c #E6E6E6",
-"a c #5E5E5E",
-"b c #A18726",
-"c c #24221F",
-"d c #F8E497",
-"e c #F6D049",
-"f c #EDEDED",
-"g c #676767",
-"h c #F5F5F5",
-"i c #666666",
-"j c #DDDDDD",
-"k c #D5B233",
-"l c #B4972A",
-"m c #757575",
-"n c #737373",
-"o c #797979",
-"p c #BABABA",
-"q c #818181",
-"r c #D9B634",
-"s c #BC9D2D",
-"t c #070502",
-"u c #F5E5AA",
-"v c #C2C2C2",
-"w c #E1E1E1",
-"x c #CFCFCF",
-"y c #AA8E28",
-"z c #E1C663",
-"A c #F9E8AA",
-"B c #BE9F2D",
-"C c #8A7420",
-"D c #F7DE82",
-"E c #F9E6A0",
-"F c #D0AE31",
-"G c #937B23",
-"H c #F7DC7A",
-"I c #F9E8A5",
-"J c #F6D55A",
-"K c #ECC638",
-"L c #9E8526",
-"M c #AC9129",
-"N c #D2B441",
-"O c #D5C37E",
-"P c #DABD56",
-"Q c #C9AC40",
-"R c #AE9129",
-"S c #8A7421",
-" ",
-" ...... ",
-" ..+@#$%&*. ",
-" .=-;>,')!~{] ",
-" ^/(_:::::<[} ",
-" |12........34] ",
-" 567.89990a.3b] ",
-" cde.fgh0ij.kl] ",
-" c$:.mjnopq.rs] ",
-" tue.vwjwwx.ky] ",
-" tzA........BC] ",
-" .DE3rkrrrFG. ",
-" .FHIJ:::KLM. ",
-" ..NOPQRS.. ",
-" ...... ",
-" "};
diff --git a/data/cde_app_root/dt/appconfig/icons/C/Makefile.am b/data/cde_app_root/dt/appconfig/icons/C/Makefile.am
deleted file mode 100644
index 5fa1af0309..0000000000
--- a/data/cde_app_root/dt/appconfig/icons/C/Makefile.am
+++ /dev/null
@@ -1,15 +0,0 @@
-ICONS = \
- Evolution.l.pm \
- Evolution.m.pm \
- Evolution.t.pm \
- Ximian.l.pm \
- Ximian.m.pm \
- Ximian.t.pm
-
-EXTRA_DIST = $(ICONS)
-
-if HAVE_DTAPPINTEGRATE
-cdeiconsdir = $(privdatadir)/cde_app_root/dt/appconfig/icons/C
-cdeicons_DATA = $(ICONS)
-endif
-
diff --git a/data/cde_app_root/dt/appconfig/icons/C/Ximian.l.pm b/data/cde_app_root/dt/appconfig/icons/C/Ximian.l.pm
deleted file mode 100644
index a5fda59d40..0000000000
--- a/data/cde_app_root/dt/appconfig/icons/C/Ximian.l.pm
+++ /dev/null
@@ -1,147 +0,0 @@
-/* XPM */
-static char *ximian.l[] = {
-/* columns rows colors chars-per-pixel */
-"16 16 125 2",
-" c #000000",
-". c #080502",
-"X c #0d0b04",
-"o c #140c01",
-"O c #1d1201",
-"+ c #19160b",
-"@ c #1d190c",
-"# c #1c1910",
-"$ c #241e0a",
-"% c #2a1f03",
-"& c #391e02",
-"* c #2d2405",
-"= c #3d2202",
-"- c #3c2e05",
-"; c #4b2a02",
-": c #4b3b0c",
-"> c #463b13",
-", c #532d02",
-"< c #503907",
-"1 c #633503",
-"2 c #643b04",
-"3 c #54440c",
-"4 c #59440d",
-"5 c #5c4b12",
-"6 c #564e2e",
-"7 c #524d3a",
-"8 c #624b08",
-"9 c #684706",
-"0 c #694108",
-"q c #6c4d07",
-"w c #6c550a",
-"e c #60511b",
-"r c #6c5a18",
-"t c #704104",
-"y c #744d07",
-"u c #7b4e07",
-"i c #70570c",
-"p c #7e580c",
-"a c #725c13",
-"s c #60562f",
-"d c #605536",
-"f c #79600e",
-"g c #7e6611",
-"h c #756427",
-"j c #7f6b23",
-"k c #7e703c",
-"l c #716b57",
-"z c #8f4d05",
-"x c #8d5e09",
-"c c #9e5908",
-"v c #8a640a",
-"b c #8b6e0f",
-"n c #8a731f",
-"m c #926b0e",
-"M c #9e6409",
-"N c #97760e",
-"B c #99740d",
-"V c #917414",
-"C c #92791d",
-"Z c #816f2b",
-"A c #897a3f",
-"S c #a15905",
-"D c #ac6307",
-"F c #a8750c",
-"G c #a27b10",
-"H c #a97d11",
-"J c #b66606",
-"K c #be6f08",
-"L c #b2760a",
-"P c #bc7309",
-"I c #857949",
-"U c #cc7c0a",
-"Y c #ac860f",
-"T c #b3870f",
-"R c #968b5e",
-"E c #9a8c52",
-"W c #878165",
-"Q c #a4924d",
-"! c #bca650",
-"~ c #afa065",
-"^ c #b7a662",
-"/ c #c28c10",
-"( c #c88b12",
-") c #c29211",
-"_ c #c79e16",
-"` c #ca9715",
-"' c #ca9a11",
-"] c #d1850c",
-"[ c #d38a0d",
-"{ c #d2970f",
-"} c #db950f",
-"| c #dd990f",
-" . c #df9d10",
-".. c #daa115",
-"X. c #e4a311",
-"o. c #e0b41e",
-"O. c #edb515",
-"+. c #f2be16",
-"@. c #e5bc2d",
-"#. c #c5aa59",
-"$. c #d8bb4f",
-"%. c #c9b878",
-"&. c #f5c21a",
-"*. c #f6c520",
-"=. c #f7c827",
-"-. c #f6c82a",
-";. c #f6ce3d",
-":. c #f8cf3d",
-">. c #dcca7f",
-",. c #f4d04d",
-"<. c #f8d041",
-"1. c #f6d558",
-"2. c #f8d354",
-"3. c #eacf65",
-"4. c #f1d363",
-"5. c #b4aa80",
-"6. c #e1d18c",
-"7. c #f4e299",
-"8. c #fbe691",
-"9. c #ede1a9",
-"0. c #fcecaa",
-"q. c #fdf0ba",
-"w. c #fdf3c6",
-"e. c #fef6d1",
-"r. c None",
-/* pixels */
-"r.r.r.r.r. r.r.r.r.r.",
-"r.r.r. . * > r g w - . r.r.r.",
-"r.r. @ 7 k 3.1.<.o.Y v O r.r.",
-"r. + l R 7.>.Q j @.&.` v o r.",
-"r.. d %.~ e.W ~ ! n &.O.{ y r.",
-" $ #.E 9.e.q.8.4.e _ O.X.L O ",
-" 5 2.I 6.0.7.I @ o * B ..[ ; ",
-" V <.$.d ^ 6 + X . . ( [ t ",
-" B =.:.,.h j -.f G H } U 2 ",
-" 8 &.&.-.C a 3 &.i H .] K = ",
-" * T _ b a G : O.) < x P S o ",
-"r. q m ` ) 4 ....| [ 2 S , r.",
-"r. o 9 F p ( } [ ] U J 1 . r.",
-"r.r. o 2 u M P P D z ; . r.r.",
-"r.r.r. O = , , & o r.r.r.",
-"r.r.r.r.r. r.r.r.r.r."
-};
diff --git a/data/cde_app_root/dt/appconfig/icons/C/Ximian.m.pm b/data/cde_app_root/dt/appconfig/icons/C/Ximian.m.pm
deleted file mode 100644
index 125aaeceb9..0000000000
--- a/data/cde_app_root/dt/appconfig/icons/C/Ximian.m.pm
+++ /dev/null
@@ -1,272 +0,0 @@
-/* XPM */
-static char *ximian.m[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 234 2",
-" c #000000",
-". c #0a0602",
-"X c #0c0902",
-"o c #0b090a",
-"O c #130d02",
-"+ c #100c0e",
-"@ c #1c0f01",
-"# c #120e10",
-"$ c #141004",
-"% c #111009",
-"& c #1c1302",
-"* c #181409",
-"= c #1c180c",
-"- c #211401",
-"; c #251b02",
-": c #2b1601",
-"> c #2c1c02",
-", c #272109",
-"< c #292004",
-"1 c #2a230a",
-"2 c #2e280f",
-"3 c #262213",
-"4 c #362604",
-"5 c #342c0d",
-"6 c #382603",
-"7 c #36311d",
-"8 c #3c3310",
-"9 c #3b351f",
-"0 c #2f2d22",
-"q c #402a05",
-"w c #482702",
-"e c #4d2902",
-"r c #433005",
-"t c #45380c",
-"y c #493707",
-"u c #4c3d0b",
-"i c #4a3810",
-"p c #483f1c",
-"a c #502f03",
-"s c #553d06",
-"d c #5c3503",
-"f c #5f3a05",
-"g c #423b22",
-"h c #643503",
-"j c #653f0a",
-"k c #743e03",
-"l c #534007",
-"z c #55420f",
-"x c #524516",
-"c c #534619",
-"v c #5a4711",
-"b c #5b4a11",
-"n c #4a4428",
-"m c #4e4933",
-"M c #524c33",
-"N c #5d5123",
-"B c #5e5532",
-"V c #624206",
-"C c #6f4706",
-"Z c #684d09",
-"A c #634c13",
-"S c #665116",
-"D c #6b5a1d",
-"F c #794004",
-"G c #7d4c0a",
-"H c #775e0b",
-"J c #7b5b0a",
-"K c #6a5e2c",
-"L c #625a3d",
-"P c #7e6612",
-"I c #7a6419",
-"U c #6e602a",
-"Y c #6c633e",
-"T c #716844",
-"R c #7e7240",
-"E c #7a7354",
-"W c #8e4c04",
-"Q c #8d5106",
-"! c #885908",
-"~ c #995204",
-"^ c #82640c",
-"/ c #8c650b",
-"( c #8a6b0c",
-") c #856b11",
-"_ c #836d1f",
-"` c #8a721f",
-"' c #95660e",
-"] c #94680a",
-"[ c #91710d",
-"{ c #9b700e",
-"} c #9b7a0e",
-"| c #967018",
-" . c #9a7014",
-".. c #9d7e12",
-"X. c #806e2d",
-"o. c #937d2f",
-"O. c #a55805",
-"+. c #a05d0a",
-"@. c #a85905",
-"#. c #b25f06",
-"$. c #a26308",
-"%. c #ac6908",
-"&. c #a2750f",
-"*. c #a37c0e",
-"=. c #ad720b",
-"-. c #aa7c0d",
-";. c #b66206",
-":. c #b76807",
-">. c #bb6506",
-",. c #be6806",
-"<. c #b9750a",
-"1. c #81764d",
-"2. c #877943",
-"3. c #c06c07",
-"4. c #c26e08",
-"5. c #c57308",
-"6. c #c87709",
-"7. c #ca7b0a",
-"8. c #9e8730",
-"9. c #aa830f",
-"0. c #a48110",
-"q. c #a88716",
-"w. c #b58e10",
-"e. c #b58d1b",
-"r. c #bf8e10",
-"t. c #ba9312",
-"y. c #a28d3c",
-"u. c #b29325",
-"i. c #bb9821",
-"p. c #8e824e",
-"a. c #9f8c46",
-"s. c #a59966",
-"d. c #b3a362",
-"f. c #b8a867",
-"g. c #bfaf6c",
-"h. c #c1840d",
-"j. c #ce810b",
-"k. c #ca8a0e",
-"l. c #cf8e14",
-"z. c #ca910f",
-"x. c #c49310",
-"c. c #c79e15",
-"v. c #ce9415",
-"b. c #c89b18",
-"n. c #d1850b",
-"m. c #d48a0c",
-"M. c #d9920e",
-"N. c #dd980f",
-"B. c #d49d1b",
-"V. c #de9b10",
-"C. c #c09d24",
-"Z. c #cea61e",
-"A. c #dca513",
-"S. c #dba618",
-"D. c #cfac35",
-"F. c #cfb03f",
-"G. c #d2b33f",
-"H. c #dcba3c",
-"J. c #e09d10",
-"K. c #e3a311",
-"L. c #e6a912",
-"P. c #e0ad18",
-"I. c #e8ab13",
-"U. c #edb314",
-"Y. c #e8b31d",
-"T. c #ecb916",
-"R. c #edbd1c",
-"E. c #f1bb15",
-"W. c #e2bb32",
-"Q. c #c3aa4d",
-"!. c #c8ae4e",
-"~. c #c3ac55",
-"^. c #ccb252",
-"/. c #ccb55b",
-"(. c #c6b265",
-"). c #d0b961",
-"_. c #f4c017",
-"`. c #f6c31a",
-"'. c #f7c621",
-"]. c #f7c826",
-"[. c #f7c92b",
-"{. c #f9c928",
-"}. c #f6cb33",
-"|. c #fccd32",
-" X c #f8ce3a",
-".X c #f8d03e",
-"XX c #ddc153",
-"oX c #d9c678",
-"OX c #dec975",
-"+X c #ebca51",
-"@X c #eccb58",
-"#X c #f9cf41",
-"$X c #f8d144",
-"%X c #f8d34b",
-"&X c #f9d451",
-"*X c #f8d75a",
-"=X c #f8d85d",
-"-X c #e5ca63",
-";X c #ecd47b",
-":X c #fdd669",
-">X c #fada66",
-",X c #f9db69",
-"<X c #f6db76",
-"1X c #fadc71",
-"2X c #fddc7a",
-"3X c #f9e07a",
-"4X c #c2b789",
-"5X c #cfc69c",
-"6X c #ddcb83",
-"7X c #dfd196",
-"8X c #d8cea1",
-"9X c #e6d693",
-"0X c #f0db86",
-"qX c #f0dc8b",
-"wX c #fddf8f",
-"eX c #f1df9b",
-"rX c #e5d8a0",
-"tX c #fae286",
-"yX c #fae48b",
-"uX c #fbe596",
-"iX c #fbe99c",
-"pX c #f3e3a1",
-"aX c #fee6a8",
-"sX c #fae9a3",
-"dX c #fbeba9",
-"fX c #fcedb4",
-"gX c #fcf0ba",
-"hX c #feefc8",
-"jX c #fdf3c3",
-"kX c #fdf3cc",
-"lX c #fef7d7",
-"zX c #fef6dc",
-"xX c #fef8d8",
-"cX c None",
-/* pixels */
-"cXcXcXcXcXcXcXcXcXcXcXcX cXcXcXcXcXcXcXcXcXcXcXcXcX",
-"cXcXcXcXcXcXcXcXcX cXcXcXcXcXcXcXcXcXcX",
-"cXcXcXcXcXcXcX X & 1 ; O cXcXcXcXcXcXcXcX",
-"cXcXcXcXcXcX . 5 ` u.i.Z.c.w.[ l . cXcXcXcXcXcXcX",
-"cXcXcXcXcX . $ c F.%X%X$X.X}.].`._.T.A.H & cXcXcXcXcXcX",
-"cXcXcXcX o % a.;X3X^.=X=X&X$X X[.`._.T.U.-.4 cXcXcXcXcX",
-"cXcXcX o 5 ~.kXzXd.(.3X3X,X=X%X X].`.E.U.I.V.q . cXcXcXcX",
-"cXcX o . O Q.fXzX9XR qXyXtX3X,X+XH.[.'.E.E.U.K.h.4 cXcXcX",
-"cXcX . X y.uXhXeXL 9XdXsXs.B 9 3 1 H.].E.E.U.L.J.h.O cXcXcX",
-"cX c @XaXsX(.E fXjX5X0 B f./.U _ [.`.E.U.I.J.M.C cXcX",
-"cX o D.:XwXyXT 4XkXlXkX5X9XyX1XXX, i.`._.U.I.J.M.<.> cXcX",
-"cX 1 $X:X2X3Xm rXjXlXkXgXiXyX1X*Xx l _._.U.I.J.M.j.f cXcX",
-" P X&X>X).M sXfXgXgXdXuXOXa.X.D P T.U.L.J.M.n.+. cX",
-" . q.|.$X=X-X7 6XsXdXsXiXd.n & l *.K.N.M.j.5. cX",
-" $ t.{..X%X=XK n OXyXtXp. . { N.m.7.6.& cX",
-" $ w.'.[.$X%X).U 7 Y 2.% * n & * . .N.m.7.4.- cX",
-" $ w.`.`.[..X%X&X!.D = o.}.]... b.Z | V.l.n.6.3.@ cX",
-" . 9.E.`.{.[. X#X$X!. 8 W.].`.0. U.K.K.N.m.7.5.,.. cX",
-" J E.E.`.`.].].[.C.5 I X ) `.`.( = L.K.V.M.n.7.4.~ cX",
-"cX r U.E.E.E.`.`.R.P v R.H , T.E.^ o / V.M.m.7.6.,.h cXcX",
-"cX z.I.U.U.} } t t t.} O v Y.U.L.&.> V ! $.6.,.@.: # . cXcX",
-"cX Z K.I.A.& z e.P.x.; S S.I.L.K.N.=.6 - j 4.,.F o # cXcX",
-"cXcX X ] K.z.B.I.U.r.y A I.K.J.J.N.M.m.j.G +.,.@.@ # cXcXcX",
-"cXcX ; k.V.V.N.K.s i v.K.V.N.M.m.n.j.6.4.,.#.e o o cXcXcX",
-"cXcXcX > =.M.N.M.' l.M.M.m.m.m.7.6.4.3.,.#.w o # cXcXcXcX",
-"cXcXcXcX > %.m.n.l.m.n.m.j.7.7.6.4.,.>.@.e . + cXcXcXcXcX",
-"cXcXcXcXcX X d %.7.7.7.6.6.5.4.,.>.O.k O o o cXcXcXcXcXcX",
-"cXcXcXcXcXcX - e W :.,.,.>.>.W d : X o o cXcXcXcXcXcXcX",
-"cXcXcXcXcXcXcX . - O . o o o cXcXcXcXcXcXcXcX",
-"cXcXcXcXcXcXcXcXcX . cXcXcXcXcXcXcXcXcXcX",
-"cXcXcXcXcXcXcXcXcXcXcXcX cXcXcXcXcXcXcXcXcXcXcXcXcX",
-"cXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcX"
-};
diff --git a/data/cde_app_root/dt/appconfig/icons/C/Ximian.t.pm b/data/cde_app_root/dt/appconfig/icons/C/Ximian.t.pm
deleted file mode 100644
index d0bdc61e8c..0000000000
--- a/data/cde_app_root/dt/appconfig/icons/C/Ximian.t.pm
+++ /dev/null
@@ -1,289 +0,0 @@
-/* XPM */
-static char *ximian.t[] = {
-/* columns rows colors chars-per-pixel */
-"48 48 235 2",
-" c #000000",
-". c #090604",
-"X c #080708",
-"o c #0e0a01",
-"O c #0d0a0a",
-"+ c #100d0e",
-"@ c #120f10",
-"# c #1c1402",
-"$ c #1e1905",
-"% c #1e1908",
-"& c #151213",
-"* c #181315",
-"= c #1b1618",
-"- c #1e1b10",
-"; c #1d181a",
-": c #221201",
-"> c #271902",
-", c #2c1a01",
-"< c #311d02",
-"1 c #2c2204",
-"2 c #2d260c",
-"3 c #2c2410",
-"4 c #2e2914",
-"5 c #2e2918",
-"6 c #332002",
-"7 c #3f2503",
-"8 c #3c2e05",
-"9 c #3d3005",
-"0 c #3e3209",
-"q c #3d3311",
-"w c #3b3218",
-"e c #2f2c22",
-"r c #3f3b2c",
-"t c #452502",
-"y c #4b2c03",
-"u c #453005",
-"i c #45320b",
-"p c #483506",
-"a c #493913",
-"s c #512b02",
-"d c #583504",
-"f c #5c3b05",
-"g c #5b3f17",
-"h c #613704",
-"j c #683703",
-"k c #4d431d",
-"l c #56400d",
-"z c #584307",
-"x c #5c4b10",
-"c c #59491b",
-"v c #4e472c",
-"b c #5d5021",
-"n c #5d532d",
-"m c #674005",
-"M c #684f09",
-"N c #6b540a",
-"B c #6c5a1a",
-"V c #774c07",
-"C c #7d4a06",
-"Z c #725308",
-"A c #7f5012",
-"S c #6c5f2c",
-"D c #7b610c",
-"F c #7b6312",
-"G c #7b661a",
-"H c #6d6133",
-"J c #6d633a",
-"K c #7c6923",
-"L c #7c6b2d",
-"P c #7c6c30",
-"I c #7d703e",
-"U c #5e5840",
-"Y c #7d7245",
-"T c #7e785e",
-"R c #8b4a04",
-"E c #825207",
-"W c #965004",
-"Q c #8b6210",
-"! c #896e13",
-"~ c #936c0b",
-"^ c #95710d",
-"/ c #95741a",
-"( c #896f20",
-") c #8c7a36",
-"_ c #a25605",
-"` c #ae5c05",
-"' c #a16b0a",
-"] c #aa6107",
-"[ c #ae6608",
-"{ c #ab6f0a",
-"} c #a57f0e",
-"| c #ae730b",
-" . c #ac7d0d",
-".. c #b16c09",
-"X. c #ba6406",
-"o. c #be6906",
-"O. c #b1780c",
-"+. c #bd7f12",
-"@. c #8c7d42",
-"#. c #c06c07",
-"$. c #c26e08",
-"%. c #c57308",
-"&. c #c57e0c",
-"*. c #c87709",
-"=. c #cb7b0a",
-"-. c #9a8125",
-";. c #9b832c",
-":. c #a6800f",
-">. c #a8840f",
-",. c #aa891b",
-"<. c #bc830d",
-"1. c #be9123",
-"2. c #b99a2a",
-"3. c #ba9d33",
-"4. c #ba9f3b",
-"5. c #baa03e",
-"6. c #9c8a48",
-"7. c #9c8d54",
-"8. c #9c8f5a",
-"9. c #9c905a",
-"0. c #8e8563",
-"q. c #9e9676",
-"w. c #baa141",
-"e. c #bba758",
-"r. c #bba85c",
-"t. c #ada377",
-"y. c #bcb07d",
-"u. c #ce800b",
-"i. c #cd8b0e",
-"p. c #c38a1a",
-"a. c #cb8913",
-"s. c #c19111",
-"d. c #c7921c",
-"f. c #c59a11",
-"g. c #c59c1f",
-"h. c #cc9814",
-"j. c #d1850c",
-"k. c #d58c0d",
-"l. c #d88f0e",
-"z. c #d08512",
-"x. c #d0900e",
-"c. c #da930e",
-"v. c #dd980f",
-"b. c #d39510",
-"n. c #d09d12",
-"m. c #d59b1d",
-"M. c #dd9b10",
-"N. c #c8a016",
-"B. c #d4a513",
-"V. c #daa111",
-"C. c #c9a62b",
-"Z. c #c9ab3b",
-"A. c #d8b024",
-"S. c #d9b73a",
-"D. c #e09d10",
-"F. c #e3a311",
-"G. c #e6a812",
-"H. c #e6a818",
-"J. c #e9ad13",
-"K. c #e9ae19",
-"L. c #e4b315",
-"P. c #e3b21b",
-"I. c #e7b91d",
-"U. c #edb314",
-"Y. c #edb51b",
-"T. c #f0b715",
-"R. c #f1bb15",
-"E. c #e2b328",
-"W. c #eab921",
-"Q. c #c9ad41",
-"!. c #caae49",
-"~. c #cab050",
-"^. c #dabf5c",
-"/. c #cbb86d",
-"(. c #cbb971",
-"). c #cbbc79",
-"_. c #f5c117",
-"`. c #f6c41a",
-"'. c #e9c33e",
-"]. c #f7c622",
-"[. c #f7c826",
-"{. c #f7c92b",
-"}. c #fac926",
-"|. c #fbcb2b",
-" X c #f7cc33",
-".X c #f7cf3c",
-"XX c #f8cc33",
-"oX c #f8ce3a",
-"OX c #f9d03c",
-"+X c #e9c647",
-"@X c #e8c749",
-"#X c #e8c84d",
-"$X c #e9cc5e",
-"%X c #f8d143",
-"&X c #f8d34c",
-"*X c #f8d453",
-"=X c #f9d65a",
-"-X c #f9d85c",
-";X c #eacf68",
-":X c #ead273",
-">X c #ead479",
-",X c #fed76c",
-"<X c #f9d964",
-"1X c #f9db6b",
-"2X c #f9dd73",
-"3X c #fcdb7d",
-"4X c #fae17d",
-"5X c #bdb387",
-"6X c #ccbf87",
-"7X c #ccc08a",
-"8X c #ebd98d",
-"9X c #fddc86",
-"0X c #fae282",
-"qX c #fae48b",
-"wX c #fbe593",
-"eX c #fbe599",
-"rX c #fbe89d",
-"tX c #eee4ba",
-"yX c #fde5a4",
-"uX c #fee7ac",
-"iX c #fbeaa3",
-"pX c #fbebaa",
-"aX c #fceeb3",
-"sX c #fdedba",
-"dX c #feefc8",
-"fX c #fdf2c3",
-"gX c #fef4ce",
-"hX c #fef6d3",
-"jX c #fff5db",
-"kX c #fef8d8",
-"lX c #fff6e1",
-"zX c #fffae3",
-"xX c #fff9eb",
-"cX c #fefbf3",
-"vX c None",
-/* pixels */
-"vXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvX",
-"vXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvX vXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvX",
-"vXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvX vXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvX",
-"vXvXvXvXvXvXvXvXvXvXvXvXvX vXvXvXvXvXvXvXvXvXvXvXvXvXvX",
-"vXvXvXvXvXvXvXvXvXvXvXvX 0 0 D D D 9 1 vXvXvXvXvXvXvXvXvXvXvXvXvX",
-"vXvXvXvXvXvXvXvXvXvX % B 2. X X X{.[.`.`.`.R.:.M o vXvXvXvXvXvXvXvXvXvXvX",
-"vXvXvXvXvXvXvXvXvX X % ;.%X%X%X%X%XoX X{.[.`.`._.R.R.U.~ # vXvXvXvXvXvXvXvXvXvX",
-"vXvXvXvXvXvXvXvX & o K &X*X*X=X=X*X&X&X%XoX X{.].`._.R.T.U.V.Z vXvXvXvXvXvXvXvXvX",
-"vXvXvXvXvXvXvX & 2 Q.2XpXeX$X6.<X-X-X*X*X%XOX X{.`.`._.R.U.J.G.<.# vXvXvXvXvXvXvXvX",
-"vXvXvXvXvXvX * 2 #XpXcXcXqXn :X4X2X1X<X-X*X&X.X X[.`.`.R.R.U.J.G.b.> vXvXvXvXvXvXvX",
-"vXvXvXvXvX & 2 #XaXxXcXeXI 9.0X0X0X4X2X1X-X*X%XoX X].`._.R.U.U.G.F.x.> vXvXvXvXvXvX",
-"vXvXvXvXvXO 2 @XwXjXlXpX/.r wXwXwXqXqX0X2X1X-X5.S. X{.`.`.R.U.U.G.F.D.i.o vXvXvXvXvXvX",
-"vXvXvXvX O Z.2XdXdXsX9X5 y.iXpXiXrX).8.H 4 q .X{.].`._.R.U.J.G.v.v.^ vXvXvXvXvX",
-"vXvXvX O K *XyXsXsXwX8.r pXaXaXaXt. r J L -. X[.`._.R.U.J.G.D.v.l.f vXvXvXvX",
-"vXvXvX X % %X2XyXuXwXqX- 5XsXfXfXfXT J wX0X2X<Xb % .X[.`._.R.U.J.G.F.v.l.u.o vXvXvXvX",
-"vXvXvXX -.%X9XwXeX9X8.e aXfXhXkXhXtXq.7XwX0X2X<Xw. G {.`._.R.U.U.G.D.v.c.j.j vXvXvXvX",
-"vXvX O o XX*X3X9X4X0Xv 0.aXfXhXzXkXfXaXpXwX0X2X1X-X2 o A.`.`._.U.U.G.F.v.k.j.%. vXvXvX",
-"vXvX x XX=X,X2X2X0X 7XaXfXhXhXhXfXaXiXwX0X4X<X*X;. 0 `.`.R.U.U.F.F.v.c.k.u.7 vXvXvX",
-"vXvX. ,.XX*X=X<X1Xr. rXpXaXfXfXfXaXpXrXqX0X1X~.5.'.o D `.R.T.U.G.D.v.l.j.u.C vXvXvX",
-"vX W.XXOX&X=X1Xe. 8XrXpXaXaXaXpXrXwXqXI o >.T.U.J.G.D.v.k.j.=.[ vXvX",
-"vX % `.|.OX%X*X<X;X Y wXrXiXiXiXrXwX(.4 % l M.G.D.c.k.j.=.*. vXvX",
-"vX 9 `.}.XX%X&X=X<XS 7.qXqXwXwXqX7. 1 V.D.c.k.j.*.$.< vXvX",
-"vX 9 _.].|.oX%X&X-X$X4 J >X0X0X6. d.v.l.k.=.*.$., vXvX",
-"vX 8 _._.[.|.oX%X*X=X<XS O n 6. + k P 2 4 o 3 D.v.l.k.=.*.$., vXvX",
-"vX 8 _._.`.{. X.X%X&X*X=X^.n + ) '. X{.I. g.^ w m.D.c.k.j.=.%.o., vXvX",
-"vX 8 R._._.`.[.{..X%X%X&X*X*X!. +X.X X[.`._. U.U.h.H.D.M.l.j.=.=.$.o.: vXvX",
-"vX o R.R._._.`.[.{. X.X.X%X%X5. -.{.[.`.`._. U.J.F.F.v.c.k.j.=.%.#.o. vXvX",
-"vX h.T.R._.`.`.`.[.{.{. X{.2. L 2 o I.`.`._.L. 4 U.G.F.D.v.k.k.=.*.$.o.W vXvX",
-"vXvX ^ U.R.R._._._.`.`.[.[.[.F C.W.1 D _._.R.:. % M.H.D.v.c.k.j.=.%.#.X.j vXvXvX",
-"vXvX p J.U.U.R.R._._.`.`.`.N.9 - `.`.L.> o L.T.R.s.2 > b.v.v.k.j.=.*.$.o.X.: + vXvXvX",
-"vXvX M.J.U.U.R.R.B.f.L.N o ! `.>.o q A.U.J.J.M.l > <.| V =.*.*.#.X._ O @ vXvXvX",
-"vXvXvX Z V.J.J.J.U.z o 1 - ( L.R.f.o c Y.U.U.J.J.V.F.Q o o V 6 ..%.#.X.X.t * . vXvXvXvX",
-"vXvXvX o c.V.J.J.b. % / W.U.U.U.8 c Y.J.J.G.F.F.M.v.c.+.> A #.o.X._ X = vXvXvXvX",
-"vXvXvX u v.F.F. .1.K.J.J.K.U.~ c K.G.G.F.F.v.v.c.c.k.j.z.d g ] o.X.X.> = X vXvXvXvX",
-"vXvXvXvX ~ v.v.D.F.F.F.G.G., a H.F.F.D.v.v.v.v.l.k.j.u.*.*.$.o.X.X.j @ * vXvXvXvXvX",
-"vXvXvXvXvX o O.v.v.v.D.D.D.D. 3 m.M.D.M.v.v.c.l.k.j.j.=.*.%.#.o.X.X.W X ; vXvXvXvXvXvX",
-"vXvXvXvXvX o | l.c.c.v.c.v.i p.c.c.c.c.l.l.k.j.j.u.=.*.%.#.o.X.X.W . . * X vXvXvXvXvXvX",
-"vXvXvXvXvXvX o { k.k.k.k.l.a.l.l.k.k.k.k.j.u.u.*.*.*.#.o.o.X.X.W o * + vXvXvXvXvXvXvX",
-"vXvXvXvXvXvXvX o E j.j.j.k.j.j.k.j.j.j.=.=.*.*.*.$.#.o.X.X.X.j @ @ vXvXvXvXvXvXvXvX",
-"vXvXvXvXvXvXvXvX < ..=.=.=.=.=.=.*.*.*.*.%.$.#.o.X.X.X.W , X * O vXvXvXvXvXvXvXvXvX",
-"vXvXvXvXvXvXvXvXvX y [ *.*.*.%.%.$.#.#.o.o.X.X.X.W t O & X vXvXvXvXvXvXvXvXvXvX",
-"vXvXvXvXvXvXvXvXvXvX : h R o.#.o.X.X.X.` R s : O @ + vXvXvXvXvXvXvXvXvXvXvX",
-"vXvXvXvXvXvXvXvXvXvXvXvX , , , . O + + . vXvXvXvXvXvXvXvXvXvXvXvXvX",
-"vXvXvXvXvXvXvXvXvXvXvXvXvX . . X X O O X vXvXvXvXvXvXvXvXvXvXvXvXvXvX",
-"vXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvX X X X X vXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvX",
-"vXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvX vXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvX",
-"vXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvX",
-"vXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvX"
-};
diff --git a/data/cde_app_root/dt/appconfig/icons/Makefile.am b/data/cde_app_root/dt/appconfig/icons/Makefile.am
deleted file mode 100644
index 9f660cf34e..0000000000
--- a/data/cde_app_root/dt/appconfig/icons/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-SUBDIRS = C \ No newline at end of file
diff --git a/data/cde_app_root/dt/appconfig/types/.cvsignore b/data/cde_app_root/dt/appconfig/types/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/data/cde_app_root/dt/appconfig/types/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/data/cde_app_root/dt/appconfig/types/C/.cvsignore b/data/cde_app_root/dt/appconfig/types/C/.cvsignore
deleted file mode 100644
index ed2271e0f5..0000000000
--- a/data/cde_app_root/dt/appconfig/types/C/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-Makefile
-Makefile.in
-Ximian.dt
diff --git a/data/cde_app_root/dt/appconfig/types/C/Makefile.am b/data/cde_app_root/dt/appconfig/types/C/Makefile.am
deleted file mode 100644
index 3cda99060e..0000000000
--- a/data/cde_app_root/dt/appconfig/types/C/Makefile.am
+++ /dev/null
@@ -1,6 +0,0 @@
-EXTRA_DIST = Ximian.dt.in
-
-if HAVE_DTAPPINTEGRATE
-cdetypesdir = $(privdatadir)/cde_app_root/dt/appconfig/types/C
-cdetypes_DATA = Ximian.dt
-endif
diff --git a/data/cde_app_root/dt/appconfig/types/C/Ximian.dt.in b/data/cde_app_root/dt/appconfig/types/C/Ximian.dt.in
deleted file mode 100644
index 3815769b7e..0000000000
--- a/data/cde_app_root/dt/appconfig/types/C/Ximian.dt.in
+++ /dev/null
@@ -1,30 +0,0 @@
-DATA_ATTRIBUTES XimianAppgroup
-{
- ACTIONS OpenInPlace, OpenNewView
- ICON Ximian
- DESCRIPTION Double-click to open the Ximian application group
-}
-
-DATA_CRITERIA XimianAppgroupCriterial
-{
- DATA_ATTRIBUTES_NAME XimianAppgroup
- MODE d
- PATH_PATTERN */appmanager/*/Ximian
-}
-
-ACTION Open
-{
- LABEL Open
- ARG_TYPE XimianAppgroup
- TYPE MAP
- MAP_ACTION OpenAppGroup
-}
-
-ACTION Evolution
-{
- LABEL Ximian Evolution
- TYPE COMMAND
- EXEC_STRING @prefix@/bin/evolution-nognome
- ICON Evolution
- WINDOW_TYPE NO_STDIO
-}
diff --git a/data/cde_app_root/dt/appconfig/types/Makefile.am b/data/cde_app_root/dt/appconfig/types/Makefile.am
deleted file mode 100644
index 42ffacc264..0000000000
--- a/data/cde_app_root/dt/appconfig/types/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-SUBDIRS = C
diff --git a/data/evolution.1 b/data/evolution.1
deleted file mode 100644
index db8b09f715..0000000000
--- a/data/evolution.1
+++ /dev/null
@@ -1,41 +0,0 @@
-.TH "Evolution" "1" "1.2" "Ximian, Inc." "GNOME Applications"
-.SH "NAME"
-.LP
-evolution \- Run Ximian Evolution, a groupware suite for GNOME containing email, calendar, addressbook, and task\-list tools.
-.SH "SYNOPSIS"
-.LP
-evolution [OPTION] ... [URI]
-.SH "DESCRIPTION"
-.LP
-This program is a graphical groupware suite; a single application with email, calendar, address book, and task\-list tools to help you collaborate with other people.
-
-.LP
-This man page is not the central source of help for Evolution. You can find the user's guide by running the application and selecting items from the Help menu. Additional help and security information are available at the Ximian knowledge base online at \fBhttp://support.ximian.com\fR. For help with additional command\-line options, type evolution \-\-help at the command line.
-.SH "EXAMPLES"
-.TP
-\fBevolution\fR
-Runs the application.
-
-.TP
-\fBevolution "%s"\fR
-To use Evolution as the handler for \fImailto:\fR links in GNOME applications, open the GNOME Control Center and set the \fImailto:\fR URL handler to this value. You can do this with non\-GNOME browsers such as Mozilla, by setting the appropriate value in that application's preferences dialogs.
-
-.TP
-\fBevolution mailto:joe@somewhere.net\fR
-Open the message composer, addressing the message to \fIjoe@somewhere.net\fR.
-
-.TP
-\fBevolution evolution:/local/Inbox\fR
-Start the application with the local Inbox folder open.
-
-.TP
-\fBevolution default:mail\fR
-Start the application with the folder mail/calendar/contacts/tasks open.
-
-.TP
-\fBevolution \-\-no\-splash\fR
-Start Evolution, but do not display the start\-up splash screen.
-
-.TP
-\fBevolution \-\-debug\fR=\fIFILENAME\fR
-Start the application, and output debugging messages to FILENAME.
diff --git a/data/evolution.desktop.in.in b/data/evolution.desktop.in.in
deleted file mode 100644
index fac97ed2f6..0000000000
--- a/data/evolution.desktop.in.in
+++ /dev/null
@@ -1,12 +0,0 @@
-[Desktop Entry]
-_Name=Ximian Evolution (Unstable)
-_Comment=The Ximian Evolution Groupware Suite
-Exec=evolution-@BASE_VERSION@
-Icon=evolution-@BASE_VERSION@.png
-Terminal=false
-Type=Application
-Categories=GNOME;Application;Office;X-Red-Hat-Base;
-StartupNotify=true
-X-GNOME-Bugzilla-Bugzilla=Ximian
-X-GNOME-Bugzilla-Product=evolution
-X-GNOME-Bugzilla-OtherBinaries=evolution-data-server;evolution-exchange-storage;
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 e69de29bb2..0000000000
--- a/default_user/ChangeLog
+++ /dev/null
diff --git a/default_user/ChangeLog.pre-1-4 b/default_user/ChangeLog.pre-1-4
deleted file mode 100644
index 141a946aac..0000000000
--- a/default_user/ChangeLog.pre-1-4
+++ /dev/null
@@ -1,336 +0,0 @@
-2003-04-18 Dan Winship <danw@ximian.com>
-
- * Makefile.am (install-data-hook): Don't need "private" dir any
- more
-
-2003-04-07 Dan Winship <danw@ximian.com>
-
- * local/Inbox/mbox: Fix the From header to be valid. Dum de dum.
-
-2003-03-14 Mike Kestner <mkestner@ximian.com>
-
- * Makefile.am (install-data-hook): mkdir views and subdirs
-
-2003-03-10 Ettore Perazzoli <ettore@ximian.com>
-
- * local/Calendar/calendar.ics: New.
- * local/Calendar/tasks.ics: New.
-
-2003-02-06 Dan Winship <danw@ximian.com>
-
- * Makefile.am: Use privdatadir
- * local/Trash/Makefile.am: Likewise.
- * local/Tasks/Makefile.am: Likewise.
- * local/Sent/Makefile.am: Likewise.
- * local/Outbox/Makefile.am: Likewise.
- * local/Inbox/Makefile.am: Likewise.
- * local/Drafts/Makefile.am: Likewise.
- * local/Contacts/Makefile.am: Likewise.
- * local/Calendar/Makefile.am: Likewise.
-
-2003-01-22 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am: Version using $(BASE_VERSION).
- * local/Trash/Makefile.am: Likewise.
- * local/Tasks/Makefile.am: Likewise.
- * local/Sent/Makefile.am: Likewise.
- * local/Outbox/Makefile.am: Likewise.
- * local/Inbox/Makefile.am: Likewise.
- * local/Drafts/Makefile.am: Likewise.
- * local/Contacts/Makefile.am: Likewise.
- * local/Calendar/Makefile.am: Likewise.
-
- * Makefile.am (instal-data-hook): Use $(DESTDIR); patch from Max
- Horn <max@quendi.de>.
-
-2002-09-30 Chris Toshok <toshok@ximian.com>
-
- [ Partial fix for #30657 ]
- * addressbook-sources.xml: remove Bigfoot, since ldap.bigfoot.com
- no longer resolves.
-
-2002-09-23 Dan Winship <danw@ximian.com>
-
- * vfolders.xml: Make the default vfolders only operate on local
- folders. Otherwise evolution is mysteriously incredibly slow to
- start up for new users with lots of IMAP/exchange folders.
-
-2002-07-29 Jeffrey Stedfast <fejj@ximian.com>
-
- * searches.xml: Reordered.
-
-2002-06-25 Aaron Weber <aaron@ximian.com>
-
- * local/Inbox/mbox: Add example FAQ items in welcome email, as per
- danw's request in bug 18645
-
-2001-12-10 Not Zed <NotZed@Ximian.com>
-
- * Makefile.am: Added vfolders.xml containing default initial
- vfolders - important vfolder and unread vfolder, #1040.
-
-2001-11-02 JP Rosevear <jpr@ximian.com>
-
- * local/Inbox/mbox: Fix email link to be valid
-
-2001-10-11 Chris Toshok <toshok@ximian.com>
-
- * Makefile.am (install-data-hook): make the private dir so it gets
- created in ~/evolution.
-
-2001-10-03 Ettore Perazzoli <ettore@ximian.com>
-
- * local/Inbox/mbox: Oops, remove stray ">".
-
-2001-10-03 Ettore Perazzoli <ettore@ximian.com>
-
- * local/Inbox/mbox: New version of the default mailbox by Aaron.
-
-2001-10-03 Ettore Perazzoli <ettore@ximian.com>
-
- * local/Drafts/Makefile.am: Install the empty mbox file too.
- * local/Sent/Makefile.am: Likewise.
- * local/Outbox/Makefile.am: Likewise.
-
-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 19003a80c4..0000000000
--- a/default_user/Makefile.am
+++ /dev/null
@@ -1,19 +0,0 @@
-SUBDIRS = local
-
-defaultdir = $(privdatadir)/default_user
-default_DATA = addressbook-sources.xml searches.xml vfolders.xml
-
-EXTRA_DIST = \
- $(default_DATA) \
- ChangeLog.pre-1-4
-
-install-data-hook:
- -mkdir $(DESTDIR)$(defaultdir)/views
- -mkdir $(DESTDIR)$(defaultdir)/views/addressbook
- -mkdir $(DESTDIR)$(defaultdir)/views/calendar
- -mkdir $(DESTDIR)$(defaultdir)/views/mail
- -mkdir $(DESTDIR)$(defaultdir)/views/tasks
-if ENABLE_NNTP
- -mkdir $(DESTDIR)$(defaultdir)/news
- -mkdir $(DESTDIR)$(defaultdir)/config
-endif
diff --git a/default_user/addressbook-sources.xml b/default_user/addressbook-sources.xml
deleted file mode 100644
index b34028fcbc..0000000000
--- a/default_user/addressbook-sources.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0"?>
-<addressbooks>
- <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 8f163c94c2..0000000000
--- a/default_user/local/Calendar/Makefile.am
+++ /dev/null
@@ -1,3 +0,0 @@
-defaultcalendardir = $(privdatadir)/default_user/local/Calendar
-defaultcalendar_DATA = folder-metadata.xml calendar.ics
-EXTRA_DIST = $(defaultcalendar_DATA)
diff --git a/default_user/local/Calendar/calendar.ics b/default_user/local/Calendar/calendar.ics
deleted file mode 100644
index 89b0ad51a8..0000000000
--- a/default_user/local/Calendar/calendar.ics
+++ /dev/null
@@ -1,5 +0,0 @@
-BEGIN:VCALENDAR
-CALSCALE:GREGORIAN
-PRODID:-//Ximian//NONSGML Evolution Calendar//EN
-VERSION:2.0
-END:VCALENDAR
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 df909d13e8..0000000000
--- a/default_user/local/Contacts/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-defaultcontactsdir = $(privdatadir)/default_user/local/Contacts
-defaultcontacts_DATA = \
- folder-metadata.xml \
- create-initial
-EXTRA_DIST = $(defaultcontacts_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 995c5d4875..0000000000
--- a/default_user/local/Drafts/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-defaultdraftsdir = $(privdatadir)/default_user/local/Drafts
-defaultdrafts_DATA = folder-metadata.xml mbox
-
-EXTRA_DIST = $(defaultdrafts_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/Drafts/mbox b/default_user/local/Drafts/mbox
deleted file mode 100644
index e69de29bb2..0000000000
--- a/default_user/local/Drafts/mbox
+++ /dev/null
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 3f9b3ab36a..0000000000
--- a/default_user/local/Inbox/Makefile.am
+++ /dev/null
@@ -1,7 +0,0 @@
-defaultinboxdir = $(privdatadir)/default_user/local/Inbox
-
-defaultinbox_DATA = \
- folder-metadata.xml \
- mbox
-
-EXTRA_DIST = $(defaultinbox_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 48b431bf5b..0000000000
--- a/default_user/local/Inbox/mbox
+++ /dev/null
@@ -1,432 +0,0 @@
-From evolve@ximian.com Tue Sep 25 07:45:12 2001
-Return-Path: <evolve@ximian.com>
-Received: from pop.ximian.com (IDENT:mail@localhost [127.0.0.1]) by
- pop.ximian.com (8.9.3/8.9.3) with ESMTP id HAA20680; Tue, 25 Sep 2001
- 07:45:12 -0400
-Received: from smtp.ximian.com (smtp.ximian.com [141.154.95.10]) by
- pop.ximian.com (8.9.3/8.9.3) with ESMTP id HAA20659 for
- <evolve@ximian.com>; Tue, 25 Sep 2001 07:45:10 -0400
-Received: (qmail 5610 invoked from network); 25 Sep 2001 11:45:02 -0000
-Received: from smtp.ximian.com (HELO localhost) (141.154.95.10) by
- pop.ximian.com with SMTP; 25 Sep 2001 11:45:02 -0000
-From: "Ximian, Inc." <evolve@ximian.com>
-To: Ximian Evolution Users <evolve@ximian.com>
-Content-Type: multipart/related; type="multipart/alternative"; boundary="=-t4dRE6cqcdSBHOrMdTQ1"
-X-Mailer: Evolution/1.1.99 (Preview Release)
-Date: 25 June 2002 14:45:00 +0300
-Message-Id: <1001418302.27070.20.camel@spectrolite>
-Mime-Version: 1.0
-Subject: Welcome to Ximian Evolution!
-Sender: evolve@ximian.com
-Errors-To: evolve@ximian.com
-X-Mailman-Version: 1.1
-Status:
-X-Evolution-Source: pop://rupert@pop.ximian.com/inbox
-X-Evolution: 00000ddd-0030
-
-
---=-t4dRE6cqcdSBHOrMdTQ1
-Content-Type: multipart/alternative; boundary="=-2gZ1roA/HoYrlRDVGyiM"
-
-
---=-2gZ1roA/HoYrlRDVGyiM
-Content-Type: text/plain
-Content-Transfer-Encoding: 7bit
-
-
-Ximian is proud to welcome you to Ximian Evolution, a complete system
-for managing your communications and personal information.
-
-
-Getting Started
-
- On the left of the Ximian Evolution window is the Shortcut
- Bar, with icons for each of your primary tools: Summary,
- Inbox, Calendar, Tasks, and Contacts. You can click on those icons to
- jump from one tool to another. For more detailed information
- management, activate the Folder Bar by selecting Folder Bar from
- the View menu.
-
- For a complete guide to using Ximian Evolution, select Table of
- Contents or Getting Started in the Help menu.
-
-Learn More, Do More
-
- Ximian offers a range of products and services for you and for
- your business. Learn more about how Ximian can help you be more
- productive at <A HREF="http://www.ximian.com">Ximian.com</A>.
-
-
-Questions? Comments? Suggestions?
-
- To learn the answers to frequently asked questions (FAQs), such
- as how to make Evolution use your preferred web browser to
- open links in email, or how to use Evolution to open mailto:
- links in web pages, select Ximian Evolution FAQ from the Help menu.
-
- If your question isn't there, or if you'd like to send us some
- comments, write to us at evolve@ximian.com. We'd be glad to
- hear from you!
-
-
-
-Yours Sincerely,
-The Ximian Evolution Team
-evolve@ximian.com
-
-
---=-2gZ1roA/HoYrlRDVGyiM
-Content-Type: text/html; charset=utf-8
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
-<HTML>
-<HEAD>
- <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
- <META NAME="GENERATOR" CONTENT="GtkHTML/0.13.99">
-</HEAD>
-<BODY BGCOLOR="#f8fcf8"><TABLE BACKGROUND="cid:1001417869.27019.4.camel@spectrolite" CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
-<TR>
-<TD ALIGN="left" VALIGN="top">
-<IMG SRC="cid:1001417869.27019.5.camel@spectrolite" ALIGN="top" BORDER="0"></TD>
-<TD>
-</TD>
-<TD>
-</TD>
-<TD>
-</TD>
-<TD>
-</TD>
-<TD>
-</TD>
-<TD ALIGN="right" VALIGN="top">
-<IMG SRC="cid:1001417929.27019.7.camel@spectrolite" ALIGN="top" BORDER="0"></TD>
-</TR>
-<TR>
-<TD>
-</TD>
-<TD>
-<IMG SRC="cid:1001417989.27019.11.camel@spectrolite" ALIGN="top" BORDER="0"></TD>
-<TD>
-</TD>
-<TD>
-<FONT COLOR="#f8fcf8"><FONT SIZE="4"><B>Ximian</FONT></B></FONT SIZE="4"><FONT COLOR="#f8fcf8"><FONT SIZE="4"> is proud to welcome you to </FONT></FONT SIZE="4"><FONT COLOR="#f8fcf8"><FONT SIZE="4"><B>Ximian Evolution</FONT></B></FONT SIZE="4"><FONT COLOR="#f8fcf8"><FONT SIZE="4">, a complete system for managing your communications and personal information.</FONT></FONT SIZE="4"></TD>
-<TD>
-</TD>
-<TD>
-<IMG SRC="cid:1001418096.27019.14.camel@spectrolite" ALIGN="top" BORDER="0"></TD>
-<TD>
-</TD>
-</TR>
-<TR>
-<TD ALIGN="left" VALIGN="bottom">
-<IMG SRC="cid:1001417929.27019.8.camel@spectrolite" ALIGN="top" BORDER="0"></TD>
-<TD>
-</TD>
-<TD>
-</TD>
-<TD>
-</TD>
-<TD>
-</TD>
-<TD>
-</TD>
-<TD ALIGN="right" VALIGN="bottom">
-<div align=right>
-<IMG SRC="cid:1001417929.27019.9.camel@spectrolite" ALIGN="top" BORDER="0"></div>
-</TD>
-</TR>
-</TABLE>
-<h2>Getting Started</h2>
-
-<blockquote>
- On the left of the Ximian Evolution window is the Shortcut Bar, with icons for each of your primary tools: Summary, Inbox, Calendar, Tasks, and Contacts. You can click on those icons to jump from one tool to another. For more detailed information management, activate the Folder Bar by selecting Folder Bar from the View menu.<br>
- <br>
- For a complete guide to using Ximian Evolution, select <b>Table of Contents</b> or <b>Getting Started</b> in the <b>Help</b> menu.
-</blockquote>
-
-
-<h2>Learn More, Do More</h2>
-<blockquote>
- Ximian offers a range of products and services for you and for
- your business. Learn more about how Ximian can help you be more
- productive at <A HREF="http://www.ximian.com">Ximian.com</A>.
-</blockquote>
-
-
-<h2>Questions? Comments? Suggestions?</h2>
-
-<blockquote>
-
- To learn the answers to frequently asked questions (FAQs), such
- as how to make Evolution use your preferred web browser to
- open links in email, or how to use Evolution to open mailto:
- links in web pages, select <b>Ximian Evolution FAQ</b> from the Help menu.
-<br>
- If your question isn't there, or if you'd like to send us some
- comments, write to us at <a
- HREF="mailto:evolve@ximian.com">evolve@ximian.com</A>. We'd
- be glad to hear from you!
-</blockquote>
-
-
-Yours Sincerely,<br>
-The Ximian Evolution Team<br>
-<a href="mailto:evolve@ximian.com">evolve@ximian.com</a>
-
-</BODY>
-</HTML>
-
---=-2gZ1roA/HoYrlRDVGyiM--
-
---=-t4dRE6cqcdSBHOrMdTQ1
-Content-Type: image/png
-Content-ID: <1001417929.27019.9.camel@spectrolite>
-Content-Disposition: attachment; filename=corner-bottomright.png
-Content-Transfer-Encoding: base64
-
-iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAABGdBTUEAALGPC/xhBQAAAAZiS0dE
-AP8A/wD/oL2nkwAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9EJGQsBAVf+8XgAAAA7SURB
-VHjaY/z//z8DPsDEgB8IE1JgSkhBGMP///9xYbP/eCSF////f/4/Hp3n/0MBsg6P////z/uPBgDp
-AG5RDY2ymwAAAABJRU5ErkJggg==
-
---=-t4dRE6cqcdSBHOrMdTQ1
-Content-Type: image/png
-Content-ID: <1001417989.27019.11.camel@spectrolite>
-Content-Disposition: attachment; filename=evolution-icon.png
-Content-Transfer-Encoding: base64
-
-iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABGdBTUEAANbY1E9YMgAAABl0RVh0
-U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAABPQSURBVHjaYtzEuI6BCQgZoRDGRtDIJCrP
-6r8dAxQwATEjlEbGjFD5/0D8Dw3DxBgeMt7BsJdYtwAEEON3xk8EHQqmGSG8X//+IzsahFmAmBWI
-2YGYDUqzQsWZoWpBDv0DxL+g+CcS+w+Spxi0mFQIuwWJBAggRmsmUyL8DmFt+7cX5nBmqGM5gZgH
-iA2B2AWIzYFYCoglGbCD20B8E4hPAfEeIH4OxF+B+BvUM39BHilgyiToFhgLIIAYG5gqCCor/VfL
-AE0OIIdzQB2tCcThQOyHx8GEwBEg3gjEW4H4AxB/hsYOKFb+72BazyCdpMjwfN4juFvEkmwY3s47
-ziBc/BCoYwEDQAAxXhIXYNB7+YWBQZGH4f+NEwz3nrCi2KCsrAwLdVCIcwOxPBAXAXE0A/XACyDu
-g3rmHRB/gcbIv7t37+LVCBBAjPgUQB3PAg11QSAOAuJmIObFpcfWiJtBTpKFQV4C6Of/f6GYgeHQ
-+V8Mj178ZXj08h8+91wE4mIgvgWNke/Q2GDA5U6AAGIhwvFcQCwCxP3Q5IIC+HlYGHwdhRl8HYQY
-fBwEwA7+/x9o5//fwPD7xcD47wfD/38/GSr//mf4B8QPnv5l2HL4J8Py3d8Zrtz/i26cPhBvAOIK
-IN4JxK+h+eM3LncCBBDWGEByPCitK7Gxsi7T09JSv3brFsO3798hDudlYciOVmDIiVEAstmgWeQf
-2AOMQMf///8LyAQmZ6AHGP8B9fz9DuT/ZfgL8gjQf39//QfHSvfybwzHr2F1XwcQLwTil9Ak9Rub
-WwECCMMDaCGvIijAv8zMwFD9xLmzDB8/fYYkExNhhpktRgzyMnxAd6OVluAkAwr9n9DQBzkcGIhA
-zAjE/4Ce+PfnP8NfEAb67w/QIzM3fmfoW/uN4dO3/+ju6wLi+dA8AvLEH3T3AgQQigeQMizI8eLA
-kJ9jaWricP7yFYZPnyGOr8pUZ6jONWdgk85iYGTmZbh9bgaDnMRfSAzA0/xPsAcY/v4A0iDHfwEK
-fwV64CuY/v/nH9ADkFj48xNC33vylyF1wieG648xklUdEK+AegKUnP4iuxkggJjQYwRa2oAybJmh
-ro7Djdt34I6f2WzIUFPkzcCp3MXAwq3H8ODhEwYL71kM4dm7GT5+B+ZzVqA2Fn5ghIAwMHZYgIUW
-MzfDYWBSOXIemKyYOBgYmdiBGFhIA21mZAbSzCAaWLSJMzEsL+Nj0JRhRvdAORAbQd0ETqvQgAYD
-gABiwpJ0QEWlm5K8XNqHT58YXr5+DXW8AUNsuC0Du1QG2J9/vpxjSExKY0hIymBg5tJi0LSdyrBl
-72MGJlZ+BkYgZmABFlTAGPrwlZUhvPASQ2DBA4ay/ldAPgvQA8xAzAB3PNhDQM/w8zAxLCniY9CQ
-RvEEyD3VQCwBzZMoBQ9AADGhJR1QM0CYg4O9gpeXh+HmHUhUZUfLM8QEaTKwiQQBMygwDf98wjBh
-Qg+wWGQA0hMYGhoawNrlFRQZDp16xfAR5EgWHnDol3VeYlBS0WFoampiOH5ThkEr8D7D5sO/wI5m
-ZIR4AhwbUMzPzcQwJYWXgZeDEdmdukAcCcSi0CKdCRYLAAGEnISYoT6MlJaUULn/8DFYUE+Nh6Gr
-XIeBld8RXDv///OZ4e71bQwtfTsYFixYAFbz4MEDBn5+bqAHlBhSi5YzaFh1MGzefY/h8OnXDEvX
-32Tg4uIC47y8PIa4xGyGxKavDBFVH4B1wl+IR6COh3lERpiJoSWCGz0pgSpOZWiMwGMBIICYkGhw
-2mdjY81gAgYLLN13laoCk4QE0HBBoOM/AUvDqwwp+fMZEhLTGRwcHMBqQLSikhaDpGoikNZmWLBw
-OUNayWYGj8jFDPX19QwsLCwMJSUlDOfOnWMwMjJi6OnpYfjJacdgk/qOYfq6b/B2KyhGwDTQU07a
-rAwOmiitAlDouwOxEDSlgGMBIIAYkSo0UCaJFxcT7f79+w/Du/fvGWyN+Rh2zjFlYOVzA3pCCJgJ
-2RkmzF7JMGXBFYYLFy4wCAgI4KxSP3z4wJCQkMBw4MABeEyB+EpKSgxRUVEMIiIiDDdu3GCYM2cO
-g7rkJ4amBG4gzcLw+8d/ht/AauPXj38MD5//ZfDp/YRs7BsgDgHiG9Amx2+AAIK12WGZ14WNjY3h
-y9evkCIzTQqYyQQgxeHvDwz3719laOnfA3YQyPGvXr3C6QGQ/IYNG8B5JDAwEOwhUFK7d+8eQ11d
-HcOuXbsYNDQ0wLEhquzF4FLyAVwXwMpCUMNNSoCJwV4dJRZEoC1fXqibGQECiBmafEDNYnFgVDcw
-MTGxffnyFdieYWXoKpZjYGYSB0YtC8N/xn8MwZlLGDx9YxkyMjIYnj17xnDlymWGz8CkJiwszMDM
-jCg5Pn78yMDBwQFmgzxhYGDAUFFRweDh4cFw8+ZNhtWrVzPMnj2b4cSJEwxycnIM5ubm4KS1bt8j
-YKX2FFgKsTBI8DOCa2yW/4wMu1Fr6q/Q5jgoan4BBBDMA6DM6wZ0RNDPnz8Y/gE7LTHe/AyuVgJA
-hwGLRaa/DJMWn2PYffwzw4oVKxh+//7NcOfObQYZGRmGly9fMjx+/IiBjY2dgZeXF8h+zLBo8WKG
-Hz9/MkhKSjI8efKEoaOjg+HFixcMO3bsYJCQkAAnHZDH/vz5Ay3BGMCesLGxAbbcOBl6ll5jePfp
-F4MO0CNKQkwMc4/8ZEArbPZAk9APgABihkYFsOBm8Adii79/Ia3FpiwhBgVpbnDJ8PD5F4aYkqMM
-HZ29DBYWFgy/fv0CJof7YMcqKiqBMx/IE++B+UZeXoGBFZhpT50+zXADGNpubm4M6urqDD9+/AB7
-BBQTIBqUpEA0KHYaGxsZjhw5Ao8NEN537gXD5E0PGXSkmBmev//H8OLTf+RktB7W0AMIIGZo9w+U
-gYP///+vBW+E5PMxcHKwAD3AxCDAx8nw/TczQ3HNHLCcu7s7w6RJkxhqamqBxScfg6ysLDC0pRje
-vn3L8PTpE6An5BmsrKwYngA9eOz4cQYNTU2GyMhIcIzNmDEDnHRAMQlKZqDkCMrcII+C8sO7d+8Y
-dHV1wflj6/ZdDOHG7Aw/gD2DC0/+oneEHoA6QAABxABt96gD8QVoRxuMvxyR/P/thOr/b2eM/n87
-7/j/6yX//8fXev7X1RD6D3Tgf35+/v/9/f1gtp6e3v/Fixf9B+aJ/2fOnP6/e/cuMP3t2zcgfeb/
-pMmT/1++fPn//fv3wfpA5ufn58P1A2PuPwiA5P39/f9zcnL+BwbK/xQ7jv9HS/n+59ix/0d2G7RP
-AuoRcgEEEHIpBK/UbAyAkfLvH7Al+QvYegQ2i/+BGmXfgZUaJ8OOhW4MH949B2fUgIAAcHHq6OgI
-DMlMhqlTpzJ8Bza3ZWXlwJn75MkTDKKiIgxxsbEMOjo64JAGYaBDwfoKCwvBfFhxrKCgAM4bYWFh
-DH8+P2WINGMH2g2svYQx2kewQQMmgABiQurrIgDQj/+BGfk/rEMCbMuDW5X/vjJMXXCBwcDIkgEY
-UmDLQJaDisotW7YwHDt2HOyg/fv3Ax0uCs7Ut4B9CFDRDCp6QcUoKNOCHArSZ29vD9YLCgiQHKz+
-AJnbGMjFwM3GAPbAf8xOHHzYBiCAGKAlkB4QX4JFka4yy/+Pe8X+fzko/v/rUen/X06o/f9y2vD/
-8eUGYPnz58//nz9//n99ff3/6ABY84LVxMbG/t++ffv/d+/egpMIKOkAPQZWA6JBfJA4CIOSEyxJ
-gpIQsAb+f6Ze4P+xMv7/B/P4/vf6cqEnoS5o740XIIBgrT1tZA+A8PtdYv8/7QN64hDIEzJgT+iq
-cYIdCAIgi0HqQOkWHYDEgKH7X1xcHOxYkKNAakEeXr9+PTjdgxyLDEDqQPLARtz/QzX8/0/WCPw/
-Usz3f3823/9MC4w80AFt4PEABBCsFAI23hk0oIJgEOHMwSDAwwStFf8xTF35keHKU2Vw6QECoBIE
-lI5BxSOoaEWvhUFJCdQGApUyFy9eBKd7kJ6CggKwHlCSglV2MD2g5JTj+ItBC9ikAHVy/v6G9Nj2
-3/nNcOM1SjpaCcT3QCkOIICYoINJv6CDTHBw6dZvoAGQ/uv9J38Y2uZ9AluADECNOFg7BxsAORaU
-tkH5BVTew2ppkD5QPkDWC8obosxPGXwN2MAOh3Q7IfTdtyiOB5YoDO9hwy4AAcQAbYXKAHE6cjSl
-enP+f7VR9P/bbaL/rfVYwekUlDRAaT8+Ph5elOJKRugAlnRAGKQexgclNRAblHS2AYtMUNo/Xs7/
-/1A+3/896bz/18ZwoycfUCclAIjlQG4HCCBYDIB8dRXa5wSD7ad+gqNx8+GfDEcv/QaHFigUYW0b
-EA0qMWClESEAK3JBAFbygPggs0CNvWhrdgZxXiaGP7//g2P+z5//4NA/9hA8LMQgxC/AwMbKBhs7
-+gR18z+AAGKB+uoXtFY7DcT2IFVPgGlu2/GfDJ++/2fg42KEOxq9CQ1yCMhBIHlQcoEVh+gA1KwG
-eRiWXGDpHpSU1CWZGdIcOBh+gzr4IMeDkhAQ/we6bPftPwxMjKDWAB/Du49g/WdhDTmQBwACiBnq
-ASZoZgYBD5ilr4BtkPpoboYAG3aGbYfuMnRPXgq2EFTNwwCs8gE5EBSiIBoEQI029Pwyc+ZMsONh
-HSGQZyMiIhjq/ZgZxIBdSfAoxS8GaAb+z3AR2B9YcuEXgyA/P8Pfv38Zvn7/9hCobRW0GQHKB38A
-Agh5hE4UGvrXkdNcdxL3/wcLhf8/XiL8f24R739gbICLRVj1jw5AeQWE0QFIj6Ys839eTkawPEg/
-KP1HAovIU3XAMh+U7gv4/u/L5P2/M5nn/84knv/Aluh/FmaW/8qycv+BJdp/6PCKA7SDDw5wgABi
-go6x/IOOQ76BKoKDpuXfgL2zf+DoddJjYzjWL8jA+m4HOOTRSyVYkkLPEyD+vl2bGBYX8DGsL+Nn
-OLplKjjJ3bpwmCHFloPhz8//EPwLgkFBt/7qL4Z77/4xiAoJMXz59g3U9Aaln91Iw43g1h1AAIEH
-tqA9fDZoUxWUPqYDsRrMAWaqLEDL+SEjCNChkJM3fzOUzPnCoKJjC87gIA8hl+mg5AQSA6V7kGPT
-bd4w+Juwg0fk/gGTxx5gwQAqJm2UmIFJhgHueFCz4e7bvwxZG78z8PHwgD3wENh5AnpgFtDodUB8
-GYjfgobhQW4HCCDkUYk/0Iz8FIgnIpdIp4AZqXzBF0h/FdpnNVFgZdhcI8Cgx3sK2CdQhGdM9FgA
-l+8sTxl8gOX7b2A/9w/YDAYGa0UWBhsFZiAf2FuFxgDM8aXbvzOwA9tPIMe/BQYA0PGgZH0QVLZA
-3QjvogEEELOUlBTDnj17GNDK2t/QfGEEU3jj2V9gyfSXwV6DFTx6+A+IWYG1tJkyK4MzMGlNWrCH
-Yc7ideAMDooBWO+rtDCLYWoCDwM3MyM4g8IzKRD/hta0IDZ4CB3q+N/A5C0D1Pv123eGt+/ffwRK
-TYY2dZ6ij5ECBBD62CgjdMhCDIhVQQEIal2jlCaarAxNwVzgohU+FAKdy1ty+AfD9L0/GILD4xgW
-LlzIAGzbMDhL3GKIADaL/8FGpf9A6d+QAd5/0H4KqMRp3At0/H9WBmlJCXB38+mLlz/+/fsHSs47
-oCMRb6B59T/M3QABxAzsPDAYGxszzJo1i+Ho0aOwmPgLxaD5LEVoTQ0p+t78Y9hx8TeDiggzgziw
-rQSu7kExAqS1pVgY3LTZGFbtOMfw/OM/Br7/rxmqPbmgIc4Ab9uA0zzQA6By/gsw6cw984thMrDO
-YefgYhAHNsP//PnL8Ozli5/AvvlcoJX7gfgOkuNRZm0AAgjf8DoPdO4LlKlLgdgSvcQxlGNhSAHW
-oIayiOHK//8hpchBYFtKAlizgjojwL4RPAZAAwYMUIevv/YbXNp8/83IICIsxMDNxQUe0nn99h2o
-loU5/jq0nfYZ2/A6QACB84C2tjZcAJon/iE18n5ADfkH7TcgJraAobztym+wY78DHcQMdBg/KxM4
-pGX4mBj42SDpHtYo/AzMwGeAfduVl34xTAKG+Lln/xg4uXgZRIGOBw0EvAb2qT9++vwKWgoehqYA
-2NzA3/LycnBqQQYAAYRvhgbWdeOGVnIK0PyQAp1KxQn0gU2D/7DECAUvv/wDYogAGysrAxcXJwMX
-MPkyMzMxfANm1ncfPoJi7xC0qAQFGKjWfQXLtMjpHpTc09LSwGyAAGLEJoglOXFCRy4koQOs3kDs
-BSrysXkANJIBNhySw8GOBA18gRzOCsQsQPY/YFL7/v0HOMkAHX4FOid2DtpMeAKd5INVWP9xTfIB
-BBAxs5SwwSR2aL4QhXpEFjQYBi1q4ZUeyNGg5MAI9ATIIyA+EyMjeMD2399/4DbNL2D5CSxdPkNn
-I0Hl+zWoo59AMytsvvgvoWlWgABiBA0uhYaGwgVAw37IfCSPMCJNufJAYwTkGXGoZ3ShbXQlaONQ
-FsmIT1AMaoA9g87Y34ZO4L2ENg/eIzn8N75QRwYAAcRIjCK02ICtj2CH5g8e6MgeP7STzQv1JDvS
-aAesQPgOHdv8CPXQR6ijvyE5/B++eWF0ABBALMROpcMMBHrkH9IijR9QR7yGOpgdadEH8lgT+mKP
-H0iLPv7A1kgg2wNKCcQAgAACJyFyAGiME2liEHmpDTMSH3m5DWx5zV+0JTfgognmDq/+Dga9lyA/
-mTD8/zmDIZFnPrjwEwWPJtowJIJLVltg+j0MpgECDADuXybnyFX8nAAAAABJRU5ErkJggg==
-
---=-t4dRE6cqcdSBHOrMdTQ1
-Content-Type: image/png
-Content-ID: <1001417929.27019.8.camel@spectrolite>
-Content-Disposition: attachment; filename=corner-bottomleft.png
-Content-Transfer-Encoding: base64
-
-iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAABGdBTUEAALGPC/xhBQAAAAZiS0dE
-AP8A/wD/oL2nkwAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9EJGQsBCVkleUoAAAA/SURB
-VHjaY/z//z8DPsDEwMAgTEiBKSEFYXjt+A8BZv///2fAhmEKzv///18YnwKYIjN8CmBg3v///z1g
-JgIAui9uUdDfxKcAAAAASUVORK5CYII=
-
---=-t4dRE6cqcdSBHOrMdTQ1
-Content-Type: image/png
-Content-ID: <1001417929.27019.7.camel@spectrolite>
-Content-Disposition: attachment; filename=corner-topright.png
-Content-Transfer-Encoding: base64
-
-iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAABGdBTUEAALGPC/xhBQAAAAZiS0dE
-AP8A/wD/oL2nkwAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9EJGQsANW9RNIwAAAA7SURB
-VHjahcwxDcAwEATBCwZzCQajNCVDGlduouh/petGFwQDE8un/OzFrsB93BW4Tx6kaHVgdmB0IAcq
-73eg4H8gZQAAAABJRU5ErkJggg==
-
---=-t4dRE6cqcdSBHOrMdTQ1
-Content-Type: image/png
-Content-ID: <1001417869.27019.5.camel@spectrolite>
-Content-Disposition: attachment; filename=corner-topleft.png
-Content-Transfer-Encoding: base64
-
-iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAABGdBTUEAALGPC/xhBQAAAAZiS0dE
-AP8A/wD/oL2nkwAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9EJGQsAJuvvdVIAAABISURB
-VHjafcxRDYAwDAbhYxbqZRpQOQGYQQkabk8kzRj9kz59l+J3Qz3VUCHBrXaVfCSMFXPQd/gG4w9V
-GnBR7FADeKqgesAEj0KK3Z8K59sAAAAASUVORK5CYII=
-
---=-t4dRE6cqcdSBHOrMdTQ1
-Content-Type: image/png
-Content-ID: <1001417869.27019.4.camel@spectrolite>
-Content-Disposition: attachment; filename=bluestripes.png
-Content-Transfer-Encoding: base64
-
-iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABGdBTUEAALGPC/xhBQAAAAZiS0dE
-AP8A/wD/oL2nkwAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9EJGQsLBap83esAAACESURB
-VHja7dRBDcAgEADBgwDBEj4wUvdN+2h1kJvVMNmy9vVF4mokr93PGwRkFjBHJ8ADCPAAAjyAAA8g
-wAMI8AACPIAADyDAAwjwAAI8gAAPIMADCPAAAjyAAA8gwAMI8AACPIAADyDAAwjwAAI8gAAPIMAD
-CPAAAjyAAA8gwAMIOL8fcegyqOBdwTkAAAAASUVORK5CYII=
-
---=-t4dRE6cqcdSBHOrMdTQ1
-Content-Type: image/png
-Content-ID: <1001418096.27019.14.camel@spectrolite>
-Content-Disposition: attachment; filename=ximian-update.png
-Content-Transfer-Encoding: base64
-
-iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABGdBTUEAANbY1E9YMgAAABl0RVh0
-U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAABMfSURBVHjaXM1LCoAwDATQqYq2qQs9R7bm
-Km69YK/kWepUWwUDD0I+DEQEUeLNZCWDLQdyzg9VKFqdb6eaWuuoo4FG8iQ0/0jdlZu+/pRfmG1f
-XmKe/vM42zNSvZEQ4NxEHpcAYuQACvxi4oQ7rGH1d4baYCgnHuixNSBbQPZogW1+/+00TCkTFLNC
-HQXC7FCsBcT8MAcCwX8gvgnE74D4JxT/guLfQPwPihlAAQoJMUawkWwMKgyqIANPnWJYADaqiUFH
-p57h6lWIBwECCO7DMFgI/I9g4GTiAPuQA0j//2/EwMQI9AIjI7LD2aChKgbE+kBcDsR7gPgp1LH4
-8BkgngbEQUCsCDWDB2omEwOJACCASEGM0NDmBWJJII4B4n1EOBgffgbEvUBsBsRSULNZkWKOIAAI
-IMb2KgWGyrYnwLDgYfh/PIfh3tdEFAXKysoM0DQLCiFuILYE4lpQ0qVi4HwG4tlAPAuazD5Dk9bf
-u3fv4tUIEECMuBRAHc4IdTwoAwoCcRkQZ+EyTF6SjcHOmIdBXoKFQU6CEUgDA/nfH4ZD538y/Aem
-8EMXfjEcufgbn3vuAHE9EB8G4g9A/B2I/4BTOw53AgQQCwHHs0BDXZGNlXXZr9+/NTAcLcXBkBsl
-x+DrKAz2AMP/v0D8G4z///sBDMMfDLZGQPrfXxAC4v8Mmw79ZFi26zvDthO/0I1TAeKZQNwPxIuA
-+DUQf4V5AhsACCCsMQD0AMzxoMxlw8/Lu0RXQ5PvyOlTSA7nZKjJ1GCI85cDehWa94CFAMP/PxDH
-//8FdjzDv+9AP30D0t+A9B+wB/7+AeLf/xkePP3LUDX7C8OOU7+wuW0+EHcB8Usg/gJKUtjcChBA
-GB6Ahj7M8bbiIiJL5WVkec9duczw5w8kIHJiVBhqs3UYBPiBkcPIwvDxE0Scn48V4oF/wBgAhj44
-BoAOZ/gLcjzQDUAM8gQQQTzxC+IRUNIqmPqF4cmbf+juA5WcnUD8HBYT6O4FCCAmHBkWlOYVebm5
-Z0iJS/Ceu3wJ7Hh+XlaG1ZOsGPoaQxhEdFsYWNVmMjByKDFMXv6MQUBEBugXAQhmBVYBLPxANi8D
-IzOwYGHmBtJAzzIBjWViBiEIZoHQNjqsDDvb+Bm05JjRPZAAqo2AWBSIQZUVM9SNcAAQQExYikpQ
-aSPIwsw8S0leXurW/XsMf/7+BTt+93wHhoDASAZWuWoGJg5lhn/vdjA0T9jLYG+lCXQgD9jxDCDM
-DHI8H5AGOZ4HLAdyPCMzEDMBa1AmRgYmKGZkhmABXkaGbU18DMFWbOieqAClBCAWgLqNEdkTAAHE
-giPpZMnLyJg8fPKU4eu3b2D53fPtGAxNHBhYRILBafvf1/MMB/bvYnj4ggHsAbDXgUUN479fkOTz
-lwVcg/8H6/4HzxsMTL/AahiZ/gAdDuT+hcYGM8hD/xm6ErkYHr/+y3Dq9l9kT9QA8RUg/gEtXuGZ
-GiCAmJAczwSNJgVuLq4sUKh/+PQRrGh2swGDgZ42A7OAB1DrN2C+vM3w7sVphuKmnQx1pSHAJANK
-OoJADA15YNL5+I2ZYdO+pwwtUy8zuCYeYkitvw20gQMcAwxMrOCaHYxBscAEKQfAsQGkp6VxM0gJ
-odRlSkCcB8Qi0PYUEywWAAKIBa1IBYV+jRC/AM+zFy/Agr6OYgxxAUpANzkwMAJz3///H4Chf4Zh
-8txjDP7e1gwKCrJAh7BCC6E/DEnZfQwHj15lePjkLaLEkhVjOHT6PkOsjyCDnQFQLUg940+gY/8z
-gFooEI8g2HzcjAxtEZwMCdO+IXsiEIhXgppjSO0oBoAAYkFr38iys7P7/fj5g+E3KNPyMDP0lGoy
-MHPqAhMD0NI/n4HF4GOg4z4wLFx9huHcwUmQEAe2m0C2M/77ybBo5SGwgXMnZQIrMiYGe3Nphv8/
-njAkl+9kaJlxn2HXLA1wyQVWz8CACH1wjMA8AazmVVgY/IxZGDadhacWUH0UDW3BgUskYCz8Awgg
-JrSSJ4wb2FT9/PUrWEdutDSDgjQfMG2KA1PeR4b/v54Bk/IbhkWrTzI42BgwCAgKQjIpOOnwgzNt
-XmYYMGZsGeJDTRnsLZXB+QHk4LhAFYZDZ98zLN78GpRWgI5kQm3xQB0OrlLAnmFgyHBmR8/QLtBk
-xAlL/gABxIJU4/IAQ8GPmZmZ4cfPn2DVsb6iQMeLMDD++QqupP4xAaOUhYlh4ux9DPu29IGTAiMj
-MOJYeMDmMQIzcX9HNtCzH4AefQ9zDRjZmYoDKz8uhpKe+wy+NmoM/JxI5R7MI+AW738IF0hICTAy
-+BiwMGy5AI8FkONdoY1AUHvpD0AAMSEVnapAx6t8gYa+rz0fuGnA9B8oBXTM/7/vwOn/4LFb4BDV
-1xSDNuFB7QNQyfMT2oxAamzC2dCiJEuD4eOXvwwts18gwhRZyX8GVHEgcFDDqBuMgJgP2mplAggg
-WKcEFFeWIJ98//ED4gE7YKj+BxZtoJr0P8jxb4H4H8PB47cZDLSALd//sOISWMv+AZZWQPz/71eI
-GEgOXGz+gXrqL9ijfg6iwHzFwjBl5XuGTQe/ojoL5F8QhNIwYAf0AA9qStKFegAkyggQQExIGVjj
-719E2WtnCAp9kOVvoR74AnE0SAyUNP5+hzj4zycgBiUZYOPx7ydokwEk94PhwtVHDMHpqxnY1KYy
-sGstZVDz3AsP2rS2D8BW6i+Ig/+jRdw/BhRxQ1mU+lYO2m8Ad4AAAogF6gFQ2ar+7z/C56CmMON/
-YGz8/8rw7x8LELODQ1dempvh4MTrDA8ePmZQkJdh+M/0G1yuQ0LxDzgpgWKlqXczQ3P/LpSg+/gZ
-0aj8+OU/Q9tiZmDd9p7B05yNIdmDA+5wiCf+w/mqokwMh++gtJPUgPgaqPABCCAWpH4t3Ju2BmxA
-zcAyH5i2fwMd9A/ocEagBxj/sQJLE1WG5onAKj9pJsOe1bkMggL8kGIR7AFg5ffxI4NzyCSGi9ee
-EezFHD77BkwfufSb4T6wZVofyQV2+L9/0FiAekJZGKODxg+LAYAAYkIaUVBCTZB/Gf4CHf4P3KL8
-AW1RglqWXxnWTPNmePD4LYOJexfDhm3HwSUOCL9/9wLo+IlEOR4drAZ2Yf6BHP+XAdUTwOY3NxuG
-B1hhJShAALEgDYvwoLgfaAiotgS15xmB7Zr/DJCyGxTDempcDKc3RTKkVOxnCEldzCAvI8AQF6zH
-sGnXTYaL119iOM7PWR6oh53h0KlXwLrgA1hMT12I4dLNd3A14c5iQMd/BvcXwJ4A0zCP/Ec3Ej4s
-AxBAyE2JV9ARAkhe+gcqlv9CQh5UxoMbZv/BZT0D8x8GeXF2hj0LnBgWbbjDMHnRLWCyOoQax3xc
-DHlx2gw5kSIM/OzvwJm7OoafQcL9Izj9L2sQYDh4+jdDdt9nhrRAOYY890/QHhsD3BMw9v+/uGMO
-IICYoO79B+35QDPbf0RIgDonwGQDKV0+A5PKJ0SxCcSxvpIMp9Y4MPi5KKIY3FOqzlCdxMnAz/YG
-qhdoBjA/6alAwkxa8DNDuAM7w8tNSgx1oV+ARSUjsPv8Hyt+/gkjBv5C3fwfIICYoIw/yNXI5Xt/
-wD0mSJr8D87MEMd/BheVMMf//wOtcYE174cPH1FsWLzxMbiI/Q/UB2pDgYpVULJ4+BwSnP/AvTJQ
-BH8EOxLcQwMVYmBHQ3tsUPYLTA+8hrkZIIBgHgC1sS8iq7h4C9h//Y0Ihf9/f4ND8j/U8SBHM/x+
-D282fPj0A1w7z66TA+s/dAbYZtr4BBJjf39B+sJA/OjlPwZbMyW4AyH9YwZw1/IfshjMI0A9F59j
-dDWfQ1uj/wACCOYBUOPnNrKKIxd/wfuu/6Ch8x9Y0YFDEpyMPsBj4D/QE5dufWOw1WdgiPFgYZhV
-LQQ2o2Xue7AecHIEmrFk+3ew+KXrz4Dqf4MD6C8B/PnHf4ZLL1BiANYaBXsAIICQPXAaWdXyvT8Y
-/kA73X9+I4cKMDb+/AM6CliL/vkObOe/Y0htegxtfnCBi1pbfSZgXcLK8OjFX4bFO1nhjgl34mdI
-9xcA5rEfDEENnxgu3fkD7tj/gcr/gbJh9oLsO/YAEvpC/PwMbKzgCvMGKJtC3fwXIICYkYolUMVg
-DB3iY3j94T+DuxErgyg/E0qjC1Qzti/8ysDHxcgwd+M3hvSOTwwfvrIxdBXKM3hb/GG4ePM7g2PW
-O4Zbj/4yRHvLMWT4/GNgAZZmkFGIPwx22owMWgrcDDtPf2dYfeQXg4IIE4O8IBPE0SAP/IR44PdP
-SCU2/cRfhtdfGRnEhUUY3gMrSaD1y0GRCM0HvwACiBmtMy8BxBbwcvX9PwY/YDWP3C4BhWpM8yeG
-eZu/Mzx8xcrQkSPOML2Ei0FH7hvQgl8MNunvGD5+/c8QCWzLT85lZmBl/ANOy4jkAuyzCv9jiLTn
-ZTgJbNjO2vUNqP4fw7wDvxhUxTgZ+IBFNMgToCQLSvtLzv8DFsl8wEr1L8PX799fQIdaHkJH7v4A
-BBALNGz/QNvXm6C9HtAwBsPOs7/B1byVNisDE8t/cMe7Y8lXBi87GYZIJw4GL9Mf4KLxzw/o8MHU
-L2DHRzixM0zM5QWHJKJMh+YlaNLg/P+TYV4qE8OUnbwM03d9BusX5+Ng+PP9B1gNuCQ79xc8Ms7P
-w8Pw/DUowMGDya9gfQGQ2wECCDywBeyVMUF7ZAqghiKoMwaLBU1ZZoYVZTwMArxMQE8Am9eswDbR
-/1/QbiAk7h6//sdw/NpvhrzJXxgi3GUZJqQBM+6fn5AmAdzxkBIFFhPgdP8LklxuPGdl4GJjZxAE
-9jdAoQ+K6XVX/jLMOPmXQVRICFyJvnr3FtQXLgRi0PAgKNN9A7r9H0AAwRpw/6C5GlS3bwDiNzAP
-XH/8l6Fx2Xdwmvz94x/D72/A/vLPf1AMSavLd/8AO95Sm5uhJ+EPwy+QGpDaH/8RNFD9nx8IPX9+
-/IezFbh/ojj+7tt/YMeDurfsbGwM7z6Cmx/rgfgJUqcenLsBAogJaZAIloxALbFJyCXSuuO/GObu
-/AF2yK/vUAd9hznuH7ADzsygrSzEMDNPmOHX1++YjofTCD3gAEBiIzu+ZNsfBlYWFmCs8wFLrM+g
-gTVQ03kndALlC2xcCOR2gABCbgv9gw4cgcZDQD0PA+gsChi0r/vBwAPM5gFmbOABKNhIAigJcQLZ
-bZFMDOzAjv9vUJ/nP8Qx8JblXwZ4JQVOSr9Ri05Ymoc5/hew/yEiKMTw49dP0AADKPjnQDPuW2jx
-+Q82RgoQQCiDu9BRaXZoow40NdUIxNYoLUtjFobmEA7IgBQjIh8guoVIPSpoaxKWgUEegWXiv9A8
-8A9ayYJKnIY9fxh+/gU5XgBY6vxjePP+/Q9gYEwGSu8A4ltQD/zoZX/wv/hnAsOk3AMMAAHELGkm
-xHDb3Yhh8/FtDGeebGNAatyBGi2PgNgc2oEAg5tAi/Zd/cMgJwAsm3kYoSEKxdDQBTcLkCslMGaA
-VFQ/YZkX4skvQP7cM38ZJh0DljjMbAyC4CLzH8PbDx9Ajp8JLXnuQfMlOPR3/Z3I8DDOhuGc/SEG
-gAACtpM3MNRd9GBgjYxBbul9g1YUl6GDqxeQY+HWi38MaQt+MNSt/cnw8MUfcL4A428g/B9M/wSx
-QfnkO4SGyYPyAcijIIfvuvWXIXbVb4YN1/4z8HBxAYtLXnCyQXP8HahbQMn778OQBIgjvrEw3OPL
-YAAIIMb2pR8YonZmAAU4GOTXvWFoX3KEoTLqA6zXwwOt3FShxas3tja5oQyw6aDMzGCjxMQgzssI
-TUKQmhTSmoX2dYHg6MN/DMeg+BswFjjYORg4OdjB+enbjx+gUZGX0NmZg1DHv0TOuCAPrElkYAgJ
-mcMg/52FASCAWBgYDzCsCedgeFhvwyA+rQ2o5AA0/4I1fIG2/EDsidAR4lRQ0wTZA+ef/APjSUAr
-uYEZXUUYMiqtLMTI8BLYt/gCdCgI33sH8QUTEzDDA+sTfl42MPvX79+gWhbk6WNA6TXQlvEjpCkm
-cMhvlNZhWGbxhaHSu4HhwbEjDAxWDAwAAQQ2sHdrAkaoPowrQR705YUOZ4CmQyOBeAs0mWGdPgWG
-JhgzQTEzsNgCFov/OdjZ/wOTyn8+Hp7/vNzc/znY2MHyQD33gbgDNLQJzXMy0NhngYU6CChyBTC0
-rwAHLkP6VUgBChBA4PKjF9hLKr7zB1+fmxlpclsUOk8MSlZ2QOwITWbQ0UFGBqCDwTQTlAYlJ0ZY
-6QDMoKBMCqR/Qhtl+6FDJE+g5fxbaMz/ImaaFSCAGAkpwDJryQEdKRaEegZW5OpCY0kaKsePZsxj
-aKw9hTr8FrRd8wpawnyAVqQ/Ye0cYtwGEEBEeQDJEwxIwzDsSIs6+KHDfbxQPic0xliQavlfUA+A
-0vQnJPwZOh8Mc/g/Yt0EAgABxEiKYiwewbXYAzZug9zW+oM0MYG84OMP8mIPUt0DEEAspA5AwSwA
-TS4gVXg/kTyEjNHHoJH1wDM9qY5GBgABBgBtfYX2h4rUhAAAAABJRU5ErkJggg==
-
---=-t4dRE6cqcdSBHOrMdTQ1--
-
-
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 980b788d2b..0000000000
--- a/default_user/local/Outbox/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-defaultoutboxdir = $(privdatadir)/default_user/local/Outbox
-defaultoutbox_DATA = folder-metadata.xml mbox
-
-EXTRA_DIST = $(defaultoutbox_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/Outbox/mbox b/default_user/local/Outbox/mbox
deleted file mode 100644
index e69de29bb2..0000000000
--- a/default_user/local/Outbox/mbox
+++ /dev/null
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 0a775f2af3..0000000000
--- a/default_user/local/Sent/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-defaultsentdir = $(privdatadir)/default_user/local/Sent
-defaultsent_DATA = folder-metadata.xml mbox
-
-EXTRA_DIST = $(defaultsent_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/Sent/mbox b/default_user/local/Sent/mbox
deleted file mode 100644
index e69de29bb2..0000000000
--- a/default_user/local/Sent/mbox
+++ /dev/null
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 cf15713a7a..0000000000
--- a/default_user/local/Tasks/Makefile.am
+++ /dev/null
@@ -1,3 +0,0 @@
-defaulttasksdir = $(privdatadir)/default_user/local/Tasks
-defaulttasks_DATA = folder-metadata.xml tasks.ics
-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/Tasks/tasks.ics b/default_user/local/Tasks/tasks.ics
deleted file mode 100644
index 89b0ad51a8..0000000000
--- a/default_user/local/Tasks/tasks.ics
+++ /dev/null
@@ -1,5 +0,0 @@
-BEGIN:VCALENDAR
-CALSCALE:GREGORIAN
-PRODID:-//Ximian//NONSGML Evolution Calendar//EN
-VERSION:2.0
-END:VCALENDAR
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 95c254153e..0000000000
--- a/default_user/local/Trash/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-defaulttrashdir = $(privdatadir)/default_user/local/Trash
-defaulttrash_DATA = folder-metadata.xml
-
-EXTRA_DIST = $(defaulttrash_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 aedf87cbc6..0000000000
--- a/default_user/searches.xml
+++ /dev/null
@@ -1,110 +0,0 @@
-<?xml version="1.0"?>
-<filteroptions>
- <ruleset>
-
- <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>Subject does not contain</_title>
- <partset>
- <part name="subject">
- <value name="subject-type" type="option" value="not contains"/>
- <value name="subject" type="string"/>
- </part>
- </partset>
- <sources/>
- </rule>
-
- <rule grouping="any" source="demand">
- <_title>Sender contains</_title>
- <partset>
- <part name="sender">
- <value name="sender-type" type="option" value="contains"/>
- <value name="sender" type="string"/>
- </part>
- </partset>
- <sources/>
- </rule>
-
- <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>
-
- <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>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>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>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>
-
- </ruleset>
-</filteroptions>
diff --git a/default_user/vfolders.xml b/default_user/vfolders.xml
deleted file mode 100644
index cd16144f87..0000000000
--- a/default_user/vfolders.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0"?>
-<filteroptions>
- <ruleset>
- <rule grouping="all" source="local">
- <_title>Important mail (local)</_title>
- <partset>
- <part name="status">
- <value name="match-type" type="option" value="is"/>
- <value name="flag" type="option" value="Flagged"/>
- </part>
- </partset>
- <sources/>
- </rule>
- <rule grouping="all" source="local">
- <_title>Unread mail (local)</_title>
- <partset>
- <part name="status">
- <value name="match-type" type="option" value="is not"/>
- <value name="flag" type="option" value="Seen"/>
- </part>
- </partset>
- <sources/>
- </rule>
- </ruleset>
-</filteroptions>
diff --git a/designs/ChangeLog b/designs/ChangeLog
deleted file mode 100644
index b8eec55373..0000000000
--- a/designs/ChangeLog
+++ /dev/null
@@ -1,36 +0,0 @@
-2003-01-15 Anna Marie Dirks <anna@ximian.com>
-
- * OOA/Comments: Added this file to store discussion of OOA designs
-
-2003-01-09 Anna Marie Dirks <anna@ximian.com>
-
- * OOA/oooa_question.png: Updated question test
-
-
-
-2003-01-09 Anna Marie Dirks <anna@ximian.com>
-
- * OOA/outlook_screenshot.png: Screenshot of outlook's OOOA Config dialog.
-
- * OOA/outlook_question.png: Screenshot of outlook's OOOA question dialog
-
- * OOA/spec.txt: Spec file for Out of Office Assistant
-
- * OOA/oooa_screenshot.png: Screenshot of mockup of OOOA Config dialog.
-
- * OOA/oooa_question.png: Screenshot of mockup of question dialog
-
- * OOA/ooa.glade: Glade file for the Out of Office Assistant
-
- *OOA : New directory
-
-
-2003-01-06 Anna Marie Dirks <anna@ximian.com>
-
- * proposal.png : Changed help message
-
-
-2003-01-03 Anna Marie Dirks <anna@ximian.com>
-
- * read_receipts: New directory.
-
diff --git a/designs/OOA/Comments b/designs/OOA/Comments
deleted file mode 100644
index 83d3c2900d..0000000000
--- a/designs/OOA/Comments
+++ /dev/null
@@ -1,3 +0,0 @@
-Hi! Please feel free to add your comments and questions about this
-design here. Be sure to include your name, your email address, and the
-date/time at which you are commenting. Thanks! -Anna
diff --git a/designs/OOA/ooa.glade b/designs/OOA/ooa.glade
deleted file mode 100644
index 386ad85810..0000000000
--- a/designs/OOA/ooa.glade
+++ /dev/null
@@ -1,488 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-
-<widget class="GtkWindow" id="Out of Office Assistant">
- <property name="visible">True</property>
- <property name="title" translatable="yes">Out of Office Assistant</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
-
- <child>
- <widget class="GtkVBox" id="vbox1">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHBox" id="hbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkImage" id="image2">
- <property name="visible">True</property>
- <property name="stock">gtk-dialog-info</property>
- <property name="icon_size">5</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label6">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;small&gt;The message specified below will be automatically sent to each person who sends
-mail to you while you are out of the office.&lt;/small&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTable" id="table1">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Status:&lt;/b&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkRadioButton" id="radiobutton1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">I am currently in the office</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkRadioButton" id="radiobutton2">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">I am currently out of the office</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">radiobutton1</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label4">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frame1">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
-
- <child>
- <widget class="GtkVBox" id="vbox2">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_OUT</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTextView" id="textview1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="justification">GTK_JUSTIFY_LEFT</property>
- <property name="wrap_mode">GTK_WRAP_NONE</property>
- <property name="cursor_visible">True</property>
- <property name="pixels_above_lines">0</property>
- <property name="pixels_below_lines">0</property>
- <property name="pixels_inside_wrap">0</property>
- <property name="left_margin">0</property>
- <property name="right_margin">0</property>
- <property name="indent">0</property>
- <property name="text" translatable="yes"></property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Out of Office Message:&lt;/b&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-<widget class="GtkWindow" id="window2">
- <property name="visible">True</property>
- <property name="title" translatable="yes">Out of Office</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
-
- <child>
- <widget class="GtkVBox" id="vbox3">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHBox" id="hbox3">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkImage" id="image3">
- <property name="visible">True</property>
- <property name="stock">gtk-dialog-question</property>
- <property name="icon_size">6</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label7">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Currently, your status is &quot;Out of the Office&quot;. &lt;/b&gt;
-
-Would you like to change your status to &quot;In the Office&quot;? </property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.69</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHSeparator" id="hseparator1">
- <property name="visible">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHButtonBox" id="hbuttonbox1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkButton" id="button1">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment2">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox5">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child>
- <widget class="GtkImage" id="image6">
- <property name="visible">True</property>
- <property name="stock">gtk-no</property>
- <property name="icon_size">4</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label9">
- <property name="visible">True</property>
- <property name="label" translatable="yes">No, Don't Change Status</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="button2">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox4">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child>
- <widget class="GtkImage" id="image5">
- <property name="visible">True</property>
- <property name="stock">gtk-yes</property>
- <property name="icon_size">4</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label8">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Yes, Change Status</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/designs/OOA/oooa_question.png b/designs/OOA/oooa_question.png
deleted file mode 100644
index 086d65ac78..0000000000
--- a/designs/OOA/oooa_question.png
+++ /dev/null
Binary files differ
diff --git a/designs/OOA/oooa_screenshot.png b/designs/OOA/oooa_screenshot.png
deleted file mode 100644
index d458b34360..0000000000
--- a/designs/OOA/oooa_screenshot.png
+++ /dev/null
Binary files differ
diff --git a/designs/OOA/outlook_question.png b/designs/OOA/outlook_question.png
deleted file mode 100644
index 23e0fdbd1f..0000000000
--- a/designs/OOA/outlook_question.png
+++ /dev/null
Binary files differ
diff --git a/designs/OOA/outlook_screenshot.png b/designs/OOA/outlook_screenshot.png
deleted file mode 100644
index a90aab07b0..0000000000
--- a/designs/OOA/outlook_screenshot.png
+++ /dev/null
Binary files differ
diff --git a/designs/OOA/spec.txt b/designs/OOA/spec.txt
deleted file mode 100644
index e369578823..0000000000
--- a/designs/OOA/spec.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-Out of the Office Assistant Spec:
-
-0) Screenshots Included:
-
-a) oooa_screenshot.png : A screenshot of my mockup of the Out of Office configuration dialog.
-b) oooa_question.png : A screenshot of my mockup of the Out of Office question dialog. (Used to switch status back to "in the office".)
-c) outlook_screenshot.png : Screenshot of Outlook's implementation of the OOO configuration dialog.
-d) outlook_question.png : Screenshot of Outlook's OOO question dialog.
-
-1) Location:
-
-The OOOA Configuration dialog should be accessible from the "Tools" menu.
-
-2) Defaults:
-
-When the user opens the OOOA Configuration dialog, the value of the "Status:" parameter should be "I am currently in the office".
-
-3) Use:
-
-The user may toggle her in/out of the office status using the "Status:" radiobuttons.
-
-The user may specify an out of the office message in the text box provided. This message will be sent once to each sender who sends an email to the user while the user's status is "out of the office".
-
-FIXME: What event triggers the "Do you want to change status?" dialog?
-
-
-
-
-
diff --git a/designs/read_receipts/.cvsignore b/designs/read_receipts/.cvsignore
deleted file mode 100644
index 751553b3ac..0000000000
--- a/designs/read_receipts/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-*.bak
diff --git a/designs/read_receipts/Comments b/designs/read_receipts/Comments
deleted file mode 100644
index 83d3c2900d..0000000000
--- a/designs/read_receipts/Comments
+++ /dev/null
@@ -1,3 +0,0 @@
-Hi! Please feel free to add your comments and questions about this
-design here. Be sure to include your name, your email address, and the
-date/time at which you are commenting. Thanks! -Anna
diff --git a/designs/read_receipts/notification-of-rr-request.jpg b/designs/read_receipts/notification-of-rr-request.jpg
deleted file mode 100644
index 588aa1e656..0000000000
--- a/designs/read_receipts/notification-of-rr-request.jpg
+++ /dev/null
Binary files differ
diff --git a/designs/read_receipts/proposal.png b/designs/read_receipts/proposal.png
deleted file mode 100644
index 6a1a4a4faa..0000000000
--- a/designs/read_receipts/proposal.png
+++ /dev/null
Binary files differ
diff --git a/designs/read_receipts/read.glade b/designs/read_receipts/read.glade
deleted file mode 100644
index 358239db0c..0000000000
--- a/designs/read_receipts/read.glade
+++ /dev/null
@@ -1,339 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-
-<widget class="GtkWindow" id="Read Receipts">
- <property name="visible">True</property>
- <property name="title" translatable="yes">Read Receipts</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
-
- <child>
- <widget class="GtkVBox" id="vbox7">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHBox" id="hbox4">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkImage" id="image3">
- <property name="visible">True</property>
- <property name="stock">gtk-dialog-info</property>
- <property name="icon_size">5</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label30">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;small&gt;This page allows you to choose if you want to be notified via a read receipt when a message you
-sent is read, and to specify what Evolution should do when someone requests a receipt from you.&lt;/small&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox10">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHBox" id="hbox6">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label36">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Sending Email:&lt;/b&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="checkbutton8">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Request a read receipt for all messages I send</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frame6">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkVBox" id="vbox9">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHBox" id="hbox5">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label33">
- <property name="visible">True</property>
- <property name="label" translatable="yes">When you receive an email with a read receipt request, what should Evolution do?</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkRadioButton" id="radiobutton11">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Never send back a read receipt</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkRadioButton" id="radiobutton12">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Ask me if I want to send back a read receipt</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">radiobutton11</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTable" id="table2">
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">0</property>
- <property name="column_spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label34">
- <property name="visible">True</property>
- <property name="label" translatable="yes"> </property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkRadioButton" id="radiobutton13">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Always send back a read reciept</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">radiobutton11</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="checkbutton7">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Unless the message is sent to a mailing list, and not to me personally</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label35">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Receiving Email&lt;/b&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/designs/read_receipts/read.gladep b/designs/read_receipts/read.gladep
deleted file mode 100644
index af366b66a7..0000000000
--- a/designs/read_receipts/read.gladep
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
-
-<glade-project>
- <name>read</name>
- <program_name>read</program_name>
-</glade-project>
diff --git a/designs/read_receipts/read_receipt_options.jpg b/designs/read_receipts/read_receipt_options.jpg
deleted file mode 100644
index 5b1462d31f..0000000000
--- a/designs/read_receipts/read_receipt_options.jpg
+++ /dev/null
Binary files differ
diff --git a/designs/read_receipts/receipt.jpg b/designs/read_receipts/receipt.jpg
deleted file mode 100644
index 854ca4ae78..0000000000
--- a/designs/read_receipts/receipt.jpg
+++ /dev/null
Binary files differ
diff --git a/designs/read_receipts/secure_options.jpg b/designs/read_receipts/secure_options.jpg
deleted file mode 100644
index b82562fb9b..0000000000
--- a/designs/read_receipts/secure_options.jpg
+++ /dev/null
Binary files differ
diff --git a/designs/read_receipts/spec.txt b/designs/read_receipts/spec.txt
deleted file mode 100644
index dd8fb7b832..0000000000
--- a/designs/read_receipts/spec.txt
+++ /dev/null
@@ -1,67 +0,0 @@
-Specification for Read Receipts:
-
-0) Screenshots: The screenshots included in this directory are:
-
-a) proposal.png : My proposal for the RR page of the settings dialog
-
-b) read_receipt_options.jpg : Outlook (Express)'s RR settings dialog
-
-c) security_options.jpg : Outlook (Express)'s Secure Receipts settings
-dialog
-
-d) notification-of-rr-request.jpg : The question dialog which appears
-if you have configured outlook to ask you before sending read
-receipts.
-
-3) receipt.jpg: The receipt itself, as found in my inbox.
-
-
-1) The Read Receipt Settings Dialog:
-
-a) Location: Should be added to the "Mail Preferences" section of the
-global settings dialog, in its own tab, entitled "Receipts".
-
-b) Help: Needs to be accompanied by a detailed help entry which
-explains what a read receipt is. I couldn't fit much of an explanation
-into the interface (not that the interface is a good place for this
-explanation, anyway.)
-
-c) Insensitive widgets: Unless the "Always send back a read receipt"
-option is selected, the checkbox beneath it ("Unless the message is
-sent to a mailing list, etc") should be insensitive.
-
-d) Known problems: The text as shown in my mockup could be improved. I
-would be more than happy to have Aaron (and anyone else who'd like to
-help) assist me in making the text more clear.
-
-
-2) Read Receipt Messages:
-
-a) Appearance: Read Receipt messages should appear in your inbox with
-the subject line: "Read:" (or "Message Read:"); "Read:" is what
-Outlook does, I think expanding it to "Message Read:" is a bit more
-clear.
-
-b) The text of this message should tell you: i) what time you sent the
-mail, ii) what the subject of your email was iii) what the email
-address of your recipient is iv) what time your message was read by
-its recipient
-
-c) When as user has selected to be asked before sending a read
-receipt, he should be presented with a question dialog (including
-"Yes, Send" and "No, Don't Send" buttons.) The dialog should inform
-the user that a read reciept has been requested by the sender of the
-mail in question, and ask if s/he want to send such a receipt.
-
-
-3) Secure Receipts: Outlook includes support for "secure receipts",
-and I am unsure of whether or not this is something we can support. My
-hunch is that secure receipts are S/MIME related, and hence not
-applicable to Evo at present.
-
-The secure receipt settings, in Outlook,are launched by pressing the
-"Secure Receipts..." button in the RR setting dialog. The
-secure_options.jpg screenshot shows these options.
-
-Jeff? Michael? Dan? Anyone have an idea of what this secure receipt
-stuff is, and if we need to include it in our implementation?
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 1c76a6c05e..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/evolution-$(BASE_VERSION)
-
-
-
-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 e69de29bb2..0000000000
--- a/doc/ChangeLog
+++ /dev/null
diff --git a/doc/ChangeLog.pre-1-4 b/doc/ChangeLog.pre-1-4
deleted file mode 100644
index e7dd37db31..0000000000
--- a/doc/ChangeLog.pre-1-4
+++ /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 b940e42eb7..0000000000
--- a/doc/Makefile.am
+++ /dev/null
@@ -1,3 +0,0 @@
-SUBDIRS = devel
-
-EXTRA_DIST = ChangeLog.pre-1-4
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 a2080cb953..0000000000
--- a/doc/devel/ChangeLog
+++ /dev/null
@@ -1,6 +0,0 @@
-2003-09-11 Dan Winship <danw@ximian.com>
-
- * calendar/cal-client/Makefile.am (GTKDOC_LIBS): Use non-static
- libraries.
-
- * calendar/cal-util/Makefile.am (GTKDOC_LIBS): Likewise
diff --git a/doc/devel/ChangeLog.pre-1-4 b/doc/devel/ChangeLog.pre-1-4
deleted file mode 100644
index 4d90e1e515..0000000000
--- a/doc/devel/ChangeLog.pre-1-4
+++ /dev/null
@@ -1,286 +0,0 @@
-2003-01-22 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am (HTML_DIR): Version using $(BASE_VERSION).
-
-2002-07-17 Peter Williams <peterw@ximian.com>
-
- * calendar/cal-util/Makefile.am (GTKDOC_LIBS): Because we're
- using libtool as our LD, we can reference .la's and libtool
- will DTRT for us.
-
- * calendar/cal-client/Makefile.am (GTKDOC_LIBS): Same here.
-
-2002-03-19 Dan Winship <danw@ximian.com>
-
- * calendar/cal-util/Makefile.am (GTKDOC_LIBS): Update for
- libversit change.
-
- * calendar/cal-client/Makefile.am (GTKDOC_LIBS): Likewise
-
-2002-01-24 Ettore Perazzoli <ettore@ximian.com>
-
- * calendar/cal-client/Makefile.am: Use EVOLUTION_CALENDAR_CFLAGS
- and EVOLUTION_CALENDAR_LIBS.
- * calendar/cal-util/Makefile.am: Likewise.
-
-2001-12-18 JP Rosevear <jpr@ximian.com>
-
- * calendar/cal-client/Makefile.am: cal-client needs bonobo-conf
- now
-
-2001-10-29 Federico Mena Quintero <federico@ximian.com>
-
- * calendar/alarm-generation.sgml: Updated docs for repeating
- alarms.
-
-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 7940af73f5..0000000000
--- a/doc/devel/Makefile.am
+++ /dev/null
@@ -1,179 +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/evolution-$(BASE_VERSION)
-
-###########################################################################
-# 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) \
- ChangeLog.pre-1-4
-
-# $(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 46f7e4bff1..0000000000
--- a/doc/devel/calendar/alarm-generation.sgml
+++ /dev/null
@@ -1,155 +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>
-
- <para>
- In addition, alarms may specify a number of repetitions and a
- duration time. For example, an alarm may be configured to
- repeat 3 extra times after the original occurrence with 5
- minutes between each repetition. Again, for absolute triggers
- this does not present a problem, as we can just generate the
- repetitions starting from the absolute trigger time. For
- relative triggers, we expand the range as described above and
- also add the total offset for the repetitions to the start of
- the range, i.e. 15 extra minutes for the case of 3 repetitions
- with 5 minutes between each. We do not need to modify the end
- of the range because alarm repetitions always have positive
- offsets, so they are equivalent to relative alarm triggers
- with positive offsets.
- </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 79be6b0149..0000000000
--- a/doc/devel/calendar/cal-client/.cvsignore
+++ /dev/null
@@ -1,13 +0,0 @@
-sgml
-Makefile
-Makefile.in
-*-decl.txt
-*-decl-list.txt
-*-unused.txt
-*-undocumented.txt
-*-symbols.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 a441e6cbd0..0000000000
--- a/doc/devel/calendar/cal-client/Makefile.am
+++ /dev/null
@@ -1,196 +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 \
- $(EVOLUTION_CALENDAR_CFLAGS)
-
-GTKDOC_LIBS= \
- $(EVOLUTION_CALENDAR_LIBS) \
- $(top_builddir)/e-util/libeutil.la \
- $(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)/libversit/libversit.a \
- $(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 68bfef1c1a..0000000000
--- a/doc/devel/calendar/cal-client/evolution-cal-client-decl.txt
+++ /dev/null
@@ -1,526 +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_PERMISSION_DENIED,
- CAL_CLIENT_OPEN_METHOD_NOT_SUPPORTED
-} CalClientOpenStatus;
-</ENUM>
-<ENUM>
-<NAME>CalClientSetModeStatus</NAME>
-typedef enum {
- CAL_CLIENT_SET_MODE_SUCCESS,
- CAL_CLIENT_SET_MODE_ERROR,
- CAL_CLIENT_SET_MODE_NOT_SUPPORTED
-} CalClientSetModeStatus;
-</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>CalClientResult</NAME>
-typedef enum {
- CAL_CLIENT_RESULT_SUCCESS,
- CAL_CLIENT_RESULT_CORBA_ERROR,
- CAL_CLIENT_RESULT_INVALID_OBJECT,
- CAL_CLIENT_RESULT_NOT_FOUND,
- CAL_CLIENT_RESULT_PERMISSION_DENIED
-} CalClientResult;
-</ENUM>
-<ENUM>
-<NAME>CalClientSendResult</NAME>
-typedef enum {
- CAL_CLIENT_SEND_SUCCESS,
- CAL_CLIENT_SEND_CORBA_ERROR,
- CAL_CLIENT_SEND_INVALID_OBJECT,
- CAL_CLIENT_SEND_BUSY,
- CAL_CLIENT_SEND_PERMISSION_DENIED
-} CalClientSendResult;
-</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_set_default_timezone</NAME>
-<RETURNS>gboolean </RETURNS>
-CalClient *client, icaltimezone *zone
-</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_open_default_calendar</NAME>
-<RETURNS>gboolean </RETURNS>
-CalClient *client, gboolean only_if_exists
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_open_default_tasks</NAME>
-<RETURNS>gboolean </RETURNS>
-CalClient *client, gboolean only_if_exists
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_uri_list</NAME>
-<RETURNS>GList *</RETURNS>
-CalClient *client, CalMode mode
-</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_is_read_only</NAME>
-<RETURNS>gboolean </RETURNS>
-CalClient *client
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_get_email_address</NAME>
-<RETURNS>const char *</RETURNS>
-CalClient *client
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_set_mode</NAME>
-<RETURNS>gboolean </RETURNS>
-CalClient *client, CalMode mode
-</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>GList *</RETURNS>
-CalClient *client, GList *users,time_t start, time_t end
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_generate_instances</NAME>
-<RETURNS>void </RETURNS>
-CalClient *client, CalObjType type,time_t start, time_t end,CalRecurInstanceFn cb, gpointer cb_data
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_get_alarms_in_range</NAME>
-<RETURNS>GSList *</RETURNS>
-CalClient *client, time_t start, time_t end
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_free_alarms</NAME>
-<RETURNS>void </RETURNS>
-GSList *comp_alarms
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_get_alarms_for_object</NAME>
-<RETURNS>gboolean </RETURNS>
-CalClient *client, const char *uid,time_t start, time_t end,CalComponentAlarms **alarms
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_update_object</NAME>
-<RETURNS>CalClientResult </RETURNS>
-CalClient *client, CalComponent *comp
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_update_objects</NAME>
-<RETURNS>CalClientResult </RETURNS>
-CalClient *client, icalcomponent *icalcomp
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_remove_object</NAME>
-<RETURNS>CalClientResult </RETURNS>
-CalClient *client, const char *uid
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_send_object</NAME>
-<RETURNS>CalClientSendResult </RETURNS>
-CalClient *client, icalcomponent *icalcomp,icalcomponent **new_icalcomp, GList **users,char error_msg[256]
-</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>
-<FUNCTION>
-<NAME>cal_client_get_component_as_string</NAME>
-<RETURNS>char *</RETURNS>
-CalClient *client,CalComponent *comp
-</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_CalObjUIDSeq *uids,
- 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>
-<MACRO>
-<NAME>CAL_CLIENT_MULTI_TYPE</NAME>
-#define CAL_CLIENT_MULTI_TYPE (cal_client_multi_get_type ())
-</MACRO>
-<MACRO>
-<NAME>CAL_CLIENT_MULTI</NAME>
-#define CAL_CLIENT_MULTI(obj) (GTK_CHECK_CAST ((obj), CAL_CLIENT_MULTI_TYPE, CalClientMulti))
-</MACRO>
-<MACRO>
-<NAME>CAL_CLIENT_MULTI_CLASS</NAME>
-#define CAL_CLIENT_MULTI_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), CAL_CLIENT_MULTI_TYPE, CalClientMultiClass))
-</MACRO>
-<MACRO>
-<NAME>IS_CAL_CLIENT_MULTI</NAME>
-#define IS_CAL_CLIENT_MULTI(obj) (GTK_CHECK_TYPE ((obj), CAL_CLIENT_MULTI_TYPE))
-</MACRO>
-<MACRO>
-<NAME>IS_CAL_CLIENT_MULTI_CLASS</NAME>
-#define IS_CAL_CLIENT_MULTI_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), CAL_CLIENT_MULTI_TYPE))
-</MACRO>
-<STRUCT>
-<NAME>CalClientMulti</NAME>
-</STRUCT>
-<STRUCT>
-<NAME>CalClientMultiClass</NAME>
-</STRUCT>
-<STRUCT>
-<NAME>CalClientMultiPrivate</NAME>
-</STRUCT>
-<STRUCT>
-<NAME>CalClientMulti</NAME>
-struct CalClientMulti {
- GtkObject object;
-
- /* Private data */
- CalClientMultiPrivate *priv;
-};
-</STRUCT>
-<FUNCTION>
-<NAME>cal_client_multi_get_type</NAME>
-<RETURNS>GtkType </RETURNS>
-void
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_multi_new</NAME>
-<RETURNS>CalClientMulti *</RETURNS>
-void
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_multi_add_client</NAME>
-<RETURNS>void </RETURNS>
-CalClientMulti *multi, CalClient *client
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_multi_set_auth_func</NAME>
-<RETURNS>void </RETURNS>
-CalClientMulti *multi,CalClientAuthFunc func,gpointer user_data
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_multi_open_calendar</NAME>
-<RETURNS>CalClient *</RETURNS>
-CalClientMulti *multi,const char *str_uri,gboolean only_if_exists
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_multi_get_client_for_uri</NAME>
-<RETURNS>CalClient *</RETURNS>
-CalClientMulti *multi,const char *uri
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_multi_get_n_objects</NAME>
-<RETURNS>int </RETURNS>
-CalClientMulti *multi, CalObjType type
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_multi_get_object</NAME>
-<RETURNS>CalClientGetStatus </RETURNS>
-CalClientMulti *multi,const char *uid,CalComponent **comp
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_multi_get_timezone</NAME>
-<RETURNS>CalClientGetStatus </RETURNS>
-CalClientMulti *multi,const char *tzid,icaltimezone **zone
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_multi_get_uids</NAME>
-<RETURNS>GList *</RETURNS>
-CalClientMulti *multi, CalObjType type
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_multi_get_changes</NAME>
-<RETURNS>GList *</RETURNS>
-CalClientMulti *multi,CalObjType type,const char *change_id
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_multi_get_objects_in_range</NAME>
-<RETURNS>GList *</RETURNS>
-CalClientMulti *multi,CalObjType type,time_t start,time_t end
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_multi_get_free_busy</NAME>
-<RETURNS>GList *</RETURNS>
-CalClientMulti *multi,GList *users,time_t start,time_t end
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_multi_generate_instances</NAME>
-<RETURNS>void </RETURNS>
-CalClientMulti *multi,CalObjType type,time_t start,time_t end,CalRecurInstanceFn cb,gpointer cb_data
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_multi_get_alarms_in_range</NAME>
-<RETURNS>GSList *</RETURNS>
-CalClientMulti *multi,time_t start, time_t end
-</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 b558b7979f..0000000000
--- a/doc/devel/calendar/cal-client/tmpl/cal-client.sgml
+++ /dev/null
@@ -1,354 +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_PERMISSION_DENIED:
-@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::cal-set-mode ##### -->
-<para>
-
-</para>
-
-@calclient: the object which received the signal.
-@arg1:
-@arg2:
-
-<!-- ##### 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::backend-error ##### -->
-<para>
-
-</para>
-
-@calclient: the object which received the signal.
-@arg1:
-
-<!-- ##### 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:
-
-<!-- ##### SIGNAL CalClient::backend-died ##### -->
-<para>
-
-</para>
-
-@calclient: the object which received the signal.
-
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 724c33a4c6..0000000000
--- a/doc/devel/calendar/cal-util/.cvsignore
+++ /dev/null
@@ -1,13 +0,0 @@
-sgml
-Makefile
-Makefile.in
-*-decl.txt
-*-decl-list.txt
-*-unused.txt
-*-undocumented.txt
-*-symbols.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 5367c4a605..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 \
- $(EVOLUTION_CALENDAR_CFLAGS)
-
-GTKDOC_LIBS = \
- $(EVOLUTION_CALENDAR_LIBS) \
- $(top_builddir)/calendar/cal-util/libcal-util.la \
- $(top_builddir)/libical/src/libical/libical.la \
- $(top_builddir)/libversit/libversit.a
-
-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
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 af91e3f9cb..0000000000
--- a/doc/devel/calendar/cal-util/evolution-cal-util-decl.txt
+++ /dev/null
@@ -1,1039 +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 */
-#if 0
- CAL_COMPONENT_FIELD_LOCATION,
-#endif
- 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_rescan</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_strip_errors</NAME>
-<RETURNS>void </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_abort_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_has_organizer</NAME>
-<RETURNS>gboolean </RETURNS>
-CalComponent *comp
-</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_has_simple_recurrence</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_has_attendees</NAME>
-<RETURNS>gboolean </RETURNS>
-CalComponent *comp
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_get_location</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, const char **location
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_set_location</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, const char *location
-</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_remove_all_alarms</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp
-</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>
-<FUNCTION>
-<NAME>cal_component_alarm_get_icalcomponent</NAME>
-<RETURNS>icalcomponent *</RETURNS>
-CalComponentAlarm *alarm
-</FUNCTION>
-<USER_FUNCTION>
-<NAME>CalRecurInstanceFn</NAME>
-<RETURNS>gboolean </RETURNS>
-CalComponent *comp,
- time_t instance_start,
- time_t instance_end,
- gpointer data
-</USER_FUNCTION>
-<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,icaltimezone *default_timezone
-</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>
-<ENUM>
-<NAME>CalMode</NAME>
-typedef enum {
- CAL_MODE_INVALID = -1,
- CAL_MODE_LOCAL = 1 << 0,
- CAL_MODE_REMOTE = 1 << 1,
- CAL_MODE_ANY = 0x07
-} CalMode;
-</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,icaltimezone *default_timezone
-</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,icaltimezone *default_timezone
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_util_resolve_tzid</NAME>
-<RETURNS>icaltimezone *</RETURNS>
-const char *tzid, gpointer data
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_util_priority_to_string</NAME>
-<RETURNS>char *</RETURNS>
-int priority
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_util_priority_from_string</NAME>
-<RETURNS>int </RETURNS>
-const char *string
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_util_expand_uri</NAME>
-<RETURNS>char *</RETURNS>
-char *uri, gboolean tasks
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_util_add_timezones_from_component</NAME>
-<RETURNS>void </RETURNS>
-icalcomponent *vcal_comp,CalComponent *comp
-</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_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 8a8cfa8907..0000000000
--- a/doc/devel/calendar/cal-util/tmpl/cal-component.sgml
+++ /dev/null
@@ -1,992 +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:
-
-<!-- ##### 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 214b24cbf7..0000000000
--- a/doc/devel/calendar/cal-util/tmpl/cal-recur.sgml
+++ /dev/null
@@ -1,45 +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:
-@default_timezone:
-
-
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 757b46b170..0000000000
--- a/doc/devel/calendar/cal-util/tmpl/evolution-cal-util-unused.sgml
+++ /dev/null
@@ -1,322 +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_month ##### -->
-<para>
-
-</para>
-
-@time:
-@months:
-@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_begin ##### -->
-<para>
-
-</para>
-
-@t:
-@Returns:
-
-<!-- ##### FUNCTION time_month_end ##### -->
-<para>
-
-</para>
-
-@t:
-@Returns:
-
-<!-- ##### FUNCTION time_week_begin ##### -->
-<para>
-
-</para>
-
-@t:
-@week_start_day:
-@Returns:
-
-<!-- ##### FUNCTION time_week_end ##### -->
-<para>
-
-</para>
-
-@t:
-@week_start_day:
-@Returns:
-
-<!-- ##### FUNCTION time_year_begin ##### -->
-<para>
-
-</para>
-
-@t:
-@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 e118c438eb..0000000000
--- a/doc/devel/calendar/cal-util/tmpl/timeutil.sgml
+++ /dev/null
@@ -1,73 +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_days_in_month ##### -->
-<para>
-
-</para>
-
-@year:
-@month:
-@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 cfb049f0e3..0000000000
--- a/e-util/.cvsignore
+++ /dev/null
@@ -1,9 +0,0 @@
-.deps
-Makefile
-Makefile.in
-.libs
-*.lo
-*.la
-e-util-marshal.c
-e-util-marshal.h
-test-source-list \ No newline at end of file
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
deleted file mode 100644
index 067996d97c..0000000000
--- a/e-util/ChangeLog
+++ /dev/null
@@ -1,340 +0,0 @@
-2003-12-06 JP Rosevear <jpr@ximian.com>
-
- * Makefile.am: Remove hard coded disable deprecated flags
-
-2003-11-23 JP Rosevear <jpr@ximian.com>
-
- * Makefile.am (INCLUDES): remove gtk deprecated flag
-
-2003-11-18 JP Rosevear <jpr@ximian.com>
-
- * Makefile.am: remove db3 library, if you really want it, get it
- from e-d-s
-
-2003-11-14 JP Rosevear <jpr@ximian.com>
-
- * Makefile.am: don't build the e-source stuff anymore, its in
- e-d-s now
-
-2003-11-14 JP Rosevear <jpr@ximian.com>
-
- * test-source-list.c (on_idle_do_stuff): we only need the uid to
- remove and peek at stuff
-
- * e-source-list.h: update proto types
-
- * e-source-list.c (e_source_list_peek_source_by_uid): allow peek
- by uid only
- (e_source_list_remove_source_by_uid): allow removal by uid only
-
-2003-11-07 Dan Winship <danw@ximian.com>
-
- * ename/*: Removed. No longer used by evolution except via
- evolution-data-server.
-
- * Makefile.am (SUBDIRS): Remove ename
-
-2003-11-07 JP Rosevear <jpr@ximian.com>
-
- * Makefile.am: remove build sources from dist
-
-2003-11-07 JP Rosevear <jpr@ximian.com>
-
- * Makefile.am: make sure the marshal header and source are in the
- source list
-
-2003-10-31 Hans Petter Jansson <hpj@ximian.com>
-
- * e-source.c (e_source_get_uri): Don't compress trailing slashes in
- URI elements.
-
-2003-10-31 Not Zed <NotZed@Ximian.com>
-
- * e-account.c (e_account_(sg)et_from_xml): add encrypt_key id, and
- change some of the names around to be more meaningful.
-
-2003-10-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-host-utils.c (e_gethostbyname_r): If the system defines
- AI_ADDRCONFIG, set this flag on the hints.ai_flags member as well
- so that we don't resolve a host to an IPv6 addr when the node
- doesn't have any IPv6 source addresses.
-
-2003-10-24 Dan Winship <danw@ximian.com>
-
- * Makefile.am (libedb3util_la_LIBADD): add $(DB3_LDADD)
-
-2003-10-22 Dan Winship <danw@ximian.com>
-
- * e-bonobo-factory-util.[ch]: Gone; unused since 1.2
-
- * e-proxy.[ch]: Gone; nothing in evo uses soup any more.
-
- * Makefile.am (eutilinclude_HEADERS, libeutil_la_SOURCES): Remove
- e-proxy.[ch]
-
-2003-10-20 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am (pilot_compile) [! ENABLE_PILOT_CONDUITS]: Add
- md5-utils.c so it compiles even if you have no Pilot support.
-
-2003-10-16 Rodrigo Moya <rodrigo@ximian.com>
-
- * e-source-list.c (e_source_list_sync): use gconf_client_notify_remove
- instead of g_source_remove for GConf notification IDs.
- (impl_finalize): remove the GConf notification also here.
-
-2003-10-13 Rodrigo Moya <rodrigo@ximian.com>
-
- * e-source-group.[ch] (e_source_group_peek_source_by_name): added
- new function.
-
-2003-10-10 Not Zed <NotZed@Ximian.com>
-
- * e-account-list.c (e_account_list_find): add FIND_UID find type.
-
-2003-09-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-host-utils.c (e_gethostbyaddr_r): IPv6 implementation
- rewritten to use getnameinfo() which is the proper function to use
- in this case. Fixes bug #46006 the Right Way (tm).
-
-2003-09-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-host-utils.c (e_gethostbyaddr_r): Make sure that
- res->ai_canonname is non-NULL and that it doesn't match the
- numeric host address that we were trying to resolve. Fixes the
- second half of bug #46006.
-
-2003-09-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-host-utils.c (e_gethostbyaddr_r): Work around a bug in glibc
- 2.3.2's gethostbyaddr_r() implementation.
-
-2003-09-15 Larry Ewing <lewing@ximian.com>
-
- * e-source.c (e_source_dump_to_xml_node): make sure declarations
- precede the body.
-
-2003-09-11 Dan Winship <danw@ximian.com>
-
- * Makefile.am (noinst_LTLIBRARIES): Remove libeutil-static.la and
- libeconduit-static.la
-
- * ename/Makefile.am (noinst_LTLIBRARIES): Remove
- libename-static.la
-
-2003-08-28 Hans Petter Jansson <hpj@ximian.com>
-
- * eggtrayicon.[ch]: Added for tray icon support. To be removed when
- libgnomeui sports this functionality.
-
- * Makefile.am: Include eggtrayicon.
-
-2003-08-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-mktemp.c (e_mktemp_cleanup): We need to unlink the full paths
- in the tmpdirs, not just the base path.
-
-2003-08-20 Suresh Chandrasekharan <suresh.chandrasekharan@sun.com>
-
- * e-time-utils.c (parse_with_strptime): Fixes #43558 Appointment
- Editor always gives time validation error for apptmnts in non
- UTF-8/non ASCII locales.
-
-2003-08-17 Ettore Perazzoli <ettore@ximian.com>
-
- * test-source-list.c: No short letter for --key.
-
-2003-08-15 Ettore Perazzoli <ettore@ximian.com>
-
- * e-uid.c: #include <glib/gstrfuncs.h>
-
- * test-source-list.c: Add options to display, set and unset the
- color as well.
-
- * e-source.c: New members has_color, color in struct
- ESourcePrivate.
- (e_source_update_from_xml_node): Parse a color property from the
- XML node. Protect from NULL name and relative_uri members as
- well.
- (e_source_dump_to_xml_node): Set a color property on the XML node.
- (e_source_get_color): New.
- (e_source_set_color): New.
- (e_source_unset_color): New.
- (e_source_new_from_xml_node): Use e_source_update_from_xml_node()
- instead of getting the data from the XML yourself.
-
-2003-08-14 Ettore Perazzoli <ettore@ximian.com>
-
- Add UIDs to ESource* items so we can distinguish renames from
- removals/additions.
-
- * test-source-list.c: Made --source and --group get UIDs instead
- of names.
- (on_idle_do_stuff): Updated behavior accordingly.
- (dump_list): Print "(No items)" if there are no groups.
- (dump_group): Print the UID of the group.
- (dump_source): Print the UID of the source.
-
- * e-source-list.c (load_from_gconf): Match with group UIDs instead
- of group names.
- (e_source_list_peek_source_by_uid): New.
- (e_source_list_peek_source_by_name): Removed.
- (e_source_list_peek_group_by_uid): New.
- (e_source_list_peek_group_by_name): Removed.
- (e_source_list_remove_group_by_uid): New.
- (e_source_list_remove_group_by_name): Removed.
- (e_source_list_remove_source_by_uid): New.
- (e_source_list_remove_source_by_name): Removed.
-
- * e-source-group.c: New member uid in struct ESourceGroupPrivate.
- (impl_finalize): Free it.
- (e_source_group_new): Set the uid member using e_uid_new().
- (e_source_group_peek_source_by_uid): New.
- (e_source_group_peek_source_by_name): Removed.
- (e_source_group_add_source): Check that the UID is unique, instead
- of the name.
- (e_source_group_remove_source_by_uid): New.
- (e_source_group_remove_source_by_name): Removed.
- (e_source_group_update_from_xmldoc): Use the UID to figure out
- which source has changed, instead of the name.
- (e_source_group_uid_from_xmldoc): New.
- (e_source_group_name_from_xmldoc): Removed.
- (e_source_group_new_from_xmldoc): Set the UID in the new group
- from the XML.
- (e_source_group_to_xml): Set a UID property in the XML.
-
- * e-source.c: New member uid in struct ESourcePrivate.
- (e_source_new): Initialize using e_uid_new().
- (impl_finalize): Free.
- (e_source_peek_uid): New.
- (e_source_new_from_xml_node): Set the UID from the XML node.
- (e_source_name_from_xml_node): Removed.
- (e_source_uid_from_xml_node): New.
- (e_source_dump_to_xml_node): Set the "uid" property on the XML
- node.
-
- * e-account.c (e_account_gen_uid): Removed.
- (e_account_new): Use e_uid_new() instead of e_account_gen_uid().
-
- * e-uid.c (e_uid_new): New file, new function.
-
-2003-08-13 Ettore Perazzoli <ettore@ximian.com>
-
- Fix up the semantics of "changed" signals on GConf changes.
-
- * e-source-group.c (e_source_group_update_from_xmldoc): Added new
- member ignore_source_changed in struct _ESourceGroupPrivate.
- (e_source_group_update_from_xmldoc): Increment
- ignore_source_changed before calling
- e_source_update_from_xml_node(), decrement afterwards.
- (source_changed_callback): Only emit "changed" if
- ignore_source_changed is zero.
- (e_source_group_update_from_xmldoc): Properly emit the "changed"
- signal when the base_uri or the name change.
-
- * e-source-list.c: Changed type of sync_idle_id from gboolean (!)
- to int and added new member ignore_group_changed in struct
- _ESourceListPrivate.
- (load_from_gconf): Increment ignore_group_changed before calling
- e_source_group_update_from_xmldoc() and decrement it afterwards.
- (group_changed_callback): Only emit the signal if
- ignore_group_changed is zero.
-
- * e-source.c (e_source_update_from_xml_node): Removed arg
- emit_signals. Always emit signals.
-
- * e-source-group.c (e_source_group_update_from_xmldoc): Removed
- arg emit_signals. Always emit signals.
- (e_source_group_update_from_xml): Likewise.
-
-2003-08-11 Ettore Perazzoli <ettore@ximian.com>
-
- * e-source.c (e_source_set_group): Weak_unref the current group if
- not NULL and properly handle the case where a NULL group is being
- passed in.
-
-2003-08-11 Ettore Perazzoli <ettore@ximian.com>
-
- * e-source-group.c: New file.
- * e-source-group.h: New file.
- * e-source-list.h: New file.
- * e-source-list.c: New file.
- * e-source.c: New file.
- * e-source.h: New file.
- * test-source-list.c: New file to test the above.
-
-2003-08-11 Not Zed <NotZed@Ximian.com>
-
- * e-msgport.c (e_thread_put): check pthread_create return code
- properly.
- (e_mutex_lock): check pthread* return codes properly.
- (e_mutex_unlock): Same here.
- (e_mutex_cond_wait): and here.
-
-2003-08-05 Dan Winship <danw@ximian.com>
-
- * e-html-utils.c (special_chars): add a flag for non-url chars
- (controls, whitespace, ", and |)
- (url_extract): Use that. When urlifying just a hostname, make sure
- it really is a hostname, and not just something like "www.c".
- (e_text_to_html_full): Deal with url_extract returning NULL in the
- "www." case
- (main): add a regression test, #ifdef E_HTML_UTILS_TEST
-
-2003-07-24 Rodrigo Moya <rodrigo@ximian.com>
-
- * e-config-listener.c (add_key): just preload one level of GConf keys,
- since preloading all makes the calendar startup slow.
-
-2003-07-23 Dan Winship <danw@ximian.com>
-
- * Makefile.am: Use EVO_MARSHAL_RULE
-
- * e-component-listener.c (connection_listen_cb): Fix a non-ANSI
- switch label.
-
- * e-gui-utils.c: only include "art/empty.xpm" if
- HAVE_LIBGNOMEUI_GNOME_ICON_LOOKUP_H isn't defined
-
- * e-xml-hash-utils.c (e_xml_to_hash): Deconstify a non-const
- variable to fix a warning.
-
-2003-07-03 JP Rosevear <jpr@ximian.com>
-
- * e-xml-hash-utils.c (foreach_save_func): encode the text
- (e_xml_from_hash): pass xmlDoc to foreach method
- (e_xmlhash_new): check for file existence
- (e_xmlhash_destroy): only destroy the hash if it exists
-
-2003-07-01 Dan Winship <danw@ximian.com>
-
- * e-gui-utils.c (e_icon_for_mime_type): New function to return an
- icon for a MIME type, using GnomeIconTheme if available or
- gnome-vfs and gnome-mime-data if not.
-
-2003-06-19 Dan Winship <danw@ximian.com>
-
- * e-xml-hash-utils.c (e_xml_to_hash): don't leak an extra copy of
- the values
-
-2003-06-14 Larry Ewing <lewing@ximian.com>
-
- * e-name-western.c (e_name_western_get_suffix_at_str_end): free
- word before breaking out of the loop.
-
-2003-06-12 Rodrigo Moya <rodrigo@ximian.com>
-
- * e-config-listener.c (add_key): use GCONF_CLIENT_PRELOAD_RECURSIVE
- when adding watched directories to avoid GConfd round-trips.
-
-2003-06-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-trie.c (e_trie_free): Free the fail_states array.
-
-2003-05-30 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-meta.c (meta_load): Stat the file to make sure it exists
- before trying to parse it using xmlParseFile().
-
diff --git a/e-util/ChangeLog.pre-1-4 b/e-util/ChangeLog.pre-1-4
deleted file mode 100644
index 3cbac0eade..0000000000
--- a/e-util/ChangeLog.pre-1-4
+++ /dev/null
@@ -1,2649 +0,0 @@
-2003-05-29 JP Rosevear <jpr@ximian.com>
-
- Fixes #43775
-
- * e-time-utils.c (locale_supports_12_hour_format): use e_utf8_strftime
- (e_time_format_date_and_time): ditto
- (e_time_format_time): ditto
-
-2003-05-16 Dan Winship <danw@ximian.com>
-
- * e-proxy.c (e_proxy_init): Removing trailing / in key name passed
- to gconf_client_notify_add to kill a warning. (Part of #43159)
-
-2003-05-16 Jeremy Katz <katzj@redhat.com>
-
- * e-sexp.c (term_eval_and): Use glib macros for pointer/int
- conversion.
-
-2003-05-07 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes crash in #42212
-
- * e-url.c (e_uri_new): check for 'uri_string' being NULL.
-
-2003-05-02 Not Zed <NotZed@Ximian.com>
-
- * e-request.c (e_request_string): remove the assert, if we dont
- understand the response, assume it's a cancel.
- GTK_RESPONSE_DELETE_EVENT wasn't handled [#42038].
-
-2003-04-30 Ettore Perazzoli <ettore@ximian.com>
-
- * e-request.c (e_request_string): Handle GTK_RESPONSE_NONE.
- [#42038]
-
-2003-04-24 Chris Toshok <toshok@ximian.com>
-
- [ for bug #41211 ]
-
- * e-gui-utils.h (e_button_new_with_stock_icon): add prototype.
-
- * e-gui-utils.c (e_button_new_with_stock_icon): new function,
- allow us to create a custom labeled button with a stock icon.
-
-2003-04-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-host-utils.c: Added #include <netinet/in.h> for the
- sockaddr_in6 typedef for at least MacOS X.
-
-2003-04-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-host-utils.c (e_gethostbyname_r): Keep our buf ptr aligned to
- sizeof (char *). Should fix bug #41362.
- (e_gethostbyaddr_r): Same.
-
-2003-04-18 Anna Marie Dirks <anna@ximian.com>
-
- * e-request.c (e_request_string): Added appropriate spacing/padding
- to the rename dialogs. Fixes bugs #41040, #41036, #41038
-
-2003-04-18 Ettore Perazzoli <ettore@ximian.com>
-
- * e-gtk-utils.c (e_gtk_button_new_with_icon): Remove debugging
- message.
-
-2003-04-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-sexp.c: Finished an #if 0'd out port to GObject from an #if
- 0'd out GtkObject subclassing.
-
-2003-04-15 Hans Petter Jansson <hpj@ximian.com>
-
- * e-sexp.c (e_sexp_add_function)
- (e_sexp_add_ifunction): Make sure any old symbol with the same name
- as the one being added, is removed first.
-
-2003-04-14 Not Zed <NotZed@Ximian.com>
-
- * e-gtk-utils.c (e_gtk_button_new_with_icon): Utility function to
- create a button with a stock icon.
-
-2003-04-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-host-utils.c (e_gethostbyaddr_r): Change the 'len' argument to
- 'addrlen' so that when IPv6 is enabled, our temp vriable (also
- named len) does not cause confusion. Fixes bug #40979.
-
-2003-04-05 Ettore Perazzoli <ettore@ximian.com>
-
- * e-passwords.c (e_passwords_remember_password): Removed debugging
- message that would spit out the actual password, albeit in encoded
- form.
-
-2003-04-04 Dan Winship <danw@ximian.com>
-
- * e-account-list.c (gconf_accounts_changed): Don't start emitting
- ACCOUNT_ADDED signals until we've added all of the new accounts to
- our list. Otherwise if the signal handler calls
- e_account_list_get_default_account() it will end up causing the
- first account in the list to become the default. #40675
-
-2003-04-04 Chris Toshok <toshok@ximian.com>
-
- * ename/e-name-western.c (e_name_western_extract_middle): fix abr.
- (e_name_western_get_suffix_at_str_end): same.
-
-2003-04-02 Not Zed <NotZed@Ximian.com>
-
- * e-passwords.c (e_passwords_forget_passwords): Delete all
- Passwords-* sections. Should make this work.
-
-2003-03-31 Chris Toshok <toshok@ximian.com>
-
- * ename/test-ename-western.c (do_name): print "" if the value is
- NULL.
- (main): add a couple of utf8 test cases (that still use western
- orderings).
-
- * ename/e-name-western.c (e_name_western_str_count_words):
- utf8-ize this.
- (e_name_western_cleanup_string): same.
- (e_name_western_get_words_at_idx): same.
- (e_name_western_get_one_prefix_at_str): same.
- (e_name_western_get_prefix_at_str): same.
- (e_name_western_extract_first): same.
- (e_name_western_extract_middle): same.
- (e_name_western_extract_nickname): same.
- (e_name_western_extract_last): same.
- (e_name_western_get_preceding_word): same.
- (e_name_western_get_suffix_at_str_end): same.
- (e_name_western_detect_backwards): same.
- (e_name_western_reorder_asshole): same.
- (FINISH_CHECK_MIDDLE_NAME_FOR_CONJUNCTION): same.
- (e_name_western_fixup): same.
- (e_name_western_parse): validate the string and truncate it if
- need be.
-
-2003-03-27 JP Rosevear <jpr@ximian.com>
-
- * e-account-list.c (e_account_list_find): guard against NULL keys
-
-2003-03-25 Dan Winship <danw@ximian.com>
-
- * e-dialog-utils.c (e_notice): Move this here from gal. Use
- e_dialog_set_transient_for so it DTRT for out-of-proc components.
- (e_notice_with_xid): Like e_notice but with an X Window ID as the
- parent window
- (e_gnome_dialog_set_parent): Remove this, since it was marked
- deprecated and only used in one place.
- (e_file_dialog_save): Make this use GtkMessageDialog instead of
- GnomeDialog
- (e_dialog_set_transient_for_xid): #ifdef out gtk 2.2 api usage
-
-2003-03-25 Not Zed <NotZed@Ximian.com>
-
- * e-meta.c (meta_filename): fix a typo & some missing headers.
-
-2003-03-24 Dan Winship <danw@ximian.com>
-
- * e-dialog-utils.c (e_dialog_set_transient_for,
- e_dialog_set_transient_for_xid): Rename, rewrite, make them
- actually work.
-
-2003-03-25 Not Zed <NotZed@Ximian.com>
-
- * Makefile.am: Added e-meta.[ch] to libeutil
-
- * e-meta.[ch]: simple api to implement meta-data for keyed
- objects.
-
-2003-03-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-trie.c (e_trie_search): If the gunichar is 0xfffe, just skip
- processing it. Maybe this will fix bug #39900.
- (trie_utf8_getc): Removed unused labels to shutup the compiler.
-
-2003-03-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-sexp.h: Fix ESExpClass to never be an empty struct. Also make
- ESExp optionally a subclass of GObject rather than GtkObject (not
- that we'll probably ever make it so, but for completeness sake?).
-
-2003-03-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-trie.c (trie_utf8_getc): Don't use __inline__ as it is not
- always defined.
-
-2003-03-13 Dan Winship <danw@ximian.com>
-
- * ename/e-address-western.c (e_address_western_parse): When
- declaring a line to be part of "extended" because we don't know
- what else to call it, keep the preceding "\n" so that the address
- still looks the same when we reassemble the pieces later. Fixes
- handling of non-US addresses
-
-2003-03-12 Dan Winship <danw@ximian.com>
-
- * e-xml-hash-utils.c (e_xml_to_hash): Update for a libxml2 change
- that was making this code g_warn a lot
-
-2003-03-06 Ettore Perazzoli <ettore@ximian.com>
-
- * e-request.c (e_request_string): Make the entry activate the
- default response in the dialog.
-
-2003-03-03 Rodney Dawes <dobey@ximian.com>
-
- * e-proxy.c: Use gnome2 proxy settings
-
-2003-03-02 Rodney Dawes <dobey@ximian.com>
-
- * e-pilot-util.c: s/gnome-xml/libxml/
-
-2003-02-27 JP Rosevear <jpr@ximian.com>
-
- * Makefile.am: include gnome-pilot cflags
-
-2003-02-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-account-list.c (gconf_accounts_changed): 'uid' should not be
- const.
-
-2003-02-20 Not Zed <NotZed@Ximian.com>
-
- * e-account-list.c (e_account_list_get_default): helper to get the
- dfault account.
- (e_account_list_set_default): helper to set the default account.
- (e_account_list_find): Helper to find accounts based on differnet
- key types.
- (e_account_list_add): helper to add account + emit added event.
- (e_account_list_change): helper to emit changed event.
- (e_account_list_remove): herlper to remove account + emit changed event.
-
-2003-02-22 Hans Petter Jansson <hpj@ximian.com>
-
- * e-categories-config.c (e_categories_config_open_dialog_for_entry):
- A result of 0 no longer indicates success; GTK_RESPONSE_OK does.
-
-2003-02-17 Chris Toshok <toshok@ximian.com>
-
- * e-account-list.c (gconf_accounts_changed): fix memleak - free
- uid.
-
-2003-02-11 Not Zed <NotZed@Ximian.com>
-
- * e-trie.c (trie_utf8_getc): Instead of simply ignoring bad chars,
- return the sentinal invalid char 0xfffe, so that we properly track
- the start of sequences.
-
-2003-02-10 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am (libeutil_static_la_DEPENDENCIES): Make
- libeutil-static.la depend on libeutil.la so that parallel
- compilations work; building them at the same time confuses
- libtool.
- (e-util-marshal.h, e-util-marshal.c): Use different tmp files so
- these rules can happen in parallel.
-
-2003-02-05 Dan Winship <danw@ximian.com>
-
- * Makefile.am (eutilincludedir, etc): define in terms of
- privincludedir.
-
- * ename/Makefile.am (libenameincludedir): Likewise
-
- * e-account.c: Fix warnings
- * e-account-list.c: Likewise
- * e-config-listener.c: Likewise
- * e-gui-utils.c: Likewise.
- * e-lang-utils.c: Likewise
- * e-msgport.c: Likewise
- * e-passwords.c: Likewise
-
- * e-categories-config.c
- (e_categories_config_open_dialog_for_entry): Use g_object_get/_set
- rather than gtk_
-
- * e-url.c (e_uri_new): Use g_ascii_strdown instead of deprecated
- g_strdown.
-
-2003-01-27 Ettore Perazzoli <ettore@ximian.com>
-
- * e-request.c (e_request_string): Port to GtkDialog. Strdup the
- text returned by GtkEntry after destroying the dialog, not before.
- Use gtk_editable_select_region() instead of
- gtk_entry_select_region(). Add a little bit of padding to make it
- look less crampy and set a default width.
-
- * e-dialog-utils.h (e_gnome_dialog_set_parent): Declare only if
- GNOME_DISABLE_DEPRECATED is not #defined.
- (e_gnome_warning_dialog_parented): Likewise.
- (e_gnome_ok_cancel_dialog_parented): Likewise.
-
-2003-01-26 Chris Toshok <toshok@ximian.com>
-
- * e-pilot-settings.c (e_pilot_settings_new): ref/sink the pilot
- settings to clear up that gtk warning.
-
-2003-01-25 Chris Toshok <toshok@ximian.com>
-
- * e-pilot-map.c (e_pilot_map_read): g_file_exists -> g_file_test.
- (e_pilot_map_write): don't use doc->root.
-
-2003-01-25 Chris Toshok <toshok@ximian.com>
-
- * e-pilot-settings.[ch]: GObjectify this.
-
-2003-01-24 Hans Petter Jansson <hpj@ximian.com>
-
- * e-categories-config.c (initialize_categories_config): Enable
- getting the categories master list from wombat.
- (e_categories_config_open_dialog_for_entry): It's now a GtkDialog.
-
-2003-01-22 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am (eutilincludedir): Version using $(BASE_VERSION).
- (econdincludedir): Likewise.
- (edb3includedir): Likewise.
- (imagesdir): Likewise.
-
- * ename/Makefile.am: Install libename in $(privlibdir) and
- $(includedir)/evolution-$(BASE_VERSION)/ename.
-
-2003-01-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-account-list.c: Changed signal names to use - instead of _
- like the rest of Gtk2.
-
- * e-account.c (e_account_import): New function that is basically
- the old account_copy().
-
-2003-01-17 Dan Winship <danw@ximian.com>
-
- * e-xml-hash-utils.c: New, sort of from evolution-recurid-branch.
-
-2003-01-16 Dan Winship <danw@ximian.com>
-
- * e-account.c: New class, based on MailConfigAccount, for
- describing an evolution (mail) account.
-
- * e-account-list.c: New class for tracking the list of configured
- accounts. (Also uses some code from mail-config.)
-
- * e-list.c (e_list_construct, e_list_remove): New
-
-2003-01-14 Ettore Perazzoli <ettore@ximian.com>
-
- * e-dialog-utils.c: Do not #include <e-bonobo-widget.h>.
- (e_set_dialog_parent): Remove the BonoboWidget handling stuff (it
- doesn't really work anyways).
-
-2003-01-14 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am (eutilinclude_HEADERS): Add e-dialog-utils.h.
-
-2003-01-09 Chris Toshok <toshok@ximian.com>
-
- * e-gui-utils.c (e_create_image_widget): change this to use
- GtkImage instead of GnomeCanvas.
-
-2003-01-08 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am: Images are now in $(datadir)/evolution/images
- instead of $(datadir)/images/evolution.
-
-2003-01-07 Dan Winship <danw@ximian.com>
-
- * e-config-listener.c (e_config_listener_remove_value): New.
-
- * e-passwords.c (e_passwords_get_password): Don't look at the
- passwords hash until calling e_passwords_init().
-
-2003-01-06 Dan Winship <danw@ximian.com>
-
- * e-html-utils.c: Add this back: Connector needs it, and there's
- no reason for addressbook and calendar to be using camel to get
- this functionality.
-
- * Makefile.am (libeutil_la_SOURCES): re-add e-html-utils
-
-2003-01-02 Jeffrey Stedfast <fejj@ximian.com>
-
- A bunch of fixes to make e-util build with -DG_DISABLE_DEPRECATED
- and -DGTK_DISABLE_DEPRECATED.
-
-2003-01-02 Ettore Perazzoli <ettore@ximian.com>
-
- * e-gtk-utils.c (e_signal_connect_full_while_alive): Get to
- compile.
- (e_signal_connect_while_alive): Like.
-
-2002-12-19 Ettore Perazzoli <ettore@ximian.com>
-
- * e-gtk-utils.c (e_signal_connect_while_alive): New.
- (e_signal_connect_full_while_alive): Renamed from
- e_gtk_signal_connect_full_while_alive().
-
-2002-12-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-html-utils.[c,h]: Removed. Back to the fiery depths of hell
- from whence ye came!
-
-2002-12-10 Rodrigo Moya <rodrigo@ximian.com>
-
- * e-config-listener.[ch] (e_config_listener_remove_dir): new
- function.
-
-2002-12-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-trie.c: New implementation of an Aho-Corasick trie.
-
-2002-12-09 Chris Toshok <toshok@ximian.com>
-
- * e-passwords.h: track changes to api (e_passwords_init is gone,
- and several functions take the component name as an arg.)
-
- * e-passwords.c (e_passwords_init): make this static, and allow
- multiple calls. Also, it no longer takes the component name.
- (e_passwords_shutdown): make this deal with the case where
- e_passwords_init wasn't called (no hashtable), and it no longer
- needs to free component_name.
- (e_passwords_forget_passwords): call e_passwords_init.
- (e_passwords_clear_component_passwords): take component_name as an
- arg, and call e_passwords_init.
- (password_path): take component_name as an arg.
- (e_passwords_remember_password): same, and call e_passwords_init.
- (e_passwords_forget_password): same.
- (e_passwords_get_password): same.
- (e_passwords_add_password): call e_passwords_init.
- (e_passwords_ask_password): take component_name as an arg.
-
-2002-12-07 Not Zed <NotZed@Ximian.com>
-
- * e-msgport.c (e_mutex_cond_wait): Allow an e-mutex to be used
- with standard condition variables.
-
-2002-12-06 Chris Toshok <toshok@ximian.com>
-
- * e-categories-master-list-wombat.c (ecmlw_load): change to a more
- gconf-like path (with underscores, etc.)
- (ecmlw_save): same.
-
-2002-11-26 Dan Winship <danw@ximian.com>
-
- * e-lang-utils.c (e_get_language_list): If the language is
- something like "fr_FR", return both "fr_FR" and "fr" in the list.
- Oaf doesn't consider "fr_FR" to match a "-fr" translation.
-
-2002-11-22 Not Zed <NotZed@Ximian.com>
-
- * e-msgport.c (EMsgPort): Added an optional nspr pipe field.
- (e_msgport_new): Init nspr pipe to null.
- (e_msgport_destroy): close prfiledesc's if they're open.
- (e_msgport_prfd): get the prfiledesc to wait asynchronously on.
- (e_msgport_put): Write notify to nspr pipe if it exists.
- (e_msgport_wait): poll nspr pipe fd if it is set, and the pipe fd
- isn't.
- (e_msgport_get): skim off a notify byte on the pr pipe if set.
- (): Include config.h, and nspr stuff if HAVE_NSS is set.
-
-2002-11-13 Ettore Perazzoli <ettore@ximian.com>
-
- * e-config-listener.c (e_config_listener_get_string_with_default):
- Make sure we don't use a string value from a GConfValue that got
- freed.
-
-2002-11-12 Chris Toshok <toshok@ximian.com>
-
- * Makefile.am
- (eutilinclude_HEADERS): add e-password.h
- (libeutil_la_SOURCES): add e-password.c
-
- * e-passwords.[ch]: port this to gnome2's gnome-config-private.
-
-2002-11-11 Ettore Perazzoli <ettore@ximian.com>
-
- * e-config-listener.c (add_key): g_strdup() the value in the case
- of a string value.
-
-2002-11-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * Makefile.am: Re-add e-proxy.c to the build.
-
-2002-11-08 Chris Toshok <toshok@ximian.com>
-
- * Makefile.am (eutilinclude_HEADERS): add e-categories-config.h
- and e-categories-master-list-wombat.h
- (libeutil_la_SOURCES): add e-categories-master-list-wombat.c
-
- * e-categories-master-list-wombat.[ch]: port work.
-
-2002-11-07 JP Rosevear <jpr@ximian.com>
-
- * e-categories-config.c (e_categories_config_get_icon_for): pass
- extra pixbuf param
-
- * e-categories-config.h: use G_*_DECLS
-
- * e-dialog-utils.c (save_ok): update g_file_test params
-
- * Makefile.am: Compile some additional files
-
-2002-11-06 Chris Toshok <toshok@ximian.com>
-
- * e-config-listener.c (e_config_listener_set_boolean): init err to
- NULL so if there isn't an error we aren't left with an unitialized
- GError. Fixes crash.
- (e_config_listener_set_float): same.
- (e_config_listener_set_long): same.
- (e_config_listener_set_string): same.
-
-2002-11-05 Rodrigo Moya <rodrigo@ximian.com>
-
- * e-component-listener.[ch]: ported to GObject.
-
- * Makefile.am: re-enabled e-component-listener.[ch]
-
-2002-11-03 Rodrigo Moya <rodrigo@ximian.com>
-
- * e-config-listener.[ch] (e_config_listener_get_boolean,
- e_config_listener_get_float, e_config_listener_get_long,
- e_config_listener_get_string): new simpler functions, without
- a default value.
-
-2002-11-03 Ettore Perazzoli <ettore@ximian.com>
-
- * e-config-listener.c (e_config_listener_get_float_with_default):
- Removed unused variable.
- (e_config_listener_get_long_with_default): Likewise.
- (e_config_listener_get_string_with_default): Likewise.
-
- * Makefile.am: Compile e-config-listener.[ch].
-
-2002-11-02 Chris Toshok <toshok@ximian.com>
-
- * Makefile.am: add marshal building stuff, add e-util-marshal.c to
- SOURCES, and add e-util-marshal.list to EXTRA_DIST.
-
- * e-util-marshal.list: add marshallers for e-util.
-
- * e-list.c: convert to GObject.
-
- * e-list.h: convert to GObject.
-
- * e-iterator.c: convert to GObject.
-
- * e-iterator.h: convert to GObject.
-
- * e-list-iterator.c: convert to GObject.
-
- * e-list-iterator.h: convert to GObject.
-
- * .cvsignore: ignore e-util-marshal.[ch]
-
-2002-11-02 Ettore Perazzoli <ettore@ximian.com>
-
- * ename/Makefile.am (INCLUDES): Removed -I$(includedir).
-
- * ename/test-ename-western-gtk.c: #include
- <libgnomeui/gnome-ui-init.h> instead of <libgnomeui/gnome-init.h>.
- (create_window): Added GTK_SIGNAL_FUNC() cast.
- (main): Use gnome_program_init().
-
- * e-db3-utils.c: Do not #include <libgnome/gnome-defs.h>.
-
- * e-request.c: Do not #include <libgnomeui/gnome-stock.h>.
-
- * e-memory.c (e_memchunk_clean): Replace GSearchFunc with
- GCompareFunc.
-
- * e-iterator.c (e_iterator_class_init): GTK2-ified.
- (ECI_CLASS): Likewise.
-
- * e-html-utils.c: Do not #include <gal/unicode/gunicode.h>.
-
- * e-gui-utils.c: Don't #include <libgnome/gnome-defs.h>.
- (e_create_image_widget): Pass NULL to gdk_pixbuf_new_from_file()
- for the error arg.
-
- * e-corba-utils.h: #include <orbit/orbit.h> instead of
- <orb/orbit.h>.
-
- * Makefile.am: Removed bonobo-factory-util.c,
- bonobo-factory-util.h, e-categories-master-list-wombat.h,
- e-categories-master-list-wombat.c, e-dialog-utils.c,
- e-dialog-utils.h, e-proxy.c e-proxy.h for now.
-
-2002-11-02 Rodrigo Moya <rodrigo@ximian.com>
-
- * e-config-listener.[ch]: ported to GConf and GObject.
-
-2002-11-01 Rodrigo Moya <rodrigo@ximian.com>
-
- * e-config-listener.[ch]:
- * e-component-listener.[ch]: compilation fixes for GNOME 2 porting.
-
-2002-10-24 Rodrigo Moya <rodrigo@ximian.com>
-
- Fixes #32764
-
- * e-config-listener.c (add_key): store the value returned by
- bonobo_event_source_client_add_listener, so that we can remove it
- later, when freeing the key structure.
- (free_key_hash): remove listener.
- (e_config_listener_set_boolean):
- (e_config_listener_set_float):
- (e_config_listener_set_long):
- (e_config_listener_set_string): only set the cache values if there's
- no exception.
- (e_config_listener_destroy): remove all keys before unrefing the db
- component.
-
-2002-10-23 Dan Winship <danw@ximian.com>
-
- * ename/e-name-western.c: Cast chars to unsigned char before
- passing to ctype macros since they are not defined on negative
- numbers. Fixes parsing problems with names with accented
- characters on Solaris. (At least part of #32146)
-
-2002-09-25 Rodrigo Moya <rodrigo@ximian.com>
-
- * e-component-listener.c (ping_component_callback): added a comment
- about the fix for #30918.
-
-2002-09-23 Rodrigo Moya <rodrigo@ximian.com>
-
- * e-component-listener.c (ping_component_callback): gtk_object_ref the
- component listener before emitting the "component_died" signal, since
- in most cases, the component listener will be destroyed in the
- callbacks for that signal.
-
-2002-09-22 Dan Winship <danw@ximian.com>
-
- * e-config-listener.c: Fix some non-ANSI switch statements
-
- * e-path.c: #include <sys/types.h> for OS X
-
-2002-09-11 Chris Toshok <toshok@ximian.com>
-
- [ Fixes #27546 ]
- * ename/e-name-western-tables.h
- (e_name_western_complex_last_table): add "di" to
- e_name_western_complex_last_table.
-
-2002-09-05 Rodrigo Moya <rodrigo@ximian.com>
-
- * e-config-listener.c (e_config_listener_set_boolean,
- e_config_listener_set_float, e_config_listener_set_long,
- e_config_listener_set_string): update the local copy (if we've
- got one) so that we don't return values if asked before getting
- the change notification.
-
-2002-09-04 Dan Winship <danw@ximian.com>
-
- * e-time-utils.c (e_mktime_utc): New. Like mktime(3), but assumes
- the input time is UTC.
- (e_localtime_with_offset): New. Like localtime_r(3), but also
- returns an offset from UTC.
-
-2002-08-29 Dan Winship <danw@ximian.com>
-
- * e-list.c (e_list_destroy): Don't call g_list_foreach with the
- free func if the free func is NULL.
-
-2002-08-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-html-utils.c (e_text_to_html_full): Convert file: urls
- too. Fixes bug #29557.
-
- * e-proxy.[c,h] (e_proxy_init): New convenience function to
- initialise the proxy settings for soup to use.
-
-2002-08-27 Rodrigo Moya <rodrigo@ximian.com>
-
- * e-config-listener.c[ch] (e_config_listener_get_float_with_default,
- e_config_listener_set_boolean, e_config_listener_set_float): new
- functions.
- (property_change_cb, add_key): added support for FLOAT values.
- (e_config_listener_set_string): free strings before returning.
-
-2002-08-26 Peter Williams <peterw@ximian.com>
-
- * e-dialog-utils.c (set_transient_for_gdk): If gdk_window_foreign_new
- returned NULL, we're probably screwed, but try to avoid a segfault.
- (Preemptive fix suggested by kmaraas).
-
-2002-08-26 Rodrigo Moya <rodrigo@ximian.com>
-
- * e-config-listener.c (e_config_listener_get_string_with_default):
- call g_strdup in the correct place, or we'll return the internal copy.
-
-2002-08-26 Rodrigo Moya <rodrigo@ximian.com>
-
- * e-config-listener.c (e_config_listener_set_long): only set the key
- if the value is different from what we've already read from the
- database, to avoid extra change notifications.
- (e_config_listener_set_string): likewise.
-
-2002-08-22 Rodrigo Moya <rodrigo@ximian.com>
-
- * e-config-listener.[ch]: added "key_changed" signal to class.
- (property_change_cb): emit "key_changed" signal.
- (e_config_listener_set_long): new function.
- (e_config_listener_get_long_with_default): new function.
-
-2002-08-22 Dan Winship <danw@ximian.com>
-
- * e-path.c (e_path_rmdir): Remove an e_path directory, and its
- parent "subfolders" dir if it's now empty.
-
-2002-08-22 JP Rosevear <jpr@ximian.com>
-
- * e-time-utils.c (e_time_parse_date): if the year was two digits,
- add the current century
-
- Fixes # 17252
-
-2002-08-16 Rodrigo Moya <rodrigo@ximian.com>
-
- * e-config-listener.[ch]: new class for config database access and
- monitoring.
-
- * Makefile.am: added new files.
-
-2002-08-14 Rodrigo Moya <rodrigo@ximian.com>
-
- * e-component-listener.[ch]: new class for controlling a component,
- to detect when it dies.
-
-2002-08-01 Dan Winship <danw@ximian.com>
-
- * e-html-utils.c (is_citation): Remove the logic that assumes
- "Rupert> " is a citation, since it misfires more often than it
- hits.
-
-2002-07-31 Dan Winship <danw@ximian.com>
-
- * e-html-utils.c (is_addr_char, is_trailing_garbage): Don't use
- "isprint(c)" to mean "c >= 32 && c < 128" since it doesn't in most
- locales.
- (is_domain_name_char): new macro for dns-valid characters
- (email_address_extract): Use is_domain_name_char rather than
- is_addr_char for the part after the @.
-
-2002-07-30 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-host-utils.c (e_gethostbyname_r): If the user has enabled IPv6
- support, use getaddrinfo to resolve hostnames and then manually
- fit the result into a struct hostent.
- (e_gethostbyaddr_r): Same.
-
-2002-07-25 Not Zed <NotZed@Ximian.com>
-
- * e-msgport.c (e_dlist_length): Return the actual count, rather
- than always 0!
-
-2002-07-03 Peter Williams <peterw@ximian.com>
-
- * Makefile.am: Install libeutil, libeconduit, and libedb3util and
- their headers.
-
-2002-07-15 Not Zed <NotZed@Ximian.com>
-
- * e-sexp.c (term_eval_caststring): Cast to a string type.
- (term_eval_castint): Cast to an int type.
- (symbols[]): Add to symbol table.
-
-2002-07-09 Dan Winship <danw@ximian.com>
-
- * e-categories-config.c: #include <string.h>
-
-2002-07-02 Rodrigo Moya <rodrigo@ximian.com>
-
- * e-categories-config.c (e_categories_config_get_icon_for): changed to
- return a gboolean (TRUE if the icon is found, FALSE if not).
-
-2002-06-07 Not Zed <NotZed@Ximian.com>
-
- * e-dialog-utils.c (e_gnome_warning_dialog_parented):
- (e_gnome_ok_cancel_dialog_parented): Use connect_while_alive, so
- we're not called after we've quit. See bug #15397.
-
-2002-06-03 Not Zed <NotZed@Ximian.com>
-
- * e-msgport.c (e_msgport_wait): Protect against EINTR (irix?), see
- bug #24086.
-
-2002-05-07 Ettore Perazzoli <ettore@ximian.com>
-
- * e-corba-utils.c (e_safe_corba_string_dup): New.
-
-2002-05-06 Not Zed <NotZed@Ximian.com>
-
- * e-msgport.c (e_thread_destroy): Destroy our mutex too.
- (e_thread_new): Add thread to a new list of all threads.
- (e_thread_destroy): Remove thread from list of all threads.
- (e_thread_busy): New function, returh true if we're busy somewhere
- processing work.
-
-2002-04-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-passwords.c (e_passwords_get_password): Don't leak the base64
- encoded password buffer.
-
-2002-04-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-host-utils.c (e_gethostbyaddr_r): New wrapper around
- gethostbyaddr_r if the system has it, else a whole new
- implementation.
-
-2002-04-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-sexp.c (parse_value): Handle parsing negative integers.
-
-2002-03-29 JP Rosevear <jpr@ximian.com>
-
- * e-dialog-utils.c (e_file_dialog_save): open a file selection
- dialog with the given title and return the selected file name
- (save_ok): if the ok button is clicked, make sure the file doesn't
- already exist and if it does, see if the user wants to over write
- it
-
- * e-dialog-utils.h: new proto
-
-2002-03-22 Ettore Perazzoli <ettore@ximian.com>
-
- * e-lang-utils.c: New.
- * e-lang-utils.h: New.
-
-2002-03-22 Dan Winship <danw@ximian.com>
-
- * e-request.c (e_request_string): Document the fact that this
- takes two locale charset strings and one UTF8 string and returns a
- UTF8 string. (Huh.)
-
-2002-03-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-mktemp.c: #include <string.h> for strcmp.
-
-2002-02-22 Dan Winship <danw@ximian.com>
-
- * e-html-utils.c (e_text_to_html_full): Fix for if the buffer ends
- with an email address (and no newline).
-
-2002-02-09 JP Rosevear <jpr@ximian.com>
-
- * e-pilot-settings.h: add row and column defines
-
-2002-01-27 Ettore Perazzoli <ettore@ximian.com>
-
- * ename/Makefile.am: Use E_NAME_CFLAGS and E_NAME_LIBS.
-
- * Makefile.am: Use E_UTIL_CFLAGS and E_UTIL_LIBS.
-
-2002-01-14 JP Rosevear <jpr@ximian.com>
-
- * Makefile.am: compile new files
-
- * e-pilot-settings.[hc]: beginnings of a general conduit
- configuration gui
-
-2002-01-10 Christopher James Lahey <clahey@ximian.com>
-
- * ename/e-name-western.c (e_name_western_word_is_suffix): Allow
- for a period after suffixes. Fixes Ximian bug #17012.
-
-2002-01-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-memory.c (e_memchunk_clean): Prune free'd nodes from our free
- list otherwise we'll end up re-using free'd memory blocks and
- that's not a Good Thing (tm).
-
-2002-01-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * md5-utils.h: Reverted.
-
-2002-01-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * md5-utils.h: Move the struct into md5-utils.c - this is a
- kludgey hack around the fact that NSS also defines
- MD5Context. Besides, this should be a private struct anyway.
-
-2002-01-02 JP Rosevear <jpr@ximian.com>
-
- * e-dialog-utils.c (e_gnome_dialog_set_parent): util function
- moved from mail-callbacks, also destroys the dialog if the parent
- is destroyed
- (e_gnome_warning_dialog_parented): similarly
- (e_gnome_ok_cancel_dialog_parented): ditto
-
- * e-dialog-utils.h: new protos
-
-2001-12-17 JP Rosevear <jpr@ximian.com>
-
- * e-pilot-map.c (e_pilot_map_clear): clear all info from the map
-
- * e-pilot-map.h: add proto
-
-2001-12-10 JP Rosevear <jpr@ximian.com>
-
- * e-pilot-util.c (e_pilot_utf8_to_pchar): use UTF-8 instead of
- UTF8 as the source char set
- (e_pilot_utf8_from_pchar): use UTF-8 instead of UTF8 as the
- destination char set
-
-2001-11-20 Dan Winship <danw@ximian.com>
-
- * e-passwords.c (e_passwords_forget_password): Clear the password
- in bonobo-conf as well. Fixes ximian 14893.
-
-2001-11-13 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am (libeutil_la_LIBADD): Remove `-lc'. It makes the
- mailer do strange things when it calls `fork()', thus breaking
- e.g. mail sending through sendmail.
-
-2001-11-13 JP Rosevear <jpr@ximian.com>
-
- * e-pilot-map.c (real_e_pilot_map_insert): only insert non-0 pids
- into the pid map
- (e_pilot_map_insert): remove and free old keys/values here -
- including possibly orphaned keys
- (e_pilot_map_remove_by_uid): only free things if they should have
- been found
-
-2001-11-13 JP Rosevear <jpr@ximian.com>
-
- * Makefile.am (libeutil_la_LIBADD): Explicitly add -lc
-
-2001-10-30 Damon Chaplin <damon@ximian.com>
-
- * e-time-utils.c (e_time_parse_date): added a 2nd format, with the
- weekday and the date. We need this so we can try to parse DATE values
- in the ECalendarTable.
-
-2001-10-29 Ettore Perazzoli <ettore@ximian.com>
-
- * e-dialog-utils.c (e_set_dialog_parent): Remove a g_warning.
-
-2001-10-29 Christopher James Lahey <clahey@ximian.com>
-
- * ename/e-name-western.c (e_name_western_fixup): Added French
- conjunction.
-
- * e-host-utils.c: Don't define gethost_mutex unless we need it.
-
-2001-10-29 Christopher James Lahey <clahey@ximian.com>
-
- * ename/e-name-western.c: Cleaned this up a bit.
-
-2001-10-29 Christopher James Lahey <clahey@ximian.com>
-
- * ename/e-name-western.c (e_name_western_fixup): Check for
- compound first names here (X & Y). Fixes Ximian bug #13859.
-
-2001-10-28 JP Rosevear <jpr@ximian.com>
-
- * e-pilot-map.c (e_pilot_map_remove_by_pid): make sure to free the
- keys as well
- (e_pilot_map_remove_by_uid): ditto
-
-2001-10-27 JP Rosevear <jpr@ximian.com>
-
- * e-pilot-map.h: update proto
-
- * e-pilot-map.c (e_pilot_map_lookup_pid): touch the nodes if
- indicated and found
- (e_pilot_map_lookup_uid): ditto
-
-2001-10-26 JP Rosevear <jpr@ximian.com>
-
- * e-pilot-map.c (real_e_pilot_map_insert): take an extra param on
- whether to mark touched
- (map_sax_start_element): use above
- (e_pilot_map_insert): ditto
- (e_pilot_map_write): pass in extra info to foreach call
- (map_write_foreach): if we are in touched only mode, write out the
- map only if its been touched
-
- * e-pilot-map.h: add new member
-
-2001-10-26 JP Rosevear <jpr@ximian.com>
-
- * e-pilot-map.c (map_sax_start_element): add archived records
- with pilot id of 0
- (map_write_foreach): use the uid map for writing
- (e_pilot_map_write): write using the uid map
-
-2001-10-26 JP Rosevear <jpr@ximian.com>
-
- * e-pilot-map.c (e_pilot_map_insert): free up old memory first
- (e_pilot_map_destroy): free allocated memory when destroying
-
-2001-10-22 JP Rosevear <jpr@ximian.com>
-
- * e-pilot-map.c (map_set_node_timet): plug leak
-
-2001-10-23 Dan Winship <danw@ximian.com>
-
- * e-html-utils.c (e_text_to_html_full): Change " " to "&nbsp;" at
- start of line.
-
-2001-10-22 Dan Winship <danw@ximian.com>
-
- * e-passwords.c (e_passwords_get_password): Pass a
- CORBA_Environment to bonobo_config_get_string so it doesn't g_warn
- on error. (Since the "error" is most likely just that the password
- isn't cached.)
- (e_passwords_remember_password, e_passwords_get_password,
- e_passwords_add_password): Change "if (foo) { entire function; }"
- to "if (!foo) return;"
-
- * e-html-utils.c (special_chars): Don't allow single quote or
- backtick in email addresses, or pipes following URLs.
-
-2001-10-22 JP Rosevear <jpr@ximian.com>
-
- * e-dbhash.c (e_dbhash_foreach_key): null out DBT memory prior to
- usage (from Edd Dumbill <edd@usefulinc.com>)
-
-2001-10-17 Ettore Perazzoli <ettore@ximian.com>
-
- * e-dialog-utils.c (e_set_dialog_parent_from_xid): New.
-
-2001-10-12 Chris Toshok <toshok@ximian.com>
-
- * e-passwords.h: new parameter to e_passwords_init, and add
- prototype for e_passwords_clear_component_passwords.
-
- * e-passwords.c (e_passwords_init): copy off the component name.
- (e_passwords_shutdown): free/NULL the component name.
- (e_passwords_clear_component_passwords): new function. remove the
- subtree rooted at /Passwords/<ComponentName>.
- (e_passwords_remember_password): use component_name when building
- up the path.
- (e_passwords_get_password): same.
- (e_passwords_add_password): remove/free the currently stored
- session password for this key if there is one, before adding the
- new one.
-
-2001-10-11 Chris Toshok <toshok@ximian.com>
-
- * e-passwords.h: change prototype for e_passwords_get_password.
-
- * e-passwords.c (e_passwords_get_password): remove 'const' from
- return type - the return type is now allocated and must be freed
- by the caller.
-
-2001-10-11 Chris Toshok <toshok@ximian.com>
-
- * e-passwords.c (e_passwords_init): open the bonobo config db for
- our passwords.
- (e_passwords_shutdown): sync and unref the bonobo db, and clear
- out the per session hash.
- (e_passwords_forget_passwords): remove the bonobo config db
- /Passwords path, and free up the session hash (but don't destroy
- it).
- (e_passwords_remember_password): remove the key/value from the
- session hash, after inserting it into the bonobo db.
- (e_passwords_get_password): look up a session password for the
- uri, and if it's not there, consult the bonobo db.
- (e_passwords_ask_password): quiet gcc's warnings, and only consult
- the toggle button state if we actaully created it.
-
-2001-10-09 Rodrigo Moya <rodrigo@ximian.com>
-
- * e-url.c (e_uri_to_string): don't add the host if it's null
-
-2001-10-06 Christopher James Lahey <clahey@ximian.com>
-
- * ename/e-address-western.c (e_address_western_parse): Made this
- refuse to parse more than 2047 characters of address.
-
-2001-10-04 Dan Winship <danw@ximian.com>
-
- * e-passwords.c (e_passwords_add_password): Make this dup the
- strings it's passed.
- (*) Add lots of docs.
-
-2001-10-03 Rodrigo Moya <rodrigo@ximian.com>
-
- * e-url.c (e_uri_new): default protocol to file: if not specified
-
-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 3f181ddd45..0000000000
--- a/e-util/Makefile.am
+++ /dev/null
@@ -1,117 +0,0 @@
-eutilincludedir = $(privincludedir)/e-util
-econdincludedir = $(privincludedir)/e-conduit
-
-INCLUDES = \
- -I$(top_srcdir) \
- -DEVOLUTION_IMAGES=\""$(imagesdir)"\" \
- -DEVOLUTION_CATEGORY_ICONS=\""$(imagesdir)/categories"\" \
- -DG_LOG_DOMAIN=\"e-utils\" \
- $(GNOME_PILOT_CFLAGS) \
- $(E_UTIL_CFLAGS)
-
-privlib_LTLIBRARIES = libeutil.la libeconduit.la
-
-eutilinclude_HEADERS = \
- e-account-list.h \
- e-account.h \
- e-categories-config.h \
- e-categories-master-list-wombat.h \
- e-component-listener.h \
- e-config-listener.h \
- e-corba-utils.h \
- e-dialog-utils.h \
- e-dialog-widgets.h \
- e-gtk-utils.h \
- e-gui-utils.h \
- e-host-utils.h \
- e-html-utils.h \
- e-iterator.h \
- e-lang-utils.h \
- e-list-iterator.h \
- e-list.h \
- e-memory.h \
- e-meta.h \
- e-mktemp.h \
- e-msgport.h \
- e-passwords.h \
- e-path.h \
- e-request.h \
- e-sexp.h \
- e-time-utils.h \
- e-trie.h \
- e-uid.h \
- e-url.h \
- e-xml-hash-utils.h \
- md5-utils.h
-
-libeutil_la_SOURCES = \
- $(MARSHAL_GENERATED) \
- $(eutilinclude_HEADERS) \
- e-account-list.c \
- e-account.c \
- e-categories-config.c \
- e-categories-master-list-wombat.c \
- e-component-listener.c \
- e-config-listener.c \
- e-corba-utils.c \
- e-dialog-utils.c \
- e-dialog-widgets.c \
- e-gtk-utils.c \
- e-gui-utils.c \
- e-host-utils.c \
- e-html-utils.c \
- e-iterator.c \
- e-lang-utils.c \
- e-list-iterator.c \
- e-list.c \
- e-memory.c \
- e-meta.c \
- e-mktemp.c \
- e-msgport.c \
- e-passwords.c \
- e-path.c \
- e-request.c \
- e-sexp.c \
- e-time-utils.c \
- e-trie.c \
- e-uid.c \
- e-url.c \
- e-xml-hash-utils.c \
- eggtrayicon.c \
- eggtrayicon.h \
- md5-utils.c
-
-MARSHAL_GENERATED = e-util-marshal.c e-util-marshal.h
-@EVO_MARSHAL_RULE@
-
-libeutil_la_LIBADD = $(E_UTIL_LIBS)
-
-econdinclude_HEADERS = \
- e-pilot-map.h \
- e-pilot-settings.h \
- e-pilot-util.h
-
-pilot_sources = \
- $(econdinclude_HEADERS) \
- e-pilot-map.c \
- e-pilot-settings.c \
- e-pilot-util.c
-
-if ENABLE_PILOT_CONDUITS
-pilot_compile = $(pilot_sources)
-else
-pilot_compile = md5-utils.c
-endif
-
-libeconduit_la_SOURCES = $(pilot_compile)
-
-EXTRA_DIST = \
- $(pilot_sources) \
- ChangeLog.pre-1-4 \
- e-util-marshal.list
-
-BUILT_SOURCES = $(MARSHAL_GENERATED)
-CLEANFILES = $(BUILT_SOURCES)
-
-dist-hook:
- cd $(distdir); rm -f $(BUILT_SOURCES) \ No newline at end of file
diff --git a/e-util/e-account-list.c b/e-util/e-account-list.c
deleted file mode 100644
index d0463a810b..0000000000
--- a/e-util/e-account-list.c
+++ /dev/null
@@ -1,472 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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-account-list.h"
-#include "e-account.h"
-#include "e-util-marshal.h"
-
-#include <string.h>
-#include <gal/util/e-util.h>
-
-struct EAccountListPrivate {
- GConfClient *gconf;
- guint notify_id;
-};
-
-enum {
- ACCOUNT_ADDED,
- ACCOUNT_CHANGED,
- ACCOUNT_REMOVED,
- LAST_SIGNAL
-};
-
-static guint signals [LAST_SIGNAL] = { 0 };
-
-#define PARENT_TYPE E_TYPE_LIST
-static EListClass *parent_class = NULL;
-
-static void dispose (GObject *);
-static void finalize (GObject *);
-
-static void
-class_init (GObjectClass *object_class)
-{
- parent_class = g_type_class_ref (PARENT_TYPE);
-
- /* virtual method override */
- object_class->dispose = dispose;
- object_class->finalize = finalize;
-
- /* signals */
- signals[ACCOUNT_ADDED] =
- g_signal_new ("account-added",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EAccountListClass, account_added),
- NULL, NULL,
- e_util_marshal_NONE__OBJECT,
- G_TYPE_NONE, 1,
- E_TYPE_ACCOUNT);
- signals[ACCOUNT_CHANGED] =
- g_signal_new ("account-changed",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EAccountListClass, account_changed),
- NULL, NULL,
- e_util_marshal_NONE__OBJECT,
- G_TYPE_NONE, 1,
- E_TYPE_ACCOUNT);
- signals[ACCOUNT_REMOVED] =
- g_signal_new ("account-removed",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EAccountListClass, account_removed),
- NULL, NULL,
- e_util_marshal_NONE__OBJECT,
- G_TYPE_NONE, 1,
- E_TYPE_ACCOUNT);
-}
-
-static void
-init (GObject *object)
-{
- EAccountList *account_list = E_ACCOUNT_LIST (object);
-
- account_list->priv = g_new0 (EAccountListPrivate, 1);
-}
-
-static void
-dispose (GObject *object)
-{
- EAccountList *account_list = E_ACCOUNT_LIST (object);
-
- if (account_list->priv->gconf) {
- if (account_list->priv->notify_id) {
- gconf_client_notify_remove (account_list->priv->gconf,
- account_list->priv->notify_id);
- }
- g_object_unref (account_list->priv->gconf);
- account_list->priv->gconf = NULL;
- }
-
- G_OBJECT_CLASS (parent_class)->dispose (object);
-}
-
-static void
-finalize (GObject *object)
-{
- EAccountList *account_list = E_ACCOUNT_LIST (object);
-
- g_free (account_list->priv);
-
- G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-E_MAKE_TYPE (e_account_list, "EAccountList", EAccountList, class_init, init, PARENT_TYPE)
-
-
-static void
-gconf_accounts_changed (GConfClient *client, guint cnxn_id,
- GConfEntry *entry, gpointer user_data)
-{
- EAccountList *account_list = user_data;
- GSList *list, *l, *new_accounts = NULL;
- EAccount *account;
- EList *old_accounts;
- EIterator *iter;
- char *uid;
-
- old_accounts = e_list_duplicate (E_LIST (account_list));
-
- list = gconf_client_get_list (client, "/apps/evolution/mail/accounts",
- GCONF_VALUE_STRING, NULL);
- for (l = list; l; l = l->next) {
- uid = e_account_uid_from_xml (l->data);
- if (!uid)
- continue;
-
- /* See if this is an existing account */
- for (iter = e_list_get_iterator (old_accounts);
- e_iterator_is_valid (iter);
- e_iterator_next (iter)) {
- account = (EAccount *)e_iterator_get (iter);
- if (!strcmp (account->uid, uid)) {
- /* The account still exists, so remove
- * it from "old_accounts" and update it.
- */
- e_iterator_delete (iter);
- if (e_account_set_from_xml (account, l->data))
- g_signal_emit (account_list, signals[ACCOUNT_CHANGED], 0, account);
- goto next;
- }
- }
-
- /* Must be a new account */
- account = e_account_new_from_xml (l->data);
- e_list_append (E_LIST (account_list), account);
- new_accounts = g_slist_prepend (new_accounts, account);
-
- next:
- g_free (uid);
- g_object_unref (iter);
- }
-
- /* Now emit signals for each added account. (We do this after
- * adding all of them because otherwise if the signal handler
- * calls e_account_list_get_default_account() it will end up
- * causing the first account in the list to become the
- * default.)
- */
- for (l = new_accounts; l; l = l->next) {
- account = l->data;
- g_signal_emit (account_list, signals[ACCOUNT_ADDED], 0, account);
- g_object_unref (account);
- }
- g_slist_free (new_accounts);
-
- /* Anything left in old_accounts must have been deleted */
- for (iter = e_list_get_iterator (old_accounts);
- e_iterator_is_valid (iter);
- e_iterator_next (iter)) {
- account = (EAccount *)e_iterator_get (iter);
- e_list_remove (E_LIST (account_list), account);
- g_signal_emit (account_list, signals[ACCOUNT_REMOVED], 0, account);
- }
- g_object_unref (iter);
- g_object_unref (old_accounts);
-}
-
-static void *
-copy_func (const void *data, void *closure)
-{
- GObject *object = (GObject *)data;
-
- g_object_ref (object);
- return object;
-}
-
-static void
-free_func (void *data, void *closure)
-{
- g_object_unref (data);
-}
-
-/**
- * e_account_list_new:
- * @gconf: a #GConfClient
- *
- * Reads the list of accounts from @gconf and listens for changes.
- * Will emit %account_added, %account_changed, and %account_removed
- * signals according to notifications from GConf.
- *
- * You can modify the list using e_list_append(), e_list_remove(), and
- * e_iterator_delete(). After adding, removing, or changing accounts,
- * you must call e_account_list_save() to push the changes back to
- * GConf.
- *
- * Return value: the list of accounts
- **/
-EAccountList *
-e_account_list_new (GConfClient *gconf)
-{
- EAccountList *account_list;
-
- g_return_val_if_fail (GCONF_IS_CLIENT (gconf), NULL);
-
- account_list = g_object_new (E_TYPE_ACCOUNT_LIST, NULL);
- e_account_list_construct (account_list, gconf);
-
- return account_list;
-}
-
-void
-e_account_list_construct (EAccountList *account_list, GConfClient *gconf)
-{
- g_return_if_fail (GCONF_IS_CLIENT (gconf));
-
- e_list_construct (E_LIST (account_list), copy_func, free_func, NULL);
- account_list->priv->gconf = gconf;
- g_object_ref (gconf);
-
- gconf_client_add_dir (account_list->priv->gconf,
- "/apps/evolution/mail/accounts",
- GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
- account_list->priv->notify_id =
- gconf_client_notify_add (account_list->priv->gconf,
- "/apps/evolution/mail/accounts",
- gconf_accounts_changed, account_list,
- NULL, NULL);
-
- gconf_accounts_changed (account_list->priv->gconf,
- account_list->priv->notify_id,
- NULL, account_list);
-}
-
-/**
- * e_account_list_save:
- * @account_list: an #EAccountList
- *
- * Saves @account_list to GConf. Signals will be emitted for changes.
- **/
-void
-e_account_list_save (EAccountList *account_list)
-{
- GSList *list = NULL;
- EAccount *account;
- EIterator *iter;
- char *xmlbuf;
-
- for (iter = e_list_get_iterator (E_LIST (account_list));
- e_iterator_is_valid (iter);
- e_iterator_next (iter)) {
- account = (EAccount *)e_iterator_get (iter);
-
- xmlbuf = e_account_to_xml (account);
- if (xmlbuf)
- list = g_slist_append (list, xmlbuf);
- }
- g_object_unref (iter);
-
- gconf_client_set_list (account_list->priv->gconf,
- "/apps/evolution/mail/accounts",
- GCONF_VALUE_STRING, list, NULL);
-
- while (list) {
- g_free (list->data);
- list = g_slist_remove (list, list->data);
- }
-
- gconf_client_suggest_sync (account_list->priv->gconf, NULL);
-}
-
-/**
- * e_account_list_add:
- * @accounts:
- * @account:
- *
- * Add an account to the account list. Will emit the account-changed
- * event.
- **/
-void
-e_account_list_add(EAccountList *accounts, EAccount *account)
-{
- /* FIXME: should we check for duplicate accounts? */
-
- e_list_append ((EList *)accounts, account);
- g_signal_emit(accounts, signals[ACCOUNT_ADDED], 0, account);
-}
-
-/**
- * e_account_list_change:
- * @accounts:
- * @account:
- *
- * Signal that the details of an account have changed.
- **/
-void
-e_account_list_change(EAccountList *accounts, EAccount *account)
-{
- /* maybe the account should do this itself ... */
- g_signal_emit(accounts, signals[ACCOUNT_CHANGED], 0, account);
-}
-
-/**
- * e_account_list_remove:
- * @accounts:
- * @account:
- *
- * Remove an account from the account list, and emit the
- * account-removed signal. If the account was the default account,
- * then reset the default to the first account.
- **/
-void
-e_account_list_remove(EAccountList *accounts, EAccount *account)
-{
- if (account == e_account_list_get_default(accounts))
- gconf_client_unset (accounts->priv->gconf, "/apps/evolution/mail/default_account", NULL);
-
- /* not sure if need to ref but no harm */
- g_object_ref (account);
- e_list_remove ((EList *) accounts, account);
- g_signal_emit(accounts, signals[ACCOUNT_REMOVED], 0, account);
- g_object_unref (account);
-}
-
-/**
- * e_account_list_get_default:
- * @accounts:
- *
- * Get the default account. If no default is specified, or the default
- * has become stale, then the first account is made the default.
- *
- * Return value: The account or NULL if no accounts are defined.
- **/
-const EAccount *
-e_account_list_get_default(EAccountList *accounts)
-{
- char *uid;
- EIterator *it;
- const EAccount *account = NULL;
-
- uid = gconf_client_get_string (accounts->priv->gconf, "/apps/evolution/mail/default_account", NULL);
- it = e_list_get_iterator ((EList *)accounts);
-
- if (uid) {
- for (;e_iterator_is_valid (it);e_iterator_next (it)) {
- account = (const EAccount *)e_iterator_get (it);
-
- if (!strcmp(uid, account->uid))
- break;
- account = NULL;
- }
- e_iterator_reset(it);
- }
-
- /* no uid or uid not found, @it will be at the first account */
- if (account == NULL && e_iterator_is_valid(it)) {
- account = (const EAccount *) e_iterator_get (it);
- gconf_client_set_string (accounts->priv->gconf, "/apps/evolution/mail/default_account", account->uid, NULL);
- }
-
- g_object_unref(it);
- g_free(uid);
-
- return account;
-}
-
-/**
- * e_account_list_set_default:
- * @accounts:
- * @account:
- *
- * Set the account @account to be the default account.
- **/
-void
-e_account_list_set_default(EAccountList *accounts, EAccount *account)
-{
- gconf_client_set_string (accounts->priv->gconf, "/apps/evolution/mail/default_account", account->uid, NULL);
-}
-
-/**
- * e_account_list_find:
- * @accounts:
- * @type: Type of search.
- * @key: Search key.
- *
- * Perform a search of the account list on a single key.
- *
- * @type must be set from one of the following search types:
- * E_ACCOUNT_FIND_NAME - Find an account by account name.
- * E_ACCOUNT_FIND_ID_NAME - Find an account by the owner's identity name.
- * E_ACCOUNT_FIND_ID_ADDRESS - Find an account by the owner's identity address.
- *
- * Return value: The account or NULL if it doesn't exist.
- **/
-const EAccount *
-e_account_list_find(EAccountList *accounts, e_account_find_t type, const char *key)
-{
- char *val;
- EIterator *it;
- const EAccount *account = NULL;
-
- /* this could use a callback for more flexibility ...
- ... but this makes the common cases easier */
-
- if (!key)
- return NULL;
-
- for (it = e_list_get_iterator ((EList *)accounts);
- e_iterator_is_valid (it);
- e_iterator_next (it)) {
- int found = 0;
-
- account = (const EAccount *)e_iterator_get (it);
-
- val = NULL;
- switch(type) {
- case E_ACCOUNT_FIND_NAME:
- found = strcmp(account->name, key) == 0;
- break;
- case E_ACCOUNT_FIND_UID:
- found = strcmp(account->uid, key) == 0;
- break;
- case E_ACCOUNT_FIND_ID_NAME:
- if (account->id)
- found = strcmp(account->id->name, key) == 0;
- break;
- case E_ACCOUNT_FIND_ID_ADDRESS:
- if (account->id)
- found = g_ascii_strcasecmp(account->id->address, key) == 0;
- break;
- }
-
- if (found)
- break;
-
- account = NULL;
- }
- g_object_unref(it);
-
- return account;
-}
-
diff --git a/e-util/e-account-list.h b/e-util/e-account-list.h
deleted file mode 100644
index b47efb42ae..0000000000
--- a/e-util/e-account-list.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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_ACCOUNT_LIST__
-#define __E_ACCOUNT_LIST__
-
-#include "e-list.h"
-#include "e-account.h"
-#include <gconf/gconf-client.h>
-
-#define E_TYPE_ACCOUNT_LIST (e_account_list_get_type ())
-#define E_ACCOUNT_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_ACCOUNT_LIST, EAccountList))
-#define E_ACCOUNT_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_ACCOUNT_LIST, EAccountListClass))
-#define E_IS_ACCOUNT_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_ACCOUNT_LIST))
-#define E_IS_ACCOUNT_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_ACCOUNT_LIST))
-
-typedef struct EAccountListPrivate EAccountListPrivate;
-
-/* search options for the find command */
-typedef enum _e_account_find_t {
- E_ACCOUNT_FIND_NAME,
- E_ACCOUNT_FIND_UID,
- E_ACCOUNT_FIND_ID_NAME,
- E_ACCOUNT_FIND_ID_ADDRESS,
-} e_account_find_t;
-
-typedef struct {
- EList parent_object;
-
- EAccountListPrivate *priv;
-} EAccountList;
-
-typedef struct {
- EListClass parent_class;
-
- /* signals */
- void (*account_added) (EAccountList *, EAccount *);
- void (*account_changed) (EAccountList *, EAccount *);
- void (*account_removed) (EAccountList *, EAccount *);
-} EAccountListClass;
-
-
-GType e_account_list_get_type (void);
-
-EAccountList *e_account_list_new (GConfClient *gconf);
-void e_account_list_construct (EAccountList *account_list,
- GConfClient *gconf);
-
-void e_account_list_save (EAccountList *account_list);
-
-void e_account_list_add (EAccountList *, EAccount *);
-void e_account_list_change (EAccountList *, EAccount *);
-void e_account_list_remove (EAccountList *, EAccount *);
-
-const EAccount *e_account_list_get_default(EAccountList *);
-void e_account_list_set_default(EAccountList *, EAccount *);
-const EAccount *e_account_list_find (EAccountList *, e_account_find_t type, const char *key);
-
-#endif /* __E_ACCOUNT_LIST__ */
diff --git a/e-util/e-account.c b/e-util/e-account.c
deleted file mode 100644
index dbbfccb6e3..0000000000
--- a/e-util/e-account.c
+++ /dev/null
@@ -1,560 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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-account.h"
-
-#include "e-uid.h"
-
-#include <string.h>
-
-#include <gal/util/e-util.h>
-#include <libxml/parser.h>
-#include <libxml/tree.h>
-#include <libxml/xmlmemory.h>
-
-#define PARENT_TYPE G_TYPE_OBJECT
-static GObjectClass *parent_class = NULL;
-
-static void finalize (GObject *);
-
-static void
-class_init (GObjectClass *object_class)
-{
- parent_class = g_type_class_ref (PARENT_TYPE);
-
- /* virtual method override */
- object_class->finalize = finalize;
-}
-
-static void
-init (EAccount *account)
-{
- account->id = g_new0 (EAccountIdentity, 1);
- account->source = g_new0 (EAccountService, 1);
- account->transport = g_new0 (EAccountService, 1);
-}
-
-static void
-identity_destroy (EAccountIdentity *id)
-{
- if (!id)
- return;
-
- g_free (id->name);
- g_free (id->address);
- g_free (id->reply_to);
- g_free (id->organization);
-
- g_free (id);
-}
-
-static void
-service_destroy (EAccountService *service)
-{
- if (!service)
- return;
-
- g_free (service->url);
-
- g_free (service);
-}
-
-static void
-finalize (GObject *object)
-{
- EAccount *account = E_ACCOUNT (object);
-
- g_free (account->name);
- g_free (account->uid);
-
- identity_destroy (account->id);
- service_destroy (account->source);
- service_destroy (account->transport);
-
- g_free (account->drafts_folder_uri);
- g_free (account->sent_folder_uri);
-
- g_free (account->cc_addrs);
- g_free (account->bcc_addrs);
-
- g_free (account->pgp_key);
- g_free (account->smime_sign_key);
- g_free (account->smime_encrypt_key);
-
- G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-E_MAKE_TYPE (e_account, "EAccount", EAccount, class_init, init, PARENT_TYPE)
-
-
-/**
- * e_account_new:
- *
- * Return value: a blank new account which can be filled in and
- * added to an #EAccountList.
- **/
-EAccount *
-e_account_new (void)
-{
- EAccount *account;
-
- account = g_object_new (E_TYPE_ACCOUNT, NULL);
- account->uid = e_uid_new ();
-
- return account;
-}
-
-/**
- * e_account_new_from_xml:
- * @xml: an XML account description
- *
- * Return value: a new #EAccount based on the data in @xml, or %NULL
- * if @xml could not be parsed as valid account data.
- **/
-EAccount *
-e_account_new_from_xml (const char *xml)
-{
- EAccount *account;
-
- account = g_object_new (E_TYPE_ACCOUNT, NULL);
- if (!e_account_set_from_xml (account, xml)) {
- g_object_unref (account);
- return NULL;
- }
-
- return account;
-}
-
-
-static gboolean
-xml_set_bool (xmlNodePtr node, const char *name, gboolean *val)
-{
- gboolean bool;
- char *buf;
-
- if ((buf = xmlGetProp (node, name))) {
- bool = (!strcmp (buf, "true") || !strcmp (buf, "yes"));
- xmlFree (buf);
-
- if (bool != *val) {
- *val = bool;
- return TRUE;
- }
- }
-
- return FALSE;
-}
-
-static gboolean
-xml_set_int (xmlNodePtr node, const char *name, int *val)
-{
- int number;
- char *buf;
-
- if ((buf = xmlGetProp (node, name))) {
- number = strtol (buf, NULL, 10);
- xmlFree (buf);
-
- if (number != *val) {
- *val = number;
- return TRUE;
- }
- }
-
- return FALSE;
-}
-
-static gboolean
-xml_set_prop (xmlNodePtr node, const char *name, char **val)
-{
- char *buf, *new_val;
-
- buf = xmlGetProp (node, name);
- new_val = g_strdup (buf);
- xmlFree (buf);
-
- /* We can use strcmp here whether the value is UTF8 or
- * not, since we only care if the bytes changed.
- */
- if (!*val || strcmp (*val, new_val)) {
- g_free (*val);
- *val = new_val;
- return TRUE;
- } else {
- g_free (new_val);
- return FALSE;
- }
-}
-
-static gboolean
-xml_set_content (xmlNodePtr node, char **val)
-{
- char *buf, *new_val;
-
- buf = xmlNodeGetContent (node);
- new_val = g_strdup (buf);
- xmlFree (buf);
-
- /* We can use strcmp here whether the value is UTF8 or
- * not, since we only care if the bytes changed.
- */
- if (!*val || strcmp (*val, new_val)) {
- g_free (*val);
- *val = new_val;
- return TRUE;
- } else {
- g_free (new_val);
- return FALSE;
- }
-}
-
-static gboolean
-xml_set_identity (xmlNodePtr node, EAccountIdentity *id)
-{
- gboolean changed = FALSE;
-
- for (node = node->children; node; node = node->next) {
- if (!strcmp (node->name, "name"))
- changed |= xml_set_content (node, &id->name);
- else if (!strcmp (node->name, "addr-spec"))
- changed |= xml_set_content (node, &id->address);
- else if (!strcmp (node->name, "reply-to"))
- changed |= xml_set_content (node, &id->reply_to);
- else if (!strcmp (node->name, "organization"))
- changed |= xml_set_content (node, &id->organization);
- else if (!strcmp (node->name, "signature")) {
- changed |= xml_set_bool (node, "auto", &id->auto_signature);
- changed |= xml_set_int (node, "default", &id->def_signature);
- }
- }
-
- return changed;
-}
-
-static gboolean
-xml_set_service (xmlNodePtr node, EAccountService *service)
-{
- gboolean changed = FALSE;
-
- changed |= xml_set_bool (node, "save-passwd", &service->save_passwd);
- changed |= xml_set_bool (node, "keep-on-server", &service->keep_on_server);
-
- changed |= xml_set_bool (node, "auto-check", &service->auto_check);
- changed |= xml_set_int (node, "auto-check-timeout", &service->auto_check_time);
- if (service->auto_check && service->auto_check_time <= 0) {
- service->auto_check = FALSE;
- service->auto_check_time = 0;
- }
-
- for (node = node->children; node; node = node->next) {
- if (!strcmp (node->name, "url")) {
- changed |= xml_set_content (node, &service->url);
- break;
- }
- }
-
- return changed;
-}
-
-/**
- * e_account_set_from_xml:
- * @account: an #EAccount
- * @xml: an XML account description.
- *
- * Changes @account to match @xml.
- *
- * Return value: %TRUE if @account was changed, %FALSE if @account
- * already matched @xml or @xml could not be parsed
- **/
-gboolean
-e_account_set_from_xml (EAccount *account, const char *xml)
-{
- xmlNodePtr node, cur;
- xmlDocPtr doc;
- gboolean changed = FALSE;
-
- if (!(doc = xmlParseDoc ((char *)xml)))
- return FALSE;
-
- node = doc->children;
- if (strcmp (node->name, "account") != 0) {
- xmlFreeDoc (doc);
- return FALSE;
- }
-
- if (!account->uid)
- xml_set_prop (node, "uid", &account->uid);
-
- changed |= xml_set_prop (node, "name", &account->name);
- changed |= xml_set_bool (node, "enabled", &account->enabled);
-
- for (node = node->children; node; node = node->next) {
- if (!strcmp (node->name, "identity")) {
- changed |= xml_set_identity (node, account->id);
- } else if (!strcmp (node->name, "source")) {
- changed |= xml_set_service (node, account->source);
- } else if (!strcmp (node->name, "transport")) {
- changed |= xml_set_service (node, account->transport);
- } else if (!strcmp (node->name, "drafts-folder")) {
- changed |= xml_set_content (node, &account->drafts_folder_uri);
- } else if (!strcmp (node->name, "sent-folder")) {
- changed |= xml_set_content (node, &account->sent_folder_uri);
- } else if (!strcmp (node->name, "auto-cc")) {
- changed |= xml_set_bool (node, "always", &account->always_cc);
- changed |= xml_set_content (node, &account->cc_addrs);
- } else if (!strcmp (node->name, "auto-bcc")) {
- changed |= xml_set_bool (node, "always", &account->always_bcc);
- changed |= xml_set_content (node, &account->bcc_addrs);
- } else if (!strcmp (node->name, "pgp")) {
- changed |= xml_set_bool (node, "encrypt-to-self", &account->pgp_encrypt_to_self);
- changed |= xml_set_bool (node, "always-trust", &account->pgp_always_trust);
- changed |= xml_set_bool (node, "always-sign", &account->pgp_always_sign);
- changed |= xml_set_bool (node, "no-imip-sign", &account->pgp_no_imip_sign);
-
- if (node->children) {
- for (cur = node->children; cur; cur = cur->next) {
- if (!strcmp (cur->name, "key-id")) {
- changed |= xml_set_content (cur, &account->pgp_key);
- break;
- }
- }
- }
- } else if (!strcmp (node->name, "smime")) {
- changed |= xml_set_bool (node, "sign-default", &account->smime_sign_default);
- changed |= xml_set_bool (node, "encrypt-to-self", &account->smime_encrypt_to_self);
- changed |= xml_set_bool (node, "encrypt-default", &account->smime_encrypt_default);
-
- if (node->children) {
- for (cur = node->children; cur; cur = cur->next) {
- if (!strcmp (cur->name, "sign-key-id")) {
- changed |= xml_set_content (cur, &account->smime_sign_key);
- } else if (!strcmp (cur->name, "encrypt-key-id")) {
- changed |= xml_set_content (cur, &account->smime_encrypt_key);
- break;
- }
- }
- }
- }
- }
-
- xmlFreeDoc (doc);
-
- return changed;
-}
-
-
-/**
- * e_account_import:
- * @dest: destination account object
- * @src: source account object
- *
- * Import the settings from @src to @dest.
- **/
-void
-e_account_import (EAccount *dest, EAccount *src)
-{
- g_free (dest->name);
- dest->name = g_strdup (src->name);
-
- dest->enabled = src->enabled;
-
- g_free (dest->id->name);
- dest->id->name = g_strdup (src->id->name);
- g_free (dest->id->address);
- dest->id->address = g_strdup (src->id->address);
- g_free (dest->id->reply_to);
- dest->id->reply_to = g_strdup (src->id->reply_to);
- g_free (dest->id->organization);
- dest->id->organization = g_strdup (src->id->organization);
- dest->id->def_signature = src->id->def_signature;
- dest->id->auto_signature = src->id->auto_signature;
-
- g_free (dest->source->url);
- dest->source->url = g_strdup (src->source->url);
- dest->source->keep_on_server = src->source->keep_on_server;
- dest->source->auto_check = src->source->auto_check;
- dest->source->auto_check_time = src->source->auto_check_time;
- dest->source->save_passwd = src->source->save_passwd;
-
- g_free (dest->transport->url);
- dest->transport->url = g_strdup (src->transport->url);
- dest->transport->save_passwd = src->transport->save_passwd;
-
- g_free (dest->drafts_folder_uri);
- dest->drafts_folder_uri = g_strdup (src->drafts_folder_uri);
-
- g_free (dest->sent_folder_uri);
- dest->sent_folder_uri = g_strdup (src->sent_folder_uri);
-
- dest->always_cc = src->always_cc;
- g_free (dest->cc_addrs);
- dest->cc_addrs = g_strdup (src->cc_addrs);
-
- dest->always_bcc = src->always_bcc;
- g_free (dest->bcc_addrs);
- dest->bcc_addrs = g_strdup (src->bcc_addrs);
-
- g_free (dest->pgp_key);
- dest->pgp_key = g_strdup (src->pgp_key);
- dest->pgp_encrypt_to_self = src->pgp_encrypt_to_self;
- dest->pgp_always_sign = src->pgp_always_sign;
- dest->pgp_no_imip_sign = src->pgp_no_imip_sign;
- dest->pgp_always_trust = src->pgp_always_trust;
-
- dest->smime_sign_default = src->smime_sign_default;
- g_free (dest->smime_sign_key);
- dest->smime_sign_key = g_strdup (src->smime_sign_key);
-
- dest->smime_encrypt_default = src->smime_encrypt_default;
- dest->smime_encrypt_to_self = src->smime_encrypt_to_self;
- g_free (dest->smime_encrypt_key);
- dest->smime_encrypt_key = g_strdup (src->smime_encrypt_key);
-}
-
-
-/**
- * e_account_to_xml:
- * @account: an #EAccount
- *
- * Return value: an XML representation of @account, which the caller
- * must free.
- **/
-char *
-e_account_to_xml (EAccount *account)
-{
- xmlNodePtr root, node, id, src, xport;
- char *tmp, buf[20];
- xmlChar *xmlbuf;
- xmlDocPtr doc;
- int n;
-
- doc = xmlNewDoc ("1.0");
-
- root = xmlNewDocNode (doc, NULL, "account", NULL);
- xmlDocSetRootElement (doc, root);
-
- xmlSetProp (root, "name", account->name);
- xmlSetProp (root, "uid", account->uid);
- xmlSetProp (root, "enabled", account->enabled ? "true" : "false");
-
- id = xmlNewChild (root, NULL, "identity", NULL);
- if (account->id->name)
- xmlNewTextChild (id, NULL, "name", account->id->name);
- if (account->id->address)
- xmlNewTextChild (id, NULL, "addr-spec", account->id->address);
- if (account->id->reply_to)
- xmlNewTextChild (id, NULL, "reply-to", account->id->reply_to);
- if (account->id->organization)
- xmlNewTextChild (id, NULL, "organization", account->id->organization);
-
- node = xmlNewChild (id, NULL, "signature",NULL);
- xmlSetProp (node, "auto", account->id->auto_signature ? "true" : "false");
- sprintf (buf, "%d", account->id->def_signature);
- xmlSetProp (node, "default", buf);
-
- src = xmlNewChild (root, NULL, "source", NULL);
- xmlSetProp (src, "save-passwd", account->source->save_passwd ? "true" : "false");
- xmlSetProp (src, "keep-on-server", account->source->keep_on_server ? "true" : "false");
- xmlSetProp (src, "auto-check", account->source->auto_check ? "true" : "false");
- sprintf (buf, "%d", account->source->auto_check_time);
- xmlSetProp (src, "auto-check-timeout", buf);
- if (account->source->url)
- xmlNewTextChild (src, NULL, "url", account->source->url);
-
- xport = xmlNewChild (root, NULL, "transport", NULL);
- xmlSetProp (xport, "save-passwd", account->transport->save_passwd ? "true" : "false");
- if (account->transport->url)
- xmlNewTextChild (xport, NULL, "url", account->transport->url);
-
- xmlNewTextChild (root, NULL, "drafts-folder", account->drafts_folder_uri);
- xmlNewTextChild (root, NULL, "sent-folder", account->sent_folder_uri);
-
- node = xmlNewChild (root, NULL, "auto-cc", NULL);
- xmlSetProp (node, "always", account->always_cc ? "true" : "false");
- if (account->cc_addrs)
- xmlNewTextChild (node, NULL, "recipients", account->cc_addrs);
-
- node = xmlNewChild (root, NULL, "auto-bcc", NULL);
- xmlSetProp (node, "always", account->always_bcc ? "true" : "false");
- if (account->bcc_addrs)
- xmlNewTextChild (node, NULL, "recipients", account->bcc_addrs);
-
- node = xmlNewChild (root, NULL, "pgp", NULL);
- xmlSetProp (node, "encrypt-to-self", account->pgp_encrypt_to_self ? "true" : "false");
- xmlSetProp (node, "always-trust", account->pgp_always_trust ? "true" : "false");
- xmlSetProp (node, "always-sign", account->pgp_always_sign ? "true" : "false");
- xmlSetProp (node, "no-imip-sign", account->pgp_no_imip_sign ? "true" : "false");
- if (account->pgp_key)
- xmlNewTextChild (node, NULL, "key-id", account->pgp_key);
-
- node = xmlNewChild (root, NULL, "smime", NULL);
- xmlSetProp (node, "sign-default", account->smime_sign_default ? "true" : "false");
- xmlSetProp (node, "encrypt-default", account->smime_encrypt_default ? "true" : "false");
- xmlSetProp (node, "encrypt-to-self", account->smime_encrypt_to_self ? "true" : "false");
- if (account->smime_sign_key)
- xmlNewTextChild (node, NULL, "sign-key-id", account->smime_sign_key);
- if (account->smime_encrypt_key)
- xmlNewTextChild (node, NULL, "encrypt-key-id", account->smime_encrypt_key);
-
- xmlDocDumpMemory (doc, &xmlbuf, &n);
- xmlFreeDoc (doc);
-
- /* remap to glib memory */
- tmp = g_malloc (n + 1);
- memcpy (tmp, xmlbuf, n);
- tmp[n] = '\0';
- xmlFree (xmlbuf);
-
- return tmp;
-}
-
-
-/**
- * e_account_uid_from_xml:
- * @xml: an XML account description
- *
- * Return value: the permanent UID of the account described by @xml
- * (or %NULL if @xml could not be parsed or did not contain a uid).
- * The caller must free this string.
- **/
-char *
-e_account_uid_from_xml (const char *xml)
-{
- xmlNodePtr node;
- xmlDocPtr doc;
- char *uid = NULL;
-
- if (!(doc = xmlParseDoc ((char *)xml)))
- return NULL;
-
- node = doc->children;
- if (strcmp (node->name, "account") != 0) {
- xmlFreeDoc (doc);
- return NULL;
- }
-
- xml_set_prop (node, "uid", &uid);
- xmlFreeDoc (doc);
-
- return uid;
-}
diff --git a/e-util/e-account.h b/e-util/e-account.h
deleted file mode 100644
index e50c773991..0000000000
--- a/e-util/e-account.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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_ACCOUNT__
-#define __E_ACCOUNT__
-
-#include <glib-object.h>
-
-#define E_TYPE_ACCOUNT (e_account_get_type ())
-#define E_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_ACCOUNT, EAccount))
-#define E_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_ACCOUNT, EAccountClass))
-#define E_IS_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_ACCOUNT))
-#define E_IS_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_ACCOUNT))
-
-typedef struct {
- char *name;
- char *address;
- char *reply_to;
- char *organization;
-
- int def_signature;
- gboolean auto_signature;
-} EAccountIdentity;
-
-typedef struct {
- char *url;
- gboolean keep_on_server;
- gboolean auto_check;
- int auto_check_time;
- gboolean save_passwd;
-} EAccountService;
-
-
-typedef struct {
- GObject parent_object;
-
- char *name;
- char *uid;
-
- gboolean enabled;
-
- EAccountIdentity *id;
- EAccountService *source;
- EAccountService *transport;
-
- char *drafts_folder_uri, *sent_folder_uri;
-
- gboolean always_cc;
- char *cc_addrs;
- gboolean always_bcc;
- char *bcc_addrs;
-
- char *pgp_key;
- gboolean pgp_encrypt_to_self;
- gboolean pgp_always_sign;
- gboolean pgp_no_imip_sign;
- gboolean pgp_always_trust;
-
- char *smime_sign_key;
- char *smime_encrypt_key;
- gboolean smime_sign_default;
- gboolean smime_encrypt_to_self;
- gboolean smime_encrypt_default;
-} EAccount;
-
-typedef struct {
- GObjectClass parent_class;
-
-} EAccountClass;
-
-
-GType e_account_get_type (void);
-
-EAccount *e_account_new (void);
-
-EAccount *e_account_new_from_xml (const char *xml);
-
-gboolean e_account_set_from_xml (EAccount *account,
- const char *xml);
-
-void e_account_import (EAccount *dest,
- EAccount *src);
-
-char *e_account_to_xml (EAccount *account);
-
-
-char *e_account_uid_from_xml (const char *xml);
-
-
-#endif /* __E_ACCOUNT__ */
diff --git a/e-util/e-bit-array.c b/e-util/e-bit-array.c
deleted file mode 100644
index bb98a3f465..0000000000
--- a/e-util/e-bit-array.c
+++ /dev/null
@@ -1,429 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-bit-array.c
- * Copyright 2000, 2001, Ximian, Inc.
- *
- * Authors:
- * Chris Lahey <clahey@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, version 2, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#include <config.h>
-#include <gtk/gtksignal.h>
-#include "e-bit-array.h"
-#include "gal/util/e-util.h"
-
-#define PARENT_TYPE G_TYPE_OBJECT
-
-#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 GObjectClass *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(guint32, 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(guint32, eba->data, eba->bit_count >> 5);
- }
- if (move_selection_mode && selected && eba->bit_count > 0) {
- e_bit_array_select_single_row (eba, row == eba->bit_count ? row - 1 : row);
- }
- }
-}
-
-/* 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_dispose (GObject *object)
-{
- EBitArray *eba;
-
- eba = E_BIT_ARRAY (object);
-
- if (eba->data)
- g_free(eba->data);
- eba->data = NULL;
-
- if (G_OBJECT_CLASS (parent_class)->dispose)
- (* G_OBJECT_CLASS (parent_class)->dispose) (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 (guint32, (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 (guint32, (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(guint32, (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)
-{
- GObjectClass *object_class;
-
- parent_class = g_type_class_ref (PARENT_TYPE);
-
- object_class = G_OBJECT_CLASS(klass);
-
- object_class->dispose = eba_dispose;
-}
-
-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 = g_object_new (E_BIT_ARRAY_TYPE, NULL);
- eba->bit_count = count;
- eba->data = g_new0(guint32, (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 ebfe644da6..0000000000
--- a/e-util/e-bit-array.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-bit-array.h
- * Copyright 2000, 2001, Ximian, Inc.
- *
- * Authors:
- * Chris Lahey <clahey@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, version 2, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef _E_BIT_ARRAY_H_
-#define _E_BIT_ARRAY_H_
-
-#include <glib-object.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#define E_BIT_ARRAY_TYPE (e_bit_array_get_type ())
-#define E_BIT_ARRAY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_BIT_ARRAY_TYPE, EBitArray))
-#define E_BIT_ARRAY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), E_BIT_ARRAY_TYPE, EBitArrayClass))
-#define E_IS_BIT_ARRAY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_BIT_ARRAY_TYPE))
-#define E_IS_BIT_ARRAY_CLASS(k) (G_TYPE_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 {
- GObject base;
-
- gint bit_count;
- guint32 *data;
-} EBitArray;
-
-typedef struct {
- GObjectClass parent_class;
-} EBitArrayClass;
-
-
-GType 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-categories-config.c b/e-util/e-categories-config.c
deleted file mode 100644
index e5e4c0592e..0000000000
--- a/e-util/e-categories-config.c
+++ /dev/null
@@ -1,202 +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 <string.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnome/gnome-i18n.h>
-#include <gdk-pixbuf/gdk-pixbuf.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.
- */
-gboolean
-e_categories_config_get_icon_for (const char *category, GdkPixmap **pixmap, GdkBitmap **mask)
-{
- char *icon_file;
- GdkPixbuf *pixbuf;
- GdkBitmap *tmp_mask;
-
- g_return_val_if_fail (pixmap != NULL, FALSE);
-
- icon_file = (char *) e_categories_config_get_icon_file_for (category);
- if (!icon_file) {
- *pixmap = NULL;
- if (mask != NULL)
- *mask = NULL;
- return FALSE;
- }
-
- /* 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, NULL);
- if (!pixbuf) {
- *pixmap = NULL;
- if (mask != NULL)
- *mask = NULL;
- return FALSE;
- }
-
- 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;
-
- return TRUE;
-}
-
-/**
- * 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)
-{
- GtkDialog *dialog;
- const char *text;
- char *categories;
- int result;
-
- g_return_if_fail (entry != NULL);
- g_return_if_fail (GTK_IS_ENTRY (entry));
-
- if (!initialized)
- initialize_categories_config ();
-
- text = gtk_entry_get_text (GTK_ENTRY (entry));
- dialog = GTK_DIALOG (e_categories_new (text));
-
- g_object_set (dialog, "ecml", ecmlw, NULL);
-
- /* run the dialog */
- result = gtk_dialog_run (dialog);
-
- if (result == GTK_RESPONSE_OK) {
- g_object_get (dialog, "categories", &categories, NULL);
- 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 3af14dfc7f..0000000000
--- a/e-util/e-categories-config.h
+++ /dev/null
@@ -1,34 +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>
-
-G_BEGIN_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);
-
-gboolean 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);
-
-G_END_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 9e45199877..0000000000
--- a/e-util/e-categories-master-list-wombat.c
+++ /dev/null
@@ -1,183 +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 "e-config-listener.h"
-
-#include <libxml/tree.h>
-#include <libxml/parser.h>
-
-#define PARENT_TYPE e_categories_master_list_array_get_type ()
-
-#define d(x)
-
-struct _ECategoriesMasterListWombatPriv {
- EConfigListener *listener;
- guint listener_id;
-};
-
-static ECategoriesMasterListArrayClass *parent_class;
-
-static void
-ecmlw_load (ECategoriesMasterListWombat *ecmlw)
-{
- char *string;
- gboolean def;
-
- string = e_config_listener_get_string_with_default (ecmlw->priv->listener,
- "/apps/evolution/general/category_master_list",
- 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;
-
- string = e_categories_master_list_array_to_string (E_CATEGORIES_MASTER_LIST_ARRAY (ecmlw));
-
- d(g_print ("save: %s\n", string));
-
- e_config_listener_set_string (ecmlw->priv->listener,
- "/apps/evolution/general/category_master_list",
- string);
-
- 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_dispose (GObject *object)
-{
- ECategoriesMasterListWombat *ecmlw = E_CATEGORIES_MASTER_LIST_WOMBAT (object);
-
- if (ecmlw->priv) {
- /* remove the listener */
- g_signal_handler_disconnect (ecmlw->priv->listener,
- ecmlw->priv->listener_id);
-
- g_object_unref (ecmlw->priv->listener);
-
- g_free (ecmlw->priv);
- ecmlw->priv = NULL;
- }
-
- if (G_OBJECT_CLASS (parent_class)->dispose)
- (* G_OBJECT_CLASS (parent_class)->dispose) (object);
-}
-
-
-static void
-ecmlw_class_init (GObjectClass *object_class)
-{
- ECategoriesMasterListClass *ecml_class = E_CATEGORIES_MASTER_LIST_CLASS(object_class);
-
- parent_class = g_type_class_ref (PARENT_TYPE);
-
- ecml_class->commit = ecmlw_commit;
-
- ecml_class->reset = ecmlw_reset ;
-
- object_class->dispose = ecmlw_dispose;
-}
-
-static void
-property_change_cb (EConfigListener *listener,
- char *key,
- gpointer user_data)
-{
- ecmlw_load (user_data);
-}
-
-static void
-ecmlw_init (ECategoriesMasterListWombat *ecmlw)
-{
- ecmlw->priv = g_new (ECategoriesMasterListWombatPriv, 1);
- ecmlw->priv->listener = e_config_listener_new ();
-
- /* add a listener */
- ecmlw->priv->listener_id =
- g_signal_connect (ecmlw->priv->listener,
- "key_changed",
- G_CALLBACK (property_change_cb),
- ecmlw);
-
- ecmlw_load (ecmlw);
-}
-
-GType
-e_categories_master_list_wombat_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (ECategoriesMasterListWombatClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) ecmlw_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (ECategoriesMasterListWombat),
- 0, /* n_preallocs */
- (GInstanceInitFunc) ecmlw_init,
- };
-
- type = g_type_register_static (PARENT_TYPE, "ECategoriesMasterListWombat", &info, 0);
- }
-
- return type;
-}
-
-ECategoriesMasterList *
-e_categories_master_list_wombat_new (void)
-{
- return E_CATEGORIES_MASTER_LIST (g_object_new (E_TYPE_CATEGORIES_MASTER_LIST_WOMBAT, NULL));
-}
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 024d7644e7..0000000000
--- a/e-util/e-categories-master-list-wombat.h
+++ /dev/null
@@ -1,31 +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>
-
-G_BEGIN_DECLS
-
-#define E_TYPE_CATEGORIES_MASTER_LIST_WOMBAT (e_categories_master_list_wombat_get_type ())
-#define E_CATEGORIES_MASTER_LIST_WOMBAT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_TYPE_CATEGORIES_MASTER_LIST_WOMBAT, ECategoriesMasterListWombat))
-#define E_CATEGORIES_MASTER_LIST_WOMBAT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), E_TYPE_CATEGORIES_MASTER_LIST_WOMBAT, ECategoriesMasterListWombatClass))
-#define E_IS_CATEGORIES_MASTER_LIST_WOMBAT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_TYPE_CATEGORIES_MASTER_LIST_WOMBAT))
-#define E_IS_CATEGORIES_MASTER_LIST_WOMBAT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_TYPE_CATEGORIES_MASTER_LIST_WOMBAT))
-
-typedef struct _ECategoriesMasterListWombatPriv ECategoriesMasterListWombatPriv;
-
-typedef struct {
- ECategoriesMasterListArray base;
- ECategoriesMasterListWombatPriv *priv;
-} ECategoriesMasterListWombat;
-
-typedef struct {
- ECategoriesMasterListArrayClass parent_class;
-} ECategoriesMasterListWombatClass;
-
-GType e_categories_master_list_wombat_get_type (void);
-ECategoriesMasterList *e_categories_master_list_wombat_new (void);
-
-G_END_DECLS
-
-#endif /* _E_CATEGORIES_MASTER_LIST_WOMBAT_H_ */
diff --git a/e-util/e-component-listener.c b/e-util/e-component-listener.c
deleted file mode 100644
index 1e7027f33d..0000000000
--- a/e-util/e-component-listener.c
+++ /dev/null
@@ -1,171 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Component listener.
- *
- * Author:
- * Rodrigo Moya <rodrigo@ximian.com>
- *
- * Copyright 2002, Ximian, Inc.
- */
-
-#include <bonobo/bonobo-exception.h>
-#include <bonobo/bonobo-object.h>
-#include "e-component-listener.h"
-#include <libgnome/gnome-i18n.h>
-
-#define PARENT_TYPE GTK_TYPE_OBJECT
-
-struct _EComponentListenerPrivate {
- Bonobo_Unknown component;
-};
-
-static void e_component_listener_class_init (EComponentListenerClass *klass);
-static void e_component_listener_init (EComponentListener *cl, EComponentListenerClass *klass);
-static void e_component_listener_finalize (GObject *object);
-
-static GObjectClass *parent_class = NULL;
-static GList *watched_connections = NULL;
-
-enum {
- COMPONENT_DIED,
- LAST_SIGNAL
-};
-
-static guint comp_listener_signals[LAST_SIGNAL];
-
-static void
-connection_listen_cb (gpointer object, gpointer user_data)
-{
- GList *l, *next = NULL;
- EComponentListener *cl;
-
- for (l = watched_connections; l != NULL; l = next) {
- next = l->next;
- cl = l->data;
-
- switch (ORBit_small_get_connection_status (cl->priv->component)) {
- case ORBIT_CONNECTION_DISCONNECTED :
- watched_connections = g_list_delete_link (watched_connections, l);
-
- g_object_ref (cl);
- g_signal_emit (cl, comp_listener_signals[COMPONENT_DIED], 0);
- cl->priv->component = CORBA_OBJECT_NIL;
- g_object_unref (cl);
- break;
- default :
- break;
- }
- }
-}
-
-static void
-e_component_listener_class_init (EComponentListenerClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_peek_parent (klass);
-
- object_class->finalize = e_component_listener_finalize;
- klass->component_died = NULL;
-
- comp_listener_signals[COMPONENT_DIED] =
- g_signal_new ("component_died",
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (EComponentListenerClass, component_died),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-}
-
-static void
-e_component_listener_init (EComponentListener *cl, EComponentListenerClass *klass)
-{
- /* allocate internal structure */
- cl->priv = g_new (EComponentListenerPrivate, 1);
- cl->priv->component = CORBA_OBJECT_NIL;
-}
-
-static void
-e_component_listener_finalize (GObject *object)
-{
- EComponentListener *cl = (EComponentListener *) object;
-
- g_return_if_fail (E_IS_COMPONENT_LISTENER (cl));
-
- watched_connections = g_list_remove (watched_connections, cl);
-
- if (cl->priv->component != CORBA_OBJECT_NIL)
- cl->priv->component = CORBA_OBJECT_NIL;
-
- /* free memory */
- g_free (cl->priv);
- cl->priv = NULL;
-
- if (G_OBJECT_CLASS (parent_class)->finalize)
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
-}
-
-GType
-e_component_listener_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static GTypeInfo info = {
- sizeof (EComponentListenerClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) e_component_listener_class_init,
- NULL, NULL,
- sizeof (EComponentListener),
- 0,
- (GInstanceInitFunc) e_component_listener_init
- };
- type = g_type_register_static (G_TYPE_OBJECT, "EComponentListener", &info, 0);
- }
-
- return type;
-}
-
-/**
- * e_component_listener_new
- * @comp: Component to listen for.
- *
- * Create a new #EComponentListener object, which allows to listen
- * for a given component and get notified when that component dies.
- *
- * Returns: a component listener object.
- */
-EComponentListener *
-e_component_listener_new (Bonobo_Unknown comp)
-{
- EComponentListener *cl;
-
- g_return_val_if_fail (comp != NULL, NULL);
-
- cl = g_object_new (E_COMPONENT_LISTENER_TYPE, NULL);
- cl->priv->component = comp;
-
- /* watch the connection */
- ORBit_small_listen_for_broken (comp, G_CALLBACK (connection_listen_cb), cl);
- watched_connections = g_list_prepend (watched_connections, cl);
-
- return cl;
-}
-
-Bonobo_Unknown
-e_component_listener_get_component (EComponentListener *cl)
-{
- g_return_val_if_fail (E_IS_COMPONENT_LISTENER (cl), CORBA_OBJECT_NIL);
- return cl->priv->component;
-}
-
-void
-e_component_listener_set_component (EComponentListener *cl, Bonobo_Unknown comp)
-{
- g_return_if_fail (E_IS_COMPONENT_LISTENER (cl));
-
- cl->priv->component = comp;
- ORBit_small_listen_for_broken (comp, G_CALLBACK (connection_listen_cb), cl);
-}
diff --git a/e-util/e-component-listener.h b/e-util/e-component-listener.h
deleted file mode 100644
index 3f5694ecd0..0000000000
--- a/e-util/e-component-listener.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Component listener
- *
- * Author:
- * Rodrigo Moya <rodrigo@ximian.com>
- *
- * Copyright 2002, Ximian, Inc.
- */
-
-#ifndef __E_COMPONENT_LISTENER_H__
-#define __E_COMPONENT_LISTENER_H__
-
-#include <glib-object.h>
-#include <bonobo/Bonobo.h>
-
-G_BEGIN_DECLS
-
-#define E_COMPONENT_LISTENER_TYPE (e_component_listener_get_type ())
-#define E_COMPONENT_LISTENER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_COMPONENT_LISTENER_TYPE, EComponentListener))
-#define E_COMPONENT_LISTENER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), E_COMPONENT_LISTENER_TYPE, EComponentListenerClass))
-#define E_IS_COMPONENT_LISTENER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_COMPONENT_LISTENER_TYPE))
-#define E_IS_COMPONENT_LISTENER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_COMPONENT_LISTENER_TYPE))
-
-typedef struct _EComponentListenerPrivate EComponentListenerPrivate;
-
-typedef struct {
- GObject object;
- EComponentListenerPrivate *priv;
-} EComponentListener;
-
-typedef struct {
- GObjectClass parent_class;
-
- void (* component_died) (EComponentListener *cl);
-} EComponentListenerClass;
-
-GType e_component_listener_get_type (void);
-EComponentListener *e_component_listener_new (Bonobo_Unknown comp);
-
-Bonobo_Unknown e_component_listener_get_component (EComponentListener *cl);
-void e_component_listener_set_component (EComponentListener *cl,
- Bonobo_Unknown comp);
-
-G_END_DECLS
-
-#endif
diff --git a/e-util/e-config-listener.c b/e-util/e-config-listener.c
deleted file mode 100644
index ecc1b45fce..0000000000
--- a/e-util/e-config-listener.c
+++ /dev/null
@@ -1,607 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Configuration component listener
- *
- * Author:
- * Rodrigo Moya <rodrigo@ximian.com>
- *
- * Copyright 2002, Ximian, Inc.
- */
-
-#include <string.h>
-#include <gconf/gconf-client.h>
-#include "e-config-listener.h"
-
-#define PARENT_TYPE G_TYPE_OBJECT
-
-typedef struct {
- EConfigListener *cl;
- guint lid;
- char *key;
- GConfValueType type;
- union {
- gboolean v_bool;
- float v_float;
- long v_long;
- char *v_str;
- } value;
- gboolean used_default;
-} KeyData;
-
-struct _EConfigListenerPrivate {
- GConfClient *db;
- GHashTable *keys;
-};
-
-static void e_config_listener_class_init (EConfigListenerClass *klass);
-static void e_config_listener_init (EConfigListener *cl, EConfigListenerClass *klass);
-static void e_config_listener_finalize (GObject *object);
-
-static GObjectClass *parent_class = NULL;
-
-enum {
- KEY_CHANGED,
- LAST_SIGNAL
-};
-
-static guint config_listener_signals[LAST_SIGNAL];
-
-static void
-e_config_listener_class_init (EConfigListenerClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_peek_parent (klass);
-
- object_class->finalize = e_config_listener_finalize;
- klass->key_changed = NULL;
-
- config_listener_signals[KEY_CHANGED] =
- g_signal_new ("key_changed",
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (EConfigListenerClass, key_changed),
- NULL, NULL,
- g_cclosure_marshal_VOID__STRING,
- G_TYPE_NONE, 1, G_TYPE_STRING);
-
- /* make sure GConf is initialized */
- if (!gconf_is_initialized ())
- gconf_init (0, NULL, NULL);
-}
-
-static void
-e_config_listener_init (EConfigListener *cl, EConfigListenerClass *klass)
-{
- /* allocate internal structure */
- cl->priv = g_new0 (EConfigListenerPrivate, 1);
-
- cl->priv->keys = g_hash_table_new (g_str_hash, g_str_equal);
- cl->priv->db = gconf_client_get_default ();
-}
-
-static void
-free_key_hash (gpointer key, gpointer value, gpointer user_data)
-{
- KeyData *kd = (KeyData *) value;
-
- g_return_if_fail (kd != NULL);
-
- gconf_client_notify_remove (kd->cl->priv->db, kd->lid);
-
- g_free (kd->key);
- switch (kd->type) {
- case GCONF_VALUE_STRING :
- g_free (kd->value.v_str);
- break;
- default :
- break;
- }
-
- g_free (kd);
-}
-
-static void
-e_config_listener_finalize (GObject *object)
-{
- EConfigListener *cl = (EConfigListener *) object;
-
- g_return_if_fail (E_IS_CONFIG_LISTENER (cl));
-
- g_hash_table_foreach (cl->priv->keys, (GHFunc) free_key_hash, NULL);
- g_hash_table_destroy (cl->priv->keys);
- cl->priv->keys = NULL;
-
- if (cl->priv->db != NULL) {
- g_object_unref (G_OBJECT (cl->priv->db));
- cl->priv->db = NULL;
- }
-
- g_free (cl->priv);
- cl->priv = NULL;
-
- if (G_OBJECT_CLASS (parent_class)->finalize)
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
-}
-
-GType
-e_config_listener_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (EConfigListenerClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) e_config_listener_class_init,
- NULL,
- NULL,
- sizeof (EConfigListener),
- 0,
- (GInstanceInitFunc) e_config_listener_init
- };
- type = g_type_register_static (PARENT_TYPE, "EConfigListener", &info, 0);
- }
-
- return type;
-}
-
-/**
- * e_config_listener_new
- *
- * Create a new configuration listener, which is an object which
- * allows to listen for changes in the configuration database. It keeps
- * an updated copy of all requested configuration entries, so that
- * access is much quicker and instantaneous.
- *
- * Returns: the newly created listener.
- */
-EConfigListener *
-e_config_listener_new (void)
-{
- EConfigListener *cl;
-
- cl = g_object_new (E_CONFIG_LISTENER_TYPE, NULL);
- return cl;
-}
-
-static void
-property_change_cb (GConfEngine *engine,
- guint cnxn_id,
- GConfEntry *entry,
- gpointer user_data)
-{
- KeyData *kd = (KeyData *) user_data;
-
- g_return_if_fail (entry != NULL);
- g_return_if_fail (kd != NULL);
-
- /* free previous value */
- if (kd->type == GCONF_VALUE_STRING)
- g_free (kd->value.v_str);
-
- /* set new value */
- if (entry->value->type == GCONF_VALUE_BOOL) {
- kd->type = GCONF_VALUE_BOOL;
- kd->value.v_bool = gconf_value_get_bool (entry->value);
- } else if (entry->value->type == GCONF_VALUE_FLOAT) {
- kd->type = GCONF_VALUE_FLOAT;
- kd->value.v_float = gconf_value_get_float (entry->value);
- } else if (entry->value->type == GCONF_VALUE_INT) {
- kd->type = GCONF_VALUE_INT;
- kd->value.v_long = gconf_value_get_int (entry->value);
- } else if (entry->value->type == GCONF_VALUE_STRING) {
- kd->type = GCONF_VALUE_STRING;
- kd->value.v_str = g_strdup (gconf_value_get_string (entry->value));
- } else
- return;
-
- g_signal_emit (G_OBJECT (kd->cl), config_listener_signals[KEY_CHANGED], 0, kd->key);
-}
-
-static KeyData *
-add_key (EConfigListener *cl, const char *key, GConfValueType type,
- gpointer value, gboolean used_default)
-{
- KeyData *kd;
-
- /* add the key to our hash table */
- kd = g_new0 (KeyData, 1);
- kd->cl = cl;
- kd->key = g_strdup (key);
- kd->type = type;
- switch (type) {
- case GCONF_VALUE_BOOL :
- memcpy (&kd->value.v_bool, value, sizeof (gboolean));
- break;
- case GCONF_VALUE_FLOAT :
- memcpy (&kd->value.v_float, value, sizeof (float));
- break;
- case GCONF_VALUE_INT :
- memcpy (&kd->value.v_long, value, sizeof (long));
- break;
- case GCONF_VALUE_STRING :
- kd->value.v_str = g_strdup ((const char *) value);
- break;
- default :
- break;
- }
-
- kd->used_default = used_default;
-
- /* add the listener for changes */
- gconf_client_add_dir (cl->priv->db, key, GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
- kd->lid = gconf_client_notify_add (cl->priv->db, key,
- (GConfClientNotifyFunc) property_change_cb,
- kd, NULL, NULL);
-
- g_hash_table_insert (cl->priv->keys, kd->key, kd);
-
- return kd;
-}
-
-gboolean
-e_config_listener_get_boolean (EConfigListener *cl, const char *key)
-{
- return e_config_listener_get_boolean_with_default (cl, key, FALSE, NULL);
-}
-
-gboolean
-e_config_listener_get_boolean_with_default (EConfigListener *cl,
- const char *key,
- gboolean def,
- gboolean *used_default)
-{
- GConfValue *conf_value;
- gboolean value;
- KeyData *kd;
- gpointer orig_key, orig_value;
-
- g_return_val_if_fail (E_IS_CONFIG_LISTENER (cl), FALSE);
- g_return_val_if_fail (key != NULL, FALSE);
-
- /* search for the key in our hash table */
- if (!g_hash_table_lookup_extended (cl->priv->keys, key, &orig_key, &orig_value)) {
- /* not found, so retrieve it from the configuration database */
- conf_value = gconf_client_get (cl->priv->db, key, NULL);
- if (conf_value) {
- value = gconf_value_get_bool (conf_value);
- kd = add_key (cl, key, GCONF_VALUE_BOOL, &value, FALSE);
- gconf_value_free (conf_value);
-
- if (used_default != NULL)
- *used_default = FALSE;
- } else {
- value = def;
- kd = add_key (cl, key, GCONF_VALUE_BOOL, &def, TRUE);
-
- if (used_default != NULL)
- *used_default = TRUE;
- }
- } else {
- kd = (KeyData *) orig_value;
- g_assert (kd != NULL);
-
- if (kd->type == GCONF_VALUE_BOOL) {
- value = kd->value.v_bool;
- if (used_default != NULL)
- *used_default = kd->used_default;
- } else
- return FALSE;
- }
-
- return value;
-}
-
-float
-e_config_listener_get_float (EConfigListener *cl, const char *key)
-{
- return e_config_listener_get_float_with_default (cl, key, 0.0, NULL);
-}
-
-float
-e_config_listener_get_float_with_default (EConfigListener *cl,
- const char *key,
- float def,
- gboolean *used_default)
-{
- GConfValue *conf_value;
- float value;
- KeyData *kd;
- gpointer orig_key, orig_value;
-
- g_return_val_if_fail (E_IS_CONFIG_LISTENER (cl), -1);
- g_return_val_if_fail (key != NULL, -1);
-
- /* search for the key in our hash table */
- if (!g_hash_table_lookup_extended (cl->priv->keys, key, &orig_key, &orig_value)) {
- /* not found, so retrieve it from the configuration database */
- conf_value = gconf_client_get (cl->priv->db, key, NULL);
- if (conf_value) {
- value = gconf_value_get_float (conf_value);
- kd = add_key (cl, key, GCONF_VALUE_FLOAT, &value, FALSE);
- gconf_value_free (conf_value);
-
- if (used_default != NULL)
- *used_default = FALSE;
- } else {
- value = def;
- kd = add_key (cl, key, GCONF_VALUE_FLOAT, &def, TRUE);
-
- if (used_default != NULL)
- *used_default = TRUE;
- }
- } else {
- kd = (KeyData *) orig_value;
- g_assert (kd != NULL);
-
- if (kd->type == GCONF_VALUE_FLOAT) {
- value = kd->value.v_float;
- if (used_default != NULL)
- *used_default = kd->used_default;
- } else
- return -1;
- }
-
- return value;
-}
-
-long
-e_config_listener_get_long (EConfigListener *cl, const char *key)
-{
- return e_config_listener_get_long_with_default (cl, key, 0, NULL);
-}
-
-long
-e_config_listener_get_long_with_default (EConfigListener *cl,
- const char *key,
- long def,
- gboolean *used_default)
-{
- GConfValue *conf_value;
- long value;
- KeyData *kd;
- gpointer orig_key, orig_value;
-
- g_return_val_if_fail (E_IS_CONFIG_LISTENER (cl), -1);
- g_return_val_if_fail (key != NULL, -1);
-
- /* search for the key in our hash table */
- if (!g_hash_table_lookup_extended (cl->priv->keys, key, &orig_key, &orig_value)) {
- /* not found, so retrieve it from the configuration database */
- conf_value = gconf_client_get (cl->priv->db, key, NULL);
- if (conf_value) {
- value = gconf_value_get_int (conf_value);
- kd = add_key (cl, key, GCONF_VALUE_INT, &value, FALSE);
- gconf_value_free (conf_value);
-
- if (used_default != NULL)
- *used_default = FALSE;
- } else {
- value = def;
- kd = add_key (cl, key, GCONF_VALUE_INT, &def, TRUE);
-
- if (used_default != NULL)
- *used_default = TRUE;
- }
- } else {
- kd = (KeyData *) orig_value;
- g_assert (kd != NULL);
-
- if (kd->type == GCONF_VALUE_INT) {
- value = kd->value.v_long;
- if (used_default != NULL)
- *used_default = kd->used_default;
- } else
- return -1;
- }
-
- return value;
-}
-
-char *
-e_config_listener_get_string (EConfigListener *cl, const char *key)
-{
- return e_config_listener_get_string_with_default (cl, key, NULL, NULL);
-}
-
-char *
-e_config_listener_get_string_with_default (EConfigListener *cl,
- const char *key,
- const char *def,
- gboolean *used_default)
-{
- GConfValue *conf_value;
- char *str;
- KeyData *kd;
- gpointer orig_key, orig_value;
-
- g_return_val_if_fail (E_IS_CONFIG_LISTENER (cl), NULL);
- g_return_val_if_fail (key != NULL, NULL);
-
- /* search for the key in our hash table */
- if (!g_hash_table_lookup_extended (cl->priv->keys, key, &orig_key, &orig_value)) {
- /* not found, so retrieve it from the configuration database */
- conf_value = gconf_client_get (cl->priv->db, key, NULL);
- if (conf_value) {
- str = g_strdup (gconf_value_get_string (conf_value));
- kd = add_key (cl, key, GCONF_VALUE_STRING, (gpointer) str, FALSE);
- gconf_value_free (conf_value);
-
- if (used_default != NULL)
- *used_default = FALSE;
- } else {
- str = g_strdup (def);
- kd = add_key (cl, key, GCONF_VALUE_STRING, (gpointer) str, TRUE);
-
- if (used_default != NULL)
- *used_default = TRUE;
- }
- } else {
- kd = (KeyData *) orig_value;
- g_assert (kd != NULL);
-
- if (kd->type == GCONF_VALUE_STRING) {
- str = g_strdup (kd->value.v_str);
- if (used_default != NULL)
- *used_default = kd->used_default;
- } else
- return NULL;
- }
-
- return str;
-}
-
-void
-e_config_listener_set_boolean (EConfigListener *cl, const char *key, gboolean value)
-{
- KeyData *kd;
- GError *err = NULL;
-
- g_return_if_fail (E_IS_CONFIG_LISTENER (cl));
- g_return_if_fail (key != NULL);
-
- /* check that the value is not the same */
- if (value == e_config_listener_get_boolean_with_default (cl, key, 0, NULL))
- return;
-
- gconf_client_set_bool (cl->priv->db, key, value, &err);
- if (err) {
- g_warning ("e_config_listener_set_bool: %s", err->message);
- g_error_free (err);
- } else {
- /* update the internal copy */
- kd = g_hash_table_lookup (cl->priv->keys, key);
- if (kd)
- kd->value.v_bool = value;
- }
-}
-
-void
-e_config_listener_set_float (EConfigListener *cl, const char *key, float value)
-{
- KeyData *kd;
- GError *err = NULL;
-
- g_return_if_fail (E_IS_CONFIG_LISTENER (cl));
- g_return_if_fail (key != NULL);
-
- /* check that the value is not the same */
- if (value == e_config_listener_get_float_with_default (cl, key, 0, NULL))
- return;
-
- gconf_client_set_float (cl->priv->db, key, value, &err);
- if (err) {
- g_warning ("e_config_listener_set_float: %s", err->message);
- g_error_free (err);
- } else {
- /* update the internal copy */
- kd = g_hash_table_lookup (cl->priv->keys, key);
- if (kd)
- kd->value.v_float = value;
- }
-}
-
-void
-e_config_listener_set_long (EConfigListener *cl, const char *key, long value)
-{
- KeyData *kd;
- GError *err = NULL;
-
- g_return_if_fail (E_IS_CONFIG_LISTENER (cl));
- g_return_if_fail (key != NULL);
-
- /* check that the value is not the same */
- if (value == e_config_listener_get_long_with_default (cl, key, 0, NULL))
- return;
-
- gconf_client_set_int (cl->priv->db, key, value, &err);
- if (err) {
- g_warning ("e_config_listener_set_long: %s", err->message);
- g_error_free (err);
- } else {
- /* update the internal copy */
- kd = g_hash_table_lookup (cl->priv->keys, key);
- if (kd)
- kd->value.v_long = value;
- }
-}
-
-void
-e_config_listener_set_string (EConfigListener *cl, const char *key, const char *value)
-{
- char *s1, *s2;
- KeyData *kd;
- GError *err = NULL;
-
- g_return_if_fail (E_IS_CONFIG_LISTENER (cl));
- g_return_if_fail (key != NULL);
-
- /* check that the value is not the same */
- s1 = (char *) value;
- s2 = e_config_listener_get_string_with_default (cl, key, NULL, NULL);
- if (!strcmp (s1 ? s1 : "", s2 ? s2 : "")) {
- g_free (s2);
- return;
- }
-
- g_free (s2);
-
- gconf_client_set_string (cl->priv->db, key, value, &err);
- if (err) {
- g_warning ("e_config_listener_set_bool: %s", err->message);
- g_error_free (err);
- } else {
- /* update the internal copy */
- kd = g_hash_table_lookup (cl->priv->keys, key);
- if (kd) {
- g_free (kd->value.v_str);
- kd->value.v_str = g_strdup (value);
- }
- }
-}
-
-void
-e_config_listener_remove_value (EConfigListener *cl, const char *key)
-{
- gpointer orig_key, orig_value;
-
- g_return_if_fail (E_IS_CONFIG_LISTENER (cl));
- g_return_if_fail (key != NULL);
-
- if (g_hash_table_lookup_extended (cl->priv->keys, key, &orig_key, &orig_value)) {
- KeyData *kd = orig_value;
-
- g_hash_table_remove (cl->priv->keys, key);
- g_free (kd->key);
- if (kd->type == GCONF_VALUE_STRING)
- g_free (kd->value.v_str);
- gconf_client_notify_remove (cl->priv->db, kd->lid);
-
- g_free (kd);
- }
-
- gconf_client_unset (cl->priv->db, key, NULL);
-}
-
-void
-e_config_listener_remove_dir (EConfigListener *cl, const char *dir)
-{
- GSList *slist, *iter;
- const gchar *key;
-
- g_return_if_fail (E_IS_CONFIG_LISTENER (cl));
- g_return_if_fail (dir != NULL);
-
- slist = gconf_client_all_entries (cl->priv->db, dir, NULL);
- for (iter = slist; iter != NULL; iter = iter->next) {
- GConfEntry *entry = iter->data;
-
- key = gconf_entry_get_key (entry);
- gconf_client_unset (cl->priv->db, key, NULL);
- gconf_entry_free (entry);
- }
-
- g_slist_free (slist);
-}
diff --git a/e-util/e-config-listener.h b/e-util/e-config-listener.h
deleted file mode 100644
index 9b331a7c8a..0000000000
--- a/e-util/e-config-listener.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Configuration component listener
- *
- * Author:
- * Rodrigo Moya <rodrigo@ximian.com>
- *
- * Copyright 2002, Ximian, Inc.
- */
-
-#ifndef __E_CONFIG_LISTENER_H__
-#define __E_CONFIG_LISTENER_H__
-
-#include <glib-object.h>
-
-G_BEGIN_DECLS
-
-#define E_CONFIG_LISTENER_TYPE (e_config_listener_get_type ())
-#define E_CONFIG_LISTENER(o) (G_TYPE_CHECK_INSTANCECAST ((o), E_CONFIG_LISTENER_TYPE, EConfigListener))
-#define E_CONFIG_LISTENER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), E_CONFIG_LISTENER_TYPE, EConfigListenerClass))
-#define E_IS_CONFIG_LISTENER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_CONFIG_LISTENER_TYPE))
-#define E_IS_CONFIG_LISTENER_CLASS(k) (GT_TYPE_CHECK_CLASS_TYPE ((k), E_CONFIG_LISTENER_TYPE))
-
-typedef struct _EConfigListenerPrivate EConfigListenerPrivate;
-
-typedef struct {
- GObject object;
- EConfigListenerPrivate *priv;
-} EConfigListener;
-
-typedef struct {
- GObjectClass parent_class;
-
- void (* key_changed) (EConfigListener *cl, const char *key);
-} EConfigListenerClass;
-
-GType e_config_listener_get_type (void);
-EConfigListener *e_config_listener_new (void);
-
-gboolean e_config_listener_get_boolean (EConfigListener *cl, const char *key);
-gboolean e_config_listener_get_boolean_with_default (EConfigListener *cl,
- const char *key,
- gboolean def,
- gboolean *used_default);
-float e_config_listener_get_float (EConfigListener *cl, const char *key);
-float e_config_listener_get_float_with_default (EConfigListener *cl,
- const char *key,
- float def,
- gboolean *used_default);
-long e_config_listener_get_long (EConfigListener *cl, const char *key);
-long e_config_listener_get_long_with_default (EConfigListener *cl,
- const char *key,
- long def,
- gboolean *used_default);
-char *e_config_listener_get_string (EConfigListener *cl, const char *key);
-char *e_config_listener_get_string_with_default (EConfigListener *cl,
- const char *key,
- const char *def,
- gboolean *used_default);
-void e_config_listener_set_boolean (EConfigListener *cl,
- const char *key,
- gboolean value);
-void e_config_listener_set_float (EConfigListener *cl,
- const char *key,
- float value);
-void e_config_listener_set_long (EConfigListener *cl,
- const char *key,
- long value);
-void e_config_listener_set_string (EConfigListener *cl,
- const char *key,
- const char *value);
-
-void e_config_listener_remove_value (EConfigListener *cl,
- const char *key);
-void e_config_listener_remove_dir (EConfigListener *cl,
- const char *dir);
-
-G_END_DECLS
-
-#endif
diff --git a/e-util/e-corba-utils.c b/e-util/e-corba-utils.c
deleted file mode 100644
index b92b247656..0000000000
--- a/e-util/e-corba-utils.c
+++ /dev/null
@@ -1,42 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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;
-}
-
-CORBA_char *
-e_safe_corba_string_dup (const char *s)
-{
- return CORBA_string_dup (e_safe_corba_string (s));
-}
diff --git a/e-util/e-corba-utils.h b/e-util/e-corba-utils.h
deleted file mode 100644
index b48a6e2dab..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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 <orbit/orbit.h>
-
-const CORBA_char *e_safe_corba_string (const char *s);
-CORBA_char *e_safe_corba_string_dup (const char *s);
-
-#endif
diff --git a/e-util/e-dialog-utils.c b/e-util/e-dialog-utils.c
deleted file mode 100644
index a37519297e..0000000000
--- a/e-util/e-dialog-utils.c
+++ /dev/null
@@ -1,284 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <gdk/gdkx.h>
-
-#include <gtk/gtkfilesel.h>
-#include <gtk/gtkmain.h>
-#include <gtk/gtkplug.h>
-
-#include <libgnome/gnome-i18n.h>
-#include <libgnome/gnome-util.h>
-
-
-/**
- * e_notice:
- * @parent: the dialog's parent window, or %NULL
- * @type: the type of dialog (%GTK_MESSAGE_INFO, %GTK_MESSAGE_WARNING,
- * or %GTK_MESSAGE_ERROR)
- * @format: printf-style format string, followed by arguments
- *
- * Convenience function to show a dialog with a message and an "OK"
- * button.
- **/
-void
-e_notice (gpointer parent, GtkMessageType type, const char *format, ...)
-{
- GtkWidget *dialog;
- va_list args;
- char *str;
-
- va_start (args, format);
- str = g_strdup_vprintf (format, args);
- dialog = gtk_message_dialog_new (NULL,
- GTK_DIALOG_DESTROY_WITH_PARENT,
- type,
- GTK_BUTTONS_OK,
- "%s",
- str);
- va_end (args);
- g_free (str);
-
- if (parent)
- e_dialog_set_transient_for (GTK_WINDOW (dialog), parent);
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
-}
-
-/**
- * e_notice_with_xid:
- * @parent: the dialog's parent window, or %NULL
- * @type: the type of dialog (%GTK_MESSAGE_INFO, %GTK_MESSAGE_WARNING,
- * or %GTK_MESSAGE_ERROR)
- * @format: printf-style format string, followed by arguments
- *
- * Like e_notice(), but takes a GdkNativeWindow for the parent
- * window argument.
- **/
-void
-e_notice_with_xid (GdkNativeWindow parent, GtkMessageType type, const char *format, ...)
-{
- GtkWidget *dialog;
- va_list args;
- char *str;
-
- va_start (args, format);
- str = g_strdup_vprintf (format, args);
- dialog = gtk_message_dialog_new (NULL,
- GTK_DIALOG_DESTROY_WITH_PARENT,
- type,
- GTK_BUTTONS_OK,
- "%s",
- str);
- va_end (args);
- g_free (str);
-
- if (parent)
- e_dialog_set_transient_for_xid (GTK_WINDOW (dialog), parent);
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
-}
-
-
-/* Tests whether or not an X Window is being managed by the
- * window manager.
- */
-static gboolean
-window_is_wm_toplevel (Display *display, Window window)
-{
- static Atom WM_STATE = None;
- unsigned long nitems, after;
- unsigned char *data = NULL;
- Atom type = None;
- int format;
-
- if (!WM_STATE)
- WM_STATE = XInternAtom (display, "WM_STATE", False);
-
- if (XGetWindowProperty (display, window, WM_STATE, 0, 0, False,
- AnyPropertyType, &type, &format,
- &nitems, &after, &data) == Success) {
- if (data)
- XFree((char*)data);
- if (type)
- return TRUE;
- }
- return FALSE;
-}
-
-/**
- * e_dialog_set_transient_for:
- * @dialog: a dialog window
- * @parent_widget: the parent for @dialog
- *
- * This sets the parent for @dialog to be @parent_widget. Unlike
- * gtk_window_set_transient_for(), this doesn't need @parent_widget to
- * be the actual toplevel, and also works if @parent_widget is
- * embedded as a Bonobo control by an out-of-process container.
- * @parent_widget must already be realized before calling this
- * function, but @dialog does not need to be.
- **/
-void
-e_dialog_set_transient_for (GtkWindow *dialog,
- GtkWidget *parent_widget)
-{
- GtkWidget *toplevel;
- Window parent, root_ret, *children;
- unsigned int numchildren;
- Display *display;
- Status status;
-
- g_return_if_fail (GTK_IS_WINDOW (dialog));
- g_return_if_fail (GTK_IS_WIDGET (parent_widget));
-
- toplevel = gtk_widget_get_toplevel (parent_widget);
- if (toplevel == NULL)
- return;
-
- if (!GTK_IS_PLUG (toplevel)) {
- gtk_window_set_transient_for (GTK_WINDOW (dialog),
- GTK_WINDOW (toplevel));
- return;
- }
-
- /* Find the top-level windowmanager-managed X Window */
- display = GDK_WINDOW_XDISPLAY (parent_widget->window);
- parent = GDK_WINDOW_XID (parent_widget->window);
-
- while (parent && !window_is_wm_toplevel (display, parent)) {
- status = XQueryTree (display, parent, &root_ret,
- &parent, &children, &numchildren);
- if (status != 0)
- XFree (children);
- }
-
- e_dialog_set_transient_for_xid (dialog, parent);
-}
-
-static void
-dialog_realized (GtkWindow *dialog, gpointer xid)
-{
- e_dialog_set_transient_for_xid (dialog, (GdkNativeWindow)xid);
-}
-
-/**
- * e_dialog_set_transient_for_xid:
- * @dialog: a dialog window
- * @xid: the X Window parent
- *
- * Like e_dialog_set_transient_for(), but use an XID to specify the
- * parent window.
- **/
-void
-e_dialog_set_transient_for_xid (GtkWindow *dialog,
- GdkNativeWindow xid)
-{
-#ifdef GDK_MULTIHEAD_SAFE
- GdkDisplay *display;
-#endif
- GdkWindow *parent;
-
- g_return_if_fail (GTK_IS_WINDOW (dialog));
-
- if (!GTK_WIDGET_REALIZED (dialog)) {
- g_signal_connect (dialog, "realize",
- G_CALLBACK (dialog_realized),
- (gpointer) xid);
- return;
- }
-
-#ifdef GDK_MULTIHEAD_SAFE
- display = gdk_drawable_get_display (GDK_DRAWABLE (GTK_WIDGET (dialog)->window));
- parent = gdk_window_lookup_for_display (display, xid);
- if (!parent)
- parent = gdk_window_foreign_new_for_display (display, xid);
-#else
- parent = gdk_window_lookup (xid);
- if (!parent)
- parent = gdk_window_foreign_new (xid);
-#endif
- g_return_if_fail (parent != NULL);
-
- gdk_window_set_transient_for (GTK_WIDGET (dialog)->window, parent);
-}
-
-
-
-static void
-save_ok (GtkWidget *widget, gpointer data)
-{
- GtkWidget *fs;
- char **filename = data;
- const char *path;
- int btn = GTK_RESPONSE_YES;
-
- fs = gtk_widget_get_toplevel (widget);
- path = gtk_file_selection_get_filename (GTK_FILE_SELECTION (fs));
-
- if (g_file_test (path, G_FILE_TEST_IS_REGULAR)) {
- GtkWidget *dlg;
-
- dlg = gtk_message_dialog_new (GTK_WINDOW (fs), 0,
- GTK_MESSAGE_QUESTION,
- GTK_BUTTONS_YES_NO,
- _("A file by that name already exists.\n"
- "Overwrite it?"));
- gtk_window_set_title (GTK_WINDOW (dlg), _("Overwrite file?"));
-
- btn = gtk_dialog_run (GTK_DIALOG (dlg));
- gtk_widget_destroy (dlg);
- }
-
- if (btn == GTK_RESPONSE_YES)
- *filename = g_strdup (path);
-
- gtk_main_quit ();
-}
-
-char *
-e_file_dialog_save (const char *title)
-{
- GtkFileSelection *fs;
- char *path, *filename = NULL;
-
- fs = GTK_FILE_SELECTION (gtk_file_selection_new (title));
- path = g_strdup_printf ("%s/", g_get_home_dir ());
- gtk_file_selection_set_filename (fs, path);
- g_free (path);
-
- g_signal_connect (fs->ok_button, "clicked", G_CALLBACK (save_ok), &filename);
- g_signal_connect (fs->cancel_button, "clicked", G_CALLBACK (gtk_main_quit), NULL);
-
- gtk_widget_show (GTK_WIDGET (fs));
- gtk_grab_add (GTK_WIDGET (fs));
- gtk_main ();
-
- gtk_widget_destroy (GTK_WIDGET (fs));
-
- return filename;
-}
-
-
diff --git a/e-util/e-dialog-utils.h b/e-util/e-dialog-utils.h
deleted file mode 100644
index 6e6cff8fb9..0000000000
--- a/e-util/e-dialog-utils.h
+++ /dev/null
@@ -1,45 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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/gtkmessagedialog.h>
-
-void e_notice (gpointer parent,
- GtkMessageType type,
- const char *format,
- ...);
-void e_notice_with_xid (GdkNativeWindow parent,
- GtkMessageType type,
- const char *format,
- ...);
-
-void e_dialog_set_transient_for (GtkWindow *dialog,
- GtkWidget *parent_widget);
-void e_dialog_set_transient_for_xid (GtkWindow *dialog,
- GdkNativeWindow xid);
-
-char *e_file_dialog_save (const char *title);
-
-
-#endif
diff --git a/e-util/e-dialog-widgets.c b/e-util/e-dialog-widgets.c
deleted file mode 100644
index d245917682..0000000000
--- a/e-util/e-dialog-widgets.c
+++ /dev/null
@@ -1,811 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 "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 (DialogHooks *hooks, GObject *dialog)
-{
- g_slist_free (hooks->whooks);
- hooks->whooks = NULL;
-
- g_free (hooks);
- g_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 = g_object_get_data ((GObject *) dialog, "dialog-hooks");
- if (!hooks) {
- hooks = g_new0 (DialogHooks, 1);
- g_object_set_data ((GObject *) dialog, "dialog-hooks", hooks);
- g_object_weak_ref ((GObject *) dialog, (GWeakNotify) 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)
-{
- const int *value_map;
- GSList *group, *l;
- int *value;
-
- group = gtk_radio_button_get_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)
- g_signal_connect (l->data, "toggled", G_CALLBACK (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)
-{
- const int *value_map;
- int *value;
-
- /* 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)
- g_signal_connect (l->data, "activate", G_CALLBACK (activate_cb), dialog);
- }
-}
-
-/* Gets the value of an option menu */
-static void
-get_option_menu_value (GtkOptionMenu *omenu, gpointer value_var, gpointer info)
-{
- const int *value_map;
- int *value;
-
- 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))
- g_signal_connect (toggle, "toggled", G_CALLBACK (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))
- g_signal_connect (adj, "value_changed", G_CALLBACK (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))
- g_signal_connect (editable, "changed", G_CALLBACK (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)
-{
- int pos = 0;
-
- 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)
- 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 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, *l;
- int i;
-
- 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_get_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, *l;
- int i, 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_get_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;
- }
-
- g_assert (l != NULL);
-
- /* 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;
- g_signal_emit_by_name (adj, "value_changed", 0);
-}
-
-/**
- * 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;
- }
-
- g_assert (l != NULL);
-
- 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 a006092e04..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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 99df6fe923..0000000000
--- a/e-util/e-gtk-utils.c
+++ /dev/null
@@ -1,216 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <gtk/gtkbutton.h>
-#include <gtk/gtkstock.h>
-#include <gtk/gtklabel.h>
-#include <gtk/gtkimage.h>
-#include <gtk/gtkhbox.h>
-#include <gtk/gtkalignment.h>
-
-#include <gdk/gdkx.h>
-
-#include <X11/Xlib.h>
-
-#include "e-gtk-utils.h"
-
-
-void
-e_signal_connect_while_alive (void *instance,
- const char *name,
- GCallback callback,
- void *callback_data,
- void *alive_instance)
-{
- GClosure *closure;
-
- g_return_if_fail (GTK_IS_OBJECT (instance));
-
- closure = g_cclosure_new (callback, callback_data, NULL);
- g_object_watch_closure (alive_instance, closure);
- g_signal_connect_closure_by_id (instance, g_signal_lookup (name, G_OBJECT_TYPE (instance)), 0,
- closure, FALSE);
-}
-
-
-/* (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);
-
- g_signal_handler_disconnect (info->object1, info->disconnect_handler1);
- g_signal_handler_disconnect (info->object1, info->signal_handler);
- g_signal_handler_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_signal_connect_full_while_alive (void *instance,
- const char *name,
- GtkSignalFunc func,
- GtkCallbackMarshal marshal,
- void *data,
- GtkDestroyNotify destroy_func,
- gboolean instance_signal,
- gboolean after,
- void *alive_instance)
-{
- DisconnectInfo *info;
-
- g_return_if_fail (GTK_IS_OBJECT (instance));
- g_return_if_fail (name != NULL);
- g_return_if_fail (func != NULL);
- g_return_if_fail (GTK_IS_OBJECT (alive_instance));
-
- info = g_new (DisconnectInfo, 1);
-
- info->signal_handler = gtk_signal_connect_full (instance, name,
- func, marshal, data,
- destroy_func,
- instance_signal, after);
-
- info->object1 = instance;
- info->disconnect_handler1 = g_signal_connect (instance, "destroy",
- G_CALLBACK (alive_disconnecter), info);
-
- info->object2 = alive_instance;
- info->disconnect_handler2 = g_signal_connect (alive_instance, "destroy",
- G_CALLBACK (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)
-{
- g_signal_connect (widget, "realize", G_CALLBACK (widget_realize_callback_for_backing_store), NULL);
-}
-
-
-/**
- * e_gtk_button_new_with_icon:
- * @text: The mnemonic text for the label.
- * @stock: The name of the stock item to get the icon from.
- *
- * Create a gtk button with a custom label and a stock icon.
- *
- *
- * Return value: The widget.
- **/
-GtkWidget *
-e_gtk_button_new_with_icon(const char *text, const char *stock)
-{
- GtkWidget *button, *label;
- GtkStockItem item;
-
- button = gtk_button_new();
- label = gtk_label_new_with_mnemonic(text);
- gtk_label_set_mnemonic_widget((GtkLabel *)label, button);
-
- if (gtk_stock_lookup(stock, &item)) {
- GtkWidget *image, *hbox, *align;
-
- image = gtk_image_new_from_stock(stock, GTK_ICON_SIZE_BUTTON);
- hbox = gtk_hbox_new(FALSE, 2);
- align = gtk_alignment_new(0.5, 0.5, 0.0, 0.0);
- gtk_box_pack_start((GtkBox *)hbox, image, FALSE, FALSE, 0);
- gtk_box_pack_end((GtkBox *)hbox, label, FALSE, FALSE, 0);
- gtk_container_add((GtkContainer *)align, hbox);
- gtk_container_add((GtkContainer *)button, align);
- gtk_widget_show_all(align);
- } else {
- gtk_misc_set_alignment((GtkMisc *)label, 0.5, 0.5);
- gtk_container_add((GtkContainer *)button, label);
- gtk_widget_show(label);
- }
-
- return button;
-}
diff --git a/e-util/e-gtk-utils.h b/e-util/e-gtk-utils.h
deleted file mode 100644
index cebb5b757d..0000000000
--- a/e-util/e-gtk-utils.h
+++ /dev/null
@@ -1,49 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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_signal_connect_while_alive (void *object,
- const char *name,
- GCallback callback,
- void *data,
- void *alive_instance);
-
-void e_signal_connect_full_while_alive (void *instance,
- const char *name,
- GtkSignalFunc func,
- GtkCallbackMarshal marshal,
- void *data,
- GtkDestroyNotify destroy_func,
- gboolean object_signal,
- gboolean after,
- void *alive_instance);
-
-void e_make_widget_backing_stored (GtkWidget *widget);
-
-GtkWidget *e_gtk_button_new_with_icon(const char *text, const char *stock);
-
-#endif
diff --git a/e-util/e-gui-utils.c b/e-util/e-gui-utils.c
deleted file mode 100644
index fc8e5921b2..0000000000
--- a/e-util/e-gui-utils.c
+++ /dev/null
@@ -1,171 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * GUI utility functions
- *
- * Authors:
- * Miguel de Icaza (miguel@ximian.com)
- * Chris Toshok (toshok@ximian.com)
- *
- * Copyright (C) 1999 Miguel de Icaza
- * Copyright (C) 2000-2003 Ximian, Inc.
- */
-#include <config.h>
-
-#include <string.h>
-
-#include "e-gui-utils.h"
-
-#include <glib.h>
-#include <gtk/gtkalignment.h>
-#include <gtk/gtkimage.h>
-#include <gtk/gtkbutton.h>
-#include <gtk/gtklabel.h>
-#include <gtk/gtkhbox.h>
-
-#include <libgnome/gnome-program.h>
-#include <libgnomevfs/gnome-vfs-mime-handlers.h>
-
-#ifdef HAVE_LIBGNOMEUI_GNOME_ICON_LOOKUP_H
-#include <libgnomeui/gnome-icon-lookup.h>
-#else
-#include "art/empty.xpm"
-#endif
-
-GtkWidget *e_create_image_widget(gchar *name,
- gchar *string1, gchar *string2,
- gint int1, gint int2)
-{
- char *filename;
- GtkWidget *alignment = NULL;
- if (string1) {
- GtkWidget *w;
-
- if (*string1 == '/')
- filename = g_strdup(string1);
- else
- filename = g_build_filename (EVOLUTION_IMAGES, string1, NULL);
-
- w = gtk_image_new_from_file (filename);
-
- alignment = gtk_widget_new(gtk_alignment_get_type(),
- "child", w,
- "xalign", (double) 0,
- "yalign", (double) 0,
- "xscale", (double) 0,
- "yscale", (double) 0,
- NULL);
-
- gtk_widget_show_all (alignment);
- g_free (filename);
- }
-
- return alignment;
-}
-
-GtkWidget *
-e_button_new_with_stock_icon (const char *label_str, const char *stockid)
-{
- GtkWidget *button, *hbox, *label, *align, *image;
-
- button = gtk_button_new ();
-
- label = gtk_label_new_with_mnemonic (label_str);
-
- gtk_label_set_mnemonic_widget (GTK_LABEL (label), button);
-
- image = gtk_image_new_from_stock (stockid, GTK_ICON_SIZE_BUTTON);
- hbox = gtk_hbox_new (FALSE, 2);
-
- align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
-
- gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
- gtk_box_pack_end (GTK_BOX (hbox), label, FALSE, FALSE, 0);
-
- gtk_container_add (GTK_CONTAINER (button), align);
- gtk_container_add (GTK_CONTAINER (align), hbox);
- gtk_widget_show_all (align);
-
- return button;
-}
-
-/**
- * e_icon_for_mime_type:
- * @mime_type: a MIME type
- * @size_hint: the size the caller plans to display the icon at
- *
- * Tries to find an icon representing @mime_type that will display
- * nicely at @size_hint by @size_hint pixels. The returned icon
- * may or may not actually be that size.
- *
- * Return value: a pixbuf, which the caller must unref when it is done
- **/
-GdkPixbuf *
-e_icon_for_mime_type (const char *mime_type, int size_hint)
-{
- char *icon_name, *icon_path = NULL;
- GdkPixbuf *pixbuf = NULL;
-
-#ifdef HAVE_LIBGNOMEUI_GNOME_ICON_LOOKUP_H
- static GnomeIconTheme *icon_theme = NULL;
-
- /* Try the icon theme. (GNOME 2.2 or Sun GNOME 2.0).
- * This will also look in GNOME VFS.
- */
-
- if (!icon_theme)
- icon_theme = gnome_icon_theme_new ();
-
- icon_name = gnome_icon_lookup (icon_theme, NULL, NULL, NULL, NULL,
- mime_type, 0, NULL);
- if (icon_name) {
- icon_path = gnome_icon_theme_lookup_icon (
- icon_theme, icon_name, size_hint, NULL, NULL);
- g_free (icon_name);
- }
-
-#else
- const char *vfs_icon_name;
-
- /* Try gnome-vfs. (gnome-vfs.mime itself doesn't offer much,
- * but other software packages may define icons for
- * themselves.
- */
- vfs_icon_name = gnome_vfs_mime_get_icon (mime_type);
- if (vfs_icon_name) {
- icon_path = gnome_program_locate_file (
- NULL, GNOME_FILE_DOMAIN_PIXMAP,
- vfs_icon_name, TRUE, NULL);
- }
-
- if (!icon_path) {
- char *p;
-
- /* Try gnome-mime-data. */
- icon_name = g_strdup_printf ("document-icons/gnome-%s.png",
- mime_type);
- p = strrchr (icon_name, '/');
- if (p)
- *p = '-';
-
- icon_path = gnome_program_locate_file (
- NULL, GNOME_FILE_DOMAIN_PIXMAP,
- icon_name, TRUE, NULL);
- g_free (icon_name);
- }
-
- if (!icon_path) {
- /* Use the generic document icon. */
- icon_path = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_PIXMAP,
- "document-icons/i-regular.png", TRUE, NULL);
- if (!icon_path) {
- g_warning ("Could not get any icon for %s!",mime_type);
- return gdk_pixbuf_new_from_xpm_data((const char **)empty_xpm);
- }
- }
-#endif
-
- pixbuf = gdk_pixbuf_new_from_file (icon_path, NULL);
- g_free (icon_path);
- return pixbuf;
-}
-
diff --git a/e-util/e-gui-utils.h b/e-util/e-gui-utils.h
deleted file mode 100644
index 8701949cb0..0000000000
--- a/e-util/e-gui-utils.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef E_GUI_UTILS_H
-#define E_GUI_UTILS_H
-
-#include <gtk/gtkwidget.h>
-#include <bonobo/bonobo-ui-util.h>
-#include <bonobo/bonobo-control.h>
-
-GtkWidget *e_create_image_widget (gchar *name, gchar *string1, gchar *string2, gint int1, gint int2);
-
-GtkWidget *e_button_new_with_stock_icon (const char *label_str, const char *stockid);
-
-GdkPixbuf *e_icon_for_mime_type (const char *mime_type, int size);
-
-#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 4ca2daa6dc..0000000000
--- a/e-util/e-host-utils.c
+++ /dev/null
@@ -1,380 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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, Jeffrey Stedfast
- */
-
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <glib.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <errno.h>
-
-#include "e-host-utils.h"
-
-
-#if !defined (HAVE_GETHOSTBYNAME_R) || !defined (HAVE_GETHOSTBYADDR_R)
-G_LOCK_DEFINE_STATIC (gethost_mutex);
-#endif
-
-
-#define ALIGN(x) (((x) + (sizeof (char *) - 1)) & ~(sizeof (char *) - 1))
-
-#define GETHOST_PROCESS(h, host, buf, buflen, herr) G_STMT_START { \
- int num_aliases = 0, num_addrs = 0; \
- int req_length; \
- char *p; \
- int i; \
- \
- /* 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 */ \
- /* 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 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_STMT_END
-
-
-#ifdef ENABLE_IPv6
-/* some helpful utils for IPv6 lookups */
-#define IPv6_BUFLEN_MIN (sizeof (char *) * 3)
-
-static int
-ai_to_herr (int error)
-{
- switch (error) {
- case EAI_NONAME:
- case EAI_FAIL:
- return HOST_NOT_FOUND;
- break;
- case EAI_SERVICE:
- return NO_DATA;
- break;
- case EAI_ADDRFAMILY:
- return NO_ADDRESS;
- break;
- case EAI_NODATA:
- return NO_DATA;
- break;
- case EAI_MEMORY:
- return ENOMEM;
- break;
- case EAI_AGAIN:
- return TRY_AGAIN;
- break;
- case EAI_SYSTEM:
- return errno;
- break;
- default:
- return NO_RECOVERY;
- break;
- }
-}
-
-#endif /* ENABLE_IPv6 */
-
-/**
- * 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, size_t buflen, int *herr)
-{
-#ifdef ENABLE_IPv6
- struct addrinfo hints, *res;
- int retval, len;
- char *addr;
-
- memset (&hints, 0, sizeof (struct addrinfo));
-#ifdef HAVE_AI_ADDRCONFIG
- hints.ai_flags = AI_CANONNAME | AI_ADDRCONFIG;
-#else
- hints.ai_flags = AI_CANONNAME;
-#endif
- hints.ai_family = PF_UNSPEC;
- hints.ai_socktype = SOCK_STREAM;
- hints.ai_protocol = IPPROTO_TCP;
-
- if ((retval = getaddrinfo (name, NULL, &hints, &res)) != 0) {
- *herr = ai_to_herr (retval);
- return -1;
- }
-
- len = ALIGN (strlen (res->ai_canonname) + 1);
- if (buflen < IPv6_BUFLEN_MIN + len + res->ai_addrlen + sizeof (char *))
- return ERANGE;
-
- /* h_name */
- strcpy (buf, res->ai_canonname);
- host->h_name = buf;
- buf += len;
-
- /* h_aliases */
- ((char **) buf)[0] = NULL;
- host->h_aliases = (char **) buf;
- buf += sizeof (char *);
-
- /* h_addrtype and h_length */
- host->h_length = res->ai_addrlen;
- if (res->ai_family == PF_INET6) {
- host->h_addrtype = AF_INET6;
-
- addr = (char *) &((struct sockaddr_in6 *) res->ai_addr)->sin6_addr;
- } else {
- host->h_addrtype = AF_INET;
-
- addr = (char *) &((struct sockaddr_in *) res->ai_addr)->sin_addr;
- }
-
- memcpy (buf, addr, host->h_length);
- addr = buf;
- buf += ALIGN (host->h_length);
-
- /* h_addr_list */
- ((char **) buf)[0] = addr;
- ((char **) buf)[1] = NULL;
- host->h_addr_list = (char **) buf;
-
- freeaddrinfo (res);
-
- return 0;
-#else /* No support for IPv6 addresses */
-#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 /* No support for gethostbyname_r */
- struct hostent *h;
-
- G_LOCK (gethost_mutex);
-
- h = gethostbyname (name);
-
- if (!h) {
- *herr = h_errno;
- G_UNLOCK (gethost_mutex);
- return -1;
- }
-
- GETHOST_PROCESS (h, host, buf, buflen, herr);
-
- G_UNLOCK (gethost_mutex);
-
- return 0;
-#endif /* HAVE_GETHOSTBYNAME_R */
-#endif /* ENABLE_IPv6 */
-}
-
-
-/**
- * e_gethostbyaddr_r:
- * @addr: the addr to resolve
- * @addrlen: address length
- * @type: AF type
- * @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 address @addr, 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 gethostbyaddr() error codes).
- **/
-int
-e_gethostbyaddr_r (const char *addr, int addrlen, int type, struct hostent *host,
- char *buf, size_t buflen, int *herr)
-{
-#ifdef ENABLE_IPv6
- int retval, len;
-
- if ((retval = getnameinfo (addr, addrlen, buf, buflen, NULL, 0, NI_NAMEREQD)) != 0) {
- *herr = ai_to_herr (retval);
- return -1;
- }
-
- len = ALIGN (strlen (buf) + 1);
- if (buflen < IPv6_BUFLEN_MIN + len + addrlen + sizeof (char *))
- return ERANGE;
-
- /* h_name */
- host->h_name = buf;
- buf += len;
-
- /* h_aliases */
- ((char **) buf)[0] = NULL;
- host->h_aliases = (char **) buf;
- buf += sizeof (char *);
-
- /* h_addrtype and h_length */
- host->h_length = addrlen;
- host->h_addrtype = type;
-
- memcpy (buf, addr, host->h_length);
- addr = buf;
- buf += ALIGN (host->h_length);
-
- /* h_addr_list */
- ((char **) buf)[0] = addr;
- ((char **) buf)[1] = NULL;
- host->h_addr_list = (char **) buf;
-
- return 0;
-#else /* No support for IPv6 addresses */
-#ifdef HAVE_GETHOSTBYADDR_R
-#ifdef GETHOSTBYADDR_R_SEVEN_ARGS
- if (gethostbyaddr_r (addr, addrlen, type, host, buf, buflen, herr))
- return 0;
- else
- return errno;
-#else
- struct hostent *hp;
- int retval;
-
- retval = gethostbyaddr_r (addr, addrlen, type, host, buf, buflen, &hp, herr);
- if (hp != NULL) {
- *herr = 0;
- retval = 0;
- } else if (retval == 0) {
- /* glibc 2.3.2 workaround - it seems that
- * gethostbyaddr_r will sometimes return 0 on fail and
- * fill @host with garbage strings from /etc/hosts
- * (failure to parse the file? who knows). Luckily, it
- * seems that we can rely on @hp being NULL on
- * fail.
- */
- retval = -1;
- }
-
- return retval;
-#endif
-#else /* No support for gethostbyaddr_r */
- struct hostent *h;
-
- G_LOCK (gethost_mutex);
-
- h = gethostbyaddr (addr, addrlen, type);
-
- if (!h) {
- *herr = h_errno;
- G_UNLOCK (gethost_mutex);
- return -1;
- }
-
- GETHOST_PROCESS (h, host, buf, buflen, herr);
-
- G_UNLOCK (gethost_mutex);
-
- return 0;
-#endif /* HAVE_GETHOSTBYADDR_R */
-#endif /* ENABLE_IPv6 */
-}
diff --git a/e-util/e-host-utils.h b/e-util/e-host-utils.h
deleted file mode 100644
index 543a9d3cc2..0000000000
--- a/e-util/e-host-utils.h
+++ /dev/null
@@ -1,38 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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: Chris Toshok, Jeffrey Stedfast
- */
-
-#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, size_t buflen, int *herr);
-
-int e_gethostbyaddr_r (const char *addr, int len, int type, struct hostent *host, char *buf, size_t 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 762627b259..0000000000
--- a/e-util/e-html-utils.c
+++ /dev/null
@@ -1,521 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-html-utils.c
- * Copyright (C) 2000-2003 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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 "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;
-}
-
-/* auto-urlification hints: the goal is not to be strictly RFC-compliant,
- * but rather to accurately distinguish urls/addresses from non-urls/
- * addresses in real-world email.
- *
- * 1 = non-email-address chars: ()<>@,;:\"[]`'{}|
- * 2 = trailing url garbage: ,.!?;:>)]}`'-_
- * 4 = allowed dns chars
- * 8 = non-url chars: "|
- */
-static int special_chars[] = {
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, /* nul - 0x0f */
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, /* 0x10 - 0x1f */
- 9, 2, 9, 0, 0, 0, 0, 3, 1, 3, 0, 0, 3, 6, 6, 0, /* sp - / */
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 1, 0, 3, 2, /* 0 - ? */
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, /* @ - O */
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 3, 0, 2, /* P - _ */
- 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, /* ` - o */
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 9, 3, 0, 3 /* p - del */
-};
-
-#define is_addr_char(c) (c < 128 && !(special_chars[c] & 1))
-#define is_url_char(c) (c < 128 && !(special_chars[c] & 8))
-#define is_trailing_garbage(c) (c > 127 || (special_chars[c] & 2))
-#define is_domain_name_char(c) (c < 128 && (special_chars[c] & 4))
-
-/* (http|https|ftp|nntp)://[^ "|/]+\.([^ "|]*[^ ,.!?;:>)\]}`'"|_-])+ */
-/* www\.[A-Za-z0-9.-]+(/([^ "|]*[^ ,.!?;:>)\]}`'"|_-])+) */
-
-static char *
-url_extract (const unsigned char **text, gboolean full_url)
-{
- const unsigned char *end = *text, *p;
- char *out;
-
- while (*end && is_url_char (*end))
- end++;
-
- /* Back up if we probably went too far. */
- while (end > *text && is_trailing_garbage (*(end - 1)))
- end--;
-
- if (full_url) {
- /* Make sure this really looks like a URL. */
- p = memchr (*text, ':', end - *text);
- if (!p || end - p < 4)
- return NULL;
- } else {
- /* Make sure this really looks like a hostname. */
- p = memchr (*text, '.', end - *text);
- if (!p || p >= end - 2)
- return NULL;
- p = memchr (p + 2, '.', end - (p + 2));
- if (!p || p >= end - 2)
- 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 (*(start - 1)); start--)
- ;
- if (start == *cur)
- return NULL;
- if (start > linestart + 2 &&
- start[-1] == ':' && start[0] == '/' && start[1] == '/')
- return NULL;
-
- /* Now look forward for a valid domain part */
- for (end = *cur + 1, dot = NULL; is_domain_name_char (*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)
-{
- const unsigned char *p;
-
- if (*c != '>')
- return FALSE;
-
- /* A line that starts with a ">" is a citation, unless it's
- * just mbox From-mangling...
- */
- 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;
-}
-
-/**
- * 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) ||
- !strncasecmp (cur, "file:", 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) &&
- is_url_char (*(cur + 4))) {
- tmpurl = url_extract (&cur, FALSE);
- if (tmpurl) {
- 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);
-
- if (!*cur)
- break;
- 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' ||
- *(cur - 1) == '\n') {
- 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);
-}
-
-
-#ifdef E_HTML_UTILS_TEST
-
-struct {
- char *text, *url;
-} url_tests[] = {
- { "bob@foo.com", "mailto:bob@foo.com" },
- { "Ends with bob@foo.com", "mailto:bob@foo.com" },
- { "bob@foo.com at start", "mailto:bob@foo.com" },
- { "bob@foo.com.", "mailto:bob@foo.com" },
- { "\"bob@foo.com\"", "mailto:bob@foo.com" },
- { "<bob@foo.com>", "mailto:bob@foo.com" },
- { "(bob@foo.com)", "mailto:bob@foo.com" },
- { "bob@foo.com, 555-9999", "mailto:bob@foo.com" },
- { "|bob@foo.com|555-9999|", "mailto:bob@foo.com" },
- { "bob@ no match bob@", NULL },
- { "@foo.com no match @foo.com", NULL },
- { "\"bob\"@foo.com", NULL },
- { "M@ke money fast!", NULL },
- { "ASCII art @_@ @>->-", NULL },
-
- { "http://www.foo.com", "http://www.foo.com" },
- { "Ends with http://www.foo.com", "http://www.foo.com" },
- { "http://www.foo.com at start", "http://www.foo.com" },
- { "http://www.foo.com.", "http://www.foo.com" },
- { "http://www.foo.com/.", "http://www.foo.com/" },
- { "<http://www.foo.com>", "http://www.foo.com" },
- { "(http://www.foo.com)", "http://www.foo.com" },
- { "http://www.foo.com, 555-9999", "http://www.foo.com" },
- { "|http://www.foo.com|555-9999|", "http://www.foo.com" },
- { "foo http://www.foo.com/ bar", "http://www.foo.com/" },
- { "foo http://www.foo.com/index.html bar", "http://www.foo.com/index.html" },
- { "foo http://www.foo.com/q?99 bar", "http://www.foo.com/q?99" },
- { "foo http://www.foo.com/;foo=bar&baz=quux bar", "http://www.foo.com/;foo=bar&baz=quux" },
- { "foo http://www.foo.com/index.html#anchor bar", "http://www.foo.com/index.html#anchor" },
- { "http://www.foo.com/index.html; foo", "http://www.foo.com/index.html" },
- { "http://www.foo.com/index.html: foo", "http://www.foo.com/index.html" },
- { "http://www.foo.com/index.html-- foo", "http://www.foo.com/index.html" },
- { "http://www.foo.com/index.html?", "http://www.foo.com/index.html" },
- { "http://www.foo.com/index.html!", "http://www.foo.com/index.html" },
- { "\"http://www.foo.com/index.html\"", "http://www.foo.com/index.html" },
- { "'http://www.foo.com/index.html'", "http://www.foo.com/index.html" },
- { "http://bob@www.foo.com/bar/baz/", "http://bob@www.foo.com/bar/baz/" },
- { "http no match http", NULL },
- { "http: no match http:", NULL },
- { "http:// no match http://", NULL },
- { "unrecognized://bob@foo.com/path", NULL },
-
- { "src/www.c", NULL },
- { "Ewwwwww.Gross.", NULL },
-
-};
-int num_url_tests = G_N_ELEMENTS (url_tests);
-
-int
-main (int argc, char **argv)
-{
- int i, errors = 0;
- char *html, *url, *p;
-
- for (i = 0; i < num_url_tests; i++) {
- html = e_text_to_html (url_tests[i].text, E_TEXT_TO_HTML_CONVERT_URLS | E_TEXT_TO_HTML_CONVERT_ADDRESSES);
-
- url = strstr (html, "href=\"");
- if (url) {
- url += 6;
- p = strchr (url, '"');
- if (p)
- *p = '\0';
-
- while ((p = strstr (url, "&amp;")))
- memmove (p + 1, p + 5, strlen (p + 5) + 1);
- }
-
- if ((url && (!url_tests[i].url || strcmp (url, url_tests[i].url) != 0)) ||
- (!url && url_tests[i].url)) {
- printf ("FAILED on \"%s\" -> %s\n (got %s)\n\n",
- url_tests[i].text,
- url_tests[i].url ? url_tests[i].url : "(nothing)",
- url ? url : "(nothing)");
- errors++;
- }
-
- g_free (html);
- }
-
- printf ("\n%d errors\n", errors);
- return errors;
-}
-#endif
diff --git a/e-util/e-html-utils.h b/e-util/e-html-utils.h
deleted file mode 100644
index 551996e089..0000000000
--- a/e-util/e-html-utils.h
+++ /dev/null
@@ -1,39 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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 829b2480aa..0000000000
--- a/e-util/e-i18n.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-i18n.h
- * Copyright 2000, 2001, Ximian, Inc.
- *
- * Authors:
- * Chris Lahey <clahey@ximian.com>
- *
- * 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
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License, version 2, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef __E_I18N_H__
-#define __E_I18N_H__
-
-#include <libgnome/gnome-i18n.h>
-
-G_BEGIN_DECLS
-
-#ifdef ENABLE_NLS
- /* this function is defined in e-util.c */
- extern char *e_gettext (const char *msgid);
-# undef _
-# ifdef GNOME_EXPLICIT_TRANSLATION_DOMAIN
-/* No parentheses allowed here since that breaks string concatenation. */
-# define E_I18N_DOMAIN GNOME_EXPLICIT_TRANSLATION_DOMAIN
-# else
-/* No parentheses allowed here since that breaks string concatenation. */
-# define E_I18N_DOMAIN PACKAGE
-# endif
-# define _(String) e_gettext (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)
-/* No parentheses allowed here since that breaks string concatenation. */
-# define E_I18N_DOMAIN ""
-#endif
-
-G_END_DECLS
-
-#endif /* __E_I18N_H__ */
diff --git a/e-util/e-iconv.c b/e-util/e-iconv.c
deleted file mode 100644
index 3236521438..0000000000
--- a/e-util/e-iconv.c
+++ /dev/null
@@ -1,614 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-iconv.c
- * Copyright 2000, 2001, Ximian, Inc.
- *
- * Authors:
- * Michael Zucchi <notzed@ximian.com>
- * Jeffery Stedfast <fejj@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, version 2, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-
-#include <glib.h>
-#include "e-iconv.h"
-
-#include <locale.h>
-
-#ifdef HAVE_CODESET
-#include <langinfo.h>
-#endif
-
-#include "iconv-detect.h"
-
-#define cd(x)
-
-#ifdef G_THREADS_ENABLED
-static GStaticMutex lock = G_STATIC_MUTEX_INIT;
-#define LOCK() g_static_mutex_lock(&lock)
-#define UNLOCK() g_static_mutex_unlock(&lock)
-#else
-#define LOCK()
-#define UNLOCK()
-#endif
-
-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 }
-
-struct _iconv_cache_node {
- struct _iconv_cache_node *next;
- struct _iconv_cache_node *prev;
-
- struct _iconv_cache *parent;
-
- int busy;
- iconv_t ip;
-};
-
-struct _iconv_cache {
- struct _iconv_cache *next;
- struct _iconv_cache *prev;
-
- char *conv;
-
- EDList open; /* stores iconv_cache_nodes, busy ones up front */
-};
-
-#define E_ICONV_CACHE_SIZE (16)
-
-static EDList iconv_cache_list;
-static GHashTable *iconv_cache;
-static GHashTable *iconv_cache_open;
-static unsigned int iconv_cache_size = 0;
-
-static GHashTable *iconv_charsets = NULL;
-static char *locale_charset = NULL;
-static char *locale_lang = NULL;
-
-struct {
- char *charset;
- char *iconv_name;
-} known_iconv_charsets[] = {
-#if 0
- /* 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 e_iconv_charset_name() 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
- e_iconv_charset_name() so I'm not going to bother
- putting them all in here either... */
-#endif
- /* charset name (lowercase!), iconv-friendly name (sometimes case sensitive) */
- { "utf-8", "UTF-8" },
-
- /* 10646 is a special case, its usually UCS-2 big endian */
- /* This might need some checking but should be ok for solaris/linux */
- { "iso-10646-1", "UCS-2BE" },
- { "iso_10646-1", "UCS-2BE" },
- { "iso10646-1", "UCS-2BE" },
- { "iso-10646", "UCS-2BE" },
- { "iso_10646", "UCS-2BE" },
- { "iso10646", "UCS-2BE" },
-
- { "ks_c_5601-1987", "EUC-KR" },
-
- /* FIXME: Japanese/Korean/Chinese stuff needs checking */
- { "euckr-0", "EUC-KR" },
- { "5601", "EUC-KR" },
- { "zh_TW-euc", "EUC-TW" },
- { "zh_CN.euc", "gb2312" },
- { "zh_TW-big5", "BIG5" },
- { "euc-cn", "gb2312" },
- { "big5-0", "BIG5" },
- { "big5.eten-0", "BIG5" },
- { "big5hkscs-0", "BIG5HKSCS" },
- { "gb2312-0", "gb2312" },
- { "gb2312.1980-0", "gb2312" },
- { "gb-2312", "gb2312" },
- { "gb18030-0", "gb18030" },
- { "gbk-0", "GBK" },
-
- { "eucjp-0", "eucJP" },
- { "ujis-0", "ujis" },
- { "jisx0208.1983-0","SJIS" },
- { "jisx0212.1990-0","SJIS" },
- { "pck", "SJIS" },
- { NULL, NULL }
-};
-
-
-
-/* Another copy of this trivial list implementation
- Why? This stuff gets called a lot (potentially), should run fast,
- and g_list's are f@@#$ed up to make this a hassle */
-static void e_dlist_init(EDList *v)
-{
- v->head = (EDListNode *)&v->tail;
- v->tail = 0;
- v->tailpred = (EDListNode *)&v->head;
-}
-
-static 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;
-}
-
-static 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;
-}
-
-static EDListNode *e_dlist_remove(EDListNode *n)
-{
- n->next->prev = n->prev;
- n->prev->next = n->next;
- return n;
-}
-
-
-/* fucking glib... */
-static const char *
-e_strdown (char *str)
-{
- register char *s = str;
-
- while (*s) {
- if (*s >= 'A' && *s <= 'Z')
- *s += 0x20;
- s++;
- }
-
- return str;
-}
-
-static const char *
-e_strup (char *str)
-{
- register char *s = str;
-
- while (*s) {
- if (*s >= 'a' && *s <= 'z')
- *s -= 0x20;
- s++;
- }
-
- return str;
-}
-
-
-static void
-locale_parse_lang (const char *locale)
-{
- char *codeset, *lang;
-
- if ((codeset = strchr (locale, '.')))
- lang = g_strndup (locale, codeset - locale);
- else
- lang = g_strdup (locale);
-
- /* validate the language */
- if (strlen (lang) >= 2) {
- if (lang[2] == '-' || lang[2] == '_') {
- /* canonicalise the lang */
- e_strdown (lang);
-
- /* validate the country code */
- if (strlen (lang + 3) > 2) {
- /* invalid country code */
- lang[2] = '\0';
- } else {
- lang[2] = '-';
- e_strup (lang + 3);
- }
- } else if (lang[2] != '\0') {
- /* invalid language */
- g_free (lang);
- lang = NULL;
- }
-
- locale_lang = lang;
- } else {
- /* invalid language */
- locale_lang = NULL;
- g_free (lang);
- }
-}
-
-/* NOTE: Owns the lock on return if keep is TRUE ! */
-static void
-e_iconv_init(int keep)
-{
- char *from, *to, *locale;
- int i;
-
- LOCK();
-
- if (iconv_charsets != NULL) {
- if (!keep)
- UNLOCK();
- return;
- }
-
- iconv_charsets = g_hash_table_new(g_str_hash, g_str_equal);
-
- for (i = 0; known_iconv_charsets[i].charset != NULL; i++) {
- from = g_strdup(known_iconv_charsets[i].charset);
- to = g_strdup(known_iconv_charsets[i].iconv_name);
- e_strdown (from);
- g_hash_table_insert(iconv_charsets, from, to);
- }
-
- e_dlist_init(&iconv_cache_list);
- iconv_cache = g_hash_table_new(g_str_hash, g_str_equal);
- iconv_cache_open = g_hash_table_new(NULL, NULL);
-
- 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;
- locale_lang = NULL;
- } else {
-#ifdef HAVE_CODESET
- locale_charset = g_strdup (nl_langinfo (CODESET));
- e_strdown (locale_charset);
-#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 *codeset, *p;
-
- codeset = strchr (locale, '.');
- if (codeset) {
- codeset++;
-
- /* ; is a hack for debian systems and / is a hack for Solaris systems */
- for (p = codeset; *p && !strchr ("@;/", *p); p++);
- locale_charset = g_strndup (codeset, p - codeset);
- e_strdown (locale_charset);
- } else {
- /* charset unknown */
- locale_charset = NULL;
- }
-#endif
-
- /* parse the locale lang */
- locale_parse_lang (locale);
-
- }
-
- if (!keep)
- UNLOCK();
-}
-
-const char *e_iconv_charset_name(const char *charset)
-{
- char *name, *ret, *tmp;
-
- if (charset == NULL)
- return NULL;
-
- name = g_alloca (strlen (charset) + 1);
- strcpy (name, charset);
- e_strdown (name);
-
- e_iconv_init(TRUE);
- ret = g_hash_table_lookup(iconv_charsets, name);
- if (ret != NULL) {
- UNLOCK();
- return ret;
- }
-
- /* Unknown, try canonicalise some basic charset types to something that should work */
- if (strncmp(name, "iso", 3) == 0) {
- /* Convert iso-nnnn-n or isonnnn-n or iso_nnnn-n to iso-nnnn-n or isonnnn-n */
- int iso, codepage;
- char *p;
-
- tmp = name + 3;
- if (*tmp == '-' || *tmp == '_')
- tmp++;
-
- iso = strtoul (tmp, &p, 10);
-
- if (iso == 10646) {
- /* they all become ICONV_10646 */
- ret = g_strdup (ICONV_10646);
- } else {
- tmp = p;
- if (*tmp == '-' || *tmp == '_')
- tmp++;
-
- codepage = strtoul (tmp, &p, 10);
-
- if (p > tmp) {
- /* codepage is numeric */
-#ifdef __aix__
- if (codepage == 13)
- ret = g_strdup ("IBM-921");
- else
-#endif /* __aix__ */
- ret = g_strdup_printf (ICONV_ISO_D_FORMAT, iso, codepage);
- } else {
- /* codepage is a string - probably iso-2022-jp or something */
- ret = g_strdup_printf (ICONV_ISO_S_FORMAT, iso, p);
- }
- }
- } else if (strncmp(name, "windows-", 8) == 0) {
- /* Convert windows-nnnnn or windows-cpnnnnn to cpnnnn */
- tmp = name+8;
- if (!strncmp(tmp, "cp", 2))
- tmp+=2;
- ret = g_strdup_printf("CP%s", tmp);
- } else if (strncmp(name, "microsoft-", 10) == 0) {
- /* Convert microsoft-nnnnn or microsoft-cpnnnnn to cpnnnn */
- tmp = name+10;
- if (!strncmp(tmp, "cp", 2))
- tmp+=2;
- ret = g_strdup_printf("CP%s", tmp);
- } else {
- /* Just assume its ok enough as is, case and all */
- ret = g_strdup(charset);
- }
-
- g_hash_table_insert(iconv_charsets, g_strdup(name), ret);
- UNLOCK();
-
- return ret;
-}
-
-static void
-flush_entry(struct _iconv_cache *ic)
-{
- struct _iconv_cache_node *in, *nn;
-
- in = (struct _iconv_cache_node *)ic->open.head;
- nn = in->next;
- while (nn) {
- if (in->ip != (iconv_t)-1) {
- g_hash_table_remove(iconv_cache_open, in->ip);
- iconv_close(in->ip);
- }
- g_free(in);
- in = nn;
- nn = in->next;
- }
- g_free(ic->conv);
- g_free(ic);
-}
-
-/* This should run pretty quick, its called a lot */
-iconv_t e_iconv_open(const char *oto, const char *ofrom)
-{
- const char *to, *from;
- char *tofrom;
- struct _iconv_cache *ic;
- struct _iconv_cache_node *in;
- int errnosav;
- iconv_t ip;
-
- if (oto == NULL || ofrom == NULL) {
- errno = EINVAL;
- return (iconv_t) -1;
- }
-
- to = e_iconv_charset_name (oto);
- from = e_iconv_charset_name (ofrom);
- tofrom = g_alloca (strlen (to) + strlen (from) + 2);
- sprintf(tofrom, "%s%%%s", to, from);
-
- LOCK();
-
- ic = g_hash_table_lookup(iconv_cache, tofrom);
- if (ic) {
- e_dlist_remove((EDListNode *)ic);
- } else {
- struct _iconv_cache *last = (struct _iconv_cache *)iconv_cache_list.tailpred;
- struct _iconv_cache *prev;
-
- prev = last->prev;
- while (prev && iconv_cache_size > E_ICONV_CACHE_SIZE) {
- in = (struct _iconv_cache_node *)last->open.head;
- if (in->next && !in->busy) {
- cd(printf("Flushing iconv converter '%s'\n", last->conv));
- e_dlist_remove((EDListNode *)last);
- g_hash_table_remove(iconv_cache, last->conv);
- flush_entry(last);
- iconv_cache_size--;
- }
- last = prev;
- prev = last->prev;
- }
-
- iconv_cache_size++;
-
- ic = g_malloc(sizeof(*ic));
- e_dlist_init(&ic->open);
- ic->conv = g_strdup(tofrom);
- g_hash_table_insert(iconv_cache, ic->conv, ic);
-
- cd(printf("Creating iconv converter '%s'\n", ic->conv));
- }
- e_dlist_addhead(&iconv_cache_list, (EDListNode *)ic);
-
- /* If we have a free iconv, use it */
- in = (struct _iconv_cache_node *)ic->open.tailpred;
- if (in->prev && !in->busy) {
- cd(printf("using existing iconv converter '%s'\n", ic->conv));
- ip = in->ip;
- if (ip != (iconv_t)-1) {
- /* work around some broken iconv implementations
- * that die if the length arguments are NULL
- */
- size_t buggy_iconv_len = 0;
- char *buggy_iconv_buf = NULL;
-
- /* resets the converter */
- iconv(ip, &buggy_iconv_buf, &buggy_iconv_len, &buggy_iconv_buf, &buggy_iconv_len);
- in->busy = TRUE;
- e_dlist_remove((EDListNode *)in);
- e_dlist_addhead(&ic->open, (EDListNode *)in);
- }
- } else {
- cd(printf("creating new iconv converter '%s'\n", ic->conv));
- ip = iconv_open(to, from);
- in = g_malloc(sizeof(*in));
- in->ip = ip;
- in->parent = ic;
- e_dlist_addhead(&ic->open, (EDListNode *)in);
- if (ip != (iconv_t)-1) {
- g_hash_table_insert(iconv_cache_open, ip, in);
- in->busy = TRUE;
- } else {
- errnosav = errno;
- g_warning("Could not open converter for '%s' to '%s' charset", from, to);
- in->busy = FALSE;
- errno = errnosav;
- }
- }
-
- UNLOCK();
-
- return ip;
-}
-
-size_t e_iconv(iconv_t cd, const char **inbuf, size_t *inbytesleft, char ** outbuf, size_t *outbytesleft)
-{
- return iconv(cd, (char **) inbuf, inbytesleft, outbuf, outbytesleft);
-}
-
-void
-e_iconv_close(iconv_t ip)
-{
- struct _iconv_cache_node *in;
-
- if (ip == (iconv_t)-1)
- return;
-
- LOCK();
- in = g_hash_table_lookup(iconv_cache_open, ip);
- if (in) {
- cd(printf("closing iconv converter '%s'\n", in->parent->conv));
- e_dlist_remove((EDListNode *)in);
- in->busy = FALSE;
- e_dlist_addtail(&in->parent->open, (EDListNode *)in);
- } else {
- g_warning("trying to close iconv i dont know about: %p", ip);
- iconv_close(ip);
- }
- UNLOCK();
-
-}
-
-const char *e_iconv_locale_charset(void)
-{
- e_iconv_init(FALSE);
-
- return locale_charset;
-}
-
-
-const char *
-e_iconv_locale_language (void)
-{
- e_iconv_init (FALSE);
-
- return locale_lang;
-}
-
-/* map CJKR charsets to their language code */
-/* NOTE: only support charset names that will be returned by
- * e_iconv_charset_name() so that we don't have to keep track of all
- * the aliases too. */
-static struct {
- char *charset;
- char *lang;
-} cjkr_lang_map[] = {
- { "Big5", "zh" },
- { "BIG5HKSCS", "zh" },
- { "gb2312", "zh" },
- { "gb18030", "zh" },
- { "gbk", "zh" },
- { "euc-tw", "zh" },
- { "iso-2022-jp", "ja" },
- { "sjis", "ja" },
- { "ujis", "ja" },
- { "eucJP", "ja" },
- { "euc-jp", "ja" },
- { "euc-kr", "ko" },
- { "koi8-r", "ru" },
- { "koi8-u", "uk" }
-};
-
-#define NUM_CJKR_LANGS (sizeof (cjkr_lang_map) / sizeof (cjkr_lang_map[0]))
-
-const char *
-e_iconv_charset_language (const char *charset)
-{
- int i;
-
- if (!charset)
- return NULL;
-
- charset = e_iconv_charset_name (charset);
- for (i = 0; i < NUM_CJKR_LANGS; i++) {
- if (!strcasecmp (cjkr_lang_map[i].charset, charset))
- return cjkr_lang_map[i].lang;
- }
-
- return NULL;
-}
diff --git a/e-util/e-iconv.h b/e-util/e-iconv.h
deleted file mode 100644
index 14b93853d5..0000000000
--- a/e-util/e-iconv.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-iconv.h
- * Copyright 2000, 2001, Ximian, Inc.
- *
- * Authors:
- * Michael Zucchi <notzed@ximian.com>
- * Jeffrey Stedfast <fejj@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, version 2, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef _E_ICONV_H_
-#define _E_ICONV_H_
-
-#include <iconv.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-const char *e_iconv_charset_name(const char *charset);
-iconv_t e_iconv_open(const char *oto, const char *ofrom);
-size_t e_iconv(iconv_t cd, const char **inbuf, size_t *inbytesleft, char ** outbuf, size_t *outbytesleft);
-void e_iconv_close(iconv_t ip);
-const char *e_iconv_locale_charset(void);
-
-/* languages */
-const char *e_iconv_locale_language (void);
-const char *e_iconv_charset_language (const char *charset);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* !_E_ICONV_H_ */
diff --git a/e-util/e-iterator.c b/e-util/e-iterator.c
deleted file mode 100644
index d3575a0645..0000000000
--- a/e-util/e-iterator.c
+++ /dev/null
@@ -1,183 +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-iterator.h"
-#include "e-util-marshal.h"
-
-static void e_iterator_init (EIterator *card);
-static void e_iterator_class_init (EIteratorClass *klass);
-
-#define PARENT_TYPE G_TYPE_OBJECT
-
-static GObjectClass *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.
- **/
-GType
-e_iterator_get_type (void)
-{
- static GType type = 0;
-
- if (! type) {
- GTypeInfo info = {
- sizeof (EIteratorClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) e_iterator_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EIterator),
- 0, /* n_preallocs */
- (GInstanceInitFunc) e_iterator_init
- };
-
- type = g_type_register_static (PARENT_TYPE, "EIterator", &info, 0);
- }
-
- return type;
-}
-
-static void
-e_iterator_class_init (EIteratorClass *klass)
-{
- GObjectClass *object_class;
-
- object_class = G_OBJECT_CLASS(klass);
-
- parent_class = g_type_class_ref (PARENT_TYPE);
-
- e_iterator_signals [INVALIDATE] =
- g_signal_new ("invalidate",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EIteratorClass, invalidate),
- NULL, NULL,
- e_util_marshal_NONE__NONE, /* XXX need a new marshaller here */
- G_TYPE_NONE, 0);
-
- 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 (E_ITERATOR_GET_CLASS(iterator)->get)
- return E_ITERATOR_GET_CLASS(iterator)->get(iterator);
- else
- return NULL;
-}
-
-void
-e_iterator_reset (EIterator *iterator)
-{
- if (E_ITERATOR_GET_CLASS(iterator)->reset)
- E_ITERATOR_GET_CLASS(iterator)->reset(iterator);
-}
-
-void
-e_iterator_last (EIterator *iterator)
-{
- if (E_ITERATOR_GET_CLASS(iterator)->last)
- E_ITERATOR_GET_CLASS(iterator)->last(iterator);
-}
-
-gboolean
-e_iterator_next (EIterator *iterator)
-{
- if (E_ITERATOR_GET_CLASS(iterator)->next)
- return E_ITERATOR_GET_CLASS(iterator)->next(iterator);
- else
- return FALSE;
-}
-
-gboolean
-e_iterator_prev (EIterator *iterator)
-{
- if (E_ITERATOR_GET_CLASS(iterator)->prev)
- return E_ITERATOR_GET_CLASS(iterator)->prev(iterator);
- else
- return FALSE;
-}
-
-void
-e_iterator_delete (EIterator *iterator)
-{
- if (E_ITERATOR_GET_CLASS(iterator)->delete)
- E_ITERATOR_GET_CLASS(iterator)->delete(iterator);
-}
-
-void e_iterator_insert (EIterator *iterator,
- const void *object,
- gboolean before)
-{
- if (E_ITERATOR_GET_CLASS(iterator)->insert)
- E_ITERATOR_GET_CLASS(iterator)->insert(iterator, object, before);
-}
-
-void
-e_iterator_set (EIterator *iterator,
- const void *object)
-{
- if (E_ITERATOR_GET_CLASS(iterator)->set)
- E_ITERATOR_GET_CLASS(iterator)->set(iterator, object);
-}
-
-gboolean
-e_iterator_is_valid (EIterator *iterator)
-{
- if (E_ITERATOR_GET_CLASS(iterator)->is_valid)
- return E_ITERATOR_GET_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));
-
- g_signal_emit (iterator, e_iterator_signals [INVALIDATE], 0);
-}
diff --git a/e-util/e-iterator.h b/e-util/e-iterator.h
deleted file mode 100644
index 9dae97cc3a..0000000000
--- a/e-util/e-iterator.h
+++ /dev/null
@@ -1,71 +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 <glib.h>
-#include <glib-object.h>
-
-#define E_TYPE_ITERATOR (e_iterator_get_type ())
-#define E_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_ITERATOR, EIterator))
-#define E_ITERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_ITERATOR, EIteratorClass))
-#define E_IS_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_ITERATOR))
-#define E_IS_ITERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_ITERATOR))
-#define E_ITERATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), E_TYPE_ITERATOR, EIteratorClass))
-
-typedef struct _EIterator EIterator;
-typedef struct _EIteratorClass EIteratorClass;
-
-struct _EIterator {
- GObject object;
-};
-
-struct _EIteratorClass {
- GObjectClass 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 Glib function */
-GType e_iterator_get_type (void);
-
-#endif /* ! __E_ITERATOR_H__ */
diff --git a/e-util/e-lang-utils.c b/e-util/e-lang-utils.c
deleted file mode 100644
index 564b4a353d..0000000000
--- a/e-util/e-lang-utils.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-lang-utils.c - Utility functions for multi-language support.
- *
- * Copyright (C) 2002 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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>
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "e-lang-utils.h"
-
-#include <string.h>
-
-
-GSList *
-e_get_language_list (void)
-{
- GSList *list = NULL;
- const char *env;
- const char *p;
-
- env = g_getenv ("LANGUAGE");
- if (env == NULL) {
- env = g_getenv ("LANG");
- if (env == NULL)
- return NULL;
- }
-
- p = strchr (env, '=');
- if (p != NULL)
- env = p;
-
- list = g_slist_prepend (list, g_strdup (env));
-
- p = strchr (env, '_');
- if (p != NULL)
- list = g_slist_prepend (list, g_strndup (env, p - env));
-
- return list;
-}
-
-void
-e_free_language_list (GSList *list)
-{
- GSList *iter;
-
- for (iter = list; iter; iter = iter->next)
- g_free (iter->data);
-
- g_slist_free (list);
-}
diff --git a/e-util/e-lang-utils.h b/e-util/e-lang-utils.h
deleted file mode 100644
index 135d98db7a..0000000000
--- a/e-util/e-lang-utils.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-lang-utils.h - Utility functions for multi-language support.
- *
- * Copyright (C) 2002 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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_LANG_UTILS_H
-#define E_LANG_UTILS_H
-
-#include <glib.h>
-
-GSList *e_get_language_list (void);
-void e_free_language_list (GSList *list);
-
-#endif /* E_LANG_UTILS_H */
diff --git a/e-util/e-list-iterator.c b/e-util/e-list-iterator.c
deleted file mode 100644
index e801c22ef8..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_dispose (GObject *object);
-
-#define PARENT_TYPE E_TYPE_ITERATOR
-
-static EIteratorClass *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.
- **/
-GType
-e_list_iterator_get_type (void)
-{
- static GType type = 0;
-
- if (! type) {
- GTypeInfo info = {
- sizeof (EListIteratorClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) e_list_iterator_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EListIterator),
- 0, /* n_preallocs */
- (GInstanceInitFunc) e_list_iterator_init
- };
-
- type = g_type_register_static (PARENT_TYPE, "EListIterator", &info, 0);
- }
-
- return type;
-}
-
-static void
-e_list_iterator_class_init (EListIteratorClass *klass)
-{
- GObjectClass *object_class;
- EIteratorClass *iterator_class;
-
- object_class = G_OBJECT_CLASS(klass);
- iterator_class = E_ITERATOR_CLASS(klass);
-
- parent_class = g_type_class_ref (PARENT_TYPE);
-
- object_class->dispose = e_list_iterator_dispose;
-
- 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 = g_object_new (E_TYPE_LIST_ITERATOR, NULL);
-
- iterator->list = list;
- g_object_ref(list);
- iterator->iterator = list->list;
-
- return E_ITERATOR(iterator);
-}
-
-/*
- * Virtual functions:
- */
-static void
-e_list_iterator_dispose (GObject *object)
-{
- EListIterator *iterator = E_LIST_ITERATOR(object);
- e_list_remove_iterator(iterator->list, E_ITERATOR(iterator));
- g_object_unref(iterator->list);
-
- if (G_OBJECT_CLASS (parent_class)->dispose)
- (* G_OBJECT_CLASS (parent_class)->dispose) (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 b3a8953d80..0000000000
--- a/e-util/e-list-iterator.h
+++ /dev/null
@@ -1,46 +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 <glib.h>
-#include <glib-object.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) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_LIST_ITERATOR, EListIterator))
-#define E_LIST_ITERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_LIST_ITERATOR, EListIteratorClass))
-#define E_IS_LIST_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_LIST_ITERATOR))
-#define E_IS_LIST_ITERATOR_CLASS(klass) (G_TYPE_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 Glib function */
-GType 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 f1b190b16a..0000000000
--- a/e-util/e-list.c
+++ /dev/null
@@ -1,191 +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"
-
-static void e_list_init (EList *list);
-static void e_list_class_init (EListClass *klass);
-static void e_list_dispose (GObject *object);
-
-static GObjectClass *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.
- **/
-GType
-e_list_get_type (void)
-{
- static GType type = 0;
-
- if (! type) {
- GTypeInfo info = {
- sizeof (EListClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) e_list_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EList),
- 0, /* n_preallocs */
- (GInstanceInitFunc) e_list_init
- };
-
- type = g_type_register_static (G_TYPE_OBJECT, "EList", &info, 0);
- }
-
- return type;
-}
-
-static void
-e_list_class_init (EListClass *klass)
-{
- GObjectClass *object_class;
-
- object_class = G_OBJECT_CLASS(klass);
-
- parent_class = g_type_class_ref (G_TYPE_OBJECT);
-
- object_class->dispose = e_list_dispose;
-}
-
-/**
- * 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 = g_object_new (E_TYPE_LIST, NULL);
- e_list_construct (list, copy, free, closure);
- return list;
-}
-
-void
-e_list_construct (EList *list, EListCopyFunc copy, EListFreeFunc free, void *closure)
-{
- list->copy = copy;
- list->free = free;
- list->closure = closure;
-}
-
-EList *
-e_list_duplicate (EList *old)
-{
- EList *list = g_object_new (E_TYPE_LIST, NULL);
-
- 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_remove (EList *list, const void *data)
-{
- GList *link;
- link = g_list_find (list->list, data);
- if (link)
- e_list_remove_link(list, link);
-}
-
-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_dispose (GObject *object)
-{
- EList *list = E_LIST(object);
- if (list->free)
- g_list_foreach(list->list, (GFunc) list->free, list->closure);
- g_list_free(list->list);
-
- (* G_OBJECT_CLASS (parent_class)->dispose) (object);
-}
-
diff --git a/e-util/e-list.h b/e-util/e-list.h
deleted file mode 100644
index d249fcfa4a..0000000000
--- a/e-util/e-list.h
+++ /dev/null
@@ -1,71 +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 <glib.h>
-#include <glib-object.h>
-#include <e-util/e-list-iterator.h>
-
-#define E_TYPE_LIST (e_list_get_type ())
-#define E_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_LIST, EList))
-#define E_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_LIST, EListClass))
-#define E_IS_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_LIST))
-#define E_IS_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_LIST))
-#define E_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), E_TYPE_LIST, EListClass))
-
-typedef void *(*EListCopyFunc) (const void *data, void *closure);
-typedef void (*EListFreeFunc) (void *data, void *closure);
-
-struct _EList {
- GObject object;
- GList *list;
- GList *iterators;
- EListCopyFunc copy;
- EListFreeFunc free;
- void *closure;
-};
-
-struct _EListClass {
- GObjectClass parent_class;
-};
-
-EList *e_list_new (EListCopyFunc copy,
- EListFreeFunc free,
- void *closure);
-void e_list_construct (EList *list,
- 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);
-void e_list_remove (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 Glib function */
-GType e_list_get_type (void);
-
-#endif /* ! __E_LIST_H__ */
diff --git a/e-util/e-marshal.list b/e-util/e-marshal.list
deleted file mode 100644
index 92496dbd7b..0000000000
--- a/e-util/e-marshal.list
+++ /dev/null
@@ -1,51 +0,0 @@
-BOOLEAN:INT,INT,OBJECT,INT,INT,UINT
-BOOLEAN:INT,POINTER,INT,OBJECT,INT,INT,UINT
-BOOLEAN:NONE
-BOOLEAN:OBJECT
-BOOLEAN:OBJECT,DOUBLE,DOUBLE,BOOLEAN
-BOOLEAN:POINTER,POINTER,INT,INT,INT
-BOOLEAN:POINTER,POINTER,POINTER,INT,INT,INT
-BOOLEAN:STRING,INT
-DOUBLE:OBJECT,DOUBLE,DOUBLE,BOOLEAN
-INT:BOXED
-INT:INT
-INT:INT,INT,BOXED
-INT:INT,POINTER,INT,BOXED
-INT:OBJECT,BOXED
-INT:POINTER
-NONE:BOXED
-NONE:BOXED,INT
-NONE:BOXED,INT,INT
-NONE:DOUBLE
-NONE:INT
-NONE:INT,INT
-NONE:INT,INT,BOXED
-NONE:INT,INT,OBJECT
-NONE:INT,INT,OBJECT,BOXED,UINT,UINT
-NONE:INT,INT,OBJECT,INT,INT,BOXED,UINT,UINT
-NONE:INT,INT,OBJECT,POINTER,UINT,UINT
-NONE:INT,INT,OBJECT,UINT
-NONE:INT,INT,STRING,STRING
-NONE:INT,INT,STRING,STRING,POINTER
-NONE:INT,POINTER
-NONE:INT,POINTER,INT,BOXED
-NONE:INT,POINTER,INT,OBJECT
-NONE:INT,POINTER,INT,OBJECT,BOXED,UINT,UINT
-NONE:INT,POINTER,INT,OBJECT,INT,INT,BOXED,UINT,UINT
-NONE:INT,POINTER,INT,OBJECT,UINT
-NONE:INT,STRING
-NONE:NONE
-NONE:OBJECT
-NONE:OBJECT,OBJECT
-NONE:OBJECT,DOUBLE,DOUBLE,BOOLEAN
-NONE:POINTER
-NONE:POINTER,BOOLEAN
-NONE:POINTER,BOOLEAN,BOOLEAN,BOOLEAN
-NONE:POINTER,INT
-NONE:POINTER,INT,INT
-NONE:POINTER,INT,INT,INT
-NONE:POINTER,INT,OBJECT
-NONE:POINTER,POINTER
-NONE:POINTER,POINTER,INT
-OBJECT:OBJECT,DOUBLE,DOUBLE,BOOLEAN
-POINTER:NONE
diff --git a/e-util/e-memory.c b/e-util/e-memory.c
deleted file mode 100644
index cf32147d75..0000000000
--- a/e-util/e-memory.c
+++ /dev/null
@@ -1,1306 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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, (GCompareFunc) 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) {
- MemChunkFreeNode *prev = NULL;
-
- f = m->free;
- while (f) {
- if (tree_search (ci, (void *) f) == 0) {
- /* prune this node from our free-node list */
- if (prev)
- prev->next = f->next;
- else
- m->free = f->next;
- } else {
- prev = f;
- }
-
- f = f->next;
- }
-
- 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;
-static unsigned long poolv_mem, poolv_count;
-#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 *)));
-
-#ifdef PROFILE_POOLV
- poolv_count++;
-#endif
- 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, memory: %lu, instances: %lu\n",
- poolv_hits, poolv_misses,
- (int)(100.0 * ((double) poolv_hits / (double) (poolv_hits + poolv_misses))),
- poolv_mem, poolv_count);
-
- 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_mem += strlen(str);
- 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_mem += strlen(str);
- 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
-
-#ifdef PROFILE_POOLV
- poolv_count++;
-#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 9cc89f2f23..0000000000
--- a/e-util/e-memory.h
+++ /dev/null
@@ -1,74 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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-meta.c b/e-util/e-meta.c
deleted file mode 100644
index a4c0ad562b..0000000000
--- a/e-util/e-meta.c
+++ /dev/null
@@ -1,521 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Michael Zucchi <notzed@ximian.com>
- *
- * Copyright 2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 HAVE_ALLOCA_H
-#include <alloca.h>
-#endif
-
-#include <glib.h>
-
-#include <libxml/parser.h>
-#include <libxml/tree.h>
-#include <libxml/xmlmemory.h>
-
-#include <sys/stat.h>
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-
-#include <gal/util/e-xml-utils.h>
-#include <gal/util/e-util.h>
-#include "e-meta.h"
-
-static GObjectClass *e_meta_parent_class;
-
-struct _meta_data {
- struct _meta_data *next;
-
- char *md_key;
- char *md_value;
-};
-
-struct _EMetaPrivate {
- char *path;
- struct _meta_data *data;
- gulong sync_id;
- /* if set, we wont try and save/etc */
- unsigned int deleted:1;
-};
-
-static int meta_save(EMeta *em)
-{
- struct _EMetaPrivate *p = em->priv;
- xmlDocPtr doc;
- xmlNodePtr root, work;
- struct _meta_data *md;
- int res;
- char *dir;
- struct stat st;
-
- if (p->deleted)
- return 0;
-
- /* since we can, build the full path if we need to */
- dir = g_path_get_dirname(p->path);
- if (stat(dir, &st) == -1) {
- e_mkdir_hier(dir, 0777);
- g_free(dir);
- }
-
- /* of course, saving in xml is overkill, but everyone loves this shit ... */
-
- doc = xmlNewDoc("1.0");
- root = xmlNewDocNode(doc, NULL, "e-meta-data", NULL);
- xmlDocSetRootElement(doc, root);
-
- md = p->data;
- while (md) {
- work = xmlNewChild(root, NULL, "item", NULL);
- xmlSetProp(work, "name", md->md_key);
- xmlSetProp(work, "value", md->md_value);
- md = md->next;
- }
-
- res = e_xml_save_file(p->path, doc);
- if (res != 0)
- g_warning("Could not save folder meta-data `%s': %s", p->path, g_strerror(errno));
-
- xmlFreeDoc(doc);
-
- return res;
-}
-
-static int meta_load(EMeta *em)
-{
- struct _EMetaPrivate *p = em->priv;
- struct _meta_data *tail, *md;
- xmlDocPtr doc = NULL;
- xmlNodePtr root, work;
- char *name, *val;
- struct stat st;
-
- if (stat (p->path, &st) == -1 || !S_ISREG (st.st_mode))
- return -1;
-
- doc = xmlParseFile(p->path);
- if (doc == NULL)
- return -1;
-
- root = xmlDocGetRootElement(doc);
- if (root == NULL || strcmp(root->name, "e-meta-data")) {
- xmlFreeDoc(doc);
- errno = EINVAL;
- return -1;
- }
-
- work = root->children;
- tail = (struct _meta_data *)&p->data;
- while (work) {
- if (strcmp(work->name, "item") == 0) {
- name = xmlGetProp(work, "name");
- val = xmlGetProp(work, "value");
- if (name && val) {
- md = g_malloc(sizeof(*md));
- md->md_key = g_strdup(name);
- md->md_value = g_strdup(val);
- md->next = NULL;
- tail->next = md;
- tail = md;
- }
- if (name)
- xmlFree(name);
- if (val)
- xmlFree(val);
- }
- work = work->next;
- }
-
- xmlFreeDoc(doc);
-
- return 0;
-}
-
-static struct _meta_data *meta_find(EMeta *em, const char *key, struct _meta_data **mpp)
-{
- struct _meta_data *mp = (struct _meta_data *)&em->priv->data;
- struct _meta_data *md = mp->next;
-
- while (md && strcmp(md->md_key, key) != 0) {
- mp = md;
- md = md->next;
- }
-
- *mpp = mp;
-
- return md;
-}
-
-static void meta_free(struct _meta_data *md)
-{
- g_free(md->md_key);
- g_free(md->md_value);
- g_free(md);
-}
-
-static void
-e_meta_init (EMeta *em)
-{
- em->priv = g_malloc0(sizeof(*em->priv));
-}
-
-static void
-e_meta_finalise(GObject *crap)
-{
- EMeta *em = (EMeta *)crap;
- struct _EMetaPrivate *p = em->priv;
- struct _meta_data *md, *mn;
-
- if (p->sync_id != 0)
- e_meta_sync(em);
-
- md = p->data;
- while (md) {
- mn = md->next;
- meta_free(md);
- md = mn;
- }
-
- g_free(p->path);
- g_free(p);
- e_meta_parent_class->finalize((GObject *)em);
-}
-
-static void
-e_meta_class_init (EMetaClass *klass)
-{
- GObjectClass *object_class;
-
- object_class = G_OBJECT_CLASS(klass);
-
- e_meta_parent_class = g_type_class_ref (G_TYPE_OBJECT);
-
- ((GObjectClass *)klass)->finalize = e_meta_finalise;
-}
-
-static GTypeInfo e_meta_type_info = {
- sizeof (EMetaClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) e_meta_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EMeta),
- 0, /* n_preallocs */
- (GInstanceInitFunc) e_meta_init
-};
-
-static GType e_meta_type;
-
-GType
-e_meta_get_type (void)
-{
- return e_meta_type?e_meta_type:(e_meta_type = g_type_register_static (G_TYPE_OBJECT, "EMeta", &e_meta_type_info, 0));
-}
-
-/**
- * e_meta_new:
- * @path: full path to meta-data storage object.
- *
- * Create a new meta-data storage object. Any existing meta-data stored for
- * this key will be loaded.
- *
- * Return value:
- **/
-EMeta *
-e_meta_new(const char *path)
-{
- EMeta *em;
-
- em = g_object_new(e_meta_get_type(), NULL);
- em->priv->path = g_strdup(path);
- meta_load(em);
-
- return em;
-}
-
-static gboolean
-meta_flush(EMeta *em)
-{
- em->priv->sync_id = 0;
- meta_save(em);
-
- return FALSE;
-}
-
-/* returns TRUE if the value changed */
-static int meta_set(EMeta *em, const char *key, const char *val)
-{
- struct _EMetaPrivate *p = em->priv;
- struct _meta_data *md, *mp;
-
- md = meta_find(em, key, &mp);
- if (md == NULL) {
- /* already unset / or new case */
- if (val == NULL)
- return FALSE;
- md = g_malloc0(sizeof(*md));
- md->md_key = g_strdup(key);
- md->next = p->data;
- p->data = md;
- } else if (val == NULL) {
- /* unset case */
- mp->next = md->next;
- meta_free(md);
- return TRUE;
- } else if (strcmp(md->md_value, val) == 0) {
- /* unchanged value */
- return FALSE;
- } else {
- /* changed value */
- g_free(md->md_value);
- }
- md->md_value = g_strdup(val);
-
- return TRUE;
-}
-
-/* get a value, returns NULL if it doesn't exist */
-static const char *meta_get(EMeta *em, const char *key)
-{
- struct _meta_data *md, *mp;
-
- md = meta_find(em, key, &mp);
-
- return md?md->md_value:NULL;
-}
-
-/**
- * e_meta_set:
- * @em:
- * @key:
- * @...: value, key, value, ..., NULL.
- *
- * Set any number of meta-data key-value pairs.
- * Unset a key by passing a value of NULL.
- *
- * If the meta-data set changes as a result of this
- * call, then a sync will be implicitly queued for
- * a later time.
- **/
-void
-e_meta_set(EMeta *em, const char *key, ...)
-{
- struct _EMetaPrivate *p = em->priv;
- const char *val;
- va_list ap;
- int changed = FALSE;
-
- va_start(ap, key);
- while (key != NULL) {
- val = va_arg(ap, const char *);
- changed = meta_set(em, key, val);
- key = va_arg(ap, const char *);
- }
- va_end(ap);
-
- /* todo: could do changed events ? */
-
- if (changed && p->sync_id == 0)
- p->sync_id = g_timeout_add(2000, (GSourceFunc)meta_flush, em);
-}
-
-/**
- * e_meta_get:
- * @em:
- * @key:
- * @...: value, key, value, ..., NULL.
- *
- * Get any number of meta-data key-value pairs.
- **/
-void
-e_meta_get(EMeta *em, const char *key, ...)
-{
- const char **valp;
- va_list ap;
-
- va_start(ap, key);
- while (key) {
- valp = va_arg(ap, const char **);
- *valp = meta_get(em, key);
- key = va_arg(ap, const char *);
- }
- va_end(ap);
-}
-
-/**
- * e_meta_get_bool:
- * @em:
- * @key:
- * @def:
- *
- * Get a boolean value at @key, with a default fallback @def.
- *
- * If the default value is used, then it will become the persistent
- * new value for the key.
- *
- * Return value: The value of the key, or if the key was not
- * previously set, then the new value of the key, @def.
- **/
-gboolean
-e_meta_get_bool(EMeta *em, const char *key, gboolean def)
-{
- const char *v;
-
- v = meta_get(em, key);
- /* this forces the value to become 'static' from first use */
- if (v == NULL) {
- e_meta_set_bool(em, key, def);
- return def;
- }
-
- return atoi(v);
-}
-
-/**
- * e_meta_set_bool:
- * @em:
- * @key:
- * @val:
- *
- * Helper to set a boolean value. Boolean TRUE is mapped to
- * the string "1", FALSE to "0".
- **/
-void
-e_meta_set_bool(EMeta *em, const char *key, gboolean val)
-{
- e_meta_set(em, key, val?"1":"0", NULL);
-}
-
-/**
- * e_meta_sync:
- * @em:
- *
- * Force an explicit and immediate sync of the meta-data to disk.
- *
- * This is not normally required unless part of transactional
- * processing, as updates will always be flushed to disk automatically.
- *
- * Return value: 0 on success.
- **/
-int
-e_meta_sync(EMeta *em)
-{
- struct _EMetaPrivate *p = em->priv;
-
- if (p->sync_id != 0) {
- g_source_remove(p->sync_id);
- p->sync_id = 0;
- }
-
- return meta_save(em);
-}
-
-static GHashTable *e_meta_table;
-
-static char *meta_filename(const char *base, const char *key)
-{
- const char *p;
- char *keyp, *o, c;
-
- p = key;
- o = keyp = alloca(strlen(key)+8);
-
- while ( (c = *p++) ) {
- if (c == '/')
- c = '_';
- *o++ = c;
- }
- strcpy(o, ".emeta");
- o = g_build_filename(base, keyp, NULL);
-
- return o;
-}
-
-static void
-meta_weak_notify(char *path, void *o)
-{
- g_hash_table_remove(e_meta_table, path);
- g_free(path);
-}
-
-/**
- * e_meta_data_lookup:
- * @base: Base storage directory.
- * @key: key for file.
- *
- * Lookup a meta-data object from a storage directory.
- *
- * Return value: The metadata object.
- **/
-EMeta *e_meta_data_find(const char *base, const char *key)
-{
- EMeta *em;
- char *path;
-
- if (e_meta_table == NULL)
- e_meta_table = g_hash_table_new(g_str_hash, g_str_equal);
-
- path = meta_filename(base, key);
- em = g_hash_table_lookup(e_meta_table, path);
- if (em) {
- g_free(path);
- g_object_ref(em);
- return em;
- }
-
- em = e_meta_new(path);
- g_hash_table_insert(e_meta_table, path, em);
- g_object_weak_ref((GObject *)em, (GWeakNotify)meta_weak_notify, path);
-
- return em;
-}
-
-/**
- * e_meta_data_delete:
- * @base:
- * @key:
- *
- * Delete a key from storage. If the key is still cached, it will be
- * marked as deleted, and will not be saved from then on.
- **/
-void e_meta_data_delete(const char *base, const char *key)
-{
- EMeta *em;
- char *path;
-
- path = meta_filename(base, key);
-
- if (e_meta_table && (em = g_hash_table_lookup(e_meta_table, path))) {
- if (em->priv->sync_id) {
- g_source_remove(em->priv->sync_id);
- em->priv->sync_id = 0;
- }
- em->priv->deleted = TRUE;
- }
-
- unlink(path);
- g_free(path);
-}
diff --git a/e-util/e-meta.h b/e-util/e-meta.h
deleted file mode 100644
index 19c23e3a06..0000000000
--- a/e-util/e-meta.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- *
- *
- * A simple persistent meta-data api.
- *
- * Authors: Michael Zucchi <notzed@ximian.com>
- *
- * Copyright 2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_META_H
-#define _E_META_H 1
-
-#include <glib.h>
-#include <glib-object.h>
-
-typedef struct _EMeta EMeta;
-typedef struct _EMetaClass EMetaClass;
-
-struct _EMeta {
- GObject object;
-
- struct _EMetaPrivate *priv;
-};
-
-struct _EMetaClass {
- GObjectClass object;
-};
-
-GType e_meta_get_type (void);
-
-/* 'trivial' meta-data api */
-EMeta *e_meta_new(const char *path);
-void e_meta_set(EMeta *em, const char *key, ...);
-void e_meta_get(EMeta *em, const char *key, ...);
-int e_meta_sync(EMeta *em);
-
-/* helpers */
-gboolean e_meta_get_bool(EMeta *, const char *key, gboolean def);
-void e_meta_set_bool(EMeta *, const char *key, gboolean val);
-
-/* 'class' methods */
-EMeta *e_meta_data_find(const char *base, const char *key);
-void e_meta_data_delete(const char *base, const char *key);
-
-#endif /* ! _E_META_H */
diff --git a/e-util/e-mktemp.c b/e-util/e-mktemp.c
deleted file mode 100644
index 10ac4e1bf6..0000000000
--- a/e-util/e-mktemp.c
+++ /dev/null
@@ -1,271 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <sys/stat.h>
-#include <sys/types.h>
-#include <stdlib.h>
-#include <string.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <dirent.h>
-#include <errno.h>
-
-#ifdef ENABLE_THREADS
-#include <pthread.h>
-#endif
-
-#include "e-mktemp.h"
-
-
-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_append_printf (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) {
- char *full_path;
-
- if (!strcmp (dent->d_name, ".") || !strcmp (dent->d_name, ".."))
- continue;
-
- full_path = g_strdup_printf ("%s/%s", node->data, dent->d_name);
- unlink (full_path);
- g_free (full_path);
- }
- 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 b5eb587d86..0000000000
--- a/e-util/e-mktemp.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 2001 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_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 36ea6cfe8d..0000000000
--- a/e-util/e-msgport.c
+++ /dev/null
@@ -1,1041 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Michael Zucchi <notzed@ximian.com>
- *
- * Copyright 2002 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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/time.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-#include <stdio.h>
-
-#include <pthread.h>
-
-#include <glib.h>
-
-#ifdef HAVE_NSS
-#include <nspr.h>
-#endif
-
-#include "e-msgport.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 count;
-}
-
-struct _EMsgPort {
- EDList queue;
- int condwait; /* how many waiting in condwait */
- union {
- int pipe[2];
- struct {
- int read;
- int write;
- } fd;
- } pipe;
-#ifdef HAVE_NSS
- struct {
- PRFileDesc *read;
- PRFileDesc *write;
- } prpipe;
-#endif
- /* @#@$#$ 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;
-#ifdef HAVE_NSS
- mp->prpipe.read = NULL;
- mp->prpipe.write = NULL;
-#endif
- 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);
- }
-#ifdef HAVE_NSS
- if (mp->prpipe.read) {
- PR_Close(mp->prpipe.read);
- PR_Close(mp->prpipe.write);
- }
-#endif
- 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;
-}
-
-#ifdef HAVE_NSS
-PRFileDesc *e_msgport_prfd(EMsgPort *mp)
-{
- PRFileDesc *fd;
-
- g_mutex_lock(mp->lock);
- fd = mp->prpipe.read;
- if (fd == NULL) {
- PR_CreatePipe(&mp->prpipe.read, &mp->prpipe.write);
- fd = mp->prpipe.read;
- }
- g_mutex_unlock(mp->lock);
-
- return fd;
-}
-#endif
-
-void e_msgport_put(EMsgPort *mp, EMsg *msg)
-{
- int fd;
-#ifdef HAVE_NSS
- PRFileDesc *prfd;
-#endif
-
- 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;
-#ifdef HAVE_NSS
- prfd = mp->prpipe.write;
-#endif
- g_mutex_unlock(mp->lock);
-
- if (fd != -1) {
- m(printf("put: have pipe, writing notification to it\n"));
- write(fd, "", 1);
- }
-
-#ifdef HAVE_NSS
- if (prfd != NULL) {
- m(printf("put: have pr pipe, writing notification to it\n"));
- PR_Write(prfd, "", 1);
- }
-#endif
- 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) {
- fd_set rfds;
- int retry;
-
- m(printf("wait: waitng on pipe\n"));
- g_mutex_unlock(mp->lock);
- do {
- FD_ZERO(&rfds);
- FD_SET(mp->pipe.fd.read, &rfds);
- retry = select(mp->pipe.fd.read+1, &rfds, NULL, NULL, NULL) == -1 && errno == EINTR;
- pthread_testcancel();
- } while (retry);
- g_mutex_lock(mp->lock);
- m(printf("wait: got pipe\n"));
-#ifdef HAVE_NSS
- } else if (mp->prpipe.read != NULL) {
- PRPollDesc polltable[1];
- int retry;
-
- m(printf("wait: waitng on pr pipe\n"));
- g_mutex_unlock(mp->lock);
- do {
- polltable[0].fd = mp->prpipe.read;
- polltable[0].in_flags = PR_POLL_READ|PR_POLL_ERR;
- retry = PR_Poll(polltable, 1, PR_INTERVAL_NO_TIMEOUT) == -1 && PR_GetError() == PR_PENDING_INTERRUPT_ERROR;
- pthread_testcancel();
- } while (retry);
- g_mutex_lock(mp->lock);
- m(printf("wait: got pr pipe\n"));
-#endif /* HAVE_NSS */
- } else {
- 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--;
- }
- }
- 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) {
- if (mp->pipe.fd.read != -1)
- read(mp->pipe.fd.read, dummy, 1);
-#ifdef HAVE_NSS
- if (mp->prpipe.read != NULL) {
- int c;
- c = PR_Read(mp->prpipe.read, dummy, 1);
- g_assert(c == 1);
- }
-#endif
- }
- 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 {
- struct _EThread *next;
- struct _EThread *prev;
-
- 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;
-};
-
-/* All active threads */
-static EDList ethread_list = E_DLIST_INITIALISER(ethread_list);
-static pthread_mutex_t ethread_lock = PTHREAD_MUTEX_INITIALIZER;
-
-#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;
-
- pthread_mutex_lock(&ethread_lock);
- e_dlist_addtail(&ethread_list, (EDListNode *)e);
- pthread_mutex_unlock(&ethread_lock);
-
- 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;
- }
-
- pthread_mutex_lock(&ethread_lock);
- e_dlist_remove((EDListNode *)e);
- pthread_mutex_unlock(&ethread_lock);
-
- pthread_mutex_destroy(&e->mutex);
- 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);
-}
-
-/* find out if we're busy doing any work, e==NULL, check for all work */
-int e_thread_busy(EThread *e)
-{
- int busy = FALSE;
-
- if (e == NULL) {
- pthread_mutex_lock(&ethread_lock);
- e = (EThread *)ethread_list.head;
- while (e->next && !busy) {
- busy = e_thread_busy(e);
- e = e->next;
- }
- pthread_mutex_unlock(&ethread_lock);
- } else {
- pthread_mutex_lock(&e->mutex);
- switch (e->type) {
- case E_THREAD_QUEUE:
- case E_THREAD_DROP:
- busy = e->waiting != 1 && e->id != E_THREAD_NONE;
- break;
- case E_THREAD_NEW:
- busy = e->waiting != g_list_length(e->id_list);
- break;
- }
- pthread_mutex_unlock(&e->mutex);
- }
-
- return busy;
-}
-
-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) {
- int err;
-
- if ((err = pthread_create(&e->id, NULL, thread_dispatch, e)) != 0) {
- g_warning("Could not create dispatcher thread, message queued?: %s", strerror(err));
- 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;
- int err;
-
- switch (m->type) {
- case E_MUTEX_SIMPLE:
- return pthread_mutex_lock(&m->mutex);
- case E_MUTEX_REC:
- id = pthread_self();
- if ((err = pthread_mutex_lock(&m->mutex)) != 0)
- return err;
- 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 ((err = pthread_cond_wait(&m->cond, &m->mutex)) != 0)
- return err;
- m->waiters--;
- }
- }
- return pthread_mutex_unlock(&m->mutex);
- }
-
- return EINVAL;
-}
-
-int e_mutex_unlock(EMutex *m)
-{
- int err;
-
- switch (m->type) {
- case E_MUTEX_SIMPLE:
- return pthread_mutex_unlock(&m->mutex);
- case E_MUTEX_REC:
- if ((err = pthread_mutex_lock(&m->mutex)) != 0)
- return err;
- 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);
-}
-
-int e_mutex_cond_wait(void *vcond, EMutex *m)
-{
- int ret;
- pthread_cond_t *cond = vcond;
-
- switch(m->type) {
- case E_MUTEX_SIMPLE:
- return pthread_cond_wait(cond, &m->mutex);
- case E_MUTEX_REC:
- if ((ret = pthread_mutex_lock(&m->mutex)) != 0)
- return ret;
- g_assert(m->owner == pthread_self());
- ret = pthread_cond_wait(cond, &m->mutex);
- g_assert(m->owner == pthread_self());
- pthread_mutex_unlock(&m->mutex);
- return ret;
- default:
- g_return_val_if_reached(-1);
- }
-}
-
-#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 8d4e0c20f7..0000000000
--- a/e-util/e-msgport.h
+++ /dev/null
@@ -1,88 +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);
-#ifdef HAVE_NSS
-struct PRFileDesc *e_msgport_prfd(EMsgPort *mp);
-#endif
-
-/* 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);
-int e_thread_busy(EThread *e);
-
-/* 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);
-/* this uses pthread cond's */
-int e_mutex_cond_wait(void *cond, EMutex *m);
-
-#endif
diff --git a/e-util/e-passwords.c b/e-util/e-passwords.c
deleted file mode 100644
index 5405e76245..0000000000
--- a/e-util/e-passwords.c
+++ /dev/null
@@ -1,594 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <string.h>
-#include <libgnome/gnome-config.h>
-#include <libgnome/gnome-i18n.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtkbox.h>
-#include <gtk/gtkcheckbutton.h>
-#include <gtk/gtkmessagedialog.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);
-
-/**
- * e_passwords_init:
- *
- * Initializes the e_passwords routines. Must be called before any other
- * e_passwords_* function.
- **/
-static void
-e_passwords_init ()
-{
- if (passwords)
- return;
-
- /* create the per-session hash table */
- passwords = g_hash_table_new (g_str_hash, g_str_equal);
-}
-
-static gboolean
-free_entry (gpointer key, gpointer value, gpointer user_data)
-{
- g_free (key);
- memset (value, 0, strlen (value));
- g_free (value);
- return TRUE;
-}
-
-/**
- * e_passwords_shutdown:
- *
- * Cleanup routine to call before exiting.
- **/
-void
-e_passwords_shutdown ()
-{
- /* shouldn't need this really - everything is synchronous */
- gnome_config_private_sync_file ("/Evolution");
-
- if (passwords) {
- /* and destroy our per session hash */
- g_hash_table_foreach_remove (passwords, free_entry, NULL);
- g_hash_table_destroy (passwords);
- passwords = NULL;
- }
-}
-
-
-/**
- * e_passwords_forget_passwords:
- *
- * Forgets all cached passwords, in memory and on disk.
- **/
-void
-e_passwords_forget_passwords ()
-{
- void *it;
- char *key;
-
- e_passwords_init ();
-
- it = gnome_config_private_init_iterator_sections("/Evolution");
- while ( (it = gnome_config_iterator_next(it, &key, NULL)) ) {
- if (0 == strncmp(key, "Passwords-", 10)) {
- char *section = g_strdup_printf("/Evolution/%s", key);
-
- gnome_config_private_clean_section (section);
- g_free(section);
- }
- g_free(key);
- }
-
- /*gnome_config_private_clean_section ("/Evolution/Passwords-Mail");*/
- gnome_config_private_sync_file ("/Evolution");
-
- /* free up the session passwords */
- g_hash_table_foreach_remove (passwords, free_entry, NULL);
-}
-
-/**
- * e_passwords_clear_component_passwords:
- *
- * Forgets all disk cached passwords.
- **/
-void
-e_passwords_clear_component_passwords (const char *component_name)
-{
- char *path;
-
- e_passwords_init ();
-
- path = g_strdup_printf ("/Evolution/Passwords-%s", component_name);
-
- gnome_config_private_clean_section (path);
- gnome_config_private_sync_file ("/Evolution");
-
- g_free (path);
-}
-
-static char *
-password_path (const char *component_name, const char *key)
-{
- char *keycopy, *path;
- int i;
- keycopy = g_strdup (key);
-
- for (i = 0; i < strlen (keycopy); i ++)
- if (keycopy[i] == '/' || keycopy[i] =='=')
- keycopy[i] = '_';
-
- path = g_strdup_printf ("/Evolution/Passwords-%s/%s", component_name, keycopy);
-
- g_free (keycopy);
-
- return path;
-}
-
-/**
- * e_passwords_remember_password:
- * @key: the key
- *
- * Saves the password associated with @key to disk.
- **/
-void
-e_passwords_remember_password (const char *component_name, const char *key)
-{
- gpointer okey, value;
- char *path, *pass64;
- int len, state, save;
-
- e_passwords_init ();
-
- if (!g_hash_table_lookup_extended (passwords, key, &okey, &value))
- return;
-
- /* add it to the on-disk cache of passwords */
- path = password_path (component_name, okey);
-
- len = strlen (value);
- pass64 = g_malloc0 ((len + 2) * 4 / 3 + 1);
- state = save = 0;
- base64_encode_close (value, len, FALSE, pass64, &state, &save);
-
- gnome_config_private_set_string (path, pass64);
- g_free (path);
- g_free (pass64);
-
- /* now remove it from our session hash */
- g_hash_table_remove (passwords, key);
- g_free (okey);
- g_free (value);
-
- gnome_config_private_sync_file ("/Evolution");
-}
-
-/**
- * e_passwords_forget_password:
- * @key: the key
- *
- * Forgets the password associated with @key, in memory and on disk.
- **/
-void
-e_passwords_forget_password (const char *component_name, const char *key)
-{
- gpointer okey, value;
- char *path;
-
- e_passwords_init ();
-
- 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);
- }
-
- /* clear it in the on disk db */
- path = password_path (component_name, key);
- gnome_config_private_clean_key (path);
- gnome_config_private_sync_file ("/Evolution");
- g_free (path);
-}
-
-/**
- * e_passwords_get_password:
- * @key: the key
- *
- * Return value: the password associated with @key, or %NULL. Caller
- * must free the returned password.
- **/
-char *
-e_passwords_get_password (const char *component_name, const char *key)
-{
- char *path, *passwd;
- char *encoded = NULL;
-
- e_passwords_init ();
-
- passwd = g_hash_table_lookup (passwords, key);
- if (passwd)
- return g_strdup (passwd);
-
- /* not part of the session hash, look it up in the on disk db */
- path = password_path (component_name, key);
-
- encoded = gnome_config_private_get_string_with_default (path, NULL);
-
- g_free (path);
-
- if (!encoded)
- return NULL;
-
- passwd = decode_base64 (encoded);
- g_free (encoded);
-
- return passwd;
-}
-
-/**
- * e_passwords_add_password:
- * @key: a key
- * @passwd: the password for @key
- *
- * This stores the @key/@passwd pair in the current session's password
- * hash.
- **/
-void
-e_passwords_add_password (const char *key, const char *passwd)
-{
- gpointer okey, value;
-
- e_passwords_init ();
-
- /* FIXME: shouldn't this be g_return_if_fail? */
- if (!key || !passwd)
- return;
-
- if (g_hash_table_lookup_extended (passwords, key, &okey, &value)) {
- g_hash_table_remove (passwords, key);
- g_free (okey);
- g_free (value);
- }
-
- g_hash_table_insert (passwords, g_strdup (key), g_strdup (passwd));
-}
-
-
-static void
-entry_activate (GtkEntry *entry, GtkDialog *dialog)
-{
- gtk_dialog_response (dialog, GTK_RESPONSE_OK);
-}
-
-/**
- * e_passwords_ask_password:
- * @title: title for the password dialog
- * @component_name: the name of the component for which we're storing
- * the password (e.g. Mail, Addressbook, etc.)
- * @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, which the caller must free, 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 *component_name,
- const char *key,
- const char *prompt, gboolean secret,
- EPasswordsRememberType remember_type,
- gboolean *remember,
- GtkWindow *parent)
-{
- GtkWidget *dialog;
- GtkWidget *check = NULL, *entry;
- char *password;
- int response;
-
- dialog = gtk_message_dialog_new (parent,
- 0,
- GTK_MESSAGE_QUESTION,
- GTK_BUTTONS_OK_CANCEL,
- prompt);
-
- gtk_window_set_title (GTK_WINDOW (dialog), title);
-
- gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
-
- /* Password entry */
- entry = gtk_entry_new();
- if (secret)
- gtk_entry_set_visibility (GTK_ENTRY(entry), FALSE);
-
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
- entry, FALSE, FALSE, 4);
- gtk_widget_show (entry);
- gtk_widget_grab_focus (entry);
-
- g_signal_connect (entry, "activate",
- G_CALLBACK (entry_activate), dialog);
-
- /* 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 (GTK_DIALOG (dialog)->vbox),
- check, TRUE, FALSE, 4);
- gtk_widget_show (check);
- }
-
- response = gtk_dialog_run (GTK_DIALOG (dialog));
-
- if (response == GTK_RESPONSE_OK) {
- password = gtk_editable_get_chars (GTK_EDITABLE (entry), 0, -1);
- if (remember_type != E_PASSWORDS_DO_NOT_REMEMBER) {
- *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 (component_name, key);
- }
- } else
- password = NULL;
-
- gtk_widget_destroy (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 7a2b2aa17f..0000000000
--- a/e-util/e-passwords.h
+++ /dev/null
@@ -1,59 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 <gtk/gtkwindow.h>
-
-G_BEGIN_DECLS
-
-/* initialization is now implicit when you call any of the functions
- below (except _shutdown.). e_passwords_shutdown should be called
- at exit time to synch the password on-disk storage, and to free up
- in-memory storage. */
-void e_passwords_shutdown (void);
-
-void e_passwords_remember_password (const char *component, const char *key);
-void e_passwords_add_password (const char *key, const char *passwd);
-char *e_passwords_get_password (const char *component, const char *key);
-void e_passwords_forget_password (const char *component, const char *key);
-void e_passwords_forget_passwords (void);
-void e_passwords_clear_component_passwords (const char *component);
-
-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*component_name, const char *key,
- const char *prompt, gboolean secret,
- EPasswordsRememberType remember_type,
- gboolean *remember,
- GtkWindow *parent);
-
-G_END_DECLS
-
-#endif /* _E_PASSWORD_H_ */
diff --git a/e-util/e-path.c b/e-util/e-path.c
deleted file mode 100644
index 089ee03842..0000000000
--- a/e-util/e-path.c
+++ /dev/null
@@ -1,255 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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/types.h>
-#include <dirent.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <unistd.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);
-}
-
-
-/**
- * e_path_rmdir:
- * @prefix: a prefix to prepend to the path, or %NULL
- * @path: the virtual path to convert to a filesystem path.
- *
- * This removes the directory pointed to by @prefix and @path
- * and attempts to remove its parent "subfolders" directory too
- * if it's empty.
- *
- * Return value: -1 (with errno set) if it failed to rmdir the
- * specified directory. 0 otherwise, whether or not it removed
- * the parent directory.
- **/
-int
-e_path_rmdir (const char *prefix, const char *vpath)
-{
- char *physical_path, *p;
-
- /* Remove the directory itself */
- physical_path = e_path_to_physical (prefix, vpath);
- if (rmdir (physical_path) == -1) {
- g_free (physical_path);
- return -1;
- }
-
- /* Attempt to remove its parent "subfolders" directory,
- * ignoring errors since it might not be empty.
- */
-
- p = strrchr (physical_path, '/');
- if (p[1] == '\0') {
- g_free (physical_path);
- return 0;
- }
- *p = '\0';
- p = strrchr (physical_path, '/');
- if (!p || strcmp (p + 1, SUBFOLDER_DIR_NAME) != 0) {
- g_free (physical_path);
- return 0;
- }
-
- rmdir (physical_path);
- g_free (physical_path);
- return 0;
-}
diff --git a/e-util/e-path.h b/e-util/e-path.h
deleted file mode 100644
index 2295889778..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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);
-
-int e_path_rmdir (const char *prefix, const char *vpath);
-#endif /* __E_PATH__ */
diff --git a/e-util/e-pilot-map.c b/e-util/e-pilot-map.c
deleted file mode 100644
index e155657732..0000000000
--- a/e-util/e-pilot-map.c
+++ /dev/null
@@ -1,448 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <libxml/parser.h>
-
-typedef struct
-{
- char *uid;
- gboolean archived;
- gboolean touched;
-} EPilotMapPidNode;
-
-typedef struct
-{
- guint32 pid;
- gboolean archived;
- gboolean touched;
-} EPilotMapUidNode;
-
-typedef struct
-{
- gboolean touched_only;
- xmlNodePtr root;
-} EPilotMapWriteData;
-
-static void
-real_e_pilot_map_insert (EPilotMap *map, guint32 pid, const char *uid, gboolean archived, gboolean touch)
-{
- char *new_uid;
- guint32 *new_pid;
- EPilotMapPidNode *pnode;
- EPilotMapUidNode *unode;
-
- g_return_if_fail (map != NULL);
- g_return_if_fail (uid != NULL);
-
- /* Keys */
- if (pid != 0) {
- new_pid = g_new (guint32, 1);
- *new_pid = pid;
- }
- new_uid = g_strdup (uid);
-
- /* Values */
- if (pid != 0) {
- pnode = g_new0 (EPilotMapPidNode, 1);
- pnode->uid = new_uid;
- pnode->archived = archived;
- if (touch)
- pnode->touched = TRUE;
- }
-
- unode = g_new0 (EPilotMapUidNode, 1);
- unode->pid = pid;
- unode->archived = archived;
- if (touch)
- unode->touched = TRUE;
-
- /* Insertion */
- if (pid != 0)
- g_hash_table_insert (map->pid_map, new_pid, pnode);
- g_hash_table_insert (map->uid_map, new_uid, unode);
-}
-
-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);
- g_free (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;
- }
-
- g_assert (uid != NULL);
- g_assert (pid != 0 || archived);
-
- real_e_pilot_map_insert (map, pid, uid, archived, FALSE);
- }
-}
-
-static void
-map_write_foreach (gpointer key, gpointer value, gpointer data)
-{
- EPilotMapWriteData *wd = data;
- xmlNodePtr root = wd->root;
- char *uid = key;
- EPilotMapUidNode *unode = value;
- xmlNodePtr mnode;
-
- if (wd->touched_only && !unode->touched)
- return;
-
- mnode = xmlNewChild (root, NULL, "map", NULL);
- xmlSetProp (mnode, "uid", uid);
-
- if (unode->archived) {
- xmlSetProp (mnode, "archived", "1");
- } else {
- char *pidstr;
-
- pidstr = g_strdup_printf ("%d", unode->pid);
- xmlSetProp (mnode, "pilot_id", pidstr);
- g_free (pidstr);
- xmlSetProp (mnode, "archived", "0");
- }
-}
-
-gboolean
-e_pilot_map_pid_is_archived (EPilotMap *map, guint32 pid)
-{
- EPilotMapPidNode *pnode;
-
- g_return_val_if_fail (map != NULL, FALSE);
-
- 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;
-
- g_return_val_if_fail (map != NULL, FALSE);
- g_return_val_if_fail (uid != NULL, FALSE);
-
- 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)
-{
- gpointer key, value;
-
- if (g_hash_table_lookup_extended (map->pid_map, &pid, &key, &value)) {
- EPilotMapPidNode *pnode = value;
- gpointer other_key, other_value;
-
- g_hash_table_remove (map->pid_map, &pid);
-
- /* In case the pid<->uid mapping is not the same anymore */
- if (g_hash_table_lookup_extended (map->uid_map, pnode->uid, &other_key, &other_value)) {
- g_hash_table_remove (map->uid_map, pnode->uid);
- g_free (other_key);
- g_free (other_value);
- }
-
- g_free (key);
- g_free (value);
- }
- if (g_hash_table_lookup_extended (map->uid_map, uid, &key, &value)) {
- EPilotMapUidNode *unode = value;
- gpointer other_key, other_value;
-
- g_hash_table_remove (map->uid_map, uid);
-
- /* In case the pid<->uid mapping is not the same anymore */
- if (g_hash_table_lookup_extended (map->pid_map, &unode->pid, &other_key, &other_value)) {
- g_hash_table_remove (map->pid_map, &unode->pid);
- g_free (other_key);
- g_free (other_value);
- }
-
- g_free (key);
- g_free (value);
- }
-
- real_e_pilot_map_insert (map, pid, uid, archived, TRUE);
-}
-
-void
-e_pilot_map_remove_by_pid (EPilotMap *map, guint32 pid)
-{
- EPilotMapPidNode *pnode = NULL;
- EPilotMapUidNode *unode = NULL;
- gpointer pkey, ukey;
-
- g_return_if_fail (map != NULL);
-
- if (!g_hash_table_lookup_extended (map->pid_map, &pid,
- &pkey, (gpointer *)&pnode))
- return;
-
- g_hash_table_lookup_extended (map->uid_map, pnode->uid, &ukey,
- (gpointer *)&unode);
- g_assert (unode != NULL);
-
- g_hash_table_remove (map->pid_map, &pid);
- g_hash_table_remove (map->uid_map, pnode->uid);
-
- g_free (pkey);
- g_free (ukey);
- g_free (pnode);
- g_free (unode);
-}
-
-void
-e_pilot_map_remove_by_uid (EPilotMap *map, const char *uid)
-{
- EPilotMapPidNode *pnode = NULL;
- EPilotMapUidNode *unode = NULL;
- gpointer pkey, ukey;
-
- g_return_if_fail (map != NULL);
- g_return_if_fail (uid != NULL);
-
- if (!g_hash_table_lookup_extended (map->uid_map, uid, &ukey, (gpointer *)&unode))
- return;
-
- g_hash_table_lookup_extended (map->pid_map, &unode->pid, &pkey, (gpointer *)&pnode);
-
- g_hash_table_remove (map->uid_map, uid);
- g_hash_table_remove (map->pid_map, &unode->pid);
-
- if (unode->pid != 0)
- g_free (pkey);
- g_free (ukey);
-
- if (unode->pid != 0)
- g_free (pnode);
- g_free (unode);
-}
-
-
-guint32
-e_pilot_map_lookup_pid (EPilotMap *map, const char *uid, gboolean touch)
-{
- EPilotMapUidNode *unode = NULL;
-
- g_return_val_if_fail (map != NULL, 0);
- g_return_val_if_fail (uid != NULL, 0);
-
- unode = g_hash_table_lookup (map->uid_map, uid);
-
- if (unode == NULL)
- return 0;
-
- if (touch) {
- EPilotMapPidNode *pnode = NULL;
-
- pnode = g_hash_table_lookup (map->pid_map, &unode->pid);
- if (pnode != NULL)
- pnode->touched = TRUE;
- unode->touched = TRUE;
- }
-
- return unode->pid;
-}
-
-const char *
-e_pilot_map_lookup_uid (EPilotMap *map, guint32 pid, gboolean touch)
-{
- EPilotMapPidNode *pnode = NULL;
-
- g_return_val_if_fail (map != NULL, NULL);
-
- pnode = g_hash_table_lookup (map->pid_map, &pid);
-
- if (pnode == NULL)
- return NULL;
-
- if (touch) {
- EPilotMapUidNode *unode = NULL;
-
- unode = g_hash_table_lookup (map->uid_map, pnode->uid);
- g_assert (unode != NULL);
-
- unode->touched = TRUE;
- pnode->touched = TRUE;
- }
-
- return pnode->uid;
-}
-
-int
-e_pilot_map_read (const char *filename, EPilotMap **map)
-{
- xmlSAXHandler handler;
- EPilotMap *new_map;
-
- g_return_val_if_fail (filename != NULL, -1);
- g_return_val_if_fail (map != NULL, -1);
-
- *map = NULL;
- new_map = g_new0 (EPilotMap, 1);
-
- 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_test (filename, G_FILE_TEST_EXISTS)) {
- if (xmlSAXUserParseFile (&handler, new_map, filename) < 0) {
- g_free (new_map);
- return -1;
- }
- }
-
- new_map->write_touched_only = FALSE;
-
- *map = new_map;
-
- return 0;
-}
-
-int
-e_pilot_map_write (const char *filename, EPilotMap *map)
-{
- EPilotMapWriteData wd;
- xmlDocPtr doc;
- int ret;
-
- g_return_val_if_fail (filename != NULL, -1);
- 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;
- }
- xmlDocSetRootElement (doc, xmlNewDocNode(doc, NULL, "PilotMap", NULL));
- map->since = time (NULL);
- map_set_node_timet (xmlDocGetRootElement (doc), "timestamp", map->since);
-
- wd.touched_only = map->write_touched_only;
- wd.root = xmlDocGetRootElement(doc);
- g_hash_table_foreach (map->uid_map, map_write_foreach, &wd);
-
- /* 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;
-}
-
-static gboolean
-foreach_remove (gpointer key, gpointer value, gpointer data)
-{
- g_free (key);
- g_free (value);
-
- return TRUE;
-}
-
-void
-e_pilot_map_clear (EPilotMap *map)
-{
- g_return_if_fail (map != NULL);
-
- g_hash_table_foreach_remove (map->pid_map, foreach_remove, NULL);
- g_hash_table_foreach_remove (map->uid_map, foreach_remove, NULL);
-
- map->since = 0;
- map->write_touched_only = FALSE;
-}
-
-void
-e_pilot_map_destroy (EPilotMap *map)
-{
- g_return_if_fail (map != NULL);
-
- g_hash_table_foreach_remove (map->pid_map, foreach_remove, NULL);
- g_hash_table_foreach_remove (map->uid_map, foreach_remove, NULL);
-
- 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 ff02994645..0000000000
--- a/e-util/e-pilot-map.h
+++ /dev/null
@@ -1,58 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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 write_touched_only;
-};
-
-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, gboolean touch);
-const char * e_pilot_map_lookup_uid (EPilotMap *map, guint32 pid, gboolean touch);
-
-int e_pilot_map_read (const char *filename, EPilotMap **map);
-int e_pilot_map_write (const char *filename, EPilotMap *map);
-
-void e_pilot_map_clear (EPilotMap *map);
-
-void e_pilot_map_destroy (EPilotMap *map);
-
-#endif /* E_PILOT_MAP_H */
diff --git a/e-util/e-pilot-settings.c b/e-util/e-pilot-settings.c
deleted file mode 100644
index 7649f60287..0000000000
--- a/e-util/e-pilot-settings.c
+++ /dev/null
@@ -1,150 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-pilot-settings.c
- *
- * Copyright (C) 2001 JP Rosevear
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <gtk/gtk.h>
-#include <libgnome/gnome-i18n.h>
-#include "e-pilot-settings.h"
-
-struct _EPilotSettingsPrivate
-{
- GtkWidget *secret;
- GtkWidget *cat;
- GtkWidget *cat_btn;
-};
-
-
-static void class_init (EPilotSettingsClass *klass);
-static void init (EPilotSettings *ps);
-
-static GObjectClass *parent_class = NULL;
-
-
-GType
-e_pilot_settings_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static GTypeInfo info = {
- sizeof (EPilotSettingsClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) class_init,
- NULL, NULL,
- sizeof (EPilotSettings),
- 0,
- (GInstanceInitFunc) init
- };
- type = g_type_register_static (GTK_TYPE_TABLE, "EPilotSettings", &info, 0);
- }
-
- return type;
-}
-
-static void
-class_init (EPilotSettingsClass *klass)
-{
- GObjectClass *object_class;
-
- object_class = G_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_ref (GTK_TYPE_TABLE);
-}
-
-
-static void
-init (EPilotSettings *ps)
-{
- EPilotSettingsPrivate *priv;
- GtkWidget *lbl;
-
- priv = g_new0 (EPilotSettingsPrivate, 1);
-
- ps->priv = priv;
-
- gtk_table_resize (GTK_TABLE (ps), 2, 2);
- gtk_container_set_border_width (GTK_CONTAINER (ps), 4);
- gtk_table_set_col_spacings (GTK_TABLE (ps), 4);
-
- lbl = gtk_label_new (_("Sync Private Records:"));
- gtk_misc_set_alignment (GTK_MISC (lbl), 0.0, 0.5);
- priv->secret = gtk_check_button_new ();
- gtk_table_attach_defaults (GTK_TABLE (ps), lbl, 0, 1, 0, 1);
- gtk_table_attach_defaults (GTK_TABLE (ps), priv->secret, 1, 2, 0, 1);
- gtk_widget_show (lbl);
- gtk_widget_show (priv->secret);
-
-#if 0
- lbl = gtk_label_new (_("Sync Categories:"));
- gtk_misc_set_alignment (GTK_MISC (lbl), 0.0, 0.5);
- priv->cat = gtk_check_button_new ();
- gtk_table_attach_defaults (GTK_TABLE (ps), lbl, 0, 1, 1, 2);
- gtk_table_attach_defaults (GTK_TABLE (ps), priv->cat, 1, 2, 1, 2);
- gtk_widget_show (lbl);
- gtk_widget_show (priv->cat);
-#endif
-}
-
-
-
-GtkWidget *
-e_pilot_settings_new (void)
-{
- GtkWidget *w = g_object_new (E_TYPE_PILOT_SETTINGS, NULL);
- g_object_ref (w);
- gtk_object_sink (GTK_OBJECT (w));
-
- return w;
-}
-
-gboolean
-e_pilot_settings_get_secret (EPilotSettings *ps)
-{
- EPilotSettingsPrivate *priv;
-
- g_return_val_if_fail (ps != NULL, FALSE);
- g_return_val_if_fail (E_IS_PILOT_SETTINGS (ps), FALSE);
-
- priv = ps->priv;
-
- return gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->secret));
-}
-
-void
-e_pilot_settings_set_secret (EPilotSettings *ps, gboolean secret)
-{
- EPilotSettingsPrivate *priv;
-
- g_return_if_fail (ps != NULL);
- g_return_if_fail (E_IS_PILOT_SETTINGS (ps));
-
- priv = ps->priv;
-
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->secret),
- secret);
-}
-
diff --git a/e-util/e-pilot-settings.h b/e-util/e-pilot-settings.h
deleted file mode 100644
index 908f9e1836..0000000000
--- a/e-util/e-pilot-settings.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-pilot-settings.h
- *
- * Copyright (C) 2001 JP Rosevear
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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_PILOT_SETTINGS_H_
-#define _E_PILOT_SETTINGS_H_
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <gtk/gtk.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#define E_TYPE_PILOT_SETTINGS (e_pilot_settings_get_type ())
-#define E_PILOT_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_PILOT_SETTINGS, EPilotSettings))
-#define E_PILOT_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_PILOT_SETTINGS, EPilotSettingsClass))
-#define E_IS_PILOT_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_PILOT_SETTINGS))
-#define E_IS_PILOT_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_PILOT_SETTINGS))
-
-
-typedef struct _EPilotSettings EPilotSettings;
-typedef struct _EPilotSettingsPrivate EPilotSettingsPrivate;
-typedef struct _EPilotSettingsClass EPilotSettingsClass;
-
-#define E_PILOT_SETTINGS_TABLE_ROWS 2
-#define E_PILOT_SETTINGS_TABLE_COLS 2
-
-struct _EPilotSettings {
- GtkTable parent;
-
- EPilotSettingsPrivate *priv;
-};
-
-struct _EPilotSettingsClass {
- GtkTableClass parent_class;
-};
-
-
-GType e_pilot_settings_get_type (void);
-GtkWidget *e_pilot_settings_new (void);
-
-gboolean e_pilot_settings_get_secret (EPilotSettings *ps);
-void e_pilot_settings_set_secret (EPilotSettings *ps, gboolean secret);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _E_PILOT_SETTINGS_H_ */
diff --git a/e-util/e-pilot-util.c b/e-util/e-pilot-util.c
deleted file mode 100644
index 9e9c13d2c0..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <libxml/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 ("UTF-8", 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 ("UTF-8", 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 059b113694..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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 65c6a8e84b..0000000000
--- a/e-util/e-request.c
+++ /dev/null
@@ -1,102 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <gtk/gtkbox.h>
-#include <gtk/gtkdialog.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtklabel.h>
-#include <gtk/gtkstock.h>
-
-
-/**
- * e_request_string:
- * @parent: parent window, or %NULL
- * @title: the dialog title (in the locale character set)
- * @prompt: the prompt (in the locale character set)
- * @default: default value (in UTF8)
- *
- * Request a string from the user.
- *
- * Return value: %NULL if the user cancelled the dialog, the inserted
- * string (in UTF8) 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 *prompt_label;
- char *text;
- GtkWidget *dialog;
- GtkWidget *entry;
- GtkWidget *vbox;
-
- g_return_val_if_fail (title != NULL, NULL);
- g_return_val_if_fail (prompt != NULL, NULL);
-
- dialog = gtk_dialog_new_with_buttons (title, parent,
- GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_OK, GTK_RESPONSE_OK,
- NULL);
- gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
- gtk_window_set_default_size (GTK_WINDOW (dialog), 275, -1);
- gtk_container_set_border_width (GTK_CONTAINER (dialog), 6);
-
- vbox = GTK_DIALOG (dialog)->vbox;
-
- prompt_label = gtk_label_new (prompt);
- gtk_box_pack_start (GTK_BOX (vbox), prompt_label, TRUE, TRUE, 6);
- gtk_box_set_spacing (GTK_BOX (vbox), 6);
-
- entry = gtk_entry_new ();
- gtk_entry_set_text (GTK_ENTRY (entry), default_string);
- gtk_editable_select_region (GTK_EDITABLE (entry), 0, -1);
- gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
- gtk_box_pack_start (GTK_BOX (vbox), entry, TRUE, TRUE, 3);
-
- gtk_widget_grab_focus (entry);
-
- gtk_widget_show (prompt_label);
- gtk_widget_show (entry);
- gtk_widget_show (dialog);
-
- switch (gtk_dialog_run (GTK_DIALOG (dialog))) {
- case GTK_RESPONSE_OK:
- text = g_strdup (gtk_entry_get_text (GTK_ENTRY (entry)));
- break;
- default:
- text = NULL;
- break;
- }
-
- gtk_widget_destroy (dialog);
-
- return text;
-}
diff --git a/e-util/e-request.h b/e-util/e-request.h
deleted file mode 100644
index 7ebb70c43f..0000000000
--- a/e-util/e-request.h
+++ /dev/null
@@ -1,33 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 a7619c59f2..0000000000
--- a/e-util/e-sexp.c
+++ /dev/null
@@ -1,1379 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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.
-
- int = (cast-int string|int|bool)
- Cast to an integer value.
-
- string = (cast-string string|int|bool)
- Cast to an string value.
-
- 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.
-*/
-
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <time.h>
-#include <string.h>
-
-#include "e-sexp.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_G_OBJECT
-static GObjectClass *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++) {
- gpointer ptr;
- int n;
- ptr = g_hash_table_lookup(ht, a1[j]);
- n = GPOINTER_TO_INT(ptr);
- g_hash_table_insert(ht, a1[j], GINT_TO_POINTER(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;
-}
-
-/* cast to int */
-static ESExpResult *
-term_eval_castint(struct _ESExp *f, int argc, struct _ESExpResult **argv, void *data)
-{
- struct _ESExpResult *r;
-
- if (argc != 1)
- e_sexp_fatal_error(f, "Incorrect argument count to (int )");
-
- r = e_sexp_result_new(f, ESEXP_RES_INT);
- switch (argv[0]->type) {
- case ESEXP_RES_INT:
- r->value.number = argv[0]->value.number;
- break;
- case ESEXP_RES_BOOL:
- r->value.number = argv[0]->value.bool != 0;
- break;
- case ESEXP_RES_STRING:
- r->value.number = strtoul(argv[0]->value.string, 0, 10);
- break;
- default:
- e_sexp_result_free(f, r);
- e_sexp_fatal_error(f, "Invalid type in (cast-int )");
- }
-
- return r;
-}
-
-/* cast to string */
-static ESExpResult *
-term_eval_caststring(struct _ESExp *f, int argc, struct _ESExpResult **argv, void *data)
-{
- struct _ESExpResult *r;
-
- if (argc != 1)
- e_sexp_fatal_error(f, "Incorrect argument count to (cast-string )");
-
- r = e_sexp_result_new(f, ESEXP_RES_STRING);
- switch (argv[0]->type) {
- case ESEXP_RES_INT:
- r->value.string = g_strdup_printf("%d", argv[0]->value.number);
- break;
- case ESEXP_RES_BOOL:
- r->value.string = g_strdup_printf("%d", argv[0]->value.bool != 0);
- break;
- case ESEXP_RES_STRING:
- r->value.string = g_strdup(argv[0]->value.string);
- break;
- default:
- e_sexp_result_free(f, r);
- e_sexp_fatal_error(f, "Invalid type in (int )");
- }
-
- 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, negative = FALSE;
- 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 '-':
- p(printf ("got negative int?\n"));
- token = g_scanner_get_next_token (gs);
- if (token != G_TOKEN_INT) {
- e_sexp_fatal_error (f, "Invalid format for a integer value");
- return NULL;
- }
-
- negative = TRUE;
- /* fall through... */
- case G_TOKEN_INT:
- t = parse_term_new(f, ESEXP_TERM_INT);
- t->value.number = g_scanner_cur_value(gs).v_int;
- if (negative)
- t->value.number = -t->value.number;
- 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_G_OBJECT
-static void
-e_sexp_class_init (ESExpClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- object_class->finalize = e_sexp_finalise;
-
- parent_class = g_type_class_ref (g_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 },
- { "cast-int", (ESExpFunc *)term_eval_castint, 0 },
- { "cast-string", (ESExpFunc *)term_eval_caststring, 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_G_OBJECT
- G_OBJECT_CLASS (parent_class)->finalize (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_G_OBJECT
- s->refcount = 1;
-#endif
-}
-
-#ifdef E_SEXP_IS_G_OBJECT
-GType
-e_sexp_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (ESExpClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) e_sexp_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (ESExp),
- 0, /* n_preallocs */
- (GInstanceInitFunc) e_sexp_init,
- };
-
- type = g_type_register_static (G_TYPE_OBJECT, "ESExp", &info, 0);
- }
-
- return type;
-}
-#endif
-
-ESExp *
-e_sexp_new (void)
-{
-#ifdef E_SEXP_IS_G_OBJECT
- ESExp *f = (ESexp *) g_object_new (E_TYPE_SEXP, NULL);
-#else
- ESExp *f = g_malloc0 (sizeof (ESExp));
- e_sexp_init (f);
-#endif
-
- return f;
-}
-
-#ifndef E_SEXP_IS_G_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 (IS_E_SEXP (f));
- g_return_if_fail (name != NULL);
-
- e_sexp_remove_symbol (f, scope, name);
-
- 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 (IS_E_SEXP (f));
- g_return_if_fail (name != NULL);
-
- e_sexp_remove_symbol (f, scope, name);
-
- 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 (IS_E_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 (IS_E_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 (IS_E_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 (IS_E_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 (IS_E_SEXP (f));
-
- g_scanner_input_file(f->scanner, fd);
-}
-
-/* returns -1 on error */
-int
-e_sexp_parse(ESExp *f)
-{
- g_return_val_if_fail (IS_E_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 (IS_E_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 5f41c97dcc..0000000000
--- a/e-util/e-sexp.h
+++ /dev/null
@@ -1,172 +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_G_OBJECT
-#include <glib-object.h>
-#endif
-
-#ifdef E_SEXP_IS_G_OBJECT
-#define E_TYPE_SEXP (e_sexp_get_type ())
-#define E_SEXP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_SEXP, ESExp))
-#define E_SEXP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_SEXP, ESExpClass))
-#define IS_E_SEXP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_SEXP))
-#define IS_E_SEXP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_SEXP))
-#define E_SEXP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), E_TYPE_SEXP, ESExpClass))
-#else
-#define E_TYPE_SEXP (0)
-#define E_SEXP(obj) ((struct _ESExp *) (obj))
-#define E_SEXP_CLASS(klass) ((struct _ESExpClass *) (klass))
-#define IS_E_SEXP(obj) (1)
-#define IS_E_SEXP_CLASS(obj) (1)
-#define E_SEXP_GET_CLASS(obj) (NULL)
-#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_G_OBJECT
- GObject parent_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_G_OBJECT
- GObjectClass parent_class;
-#else
- int dummy;
-#endif
-};
-
-#ifdef E_SEXP_IS_G_OBJECT
-GType e_sexp_get_type (void);
-#endif
-ESExp *e_sexp_new (void);
-#ifdef E_SEXP_IS_G_OBJECT
-#define e_sexp_ref(f) g_object_ref (f)
-#define e_sexp_unref(f) g_object_unref (f)
-#else
-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 ab1e748d9a..0000000000
--- a/e-util/e-sorter-array.c
+++ /dev/null
@@ -1,259 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-sorter-array.c
- * Copyright 2000, 2001, Ximian, Inc.
- *
- * Authors:
- * Chris Lahey <clahey@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, version 2, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#include <config.h>
-#include <stdlib.h>
-#include <string.h>
-#include "gal/util/e-util.h"
-#include "e-sorter-array.h"
-
-#define d(x)
-
-#define PARENT_TYPE E_SORTER_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 = g_object_new (E_SORTER_ARRAY_TYPE, NULL);
-
- return e_sorter_array_construct (esa, compare, closure);
-}
-
-static void
-esa_class_init (ESorterArrayClass *klass)
-{
- ESorterClass *sorter_class = E_SORTER_CLASS(klass);
-
- parent_class = g_type_class_ref (PARENT_TYPE);
-
- 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 227e437443..0000000000
--- a/e-util/e-sorter-array.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-sorter-array.h
- * Copyright 2000, 2001, Ximian, Inc.
- *
- * Authors:
- * Chris Lahey <clahey@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, version 2, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef _E_SORTER_ARRAY_H_
-#define _E_SORTER_ARRAY_H_
-
-#include <glib.h>
-#include <glib-object.h>
-#include <gal/util/e-sorter.h>
-
-G_BEGIN_DECLS
-
-#define E_SORTER_ARRAY_TYPE (e_sorter_array_get_type ())
-#define E_SORTER_ARRAY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_SORTER_ARRAY_TYPE, ESorterArray))
-#define E_SORTER_ARRAY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), E_SORTER_ARRAY_TYPE, ESorterArrayClass))
-#define E_IS_SORTER_ARRAY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_SORTER_ARRAY_TYPE))
-#define E_IS_SORTER_ARRAY_CLASS(k) (G_TYPE_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;
-
-GType 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);
-
-G_END_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 adee6d0d98..0000000000
--- a/e-util/e-sorter.c
+++ /dev/null
@@ -1,153 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-sorter.c
- * Copyright 2000, 2001, Ximian, Inc.
- *
- * Authors:
- * Chris Lahey <clahey@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, version 2, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#include <config.h>
-#include <stdlib.h>
-#include <string.h>
-#include "gal/util/e-util.h"
-#include "e-sorter.h"
-
-#define d(x)
-
-#define PARENT_TYPE G_TYPE_OBJECT
-
-static GObjectClass *parent_class;
-
-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 = g_type_class_ref (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 = g_object_new (E_SORTER_TYPE, NULL);
-
- 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 (E_SORTER_GET_CLASS(es)->model_to_sorted)
- return E_SORTER_GET_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 (E_SORTER_GET_CLASS(es)->sorted_to_model)
- return E_SORTER_GET_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 (E_SORTER_GET_CLASS(es)->get_model_to_sorted_array)
- E_SORTER_GET_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 (E_SORTER_GET_CLASS(es)->get_sorted_to_model_array)
- E_SORTER_GET_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 (E_SORTER_GET_CLASS(es)->needs_sorting)
- return E_SORTER_GET_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 a70c2bd2d7..0000000000
--- a/e-util/e-sorter.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-sorter.h
- * Copyright 2000, 2001, Ximian, Inc.
- *
- * Authors:
- * Chris Lahey <clahey@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, version 2, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef _E_SORTER_H_
-#define _E_SORTER_H_
-
-#include <glib-object.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#define E_SORTER_TYPE (e_sorter_get_type ())
-#define E_SORTER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_SORTER_TYPE, ESorter))
-#define E_SORTER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), E_SORTER_TYPE, ESorterClass))
-#define E_IS_SORTER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_SORTER_TYPE))
-#define E_IS_SORTER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_SORTER_TYPE))
-#define E_SORTER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), E_SORTER_TYPE, ESorterClass))
-
-typedef struct {
- GObject base;
-} ESorter;
-
-typedef struct {
- GObjectClass 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;
-
-GType 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 478dc2d68b..0000000000
--- a/e-util/e-text-event-processor-emacs-like.c
+++ /dev/null
@@ -1,495 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-text-event-processor-emacs-like.c
- * Copyright 2000, 2001, Ximian, Inc.
- *
- * Authors:
- * Chris Lahey <clahey@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, version 2, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#include <string.h>
-#include <gdk/gdkkeysyms.h>
-#include <gal/util/e-util.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);
-
-#define PARENT_TYPE E_TEXT_EVENT_PROCESSOR_TYPE
-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_NOP, 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_CAPS, E_TEP_CAPS_TITLE, "" },/* 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_CAPS, E_TEP_CAPS_LOWER, "" }, /* 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_CAPS, E_TEP_CAPS_UPPER, "" }, /* 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 */
-
-};
-
-E_MAKE_TYPE (e_text_event_processor_emacs_like,
- "ETextEventProcessorEmacsLike",
- ETextEventProcessorEmacsLike,
- e_text_event_processor_emacs_like_class_init,
- e_text_event_processor_emacs_like_init,
- PARENT_TYPE)
-
-static void
-e_text_event_processor_emacs_like_class_init (ETextEventProcessorEmacsLikeClass *klass)
-{
- ETextEventProcessorClass *processor_class;
-
- processor_class = (ETextEventProcessorClass*) klass;
-
- parent_class = g_type_class_ref (PARENT_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;
- g_signal_emit_by_name (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;
- tep_el->mouse_down = FALSE;
- } 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;
- g_signal_emit_by_name (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 if (key.state & GDK_MOD1_MASK)
- command.action = E_TEP_NOP;
- 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;
- g_signal_emit_by_name (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) {
- if (key.state & GDK_CONTROL_MASK) {
- command.action = E_TEP_ACTIVATE;
- command.position = E_TEP_SELECTION;
- } else {
- command.action = E_TEP_INSERT;
- command.position = E_TEP_SELECTION;
- command.value = 1;
- command.string = "\n";
- }
- } else {
- if (key.state & GDK_CONTROL_MASK) {
- command.action = E_TEP_NOP;
- command.position = E_TEP_SELECTION;
- } 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) && !(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 = 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 == ' ') {
- command.action = E_TEP_NOP;
- }
-
- if (key.keyval == 'x') {
- command.action = E_TEP_COPY;
- command.position = E_TEP_SELECTION;
- g_signal_emit_by_name (tep, "command", &command);
-
- command.action = E_TEP_DELETE;
- command.position = E_TEP_SELECTION;
- }
-
- break;
- } else if ((key.state & GDK_MOD1_MASK) && !(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 = 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.state & GDK_MOD1_MASK) && !(key.state & GDK_CONTROL_MASK) && 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) {
- g_signal_emit_by_name (tep, "command", &command);
- return 1;
- }
- else
- return 0;
-}
-
-ETextEventProcessor *
-e_text_event_processor_emacs_like_new (void)
-{
- ETextEventProcessorEmacsLike *retval = g_object_new (E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_TYPE, NULL);
- 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 1fd74dacfe..0000000000
--- a/e-util/e-text-event-processor-emacs-like.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-text-event-processor-emacs-like.h
- * Copyright 2000, 2001, Ximian, Inc.
- *
- * Authors:
- * Chris Lahey <clahey@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, version 2, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#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) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_TYPE, ETextEventProcessorEmacsLike))
-#define E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_TYPE, ETextEventProcessorEmacsLikeClass))
-#define E_IS_TEXT_EVENT_PROCESSOR_EMACS_LIKE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_TYPE))
-#define E_IS_TEXT_EVENT_PROCESSOR_EMACS_LIKE_CLASS(klass) (G_TYPE_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;
-};
-
-
-GType 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 5cb3f198d7..0000000000
--- a/e-util/e-text-event-processor-types.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-text-event-processor-types.h
- * Copyright 2000, 2001, Ximian, Inc.
- *
- * Authors:
- * Chris Lahey <clahey@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, version 2, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef __E_TEXT_EVENT_PROCESSOR_TYPES_H__
-#define __E_TEXT_EVENT_PROCESSOR_TYPES_H__
-
-#include <glib/gmacros.h>
-
-G_BEGIN_DECLS
-
-#include <gdk/gdkevents.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_CAPS,
-
- 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;
-};
-
-typedef enum _ETextEventProcessorCaps {
- E_TEP_CAPS_UPPER,
- E_TEP_CAPS_LOWER,
- E_TEP_CAPS_TITLE
-} ETextEventProcessorCaps;
-
-G_END_DECLS
-
-#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 6b974d894e..0000000000
--- a/e-util/e-text-event-processor.c
+++ /dev/null
@@ -1,148 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-text-event-processor.c
- * Copyright 2000, 2001, Ximian, Inc.
- *
- * Authors:
- * Chris Lahey <clahey@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, version 2, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#include "e-text-event-processor.h"
-#include <gal/util/e-util.h>
-#include <gal/util/e-i18n.h>
-#include "gal/util/e-marshal.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_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec);
-static void e_text_event_processor_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec);
-
-#define PARENT_TYPE G_TYPE_OBJECT
-static GObjectClass *parent_class = NULL;
-
-/* The arguments we take */
-enum {
- PROP_0,
- PROP_ALLOW_NEWLINES
-};
-
-enum {
- E_TEP_EVENT,
- E_TEP_LAST_SIGNAL
-};
-
-static guint e_tep_signals[E_TEP_LAST_SIGNAL] = { 0 };
-
-E_MAKE_TYPE (e_text_event_processor,
- "ETextEventProcessor",
- ETextEventProcessor,
- e_text_event_processor_class_init,
- e_text_event_processor_init,
- PARENT_TYPE)
-
-static void
-e_text_event_processor_class_init (ETextEventProcessorClass *klass)
-{
- GObjectClass *object_class;
-
- object_class = (GObjectClass*) klass;
-
- parent_class = g_type_class_ref (PARENT_TYPE);
-
- object_class->set_property = e_text_event_processor_set_property;
- object_class->get_property = e_text_event_processor_get_property;
-
- e_tep_signals[E_TEP_EVENT] =
- g_signal_new ("command",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETextEventProcessorClass, command),
- NULL, NULL,
- e_marshal_NONE__POINTER,
- G_TYPE_NONE, 1,
- G_TYPE_POINTER);
-
- g_object_class_install_property (object_class, PROP_ALLOW_NEWLINES,
- g_param_spec_boolean ("allow_newlines",
- _( "Allow newlines" ),
- _( "Allow newlines" ),
- FALSE,
- G_PARAM_READWRITE));
-
- klass->event = NULL;
- klass->command = NULL;
-
-}
-
-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_GET_CLASS(tep)->event)
- return E_TEXT_EVENT_PROCESSOR_GET_CLASS(tep)->event(tep, event);
- else
- return 0;
-}
-
-/* Set_arg handler for the text item */
-static void
-e_text_event_processor_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- ETextEventProcessor *tep = E_TEXT_EVENT_PROCESSOR (object);
-
- switch (prop_id) {
- case PROP_ALLOW_NEWLINES:
- tep->allow_newlines = g_value_get_boolean (value);
- break;
- default:
- return;
- }
-}
-
-/* Get_arg handler for the text item */
-static void
-e_text_event_processor_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
-{
- ETextEventProcessor *tep = E_TEXT_EVENT_PROCESSOR (object);
-
- switch (prop_id) {
- case PROP_ALLOW_NEWLINES:
- g_value_set_boolean (value, tep->allow_newlines);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
diff --git a/e-util/e-text-event-processor.h b/e-util/e-text-event-processor.h
deleted file mode 100644
index 21f2550fde..0000000000
--- a/e-util/e-text-event-processor.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-text-event-processor.h
- * Copyright 2000, 2001, Ximian, Inc.
- *
- * Authors:
- * Chris Lahey <clahey@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, version 2, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#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) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TEXT_EVENT_PROCESSOR_TYPE, ETextEventProcessor))
-#define E_TEXT_EVENT_PROCESSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TEXT_EVENT_PROCESSOR_TYPE, ETextEventProcessorClass))
-#define E_IS_TEXT_EVENT_PROCESSOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TEXT_EVENT_PROCESSOR_TYPE))
-#define E_IS_TEXT_EVENT_PROCESSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TEXT_EVENT_PROCESSOR_TYPE))
-#define E_TEXT_EVENT_PROCESSOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), E_TEXT_EVENT_PROCESSOR_TYPE, ETextEventProcessorClass))
-typedef struct _ETextEventProcessor ETextEventProcessor;
-typedef struct _ETextEventProcessorClass ETextEventProcessorClass;
-
-struct _ETextEventProcessor
-{
- GObject 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);
-};
-
-
-GType 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 8f05427a81..0000000000
--- a/e-util/e-time-utils.c
+++ /dev/null
@@ -1,492 +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>
-
-#ifdef __linux__
-/* We need this to get a prototype for strptime. */
-#define _GNU_SOURCE
-#endif /* __linux__ */
-
-#include <time.h>
-#include <sys/time.h>
-#include <gal/widgets/e-unicode.h>
-
-#ifdef __linux__
-#undef _GNU_SOURCE
-#endif /* __linux__ */
-
-#include <string.h>
-#include <ctype.h>
-#include <glib.h>
-#include <libgnome/gnome-i18n.h>
-#include <gal/util/e-util.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;
- gchar *locale_str;
- gchar *format_str;
- ETimeParseStatus parse_ret;
- gboolean parsed = FALSE;
- int i;
-
- if (string_is_empty (value)) {
- memset (result, 0, sizeof (*result));
- result->tm_isdst = -1;
- return E_TIME_PARSE_NONE;
- }
-
- locale_str = e_utf8_to_locale_string (value);
-
- pos = (const char *) locale_str;
-
- /* 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));
- format_str = e_utf8_to_locale_string (formats[i]);
- parse_end = strptime (pos, format_str, result);
- g_free (format_str);
- if (parse_end) {
- parsed = TRUE;
- break;
- }
- }
-
- result->tm_isdst = -1;
-
- parse_ret = E_TIME_PARSE_INVALID;
-
- /* 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')
- parse_ret = E_TIME_PARSE_OK;
- }
-
- g_free (locale_str);
-
- return (parse_ret);
-
-}
-
-
-/* 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];
-
- e_utf8_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[2];
- struct tm *today_tm;
- time_t t;
- ETimeParseStatus status;
-
- g_return_val_if_fail (value != NULL, E_TIME_PARSE_INVALID);
- g_return_val_if_fail (result != NULL, E_TIME_PARSE_INVALID);
-
- /* strptime format of a weekday and a date. */
- format[0] = _("%a %m/%d/%Y");
-
- /* This is the preferred date format for the locale. */
- format[1] = _("%m/%d/%Y");
-
- status = parse_with_strptime (value, result, format, sizeof (format) / sizeof (format[0]));
- 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);
- }
- }
-
- return status;
-}
-
-
-/*
- * 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 (e_utf8_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 (e_utf8_strftime (buffer, buffer_size, format, date_tm) == 0)
- buffer[0] = '\0';
-}
-
-
-/* Like mktime(3), but assumes UTC instead of local timezone. */
-time_t
-e_mktime_utc (struct tm *tm)
-{
- time_t tt;
-
- tm->tm_isdst = -1;
- tt = mktime (tm);
-
-#if defined (HAVE_TM_GMTOFF)
- tt += tm->tm_gmtoff;
-#elif defined (HAVE_TIMEZONE)
- if (tm->tm_isdst > 0) {
- #if defined (HAVE_ALTZONE)
- tt -= altzone;
- #else /* !defined (HAVE_ALTZONE) */
- tt -= (timezone - 3600);
- #endif
- } else
- tt -= timezone;
-#endif
-
- return tt;
-}
-
-/* Like localtime_r(3), but also returns an offset in seconds after UTC.
- (Calling gmtime with tt + offset would generate the same tm) */
-void
-e_localtime_with_offset (time_t tt, struct tm *tm, int *offset)
-{
- localtime_r (&tt, tm);
-
-#if defined (HAVE_TM_GMTOFF)
- *offset = tm->tm_gmtoff;
-#elif defined (HAVE_TIMEZONE)
- if (tm->tm_isdst > 0) {
- #if defined (HAVE_ALTZONE)
- *offset = -altzone;
- #else /* !defined (HAVE_ALTZONE) */
- *offset = -(timezone - 3600);
- #endif
- } else
- *offset = -timezone;
-#endif
-}
diff --git a/e-util/e-time-utils.h b/e-util/e-time-utils.h
deleted file mode 100644
index 0b081dadd4..0000000000
--- a/e-util/e-time-utils.h
+++ /dev/null
@@ -1,58 +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);
-
-
-/* Like mktime(3), but assumes UTC instead of local timezone. */
-time_t e_mktime_utc (struct tm *timeptr);
-
-/* Like localtime_r(3), but also returns an offset in minutes after UTC.
- (Calling gmtime with tt + offset would generate the same tm) */
-void e_localtime_with_offset (time_t tt, struct tm *tm, int *offset);
-
-#endif /* E_TIME_UTILS */
diff --git a/e-util/e-trie.c b/e-util/e-trie.c
deleted file mode 100644
index 2edf94df34..0000000000
--- a/e-util/e-trie.c
+++ /dev/null
@@ -1,345 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2002 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 "e-trie.h"
-#include "e-memory.h"
-
-#define d(x)
-
-struct _trie_state {
- struct _trie_state *next;
- struct _trie_state *fail;
- struct _trie_match *match;
- unsigned int final;
- int id;
-};
-
-struct _trie_match {
- struct _trie_match *next;
- struct _trie_state *state;
- gunichar c;
-};
-
-struct _ETrie {
- struct _trie_state root;
- GPtrArray *fail_states;
- gboolean icase;
-
- EMemChunk *match_chunks;
- EMemChunk *state_chunks;
-};
-
-
-static inline gunichar
-trie_utf8_getc (const unsigned char **in, size_t inlen)
-{
- register const unsigned char *inptr = *in;
- const unsigned char *inend = inptr + inlen;
- register unsigned char c, r;
- register gunichar u, m;
-
- if (inlen == 0)
- return 0;
-
- r = *inptr++;
- if (r < 0x80) {
- *in = inptr;
- u = r;
- } else if (r < 0xfe) { /* valid start char? */
- u = r;
- m = 0x7f80; /* used to mask out the length bits */
- do {
- if (inptr >= inend)
- return 0;
-
- c = *inptr++;
- if ((c & 0xc0) != 0x80)
- goto error;
-
- u = (u << 6) | (c & 0x3f);
- r <<= 1;
- m <<= 5;
- } while (r & 0x40);
-
- *in = inptr;
-
- u &= ~m;
- } else {
- error:
- *in = (*in)+1;
- u = 0xfffe;
- }
-
- return u;
-}
-
-
-ETrie *
-e_trie_new (gboolean icase)
-{
- ETrie *trie;
-
- trie = g_new (ETrie, 1);
- trie->root.next = NULL;
- trie->root.fail = NULL;
- trie->root.match = NULL;
- trie->root.final = 0;
-
- trie->fail_states = g_ptr_array_sized_new (8);
- trie->icase = icase;
-
- trie->match_chunks = e_memchunk_new (8, sizeof (struct _trie_match));
- trie->state_chunks = e_memchunk_new (8, sizeof (struct _trie_state));
-
- return trie;
-}
-
-void
-e_trie_free (ETrie *trie)
-{
- g_ptr_array_free (trie->fail_states, TRUE);
- e_memchunk_destroy (trie->match_chunks);
- e_memchunk_destroy (trie->state_chunks);
- g_free (trie);
-}
-
-
-
-static struct _trie_match *
-g (struct _trie_state *s, gunichar c)
-{
- struct _trie_match *m = s->match;
-
- while (m && m->c != c)
- m = m->next;
-
- return m;
-}
-
-static struct _trie_state *
-trie_insert (ETrie *trie, int depth, struct _trie_state *q, gunichar c)
-{
- struct _trie_match *m;
-
- m = e_memchunk_alloc (trie->match_chunks);
- m->next = q->match;
- m->c = c;
-
- q->match = m;
- q = m->state = e_memchunk_alloc (trie->state_chunks);
- q->match = NULL;
- q->fail = &trie->root;
- q->final = 0;
- q->id = -1;
-
- if (trie->fail_states->len < depth + 1) {
- unsigned int size = trie->fail_states->len;
-
- size = MAX (size + 64, depth + 1);
- g_ptr_array_set_size (trie->fail_states, size);
- }
-
- q->next = trie->fail_states->pdata[depth];
- trie->fail_states->pdata[depth] = q;
-
- return q;
-}
-
-
-#if 1
-static void
-dump_trie (struct _trie_state *s, int depth)
-{
- char *p = g_alloca ((depth * 2) + 1);
- struct _trie_match *m;
-
- memset (p, ' ', depth * 2);
- p[depth * 2] = '\0';
-
- fprintf (stderr, "%s[state] %p: final=%d; pattern-id=%d; fail=%p\n",
- p, s, s->final, s->id, s->fail);
- m = s->match;
- while (m) {
- fprintf (stderr, " %s'%c' -> %p\n", p, m->c, m->state);
- if (m->state)
- dump_trie (m->state, depth + 1);
-
- m = m->next;
- }
-}
-#endif
-
-
-/*
- * final = empty set
- * FOR p = 1 TO #pat
- * q = root
- * FOR j = 1 TO m[p]
- * IF g(q, pat[p][j]) == null
- * insert(q, pat[p][j])
- * ENDIF
- * q = g(q, pat[p][j])
- * ENDFOR
- * final = union(final, q)
- * ENDFOR
-*/
-
-void
-e_trie_add (ETrie *trie, const char *pattern, int pattern_id)
-{
- const unsigned char *inptr = (const unsigned char *) pattern;
- struct _trie_state *q, *q1, *r;
- struct _trie_match *m, *n;
- int i, depth = 0;
- gunichar c;
-
- /* Step 1: add the pattern to the trie */
-
- q = &trie->root;
-
- while ((c = trie_utf8_getc (&inptr, -1))) {
- if (trie->icase)
- c = g_unichar_tolower (c);
-
- m = g (q, c);
- if (m == NULL) {
- q = trie_insert (trie, depth, q, c);
- } else {
- q = m->state;
- }
-
- depth++;
- }
-
- q->final = depth;
- q->id = pattern_id;
-
- /* Step 2: compute failure graph */
-
- for (i = 0; i < trie->fail_states->len; i++) {
- q = trie->fail_states->pdata[i];
- while (q) {
- m = q->match;
- while (m) {
- c = m->c;
- q1 = m->state;
- r = q->fail;
- while (r && (n = g (r, c)) == NULL)
- r = r->fail;
-
- if (r != NULL) {
- q1->fail = n->state;
- if (q1->fail->final > q1->final)
- q1->final = q1->fail->final;
- } else {
- if ((n = g (&trie->root, c)))
- q1->fail = n->state;
- else
- q1->fail = &trie->root;
- }
-
- m = m->next;
- }
-
- q = q->next;
- }
- }
-
- d(fprintf (stderr, "\nafter adding pattern '%s' to trie %p:\n", pattern, trie));
- d(dump_trie (&trie->root, 0));
-}
-
-/*
- * Aho-Corasick
- *
- * q = root
- * FOR i = 1 TO n
- * WHILE q != fail AND g(q, text[i]) == fail
- * q = h(q)
- * ENDWHILE
- * IF q == fail
- * q = root
- * ELSE
- * q = g(q, text[i])
- * ENDIF
- * IF isElement(q, final)
- * RETURN TRUE
- * ENDIF
- * ENDFOR
- * RETURN FALSE
- */
-
-const char *
-e_trie_search (ETrie *trie, const char *buffer, size_t buflen, int *matched_id)
-{
- const unsigned char *inptr, *inend, *prev, *pat;
- register size_t inlen = buflen;
- struct _trie_state *q;
- struct _trie_match *m;
- gunichar c;
-
- inptr = (const unsigned char *) buffer;
- inend = inptr + buflen;
-
- q = &trie->root;
- pat = prev = inptr;
- while ((c = trie_utf8_getc (&inptr, inlen))) {
- inlen = (inend - inptr);
-
- if (c != 0xfffe) {
- if (trie->icase)
- c = g_unichar_tolower (c);
-
- while (q != NULL && (m = g (q, c)) == NULL)
- q = q->fail;
-
- if (q == &trie->root)
- pat = prev;
-
- if (q == NULL) {
- q = &trie->root;
- pat = inptr;
- } else if (m != NULL) {
- q = m->state;
-
- if (q->final) {
- if (matched_id)
- *matched_id = q->id;
-
- return (const char *) pat;
- }
- }
- }
-
- prev = inptr;
- }
-
- return NULL;
-}
diff --git a/e-util/e-trie.h b/e-util/e-trie.h
deleted file mode 100644
index cabf5fc627..0000000000
--- a/e-util/e-trie.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2002 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_TRIE_H__
-#define __E_TRIE_H__
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <glib.h>
-
-typedef struct _ETrie ETrie;
-
-ETrie *e_trie_new (gboolean icase);
-void e_trie_free (ETrie *trie);
-
-void e_trie_add (ETrie *trie, const char *pattern, int pattern_id);
-
-const char *e_trie_search (ETrie *trie, const char *buffer, size_t buflen, int *matched_id);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __E_TRIE_H__ */
diff --git a/e-util/e-uid.c b/e-util/e-uid.c
deleted file mode 100644
index 90c036e0c1..0000000000
--- a/e-util/e-uid.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-uid.c - Unique ID generator.
- *
- * Copyright (C) 2002 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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>
- */
-
-#include "e-uid.h"
-
-#include <glib/gstrfuncs.h>
-
-#include <string.h>
-#include <time.h>
-#include <unistd.h>
-
-
-/**
- * e_uid_new:
- *
- * Generate a new unique string for use e.g. in account lists.
- *
- * Return value: the newly generated UID. The caller should free the string
- * when it's done with it.
- **/
-char *
-e_uid_new (void)
-{
- static char *hostname;
- static int serial;
-
- if (!hostname) {
- static char buffer [512];
-
- if ((gethostname (buffer, sizeof (buffer) - 1) == 0) &&
- (buffer [0] != 0))
- hostname = buffer;
- else
- hostname = "localhost";
- }
-
- return g_strdup_printf ("%lu.%lu.%d@%s",
- (unsigned long) time (NULL),
- (unsigned long) getpid (),
- serial++,
- hostname);
-}
diff --git a/e-util/e-uid.h b/e-util/e-uid.h
deleted file mode 100644
index 44ec8c0dd9..0000000000
--- a/e-util/e-uid.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-uid.h - Unique ID generator.
- *
- * Copyright (C) 2002 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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>
- */
-
-#ifndef E_UID_H
-#define E_UID_H
-
-char *e_uid_new (void);
-
-#endif /* E_UID_H */
diff --git a/e-util/e-url.c b/e-util/e-url.c
deleted file mode 100644
index 8dba46b62b..0000000000
--- a/e-util/e-url.c
+++ /dev/null
@@ -1,341 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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;
-
- if (!uri_string)
- return NULL;
-
- 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_ascii_strdown (uri_string, p - uri_string);
- uri_string = p + 1;
- }
- else
- uri->protocol = g_strdup ("file");
-
- 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->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->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 e37b5d68f3..0000000000
--- a/e-util/e-url.h
+++ /dev/null
@@ -1,56 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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-marshal.list b/e-util/e-util-marshal.list
deleted file mode 100644
index 463afd8129..0000000000
--- a/e-util/e-util-marshal.list
+++ /dev/null
@@ -1,2 +0,0 @@
-NONE:NONE
-NONE:OBJECT
diff --git a/e-util/e-util.c b/e-util/e-util.c
deleted file mode 100644
index 2514cfc931..0000000000
--- a/e-util/e-util.c
+++ /dev/null
@@ -1,1230 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-util.c
- * Copyright 2000, 2001, Ximian, Inc.
- *
- * Authors:
- * Chris Lahey <clahey@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, version 2, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#include <config.h>
-#include "e-util.h"
-#include "e-i18n.h"
-
-#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 <libgnome/gnome-util.h>
-#include <math.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_collate_compare (const void *x, const void *y)
-{
- if (x == NULL || y == NULL) {
- if (x == y)
- return 0;
- else
- return x ? -1 : 1;
- }
-
- return g_utf8_collate (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)
- g_object_unref (p->data);
-
- g_list_free (list);
-}
-
-void
-e_free_object_slist (GSList *list)
-{
- GSList *p;
-
- for (p = list; p != NULL; p = p->next)
- g_object_unref (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 | O_WRONLY, 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;
- }
- }
- }
- if (close(fd) != 0) {
- return errno;
- }
- return 0;
-}
-
-gint
-e_write_file_mkstemp(char *filename, const char *data)
-{
- int fd;
- int length = strlen(data);
- int bytes;
- fd = mkstemp (filename);
- 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;
- }
- }
- }
- if (close(fd) != 0) {
- return errno;
- }
- 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;
-
- if (path[0] == '/') {
- p = copy = g_strdup (path);
- } else {
- gchar *current_dir = g_get_current_dir();
- p = copy = g_concat_dir_and_file (current_dir, 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
-
-/* Include build marshalers */
-
-#include "e-marshal.h"
-#include "e-marshal.c"
-
-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;
-}
-
-/* This only makes a filename safe for usage as a filename. It still may have shell meta-characters in it. */
-void
-e_filename_make_safe (gchar *string)
-{
- gchar *p, *ts;
- gunichar c;
-
- g_return_if_fail (string != NULL);
- p = string;
-
- while(p && *p) {
- c = g_utf8_get_char (p);
- ts = p;
- p = g_utf8_next_char (p);
- if (!g_unichar_isprint(c) || ( c < 0xff && strchr (" /'\"`&();|<>$%{}!", c&0xff ))) {
- while (ts<p)
- *ts++ = '_';
- }
- }
-}
-
-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;
-
- locality = localeconv();
- grouping = locality->grouping;
- while (number) {
- char *group;
- switch (*grouping) {
- default:
- last_count = *grouping;
- grouping++;
- case 0:
- divider = epow10(last_count);
- if (number >= divider) {
- group = g_strdup_printf("%0*d", last_count, 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");
- }
-}
-
-static gchar *
-do_format_number_as_float (double 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;
- double fractional;
-
- locality = localeconv();
- grouping = locality->grouping;
- while (number >= 1.0) {
- char *group;
- switch (*grouping) {
- default:
- last_count = *grouping;
- grouping++;
- /* Fall through */
- case 0:
- divider = epow10(last_count);
- number /= divider;
- fractional = modf (number, &number);
- fractional *= divider;
- fractional = floor (fractional);
-
- if (number >= 1.0) {
- group = g_strdup_printf("%0*d", last_count, (int) fractional);
- } else {
- group = g_strdup_printf("%d", (int) fractional);
- }
- break;
- case CHAR_MAX:
- divider = epow10(last_count);
- number /= divider;
- fractional = modf (number, &number);
- fractional *= divider;
- fractional = floor (fractional);
-
- while (number >= 1.0) {
- group = g_strdup_printf("%0*d", last_count, (int) fractional);
-
- char_length += strlen(group);
- list = g_list_prepend(list, group);
- group_count ++;
-
- divider = epow10(last_count);
- number /= divider;
- fractional = modf (number, &number);
- fractional *= divider;
- fractional = floor (fractional);
- }
-
- group = g_strdup_printf("%d", (int) fractional);
- 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)
-{
- gfloat int_part;
- gint fraction;
- struct lconv *locality;
- gchar *str_intpart;
- gchar *decimal_point;
- gchar *str_fraction;
- gchar *value;
-
- locality = localeconv();
-
- int_part = floor (number);
- str_intpart = do_format_number_as_float ((double) 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)
-{
- gint ret_val = e_mkdir_hier (directory, 0777);
- if (ret_val == -1)
- return FALSE;
- else
- return TRUE;
-}
-
-
-/* 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
-}
-
-size_t e_strftime(char *s, size_t max, const char *fmt, const struct tm *tm)
-{
-#ifdef HAVE_LKSTRFTIME
- return strftime(s, max, fmt, tm);
-#else
- char *c, *ffmt, *ff;
- size_t ret;
-
- ffmt = g_strdup(fmt);
- ff = ffmt;
- while ((c = strstr(ff, "%l")) != NULL) {
- c[1] = 'I';
- ff = c;
- }
-
- ff = fmt;
- while ((c = strstr(ff, "%k")) != NULL) {
- c[1] = 'H';
- ff = c;
- }
-
- ret = strftime(s, max, ffmt, tm);
- g_free(ffmt);
- return ret;
-#endif
-}
-
-size_t
-e_utf8_strftime(char *s, size_t max, const char *fmt, const struct tm *tm)
-{
- size_t sz, ret;
- char *locale_fmt, *buf;
-
- locale_fmt = g_locale_from_utf8(fmt, -1, NULL, &sz, NULL);
- if (!locale_fmt)
- return 0;
-
- ret = e_strftime(s, max, locale_fmt, tm);
- if (!ret) {
- g_free (locale_fmt);
- return 0;
- }
-
- buf = g_locale_to_utf8(s, ret, NULL, &sz, NULL);
- if (!buf) {
- g_free (locale_fmt);
- return 0;
- }
-
- if (sz >= max) {
- char *tmp = buf + max - 1;
- tmp = g_utf8_find_prev_char(buf, tmp);
- if (tmp)
- sz = tmp - buf;
- else
- sz = 0;
- }
- memcpy(s, buf, sz);
- s[sz] = '\0';
- g_free(locale_fmt);
- g_free(buf);
- return sz;
-}
-
-/**
- * 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=e_strftime(s, max, fmt, tm);
- } else {
- /* Get the AM/PM symbol from the locale */
- e_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=e_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=e_strftime(s, max, ffmt, tm);
- g_free(ffmt);
- }
- }
- return(ret);
-}
-
-size_t
-e_utf8_strftime_fix_am_pm(char *s, size_t max, const char *fmt, const struct tm *tm)
-{
- size_t sz, ret;
- char *locale_fmt, *buf;
-
- locale_fmt = g_locale_from_utf8(fmt, -1, NULL, &sz, NULL);
- if (!locale_fmt)
- return 0;
-
- ret = e_strftime_fix_am_pm(s, max, locale_fmt, tm);
- if (!ret) {
- g_free (locale_fmt);
- return 0;
- }
-
- buf = g_locale_to_utf8(s, ret, NULL, &sz, NULL);
- if (!buf) {
- g_free (locale_fmt);
- return 0;
- }
-
- if (sz >= max) {
- char *tmp = buf + max - 1;
- tmp = g_utf8_find_prev_char(buf, tmp);
- if (tmp)
- sz = tmp - buf;
- else
- sz = 0;
- }
- memcpy(s, buf, sz);
- s[sz] = '\0';
- g_free(locale_fmt);
- g_free(buf);
- return sz;
-}
-
-/**
- * e_flexible_strtod:
- * @nptr: the string to convert to a numeric value.
- * @endptr: if non-NULL, it returns the character after
- * the last character used in the conversion.
- *
- * Converts a string to a gdouble value. This function detects
- * strings either in the standard C locale or in the current locale.
- *
- * This function is typically used when reading configuration files or
- * other non-user input that should not be locale dependent, but may
- * have been in the past. To handle input from the user you should
- * normally use the locale-sensitive system strtod function.
- *
- * To convert from a double to a string in a locale-insensitive way, use
- * @g_ascii_dtostr.
- *
- * Return value: the gdouble value.
- **/
-gdouble
-e_flexible_strtod (const gchar *nptr,
- gchar **endptr)
-{
- gchar *fail_pos;
- gdouble val;
- struct lconv *locale_data;
- const char *decimal_point;
- int decimal_point_len;
- const char *p, *decimal_point_pos;
- const char *end = NULL; /* Silence gcc */
- char *copy, *c;
-
- g_return_val_if_fail (nptr != NULL, 0);
-
- fail_pos = NULL;
-
- locale_data = localeconv ();
- decimal_point = locale_data->decimal_point;
- decimal_point_len = strlen (decimal_point);
-
- g_assert (decimal_point_len != 0);
-
- decimal_point_pos = NULL;
- if (!strcmp (decimal_point, "."))
- return strtod (nptr, endptr);
-
- p = nptr;
-
- /* Skip leading space */
- while (isspace ((guchar)*p))
- p++;
-
- /* Skip leading optional sign */
- if (*p == '+' || *p == '-')
- p++;
-
- if (p[0] == '0' &&
- (p[1] == 'x' || p[1] == 'X')) {
- p += 2;
- /* HEX - find the (optional) decimal point */
-
- while (isxdigit ((guchar)*p))
- p++;
-
- if (*p == '.') {
- decimal_point_pos = p++;
-
- while (isxdigit ((guchar)*p))
- p++;
-
- if (*p == 'p' || *p == 'P')
- p++;
- if (*p == '+' || *p == '-')
- p++;
- while (isdigit ((guchar)*p))
- p++;
- end = p;
- } else if (strncmp (p, decimal_point, decimal_point_len) == 0) {
- return strtod (nptr, endptr);
- }
- } else {
- while (isdigit ((guchar)*p))
- p++;
-
- if (*p == '.') {
- decimal_point_pos = p++;
-
- while (isdigit ((guchar)*p))
- p++;
-
- if (*p == 'e' || *p == 'E')
- p++;
- if (*p == '+' || *p == '-')
- p++;
- while (isdigit ((guchar)*p))
- p++;
- end = p;
- } else if (strncmp (p, decimal_point, decimal_point_len) == 0) {
- return strtod (nptr, endptr);
- }
- }
- /* For the other cases, we need not convert the decimal point */
-
- if (!decimal_point_pos)
- return strtod (nptr, endptr);
-
- /* We need to convert the '.' to the locale specific decimal point */
- copy = g_malloc (end - nptr + 1 + decimal_point_len);
-
- c = copy;
- memcpy (c, nptr, decimal_point_pos - nptr);
- c += decimal_point_pos - nptr;
- memcpy (c, decimal_point, decimal_point_len);
- c += decimal_point_len;
- memcpy (c, decimal_point_pos + 1, end - (decimal_point_pos + 1));
- c += end - (decimal_point_pos + 1);
- *c = 0;
-
- val = strtod (copy, &fail_pos);
-
- if (fail_pos) {
- if (fail_pos > decimal_point_pos)
- fail_pos = (char *)nptr + (fail_pos - copy) - (decimal_point_len - 1);
- else
- fail_pos = (char *)nptr + (fail_pos - copy);
- }
-
- g_free (copy);
-
- if (endptr)
- *endptr = fail_pos;
-
- return val;
-}
-
-/**
- * e_ascii_dtostr:
- * @buffer: A buffer to place the resulting string in
- * @buf_len: The length of the buffer.
- * @format: The printf-style format to use for the
- * code to use for converting.
- * @d: The double to convert
- *
- * Converts a double to a string, using the '.' as
- * decimal_point. To format the number you pass in
- * a printf-style formating string. Allowed conversion
- * specifiers are eEfFgG.
- *
- * If you want to generates enough precision that converting
- * the string back using @g_strtod gives the same machine-number
- * (on machines with IEEE compatible 64bit doubles) use the format
- * string "%.17g". If you do this it is guaranteed that the size
- * of the resulting string will never be larger than
- * @G_ASCII_DTOSTR_BUF_SIZE bytes.
- *
- * Return value: The pointer to the buffer with the converted string.
- **/
-gchar *
-e_ascii_dtostr (gchar *buffer,
- gint buf_len,
- const gchar *format,
- gdouble d)
-{
- struct lconv *locale_data;
- const char *decimal_point;
- int decimal_point_len;
- gchar *p;
- int rest_len;
- gchar format_char;
-
- g_return_val_if_fail (buffer != NULL, NULL);
- g_return_val_if_fail (format[0] == '%', NULL);
- g_return_val_if_fail (strpbrk (format + 1, "'l%") == NULL, NULL);
-
- format_char = format[strlen (format) - 1];
-
- g_return_val_if_fail (format_char == 'e' || format_char == 'E' ||
- format_char == 'f' || format_char == 'F' ||
- format_char == 'g' || format_char == 'G',
- NULL);
-
- if (format[0] != '%')
- return NULL;
-
- if (strpbrk (format + 1, "'l%"))
- return NULL;
-
- if (!(format_char == 'e' || format_char == 'E' ||
- format_char == 'f' || format_char == 'F' ||
- format_char == 'g' || format_char == 'G'))
- return NULL;
-
-
- g_snprintf (buffer, buf_len, format, d);
-
- locale_data = localeconv ();
- decimal_point = locale_data->decimal_point;
- decimal_point_len = strlen (decimal_point);
-
- g_assert (decimal_point_len != 0);
-
- if (strcmp (decimal_point, ".")) {
- p = buffer;
-
- if (*p == '+' || *p == '-')
- p++;
-
- while (isdigit ((guchar)*p))
- p++;
-
- if (strncmp (p, decimal_point, decimal_point_len) == 0) {
- *p = '.';
- p++;
- if (decimal_point_len > 1) {
- rest_len = strlen (p + (decimal_point_len-1));
- memmove (p, p + (decimal_point_len-1),
- rest_len);
- p[rest_len] = 0;
- }
- }
- }
-
- return buffer;
-}
-
-gchar *
-e_strdup_append_strings (gchar *first_string, ...)
-{
- gchar *buffer;
- gchar *current;
- gint length;
- va_list args1;
- va_list args2;
- char *v_string;
- int v_int;
-
- va_start (args1, first_string);
- G_VA_COPY (args2, args1);
-
- length = 0;
-
- v_string = first_string;
- while (v_string) {
- v_int = va_arg (args1, int);
- if (v_int >= 0)
- length += v_int;
- else
- length += strlen (v_string);
- v_string = va_arg (args1, char *);
- }
-
- buffer = g_new (char, length + 1);
- current = buffer;
-
- v_string = first_string;
- while (v_string) {
- v_int = va_arg (args2, int);
- if (v_int < 0) {
- int i;
- for (i = 0; v_string[i]; i++) {
- *(current++) = v_string[i];
- }
- } else {
- int i;
- for (i = 0; v_string[i] && i < v_int; i++) {
- *(current++) = v_string[i];
- }
- }
- v_string = va_arg (args2, char *);
- }
- *(current++) = 0;
-
- va_end (args1);
- va_end (args2);
-
- return buffer;
-}
-
-gchar **
-e_strdupv (const gchar **str_array)
-{
- if (str_array) {
- gint i;
- gchar **retval;
-
- i = 0;
- while (str_array[i])
- i++;
-
- retval = g_new (gchar*, i + 1);
-
- i = 0;
- while (str_array[i]) {
- retval[i] = g_strdup (str_array[i]);
- i++;
- }
- retval[i] = NULL;
-
- return retval;
- } else {
- return NULL;
- }
-}
-
-char *
-e_gettext (const char *msgid)
-{
- static gboolean initialized = FALSE;
-
- if (!initialized) {
- bindtextdomain (E_I18N_DOMAIN, GNOMELOCALEDIR);
- bind_textdomain_codeset (E_I18N_DOMAIN, "UTF-8");
- initialized = TRUE;
- }
-
- return dgettext (E_I18N_DOMAIN, msgid);
-}
-
diff --git a/e-util/e-util.h b/e-util/e-util.h
deleted file mode 100644
index d9d51967d1..0000000000
--- a/e-util/e-util.h
+++ /dev/null
@@ -1,231 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-util.h
- * Copyright 2000, 2001, Ximian, Inc.
- *
- * Authors:
- * Chris Lahey <clahey@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, version 2, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef _E_UTIL_H_
-#define _E_UTIL_H_
-
-#include <sys/types.h>
-#include <glib-object.h>
-#include <limits.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <gal/util/e-marshal.h>
-
-#define E_MAKE_TYPE(l,str,t,ci,i,parent) \
-GType l##_get_type(void)\
-{\
- static GType type = 0; \
- if (!type){ \
- static GTypeInfo const object_info = { \
- sizeof (t##Class), \
- \
- (GBaseInitFunc) NULL, \
- (GBaseFinalizeFunc) NULL, \
- \
- (GClassInitFunc) ci, \
- (GClassFinalizeFunc) NULL, \
- NULL, /* class_data */ \
- \
- sizeof (t), \
- 0, /* n_preallocs */ \
- (GInstanceInitFunc) i, \
- }; \
- type = g_type_register_static (parent, str, &object_info, 0); \
- } \
- 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){ \
- GTypeInfo info = { \
- sizeof (t##Class), \
- \
- (GBaseInitFunc) NULL, \
- (GBaseFinalizeFunc) NULL, \
- \
- (GClassInitFunc) ci, \
- (GClassFinalizeFunc) NULL, \
- \
- NULL, /* class_data */ \
- \
- sizeof (t), \
- 0, /* n_preallocs */ \
- (GInstanceInitFunc) i, \
- }; \
- type = bonobo_x_type_unique ( \
- parent, poa_init, NULL, \
- offset, &info, str); \
- } \
- return type; \
-}
-
-#define GET_STRING_ARRAY_FROM_ELLIPSIS(labels, first_string) \
- { \
- va_list args; \
- int i; \
- char *s; \
- \
- va_start (args, (first_string)); \
- \
- i = 0; \
- for (s = (first_string); s; s = va_arg (args, char *)) \
- i++; \
- va_end (args); \
- \
- (labels) = g_new (char *, i + 1); \
- \
- va_start (args, (first_string)); \
- i = 0; \
- for (s = (first_string); s; s = va_arg (args, char *)) \
- (labels)[i++] = s; \
- \
- va_end (args); \
- (labels)[i] = NULL; \
- }
-
-
-#define GET_DUPLICATED_STRING_ARRAY_FROM_ELLIPSIS(labels, first_string) \
- { \
- int i; \
- GET_STRING_ARRAY_FROM_ELLIPSIS ((labels), (first_string)); \
- for (i = 0; labels[i]; i++) \
- labels[i] = g_strdup (labels[i]); \
- }
-
-
-#if 0
-# define E_OBJECT_CLASS_ADD_SIGNALS(oc,sigs,last) \
- gtk_object_class_add_signals (oc, sigs, last)
-# define E_OBJECT_CLASS_TYPE(oc) (oc)->type
-#else
-# define E_OBJECT_CLASS_ADD_SIGNALS(oc,sigs,last)
-# define E_OBJECT_CLASS_TYPE(oc) G_TYPE_FROM_CLASS (oc)
-#endif
-
-
-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_collate_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_write_file_mkstemp (char *filename,
- const char *data);
-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);
-/* This only makes a filename safe for usage as a filename. It still may have shell meta-characters in it. */
-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);
-gchar **e_strdupv (const gchar **str_array);
-
-
-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);
-
-size_t e_strftime (char *s,
- size_t max,
- const char *fmt,
- const struct tm *tm);
-
-size_t e_utf8_strftime_fix_am_pm (char *s,
- size_t max,
- const char *fmt,
- const struct tm *tm);
-
-size_t e_utf8_strftime (char *s,
- size_t max,
- const char *fmt,
- const struct tm *tm);
-
-/* String to/from double conversion functions */
-gdouble e_flexible_strtod (const gchar *nptr,
- gchar **endptr);
-
-/* 29 bytes should enough for all possible values that
- * g_ascii_dtostr can produce with the %.17g format.
- * Then add 10 for good measure */
-#define E_ASCII_DTOSTR_BUF_SIZE (DBL_DIG + 12 + 10)
-gchar *e_ascii_dtostr (gchar *buffer,
- gint buf_len,
- const gchar *format,
- gdouble d);
-
-/* Alternating char * and int arguments with a NULL char * to end.
- Less than 0 for the int means copy the whole string. */
-gchar *e_strdup_append_strings (gchar *first_string,
- ...);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _E_UTIL_H_ */
diff --git a/e-util/e-xml-hash-utils.c b/e-util/e-xml-hash-utils.c
deleted file mode 100644
index ba72321afe..0000000000
--- a/e-util/e-xml-hash-utils.c
+++ /dev/null
@@ -1,252 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2001-2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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-xml-hash-utils.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <libxml/xmlmemory.h>
-#include <libxml/entities.h>
-
-GHashTable *
-e_xml_to_hash (xmlDoc *doc, EXmlHashType type)
-{
- xmlNode *root, *node;
- const char *key;
- xmlChar *value;
- GHashTable *hash;
-
- hash = g_hash_table_new (g_str_hash, g_str_equal);
-
- root = xmlDocGetRootElement (doc);
- for (node = root->xmlChildrenNode; node; node = node->next) {
- if (node->name == NULL || node->type != XML_ELEMENT_NODE)
- continue;
-
- if (type == E_XML_HASH_TYPE_OBJECT_UID &&
- !strcmp (node->name, "object"))
- key = xmlGetProp (node, "uid");
- else
- key = node->name;
-
- value = xmlNodeListGetString (doc, node->xmlChildrenNode, 1);
- if (!key || !value) {
- g_warning ("Found an entry with missing properties!!");
- continue;
- }
-
- g_hash_table_insert (hash, g_strdup (key), g_strdup (value));
- xmlFree (value);
- }
-
- return hash;
-}
-
-
-struct save_data {
- EXmlHashType type;
- xmlDoc *doc;
- xmlNode *root;
-};
-
-static void
-foreach_save_func (gpointer key, gpointer value, gpointer user_data)
-{
- struct save_data *sd = user_data;
- xmlNodePtr new_node;
- xmlChar *enc;
-
- if (sd->type == E_XML_HASH_TYPE_OBJECT_UID) {
- new_node = xmlNewNode (NULL, "object");
- xmlNewProp (new_node, "uid", (const char *) key);
- } else
- new_node = xmlNewNode (NULL, (const char *) key);
-
- enc = xmlEncodeSpecialChars (sd->doc, value);
- xmlNodeSetContent (new_node, enc);
- xmlFree (enc);
-
- xmlAddChild (sd->root, new_node);
-}
-
-xmlDoc *
-e_xml_from_hash (GHashTable *hash, EXmlHashType type, const char *root_name)
-{
- xmlDoc *doc;
- struct save_data sd;
-
- doc = xmlNewDoc ("1.0");
- sd.type = type;
- sd.doc = doc;
- sd.root = xmlNewDocNode (doc, NULL, root_name, NULL);
- xmlDocSetRootElement (doc, sd.root);
-
- g_hash_table_foreach (hash, foreach_save_func, &sd);
- return doc;
-}
-
-static void
-free_values (gpointer key, gpointer value, gpointer data)
-{
- g_free (key);
- g_free (value);
-}
-
-void
-e_xml_destroy_hash (GHashTable *hash)
-{
- g_hash_table_foreach (hash, free_values, NULL);
- g_hash_table_destroy (hash);
-}
-
-
-
-struct EXmlHash {
- char *filename;
- GHashTable *objects;
-};
-
-EXmlHash *
-e_xmlhash_new (const char *filename)
-{
- EXmlHash *hash;
- xmlDoc *doc = NULL;
-
- g_return_val_if_fail (filename != NULL, NULL);
-
- hash = g_new0 (EXmlHash, 1);
- hash->filename = g_strdup (filename);
-
- if (g_file_test (filename, G_FILE_TEST_EXISTS)) {
- doc = xmlParseFile (filename);
- if (!doc) {
- e_xmlhash_destroy (hash);
-
- return NULL;
- }
- hash->objects = e_xml_to_hash (doc, E_XML_HASH_TYPE_OBJECT_UID);
- xmlFreeDoc (doc);
- } else {
- hash->objects = g_hash_table_new (g_str_hash, g_str_equal);
- }
-
- return hash;
-}
-
-void
-e_xmlhash_add (EXmlHash *hash, const char *key, const char *data)
-{
- g_return_if_fail (hash != NULL);
- g_return_if_fail (key != NULL);
- g_return_if_fail (data != NULL);
-
- e_xmlhash_remove (hash, key);
- g_hash_table_insert (hash->objects, g_strdup (key), g_strdup (data));
-}
-
-void
-e_xmlhash_remove (EXmlHash *hash, const char *key)
-{
- gpointer orig_key;
- gpointer orig_value;
-
- g_return_if_fail (hash != NULL);
- g_return_if_fail (key != NULL);
-
- if (g_hash_table_lookup_extended (hash->objects, key, &orig_key, &orig_value)) {
- g_hash_table_remove (hash->objects, key);
- g_free (orig_key);
- g_free (orig_value);
- }
-}
-
-EXmlHashStatus
-e_xmlhash_compare (EXmlHash *hash, const char *key, const char *compare_data)
-{
- char *data;
- int rc;
-
- g_return_val_if_fail (hash != NULL, E_XMLHASH_STATUS_NOT_FOUND);
- g_return_val_if_fail (key != NULL, E_XMLHASH_STATUS_NOT_FOUND);
- g_return_val_if_fail (compare_data != NULL, E_XMLHASH_STATUS_NOT_FOUND);
-
- data = g_hash_table_lookup (hash->objects, key);
- if (!data)
- return E_XMLHASH_STATUS_NOT_FOUND;
-
- rc = strcmp (data, compare_data);
- if (rc == 0)
- return E_XMLHASH_STATUS_SAME;
-
- return E_XMLHASH_STATUS_DIFFERENT;
-}
-
-typedef struct {
- EXmlHashFunc func;
- gpointer user_data;
-} foreach_data_t;
-
-static void
-foreach_hash_func (gpointer key, gpointer value, gpointer user_data)
-{
- foreach_data_t *data = (foreach_data_t *) user_data;
-
- data->func (key, data->user_data);
-}
-
-void
-e_xmlhash_foreach_key (EXmlHash *hash, EXmlHashFunc func, gpointer user_data)
-{
- foreach_data_t data;
-
- g_return_if_fail (hash != NULL);
- g_return_if_fail (func != NULL);
-
- data.func = func;
- data.user_data = user_data;
- g_hash_table_foreach (hash->objects, foreach_hash_func, &data);
-}
-
-void
-e_xmlhash_write (EXmlHash *hash)
-{
- xmlDoc *doc;
-
- g_return_if_fail (hash != NULL);
-
- doc = e_xml_from_hash (hash->objects, E_XML_HASH_TYPE_OBJECT_UID, "xmlhash");
- xmlSaveFile (hash->filename, doc);
- xmlFreeDoc (doc);
-}
-
-void
-e_xmlhash_destroy (EXmlHash *hash)
-{
- g_return_if_fail (hash != NULL);
-
- g_free (hash->filename);
- if (hash->objects)
- e_xml_destroy_hash (hash->objects);
-
- g_free (hash);
-}
diff --git a/e-util/e-xml-hash-utils.h b/e-util/e-xml-hash-utils.h
deleted file mode 100644
index b972aa4b1a..0000000000
--- a/e-util/e-xml-hash-utils.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2001-2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_XML_HASH_UTILS_H__
-#define __E_XML_HASH_UTILS_H__
-
-#include <glib.h>
-#include <libxml/parser.h>
-
-typedef enum {
- E_XML_HASH_TYPE_OBJECT_UID,
- E_XML_HASH_TYPE_PROPERTY
-} EXmlHashType;
-
-GHashTable *e_xml_to_hash (xmlDoc *doc,
- EXmlHashType type);
-xmlDoc *e_xml_from_hash (GHashTable *hash,
- EXmlHashType type,
- const char *root_node);
-
-void e_xml_destroy_hash (GHashTable *hash);
-
-
-
-typedef enum {
- E_XMLHASH_STATUS_SAME,
- E_XMLHASH_STATUS_DIFFERENT,
- E_XMLHASH_STATUS_NOT_FOUND
-} EXmlHashStatus;
-
-typedef void (* EXmlHashFunc) (const char *key, gpointer user_data);
-
-typedef struct EXmlHash EXmlHash;
-
-EXmlHash *e_xmlhash_new (const char *filename);
-
-void e_xmlhash_add (EXmlHash *hash,
- const char *key,
- const char *data);
-void e_xmlhash_remove (EXmlHash *hash,
- const char *key);
-
-EXmlHashStatus e_xmlhash_compare (EXmlHash *hash,
- const char *key,
- const char *compare_data);
-void e_xmlhash_foreach_key (EXmlHash *hash,
- EXmlHashFunc func,
- gpointer user_data);
-
-void e_xmlhash_write (EXmlHash *hash);
-void e_xmlhash_destroy (EXmlHash *hash);
-
-#endif
diff --git a/e-util/e-xml-utils.c b/e-util/e-xml-utils.c
deleted file mode 100644
index 437934be65..0000000000
--- a/e-util/e-xml-utils.c
+++ /dev/null
@@ -1,502 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-xml-utils.c
- * Copyright 2000, 2001, Ximian, Inc.
- *
- * Authors:
- * Chris Lahey <clahey@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, version 2, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "e-xml-utils.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <locale.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <math.h>
-#include <string.h>
-#include <libxml/parser.h>
-#include <libxml/xmlmemory.h>
-
-#include "gal/util/e-i18n.h"
-#include "gal/util/e-util.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->xmlChildrenNode; 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->xmlChildrenNode; 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,
- const GList *lang_list,
- gint *best_lang_score)
-{
- xmlNodePtr best_node = NULL, node;
-
- for (node = parent->xmlChildrenNode; 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) {
- const 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,
- const 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->xmlChildrenNode; 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) {
- ret_val = e_flexible_strtod (prop, NULL);
- xmlFree (prop);
- }
- return ret_val;
-}
-
-void
-e_xml_set_double_prop_by_name(xmlNode *parent, const xmlChar *prop_name, gdouble value)
-{
- char buffer[E_ASCII_DTOSTR_BUF_SIZE];
- char *format;
-
- g_return_if_fail (parent != NULL);
- g_return_if_fail (prop_name != NULL);
-
- if (fabs (value) < 1e9 && fabs (value) > 1e-5) {
- format = g_strdup_printf ("%%.%df", DBL_DIG);
- } else {
- format = g_strdup_printf ("%%.%dg", DBL_DIG);
- }
- e_ascii_dtostr (buffer, sizeof (buffer), format, value);
- g_free (format);
-
- xmlSetProp (parent, prop_name, buffer);
-}
-
-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;
-}
-
-
-int
-e_xml_save_file (const char *filename, xmlDocPtr doc)
-{
- char *filesave, *slash, *xmlbuf;
- size_t n, written = 0;
- int ret, fd, size;
- int errnosave;
- ssize_t w;
-
- filesave = alloca (strlen (filename) + 5);
- slash = strrchr (filename, '/');
- if (slash)
- sprintf (filesave, "%.*s.#%s", slash - filename + 1, filename, slash + 1);
- else
- sprintf (filesave, ".#%s", filename);
-
- fd = open (filesave, O_WRONLY | O_CREAT | O_TRUNC, 0600);
- if (fd == -1)
- return -1;
-
- xmlDocDumpFormatMemory (doc, (xmlChar **) &xmlbuf, &size, TRUE);
- if (size <= 0) {
- close (fd);
- unlink (filesave);
- errno = ENOMEM;
- return -1;
- }
-
- n = (size_t) size;
- do {
- do {
- w = write (fd, xmlbuf + written, n - written);
- } while (w == -1 && errno == EINTR);
-
- if (w > 0)
- written += w;
- } while (w != -1 && written < n);
-
- xmlFree (xmlbuf);
-
- if (written < n || fsync (fd) == -1) {
- errnosave = errno;
- close (fd);
- unlink (filesave);
- errno = errnosave;
- return -1;
- }
-
- while ((ret = close (fd)) == -1 && errno == EINTR)
- ;
-
- if (ret == -1)
- return -1;
-
- if (rename (filesave, filename) == -1) {
- errnosave = errno;
- unlink (filesave);
- errno = errnosave;
- return -1;
- }
-
- return 0;
-}
diff --git a/e-util/e-xml-utils.h b/e-util/e-xml-utils.h
deleted file mode 100644
index 6c39ee6f79..0000000000
--- a/e-util/e-xml-utils.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-xml-utils.h
- * Copyright 2000, 2001, Ximian, Inc.
- *
- * Authors:
- * Chris Lahey <clahey@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, version 2, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef __E_XML_UTILS__
-#define __E_XML_UTILS__
-
-#include <glib.h>
-#include <libxml/tree.h>
-
-G_BEGIN_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,
- const 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);
-
-int e_xml_save_file (const char *filename, xmlDocPtr doc);
-
-G_END_DECLS
-
-#endif /* __E_XML_UTILS__ */
diff --git a/e-util/eggtrayicon.c b/e-util/eggtrayicon.c
deleted file mode 100644
index 0fb53f0eda..0000000000
--- a/e-util/eggtrayicon.c
+++ /dev/null
@@ -1,341 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* eggtrayicon.c
- * Copyright (C) 2002 Anders Carlsson <andersca@gnu.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser 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/gdkx.h>
-#include "eggtrayicon.h"
-
-#define SYSTEM_TRAY_REQUEST_DOCK 0
-#define SYSTEM_TRAY_BEGIN_MESSAGE 1
-#define SYSTEM_TRAY_CANCEL_MESSAGE 2
-
-static GtkPlugClass *parent_class = NULL;
-
-static void egg_tray_icon_init (EggTrayIcon *icon);
-static void egg_tray_icon_class_init (EggTrayIconClass *klass);
-
-static void egg_tray_icon_update_manager_window (EggTrayIcon *icon);
-
-GType
-egg_tray_icon_get_type (void)
-{
- static GType our_type = 0;
-
- if (our_type == 0)
- {
- static const GTypeInfo our_info =
- {
- sizeof (EggTrayIconClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) egg_tray_icon_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EggTrayIcon),
- 0, /* n_preallocs */
- (GInstanceInitFunc) egg_tray_icon_init
- };
-
- our_type = g_type_register_static (GTK_TYPE_PLUG, "EggTrayIcon", &our_info, 0);
- }
-
- return our_type;
-}
-
-static void
-egg_tray_icon_init (EggTrayIcon *icon)
-{
- icon->stamp = 1;
-
- gtk_widget_add_events (GTK_WIDGET (icon), GDK_PROPERTY_CHANGE_MASK);
-}
-
-static void
-egg_tray_icon_class_init (EggTrayIconClass *klass)
-{
- parent_class = g_type_class_peek_parent (klass);
-}
-
-static GdkFilterReturn
-egg_tray_icon_manager_filter (GdkXEvent *xevent, GdkEvent *event, gpointer user_data)
-{
- EggTrayIcon *icon = user_data;
- XEvent *xev = (XEvent *)xevent;
-
- if (xev->xany.type == ClientMessage &&
- xev->xclient.message_type == icon->manager_atom &&
- xev->xclient.data.l[1] == icon->selection_atom)
- {
- egg_tray_icon_update_manager_window (icon);
- }
- else if (xev->xany.window == icon->manager_window)
- {
- if (xev->xany.type == DestroyNotify)
- {
- egg_tray_icon_update_manager_window (icon);
- }
- }
-
- return GDK_FILTER_CONTINUE;
-}
-
-static void
-egg_tray_icon_send_manager_message (EggTrayIcon *icon,
- long message,
- Window window,
- long data1,
- long data2,
- long data3)
-{
- XClientMessageEvent ev;
- Display *display;
-
- ev.type = ClientMessage;
- ev.window = window;
- ev.message_type = icon->system_tray_opcode_atom;
- ev.format = 32;
- ev.data.l[0] = gdk_x11_get_server_time (GTK_WIDGET (icon)->window);
- ev.data.l[1] = message;
- ev.data.l[2] = data1;
- ev.data.l[3] = data2;
- ev.data.l[4] = data3;
-
-#if HAVE_GTK_MULTIHEAD
- display = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon)));
-#else
- display = gdk_display;
-#endif
-
- gdk_error_trap_push ();
- XSendEvent (display,
- icon->manager_window, False, NoEventMask, (XEvent *)&ev);
- XSync (display, False);
- gdk_error_trap_pop ();
-}
-
-static void
-egg_tray_icon_send_dock_request (EggTrayIcon *icon)
-{
- egg_tray_icon_send_manager_message (icon,
- SYSTEM_TRAY_REQUEST_DOCK,
- icon->manager_window,
- gtk_plug_get_id (GTK_PLUG (icon)),
- 0, 0);
-}
-
-static void
-egg_tray_icon_update_manager_window (EggTrayIcon *icon)
-{
- Display *xdisplay;
-
-#if HAVE_GTK_MULTIHEAD
- xdisplay = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon)));
-#else
- xdisplay = gdk_display;
-#endif
-
- if (icon->manager_window != None)
- {
- GdkWindow *gdkwin;
-
-#if HAVE_GTK_MULTIHEAD
- gdkwin = gdk_window_lookup_for_display (display,
- icon->manager_window);
-#else
- gdkwin = gdk_window_lookup (icon->manager_window);
-#endif
-
- gdk_window_remove_filter (gdkwin, egg_tray_icon_manager_filter, icon);
- }
-
- XGrabServer (xdisplay);
-
- icon->manager_window = XGetSelectionOwner (xdisplay,
- icon->selection_atom);
-
- if (icon->manager_window != None)
- XSelectInput (xdisplay,
- icon->manager_window, StructureNotifyMask);
-
- XUngrabServer (xdisplay);
- XFlush (xdisplay);
-
- if (icon->manager_window != None)
- {
- GdkWindow *gdkwin;
-
-#if HAVE_GTK_MULTIHEAD
- gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (GTK_WIDGET (icon)),
- icon->manager_window);
-#else
- gdkwin = gdk_window_lookup (icon->manager_window);
-#endif
-
- gdk_window_add_filter (gdkwin, egg_tray_icon_manager_filter, icon);
-
- /* Send a request that we'd like to dock */
- egg_tray_icon_send_dock_request (icon);
- }
-}
-
-static EggTrayIcon *
-egg_tray_icon_new_for_xscreen (Screen *xscreen, const char *name)
-{
- EggTrayIcon *icon;
- char buffer[256];
- GdkWindow *root_window;
-
- g_return_val_if_fail (xscreen != NULL, NULL);
-
- icon = g_object_new (EGG_TYPE_TRAY_ICON, NULL);
- gtk_window_set_title (GTK_WINDOW (icon), name);
-
-#if HAVE_GTK_MULTIHEAD
- gtk_plug_construct_for_display (GTK_PLUG (icon),
- gdk_screen_get_display (screen), 0);
-#else
- gtk_plug_construct (GTK_PLUG (icon), 0);
-#endif
-
- gtk_widget_realize (GTK_WIDGET (icon));
-
- /* Now see if there's a manager window around */
- g_snprintf (buffer, sizeof (buffer),
- "_NET_SYSTEM_TRAY_S%d",
- XScreenNumberOfScreen (xscreen));
-
- icon->selection_atom = XInternAtom (DisplayOfScreen (xscreen),
- buffer, False);
-
- icon->manager_atom = XInternAtom (DisplayOfScreen (xscreen),
- "MANAGER", False);
-
- icon->system_tray_opcode_atom = XInternAtom (DisplayOfScreen (xscreen),
- "_NET_SYSTEM_TRAY_OPCODE", False);
-
- egg_tray_icon_update_manager_window (icon);
-
-#if HAVE_GTK_MULTIHEAD
- root_window = gdk_screen_get_root_window (screen);
-#else
- root_window = gdk_window_lookup (gdk_x11_get_default_root_xwindow ());
-#endif
-
- /* Add a root window filter so that we get changes on MANAGER */
- gdk_window_add_filter (root_window,
- egg_tray_icon_manager_filter, icon);
-
- return icon;
-}
-
-#if HAVE_GTK_MULTIHEAD
-EggTrayIcon *
-egg_tray_icon_new_for_screen (GdkScreen *screen, const char *name)
-{
- EggTrayIcon *icon;
- char buffer[256];
-
- g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
-
- return egg_tray_icon_new_for_xscreen (GDK_SCREEN_XSCREEN (screen), name);
-}
-#endif
-
-EggTrayIcon*
-egg_tray_icon_new (const gchar *name)
-{
- return egg_tray_icon_new_for_xscreen (DefaultScreenOfDisplay (gdk_display), name);
-}
-
-guint
-egg_tray_icon_send_message (EggTrayIcon *icon,
- gint timeout,
- const gchar *message,
- gint len)
-{
- guint stamp;
-
- g_return_val_if_fail (EGG_IS_TRAY_ICON (icon), 0);
- g_return_val_if_fail (timeout >= 0, 0);
- g_return_val_if_fail (message != NULL, 0);
-
- if (icon->manager_window == None)
- return 0;
-
- if (len < 0)
- len = strlen (message);
-
- stamp = icon->stamp++;
-
- /* Get ready to send the message */
- egg_tray_icon_send_manager_message (icon, SYSTEM_TRAY_BEGIN_MESSAGE,
- (Window)gtk_plug_get_id (GTK_PLUG (icon)),
- timeout, len, stamp);
-
- /* Now to send the actual message */
- gdk_error_trap_push ();
- while (len > 0)
- {
- XClientMessageEvent ev;
- Display *xdisplay;
-
-#if HAVE_GTK_MULTIHEAD
- xdisplay = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon)));
-#else
- xdisplay = gdk_display;
-#endif
-
- ev.type = ClientMessage;
- ev.window = (Window)gtk_plug_get_id (GTK_PLUG (icon));
- ev.format = 8;
- ev.message_type = XInternAtom (xdisplay,
- "_NET_SYSTEM_TRAY_MESSAGE_DATA", False);
- if (len > 20)
- {
- memcpy (&ev.data, message, 20);
- len -= 20;
- message += 20;
- }
- else
- {
- memcpy (&ev.data, message, len);
- len = 0;
- }
-
- XSendEvent (xdisplay,
- icon->manager_window, False, StructureNotifyMask, (XEvent *)&ev);
- XSync (xdisplay, False);
- }
- gdk_error_trap_pop ();
-
- return stamp;
-}
-
-void
-egg_tray_icon_cancel_message (EggTrayIcon *icon,
- guint id)
-{
- g_return_if_fail (EGG_IS_TRAY_ICON (icon));
- g_return_if_fail (id > 0);
-
- egg_tray_icon_send_manager_message (icon, SYSTEM_TRAY_CANCEL_MESSAGE,
- (Window)gtk_plug_get_id (GTK_PLUG (icon)),
- id, 0, 0);
-}
diff --git a/e-util/eggtrayicon.h b/e-util/eggtrayicon.h
deleted file mode 100644
index 724bc3da8b..0000000000
--- a/e-util/eggtrayicon.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* eggtrayicon.h
- * Copyright (C) 2002 Anders Carlsson <andersca@gnu.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser 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 __EGG_TRAY_ICON_H__
-#define __EGG_TRAY_ICON_H__
-
-#include <gtk/gtkplug.h>
-#include <gdk/gdkx.h>
-
-G_BEGIN_DECLS
-
-#define EGG_TYPE_TRAY_ICON (egg_tray_icon_get_type ())
-#define EGG_TRAY_ICON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_TRAY_ICON, EggTrayIcon))
-#define EGG_TRAY_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EGG_TYPE_TRAY_ICON, EggTrayIconClass))
-#define EGG_IS_TRAY_ICON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_TRAY_ICON))
-#define EGG_IS_TRAY_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_TRAY_ICON))
-#define EGG_TRAY_ICON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_TRAY_ICON, EggTrayIconClass))
-
-typedef struct _EggTrayIcon EggTrayIcon;
-typedef struct _EggTrayIconClass EggTrayIconClass;
-
-struct _EggTrayIcon
-{
- GtkPlug parent_instance;
-
- guint stamp;
-
- Atom selection_atom;
- Atom manager_atom;
- Atom system_tray_opcode_atom;
- Window manager_window;
-};
-
-struct _EggTrayIconClass
-{
- GtkPlugClass parent_class;
-};
-
-GType egg_tray_icon_get_type (void);
-
-#if EGG_TRAY_ENABLE_MULTIHEAD
-EggTrayIcon *egg_tray_icon_new_for_screen (GdkScreen *screen,
- const gchar *name);
-#endif
-
-EggTrayIcon *egg_tray_icon_new (const gchar *name);
-
-guint egg_tray_icon_send_message (EggTrayIcon *icon,
- gint timeout,
- const char *message,
- gint len);
-void egg_tray_icon_cancel_message (EggTrayIcon *icon,
- guint id);
-
-
-
-G_END_DECLS
-
-#endif /* __EGG_TRAY_ICON_H__ */
diff --git a/e-util/md5-utils.c b/e-util/md5-utils.c
deleted file mode 100644
index 6f7e06f48d..0000000000
--- a/e-util/md5-utils.c
+++ /dev/null
@@ -1,363 +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 607471a752..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 _MD5Context {
- 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/evolution-shell.pc.in b/evolution-shell.pc.in
deleted file mode 100644
index 89259d0d0a..0000000000
--- a/evolution-shell.pc.in
+++ /dev/null
@@ -1,23 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-libexecdir=@libexecdir@
-includedir=@includedir@
-datadir=@datadir@
-
-privlibdir=@privlibdir@
-privlibexecdir=@privlibexecdir@
-privincludedir=@privincludedir@
-idldir=@idldir@
-componentdir=@componentdir@
-evolutionuidir=@evolutionuidir@
-imagesdir=@imagesdir@
-
-IDL_INCLUDES=-I ${idldir} @IDL_INCLUDES@
-
-Name: evolution-shell
-Description: libraries needed for Evolution shell components
-Version: @VERSION@
-Requires: libgnome-2.0 libgnomeui-2.0 libbonoboui-2.0 gal-2.2 >= @GAL_REQUIRED@
-Libs: -L${privlibdir} -leshell
-Cflags: -I${privincludedir}
diff --git a/filter/.cvsignore b/filter/.cvsignore
deleted file mode 100644
index 40ccce097c..0000000000
--- a/filter/.cvsignore
+++ /dev/null
@@ -1,10 +0,0 @@
-*.la
-*.lo
-.libs
-.deps
-.pure
-Makefile
-Makefile.in
-libfilter-i18n.h
-filter-marshal.c
-filter-marshal.h
diff --git a/filter/ChangeLog b/filter/ChangeLog
deleted file mode 100644
index e60b99c8d9..0000000000
--- a/filter/ChangeLog
+++ /dev/null
@@ -1,118 +0,0 @@
-2003-12-06 JP Rosevear <jpr@ximian.com>
-
- * */Makefile.am: Remove hard coded disable deprecated flags
-
-2003-12-04 Radek Doulik <rodo@ximian.com>
-
- * filter-rule.h: added FILTER_SOURCE_JUNKTEST - perform only
- junktest on incoming mail
-
-2003-11-26 JP Rosevear <jpr@ximian.com>
-
- * Makefile.am: turn on deprecated gtk stuff
-
-2003-11-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * vfolder-rule.c: #include "em-folder-tree.h"
-
-2003-11-17 Not Zed <NotZed@Ximian.com>
-
- * vfolder-rule.c (source_add): fix for folder selector api changes.
- (vfr_folder_response): handle the dialog response.
-
-2003-10-22 Ettore Perazzoli <ettore@ximian.com>
-
- * filter.glade: Remove Viewports around the treeviews, since they
- already have a scrolled window around them and the viewports cause
- a double bevel to appear.
-
- * rule-editor.c (rule_editor_treeview_new): Make the scrolled
- window have a GTK_SHADOW_IN shadow.
- * vfolder-rule.c (vfolder_editor_sourcelist_new): Likewise
-
-2003-10-10 Not Zed <NotZed@Ximian.com>
-
- * filter-folder.c (folder_selected): change for
- emfolderselectionbutton fixes.
- (get_widget): same.
-
-2003-09-29 Ettore Perazzoli <ettore@ximian.com>
-
- * filter-folder.c (get_widget): Use an EMFolderSelectionButton.
-
-2003-09-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * filter-int.c (get_widget): Listen to the "value-changed" signal
- rather than the "changed" signal. Fixes bug #48166.
-
-2003-09-16 Jeremy Katz <katzj@redhat.com>
-
- * rule-context.c (rule_context_add_part_set): type should be a GType.
- (rule_context_add_rule_set): Likewise.
- * rule-context.h: Update prototypes. Use GType instead of int for
- type in _part_set_map and _rule_set_map.
-
-2003-09-15 Not Zed <NotZed@Ximian.com>
-
- ** See Natzilla task #47524
-
- * filter-rule.h (FilterRule): add a system bit, for rules that
- shouldn't be edited/saved.
-
- * rule-context.c (load): check for ruleset maps in the system
- file, and if they exist, load in as system rules.
- (save): ignore system rules if they exist.
-
- * searchtypes.xml: Added a search-specific types folder. Also
- contains system searches that cannot be deleted.
-
-2003-08-18 Ettore Perazzoli <ettore@ximian.com>
-
- * vfolder-rule.c (source_add): As a temporary measure, don't call
- evolution_shell_client_user_select_folder() since this is not done
- by the shell anymore.
-
- * filter-folder.c (get_widget): Return NULL for now, since we
- can't get the folder selector button from the shell anymore.
-
-2003-08-05 Not Zed <NotZed@Ximian.com>
-
- ** See bug #42636.
-
- * vfoldertypes.xml: Fix some of the subject rules, they were
- missing matching ')'s.
-
-2003-08-01 Not Zed <NotZed@Ximian.com>
-
- ** See bug #47208.
-
- * filter-code.c (build_code): wrap the expression in a match-all
- so boolean expressions work properly for folder searches.
-
-2003-07-23 Dan Winship <danw@ximian.com>
-
- * Makefile.am: Use EVO_MARSHAL_RULE
-
-2003-06-13 Larry Ewing <lewing@ximian.com>
-
- * filter-source.c (filter_source_finalize): free current_url.
-
-2003-06-11 Mike Kestner <mkestner@ximian.com>
-
- * rule-context.c (load): stat the user file before parsing.
-
-2003-06-06 Jeffrey Stedfast <fejj@ximian.com>
-
- Fixes some leaks from bug #43883.
-
- * filter-file.c (xml_decode): Free file->path and set it to
- NULL before entering the loop to decode it. This way if the value
- is already set we don't leak it. Set file->path = g_strdup (str ?
- str : ""); and then xmlFree the str.
-
-2003-05-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * filter-source.c (filter_source_get_sources): Same as below.
-
- * filter-label.c (xml_create): Unref the gconf client when we're
- finished with it.
diff --git a/filter/ChangeLog.pre-1-4 b/filter/ChangeLog.pre-1-4
deleted file mode 100644
index ece5ee7998..0000000000
--- a/filter/ChangeLog.pre-1-4
+++ /dev/null
@@ -1,2967 +0,0 @@
-2003-05-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * filter-colour.c (format_sexp): Format the colour string in a way
- that gdk_color_parse() will handle. Apparently it no longer
- handles rgb:<red>/<green>/<blue>? Fixes bug #42345.
-
-2003-04-24 Jeffrey Stedfast <fejj@ximian.com>
-
- Fix for bug #41578.
-
- * rule-editor.c (rule_move): Pass re->source instead of
- re->current->source to rule_context_get_rank_rule(). Also updated
- to pass re->source to rule_context_rank_rule().
- (rule_editor_play_undo): Updated to pass re->source to
- rule_context_rank_rule().
-
- * rule-context.c (rule_context_rank_rule): Now takes a 'source'
- argument rather than using rule->source (vfolder editor lists
- rules of all sources, not just same-source rules).
- (revert): Pass frule->source/part->source to
- rule_context_rank_rule() - might not be right but should preserve
- the prior behaviour at least.
-
-2003-04-18 Not Zed <NotZed@Ximian.com>
-
- * rule-editor.c (d): removed debug spew.
-
- * addresses #41398
-
- * vfolder-rule.c (format_source): helper function to decode a url
- into a more user-friendly format.
- (source_add, get_widget): add the formatted data as another
- column to the table.
- (vfolder_editor_sourcelist_new): add another column to the table,
- a formatted uri as well as the raw one.
- (d): turned off debug vomit while i'm here.
-
-2003-04-11 Jeffrey Stedfast <fejj@ximian.com>
-
- Fixes for bugs: #41149, #41150, #41151, #41152, #41153, #41155,
- #41156, #41205, and #41208.
-
- * filter-filter.c (get_widget): Same as with filter-rule.
-
- * filter-rule.c (get_widget): Changed border widths of frame
- vboxes and other padding to comply with the HIG.
-
- * rule-editor.c (rule_add): Change window border and padding
- around the 'rules' widget to comply with the HIG.
- (rule_edit): Same.
- (rule_editor_construct): Same here as well.
-
- * filter.glade: Many HIG compliance fixes.
-
-2003-03-28 Not Zed <NotZed@Ximian.com>
-
- * filter-datespec.c (button_clicked): cast warning.
-
-2003-03-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * filter-file.c (xml_decode): Loop over child nodes here too in
- order to not be affected by libxml2 crack.
-
- * filter-source.c (xml_decode): Fixed to disreguard libxml2 crack.
- (get_widget): Use strcmp instead of e_url_equal().
-
-2003-03-20 Dan Winship <danw@ximian.com>
-
- * filter-datespec.c (timespans, set_button): Change the strings in
- the timespans array from "second" / "seconds" to "1 second ago" /
- "%d seconds ago", etc, and update the code in set_button that uses
- them. Fixes #36245, translation clash between the "second" here
- and the one in the calendar (where it's used as "2nd").
- (button_clicked): Fix this so we don't get stuck inside
- gtk_dialog_run's main loop forever.
-
-2003-03-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * rule-editor.c (rule_editor_set_sensitive): Don't return here -
- this is a void function.
- (rule_editor_set_source): Same.
-
-2003-03-18 Not Zed <NotZed@Ximian.com>
-
- * rule-context.c (new_rule_response): use the same code as in
- filter-rule to enforce unique names for all rules/vfolders.
-
-2003-03-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * rule-editor.c (rule_editor_construct): Set the default window
- size to something reasonable (350x400?). Fixes bug #39808.
-
- * vfolder-rule.c (source_remove): Fixed to work properly. Fixes
- bug #39654.
-
- * rule-editor.c (rule_editor_construct): Always add a Cancel
- button here, but if !enable_undo - make the response id
- GTK_RESPONSE_CANCEL rather than GTK_RESPONSE_REJECT (which does
- undo). This mimics the behaviour that was done in the mail/ code
- previously. Fixes bug #39809.
-
-2003-03-11 Not Zed <NotZed@Ximian.com>
-
- * rule-context.c (revert): go to the proper level of child node
- before looking for rule sets, fix for #39165 to make 'cancel' work.
-
-2003-03-06 Jeffrey Stedfast <fejj@ximian.com>
-
- Fixes for bug #39170
-
- * filter-element.c (filter_element_xml_create): Remove return
- keyword.
- (filter_element_build_code): Same.
- (filter_element_format_sexp): Here too.
-
-2003-02-20 Not Zed <NotZed@Ximian.com>
-
- * filter-source.c (filter_source_get_sources): Change to use
- EAccountList, etc.
-
-2003-02-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * vfolder-rule.c (source_add): Get rid of the need for the
- GTK_WIDGET_DESTROYED() check.
-
-2003-02-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * filter-editor.c (filter_editor_new): Use g_object_new()
- instead of gtk_type_new().
-
- * vfolder-editor.c (vfolder_editor_new): Use g_object_new()
- instead of gtk_type_new().
-
- * score-editor.c (score_editor_new): Use g_object_new() instead of
- gtk_type_new().
-
- * rule-editor.c (rule_editor_new): Use g_object_new() instead of
- gtk_type_new().
- (rule_add): Use gtk_window_set_resizable() instead of the
- deprecated gtk_window_set_policy().
- (rule_edit): Same here.
- (rule_editor_construct): Here too.
-
- * rule-context.c (rule_context_add_rule_gui): Use
- gtk_window_set_resizable() instead of the deprecated
- gtk_window_set_policy().
-
-2003-02-05 Dan Winship <danw@ximian.com>
-
- * Makefile.am (gladedir): Defined in configure.in now
- (filterdir): Define using privdatadir
-
-2003-01-22 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am (gladedir): Version using $(BASE_VERSION).
- (filterdir): Likewise.
-
-2003-01-15 Not Zed <NotZed@Ximian.com>
-
- * vfolder-rule.c (get_widget): dont re-use 'widget', its the
- return value!
-
-2003-01-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * rule-context.c (save): Back to using e_xml_save_file().
-
-2003-01-14 Ettore Perazzoli <ettore@ximian.com>
-
- * rule-editor.c (rule_add): Change dialog from OK/Cancel to
- Cancel/OK to match HIG.
- (rule_edit): Likewise.
- (rule_editor_construct): Likewise.
-
- * rule-context.c (rule_context_add_rule_gui): Change dialog from
- OK/Cancel to Cancel/OK to match HIG.
-
- * filter-datespec.c (button_clicked): Change dialog from OK/Cancel
- to Cancel/OK to match HIG.
-
-2003-01-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * rule-editor.c (add_editor_response): Scroll to the newly added
- row. Fixes bug #3725.
- (rule_delete): Scroll to the selected row.
- (rule_move): After moving the row, re-select it and then scroll to
- make sure that it is still visible. Fixes bug #7800.
-
-2003-01-02 Jeffrey Stedfast <fejj@ximian.com>
-
- Fixed to build with -DG_DISABLE_DEPRECATED and
- -DGTK_DISABLE_DEPRECATED
-
-2002-12-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * rule-editor.c (cursor_changed): Use an easier method for getting
- the iter.
-
-2002-12-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * vfolder-rule.c (vfolder_editor_sourcelist_new): New custom
- function for creating the source_list widget.
- (get_widget): Removed the source_list creation code.
-
- * rule-editor.c (rule_editor_construct): Listen to row-activated
- for double-click events. Also, removed the model creation code out
- of here.
- (rule_editor_treeview_new): Moved the treeview and model creation
- code into here instead, and made the glade widgets into custom
- widgets.
-
-2002-11-26 Not Zed <NotZed@Ximian.com>
-
- * vfolder-rule.c (get_widget): Add a textcellrenderer to display
- the folders.
- (get_widget): Remove FIXME which was wrong.
-
- * filter-rule.c (filter_rule_validate): FILTER_RULE_CLASS ->
- _GET_CLASS
-
- * rule-context.c (rule_context_save): RULE_CONTEXT_CLASS ->
- RULE_CONTEXT_GET_CLASS
- (rule_context_revert): "
-
- * *.[ch]: Ran fix.sh over all files.
-
- * rule-editor.c (rule_add): widget:set_parent ->
- window:set_transient_for
- (editor_response): renamed from editor_clicked, handle gtk dialog
- response codes.
- (rule_edit): connect to response rather than clicked.
- (rule_editor_construct): Setup a text column in the tree view.
- Not sure if this can be handled via glade.
-
-2002-11-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * filter-label.c (xml_create): gconfify.
-
-2002-11-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * rule-editor.c: Updated to use GtkTreeView.
-
- * vfolder-rule.c: Same.
-
-2002-11-13 Not Zed <NotZed@Ximian.com>
-
- * rule-context.c (load): Get the root node properly.
-
- * rule-editor.c (rule_add): cast g_object_weak_ref
- (rule_edit): "
-
- * all: xml2 node change - childs->children. Also, ignore 'text'
- nodes while scanning tree.
-
- * rule-context.h: gnome-xml->libxml.
-
- * filter-element.h: gnome-xml->libxml
-
- * vfolder-rule.c (source_add): comment out gtk_destroyed check.
-
- * filter-label.c: Added back some of the guts. Might not work but
- some of the code uses it :-/. Gives u a fixed set of non-editable
- labels.
-
-2002-11-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * rule-editor.c (rule_edit): Use weak_ref instead of connecting to
- "destroy".
- (rule_add): Same.
-
-2002-11-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * vfolder-rule.c (validate): Use a GtkDialog instead of a
- GnomeDialog for reporting errors.
-
- * rule-editor.c (rule_add): Use a GtkDialog instead of
- GnomeDialog.
- (rule_edit): Same.
- (add_editor_response): Use a GtkMessageDialog for the error
- reporting instead of a GnomeDialog.
- (edit_editor_response): Same.
-
- * rule-context.c (rule_context_add_rule_gui): Use a GtkDialog
- instead of a GnomeDialog.
-
- * filter-rule.c (validate): Use GtkDialog instead of GnomeDialog
- here.
-
- * filter-input.c (validate): Use GtkDialog instead of GnomeDialog
- here.
-
- * filter-folder.c (validate): Use GtkDialog instead of GnomeDialog
- here.
-
- * filter-file.c (validate): Use GtkDialog instead of GnomeDialog
- here.
-
- * rule-editor.c: Subclass GtkDialog instead of GnomeDialog.
-
- * filter-datespec.c (validate): Use GtkDialog instead of
- GnomeDialog.
- (button_clicked): Same.
-
-2002-11-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * filter-label.c (xml_create): Deleted most of the internals until
- we devise a gconf schema and redesign how we want to do this. It
- didn't work correctly for 1.2 anyway.
-
- * filter.glade: Converted to the glade-2 format.
-
-2002-11-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * filter-filter.c: Ported.
-
- * filter-source.c (get_widget): Don't use e_utf8_to_gtk_string.
-
- * filter-option.c (xml_create): Don't use e_utf8_xml1_decode.
-
- * filter-input.c (xml_encode): Don't use e_utf8_xml1_encode.
- (xml_decode): Don't use e_utf8_xml1_decode.
- (entry_changed): Don't use e_utf8_gtk_entry_get_text.
- (get_widget): Don't use e_utf8_gtk_entry_set_text.
-
- * filter-file.c (xml_encode): Don't use e_utf8_xml1_encode shit.
- (xml_decode): Don't use e_utf8_xml1_decode.
- (entry_changed): Don't use e_utf8_gtk_entry_get_text.
- (get_widget): Don't use e_utf8_gtk_entry_set_text.
-
-2002-11-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * vfolder-rule.c: Ported.
-
- * vfolder-editor.c: Ported.
-
- * vfolder-context.c: Ported.
-
-2002-11-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * filter-rule.c: Ported.
-
- * score-rule.c: Ported.
-
- * score-editor.c: Ported. Again, thise code seems to be unused.
-
- * score-context.c: Ported. Although it seems this code isn't
- really used anywhere?
-
-2002-11-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * filter-part.c: Ported.
-
- * filter-editor.c: Also ported.
-
- * rule-editor.c: Ported to gtk2 and removed unnecessary e_utf8 snot.
-
-2002-11-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * filter-context.c: Ported this too.
-
- * rule-context.c: Ported to glib2/GObject.
-
-2002-11-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * filter-element.c: Ported to GObject.
-
- * filter-input.c: Same.
-
- * filter-code.c: This too.
-
- * filter-colour.c: And this.
-
- * filter-datespec.c: You guessed it.
-
- * filter-file.c: And again...
-
- * filter-folder.c: Wheee! This is fun...
-
- * filter-int.c: Gee, I wonder...
-
- * filter-label.c: Also ported.
-
- * filter-option.c: Yep, this too.
-
- * filter-source.c: And finally this one.
-
-2002-10-30 Dan Winship <danw@ximian.com>
-
- * rule-editor.c (rule_add): Adjust default rule editor size to
- accomodate the menu widening caused by "Pipe Message to Shell
- Command".
-
-2002-10-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * filtertypes.xml: Removed the Run Once filter action.
-
-2002-09-30 Aaron Weber <aaron@ximian.com>
-
- * filter-folder.c (validate): adjust string on 149 to "You must
- specify a folder.
-
- * filter-datespec.c (get_best_span): adjust string on 174 from
- "You have forgotten to choose a date" to "You must choose a date."
-
-2002-09-25 Dan Winship <danw@ximian.com>
-
- * filter-folder.c (get_widget): Use "mail/*" as the allowed folder
- type.
-
- * vfolder-rule.c (source_add): Likewise
-
-2002-09-22 Dan Winship <danw@ximian.com>
-
- * filter-context.c (filter_delete_uri): add empty statement after
- label to make it ANSI.
-
-2002-09-19 Not Zed <NotZed@Ximian.com>
-
- * filtertypes.xml: Changed source account, use header-source
- rather than (= (get-source) ...)
-
-2002-09-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * filtertypes.xml: Add a Run Once action to run a command only
- once rather than for each message that has that action applied.
-
-2002-08-08 Not Zed <NotZed@Ximian.com>
-
- * rule-editor.c (add_editor_clicked): Dont allow duplicate names.
- (edit_editor_clicked): Same here. For #24803.
-
-2002-08-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * rule-context.c (save): Don't need to save temp/backup files
- anymore, e_xml_save_file() now handles this for us (well, at least
- the saving of temp files). I'm not sure we need a backup file
- anymore now that we can depend on e_xml_save_file() to "Just Work"
-
-2002-08-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * rule-context.c (save): Use e_xml_save_file().
- (xml_doc_save): Removed this code and added it to gal so that
- e-table and all other parts of evolution and so forth could use
- it.
-
-2002-08-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * rule-context.c (xml_doc_save): New internal function to replace
- xmlSaveFile. Does proper error checking and so forth to ensure
- that the resulting file does not ever get truncated.
- (save): Cal xml_doc_save rather than xmlSaveFile. Fixes bug
- #25980.
-
-2002-08-02 Not Zed <NotZed@Ximian.com>
-
- * filter.glade: Added a datespec editor window.
-
- * filter-datespec.c (button_clicked): Rewritten to use glade.
- Simplified all the code around it as a result, etc, and fixed bug
- #21798.
-
-2002-08-01 Peter Williams <peterw@ximian.com>
-
- * filter-datespec.c (activate_specified): If the value was unset,
- initialize it to now.
-
-2002-07-31 Ettore Perazzoli <ettore@ximian.com>
-
- * filter-option.c (xml_create): Remove unused variable.
-
-2002-07-30 Peter Williams <peterw@ximian.com>
-
- * filter-rule.c (get_widget): Translate the rule name when filling
- in the name entry.
-
-2002-07-29 Jeffrey Stedfast <fejj@ximian.com>
-
- * filtertypes.xml: Add xml to unset system flags.
-
-2002-07-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * filter-int.c (xml_decode): Use fs->type in xmlGetProp since we
- already free'd 'type'. Fixes bug #28113.
-
- * filter-element.c: Removed the empty private struct.
-
- * filter-int.c: Removed the empty private struct.
-
-2002-07-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * filter-int.[c,h]: Use GtkType (I only changed this one because I
- turned on debugging for a bit).
-
- * filter-file.c (validate): Fix the strcmp logic a bit, I had it
- the exact opposite of what I really wanted. Oops :-)
-
-2002-07-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * filter-file.c (validate): Do some minimalistic validation of
- command-lines (ie, make sure it isn't an empty string).
-
- * filtertypes.xml: s/shell-exec/shell/ (for the action) and pass
- "/bin/sh" "-c" as the first 2 arguments. For the shell-exec
- *rule*, change the name to "pipe-message" and add the "/bin/sh"
- "-c" arguments too.
-
-2002-07-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * filter-label.c (xml_create): Use the U_() macro to get the UTF-8
- translation.
-
-2002-07-15 Not Zed <NotZed@Ximian.com>
-
- * filter-score.[ch]: cvs remove.
-
- * filter-element.c: Remove reference to filter-score.h
-
- * vfoldertypes.xml: Fix label vfolder rule as below, also add
- score and size rules from filtertypes.xml.
-
- * filtertypes.xml (score): Use (cast-int (user-tag "score")) to
- get the value directly, rather than (get-score).
- (label): Use (user-tag "label") to get the value directly, rather
- than (get-label). The label is now a string too.
-
- * filter-label.c (filter_label_get_type): Make filter-label
- inherit from filter-option. Which makes more sense doesn't it
- ... surely.
- (validate): Removed, optionlists are self-validating.
- (xml_create): Initialise the list of options from our
- configuration database. If it isn't working, ignore it and set it
- up anyway.
- (filter_label_init): Override the xml type.
- (filter_label_count):
- (filter_label_label):
- (filter_label_index): Some helper functions for external
- interfaces. All of the mail config/etc should use this.
-
- * filter-option.c (free_option):
- (xml_create):
- (clone): Made the "value" type in glib memory rather than xml
- memory space.
- (filter_option_add): Utility function to add a new option to the
- list.
- (clone): Use above function to simplify code.
- (xml_create): Same here.
- (xml_encode): Allow subclasses to override the type.
-
-2002-07-10 Not Zed <NotZed@Ximian.com>
-
- ** fixes for #10781
-
- * filter-int.c (xml_encode):
- (xml_decode): Handle encoding/decoding with a type name, in a
- manner compatible with the score/label elemtns.
- (filter_int_new_type): New constructor to create a generic 'int'
- type.
-
- * filter-score.c: Removed. Now relies on using a filter-int with
- appropriate settings.
-
- * filter-label.[ch]: Now inherits from filter-int.
-
- * rule-context.c (rule_context_revert): New method to revert a
- filter context back to a user-file's definition.
- (revert): implementation.
-
- * filter-rule.h: Added new virtual method _eq and wrapper, and
- fixed all subclasses to implement it.
-
- * filter-element.h: Added new virtual method _eq and wrapper.
- Fixed all subclasses to implement it.
-
-2002-07-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * filtertypes.xml: Make the sound type for (play-sound ) a "file"
- type rather than "string" since users will want to use a filesel
- to select it most likely. Fixes bug #26921.
-
- * filter-file.c (validate): If the type is "file" check that it is
- a valid file, otheriwse if it is a command-line just ignore it for
- now.
-
- * filter-element.c (filter_element_new_type_name): A filter type
- of "file" should also use the filter-file object.
-
-2002-05-24 Ettore Perazzoli <ettore@ximian.com>
-
- * filter-rule.c (get_widget): Fix English grammar.
-
-2002-05-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * vfoldertypes.xml: Added a label definition.
-
- * filtertypes.xml: Added a label definition.
-
- * filter-label.c: New filter widget for labels.
-
- * filter-element.c (filter_element_new_type_name): Add support for
- the new label widget.
-
- * filter-int.c (format_sexp): Fixed a memory leak.
-
-2002-05-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * filter-file.c (get_widget): Set the path in the entry widget.
-
- * Makefile.am: Add filter-file.[c,h] to the build.
-
- * filtertypes.xml: Add a "Command" filter rule.
-
- * filter-element.c (filter_element_new_type_name): Add support for
- type "command" which uses the new FilterFile widget.
-
- * filter-file.[c,h]: New filter widgets for choosing files and/or
- command-line's (?). Not yet hooked up or anything, just for future
- use.
-
-2002-05-08 Not Zed <NotZed@Ximian.com>
-
- * rule-context.c (rule_context_delete_uri): Changed to return a
- GList *, a list of the names of the rules affected by the delete,
- fixed all implementors.
- (rule_context_rename_uri): Similarly for delete_uri, for
- api consistency.
- (rule_context_free_uri_list): Util function to free the return
- from above.
-
- * filter-context.c (filter_delete_uri): Actually implement it, fix
- for #18826, and some related bugs.
-
-2002-04-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * Makefile.am: Get rid of ibex stuff, we no longer use it.
-
-2002-04-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * filtertypes.xml: The score "is" rule should have a value of "is"
- and not "less-than".
-
-2002-04-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * filter-rule.c (get_widget): Fixed a grammer mistake, or so
- according to bug #23376. Whatever.
-
-2002-04-11 Russell Steinthal <rms39@columbia.edu>
-
- * filtertypes.xml: Fix "Follow Up" searches by generating a
- boolean, rather than a string result (Fixes #23334)
-
- * vfoldertypes.xml: Ditto
-
-2002-04-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * rule-editor.c (double_click): This needs to return a gboolean
- (TRUE).
- (rule_edit): Using gnome_dialog_set_parent instead of
- gtk_widget_set_parent_window seems to fix bug #23226.
-
-2002-04-10 Not Zed <NotZed@Ximian.com>
-
- * filter-input.c (validate): Check that there is a value to
- setup. Fixes #15470.
-
- * filtertypes.xml: Added closing ) for "not starts with" subject
- rule.
- Added closing ) for all the other broken rules too ...
-
-2002-04-04 Dan Winship <danw@ximian.com>
-
- * filter-folder.c: Remove the #ifndef SHELL part. Use an
- EvolutionFolderSelectorButton. Remove FilterFolder->name since
- it's no longer needed.
-
- * filter-context.c (filter_rename_uri): Update for removal of
- FilterFolder->name.
-
- * filter-element.c (filter_element_copy_value): Likewise.
-
- * vfolder-rule.c (source_add): Update for
- evolution_shell_client_user_select_folder API change.
-
-2002-04-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * rule-editor.c (rule_edit): Set 're' as the parent window rather
- than as the parent widget.
- (add_editor_clicked): Only unref the editor if it is non-NULL.
-
-2002-03-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * filter-source.c (filter_source_get_sources): Free account_name
- so we don't leak. Also after getting the source uri, use camel-url
- to hide unwanted stuff.
- (xml_decode): Use xmlFree on the buffer returned from
- xmlNodeGetContent rather than g_free, as I think they are
- incompatable. Also use camel-url here to hide any params in the
- decoded url (to make things compatable with what older versions
- may have saved).
-
-2002-03-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * filtertypes.xml: Added beep and play-sound actions.
-
-2002-02-26 Not Zed <NotZed@Ximian.com>
-
- * filter-filter.c (option_activate): Copy values across to new
- part.
-
- * filter-rule.c (option_activate): copy values across to new part,
- if they are compatible.
-
- * filter-element.c (filter_element_copy_value): New function to
- copy values (where they can be) from one filter element to another.
-
- * filter-part.c (filter_part_copy_values): New function to copy
- values of a filter part. #1359.
-
-2002-02-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * vfoldertypes.xml:
- * filtertypes.xml: Re-added contains and
- not-contains. Also added filter/vfolder rules for
- Flag-for-Followup.
-
-2002-02-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * vfoldertypes.xml: Same here.
-
- * filtertypes.xml: For mlist matching, we only want "is" and "is
- not" because that is all we really support anyway.
-
-2002-01-27 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am: Use LIBFILTER_CFLAGS.
-
-2002-01-26 Mikael Hallendal <micke@codefactory.se>
-
- * rule-editor.c (add_editor_clicked): check if re->edit != NULL
- before trying to unref it. Fixes a segfault when closing the
- rule editor.
-
-2002-01-15 Not Zed <NotZed@Ximian.com>
-
- * filter-input.c (xml_decode): If we write "" to an xml file, we
- read back NULL. So if we read back NULL, convert it to "".
- Sigh. This makes a fix for #7801, although new gui may also be
- required.
-
-2002-01-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * filter-source.c (filter_source_get_sources): Get the account
- name because that is the string we'd like to use for display.
- (get_widget): Generate the account label the same as we do for the
- composer's From optionmenu.
- (filter_source_finalize): Free the account_name.
- (clone): Pass along the account_name member to filter_add_source
-
-2002-01-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * vfoldertypes.xml: Make the date comparisons read the same as the
- ones in filtertypes.xml
-
-2001-12-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * filtertypes.xml: Add new action to execute a shell command.
-
-2001-12-09 Jon Trowbridge <trow@ximian.com>
-
- * vfoldertypes.xml: Add "Needs Reply" option to different status
- types.
-
- * filtertypes.xml: Add "Needs Reply" option to different status
- types.
-
-2001-11-15 Zbigniew Chyla <cyba@gnome.pl>
-
- * rule-editor.c (set_source): Removed U_. Fixes #15415.
-
-2001-11-21 Not Zed <NotZed@Ximian.com>
-
- * rule-editor.c (rule_edit): Hook onto destroy event.
- (edit_editor_destroyed): IF we get destroyed, fake a -1 click
- event to clean up.
- (rule_add): hook onto destroy of dialogue.
- (add_editor_destroyed): Simulate -1 click event to clean up. Fix
- for #15745.
-
-2001-11-20 Not Zed <NotZed@Ximian.com>
-
- * vfolder-rule.c (source_add): Desensitise button while we're
- running, and if we are destroyed, exit and do nothing when we're
- done. Fixes crash in #15498.
-
- * filter-folder.c (button_clicked): Ref 'ff' around dialogue
- showing incase we go away before it returns. Also desensitise
- button that invoked us while its being processed & remove
- 'is_active' hack. Fixes similar problems to those in #15498.
-
-2001-11-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * filter-rule.c (validate): Force the user to name the filter.
-
- * vfolder-rule.c (validate): Force the user to name the vfolder.
-
-2001-10-29 <NotZed@Ximian.com>
-
- * rule-editor.c: Some debug printf fixes for printf's that dont
- like null %s's.
- Fixed previous fix.
- (rule_editor_play_undo): Need to ref rule since add doesn't. This
- doesn't crash anymore but doesn't seem to do everything right either.
-
-2001-10-28 <NotZed@Ximian.com>
-
- * filter-context.c (filter_rename_uri): Implement, change any
- folder uri's that have been renamed, to the new one.
- (filter_delete_uri): Dont actually do any work (yet).
-
- We could probably put rename_uri on every rule context/filter
- part/filter element, and let their methods handle it, but for now
- its easy enough just to handle the few cases that we have to
- handle manually.
-
- * rule-context.c (rule_context_delete_uri): Update a filter
- context for a deleted uri, e.g. folder removed.
- (rule_context_rename_uri): Update a filter context for a renamed
- uri, e.g.
-
- * filter-folder.c (filter_folder_set_value): New function to set
- the uri of a folder filter.
-
- * rule-editor.c (rule_move): Add undo for move.
- (rule_editor_add_undo): Add extra rank item.
- (rule_editor_play_undo): handle rank case.
- (rule_editor_finalise): Clean up any hanging over undo log.
- (editor_clicked): Only enable 'undo' if we have
- EVOLUTION_RULE_UNDO enabled. Code still a bit flakey.
- (rule_editor_construct): Only enable a cancel button if
- EVOLUTION_RULE_UNDO is set.
- (rule_editor_add_undo): Only add if undo enabled.
- (rule_editor_add_undo): Fix enable undo logic.
-
- * filter-rule.c (filter_rule_set_name): Emit a changed event if it
- changes.
- (filter_rule_set_source): Same.
-
-2001-10-26 <NotZed@Ximian.com>
-
- * rule-context.c (rule_context_find_rank_rule): Find a rule at a
- specific rank/source.
-
- * rule-editor.c (add_editor_clicked): Log the added object.
- (rule_editor_add_undo): New function to add an undo record to the
- rule editor.
- (edit_editor_clicked): Log the changed object.
- (rule_delete): Add undo object.
- (rule_editor_play_undo): Play an undo log back.
-
-2001-10-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * rule-editor.c (rule_add): Desensitize the parent dialog.
- (rule_edit): Same.
- (add_editor_clicked): Re-sensitize it.
- (edit_editor_clicked): Same.
-
-2001-10-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * rule-editor.c: Keep track of the current editor dialog window so
- that on exit, we can close it too.
- (rule_edit): Don't make the dialog modal and set it's parent
- window as well as don't allow more than a single editor window to
- be popped up.
- (rule_add): Same.
-
-2001-10-24 <NotZed@Ximian.com>
-
- * rule-context.c (rule_context_class_init): Add a changed signal.
- Emits if the order changes or if you add or remove a rule.
- (rule_context_rank_rule): Fix rank rule to properly rank based on
- source, not merely on list position.
- (rule_context_add_rule): Also emit changed signal.
- (rule_context_remove_rule): Same.
- (rule_context_rank_rule): Emit changed signal.
-
-2001-10-20 Jon Trowbridge <trow@ximian.com>
-
- * rule-editor.c (set_source): Translate the rule names. (Bug
- #13082)
-
-2001-10-17 Ettore Perazzoli <ettore@ximian.com>
-
- * filter-folder.c (button_clicked): Pass the toplevel to
- `evolution_shell_client_user_select_folder()'.
- * vfolder-rule.c (source_add): Likewise.
-
-2001-10-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * filter-folder.c (button_clicked): Kludge to raise the filter
- dialog when the folder-selection window is closed.
-
-2001-10-15 <NotZed@Ximian.com>
-
- * filter-input.c (xml_decode): If we have no node content, dont
- append any value or try to decode it. Gets rid of a bunch of
- annoying warnings.
-
-2001-10-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * vfolder-rule.c (validate): And again here.
-
- * filter-folder.c (validate): Same.
-
- * filter-datespec.c (validate): Take out the "Oops" part of the
- warning.
-
-2001-10-04 <NotZed@Ximian.com>
-
- * rule-context.c (save): "safe" save code, first save to .#name,
- then rename to name if it worked, also create backups to name~.
- Means filters/etc wont get reset/lost if disk fills up, although
- relies on libxml failing properly.
- (new_rule_clicked): Removed warning, we do now have changed
- signals!
-
-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 d9d20ae113..0000000000
--- a/filter/Makefile.am
+++ /dev/null
@@ -1,90 +0,0 @@
-
-glade_DATA = filter.glade
-
-INCLUDES = \
- -I $(top_srcdir) \
- -I $(top_srcdir)/camel \
- -I $(top_srcdir)/e-util \
- -I $(top_srcdir)/shell \
- -DFILTER_GLADEDIR=\"$(gladedir)\" \
- -DG_LOG_DOMAIN=\"filter\" \
- $(LIBFILTER_CFLAGS)
-
-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-file.c \
- filter-file.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-label.c \
- filter-label.h \
- filter-marshal.c \
- filter-marshal.h \
- filter-option.c \
- filter-option.h \
- filter-part.c \
- filter-part.h \
- filter-rule.c \
- filter-rule.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 = \
- $(glade_DATA) \
- ChangeLog.pre-1-4 \
- filter-marshal.list \
- filtertypes.xml \
- libfilter-i18n.h \
- vfoldertypes.xml \
- searchtypes.xml
-
-# basic rules.
-filterdir = $(privdatadir)
-filter_DATA = filtertypes.xml vfoldertypes.xml searchtypes.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 >> $@
-
-MARSHAL_GENERATED = filter-marshal.c filter-marshal.h
-@EVO_MARSHAL_RULE@
diff --git a/filter/filter-code.c b/filter/filter-code.c
deleted file mode 100644
index 7b308506cc..0000000000
--- a/filter/filter-code.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 "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 *fc);
-static void filter_code_finalise (GObject *obj);
-
-
-static FilterInputClass *parent_class;
-
-
-GType
-filter_code_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (FilterCodeClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) filter_code_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (FilterCode),
- 0, /* n_preallocs */
- (GInstanceInitFunc) filter_code_init,
- };
-
- type = g_type_register_static (FILTER_TYPE_INPUT, "FilterCode", &info, 0);
- }
-
- return type;
-}
-
-static void
-filter_code_class_init (FilterCodeClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- FilterElementClass *fe_class = FILTER_ELEMENT_CLASS (klass);
-
- parent_class = g_type_class_ref (FILTER_TYPE_INPUT);
-
- object_class->finalize = filter_code_finalise;
-
- /* override methods */
- fe_class->build_code = build_code;
- fe_class->format_sexp = format_sexp;
-}
-
-static void
-filter_code_init (FilterCode *fc)
-{
- ((FilterInput *) fc)->type = xmlStrdup ("code");
-}
-
-static void
-filter_code_finalise (GObject *obj)
-{
- G_OBJECT_CLASS (parent_class)->finalize (obj);
-}
-
-
-/**
- * filter_code_new:
- *
- * Create a new FilterCode object.
- *
- * Return value: A new #FilterCode object.
- **/
-FilterCode *
-filter_code_new (void)
-{
- return (FilterCode *) g_object_new (FILTER_TYPE_CODE, NULL, NULL);
-}
-
-/* here, the string IS the code */
-static void
-build_code (FilterElement *fe, GString *out, struct _FilterPart *ff)
-{
- GList *l;
- FilterInput *fi = (FilterInput *)fe;
-
- g_string_append(out, "(match-all ");
- l = fi->values;
- while (l) {
- g_string_append(out, (char *)l->data);
- l = g_list_next(l);
- }
- g_string_append(out, ")");
-}
-
-/* and we have no value */
-static void
-format_sexp (FilterElement *fe, GString *out)
-{
- ;
-}
diff --git a/filter/filter-code.h b/filter/filter-code.h
deleted file mode 100644
index 2d590279ee..0000000000
--- a/filter/filter-code.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_CODE_H
-#define _FILTER_CODE_H
-
-#include "filter-input.h"
-
-#define FILTER_TYPE_CODE (filter_code_get_type ())
-#define FILTER_CODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FILTER_TYPE_CODE, FilterCode))
-#define FILTER_CODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FILTER_TYPE_CODE, FilterCodeClass))
-#define IS_FILTER_CODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FILTER_TYPE_CODE))
-#define IS_FILTER_CODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FILTER_TYPE_CODE))
-#define FILTER_CODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FILTER_TYPE_CODE, FilterCodeClass))
-
-typedef struct _FilterCode FilterCode;
-typedef struct _FilterCodeClass FilterCodeClass;
-
-struct _FilterCode {
- FilterInput parent_object;
-};
-
-struct _FilterCodeClass {
- FilterInputClass parent_class;
-
- /* virtual methods */
-
- /* signals */
-};
-
-GType 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 4819b24524..0000000000
--- a/filter/filter-colour.c
+++ /dev/null
@@ -1,229 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <libgnomeui/gnome-color-picker.h>
-
-#include "e-util/e-sexp.h"
-#include "filter-colour.h"
-
-#define d(x)
-
-static int colour_eq (FilterElement *fe, FilterElement *cm);
-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 *klass);
-static void filter_colour_init (FilterColour *fc);
-static void filter_colour_finalise (GObject *obj);
-
-
-static FilterElementClass *parent_class;
-
-GType
-filter_colour_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (FilterColourClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) filter_colour_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (FilterColour),
- 0, /* n_preallocs */
- (GInstanceInitFunc) filter_colour_init,
- };
-
- type = g_type_register_static (FILTER_TYPE_ELEMENT, "FilterColour", &info, 0);
- }
-
- return type;
-}
-
-static void
-filter_colour_class_init (FilterColourClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- FilterElementClass *fe_class = FILTER_ELEMENT_CLASS (klass);
-
- parent_class = g_type_class_ref (FILTER_TYPE_ELEMENT);
-
- object_class->finalize = filter_colour_finalise;
-
- /* override methods */
- fe_class->eq = colour_eq;
- fe_class->xml_create = xml_create;
- fe_class->xml_encode = xml_encode;
- fe_class->xml_decode = xml_decode;
- fe_class->get_widget = get_widget;
- fe_class->build_code = build_code;
- fe_class->format_sexp = format_sexp;
-}
-
-static void
-filter_colour_init (FilterColour *fc)
-{
- ;
-}
-
-static void
-filter_colour_finalise (GObject *obj)
-{
- G_OBJECT_CLASS (parent_class)->finalize (obj);
-}
-
-/**
- * filter_colour_new:
- *
- * Create a new FilterColour object.
- *
- * Return value: A new #FilterColour object.
- **/
-FilterColour *
-filter_colour_new (void)
-{
- return (FilterColour *) g_object_new (FILTER_TYPE_COLOUR, NULL, NULL);
-}
-
-static int
-colour_eq (FilterElement *fe, FilterElement *cm)
-{
- FilterColour *fc = (FilterColour *)fe, *cc = (FilterColour *)cm;
-
- return FILTER_ELEMENT_CLASS (parent_class)->eq (fe, cm)
- && fc->r == cc->r
- && fc->g == cc->g
- && fc->b == cc->b
- && fc->a == cc->a;
-}
-
-static void
-xml_create (FilterElement *fe, xmlNodePtr node)
-{
- /* parent implementation */
- FILTER_ELEMENT_CLASS (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);
- g_signal_connect (cp, "color_set", G_CALLBACK (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)
-{
- FilterColour *fc = (FilterColour *)fe;
- char *str;
-
- str = g_strdup_printf ("#%02x%02x%02x", (fc->r >> 8) & 0xff, (fc->g >> 8) & 0xff, (fc->b >> 8) & 0xff);
- 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 9e22a2021f..0000000000
--- a/filter/filter-colour.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_COLOUR_H
-#define _FILTER_COLOUR_H
-
-#include "filter-element.h"
-
-#define FILTER_TYPE_COLOUR (filter_colour_get_type ())
-#define FILTER_COLOUR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FILTER_TYPE_COLOUR, FilterColour))
-#define FILTER_COLOUR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FILTER_TYPE_COLOUR, FilterColourClass))
-#define IS_FILTER_COLOUR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FILTER_TYPE_COLOUR))
-#define IS_FILTER_COLOUR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FILTER_TYPE_COLOUR))
-#define FILTER_COLOUR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FILTER_TYPE_COLOUR, FilterColourClass))
-
-typedef struct _FilterColour FilterColour;
-typedef struct _FilterColourClass FilterColourClass;
-
-struct _FilterColour {
- FilterElement parent_object;
-
- guint16 r, g, b, a;
-};
-
-struct _FilterColourClass {
- FilterElementClass parent_class;
-
- /* virtual methods */
-
- /* signals */
-};
-
-GType 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 3e82bc4c39..0000000000
--- a/filter/filter-context.c
+++ /dev/null
@@ -1,279 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 "filter-context.h"
-#include "filter-filter.h"
-
-/* For poking into filter-folder guts */
-#include "filter-folder.h"
-
-#define d(x)
-
-static void filter_context_class_init (FilterContextClass *klass);
-static void filter_context_init (FilterContext *fc);
-static void filter_context_finalise (GObject *obj);
-
-static GList *filter_rename_uri (RuleContext *rc, const char *olduri, const char *newuri, GCompareFunc cmp);
-static GList *filter_delete_uri (RuleContext *rc, const char *uri, GCompareFunc cmp);
-
-
-static RuleContextClass *parent_class = NULL;
-
-
-GType
-filter_context_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (FilterContextClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) filter_context_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (FilterContext),
- 0, /* n_preallocs */
- (GInstanceInitFunc) filter_context_init,
- };
-
- type = g_type_register_static (RULE_TYPE_CONTEXT, "FilterContext", &info, 0);
- }
-
- return type;
-}
-
-static void
-filter_context_class_init (FilterContextClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- RuleContextClass *rc_class = RULE_CONTEXT_CLASS (klass);
-
- parent_class = g_type_class_ref (RULE_TYPE_CONTEXT);
-
- object_class->finalize = filter_context_finalise;
-
- /* override methods */
- rc_class->rename_uri = filter_rename_uri;
- rc_class->delete_uri = filter_delete_uri;
-}
-
-static void
-filter_context_init (FilterContext *fc)
-{
- rule_context_add_part_set ((RuleContext *) fc, "partset", filter_part_get_type (),
- rule_context_add_part, rule_context_next_part);
- rule_context_add_part_set ((RuleContext *) fc, "actionset", filter_part_get_type (),
- (RCPartFunc) filter_context_add_action,
- (RCNextPartFunc) filter_context_next_action);
-
- rule_context_add_rule_set ((RuleContext *) fc, "ruleset", filter_filter_get_type (),
- (RCRuleFunc) rule_context_add_rule, rule_context_next_rule);
-}
-
-static void
-filter_context_finalise (GObject *obj)
-{
- FilterContext *fc = (FilterContext *)obj;
-
- g_list_foreach (fc->actions, (GFunc)g_object_unref, NULL);
- g_list_free (fc->actions);
-
- G_OBJECT_CLASS (parent_class)->finalize (obj);
-}
-
-/**
- * filter_context_new:
- *
- * Create a new FilterContext object.
- *
- * Return value: A new #FilterContext object.
- **/
-FilterContext *
-filter_context_new (void)
-{
- return (FilterContext *) g_object_new (FILTER_TYPE_CONTEXT, NULL, NULL);
-}
-
-void
-filter_context_add_action (FilterContext *fc, FilterPart *action)
-{
- d(printf("find action : "));
- fc->actions = g_list_append (fc->actions, action);
-}
-
-FilterPart *
-filter_context_find_action (FilterContext *fc, const char *name)
-{
- d(printf("find action : "));
- return filter_part_find_list (fc->actions, name);
-}
-
-FilterPart *
-filter_context_create_action (FilterContext *fc, const char *name)
-{
- FilterPart *part;
-
- if ((part = filter_context_find_action (fc, name)))
- return filter_part_clone (part);
-
- return NULL;
-}
-
-FilterPart *
-filter_context_next_action (FilterContext *fc, FilterPart *last)
-{
- return filter_part_next_list (fc->actions, last);
-}
-
-/* We search for any folders in our actions list that need updating, update them */
-static GList *
-filter_rename_uri (RuleContext *rc, const char *olduri, const char *newuri, GCompareFunc cmp)
-{
- FilterRule *rule;
- GList *l, *el;
- FilterPart *action;
- FilterElement *element;
- int count = 0;
- GList *changed = NULL;
-
- d(printf("uri '%s' renamed to '%s'\n", olduri, newuri));
-
- /* For all rules, for all actions, for all elements, rename any folder elements */
- /* Yes we could do this inside each part itself, but not today */
- rule = NULL;
- while ((rule = rule_context_next_rule (rc, rule, NULL))) {
- int rulecount = 0;
-
- d(printf("checking rule '%s'\n", rule->name));
-
- l = FILTER_FILTER (rule)->actions;
- while (l) {
- action = l->data;
-
- d(printf("checking action '%s'\n", action->name));
-
- el = action->elements;
- while (el) {
- element = el->data;
-
- d(printf("checking element '%s'\n", element->name));
- if (IS_FILTER_FOLDER (element)) {
- d(printf(" is folder, existing uri = '%s'\n",
- FILTER_FOLDER (element)->uri));
- }
-
- if (IS_FILTER_FOLDER (element)
- && cmp(((FilterFolder *)element)->uri, olduri)) {
- d(printf(" Changed!\n"));
- filter_folder_set_value((FilterFolder *)element, newuri);
- rulecount++;
- }
- el = el->next;
- }
- l = l->next;
- }
-
- if (rulecount) {
- changed = g_list_append (changed, g_strdup (rule->name));
- filter_rule_emit_changed (rule);
- }
-
- count += rulecount;
- }
-
- /* might need to call parent class, if it did anything ... parent_class->rename_uri(f, olduri, newuri, cmp); */
-
- return changed;
-}
-
-static GList *
-filter_delete_uri (RuleContext *rc, const char *uri, GCompareFunc cmp)
-{
- /* We basically do similar to above, but when we find it,
- Remove the action, and if thats the last action, this might create an empty rule? remove the rule? */
-
- FilterRule *rule;
- GList *l, *el;
- FilterPart *action;
- FilterElement *element;
- int count = 0;
- GList *deleted = NULL;
-
- d(printf("uri '%s' deleted\n", uri));
-
- /* For all rules, for all actions, for all elements, check deleted folder elements */
- /* Yes we could do this inside each part itself, but not today */
- rule = NULL;
- while ((rule = rule_context_next_rule (rc, rule, NULL))) {
- int recorded = 0;
-
- d(printf("checking rule '%s'\n", rule->name));
-
- l = FILTER_FILTER (rule)->actions;
- while (l) {
- action = l->data;
-
- d(printf("checking action '%s'\n", action->name));
-
- el = action->elements;
- while (el) {
- element = el->data;
-
- d(printf("checking element '%s'\n", element->name));
- if (IS_FILTER_FOLDER (element)) {
- d(printf(" is folder, existing uri = '%s'\n",
- FILTER_FOLDER (element)->uri));
- }
-
- if (IS_FILTER_FOLDER (element)
- && cmp(((FilterFolder *)element)->uri, uri)) {
- d(printf(" Deleted!\n"));
- /* check if last action, if so, remove rule instead? */
- l = l->next;
- filter_filter_remove_action ((FilterFilter *)rule, action);
- g_object_unref (action);
- count++;
- if (!recorded)
- deleted = g_list_append (deleted, g_strdup (rule->name));
- goto next_action;
- }
- el = el->next;
- }
- l = l->next;
- next_action:
- ;
- }
- }
-
- /* TODO: could call parent and merge lists */
-
- return deleted;
-}
diff --git a/filter/filter-context.h b/filter/filter-context.h
deleted file mode 100644
index 157ee6f1de..0000000000
--- a/filter/filter-context.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_CONTEXT_H
-#define _FILTER_CONTEXT_H
-
-#include "rule-context.h"
-
-#define FILTER_TYPE_CONTEXT (filter_context_get_type ())
-#define FILTER_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FILTER_TYPE_CONTEXT, FilterContext))
-#define FILTER_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FILTER_TYPE_CONTEXT, FilterContextClass))
-#define IS_FILTER_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FILTER_TYPE_CONTEXT))
-#define IS_FILTER_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FILTER_TYPE_CONTEXT))
-#define FILTER_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FILTER_TYPE_CONTEXT, FilterContextClass))
-
-typedef struct _FilterContext FilterContext;
-typedef struct _FilterContextClass FilterContextClass;
-
-struct _FilterContext {
- RuleContext parent_object;
-
- GList *actions;
-};
-
-struct _FilterContextClass {
- RuleContextClass parent_class;
-
- /* virtual methods */
-
- /* signals */
-};
-
-GType filter_context_get_type (void);
-FilterContext *filter_context_new (void);
-
-/* methods */
-void filter_context_add_action (FilterContext *fc, FilterPart *action);
-FilterPart *filter_context_find_action (FilterContext *fc, const char *name);
-FilterPart *filter_context_create_action (FilterContext *fc, const char *name);
-FilterPart *filter_context_next_action (FilterContext *fc, FilterPart *last);
-
-#endif /* ! _FILTER_CONTEXT_H */
diff --git a/filter/filter-datespec.c b/filter/filter-datespec.c
deleted file mode 100644
index bbb6df77d5..0000000000
--- a/filter/filter-datespec.c
+++ /dev/null
@@ -1,480 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <stdlib.h>
-#include <time.h>
-#include <math.h>
-
-#include <gtk/gtk.h>
-#include <libgnome/gnome-i18n.h>
-#include <glade/glade.h>
-
-#include "filter-datespec.h"
-#include "e-util/e-sexp.h"
-
-#define d(x)
-
-static gboolean validate (FilterElement *fe);
-static int date_eq (FilterElement *fe, FilterElement *cm);
-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 *klass);
-static void filter_datespec_init (FilterDatespec *fd);
-static void filter_datespec_finalise (GObject *obj);
-
-#define PRIV(x) (((FilterDatespec *)(x))->priv)
-
-typedef struct _timespan {
- guint32 seconds;
- const char *singular;
- const char *plural;
- float max;
-} timespan;
-
-static const timespan timespans[] = {
- { 1, N_("1 second ago"), N_("%d seconds ago"), 59.0 },
- { 60, N_("1 minute ago"), N_("%d minutes ago"), 59.0 },
- { 3600, N_("1 hour ago"), N_("%d hours ago"), 23.0 },
- { 86400, N_("1 day ago"), N_("%d days ago"), 31.0 },
- { 604800, N_("1 week ago"), N_("%d weeks ago"), 52.0 },
- { 2419200, N_("1 month ago"), N_("%d months ago"), 12.0 },
- { 31557600, N_("1 year ago"), N_("%d years ago"), 1000.0 },
-};
-
-#define DAY_INDEX 3
-#define N_TIMESPANS (sizeof (timespans) / sizeof (timespans[0]))
-
-struct _FilterDatespecPrivate {
- GtkWidget *label_button;
- GtkWidget *notebook_type, *option_type, *calendar_specify, *spin_relative, *option_relative;
- FilterDatespec_type type;
- int span;
-};
-
-static FilterElementClass *parent_class;
-
-GType
-filter_datespec_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (FilterDatespecClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) filter_datespec_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (FilterDatespec),
- 0, /* n_preallocs */
- (GInstanceInitFunc) filter_datespec_init,
- };
-
- type = g_type_register_static (FILTER_TYPE_ELEMENT, "FilterDatespec", &info, 0);
- }
-
- return type;
-}
-
-static void
-filter_datespec_class_init (FilterDatespecClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- FilterElementClass *fe_class = FILTER_ELEMENT_CLASS (klass);
-
- parent_class = g_type_class_ref (FILTER_TYPE_ELEMENT);
-
- object_class->finalize = filter_datespec_finalise;
-
- /* override methods */
- fe_class->validate = validate;
- fe_class->eq = date_eq;
- fe_class->xml_create = xml_create;
- fe_class->xml_encode = xml_encode;
- fe_class->xml_decode = xml_decode;
- fe_class->get_widget = get_widget;
- fe_class->build_code = build_code;
- fe_class->format_sexp = format_sexp;
-}
-
-static void
-filter_datespec_init (FilterDatespec *fd)
-{
- fd->priv = g_malloc0 (sizeof (*fd->priv));
- fd->type = FDST_UNKNOWN;
-}
-
-static void
-filter_datespec_finalise (GObject *obj)
-{
- FilterDatespec *fd = (FilterDatespec *) obj;
-
- g_free (fd->priv);
-
- G_OBJECT_CLASS (parent_class)->finalize (obj);
-}
-
-/**
- * filter_datespec_new:
- *
- * Create a new FilterDatespec object.
- *
- * Return value: A new #FilterDatespec object.
- **/
-FilterDatespec *
-filter_datespec_new (void)
-{
- return (FilterDatespec *) g_object_new (FILTER_TYPE_DATESPEC, NULL, NULL);
-}
-
-static gboolean
-validate (FilterElement *fe)
-{
- FilterDatespec *fds = (FilterDatespec *) fe;
- GtkWidget *dialog;
- gboolean valid;
-
- valid = fds->type != FDST_UNKNOWN;
- if (!valid) {
- /* FIXME: FilterElement should probably have a
- GtkWidget member pointing to the value gotten with
- ::get_widget() so that we can get the parent window
- here. */
- dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
- "%s", _("You must choose a date."));
-
- gtk_dialog_run ((GtkDialog *) dialog);
- gtk_widget_destroy (dialog);
- }
-
- return valid;
-}
-
-static int
-date_eq (FilterElement *fe, FilterElement *cm)
-{
- FilterDatespec *fd = (FilterDatespec *)fe, *cd = (FilterDatespec *)cm;
-
- return FILTER_ELEMENT_CLASS (parent_class)->eq(fe, cm)
- && (fd->type == cd->type)
- && (fd->value == cd->value);
-}
-
-static void
-xml_create (FilterElement *fe, xmlNodePtr node)
-{
- /* parent implementation */
- FILTER_ELEMENT_CLASS (parent_class)->xml_create (fe, node);
-}
-
-static xmlNodePtr
-xml_encode (FilterElement *fe)
-{
- xmlNodePtr value, work;
- FilterDatespec *fds = (FilterDatespec *)fe;
- char 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;
- char *val;
-
- d(printf ("Decoding datespec from xml %p\n", fe));
-
- xmlFree (fe->name);
- fe->name = xmlGetProp (node, "name");
-
- n = node->children;
- 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 int
-get_best_span (time_t val)
-{
- int i;
-
- for (i=N_TIMESPANS-1;i>=0;i--) {
- if (val % timespans[i].seconds == 0)
- return i;
- }
-
- return 0;
-}
-
-/* sets button label */
-static void
-set_button (FilterDatespec *fds)
-{
- char buf[128];
- char *label = buf;
-
- switch (fds->type) {
- case FDST_UNKNOWN:
- label = _("<click here to select a date>");
- break;
- case FDST_NOW:
- label = _("now");
- break;
- case FDST_SPECIFIED: {
- struct tm tm;
-
- localtime_r(&fds->value, &tm);
- /* strftime for date filter display, only needs to show a day date (i.e. no time) */
- strftime(buf, sizeof(buf), _("%d-%b-%Y"), &tm);
- break; }
- case FDST_X_AGO:
- if (fds->value == 0)
- label = _("now");
- else {
- int span, count;
-
- span = get_best_span(fds->value);
- count = fds->value / timespans[span].seconds;
-
- if (count == 1)
- /* 1 (minute|day|...) ago (singular time ago) */
- strcpy(buf, _(timespans[span].singular));
- else
- /* N (minutes|days|...) ago (plural time ago) */
- sprintf(buf, _(timespans[span].plural), count);
- }
- break;
- }
-
- gtk_label_set_text((GtkLabel *)fds->priv->label_button, label);
-}
-
-static void
-get_values (FilterDatespec *fds)
-{
- struct _FilterDatespecPrivate *p = PRIV(fds);
-
- switch(fds->priv->type) {
- case FDST_SPECIFIED: {
- guint year, month, day;
- struct tm tm;
-
- gtk_calendar_get_date((GtkCalendar *)p->calendar_specify, &year, &month, &day);
- memset(&tm, 0, sizeof(tm));
- tm.tm_mday = day;
- tm.tm_year = year - 1900;
- tm.tm_mon = month;
- fds->value = mktime(&tm);
- /* what about timezone? */
- break; }
- case FDST_X_AGO: {
- int val;
-
- val = gtk_spin_button_get_value_as_int((GtkSpinButton *)p->spin_relative);
- fds->value = timespans[p->span].seconds * val;
- break; }
- case FDST_NOW:
- default:
- break;
- }
-
- fds->type = p->type;
-}
-
-static void
-set_values (FilterDatespec *fds)
-{
- struct _FilterDatespecPrivate *p = PRIV(fds);
-
- p->type = fds->type==FDST_UNKNOWN ? FDST_NOW : fds->type;
-
- switch (p->type) {
- case FDST_NOW:
- case FDST_UNKNOWN:
- /* noop */
- break;
- case FDST_SPECIFIED:
- {
- struct tm tm;
-
- localtime_r(&fds->value, &tm);
- gtk_calendar_select_month((GtkCalendar*)p->calendar_specify, tm.tm_mon, tm.tm_year + 1900);
- gtk_calendar_select_day((GtkCalendar*)p->calendar_specify, tm.tm_mday);
- break;
- }
- case FDST_X_AGO:
- p->span = get_best_span(fds->value);
- gtk_spin_button_set_value((GtkSpinButton*)p->spin_relative, fds->value/timespans[p->span].seconds);
- gtk_option_menu_set_history((GtkOptionMenu*)p->option_relative, p->span);
- break;
- }
-
- gtk_notebook_set_current_page ((GtkNotebook*) p->notebook_type, p->type);
- gtk_option_menu_set_history ((GtkOptionMenu*) p->option_type, p->type);
-}
-
-
-static void
-set_option_type (GtkMenu *menu, FilterDatespec *fds)
-{
- GtkWidget *w;
-
- /* ugh, no other way to 'get_history' */
- w = gtk_menu_get_active (menu);
- fds->priv->type = g_list_index (GTK_MENU_SHELL (menu)->children, w);
- gtk_notebook_set_current_page ((GtkNotebook*) fds->priv->notebook_type, fds->priv->type);
-}
-
-static void
-set_option_relative (GtkMenu *menu, FilterDatespec *fds)
-{
- GtkWidget *w;
-
- w = gtk_menu_get_active (menu);
- fds->priv->span = g_list_index (GTK_MENU_SHELL (menu)->children, w);
-}
-
-static void
-button_clicked (GtkButton *button, FilterDatespec *fds)
-{
- struct _FilterDatespecPrivate *p = PRIV(fds);
- GtkWidget *toplevel;
- GtkDialog *dialog;
- GladeXML *gui;
-
- gui = glade_xml_new (FILTER_GLADEDIR "/filter.glade", "filter_datespec", NULL);
- toplevel = glade_xml_get_widget (gui, "filter_datespec");
-
- dialog = (GtkDialog *) gtk_dialog_new ();
- gtk_window_set_title ((GtkWindow *) dialog, _("Select a time to compare against"));
- gtk_dialog_add_buttons (dialog,
- GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
- GTK_STOCK_OK, GTK_RESPONSE_ACCEPT,
- NULL);
-
- p->notebook_type = glade_xml_get_widget (gui, "notebook_type");
- p->option_type = glade_xml_get_widget (gui, "option_type");
- p->calendar_specify = glade_xml_get_widget (gui, "calendar_specify");
- p->spin_relative = glade_xml_get_widget (gui, "spin_relative");
- p->option_relative = glade_xml_get_widget (gui, "option_relative");
-
- set_values (fds);
-
- g_signal_connect (GTK_OPTION_MENU (p->option_type)->menu, "deactivate",
- G_CALLBACK (set_option_type), fds);
- g_signal_connect (GTK_OPTION_MENU (p->option_relative)->menu, "deactivate",
- G_CALLBACK (set_option_relative), fds);
-
- gtk_box_pack_start ((GtkBox *) dialog->vbox, toplevel, TRUE, TRUE, 3);
-
- if (gtk_dialog_run (dialog) == GTK_RESPONSE_ACCEPT) {
- get_values (fds);
- set_button (fds);
- }
-
- gtk_widget_destroy ((GtkWidget *)dialog);
-}
-
-static GtkWidget *
-get_widget (FilterElement *fe)
-{
- FilterDatespec *fds = (FilterDatespec *)fe;
- GtkWidget *button;
-
- fds->priv->label_button = gtk_label_new ("");
- gtk_misc_set_alignment (GTK_MISC (fds->priv->label_button), 0.5, 0.5);
- set_button(fds);
-
- button = gtk_button_new();
- gtk_container_add (GTK_CONTAINER (button), fds->priv->label_button);
- g_signal_connect (button, "clicked", G_CALLBACK (button_clicked), fds);
-
- gtk_widget_show (button);
- gtk_widget_show (fds->priv->label_button);
-
- 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_append_printf (out, "%d", (int) fds->value);
- break;
- case FDST_X_AGO:
- g_string_append_printf (out, "(- (get-current-date) %d)", (int) fds->value);
- break;
- }
-}
diff --git a/filter/filter-datespec.h b/filter/filter-datespec.h
deleted file mode 100644
index 6290ab34b5..0000000000
--- a/filter/filter-datespec.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_DATESPEC_H
-#define _FILTER_DATESPEC_H
-
-#include <time.h>
-#include "filter-element.h"
-
-#define FILTER_TYPE_DATESPEC (filter_datespec_get_type ())
-#define FILTER_DATESPEC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FILTER_TYPE_DATESPEC, FilterDatespec))
-#define FILTER_DATESPEC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FILTER_TYPE_DATESPEC, FilterDatespecClass))
-#define IS_FILTER_DATESPEC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FILTER_TYPE_DATESPEC))
-#define IS_FILTER_DATESPEC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FILTER_TYPE_DATESPEC))
-#define FILTER_DATESPEC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FILTER_TYPE_DATESPEC, FilterDatespecClass))
-
-typedef struct _FilterDatespec FilterDatespec;
-typedef struct _FilterDatespecClass FilterDatespecClass;
-
-typedef enum _FilterDatespec_type {
- FDST_UNKNOWN = -1,
- FDST_NOW,
- FDST_SPECIFIED,
- FDST_X_AGO,
-} 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 */
-};
-
-GType 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 f6dc5700ec..0000000000
--- a/filter/filter-editor.c
+++ /dev/null
@@ -1,169 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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/gtk.h>
-#include <libgnome/gnome-i18n.h>
-
-#include "filter-editor.h"
-#include "filter-filter.h"
-
-#define d(x)
-
-static FilterRule *create_rule (RuleEditor *re);
-
-static void filter_editor_class_init (FilterEditorClass *klass);
-static void filter_editor_init (FilterEditor *fe);
-static void filter_editor_finalise (GObject *obj);
-
-
-static RuleEditorClass *parent_class = NULL;
-
-
-GtkType
-filter_editor_get_type (void)
-{
- static GtkType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (FilterEditorClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) filter_editor_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (FilterEditor),
- 0, /* n_preallocs */
- (GInstanceInitFunc) filter_editor_init,
- };
-
- type = g_type_register_static (RULE_TYPE_EDITOR, "FilterEditor", &info, 0);
- }
-
- return type;
-}
-
-static void
-filter_editor_class_init (FilterEditorClass *klass)
-{
- GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- RuleEditorClass *re_class = (RuleEditorClass *) klass;
-
- parent_class = g_type_class_ref (rule_editor_get_type ());
-
- gobject_class->finalize = filter_editor_finalise;
-
- /* override methods */
- re_class->create_rule = create_rule;
-}
-
-static void
-filter_editor_init (FilterEditor *fe)
-{
- ;
-}
-
-static void
-filter_editor_finalise (GObject *obj)
-{
- G_OBJECT_CLASS (parent_class)->finalize (obj);
-}
-
-/**
- * filter_editor_new:
- *
- * Create a new FilterEditor object.
- *
- * Return value: A new #FilterEditor object.
- **/
-FilterEditor *
-filter_editor_new (FilterContext *fc, const char **source_names)
-{
- FilterEditor *fe = (FilterEditor *) g_object_new (FILTER_TYPE_EDITOR, NULL);
- GladeXML *gui;
- GtkWidget *w;
-
- gui = glade_xml_new (FILTER_GLADEDIR "/filter.glade", "rule_editor", NULL);
- filter_editor_construct (fe, fc, gui, source_names);
-
- w = glade_xml_get_widget (gui, "rule_frame");
- gtk_frame_set_label (GTK_FRAME (w), _("Filter Rules"));
-
- g_object_unref (gui);
-
- return fe;
-}
-
-static void
-select_source (GtkMenuItem *mi, FilterEditor *fe)
-{
- char *source;
-
- source = g_object_get_data(G_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]));
- g_object_set_data_full (G_OBJECT (item), "source", g_strdup (source_names[i]), g_free);
- gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
- gtk_widget_show (item);
- g_signal_connect (item, "activate", G_CALLBACK (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 4b01e3b877..0000000000
--- a/filter/filter-editor.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_EDITOR_H
-#define _FILTER_EDITOR_H
-
-#include "rule-editor.h"
-#include "filter-context.h"
-
-#define FILTER_TYPE_EDITOR (filter_editor_get_type ())
-#define FILTER_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FILTER_TYPE_EDITOR, FilterEditor))
-#define FILTER_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FILTER_TYPE_EDITOR, FilterEditorClass))
-#define IS_FILTER_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FILTER_TYPE_EDITOR))
-#define IS_FILTER_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FILTER_TYPE_EDITOR))
-#define FILTER_EDITOR_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), FILTER_TYPE_EDITOR, FilterEditorClass))
-
-typedef struct _FilterEditor FilterEditor;
-typedef struct _FilterEditorClass FilterEditorClass;
-
-struct _FilterEditor {
- RuleEditor parent_object;
-
-};
-
-struct _FilterEditorClass {
- RuleEditorClass parent_class;
-
- /* virtual methods */
-
- /* signals */
-};
-
-GtkType filter_editor_get_type (void);
-
-FilterEditor *filter_editor_new (FilterContext *f, const char **source_names);
-void filter_editor_construct (FilterEditor *fe, FilterContext *fc, 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 5f68f78804..0000000000
--- a/filter/filter-element.c
+++ /dev/null
@@ -1,385 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <stdlib.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-int.h"
-#include "filter-folder.h"
-#include "filter-source.h"
-#include "filter-file.h"
-#include "filter-label.h"
-
-
-static gboolean validate (FilterElement *fe);
-static int element_eq(FilterElement *fe, FilterElement *cm);
-static void xml_create(FilterElement *fe, xmlNodePtr node);
-static FilterElement *clone(FilterElement *fe);
-
-static void filter_element_class_init (FilterElementClass *klass);
-static void filter_element_init (FilterElement *fe);
-static void filter_element_finalise (GObject *obj);
-
-
-static GObjectClass *parent_class = NULL;
-
-
-GType
-filter_element_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (FilterElementClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) filter_element_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (FilterElement),
- 0, /* n_preallocs */
- (GInstanceInitFunc) filter_element_init,
- };
-
- type = g_type_register_static (G_TYPE_OBJECT, "FilterElement", &info, 0);
- }
-
- return type;
-}
-
-static void
-filter_element_class_init (FilterElementClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_ref (G_TYPE_OBJECT);
-
- object_class->finalize = filter_element_finalise;
-
- /* override methods */
- klass->validate = validate;
- klass->eq = element_eq;
- klass->xml_create = xml_create;
- klass->clone = clone;
-}
-
-static void
-filter_element_init (FilterElement *fe)
-{
- ;
-}
-
-static void
-filter_element_finalise (GObject *obj)
-{
- FilterElement *o = (FilterElement *)obj;
-
- xmlFree (o->name);
-
- G_OBJECT_CLASS (parent_class)->finalize (obj);
-}
-
-/**
- * filter_element_new:
- *
- * Create a new FilterElement object.
- *
- * Return value: A new #FilterElement object.
- **/
-FilterElement *
-filter_element_new (void)
-{
- return (FilterElement *) g_object_new (FILTER_TYPE_ELEMENT, NULL, NULL);
-}
-
-gboolean
-filter_element_validate (FilterElement *fe)
-{
- return FILTER_ELEMENT_GET_CLASS (fe)->validate (fe);
-}
-
-int
-filter_element_eq (FilterElement *fe, FilterElement *cm)
-{
- FilterElementClass *klass;
-
- klass = FILTER_ELEMENT_GET_CLASS (fe);
- return (klass == FILTER_ELEMENT_GET_CLASS (cm)) && klass->eq (fe, cm);
-}
-
-/**
- * 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)
-{
- FILTER_ELEMENT_GET_CLASS (fe)->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 FILTER_ELEMENT_GET_CLASS (fe)->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 FILTER_ELEMENT_GET_CLASS (fe)->xml_decode (fe, node);
-}
-
-/**
- * filter_element_clone:
- * @fe: filter element
- *
- * Clones the FilterElement @fe.
- *
- * Return value:
- **/
-FilterElement *
-filter_element_clone (FilterElement *fe)
-{
- return FILTER_ELEMENT_GET_CLASS (fe)->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 FILTER_ELEMENT_GET_CLASS (fe)->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)
-{
- FILTER_ELEMENT_GET_CLASS (fe)->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)
-{
- FILTER_ELEMENT_GET_CLASS (fe)->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_int_new_type("score", -3, 3);
- } 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 if (!strcmp (type, "command")) {
- return (FilterElement *) filter_file_new_type_name (type);
- } else if (!strcmp (type, "file")) {
- return (FilterElement *) filter_file_new_type_name (type);
- } else if (!strcmp (type, "label")) {
- return (FilterElement *) filter_label_new ();
- } else {
- g_warning("Unknown filter type '%s'", type);
- return NULL;
- }
-}
-
-void
-filter_element_set_data (FilterElement *fe, gpointer data)
-{
- fe->data = data;
-}
-
-/* default implementations */
-static gboolean
-validate (FilterElement *fe)
-{
- return TRUE;
-}
-
-static int
-element_eq (FilterElement *fe, FilterElement *cm)
-{
- return ((fe->name && cm->name && strcmp (fe->name, cm->name) == 0)
- || (fe->name == NULL && cm->name == NULL));
-}
-
-static void
-xml_create (FilterElement *fe, xmlNodePtr node)
-{
- fe->name = xmlGetProp (node, "name");
-}
-
-static FilterElement *
-clone (FilterElement *fe)
-{
- xmlNodePtr node;
- FilterElement *new;
-
- new = (FilterElement *) g_object_new (G_OBJECT_TYPE (fe), NULL, NULL);
- node = filter_element_xml_encode (fe);
- filter_element_xml_decode (new, node);
- xmlFreeNodeList (node);
-
- return new;
-}
-
-/* only copies the value, not the name/type */
-void
-filter_element_copy_value (FilterElement *de, FilterElement *se)
-{
- /* bit of a hack, but saves having to do the same in each type ? */
-
- if (IS_FILTER_INPUT(se)) {
- if (IS_FILTER_INPUT(de)) {
- if (((FilterInput *)se)->values)
- filter_input_set_value((FilterInput*)de, ((FilterInput *)se)->values->data);
- } else if (IS_FILTER_INT(de)) {
- ((FilterInt *)de)->val = atoi((char *) ((FilterInput *)se)->values->data);
- }
- } else if (IS_FILTER_FOLDER(se)) {
- if (IS_FILTER_FOLDER(de)) {
- filter_folder_set_value((FilterFolder *)de, ((FilterFolder *)se)->uri);
- }
- } else if (IS_FILTER_COLOUR(se)) {
- if (IS_FILTER_COLOUR(de)) {
- FilterColour *s = (FilterColour *)se, *d = (FilterColour *)de;
-
- d->r = s->r;
- d->g = s->g;
- d->b = s->b;
- d->a = s->a;
- }
- } else if (IS_FILTER_DATESPEC(se)) {
- if (IS_FILTER_DATESPEC(de)) {
- FilterDatespec *s = (FilterDatespec *)se, *d = (FilterDatespec *)de;
-
- d->type = s->type;
- d->value = s->value;
- }
- } else if (IS_FILTER_INT(se)) {
- if (IS_FILTER_INT(de)) {
- FilterInt *s = (FilterInt *)se, *d = (FilterInt *)de;
-
- d->val = s->val;
- } else if (IS_FILTER_INPUT(de)) {
- FilterInt *s = (FilterInt *)se;
- FilterInput *d = (FilterInput *)de;
- char *v;
-
- v = g_strdup_printf("%d", s->val);
- filter_input_set_value(d, v);
- g_free(v);
- }
- } else if (IS_FILTER_OPTION(se)) {
- if (IS_FILTER_OPTION(de)) {
- FilterOption *s = (FilterOption *)se, *d = (FilterOption *)de;
-
- if (s->current)
- filter_option_set_current(d, s->current->value);
- }
- }
-}
diff --git a/filter/filter-element.h b/filter/filter-element.h
deleted file mode 100644
index 75627686ae..0000000000
--- a/filter/filter-element.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_ELEMENT_H
-#define _FILTER_ELEMENT_H
-
-#include <glib.h>
-#include <glib-object.h>
-#include <gtk/gtkwidget.h>
-#include <libxml/parser.h>
-#include <libxml/xmlmemory.h>
-
-#define FILTER_TYPE_ELEMENT (filter_element_get_type ())
-#define FILTER_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FILTER_TYPE_ELEMENT, FilterElement))
-#define FILTER_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FILTER_TYPE_ELEMENT, FilterElementClass))
-#define IS_FILTER_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FILTER_TYPE_ELEMENT))
-#define IS_FILTER_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FILTER_TYPE_ELEMENT))
-#define FILTER_ELEMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FILTER_TYPE_ELEMENT, FilterElementClass))
-
-typedef struct _FilterElement FilterElement;
-typedef struct _FilterElementClass FilterElementClass;
-
-struct _FilterElement {
- GObject parent_object;
-
- char *name;
- gpointer data;
-};
-
-struct _FilterPart;
-
-struct _FilterElementClass {
- GObjectClass parent_class;
-
- /* virtual methods */
- gboolean (*validate) (FilterElement *fe);
- int (*eq) (FilterElement *fe, FilterElement *cm);
-
- 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 */
-};
-
-GType 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);
-int filter_element_eq (FilterElement *fe, FilterElement *cm);
-
-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);
-void filter_element_copy_value (FilterElement *de, FilterElement *se);
-
-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-file.c b/filter/filter-file.c
deleted file mode 100644
index 41c6b69c58..0000000000
--- a/filter/filter-file.c
+++ /dev/null
@@ -1,323 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2002 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 <sys/types.h>
-#include <sys/stat.h>
-
-#include <gtk/gtk.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-file-entry.h>
-
-#include "filter-file.h"
-#include "e-util/e-sexp.h"
-
-#define d(x)
-
-static gboolean validate (FilterElement *fe);
-static int file_eq (FilterElement *fe, FilterElement *cm);
-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_file_class_init (FilterFileClass *klass);
-static void filter_file_init (FilterFile *ff);
-static void filter_file_finalise (GObject *obj);
-
-
-static FilterElementClass *parent_class = NULL;
-
-
-GType
-filter_file_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (FilterFileClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) filter_file_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (FilterFile),
- 0, /* n_preallocs */
- (GInstanceInitFunc) filter_file_init,
- };
-
- type = g_type_register_static (FILTER_TYPE_ELEMENT, "FilterFile", &info, 0);
- }
-
- return type;
-}
-
-static void
-filter_file_class_init (FilterFileClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- FilterElementClass *fe_class = FILTER_ELEMENT_CLASS (klass);
-
- parent_class = g_type_class_ref (FILTER_TYPE_ELEMENT);
-
- object_class->finalize = filter_file_finalise;
-
- /* override methods */
- fe_class->validate = validate;
- fe_class->eq = file_eq;
- fe_class->xml_create = xml_create;
- fe_class->xml_encode = xml_encode;
- fe_class->xml_decode = xml_decode;
- fe_class->get_widget = get_widget;
- fe_class->build_code = build_code;
- fe_class->format_sexp = format_sexp;
-}
-
-static void
-filter_file_init (FilterFile *ff)
-{
- ;
-}
-
-static void
-filter_file_finalise (GObject *obj)
-{
- FilterFile *ff = (FilterFile *) obj;
-
- xmlFree (ff->type);
- g_free (ff->path);
-
- G_OBJECT_CLASS (parent_class)->finalize (obj);
-}
-
-/**
- * filter_file_new:
- *
- * Create a new FilterFile object.
- *
- * Return value: A new #FilterFile object.
- **/
-FilterFile *
-filter_file_new (void)
-{
- return (FilterFile *) g_object_new (FILTER_TYPE_FILE, NULL, NULL);
-}
-
-
-FilterFile *
-filter_file_new_type_name (const char *type)
-{
- FilterFile *file;
-
- file = filter_file_new ();
- file->type = xmlStrdup (type);
-
- return file;
-}
-
-void
-filter_file_set_path (FilterFile *file, const char *path)
-{
- g_free (file->path);
- file->path = g_strdup (path);
-}
-
-static gboolean
-validate (FilterElement *fe)
-{
- FilterFile *file = (FilterFile *) fe;
- GtkWidget *dialog;
- struct stat st;
-
- if (!file->path) {
- /* FIXME: FilterElement should probably have a
- GtkWidget member pointing to the value gotten with
- ::get_widget() so that we can get the parent window
- here. */
- dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
- "%s", _("You must specify a file name."));
-
- gtk_dialog_run ((GtkDialog *) dialog);
- gtk_widget_destroy (dialog);
-
- return FALSE;
- }
-
- /* FIXME: do more to validate command-lines? */
-
- if (strcmp (file->type, "file") == 0) {
- if (stat (file->path, &st) == -1 || !S_ISREG (st.st_mode)) {
- /* FIXME: FilterElement should probably have a
- GtkWidget member pointing to the value gotten with
- ::get_widget() so that we can get the parent window
- here. */
- dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
- _("File '%s' does not exist or is not a regular file."),
- file->path);
-
- gtk_dialog_run ((GtkDialog *) dialog);
- gtk_widget_destroy (dialog);
-
- return FALSE;
- }
- } else if (strcmp (file->type, "command") == 0) {
- /* only requirements so far is that the command can't
- be an empty string */
- return file->path[0] != '\0';
- }
-
- return TRUE;
-}
-
-static int
-file_eq (FilterElement *fe, FilterElement *cm)
-{
- FilterFile *ff = (FilterFile *)fe, *cf = (FilterFile *)cm;
-
- return FILTER_ELEMENT_CLASS (parent_class)->eq (fe, cm)
- && ((ff->path && cf->path && strcmp (ff->path, cf->path) == 0)
- || (ff->path == NULL && cf->path == NULL))
- && ((ff->type && cf->type && strcmp (ff->type, cf->type) == 0)
- || (ff->type == NULL && cf->type == NULL));
-}
-
-static void
-xml_create (FilterElement *fe, xmlNodePtr node)
-{
- /* parent implementation */
- FILTER_ELEMENT_CLASS (parent_class)->xml_create (fe, node);
-}
-
-static xmlNodePtr
-xml_encode (FilterElement *fe)
-{
- FilterFile *file = (FilterFile *) fe;
- xmlNodePtr cur, value;
- char *type;
-
- type = file->type ? file->type : "file";
-
- d(printf ("Encoding %s as xml\n", type));
-
- value = xmlNewNode (NULL, "value");
- xmlSetProp (value, "name", fe->name);
- xmlSetProp (value, "type", type);
-
- cur = xmlNewChild (value, NULL, type, NULL);
- xmlNodeSetContent (cur, file->path);
-
- return value;
-}
-
-static int
-xml_decode (FilterElement *fe, xmlNodePtr node)
-{
- FilterFile *file = (FilterFile *)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 (file->type);
- file->type = type;
-
- g_free (file->path);
- file->path = NULL;
-
- n = node->children;
- while (n != NULL) {
- if (!strcmp (n->name, type)) {
- str = xmlNodeGetContent (n);
- file->path = g_strdup (str ? str : "");
- xmlFree (str);
-
- d(printf (" '%s'\n", file->path));
- break;
- } else if (n->type == XML_ELEMENT_NODE) {
- 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)
-{
- FilterFile *file = (FilterFile *) fe;
- const char *new;
-
- new = gtk_entry_get_text (entry);
-
- g_free (file->path);
- file->path = g_strdup (new);
-}
-
-static GtkWidget *
-get_widget (FilterElement *fe)
-{
- FilterFile *file = (FilterFile *) fe;
- GtkWidget *fileentry, *entry;
-
- fileentry = gnome_file_entry_new (NULL, _("Choose a file"));
- gnome_file_entry_set_default_path (GNOME_FILE_ENTRY (fileentry), file->path);
- gnome_file_entry_set_modal (GNOME_FILE_ENTRY (fileentry), TRUE);
-
- entry = gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (fileentry));
- gtk_entry_set_text (GTK_ENTRY (entry), file->path);
-
- g_signal_connect (entry, "changed", G_CALLBACK (entry_changed), fe);
-
- return fileentry;
-}
-
-static void
-build_code (FilterElement *fe, GString *out, struct _FilterPart *ff)
-{
- return;
-}
-
-static void
-format_sexp (FilterElement *fe, GString *out)
-{
- FilterFile *file = (FilterFile *) fe;
-
- e_sexp_encode_string (out, file->path);
-}
diff --git a/filter/filter-file.h b/filter/filter-file.h
deleted file mode 100644
index a3e28d0b5c..0000000000
--- a/filter/filter-file.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 2002 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_FILE_H__
-#define __FILTER_FILE_H__
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include "filter-element.h"
-
-#define FILTER_TYPE_FILE (filter_file_get_type ())
-#define FILTER_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FILTER_TYPE_FILE, FilterFile))
-#define FILTER_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FILTER_TYPE_FILE, FilterFileClass))
-#define IS_FILTER_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FILTER_TYPE_FILE))
-#define IS_FILTER_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FILTER_TYPE_FILE))
-#define FILTER_FILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FILTER_TYPE_FILE, FilterFileClass))
-
-typedef struct _FilterFile FilterFile;
-typedef struct _FilterFileClass FilterFileClass;
-
-struct _FilterFile {
- FilterElement parent_object;
-
- char *type;
- char *path;
-};
-
-struct _FilterFileClass {
- FilterElementClass parent_class;
-
- /* virtual methods */
-
- /* signals */
-};
-
-
-GType filter_file_get_type (void);
-
-FilterFile *filter_file_new (void);
-
-FilterFile *filter_file_new_type_name (const char *type);
-
-/* methods */
-void filter_file_set_path (FilterFile *file, const char *path);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* ! __FILTER_FILE_H__ */
diff --git a/filter/filter-filter.c b/filter/filter-filter.c
deleted file mode 100644
index 6719cb9ad4..0000000000
--- a/filter/filter-filter.c
+++ /dev/null
@@ -1,538 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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/gtk.h>
-#include <libgnome/gnome-i18n.h>
-
-#include "filter-filter.h"
-#include "filter-context.h"
-
-#define d(x)
-
-static int validate(FilterRule *fr);
-static int filter_eq(FilterRule *fr, FilterRule *cm);
-static xmlNodePtr xml_encode (FilterRule *fr);
-static int xml_decode (FilterRule *fr, xmlNodePtr, RuleContext *rc);
-static void rule_copy (FilterRule *dest, FilterRule *src);
-/*static void build_code(FilterRule *, GString *out);*/
-static GtkWidget *get_widget (FilterRule *fr, RuleContext *rc);
-
-static void filter_filter_class_init (FilterFilterClass *klass);
-static void filter_filter_init (FilterFilter *ff);
-static void filter_filter_finalise (GObject *obj);
-
-
-static FilterRuleClass *parent_class = NULL;
-
-
-GType
-filter_filter_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (FilterFilterClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) filter_filter_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (FilterFilter),
- 0, /* n_preallocs */
- (GInstanceInitFunc) filter_filter_init,
- };
-
- type = g_type_register_static (FILTER_TYPE_RULE, "FilterFilter", &info, 0);
- }
-
- return type;
-}
-
-static void
-filter_filter_class_init (FilterFilterClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- FilterRuleClass *fr_class = (FilterRuleClass *) klass;
-
- parent_class = g_type_class_ref (FILTER_TYPE_RULE);
-
- object_class->finalize = filter_filter_finalise;
-
- /* override methods */
- fr_class->validate = validate;
- fr_class->eq = filter_eq;
- fr_class->xml_encode = xml_encode;
- fr_class->xml_decode = xml_decode;
- /*fr_class->build_code = build_code;*/
- fr_class->copy = rule_copy;
- fr_class->get_widget = get_widget;
-}
-
-static void
-filter_filter_init (FilterFilter *ff)
-{
- ;
-}
-
-static void
-unref_list (GList *l)
-{
- while (l) {
- g_object_unref (l->data);
- l = l->next;
- }
-}
-
-static void
-filter_filter_finalise (GObject *obj)
-{
- FilterFilter *ff = (FilterFilter *) obj;
-
- unref_list (ff->actions);
- g_list_free (ff->actions);
-
- G_OBJECT_CLASS (parent_class)->finalize (obj);
-}
-
-/**
- * filter_filter_new:
- *
- * Create a new FilterFilter object.
- *
- * Return value: A new #FilterFilter object.
- **/
-FilterFilter *
-filter_filter_new (void)
-{
- return (FilterFilter *) g_object_new (FILTER_TYPE_FILTER, NULL, NULL);
-}
-
-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)
-{
- FilterFilter *ff = (FilterFilter *) fr;
- GList *parts;
- int valid;
-
- valid = FILTER_RULE_CLASS (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 int
-list_eq (GList *al, GList *bl)
-{
- int truth = TRUE;
-
- while (truth && al && bl) {
- FilterPart *a = al->data, *b = bl->data;
-
- truth = filter_part_eq (a, b);
- al = al->next;
- bl = bl->next;
- }
-
- return truth && al == NULL && bl == NULL;
-}
-
-static int
-filter_eq (FilterRule *fr, FilterRule *cm)
-{
- return FILTER_RULE_CLASS (parent_class)->eq (fr, cm)
- && list_eq (((FilterFilter *) fr)->actions, ((FilterFilter *) cm)->actions);
-}
-
-static xmlNodePtr
-xml_encode (FilterRule *fr)
-{
- FilterFilter *ff = (FilterFilter *) fr;
- xmlNodePtr node, set, work;
- GList *l;
-
- node = FILTER_RULE_CLASS (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 = l->next;
- }
-
- return node;
-
-}
-
-static void
-load_set (xmlNodePtr node, FilterFilter *ff, RuleContext *rc)
-{
- xmlNodePtr work;
- char *rulename;
- FilterPart *part;
-
- work = node->children;
- while (work) {
- if (!strcmp (work->name, "part")) {
- rulename = xmlGetProp (work, "name");
- part = filter_context_find_action ((FilterContext *) rc, 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 if (work->type == XML_ELEMENT_NODE) {
- g_warning ("Unknown xml node in part: %s", work->name);
- }
- work = work->next;
- }
-}
-
-static int
-xml_decode (FilterRule *fr, xmlNodePtr node, RuleContext *rc)
-{
- FilterFilter *ff = (FilterFilter *) fr;
- xmlNodePtr work;
- int result;
-
- result = FILTER_RULE_CLASS (parent_class)->xml_decode (fr, node, rc);
- if (result != 0)
- return result;
-
- work = node->children;
- while (work) {
- if (!strcmp (work->name, "actionset")) {
- load_set (work, ff, rc);
- }
- 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) g_object_unref, NULL);
- g_list_free (fdest->actions);
- fdest->actions = NULL;
- }
-
- node = fsrc->actions;
- while (node) {
- FilterPart *part = node->data;
-
- g_object_ref (part);
- fdest->actions = g_list_append (fdest->actions, part);
- node = node->next;
- }
-
- FILTER_RULE_CLASS (parent_class)->copy (dest, src);
-}
-
-/*static void build_code(FilterRule *fr, GString *out)
-{
- return FILTER_RULE_CLASS (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 = g_object_get_data ((GObject *) 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_part_copy_values (newpart, data->part);
- filter_filter_replace_action ((FilterFilter *) data->fr, data->part, newpart);
- g_object_unref (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);
-
- g_object_set_data ((GObject *) 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));
-
- g_object_set_data ((GObject *) item, "part", part);
- g_signal_connect (item, "activate", G_CALLBACK (option_activate), data);
- gtk_menu_shell_append(GTK_MENU_SHELL(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 = g_object_get_data ((GObject *) button, "rule");
- part = g_object_get_data ((GObject *) rule, "part");
-
- /* remove the part from the list */
- filter_filter_remove_action ((FilterFilter *) data->fr, part);
- g_object_unref (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;
-
- gtk_table_attach (GTK_TABLE (data->parts), rule, 0, 1, row, row + 1,
- GTK_EXPAND | GTK_FILL, 0, 0, 0);
-
- remove = gtk_button_new_from_stock (GTK_STOCK_REMOVE);
- g_object_set_data ((GObject *) remove, "rule", rule);
- g_object_set_data ((GObject *) rule, "part", part);
- /*gtk_button_set_relief (GTK_BUTTON (remove), GTK_RELIEF_NONE);*/
- g_signal_connect (remove, "clicked", G_CALLBACK (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, RuleContext *rc)
-{
- GtkWidget *widget, *hbox, *add, *frame;
- GtkWidget *parts, *inframe, *w;
- GtkWidget *scrolledwindow;
- GtkObject *hadj, *vadj;
- GList *l;
- FilterPart *part;
- struct _rule_data *data;
- FilterFilter *ff = (FilterFilter *)fr;
- int rows, i = 0;
-
- widget = FILTER_RULE_CLASS (parent_class)->get_widget (fr, rc);
-
- /* and now for the action area */
- frame = gtk_frame_new (_("Then"));
- inframe = gtk_vbox_new (FALSE, 3);
- gtk_container_add (GTK_CONTAINER (frame), inframe);
- gtk_container_set_border_width (GTK_CONTAINER (inframe), 6);
-
- rows = g_list_length (ff->actions);
- parts = gtk_table_new (rows, 2, FALSE);
- data = g_malloc0 (sizeof (*data));
- data->f = (FilterContext *) rc;
- data->fr = fr;
- data->parts = parts;
-
- hbox = gtk_hbox_new (FALSE, 3);
-
- add = gtk_button_new_from_stock (GTK_STOCK_ADD);
- /* gtk_button_set_relief (GTK_BUTTON (add), GTK_RELIEF_NONE); */
- g_signal_connect (add, "clicked", G_CALLBACK (more_parts), data);
- gtk_box_pack_start (GTK_BOX (hbox), add, FALSE, FALSE, 0);
-
- 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 *) rc, part, fr);
- attach_rule (w, data, part, i++);
- l = l->next;
- }
-
- 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 1fcff3fa3a..0000000000
--- a/filter/filter-filter.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_FILTER_H
-#define _FILTER_FILTER_H
-
-#include "filter-rule.h"
-
-#define FILTER_TYPE_FILTER (filter_filter_get_type ())
-#define FILTER_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FILTER_TYPE_FILTER, FilterFilter))
-#define FILTER_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FILTER_TYPE_FILTER, FilterFilterClass))
-#define IS_FILTER_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FILTER_TYPE_FILTER))
-#define IS_FILTER_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FILTER_TYPE_FILTER))
-#define FILTER_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FILTER_TYPE_FILTER, FilterFilterClass))
-
-typedef struct _FilterFilter FilterFilter;
-typedef struct _FilterFilterClass FilterFilterClass;
-
-struct _FilterFilter {
- FilterRule parent_object;
-
- GList *actions;
-};
-
-struct _FilterFilterClass {
- FilterRuleClass parent_class;
-
- /* virtual methods */
-
- /* signals */
-};
-
-GType 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 c19584484d..0000000000
--- a/filter/filter-folder.c
+++ /dev/null
@@ -1,264 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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/gtk.h>
-#include <libgnome/gnome-i18n.h>
-
-#include "filter-folder.h"
-#include "mail/em-folder-selection-button.h"
-#include "mail/mail-component.h"
-#include "e-util/e-sexp.h"
-
-#define d(x)
-
-static gboolean validate (FilterElement *fe);
-static int folder_eq (FilterElement *fe, FilterElement *cm);
-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_folder_class_init (FilterFolderClass *class);
-static void filter_folder_init (FilterFolder *ff);
-static void filter_folder_finalise (GObject *obj);
-
-
-static FilterElementClass *parent_class = NULL;
-
-
-GType
-filter_folder_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (FilterFolderClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) filter_folder_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (FilterFolder),
- 0, /* n_preallocs */
- (GInstanceInitFunc) filter_folder_init,
- };
-
- type = g_type_register_static (FILTER_TYPE_ELEMENT, "FilterFolder", &info, 0);
- }
-
- return type;
-}
-
-static void
-filter_folder_class_init (FilterFolderClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- FilterElementClass *fe_class = FILTER_ELEMENT_CLASS (klass);
-
- parent_class = g_type_class_ref (FILTER_TYPE_ELEMENT);
-
- object_class->finalize = filter_folder_finalise;
-
- /* override methods */
- fe_class->validate = validate;
- fe_class->eq = folder_eq;
- fe_class->xml_create = xml_create;
- fe_class->xml_encode = xml_encode;
- fe_class->xml_decode = xml_decode;
- fe_class->get_widget = get_widget;
- fe_class->build_code = build_code;
- fe_class->format_sexp = format_sexp;
-}
-
-static void
-filter_folder_init (FilterFolder *ff)
-{
- ;
-}
-
-static void
-filter_folder_finalise (GObject *obj)
-{
- FilterFolder *ff = (FilterFolder *) obj;
-
- g_free (ff->uri);
-
- G_OBJECT_CLASS (parent_class)->finalize (obj);
-}
-
-/**
- * filter_folder_new:
- *
- * Create a new FilterFolder object.
- *
- * Return value: A new #FilterFolder object.
- **/
-FilterFolder *
-filter_folder_new (void)
-{
- return (FilterFolder *) g_object_new (FILTER_TYPE_FOLDER, NULL, NULL);
-}
-
-void
-filter_folder_set_value (FilterFolder *ff, const char *uri)
-{
- g_free (ff->uri);
- ff->uri = g_strdup (uri);
-}
-
-static gboolean
-validate (FilterElement *fe)
-{
- FilterFolder *ff = (FilterFolder *) fe;
- GtkWidget *dialog;
-
- if (ff->uri && *ff->uri) {
- return TRUE;
- } else {
- /* FIXME: FilterElement should probably have a
- GtkWidget member pointing to the value gotten with
- ::get_widget() so that we can get the parent window
- here. */
- dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
- "%s", _("You must specify a folder."));
-
- gtk_dialog_run ((GtkDialog *) dialog);
- gtk_widget_destroy (dialog);
-
- return FALSE;
- }
-}
-
-static int
-folder_eq (FilterElement *fe, FilterElement *cm)
-{
- return FILTER_ELEMENT_CLASS (parent_class)->eq (fe, cm)
- && strcmp(((FilterFolder *)fe)->uri, ((FilterFolder *)cm)->uri) == 0;
-}
-
-static void
-xml_create (FilterElement *fe, xmlNodePtr node)
-{
- /* parent implementation */
- FILTER_ELEMENT_CLASS (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, "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->children;
- while (n) {
- if (!strcmp (n->name, "folder")) {
- char *uri;
-
- uri = xmlGetProp (n, "uri");
- g_free (ff->uri);
- ff->uri = g_strdup (uri);
- xmlFree (uri);
- break;
- }
- n = n->next;
- }
-
- return 0;
-}
-
-static void
-folder_selected(EMFolderSelectionButton *button, FilterFolder *ff)
-{
- const char *uri;
-
- uri = em_folder_selection_button_get_selection(button);
- g_free(ff->uri);
- ff->uri = uri!=NULL?em_uri_from_camel(uri):NULL;
-
- gdk_window_raise (GTK_WIDGET (gtk_widget_get_ancestor (GTK_WIDGET (button), GTK_TYPE_WINDOW))->window);
-}
-
-static GtkWidget *
-get_widget (FilterElement *fe)
-{
- FilterFolder *ff = (FilterFolder *)fe;
- GtkWidget *button;
- char *uri;
-
- uri = em_uri_to_camel(ff->uri);
- button = em_folder_selection_button_new (_("Select Folder"), NULL);
- em_folder_selection_button_set_selection(EM_FOLDER_SELECTION_BUTTON(button), uri);
- g_free(uri);
-
- gtk_widget_show (button);
- g_signal_connect (button, "selected", G_CALLBACK (folder_selected), 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 0e541a580b..0000000000
--- a/filter/filter-folder.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_FOLDER_H
-#define _FILTER_FOLDER_H
-
-#include "filter-element.h"
-
-#define FILTER_TYPE_FOLDER (filter_folder_get_type ())
-#define FILTER_FOLDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FILTER_TYPE_FOLDER, FilterFolder))
-#define FILTER_FOLDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FILTER_TYPE_FOLDER, FilterFolderClass))
-#define IS_FILTER_FOLDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FILTER_TYPE_FOLDER))
-#define IS_FILTER_FOLDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FILTER_TYPE_FOLDER))
-#define FILTER_FOLDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FILTER_TYPE_FOLDER, FilterFolderClass))
-
-typedef struct _FilterFolder FilterFolder;
-typedef struct _FilterFolderClass FilterFolderClass;
-
-struct _FilterFolder {
- FilterElement parent_object;
-
- char *uri;
-};
-
-struct _FilterFolderClass {
- FilterElementClass parent_class;
-
- /* virtual methods */
-
- /* signals */
-};
-
-GType filter_folder_get_type (void);
-FilterFolder *filter_folder_new (void);
-
-/* methods */
-void filter_folder_set_value (FilterFolder *ff, const char *uri);
-
-#endif /* ! _FILTER_FOLDER_H */
diff --git a/filter/filter-input.c b/filter/filter-input.c
deleted file mode 100644
index a43156b802..0000000000
--- a/filter/filter-input.c
+++ /dev/null
@@ -1,353 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <regex.h>
-
-#include <gtk/gtk.h>
-#include <libgnome/gnome-i18n.h>
-
-#include "filter-input.h"
-#include "e-util/e-sexp.h"
-
-#define d(x)
-
-static gboolean validate (FilterElement *fe);
-static int input_eq (FilterElement *fe, FilterElement *cm);
-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 *klass);
-static void filter_input_init (FilterInput *fi);
-static void filter_input_finalise (GObject *obj);
-
-
-static FilterElementClass *parent_class = NULL;
-
-
-GType
-filter_input_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (FilterInputClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) filter_input_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (FilterInput),
- 0, /* n_preallocs */
- (GInstanceInitFunc) filter_input_init,
- };
-
- type = g_type_register_static (FILTER_TYPE_ELEMENT, "FilterInput", &info, 0);
- }
-
- return type;
-}
-
-static void
-filter_input_class_init (FilterInputClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- FilterElementClass *fe_class = FILTER_ELEMENT_CLASS (klass);
-
- parent_class = g_type_class_ref (FILTER_TYPE_ELEMENT);
-
- object_class->finalize = filter_input_finalise;
-
- /* override methods */
- fe_class->validate = validate;
- fe_class->eq = input_eq;
- fe_class->xml_create = xml_create;
- fe_class->xml_encode = xml_encode;
- fe_class->xml_decode = xml_decode;
- fe_class->get_widget = get_widget;
- fe_class->build_code = build_code;
- fe_class->format_sexp = format_sexp;
-}
-
-static void
-filter_input_init (FilterInput *fi)
-{
- ;
-}
-
-static void
-filter_input_finalise (GObject *obj)
-{
- FilterInput *fi = (FilterInput *) obj;
-
- xmlFree (fi->type);
- g_list_foreach (fi->values, (GFunc)g_free, NULL);
- g_list_free (fi->values);
-
- G_OBJECT_CLASS (parent_class)->finalize (obj);
-}
-
-/**
- * filter_input_new:
- *
- * Create a new FilterInput object.
- *
- * Return value: A new #FilterInput object.
- **/
-FilterInput *
-filter_input_new (void)
-{
- return (FilterInput *) g_object_new (FILTER_TYPE_INPUT, NULL, NULL);
-}
-
-FilterInput *
-filter_input_new_type_name (const char *type)
-{
- FilterInput *fi;
-
- fi = filter_input_new ();
- fi->type = xmlStrdup (type);
-
- d(printf("new type %s = %p\n", type, fi));
-
- return fi;
-}
-
-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;
- GtkWidget *dialog;
-
- if (fi->values && !strcmp (fi->type, "regex")) {
- const char *pattern;
- regex_t regexpat;
- int regerr;
-
- pattern = fi->values->data;
-
- if ((regerr = regcomp (&regexpat, pattern, REG_EXTENDED | REG_NEWLINE | REG_ICASE))) {
- size_t reglen;
- char *regmsg;
-
- /* 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);
-
- /* FIXME: FilterElement should probably have a
- GtkWidget member pointing to the value gotten with
- ::get_widget() so that we can get the parent window
- here. */
- dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
- _("Error in regular expression '%s':\n%s"),
- pattern, regmsg);
-
- gtk_dialog_run ((GtkDialog *) dialog);
- gtk_widget_destroy (dialog);
- g_free (regmsg);
-
- valid = FALSE;
- }
-
- regfree (&regexpat);
- }
-
- return valid;
-}
-
-static int
-list_eq (GList *al, GList *bl)
-{
- int truth = TRUE;
-
- while (truth && al && bl) {
- truth = strcmp ((char *) al->data, (char *) bl->data) == 0;
- al = al->next;
- bl = bl->next;
- }
-
- return truth && al == NULL && bl == NULL;
-}
-
-static int
-input_eq (FilterElement *fe, FilterElement *cm)
-{
- FilterInput *fi = (FilterInput *)fe, *ci = (FilterInput *)cm;
-
- return FILTER_ELEMENT_CLASS (parent_class)->eq (fe, cm)
- && strcmp (fi->type, ci->type) == 0
- && list_eq (fi->values, ci->values);
-}
-
-static void
-xml_create (FilterElement *fe, xmlNodePtr node)
-{
- /* parent implementation */
- FILTER_ELEMENT_CLASS (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;
-
- cur = xmlNewChild (value, NULL, type, NULL);
- xmlNodeSetContent (cur, str);
- l = l->next;
- }
-
- 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->children;
- while (n) {
- if (!strcmp (n->name, type)) {
- if (!(str = xmlNodeGetContent (n)))
- str = xmlStrdup ("");
-
- d(printf (" '%s'\n", str));
- fi->values = g_list_append (fi->values, g_strdup (str));
- xmlFree (str);
- } else if (n->type == XML_ELEMENT_NODE) {
- 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)
-{
- FilterInput *fi = (FilterInput *) fe;
- const char *new;
- GList *l;
-
- new = gtk_entry_get_text (entry);
-
- /* NOTE: entry only supports a single value ... */
- l = fi->values;
- while (l) {
- g_free (l->data);
- l = l->next;
- }
-
- g_list_free (fi->values);
-
- fi->values = g_list_append (NULL, g_strdup (new));
-}
-
-static GtkWidget *
-get_widget (FilterElement *fe)
-{
- GtkWidget *entry;
- FilterInput *fi = (FilterInput *)fe;
-
- entry = gtk_entry_new ();
- if (fi->values && fi->values->data)
- gtk_entry_set_text (GTK_ENTRY (entry), (const char *) fi->values->data);
-
- g_signal_connect (entry, "changed", G_CALLBACK (entry_changed), fe);
-
- return entry;
-}
-
-static void
-build_code (FilterElement *fe, GString *out, struct _FilterPart *ff)
-{
- ;
-}
-
-static void
-format_sexp (FilterElement *fe, GString *out)
-{
- FilterInput *fi = (FilterInput *) fe;
- GList *l;
-
- l = fi->values;
- while (l) {
- e_sexp_encode_string (out, l->data);
- l = l->next;
- }
-}
diff --git a/filter/filter-input.h b/filter/filter-input.h
deleted file mode 100644
index 7a7b4761de..0000000000
--- a/filter/filter-input.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_INPUT_H
-#define _FILTER_INPUT_H
-
-#include "filter-element.h"
-
-#define FILTER_TYPE_INPUT (filter_input_get_type ())
-#define FILTER_INPUT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FILTER_TYPE_INPUT, FilterInput))
-#define FILTER_INPUT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FILTER_TYPE_INPUT, FilterInputClass))
-#define IS_FILTER_INPUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FILTER_TYPE_INPUT))
-#define IS_FILTER_INPUT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FILTER_TYPE_INPUT))
-#define FILTER_INPUT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FILTER_TYPE_INPUT, FilterInputClass))
-
-typedef struct _FilterInput FilterInput;
-typedef struct _FilterInputClass FilterInputClass;
-
-struct _FilterInput {
- FilterElement parent_object;
-
- char *type; /* name of type */
- GList *values; /* strings */
-};
-
-struct _FilterInputClass {
- FilterElementClass parent_class;
-
- /* virtual methods */
-
- /* signals */
-};
-
-GType 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 48ef9f8d7d..0000000000
--- a/filter/filter-int.c
+++ /dev/null
@@ -1,254 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2002 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/gtkspinbutton.h>
-
-#include "e-util/e-sexp.h"
-#include "filter-int.h"
-
-#define d(x)
-
-static int int_eq (FilterElement *fe, FilterElement *cm);
-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 *fe, GString *out);
-
-static void filter_int_class_init (FilterIntClass *klass);
-static void filter_int_init (FilterInt *fi);
-static void filter_int_finalise (GObject *obj);
-
-
-static FilterElementClass *parent_class;
-
-
-GType
-filter_int_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (FilterIntClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) filter_int_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (FilterInt),
- 0, /* n_preallocs */
- (GInstanceInitFunc) filter_int_init,
- };
-
- type = g_type_register_static (FILTER_TYPE_ELEMENT, "FilterInt", &info, 0);
- }
-
- return type;
-}
-
-static void
-filter_int_class_init (FilterIntClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- FilterElementClass *fe_class = FILTER_ELEMENT_CLASS (klass);
-
- parent_class = g_type_class_ref (FILTER_TYPE_ELEMENT);
-
- object_class->finalize = filter_int_finalise;
-
- /* override methods */
- fe_class->eq = int_eq;
- fe_class->xml_create = xml_create;
- fe_class->xml_encode = xml_encode;
- fe_class->xml_decode = xml_decode;
- fe_class->get_widget = get_widget;
- fe_class->build_code = build_code;
- fe_class->format_sexp = format_sexp;
-}
-
-static void
-filter_int_init (FilterInt *fi)
-{
- fi->min = 0;
- fi->max = G_MAXINT;
-}
-
-static void
-filter_int_finalise (GObject *obj)
-{
- FilterInt *fi = (FilterInt *) obj;
-
- g_free (fi->type);
-
- G_OBJECT_CLASS (parent_class)->finalize (obj);
-}
-
-/**
- * filter_int_new:
- *
- * Create a new FilterInt object.
- *
- * Return value: A new #FilterInt object.
- **/
-FilterInt *
-filter_int_new (void)
-{
- return (FilterInt *) g_object_new (FILTER_TYPE_INT, NULL, NULL);
-}
-
-FilterInt *
-filter_int_new_type (const char *type, int min, int max)
-{
- FilterInt *fi;
-
- fi = filter_int_new ();
-
- fi->type = g_strdup (type);
- fi->min = min;
- fi->max = max;
-
- return fi;
-}
-
-void
-filter_int_set_value (FilterInt *fi, int val)
-{
- fi->val = val;
-}
-
-static int
-int_eq (FilterElement *fe, FilterElement *cm)
-{
- return FILTER_ELEMENT_CLASS (parent_class)->eq (fe, cm)
- && ((FilterInt *)fe)->val == ((FilterInt *)cm)->val;
-}
-
-static void
-xml_create (FilterElement *fe, xmlNodePtr node)
-{
- /* parent implementation */
- FILTER_ELEMENT_CLASS (parent_class)->xml_create (fe, node);
-}
-
-static xmlNodePtr
-xml_encode (FilterElement *fe)
-{
- xmlNodePtr value;
- FilterInt *fs = (FilterInt *)fe;
- char intval[32];
- const char *type;
-
- type = fs->type?fs->type:"integer";
-
- d(printf("Encoding %s as xml\n", type));
-
- value = xmlNewNode (NULL, "value");
- xmlSetProp (value, "name", fe->name);
- xmlSetProp (value, "type", type);
-
- sprintf(intval, "%d", fs->val);
- xmlSetProp (value, type, intval);
-
- return value;
-}
-
-static int
-xml_decode (FilterElement *fe, xmlNodePtr node)
-{
- FilterInt *fs = (FilterInt *)fe;
- char *name, *type;
- 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;
-
- type = xmlGetProp(node, "type");
- d(printf ("Type = %s\n", type));
- g_free(fs->type);
- fs->type = g_strdup(type);
- xmlFree(type);
-
- intval = xmlGetProp (node, fs->type ? fs->type : "integer");
- if (intval) {
- d(printf ("Value = %s\n", intval));
- fs->val = atoi (intval);
- xmlFree (intval);
- } else {
- d(printf ("Value = ?unknown?\n"));
- 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, (gfloat)fs->min, (gfloat)fs->max, 1.0, 1.0, 1.0);
- spin = gtk_spin_button_new (GTK_ADJUSTMENT (adjustment), fs->max>fs->min+1000?5.0:1.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);
-
- g_signal_connect (spin, "value-changed", G_CALLBACK (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_printf (out, "%d", fs->val);
-}
diff --git a/filter/filter-int.h b/filter/filter-int.h
deleted file mode 100644
index caba992958..0000000000
--- a/filter/filter-int.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2002 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_INT_H
-#define _FILTER_INT_H
-
-#include "filter-element.h"
-
-#define FILTER_TYPE_INT (filter_int_get_type ())
-#define FILTER_INT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FILTER_TYPE_INT, FilterInt))
-#define FILTER_INT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FILTER_TYPE_INT, FilterIntClass))
-#define IS_FILTER_INT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FILTER_TYPE_INT))
-#define IS_FILTER_INT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FILTER_TYPE_INT))
-#define FILTER_INT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FILTER_TYPE_INT, FilterIntClass))
-
-typedef struct _FilterInt FilterInt;
-typedef struct _FilterIntClass FilterIntClass;
-
-struct _FilterInt {
- FilterElement parent_object;
-
- char *type;
- int val;
- int min;
- int max;
-};
-
-struct _FilterIntClass {
- FilterElementClass parent_class;
-
- /* virtual methods */
-
- /* signals */
-};
-
-GType filter_int_get_type (void);
-FilterInt *filter_int_new (void);
-FilterInt *filter_int_new_type (const char *type, int min, int max);
-void filter_int_set_value (FilterInt *fi, int val);
-
-/* methods */
-
-#endif /* ! _FILTER_INT_H */
diff --git a/filter/filter-label.c b/filter/filter-label.c
deleted file mode 100644
index 2e8e8d787c..0000000000
--- a/filter/filter-label.c
+++ /dev/null
@@ -1,182 +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 2002 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 <gtk/gtk.h>
-#include <gconf/gconf.h>
-#include <gconf/gconf-client.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-dialog-util.h>
-#include <libgnomeui/gnome-file-entry.h>
-
-#include "filter-label.h"
-#include "e-util/e-sexp.h"
-
-#define d(x)
-
-static void xml_create (FilterElement *fe, xmlNodePtr node);
-
-static void filter_label_class_init (FilterLabelClass *klass);
-static void filter_label_init (FilterLabel *label);
-static void filter_label_finalise (GObject *obj);
-
-
-static FilterElementClass *parent_class;
-
-
-GType
-filter_label_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (FilterLabelClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) filter_label_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (FilterLabel),
- 0, /* n_preallocs */
- (GInstanceInitFunc) filter_label_init,
- };
-
- type = g_type_register_static (FILTER_TYPE_OPTION, "FilterLabel", &info, 0);
- }
-
- return type;
-}
-
-static void
-filter_label_class_init (FilterLabelClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- FilterElementClass *fe_class = FILTER_ELEMENT_CLASS (klass);
-
- parent_class = g_type_class_ref (FILTER_TYPE_OPTION);
-
- object_class->finalize = filter_label_finalise;
-
- /* override methods */
- fe_class->xml_create = xml_create;
-}
-
-static void
-filter_label_init (FilterLabel *fl)
-{
- ((FilterOption *) fl)->type = "label";
-}
-
-static void
-filter_label_finalise (GObject *obj)
-{
- G_OBJECT_CLASS (parent_class)->finalize (obj);
-}
-
-/**
- * filter_label_new:
- *
- * Create a new FilterLabel object.
- *
- * Return value: A new #FilterLabel object.
- **/
-FilterLabel *
-filter_label_new (void)
-{
- return (FilterLabel *) g_object_new (FILTER_TYPE_LABEL, NULL, NULL);
-}
-
-static struct {
- char *title;
- char *value;
-} labels[] = {
- { N_("Important"), "important" },
- { N_("Work"), "work" },
- { N_("Personal"), "personal" },
- { N_("To Do"), "todo" },
- { N_("Later"), "later" },
-};
-
-int filter_label_count (void)
-{
- return sizeof (labels) / sizeof (labels[0]);
-}
-
-const char *
-filter_label_label (int i)
-{
- if (i < 0 || i >= sizeof (labels) / sizeof (labels[0]))
- return NULL;
- else
- return labels[i].value;
-}
-
-int
-filter_label_index (const char *label)
-{
- int i;
-
- for (i = 0; i < sizeof (labels) / sizeof (labels[0]); i++) {
- if (strcmp (labels[i].value, label) == 0)
- return i;
- }
-
- return -1;
-}
-
-static void
-xml_create (FilterElement *fe, xmlNodePtr node)
-{
- FilterOption *fo = (FilterOption *) fe;
- GConfClient *gconf;
- GSList *list, *l;
- char *title, *p;
- int i = 0;
-
- FILTER_ELEMENT_CLASS (parent_class)->xml_create (fe, node);
-
- gconf = gconf_client_get_default ();
-
- l = list = gconf_client_get_list (gconf, "/apps/evolution/mail/labels", GCONF_VALUE_STRING, NULL);
- while (l != NULL) {
- title = (char *) l->data;
- if ((p = strrchr (title, ':')))
- *p++ = '\0';
-
- filter_option_add (fo, i < 5 ? labels[i++].value : (p ? p : "#ffffff"), title, NULL);
- g_free (title);
-
- l = l->next;
- }
- g_slist_free (list);
-
- g_object_unref (gconf);
-}
diff --git a/filter/filter-label.h b/filter/filter-label.h
deleted file mode 100644
index 395ce07d48..0000000000
--- a/filter/filter-label.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 2002 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_LABEL__
-#define __FILTER_LABEL__
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include "filter-option.h"
-
-#define FILTER_TYPE_LABEL (filter_label_get_type ())
-#define FILTER_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FILTER_TYPE_LABEL, FilterLabel))
-#define FILTER_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FILTER_TYPE_LABEL, FilterLabelClass))
-#define IS_FILTER_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FILTER_TYPE_LABEL))
-#define IS_FILTER_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FILTER_TYPE_LABEL))
-#define FILTER_LABEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FILTER_TYPE_LABEL, FilterLabelClass))
-
-typedef struct _FilterLabel FilterLabel;
-typedef struct _FilterLabelClass FilterLabelClass;
-
-struct _FilterLabel {
- FilterOption parent_object;
-
-};
-
-struct _FilterLabelClass {
- FilterOptionClass parent_class;
-
- /* virtual methods */
-
- /* signals */
-};
-
-GType filter_label_get_type (void);
-
-FilterLabel *filter_label_new (void);
-
-/* Sigh, this is a mess, but its cleaner than the original mess */
-int filter_label_count(void);
-const char *filter_label_label(int i);
-int filter_label_index(const char *label);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __FILTER_LABEL__ */
diff --git a/filter/filter-marshal.list b/filter/filter-marshal.list
deleted file mode 100644
index 9d6744db44..0000000000
--- a/filter/filter-marshal.list
+++ /dev/null
@@ -1,2 +0,0 @@
-NONE:NONE
-NONE:POINTER
diff --git a/filter/filter-option.c b/filter/filter-option.c
deleted file mode 100644
index 249e79c98b..0000000000
--- a/filter/filter-option.c
+++ /dev/null
@@ -1,367 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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/gtk.h>
-#include <libgnome/gnome-i18n.h>
-
-#include "filter-option.h"
-#include "filter-part.h"
-#include "e-util/e-sexp.h"
-
-#define d(x)
-
-static int option_eq (FilterElement *fe, FilterElement *cm);
-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 *klass);
-static void filter_option_init (FilterOption *fo);
-static void filter_option_finalise (GObject *obj);
-
-
-static FilterElementClass *parent_class;
-
-
-GType
-filter_option_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (FilterOptionClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) filter_option_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (FilterOption),
- 0, /* n_preallocs */
- (GInstanceInitFunc) filter_option_init,
- };
-
- type = g_type_register_static (FILTER_TYPE_ELEMENT, "FilterOption", &info, 0);
- }
-
- return type;
-}
-
-static void
-filter_option_class_init (FilterOptionClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- FilterElementClass *fe_class = FILTER_ELEMENT_CLASS (klass);
-
- parent_class = g_type_class_ref (FILTER_TYPE_ELEMENT);
-
- object_class->finalize = filter_option_finalise;
-
- /* override methods */
- fe_class->eq = option_eq;
- fe_class->xml_create = xml_create;
- fe_class->xml_encode = xml_encode;
- fe_class->xml_decode = xml_decode;
- fe_class->clone = clone;
- fe_class->get_widget = get_widget;
- fe_class->build_code = build_code;
- fe_class->format_sexp = format_sexp;
-}
-
-static void
-filter_option_init (FilterOption *fo)
-{
- fo->type = "option";
-}
-
-static void
-free_option (struct _filter_option *o, void *data)
-{
- g_free (o->title);
- g_free (o->value);
- g_free (o->code);
- g_free (o);
-}
-
-static void
-filter_option_finalise (GObject *obj)
-{
- FilterOption *fo = (FilterOption *) obj;
-
- g_list_foreach (fo->options, (GFunc)free_option, NULL);
- g_list_free (fo->options);
-
- G_OBJECT_CLASS (parent_class)->finalize (obj);
-}
-
-/**
- * filter_option_new:
- *
- * Create a new FilterOption object.
- *
- * Return value: A new #FilterOption object.
- **/
-FilterOption *
-filter_option_new (void)
-{
- return (FilterOption *) g_object_new (FILTER_TYPE_OPTION, NULL, NULL);
-}
-
-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);
-}
-
-/* used by implementers to add additional options */
-void
-filter_option_add(FilterOption *fo, const char *value, const char *title, const char *code)
-{
- struct _filter_option *op;
-
- g_assert(IS_FILTER_OPTION(fo));
- g_return_if_fail(find_option(fo, value) == NULL);
-
- op = g_malloc(sizeof(*op));
- op->title = g_strdup(title);
- op->value = g_strdup(value);
- op->code = g_strdup(code);
-
- fo->options = g_list_append(fo->options, op);
- if (fo->current == NULL)
- fo->current = op;
-}
-
-static int
-option_eq(FilterElement *fe, FilterElement *cm)
-{
- FilterOption *fo = (FilterOption *)fe, *co = (FilterOption *)cm;
-
- return FILTER_ELEMENT_CLASS (parent_class)->eq (fe, cm)
- && ((fo->current && co->current && strcmp(fo->current->value, co->current->value) == 0)
- || (fo->current == NULL && co->current == NULL));
-}
-
-static void
-xml_create (FilterElement *fe, xmlNodePtr node)
-{
- FilterOption *fo = (FilterOption *)fe;
- xmlNodePtr n, work;
-
- /* parent implementation */
- FILTER_ELEMENT_CLASS (parent_class)->xml_create (fe, node);
-
- n = node->children;
- while (n) {
- if (!strcmp (n->name, "option")) {
- char *tmp, *value, *title = NULL, *code = NULL;
-
- value = xmlGetProp (n, "value");
- work = n->children;
- while (work) {
- if (!strcmp (work->name, "title")) {
- if (!title) {
- if (!(tmp = xmlNodeGetContent (work)))
- tmp = xmlStrdup ("");
-
- title = g_strdup (tmp);
- xmlFree (tmp);
- }
- } else if (!strcmp (work->name, "code")) {
- if (!code) {
- if (!(tmp = xmlNodeGetContent (work)))
- tmp = xmlStrdup ("");
-
- code = g_strdup (tmp);
- xmlFree (tmp);
- }
- }
- work = work->next;
- }
-
- filter_option_add (fo, value, title, code);
- xmlFree (value);
- g_free (title);
- g_free (code);
- } else if (n->type == XML_ELEMENT_NODE) {
- 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", fo->type);
- 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 = g_object_get_data ((GObject *) 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));
- g_object_set_data ((GObject *) item, "option", op);
- g_signal_connect (item, "activate", G_CALLBACK (option_changed), fe);
- gtk_menu_shell_append(GTK_MENU_SHELL(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)
- g_signal_emit_by_name (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 *op;
-
- d(printf ("cloning option\n"));
-
- new = FILTER_OPTION (FILTER_ELEMENT_CLASS (parent_class)->clone (fe));
- l = fo->options;
- while (l) {
- op = l->data;
- filter_option_add (new, op->value, op->title, op->code);
- l = l->next;
- }
-
- 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 39418868ab..0000000000
--- a/filter/filter-option.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_OPTION_H
-#define _FILTER_OPTION_H
-
-#include "filter-element.h"
-
-#define FILTER_TYPE_OPTION (filter_option_get_type ())
-#define FILTER_OPTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FILTER_TYPE_OPTION, FilterOption))
-#define FILTER_OPTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FILTER_TYPE_OPTION, FilterOptionClass))
-#define IS_FILTER_OPTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FILTER_TYPE_OPTION))
-#define IS_FILTER_OPTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FILTER_TYPE_OPTION))
-#define FILTER_OPTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FILTER_TYPE_OPTION, FilterOptionClass))
-
-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_object;
-
- const char *type; /* static memory, type name written to xml */
-
- GList *options;
- struct _filter_option *current;
-};
-
-struct _FilterOptionClass {
- FilterElementClass parent_class;
-
- /* virtual methods */
-
- /* signals */
-};
-
-GType filter_option_get_type (void);
-FilterOption *filter_option_new (void);
-
-/* methods */
-void filter_option_set_current (FilterOption *option, const char *name);
-void filter_option_add (FilterOption *fo, const char *name, const char *title, const char *code);
-
-#endif /* ! _FILTER_OPTION_H */
diff --git a/filter/filter-part.c b/filter/filter-part.c
deleted file mode 100644
index 5f8a53304a..0000000000
--- a/filter/filter-part.c
+++ /dev/null
@@ -1,544 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <string.h>
-
-#include <gtk/gtkbox.h>
-#include <gtk/gtkhbox.h>
-#include <libgnome/gnome-i18n.h>
-
-#include "filter-part.h"
-
-
-#define d(x)
-
-static void filter_part_class_init (FilterPartClass *klass);
-static void filter_part_init (FilterPart *fp);
-static void filter_part_finalise (GObject *obj);
-
-
-static GObjectClass *parent_class = NULL;
-
-
-GType
-filter_part_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (FilterPartClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) filter_part_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (FilterPart),
- 0, /* n_preallocs */
- (GInstanceInitFunc) filter_part_init,
- };
-
- type = g_type_register_static (G_TYPE_OBJECT, "FilterPart", &info, 0);
- }
-
- return type;
-}
-
-static void
-filter_part_class_init (FilterPartClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_ref (G_TYPE_OBJECT);
-
- object_class->finalize = filter_part_finalise;
-}
-
-static void
-filter_part_init (FilterPart *fp)
-{
- ;
-}
-
-static void
-filter_part_finalise (GObject *obj)
-{
- FilterPart *fp = (FilterPart *) obj;
- GList *l;
-
- l = fp->elements;
- while (l) {
- g_object_unref (l->data);
- l = l->next;
- }
-
- g_list_free (fp->elements);
- g_free (fp->name);
- g_free (fp->title);
- g_free (fp->code);
-
- G_OBJECT_CLASS (parent_class)->finalize (obj);
-}
-
-/**
- * filter_part_new:
- *
- * Create a new FilterPart object.
- *
- * Return value: A new #FilterPart object.
- **/
-FilterPart *
-filter_part_new (void)
-{
- return (FilterPart *) g_object_new (FILTER_TYPE_PART, NULL, NULL);
-}
-
-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_eq (FilterPart *fp, FilterPart *fc)
-{
- int truth;
- GList *al, *bl;
-
- truth = ((fp->name && fc->name && strcmp(fp->name, fc->name) == 0)
- || (fp->name == NULL && fc->name == NULL))
- && ((fp->title && fc->title && strcmp(fp->title, fc->title) == 0)
- || (fp->title == NULL && fc->title == NULL))
- && ((fp->code && fc->code && strcmp(fp->code, fc->code) == 0)
- || (fp->code == NULL && fc->code == NULL));
-
- al = fp->elements;
- bl = fc->elements;
- while (truth && al && bl) {
- FilterElement *a = al->data, *b = bl->data;
-
- truth = filter_element_eq(a, b);
-
- al = al->next;
- bl = bl->next;
- }
-
- return truth && al == NULL && bl == NULL;
-}
-
-int
-filter_part_xml_create (FilterPart *ff, xmlNodePtr node)
-{
- xmlNodePtr n;
- char *type, *str;
- FilterElement *el;
-
- str = xmlGetProp (node, "name");
- ff->name = g_strdup (str);
- if (str)
- xmlFree (str);
-
- n = node->children;
- 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 = g_strdup (str);
- if (str)
- xmlFree (str);
- }
- } else if (!strcmp (n->name, "code")) {
- if (!ff->code) {
- str = xmlNodeGetContent (n);
- ff->code = g_strdup (str);
- if (str)
- xmlFree (str);
- }
- } else if (n->type == XML_ELEMENT_NODE) {
- g_warning ("Unknown 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->children;
- 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 *) g_object_new (G_OBJECT_TYPE (fp), NULL, NULL);
- 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;
-}
-
-/* only copies values of matching parts in the right order */
-void
-filter_part_copy_values (FilterPart *dst, FilterPart *src)
-{
- GList *dstl, *srcl, *dstt;
- FilterElement *de, *se;
-
- /* NOTE: we go backwards, it just works better that way */
-
- /* for each source type, search the dest type for
- a matching type in the same order */
- srcl = g_list_last (src->elements);
- dstl = g_list_last (dst->elements);
- while (srcl && dstl) {
- se = srcl->data;
- dstt = dstl;
- while (dstt) {
- de = dstt->data;
- if (FILTER_PART_GET_CLASS (de) == FILTER_PART_GET_CLASS (se)) {
- filter_element_copy_value (de, se);
- dstl = dstt->prev;
- break;
- }
- dstt = dstt->prev;
- }
-
- srcl = srcl->prev;
- }
-}
-
-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 = l->next;
- }
-}
-
-/**
- * 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 = l->next;
- }
-}
-
-/**
- * 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 = l->next;
- }
-
- 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 = node->next;
- }
-
- 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 = g_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_append_printf (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_append_printf (out, "%.*s", newstart-start, start);
- e_sexp_encode_string (out, val);
-#endif
- } else {
- g_string_append_printf (out, "%.*s", end-start+1, start);
- }
- start = end + 1;
- }
- g_string_append (out, start);
-}
-
-#if 0
-int main(int argc, char **argv)
-{
- GtkWidget *dialog, *w;
- xmlDocPtr system;
- xmlNodePtr node;
- FilterPart *ff;
- 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);
-
- dialog = gtk_dialog_new ();
- gtk_dialog_add_buttons ((GtkDialog *) dialog, GTK_BUTTONS_OK, NULL);
- gtk_window_set_title ((GtkWindow *) dialog, _("Test"));
- gtk_window_set_policy ((GtkWindow *) dialog, FALSE, TRUE, FALSE);
- gtk_box_pack_start ((GtkBox *) dialog->vbox, w, TRUE, TRUE, 0);
-
- gtk_dialog_run ((GtkDialog *) dialog);
- gtk_widget_destroy (dialog);
-
- 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 b1281522ea..0000000000
--- a/filter/filter-part.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_PART_H
-#define _FILTER_PART_H
-
-#include <glib.h>
-#include <glib-object.h>
-
-#include "filter-input.h"
-
-#define FILTER_TYPE_PART (filter_part_get_type ())
-#define FILTER_PART(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FILTER_TYPE_PART, FilterPart))
-#define FILTER_PART_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FILTER_TYPE_PART, FilterPartClass))
-#define IS_FILTER_PART(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FILTER_TYPE_PART))
-#define IS_FILTER_PART_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FILTER_TYPE_PART))
-#define FILTER_PART_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FILTER_TYPE_PART, FilterElementClass))
-
-typedef struct _FilterPart FilterPart;
-typedef struct _FilterPartClass FilterPartClass;
-
-struct _FilterPart {
- GObject parent_object;
- struct _FilterPartPrivate *priv;
-
- char *name;
- char *title;
- char *code;
- GList *elements;
-};
-
-struct _FilterPartClass {
- GObjectClass parent_class;
-
- /* virtual methods */
-
- /* signals */
-};
-
-GType filter_part_get_type (void);
-FilterPart *filter_part_new (void);
-
-/* methods */
-gboolean filter_part_validate (FilterPart *fp);
-int filter_part_eq (FilterPart *fp, FilterPart *fc);
-
-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);
-void filter_part_copy_values (FilterPart *dfp, FilterPart *sfp);
-
-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 87e6433167..0000000000
--- a/filter/filter-rule.c
+++ /dev/null
@@ -1,897 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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/gtk.h>
-#include <libgnome/gnome-i18n.h>
-
-#include "filter-rule.h"
-#include "filter-context.h"
-#include "filter-marshal.h"
-
-#define d(x)
-
-static int validate(FilterRule *);
-static int rule_eq(FilterRule *fr, FilterRule *cm);
-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 *klass);
-static void filter_rule_init (FilterRule *fr);
-static void filter_rule_finalise (GObject *obj);
-
-#define _PRIVATE(x) (((FilterRule *)(x))->priv)
-
-struct _FilterRulePrivate {
- int frozen;
-};
-
-static GObjectClass *parent_class = NULL;
-
-enum {
- CHANGED,
- LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-GType
-filter_rule_get_type ()
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (FilterRuleClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) filter_rule_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (FilterRule),
- 0, /* n_preallocs */
- (GInstanceInitFunc) filter_rule_init,
- };
-
- type = g_type_register_static (G_TYPE_OBJECT, "FilterRule", &info, 0);
- }
-
- return type;
-}
-
-static void
-filter_rule_class_init (FilterRuleClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_ref (G_TYPE_OBJECT);
-
- object_class->finalize = filter_rule_finalise;
-
- /* override methods */
- klass->validate = validate;
- klass->eq = rule_eq;
- klass->xml_encode = xml_encode;
- klass->xml_decode = xml_decode;
- klass->build_code = build_code;
- klass->copy = rule_copy;
- klass->get_widget = get_widget;
-
- /* signals */
- signals[CHANGED] =
- g_signal_new ("changed",
- FILTER_TYPE_RULE,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (FilterRuleClass, changed),
- NULL,
- NULL,
- filter_marshal_NONE__NONE,
- G_TYPE_NONE, 0);
-}
-
-static void
-filter_rule_init (FilterRule *fr)
-{
- fr->priv = g_malloc0 (sizeof (*fr->priv));
-}
-
-static void
-filter_rule_finalise (GObject *obj)
-{
- FilterRule *fr = (FilterRule *) obj;
-
- g_free (fr->name);
- g_free (fr->source);
- g_list_foreach (fr->parts, (GFunc)g_object_unref, NULL);
- g_list_free (fr->parts);
-
- g_free (fr->priv);
-
- G_OBJECT_CLASS (parent_class)->finalize (obj);
-}
-
-/**
- * filter_rule_new:
- *
- * Create a new FilterRule object.
- *
- * Return value: A new #FilterRule object.
- **/
-FilterRule *
-filter_rule_new ()
-{
- return (FilterRule *) g_object_new (FILTER_TYPE_RULE, NULL, NULL);
-}
-
-FilterRule *
-filter_rule_clone (FilterRule *base)
-{
- FilterRule *rule;
-
- g_assert (IS_FILTER_RULE (base));
-
- rule = g_object_new (G_OBJECT_TYPE (base), NULL, NULL);
- filter_rule_copy (rule, base);
-
- return rule;
-}
-
-void
-filter_rule_set_name (FilterRule *fr, const char *name)
-{
- g_assert (IS_FILTER_RULE (fr));
-
- if ((fr->name && name && strcmp (fr->name, name) == 0)
- || (fr->name == NULL && name == NULL))
- return;
-
- g_free (fr->name);
- fr->name = g_strdup (name);
-
- filter_rule_emit_changed (fr);
-}
-
-void
-filter_rule_set_source (FilterRule *fr, const char *source)
-{
- g_assert (IS_FILTER_RULE (fr));
-
- if ((fr->source && source && strcmp (fr->source, source) == 0)
- || (fr->source == NULL && source == NULL))
- return;
-
- g_free (fr->source);
- fr->source = g_strdup (source);
-
- filter_rule_emit_changed (fr);
-}
-
-int
-filter_rule_validate (FilterRule *fr)
-{
- g_assert (IS_FILTER_RULE (fr));
-
- return FILTER_RULE_GET_CLASS (fr)->validate (fr);
-}
-
-static int
-validate (FilterRule *fr)
-{
- GtkWidget *dialog;
- int valid = TRUE;
- GList *parts;
-
- if (!fr->name || !*fr->name) {
- /* FIXME: FilterElement should probably have a
- GtkWidget member pointing to the value gotten with
- ::get_widget() so that we can get the parent window
- here. */
- dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
- "%s", _("You must name this filter."));
-
- gtk_dialog_run ((GtkDialog *) dialog);
- gtk_widget_destroy (dialog);
-
- return FALSE;
- }
-
- /* validate rule parts */
- parts = fr->parts;
- while (parts && valid) {
- valid = filter_part_validate ((FilterPart *) parts->data);
- parts = parts->next;
- }
-
- return valid;
-}
-
-int
-filter_rule_eq (FilterRule *fr, FilterRule *cm)
-{
- g_assert (IS_FILTER_RULE (fr));
- g_assert (IS_FILTER_RULE (cm));
-
- return (FILTER_RULE_GET_CLASS (fr) == FILTER_RULE_GET_CLASS (cm))
- && FILTER_RULE_GET_CLASS (fr)->eq (fr, cm);
-}
-
-static int
-list_eq(GList *al, GList *bl)
-{
- int truth = TRUE;
-
- while (truth && al && bl) {
- FilterPart *a = al->data, *b = bl->data;
-
- truth = filter_part_eq (a, b);
- al = al->next;
- bl = bl->next;
- }
-
- return truth && al == NULL && bl == NULL;
-}
-
-static int
-rule_eq (FilterRule *fr, FilterRule *cm)
-{
- return fr->grouping == cm->grouping
- && ((fr->name && cm->name && strcmp (fr->name, cm->name) == 0)
- || (fr->name == NULL && cm->name == NULL))
- && ((fr->source && cm->source && strcmp (fr->source, cm->source) == 0)
- || (fr->source == NULL && cm->source == NULL) )
- && list_eq (fr->parts, cm->parts);
-}
-
-xmlNodePtr
-filter_rule_xml_encode (FilterRule *fr)
-{
- g_assert (IS_FILTER_RULE (fr));
-
- return FILTER_RULE_GET_CLASS (fr)->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) {
- work = xmlNewNode (NULL, "title");
- xmlNodeSetContent (work, fr->name);
- 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 = l->next;
- }
-
- return node;
-}
-
-static void
-load_set (xmlNodePtr node, FilterRule *fr, RuleContext *f)
-{
- xmlNodePtr work;
- char *rulename;
- FilterPart *part;
-
- work = node->children;
- 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 if (work->type == XML_ELEMENT_NODE) {
- g_warning ("Unknown 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 = FILTER_RULE_GET_CLASS (fr)->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->children;
- 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 = g_strdup (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) g_object_unref, NULL);
- g_list_free (dest->parts);
- dest->parts = NULL;
- }
-
- node = src->parts;
- while (node) {
- FilterPart *part = node->data;
-
- g_object_ref (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));
-
- FILTER_RULE_GET_CLASS (dest)->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);
-
- FILTER_RULE_GET_CLASS (fr)->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)
- g_signal_emit (fr, signals[CHANGED], 0);
-}
-
-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 = g_object_get_data ((GObject *) 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_part_copy_values (newpart, data->part);
- filter_rule_replace_part (data->fr, data->part, newpart);
- g_object_unref (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);
-
- g_object_set_data ((GObject *) 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 */
- g_object_set_data_full ((GObject *) 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));
- g_object_set_data ((GObject *) item, "part", part);
- g_signal_connect (item, "activate", G_CALLBACK (option_activate), data);
- gtk_menu_shell_append(GTK_MENU_SHELL(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 = g_object_get_data ((GObject *) button, "rule");
- part = g_object_get_data ((GObject *) rule, "part");
-
- /* remove the part from the list */
- filter_rule_remove_part (data->fr, part);
- g_object_unref (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;
-
- gtk_table_attach (GTK_TABLE (data->parts), rule, 0, 1, row, row + 1,
- GTK_EXPAND | GTK_FILL, 0, 0, 0);
-
- remove = gtk_button_new_from_stock (GTK_STOCK_REMOVE);
- g_object_set_data ((GObject *) remove, "rule", rule);
- g_object_set_data ((GObject *) rule, "part", part);
- /*gtk_button_set_relief (GTK_BUTTON (remove), GTK_RELIEF_NONE);*/
- g_signal_connect (remove, "clicked", G_CALLBACK (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 = g_strdup (gtk_entry_get_text (entry));
-}
-
-GtkWidget *
-filter_rule_get_widget (FilterRule *fr, RuleContext *rc)
-{
- return FILTER_RULE_GET_CLASS (fr)->get_widget (fr, rc);
-}
-
-static void
-grab_focus (GtkWidget *entry, gpointer data)
-{
- gtk_widget_grab_focus (entry);
-}
-
-static GtkWidget *
-get_widget (FilterRule *fr, struct _RuleContext *f)
-{
- GtkWidget *hbox, *vbox, *parts, *inframe;
- GtkWidget *add, *frame, *label, *name, *w;
- GtkWidget *omenu, *menu, *item;
- GtkWidget *scrolledwindow;
- GtkObject *hadj, *vadj;
- GList *l;
- FilterPart *part;
- struct _rule_data *data;
- int 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 {
- gtk_entry_set_text (GTK_ENTRY (name), fr->name);
- }
-
- /* evil kludgy hack because gtk sucks */
- g_signal_connect (name, "realize", G_CALLBACK (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);
- g_signal_connect (name, "changed", G_CALLBACK (name_changed), fr);
-
- frame = gtk_frame_new (_("If"));
- inframe = gtk_vbox_new (FALSE, 3);
- gtk_container_add (GTK_CONTAINER (frame), inframe);
- gtk_container_set_border_width (GTK_CONTAINER (inframe), 6);
-
- /* 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 */
- g_object_set_data_full ((GObject *) 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"));
- g_signal_connect (item, "activate", G_CALLBACK (match_all), fr);
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
- gtk_widget_show (item);
-
- item = gtk_menu_item_new_with_label (_("if any criteria are met"));
- g_signal_connect (item, "activate", G_CALLBACK (match_any), fr);
- gtk_menu_shell_append (GTK_MENU_SHELL (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);
-
- add = gtk_button_new_from_stock (GTK_STOCK_ADD);
- g_signal_connect (add, "clicked", G_CALLBACK (more_parts), data);
- gtk_box_pack_start (GTK_BOX (hbox), add, FALSE, FALSE, 0);
-
- 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, 3);
-
- 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, 3);
-
- /*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 = node->next;
- }
-
- if (source) {
- while (node) {
- FilterRule *rule = node->data;
-
- if (rule->source && strcmp (rule->source, source) == 0)
- break;
- node = node->next;
- }
- }
-
- 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 = l->next;
- }
-
- 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 a6b2c3996a..0000000000
--- a/filter/filter-rule.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_RULE_H
-#define _FILTER_RULE_H
-
-#include <glib.h>
-#include <glib-object.h>
-
-#include "filter-part.h"
-
-#define FILTER_TYPE_RULE (filter_rule_get_type ())
-#define FILTER_RULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FILTER_TYPE_RULE, FilterRule))
-#define FILTER_RULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FILTER_TYPE_RULE, FilterRuleClass))
-#define IS_FILTER_RULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FILTER_TYPE_RULE))
-#define IS_FILTER_RULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FILTER_TYPE_RULE))
-#define FILTER_RULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FILTER_TYPE_RULE, FilterRuleClass))
-
-struct _RuleContext;
-
-typedef struct _FilterRule FilterRule;
-typedef struct _FilterRuleClass FilterRuleClass;
-
-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 */
-#define FILTER_SOURCE_JUNKTEST "junktest"/* perform only junktest on incoming mail */
-
-struct _FilterRule {
- GObject parent_object;
- struct _FilterRulePrivate *priv;
-
- char *name;
- char *source;
-
- enum _filter_grouping_t grouping;
- unsigned int system:1; /* this is a system rule, cannot be edited/deleted */
- GList *parts;
-};
-
-struct _FilterRuleClass {
- GObjectClass parent_class;
-
- /* virtual methods */
- int (*validate) (FilterRule *);
- int (*eq) (FilterRule *fr, FilterRule *cm);
-
- 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);
-};
-
-
-GType 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);
-int filter_rule_eq (FilterRule *fr, FilterRule *cm);
-
-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-source.c b/filter/filter-source.c
deleted file mode 100644
index c5955eb733..0000000000
--- a/filter/filter-source.c
+++ /dev/null
@@ -1,377 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jon Trowbridge <trow@ximian.com>
- * Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001-2002 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 "filter-source.h"
-
-#include <gtk/gtk.h>
-#include <e-util/e-url.h>
-#include <e-util/e-sexp.h>
-#include <e-util/e-account-list.h>
-#include <camel/camel-url.h>
-
-
-static void filter_source_class_init (FilterSourceClass *klass);
-static void filter_source_init (FilterSource *fs);
-static void filter_source_finalize (GObject *obj);
-
-static int source_eq (FilterElement *fe, FilterElement *cm);
-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 char *account_name, const char *name,
- const char *addr, const char *url);
-static void filter_source_get_sources (FilterSource *fs);
-
-typedef struct _SourceInfo {
- char *account_name;
- char *name;
- char *address;
- char *url;
-} SourceInfo;
-
-struct _FilterSourcePrivate {
- GList *sources;
- char *current_url;
-};
-
-
-static FilterElementClass *parent_class = NULL;
-
-
-GType
-filter_source_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (FilterSourceClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) filter_source_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (FilterSource),
- 0, /* n_preallocs */
- (GInstanceInitFunc) filter_source_init,
- };
-
- type = g_type_register_static (FILTER_TYPE_ELEMENT, "FilterSource", &info, 0);
- }
-
- return type;
-}
-
-static void
-filter_source_class_init (FilterSourceClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- FilterElementClass *fe_class = FILTER_ELEMENT_CLASS (klass);
-
- parent_class = g_type_class_ref (FILTER_TYPE_ELEMENT);
-
- object_class->finalize = filter_source_finalize;
-
- /* override methods */
- fe_class->eq = source_eq;
- fe_class->xml_create = xml_create;
- fe_class->xml_encode = xml_encode;
- fe_class->xml_decode = xml_decode;
- fe_class->clone = clone;
- fe_class->get_widget = get_widget;
- fe_class->build_code = build_code;
- fe_class->format_sexp = format_sexp;
-}
-
-static void
-filter_source_init (FilterSource *fs)
-{
- fs->priv = g_new (struct _FilterSourcePrivate, 1);
- fs->priv->sources = NULL;
- fs->priv->current_url = NULL;
-}
-
-static void
-filter_source_finalize (GObject *obj)
-{
- FilterSource *fs = FILTER_SOURCE (obj);
- GList *i = fs->priv->sources;
-
- while (i) {
- SourceInfo *info = i->data;
- g_free (info->account_name);
- 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->current_url);
-
- g_free (fs->priv);
-
- G_OBJECT_CLASS (parent_class)->finalize (obj);
-}
-
-FilterSource *
-filter_source_new (void)
-{
- return (FilterSource *) g_object_new (FILTER_TYPE_SOURCE, NULL, NULL);
-}
-
-static int
-source_eq (FilterElement *fe, FilterElement *cm)
-{
- FilterSource *fs = (FilterSource *)fe, *cs = (FilterSource *)cm;
-
- return FILTER_ELEMENT_CLASS (parent_class)->eq (fe, cm)
- && ((fs->priv->current_url && cs->priv->current_url
- && strcmp (fs->priv->current_url, cs->priv->current_url) == 0)
- || (fs->priv->current_url == NULL && cs->priv->current_url == NULL));
-}
-
-static void
-xml_create (FilterElement *fe, xmlNodePtr node)
-{
- /* Call parent implementation */
- FILTER_ELEMENT_CLASS (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;
- CamelURL *url;
- char *uri;
-
- node = node->children;
- while (node != NULL) {
- if (!strcmp (node->name, "uri")) {
- uri = xmlNodeGetContent (node);
- url = camel_url_new (uri, NULL);
- xmlFree (uri);
-
- g_free (fs->priv->current_url);
- fs->priv->current_url = camel_url_to_string (url, CAMEL_URL_HIDE_ALL);
- camel_url_free (url);
- break;
- }
-
- node = node->next;
- }
-
- 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->account_name, info->name, info->address, info->url);
- }
-
- return (FilterElement *) cpy;
-}
-
-static void
-source_changed (GtkWidget *item, FilterSource *fs)
-{
- SourceInfo *info = (SourceInfo *) g_object_get_data ((GObject *) item, "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;
- int 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;
- char *label;
-
- if (info->url != NULL) {
- if (first == NULL)
- first = info;
-
- if (info->account_name && strcmp (info->account_name, info->address))
- label = g_strdup_printf ("%s <%s> (%s)", info->name,
- info->address, info->account_name);
- else
- label = g_strdup_printf ("%s <%s>", info->name, info->address);
-
- item = gtk_menu_item_new_with_label (label);
- g_free (label);
-
- g_object_set_data ((GObject *) item, "source", info);
- g_signal_connect (item, "activate", G_CALLBACK (source_changed), fs);
-
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
- gtk_widget_show (item);
-
- if (fs->priv->current_url && !strcmp (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 char *account_name, const char *name,
- const char *addr, const char *url)
-{
- SourceInfo *info;
-
- g_return_if_fail (IS_FILTER_SOURCE (fs));
-
- info = g_new0 (SourceInfo, 1);
- info->account_name = g_strdup (account_name);
- 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)
-{
- EAccountList *accounts;
- const EAccount *account;
- GConfClient *gconf;
- EIterator *it;
- char *uri;
- CamelURL *url;
-
- /* should this get the global object from mail? */
- gconf = gconf_client_get_default ();
- accounts = e_account_list_new (gconf);
- g_object_unref (gconf);
-
- for (it = e_list_get_iterator((EList *)accounts);
- e_iterator_is_valid(it);
- e_iterator_next(it)) {
- account = (const EAccount *)e_iterator_get(it);
-
- if (account->source == NULL || account->source->url == NULL)
- continue;
-
- /* hide secret stuff */
- url = camel_url_new (account->source->url, NULL);
- uri = camel_url_to_string (url, CAMEL_URL_HIDE_ALL);
- camel_url_free (url);
-
- filter_source_add_source (fs, account->name, account->id->name, account->id->address, uri);
- g_free(uri);
- }
- g_object_unref(it);
- g_object_unref(accounts);
-}
diff --git a/filter/filter-source.h b/filter/filter-source.h
deleted file mode 100644
index 73bd63f503..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 -*- */
-/*
- * Authors: Jon Trowbridge <trow@ximian.com>
- * Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001-2002 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_SOURCE_H__
-#define __FILTER_SOURCE_H__
-
-#include "filter-element.h"
-
-#define FILTER_TYPE_SOURCE (filter_source_get_type ())
-#define FILTER_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FILTER_TYPE_SOURCE, FilterSource))
-#define FILTER_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FILTER_TYPE_SOURCE, FilterSourceClass))
-#define IS_FILTER_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FILTER_TYPE_SOURCE))
-#define IS_FILTER_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FILTER_TYPE_SOURCE))
-#define FILTER_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FILTER_TYPE_SOURCE, FilterSourceClass))
-
-typedef struct _FilterSource FilterSource;
-typedef struct _FilterSourceClass FilterSourceClass;
-
-struct _FilterSource {
- FilterElement parent_object;
- struct _FilterSourcePrivate *priv;
-};
-
-struct _FilterSourceClass {
- FilterElementClass parent_class;
-
-};
-
-
-GType filter_source_get_type (void);
-FilterSource *filter_source_new (void);
-
-void filter_source_set_current (FilterSource *src, const char *url);
-
-#endif /* __FILTER_SOURCE_H__ */
diff --git a/filter/filter.glade b/filter/filter.glade
deleted file mode 100644
index ac61b72c4d..0000000000
--- a/filter/filter.glade
+++ /dev/null
@@ -1,1316 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-
-<widget class="GtkDialog" id="filter-editor">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="title" translatable="yes">Edit Filters</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="has_separator">True</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="cancel_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">-6</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="ok_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">-5</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="filter_source">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget1">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget2">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Incoming</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Outgoing</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frame1">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkHBox" id="hbox1">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow1">
- <property name="visible">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="Custom" id="rule_list">
- <property name="visible">True</property>
- <property name="creation_function">rule_editor_treeview_new</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Thu, 12 Dec 2002 23:41:46 GMT</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkVButtonBox" id="vbuttonbox1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_DEFAULT_STYLE</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkButton" id="rule_add">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-add</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="rule_edit">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Edit</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="rule_delete">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-remove</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="rule_up">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-go-up</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="rule_down">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-go-down</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Filter Rules</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-<widget class="GtkDialog" id="vfolder-editor">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="title" translatable="yes">Edit VFolders</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="has_separator">True</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">8</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area2">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="cancel_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">-6</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="ok_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">-5</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frame2">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkHBox" id="hbox2">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow2">
- <property name="visible">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="Custom" id="rule_list">
- <property name="visible">True</property>
- <property name="creation_function">rule_editor_treeview_new</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Fri, 13 Dec 2002 00:15:04 GMT</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkVButtonBox" id="vbuttonbox2">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_DEFAULT_STYLE</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkButton" id="rule_add">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-add</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="rule_edit">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Edit</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="rule_delete">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-remove</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="rule_up">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-go-up</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="rule_down">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-go-down</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Virtual Folders</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-<widget class="GtkDialog" id="vfolder-source">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="title" translatable="yes"></property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="has_separator">True</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox3">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">8</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area3">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="cancel_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">-6</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="apply_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-apply</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">0</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="ok_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">-5</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="vfolder_source_frame">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkVBox" id="vbox3">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkOptionMenu" id="source_option">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget8">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget9">
- <property name="visible">True</property>
- <property name="label" translatable="yes">specific folders only</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget10">
- <property name="visible">True</property>
- <property name="label" translatable="yes">with all local folders</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget11">
- <property name="visible">True</property>
- <property name="label" translatable="yes">with all active remote folders</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget12">
- <property name="visible">True</property>
- <property name="label" translatable="yes">with all local and active remote folders</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox3">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow3">
- <property name="visible">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="Custom" id="source_list">
- <property name="visible">True</property>
- <property name="creation_function">vfolder_editor_sourcelist_new</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Fri, 13 Dec 2002 00:22:39 GMT</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox3">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">1</property>
-
- <child>
- <widget class="GtkVButtonBox" id="vbuttonbox3">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_DEFAULT_STYLE</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkButton" id="source_add">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-add</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="source_remove">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-remove</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">vFolder Sources</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-<widget class="GtkWindow" id="rule-editor">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="title" translatable="yes">window1</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
-
- <child>
- <widget class="GtkVBox" id="rule_editor">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkOptionMenu" id="filter_source">
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget15">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget16">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Incoming</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="rule_frame">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkHBox" id="hbox4">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow4">
- <property name="visible">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="Custom" id="rule_list">
- <property name="visible">True</property>
- <property name="creation_function">rule_editor_treeview_new</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Thu, 12 Dec 2002 23:50:05 GMT</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox5">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkVButtonBox" id="vbuttonbox4">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_DEFAULT_STYLE</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkButton" id="rule_add">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-add</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="rule_edit">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Edit</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="rule_delete">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-remove</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="rule_up">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-go-up</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="rule_down">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-go-down</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label4">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Filter Rules</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-<widget class="GtkWindow" id="filter_datespec_win">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="title" translatable="yes">window1</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
-
- <child>
- <widget class="GtkVBox" id="filter_datespec">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHBox" id="hbox5">
- <property name="border_width">4</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label4">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Compare against</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="option_type">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget19">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget20">
- <property name="visible">True</property>
- <property name="label" translatable="yes">the current time</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget21">
- <property name="visible">True</property>
- <property name="label" translatable="yes">the time you specify</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget22">
- <property name="visible">True</property>
- <property name="label" translatable="yes">a time relative to the current time</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHSeparator" id="hseparator1">
- <property name="visible">True</property>
- </widget>
- <packing>
- <property name="padding">1</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkNotebook" id="notebook_type">
- <property name="visible">True</property>
- <property name="show_tabs">False</property>
- <property name="show_border">False</property>
- <property name="tab_pos">GTK_POS_TOP</property>
- <property name="scrollable">False</property>
- <property name="enable_popup">False</property>
-
- <child>
- <widget class="GtkVBox" id="vbox9">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label5">
- <property name="visible">True</property>
- <property name="label" translatable="yes">The message's date will be compared against
-the current time when filtering occurs.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label1</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox7">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label6">
- <property name="visible">True</property>
- <property name="label" translatable="yes">The message's date will be compared against
-12:00am of the date specified.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCalendar" id="calendar_specify">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="display_options">GTK_CALENDAR_SHOW_HEADING|GTK_CALENDAR_SHOW_DAY_NAMES</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label2</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox8">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label7">
- <property name="visible">True</property>
- <property name="label" translatable="yes">The message's date will be compared against
-a time relative to when filtering occurs.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox6">
- <property name="visible">True</property>
- <property name="homogeneous">True</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkSpinButton" id="spin_relative">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">False</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="snap_to_ticks">False</property>
- <property name="wrap">False</property>
- <property name="adjustment">1 0 1000 1 10 10</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="option_relative">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget23">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget24">
- <property name="visible">True</property>
- <property name="label" translatable="yes">seconds</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget25">
- <property name="visible">True</property>
- <property name="label" translatable="yes">minutes</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget26">
- <property name="visible">True</property>
- <property name="label" translatable="yes">hours</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget27">
- <property name="visible">True</property>
- <property name="label" translatable="yes">days</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget28">
- <property name="visible">True</property>
- <property name="label" translatable="yes">weeks</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget29">
- <property name="visible">True</property>
- <property name="label" translatable="yes">months</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget30">
- <property name="visible">True</property>
- <property name="label" translatable="yes">years</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label8">
- <property name="visible">True</property>
- <property name="label" translatable="yes">ago</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">2</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label3</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/filter/filtertypes.xml b/filter/filtertypes.xml
deleted file mode 100644
index 440cd6dddd..0000000000
--- a/filter/filtertypes.xml
+++ /dev/null
@@ -1,725 +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>is before</title>
- <code>
- (match-all (&lt; (get-sent-date) ${versus}))
- </code>
- </option>
- <option value="after">
- <title>is 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>is before</title>
- <code>
- (match-all (&lt; (get-received-date) ${versus}))
- </code>
- </option>
- <option value="after">
- <title>is after</title>
- <code>
- (match-all (&gt; (get-received-date) ${versus}))
- </code>
- </option>
- </input>
- <input type="datespec" name="versus"/>
- </part>
-
- <part name="label">
- <title>Label</title>
- <input type="optionlist" name="label-type">
- <option value="is">
- <title>is</title>
- <code>
- (match-all (= (user-tag "label") ${versus}))
- </code>
- </option>
- <option value="is-not">
- <title>is not</title>
- <code>
- (match-all (not (= (user-tag "label") ${versus})))
- </code>
- </option>
- </input>
- <input type="label" name="versus"/>
- </part>
-
- <part name="score">
- <title>Score</title>
- <input type="optionlist" name="score-type">
- <option value="is">
- <title>is</title>
- <code>
- (match-all (= (cast-int (user-tag "score")) ${versus}))
- </code>
- </option>
- <option value="is-not">
- <title>is not</title>
- <code>
- (match-all (not (= (cast-int (user-tag "score")) ${versus})))
- </code>
- </option>
- <option value="greater-than">
- <title>is greater than</title>
- <code>
- (match-all (&gt; (cast-int (user-tag "score")) ${versus}))
- </code>
- </option>
- <option value="less-than">
- <title>is less than</title>
- <code>
- (match-all (&lt; (cast-int (user-tag "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="follow-up">
- <title>Follow Up</title>
- <input type="optionlist" name="match-type">
- <option value="is">
- <title>is Flagged</title>
- <code>
- (match-all (not (= (user-tag "follow-up") "")))
- </code>
- </option>
- <option value="is not">
- <title>is not Flagged</title>
- <code>
- (match-all (= (user-tag "follow-up") ""))
- </code>
- </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="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="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>
- </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 (header-source ${source}))
- </code>
- </option>
- <option value="is-not">
- <title>is not</title>
- <code>
- (match-all (not (header-source ${source})))
- </code>
- </option>
- </input>
- <input type="source" name="source"/>
- </part>
-
- <part name="pipe">
- <title>Pipe Message to Shell Command</title>
- <input type="command" name="command"/>
- <input type="optionlist" name="retval-type">
- <option value="is">
- <title>returns</title>
- <code>
- (match-all (= (pipe-message "/bin/sh" "-c" ${command}) ${retval}))
- </code>
- </option>
- <option value="is-not">
- <title>does not return</title>
- <code>
- (match-all (not (= (pipe-message "/bin/sh" "-c" ${command}) ${retval})))
- </code>
- </option>
- <option value="greater-than">
- <title>returns greater than</title>
- <code>
- (match-all (&gt; (pipe-message "/bin/sh" "-c" ${command}) ${retval}))
- </code>
- </option>
- <option value="less-than">
- <title>returns less than</title>
- <code>
- (match-all (&lt; (pipe-message "/bin/sh" "-c" ${command}) ${retval}))
- </code>
- </option>
- </input>
- <input type="integer" name="retval"/>
- </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="adj-score">
- <title>Adjust Score</title>
- <code>(adjust-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>
- <option value="Spam">
- <title>Spam</title>
- </option>
- </input>
- </part>
- <part name="unset-status">
- <title>Unset Status</title>
- <code>
- (unset-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>
- <option value="Spam">
- <title>Spam</title>
- </option>
- </input>
- </part>
- <part name="beep">
- <title>Beep</title>
- <code>(beep)</code>
- </part>
- <part name="play-sound">
- <title>Play Sound</title>
- <code>(play-sound ${sound})</code>
- <input type="file" name="sound"/>
- </part>
- <part name="shell">
- <title>Shell Command</title>
- <code>(shell "/bin/sh" "-c" ${command})</code>
- <input type="command" name="command"/>
- </part>
- <part name="pipe">
- <title>Pipe Message to Shell Command</title>
- <code>(pipe-message "/bin/sh" "-c" ${command})</code>
- <input type="command" name="command"/>
- </part>
-</actionset>
-</filterdescription>
diff --git a/filter/libfilter-i18n.h b/filter/libfilter-i18n.h
deleted file mode 100644
index 410ea7945f..0000000000
--- a/filter/libfilter-i18n.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* Automatically generated. Do not edit. */
-char *s = N_("Adjust Score");
-char *s = N_("Assign Color");
-char *s = N_("Assign Score");
-char *s = N_("Attachments");
-char *s = N_("Beep");
-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_("Do Not Exist");
-char *s = N_("Draft");
-char *s = N_("Exist");
-char *s = N_("Expression");
-char *s = N_("Follow Up");
-char *s = N_("Important");
-char *s = N_("Label");
-char *s = N_("Mailing list");
-char *s = N_("Message Body");
-char *s = N_("Message Header");
-char *s = N_("Move to Folder");
-char *s = N_("Pipe Message to Shell Command");
-char *s = N_("Play Sound");
-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_("Shell Command");
-char *s = N_("Size (kB)");
-char *s = N_("Source Account");
-char *s = N_("Spam");
-char *s = N_("Specific header");
-char *s = N_("Status");
-char *s = N_("Stop Processing");
-char *s = N_("Subject");
-char *s = N_("Unset Status");
-char *s = N_("contains");
-char *s = N_("does not contain");
-char *s = N_("does not end with");
-char *s = N_("does not exist");
-char *s = N_("does not return");
-char *s = N_("does not sound like");
-char *s = N_("does not start with");
-char *s = N_("ends with");
-char *s = N_("exists");
-char *s = N_("is Flagged");
-char *s = N_("is after");
-char *s = N_("is before");
-char *s = N_("is greater than");
-char *s = N_("is less than");
-char *s = N_("is not Flagged");
-char *s = N_("is not");
-char *s = N_("is");
-char *s = N_("returns greater than");
-char *s = N_("returns less than");
-char *s = N_("returns");
-char *s = N_("sounds like");
-char *s = N_("starts with");
diff --git a/filter/rule-context.c b/filter/rule-context.c
deleted file mode 100644
index 5559e15197..0000000000
--- a/filter/rule-context.c
+++ /dev/null
@@ -1,889 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-
-#include <gtk/gtk.h>
-#include <libgnome/gnome-i18n.h>
-#include <gal/util/e-xml-utils.h>
-
-#include "rule-context.h"
-#include "filter-rule.h"
-#include "filter-marshal.h"
-
-#define d(x)
-
-static int load(RuleContext *rc, const char *system, const char *user);
-static int save(RuleContext *rc, const char *user);
-static int revert(RuleContext *rc, const char *user);
-static GList *rename_uri(RuleContext *rc, const char *olduri, const char *newuri, GCompareFunc cmp);
-static GList *delete_uri(RuleContext *rc, const char *uri, GCompareFunc cmp);
-
-static void rule_context_class_init(RuleContextClass *klass);
-static void rule_context_init(RuleContext *rc);
-static void rule_context_finalise(GObject *obj);
-
-#define _PRIVATE(x)(((RuleContext *)(x))->priv)
-
-struct _RuleContextPrivate {
- int frozen;
-};
-
-static GObjectClass *parent_class = NULL;
-
-enum {
- RULE_ADDED,
- RULE_REMOVED,
- CHANGED,
- LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-
-GType
-rule_context_get_type(void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof(RuleContextClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) rule_context_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof(RuleContext),
- 0, /* n_preallocs */
- (GInstanceInitFunc) rule_context_init,
- };
-
- type = g_type_register_static(G_TYPE_OBJECT, "RuleContext", &info, 0);
- }
-
- return type;
-}
-
-static void
-rule_context_class_init(RuleContextClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS(klass);
-
- parent_class = g_type_class_ref(G_TYPE_OBJECT);
-
- object_class->finalize = rule_context_finalise;
-
- /* override methods */
- klass->load = load;
- klass->save = save;
- klass->revert = revert;
- klass->rename_uri = rename_uri;
- klass->delete_uri = delete_uri;
-
- /* signals */
- signals[RULE_ADDED] =
- g_signal_new("rule_added",
- RULE_TYPE_CONTEXT,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET(RuleContextClass, rule_added),
- NULL,
- NULL,
- filter_marshal_NONE__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
-
- signals[RULE_REMOVED] =
- g_signal_new("rule_removed",
- RULE_TYPE_CONTEXT,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET(RuleContextClass, rule_removed),
- NULL,
- NULL,
- filter_marshal_NONE__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
-
- signals[CHANGED] =
- g_signal_new("changed",
- RULE_TYPE_CONTEXT,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET(RuleContextClass, changed),
- NULL,
- NULL,
- filter_marshal_NONE__NONE,
- G_TYPE_NONE, 0);
-}
-
-static void
-rule_context_init(RuleContext *rc)
-{
- rc->priv = g_malloc0(sizeof(*rc->priv));
-
- rc->part_set_map = g_hash_table_new(g_str_hash, g_str_equal);
- rc->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(GObject *obj)
-{
- RuleContext *rc =(RuleContext *) obj;
-
- g_list_foreach(rc->rule_set_list, (GFunc)free_rule_set, NULL);
- g_list_free(rc->rule_set_list);
- g_hash_table_destroy(rc->rule_set_map);
-
- g_list_foreach(rc->part_set_list, (GFunc)free_part_set, NULL);
- g_list_free(rc->part_set_list);
- g_hash_table_destroy(rc->part_set_map);
-
- g_free(rc->error);
-
- g_list_foreach(rc->parts, (GFunc)g_object_unref, NULL);
- g_list_free(rc->parts);
- g_list_foreach(rc->rules, (GFunc)g_object_unref, NULL);
- g_list_free(rc->rules);
-
- if (rc->system)
- xmlFreeDoc(rc->system);
- if (rc->user)
- xmlFreeDoc(rc->user);
-
- g_free(rc->priv);
-
- G_OBJECT_CLASS(parent_class)->finalize(obj);
-}
-
-/**
- * rule_context_new:
- *
- * Create a new RuleContext object.
- *
- * Return value: A new #RuleContext object.
- **/
-RuleContext *
-rule_context_new(void)
-{
- return(RuleContext *) g_object_new(RULE_TYPE_CONTEXT, NULL, NULL);
-}
-
-void
-rule_context_add_part_set(RuleContext *rc, const char *setname, GType part_type, RCPartFunc append, RCNextPartFunc next)
-{
- struct _part_set_map *map;
-
- g_assert(g_hash_table_lookup(rc->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(rc->part_set_map, map->name, map);
- rc->part_set_list = g_list_append(rc->part_set_list, map);
- d(printf("adding part set '%s'\n", setname));
-}
-
-void
-rule_context_add_rule_set(RuleContext *rc, const char *setname, GType rule_type, RCRuleFunc append, RCNextRuleFunc next)
-{
- struct _rule_set_map *map;
-
- g_assert(g_hash_table_lookup(rc->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(rc->rule_set_map, map->name, map);
- rc->rule_set_list = g_list_append(rc->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 *rc, char *error)
-{
- g_assert(rc);
-
- g_free(rc->error);
- rc->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 *rc, const char *system, const char *user)
-{
- int res;
-
- g_assert(rc);
-
- d(printf("rule_context: loading %s %s\n", system, user));
-
- rc->priv->frozen++;
- res = RULE_CONTEXT_GET_CLASS(rc)->load(rc, system, user);
- rc->priv->frozen--;
-
- return res;
-}
-
-static int
-load(RuleContext *rc, const char *system, const char *user)
-{
- xmlNodePtr set, rule, root;
- struct _part_set_map *part_map;
- struct _rule_set_map *rule_map;
- struct stat st;
-
- rule_context_set_error(rc, NULL);
-
- d(printf("loading rules %s %s\n", system, user));
-
- rc->system = xmlParseFile(system);
- if (rc->system == NULL) {
- rule_context_set_error(rc, g_strdup_printf("Unable to load system rules '%s': %s",
- system, g_strerror(errno)));
- return -1;
- }
-
- root = xmlDocGetRootElement(rc->system);
- if (root == NULL || strcmp(root->name, "filterdescription")) {
- rule_context_set_error(rc, g_strdup_printf("Unable to load system rules '%s': Invalid format", system));
- xmlFreeDoc(rc->system);
- rc->system = NULL;
- return -1;
- }
- /* doesn't matter if this doens't exist */
- rc->user = NULL;
- if (stat (user, &st) != -1 && S_ISREG (st.st_mode))
- rc->user = xmlParseFile(user);
-
- /* now parse structure */
- /* get rule parts */
- set = root->children;
- while (set) {
- d(printf("set name = %s\n", set->name));
- part_map = g_hash_table_lookup(rc->part_set_map, set->name);
- if (part_map) {
- d(printf("loading parts ...\n"));
- rule = set->children;
- while (rule) {
- if (!strcmp(rule->name, "part")) {
- FilterPart *part = FILTER_PART(g_object_new(part_map->type, NULL, NULL));
-
- if (filter_part_xml_create(part, rule) == 0) {
- part_map->append(rc, part);
- } else {
- g_object_unref(part);
- g_warning("Cannot load filter part");
- }
- }
- rule = rule->next;
- }
- } else if ((rule_map = g_hash_table_lookup(rc->rule_set_map, set->name))) {
- d(printf("loading system rules ...\n"));
- rule = set->children;
- while (rule) {
- d(printf("checking node: %s\n", rule->name));
- if (!strcmp(rule->name, "rule")) {
- FilterRule *part = FILTER_RULE(g_object_new(rule_map->type, NULL, NULL));
-
- if (filter_rule_xml_decode(part, rule, rc) == 0) {
- part->system = TRUE;
- rule_map->append(rc, part);
- } else {
- g_object_unref(part);
- g_warning("Cannot load filter part");
- }
- }
- rule = rule->next;
- }
- }
- set = set->next;
- }
-
- /* now load actual rules */
- if (rc->user) {
- root = xmlDocGetRootElement(rc->user);
- set = root?root->children:NULL;
- while (set) {
- d(printf("set name = %s\n", set->name));
- rule_map = g_hash_table_lookup(rc->rule_set_map, set->name);
- if (rule_map) {
- d(printf("loading rules ...\n"));
- rule = set->children;
- while (rule) {
- d(printf("checking node: %s\n", rule->name));
- if (!strcmp(rule->name, "rule")) {
- FilterRule *part = FILTER_RULE(g_object_new(rule_map->type, NULL, NULL));
-
- if (filter_rule_xml_decode(part, rule, rc) == 0) {
- rule_map->append(rc, part);
- } else {
- g_object_unref(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 *rc, const char *user)
-{
- g_assert(rc);
- g_assert(user);
-
- return RULE_CONTEXT_GET_CLASS(rc)->save(rc, user);
-}
-
-static int
-save(RuleContext *rc, const char *user)
-{
- xmlDocPtr doc;
- xmlNodePtr root, rules, work;
- GList *l;
- FilterRule *rule;
- struct _rule_set_map *map;
- int ret;
-
- doc = xmlNewDoc("1.0");
- /* FIXME: set character encoding to UTF-8? */
- root = xmlNewDocNode(doc, NULL, "filteroptions", NULL);
- xmlDocSetRootElement(doc, root);
- l = rc->rule_set_list;
- while (l) {
- map = l->data;
- rules = xmlNewDocNode(doc, NULL, map->name, NULL);
- xmlAddChild(root, rules);
- rule = NULL;
- while ((rule = map->next(rc, rule, NULL))) {
- if (!rule->system) {
- d(printf("processing rule %s\n", rule->name));
- work = filter_rule_xml_encode(rule);
- xmlAddChild(rules, work);
- }
- }
- l = g_list_next(l);
- }
-
- ret = e_xml_save_file(user, doc);
-
- xmlFreeDoc(doc);
-
- return ret;
-}
-
-/**
- * rule_context_revert:
- * @f:
- * @user:
- *
- * Reverts a rule context from a user description file. Assumes the
- * system description file is unchanged from when it was loaded.
- *
- * Return value:
- **/
-int
-rule_context_revert(RuleContext *rc, const char *user)
-{
- g_assert(rc);
-
- d(printf("rule_context: restoring %s %s\n", user));
-
- return RULE_CONTEXT_GET_CLASS(rc)->revert(rc, user);
-}
-
-struct _revert_data {
- GHashTable *rules;
- int rank;
-};
-
-static void
-revert_rule_remove(void *key, FilterRule *frule, RuleContext *rc)
-{
- rule_context_remove_rule(rc, frule);
- g_object_unref(frule);
-}
-
-static void
-revert_source_remove(void *key, struct _revert_data *rest_data, RuleContext *rc)
-{
- g_hash_table_foreach(rest_data->rules, (GHFunc)revert_rule_remove, rc);
- g_hash_table_destroy(rest_data->rules);
- g_free(rest_data);
-}
-
-static guint
-source_hashf(const char *a)
-{
- if (a)
- return g_str_hash(a);
- return 0;
-}
-
-static int
-source_eqf(const char *a, const char *b)
-{
- return((a && b && strcmp(a, b) == 0))
- || (a == NULL && b == NULL);
-}
-
-static int
-revert(RuleContext *rc, const char *user)
-{
- xmlNodePtr set, rule;
- /*struct _part_set_map *part_map;*/
- struct _rule_set_map *rule_map;
- struct _revert_data *rest_data;
- GHashTable *source_hash;
- xmlDocPtr userdoc;
- FilterRule *frule;
-
- rule_context_set_error(rc, NULL);
-
- d(printf("restoring rules %s %s\n", user));
-
- userdoc = xmlParseFile(user);
- if (userdoc == NULL)
- /* clear out anythign we have? */
- return 0;
-
- source_hash = g_hash_table_new((GHashFunc)source_hashf, (GCompareFunc)source_eqf);
-
- /* setup stuff we have now */
- /* Note that we assume there is only 1 set of rules in a given rule context,
- although other parts of the code dont assume this */
- frule = NULL;
- while ((frule = rule_context_next_rule(rc, frule, NULL))) {
- rest_data = g_hash_table_lookup(source_hash, frule->source);
- if (rest_data == NULL) {
- rest_data = g_malloc0(sizeof(*rest_data));
- rest_data->rules = g_hash_table_new(g_str_hash, g_str_equal);
- g_hash_table_insert(source_hash, frule->source, rest_data);
- }
- g_hash_table_insert(rest_data->rules, frule->name, frule);
- }
-
- /* make what we have, match what we load */
- set = xmlDocGetRootElement(rc->user);
- set = set?set->children:NULL;
- while (set) {
- d(printf("set name = %s\n", set->name));
- rule_map = g_hash_table_lookup(rc->rule_set_map, set->name);
- if (rule_map) {
- d(printf("loading rules ...\n"));
- rule = set->children;
- while (rule) {
- d(printf("checking node: %s\n", rule->name));
- if (!strcmp(rule->name, "rule")) {
- FilterRule *part = FILTER_RULE(g_object_new(rule_map->type, NULL, NULL));
-
- if (filter_rule_xml_decode(part, rule, rc) == 0) {
- /* use the revert data to keep track of the right rank of this rule part */
- rest_data = g_hash_table_lookup(source_hash, part->source);
- if (rest_data == NULL) {
- rest_data = g_malloc0(sizeof(*rest_data));
- rest_data->rules = g_hash_table_new(g_str_hash, g_str_equal);
- g_hash_table_insert(source_hash, part->source, rest_data);
- }
- frule = g_hash_table_lookup(rest_data->rules, part->name);
- if (frule) {
- if (rc->priv->frozen == 0 && !filter_rule_eq(frule, part))
- filter_rule_copy(frule, part);
-
- g_object_unref(part);
- rule_context_rank_rule(rc, frule, frule->source, rest_data->rank);
- g_hash_table_remove(rest_data->rules, frule->name);
- } else {
- rule_context_add_rule(rc, part);
- rule_context_rank_rule(rc, part, part->source, rest_data->rank);
- }
- rest_data->rank++;
- } else {
- g_object_unref(part);
- g_warning("Cannot load filter part");
- }
- }
- rule = rule->next;
- }
- }
- set = set->next;
- }
-
- xmlFreeDoc(userdoc);
-
- /* remove any we still have that weren't in the file */
- g_hash_table_foreach(source_hash, (GHFunc)revert_source_remove, rc);
- g_hash_table_destroy(source_hash);
-
- return 0;
-}
-
-FilterPart *
-rule_context_find_part(RuleContext *rc, const char *name)
-{
- g_assert(rc);
- g_assert(name);
-
- d(printf("find part : "));
- return filter_part_find_list(rc->parts, name);
-}
-
-FilterPart *
-rule_context_create_part(RuleContext *rc, const char *name)
-{
- FilterPart *part;
-
- g_assert(rc);
- g_assert(name);
-
- if ((part = rule_context_find_part(rc, name)))
- return filter_part_clone(part);
-
- return NULL;
-}
-
-FilterPart *
-rule_context_next_part(RuleContext *rc, FilterPart *last)
-{
- g_assert(rc);
-
- return filter_part_next_list(rc->parts, last);
-}
-
-FilterRule *
-rule_context_next_rule(RuleContext *rc, FilterRule *last, const char *source)
-{
- g_assert(rc);
-
- return filter_rule_next_list(rc->rules, last, source);
-}
-
-FilterRule *
-rule_context_find_rule(RuleContext *rc, const char *name, const char *source)
-{
- g_assert(name);
- g_assert(rc);
-
- return filter_rule_find_list(rc->rules, name, source);
-}
-
-void
-rule_context_add_part(RuleContext *rc, FilterPart *part)
-{
- g_assert(rc);
- g_assert(part);
-
- rc->parts = g_list_append(rc->parts, part);
-}
-
-void
-rule_context_add_rule(RuleContext *rc, FilterRule *new)
-{
- g_assert(rc);
- g_assert(new);
-
- d(printf("add rule '%s'\n", new->name));
-
- rc->rules = g_list_append(rc->rules, new);
-
- if (rc->priv->frozen == 0) {
- g_signal_emit(rc, signals[RULE_ADDED], 0, new);
- g_signal_emit(rc, signals[CHANGED], 0);
- }
-}
-
-static void
-new_rule_response(GtkWidget *dialog, int button, RuleContext *context)
-{
- if (button == GTK_RESPONSE_ACCEPT) {
- FilterRule *rule = g_object_get_data((GObject *) dialog, "rule");
- char *user = g_object_get_data((GObject *) dialog, "path");
-
- if (!filter_rule_validate(rule)) {
- /* no need to popup a dialog because the validate code does that. */
- return;
- }
-
- if (rule_context_find_rule (context, rule->name, rule->source)) {
- dialog = gtk_message_dialog_new ((GtkWindow *) dialog, GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
- _("Rule name '%s' is not unique, choose another."),
- rule->name);
-
- gtk_dialog_run ((GtkDialog *) dialog);
- gtk_widget_destroy (dialog);
-
- return;
- }
-
- g_object_ref(rule);
- rule_context_add_rule(context, rule);
- if (user)
- rule_context_save(context, user);
- }
-
- gtk_widget_destroy(dialog);
-}
-
-/* add a rule, with a gui, asking for confirmation first ... optionally save to path */
-void
-rule_context_add_rule_gui(RuleContext *rc, FilterRule *rule, const char *title, const char *path)
-{
- GtkDialog *dialog;
- GtkWidget *widget;
-
- d(printf("add rule gui '%s'\n", rule->name));
-
- g_assert(rc);
- g_assert(rule);
-
- widget = filter_rule_get_widget(rule, rc);
- gtk_widget_show(widget);
-
- dialog =(GtkDialog *) gtk_dialog_new();
- gtk_dialog_add_buttons(dialog,
- GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
- GTK_STOCK_OK, GTK_RESPONSE_ACCEPT,
- NULL);
-
- gtk_window_set_title((GtkWindow *) dialog, title);
- gtk_window_set_default_size((GtkWindow *) dialog, 600, 400);
- gtk_window_set_resizable((GtkWindow *) dialog, TRUE);
-
- gtk_box_pack_start((GtkBox *) dialog->vbox, widget, TRUE, TRUE, 0);
-
- g_object_set_data_full((GObject *) dialog, "rule", rule, g_object_unref);
- if (path)
- g_object_set_data_full((GObject *) dialog, "path", g_strdup(path), g_free);
-
- g_signal_connect(dialog, "response", G_CALLBACK(new_rule_response), rc);
-
- g_object_ref(rc);
-
- g_object_set_data_full((GObject *) dialog, "context", rc, g_object_unref);
-
- gtk_widget_show((GtkWidget *) dialog);
-}
-
-void
-rule_context_remove_rule(RuleContext *rc, FilterRule *rule)
-{
- g_assert(rc);
- g_assert(rule);
-
- d(printf("remove rule '%s'\n", rule->name));
-
- rc->rules = g_list_remove(rc->rules, rule);
-
- if (rc->priv->frozen == 0) {
- g_signal_emit(rc, signals[RULE_REMOVED], 0, rule);
- g_signal_emit(rc, signals[CHANGED], 0);
- }
-}
-
-void
-rule_context_rank_rule(RuleContext *rc, FilterRule *rule, const char *source, int rank)
-{
- GList *node;
- int i = 0, index = 0;
-
- g_assert(rc);
- g_assert(rule);
-
- if (rule_context_get_rank_rule (rc, rule, source) == rank)
- return;
-
- rc->rules = g_list_remove(rc->rules, rule);
- node = rc->rules;
- while (node) {
- FilterRule *r = node->data;
-
- if (i == rank) {
- rc->rules = g_list_insert(rc->rules, rule, index);
- if (rc->priv->frozen == 0)
- g_signal_emit(rc, signals[CHANGED], 0);
-
- return;
- }
-
- index++;
- if (source == NULL || (r->source && strcmp(r->source, source) == 0))
- i++;
-
- node = node->next;
- }
-
- rc->rules = g_list_append(rc->rules, rule);
- if (rc->priv->frozen == 0)
- g_signal_emit(rc, signals[CHANGED], 0);
-}
-
-int
-rule_context_get_rank_rule(RuleContext *rc, FilterRule *rule, const char *source)
-{
- GList *node;
- int i = 0;
-
- g_assert(rc);
- g_assert(rule);
-
- d(printf("getting rank of rule '%s'\n", rule->name));
-
- node = rc->rules;
- while (node) {
- FilterRule *r = node->data;
-
- d(printf(" checking against rule '%s' rank '%d'\n", r->name, i));
-
- if (r == rule)
- return i;
-
- if (source == NULL || (r->source && strcmp(r->source, source) == 0))
- i++;
-
- node = node->next;
- }
-
- return -1;
-}
-
-FilterRule *
-rule_context_find_rank_rule(RuleContext *rc, int rank, const char *source)
-{
- GList *node;
- int i = 0;
-
- g_assert(rc);
-
- d(printf("getting rule at rank %d source '%s'\n", rank, source?source:"<any>"));
-
- node = rc->rules;
- while (node) {
- FilterRule *r = node->data;
-
- d(printf(" checking against rule '%s' rank '%d'\n", r->name, i));
-
- if (source == NULL || (r->source && strcmp(r->source, source) == 0)) {
- if (rank == i)
- return r;
- i++;
- }
-
- node = node->next;
- }
-
- return NULL;
-}
-
-static GList *
-delete_uri(RuleContext *rc, const char *uri, GCompareFunc cmp)
-{
- return NULL;
-}
-
-GList *
-rule_context_delete_uri(RuleContext *rc, const char *uri, GCompareFunc cmp)
-{
- return RULE_CONTEXT_GET_CLASS(rc)->delete_uri(rc, uri, cmp);
-}
-
-static GList *
-rename_uri(RuleContext *rc, const char *olduri, const char *newuri, GCompareFunc cmp)
-{
- return NULL;
-}
-
-GList *
-rule_context_rename_uri(RuleContext *rc, const char *olduri, const char *newuri, GCompareFunc cmp)
-{
- return RULE_CONTEXT_GET_CLASS(rc)->rename_uri(rc, olduri, newuri, cmp);
-}
-
-void
-rule_context_free_uri_list(RuleContext *rc, GList *uris)
-{
- GList *l = uris, *n;
-
- /* TODO: should be virtual */
-
- while (l) {
- n = l->next;
- g_free(l->data);
- g_list_free_1(l);
- l = n;
- }
-}
diff --git a/filter/rule-context.h b/filter/rule-context.h
deleted file mode 100644
index f2192f4596..0000000000
--- a/filter/rule-context.h
+++ /dev/null
@@ -1,136 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-
-#ifndef _RULE_CONTEXT_H
-#define _RULE_CONTEXT_H
-
-#include <glib.h>
-#include <glib-object.h>
-#include <libxml/parser.h>
-
-#include "filter-part.h"
-#include "filter-rule.h"
-
-#define RULE_TYPE_CONTEXT (rule_context_get_type ())
-#define RULE_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RULE_TYPE_CONTEXT, RuleContext))
-#define RULE_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RULE_TYPE_CONTEXT, RuleContextClass))
-#define IS_RULE_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RULE_TYPE_CONTEXT))
-#define IS_RULE_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RULE_TYPE_CONTEXT))
-#define RULE_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RULE_TYPE_CONTEXT, RuleContextClass))
-
-typedef struct _RuleContext RuleContext;
-typedef struct _RuleContextClass RuleContextClass;
-
-struct _RuleContext {
- GObject parent_object;
- 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 *rc, FilterRule *rule, gpointer user_data);
-
-struct _RuleContextClass {
- GObjectClass parent_class;
-
- /* virtual methods */
- int (*load) (RuleContext *rc, const char *system, const char *user);
- int (*save) (RuleContext *rc, const char *user);
- int (*revert) (RuleContext *rc, const char *user);
-
- GList *(*delete_uri) (RuleContext *rc, const char *uri, GCompareFunc cmp);
- GList *(*rename_uri) (RuleContext *rc, const char *olduri, const char *newuri, GCompareFunc cmp);
-
- /* signals */
- void (*rule_added) (RuleContext *rc, FilterRule *rule);
- void (*rule_removed) (RuleContext *rc, FilterRule *rule);
- void (*changed) (RuleContext *rc);
-};
-
-typedef void (*RCPartFunc) (RuleContext *rc, FilterPart *part);
-typedef void (*RCRuleFunc) (RuleContext *rc, FilterRule *part);
-typedef FilterPart * (*RCNextPartFunc) (RuleContext *rc, FilterPart *part);
-typedef FilterRule * (*RCNextRuleFunc) (RuleContext *rc, FilterRule *rule, const char *source);
-
-struct _part_set_map {
- char *name;
- GType type;
- RCPartFunc append;
- RCNextPartFunc next;
-};
-
-struct _rule_set_map {
- char *name;
- GType type;
- RCRuleFunc append;
- RCNextRuleFunc next;
-};
-
-GType rule_context_get_type (void);
-RuleContext *rule_context_new (void);
-
-/* methods */
-int rule_context_load (RuleContext *rc, const char *system, const char *user);
-int rule_context_save (RuleContext *rc, const char *user);
-int rule_context_revert (RuleContext *rc, const char *user);
-
-void rule_context_add_part (RuleContext *rc, FilterPart *new);
-FilterPart *rule_context_find_part (RuleContext *rc, const char *name);
-FilterPart *rule_context_create_part (RuleContext *rc, const char *name);
-FilterPart *rule_context_next_part (RuleContext *rc, FilterPart *last);
-
-FilterRule *rule_context_next_rule (RuleContext *rc, FilterRule *last, const char *source);
-FilterRule *rule_context_find_rule (RuleContext *rc, const char *name, const char *source);
-FilterRule *rule_context_find_rank_rule (RuleContext *rc, int rank, const char *source);
-void rule_context_add_rule (RuleContext *rc, FilterRule *new);
-void rule_context_add_rule_gui (RuleContext *rc, FilterRule *rule, const char *title, const char *path);
-void rule_context_remove_rule (RuleContext *rc, FilterRule *rule);
-
-/* get/set the rank (position) of a rule */
-void rule_context_rank_rule (RuleContext *rc, FilterRule *rule, const char *source, int rank);
-int rule_context_get_rank_rule (RuleContext *rc, FilterRule *rule, const char *source);
-
-/* setup type for set parts */
-void rule_context_add_part_set (RuleContext *rc, const char *setname, GType part_type,
- RCPartFunc append, RCNextPartFunc next);
-void rule_context_add_rule_set (RuleContext *rc, const char *setname, GType rule_type,
- RCRuleFunc append, RCNextRuleFunc next);
-
-/* uri's disappear/renamed externally */
-GList *rule_context_delete_uri (RuleContext *rc, const char *uri, GCompareFunc cmp);
-GList *rule_context_rename_uri (RuleContext *rc, const char *olduri, const char *newuri, GCompareFunc cmp);
-
-void rule_context_free_uri_list (RuleContext *rc, GList *uris);
-
-#endif /* ! _RULE_CONTEXT_H */
diff --git a/filter/rule-editor.c b/filter/rule-editor.c
deleted file mode 100644
index 24a2cc2279..0000000000
--- a/filter/rule-editor.c
+++ /dev/null
@@ -1,751 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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
-
-/* for getenv only, remove when getenv need removed */
-#include <stdlib.h>
-
-#include <libgnome/gnome-i18n.h>
-
-#include "rule-editor.h"
-
-static int enable_undo = 0;
-
-void rule_editor_add_undo (RuleEditor *re, int type, FilterRule *rule, int rank, int newrank);
-void rule_editor_play_undo (RuleEditor *re);
-
-#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 *klass);
-static void rule_editor_init (RuleEditor *re);
-static void rule_editor_finalise (GObject *obj);
-static void rule_editor_destroy (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 GtkDialogClass *parent_class = NULL;
-
-
-GtkType
-rule_editor_get_type (void)
-{
- static GtkType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (RuleEditorClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) rule_editor_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (RuleEditor),
- 0, /* n_preallocs */
- (GInstanceInitFunc) rule_editor_init,
- };
-
- /* TODO: Remove when it works (or never will) */
- enable_undo = getenv ("EVOLUTION_RULE_UNDO") != NULL;
-
- type = g_type_register_static (gtk_dialog_get_type (), "RuleEditor", &info, 0);
- }
-
- return type;
-}
-
-static void
-rule_editor_class_init (RuleEditorClass *klass)
-{
- GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- GtkObjectClass *object_class = (GtkObjectClass *) klass;
-
- parent_class = g_type_class_ref(gtk_dialog_get_type ());
-
- gobject_class->finalize = rule_editor_finalise;
- object_class->destroy = rule_editor_destroy;
-
- /* override methods */
- klass->set_source = set_source;
- klass->set_sensitive = set_sensitive;
- klass->create_rule = create_rule;
-}
-
-static void
-rule_editor_init (RuleEditor *re)
-{
- re->priv = g_malloc0 (sizeof (*re->priv));
-}
-
-static void
-rule_editor_finalise (GObject *obj)
-{
- RuleEditor *re = (RuleEditor *)obj;
- RuleEditorUndo *undo, *next;
-
- g_object_unref (re->context);
- g_free (re->priv);
-
- undo = re->undo_log;
- while (undo) {
- next = undo->next;
- g_object_unref (undo->rule);
- g_free (undo);
- undo = next;
- }
-
- G_OBJECT_CLASS (parent_class)->finalize (obj);
-}
-
-static void
-rule_editor_destroy (GtkObject *obj)
-{
- RuleEditor *re = (RuleEditor *) obj;
-
- if (re->dialog) {
- gtk_widget_destroy (GTK_WIDGET (re->dialog));
- re->dialog = NULL;
- }
-
- ((GtkObjectClass *)(parent_class))->destroy (obj);
-}
-
-/**
- * rule_editor_new:
- *
- * Create a new RuleEditor object.
- *
- * Return value: A new #RuleEditor object.
- **/
-RuleEditor *
-rule_editor_new (RuleContext *rc, const char *source)
-{
- RuleEditor *re = (RuleEditor *) g_object_new (RULE_TYPE_EDITOR, NULL);
- GladeXML *gui;
- GtkWidget *w;
-
- gui = glade_xml_new (FILTER_GLADEDIR "/filter.glade", "rule_editor", NULL);
- rule_editor_construct (re, rc, gui, source);
-
- w = glade_xml_get_widget (gui, "rule_frame");
- gtk_frame_set_label ((GtkFrame *) w, _("Rules"));
-
- g_object_unref (gui);
-
- return re;
-}
-
-/* used internally by implementations if required */
-void
-rule_editor_set_sensitive (RuleEditor *re)
-{
- RULE_EDITOR_GET_CLASS (re)->set_sensitive (re);
-}
-
-/* used internally by implementations */
-void
-rule_editor_set_source (RuleEditor *re, const char *source)
-{
- RULE_EDITOR_GET_CLASS (re)->set_source (re, source);
-}
-
-/* factory method for "add" button */
-FilterRule *
-rule_editor_create_rule (RuleEditor *re)
-{
- return RULE_EDITOR_GET_CLASS (re)->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
-editor_destroy (RuleEditor *re, GObject *deadbeef)
-{
- if (re->edit) {
- g_object_unref (re->edit);
- re->edit = NULL;
- }
-
- re->dialog = NULL;
-
- gtk_widget_set_sensitive (GTK_WIDGET (re), TRUE);
- rule_editor_set_sensitive (re);
-}
-
-static void
-add_editor_response (GtkWidget *dialog, int button, RuleEditor *re)
-{
- GtkTreeSelection *selection;
- GtkTreePath *path;
- GtkTreeIter iter;
-
- if (button == GTK_RESPONSE_ACCEPT) {
- if (!filter_rule_validate (re->edit)) {
- /* no need to popup a dialog because the validate code does that. */
- return;
- }
-
- if (rule_context_find_rule (re->context, re->edit->name, re->edit->source)) {
- dialog = gtk_message_dialog_new ((GtkWindow *) dialog, GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
- _("Rule name '%s' is not unique, choose another."),
- re->edit->name);
-
- gtk_dialog_run ((GtkDialog *) dialog);
- gtk_widget_destroy (dialog);
-
- return;
- }
-
- g_object_ref (re->edit);
-
- gtk_list_store_append (re->model, &iter);
- gtk_list_store_set (re->model, &iter, 0, re->edit->name, 1, re->edit, -1);
- selection = gtk_tree_view_get_selection (re->list);
- gtk_tree_selection_select_iter (selection, &iter);
-
- /* scroll to the newly added row */
- path = gtk_tree_model_get_path ((GtkTreeModel *) re->model, &iter);
- gtk_tree_view_scroll_to_cell (re->list, path, NULL, TRUE, 1.0, 0.0);
- gtk_tree_path_free (path);
-
- re->current = re->edit;
- rule_context_add_rule (re->context, re->current);
-
- g_object_ref (re->current);
- rule_editor_add_undo (re, RULE_EDITOR_LOG_ADD, re->current,
- rule_context_get_rank_rule (re->context, re->current, re->current->source), 0);
- }
-
- gtk_widget_destroy (dialog);
-}
-
-static void
-rule_add (GtkWidget *widget, RuleEditor *re)
-{
- GtkWidget *rules;
-
- if (re->edit != NULL)
- return;
-
- re->edit = rule_editor_create_rule (re);
- filter_rule_set_source (re->edit, re->source);
- rules = filter_rule_get_widget (re->edit, re->context);
-
- re->dialog = gtk_dialog_new ();
- gtk_dialog_add_buttons ((GtkDialog *) re->dialog,
- GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
- GTK_STOCK_OK, GTK_RESPONSE_ACCEPT,
- NULL);
-
- gtk_window_set_title ((GtkWindow *) re->dialog, _("Add Rule"));
- gtk_window_set_default_size (GTK_WINDOW (re->dialog), 650, 400);
- gtk_window_set_resizable (GTK_WINDOW (re->dialog), TRUE);
- gtk_window_set_transient_for ((GtkWindow *) re->dialog, (GtkWindow *) re);
- gtk_container_set_border_width ((GtkContainer *) re->dialog, 6);
-
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (re->dialog)->vbox), rules, TRUE, TRUE, 3);
-
- g_signal_connect (re->dialog, "response", G_CALLBACK (add_editor_response), re);
- g_object_weak_ref ((GObject *) re->dialog, (GWeakNotify) editor_destroy, re);
-
- gtk_widget_set_sensitive (GTK_WIDGET (re), FALSE);
-
- gtk_widget_show (re->dialog);
-}
-
-static void
-edit_editor_response (GtkWidget *dialog, int button, RuleEditor *re)
-{
- FilterRule *rule;
- GtkTreePath *path;
- GtkTreeIter iter;
- int pos;
-
- if (button == GTK_RESPONSE_ACCEPT) {
- if (!filter_rule_validate (re->edit)) {
- /* no need to popup a dialog because the validate code does that. */
- return;
- }
-
- rule = rule_context_find_rule (re->context, re->edit->name, re->edit->source);
- if (rule != NULL && rule != re->current) {
- dialog = gtk_message_dialog_new ((GtkWindow *) dialog,
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
- _("Rule name '%s' is not unique, choose another."),
- re->edit->name);
-
- gtk_dialog_run ((GtkDialog *) dialog);
- gtk_widget_destroy (dialog);
-
- return;
- }
-
- pos = rule_context_get_rank_rule (re->context, re->current, re->source);
- if (pos != -1) {
- path = gtk_tree_path_new ();
- gtk_tree_path_append_index (path, pos);
- gtk_tree_model_get_iter (GTK_TREE_MODEL (re->model), &iter, path);
- gtk_tree_path_free (path);
-
- gtk_list_store_set (re->model, &iter, 0, re->edit->name, -1);
-
- rule_editor_add_undo (re, RULE_EDITOR_LOG_EDIT, filter_rule_clone (re->current),
- pos, 0);
-
- /* replace the old rule with the new rule */
- filter_rule_copy (re->current, re->edit);
- }
- }
-
- gtk_widget_destroy (dialog);
-}
-
-static void
-rule_edit (GtkWidget *widget, RuleEditor *re)
-{
- GtkWidget *rules;
-
- if (re->current == NULL || re->edit != NULL)
- return;
-
- re->edit = filter_rule_clone (re->current);
-
- rules = filter_rule_get_widget (re->edit, re->context);
-
- re->dialog = gtk_dialog_new ();
- gtk_dialog_add_buttons ((GtkDialog *) re->dialog,
- GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
- GTK_STOCK_OK, GTK_RESPONSE_ACCEPT,
- NULL);
-
- gtk_window_set_title ((GtkWindow *) re->dialog, _("Edit Rule"));
- gtk_window_set_default_size (GTK_WINDOW (re->dialog), 650, 400);
- gtk_window_set_resizable (GTK_WINDOW (re->dialog), TRUE);
- gtk_widget_set_parent_window (GTK_WIDGET (re->dialog), GTK_WIDGET (re)->window);
- gtk_container_set_border_width ((GtkContainer *) re->dialog, 6);
-
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (re->dialog)->vbox), rules, TRUE, TRUE, 3);
-
- g_signal_connect (re->dialog, "response", G_CALLBACK (edit_editor_response), re);
- g_object_weak_ref ((GObject *) re->dialog, (GWeakNotify) editor_destroy, re);
-
- gtk_widget_set_sensitive (GTK_WIDGET (re), FALSE);
-
- gtk_widget_show (re->dialog);
-}
-
-static void
-rule_delete (GtkWidget *widget, RuleEditor *re)
-{
- GtkTreeSelection *selection;
- GtkTreePath *path;
- GtkTreeIter iter;
- int pos, len;
-
- d(printf ("delete rule\n"));
- pos = rule_context_get_rank_rule (re->context, re->current, re->source);
- if (pos != -1) {
- rule_context_remove_rule (re->context, re->current);
-
- path = gtk_tree_path_new ();
- gtk_tree_path_append_index (path, pos);
- gtk_tree_model_get_iter (GTK_TREE_MODEL (re->model), &iter, path);
- gtk_list_store_remove (re->model, &iter);
- gtk_tree_path_free (path);
-
- rule_editor_add_undo (re, RULE_EDITOR_LOG_REMOVE, re->current,
- rule_context_get_rank_rule (re->context, re->current, re->current->source), 0);
-#if 0
- g_object_unref (re->current);
-#endif
- re->current = NULL;
-
- /* now select the next rule */
- len = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (re->model), NULL);
- pos = pos >= len ? len - 1 : pos;
-
- if (pos >= 0) {
- path = gtk_tree_path_new ();
- gtk_tree_path_append_index (path, pos);
- gtk_tree_model_get_iter (GTK_TREE_MODEL (re->model), &iter, path);
- gtk_tree_path_free (path);
-
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (re->list));
- gtk_tree_selection_select_iter (selection, &iter);
-
- /* scroll to the selected row */
- path = gtk_tree_model_get_path ((GtkTreeModel *) re->model, &iter);
- gtk_tree_view_scroll_to_cell (re->list, path, NULL, FALSE, 0.0, 0.0);
- gtk_tree_path_free (path);
- }
- }
-
- rule_editor_set_sensitive (re);
-}
-
-static void
-rule_move (RuleEditor *re, int from, int to)
-{
- GtkTreeSelection *selection;
- GtkTreePath *path;
- GtkTreeIter iter;
- FilterRule *rule;
-
- g_object_ref (re->current);
- rule_editor_add_undo (re, RULE_EDITOR_LOG_RANK, re->current,
- rule_context_get_rank_rule (re->context, re->current, re->source), to);
-
- d(printf ("moving %d to %d\n", from, to));
- rule_context_rank_rule (re->context, re->current, re->source, to);
-
- path = gtk_tree_path_new ();
- gtk_tree_path_append_index (path, from);
- gtk_tree_model_get_iter (GTK_TREE_MODEL (re->model), &iter, path);
- gtk_tree_path_free (path);
-
- gtk_tree_model_get (GTK_TREE_MODEL (re->model), &iter, 1, &rule, -1);
- g_assert (rule != NULL);
-
- /* remove and then re-insert the row at the new location */
- gtk_list_store_remove (re->model, &iter);
- gtk_list_store_insert (re->model, &iter, to);
-
- /* set the data on the row */
- gtk_list_store_set (re->model, &iter, 0, rule->name, 1, rule, -1);
-
- /* select the row */
- selection = gtk_tree_view_get_selection (re->list);
- gtk_tree_selection_select_iter (selection, &iter);
-
- /* scroll to the selected row */
- path = gtk_tree_model_get_path ((GtkTreeModel *) re->model, &iter);
- gtk_tree_view_scroll_to_cell (re->list, path, NULL, FALSE, 0.0, 0.0);
- gtk_tree_path_free (path);
-
- 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", G_CALLBACK (rule_add) },
- { "rule_edit", G_CALLBACK (rule_edit) },
- { "rule_delete", G_CALLBACK (rule_delete) },
- { "rule_up", G_CALLBACK (rule_up) },
- { "rule_down", G_CALLBACK (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
-cursor_changed (GtkTreeView *treeview, RuleEditor *re)
-{
- GtkTreeSelection *selection;
- GtkTreeModel *model;
- GtkTreeIter iter;
-
- selection = gtk_tree_view_get_selection (re->list);
- if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
- gtk_tree_model_get (GTK_TREE_MODEL (re->model), &iter, 1, &re->current, -1);
-
- g_assert (re->current);
-
- rule_editor_set_sensitive (re);
- }
-}
-
-static void
-double_click (GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *column, RuleEditor *re)
-{
- if (re->current)
- rule_edit ((GtkWidget *) treeview, re);
-}
-
-static void
-set_source (RuleEditor *re, const char *source)
-{
- FilterRule *rule = NULL;
- GtkTreeIter iter;
-
- gtk_list_store_clear (re->model);
-
- d(printf("Checking for rules that are of type %s\n", source ? source : "<nil>"));
- while ((rule = rule_context_next_rule (re->context, rule, source)) != NULL) {
- d(printf("Adding row '%s'\n", rule->name));
- gtk_list_store_append (re->model, &iter);
- gtk_list_store_set (re->model, &iter, 0, rule->name, 1, rule, -1);
- }
-
- g_free (re->source);
- re->source = g_strdup (source);
- re->current = NULL;
- rule_editor_set_sensitive (re);
-}
-
-void
-rule_editor_add_undo (RuleEditor *re, int type, FilterRule *rule, int rank, int newrank)
-{
- RuleEditorUndo *undo;
-
- if (!re->undo_active && enable_undo) {
- undo = g_malloc0 (sizeof (*undo));
- undo->rule = rule;
- undo->type = type;
- undo->rank = rank;
- undo->newrank = newrank;
-
- undo->next = re->undo_log;
- re->undo_log = undo;
- } else {
- g_object_unref (rule);
- }
-}
-
-void
-rule_editor_play_undo (RuleEditor *re)
-{
- RuleEditorUndo *undo, *next;
- FilterRule *rule;
-
- re->undo_active = TRUE;
- undo = re->undo_log;
- re->undo_log = NULL;
- while (undo) {
- next = undo->next;
- switch (undo->type) {
- case RULE_EDITOR_LOG_EDIT:
- d(printf ("Undoing edit on rule '%s'\n", undo->rule->name));
- rule = rule_context_find_rank_rule (re->context, undo->rank, undo->rule->source);
- if (rule) {
- d(printf (" name was '%s'\n", rule->name));
- filter_rule_copy (rule, undo->rule);
- d(printf (" name is '%s'\n", rule->name));
- } else {
- g_warning ("Could not find the right rule to undo against?");
- }
- break;
- case RULE_EDITOR_LOG_ADD:
- d(printf ("Undoing add on rule '%s'\n", undo->rule->name));
- rule = rule_context_find_rank_rule (re->context, undo->rank, undo->rule->source);
- if (rule)
- rule_context_remove_rule (re->context, rule);
- break;
- case RULE_EDITOR_LOG_REMOVE:
- d(printf ("Undoing remove on rule '%s'\n", undo->rule->name));
- g_object_ref (undo->rule);
- rule_context_add_rule (re->context, undo->rule);
- rule_context_rank_rule (re->context, undo->rule, re->source, undo->rank);
- break;
- case RULE_EDITOR_LOG_RANK:
- rule = rule_context_find_rank_rule (re->context, undo->newrank, undo->rule->source);
- if (rule)
- rule_context_rank_rule (re->context, rule, re->source, undo->rank);
- break;
- }
-
- g_object_unref (undo->rule);
- g_free (undo);
- undo = next;
- }
- re->undo_active = FALSE;
-}
-
-static void
-editor_response (GtkWidget *dialog, int button, RuleEditor *re)
-{
- if (button == GTK_RESPONSE_REJECT) {
- if (enable_undo)
- rule_editor_play_undo (re);
- else {
- RuleEditorUndo *undo, *next;
-
- undo = re->undo_log;
- re->undo_log = 0;
- while (undo) {
- next = undo->next;
- g_object_unref (undo->rule);
- g_free (undo);
- undo = next;
- }
- }
- }
-}
-
-GtkWidget *rule_editor_treeview_new (char *widget_name, char *string1, char *string2,
- int int1, int int2);
-
-GtkWidget *
-rule_editor_treeview_new (char *widget_name, char *string1, char *string2, int int1, int int2)
-{
- GtkWidget *table, *scrolled;
- GtkTreeSelection *selection;
- GtkCellRenderer *renderer;
- GtkListStore *model;
-
- scrolled = gtk_scrolled_window_new (NULL, NULL);
- gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled), GTK_SHADOW_IN);
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled),
- GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-
- model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_POINTER);
- table = gtk_tree_view_new_with_model ((GtkTreeModel *) model);
- gtk_tree_view_set_headers_visible ((GtkTreeView *) table, FALSE);
-
- renderer = gtk_cell_renderer_text_new ();
- gtk_tree_view_insert_column_with_attributes ((GtkTreeView *) table, -1,
- _("Rule name"), renderer,
- "text", 0, NULL);
-
- selection = gtk_tree_view_get_selection ((GtkTreeView *) table);
- gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
-
- gtk_container_add (GTK_CONTAINER (scrolled), table);
-
- g_object_set_data ((GObject *) scrolled, "table", table);
- g_object_set_data ((GObject *) scrolled, "model", model);
-
- gtk_widget_show (scrolled);
- gtk_widget_show (table);
-
- return scrolled;
-}
-
-void
-rule_editor_construct (RuleEditor *re, RuleContext *context, GladeXML *gui, const char *source)
-{
- GtkWidget *w;
- int i;
-
- re->context = context;
- g_object_ref (context);
-
- gtk_window_set_resizable ((GtkWindow *) re, TRUE);
- gtk_window_set_default_size ((GtkWindow *) re, 350, 400);
- gtk_container_set_border_width ((GtkContainer *) re, 6);
-
- w = glade_xml_get_widget (gui, "rule_editor");
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (re)->vbox), w, TRUE, TRUE, 3);
-
- for (i = 0; i < BUTTON_LAST; i++) {
- re->priv->buttons[i] = (GtkButton *) w = glade_xml_get_widget (gui, edit_buttons[i].name);
- g_signal_connect (w, "clicked", edit_buttons[i].func, re);
- }
-
- w = glade_xml_get_widget (gui, "rule_list");
- re->list = (GtkTreeView *) g_object_get_data ((GObject *) w, "table");
- re->model = (GtkListStore *) g_object_get_data ((GObject *) w, "model");
-
- g_signal_connect (re->list, "cursor-changed", G_CALLBACK (cursor_changed), re);
- g_signal_connect (re->list, "row-activated", G_CALLBACK (double_click), re);
-
- g_signal_connect (re, "response", G_CALLBACK (editor_response), re);
- rule_editor_set_source (re, source);
-
- if (enable_undo) {
- gtk_dialog_add_buttons ((GtkDialog *) re,
- GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
- GTK_STOCK_OK, GTK_RESPONSE_ACCEPT,
- NULL);
- } else {
- gtk_dialog_add_buttons ((GtkDialog *) re,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_OK, GTK_RESPONSE_ACCEPT,
- NULL);
- }
-}
diff --git a/filter/rule-editor.h b/filter/rule-editor.h
deleted file mode 100644
index d2e9797e46..0000000000
--- a/filter/rule-editor.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-
-#ifndef _RULE_EDITOR_H
-#define _RULE_EDITOR_H
-
-#include <gtk/gtk.h>
-#include <glade/glade.h>
-
-#include "rule-context.h"
-#include "filter-rule.h"
-
-#define RULE_TYPE_EDITOR (rule_editor_get_type ())
-#define RULE_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RULE_TYPE_EDITOR, RuleEditor))
-#define RULE_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RULE_TYPE_EDITOR, RuleEditorClass))
-#define IS_RULE_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RULE_TYPE_EDITOR))
-#define IS_RULE_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RULE_TYPE_EDITOR))
-#define RULE_EDITOR_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), RULE_TYPE_EDITOR, RuleEditorClass))
-
-typedef struct _RuleEditor RuleEditor;
-typedef struct _RuleEditorClass RuleEditorClass;
-typedef struct _RuleEditorUndo RuleEditorUndo;
-
-struct _RuleEditor {
- GtkDialog parent_object;
-
- GtkListStore *model;
- GtkTreeView *list;
-
- RuleContext *context;
- FilterRule *current;
- FilterRule *edit; /* for editing/adding rules, so we only do 1 at a time */
-
- GtkWidget *dialog;
-
- char *source;
-
- struct _RuleEditorUndo *undo_log; /* cancel/undo log */
- unsigned int undo_active:1; /* we're performing undo */
-
- struct _RuleEditorPrivate *priv;
-};
-
-struct _RuleEditorClass {
- GtkDialogClass parent_class;
-
- /* virtual methods */
- void (*set_sensitive) (RuleEditor *);
- void (*set_source) (RuleEditor *, const char *source);
-
- FilterRule *(*create_rule) (RuleEditor *);
-
- /* signals */
-};
-
-enum {
- RULE_EDITOR_LOG_EDIT,
- RULE_EDITOR_LOG_ADD,
- RULE_EDITOR_LOG_REMOVE,
- RULE_EDITOR_LOG_RANK,
-};
-
-struct _RuleEditorUndo {
- struct _RuleEditorUndo *next;
-
- unsigned int type;
- FilterRule *rule;
- int rank;
- int newrank;
-};
-
-GtkType rule_editor_get_type (void);
-RuleEditor *rule_editor_new (struct _RuleContext *, const char *source);
-void rule_editor_construct (RuleEditor *re, RuleContext *context, 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 dd3663ffab..0000000000
--- a/filter/score-context.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 "score-context.h"
-#include "score-rule.h"
-
-
-static void score_context_class_init (ScoreContextClass *klass);
-static void score_context_init (ScoreContext *sc);
-static void score_context_finalise (GObject *obj);
-
-
-static RuleContextClass *parent_class = NULL;
-
-
-GType
-score_context_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (ScoreContextClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) score_context_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (ScoreContext),
- 0, /* n_preallocs */
- (GInstanceInitFunc) score_context_init,
- };
-
- type = g_type_register_static (RULE_TYPE_CONTEXT, "ScoreContext", &info, 0);
- }
-
- return type;
-}
-
-static void
-score_context_class_init (ScoreContextClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_ref (rule_context_get_type ());
-
- object_class->finalize = score_context_finalise;
-}
-
-static void
-score_context_init (ScoreContext *sc)
-{
- rule_context_add_part_set ((RuleContext *) sc, "partset", filter_part_get_type (),
- rule_context_add_part, rule_context_next_part);
-
- rule_context_add_rule_set ((RuleContext *) sc, "ruleset", score_rule_get_type (),
- rule_context_add_rule, rule_context_next_rule);
-}
-
-static void
-score_context_finalise (GObject *obj)
-{
- G_OBJECT_CLASS (parent_class)->finalize (obj);
-}
-
-/**
- * score_context_new:
- *
- * Create a new ScoreContext object.
- *
- * Return value: A new #ScoreContext object.
- **/
-ScoreContext *
-score_context_new (void)
-{
- return (ScoreContext *) g_object_new (SCORE_TYPE_CONTEXT, NULL, NULL);
-}
diff --git a/filter/score-context.h b/filter/score-context.h
deleted file mode 100644
index 7a76ac8d32..0000000000
--- a/filter/score-context.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef _SCORE_CONTEXT_H
-#define _SCORE_CONTEXT_H
-
-#include "rule-context.h"
-
-#define SCORE_TYPE_CONTEXT (score_context_get_type ())
-#define SCORE_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SCORE_TYPE_CONTEXT, ScoreContext))
-#define SCORE_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SCORE_TYPE_CONTEXT, ScoreContextClass))
-#define IS_SCORE_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SCORE_TYPE_CONTEXT))
-#define IS_SCORE_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SCORE_TYPE_CONTEXT))
-#define SCORE_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SCORE_TYPE_CONTEXT, ScoreContextClass))
-
-typedef struct _ScoreContext ScoreContext;
-typedef struct _ScoreContextClass ScoreContextClass;
-
-struct _ScoreContext {
- RuleContext parent_object;
-
-};
-
-struct _ScoreContextClass {
- RuleContextClass parent_class;
-
- /* virtual methods */
-
- /* signals */
-};
-
-
-GType 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 9a8c0a626c..0000000000
--- a/filter/score-editor.c
+++ /dev/null
@@ -1,133 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2001-2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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/gtk.h>
-#include <libgnome/gnome-i18n.h>
-
-#include "score-editor.h"
-#include "score-rule.h"
-
-#define d(x)
-
-static FilterRule * create_rule(RuleEditor *re);
-
-static void score_editor_class_init (ScoreEditorClass *klass);
-static void score_editor_init (ScoreEditor *se);
-static void score_editor_finalise (GObject *obj);
-
-
-static RuleEditorClass *parent_class = NULL;
-
-
-GtkType
-score_editor_get_type (void)
-{
- static GtkType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (ScoreEditorClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) score_editor_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (ScoreEditor),
- 0, /* n_preallocs */
- (GInstanceInitFunc) score_editor_init,
- };
-
- type = g_type_register_static (RULE_TYPE_EDITOR, "ScoreEditor", &info, 0);
- }
-
- return type;
-}
-
-static void
-score_editor_class_init (ScoreEditorClass *klass)
-{
- GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- RuleEditorClass *re_class = (RuleEditorClass *) klass;
-
- parent_class = g_type_class_ref(rule_editor_get_type ());
-
- gobject_class->finalize = score_editor_finalise;
-
- /* override methods */
- re_class->create_rule = create_rule;
-}
-
-static void
-score_editor_init (ScoreEditor *se)
-{
- ;
-}
-
-static void
-score_editor_finalise (GObject *obj)
-{
- G_OBJECT_CLASS (parent_class)->finalize (obj);
-}
-
-/**
- * score_editor_new:
- *
- * Create a new ScoreEditor object.
- *
- * Return value: A new #ScoreEditor object.
- **/
-ScoreEditor *
-score_editor_new (ScoreContext *sc)
-{
- ScoreEditor *se = (ScoreEditor *) g_object_new (SCORE_TYPE_EDITOR, NULL);
- GladeXML *gui;
- GtkWidget *w;
-
- gui = glade_xml_new (FILTER_GLADEDIR "/filter.glade", "rule_editor", NULL);
- rule_editor_construct ((RuleEditor *) se, (RuleContext *) sc, gui, NULL);
-
- w = glade_xml_get_widget (gui, "rule_frame");
- gtk_frame_set_label ((GtkFrame *) w, _("Score Rules"));
-
- g_object_unref (gui);
-
- return se;
-}
-
-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 85bff02140..0000000000
--- a/filter/score-editor.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-
-#ifndef _SCORE_EDITOR_H
-#define _SCORE_EDITOR_H
-
-#include "rule-editor.h"
-#include "score-context.h"
-
-#define SCORE_TYPE_EDITOR (score_editor_get_type ())
-#define SCORE_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SCORE_TYPE_EDITOR, ScoreEditor))
-#define SCORE_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SCORE_TYPE_EDITOR, ScoreEditorClass))
-#define IS_SCORE_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SCORE_TYPE_EDITOR))
-#define IS_SCORE_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SCORE_TYPE_EDITOR))
-#define SCORE_EDITOR_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), SCORE_TYPE_EDITOR, ScoreEditorClass))
-
-typedef struct _ScoreEditor ScoreEditor;
-typedef struct _ScoreEditorClass ScoreEditorClass;
-
-struct _ScoreEditor {
- RuleEditor parent_object;
-
-};
-
-struct _ScoreEditorClass {
- RuleEditorClass parent_class;
-
- /* virtual methods */
-
- /* signals */
-};
-
-
-GType score_editor_get_type (void);
-
-ScoreEditor *score_editor_new (ScoreContext *sc);
-
-#endif /* ! _SCORE_EDITOR_H */
diff --git a/filter/score-rule.c b/filter/score-rule.c
deleted file mode 100644
index 9865b320cf..0000000000
--- a/filter/score-rule.c
+++ /dev/null
@@ -1,201 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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/gtk.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 *klass);
-static void score_rule_init (ScoreRule *sr);
-static void score_rule_finalise (GObject *obj);
-
-
-static FilterRuleClass *parent_class = NULL;
-
-
-GType
-score_rule_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (ScoreRuleClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) score_rule_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (ScoreRule),
- 0, /* n_preallocs */
- (GInstanceInitFunc) score_rule_init,
- };
-
- type = g_type_register_static (FILTER_TYPE_RULE, "ScoreRule", &info, 0);
- }
-
- return type;
-}
-
-static void
-score_rule_class_init (ScoreRuleClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- FilterRuleClass *rule_class = (FilterRuleClass *) klass;
-
- parent_class = g_type_class_ref (FILTER_TYPE_RULE);
-
- 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;
-}
-
-static void
-score_rule_init (ScoreRule *sr)
-{
- ;
-}
-
-static void
-score_rule_finalise (GObject *obj)
-{
- G_OBJECT_CLASS (parent_class)->finalize (obj);
-}
-
-/**
- * score_rule_new:
- *
- * Create a new ScoreRule object.
- *
- * Return value: A new #ScoreRule object.
- **/
-ScoreRule *
-score_rule_new (void)
-{
- return (ScoreRule *) g_object_new (SCORE_TYPE_RULE, NULL, NULL);
-}
-
-static xmlNodePtr
-xml_encode (FilterRule *fr)
-{
- ScoreRule *sr = (ScoreRule *)fr;
- xmlNodePtr node, value;
- char number[16];
-
- node = FILTER_RULE_CLASS (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 = FILTER_RULE_CLASS (parent_class)->xml_decode (fr, node, f);
- if (result != 0)
- return result;
-
- value = node->children;
- 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 = FILTER_RULE_CLASS (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);
- g_signal_connect (adj, "value_changed", G_CALLBACK (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 fbd8f649de..0000000000
--- a/filter/score-rule.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-
-#ifndef _SCORE_RULE_H
-#define _SCORE_RULE_H
-
-#include "filter-rule.h"
-
-#define SCORE_TYPE_RULE (score_rule_get_type ())
-#define SCORE_RULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SCORE_TYPE_RULE, ScoreRule))
-#define SCORE_RULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SCORE_TYPE_RULE, ScoreRuleClass))
-#define IS_SCORE_RULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SCORE_TYPE_RULE))
-#define IS_SCORE_RULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SCORE_TYPE_RULE))
-#define SCORE_RULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SCORE_TYPE_RULE, ScoreRuleClass))
-
-typedef struct _ScoreRule ScoreRule;
-typedef struct _ScoreRuleClass ScoreRuleClass;
-
-struct _ScoreRule {
- FilterRule parent_object;
-
- int score;
-};
-
-struct _ScoreRuleClass {
- FilterRuleClass parent_class;
-
- /* virtual methods */
-
- /* signals */
-};
-
-
-GType score_rule_get_type (void);
-
-ScoreRule *score_rule_new (void);
-
-/* methods */
-
-#endif /* ! _SCORE_RULE_H */
diff --git a/filter/searchtypes.xml b/filter/searchtypes.xml
deleted file mode 100644
index 8185b4a593..0000000000
--- a/filter/searchtypes.xml
+++ /dev/null
@@ -1,529 +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>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>is before</title>
- <code>
- (match-all (&lt; (get-sent-date) ${versus}))
- </code>
- </option>
- <option value="after">
- <title>is 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>is before</title>
- <code>
- (match-all (&lt; (get-received-date) ${versus}))
- </code>
- </option>
- <option value="after">
- <title>is after</title>
- <code>
- (match-all (&gt; (get-received-date) ${versus}))
- </code>
- </option>
- </input>
- <input type="datespec" name="versus"/>
- </part>
-
- <part name="label">
- <title>Label</title>
- <input type="optionlist" name="label-type">
- <option value="is">
- <title>is</title>
- <code>
- (match-all (= (user-tag "label") ${versus}))
- </code>
- </option>
- <option value="is-not">
- <title>is not</title>
- <code>
- (match-all (not (= (user-tag "label") ${versus})))
- </code>
- </option>
- </input>
- <input type="label" name="versus"/>
- </part>
-
- <part name="score">
- <title>Score</title>
- <input type="optionlist" name="score-type">
- <option value="is">
- <title>is</title>
- <code>
- (match-all (= (cast-int (user-tag "score")) ${versus}))
- </code>
- </option>
- <option value="is-not">
- <title>is not</title>
- <code>
- (match-all (not (= (cast-int (user-tag "score")) ${versus})))
- </code>
- </option>
- <option value="greater-than">
- <title>is greater than</title>
- <code>
- (match-all (&gt; (cast-int (user-tag "score")) ${versus}))
- </code>
- </option>
- <option value="less-than">
- <title>is less than</title>
- <code>
- (match-all (&lt; (cast-int (user-tag "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="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="follow-up">
- <title>Follow Up</title>
- <input type="optionlist" name="match-type">
- <option value="is">
- <title>is Flagged</title>
- <code>
- (match-all (not (= (user-tag "follow-up") "")))
- </code>
- </option>
- <option value="is not">
- <title>is not Flagged</title>
- <code>
- (match-all (= (user-tag "follow-up") ""))
- </code>
- </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="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="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>
- </input>
- <input type="string" name="mlist"/>
- </part>
-
-</partset>
-
- <ruleset>
-
- <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>Subject does not contain</_title>
- <partset>
- <part name="subject">
- <value name="subject-type" type="option" value="not contains"/>
- <value name="subject" type="string"/>
- </part>
- </partset>
- <sources/>
- </rule>
-
- <rule grouping="any" source="demand">
- <_title>Sender contains</_title>
- <partset>
- <part name="sender">
- <value name="sender-type" type="option" value="contains"/>
- <value name="sender" type="string"/>
- </part>
- </partset>
- <sources/>
- </rule>
-
- <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>
-
- <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>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>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>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>
-
- </ruleset>
-</filterdescription>
diff --git a/filter/vfolder-context.c b/filter/vfolder-context.c
deleted file mode 100644
index 9c2eee4278..0000000000
--- a/filter/vfolder-context.c
+++ /dev/null
@@ -1,100 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 "vfolder-context.h"
-#include "vfolder-rule.h"
-
-static void vfolder_context_class_init (VfolderContextClass *klass);
-static void vfolder_context_init (VfolderContext *vc);
-static void vfolder_context_finalise (GObject *obj);
-
-
-static RuleContextClass *parent_class = NULL;
-
-
-GType
-vfolder_context_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (VfolderContextClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) vfolder_context_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (VfolderContext),
- 0, /* n_preallocs */
- (GInstanceInitFunc) vfolder_context_init,
- };
-
- type = g_type_register_static (RULE_TYPE_CONTEXT, "VfolderContext", &info, 0);
- }
-
- return type;
-}
-
-static void
-vfolder_context_class_init (VfolderContextClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_ref (RULE_TYPE_CONTEXT);
-
- object_class->finalize = vfolder_context_finalise;
-}
-
-static void
-vfolder_context_init (VfolderContext *vc)
-{
- rule_context_add_part_set ((RuleContext *) vc, "partset", filter_part_get_type (),
- rule_context_add_part, rule_context_next_part);
-
- rule_context_add_rule_set ((RuleContext *) vc, "ruleset", vfolder_rule_get_type (),
- rule_context_add_rule, rule_context_next_rule);
-}
-
-static void
-vfolder_context_finalise (GObject *obj)
-{
- G_OBJECT_CLASS (parent_class)->finalize (obj);
-}
-
-/**
- * vfolder_context_new:
- *
- * Create a new VfolderContext object.
- *
- * Return value: A new #VfolderContext object.
- **/
-VfolderContext *
-vfolder_context_new (void)
-{
- return (VfolderContext *) g_object_new (VFOLDER_TYPE_CONTEXT, NULL, NULL);
-}
diff --git a/filter/vfolder-context.h b/filter/vfolder-context.h
deleted file mode 100644
index bed020127d..0000000000
--- a/filter/vfolder-context.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-
-#ifndef _VFOLDER_CONTEXT_H
-#define _VFOLDER_CONTEXT_H
-
-#include "rule-context.h"
-
-#define VFOLDER_TYPE_CONTEXT (vfolder_context_get_type ())
-#define VFOLDER_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VFOLDER_TYPE_CONTEXT, VfolderContext))
-#define VFOLDER_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VFOLDER_TYPE_CONTEXT, VfolderContextClass))
-#define IS_VFOLDER_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VFOLDER_TYPE_CONTEXT))
-#define IS_VFOLDER_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VFOLDER_TYPE_CONTEXT))
-#define VFOLDER_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VFOLDER_TYPE_CONTEXT, VfolderContextClass))
-
-typedef struct _VfolderContext VfolderContext;
-typedef struct _VfolderContextClass VfolderContextClass;
-
-struct _VfolderContext {
- RuleContext parent_object;
-
-};
-
-struct _VfolderContextClass {
- RuleContextClass parent_class;
-
- /* virtual methods */
-
- /* signals */
-};
-
-
-GType 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 3addc14bed..0000000000
--- a/filter/vfolder-editor.c
+++ /dev/null
@@ -1,133 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2001-2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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/gtk.h>
-#include <libgnome/gnome-i18n.h>
-
-#include "vfolder-editor.h"
-#include "vfolder-rule.h"
-
-#define d(x)
-
-static FilterRule *create_rule (RuleEditor *re);
-
-static void vfolder_editor_class_init (VfolderEditorClass *klass);
-static void vfolder_editor_init (VfolderEditor *ve);
-static void vfolder_editor_finalise (GObject *obj);
-
-
-static RuleEditorClass *parent_class = NULL;
-
-
-GtkType
-vfolder_editor_get_type (void)
-{
- static GtkType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (VfolderEditorClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) vfolder_editor_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (VfolderEditor),
- 0, /* n_preallocs */
- (GInstanceInitFunc) vfolder_editor_init,
- };
-
- type = g_type_register_static (RULE_TYPE_EDITOR, "VfolderEditor", &info, 0);
- }
-
- return type;
-}
-
-static void
-vfolder_editor_class_init (VfolderEditorClass *klass)
-{
- GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- RuleEditorClass *re_class = (RuleEditorClass *) klass;
-
- parent_class = g_type_class_ref (rule_editor_get_type ());
-
- gobject_class->finalize = vfolder_editor_finalise;
-
- /* override methods */
- re_class->create_rule = create_rule;
-}
-
-static void
-vfolder_editor_init (VfolderEditor *ve)
-{
- ;
-}
-
-static void
-vfolder_editor_finalise (GObject *obj)
-{
- G_OBJECT_CLASS (parent_class)->finalize (obj);
-}
-
-/**
- * vfolder_editor_new:
- *
- * Create a new VfolderEditor object.
- *
- * Return value: A new #VfolderEditor object.
- **/
-VfolderEditor *
-vfolder_editor_new (VfolderContext *vc)
-{
- VfolderEditor *ve = (VfolderEditor *) g_object_new (VFOLDER_TYPE_EDITOR, NULL);
- GladeXML *gui;
- GtkWidget *w;
-
- gui = glade_xml_new (FILTER_GLADEDIR "/filter.glade", "rule_editor", NULL);
- rule_editor_construct ((RuleEditor *) ve, (RuleContext *) vc, gui, NULL);
-
- w = glade_xml_get_widget (gui, "rule_frame");
- gtk_frame_set_label ((GtkFrame *) w, _("Virtual Folders"));
-
- g_object_unref (gui);
-
- return ve;
-}
-
-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 c33f896eb3..0000000000
--- a/filter/vfolder-editor.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2002 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-
-#ifndef _VFOLDER_EDITOR_H
-#define _VFOLDER_EDITOR_H
-
-#include "rule-editor.h"
-#include "vfolder-context.h"
-
-#define VFOLDER_TYPE_EDITOR (vfolder_editor_get_type ())
-#define VFOLDER_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VFOLDER_TYPE_EDITOR, VfolderEditor))
-#define VFOLDER_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VFOLDER_TYPE_EDITOR, VfolderEditorClass))
-#define IS_VFOLDER_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VFOLDER_TYPE_EDITOR))
-#define IS_VFOLDER_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VFOLDER_TYPE_EDITOR))
-#define VFOLDER_EDITOR_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), VFOLDER_TYPE_EDITOR, VfolderEditorClass))
-
-typedef struct _VfolderEditor VfolderEditor;
-typedef struct _VfolderEditorClass VfolderEditorClass;
-
-struct _VfolderEditor {
- RuleEditor parent_object;
-
-};
-
-struct _VfolderEditorClass {
- RuleEditorClass parent_class;
-
- /* virtual methods */
-
- /* signals */
-};
-
-
-GtkType vfolder_editor_get_type (void);
-
-VfolderEditor *vfolder_editor_new (VfolderContext *vc);
-
-#endif /* ! _VFOLDER_EDITOR_H */
diff --git a/filter/vfolder-rule.c b/filter/vfolder-rule.c
deleted file mode 100644
index 020aa25464..0000000000
--- a/filter/vfolder-rule.c
+++ /dev/null
@@ -1,643 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2002 Ximian Inc.
- *
- * Author: 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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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/gtk.h>
-#include <glade/glade.h>
-#include <libgnome/gnome-i18n.h>
-
-#include "camel/camel-url.h"
-#include "vfolder-context.h"
-#include "vfolder-rule.h"
-#include "mail/em-folder-tree.h"
-#include "mail/em-folder-selector.h"
-#include "mail/mail-component.h"
-
-#define d(x)
-
-static int validate(FilterRule *);
-static int vfolder_eq(FilterRule *fr, FilterRule *cm);
-static xmlNodePtr xml_encode(FilterRule *);
-static int xml_decode(FilterRule *, xmlNodePtr, RuleContext *f);
-static void rule_copy (FilterRule *dest, FilterRule *src);
-/*static void build_code(FilterRule *, GString *out);*/
-static GtkWidget *get_widget(FilterRule *fr, RuleContext *f);
-
-static void vfolder_rule_class_init (VfolderRuleClass *klass);
-static void vfolder_rule_init (VfolderRule *vr);
-static void vfolder_rule_finalise (GObject *obj);
-
-
-static FilterRuleClass *parent_class = NULL;
-
-
-GType
-vfolder_rule_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (VfolderRuleClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) vfolder_rule_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (VfolderRule),
- 0, /* n_preallocs */
- (GInstanceInitFunc) vfolder_rule_init,
- };
-
- type = g_type_register_static (FILTER_TYPE_RULE, "VfolderRule", &info, 0);
- }
-
- return type;
-}
-
-static void
-vfolder_rule_class_init (VfolderRuleClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- FilterRuleClass *fr_class = (FilterRuleClass *) klass;
-
- parent_class = g_type_class_ref (FILTER_TYPE_RULE);
-
- object_class->finalize = vfolder_rule_finalise;
-
- /* override methods */
- fr_class->validate = validate;
- fr_class->eq = vfolder_eq;
- fr_class->xml_encode = xml_encode;
- fr_class->xml_decode = xml_decode;
- fr_class->copy = rule_copy;
- /*fr_class->build_code = build_code;*/
- fr_class->get_widget = get_widget;
-}
-
-static void
-vfolder_rule_init (VfolderRule *vr)
-{
- ;
-}
-
-static void
-vfolder_rule_finalise (GObject *obj)
-{
- VfolderRule *vr = (VfolderRule *) obj;
-
- g_list_foreach (vr->sources, (GFunc) g_free, NULL);
- g_list_free (vr->sources);
-
- G_OBJECT_CLASS (parent_class)->finalize (obj);
-}
-
-/**
- * vfolder_rule_new:
- *
- * Create a new VfolderRule object.
- *
- * Return value: A new #VfolderRule object.
- **/
-VfolderRule *
-vfolder_rule_new (void)
-{
- return (VfolderRule *) g_object_new (VFOLDER_TYPE_RULE, NULL, NULL);
-}
-
-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 = l->next;
- }
-
- 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 int
-validate (FilterRule *fr)
-{
- GtkWidget *dialog;
-
- g_return_val_if_fail (fr != NULL, FALSE);
-
- if (!fr->name || !*fr->name) {
- /* FIXME: set a aprent window? */
- dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
- "%s", _("You must name this vfolder."));
-
- gtk_dialog_run ((GtkDialog *) dialog);
- gtk_widget_destroy (dialog);
-
- return 0;
- }
-
- /* We have to have at least one source set in the "specific" case.
- Do not translate this string! */
- if (fr->source && !strcmp (fr->source, "specific") && VFOLDER_RULE (fr)->sources == NULL) {
- /* FIXME: set a parent window? */
- dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
- "%s", _("You need to to specify at least one folder as a source."));
-
- gtk_dialog_run ((GtkDialog *) dialog);
- gtk_widget_destroy (dialog);
-
- return 0;
- }
-
- return FILTER_RULE_CLASS (parent_class)->validate (fr);
-}
-
-static int
-list_eq (GList *al, GList *bl)
-{
- int truth = TRUE;
-
- while (truth && al && bl) {
- char *a = al->data, *b = bl->data;
-
- truth = strcmp (a, b) == 0;
- al = al->next;
- bl = bl->next;
- }
-
- return truth && al == NULL && bl == NULL;
-}
-
-static int
-vfolder_eq (FilterRule *fr, FilterRule *cm)
-{
- return FILTER_RULE_CLASS (parent_class)->eq (fr, cm)
- && list_eq (((VfolderRule *) fr)->sources, ((VfolderRule *) cm)->sources);
-}
-
-static xmlNodePtr
-xml_encode (FilterRule *fr)
-{
- VfolderRule *vr = (VfolderRule *) fr;
- xmlNodePtr node, set, work;
- GList *l;
-
- node = FILTER_RULE_CLASS (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 = l->next;
- }
-
- 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 = FILTER_RULE_CLASS (parent_class)->xml_decode (fr, node, f);
- if (result != 0)
- return result;
-
- set = node->children;
- while (set) {
- if (!strcmp (set->name, "sources")) {
- work = set->children;
- 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;
- }
-
- FILTER_RULE_CLASS (parent_class)->copy (dest, src);
-}
-
-
-enum {
- BUTTON_ADD,
- BUTTON_REMOVE,
- BUTTON_LAST,
-};
-
-struct _source_data {
- RuleContext *rc;
- VfolderRule *vr;
- const char *current;
- GtkListStore *model;
- GtkTreeView *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", G_CALLBACK (source_add) },
- { "source_remove", G_CALLBACK (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 *list, struct _source_data *data)
-{
- GtkTreeViewColumn *column;
- GtkTreePath *path;
- GtkTreeIter iter;
-
- gtk_tree_view_get_cursor (data->list, &path, &column);
- gtk_tree_model_get_iter (GTK_TREE_MODEL (data->model), &iter, path);
- gtk_tree_path_free (path);
-
- gtk_tree_model_get (GTK_TREE_MODEL (data->model), &iter, 0, &data->current, -1);
-
- set_sensitive (data);
-}
-
-static void
-select_source_with (GtkWidget *widget, struct _source_data *data)
-{
- char *source = g_object_get_data ((GObject *) widget, "source");
-
- filter_rule_set_source ((FilterRule *) data->vr, source);
-}
-
-/* attempt to make a 'nice' folder name out of the raw uri */
-static char *format_source(const char *uri)
-{
- CamelURL *url = camel_url_new(uri, NULL);
- GString *out;
- char *res;
-
- /* bad uri */
- if (url == NULL)
- return g_strdup(uri);
-
- out = g_string_new(url->protocol);
- g_string_append_c(out, ':');
- if (url->user && url->host) {
- g_string_append_printf(out, "%s@%s", url->user, url->host);
- if (url->port)
- g_string_append_printf(out, ":%d", url->port);
- }
- if (url->fragment)
- g_string_append(out, url->fragment);
- else if (url->path)
- g_string_append(out, url->path);
-
- res = out->str;
- g_string_free(out, FALSE);
-
- return res;
-}
-
-static void
-vfr_folder_response(GtkWidget *dialog, gint button, struct _source_data *data)
-{
- const char *uri = em_folder_selector_get_selected_uri((EMFolderSelector *)dialog);
-
- if (button == GTK_RESPONSE_OK
- && (uri = em_folder_selector_get_selected_uri((EMFolderSelector *)dialog)) != NULL) {
- char *urinice;
- GtkTreeSelection *selection;
- GtkTreeIter iter;
-
- data->vr->sources = g_list_append (data->vr->sources, g_strdup(uri));
-
- gtk_list_store_append (data->model, &iter);
- urinice = format_source(uri);
- gtk_list_store_set(data->model, &iter, 0, urinice, 1, uri, -1);
- g_free(urinice);
- selection = gtk_tree_view_get_selection(data->list);
- gtk_tree_selection_select_iter(selection, &iter);
- data->current = uri;
-
- set_sensitive(data);
- }
-
- gtk_widget_destroy(dialog);
-}
-
-static void
-source_add(GtkWidget *widget, struct _source_data *data)
-{
- EMFolderTree *emft;
- GtkWidget *dialog;
-
- emft = (EMFolderTree *) em_folder_tree_new_with_model(mail_component_get_tree_model(mail_component_peek()));
-
- dialog = em_folder_selector_new(emft, EM_FOLDER_SELECTOR_CAN_CREATE, _("Select Folder"), NULL);
- gtk_window_set_transient_for((GtkWindow *)dialog, (GtkWindow *)gtk_widget_get_toplevel(widget));
- gtk_window_set_modal((GtkWindow *)dialog, TRUE);
- g_signal_connect(dialog, "response", G_CALLBACK(vfr_folder_response), data);
- gtk_widget_show(dialog);
-}
-
-static void
-source_remove (GtkWidget *widget, struct _source_data *data)
-{
- GtkTreeSelection *selection;
- const char *source;
- GtkTreePath *path;
- GtkTreeIter iter;
- int index = 0;
- int n;
-
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (data->list));
-
- source = NULL;
- while ((source = vfolder_rule_next_source (data->vr, source))) {
- path = gtk_tree_path_new ();
- gtk_tree_path_append_index (path, index);
-
- if (gtk_tree_selection_path_is_selected (selection, path)) {
- gtk_tree_model_get_iter (GTK_TREE_MODEL (data->model), &iter, path);
-
- vfolder_rule_remove_source (data->vr, source);
- gtk_list_store_remove (data->model, &iter);
- gtk_tree_path_free (path);
-
- /* now select the next rule */
- n = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (data->model), NULL);
- index = index >= n ? n - 1 : index;
-
- if (index >= 0) {
- path = gtk_tree_path_new ();
- gtk_tree_path_append_index (path, index);
- gtk_tree_model_get_iter (GTK_TREE_MODEL (data->model), &iter, path);
- gtk_tree_path_free (path);
-
- gtk_tree_selection_select_iter (selection, &iter);
- gtk_tree_model_get (GTK_TREE_MODEL (data->model), &iter, 0, &data->current, -1);
- } else {
- data->current = NULL;
- }
-
- break;
- }
-
- index++;
- gtk_tree_path_free (path);
- }
-
- set_sensitive (data);
-}
-
-
-GtkWidget *vfolder_editor_sourcelist_new (char *widget_name, char *string1, char *string2,
- int int1, int int2);
-
-GtkWidget *
-vfolder_editor_sourcelist_new (char *widget_name, char *string1, char *string2, int int1, int int2)
-{
- GtkWidget *table, *scrolled;
- GtkTreeSelection *selection;
- GtkCellRenderer *renderer;
- GtkListStore *model;
-
- scrolled = gtk_scrolled_window_new (NULL, NULL);
- gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled), GTK_SHADOW_IN);
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled),
- GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-
- model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_POINTER);
- table = gtk_tree_view_new_with_model ((GtkTreeModel *) model);
- gtk_tree_view_set_headers_visible ((GtkTreeView *) table, FALSE);
-
- renderer = gtk_cell_renderer_text_new ();
- gtk_tree_view_insert_column_with_attributes ((GtkTreeView *) table, -1,
- _("VFolder source"), renderer,
- "text", 0, NULL);
-
- selection = gtk_tree_view_get_selection ((GtkTreeView *) table);
- gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
-
- gtk_container_add (GTK_CONTAINER (scrolled), table);
-
- g_object_set_data ((GObject *) scrolled, "table", table);
- g_object_set_data ((GObject *) scrolled, "model", model);
-
- gtk_widget_show (scrolled);
- gtk_widget_show (table);
-
- return scrolled;
-}
-
-
-/* DO NOT internationalise these strings */
-const char *source_names[] = {
- "specific",
- "local",
- "remote_active",
- "local_remote_active"
-};
-
-static GtkWidget *
-get_widget (FilterRule *fr, RuleContext *rc)
-{
- VfolderRule *vr = (VfolderRule *) fr;
- GtkWidget *widget, *frame, *list;
- struct _source_data *data;
- GtkOptionMenu *omenu;
- const char *source;
- GtkTreeIter iter;
- GladeXML *gui;
- int i, row;
- GList *l;
-
- widget = FILTER_RULE_CLASS (parent_class)->get_widget (fr, rc);
-
- data = g_malloc0 (sizeof (*data));
- data->rc = rc;
- data->vr = vr;
-
- gui = glade_xml_new (FILTER_GLADEDIR "/filter.glade", "vfolder_source_frame", NULL);
- frame = glade_xml_get_widget (gui, "vfolder_source_frame");
-
- g_object_set_data_full ((GObject *) frame, "data", data, g_free);
-
- for (i = 0; i < BUTTON_LAST; i++) {
- data->buttons[i] = (GtkButton *) glade_xml_get_widget (gui, edit_buttons[i].name);
- g_signal_connect (data->buttons[i], "clicked", edit_buttons[i].func, data);
- }
-
- list = glade_xml_get_widget (gui, "source_list");
- data->list = (GtkTreeView *) g_object_get_data ((GObject *) list, "table");
- data->model = (GtkListStore *) g_object_get_data ((GObject *) list, "model");
-
- source = NULL;
- while ((source = vfolder_rule_next_source (vr, source))) {
- char *nice = format_source(source);
-
- gtk_list_store_append (data->model, &iter);
- gtk_list_store_set (data->model, &iter, 0, nice, 1, source, -1);
- g_free(nice);
- }
-
- g_signal_connect (data->list, "cursor-changed", G_CALLBACK (select_source), data);
-
- omenu = (GtkOptionMenu *) glade_xml_get_widget (gui, "source_option");
- l = GTK_MENU_SHELL (omenu->menu)->children;
- i = 0;
- row = 0;
- while (l) {
- GtkWidget *item = 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])) {
- g_object_set_data ((GObject *) item, "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");
- }
-
- g_signal_connect (item, "activate", G_CALLBACK (select_source_with), data);
-
- i++;
- l = l->next;
- }
-
- gtk_option_menu_set_history (omenu, row);
- if (fr->source == NULL)
- filter_rule_set_source (fr, (char *) source_names[row]);
-
- set_sensitive (data);
-
- g_object_unref (gui);
-
- gtk_box_pack_start (GTK_BOX (widget), frame, TRUE, TRUE, 3);
-
- return widget;
-}
diff --git a/filter/vfolder-rule.h b/filter/vfolder-rule.h
deleted file mode 100644
index 165e547688..0000000000
--- a/filter/vfolder-rule.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000-2002 Ximian Inc.
- *
- * Author: NotZed <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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-
-#ifndef _VFOLDER_RULE_H
-#define _VFOLDER_RULE_H
-
-#include "filter-rule.h"
-
-#define VFOLDER_TYPE_RULE (vfolder_rule_get_type ())
-#define VFOLDER_RULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VFOLDER_TYPE_RULE, VfolderRule))
-#define VFOLDER_RULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VFOLDER_TYPE_RULE, VfolderRuleClass))
-#define IS_VFOLDER_RULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VFOLDER_TYPE_RULE))
-#define IS_VFOLDER_RULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VFOLDER_TYPE_RULE))
-#define VFOLDER_RULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VFOLDER_TYPE_RULE, VfolderRuleClass))
-
-typedef struct _VfolderRule VfolderRule;
-typedef struct _VfolderRuleClass VfolderRuleClass;
-
-struct _VfolderRule {
- FilterRule parent_object;
-
- GList *sources; /* uri's of the source folders */
-};
-
-struct _VfolderRuleClass {
- FilterRuleClass parent_class;
-
- /* virtual methods */
-
- /* signals */
-};
-
-GType 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 e60c1780dc..0000000000
--- a/filter/vfoldertypes.xml
+++ /dev/null
@@ -1,421 +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>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>is before</title>
- <code>
- (match-all (&lt; (get-sent-date) ${versus}))
- </code>
- </option>
- <option value="after">
- <title>is 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>is before</title>
- <code>
- (match-all (&lt; (get-received-date) ${versus}))
- </code>
- </option>
- <option value="after">
- <title>is after</title>
- <code>
- (match-all (&gt; (get-received-date) ${versus}))
- </code>
- </option>
- </input>
- <input type="datespec" name="versus"/>
- </part>
-
- <part name="label">
- <title>Label</title>
- <input type="optionlist" name="label-type">
- <option value="is">
- <title>is</title>
- <code>
- (match-all (= (user-tag "label") ${versus}))
- </code>
- </option>
- <option value="is-not">
- <title>is not</title>
- <code>
- (match-all (not (= (user-tag "label") ${versus})))
- </code>
- </option>
- </input>
- <input type="label" name="versus"/>
- </part>
-
- <part name="score">
- <title>Score</title>
- <input type="optionlist" name="score-type">
- <option value="is">
- <title>is</title>
- <code>
- (match-all (= (cast-int (user-tag "score")) ${versus}))
- </code>
- </option>
- <option value="is-not">
- <title>is not</title>
- <code>
- (match-all (not (= (cast-int (user-tag "score")) ${versus})))
- </code>
- </option>
- <option value="greater-than">
- <title>is greater than</title>
- <code>
- (match-all (&gt; (cast-int (user-tag "score")) ${versus}))
- </code>
- </option>
- <option value="less-than">
- <title>is less than</title>
- <code>
- (match-all (&lt; (cast-int (user-tag "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="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="follow-up">
- <title>Follow Up</title>
- <input type="optionlist" name="match-type">
- <option value="is">
- <title>is Flagged</title>
- <code>
- (match-all (not (= (user-tag "follow-up") "")))
- </code>
- </option>
- <option value="is not">
- <title>is not Flagged</title>
- <code>
- (match-all (= (user-tag "follow-up") ""))
- </code>
- </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="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="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>
- </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 c35e90b546..0000000000
--- a/help/C/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-Makefile
-Makefile.in
-evolution-*-C.omf.out
-omf_timestamp
diff --git a/help/C/Makefile.am b/help/C/Makefile.am
deleted file mode 100644
index 3bddfc7991..0000000000
--- a/help/C/Makefile.am
+++ /dev/null
@@ -1,57 +0,0 @@
-figs = \
- figures/calendar.png \
- figures/config-cal.png \
- figures/config-mail.png \
- figures/contact-editor.png \
- figures/contact.png \
- figures/exchange-identity.png \
- figures/exchange-receive-options.png \
- figures/exchange-receive.png \
- figures/exchange-delegation.png \
- figures/filter-new-fig.png \
- figures/folder-bar.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-druid-pic.png \
- figures/mail-inbox.png \
- figures/mail-threaded.png \
- figures/mainwindow-pic.png \
- figures/newmsg.png \
- figures/print-dest.png \
- figures/print-preview.png \
- figures/replymsg.png \
- figures/schedule.png \
- figures/summary.png \
- figures/vfolder-createrule-fig.png
-figdir = figures
-docname = evolution-1.5
-lang = C
-omffile = evolution-1.5-C.omf
-entities = \
- apx-authors.xml \
- apx-bugs.xml \
- apx-fdl.xml \
- apx-gloss.xml \
- apx-gpl.xml \
- config-prefs.xml \
- config-sync.xml \
- legal.xml \
- menuref.xml \
- preface.xml \
- usage-calendar.xml \
- usage-contact.xml \
- usage-exec-summary.xml \
- usage-exchange.xml \
- usage-mail-org.xml \
- usage-mail.xml \
- usage-mainwindow.xml \
- usage-print.xml \
- usage-sync.xml
-
-include $(top_srcdir)/help/xmldocs.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.xml b/help/C/apx-authors.xml
deleted file mode 100644
index 24856e2fc3..0000000000
--- a/help/C/apx-authors.xml
+++ /dev/null
@@ -1,80 +0,0 @@
- <appendix id="authors">
- <title>Authors</title>
- <para>
- <application>Evolution</application> was written by the Ximian
- Evolution team and numerous other dedicated GNOME programmers.
- You can see their names by selecting <menuchoice>
- <guimenu>Help</guimenu> <guimenuitem>About</guimenuitem>
- </menuchoice> from any Evolution window.
- </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>
- Ximian would like to thank everyone who helped out with the bug
- tracking process, particularly Miles Lane, and also the staff of
- El Pelon Taqueria, on Peterborough St. in Boston, for
- sustenance.
- </para>
-
- <para>
- For more information please visit the
- <application>Evolution</application> <ulink
- url="http://www.ximian.com/products/ximian_evolution/"
- type="http">Web page</ulink>. Please send all comments,
- suggestions, and bug reports to the <ulink
- url="http://bugzilla.ximian.com" type="http">Ximian bug tracking
- database</ulink>. Instructions for submitting bug reports can be
- found on-line at the same location. You can also use the GNOME
- bug report tool, <command>bug-buddy</command>, to submit your
- defect reports.
- </para>
- <para>
- This manual was written by Aaron Weber
- (<email>aaron@ximian.com</email>), Kevin Breit
- (<email>mrproper@ximian.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. Special thanks to Baris Cicek for proofreading.
- </para>
- <para>
- Please file comments and suggestions for this manual as bugs in
- the Ximian bug tracking system. If you contributed to this
- project but do not see your name here, please contact Aaron
- Weber (<email>aaron@ximian.com</email>) and he'll list you.
- </para>
- <para>
- Partial list of Documentation Translators (application
- translated to 36 additional languages):
- <itemizedlist>
- <listitem><para>
- Daniel Persson for Swedish (.se)
- </para></listitem>
-
- <listitem><para>
-
- For Spanish (.es): Versions prior to 1.2, H&eacute;ctor
- Garc&iacute;a &Aacute;lvarez; from 1.2 completely redone
- by Ismael Olea and Ignacio R. Maturana for Lambdaux
- Software Services.
- </para></listitem>
-
- <listitem><para>
- Kjartan Maraas for Norwegian (.no)
- </para></listitem>
- </itemizedlist>
-
- </para>
- </appendix>
-
-
-
-
-
diff --git a/help/C/apx-bugs.xml b/help/C/apx-bugs.xml
deleted file mode 100644
index 686305fbce..0000000000
--- a/help/C/apx-bugs.xml
+++ /dev/null
@@ -1,30 +0,0 @@
- <appendix id="bugs">
-
- <title>Known bugs and limitations</title>
- <abstract>
- <para>
- Ximian Evolution bug tracking is done at the <ulink
- url="http://bugzilla.ximian.com">Ximian bug tracking
- System</ulink>. You may use that, or the GNOME <application>Bug
- Report Tool</application> (known as <command>bug-buddy</command>
- at the command line) if you find bugs or would like to request new
- features.
- </para>
- <para>
- If you need additional help with Ximian Evolution, please visit
- the Ximian support site at <ulink
- url="http://support.ximian.com">ximian.com/support</ulink>.
- </para>
- </abstract>
-
-
- <para>
- A complete list of feature requests and other issues with
- Evolution is available online in the Ximian bug tracking system.
- You can learn more about the Ximian Evolution development process
- at <ulink
- url="http://developer.ximian.com">developer.ximian.com</ulink>.
- </para>
-
-</appendix>
-
diff --git a/help/C/apx-fdl.xml b/help/C/apx-fdl.xml
deleted file mode 100644
index f074a4f453..0000000000
--- a/help/C/apx-fdl.xml
+++ /dev/null
@@ -1,667 +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="apx-fdl">
- <appendixinfo>
- <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>
- </appendixinfo>
- <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&mdash;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 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/help/C/apx-gloss.xml b/help/C/apx-gloss.xml
deleted file mode 100644
index d4f12e1a4c..0000000000
--- a/help/C/apx-gloss.xml
+++ /dev/null
@@ -1,480 +0,0 @@
-<glossary id="apx-gloss">
-
- <title>Glossary</title>
-
- <glossentry id="assistant">
- <glossterm>Assistant:</glossterm>
- <glossdef>
- <para>
- A tool which guides a user through a series of steps,
- usually to configure or set up a program. Equivalent to "Wizard"
- and "Druid."
- </para>
- </glossdef>
- </glossentry>
-
- <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-fetching 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 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>
- See "Assistant."
- </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 downward from the root. Don't
- confuse the root directory with the root
- account, or root's home directory, normally
- <filename>/root</filename>.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="filter">
- <glossterm>Filter:</glossterm>
- <glossdef>
- <para>
- Within <application>Evolution</application>, a filter is a method
- of sorting mail automatically when it's downloaded. 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.
- 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. 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>.
- </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="postscript">
- <glossterm>Postscript:</glossterm>
- <glossdef>
- <para>
- A standard document publishing format. Many printers read raw
- Postscript, making Postscript quite versatile.
- </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[au]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 by opening a command
- line and typing in <command>man grep</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. Often
- times, accomplish repetitive and tedious tasks, to save the
- user time.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="search-base">
- <glossterm>Search Base:</glossterm>
- <glossdef>
- <para>
- LDAP can break contact lists into many groups. The Search
- Base tells LDAP the top group to use. How much of the Search
- Base that is searched is set by the <glossterm
- linkend="search-scope">Search Scope</glossterm> option.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="search-scope">
- <glossterm>Search Scope:</glossterm>
- <glossdef>
- <para>
- Search Scope states how much of the <glossterm
- linkend="search-base">Search Base</glossterm> to search.
- </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, similar to 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. vFolder contents are
- are updated dynamically.
- </para>
- </glossdef>
- </glossentry>
-
-</glossary>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/help/C/apx-gpl.xml b/help/C/apx-gpl.xml
deleted file mode 100644
index ffb4930fb0..0000000000
--- a/help/C/apx-gpl.xml
+++ /dev/null
@@ -1,419 +0,0 @@
-
- <appendix id="apx-gpl">
-
-<title>GNU General Public License</title>
-<para>
-Copyright (c) 2000 Free Software Foundation, Inc.
- <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>.
- </para>
-
-<para>
-This is version 2
-</para>
-
- <para>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
- </para>
-
-
- <sect1 id="preamble">
- <title>Preamble</title>
-
- <para>
- 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.
- </para>
-
- <para>
- 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.
- </para>
-
- <para>
- 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.
- </para>
-
- <para>
- 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.
- </para>
-
- <para>
- We protect your rights with two steps:
-
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- copyright the software, and
- </para>
- </listitem>
- <listitem>
- <para>
- offer you this license which gives you legal permission to copy,
- distribute and/or modify the software.
- </para>
- </listitem>
- </orderedlist>
- </para>
-
- <para>
- 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.
- </para>
-
- <para>
- 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.
- </para>
-
- <para>
- The precise terms and conditions for copying, distribution and modification
- follow.
- </para>
-
- </sect1>
-
- <sect1 id="terms">
- <title>TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</title>
-
- <sect2 id="sect0">
- <title>Section 0</title>
- <para>
- 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 <quote>work based on the Program</quote> 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 <quote>modification</quote>.) Each
- licensee is addressed as <quote>you</quote>.
- </para>
-
- <para>
- 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.
- </para>
- </sect2>
-
- <sect2 id="sect1">
- <title>Section 1</title>
- <para>
- 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.
- </para>
-
- <para>
- 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.
- </para>
- </sect2>
-
- <sect2 id="sect2">
- <title>Section 2</title>
- <para>
- 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 <link linkend="sect1">Section 1</link> above, provided
- that you also meet all of these conditions:
-
- <orderedlist numeration="loweralpha">
- <listitem>
- <para>
- You must cause the modified files to carry prominent notices stating that
- you changed the files and the date of any change.
- </para>
- </listitem>
- <listitem>
- <para>
- 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.
- </para>
- </listitem>
- <listitem>
- <para>
- 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.
-
- <note>
- <title>Exception:</title>
- <para>
- 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.)
- </para>
- </note>
-
- </para>
- </listitem>
- </orderedlist>
- </para>
-
- <para>
- 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.
- </para>
-
- <para>
- 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.
- </para>
-
- <para>
- 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.
- </para>
- </sect2>
-
- <sect2 id="sect3">
- <title>Section 3</title>
-
- <para>
- You may copy and distribute the Program (or a work based on it, under
- <link linkend="sect2">Section 2</link> in object code or executable form under the terms of
- <link linkend="sect1">Sections 1</link> and <link linkend="sect2">2</link> above provided that
- you also do one of the following:
-
- <orderedlist numeration="loweralpha">
- <listitem>
- <para>
- 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,
- </para>
- </listitem>
- <listitem>
- <para>
- 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 and above on a medium customarily
- used for software interchange; or,
- </para>
- </listitem>
- <listitem>
- <para>
- 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.)
- </para>
- </listitem>
- </orderedlist>
- </para>
-
- <para>
- 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.
- </para>
-
- <para>
- 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.
- </para>
- </sect2>
-
- <sect2 id="sect4">
- <title>Section 4</title>
-
- <para>
- 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.
- </para>
- </sect2>
-
- <sect2 id="sect5">
- <title>Section 5</title>
-
- <para>
- 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.
- </para>
- </sect2>
-
- <sect2 id="sect6">
- <title>Section 6</title>
-
- <para>
- 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.
- </para>
- </sect2>
-
- <sect2 id="sect7">
- <title>Section 7</title>
-
- <para>
- 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.
- </para>
-
- <para>
- 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.
- </para>
-
- <para>
- 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.
- </para>
-
- <para>
- This section is intended to make thoroughly clear what is believed to be a consequence of the
- rest of this License.
- </para>
- </sect2>
-
- <sect2 id="sect8">
- <title>Section 8</title>
-
- <para>
- 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.
- </para>
- </sect2>
-
- <sect2 id="sect9">
- <title>Section 9</title>
-
- <para>
- 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.
- </para>
-
- <para>
- 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.
- </para>
- </sect2>
-
- <sect2 id="sect10">
- <title>Section 10</title>
-
- <para>
- 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.
- </para>
- </sect2>
-
- <sect2 id="sect11">
- <title>NO WARRANTY</title>
- <subtitle>Section 11</subtitle>
-
- <para>
- 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.
- </para>
- </sect2>
-
- <sect2 id="sect12">
- <title>Section 12</title>
-
- <para>
- 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.
- </para>
- </sect2>
- </sect1>
- </appendix> \ No newline at end of file
diff --git a/help/C/config-prefs.xml b/help/C/config-prefs.xml
deleted file mode 100644
index 582cfbab57..0000000000
--- a/help/C/config-prefs.xml
+++ /dev/null
@@ -1,1096 +0,0 @@
-<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>
- <para>
- You can reach the Evolution settings window
- by choosing <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenuitem>Settings</guimenuitem></menuchoice>, no matter
- where you are in Evolution. On the left half of the settings
- window is a column, similar to the Evolution shortcut bar,
- which lets you choose which portion of Evolution to
- customize. The right half of the window is where you'll make
- your actual changes.
- </para>
-
-
- <!-- ==============Figure===================== -->
- <figure id="config-prefs-mail-fig">
- <title>Changing Mail Settings</title>
- <screenshot>
- <screeninfo>Changing Mail Settings</screeninfo>
- <mediaobject><imageobject><imagedata fileref="figures/config-mail" format="PNG" srccredit="Aaron Weber"/>
- </imageobject></mediaobject>
- </screenshot>
- </figure>
- <!-- ==============End of Figure================-->
-
- <para>
- There are eight items you can customize. From top to bottom, they
- are:
- <variablelist>
- <varlistentry>
- <term><guiicon>Mail Accounts</guiicon></term>
- <listitem>
- <para>
- Here, add or change information about your email
- accounts: the servers to which you connect, the way you
- download mail, your password authentication mode, and so
- forth. This is the most complex item in the list, and is
- covered in <xref linkend="config-prefs-mail-identity"/>.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guiicon>Folder Settings</guiicon></term>
- <listitem>
- <para>
- Here, you can choose the default folders for various
- components of Evolution, the folders that will be cached
- locally when you go to offline mode, and the folders that
- Evolution will use when it is searching for
- autocompletion information as you address a mail.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guiicon>Mail Preferences</guiicon></term>
- <listitem>
- <para>
- These are overall mail reading preferences: display
- settings, notification options, security, and so
- forth. Settings that vary per-account are in the Mail
- Accounts tool, described in <xref
- linkend="config-prefs-mail-identity"/>, but most of the
- mail settings are here.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guiicon>Composer Preferences</guiicon></term>
- <listitem>
- <para>
- Settings for the way that you use the mail composer:
- shortcuts, signatures, spelling, and so forth. One fun
- feature here is the ability to substitute graphical
- smiley-faces for "emoticons" such as :) that many people
- use in email. This tool is covered in <xref
- linkend="config-prefs-mail-composer"/>.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guiicon>Calendar and Tasks</guiicon></term>
- <listitem>
- <para>
- Here, you can set the way the calendar behaves, including
- your time zone and the length of your work-week.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guiicon>Exchange Delegation</guiicon></term>
- <listitem>
- <para>
- This item will only appear if you have Ximian Connector
- for Microsoft Exchange installed. It will allow you to
- choose who has access to your Exchange account. This
- feature is covered in <xref linkend="exchange-delegate" />.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guiicon>Directory Servers</guiicon></term>
- <listitem>
- <para>
- This item allows you to enter account information for
- connecting to remote directory (LDAP) servers.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guiicon>Summary Preferences</guiicon></term>
- <listitem>
- <para>
- Set the mail folders, news feeds, schedule summary
- length, and weather locations to be displayed here. For
- news feeds, enter the web address of any RDF
- file. Summary customization is covered in <xref
- linkend="customizing-summary" /> rather than in this
- chapter.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guiicon>Out of Office</guiicon></term>
- <listitem>
- <para>
- This item will only appear if you have Ximian Connector
- for Microsoft Exchange installed. It allows you to create
- and remove automatic "vacation" messages. For
- information about how to use this feature, read <xref
- linkend="exchange-out-of-office" />.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
-
- <sect1 id="config-prefs-mail-identity">
- <title>Working with Mail Accounts</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>Send/Receive</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>Send/Receive</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>Mail 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><guilabel>Identity</guilabel></term>
- <listitem>
- <para>
- Here, enter the name,
- email address, and other identifying information for the
- account. You may also choose a default signature to
- insert into messages sent from this account.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Receiving Mail</guilabel></term>
- <listitem>
- <para>
- Here, select the way you will be getting mail: you may
- download mail from a server (<glossterm
- linkend="pop">POP</glossterm>), read and keep it on the
- server (Microsoft Exchange or <glossterm
- linkend="imap">IMAP</glossterm>), or read it from files
- that already exist on your desktop computer. 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><guilabel>Receiving Options</guilabel></term>
- <listitem>
- <para>
- Here, decide whether you'd like to check for mail
- automatically and how often, as well as other message
- retrieval options.
-
- <variablelist>
- <varlistentry>
- <term>If you chose POP:</term>
- <listitem>
- <para>
- <itemizedlist>
- <listitem>
- <para>Checking for new mail: If you would
- like <application>Evolution</application>
- to check for new mail automatically,
- check the box and select a frequency in
- minutes.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Message Storage: If you'd like to store
- copies of your mail on the server, check
- this option.
- </para>
- </listitem>
-
-
- <listitem>
- <para>Store Store status headers in
- Elm/Pine/Mutt format: If you would like to
- use the X-Status header format used by the
- mail clients Elm, Pine, and Mutt, select
- this option. This option is useful if you
- plan to check your mail with those clients
- from time to time.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>If you chose Microsoft Exchange:</term>
- <listitem>
- <para>
-
- <itemizedlist> <listitem>
- <para><guilabel>Checking for new mail</guilabel>: If you would like
- Evolution to check for new mail automatically, check
- the box and select a frequency in minutes.
- </para>
- </listitem>
-
- <listitem>
- <para>
- <guilabel>Global Catalog server name</guilabel>: enter the name of your
- Global Catalog server to create a folder for your
- organization's Global Address List.
- </para>
- </listitem>
-
- <listitem>
- <para><guilabel>Limit number of Responses</guilabel>: Select a maximum number
- of results for an address search. Lowering the maximum
- number the load on your system and on your
- network. Most servers will not send more than 1000
- results, regardless of the value you select here.
- </para>
- </listitem>
-
- <listitem>
- <para><guilabel>Mailbox Name</guilabel>: Enter your mailbox name.
- </para>
- </listitem>
-
- <listitem>
- <para>
- <guilabel>OWA Path</guilabel>: Enter the path used with Outlook Web Access on your server.
- </para>
- </listitem>
-
- <listitem>
- <para>
- <guilabel>Public Folder Server</guilabel>: Enter the name of your public
- folder server, if it differs from your Exchange server.
- </para>
- </listitem>
- <listitem>
- <para>
- <guilabel>Apply Filters to new messages in Inbox on this
- server</guilabel>: check this box if you wish to apply filters
- to this account.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>If you chose IMAP:</term>
- <listitem>
- <para>
-
- <itemizedlist>
- <listitem>
- <para><guilabel>Checking for new mail</guilabel>: If you would like
- <application>Evolution</application> to check for new mail
- automatically, check the box and select a frequency in
- minutes.
- </para>
- </listitem>
-
- <listitem>
- <para>If you want <application>Evolution</application>
- to check for new messages in <emphasis>all</emphasis> your
- IMAP folders, make sure the <guilabel>Check for new
- messages in all folders</guilabel> box is selected.</para>
- </listitem>
-
- <listitem>
- <para><guilabel>Show only subscribed folders</guilabel>: Check this box if you
- have more folders in your IMAP view than you want to
- read.</para>
- </listitem>
-
- <listitem>
- <para>
- <guilabel>Override server-supplied namespace</guilabel>: If you like, enter a
- specific directory where your server stores mail for
- you. Typical values are "mail" and "Mail." For more
- information about how to use IMAP mail, see <xref
- linkend="usage-mail-subscriptions"/>.</para>
- </listitem>
-
- <listitem>
- <para><guilabel>Apply filters to new messages in INBOX on this
- server</guilabel>: If you'd like your filters to work on this
- account, check this box.
- </para>
- </listitem>
-
- <listitem>
- <para><guilabel>Store status headers in Elm/Pine/Mutt format</guilabel>:
- If you would like to use the X-Status header format used
- by the mail clients Elm, Pine, and Mutt, select this
- option. This option is useful if you plan to check your
- mail with those clients from time to time.
- </para>
- </listitem>
-
- </itemizedlist>
- </para>
- </listitem>
- </varlistentry>
-
-
- </variablelist>
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Sending Mail</guilabel></term>
- <listitem>
- <para>
- In this section, you will choose and configure a method
- for sending mail. You may choose <glossterm
- linkend="smtp">SMTP</glossterm>, Microsoft Exchange (if
- you have purchased the Ximian Connector for Microsoft
- Exchange) or <glossterm
- linkend="sendmail">sendmail</glossterm>.
- </para>
- <para>
- If you choose Exchange or Sendmail, you're done with
- this tab. SMTP offers you a choice of hostname,
- connection security level, and authentication type,
- which you will recognize as similar to those for
- IMAP and POP servers in the <guilabel>Receiving
- Mail</guilabel> tab.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Defaults</guilabel></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. If you wish to revert to the "factory"
- settings, click the <guibutton>Restore
- Defaults</guibutton> button.
- </para>
- <para>
- If you wish to send someone a copy of every message from
- this account, check the box labeled <guilabel>Always
- carbon-copy (Cc) to:</guilabel> or <guilabel>Always
- blind carbon-copy (Bcc) to:</guilabel>, and enter one or
- more addresses.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Security</guilabel></term>
- <listitem>
- <para>
- In this section, you will set the security options for
- this account. If you use encryption, enter your PGP
- key id (see <xref linkend="encryption"/> for more
- information) and select among the four options below to
- determine key and signature handling.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect1>
-
- <sect1 id="config-prefs-folders">
- <title>Folder Settings</title>
- <para>
- There are three sets of folder options. In the first,
- <guilabel>Defaults</guilabel>, select which folders will be
- your usual mail, contact, calendar, and task folders. These
- are the folders opened when you click items in the shortcut
- bar, and when you want to save a calendar attachment or
- address card.
- </para>
- <para>
- The <guilabel>Offline Folders</guilabel> are the ones which
- will be cached when you activate the <guibutton>Go
- Offline</guibutton> feature.
- </para>
- <para>
- Select one or more folders of contacts for your
- <guilabel>Autocompletion Folders</guilabel>. When you type a
- few letters into the message composer address fields,
- Evolution will look for matches in the folders you choose here.
- </para>
- </sect1>
-
- <sect1 id="config-prefs-mail">
- <title>Mail Options</title>
- <para>
- The <guilabel>Mail Options</guilabel> tool lets you choose how
- to display citations, how long to wait before marking a
- message as read, and other mail display settings. There are
- three categories of settings: General, HTML Mail, and
- Colors.
- </para>
- <para>
- For information on individual email account settings, see <xref
- linkend="config-prefs-mail-identity" />.
- </para>
-
- <para>
- In the <guilabel>General</guilabel> tab, your options are:
- <variablelist>
- <varlistentry>
- <term><guilabel>Message Fonts</guilabel></term>
- <listitem>
- <para>
- Normally, Evolution will use the same fonts as other
- GNOME applications. To choose different fonts, uncheck
- the box <guilabel>Use the same fonts as other
- applications</guilabel> and select one font for standard typefaces and
- a second for monospace, or terminal, display.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Message Display</guilabel></term>
- <listitem>
- <para>
- These three settings handle the way messages appear to
- you.
- <variablelist>
- <varlistentry>
- <term>Mark Messages as Read</term>
- <listitem>
- <para>
- Normally, Evolution will mark a message as read as soon
- as it is displayed. If you prefer, you may set this to
- happen only after a delay, or disable it entirely and
- mark messages as read only when you choose to do so.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Default Character Encoding</term>
- <listitem>
- <para>
- This setting allows you to select character
- interpretation sets so that Evolution can display
- different alphabets. If you are not sure, pick
- Unicode (UTF-8), which will work for a large
- number of languages and character sets.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Quotation Highlight Color</term>
- <listitem>
- <para>
- Choose a color to highlight quotations from other
- messages.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Deleting Mail</term>
- <listitem>
- <para>
- Here, choose whether to delete messages automatically
- when quitting Evolution, and whether you wish to
- explicitly confirm the final deletion of messages.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>New Mail Notification</term>
- <listitem>
- <para>
- Evolution can alert you to the arrival of new mail with
- a beep or by playing a sound file. Choose your alert
- noise, or select none, as you wish.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- <para>
- The options in the <guilabel>HTML Mail</guilabel> section are:
- <variablelist>
-
- <varlistentry>
- <term>Loading Images</term>
- <listitem>
- <para>
- You can embed a image in an email and have it load only
- when the message arrives. However, spammers can use image loading
- patterns to confirm "live" addresses and invade your
- privacy. You may elect never to load images
- automatically, to load images only if the sender is in
- your addressbook, or always load images.
- </para>
- <para>
- If you have chosen not to load images automatically, you
- can choose to see the images in one message at a time by selecting <menuchoice>
- <guimenu>View</guimenu><guisubmenu>Message Display</guisubmenu>
- <guimenuitem>Load Images</guimenuitem></menuchoice>.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Show animated images</guilabel></term>
- <listitem>
- <para>
- Turn animation on or off here.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Prompt when sending HTML messages to contacts that don't want them</guilabel></term>
- <listitem>
- <para>
- Some people do not like HTML mail, and you can set
- Evolution to warn you. This warning will appear only
- when you send HTML mail to people in your address book
- who are listed as disliking HTML.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- <para>
- The <guilabel>Colors</guilabel> tab lets you select different
- color labels for individual messages. You can return to the default
- settings by clicking the <guibutton>Restore Defaults</guibutton>
- button.
- </para>
-</sect1>
-
-
- <sect1 id="config-prefs-mail-composer">
- <title>Message Composer Preferences</title>
- <para>
- There are three tabs of settings you can change for the
- message composer. The <guilabel>General</guilabel> tab covers shortcuts and
- assorted behavior, and the other two control signatures and
- spell checking. In the <guilabel>General</guilabel> tab, you can set:
-
- <variablelist>
-
- <varlistentry>
- <term><guilabel>Default Behavior</guilabel></term>
- <listitem>
- <para>
- Choose how you will normally forward and reply
- messages, what character set they will use, whether
- they will be in HTML, and whether that HTML can
- contain smiley face images.
- </para>
- </listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guilabel>Alerts</guilabel></term>
- <listitem>
- <para>
- There are two optional alerts here:
- <variablelist>
- <varlistentry>
- <term><guilabel>Prompt when sending messages with an empty subject</guilabel></term>
- <listitem>
- <para>
- The composer will warn you if you try to send a
- message without a subject.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Prompt when sending messages with only Bcc recipients defined</guilabel></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>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
-
- <para>
- The signature editor allows you to create several different
- signatures in plain text or in HTML, and to specify which of
- them will be added to emails you create in the message
- composer. If you prefer to use an alternate signature or
- none at all, you can select it from the mail composer itself.
- </para>
- <para>
- In the spell-checking tool, you can set spelling options,
- including the language or languages you will use. Note that you
- must install the gnome-spell package, available through Red
- Carpet, for spell-checking to be available in
- Evolution. Alternate dictionaries are also available through
- Red Carpet and are detected automatically if you have installed
- them.
- </para>
- <para>
- You can check the spelling of messages by selecting
- <menuchoice><guimenu>Edit</guimenu><guimenuitem>Spell Check
- Document</guimenuitem></menuchoice>. Alternately, in the
- Evolution main window select
- <menuchoice><guimenu>Tools</guimenu><guisubmenu>Settings</guisubmenu></menuchoice>,
- click on the <guiicon>Composer preferences</guiicon> icon, then
- select the <guilabel>Spell Checking</guilabel> tab and check the
- <guibutton>Check spelling while i type</guibutton> box, and
- choose a color for your misspelled words.
- </para>
-</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>
--->
-
-
- <sect1 id="config-prefs-cal">
- <title>Calendar and Task List Settings</title>
- <para>
- The calendar configuration tool has two tabs
- <guilabel>General</guilabel> and
- <guilabel>Display</guilabel>, and is illustrated in <xref
- linkend="config-prefs-cal-fig"/>.
-
- <!-- ==============Figure===================== -->
- <figure id="config-prefs-cal-fig">
- <title>Calendar Preferences Dialog</title>
- <screenshot>
- <screeninfo>Calendar Configuration</screeninfo>
- <mediaobject><imageobject><imagedata fileref="figures/config-cal" format="PNG" srccredit="Aaron Weber"/>
- </imageobject></mediaobject>
- </screenshot>
- </figure>
- <!-- ==============End of Figure================-->
- </para>
-
- <para>
- The <guilabel>General</guilabel> tab lets you set the
- following:
- <variablelist>
- <varlistentry>
- <term><guilabel>Time zone</guilabel></term>
- <listitem>
- <para>
- The city you're located in, to judge your time zone.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Time format</guilabel></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><guilabel>Work Week</guilabel></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>
- <varlistentry>
- <term><guilabel>Week Starts</guilabel></term>
- <listitem>
- <para>You can set weeks to start on Sunday or on Monday.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Day Begins</guilabel></term>
- <listitem>
- <para>
- Set the beginning of a normal workday. If you work odd
- hours, or want to make sure that your early-morning
- appointments are displayed, you may find this option useful.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Day Ends</guilabel></term>
- <listitem>
- <para>
- Set the end of a normal workday. If you work odd
- hours, or want to make sure that your evening
- appointments are displayed, you may find this option
- useful.
- </para>
- </listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guilabel>Alerts</guilabel></term>
- <listitem>
- <para>
- If you'd like to be warned before you delete any
- appointment, or to have a reminder automatically
- appear for each event, select the check boxes here.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
-
- <para>
- The <interface>Display</interface> section lets you choose how
- your appointments and tasks will appear in your calendar.
- </para>
- <para>The display properties you can set are:
-
- <variablelist>
- <varlistentry>
- <term><guilabel>Time divisions</guilabel></term>
- <listitem>
- <para>
- Sets the increments shown on the daily view in the
- calendar. You can set this to be anywhere from five
- minutes to an hour, in five minute increments.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Show appointment end times in week and month views</guilabel></term>
- <listitem>
- <para>
- If there is space,
- <application>Evolution</application> will show the end
- times in the week and month views for each
- appointment.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Compress weekends in month view</guilabel></term>
- <listitem>
- <para>
- If checked, your weekends will be shown in one box,
- instead of one for each day in the month view.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Show week numbers in date navigator</guilabel></term>
- <listitem>
- <para>
- This will show the week numbers next to the respective
- weeks in the calendar.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Tasks due today</guilabel></term>
- <listitem>
- <para>
- Configures what color to set your tasks that are due
- today to.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Overdue tasks</guilabel></term>
- <listitem>
- <para>
- Choose the color for overdue tasks.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect1>
- <sect1 id="config-prefs-contact">
- <title>Directory Server Settings</title>
- <para>
- Addressbook settings are limited to the usage and
- configuration of directory servers (LDAP and
- Exchange). To learn how to set autocompletion options, see <xref
- linkend="config-prefs-folders" />.
- Other addressbook controls are available in the addressbook
- window itself.
- </para>
-
- <para>
- To add a new <glossterm linkend="ldap">LDAP</glossterm> server
- to your available contact folders:
- </para>
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Select
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenuitem>Settings</guimenuitem>
- </menuchoice>
- and click the <guibutton>Directory Servers</guibutton>
- shortcut button.
- </para>
- </listitem>
- <listitem>
- <para>
- Click the <guibutton>Add</guibutton> button on the right
- side to open a Directory Server addition assistant.
- </para>
- </listitem>
- <listitem>
- <para>
- Enter the server information as requested by the assistant:
- <variablelist>
- <varlistentry>
- <term>Server name</term>
- <listitem>
- <para>
- Address of the server where the addressbook is located.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Login Method</term>
- <listitem>
- <para>
- Specify whether your login is anonymous, using
- an email address, or a "distinguished name." If
- the login is not anonymous, enter the login name
- required by the server.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Port</term>
- <listitem>
- <para>
- The internet port
- <application>Evolution</application> connects to
- in order to access the LDAP database. This is
- normally 389.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Use SSL/TLS</term>
- <listitem>
- <para>
- SSL and TLS are security mechanisms. If you
- select <guilabel>Always</guilabel>, Evolution
- will not connect unless
- secure connections are available. The default value is
- <guilabel>Whenever Possible</guilabel>, which uses
- secure connections if they are available,
- but does not cause failure if they are not.
- </para>
- </listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term>Search base</term>
- <listitem>
- <para>
- The <glossterm linkend="search-base">search
- base</glossterm> is the starting point for a directory search.
- Contact your network administrator for information about
- the correct settings.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Search scope</term>
- <listitem>
- <para>
- The <glossterm linkend="search-scope">search
- scope</glossterm> is the breadth of a given search.
- The following options are available:
- <variablelist>
- <varlistentry>
- <term><guilabel>One</guilabel></term>
- <listitem>
- <para>
- Searches the Search Base and one entry
- below it.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Sub</guilabel></term>
- <listitem>
- <para>
- Searches the Search Base and all entries
- below it.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Timeout Limit</term>
- <listitem>
- <para>
- This is the maximum time Evolution will attempt to
- download data from the server before giving up.
- </para>
- </listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term>Download Limit</term>
- <listitem>
- <para>
- Set the maximum number of results for a given
- search. Most servers refuse to send more than
- 500, but you can set the number lower if you
- want to shorten downloads for very broad
- searches.
- </para>
- </listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term>Display name</term>
- <listitem>
- <para>
- This is the name you will use to label this
- folder, and may be any name you choose.
- </para>
- </listitem>
- </varlistentry>
-
- </variablelist>
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guibutton>OK</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guibutton>OK</guibutton> to permanently make
- changes or <guibutton>Apply</guibutton> to temporarily
- set the changes.
- </para>
- </listitem>
- </orderedlist>
- <para>
- Editing a directory server account means changing that same
- information, although it is displayed in a slightly different order.
- </para>
- </sect1>
-
-
-</chapter> \ No newline at end of file
diff --git a/help/C/config-sync.xml b/help/C/config-sync.xml
deleted file mode 100644
index 6a6503a670..0000000000
--- a/help/C/config-sync.xml
+++ /dev/null
@@ -1,138 +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>Ximian Evolution</application> only
- supports Palm-OS devices like the Palm Pilot 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. You will need to make sure that you have
- read and write permissions on the device, which is normally
- /dev/pilot. If that does not work, check /dev/ttyS0 if you have
- a serial connection, or /dev/ttyUSB0 for a USB connection. You
- can do this by becoming root and running the command:
- <userinput>chmod 777 /dev/ttyUSB0</userinput>.
- </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 labeled <guilabel>EAddress</guilabel>, for the
- contacts in your addressbook, <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-1.5-C.omf b/help/C/evolution-1.5-C.omf
deleted file mode 100644
index 7637831592..0000000000
--- a/help/C/evolution-1.5-C.omf
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<omf>
- <resource>
- <creator>
- Ximian, Inc.
- </creator>
- <title>
- User's Guide to Ximian Evolution 1.4
- </title>
- <date>2002-2003</date>
- <subject category="GNOME|Applications"/>
- <description>
- A user's guide to Ximian Evolution which explains how to use
- its mail, calendar, addressbook, and task list features.
- </description>
- <type>
- manual
- </type>
- <format mime="text/xml" dtd="-//OASIS//DTD DocBook XML V4.1.2//EN"/>
- <identifier url="/"/>
- <language code="C"/>
- <relation seriesid="83434cc6-71d1-11d7-9b12-ef76b8cf7c8f" />
- <rights type="GNU FDL" license.version="1.1" license="http://www.gnu.org/licenses/fdl.html" holder="Ximian, Inc."/>
- </resource>
-</omf>
diff --git a/help/C/evolution-1.5.xml b/help/C/evolution-1.5.xml
deleted file mode 100644
index 654a177da1..0000000000
--- a/help/C/evolution-1.5.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-<?xml version='1.0' ?>
-
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
-
-<!ENTITY GFDL SYSTEM "apx-fdl.xml">
-<!ENTITY LEGAL SYSTEM "legal.xml">
-<!ENTITY GPL SYSTEM "apx-gpl.xml">
-<!ENTITY PREFACE SYSTEM "preface.xml">
-<!ENTITY USAGE-MAINWINDOW SYSTEM "usage-mainwindow.xml">
-<!ENTITY USAGE-EXEC-SUMMARY SYSTEM "usage-exec-summary.xml">
-<!ENTITY USAGE-MAIL SYSTEM "usage-mail.xml">
-<!ENTITY USAGE-MAIL-ORG SYSTEM "usage-mail-org.xml">
-<!ENTITY USAGE-CONTACT SYSTEM "usage-contact.xml">
-<!ENTITY USAGE-CALENDAR SYSTEM "usage-calendar.xml">
-<!ENTITY USAGE-EXCHANGE SYSTEM "usage-exchange.xml">
-<!ENTITY USAGE-SYNC SYSTEM "usage-sync.xml">
-<!ENTITY USAGE-PRINT SYSTEM "usage-print.xml">
-<!ENTITY CONFIG-PREFS SYSTEM "config-prefs.xml">
-<!ENTITY CONFIG-SYNC SYSTEM "config-sync.xml">
-<!ENTITY MENUREF SYSTEM "menuref.xml">
-<!ENTITY APX-GLOSS SYSTEM "apx-gloss.xml">
-<!ENTITY APX-COMMON-TASKS SYSTEM "apx-common-tasks.xml">
-<!ENTITY APX-BUGS SYSTEM "apx-bugs.xml">
-<!ENTITY APX-AUTHORS SYSTEM "apx-authors.xml">
-
-<!ENTITY appversion "1.4">
-<!ENTITY docversion "1.4">
-<!ENTITY pubdate "May, 2003">
-
-]>
-
-<!-- Almost every chapter is an entity. Files, Chapter id's, and
-entity names correspond. APX is for appendix. -->
-
-<book id="index">
- <bookinfo>
- <title>A User's Guide to Ximian Evolution 1.4</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>2000-2003</year>
- <holder>Ximian, Inc.</holder>
- </copyright>
-
- <releaseinfo>
- This is version &docversion; of the Ximian Evolution manual. It describes
- version &appversion; of the Ximian Evolution groupware suite.
- </releaseinfo>
-
-
- <legalnotice id="legalnotice">
- <para>
- Please note that legal and licensing information is in <xref
- linkend="preface" /> due to formatting issues with its
- previous location.
- </para>
- </legalnotice>
- </bookinfo>
-
-
- <preface id="preface">
- <title>Preface</title>
- &LEGAL;
- &PREFACE;
- </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-EXCHANGE;
- &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" means that, while you
- can expect the program to work perfectly well with the 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 guide to obscure
- preferences settings.
- </para>
- </partintro>
-
- &CONFIG-PREFS;
- &CONFIG-SYNC;
- </part>
-
- &MENUREF;
- &APX-GLOSS;
- &APX-BUGS;
- &APX-AUTHORS;
- &GPL;
- &GFDL;
-
-</book> \ No newline at end of file
diff --git a/help/C/figures/calendar.png b/help/C/figures/calendar.png
deleted file mode 100644
index 58f4520ee4..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 3396ef3a8b..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 2fc30c6613..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 0fbf3fe168..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 ef224f238e..0000000000
--- a/help/C/figures/contact.png
+++ /dev/null
Binary files differ
diff --git a/help/C/figures/exchange-delegation.png b/help/C/figures/exchange-delegation.png
deleted file mode 100644
index 24664a45c9..0000000000
--- a/help/C/figures/exchange-delegation.png
+++ /dev/null
Binary files differ
diff --git a/help/C/figures/exchange-identity.png b/help/C/figures/exchange-identity.png
deleted file mode 100644
index ea8f26ff56..0000000000
--- a/help/C/figures/exchange-identity.png
+++ /dev/null
Binary files differ
diff --git a/help/C/figures/exchange-receive-options.png b/help/C/figures/exchange-receive-options.png
deleted file mode 100644
index 875b948262..0000000000
--- a/help/C/figures/exchange-receive-options.png
+++ /dev/null
Binary files differ
diff --git a/help/C/figures/exchange-receive.png b/help/C/figures/exchange-receive.png
deleted file mode 100644
index 2b1e26e825..0000000000
--- a/help/C/figures/exchange-receive.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 a37bfd00a0..0000000000
--- a/help/C/figures/filter-new-fig.png
+++ /dev/null
Binary files differ
diff --git a/help/C/figures/folder-bar.png b/help/C/figures/folder-bar.png
deleted file mode 100644
index c2cabe61fa..0000000000
--- a/help/C/figures/folder-bar.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-druid-pic.png b/help/C/figures/mail-druid-pic.png
deleted file mode 100644
index e88dcb78e4..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 77c5b4de97..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 8239c9e599..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 777df026b1..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 78b56f2518..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 d8fcbff75a..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 7745d53553..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 6e7fc916c8..0000000000
--- a/help/C/figures/replymsg.png
+++ /dev/null
Binary files differ
diff --git a/help/C/figures/schedule.png b/help/C/figures/schedule.png
deleted file mode 100644
index de542ce086..0000000000
--- a/help/C/figures/schedule.png
+++ /dev/null
Binary files differ
diff --git a/help/C/figures/summary.png b/help/C/figures/summary.png
deleted file mode 100644
index 03781dc548..0000000000
--- a/help/C/figures/summary.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 2d18741960..0000000000
--- a/help/C/figures/vfolder-createrule-fig.png
+++ /dev/null
Binary files differ
diff --git a/help/C/legal.xml b/help/C/legal.xml
deleted file mode 100644
index e3591f6fb5..0000000000
--- a/help/C/legal.xml
+++ /dev/null
@@ -1,99 +0,0 @@
-
- <sect1 id="legal-info-note">
- <title>Legal Information and Licensing</title>
-
-<!-- normally this content belongs in the actual "legalnotice" tag,
- but for formatting reasons putting it in a sect1, inside the
- Preface, and adding a paragraph to the beginning of it -->
-
- <note id="evo-is-free-software">
- <title>Ximian Evolution is Free Software</title>
- <para>
- Ximian Evolution is licensed under the terms of the GNU General
- Public License (GPL), and its documentation is licensed
- separately
- under the GNU Free Documentation License (GFDL). You can find a the
- complete text of the GPL in <xref linkend="apx-gpl" />, and of the
- GFDL in <xref linkend="apx-fdl"/>. The licenses are also available
- in the files COPYING and COPYING-DOCS distributed with this
- software. The Ximian Connector for Microsoft Exchange 2000 is
- proprietary software and is subject to a different license. Copyright
- for all three pieces of software and their documentation belongs to
- Ximian, Inc.
- </para>
- </note>
- <para>
-
- Permission is granted to copy, distribute and/or modify this
- document under the terms of the GNU Free Documentation
- License (GFDL), 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 can find
- a copy of the GFDL in <xref linkend="apx-fdl"/> or in the
- file COPYING-DOCS distributed with this manual.
- </para>
- <para> This manual is part of a collection of GNOME manuals
- distributed under the GFDL. If you want to distribute this
- manual separately from the collection, you can do so by
- adding a copy of the license to the manual, as described in
- section 6 of the license.
- </para>
-
- <para>
- Ximian is a registered trademark and Ximian Evolution, the
- dancing monkey logo and the Ximian capsule logo are
- trademarks of Ximian, Inc. Other names may be trademarks or
- registered trademarks of other companies or
- organizations. Where those names appear in any GNOME
- documentation, and the members of the GNOME Documentation
- Project are made aware of those trademarks, then the names
- are in capital letters or initial capital letters.
- </para>
-
- <para>
- DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT ARE PROVIDED
- UNDER THE TERMS OF THE GNU FREE DOCUMENTATION LICENSE
- WITH THE FURTHER UNDERSTANDING THAT:
- </para>
- <orderedlist>
- <listitem>
- <para>DOCUMENT IS PROVIDED ON AN "AS IS" BASIS,
- WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
- IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES
- THAT THE DOCUMENT OR MODIFIED VERSION OF THE
- DOCUMENT IS FREE OF DEFECTS MERCHANTABLE, FIT FOR
- A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE
- RISK AS TO THE QUALITY, ACCURACY, AND PERFORMANCE
- OF THE DOCUMENT OR MODIFIED VERSION OF THE
- DOCUMENT IS WITH YOU. SHOULD ANY DOCUMENT OR
- MODIFIED VERSION PROVE DEFECTIVE IN ANY RESPECT,
- YOU (NOT THE INITIAL WRITER, AUTHOR OR ANY
- CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY
- SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
- OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
- LICENSE. NO USE OF ANY DOCUMENT OR MODIFIED
- VERSION OF THE DOCUMENT IS AUTHORIZED HEREUNDER
- EXCEPT UNDER THIS DISCLAIMER; AND
- </para>
- </listitem>
- <listitem>
- <para>UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL
- THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE),
- CONTRACT, OR OTHERWISE, SHALL THE AUTHOR,
- INITIAL WRITER, ANY CONTRIBUTOR, OR ANY
- DISTRIBUTOR OF THE DOCUMENT OR MODIFIED VERSION
- OF THE DOCUMENT, OR ANY SUPPLIER OF ANY OF SUCH
- PARTIES, BE LIABLE TO ANY PERSON FOR ANY
- DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR
- CONSEQUENTIAL DAMAGES OF ANY CHARACTER
- INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
- OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR
- MALFUNCTION, OR ANY AND ALL OTHER DAMAGES OR
- LOSSES ARISING OUT OF OR RELATING TO USE OF THE
- DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT,
- EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF
- THE POSSIBILITY OF SUCH DAMAGES.
- </para>
- </listitem>
- </orderedlist>
- </sect1> \ No newline at end of file
diff --git a/help/C/menuref.xml b/help/C/menuref.xml
deleted file mode 100644
index c9365a94e0..0000000000
--- a/help/C/menuref.xml
+++ /dev/null
@@ -1,397 +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>
-
-
- <sect1 id="quickref-open">
- <title>Opening or Creating Anything</title>
- <para>
- <variablelist>
-
-
- <varlistentry>
- <term>New Item:</term>
- <listitem>
- <para>
- Press <keycombo action="simul"> <keycap>Ctrl</keycap>
- <keycap>N</keycap> </keycombo> to open a new item
- for whatever part of <application>Ximian
- Evolution</application> you're working on. In mail,
- that means you'll create a new message. If you're
- looking at your addressbook, <keycombo
- action="simul"> <keycap>Ctrl</keycap>
- <keycap>N</keycap> </keycombo> creates a new contact
- card, and in the calendar, a new appointment.
- </para>
- </listitem>
- </varlistentry>
-
-
- <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>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>]</keycap> or <keycap>.</keycap> to jump to the next unread
- message. <keycap>[</keycap> or <keycap>,</keycap> goes to the previous
- unread message. Use the arrow keys to move up
- and down along the list of all messages.
- </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 <keycap>Return</keycap>
- <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>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>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>
-
- <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>Addressbook</title>
- <para>
- Here are shortcuts for the most frequent addressbook actions:
- <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 toolbar.
- </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.xml b/help/C/preface.xml
deleted file mode 100644
index 2d49b50e26..0000000000
--- a/help/C/preface.xml
+++ /dev/null
@@ -1,218 +0,0 @@
-
-<!-- The actual preface tag is in the evolution.xml file -->
- <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>, which 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 buttons and other portions of the graphical interface</member>
-
- <member> Menu selections look like this:
- <menuchoice>
- <guimenu>Menu</guimenu>
- <guisubmenu>Submenu</guisubmenu>
- <guimenuitem>Menu Item</guimenuitem>
- </menuchoice>
- </member>
- <member><guibutton>Buttons</guibutton> you can
- click</member> <member><userinput>Anything you type
- in</userinput></member> <member><computeroutput>Text
- output from a computer</computeroutput></member>
- <member><glossterm linkend="apx-gloss">Words</glossterm>
- that are defined in the <xref linkend="apx-gloss"/>.</member>
- </simplelist>
-</para>
-<para>
-We'll provide assorted bits of additional information in tips set off from the rest of the book, as well.
-
- <tip id="example-tip">
- <title>Tip</title>
- <para>
- Tips and bits of extra information will look like
- this.
- </para>
- </tip>
-</para>
-
-<para>
-Examples are also set off from the rest of the text. They look like this:
-
- <example>
- <title>Example Example</title>
- <para>
- This is what an example looks like. We'll provide
- examples for some of the more complicated tasks you
- might be performing.
- </para>
- </example>
-</para>
-<para>
- Lastly, we'll have warnings, in cases where you should be careful:
-
- <warning id="example-warning">
- <title>Example Warning</title>
- <para>
- This is what a warning looks like. If there's a chance
- you'll run into trouble, we'll warn you beforehand.
- </para>
- </warning>
- </para>
- </sect1>
-
-
- <sect1 id="other-help">
- <title>Additional Help Sources</title>
- <para>
- You can find additional help in three places. For information
- about command-line options, open a terminal window and type
- <command> man evolution</command> or <command>evolution
- --help</command>. For support, late-breaking news, and errata,
- visit the Ximian support center at <ulink
- url="http://support.ximian.com">support.ximian.com</ulink>.
- </para>
- </sect1>
-
- <sect1 id="whats-new-in-one-two">
- <title>What's New in Evolution &appversion;</title>
- <para>
- If you're already familiar with Ximian Evolution 1.2, there
- are a number of new features in this version. Most of the
- changes, however, have been made behind the scenes, as we
- moved to the GNOME 2 platform. Ximian Connector for Microsoft
- Exchange also has new features, described in <xref linkend="new-in-connector" />.
- You can find a complete list of bugs fixed and features added
- in the Evolution release notes at the <ulink
- url="http://developer.ximian.com">Ximian Developer
- Website</ulink>. Some of the features include:
- </para>
- <variablelist>
- <varlistentry>
- <term>Better Fonts</term>
- <listitem>
- <para>
- Ximian Evolution &appversion; uses the same font
- smoothing technology as the rest of your GNOME 2
- desktop.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Cleaner Shutdowns</term>
- <listitem>
- <para>
- We have fixed several bugs that caused Evolution to
- continue to occupy system resources when it was not
- running.
- </para>
- </listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term>Mail Composer HTML Improvements</term>
- <listitem>
- <para>
- The message composer has continued to improve.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>New Graphics and Icons</term>
- <listitem>
- <para>
- We've added new graphics and icons.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </sect1>
-
- <sect1 id="preface-for-experts">
- <title>Introductory Tips for Experienced Users</title>
- <para>
- This section has a few tips for experienced users of Linux or
- UNIX systems:
- </para>
- <variablelist>
- <varlistentry>
- <term>Backups and File Locations</term>
- <listitem>
- <para>
- To create a backup of your Evolution data, copy the
- <guilabel>~/evolution/local/</guilabel> directory to
- your backup disk. To access data you
- have backed up, use the <guilabel>Import</guilabel> tool to
- restore individual files as needed.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Default Browsers</term>
- <listitem>
- <para>
- To set the browser that opens when you click a link in
- an email, open the GNOME preferences tool
- (<menuchoice><guimenu>System</guimenu><guimenuitem>Settings</guimenuitem></menuchoice>
- or <command>gnome-control-center</command>) and start the
- <guilabel>File Associations</guilabel> tool. There, look under
- <guilabel>Internet Services</guilabel>, select
- <guilabel>World wide web (http)</guilabel>, and select
- the browser of your choice. If you wish to use a
- browser other than the ones suggested, you will need to
- enter the full shell command. For example you might use
- <userinput>mybrowser "%s"</userinput> to start the
- mybrowser program at the right page.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Making Evolution Your Default Mail Client</term>
- <listitem>
- <para>
- For GNOME desktops, you can set
- <application>Evolution</application> to be the default
- mail client, so that it opens when you click a mailto:
- link in web pages and help tools. To do that, open the
- GNOME preferences tool and start the <guilabel>File
- Associations</guilabel> tool. There, look under
- <guilabel>Internet Services</guilabel>, select
- <guilabel>Electronic mail transmission
- (mailto)</guilabel>, and select
- <application>Evolution</application> from the drop-down
- list.
- </para>
- <para>
- For applications such as Mozilla and Netscape, which do
- not use the GNOME preference tools, you will need to
- find the protocol handler preference tool for that
- application and enter <userinput>evolution
- "%s"</userinput> as your choice for handling mailto links.
- </para>
- </listitem>
- </varlistentry>
-
- </variablelist>
- </sect1>
-
diff --git a/help/C/topic.dat b/help/C/topic.dat
deleted file mode 100644
index cf9f0ec017..0000000000
--- a/help/C/topic.dat
+++ /dev/null
@@ -1,11 +0,0 @@
-index.html Table of Contents
-introduction.html Introduction
-usage-mainwindow.html Getting Started
-usage-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
-usage-exchange.html Connecting to Exchange Servers
-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.xml b/help/C/usage-calendar.xml
deleted file mode 100644
index 88c2f05571..0000000000
--- a/help/C/usage-calendar.xml
+++ /dev/null
@@ -1,761 +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
- peers. To learn about importing calendar data, see <xref
- linkend="importing-mail" />, which covers the Import tool.
- </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>
-</para>
-<para>
- Press the calendar-shaped buttons on the right side of the toolbar to
- switch between views.
-</para>
-<para>
- You can also select an arbitrary range of days in the small
- calendar at the upper right. To do this, click and drag on the
- days that you wish to view in your calendar.
- </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 or
- month, you'll move around by just that much.
- To come back to today's listing, click the
- <guibutton>Today</guibutton> button in the toolbar.
- </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. If you have installed the Ximian Connector for
- Microsoft Exchange, you can also read <xref
- linkend="full-advantage"/> to learn about how to take full
- advantage of the collaborative group scheduling functions
- available on the Microsoft Exchange Server.
- </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 Appointment</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 (by
- default, today) 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>
- <para>
- <application>Evolution</application> supports the use of
- timezones. If you share calendar files with friends or
- co-workers, it is quite possible you will need to configure
- your timezone. To configure your timezone:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Select
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenuitem>Settings</guimenuitem> </menuchoice>, and
- click the <guilabel>Calendar And Tasks</guilabel> icon
- in the settings dialog.
- </para>
- </listitem>
- <listitem>
- <para>
- Click the <guibutton>Globe</guibutton> button in the
- <guilabel>Time</guilabel> section, located in the
- <guilabel>General</guilabel> tab.
- </para>
- </listitem>
- <listitem>
- <para>
- Each red dot represents a major city. Click a dot and click <guibutton>OK</guibutton> to select your time zone.
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para>
- You can also configure timezone information specific to the
- Start and End time in each appointment. To do that, simply
- create a new appointment and click on a globe to customize the
- timezone that the time exists in. For example, if you live in
- New York but have a telephone meeting set for noon with
- someone in California, you need to make sure that you're not
- calling each other a few hours off. Setting time-zones on a
- per-appointment basis helps avoid that potential confusion.
- </para>
- <note>
- <title>Multiple Simultaneous 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 several
- <guilabel>Reminders</guilabel>, any time prior to the appointment
- you've scheduled. You can have one reminder 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>
- </variablelist>
- </para>
-
-
- <note id="reminders-when-not-running-evo">
- <title>Reminders Without Evolution</title>
- <para>
- If you have stored reminders in a local calendar, they
- will work from the moment you log in. However, for reminders
- stored on an Exchange server, you must run Evolution at
- least once after logging in. No matter where the reminders
- are stored, you can quit Evolution and still be reminded of
- an upcoming appointment.
- </para>
- </note>
-
- <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> can handle free/busy
- scheduling Using the Ximian Connector on a Microsoft Exchange
- 2000 server. For more information about Ximian Connector, see
- <xref linkend="usage-exchange"/>.
- </para>
- <para>
- To set your appointment to be free or busy, simply click the
- box in the <guilabel>Show Time As</guilabel> section in the
- <guilabel>Appointment Editor</guilabel>.
- </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, in the calendar view,
- 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>Open</guimenuitem>.
- </para>
- </sect2>
- <sect2 id="usage-calendar-rsvp">
- <title>Sending an RSVP with the Calendar</title>
- <para>
- <application>Evolution</application> can be used to schedule
- group meetings and help you manage responses to meeting
- requests.
- </para>
- <para>
- When you create a meeting or group appointment, you can
- specify the attendees in several categories, such as "chair"
- or "required." When you save the appointment listing, each
- attendee will be sent an email with the appointment
- information and gives them the option to respond.
- </para>
-
- <note id="meeting-announce">
- <title>Simple Announcements</title>
- <para>
- If you don't need to collect attendance information when
- you're scheduling an event, and would rather just announce
- it, select
- <menuchoice><guimenu>Actions</guimenu><guimenuitem>Forward
- as iCalendar</guimenuitem></menuchoice>. That will open a
- new email message with the event notification attached as
- an announcement. Recipients will be able to add the event
- to their calendars with one click, but won't automatically
- send you email about whether they'll attend.
- </para>
- </note>
-
- <para>
- To schedule a meeting:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Select
- <menuchoice>
- <guimenu>Actions</guimenu> <guimenuitem>Schedule
- Meeting</guimenuitem> </menuchoice>. The
- <guilabel>Scheduling</guilabel> and
- <guilabel>Meeting</guilabel> tabs open.
- </para>
- </listitem>
- <listitem>
- <para>
- If you have multiple Evolution email accounts, choose the
- one you'll use by selecting an item in the
- <guilabel>Organizer</guilabel> field.
- </para>
- </listitem>
- <listitem>
- <para>
- Click the space labeled <guilabel>Click here to add an
- attendee</guilabel> to enter the names and email
- addresses of people you will invite, or click the
- <guibutton>Invite Others</guibutton> to select them from
- your addressbook.
- </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 a Meeting Request</title>
- <para>
- Meeting requests are sent as iCal attachments. To view or
- respond to one, click on the attachment icon and view it
- inline in the mail window. All the details are shown about
- the event including time and dates. Then you can choose how
- to reply to the invitation. Your choices are:
- <itemizedlist>
- <listitem>
- <para>
- <guilabel>Accept</guilabel>
- </para>
- </listitem>
- <listitem>
- <para>
- <guilabel>Tentatively Accept</guilabel>
- </para>
- </listitem>
- <listitem>
- <para>
- <guilabel>Decline</guilabel>
- </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>
-
- <para>
- Note, however, that if you add a meeting to your calendar,
- there are some limitations: only the organizer of a meeting
- can add participants in a meeting. Your only options, as a
- participant, are to accept the meeting, or decline it.
- </para>
- <para>
- Once you have added the meeting to your calendar, you can make
- changes to your copy &mdash;change the description, mark yourself
- the organizer, invite more people, and so forth&mdash; but be aware
- that if the original organizer sends out another update, your
- changes may be overwritten.
- </para>
- <note id="organizer-only-one">
- <title>There Can Be Only One</title>
- <para>
- A meeting can have only one organizer. You can designate
- yourself the organizer of the meeting, but unless you
- coordinate that action with the organizer you are replacing,
- you could create confusion in the scheduling process. If you
- want to invite additional people to a meeting without
- changing the organizer, it's best to forward the first
- organizer's message to the additional participants.
- </para>
- </note>
- </sect2>
-
- <sect2 id="receiving-rsvp-response">
- <title>Getting Responses to Meeting Requests</title>
- <para>
- Once you get a reply to your meeting invitation, you'll need
- to view it inline in the email. Click the attachment and
- select <guimenuitem>View Inline</guimenuitem>. At the bottom, you
- can 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 ############ -->
- <sect2 id="usage-calendar-freebusy">
- <title>Scheduling Meetings and The Free/Busy View</title>
- <para>
- In addition to the standard meeting scheduling tools, you can
- use the Free/Busy view to check whether people are available
- in advance. At this time, the Free/Busy feature only works
- with Microsoft Exchange servers. However, you can still use
- iCal event invitations to coordinate schedules with other
- people no matter what server you're using.
- </para>
- <para>
- To access the free/busy view:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Open or create an appointment in the
- <guilabel>Calendar</guilabel> window.
- </para>
- </listitem>
- <listitem>
- <para>
- Click
- <menuchoice>
- <guimenu>Actions</guimenu>
- <guimenuitem>Schedule Meeting</guimenuitem>
- </menuchoice>
- </para>
- </listitem>
- <listitem>
- <para>
- Open the <guilabel>Scheduling</guilabel> tab.
- </para>
- </listitem>
- </orderedlist>
- </para>
-
- <figure>
- <title>Appointment Scheduling Window</title>
- <screenshot>
- <screeninfo>Appointment Scheduling Window</screeninfo>
- <mediaobject><imageobject>
- <imagedata format="PNG" fileref="figures/schedule" srccredit="Kevin Breit"/>
- </imageobject></mediaobject>
- </screenshot>
- </figure>
-
- <para>
- <inlinemediaobject>
- <imageobject>
- <imagedata fileref="figures/full-1" format="PNG"/>
- </imageobject>
- </inlinemediaobject>
- <guilabel>Attendee List</guilabel>
- </para>
- <para>
- The <guilabel>Attendee List</guilabel> lists off the people who
- have been invited to the respective appointment. It also
- shows their RSVP status.
- </para>
- <para>
- <inlinemediaobject>
- <imageobject>
- <imagedata fileref="figures/full-2" format="PNG"/>
- </imageobject>
- </inlinemediaobject>
- <guilabel>Schedule Grid</guilabel>
- </para>
- <para>
- The <guilabel>Schedule Grid</guilabel> shows the invitee's
- published Free/Busy information. This is where you compare
- people's schedules to find free time to schedule the
- appointment.
- </para>
- <para>
- <inlinemediaobject>
- <imageobject>
- <imagedata fileref="figures/full-3" format="PNG"/>
- </imageobject>
- </inlinemediaobject>
- <guilabel>Meeting Scheduler</guilabel>
- </para>
- <para>
- The <guilabel>Meeting Scheduler</guilabel> allows you to
- schedule the meeting in the <guilabel>Free/Busy</guilabel> window.
- </para>
- <sect3 id="usage-calendar-freebusy-scheduling">
- <title>Scheduling an Appointment</title>
- <para>
- To schedule an appointment, you'll first need people's
- free/busy information. If you're using the Ximian Connector
- for Microsoft Exchange, all of the information is already
- available to you in the Global Address List. Otherwise, each
- person will have to email you their schedule files and you
- will have to incorporate them into your calendar.
- </para>
- <para>
- Regardless of how you get the information, Ximian Evolution
- will display it in the <guilabel>Scheduling</guilabel> tab.
- The pending appointment time will appear in white with bold
- black borders. Each attendee's free and busy times appear
- color-coded next to their names in the attendee list.
- </para>
- <para>
- Adjust the meeting time, either by dragging the meeting
- borders or by using the <guilabel>Autopick</guilabel>
- buttons to choose a time automatically, then click
- <guibutton>Save and Close</guibutton>. Attendees on an
- Exchange server will have the appointment updated
- automatically; others will receive email notification of any
- change in plans.
- </para>
-
- <para>
- Read <xref linkend="full-advantage"/> to learn about how to
- use this feature with the Ximian Connector for Microsoft
- Exchange.
- </para>
- </sect3>
- </sect2>
-
- </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. You can use the list
- in a larger window 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 <guibutton>time</guibutton> drop-down menus.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Start Date:</guilabel></term>
- <listitem>
- <para>
- The date you intend to start working.
- </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 right click on it and select <guibutton>Open</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>
- <sect2 id="task-folders">
- <title>Folders for Your Tasks</title>
- <para>
- Like any other component in
- <application>Evolution</application>, you can create a folder
- to help organize your tasks. To do this:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Open the <guilabel>Folders Bar</guilabel>.
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guibutton>Tasks</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para>
- Right click on <guibutton>Tasks</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para>
- Click <menuchoice><guimenuitem>Create New Folder</guimenuitem></menuchoice>.
- </para>
- </listitem>
- <listitem>
- <para>
- Enter the folder name.
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guibutton>OK</guibutton>
- </para>
- </listitem>
- </orderedlist>
- </para>
- </sect2>
- </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>
- Lucy, the office manager for a small company, has one calendar
- for her own schedule. She maintains one for the conference
- room, to 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.
- </para>
- <para>
- Each calendar folder can hold only one calendar.
- </para>
- </sect1>
-</chapter>
diff --git a/help/C/usage-contact.xml b/help/C/usage-contact.xml
deleted file mode 100644
index 821b959c95..0000000000
--- a/help/C/usage-contact.xml
+++ /dev/null
@@ -1,581 +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> addressbook 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 addressbook, see <xref
- linkend="config-prefs-contact"/>. You can import contacts from
- other contact management tools with the Import tool by
- selecting
- <menuchoice><guimenu>File</guimenu><guimenuitem>Import</guimenuitem></menuchoice>,
- or by mailing them to yourself as vCard attachments.
- </para>
-
- <para>
- The toolbar for the addressbook 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 three tabs,
- <guilabel>General</guilabel>, for basic contact information,
- <guilabel>Details</guilabel>, for a more specific description of
- the person, and <guilabel>Collaboration</guilabel> for
- information about scheduling and working closely with them. In
- addition, it contains a <guimenu>File</guimenu> menu and an
- <guimenu>Actions</guimenu> menu. Under
- <guimenu>Actions</guimenu> you will find <guimenuitem>Forward
- Contact</guimenuitem>, which opens a new message with the card
- already attached, and <guimenuitem>Send Message to
- Contact</guimenuitem>, which will open a new message to the
- contact.
- </para>
- <para>
- The toolbar is relatively simple: <guilabel>Save and
- Close</guilabel>, <guilabel>Print</guilabel>,
- <guilabel>Close</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. As an example,
- we'll use the Ximian mascot, <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>
- 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 criteria, 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 Addressbook</title>
- <para>
- Organizing your addressbook is a lot like organizing your
- mail. You can have folders and searches the same way you can
- with mail, but the addressbook 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>
-
-<!-- UNIMPLEMENTED FEATURE
- <para>
- Another useful <application>Evolution</application> feature is
- its ability to recognize when people live or work together. If
- several people in your addressbook 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>
-
- <!-- 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 Addressbook
- and select <guimenuitem>Send Message to List</guimenuitem>.
- </para>
- <para>
- Ximian Evolution cannot store contact lists on Exchange
- servers.
- </para>
-
- </sect3>
- </sect2>
- </sect1>
-
- <sect1 id="usage-contact-sharing">
- <title>LDAP: Shared Addressbooks on a Network</title>
-
- <para>
- The <glossterm linkend="ldap">LDAP</glossterm> protocol was
- created to let users share contact information over a network by
- sharing access to a central address book. LDAP allows a company
- to maintain a shared set of contact information for a company or
- department. Many companies keep a common LDAP address book for
- all their employees or for client contacts.
- </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 LDAP 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. You do this by dragging and dropping
- your desired contacts into the local contacts list.
- </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>
- You cannot add, delete, or alter cards on the LDAP
- server. If you need to change information there, you
- will need to speak to your system administrator
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <sect2 id="usage-contact-sharing-setup">
- <title>Configuring Evolution to use LDAP</title>
- <para>
- For information about setting up
- <application>Evolution</application> to use LDAP, please refer
- to <xref linkend="config-prefs-contact" />
- </para>
- </sect2>
- </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 Sender to Address Book</guimenuitem> from the menu that appears.
- <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>
-
-<!-- Unimplemented features:
- <para>
- You can also use the addressbook 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>
- <para>
- Need a map or directions? Click <guibutton>MapIt</guibutton> from
- within the addressbook, and <application>Evolution</application>
- will map the address for you online.
- </para>
- -->
-</chapter>
-
-
-
diff --git a/help/C/usage-exchange.xml b/help/C/usage-exchange.xml
deleted file mode 100644
index 6c29418a2b..0000000000
--- a/help/C/usage-exchange.xml
+++ /dev/null
@@ -1,1002 +0,0 @@
- <chapter id="usage-exchange">
- <title>The Ximian Connector for Microsoft Exchange</title>
- <para>
- The Ximian Connector for Microsoft Exchange allows Ximian
- Evolution clients to access accounts on Microsoft Exchange 2000
- servers. It is available through Ximian Red Carpet in its own
- channel, but cannot be used without a license file. The license
- file may be purchased from the Ximian online store at <ulink
- url="http://store.ximian.com">store.ximian.com</ulink>. Unlike the
- regular Ximian Evolution client, the Ximian Connector for
- Microsoft Exchange is proprietary software and source code is not
- available.
- </para>
-
- <warning id="licensing">
- <title>Requirements</title>
- <para>
- Ximian Connector works only with Exchange 2000, and requires
- that Outlook Web Access be enabled. Each user will need a
- valid Microsoft Exchange 2000 server account, including license.
- </para>
- </warning>
-
- <sect1 id="new-in-connector">
-<title>What's New in Connector &appversion;</title>
- <para>
- Ximian Connector &appversion; has added the <guilabel>Out of
- Office</guilabel> feature and an automatic configuration tool for
- large Exchange deployments.
- </para>
-
- <para>
- Previous versions of Ximian Connector for Microsoft Exchange added
- support for the <guibutton>Flag for Followup</guibutton> feature,
- public folders, delegation, direct booking, and more. For
- information on setting up delegation, see <xref
- linkend="exchange-delegate" />.
- </para>
-
-</sect1>
-
- <sect1 id="features">
- <title>Connector Features</title>
- <para>
- In addition to the features listed above, <application>Ximian
- Connector</application> supports the following basic
- <application>Microsoft Exchange</application> features:
- <itemizedlist>
- <listitem>
- <para>
- General
- </para>
- <variablelist>
- <varlistentry>
- <term>Remote <application>Exchange</application> Information Store</term>
- <listitem>
- <para>
- Allows you to access mail, address book (including
- Global Address List folder), and calendars, and task
- folders on an Exchange 2000 server from Evolution.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Palm synchronization</term>
- <listitem>
- <para>
- Supported for Contacts and Calendars on Exchange.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </listitem>
- <listitem>
- <para>
- Mail
- </para>
- <variablelist>
- <varlistentry>
- <term>Viewing Mail in Exchange Folder</term>
- <listitem>
- <para></para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Sending Email via Exchange Protocols</term>
- <listitem>
- <para>
- You may use the Microsoft Exchange mail transport
- protocol to send email. Make sure that the address
- you have entered as your email address is exactly
- the one that the Exchange server has on file. This
- may be "yourname@exchange-server.ximian.com" rather
- than "yourname@ximian.com."
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </listitem>
- <listitem>
- <para>
- Calendar
- </para>
- <variablelist>
- <varlistentry>
- <term>Meeting Request/Proposal</term>
- <listitem>
- <para>
- Allows Evolution users to
- schedule meetings and view attendee availability for
- other users (Evolution or
- Outlook users) on
- Exchange.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Adding iCalendar Meeting Requests to Calendar</term>
- <listitem>
- <para>
- If you receive an iCalendar meeting request and add it
- to your calendar, it will be saved to your
- Exchange calendar.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </listitem>
- <listitem>
- <para>
- Contacts
- </para>
- <variablelist>
- <varlistentry>
- <term>Address Completion</term>
- <listitem>
- <para>
- Supported for your Exchange
- Contacts folder. Not yet supported for the Global
- Address List.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Adding VCards to Address Book</term>
- <listitem>
- <para>
- If you receive a VCard attachment and click
- <guibutton>Save in Address Book</guibutton>, it will
- be saved to your Exchange address book.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>New Address Book entries can be created on
- Exchange from received email
- messages with a single click</term>
- <listitem>
- <para>
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </listitem>
-</itemizedlist>
-</para>
-
-<para>
-There are, however, some features which are not available:
-<itemizedlist>
- <listitem>
- <para>
- Work Offline (disconnected mode).
- </para>
- </listitem>
- <listitem>
- <para>
- "Recall Message" function.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </sect1>
- <sect1 id="install">
- <title>Installing the Connector</title>
- <para>
- To install the Ximian Connector, run Ximian Red Carpet by
- selecting <menuchoice><guimenu>System</guimenu><guimenuitem>Get
- Software</guimenuitem></menuchoice>. Subscribe to the Ximian
- Connector for Microsoft Exchange channel, select the Ximian
- Connector for Microsoft
- Exchange2000, and click the
- <guibutton>Install</guibutton> button. You can also install
- the Connector by downloading the individual packages from
- ftp.ximian.com if you wish.
- </para>
- <para>
- Once you have installed the software, you will also need to
- install a license file. The license file is the verification
- that you have paid for a license to use the Ximian
- Connector. You can get the license file from the the Ximian
- online store at <ulink
- url="http://store.ximian.com">store.ximian.com</ulink>. You
- will need a browser with strong (128-bit or greater) encryption
- to access the store. When you purchase a Ximian Connector
- license, the store will mail you the license file with
- instructions for installation. Once installed, the license file
- unlocks the Ximian Connector functionality and you may connect
- to an Exchange server.
- </para>
- </sect1>
-
- <sect1 id="exchange-configure">
- <title>Adding your Exchange Account in Ximian Evolution</title>
- <para>
- Once you have installed the Connector, you need to set up access
- for your Exchange account on both the
- Exchange server and within Evolution.
- </para>
-
- <sect2 id="config-server">
- <title>Exchange Server Settings</title>
- <para>
- Check with your system administrator to ensure that:
- <itemizedlist>
- <listitem>
- <para>
- You have a valid account on the Exchange server.
- </para>
- </listitem>
- <listitem>
- <para> You are permitted to access the account with
- WebDAV. This is the default setting for the
- Exchange server, so unless
- your system administrator has specifically turned it
- off, no changes should be necessary.
- </para>
- </listitem>
- </itemizedlist>
- </para>
-
- <para>
- The Ximian website knowledge base, at <ulink type="http"
- url="http://support.ximian.com">support.ximian.com</ulink>,
- has additional information about checking to make sure that
- your Exchange server will accept
- connections from Ximian Evolution.
- </para>
- </sect2>
-
-
- <sect2 id="config-client">
- <title>Standard Configuration Tool for Ximian Connector</title>
- <para>
- Once you know that your server is ready for you to connect,
- you are ready to add your Exchange account to Ximian Connector.
- </para>
-
-
- <sect3 id="config-easy">
- <title>Simple Configuration Tool for Ximian Connector</title>
- <para>
- Ximian Connector 1.4 comes with a simple account creation tool
- for some installations. Other installations will require
- the standard account tool described in <xref
- linkend="config-client" /> below.
- </para>
- <para>
- The simple assistant works in the following cases:
- <itemizedlist>
- <listitem>
- <para>
- If you receive your license key in Ximian Evolution, the
- simple assistant will start when you click the
- license file attachment and choose <guibutton>Open in
- Ximian Connector</guibutton>.
- </para>
- </listitem>
-
- <listitem>
- <para>
- If you have no accounts configured, and your system
- administrator has preinstalled a license key file,
- the simple assistant will start when you start Ximian
- Evolution. It asks only for the name of your Outlook
- Web Access server, and your username and password. Ximian
- Connector will determine the remaining information on its own.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <para>
- If the simple account tool does not run automatically, create
- an account as described below.
- </para>
- </sect3>
-
-
- <sect3 id="config-exchange-new-account">
- <title>Creating a New Exchange Account</title>
-
-
- <para>
- If you would like to create a new account for your Exchange
- server, select <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenuitem>Mail Settings</guimenuitem>
- </menuchoice>
- from any mail view. Then click the <guibutton>Add</guibutton>
- button in the accounts list. The account creation assistant
- will guide you through the process, which is also described in
- <xref linkend="usage-mainwindow-starting"/>. If you're not
- sure about any of the information you need, just ask your
- system administrator.
- </para>
-
- <note id="license-file-issues">
- <title>Installing the License File</title>
- <para>
- Your purchase email will contain instructions for installing
- the license file: it may be opened with Ximian Evolution and
- installed automatically that way, or placed in the
- <systemitem>evolution</systemitem> directory in your home
- directory.
- </para>
- <para>
- Be aware that the <systemitem>evolution</systemitem> directory in
- your home directory won't exist if you haven't already run
- Ximian Evolution. If you have not
- done so already, start Ximian
- Evolution and configure an account as described
- below. Then, quit the application and place the
- <systemitem>connector-key.txt</systemitem> file in your
- <systemitem>evolution</systemitem> directory. When you start
- Evolution again, the license will
- be verified and Ximian Connector will work properly.
- </para>
- </note>
-
-
- <variablelist>
- <varlistentry>
- <term>Identity</term>
- <listitem>
- <para>Enter your name and email address. If you wish,
- you may add your organization and the location of your
- signature file. Only your name and email address are
- required.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Receiving Mail</term>
- <listitem>
- <para>
- In this step, you'll enter information about the way
- you check mail:
- <orderedlist>
- <listitem>
- <para>
- First, select <guilabel>Microsoft
- Exchange</guilabel> as your server type.
- </para>
- </listitem>
- <listitem>
- <para>
- Enter the name of your Exchange email server, and
- the user name you would use to log in to a
- Windows workstation in your organization.
- </para>
- </listitem>
- <listitem>
- <para>
- If you wish, select the box labeled
- <guilabel>Use secure connection
- (SSL)</guilabel>, to take advantage of a more
- secure connection method. This may allow you to
- connect to the server from outside your
- firewall.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Select the kind of authentication your network
- uses. You can click the <guibutton>Check for Supported
- Types</guibutton> button to see which kinds will work.
- </para>
- </listitem>
-
- <listitem>
- <para>
- If you would like Evolution to
- remember your password, check the box labeled
- <guilabel>Remember this password</guilabel>.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Receiving Mail, Step Two</term>
- <listitem>
- <para>There are a few additional options in this step:
- <orderedlist>
- <listitem>
- <para>
- Checking for New Mail: If you would like to
- check for new mail automatically, click the
- checkbox and enter an interval in minutes.
- </para>
- </listitem>
- <listitem>
- <para>
- Global Address List/Active Directory: Enter the
- name of your global catalog server (directory
- server). This will allow you to use the Global
- Address List (GAL). Normally,
- Evolution will fetch
- a maximum of 500 responses to any query, but you
- may increase or decrease this number if you
- wish. A lower number decreases load on the
- server, and many servers will refuse to return
- more than 1000 results, no matter how many you
- ask for.
-
- <note id="why-you-need-gal">
- <title>The Global Catalog Server</title>
- <para>
- The Global Catalog server provides you with
- access to the Global Address List,
- free/busy information, and folder delegation
- features. These may not work properly if you do
- not have a Global Catalog server.
- </para>
- </note>
-
- </para>
- </listitem>
-
- <listitem>
- <para>
- Exchange Server: There are two options here:
- <itemizedlist>
- <listitem>
- <para>
- Exchange mailbox name: Enter your exchange
- mailbox name. The suggested value is
- probably correct.
- </para>
- </listitem>
- <listitem>
- <para>
- Outlook Web Access (OWA) Path: In most cases,
- the URL for Outlook Web Access is
- "http://server.company.com/exchange." If your
- system has a URL that does not end in
- "/exchange," enter the custom path here.
- </para>
- </listitem>
- <listitem>
- <para>
- Public Folder Server: Enter the name of
- your public folder server here.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- <listitem>
- <para>
- Apply filters to new messages in Inbox on this
- server: Check this box to filter messages in
- this account.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Sending Mail</term>
- <listitem>
- <para>Select <guilabel>Microsoft Exchange</guilabel> as
- your email sending method. There is nothing else to do
- in this step.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Account Management</term>
- <listitem>
- <para>Enter a name that you will use to remember this
- account. "Exchange Account" is a good suggestion. Note
- that you cannot have two accounts with the same name.
- If you'd like to make this your default account for
- sending email, check the <guilabel>Make this my default
- account</guilabel> box.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>
- You're done. Click <guibutton>Finish</guibutton> and
- <guibutton>OK</guibutton>, then quit
- Evolution and start it again. Now
- you're ready to get to work on the Exchange server.
- </para>
-
-
-
- </sect3>
-
- <sect3 id="config-exchange-existing-account">
- <title>Changing an Existing Account to Work with Exchange</title>
- <para>
- If you have an existing email account, and want to convert it
- to use for Exchange, select the account you want to convert
- and click the <guibutton>Edit</guibutton> button. You'll want
- to change settings in the following tabs of the account
- dialog:
- </para>
-
- <figure>
- <title>Exchange Account Settings: Identity</title>
- <screenshot>
- <screeninfo>Creating an Exchange Account, Step One: Identity</screeninfo>
- <mediaobject><imageobject>
- <imagedata format="PNG" fileref="figures/exchange-identity" srccredit="Aaron Weber"/>
- </imageobject></mediaobject>
- </screenshot>
- </figure>
-
-
- <variablelist>
- <varlistentry>
- <term>Identity</term>
- <listitem>
- <para>
- If your email address will change because you are moving
- to a new server, then change it in this tab. Otherwise,
- move to the next tab.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Receiving Mail</term>
- <listitem>
- <para>
- Select <guilabel>Microsoft Exchange</guilabel> as your
- server type. Enter your name of your server next to
- <guilabel>Host</guilabel>, and the user name for your
- account next to <guilabel>Username</guilabel>. If your
- server supports SSL (Secure Socket Layer) encryption, it
- you can check the <guilabel>Use SSL</guilabel> box to
- take advantage of more secure data transfers.
-
-
-
- <figure>
- <title>Exchange Account Settings: Receiving Mail</title>
- <screenshot>
- <screeninfo>Creating an Exchange Account, Step Two: Receiving Mail</screeninfo>
- <mediaobject><imageobject>
- <imagedata format="PNG" fileref="figures/exchange-receive" srccredit="Aaron Weber"/>
- </imageobject></mediaobject>
- </screenshot>
- </figure>
-
- </para>
-
-
- </listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term>Receiving Options</term>
- <listitem>
- <para>
- Here, you'll find some additional settings:
- <variablelist>
- <varlistentry>
- <term>Checking for New Mail</term>
- <listitem>
- <para>
- Select whether you would like to check for
- mail automatically, and if so, how often.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Global Address List/Active Directory</term>
- <listitem>
- <para>
- The Global Address List (GAL) is an
- addressbook for everyone represented in
- your organization's Exchange deployment. To
- use the GAL, click the tab labeled
- <guilabel>Receiving Options</guilabel> and
- enter the name of your Global Catalog
- Server. The GAL is maintained by your
- system administrator and you cannot add,
- change, or remove items from it using
- Ximian Evolution. However, you can use it
- to invite people to meetings and to look up
- addresses and other information.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Exchange Server</term>
- <listitem>
- <para>
- If your Exchange server requires you to use a
- different mailbox name from the name you use to
- log in, select the second check-box and enter
- the mailbox name. Check with your system
- administrator to be sure.
- </para>
- <para>
- In most cases, the URL for web access is
- "http://server.company.com/exchange." If your
- system has a path that is not "exchange," check
- the box and enter the custom path here.
- </para>
- <para>
- If your network uses a different server
- for Public Folders than for personal
- folders, enter its name here.
- </para>
- </listitem>
- </varlistentry>
-
- </variablelist>
-
- <figure>
- <title>Exchange Account Settings: Receiving Mail</title>
- <screenshot>
- <screeninfo>Creating an Exchange Account, Step Three: Mail Options</screeninfo>
- <mediaobject><imageobject>
- <imagedata format="PNG" fileref="figures/exchange-receive-options" srccredit="Aaron Weber"/>
- </imageobject></mediaobject>
- </screenshot>
- </figure>
-
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Sending Mail</term>
- <listitem>
- <para>
- If you will use your Exchange server to send as well as
- receive mail, select <guilabel>Microsoft
- Exchange</guilabel> as your server type, and enter the
- server name as the <guilabel>Host</guilabel>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>
-
- Once you have made those changes, click the
- <guibutton>OK</guibutton> button.
- </para>
- <para>
- Then, quit Evolution and start it
- up again. Changes to the Ximian Connector accounts
- configuration are not active until you have restarted the
- application.
- </para>
- </sect3>
- </sect2>
- </sect1>
-
- <sect1 id="access">
- <title>Accessing the Exchange Server</title>
- <para>
- Like IMAP and LDAP data, information for
- Exchange accounts is stored on the
- server, not on your desktop computer. This means that you can
- access it from multiple locations. It also means that your
- Microsoft Exchange account information
- is in a separate folder tree from the <guilabel>Local</guilabel>
- tree in your folder bar. You'll see it below the local tree,
- with the name you gave the account. If you have multiple
- accounts, you will have multiple folder trees.
- </para>
- <para>
- Click on any of the folder tree items to visit them; you may
- have to enter your server password. You can now create contact
- cards, send and receive email as you would normally. If there
- are items in your local calendar or addressbook that you'd like
- to add to your Exchange stores, you
- can copy and paste them over, or just drag items from one folder
- to another as you would with two local stores.
- </para>
-
- <note id="save-to-local-or-exchange">
- <title>Saving Attached Addresses and Appointments</title>
- <para>
- If you are using both an Exchange account and a local mail
- account, you should be aware that whenever you save an email
- address or appointment from an email message, it will be
- saved in your Exchange contacts list or calendar, rather
- than in your local account. The same is true of
- synchronization with Palm-OS devices: tasks, appointments,
- and addresses from your Palm-OS device will be synchronized
- with those in the Exchange folders rather than local
- folders.
- </para>
- </note>
-
- <tip id="gal-empty">
- <title>The Global Address List Appears Empty At First</title>
- <para>
- To avoid unnecessary strain on the server, the GAL will
- appear empty until you have searched for something in it.
- If you want to display all the cards in the list, click in
- the search box and press <keycap>Enter</keycap>. This
- enters a blank search: since every card contains a blank in
- it, every card will appear.
- </para>
- </tip>
-
- </sect1>
-
- <sect1 id="exchange-settings">
- <title>Special Connector Only Settings</title>
- <para>
- There are two items in the Evolution preferences window that
- are available only with Ximian Connector. The first is
- delegation and permissions handling, and the second is the
- creation of "Out of Office" messages.
- </para>
-
- <sect2 id="exchange-delegate">
- <title>Access Delegation</title>
- <para>
- You can allow other people in your organization's Global
- Address List to access your calendar, address
- book, and messages, and they can let you manage theirs.
- Delegation allows people to do anything from check on each
- other's schedules to completely manage their personal
- information.
- </para>
-
- <sect3 id="exchange-delegate-to-others">
- <title>Delegating Access to Others</title>
- <para>
- To add someone to your list of delegates, click the
- <guibutton>Add</guibutton> button and select them from the
- Global Address List. When delegating you can grant different
- levels of access to different types of data. You may also
- decide whether the access you grant applies to items marked
- <guilabel>Private</guilabel>, or only to public items.
- </para>
-
-
- <figure>
- <title>Exchange Account Delegation</title>
- <screenshot>
- <screeninfo>Exchange Account Delegation Settings</screeninfo>
- <mediaobject><imageobject>
- <imagedata format="PNG" fileref="figures/exchange-delegation" srccredit="Aaron Weber"/>
- </imageobject></mediaobject>
- </screenshot>
- </figure>
-
-
- <para>
- For each of the four types of folder, you may select one of
- the following levels of access:
- <variablelist>
- <varlistentry>
- <term>None</term>
- <listitem>
- <para>
- Do not allow this person to access any folders of
- this type.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Reviewer (read-only)</term>
- <listitem>
- <para>
- Allow the person to see items in this type of
- folder, but not create new items or edit existing
- items.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Author (read, create)</term>
- <listitem>
- <para>
- The delegate may view items in your folders, and may
- create new items, but may not change any existing items.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Editor (read, create, edit)</term>
- <listitem>
- <para>
- The delegate may view, create, and change items in
- your folders.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect3>
- <sect3 id="exchange-delegated-to-you">
- <title>Acting as a Delegate for Others</title>
- <para>
- To see the list of people who have granted you access to
- their folders, click the <guilabel>Acting as a
- Delegate</guilabel> tab in the Exchange Delegation settings
- window. If you plan to send email on behalf of someone,
- click the checkbox next to their name, and an email identity
- will be created. You can then select that identity in the
- <guilabel>From</guilabel> list in your message composer.
- </para>
-
- <para>
- To access the folders delegated to you, do the following:
- <orderedlist>
- <listitem>
- <para>
- Select
- <menuchoice>
- <guimenu>File</guimenu>
- <guimenuitem>Open Other User's Folder</guimenuitem>
- </menuchoice>
- </para>
- </listitem>
- <listitem>
- <para>
- Enter the email address of the user who
- has delegated to you or click the
- <guibutton>User</guibutton> button to select them from your
- addressbook.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Select the folder you wish to open.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Click <guibutton>OK</guibutton>.
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para>
- Folders delegated to you appear in your folder list inside a
- folder labeled with the name of their owner. For example, if
- Martha Thompson delegates folders to you, you will see a
- folder called <guilabel>Martha Thompson's Folders</guilabel>
- in the folder tree at the same level as your <guilabel>Personal
- Folders</guilabel> and <guilabel>Public
- Folders</guilabel>.
- </para>
-
- <note id="error">
- <title>Error Messages</title>
- <para>
- If the folder fails to open properly, check with the
- folder owner that you have been granted the correct access
- permissions.
- </para>
- </note>
- </sect3>
- </sect2>
-
-
- <sect2 id="exchange-out-of-office">
- <title>Setting an Out of Office Message</title>
- <para>
- An <guilabel>Out of Office</guilabel> message is
- an automatic reply that you can send to emails, explaining why
- you aren't going to respond to their message. For example, if
- you go on vacation for a week and will be away from email, you
- can set an automatic reply so that people who write to you know
- that you aren't ignoring them.
- </para>
- <para>
- To create an <guilabel>Out of Office</guilabel> message,
- select <menuchoice> <guimenu>Tools</guimenu>
- <guimenuitem>Settings</guimenuitem>
- </menuchoice> and then click the <guibutton>Out of
- Office</guibutton> button.
- </para>
-
- <para>
- Then, click <guilabel>I am currently
- out of the office.</guilabel>. Then, enter a short message in
- the text entry box. Click <guilabel>OK</guilabel>.
- </para>
- <para>
- Your message will be sent automatically to
- anyone who sends you mail until you return and click
- <guilabel>I am currently in the office</guilabel>.
- </para>
- </sect2>
-
-
- </sect1>
-
-
- <sect1 id="full-advantage">
- <title>Scheduling Appointments with Free/Busy</title>
- <para>
- When you schedule a meeting with your calendar on the
- Exchange server, you can check when
- other local Exchange users are busy according to their
- Exchange calendars. To do so:
- </para>
- <figure>
- <title>Scheduling With Free/Busy Information</title>
- <screenshot>
- <screeninfo>Using the Free/Busy Feature</screeninfo>
- <mediaobject><imageobject>
- <imagedata format="PNG" fileref="figures/schedule" srccredit="Aaron Weber"/>
- </imageobject></mediaobject>
- </screenshot>
- </figure>
-
- <note id="reminders-in-exchange">
- <title>Reminders In Exchange</title>
- <para>
- Reminders for appointments in your Exchange calendar will
- not work until you have run Evolution at least once after
- logging in. This is different from locally stored reminders,
- which will work from the moment you log in, regardless of
- whether you have run Evolution in the session.
- </para>
- </note>
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Open a new appointment in the calendar.
- </para>
- </listitem>
- <listitem>
- <para> Choose <menuchoice> <guimenu>Actions</guimenu>
- <guimenuitem>Schedule Meeting</guimenuitem>
- </menuchoice> in the meeting editor window.
- </para>
- </listitem>
- <listitem>
- <para> Add attendees, either by entering their email
- addresses into the list, or by clicking the
- <guibutton>Invite Others</guibutton> button. If you choose
- to so, it's best to use the Global Address List (GAL).
- Choose the GAL from the drop-down list of address sources
- at the top of the dialog box.
- </para>
- </listitem>
- <listitem>
- <para>
- Choose <guilabel>Options</guilabel> and then
- <guilabel>Update Free/Busy</guilabel> to check participant
- schedules and, if possible, update the meeting in all
- participants' calendars.
- </para>
- </listitem>
- </orderedlist>
- <tip id="autopick">
- <title>Using Autopick to Adjust Meeting Times</title>
- <para>
- If meeting attendees are not available during the times you
- have scheduled a meeting, you can "nudge" the meeting forward
- or backward to the nearest available time. To do so, just
- click the arrows to the left or right of the
- <guilabel>Autopick</guilabel> button. The Autopick tool will
- move the meeting to the nearest time during which all
- attendees are available. If you aren't satisfied with those
- results, you can drag the edges of the meeting time to the
- hours that you want to select.
- </para>
- </tip>
- </sect1>
-</chapter>
-
diff --git a/help/C/usage-exec-summary.xml b/help/C/usage-exec-summary.xml
deleted file mode 100644
index 69eab4f91c..0000000000
--- a/help/C/usage-exec-summary.xml
+++ /dev/null
@@ -1,217 +0,0 @@
-
-<chapter id="usage-summary">
- <title>Getting Oriented with the Ximian Evolution Summary</title>
-
- <sect1 id="summary-intro">
- <title>Using 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>
- Mail summary
- </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.
- </para>
- <para>
- You can find the proxy settings tool in the Control Center.
- </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>
- Choose
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenuitem>Settings</guimenuitem> </menuchoice> and
- select the <guilabel>Summary Preferences</guilabel> tool.
- </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>
- </para>
- <para>
- Below the list of cities, you can select the time, in seconds,
- between updates, and whether you wish to see temperatures in Celsius
- or Farenheit.
- </para>
-
- </sect2>
- <sect2 id="customizing-feeds">
- <title>Customizing Your News Feeds</title>
- <para>
- To customize your news feeds:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Choose
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenuitem>Settings</guimenuitem> </menuchoice> and
- select the <guilabel>Summary Preferences</guilabel> tool. Then, choose the
- <guilabel>News Feeds</guilabel> tab.
- </para>
- </listitem>
- <listitem>
- <para>
- In the left hand column, select the news feed to add to
- your display.
- </para>
- </listitem>
- <listitem>
- <para>
- Click the <guibutton>Add</guibutton> button.
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guibutton>OK</guibutton>.
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para>
- You can also add your own news feeds. Evolution will display
- RDF formatted XML news feeds from the website of your
- choice. For most sites, it's a file called "index.rdf."
- </para>
-
- </sect2>
- <sect2 id="customizing-mail">
- <title>Customizing Your Mail Summary</title>
- <para>
- To customize your mail summary:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Choose
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenuitem>Settings</guimenuitem> </menuchoice> and
- select the <guilabel>Summary Preferences</guilabel> tool.
- </para>
- </listitem>
- <listitem>
- <para>
- Click the <guibutton>Mail</guibutton> tab.
- </para>
- </listitem>
- <listitem>
- <para>
- Expand the folder tree to the folders you wish to
- display in the Summary.
- </para>
- </listitem>
- <listitem>
- <para>
- Click the checkbox to the left of that folder.
- </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>
- Choose
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenuitem>Settings</guimenuitem> </menuchoice> and
- select the <guilabel>Summary Preferences</guilabel> tool.
- </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.xml b/help/C/usage-mail-org.xml
deleted file mode 100644
index cf4860e649..0000000000
--- a/help/C/usage-mail-org.xml
+++ /dev/null
@@ -1,1302 +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="importing-mail-and-settings">
- <title>Importing Your Old Email and Settings</title>
- <para>
- <application>Evolution</application> allows you to import old
- email and data so that you don't need to worry about losing your
- old information.
- </para>
- <sect2 id="importing-mail">
- <title>Importing Email and Other Data</title>
- <para>
- <application>Ximian Evolution</application> can import the
- following types of files:
- <variablelist>
- <varlistentry>
- <term>VCard (.vcf, gcrd):</term>
- <listitem>
- <para>
- The addressbook format used by the GNOME, KDE, and
- many other contact management applications. You
- should be able to export to VCard format from any
- address book application.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>iCalendar (.ics):</term>
- <listitem>
- <para>
- A format for storing calendar files. iCalendar is used by
- PalmOS based handhelds, Ximian
- <application>Evolution</application>, and Microsoft
- <application>Outlook</application>.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Microsoft Outlook Express 4 (.mbx):</term>
- <listitem>
- <para>
- Email file format used by Microsoft Outlook Express
- 4. For other versions of Microsoft Outlook and Outlook Express, see
- the workaround described in the note below.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>LDAP Data Interchange Format (LDIF):</term>
- <listitem>
- <para>
- A standard data format for address book cards.
- </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>
- To import your old email:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Click <menuchoice><guimenu>File</guimenu><guimenuitem>Import</guimenuitem></menuchoice>.
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guibutton>Next</guibutton> after reading the Welcome screen.
- </para>
- </listitem>
- <listitem>
- <para>
- Select <guibutton>Import a single file</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para>
- Find the file that you wish to import into <application>Evolution</application>.
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guibutton>Import</guibutton>
- </para>
- </listitem>
- </orderedlist>
- </para>
- </sect2>
- <sect2 id="importing-preferences">
- <title>Importing Preferences</title>
- <para>
- <application>Evolution</application> can import all your old
- mail, contacts, and other information from other applications,
- making your transition to <application>Evolution</application>
- easy.
- </para>
- <para>
- To import your old information:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Click <menuchoice><guimenu>File</guimenu><guimenuitem>Import</guimenuitem></menuchoice>.
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guibutton>Next</guibutton> after reading the Welcome screen.
- </para>
- </listitem>
- <listitem>
- <para>
- Select <guibutton>Import data and settings from older programs</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para>
- The left-most column shows the application which your
- information will be imported from. You then select
- checkboxes on each component to import different
- properties of each application.
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guibutton>Next</guibutton>
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guibutton>Import</guibutton>
- </para>
- </listitem>
- </orderedlist>
- </para>
-
- <para>
- <note>
- <title>Microsoft Outlook and Outlook Express Users</title>
- <para>
- Microsoft Outlook, and versions of Outlook Express after
- version 4, use proprietary formats that <application>Ximian
- Evolution</application> cannot read or import. For contacts,
- you may have to email them to yourself and import them that
- way. For email, there is a simpler workaround:
- <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. There's more information about
- why this works, and how, at the Ximian support website.
- </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>
-
- </sect2>
- </sect1>
- <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>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>Customize Current
- View</guimenuitem>:</term> <listitem><para> Choose this
- item to pick a more complex sort order for messages, or
- to choose which columns of information about your
- messages you wish to display
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
-
- <sect2 id="usage-mail-organize-columns-followup">
- <title>Column Sorting with the Follow Up Feature</title>
- <para>
- One way to make sure you don't forget about a message is
- with the <guilabel>Follow Up</guilabel> feature. To use it,
- select one or more messages, and then right-click on one and select
- <guimenuitem>Follow Up</guimenuitem>. A dialog box will open
- and allow you to set the type of flag and the due date.
- </para>
- <para>
- The <guilabel>Flag</guilabel> itself is the action you
- want to remind yourself about. Several are provided for you, such as
- <guilabel>Call</guilabel>, <guilabel>Forward</guilabel>, and
- <guilabel>Reply</guilabel>, but you can enter your own note or
- action if you wish. You may set a deadline date for the flag
- as well, if you wish.
- </para>
- <para>
- Once you have added a flag, you can mark it as complete or
- remove it entirely by right-clicking on the message and
- selecting <guilabel>Flag Completed</guilabel> or <guilabel>Clear
- Flag</guilabel>.
- </para>
-
- <para>
- When you read a flagged message, its flag status will be
- displayed right at the top, before the message headers. An
- overdue message might tell you <guilabel>Overdue: Call by April 07, 2003, 5:00 PM</guilabel>
- </para>
-
- <para>
- Flags can help you organize your work in a number of ways. For
- example, you might add a <interface>Flag Status</interface> column to your message
- list and sort that way. Alternately, you could create a vFolder
- that displays all your flagged messages, and clear the flags
- when you're done, so the vFolder contains only messages with
- upcoming deadlines.
- </para>
-
- </sect2>
-
- </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 mail folders, such as <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 ask 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>
-
- <warning id="imap-subfolders">
- <title>Subfolders in IMAP</title>
- <para>
- The INBOX folder on most IMAP servers cannot contain both
- subfolders and messages. When you create additional folders
- on your IMAP mail server, branch them from the root of the
- IMAP account's folder, tree, not from INBOX. If you create
- subfolders in your INBOX folder, you will lose the ability
- to read messages that exist in your INBOX until you move the
- folders out of the way.
- </para>
- </warning>
-
- </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 and execute it later. Just click <guilabel> Save
- Search</guilabel> from the <guimenu>Search</guimenu> menu. Then,
- you can run that search on any folder by selecting it from the
- <guimenu>Search</guimenu> menu. You may also want to create a
- vFolder instead; see <xref
- linkend="usage-mail-organize-vfolders" /> for more detail.
- </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, or enter a
- blank search.
- </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>
-
-
- <tip id="easy-filter">
- <title>Quick Filter Creation</title>
- <para>
- There is an easy shortcut for fast filter or vFolder
- creation. Right-click on the message in the message
- list, and select one of the items under the
- <guimenuitem>Create Rule from Message</guimenuitem>
- submenu.
- </para>
- </tip>
-
- <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.
-
-
- <note id="multiple-repeated-headers">
- <title>Repeated Headers</title>
- <para>
- If a message uses a header more than once, Evolution will
- pay attention only to the first instance, even if the
- message defines the header differently the second
- time. For example, if a message declares the Resent-From:
- header as "engineering@rupertcorp.com" and then restates
- it as "marketing@rupertcorp.com," Evolution will filter as
- though the second declaration had not occurred. To filter
- on messages that use headers multiple times, use a regular
- expression.
- </para>
- </note>
-
- </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>
-
-<para>
-
- <figure id="usage-mail-filter-fig-createrule">
- <title>Creating a Mail Filter</title>
- <screenshot>
- <screeninfo>Creating a Mail Filter</screeninfo>
- <mediaobject>
- <imageobject>
- <imagedata fileref="figures/filter-new-fig" format="PNG"
- srccredit="Aaron Weber"/>
- </imageobject>
- </mediaobject>
- </screenshot>
- </figure>
-
- <note id="lots-of-filters">
- <title>What if Multiple Filters Match One Message?</title>
- <para>
- If you have several filters that match a single message,
- they will all be applied to the message, in order, unless
- one of the filters has the action <guibutton>Stop
- Processing</guibutton>. If you use that action in a
- filter, the messages that it affects will not be touched
- by other filters.
- </para>
- <para>
- When you first open the filters dialog, you are shown the
- list of filters sorted in the order in which they will be
- applied. You can move them up and down in the priority list
- by clicking the <guibutton>Up</guibutton> and
- <guibutton>Down</guibutton> buttons.
- </para>
- </note>
-</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 Received - 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 - Set the message score to any whole number greater than
- 0. To use filters with scoring, use one filter to score a
- message, and then apply other filters only to messages with
- the scores you seek.
- </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>
- <note>
- <title>How Does Filtering on Mailing Lists Work?</title>
- <para>
- Filtering on mailing list actually looks for a
- specific mailing-list header called the
- <computeroutput>X-BeenThere</computeroutput>
- header, used to identify mailing lists or other
- redistributors of mail.
- </para>
- </note>
- </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. This allows you to search for complex
- patterns of letters, so that you can find, for
- example, all words that start with a and ends with
- m, and are between six and fifteen letters long,
- or all messages that declare a particular header
- twice. For information about how to use regular
- expressions, check the manual page for the
- <command>grep</command> command.
- </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 action</guibutton> and repeat the previous step.
- </para>
- </listitem>
- <listitem>
- <para>
- Press <guibutton>OK</guibutton>.
- </para>
- </listitem>
- </orderedlist>
- </para>
-
- <note id="when-filters-go-wrong">
- <title>When Are Filters Applied?</title>
- <para>
- If you use Ximian Connector to store your mail on an
- Exchange server, filters are not applied until you open
- your INBOX folder and select
- <menuchoice><guimenu>Actions</guimenu><guimenuitem>Apply
- Filters</guimenuitem></menuchoice> or press
- <keycombo><keycap>Ctrl</keycap><keycap>Y</keycap></keycombo>
- </para>
- </note>
-
- <example id="filter-example">
- <title>Using a Filter to Avoid Spam</title>
- <para>
- Spam, also known as unsolicited commercial email (UCE), is
- the bane of many people's Inboxes, but it doesn't have to
- be. Using Ximian Evolution filters and an external Spam
- detection tool like <application>SpamAssassin</application> (<ulink
- url="http://spamassassin.org/">http://spamassassin.org/</ulink>),
- you can catch the vast majority of junk mail and drop it
- directly into the trash.
- </para>
- <para>
- The easiest way to do this is to get your system
- administrator to install SpamAssassin (or its equivalent)
- on your mail server. There, it will flag messages it
- suspects of being Spam with the "X-Spam-Status" header to
- your mail, which you can then search for in a
- filter. Because SpamAssassin scores mails based on the
- likelihood that messages are junk, you can even choose how
- strict you want it to be. If you don't have a friendly
- network administrator, never fear: you can install
- SpamAssassin on your own system, then pipe messages through
- it before reading them.
- </para>
-
- <para>
- If your system administrator or ISP has SpamAssassin, here's how to siphon off the junk mail:
- <orderedlist>
-
- <listitem><para>
- Select <menuchoice><guimenu>Tools</guimenu><guimenuitem>Filters</guimenuitem></menuchoice>.
- </para></listitem>
-
- <listitem><para>
- Click <guibutton>Add</guibutton>.
- </para></listitem>
-
- <listitem><para>
- Set the first part of your search criterion to look in a <guilabel>Specific header</guilabel>.
- </para></listitem>
-
- <listitem><para>
- Enter <userinput>X-Spam-Flag</userinput> as the name of the header.
- </para></listitem>
-
- <listitem><para>
- Choose <guilabel>contains</guilabel> at the second drop-down box.
- </para></listitem>
-
- <listitem><para>
- Enter <userinput>YES</userinput> as the content to search for.
- You're now working with all email that has the word "YES" in the
- "X-Spam-Status" header.
- </para></listitem>
-
- <listitem><para>
- For actions, choose what you'd like to do with the
- messages. You can delete the messages automatically, but
- it's more prudent to place them in a "Possible Junk Mail"
- folder, and check them over just to make sure a genuine
- message didn't get flagged by accident.
- </para></listitem>
-
- <listitem><para>
- Click <guibutton>OK</guibutton>. You're done.
- </para></listitem>
- </orderedlist>
- </para>
- <para>
- If you don't have SpamAssassin or other junk mail filtering
- on your mail server, there's still hope, although it's not
- quite as simple. First, download
- and install SpamAssassin from <ulink
- url="http://spamassassin.org">http://spamassassin.org</ulink>
- You'll need to download the "spamassassin"
- and "perl-Mail-SpamAssassin"
- packages, and you can install them with Red Carpet by
- selecting <guimenuitem>Install Local Packages</guimenuitem>
- from the
- <guimenu>File</guimenu> menu. Further instructions are at the
- SpamAssassin web site. Once you have the software
- installed, do the following:
-
- <orderedlist>
- <listitem>
- <para>
- Create a text file with any text editor (
- <menuchoice>
- <guimenu>
- Programs
- </guimenu>
- <guisubmenu>
- Accessories
- </guisubmenu>
- <guimenuitem>
- Text Editor
- </guimenuitem>
- </menuchoice> is the most convenient) and write the next command:
- <command>spamassassin -e</command>.
- This will run the SpamAssassin command and report back 0
- if the message is not junk.
- </para>
- </listitem>
- <listitem>
- <para>
- Save the file as <filename>spam-filter.sh</filename>
- </para>
- </listitem>
- <listitem>
- <para>
- Mark the file as an executable program:
- Open your home directory in <application>Nautilus</application>, right-click on
- spam-filter.sh there, and select
- <guimenuitem>Properties</guimenuitem>. Then, click the
- <guilabel>Permissions</guilabel> tab and check the box in the
- <guilabel>Execute</guilabel> column and the
- <guilabel>Owner</guilabel> row. Alternately, open a terminal
- (<menuchoice>
- <guimenu>
- Programs
- </guimenu>
- <guisubmenu>
- Accessories
- </guisubmenu>
- <guimenuitem>
- Terminal
- </guimenuitem>
- </menuchoice>) and enter the command: <command>chmod +x spam-filter.sh</command>.
- </para>
- </listitem>
- <listitem>
- <para>
- Back in Evolution, create a new filter: Select
- <menuchoice><guimenu>Tools</guimenu><guimenuitem>Filters</guimenuitem></menuchoice>,
- then click <guibutton>Add</guibutton>.
- </para>
- </listitem>
-
- <listitem><para>
- Select <guilabel>Pipe Message to Shell Command</guilabel> as the first portion of the criterion.
- </para></listitem>
-
- <listitem><para>
- Enter <userinput>/home/username/spam-filter.sh</userinput> as the shell command, then select
- <guilabel>Does Not Return</guilabel> and <guilabel>0</guilabel> as the remaining two
- items. Substitute your username for "username" so that
- Evolution can find the script.
- </para></listitem>
-
- <listitem><para>
- For actions, choose what you'd like to do with the
- messages. You can delete the messages automatically, but
- it's more prudent to place them in a "Possible Junk Mail"
- folder, and check them over just to make sure a genuine
- message didn't get flagged by accident.
- </para></listitem>
- <listitem>
- <para>
- You're done. Click <guibutton>OK</guibutton> to close the filter and <guibutton>OK</guibutton> to
- close the filter editor.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </example>
- </sect2>
-
- <sect2 id="filters-edit">
- <title>Editing Filters</title>
- <para>
- To edit a filter:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Select
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenuitem>Filters</guimenuitem>
- </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>
- The Unmatched vFolder is the mirror of all your other
- vFolders: it displays whatever messages are not matched by
- other vFolders.
- </para>
- <para>
- If you use remote email storage like IMAP or Microsoft
- Exchange, and have created vFolders to search through them,
- the Unmatched vFolder will follow your lead, and search the
- remote folders as well. If you do not create any vFolders that
- search in remote mail stores, the Unmatched vFolder will not
- search in them either.
- </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 folder 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>Virtual Folder 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:
-
- <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>
- <para>
- <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>
-
-<!-- No, can't vfolder on arbitrary headers
- <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 Received - 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>
- Label - This works the same way as the <guilabel>Score</guilabel>
- option, although it allows you to select from various labels applied to the message,
- such as <guilabel>Important, Personal, To Do,
- Work</guilabel> or <guilabel>Later</guilabel>.
- </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 receive, 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>
- With 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>
- </orderedlist>
- </para>
- <para>
- Remote folders are considered active if you are connected to the
- server; you must be connected to your mail server for the vFolder to
- include any messages from that source.
- </para>
-
- </sect2>
- </sect1>
-</chapter>
diff --git a/help/C/usage-mail.xml b/help/C/usage-mail.xml
deleted file mode 100644
index 65a7a30715..0000000000
--- a/help/C/usage-mail.xml
+++ /dev/null
@@ -1,1883 +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 space bar 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>
-
- <para>
- You can navigate the message list by pressing the arrow keys up
- and down. To jump to the next unread message, press the
- <keycap>.</keycap> (period)
- or <keycap>]</keycap> (close bracket) key. You can go to the
- previous unread message with
- <keycap>,</keycap> (comma) or <keycap>[</keycap> (open
- bracket).
- </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>Message Threading In Action</title>
- <screenshot>
- <screeninfo>Message Threading In Action</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>
- Both local and IMAP Trash folders are actually vFolders that
- display all messages you have marked for later deletion.
- For more information about vFolders, see <xref
- linkend="usage-mail-organize-vfolders"/>. Since emptying
- your trash expunges the messages in your Trash folder,
- choosing <menuchoice> <guimenu>Actions</guimenu>
- <guimenuitem>Empty Trash</guimenuitem> </menuchoice> is the
- same as expunging deleted mail from <emphasis>all</emphasis>
- your folders.
- </para>
- <para>
- This is not, however, true for the Trash folder on Exchange
- servers, which behaves just the same as it would in
- Outlook. That is to say, the Trash folder on an Exchange
- server is a normal folder with actual messages in it.
- </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>Edit</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>Send/Receive</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>
-
-
- <figure id="usage-mail-druid-pic">
- <title>Mail Setup Assistant</title>
- <screenshot>
- <screeninfo>Mail Setup Assistant</screeninfo>
- <mediaobject>
- <imageobject>
- <imagedata fileref="figures/mail-druid-pic" format="PNG"
- srccredit="Aaron Weber"/>
- </imageobject>
- </mediaobject>
- </screenshot>
- </figure>
-
-
- <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>, select
- <menuchoice><guimenu>Tools</guimenu><guimenuitem>
- Settings</guimenuitem></menuchoice>, go to the
- Mail Accounts configuration tool, 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 location. A typical choice
- would be mbox files, with the path /home/username/Mail/.
- </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>Send/Receive</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 linkend="attachment">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 (for example, the welcome message in your
- Inbox when you first start <application>Ximian
- Evolution</application>) <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, select
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenuitem>Settings</guimenuitem> </menuchoice> and go to
- the mail settings tool. There, click the <guilabel>HTML
- Mail</guilabel> tab and select one of the items there: <guilabel>Never load images off the net</guilabel>, <guilabel>Load images if sender is in addressbook</guilabel>, or <guilabel>Always load images off the net.</guilabel>
- </para>
- <note id="http-proxy">
- <title>Loading Images from the Net through an HTTP Proxy</title>
- <para>
- If you use an HTTP proxy (as in many large organizations),
- <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.
- </para>
- <para>
- If you are using GNOME 1.4, you will need to configure this
- in the Nautilus <guilabel>Preferences</guilabel>
- dialog. However, in GNOME 2.0 and later, you can use the
- GNOME Control Center. Select
- <menuchoice><guimenu>System</guimenu><guimenuitem>Settings</guimenuitem></menuchoice>
- from your menu panel or from the GNOME menu, and then click
- the <guibutton>Network Proxies</guibutton> button in the
- <guilabel>System Settings</guilabel> category. Select the
- <guilabel>Use an HTTP network proxy</guilabel> check box and
- then enter information about your proxy. If you are not sure,
- check with your ISP or system administrator.
- </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>New</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 normally send
- mail as soon as you click the <guibutton>Send</guibutton>
- button. However, there are a few ways you can save a
- message to be sent later:
-
- <itemizedlist>
- <listitem>
- <para>
- If you are offline,
- <application>Evolution</application> will add your
- messages to the <guilabel>Outbox</guilabel> queue. The
- next time you connect to the Internet and send or
- receive mail, that message will be sent.
- </para>
- </listitem>
-
- <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 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-offline">
- <title>Working Offline</title>
-
- <para>
- Offline mode is a tool designed for use with IMAP or Exchange
- mail accounts in situations where you will not be connected to
- the network at all times. It will keep a local copy of one or
- more folders, and allow you to compose messages, storing them
- in your Outbox to be sent the next time you connect.
- </para>
-
- <para>
- While POP mail downloads all messages to your local system,
- IMAP and Exchange connections usually download just the
- headers, and fetch the rest only when you want to read the
- message. Before you go offline, Evolution will download
- the unread messages from the folders you have chosen to
- store.
- </para>
-
- <para>
- To mark a folder for offline use, select <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenuitem>Settings</guimenuitem> </menuchoice> and then
- click the <guilabel>Folder Settings</guilabel> icon. In the
- <guilabel>Offline Folders</guilabel> tab, click the check-box
- next to the folders that you would like to use while you are
- offline.
- </para>
-
- <para>
- Your connection status is shown by the small icon in the lower
- left border of the Evolution main window. When you are online,
- it will display two connected cables. When you go offline, the
- cables will separate.
- </para>
-
- <para>
- To cache your selected folders and disconnect from the
- network, select <menuchoice><guimenu>File</guimenu><guimenuitem>Work
- Offline</guimenuitem></menuchoice> or click the
- connection status icon in the lower left of the screen. When you
- want to reconnect, choose
- <menuchoice><guimenu>File</guimenu><guimenuitem>Work
- Online</guimenuitem></menuchoice> or click the connection
- status icon again.
- </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, unselect <menuchoice>
- <guimenu>View</guimenu> <guimenuitem>Show
- Attachments</guimenuitem> </menuchoice>; to show them
- again, select <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>
-
- <tip id="reply-to-per-mail">
- <title>Setting Reply-to On a Per-Mail Basis</title>
- <para>
- <application>Evolution</application> has the ability to
- let you specify the Reply-To in an email. Using this, you
- can setup a special Reply-To for an email. To do this:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Open a composer window
- </para>
- </listitem>
- <listitem>
- <para>
- Open the Reply-To field by selecting
- <menuchoice>
- <guimenu>View</guimenu>
- <guimenuitem>Reply To</guimenuitem>
- </menuchoice>
- </para>
- </listitem>
- <listitem>
- <para>
- Enter the address you wish to have be the
- Reply-To address in the new Reply-To field.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </tip>
- </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: ex-feature, may be reinstated, but probably not.
--->
- </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 in grey with a
- blue line to one side (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-composer"/> 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>
- <tip>
- <title>Using Bullets to Make Your Email More
- Attractive</title>
- <para>
- Instead of using asterisks to mark a bulleted list,
- try the Bulleted List style from the style dropdown
- list. <application>Evolution</application> uses
- more attractive bullets and handles word wrap and
- multiple levels of indentation.
- </para>
- </tip>
- </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 <guiicon>bold A</guiicon> for bold text</para></listitem>
- <listitem><para>Push <guiicon>italic A</guiicon> for italics</para></listitem>
- <listitem><para>Push <guiicon>underlined A</guiicon> to underline</para></listitem>
- <listitem><para>Push <guiicon>striked A</guiicon> 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 <menuchoice> <guimenuitem>Style</guimenuitem>
- <guimenuitem>Page Style</guimenuitem>
- </menuchoice>.
- </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>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. 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 web page address to be automatically formatted, keep in mind that a space terminates the link.
- </para>
- </note>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guimenuitem>Insert 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>
- 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>Insert 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>
- 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>Insert Table</term>
- <listitem>
- <para>
- Inserts a table into the text to help divide two
- sections.
- </para>
- <para>
- To insert a table:
- <orderedlist numeration="arabic">
- <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 table <guibutton>Template</guibutton>
- you wish to use. Each has a slightly different feel and
- layout.
- </para>
- </listitem>
- <listitem>
- <para>
- If you so desire, you may change the number of
- rows, columns, spacing of each cell, and so forth.
- </para>
- </listitem>
- <listitem>
- <para>
- Click the <guibutton>Insert</guibutton> button.
- </para>
- </listitem>
- </orderedlist>
- </para>
-
- <para>
- Once the table is in place, you can right-click on
- it and get a list of ways to alter it, such as
- changing its background color, expanding it, or
- deleting a row or cell.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Templates</term>
- <listitem>
- <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>
- 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>
- 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>
- 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>
- </listitem>
- </varlistentry>
- </variablelist>
-</para>
-</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, select
- <menuchoice> <guimenu>Actions</guimenu>
- <guimenuitem>Forward</guimenuitem> </menuchoice>, or press
- <keycombo
-action="simul"><keycap>Ctrl</keycap><keycap>J</keycap></keycombo>. If
- you prefer to forward the message <glossterm
- linkend="inline">inline</glossterm>
- instead of attached, select <menuchoice>
- <guimenu>Actions</guimenu><guisubmenu>Forward</guisubmenu><guimenuitem>
- Inline</guimenuitem> </menuchoice> from the menu. Choose an
- addressee as you would when sending a new message; the
- subject will already be entered, although you can alter it
- if you wish. 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>
- </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
- <guimenuitem>View Inline</guimenuitem>, <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>Tentatively 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. If you prefer to have every mail folder displayed, you
- can select that option as well. However, if you'd like to choose
- specific items in your mailbox, and exclude others, you can use
- the subscription management tool to do that.
- </para>
- <para>
- Here's how:
- <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 receive
- 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. For signing messages, it's
- reversed: you encrypt the signature with your private key, so
- only your public key can unlock it. When you send it, the
- recipient gets your public key and unlocks the signature,
- verifying your identity.
- </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 Message</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>
- Select
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenuitem>Settings</guimenuitem>
- </menuchoice>, go to the Mail Account settings, and
- select the account with which you want to use encryption.
- </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 the command: <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 algorithm, "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 key server. 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 Key Server?</title>
- <para>
- Key servers store your public keys for you so that your
- friends can decrypt your messages. If you choose not to
- use a key server, 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 a central place when
- they want.
- </para>
- <para>
- If you don't have a key you need to unlock or encrypt a
- message, you can have your encryption tool set to look it
- up automatically. If it can't find the key, then you'll
- get an error message.
- </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>Settings</guimenuitem>
- </menuchoice>
- and select the <guilabel>Mail Accounts</guilabel> button, then
- select the account you want to use securely, and click the
- <guibutton>Edit</guibutton> button. Then, select the
- <guilabel>Security</guilabel> tab in the account dialog. 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 encryption 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 Received 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.xml b/help/C/usage-mainwindow.xml
deleted file mode 100644
index b78ba13dfc..0000000000
--- a/help/C/usage-mainwindow.xml
+++ /dev/null
@@ -1,1576 +0,0 @@
-<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. It 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"><trademark>VFolders</trademark></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>
- <note>
- <title>Command Line Options</title>
- <para>
- Evolution has a number of command-line options that you may
- wish to make use of. You can find the full list by running
- the commands <userinput>man evolution</userinput> or
- <userinput>evolution --help</userinput>. The most
- important ones are:
- <itemizedlist>
- <listitem>
- <para>
- To start Evolution in offline mode: <userinput>evolution --offline</userinput>
- </para>
- </listitem>
-
- <listitem>
- <para>
- To start Evolution and begin composing a message to the email address you name: <userinput>evolution mailto:joe@somewhere.net</userinput>
- </para>
- </listitem>
-
- <listitem>
- <para>
- To make your web browser use Evolution as the default email client, enter <userinput>evolution "%s"</userinput> as the email handler in your web browser or in the GNOME Control Center.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </note>
- </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 step in the assistant. Here,
- you will enter some basic personal information. You can
- define multiple identities later on with the
- <menuchoice><guimenu>Tools</guimenu>
- <guimenuitem>Settings</guimenuitem></menuchoice> tool and
- clicking the <guibutton>Mail Accounts</guibutton> button.
- <itemizedlist>
- <listitem>
- <para>
- Full Name: Your full name (Example: John Doe).
- </para>
- </listitem>
- <listitem>
- <para>
- Email Address: Your email address (Example: john@doe.com)
- </para>
- </listitem>
- <listitem>
- <para>
- Reply-To: If you want to have replies sent to another
- email address, enter it here (optional).
- </para>
- </listitem>
- <listitem>
- <para>
- Organization: The company where you work, or the
- organization you represent when you send email
- (optional).
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </sect2>
-
- <sect2 id="second-step">
- <title>Receiving Email</title>
- <para>
- The <guilabel>Receiving Email</guilabel> lets you determine
- which you will get your email.
- <itemizedlist>
- <listitem>
- <para>
- Server Type: There are numerous types of servers
- from which <application>Ximian Evolution</application>
- can fetch your mail. Ask your system administrator if
- you're not sure which of the following are available to
- you:
- <itemizedlist>
-
- <listitem>
- <para>
- POP: Downloads your email to your hard disk for
- permanent storage.
- </para>
- </listitem>
- <listitem>
- <para>
- Microsoft Exchange: Available only if you have
- purchased the Ximian Connector for Microsoft
- Exchange, this will allow you to connect to a
- Microsoft Exchange 2000 server, which stores
- email, calendar, and contact information on the
- server.
- </para>
- </listitem>
-
-
- <listitem>
- <para>
- IMAP: Keeps the email on your server so you can
- access your email from multiple systems.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Standard Unix mbox spool or directory: If you want
- to read and store mail in the mail spool on your
- local system, choose this option. You'll need to
- provide the path to the mail spool
- you want to use.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Maildir format mail directories: If you download
- your mail using qmail or another maildir-style
- program, you'll want to use this option. You'll need
- to provide the path to the mail directory you want to
- use.
- </para>
- </listitem>
- <listitem>
- <para>
- MH format mail directories: If you download your
- mail using mh or another MH-style program, you'll
- want to use this option. You'll need to provide
- the path to the mail directory you want to use.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Local Delivery: Choose this option if you want to
- move mail from the spool and store it in your home
- directory. If you would rather leave mail in your
- system's spool files, choose the
- <guimenuitem>Standard Unix mbox
- spools</guimenuitem> option instead. You'll need
- to provide the path to the mail spool you want to
- use.
- </para>
- </listitem>
-
- <listitem>
- <para>
- None: Select this if you do not plan to
- check mail with this account.
- </para>
- </listitem>
- </itemizedlist>
-
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <para>
- If you selected POP, Microsoft Exchange, or IMAP as your mail
- server, you'll need to enter some more information:
- </para>
- <itemizedlist>
- <listitem>
- <para>The host name of your mail server. Ask
- your system administrator if you're not
- sure.</para>
- </listitem>
-
- <listitem>
- <para>The username for the account on that
- system. </para>
- </listitem>
-
- <listitem>
- <para>Whether you want to use a secure (SSL)
- connection. If your server supports it, it's
- best to enable this security option.
- </para>
- </listitem>
-
- <listitem>
- <para>The authentication options supported by
- your server. If you're not sure, click the
- <guilabel>Check for supported types</guilabel>
- button or ask your system administrator.
- </para>
- </listitem>
-
- <listitem>
- <para>Whether you'd like Evolution to remember
- your password.
- </para>
- </listitem>
- </itemizedlist>
- <tip id="exchange-info">
- <title>Ximian Evolution Talk to Microsoft Exchange?</title>
- <para>
- If you have purchased Ximian Connector for Microsoft
- Exchange, you can access Microsoft Exchange 2000 servers
- natively. If you do not have the Connector, or if you use
- an older version of Microsoft Exchange, talk to your system
- administrator about access to standard protocol services
- like POP and IMAP.
- </para>
- </tip>
-
- </sect2>
- <sect2 id="more-mail-options">
- <title>More Mail Configuration Options</title>
- <para>
- There are more extensive options for mail preferences,
- especially if you've chosen POP, Microsoft Exchange, or IMAP
- as incoming mail server type. If you want to set these
- options after you've created the account, you can select
- <menuchoice><guimenu>Tools</guimenu> <guimenuitem>Configure
- </guimenuitem></menuchoice>, click the <guibutton>Mail
- Accounts</guibutton> button. Then, select the account you want
- to change and click <guibutton>Edit</guibutton>. See <xref
- linkend="config-prefs-mail"/> for details.
- </para>
- <variablelist>
- <varlistentry>
- <term>If you chose POP mail:</term>
- <listitem><para>
- <itemizedlist>
- <listitem>
- <para>Checking for new mail: If you would like
- <application>Evolution</application> to check for new mail
- automatically, check the box and select a frequency in
- minutes.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Message Storage: If you'd like to store copies of your
- mail on the server, check this option.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>If you chose Microsoft Exchange:</term>
- <listitem><para>
- <itemizedlist> <listitem>
- <para>Checking for new mail: If you would like
- <application>Evolution</application> to check for new mail
- automatically, check the box and select a frequency in
- minutes.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Global Address List/Active Directory: Enter the name of
- your global catalog server here. You may also choose to
- limit the server's responses and select a maximum number
- of results for an address search. A maximum number of
- results limits the load on your system and on your
- network.
- </para>
- </listitem>
-
- <listitem>
- <para>Mailbox Name: If your active directory user name is
- different from your Exchange mailbox name, enter the
- mailbox name here.
- </para>
- </listitem>
- <listitem>
- <para>
- Outlook Web Access (OWA) Path: In most cases, the URL
- for web access is "http://server.company.com/exchange."
- If your system has a path that is not "exchange," enter
- the appropriate value here.
- </para>
- </listitem>
- <listitem>
- <para>Public Folder Server: Enter the name of your organization's public folder server, if any, here.</para>
- </listitem>
-
- <listitem>
- <para>Apply filters to new messages in Inbox on this
- server: Check this box to use filters when you visit the
- Inbox for this account.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>If you chose IMAP:</term>
- <listitem>
- <para>
- <itemizedlist>
- <listitem>
- <para>Checking for new mail: If you would like
- <application>Evolution</application> to check for new mail
- automatically, check the box and select a frequency in
- minutes.
- </para>
- </listitem>
-
- <listitem>
- <para>If you want <application>Evolution</application>
- to check for new messages in <emphasis>all</emphasis> your
- IMAP folders, make sure the <guilabel>Check for new
- messages in all folders</guilabel> box is selected.</para>
- </listitem>
-
- <listitem>
- <para>Show only subscribed folders: Check this box if you
- have more folders in your IMAP view than you want to
- read.</para>
- </listitem>
-
- <listitem>
- <para>
- Override server-supplied namespace: If you like, enter a
- specific directory where your server stores mail for
- you. Typical values are "mail" and "Mail." For more
- information about how to use IMAP mail, see <xref
- linkend="usage-mail-subscriptions"/>.</para>
- </listitem>
-
- <listitem>
- <para>Apply filters to new messages in INBOX on this
- server: If you'd like your filters to work on this account
- as well as on locally downloaded mail, check this box.</para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-
- <note id="imap-namespace">
- <title>What's an IMAP Namespace?</title>
- <para>
- For IMAP mail servers, your sysadmin may provide
- you with a specific namespace, the directory on
- where your server stores mail for you. If you
- check your IMAP mail and your folder list includes
- files that don't look like mail folders, you
- probably need to change your mail
- namespace. Typical values are "mail" and "Mail."
- If you prefer, you can choose to subscribe to
- individual mail folders one at a time. For more
- information about how to use IMAP mail, see <xref
- linkend="usage-mail-subscriptions"/>.
- </para>
- </note>
-
- </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: There are numerous server types that
- <application>Ximian Evolution</application> supports for sending your
- mail.
- <itemizedlist>
- <listitem>
- <para>
- SMTP: Sends mail directly from your system.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Microsoft Exchange: Sends mail through a Microsoft
- Exchange server using the Microsoft Exchange 2000
- protocol. Available only if you have are using the
- Ximian Connector for Microsoft Exchange. You must
- have a valid license key purchased from <ulink
- url="http://store.ximian.com">store.ximian.com</ulink>.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Sendmail: Uses the Sendmail program to send mail
- from your system. Sendmail is more flexible, but
- is not as easy to configure, so you should only
- select this option if you know how to set up a
- Sendmail service.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <para>
- If you choose SMTP, there are a few additional items to enter:
- <itemizedlist>
- <listitem>
- <para>
- Host: enter your mail sending server's name or IP
- address here.
- </para>
- </listitem>
- <listitem>
- <para>
- Server requires authentication: If your server
- requires you to enter a password to send mail, check
- this box.
- </para>
- </listitem>
- <listitem>
- <para>
- Authentication Type: Unless you've been told otherwise,
- your best bet is to leave this set at
- <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: The account name you use when you login to
- check your email. Normally, this is the part of your
- email address before the '@' character. For Exchange
- servers, it is the username you would use to log in to a
- Windows workstation at your company.
- </para>
- </listitem>
- <listitem>
- <para>
- Remember Password: If you prefer to not enter
- your password every time you check email, press this
- button.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </sect2>
-
- <sect2 id="step-three-b">
- <title>Account Management</title>
- <para>
- This is a very short section. You can pick two things: the
- name for the account, and whether it is the default account.
- </para>
- <para>
- The name you choose for the account is used for display within
- Evolution, and is not sent with any emails. The suggested
- name is your email address, but you can use other words or
- phrases, like "Work," "Personal" or "First Account" if you
- like.
- </para>
- <para>
- If you check the box next to the label <guilabel>Make this my
- default account</guilabel>, Evolution will assume that you will
- send messages from this most often, and will set the
- "From" selector to this account whenever you open a new message. Only one account can be the default.
- </para>
- <para>
- If you have not done so already, you may also be asked to choose
- a time zone.
- </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. If you want, you
- can skip this step and return to it at a later time by
- selecting
- <menuchoice><guimenu>File</guimenu><guimenuitem>Import</guimenuitem></menuchoice>.
- </para>
- <para>
- <application>Ximian Evolution</application> can import the following types of
- files:
- <variablelist>
- <varlistentry>
- <term>VCard (.vcf, gcrd):</term>
- <listitem>
- <para>
- The addressbook format used by the GNOME, KDE, and
- many other contact management applications. You
- should be able to export to VCard format from any
- address book application.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Microsoft Outlook Express 4 (.mbx):</term>
- <listitem>
- <para>
- Email file format used by Microsoft Outlook Express
-4. For other versions of Microsoft Outlook and Outlook Express, see
-the workaround described in the note below.
- </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>Microsoft Outlook and Outlook Express Users</title>
- <para>
- Microsoft Outlook, and versions of Outlook Express after
- version 4, use proprietary formats that <application>Ximian
- Evolution</application> cannot read or import. For contacts,
- you may have to email them to yourself and import them that
- way. For email, there is a simpler workaround:
- <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. There's more information about
- why this works, and how, at the Ximian <ulink
- url="http://support.ximian.com">support website.</ulink>
- </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="importing-mail-from-clients">
- <title>Importing Mail from Other Mail Clients</title>
- <para>
- Chances are, you already have your email in another mail program
- and don't want to lose the information. The following section
- describes how to import mail from specific mail clients.
- </para>
- <sect2 id="mutt">
- <title>Importing Mail from mutt</title>
- <para>
- <application>mutt</application> is a text-based mail client
- which is shipped with many Linux and Unix distributions.
- <application>mutt</application> uses the standard mbox,
- maildir, and MH file formats, which makes importing your mail
- into <application>Evolution</application> easy. By default,
- <application>mutt</application> uses the mbox file format.
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Open <application>Ximian Evolution</application>
- </para>
- </listitem>
- <listitem>
- <para>
- Click
- <menuchoice>
- <guimenu>File</guimenu>
- <guimenuitem>Import</guimenuitem>
- </menuchoice>
- or press
- <keycombo action="simul">
- <keycap>Ctrl</keycap>
- <keycap>I</keycap>
- </keycombo>.
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guibutton>Next</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para>
- Select <guibutton>Import a Single File</guibutton>
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guibutton>Browse</guibutton> and select the file
- you would like to import from. By default, your email
- is stored in <filename>~/mbox</filename> for the mbox
- format and <filename
- class="directory">~/Maildir</filename> for the Maildir format.
- </para>
- </listitem>
- <listitem>
- <para>
- When prompted for what folder in
- <application>Evolution</application> to import to,
- select a folder. You can also create a new folder and
- drop it in there.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </sect2>
- <sect2 id="kmail">
- <title>Importing Mail from KMail</title>
- <para>
- KMail is the mail client which is shipped with the KDE desktop
- environment. KMail uses the standard mbox file format, which
- means that importing your mail into
- <application>Evolution</application> is easy.
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Open <application>Ximian Evolution</application>
- </para>
- </listitem>
- <listitem>
- <para>
- Click
- <menuchoice>
- <guimenu>File</guimenu>
- <guimenuitem>Import</guimenuitem>
- </menuchoice>
- or press
- <keycombo action="simul">
- <keycap>Ctrl</keycap>
- <keycap>I</keycap>
- </keycombo>.
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guibutton>Next</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para>
- Select <guibutton>Import a Single File</guibutton>
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guibutton>Browse</guibutton> and select the file
- you would like to import from. By default, KMail stores
- its information in the Mail directory of your home
- directory.
- </para>
- </listitem>
- <listitem>
- <para>
- When prompted for what folder in
- <application>Evolution</application> to import to,
- select a folder. You can also create a new folder and
- drop it in there.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </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="Aaron Weber"/>
- </imageobject>
- </mediaobject>
- </screenshot>
- </figure>
-
- <para>
- <inlinemediaobject>
- <imageobject>
- <imagedata fileref="figures/full-1" format="PNG"/></imageobject></inlinemediaobject>
- <guilabel>Menu Bar</guilabel>
- </para>
-
- <para>
- The <guilabel>menu bar</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 Tool</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 Addressbook holds contacts, with address, phone, and
- other personal information. Like calendar information,
- contact data can be synchronized with hand-held devices
- and shared over a network.
- </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
- downward. 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>
-
-
- <figure id="mainwin-folderbar">
- <title>Using the Folder Bar</title>
- <screenshot>
- <screeninfo>Inbox with Folder Bar</screeninfo>
- <mediaobject>
- <imageobject>
- <imagedata fileref="figures/folder-bar" format="PNG" srccredit="Aaron Weber"/>
- </imageobject>
- </mediaobject>
- </screenshot>
- </figure>
-
- <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>Tasks</guilabel>, for your task list. Portions
- of your task list are reflected in the calendar, as well
- as in the summary folder.
- </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 the <keycap>Tab</keycap>
- key 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>
- or press the keyboard shortcut
- <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 go here. For mail, that means things like
- 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>Search</guimenu>:</term>
- <listitem><para>
- Select menu items here to search for messages, or for
- phrases within a message. You can also see previous searches
- you have made. In addition to the <guimenu>Search</guimenu>
- menu, there is a text entry box in the toolbar that you can
- use to search for messages.
- </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>
-
- <figure>
- <title>The Evolution Summary</title>
- <screenshot>
- <screeninfo>The Evolution Summary gives you a quick view of your day</screeninfo>
- <mediaobject>
- <imageobject>
- <imagedata format="PNG" fileref="figures/summary" srccredit="Kevin Breit"/>
- </imageobject>
- </mediaobject>
- </screenshot>
- </figure>
-
-<para>
-<inlinemediaobject><imageobject><imagedata fileref="figures/full-1" format="PNG"/></imageobject></inlinemediaobject> <guilabel>Weather Summary</guilabel>
-</para>
-<para>
-Shows you the latest weather updates from hundreds of cities around the world.
-</para>
-<para>
-<inlinemediaobject><imageobject><imagedata fileref="figures/full-2" format="PNG"/></imageobject></inlinemediaobject> <guilabel>News Feeds</guilabel>
-</para>
-<para>
-Displays up to the minute news from your favorite websites.
-</para>
-<para>
-<inlinemediaobject><imageobject><imagedata fileref="figures/full-3" format="PNG"/></imageobject></inlinemediaobject> <guilabel>Mail Summary</guilabel>
-</para>
-<para>
-Shows you how many email messages you have in your selected folders, waiting to be read.
-</para>
-<para>
-<inlinemediaobject><imageobject><imagedata fileref="figures/full-4" format="PNG"/></imageobject></inlinemediaobject> <guilabel>Calendar Summary</guilabel>
-</para>
-<para>
-Shows you your calendar. Tasks are displayed below calendar appointments.
-</para>
-
-
- <para>
- To add additional services to your Summary, or to edit the
- existing services, select
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenuitem>Configure</guimenuitem> </menuchoice> and click
- the <guibutton>Summary Settings</guibutton> button.
- </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 receive multiple file
- attachments.
- </para>
- </listitem>
- <listitem>
- <para>
- It supports multiple mail sources, including <glossterm
- linkend="imap">IMAP</glossterm>, <glossterm
- linkend="pop">POP3</glossterm>, and local
- <filename>mbox</filename> or <filename>mh</filename>
- spools and files created by other mail programs.
- </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="Aaron Weber"/>
- </imageobject></mediaobject>
- </screenshot>
- </figure>
-<!-- ==============End of Figure============================== -->
-</para>
- <para>
- <inlinemediaobject><imageobject><imagedata fileref="figures/full-1"
- format="PNG"/></imageobject></inlinemediaobject> <guilabel>Message List</guilabel>
- </para>
-
- <para>
- The <guilabel>Message 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>
- <inlinemediaobject><imageobject><imagedata fileref="figures/full-2"
- format="PNG"/></imageobject></inlinemediaobject> <guilabel>Email
- Viewer</guilabel>
- </para>
-
- <para>
- This is where your email is displayed.
- </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.
-
-</para>
-<para> Just like with folders, you can right-click on messages in the
- message list and get a menu of possible actions: you can move,
- delete, or undelete them, and create filters or vFolders based
- on them.
- </para>
- <para>
- Most of the mail-related actions you'll want to perform are
- listed in the <guimenu>Actions</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. To display more
- information about your notes, drag the column border to the
- left.
- </para>
-
- <para>
- <inlinemediaobject><imageobject><imagedata fileref="figures/full-3" format="PNG"/></imageobject></inlinemediaobject>
- <guilabel>Month Pane</guilabel>
- </para>
-
- <para>
- The month pane is a small view of your calendar by month. To
- display more months here, drag the column border to the left.
- To view a specific series of days, select them in the month
- view and they will display all the planned events in the
- <interface>Appointment List</interface>.
- </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 and functions with <glossterm
- linkend="ldap">LDAP</glossterm> directories on a 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 gray
- 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 contact cards.
- You can also search through the cards in the same way
- that you search email folders, with the search bar just
- above the contact list.
- </para>
-
- <para>
- <inlinemediaobject><imageobject><imagedata fileref="figures/full-2" format="PNG"/></imageobject></inlinemediaobject>
- <guilabel>Alphanumeric Shortcuts</guilabel>
- </para>
- <para> Click one of the buttons along the right side of the
- window to view contacts that begin with the letter or number
- you click.
- </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-print.xml b/help/C/usage-print.xml
deleted file mode 100644
index 1e7f5c5b18..0000000000
--- a/help/C/usage-print.xml
+++ /dev/null
@@ -1,115 +0,0 @@
-<chapter id="usage-print">
- <title>Printing with Evolution</title>
- <para>
- If you've printed from most any other
- <application>Gnome</application> application, you should be able
- to print from <application>Evolution</application> without much
- trouble.
- </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 <glossterm
- linkend="postscript">postscript</glossterm> 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 your paper
- looks, 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 your mail, calendar, or addressbook.
- </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
- <command>lpr</command>) 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/C/usage-sync.xml b/help/C/usage-sync.xml
deleted file mode 100644
index 45e18e5e82..0000000000
--- a/help/C/usage-sync.xml
+++ /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 97cca23f69..0000000000
--- a/help/ChangeLog
+++ /dev/null
@@ -1,4 +0,0 @@
-2003-11-17 JP Rosevear <jpr@ximian.com>
-
- * C/Makefile.am: Switch version to 1.5
-
diff --git a/help/ChangeLog.pre-1-4 b/help/ChangeLog.pre-1-4
deleted file mode 100644
index c983277068..0000000000
--- a/help/ChangeLog.pre-1-4
+++ /dev/null
@@ -1,2072 +0,0 @@
-2003-05-19 Aaron Weber <aaron@ximian.com>
-
- * C/config-prefs.xml: fix glossterms not to be inside
- <guilabel>s. None of these should be inside <term>s anyway.
-
-2003-05-02 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mail-org.xml: Filter-new-fig.png
-
- * C/figures/filter-assist-fig.png: removed this figure image. Didn't need it and -new.
- * C/figures/small_desktop.png: removed this figure image. Not sure why we had it.
- * C/Makefile.am: remove filter-assist-fig.png,
-
-2003-04-15 Aaron Weber <aaron@ximian.com>
-
- * C/usage-exchange.xml: delegation
-
-2003-04-27 Rodney Dawes <dobey@ximian.com>
-
- * C/Makefile.am: Add figures/outline.png to $(figs)
-
-2003-04-14 Aaron Weber <aaron@ximian.com>
-
- * C/config-prefs.xml: Validation, mostly. Change in some ref names.
-
-2003-04-10 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mail-org.xml: can't vfolder on arbitrary folders.
-
-2003-04-08 Aaron Weber <aaron@ximian.com>
-
- * C/legal.xml: update trademark/copyright hoo-ha.
-
-2003-04-07 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mail-org.xml: add flag-for-followup instructions.
-
-2003-03-27 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am (EXTRA_DIST): Ooops, add omf.make.
-
-2003-03-26 Ettore Perazzoli <ettore@ximian.com>
-
- * C/evolution-1.4-C.omf: Renamed from evolution-C.omf.
- * C/evolution-1.4.xml: Renamed from evolution.xml.
-
- * Makefile.am (SUBDIRS): Remove "no" for now.
-
- * xmldocs.make: Updated to most recent version on GNOME CVS.
-
- * C/Makefile.am (docname): Add version.
- (omffile): Likewise.
-
-2003-03-19 Aaron Weber <aaron@ximian.com>
-
- * Makefile.am: s/sgml/xml/ (DOH)
-
-2003-02-19 Aaron Weber <aaron@ximian.com>
-
- * C/preface.xml: add a couple "expert tips" that don't really go
- anywhere else.
-
-
-2003-02-18 Aaron Weber <aaron@ximian.com>
-
- * C/usage-exchange.xml: replaced image, updated for 1.2 layout
- (different order, mostly). Changed name of a section for better
- clarity; this may cause filenames to differ in future builds.
-
- * C/figures/exchange-receive-options.png: updated image.
-
-2003-02-04 Aaron Weber <aaron@ximian.com>
-
- * C/apx-authors.xml: thx to Baris, adjust phrasing in assorted
- places. tiny fixes, basically.
-
-2003-01-30 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mainwindow.xml: updates from Baris Cicek.
-
-2003-01-15 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mainwindow.xml: Change links from ghelp links to internal apx-fdl or apx-gpl
-
- * es/evolution.sgml: s/gnome-help/ghelp
-
- * es/preface.sgml: s/gnome-help/ghelp
-
-2003-01-11 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mail.xml: "Send Later" feature changed for 1.2 and I
- didn't notice. Shame on me.
-
-2002-12-16 Aaron Weber <aaron@ximian.com>
-
- * C/config-sync.xml: spelling/typos
-
- * C/usage-exchange.xml: spelling/typos
-
- * C/usage-mail.xml: spelling/typos
-
- * C/usage-mainwindow.xml: spelling/typos
-
-2002-12-10 Aaron Weber <aaron@ximian.com>
-
- * C/config-prefs.xml: change directory server description.
-
- * C/preface.xml: typo (bug 35362, "Resend" instead of "Redirect).
- This whole section will need to be redone at some point.
-
-2002-12-06 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mail-org.xml: add spam filtering help.
-
-2002-11-19 Aaron Weber <aaron@ximian.com>
-
- * C/config-prefs.xml: fix typo as per bug 34152
-
- * C/legal.xml: redo tags for legalnotice ordering. open/close for
- actual preface is in evolution.xml and the LEGAL entity
- (legal.xml) is now part of the preface. the legalnotice tag itself
- merely says "hey, go look at the preface, legal info is there due
- to rendering issues."
-
- * C/apx-gpl.xml: new file. GPL!
-
- * C/Makefile.am: New file: apx-gpl.xml. Re-alphabetize the files
- listed as entities, and make the \'s line up so it looks pretty.
-
- * C/preface.xml: redo tags for legalnotice ordering. open/close
- for actual preface is in evolution.xml and the LEGAL entity
- (legal.xml) is now part of the preface.
-
- * C/evolution.xml: reorder, add GPL, put legalnotice inside
- preface. Put actual <preface> tags in this file, so that the
- preface could consist of sect1s which are the &LEGAL; and
- &PREFACE; entities.
-
-2002-11-11 Aaron Weber <aaron@ximian.com>
-
- * C/config-prefs.xml: fix bug 27336, which is about how the Search
- Base option description is wrong.
-
-2002-11-04 Aaron Weber <aaron@ximian.com>
-
- * C/*.sgml: All sgml files replaced with xml files. XML files
- validated. Two new XML files-- apx-fdl.xml and legal.xml
-
- * C/evolution-C.omf: Altered to fit the GDP template. This may now
- work with the GNOME 2.0 DTD, although I could be wrong.
-
- * sgmldocs.make: removed and replaced with xmldocs.make. This will
- break all translations until they are also ported to XML. I will
- probably begin doing that tomorrow, since it's just markup and not
- language stuff.
-
- * C/Makefile.am: added two files
-
-2002-10-22 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mail.sgml: Edit-->Undelete, not Actions-->Undelete
-
-2002-10-16 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mail.sgml: no longer need to enter path.
-
-
-2002-10-15 Aaron Weber <aaron@ximian.com>
-
- * C/usage-exchange.sgml: Update supported/unsupported list.
-
- * C/topic.dat: Change "What is Evolution" to "Introduction"
-
- * C/usage-exchange.sgml: typo.
-
- * C/menuref.sgml: update keycapss.
-
- * C/usage-mainwindow.sgml: add note about command-line options.
-
-2002-10-11 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mail-org.sgml: add note about multiple repeated header
- definitions as per 31291.
-
-2002-10-08 Aaron Weber <aaron@ximian.com>
-
- * C/usage-exchange.sgml: fix 1.0/1.2 feature list discrepancies.
-
- * C/preface.sgml: add info about man page and so forth.
-
- * C/usage-mail.sgml: fix 30892, a cosmetic bug.
-
-2002-09-20 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mail.sgml: offline usage.
-
- * C/usage-calendar.sgml: linked to wrong image.
-
-2002-09-19 Kjartan Maraas <kmaraas@gnome.org>
-
- * C/evolution-C.omf: Make it validate.
- * es/evolution-es.omf: Same here.
-
-
-2002-09-19 Aaron Weber <aaron@ximian.com>
-
- * C/config-sync.sgml: add item about permissions.
-
- * C/usage-mail-org.sgml: add note about filter applications, tip
- for easy filtering.
-
- * C/usage-mail.sgml: encryption update
-
-2002-08-28 Aaron Weber <aaron@ximian.com>
-
- * C/preface.sgml: nav-by-letters
-
-2002-08-23 Aaron Weber <aaron@ximian.com>
-
- * C/preface.sgml: remove shortcuts that didn't actually get added
- to the app.
-
-2002-08-22 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mail-org.sgml: change Exchange description
-
- * C/config-prefs.sgml: add RDF note to newsfeed item.
-
- * C/preface.sgml: update as per Christine's comments in
- http://bugzilla.ximian.com/show_bug.cgi?id=29239
-
-2002-07-09 Kevin Breit <mrproper@ximian.com>
-
- * C/usage-mail-org.sgml: Added note about set status filter action.
-
-2002-06-28 Aaron Weber <aaron@ximian.com>
-
- * C/usage-exec-summary.sgml: change menu item links.
-
-2002-06-27 Aaron Weber <aaron@ximian.com>
-
- * C/evolution-C.omf: apply patch from owen taylor
-
-2002-06-26 Aaron Weber <aaron@ximian.com>
-
- * C/usage-contact.sgml: remove the search-refining feature, which
- isn't actually true, i think.
-
- * C/apx-authors.sgml: update slightly.
-
- * C/apx-bugs.sgml: remove list of 1.1.x features.
-
- * C/usage-mainwindow.sgml: minor tweaks
-
-2002-06-25 Aaron Weber <aaron@ximian.com>
-
- * C/config-prefs.sgml: more improvem,ent.
-
-2002-06-24 Aaron Weber <aaron@ximian.com>
-
- * C/config-prefs.sgml: overhaul. still need to improve examples.
-
- * C/usage-mail.sgml: link to somewhere i have deleted.
-
- * C/usage-contact.sgml: fix sharing section more
-
-2002-06-10 Aaron Weber <aaron@ximian.com>
-
- * C/usage-contact.sgml: some of this was shamefully inaccurate.
-
- * C/preface.sgml: add original location.
-
-2002-06-04 Kevin Breit <mrproper@ximian.com>
-
- * C/usage-mail.sgml: Added a tip mentioning that gpg can
- automagically contact the server for keys without having to use a
- console.
-
-2002-05-30 Kevin Breit <mrproper@ximian.com>
-
- * C/usage-mail.sgml: Reworded the signature introduction
- paragraph. Started work on documenting the new signature editor.
- I am kind of unsure of the full functionality, so I'm going to
- wait a little bit on it.
-
-2002-05-30 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mail.sgml: links to conf.
-
- * C/usage-mainwindow.sgml: updated for links to configuration.
-
- * C/preface.sgml: added "What's new?" section with a few entries.
-
- * C/evolution.sgml: Minor stylistic tweaks, updated version
- numbers.
-
- * C/Makefile.am: Removed evolution-faq.sgml and usage-notes.sgml,
- and cvs removed them. These files are vestiges of the distant
- past.
-
-2002-05-06 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mainwindow.sgml: minor feature change in Evolution w/r/t Exchange calendars.
-
- * C/usage-exchange.sgml: minor feature change in Evolution w/r/t Exchange calendars.
-
- * C/usage-calendar.sgml: minor feature change in Evolution w/r/t Exchange calendars.
-
- * C/usage-mainwindow.sgml: validation issue.
-
-2002-04-22 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mail.sgml: use gpg --import, as per bug 23113
-
-2002-04-01 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mainwindow.sgml: remove png-variant DTD from comments.
- change should affect nothing.
-
-2002-04-04 Ettore Perazzoli <ettore@ximian.com>
-
- * C/Makefile.am: Remove bogus EXTRA_DIST with sgmldocs.make.
- Problem pointed out by Richard Boulton <richard@tartarus.org>.
-
-2002-03-27 JP Rosevear <jpr@ximian.com>
-
- * C/Makefile.am: end the line properly
-
-2002-03-27 Aaron Weber <aaron@ximian.com>
-
- * C/topic.dat: add from branch.
- * C/figures/*: merge from branch
- * C/usage-calendar.sgml: merge from branch
- * C/usage-mail.sgml: merge from branch
- * C/usage-mail-org.sgml: merge from branch
- * C/Makefile.am: changes from other branch
- * C/usage-print.sgml: merge from branch
- * C/usage-exchange.sgml: merge from branch
- * C/usage-mail.sgml: merge from evolution-1-0-branch branch.
-
-2002-03-25 Kevin Breit <mrproper@ximian.com>
-
- * C/usage-mail.sgml: Added mention that 2048 maybe recommended by
- some people. Fixed a typo.
-
-2002-03-23 Kevin Breit <mrproper@ximian.com>
-
- * C/usage-print.sgml: I fixed a typo which caused the
- documentation to not build.
-
-2002-03-14 Kevin Breit <mrproper@ximian.com>
-
- * C/usage-mail-org.sgml: Did some basic cleanup.
-
- * C/usage-mail.sgml: Linked "expunge" to the glossary.
- Made some basic grammar changes.
- Reindented a whole lot of things.
-
- * C/apx-gloss.sgml: Added Postscript as a glossary definition.
-
- * C/usage-print.sgml: Changed the introduction of this. Do users
- really care about gnome-print? Linked the Postscript line to the
- glossary.
-
- * C/usage-mail.sgml: Pulled warning about the HTML mail stuff.
-
-2002-03-12 Kevin Breit <mrproper@ximian.com>
-
- * C/usage-mail.sgml: Replaced "png" with "PNG". This shouldn't
- break the SGML build and it's a slow start to the XML porting
- process. Included information about how to create an HTML
- signature.
-
-2002-03-11 Kevin Breit <mrproper@ximian.com>
-
- * C/usage-mail.sgml: Redid wording on a title, minute change.
- Fix indenting.
-
-2002-02-10 Kevin Breit <mrproper@ximian.com>
-
- * C/evolution-C.omf: Removed "The" from title.
-
-2002-02-06 Aaron Weber <aaron@ximian.com>
-
- * C/Makefile.am: added
- C/figures/schedule.png,exchange-identity.png exchange-receive.png,
- exchange-receive-options.png
-
- * C/usage-exchange.sgml: expanded note about active directory
- server. added screenshot for Free/Busy feature. Doubled the size
- of the config instructions.
-
- * C/figures/schedule.png: New file, screenshot for free/busy feature.
-
- * C/evolution.sgml: added correct copyright years.
-
- * C/usage-mail-org.sgml: warning about INBOX subfolder brokenness.
-
-2002-01-29 Kevin Breit <mrproper@ximian.com>
-
- * C/config-prefs.sgml: Started writing an LDAP config example
-
-2002-01-27 Kevin Breit <mrproper@ximian.com>
-
- * C/config-prefs.sgml: Added information regarding types of search scopes
-
- * C/usage-contact.sgml: Fixed some linking brokenness
-
- * C/apx-gloss.sgml: Added Search Base as an entry
- Added Search Scope as an entry
-
- * C/config-prefs.sgml: Fixed indenting, I guess.
-
- * C/usage-contact.sgml: Rewrote LDAP introduction paragraph
- Added information about setting up Evolution to use LDAP. It's just a lazy xref.
-
-2002-01-27 Ettore Perazzoli <ettore@ximian.com>
-
- * sgmldocs.make: Use `-f' instead of `-e' so installation of
- topic.dat works on non-GNU systems too.
-
-2002-01-17 Aaron Weber <aaron@ximian.com>
-
- * C/apx-gloss.sgml: typos.
-
-2002-01-15 Aaron Weber <aaron@ximian.com>
-
- * C/config-prefs.sgml: Redo the whole options/account-creation
- thing.
-
- * C/usage-mainwindow.sgml: Redo the whole options/account-creation
- thing.
-
-2002-01-07 Aaron Weber <aaron@ximian.com>
-
- * C/evolution.sgml: Touched this file but don't think I changed
- it.
-
- * C/usage-calendar.sgml: mention the full-advantage section and
- the exchange features. Expand mention of "autopick" and general
- polish on the appointment-scheduling and peer-to-peer groupware
- functions. Also clarify palm-sync location information. All
- features danw mentioned as critical are now docuemnted.
-
- * C/usage-exchange.sgml: Fix and expand as per Danw's notes about
- Features that need to be documented.
-
-2002-01-04 Aaron Weber <aaron@ximian.com>
-
- * C/usage-exchange.sgml: Revised list of supported/unsupported
- features. Changed installation instructions.
-
-2001-12-21 Aaron Weber <aaron@ximian.com>
-
- * C/usage-exchange.sgml: add notes about server/license
- requirements, revise "your previous options" text to flow more
- smoothly.
-
-2002-01-04 Kevin Breit <mrproper@ximian.com>
-
- * C/usage-mail.sgml: Added a tip about reply-to specification stuff
-
- * C/usage-calendar.sgml: Fixed brokenness
-
-2001-12-27 Kevin Breit <mrproper@ximian.com>
-
- * C/usage-exchange.sgml: Small fix
-
-2001-12-24 Kevin Breit <mrproper@ximian.com>
-
- * C/apx-bugs.sgml: Updated indenting
-
- * C/apx-authors.sgml: Updated my email address
-
- * C/usage-print.sgml: Just, ya know, small change
-
- * C/usage-exchange.sgml: Fixed wording, tags, and indenting
-
-2001-12-22 Kevin Breit <mrproper@ximian.com>
-
- * C/usage-mainwindow.sgml: Added information about importing mutt to Evolution.
- Added a bit of info to the above.
-
-2001-12-20 Kevin Breit <mrproper@ximian.com>
-
- * C/usage-exchange.sgml: Added a <sect1> that discusses features of Connector
-
-2001-12-18 Aaron Weber <aaron@ximian.com>
-
- * C/usage-exchange.sgml: add notes about server requirements.
-
- * C/topic.dat: Changed label of "Connecting to Exchange Servers"
-
-2001-12-18 Kevin Breit <mrproper@ximian.com>
-
- * C/usage-mainwindow.sgml: Added information about importing KMail to Evolution.
-
-2001-12-14 Kevin Breit <mrproper@ximian.com>
-
- * C/apx-gloss.sgml: Slight glossary changes in wording
-
- * C/usage-mail.sgml: Indenting changes, minor reorganization.
-
-2001-12-05 Aaron Weber <aaron@ximian.com>
-
- * C/usage-calendar.sgml: added "meeting-announce" note ("Simple
- meeting announcements").
-
- * C/config-prefs.sgml: Additional links to other portions of the
- document.
-
-2001-11-30 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mail.sgml: Tiny error fix.
-
-2001-11-29 Kevin Breit <mrproper@ximian.com>
-
- * C/usage-mail.sgml: Added more info about pretty emails.
-
-2001-11-28 Kevin Breit <mrproper@ximian.com>
-
- * C/usage-mail.sgml: Added section about how to make your email pretty. I'll add more each day or something.
-
-2001-11-14 Ettore Perazzoli <ettore@ximian.com>
-
- [Workaround for Nautilus/Scrollkeeper bug that prevents our SGML
- files to generate the docs properly; pointed out by Greg Leblanc.]
-
- * C/evolution-C.omf: Point to index.html instead of
- `evolution.sgml'.
-
- * sgmldocs.make: Install the SGML files in evolution/sgml, and the
- HTML files in evolution.
-
-2001-10-29 Aaron Weber <aaron@ximian.com>
-
- * C/apx-bugs.sgml: typos, redescribe 1.1 bugs. Re-validated.
-
- * C/apx-authors.sgml: Added last few authors, a few more credits,
- etc. Also changed contact info and URL for evolution.
-
- * C/menuref.sgml: did we have only 1 item in the calendar?
- yes. Also, s/Contact Manager/Addressbook/
-
- * C/usage-calendar.sgml: phrasing. UI. Spelling. Validation.
-
- * C/Makefile.am: removed config-encryption and
- usage-encryption. Stray files. Do not use, ship, etc. All
- encryption info is in the mail docs.
-
- * C/config-sync.sgml: call it the addressbook. added : for <terms>
-
- * C/config-prefs.sgml: commented out empty section.
-
- * C/figures/print-preview.png: ch. screenshot
-
- * C/usage-contact.sgml: address book--> addressbook
-
- * C/usage-mail-org.sgml: added "the note below" (duplicate of data
- in mainwindow.sgml, but so is all the import information. The
- import process is available in two places, we should document it
- in two places. Also typos. removed a commented-out section on
- subscription management-- now in usage-mail and mainwindow.
-
- * C/usage-mail.sgml: mdash correction.
-
- * C/usage-mainwindow.sgml: replaced &mdash; with :
-
- * C/apx-gloss.sgml: typo.
-
- * C/preface.sgml: gnome-help-browser doesn't understand &mdash;
-
-2001-10-28 Kevin Breit <mrproper@ximian.com>
-
- * C/usage-mail-org.sgml: Added the iCalendar format to the list of imported types. The .ics importing was added _last minute_.
-
- * C/usage-calendar.sgml: Fixed stupid build bugs
-
- * C/usage-mail.sgml: Fixed a boo-boo
-
- * C/usage-exec-summary.sgml: Touchups, nothing here, run along
-
-2001-10-27 Kevin Breit <mrproper@ximian.com>
-
- * C/config-prefs.sgml: Rewrite of the calendar preferences. I love how I'm having to rewrite this 48 hours before the freeze. Why are we waiting this long? It's beyond me, but oh well. I'll continue writing and listening to The Doors.
-
- * C/figures/calendar.png: Added labels
-
- * C/figures/mail-inbox.png: Added labels and changed which image is used
-
- * C/evolution.sgml: Bumped the version # to 1.0
-
- * C/figures/summary.png: I played with the labels a bit
-
-2001-10-26 Kevin Breit <mrproper@ximian.com>
-
- * C/usage-calendar.sgml: Lots of changes on recommendation from Damon Chaplin. We love you Damon!
-
- * C/usage-contact.sgml: One more FIXME...done
-
- * C/config-prefs.sgml: Fixed a definition, one less FIXME to deal with.
-
- * C/usage-mail-org.sgml: Moved importing information here.
-
- * C/usage-mail.sgml: Moved importing information to -org.sgml
-
- * C/usage-mail-org.sgml: Added a note
-
- * C/usage-mainwindow.sgml: Added screenshot and labels of stuff for summary.
-
-2001-10-24 Kevin Breit <mrproper@ximian.com>
-
- * C/figures/mail-composer.png: I updated this becuase the screenshot was humerously _old_.
-
-2001-10-22 Ettore Perazzoli <ettore@ximian.com>
-
- * C/topic.dat: s/usage-exec-summary.html/usage-summary.html.
-
-2001-10-22 Aaron Weber <aaron@ximian.com>
-
- * C/evolution.sgml: validation. SIlly me.
-
-2001-10-19 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mail-org.sgml: Many changes w/r/t IMAP and importation and encryption.
-
- * C/usage-contact.sgml: A few changes, w/r/t import.
-
- * C/usage-mainwindow.sgml: IMAP stuff.
-
- * C/usage-exec-summary.sgml: More changes. Update to intro sect.
-
-2001-10-19 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mainwindow.sgml: Assorted fixes. Kevin, there's a FIXME for ya in here.
-
- * C/preface.sgml: Added a few fixes.
-
- * C/apx-bugs.sgml: Added a link to bugzilla, and a list of a few
- 1.1 features.
-
-2001-10-19 Kevin Breit <mrproper@ximian.com>
-
- * C/usage-mail.sgml: Added in import dialogue documentation
-
-2001-10-07 Kjartan Maraas <kmaraas@gnome.org>
-
- * C/usage-mail-org.sgml: Add a missing </orderedlist>
-
- * C/apx-authors.sgml: Fix my name.
-
-2001-10-05 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mail-org.sgml: added example to filter bulk mail.
-
-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 7ff022b9a6..0000000000
--- a/help/Makefile.am
+++ /dev/null
@@ -1,6 +0,0 @@
-SUBDIRS = C
-
-EXTRA_DIST = \
- ChangeLog.pre-1-4 \
- xmldocs.make \
- omf.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 eeda6754fe..0000000000
--- a/help/es/apx-authors.sgml
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-<!-- $Id: apx-authors.sgml,v 1.3 2003/10/21 18:51:25 ettore Exp $ -->
-<!-- Traduccin: Ismael -->
-<!-- Revisin: irm 030504/final 030428/rpida -->
-
- <appendix id="authors">
- <title>Autores</title>
- <para> <application>Evolution</application> ha sido creado por el equipo Ximian Evolution y otros muchos programadores dedicados a GNOME. Para ver sus nombres, seleccione
-
- <menuchoice> <guimenu>Ayuda</guimenu> <guimenuitem>Acerca de</guimenuitem> </menuchoice> en cualquiera de las ventanas de Evolution.
- </para>
- <para> El cdigo de <application>Evolution</application> mantiene una gran deuda con las aplicaciones <application>GNOME-pim</application> y <application>GNOME-Calendar</application>, as como con <application>KHTMLW</application>. Los desarrolladores de <application>Evolution</application> reconocen los esfuerzos y contribuciones de todos los que trabajaron en estos proyectos.
- </para>
-
- <para> Ximian quiere agradecer a todos los que ayudaron en el proceso de depuracin de errores del programa, en particular a Miles Lane y al personal de El Pelon Taqueria, en la calle Peterborough, en Boston, por el sustento.
- </para>
-
- <para> Para obtener ms informacin visite por favor la <ulink url="http://www.ximian.com/products/evolution/" type="http">pgina web</ulink> de <application>Evolution</application>. Por favor envenos todos sus comentarios, sugerencias e informes de error a la <ulink url="http://bugzilla.ximian.com" type="http">base de datos de partes de Ximian</ulink>. Encontrar instrucciones sobre cmo se hace en esa misma direccin. Tambin puede utilizar la herramienta de informacin de errores de GNOME <command>bug-buddy</command> para enviar notificaciones de fallos.
- </para>
-
- <para>
-
- Este manual ha sido escrito por Aaron Weber (<email>aaron@ximian.com</email>), Kevin Breit (<email>mrproper@ximian.com</email>) Duncan Mak (<email>duncan@ximian.com</email>) y Ettore Perazzoli (<email>ettore@ximian.com</email>) con la ayuda de los programadores de la aplicacin y del Proyecto de Documentacin de GNOME. Si tiene algn comentario o sugerencia sobre este manual por favor notifquelo como un parte de error en el sistema de partes de Ximian. Si ha contribuido a este proyecto pero no ve aqu su nombre por favor pngase en contacto con Aaron Weber (<email>aaron@ximian.com</email>) para que le incluya. En concreto la lista de traductores no recoge a numerosos colaboradores.
- </para>
- <para> Este producto ha sido traducido a muchas lenguas. Aqu listamos a algunos de los traductores:
- <itemizedlist>
- <listitem><para> Daniel Persson al sueco.
- </para></listitem>
-
- <listitem><para> Hctor Garca lvarez al espaol.
- </para></listitem>
-
- <listitem><para> Kjartan Maraas al noruego.
- </para></listitem>
- </itemizedlist>
- </para>
- <para> Esta versin del manual ha sido traducida al espaol por Lambdaux Software Services y realizada por Ismael Olea (<email>ismael@olea.org</email>) e Ignacio R. Maturana (<email>irm@in3activa.com</email>).
- </para>
- </appendix>
-
-
-
-
-
-
diff --git a/help/es/apx-bugs.sgml b/help/es/apx-bugs.sgml
deleted file mode 100644
index d0fc39ef65..0000000000
--- a/help/es/apx-bugs.sgml
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-<!-- $Id: apx-bugs.sgml,v 1.3 2003/10/21 18:51:25 ettore Exp $ -->
-<!-- Traduccin: Ismael -->
-<!-- Revisin: irm 030504/final 030428/rpida -->
-
-
- <appendix id="bugs">
-
- <title>Fallos conocidos y limitaciones</title> <abstract>
- <para> El control de calidad de Ximian Evolution se realiza desde la <ulink url="http://bugzilla.ximian.com">base de datos de partes de Ximian</ulink>. Si encuentra algn defecto o si quiere sugerir alguna nueva funcionalidad puede utilizarla o bien optar por la <application>herramienta de informacin de errores</application> de GNOME (conocida como <command>bug-buddy</command> en la lnea de rdenes).
- </para>
- <para> Si necesita ayuda adicional sobre Ximian Evolution, visite la web de asistencia tcnica en <ulink url="http://support.ximian.com">support.ximian.com</ulink>.
- </para> </abstract>
-
- <para> En la web tiene disponible una lista completa de solicitudes de caractersticas y otros asuntos en la base de datos de partes de Ximian. Puede aprender ms sobre el proceso de desarrollo de Ximian Evolution en <ulink url="http://developer.ximian.com">developer.ximian.com</ulink>.
- </para>
-</appendix>
-
-
-
-
-
diff --git a/help/es/apx-fdl.sgml b/help/es/apx-fdl.sgml
deleted file mode 100644
index 46814a06cb..0000000000
--- a/help/es/apx-fdl.sgml
+++ /dev/null
@@ -1,670 +0,0 @@
-<!-- $Id: apx-fdl.sgml,v 1.3 2003/10/21 18:51:25 ettore Exp $ -->
-<!-- Este fichero no se traduce -->
-
-<!--
- 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="apx-fdl" lang="en">
- <appendixinfo>
- <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>
- </appendixinfo>
- <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 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/help/es/apx-gloss.sgml b/help/es/apx-gloss.sgml
deleted file mode 100644
index fff6a85ec7..0000000000
--- a/help/es/apx-gloss.sgml
+++ /dev/null
@@ -1,183 +0,0 @@
-
-
-<!-- $Id: apx-gloss.sgml,v 1.3 2003/10/21 18:51:25 ettore Exp $ -->
-<!-- Traduccin: Ismael -->
-<!-- Revisin: irm 030504/final 030428/rpida -->
-
-
-<glossary id="apx-gloss">
-
- <title>Glosario</title>
-
- <glossentry id="attachment"> <glossterm>Adjunto:</glossterm> <glossdef>
- <para> Cualquier archivo enviado por correo electrnico. Los adjuntos pueden estar empotrados dentro de un mensaje o anexados a l.
- </para> </glossdef> </glossentry>
-
-
- <glossentry id="search-scope"> <glossterm>mbito de bsqueda:</glossterm> <glossdef>
- <para> El mbito de bsqueda declara en qu parte de la <glossterm
- linkend="search-base">base de bsqueda</glossterm> buscar.
- </para> </glossdef> </glossentry>
-
- <glossentry id="filetree"> <glossterm>rbol de archivos:</glossterm> <glossdef>
- <para> Una descripcin imaginaria de los grupos de archivos del sistema. Con la perversidad tpica de la nomenclatura informtica (especialmente en Unix y Linux), la parte superior de ese rbol se llama el directorio raz (<quote>root</quote>) y se indica con el carcter <filename>/</filename>. El resto de las <quote>ramas</quote> cuelgan de la raz. No confunda el directorio raz con la cuenta del superusuario (<quote>root</quote>) ni con el directorio de inicio del superusuario (<filename>/root</filename>).
- </para> </glossdef> </glossentry>
-
- <glossentry id="assistant"> <glossterm>Asistente:</glossterm> <glossdef>
- <para> Una herramienta que gua al usuario a travs de una serie de pasos, normalmente para configurar un programa. Equivalente a un <quote>druida</quote> o un <quote>wizard</quote>.
- </para> </glossdef> </glossentry>
-
- <glossentry id="shortcut-bar"> <glossterm>Barra de atajos:</glossterm> <glossdef>
- <para> Una parte de <application>Evolution</application> que permite a los usuarios acceso rpido a las porciones ms usadas de la aplicacin.
- </para> </glossdef> </glossentry>
-
- <glossentry id="search-base"> <glossterm>Base de bsqueda:</glossterm> <glossdef>
- <para> LDAP puede dividir las listas de contactos en varios grupos. La base de bsqueda indica la parte superior del grupo utilizado. La opcin <glossterm linkend="search-scope">mbito de bsqueda</glossterm> indica en qu parte de la base de bsqueda se realizar esta.
- </para> </glossdef> </glossentry>
-
- <glossentry id="bcc"> <glossterm>Bcc (Copia oculta del mensaje):</glossterm> <glossdef>
- <para> Del ingls <quote lang="en">Blind Carbon Copy</quote>, una manera de asignar el destinatario de un mensaje. Permite enviar un mensaje a un grupo de destinatarios sin que ninguno pueda ver la direccin de los dems.
- </para> </glossdef> </glossentry>
-
- <glossentry id="cc"> <glossterm>Cc (Con copia):</glossterm> <glossdef>
- <para> Un mtodo para mandar una copia del mensaje a una tercera persona, con el fin de mantenerla al tanto de la conversacin, sin que pertenezca a la lista principal de destinatarios.
- </para> </glossdef> </glossentry>
-
-
- <glossentry id="public-key-encryption"> <glossterm>Cifrado de clave pblica:</glossterm> <glossdef>
- <para> Un poderoso mtodo de cifrado que usa un par de <quote>claves</quote>; una de ellas es pblica y la otra es guardada en privado. Los datos cifrados con la clave pblica slo pueden ser descifrados con la clave privada. Cuanto ms largas sean las claves ms difcil ser romper el cifrado.
- </para> </glossdef> </glossentry>
-
- <glossentry id="mail-client"> <glossterm>Cliente de correo:</glossterm> <glossdef>
- <para> Un cliente de correo es una aplicacin con la que una persona lee y enva correo electrnico. Sus interlocutores son los varios tipos de servidores de correo que manejan la autenticacin de usuarios y dirigen los mensajes del remitente al destinatario.
- </para> </glossdef> </glossentry>
-
- <glossentry id="conduit"> <glossterm>Conducto:</glossterm> <glossdef>
- <para> Pequea aplicacin que controla la transferencia de datos entre un PDA y su escritorio.
- </para> </glossdef> </glossentry>
-
- <glossentry id="tooltip"> <glossterm>Consejo:</glossterm> <glossdef>
- <para> Un cuadrito con texto explicativo que aparece cuando se mantiene el puntero del ratn sobre un botn u otros elementos del interfaz grfico.
- </para> </glossdef> </glossentry>
-
- <glossentry id="druid"> <glossterm>Druida:</glossterm> <glossdef>
- <para> Ver <quote>Asistente</quote>.
- </para> </glossdef> </glossentry>
-
- <glossentry id="execute"> <glossterm>Ejecutar:</glossterm> <glossdef>
- <para> Poner en marcha un programa. A cualquier archivo que pueda ser ejecutado se le llama ejecutable. <application>Evolution</application> puede descargar adjuntos ejecutables, pero para poder ejecutarlos es preciso marcarlos antes como ejecutables en el administrador de archivos o en la lnea de rdenes. Esta precaucin de seguridad previene de la ejecucin automtica o accidental de programas maliciosos. Para obtener ms informacin acerca de ejecutables y permisos de archivos consulte la documentacin de su administrador de archivos o de su intrprete de rdenes.
- </para> </glossdef> </glossentry>
-
- <glossentry id="inline"> <glossterm>En lnea:</glossterm> <glossdef>
- <para> Que se muestra empotrado, como parte de un mensaje u otro documento en lugar de estar anexo a un archivo. Alternativo a <glossterm
- linkend="attachment">Adjunto:</glossterm>.
- </para> </glossdef> </glossentry>
-
-
- <glossentry id="regular-expression"> <glossterm>Expresin regular:</glossterm> <glossdef>
- <para> Una expresin regular o <quote>regex</quote> es una manera de describir una cadena de texto mediante meta-caracteres o smbolos comodn. Por ejemplo la sentencia <userinput>fly.*so[au]p</userinput> encuentra <quote>cualquier frase que empiece por <quote>fly</quote> y acabe en <quote>soup</quote> o en <quote>soap</quote></quote>. Si hace una bsqueda con esa expresin podra encontrar tanto <quote>fly in my soup</quote> como <quote>fly in soap</quote>. No hay espacio para profundizar en el tema pero si lo desea puede examinar la documentacin de la orden <command>grep</command>: para ello, abra un intrprete de rdenes y escriba <command>man grep</command>.
- </para> </glossdef> </glossentry>
-
- <glossentry id="evolution"> <glossterm>Evolution:</glossterm> <glossdef>
- <para> <application>Evolution</application> es la herramienta de trabajo en grupo de <acronym>GNOME</acronym>.
- </para> </glossdef> </glossentry>
-
- <glossentry id="filter"> <glossterm>Filtro:</glossterm> <glossdef>
- <para> En <application>Evolution</application> un filtro es un mtodo de ordenacin automtica del correo cuando lo descarga de su buzn. Puede crear filtros para realizar una o ms acciones sobre un mensaje que cumpla una (o todas) las condiciones, definidas entre una amplia gama de posibilidades.
- </para> </glossdef> </glossentry>
-
- <glossentry id="signature"> <glossterm>Firma:</glossterm> <glossdef>
- <para> En trminos de correo electrnico la firma es un trozo de texto al pie de cada mensaje enviado, como la firma manual al pie de cada carta escrita. Una firma puede ser cualquier cosa desde una cita favorita a un enlace a una pgina web. La cortesa recomienda que sea menor que cuatro lneas de longitud.
- </para> </glossdef> </glossentry>
-
- <glossentry id="html"> <glossterm>HTML:</glossterm> <glossdef>
- <para> El lenguaje de marcas de hipertexto (<acronym>HTML</acronym>) se utiliza para describir pginas de documentos electrnicos como son las pginas Web, archivos de ayuda y mensajes de correo electrnico. HTML se puede utilizar en el correo y en los envos a las <quote>news</quote> para insertar imgenes y darle formato al texto.
- </para> </glossdef> </glossentry>
-
- <glossentry id="ical"> <glossterm>iCal:</glossterm> <glossdef>
- <para> <application>iCal</application> es el programa con el que <application>Evolution</application> maneja el calendario.
- </para> </glossdef> </glossentry>
-
- <glossentry id="imap"> <glossterm>IMAP:</glossterm> <glossdef>
- <para> En funcin de a quin pregunte, IMAP significa protocolo de acceso al correo internet o protocolo interino de acceso a correo. Permite tener acceso al correo electrnico que normalmente (aunque no siempre) se almacena remotamente en el servidor en lugar de en el disco duro local. IMAP suele ser la alternativa a <glossterm>POP:</glossterm>. Pero nadie le va examinar de esto.
- </para> </glossdef> </glossentry>
-
-<glossentry id="automatic-indexing"> <glossterm>Indexacin automtica:</glossterm> <glossdef>
- <para> Procedimiento de prebsqueda que permite a <application>Evolution</application> hacer referencia a los datos con rapidez. Permite bsquedas rpidas y disminuye el consumo de memoria al presentar de la informacin.
- </para> </glossdef> </glossentry>
-
-
- <glossentry id="ldap"> <glossterm>LDAP:</glossterm> <glossdef>
- <para> LDAP, el Protocolo Ligero de Acceso a Directorios, permite a un cliente buscar a travs de grandes bases de datos, alojadas en un servidor, de direcciones, nmeros de telfono y personas.
- </para> </glossdef> </glossentry>
-
-
-
- <glossentry id="minicard"> <glossterm>Minitarjeta:</glossterm> <glossdef>
- <para> Un formato para la presentacin de datos de contacto. Es similar en apariencia a una tarjeta de visita.
- </para> </glossdef> </glossentry>
-
- <glossentry id="nautilus"> <glossterm>Nautilus:</glossterm> <glossdef>
- <para> <application>Nautilus</application> es la siguiente generacin de administrador de archivos de <acronym>GNOME</acronym>.
- </para> </glossdef> </glossentry>
-
- <glossentry id="pop"> <glossterm>POP:</glossterm> <glossdef>
- <para> POP, el Protocolo de Oficina Postal, es un mecanismo de transporte de correo electrnico. En contraste con IMAP slo se usa para descargar el correo y almacenarlo localmente en el disco duro.
- </para> </glossdef> </glossentry>
-
- <glossentry id="postscript"> <glossterm>Postscript:</glossterm> <glossdef>
- <para> Un formato estndar de publicacin de documentos. Muchas impresoras pueden leer Postscript puro, lo que lo hace bastante verstil.
- </para> </glossdef> </glossentry>
-
- <glossentry id="protocol"> <glossterm>Protocolo:</glossterm> <glossdef>
- <para> Un mtodo acordado de comunicacin especialmente para el envo de tipos particulares de informacin entre diferentes mquinas. Algunos ejemplos son POP (Protocolo de Oficina Postal) para correo electrnico y HTTP (Protocolo de Transferencia de HiperTexto) para pginas web.
- </para> </glossdef> </glossentry>
-
- <glossentry id="expunge"> <glossterm>Purgar:</glossterm> <glossdef>
- <para> Cuando los mensajes estn marcados para ser borrados an permanecen intactos hasta que son purgados. La purga de un mensaje significa eliminarlo definitivamente siempre y cuando est marcado previamente para ello.
- </para> </glossdef> </glossentry>
-
- <glossentry id="forward"> <glossterm>Reenviar:</glossterm> <glossdef>
- <para> Si recibe un mensaje dirigido a otra persona, puede reenviarlo para que lo reciba la persona adecuada.
-
- </para> </glossdef> </glossentry>
-
- <glossentry id="sendmail"> <glossterm>Sendmail:</glossterm> <glossdef>
- <para> Como su nombre implica, <application>sendmail</application> es un programa que enva correo. <application>Evolution</application> puede utilizarlo en lugar de <glossterm>SMTP:</glossterm>. Algunas personas prefieren utilizarlo por su mayor flexibilidad pero es ms difcil de configurar.
- </para> </glossdef> </glossentry>
-
- <glossentry id="SMTP"> <glossterm>SMTP:</glossterm> <glossdef>
- <para> Este es el medio de transporte de mensajes de correo ms comn entre el sistema del cliente (el suyo) y el servidor. SMTP significa Protocolo Sencillo de Transferencia de Correo.
- </para> </glossdef> </glossentry>
-
- <glossentry id="script"> <glossterm>Script:</glossterm> <glossdef>
- <para> Un programa escrito en un lenguaje interpretado (en lugar de uno compilado). Se usa frecuentemente como sinnimo de <quote>macro</quote> para denotar a una serie de rdenes pregrabadas o acciones dentro de una aplicacin. Su utilizacin en tareas tediosas y repetitivas puede ahorrar mucho tiempo al usuario.
- </para> </glossdef> </glossentry>
-
- <glossentry id="hot-key"> <glossterm>Tecla de acceso directo:</glossterm> <glossdef>
- <para> Las teclas de acceso directo son combinaciones de teclas que permiten realizar acciones sin utilizar el ratn. Su utilizacin puede mejorar la velocidad de trabajo.
- </para> </glossdef> </glossentry>
-
- <glossentry id="groupware"> <glossterm>Trabajo en grupo:</glossterm> <glossdef>
- <para> Expresin que describe una aplicacin con la que grupos de personas pueden trabajar juntos. Normalmente una aplicacin de trabajo en grupo incluye varias funciones de productividad integradas en un nico programa: correo electrnico, calendario y gestin de contactos.
- </para> </glossdef> </glossentry>
-
- <glossentry id="vcard"> <glossterm>VCard:</glossterm> <glossdef>
- <para> Un formato de archivo para el intercambio de informacin de contacto. Cuando recibe una tarjeta de visita adjunta a un mensaje probablemente est en formato VCard. No debe ser confundido con <glossterm linkend="vfolder">carpeta virtual:</glossterm>.
- </para> </glossdef> </glossentry>
-
- <glossentry id="vfolder"> <glossterm>carpeta virtual:</glossterm> <glossdef>
- <para> Una herramienta de organizacin de correo electrnico. Las carpetas virtuales permiten crear una carpeta que contiene el resultado de una bsqueda compleja. Los contenidos de carpetas virtuales se actualizan dinmicamente.
- </para> </glossdef> </glossentry>
-
- <glossentry id="virus"> <glossterm>Virus:</glossterm> <glossdef>
- <para> Un programa que se inserta a s mismo dentro de otros archivos o programas y que, cuando se ejecuta, se propaga a otros programas y sistemas. Un virus puede causar un dao considerable: obstruccin de redes o unidades de disco, borrado de archivos o apertura de agujeros de seguridad.
- </para> </glossdef> </glossentry>
-
-</glossary>
-
-
-
-
-
-
diff --git a/help/es/apx-gpl.sgml b/help/es/apx-gpl.sgml
deleted file mode 100644
index bec3c1dbcf..0000000000
--- a/help/es/apx-gpl.sgml
+++ /dev/null
@@ -1,420 +0,0 @@
-<!-- $Id: apx-gpl.sgml,v 1.3 2003/10/21 18:51:25 ettore Exp $ -->
-<!-- Este fichero no se traduce -->
-
-<appendix id="apx-gpl" lang="en">
-<title>GNU General Public License</title>
-<para>
-Copyright (c) 2000 Free Software Foundation, Inc.
- <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>.
- </para>
-
-<para>
-This is version 2
-</para>
-
- <para>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
- </para>
-
-
- <sect1 id="preamble">
- <title>Preamble</title>
-
- <para>
- 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.
- </para>
-
- <para>
- 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.
- </para>
-
- <para>
- 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.
- </para>
-
- <para>
- 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.
- </para>
-
- <para>
- We protect your rights with two steps:
-
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- copyright the software, and
- </para>
- </listitem>
- <listitem>
- <para>
- offer you this license which gives you legal permission to copy,
- distribute and/or modify the software.
- </para>
- </listitem>
- </orderedlist>
- </para>
-
- <para>
- 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.
- </para>
-
- <para>
- 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.
- </para>
-
- <para>
- The precise terms and conditions for copying, distribution and modification
- follow.
- </para>
-
- </sect1>
-
- <sect1 id="terms">
- <title>TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</title>
-
- <sect2 id="sect0">
- <title>Section 0</title>
- <para>
- 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 <quote>work based on the Program</quote> 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 <quote>modification</quote>.) Each
- licensee is addressed as <quote>you</quote>.
- </para>
-
- <para>
- 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.
- </para>
- </sect2>
-
- <sect2 id="sect1">
- <title>Section 1</title>
- <para>
- 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.
- </para>
-
- <para>
- 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.
- </para>
- </sect2>
-
- <sect2 id="sect2">
- <title>Section 2</title>
- <para>
- 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 <link linkend="sect1">Section 1</link> above, provided
- that you also meet all of these conditions:
-
- <orderedlist numeration="loweralpha">
- <listitem>
- <para>
- You must cause the modified files to carry prominent notices stating that
- you changed the files and the date of any change.
- </para>
- </listitem>
- <listitem>
- <para>
- 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.
- </para>
- </listitem>
- <listitem>
- <para>
- 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.
-
- <note>
- <title>Exception:</title>
- <para>
- 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.)
- </para>
- </note>
-
- </para>
- </listitem>
- </orderedlist>
- </para>
-
- <para>
- 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.
- </para>
-
- <para>
- 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.
- </para>
-
- <para>
- 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.
- </para>
- </sect2>
-
- <sect2 id="sect3">
- <title>Section 3</title>
-
- <para>
- You may copy and distribute the Program (or a work based on it, under
- <link linkend="sect2">Section 2</link> in object code or executable form under the terms of
- <link linkend="sect1">Sections 1</link> and <link linkend="sect2">2</link> above provided that
- you also do one of the following:
-
- <orderedlist numeration="loweralpha">
- <listitem>
- <para>
- 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,
- </para>
- </listitem>
- <listitem>
- <para>
- 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 and above on a medium customarily
- used for software interchange; or,
- </para>
- </listitem>
- <listitem>
- <para>
- 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.)
- </para>
- </listitem>
- </orderedlist>
- </para>
-
- <para>
- 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.
- </para>
-
- <para>
- 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.
- </para>
- </sect2>
-
- <sect2 id="sect4">
- <title>Section 4</title>
-
- <para>
- 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.
- </para>
- </sect2>
-
- <sect2 id="sect5">
- <title>Section 5</title>
-
- <para>
- 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.
- </para>
- </sect2>
-
- <sect2 id="sect6">
- <title>Section 6</title>
-
- <para>
- 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.
- </para>
- </sect2>
-
- <sect2 id="sect7">
- <title>Section 7</title>
-
- <para>
- 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.
- </para>
-
- <para>
- 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.
- </para>
-
- <para>
- 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.
- </para>
-
- <para>
- This section is intended to make thoroughly clear what is believed to be a consequence of the
- rest of this License.
- </para>
- </sect2>
-
- <sect2 id="sect8">
- <title>Section 8</title>
-
- <para>
- 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.
- </para>
- </sect2>
-
- <sect2 id="sect9">
- <title>Section 9</title>
-
- <para>
- 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.
- </para>
-
- <para>
- 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.
- </para>
- </sect2>
-
- <sect2 id="sect10">
- <title>Section 10</title>
-
- <para>
- 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.
- </para>
- </sect2>
-
- <sect2 id="sect11">
- <title>NO WARRANTY</title>
- <subtitle>Section 11</subtitle>
-
- <para>
- 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.
- </para>
- </sect2>
-
- <sect2 id="sect12">
- <title>Section 12</title>
-
- <para>
- 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.
- </para>
- </sect2>
- </sect1>
- </appendix> \ No newline at end of file
diff --git a/help/es/config-prefs.sgml b/help/es/config-prefs.sgml
deleted file mode 100644
index 051a3a63b6..0000000000
--- a/help/es/config-prefs.sgml
+++ /dev/null
@@ -1,595 +0,0 @@
-
-<!-- $Id: config-prefs.sgml,v 1.3 2003/10/21 18:51:25 ettore Exp $ -->
-<!-- Traduccin: Ismael -->
-<!-- Revisin: -->
-<chapter id="config-prefs">
-
- <title>Configuracin avanzada</title>
- <para> Quizs su servidor de correo haya cambiado de nombre. Quizs se cans de siempre utilizar la misma presentacin de citas. Sea cual sea la razn puede, que quiera cambiar sus configuraciones de <application>Evolution</application>. Este captulo le explicar cmo hacerlo.
- </para>
- <para> El cuadro de dilogo de configuracin de Evolution 1.2 ha sido rediseado hasta el ltimo detalle. Puede abrirlo con <menuchoice> <guimenu>Herramientas</guimenu> <guimenuitem>Configuracin</guimenuitem></menuchoice> desde cualquier lugar de Evolution. La parte izquierda de la ventana tiene una columna, parecida a la barra de atajos, donde puede seleccionar la parte de Evolution que desea personalizar. La parte derecha es donde realmente realizar cambios.
- </para>
-
-
- <!-- ==============Figure===================== --> <figure id="config-prefs-mail-fig">
- <title>Modificacin de la configuracin del correo</title>
- <screenshot> <screeninfo>Modificacin de la configuracin del correo</screeninfo> <mediaobject><imageobject><imagedata fileref="figures/config-mail" format="png" srccredit="Aaron Weber"> </imageobject></mediaobject>
- </screenshot> </figure>
- <!-- ==============End of Figure================-->
-
- <para> Es posible personalizar ocho elementos, que describimos de arriba a abajo:
- <variablelist>
- <varlistentry> <term>Cuentas de correo</term>
- <listitem>
- <para> Declare o modifique los datos de su cuentas de correo electrnico: los servidores a los que debe acceder, la manera en la que se baje el correo, el modo en que se autentique, etc. Este es el elemento ms complejo de la lista y est descrito en <xref
- linkend="config-prefs-mail-identity">.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Carpetas</term>
- <listitem>
- <para> Puede configurar carpetas predeterminadas para varios componentes de Evolution, las carpetas que sern colocadas en cach en el disco local cuando est en el modo desconectado y las carpetas en dnde se harn las bsquedas para autocompletar direcciones de correo electrnico.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Opciones de correo</term>
- <listitem>
- <para> Contienen las preferencias de lectura de correo generales: opciones para la representacin, notificacin, seguridad, etc. Se describen en <xref linkend="config-prefs-mail-display">.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Editor de correo</term>
- <listitem>
- <para> Define la manera en la que quiere usar el editor de correo: atajos, firmas, correccin ortogrfica, etc. Una funcin entretenida es la capacidad de sustituir caritas o "emoticones" como :-), que mucha gente utiliza en el correo electrnico. Esta herramienta est descrita en <xref linkend="config-prefs-mail-composer">.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Calendario y tareas</term>
- <listitem>
- <para> Puede especificar el funcionamiento del calendario, como la zona horaria y duracin de su semana laboral.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Servidores de directorio</term>
- <listitem>
- <para> Si desea utilizar un directorio compartido (un servidor LDAP), este es el lugar donde configurarlo.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Tipografas</term>
- <listitem>
- <para> Para definir qu tipos de letras usar Evolution al mostrarle el correo.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Configuracin del resumen</term>
- <listitem>
- <para> Configura qu carpetas, titulares de noticias, longitud del resumen de planificacin y qu informes meteorolgicos se mostrarn. Para agregar nuevos servidores de titulares de noticias escriba la direccin URL de cualquier archivo RDF.
- </para>
- </listitem>
- </varlistentry>
-
- </variablelist>
-
- </para>
-
- <sect1 id="config-prefs-mail">
- <title>Configuracin del correo</title>
- <para> Las primeras herramientas, exceptuando la herramienta de carpetas, cubren tareas de correo:
- </para>
-
- <sect2 id="config-prefs-mail-identity">
- <title>Utilizacin de cuentas de correo</title>
- <para> <application>Ximian Evolution</application> le permite administrar varias cuentas de correo, o identidades, a la vez. Esto es til cuando desea diferenciar mensajes profesionales y personales, o cuando ejerce varias responsabilidades en su trabajo. Cuando escribe un mensaje de correo puede elegir desde qu cuenta enviarlo en la lista desplegable junto a <guilabel>De:</guilabel>.
- </para>
-
- <para> Haga clic en <guibutton>Enviar/Recibir</guibutton> para actualizar todos los listados IMAP, <filename>mh</filename> o <filename>mbox</filename> as como comprobar y descargar su correo de todos los servidores POP. En otras palabras, <guibutton>Enviar/Recibir</guibutton> trae todo su correo, de todos los orgenes disponibles. Si no desea recibir correo de alguna cuenta, seleccinela en la seccin <guilabel>Cuentas de correo</guilabel> y haga clic en <guibutton>Inhabilitar</guibutton>.
- </para>
-
- <para> Para agregar una cuenta, haga clic en <guibutton>Aadir</guibutton> para abrir el asistente de configuracin del correo. Para modificar una identidad existente, seleccinela y haga clic en <guibutton>Editar</guibutton> para abrir el cuadro de dilogo del editor de cuentas.
- </para>
-
- <para> El cuadro de dilogo del editor de cuentas cuenta con seis secciones:
- <variablelist>
-
- <varlistentry> <term>Identidad</term>
- <listitem>
- <para> El nombre de la cuenta, la direccin de correo y otra informacin de identificacin de la cuenta.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term>Recepcin de correo</term>
- <listitem>
- <para> Especifique de qu manera desea consultar su correo: puede descargarlo desde un servidor ( <glossterm
- linkend="pop">POP</glossterm>); puede leerlo y conservarlo en el mismo servidor (Microsoft Exchange o <glossterm
- linkend="imap">IMAP</glossterm>), as como leer ficheros que ya estn en su escritorio. Es posible que el servidor le permita utilizar conexiones cifradas (SSL), que puede activar con <guibutton>Usar conexiones seguras (SSL)</guibutton>.
-
-<note id="config-arbitrary-port">
-<title>Especificacin de los nmeros de puerto</title>
-<para> Es posible que su administrador de sistemas le indique de debe conectarse a travs de un puerto especfico de su servidor. Para especificarlo, a continuacin del nombre del servidor, escriba un signo de dos puntos y el nmero de puerto. Por ejemplo, para conectar a travs del puerto 143 del servidor smtp.todostuspuertos.com, escriba el nombre de servidor como sigue: <userinput> smtp.todostuspuertos.com:143 </userinput> .
-</para>
-</note>
-
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term>Opciones de recepcin</term>
- <listitem>
- <para> Aqu decide si quiere descargar su correo automticamente y con qu frecuencia, as como otras opciones de recuperacin de los mensajes.
-
- <variablelist>
- <varlistentry> <term>Si seleccion el protocolo POP:</term>
- <listitem>
- <para>
- <itemizedlist>
- <listitem>
- <para>Descargar el correo nuevo: para que <application>Evolution</application> descargue automticamente su correo nuevo, active esta casilla y elija la frecuencia en minutos.
- </para>
- </listitem>
-
- <listitem>
- <para> Almacenamiento de mensajes: active esta casilla si quiere almacenar copias de su correo en el servidor.
- </para>
- </listitem>
-
-
- <listitem> <para>Almacenar informacin de estado en las cabeceras en formato Elm/Pine/Mutt: permite a clientes de correo como Elm, Pine y Mutt, utilizar el formato de cabecera X-Status. Esta opcin es til si tiene previsto examinar su correo de vez en cuando con alguno de estos clientes.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Si utiliza un servidor Microsoft Exchange:</term>
- <listitem>
- <para>
-
- <itemizedlist> <listitem>
- <para> Descargar el correo nuevo: para que <application>Evolution</application> descargue automticamente su correo nuevo, active la casilla y elija la frecuencia en minutos.
- </para>
- </listitem>
-
- <listitem>
- <para> Exchange Server: si su nombre de usuario es diferente en Active Directory y en Exchange, active esta casilla y escriba el nombre de su buzn.
- </para>
- </listitem>
-
- <listitem>
- <para> Crear una carpeta lista global de direcciones: active esta casilla si quiere tener una carpeta separada para la lista global de direcciones de Active Directory.
- </para>
- </listitem>
-
- <listitem>
- <para> Nombre de servidor Active Directory: la mayora de las organizaciones utilizan servidores diferentes para Active Directory y Exchange. En ese caso active la casilla y escriba el nombre del servidor Active Directory.
- </para>
- </listitem>
-
- <listitem>
- <para> Limitar el nmero de respuestas: elija el nmero mximo de resultados en la bsqueda de una direccin. Este nmero reduce la carga del sistema y de la red.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Si seleccion el protocolo IMAP:</term>
- <listitem>
- <para>
-
- <itemizedlist>
- <listitem>
- <para> Descargar el correo nuevo: para que <application>Evolution</application> descargue automticamente su correo nuevo, active la casilla y elija la frecuencia en minutos.
- </para>
- </listitem>
-
- <listitem>
- <para> Si desea que <application>Evolution</application> descargue <emphasis>todos</emphasis> los mensajes nuevos de sus carpetas IMAP, compruebe que la casilla <guilabel>Comprobar si hay mensajes nuevos en todas las carpeta</guilabel> est activada.
- </para>
- </listitem>
-
- <listitem>
- <para> Mostrar slo las carpetas suscritas: active esta opcin si la vista IMAP muestra ms carpetas que las que desea leer.
- </para>
- </listitem>
-
- <listitem>
- <para> Sobreescribir el espacio de nombres proporcionado por el servidor: si lo desea, especifique el directorio donde su servidor almacena su correo. Los nombres ms comunes son "mail" y "Mail". Para obtener ms informacin acerca de cmo utilizar el protocolo de correo IMAP, consulte <xref linkend="usage-mail-subscriptions">.
- </para>
- </listitem>
-
- <listitem>
- <para> Aplicar filtros a los mensajes nuevos en el buzn de entrada: active esta casilla si desea aplicar sus filtros tanto en esta cuenta como en el correo que se descarga al disco local.
- </para>
- </listitem>
-
- <listitem>
- <para>Almacenar cabeceras de estado en el formato Elm/Pine/Mutt: elija esta opcin si quiere utilizar el formato de cabeceras X-Status usado por los clientes de correo Elm, Pine y Mutt. Es una opcin til si prev consultar su correo puntualmente mediante alguno de estos clientes.
- </para>
- </listitem>
-
- </itemizedlist>
- </para>
- </listitem>
- </varlistentry>
-
-
- </variablelist>
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term>Envo de correo</term>
- <listitem>
- <para> Puede elegir y configurar el mtodo de envo de correo. Puede optar entre <glossterm
- linkend="smtp">SMTP</glossterm>, Microsoft Exchange (si ha comprado Ximian Connector para Microsoft Exchange) o <glossterm
- linkend="sendmail">sendmail</glossterm>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term>Predeterminados<!-- el doc original est mal, as es en el po --></term>
- <listitem>
- <para> Puede decidir dnde quiere que esta cuenta almacene los mensajes enviados y los guardados como borradores.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term>Seguridad</term>
- <listitem>
- <para> Puede definir las opciones de seguridad de esta cuenta. Escriba su Id. de clave PGP/GPG y decida cundo cifrar y firmar sus mensajes. Para obtener ms informacin acerca del programa PGP/GPG y las tcnicas de cifrado, consulta <xref linkend="encryption">.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
-
-
- <sect2 id="config-prefs-mail-display">
- <title>Opciones de correo<!-- el doc original est mal, as es en el po --></title>
- <para> Aqu puede decidir cmo desea que <application>Ximian Evolution</application> muestre su correo o citas, as como el tiempo de espera antes de marcar un mensaje como ledo, etc.
- </para>
- <para> Puede tambin decidir cmo desea que <application>Ximian Evolution</application> maneje las imgenes recibidas en mensajes en formato HTML. Puede consultar una descripcin detallada de todo lo relacionado con estas opciones en <xref linkend="usage-mail-getnsend-get-attach-html">.
- </para>
- <para> Para cambiar la tipografa que <application>Ximian Evolution</application> utiliza para mostrar el correo, siga estos pasos:
- <orderedlist numeration="arabic">
- <listitem>
- <para> Abra la ventana de preferencias de Evolution, elija <menuchoice> <guimenu>Herramientas</guimenu> <guimenuitem>Configuracin</guimenuitem> </menuchoice>.
- </para>
- </listitem>
- <listitem>
- <para> Elija la opcin <guilabel>Tipografas</guilabel>.
- </para>
- </listitem>
- <listitem>
- <para> Elija el tipo de letra y el tamao deseados.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </sect2>
-
- <sect2 id="config-prefs-mail-composer">
- <title>Preferencias del editor de correo</title>
- <para> Dispone de tres fichas con opciones modificables del editor. La pestaa General permite configurar atajos y acciones asociadas, mientras las dos controlan las firmas y la correccin ortogrfica. La pestaa General permite configurar los elementos siguientes:
-
- <variablelist>
-
- <varlistentry> <term>Tipo de atajos</term>
- <listitem>
- <para> Elija un esquema de atajos de teclado: prefiere que sean similares a los de Microsoft Windows, XEmacs o Emacs?
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Comportamiento predeterminado</term>
- <listitem>
- <para> Elija cmo reenviar o contestar normalmente los mensajes, qu juego de caracteres usar, si desea utilizar el formato HTML y en ese caso, si desea utilizar emoticones.
- </para>
- </listitem>
- </varlistentry>
-
-
- <varlistentry> <term>Alertas</term>
- <listitem>
- <para> Hay dos alertas opcionales:
- <variablelist>
- <varlistentry> <term>Preguntar al mandar mensajes con el asunto vaco</term>
- <listitem>
- <para> El editor muestra una advertencia si intenta enviar un mensaje sin asunto.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Preguntar al mandar mensajes que slo tengan definido Bcc</term>
- <listitem>
- <para> El editor muestra una advertencia si intenta enviar un mensaje que slo contenga destinatarios <guilabel>Bcc</guilabel>. Esto es importante porque algunos servidores de correo slo aceptarn copias ocultas cuando el mensaje contiene al menos un destinatario visible para todos los lectores.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
-
- <para> El editor de firmas de Evolution 1.2 es nuevo. Permite crear varias firmas diferentes en formato de texto sencillo o HTML as como especificar cul de ellas debe agregarse a los mensajes que crea en el editor de mensajes. Tambin puede elegir una firma alternativa, o no utilizar ninguna, desde el propio editor de correo.
- </para>
- <para> La herramienta de correccin ortogrfica incluye opciones de correccin, en una o varias lenguas. Observe que debe instalar el paquete gnome-spell, disponible en Red Carpet, para tener la correccin ortogrfica disponible en Evolution. Red Carpet tambin incluye diccionarios para diferentes idiomas, que son detectados automticamente tras su instalacin.
- </para>
- </sect2>
-
-
-<!-- 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>
-
- <sect1 id="config-prefs-cal">
- <title>Preferencias del calendario y de la lista de tareas</title>
- <para> La herramienta de configuracin del calendario incluye dos fichas <guilabel>General</guilabel> y <guilabel>Vista</guilabel> y 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>Configuracin del calendario</screeninfo> <mediaobject><imageobject><imagedata fileref="figures/config-cal" format="png" srccredit="Aaron Weber"> </imageobject></mediaobject>
- </screenshot> </figure>
- <!-- ==============End of Figure================-->
- </para>
-
- <para> La ficha <guilabel>General</guilabel> permite establecer los valores siguientes:
- <variablelist>
- <varlistentry> <term>Zona horaria</term>
- <listitem>
- <para> La ciudad en la que se encuentra, para calcular su zona horaria.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term>Formato de la hora</term>
- <listitem>
- <para> Haga clic en el botn radio para elegir el formato de doce horas (AM/PM) o de veinticuatro horas.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term>Semana laboral</term>
- <listitem>
- <para> Cundo empieza su jornada laboral y cundo acaba? Las vistas semanales y diarias del cliente <application>Evolution</application> muestran todas las horas en el rango elegido, incluso si no hay citas programadas. Por supuesto, siempre es posible planificar citas fuera de las horas presentadas, en cuyo caso la vista se ampla para poder mostrarlas.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term>Primer da de la semana</term>
- <listitem>
- <para> Especifique si la semana empieza en domingo o lunes.</para>
- </listitem>
- </varlistentry>
- <varlistentry> <term>El da comienza</term>
- <listitem>
- <para> Especifique la hora a la que empieza su jornada laboral. Esta mostrar todas las horas hasta el final del da, haya o no citas durante ese espacio de tiempo.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term>El da acaba</term>
- <listitem>
- <para> Especifique la hora a la que acaba la jornada laboral.
- </para>
- </listitem>
- </varlistentry>
-
-
- <varlistentry> <term>Alertas</term>
- <listitem>
- <para> Active las casillas si desea mostrar una advertencia antes de eliminar una cita, o recibir recordatorios automticos para cada evento.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
-
- <para> La seccin <interface>Vista</interface> sirve para elegir la presentacin de sus citas y tareas dentro del calendario.
- </para>
- <para> Las propiedades de la vista que puede establecer son:
-
- <variablelist>
- <varlistentry> <term>Divisiones de horas</term>
- <listitem>
- <para> Especifique lo incrementos mostrados en la vista diaria del calendario. Puede indicar valores entre cinco minutos y una hora, con incrementos de cinco minutos.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Mostrar la hora del final de las citas en las vistas semanales y mensuales</term>
- <listitem>
- <para> Si hay espacio suficiente, el cliente <application>Evolution</application> mostrar las horas finales en las vistas semanales y mensajes para cada cita.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term>Comprimir fines de semana en la vista mensual</term>
- <listitem>
- <para> Con esta opcin, la vista mensual agrupa todo el fin de semana en una misma celda, en lugar de una celda para cada da.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Mostrar los nmeros de las semanas en el navegador de fechas</term>
- <listitem>
- <para> Mostrar el nmero de semana en el calendario.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Tareas que vencen hoy</term>
- <listitem>
- <para> Establece el color de las tareas que deben concluirse en el da de hoy.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term>Tareas vencidas</term>
- <listitem>
- <para> Establece el color de las tareas cuyo plazo de finalizacin ha acabado.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect1>
- <sect1 id="config-prefs-contact">
- <title>Administracin de la libreta de direcciones</title>
- <para> La libreta de direcciones slo permite establecer la utilizacin y configuracin de servidores de directorio (LDAP y Exchange). Las carpetas de contactos utilizadas por la funcin autocompletar del editor se configuran en la seccin Carpetas anterior, y los dems controles de la libreta de direcciones se muestran en la propia ventana de la libreta.
- </para>
-
- <sect2 id="config-prefs-contact-ldap-add">
- <title>Especifacin de servidores de directorio</title>
- <para> Para agregar un nuevo servidor <glossterm linkend="ldap">LDAP</glossterm> a la lista de sus carpetas de contactos disponibles:
- <orderedlist numeration="arabic">
- <listitem>
- <para> Elija <menuchoice> <guimenu>Herramientas</guimenu> <guimenuitem>Configuracin</guimenuitem> </menuchoice>: en el cuadro de dilogo, haga clic en <guilabel>Servidores de directorio</guilabel>.
- </para>
- </listitem>
- <listitem>
- <para> Para abrir el asistente e incluir un servidor de directorio, haga clic en <guibutton>Agregar</guibutton> a la derecha.
- </para>
- </listitem>
- <listitem>
- <para> Escriba la informacin solicitada por el asistente:
- <variablelist>
-
- <varlistentry> <term>Nombre del servidor</term>
- <listitem>
- <para> Direccin del servidor donde se aloja la libreta de direcciones.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term>Mtodo de inicio de sesin</term>
- <listitem>
- <para> Especifique el mtodo de inicio de sesin: annimo, con la direccin de correo electrnico o un "nombre distinguido". Si no utiliza un inicio de sesin annimo, escriba el nombre de usuario solicitado por el servidor.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term>Puerto</term>
- <listitem>
- <para>El puerto Internet utilizado por el cliente <application>Evolution</application> para conectarse a la base de datos LDAP. Normalmente se trata del puerto 389.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term>Usar SSL/TLS</term>
- <listitem>
- <para> Los protocolos SSL y TLS son mecanismos de seguridad. Si elige <guilabel>Siempre</guilabel>, el cliente Evolution slo se conectar cuando estn disponibles conexiones seguras. El valor predeterminado es <guilabel>Cuando sea posible</guilabel>, que utiliza conexiones seguras cuando estn disponibles, pero tambin funciona sin problemas en caso contrario.
- </para>
- </listitem>
- </varlistentry>
-
-
- <varlistentry> <term><glossterm linkend="search-base">Base de bsqueda</glossterm></term>
- <listitem>
- <para> La raz utilizada en todas sus bsquedas. Consulte a su administrador para obtener informacin acerca de las configuraciones adecuadas.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term><glossterm linkend="search-scope">Rango de bsqueda</glossterm></term>
- <listitem>
- <para> Especifique el nivel de subdirectorios explorados. Estn disponibles las siguientes opciones:
- <variablelist>
- <varlistentry> <term>Uno</term>
- <listitem>
- <para> Busca dentro de la raz y un nivel de subdirectorios.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term>Sub</term>
- <listitem>
- <para> Busca dentro de la raz y en todos los subdirectorios.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Tiempo de expiracin</term>
- <listitem>
- <para> Es el tiempo de espera mximo para descargar los datos del servidor, antes de que el cliente Evolution abandone el intento.
- </para>
- </listitem>
- </varlistentry>
-
-
- <varlistentry> <term>Lmite de descarga</term>
- <listitem>
- <para> El nmero mximo de resultados para una bsqueda dada. Muchos servidores no aceptan enviar ms de 500 respuestas, pero puede fijar un nmero inferior para reducir el volumen de descargas, en caso de bsquedas muy amplias.
- </para>
- </listitem>
- </varlistentry>
-
-
- <varlistentry> <term>Mostrar nombre</term>
- <listitem>
- <para> El nombre que ve en pantalla. Este puede ser cualquiera que desee.
- </para>
- </listitem>
- </varlistentry>
-
- </variablelist>
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en <guibutton>Aceptar</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en <guibutton>Aceptar</guibutton> para aplicar permanentemente los cambios o en <guibutton>Aplicar</guibutton> para usarlos temporalmente.
- </para>
- </listitem>
- </orderedlist>
-
-
-<!-- Finish this example:
-
- <example id="ldap-config-example">
- <title>LDAP Configuration</title>
- <para>
- Rich works at omniport.net and needs to access the
- company's LDAP server so that he can look up the email
- addresses of his co-workers.
- </para>
- <para>
- He uses his email address, rich@omniport.net,
- </para>
- <para>
- His Server Name is: ldap.wemakechips.com
- </para>
- </example>
--->
- </para>
- </sect2>
- </sect1>
-</chapter>
-
-
-
diff --git a/help/es/config-sync.sgml b/help/es/config-sync.sgml
deleted file mode 100644
index 21ccde614f..0000000000
--- a/help/es/config-sync.sgml
+++ /dev/null
@@ -1,76 +0,0 @@
-<!-- $Id: config-sync.sgml,v 1.3 2003/10/21 18:51:25 ettore Exp $ -->
-<!-- Traduccin: irm 030501 -->
-<!-- Revisin: ismael 030505 -->
-
- <chapter id="config-sync">
- <title>Configuracin del sistema de sincronizacin</title>
- <para> Una operacin de sincronizacin plantea dos tipos de problemas que es necesario resolver. <simplelist> <member>Es necesario que su equipo identifique y tenga acceso al dispositivo de mano. En esta versin, <application>Ximian Evolution</application> slo reconoce dispositivo Palm-OS, como Palm Pilot y Handspring Visor. </member> <member>Debe especificar el procedimiento de sincronizacin que desea utilizar. </member> </simplelist>
- </para>
-
- <para> Si nunca antes utiliz un dispositivo de mano junto con su equipo, ejecute la herramienta <application>Centro de control</application> de GNOME: seleccione <menuchoice><guimenu>Sistema</guimenu><guimenuitem>Configuracin</guimenuitem></menuchoice> y asegrese de que la configuracin de <application>Pilot Link</application> es correcta. Deber asegurarse de que dispone de permisos de lectura y escritura para el dispositivo, habitualmente /dev/pilot. Si esto no funciona, compruebe /dev/ttyS0 para saber si tiene una conexin serie, o /dev/ttyUSB0 en el caso de una conexin USB. Para ello, inicie una sesin root y ejecute la orden: <userinput>chmod 777 /dev/ttyUSB0</userinput>.
- </para>
- <para> Una vez que su equipo y el dispositivo Palm-OS son capaces de comunicarse con fluidez, seleccione los <glossterm
- linkend="conduit">conductos</glossterm> deseados en la seccin <guilabel>Conductos del Pilot</guilabel> del centro de control. Los conductos sirven para sincronizar datos de numerosas aplicaciones; los conductos de <application>Ximian Evolution</application> llevan la etiqueta <guilabel>EAddress</guilabel> para los contactos de la libreta de direcciones, <guilabel>ECalendar</guilabel>, para el calendario y <guilabel>ETasks</guilabel>, para la lista de tareas.
- </para>
- <para> Para habilitar un conducto, haga clic en <guibutton>Habilitar</guibutton>, y en <guibutton>Configuracin</guibutton> si desea modificar su comportamiento, una vez activado. Las opciones pueden variar en funcin del conducto, pero son habitualmente las siguientes:
-
- <variablelist>
- <varlistentry> <term>Deshabilitado:</term>
- <listitem>
- <para> No hacer nada.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Sincronizar:</term>
- <listitem>
- <para> Copia los datos nuevos del equipo y del dispositivo de mano en las dos direcciones. Elimina los elementos que se encontraban en los dos sistemas, pero que fueron eliminados en uno de ellos.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Copiar desde Pilot:</term>
- <listitem>
- <para> Si el dispositivo de mano contiene datos nuevos, los copia al equipo.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Copiar hacia Pilot:</term>
- <listitem>
- <para> Copia los datos nuevos del equipo hacia el dispositivo de mano.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Fusionar desde Pilot:</term>
- <listitem>
- <para> Copia los datos nuevos del dispositivo de mano hacia el equipo, y elimina en el equipo la informacin eliminada en el dispositivo de mano.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Fusionar hacia Pilot:</term>
- <listitem>
- <para> Copia los datos nuevos del equipo hacia el dispositivo de mano, y elimina en el dispositivo de mano la informacin eliminada en el equipo.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
-
- <para> Especifique el comportamiento de cada conducto elegido. Si no est seguro, siga adelante, y seleccione <guilabel>Sincronizar</guilabel>. A continuacin, coloque el dispositivo de mano en su base, y presione el botn HotSync.
- </para>
- <para> <tip>
- <title>Prevenir la prdida de datos</title>
- <para> Es siempre buena idea hacer una copia de seguridad. Para ello, copie el directorio llamado <filename>evolution</filename> que cuelga de su directorio de inicio.
- </para> </tip>
- </para>
-
- </chapter>
-
-
-
-
-
-
diff --git a/help/es/evolution-es.omf b/help/es/evolution-es.omf
deleted file mode 100644
index f96339de9c..0000000000
--- a/help/es/evolution-es.omf
+++ /dev/null
@@ -1,16 +0,0 @@
-?xml version="1.0" standalone="no"?>
-<omf>
- <resource>
- <creator>
- Ximian, Inc.
- </creator>
- <title>
- Manual para Usuarios de Ximian Evolution
- </title>
- <date>2002</date>
- <subject category="GNOME|Aplicaciones"/>
- <format mime="text/html"/>
- <identifier url="index.html"/>
- <language code="C"/>
- </resource>
-</omf>
diff --git a/help/es/evolution.sgml b/help/es/evolution.sgml
deleted file mode 100644
index 382134c0df..0000000000
--- a/help/es/evolution.sgml
+++ /dev/null
@@ -1,82 +0,0 @@
-
-
-<!-- $Id: evolution.sgml,v 1.4 2003/10/21 18:51:25 ettore Exp $ -->
-<!-- Traduccin: Ismael -->
-<!-- Revisin: irm 030504/final 030428/rpida -->
-
-<!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-EXCHANGE SYSTEM "usage-exchange.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 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">
-<!ENTITY APX-FDL SYSTEM "apx-fdl.sgml">
-<!ENTITY APX-GPL SYSTEM "apx-gpl.sgml">
-
-]>
-
-
-<!-- Almost every chapter is an entity. Files, Chapter id's, and
-entity names correspond. APX is for appendix. -->
-
-<book id="index" lang="es">
- <bookinfo>
- <title>Gua de usuario de 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>2000-2002</year> <holder>Ximian, Inc.</holder> </copyright>
-
- <legalnotice id="legalnotice">
- <para>
-
- En el prefacio encontrar informacin acerca de la Licencia Pblica General de GNU y la Licencia de Documentacin Libre. </para>
- </legalnotice>
-
- <releaseinfo>
-
- Esta es la versin 1.2 del manual de Ximian Evolution y describe la versin 1.2 de la herramienta de trabajo en grupo Ximian Evolution.
-
- </releaseinfo>
-
- </bookinfo>
-
- &PREFACE;
-
- <part id="usage">
- <title>Primeros pasos con Ximian Evolution</title>
- <partintro>
- <para> La primera parte del manual de <application>Ximian Evolution</application> describe cmo utilizar <application>Ximian Evolution</application> para manejar correo electrnico, gestin de contactos y planificacin de citas y de tareas. Conforme avance descubrir que existen varias formas de hacer las cosas y podr elegir el mtodo que ms le agrade.
- </para>
- </partintro>
-
- &USAGE-MAINWINDOW; &USAGE-EXEC-SUMMARY; &USAGE-MAIL; &USAGE-MAIL-ORG; &USAGE-CONTACT; &USAGE-CALENDAR; &USAGE-EXCHANGE; &USAGE-SYNC; &USAGE-PRINT;
- </part>
-
- <part id="config">
- <title>Configuracin y manejo de Ximian Evolution</title>
- <partintro>
- <para> <application>Ximian Evolution</application> es muy configurable. Normalmente cuando un programador dice eso quiere decir que no ha comprobado meticulosamente el sistema y que deben ser otros programadores los que lo <quote>configuren</quote> hasta ponerlo en marcha. En el caso de <application>Ximian Evolution</application> <quote>configurable</quote> significa que, adems de poder confiar en la configuracin de fbrica del programa, es tambin muy fcil modificar su comportamiento de mltiples maneras, con el fin de ajustarlo a sus necesidades. Esta parte del libro explica ese proceso, desde una presentacin rpida del Asistente de Configuracin, hasta una gua paso a paso por la configuracin de sus preferencias ms peregrinas.
- </para>
- </partintro>
-
- &CONFIG-PREFS; &CONFIG-SYNC;
- </part>
-
-
- &MENUREF; &APX-GLOSS; &APX-BUGS; &APX-AUTHORS; &APX-FDL; &APX-GPL;
-</book>
-
-
-
-
-
diff --git a/help/es/menuref.sgml b/help/es/menuref.sgml
deleted file mode 100644
index 5d372fed2b..0000000000
--- a/help/es/menuref.sgml
+++ /dev/null
@@ -1,247 +0,0 @@
-
-
-<!-- $Id: menuref.sgml,v 1.3 2003/10/21 18:51:25 ettore Exp $ -->
-<!-- Traduccin: Ismael -->
-<!-- Revisin: irm 030504/final 030428/rpida -->
-
-<appendix id="menuref">
- <title>Referencia rpida</title>
- <para> Quizs le convenga imprimir esta seccin y pegarla a la pared a proximidad de su ordenador. Se trata de un resumen muy corto de la mayora de las posibilidades que le ofrece <application>Ximian Evolution</application>.
- </para>
-
-
-<note id="shortcuts">
-<title>Atajos de teclado personalizados</title>
-<para> Si ha personalizado los atajos de teclado en su escritorio (puede hacerlo a travs del centro de control: elija <menuchoice><guimenu>Sistema</guimenu><guimenuitem>Configuracin</guimenuitem></menuchoice> en el men del panel) es posible que stos interfieran con los de Evolution.
-</para>
-<para> Por ejemplo, si ha elegido las combinaciones de teclas al estilo Emacs para el editor de textos de su escritorio, entonces la combinacin de teclas <keycombo action="simul"> <keycap>Ctrl</keycap> <keycap>W</keycap> </keycombo> actuar en el editor de mensajes como <quote>cortar rea</quote> en lugar de <quote>cerrar ventana</quote>.
-</para>
-</note>
-
-
- <sect1 id="quickref-open">
- <title>Apertura y cierre de elementos</title>
- <para>
- <variablelist>
-
-
- <varlistentry> <term>Nuevo elemento:</term>
- <listitem>
- <para> Presione la combinacin de teclas <keycombo action="simul"> <keycap>Ctrl</keycap> <keycap>N</keycap> </keycombo> para abrir un elemento nuevo desde cualquier lugar de la aplicacin <application>Ximian Evolution</application> donde se encuentre. En el contexto del correo, la orden abrir un mensaje nuevo. Si consulta su lista de direcciones, la tecla <keycombo action="simul"> <keycap>Ctrl</keycap> <keycap>N</keycap> </keycombo> crear una nueva tarjeta para un contacto; y en calendario, se abrir una nueva cita.
- </para>
- </listitem>
- </varlistentry>
-
-
- <varlistentry> <term>Creacin de una carpeta nueva:</term>
- <listitem>
- <para> <menuchoice><guimenu>Archivo</guimenu><guisubmenu>Nuevo</guisubmenu> <guimenuitem>Carpeta</guimenuitem></menuchoice> o <keycombo action="simul"> <keycap>Ctrl</keycap> <keycap>Mays</keycap> <keycap>E</keycap> </keycombo>
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Creacin de un atajo nuevo en la Barra de Evolution:</term>
- <listitem>
- <para> <menuchoice><guimenu>Archivo</guimenu> <guisubmenu>Nuevo</guisubmenu> <guimenuitem>Atajo</guimenuitem> </menuchoice> o <keycombo action="simul"> <keycap>Ctrl</keycap> <keycap>Mays</keycap> <keycap>S</keycap> </keycombo>
-
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Creacin de un nuevo mensaje de correo electrnico:</term>
- <listitem>
- <para> <menuchoice><guimenu>Archivo</guimenu><guisubmenu>Nuevo</guisubmenu> <guimenuitem>Mensaje de correo </guimenuitem> </menuchoice> o <keycap>Ctrl</keycap> <keycap>Mays</keycap> <keycap>M</keycap>.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Creacin de 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>Mays</keycap> <keycap>A</keycap> </keycombo>
- </para>
- </listitem>
- </varlistentry>
-
-
- <varlistentry> <term>Creacin de un nuevo contacto:</term>
- <listitem>
- <para> Haga doble clic en cualquier lugar vaco del administrador de contactos para crear una nueva tarjeta de visita. Tambin puede utilizar: <menuchoice><guimenu>Archivo</guimenu> <guisubmenu>Nuevo</guisubmenu> <guimenuitem>Contacto</guimenuitem> </menuchoice> o la combinacin de teclas <keycombo
- action="simul"> <keycap>Ctrl</keycap> <keycap>Mays</keycap> <keycap>C</keycap> </keycombo>
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Creacin de una tarea nueva:</term>
- <listitem>
- <para> <menuchoice><guimenu>Archivo</guimenu> <guisubmenu>Nuevo</guisubmenu> <guimenuitem>Tarea</guimenuitem> </menuchoice> o <keycombo action="simul"> <keycap>Ctrl</keycap> <keycap>Mays</keycap> <keycap>T</keycap> </keycombo>
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect1>
- <sect1 id="quickref-mail">
- <title>Tareas de correo</title>
- <para>
-
- Las tareas de correo ms frecuentes y los atajos para desplazarse por su buzn con el teclado son los siguientes:
- <variablelist>
-
-
- <varlistentry> <term>Enviar y recibir correo:</term>
- <listitem>
- <para> Presione la tecla <keycap>F9</keycap> o haga clic en <guibutton>Enviar/Recibir</guibutton> de la barra de herramientas o elija <menuchoice><guimenu>Acciones</guimenu> <guimenuitem>Enviar/Recibir</guimenuitem></menuchoice>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term>Moverse por el buzn mediante el teclado:</term>
- <listitem>
- <para> Presione <keycap>]</keycap> o <keycap>.</keycap> para saltar al siguiente mensaje sin leer. <keycap>[</keycap> o <keycap>,</keycap> salta al anterior mensaje no ledo. Use las teclas del cursor para moverse arriba y abajo por toda la lista de mensajes.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term>Moverse adelante y atrs en el panel de visualizacin de mensajes:</term>
- <listitem>
- <para> Presione la barra de espacio para avanzar una pgina. Presione la tecla <keycap>Retroceso</keycap> para volver hacia atrs.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Responder un mensaje:</term>
- <listitem>
- <para> Para responder al remitente de un mensaje sencillamente haga clic en <guibutton>Responder</guibutton> en la barra de tareas o presione la combinacin de teclas <keycombo action="simul"> <keycap>Ctrl</keycap> <keycap>R</keycap> </keycombo>.
- </para>
- <para> Para responder al remitente y a todos los destinatarios visibles haga clic en <guibutton>Re: Todos</guibutton> o seleccione el mensaje y presione la combinacin de teclas <keycombo
- action="simul"><keycap>Mays</keycap><keycap>Ctrl</keycap><keycap>R</keycap></keycombo>.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Reenviar un mensaje:</term>
- <listitem>
- <para> Seleccione los mensajes que quiera reenviar (uno o varios) y haga clic en <guibutton>Reenviar</guibutton> en la barra de tareas o presione la combinacin de teclas <keycombo action="simul"><keycap>Ctrl</keycap><keycap>F</keycap></keycombo>.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Abrir un mensaje en una nueva ventana:</term>
- <listitem>
- <para> Haga clic dos veces sobre el mensaje que quiera ver o seleccinelo y presione <keycap>Intro</keycap> o la combinacin de teclas <keycombo
- action="simul"><keycap>Ctrl</keycap> <keycap>O</keycap></keycombo>.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Creacin de filtros y carpetas virtuales:</term>
- <listitem>
- <para> Haga clic con el botn derecho en un mensaje y elija <guimenuitem>Crear una regla con el mensaje</guimenuitem>. Tambin puede crear filtros y carpetas virtuales desde el men <guimenu>Herramientas</guimenu>.
- </para>
- </listitem>
- </varlistentry>
-
-
- <varlistentry> <term>Incluir un remitente a la lista de contactos:</term>
- <listitem>
- <para> Haga clic con el botn derecho sobre un mensaje y elija <guimenuitem>Aadir remitente a la libreta de direcciones</guimenuitem>. Tambin puede pulsar el botn derecho sobre cualquier direccin de correo y agregarla a su lista de contactos.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-
-
-
- </para>
- </sect1>
- <sect1 id="quickref-cal">
- <title>Calendario</title>
- <para>
- <variablelist>
-
- <varlistentry> <term>Creacin de una cita:</term>
- <listitem>
- <para> <menuchoice><guimenu>Archivo</guimenu><guisubmenu>Nuevo</guisubmenu> <guimenuitem>Cita</guimenuitem> </menuchoice> o la combinacin de teclas <keycombo
- action="simul"><keycap>Ctrl</keycap> <keycap>Mays</keycap><keycap>A</keycap></keycombo>.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Creacin de una tarea nueva:</term>
- <listitem>
- <para> <menuchoice><guimenu>Archivo</guimenu><guisubmenu>Nuevo</guisubmenu> <guimenuitem>Tarea</guimenuitem> </menuchoice> o la combinacin de teclas <keycombo
- action="simul"><keycap>Ctrl</keycap><keycap>Mays</keycap> <keycap>T</keycap></keycombo>.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term></term>
- <listitem>
- <para>
- <tip id="new-appt">
- <title>Crear una cita nueva de la manera rpida</title>
- <para> Para crear una nueva cita simplemente haga clic en cualquier lugar vaco del calendario y empiece a escribir.
- </para>
- </tip>
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-
- </para>
- </sect1>
- <sect1 id="quickref-contact">
- <title>Contactos</title>
- <para> Los atajos para las acciones ms frecuentes de los contactos son los siguientes:
- <variablelist>
- <varlistentry> <term>Modificar un contacto:</term>
- <listitem>
- <para> Es posible modificar un contacto de dos maneras:
- <itemizedlist>
- <listitem>
- <para> Haga clic en la tarjeta de visita para modificar cualquiera de sus propiedades visibles. </para>
- </listitem>
- <listitem>
- <para> Haga doble clic en la tarjeta de visita para modificar todas las propiedades. </para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-
- <variablelist>
- <varlistentry> <term>Borrar un contacto:</term>
- <listitem>
- <para> Haga clic con el botn derecho y elija <guilabel>Borrar</guilabel> o elija un contacto y presione <guibutton>Borrar</guibutton> en la barra de herramientas.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-
-
- <variablelist>
- <varlistentry> <term>Escribir a un contacto:</term>
- <listitem>
- <para> Haga clic con el botn derecho y elija <guilabel>Enviar un mensaje al contacto</guilabel>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-
- <variablelist>
- <varlistentry> <term>Creacin de un contacto nuevo:</term>
- <listitem>
- <para> Haga doble clic en cualquier lugar vaco del administrador de contactos para crear una nueva tarjeta de visita. Tambin puede utilizar <menuchoice><guimenu>Archivo</guimenu> <guisubmenu>Nuevo</guisubmenu> <guimenuitem>Contacto</guimenuitem> </menuchoice> o la combinacin de teclas <keycombo
- action="simul"> <keycap>Ctrl</keycap> <keycap>Mays</keycap> <keycap>C</keycap></keycombo>.
-
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect1>
-</appendix>
-
-
-
-
-
diff --git a/help/es/preface.sgml b/help/es/preface.sgml
deleted file mode 100644
index 585a058581..0000000000
--- a/help/es/preface.sgml
+++ /dev/null
@@ -1,227 +0,0 @@
-
-
-<!-- $Id: preface.sgml,v 1.4 2003/10/21 18:51:25 ettore Exp $ -->
-<!-- Traduccin: Ismael -->
-<!-- Revisin: irm 030504/final 030428/rpida -->
-
-
- <preface id="introduction">
- <title>Introduccin</title>
-
- <para> Bienvenido a la gua de usuario de Ximian Evolution y Ximian Connector para Microsoft Exchange 2000. Esta seccin del manual es una introduccin sobre un producto cuyo nombre adivina. Sin embargo, comenzaremos con algo informacin legal.
- </para>
-
- <sect1 id="actual-legal-info">
- <title>Informacin legal y condiciones de licencia</title>
- <para> Se concede permiso para copiar, distribuir y/o modificar este documento segn los trminos de la <quote lang="en">GNU Free Documentation License</quote> (Licencia GNU de Documentacin Libre) versin 1.1 o cualquiera posterior publicada por la Free Software Foundation sin secciones invariantes ni textos de portada o contraportada. En el apndice <xref linkend="apx-fdl"> encontrar una copia de la <citetitle>GNU Free Documentation License</citetitle>. Tambin puede obtener una copia de la misma en el sitio web de la <ulink type="http" url="http://www.fsf.org">Free Software Foundation</ulink>, o escriba a: <foreignphrase>Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.</foreignphrase>.
- </para>
-
- <para> La propia aplicacin Ximian Evolution est bajo los auspicios de la <foreignphrase>GNU General Public License (GPL)</foreignphrase> (Licencia Pblica General de GNU) y su cdigo fuente est disponible en el repositorio cvs de GNOME en <ulink url="http://cvs.gnome.org">cvs.gnome.org</ulink>. En el apndice <xref linkend="apx-gpl"> encontrar una copia de la misma. Tambin puede obtener una copia en el sitio web de la <ulink type="http" url="http://www.fsf.org">Free Software Foundation</ulink> o escriba a: <foreignphrase>Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.</foreignphrase>.
- </para>
-
- <para> Ximian Connector para Microsoft Exchange 2000 no es software libre. Existen ciertas restricciones de uso y no puede redistribuirse. Antes de descargrselo debe estar de acuerdo con los trminos de la licencia que le sern (o habrn sido) presentados en la descarga. Si quiere revisar los trminos de la licencia de Ximian Connector puede hacerlo en <ulink url="http://support.ximian.com/q?92">http://support.ximian.com/q?92</ulink>.
-
- </para>
- </sect1>
-
- <sect1 id="organization">
- <title>Cmo est organizado este libro</title>
- <para> Este libro se divide en dos partes, ms varios anexos. La primera parte es una <link linkend="usage">gua paso a paso</link> que le explicar cmo utilizar <application>Evolution</application>. Si no est familiarizado con <application>Evolution</application> o las aplicaciones de trabajo en grupo en general, esta seccin es para usted. La segunda parte describe la configuracin y est orientada a usuarios ms avanzados, pero cualquiera que quiera cambiar la apariencia o comportamiento de <application>Evolution</application> sacar provecho de su lectura.
- </para>
- </sect1>
-
- <sect1 id="typography">
- <title>Convenciones tipogrficas</title>
- <para> Determinadas palabras de este documento utilizan una tipografa particular:
- <simplelist>
- <member><application>Aplicaciones</application></member>
- <member><command>rdenes</command> que se escriben en la lnea de rdenes</member>
- <member><guilabel>Etiquetas</guilabel> para botones y otras partes del interfaz grfico</member>
-
- <member>Las referencias a mens se parecern a esto: <menuchoice> <guimenu>Men</guimenu> <guisubmenu>Submen</guisubmenu> <guimenuitem>Elemento del men</guimenuitem> </menuchoice>
- </member> <member><guibutton>Botones</guibutton> en los que puede hacer clic</member> <member><userinput>Cualquier cosa que pueda escribir</userinput></member> <member> <computeroutput> Texto escrito en la pantalla</computeroutput></member>
- <member><glossterm linkend="apx-gloss">Palabras</glossterm> que puedan estar definidas en el <xref linkend="apx-gloss">.</member>
- </simplelist>
-</para>
-<para> Tambin se ofrecen numerosos detalles adicionales en consejos diferenciados del resto del libro.
-
- <tip id="example-tip">
- <title>Consejo</title>
- <para> Los consejos y detalles de informacin adicionales tendrn una apariencia como esta.
- </para>
- </tip>
-</para>
-
-<para> Los ejemplos tambin se diferencian del resto del libro. Tienen una apariencia como esta:
-
- <example>
- <title>Ejemplo de ejemplo</title>
- <para> Este es el aspecto de un ejemplo. Ofreceremos ejemplos para algunas de las tareas ms complicadas que podra realizar.
- </para>
- </example>
-</para>
-<para> Finalmente, encontrar advertencias para casos en los es necesario prestar especial atencin:
-
- <warning id="example-warning">
- <title>Ejemplo de advertencia</title>
- <para> Este es el aspecto de una advertencia. Si existe algn riesgo de problema, se lo avisamos de antemano.
- </para> </warning>
- </para>
- </sect1>
-
-
- <sect1 id="other-help">
- <title>Fuentes adicionales de ayuda </title>
- <para> Dispone de tres fuentes de ayuda. Para informarse de las opciones de la lnea de rdenes, abra una ventana de una terminal y escriba <command> man evolution</command> o <command>evolution --help</command>. Para acceder a la asistencia tcnica, noticias de ltima hora y erratas, visite el centro de asistencia de Ximian en <ulink url="http://support.ximian.com">support.ximian.com</ulink>.
-
- </para>
- </sect1>
-
- <sect1 id="whats-new-in-one-two">
- <title>Novedades de Evolution 1.2</title>
- <para> Si ya est familiarizado con Ximian Evolution 1.0, la nueva versin aporta numerosas novedades. Aqu estn algunas de las prestaciones nuevas o modificadas. Ximian Connector para Microsoft Exchange tambin tiene nuevas caractersticas.
- <variablelist>
- <varlistentry> <term>Interfaz de configuracin de Evolution</term>
- <listitem>
- <para> Los dilogos de preferencias han sido completamente revisados. Ahora hay una nica ventana de dilogo para la configuracin de todos los componentes del programa a la que puede acceder desde cualquier parte. Para cambiar sus preferencias elija <menuchoice> <guimenu>Herramientas</guimenu> <guimenuitem>Preferencias</guimenuitem></menuchoice>.
- </para>
- </listitem>
- </varlistentry>
-
-
- <varlistentry> <term>Funcin autocompletar del editor de correo</term>
- <listitem>
- <para> Las direcciones de correo electrnico en el editor de mensajes pueden obtenerse de libretas de direcciones LDAP. En la seccin <guilabel>Carpetas</guilabel> del dilogo de Configuracin se puede agregar su libreta de direcciones a la lista de carpetas en donde harn las bsquedas de direcciones para la funcin de autocompleto.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Mejoras de rendimiento</term>
- <listitem>
- <para> El tiempo de arranque ha disminuido, las interacciones con el servidor POP ahora son ms eficientes y la indexacin del correo local es ahora ms rpida.
- </para>
- </listitem>
- </varlistentry>
-
-
- <varlistentry> <term>Mejoras HTML en el editor de correo</term>
- <listitem>
- <para> Al pegar al editor de correo desde otro mensaje o desde una pgina web se mantiene el formato HTML del documento original. Ahora se ven ms claros cuando hay varios niveles de mensajes citados y una lnea vertical azul seala las citas. Las <quote>caritas</quote> de texto ahora son convertidas a pequeas imgenes automticamente que reproducen el emoticn apropiado. Puede desactivar esta opcin en la seccin <guilabel>Editor de correo</guilabel> de la Configuracin.
-
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Editor de firmas</term>
- <listitem>
- <para> Ahora existe un editor de firmas para crear firmas en formato de texto puro o HTML. Elija la ficha <guilabel>Firmas</guilabel> en la seccin <guilabel>Editor de correo</guilabel> de la Configuracin.
- </para>
- </listitem>
- </varlistentry>
-
-
- <varlistentry> <term>Revisin de la navegacin con teclado</term>
- <listitem>
- <para> Todas las letras empleadas aisladamente cambian de funcin. Por ejemplo las teclas <keycap>N</keycap> y <keycap>P</keycap> ya no sirven para avanzar o retroceder en los mensajes. La presin de una letra ahora le conduce al mensaje ms prximo cuyo contenido en la columna de ordenacin empiece por esa letra. As, si pulsa N y tiene ordenados los mensajes por remitentes podr moverse al mensaje enviado por Natalia. Si la ordenacin es por asunto podr saltar al que habla de nectarinas. El desplazamiento en la lista de carpetas es similar.
- </para>
- <para> Esto significa que los antiguos atajos de una sola letra han cambiado tambin. Los atajos nuevos son:
- <simplelist>
- <member> <keycap>,</keycap> (coma) y <keycap>.</keycap> (punto) son los nuevos atajos de teclado para avanzar a los mensajes sin leer siguiente y anterior. Tambin puede utilizar los corchetes <keycap>]</keycap> y <keycap>[</keycap>.
- </member>
- <member> <keycap>`</keycap> cambia la vista del panel de previsualizacin.
- </member>
- </simplelist> Los atajos que utilizan la tecla <keycap>Ctrl</keycap> no han sido modificados.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Caracterstica mejorada del botn <quote>Nuevo</quote></term>
- <listitem>
- <para> El botn <guibutton>Nuevo</guibutton> ahora tiene un men junto a l. Como en Evolution 1.0, si hace clic en este botn, se abre un nuevo elemento, el que corresponda al tipo de herramienta Evolution utilizado en aquel momento. Sin embargo, si hace clic en el pequeo men de la flecha a la derecha del botn, encontrar opciones que le permitirn crear nuevos elementos para el resto de Evolution: citas para todo el da, citas normales, tareas y reuniones en el calendario; mensajes en la herramienta de correo y contactos, y listas de contactos en el administrador de contactos.
-
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>La herramienta de importacin ahora importa los filtros de Netscape</term>
- <listitem>
- <para> Ahora puede importar los filtros as como sus mensajes de correo electrnico desde su cliente de correo Netscape.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term> Internacionalizacin de los nombres de las carpetas</term>
- <listitem>
- <para> Ahora puede utilizar caracteres Unicode (UTF-8) en los nombres de carpetas IMAP.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>El resumen ejecutivo ahora lee IMAP</term>
- <listitem>
- <para> La herramienta de resumen ejecutivo de Evolution ahora muestra mensajes en carpetas IMAP al igual que las carpetas locales de correo.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Los filtros y las carpetas virtuales reconocen correctamente las carpetas borradas o renombradas</term>
- <listitem>
- <para> Las carpetas virtuales y los filtros son actualizados cuando mueve o borra alguna carpeta utilizada por ellos.
-
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Caracterstica de <quote>Ubicacin original</quote> de las carpetas virtuales</term>
- <listitem>
- <para> Las carpetas virtuales (vFolder) ahora pueden mostrar la carpeta real de cada mensaje que contienen. Para conseguirlo, haga clic con el botn derecho sobre los encabezados de columnas en la lista de mensajes de cualquier carpeta virtual, elija <guimenuitem>Aadir una columna</guimenuitem> y arrastre el elemento <guibutton>Ubicacin original</guibutton> a la posicin deseada.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Nuevas condiciones y acciones</term>
- <listitem>
- <para> Ahora hay nuevas condiciones y acciones que incluyen marcas para los mensajes, por ejemplo, la <guilabel>Marca de seguimiento</guilabel>.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Seleccin de carpetas para el modo desconectado</term>
- <listitem>
- <para> Ahora puede elegir qu carpetas remotas quiere tener en <quote>cach</quote>, para trabajar con ellas en modo desconectado. Puede modificar esta configuracin en la seccin Carpetas de la ventana Configuracin de Evolution.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Nueva prestacin para redirigir (rechazar) mensajes</term>
- <listitem>
- <para> Esta caracterstica es conocida con frecuencia como <quote>Rechazar</quote> o <quote>Reenviar</quote>. Para redirigir un mensaje con todas sus cabeceras internas intactas en lugar de reenviarlo normalmente, seleccione el mensaje y elija el men <menuchoice> <guimenu> Acciones </guimenu> <guisubmenu> Reenviar </guisubmenu> <guimenuitem> Redirigir </guimenuitem> </menuchoice>.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Vista resumen de mensajes reenviados</term>
- <listitem>
- <para> Los mensajes que contienen varios mensajes reenviados se muestran ahora como un resumen en lugar de dentro o que series de adjuntos.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Aviso de correo nuevo</term>
- <listitem>
- <para> Cuando llega correo nuevo, Evolution puede emitir un pitido o reproducir el fichero de audio que especifique.
- </para>
- </listitem>
- </varlistentry>
-
- </variablelist>
- </para>
- </sect1>
-</preface>
-
-
-
-
-
-
-
diff --git a/help/es/topic.dat b/help/es/topic.dat
deleted file mode 100644
index efc1222026..0000000000
--- a/help/es/topic.dat
+++ /dev/null
@@ -1,11 +0,0 @@
-index.html Tabla de contenidos
-introduction.html Introduccin
-usage-mainwindow.html Primeros pasos
-usage-summary.html Introduccin al resumen
-usage-mail.html Uso del cliente de correo
-usage-contact.html Trabajar con contactos
-usage-calendar.html Planificacin del horario
-usage-exchange.html Conexin a un servidor Exchange
-config-prefs.html Configurando Evolution
-menuref.html Referencia rpida
-apx-gloss.html Glosario \ No newline at end of file
diff --git a/help/es/usage-calendar.sgml b/help/es/usage-calendar.sgml
deleted file mode 100644
index 72a772e65b..0000000000
--- a/help/es/usage-calendar.sgml
+++ /dev/null
@@ -1,432 +0,0 @@
-
-
-<!-- $Id: usage-calendar.sgml,v 1.3 2003/10/21 18:51:25 ettore Exp $ -->
-<!-- Traduccin: Ismael -->
-<!-- Revisin: irm 030504/final 030428/rpida -->
-
-<chapter id="usage-calendar">
- <title>Planificacin del horario</title>
-
- <para> Este captulo explica cmo usar el calendario de Ximian Evolution para planificar su horario individual o en funcin de sus compaeros.
- </para>
-
- <sect1 id ="usage-calendar-view">
- <title>Opciones de la vista de calendario</title>
- <para> La barra de herramientas ofrece cuatro vistas diferentes para el calendario:
- <itemizedlist>
- <listitem>
- <para> Da
- </para>
- </listitem>
- <listitem>
- <para> Semana laboral
- </para>
- </listitem>
- <listitem>
- <para> Semana
- </para>
- </listitem>
- <listitem>
- <para> Mes
- </para>
- </listitem>
- </itemizedlist>
-</para>
-<para>
-
- Para cambiar entre diferentes vistas, haga clic en los botones con formas de calendario a la derecha de la barra de tareas.
-</para>
-<para> Puede elegir cualquier rango de das en el pequeo calendario a la derecha debajo de la barra de tareas. Slo tiene que hacer clic y agrupar con el ratn las fechas que desea.
- </para>
- <para> Los botones <guibutton>Volver</guibutton> y <guibutton>Avanzar</guibutton> sirven para desplazarse adelante y atrs por las pginas del calendario. Por ejemplo, en la vista de un nico da, se desplazar al da anterior, o al da siguiente, respectivamente. En el resto de las vistas, el desplazamiento se realizar en funcin del nmero de das correspondiente a cada vista. Para volver al da de hoy haga clic en <guibutton>Ir a hoy</guibutton> en la barra de tareas.
- </para>
- <para> Para visitar la hoja de una fecha especfica haga clic en <guibutton>Ir a</guibutton> para abrir un cuadro de dilogo donde elegir la fecha.
- </para>
-
- </sect1>
- <sect1 id="usage-calendar-apts">
- <title>Planificacin con el calendario de Evolution</title>
- <para> Por supuesto, querr usar el calendario para algo ms que para saber qu da es hoy. Esta seccin explica cmo planificar citas, crear citas peridicas o fijar alarmas. Si ha instalado Ximian Connector para Microsoft Exchange, consulte <xref
- linkend="full-advantage"> acerca de cmo aprovechar al mximo las funciones de planificacin de grupos en colaboracin, disponibles en Microsoft Exchange Server.
-
- </para>
-
- <sect2 id="usage-calendar-apts-basic">
- <title>Creacin de citas</title>
- <para> Para crear una nueva cita elija <menuchoice> <guimenu>Archivo</guimenu> <guisubmenu>Nuevo</guisubmenu> <guimenuitem>Cita</guimenuitem> </menuchoice>
-
- o haga clic en <guibutton>Nueva cita</guibutton> en la izquierda de la barra de herramientas. Se abrir el cuadro de dilogo <interface>Nueva cita</interface> con una barra de men, otra de herramientas y una ventana con varias opciones.
- </para>
- <tip id="new-appointment-shortcut">
- <title>Atajo</title>
- <para> Si no tiene que aadir ms informacin que la fecha y la hora de la cita, haga clic en cualquier lugar vaco del calendario y empiece a escribir. Posteriormente podr introducir otra informacin con el editor de citas.
- </para>
- </tip>
-
- <para> Su cita debe tener una fecha de inicio y otra de final -la fecha predeterminada es la del da- pero puede elegir entre dar las fechas de principio y final, o seleccionar un <guilabel>Evento para todo el da</guilabel>. Un <guilabel>Evento para todo el da</guilabel> aparece al principio de la lista de citas, en una cabecera gris debajo de la fecha y no en la propia lista. As se facilita que las citas puedan solaparse o encajar unas dentro de otras. Por ejemplo, puede definir una conferencia como un evento para todo el da, y las reuniones durante la conferencia, como citas con hora. Por supuesto que las citas con horas de inicio y final especficas tambin pueden solaparse. Cuando eso ocurre son mostradas con mltiples columnas en la vista del da del calendario.
-
- </para>
- <para> <application>Evolution</application> es capaz de trabajar con distintas zonas horarias. Si comparte ficheros de calendario con amigos o compaeros de trabajo es bastante posible que tenga que configurar su zona horaria. Para hacerlo:
-
- <orderedlist numeration="arabic">
- <listitem>
- <para> Haga clic en <menuchoice> <guimenu>Herramientas</guimenu> <guimenuitem>Calendario y tareas</guimenuitem> </menuchoice>
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en el <guibutton>Globo terrqueo</guibutton> en la seccin <guilabel>Hora</guilabel> dentro de la ficha <guilabel>General</guilabel>.
- </para>
- </listitem>
- <listitem>
- <para> Cada punto rojo representa a una ciudad importante. Haga clic en un punto y a continuacin en <guibutton>Aceptar</guibutton> para elegir su zona horaria.
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para> Tambin puede configurar informacin especfica de la zona horaria a la hora de inicio y fin de cada cita. Abra una nueva cita y haga clic sobre el globo terrqueo para elegir la zona horaria acordada para la reunin. Por ejemplo, si vive en Almera, Espaa, y tiene una reunin telefnica para la tarde con alguien en Veracruz, Mxico, debe asegurarse que no se hacen las llamadas con varias horas de diferencia. Usar las zonas horarias adecuadas en cada cita ayuda a evitar esa confusin potencial.
- </para>
- <note>
- <title>Mltiples citas simultneas</title>
- <para> Si crea citas que se solapan, <application>Evolution</application> las mostrar en el calendario lado a lado. Sin embargo <application>Evolution</application> no tiene cmo ayudarle a hacer varias cosas a una misma vez.
- </para>
- </note>
- <para> Antes de cada cita puede fijar tantas <guilabel>Alarmas</guilabel> como desee. Dispone de los siguientes tipos:
-
- <variablelist>
- <varlistentry> <term><guilabel>Mostrar un mensaje:</guilabel></term>
- <listitem>
- <para> Se abrir una ventana en la pantalla para recordable su cita.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term><guilabel>Reproducir un sonido:</guilabel></term>
- <listitem>
- <para> Eljalo si quiere que sus sistema emita un sonido como alarma.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term><guilabel>Ejecutar un programa:</guilabel></term>
- <listitem>
- <para> Elija esto si quiere ejecutar un programa como recordatorio. Debe introducir el nombre en el campo de texto o buscarlo con el botn <guibutton>Explorar</guibutton>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
-
-
- <note id="reminders-when-not-running-evo">
- <title>Recordatorios sin Evolution</title>
- <para> Si ha almacenado recordatorios en el calendario local, tendrn efecto desde el momento en el que inicie su sesin en el sistema. Sin embargo, para recibir recordatorios almacenados en el servidor Exchange, deber ejecutar Evolution al menos una vez tras el inicio de sesin. Con independencia del modo de almacenamiento, si sale de Evolution recibir los recordatorios de las citas prximas.
- </para>
- </note>
-
- <para> La <guilabel>Clasificacin</guilabel> slo se aplica a los calendarios compartidos en red. La categora predeterminada es <guilabel>Publico</guilabel>, y una cita pblica puede ser examinada por cualquier miembro del calendario compartido. <guilabel>Privado</guilabel> es un nivel de seguridad y <guilabel>Confidencial</guilabel> es un nivel an ms alto.
- </para>
- <para> <application>Evolution</application> puede planificar su disponibilidad si est usando Ximian Connector en un servidor Microsoft Exchange 2000. Para obtener ms informacin acerca de Ximian Connector consulte <xref linkend="usage-exchange">.
- </para>
- <para> Para fijar su cita como libre u ocupada, haga clic en el cuadro de la seccin <guilabel>Mostrar tiempo como</guilabel> del <guilabel>Editor de citas</guilabel>.
- </para>
- <para> Si lleva una vida ajetreada, <application>Evolution</application> puede ayudarle a clasificar sus citas . Esta clasificacin se realiza en la seccin al pie de la ficha <guilabel>Cita</guilabel>.
- </para>
-
- <tip>
- <title>Aadir una categora de citas nueva</title>
- <para> Para agregar una categora nueva a la lista de categoras, haga clic en <guibutton>Editar lista maestra de categoras</guibutton> y a continuacin en <guilabel>Pulse aqu para aadir una categora</guilabel>.
- </para>
- </tip>
-
- <para> Las categoras le permiten conocer todas las citas con actividades parecidas. Para ello, en la vista del calendario, cambie <guilabel>Cualquier campo contiene</guilabel> a <guilabel>La categora es</guilabel> e introduzca a su derecha el nombre de la categora.
- </para>
-
- <para> Haga clic en <guibutton>Categoras</guibutton> para desplegar una lista de categoras. Para asociar las categoras a la cita sencillamente marque cada casilla de comprobacin.
- </para>
- <para> Una vez que ha elegido las categoras haga clic en <guibutton>Aceptar</guibutton>. Las categoras elegidas se muestran en un cuadro a la derecha del botn <guibutton>Categoras</guibutton>
- </para>
-
- <para> La ficha <guilabel>Repeticin</guilabel> sirve para describir la periodicidad de las citas que puede variar desde diaria hasta cada 100 aos. Puede elegir una hora y una fecha a la que quiere que la cita deje de ser peridica y, en la seccin <guilabel>Excepciones</guilabel>, elegir das individuales en los que la cita <emphasis>no</emphasis> tendr lugar. Haga su seleccin de izquierda a derecha y podr construir una frase: "cada dos semanas en lunes y viernes hasta el 23 de junio de 2004" o "de cada mes el primer viernes en 12 ocasiones".
- </para>
-
- <para> Cuando ha terminado con todos los detalles haga clic en el icono del disco en la barra de tareas para guardar la cita y cerrar la ventana del editor. Si lo desea, puede modificar el resumen de una cita en la vista del calendario: haga clic sobre ella y escriba directamente. Para modificar el resto de detalles, haga clic con el botn derecho sobre la cita y elija <guimenuitem>Abrir</guimenuitem>.
- </para>
- </sect2>
- <sect2 id="usage-calendar-rsvp">
- <title>Envo de una confirmacin de asistencia (RSVP) con el Calendario</title>
- <para> <application>Evolution</application> sirve para organizar reuniones de grupos y ayudarle a gestionar las respuestas a las solicitudes de reunin
- </para>
- <para> Al crear una reunin o una cita en grupo puede especificar a los asistentes en varias categoras como "presidencia" o "participante requerido". Cuando guarde su lista, cada invitado recibir un mensaje con los datos de la cita y tendrn la opcin de responder.
- </para>
-
- <note id="meeting-announce">
- <title>Anuncios sencillos</title>
- <para> Si no necesita recibir confirmaciones de asistencia al planificar un evento y slo necesita anunciarlo seleccione <menuchoice><guimenu>Acciones</guimenu><guimenuitem>Reenviar como iCalendar</guimenuitem></menuchoice>. Se abrir un nuevo mensaje de correo con una notificacin del evento adjunta. Los destinatarios podrn incluir el evento en sus calendarios con un clic, pero no le enviarn respuesta acerca de si asistirn o no.
- </para>
- </note>
-
- <para> Para planificar una reunin:
- <orderedlist numeration="arabic">
- <listitem>
- <para> Elija <menuchoice> <guimenu>Acciones</guimenu> <guimenuitem>Planificar una reunin</guimenuitem> </menuchoice>. Abra las fichas <guilabel>Planificacin</guilabel> y <guilabel>Reunin</guilabel>.
- </para>
- </listitem>
- <listitem>
- <para> Si tiene varias identidades en Evolution elija la que quiere usar entre las que se muestran en el campo <guilabel>Organizador</guilabel>.
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en el cuadro de texto <guilabel>Pulse aqu para aadir un asistente</guilabel> para agregar los nombres y direcciones de correo de las personas a las que quiere invitar, o haga clic en <guibutton>Invitar a otros</guibutton> para seleccionarlos a partir de su libreta de direcciones.
- </para>
- </listitem>
- <listitem>
- <para> Guarde la cita.
- </para>
- </listitem>
- </orderedlist> Ahora cada uno de los destinatarios recibir un mensaje con su invitacin al evento.
- </para>
- </sect2>
- <sect2 id="replying-to-rsvp">
- <title>Respuesta a una solicitud de reunin</title>
- <para> Las solicitudes de reunin se envan como adjuntos iCal. Para verlos dentro de la ventana de correo y responder, haga clic en el icono del anexo. Se mostrarn todos los detalles del evento incluyendo la hora y las fechas. A continuacin, elija su respuesta a la invitacin:
- <itemizedlist>
- <listitem>
- <para> <guilabel>Aceptar</guilabel>
- </para>
- </listitem>
- <listitem>
- <para> <guilabel>Aceptar provisionalmente</guilabel>
- </para>
- </listitem>
- <listitem>
- <para> <guilabel>Declinar</guilabel>
- </para>
- </listitem>
- </itemizedlist> Haga clic en <guibutton>Aceptar</guibutton> para enviar un mensaje al organizador con su respuesta. Si acepta, el evento se incluir en su calendario.
- </para>
-
- <para> Existen sin embargo algunas limitaciones a la hora de agregar una reunin al calendario: el organizador de una reunin es el nico que puede agregar participantes. Como asistente, slo tendr la opcin de aceptar o declinar la invitacin.
-
- </para>
- <para> Tras incluir una reunin a su calendario, puede hacer cambios en su copia -cambiar la descripcin, marcarse usted mismo como el organizador, invitar a ms personas, etc- pero tenga presente que si el autor original enva otra actualizacin sus cambios pueden ser sobreescritos.
- </para>
- <note id="organizer-only-one">
- <title>No ms de un organizador</title>
- <para> Una reunin slo puede tener un organizador. Puede sustituirse al organizador, pero a menos de estar de acuerdo con l, corre el riesgo de provocar confusiones en el proceso de planificacin. Si desea invitar a personas adicionales sin cambiar al organizador, lo mejor es reenviar el mensaje original del organizador a los nuevos invitados.
- </para>
- </note>
- </sect2>
-
- <sect2 id="receiving-rsvp-response">
- <title>Recepcin de respuestas a solicitudes de reunin</title>
- <para> Cuando reciba una respuesta a su invitacin de reunin, podr verla incluida dentro del mensaje. Haga clic con el botn derecho sobre el adjunto y elija <guibutton>Ver incluido</guibutton>. Al pie, haga clic en <guibutton>Aceptar</guibutton> para actualizar su lista de asistentes.
- </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>Nuevo</guibutton> in the calendar toolbar, or select
- <menuchoice> <guimenu>Archivo</guimenu>
- <guisubmenu>Nuevo</guisubmenu>
- <guimenuitem>Cita</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>Aceptar</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 -->
- <sect2 id="usage-calendar-freebusy">
- <title>Planificacin de reuniones y vista de disponibilidad</title>
- <para> Adems de las herramientas estndar de planificacin de reuniones puede usar la vista de disponibilidad para comprobar de antemano si la gente estar ocupada o no. Por ahora, la vista de disponibilidad slo funciona con servidores Microsoft Exchange. Sin embargo puede usar las invitaciones en la forma de eventos iCal para coordinar las agendas con otras personas sin importar qu servidor est usando.
- </para>
- <para> Para acceder a la vista de disponibilidad:
- <orderedlist numeration="arabic">
- <listitem>
- <para> Abra o cree una cita en la ventana <guilabel>Calendario</guilabel>.
- </para>
- </listitem>
- <listitem>
- <para> Elija <menuchoice> <guimenu>Acciones</guimenu> <guimenuitem>Planificar una reunin</guimenuitem> </menuchoice>
- </para>
- </listitem>
- <listitem>
- <para> Abra la ficha <guilabel>Planificacin</guilabel>.
- </para>
- </listitem>
- </orderedlist>
- </para> <figure>
- <title>Ventana de planificacin de citas</title>
- <screenshot> <screeninfo>Ventana de planificacin de citas</screeninfo> <mediaobject><imageobject>
- <imagedata format="png" fileref="figures/schedule"
- srccredit="Kevin Breit"> </imageobject></mediaobject>
- </screenshot> </figure>
- <para> <inlinemediaobject> <imageobject> <imagedata fileref="figures/full-1" format="png"> </imageobject> </inlinemediaobject> <guilabel>Lista de asistentes</guilabel>
- </para>
- <para> La <guilabel>Lista de asistentes</guilabel> muestra a las personas que han sido invitadas a la reunin y el estado de sus confirmaciones.
- </para>
- <para> <inlinemediaobject> <imageobject> <imagedata fileref="figures/full-2" format="png"> </imageobject> </inlinemediaobject> <guilabel>Cuadrcula de planificacin</guilabel>
- </para>
- <para> La <guilabel>Cuadrcula de planificacin</guilabel> muestra la informacin de disponibilidad publicada de los invitados. Aqu es donde puede comparar las planificaciones de las personas para buscar tiempo libre en el que encajar la reunin.
- </para>
- <para> <inlinemediaobject> <imageobject> <imagedata fileref="figures/full-3" format="png"> </imageobject> </inlinemediaobject> <guilabel>Planificador de reuniones</guilabel>
- </para>
- <para> El <guilabel>Planificador de reuniones</guilabel> permite planear la reunin en la ventana de <guilabel>Disponibilidad</guilabel>.
- </para>
- <sect3 id="usage-calendar-freebusy-scheduling">
- <title>Planificando una cita</title>
- <para> Para planificar una cita primero necesita la informacin de disponibilidad de la gente. Si est usando Ximian Connector para Microsoft Exchange toda la informacin ya est disponible en la lista global de direcciones. En otro caso cada persona debe enviarle sus ficheros de planificacin para que usted los incorpore a su calendario.
- </para>
- <para> Sea de donde sea que haya obtenido su informacin, Ximian Evolution la mostrar en la ficha <guilabel>Planificacin</guilabel>. La hora de la cita pendiente aparecer en blanco con bordes negros. El tiempo libre y ocupado de cada asistente aparece en la lista con un cdigo de color junto a sus nombres.
- </para>
- <para> Para ajustar la hora de reunin, arrastre los bordes de la reunin, o haga clic en <guilabel>Autoseleccionar</guilabel> para hacer una eleccin automtica. Los asistentes en un servidor Exchange tendrn sus datos actualizados automticamente, el resto recibir una notificacin por correo de cualquier cambio en los planes.
- </para>
-
- <para> Para obtener ms informacin acerca de cmo usar esta funcin con Ximian Connector para Microsoft Exchange lea <xref linkend="full-advantage">.
-
- </para>
- </sect3>
- </sect2>
-
- </sect1>
-
- <sect1 id="usage-calendar-todo">
- <title>La libreta de tareas</title>
- <para> La libreta de tareas, en el ngulo inferior derecho del calendario, permite mantener la lista de tareas separada de las citas del calendario. Para mostrar una ventana ms grande, haga clic en <guibutton>Tareas</guibutton> en la barra de atajos o en la lista de carpetas.
- </para>
- <para> Para registrar una tarea nueva pulse en en el botn <guibutton>Aadir</guibutton> en la barra de tareas. <application>Evolution</application> abrir una pequea ventana con cinco elementos:
-
- <variablelist>
- <varlistentry> <term> <guilabel>Resumen</guilabel></term>
- <listitem>
- <para> La descripcin que aqu escriba aparecer en la lista de tareas <interface>Para hacer</interface>.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term> <guilabel>Fecha de vencimiento</guilabel></term>
- <listitem>
- <para> Fija cundo vence esta tarea. Puede escribir la fecha y la hora, o seleccionarla con los mens <guibutton>calendario</guibutton> y <guibutton>hora</guibutton>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term><guilabel>Fecha de inicio</guilabel></term>
- <listitem>
- <para> La hora a la que espera empezar a trabajar.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term> <guilabel>Descripcin</guilabel></term>
- <listitem>
- <para> Es posible mantener una descripcin ms detallada de la tarea. Por ejemplo puede anotar que una tarea est en marcha y mostrar cun cerca est de su conclusin.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term><guilabel>Clasificacin</guilabel></term>
- <listitem>
- <para> Define quin podr leerla si comparte su calendario.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- <para> Hay ms opciones en la ficha <guilabel>Detalles</guilabel> como las asignaciones de prioridad o de progreso.
- </para>
- <para> Tras agregar tarea a su lista de cosas por hacer, el resumen aparecer en la seccin <guilabel>Resumen</guilabel> de la lista de tareas. Para ver o editar una descripcin completa del elemento, haga doble clic sobre l, o haga clic con el botn derecho y elija <guibutton>Abrir</guibutton>. Para borrar los elementos, seleccinelos y haga clic en <guibutton>Borrar</guibutton>.
- </para>
- <para> La lista de tareas se ordena de manera parecida a la lista de mensajes en la vista de correo de <application>Ximian Evolution</application>. Haga clic en el ttulo de la columna para cambiar la ordenacin, o haga clic con el botn derecho para agregar o eliminar columnas.
- </para>
- <sect2 id="task-folders">
- <title>Carpetas con tareas</title>
- <para> Como en cualquier otro componente de <application>Evolution</application>, puede crear una carpeta para ayudarle a organizar su tareas. Siga estos pasos:
- <orderedlist numeration="arabic">
- <listitem>
- <para> Abrir <guilabel>Barra de carpetas</guilabel>.
- </para>
- </listitem>
- <listitem>
- <para> Seleccione <guibutton>Tareas</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para> Abra el men asociado con el botn derecho en <guibutton>Tareas</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para> Elija <menuchoice><guimenuitem>Crear carpeta</guimenuitem></menuchoice>.
- </para>
- </listitem>
- <listitem>
- <para> Escriba el nombre de la carpeta.
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en <guibutton>Aceptar</guibutton>.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </sect2>
- </sect1>
-
- <sect1 id="usage-calendar-multiple">
- <title>Calendarios mltiples</title>
- <para> <application>Evolution</application> es capaz de administrar mltiples calendarios. Esta funcin es til cuando administra calendarios de varias personas, porque es responsable de la asignacin de recursos o espacios, o porque posee personalidad mltiple.
- </para>
-
- <example>
- <title>Uso de calendarios mltiples</title>
- <para> Luca, directora de una pequea empresa, posee un calendario para su planificacin. Otro para planificar reuniones en la sala de conferencias. Otro ms para saber cuando los consultores visitan a los clientes y otro ms para saber cundo torea Paquirri.
- </para>
- </example>
- <para> Para crear un calendario elija: <menuchoice> <guimenu>Archivo</guimenu> <guisubmenu>Nuevo</guisubmenu> <guimenuitem>Carpeta</guimenuitem> </menuchoice>. En el cuadro de dilogo <guilabel>Crear una carpeta nueva</guilabel> deber decir que la nueva carpeta es de tipo calendario. Puede colocar el calendario en cualquier carpeta calendario y consultarla desde la vista de carpetas.
- </para>
- <para> Cada carpeta de calendario slo puede guardar un nico calendario.
- </para>
- </sect1>
-</chapter>
-
-
-
-
diff --git a/help/es/usage-contact.sgml b/help/es/usage-contact.sgml
deleted file mode 100644
index c54d9f57c0..0000000000
--- a/help/es/usage-contact.sgml
+++ /dev/null
@@ -1,348 +0,0 @@
-<!-- $Id: usage-contact.sgml,v 1.3 2003/10/21 18:51:25 ettore Exp $ -->
-<!-- Traduccin: irm 030501 -->
-<!-- Revisin: ismael 030501 -->
-
-
-<!--
-<!DOCTYPE Chapter PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN">
--->
-
-<chapter id="usage-contact">
- <title>Trabajar con contactos</title>
- <para> Este captulo describe la utilizacin de la libreta de direcciones de <application>Evolution</application>, y explica cmo organizar cualquier cantidad de contactos, compartir direcciones a travs de una red as como aprovechar las numerosas soluciones que ofrece para ahorrar tiempo en las tareas cotidianas. Acerca de la configuracin de la libreta de direcciones, consulte <xref
- linkend="config-prefs-contact">. Para importar los contactos de otras herramientas, utilice la herramienta Importar: para ello seleccione <menuchoice><guimenu>Archivo</guimenu><guimenuitem>Importar</guimenuitem></menuchoice>, o enveselas por correo como adjuntos en formato vCard.
- </para>
-
- <para> La barra de herramientas de la libreta de direcciones es muy sencilla.
- <itemizedlist>
- <listitem><para> Haga clic en <guibutton>Contacto nuevo</guibutton> para crear una nueva tarjeta, o haga doble-clic en un espacio en blanco dentro de la lista de contactos.
- </para></listitem>
-
- <listitem><para> Haga clic en <guibutton>Lista de contactos</guibutton> para crear una nueva tarjeta, o haga doble-clic en un espacio en blanco de la lista.
- </para></listitem>
-
- <listitem><para> El icono de la <guiicon>impresora</guiicon> permite imprimir una o varias tarjetas. </para></listitem>
-
- <listitem><para> El icono con la seal de <guiicon>Stop</guiicon> interrumpe la descarga de los contactos desde la red. Este botn slo es relevante si est consultando los contactos desde una red. </para></listitem>
- </itemizedlist>
- </para>
-
- <para> Los datos de sus contactos llenan el resto de la pantalla. Puede desplazarse de una tarjeta a otra por orden alfabtico con la ayuda de los cursores y de la barra de desplazamiento a la derecha de la ventana. Por supuesto, si la lista incluye un nmero importante de entradas, querr utilizar la funcin de bsqueda prevista, para encontrarlas ms rpidamente.
- </para>
-
- <sect1 id="usage-contact-cards">
- <title>El editor de contactos</title>
- <para> Para eliminar un contacto:
- <orderedlist numeration="arabic">
- <listitem>
- <para> Haga clic en el contacto para seleccionarlo.
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en <guibutton>Borrar</guibutton>.
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para> Utilice el editor de contactos para desea agregar o modificar tarjetas. Para modificar una tarjeta existente, haga doble clic en la tarjeta y abrir la ventana del editor de contactos. Si desea crear una nueva tarjeta, haga clic en <guibutton>Nuevo</guibutton> en la barra de herramientas para abrir otra ventana idntica, pero con los campos vacos para ser rellenados.
- </para>
-
- <para> La ventana del editor de contactos cuenta con dos fichas, <guilabel>General</guilabel>, con la informacin esencial, y <guilabel>Detalles</guilabel>, con una descripcin ms precisa de la persona. Adems, contiene un men <guimenu>Archivo</guimenu> y una barra de herramientas con tres iconos: <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>Editor de contactos de Evolution</screeninfo> <mediaobject><imageobject> <imagedata
- fileref="figures/contact-editor" format="png" srccredit="Aaron
- Weber"> </imageobject></mediaobject>
- </screenshot> </figure>
-
- <para> La ficha <guilabel>General</guilabel> cuenta siete secciones, con diferentes iconos: una careta para el nombre y organizacin; un telfono para los nmeros de telfono; un sobre para la direccin de correo electrnico; un globo terrqueo para la direccin de la pgina Web; una casita para la direccin postal; una carpeta de archivos para los contactos, y por fin, un maletn para las categoras asociadas.
- </para>
- <para>
- <variablelist>
-
- <varlistentry> <term>Nombre completo</term>
- <listitem>
- <para> El <guilabel>Nombre completo</guilabel> tiene dos caractersticas principales:
- <itemizedlist>
- <listitem>
- <para> Puede escribir un nombre en el campo <guibutton>Nombre completo</guibutton> pero tambin puede hacer clic en el botn <guibutton>Nombre completo</guibutton>: se abre un pequeo cuadro de dilogo con unos pocos campos de texto
- <variablelist>
- <varlistentry> <term><guilabel>Tratamiento: </guilabel></term>
- <listitem> <para> Escriba o seleccione el tratamiento en el men.
- </para></listitem>
- </varlistentry>
- <varlistentry> <term><guilabel>Nombre: </guilabel></term>
- <listitem> <para> Escriba el nombre de pila.
- </para></listitem>
- </varlistentry>
- <varlistentry> <term><guilabel>2&ordm; Nombre: </guilabel></term>
- <listitem> <para> Escriba el segundo nombre, si se precisa.
- </para></listitem>
- </varlistentry>
- <varlistentry> <term><guilabel>Apellido: </guilabel></term>
- <listitem> <para> Escriba el apellido o los apellidos.
- </para></listitem>
- </varlistentry>
- <varlistentry> <term><guilabel>Sufijo: </guilabel></term>
- <listitem> <para> Escriba el sufijo si lo hay, por ejemplo Jr. o III.
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <para> El <guilabel>Nombre completo</guilabel> interacta tambin con el botn <guilabel>Guardar como</guilabel> a la hora de organizar sus contactos.
- </para>
- <para> Para ver cmo funciona, escriba un nombre en el campo <guilabel>Nombre completo</guilabel>. Como ejemplo, utilizaremos el nombre de la mascota de Ximian: <userinput>Rupert T. Monkey</userinput>. Observe cmo este nombre aparece tambin en el campo <guilabel>Guardar como</guilabel>, pero al revs: <computeroutput>Monkey, Rupert</computeroutput>. Puede seleccionar <computeroutput>Rupert Monkey </computeroutput> en la lista desplegable, o escribirlo como prefiera, por ejemplo <userinput> T. Rupert Monkey </userinput>.
- </para> <tip>
- <title>Sugerencias para introducir datos</title>
- <para> No utilice nombres completamente diferentes del nombre real, pues podra llegar a olvidar que introdujo los datos de Rupert bajo la E de Empleado ficticio de Ximian, por ejemplo.
- </para> </tip>
- </listitem>
- </varlistentry>
- <varlistentry> <term>Valores mltiples en campos:</term>
- <listitem>
- <para> Si hace clic en los iconos que apuntan hacia abajo junto al campo <guilabel>Correo electrnico principal</guilabel> puede seleccionar <guilabel>Correo electrnico 2</guilabel> y <guilabel>Correo electrnico 3</guilabel>. El cliente <application>Evolution</application> los almacena todos, aunque el editor de contacto slo muestre uno de ellos a la vez. Las entradas con informacin poseen una marca junto a ellas. Los botones junto a los campos de telfono y direccin postal funcionan del mismo modo.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- <para> El ltimo elemento de la ficha <guilabel>General</guilabel> es el de la herramienta de organizacin de las <guilabel>Categoras</guilabel>. Para obtener informacin acerca de esta herramienta, consulte <xref
- linkend="usage-contact-organize">.
- </para>
- <para> La ficha <guilabel>Detalles</guilabel> es mucho ms sencilla:
- <itemizedlist>
- <listitem>
- <para> El maletn - Para apuntes sobre el historial profesional
- </para>
- </listitem>
- <listitem>
- <para> La careta - Para apuntes sobre la persona
- </para>
- </listitem>
- <listitem>
- <para> El globo terrqueo - Para otros apuntes.
- </para>
- </listitem>
- </itemizedlist>
-
- <tip>
- <title>Atajos asociados a los contactos</title>
- <para>
- Es posible agregar tarjetas a partir de un mensaje de correo o
- de una cita del calendario. Con el mensaje abierto, haga clic
- con el botn derecho en cualquier direccin o mensaje de correo
- electrnico, y elija en el men
- <!-- esta opcin no sale por ningn lado <guimenuitem>Crear tarjeta con la direccin</guimenuitem> o -->
- <guimenuitem>Aadir remitente a la libreta de direcciones</guimenuitem>.
- </para>
- </tip>
- </para>
- </sect1>
-
- <sect1 id="contact-search">
- <title>Bsqueda de contactos</title>
- <para> <application>Evolution</application> es capaz de simplificar la bsqueda de contactos.
- </para>
- <para> Para buscar dentro de los contactos:
- <orderedlist numeration="arabic">
- <listitem>
- <para> Seleccione el elemento de bsqueda en la barra de bsqueda.
- </para>
- </listitem>
- <listitem>
- <para> Escriba su consulta.
- </para>
- </listitem>
- <listitem>
- <para> Presione intro para iniciar la bsqueda.
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para> Para realizar una bsqueda compleja dentro de los contactos:
- <orderedlist numeration="arabic">
- <listitem>
- <para> Abra <menuchoice> <guimenu>Herramientas</guimenu> <guimenuitem>Buscar contactos</guimenuitem> </menuchoice>
- </para>
- </listitem>
- <listitem>
- <para> Escriba un nombre para la regla en el campo <guilabel>Nombre de la regla</guilabel>.
- </para>
- </listitem>
- <listitem>
- <para> Configure el criterio de bsqueda en la seccin <guilabel>Si</guilabel>.
- </para>
- </listitem>
- <listitem>
- <para> Si desea agregar otros criterios, haga clic en <guibutton>Aadir criterio</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en <guibutton>Buscar</guibutton>.
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para>
- Para mostrar todos los contactos <!-- Esta parte parece que est
- obsoleta , seleccione <guibutton>Mostrar todo</guibutton> en la
- <guilabel>Barra de bsqueda</guilabel>, o --> realice una consulta con
- el campo vaco.
- </para>
-
- </sect1>
-
- <sect1 id="usage-contact-organize">
- <title>Organizacin de la libreta de direcciones</title>
- <para> La organizacin de la libreta de direcciones se asemeja mucho a la de sus mensajes. Puede utilizar carpetas y bsquedas como hace con los mensajes, pero la libreta de direcciones no admite carpetas virtuales. Sin embargo, s permite clasificar cada tarjeta mediante numerosos criterios, as como crear criterios personales. Acerca de las categoras, consulte <xref
- linkend="usage-contact-organize-group-category">.
- </para>
-
-<!-- UNIMPLEMENTED FEATURE
- <para>
- Another useful <application>Evolution</application> feature is
- its ability to recognize when people live or work together. If
- several people in your addressbook 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> dispone de dos mtodos para organizar sus tarjetas. El primer mtodo son las carpetas; su funcionamiento es similar al de las carpetas de mensajes. Para mayor flexibilidad, puede utilizar marcas para asociar los contactos con diferentes categoras. Adems, para mejorar la integracin con las herramientas de correo, es posible crear listas de contactos a cuya direccin puede escribir mensajes, como si se tratara de una persona individual.
- </para>
-
- <sect3 id="usage-contact-organize-group-folder">
- <title>Agrupacin en carpetas</title>
- <para> Las carpetas son la forma ms sencilla de agrupar tarjetas de direcciones. De forma predeterminada, las tarjetas se encuentran originalmente en la carpeta <guilabel>Contactos</guilabel>. Si se ley <xref
- linkend="usage-mainwindow">, ya sabe cmo crear una carpeta nueva, con <menuchoice> <guimenu>Archivo</guimenu> <guisubmenu>Nuevo</guisubmenu> <guimenuitem>Carpeta</guimenuitem> </menuchoice>, y que puede ubicarlas donde prefiera. Como ocurre con los mensajes, las tarjetas pueden colocarse en una carpeta asociada, y la misma tarjeta no puede aparecer en dos lugares a la vez. Si desea mayor flexibilidad, consulte <xref
- linkend="usage-contact-organize-group-category">.
- </para>
- <para> Para colocar una tarjeta dentro de una carpeta, arrstrela desde la vista de carpetas. Recuerde que las tarjetas de contactos slo pueden moverse a carpetas especficas de tarjetas, del mismo modo que las carpetas de mensajes slo admiten mensajes, y las carpetas de calendarios, slo calendarios.
- </para>
- </sect3>
-
- <sect3 id="usage-contact-organize-group-category">
- <title>Agrupacin por categoras</title>
- <para> El otro mtodo para agrupar tarjetas consiste en marcarlas como pertenecientes a diferentes categoras. Por tanto, puede asociar una tarjeta con numerosas categoras, o no asociarla. Por ejemplo, la tarjeta de mi amigo Mateo tiene asociadas las categoras Trabajo, porque trabaja conmigo; Amigos porque tambin es un amigo mo; y Frecuentes, porque siempre que le llamo, nunca recuerdo su nmero de telfono.
- </para>
- <para> Para asociar una tarjeta con una categora, haga clic en <guibutton>Categoras</guibutton> en la parte inferior derecha. En el cuadro de dilogo, active las casillas de todas las categoras que prefiera.
- </para>
-
-
-<!-- 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>Creacin de una lista de contactos</title>
- <para> Para crear una lista de contactos:
-
- <orderedlist numeration="arabic">
- <listitem>
- <para> Abra el cuadro de dilogo de creacin de lista: haga clic en
- <menuchoice><guibutton>New</guibutton><guimenuitem>Lista de contactos</guimenuitem></menuchoice> o seleccione <menuchoice> <guimenu> Archivo </guimenu> <guisubmenu> Nuevo </guisubmenu> <guimenuitem> Lista de contactos </guimenuitem> </menuchoice>.
- </para>
- </listitem>
-
- <listitem>
- <para> Escriba un nombre en la lista.
- </para>
- </listitem>
- <listitem>
- <para> Escriba los nombres o direcciones de correo electrnico de los contactos, o arrstrelos desde la ventana principal, hasta la lista.
- </para>
- </listitem>
-
- <listitem>
- <para> Especifique si prefiere ocultar las direcciones cuando enva un mensaje a la lista. A menos que se trate de una lista muy pequea, se recomienda dejar ocultas estas direcciones. Este funcionamiento es similar al de la caracterstica Bcc:, comentada en <xref linkend="usage-mail-getnsend-send-to-types">.
- </para>
- </listitem>
-
- </orderedlist>
- </para>
- <para> Cuando ha terminado, haga clic en <guibutton>Aceptar</guibutton>. La lista de contactos aparece como una tarjeta ms, que puede utilizar como las dems. Esto incluye la posibilidad de enviar la lista a otra persona y, por supuesto, la de enviar un mensaje a la lista.
- </para>
- <para> Para enviar un mensaje a la lista, abra un mensaje nuevo y escriba el nombre correspondiente. Al enviarlo, Ximian Evolution transmitir el mensaje a todos los miembros de la lista. Tambin puede hacer clic con el botn derecho en la tarjeta correspondiente en la libreta de direcciones, y seleccionar <guimenuitem>Enviar un mensaje a la lista</guimenuitem>.
- </para>
- <para> Ximian Evolution no puede almacenar listas de contactos en servidores Exchange.
- </para>
-
- </sect3>
- </sect2>
- </sect1>
-
- <sect1 id="usage-contact-sharing">
- <title>Protocolo LDAP: libretas de direcciones compartidas en red</title>
-
- <para> El diseo del protocolo <glossterm linkend="ldap">LDAP</glossterm> permite a los usuarios compartir informacin de contactos en red, mediante accesos compartidos a una libreta de direcciones central. El protocolo LDAP permite que una organizacin ponga un conjunto de contactos a la dispocicin de sus miembros, o de un departamento. Numerosas organizaciones conservan en una libreta LDAP las direcciones de todos sus empleados o los contactos de clientes.
- </para>
-
- <para> Para obtener informacin acerca de cmo agregar un directorio remoto dentro de sus carpetas de contactos disponibles, consulte <xref linkend="config-prefs-contact">. Tras establecer una conexin LDAP, la carpeta o las carpetas de contactos en red aparecern dentro de la barra de carpetas bajo <guilabel>Otros contactos</guilabel>. Funciona exactamente como una carpeta de tarjetas locales, con las excepciones siguientes:
- <itemizedlist>
-
- <listitem>
- <para> Las carpetas de red slo estn disponibles cuando se conecta a la red. Si utiliza un equipo porttil o una conexin telefnica, conviene hacer una copia del directorio de red, o colocar ste en cach. Para ello, arrastre los contactos deseados dentro de la lista de contactos local.
- </para>
- </listitem>
-
- <listitem>
- <para> Para reducir el trfico de red, <application>Evolution</application> no descarga normalmente el contenido de las carpetas LDAP en el mismo momento de conectar. Es necesario hacer clic en <guilabel>Mostrar todo</guilabel> para descargar todo el contenido de la carpeta LDAP desde la red. Puede modificar este comportamiento en la ventana <interface>Preferencias de los contactos</interface>.
- </para>
- </listitem>
- <listitem>
- <para> No puede agregar, eliminar o modificar las tarjetas del propio servidor LDAP. Si necesita modificar el contenido del servidor, pngase en contacto con el administrador del sistema.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <sect2 id="usage-contact-sharing-setup">
- <title>Configuracin de Evolution para utilizar LDAP</title>
- <para> Para ms informacin acerca de cmo configurar el cliente <application>Evolution</application> para que utilice el protocolo LDAP, consulte <xref linkend="config-prefs-contact-ldap-add" />
- </para>
- </sect2>
- </sect1>
-
- <sect1 id="contact-automation-basic">
- <title>Cmo agregar tarjetas rpidamente</title>
- <para> Como ya indicamos, puede crear una tarjeta con los datos de una persona, disponibles en un mensaje o una entrada del calendario. Para ello, haga clic con el botn derecho en cualquier direccin de correo o mensaje y seleccione <guimenuitem>Aadir a contactos</guimenuitem> en el men. <application>Evolution</application> puede tambin leer las tarjetas de un dispositivo de mano durante una operacin de sincronizacin (HotSync). Para obtener ms informacin, consulte <xref linkend="usage-sync">.
- </para>
- </sect1>
-
-<!-- Unimplemented features:
- <para>
- You can also use the addressbook 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>
- <para>
- Need a map or directions? Click <guibutton>MapIt</guibutton> from
- within the addressbook, and <application>Evolution</application>
- will map the address for you online.
- </para>
- -->
-</chapter>
-
-
-
-
-
diff --git a/help/es/usage-exchange.sgml b/help/es/usage-exchange.sgml
deleted file mode 100644
index ac92bbf93f..0000000000
--- a/help/es/usage-exchange.sgml
+++ /dev/null
@@ -1,425 +0,0 @@
-<!-- $Id: usage-exchange.sgml,v 1.3 2003/10/21 18:51:25 ettore Exp $ -->
-<!-- Traduccin: irm 030501 -->
-<!-- Revisin: ismael 030501 -->
-
- <chapter id="usage-exchange">
- <title>Ximian Connector para Microsoft Exchange</title>
- <para> Ximian Connector para Microsoft Exchange permite a los clientes Ximian Evolution tener acceso a cuentas de servidores Microsoft Exchange 2000. La aplicacin est disponible, en su propio canal, a travs de Ximian Red Carpet, pero su utilizacin requiere un archivo de licencia. Puede adquirir el archivo de licencia en la tienda en lnea de Ximian, en la direccin <ulink
- url="http://store.ximian.com">store.ximian.com</ulink>. A diferencia del cliente Ximian Evolution normal, el programa Ximian Connector para Microsoft Exchange es un software propietario cuyo cdigo fuente no est disponible.
- </para>
-
- <warning id="licensing">
- <title>Requisitos</title>
- <para> Ximian Connector slo funciona con Exchange 2000, y requiere habilitar el componente Outlook Web Access. Cada usuario debe disponer de una cuenta vlida en el servidor Microsoft Exchange 2000, incluida la licencia.
- </para> </warning>
-
-<sect1 id="new-in-connector-one-two">
-<title>Qu novedades incluye Connector 1.2</title>
- <para> Ximian Connector 1.2 incluye algunas de las caractersticas ms solicitadas de los clientes Microsoft Exchange, como el acceso a carpetas pblicas y la delegacin de calendarios.
- </para>
-
- <variablelist>
- <varlistentry> <term>Cuadros de dilogo de preferencias</term>
- <listitem>
- <para> Los cuadros de dilogo de preferencias han sido completamente revisados para el cliente Evolution y el programa Connector 1.2. Seleccione <menuchoice><guimenu>Herramientas</guimenu><guimenuitem>Preferencias</guimenuitem></menuchoice> en la ventana principal de Evolution para modificar sus preferencias.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Carpetas pblicas, exposicin y delegacin</term>
- <listitem>
- <para> Se incluyen carpetas pblicas, exposicin y delegacin. Es posible establecer permisos en carpetas si dispone del nivel de acceso apropiado, as como consultar las carpetas de otros usuarios que le concedieron permisos para ello.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Marca para seguimiento</term>
- <listitem>
- <para> La marca para seguimiento no funciona adecuadamente ni en Outlook ni en Evolution, incluso cuando est activada en uno y se lee en el otro.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Compatibilidad mejorada para carpetas virtuales</term>
- <listitem>
- <para> Las carpetas virtuales ahora funcionan mejor con las cuentas Exchange.
- </para>
- </listitem>
- </varlistentry>
-
-
- <varlistentry> <term>Notas</term>
- <listitem>
- <para> Ahora es posible leer las carpetas Notas y Diario de las cuentas de Exchange, as como mover elementos entre stas y otras carpetas. La funcin de creacin de nuevas Notas o de un nuevo Diario sigue sin funcionar.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Reserva directa</term>
- <listitem>
- <para> Cuando crea una solicitud de reunin, es posible comprobar la disponibilidad y reservar recursos (salas o equipos, por ejemplo) sin esperar respuesta.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-</sect1>
-
- <sect1 id="features">
- <title>Caractersticas del componente Connector</title>
- <para> Adems de las enumeradas, <application>Ximian Connector</application> es compatible con las siguientes caractersticas bsicas de <application>Microsoft Exchange</application>:
- <itemizedlist>
- <listitem>
- <para> General
- </para>
- <variablelist>
- <varlistentry> <term>Almacn remoto de informacin de <application>Exchange</application></term>
- <listitem>
- <para> El cliente <application>Evolution</application> permite tener acceso al correo, a la libreta de direcciones (incluso a la carpeta de la lista global de direcciones) as como a las carpetas de calendarios y tareas en el servidor <application>Exchange 2000</application>.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Sincronizacin con Palm</term>
- <listitem>
- <para> Compatibilidad con los contactos y calendarios de Exchange.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </listitem>
- <listitem>
- <para> Correo
- </para>
- <variablelist>
- <varlistentry> <term>Consulta del correo en una carpeta <application>Exchange</application></term>
- <listitem>
- <para></para>
- </listitem>
- </varlistentry>
- <varlistentry> <term>Envo de correo mediante protocolos Exchange</term>
- <listitem>
- <para> Puede utilizar el protocolo de transporte de correo de Microsoft Exchange para enviar correo. Asegrese de que la direccin de correo electrnico que utiliza coincide con la que registr en el servidor Exchange. Es posible que cambie a minombre@exchange-server.ximian.com en lugar de minombre@ximian.com.a
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </listitem>
- <listitem>
- <para> Calendario
- </para>
- <variablelist>
- <varlistentry> <term>Solicitud y convocatoria de reunin</term>
- <listitem>
- <para> Permite a los usuarios del cliente <application>Evolution</application> programar sus reuniones y examinar en <application>Exchange</application> la disponibilidad de asistentes de otros clientes (de <application>Evolution</application> o de <application>Outlook</application>).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term>Agregar solicitudes de reuniones iCalendar a Calendar</term>
- <listitem>
- <para> Si recibe una solicitud de reunin con iCalendar y la agrega a su calendario, queda guardada dentro del calendario de <application>Exchange</application>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </listitem>
- <listitem>
- <para> Contactos
- </para>
- <variablelist>
- <varlistentry> <term>Funcin autocompletar para direcciones</term>
- <listitem>
- <para> Compatible con la carpeta Contactos de <application>Exchange</application>. No est disponible aun para la lista global de direcciones.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term>Agregar tarjetas de visita a la libreta de direcciones</term>
- <listitem>
- <para> Si recibe una tarjeta adjunta y hace clic en <guibutton>Guardar en la libreta de direcciones</guibutton>, se incluye en la libreta de direcciones de <application>Exchange</application>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term>Es posible crear con un clic nuevas entradas en la libreta de direcciones de <application>Exchange</application> cuando recibe un mensaje de correo electrnico</term>
- <listitem>
- <para>
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </listitem>
-</itemizedlist>
-</para>
-
-<para> Algunas caractersticas no estn sin embargo disponibles:
-<itemizedlist>
- <listitem>
- <para> Funcin Trabajar desconectado (modo desconectado).
- </para>
- </listitem>
- <listitem>
- <para> Funcin Mensaje de recuperacin.
- </para>
- </listitem>
- <listitem>
- <para> Creacin de mensajes automticos de respuesta Fuera de la oficina.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </sect1>
- <sect1 id="install">
- <title>Instalacin de Connector</title>
- <para> Para instalar Ximian Connector, ejecute la herramienta Ximian Red Carpet: seleccione <menuchoice><guimenu>Sistema</guimenu><guimenuitem>Obtener software</guimenuitem></menuchoice>. Suscrbase al canal Ximian Connector para Microsoft Exchange, seleccione Ximian Connector para Microsoft <application>Exchange</application>2000 y haga clic en <guibutton>Instalar</guibutton>. Para instalar el programa Connector, si lo desea tambin puede descargar paquetes individuales desde ftp.ximian.com.
- </para>
- <para> Tras el programa, necesitar instalar tambin un archivo de licencia. El archivo de licencia es el comprobante de pago de la licencia de uso del programa Ximian Connector. Puede obtener el archivo de licencia en la tienda en lnea de Ximian, en la direccin <ulink
- url="http://store.ximian.com">store.ximian.com</ulink>. Es necesario utilizar un navegador con una fuerte capacidad de cifrado (128 bits o ms) para tener acceso al servicio en lnea. Tras adquirir una licencia Ximian Connector, el servicio le enva el archivo correspondiente, con instrucciones de instalacin. Una vez instalado, el archivo de licencia desbloquea las funciones operativas de Ximian Connector y le permite conectarse a un servidor <application>Exchange</application>.
- </para>
- </sect1>
-
- <sect1 id="configure">
- <title>Configuracin</title>
- <para> Tras instalar el programa Connector, debe configurar el acceso a su cuenta <application>Exchange</application> tanto en el servidor <application>Exchange</application> como en el programa Evolution.
- </para>
-
- <sect2 id="config-server">
- <title>Configuracin del servidor Exchange</title>
- <para> Compruebe con el administrador del sistema los puntos siguientes:
- <itemizedlist>
- <listitem>
- <para> Posee una cuenta vlida en el servidor <application>Exchange</application>.
- </para>
- </listitem>
- <listitem>
- <para> Su acceso a la cuenta est autorizado mediante WebDAV. Este es el valor predeterminado del servidor <application>Exchange</application>, y no es necesario modificarlo, a menos que su administrador de sistema lo haya deshabilitado.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <para> El sitio Web de Knowledge Base de Ximan, en la direccin <ulink type="http"
- url="http://support.ximian.com">support.ximian.com</ulink>, cuenta con informacin adicional para asegurarse de que el servidor <application>Exchange</application> aceptar las conexiones del cliente Ximian Evolution.
- </para>
- </sect2>
-
- <sect2 id="config-client">
- <title>Configuracin de Evolution para conectarse con un servidor <application>Exchange</application></title>
- <para>
-
- Tras asegurarse de que est preparado para conectar con el servidor, inicie Ximian Evolution y seleccione <menuchoice> <guimenu>Herramientas</guimenu> <guimenuitem>Configuracin del correo</guimenuitem> </menuchoice> desde cualquier vista de correo.
- </para>
- <sect3 id="config-exchange-new-account">
- <title>Creacin de una nueva cuenta Exchange</title>
-
-
- <para> Si desea crear una nueva cuenta en el servidor Exchange, haga clic en <guibutton>Aadir</guibutton> en la lista de cuentas. El asistente le gua paso a paso durante la creacin de una cuenta, tal y como se describe tambin en <xref
- linkend="usage-mainwindow-starting">. Si no est seguro de la informacin necesaria, pregunte directamente a su administrador del sistema.
- </para>
- <variablelist>
- <varlistentry> <term>Identidad</term>
- <listitem>
- <para>Escriba su nombre y direccin de correo electrnico. Si lo desea, puede agregar su organizacin as como la ruta de su archivo de firma. Slo son obligatorios su nombre y direccin de correo electrnico.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Recepcin de correo</term>
- <listitem>
- <para> En esta etapa, especifique cmo desea comprobar su correo:
- <orderedlist>
- <listitem>
- <para> En primer lugar, seleccione <guilabel>Microsoft Exchange</guilabel> como tipo de servidor.
- </para>
- </listitem>
- <listitem>
- <para> Escriba el nombre del servidor Exchange y el nombre de usuario de inicio de sesin, en una estacin de trabajo dentro de su organizacin.
- </para>
- </listitem>
- <listitem>
- <para> Si lo desea, active la casilla <guilabel>Usar conexiones seguras (SSL)</guilabel>, para reforzar la seguridad de su conexin. Esta opcin le permite conectarse al servidor sin utilizar un cortafuegos.
- </para>
- </listitem>
- <listitem>
- <para> Si desea que <application>Evolution</application> recuerde su contrasea, active la casilla <guilabel>Recuerda esta contrasea</guilabel>.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Recepcin de correo - Etapa dos</term>
- <listitem>
- <para>Esta etapa incluye algunas opciones adicionales:
- <orderedlist>
- <listitem>
- <para> Comprobacin de correo nuevo: para comprobar automticamente la presencia de correo nuevo, active la casilla y especifique un intervalo en minutos.
- </para>
- </listitem>
- <listitem>
- <para> Exchange Server: si el nombre de su buzn Exchange y su nombre de usuario Windows son diferentes, especifique el nombre de su buzn en este campo.
- </para>
- </listitem>
- <listitem>
- <para> Reemplazar ruta de Outlook Web Access: en la mayora de los casos, la direccin URL para tener acceso por Web es "http://server.company.com/exchange". Si la ruta en su sistema no es exchange, active la casilla y escriba la ruta especfica en el campo correspondiente.
- </para>
- </listitem>
-
- <listitem>
- <para> Active Directory: Si desea poder utilizar la Lista global de direcciones (lista global de direcciones), active la casilla <guilabel>Crear una carpeta para la lista global de direcciones</guilabel> y escriba el nombre del servidor del directorios. Para reducir la carga del servidor, se establece en 500 el nmero mximo de respuestas a una consulta Active Directory. Si desea modificar este valor, puede hacerlo aqu tambin.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Envo de correo</term>
- <listitem>
- <para>Seleccione <guilabel>Microsoft Exchange</guilabel> como mtodo de envo del correo. No es necesario hacer nada ms en esta etapa.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Gestin de la cuenta</term>
- <listitem>
- <para>Escriba un nombre que le servir para recordar esta cuenta: Cuenta Exchange es una buena sugerencia. Observe que no puede tener dos cuentas con el mismo nombre. Si desea hacer de ella su cuenta predeterminada para el envo de correo, active la casilla <guilabel>determinada</guilabel>.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para> Ha terminado. Haga clic en <guibutton>Terminar</guibutton> y en <guibutton>Aceptar</guibutton>; a continuacin, cierre y vuelva a iniciar el programa <application>Evolution</application>. A partir de ahora, est listo para trabajar con el servidor Exchange.
- </para>
-
- <figure>
- <title>Creacin de una cuenta Exchange - Etapa uno: identificacin</title>
- <screenshot> <screeninfo>Creacin de una cuenta Exchange - Etapa uno: identificacin</screeninfo> <mediaobject><imageobject> <imagedata format="png" fileref="figures/exchange-identity" srccredit="Aaron Weber"> </imageobject></mediaobject>
- </screenshot> </figure>
-
- <figure>
- <title>Creacin de una cuenta Exchange- Etapa dos: recepcin de correo</title>
- <screenshot> <screeninfo>Creacin de una cuenta Exchange- Etapa dos: recepcin de correo</screeninfo> <mediaobject><imageobject> <imagedata format="png" fileref="figures/exchange-receive" srccredit="Aaron Weber"> </imageobject></mediaobject>
- </screenshot> </figure>
-
- <figure>
- <title>Creacin de una cuenta Exchange- Etapa tres: opciones de correo</title>
- <screenshot> <screeninfo>Creacin de una cuenta Exchange- Etapa tres: opciones de correo</screeninfo> <mediaobject><imageobject> <imagedata format="png" fileref="figures/exchange-receive-options" srccredit="Aaron Weber"> </imageobject></mediaobject>
- </screenshot> </figure>
-
-
- </sect3>
-
- <sect3 id="config-exchange-existing-account">
- <title>Modificacin de una cuenta existente para utilizarla con Exchange</title>
- <para> Si ya dispone de una cuenta de correo y desea convertirla para utilizarla con Exchange, seleccione dicha cuenta y haga clic en <guibutton>Editar</guibutton>. En el cuadro de dilogo, deber modificar probablemente la configuracin de las fichas siguientes:
- </para>
- <variablelist>
- <varlistentry> <term>Identidad</term>
- <listitem>
- <para> Modifique en esta ficha su direccin de correo, si ha cambiado por utilizar un servidor nuevo. En caso contrario, pase a la ficha siguiente.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term>Recepcin de correo</term>
- <listitem>
- <para> Seleccione <guilabel>Microsoft Exchange</guilabel> como tipo de servidor. Escriba el nombre del servidor en el campo <guilabel>Host</guilabel> as como el nombre de usuario de su cuenta, en el campo <guilabel>Nombre de usuario</guilabel>. Si su servidor admite cifrado SSL (Secure Socket Layer), puede activar la casilla <guilabel>Utilizar SSL</guilabel> para reforzar la seguridad en sus intercambios de datos.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term>Opciones de recepcin</term>
- <listitem>
- <para> Encontrar en esta ficha opciones de configuracin adicionales:
- <variablelist>
- <varlistentry> <term>Comprobacin de correo nuevo</term>
- <listitem>
- <para> Especifique si desea comprobar automticamente la presencia de correo y, en ese caso, con qu frecuencia.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term>Nombre de buzn y ruta de Web Access</term>
- <listitem>
- <para> Si el servidor Exchange utiliza un nombre de buzn distinto al nombre utilizado para iniciar la sesin, active la segunda casilla y escriba dicho nombre. Consulte con el administrador del sistema para asegurarse.
- </para>
- <para> En la mayora de los casos, la direccin URL para tener acceso por Web es http://server.company.com/exchange. Si la ruta en su sistema no es exchange, active la casilla y escriba la ruta especfica en el campo correspondiente.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term>Active Directory</term>
- <listitem>
- <para> Si desea utilizar la lista global de direcciones que administra el servidor Exchange, haga clic en la ficha <guilabel>Opciones de recepcin</guilabel> y active la casilla <guilabel>Crear una carpeta para la lista global de direcciones</guilabel>. La administracin de la lista global de direcciones corre a cargo del administrador del sistema: no puede agregar, modificar o eliminar elementos de esta lista con Ximian Evolution. Sin embargo, puede utilizarla para convocar reuniones con otras personas, buscar sus direcciones e informacin similar. En numerosas organizaciones, la lista global de direcciones se almacena un servidor diferente del servidor de correo. Si es el caso, deber tambin especificar el nombre del servidor de directorios.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term>Envo de correo</term>
- <listitem>
- <para> Si piensa utilizar su servidor Exchange para enviar y recibir correo, seleccione <guilabel>Microsoft Exchange</guilabel> como tipo de servidor, y escriba su nombre en el campo <guilabel>Host</guilabel>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>
-
- Tras introducir estas modificaciones, haga clic en <guibutton>Aceptar</guibutton>.
- </para>
- <para> A continuacin, cierre y vuelva a iniciar el programa <application>Evolution</application>. Los cambios en la configuracin de cuentas de Ximian Connector no se activan hasta despus de reiniciar la aplicacin.
- </para>
- </sect3>
- </sect2>
- </sect1>
-
- <sect1 id="access">
- <title>Acceso al servidor <application>Exchange</application></title>
- <para> Como ocurre con la informacin IMAP y LDAP, la informacin de cuentas de <application>Exchange</application> se almacena en el servidor, y no en su equipo de sobremesa. Esto significa que podr tener acceso a su cuenta desde mltiples ubicaciones. Tambin significa que la informacin de su cuenta Microsoft <application>Exchange</application> se encuentra en un rbol de carpetas separado del rbol <guilabel>Local</guilabel>, dentro de la barra de carpetas. Lo podr ver bajo el rbol local, con el nombre que utiliz para su cuenta. Si dispone de varias cuentas, tambin tendr varios rboles de carpetas.
- </para>
- <para> Haga clic en cualquiera de las carpetas para visitarla; tendr probablemente que introducir la contrasea de su servidor. A partir de ahora puede crear contactos, enviar y recibir correo de la forma habitual. Si desea agregar a los almacenes de <application>Exchange</application> elementos de su calendario local, o de su propia libreta de direcciones, puede copiarlos y pegarlos, o simplemente arrastrarlos de una carpeta a otra, como si se tratara de almacenes locales.
- </para>
-
- <note id="save-to-local-or-exchange">
- <title>Guardar direcciones y citas adjuntas</title>
- <para> Cuando utiliza a la vez una cuenta Exchange y una cuenta local, conviene tener presente que cada vez que guarda una direccin de correo o una cita a partir de un mensaje, sta se guardar en la lista de contactos o en el calendario de Exchange, en lugar de hacerlo en su cuenta local. Lo mismo ocurre para sincronizar dispositivos Palm-OS: las tareas, citas y direcciones de Palm-OS se sincronizarn con las carpetas correspondientes en Exchange, y no en su equipo local.
- </para>
- </note>
-
- <tip id="gal-empty">
- <title>La lista global de direcciones est vaca al principio</title>
- <para> Para evitar una carga intil en el servidor, la lista global de direcciones se muestra vaca hasta que realiza una primera bsqueda. Si desea mostrar todas las tarjetas de la lista, haga clic en el campo de bsqueda y presione <keycap>Intro</keycap>. Con esto, ejecuta una bsqueda en blanco: como todas las tarjetas contienen un blanco, aparecern todas.
- </para> </tip>
- </sect1>
- <sect1 id="full-advantage">
- <title>Utilizacin del servidor Exchange para programar citas</title>
- <para> Cuando programa una reunin con su calendario en el servidor <application>Exchange</application>, puede comprobar la disponibilidad de otros usuarios en funcin de sus respectivos calendarios <application>Exchange</application>. Proceda como sigue:
- </para> <figure>
- <title>Planificacin a partir de informacin de disponibilidad</title>
- <screenshot> <screeninfo>Uso de la caracterstica de disponibilidad</screeninfo> <mediaobject><imageobject> <imagedata format="png" fileref="figures/schedule" srccredit="Aaron Weber"> </imageobject></mediaobject>
- </screenshot> </figure>
-
- <note id="reminders-in-exchange">
- <title>Recordatorios en Exchange</title>
- <para> Los recordatorios de citas, en el calendario de Exchange, no funcionarn hasta que ejecute Evolution una vez al menos despus de iniciar la sesin. Este comportamiento difiere del de los recordatorios administrados en local, que funcionan desde el mismo momento de iniciar la sesin, sin tener en cuenta si ejecut el cliente Evolution durante dicha sesin.
- </para>
- </note>
- <orderedlist numeration="arabic">
- <listitem>
- <para> Abra una nueva cita en el calendario.
- </para>
- </listitem>
- <listitem>
- <para> Elija <menuchoice> <guimenu>Acciones</guimenu> <guimenuitem>Planificar una reunin</guimenuitem> </menuchoice> en la ventana del editor de reuniones.
- </para>
- </listitem>
- <listitem>
- <para> Para agregar asistentes, escriba sus direcciones de correo electrnico, o haga clic en <guibutton>Invitar a otros...</guibutton>. Si opta por esta solucin, es preferible utilizar la lista global de direcciones (GAL - Global Address List). Elija la lista global de direcciones en la lista desplegable de direcciones origen en la parte superior del cuadro de dilogo.
- </para>
- </listitem>
- <listitem>
- <para> Elija <guilabel>Opciones</guilabel> y a continuacin <guilabel>Actualizar disponibilidad</guilabel> para comprobar las agendas de los participantes y, si es posible, actualizar la reunin en los calendarios de cada uno de los asistentes.
- </para>
- </listitem>
- </orderedlist> <tip id="autopick">
- <title>Uso de la funcin Autoseleccionar para ajustar el momento de reunin</title>
- <para> Si los asistentes no estn disponibles para las horas previstas de reunin, es posible empujar la reunin hacia adelante o hacia atrs, hasta el momento adecuado ms cercano. Para ello, haga clic en las flechas izquierda o derecha, o haga clic en <guilabel>Autoseleccionar</guilabel>. La herramienta autoseleccionar mueve la reunin a la fecha/hora ms cercana en la que todos los asistentes estarn disponibles. Si el resultado no le satisface, arrastre los lados de la reunin hacia las horas que desea seleccionar.
- </para> </tip>
- </sect1>
-</chapter>
-
-
-
diff --git a/help/es/usage-exec-summary.sgml b/help/es/usage-exec-summary.sgml
deleted file mode 100644
index 1aa771dd5e..0000000000
--- a/help/es/usage-exec-summary.sgml
+++ /dev/null
@@ -1,240 +0,0 @@
-
-
-<!-- $Id: usage-exec-summary.sgml,v 1.3 2003/10/21 18:51:26 ettore Exp $ -->
-<!-- Traduccin: Ismael -->
-<!-- Revisin: irm 030504/final 030428/rpida -->
-
-
-<!--
-<!DOCTYPE Chapter PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN">
--->
-<chapter id="usage-summary">
- <title>Introduccin al Resumen de Ximian Evolution </title>
-
- <sect1 id="summary-intro">
- <title>Uso de la herramienta Resumen</title>
- <para> El Resumen de Ximian Evolution puede mostrar todo lo que necesite saber con rapidez. Le mostrar las tareas de la jornada, cunto correo tiene pendiente y mucho ms.
- </para>
- <para> Para ver el Resumen haga clic en la barra de <guilabel>Atajos</guilabel> o en <guilabel>Resumen</guilabel>, al principio de la barra de <guilabel>Carpetas</guilabel>. La configuracin de fbrica incluye:
- <itemizedlist>
- <listitem>
- <para> Informe meteorolgico
- </para>
- </listitem>
- <listitem>
- <para> Titulares periodsticos a travs de Internet
- </para>
- </listitem>
- <listitem>
- <para> Resumen de correo
- </para>
- </listitem>
- <listitem>
- <para> Citas
- </para>
- </listitem>
- <listitem>
- <para> Tareas
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </sect1>
- <sect1 id="customizing-summary">
- <title>Personalizacin de los mdulos del Resumen</title>
- <para> Los mdulos de <application>Evolution</application> pueden personalizarse para satisfacer sus necesidades. Por ejemplo puede elegir qu buzones de correo resumir y qu servicios de noticias quiere que aparezcan.
- </para>
-
-
- <note id="summary-http-proxy">
- <title>Uso del Resumen a travs de un "proxy" HTTP</title>
- <para> Si utiliza un "proxy" HTTP <application>Ximian Evolution</application> lo encontrar a travs del subsistema <systemitem>gnome-vfs</systemitem> antes de poder acceder a los servicios meteorolgicos y de noticias a travs de Internet. Ocurre lo mismo si quiere ver imgenes remotas en un mensaje de correo HTML.
-
- Puede configurar un proxy HTTP en Sistema de Archivos Virtual de GNOME (gnome-vfs) de tres maneras, que presentamos por orden de complejidad creciente:
-
- <variablelist>
- <varlistentry> <term>Uso de la herramienta VFS Proxy</term>
- <listitem>
- <para>
- <orderedlist numeration="arabic">
- <listitem>
- <para> Ejecute la orden "gnome-vfs-proxy-capplet" o elija la herramienta de configuracin de HTTP Proxy en la Configuracin de su escritorio en el men panel.
- </para>
- </listitem>
- <listitem>
- <para> Escriba la direccin IP o el nombre del servidor de su proxy y presione el botn <guibutton>Aceptar</guibutton>.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term>Configuracin con Nautilus</term>
- <listitem>
- <para>
- <orderedlist numeration="arabic">
- <listitem>
- <para> Abra una ventana de Nautilus
- </para>
- </listitem>
- <listitem>
- <para> Abra el men <menuchoice> <guimenu>Preferencias</guimenu> <guimenuitem>Editar preferencias</guimenuitem> </menuchoice>.
- </para>
- </listitem>
- <listitem>
- <para> Vaya a la seccin <guilabel>Navigacin</guilabel>.
- </para>
- </listitem>
- <listitem>
- <para> Active la casilla <guilabel>Usar proxy HTTP</guilabel> y escriba la direccin del proxy HTTP en el cuadro de texto <guilabel>Direccin</guilabel>. </para>
- </listitem>
- </orderedlist>
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term>Configuracin con la orden gconftool</term>
- <listitem>
- <para>
- <orderedlist numeration="arabic">
- <listitem>
- <para> Abra una ventana de terminal.
- </para>
- </listitem>
- <listitem>
- <para> Escriba la orden <command> gconftool --type=bool --set /system/gnome-vfs/use-http-proxy "TRUE" </command>
- </para>
- </listitem>
- <listitem>
- <para> Escriba la orden <command> gconftool --type=string --set /system/gnome-vfs/http-proxy-host "mi-proxy-url" </command>
- </para>
- </listitem>
- <listitem>
- <para> Escriba la orden <command> gconftool --type=int --set /system/gnome-vfs/http-proxy-port "8080" </command>
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para> Para obtener ms informacin acerca de la orden gconftool, consulte la pgina man correspondiente.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-
- </para>
-
- <para> En el Centro de control encontrar la herramienta de configuracin del proxy.
- </para>
- </note>
-
-
- <sect2 id="customizing-summary-weather">
- <title>Personalizacin del Resumen meteorolgico</title>
- <para> Para agregar una ciudad al resumen:
- <orderedlist numeration="arabic">
-
- <listitem>
- <para> En <menuchoice> <guimenu>Herramientas</guimenu> <guimenuitem>Configuracin</guimenuitem> </menuchoice> elija <guilabel>Preferencias del Resumen</guilabel>.
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en la ficha <guilabel>Meteorologa</guilabel>.
- </para>
- </listitem>
- <listitem>
- <para> Elija la ciudad en la columna de la izquierda.
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en <guibutton>Aadir</guibutton>.
- </para>
- </listitem>
- </orderedlist>
- <tip id="measurments">
- <title>Sistema mtrico o anglosajn?</title>
- <para>
-
- <application>Evolution</application> implementa los sistemas mtricos internacional y anglosajn para los informes meteorolgicos. El sistema anglosajn corresponde al sistema britnico pero se utiliza casi exclusivamente en EEUU. Gran Bretaa y el resto del mundo utilizan el sistema mtrico.
- </para>
- </tip>
- </para>
- </sect2>
- <sect2 id="customizing-feeds">
- <title>Personalizacin de la captura de titulares</title>
- <para> Para personalizar la captura de titulares:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
-
- <menuchoice> <guimenu>Herramientas</guimenu> <guimenuitem>Configuracin</guimenuitem> </menuchoice> y elija <guilabel>Preferencias del Resumen</guilabel>. Entonces elija la ficha <guilabel>Fuentes de Noticias</guilabel>.
- </para>
- </listitem>
- <listitem>
- <para> Elija en la columna de la izquierda las fuentes de titulares que quiera agregar a su resumen.
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en <guibutton>Aadir</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en <guibutton>Aceptar</guibutton>.
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para> Es posible incluir titulares de orgenes personalizados. Evolution es capaz de utilizar titulares en formato RDF del sitio Web de su eleccin.
- </para>
- </sect2>
- <sect2 id="customizing-mail">
- <title>Personalizacin del Resumen del correo</title>
- <para> Para personalizar el resumen de correo:
- <orderedlist numeration="arabic">
- <listitem>
- <para> Elija <menuchoice> <guimenu>Herramientas</guimenu> <guimenuitem>Configuracin</guimenuitem> </menuchoice> y a continuacin <guilabel>Preferencias del Resumen</guilabel>.
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en la ficha <guibutton>Correo</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para> Elija la carpeta de correo que quiera ver en la columna de la izquierda.
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en <guibutton>Aadir</guibutton>.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </sect2>
- <sect2 id="customizing-cal">
- <title>Personalizacin del Resumen de planificacin</title>
- <para> Para personalizar el resumen de su calendario:
- <orderedlist numeration="arabic">
- <listitem>
- <para> Elija <menuchoice> <guimenu>Herramientas</guimenu> <guimenuitem>Configuracin</guimenuitem> </menuchoice> y a continuacin <guilabel>Preferencias del Resumen</guilabel>.
- </para>
- </listitem>
- <listitem>
- <para> Elija la ficha <guibutton>Planificacin</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para> Indique si desea agrupar sus citas por un da, cinco, una semana o un mes.
- </para>
- </listitem>
- <listitem>
- <para> Indique si desea mostrar todas las tareas o slo las del da corriente.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </sect2>
- </sect1>
-</chapter>
-
-
-
-
-
diff --git a/help/es/usage-mail-org.sgml b/help/es/usage-mail-org.sgml
deleted file mode 100644
index 55d5b078d0..0000000000
--- a/help/es/usage-mail-org.sgml
+++ /dev/null
@@ -1,674 +0,0 @@
-<!-- $Id: usage-mail-org.sgml,v 1.3 2003/10/21 18:51:26 ettore Exp $ -->
-<!-- Traduccin: irm -->
-<!-- Revisin: -->
-
-<chapter id="usage-mail-organize">
- <title>Organizacin y administracin del correo electrnico</title>
- <para> Desear probablemente organizar sus mensajes, por muy pocos que sean los que reciba cada da. Cuando cuente con un centenar de ellos, y quiera encontrar un mensaje de un mes de antig&uuml;edad, le resultar <emphasis>necesario</emphasis> poner orden y organizar su correo. Afortunadamente, <application>Ximian Evolution</application> cuenta con las herramientas necesarias para ayudarle en esta tarea.
- </para>
-
- <sect1 id="importing-mail-and-settings">
- <title>Importacin de la configuracin y de los mensajes existentes</title>
- <para> <application>Evolution</application> le permite importar mensajes y otros datos existentes: no tendr que preocuparse por la prdida de informacin anterior.
- </para>
- <sect2 id="importing-mail">
- <title>Importacin de los mensajes de correo</title>
- <para> <application>Ximian Evolution</application> puede importar los tipos de archivos siguientes:
- <variablelist>
- <varlistentry> <term>VCard o carpetas virtuales (.vcf, gcrd):</term>
- <listitem>
- <para> El formato de libreta utilizado por los programas GNOME, KDE as como numerosas aplicaciones de administracin de contactos. Ser necesario poder exportar a formato VCard la libreta de direcciones de su otra aplicacin.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>iCalendar (.ics):</term>
- <listitem>
- <para> Un formato utilizado para almacenar archivos de calendario. iCalendar es el programa utilizado por equipos de bolsillo PalmOS, as como Ximian <application>Evolution</application>, y Microsoft <application>Outlook</application>.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Microsoft Outlook Express 4 (.mbx):</term>
- <listitem>
- <para> El formato de archivos de Microsoft Outlook Express 4. Para otras versiones de Microsoft Outlook y Outlook Express, vea la solucin descrita en la nota siguiente.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>MBox (mbox):</term>
- <listitem>
- <para> El formato de buzn de correo utilizado por los programas Mozilla, Netscape, Ximian Evolution, Eudora y muchos otros clientes de correo electrnico.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- <para> Para importar sus mensajes existentes:
- <orderedlist numeration="arabic">
- <listitem>
- <para> Haga clic en <menuchoice><guimenu>Archivo</guimenu><guimenuitem>Importar</guimenuitem></menuchoice>.
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en <guibutton>Siguiente</guibutton> tras leer la pantalla de bienvenida.
- </para>
- </listitem>
- <listitem>
- <para> Seleccione <guibutton>Importar un nico archivo</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para> Busque el archivo que quiere importar en <application>Evolution</application>.
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en <guibutton>Importar</guibutton>
- </para>
- </listitem>
- </orderedlist>
- </para>
- </sect2>
- <sect2 id="importing-preferences">
- <title>Importacin de las preferencias</title>
- <para> <application>Evolution</application> es capaz de importar sus mensajes, contactos y otra informacin existente desde otras aplicaciones, y facilitarle de este modo su transicin a <application>Evolution</application>.
- </para>
- <para> Para importar su informacin existente:
- <orderedlist numeration="arabic">
- <listitem>
- <para> Haga clic en <menuchoice><guimenu>Archivo</guimenu><guimenuitem>Importar</guimenuitem></menuchoice>.
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en <guibutton>Siguiente</guibutton> tras leer la pantalla de bienvenida.
- </para>
- </listitem>
- <listitem>
- <para> Seleccione <guibutton>Importar datos y configuracin de programas antiguos</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para> La columna ms a la izquierda muestra la aplicacin donde se encuentra la informacin que desea importar. Seleccione ahora las casillas de cada componente para importar las distintas propiedades de cada aplicacin.
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en <guibutton>Siguiente</guibutton>
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en <guibutton>Importar</guibutton>
- </para>
- </listitem>
- </orderedlist>
- </para>
-
- <para>
- <note>
- <title>Usuarios de Microsoft Outlook y Outlook Express</title>
- <para> Los programas Microsoft Outlook, y las versiones de Outlook Express posteriores a la versin 4, utilizan formatos propietarios que <application>Ximian Evolution</application> no puede leer ni importar. En el caso de los contactos, debe envirselos por correo a si mismo, e importarlos por este procedimiento. En el caso de los mensajes, existe una solucin ms sencilla:
- <orderedlist numeration="arabic">
-
- <listitem>
- <para> Desde Windows, importe los archivos en el cliente Mozilla Mail (o en otro cliente de correo que utilice el formato mbox estndar, como Netscape o Eudora).
- </para>
- </listitem>
-
- <listitem>
- <para> Copie los archivos al sistema o a la particin que utiliza para <application>Ximian Evolution</application>.
- </para>
- </listitem>
-
- <listitem>
- <para> Utilice la herramienta de importacin del programa <application>Ximian Evolution</application> para importar estos archivos. Encontrar ms explicaciones acerca del porqu y del cmo de este procedimiento en el sitio Web de asistencia de Ximian.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </note>
-
- <note>
- <title>Usuarios de Netscape</title>
- <para> Antes de importar mensajes desde Netscape, asegrese de seleccionar <menuchoice><guimenu>Archivo</guimenu><guimenuitem>Compactar todas las carpetas</guimenuitem></menuchoice>. Si no lo hace, <application>Ximian Evolution</application> tambin importar los mensajes borrados de las carpetas de mensajes eliminados.
- </para>
- </note>
-
- </para>
-
- </sect2>
- </sect1>
- <sect1 id="usage-mail-organize-columns">
- <title>Uso de cabeceras para ordenar los mensajes</title>
- <para> De forma predeterminada, la lista de mensajes incluye columnas con las cabeceras siguientes: el icono de un sobre que indica si el mensaje ha sido ledo o contestado; un signo de admiracin que indica la prioridad y los campos <guilabel>De</guilabel>, <guilabel>Asunto</guilabel> y <guilabel>Fecha</guilabel>. Puede arrastar las columnas para cambiar su orden o para eliminarlas.
-
- Para agregar columnas:
- <orderedlist numeration="arabic">
- <listitem>
- <para> Haga clic con el botn derecho sobre las cabeceras de las columnas
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en <guimenuitem>Aadir una columna</guimenuitem>
- </para>
- </listitem>
- <listitem>
- <para> Arrastre la columna hasta la posicin deseada entre dos cabeceras existentes. Una flecha roja le indica el lugar donde quedar la columna.
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para> Haga clic con el botn derecho en una de las cabeceras de columna para ver una lista de opciones:
- <variablelist>
- <varlistentry> <term><guimenuitem>Orden ascendente</guimenuitem>:</term>
- <listitem><para> Ordena los mensajes del primero al ltimo.
- </para></listitem>
- </varlistentry>
-
- <varlistentry> <term><guimenuitem>Orden descendente</guimenuitem>:</term>
- <listitem><para> Ordena los mensajes del ltimo al primero.
- </para></listitem>
- </varlistentry>
-
- <varlistentry> <term><guimenuitem>Agrupar por campo</guimenuitem>:</term>
- <listitem><para> Agrupa los mensajes en lugar de ordenarlos. Esta operacin coloca los contactos que comparten propiedades idnticas, dentro de un campo especificado, en un grupo independiente, separado fsicamente de los dems.
- </para></listitem>
- </varlistentry>
-
- <varlistentry> <term><guimenuitem>Quitar esta columna</guimenuitem>:</term>
- <listitem>
- <para> Retira la columna de la pantalla. Para retirar columnas, tambin puede arrastrar y soltar la cabecera fuera de la lista.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term><guimenuitem>Selector de campos</guimenuitem>:</term> <listitem><para> Cuando selecciona este elemento, aparece un listado de cabeceras posibles; arrastre simplemente la que desee entre dos cabeceras existentes. Una flecha roja le muestra el lugar donde quedar colocada la columna.
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect1>
-
- <sect1 id="usage-mail-organize-folders">
- <title>Organizacin bsica de carpetas</title>
- <para> <application>Ximian Evolution</application> utiliza carpetas para conservar los mensajes de correo, as como las tarjetas de direcciones y los calendarios. El programa le ofrece al principio unas pocas carpetas, como <guilabel>Entrada</guilabel>, <guilabel>Salida</guilabel> y <guilabel>Borradores</guilabel>, pero puede crear tantas otras como desee. Para crear carpetas nuevas, en el men <guisubmenu>Archivo</guisubmenu>, seleccione <guimenuitem>Nuevo</guimenuitem> y a continuacin <guimenu>Carpeta</guimenu>. <application>Ximian Evolution</application> le solicita el nombre y el tipo de carpeta, y le presenta un rbol de los directorios donde puede elegir la ubicacin de la nueva carpeta.
- </para>
- <para> Cuando hace clic en <guibutton>Aceptar</guibutton>, su nueva carpeta aparece en la <interface>vista de carpetas</interface>. A continuacin, puede arrastrar y colocar mensajes o hacer clic en el icono <guibutton>Mover</guibutton> de la barra de herramientas. Si desea mover varios mensajes a la vez, para seleccionarlos haga clic en cada uno con la tecla <keycap>Ctrl</keycap> presionada, o utilice la tecla <keycap>Mays</keycap> para selecciona un grupo de mensajes contiguos. Si crea un filtro con el <interface>Asistente de filtros</interface>, sus mensajes quedan ordenados automticamente.
- </para>
-
- <warning id="imap-subfolders">
- <title>Subcarpetas en IMAP</title>
- <para> El buzn de entrada de la mayora de los servidores IMAP no puede contener a la vez subcarpetas y mensajes. Cuando crea carpetas adicionales en su servidor de correo IMAP, debe hacerlas partir de la raz del rbol de carpetas de cuentas IMAP, y no desde el buzn de entrada. Si crea subcarpetas en el buzn de entrada, dejar de poder leer mensajes que existen en esta carpeta, hasta que las mueva hacia otro lugar.
- </para> </warning>
-
- </sect1>
-
- <sect1 id="usage-mail-organize-search">
- <title>Bsqueda de mensajes</title>
- <para> La mayora de los clientes de correo son capaces de realizar bsquedas en los mensajes, pero <application>Ximian Evolution</application> lo hace an ms rpido. Puede realizar bsquedas slo en el asunto, slo en el cuerpo del mensaje, o hacerlo en el asunto y el cuerpo a la vez.
- </para>
- <para> Para iniciar la bsqueda, escriba una palabra o una frase en el rea de texto bajo la barra de herramientas, y seleccione un opcin de bsqueda:
- <variablelist>
- <varlistentry> <term><guilabel>El cuerpo o el asunto contiene</guilabel>:</term>
- <listitem>
- <para> Esta opcin busca en el asunto y en el cuerpo de los mensajes la palabra o frase especificada en el campo de bsqueda.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term> <guilabel>El cuerpo contiene</guilabel>:</term>
- <listitem>
- <para> La bsqueda se realiza nicamente en el texto del mensaje, no en el asunto.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term><guilabel>El asunto contiene:</guilabel></term>
- <listitem>
- <para> Esta opcin mostrar los mensajes cuya lnea asunto incluye el texto buscado. La bsqueda no se realiza en el cuerpo del mensaje.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term><guilabel>El cuerpo no contiene:</guilabel></term>
- <listitem>
- <para> Encuentra todos los mensajes que no incluyen el texto buscado en el cuerpo del mensaje. Tambin mostrar los mensajes en los que el texto buscado aparece en la lnea del asunto, cuando no en el cuerpo del mensaje.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term><guilabel>El asunto no contiene:</guilabel></term>
- <listitem>
- <para> Encuentra todos los mensajes cuyo asunto no contiene el texto buscado.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-
- Tras escribir la frase buscada, presione <keycap>Intro</keycap>. <application>Ximian Evolution</application> le muestra los resultados de la bsqueda en la lista de mensajes.
- </para>
-
- <para> Si piensa volver a repetir la bsqueda, puede conservarla en una carpeta virtual: para ello, seleccione <guilabel>Guardar bsqueda como carpeta virtual</guilabel>.
- </para>
-
- <para> Cuando no necesite buscar ms, para mostrar de nuevo todos los mensajes, elija <guimenuitem>Mostrar todos</guimenuitem> en la lista desplegable <guilabel>Bsqueda</guilabel>. Si le gusta hacer de listo, ponga simplemente un espacio en blanco: como todos los mensajes incluyen al menos un espacio en blanco, comprobar que todos aparecen en la carpeta.
- </para>
-
- <para> Si prefiere realizar una bsqueda ms compleja, abra el cuadro de dilogo de bsqueda avanzada: para ello, seleccione <guilabel>Avanzado...</guilabel> en la lista desplegable <guilabel>Bsqueda</guilabel>. A continuacin, defina su criterios de bsqueda (cada uno con las mismas opciones que las que ya vimos en la barra de bsqueda normal), y especifique si desea que los mensajes encontrados coincidan con todos, o slo con uno de los criterios. Haga clic en <guibutton>Buscar</guibutton> para buscar estos mensajes.
- </para>
-
- <para> ste es un procedimiento similar al que le permite ordenar mensajes mediante filtros y carpetas virtuales, que describiremos en secciones siguientes.
- </para>
-
- </sect1>
-
- <sect1 id="usage-mail-organize-filters">
- <title>Creacin de reglas para organizar automticamente el correo</title>
- <para> Los filtros trabajan de forma muy parecida a la del departamento de correo de una organizacin de gran tamao. Su cometido es el de empaquetar, ordenar y distribuir el correo en varias carpetas. Adems, es posible aplicar sobre un mismo mensaje filtros mltiples, asociados a acciones mltiples, para manipularlo de numerosas formas. Por ejemplo, sus filtros pueden crear copias de un mismo mensaje en mltiples carpetas; pueden tambin conservar o incluso mandar una copia a otra persona, y todo de forma rpida. Por supuesto, estas operaciones son tambin ms rpidas y flexibles que una persona real colocada ante un montn de sobres.
- </para>
-
-
- <tip id="easy-filter">
- <title>Creacin rpida de filtros</title>
- <para> Existe un procedimiento rpido y sencillo para crear filtros o carpetas virtuales. En la lista de mensajes, haga clic con el botn derecho en el mensaje deseado y en el submen <guimenuitem>Crear una regla con el mensaje</guimenuitem> seleccione una de las opciones disponibles.
- </para> </tip>
-
- <sect2 id="usage-mail-org-filters-new">
- <title>Creacin de filtros</title>
- <para> Para crear un nuevo filtro:
- <orderedlist numeration="arabic">
- <listitem>
- <para> Seleccione <menuchoice> <guimenu>Herramientas</guimenu> <guimenuitem>Filtros</guimenuitem> </menuchoice>
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en <guibutton>Aadir</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para> Escriba el nombre de filtro en el campo <guilabel>Nombre de la regla</guilabel>. Para cada criterio, seleccione en primer lugar las partes de los mensajes que desea examinar con el filtro:
-
- <itemizedlist>
- <listitem><para> Remitente - La direccin del remitente.
- </para></listitem>
-
-
- <listitem><para> Destinatarios - Los destinatarios del mensaje.
- </para></listitem>
-
- <listitem><para> Asunto - La lnea asunto del mensaje.
- </para></listitem>
-
- <listitem><para> Cabecera especfica - El filtro puede examinar cualquier cabecera deseada, por muy oscura o personalizada que sea. Escriba el nombre de la cabecera en el primer cuadro de texto, y el texto buscado en el segundo.
-
-
- <note id="multiple-repeated-headers">
- <title>Cabeceras repetidas</title>
- <para> Si en un mensaje aparece ms de una vez la misma cabecera, Evolution slo se fija en la primera, aunque en la segunda el contenido sea diferente. Por ejemplo, si un mensaje declara la cabecera Resent-From: con engineering@rupertcorp.com y a continuacin la redefine como marketing@rupertcorp.com, Evolution aplicar el filtro como si la segunda declaracin no apareciera. Para filtrar mensajes que utilizan varias cabeceras varias veces, utilice una expresin regular.
- </para>
- </note>
-
- </para></listitem>
-
- <listitem><para> Cuerpo del mensaje - Busca en el texto efectivo del mensaje.
- </para></listitem>
-
- <listitem>
- <para> Expresin - Slo para programadores: busca un mensaje que corresponda a una expresin escrita en lenguaje Scheme, utilizado para definir filtros en <application>Ximian Evolution</application>.
- </para>
-
-<para>
-
- <note id="lots-of-filters">
- <title>Qu ocurre si varios filtros coinciden con un mismo mensaje?</title>
- <para> Cuando varios filtros coinciden con un mismo mensaje, stos se aplican en orden, excepto cuando uno de los filtros contiene la accin <guibutton>Parar el proceso</guibutton>. Si esta accin aparece en un filtro, los dems filtros no afectarn una segunda vez a un mismo mensaje.
- </para>
- </note>
-</para>
- </listitem>
-
-
-
- <listitem><para> Fecha de envo - Filtra los mensajes en funcin de la fecha de envo: en primer lugar, defina las condiciones que desea ver cumplidas con un mensaje: <guilabel>antes</guilabel> de una hora determinada, <guilabel>despus de</guilabel> de ella, etc. A continuacin, especifique la fecha y hora. La fecha y hora del mensaje se compara con la hora del sistema al ejecutarse el filtro, o con una hora y fecha especfica elegida en el calendario. Es incluso posible buscar mensajes dentro de un intervalo de tiempo relativo al filtro, por ejemplo, para buscar mensajes dentro de los dos ltimos das.
- </para></listitem>
-
- <listitem><para> Fecha de recepcin - Funciona del mismo modo que la opcin <guilabel>Fecha de envo</guilabel>, excepto que compara la fecha y hora de recepcin del mensaje con las fechas especificadas.
- </para></listitem>
-
- <listitem><para> Puntuacin - Los mensajes utilizan de un rango de prioridades entre -3 (mnima importancia) y 3 (mxima importancia). Unos filtros pueden establecer la prioridad de los mensajes recibidos, mientras otros se aplican nicamente a aquellos mensajes con una prioridad determinada.
- </para></listitem>
-
- <listitem>
- <para> Tamao (Kb) - Ordena los mensajes en funcin de su tamao en kilobytes.
- </para>
- </listitem>
-
- <listitem>
- <para> Estado - Ejecuta un filtro en funcin del estado del mensaje, por ejemplo Nuevo.
- </para>
- </listitem>
-
- <listitem>
- <para> Adjuntos - Crea un filtro en funcin de si el mensaje contiene un adjunto.
- </para>
- </listitem>
-
- <listitem>
- <para> Lista de correo - Aplica un filtro en funcin de la lista de correo de donde proviene el mensaje.
- </para>
- <note>
- <title>Cmo funcionan los filtros sobre listas de correo?</title>
- <para> Un filtro sobre listas de correo busca en realidad una cabecera especfica llamada <computeroutput>X-BeenThere</computeroutput>, utilizada para identificar las listas de correo, u otros redistribuidores de correo.
- </para>
- </note>
- </listitem>
-
- <listitem>
- <para> Coincide con expresin regular - Si sabe cmo construir una expresin
- <glossterm
- linkend="regular-expression">regex</glossterm> (del ingls regular expression), aqu tiene la ocasin de demostrar sus conocimientos.
- </para>
- </listitem>
-
- <listitem>
- <para> Cuenta de origen - Aplica un filtro en funcin del servidor de donde provienen los mensajes. Puede escribir, o seleccionar la direccin URL en la lista desplegable. Esta caracterstica slo tiene inters cuando utiliza ms de un origen de correo.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- <listitem>
- <para> Seleccione el criterio de la condicin. Si desea utilizar mltiples criterios haga clic en <guibutton>Aadir criterio</guibutton> y repita el paso anterior.
- </para>
- </listitem>
- <listitem>
- <para> Seleccione la acciones del filtro en la seccin <guilabel>Entonces</guilabel>. Puede seleccionar cualquiera las opciones siguientes.
- <itemizedlist>
- <listitem><para> Mover a la carpeta - Al seleccionar este elemento, <application>Ximian Evolution</application> colocar los mensajes en la carpeta especificada. Haga clic en el botn <guibutton>&lt;pulse aqu para seleccionar una carpeta&gt;</guibutton>.
- </para></listitem>
-
- <listitem><para> Copiar a la carpeta - Al seleccionar este elemento, <application>Ximian Evolution</application> colocar los mensajes en la carpeta especificada. Haga clic en el botn <guibutton>&lt;pulse aqu para seleccionar una carpeta&gt;</guibutton>.
- </para></listitem>
-
- <listitem><para> Reenviar a la direccin - Seleccione esta opcin y escriba la direccin del destinatario que recibir una copia del mensaje.
- </para></listitem>
-
- <listitem><para> Borrar - Marca el mensaje para borrarlo. Sigue siendo posible recuperar el mensaje de nuevo, al menos hasta que seleccione <guimenuitem>Purgar</guimenuitem> el correo.
- </para></listitem>
-
- <listitem><para> Parar el proceso - Especifique si desea que todos los dems filtros pasen por alto este mensaje, porque con las acciones definidas es suficiente.
- </para></listitem>
-
- <listitem><para> Asignar color - Seleccione este elemento para que <application>Ximian Evolution</application> resalte el mensaje con el color especificado.
- </para></listitem>
-
- <listitem><para> Asignar puntuacin - Por ejemplo, puede asignar una prioridad mayor a todos los mensajes que contengan en algn lugar del cuerpo la palabra importante. En un filtro posterior, podr entonces reordenar los mensajes en funcin de su valor de prioridad.
- </para></listitem>
- </itemizedlist>
- </para>
- </listitem>
- <listitem>
- <para> Poner estado - Si desea agregar mltiples acciones al filtro, haga clic en <guibutton>Aadir accin</guibutton> y repita el paso anterior.
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en <guibutton>Aceptar</guibutton>.
- </para>
- </listitem>
- </orderedlist>
- </para>
-
- <note id="when-filters-go-wrong">
- <title>Cundo se aplican los filtros?</title>
- <para> Si utiliza el protocolo POP para transferir el correo desde su servidor hacia su equipo local, los filtros se aplican sobre los mensajes entrantes cada vez que comprueba la presencia de correo nuevo.
- </para>
- <para> Si almacena su correo en el servidor y utiliza el protocolo IMAP para comprobarlos, los filtros intervienen cada vez que abre el buzn de entrada. En algunos casos, cierto nmero de mensajes sin leer aparecen en el buzn de entrada; cuando hace clic en el buzn de entrada, los filtros se aplican y a continuacin los mensajes se mueven hacia otro lugar.
- </para>
- <para> Si utiliza la herramienta Ximian Connector para almacenar su correo en un servidor Exchange, los filtros se aplican slo cuando abre el buzn de entrada y selecciona <menuchoice><guimenu>Acciones</guimenu><guimenuitem>Aplicar filtros</guimenuitem></menuchoice>, o presiona la combinacin de teclas <keycombo><keycap>Ctrl</keycap><keycap>Y</keycap></keycombo>
- </para>
- </note>
- <example id="filter-example">
- <title>Utilizacin de un filtro para evitar el correo basura</title>
- <para> Un buen indicador de spam o envos masivos (en ingls bulk) suele ser la presencia de un encabezado <computeroutput>Precedence: Bulk</computeroutput> en algn punto del mensaje. Por supuesto, no todos lo envos masivos son spam, y existen mensajes aceptables (como las listas de correo a las que se suscribe, por ejemplo) que tambin se califican como bulk. Sin embargo, si opta por filtrar dicha cabecera, podr interceptar un gran nmero de mensajes que no desea recibir.
- </para>
-
-
- <para> Para interceptar y marcar automticamente estos mensajes para su eliminacin, siga los pasos siguientes:
- <orderedlist>
-
- <listitem><para> Seleccione <menuchoice><guimenu>Herramientas</guimenu><guimenuitem>Filtros</guimenuitem></menuchoice>.
- </para></listitem>
-
- <listitem><para> Haga clic en <guibutton>Nuevo</guibutton>.
- </para></listitem>
-
- <listitem><para> Defina la primera parte del criterio para buscar una <guilabel>Cabecera especfica</guilabel>.
- </para></listitem>
-
- <listitem><para> Escriba <userinput>Precedence</userinput> como nombre de la cabecera.
- </para></listitem>
-
- <listitem><para> Seleccione la opcin <guilabel>contiene</guilabel> en la segunda lista desplegable.
- </para></listitem>
-
- <listitem><para> Escriba <userinput>Bulk</userinput> como contenido buscado. Ahora est trabajando con todos los mensajes que contienen la palabra Bulk dentro de la cabecera Precedence.
- </para></listitem>
-
- <listitem><para> Para aplicar acciones, seleccione Mover a la carpeta y elija la carpeta donde desea colocar el correo encontrado.
- </para></listitem>
-
- <listitem><para> Si lo desea, agregue otra accin, y elija <guilabel>Borrar</guilabel>.
- </para></listitem>
-
- <listitem><para> Haga clic en Aceptar. Ha terminado.
- </para></listitem>
- </orderedlist>
- </para>
- </example>
- </sect2>
-
-
-
- <sect2 id="filters-edit">
- <title>Edicin de filtros</title>
- <para> Para modificar un filtro:
- <orderedlist numeration="arabic">
- <listitem>
- <para> Seleccione <menuchoice> <guimenu>Herramientas</guimenu> <guimenuitem>Filtros</guimenuitem> </menuchoice>
- </para>
- </listitem>
- <listitem>
- <para> Seleccione el filtro dentro de la seccin <guilabel>Reglas de filtrado</guilabel> y haga clic en <guibutton>Modificar</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para> Modifique los parmetros deseados.
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en <guibutton>Aceptar</guibutton> en la ventana del editor de filtros.
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en <guibutton>Aceptar</guibutton> en la ventana del administrador de filtros.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </sect2>
-
- <sect2 id="filters-deleting">
- <title>Eliminacin de filtros</title>
- <para> Para eliminar un filtro:
- <orderedlist numeration="arabic">
- <listitem>
- <para> Seleccione <menuchoice> <guimenu>Herramientas</guimenu> <guimenu>Filtros</guimenu> </menuchoice>
- </para>
- </listitem>
- <listitem>
- <para> Seleccione el filtro y haga clic en <guibutton>Borrar</guibutton>.
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para>
- <note>
- <title>Cambio de nombres de carpetas y de filtros</title>
- <para>
- <itemizedlist>
- <listitem>
- <para> El correo entrante que los filtros no desplazan hacia otro sitio permanecen en la carpeta de entrada; asimismo, el correo saliente no desplazado acaba en la carpeta de correo enviado. Debe por tanto asegurarse de cambiar los filtros asociados.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </note>
- </para>
- </sect2>
- </sect1>
-
- <sect1 id="usage-mail-organize-vfolders">
- <title>Organizacin avanzada con carpetas virtuales</title>
- <para> Si los filtros no le resultan lo suficientemente flexibles, o si se encuentra ejecutando la misma bsqueda una y otra vez, considere la solucin de las carpetas virtuales. Las carpetas virtuales (o vFolders), son una solucin avanzada de <application>Ximian Evolution</application> para consultar los mensajes de correo. Las carpetas virtuales ayudan a controlar la situacin cuando recibe una gran cantidad de correo, o cuando olvida con frecuencia a dnde mueve los mensajes.
- </para>
- <para> Una carpeta virtual es realmente un hbrido de todas las dems herramientas de organizacin: es parecido a una carpeta, opera como una funcin de bsqueda y se configura como un filtro. En otras palabras, mientras una carpeta convencional contiene mensajes reales, una carpeta virtual es una vista de mensajes que pueden estar ubicados en carpetas diferentes. Los mensajes incluidos son identificados al vuelo mediante un conjunto de criterios elegidos de antemano.
- </para>
-
- <para> A medida que recibe o borra los mensajes que cumplen con los criterios de la carpeta virtual, <application>Ximian Evolution</application> los incluye o los borra automticamente de su lista de contenidos. Cuando borra un mensaje, queda eliminado de la carpeta donde existe realmente, as como de cualquier carpeta virtual con la que es posible consultarlo.
- </para>
-
- <para> Imagine un negocio donde se intenta administrar el flujo de mensajes enviados por centenares de distribuidores y clientes; o una universidad con grupos de cursos, profesores, servicios administrativos y estudiantes que se solapan y evolucionan. Cuanto mayor sea el nmero de mensajes que consiga organizar, menos riesgo corre de sufrir el colapso en un sistema de organizacin que no es lo bastante flexible. Las carpetas virtuales contribuyen a mejorar la organizacin porque permiten administrar conjuntos solapados de un modo que resulta imposible de disear con sistemas tradicionales de carpetas y filtros.
- </para>
-
-
- <note id="unmatched-vfolder">
- <title>La carpeta virtual no coincidente</title>
- <para> La carpeta virtual no coincidente es el espejo de todas las dems carpetas virtuales: contiene todos los mensajes que no cumplen los criterios satisfechos por las dems carpetas virtuales.
- </para>
- <para> Si utiliza un sistema de almacenamiento remoto como IMAP o Microsoft Exchange, donde las bsquedas se realizan a travs de carpetas virtuales, la carpeta virtual no coincidente se adapta a su vez y tambin explora las carpetas remotas. Si no crea ninguna carpeta virtual que busque en almacenes remotos, la carpeta virtual No coincidente tampoco los buscar.
- </para>
- </note>
-
-
- <example id="usage-mail-organize-vFolders-ex">
- <title>Carpetas, bsquedas y carpetas virtuales</title>
- <para> Para organizar su correo, Juan define una carpeta virtual para los mensajes enviados por su amiga y compaera de trabajo Ana. Tambin tiene otra para los mensajes que incluyen ximian.com en la direccin, y <application>Ximian Evolution</application> en la lnea del asunto, con el fin de conservar la traza de las personas que trabajan con l en el desarrollo de <application>Evolution</application>. Si Ana le manda un mensaje acerca de cualquier otro tema que <application>Ximian Evolution</application>, ste slo aparece en la carpeta llamada Ana. Cuando Ana le enva un correo acerca de la interfaz de usuario de <application>Evolution</application>, el mensaje aparece tanto en la carpeta virtual Ana, como en la tambin carpeta virtual Debate interno acerca de Evolution.
- </para>
- </example>
-
- <!-- (INSERT SCREENSHOT HERE: vFolders in action) -->
-
- <sect2 id="vfolder-create">
- <title>Creacin de carpetas virtuales</title>
- <para> Para crear una carpeta virtual:
- <orderedlist numeration="arabic">
- <listitem>
- <para> Seleccione <menuchoice> <guimenu>Herramientas</guimenu> <guimenuitem>Editor de carpetas virtuales</guimenuitem> </menuchoice>
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en <guibutton>Aadir</guibutton>
- </para>
- </listitem>
- <listitem>
- <para> Escriba un nombre para la carpeta virtual en el campo <guilabel>Nombre de la regla</guilabel>.
-
- </para>
- </listitem>
- <listitem>
- <para> Seleccione el criterio de bsqueda. Para cada criterio, seleccione en primer lugar qu partes de los mensajes desea examinar durante la bsqueda:
- <itemizedlist>
- <listitem><para> Remitente - La direccin del remitente.
- </para></listitem>
-
-
- <listitem><para> Destinatarios - Los destinatarios del mensaje.
- </para></listitem>
-
- <listitem><para> Asunto - La lnea asunto del mensaje.
- </para></listitem>
-
- <listitem><para> Cabecera especfica - La carpeta virtual puede examinar cualquier cabecera deseada, por muy oscura o personalizada que sea. Escriba el nombre de la cabecera en el primer cuadro de texto, y el texto buscado en el segundo.
- </para></listitem>
-
- <listitem><para> Cuerpo del mensaje - Busca en el texto efectivo del mensaje.
- </para></listitem>
-
- <listitem>
- <para> Expresin - Slo para programadores: busca un mensaje que corresponda a una expresin escrita en lenguaje Scheme, utilizado para definir carpetas virtuales en <application>Ximian Evolution</application>.
- </para>
- </listitem>
-
- <listitem><para> Fecha de envo - Busca mensajes en funcin de la fecha de envo: en primer lugar, defina las condiciones que desea ver cumplidas con un mensaje: <guilabel>antes</guilabel> una hora determinada, <guilabel>despus de</guilabel> de ella, etc. A continuacin, especifique la fecha y hora. La carpeta virtual compara la fecha y hora del mensaje se compara con la hora del sistema al ejecutarse el filtro, o con una hora y fecha especfica elegida en el calendario. Es incluso posible buscar mensajes dentro de un intervalo de tiempo relativo al filtro, por ejemplo, para buscar mensajes dentro de los dos ltimos das.
- </para></listitem>
-
- <listitem><para> Fecha de recepcin - Funciona del mismo modo que la opcin <guilabel>Fecha de envo</guilabel>, excepto que compara la fecha y hora de recepcin del mensaje con las fechas especificadas.
- </para></listitem>
-
- <listitem><para> Puntuacin - Los mensajes utilizan de un rango de prioridades entre -3 (mnima importancia) y 3 (mxima importancia). Unas Carpetas virtuales pueden establecer la prioridad de los mensajes recibidos, mientras otras se aplican nicamente a aquellos mensajes con una prioridad determinada.
- </para></listitem>
-
- <listitem>
- <para> Tamao (Kb) - Ordena los mensajes en funcin de su tamao en kilobytes.
- </para>
- </listitem>
-
- <listitem>
- <para> Estado - Realiza una bsqueda sobre el estado del mensaje, por ejemplo Nuevo.
- </para>
- </listitem>
-
- <listitem>
- <para> Adjuntos - Crea una carpeta virtual en funcin de si el mensaje contiene un adjunto.
- </para>
- </listitem>
-
- <listitem>
- <para> Lista de correo - Busca en funcin de la lista de correo de donde provienen los mensajes.
- </para>
- </listitem>
-
- <listitem>
- <para> Cuenta de origen - Busca mensajes en funcin del servidor de donde provienen. Puede escribir, o seleccionar la direccin URL en la lista desplegable. Esta caracterstica slo tiene inters cuando utiliza ms de un origen de correo.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- <listitem>
- <para> Seleccione las carpetas de origen. Puede seleccionar:
- <itemizedlist>
- <listitem>
- <para> nicamente carpetas especificadas
- <note>
- <para> En este caso, es necesario especificar las carpetas en el campo inferior.
- </para>
- </note>
- </para>
- </listitem>
- <listitem>
- <para> con todas las carpetas locales
- </para>
- </listitem>
- <listitem>
- <para> con todas las carpetas remotas activas
- </para>
- </listitem>
- <listitem>
- <para> Con todas las carpetas locales y remotas activas
- </para>
- </listitem>
- </itemizedlist>
-
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para> Las carpetas remotas se consideran activas mientras est conectado al servidor; debe conectarse al servidor de correo de su carpeta virtual para poder incluir los mensajes de dicho origen.
- </para>
- <para> <figure id="usage-mail-vfolder-fig-createrule">
- <title>Seleccin de una regla de carpeta virtual</title>
- <screenshot> <screeninfo>Creacin de una regla de carpeta virtual</screeninfo> <mediaobject> <imageobject>
- <imagedata fileref="figures/vfolder-createrule-fig" format="PNG"
- srccredit="Aaron Weber"> </imageobject> </mediaobject>
- </screenshot> </figure>
- </para>
- </sect2>
- </sect1>
-</chapter>
-
-
diff --git a/help/es/usage-mail.sgml b/help/es/usage-mail.sgml
deleted file mode 100644
index 7ad36e4eee..0000000000
--- a/help/es/usage-mail.sgml
+++ /dev/null
@@ -1,1173 +0,0 @@
-<!-- $Id: usage-mail.sgml,v 1.3 2003/10/21 18:51:26 ettore Exp $ -->
-<!-- Traduccin: irm 030501 -->
-<!-- Revisin: -->
-
-<chapter id="usage-mail">
- <title>Uso del cliente de correo Evolution</title>
- <para> Este captulo, junto con <xref linkend="usage-mail-organize">, contiene una gua avanzada de las caractersticas del cliente de correo Evolution. Para obtener ms informacin acerca de cmo configurar su cuenta de correo, consulte <xref linkend="config-prefs-mail">.
- </para>
-
- <note>
- <title>Si utiliza el protocolo de correo IMAP</title>
- <para> Si elige el protocolo de correo IMAP durante la configuracin, es necesario suscribirse a las carpetas de correo antes de poder leerlas. Para ms informacin, consulte <xref linkend="usage-mail-subscriptions">.
- </para>
- </note>
-
-
- <sect1 id="usage-mail-getnsend-read">
- <title>Lectura del correo</title>
- <para> Para iniciar el cliente de correo, haga clic en el icono de la <guibutton>carpeta de entrada</guibutton> en la barra de atajos, o seleccione una carpeta de correo en la barra de carpetas. Para leer un mensaje, seleccinelo en la lista de mensajes; si prefiere abrirlo en una ventaja independiente, haga doble-clic en el mensaje, o utilice la combinacin de teclas <keycombo action="simul"> <keycap>Ctrl</keycap> <keycap>O</keycap> </keycombo>.
- </para>
-
- <tip id="spaceandbs">
- <title>Utilizacin del teclado para leer el correo</title>
- <para> Puede presionar la barra espaciadora para desplazarse una pgina hacia adelante mientras lee un mensaje, y la tecla de retroceso para retroceder. Esto le permite acelerar la lectura de su correo.
- </para> </tip>
-
- <sect2 id="usage-mail-listorder">
- <title>Ordenacin de la lista de mensajes</title>
- <para> <application>Evolution</application> le facilita el trabajo, al permitirle ordenar su correo. Para ordenar los mensajes por remitente, asunto o fecha, haga clic en las barras con las etiquetas correspondientes en la parte superior de la lista de mensajes. La direccin de la flecha junto a la etiqueta indica la direccin de ordenacin: si hace clic de nuevo, el resultado es el orden opuesto. Por ejemplo, haga clic una vez en <guilabel>Fecha</guilabel> para ordenar los mensajes por fecha, del ms antiguo al ms reciente. Haga clic de nuevo: <application>Evolution</application> ordena la lista del ms reciente al ms antiguo. Tambin puede hacer clic con el botn derecho en la cabecera del mensaje para ver un conjunto de opciones de ordenacin, as como agregar o borrar columnas de la lista de mensajes. Encontrar instrucciones detallas acerca de cmo personalizar la presentacin de los mensajes en <xref linkend="usage-mail-organize-columns">.
- </para>
-
- <tip id="view-headers">
- <title>Cabeceras de correo electrnico</title>
- <para> Para mostrar las cabeceras completas de los mensajes de correo, seleccione <menuchoice><guimenu>Vista</guimenu><guisubmenu>Pantalla de mensaje</guisubmenu><guimenuitem>Mostrar cabeceras completas</guimenuitem></menuchoice>. Para mostrar absolutamente todas las interioridades, elija <menuchoice><guimenu>Vista</guimenu><guisubmenu>Pantalla de mensaje</guisubmenu><guimenuitem>Mostrar la fuente del mensaje </guimenuitem></menuchoice>.
- </para> </tip>
-
- <para> Tambin puede optar por la vista de mensajes encadenados. Seleccione <menuchoice> <guimenu>Vista</guimenu> <guimenuitem>Lista de mensajes encadenados</guimenuitem> </menuchoice> para activar o desactivar este tipo de vista. Con esta opcin, <application>Evolution</application> agrupa las respuestas de un mensaje con el original y le permite seguir el hilo de la conversacin al pasar de un mensaje a otro.
- </para> <figure>
- <title>Vista de mensajes encadenados</title>
- <screenshot> <screeninfo>Vista de mensajes encadenados</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>Borrado del correo</title>
- <para> Tras leerlo, quizs desee deshacerse de los mensajes recibidos. Para borrar un mensaje:
- <orderedlist numeration="arabic">
- <listitem>
- <para> Haga clic en el mensaje para seleccionarlo
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en Borrar, haga clic con el botn derecho en el mensaje y seleccione <guilabel>Borrar</guilabel>.
- </para>
- <note>
- <title>Por qu sigue a la vista el correo eliminado?</title>
- <para> Cuando hace clic en <guibutton>Borrar</guibutton> o en la papelera, el correo no se elimina fsicamente, sino que queda marcado para su eliminacin posterior. Sus mensajes no se eliminirn fsicamente mientras no purgue la carpeta correspondiente. Una purga de la carpeta es la operacin que permite eliminar los mensajes que quedaron marcados cuando los borr.
- </para>
- <para> Si no le conviene este comportamiento, seleccione <menuchoice><guimenu>Vista</guimenu><guimenuitem>Ocultar mensajes borrados</guimenuitem></menuchoice>. Tras esto, los mensajes borrados slo aparecern en la carpeta <guilabel>Papelera</guilabel>.
- </para>
- </note>
- </listitem>
- <listitem>
- <para> Haga clic en <menuchoice> <guimenu>Acciones</guimenu> <guimenuitem>Purgar</guimenuitem> </menuchoice> o utilice la combinacin de teclas <keycombo action="simul"> <keycap>Ctrl</keycap> <keycap>E</keycap> </keycombo>
- </para>
- </listitem>
- </orderedlist>
- </para>
- <note>
- <title>La papelera es en realidad una carpeta virtual?</title>
- <para> Las papeleras, tanto locales como IMAP, son en efecto carpetas virtuales que muestran todos los mensajes marcados para su eliminacin posterior. Para obtener ms informacin acerca de carpetas virtuales, consulte <xref
- linkend="usage-mail-organize-vfolders">. Cuando vaca la papelera y purga la carpeta correspondiente, el comando <menuchoice> <guimenu>Acciones</guimenu> <guimenuitem>Vaciar papelera</guimenuitem> </menuchoice> tiene el mismo efecto que el de purgar los mensajes borrados de <emphasis>todas</emphasis> las carpetas.
- </para>
- <para> Sin embargo, esto no es as en el caso de los servidores Exchange, donde la papelera se comporta exactamente como en Outlook. Dicho de otro modo, la papelera de un servidor Exchange es una carpeta normal que contiene mensajes reales.
- </para>
- </note>
- </sect2>
- <sect2 id="usage-mail-getnsend-undelete">
- <title>Recuperacin de mensajes borrados</title>
- <para> Para recuperar un mensaje borrado:
- <orderedlist numeration="arabic">
- <listitem>
- <para> Seleccione un mensaje marcado como borrado.
- </para>
- </listitem>
- <listitem>
- <para> Presione la combinacin de teclas <keycombo
- action="simul"><keycap>Ctrl</keycap><keycap>U</keycap> </keycombo>, o elija <menuchoice> <guimenu>Editar</guimenu> <guimenuitem>Recuperar</guimenuitem> </menuchoice>
-
- </para>
- <note>
- <title>Cmo se recuperan exactamente los mensajes?</title>
- <para> La recuperacin de un mensaje marcado como borrado consiste en anular la marca, y retirar el mensaje de la papelera. Sin embargo, los mensajes purgados no pueden recuperarse.
- </para>
- </note>
- </listitem>
- </orderedlist>
- </para>
- </sect2>
- </sect1>
-
- <sect1 id="usage-mail-getnsend-get">
- <title>Comprobacin de correo nuevo</title>
- <para> Ahora que est ms familiarizado con la <interface>carpeta de entrada</interface>, es hora de comprobar la presencia de correo nuevo. Haga clic en <guibutton>Buscar correo</guibutton> en la barra de herramientas para comprobar la presencia de correo. Si an no configur su correo, el <interface>asistente de configuracin</interface> le solicita la informacin necesaria para poder consultar su cuenta de correo.
- </para>
- <para> El asistente presenta varios cuadros de dilogo que le permiten configurar:
- <itemizedlist>
- <listitem>
- <para> su informacin personal
- </para>
- </listitem>
- <listitem>
- <para> el servidor de correo saliente
- </para>
- </listitem>
- <listitem>
- <para> la identificacin de su cuenta de correo.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <para> Para comprobar su correo, haga clic en <guibutton>Comprobar correo</guibutton>. <application>Evolution</application> le solicita su contrasea la primera vez que comprueba su correo, y tambin se la pida mientras no elija almacenara. Indique su contrasea para descargar su correo electrnico.
- </para>
- <note id="badmailsettings">
- <title>Me resulta imposible consultar mi correo?</title>
- <para> Si aparece un mensaje de error, necesita probablemente comprobar su configuracin de red. Para ms informacin acerca de cmo proceder, consulte <xref linkend="config-prefs-mail">, o consulte con el administrador de su sistema.
- </para>
- </note>
-
-
-
- <tip>
- <title>Cuentas de correo compartidas con otros clientes de correo</title>
- <para> Para utilizar el cliente <application>Evolution</application> junto con otro cliente como <application>Mutt</application>, siga los pasos a continuacin:
- <orderedlist numeration="arabic">
- <listitem>
- <para> Descargue su correo con la otra aplicacin de la forma habitual.
- </para>
- </listitem>
- <listitem>
- <para> En <application>Evolution</application> <menuchoice><guimenu>Herramientas</guimenu><guimenuitem>Configuracin del correo</guimenuitem></menuchoice>, seleccione la cuenta de correo que desea compartir. Es posible que quiera crear una entrada nueva slo para esta cuenta de correo.
- </para>
- </listitem>
- <listitem>
- <para> En la ficha <guilabel>Recepcin de correo</guilabel>, seleccione el tipo de archivo de correo utilizado por su otra aplicacin cliente, y especifique la ruta completa del archivo.
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en <guibutton>Aceptar</guibutton>.
- </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>Uso de adjuntos y del formato HTML</title>
- <para> Si alguna persona le enva un <glossterm linkend="attachment">adjunto</glossterm> (un archivo adjunto al mensaje de correo), <application>Evolution</application> presenta el archivo bajo el mensaje con el que est asociado. El texto, as como los formatos HTML y las imgenes incorporadas, se muestran como parte del mensaje, y no al final, como en el caso de un adjunto.
- </para>
-
- <sect3 id="usage-mail-getnsend-get-attach-actions">
- <title>Guardar o abrir adjuntos</title>
- <para> Tras recibir un adjunto, <application>Ximian Evolution</application> facilita la operacin de guardar o abrir el archivo con las aplicaciones apropiadas.
- </para>
- <para> Para guardar un adjunto a disco:
- <orderedlist numeration="arabic">
- <listitem>
- <para> Haga clic en la flecha junto al icono de archivos adjuntos y seleccione <guimenuitem>Guardar en disco</guimenuitem>.
- </para>
- </listitem>
- <listitem>
- <para> Elija la ubicacin y el nombre del archivo.
- </para>
- </listitem>
- <listitem>
- <para> Pulse <guibutton>Aceptar</guibutton>.
- </para>
- </listitem>
- </orderedlist>
- </para>
-
- <para> Para abrir un adjunto con un programa:
- <orderedlist numeration="arabic">
- <listitem>
- <para> Abra el mensaje de correo que contiene el adjunto que desea leer.
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en la flecha junto al icono de archivos adjuntos.
- </para>
- </listitem>
- <listitem>
- <para> Seleccione el programa que desea utilizar. El programa se inicia y abre el documento.
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para>
- </para>
- </sect3>
-
- <sect3 id="usage-mail-getnsend-get-attach-html">
- <title>Imgenes incluidas en mensajes en formato HTML</title>
- <para> Cuando una persona incluye una imagen en el cuerpo de un mensaje en formato HTML (un ejemplo es el mensaje de bienvenida que aparece en la carpeta de entrada cuando inicia <application>Ximian Evolution</application> por primera vez), el cliente <application>Evolution</application> la muestra dentro del mensaje. Para crear mensajes como ste, utilice la herramienta <menuchoice><guimenu>Insertar</guimenu><guimenuitem>Imagen</guimenuitem></menuchoice> del editor de mensajes.
- </para>
-
- <para> Si la imagen no est fsicamente incluida en el mensaje, sino que se trata de un vnculo, por ejemplo, <application>Evolution</application> es capaz de descargar la imagen desde Internet. Sin embargo, <application>Evolution</application> no muestra la imagen mientras no lo solicita expresamente. Esto se debe a que las imgenes almacenadas en equipos remotos pueden llegar a ser lentas de descargar y mostrar en pantalla, y pueden incluso ser utilizada por proveedores de correo basura para detectar quin lee efectivamente sus correos. Al impedir la descarga automtica de las imgenes, se protege de este modo su privacidad.
- </para>
- <para> Si desea descargar las imgenes de un mensaje, seleccione <menuchoice> <guimenu>Vista</guimenu> <guisubmenu>Pantalla de mensaje</guisubmenu> <guimenuitem>Cargar imgenes</guimenuitem> </menuchoice>.
-
- Si desea que <application>Ximian Evolution</application> descargue ms a menudo las imgenes almacenadas en equipos remotos, utilice la ficha <guilabel>Mostrar</guilabel> del cuadro de dilogo <menuchoice> <guimenu>Herramientas</guimenu> <guimenuitem>Configuracin del correo</guimenuitem> </menuchoice>.
- </para>
- <note id="http-proxy">
- <title>Descarga de imgenes de la red a travs de un proxy HTTP</title>
- <para> Si utiliza un proxy HTTP, <application>Evolution</application> debe poder encontrarlo a travs del subsistema <systemitem>gnome-vfs</systemitem> antes de poder descargar imgenes de Internet. Ocurre lo mismo si quiere consultar la informacin meteorolgica y las noticias con la herramienta Resumen. Puede informar al sistema de archivos virtuales GNOME de la presencia de un proxy HTTP de dos maneras:
- <variablelist>
- <varlistentry> <term>Configuracin con Nautilus</term>
- <listitem>
- <para>
- <orderedlist numeration="arabic">
- <listitem>
- <para> Abra una ventana Nautilus
- </para>
- </listitem>
- <listitem>
- <para> Seleccione <menuchoice> <guimenu>Preferencias</guimenu> <guimenuitem>Modificar preferencias</guimenuitem> </menuchoice>.
- </para>
- </listitem>
- <listitem>
- <para> Abra la ficha <guilabel>Navegacin</guilabel>.
- </para>
- </listitem>
- <listitem>
- <para> Active la casilla <guilabel>Utilizar proxy HTTP</guilabel> y escriba la ubicacin del proxy HTTP en el campo <guilabel>Ubicacin</guilabel>.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term>Utilice el comando gconftool para configurarlo</term>
- <listitem>
- <para>
- <orderedlist numeration="arabic">
- <listitem>
- <para> Abra un terminal.
- </para>
- </listitem>
- <listitem>
- <para> Escriba el comando <command> gconftool --type=bool --set /system/gnome-vfs/use-http-proxy "TRUE" </command>
- </para>
- </listitem>
- <listitem>
- <para> Escriba el comando <command> gconftool --type=string --set /system/gnome-vfs/http-proxy-host "mi-proxy-url" </command>
- </para>
- </listitem>
- <listitem>
- <para> Escriba el comando <command> gconftool --type=int --set /system/gnome-vfs/http-proxy-port "8080" </command>
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para> Para obtener ms informacin acerca de la herramienta de lnea de comandos gconftool, consulte la pgina de la orden man acerca de gconftool.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </note>
- </sect3>
- </sect2>
- </sect1>
-
- <sect1 id="usage-mail-getnsend-send">
- <title>Redaccin de nuevos mensajes de correo</title>
- <para> Para empezar a escribir un nuevo mensaje, seleccione <menuchoice> <guimenu>Archivo</guimenu> <guisubmenu>Nuevo</guisubmenu> <guimenuitem> Mensaje de correo</guimenuitem></menuchoice>, o haga clic en <guibutton>Nuevo</guibutton> en la barra de herramientas de la carpeta de entrada. Se abre la ventana <interface>mensaje nuevo</interface>, como muestra la <xref
- linkend="usage-mail-newmsg-fig">.
- </para>
-
-<!-- ==============Figure=================================== --> <figure id="usage-mail-newmsg-fig">
- <title>Ventana de mensaje nuevo</title>
- <screenshot> <screeninfo>Ventana principal de Evolution</screeninfo> <mediaobject><imageobject><imagedata fileref="figures/newmsg" format="png" srccredit="Aaron Weber"> </imageobject></mediaobject>
- </screenshot> </figure>
-<!-- ==============End of Figure=================================== -->
-
- <para> Escriba una direccin en el campo <guilabel>Para:</guilabel>. Si lo desea, escriba el asunto en la lnea <guilabel>Asunto:</guilabel>, y un mensaje en el cuadro inferior de la ventana. Tras esto, haga clic en <guibutton>Enviar</guibutton>.
- </para>
-
- <sect2 id="usage-mail-getnsend-send-delay">
- <title>Envo posterior de un mensaje ya redactado</title>
- <para> <application>Evolution</application> transmite el mensaje inmediatamente, a menos que le ordene lo contrario: para ello, seleccione <menuchoice> <guimenu>Archivo</guimenu> <guimenuitem>Enviar ms tarde</guimenuitem></menuchoice>. Esta operacin deposita su mensaje en espera en la cola de la <guilabel>carpeta de salida</guilabel>. La funcin Enviar ms tarde es especialmente til si se conecta a Internet con un mdem, y paga su conexin por tiempo: puede as mantenerse desconectado hasta que, llegado el momento, se conecta y enva todo su correo de una sola vez. El correo de la carpeta de salida se transmite cuando hace clic en <guibutton>Enviar / Recibir</guibutton> en la ventana principal.
- </para>
- <para> Para obtener informacin acerca de cmo configurar la cola de mensajes y el comportamiento de los filtros, consulte <xref linkend="config-prefs-mail">.
- </para>
-
- <para> Tambin puede optar por guardar los mensajes bajo la forma de borradores, o de archivos de texto. Las opciones de que dispone son las siguientes:
- <itemizedlist>
- <listitem><para> Elija <menuchoice> <guimenu>Archivo</guimenu> <guimenuitem>Guardar borrador</guimenuitem> </menuchoice> para almacenar sus mensajes en la carpeta de borradores, hasta su revisin posterior.
- </para></listitem>
-
- <listitem><para> Si prefiere enviar el mensaje ms tarde, elija <guimenuitem>Enviar ms tarde</guimenuitem>. De esta forma, el mensaje se agrega a la cola y lo podr enviar junto con otros en una misma operacin.
- </para></listitem>
-
- <listitem><para> Si prefiere guardar su mensaje como un archivo de texto, seleccione <guimenuitem>Guardar como</guimenuitem> y elija un nombre de archivo.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </sect2>
-
- <sect2 id="usage-mail-getnsend-offline">
- <title>Trabajo en modo desconectado</title>
- <para> La herramienta de trabajo en modo desconectado ha sido concebida para utilizarla a travs conexiones telefnicas, o para usuarios de ordenadores porttiles que carecen de conexin permanente a la red. Permite conservar en cach los mensajes recibidos, as como redactar y dejar sus propios mensajes en la carpeta de salida mientras se encuentra desconectado de la red, a la espera de poder enviarlos la siguiente vez que se conecta a la red.
- </para>
- <para> Seleccione <menuchoice><guimenu>Archivo</guimenu><guimenuitem>Trabajar desconectado</guimenuitem></menuchoice> para que <application>Ximian Evolution</application> se desconecte de Internet mientras trabaja. Cuando quiera volver a conectar, elija <menuchoice><guimenu>Archivo</guimenu><guimenuitem>Trabajar conectado</guimenuitem></menuchoice>. Tambin puede hacer clic en el icono de conexin en la parte izquierda de la ventana.
- </para>
- <para> Si utiliza el protocolo de correo POP, todos los mensajes estarn disponibles, porque se almacenan en local. Si utiliza el protocolo de correo IMAP o un servidor Exchange, los mensajes se almacenan en remoto, y el modo de acceder a ellos vara ligeramente.
- </para>
- <para> Los mensajes ledos se almacenan en cach local, por tanto, estarn disponibles aunque se encuentre sin conexin. Los mensajes sin leer se descargan y estn disponibles en modo desconectado si la carpeta utilizada est configurada como carpeta desconectada. Para configurar una carpeta desconectada, seleccione <menuchoice><guimenu>Configuracin</guimenu> <guimenuitem>Preferencias</guimenuitem></menuchoice> y haga clic en el icono <guilabel>Carpetas</guilabel>. En la ficha <guilabel>Carpetas desconectadas</guilabel>, active las casillas correspondientes a las carpetas que desea poder utilizar mientras se encuentra en modo desconectado. A continuacin, cuando selecciona <guimenuitem>Ir a modo desconectado</guimenuitem>, Evolution extrae y almacena su contenido para su consulta posterior.
- </para>
- </sect2>
- <sect2 id="usage-mail-getnsend-send-compose">
- <title>Ms acerca de la redaccin de mensajes</title>
- <para> Las secciones siguientes le muestran caractersticas de correo avanzadas de <application>Evolution</application>, como por ejemplo la administracin de listas de destinatarios de gran tamao, de adjuntos y el reenvo de correo.
- </para>
- <sect3 id="usage-mail-getnsend-send-attach">
- <title>Adjuntos</title>
- <para> Para adjuntar un archivo a su mensaje:
- <orderedlist numeration="arabic">
- <listitem>
- <para> Haga clic en el icono de adjuntos en la barra de herramientas del editor
- </para>
- </listitem>
- <listitem>
- <para> Seleccione el archivo que desea adjuntar
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en <guibutton>Aceptar</guibutton>
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para> Tambin puede arrastrar y adjuntar un archivo desde el escritorio hasta la ventana del editor.
- </para>
- <para> Para ocultar los archivos adjuntos al mensaje en la vista, seleccione <menuchoice> <guimenu>Vista</guimenu> <guimenuitem>Ocultar adjuntos</guimenuitem> </menuchoice>; para mostrarlos de nuevo, elija <guimenuitem>Mostrar adjuntos</guimenuitem>.
- </para>
- <para> Se enva Una copia del archivo adjunto junto con el mensaje. Tenga presente que los adjuntos de gran tamao puede tardar un cierto tiempo en descargarse.
- </para>
- </sect3>
-
- <sect3 id="usage-mail-getnsend-send-to-types">
- <title>Especificacin de los destinatarios del mensaje</title>
- <para> <application>Evolution</application>, como la mayora de los clientes de correo, reconoce tres categoras de destinatarios: principal, secundario y oculto (en ingls: blind, camuflado).
- </para>
- <para> La forma ms sencilla para indicar una o varias direcciones de correo electrnico es el campo <guilabel>Para:</guilabel>, donde se indican los destinatarios principales. Para enviar correo a ms personas que a las principales, utilice el campo <guilabel>Cc:</guilabel>.
- </para>
- <para> Si nos atenemos a las explicaciones de los que vivieron en edades primitivas, en las que se utilizaban mquinas de escribir y no existan fotocopiadoras, las siglas Cc provienen de copia carbn. Utilice este campo cuando desea compartir el mensaje que acaba de escribir con terceras personas.
- </para>
- <para> <guilabel>Bcc:</guilabel> es un poco ms complejo. Se utiliza como el campo <guilabel>Cc:</guilabel>, pero las direcciones del campo <guilabel>Bcc:</guilabel> quedan ocultas para los dems destinatarios del mensaje. Utilice este campo para enviar un mensaje a un grupos de numerosas personas, en particular si no se conocen o no conviene que se conozcan por razones de privacidad. Si el campo <guilabel>Bcc:</guilabel> no es visible, haga clic en <menuchoice> <guimenu>Vista</guimenu> <guimenuitem>Campo Bcc</guimenuitem> </menuchoice>.
-
- </para>
-
- <para> Si escribe frecuentemente al mismo grupo de personas, puede crear listas de direcciones en el administrador de contactos: podr enviar un mensaje a todas como si se tratara de una nica direccin. Para obtener informacin acerca de cmo proceder, lea <xref
- linkend="usage-contact-organize-group-list">.
- </para>
-
- <tip id="reply-to-per-mail">
- <title>Configuracin del campo Responder a, en funcin del mensaje</title>
- <para> <application>Evolution</application> ofrece la posibilidad de especificar el campo Responder de un mensaje. Esta configuracin puede modificarse para un mensaje especfico. Para ello:
- <orderedlist numeration="arabic">
- <listitem>
- <para> Abra una ventana del editor
- </para>
- </listitem>
- <listitem>
- <para> Para abrir el campo Responder a, seleccione <menuchoice> <guimenu>Vista</guimenu> <guimenuitem>Responder a</guimenuitem> </menuchoice>
- </para>
- </listitem>
- <listitem>
- <para> Escriba la direccin de contestacin deseada en el nuevo campo.
- </para>
- </listitem>
- </orderedlist>
- </para> </tip>
- </sect3>
-
- <sect3 id="usage-mail-getnsend-send-to">
- <title>Seleccin rpida de destinatarios</title>
- <para> Tambin puede utilizar apodos o partes de direcciones a partir de las tarjetas de visitas que cre en el administrador de contactos; <application>Evolution</application> le presenta una lista desplegable con direcciones de la libreta, que le permiten completar el campo de direccin. Si escribe un nombre o un apodo que coincide con ms de una tarjeta, Evolution abre un cuadro de dilogo para que especifique de qu persona se trata.
-
-<!-- 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> Tambin puede hacer clic en los botones <guibutton>Para:</guibutton>, <guibutton>Cc:</guibutton>, o <guibutton>Bcc:</guibutton> para obtener la lista (posiblemente muy larga) de las direcciones existentes del administrador de contactos. Seleccione las direcciones y haga clic en las flechas para desplazar hacia cada columna las direcciones apropiadas.
- </para>
- <para> Para obtener ms informacin acerca de cmo utilizar el correo junto con el administrador de contactos y el calendario, consulte <xref
- linkend="contact-automation-basic"> y <xref
- linkend="usage-calendar-apts">.
- </para>
- </sect3>
- </sect2>
-
- <sect2 id="usage-mail-getnsend-send-reply">
- <title>Contestacin a mensajes de correo</title>
- <para> Para contestar a un mensaje, haga clic en <guibutton>Responder:</guibutton> cuando est seleccionado, o elija la opcin <guimenuitem>Responder al remitente:</guimenuitem> en el men contextual del mensaje. Se abre el <interface>editor de mensajes</interface>. Los campos <guilabel>Para:</guilabel> y <guilabel>Asunto:</guilabel> ya estn completados, aunque puede modificarlos si lo prefiere. Adems, el texto completo del mensaje anterior aparece insertado dentro del nuevo mensaje. Para indicar que se trata del mensaje anterior, aparece en gris (con la vista en formato HTML) o con el carcter prefijo &gt; delante de cada lnea (en modo de texto sencillo). Suele ser frecuente intercalar la respuesta entre citas del mensaje original, como se muestra en la <xref
- linkend="usage-mail-getnsend-reply-fig">.
-
- <!-- ==============Figure=================================== --> <figure id="usage-mail-getnsend-reply-fig">
- <title>Ventana de respuesta a un mensaje</title>
- <screenshot> <screeninfo>Ventana principal de Evolution</screeninfo> <mediaobject><imageobject><imagedata fileref="figures/replymsg" format="png" srccredit="Aaron Weber"> </imageobject></mediaobject>
- </screenshot> </figure>
-<!-- ==============End of Figure=================================== -->
- </para>
- <para> Si el mensaje recibido iba destinado a varios destinatarios, puede ser apropiado utilizar la funcin <guibutton>Responder a todos</guibutton> en lugar de <guibutton>Responder</guibutton>. Cuando los campos <guilabel>Cc:</guilabel> o <guilabel>Para:</guilabel> incluyen numerosas direcciones, esto permite ahorrar mucho tiempo.
- <example>
- <title>Uso de la caracterstica Responder a todos</title>
- <para> Tras escribir un mensaje para su cliente, Susana hace una copia para Antonio y para una lista interna de compaeros de trabajo. En este contexto, si Antonio hace un comentario y quiere que todos puedan leerlo, utilizar la funcin <guibutton>Responder a todos</guibutton>; en cambio, si slo quiere decirle a Susan que est conforme, utilizar la funcin <guibutton>Responder</guibutton>. Observe que en este ltimo caso, ninguno de los destinatarios del campo <guilabel>Bcc</guilabel> recibir la respuesta de Antonoio, porque la lista de Susana no est compartida por nadie ms.
- </para>
- </example>
- </para>
- <para> Si est suscrito a una lista de correo, y desea enviar su respuesta a la lista en lugar de al remitente, elija <guibutton>Responder a la lista</guibutton> en lugar de las funciones <guibutton>Responder</guibutton> o <guibutton>Responder a todos</guibutton>.
- <note>
- <title>Qu es una lista de correo?</title>
- <para> Las listas de correo son una de las herramientas ms comunes para la colaboracin en grupo a travs de Internet. Funcionan de la forma siguiente: <simplelist> <member> una persona enva un mensaje a una nica direccin, como <email>evolution@ximian.com</email>. </member> <member>Esta direccin pertenece a un programa que distribuye el mensaje a una lista de destinatarios. </member> </simplelist>Dicho programa administrador de correo permite que personas individuales puedan suscribirse o cancelar su suscripcin a la lista cuando quieren, y stas no tienen que preocuparse por almacenar las direcciones de cada uno de los miembros de la lista.
- </para>
- <para> Los servidores de listas de correo tambin permiten a los administradores de red controlar el flujo de mensajes, la lista de suscripciones, e incluso moderar el contenido de las listas de correo.
- </para>
- </note>
- </para>
- </sect2>
-
- <sect2 id="usage-mail-getnsend-send-find">
- <title>Funciones de bsqueda y sustitucin en el editor</title>
- <para> Sin duda ya conoce las funciones de bsqueda y sustitucin existentes en muchos tipos de procesadores de texto; adems, si est familiarizado con el entorno Linux o Unix, probablemente conoce las posibilidades de la funcin <guimenuitem>Buscar regex</guimenuitem>. Si no pertenece al gremio de quienes comparten esta sabidura, le proporcionamos a continuacin una gua rpida de las caractersticas de bsqueda automatizadas que el editor de mensajes pone a su disposicin.
- </para>
- <para>
- <variablelist>
- <varlistentry> <term><guimenuitem>Buscar:</guimenuitem></term>
- <listitem><para> Escriba una palabra o frase y <application>Evolution</application> la encontrar dentro del mensaje.
- </para></listitem>
- </varlistentry>
-
- <varlistentry> <term><guimenuitem>Buscar regex:</guimenuitem></term>
- <listitem>
- <para> Busca una <glossterm linkend="regular-expression">expresin regular</glossterm>, (tambin llamada regex) en la ventana del editor.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term><guimenuitem>Repetir buscar:</guimenuitem></term>
- <listitem><para> Seleccione esta opcin para repetir la bsqueda anterior que realiz.
- </para></listitem>
- </varlistentry>
-
- <varlistentry> <term><guimenuitem>Reemplazar:</guimenuitem></term>
- <listitem><para> Busca y reemplaza una palabra o frase con otra.
- </para></listitem>
- </varlistentry>
-
- </variablelist>
- </para>
-
- <para> Con todas estas opciones del men, puede optar por <guilabel>Buscar hacia atrs</guilabel> en el documento, a partir de la posicin del cursor. En todos los casos, excepto para expresiones regulares (que no lo necesitan), la casilla <guilabel>Sensible a maysculas</guilabel> permite especificar el tipo de coincidencia utilizada.
- </para>
- </sect2>
-
- <sect2 id="usage-mail-getnsend-send-html">
- <title>Mejora del correo con formato HTML</title>
- <para> Normalmente, no puede aplicar estilos de texto ni insertar imgenes en sus mensajes. Para evitar que el correo electrnico aparente ser algo fro y poco comunicativo, las personas suelen recurrir en exceso a los signos de admiracin para transmitir sus emociones. Sin embargo, la mayora de los clientes de correo recientes son capaces de mostrar imgenes y estilos de texto, as como justificar y aplicar formato a los prrafos. Esto se consigue utilizando el formato <glossterm
- linkend="html">HTML</glossterm>, exactamente como para las pginas Web.
- </para>
- <note>
- <title>El formato HTML no es la configuracin predeterminada</title>
- <para> Muchas personas no utilizan clientes compatibles con el formato HTML, o prefieren no recibir estos mensajes mejorados, porque son ms lentos de descargar y mostrar. Dado que muchas personas prefieren no recibir mensajes en formato HTML, <application>Evolution</application> utiliza texto sencillo a menos que lo solicite de forma explcita.
- </para>
- </note>
-
- <para> Para modificar el formato de un mensaje de correo de texto sencillo a formato HTML, seleccione <menuchoice> <guimenu>Formato</guimenu> <guimenuitem> HTML</guimenuitem></menuchoice>.
- </para>
- <para> Para enviar de forma predeterminada todos los mensajes en formato HTML, establezca sus preferencias de formato en el cuadro de dilogo de configuracin del correo. Para obtener ms informacin, consulte <xref linkend="config-prefs-mail-composer">.
- </para>
- <para> Las herramientas de formato HTML aparecen en la la barra de herramientas por encima del rea donde redacta su mensaje, as como en los mens <guimenu>Insertar</guimenu> y <guimenu>Formato</guimenu>.
- </para>
- <para> Los iconos de la barra de herramientas se describen con <glossterm
- linkend="tooltip">pistas</glossterm>, que aparecen cuando los sobrevuela. Los iconos se dividen en cuatro categoras:
- <variablelist>
- <varlistentry> <term>Ttulos y listas:</term>
- <listitem>
- <para> En el extremo izquierdo de la barra de herramientas, dispone del estilo <guilabel>Normal</guilabel> para el formato de texto predeterminado, y de los estilos <guilabel>Ttulo 1</guilabel> a <guilabel>Ttulo 6</guilabel> para tamaos que van del ttulo ms grande (1) al ms pequeo (6). Otros estilos son <guilabel>el formato PRE</guilabel>, que emplean la etiqueta HTML correspondiente para bloques de texto con formato predeterminado, y tres tipos de vietas para mejorar la organizacin.
- </para> <tip>
- <title>Uso de vietas para mejorar la presentacin</title>
- <para> Con frecuencia se utilizan asteriscos en lugar de vietas reales. Adems de que los asteriscos tienen un buen efecto, <application>Evolution</application> se encarga del ajuste de lneas en el texto, para mejorar el resultado de la presentacin.
- </para> </tip>
- </listitem>
- </varlistentry>
- <varlistentry> <term>Estilo de texto:</term>
- <listitem>
- <para> Utilice estos botones para apreciar cmo queda mejor el mensaje. Con texto seleccionado, el estilo slo se aplica a la seleccin. Sin texto seleccionado, el estilo se aplica a todo lo que escriba a continuacin. Los botones son:
- <itemizedlist mark="none">
- <listitem><para>Haga clic en <guibutton>B</guibutton> para negrita</para></listitem>
- <listitem><para>Haga clic en <guibutton>I</guibutton> para cursiva</para></listitem>
- <listitem><para>Haga clic en <guibutton>U</guibutton> para subrayado</para></listitem>
- <listitem><para>Haga clic en <guibutton>S</guibutton> para tachado.</para></listitem>
- </itemizedlist>
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term>Justificacin:</term>
- <listitem>
- <para> A continuacin de los botones de estilo, tres iconos de prrafo les resultarn conocidos a muchos usuarios de procesadores de texto. El botn izquierdo justifica el texto a la izquierda; el del centro, centra el texto; y el de la derecha, lo justifica a la derecha.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Sangras:</term>
- <listitem>
- <para> El icono con la flecha hacia la izquierda reduce la sangra del prrafo, mientras el que apunta a la derecha, aumenta la sangra.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Seleccin del color:</term>
- <listitem>
- <para> En el extremo derecho se encuentran las herramientas de color. El icono de color indica el color de texto activo; para elegir otro color, haga clic en la flecha a su derecha. Con texto seleccionado, el color slo se aplica a la seleccin. Sin texto seleccionado, el color se aplica a todo lo que escriba a continuacin. Para seleccionar un color o una imagen de fondo, haga clic con el botn derecho en el fondo del mensaje y seleccione <guilabel>Pgina</guilabel>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- <para> El botn <guimenu>Insertar</guimenu> le ofrece sugerencias acerca de cmo acicalar su mensaje, para dejarlo a su gusto:
- <variablelist>
- <varlistentry> <term><guimenuitem>Enlace:</guimenuitem></term>
- <listitem>
- <para> Le permite vincular una porcin de texto a un sitio Web. Utilice esta herramienta para agregar hipervnculos en los mensajes HTML. Si no desea crear vnculos de texto, escriba directamente la direccin y <application>Evolution</application> la identificar como un vnculo. Para agregar un vnculo:
- <orderedlist numeration="arabic">
- <listitem>
- <para> Seleccione el texto que desea convertir en hipervnculo.
- </para>
- </listitem>
- <listitem>
- <para> Haga clic con el botn derecho en el texto y seleccione <guibutton>Enlace</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para> Escriba la direccin URL deseada en el campo <guilabel>URL</guilabel>.
- </para>
- </listitem>
- <listitem>
- <para> Pulse <guibutton>Aceptar</guibutton>.
- </para>
- </listitem>
- </orderedlist>
- </para>
- <note>
- <para> Si escribe directamente una direccin Web, tenga presente que debe terminarla con un espacio para que el formato se aplique automticamente.
- </para>
- </note>
- </listitem>
- </varlistentry>
- <varlistentry> <term><guimenuitem>Imagen:</guimenuitem></term>
- <listitem>
- <para> Le permite incluir una imagen al hilo del texto.
- </para>
- <para> Para agregar una imagen al mensaje:
- <orderedlist numeration="arabic">
- <listitem>
- <para> Abra un nuevo mensaje: haga clic en <guibutton>mensaje nuevo</guibutton>
- </para>
- </listitem>
- <listitem>
- <para> Asegrese de que tiene activado el selector de <menuchoice> <guimenu>Formato</guimenu> <guimenuitem>HTML</guimenuitem> </menuchoice>.
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en <guibutton>Insertar imagen</guibutton> en la barra de herramientas, o seleccione <menuchoice> <guimenu>Insertar</guimenu> <guimenuitem>Imagen</guimenuitem> </menuchoice>.
- </para>
- </listitem>
- <listitem>
- <para> Para seleccionar la imagen, haga clic en <guibutton>Explorar</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en <guibutton>Insertar</guibutton> para agregar la imagen.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term><guimenuitem>Regla:</guimenuitem></term>
- <listitem>
- <para> Agrega una lnea horizontal dentro del texto, con el fin de dividirlo en dos secciones.
- </para>
- <para> Para agregar una regla:
- <orderedlist numeration="arabic">
- <listitem>
- <para> Abra un nuevo mensaje: haga clic en <guibutton>mensaje nuevo</guibutton>
- </para>
- </listitem>
- <listitem>
- <para> Asegrese de que tiene activado el selector de <menuchoice> <guimenu>Formato</guimenu> <guimenuitem>HTML</guimenuitem> </menuchoice>.
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en <guibutton>Regla</guibutton> en la <guilabel>Barra de herramientas</guilabel>.
- </para>
- </listitem>
- <listitem>
- <para> Seleccione el tipo de regla. Es posible utilizar una lnea sencilla, en 3D, o de color amarillo con pequeas flores.
- </para>
- </listitem>
- <listitem>
- <para> Seleccione el tamao de la lnea, con un porcentaje sobre el ancho de la ventana de correo.
- </para>
- </listitem>
-
- <listitem>
- <para> Seleccione la alineacin y estilo. En el caso de una lnea sencilla, puede seleccionar su grosor, as como el trazo discontinuo o slido. Para los dems tipos, slo puede elegir la alineacin.
- </para>
- </listitem>
-
- <listitem>
- <para> Haga clic en <guibutton>Insertar</guibutton> para agregar la regla.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term>Tabla:</term>
- <listitem>
- <para> Agrega una tabla dentro del texto, con el fin de dividirlo en dos secciones.
- </para>
- <para> Para agregar una regla:
- <orderedlist numeration="arabic">
- <listitem>
- <para> Abra un nuevo mensaje: haga clic en <guibutton>mensaje nuevo</guibutton>
- </para>
- </listitem>
- <listitem>
- <para> Asegrese de que tiene activado el selector de <menuchoice> <guimenu>Formato</guimenu> <guimenuitem>HTML</guimenuitem> </menuchoice>.
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en <guibutton>Tabla</guibutton> en la <guilabel>Barra de herramientas</guilabel>.
- </para>
- </listitem>
- <listitem>
- <para> Seleccione el <guibutton>patrn</guibutton> deseado. Cada patrn ofrece un aspecto de presentacin ligeramente diferente.
- </para>
- </listitem>
- <listitem>
- <para> Si lo desea, puede modificar las dems opciones, como el nmero de filas y columnas, la distancia entre celdas, y muchos ms.
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en el botn <guibutton>Insertar</guibutton>.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </listitem>
- </varlistentry>
- </variablelist> Para agregar un hipervnculo al mensaje HTML:
- <orderedlist numeration="arabic">
- <listitem>
- <para> Seleccione el texto que desea convertir en hipervnculo.
- </para>
- </listitem>
- <listitem>
- <para> Haga clic con el botn derecho en el texto y seleccione <guimenuitem>Enlace</guimenuitem>
- </para>
- </listitem>
- <listitem>
- <para> Escriba la direccin del vnculo en el campo <guilabel>URL</guilabel>.
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en <guibutton>Aceptar</guibutton>.
- </para>
- </listitem>
- </orderedlist>
- </para>
-
- <para> Para agregar una imagen al mensaje en formato HTML:
- <orderedlist numeration="arabic">
- <listitem>
- <para> Seleccione <menuchoice> <guimenu>Insertar</guimenu> <guimenuitem>Imagen</guimenuitem> </menuchoice>.
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en <guibutton>Explorar</guibutton> para seleccionar la imagen deseada en el mensaje.
- </para>
- </listitem>
-
- <listitem>
- <para> En el lado derecho de la ventana, elija la justificacin, borde y otros atributos de la imagen. Si modifica los atributos de tamao, la imagen se ampla o reduce para ajustarse al tamao elegido.
- </para>
- </listitem>
-
- <listitem>
- <para> Si desea convertir la imagen en un vnculo activo, escriba la direccin URL en la ficha <guilabel>Enlace</guilabel> de la ventana.
- </para>
- </listitem>
-
- <listitem>
- <para> Cuando termine, haga clic en <guibutton>Insertar</guibutton> par agregar la imagen en el mensaje.
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para> Puede insertar una imagen en el fondo del mensaje: haga clic con el botn derecho en el fondo del mensaje y seleccione <guimenuitem>Pgina</guimenuitem>. Este dilogo tambin le permite seleccionar el color de fondo y establecer otras opciones genricas del mensaje HTML.
- </para>
- <sect3 id="html-templates">
- <title>Patrones HTML</title>
- <para> <application>Evolution</application> no slo le permite decorar sus mensajes con texto e imgenes en formato HTML, tambin le ofrece la posibilidad de utilizar patrones prediseados donde incluir todas estas mejoras. Utilcelos para mejorar el atractivo de alguna seccin o para enmarcar una imagen.
- </para>
- <para> Para incluir un patrn dentro del mensaje en formato HTML:
- <orderedlist numeration="arabic">
- <listitem>
- <para> Cree un nuevo mensaje: haga clic en <guibutton>mensaje nuevo</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para> Asegrese de activar el selector de <menuchoice> <guimenu>Formato </guimenu> <guimenuitem>HTML </guimenuitem> </menuchoice>.
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en el botn <guibutton>Patrn HTML</guibutton> de la <guilabel>Barra de herramientas</guilabel>, o seleccione <menuchoice> <guimenu> Insertar </guimenu> <guimenuitem>Patrn HTML </guimenuitem> </menuchoice>
- </para>
- </listitem>
- <listitem>
- <para> Seleccione el tipo de patrn en el cuadro de seleccin <guilabel>Patrn HTML</guilabel>. Las opciones disponibles son <guilabel>Nota</guilabel> e <guilabel>Marco de imagen</guilabel>.
- </para>
- </listitem>
- <listitem>
- <para> Establezca el tamao y justificacin del patrn.
- </para>
- </listitem>
-
- <listitem>
- <para> Haga clic en <guibutton>Insertar</guibutton> para incluirlo en la posicin del cursor.
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en el texto del patrn, y escriba el texto deseado.
- </para>
- <para> Si seleccion un marco de imagen, haga clic con el botn derecho en la imagen y seleccione <guimenuitem>Imagen</guimenuitem>, a continuacin seleccione la imagen que desea colocar en el marco.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </sect3>
- <sect3 id="composer-tables">
- <title>Uso de tablas en mensajes</title>
- <para> <application>Evolution</application> le permite incluir tablas en los mensajes en formato HTML con el fin de organizar su redaccin. Estas tablas son versiones simplificadas de las que pueden ofrecer hojas de clculo como <application>Gnumeric</application>.
- </para>
- <para> Para incluir una tabla en el mensaje:
- <orderedlist numeration="arabic">
- <listitem>
- <para> Cree un nuevo mensaje: haga clic en <guibutton>mensaje nuevo</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para> Asegrese de activar el selector de <menuchoice> <guimenu>Formato </guimenu> <guimenuitem>HTML </guimenuitem> </menuchoice>.
- </para>
- </listitem>
-
- <listitem>
- <para> Seleccione <menuchoice> <guimenu> Insertar </guimenu> <guimenuitem> Tabla </guimenuitem> </menuchoice> o haga clic en <guiicon>Tabla</guiicon> en la barra de herramientas.
- </para>
- </listitem>
-
- <listitem>
- <para> Seleccione el patrn, o estilo, deseado para la tabla.
- </para>
- </listitem>
- <listitem>
- <para> Defina el nmero de filas y columnas deseado.
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en el botn <guibutton>Insertar</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en una celda y escriba texto en la tabla.
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para> Tambin puede modificar una tabla despus de creada. Haga clic con el botn derecho sobre ella y seleccione <guimenuitem>Tabla</guimenuitem> para abrir de nuevo la ventana del editor de tablas. Tambin puede utilizar las opciones de mens <guimenu>Borrar tabla</guimenu> e <guimenu>Insertar tabla</guimenu>.
- </para>
-
- <para> <tip id="table-tip">
- <title>Eliminacin de una tabla completa</title>
- <para> Para eliminar toda la tabla, haga clic con el botn derecho en una tabla u otro objeto HTML del mensaje y seleccione <menuchoice> <guimenu>Borra tabla</guimenu> <guimenuitem>Tabla</guimenuitem> </menuchoice>. Los componentes (su firma, un patrn o una imagen) que incluye en un mensaje en formato HMTL, utilizan tablas que este atajo permite eliminar de forma completa y rpida.
- </para> </tip>
- </para>
-
- </sect3>
- </sect2>
-
- <sect2 id="usage-mail-getnsend-fwd">
- <title>Reenvo de correo</title>
- <para> Su oficina de correos le reenva el correo cuando cambia de direccin, y tambin puede reenviar una carta que le llega por error. El botn <guilabel>Reenviar</guilabel> funciona de forma similar. Esta funcin es especialmente til cuando recibe un mensaje que puede interesarle a otra persona. Puede reenviar un mensaje como adjunto a un nuevo mensaje (es el valor predeterminado), o enviarlo <glossterm linkend="inline">incluido</glossterm> dentro del mensaje. El reenvo de adjuntos es preferible si desea volver a enviar el mensaje completo y sin alterar. El reenvo con el mensaje incluido es preferible si slo desea enviar partes del mensaje, o si prefiere intercalar comentarios a secciones separadas del mensaje. Recuerde apuntar el nombre del remitente, y en su caso, si borr o modific contenidos.
- </para>
- <para> Para reenviar el mensaje mientras lo lee, haga clic en <guibutton>Reenviar</guibutton> en la barra de herramientas, o seleccione <menuchoice> <guimenu>Mensaje</guimenu> <guimenuitem>Reenviar</guimenuitem> </menuchoice>. Si prefiere reenviar el mensaje <glossterm linkend="inline">incluido</glossterm> en lugar de adjunto, seleccione <menuchoice> <guimenu>Mensaje</guimenu> <guimenuitem>Reenviar incluido</guimenuitem> </menuchoice> en el men. Elija los destinatarios como lo hara para un mensaje nuevo; el asunto ya aparece, pero puede modificarlo. Escriba sus comentarios al mensaje dentro de <interface>cuadro de edicin</interface> y haga clic en <guibutton>Enviar</guibutton>.
- </para>
- </sect2>
-
- <sect2 id="usage-mail-getnsend-ettiquette">
- <title>Las siete reglas de cortesa</title>
- <para>
-
- <itemizedlist>
-
- <listitem>
- <para> No enve correo basura ni reenve mensajes de cadena. Pase por alto cualquier bulo o leyenda urbana, y asegrese de que el mensaje no incluye varias capas de prefijos (el signo &gt;), que sealan reenvos mltiples de forma descuidada.
- </para>
- </listitem>
-
- <listitem>
- <para> Comience y termine siempre con una frmula de saludo. Diga por favor y gracias, exactamente como lo hara en la vida real. Puede hacer chistes cortos, pero qu tengan gracia!
- </para>
- </listitem>
-
- <listitem>
- <para> ESCRIBIR EN MAYSCULA SIGNIFICA QUE EST HABLANDO A GRITOS! No escriba todo un mensaje con maysculas. Acabar dejando sordo a su lector.
- </para>
- </listitem>
-
- <listitem>
- <para> Pase el corrector y escriba frases completas. De forma predeterminada, a medida que escribe, <application>Evolution</application> presenta una lnea roja por debajo de las palabras que no reconoce.
- </para>
- </listitem>
-
- <listitem>
- <para> No enve mensajes desagradables ni agresivos (en ingls flame, flaming). Si recibe alguno, no conteste.
- </para>
- </listitem>
-
- <listitem>
- <para> Cuando escribe una respuesta o un reenvo, incluya justo la parte del mensaje necesaria para facilitar el contexto: ni demasiado, ni demasiado poco..
- </para>
- </listitem>
-
- <listitem>
- <para> No enve correo basura.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </sect2>
- <sect2 id="fancy-mail">
- <title>Creacin de mensajes de fantasa</title>
- <para> <application>Evolution</application> ofrece muchas posibilidades gracias a las caractersticas del formato HTML. Crear un mensaje que sea a la vez funcional y atractivo a la vista puede ser todo un desafo. Las secciones siguientes incluyen consejos para mejorar la funcionalidad de sus mensajes, al tiempo que ofrecer una presentacin ms atrayente.
- </para>
- <sect3 id="sections-bolded-title">
- <title>Secciones esquematizadas con negrita</title>
- <para> La sangra de secciones es una buena solucin para organizar y reagrupar sus ideas. A continuacin mostramos un ejemplo de sangras con ttulos que facilitan la distribucin de ideas secciones diferentes: <figure>
- <title>Texto con sangra y lneas de ttulo</title>
- <screenshot> <screeninfo></screeninfo> <graphic format="png" fileref="figures/outline" srccredit="Kevin Breit">
- </screenshot> </figure>
- </para>
- <para> Este mensaje no slo es ms atractivo, tambin es ms comunicador. Cada seccin cuenta con dos subsecciones. El ttulo de cada seccin est en negrita, y el contenido que le sigue est sangrado.
- </para>
- <para> Es posible aumentar el tamao de los ttulos de secciones sin necesidad de utilizar negritas. El tamao de Ttulo 4 es frecuentemente el mejor, porque no es excesivamente ancho. Para aplicar el tamao 4, seleccione el texto y presione la combinacin de teclas Ctrl+4. Puede restablecer el tamao normal con la combinacin de teclas Ctrl+0.
- </para>
- </sect3>
- <sect3 id="bulleted-lists">
- <title>Listas con vietas</title>
- <para> Seleccione la opcin <guimenuitem>Lista con vietas</guimenuitem> en la lista de estilos desplegable para que el texto empiece con vietas esfricas. <application>Evolution</application> se encarga del ajuste de lneas y de aplicar sangras. Si prefiere enviar el mensaje en formato de texto sencillo, an es posible escribirlo en formato HTML: <application>Evolution</application> se encargar de convertir las vietas en asteriscos bien construidos, y en formato texto.
- </para>
- </sect3>
- <sect3 id="inline-images">
- <title>Uso de imgenes en los mensajes</title>
- <para> Las imgenes ayudan a las personas a comprender una idea. Puede incluso utilizar un patrn de marco de imagen HTML de <application>Evolution</application>, el cual resulta muy atrayente y le permite disociar la imagen del resto del mensaje mediante un marco y ttulo.
- </para>
- <para> Si desea imgenes, le recomendamos utilizarlas de escasa dimensin. Las imgenes que superan los 400 pixeles no suelen caber dentro de la ventana, y el lector encuentra dificultades en leer el mensaje con la imagen a la vista. En lugar de esto, considere la posibilidad de crear una versin reducida (una miniatura) de la imagen, y de agregar un vnculo hacia la versin de gran tamao, para que sus lectores puedan contemplarla en un navegador, si lo prefieren. <figure>
- <title>Uso de imgenes en un mensaje</title>
- <screenshot> <screeninfo></screeninfo> <graphic format="png" fileref="figures/small_desktop" srccredit="Kevin Breit">
- </screenshot> </figure>
- </para>
- </sect3>
- <sect3 id="color-suggestions">
- <title>Aplicacin de color al texto</title>
- <para> Los colores ayudan a resaltar palabras o frases. Conviene elegirlos con prudencia, porque un color equivocado puede producir un efecto contrario. Algunos colores apropiados seran:
- <itemizedlist>
- <listitem>
- <para> Oliva
- </para>
- </listitem>
- <listitem>
- <para> Prpura mate
- </para>
- </listitem>
- <listitem>
- <para> Rojo oscuro
- </para>
- </listitem>
- </itemizedlist>
- <!-- Include a screenshot --> Observe que estos colores presentan niveles similares de saturacin del color. <!-- Confirm I am using the right word -->
- </para>
- <para> Le deseamos felices mensajes!
- </para>
- </sect3>
- </sect2>
- </sect1>
- <sect1 id="rsvp-stuff">
- <title>Respuestas a invitaciones en mensajes</title>
- <para> Si crea un evento en el componente de calendario, podr enviar invitaciones a la lista de destinatarios con el cliente <application>Ximian Evolution</application>. La tarjeta de invitacin se enva como un adjunto en formato iCal.
- </para>
- <para> Si hace clic en el botn Adjuntar y en <guibutton>Ver incluido</guibutton>, <application>Ximian Evolution</application> muestra la informacin acerca de la reunin y le permite responder de varias maneras. Seleccione la respuesta deseada, y haga clic en <guibutton>Aceptar</guibutton>.
- </para>
- <para> Las opciones de que dispone son las siguientes:
- <variablelist>
- <varlistentry> <term>Aceptar:</term>
- <listitem>
- <para> Seleccione esta entrada si piensa presentarse a la reunin. Cuando hace clic en <guibutton>Aceptar</guibutton>, la reunin queda incluida en el calendario.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Aceptar provisionalmente:</term>
- <listitem>
- <para> Seleccione esta entrada si asistir probablemente. Cuando hace clic en <guibutton>Aceptar</guibutton>, la reunin queda incluida en el calendario, pero slo como tentativa.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Rechazar:</term>
- <listitem>
- <para> Seleccione esta opcin si no podr hacer acto de presencia. La reunin no se incluye en el calendario cuando hace clic en <guibutton>Aceptar</guibutton>, pero si la casilla <guilabel>Confirmacin</guilabel> est activa, su respuesta se enva al remitente.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Confirmacin:</term>
- <listitem>
- <para> Active esta casilla si desea que su respuesta llegue a los organizadores de la reunin.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect1>
-
- <sect1 id="usage-mail-subscriptions">
- <title>Administracin de suscripciones</title>
- <para> Cuando existen carpetas IMAP en el servidor, su apertura y comprobacin requiere tiempo, y es necesario afinar el control que ejerce sobre stas. Por esta razn, <application>Evolution</application> posee un administrador de suscripciones IMAP. Tambin puede seleccionar esta opcin si prefiere que cada carpeta est visible. Sin embargo, si quiere seleccionar unos elementos especficos del buzn, y excluir otros, puede utilizar la herramienta de administracin de suscripciones.
- </para>
- <para> Utilice los pasos siguientes:
- <orderedlist numeration="arabic">
-
- <listitem>
- <para> Seleccione <menuchoice><guimenu>Herramientas</guimenu><guimenuitem>Suscribirse a las carpetas</guimenuitem></menuchoice>.
- </para>
- </listitem>
-
- <listitem>
- <para> Si posee cuentas en varios servidores IMAP, seleccione el servidor desde el que desea administrar sus suscripciones. <application>Evolution</application> muestra la lista de archivos y carpetas disponibles.
- </para>
- </listitem>
-
- <listitem>
- <para> Haga clic en un archivo o carpeta para seleccionarlo. Deber seleccionar al menos la carpeta de <guilabel>entrada</guilabel>. En funcin de la configuracin de su servidor IMAP, la lista de archivos disponibles puede incluir carpetas que no son de correo. Si es el caso, puede ignorarlas.
- </para>
- </listitem>
-
- <listitem>
- <para> Haga clic en <guibutton>Suscribir</guibutton> para agregarla a la lista de suscripciones.
- </para>
- </listitem>
- <listitem>
- <para> Tras suscribirse a las carpetas deseadas, cierre la ventana.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </sect1>
-
- <sect1 id="encryption">
- <title>Cifrado</title>
- <sect2 id="encryption-whatis">
- <title>Qu es el cifrado?</title>
- <para> El cifrado es un antiguo procedimiento que permite conservar informacin a salvo de las miradas de curiosos. <application>Evolution</application> le ayuda a proteger su privacidad con <application>GPG</application>, una implementacin del potente <glossterm linkend="public-key-encryption">cifrado por clave pblica.</glossterm>
- </para>
-
- <note id="pub-priv">
- <title>Clave pblica? Clave privada? Cul es la diferencia?</title>
- <para> GPG utiliza dos claves: una clave pblica y una clave privada. Puede comunicar su clave pblica a cualquier persona de la que espera recibir mensajes cifrados, o difundirla en un servidor de claves pblicas, donde sus interlocutores podrn encontrarla antes de enviarle un mensaje. <emphasis>Nunca jams proporcione a nadie su clave privada: nunca jams</emphasis>. Su clave privada le sirve para descifrar los mensaje que han sido cifrados mediante su clave pblica.
- </para>
- </note>
-
- <para> El uso del cifrado supone tener un poco de previsin. Para enviar un mensaje cifrado, debe utilizar la clave pblica del destinatario previsto. Asimismo, antes de poder <emphasis>recibir</emphasis> mensajes cifrados, su remitente debe conocer su clave pblica de antemano. Cuando slo se trata de firmar un mensaje, el procedimiento se invierte: esta vez, debe utilizar su propia clave privada para firmar el mensaje, mientras su destinatario utiliza su clave pblica para comprobar su firma. Cuando lo enva, el destinatario utiliza su clave pblica para desbloquear la firma, y comprobar su identidad.
- </para>
-
- <para> Es posible utilizar la funcin de cifrado de dos formas: <simplelist> <member> Mediante cifrado del mensaje completo, de tal modo que nadie, excepto el destinatario, podr leerlo. </member> <member>Adjuntando una firma cifrada a un mensaje de texto sencillo, que el destinatario puede leer sin descifrarlo. Slo necesitar descifrar la firma para comprobar la identidad del remitente que lo firm. </member> </simplelist>
- </para>
-
- <example>
- <title>Envo de un mensaje cifrado</title>
- <para> Carlos quiere enviar un mensaje cifrado a su amiga Raquel. Carlos busca la clave pblica de Raquel en un servidor de claves genrico, y utiliza <application>Evolution</application> para cifrar el mensaje. El mensaje aparece ahora como @#$23ui7yr87#@!48970fsd. Cuando la informacin le llega a Raquel, la descifra con su propia clave privada, y puede entonces leer el texto que Carlos le escribi.
- </para>
- </example> <tip id="always-sign">
- <title>Mensajes siempre firmados</title>
- <para> Puede configurar <application>Evolution</application> para que sus mensajes se enven siempre firmados:
- <orderedlist numeration="arabic">
- <listitem>
- <para> Abra las preferencias de su cuenta.
- </para>
- </listitem>
- <listitem>
- <para> Abra la ficha <guilabel>Seguridad</guilabel>.
- </para>
- </listitem>
- <listitem>
- <para> Active la casilla <guibutton>Firmar siempre el correo saliente al usar esta cuenta</guibutton>.
- </para>
- </listitem>
- </orderedlist>
- </para> </tip>
- </sect2>
-
-
-
- <sect2 id="encryption-keygen">
- <title>Creacin de claves de cifrado</title>
- <para> Antes de poder recibir o enviar mensajes cifrados, debe generar sus claves pblica y privada con la herramienta GPG. Utilice los pasos siguientes:
- </para> <tip>
- <title>Versiones de GPG</title>
- <para> Este manual se refiere a la versin 1.0.6 de GPG. Si utiliza una versin diferente, la descripcin proporcionada podr variar. Podr conocer el nmero de versin de GPG con la orden: <command>gpg --version</command>.
- </para> </tip>
- <para>
- <orderedlist numeration="arabic">
- <listitem>
- <para> Abra una ventana de terminal y escriba <command>gpg --gen-key</command>.
- </para>
- </listitem>
-
- <listitem>
- <para> Seleccione el algoritmo predeterminado, DSA and ElGamal.
- </para>
- </listitem>
-
- <listitem>
- <para> Elija la longitud de la clave. El valor predeterminado (1024 bits) suele ser suficiente.
- </para>
- </listitem>
-
- <listitem>
- <para> Decida si prefiere que su clave caduque automticamente y, en ese caso, cundo.
- </para>
- </listitem>
-
-
- <listitem>
- <para> Escriba su nombre, direccin de correo electrnico as como cualquier informacin personal que considere adecuada. No indique informacin falsa, porque ser necesaria cuando alguien quiera comprobar su identidad.
- </para>
- </listitem>
-
- <listitem>
- <para> A continuacin, escriba su contrasea (con una o varias palabras). No tiene por qu ser la misma que su contrasea de correo, ni la de inicio de sesin. De hecho, conviene que no lo sea. En todo caso, no la olvide. Si la pierde, sus claves quedarn inservibles y no podr descifrar los mensaje que reciba y estn cifrados con dichas claves.
- </para>
- </listitem>
-
- <listitem>
- <para> Ahora, GPG generar las claves. Como la operacin puede tardar un cierto tiempo, puede dedicarse a otra cosa hasta que termina. De hecho, dedicarse a otras tareas contribuye a mejorar la calidad de las claves, porque aumenta el factor aleatorio utilizado para generarlas.
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para> Una vez generadas las claves, puede examinar la informacin asociada con la orden <command>gpg --list-keys</command>. La respuesta es parecida a la siguiente: <programlisting> /home/miNombre/.gnupg/pubring.gpg ---------------------------- pub 1024D/32j38dk2 2001-06-20 minombre &lt;minombre@midireccion.com&gt; sub 1024g/289sklj3 2001-06-20 [expires: 2002-11-14] </programlisting>
- </para>
- <para> GPG crear una lista (literalmente, un anillo de claves) donde almacenar sus claves pblicas, y otra para sus claves privadas. Todas las claves pblicas que llegue a utilizar se almacenan en el archivo <filename>~/.gnupg/pubring.gpg</filename>. Puede enviar directamente este archivo a las personas a las que desea comunicar su clave.
- </para>
- <para> Si lo desea, puede transferir sus claves a un servidor de claves. Utilice los pasos siguientes:
- <orderedlist>
- <listitem>
- <para> Compruebe su identificador de clave pblica con la orden <command>gpg --list-keys</command>. En la lnea que empieza con pub, el identificador corresponde al texto que sigue a la cadena 1024D. En el ejemplo anterior, el identificador sera 32j38dk2.
- </para>
- </listitem>
- <listitem>
- <para> Escriba la orden <command>gpg --send-keys --keyserver wwwkeys.pgp.net 32j38dk2</command>. Escriba su Id. de clave en lugar de 32j38dk2. El programa le pedir su contrasea para esta operacin.
- </para>
- </listitem>
- </orderedlist>
-
- <note id="why-keyserver">
- <title>Por qu utilizar un servidor de claves?</title>
- <para> Los servidores de claves que almacenan claves pblicas permiten a las personas que le conocen descifrar sus mensajes. Si prefiere no utilizar un servidor de claves, puede enviar su clave pblica directamente a sus conocidos, incluirla en su firma, o publicarla en su sitio Web. Sin embargo, lo ms sencillo es publicarlas una sola vez, y dejar que sus interlocutores las descarguen del servidor cuando las necesiten.
- </para>
- <para> Si no dispone de la clave necesaria para desbloquea o descifrar un mensaje, puede configurar la herramienta de cifrado para que la busque automticamente. Si no puede encontrarla, le mostrar un mensaje de error.
- </para>
- </note>
-
- </para>
- </sect2>
-
- <sect2 id="encrypt-getting-key">
- <title>Obtencin y utilizacin de claves pblicas</title>
- <para> Para cifrar un mensaje para alguien, debe utilizar la clave publica de su interlocutor junto con su clave privada personal. <application>Evolution</application> puede hacerlo en su lugar, pero es necesario obtener primero esa clave para incluirla en su anillo de claves.
- </para>
- <para> Para obtener claves publicadas en un servidor de claves pblicas, escriba la orden: <command> gpg --recv-keys --keyserver wwwkeys.pgp.net IdClave </command>, tras sustituir IdClave por el identificador de clave de su interlocutor. Tras escribir su contrasea, dicho identificador quedar registrado en su anillo de claves. Ahora, cuando le enve un mensaje, <application>Evolution</application> podr cifrar los mensajes que le son destinados.
- </para>
- <para> Si alguien le enva directamente su clave pblica, gurdela en un archivo de texto sencillo, y escriba la orden <command>gpg nombre_archivo</command>. Esta operacin agrega la clave a su propio anillo de claves.
- </para>
- </sect2>
-
- <sect2 id="encrypt-evo-integ">
- <title>Configuracin del cifrado en Evolution</title>
- <para> Abra el cuadro de dilogo <menuchoice> <guimenu>Herramientas</guimenu> <guimenuitem>Configuracin</guimenuitem> </menuchoice> y haga clic en <guilabel>Cuentas de correo</guilabel>. A continuacin, seleccione la cuenta que quiere utilizar de forma segura, y haga clic en <guibutton>Editar</guibutton>. Seleccione la ficha <guilabel>Seguridad</guilabel> en el cuadro de dilogo de cuentas. La ficha <guilabel>Seguridad</guilabel> contiene una seccin llamada <guilabel>Pretty Good Privacy</guilabel>. Escriba su identificador de clave y haga clic en <guibutton>Aceptar</guibutton>. Tras esto, su clave queda vinculada a sus datos de identificacin dentro de <application>Evolution</application>.
- </para>
- <note>
- <title>Puede volver a explicar qu es un Id. de clave?</title>
- <para> <application>Evolution</application> necesita y debe conocer su identificador de clave. Si no lo recuerda, lo encontrar con la orden <command>gpg --list-keys</command> en una ventana de consola. Su identificador de clave es una cadena de ocho caracteres formada por nmeros y letras al azar.
- </para>
- </note>
- </sect2>
-
- <sect2 id="encrypt-sending">
- <title>Envo de mensajes cifrados</title>
- <para> Ya sabemos que el cifrado sirve bien para ocultar todo el mensaje, bien para firmarlo. Tras generar sus claves pblica y privada, y obtener las claves pblicas de las personas con quienes quiere comunicarse por correo, stos son los pasos que debe seguir:
- </para>
- </sect2>
-
- <sect2 id="sign-msg">
- <title>Firma de un mensaje</title>
- <para> Para firmar un mensaje, elija: <menuchoice> <guimenu>Seguridad</guimenu> <guimenuitem>Firmar con PGP</guimenuitem> </menuchoice>. El programa le solicita la contrasea PGP. A continuacin, haga clic en <guibutton>Aceptar</guibutton>: su mensaje ha sido firmado.
- </para>
- </sect2>
-
- <sect2 id="encrypt-msg">
- <title>Cifrado de un mensaje</title>
- <para> Los pasos para cifrar y firmar un mensaje son similares. Elija simplemente la opcin del men <menuchoice> <guimenu>Seguridad</guimenu> <guimenuitem>Cifrar con PGP</guimenuitem> </menuchoice>
- </para>
- </sect2>
- <sect2 id="unencrypting">
- <title>Descifrado de un mensaje recibido</title>
- <para> Tras recibir un mensaje cifrado, es preciso descifrarlo antes de poder leerlo. Recuerde: el remitente debe conocer su clave pblica antes de poder enviarle un mensaje cifrado.
- </para>
- <para> Al intentar abrir el mensaje, <application>Evolution</application> le solicita la contrasea PGP. Escrbala: tras esto, el mensaje aparece correctamente a la vista.
- </para>
- </sect2>
- </sect1>
-</chapter>
-
-
diff --git a/help/es/usage-mainwindow.sgml b/help/es/usage-mainwindow.sgml
deleted file mode 100644
index 35b582632c..0000000000
--- a/help/es/usage-mainwindow.sgml
+++ /dev/null
@@ -1,885 +0,0 @@
-
-
-<!-- $Id: usage-mainwindow.sgml,v 1.3 2003/10/21 18:51:26 ettore Exp $ -->
-<!-- Traduccin: Ismael -->
-<!-- Revisin: irm 030504/final 030428/rpida -->
-
-<chapter id="usage-mainwindow">
-
- <title>Primeros pasos con Ximian Evolution</title>
-
- <sect1 id="what">
- <title>Qu es Ximian Evolution y qu puede hacer por m</title>
- <para> Una informacin desorganizada y de difcil acceso es intil; no puede llamarse as si tras consultarla no queda <emphasis>informado</emphasis>. El objetivo de <application>Ximian Evolution</application> es simplificar las tareas de almacenamiento, organizacin y recuperacin de su informacin personal, con el fin de poder trabajar y comunicarse con otras personas. Se trata por tanto de un programa muy evolucionado de <glossterm linkend="groupware">trabajo en grupo</glossterm>, una parte integral de su escritorio de trabajo conectado a Internet.
-
- </para>
- <para> En otras palabras, <application>Ximian Evolution</application> es una herramienta para ayudarle a hacer su trabajo.
- </para>
- <para> <application>Ximian Evolution</application> es software libre. El programa y su cdigo fuente han sido liberados acogindose a los trminos de la licencia <xref linkend="apx-gpl"> (GPL) y la documentacin lo hace a la <xref linkend="apx-fdl"> (FDL). Para obtener ms informacin acerca de ambas licencias puede visitar la web de la Free Software Foundation en <ulink url="http://www.fsf.org">http://www.fsf.org</ulink>.
- </para>
-
- <para> <application>Ximian Evolution</application> puede ayudarle a trabajar en grupo manejando su correo electrnico, sus direcciones, otra informacin de contacto y uno o ms calendarios. Funciona en uno o varios sistemas conectados en local o en red, para un uso individual o de grupos de gran tamao.
- </para>
-
- <para> <application>Ximian Evolution</application> permite realizar la mayora de las tareas diarias ms rpidamente. Por ejemplo, agregar una nueva cita o enviar una tarjeta de visita por correo electrnico o escribir a un contacto slo requiere hacer clic un par de veces. <application>Ximian Evolution</application> muestra informacin en pantalla de forma ms rpida y eficaz, las bsquedas son ms veloces y el consumo de memoria es menor. Los usuarios que reciban cantidades ingentes de correo apreciar caractersticas avanzadas como las <trademark>carpetas virtuales</trademark> que permiten guardar bsquedas como si fueran carpetas de correo convencionales.
- </para>
- </sect1>
-
- <sect1 id="usage-mainwindow-starting">
- <title>Primeros pasos con Ximian Evolution</title>
- <para> Puede iniciar <application>Ximian Evolution</application> de una de estas maneras:
- <itemizedlist>
- <listitem>
- <para> Elija <menuchoice><guimenu>Programas</guimenu> <guimenuitem>Evolution</guimenuitem> </menuchoice> desde el men del panel.
- </para>
- </listitem>
-
- <listitem>
- <para>Escriba <command>evolution</command> en la lnea de rdenes.
- </para>
- </listitem>
- </itemizedlist>
- </para>
-
- <para>
- <note>
- <title>Opciones de la lnea de rdenes</title>
- <para> Evolution le permite utilizar una serie de opciones de la lnea de rdenes. Para consultar la lista completa, ejecute las rdenes <userinput>man evolution</userinput> o <userinput>evolution --help</userinput>. Las ms importantes son:
-
- <itemizedlist>
- <listitem>
- <para> Para iniciar Evolution en modo desconectado: <userinput>evolution --offline</userinput>
- </para>
- </listitem>
-
- <listitem>
- <para> Para iniciar Evolution y empezar a escribir un mensaje a la direccin de correo que especifique: <userinput>evolution mailto:paco@porahi.net</userinput>.
- </para>
- </listitem>
-
- <listitem>
- <para> Para que su navegador Web utilice Evolution de manera predeterminada escriba <userinput>evolution "%s"</userinput> en el campo correspondiente al administrador de correo, en la configuracin de su navegador o en el Centro de control de GNOME.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </note>
- </para>
- <para> La primera vez que los ejecute, el programa crea un directorio llamado <filename>evolution</filename> en su directorio de inicio de sesin, donde almacena toda su informacin local. Despus se abrir un asistente, slo la primera vez, con el fin de ayudarle a configurar sus cuentas de correo, as como para importar datos de otras aplicaciones.
-
- </para>
- <para> El asistente de primer inicio requiere entre dos y cinco minutos de su tiempo, aproximadamente. </para>
-
- <sect2 id="first-step">
- <title>Definicin de su identidad</title>
- <para> La ventana Identidad es el primer paso del asistente. Aqu debe escribir algunos datos personales. Ms tarde podr definir ms identidades desde el men <menuchoice><guimenu>Herramientas</guimenu> <guimenuitem>Configuracin</guimenuitem></menuchoice>, con el botn <guibutton>Cuentas de correo</guibutton>.
- <itemizedlist>
- <listitem>
- <para> Nombre completo: su nombre completo (por ejemplo Francisco Lpez).
- </para>
- </listitem>
- <listitem>
- <para> Direccin de correo: su direccin de correo electrnico (por ejemplo: francisco@lopez.com).
- </para>
- </listitem>
- <listitem>
- <para> Organizacin: la compaa para la que trabaja o la organizacin a la que representa cuando escribe correo (opcional).
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </sect2>
-
- <sect2 id="second-step">
- <title>Recibiendo mensajes</title>
- <para> La seccin <guilabel>Recibiendo mensajes</guilabel> permite determinar de dnde obtendr su correo.
- <itemizedlist>
- <listitem>
- <para> Tipo de servidor: <application>Ximian Evolution</application> es capaz de recuperar su correo desde varios tipos de servidores. Si no est seguro cul de los siguientes debe elegir, pregunte a su administrador del sistema:
- <itemizedlist>
-
- <listitem>
- <para> POP: descargar el correo a su disco duro para almacenarlo permanentemente.
- </para>
- </listitem>
- <listitem>
- <para> Microsoft Exchange: slo disponible si ha adquirido Ximian Connector para Microsoft Exchange, permite conectarse a un servidor Microsoft Exchange Server 2000, que almacena la informacin de calendario, contacto y correo electrnico en el servidor.
- </para>
- </listitem>
-
-
- <listitem>
- <para> IMAP: conserva su correo en el servidor para que pueda acceder a l con sistemas diferentes.
- </para>
- </listitem>
-
- <listitem>
- <para> Mbox estndar de Unix: seleccione esta opcin si desea leer y almacenar su correo en un buzn de correo local en su sistema. Debe proporcionar la ruta de acceso al buzn.
- </para>
- </listitem>
-
- <listitem>
- <para> Directorios de correo en formato Maildir: si utiliza <application>qmail</application> para descargar su correo, u otro programa de tipo maildir, querr usar esta opcin. Debe escribir la ruta de acceso al buzn.
- </para>
- </listitem>
- <listitem>
- <para> Directorios de correo en formato MH: si descarga el correo utilizando <application>mh</application> u otro programa tipo MH querr utiliza esta opcin. Debe escribir la ruta de acceso al buzn.
- </para>
- </listitem>
-
- <listitem>
- <para> Entrega local: si desea mover su correo desde el buzn local a su directorio de inicio. Si en cambio prefiere dejarlo donde est, opte por <guimenuitem>Mbox estndar de Unix</guimenuitem>. Debe escribir la ruta de acceso al buzn.
- </para>
- </listitem>
-
- <!-- cacho borrado porque no existe esa opcin ni aparece en manuales futuros -->
-
- <listitem>
- <para> Ninguno: elija esta opcin si no planea consultar correo electrnico con esta cuenta.
- </para>
- </listitem>
- </itemizedlist>
-
- </para>
- </listitem>
- </itemizedlist>
-</para>
- <para> Si ha elegido un servidor de correo POP, Microsoft Exchange o IMAP, es necesario introducir la siguiente informacin:
- <itemizedlist>
- <listitem>
- <para> El nombre del servidor de correo. Si tiene dudas pregunte a su administrador de sistemas.</para>
- </listitem>
-
- <listitem>
- <para> El nombre de usuario para su cuenta en ese sistema.
- </para>
- </listitem>
-
- <listitem>
- <para> Si quiere utilizar una conexin segura (SSL). Es mejor activar esta opcin de seguridad, si su servidor la reconoce.
- </para>
- </listitem>
-
- <listitem>
- <para> Las opciones de autenticacin implementadas en su servidor. Si no est seguro, haga clic en <guilabel>Comprobar tipos soportados</guilabel> o pregunte a su administrador de sistemas.
- </para>
- </listitem>
-
- <listitem>
- <para> Si quiere que Evolution recuerde su contrasea.</para>
- </listitem>
- </itemizedlist>
- </para>
- <para>
- <tip id="exchange-info">
- <title>Uso de Ximian Evolution con Microsoft Exchange</title>
- <para> Si ha adquirido Ximian Connector para Microsoft Exchange puede acceder a servidores Microsoft Exchange 2000 con el protocolo nativo. Si no dispone de Connector, o si utiliza una versin anterior de Microsoft Exchange, pregunte a su administrador de sistemas acerca de qu protocolos de acceso estndar puede usar, como POP o IMAP.
- </para>
- </tip>
-</para>
- </sect2>
- <sect2 id="more-mail-options">
- <title>Opciones de configuracin adicionales</title>
- <para> Hay ms opciones para las preferencias de correo especficas para tipos de servidor POP, Microsoft Exchange o IMAP. Si quiere, puede configurarlas ms tarde, despus de haber creado su cuenta: abra el men <menuchoice><guimenu>Herramientas</guimenu> <guimenuitem>Configuracin</guimenuitem></menuchoice>, y haga clic en <guibutton>Cuentas de correo</guibutton>. A continuacin, elija la cuenta que desea modificar y haga clic en <guibutton>Editar</guibutton>.
- </para>
- <variablelist>
- <varlistentry> <term>Si opt por correo POP:</term>
- <listitem><para>
- <itemizedlist>
- <listitem>
- <para>Comprobacin de correo nuevo: si quiere que <application>Evolution</application> compruebe automticamente si ha llegado correo nuevo active esta casilla y elija la frecuencia en minutos.
- </para>
- </listitem>
-
- <listitem>
- <para> Almacenamiento del mensaje: si quiere guardar copias de su correo en el servidor, active esta casilla.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term>Si opt por Microsoft Exchange:</term>
- <listitem><para>
- <itemizedlist> <listitem>
- <para>Comprobacin de correo nuevo: si quiere que <application>Evolution</application> compruebe automticamente si ha llegado correo nuevo active esta casilla y elija la frecuencia en minutos.
- </para>
- </listitem>
-
- <listitem>
- <para>El nombre del buzn es diferente al nombre del usuario: si su nombre de usuario en el active directory es diferente al nombre de su buzn Exchange active esta casilla y escriba el nombre del buzn.
- </para>
- </listitem>
- <listitem>
- <para> Anular la ruta de acceso web de Outlook: en muchos casos la URL para acceso web es <quote>http://server.company.com/exchange</quote>. Si su sistema tiene una ruta que no es <quote>exchange</quote> active esta casilla e introduzca la ruta correcta.
- </para>
- </listitem>
- <listitem>
- <para> Crear una carpeta con la lista global de direcciones: active esta casilla si va a utilizar Active Directory o la lista global de direcciones de su organizacin.
- </para>
- </listitem>
- <listitem>
- <para> Nombre del servidor Active Directory: escriba aqu el nombre del servidor Active Directory.
- </para>
- </listitem>
-
- <listitem>
- <para> Limitar el nmero de respuestas: elija un nmero mximo de resultados para una bsqueda de direcciones. Ese mximo sirve para limitar la carga de su sistema y de su red local.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- </varlistentry>
- <varlistentry> <term>Si opt por IMAP:</term>
- <listitem>
- <para>
- <itemizedlist>
- <listitem>
- <para>Comprobacin de correo nuevo: si quiere que <application>Evolution</application> compruebe automticamente si ha llegado correo nuevo active esta casilla y elija la frecuencia en minutos.
- </para>
- </listitem>
-
- <listitem>
- <para> Comprobacin de correo nuevo: si quiere que <application>Evolution</application> compruebe automticamente si ha llegado correo nuevo a <emphasis>todas</emphasis> sus carpetas IMAP, asegrese de activar la casilla <guilabel>Comprobar si hay mensajes nuevos en todas las carpetas</guilabel>.
- </para>
- </listitem>
-
- <listitem>
- <para> Mostrar slo las carpetas suscritas: active la casilla si tiene ms carpetas en su vista IMAP que las que quiere leer.
- </para>
- </listitem>
-
- <listitem>
- <para> Sobreescribir el espacio de nombres dado por el servidor: si lo desea puede especificar un directorio donde el servidor guarda su correo. Los valores ms comunes son <quote>mail</quote> y <quote>Mail</quote>.
- </para>
- </listitem>
-
- <listitem>
- <para> Aplicar filtros a los mensajes nuevos en el buzn de entrada en el servidor: si quiere que sus filtros se apliquen remotamente en esta cuenta adems de en el correo descargado localmente marque esta caja. </para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-
- <note id="imap-namespace">
- <title>Qu es el espacio de nombres de IMAP?</title>
- <para> En un servidor de correo IMAP el administrador puede proporcionarle un espacio de nombres especfico, el directorio en el que el servidor almacenar su correo. Si al comprobar su correo IMAP ve que su lista de carpetas incluye archivos que no se parecen a carpetas de correo probablemente necesita cambiar su espacio de nombres de correo. Los valores ms normales son <quote>mail</quote> y <quote>Mail</quote>. Si lo prefiere puede optar por suscribir las carpetas de correo una a una.
- </para>
- </note>
-
- </sect2>
-
- <sect2 id="third-step">
- <title>Enviando correo</title>
- <para>
-
- El paso <guilabel>Enviando correo</guilabel> sirve para configurar el envo de correo electrnico.
- <itemizedlist>
- <listitem>
- <para> Tipo de servidor: <application>Ximian Evolution</application> es capaz de comunicarse con varios tipos de servidor a la hora de enviar su correo.
- <itemizedlist>
- <listitem>
- <para> SMTP: enva el correo directamente desde su sistema.
- </para>
- </listitem>
-
- <listitem>
- <para>
-
- Microsoft Exchange: enva el correo a travs de un servidor Microsoft Exchange utilizando el protocolo Microsoft Exchange 2000. Slo est disponible si adquiere Ximian Connector para Microsoft Exchange. Debe tener la clave de una licencia vlida que haya adquirido en <ulink url="http://store.ximian.com">store.ximian.com</ulink>.
- </para>
- </listitem>
-
- <listitem>
- <para> Sendmail: utiliza el programa <application>Sendmail</application> para enviar el correo desde su sistema. Sendmail es muy flexible pero no es tan fcil de configurar por lo que slo debera elegir esta opcin si sabe cmo poner en marcha un servicio Sendmail.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- <listitem>
- <para> Servidor: si eligi <guilabel>SMTP</guilabel> o <guilabel>Microsoft Exchange</guilabel> escriba el nombre del servidor o su direccin IP.
- </para>
- </listitem>
- <listitem>
- <para> El servidor requiere autenticacin: active esta casilla si al enviar su correo el servidor pide que le escriba una contrasea.
- </para>
- </listitem>
- <listitem>
- <para> Tipo de autenticacin: a menos que haya recibido otras indicaciones, lo mejor es que deje esta opcin en <guilabel>Contrasea</guilabel>. Si no est seguro pregunte a su administrador de sistemas, a su proveedor de Internet o deje que <application>Ximian Evolution</application> lo compruebe por usted mediante la opcin <guibutton>Comprobar tipos soportados</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para> Nombre de usuario: el nombre de la cuenta con la que descarga su correo. Normalmente es la parte de su direccin de correo electrnico que esta antes de la <quote>@</quote>. Con servidores Exchange, es el nombre de usuario que usa al ingresar en una estacin de trabajo Windows en su compaa.
- </para>
- </listitem>
- <listitem>
- <para> Recordar contrasea: Si no quiere tener que escribir su contrasea cada vez que descarga su correo pulse este botn. </para>
- </listitem>
- </itemizedlist>
- </para>
- </sect2>
-
- <sect2 id="fourth-step">
- <title>Importar correo (opcional)</title>
- <para> Si <application>Ximian Evolution</application> encuentra archivos de direcciones o de correo electrnico de otra aplicacin, ofrecer importarlos. Si no est seguro de qu formato usa su programa de correo pregunte a su administrador de sistemas. Si quiere, puede saltar este paso y volver con posterioridad eligiendo
-
- <menuchoice> <guimenu>Archivo</guimenu> <guimenuitem>Importar</guimenuitem> </menuchoice>.
- </para>
- <para>
-
- <application>Ximian Evolution</application> puede importar los siguientes tipos de archivos:
-
- <variablelist>
- <varlistentry> <term>VCard (.vcf, gcrd):</term>
- <listitem>
- <para> El formato de tarjeta de visita usado por GNOME, KDE y otras aplicaciones de gestin de contactos. Debera poder exportar al formato VCard desde cualquier aplicacin de libreta de direcciones.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>Microsoft Outlook Express 4 (.mbx):</term>
- <listitem>
- <para> Formato de archivo de correo electrnico usado por Microsoft Outlook Express 4. Para otras versiones de Microsoft Outlook y Outlook Express consulte la nota ms abajo.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term>mbox:</term>
- <listitem>
- <para> El formato buzn de correo usado por Mozilla, Netscape, Ximian Evolution, Eudora y muchos otros clientes de correo.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-</para>
-<para>
- <note>
- <title>Usuarios expertos de Microsoft Outlook y Outlook Express</title>
- <para> Microsoft Outlook y las versiones de Outlook Express posteriores a la 4 usan formatos propietarios que <application>Ximian Evolution</application> no puede leer o importar. Para importar los contactos deber envirselos a usted mismo por correo e importarlos a mano. Para el correo hay una alternativa ms simple:
-
- <orderedlist numeration="arabic">
-
- <listitem>
- <para> Desde Windows, importe los ficheros en Mozilla Mail (u otro cliente del estilo como Netscape o Eudora, que use el formato mbox).
-
- </para>
- </listitem>
-
- <listitem>
- <para> Copie los ficheros al sistema o la particin donde use <application>Ximian Evolution</application>.
- </para>
- </listitem>
-
- <listitem>
- <para>
-
- Utilice la herramienta de importacin de <application>Ximian Evolution</application> para importar esos archivos. Encontrar ms informacin acerca de su funcionamiento en el sitio Web de <ulink url="http://support.ximian.com">asistencia tcnica</ulink> de Ximian.
-
- </para>
- </listitem>
- </orderedlist>
- </para>
- </note>
-
- <note>
- <title>Usuarios de Netscape</title>
- <para> Antes de importar correo desde Netscape asegrese de hacer lo siguiente en ese programa: <menuchoice><guimenu>Archivo</guimenu><guimenuitem>Compactar todas las carpetas</guimenuitem></menuchoice>. Si no lo hiciera, <application>Ximian Evolution</application> importar y deshar el borrado de los mensajes de la Papelera de mensajes.
- </para>
- </note>
-
- </para>
-
- <tip>
- <title>Exportar archivos desde Ximian Evolution</title>
- <para> Ximian Evolution usa tipos de archivos estndar para toda su informacin por lo que no debera tener problema para llevarse su informacin a otro lado, si es que lo quisiera.
- </para>
- <para> Para el correo se usa <filename>mbox</filename>, para el calendario <filename>iCal</filename>, y para la libreta de contactos vCards dentro de una base de datos <filename>.db3</filename>.
- </para>
- </tip>
- </sect2>
- </sect1>
-
- <sect1 id="importing-mail-from-clients">
- <title>Importar correo de otros clientes de correo</title>
- <para> Probablemente ya tenga su correo en otro programa cliente y no querr perder la informacin. La siguiente seccin describe cmo importar correo desde clientes especficos de correo.
- </para>
- <sect2 id="mutt">
- <title>Importar correo desde mutt</title>
- <para> <application>mutt</application> es una aplicacin en modo carcter incluida en muchas distribuciones Linux y Unix. <application>mutt</application> usa los formatos de archivo estndar mbox, maildir y MH, lo que hace sencilla la importacin de su correo en <application>Evolution</application>. En su configuracin predeterminada <application>mutt</application> uses el formato mbox.
- <orderedlist numeration="arabic">
- <listitem>
- <para> Abra <application>Ximian Evolution</application>.
- </para>
- </listitem>
- <listitem>
- <para> Abra <menuchoice> <guimenu>Archivo</guimenu> <guimenuitem>Importar</guimenuitem> </menuchoice> o o presione la combinacin de teclas <keycombo action="simul"> <keycap>Ctrl</keycap> <keycap>I</keycap> </keycombo>.
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en <guibutton>Siguiente</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para> Elija <guibutton>Importar un nico archivo</guibutton>
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en <guibutton>Buscar</guibutton> y elija el archivo que quiere importar. En general el correo se almacena en en el archivo <filename>~/mbox</filename> para el formato mbox y en <filename
- class="directory">~/Maildir</filename> para el Maildir.
- </para>
- </listitem>
- <listitem>
- <para> <application>Evolution</application> preguntar en qu carpeta quiere importarlo: elija una. Tambin podr crear una carpeta nueva y volcar ah la informacin.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </sect2>
- <sect2 id="kmail">
- <title>Importar correo desde KMail</title>
- <para> KMail es el cliente de correo incluido en el entorno de escritorio KDE. KMail usa el formato de archivo estndar mbox, por lo que es fcil importar su correo en <application>Evolution</application>.
- <orderedlist numeration="arabic">
- <listitem>
- <para> Abra <application>Ximian Evolution</application>
- </para>
- </listitem>
- <listitem>
- <para> Elija el men <menuchoice> <guimenu>Archivo</guimenu> <guimenuitem>Importar</guimenuitem> </menuchoice> o o presione la combinacin de teclas <keycombo action="simul"> <keycap>Ctrl</keycap> <keycap>I</keycap> </keycombo>.
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en <guibutton>Siguiente</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para> Elija <guibutton>Importar un nico archivo</guibutton>
- </para>
- </listitem>
- <listitem>
- <para> Haga clic en <guibutton>Buscar</guibutton> y elija el archivo que quiere importar. En su configuracin predeterminada KMail almacena su informacin en el directorio Mail de su directorio de inicio.
- </para>
- </listitem>
- <listitem>
- <para> <application>Evolution</application> preguntar en qu carpeta quiere importarlo: elija una. Tambin podr crear una carpeta nueva y volcar ah la informacin.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </sect2>
- </sect1>
-
- <sect1 id="ui-intro">
- <title>Qu es qu en Ximian Evolution</title>
- <para> Ahora que ya tiene su configuracin, tras la ejecucin del asistente del inicio, ya est listo para empezar a trabajar. Proporcionamos a continuacin una explicacin rpida de qu es lo que est ocurriendo en su ventana principal de <application>Ximian Evolution</application>.
- </para>
-
- <figure id="preface-basic-interface">
- <title>La ventana principal de Ximian Evolution</title>
- <screenshot> <screeninfo>Entrada</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>Barra del men</guilabel>
- </para>
-
- <para> La <guilabel>barra del men</guilabel> da acceso a casi todas las caractersticas que pueden encontrarse en <application>Ximian Evolution</application>.
- </para>
-
- <para> <inlinemediaobject><imageobject><imagedata fileref="figures/full-2" format="png"></imageobject></inlinemediaobject> <guilabel>Barra de herramientas</guilabel>
- </para>
-
- <para> La <guilabel>barra de herramientas</guilabel> da acceso fcil y rpido a las caractersticas ms usadas de cada componente.
- </para>
-
- <para> <inlinemediaobject><imageobject><imagedata fileref="figures/full-3" format="png"></imageobject></inlinemediaobject> <guilabel>Barra de atajos</guilabel>
- </para>
-
- <para> La <guilabel>barra de atajos</guilabel> permite llegar a los componentes principales con un clic.
- </para>
-
- <para> <inlinemediaobject><imageobject><imagedata fileref="figures/full-4" format="png"></imageobject></inlinemediaobject> <guilabel>Barra de estado</guilabel>
- </para>
-
- <para> Peridicamente <application>Ximian Evolution</application> muestra discretamente un mensaje o informa del progreso de alguna tarea. Esto ocurre sobre todo a la hora de descargar o enviar el correo. Esta informacin se muestra en la <guilabel>barra de estado</guilabel>.
- </para>
-
- <para> <inlinemediaobject><imageobject><imagedata fileref="figures/full-5" format="png"></imageobject></inlinemediaobject> <guilabel>Herramienta de bsqueda</guilabel>
- </para>
-
- <para> La <guilabel>herramienta de bsqueda</guilabel> permite hacer bsquedas en el correo con precisin y sencillez.
- </para>
-
-
- <sect2 id="usage-mainwindow-shortcutbar">
- <title>La barra de atajos</title>
- <para> La labor ms importante de <application>Ximian Evolution</application> es facilitar el acceso y simplificar la consulta de su informacin. Una manera de conseguirlo es mediante la <interface>barra de atajos</interface>, la columna a la izquierda de la ventana principal. Los grandes botones con nombre como <guilabel>Buzn de entrada</guilabel> y <guilabel>Contactos</guilabel> son atajos y puede elegir varios grupos de atajos pulsando sobre los botones rectangulares de grupos.
- </para>
- <para> chele un vistazo a la <guilabel>barra de atajos</guilabel>. Los botones de atajos en esa categora son:
-
- <variablelist>
- <varlistentry> <term> <guibutton>Resumen</guibutton>:</term>
- <listitem>
- <para> Empiece aqu su jornada. El <guilabel>Resumen</guilabel> de Ximian Evolution ofrece un rpido resumen de los mensajes nuevos o importantes, las citas diarias y las urgentes. Puede adaptar su apariencia y contenido y usarlo para acceder a los servicios de Ximian Evolution.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term> <guibutton>Buzn de entrada</guibutton>:</term>
- <listitem>
- <para> Haga clic en <guibutton>buzn entrada</guibutton> para comenzar la lectura de su correo. Su buzn es tambin el lugar donde las herramientas de Ximian Evolution filtran, ordenan, organizan y buscan su correo.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term><guibutton>Calendario</guibutton>:</term>
- <listitem>
- <para> El Calendario puede almacenar sus listas de citas y tareas. Conectado a la red puede usarse para mantener al da la planificacin de un grupo de personas.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term><guibutton>Tareas</guibutton>:</term>
- <listitem>
- <para>
-
- Una vista completa de la libreta de tareas de su calendario.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry> <term><guibutton>Contactos</guibutton>:</term>
- <listitem>
- <para> La libreta de contactos contiene informacin de contactos con sus direcciones, telfono y otros datos personales. Como la informacin del calendario, los datos de contactos pueden sincronizarse con agendas electrnicas y ser compartidos en red.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
- <sect2 id="usage-mainwindow-folderbar">
- <title>Carpetas y la barra de carpetas</title>
- <para> La <interface>barra de carpetas</interface> es la manera ms amplia de ver la informacin que tiene almacenada en <application>Ximian Evolution</application>. Muestra todas sus citas, tarjetas de visita y correo electrnico en un rbol que es muy parecido a un <glossterm
- linkend="filetree">rbol de archivos</glossterm>: es pequeo en la parte superior y las ramas crecen hacia abajo. En la mayora de los sistemas habr tres o cuatro carpetas en la base. La primera, por supuesto es el <guilabel>Resumen</guilabel>, un resumen personalizable de su informacin. Debajo estn las <guilabel>Carpetas locales</guilabel>, que guardan todos los datos que <application>Ximian Evolution</application> tiene almacenados en su sistema. Tras esto estn sus servidores de red: servidores <glossterm
- linkend="ldap">LDAP</glossterm> que alojan directorios compartidos de contactos y carpetas de correo <glossterm
- linkend="imap">IMAP</glossterm> a las que est suscrito. Finalmente estn las <guilabel>carpetas virtuales</guilabel>, las carpetas virtuales.
- </para>
- <para>
-
- Una carpeta <guilabel>Carpetas locales</guilabel> tpica contiene las siguientes carpetas:
- <itemizedlist>
- <listitem>
- <para> <guilabel>Calendario</guilabel>, para listados de citas y eventos.
- </para>
- </listitem>
- <listitem>
- <para> <guilabel>Contactos</guilabel>, para las tarjetas de visita.
- </para>
- </listitem>
- <listitem>
- <para> <guilabel>Borradores</guilabel>, para los mensajes que empez a escribir y no acab.
- </para>
- </listitem>
- <listitem>
- <para> <guilabel>Entrada</guilabel>, para el correo entrante.
- </para>
- </listitem>
-
- <listitem>
- <para> <guilabel>Salida</guilabel>, para mensajes que ha escrito pero que no ha enviado todava. Esta carpeta estar vaca a menos que use <application>Ximian Evolution</application> en modo desconectado.
- </para>
- </listitem>
-
- <listitem>
- <para> <guilabel>Enviado</guilabel>, para el correo enviado.
- </para>
- </listitem>
-
- <listitem>
- <para> <guilabel>Papelera</guilabel>, una vista de tipo carpeta virtual con todos los mensajes que ha marcado para borrar pero que an no ha <glossterm linkend="expunge">purgado</glossterm>.
- </para>
- </listitem>
- </itemizedlist>
-
- </para>
- <tip id="foldertips">
- <title>Navegar sin la Barra de Carpetas ni la Barra de Atajos</title>
- <para> Para moverse por la ventana principal no son necesarias las barras de men o de atajos. Puede usar la tecla <keycap>Tabulador</keycap> para saltar en una ventana de una parte a otra. Cuando oculte la barra de carpetas hay un men en la parte izquierda de la ventana, justo debajo de la barra de herramientas, para moverse a travs del rbol de carpetas incluso si las barras de carpetas y de atajos estn escondidas.
- </para>
- </tip>
-
- <para> Si tiene grandes cantidades de correo, querr tener ms carpetas, adems de la carpeta de Entrada. Para crear una carpeta nueva:
- <orderedlist numeration="arabic">
- <listitem>
- <para> Haga clic en <menuchoice> <guimenu>Archivo</guimenu> <guisubmenu>Nuevo</guisubmenu> <guimenuitem>Carpeta</guimenuitem></menuchoice> <keycombo action="simul"> <keycap>Mays</keycap> <keycap>Ctrl</keycap> <keycap>E</keycap> </keycombo>.
- </para>
- </listitem>
- <listitem>
- <para> Escriba el nombre de la carpeta en el campo <guilabel>Nombre de la carpeta</guilabel>.
- </para>
- </listitem>
- <listitem>
- <para> Elija el tipo de carpeta. Los tipos disponibles son:
- <itemizedlist>
- <listitem>
- <para> Calendario
- </para>
- </listitem>
- <listitem>
- <para> Contactos
- </para>
- </listitem>
- <listitem>
- <para> Correo
- </para>
- </listitem>
- <listitem>
- <para> Tareas
- </para>
- </listitem>
- </itemizedlist>
-
- </para>
- </listitem>
- <listitem>
- <para> Elija dnde crear la carpeta.
- </para>
- </listitem>
- </orderedlist>
- </para>
-
- <sect3 id="subfolders">
- <title>Subcarpetas</title>
- <para> <application>Ximian Evolution</application> permite anidar carpetas unas dentro de otras para que pueda tener un detallado sistema organizacional.
- </para>
-
- <note>
- <title>Las carpetas tienen un lmite</title>
- <para> Los calendarios deben ir en carpetas especficas para calendario, el correo en carpetas de correo, y los contactos en carpetas de contactos.
- </para>
- </note>
-
- <para> Un clic con el botn derecho sobre casi cualquier elemento de <application>Ximian Evolution</application> permite abrir un men. Si lo hace sobre una carpeta obtendr un men con las opciones siguientes:
- <itemizedlist>
- <listitem><para><guimenuitem>Vista</guimenuitem>: ver la carpeta. </para></listitem>
- <listitem><para><guimenuitem>Abre en una ventana nueva</guimenuitem>: ver la carpeta en una ventana diferente. </para></listitem>
- <listitem><para><guimenuitem>Mover</guimenuitem>: mover la carpeta a otro lugar. </para></listitem>
- <listitem><para><guimenuitem>Copiar</guimenuitem>: duplicar la carpeta en otro lugar. </para></listitem>
- <listitem><para><guimenuitem>Borrar</guimenuitem>: borrar la carpeta y todo su contenido. </para></listitem>
- <listitem><para><guimenuitem>Renombrar</guimenuitem>: cambiar su nombre. </para></listitem>
- <listitem><para><guimenuitem>Crear carpeta nueva</guimenuitem>: crear otra carpeta que cuelgue de este lugar. </para></listitem>
- <listitem><para><guimenuitem>Aadir a la barra de atajos</guimenuitem>: agregar la carpeta a la barra de atajos. </para></listitem>
- <listitem><para><guimenuitem>Propiedades</guimenuitem>: ver o cambiar propiedades de la carpeta. </para></listitem>
- </itemizedlist>
- </para>
- <para> Tambin puede reorganizar las carpetas y los mensajes arrastrndolos y soltndolos donde desee.
- </para>
-
- <para> Siempre que llegue un mensaje nuevo a una carpeta de correo, su nombre se mostrar en negrita junto al nmero de mensajes contenidos.
- </para>
- </sect3>
- </sect2>
-
- <sect2 id="usage-mainwindow-menubar">
- <title>La barra del men</title>
- <para> Los contenidos de la <interface>barra del men</interface> contienen todas las acciones correspondientes a la vista actual. Si est examinando su buzn de entrada, la mayora de los elementos del men estarn relacionados con el correo; algunos lo estarn con otros componentes de <application>Ximian Evolution</application> y algunos, especialmente los del men <guimenu>Archivo</guimenu>, lo estarn con la aplicacin como un todo.
- </para>
- <para>
- <variablelist>
- <varlistentry> <term> <guimenu>Archivo</guimenu>:</term>
-
- <listitem><para> Este men rene todas las operaciones relacionadas con archivos o con la aplicacin: crear o guardar elementos a disco, imprimirlos y salir del propio programa.
- </para></listitem>
- </varlistentry>
-
- <varlistentry> <term> <guimenu>Editar</guimenu>:</term>
- <listitem><para> El men <guimenu>Editar</guimenu> contiene las herramientas tiles para modificar y desplazar texto en la aplicacin.
- </para></listitem>
- </varlistentry>
-
- <varlistentry> <term> <guimenu>Vista</guimenu>:</term>
- <listitem><para> Este men permite configurar la apariencia de <application>Ximian Evolution</application>. Algunas de las opciones afectan la apariencia de todo <application>Ximian Evolution</application>, mientras otras slo afectan a determinados tipos de informacin.
- </para></listitem>
- </varlistentry>
-
- <varlistentry> <term> <guimenu>Acciones</guimenu>:</term>
- <listitem><para> Acciones que pueden aplicarse a un mensaje. Normalmente, si la accin slo tiene un objetivo -por ejemplo responder a un mensaje- le encontrar en este el men <guimenu>Acciones</guimenu>.
- </para></listitem>
- </varlistentry>
-
- <varlistentry> <term> <guimenu>Herramientas</guimenu>:</term>
- <listitem><para> Incluye las herramientas de configuracin y reconfiguracin. En el caso del correo, se trata de elementos como el <guimenuitem>Editor de carpetas virtuales</guimenuitem>. Para el <interface>Calendario</interface> y el <interface>administrador de contactos</interface>, incluye la configuracin del color, de la red y la organizacin en pantalla.
- </para></listitem>
- </varlistentry>
-
- <varlistentry> <term> <guimenu>Ayuda</guimenu>:</term>
- <listitem><para> Estos elementos permiten abrir el <application>navegador de ayuda</application> para leer el manual de <application>Ximian Evolution</application>.
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
-
- <para> Cuando est familiarizado con la <interface>ventana principal</interface> podr empezar a hacer cosas con ella. Empezaremos por el <guilabel>Resumen</guilabel> que proporciona una perspectiva general de su informacin en <application>Ximian Evolution</application>.
- </para>
- </sect2>
- <sect2 id="basics-summary">
- <title>Introduccin al Resumen</title>
- <para> El Resumen de Ximian Evolution ofrece una vista rpida de la informacin importante: sus citas para la jornada, su correo pendiente , los titulares de los servicios de noticias elegidos, etc. Para ver el Resumen haga clic en <guibutton>Resumen</guibutton> en la barra de atajos o elija la carpeta <guilabel>Resumen</guilabel> en la barra de carpetas.
- </para>
-
- <para> <figure>
- <title>El Resumen de Evolution</title>
-
-<screenshot> <graphic format="png" fileref="figures/summary" srccredit="Kevin Breit">
-</screenshot> </figure>
- </para>
-
-<para> <inlinemediaobject><imageobject><imagedata fileref="figures/full-1" format="png"></imageobject></inlinemediaobject> <guilabel>Meteorologa</guilabel>
-</para>
-<para> Muestra las ltimas noticias sobre el clima de cientos de ciudades de todo el mundo.
-</para>
-<para> <inlinemediaobject><imageobject><imagedata fileref="figures/full-2" format="png"></imageobject></inlinemediaobject> <guilabel>Titulares de noticias</guilabel>
-</para>
-<para> Muestra los titulares de las ltimas noticias de sus sitios web favoritos.
-</para>
-<para> <inlinemediaobject><imageobject><imagedata fileref="figures/full-3" format="png"></imageobject></inlinemediaobject> <guilabel>Resumen de correo</guilabel>
-</para>
-<para> Muestra cuntos mensajes de correo tiene pendientes de leer en las carpetas elegidas.
-</para>
-<para> <inlinemediaobject><imageobject><imagedata fileref="figures/full-4" format="png"></imageobject></inlinemediaobject> <guilabel>Resumen de citas</guilabel>
-</para>
-<para> Muestra su agenda.
-</para>
-<para> <inlinemediaobject><imageobject><imagedata fileref="figures/full-5" format="png"></imageobject></inlinemediaobject> <guilabel>Tareas</guilabel>
-</para>
-<para> Muestra sus tareas pendientes.
-</para>
-
-
- <para> Para agregar servicios adicionales a su resumen o modificar los actuales elija <menuchoice> <guimenu>Herramientas</guimenu> <guimenuitem>Configuracin</guimenuitem> </menuchoice> y haga clic en <guibutton>Configuracin del resumen</guibutton>.
- </para>
-
- </sect2>
-
- <sect2 id="basics-mail">
- <title>Introduccin al correo electrnico</title>
- <para> En varios aspectos <application>Ximian Evolution</application> es como cualquier otro programa de correo electrnico:
- <itemizedlist>
- <listitem>
- <para> Puede ordenar y organizar su correo en una amplia gama de maneras con carpetas, bsquedas y filtros. </para>
- </listitem>
- <listitem>
- <para> Permite enviar y recibir mensajes en HTML o en texto sencillo, y facilita el envo y recepcin de mltiples archivos adjuntos.
- </para>
- </listitem>
- <listitem>
- <para> Implementa mltiples fuentes de correo, como <glossterm
- linkend="imap">IMAP</glossterm>, <glossterm
- linkend="pop">POP3</glossterm> y archivos locales <filename>mbox</filename> o <filename>mh</filename> creados por otros programas de correo.
- </para>
- </listitem>
- <listitem>
- <para> Permite proteger su privacidad utilizando cifrado.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <para> Sin embargo, <application>Ximian Evolution</application> tiene algunas diferencias importantes. Primero est diseado para manejar ingentes cantidades de correo. Las funciones de filtrado y de bsqueda han sido optimizadas en velocidad y eficiencia para operar con grandes cantidades de correo. Tambin estn las carpetas virtuales de <application>Ximian Evolution</application>, una caracterstica organizacional avanzada que no est disponible en los clientes de correo ms comunes. Esta caracterstica le resultar especialmente til si administra un montn de correo o conserva todos sus mensajes para poder referirse a ellos posteriormente.
- </para>
- <para> Este es el aspecto que tiene el editor de correo:
-
- <!-- ==============Figure=================================== -->
-
- <figure id="usage-mail-intro-fig">
- <title>Correo en Ximian Evolution</title>
- <screenshot> <screeninfo>Entrada</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>Liste de mensajes</guilabel>
- </para>
-
- <para> La <guilabel>lista de mensajes</guilabel> muestra todos los mensajes que tiene. Esto incluye los que mensajes ya ledos, sin leer o marcados para su borrado.
- </para>
-
- <para> <inlinemediaobject><imageobject> <imagedata fileref="figures/full-2"
- format="png"></imageobject></inlinemediaobject> <guilabel>Visor de correo</guilabel>
- </para>
-
- <para> Aqu es donde se presentan los mensajes para su lectura.
- </para>
-
- <para> Si le parece que el <interface>panel de previsualizacin </interface> es demasiado pequeo, puede cambiar su tamao, aumentar la ventana completamente o hacer doble clic sobre el mensaje en la <interface>lista de mensajes</interface> para abrirlo en una ventana aislada. Para cambiar los tamaos de un panel slo hay que hacer clic en la lnea divisoria y arrastrarla arriba y abajo hasta la posicin deseada.
-
-</para>
-<para> Como con las carpetas, puede hacer clic con el botn derecho sobre los mensajes de la lista y obtener un men con todas las acciones posibles: mover, borrar o recuperarlo, crear carpetas virtuales y filtros basados en ellos.
- </para>
- <para> Muchas de las acciones ms frecuentes relacionadas con los mensajes aparecen en el men <guimenu>Mensaje</guimenu> de la barra del men. Los ms frecuentes como <guimenuitem>Responder</guimenuitem> o <guimenuitem>Reenviar</guimenuitem> tambin aparecen como botones en la barra de herramientas. La mayora de ellos tambin aparecen tambin en el men contextual (con el botn derecho) y como atajos de teclado, a los que se acostumbrar pronto por su rapidez. Utilice el mtodo que le resulte ms cmodo: la idea es que el software debe adaptarse al usuario, y no a la inversa.
- </para>
-
- </sect2>
- <sect2 id="basics-calendar">
- <title>Introduccin al Calendario</title>
- <para> Para abrir el calendario haga clic en <guibutton>Calendario</guibutton> en la <interface>barra de atajos</interface>. En la configuracin predeterminada, el calendario muestra la planificacin del da sobre un fondo de renglones. En la parte superior derecha, un calendario mensual permite cambiar de da. En la parte inferior, una libreta de <guilabel>Tareas</guilabel> le permite administrar una lista de tareas separadas de las citas del calendario. La vista del da en el calendario tiene el aspecto similar al siguiente:
-
- <!-- ============== Figure ============================= --> <figure id="usage-calendar-fig">
- <title>Vista de contactos de Ximian Evolution</title>
- <screenshot> <screeninfo>Ventana del administrador de contactos de Ximian Evolution</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>Lista de citas</guilabel>
- </para>
-
- <para> La <guilabel>lista de citas</guilabel> es la encargada de mostrar todas las citas que tiene planificadas, tanto si son de un da completo como si son citas puntuales de menos de media hora.
- </para>
-
- <para> <inlinemediaobject><imageobject><imagedata fileref="figures/full-2" format="png"></imageobject></inlinemediaobject> <guilabel>Lista de tareas</guilabel>
- </para>
-
- <para> La <guilabel>lista de tareas</guilabel> complementa a la <guilabel>lista de citas </guilabel> ya que mantiene las tareas que no tienen una fecha asociada. Las tareas pueden tener notas complejas asociadas y puede anotar el porcentaje de acabado de la misma en una escala.
- </para>
-
- <para> <inlinemediaobject><imageobject><imagedata fileref="figures/full-3" format="png"></imageobject></inlinemediaobject> <guilabel>Ventana del calendario</guilabel>
- </para>
-
- <para> La <guilabel>ventana del calendario</guilabel> contiene una representacin grfica del calendario en la que puede elegir qu das quiere ver en la <guilabel>lista de citas</guilabel>.
- </para>
-
-
- </sect2>
- <sect2 id="basics-contacts">
- <title>Introduccin al administrador de contactos</title>
- <para> La libreta de direcciones de <application>Ximian Evolution</application> puede manejar todas las funciones de libreta de direcciones, listn telefnico o tarjetero. Por supuesto es mucho ms fcil actualizar <application>Ximian Evolution</application> que hacerlo en un libro de papel de verdad. <application>Ximian Evolution</application> tambin permite la fcil sincronizacin con dispositivos de mano y funciona con directorios <glossterm
- linkend="ldap">LDAP</glossterm> conectados a la red.
- </para>
- <para> Otra ventaja de la libreta de direcciones de <application>Ximian Evolution</application> es su integracin con el resto de la aplicacin. Por ejemplo puede crear una tarjeta de visita a partir de un mensaje de correo slo pinchando con el botn derecho sobre la direccin del remitente del mensaje.
- </para>
- <para> Para abrir su libreta de direcciones, haga clic en <guibutton>Contactos</guibutton> en la barra de atajos o elija una de las carpetas de contactos en la barra de carpetas. En <xref
- linkend="usage-contact-fig"> podr ver una reproduccin de la libreta de direcciones con todas sus posibilidades de organizacin. En su configuracin predeterminada, la libreta muestra todas sus tarjetas en orden alfabtico en la vista de <glossterm linkend="minicard">minitarjetas</glossterm>. Puede elegir otras vistas desde el men <guimenu>Vistas</guimenu> y ajustar el ancho de las columnas si hace clic y arrastra las columnas divisorias grises.
- </para>
- <para> La apariencia de la libreta de direcciones es la siguiente:
-
- <figure id="usage-contact-fig">
- <title>Interfaz de contactos de Ximian Evolution</title>
- <screenshot> <screeninfo>Ventana de lista de contactos de Ximian Evolution</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>Lista de contactos</guilabel>
- </para>
- <para> La <guilabel>lista de contactos</guilabel> lista sus contactos.
- </para>
- </sect2>
- </sect1>
-</chapter>
-
-
-
diff --git a/help/es/usage-print.sgml b/help/es/usage-print.sgml
deleted file mode 100644
index 28e67b9551..0000000000
--- a/help/es/usage-print.sgml
+++ /dev/null
@@ -1,62 +0,0 @@
-<!-- $Id: usage-print.sgml,v 1.3 2003/10/21 18:51:26 ettore Exp $ -->
-<!-- Traduccin: ismael-->
-<!-- Revisin: irm 030504/final 030428/rpida -->
-
-<chapter id="usage-print">
- <title>Imprimir con Evolution</title>
- <para> Si ya sabe imprimir con otra aplicacin <application>Gnome</application>, tambin ser capaz de hacerlo con <application>Evolution</application> sin mayor problema.
- </para>
- <para> Si va a imprimir un mensaje, una pgina del calendario o una seleccin de tarjetas de visita puede elegir entre hacerlo directamente a la impresora o guardar el resultado de la impresin en un archivo <glossterm linkend="postscript">PostScript</glossterm>. Tambin puede utilizar la funcin de vista previa de impresin, para examinar el resultado antes de imprimir.
- </para>
-
- <sect1 id="printpreview">
- <title>Vista previa de impresin</title>
- <para> <guibutton>Previsualizar la impresin</guibutton> aparece tanto como un botn en el cuadro de dilogo de impresin con un elemento del men <guimenu>Archivo</guimenu>. La funcin es la misma en ambos casos: muestra una imagen del resultado de impresin del mensaje, hoja de calendario, cita o tarjeta de visita que tiene en pantalla.
- </para>
- <para> La ventana le permite seleccionar las pginas que desea examinar y con qu detalle. Puede alejar o acercar la vista, ajustar la pgina a la ventana (con <guibutton>Encajar</guibutton>) o ajustar el ancho de la pgina con el de la ventana (con <guibutton>Enc. ancho</guibutton>). Ninguno de estos botones modifican la manera en que la pgina ser impresa pero le permiten verla mejor. Si le satisface el resultado, haga clic en <guibutton>Imprimir</guibutton> para imprimir el documento. Para modificarlo, slo tiene que cerrar la ventana <guilabel>Previsualizar la impresin</guilabel> y realizar los cambios que desee en su documento de correo, calendario o libreta de direcciones.
- </para>
-
-
- <!-- ==============Figure=================================== -->
-
- <figure id="print-preview">
- <title>Previsualizar la impresin</title>
- <screenshot> <screeninfo>Previsualizar la impresin</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>Archivo o impresora?</title>
- <para> La ventana de eleccin de impresora mostrado en <xref
- linkend="print-dest"> permite elegir el formato de impresin: <guilabel>PostScript genrico</guilabel>, archivo PDF. El formato PostScript genrico permite enviar el contenido de la impresin a un archivo o a una impresora real. Si eligi una impresora, especifique el orden de impresin en su sistema operativo (probablemente <guilabel>lpr</guilabel>). Si quiere imprimir en un archivo, indique su nombre. Y por supuesto debe decidir el nmero de copias y cmo compaginarlas.
-
- <note id="windows-ps">
- <title>Imprimir a PostScript?</title>
- <para> PostScript es el formato de archivo utilizado por la mayora de las impresoras lser y es la forma ms sencilla de imprimir en un archivo en el mundo UNIX. Sin embargo muchos sistemas con Microsoft Windows no reconocen archivos PostScript. Si desea compartir sus archivos con usuarios Windows deber imprimir en ficheros PDF.
- </para>
- </note>
- </para>
-
- <!-- ==============Figure=================================== -->
-
- <figure id="print-dest">
- <title>Seleccin de impresora</title>
- <screenshot> <screeninfo>Seleccin de impresora</screeninfo> <mediaobject><imageobject><imagedata fileref="figures/print-dest" format="png" srccredit="Aaron Weber"> </imageobject></mediaobject>
- </screenshot> </figure>
-<!-- ==============End of Figure============================== -->
-
- <para> Si desea imprimir un mensaje mayor de una pgina, puede elegir qu pginas quiere imprimir. Si se trata de una hoja del calendario puede decidir qu rango de fechas quiere imprimir. Y si va a imprimir tarjetas de visita, puede decidir imprimir slo las elegidas o todas a la vez.
- </para>
- <para> Cuando est preparado para imprimir, haga clic en <guibutton>Imprimir</guibutton>, <guibutton>Vista preliminar</guibutton> para darle un vistazo (u otro vistazo) a la pre-impresin o a <guibutton>Cancelar</guibutton> para anular todo el trato.
- </para>
- </sect1>
-</chapter>
-
-
-
-
-
-
-
diff --git a/help/es/usage-sync.sgml b/help/es/usage-sync.sgml
deleted file mode 100644
index de9da3dbcc..0000000000
--- a/help/es/usage-sync.sgml
+++ /dev/null
@@ -1,28 +0,0 @@
-<!-- $Id: usage-sync.sgml,v 1.3 2003/10/21 18:51:26 ettore Exp $ -->
-<!-- Traduccin: ismael -->
-<!-- Revisin: -->
- <chapter id="usage-sync">
- <title>Sincronizacin de Evolution con dispositivos de mano</title>
- <para> Este captulo es muy breve. Describe cmo sincronizar los datos almacenados en su dispositivo Palm-OS y <application>Ximian Evolution</application>, respectivamente. Si necesita informacin acerca de cmo configurar la sincronizacin de un dispositivo de mano, consulte <xref linkend="config-sync">.
- </para>
-
- <sect1 id="hotsync">
- <title>Uso de la funcin HotSync</title>
- <para> Coloque el dispositivo de mano en su base, y presione el botn HotSync.
- </para>
-
-<tip id="sync-tip"> <title>Contraseas de Palm OS v. 4.0</title> <para> Si
-utiliza un dispositivo de mano Palm OS v. 4.0 y activ la proteccin por
-contrasea, es posible que se produzcan problemas durante la sincronizacin.
-En este caso, intente desactivar la proteccin por contrasea de su
-dispositivo de mano, realice la sincronizacin con su equipo de sobremesa, y
-vuelva a habilitar la proteccin del dispositivo. </para> </tip>
- <para> Si sigui las instrucciones de configuracin adecuadamente,
- los datos de su dispositivo Palm-OS se podrn sincronizar con
- <application>Ximian Evolution</application>. </para>
-
- <para> Eso es todo.
- </para>
-
- </sect1>
- </chapter>
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 e69de29bb2..0000000000
--- a/help/no/ChangeLog
+++ /dev/null
diff --git a/help/no/ChangeLog.pre-1-4 b/help/no/ChangeLog.pre-1-4
deleted file mode 100644
index 31603e8eab..0000000000
--- a/help/no/ChangeLog.pre-1-4
+++ /dev/null
@@ -1,13 +0,0 @@
-2002-06-27 Aaron Weber <aaron@ximian.com>
-
- * evolution-no.omf: apply patch from otaylor
-
-2001-10-22 Ettore Perazzoli <ettore@ximian.com>
-
- * topic.dat: s/usage-exec-summary.html/usage-summary.html/.
-
-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 97f50baeb7..0000000000
--- a/help/no/Makefile.am
+++ /dev/null
@@ -1,51 +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
-
-EXTRA_DIST = ChangeLog.pre-1-4 \ No newline at end of file
diff --git a/help/no/apx-authors.sgml b/help/no/apx-authors.sgml
deleted file mode 100644
index a48a8c30ff..0000000000
--- a/help/no/apx-authors.sgml
+++ /dev/null
@@ -1,98 +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>Anna Dirks: <email>anna@ximian.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>Nat Friedman: <email>nat@ximian.com</email></member>
- <member>Bertrand Guiheneuf: <email>bertrand@ximian.com</email></member>
- <member>Iain Holmes: <email>iain@ximian.com</email></member>
- <member>Tuomas Kuosmanen: <email>tigert@gimp.org</email></member>
- <member>Christopher J. Lahey: <email>clahey@ximian.com</email></member>
- <member>Jason Leach: <email>jleach@usa.net</email></member>
- <member>Matthew Loper: <email>matt@loper.org</email></member>
- <member>Federico Mena: <email>federico@ximian.com</email></member>
- <member>Rodrigo Moya: <email>rodrigo@ximian.com</email></member>
- <member>Eskil Heyn Olsen: <email>deity@eski.dk</email></member>
- <member>Jesse Pavel: <email>jpavel@ximian.com</email></member>
- <member>Ettore Perazzoli: <email>ettore@ximian.com</email></member>
- <member>Jeffrey Stedfast: <email>jeff@ximian.com</email></member>
- <member>Jakub Steiner: <email>jimmac@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>
- Ximian nsker takke Miles Lane for sin innsats med
- kvalitetssikring av produktet og staben p El Pelon Taqueria,
- p Peterborough st. i Boston for substans.
- </para>
-
-
- <para>
- For mer informasjon vennligst besk
- <application>Evolution</application> <ulink
- url="http://www.ximian.com/products/ximian_evolution/"
- 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 legg inn alle kommentarer og forslag angende brukerhndboken
- som feilrapporter i Ximian's feilhndteringssystem. Hvis du har
- hjulpet dette prosjektet, men ikke ser ditt navn nevnt her, kan
- du kontakte Aaron Weber (<email>aaron@ximian.com</email>), s vil
- han legge deg til i listen.
- </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 aae4fde936..0000000000
--- a/help/no/apx-bugs.sgml
+++ /dev/null
@@ -1,38 +0,0 @@
- <appendix id="bugs">
-
- <title>Kjente feil og begrensninger</title>
- <abstract>
- <para>
- Feilhndtering for Ximian Evolution gjres i <ulink
- url="http://bugzilla.ximian.com">Ximian's feilhndteringssystem
- </ulink> Du kan bruke dette, eller GNOME's <application>
- feilrapporteringsverkty</application> (kjent som
- <command>bug-buddy</command> p kommandolinjen) hvis du finner feil
- eller nsker be om nye funksjoner.
- </para>
- <para>
- Hvis du trenger mer hjelp med Ximian Evolution kan du beske
- Ximian's nettsted for brukersttte p <ulink
- url="http://support.ximian.com">ximian.com/support</ulink>.
- </para>
- </abstract>
-
- <para>
- Et antall ofte etterspurte funksjoner vil ikke bli inkludert i
- Ximian Evolution 1.0, men vi planlegger inkludere dem i versjon
- 1.1. Noen av dem er:
- <simplelist>
- <member>Direkte import av kontakter fra Microsoft Outlook</member>
- <member>Synkronisering av epost med hndholdte enheter</member>
- <member>Sttte for S/MIME</member>
- <member>Lesing av eksterne e-postmapper uten importere dem</member>
- <member>Import av WINMAIL.DAT vedlegg</member>
- <member>Avspilling av en lyd for indikere innkommende meldinger</member>
- </simplelist>
- </para>
- <para>
- En mer komplett liste over foresprsler etter funksjoner og andre
- saker er tilgjengelig p nett i Ximian's feilhndteringssystem.
- </para>
- </appendix>
-
diff --git a/help/no/apx-gloss.sgml b/help/no/apx-gloss.sgml
deleted file mode 100644
index e81f906ce3..0000000000
--- a/help/no/apx-gloss.sgml
+++ /dev/null
@@ -1,419 +0,0 @@
-<glossary id="apx-gloss">
-
- <title>Ordliste</title>
-
- <glossentry id="attachment">
- <glossterm>Vedlegg:</glossterm>
- <glossdef>
- <para>
- Enhver fil som sendes med en melding. Vedlegg kan ligge i selve
- meldingen eller ligge som et tillegg.
- </para>
- </glossdef>
- </glossentry>
-
-<glossentry id="automatic-indexing">
- <glossterm>Automatsk indeksering:</glossterm>
- <glossdef>
- <para>
- Forhndssorteringsprosedyre som lar
- <application>Evolution</application> referere til data raskt.
- Det muliggjre raskere sk og reduserer minnebruk for
- datavisninger.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="bcc">
- <glossterm>Bcc (Blind Carbon Copy):</glossterm>
- <glossdef>
- <para>
- En mte adressere en melding. Bcc brukes for sende en melding
- til en gruppe mennesker, men samtidig skjule deres navn og e-postadresser
- fra hverandre.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="cc">
- <glossterm>Cc (Carbon Copy):</glossterm>
- <glossdef>
- <para>
- Karbonkopier brukes for sende en tredjepart en kopi av en melding
- slik at de kan holdes oppdatert i konversasjonen uten vre p
- mottakerlisten.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="conduit">
- <glossterm>Conduit:</glossterm>
- <glossdef>
- <para>
- En synkroniseringskomponent er en liten applikasjon som kontrollerer
- overfring av data mellom en hndholdt enhet og en annen datamaskin.
- </para>
- </glossdef>
- </glossentry>
-
-
- <glossentry id="druid">
- <glossterm>Druide:</glossterm>
- <glossdef>
- <para>
- Et verkty som leder en bruker gjennom en serie steg, vanligvis for
- konfigurere eller sette opp et program. Samme som "Assisten" og
- "Veiviser".
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="evolution">
- <glossterm>Evolution:</glossterm>
- <glossdef>
- <para>
- <application>Evolution</application> er <acronym> GNOME's
- </acronym> gruppevareapplikasjon.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="execute">
- <glossterm>Kjr:</glossterm>
- <glossdef>
- <para>
- Det kjre et program. Enhver fil som kan kjres kalles
- kjrbar fil. <application>Evolution</application> kan laste ned
- kjrbare vedlegg, men fr disse kan kjres, m filene merkes som
- kjrbare via skallet eller en filhndterer. Dette er gjort som
- et sikkerhetstiltak for hindre automatisk eller tilfeldig kjring
- av ondsinnede programmer. For mer informasjon om kjrbare filer og
- filrettigheter, se dokumentasjonen for din filhndterer eller skall.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="expunge">
- <glossterm>Tm:</glossterm>
- <glossdef>
- <para>
- Nr meldinger merkes for sletting vil de bli vrende til de tmmes.
- Nr en melding tmmes vil den bli slettet permanent hvis den var merket
- for sletting.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="filetree">
- <glossterm>Filtre:</glossterm>
- <glossdef>
- <para>
- En mte beskrive en gruppe med filer p en datamaskin. Som et
- resultat av datamaskinens litt fordreide syn p virkeligheten
- blir toppen av treet kalt rotkatalogen, og vises med
- <filename>/</filename>.
- Resten av grenene sprer seg nedover fra roten. Ikke forveksle
- rotkatalogen med kontoen til root (superbruker),
- eller hjemmekatalogen til root,
- <filename>/root</filename>.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="filter">
- <glossterm>Filter:</glossterm>
- <glossdef>
- <para>
- I <application>Evolution</application>, er et filter en metode
- for automatisk sortering av meldinger. Du kan opprette filtre for utfre
- en eller flere handlinger p en melding som mter ethvert (eller alle)
- av et bredt utvalg av kriterier.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="forward">
- <glossterm>Videresend:</glossterm>
- <glossdef>
- <para>
- Hvis du mottar en melding som var ment for noen andre kan du bruke
- videresending for sende den til riktig person.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="groupware">
- <glossterm>Gruppevare:</glossterm>
- <glossdef>
- <para>
- Gruppevare er et uttrykk som beskriver en applikasjon som hjelper grupper
- av mennesker arbeide sammen. En gruppevareapplikasjon vil typisk
- ha flere produktivitetsfunksjoner innebygget i ett program,
- inkludert e-post, kalender, og adressebok.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="html">
- <glossterm>HTML:</glossterm>
- <glossdef>
- <para>
- Hyper-text Markup Language (<acronym>HTML</acronym>) er et sprk
- for beskrive utseende i elektroniske dokumenter som nettsider,
- hjelpfiler, og e-postmeldinger. HTML kan brukes til sette inn
- bilder og endre utseende p tekst i e-post og diskusjonsgruppeinnlegg.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="hot-key">
- <glossterm>Hurtigtast:</glossterm>
- <glossdef>
- <para>
- Hurtigtaster er tastaturkombinasjoner som brukes for utfre handlinger
- p datamaskinen uten bruke musen for gjre samme handling.
- Hurtigtaster kan gjre bruken av datamaskinen raskere.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="ical">
- <glossterm>iCal:</glossterm>
- <glossdef>
- <para>
- <application>iCal</application> er programmet som
- <application>Evolution</application> bruker for hndtere kalenderen
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="imap">
- <glossterm>IMAP:</glossterm>
- <glossdef>
- <para>
- Avhengig av hvem du spr, vil du hre at IMAP str for Internet
- Mail Access Protocol, eller Interim Mail Access Protocol. Uansett hva det
- str for gir det tilgang til e-post, vanligvis (men ikke
- alltid) lagret eksternt p en tjener i stedet for p en lokal
- harddisk. I motsetning til <glossterm>POP:</glossterm>.
- Dette vil ikke komme p prven.
- </para>
- </glossdef>
- </glossentry>
-
-
- <glossentry id="inline">
- <glossterm>Innfelt:</glossterm>
- <glossdef>
- <para>
- Vises som en del av en melding eller annet dokument, i stedet for som
- en separat fil. I motsetning til <glossterm
- linkend="attachment">Vedlegg:</glossterm>.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="ldap">
- <glossterm>LDAP:</glossterm>
- <glossdef>
- <para>
- LDAP, Lightweight Directory Access Protocol, lar en klient
- ske gjennom en stor database med adresser, telefonnummer, og
- mennesker, som er lagret p en tjener.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="mail-client">
- <glossterm>E-postklient:</glossterm>
- <glossdef>
- <para>
- En e-postklient er applikasjonen som en person bruker for lese og
- sende e-post. I motsetning til forskjellige typer e-posttjenere,
- som hndterer autentisering av brukere og dirigerer meldinger fra
- avsender til mottaker.
- </para>
- </glossdef>
- </glossentry>
-
-
- <glossentry id="minicard">
- <glossterm>Minikort:</glossterm>
- <glossdef>
- <para>
- Et format for visning av kontaktdata. Likt i utseende til et lite
- visittkort.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="nautilus">
- <glossterm>Nautilus:</glossterm>
- <glossdef>
- <para>
- <application>Nautilus</application> er neste generasjon
- filhndterer for <acronym>GNOME</acronym> skrevet av tidligere Eazel
- med flere.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="pop">
- <glossterm>POP:</glossterm>
- <glossdef>
- <para>
- POP, Post Office Protocol, er en mekanisme for transport
- av e-post. I motsetning til IMAP, brukes denne kun for hente meldinger
- fra en tjener og lagre den lokalt p din egen harddisk.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="protocol">
- <glossterm>Protokoll:</glossterm>
- <glossdef>
- <para>
- En akseptert kommunikasjonsmetode, spesielt for sending av
- bestemte typer informasjon mellom datamaskinsystemer.
- Eksempler inkluderer POP (Post Office Protocol), for e-post, og HTTP
- (HypterText Transfer Protocol), for nettsider.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="public-key-encryption">
- <glossterm>Public Key Encryption:</glossterm>
- <glossdef>
- <para>
- En sterk krypteringsmetode som bruker et sett med to "nkler", en
- offentlig og en som holdes privat. Data som krypteres med den
- offentlige nkkelen kan kun dekrypteres med den private nkkelen.
- Dess lengre nklene er jo vanskeligere er det bryte krypteringen.
- </para>
- </glossdef>
- </glossentry>
-
-
-
- <glossentry id="regular-expression">
- <glossterm>Vanlig uttrykk:</glossterm>
- <glossdef>
- <para>
- Et regulrt uttrykk, eller "regex", er en mte beskrive en
- tekststreng ved bruk av metategn eller jokertegn. For eksempel,
- uttrykket <userinput>fly.*so[a|u]p</userinput> betyr
- "enhver frase som begynner med 'fly' og slutter med 'soup' eller
- 'soap'". Hvis du sker etter dette uttrykket, vil du finne bde
- "fly in my soup" og "fly in my soap." Det er ikke tid til g
- i dybden her, men hvis du nsker det kan du se p dokumentasjonen
- for <command>grep</command>-kommandoen.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="script">
- <glossterm>Skript:</glossterm>
- <glossdef>
- <para>
- Et program skrevet i et fortolket (ikke kompilert)
- sprk. Brukes ofte som et synonym for "makro," for beskrive en rekke
- med forhndsinspilte kommandoer eller handlinger i en applikasjon.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="sendmail">
- <glossterm>Sendmail:</glossterm>
- <glossdef>
- <para>
- Som navnet hentyder, er <application>sendmail</application> et
- program som sender e-post. <application>Evolution</application>
- kan bruke dette istedet for <glossterm>SMTP:</glossterm>; noen
- foretrekker dette fordi det gir strre grad av fleksibilitet, men
- det er vanskeligere konfigurere.
- </para>
- </glossdef>
- </glossentry>
-
-
- <glossentry id="shortcut-bar">
- <glossterm>Snarveilinje:</glossterm>
- <glossdef>
- <para>
- En del av <application>Evolution</application> som gir brukere
- rask tilgang til de mest brukte delene av applikasjonen.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="signature">
- <glossterm>Signatur:</glossterm>
- <glossdef>
- <para>
- I e-post-terminologien er en signatur et stykke tekst plassert ved
- slutten av alle meldinger som sendes, p samme mte som en hndskrevet
- signatur i et brev. En signatur kan vre alt fra et favorittsitat
- til en lenke til en nettside; av hensyn til andre er normen at den
- ikke skal vre lengre enn fire linjer.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="SMTP">
- <glossterm>SMTP:</glossterm>
- <glossdef>
- <para>
- Dette er den vanligste mten transportere e-postmeldinger fra
- klientens datamskin (deg) til tjeneren. SMTP str for
- Simple Mail Transfer Protocol.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="tooltip">
- <glossterm>Verktytips:</glossterm>
- <glossdef>
- <para>
- En liten boks med forklarende tekst som vises nr muspekeren
- holdes i ro over en knapp eller en annen del av
- brukergrensesnittet.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="virus">
- <glossterm>Virus:</glossterm>
- <glossdef>
- <para>
- Et program som legger seg selv til andre filer eller programmer og
- som, nr det kjres, sprer seg til flere programmer og andre
- datamaskiner. Et virus kan forrsake stor skade ved bruke
- bndbredde, diskplass, slette filer, eller pne sikkerhetshull.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="vcard">
- <glossterm>vCard:</glossterm>
- <glossdef>
- <para>
- Et filformat for utveksling av kontaktinformasjon. Nr du mottar
- et adressekort vedlagt i en melding, er det sannsynligvis i vCard-
- format. Ikke til forveksling med <glossterm
- linkend="vfolder">vFolder:</glossterm>.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="vfolder">
- <glossterm>vFolder:</glossterm>
- <glossdef>
- <para>
- Et verkty for organisering av meldinger. vFoldere lar deg opprette en
- mappe som inneholder resultatet av et komplekst sk. vFolder-innhold
- oppdateres dynamisk.
- </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 77ebe4e807..0000000000
--- a/help/no/config-prefs.sgml
+++ /dev/null
@@ -1,744 +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
- Settings</guimenuitem></menuchoice> from the Calendar
- view. This will open up the
- <interface>Preferences</interface> window. It contains four
- tabs: <guilabel>General</guilabel>, <guilabel>Display</guilabel>, <guilabel>Task List</guilabel>, and <guilabel>Other</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-general">
- <title>Calendar's General Settings</title>
- <para>
- The <guilabel>Time display</guilabel> tab lets you set the
- following:
- <variablelist>
- <varlistentry>
- <term>Time zone</term>
- <listitem>
- <para>
- The city you're located in, to judge your time zone.
- </para>
- </listitem>
- </varlistentry>
- <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>Work Week</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>
- <varlistentry>
- <term>First day of the week</term>
- <listitem>
- <para>You can set weeks to start on Sunday or on Monday.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Start of day</term>
- <listitem>
- <para>
- Says what time of the day your weekday starts. This will show all times till the end of the day, regardless of there is an appointment during the time period.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>End of day</term>
- <listitem>
- <para>
- Sets the time the day ends at.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
- <sect2 id="config-prefs-cal-display">
- <title>Display</title>
- <para>
- The <interface>Display</interface> section lets you configure some visual properties of the calendar.
- </para>
- <para>The display properties you can set are:
-
- <variablelist>
- <varlistentry>
- <term>Time divisions</term>
- <listitem>
- <para>
- Sets the increments shown on the daily view in the calendar. You can set this to be:
- <itemizedlist>
- <listitem>
- <para>
- 5 minutes
- </para>
- </listitem>
- <listitem>
- <para>
- 10 minutes
- </para>
- </listitem>
- <listitem>
- <para>
- 15 minutes
- </para>
- </listitem>
- <listitem>
- <para>
- 30 minutes
- </para>
- </listitem>
- <listitem>
- <para>
- 60 minutes
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Show appointment end times in week and month views</term>
- <listitem>
- <para>
- If there is space, <application>Evolution</application> will show the end times in the week and month views for each appointment.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Compress weekends in month view</term>
- <listitem>
- <para>
- If checked, your weekends will be shown in one box, instead of one for each day in the month view.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Show week numbers in date navigator</term>
- <listitem>
- <para>
- This will show the week numbers next to the respective weeks in the calendar.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
-
- <sect2 id="config-prefs-cal-tasklist">
- <title>Task List Settings</title>
- <para>
- You can choose what information the To Do list displays and the
- way it is displayed.
- <variablelist>
- <varlistentry>
- <term>Tasks due today</term>
- <listitem>
- <para>
- Configures what color to set your tasks that are due today to.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Overdue tasks</term>
- <listitem>
- <para>
- Configures what color to set your overdue items to.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
-
- <sect2 id="config-prefs-cal-other">
- <title>Other Calendar Settings</title>
- <para>
- This configures miscellaneous items for the calendar and todo list's functionality.
- <variablelist>
- <varlistentry>
- <term>Ask for confirmation when deleting items</term>
- <listitem>
- <para>
- When you delete an item in either the Task List or the Calendar, you will be prompted to confirm that you want to delete the item.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Create new appointments with a default reminder</term>
- <listitem>
- <para>
- All your appointments will be created using a default reminder enabled. You can still change what way you are reminded though. If enabled, you can then set the time before your appointment to be reminded.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
- </sect1>
-
- <sect1 id="config-prefs-contact">
- <title>Managing the Addressbook</title>
- <para>
- The addressbook does not have a large list of configuration
- settings, but those that are there can be found in the
- <guimenu>Tools</guimenu> menu.
- </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>
-How broad the search is in the directory.
- </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/no/config-sync.sgml b/help/no/config-sync.sgml
deleted file mode 100644
index c6bd2c684c..0000000000
--- a/help/no/config-sync.sgml
+++ /dev/null
@@ -1,126 +0,0 @@
- <chapter id="config-sync">
- <title>Oppsett av synkronisering</title>
- <para>
- Synkronisering presenterer to problemer du m hndtere.
- <simplelist>
- <member>
- Din datamaskin m gjenkjenne og godta din hndholdte.
- For tiden sttter, <application>Ximian Evolution</application>
- kun Palm-OS enheter som PalmPilot og Handspring Visor.
- </member>
- <member>
- Du m bestemme hvilken oppfrsel du nsker for synkroniseringen.
- </member>
- </simplelist>
- </para>
-
- <para>
- Hvis du ikke har brukt en hndholdt enhet mot din datamaskin
- fr m du kjre GNOME <application>kontrollsenter</application>
- ved velge <menuchoice><guimenu>System</guimenu><guimenuitem>
- Innstillinger</guimenuitem></menuchoice>,
- og srge for at <application>Pilot Link</application> er
- konfigurert p en korrekt mte.
- </para>
- <para>
- Nr din datamaskin og din Palm-OS-enhet snakker med hverandre,
- velg <glossterm
- linkend="conduit">komponenter</glossterm> du nsker under
- <guilabel>Pilot-komponenter</guilabel> seksjonen i kontrollsenteret
- Du kan bruke komponenter for synkronisering av data mot flere
- applikasjoner; <application>Ximian Evolution</application>
- komponentene er merket <guilabel>EAdresse</guilabel>, for
- kontaktene i din adressebok, <guilabel>EKalender</guilabel>,
- for din kalender, og <guilabel>EOppgave</guilabel>, for din
- oppgaveliste.
- </para>
- <para>
- For aktivere en komponent klikker du
- <guibutton>Aktiver</guibutton>. Klikk s
- <guibutton>Innstillinger</guibutton> for endre oppfrsel ved
- aktivering. Dine valg vil variere avhengig av komponent,
- men vil typisk vre:
-
- <variablelist>
- <varlistentry>
- <term>Deaktivert:</term>
- <listitem>
- <para>
- Ikke gjr noe.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Synkroniser:</term>
- <listitem>
- <para>
- Kopier nye data fra datamaskinen til den hndholdte og
- fra den hndholdte til datamaskinen. Fjern oppfringer
- som var p begge systemene men har blitt slettet p
- en av dem.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Kopier fra pilot:</term>
- <listitem>
- <para>
- Hvis det finnes nye data p den hndholdte enheten,
- kopier disse til datamaskinen.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Kopier til pilot:</term>
- <listitem>
- <para>
- Kopier nye data fra datamaskinen til den hndholdte.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Flett fra pilot:</term>
- <listitem>
- <para>
- Kopier nye data fra den hndholdte til datamaskinen, og
- fjern all informasjon fra datamaskinen som ogs er slettet
- p den hndholdte.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Flett til pilot:</term>
- <listitem>
- <para>
- Kopier nye data fra datamaskinen til den hndtholdte og
- fjern all informasjon fra den hndholdte hvis den ogs
- er slettet p datamaskinen.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
-
- <para>
- Velg oppfrselen du nsker for hver komponent du velger bruke.
- Hvis du er usikker kan du bruke
- <guilabel>Synkroniser</guilabel>. Plasser s din hndholdte i
- dokken og trykk p HotSync knappen.
- </para>
- <para>
- <tip>
- <title>Forhindring av datatap</title>
- <para>
- Det er alltid lurt ta en sikkerhetskopi. For gjre dette
- lager du en kopi av katalogen <filename>evolution</filename>
- i din hjemmekatalog.
- </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 3f8c797af6..0000000000
--- a/help/no/evolution-no.omf
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<omf>
- <resource>
- <creator>
- Ximian, Inc.
- </creator>
- <title>
- Evolution brukerhåndbok
- </title>
- <date>2002</date>
- <subject category="GNOME|Applikasjoner"/>
- <format mime="text/sgml"/>
- <identifier url="index.html"/>
- <language code="no"/>
- </resource>
-</omf>
diff --git a/help/no/evolution.sgml b/help/no/evolution.sgml
deleted file mode 100644
index 348c30c3a8..0000000000
--- a/help/no/evolution.sgml
+++ /dev/null
@@ -1,128 +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 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>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. Du kan f en kopi av
- <citetitle>GNU Free Documentation License</citetitle> fra Free Software
- foundation ved g til <ulink type="http" url="http://www.fsf.org">deres
- nettside</ulink> eller ved skrive til: Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA..
- </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 1.0 av Evolution's brukerhndbok.
- </releaseinfo>
-
- </bookinfo>
-
- &PREFACE;
-
- <part id="usage">
- <title>Kom i gang med Ximian Evolution</title>
- <partintro>
- <para>
- Frste del av <application>Evolution</application> hndboken
- beskriver hvordan du bruker <application>Evolution</application>
- for e-post, kontakthndtering, og 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 Ximian Evolution</title>
- <partintro>
- <para>
- <application>Ximian 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 fungerende system. I tilfellet med
- <application>Ximian 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 fullt ut.
- Denne delen av boken vil beskrive denne prosessen, fra et lite
- glimt av assistenten for oppsett til en omvisning i dialoger for
- brukervalg som gr mer i dybden.
- </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/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 340a408847..0000000000
--- a/help/no/menuref.sgml
+++ /dev/null
@@ -1,421 +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>New Item:</term>
- <listitem>
- <para>
- Press <keycombo action="simul"> <keycap>Ctrl</keycap>
- <keycap>N</keycap> </keycombo> to open a new item
- for whatever part of <application>Ximian
- Evolution</application> you're working on. In mail,
- that means you'll create a new message. If you're
- looking at your addressbook, <keycombo
- action="simul"> <keycap>Ctrl</keycap>
- <keycap>N</keycap> </keycombo> creates a new contact
- card, and in the calendar, a new appointment.
- </para>
- </listitem>
- </varlistentry>
-
-
- <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 messages.
- </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>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>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>
-
- <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>Addressbook</title>
- <para>
- Here are shortcuts for the most frequent addressbook actions:
- <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/no/preface.sgml b/help/no/preface.sgml
deleted file mode 100644
index 9637beaf4c..0000000000
--- a/help/no/preface.sgml
+++ /dev/null
@@ -1,83 +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>, which 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 buttons and other portions of the graphical interface</member>
-
- <member> Menu selections look like this:
- <menuchoice>
- <guimenu>Menu</guimenu>
- <guisubmenu>Submenu</guisubmenu>
- <guimenuitem>Menu Item</guimenuitem>
- </menuchoice>
- </member>
- <member><guibutton>Buttons</guibutton> you can
- click</member> <member><userinput>Anything you type
- in</userinput></member> <member><computeroutput>Text
- output from a computer</computeroutput></member>
- <member><glossterm linkend="apx-gloss">Words</glossterm>
- that are defined in the <xref linkend="apx-gloss">.</member>
- </simplelist>
-</para>
-<para>
-We'll provide assorted bits of additional information in tips set off from the rest of the book, as well.
-
- <tip id="example-tip">
- <title>Tip</title>
- <para>
- Tips and bits of extra information will look like
- this.
- </para>
- </tip>
-</para>
-
-<para>
-Examples are also set off from the rest of the text. They look like this:
-
- <example>
- <title>Example Example</title>
- <para>
- This is what an example looks like. We'll provide
- examples for some of the more complicated tasks you
- might be performing.
- </para>
- </example>
-</para>
-<para>
-Lastly, we'll have warnings, in cases where you should be careful:
-
- <warning id="example-warning">
- <title>Example Warning</title>
- <para>
- This is what a warning looks like. If there's a chance
- you'll run into trouble, we'll warn you beforehand.
- </para>
- </warning>
- </para>
- </sect1>
-</preface>
-
diff --git a/help/no/topic.dat b/help/no/topic.dat
deleted file mode 100644
index 6e9afad2ef..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-summary.html Evolution sammendrag
-usage-mail.html hente og sende e-post
-usage-contact.html Bruk av kontakter
-usage-calendar.html Hndtering av avtaler
-config-prefs.html Konfigurasjon av Evolution
-menuref.html Hurtigreferanse
-apx-gloss.html Ordliste
diff --git a/help/no/usage-calendar.sgml b/help/no/usage-calendar.sgml
deleted file mode 100644
index 4a1745e55a..0000000000
--- a/help/no/usage-calendar.sgml
+++ /dev/null
@@ -1,561 +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
- peers.
- </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.
-
- 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. To do this, simply click and drag on the days that you wish to view in your calendar.
-
- </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 or
- month, you'll move around by just that much.
- To come back to today's listing, click the
- <guibutton>Today</guibutton> button in the toolbar.
- </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 Appointment</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>
- <para>
- <application>Evolution</application> supports the use of timezones. If you share calendar files with friends or co-workers, it is quite possible you will need to configure your timezone. To configure your timezone:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Click
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenuitem>Calendar Settings</guimenuitem>
- </menuchoice>
- </para>
- </listitem>
- <listitem>
- <para>
- Click the <guibutton>Globe</guibutton> button in the <guilabel>Time</guilabel> section, located in the <guilabel>General</guilabel> tab.
- </para>
- </listitem>
- <listitem>
- <para>
- Each red dot represents a major city. Click a dot and click <guibutton>OK</guibutton> to select your time zone.
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para>
- You can also configure timezone information specific to Start and End time in each appointment. To do that, simply create a new appointment and click on a globe to customize the timezone that the time exists in.
- </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
- <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>
- </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> can handle not only time that you're busy, but free time. This can be useful if you're on a network sharing calendar files. You can easily compare schedules with other people, allowing easy setup of a RSVP.
- </para>
- <para>
- To set your appointment to be free or busy, simply click the box in the <guilabel>Show Time As</guilabel> section in the <guilabel>Appointment Editor</guilabel>.
- </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 schedule
- group meetings and help you manage responses to meeting
- requests.
- </para>
- <para>
- When you create a meeting or group appointment, you can
- specify the attendees in several categories, such as "chair"
- or "required." When you save the appointment listing, each
- attendee will be sent an email with the appointment
- information and gives them the option to respond.
- </para>
- <para>
- To schedule a meeting:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Select
- <menuchoice>
- <guimenu>Actions</guimenu> <guimenuitem>Schedule
- Meeting</guimenuitem> </menuchoice>. The
- <guilabel>Scheduling</guilabel> and
- <guilabel>Meeting</guilabel> tabs open.
- </para>
- </listitem>
- <listitem>
- <para>
- If you have multiple Evolution identities, choose the
- one you'll use by selecting an item in the
- <guilabel>Sent By</guilabel> field.
- </para>
- </listitem>
- <listitem>
- <para>
- Click the space labelled <guilabel>Click here to add an
- attendee</guilabel> to enter the names and email
- addresses of people you will invite, or click the
- <guibutton>Invite Others</guibutton> to select them from
- your addressbook.
- </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 a Meeting Request</title>
- <para>
- Meeting requests are sent as iCal attachments. To view or
- respond to one, click on the attachment icon and view it
- inline in the mail window. 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>
- Tentatively 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>Getting Responses to Meeting Requests</title>
- <para>
- Once you get a reply to your meeting invitation, you'll need
- to view it inline in the email. Click the attachment and
- select <guibutton>View Inline</guibutton>. At the bottom, you
- can 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. You can use the list
- in a larger window 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.
- </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 right click on it and select <guibutton>Open</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>
- <sect2 id="task-folders">
- <title>Folders for Your Tasks</title>
- <para>
- Like any other component in
- <application>Evolution</application>, you can create a folder
- to help organize your tasks. To do this:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Open the <guilabel>Folders Bar</guilabel>.
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guibutton>Tasks</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para>
- Right click on <guibutton>Tasks</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para>
- Click <menuchoice><guimenuitem>Create New Folder</guimenuitem></menuchoice>.
- </para>
- </listitem>
- <listitem>
- <para>
- Enter the folder name.
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guibutton>OK</guibutton>
- </para>
- </listitem>
- </orderedlist>
- </para>
- </sect2>
- </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>
- Lucy, the office manager for a small company, has one calendar
- for her own schedule. She maintains one for the conference
- room, to 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.
- </para>
- <para>
- Each calendar folder can hold only one calendar.
- </para>
- </sect1>
-</chapter>
diff --git a/help/no/usage-contact.sgml b/help/no/usage-contact.sgml
deleted file mode 100644
index dc11b4bd0a..0000000000
--- a/help/no/usage-contact.sgml
+++ /dev/null
@@ -1,609 +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> addressbook 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 addressbook, see <xref
- linkend="config-prefs-contact">. You can import contacts from
- other contact management tools with the Import tool by
- selecting
- <menuchoice><guimenu>File</guimenu><guimenuitem>Import</guimenuitem></menuchoice>,
- or by mailing them to yourself as vCard attachments.
- </para>
-
- <para>
- The toolbar for the addressbook 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. As an example,
- we'll use the Ximian mascot, <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 Addressbook</title>
- <para>
- Organizing your addressbook is a lot like organizing your
- mail. You can have folders and searches the same way you can
- with mail, but the addressbook 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>
-
-<!-- UNIMPLEMENTED FEATURE
- <para>
- Another useful <application>Evolution</application> feature is
- its ability to recognize when people live or work together. If
- several people in your addressbook 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>
-
- <!-- 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 Addressbook
- 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 addressbooks, 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 addressbooks, 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. You do this by dragging and dropping your desired contacts into the local contacts list.
- </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>
-
-<!-- Unimplemented features:
- <para>
- You can also use the addressbook 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>
- <para>
- Need a map or directions? Click <guibutton>MapIt</guibutton> from
- within the addressbook, and <application>Evolution</application>
- will map the address for you online.
- </para>
- -->
-
-
-
-</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 e16da21579..0000000000
--- a/help/no/usage-exec-summary.sgml
+++ /dev/null
@@ -1,315 +0,0 @@
-<!--
-<!DOCTYPE Chapter PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN">
--->
-<chapter id="usage-summary">
- <title>Getting Oriented with the Ximian Evolution Summary</title>
-
- <sect1 id="summary-intro">
- <title>Using 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>
- Mail summary
- </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. Imperial units are sometimes called British
- units, but are used almost exclusively in the United
- States. Britain, and most of the rest of the world, use
- metric units.
- </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/no/usage-mail-org.sgml b/help/no/usage-mail-org.sgml
deleted file mode 100644
index ce6f75e69c..0000000000
--- a/help/no/usage-mail-org.sgml
+++ /dev/null
@@ -1,1021 +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="importing-mail-and-settings">
- <title>Importing Your Old Email and Settings</title>
- <para>
- <application>Evolution</application> allows you to import old email and data so that you don't need to worry about losing your old information.
- </para>
- <sect2 id="importing-mail">
- <title>Importing Email</title>
- <para>
- <application>Ximian Evolution</application> can import the following types of
- files:
- <variablelist>
- <varlistentry>
- <term>VCard (.vcf, gcrd):</term>
- <listitem>
- <para>
- The addressbook format used by the GNOME, KDE, and
- many other contact management applications. You
- should be able to export to VCard format from any
- address book application.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>iCalendar (.ics):</term>
- <listitem>
- <para>
- A format for storing calendar files. iCalendar is used by
- PalmOS based handhelds, Ximian <application>Evolution</application>, and Microsoft <application>Outlook</application>.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Microsoft Outlook Express 4 (.mbx):</term>
- <listitem>
- <para>
- Email file format used by Microsoft Outlook Express
- 4. For other versions of Microsoft Outlook and Outlook Express, see
- the workaround described in the note below.
- </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>
- To import your old email:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Click <menuchoice><guimenu>File</guimenu><guimenuitem>Import</guimenuitem></menuchoice>.
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guibutton>Next</guibutton> after reading the Welcome screen.
- </para>
- </listitem>
- <listitem>
- <para>
- Select <guibutton>Import a single file</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para>
- Find the file that you wish to import into <application>Evolution</application>.
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guibutton>Import</guibutton>
- </para>
- </listitem>
- </orderedlist>
- </para>
- </sect2>
- <sect2 id="importing-preferences">
- <title>Importing Preferences</title>
- <para>
- <application>Evolution</application> can import all your old mail, contacts, and other information from other applications, making your transition to <application>Evolution</application> even easier.
- </para>
- <para>
- To import your old information:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Click <menuchoice><guimenu>File</guimenu><guimenuitem>Import</guimenuitem></menuchoice>.
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guibutton>Next</guibutton> after reading the Welcome screen.
- </para>
- </listitem>
- <listitem>
- <para>
- Select <guibutton>Import data and settings from older programs</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para>
- The left-most column shows the application which your information will be imported from. You then select checkboxes on each component to import different properties of each application.
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guibutton>Next</guibutton>
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guibutton>Import</guibutton>
- </para>
- </listitem>
- </orderedlist>
- </para>
-
-<para>
- <note>
- <title>Microsoft Outlook and Outlook Express Users</title>
- <para>
- Microsoft Outlook, and versions of Outlook Express after
- version 4, use proprietary formats that <application>Ximian
- Evolution</application> cannot read or import. For contacts,
- you may have to email them to yourself and import them that
- way. For email, there is a simpler workaround:
- <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. There's more information about
- why this works, and how, at the Ximian support website.
- </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>
-
- </sect2>
- </sect1>
- <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>
- <note>
- <title>How Does Filtering on Mailing Lists Work?</title>
- <para>
- Filtering on mailing list actually looks for a
- specific mailing-list header called the
- <computeroutput>X-BeenThere</computeroutput>
- header, used to identify mailing lists or other
- redistributors of mail.
- </para>
- </note>
- </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>
- <example id="filter-example">
- <title>Using a Filter to Avoid Spam</title>
- <para>
- A good deal of bulk mail is eventually tagged with the
- <computeroutput>Precedence: Bulk</computeroutput> header at
- one point or another. Not all of it is, of course, and
- there are "good" messages (mailing lists you subscribe to,
- for example) that are also considered "Bulk" mail.
- However, if you filter out all the mail with that header,
- you'll catch a lot of the mail you don't want to get.
- </para>
- <para>
- To catch them and automatically mark them for deletion, do
- the following:
- <orderedlist>
-
- <listitem><para>
- Select <menuchoice><guimenu>Tools</guimenu><guimenuitem>Filters</guimenuitem></menuchoice>.
- </para></listitem>
-
- <listitem><para>
- Click <guibutton>New</guibutton>.
- </para></listitem>
-
- <listitem><para>
- Set the first part of your search critera to look in a <guilabel>Specific header</guilabel>.
- </para></listitem>
-
- <listitem><para>
- Enter <userinput>Precedence</userinput> as the name of the header.
- </para></listitem>
-
- <listitem><para>
- Choose <guilabel>contains</guilabel> at the second drop-down box.
- </para></listitem>
-
- <listitem><para>
- Enter <userinput>Bulk</userinput> as the content to search for.
- You're now working with all email that has the word "Bulk" in the
- "Precedence" header.
- </para></listitem>
-
- <listitem><para>
- For actions, select "Move to Folder" and choose the
- folder where you'd like to place bulk mail.
- </para></listitem>
-
- <listitem><para> If you like, add another action and
- choose <guilabel>Delete</guilabel>.
- </para></listitem>
-
- <listitem><para>
- Click OK. You're done.
- </para></listitem>
- </orderedlist>
- </para>
- </example>
- </sect2>
-
-
-
- <sect2 id="filters-edit">
- <title>Editing Filters</title>
- <para>
- To edit a filter:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Select
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenuitem>Filters</guimenuitem>
- </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. If you have no vFolders, the Unmatched folder
- will contain all of your mail.
- </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>
- </orderedlist>
-</para>
-<para>
-Remote folders are considered active if you are connected to the
-server; you must be connected to your mail server for the vFolder to
-include any messages from that source.
-</para>
-<para>
- <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>
-</chapter>
diff --git a/help/no/usage-mail.sgml b/help/no/usage-mail.sgml
deleted file mode 100644
index 2a1958805e..0000000000
--- a/help/no/usage-mail.sgml
+++ /dev/null
@@ -1,2005 +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 linkend="attachment">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 (for example, the welcome message in your
- Inbox when you first start <application>Ximian
- Evolution</application>) <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 --
- potentially a very long one -- 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>Tentatively 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. If you prefer to have every mail folder displayed, you
- can select that option as well. However, if you'd like to choose
- specific items in your mailbox, and exclude others, you can use
- the subscription management tool to do that.
- </para>
- <para>
- Here's how:
- <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/no/usage-mainwindow.sgml b/help/no/usage-mainwindow.sgml
deleted file mode 100644
index b7ff02ecf7..0000000000
--- a/help/no/usage-mainwindow.sgml
+++ /dev/null
@@ -1,1174 +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: Your full name (Example: John Doe).
- </para>
- </listitem>
- <listitem>
- <para>
- Email Address: Your email address (Example: john@doe.com)
- </para>
- </listitem>
- <listitem>
- <para>
- Organization: The company where you work (optional).
- </para>
- </listitem>
- <listitem>
- <para>
- Signature file: 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: There are numerous types of servers
- from which <application>Ximian Evolution</application>
- can fetch your mail. Ask your system administrator if
- you're not sure which of the following are available to
- you:
- <itemizedlist>
- <listitem>
- <para>
- POP: Downloads your email to your hard disk for
- permanent storage.
- </para>
- </listitem>
- <listitem>
- <para>
- IMAP: Keeps the email on your server so you
- can access your email from multiple systems.
- </para>
- </listitem>
- <listitem>
- <para>
- Unix mail spool file: If you run a mail
- server on your desktop computer, choose this
- option.
- </para>
- </listitem>
- <listitem>
- <para>
- Standard Unix .mbox file: 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: If you download your
- mail using qmail, you'll want to use this.
- </para>
- </listitem>
- <listitem>
- <para>
- None: Select this if you do not plan to
- check mail with this account.
- </para>
- </listitem>
- </itemizedlist>
-
- <note id="imap-note-one">
- <title>What's an IMAP Namespace?</title>
- <para>
- For IMAP mail servers, your sysadmin may provide
- you with a specific namespace, the path on the
- IMAP server where you check for mail. If you
- check your IMAP mail and your folder list includes
- files that don't look like mail folders, you
- probably need to change your mail
- namespace. Typical values are "mail" and "Mail."
- If you prefer, you can choose to subscribe to
- individual mail folders one at a time. For more
- information about how to use IMAP mail, see <xref
- linkend="usage-mail-subscriptions">.
- </para>
- </note>
- </para>
- </listitem>
- <listitem>
- <para>
- Email Server: This is the address of the server you're
- downloading from.
- </para>
- </listitem>
- <listitem>
- <para>
- Username: The username that you login to your email. That
- is often the part before the @ in your email.
- </para>
- <para>
- Authentication Type: Chances are you are using
- <guilabel>Password</guilabel>. Ask your administrator
- for more details. You can have <application>Ximian
- Evolution</application> make sure you've chosen
- correctly by clicking <guibutton>Check for supported
- types</guibutton>.
- </para>
- <para>
- Remember Password: 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: There are numerous server types that
- <application>Ximian Evolution</application> supports for sending your
- mail.
- <itemizedlist>
- <listitem>
- <para>
- SMTP: Downloads mail into your mailbox file.
- </para>
- </listitem>
- <listitem>
- <para>
- Sendmail: Uses another program to download your mail
- to your mailbox files.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- <listitem>
- <para>
- Host: If you chose SMTP, enter the server's name
- or IP address here.
- </para>
- </listitem>
- <listitem>
- <para>
- Server requires authentication: If your server
- requires you to enter a password to send mail, check
- this box.
- </para>
- </listitem>
- <listitem>
- <para>
- Authentication Type: 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: 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: 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. If you want, you
- can skip this step and return to it at a later time by
- selecting
- <menuchoice><guimenu>File</guimenu><guimenuitem>Import</guimenuitem></menuchoice>.
- </para>
- <para>
- <application>Ximian Evolution</application> can import the following types of
- files:
- <variablelist>
- <varlistentry>
- <term>VCard (.vcf, gcrd):</term>
- <listitem>
- <para>
- The addressbook format used by the GNOME, KDE, and
- many other contact management applications. You
- should be able to export to VCard format from any
- address book application.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Microsoft Outlook Express 4 (.mbx):</term>
- <listitem>
- <para>
- Email file format used by Microsoft Outlook Express
-4. For other versions of Microsoft Outlook and Outlook Express, see
-the workaround described in the note below.
- </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>Microsoft Outlook and Outlook Express Users</title>
- <para>
- Microsoft Outlook, and versions of Outlook Express after
- version 4, use proprietary formats that <application>Ximian
- Evolution</application> cannot read or import. For contacts,
- you may have to email them to yourself and import them that
- way. For email, there is a simpler workaround:
- <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. There's more information about
- why this works, and how, at the Ximian support website.
- </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 Tool</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 Addressbook holds contacts, with address, phone, and
- other personal 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>-- 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 the <keycap>Tab</keycap>
- key 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 -- for
- example, replying to a message -- 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>
-<figure>
- <title>The Evolution Summary</title>
-
-<screenshot>
-<graphic format="png" fileref="figures/summary" srccredit="Kevin Breit">
-</screenshot>
-</figure>
- </para>
-
-<para>
-<inlinemediaobject><imageobject><imagedata fileref="figures/full-1" format="png"></imageobject></inlinemediaobject> <guilabel>Weather Summary</guilabel>
-</para>
-<para>
-Shows you the latest weather updates from hundreds of cities around the world.
-</para>
-<para>
-<inlinemediaobject><imageobject><imagedata fileref="figures/full-2" format="png"></imageobject></inlinemediaobject> <guilabel>News Feeds</guilabel>
-</para>
-<para>
-Displays up to the minute news from your favorite websites.
-</para>
-<para>
-<inlinemediaobject><imageobject><imagedata fileref="figures/full-3" format="png"></imageobject></inlinemediaobject> <guilabel>Mail Summary</guilabel>
-</para>
-<para>
-Shows you how many email messages you have in your selected folders, waiting to be read.
-</para>
-<para>
-<inlinemediaobject><imageobject><imagedata fileref="figures/full-4" format="png"></imageobject></inlinemediaobject> <guilabel>Calendar Summary</guilabel>
-</para>
-<para>
-Shows you your calendar.
-</para>
-<para>
-<inlinemediaobject><imageobject><imagedata fileref="figures/full-5" format="png"></imageobject></inlinemediaobject> <guilabel>Tasks</guilabel>
-</para>
-<para>
-Shows your pending tasks
-</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>
- spools and files created by other mail programs.
-
-<!-- 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>Message List</guilabel>
- </para>
-
- <para>
- The <guilabel>Message 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.
-
-</para>
-<para> Just like with folders, you can right-click on messages in the
- message list and get a menu of possible actions: you can move,
- delete, or undelete them, and create filters or vFolders based
- on them.
- </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 and functions with <glossterm
- linkend="ldap">LDAP</glossterm> directories on a 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/no/usage-notes.sgml b/help/no/usage-notes.sgml
deleted file mode 100644
index 1ff2283128..0000000000
--- a/help/no/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/no/usage-print.sgml b/help/no/usage-print.sgml
deleted file mode 100644
index e611b97b00..0000000000
--- a/help/no/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 your mail, calendar, or addressbook.
- </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/no/usage-sync.sgml b/help/no/usage-sync.sgml
deleted file mode 100644
index 5b93a65736..0000000000
--- a/help/no/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/omf.make b/help/omf.make
deleted file mode 100644
index 3261e00158..0000000000
--- a/help/omf.make
+++ /dev/null
@@ -1,53 +0,0 @@
-#
-# No modifications of this Makefile should be necessary.
-#
-# This file contains the build instructions for installing OMF files. It is
-# generally called from the makefiles for particular formats of documentation.
-#
-# Note that you must configure your package with --localstatedir=/var/lib
-# so that the scrollkeeper-update command below will update the database
-# in the standard scrollkeeper directory.
-#
-# If it is impossible to configure with --localstatedir=/var/lib, then
-# modify the definition of scrollkeeper_localstate_dir so that
-# it points to the correct location. Note that you must still use
-# $(localstatedir) in this or when people build RPMs it will update
-# the real database on their system instead of the one under RPM_BUILD_ROOT.
-#
-# Note: This make file is not incorporated into xmldocs.make because, in
-# general, there will be other documents install besides XML documents
-# and the makefiles for these formats should also include this file.
-#
-# About this file:
-# This file was taken from scrollkeeper_example2, a package illustrating
-# how to install documentation and OMF files for use with ScrollKeeper
-# 0.3.x and 0.4.x. For more information, see:
-# http://scrollkeeper.sourceforge.net/
-# Version: 0.1.2 (last updated: March 20, 2002)
-#
-
-omf_dest_dir=$(datadir)/omf/@PACKAGE@
-scrollkeeper_localstate_dir = $(localstatedir)/scrollkeeper
-
-omf: omf_timestamp
-
-omf_timestamp: $(omffile)
- -for file in $(omffile); do \
- scrollkeeper-preinstall $(docdir)/$(docname).xml $(srcdir)/$$file $$file.out; \
- done
- touch omf_timestamp
-
-install-data-hook-omf:
- $(mkinstalldirs) $(DESTDIR)$(omf_dest_dir)
- for file in $(omffile); do \
- $(INSTALL_DATA) $$file.out $(DESTDIR)$(omf_dest_dir)/$$file; \
- done
- -scrollkeeper-update -p $(scrollkeeper_localstate_dir) -o $(DESTDIR)$(omf_dest_dir)
-
-uninstall-local-omf:
- -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/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/help/xmldocs.make b/help/xmldocs.make
deleted file mode 100644
index ad65ccf9f4..0000000000
--- a/help/xmldocs.make
+++ /dev/null
@@ -1,96 +0,0 @@
-#
-# No modifications of this Makefile should be necessary.
-#
-# To use this template:
-# 1) Define: figdir, docname, lang, omffile, and entities in
-# your Makefile.am file for each document directory,
-# although figdir, omffile, and entities may be empty
-# 2) Make sure the Makefile in (1) also includes
-# "include $(top_srcdir)/xmldocs.make" and
-# "dist-hook: app-dist-hook".
-# 3) Optionally define 'entities' to hold xml entities which
-# you would also like installed
-# 4) Figures must go under $(figdir)/ and be in PNG format
-# 5) You should only have one document per directory
-# 6) Note that the figure directory, $(figdir)/, should not have its
-# own Makefile since this Makefile installs those figures.
-#
-# example Makefile.am:
-# figdir = figures
-# docname = scrollkeeper-manual
-# lang = C
-# omffile=scrollkeeper-manual-C.omf
-# entities = fdl.xml
-# include $(top_srcdir)/xmldocs.make
-# dist-hook: app-dist-hook
-#
-# About this file:
-# This file was taken from scrollkeeper_example2, a package illustrating
-# how to install documentation and OMF files for use with ScrollKeeper
-# 0.3.x and 0.4.x. For more information, see:
-# http://scrollkeeper.sourceforge.net/
-# Version: 0.1.2 (last updated: March 20, 2002)
-#
-
-
-# ************* Begin of section some packagers may need to modify **************
-# This variable (docdir) specifies where the documents should be installed.
-# This default value should work for most packages.
-# docdir = $(datadir)/@PACKAGE@/doc/$(docname)/$(lang)
-docdir = $(datadir)/gnome/help/$(docname)/$(lang)
-
-# ************** You should not have to edit below this line *******************
-xml_files = $(entities) $(docname).xml
-
-EXTRA_DIST = $(xml_files) $(omffile)
-CLEANFILES = omf_timestamp
-
-# If the following file is in a subdir (like help/) you need to add that to the path
-include $(top_srcdir)/help/omf.make
-
-all: omf
-
-$(docname).xml: $(entities)
- -ourdir=`pwd`; \
- cd $(srcdir); \
- cp $(entities) $$ourdir
-
-app-dist-hook:
- if test "$(figdir)"; then \
- $(mkinstalldirs) $(distdir)/$(figdir); \
- for file in $(srcdir)/$(figdir)/*.png; do \
- basefile=`echo $$file | sed -e 's,^.*/,,'`; \
- $(INSTALL_DATA) $$file $(distdir)/$(figdir)/$$basefile; \
- done \
- fi
-
-install-data-local: omf
- $(mkinstalldirs) $(DESTDIR)$(docdir)
- for file in $(xml_files); do \
- cp $(srcdir)/$$file $(DESTDIR)$(docdir); \
- done
- if test "$(figdir)"; then \
- $(mkinstalldirs) $(DESTDIR)$(docdir)/$(figdir); \
- for file in $(srcdir)/$(figdir)/*.png; do \
- basefile=`echo $$file | sed -e 's,^.*/,,'`; \
- $(INSTALL_DATA) $$file $(DESTDIR)$(docdir)/$(figdir)/$$basefile; \
- done \
- fi
-
-install-data-hook: install-data-hook-omf
-
-uninstall-local: uninstall-local-doc uninstall-local-omf
-
-uninstall-local-doc:
- -if test "$(figdir)"; then \
- for file in $(srcdir)/$(figdir)/*.png; do \
- basefile=`echo $$file | sed -e 's,^.*/,,'`; \
- rm -f $(docdir)/$(figdir)/$$basefile; \
- done; \
- rmdir $(DESTDIR)$(docdir)/$(figdir); \
- fi
- -for file in $(xml_files); do \
- rm -f $(DESTDIR)$(docdir)/$$file; \
- done
- -rmdir $(DESTDIR)$(docdir)
-
diff --git a/mail/.cvsignore b/mail/.cvsignore
deleted file mode 100644
index 3206dd1426..0000000000
--- a/mail/.cvsignore
+++ /dev/null
@@ -1,29 +0,0 @@
-.deps
-.libs
-.pure
-Makefile
-Makefile.in
-evolution-mail
-evolution-mail.pure
-mail-config.gladep
-test-mail
-test-sources
-test-thread
-*.bb
-*.bbg
-*.da
-*.gcov
-GNOME_Evolution_Mail*.server
-GNOME_Evolution_Mail*.server.in
-Spell-common.c
-Spell-skels.c
-Spell-stubs.c
-Spell.h
-Mailer-common.c
-Mailer-skels.c
-Mailer-stubs.c
-Mailer.h
-evolution-mail-upgrade
-evolution-mbox-upgrade
-em-marshal.c
-em-marshal.h
diff --git a/mail/ChangeLog b/mail/ChangeLog
deleted file mode 100644
index a5672b100f..0000000000
--- a/mail/ChangeLog
+++ /dev/null
@@ -1,3091 +0,0 @@
-2003-12-06 JP Rosevear <jpr@ximian.com>
-
- * Makefile.am: Remove hard coded disable deprecated flags
-
-2003-12-05 Rodney Dawes <dobey@ximian.com>
-
- * em-folder-tree.c (render_display_name): Remove the extra || unread
- check in the conditional in the g_object_set () call
-
-2003-12-05 Rodney Dawes <dobey@ximian.com>
-
- Fixes bug #51482
-
- * em-folder-tree.c (render_display_name): Don't hardcode colors
- for the folder tree, instead use bold for unread, as in 1.4
-
-2003-12-05 Radek Doulik <rodo@ximian.com>
-
- * em-html-stream.c (emhs_sync_flush): use new gtk_html_flush
- method instead of forcing processing of all gtk events
-
-2003-12-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-folder-tree-model.c (em_folder_tree_model_remove_folders):
- Make sure folder_path is non-NULL ("Loading..." nodes will have a
- NULL path). Fixes bug #51731.
-
-2003-12-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-ops.c (empty_trash_empty): Get the proper local folders
- store uri (it's not file:/ anymore). Fixes bug #51618.
-
-2003-12-04 Jeffrey Stedfast <fejj@ximian.com>
-
- Fixes bug #51605.
-
- * em-folder-selector.c (emfs_response): Handle creating a new
- folder (pop up a create-folder-selector dialog).
-
- * em-folder-tree.c (emft_popup_new_folder_response): Moved all the
- logic into em_folder_tree_create_folder().
- (em_folder_tree_create_folder): New function to create a folder.
-
-2003-12-04 Radek Doulik <rodo@ximian.com>
-
- * em-junk-filter.c (pipe_to_sa): add new err_retval parameter,
- which specifies which value to return if something went wrong
- (like failed to exec, ...). update all calls by that. actual junk
- check has err_retval = 0 to avoid marking false spam - non-zero
- retval means junk.
-
- * em-folder-view.c: set junk toolbar buttons pixmaps
-
- * mail-session.c: monitor gconf key
- /apps/evolution/mail/junk/check_incoming and keep session junk
- flag uptodate
-
- * em-mailer-prefs.c (em_mailer_prefs_construct): added junk
- preferences
-
-2003-12-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.c (uri_to_evname): Updated to add use mail subdirs.
- (mail_config_uri_renamed): Updated cachenames[]
- (mail_config_folder_to_cachename): Fixed to use the correct path.
-
- * em-folder-browser.c (emfb_create_view_menus): Updated the
- galview path to point to the evo-1.5 location.
- (emfb_set_folder): Update the galview view_instance.
- (emfb_create_view_instance): Split out from
- emfb_create_view_menus()
- (emfb_create_view_menus): Reduced code, call
- emfb_create_view_instance().
-
- * em-folder-selector.c (emfs_create_name_activate): Emit the OK
- response, not the CREATE_NEW response. Also,
- g_signal_emit_by_name() does not take a GQuark detail argument, so
- don't pass one. Fixes bug #51661.
-
-2003-12-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-folder-view.c (emfv_set_folder): Sync the folder before
- replacing it with the new folder.
-
- * em-folder-tree.c (em_folder_tree_set_selected): Need to prepend
- a "/" to path if the path is the url fragment. Also fixed to
- select the store node if path == "/".
- (emft_popup_rename_folder): Set oldpath and newpath to the proper
- values. Fixes bug #51656.
-
- * em-folder-selector.c (em_folder_selector_get_selected_uri):
- Fixed a FIXME by using the CamelProvider url flags to determine if
- the url used url->fragment or url->path as the folder path.
- (em_folder_selector_get_selected_path): Don't allow path strings
- to start with "//".
-
-2003-12-03 JP Rosevear <jpr@ximian.com>
-
- * em-folder-tree.c (em_folder_tree_destroy): remove the source
- before saving
-
-2003-12-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-folder-tree.c (em_folder_tree_save_state): Set the
- save_state_id to 0 or we will never get a chance to run again.
-
-2003-12-03 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-vfolder.c: Do not #include "evolution-shell-component.h".
-
- * Makefile.am (libevolution_mail_la_SOURCES): Don't compile
- mail-importer.[ch] for now.
-
- * mail-component-factory.c: Do not #include
- <evolution-shell-client.h>.
- * mail-config.c: Likewise.
-
- * mail-vfolder.h: Do not #include <evolution-storage.h> or
- <evolution-shell-component.h>.
-
- * mail.h: Do not #include <evolution-storage.h>.
-
- * mail-ops.h: Do not #include <evolution-storage.h>.
- (mail_scan_subfolders): Remove prototype.
- (mail_update_subfolders): Likewise.
-
-2003-12-03 JP Rosevear <jpr@ximian.com>
-
- * em-folder-tree.c (em_folder_tree_destroy): save the state
- immediately if there is a timeout set
- (em_folder_tree_save_state): be true GSourceFunc and just return
- FALSE to remove the source
-
-2003-12-03 Not Zed <NotZed@Ximian.com>
-
- * mail-autofilter.c (rule_match_thread): changed to setup the rule
- part properly, it could never have worked. Bug #51601.
-
- * em-popup.c (emp_uri_popup_address_add): implement.
-
- * em-folder-view.c (emfv_popup_add_sender): implement.
- (emfv_add_sender_addressbook): hook up to above func.
-
- * em-utils.c (em_utils_add_address): implementation to add an
- email address to the addressbook.
- (emu_add_address_cb): callback required for funny api. Bug
- #51321.
-
-2003-12-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-folder-tree-model.c (drop_uid_list): Moved here.
- (drop_folder): Moved here.
- (import_message_rfc822): Moved here.
- (drop_message_rfc822): Moved here.
- (drop_text_uri_list): Moved here.
- (model_drag_data_received): Moved the logic from em-folder-tree.c
- into here.
- (model_row_drop_possible): Same.
- (model_row_draggable): Same.
- (drag_text_uri_list): Moved here.
- (model_drag_data_get): Moved logic here.
- (model_drag_data_delete): Moved logic here.
-
- * em-folder-tree.c (drag_data_get_cb): Pass the full_name to
- camel_store_get_folder() rather than the path.
- (drag_data_received_cb): Same.
- (drop_uid_list): Removed.
- (drop_folder): Removed.
- (import_message_rfc822): Removed.
- (drop_message_rfc822): Removed.
- (drop_text_uri_list): Removed.
- (drag_data_received_cb): Removed.
- (row_drop_possible_cb): Removed.
- (row_draggable_cb): Removed.
- (drag_text_uri_list): Removed.
- (drag_data_get_cb): Removed.
- (drag_data_delete_cb): Removed.
- (em_folder_tree_enable_drag_and_drop): Don't connect to any of the
- drag & drop signals, they don't exist anymore.
-
- * mail-component.c (impl_createControls): Enable drag-and-drop.
-
- * em-folder-tree.c (em_folder_tree_new_with_model): Connect to the
- loading row signal.
- (loading_row_cb): Expand the path if needed.
- (em_folder_tree_destroy): Disconnect from the loading-row signal.
- (em_folder_tree_enable_drag_and_drop): New function to enable
- drag-and-drop.
- (em_folder_tree_new): Remove drag-and-drop setup code.
-
- * em-folder-tree-model.c (em_folder_tree_model_class_init): Define
- the loading-row signal.
- (em_folder_tree_model_set_folder_info): emit the loading-row signal.
-
-2003-12-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-folder-tree.c (em_folder_tree_new): Fixed to pass the
- evolution dir into em_folder_tree_model_new().
- (model_save_state): Removed.
- (em_folder_tree_save_state): Moved all the saving logic into
- em_folder_tree_model_save_expanded().
-
- * em-folder-tree-model.c (em_folder_tree_model_new): Load the
- expanded state off disk.
- (em_folder_tree_model_save_expanded): New function to save
- expanded state.
- (em_folder_tree_model_get_expanded): new function to get if a node
- should be expanded.
- (em_folder_tree_model_set_expanded): new function to set the
- expanded state of a node.
-
- * mail-component.c (mail_component_init): Pass the evo dir to
- em_folder_tree_model_new() which now requires it.
-
-2003-12-02 Rodney Dawes <dobey@ximian.com>
-
- * Makefile.am: Version the schemas
- * evolution-mail.schemas: Removed
- * evolution-mail.schemas.in.in: Added
-
-2003-12-02 Not Zed <NotZed@Ximian.com>
-
- * mail-config-druid.c (mail_config_druid_new): moved the
- gtk_widget_show_all to before we add the pages, otherwise it can
- override per-page logic. Bug #50790.
-
- * message-list.c (message_list_create_extras): setup another image
- (followup completed) to flag status list.
- (states_pixmaps[]): added flag_for_followup_done.
- (ml_tree_value_at): return 0,1 or 2 for completed icon. also use
- the real ints, these shouldn't have been true/false. Bug #43514.
-
- * evolution-mail.schemas: Added empty_trash prompt key.
-
- * em-utils.c (em_utils_prompt_user): changed to take the gconf
- 'prompt again' key directly. Fixed callers.
- (em_utils_expunge_folder): prompt the user with an expunge
- specific message.
- (em_utils_empty_trash): have an empty-trash specific message for
- prompting confirm.
- (emu_confirm_expunge): removed, no longer needed. Bug #38613.
- (em_utils_expunge_folder): remove most line feeds, let the label
- wrap them.
- (em_utils_empty_trash): ditto.
-
- * em-subscribe-editor.c (sub_folder_subscribed): update the ui
- selection state after we're done. maybe we should listen on the
- model but this is easier. Bug #50861.
-
- * em-message-browser.c (emmb_activate): hook up our own verb list.
- (emmb_message_verbs[], emmb_close): implement the close verb.
- Bug #51558.
-
- * em-format-html-display.c (efhd_attachment_popup): duh, actually
- add the menu list we create. Bug #49902.
-
- * em-format.c (d): turn off debug, committed by accident.
-
-2003-12-01 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-mt.c (do_op_status): Use data->activity_id, not local
- activity_id.
-
-2003-12-01 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-mt.c (struct _mail_msg_priv): Remove member "activity".
- (mail_operation_status): Un-#if 0 the code.
-
- * mail-component.c (struct _MailComponentPrivate): New member
- activity_handler.
- (mail_component_init): Initialize.
- (impl_dispose): Unref.
- (mail_component_peek_activity_handler): New.
- (impl_createControls): Create an ETaskBar, attach it to the
- ActivityHandler, and return it to the caller as the statusbar
- control.
-
-2003-12-01 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-component.c (impl_createControls): Pass a label for the
- status bar control for now.
-
-2003-12-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.c (mail_config_signature_run_script): Use fcntl() to
- set FD_CLOEXEC on each fd rather than close()ing it. Apparently
- Linux's older pthread implementations use sockets and so this
- fouls threading up. GO LINUX! GO!
-
-2003-12-01 Rodney Dawes <dobey@ximian.com>
-
- * GNOME_Evlution_Mail.server.in.in:
- * em-account-prefs.c:
- * em-composer-prefs.c:
- * em-mailer-prefs.h:
- * mail-component-factory.c:
- * mail-config-factory.c:
- * mail-font-prefs.h:
- * importers/*.server.in.in:
- * importers/elm-importer.c:
- * importers/evolution-mbox-importer.c:
- * importers/evolution-outlook-importer.c:
- * importers/netscape-importer.c:
- * importers/pine-importer.c: Use BASE_VERSION for repo_ids and OAFIIDs
-
-2003-12-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-folder-tree.c (em_folder_tree_get_folder_info__got): Updated
- to call em_folder_tree_model_set_folder_info().
- (folder_subscribed_cb): Removed.
- (folder_unsubscribed_cb): Removed.
- (folder_created_cb): Removed.
- (folder_deleted_cb): Removed.
- (folder_renamed_cb): Removed.
-
- * em-folder-tree-model.c (em_folder_tree_store_set_folder_info):
- New function to replace tree_store_set_folder_info() which had
- been in em-folder-tree.c
- (em_folder_tree_model_remove_uri): Made private.
- (em_folder_tree_model_remove_store_info): Made private.
- (em_folder_tree_model_remove_folders): New function to replace
- remove_folders() from em-folder-tree.c
- (em_folder_tree_model_new): No longer takes any args.
-
- * em-folder-tree.c (em_folder_tree_new): Updated.
-
- * mail-component.c (add_store): Add the store to the model rather
- than the treeview.
- (impl_createControls): create a new treeview based on the
- already-instantiated model.
- (mail_component_init): Create a new tree model.
- (mail_component_remove_store): Remove the store from the model
- directly.
- (mail_component_get_tree_model): Updated.
-
- * em-folder-tree.c (folder_unsubscribed_cb): Call
- em_folder_tree_model_remove_folders() rather than the deprecated
- internal remove_folders() function.
- (folder_renamed_cb): Same.
- (em_folder_tree_remove_store): Removed.
- (em_folder_tree_add_store): Removed.
- (remove_folders): Removed.
-
-2003-12-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-composer-utils.c (composer_get_message): rfc2047 encode the
- Organization header value.
-
- * em-folder-tree.c (em_folder_tree_get_folder_info__got): Make
- sure our parent folder hasn't been unsubscribed or else we get a
- segfault here if it has.
-
-03-11-28 Dave Camp <dave@ximian.com>
-
- * em-folder-tree.c (render_pixbuf): Set the pixbuf renderer
- invisible for stores.
-
-2003-11-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.c (mail_config_get_account_by_uid): New function.
-
- * em-folder-tree.c (tree_store_set_folder_info): Expand the tree
- node if the saved state tells us it was expanded the previous
- session.
- (em_folder_tree_load_state): Load the saved state.
- (em_folder_tree_add_store): Conditionally expand the store node.
- (em_folder_tree_new_with_model): Expand all the nodes that should
- be expanded.
-
-2003-12-01 Radek Doulik <rodo@ximian.com>
-
- * em-folder-tree.c (render_pixbuf): use CAMEL_VTRASH_NAME,
- CAMEL_VJUNK_NAME
-
-2003-11-28 Radek Doulik <rodo@ximian.com>
-
- * em-folder-tree.c (render_pixbuf): added junk icon to folder
- icons
-
-2003-12-01 Not Zed <NotZed@Ximian.com>
-
- * em-folder-browser.c (emfb_edit_cut, emfb_edit_copy)
- (emfb_edit_paste): override the em-folder-view impl, and handle
- the search bar properly. For #48746.
-
- * mail-security.glade: added some padding to the security details
- frames.
-
- * em-format-html-display.c (efhd_xpkcs7mime_validity_clicked):
- some cosmetic layout changes.
-
-2003-11-27 Charles Zhang <charles.zhang@sun.com>
-
- * mail-account-editor.c (construct): connect "changed" signal.
- (mail_account_editor_changed): change signal handler.
- Fixes bug #48998.
-
-2003-11-30 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-offline-handler.c: Remove all the syncFolder stuff since
- it's not in the Component interface anymore.
-
- * mail-mt.c: Remove declaration for global_shell_client. #if 0
- all the code that uses that.
-
- * mail-component-factory.c: Remove declaration for
- global_shell_client.
-
- * mail-vfolder.c: Remove declaration for global_shell_client.
-
-2003-11-26 JP Rosevear <jpr@ximian.com>
-
- * Makefile.am: turn on deprecated Gtk stuff
-
-2003-11-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-folder-tree.c (em_folder_tree_save_state): New function to
- save tree expanded state.
- (em_folder_tree_queue_save_state): New function to queue saving of
- the expanded state.
- (em_folder_tree_construct): Connect to the row-collapsed signal.
- (tree_row_collapsed): Queue a save-state.
- (tree_row_expanded): Queue a save state.
- (em_folder_tree_get_folder_info__got): Queue a save-state.
-
-2003-11-25 Not Zed <NotZed@Ximian.com>
-
- * em-folder-view.c (em_folder_view_print): set session on print
- formatter for signatures to work.
-
- * em-message-browser.c (emmb_destroy): kill warning.
-
- * em-format-html.c (efh_output_secure): same as
- efhd_output_secure, output the security bar, but for
- printing/plain html.
- (efh_application_xpkcs7mime): use output_secure.
- (em_format_html_multipart_signed_sign): removed, output_secure
- does what this did.
-
- * em-format-html-display.c (smime_sign_table,
- smime_encrypt_table): Added a short description for the mail
- display.
- (efhd_xpkcs7mime_button): only good/bad signature at this point,
- if only encrypted, then display 'bad' icon.
- (efhd_output_secure): output the security bar/button and handle
- multi-level enveloping properly.
- (efhd_application_xpkcs7mime): just call output_secure to do
- the security bar.
- (efhd_multipart_signed): same.
- (efhd_signature_button): removed, no longer used.
- (efhd_signature_check): removed, no longer used.
-
-2003-11-24 Radek Doulik <rodo@ximian.com>
-
- * em-format-html.c (efh_text_plain): use new colors
- (efh_text_html): ditto
-
- * em-format-html-display.c (efhd_gtkhtml_realise): set new colors
- according to style
-
- * em-format-html.c (efh_init): init new colors
-
- * em-format-html.h: added frame and content colors
-
- * em-format.c (emf_multipart_mixed): do not use horizonal rule,
- attachment content is now inside simple frame
-
- * em-format-html.c (efh_text_plain): add 6 points around text
- plain content and frame it
- (efh_text_html): frame text/html
- (efh_format_do): fix body tag, set bgcolor
- (em_format_html_format_headers): do not put headers into own
- table, content body is framed now instead
- (efh_format_message): update for headers/body changes
-
- * em-format-html-display.c (efhd_format_attachment): put
- additional vertical space around attachment button
-
-2003-11-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-folder-tree-model.c (model_drag_data_received)
- (model_row_drop_possible, model_row_draggable)
- (model_drag_data_get, model_drag_data_delete): Swap the retval
- varargs value to the last argument instead of the first.
-
-2003-11-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.c (mail_config_uri_deleted): Removed call to
- mail_tool_delete_meta_data(). Fixes bug #51236.
-
- * mail-component.c (impl_handleURI): Implemented.
- (mail_component_class_init): Overload the handleURI method.
-
-2003-11-20 Jeffrey Stedfast <fejj@ximian.com>
-
- Fixes bug #51012.
-
- * em-folder-tree.c (emft_popup_rename_folder): Fixed a FIXME to
- not use the OS-specific g_path_*() stuff.
- (em_folder_tree_set_selected): For the case where the tree has
- already loaded enough subfolders to include the path we need to
- select, exopand the nodes to that path as well. For the case that
- the tree hasn't loaded enough of the folder nodes, load them and
- then have the node selected/expanded to.
-
-2003-11-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-folder-selector.c (emfs_create_name_activate): Emit the
- response signal with the RESPONSE_NEW value.
- (emfs_create_name_changed): Sanity check the entry text and set OK
- sensitivity.
- (folder_selected_cb): If there is an entry widget, then call
- name_changed() to decide sensitivity, else set OK to be sensitive.
-
- * em-utils.c (em_utils_selection_set_urilist): Same.
-
- * em-format-html-display.c (efhd_drag_data_get): Same as below.
-
- * em-folder-tree.c (drag_text_uri_list): Terminate each url of a
- text/uri-list with a \r\n.
-
-2003-11-19 Ettore Perazzoli <ettore@ximian.com>
-
- * GNOME_Evolution_Mail.server.in.in: Add an
- "evolution:uri_schemas" attribute.
-
-2003-11-19 Not Zed <NotZed@Ximian.com>
-
- * mail-component.c (em_uri_to_camel): if we're setting the
- fragment, strip leading /'s.
-
- * mail-tools.c (mail_tool_get_meta_data)
- (mail_tool_delete_meta_data, meta_data_key): old stuff killed.
- (mail_tool_uri_to_folder): handle email: uri's specially. this is
- a bit of a hack, the filter callbacks should manage this itself
- since filters are the only bits which use those uri's.
-
-2003-11-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-migrate.c (em_migrate_dir): Don't leak the message objects.
-
- * em-folder-tree.c (em_copy_folders): Execute asynchronously by
- queueing the copy in another thread.
- (em_copy_folders__copy): Moved the original logic here.
-
-2003-11-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-folder-tree.c (tree_row_expanded): Queue the
- camel_store_get_folder_info() call in another thread.
- (em_folder_tree_get_folder_info__got): Moved all the logic of
- tree_row_expanded here.
-
-2003-11-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-folder-tree.c (tree_row_expanded): Fixed to check fi->child
- as well (since mbox does it right).
- (emft_popup_new_folder_response): Fixed to subscribe to the
- correct folder.
- (emft_popup_delete_folders): Fixed to use the full_name rather
- than the path.
-
- * em-folder-selection-button.c (set_contents): Fixed to not
- include leading '/' in the folder name in the label.
-
- * em-folder-tree.c (emft_popup_new_folder_response): Implemented
- error reporting via gtk dialogs.
- (emft_popup_copy_folder_selected): Same.
-
-2003-11-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-folder-tree.c (emft_popup_new_folder_response): Use a
- folder_name rather than a path as the name argument to
- camel_store_create_folder(), fixes creation of IMAP folders.
-
-2003-11-17 Not Zed <NotZed@Ximian.com>
-
- * em-folder-selection-button.c (set_contents): handle an
- unparsable url without crashing.
-
- * mail-tools.c (mail_tool_get_local_inbox): thin wrapper on
- mail_component_get_local_inbox.
-
- * mail-component.c (mail_component_get_local_inbox): helper to get
- the default local inbox.
-
- * mail-ops.c (fetch_mail_fetch): if we can't get the inbox, make
- sure we still unref the filter driver here by using hte same exit
- code. Fixes a crash.
-
-2003-11-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-folder-tree.c (emft_popup_new_folder_response): We can't use
- a uri to do a lookup of a store-info on the store_hash, we have to
- get a CamelStore first.
- (row_draggable_cb): validate the iter before using it.
- (row_drop_possible_cb): Same.
- (drag_data_received_cb): Here too.
- (drag_data_get_cb): Same.
- (drag_data_delete_cb): Again here.
- (tree_store_set_folder_info): Recursively add nodes if fi->child
- is non-NULL rather than adding a dummy node.
- (folder_renamed_cb): Implemented.
-
-2003-11-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-mt.c (set_stop): Removed most of the code. This is
- basically now a nop. Need to somehow get the uic and fix this.
-
- * folder-browser-factory.[c,h]: Removed.
-
- * mail-component.c (folder_selected_cb): Don't create a new view
- anymore, simply set the new folder uri on the folder browser. This
- makes the mailer use a lot less memory than in 1.x
- (view_control_activate_cb): Moved here from
- folder-browser-factory.c
- (impl_createControls): Connect to the activate signal on the view
- control.
-
-2003-11-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-folder-selection.c (folder_selected_cb): Only set OK to
- sensitive if the selected node is not a store node.
-
- * em-folder-tree-model.c: Moved the store_hash and uri_hash from
- EMFolderTreePrivate into here instead.
-
- * em-folder-tree.c: Updated for above changes.
-
-2003-11-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-folder-view.c (emfv_popup_move): Updated.
- (emfv_popup_copy): Updated.
-
- * em-folder-tree.c (emft_popup_copy): Updated.
- (emft_popup_move): Updated.
-
- * em-folder-selection.c (create_dialog): New convenience function
- to construct the dialog contents for all three public functions.
- (em_folder_selection_run_dialog): Now longer takes a caption arg.
- (em_folder_selection_run_dialog_uri): Same.
- (em_select_folder): Here too.
-
-2003-11-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-component.c (mail_component_get_tree_model): Use
- em_folder_tree_get_model() since an emft is not a GtkTreeView.
-
- * em-folder-tree.c (em_folder_tree_get_model): New function to get
- the tree model.
-
-2003-11-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-folder-selection.c: Rewritten to use EMFolderTRee.
-
- * mail-vfolder.c (vfolder_load_storage): Updated for function name
- changes in mail-component.c
-
- * mail-offline-handler.c: Updated for function name changes in
- mail-component.c
-
- * mail-account-gui.c (add_new_store): Fixed to not use EStorage.
- (mail_account_gui_save): Updated for function name changes.
-
- * em-account-prefs.c (account_delete_clicked): Updated for
- function name changes.
- (account_able_clicked): Same.
- (account_able_toggled): Same.
-
- * mail-component.c: Renamed mail_component_*storage*() functions
- to mail_component_*store*() since we are no longer dealing with
- storages, but instead with CamelStore's.
- (create_view_widget): If the user selects a store node, don't try
- to open it as a folder.
-
-2003-11-13 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-component.c (impl_sendAndReceive): New, implementation for
- Evolution.Component.sendAndReceive.
- (mail_component_class_init): Install.
-
-2003-11-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-vfolder.c (context_rule_removed): Modified to not use
- EStorage* functions. I don't even think it *needs* to remove the
- folder from the mail-component, the mail-component should just
- pick it up automagically via CamelStore events.
-
- * em-folder-tree.[c,h]: New folder-tree widget that replaces the
- shell's folder-tree widget.
-
- * em-folder-tree-model.[c,h]: New source files subclassing
- GtkTreeStore for handling the mess that is drag&drop.
-
- * em-folder-selection-button.c: Ported to use EMFolderTree.
-
- * em-folder-selection.c: Ported to use EMFolderTree.
-
- * em-folder-selector.c: Ported to use EMFolderTree.
-
- * mail-component.c: Ported to use EMFolderTree.
-
- * mail-offline-handler.c (storage_go_online): Updated to not pass
- a storage argument.
-
- * mail-folder-cache.c: Removed storage stuff.
-
- * mail-send-recv.c (receive_update_got_store): Don't do EStorage*
- stuff anymore.
-
-2003-11-13 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-component.c (impl__get_userCreatableItems): New,
- implementation for the Component.userCreatableItems attribute.
- (impl_requestCreateItem): New, implementation for the
- Component.requestCreateItem() method.
- (mail_component_class_init): Install.
-
-2003-11-13 Radek Doulik <rodo@ximian.com>
-
- * em-junk-filter.c (em_junk_sa_is_available): new helper function,
- use it before any call to spamassassin, spamc and sa-learn
- (em_junk_sa_test_spamd): first test if spamassassin is available
- (em_junk_sa_test_spamd): rename em_junk_sa_spamd_tested to
- em_junk_sa_tested, always set em_junk_sa_tested
-
- * mail-folder-cache.c (folder_changed): don't call
- CAMEL_IS_VJUNK_FOLDER, it was added by mistake
-
-2003-11-13 Not Zed <NotZed@Ximian.com>
-
- * em-format-html.c (em_format_html_add_pobject): use malloc0 for
- the pobject memory.
-
-2003-11-12 Not Zed <NotZed@Ximian.com>
-
- * mail-account-gui.c (smime_sign_key_select)
- (smime_encrypt_key_select, smime_encrypt_key_selected)
- (smime_sign_key_selected): implement the key selector popup using
- e-cert-selector.
-
-2003-11-11 Not Zed <NotZed@Ximian.com>
-
- * em-format-html.c (efh_application_xpkcs7mime): output icons of
- the status.
- (em_format_html_add_pobject): Changed to take a size specificier,
- return the pobject, and re-ordered args to be more consistent with
- puri stuff.
- (em_format_html_remove_pobject): handle the free callback if set.
-
- * em-format.c (emf_application_xpkcs7mime): moved this to
- em-format-html since it needs to do icon stuff.
-
- * mail-security.glade: new glade file for security related stuff.
-
- * mail-config.glade: removed the message security dialogue, it
- gets opened automatically by the config code :(
-
-2003-11-10 Ettore Perazzoli <ettore@ximian.com>
-
- * GNOME_Evolution_Mail.server.in.in: Set an
- "evolution:component_alias" property with a value of "mail".
-
-2003-11-10 Not Zed <NotZed@Ximian.com>
-
- * em-format-html.c (em_format_html_multipart_signed_sign): changed
- for cipher context api changes.
- * em-format.c (emf_multipart_signed): ditto.
-
-2003-11-07 Not Zed <NotZed@Ximian.com>
-
- * mail-config.glade: added security_information_dialog (probably
- temporarily in this file).
-
- * em-format.c (em_format_is_attachment): also treat pkcs7-mime as
- non-attachment.
- (emf_application_xpkcs7mime): no longer need to worry about
- scanning the part.
-
-2003-11-07 Dan Winship <danw@ximian.com>
-
- * message-list.c: Don't #include e-name-western.h, since the code
- that uses it is commented out, and we want to remove the local
- copy, but we don't want to make the mailer depend on the e-d-s
- copy if it's not even going to be using it.
-
-2003-11-07 JP Rosevear <jpr@ximian.com>
-
- * Makefile.am: build the marshall files right at the beginning
-
-2003-11-11 Not Zed <NotZed@Ximian.com>
-
- * mail-security.glade: new glade file for security related stuff.
-
- * mail-config.glade: removed the message security dialogue, it
- gets opened automatically by the config code :(
-
-2003-11-10 Ettore Perazzoli <ettore@ximian.com>
-
- * GNOME_Evolution_Mail.server.in.in: Set an
- "evolution:component_alias" property with a value of "mail".
-
-2003-11-10 Not Zed <NotZed@Ximian.com>
-
- * em-format-html.c (em_format_html_multipart_signed_sign): changed
- for cipher context api changes.
- * em-format.c (emf_multipart_signed): ditto.
-
-2003-11-07 Not Zed <NotZed@Ximian.com>
-
- * mail-config.glade: added security_information_dialog (probably
- temporarily in this file).
-
- * em-format.c (em_format_is_attachment): also treat pkcs7-mime as
- non-attachment.
- (emf_application_xpkcs7mime): no longer need to worry about
- scanning the part.
-
-2003-11-07 Dan Winship <danw@ximian.com>
-
- * message-list.c: Don't #include e-name-western.h, since the code
- that uses it is commented out, and we want to remove the local
- copy, but we don't want to make the mailer depend on the e-d-s
- copy if it's not even going to be using it.
-
-2003-11-07 JP Rosevear <jpr@ximian.com>
-
- * Makefile.am: Make sure the marshal files are listed above other
- sources
-
-2003-11-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-migrate.c (em_migrate_filter_file): Call em_migrate_uri()
- instead of em_uri_from_camel().
- (em_migrate_uri): Special-case file: uri's by converting them into
- email://local@local/ uri's since these folders will have been
- migrated to the newer mbox tree structure.
-
-2003-11-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-vfolder.c (mail_vfolder_delete_uri): User vfolder rules
- should be in ${evolution_dir}/mail/vfolders.xml rather than
- ${evolution_dir}/vfolders.xml
- (mail_vfolder_rename_uri): Same.
- (store_folder_deleted): Here too.
- (store_folder_renamed): And here.
- (vfolder_load_storage): Again here.
- (vfolder_editor_response): Same.
- (edit_rule_response): And here.
- (new_rule_clicked): Here too.
-
- * mail-session.c (main_get_filter_driver): User filter rules
- should be in ${evolution_dir}/mail/filters.xml rather than
- ${evolution_dir}/filters.xml
-
- * mail-autofilter.c (filter_gui_add_from_message): Same.
- (mail_filter_rename_uri): And here.
- (mail_filter_delete_uri): Here too.
-
- * em-utils.c (filter_editor_response): Again here.
- (em_utils_edit_filters): Same.
-
- * em-migrate.c (em_migrate_filter_file): Same (also for
- vfolders.xml)
-
-2003-11-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-migrate.[c,h]: New source files to migrate from the old mail
- directory to the new mail directory.
-
- * mail-component.c (mail_component_init): Changed to use
- ~/.evolution and added code to migrate the old mail folders over
- if ~/.evolution/mail does not yet exist.
-
-2003-11-03 Ettore Perazzoli <ettore@ximian.com>
-
- * GNOME_Evolution_Mail.server.in.in: Use "evolution2:config_item"
- properties for the config item instead of "evolution:config_item"
- ones.
-
-2003-11-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-folder-view.c: setup filter-on-thread and vfolder-on-thread.
-
- * mail-autofilter.c (rule_from_message): handle AUTO_THREAD
- (rule_match_thread): new function to setup a filter on a msgid
-
-2003-10-31 Not Zed <NotZed@Ximian.com>
-
- * mail-config.glade: Rearranged smime config slightly, and added
- encrypt key preference.
-
- * mail-account-gui.c (mail_account_gui_save,
- mail_account_gui_new): enable smime always if have_nss. Added new
- options in glade file and handle changed names.
- (smime_changed, smime_sign_key_select, smime_sign_key_clear)
- (smime_encrypt_key_select, smime_encrypt_key_clear): Add a bunch
- of mostly dummy UI behaviour management stuff.
-
-2003-10-30 Not Zed <NotZed@Ximian.com>
-
- * em-format.c (em_format_is_inline): show application/x-pkcs7-mime
- inline always by default.
-
-2003-10-30 Not Zed <NotZed@Ximian.com>
-
- * em-format.c (emf_multipart_signed): handle
- application/x-pkcs7-signature.
-
-2003-10-29 Not Zed <NotZed@Ximian.com>
-
- * em-format-html.c (em_format_html_multipart_signed_sign): handle
- application/x-pkcs7-signature.
-
- * em-format.c (emf_application_xpkcs7mime): Handle
- application/x-pkcs7-mime.
-
-2003-10-29 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-account-prefs.h: Changed the OAFIID.
-
- * em-composer-prefs.h: Changed the OAFIID.
-
- * em-mailer-prefs.h: Changed the OAFIID.
-
- * GNOME_Evolution_Mail.server.in.in: Changed OAFIIDs for the prefs
- controls.
-
-2003-10-29 Jeffrey Stedfast <fejj@ximian.com>
-
- * GNOME_Evolution_Mail.server.in.in: Nuked the MailConfig
- interface stuff.
-
- * Mailer.idl: Removed. None of the interfaces are needed/used
- anymore.
-
- * folder-info.[c,h]: Removed. The summary was the only thing that
- needed/used this code and it has been nuked into oblivion, so
- these interfaces are no longer needed.
-
- * mail-config.c: Removed old crufty CORBA interface snot that is
- no longer needed or used.
-
-2003-10-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * Fixes bug #49816
-
- * em-popup.c (emp_part_popup_reply_sender): No need to pass a
- parent window arg anymore.
- (emp_part_popup_reply_list): Same.
- (emp_part_popup_reply_all): Here too.
- (emp_part_popup_forward): Same.
- (emp_uri_popup_address_send): Here too.
-
- * em-folder-browser.c (emfb_mail_compose): No need to pass a
- parent window arg anymore.
- (emfb_mail_post): Same.
-
- * em-folder-view.c (emfv_message_reply): Don't pass a parent
- window argument anymore.
- (emfv_popup_forward): Same.
- (emfv_popup_resend): Same here.
- (em_folder_view_open_selected): Same.
- (emfv_message_forward_attached): Here too.
- (emfv_message_forward_inline): And here.
- (emfv_message_forward_quoted): Same.
- (emfv_message_redirect): Here too.
- (emfv_message_post_reply): And here.
- (emfv_format_link_clicked): ANd finally here.
-
- * em-utils.c (create_new_composer): Don't set_transient_for()
- anymore.
- (em_utils_compose_new_message): No longer takes a parent window
- argument.
- (em_utils_forward_attached): No longer takes a parent window arg.
- (em_utils_forward_inline): Same.
- (em_utils_forward_quoted): Same.
- (em_utils_forward_message): Same.
- (em_utils_forward_messages): Here too.
- (redirect_get_composer): Don't set_transient_for() here either.
- (em_utils_redirect_message): No longer takes a parent window arg.
- (em_utils_redirect_message_by_uid): Same.
- (reply_get_composer): Don't set_transient_for() here.
- (em_utils_reply_to_message): No longer takes a parent window arg.
- (em_utils_reply_to_message_by_uid): Same.
- (post_reply_to_message): Don't set_transient_for() here.
- (em_utils_post_reply_to_message_by_uid): No longer takes a parent
- window arg.
- (em_utils_compose_new_message_with_mailto): Don't
- set_transient_for() here.
- (em_utils_post_to_url): Same.
- (em_utils_edit_message): No longer takes a parent window arg.
- (em_utils_edit_messages): Same.
-
-2003-10-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-account-prefs.[c,h]: Re-Namespaced mail-accounts.c
-
- * em-composer-prefs.[c,h]: Re-Namespaced mail-composer-prefs.c
-
- * em-mailer-prefs.[c,h]: Re-Namespaced mail-preferences.c
-
- * mail-accounts.[c,h]: Removed.
-
- * mail-composer-prefs.[c,h]: Removed.
-
- * mail-preferences.[c,h]: Removed.
-
- * mail-account-editor.c: Updated.
-
- * mail-account-gui.c: Updated.
-
- * mail-config-factory.c: Updated.
-
- * mail-component-factory.c: Updated.
-
-2003-10-22 Ettore Perazzoli <ettore@ximian.com>
-
- * GNOME_Evolution_Mail.server.in.in: Add an
- "evolution:button_icon" attribute.
-
-2003-10-22 Ettore Perazzoli <ettore@ximian.com>
-
- * GNOME_Evolution_Mail.server.in.in: Add an
- "evolution:button_sort_order" attribute.
-
-2003-10-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-component.c (parse_uid_list): Removed, use
- em_utils_selection_get_uidlist() instead.
- (drop_uid_list): Use em_utils_selection_get_uidlist() to parse the
- x-uid-list selection data and use mail_tool_uri_to_folder()
- directly since we have the uri (originally we expected the first
- component of the selection data to be the e-storage-set-view
- folder path rather than the uri).
- (folder_receive_drop_cb): Call gtk_drag_finish() here.
-
- * message-list.c: s/x-evolution-message/x-uid-list/
-
- * em-utils.c: Same.
-
-2003-10-22 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-component.c (impl_createControls): Use
- e_storage_browser_peek_widget_scrolled() to retrieve the scrolled
- window that the EStorageSetView is contained in.
-
-2003-10-22 Ettore Perazzoli <ettore@ximian.com>
-
- * GNOME_Evolution_Mail.server.in.in: Add an
- "evolution:button_label" attribute to the Component for use in the
- shell.
-
-2003-10-22 Not Zed <NotZed@Ximian.com>
-
- * mail-component.c (em_copy_folders): handle destination of ""
- properly.
- (emc_popup_copy_folder_selected): handle url->path properly, strip
- leading /.
- (em_copy_folders): if we just created a new folder on a
- subscribable store, subscribe to it.
- (em_copy_folders): handle nonselectable folders specially.
-
-2003-10-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-component.c (drag_text_uri_list, folder_dragged_cb)
- (drop_uid_list, drop_folder, import_message_rfc822)
- (drop_message_rfc822, drop_text_uri_list, folder_receive_drop_cb):
- New functions to handle drag & drop to/from the folder tree.
- (impl_createControls): Setup drag & drop support.
-
- * em-format.c (emf_multipart_mixed): Put an <hr> between parts of
- a multipart.
-
-2003-10-21 Not Zed <NotZed@Ximian.com>
-
- * mail-component.c (emc_popup_properties): implement.
- (emc_popup_properties_got_folder): builds dynamic
- folder-properties dialogue.
- (emc_popup_properties_response): set the properties on the folder
- on an ok response.
- (emc_popup_properties_free): free the properties working data.
-
- * mail-folder-cache.c (unset_folder_info): unhook from the right
- function for message_changed.
-
-2003-10-20 Not Zed <NotZed@Ximian.com>
-
- * mail-component.c (emc_popup_new_folder): pass the right object
- to set_selected(). Fixes a new real bug. Undid reformatting.
-
-2003-10-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-component.c: General compile fixes.
- (emc_popup_new_folder): Fixed to not shadow a parameter. Fixes a
- real bug.
-
- * mail-component.h: Added some prototypes.
-
-2003-10-13 Not Zed <NotZed@Ximian.com>
-
- * em-popup.c (em_popup_create_menu_once): only hookup target free
- if we have a target set.
-
- * mail-component.c (load_accounts): removed debug i accidentally
- left in.
- (emc_tree_right_click): handle right-click context menu, using an
- EMPopup table.
- (emc_popup_*): setup empty popup handlers.
-
-2003-10-13 Not Zed <NotZed@Ximian.com>
-
- * em-folder-selection.c (em_select_folder): asynchornous folder
- selection call.
- (emfs_folder_selected): callback for folder selected.
-
- * em-folder-view.c (emfv_popup_move): implement.
- (emfv_popup_copy): "
- (emfv_popup_move_cb): async folder select callback to run it.
-
-2003-10-10 Not Zed <NotZed@Ximian.com>
-
- * mail-account-gui.c
- (mail_account_gui_folder_selector_button_new): use
- em_folder_selection_button.
- (mail_account_gui_new): "
- (folder_selected): "
-
- * em-folder-selection-button.c: Make this use camel uri's rather
- than camelfolders.
- (set_selection): removed, redundant.
- (impl_dispose): removed, not needed.
-
- * em-folder-selection-button.h: change the selected signal not to
- actually return the selection, which must get retrieved later.
-
- * mail-component.c (em_uri_from_camel): create an evo mail uri
- from a camel one.
- (em_uri_to_camel): the reverse.
-
- * mail-signature-editor.c (mail_signature_editor): up the version
- of the gtkhtml editor.
-
-2003-10-09 Not Zed <NotZed@Ximian.com>
-
- * em-folder-selection-button.c (set_selection): always set
- selected_folder, otherwise we don't unset it properly.
-
- * em-folder-selection.c (em_folder_selection_run_dialog): fix a
- small memleak.
- (em_folder_selection_run_dialog_uri): do the same as run_dialog
- but take, and return physical uri's.
-
- * mail-component-factory.c (factory): removed some fixme's, and
- re-hookedup the composer.
-
-2003-10-09 Frederic Crozat <fcrozat@mandrakesoft.com>
-
- * em-icon-stream.c (emis_sync_close): Use
- gnome-thumbnail_scale_down_pixbuf if available, for better
- performance.
-
-2003-10-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-folder-view.c: Add a hide_mask to the
- create-rule-from-message bars so that we don't segfault when we
- right click with a multi-selection.
-
-2003-10-08 Chris Toshok <toshok@ximian.com>
-
- * em-utils.c (em_utils_camel_address_to_destination): EDestination
- => EABDestination, and e_destination => eab_destination.
- (reply_get_composer): same.
- (post_reply_to_message): same.
-
- * em-composer-utils.c (ask_confirm_for_unwanted_html_mail)
- EDestination => EABDestination, and e_destination =>
- eab_destination.
- (composer_get_message):same.
-
-2003-10-08 Not Zed <NotZed@Ximian.com>
-
- * mail-component.c (mail_component_peek): setup vfolders once we
- hve the component, since its setup will call mail_component_peek,
- fun recursion.
-
-2003-10-08 Not Zed <NotZed@Ximian.com>
-
- * mail-component.c (setup_local_folder): removed.
- (setup_local_store): setup various needed globals properly.
- (setup_account_storages): renamed to load_accounts.
- (go_online): turn on interactivity as well as onlinedness.
-
- * GNOME_Evolution_Mail.server.in.in: point the preferences pages
- to the right factory.
-
-2003-10-07 Not Zed <NotZed@Ximian.com>
-
- * mail-component.[ch]: Fix copyrights.
-
-2003-10-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config-druid.c (identity_prepare): Fixed.
-
- * mail-ops.c (fetch_mail_fetch): Always save the uid cache no
- matter what.
-
-2003-10-03 Frederic Crozat <fcrozat@mandrakesoft.com>
-
- * mail-config-druid.c (identity_prepare), (config_wizard_new):
- Convert real name to UTF-8 if needed.
-
-2003-10-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-folder-browser.c (emfb_set_folder): Disable the selection of
- the first unread message for now. This is actually annoying the
- fuck out of me, Radek, and a few other people.
-
-2003-10-02 Not Zed <NotZed@Ximian.com>
-
- * mail-component.c (add_storage): Add the storage to the hash
- after we've initialised it.
- (mail_component_evomail_uri_from_folder): hardcode "local" account
- pseudo-id for local folders.
- (mail_component_get_folder_from_evomail_uri): handle the "local"
- account case.
-
-2003-10-02 Not Zed <NotZed@Ximian.com>
-
- * mail-component.c (setup_local_store): use mbox:/path rather than
- mbox:///path - the mbox code is 'wrong', but this is easier to
- fix. fixes local unread counts. maybe the provider url-compare
- should address this too.
-
-2003-10-02 Suresh Chandrasekharan <suresh.chandrasekharan@sun.com>
-
- * mail-config-druid.c: Fix for 40917 "Backspace shouldn't
- highlight the whole remaining string in Setup Assistant".
- (identity_changed): Removed repeated focussing per keystroke.
- functions
- (source_changed): Same.
- (transport_changed): Here too.
- (management_changed): And here.
- (identity_prepare): Removed the initial highlighting for Full
- Name, also the unneeded intial grab_focus.
-
-2003-10-02 Not Zed <NotZed@Ximian.com>
-
- * em-format-html.c (efh_format_timeout): zero out last_part if
- we're clearing. Uh, this fixes, but shouldn't, part of #49034.
- The problem is the 'last part' logic is based on the address,
- which can quite easily be repeated for different messages.
-
- * em-folder-view.c (emfv_list_message_selected): reverted jeff's
- patch for #48618, use a much simpler method.
-
- * em-message-browser.c (emmb_destroy): hook onto destroy handler,
- we need to destroy the messagelist ourselves, since we dont attach
- it to any parent window.
-
-2003-10-01 Not Zed <NotZed@Ximian.com>
-
- * em-format-html.c (efh_init): turn off blocking writes.
- (efh_format_timeout): don't do a htmlbegin on the page yet, it'll
- be handled by em-html-stream when it has data, to reduce flicker.
- (efh_format_do): close the main gtkhtml stream as soon as we're
- done writing the body. any sub-jobs should be using frames etc.
- (efh_text_plain): dont write a table around the text, try to
- reduce flickering. layout may be out now though.
-
- * em-html-stream.c (emhs_sync_write): if we have no html_stream
- yet, begin a new one.
-
-2003-09-30 Rodney Dawes <dobey@ximian.com>
-
- * em-format-html-print.c: Use "Sans Regular" instead of "Helvetica"
- Fixes bug #47878
-
-2003-09-30 Not Zed <NotZed@Ximian.com>
-
- * em-format-html.c (efh_init): remove gconf stuff.
- (em_format_html_set_xmailer_mask): new method to set the xmailer mask.
-
- * em-folder-view.c (emfv_display_keys[]): Added charset key to
- monitor/retrieve, and xmailer_mask.
- (emfv_setting_notify): Monitor charset setting, pass onto the
- formatter, as well as xmailer_mask.
-
- * mail-preferences.c (mail_preferences_construct): use the new
- charset key.
- (mail_preferences_apply): use the new charset key.
-
- * evolution-mail.schemas: Moved the mail/format/charset to
- mail/display/charset. 1. it makes more sense, and 2. it makes
- notification update easier in em-folder-view.c
-
- * em-format.c (emf_init): remove the gconf charset stuff, for bug
- #48791, and also actually fixes the fixme that jeff thought he
- fixed.
- (em_format_format_text): use default charset as fallback.
- (em_format_set_default_charset): New method to set the default charset.
- (gconf_charset_changed): removed.
-
-2003-09-29 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-format.c (emf_init): Oops, put the arguments in the right order.
-
-2003-09-29 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-component.c: New member local_store in
- MailComponentPrivate.
- (impl_dispose): Unref.
- (mail_component_load_storage_by_uri): Return the CamelStore.
- (setup_local_folder): New.
- (setup_local_store): New.
- (mail_component_init): Call it.
- (mail_component_peek_storage_set): New.
- (mail_component_get_folder_from_evomail_uri): New.
- (mail_component_evomail_uri_from_folder): New.
-
- * em-folder-selection-button.c: New.
- * em-folder-selection-button.h: New.
-
- * em-folder-selection.c: New.
- * em-folder-selection.h: New.
-
- * em-marshal.list: Add NONE:POINTER.
-
-2003-09-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-gui.c (mail_account_gui_save): Allow any file: uri
- to point to a sent or drafts folder.
-
-2003-09-25 Rodney Dawes <dobey@ximian.com>
-
- * mail-send-recv.c: Make the dialog more HIG-compliant by fixing
- widget alignment/spacing issues, and removing separators
-
-2003-09-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-preferences.c (mail_preferences_construct): Same as below.
-
- * mail-composer-prefs.c (mail_composer_prefs_construct): gconf can
- return empty string if the charset has not been set, so if the
- charset string is empty, default the charset to the user's locale
- charset. Partial fix for bug #47638.
-
-2003-09-23 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-component.c (add_storage): Remove unused arg "uri".
- (mail_component_add_store): Likewise.
- (add_storage): Don't set the "Connecting..." node.
- (mail_component_init): Set up local store at
- ~/.evolution/mail/local.
-
- * evolution-mbox-upgrade.c (get_local_store): Remove a double
- xmlFree() that was causing it to crash.
-
-
-2003-09-23 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-component.c (add_storage): Note the new store.
-
- * mail-component-factory.c: Don't include "mail-callbacks.h"
- anymore.
-
- * em-format-html.c (em_format_html_get_type): Get the base
- directory with mail_component_peek_base_directory().
- * em-utils.c (filter_editor_response): Likewise.
- (em_utils_edit_filters): Likewise.
-
- * em-folder-browser.c (emfb_init): Get the search context through
- mail_component_peek_search_context().
-
-2003-09-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * evolution-mbox-upgrade.c (get_local_store): Don't xmlFree (name)
- until after we've g_strdup'd it.
- (em_migrate_dir): If the metadata file doesn't exist, don't even
- bother trying subfolers (the shell just ignores them so we should
- too).
-
-2003-09-23 Jeffrey Stedfast <fejj@ximian.com>
-
- Fix for bug #48791 (and also fixes a FIXME)
-
- * em-format.c (emf_init): Setup a gconf listener for changes to
- the charset setting.
- (gconf_charset_changed): Update the cached gconf charset value.
- (emf_finalise): Free the EMFormatPrivate data, unref the gconf
- client, disconnect the charset notify id, and free the cached
- gconf charset value.
- (em_format_format_text): Use the cached gconf charset value.
-
-2003-09-22 Not Zed <NotZed@Ximian.com>
-
- ** See bug #32996
-
- * mail-folder-cache.c (real_flush_updates): don't just pass TRUE
- to the 'can work offline' parameter of new shell folder.
-
- ** See bug #39410
-
- * mail-ops.c (prep_offline_do): sync all messages, not just
- unread or flagged ones.
-
-2003-09-22 Not Zed <NotZed@Ximian.com>
-
- * em-popup.c (emp_uri_popup_link_copy): removed, moved to
- em-folder-view, for now, it has access to an invisible.
-
- * em-folder-view.c (emfv_setting_notify): honour the load_http
- setting, at least the all setting.
- (emfv_format_popup_event): setup the popup menu item for copy link
- location here.
-
-2003-09-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-preferences.c (mail_preferences_construct): Connect to
- "value-changed" rather than "changed" for spin buttons.
-
-2003-09-21 Not Zed <NotZed@Ximian.com>
-
- * mail-session.c (ms_thread_msg_new): implement, we hook into the
- mail progress reporting stuff by overriding the CamelOperation
- member with one from a dummy mail_msg.
- (ms_thread_msg_free): handle freeing.
-
- * mail-mt.c (mail_msg_free): mute the camel-operaiton when we free
- it so we no longer get updates.
-
-2003-09-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-message-browser.c (emmb_set_message): Set the window title to
- be that of the message subject. Fixes bug #48617.
-
-2003-09-19 Jeffrey Stedfast <fejj@ximian.com>
-
- Fix for bug #48618.
-
- * em-folder-view.c (emfv_list_message_selected): See if we have
- already loaded the message uid that has just been selected, if so
- - don't bother re-loading it.
- (emfv_list_done_message_selected): Update loaded_uid and
- loading_uid.
-
-2003-09-18 Radek Doulik <rodo@ximian.com>
-
- * em-format-html.c (efh_init): use gtkhtml's blocking
-
-2003-09-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-inline-filter.c: updated for CamelTransferEncoding namespace
- changes
-
- * em-inline-filter.h: updated for CamelTransferEncoding namespace
- changes
-
- * mail-ops.c: updated for CamelTransferEncoding namespace changes
-
-2003-09-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * component-factory.c: updated for camel namespace changes
-
- * em-folder-view.c: updated for camel namespace changes
-
- * em-format-html-display.c: updated for camel namespace changes
-
- * em-format-html-quote.c: updated for camel namespace changes
-
- * em-format.c: updated for camel namespace changes
-
- * em-popup.c: updated for camel namespace changes
-
- * em-utils.c: updated for camel namespace changes
-
- * mail-autofilter.c: updated for camel namespace changes
-
- * mail-ops.c: updated for camel namespace changes
-
- * mail-session.c: updated for camel namespace changes
-
- * message-list.c: updated for camel namespace changes
-
- * message-tag-followup.c: updated for camel namespace changes
-
- * importers/evolution-mbox-importer.c: updated for camel namespace
- changes
-
-2003-09-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-popup.c (emp_standard_menu_factory): Don't forget to
- initialise/increment 'i' when using it as an object id in the
- for-loop.
-
- * em-format.c (em_format_format_text): Initialise charset to NULL
- or it may be used uninitialised. Also include
- gnome-vfs-mime-handlers.h for gnome_vfs_mime_type_get_description().
-
- * Makefile.am: Added $(MARSHALL_GENERATED) to $(BUILT_SOURCES) so
- that em-marshal.[c,h] were autogenerated.
-
-2003-09-17 Not Zed <NotZed@Ximian.com>
-
- * folder-browser.c, folder-browser.h, folder-browser-ui.c
- folder-browser-ui.h, mail-callbacks.c, mail-callbacks.h
- mail-display.c, mail-display.h, mail-display-stream.c
- mail-display-stream.h, mail-format.c, mail-format.h
- mail-identify.c, mail-search.c, mail-search.h message-browser.c,
- message-browser.h, subscribe-dialog.c subscribe-dialog.h,
- mail-font-prefs.c, mail-font-prefs.h: cvs removed.
-
- * Makefile.am: Removed mail-font-prefs.[ch], hasn't been built for
- ages.
-
- * em-*.c: killed a bunch of printfs.
-
- * em-format-html-display.c (efhd_html_button_press_event): update
- for html object api chagnes.
-
- ** Merge in mail-refactor-2 branch.
-
-2003-09-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * evolution-mbox-upgrade.c: New source file to migrate from the
- old mbox structure to the new mbox structure.
-
-2003-09-08 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-folder-cache.c (mail_note_store): Allow NULL storage in
- precondition.
-
- * mail-component.c (mail_component_init): Remove debugging
- message.
-
-2003-08-22 Not Zed <NotZed@Ximian.com>
-
- * mail-format.c (write_date): translate the local time format.
-
-2003-08-20 David Woodhouse <dwmw2@infradead.org>
-
- * mail-format.c (write_date): Use e_utf8_strftime() to generate
- localised time; avoid gratuitous extra translation and array of
- day names, and the autoconf magic which made Not Zed dislike the
- inclusion of the timezone name.
-
-2003-08-18 Ettore Perazzoli <ettore@ximian.com>
-
- * GNOME_Evolution_Mail.server.in.in: Rename
- GNOME_Evolution_Mail_Component2 to
- GNOME_Evolution_Mail_Component_2 and GNOME_Evolution_Mail_Factory2
- to GNOME_Evolution_Mail_Factory_2.
- * mail-component-factory.c: Update accordingly.
-
-2003-08-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-session.c (main_get_filter_driver): Removed the
- new-mail-notification mess.
-
- * mail-folder-cache.c (notify_idle_cb): New idle callback to alert
- the user about new mail.
- (notify_type_changed): New function to intercept user changes to
- his/her notification settings changes.
- (real_flush_updates): Initialise new mail notification if not yet
- initialised and setup an idle callback if none is already set.
- (update_1folder): Now takes an additional argument `new' which
- states whether or not the fodler got any new mail so that we may
- handle notify the user (if needed).
- (folder_changed): Pass in the number of new messages received.
-
-2003-08-19 Not Zed <NotZed@Ximian.com>
-
- * mail-callbacks.c (mail_generate_reply): Added a comment for
- translators.
-
-2003-08-19 David Woodhouse <dwmw2@infradead.org>
-
- * mail-callbacks.c (mail_generate_reply): Add a timezone offset to
- the attribution string.
-
-2003-08-19 Not Zed <NotZed@Ximian.com>
-
- * mail-format.c (write_date): Added translation for day and
- localtime strings. Also removed the tz_zone stuff, and just use
- 'localtime' always.
-
-2003-08-15 David Woodhouse <dwmw2@infradead.org>
-
- * mail-format.c (write_date): Show date in localtime too.
-
-2003-08-19 Harry Lu <harry.lu@sun.com>
-
- ** For #45348
-
- * mail-display.c (mail_display_render): Change "%P" to "%p" so
- that strftime() can work under solaris.
-
-2003-08-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-ops.c (mail_send_message): Don't abort at the first failure
- after sending (filtering, appending to Sent, syncing). Instead,
- keep a running tab of exceptions and then set a culmulative
- exception at the end to report to our caller. Also, if we fail to
- append to the account Sent folder, try again with the local Sent
- folder. Fixes bug #46512.
-
-2003-08-13 Suresh Chandrasekharan <suresh.chandrasekharan@sun.com>
-
- * e-searching-tokenizer.c (searcher_next_token): Fix for 45818 (
- i18n mail messages search only produces '[?]'). Now multibyte
- character selection works correctly. But due to associated gtkhtml
- bug, the find button functionallity for multibyte characters is
- broken.
-
-2003-08-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-tools.h: Removed unused function prototype.
-
-2003-08-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-session.c (remove_timeout): Removed.
- (register_timeout): Removed.
-
-2003-08-09 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-component.c (storage_go_online): Pass NULL for the
- operation pointer to mail_note_store(), to sync with Michael's
- changes.
-
-2003-08-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (handle_multipart_encrypted): Updated for
- CamelMimePart::content_type changes.
-
- * mail-ops.c (save_part_save): Use
- camel_data_wrapper_decode_to_stream() here.
-
- * mail-display.c (drag_data_get_cb): Updated for
- CamelMimePart::content_type changes.
- (do_attachment_header): Same.
-
-2003-07-31 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (mail_format_raw_message): Updated to pass FALSE
- as the 'decode' param to
- mail_format_data_wrapper_write_to_stream().
- (mail_format_data_wrapper_write_to_stream): Now takes a boolean
- arg telling whether to decode or not. Also reworked the charset
- logic now that camel doesn't handle this for us any longer.
- (mail_format_get_data_wrapper_text): Updated.
- (handle_text_plain): Same.
- (handle_text_enriched): Here too.
-
- * mail-display.c (do_attachment_header): Call decode_to_stream
- here instead of write_to_stream.
- (do_external_viewer): Same.
- (on_url_requested): Same. Also updated for
- mail_format_data_wrapper_write_to_stream().
- (try_part_urls): Call decode_to_stream.
- (drag_data_get_cb): Same.
-
-2003-08-05 Not Zed <NotZed@Ximian.com>
-
- ** See bug #32732
-
- * message-list.c (mail_regen_list): use thread_new.
-
- * mail-local.c (reconfigure_response): use thread_new.
-
- * mail-display.c (stream_write_or_redisplay_when_loaded): use
- thread_new.
-
- * mail-config.c (mail_config_check_service): use thread_new rather
- than queue.
-
- * mail-callbacks.c (view_msg): change to use mail_get_messages(),
- fixes FIXME.
- (do_view_messages): handle get_messages callback.
- (do_view_message): removed.
-
- * mail-ops.c (mail_get_folderinfo): Use a new thread thread
- semantic.
- (mail_save_part): "
- (mail_store_set_offline): "
- (mail_sync_folder): use queued_slow thread queue.
- (mail_expunge_folder): "
- (mail_empty_trash): "
-
- ** See bug #47224. Hook onto clicked rather than button_pressed,
- so that dnd works.
-
- * mail-display.c (inline_toggle): toggle a part inline.
- (button_press): change back to only handle button clicked events,
- renamed to inline_button_clicked.
- (do_attachment_header): hook onto clicked rather than
- button_press_event, and move key_press_event to
- inline_button_pressed.
- (do_signature): Same.
- (inline_button_pressed): handle inline button key press event
- explicitly.
-
-2003-07-29 Not Zed <NotZed@Ximian.com>
-
- * mail-folder-cache.c (mail_note_store): add a CamelOperation for
- overriding status handler.
-
- * mail-send-recv.c (receive_update_got_store): Pass our own cancel
- handle to get_folderinfo and mail_note_store.
- (mail_send_receive, mail_receive_uri): Same for get_store.
-
- * mail-ops.c (mail_get_store, mail_get_folderinfo): Add a
- CamelOperation argument, for overriding the status handler. Fixed
- most calles to pass NULL to use the default.
-
-2003-09-15 Not Zed <NotZed@Ximian.com>
-
- * em-folder-browser.c (emfb_activate): remove warning about folder
- not being loaded yet - it basically never is.
-
- * em-popup.c (emp_standard_menu_factory): dont setup any global
- select menu's yet. they're all handled by folderview atm.
-
-2003-09-11 Not Zed <NotZed@Ximian.com>
-
- * em-format-html.c (efh_finalise, efh_format_timeout): Use a
- proper hash free func, otherwise it dont work.
-
-2003-09-11 Not Zed <NotZed@Ximian.com>
-
- * em-inline-filter.[ch]: A new class which implements an inline
- snooper via a mime filter, so it is fully streamable. contents
- merely passes through the filter.
-
- * em-format-html.c (efh_finalise): free text substitute parts
- table.
- (efh_text_plain): transform a text part into a multipart, scanning
- for inline data. Keep the multipart around for redraws.
- (efh_format_timeout): clear the text substitute parts table.
-
-2003-09-10 Not Zed <NotZed@Ximian.com>
-
- * em-format-html-display.c (efhd_init): hook onto realise so we
- get the real theme-applied style.
- (efhd_gtkhtml_realise): get the theme data for colour defaults.
- Tweak the colour selection to make it work better with dark
- themes.
-
- * em-format-quote.c (emfq_format_source): we need to implement
- this.
- (emfq_format_error): we need not to call parent, it doesn't
- implement it.
-
- * message-list.c (message_list_select_uid): don't emit
- changedhere, let it go through the table cursor change.
-
- * em-folder-browser.c (em_folder_browser_show_preview): use
- folderview.preview_active for this state.
- (em_folder_browser_show_preview): clear the current message when
- we turn off the message view, and load the current one when turn it on.
-
- * em-folder-view.c (emfv_destroy): zero out preview + list.
- (emfv_list_message_selected): check preview_active before doing
- anything.
- (emfv_edit_cut):
- (emfv_edit_copy): only run if preview active.
-
- * em-format-html.c (efh_format_do): output the proper html
- headers, etc.
-
-2003-09-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-gui.c (mail_account_gui_save): Allow the user to
- select any fodler for his/her Drafts and Sent folders. Fixes bug
- #45412.
-
-2003-09-09 Not Zed <NotZed@Ximian.com>
-
- * em-utils.c (forward_non_attached): implement forward quoted.
-
- * em-format-quote.[ch]: New class, em-format-html-quote wont cut
- it. Sigh.
-
- * em-format-html-quote.c (efhq_base_init): move type init stuff
- here.
- (efhq_complete): remove, this is a signal.
- (efhq_multipart_related): we need to override the base class, we
- don't want to output any attachment html.
-
- * em-format-html-print.c (efhp_base_init): move builtin type init
- to here.
-
- * em-format-html.c (efh_init): get xmailer mask from gconf (sigh).
- (efh_format_header): inmplement most of xmailer mask thing.
- rupert icon not done yet, probably needs to be done as part of
- em-format-html-display, sigh.
- (type_builtin_table[]): add image/svg to supported image formats.
- (efhd_base_init): move type init to here.
- (efh_text_enriched): write to the filtered_stream, not stream.
-
- * em-format.c (em_format_format_text): oops, actually use any
- supplied charset.
- (emf_base_init): move hashtable init into base_init, so we get a
- new copy for each derived class too.
-
- * mail-send-recv.c (build_dialogue): use an eclippedlabel for
- status. Fixed all uses.
-
-2003-09-08 Not Zed <NotZed@Ximian.com>
-
- * em-format-html.h (EMFormatHTML): added a simple_headers option,
- only output headers in basic format. Added hide_headers option,
- to disable all header output.
-
- * em-format-html-quote.c (efhq_format_message): blockquote the
- contnet, thats how you cite it!
- (efhq_init): turn on simple headers for html output.
- (efhq_format_message): output headers and part directly, bypassing
- parent format_message.
- (efhq_format_message): implement hide_headers.
-
- * em-format-html.c (efh_busy): implement busy.
- (efh_format_message): implement simple_headers option.
- (efh_format_text_header): implement simple_headers option.
- (efh_format_message): move the header formatting stuff into
- exported em_format_html_format_headers.
- (efh_format_message): only output headers if not hidden.
-
- * em-format.c (emf_busy): base implementation of a new virtual
- method, returns TRUE if the object is still busy
- rendering/downloading stuff.
-
- * em-utils.c (em_utils_message_to_html): renamed from
- em_utils_quote_message. Also make sure the html conversion is
- complete before getting the data.
- (em_utils_part_to_html): similar, but for parts.
- (composer_set_body): put in David Woodhouse's timezone in
- attribution patch.
- (composer_set_body): we want to quote the part (content), we don't
- want message headers.
- (em_utils_message_to_html): add a 'show headers' argument.
-
- * folder-browser-factory.c (control_activate): removed.
- (control_deactivate): removed.
-
- * mail-identify.c:
- * folder-browser.[ch], folder-browser-ui.[ch]:
- * mail-callbacks.[ch], mail-search.[ch]:
- * mail-display.[ch], mail-format.[ch], mail-display-stream.[ch]:
- * message-browser.[ch]: Removed, fixed all users.
-
- * component-factory.c (factory): change callbacks to em_utils
- ones.
- (configure_folder_popup): comment out some of the reconfigure
- stuff. Wont have it in 1.6?
- (handle_external_uri_cb): use em_utils stuff.
- (user_create_new_item_cb): "
- (owner_unset_cb): "
-
- * em-composer-utils.c (composer_send_cb): rename to
- em_utils_composer_send_cb, and export, sigh, needed for factory.
- (composer_save_draft_cb): Same.
-
-2003-09-05 Not Zed <NotZed@Ximian.com>
-
- * em-format.c (type_builtin_table[]): Add a fallback multipart/*
- for other types (e.g. multipart/report)
- (em_format_fallback_handler): fix some bad logic.
-
- * em-folder-browser.c: track the pane size if the user changes it.
- (emfb_set_folder): Added a bit of a mess that will select the
- first unread message the first time you visit a folder.
- (emfb_destroy): impelment. clear up outstanding signal handlers.
- (emfb_list_built): Select the first unread message. this isn't
- entirely reliable as yet, and not configurable at all.
-
- * em-format-html-display.c (em_format_html_display_set_animate)
- (em_format_html_display_set_caret_mode): guess? :)
- (efhd_attachment_button): dont desensitise the button, just dont
- hook onto it, otherwise it looks fugly.
-
- * em-folder-view.c (emfv_list_done_message_selected): dont lookup
- gconf values every time. use g_timeout_add rather than
- gtk_timeout, remove fixme's.
- (emfv_setting_notify): listner for gconf changes, reflect
- internally.
- (emfv_setting_setup): setup listner for gconf, and read initial
- settings.
- (emfv_activate): use local copy of settings rather than snooping
- gconf.
- (emfv_caret_mode): propagate caret-mode to display
-
- * em-format-html-quote.c (efhq_format_message): remove gconf
- stuff, our parent already has citation colour.
-
- * em-format-html.c (efh_format_timeout): remove gconf stuff.
- (em_format_html_set_load_http, em_format_html_set_mark_citations):
- set options on formatter, re-renders if required.
- (type_builtin_table[]): text/* should go to text/plain, not
- text/enriched.
-
-2003-09-04 Not Zed <NotZed@Ximian.com>
-
- * em-utils.c (confirm_expunge): rename it to emu_confirm_expunge
- and remove leading whitespace before function.
- (em_utils_expunge_folder): we want to expunge the folder, not
- empty the trash. Jeff didn't even run this once ...
-
- * em-popup.c: Lots of new features, 'global' popup menu's on a
- per-selection type, via factories, popup selections (targets), a
- standard factory for many menu items.
- (emp_apps_open_in): duh, fix uri using logic
- (emp_standard_menu_factory): only add apps to app list if
- !requires_terminal.
-
- * em-format-html-display.c (efhd_open_in, efhd_popup_free_items):
- moved to em-popup.c
- (efhd_popup_save_attachment, efhd_popup_save_message)
- (efhd_popup_reply_sender, efhd_popup_reply_list)
- (efhd_popup_reply_all, efhd_popup_forward): (re)moved to em-popup.c
- (efhd_attachment_popup): use enew popu stuff.
- (efhd_attachment_button): Scale the icons for mime-type icons.
-
- * em-folder-view.c (em_folder_view_disable_mask): removed
- ... moved to em-popup.
- (em_folder_view_get_popup_target): new method, get the selection
- target for the folder view.
- (emfv_html_popup_saveas, emfv_html_popup_link_open)
- (emfv_html_popup_link_copy, emfv_html_popup_address_send)
- (emfv_html_popup_address_add, emfv_format_popup_free_items): moved
- to em-popup.c
- (emfv_format_popup_event): use new popup stuff.
- (emfv_popup): use new popup stuff, but still just use all local
- menu's.
-
-2003-09-03 Not Zed <NotZed@Ximian.com>
-
- * em-folder-view.c (emfv_format_popup_event): implement, a popup
- menu for right-clicking on links and images.
- (emfv_html_popup_link_copy): implement.
- (emfv_init): setup an invisible for selection stuff.
- (emfv_destroy): free invisible
-
- * em-utils.c (em_utils_get_proxy_uri): utility to get the current
- system proxy setting.
- (emu_set_proxy): implementation.
-
- * em-camel-stream.[ch]: removed.
-
- * em-format-html.c (efh_url_requested, efh_format_timeout): use
- em_html_stream rather than em_camel_stream.
- (emfh_gethttp): set the system proxy on the new stream.
- (emfh_multipart_related_check): use puri rather than purin inside
- the loop - duh.
- (emfh_multipart_related_check): removed 'unrelated part' warning,
- they can be (and normally are) added by the callbacks.
-
- * em-format-html.h (EMFormatHTMLJob): s/estream/stream/
-
- * em-html-stream.[ch]: New subclass of emsyncstream, replacement
- for em-camel-stream.
-
-2003-09-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-folder-browser.c (emfb_folder_expunge): Call
- em_utils_expunge_folder instead.
-
- * em-utils.c (em_utils_expunge_folder): New function.
- (confirm_expunge): Make private.
-
-2003-09-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-folder-browser.c (emfb_folder_expunge): Confirm hat the user
- wants to expunge.
- (emfb_empty_trash): Implemented.
-
- * em-utils.c (em_utils_prompt_user): Make public (used to be
- e_question).
- (em_utils_confirm_expunge): New function to confirm that the user
- wants to expunge.
- (em_utils_empty_trash): New function to empty all Trash folders.
-
- * em-composer-utils.c: Get rid of e_question and use em-utils'
- em_utils_prompt_user() function instead.
-
- * em-format-html-quote.[c,h]: New formatter for quoting
- replies/forwards/etc.
-
- * em-utils.c (em_utils_quote_message): New function.
- (composer_set_body): Use the new em_utils_quote_message()
- function.
- (em_utils_temp_save_part): Only g_free mfilename if it was
- malloc'd.
-
- * mail-tools.c (mail_tool_quote_message): Removed.
- (mail_tool_forward_message): Removed.
-
-2003-09-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-format.c (em_format_class_remove_handler): New function to
- remove a mime-type handler from a class.
-
- * em-format-html.c (efh_init): Set the CITATION bit for the
- default html flags.
-
- * em-format-html-display.c: Fixed some compiler warnings by adding
- appropriate includes.
- (efhd_multipart_signed): Don't write "inlined signature...".
-
-2003-09-03 Not Zed <NotZed@Ximian.com>
-
- * em-icon-stream.[ch]: New subclass of emsyncstream, write camel
- stream one side, creates an icon on the other.
-
- * em-sync-stream.[ch]: New file, an abstract class for creating
- write-any-thread-act-gui-thread stuff. 'em-camel-stream' will
- subclass this.
-
- * em-format-html-display.c (efhd_attachment_button): setup a job
- to write out an icon if the type is an image type, otherwise try
- and get the icon directly. no caching yet. the system icons
- aren't scaled properly either.
- (efhd_write_icon_job): async job to write out image content.
-
-2003-09-02 Not Zed <NotZed@Ximian.com>
-
- * em-format-html.c (emfh_new_job): renamed to
- em_format_html_job_new and made public.
- (emfh_queue_job): renamed to em_format_html_job_queue, and made
- public.
-
- * em-format-html.h: Made EMFormatHTMLJob a public structure.
-
-2003-09-02 Not Zed <NotZed@Ximian.com>
-
- * em-folder-view.h (struct _EMFolderView): track the uicomponent
- while we're activated.
-
- * em-message-browser.c (em_message_browser_window_new): kill
- warning.
- (emmb_init, emmb_finalise): kill printf
-
- * em-format-html.c (efh_format_header): Converted code from head
- from David Woodhouse <dwmw2@infradead.org>'s timezone display
- patch.
- (efh_format_text_header): support new flag, HEADER_HTML - header
- alredy in html format.
-
- * em-format-html-print.c (em_format_html_print_print): only ref
- print_config if != NULL.
-
- * em-folder-browser.c (emfb_tree_key_press): handle
- space/backspace in messagelist to scroll the message view.
- (emfb_create_view_menus): setup view menu's, this should probably
- live in message-list.
- (emfb_init): setup the folderbrowser enable map into the list.
- (emfb_enable_map): folder browser enable map
-
- * em-utils.c (em_utils_adjustment_page): new helper to scroll an
- adjustment up/down 1 page.
-
- * em-folder-view.c (emfv_list_double_click): implement, open
- window.
- (emfv_list_key_press): implement keybinding overrides. Enhance
- delete key to undelete if everything is already deleted.
- (emfv_build_enable_mask): separate out enable mask creation.
- (emfv_popup): use above to get mask.
- (emfv_enable_menus): enable/sensitize menus, use the same disable
- mask system as used for the popups.
- (emfv_destroy): change to use g_source_remove on seen_id.
- (emfv_finalise): free up folders, clean up async event thing.
- (emfv_init): setup an async event handler
- (emfv_set_folder): handle hook/unhook of folder_changed events.
- (emfv_folder_changed): proxy folder changed to main thread, ignore
- the details of what changed.
- (emfv_gui_folder_changed): update the menu's to reflect any folder
- changes.
- (emfv_build_disable_mask): added CAN_THREADED.
- (em_folder_view_disable_mask): make public (rename from
- emfv_build_disable_mask).
- (emfv_enable_menus): changed to work on a list of arrays of
- enablers, so they can be subclassed.
- (emfv_init): add our enable map to the ui.
- (em_folder_view_disable_mask): added support for can hidden (there
- are hidden messages).
-
-2003-09-01 Not Zed <NotZed@Ximian.com>
-
- * em-popup.c: New, simple menu-merging popup menu implementation.
- NOTE: should be temporary, but needs something that has similar
- merging facilities.
-
- * em-folder-view.c (emfv_popup*): added popup callbacks, implement
- a popup menu, using em_popup.
- (emfv_message_*): replaced a whole bunch of one-line, or simple
- functions with macro's to map to the popup implementation.
- (emfv_tools_vfolder*, emfv_tools_filter*): map to popup
- equivalents.
- (emfv_init): drop printf
-
- * em-format-html-display.c (efhd_attachment_popup): use the
- em_popup stuff to build a dynamic menu.
-
- * em-utils.c (em_utils_temp_save_part): change assignment order ot
- kill warning.
- (emu_get_save_filesel): handle null/empty name by appending / to
- the filename.
-
-2003-08-30 Not Zed <NotZed@Ximian.com>
-
- * mail-search.glade: forgot to add this yesterday.
-
- * em-utils.h: don't include stuff we dont need to.
-
- * em-folder-view.c (emfv_message_forward): just call
- em_utils_forward_messages.
-
- * em-format-html-display.c (em_format_html_display_search):
- removed unused.
- (efhd_drag_data_get): cleanup, use em_utils_temp_save_part.
- (efhd_attachment_popup): quick hack, setup a bunch more menu
- items, for forwarding inline messages, hook up saving parts, and
- messages, and hook up the 'open in' menu.
- (efhd_open_in): implement.
-
- * em-utils.c (em_utils_save_message): Renamed to
- em_utils_save_part.
- (em_utils_filesel_prompt): removed, it just makes things more
- complex than having a single response handler.
- (em_utils_save_part): move dialog stuff here, it also creates a
- name based on the type of part its given.
- (emu_get_save_filesel): new method to create a fileselector with
- standard options.
- (emu_save_part_response): handle file selector response for save
- part.
- (can_save): renamed to emu_can_save
- (em_utils_save_messages): use get_save_filesel
- (emu_can_save): handle the path="" case
- (em_utils_save_part): Add a prompt argument.
- (filesel_ok_cb): removed.
- (emu_update_save_path): update the gconf save_dir setting.
- (em_utils_forward_messages): helper to forward using default
- style.
- (forward_non_attached): remove uids argument.
- (em_utils_forward_message): helper to forward a message using the
- default forward style.
- (forward_non_attached): removed folder argument.
- (em_utils_temp_save_part): helper to save a part to a temporary
- file, e.g. for dnd, app launch, etc.
-
-2003-08-29 Not Zed <NotZed@Ximian.com>
-
- * em-folder-view.c: set 'outgoing' properly.
-
- * em-folder-browser.c (emfb_tools_subscriptions): enforce a single
- instance of the subscribe editor.
- (emfb_subscribe_editor_destroy): clear subscribe editor handle.
-
-2003-08-29 Not Zed <NotZed@Ximian.com>
-
- * em-camel-stream.c (em_camel_stream_new): Added some optional
- logging code.
- (stream_close): and here.
- (stream_write): and here.
-
- * em-folder-browser.c (emfb_init): remove fixme about search bar,
- its there now. also fixme's about dnd/selection, they are handled
- in lower-level widgets.
- (em_folder_browser_show_preview): dont exit if show preview set,
- but only if it hasn't changed.
- (emfb_view_hide_selected, emfb_view_show_all)
- (emfb_view_hide_read): removed some spurious printfs.
-
- * Makefile.am (glade_DATA): Added mail-search.glade. FIXME:
- should all glade files be merged into 1?
-
- * em-format-html-display.c (efhd_format_clone): remove search
- match count code from here - wont be finished rendering at this
- point anyway.
- (em_format_html_display_search): new api for running an
- interactive search popup.
- (efhd_update_matches, efhd_update_search)
- (efhd_search_entry_activate, efhd_search_case_toggled)
- (efhd_search_response): helpers/callbacks for search popup.
- (efhd_class_init): hook into complete signal on EMFormat.
- (efhd_complete): complete rendering handler, update match count.
-
- * em-folder-view.c: removed fixme about api's - yes, do need two
- set_folder api's.
- (emfv_edit_cut, emfv_edit_copy): removed printfs
- (emfv_edit_paste): removed commented call to html_paste, we never
- want to do that.
-
-2003-08-29 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-folder-view.c (emfv_message_mark_unread): If there is a
- mark-as-read timeout handler registered, unregister it here.
- (emfv_tools_filter_mlist): Implemented.
- (emfv_tools_filter_recipient): Implemented.
- (emfv_tools_filter_sender): Implemented.
- (emfv_tools_filter_subject): Implemented.
- (emfv_tools_vfolder_mlist): Implemented.
- (emfv_tools_vfolder_recipient): Implemented.
- (emfv_tools_vfolder_sender): Implemented.
- (emfv_tools_vfolder_subject): Implemented.
-
-2003-08-28 Not Zed <NotZed@Ximian.com>
-
- * em-folder-browser.c (emfb_search_menu_activated)
- (emfb_search_config_search, emfb_search_search_activated)
- (emfb_search__query_changed): Implement search-bar callbacks.
- (emfb_init): setup search bar.
-
-2003-08-28 Not Zed <NotZed@Ximian.com>
-
- * em-folder-view.c (emfv_message_reply): common reply code entry
- point, also implement simple reply-to-highlighted text (currently
- disabled).
- (emfv_activate): disable resend message on non-sent folders.
- (emfv_message_reply_all, emfv_message_reply_list)
- (emfv_message_reply_sender): use message_reply for common code.
- (em_folder_view_open_selected): in drafts or outbox, edit the
- message instead.
- (emfv_activate): force a sync on deactivate.
-
- * em-utils.c (em_utils_selection_get_mailbox): get mailbox
- (message/rfc822?) selection data.
- (em_utils_read_messages_from_stream): helper to move stuff from a
- mbox stream to a folder.
- (em_utils_folder_is_drafts, em_utils_folder_is_sent)
- (em_utils_folder_is_outbox): from folder browser helpers for
- customising the user experience.
-
- * message-list.c (message_list_construct): hook onto dnd stufd.
- (ml_tree_drag_data_get): implement drag sending.
- (ml_tree_drag_data_received): implement drag recieving.
-
- * em-format-html-display.c (efhd_drag_data_get): implemented.
- (efhd_drag_data_delete): implemented.
- (efhd_attachment_button): setup dnd callbacks.
-
-2003-08-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-folder-view.c (emfv_destroy): override the destroy method for
- GtkObject - unregister the mark-as-seen timeout if one is
- currently registered.
- (emfv_list_done_message_selected): Add the mark-as-seen timeout
- functionality here.
- (emfv_format_link_clicked): Implemented.
-
-2003-08-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-utils.c (get_reply_list): Implemented.
-
-2003-08-27 Not Zed <NotZed@Ximian.com>
-
- * em-message-browser.c (emmb_activate): disable Edit->Paste menu
- always.
-
- * em-folder-browser.c (emfb_edit_paste): do a message-list paste,
- not a html one.
- (emfb_edit_cut, emfb_edit_copy, emfb_edit_paste): Moved to folder-view.
-
- * message-list.c (message_list_paste): trigger a paste action.
- (message_list_set_folder): added a uri argument, and save it
- internally, fixed all callers.
- (message_list_finalise): free the folder uri.
-
- * em-utils.c (em_utils_selection_set_mailbox): New helper to set
- the current selection as text in a berkely mailbox format.
- (em_utils_write_messages): helper to write stuff to a stream in
- mbox format.
-
-2003-08-27 Not Zed <NotZed@Ximian.com>
-
- * message-list.c (on_selection_changed_cmd): own/deown the primary
- selection when it changes.
- (message_list_init): init private data and invisible for
- selection.
- (message_list_destroy): free invisible.
- (message_list_finalise): free private data.
- (get_selected_cb): removed.
- (message_list_copy): new method to do copy and cut. cut/copy to
- the clipboard.
- (ml_selection_clear_event): clear the right selection when
- requested.
- (message_list_has_primary_selection): helper to find out if the
- message-list has the selection. is there a gtk way for this?
-
-2003-08-26 Not Zed <NotZed@Ximian.com>
-
- * mail-local.c (mlf_meta_set, mlf_meta_get): proxy meta-data stuff
- to subservient folder.
-
-2003-08-23 Not Zed <NotZed@Ximian.com>
-
- * em-folder-view.c (emfv_init): init preview here always.
-
-2003-08-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-folder-view.c (em_folder_view_print): Use
- e_dialog_set_transient_for().
- (emfv_message_delete): Fixed a FIXME.
-
- * em-folder-browser.c (emfb_edit_cut): Implemented.
- (emfb_edit_copy): Implemented.
- (emfb_edit_paste): Implemented.
-
- * em-format-html-display.c (em_format_html_display_cut): New function.
- (em_format_html_display_copy): New.
- (em_format_html_display_paste): New.
-
-2003-08-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-utils.c (em_utils_flag_for_followup): Use
- e_dialog_set_transient_for().
- (em_utils_filesel_prompt): Same.
- (post_reply_to_message): Here too.
- (em_utils_edit_filters): Same.
- (create_new_composer): And here.
- (em_utils_compose_new_message_with_mailto): Here too.
- (em_utils_post_to_url): "
- (redirect_get_composer): Same.
- (reply_get_composer): Again...
-
- * em-folder-browser.c (emfb_tools_filters): Implemented.
-
- * em-utils.c (em_utils_edit_filters): New function to open the
- filter editor dialog.
-
-2003-08-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-utils.c (em_utils_flag_for_followup): Implemented.
- (em_utils_flag_for_followup_clear): Implemented.
- (em_utils_flag_for_followup_completed): Implemented.
-
- * em-folder-view.c (emfv_message_followup_flag): Implemented.
- (emfv_message_followup_clear): Implemented.
- (emfv_message_followup_completed): Implemented.
-
-2003-08-22 Not Zed <NotZed@Ximian.com>
-
- * em-camel-stream.c (em_camel_stream_new): now take the gtkhtml
- too, and hook onto it's destroy so we don't try writing anymore
- after its gone.
- (stream_write, stream_flush, stream_close, emcs_gui_received):
- NOOP if the gtkhtml has been destroyed.
- (emcs_gtkhtml_destroy): null out the stream when the gtkhtml gets
- destroyed, it is no longer valid.
- (emcs_gui_received): dont try to soak all outstanding events, it
- always runs synchronous anyway, just get one and exit.
-
- * em-format-html.c (efh_gtkhtml_destroy): if the gtkhtml gets
- destroyed, abort any pending timeouts/processing.
- (efh_format_source): fixed implementation to write out all
- headers.
- (efh_multipart_related, emfh_multipart_related_check): separate
- checking for unused parts into a separate job, which is run after
- previous ones are executed. keep track of visibility tree level
- in job, etc.
-
-2003-08-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-folder-browser.c (emfb_mail_compose): Implemented.
- (emfb_mail_post): Implemented.
-
- * em-utils.c (em_utils_compose_new_message): New function.
- (em_utils_compose_new_message_with_mailto): New.
- (em_utils_post_to_url): New.
-
-2003-08-21 Not Zed <NotZed@Ximian.com>
-
- * subscribe-dialog.glade: removed the text in the progress thing.
- It never showed up anyway and caused weird resizing stuff when the
- progress bar was active.
-
- * em-subscribe-editor.c: Found the correct version of the new
- subscribe code (on branch, duh!), and integrated it.
- (sub_selection_changed): Sensitise buttons based on selection.
-
- * em-format-html.c (efh_text_plain, efh_text_enriched)
- (efh_write_text_html): Use format_text for text output.
- (efh_write_image): use explicit image writer.
- (emfh_gethttp): added some progress stuff.
- (efh_format_do): maintain the accessible uri tree during jobs.
- (efh_url_requested): store the current uri accessibility tree node
- in the job, so it can be properly set for sub-jobs.
- (emh_multipart_related): moved here, can't use super-class version
- as it doesn't know about async jobs.
- (type_buildin_table[]): Added image/jpg and image/jpeg for the
- brokenmailers out there and to reduce the whinge.
-
- * em-format.c (em_format_format_content): For text parts, perform
- default charset/charset snooping/decoding. No longer closes the
- stream once complete.
- (emf_write_related): close stream ourselves.
-
-2003-08-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-folder-view.c (emfv_message_forward): Implemented.
- (emfv_message_forward_attached): Implemented.
- (emfv_message_forward_inline): Implemented.
- (emfv_message_forward_quoted): Implemented.
- (emfv_message_redirect): Implemented.
- (emfv_message_post_reply): Implemented.
- (emfv_message_reply_all): Implemented.
- (emfv_message_reply_list): Implemented.
- (emfv_message_reply_sender): Implemented.
- (emfv_message_resend): Implemented.
- (emfv_message_saveas): Implemented.
-
- * em-composer-utils.c: New source file containing all the composer
- send/draft callback mess.
-
- * em-utils.c (em_utils_uids_copy): New convenience function to
- copy a list of uids.
- (em_utils_uids_free): New convenience function to free a list of
- uids.
- (em_utils_save_message): New function to save a CamelMimeMessage
- (prompts the user for a location to save).
- (em_utils_save_messages): New function to save a list of messages
- (given a folder and list of uids).
- (em_utils_configure_account): Configure a new account...
- (em_utils_check_user_can_send_mail): Make sure the user has a
- transport setup.
- (em_utils_edit_message): New function to edit a message object.
- (em_utils_edit_messages): New function to open a composer to edit
- each message.
- (em_utils_forward_attached): New function to forward messages as
- an attachment,
- (em_utils_forward_inline): Forward a bunch of messages inline.
- (em_utils_forward_quoted): Forward a bunch of messages quoted.
- (em_utils_redirect_message): Redirect a message object.
- (em_utils_redirect_message_by_uid): Redirect a message given a
- folder and uid.
- (em_utils_reply_to_message): Reply to a message object.
- (em_utils_reply_to_message_by_uid): Reply to a message given a
- folder and uid.
- (em_utils_post_reply_to_message_by_uid): Post a reply to a message
- given a folder and uid.
-
- * mail-ops.c (filter_folder_free): Use em_utils_uids_free().
- (transfer_messages_free): Same.
- (get_messages_free): Here too.
- (save_messages_free): Same.
-
-2003-08-20 Not Zed <NotZed@Ximian.com>
-
- * em-subscribe-editor.[ch]: new widget, a dialog for editing
- subscriptions.
-
- * em-format-html.c (efh_format_done): emit a complete when done.
-
- * em-format.c (emf_class_init): Added a 'complete' signal, so that
- printing knows when to print.
-
- * em-format-html-print.c (em_format_html_print_print): Changed to
- take the message and source formatter too. Runs an async render
- then prints.
-
-2003-08-19 Not Zed <NotZed@Ximian.com>
-
- * em-*.c: stacks more changes, added some bonobo menu setup, and
- implemented the trivial functions.
-
- * em-message-browser.[ch]: New message browser, inherits from
- em-folder-view. Basically works.
-
- * message-list.c (message_list_select_uid): if we're selecting
- while still loading, setup a pending select.
- (regen_list_free): Check for a pending select, and select the
- message if we're now idle.
-
- * em-folder-view.c (em_folder_view_set_message,
- em_folder_view_set_folder): Make virtual macro's.
- (emfv_control_activate): added hook to enable bonobo state when setup.
-
- * em-format.c (emf_format_clone): base implementation, just clears
- state data.
-
- * em-format.h: change ::format to ::format_clone. Make
- em_format_format_clone a macro/virtual method.
-
- * mail-mt.c (em_channel_setup): new function to setup i/o
- channels, so we can control the recursive flag. leave off for
- now.
- (mail_msg_init): setup MsgPort channels using above.
-
- * em-format-html.c (efh_format): serialise/de-recursify formatting
- via a timeout function.
- (efh_format_timeout): keep polling to find out if cancellation is
- complete, then kick off a new render.
-
-2003-08-18 Not Zed <NotZed@Ximian.com>
-
- * em-*.c: more updates, incl threaded formatting queue.
-
-2003-08-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-format-html-display.c (em_format_html_display_zoom_in): New
- method to zoom-in on the gtkhtml contents.
- (em_format_html_display_zoom_out): Same but for zoom-out
- (em_format_html_display_zoom_reset): You get the idea.
-
-2003-08-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (invert_selection): Use
- message_list_invert_selection().
- (select_thread): Use message_list_select_thread().
- (select_all): Use message_list_select_all().
-
- * message-list.c (message_list_select_all): New function.
- (message_list_select_thread): New function.
- (message_list_invert_selection): New function.
-
-2003-08-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-session.c: Synced up with HEAD.
-
- * component-factory.c:
-
- * mail-folder-cache.[c,h]:
-
- * mail-tools.h:
-
- * mail-ops.[c,h]:
-
- * mail-send-recv.c:
-
- * mail-format.[c,h]:
-
- * mail-display.c:
-
- * mail-account-gui.c:
-
- * mail-local.c:
-
- * mail-offline-handler.c:
-
- * subscribe-dialog.c:
-
-2003-08-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * em-format-html-display.c: Fixed some compiler warnings.
-
- * em-format.c: Updated for new mime-parser changes made to HEAD.
-
- * em-folder-view.c: Fixed some compiler warnings.
-
- * em-format-html.c: Fixed some compiler warnings.
-
-2003-08-06 Not Zed <NotZed@Ximian.com>
-
- * em-format-html-display.c (efhd_format_attachment): Added bonobo
- embeddables.
-
-2003-08-01 Harry Lu <harry.lu@sun.com>
-
- *Fix for bug #6951
-
- * mail-display.c (launch_cb): Bypass the new added menu item.
- (save_all_parts_cb): New function. Do the real save-all work.
- (save_all_parts): New function. Get the directory to save to.
- (save_all_cb): New function. The call-back function for the new
- added menu item.
- (pixmap_press): Add the new menu item "Save All Attachment...".
- (ptr_array_free_notify): A simple wrapper function to free the
- pointer array.
- (do_attachment_header): Save attachment pointer in an array for
- "Save All Attachment" use.
-
-2003-08-01 Yuedong Du <yuedong.du@sun.com>
-
- * message-browser.c (on_key_press): close mail message window
- using 'ESC' key, fix bug #47087
-
-2003-07-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-crypto.c: Removed smime functions as they were stale.
-
-2003-07-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * message-browser.c (message_browser_new): Handle our own Delete
- key presses. Fixes bug #45597.
-
-2003-07-25 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-callbacks.c (do_view_message): No need to pass a shell
- argument to message_browser_new() anymore.
-
- * message-browser.c (message_browser_new): Removed arg shell. No
- need to pass it to folder_browser_new() either.
-
- * mail-component.c (create_view_callback): No need to pass a shell
- arg to folder_browser_factory_new_control() anymore.
-
- * folder-browser-factory.c (folder_browser_factory_new_control):
- Removed arg shell; folder_browser_browser_new() doesn't need it
- anymore.
-
- * folder-browser.c (folder_browser_destroy): No need to unref
- ->shell anymore.
- (folder_browser_new): Removed shell arg.
- (folder_browser_gui_init): Removed a const qualifier that was not
- supposed to be there.
-
- * folder-browser.h: Removed member shell from struct
- FolderBrowser.
-
-2003-07-25 Ettore Perazzoli <ettore@ximian.com>
-
- * folder-browser.c (folder_browser_gui_init): Get the search
- context through mail_component_peek_search_context(), since it's
- no longer a global variable.
- (folder_browser_gui_init): Cleaned up an extra unneeded if()
- statement.
-
- * mail-component.c: New member search_context in struct
- MailComponentPrivate.
- (mail_component_peek_search_context): New.
- (setup_search_context): New function to initialize the
- search_context, based on the old code in component-factory.c.
- (mail_component_init): Call it here.
- (impl_dispose): Unref the rule_context.
-
- * mail-component-factory.c: Removed global variable
- search_context.
-
-2003-07-25 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-component.c (browser_page_switched_callback): New callback
- for the "page_switched" signal on EStorageBrowser; deactivate the
- previous page, activate the new one.
- (impl_createControls): Connect.
-
-2003-07-24 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-mt.c (do_op_status): Pass "evolution-mail" as the ID to
- evolution_activity_client_new(). [This is just a temporary thing
- to avoid the fact that we don't have component-factory.h anymore.
- Eventually we'll just get rid of the activity client stuff.]
-
- * mail-component-factory.c: Added to the build. Also, finished
- implementing and moving the factory over from component-factory.c.
-
- * component-factory.c: Removed from the build.
- * component-factory.h: Removed from the build.
-
- * mail-component.c: Removed some debugging messages.
-
-2003-07-23 Ettore Perazzoli <ettore@ximian.com>
-
- * subscribe-dialog.c: Converted to use EStorages instead of
- EvolutionStorages and the new MailComponent object.
-
- * mail.h: Nuked a bunch of stuff. This will go away when I am
- done refactoring.
-
- * mail-offline-handler.c: Use the new MailComponent object.
-
- * mail-folder-cache.c, mail-folder-cache.h: Converted to use
- EStorages instead of EvolutionStorages.
-
- * mail-display.c: Use g_timeout and g_source functions instead of
- gtk_timeout functions.
-
- * mail-send-recv.c: Use g_timeout and g_source functions instead
- of gtk_timeout functions.
- (receive_update_got_store): Updated for the new mail_note_store().
-
- * mail-session.c: Use g_timeout and g_source functions instead of
- gtk_timeout functions.
-
- * mail-config-factory.c (factory): Removed.
-
- * folder-browser.c (folder_browser_destroy): Use GLib
- timeout/source functions instead of the deprecated GTK ones.
- (done_message_selected): Likewise.
- (folder_browser_gui_init): Protect against fb->search being NULL.
-
- * mail-account-gui.c (add_new_store): Use new MailComponent object
- and EStorages instead of EvolutionStorages.
- (mail_account_gui_save): Likewise.
-
- * mail-accounts.c (account_delete_clicked): Use new MailComponent
- object and EStorages instead of EvolutionStorages.
- (account_able_clicked): Likewise.
- (account_able_toggled): Likewise.
-
- * mail-autofilter.c: Use mail_component_peek_base_directory()
- instead of the evolution_dir global.
- * mail-callbacks.c: Likewise.
- * mail-config.c (uri_to_evname): Likewise.
- (mail_config_get_signature_list): Likewise.
- (delete_unused_signature_file): Likewise.
- * mail-display.c (mail_display_class_init): Likewise.
- * mail-importer.c (mail_importer_make_local_folder): Likewise.
- * mail-local.c (mlf_getv): Likewise.
- * mail-ops.c (uid_cachename_hack): Likewise.
- * mail-summary.c (generate_folder_summaries): Likewise.
- * mail-tools.c (mail_tool_get_local_inbox): Likewise.
- (mail_tools_folder_to_url): Likewise.
- * mail-vfolder.c (mail_vfolder_delete_uri): Likewise.
- (mail_vfolder_rename_uri): Likewise.
- (context_rule_removed): Likewise.
- (store_folder_deleted): Likewise.
- (store_folder_renamed): Likewise.
- (vfolder_load_storage): Likewise.
- (vfolder_editor_response): Likewise.
- (edit_rule_response): Likewise.
- (new_rule_clicked): Likewise.
- (vfolder_gui_add_rule): Likewise.
- * mail-session.c (main_get_filter_driver): Likewise.
- (mail_session_forget_password): Likewise.
- (mail_session_init): Get a base_directory arg.
-
- * component-factory.c, component-factory.h: Disabled a bunch of
- stuff to get it to compile in the new configuration. These files
- will eventually go away when I am done refactoring this.
-
- * Makefile.am: Do not build importers, compile generate
- skels/stubs for Evolution.
-
- * GNOME_Evolution_Mail.server.in.in: Rename control factory to
- OAFIID:GNOME_Evolution_Mail_Factory2. Add new component
- GNOME_Evolution_Mail_Component2.
-
- * mail-component-factory.c: New file implementing the Bonobo
- factory.
-
- * mail-component.c, mail-component.h: New files implementing the
- new mail component, using the new Evolution::Component IDL.
-
-2003-07-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (mail_format_data_wrapper_write_to_stream): Revert
- prior changes.
-
-2003-07-23 Dan Winship <danw@ximian.com>
-
- * folder-browser.c (message_list_drag_data_get): Fix type warnings
- (folder_browser_toggle_caret_mode): Remove unused variable.
-
- * folder-browser-ui.c (basename): remove unused function
-
- * mail-account-gui.c (mail_account_gui_build_extra_conf): Fix
- warnings
-
- * mail-callbacks.c (empty_trash): Remove unused variable.
-
- * mail-display.c: #include gal/widgets/e-gui-utils.h for
- e_auto_kill_popup_menu_on_selection_done
-
- * mail-importer.c: #include e-util/e-path.h for e_path_to_physical
-
- * mail-session.c (main_play_sound): don't declare filename to be
- const and then free it.
-
- * mail-vfolder.c (vfolder_edit_rule, vfolder_gui_add_rule): Fix
- casts
-
- * message-list.c (build_flat_diff): Fix a typo in the
- non-BROKEN_ETREE code
-
-2003-07-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (handle_multipart_encrypted): We don't have
- camel_pgp_mime_is_rfc2015_encrypted() anymore so just look at the
- protocol for now.
- (mail_format_data_wrapper_write_to_stream): Updated for the new
- way camel handles content objects.
-
-2003-07-15 Federico Mena Quintero <federico@ximian.com>
-
- * folder-browser.c (message_list_drag_data_received): Handle
- invalid URIs, or more likely, the last empty element in a URI list
- --- g_strsplit() will yield { "uri1", "", NULL }. Fixes #46398.
-
- * component-factory.c (destination_folder_handle_drop): Likewise.
-
-2003-07-15 Yuedong Du <yuedong.du@sun.com>
-
- * mail-config.c: (config_write_style), (mail_config_init): remove
- the use of caret mode widget style.
- * mail-display.c: (display_notify), (mail_display_new): use new
- gtkhtml api to set caret mode.
-
-2003-07-11 Antonio Xu <antonio.xu@sun.com>
-
- * folder-browser-ui.c: Change the EditPaste mask to IS_0MESSAGE so
- that it is always activatable. Fixes bug #46018.
-
-2003-07-04 Maxx Cao <maxx.cao@sun.com>
-
- ** For bug #41839
-
- * mail-display.c (do_attachment_header): Attachment buttons made
- accessable with keyboard (focusable). "Inline" button is disabled
- when attachment can't be viewed inline.
- (do_signature): Signature button made accessable with keyboard
- (focusable).
- (button_press): Function changed to an event callback (originally
- gtkbutton signal callback).
- (popup_menu_placement_callback): Function added to place popup
- menu (of attachment) beside button when activated by keyboard.
-
-2003-07-10 Yuedong Du <yuedong.du@sun.com>
-
- * evolution-mail.schemas: add a gconf key corresponding to newly
- introduced caret mode of gtkhtml widget.
-
- * folder-browser-ui.c: new verb handling, corresponding the new menu
- entry for the caret mode flag.
-
- * folder-browser.h: declaration of new verb handler to the menu entry
- that turn caret mode on/off. The function just set the new introduced
- gconf key.
-
- * folder-browser.c: ditto
-
- * mail-config.c: lstione to the new gconf key, and when caret mode
- flag is set/unset,change the style of gtkhtml widget. see bug
- #44607.
-
-2003-07-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-crypto.h: Removed camel-pgp-mime.h, it no longer exists.
-
- * mail-format.c: Remove camel-pgp-mime.h
-
-2003-07-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (mail_generate_reply): Use
- camel_strcase_hash/equal.
-
- * upgrade-mailer.c: Updated to use the camel-file-utils version of
- mkdir.
-
-2003-07-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-tools.c (mail_tool_forward_message): Strip the signature
- from the body text. Fixes bug #45523. While we're here, also fix
- the code to quote exactly the same way as the
- mail_tool_quote_message() function.
- (mail_tool_quote_message): The last arg should not be
- 'want_plain', because that arg is for whether or not the body
- should be quoted.
-
- * folder-browser.c (message_list_drag_data_get): Apply a
- From-filter when dragging as a test/uri-list and
- message/rfc822. Fixes bug #45617. Also free the uids ptrarray for
- the text/uri-list case.
-
-2003-07-01 Dan Winship <danw@ximian.com>
-
- * mail-display.c (pixbuf_for_mime_type): Gone
- (pixbuf_gen_idle): Use e_icon_for_mime_type instead.
-
-2003-06-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * message-list.c (filter_date): Use the newer utf8 versions of the
- e_strftime*() functions since our format strings are all now in
- UTF-8.
-
- * mail-display.c (mail_display_render): Use the newer
- e_utf8_strftime_fix_am_pm().
-
- * mail-callbacks.c (mail_generate_reply): Use e_utf8_strftime(),
- otherwise we can end up with invalid utf-8.
-
-2003-06-25 Radek Doulik <rodo@ximian.com>
-
- * mail-config.c (config_write_style): provide hardcoded default
- (red) spell error color
-
-2003-06-24 Jeffrey Stedfast <fejj@ximian.com>
-
- Might fix bug #45368 but I wouldn't bet on it.
-
- * message-browser.c (message_browser_new): Record the signal id
- for folder_loaded.
- (message_browser_folder_loaded): disconnect by id rather than
- searching for the handler. Save the id of the message_list_built
- signal handler.
- (message_browser_message_list_built): Disconnect the handler by
- id.
- (message_browser_destroy): Disconnect the signal handlers by id.
-
-2003-06-20 Not Zed <NotZed@Ximian.com>
-
- ** See bug #43887
-
- * mail-format.c (mail_get_message_body): handle text/enriched and
- text/richtext explictly, and dont treat them as text/plain.
-
-2003-06-23 Radek Doulik <rodo@ximian.com>
-
- * mail-config.c (config_write_style): add
- EvolutionMailPrintHTMLWidget style assignment
-
- * mail-callbacks.c (do_mail_print): set printing widget name
-
-2003-06-23 Dan Winship <danw@ximian.com>
-
- * message-list.c (on_selection_changed_cmd): Save the idle_id
-
-2003-06-23 Larry Ewing <lewing@ximian.com>
-
- * folder-browser.c (do_message_selected): make sure not to strcmp
- a possibly NULL string.
-
-2003-06-19 Not Zed <NotZed@Ximian.com>
-
- ** See bug #45063
-
- * folder-browser.c (do_message_selected): dont re-load if the same
- message gets selected again as one we've already shown. Etree
- sends out selection changed events even when when it hasn't.
-
-2003-06-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * message-list.c (hide_save_state): Only save state if we have a
- folder reference. Fixes some warnings about casting a NULL object
- to a CamelFolder.
-
-2003-06-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * message-list.c (ml_tree_value_at): Don't display an unread icon
- for a parent message status if it has unread children but has been
- read itself. Instead, show that we have unread children by just
- making the message test bold (which it was already doing, so
- yay... this was easy). Fixes bug #42630.
-
-2003-06-16 Not Zed <NotZed@Ximian.com>
-
- ** See bug #44609
-
- * mail-vfolder.c (vfolder_edit_rule): put the ok/cancel buttons in
- the stupid gnome 2 order.
-
- ** See bug #33593
-
- * message-list.c (on_selection_changed_cmd): also listedn to
- selection changed events, since the etable api has changed.
- (get_selected_cb): helper for above.
- (message_list_construct): hook to selection change signal.
-
- * mail-callbacks.c (composer_send_queued_cb): Unref the composer
- to match the ref composer_send_cb();
-
- ** See bug #44519
-
- * message-browser.c (message_browser_message_list_built): We want
- to disconnect from the messagelist, not folderbrowser signal.
-
-2003-06-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (format_mime_part): We only really want to use
- mail_identify_mime_part() if the content-type is
- application/octet-stream - any other type (if it doesn't have a
- handler) should just force the user to save to disk.
- (handle_text_plain): Only pay attention to format=flowed if the
- mime-type is text/plain (handle_text_plain is the generic text
- handler, so we might be processing parts that are not really
- text/plain, thus the format param may have different meaning for
- those other textual types).
-
-2003-06-11 Larry Ewing <lewing@ximian.com>
-
- * mail-format.c (mail_lookup_handler): free the application list
- if we are bailing.
-
- * mail-send-recv.c (free_folder_info): free the info structure as
- well.
-
-2003-06-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * message-tag-followup.c (get_week_start_day): Use mail-config's
- gconf client.
- (target_date_new): Same.
-
- * message-list.c (message_list_set_folder): Use mail-config's
- gconf client.
- (mail_regen_list): Same.
-
- * mail-tools.c (mail_tool_quote_message): Use mail-config's gconf
- client.
- (mail_tool_forward_message): Same.
-
- * mail-session.c (main_get_filter_driver): Use mail-config's gconf
- client.
-
- * mail-preferences.c (mail_preferences_init): Use mail-config's
- gconf client.
- (mail_preferences_finalise): Don't unref the gconf client.
-
- * mail-format.c (write_headers): Use mail-config's gconf client.
- (mail_format_data_wrapper_write_to_stream): Same.
- (handle_text_plain): And here.
-
- * mail-display.c (save_data_cb): Use mail-config's gconf client.
- (save_part): Same.
- (on_url_requested): Here too.
- (mail_text_write): And here.
- (mail_display_init): And here.
- (mail_display_destroy): Here too.
- (mail_display_new): Again here.
-
- * mail-composer-prefs.c (sig_add_cb): Use mail-config's gconf
- client.
- (mail_composer_prefs_construct): Same.
-
- * mail-callbacks.c (ask_confirm_for_unwanted_html_mail): Use
- mail-config's gconf client.
- (ask_confirm_for_empty_subject): Same.
- (ask_confirm_for_only_bcc): Here too.
- (composer_get_message): And here.
- (create_msg_composer): Again here.
- (mail_generate_reply): Same.
- (forward): And here.
- (transfer_msg_done): "
- (delete_msg): "
- (confirm_expunge): "
-
- * component-factory.c (owner_unset_cb): Use mail-config's gconf
- client.
-
- * folder-browser-ui.c (folder_browser_ui_add_message): Use the
- mailer's gconf client.
- (folder_browser_ui_add_list): Same.
- (folder_browser_ui_add_global): Here too.
-
- * folder-browser.c (save_cursor_pos): Use the mailer's gconf
- client.
- (folder_browser_set_message_preview): Same.
- (folder_browser_toggle_preview): Here too.
- (folder_browser_toggle_threads): And here.
- (folder_browser_toggle_hide_deleted): Here as well.
- (folder_browser_set_message_display_style): And here.
- (fb_resize_cb): Here.
- (paned_realised): And here.
- (done_message_selected): And everywhere...
-
- * mail-account-gui.c (sig_add_new_signature): Use the mailer gconf
- client.
-
- * mail-config.c (mail_config_get_gconf_client): New function to
- return the global GConfClient used by the mailer.
- (mail_config_write_on_exit): On exit, free our objects and such.
- (mail_config_signature_run_script): Use config->gconf.
-
-2003-06-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (invert_selection): Get rid of the if-focused
- code, that will always prevent the etree from getting the
- selection inverted because the menu item will always have focus at
- this time. Fix for bug #43972.
-
-2003-06-11 Not Zed <NotZed@Ximian.com>
-
- ** See bug #22542
-
- * component-factory.c (storage_create_folder): If we're creating a
- folder on a vstore, popup a vFolder editor rather than failing.
-
-2003-06-05 Not Zed <NotZed@Ximian.com>
-
- ** Part of #42691.
-
- * importers/Makefile.am (BUILT_SOURCES): added server_DATA.
-
- * Makefile.am (%.server.in): create a proper implicit rule for
- temporary .in file.
-
-2003-06-04 Not Zed <NotZed@Ximian.com>
-
- ** See bug #43974
-
- * mail-tools.c (mail_tool_do_movemail): use a proper CamelURL to
- decode the uri, not hacky strcmp stuff.
-
- * mail-account-gui.c (extract_values): if we have an conf_entry,
- ignore username, hostname, and path ones, as these are handled
- implicitly in the url itself. Came about because of the fix for
- #42838.
-
-2003-06-03 Federico Mena Quintero <federico@ximian.com>
-
- * mail-search.c (mail_search_construct): Put the buttons in HIG
- order; don't replace the label of the stock Find button. Also,
- add Escape as a keybinding for the Close button (see why GTK+ is
- on crack on b.g.o #74221 and #101293).
-
diff --git a/mail/ChangeLog.pre-1-4 b/mail/ChangeLog.pre-1-4
deleted file mode 100644
index 5933f09baa..0000000000
--- a/mail/ChangeLog.pre-1-4
+++ /dev/null
@@ -1,24750 +0,0 @@
-2003-06-02 Not Zed <NotZed@Ximian.com>
-
- ** This and jeffs patch for #43862.
-
- * mail-folder-cache.c (store_online_cb): If the store is still
- around, then flow on to a get folderinfo update, otherwise just
- clear up.
-
- * mail-ops.c (mail_store_set_offline): return the msgid of this so
- it can be cancelled.
-
-2003-05-30 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-folder-cache.c (mail_note_store): If the session is
- 'online' and we are noting a CamelDiscoStore, make sure that it is
- changed to online status and call mail_get_folderinfo().
-
-2003-05-30 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-local.c (load_metainfo): Stat the XML file before trying to
- parse it to make sure it exists.
-
-2003-05-29 Not Zed <NotZed@Ximian.com>
-
- * Makefile.am (BUILT_SOURCES): added server_DATA (*.server) so
- make clean works. For #42691.
-
-2003-05-30 Radek Doulik <rodo@ximian.com>
-
- * mail-config.c (config_write_style): use %02x instead of %2x when
- formatting color for rc file
-
-2003-05-29 Jeffrey Stedfast <fejj@ximian.com>
-
- Fixes bug #43805.
-
- * mail-session.c (session_system_beep): Proxy the gdk_beep() call
- to the main thread.
- (session_play_sound): Proxy the gnome_sound_play() call to the
- main thread.
-
-2003-05-27 Not Zed <NotZed@Ximian.com>
-
- * message-tag-editor.c (message_tag_editor_init): set the default
- open size to something reasonable. For #43410.
-
- * mail-signature-editor.c (d): turn off debugging.
-
- * mail-config.c (mail_config_signature_add): save new signature in
- signature list. For #43688.
-
-2003-05-21 Radek Doulik <rodo@ximian.com>
-
- * mail-signature-editor.c (menu_file_save_cb): set signature html
- flag even if it's newly signature, we don't set it in
- format_html_cb as sig could be "live" (when it's not new one)
-
-2003-05-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-importer.c: Updated copyright years.
-
- * mail-callbacks.c (ask_confirm_for_empty_subject): Fixed the
- logic a bit - if the gconf key *isn't* set, we want to return
- TRUE.
-
- * mail-search.c (mail_search_finalise): We need to weak_unref()
- the mail-display here. Fixes bug #43392.
-
-2003-05-21 Larry Ewing <lewing@ximian.com>
-
- * mail-config.glade: remove link hilighting option that isn't
- attached to anything.
-
-2003-05-20 Larry Ewing <lewing@ximian.com>
-
- * mail-display.c: filter notification events to keep the redisplay
- count down.
-
- * mail-composer-prefs.c: remove references to gtkhtml property
- manager. Connect to missing settings.
-
- * mail-preferences.c: remove references to gtkhtml property
- manager. Connect to missing settings.
-
- * mail-config.glade: remove keybinding setting.
-
- * mail-display.c (mail_display_destroy): remove notification.
- (display_notify): set animate and redisplay. We have to redisplay
- because the citation color may have changed.
-
- * evolution-mail.schemas: add composer and display gconf entries.
-
-2003-05-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-gui.c (mail_account_gui_save): Only re-add the
- store to the folder-tree if the account is enabled. Oops. Fixes
- bug #43214.
-
-2003-05-20 Larry Ewing <lewing@ximian.com>
-
- * mail-config-factory.c: remove references to font prefs.
-
- * component-factory.c: Remove stale refernces the the font prefs.
- (make_factory): remove unused variables.
-
- * mail-config.c (mail_config_init): add a notify callback to the
- spelling color.
- (config_write_style): rename and write out the spell color as
- well.
-
-2003-05-20 Not Zed <notzed@lostzed.mmc.com.au>
-
- ** See bug #43234
-
- * mail-display.c (mail_display_set_message): if we've been
- destroyed, noop.
-
-2003-05-16 Dan Winship <danw@ximian.com>
-
- * mail-ops.c (mail_empty_trash): New async "empty trash" op.
-
- * mail-callbacks.c (empty_trash): Use it rather than requiring
- that mail_tool_get_vtrash() work without blocking. #43091
-
-2003-05-16 Radek Doulik <rodo@ximian.com>
-
- * mail-callbacks.c (footer_info_new): gnome_font_get_descender
- returns negative value
-
-2003-05-17 Larry Ewing <lewing@ximian.com>
-
- * GNOME_Evolution_Mail.server.in.in: remove font prefs server from
- the list.
-
-2003-05-17 Jeremy Katz <katzj@redhat.com>
-
- * mail-offline-handler.c: Add #include to fix warning.
-
- * mail-mt.c (mail_msg_new): Use glib macros for pointer/int
- conversions.
- (mail_msg_free): Likewise.
- (mail_msg_cancel): Likewise.
- (mail_msg_wait): Likewise.
- (mail_msg_active): Likewise.
- * mail-session.c (main_register_timeout): Likewise.
- (register_timeout): Likewise.
- (main_remove_timeout): Likewise.
- (remove_timeout): Likewise.
- * message-list.c (ml_value_to_string): Likewise.
-
- * mail-identify.c: Add #include to fix warning.
-
- * mail-config.c (config_write_fonts): Don't pass extra arguments
- to g_warning.
-
- * mail-callbacks.c: Add #include to fix warning.
-
-2003-05-15 Not Zed <NotZed@Ximian.com>
-
- ** See bug #42838.
-
- * mail-account-gui.c (mail_account_gui_build_extra_conf): always
- add the extra entry to the hash table, most paths wouldn't.
-
-2003-05-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * component-factory.c: Disabled some debugging messages.
-
-2003-05-14 JP Rosevear <jpr@ximian.com>
-
- * mail-local.h: add proto
-
- * mail-local.c (storage_listener_startup): don't listen for
- destruction, because we have a ref and it'll never happen
- (mail_local_storage_shutdown): release and unref the local storage
-
- * mail-display.c (retrieve_shell_view_interface_from_control):
- return a new copy every time
- (set_status_message): release and unref the shell view
-
- * folder-browser.c (folder_browser_destroy): guard for multiple
- destroys
-
- * folder-browser-factory.c (control_activate): release and unref
- the shell view
- (control_destroy_cb): just remove the control from the list
- (folder_browser_factory_new_control): don't weak ref the folder
- browser
-
- * component-factory.c (owner_unset_cb): shutdown local storage
-
-2003-05-13 Ettore Perazzoli <ettore@ximian.com>
-
- * component-factory.c (segv_redirect): Removed.
- (make_factory): No need to set up the SIGSEGV redirect handler
- here, since it's already done in the shell now, and it's in-proc.
-
- * folder-browser-ui.c (folder_browser_ui_rm_all): Only do the
- bonobo_ui_component() stuff if the component does have a
- container.
-
-2003-05-08 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-session.c (mail_session_set_interactive): Set the
- password_dialog pointer to NULL. Prevents a crash that could
- happen if the shell would quit with the password dialog still up.
-
-2003-05-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-display.c (mail_display_render): Make sure that we haven't
- been destroyed before we start writing to the html engine. Fixes
- bug #42333.
-
-2003-05-07 Not Zed <NotZed@Ximian.com>
-
- ** See bug #42456
-
- * mail-composer-prefs.c (spell_language_button_press): set the
- enable/disable button to the right text when we toggle a column.
- Added a fixme about the weird code in the whole routine.
-
-2003-05-07 Jeremy Katz <katzj@redhat.com>
-
- * evolution-mail.schemas
- (/schemas/apps/evolution/mail/display/mime_types): Correct
- default for list.
-
-2003-05-06 Not Zed <NotZed@Ximian.com>
-
- ** See bug #42400
-
- * mail-tools.c (meta_data_key): protect against getting an
- unparsable uri.
-
-2003-05-05 Not Zed <NotZed@Ximian.com>
-
- ** See bug #42294.
-
- * mail-config.c (config_write_fonts): Also set the custom font
- style for *BonoboPlug*GtkHTML.
-
-2003-05-05 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-session.c (request_password): Set OK as the default
- response for the password_dialog.
-
-2003-04-30 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (mark_as_unseen): To be consistant with the
- message-list envelope toggle, undelete the message when we unmark
- the Seen flag here as well. Fixes bug #42118.
-
-2003-04-30 Jeffrey Stedfast <fejj@ximian.com>
-
- * message-list.c (ml_tree_value_at): Fixed to return the correct
- values (swapped) in order to fix bug #42120.
-
-2003-04-30 Jeffrey Stedfast <fejj@ximian.com>
-
- * message-list.c (regen_list_regened): Save the tree state before
- we tear down the tree and then load it back again. yay. Fixes bug
- #42170 and #40074.
-
-2003-04-30 Not Zed <NotZed@Ximian.com>
-
- ** See bug #41748
-
- * mail-send-recv.c (build_dialogue): make sure we dont add any
- SEND_SEND types to the receive table. When we add the SEND_SEND
- type, key it on a fixed string SEND_URI_KEY.
- (receive_done): if it is a SEND_SEND type, use SEND_URI_KEY to
- remove it from the active list.
- (mail_receive_uri): make sure we never add a SEND_SEND type to the
- receive list.
- (mail_send): key the send info on SEND_URI_KEY not transport url.
-
-2003-04-29 Jeremy Katz <katzj@redhat.com>
-
- * folder-browser-ui.c (fbui_sensitise_item): Don't just blindly
- cast an int to gpointer, use the proper glib magic instead.
-
-2003-04-29 Jeffrey Stedfast <fejj@ximian.com>
-
- * importers/netscape-importer.c
- (netscape_add_priority_workaround_filters): Updated for API change
- in the filter code.
-
-2003-04-29 Not Zed <NotZed@Ximian.com>
-
- ** See bug #41972
-
- * message-list.c (ml_tree_value_at): fix (void *) casts on trinary
- ops.
-
- * folder-browser.c (on_right_click): Store the label tag in the
- label callback data, not the translated name.
-
- * mail-config.c (label_defaults[]): Initialise with the tag
- values.
- (config_clear_labels): free tag field.
- (config_cache_labels): setup the tag field based on the position
- of the label name.
- (mail_config_get_label_color_by_name): Lookup colour by the
- untranslated TAG, not the translated/customisable tag.
-
- * mail-config.h (MailConfigLabel): Add a tag field, we were using
- the translated name as the label(!).
-
-2003-04-29 Dan Winship <danw@ximian.com>
-
- * mail-format.c (write_xmailer_header): Remove preceding whitespace
-
-2003-04-28 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-session.c (mail_session_forget_passwords): Forget all
- passwords again. [#41817]
-
-2003-04-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.glade: Made toplevel container widgets set a
- border-width (including toplevel widgets within frames), set the
- table/hbox/vbox spacings, set the spacing between an image and the
- description text in hboxes to 12pts (as suggested by the HIG),
- Changed Add/Delete buttons to the stock Add/Remove buttons, etc
-
-2003-04-24 Jeffrey Stedfast <fejj@ximian.com>
-
- Fix for bug #41789
-
- * mail-config.c (mail_config_init): Cache the allowable
- mime-types.
- (mail_config_get_allowable_mime_types): New public function to get
- an array of allowable mime-types.
-
- * mail-format.c (mail_lookup_handler): Only allow a
- bonobo-component handler if the mime-type is something handled by
- evolution or the user has specifically chosen that type as
- available for viewing with a bonobo component in the gconf
- database.
- (mime_type_uses_evolution_component): New convenience function.
- (mime_type_can_use_component): Checks gconf to see if the user has
- allowed the mime-type to be viewed by a component.
-
-2003-04-24 Radek Doulik <rodo@ximian.com>
-
- * mail-display.c (html_button_press_event): as below
- (update_active): as below
-
- * folder-browser.c (html_button_press_event): update for changed
- coordinates in gtk-2
-
-2003-04-23 Not Zed <NotZed@Ximian.com>
-
- * mail-send-recv.c (get_receive_type): pass an exception to
- get_provider, to silence some warnings/get a valid result.
-
-2003-04-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (composer_get_message): Only add the
- Organization: header if it is non-empty. Fixes bug #41730.
-
-2003-04-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-composer-prefs.c (spell_set_ui): Protect against a NULL
- strv result from parsing the language list string.
-
-2003-04-17 Jeffrey Stedfast <fejj@ximian.com>
-
- Fixes for bug #41142.
-
- * mail-search.c (dialog_response_cb): Handle a GTK_RESPONSE_CLOSE
- response.
- (mail_search_construct): Changed the Cancel button into a Close
- button.
-
-2003-04-18 Rodney Dawes <dobey@ximian.com>
-
- * Makefile.am:
- * folder-browser-ui.c:
- * mail-signature-editor.c:
- * message-browser.c:
- Use PREFIX instead of EVOLUTION_DATADIR for bonobo_ui_util_set_ui ().
- Fixes bug #21499.
-
-2003-04-17 Not Zed <NotZed@Ximian.com>
-
- * mail-signature-editor.c (menu_help): remove the help menu item
- handling, as the help menu is removed. Clean up of #38927.
-
-2003-04-16 Not Zed <NotZed@Ximian.com>
-
- * importers/Makefile.am (%.server.in): Remove COMPONENTDIR and set
- BINDIR and VERSION instead.
-
- * (importers/GNOME_Evolution_Mail_Pine_Intelligent_Importer.server.in.in,
- importers/GNOME_Evolution_Mail_Mbox_Importer.server.in.in,
- importers/GNOME_Evolution_Mail_Outlook_Importer.server.in.in,
- importers/GNOME_Evolution_Mail_Netscape_Intelligent_Importer.server.in.in,
- importers/GNOME_Evolution_Mail_Elm_Intelligent_Importer.server.in.in:) :
- Convert the type back to exe, and point to the main evolution
- executable. Fixes #41164.
-
-2003-04-16 Jeremy Katz <katzj@redhat.com>
-
- * evolution-mail.schemas: schema keys can't be directories (#41419)
-
-2003-04-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config-druid.c (config_wizard_set_page): Fixed a logic
- error that was the cause of bug #41389.
-
-2003-04-15 Not Zed <NotZed@Ximian.com>
-
- * For bug #41199.
-
- * subscribe-dialog.glade: New interface from Anna. Setup the
- wigdet names and add a progress bar, and set the default opening
- size to something reasonable.
-
- * subscribe-dialog.c (subscribe_dialog_construct): changes to
- match the glade file chagnes. remove the search stuff. hide the
- progress bar by default.
- (sc_activity_cb): show the progress bar when we're active, hide
- it when inactive. dont set any status.
- (struct _SubscribeDialogPrivate): Remove the appbar.
-
-2003-04-15 Hans Petter Jansson <hpj@ximian.com>
-
- * mail-mt.c (mail_msg_check_error): Free the temporary error text.
-
-2003-04-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-vfolder.c (vfolder_gui_add_rule): Set the correct border
- width and vbox spacing to be HIG compliant. Fixes bug #41209.
- (vfolder_edit_rule): Same here.
-
- * local-config.glade: Updated to comply with the HIG. Fixes bug
- #41244.
-
-2003-04-14 Not Zed <NotZed@Ximian.com>
-
- * mail-send-recv.c (build_dialogue): create a stock cancel button
- with a cancel all text.
- (build_dialogue): Create stock-like cancel buttons with no
- accelerators. A workaround for #41043.
-
- * message-list.c (ml_tree_value_at): if the node is the root node,
- do nothing. etable shouldn' really be searching the root node if
- it isn't visible ...? For #41190.
-
-2003-04-14 Larry Ewing <lewing@ximian.com>
-
- * evolution-mail.schemas: add proper defaults for the fonts
- settings.
-
-2003-04-11 Jeffrey Stedfast <fejj@ximian.com>
-
- Fixes bug #41243.
-
- * message-tag-followup.c (construct): Change the window border
- width and packing to comply with the HIG.
-
- * message-tags.glade: Updated to comply with the HIG.
-
-2003-04-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-session.c (request_password): Add padding around the
- entry/checkbox and change the border width of the dialog window to
- comply with the HIG. Fixes bug #41004.
-
-2003-04-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-search.c (mail_search_construct): Change the action button
- ordering and also change the padding to comply with the HIG. Fixes
- bug #41046 and at least part of bug #41142 (except for the
- s/Search/OK/ thing, which has not been agreed upon yet).
-
- * mail-send-recv.c (build_dialogue): Change the padding to comply
- with the GNOME HIG. Fixes bug #41001.
-
-2003-04-09 Not Zed <NotZed@Ximian.com>
-
- ** See bug #40921
-
- * subscribe-dialog.c (subscribe_dialog_finalise): add a finalise
- funciton which actually free's resources.
- (get_short_folderinfo_got): dont call activity callback implicitly
- here, do it from the callers callback.
- (subscribe_get_short_folderinfo): dont call activity callback
- here.
- (fe_got_children): check implicitly if we were cancelled. also
- add back the node sort, and also call the activity callback from
- here instead of breaking layers of abstraction as above.
- (folder_etree_cancel_all): new method, force a cancel of all ops,
- but dont free anything.
- (store_data_free): dont unref the widget anymore, not needed.
- call cancel all on the ftree if its still active.
- (sc_close_pressed): destroy the subscribe dialogue as well as the
- app, it doesn't seem to get destroyed otherwise.
- (sc_activity_cb): do nothing if we have been cancelled.
- (subscribe_dialog_destroy): trigger a cancel of all outstanding
- ops. only free most data in the finalise method.
- (subscribe_dialog_class_init): hook onto finalise.
- (store_data_get_widget): dont ref the widget.
-
- * mail-callbacks.c (manage_subscriptions): sink the dialog.
-
-2003-04-09 Larry Ewing <lewing@ximian.com>
-
- * mail-preferences.c (font_share_changed): set sensitivity of
- font pickers based on share setting.
- (mail_preferences_construct): initialize font prefs.
- (mail_preferences_apply): set the font prefs.
- (font_changed): add gnome-font-picker changed function.
-
- * mail-preferences.h: add font pref widgets.
-
- * mail-config.c (mail_config_init): add notify to on fonts dir.
- (config_write_fonts): write out a gtkrc that overrides the gtkhtml
- fonts settings based on the gconf keys.
-
- * mail-config.glade: move display font setttings to mail prefs.
-
- * evolution-mail.schemas: add font settings.
-
-2003-04-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (do_view_message): Add a check for a NULL uid
- here. Don't see how it can happen, but it seems to have for
- Aaron. Anyways, this should fix bug #40904.
-
-2003-04-08 Dan Winship <danw@ximian.com>
-
- * mail-config.glade: Remove color specs from the druid so it will
- use the theme colors
-
- * importers/GNOME_Evolution_Mail_Elm_Intelligent_Importer.server.in.in:
- * importers/GNOME_Evolution_Mail_Netscape_Intelligent_Importer.server.in.in:
- * importers/GNOME_Evolution_Mail_Pine_Intelligent_Importer.server.in.in:
- Fix bad XML noticed by Not Zed
-
-2003-04-08 Not Zed <NotZed@Ximian.com>
-
- * mail-vfolder.c (vfolder_gui_add_rule): swap button order. For
- #40900.
-
-2003-04-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * message-list.c (ml_tree_value_at): For string columns, never
- return NULL - always return "" if the value is empty. Fixes bug
- #40728.
-
- * mail-composer-prefs.c (sig_add_script_cb): Set the "script" data
- on the GtkEntry to NULL.
- (sig_add_script_response): If the "script" data on the GtkEntry
- object is non-NULL, then we are editing an existing signature, so
- just change the values in place and don't add it to the signature
- db.
- (sig_edit_cb): If sig->script is non-NULL, then we are editing a
- script signature, so pop up the script dialog instead. Fixes bug
- #38929.
-
-2003-04-07 Radek Doulik <rodo@ximian.com>
-
- * mail-composer-prefs.c (spell_load_values): use e_iconv_locale_language
-
-2003-04-07 Dan Winship <danw@ximian.com>
-
- * GNOME_Evolution_Mail.server.in.in: Clean up server names
-
- * importers/GNOME_Evolution_Mail_Elm_Intelligent_Importer.server.in.in:
- Likewise, and fix evolution-mail location
-
- * importers/GNOME_Evolution_Mail_Mbox_Importer.server.in.in:
- Likewise
-
- * importers/GNOME_Evolution_Mail_Netscape_Intelligent_Importer.server.in.in:
- Likewise
-
- * importers/GNOME_Evolution_Mail_Outlook_Importer.server.in.in:
- Likewise
-
- * importers/GNOME_Evolution_Mail_Pine_Intelligent_Importer.server.in.in:
- Likewise
-
- * importers/Makefile.am (%.server.in): Fix this for evolution-mail
- being a shlib.
-
-2003-04-03 Not Zed <NotZed@Ximian.com>
-
- ** Bug 40536
-
- * component-factory.c (send_receive_cb): run the warning dialogue
- asynchronously. Also, set the mail send/receive dialogue to
- transient for parent.
-
- * mail-send-recv.c (mail_send_receive): return the dialogue for
- send/receive.
-
-2003-04-02 Rodrigo Moya <rodrigo@ximian.com>
-
- * importers/evolution-mbox-importer.c (load_file_fn):
- * importers/evolution-outlook-importer.c (load_file_fn): added
- "folder_type" parameter to EvolutionImporterLoadFileFn.
-
- * importers/elm-importer.c (elm_import_file): pass empty string for
- "folder_type" argument to GNOME_Evolution_Importer_loadFile.
- * importers/pine-importer.c (pine_import_file): ditto.
- * importers/netscape-importer.c (netscape_import_file): ditto.
-
-2003-04-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-display.c (save_part): Don't allow the 'prefix' argument to
- make_safe_filename() be NULL. If we don't yet have a save_dir in
- gconf, use $HOME, etc. Fixes bug #40608.
-
-2003-04-02 Not Zed <NotZed@Ximian.com>
-
- * mail-session.c (mail_session_forget_passwords): Only clear the
- Mail passwords.
-
- * component-factory.c (interactive_cb): Call
- composer_check_autosave if we're going interactive, to check for
- unsaved files. Fixes #40300.
-
-2003-04-01 Not Zed <NotZed@Ximian.com>
-
- * mail-display.c (mail_display_redisplay): if we're called and the
- idle handler is set, remove it, so we dont go and redisplay it
- again. Fixes #40522.
-
-2003-03-31 Jeffrey Stedfast <fejj@ximian.com>
-
- * message-list.c (regen_list_regened): Save tree state and then
- after building the new tree, re-load the tree state. Finishes the
- fix for bug #40074.
-
- * mail-session.c: Properly init message_list. Fixed a type-o that
- initialized it to the password_list.
-
-2003-03-31 Not Zed <NotZed@Ximian.com>
-
- * mail-session.c (pass_response): need to check for config_service
- != NULL, not service != NULL before calling set_save_password.
- Fix for #40472.
-
-2003-03-28 Not Zed <NotZed@Ximian.com>
-
- * folder-browser-ui.c: include e-meta.h
-
- * folder-browser.c (on_right_click): remove unused var.
-
-2003-03-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * subscribe-dialog.c (fe_check_for_children): Declare a prototype
- for this function prior to fe_got_children() so that
- fe_got_children() can call us.
-
-2003-03-26 Dan Winship <danw@ximian.com>
-
- * mail-format.c (write_address): remove extra arg to
- camel_url_encode
-
-2003-03-27 Not Zed <NotZed@Ximian.com>
-
- * folder-browser.c (folder_browser_gui_init): dont set the paned
- initial size here, but hook onto the realize signal.
- (paned_realised): set the paned size once we're realised. Fixes
- #37084, its a bit of a hack, but it seems to work.
-
-2003-03-26 Jeffrey Stedfast <fejj@ximian.com>
-
- Fixes bug #40074.
-
- * folder-browser-factory.c (control_deactivate): Save message-list
- state.
-
- * message-list.c (message_list_save_state): Save the various
- states.
-
-2003-03-26 Jeffrey Stedfast <fejj@ximian.com>
-
- Fixes for bug #39870
-
- * message-browser.c (transfer_msg_done): Close the
- message-browser. Since the message doesn't exist anymore, we
- should close it.
- (message_browser_delete): New callback to handle deletion in the
- message-browser window.
-
-2003-03-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * subscribe-dialog.c (fe_got_children): If the CamelFolderInfo
- node doesn't have \NoInferriors set, then check for
- subfolders. Fixes bug #40314.
-
-2003-03-26 Not Zed <NotZed@Ximian.com>
-
- * mail-display.c (popup_window_destroy_cb): Undo jeff's patch
- below for #40275, the destroy timeout is already removed in
- popup_info_free. Unref the widget 'w' when we're done with it.
- (popup_info_free): Move everything in here to popup_window_destroy
- and remove, since nothing else uses it.
- (make_popup_window): Ref the widget so it doesn't go away before
- we're finished with it. Really fixes bug #40275/40188.
-
-2003-03-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-display.c (popup_window_destroy_cb): Remove the
- timeout. Should fix bug #40275.
-
- * subscribe-dialog.c: Remove search entry which never worked right
- (and can't work as users expect anyway, since we don't do
- namespace stripping). Fixes bug #40083.
- (ftree_node_new): Ignore \NoSelect as far as marking it
- "subscribable". Fixes bug #40124.
-
-2003-03-25 Dan Winship <danw@ximian.com>
-
- * mail-account-editor.c: Update for e_notice move
- (apply_changes): Pass a parent_window to e_notice
-
- * mail-account-gui.c: Update for e_notice move.
- (mail_account_gui_save): Pass a parent_window to e_notice
-
- * mail-callbacks.c: Update for e_notice move
- * mail-local.c: Likewise
- * mail-signature-editor.c: Likewise
- * mail-vfolder.c: Likewise
-
- * component-factory.c (interactive_cb): Update prototype
-
-2003-03-25 Not Zed <NotZed@Ximian.com>
-
- * mail-tools.c (meta_data_key): strdup the key before freeing the
- url as it is probably pointing there.
-
-2003-03-25 Not Zed <NotZed@Ximian.com>
-
- * component-factory.c (got_folder): remove a debug printf that
- made it in a commit.
-
- * folder-browser-ui.c (folder_browser_ui_add_global): Load
- per-folder setting of show_preview from meta data.
- (folder_browser_ui_add_list): Same, for thread_list.
-
- * mail-tools.c (mail_tool_get_meta_data)
- (mail_tool_delete_meta_data): helpers to lookup/delete meta data.
-
- * mail-config.c (mail_config_uri_deleted): delete the meta-data
- for the folder.
-
- * folder-browser.c (folder_browser_reload): dont reload the uri if
- we're in the process of loading it still.
- (folder_browser_new): load the folder meta data before loading the
- folder.
- (folder_browser_toggle_preview):
- (folder_browser_toggle_threads): save change to meta-data.
- (got_folder): Load the metadata if we have a folder to set, and
- the meta-data has changed from initislisation.
-
-2003-03-23 Chris Toshok <toshok@ximian.com>
-
- * mail-callbacks.c (ask_confirm_for_unwanted_html_mail): pass
- FALSE for e_destination_get_textrep's include_email arg.
-
-2003-03-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (mail_format_data_wrapper_write_to_stream):
- Default to the charset provied in the MimePart's Content-Type over
- that of the user's mailer charset. Fixes bug #39204.
-
-2003-03-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-composer-prefs.c (spell_load_values): "en_us" should not be
- translated. Fixes bug #40088.
-
-2003-03-21 Larry Ewing <lewing@ximian.com>
-
- * mail-display.c (pixbuf_gen_idle): remember to disconnect the
- destroy handler if whenever the loader is shut down.
-
-2003-03-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * component-factory.c (owner_set_cb): Change the message_destroy
- callback to just gtk_widget_destroy. No need to have a callback
- simply to call this function.
- (warning_response): Removed (see above).
-
- * mail-composer-prefs.c (sig_add_script_response): Don't forget to
- add the signature to the signature list if it is a valid script.
-
- * mail-config.c (mail_config_signature_unregister_client): Make
- sure we can find the registered handler before trying to remove it
- from the list.
-
- * mail-session.c (do_user_message): Make the 5th argument to
- gtk_message_dialog_new() "%s" and move the m->prompt to arg 6 so
- that we are safe if the prompt string contains any %'s. Also
- connect to the response signal for the user_msg dialog and set the
- callback to gtk_widget_destroy so that the user can actually close
- the dialog. We also need to g_object_weak_ref() the dialog so that
- we can set the global message_dialog pointer back to NULL when it
- gets destroyed. Fixes bug #40043.
-
-2003-03-20 Dan Winship <danw@ximian.com>
-
- * mail-ops.c (build_from): Remove this since there's a function in
- CamelMimeMessage to do it now.
- (save_messages_save): Use camel_mime_message_build_mbox_from.
-
-2003-03-21 Not Zed <NotZed@Ximian.com>
-
- ** for mail part of bug #38461.
-
- * importers/evolution-outlook-importer.c (load_file_fn): dont pass
- in create flag to uri_to_folder, the folder must already exist.
-
- * importers/evolution-mbox-importer.c (folder_created_cb):
- Removed, we now force the caller to create the destination folder
- first.
- (load_file_fn): Dont try and create a folder if it doesn't exist.
- Also, use the uri directly as the destination uri, so we can
- import into any folder.
- (process_item_fn): If we dont have a folder, thats just an error,
- return BAD_FILE.
-
- * importers/netscape-importer.c (netscape_import_file): As below
- for elm_import_file.
- (import_next): similarly as for pine import_next.
- (importer_cb): just record result.
- (importer_timeout_fn): removed.
-
- * importers/pine-importer.c (import_next): Similar to below for
- the elm import_next.
- (pine_import_file): As below for elm_import_file.
- (importer_timeout_fn): removed.
- (importer_cb): just record the result, and exit.
- (import_next): change around to behave more like the elm importer,
- cleaning up when we're done.
-
- * importers/elm-importer.c (elm_import_file): Create the
- destination folder ourselves, dont pass it onto the mbox importer.
- Simplify logic, just do the import within a while loop, polling
- the g main loop as necessary, remove need for idle callbacks and
- other crap.
- (import_next): If elm_import_file fails, then just go straight to
- the next folder, stops it falling in a heap.
- (import_item_idle): removed.
- (importer_cb): just record result/exit.
-
- * mail-importer.c (mail_importer_create_folder): removed.
- (mail_importer_make_local_folder): new function to create a
- local-only folder from a path. It runs synchronously by using a
- recursive main loop.
- (folder_created_cb): callback for make_local_folder.
-
-2003-03-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config-druid.c (mail_config_druid_new): Revert ettore's
- broken patch.
-
- * mail-search-dialogue.c: Removed - nothing uses this.
-
-2003-03-19 Ettore Perazzoli <ettore@ximian.com>
-
- * importers/GNOME_Evolution_Mail_Mbox_Importer.server.in.in:
- Replace "evolution:menu-name" prop with "evolution:menu_name".
- [#39692]
- * importers/GNOME_Evolution_Mail_Outlook_Importer.server.in.in:
- Likewise.
-
-2003-03-19 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-config-druid.c (mail_config_druid_new): Give the druid the
- DIALOG hint. [#39741 and friends.]
-
-2003-03-19 Radek Doulik <rodo@ximian.com>
-
- * mail-composer-prefs.c (spell_load_values): changed default
- language to en_us instead of en
- (spell_language_button_press): new handler, ported from 1.2
- (spell_setup): use spell_language_enable and
- spell_language_button_press
-
-2003-03-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (composer_get_message):
- e_msg_composer_get_subject() now returns a const char *, so update
- appropriately.
-
-2003-03-18 Larry Ewing <lewing@ximian.com>
-
- * mail-callbacks.c (do_mail_print): fix leak, cleanup variable
- name, and call gtk_window_set_transient_for with a parent that is
- actually a GtkWindow.
- (mark_as_unseen): use g_source_remove.
-
-2003-03-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config-druid.c (mail_config_druid_new): Set the type hint
- to DIALOG so that Metacity shows this window on top. Fixes bug
- #39914.
-
-2003-03-18 Not Zed <NotZed@Ximian.com>
-
- * mail-vfolder.c (new_rule_clicked): validate rule & rule is
- unique. Workaround for #39464. Should this just use
- rule_context_add_rule_gui??
-
- * mail-search.c (mail_search_destroy): unhook from the html engine
- signals here, before we redisplay the message. Also make sure
- this processing only happens once. For #39759.
- (mail_search_finalise): dont unhook from signals here.
-
-2003-03-12 Not Zed <NotZed@Ximian.com>
-
- * mail-callbacks.c (expunge_folder): use a hack to find out if the
- message-list was focussed before we desensitise it.
- (expunged_folder): If the message-list was focussed before,
- re-grab the focus. For bug #29564.
-
-2003-03-17 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-signature-editor.c (mail_signature_editor): Give the editor
- the GDK_WINDOW_TYPE_HINT_DIALOG hint. [#38926]
-
-2003-03-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-display.c (pixbuf_gen_idle): If we fail to load the pixbuf,
- don't use it (stops some g_warnings).
-
- Part of a fix for bug #39809
-
- * mail-vfolder.c (vfolder_edit): Don't add the cancel button here.
-
- * mail-callbacks.c (filter_edit): Don't add the cancel button here.
-
-2003-03-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-display.c (do_external_viewer): Lookup the handler for the
- type. If we don't have a registered handler or if the registered
- handler is not meant to be handled via a bonobo component, don't
- use a bonobo component.
-
- * mail-format.c (mail_lookup_handler): If we register a new
- handler that is to be handled by a bonobo component, set
- handler->is_bonobo to TRUE.
-
-2003-03-14 Dan Winship <danw@ximian.com>
-
- * component-factory.c (storage_connect, storage_connected): Update
- for EvolutionStorage change
-
-2003-03-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-signature-editor.c (menu_file_save_cb): Rewritten to do the
- same as the composer's build_message() code.
-
-2003-03-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-accounts.c (account_add_clicked): Use
- gtk_window_set_transient_for() on the druid with the settings
- dialog as the parent window.
-
-2003-03-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-signature-editor.c (do_exit): Remove the yes/no
- buttons. Fixes bug #39382.
-
- * mail-accounts.c (account_able_toggled): New callback function to
- handle the checkbox getting toggled.
- (mail_accounts_treeview_new): Save the toggle renderer so we can
- later connect to it's toggled signal.
- (mail_accounts_tab_construct): Connect to the toggle-cell's
- toggled signal. Fixes bug #39325.
-
-2003-03-11 Not Zed <NotZed@Ximian.com>
-
- * mail-vfolder.c (vfolder_editor_response): Fix the response code,
- because some bastard changed the filter/* code and didn't fix the
- callers. Partial fix for #39165.
-
-2003-03-10 Not Zed <NotZed@Ximian.com>
-
- * Makefile.am (libevolution_mail_la_SOURCES): removed main.c from
- the build.
-
- * component-factory.c (component_factory_init): Remove, not used
- anymore, causes linking problems some places.
- (factory): Removed the debug printf. Added a case for the
- composer. Part of fixing #39256.
-
-2003-03-07 Jeffrey Stedfast <fejj@ximian.com>
-
- All this snot just to fix bug #38925 and an attempt to fix bug
- #38926 (but it seems no matter what I do, I can't work around the
- bonoboness/modality/whatever of the shell's preferences dialog).
-
- * mail-account-gui.c (sig_add_new_signature): Get the toplevel
- parent GtkWindow and pass that along to
- mail_composer_prefs_new_signature() so that window layering can be
- done correctly.
-
- * mail-composer-prefs.c (mail_composer_prefs_new_signature):
- Simplify. We don't want to add the signature to the list until
- after they have saved.
- (sig_edit_cb): Pass FALSE as the is_new argument to
- mail_signature_editor().
- (sig_event_client): Listen for signatures being added.
- (mail_composer_prefs_new_signature): Now takes a GtkWindow arg as
- the first arg rather than a MailComposerPrefs arg since we don't
- really need it to be a MailComposerPrefs object. We'd rather use
- the first arg as the parent GtkWindow so that we can set
- transience for the editor window.
-
- * mail-signature-editor.c (mail_signature_editor): Now takes a
- 'parent' argument (so we can set transient_for()) and a 'is_new'
- argument specifying whether the editor is editing a new signature
- or not. If it is, when the user saves, it will be added to the
- signature list. otherwise it won't.
- (sig_name_changed): Only use the mail_config_signature_set_name()
- interface if it is *not* a new signature.
- (menu_file_save_cb): If is_new, then save the signature to the
- config - otherwise do what we did before and set the modifications
- to it and emit the CHANGED event.
-
- * mail-config.c (mail_config_signature_new): Renamed from
- mail_config_signature_add(). We no longer immediately add the
- signature to the list of saved signatures.
- (mail_config_signature_add): New function which adds the signature
- and emits the SIG_ADDED event.
-
-2003-03-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-display.c (on_url_requested): If the part url is a text
- part, use mail_format_data_wrapper_write_to_stream(). This should
- fix bug #39204.
-
- * mail-format.c (mail_format_data_wrapper_write_to_stream): Make public.
-
-2003-03-06 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-accounts.c (mail_accounts_treeview_new): Set the
- shadow_type of the scrlled window to GTK_SHADOW_IN.
-
-2003-03-06 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-config.glade: Add some spacing to the buttons. [#38227]
-
-2003-03-06 Ettore Perazzoli <ettore@ximian.com>
-
- * importers/evolution-mbox-importer.c (IN): Use G_GNUC_FUNCTION
- instead of __FUNCTION__.
- (OUT): Likewise.
- * importers/netscape-importer.c (netscape_import_file): Likewise.
- * mail-send-recv.c (receive_done): Likewise.
- * mail-summary.c (SUMMARY_OUT): Likewise.
- (SUMMARY_IN): Likewise.
- (folder_changed_cb): Likewise.
- (message_changed_cb): Likewise.
-
-2003-03-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser-factory.c: #include <string.h>
-
- * e-searching-tokenizer.c (camel_utf8_getc): Don't use __inline__
- as not all platforms/compilers support this keyword.
- (g): Same.
-
-2003-03-06 Not Zed <NotZed@Ximian.com>
-
- * component-factory.c (owner_unset_cb): remove debug printf.
-
-2003-03-05 Not Zed <NotZed@Ximian.com>
-
- * component-factory.c (idle_quit): Removed old quit code.
- (owner_unset_cb): Make this call synchronous. Wont cover all
- cases but should be ok most of the time.
-
-2003-03-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-search.c: Prototype some functions to shut the compiler up.
-
- * mail-callbacks.c (composer_get_message): Go back to using
- e_destination_get_address() but use the camel-address parser on
- the strings to make sure they are non-empty. Fixes bug #37854.
-
-2003-03-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-signature-editor.c (menu_file_save_cb): Use 'filename' when
- creating the uri rather than using the uninitialised 'uri'
- variable to create itself. Fixes bug #38864.
-
-2003-03-03 Not Zed <NotZed@Ximian.com>
-
- * mail-session.c (do_user_message): Do the same as below for
- request_password, so we dont leave a mainloop lying around.
-
-2003-03-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-session.c (request_password): Don't connect to the response
- signal if we are in the main thread - instead just use the return
- value from gtk_dialog_run and then call pass_response() with the
- response value.
-
-2003-03-03 Not Zed <NotZed@Ximian.com>
-
- * subscribe-dialog.c (fe_got_children): Remove the
- e_tree_memory_sort_node, currently it crashes inside gal, the root
- node seems to get free'd under it.
-
-2003-02-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-preferences.c: Reverted back to using e-iconv
-
- * mail-composer-preferences.c: Same.
-
-2003-02-26 Dan Winship <danw@ximian.com>
-
- * GNOME_Evolution_Mail.server.in.in: add a repo_id and a priority
- level to the startup wizard
-
-2003-02-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c: Reverted back to using e-iconv instead of
- camel-iconv.
-
-2003-02-25 Dan Winship <danw@ximian.com>
-
- * mail-config-druid.c: Update for new EvolutionWizard interfaces.
-
-2003-02-25 Dan Winship <danw@ximian.com>
-
- * mail-config-druid.c: Redo this to not use the CORBA interfaces
- in the local case (in preparation for redoing the CORBA
- interfaces).
- (mail_config_druid_new): Remove unused "shell" arg
-
- * mail-account-gui.c (mail_account_gui_transport_complete): Don't
- crash if there's no transport selected at all.
- (mail_account_gui_new): Don't try to set cc_addrs/bcc_addrs if
- they're NULL.
-
- * mail-accounts.c (account_add_clicked): Don't need to pass shell
- to mail_config_druid_new.
-
- * mail-callbacks.c (configure_mail): Don't need to pass shell to
- mail_config_druid_new.
-
-2003-02-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-session.c (request_password): Make sure m->config_service
- is non-NULL before using m->config_service->save_passwd since PGP
- stuff will not have a config_service. Fixes bug #38149.
-
- * mail-account-gui.c (mail_account_gui_save):
- s/e_account_list_changed/e_account_list_change - otherwise we get
- an undefined symbol and we crash :-)
-
- * mail-composer-prefs.c (mail_composer_prefs_new_signature): Don't
- always append "[script]" to the signature name. Also cleaned up
- some memory leakage.
-
-2003-02-20 Not Zed <NotZed@Ximian.com>
-
- * mail-preferences.c (mail_preferences_apply): fix the g_snprintf
- stuff.
-
- * mail-config.c (mail_config_add_account): Use new
- e_account_list_add.
- (mail_config_remove_account): Use new e_account_list_remove.
- (mail_config_set_default_account): Similarly for
- e_account_list_set_default.
- (mail_config_get_default_account): Same for
- e_account_list_get_default.
- (mail_config_get_account_by_name): Use e_account_list_find.
-
- * mail-account-gui.c (mail_account_gui_save): use new
- e_account_list_changed call instead of manual signalling.
-
-2003-02-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-local.c: Set the local provider description field to a
- string rather than NULL to prevent a segfault on solaris. Fixes
- bug #38418.
-
-2003-02-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (write_text_header): bitwise-or in
- CAMEL_MIME_FILTER_TOHTML_CONVERT_SPACES to fix bug #38499.
-
- * mail-search.c (mail_search_destroy): New overloaded virtual
- method, does what dialog_destroy_cb was trying to do.
- (mail_search_construct): Connect to the "response" signal rather
- than "clicked" to correspond to the GtkDialog API
- (instead og the old GnomeDialog API).
- (dialog_response_cb): Changed the function name and made it check
- button == GTK_RESPONSE_ACCEPT to search, any other button
- closes. Fixes bug #37947.
-
-2003-02-21 Hans Petter Jansson <hpj@ximian.com>
-
- * component-factory.c (factory): Don't try to get a FontPrefs control.
-
- * mail-config-factory.c (mail_config_control_factory_cb): Just return
- NULL if a FontPrefs control was requested.
-
- * mail-config.c (mail_config_get_default_account): If no accounts
- are defined, don't try to set the default account.
-
-2003-02-21 Dan Winship <danw@ximian.com>
-
- * Makefile.am (libevolution_mail_la_LIBADD): Remove libebook's
- dependencies.
-
- * importers/Makefile.am (libevolution_pine_importer_la_LIBADD):
- Likewise.
-
-2003-02-21 Dan Winship <danw@ximian.com>
-
- * mail-account-gui.c (mail_account_gui_build_extra_conf): Use
- tables instead of vboxes, so that groups of label/entry pairs (as
- in Connector's config page) can line up nicely.
-
- * mail-config.glade: Turn extra_vbox and extra_mailcheck_vbox into
- tables.
-
- * mail-config-druid.c (get_fn): s/extra_vbox/extra_table/
-
- * Makefile.am (libevolution_mail_la_LIBADD):
- s/libcomposer.a/libcomposer.la/
-
-2003-02-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (mark_all_as_seen): Use
- camel_folder_free_uids().
-
- * mail-format.c (write_headers): Use
- camel_charset_canonical_name() here instead of
- e_iconv_charset_name().
-
- * mail-preferences.c (mail_preferences_construct): Same as below.
- (mail_preferences_apply): Again here.
-
- * mail-composer-prefs.c (mail_composer_prefs_construct): Use
- camel_charset_locale_name() here instead of
- e_iconv_locale_charset().
- (mail_composer_prefs_apply): Same.
-
-2003-02-20 Dan Winship <danw@ximian.com>
-
- * Makefile.am (libevolution_mail_la_LIBADD):
- s/libemiscwidgets.a/libemiscwidgets.la/ and likewise for
- libefilterbar
-
-2003-02-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (mark_all_as_seen): Fixed a memory leak - make
- sure to free all uids.
-
- * mail-config.c (uri_to_key): Removed.
- (lookup_signature): Removed.
- (xml_get_int): Removed.
- (xml_get_bool): Removed.
- (mail_config_get_time_24hour): Removed.
-
- * evolution-mail.schemas: s/long/int/g and change default_account
- to be a string instead of an int.
-
- * mail-config.c (mail_config_get_default_account): default_account
- now uses the account uid, so change the code a bit to match uid
- strings rather than use an index.
- (mail_config_remove_account): Same here. simplifies the code a
- bunch.
- (mail_config_set_default_account): Here too.
-
- * folder-browser-ui.c (folder_browser_ui_setup_view_menus): Update
- the GalView path.
-
-2003-02-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-session.c (do_get_pass): Change the logic here
- slightly. Instead of only reprompting the user if the cache is
- empty, also reprompt the user if the backend is forcing a
- reprompt.
- (request_password): If we have a cached passwd string for the
- account, fill-in the GtkEntry box with that value by
- default. This, together with the camel changes, fixes the
- "Evolution forgets my POP passwd if it gets a -ERR response during
- the login phase" bug.
-
-2003-02-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-searching-tokenizer.c: #include <stdio.h>
-
- * mail-config-factory.c: #include <string.h>
-
- * mail-config-druid.c (identity_prepare): Use
- gtk_editable_select_region() since gtk_entry_select_region() has
- been deprecated.
- (construct): Use gtk_window_set_resizable() instead of
- gtk_window_set_policy().
- (wizard_free): account_destroy() is no longer around, use
- g_object_unref() instead. (how did this even compile before?)
-
- * mail-account-gui.c (mail_account_gui_build_extra_conf): Use
- gtk_label_set_text_with_mnemonic() instead of
- gtk_label_parse_uline() as the latter has been deprecated.
-
-2003-02-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * importers/netscape-importer.c: Removed unused variables.
-
- * importers/pine-importer.c: Removed unused variables.
- (parse_address): Removed - it's unused and we have CamelAddress
- available to us anyway.
-
- * importers/elm-importer.c: Removed unused variables.
-
- * importers/evolution-mbox-importer.c (load_file_fn): Removed an
- unused variable.
-
-2003-02-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-editor.c (construct): Use
- gtk_window_set_resizable() instead of gtk_window_set_policy().
-
- * mail-config.c: Fix a bunch of warnings.
- (mail_config_signature_write): Removed.
-
- * mail-callbacks.c: Removed unused variables.
-
- * mail-accounts.c (mail_accounts_tab_class_init): Register a
- destroy virtual method.
- (mail_accounts_tab_destroy): Set mail_display->destroyed = TRUE.
-
- * message-list.c (message_list_destroy): Set
- mail_display->destroyed = TRUE. This is a workaround for the
- GTK_OBJECT_DESTROYED() macro that we used to use before.
-
- * mail-display.c (mail_display_destroy): Set
- mail_display->destroyed = TRUE. This is a workaround for the
- GTK_OBJECT_DESTROYED() macro that we used to use before.
-
-2003-02-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * message-list.c (build_tree): Use g_signal_emit() rather than
- gtk_signal_emit().
- (build_flat): Same here.
-
- * mail-signature-editor.c: #include <string.h>
-
- * mail-vfolder.c: #include <string.h>
-
- * mail-session.c: #include <string.h>
-
- * mail-search.c: #include <string.h>
-
- * mail-mt.c: #include <string.h>
-
- * mail-ops.c (save_part_save): Use strcasecmp() instead of
- g_strcasecmp().
-
- * mail-local.c: #include <string.h>
- (reconfigure_folder_reconfigured): Use a GtkDialog instead of
- gnome_error_dialog().
-
- * mail-format.c (find_preferred_alternative): Use g_ascii_strdown
- since g_strdown is deprecated.
- (fake_mime_part_from_data): Removed, no longer used it seems.
- (destroy_part): Also removed.
-
- * mail-display.c (make_popup_window): Replace call to
- gtk_window_set_polociy() with gtk_window_set_resizable() instead.
- (popup_size_allocate_cb): Use gtk_window_set_position() with
- GTK_WIN_POS_MOUSE instead of calculating the position to put it
- in.
-
-2003-02-10 Ettore Perazzoli <ettore@ximian.com>
-
- * importers/Makefile.am: Split the ORBit IDL compilation rules to
- work properly with parallel makes.
- (BUILT_SOURCES): Add this.
- (CLEANFILES): Add this.
-
- * Makefile.am: Split the ORBit IDL compilation rules to work
- properly with parallel makes.
- (BUILT_SOURCES): Add $(IDL_GENERATED) here.
- (CLEANFILES): Remove from here.
-
-2003-02-10 Rodney Dawes <dobey@ximian.com>
-
- * importers/Makefile.am: Add LDFLAGS to ported libs
-
-2003-02-10 Larry Ewing <lewing@ximian.com>
-
- * mail-display.c (save_url): look in the http cache for images
- when saving
- (image_save_as): remove random warning.
- (do_external_viewer): remove unused variable.
- (do_attachment_header): use g_ascii_strdown
-
-2003-02-07 Larry Ewing <lewing@ximian.com>
-
- * mail-display.c (save_data_cb): don't use random memory as a
- gconf client.
-
-2003-02-06 Chris Toshok <toshok@ximian.com>
-
- * importers/pine-importer.c (import_addressbook): track change to
- e_book_load_uri type.
-
-2003-02-06 Ettore Perazzoli <ettore@ximian.com>
-
- * folder-browser.c (on_right_click): Use
- e_auto_kill_popup_menu_on_selection_done() instead of
- e_auto_kill_popup_menu_on_hide().
-
-2003-02-06 Dan Winship <danw@ximian.com>
-
- * Makefile.am (INCLUDES): add EVOLUTION_PRIVDATADIR. Fix
- EVOLUTION_ICONSDIR
-
- * component-factory.c (owner_set_cb): Use EVOLUTION_PRIVDATADIR
- * mail-autofilter.c (filter_gui_add_from_message): Likewise
- (mail_filter_rename_uri): Likewise
- (mail_filter_delete_uri): Likewise
- * mail-callbacks.c (filter_edit): Likewise.
- * mail-search-dialogue.c (mail_search_dialogue_construct):
- Likewise
- * mail-session.c (main_get_filter_driver): Likewise
- * mail-summary.c (generate_folder_summaries): Likewise
- * mail-vfolder.c (vfolder_load_storage): Likewise
-
-2003-02-06 Dan Winship <danw@ximian.com>
-
- * Makefile.am: Remove *dir defs that are in configure.in now
- (INCLUDES): clean up using new *dir variables
- (libevolution_mail_la_LDFLAGS): remove -export-dynamic, add
- -module
-
- * main.c (main): s/PACKAGE/GETTEXT_PACKAGE/ in gettext init
-
- * importers/Makefile.am (INCLUDES): change EVOLUTION_DATADIR to
- EVOLUTION_PRIVDATADIR
-
- * importers/netscape-importer.c (netscape_import_filters): use
- EVOLUTION_PRIVDATADIR
-
-2003-02-06 Larry Ewing <lewing@ximian.com>
-
- * mail-session.c (pass_activate): add an activate handler to the
- entry so that hitting return will return an OK response.
-
-2003-02-05 Dan Winship <danw@ximian.com>
-
- * main.c (main): s/glade_gnome_init/glade_init/
-
-2003-02-05 Not Zed <NotZed@Ximian.com>
-
- * importers/netscape-importer.c: update from ../../importers/.
- (main): Removed.
- (mail_importer_module_init): Setup module init fn.
- (factory_fn): api changes.
- (is_dir_empty): deprecated changes, and clean up logic.
- (importer_cb): pulse progress bar, use idle function for
- processing next item.
- (import_next): Remove link before recursing, also fix memleak, and
- api changes.
- (netscape_import_file): dont release importer.
- (*): gconf'ify
-
- * importers/elm-importer.c (elm_factory_fn): Track the
- evolution_intelligent_importer, so we can unref it when done.
- (*): gconf'ify.
-
- * importers/pine-importer.c (parse_line): use gobject stuff rather
- than gtkobject.
- (import_addressfile): close down 'properly' when finished.
- (importer_timeout_fn): Do most processing decisions here, either
- from a timeout or idle function. This prevents us getting 1 stack
- frame per message and per folder. Close down properly also.
- (importer_cb): Add a timeout, ignore the callback, or add an idle
- function to process the next item.
- (pine_import_file): dont release the importer if we can't load it,
- its released elsewhere, i think.
- (import_addressfile): step the progress bar as we go.
- (factory_fn): Track the evolution_intelligent_importer, so we can
- unref when done.
- (*): gconf'ify
-
-2003-01-31 Not Zed <NotZed@Ximian.com>
-
- * importers/elm-importer.c (elm_can_import): g_file_exists ->
- lstat, and g_build_filename api changes.
-
- * importers/pine-importer.c: moved from
- ../../importers/pine-importer.c
- (factory_fn): oaf->bonobo_activation
- (mail_importer_module_init): setup factory.
- (main): Removed.
- (*): REemove bonobo config stuff.
- (factory_fn): destroy signal -> weak ref.
- (pine_destroy_cb): Fix signature for weak ref notify.
- (import_addressfile): use new glib filename stuff.
- (import_addressbook): same.
- (pine_can_import): and here.
- (import_next): and here.
- (scan_dir): and here
- (pine_create_structure): And here.
- (pine_can_import): g_file_exists -> lstat.
- (importer_cb): If there are more items, use an idle handler to
- drop back a few stack frames rather than recursing for each
- message.
- (import_next): unlink data from dir_list before recursing, and fix
- leak.
-
-2003-01-30 Not Zed <NotZed@Ximian.com>
-
- * importers/elm-importer.c (elm_destroy_cb): Change for weak ref
- setup.
- (elm_factory_fn): destroy -> weak ref.
-
-2003-01-29 Not Zed <NotZed@Ximian.com>
-
- * importers/elm-importer.c (importer_cb): Pass processItem off to
- an idle handler, so we dont blow our stacks. Also update to use
- progress_bar_pulse().
- (import_item_idle): Get the next message here instead.
- (import_next): Fix a glist leak. Unlink the file before we import
- it too. And close the dialogue and clean up when we've run out of
- folders to import.
-
-2003-01-17 Not Zed <NotZed@Ximian.com>
-
- * importers/elm-importer.c (elm_create_structure): use/free elmdir
- rather than double-free maildir.
-
-2003-01-16 Not Zed <NotZed@Ximian.com>
-
- * importers/elm-importer.c: update from ../importers/elm-importer.c
-
-2003-02-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * message-list.c (mail_regen_list): Get the thread_subject setting
- here instead of in regen_list_regen since that function will be
- called in another thread and we can't make corba calls in anything
- but the main thread.
- (regen_list_regen): Don't make CORBA calls here! (shame on me).
-
- * mail-identify.c (mail_identify_mime_part): Just use
- gnome_vfs_get_mime_type_from_name() so we can forget all the crap
- I implemented before.
-
-2003-02-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-display.c (on_link_clicked): Pass in the *address* of the
- GError to gnome_url_show(), otherwise bad things happen :-)
-
-2003-01-31 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.c (mail_config_get_labels): New function to return a
- cached list of labels.
- (mail_config_get_label_color_by_name): New convenience function to
- search the cached labels.
- (mail_config_get_label_color_by_index): Same.
- (mail_config_init): Cache the labels and also listen for changes
- to them in the gconf db.
- (config_cache_labels): Internal function to cache the labels.
-
- * folder-browser.c (on_right_click): Fixed the label colours in
- the menu by using the cached linked list of labels.
-
- * mail-preferences.c (colorpicker_set_color): Now takes a string
- argument allowing us to get rid of converting a string into an rgb
- guint32 all over the place when trying to set defaults, since we
- now store colors in gconf as strings.
- (mail_preferences_construct): Use the cached labels (they are
- already parsed for us).
-
-2003-01-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * component-factory.c (storage_remove_folder): Change
- strcmp(fi->path, path) to strcmp(fi->name, name) and now the
- execution takes the right path. My patch base on Callie's patch
- for bug #33525.
-
- * mail-identify.c (mail_identify_mime_part): Fixed a #warning by
- converting a local path into a file: uri before feeding it to
- gnome-vfs.
-
- * message-list.c (message_list_set_folder): Removed a FIXME that
- I've decided is no longer needed.
-
-2003-01-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.c (mail_config_add_account): Emit the account-added
- event.
- (mail_config_remove_account): Emit the account-removed event.
-
- * mail-account-gui.c (mail_account_gui_save): Emit the changed
- event on the account-list for the changed account.
-
-2003-01-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser-ui.c (folder_browser_ui_add_global): Set the
- paned_size here.
-
- * folder-browser.c (folder_browser_gui_init): Don't bother
- connecting to the hide-deleted, message-display-style, paned-size,
- nor show-preview gconf notifications anymore, since we can just
- set them when the view becomes active again in
- folder-browser-ui.c. Cuts down on extra overhead.
- (folder_browser_destroy): No need to disconnect from those
- notifications anymore either.
-
-2003-01-24 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am (iconsdir): Remove, this is now defined in
- configure.in.
-
-2002-12-07 leon.zhang <leon.zhang@sun.com>
-
- * component-factory.c (user_create_new_item_cb): transfer the
- current acount info, which will be regarded as the sender of
- new composer, to send_to_url().
-
- * mail-callbacks.h (send_to_url): Add a new parameter for parent
- folder uri.
-
- * mail-callbacks.c (send_to_url): Create composer base on source
- account info from parent folder physical uri.
- (post_to_url): create composer based on current account from
- parent folder physical uri.
-
- * mail-display.c (on_link_clicked): Apply new format of function:
- send_to_url.
-
- Fixes bug #35123 #35289
-
-2003-01-24 Not Zed <NotZed@Ximian.com>
-
- * mail-local.c (non_equal): We do actually need to check they are
- file url's, otherwise, all url's match.
-
-2003-01-23 Rodney Dawes <dobey@ximian.com>
-
- * folder-browser.c (fb_resize_cb): Use button_release instead of
- size_allocate, and get the position from the Paned widget to prevent
- calling CORBA all the time for GConf stuff
-
-2003-01-23 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am (componentdir): Removed definition; this is now
- defined in configure.in.
-
-2003-01-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.c (mail_config_get_thread_list): Removed.
- (mail_config_set_thread_list): Removed.
- (mail_config_uri_renamed): No longer needs to change threaded
- state for each url either.
- (mail_config_write_on_exit): Updated.
-
- * folder-browser-ui.c (folder_browser_ui_add_list): Get the
- threaded state via gconf.
-
- * folder-browser.c (folder_browser_toggle_threads): Save the
- threaded state.
-
-2003-01-22 Ettore Perazzoli <ettore@ximian.com>
-
- * folder-browser-ui.c (folder_browser_ui_setup_view_menus): Use
- EVOLUTION_GALVIEWSDIR.
-
- * message-browser.c (set_bonobo_ui): Get
- evolution-mail-messagedisplay.xml from EVOLUTION_UIDIR.
-
- * mail-signature-editor.c (mail_signature_editor): Get
- evolution-signature-editor.xml from EVOLUTION_UIDIR.
-
- * folder-browser-ui.c (ui_add): Get the evoluiton-mail* XML files
- from EVOLUTION_UIDIR.
-
- * Makefile.am (INCLUDES): Define EVOLUTION_GALVIEWSDIR; update
- EVOLUTION_IMAGESDIR to include the $(BASE_VERSION).
- (gladedir): Version using $(BASE_VERSION).
- (etspecdir): Likewise.
- (iconsdir): Likewise.
- (buttonsdir): Likewise.
- (etspecdir): Likewise.
-
- * component-factory.c (owner_set_cb): Look for vfoldertypes.xml in
- the new version-aware location.
- * mail-summary.c (generate_folder_summaries): Likewise.
- * mail-search-dialogue.c (mail_search_dialogue_construct): Likewise.
- * mail-vfolder.c (vfolder_load_storage): Likewise.
-
- * mail-autofilter.c (filter_gui_add_from_message): Look for
- filtertypes.xml in the new version-aware location.
- (mail_filter_rename_uri): Likewise.
- (mail_filter_delete_uri): Likewise.
- * mail-session.c (main_get_filter_driver): Likewise.
- * mail-callbacks.c (filter_edit): Likewise.
-
-2003-01-22 Radek Doulik <rodo@ximian.com>
-
- * mail-callbacks.c (do_mail_print): put unrealized html widget
- into top level widget (gtk window) before realizing it
- destroy temporary widgets (w, html)
-
-2003-01-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.c (mail_config_remove_account): Don't unref the
- account object, e_list_remove() apparently handles this for us.
-
- * mail-accounts.c (account_delete_clicked): Don't unref the
- confirm dialog, it was already destroyed.
-
-2003-01-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * evolution-mail.schemas: Default to hiding deleted
- messages. Fixes bug #35929.
-
- * mail-preferences.c (entry_changed): Removed.
- (toggle_button_toggled): Removed.
- (settings_changed): New callback that replaces the two above. No
- need to have multiple callback functions when the signature is the
- same.
-
- * folder-browser.c (folder_browser_toggle_hide_deleted): Don't
- !atoi (state) for the message_list_set_hidedeleted() call.
-
-2003-01-18 Larry Ewing <lewing@ximian.com>
-
- * mail-callbacks.c (save_msg_ok): e_question returns a boolean,
- don't test for a specific value.
-
- * mail-display.c (html_button_press_event): make the event
- handlers return FALSE so that gtkhtml can process the events.
- (on_link_clicked): call gnome_url_show with all its arguments so
- that it actually does something. Also pass news and nntp urls to
- gnome_url_show so that they can be handled properly.
-
-2003-01-17 Larry Ewing <lewing@ximian.com>
-
- * mail-format.c (handle_text_enriched): wrap eriched entries with
- a table so that they get proper indentation.
-
-2003-01-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-session.c (do_get_pass): Updated.
- (request_password): Same.
-
- * mail-send-recv.c (mail_send): Fixed to use EAccountService.
-
- * mail-config-druid.c (make_account): Updated to use EAccount and
- friends.
-
- * mail-account-gui.c (service_check_supported): Updated to use
- EAccountService.
- (mail_account_gui_new): Ref the account passed in and also update
- to use EAccount objects.
- (save_service): Updated to use an EAccountService.
- (add_new_store): Updated to use an EAccount.
- (mail_account_gui_save): Updated to use EAccounts.
- (setup_signatures): Updated because the new account->id->def_sig
- is now an int and not a structure pointer.
-
- * mail-account-editor.c (construct): Updated.
- (mail_account_editor_new): Now takes an EAccount object as an
- argument instead of a MailConfigAccount.
-
- * mail-crypto.c (mail_crypto_get_pgp_cipher_context): Updated to
- use EAccounts.
-
- * subscribe-dialog.c (populate_store_foreach): Removed.
- (populate_store_list): Can't use populate_store_foreach here
- because of the change to EAccountList so do it manually.
-
- * mail-vfolder.c (uri_is_ignore): Rewrote to use EAccountList and
- EIterator and all that fun.
-
- * mail-send-recv.c (build_dialogue): Updated to use EAccountList
- and EAccount object stuff. *ugh*
- (mail_send_receive): Here too.
- (mail_autoreceive_setup): Same.
-
- * mail-callbacks.c (check_send_configuration): Updated.
- (composer_get_message): Updated.
- (compose_msg): "
- (list_add_addresses): "
- (guess_me): "
- (guess_me_from_accounts): Same.
- (forward_get_composer): Here too.
- (mail_generate_reply): Same.
- (redirect_get_composer): "
- (empty_trash): And finally here.
-
- * mail-accounts.c (account_edit_clicked): Updated.
- (account_delete_clicked): Same.
- (account_default_clicked): Here too.
- (account_able_clicked): "
- (account_cursor_change): "
- (mail_accounts_load): Again here.
-
- * folder-browser.c (folder_browser_is_drafts): Updated to use
- EAccountList and EAccount stuff.
- (folder_browser_is_sent): Same.
-
- * component-factory.c (mail_load_storages): Updated to use
- EAccount and EAccountList stuff.
- (owner_set_cb): Same.
- (send_receive_cb): Here too.
-
- * mail-config.c: Rewritten to use EAccount and EAccountList
- objects.
-
-2003-01-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config-druid.c (get_fn): Connect to the toggled event on
- the transport_needs_auth toggle button so if the user turns this
- off after having deleted the username field, the Next button
- becomes re-enabled. Fixes bug #36862.
-
-2003-01-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-composer-prefs.c (sig_fill_clist): Same as below.
-
- * mail-account-gui.c (sig_fill_options):
- mail_config_get_signature_list() now returns a GSList instead of a
- GList.
-
- * mail-config.c (signature_new_from_xml): New function to parse a
- signature xml blob into a MailConfigSignature structure.
- (config_read_signatures): Rewritten to use above function.
- (signature_to_xml): New function to write a signature to xml.
- (config_write_signatures_num): Removed.
- (config_write_signature): Removed.
- (config_write_signatures): Rewritten to use signature_to_xml and
- gconf.
-
-2003-01-16 Dan Winship <danw@ximian.com>
-
- * mail-config.h (MailConfigAccount): Add a UID field (to match
- EAccount), which never changes and can be used by gconf watchers
- to distinguish an account rename from a deletion and creation.
-
- * mail-config.c (account_copy): Create a new UID on the new
- account.
- (account_new_from_xml): Read the UID. (If it doesn't have one,
- make one.)
- (account_to_xml): Write the UID.
-
- * mail-config-druid.c (make_account): add a UID to each account
-
-2003-01-15 Not Zed <NotZed@Ximian.com>
-
- * mail-accounts.c (account_able_clicked): Change the
- enable/disable button when the state changes.
-
-2003-01-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-local.c (save_metainfo): Back to using e_xml_save_file().
-
-2003-01-14 Ettore Perazzoli <ettore@ximian.com>
-
- * message-tag-editor.c (message_tag_editor_init): Make dialog
- Cancel/OK to match HIG.
-
- * mail-signature-editor.c (do_exit): Make confirmation dialog
- Discard/Cancel/Save to match the HIG.
-
- * mail-composer-prefs.c (mail_composer_prefs_construct): Make
- dialog Cancel/OK to match HIG.
-
- * mail-account-editor.c (construct): Make the dialog
- Apply/Close/OK to match HIG.
-
-2003-01-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-gui.c (mail_account_gui_save): Call
- mail_config_save_accounts ().
-
- * mail-config.c (mail_config_save_accounts): New function to save
- accounts without having to re-load them.
-
-2003-01-14 Radek Doulik <rodo@ximian.com>
-
- * folder-browser.c (etree_key): use gtk_scrolled_window_*
- functions for mail_display->scroll
-
- * mail-display.c (mail_display_new): use gtk_scrolled_window_*
- functions
-
- * mail-display.h: use GtkScrolledWindow instead of EScrollFrame
-
-2003-01-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-display.c (pixmap_press): Change the user_data argument to
- be of type gpointer instead of EScrollFrame, since, well, it's not
- an EScrollFrame anymore.
-
-2003-01-14 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am (libevolution_mail_la_SOURCES): Add mail-format.h.
- (EXTRA_DIST): Add $(schema_DATA).
-
-2003-01-14 Rodney Dawes <dobey@ximian.com>
-
- * Makefile.am: Make the component be unversioned as a shlib
-
-2003-01-14 Rodney Dawes <dobey@ximian.com>
-
- * folder-browser.c: Use GtkPaned instead of EPaned
-
-2003-01-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.c (account_new_from_xml): Perform some sanity
- checking on the auto-check-timeout value.
-
- * folder-browser.c (folder_browser_copy): Correctly create the
- clipboard buffer by using a nul to delimit the uri and the list of
- uids.
-
- * folder-browser-ui.c (folder_browser_ui_add_message): Check the
- state of message_style in gconf and set the menus accordingly.
-
- * folder-browser.c (folder_browser_destroy): Remove listener for
- message_style change notification.
- (folder_browser_gui_init): Connect a listener for changes to
- message_style.
-
- * mail-config.c (account_to_xml): Save the auto-check timeout
- value.
- (account_new_from_xml): Load the auto-check-timeout value.
-
-2003-01-13 Dan Winship <danw@ximian.com>
-
- * folder-info.c: s/BonoboXObject/BonoboObject/
-
- * mail-config.c: Likewise
-
- * mail-offline-handler.c: Likewise
-
-2003-01-13 Not Zed <NotZed@Ximian.com>
-
- * mail-mt.c (mail_msg_check_error): hook onto destroy to remove
- dialogue from active table.
- (error_response): Just destroy on any response, dont unref either.
-
-2003-01-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (mail_format_data_wrapper_write_to_stream):
- g_strdup the md->charset otherwise we'll get memory corruption
- later. This may be why non-usascii text is displaying incorrectly.
-
-2003-01-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser-ui.c (folder_browser_ui_add_list): We also need
- to call message_list_set_hidedeleted() here so that any
- deactivated folder controls will change to the currently set state
- when re-activated.
- (folder_browser_ui_add_global): Same for show_preview.
-
- * folder-browser.c (hide_deleted_changed): Don't call
- message_list_set_hidedeleted() here.
- (folder_browser_toggle_hide_deleted): Instead, call it here. This
- way we get a faster "response time". Also, this will make it so
- that not all folder controls will regen their message-list at the
- same time.
- (folder_browser_toggle_preview): Same idea as the hide-deleted
- changes.
- (show_preview_changed): See above.
-
- * mail-config-druid.c (make_account): Default the new account to
- enabled.
- (wizard_finish_cb): Don't set enabled here.
-
-2003-01-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser.c (hide_deleted_changed): New callback for when
- the HideDeleted state changes.
- (folder_browser_gui_init): Listen for changes to hide_deleted so
- we can update the menu state.
- (folder_browser_destroy): Remove the hide_deleted notify handler.
- (folder_browser_toggle_hide_deleted): When saving the setting,
- remember that it is !atoi (state) rather than atoi (state) because
- show vs hide. yea.
-
- * mail-session.c (main_get_filter_driver): notify-type is a int,
- not a bool. Duh.
-
-2003-01-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * component-factory.c (factory): Updated for function rename.
-
- * mail-config-factory.c (mail_config_control_factory_cb):
- Namespaced the function name.
-
- * folder-browser-ui.c (folder_browser_ui_add_global): Don't add
- the listener for show_preview here, it was moved into
- folder-browser.c so we could detach the listener when the
- folder-browser is destroyed. Also prevents a listener being added
- multiple times (which was possible? before).
-
- * folder-browser.c (folder_browser_destroy): Remove the gconf
- notify handler for show_preview.
- (show_preview_changed): Moved here from folder-browser-ui.c
-
- * component-factory.c (storage_remove_folder): Fixed a situation
- in which we could notify the shell listener twice.
-
-2003-01-10 Not Zed <NotZed@Ximian.com>
-
- * folder-browser.c (folder_browser_gui_init): Save the paned_size
- notify handle.
- (folder_browser_destroy): Remove gconf notify handler.
-
-2003-01-09 Chris Toshok <toshok@ximian.com>
-
- * mail-config-druid.c (wizard_finish_cb): enable the account
- before attempting to saving it.
-
- * mail-accounts.c (account_delete_clicked): need to show the
- buttons added to the dialog.
-
-2003-01-10 Not Zed <NotZed@Ximian.com>
-
- * mail-config.glade: Remove info.png from a couple of images, the
- image is set via code at runtime. Removes some annoying runtime
- warnings.
-
- * mail-send-recv.c (dialogue_response): dont unref the dialogue.
- (dialog_destroy_cb): null out the send_recv_dialogue after destroy.
- (build_dialogue): show the stop button
-
-2003-01-09 Chris Toshok <toshok@ximian.com>
-
- * folder-info.c (evolution_folder_info_notify_ready): pass bag to
- bonobo_pbclient_set_boolean.
-
-2003-01-09 Ettore Perazzoli <ettore@ximian.com>
-
- * component-factory.c (owner_set_cb): Don't call
- mail_config_register_factory() or
- evolution_mail_config_wizard_init().
-
-2003-01-09 Not Zed <NotZed@Ximian.com>
-
- * mail-config-druid.c: Added druidpagestart1 to the pages list.
- (construct): Change the limits on the page initialisation, and
- widget_show_all on the page rather than the content.
-
- * GNOME_Evolution_Mail.server.in.in: Make Mail a shlib component.
-
- * folder-info.c (evolution_folder_info_factory_init): Removed.
- (evolution_folder_info_factory_fn): renamed to evolution_folder_info_new().
-
- * mail-config-druid.c (evolution_mail_config_wizard_factory_fn):
- Renamed to evolution_mail_config_wizard_new().
- (evolution_mail_config_wizard_init): Removed.
-
- * mail-config-factory.c (mail_config_register_factory): Remove.
- (config_control_factory_cb): make this public.
-
- * Makefile.am: setup evolution-mail as a shared library.
-
- * component-factory.c (make_factory): implement the bonobo-plugin
- factory for shlib operation. Also, preliminary work to setup mailer-specific
- (factory): Implement the factory which starts various components.
-
- * mail-config.c (xml_get_prop): g_free->xmlFree
- (account_to_xml): copy xml memory to glib memory when adding the 0
- on the end of the string.
- (accounts_save): Use slightly different logic with appending to
- the tail of the list, we can't use the &node trick with gslists.
- (accounts_changed): Same here.
-
-2003-01-08 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am: Images are now in $(datadir)/evolution/images
- instead of $(datadir)/images/evolution.
-
-2003-01-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser-ui.c (folder_browser_ui_add_global): Call
- folder_browser_set_message_preview().
-
- * mail-config.c (mail_config_get_show_preview): Removed.
- (mail_config_set_show_preview): Removed.
-
- * folder-browser.c (folder_browser_toggle_preview): Simply set the
- gconf show_preview setting and let the code in folder-browser-ui.c
- detect it and update the UI.
-
- * folder-browser-ui.c (folder_browser_ui_add_global): Listen for
- changed events on the show_preview setting.
-
- * mail-config.c (mail_config_set_default_account): Save the
- setting via gconf.
- (mail_config_add_account): Immediately save the list of accounts.
- (mail_config_remove_account): Same.
- (mail_config_signature_run_script): g_free the charset value and
- use the composer's charset rather than the display charset.
- (mail_config_get_default_account_num): Removed.
-
-2003-01-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser.c (save_cursor_pos): Use gconf to get the paned
- size.
- (folder_browser_set_message_preview): Same.
- (folder_browser_toggle_hide_deleted): Use gconf to set the
- hide-deleted state.
- (folder_browser_set_message_display_style): Same but for the
- message_display_style.
- (fb_resize_cb): Save the paned_size via gconf.
- (paned_size_changed): Callback for when the paned_size gets
- changed. Change the folder-browser's paned size to the new
- setting.
- (folder_browser_gui_init): Listen to changes to the paned_size and
- also get the initial size from gconf.
-
- * message-list.c (message_list_set_folder): Use gconf.
- (regen_list_regen): Use gconf.
-
- * message-browser.c (transfer_msg_done): Use gconf to get the
- hide_deleted setting.
-
- * mail-account-gui.c (sig_add_new_signature): Use gconf.
-
- * folder-browser-ui.c (folder_browser_ui_add_list): Use gconf.
-
- * folder-browser.c (save_cursor_pos): Use gconf.
- (folder_browser_set_message_preview): Same.
- (folder_browser_toggle_hide_deleted): Here too.
- (folder_browser_set_message_display_style): And here.
- (folder_browser_gui_init): Here too.
- (done_message_selected): And here.
-
- * mail-config.c (mail_config_get_thread_subject): Removed.
- (mail_config_set_thread_subject): Removed.
- (mail_config_get_empty_trash_on_exit): Removed.
- (mail_config_set_empty_trash_on_exit): Removed.
- (mail_config_get_last_filesel_dir): Removed.
- (mail_config_set_last_filesel_dir): Removed.
- (mail_config_get_hide_deleted): Removed.
- (mail_config_set_hide_deleted): Removed.
- (mail_config_get_paned_size): Removed.
- (mail_config_set_paned_size): Removed.
- (mail_config_get_send_html): Removed.
- (mail_config_set_send_html): Removed.
- (mail_config_get_confirm_unwanted_html): Removed.
- (mail_config_set_confirm_unwanted_html): Removed.
- (mail_config_get_citation_highlight): Removed.
- (mail_config_set_citation_highlight): Removed.
- (mail_config_get_citation_color): Removed.
- (mail_config_set_citation_color): Removed.
- (mail_config_get_do_seen_timeout): Removed.
- (mail_config_set_do_seen_timeout): Removed.
- (mail_config_get_mark_as_seen_timeout): Removed.
- (mail_config_set_mark_as_seen_timeout): Removed.
- (mail_config_get_prompt_empty_subject): Removed.
- (mail_config_set_prompt_empty_subject): Removed.
- (mail_config_get_prompt_only_bcc): Removed.
- (mail_config_set_prompt_only_bcc): Removed.
- (mail_config_get_confirm_expunge): Removed.
- (mail_config_set_confirm_expunge): Removed.
- (mail_config_get_confirm_goto_next_folder): Removed.
- (mail_config_set_confirm_goto_next_folder): Removed.
- (mail_config_get_goto_next_folder): Removed.
- (mail_config_set_goto_next_folder): Removed.
- (mail_config_get_http_mode): Removed.
- (mail_config_set_http_mode): Removed.
- (mail_config_get_default_forward_style): Removed.
- (mail_config_set_default_forward_style): Removed.
- (mail_config_get_default_reply_style): Removed.
- (mail_config_set_default_reply_style): Removed.
- (mail_config_get_message_display_style): Removed.
- (mail_config_set_message_display_style): Removed.
- (mail_config_get_default_charset): Removed.
- (mail_config_set_default_charset): Removed.
- (mail_config_get_x_mailer_display_style): Removed.
- (mail_config_set_x_mailer_display_style): Removed.
-
- * subscribe-dialog.c (populate_store_list): Use the list of
- accounts. We can't get the list of sources anymore.
- (populate_store_foreach): Updated.
-
- * mail-callbacks.c (guess_me_from_accounts): Use account->enabled.
- (mail_generate_reply): Same.
- (empty_trash): Here too.
-
- * mail-accounts.c (account_delete_clicked): Use account->enabled
- rather than source->enabled.
- (account_able_clicked): Same.
- (account_cursor_change): Here too.
- (mail_accounts_load): And here.
-
- * component-factory.c (owner_unset_cb): Use gconf empty-on-exit
- settings.
- (mail_load_storages): Use account->enabled rather than
- account->source->enabled. The struct changed.
-
- * mail-composer-prefs.c (sig_add): Get the send_html pref from gconf.
-
- * message-tag-followup.c (target_date_new): Use gconf.
-
- * mail-config.c (mail_config_get_week_start_day): Removed.
-
- * mail-tools.c (mail_tool_quote_message): Use gconf here too, but
- we don't need to parse the colour - just use it as a raw string.
- (mail_tool_forward_message): Use gconf.
-
- * mail-format.c (mail_format_data_wrapper_write_to_stream): Use gconf.
- (write_headers): Use gconf.
- (handle_text_plain): Same.
-
- * mail-display.c (mail_text_write): Updated to use gconf and parse
- GdkColour strings.
- (on_url_requested): Updated to use gconf.
-
- * mail-callbacks.c (ask_confirm_for_unwanted_html_mail): Use gconf
- rather than the old mail-config APIs which will be removed.
- (ask_confirm_for_empty_subject): Same.
- (ask_confirm_for_only_bcc): Here too.
- (composer_get_message): And here.
- (create_msg_composer): Same.
- (transfer_msg_done): Again here.
- (delete_msg): Here too.
- (confirm_expunge): And finally here.
-
- * mail-config.c (mail_config_write): Use gconf.
- (mail_config_get_sources): Removed.
-
- * mail-account-gui.c (mail_account_gui_save): No need to save
- enabled-state anymore for a source.
-
- * mail-config-druid.c (wizard_finish_cb): Instead of setting
- account->source->enabled to TRUE, just set account->enabled to
- TRUE. The structures changed a bit.
-
- * mail-send-recv.c (mail_send_receive): Get the list of accounts
- instead of sources, and pass them along to build_dialogue. I'm
- trying to get rid of the mail_config_get_sources() api.
- (mail_autoreceive_setup): Here too.
-
- * mail-config.c (mail_config_get_filter_log): Removed.
- (mail_config_set_filter_log): Removed.
- (mail_config_get_filter_log_path): Removed.
- (mail_config_set_filter_log_path): Removed.
- (mail_config_get_new_mail_notify): Removed.
- (mail_config_set_new_mail_notify): Removed.
- (mail_config_get_new_mail_notify_sound_file): Removed.
- (mail_config_set_new_mail_notify_sound_file): Removed.
-
- * mail-session.c (main_get_filter_driver): Updated to use the
- gconf settings.
-
-2003-01-07 Dan Winship <danw@ximian.com>
-
- * mail-account-gui.c (mail_account_gui_auto_detect_extra_conf,
- mail_account_gui_build_extra_conf): Don't translate the conf
- strings. Camel already did it.
-
-2003-01-06 Dan Winship <danw@ximian.com>
-
- * Makefile.am: remove idldir definition. (It's defined in
- configure.in now)
-
-2003-01-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (composer_get_message): Use
- e_destination_get_email() instead of e_destination_get_address()
- when checking that we have a list of valid recipients to send the
- message to because get_email() returns the addr-spec portion of
- the address, which is what we care about. if that doesn't exist,
- then the address is useless. This does all we can do mailer-side
- for the recent "SMTP Problem" thread.
-
-2003-01-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-display.c: Fixed some build issues.
-
- * mail-search.c: Same.
-
- * mail-callbacks.c (save_draft_done): Use
- g_signal_handlers_disconnect_by_func().
- (manage_subscriptions): Use a weak_ref instead of connecting to
- the destroy event.
-
-2002-12-17 Jeffrey Stedfast <fejj@ximian.com>
-
- ...And a whole bunch more build fixes.
-
- * mail-vfolder.c (mail_vfolder_delete_uri): Don't use
- g_string_sprintfa() anymore since it is apparently deprecated.
-
- * mail-session.c (main_get_filter_driver): Don't use
- g_string_sprintfa() anymore since it is apparently deprecated.
-
- * mail-ops.c (build_from): Don't use g_string_sprintfa() anymore
- since it is apparently deprecated.
-
- * mail-callbacks.c (ask_confirm_for_unwanted_html_mail): Don't use
- g_string_sprintfa() anymore since it is apparently deprecated.
-
- * mail-autofilter.c: Don't use g_string_sprintfa() anymore since
- it is apparently deprecated.
-
- * folder-browser.c: Don't use g_string_sprintfa() anymore since it
- is apparently deprecated.
-
- * mail-search.c (mail_search_set_subject): Remove the unnecessary
- g_strdup()'age as well as fix a possible buffer overrun.
-
- * mail-local.c (mail_local_folder_construct): Use
- g_path_get_basename().
-
- * mail-config-druid.c (make_account): Don't use e_utf8_*
- functions.
-
-2002-12-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c #define a STANDARD_ISSUE_TABLE_OPEN string used
- for wrapping textual message parts to keep them being fully-left
- justified.
- (mail_format_raw_message): Wrap the content with a table so that
- text isn't fully left-justified.
- (write_hr): Use it here too.
- (handle_text_plain): And finally here.
-
-2002-12-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-display.c (mail_error_printf): Use camel_text_to_html()
- instead of e_text_to_html().
- (mail_text_write): Write the content directly to gtkhtml through
- an html stream filter.
-
- * mail-format.c (attachment_header): Use camel_text_to_html()
- instead of e_text_to_html().
- (write_text_header): Same.
- (write_address): Here too.
- (mail_get_message_rfc822): And here.
- (mail_get_message_body): And finally here.
-
-2002-12-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (handle_text_plain): Re-implemented to use
- streams. Also no need to check for html since
- camel-mime-part-utils.c now does this for us and will re-tag the
- mime-type as text/html thus the UI can be completely ignorant of
- this process.
- (handle_text_plain_flowed): Removed.
- (write_one_text_plain_chunk): Removed.
- (try_uudecoding): Removed.
- (try_inline_binhex): Removed.
- (handle_text_enriched): Re-implemented to use streams too.
-
-2002-12-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (write_text_header): Change the order of the args
- to be consistant with other write functions.
- (write_date): Same.
- (write_field_row_begin): Here too.
- (write_headers): Here too.
- (write_one_text_plain_chunk): Don't strdup just to pass it to
- mail_text_write() so that it can dup it yet again into html text
- and dup it yet a 3rd time into a GByteArray. Instead just write it
- to gtkhtml.
- (handle_*): Fixed arguments to take a MailDisplayStream instead of
- a GtkHTML widget and a GtkHMLStream.
-
- * mail-display.c (mail_display_render): Create a MailDisplayStream
- to pass to mail_format_mime_message() and
- mail_format_raw_message().
-
- * mail-display-stream.[c,h]: New stream to replace
- mail-stream-gtkhtml.c
-
- * mail-stream-gtkhtml.[c,h]: Removed.
-
-2002-12-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (check_send_configuration): Make sure the
- folder-browser is not NULL or we'll crash.
-
- * mail-preferences.c (mail_preferences_construct): Fix the colour
- code to get a guint32 rgb correctly (I think - can't test because
- the shell keeps crashing, yay).
-
- * message-tag-followup.c (construct): Don't re-use cell renderers
- - I'm not sure this is actually safe to do.
-
- * mail-session.c: Get rid of unneeded CamelObject casts.
- (user_message_response): Don't unref the dialog object after we've
- destroyed it.
-
- * mail-display.c (write_data_to_file): Don't unref the dialog
- object after we've destroyed it.
-
- * mail-callbacks.c: Same here.
-
- * component-factory.c: Here too.
-
- * message-tag-editor.c: Added MESSAGE_TAG_EDITOR_GET_CLASS macros.
-
-2002-12-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-accounts.c (mail_accounts_tab_construct): Setup
- double-click here.
-
-2002-12-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-accounts.c (account_delete_clicked): Get rid of the ETable
- #ifdef's - we won't ever be using ETable.
- (account_default_clicked): Same.
- (account_able_clicked): Here too.
- (mail_accounts_load): And here.
- (mail_accounts_treeview_new): Renamed from etable_new since we
- won't ever be using an etable.
- (mail_accounts_tab_construct): And finally here.
-
-2002-12-12 Not Zed <NotZed@Ximian.com>
-
- * folder-browser.c (my_folder_browser_init): cast a-warning a-way.
-
- * mail-composer-prefs.c (spell_setup): Terminate list_store_set
- with -1.
-
- * mail-accounts.c (mail_accounts_etable_new): clist -> gtktreeview
- stuff. Yes, this is not an etable.
- (mail_accounts_tab_construct): Same.
- (mail_accounts_load): Same.
- (account_cursor_change): Same.
- (account_able_clicked): And this.
- (account_default_clicked): Same.
- (account_delete_clicked): Guess?
- (account_edit_clicked): And here too.
-
-2002-12-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (mail_format_data_wrapper_write_to_stream): New
- function to handle a lot of the filtering/etc that was done in
- mail_format_get_data_wrapper_text(). This is the first step toward
- getting rid of e-text-to-html crap and using my tohtml stream
- filter instead.
- (mail_format_get_data_wrapper_text): Use the new function.
- (mail_format_raw_message): Use camel streams to write the content
- to gtkhtml rather than using get_data_wrapper_text() and then
- converting that to html and then writing it to the gtkhtml stream.
-
-2002-12-10 Not Zed <NotZed@Ximian.com>
-
- * mail-composer-prefs.c (mail_composer_prefs_construct): language
- is a treeview now. Not sure what to do with it yet, but get rid
- of one warning anyway.
- (mail_composer_prefs_construct): Same for sig_clist, but setup
- model.
- (sig_fill_clist): Change to use a gtktreeview instead of a clist.
- (sig_selection_changed): New method to handle signature selection
- changes with the new widgets.
- (sig_delete): clist -> treeview.
- (mail_composer_prefs_new_signature): Same.
- (sig_edit): ditto.
- (sig_current_sig): removed.
- (sig_row_unselect): Removed.
- (sig_row_select): Removed, now redundant.
- (spell_select_lang): Removed, redundant.
- (spell_set_ui_language): New implementation using list model more
- effectively.
- (spell_get_language_str): Same here.
- (spell_set_ui_language): Removed this too, merged into
- spell_set_ui, it was just wasting stack space.
- (spell_language_selection_changed): renemd from
- spell_language_select_row, converted to gtktreeview, etc.
- (spell_language_unselect_row): Removed.
- (spell_language_enable): Redone to use tree model.
- (spell_language_button_press): Removed, i dont think this is
- needed anymore.
- (spell_setup): dont hook onto redundant signals.
-
- * mail-config-factory.c (config_control_factory_cb): ignore
- mail-font-prefs in a different way (so we dont assert)
-
-2002-12-09 Chris Toshok <toshok@ximian.com>
-
- * mail-session.c (pass_response): pass "Mail" to e_passwords_*.
- (do_get_pass): same.
- (main_forget_password): same.
- (mail_session_get_password): same.
- (mail_session_remember_password): same.
- (mail_session_forget_password): same.
-
- * mail-config.c (mail_config_write_on_exit): pass "Mail" to
- e_passwords_*.
-
- * main.c (main): e_passwords_init is gone.
-
-2002-12-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (guess_me_from_accounts): Use the same logic as
- mail_generate_reply(). Fixes bug #34882
-
- Fixes bug #34315
-
- * component-factory.c (message_rfc822_dnd): Return TRUE if we
- successfully handled all messages in the mbox stream, or FALSE
- otherwise.
- (destination_folder_handle_drop): For TEXT_URI_LIST, use the
- retval from message_rfc822_dnd() rather than relying on an
- exception, because one will not always necessarily be set. For
- MESSAGE_RFC822, also use the retval from message_rfc822_dnd().
-
-2002-12-03 Not Zed <NotZed@Ximian.com>
-
- * folder-browser.c (folder_browser_finalise/destroy): frobbed
- around with these till it exits without crashing.
-
- * message-list.c (message_list_destroy): made a destroy
- handler again (was dispose). Frobbed around with this and
- finalise till it can destroy without crashing.
-
- * message-browser.c (message_browser_new): ref/sink the
- folderbrowser.
-
-2002-11-25 Radek Doulik <rodo@ximian.com>
-
- * mail-preferences.c (mail_preferences_construct): magic_check -->
- magic_links_check
-
-2002-11-27 Not Zed <NotZed@Ximian.com>
-
- * message-tag-followup.c (construct): gnome_pixmap -> gtkimage.
- (construct): gtk_clist -> gtk_tree_view, setup columns. They dont
- size well :-/
- (message_tag_followup_append_message): Append using model, remove
- clist stuff.
- (construct): Show date edit (glade bugs?)
-
- * folder-browser.c (folder_browser_class_init): gtk_marshal -> g_cclosure_marshal
- (setup_popup_icons): gnome_pixmap -> gtk_image.
- (on_right_click): gtk_pixmap -> gtk_image.
-
- * mail-accounts.c (account_delete_clicked): removed #if 0'd out code.
-
- * mail-send-recv.c (receive_done): remove FIXME and extra unref.
-
- * mail-session.c (request_password): Removed #if 0'd out stuff.
-
- * mail-vfolder.c (new_rule_clicked): proper cast for g_object_get_data.
-
- * mail-local.c (reconfigure_response): cast for g_object_get_data.
-
- * mail-account-editor.c (construct): GNOME_DIALOG -> GTK_DIALOG.
-
- * *.[ch]: re-ran fix.sh for e_notice change
-
- * mail-callbacks.c (save_msg_ok): g_object_get_data +
- gtk_object_remove_no_notify -> g_object_steal_data.
- (find_socket): gtk_container_children ->
- gtk_container_get_children
- (edit_msg): gnome_*_dialog -> gtk_message_dialog.
- (resent_msg): "
- (search_msg): "
- (confirm_goto_next_folder): gtkmessagedialogised (even if not
- used).
- (confirm_expunge): gtkmessagedialogised
- (filter_edit): "
- (do_mail_print): e_notice -> gtk_message_dialog.
- (are_you_sure): removed e_gnome_ok_cancel_dialog crap, replaced
- with a gtk dialog.
- (are_you_sure): gtkmessagedialogised.
- (edit_msg_internal): Dont free uids array, are_you_sure() free's
- it.
- (resend_msg): Same.
- (check_send_configuration): Use e_notice for stuff. Sigh, here we
- go again ...!
- (e_question): A utility function to ask a question, potentially
- with 'dont ask again' as well.
- (configure_mail): use e_question to save code. Here we go again,
- again ...
- (ask_confirm_for_unwanted_html_mail): "
- (ask_confirm_for_only_bcc): "
- (ask_confirm_for_only_bcc): "
- (composer_get_message): Use e_notice.
- (composer_save_draft_cb): Use e_question
- (edit_msg): use e_notice, & change to an ERROR.
- (resend_msg): same.
- (save_msg_ok): Properly initialise ret to OK, and use e_question,
- and use access() to determine existance/write access rather than
- stat, display an error if we can't write to a file that exists,
- and print the filename in all dialogues.
- (confirm_goto_next_folder): Use e_question.
- (confirm_expunge): use e_question.
- (filter_edit): Use e_notice.
- (do_mail_print): use e_notice.
-
-2002-11-26 Not Zed <NotZed@Ximian.com>
-
- * mail-vfolder.c (vfolder_gui_add_rule): clicked->response signal
- for gtk dialogue.
- (new_rule_clicked): Dont unref after destroy (duh, idiot again).
- (edit_rule_response): Same here.
- (mail_vfolder_delete_uri): Connect response signal to
- gtk_widget_destroy directrly using g_signal_connect_swapped.
- (close_dialogue): Removed, as no longer needed.
-
- * message-list.c (get_normalised_string): Duh idiot, "un-fixed"
- the memleak i added.
-
- * mail-callbacks.c (composer_get_message): Set parent window in
- message dialogue & DESTROY_WITH_PARENT flag.
- (composer_save_draft_cb):
- (configure_mail):
- (check_send_configuration): Add DESTROY_WITH_PARENT flag to
- gtk_message_dialog's
- (local_configure_done): remove some unecessary/wrong casts.
- (empty_trash_expunged_cb): "
- (do_mail_print): use gtk_window_set_transient_for instead of
- e_dialog_set_parent.
-
-2002-11-26 Not Zed <NotZed@Ximian.com>
-
- * mail-account-editor.c (mail_account_editor_new):
- gtk_widget_set_parent_window -> gtk_window_set_transient_for.
-
- * mail-callbacks.c (composer_send_queued_cb): dont unref composer.
-
- * message-browser.c (message_browser_destroy): moved back from
- finalise.
-
-2002-11-25 Not Zed <NotZed@Ximian.com>
-
- * message-list.c (message_list_dispose): move saving tree state
- here.
- (message_list_finalise): And take it from here.
-
- * mail-display.c (mail_display_destroy): @#$@# gtk. changed this
- around a bit.
- (mail_display_init): Fix prototype, its a gobject.
- (mail_display_init): ref/sink the invisible gtkobject.
-
-2002-11-22 Not Zed <NotZed@Ximian.com>
-
- * mail-callbacks.c (ask_confirm_for_unwanted_html_mail): removed
- e_messagebox, and use gtk_message_dialog directly.
- (ask_confirm_for_empty_subject): and here.
- (ask_confirm_for_only_bcc): And here too.
- (msgbox_destroy_cb): Removed, since no longer needed.
-
-2002-11-15 Harry Lu <harry.lu@sun.com>
-
- * mail-display.c (write_data_to_file): Show file name when prompt
- to user for overwrite. Fixes bug #34180.
-
-2002-11-21 Harry Lu <harry.lu@sun.com>
-
- * mail-display.c (do_attachment_header): Enable dragging of all
- attachments. For bug #34327.
-
-2002-11-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-preferences.c (mail_preferences_construct): Since the
- GSList returned from gconf needs to be free'd by us, we don't need
- to strdup the values. Also make sure we don't leak the GSList
- itself.
- (mail_preferences_apply): Don't leak our GSList data.
-
-2002-08-30 Radek Doulik <rodo@ximian.com>
-
- * mail-display.c (mail_display_render): don't set margins for raw
- message view
-
- * mail-format.c (mail_format_raw_message): as below
- (handle_text_plain_flowed): as below
- (mail_format_raw_message): don't use data_urls
-
- * mail-display.c (mail_text_write): put text in iframe, so it has
- margins and should not be placed in table which changes wrapping
- behavior
-
-2002-11-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-composer-prefs.c (mail_composer_prefs_construct): gconfify.
- (mail_composer_prefs_apply): gconfify this also.
-
- * mail-preferences.c (mail_preferences_construct):
- gconf_client_get_string() probably returns an allocated buffer.
-
-2002-11-20 Not Zed <NotZed@Ximian.com>
-
- * importers/Makefile.am (%.server.in): provide a proper implicit
- rule for building .server.in from .server.in.in. The other one
- just copied the first target to all destinations(!).
-
- * importers/evolution-outlook-importer.c (outlook_factory_fn):
- destroy -> weak ref.
-
-2002-11-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-preferences.c (mail_preferences_apply): Save the settings
- via gconf.
- (mail_preferences_construct): Load the values from gconf.
-
-2002-11-19 Radek Doulik <rodo@ximian.com>
-
- * mail-composer-prefs.c (sig_load_preview): use
- gtk_html_begin_content to specify utf-8
-
-2002-11-19 Not Zed <NotZed@Ximian.com>
-
- * importers/evolution-mbox-importer.c (mail_importer_module_init):
- fix warning message, outlook->mbox.
-
- * importers/Makefile.am: fix serverdir to point to
- $libdir/bonobo/servers.
-
- * mail-callbacks.c (addrbook_sender): add type to
- bonobo_widget_set_property.
-
- * mail-vfolder.c (vfolder_editor_response): dont unref after destroy.
-
- * mail-session.c (pass_response): dont unref aftrer destroy.
-
- * mail-local.c (reconfigure_response): dont unref after destroy.
-
- * mail-display.c (launch_cb): dont unref after destroy.
- (launch_cb): "
- (drag_data_get_cb): "
- (html_button_press_event): add type to bonobo_widget::set_property
-
- * mail-config.c (mail_config_check_service): dont unref after
- destroy.
-
- * component-factory.c (send_receive_cb): dont unref after destroy.
- (request_quit): "
-
- * mail-signature-editor.c (mail_signature_editor): Use version 3.0
- of gtkhtml editor interfaces.
- (do_exit): dont unref after destroy.
- (format_html_cb): Add type to bonobo_widget::set_property.
-
-2002-11-18 Radek Doulik <rodo@ximian.com>
-
- * mail-composer-prefs.c (spell_setup_check_options): check
- exception state and take care when exception raised
-
-2002-11-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-accounts.c (mail_accounts_load): Specify the default
- account. Also, don't need to use e_utf8_to_gtk_string() here.
-
-2002-11-18 Not Zed <NotZed@Ximian.com>
-
- * Makefile.am (evolution_mail_LDADD): Added back
- libevolution-importer stuff.
- (SUBDIRS): Added back importers.
-
- * importers/evolution-mbox-importer.c (load_file_fn): build the
- uri without deprecated funcs.
- (load_file_fn): dont free/alloc a camel_exception for no obvious
- purpose.
- (mbox_factory_fn): use weak_ref rather than destroy.
- (importer_destroy_cb): fix signature for weak ref notify.
- (mbox_factory_fn): add cid param.
-
- * importers/*.[ch]: ran fix script over everything.
-
- * importers/*.server.in.in: Added bonobo activation files. Moved
- evolution-mail to @LIBEXEC@ as below.
-
- * importers/Makefile.am: oaf->bonobo activation stuff.
-
- * importers/evolution-outlook-importer.c (outlook_factory_fn): Add
- component id to callback.
-
-2002-11-15 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am: Add rules to substitute @LIBEXEC@ in
- GNOME_Evolution_Mail.server.in.in and install evolution-mail in
- $(libexecdir) instead of $(bindir).
-
- * GNOME_Evolution_Mail.server.in.in: Replaced evolution-mail with
- @LIBEXECDIR@/evolution-mail.
-
-2002-11-15 Rodney Dawes <dobey@ximian.com>
-
- * component-factory.c: Use bonobo_main_quit instead of gtk
-
-2002-11-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-composer-prefs.c (sig_edit): Correctly spell Advanced.
-
-2002-11-15 Not Zed <NotZed@Ximian.com>
-
- * mail-summary.c (create_summary_view): weak notify -> ref.
-
- * mail-send-recv.c (build_dialogue): weak notify -> ref.
-
- * mail-accounts.c (account_edit_clicked): weak notify -> ref, i
- presume this is what jeff meant, 'cause it dont compile otherwise.
-
-2002-11-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-accounts.c (account_edit_clicked): Use g_object_weak_ref
- rather than connecting to destroy.
- (account_add_clicked): Same.
-
- * mail-callbacks.c (addrbook_sender): Make this use
- g_object_weak_notify also.
- (subscribe_dialog_destroy): Add NULL guards here since I think we
- really do want to connect to the "destroy" signal in the function
- that connects us to that signal.
-
- * mail-config-factory.c (config_control_factory_cb): Same.
-
- * mail-display.c (save_part): Here too.
- (make_popup_window): And here.
-
- * mail-send-recv.c (build_dialogue): Same here.
-
- * mail-summary.c (create_summary_view): Use g_object_weak_notify
- instead of connecting to the destroy signal.
-
-2002-11-14 Ettore Perazzoli <ettore@ximian.com>
-
- * component-factory.c (owner_set_cb): Want a (GWeakNotify) cast
- here, not (GWeakNotify *).
-
- * subscribe-dialog.c (fete_init): g_object_set() instead of
- gtk_object_set().
- (populate_store_list): Likewise.
- (menu_item_selected): g_object_get_data() instead of
- gtk_object_get_data().
-
- * message-list.c (message_list_create_extras): g_object_set()
- instead of gtk_object_set().
-
- * message-browser.c (message_browser_message_list_built):
- g_object_get_data() instead of gtk_object_get_data().
-
- * mail-vfolder.c (edit_rule_response): g_object_get_data() instead
- of gtk_object_get_data().
-
- * mail-summary.c (generate_folder_summaries): g_object_unref() the
- context instead of gtk_object_destroy().
-
- * mail-local.c (reconfigure_response): g_object_get_data() instead
- of gtk_object_get_data().
-
- * mail-display.c (pixbuf_gen_idle): g_object_unref() the GdkPixbuf
- loader instead of gtk_object_destroy().
- (pixbuf_gen_idle): Likewise.
- (embeddable_destroy_cb): Likewise.
-
- * mail-config-druid.c (mail_config_druid_destroy): No need to
- gtk_object_destroy() the GladeXML object.
- (construct): g_object_set() instead of gtk_object_set().
-
- * folder-browser.c (folder_browser_gui_init): g_object_get_data()
- instead of gtk_object_get_data().
-
-2002-11-14 Not Zed <NotZed@Ximian.com>
-
- * component-factory.c (create_view): shell client objref.
- (mail_add_storage): "
- (mail_remove_storage): "
-
-2002-11-13 Joe Shaw <joe@ximian.com>
-
- * Makefile.am: Remove a couple backslashes that were causing
- automake to complain, even though they were on lines that were
- -commented out-. Sigh.
-
-2002-11-13 Ettore Perazzoli <ettore@ximian.com>
-
- * folder-info.c (evolution_folder_info_factory_fn): Use
- g_object_new() instead of gtk_type_new().
- * folder-browser.c (folder_browser_new): Likewise.
- * mail-account-gui.c
- (mail_account_gui_folder_selector_button_new): Likewise.
- * mail-font-prefs.c (mail_font_prefs_new): Likewise.
-
-2002-11-13 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-format.c: Do not #include <libgnome/gnome-defs.h>.
- * mail-importer.c: Likewise.
- * mail-mt.c: Likewise.
- * mail-ops.c: Likewise.
- * mail-search-dialogue.c: Likewise.
- * mail-session.c: Likewise.
- * mail-vfolder.c: Likewise.
- * message-tag-followup.c: Likewise.
- * main.c: Likewise, and <libgnomeui/gnome-init.h>.
-
- * mail-callbacks.c: Do not #include <libgnome/gnome-paper.h>.
- (do_mail_print): Remove the GnomePaper local variable.
-
-2002-11-13 Not Zed <NotZed@Ximian.com>
-
- * component-factory.c (owner_set_cb): destroy->weak ref.
- (owner_set_cb): shell client changes.
-
- * mail-signature-editor.c (mail_signature_editor): bonobo api changes.
-
- * mail-local.c (save_metainfo): go back to using xmlSaveFile.
-
- * Makefile.am: Removed libevolution-importer from mail.
-
-2002-11-13 Not Zed <NotZed@Ximian.com>
-
- * GNOME_Evolution_Mail.server.in.in: Added to cvs. Currently
- contains no configurable stuff, but maybe it will one day.
-
- * Makefile.am (server_DATA): change oaf stuff to server stuff for
- bonobo activation.
-
- * mail-preferences.c (mail_preferences_apply): handle const entry text.
-
- * mail-composer-prefs.c (url_requested): Fixed typo.
- (mail_composer_prefs_construct): gnomepixmap->gtkimage.
-
- * mail-callbacks.c (configure_mail): destroy dialogue before dealing
- with response.
- (mail_generate_reply): Fix a typo.
- (popup_listener_cb): fix prototype.
- (tag_editor_response): Handle gtk dialog response.
- (flag_for_followup): Change gnome dialog to gtk dialog stuff.
- (tag_editor_destroy_cb):
- (tag_editor_cancel):
- (tag_editor_ok): Removed, handled in _response().
- (filter_editor_response): renamed from _clicked, handle gtk
- dialogue signal.
- (filter_editor_destroy): Removed.
- (footer_info_new): gnome font api changes.
- (do_mail_print): port to gnome print 2.
-
- * mail-autofilter.c (mail_filter_delete_uri): message_dialog uses
- a specific button enum, not the stock ones.
-
- * mail-accounts.c (mail_accounts_tab_get_type): gobjectify.
- (account_delete_clicked): gdkdialogise.
-
- * mail-account-gui.c (mail_account_gui_setup): Hack around font
- metric determination code.
-
- * mail-account-editor.c (mail_account_editor_get_type):
- gobjectise.
- (mail_account_editor_new): ""
-
- * folder-info.c (evolution_folder_info_notify_ready): use pbclient
- interface.
-
- * folder-browser-factory.c (control_destroy_cb): fix a typo.
- (folder_browser_factory_new_control): More typos.
-
- * folder-browser.c (on_right_click): cast around const warning.
- (context_menu_position_func): fix for api change.
-
- * e-searching-tokenizer.c (e_searching_tokenizer_finalise):
- Changed from destroy since it only frees memory.
- (e_searching_tokenizer_get_type): glibify.
-
- * component-factory.c (request_quit): gtkdialogise.
- (send_receive_cb): "
- (create_component): gdk_pixbuf api.
- (component_factory_init): bonobo activation stuff.
- (warning_response): renamed from warning_clicked.
- (owner_set_cb): gtkdialogise.
-
-2002-11-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * Makefile.am: Added files I've ported.
-
- * mail-config.c: Remove gnome-defs.h, this header no longer exists
- in GNOME2.
-
-2002-11-13 Not Zed <NotZed@Ximian.com>
-
- * Makefile.am: Commented out stuff that doesn't build yet. Also
- fixed idl build rule. importers still not built.
-
- * main.c (main): bonobactivationise. remove push visual/colormap.
- (main): no longer activate activation, let bonobo_init do it.
-
- * mail-signature-editor.c (menu_help): Change help api.
-
- * mail-session.c (user_message_destroy_noreply): removed. Not
- used?
-
- * mail-local.c (load_metainfo): xml root->children.
-
- * mail-format.c (g_string_append_len): Removed, it exists now.
-
-2002-11-12 Not Zed <NotZed@Ximian.com>
-
- * subscribe-dialog.c: gnome2ised, use gtkdialog.
- (subscribe_get_global_extras): use a weak ref rather than destroy
- signal.
-
- * message-tag-followup.c: gnome2ised.
-
- * message-tag-editor.c: gnome2ised & converted to gtkdialog.
-
- * message-list.c: gnome2ised.
- (message_list_finalise): From destroy method. maybe should be
- destroy still.
-
- * message-browser.c: port to gnome2
- (message_browser_finalise): renamed from destroy method.
-
- * mail-stream-gtkhtml.c: removed redundant
- camel_class_get_global_classfuncs() call.
-
- * mail-signature-editor.c: gtkdialogised, & bonobo api changes.
-
-
- * mail-search-dialogue.c: gtkdialogised.
-
- * mail-folder-cache.c: cleaned up camel ref/hook casts.
-
- * mail-composer-prefs.c (mail_composer_prefs_get_type): convert to
- gtype.
-
- * mail-font-prefs.c (mail_font_prefs_destroy): from finalise.
-
- * mail-config.c: s/bonobo_config/e_config_listener/ Added
- /apps/Evolution prefix to the evolution keys. Changed to use
- e_config_listener, etc.
- (mail_config_init): remove bonobo_config stuff.
- (mail_config_check_service): gtk dialogise.
- (check_response): from check_cancelled.
-
- * mail-config-druid.c (mail_config_druid_destroy): renamed from
- _finalize, turned into destroy handler.
- (construct): set type to toplevel, GTK_WINDOW_DIALOG no longer
- exists.
-
- * mail-config-factory.c (mail_config_register_factory): bonobo api
- changes.
-
- * mail-crypto.c (mail_crypto_get_pgp_cipher_context): cleaned up
- unref casts.
-
- * mail-display.c (write_data_to_file): gnome->gtkdialog.
- (on_link_clicked): use ascii_str*cmp on url.
- (save_part): g_path stuff.
- (launch_cb): gtk dialog.
- (pixmap_press): de-oafify.
- (pixbuf_for_mime_type): gnome-vfs api changes.
- (do_attachment_header): Change the pixmap to a gtkimage.
- (do_signature): "
- (pixbuf_gen_idle): "
- (do_attachment_header): ascii_str*cmp
- (do_attachment_header): gnome pixmap->gtkimage.
- (mail_display_destroy): protect against gtk mentalness.
- (html_button_press_event): ascii_str*cmp
- (drag_data_get_cb): added comment for translators of filename.
-
- * mail-format.c (component_supports): de-oafise.
- (is_anonymous): ascii_strncmp
- (attachment_header): remove utf8<>locale stuff, and gnomevfs api
- changes.
- (format_mime_part): fix g_strdown call.
- (write_field_row_begin): kill utf8->gtk stuff.
- (write_address): "
- (default_header_index): ascii_strcasecmp
- (handle_text_plain): "
- (handle_text_enriched): "
- (handle_multipart_encrypted): remove utf/gtk stuff.
- (handle_message_external_body): ascii_str*cmp
-
- * mail-identify.c (mail_identify_mime_part):
- (identify_by_magic): gnome vfs api changes.
-
- * mail-importer.c: Converted.
-
- * mail-local.c (load_metainfo): xml childs -> children.
- (mls_get_folder): g_strerror.
- (mls_delete_folder): g_strerror.
- (reconfigure_got_folder): Gnome->GtkDialog
- (reconfigure_response): from reconfigure_clicked.
-
- * mail-mt.c (mail_msg_check_error): gnome -> gtk dialog
- (error_response): renmae from error_gone. destroy widget on any
- response.
-
- * mail-offline-handler.c (impl_finalise): renamed from
- impl_destroy since thats what it should be anyway.
-
- * mail-ops.c: removed utf8 widget conversion & camel_object_un/ref
- casts.
-
- * mail-preferences.c (mail_preferences_get_type): glib2'ised.
-
- * mail-search.c (mail_search_finalise): renmaed from destroy &
- properly chain.
- (mail_search_get_type): glib2 & make gtkdialog parent.
- (entry_run_search): run search when entry activated. not sure if
- gtkdialog has anohter way to do this on an arbitrary widget.
-
- * mail-send-recv.c (dialogue_response): renamed from clicked. Use
- gtkdialog.
-
- * mail-session.c (request_password_deleted): removed, redundant.
- (pass_response): rename from pass_got, changed for gtkdialog.
- (user_message_destroy): Removed, redundant.
- (user_message_response): Renamed from user_message_clicked.
-
-2002-11-11 Not Zed <NotZed@Ximian.com>
-
- * mail-stream-gtkhtml.c (mail_stream_gtkhtml_class_init): dont use
- get_global_classfuncs, just get the type
-
- * mail-tools.c: converted gnome2 api's.
-
- * mail-vfolder.c (vfolder_editor_response): clicked->response.
- (vfolder_editor_destroy): Removed.
- (vfolder_edit): gtk dialog api
- (edit_rule_response): clicked->response.
- (vfolder_edit_rule): gnomedialog->gtkdialog.
- (vfolder_gui_add_rule): "
- (new_rule_clicked): clicked->response
-
-2002-11-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c: Half way ported. I'll finish the rest later.
-
- * mail-autofilter.c: Ported.
-
- * mail-account-gui.c: Ported.
-
- * mail-account-editor.c: Ported.
-
- * folder-browser-ui.c: Ported.
-
- * folder-browser-factory.c: Ported.
-
- * folder-browser.c: Ported.
-
- * e-searching-tokenizer.c: Roughly ported.
-
-2002-11-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * *.glade: Converted to libglade-2's format.
-
-2002-11-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-composer-prefs.c: Ported.
-
-2002-10-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser.c (folder_browser_query_changed): No longer need
- to check for a CLEAR_ID.
-
-2002-10-28 Larry Ewing <lewing@ximian.com>
-
- * mail-format.c (handle_multipart_mixed): instead of bailing with
- an assertion dump the body.
-
-2002-10-27 Larry Ewing <lewing@ximian.com>
-
- * mail-display.c (fetch_next): don't queue the action until we've
- added ourselves to the active list, because the fetch_done
- callback can fire immediately and we'll end up queueing something
- that has already been destroyed.
-
-2002-10-24 Jeffrey Stedfast <fejj@ximian.com>
-
- Update the upgrade script to handle the new url format introduced
- with NotZed's most recent commits.
-
- * upgrade-mailer.c (mailer_upgrade): Save an encoded version of
- the namespace too, for use later.
- (si_free): Free the encoded namespace too.
- (imap_url_upgrade): Use the encoded namespace when creating the
- new url.
- (shortcuts_upgrade_xml_file): Upgrade the default: urls. Fixes bug
- #32127.
-
-2002-10-25 Not Zed <NotZed@Ximian.com>
-
- * mail-config.c (mail_config_uri_renamed): Always strdup the new
- key in the threaded/preview hash/always free the working copy.
- For #32799.
-
-2002-10-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-display.c (write_data_to_file): Use the mode 0666 when
- creating a new file and let the user's umask handle permissions.
-
- * folder-browser.c (message_list_drag_data_get): When using open()
- with the O_CREAT flag, we need to pass a mode argument. Also use
- O_EXCL.
-
-2002-10-24 Not Zed <NotZed@Ximian.com>
-
- * subscribe-dialog.c (fe_got_children): Use a hashtable to only
- insert nodes we dont have already, rather than relying on the
- scanning logic. Also, only re-sort this tree level once done
- rather than on each insert.
- (folder_etree_init): Setup hash to track nodes setup.
- (folder_etree_clear_tree): Reset hash.
- (fe_destroy): Free hash.
-
-2002-10-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser.c (folder_browser_query_changed): Only perform
- the search if it is either a clear or advanced search.
-
-2002-10-22 Mike Kestner <mkestner@ximian.com>
-
- * mail-callbacks.c (transfer_msg): pass fb->uri to the folder
- selection dialog so the current folder is selected on display.
- "fixes" 15966.
-
-2002-10-21 Dan Winship <danw@ximian.com>
-
- * upgrade-mailer.c (mailer_upgrade): Fix the transport URL on any
- Exchange accounts. Fixes #30209, which is to say that it fixes
- #28490 correctly.
-
-2002-10-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-tools.c (mail_tool_quote_message): Strip the signature from
- the body-text. Fixes bug #5529.
-
-2002-10-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (handle_multipart_signed): Don't need to pass a
- path to camel_gpg_context_new () anymore.
- (mail_get_message_body): Same here.
- (handle_multipart_encrypted): Use camel_gpg_context_new () instead
- of mail_crypto_get_pgp_cipher_context ().
-
- * mail-preferences.c (mail_preferences_construct): There's no
- security tab anymore.
- (mail_preferences_apply): No need to save any pgp config data,
- there's nothing to configure!
-
- * mail-crypto.c (mail_crypto_get_pgp_cipher_context): Updated to
- not pass a pgp path into camel_gpg_context_new ().
-
- * mail-config.c (mail_config_clear): No need to free a pgp_path
- variable anymore, we don't need one.
- (config_read): Don't read in a pgp-path or pgp-type anymore.
- (mail_config_write_on_exit): Don't save a pgp-path or pgp-type
- anymore, we don't use them.
- (pgpopen): Removed.
- (pgpclose): Removed.
- (mail_config_pgp_type_detect_from_path): Removed.
- (auto_detect_pgp_variables): Removed.
- (mail_config_get_pgp_type): Removed.
- (mail_config_set_pgp_type): Removed.
- (mail_config_get_pgp_path): Removed.
- (mail_config_set_pgp_path): Removed.
-
-2002-10-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (mail_generate_reply): If mode == REPLY_LIST
- and the mlist is "" (we only checked NULL before), change the mode
- to REPLY_ALL so that we don't accidently reply to the user's
- address. Fixes bug #28735
-
-2002-10-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (mail_generate_reply): If we are trying to
- reply to a list, first check that we can by getting the mlist
- token (makes it easier to fix the mem leak). If not, then change
- the mode to REPLY_ALL. If we can reply to list, the make sure we
- free the CamelMessageInfo when we're done so we don't leak.
-
-2002-10-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-session.c (main_get_filter_driver): Add the new-mail-notify
- rule to the filter driver before adding the user defined filter
- rules so that we can be sure that the new-mail-notify rule gets
- invoked. Fixes bug #32328.
-
- * mail-composer-prefs.c (mail_composer_prefs_new_signature): Make
- sure that name[0] cannot ever be NULL. Should maybe fix bug
- #32230.
-
-2002-10-15 Dan Winship <danw@ximian.com>
-
- * upgrade-mailer.c (shortcuts_upgrade_xml_file): Change the type
- in LDAP shortcuts from "ldap-contacts" to "contacts/ldap". Rewrite
- this to use libxml since that was easier than trying to make the
- old code do both kinds of changes at once.
-
-2002-10-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config-druid.c (management_prepare): Only set an account
- name if one doesn't already exist. Also use the
- e_utf8_gtk_entry_get/set_text functions since account names are
- supposed to be in UTF8. Fixes bug #31891.
-
-2002-10-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser.c (main_folder_changed): Don't do anything if the
- message_list is NULL (this means the FolderBrowser has been
- destroyed). Fixes bug #32002.
-
-2002-10-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * component-factory.c (storage_remove_folder): The CamelFolderInfo
- that we get back has nodes for all parent folders, so do not
- delete all folders that have nodes in the returned tree. Instead,
- descend into the tree until we find the folder we want to delete
- and start deleting from there.
-
-2002-10-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-signature-editor.c (mail_signature_editor): Mark a string
- for translation, fixes bug #31942. Thanks to kmaraas@gnome.org for
- this patch.
-
- * mail-offline-handler.h: Don't #include config.h here. Fixes bug
- #31941.
-
-2002-10-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-composer-prefs.c (spell_load_values): Don't mark "en" for
- translation. Fixes bug #31788.
-
- * mail-config.glade: Removed a "xxxxxxxxxxx" string so that
- translators don't need to translate it. It was only a filler
- string. Fixes bug #31789.
-
-2002-10-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (mail_generate_reply): Don't default 'me' to
- the source account until after we've tried to detect the account
- based on recipients. When adding accounts to the account hash, if
- any accounts have identical email addresses, the ones that are
- enabled take precedence over ones that aren't. This will hopefully
- make everyone happy with reply account picking. Fixes bug #31693.
-
-2002-10-01 Larry Ewing <lewing@ximian.com>
-
- * mail-display.c (drag_data_get_cb): add support for dragging the
- content type directly.
- (do_attachment_header): add the target for the mime type to the
- drag source.
- (drag_data_get_cb): silence warning.
-
-2002-10-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config-druid.c (get_fn): Connect to the changed signal for
- the reply_to entry box. Fixes bugs #31553 and #31554.
-
- * mail-composer-prefs.c (spell_setup): Only setup the languages if
- the language_seq is not CORBA_OBJECT_NIL. Fixes bug #31559
- (presumably at least).
-
- * mail-account-gui.c (mail_account_gui_new): Use
- e_utf8_gtk_entry_set_text for the email address and reply-to
- fields. Fixes bug #31555.
-
- * mail-format.c (mail_get_message_body): Handle a
- multipart/encrypted part. Fixes bug #31547.
-
- * upgrade-mailer.c: Shut up some compiler warnings.
-
- * importers/evolution-mbox-importer.c (process_item_fn): Use the
- camel_message_info_new/free functions rather than g_new0 and
- g_free. Also, if we fail to parse a message make sure we don't
- later try to use that message object.
- (get_info_from_mozilla): Use camel_message_info_new and strtoul
- instead of string_to_int.
-
-2002-09-30 Jeffrey Stedfast <fejj@ximian.com>
-
- * subscribe-dialog.c (fe_node_to_shell_path): Removed (useless).
-
-2002-10-01 Ettore Perazzoli <ettore@ximian.com>
-
- [Fix #24732]
-
- * importers/evolution-mbox-importer.c (process_item_fn): Set
- deleted to FALSE when not having Mozilla status headers. Before
- it was being left uninitialized and so there was a pretty good
- chance that its value would be nonzero and hence the message would
- not be imported...
-
-2002-10-01 Not Zed <NotZed@Ximian.com>
-
- * folder-browser.c (on_cursor_activated): cursor activated on
- etable is required to know when the selection changes on a single
- row, update selection changed info with this signal too. Sounds
- like an etable bug to me, but this fixes #29808.
- (folder_browser_gui_init): Hook onto above signal.
-
-2002-09-30 Aaron Weber <aaron@ximian.com>
-
- * mail-signature-editor.c (mail_signature_editor): change
- string to "Enter a name for this signature" on line 372.
-
- * mail-callbacks.c (ask_confirm_for_unwanted_html_mail): change
- HTML-mail warning on 255
-
- * component-factory.c (component_factory_init): change
- "Evolution's foo" to "the Evolution foo" in string on 1078
-
-2002-09-30 Not Zed <NotZed@Ximian.com>
-
- * mail-session.c (request_password): translate prompt from utf8 to
- gtk widget. #31365.
-
-2002-09-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-searching-tokenizer.c: #include <stdlib.h> for alloca
- (searcher_next_token): Changed slightly to make sure that m is not
- NULL before dereferencing it. Also initialise m to NULL so that it
- can't be used uninitialised (NULL is a safe initialised value
- here).
- (build_trie): Same, but for n.
-
-2002-09-26 Dan Winship <danw@ximian.com>
-
- * mail-config.c (impl_GNOME_Evolution_MailConfig_addAccount,
- impl_GNOME_Evolution_MailConfig_removeAccount): Set a timeout to
- call mail_config_write() in 2 seconds. Otherwise changes made by
- this interface would not be saved to disk unless the user also
- changed some other preference.
- (mail_config_write_on_exit): If there's a config_write_timeout
- pending, call mail_config_write() too.
-
-2002-09-25 Dan Winship <danw@ximian.com>
-
- * mail-display.c (mail_display_render): Add a margin around the
- "flag for followup" table so it lines up with everything else.
- Also, don't add "at your earliest convenience" after the flag if
- there's no date set, since that doesn't make any sense for half of
- the flags. ("For Your Information at your earliest convenience").
-
-2002-09-25 Dan Winship <danw@ximian.com>
-
- * component-factory.c (folder_types): add "mail/public". Leave
- "vtrash" as it is rather than renaming it to "mail/vtrash",
- because we want it to behave differently from normal mail folders
- more often than we want it to behave the same.
- (type_is_mail, type_is_vtrash): utility funcs
- (create_view, create_folder, remove_folder, xfer_folder,
- populate_folder_context_menu, unpopulate_folder_context_menu,
- destination_folder_handle_drop, storage_create_folder): Use
- type_is_mail/type_is_vtrash.
- (create_component): Register "New Post" with "mail/public" instead
- of "mail" so it becomes the default New icon for it. (29024)
-
- * mail-callbacks.c (transfer_msg): Use "mail/*" for allowed type.
-
- * message-browser.c (transfer_msg): Likewise.
-
- * mail-account-gui.c (mail_account_gui_new): Use "mail/*" instead
- of "mail" here for sent/drafts allowed type. (?)
-
-2002-09-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * upgrade-mailer.c (imap_url_upgrade): NULL-check si->folders
- before passing it into find_folder so we don't crash. Fixes bug
- #30915.
-
-2002-09-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser-ui.c: Allow users to delete already deleted
- messages, fixes bug #30827.
-
-2002-09-24 Not Zed <NotZed@Ximian.com>
-
- * folder-browser.c (folder_browser_query_changed): Always do a
- search if the query changed. For #31060 & #29625.
-
-2002-09-23 Radek Doulik <rodo@ximian.com>
-
- * mail-config.c (mail_config_signature_run_script): pass name of
- the script as 1st parameter
-
- * mail-composer-prefs.c (sig_add_script_add): fix entry's glade
- name
-
-2002-09-23 Dan Winship <danw@ximian.com>
-
- * mail-signature-editor.c (exit_dialog_cb): Fix non-ANSI switch
- statement.
-
- * mail-account-gui.c (mail_account_gui_auto_detect_extra_conf):
- Likewise.
-
- * mail-composer-prefs.c (spell_load_values): add some dummy
- typedefs to avoid empty macro arguments, which have undefined
- behavior.
-
- * mail-importer.c: #include <sys/types.h> for OS X
-
-2002-09-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-ops.c (save_part_save): Use 0666 as the create mode so that
- the user's umask is used to it's fullest.
-
-2002-09-23 Dan Winship <danw@ximian.com>
-
- * Makefile.am (idldir, idl_DATA): add these and install Mailer.idl
-
-2002-09-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-preferences.c (mail_preferences_construct): Connect signal
- handlers to the GtkHTML preferences so that when the widgets
- change we can update the OK/Apply buttons. Also removed the
- omenuShortcutsType widget reference since this was not being used?
- Fixes bug #30731.
-
-2002-09-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (do_edit_messages): Unset the changed bit on
- the composer and also drop any undo operations (since we loaded
- the message into the composer). Fixes bug #30580.
-
-2002-09-19 Not Zed <NotZed@Ximian.com>
-
- * mail-session.c (main_get_filter_driver): Fix for filter driver
- api change.
-
-2002-09-18 Not Zed <NotZed@Ximian.com>
-
- * mail-config-druid.c (wizard_back_cb): If going back from a page
- past our end (i.e. the final page), jump to the last page we know
- of. For #29293.
-
- * component-factory.c (notify_listener_exception): helper to map a
- camel excpeiton to a listener result.
- (storage_create_folder): Use above to return more meaningful error.
- (storage_remove_folder): "
- (storage_xfer_folder): ". For #28209.
-
-2002-09-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-display.c (mail_display_render): Use e_strftime_fix_am_pm
- here which fixes locale issues as well as working around systems
- that don't support %P (afaik).
-
- * mail-ops.c (prep_offline_do): Cache important messages too.
-
- * mail-composer-prefs.c (d): Disable debugging printf's
-
- * mail-ops.c: fixed a comment
-
-2002-09-13 Dan Winship <danw@ximian.com>
-
- * folder-browser.c (fb_resize_cb): If the vpaned isn't realized,
- don't call mail_config_set_paned_size. Fixes a problem with the
- saved pane size being repeatedly lost (#29933)
-
-2002-09-13 Dan Winship <danw@ximian.com>
-
- * Mailer.idl: rename this from "Mail.idl" so that the generated .h
- file won't overwrite "mail.h" on Mac OS X. Remove some
- never-implemented IDL and add MailConfig_removeAccount.
-
- * Makefile.am: Update for IDL rename
-
- * mail-config.c: #include Mailer.h, not Mail.h
- (impl_GNOME_Evolution_MailConfig_removeAccount): Implement.
-
- * folder-info.c: #include Mailer.h, not Mail.h
-
- * message-list.c: Remove Mail.h include.
-
-2002-09-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * main.c (main): Ignore SIGXFSZ to fix bug #30269.
-
- * upgrade-mailer.c (cache_upgrade_and_free): The new callback
- function for the g_hash_table_foreach which both upgrades the
- cache for that store and then free's the struct _storeinfo
- afterwards.
- (cache_upgrade): Upgrade a cached folder by moving the old cache
- folder into the appropriate new location.
-
-2002-09-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser.c (folder_browser_query_changed): Only abort if
- the user selected ADVANCED_SEARCH, not the other way around. Any
- other menu item and we are supposed to perform an actual
- search. Fixes bug #30183.
-
- * mail-display.c (pixbuf_for_mime_type): check the new gnome-vfs
- icon_filename key. If that fails, fall back to checking
- icon-filename. Also don't leak the fm_icon string and rearranged
- some code.
-
-2002-09-11 Not Zed <NotZed@Ximian.com>
-
- * component-factory.c (configure_folder_popup): Handle file uri's
- too.
-
- * mail-callbacks.c (configure_folder): clear message list before
- calling configure folder.
- (local_configure_done): completion callback to reset message list
- when done.
-
- * mail-local.c (mail_local_reconfigure_folder): changed args to
- accept uri, and done callback.
- (reconfigure_got_folder): moved code to callback which presents
- the configure uri once we have the folder.
-
-2002-09-10 Not Zed <NotZed@Ximian.com>
-
- * component-factory.c: Handle file: as well as vfolder: uri's.
- Pass both to the normal configure_folder callback. For #20849.
-
- * folder-browser.c (got_folder): If we already have a folder, make
- sure we unref/unhook from it. Fixes a crash on exit.
-
- * message-list.c (message_list_hide_clear): clear thread tree
- cache if set.
- (message_list_set_search): Same. For bug #28834.
-
-2002-09-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser-ui.c (folder_browser_ui_scan_selection): Make
- sure that fb->message_list is non-NULL before checking
- fb->message_list->threaded? I guess this'll fix bug #29965.
-
- * mail-callbacks.c (composer_save_draft_cb): NULL-check the ccd
- before reffing it.
- (composer_send_cb): Same.
-
- * upgrade-mailer.c (shortcuts_upgrade_xml_file): Don't look for an
- end quote, instead look for </item> to terminate the uri.
- (shortcuts_upgrade_uri): Hex decode the imap folder name after
- we've constructed the final version of it.
-
-2002-09-08 Dan Winship <danw@ximian.com>
-
- * upgrade-mailer.c (exchange_url_upgrade): Don't modify the URL if
- the path doesn't start with "exchange". (Means it's already a 1.2
- URL.)
- (shortcuts_upgrade_uri): Need to hex-decode exchange URLs here too.
- (shortcuts_upgrade_xml_file): Fix an off-by-one error here (twice)
- so it actually works instead of always claiming shortcuts.xml
- doesn't need to be upgraded.
- (mailer_upgrade): Check the size of the accounts hash rather than
- imap_sources since we have work to do if the user has an exchange
- account but no imap accounts.
-
-2002-09-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * upgrade-mailer.c (upgrade): Sync the database after upgrading
- mailer stuff.
- (imap_url_upgrade): Since we need 'p' if we fail to find the
- folder, don't g_free it until later.
- (hex_encode): Don't forget to increment inptr after hex encoding a
- character.
- (exchange_url_upgrade): Apprently exchange uri's are rebelious and
- do not want to be hex encoded like every other url, so hex decode
- the folder names here before concatenating them onto the base url.
-
-2002-09-05 Jeffrey Stedfast <fejj@ximian.com>
-
- All this snot is to fix bug #29930. What I think was happening was
- that the composer's destroy callback got fired off before the
- async callback did.
-
- * mail-callbacks.c (ccd_new): New convenience function to malloc a
- new ccd.
- (ccd_ref): ccd is now ref_counted (it needs to be) so we now have
- this.
- (ccd_unref): And we need this now too of course.
- (composer_destroy_cb): composer's new destroy callback function -
- unref's the ccd.
- (composer_send_queued_cb): unref the ccd.
- (composer_send_cb): ref the ccd here.
- (save_draft_done): unref the ccd.
- (composer_save_draft_cb): ref the ccd.
-
-2002-09-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * upgrade-mailer.c (imap_url_upgrade): Hex decode the folder names
- when searching for them in the memory buffer, and re-hex encode
- them when combining them with the rst of the URL.
- (mailer_upgrade): Instead of reading in the storeinfo file as raw
- binary data, use the camel-file-utils to correctly parse it.
-
-2002-09-05 Anna Marie Dirks <anna@ximian.com>
-
- * GNOME_Evolution_Mail.oaf.in: Changed the descriptions of the
- fonts, mail, accounts and composer pages of the settings dialog to be
- hopefully more descriptive and less confusing.
-
-2002-09-04 Ettore Perazzoli <ettore@ximian.com>
-
- * upgrade-mailer.c (upgrade): Return FALSE here.
- (get_base_url): Add a cast.
-
- * component-factory.c (storage_xfer_folder): Removed unused
- variables.
-
- * Makefile.am: Rename upgrade-mailer to evolution-mail-upgrade.
-
-2002-09-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * Makefile.am: Add upgrade-mailer.c to the build.
-
- * upgrade-mailer.c: New program to upgrade configuration files
- from 1.0 to 1.2.
-
-2002-09-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (mail_generate_reply): Made sure
- account->id->address is not NULL before adding it to the hash
- table. This is to prevent bug #29877 from crashing, although it is
- still an invalid error condition.
-
-2002-09-04 Dan Winship <danw@ximian.com>
-
- * folder-info.c (get_prop): Remove the "Get!" printf.
- (set_prop): Likewise for "Set!"
-
-2002-09-04 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-account-gui.c (mail_account_gui_save): Remove unused
- variable.
-
- * component-factory.c (unpopulate_folder_context_menu): New.
- (create_component): Pass it to evolution_shell_component_new().
-
-2002-09-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser.c (mark_as_seen_cb):
- (mark_as_unseen_cb):
- (mark_as_important_cb):
- (mark_as_unimportant_cb): New callback functions that wrap the
- mail-callbacks versions of mark_as_<whatever>. Thanks to Owen
- Taylor for this fix.
-
-2002-09-04 Not Zed <NotZed@Ximian.com>
-
- * component-factory.c (storage_xfer_folder): Dont translate / to
- dir_sep anymore, we always use /.
-
-2002-08-29 Peter Williams <peterw@ximian.com>
-
- * folder-browser-ui.c: Add HAS_FLAGS to a few miscellaneous commands
- that don't use IS_xMESSAGE.
-
-2002-08-28 Dan Winship <danw@ximian.com>
-
- * GNOME_Evolution_Mail.oaf.in: Add an
- evolution:shell_component_launch_order and rename
- evolution:shell_component_icon.
-
-2002-08-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-display.c (make_safe_filename): Fix some broken logic here,
- `p = strrchr (path, '/') + 1` will *never* be NULL!! If the
- strrchr returns NULL, then that expression will evaluate to 0x1!!
-
- * main.c (main): We now always need to init gconf for our later
- call to e_proxy_init() which initialises the proxy settings for
- soup to use.
-
-2002-08-28 Peter Williams <peterw@ximian.com>
-
- * folder-browser-ui.c (default_ui_nodes): Add some new flags for
- sensitizing nodes based on the flags of the currently selected
- messages.
- (folder_browser_ui_add_message): Reset the sensitivity cache when
- we re-add UI items.
- (folder_browser_ui_add_list): Same.
- (folder_browser_ui_add_global): Same.
- (fbui_sensitise_item): Only cache the sensitivity in the hash
- table if we actually change it.
- (folder_browser_ui_scan_selection): New function, getting the bulk
- of the contents of folder_browser_ui_set_selection_state. Now
- with code to iterate over the currently selected messages and
- check their flags so we can sensitize based on them.
- (folder_browser_ui_set_selection_state): Now just set the
- selection state if necessary and pass off to _scan_selection. Don't
- skip of we're trying to go from SELSTATE_SINGLE to SELSTATE_SINGLE,
- eg, as the flags of the selected messages may have changed.
-
- * folder-browser-ui.h: Prototype folder_browser_ui_scan_selection.
-
- * folder-browser.c (main_folder_changed): Call
- folder_browser_ui_scan_selection as the flags on a selected
- message may have just changed.
-
-2002-08-28 Peter Williams <peterw@ximian.com>
-
- * mail-format.c (component_supports): Also check that the component
- has PersistStream.
- (mail_lookup_handler): Get a list of all components and go with the
- first matching one.
-
-2002-08-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * message-list.c (regen_list_regen): Pass
- mail_config_get_thread_subject() as the third argument to
- camel_folder_thread_messages_new().
-
- * mail-config.c (config_read): Read in the thread_by_subject
- config option.
- (mail_config_write_on_exit): Save the thread_by_subject config
- option.
- (mail_config_get_thread_subject): New function to get the
- thread_subject value.
- (mail_config_set_thread_subject): New function to set the
- thread_subject value.
-
-2002-08-27 Radek Doulik <rodo@ximian.com>
-
- * mail-signature-editor.c: removed tip frame
-
-2002-08-27 Jeffrey Stedfast <fejj@ximian.com>
-
- Fixes for bug #4480
-
- * folder-browser-factory.c (control_activate): Call
- folder_browser_reload() instead of refreshing the folder
- ourselves.
-
- * folder-browser.c (folder_browser_reload): New convenience
- function. If the folder-browser's folder is already loaded,
- refresh the contents, otherwise if the folder has not been loaded
- - try loading the folder again (it may have failed to open last
- time for some reason?).
-
-2002-08-27 Peter Williams <peterw@ximian.com>
-
- * mail-format.c (handle_text_plain_flowed): Fix bug #29493.
-
-2002-08-26 Peter Williams <peterw@ximian.com>
-
- * mail-callbacks.c (toggle_flags): Logic change for when untoggling
- a message from deleted-dom.
-
-2002-08-26 Peter Williams <peterw@ximian.com>
-
- * mail-ops.c (transfer_messages_transfer): Enforce the mailer policy
- that deleted messages are marked as seen. Fixes 29448. This could
- go in camel_folder_transfer_messages_to, but I don't think we
- necessarily want to enforce that policy for Camel in general.
-
-2002-08-23 Peter Williams <peterw@ximian.com>
-
- Address most of bug #4940. Fails on the last page of the add account
- dialog as called from the prefs dialog due to EvolutionWizard being
- weird.
-
- * mail-config-druid.c (goto_next_page): New function, little
- wrapper around wizard_next_cb. Also potential place to work around
- EvolutionWizard weirdness in the future.
- (identity_activate_cb): New function, calls goto_next_page if
- identity page is complete.
- (source_activate_cb): Analogous.
- (transport_activate_cb): Analogous.
- (management_activate_cb): Analogous.
- (get_fn): Hook up the activate signals of the various GtkEntries
- to the correct callbacks above.
- (management_check): Return the result of the check so that
- management_activate_cb can use it.
-
-2002-08-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-tools.c (mail_tool_restore_xevolution_headers): Reset the
- X-Evolution-PostTo header.
- (mail_tool_remove_xevolution_headers): Remove the
- X-Evolution-PostTo header.
-
-2002-08-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-folder-cache.c (ping_store): Spawn a new thread to ping the
- server but only if it is connected.
- (ping_cb): This needs to return TRUE so the timeout keeps getting
- called.
-
-2002-08-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-session.c (class_init): Don't bother overloading the
- timeout virtual methods since they don't exist anymore.
-
- * mail-folder-cache.c (mail_note_store): Register a ping timeout
- callback to ping each store to keep the connections alive.
-
-2002-08-20 Radek Doulik <rodo@ximian.com>
-
- * mail-callbacks.c (do_mail_print): be sure that widget is
- realized so that e_utf8_from_gtk_string works properly
- (footer_print_cb): save/restore
-
-2002-08-20 Mike Kestner <mkestner@ximian.com>
-
- * folder-browser-ui.c (folder_browser_ui_setup_view_menus): guard
- against the view_instance disappearing during earlier CORBA work.
-
-2002-08-20 Peter Williams <peterw@ximian.com>
-
- * message-list.c (search_func): Once we hit the target node,
- update the cursor_uid if it's set. Fixes #29085.
-
-2002-08-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-preferences.c (mail_preferences_apply): Fix a
- copy/paste-o. Use the pgp_path GnomeFileEntry widget rather than
- the notify_sound_file GnomeFileEntry widget for the pgp path stuff
- :-)
-
-2002-08-19 Dan Winship <danw@ximian.com>
-
- * mail-account-gui.c (mail_account_gui_setup): source_type_changed
- may try to change the transport optionmenu (incorrectly in this
- case), so don't call gtk_option_menu_set_history on it until after
- emitting "activate" on the source type menuitem.
- (mail_account_gui_save): Fix the saving of STORE_AND_TRANSPORT
- transports and add a comment so it doesn't get mistakenly unfixed
- again.
-
-2002-08-09 Peter Williams <peterw@ximian.com>
-
- * subscribe-dialog.c: Change this into a GnomeApp so we get a
- statusbar and the dialog is a little more comprehensible.
-
- * subscribe-dialog.c: (struct _FolderETree): Add members for
- tracking activity callback information.
- (get_short_folderinfo_got): Notify the activity callback.
- (subscribe_get_short_folderinfo): Here too.
- (folder_etree_init): Initialize the activity level to 0.
- (folder_etree_construct): Take new parameters of our activity
- callback and user_data.
- (folder_etree_new): Here too.
- (store_data_get_widget): Take the parameters here and pass them
- on.
- (sc_close_pressed): New callback for when close button is pressed.
- (sc_activity_timeout): New timeout to move the activity bar when
- folders are being scanned.
- (sc_activity_cb): If activity_level > 0, start the progressbar
- moving and set the status.
- (menu_item_selected): Pass the callback to store_data_get_widget.
- (subscribe_dialog_construct): Load some more widgets and adapt to
- some changes in the XML. Also connect the close button signal and
- initialize the progress bar's settings.
-
- * mail-callbacks.c (manage_subscriptions): Don't call
- gnome_dialog_set_close on it anymore since it's no longer a gnome
- dialog.
-
-2002-08-14 Dan Winship <danw@ximian.com>
-
- * mail-config.glade: Add a "don't sign meeting requests" option to
- the security pane, since some versions of Outlook won't recognize
- pgp-signed meeting requests. Sigh.
-
- * mail-config.c (account_copy, config_read, mail_config_write):
- Handle pgp_no_imip_sign.
-
- * mail-account-gui.c (mail_account_gui_new,
- mail_account_gui_save): Setup/save "don't sign meeting requests"
- button.
-
-2002-08-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (forward_message): Removed an unused variable.
-
- * mail-account-editor.c (construct): Set the focus on the Account
- Name entry widget. Fixes bug #10350.
-
-2002-08-12 Dan Winship <danw@ximian.com>
-
- * mail-display.c (on_url_requested): Replace no-longer-existent
- e_book_query_address_locally with e_book_query_address_default.
-
-2002-08-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (forward_message): Use mail_get_messages()
- instead of mail_get_message().
- (do_forward_non_attached): Fixed to work as a callback from
- mail_get_messages().
- (do_edit_messages): Only set the drafts_folder and drafts_uid if
- the folder-browser is a drafts folder. Fixes bug #28863.
-
-2002-08-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (save_draft_done): If the ccd is NULL, create a
- new ccd, disconnect the old signal handlers, and then reconnect
- the signal handlers using the non-NULL ccd as the user_data.
- (composer_send_queued_cb): Same, but only if the queue append
- operation failed.
-
-2002-08-09 Dan Winship <danw@ximian.com>
-
- * mail-callbacks.c (composer_send_queued_cb, save_draft_done):
- Handle the fact that ccd may be NULL (if the composer was created
- via CORBA). Quick temporary fix for sending meeting requests.
-
-2002-08-09 Peter Williams <peterw@ximian.com>
-
- * mail-config.c (mail_config_uri_renamed): When a URI is changed,
- try to copy over threaded view settings, preview pane shown
- settings, headers, hide state, tree expansion, and GAL view files.
- (uri_to_evname): New utility function.
-
-2002-08-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-gui.c (mail_account_gui_save): Instead of comparing
- old/new CamelStore objects, just compare their account urls since
- changing params would still result in the same CamelStore
- object. Fixes bug #18539.
-
- * mail-callbacks.c (delete_msg): Don't check permanent_flags for
- the CAMEL_MESSAGE_DELETED bit here, if we are gonna check to see
- if the folder supports the permanent flag then there are better
- places to check this. Besides, it was the cause for bug #28038.
-
-2002-08-08 Not Zed <NotZed@Ximian.com>
-
- * folder-browser.c (folder_browser_toggle_threads): Force a
- refresh of the menu sensitivity when the thread state changes.
-
-2002-08-07 Not Zed <NotZed@Ximian.com>
-
- * folder-browser-ui.c: Added EditSelectThread to only enable
- threaded mode if threaded is on. For #19941. Added some macro's
- to simplify the table.
- (folder_browser_ui_set_selection_state): Implement IS_THREADED
- mask.
-
-2002-08-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (composer_send_queued_cb): Delete the Draft
- item that this was edited from if that is the case as well as
- setting any replied flags if we need to. Fixes bug #18171.
- (save_draft_done): Not only delete the previously saved draft, but
- also set any PostSendData on the message being replied to or
- whatever. Fixes bug #20224.
- (compose_msg): Create an empty callback data struct which is now a
- MUST.
- (mail_reply): Fill in the new post_send_data info and also move
- the creation of the post_send_data to AFTER the creation of the
- composer widget so we don't leak on fail.
- (forward_get_composer): Pass an empty post_send_data structure as
- the user_data to the signal callbacks.
- (send_to_url): Same.
- (post_to_url): Here too.
- (redirect_get_composer): And here.
- (do_edit_messages): We no longer use the evil kludge of setting
- data on the composer object to denote the drafts_uid etc, this is
- now part of the post_send_data struct.
-
-2002-08-07 Peter Williams <peterw@ximian.com>
-
- * component-factory.c (request_quit): If outbox_folder is NULL,
- don't try and get its message count (this should never happen, but
- has.)
-
-2002-08-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-local.c (save_metainfo): No need to save a temporary file
- first anymore since I updated e_xml_save_file() to do this for us.
-
-2002-08-07 Not Zed <NotZed@Ximian.com>
-
- * folder-browser-ui.c: Enable the view type menu's always. See
- #20901.
-
- * message-tag-followup.c (target_date_new): Set the week start day
- from the calendar prefs, do same for 24 hour format. See #23423.
-
- * mail-config.c (config_read): Added week_start_day from
- Calendar/Display config. Also time_24hour format.
- (mail_config_get_week_start_day):
- (mail_config_get_time_24hour): And read-only accessors.
-
-2002-08-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-local.c (save_metainfo): Save to a temporary file first
- using e_xml_save_file rather than xmlSaveFile, if the save
- completes successfully then rename it to the real filename. Make
- sure that errno is saved.
- (mls_get_folder): save_metainfo doesn't return -1 on fail, it
- returns FALSE.
-
-2002-08-06 Not Zed <NotZed@Ximian.com>
-
- * folder-browser.c (folder_browser_search_menu_activated): Set the
- rule name to include the search string, for #10979.
-
- * message-list.c (message_list_hidden): Only count hidden messages
- which are in the folder. Should probably maintain hidden table
- better. For #4334.
-
- * mail-ops.c (filter_folder_filter): Unref the driver before
- returning to main thread, so any closing operations are handled
- async (as in fetch_mail_fetch()), for #28072.
- (fetch_mail_fetch): Check driver != NULL, if folder_filter freed
- it already.
-
- ** fixes for #24605.
-
- * mail-vfolder.c (vfolder_gui_add_from_mlist): Removed.
-
- * folder-browser.c (filter_type_uid,vfolder_type_uid): Changed to
- accept args directly. Fixed callers.
- (filter_mlist_uid,vfolder_mlist_uid): Use filter_type_uid instead
- of mlist variant.
- (vfolder_type_current): new function to handle setup of vfolders
- from the main menu. It now uses the vfolder_type_uid function the
- same as the popup.
- (vfolder_subject, vfolder_sender, vfolder_recipient,
- vfolder_mlist): Changed to use vfolder_type_current.
- (filter_type_current): Similar for filters.
- (filter_subject, filter_sender, filter_recipient,
- filter_mlist): Changed to use filter_type_current.
-
- * mail-autofilter.c (rule_from_message): Handle AUTO_MLIST type.
- (rule_from_mlist):
- (vfolder_rule_from_mlist):
- (filter_rule_from_mlist): Removed.
- (filter_gui_add_from_mlist): Removed.
-
- * mail-autofilter.h: Added AUTO_MLIST type.
-
-2002-08-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-mt.c (mail_msg_check_error): If we are not in interactive
- mode, don't display error dialogs.
-
- * component-factory.c (interactive_cb): Updated to use the new
- function mail_session_set_interactive().
- (owner_unset_cb): Same here.
-
- * mail-session.c (mail_session_set_interactive): Renamed from
- mail_session_enable_interaction().
- (mail_session_get_interactive): New function to get the
- interactive state.
-
-2002-08-01 Peter Williams <peterw@ximian.com>
-
- * mail-offline-handler.c (struct _sync_info): Add a GHashTable pointer
- so we can remove the info once the operation is done.
- (sync_done): Remove the info from the hash table.
- (impl_syncFolder): Save the table to which the info was added.
-
-2002-08-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * component-factory.c (user_create_new_item_cb): Updated to call
- post_to_url if the id is "post".
-
- * mail-callbacks.c (post_to_url): New function so that we don't
- need a FolderBrowser to post a new message.
- (post_message): Call post_to_url since they shared so much code.
-
-2002-08-05 Dan Winship <danw@ximian.com>
-
- * mail-callbacks.c (mail_reply): Only reply to all or reply to
- list, set CAMEL_MESSAGE_ANSWERED_ALL too.
-
-2002-08-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * message-tag-followup.c (construct): Set the default flag to
- Follow-Up.
-
- * mail-display.c (mail_display_render): Updated to use the new
- Follow-Up tags. Instead of storing a string containing the
- follow-up tag value, we now have to store the CamelMessageInfo.
- (mail_display_destroy): Unref the folder and the message-info.
-
- * folder-browser.c (followup_tag_complete): No longer needed.
- (on_right_clicked): Use the individual follow-up tags to decide
- whether or not to enable something.
-
- * message-list.c (ml_tree_value_at): Update to use the new
- Follow-Up tags.
-
- * mail-callbacks.c (flag_for_followup): Update to use the new
- MessageTagEditor API.
- (tag_editor_ok): Update this too.
- (flag_followup_completed): Updated this too.
- (flag_followup_clear): Set all the follow-up tag values to "".
-
-2002-08-01 Ettore Perazzoli <ettore@ximian.com>
-
- * component-factory.c (create_component): Use
- "post-message-16.png" as the icon for the "New Message Post" item.
-
-2002-08-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-gui.c (mail_account_gui_save): If we are editing an
- account, then get the CamelStore associated with the old account
- info and save it in a struct that we will pass along as user_data
- to mail_get_store() for the new account url.
- (add_new_store): If the old account and new account stores are
- identical, then don't remove the old store from the folder
- tree. If they are not the same, then remove the old store and add
- the new store to the folder tree.
-
-2002-07-31 Peter Williams <peterw@ximian.com>
-
- * mail-folder-cache.c: Add another bitfield "unsub"
- (real_flush_updates): If unsubscribing, manually remove the folder
- from the shell.
- (unset_folder_info): Add another parameter which is used to set
- the unsub member.
- (store_folder_unsubscribed): Pass true for @unsub.
- (unset_folder_info_hash): Pass false for @unsub.
-
- * subscribe-dialog.c (fe_done_subscribing): Don't notify the shell
- here. The folder cache does it now, and it was broken to make the
- CORBA call in another thread anyway.
-
-2002-08-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (setup_mime_tables): Don't setup a handler for
- multipart/digest.
- (handle_multipart_digest): Removed.
-
-2002-07-31 Jeffrey Stedfast <fejj@ximian.com>
-
- * Makefile.am: Removed folder-browser-window from the build.
-
- * folder-browser-window.[c,h]: Removed.
-
- * mail-callbacks.c (view_digest): Removed.
-
- * mail-display.c (mail_display_digest_clicked): Removed.
- (on_link_clicked): Don't handle digest: urls anymore.
-
-2002-07-31 Ettore Perazzoli <ettore@ximian.com>
-
- * component-factory.c (create_component): Put "New Mail Message"
- before "New Message Post" instead of vice versa.
-
-2002-07-31 Ettore Perazzoli <ettore@ximian.com>
-
- * component-factory.c (create_component): Pass "mail" as
- @folder_type to
- evolution_shell_component_add_user_creatable_item().
-
-2002-07-31 Not Zed <NotZed@Ximian.com>
-
- * mail-display.c: Added global cameldatacache for managing remote
- image cache.
- (fetch_remote): Lookup data in cache first, use that if available,
- or setup a new cache item.
- (fetch_data): Write any retrieved data to cache as well as html
- stream.
- (fetch_free): Unref cache stream.
- (fetch_done):
- (fetch_cancel): If failed/cancelled, remove cache items so they
- dont foul the result. Probably need a header in cache items to
- guarantee this, but this is ok for now.
- (mail_display_class_init): Setup cache structure. Also ensure
- globals are initialised at-most once.
-
-2002-07-30 Radek Doulik <rodo@ximian.com>
-
- * mail-config.c (mail_config_signature_set_name): save signature
- here to remember the changed name
-
-2002-07-30 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (write_date): Use camel_medium_get_header to get
- the date header rather than getting the time_t and converting it
- into a string.
-
-2002-07-29 Not Zed <NotZed@Ximian.com>
-
- * mail-display.c (mail_display_init): setup private data.
- (mail_display_destroy): cancel any outstanding fetches, and free
- private data.
- (mail_display_set_message): Cancel any outstanding fetches.
- (fetch_cancelled):
- (fetch_next):
- (fetch_remote):
- (fetch_data):
- (fetch_free):
- (fetch_cancel):
- (fetch_done): Implement, used to use soup to download remote
- images.
- (load_http): Removed.
- (on_url_requested): When requesting a http* url, use the
- fetch_remote call above.
-
- * mail-display.h (struct _MailDisplay): Added priv(ate) member.
-
-2002-07-29 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-session.c (request_password): Left-align the check button's
- label.
-
-2002-07-29 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-gui.c (mail_account_gui_new): Get the "Reset
- Defaults" folders button and connect to the clicked signal.
- (default_folders_clicked): Set the default uris on for the Drafts
- and Sent folders.
-
-2002-07-26 Peter Williams <peterw@ximian.com>
-
- * mail-offline-handler.c (storage_go_online): Call mail_note_store
- to get the folders to be updated and new ones to be inserted into
- the tree.
-
-2002-07-29 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-session.c (request_password): Add an accelerator for the
- "Remember this password" checkbox.
-
-2002-07-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-ops.c (mail_execute_shell_command): No real need for this
- to be an async function sync we are going to call
- gnome_execute_async anyway.
-
- * component-factory.c (create_component): Add a new menu item for
- posting to the New toolbar button thing.
- (destination_folder_handle_drop): Don't use a NULL exception when
- we already have one to use anyway.
- (got_folder): Move the *fp = folder; to before the check to make
- sure folder != NULL, this makes it so that if getting a folder
- fails at least have have a known value to look out for (NULL)
- rather than some random garbage.
-
-2002-07-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config-druid.c (create_label): Make the gtk label line-wrap
- instead of us forcing \n's in the label, that was just
- wrong. Fixes bug #10320.
-
- * mail-callbacks.c (composer_send_cb): Make sure that the url
- isn't an empty string and also make sure to free it when we're
- done with it. Also check that we got the folder - if it is NULL,
- then just abort.
-
-2002-07-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.c (mail_config_folder_to_safe_url): Use
- mail_tools_folder_to_url().
-
- * mail-tools.c (mail_tools_folder_to_url): New convenience
- function to take a CamelFolder and return the URL associated with
- it.
-
- * mail-callbacks.c (composer_get_message): Pass in a 'post'
- argument so we know whether or not we can ignore a NULL set of
- recipients.
- (composer_send_cb): Default send->send to TRUE unless we are in
- Post-To mode, in which case set send->send to FALSE (since we'll
- have nothing to send). Also, if we are in Post-To mode, append to
- the folder the user wants to post to rather than appending to
- Outbox.
- (composer_send_queued_cb): Only queue a send thread if send->send
- is TRUE (ie, the composer was not in Post mode - if it was in Post
- mode, then the message post has already been saved in the correct
- folder so there is nothing to do).
- (post_message): New function to create an empty composer widget in
- Post mode.
- (post_reply): New function that calls mail_reply with the new mode
- of REPLY_POST.
- (mail_generate_reply): If the mode is REPLY_POST, create a Post
- composer widget otherwise create a normal composer widget.
-
-2002-07-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-ops.c (mail_execute_shell_command): Update to take argc and
- argv arguments since this is the new definition for the
- CamelFilterDriverShellFunc.
-
- * mail-session.c (main_get_filter_driver): Updated for the renamed
- function.
-
- * mail-display.c (link_open_in_browser): Make sure that the
- html->pointer_url is non-NULL. Should fix bug #28159 (this seems
- to be the only questionable way for a NULL url to be passed into
- on_link_clicked).
-
-2002-07-24 Peter Williams <peterw@ximian.com>
-
- * mail-callbacks.c (do_mail_fetch_and_print): Check for whether
- current_message is NULL as well as preview_shown (if we tried to
- load the message and failed, as may happen in offline mode.)
- (done_message_selected): Only print if we actually got the message.
-
- * folder-browser.c (folder_browser_query_changed): New function,
- use this on the query_changed signal. Don't run the search if
- they only changed the dropdown.
-
-2002-07-23 Peter Williams <peterw@ximian.com>
-
- * mail-ops.c (get_store_get): Call camel_session_get_service
- instead of camel_session_get_store, as _get_store calls
- _get_service_connected which is not what we want to do on startup.
- (set_offline_do): Rework the logic here. It was failing when
- trying to go online with a disco store that couldn't work offline.
-
- * mail-folder-cache.c (mail_note_store): If we're using an offline
- (well, non-online) disco store that cannot work offline, don't get
- the folderinfo as that will fail.
-
-2002-07-24 Radek Doulik <rodo@ximian.com>
-
- * mail-composer-prefs.c (sig_add): use
- mail_config_get_send_html for html format flag
-
- * mail-account-gui.c (sig_add_new_signature): use
- mail_config_get_send_html for html format flag
-
-2002-07-24 Not Zed <NotZed@Ximian.com>
-
- * mail-folder-cache.c (real_flush_updates): Propagate name changes
- or removes to the mail config. #15951. Doesn't enitrely work for
- local folders, because they are never renamed only removed and
- added thanks to the shell's api.
-
- * mail-config.c (mail_config_uri_renamed): If a store folder is
- renamed, this checks for any config that needs updating, so far
- sent and drafts folders.
- (mail_config_uri_deleted): Same, for deleted folders.
-
-2002-07-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (handle_multipart_encrypted): Commit a fix that I
- thought I committed a while ago:
-
- * mail-format.c (handle_multipart_encrypted): Pass the correct
- pointer into camel_multipart_encrypted_decrypt().
-
- * mail-ops.c (mail_send_message): Rework the logic a bit. If we
- find an account, use that to set the sent_folder_uri and the
- transport_url, otherwise use the X-Evolution-Transport and
- X-Evolution-Fcc headers.
-
-2002-07-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * message-tag-followup.c (message_tag_followup_decode): Don't pass
- the length of the tag name into strncmp, instead use the length up
- to the first ':' in the value string.
-
-2002-07-22 Peter Williams <peterw@ximian.com>
-
- * folder-browser.c (folder_browser_gui_init): Also perform a search
- on the query_changed signal, which is what gets emitted when the
- Search menu is used.
-
-2002-07-24 Not Zed <NotZed@Ximian.com>
-
- * component-factory.c (owner_set_cb): Initialise the standard
- uri's before doing anything else.
-
- * mail-vfolder.c (uri_is_ignore): Return true if the uri is any
- sent, drafts or outbox folder uri.
- (mail_vfolder_add_uri): Dont automagically add any
- sent/outbox/drafts folder with "local" or "remote" etc rules, only
- add sent folders if explictly listed as folder rules. Maintain
- the remote/local folders list accordingly.
- (vfolder_adduri_do): dont check against sent_folder, drafts_folder
- or outbox_folder, this is checked by above code. For #14863.
-
- * mail-display.c (drag_data_delete_cb): use uri_list before we set
- "uri-list" to NULL, which will automagically free it for us, so
- dont free it either. Found with vagrind.
-
-2002-07-23 Not Zed <NotZed@Ximian.com>
-
- * message-browser.c (message_browser_destroy): Disconnect from
- folderbroser signals when we unref it, so we dont get signals
- later on if someone else has a ref on it (causing crash).
-
-2002-07-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.c (mail_config_signature_run_script): Check to make
- sure the script output is valid UTF-8, if not then attempt to
- convert it into UTF-8. Fixes bug #28086.
-
-2002-07-22 Not Zed <NotZed@Ximian.com>
-
- * message-list.c (regen_list_regened): Remove the assert, and
- always copy over the threadtree which represents the current view,
- unreffing the old one if set. For #28021. Haven't tested this a
- lot, but i guess it cant be worse than what is there.
-
- * mail-vfolder.c (store_folder_renamed): When renaming, use
- full_name to set the folder, not name, so the path is preserved.
-
-2002-07-20 Larry Ewing <lewing@ximian.com>
-
- * mail-format.c (mail_get_message_body): recognize urls in plain
- text reply quoting logic (bug #27908).
-
-2002-07-19 Not Zed <NotZed@Ximian.com>
-
- * mail-callbacks.c: Try including gtkhtml/gtkhtml.h instead. Test
- really is a 4 letter word obviously.
-
-2002-07-18 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-folder-cache.c: Removed bogus static pre-declaration.
-
- * e-searching-tokenizer.c (e_searching_tokenizer_end): Removed
- unused variables.
-
- * mail-callbacks.c: #include <gtkhtml.h>.
-
- * folder-info.h (evolution_folder_info_get_type): Add prototype.
-
-2002-07-18 Peter Williams <peterw@ximian.com>
-
- * mail-format.c (handle_multipart_digest): Change the HTML to
- make this a little prettier.
-
- * folder-browser-window.c (folder_browser_window_new): Load the
- messagedisplay XML file as a base for the UI, so that things
- appear. Don't add the global UI items as they don't make sense
- here.
- (fb_window_close): New function, used to ... close the window,
- suprisingly.
-
-2002-07-18 Not Zed <NotZed@Ximian.com>
-
- * main.c (main): Put the mcheck stuff back in, which was removed
- without a changelog entry.
-
-2002-07-08 Peter Williams <peterw@ximian.com>
-
- * Makefile.am: Reference the new libefilterbar.a.
-
-2002-07-17 Radek Doulik <rodo@ximian.com>
-
- * mail-callbacks.c (save_draft_done): use "saved" gtkhtml command
-
-2002-07-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * component-factory.c (add_storage): Oops, Don't comment out the
- mail_note_store call.
-
-2002-07-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-accounts.c (account_able_clicked): Re-enable some #if 0'd code.
-
- * mail-vfolder.c (vfolder_load_storage): Updated to not pass TRUE
- for an auto_connect argument since that argument no longer exists.
-
- * mail-account-gui.c (add_new_store): Updated to not pass an
- auto_connect argument.
-
- * component-factory.c (add_storage): Don't ever auto-connect here.
- (mail_add_storage): No longer takes an auto_connect argument.
- (mail_load_storages): Only load the account storages that are
- enabled.
-
-2002-07-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (composer_send_cb): Pass 'info' into
- mail_append_mail(), seems I created the info but forgot to pass it
- in.
- (composer_send_queued_cb): If the message is successfully queued,
- we destroy the composer, otherwise we unref it. Don't ever destroy
- and then unref it.
-
-2002-07-15 Radek Doulik <rodo@ximian.com>
-
- * mail-callbacks.c: use new save_header_state flag
-
-2002-07-15 Peter Williams <peterw@ximian.com>
-
- * mail-offline-handler.c (service_is_relevant): Account for the
- case that when a disco store is "online" but actually offline and
- we're going online, we should actually connect it.
-
- * component-factory.c (mail_load_storages): Always set
- auto_connect to FALSE, same reason as below.
-
- * mail-session.c (mail_session_init): Initialize our session to
- not be online, since the shell will tell us to go online if we
- need to.
-
-2002-07-10 Peter Williams <peterw@ximian.com>
-
- * Makefile.am (importerdir): Define this in terms of the new
- privlibdir, again resulting in a new directory name.
-
- * importers/Makefile.am (importersdir): Here too.
-
-2002-07-15 Not Zed <NotZed@Ximian.com>
-
- * message-list.c (ml_tree_value_at): Lookup the label colour based
- on the label token, not an integer.
-
- * folder-browser.c (on_right_click): Lookup the label name from
- the filter type. Sigh, a bunch of other code should do similar
- but i'm going to leave it as integers.
- (set_msg_label): Set the label directly.
-
- * mail-vfolder.c (vfolder_editor_clicked): Set the vfolder_editor
- variable to null before we close the dialogue, otherwise the close
- destroys it and reverts the file.
-
- * component-factory.c (populate_folder_context_menu): Oops,
- accidentally checked in some unfinished, unworking code.
- Reverted.
-
-2002-07-10 Not Zed <NotZed@Ximian.com>
-
- ** fixes for #10781
-
- * mail-callbacks.c (filter_edit): Add back a cancel button. We
- dont need to do anything special to 'undo' here, as the rules are
- loaded every time they're used.
-
- * mail-vfolder.c (vfolder_editor_clicked): If ok wans't clicked,
- revert the ruleset.
- (vfolder_editor_destroy): Fake a button of -1 if we get destroyed
- with no click.
- (context_rule_removed): Unref the folder after we delete it. If
- we're the last ref to the folder, unrefing it means it no longer
- exist,s which means no delte processing occurs ...
-
-2002-07-04 Not Zed <NotZed@Ximian.com>
-
- * mail-accounts.c (news_add_destroyed): Pass teh autoconnect flag,
- whcih shoudlnt' exist anyeway.
-
-2002-07-03 Not Zed <NotZed@Ximian.com>
-
- * component-factory.c (populate_folder_context_menu): If this is a
- file url, look up its component, if we have it, then use the
- mail-callback reconfigure call.
-
- * folder-browser-factory.c (folder_browser_factory_get_browser):
- Util to get the folder browser from a uri.
-
-2002-07-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-display.c (pixmap_press): Rename "Save to disk..." to "Save
- Attachment..."
-
-2002-07-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser-ui.c: Modified to use a single list of UI node
- elements with an enable-mask rather than split into groups. This
- allows much more control and easier modification to get the
- desired enable/disable effects.
-
- * mail-display.c (mail_display_set_message): If we unref'd a
- current_message, clear the datalist. Don't bother connecting to
- the message's finalise signal because something else may own a ref
- to the original message when we replace it with a new one.
- (mail_display_destroy): Only clear the datalist if we have a
- current_message, otherwise it's safe to assume that it is already
- cleared.
-
-2002-07-08 Peter Williams <peterw@ximian.com>
-
- * Makefile.am (INCLUDES): Add -I flags to get the ebook headers.
-
-2002-07-10 Ettore Perazzoli <ettore@ximian.com>
-
- * subscribe-dialog.c (recursive_add_folder): Pass zero as
- @sorting_priority to evolution_storage_new_folder().
-
- * mail-folder-cache.c (real_flush_updates): Pass zero as
- @sorting_priority to evolution_storage_new_folder().
-
-2002-07-09 Ettore Perazzoli <ettore@ximian.com>
-
- * subscribe-dialog.c (recursive_add_folder): Pass NULL for
- @custom_icon_name to evolution_storage_new_folder().
-
- * mail-folder-cache.c (real_flush_updates): Pass NULL for
- @custom_icon_name to evolution_storage_new_folder().
-
-2002-07-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (redirect): Don't ever use the mail-display's
- current_message, this can cause problems.
-
- * mail-ops.c (get_message_free): Unref the gotten message. All of
- the callers seemed to think that they didn't have to unref the
- message.
-
- * mail-display.c (mail_display_set_message): Now refs the message.
- (mail_display_destroy): Unref the current_message if we still have
- ownership of it.
-
-2002-07-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (composer_send_queued_cb): Only queue a send
- operation if we are in Online mode, otherwise don't bother wasting
- our time.
-
-2002-07-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * main.c (main): No longer need to pass a postpone_cb function
- into the composer factory_init.
-
- * mail-send-recv.c (get_receive_type): If the provider is a
- transport, return SEND_SEND.
-
- * mail-config.c (mail_config_get_default_transport): If the
- default account doesn't have a transport, find the first account
- that does.
-
- * mail-callbacks.c (append_mail_cleanup): Don't bother freeing the
- appended_uid here.
- (composer_send_internal): New helper function that does all the
- similar work that composer_send_cb and composer_postpone_cb did.
- (composer_send_cb): Append the message to Outbox and in the async
- callback, queue a message send operation.
- (composer_postpone_cb): Removed.
- (composer_send_queued_cb): The new async callback for
- composer_send_cb(). If the append is successful, queue a message
- send operation and destroy the composer otherwise re-show the
- composer.
- (save_draft_done): g_strdup the appended uid.
- (compose_msg): Don't connect to the postpone signal anymore as it
- no longer exists.
- (send_to_url): Same.
- (mail_reply): Here too.
- (forward_get_composer): And here.
- (redirect_get_composer): Again here.
- (do_edit_messages): And finally here.
-
- * mail-ops.c (append_mail_free): Free the appended uid.
-
-2002-07-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-editor-news.[c,h]: Removed.
-
- * mail-accounts.c: Removed special-case code for NNTP support.
-
- * mail-account-gui.c (mail_account_gui_setup): Allow configuration
- of both mail and news accounts.
-
- * component-factory.c (mail_load_storages): No longer need the
- is-account argument.
-
- * subscribe-dialog.c (populate_store_list): Don't special-case
- news accounts anymore.
-
- * mail-config.c (mail_config_get_default_news): Removed.
- (mail_config_get_news): Removed.
- (mail_config_add_news): Removed.
- (mail_config_remove_news): Removed.
-
-2002-07-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-vfolder.c (vfolder_load_storage): Pass TRUE as the
- auto_connect argument to mail_load_storage_from_uri().
-
- * mail-account-gui.c (add_new_store): Pass FALSE as the
- auto_connect value to mail_load_storage_from_uri().
-
- * mail-format.c (handle_multipart_encrypted): Pass the correct
- pointer into camel_multipart_encrypted_decrypt().
-
- * component-factory.c (mail_add_storage): Now takes an
- auto-connect argument which it passes along to add_storage().
- (mail_load_storage_from_uri): Same.
- (add_storage): Only call mail_note_store() if we plan on
- auto-connecting.
-
-2002-07-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser.c (on_right_click): Increase the size of the
- escapped mlist buffer, we can't assume that there can only ever be
- a single '_' in the mlist name afaik.
- (filter_type_uid): Ugh, we need to copy the fdata->source here.
-
- Fixes bug #27263.
-
- * folder-browser.c (filter_subject): Decide the filter source type
- based on the folder we are in (Sent/Outbox folders use
- FILTER_SOURCE_OUTGOING).
- (filter_sender): Same.
- (filter_recipient): Here too.
- (filter_mlist): And here.
- (on_right_click): Set the fdata->source.
- (filter_type_got_message): Pass fdata->source into
- filter_gui_add_from_message().
- (filter_mlist_uid): Same.
-
- * mail-autofilter.c (filter_gui_add_from_message): Now takes a
- source argument so that we don't always add incoming rules.
- (filter_gui_add_from_mlist): Same.
-
- * mail-tools.c (mail_tool_make_message_attachment): Remove Bcc
- headers too. Fixes bug #27302.
-
-2002-07-02 Ettore Perazzoli <ettore@ximian.com>
-
- * folder-browser.c (folder_browser_gui_init): Don't connect
- folder_browser_search_do_search to "query_changed" since we don't
- want the search to happen unless the user clicks "Find Now", for
- consistency.
-
-2002-07-02 Ettore Perazzoli <ettore@ximian.com>
-
- * component-factory.c (create_component): Pass a tooltip to
- evolution_shell_component_add_user_creatable_item.
-
-2002-07-02 Sean Atkinson <sean@cantab.net>
-
- * mail-preferences.c: remove dependency on removed file
- camel/camel-pgp-context.h
-
-2002-07-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (handle_multipart_related): Make sure that cid is
- non-NULL.
-
-2002-07-01 Not Zed <NotZed@Ximian.com>
-
- * mail-folder-cache.c (folder_deleted): Removed. The
- folder's deleted event isn't needed since we're listening to the
- store's folder_deleted signal. Also, the code was wrong, it
- cleared the folder without disconnecting events, etc. See #16486,
- and probably others.
- (mail_note_folder): Dont hook onto deleted anymore.
- (unset_folder_info): Or unhook from it.
-
-2002-06-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * component-factory.c (mail_load_storages): Don't skip over
- disabled accounts - put them in the folder tree too.
-
-2002-06-28 Jeffrey Stedfast <fejj@ximian.com>
-
- Fixes bug #27055.
-
- * mail-accounts.c (account_add_finished): Unref the main accounts
- widget.
- (account_add_clicked): Ref the main accounts widget.
- (account_edit_finished): Unref the main accounts widget.
- (account_edit_clicked): Ref the main accounts widget.
-
-2002-06-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * component-factory.c (storage_remove_folder): Recursively delete
- any subfolders.
-
-2002-06-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.c (config_read): Don't allow the pgp type to be
- anything except NONE or GPG.
-
- * mail-preferences.c (mail_preferences_apply): Don't allow someone
- to use anything other than GnuPG.
-
- * mail-crypto.c (mail_crypto_get_pgp_cipher_context): No need to
- handle pgp5 or pgp6 types anymore since we are no longer
- supporting them. Ding dong the witch is dead!
-
- * mail-format.c (handle_multipart_encrypted): Rewritten to use
- camel_multipart_encrypted_decrypt.
-
- * mail-crypto.c (mail_crypto_pgp_mime_part_verify): Removed.
- (mail_crypto_pgp_mime_part_encrypt): Removed.
- (mail_crypto_pgp_mime_part_decrypt): Are we seeing a trend yet?
-
-2002-06-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-display.c (on_url_requested): Also handle https urls.
-
- * component-factory.c (mail_add_storage): Some compiler warning
- fixes.
-
- * mail-crypto.c (mail_crypto_pgp_mime_part_sign): Removed.
- (mail_crypto_get_pgp_cipher_context): New convenience function to
- construct a pgp cipher context.
- (mail_crypto_pgp_mime_part_verify): Use the new
- get_pgp_cipher_context function.
- (mail_crypto_pgp_mime_part_encrypt): Same.
- (mail_crypto_pgp_mime_part_decrypt): Here too.
-
- * mail-account-gui.c (mail_account_gui_new): Initialise the
- pgp_always_trust checkbox.
- (mail_account_gui_save): Get whether or not to always_trust the
- user's pgp keys.
-
- * mail-config.c (account_copy): Copy over the pgp_always_trust
- option.
- (config_read): Read in the always_trust option.
- (mail_config_write): Save the always_trust option.
-
-2002-06-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-crypto.c (mail_crypto_pgp_mime_part_verify): If the pgp
- type is gpg, then use the gpg context.
- (mail_crypto_pgp_mime_part_sign): Same.
- (mail_crypto_pgp_mime_part_encrypt): Same.
- (mail_crypto_pgp_mime_part_decrypt): Same.
-
- * mail-format.c (handle_multipart_signed): Use the new gpg cipher
- context.
-
-2002-06-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * message-list.c (message_list_change_first_visible_parent): New
- convenience function to find the first parent node that is visible
- and emit a changed signal on it.
- (main_folder_changed): If a message changed, call
- change_first_visible_parent() in case we are in a collapsed thread
- so that our first visible parent gets updated as well. Fixes bug
- #26263.
-
- * component-factory.c (storage_remove_folder): Simplify the error
- checking.
-
-2002-06-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * message-list.c (get_normalised_string): New convenience function
- to get a cached normalised string.
- (subject_compare): Removed, as we strip Re:'s when normalising the
- subject strings now.
- (ml_tree_value_at): Added support for the normalised columns (used
- for a sorting optimisation).
- (message_list_init): Initialise normalised_hash.
- (message_list_destroy): Destroy normalised_hash.
- (message_list_create_extras): Removed subject_compare.
- (main_folder_changed): De-cache normalised strings for any removed
- uids.
-
-2002-06-17 Not Zed <NotZed@Ximian.com>
-
- * message-list.c (regen_list_regen): If we dont support searching,
- dont try to.
-
-2002-06-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * message-list.c (regen_list_regen): Move m->complete = TRUE; to
- within the cancel-check block, this way complete only ever gets
- set to TRUE if we weren't cancelled. I assume this is how it was
- supposed to work.
-
-2002-06-11 Not Zed <NotZed@Ximian.com>
-
- * folder-info.c (do_get_info): If we dont get a folder, dont try
- and get details off it. Should get rid of most of those annoying
- summary warnings, but not the cause of them.
-
-2002-06-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-accounts.c (account_able_clicked): Comment out the code to
- add/remove the store to the folder-tree when it gets
- enabled/disabled.
-
- * mail-callbacks.c (mail_generate_reply): If we are doing
- Reply-to-All, do not include any of the user's email accounts in
- the To: field. If, after this, the To: field is empty - then
- promote the first recipient in the Cc: list to the To: field.
-
-2002-06-07 Radek Doulik <rodo@ximian.com>
-
- * mail-config.c (mail_config_write_account_sig): call
- mail_config_init to be sure we have the db, save auto_signature as
- well
-
- * mail-composer-prefs.c (sig_add_script_cancel): hook this to
- cancel button in signature script dialog
-
- * mail-signature-editor.c (mail_signature_editor): fix some typos,
- set label usize to 500, -2
- (menu_help): added help link to Help menu
-
-2002-06-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-gui.c (mail_account_gui_save): If this account is
- not a completely new account (ie, it is an edited account), then
- remove any trace of it from the shell storages. If the new account
- belongs in the folder-tree, add it to the list of storages.
-
- * component-factory.c (mail_add_storage): New function to add a
- single storage.
-
-2002-06-06 Radek Doulik <rodo@ximian.com>
-
- * mail-composer-prefs.c (mail_composer_prefs_construct): disable
- edit and delete when there are no signatures defined
-
-2002-06-06 Not Zed <NotZed@Ximian.com>
-
- * message-list.c (mail_regen_list): Keep track of the regeneration
- request in a list.
- (regen_list_free): Remove the request from the regenreation list.
- (message_list_set_folder): If there are any outstanding
- regneration requests, cancel them.
- (regen_list_regened): If we were cancelled, do nothing.
- (regen_list_regen): If we were cancelled, shortcut processing.
- This is all for #23571.
-
- * message-list.c (regen_list_regen): Change the way we calculate
- the hide deleted messages and tree view options. Do it based on a
- search and uid's rather than a summary.
- (regen_list_regened): Handle changes to tree storage.
- (mail_regen_list): The tree is now stored between updates, so we
- can update the tree structure incrementally. This blows out
- memory use some however. We need an etree that uses this as its
- model directly?
- (message_list_destroy): Free the thread tree.
- (message_list_set_folder): Clear the thread tree when changing
- folder.
-
-2002-06-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (mail_get_message_rfc822): Don't forget to free
- the date string buffer.
-
-2002-06-05 Radek Doulik <rodo@ximian.com>
-
- * mail-composer-prefs.c (sig_fill_clist): use gtk string instead
- of utf8 one
-
-2002-06-04 Jeffrey Stedfast <fejj@ximian.com>
-
- The following changes take a great leap toward fixing bug #1042.
-
- * mail-display.c (mail_display_push_content_location): New
- function to push a Content-Location value onto the MailDisplay.
- (mail_display_get_content_location): Gets the current
- Content-Location CamelURL value.
- (mail_display_pop_content_location): Pop the Content-Location off
- the stack.
-
- * mail-format.c (get_location): Do URL merging if the
- Content-Location isn't a full URL. If the Content-Location doesn't
- exist, pretend the URL is actually the Content-Location URL of our
- parent multipart (assuming it exists). If that doesn't exist, then
- yes - return NULL.
- (handle_multipart_related): Push the Content-Location header value
- of the multipart/related so that we can do URL merging in
- get_location() as we process each of the subparts. When we're
- done, pop it back off the stack.
-
-2002-06-04 Christopher James Lahey <clahey@ximian.com>
-
- * message-list.etspec: Added priorities.
-
-2002-06-04 Christopher James Lahey <clahey@ximian.com>
-
- * folder-browser-ui.c (folder_browser_ui_setup_view_menus): Set
- the title of our GalViewCollection.
-
-2002-06-04 Not Zed <NotZed@Ximian.com>
-
- * mail-accounts.c (mail_accounts_tab_construct): Duh, we want to
- set the news_edit/delete buttons for the news page, not overwrite
- the mail ones! That would've saved a bit of angst ...
-
- * mail-config-druid.c (extra_prepare): dont call build_extra_conf,
- otherwise it blows away any settings with defaults.
-
-2002-06-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-gui.c (mail_account_gui_save): Write the signature
- after the account has been added.
- (sig_new_html): Don't write the signatures at this time.
- (sig_new_text): Same.
-
-2002-06-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-accounts.c (account_delete_clicked): Correctly get the
- GtkWindow ancestor of the prefs widget.
-
-2002-06-03 Not Zed <NotZed@Ximian.com>
-
- * mail-callbacks.c (composer_get_message): Changed to check
- everything from the composer before the message is requested.
- Otherwise we could end up signing/encrypting it twice, etc.
-
- * mail-format.c (handle_multipart_signed): removed some dead wood.
-
-2002-06-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * component-factory.c (request_quit): Prompt the user to see if he
- really wants to quit when there are queued messages in the Outbox.
-
-2002-06-01 Not Zed <NotZed@Ximian.com>
-
- * mail-local.c (mlf_getv): Implement, return a text description of
- the localfolder.
-
- * message-list.c (ml_duplicate_value):
- (ml_free_value):
- (ml_initialize_value):
- (ml_value_is_empty):
- (ml_value_to_string):
- (ml_tree_value_at): Implement COL_LOCATION, original location of
- message (useful for vfolder).
-
-2002-06-02 Larry Ewing <lewing@ximian.com>
-
- * mail-tools.c (mail_tool_quote_message): make these citations as
- well.
-
- * mail-format.c (handle_text_plain_flowed): make these blockquotes
- into citations.
-
-2002-05-31 Not Zed <NotZed@Ximian.com>
-
- * mail-format.c (handle_multipart_signed): Changed to handle new
- multipart-signed type.
-
-2002-05-30 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-send-recv.c (mail_send_receive): Noop if we are in offline
- mode.
-
- * component-factory.c (mail_remove_storage): If the store is not
- in the storage hash, then it must not have ever been added. Fixes
- bug #25456.
-
- * mail-callbacks.c (view_msg): Oops, create a message-browser
- window here, not a folder-browser-window window.
-
-2002-05-29 Radek Doulik <rodo@ximian.com>
-
- * mail-composer-prefs.c: moved spell checking options to separate
- page, updated UI by Anna's design
-
- * mail-accounts.c (mail_accounts_load): use _ instead of U_ for
- clist
- (mail_accounts_tab_construct): justify marks column to right
-
-2002-05-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser-window.c (folder_browser_window_new): Revert a
- failed idea.
-
-2002-05-24 Radek Doulik <rodo@ximian.com>
-
- * mail-composer-prefs.c (mail_composer_prefs_construct): ops,
- revert array size
-
-2002-05-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (mail_generate_reply): If we can't find the
- mailing list address in the recipients list, just Reply-to-All
- instead.
-
-2002-05-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser-window.c (folder_browser_window_new): Set the ui
- to be the evolution-mail-global.xml file thingy. Still broken but
- oh well. I give up. bonobo-ui sucks.
-
- * message-browser.c (set_bonobo_ui): Fixed to not crash.
-
-2002-05-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser-window.c (folder_browser_window_new): If the
- folder-browser has a parent, reparent it.
-
- * message-browser.[c,h]: Revert back to the old broken
- implementation since that's what users want. They're not happy
- unless it's broken.
-
-2002-05-23 Radek Doulik <rodo@ximian.com>
-
- * mail-composer-prefs.c: be more careful about language_str{_orig}
- (mail_composer_prefs_construct): add auto smiley check button
-
-2002-05-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-gui.c (sig_fill_options): Only clear the text/html
- signature menus if they are non-NULL.
-
- * mail-composer-prefs.c (spell_save_values): Use a new macro,
- STR_EQUAL, to tell if the 2 values are equal or not rather than
- using strcmp since one or both strings could be NULL.
-
-2002-05-21 Not Zed <NotZed@Ximian.com>
-
- * folder-browser.c (folder_browser_config_search): Split the
- search word up for a body search and add it to the tokeniser to
- highlight.
-
-2002-05-18 Not Zed <NotZed@Ximian.com>
-
- * e-searching-tokenizer.c
- (e_searching_tokenizer_add_primary_search_string):
- (e_searching_tokenizer_add_secondary_search_string): New functions
- to add additional search strings one at a time. Maybe it should
- just split the word itself?
- (all): Basically, entirely rewritten. Now implements the
- Aho-Corasick multiple pattern search algorithm and handles
- multiple search strings and only ever has to decode any utf8
- character once, etc etc.
-
-2002-05-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (mail_get_message_body): Only get the contents of
- a mime part if it is marked as "inline". Fixes bug #7527.
-
- * mail-display.c (mail_display_render): Fixed the "Overdue:"
- string to not contain any HTML tags.
-
-2002-05-20 Ettore Perazzoli <ettore@ximian.com>
-
- * subscribe-dialog.c (recursive_add_folder): Pass TRUE for
- @sync_offline to evolution_storage_new_folder().
-
- * mail-folder-cache.c (real_flush_updates): Pass TRUE for
- @sync_offline to evolution_storage_new_folder().
-
-2002-05-20 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-callbacks.c (composer_sent_cb): Always unref the composer
- [even when we are destroying it], otherwise we leak it and we get
- the nasty bug where you can't quit.
-
-2002-05-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * message-list.c (ml_tree_value_at): Check for a label tag when
- doing a lookup on the COLOR column.
-
- * mail-config.c (mail_config_get_label_color_string): Return the
- colour in string format.
-
- * folder-browser.c (set_msg_label): Replaces colourise_msg and
- sets the "label" tag rather than the "colour" tag.
-
- * mail-preferences.c (mail_preferences_apply): Call
- mail_config_write() so that the settings get synced to disk.
-
-2002-05-16 Ettore Perazzoli <ettore@ximian.com>
-
- * component-factory.c (request_quit): New.
- (create_component): Pass it as the @request_quit_fn to
- evolution_shell_component_new().
-
-2002-05-15 Ettore Perazzoli <ettore@ximian.com>
-
- * component-factory.c (create_component): Pass NULL as
- @request_quit_fn.
-
-2002-05-15 Not Zed <NotZed@Ximian.com>
-
- * mail-ops.c (prep_offline_do):
- (prep_offline_done):
- (prep_offline_free):
- (mail_prep_offline): Implement prep_offline for an individual
- folder.
- (set_offline_do): Only call disco_store_set_status or disconnect
- for the store, dont do any offline prep stuff.
-
- * mail-offline-handler.c: Applied patch from Ettore to hook in
- extra offline interfaces.
- (impl_destroy): Dont free listener here anymore, its removed, but
- free sync table.
- (mail_offline_handler_init): Same for setup.
- (impl_syncFolder): Implement.
- (sync_done): handles finalising synchronisation of 1 folder.
- (sync_status): progress reporting, camel side.
- (sync_timeout): progress reporting, gmainloop side.
- (impl_cancelSyncFolder): Implement.
- (impl_goOffline, storage_go_offline, went_offline): Dont copy the
- listener to our struct - its an argument, not a member, so give
- each thread its own copy.
-
-2002-05-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * message-list.c (ml_tree_value_at): Instead of g_assert()ing that
- the msg_info is not NULL, if it is NULL just return NULL. This
- fixes a crash when ETree requests the value at a root node (I
- don't understand why it needs to do that??).
-
-2002-05-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-info.h: Added.
-
-2002-05-14 Christopher James Lahey <clahey@ximian.com>
-
- * component-factory.c: Added #include "folder-info.h".
-
- * folder-browser-window.c (folder_browser_window_new),
- mail-account-editor.c (apply_changes), mail-account-gui.c
- (mail_account_gui_save), message-tag-editor.c: Removed some unused
- variables.
-
- * folder-info.c: Added #include "folder-info.h". Removed static
- declaration of evolution_folder_info_get_type.
-
- * folder-info.c (destroy), mail-callbacks.c
- (confirm_goto_next_folder, find_current_folder,
- find_next_folder_r, find_next_folder,
- do_evil_kludgy_goto_next_folder_hack), mail-composer-prefs.c
- (sig_name_changed): Commented out these unused functions.
-
- * mail-config.c (add_new_storage): Removed this unused function.
-
- * mail-local.c (mlf_init): Fix the declaration of this function to
- match the required signature.
-
-2002-05-13 Christopher James Lahey <clahey@ximian.com>
-
- * message-list.etspec: Added search="string" where appropriate.
-
-2002-05-13 Dan Winship <danw@ximian.com>
-
- * (various places): Update for camel_folder_append_message /
- camel_folder_transfer_messages_to API change.
-
- * mail-ops.c (mail_append_mail): Pass the appended_uid to the
- callback.
-
- * mail-callbacks.c (composer_save_draft_cb, save_draft_done,
- do_edit_messages): Take advantage of the append_message change to
- keep track of the UID of the saved draft so that we can delete the
- old copy of the draft each time we save a new one. Remove the
- FIXME suggesting we should do that, since we're doing it now. :)
-
-2002-05-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (do_view_message): Update for the new
- message-browser api.
-
- * message-browser.c (message_browser_new): A brand new
- implementation that just shows the message, none of that next/prev
- crap that always caused problems anyway.
-
- * mail-config.c (mail_config_add_account): Don't add any shortcuts
- here.
- (mail_config_remove_account): And don't remove them here. This
- code has never worked properly.
-
- * mail-ops.c (save_part_save): Use the exception enum names rather
- than '1' since it makes the code clearer.
-
-2002-05-10 Dan Winship <danw@ximian.com>
-
- * mail-ops.c (transfer_messages_transfer): Simplify. Use
- transfer_messages_to instead of picking between copy and move.
- Remove vtrash special-casing since it's all in
- camel-vtrash-folder.c now. Remove duplicate source == dest check.
-
- * mail-local.c (mail_local_folder_reconfigure): Use
- transfer_messages_to instead of copy_messages_to.
-
-2002-05-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-gui.c (mail_account_gui_save): Make sure that even
- if the new source url is NULL, that we preserve the enabledness of
- the source.
-
-2002-05-09 Ettore Perazzoli <ettore@ximian.com>
-
- * component-factory.c (add_storage): Pass %FALSE as
- @has_shared_folders to evolution_storage_new().
-
-2002-05-09 JP Rosevear <jpr@ximian.com>
-
- * Makefile.am: dist Spell.idl
-
-2002-05-08 Radek Doulik <rodo@ximian.com>
-
- * mail-composer-prefs.c: implemented (c'n'p-ed and updated) spell
- checking settings
-
-2002-05-08 Iain Holmes <iain@ximian.com>
-
- * component-factory.c (owner_set_cb): Tell the folder info listeners
- that they're ready.
-
- * folder-info.c: Add a property bag to the CORBAObject.
- (do_get_info): Remove a load of cruft. Add some error checks.
- (do_free_info): Unref the listener.
- (destroy): Unref the propertybag.
- (set_prop): Set the property.
- (get_prop): Get the property.
- (evolution_folder_info_factory_fn): Create a propertybag.
- (evolution_folder_info_notify_ready): Notify all the listeners that
- the folder info is ready for querying.
-
-2002-05-08 Not Zed <NotZed@Ximian.com>
-
- * mail-autofilter.c (mail_filter_rename_uri): Changed for
- rule_context_rename_uri api changes.
- (mail_filter_delete_uri): Same. Also, popup a dialogue similar to
- vfolder deleted dialogue to notify the user something has
- changed. Partial fix for #18826.
-
-2002-05-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-ops.c (filter_folder_free): Flush the filter log to make
- Tuomas happy :-)
-
- * mail-session.c (mail_session_flush_filter_log): New convenience
- function to flush the session's filter log file.
-
- * mail-callbacks.c (mail_reply): Set the Seen flag as well since
- it's safe to assume that if the user has replied to an email
- message that he has read it. Not always true, but usually ;-)
-
- * folder-browser.c (on_right_click): If we are in a
- Sent/Drafts/Outbox folder, don't show the "Add Sender to
- Addressbook" menu item.
-
-2002-05-06 Not Zed <NotZed@Ximian.com>
-
- * component-factory.c (idle_quit): Check all threads are idle as
- well, using new e_thread_busy call. Should fix #22553? Also
- sleep a little bit, to let the other threads run.
-
-2002-05-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-gui.c (sig_new_text): Update the code to actually
- work.
- (sig_new_html): Same.
-
- * mail-composer-prefs.c (mail_composer_prefs_new_signature): Allow
- 'prefs' to be NULL.
-
- * folder-browser.c (on_right_click): Fix the filter_menu static
- array to use the E_POPUP_MENU_CC macros since we plan on using
- custom closures for this.
- (on_right_click): Fixed so that you can "Edit as New" for any Sent
- folder and not just the local Sent folder.
-
-2002-05-01 Not Zed <NotZed@Ximian.com>
-
- * folder-browser.h (FOLDER_BROWSER_IS_DESTROYED): Also check
- folder!=NULL. Fixes race where folder isn't setup yet, and
- neither is bonobo menu status (because its delayed), and we get a
- menu event before we're setup yet. For bug #21939.
-
-2002-04-30 Dan Winship <danw@ximian.com>
-
- * mail-callbacks.c (delete_msg): If the folder's permanent_flags
- don't include CAMEL_MESSAGE_DELETED, don't do anything. (In
- particular, don't move the cursor.)
-
-2002-04-29 Jeffrey Stedfast <fejj@ximian.com>
-
- * message-tag-followup.c (message_tag_followup_append_message):
- Convert UTF-8 to gtkstrings since we are using a clist and not an
- E-widget that takes UTF-8.
-
- * mail-display.c (mail_display_add_url): If the data-urls is NULL,
- add a data-urls hash to the datalist. This finishes up bug #90.
-
- * mail-account-gui.c (save_service): Strip leading/trailing
- whitespace from the username because users sometimes accidently
- add extra spaces here and there. Fixes bug #24009 (along with a
- number of other "bugs").
- (mail_account_gui_auto_detect_extra_conf): Use a CamelURL instead
- of a GHashTable *settings. Also parse out the port # from the
- hostname.
-
-2002-04-29 Larry Ewing <lewing@ximian.com>
-
- * mail-composer-prefs.c (mail_composer_prefs_construct): clean up
- propmanager initialization code.
-
- * mail-preferences.c (mail_preferences_construct): small clean
- ups to propmanager code.
-
- * mail-config-factory.c (config_control_factory_cb): handle
- requests for the font manager control.
-
- * mail-config.glade: add fonts tabs and reorder composer options
- to match the new dialogs from anna.
-
- * GNOME_Evolution_Mail.oaf.in: add font manager control definition.
-
- * mail-composer-prefs.c (mail_composer_prefs_construct): hook to
- the gtkhtml propmanager.
- (mail_composer_prefs_apply): apply propmanager changes.
- (mail_composer_prefs_finalise): unref the propmanager.
-
- * mail-composer-prefs.h: add propmanager member.
-
- * mail-font-prefs.c: initialize gui properly.
-
- * mail-preferences.c (mail_preferences_construct): hook to
- gtkhtml's propmanager.
- (mail_preferences_apply): apply propmanager changes.
- (mail_preferences_finalise): unref the propmanager.
-
- * mail-preferences.h: add propmanager member.
-
- * Makefile.am (evolution_mail_SOURCES): add mail-font-prefs.[ch]
- to the build.
-
- * mail-tools.c (mail_tool_quote_message): use the html reply logic
- even for plain parts so that we can test out the new gtkhtml cite logic.
-
- * importers/evolution-mbox-importer.c (process_item_fn): add const
- to silence warning.
-
- * mail-display.c: add gtkhtml.h include so to pick up the
- object_relative prototype.
-
-2002-04-26 Larry Ewing <lewing@ximian.com>
-
- * mail-font-prefs.c: Add the font config dialog.
-
- * mail-font-prefs.h: add font config dialog headers.
-
-2002-04-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * Makefile.am: Don't link with libibex anymore, it's been
- deprecated.
-
- * mail-callbacks.c (next_unread_msg): Do away with the
- goto-next-folder stuff, it's very annoying.
-
- * mail-config-druid.c (extra_prepare): After building the extra
- config options into a Gtk form, auto-detect any values that we can
- and populate them by calling
- mail_account_gui_auto_detect_extra_conf.
-
- * mail-account-gui.c (mail_account_gui_auto_detect_extra_conf):
- New function to auto-detect the extra config options for a source.
-
-2002-04-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-gui.c (mail_account_gui_build_extra_conf): Allow
- providers to override text entry boxes too.
- (source_type_changed): Remove the logic to decide upon default
- paths, these paths can now be set by the provider.
-
-2002-04-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser.c (label_menu): Update to use
- E_POPUP_MENU_PIXMAP_WIDGET_ITEM_CC so that our callback gets
- called without per-item closure rather than being called with NULL
- and causing a segfault.
-
- * mail-account-gui.c (mail_account_gui_build_extra_conf): Set the
- default Username label and handle the new
- CAMEL_PROVIDER_CONF_LABEL enum allowing the provider to setup a
- label.
-
-2002-04-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-accounts.c: Added back the checkmark icon for enabled
- accounts.
- (account_able_clicked): Don't reload the accounts list, that was
- just lame.
-
-2002-04-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-display.c (mail_display_render): Plug-in Anna's html for
- the flag-for-followup stuff. Finishes up bug #90.
-
-2002-04-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser.c (folder_browser_finalise): Free the
- loading/pending/new/loaded_uid string buffers.
-
- * mail-config.c (config_read_signature): Free some temporary path
- buffers.
-
- * mail-display.c (stream_write_or_redisplay_when_loaded): Ref the
- html object here, this is an async handler so it's possible for
- our caller (or someone else) to unref the html object before we
- finish.
- (load_content_free): Unref the async handler's ref of the html
- object here.
- (mail_display_new): Ref the html widget here so that we can be
- sure that so long as the mail-display is "alive", so is the html
- object. See bug #22328 for details. Basically, the message-browser
- is being closed before the message gets loaded and so the html
- object was being destroyed but the mail-display was still alive.
- (mail_display_destroy): Unref the html object when the
- mail-display is destroyed.
-
-2002-04-19 Anna Marie Dirks <anna@ximian.com>
-
- * mail-config.glade: Added yet more accelerators for the new config
- dialog--this time for the composer pages
-
-2002-04-19 Anna Marie Dirks <anna@ximian.com>
-
- * mail-config.glade: Added a bunch of accelerators for the new config
- dialog
-
-2002-04-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (redirect_get_composer): Removed all
- Delivered-To headers before redirecting. Fixes bug #23635.
-
-2002-04-18 Radek Doulik <rodo@ximian.com>
-
- * mail-callbacks.c (do_mail_print): use default paper name in case
- of wrong translation
-
-2002-04-15 Not Zed <NotZed@Ximian.com>
-
- * mail-identify.c (mail_identify_mime_part): Turn off the code
- which downloads the part if we can't identify it. See discussion
- in #11778.
-
-2002-04-17 Christopher James Lahey <clahey@ximian.com>
-
- * folder-browser.c, mail-display.c: Updated these to match the new
- EPopupMenu.
-
-2002-04-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (handle_multipart_signed): Handle broken
- multipart/signed parts such as where the signature part is not the
- last part (as it should be). Fixes bug #23583.
-
- * folder-browser.c (message_list_drag_data_get): Free the temp
- GByteArrays.
-
-2002-04-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-local.c (mail_local_folder_construct): Just use g_basename.
- (mlf_finalize): Free the real_path.
-
- * folder-browser.c (on_right_click): Unref the GdkGC so we don't
- leak it.
-
-2002-04-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-tools.c (mail_tool_destroy_xevolution): Free the format
- string.
-
- * mail-config.c (config_write_signature): Don't leak the path
- strings here.
-
- * mail-signature-editor.c (menu_file_save_cb): Free the dirname
- string.
-
- * mail-config-factory.c (config_control_factory_cb): Ref the prefs
- widget here since we unref in the destroy callback. Caught this
- thanks to purify.
-
-2002-04-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-accounts.c: Build fixes for --enable-nntp.
-
-2002-04-13 Christophe Merlet <redfox@eikonex.org>
-
- * mail-config.glade: Little typo. s/IS0/ISO/
-
-2002-04-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-composer-prefs.c (mail_composer_prefs_construct): Make it
- so that unchecking the "Enable Advanced Options" in the signature
- tab disables the advanced settings and vise versa.
-
- * mail-accounts.c (mail_accounts_tab_construct): Setup News
- preferences too if it is enabled.
-
- * mail-account-gui.c (mail_account_gui_new): Set the text of the
- reply-to.
- (mail_account_gui_save): Get the reply-to text here.
- (mail_account_gui_identity_complete): If there is text in the
- reply-to widget make sure it's valid.
-
- * mail-config.c (identity_copy): Copy the reply-to.
- (config_read): Read in the reply-to for all the accounts.
- (mail_config_write): Save the reply-to.
- (impl_GNOME_Evolution_MailConfig_addAccount): Get the reply-to.
- (identity_destroy): Free the reply-to.
-
-2002-04-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * message-list.etspec: s/Sent/Date. This fixes bug #11159.
-
-2002-04-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (confirm_expunge): Set the 'No' button as the
- default.
-
-2002-04-10 Dan Winship <danw@ximian.com>
-
- * mail-config.c (config_read, mail_config_write,
- mail_config_get_x_mailer_display_style,
- mail_config_set_x_mailer_display_style): Handle the X-Mailer
- display style. (There is currently no GUI for configuring this.)
-
- * mail-format.c (write_headers, write_xmailer_header): Show
- X-Mailer/User-Agent (and Rupert's stamp of approval) as
- appropriate.
-
-2002-04-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-gui.c (setup_service): Kludge around the brokeness
- that is GtkOptionMenu just like we kludge around it for the
- authtype option menu.
-
-2002-04-09 Dan Winship <danw@ximian.com>
-
- * component-factory.c (create_view): Add view_info arg, but don't
- do anything with it.
-
-2002-04-08 Not Zed <NotZed@Ximian.com>
-
- * mail-send-recv.c (receive_update_got_folderinfo): Argh!
- get_folder_info owns and frees its *OWN* folder info, it shouldn't
- be free'd here! See mail-ops.c:get_folderinfo_free.
- This should fix #17259 and friends.
-
-2002-04-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-signature-editor.c (menu_file_save_cb): Simplify a bit and
- write to a temp file first and then rename() it to the real
- filename. This protects against losing data if the drive is full
- too. Also use a real mode, not 0, so that we can actually
- save/read the content ;-)
-
- * GNOME_Evolution_Mail.oaf.in: Re-added the config wizard
- interfaces. Ettore accidently removed them thinking they were
- duplicates of the new mail-config interfaces.
-
- * mail-config.glade: Remove the OK, Apply, Cancel buttons from the
- keyboard shortcut tab in the composer_prefs dialog.
-
- * mail-account-gui.c: No need to check gui->source before using
- gui->source->url, since gui->source *has* to exist.
-
-2002-04-06 JP Rosevear <jpr@ximian.com>
-
- * GNOME_Evolution_Mail.oaf.in: add config_item:type
-
-2002-04-04 Dan Winship <danw@ximian.com>
-
- * mail-account-gui.c (mail_account_gui_new): Make the drafts and
- sent folder buttons be EvolutionFolderSelectorButtons. Remove the
- code to deal with drafts_folder_name and sent_folder_name, since
- they were only used to construct the button and aren't needed now.
- (mail_account_gui_save): Remove drafts/sent name references.
- (mail_account_gui_destroy): Likewise
- (folder_selected): Handle the "selected" signal on the folder
- selector button by updating the URI in the MailAccountGui.
- (mail_account_gui_folder_selector_button_new): Glade custom widget
- constructor.
-
- * mail-callbacks.c (transfer_msg): Update for
- evolution_shell_client_user_select_folder change.
-
- * message-browser.c (transfer_msg): Likewise. (Sigh. Why is this
- cut+pasted?)
-
- * mail-config.glade: Make the drafts/sent folder buttons custom
- widgets.
-
- * mail-config.c (account_copy): Remove drafts/sent folder name
- handling.
- (account_destroy): Likewise.
- (config_read): Likewise.
- (mail_config_write): Likewise.
-
- * Mail.idl (MailConfig:Account): remove drafts_folder_name and
- sent_folder_name.
-
-2002-04-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * message-tag-followup.c (construct): Set the window title/icon
- here instead.
-
- * message-tag-editor.c (message_tag_editor_init): Don't set the
- title or window icon here, this is a generic class.
-
- * mail-format.c (handle_multipart_signed): Replace
- get_url_for_icon with the new mail_display_get_url_for_icon
- function.
- (handle_multipart_digest): Here too.
- (get_cid): Use mail_display_add_url instead.
- (get_location): Same.
- (handle_text_enriched): Here too.
- (handle_multipart_signed): And here.
-
- * message-tag-followup.c (message_tag_followup_i18n_name): Use the
- U_() macro, not the _() macro as it is what we really want.
-
- * mail-ops.c (mail_send_message): Don't cast the message into a
- CamelMedium before sending anymore.
-
- * mail-callbacks.c (expunge_folder): Set the followup argument to
- NULL here.
- (done_message_selected): Get the followup value here and pass it
- to the mail-display here.
- (do_mail_fetch_and_print): Again with the NULL followup here.
-
- * folder-browser.c (folder_browser_set_message_preview): Update to
- pass in NULL as the followup since we are setting the message to
- NULL here.
- (done_message_selected): Get and set the appropriate followup
- value here.
- (do_message_selected): Update to pass in NULL as the followup
- since we are setting the message to NULL here.
-
- * mail-display.c (mail_display_set_message): Now takes a followup
- tag value.
- (mail_display_init): Set md->followup to NULL.
- (mail_display_destroy): Free md->followup.
- (mail_display_add_url): New: replaces the static add_url function
- originally in mail-format.c
- (mail_display_get_url_for_icon): New: replaces get_url_for_icon
- which was originally in mail-format.c
-
-2002-04-03 Dan Winship <danw@ximian.com>
-
- * mail-account-gui.c: Changes to allow combined store/transport
- providers (like exchange and nntp). You can only select the
- transport if the account is also using that provider for the
- source.
- (source_type_changed): If changing away from a combined
- store/transport type, disable that provider on the transport page.
- If change to a combined store/transport type, enable and select
- that provider on the transport page.
- (mail_account_gui_setup): Do some additional bookkeeping here to
- make the above stuff work.
- (transport_type_changed): If the provider is a combined
- store/transport type, pretend it doesn't need any additional URL
- configuration.
- (mail_account_gui_transport_complete): if the transport provider
- is also a store provider, then as long as it matches the source
- for the account, it's considered complete.
- (mail_account_gui_save): If the selected transport is a combined
- store/transport provider, use the source page's information to
- fill in the transport url.
-
- * mail-local.c (mail_local_provider_init): Don't set up
- service_cache.
-
-2002-04-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (do_edit_messages): Pass the UID of the message
- being edited to the save-draft signal handler.
- (composer_save_draft_cb): Pass the old draft uid to our async
- append_message function and let the append_message callback worry
- about deleting the old draft message on success.
- (save_draft_done): Delete the old draft message if we successfully
- appended the new draft message.
-
-2002-04-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser-ui.c: Removed an unused pixmap from
- Tools/Settings to avoid a big nasty bonobo warning.
-
- * mail-composer-prefs.c (mail_composer_prefs_construct):
- Re-Implemented the signature editor stuff (mostly just copy/paste
- from Radeks original code).
-
- * mail-signature-editor.c (mail_signature_editor): Use the right
- oafiid for the html editor control.
-
-2002-04-01 Dan Winship <danw@ximian.com>
-
- * importers/Makefile.am (liboutlook_la_LDFLAGS,
- libmbox_la_LDFLAGS): Use -avoid-version -module. (From Max Horn
- <max@quendi.de>)
-
-2002-03-29 Ettore Perazzoli <ettore@ximian.com>
-
- * GNOME_Evolution_Mail.oaf.in: Added priorities for all the
- configuration pages [evolution:config_item:priority].
-
-2002-03-29 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-preferences.c (colorpicker_get_color): Don't shift the r, g
- and b values here either.
-
- * mail-composer-prefs.c (colorpicker_get_color): Don't shift the
- r, g, b values.
-
- * mail-preferences.c (mail_preferences_construct): Restore the
- labels & colours options from the grave.
- (mail_preferences_apply): Save these labels & colours options.
-
-2002-03-29 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-composer-prefs.c (mail_composer_prefs_construct): Same
- here.
-
- * mail-preferences.c (mail_preferences_construct): Do some gtk
- hackery action so we can detect if a option menu has changed.
-
-2002-03-29 Ettore Perazzoli <ettore@ximian.com>
-
- * GNOME_Evolution_Mail.oaf.in: Cleaned up a bunch [removing
- duplicates ;-)], set up icons for all the configuration pages.
-
-2002-03-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-accounts.c: Use a GtkCList instead of an ETable, for some
- reason the etable was getting into some infinite resize loop or
- something. I probably did something wrong but I can't figure out
- what so I'm using a clist for now.
- (account_cursor_change): Make sure that event is non-NULL here.
-
-2002-03-27 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-accounts.c (mail_accounts_tab_construct): Use
- gtk_container_add() to put the toplevel in the parent widget,
- instead of just gtk_widget_set_parent().
- * mail-preferences.c (mail_preferences_construct): Likewise.
- * mail-composer-prefs.c (mail_composer_prefs_construct): Likewise.
-
-2002-03-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (mail_generate_reply): Updated to respect the
- new mail-config options for default reply style that NotZed had
- started to implement before there was a gui.
-
-2002-03-27 Dan Winship <danw@ximian.com>
-
- * mail-display.c (do_attachment_header): unset GTK_CAN_FOCUS on
- the button so that it can't grab focus when you click it.
- (do_signature): Likewise on the signature button. #3904
-
-2002-03-26 Jeffrey Stedfast <fejj@ximian.com>
-
- Sync with yet-another-mail-config branch.
-
- * mail-composer-prefs.c: Updated to get the right widgets and
- whatnot. Also updated to tell the evolution-config-control that
- stuff has changed.
-
- * mail-preferences.c: Updated to get the right widgets and
- whatnot. Also updated to tell the evolution-config-control that
- stuff has changed.
-
- * mail-accounts.etspec: New file needed by mail-accounts.c
-
-2002-03-26 Not Zed <NotZed@Ximian.com>
-
- * mail-callbacks.c (addrbook_sender): Changed to get the address
- from the messageinfo of the current selected message rather than
- from the current_message.
- (requeue_mail_reply): Only re-queue if we got a message, could
- potentially cause an infinite loop trying to get a message it
- can't.
- (reply_to_sender, reply_to_list, reply_to_all): Always pass NULL
- as the msg to mail_replay, this forces mail_reply to always load
- the message anew. Fixes FIXME's and popup behaviour. Basically
- this and stuff below fixes #8542. Its probably not the nicest
- way, but it works.
- (mark_as_important): Use the flags properly, we can set all flags
- to any combination of on or off as we want, so we just need to
- call set_flags once, thats why its set flags and not set_option.
- (toggle_flags): Fixed the logic here also, so we dont have to call
- set_message_flags more than once, and also implement a true toggle
- for any number of simultaneous flags (whilst simplifying code).
-
- * mail-vfolder.c (vfolder_gui_add_from_mlist): Removed the 'msg'
- parameter, its not used, fixed callers.
-
- * folder-browser.c (on_right_click): Lookup the mlist from
- messageinfo, and change the 'no selected' logic slightly, fixes
- most of #8542.
- (filter_data_free): Free filter data struct.
- (vfolder_type_got_message): Actually create vfolder once we have
- the message we need to use for it. Code could probably be changed
- to use messageinfo instead.
- (vfolder_type_uid): Lookup a message based on uid, and use that to
- create a vfolder based on type.
- (vfolder_subject_uid, vfolder_sender_uid, vfolder_receipient_uid,
- vfolder_mlist_uid): Callbacks for the popup menu, used to create
- rules based on the uid rather than the message, which it loads as
- required.
- (filter_type_got_message, filter_*_uid): Similar to vfolder
- stuff above.
- (filter_menu[]): Changed callbacks to popup specific ones, not
- folderbrowser specific ones used by bonobo.
- (on_right_click): Initialise callback data for the filter submenu
- so it can look up messages for callback implementation.
-
- * local-config.glade: New version from anna, with fixed widget
- names.
-
-2002-03-20 Ettore Perazzoli <ettore@ximian.com>
-
- * folder-browser.c: Reorder folder_browser_search_menu_items
- according to #16246.
-
-2002-03-24 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-send-recv.c: Remove member current_folder from struct
- _send_data.
- (build_dialogue): Remove arg @current_folder.
- (mail_send_receive): Likewise.
- (free_send_data): No need to refresh the current folder here.
- [Well, hopefully, at least.]
-
- * component-factory.c (send_receive_callback): New.
- (create_component): Connect.
-
- * mail-callbacks.c (send_receive_mail): Removed.
-
- * folder-browser-ui.c: Remove "MailGetSend" verb.
-
-2002-03-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * GNOME_Evolution_Mail.oaf.in: Add info about the new config
- controls.
-
- * mail-config-factory.c: New file to handle the creation/etc of
- the config controls.
-
- * mail-accounts.c:
-
- * mail-preferences.c:
-
- * mail-composer-prefs.c: No longer handle their own bonobo control
- creation.
-
-2002-03-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-gui.c (sig_new_text): Temporarily #if 0 this
- function out.
- (sig_new_html): Same.
-
- * mail-config.c (config_read): Read in the default reply style
- setting.
- (mail_config_write_on_exit): Same the default reply style.
- (mail_config_get_default_reply_style): New function to get the
- default reply style.
- (mail_config_set_default_reply_style): New function to set the
- default reply style.
-
- * folder-browser-ui.c: There is no longer a Tools/Mail Settings
- menu item.
-
- * mail-account-gui.c: Updated the widget types for the
- MailAccountsDialog->MailAccountsTab change.
-
- * mail_account_editor.c: Same.
-
- * mail-callbacks.c (providers_config): Removed.
-
- * mail-composer-prefs.c: New file that implements the composer
- preferences tab of anna's new config design.
-
-2002-03-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-accounts.c: Reimplemented. This time we only have to worry
- about accounts. Also this now implements Annas config gui changes.
-
- * mail-preferences.c: Implements the mailer's Preferences tab in
- Anna's new config GUI.
-
-2002-03-19 Larry Ewing <lewing@ximian.com>
-
- * mail-display.c: add missing NULL closure data to popup menu
- initialization.
-
-2002-03-19 Dan Winship <danw@ximian.com>
-
- * Makefile.am (evolution_mail_LDADD): s/libversit.la/libversit.a/
-
-2002-03-18 Ettore Perazzoli <ettore@ximian.com>
-
- * main.c (main): Report a message before entering bonobo_main() to
- simplify debugging.
-
-2002-03-18 Ettore Perazzoli <ettore@ximian.com>
-
- * folder-browser.c: Remove E_FILTERBAR_RESET menu entry.
-
-2002-03-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser.c (on_right_click): Draw colour rectangles for
- each of the colour items and set a closure on each.
- (colourise_msg): colourise the message, yo.
-
-2002-03-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (colour_msg): New callback to set a colour on a
- message.
-
- * folder-browser.c (on_right_click): Setup our popup icons and
- stuff. Also add a submenu for Labels.
-
- * mail-display.c (pixmap_press): Sync up with the new EPopupMenu
- API. Note: This code can probably now be fixed to use per-item
- closures - yay!
-
- * mail-accounts.c (construct): Connect to the label GtkEntry's and
- GnomeColorPickers and also to the Restore Defaults button.
-
- * mail-config.c (mail_config_get_label_name): New function to get
- a label's name.
- (mail_config_set_label_name): New function to set the label name.
- (mail_config_get_label_color): New function to get the label
- color.
- (mail_config_set_label_color): New function to set the label
- color.
- (config_read): Read in the config options for the labels and their
- colors.
- (mail_config_write_on_exit): Save the label options.
-
-2002-03-15 Larry Ewing <lewing@ximian.com>
-
- * mail-display.c: expand the relative urls of the object at the
- point so that relative images can be saved correctly.
-
- * folder-browser.c: add a closing quote in a comment.
-
-2002-03-15 Ettore Perazzoli <ettore@ximian.com>
-
- * folder-browser-factory.c (control_activate): Set the UI
- component on the search bar.
-
-2002-03-14 Dan Winship <danw@ximian.com>
-
- * component-factory.c (folder_types): Remove "mailstorage", since
- it's not needed any more.
- (storage_activate): Gone, although some of it is moved to
- storage_connect.
- (create_view): Remove mailstorage code.
- (add_storage): Connect to the storage's open_folder signal.
- Instead of creating a "mailstorage" folder, call
- evolution_storage_has_subfolders to let the shell know we haven't
- finished filling it in yet.
- (storage_connect): Handler for the storage's asyncOpenFolder
- signal. Call mail_note_store() to try to connect.
- (storage_connected): Callback for above. If the connection attempt
- failed, call evolution_storage_has_subfolders again to make the
- shell re-close the storage.
-
- * mail-folder-cache.c (update_folders): Remove a piece of
- mailstorage legacy code from here.
-
-2002-03-14 Radek Doulik <rodo@ximian.com>
-
- * mail-config.c (get_new_signature_filename): create new signature
- file
- (delete_unused_signature_file): be more careful about signature
- file path before unlinking
-
-2002-03-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (next_thread): Implemented.
-
- * message-list.c (message_list_select_next_thread): New function
- to select the next thread.
-
-2002-03-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser-window.c (folder_browser_window_new): Set a
- default size of the window, so we don't get this itty-bitty window
- the size of a quarter on the screen when it first gets shown.
-
-2002-03-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-display.c (on_link_clicked): Handle digest: urls.
-
- * mail-format.c (setup_mime_tables): Add a handler for
- multipart/digest.
- (handle_multipart_digest): Handle multipart/digest parts.
-
-2002-03-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser.c (folder_browser_set_folder): Set the folder on
- a folder-browser object.
-
- * folder-browser-window.c (folder_browser_window_new): Simple
- window to display a folder-browser.
-
- * mail-callbacks.c (view_digest): New callback to open a
- folder-browser-window with a digest folder.
-
-2002-03-08 Radek Doulik <rodo@ximian.com>
-
- * mail-signature-editor.c (menu_file_save_cb): truncate stream
- before saving
-
- * mail-config.c (mail_config_signature_set_html): new function
-
- * mail-accounts.c (sig_event_client): watch for HTML changed event
-
- * mail-signature-editor.c: added HTML check menu item to Format
- menu
-
-2002-03-08 Dan Winship <danw@ximian.com>
-
- * mail-config-druid.c (management_prepare): Rewrite this to not
- use stpcpy, which isn't portable.
-
-2002-03-08 Radek Doulik <rodo@ximian.com>
-
- * mail-accounts.c (sig_event_client): handle name changed event
- (sig_load_preview): don't run script before each reload
- (sig_script_activate): run script only if script entry is
- activated
-
- * mail-signature-editor.c (mail_signature_editor): added signature
- name entry
-
-2002-03-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config-druid.c (management_changed): Re-focus the account
- name entry widget.
- (identity_prepare): If a name is not set, try and get the user's
- full name for them and set the text on the entry widget.
- (management_prepare): If the account name is already taken,
- generate a unique one by appending " (%d)".
-
-2002-03-07 Radek Doulik <rodo@ximian.com>
-
- * mail-account-gui.c (sig_new_html): make edit button sensitive
- after new signature is created
- (sig_new_text): ditto
-
-2002-03-07 Anna Marie Dirks <anna@ximian.com>
-
- * folder-browser.c: Made all the acclerators in the context menu
- on a message work. (There are 22 different menu items here, so
- picking a unique accelerator for each label was tricky, and some
- of the choices I made are different from the ones I would have
- made if there weren't so many stinking menu items.)
-
-2002-03-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.c (config_import_old_signatures): Don't use an
- uninitialized 'id'.
-
-2002-03-07 Radek Doulik <rodo@ximian.com>
-
- * mail-signature-editor.c: notify accounts dialog about signature
- content change
-
- * mail-accounts.c (run_script): run script only if file regular
- file exists and has x flag
-
- * mail-signature-editor.c (mail_signature_editor): set initial
- focus to editor
- (do_exit): use hasUndo to avoid question dialog when content is
- unchanged
-
-2002-03-07 Dan Winship <danw@ximian.com>
-
- * component-factory.c (add_storage): Update for storage changes:
- explicitly create a root folder.
-
-2002-03-06 Dan Winship <danw@ximian.com>
-
- * mail-display.c (mail_display_render): Fix the "don't scroll back
- to the top of the HTML widget when opening an attachment" hack
- again by moving it here from mail_display_redisplay(). (It has to
- happen after the gtk_html_begin.)
- (mail_display_redisplay): Pass reset_scroll arg to
- mail_display_render.
-
- * mail-callbacks.c (do_mail_print): Pass reset_scroll (TRUE) to
- mail_display_render.
-
-2002-03-05 Dan Winship <danw@ximian.com>
-
- * folder-browser-ui.c: Don't try to set pixmap for
- /Toolbar/MailCompose, since it doesn't exist any more.
-
-2002-03-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-gui.c (save_service): "use_ssl" can now be 3
- options, modify the code to handle this.
- (setup_service): Toggle the correct ssl option.
- (source_type_changed): Show/hide the ssl hbox container widget.
- (transport_type_changed): Same.
-
-2002-03-05 Dan Winship <danw@ximian.com>
-
- * mail-folder-cache.c (mail_note_store): Pull up assertion change
- from evolution-1-0-branch to allow external storages.
-
-2002-03-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-accounts.c (mail_unselect): If the clicked column was
- column 0, enable/disable it.
- (mail_select): Same.
-
- * mail-display.c (load_http): Added more debugging code to help
- figure out why a certain image isn't loading - looks like
- gnome-vfs is getting a premature EOF?
-
- * folder-browser.c (my_folder_browser_init): Connect to the
- focus-in/out events on the message-list so that we can disable the
- EditInvertSelection and EditSelectThread menu items when the
- message-list is not in focus.
-
- * folder-browser-ui.c (folder_browser_ui_message_list_unfocus):
- New function to de-sensitize some items if the message-list is not
- in focus.
- (folder_browser_ui_message_list_focus): New function to sensitize
- some items if the message-list is not in focus.
-
- * mail-callbacks.c (invert_selection): Only invert the selection
- of the message-list if it is the widget in focus.
-
- * message-list.c (message_list_select): Do not explicitly grab the
- focus here.
-
-2002-03-04 Ettore Perazzoli <ettore@ximian.com>
-
- [Fix #19303.]
-
- * mail-ops.c (mail_send_message): Set X-Mailer to say "Ximian
- Evolution", not just "Evolution".
-
-2002-03-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (forward_message): Forward all selected
- messages. Fixes bug #21190.
-
-2002-02-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (handle_text_html): Get the Content-Base if the
- header exists and use gtk_html_set_base to set this base url.
-
- * mail-display.c (on_link_clicked): No longer need to calculate
- the full url. This is now handled by GtkHTML.
- (on_set_base): Removed.
- (on_url_requested): No longer need to calculate the full url.
- (mail_display_initialize_gtkhtml): Don't connect to the set_base
- signal anymore. We don't care.
-
- * mail-display.h: No longer need base_url (it was broken anyway).
-
-2002-02-26 Not Zed <NotZed@Ximian.com>
-
- * mail-display.c (on_url_requested): If a related part is
- requested, remove it from the related undisplayed list.
-
- * mail-format.c (handle_multipart_related): Check if related parts
- are displayed, if not, remove them. For #2741.
-
-2002-02-24 Chris Toshok <toshok@ximian.com>
-
- * folder-browser.c (folder_browser_search_do_search): rename
- folder_browser_search_query_changed to this.
- (folder_browser_gui_init): hook both query_changed and
- search_activated up to folder_browser_search_do_search, preserving
- current behavior.
-
-2002-02-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * message-list.c (on_message_list_built): Removed, this wasn't
- working as intended and seemed to break other features.
-
-2002-02-21 Ettore Perazzoli <ettore@ximian.com>
-
- * component-factory.c (create_component): Add an icon for the "New
- message" user creatable item.
-
-2002-02-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * message-list.c (on_message_list_built): Connect to our own
- message_list_built signal. Focus the list and select the first
- unread message (or frst message depending). Fixes bug #3900.
-
-2002-02-20 Anna Marie Dirks <anna@ximian.com>
-
- * message-tag-editor.c (message_tag_editor_init): Gave the editor
- window a title and an icon.
-
-2002-02-20 Anna Marie Dirks <anna@ximian.com>
-
- * message-tags.glade: Changed the policy for table2 so that it
- does not expand/fill. This was necessary to allow the message list
- as much growing room as possible. (And besides, there's no reason for
- table2 to expand/fill; its child widgets can't change size.
-
-2002-02-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (confirm_goto_next_folder): Prompt the user to
- find out if he/she wants to go to the next folder with unread mail
- in it.
- (find_current_folder): Find a given CamelFolderInfo node based on
- a given uri.
- (find_next_folder_r): Recursively look for a CamelFOlderInfo node
- which has unread messages.
- (find_next_folder): Given a currently selected CamelFolderInfo
- node, look for the next node containing unread messages.
- (do_evil_kludgy_goto_next_folder_hack): Find the currently
- selected folder and then find the very next folder after it that
- contains unread messages and then select it via a CORBA call to
- the shell.
- (next_unread_msg): If we fail to find an unread message in the
- message-list, prompt the user to find out if we should jump to the
- next fodler containing unread messages. If so, call
- do_evil_kludgy_goto_next_folder_hack().
-
- * message-list.c (message_list_select): Return a boolean value
- based on whether the call was successfull or not.
-
- * mail-config.c (mail_config_get_confirm_goto_next_folder):
- (mail_config_set_confirm_goto_next_folder):
- (mail_config_get_goto_next_folder):
- (mail_config_set_goto_next_folder): All new functions, yay.
- (config_read): Read in the confirm_goto_next_folder and
- goto_next_folder config options.
- (mail_config_write_on_exit): Same the options here.
-
-2002-02-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-gui.c (basename_from_uri): Ack, strip off the
- leading '/' char and also only translate if it is a local uri,
- imap folders and other external folders will be named by the user
- so no need to translate those.
-
- * mail-display.c (do_attachment_header): Don't display a
- down-arrow if the attachment is undisplayable. Fixes bug #6919.
- (launch_cb): Some programs are buggy when it comes to parsing
- file: uris, so make sure we do file://%s. Fixes bug #20456.
-
-2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-gui.c (basename_from_uri): Replacement for using
- g_basename and also translates the basename string to fix bug
- #7160.
- (mail_account_gui_save): Use basename_from_uri().
- (folder_picker_clicked): Here too.
-
- * mail-callbacks.c (mail_generate_reply): Default the from-account
- to the source account. If that fails, then guess the from-account
- based on the recipients. Fixes bug #20479.
-
-2002-02-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-display.c (drag_data_get_cb): Implement.
- (drag_data_delete_cb): Implement.
- (do_attachment_header): Setup Drag & Drop. This implements
- bugzilla bug #1066.
-
- * folder-browser-ui.c: Set the followup icon to use the new flag
- icon rather than the exclamation mark icon.
-
- * mail-callbacks.c (flag_for_followup): Append the selected
- messages to the clist in the followp editor.
-
- * message-list.c: Include the new flag-for-followup icon.
-
- * message-tag-followup.c (message_tag_followup_append_message):
- New method to add a message to the message-list.
- (construct): Get the message_list widget and load the flag icon
- pixmap.
-
-2002-02-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * message-tag-followup.c (set_widget_values): Fixed a bug.
-
- * mail-callbacks.c (flag_for_followup): If only 1 message is
- selected and it happens to already be marked for follow-up, set
- the value of the flag on the editor so the settings are restored.
-
- * folder-browser-ui.c: Set the pixmaps on MarkAsRead, MarkAsUnread
- and MarkAsImportant bonobo verbs. Also connect to
- flag-for-followup verb.
- (folder_browser_ui_set_selection_state): Added MessageFollowUpFlag
- verb to the array of verb strings.
-
- * folder-browser.c: Set key accelerators on the follow-up
- right-click menu items to match Outlook.
-
-2002-02-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (create_msg_composer): No longer need to call
- e_msg_composer_show_sig_file(). This gets handled auto-magically
- by a signal emition when the default From address chooser gets
- created.
- (do_forward_non_attached): No longer need to call it here either
- because e_msg_composer_set_body_text() now makes sure to re-show
- the signature.
-
-2002-02-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (do_forward_non_attached): Show the signature.
-
-2002-02-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * message-list.c (ml_tree_value_at): Get followup-up message-list
- values. Also highlight the message in red if the due-by date is
- past due (this is what Outlook does).
- (ml_duplicate_value): Handle follow-up columns.
- (ml_free_value): Same.
- (ml_initialize_value): Here too.
- (ml_value_is_empty): And here.
- (ml_value_to_string): And finally here.
-
- * message-tag-followup.c (message_tag_followup_i18n_name): New
- convenience function.
-
-2002-02-11 Radek Doulik <rodo@ximian.com>
-
- * mail-callbacks.c (create_msg_composer): unset changed, drop
- editor undo
- (mail_generate_reply): drop editor undo
- (do_forward_non_attached): ditto
- (do_forward_attach): ditto
- (do_redirect): ditto
-
-2002-02-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser.c (followup_tag_complete): Implemented.
- (on_right_click): Do better enabling/hiding of unwanted
- flag-for-followup options.
-
-2002-02-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * message-tag-followup.c (set_widget_values): Set the correct
- drop-down menu item.
- (message_tag_followup_encode): Return NULL if the type is NONE.
- (clear_clicked): Set the drop-down menu to None.
- (type_changed): Hide the None menu item.
- (construct): Create a None menu item and set it as the default.
-
-2002-02-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * message-tag-followup.[c,h]: New flag-for-followup tag editor
- dialog.
-
- * mail-callbacks.c (flag_for_followup): New callback that pops up
- a flag-for-followup editor dialog.
- (flag_followup_completed): Marks all flag-for-followup'd messages
- as 'complete'.
- (flag_followup_clear): Clears all flag-for-followup tags from the
- selected messages.
-
- * message-tags.glade: glade file for tag editors.
-
-2002-02-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * message-tag-editor.[c,h]: Base class for a message tag editor.
-
- * folder-browser.c (on_right_click): Setup the hide/enable masks
- for "Flag for Follow-up"
-
- * mail-callbacks.c (confirm_expunge): Instead of hiding deleted
- messages and then expunging, disable the use of the message-list
- completely during the expunge operation.
- (expunged_folder): Re-enable the use of the message-list widget
- here.
-
-2002-02-07 Radek Doulik <rodo@ximian.com>
-
- * mail-callbacks.c (mail_generate_reply): call set_body later to
- allow ignored words to be sent to gtkhtml control ahead
-
-2002-02-07 JP Rosevear <jpr@ximian.com>
-
- * component-factory.c (create_component): remove "New" from user
- creatable menu item
-
-2002-02-07 Christopher James Lahey <clahey@ximian.com>
-
- * folder-browser.c, folder-browser.h, folder-browser-ui.c,
- folder-browser-ui.h
- (folder_browser_ui_setup_view_menus,
- folder_browser_ui_discard_view_menus): Changed this to use the new
- GalViewMenus stuff. Made these exported functions.
-
- * mail-callbacks.c, message-browser.c: Changed these to not pass
- the now removed row parameter to message_list_select.
-
- * mail-config.c, mail-config.h (mail_config_folder_to_safe_url):
- Refactored this out of mail_config_folder_to_cachename.
-
- * message-list.c, message-list.h (message_list_select): Removed
- the row argument. Changed this to use the new function in ETree
- for finding the next cursor row that matches a test.
- (message_list_construct): Handle a failed construction of the
- ETree here.
- (message_list_setup_etree, save_tree_state): Don't load or save
- the header state. folder-browser-ui.c deals with this now.
-
-2002-02-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-gui.c (mail_account_gui_new): Rearranged the #if
- checks so that we don't ever try to access any smime widgets
- (since they are now being destroyed) if smime isn't enabled.
- (mail_account_gui_save): Same here.
-
- * message-list.c: Removed references to NEEDS_REPLY.
-
- * mail-callbacks.c (mark_as_needing_reply): Removed.
- (mark_as_not_needing_reply): Removed.
- (toggle_need_reply): Removed.
-
- * folder-browser.c (on_right_click): Remove CAN_MARK_NEEDS_REPLY
- stuff, this is going to be implemented in an entirely different
- way.
-
- * mail-format.c (handle_text_plain): Look for DOCTYPE XML comments
- too to decide if the message content is really HTML.
-
-2002-02-06 Not Zed <NotZed@Ximian.com>
-
- * mail-callbacks.c (mail_generate_reply): Dont double-free the
- text body data.
-
-2002-01-31 Not Zed <NotZed@Ximian.com>
-
- * mail-callbacks.c (mail_generate_reply): Add attachments after
- we've seen if the composer object is valid.
- (mail_generate_reply): Support new flag REPLY_NO_QUOTE - if set,
- then dont quote any of the message in the reply.
-
-2002-02-02 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-account-gui.c (mail_account_gui_new): Destroy the S/MIME
- frame if not available, instead of just graying it out. [I would
- just hide it, but it looks like there is a show_all somewhere so
- that doesn't work.]
-
-2002-02-02 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-config.glade: Some touchups from me and Anna.
-
-2002-01-31 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (composer_get_message): Don't bother setting
- the auto-cc/bcc recipients here. I'm moving the code to add them
- in the GUI in the composer so they will already be in the
- recipient list by this point.
-
-2002-01-31 Radek Doulik <rodo@ximian.com>
-
- * mail-callbacks.c (mail_generate_reply): ignore spell checking of
- words in addresses, move set_body_text after all ignored words are
- set so we don't have to spell check whole document again
- (mail_ignore_address): helper function
- (mail_ignore): ditto
-
-2002-01-30 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-accounts.c (mail_edit): Pass the parent window to
- mail_account_editor_new().
-
- * mail-account-editor.c (mail_account_editor_new): Set the parent
- window here because construct() inadvertantly
- gtk_widget_show_all's the editor.
-
- * mail-account-gui.c (mail_account_gui_save): Use g_basename()
- rather than strrchr for '/' especially since the strrchr code
- wasn't doing any NULL checks.
-
-2002-01-30 Radek Doulik <rodo@ximian.com>
-
- * mail-format.c (handle_text_plain_flowed): print quoted text in
- italic
-
-2002-01-30 Not Zed <NotZed@Ximian.com>
-
- * component-factory.c (create_component): re-enable popup menu.
- (populate_folder_context_menu): If we're on a vfolder, and its not
- UNMATCHED, create a change properties item, and set it up
- approriately.
- (change_prop_popup): Callback to edit the vfolder rule. For
- #3358.
-
-2002-01-29 Dave West <kat@unleashed.org>
-
- * mail-callbacks.c (create_msg_composer): Changed the function
- signature so that we can pass in whom we want to compose as.
- Should fix bug #10391.
- (compose_msg): Get the current profile account and pass it along
- to create_msg_composer.
- (send_to_url): Pass in a NULL profile account to cause
- create_msg_composer to use the default account.
-
-2002-01-29 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-ops.c (mail_send_message): Make X-Evolution-Account take
- priority over X-Evolution-Transport. Should we just get rid of
- X-Evolution-Transport? Anyways, this ought to fix a number of
- complaints.
-
- * mail-accounts.c (construct): Don't pass NULL text to
- gtk_entry_set_text. Maybe this will fix bug #18971.
-
-2002-01-29 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (redirect): New function that implements the
- Redirect feature.
-
- * mail-ops.c (mail_send_message): If we are redirecting a message,
- get the Resent-* recipients otherwise get the normal To/Cc/Bcc
- recipients and use them in the CamelTransport::send_to() method.
-
- * mail-session.c (main_get_filter_driver): Set the beep_func to
- the beep_cb, not the play_sound_func. Oops ;-)
-
- * folder-browser-ui.c: Add Redirect bonobo verb thingy here.
- (folder_browser_ui_set_selection_state): Add MessageRedirect to
- the proper string arrays.
-
-2002-01-29 Radek Doulik <rodo@ximian.com>
-
- * mail-callbacks.c (do_mail_print): initialize line to 0 to make
- everybody happy ;-)
- ops, set local_font to NULL
- (do_mail_print): get rid of static global variables, as they are
- not thread safe (thanks to clahey for pointing this out)
- (footer_info_free): unref footer font
-
-2002-01-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (composer_get_message): Don't bother checking
- for invalid recipients anymore. If a recipient is invalid, the
- transport error message will specify that now.
-
-2002-01-28 Radek Doulik <rodo@ximian.com>
-
- * mail-callbacks.c (do_mail_print): print footer
- (footer_print_cb): print page number and number of pages
-
-2002-01-27 Ettore Perazzoli <ettore@ximian.com>
-
- * importers/Makefile.am: Use IMPORTERS_CFLAGS.
-
-2002-01-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-gui.c (delete_event_cb): We need to return a value
- here. I think FALSE is fine (I hope).
-
- * mail-display.c (save_data_cb): Save the pathname.
- (save_part): Use the new mail_config cruft to get the last used
- save pathname.
-
- * mail-config.c (config_read): Read in last_filesel_dir string.
- (mail_config_write_on_exit): Save the last_filesel_dir setting.
- (mail_config_get_last_filesel_dir): New
- (mail_config_set_last_filesel_dir): New
-
- * component-factory.c (destination_folder_handle_motion): Do some
- NULL checking on the url before using it.
- (destination_folder_handle_drop): Make sure the uri is non-NULL
- before freeing.
-
-2002-01-24 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am: s/MAILER_CFLAGS/EVOLUTION_MAIL_CFLAGS/,
- s/MAILER_LIBS/EVOLUTION_MAIL_LIBS/.
-
-2002-01-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-session.c (session_system_beep): This wrapper for gdk_beep().
-
- * mail-account-gui.c (is_email): Don't bother trying to see if the
- domain looks like a FQDN.
-
- * mail-callbacks.c (select_all): If the mail-display is in focus,
- then select-all in the mail display rather than the
- message-list. Fixes bug #19126.
-
-2002-01-23 Ettore Perazzoli <ettore@ximian.com>
-
- * component-factory.c (create_component): Pass a NULL icon to
- `evolution_shell_component_add_user_creatable_item()'.
-
-2002-01-23 Jeffrey Stedfast <fejj@ximian.com>
-
- Implements bug #15692
-
- * folder-browser.c (html_button_press_event): New callback that
- checks to make sure that the mouse isn't over a link or image in
- the html view and then calls the on_right_click handler after
- getting the appropriate args.
- (my_folder_browser_init): Connect to the button_press_event here.
-
-2002-01-23 Dan Winship <danw@ximian.com>
-
- * Makefile.am (INCLUDES): Define CAMEL_PROVIDERDIR to be the
- configure.in-defined camel_providerdir. (Was supposed to have been
- committed a month ago... oops.)
-
-2002-01-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-ops.c (mail_filter_folder): Now takes a boolean notify
- argument. If this is *not* set, then remove the sound-notify
- filter rule that mail-session adds. Kinda kludgy, but good enough
- for the moment.
-
- * mail-callbacks.c (guess_me): Simplified.
-
-2002-01-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (handle_text_plain): If the first "token" in the
- body is "<html>", then treat this as a text/html part rather than
- a text/plain part. Fixes bug #16817.
-
- * component-factory.c (destination_folder_handle_drop): Removed
- some unused variables.
-
-2002-01-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (try_uudecoding): Update to match new uudecode
- interface (ie, no longer need a uulen state variable).
-
-2002-01-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-display.c (on_set_base): New callback to handle the
- set_base signal.
- (on_url_requested): If the base_url is set, prepend it to the data
- url (we don't want to do this for cid urls or part urls tho).
- (mail_display_init): Initialize md->base_url to NULL.
- (mail_display_destroy): Free the base_url.
- (mail_display_initialize_gtkhtml): Connect to the set_base signal.
- (on_link_clicked): If the base_url is set, prepend it to the url
- string passed to us from gtkhtml.
-
-2002-01-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (do_edit_messages): Don't remove any
- X-Evolution* headers here, the composer already knows to ignore
- these. Besides, it needs to know the X-Evolution-Format header.
-
-2002-01-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (composer_save_draft_cb): Do proper refcounting
- on the draft folder.
-
- * message-list.c (message_list_select): When performing a
- wraparound, check to see if the first (or last depending on
- direction) message fits the selection criteria before telling
- etable to find the next/previous matching node.
-
- * mail-account-gui.c (mail_account_gui_new): When connecting to
- the transport username changed event, pass the gui->transport not
- the gui->source.
-
-2002-01-08 Iain Holmes <iain@ximian.com>
-
- * importers/evolution-mbox-importer.c (string_to_int): Takes a hex
- string and converts it to an int.
- (get_info_from_mozilla): Creates a CamelMessageInfo structure from
- the X-Mozilla-Status header.
- (process_item_fn): Check for the X-Mozilla-Status header and if it
- is present call get_info_from_mozilla. If get_info_from_mozilla
- returns that the message was marked as deleted but never expunged
- it isn't imported.
-
- * importers/mozilla-status-headers.h: Stuff Evolution cares about
- from the mozilla header.
-
-2002-01-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.c (mail_config_set_new_mail_notify_sound_file): Renamed.
- (mail_config_get_new_mail_notify_sound_file): Renamed.
-
- * mail-accounts.c (notify_radio_toggled): Replace EXEC with
- PLAY_SOUND.
- (construct): renamed the exec_command stuff to play_sound.
-
- * main.c (main): Init and shutdown gnome_sound.
-
- * mail-ops.c (fetch_mail_fetch): Don't do any new-mail
- notification here.
- (filter_folder_filter): call camel_filter_driver_flush.
-
- * mail-session.c (main_get_filter_driver): Set the filter-driver
- exec_func here instead.
-
- * mail-ops.c (mail_fetch_mail): Don't set the filter-driver
- exec_func here.
-
-2002-01-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (composer_get_message): Add an Organization
- header.
-
-2002-01-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (list_add_addresses): Simplified. Also no
- longer needs an "ignore_addr" argument as far as I can tell so
- that has been removed.
- (mail_generate_reply): Don't pass an ignore_addr argument to
- list_add_addresses and also change to use g_strcase_hash and
- g_strcase_equal since addresses are not case snesitive
- (mostly). Also, Reply-To can contain multiple addresses, so handle
- this case too.
-
-2002-01-02 JP Rosevear <jpr@ximian.com>
-
- * mail-callbacks.c: remove e_gnome_dialog util functions and use
- e-util ones instead
-
-2001-12-21 Jeffrey Stedfast <fejj@ximian.com>
-
- The idea here is that if we consistantly name the movemail file
- between Send&Receive sessions that if the user cancells the
- "download" of a mbox spool that the next Send&Receive will not
- "lose" mail that didn't finish the previous session. Fixes bug
- #17759. Well, mostly. If you have 200 messages and cancel after
- the first 100, say, then the next time you hit Send&Receive, it
- will start over from 1 so you'll end up duplicating the first 100
- messages, but at least you won't "lose" mail.
-
- * mail-tools.c (mail_tool_get_local_movemail_path): Now a static
- internal function, takes a char *uri argument and no longer
- generates movemail.%d filenames... they are now based on the uri
- provided.
- (mail_tool_do_movemail): Pass along the source_uri.
-
-2001-12-20 Jon Trowbridge <trow@ximian.com>
-
- * message-list.c (on_click): Makes the auto-undelete behavior when
- changing message flags a bit more sane. (Fixes #17634)
-
-2001-12-20 Ettore Perazzoli <ettore@ximian.com>
-
- [Fixes #17377, Evolution doesn't work on multi-depth displays.]
-
- * main.c (main): Push GdkRGB visual and colormap.
-
-2001-12-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (composer_get_message): Add the auto-cc/bcc
- recipients here. The problem with setting them in the composer is
- that what if the user changes which account he wants to use? We'd
- either have to clear the cc/bcc lists *or* we'd have to leave them
- alone. Either way is bad. We can't just clear the entries because
- the user may have added addresses since the composer was
- opened. We don't want to leave any old auto-cc/bcc addresses there
- because that isn't desirable either. So we give up and add them
- here after the user has already hit the send button.
-
- * mail-config.c (account_copy): Update to copy the always-[b]cc
- options.
- (account_destroy): Update to destroy the above options.
- (config_read): Update to read in those values.
- (mail_config_write): Save those options.
-
- * mail-account-gui.c (mail_account_gui_new): Setup Always Cc/Bcc
- widgets.
- (mail_account_gui_save): Get the user-entered values for the
- always-cc/bcc stuff.
-
-2001-12-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-gui.c (setup_service): If the provider is NULL,
- don't do anything.
-
- * mail-accounts.c (construct): Oops, no wonder the exec command
- thing never stuck around... I wasn't getting the right widget from
- libglade. Also connect to the GtkEntry's changed event since a
- GnomeFileEntry doesn't have that signal in its ancestry.
-
-2001-12-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-ops.c (filter_folder_free): Argh, don't notify about new
- mail here.
- (fetch_mail_fetch): Notify about new mail here instead.
-
- * mail-accounts.c (construct): Setup the new-mail-notification
- widgets.
- (notify_command_changed): Update the command-line for new mail
- notification.
- (notify_radio_toggled): Update the new-mail-notification type.
-
- * mail-ops.c (filter_folder_free): See if we got any new mail and
- "sound the alarm" if we did.
-
-2001-12-17 Jon Trowbridge <trow@ximian.com>
-
- * mail-format.c (handle_text_plain_flowed): Set citation color to
- black when we are printing.
-
- * mail-format.c (attachment_header): Avoid embedding <object> tags
- when we are printing.
- (handle_multipart_signed): Don't do the click-for-info signature
- stuff when we are printing.
- (handle_via_bonobo): Don't embed an <object> tag if we are
- printing.
-
- * folder-browser.c: Changed context_menu[] array so that we can
- print when the preview pane is closed.
-
-2001-12-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-ops.c (mail_fetch_mail): Set the filter driver's shell-exec
- callback.
-
-2001-12-12 Jeffrey Stedfast <fejJ@ximian.com>
-
- * mail-config.c (mail_config_check_service): Connect to the
- destroy signal on the popup dialog.
-
-2001-12-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (handle_text_plain): Make sure i != num_specials
- after we check for any special text markers. Fixes bug #12265.
-
-2001-12-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (compose_msg): Connect to the save-draft signal.
- (send_to_url): Here too.
- (mail_reply): And here...
- (forward_get_composer): Same.
- (do_edit_messages): And finally here.
-
- * mail-format.c (try_inline_pgp):
- (try_inline_pgp_sig): Start reiplementing The Right Way and not
- danw's fucking half-assed kludge that doesn't work.
-
-2001-12-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.c (mail_config_set_new_mail_notification_command):
- set the new-mail-notify command.
- (mail_config_get_new_mail_notification_command): get the
- new-mail-notify command.
- (mail_config_set_new_mail_notification): set the
- new-mail-notification action.
- (mail_config_get_new_mail_notification): get the
- new-mail-notification action.
- (mail_config_write_on_exit): save the new-mail-notification
- settings.
- (config_read): Read in the new-mail-notification settings.
-
- * mail-ops.c (mail_execute_shell_command): New function to execute
- a shell command async. Will be used for playing sounds on new mail
- or whatever.
-
-2001-12-11 Jon Trowbridge <trow@ximian.com>
-
- * mail-identify.c (mail_identify_mime_part): Fixed for
- mail_content_loaded's new signature.
-
- * mail-format.c (attachment_header): Don't convert URLs, etc. if
- we are printing.
- (write_address): Don't convert addresses to mailto: links if we
- are printing.
- (write_one_text_plain_chunk): Add a printing flag, that we pass
- along to mail_text_write.
- (handle_text_plain): Pass our printing flag to
- write_one_text_plain_chunk.
- (mail_get_message_rfc822): Don't unneccesarily convert URLs.
- (mail_content_loaded): Add a GtkHTML parameter.
-
- * mail-display.c (mail_display_initialize_gtkhtml): Added. Breaks
- all of the signal hookups out of mail_display_new.
- (mail_display_new): Call mail_display_initialize_gtkhtml.
- (mail_text_write): Don't convert URLs, etc., if we are printing.
- Lots of other changes to pass around GtkHTML/GtkHTMLStream objects.
-
- * mail-callbacks.c (do_mail_print): Call
- mail_display_initialize_gtkhtml on our GtkHTML object.
-
- * folder-browser.c (update_status_bar): Make the status bar more
- useful when you have a large number of hidden messages.
-
- * message-list.etspec: Add ETable magic for our new "Needs Reply"
- column. (The next few entries are for bug #90)
-
- * message-list.h: Add COL_NEED_REPLY.
-
- * message-list.c: Move mail_need_reply_xpm to the end of
- states_pixmaps.
- (ml_duplicate_value): Handle COL_NEED_REPLY.
- (ml_free_value): Handle COL_NEED_REPLY.
- (ml_initialize_value): Handle COL_NEED_REPLY.
- (ml_value_is_empty): Handle COL_NEED_REPLY. Added
- needs_reply_map[] array.
- (ml_value_to_string): Handle COL_NEED_REPLY.
- (ml_tree_value_at): Fix magic numbers, undoing my changes from the
- otehr day. Add handler for COL_NEED_REPLY.
- (message_list_create_extras): Attach icons for COL_NEED_REPLY.
- (on_click): Undo my previous changes to display need-reply status
- in COL_MESSAGE_STATUS. Add handing for COL_NEED_REPLY.
-
- * mail.h: Change mail_format_mime_message, mail_format_raw_message
- and the MailMimeHandlerFn typedef to take GtkHTML and
- GtkHTMLStream args, as per our changes in mail-format.c.
-
- * mail-format.c: Giant refactoring. Remove the assumption
- throughout that we will always want to render into the GtkHTML
- object contained in the MailDisplay. Instead, always pass in the
- GtkHTML and GtkHTMLStream that we want to write to. Also, ignore
- theme work-arounds if the printing flag is set. (This and what
- follows fixes bug #82)
-
- * mail-display.h: Remove GtkHTMLStream *stream from MailDisplay.
- We don't need it anymore.
-
- * mail-display.c (mail_display_render): Added. Breaks the code
- that renders the message into the GtkHTML object out of
- mail_display_redisplay.
- (mail_display_redisplay): Call mail_display_render.
- (mail_display_init): Remove reference to ->stream.
- (mail_display_new): Remove reference to ->stream.
-
- * mail-callbacks.c (do_mail_print): Create a new GtkHTML to render
- our printed version into (via the new function
- mail_display_render. Set the MailDisplay's printing flag to TRUE
- before we render, and set it back to FALSE afterwards.
- (do_mail_fetch_and_print): If the preview pane isn't open when we
- try to print, fetch the message before printing.
- (print_msg): Call do_mail_fetch_and_print.
- (print_preview_msg): Call do_mail_fetch_and_print.
-
- * folder-browser-ui.c: Remove "PrintMessage" and
- "PrintPreviewMessage" from message_pane_enables... these now work
- when the preview pane is closed. Disable printing if multiple
- messages are selected.
-
-2001-12-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-ops.c (filter_folder_filter): Don't expunge when we sync
- anymore, this fixes bug #4472.
-
-2001-12-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-autofilter.c (rule_from_message): Make sure that the
- message subject is non-NULL beforetrying to base a vfolder rule
- off it. Fixes bug #16284.
-
-2001-12-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-accounts.c (construct): Connect to the dialog's "destroy"
- event and close any druids/editors that may be open when that
- signal is caught. Fixes bug #16501.
-
- * mail-vfolder.c (vfolder_edit): Set the window title to "Virtual
- Folders". Fixes bug #16695.
-
-2001-12-05 Radek Doulik <rodo@ximian.com>
-
- * mail-callbacks.c (do_mail_print): set paper size to
- _("US-Letter"), use gtk_html_print_set_master
-
-2001-12-08 Dan Winship <danw@ximian.com>
-
- * mail-display.c (on_object_requested): Don't just assume all of
- the GtkHTMLEmbedded's fields are filled in, since HTML messages
- may have <object>s in them that we're not expecting.
-
-2001-12-07 Dan Winship <danw@ximian.com>
-
- * mail-send-recv.c (mail_send_receive): Add a "current_folder"
- arg.
- (build_dialogue): Remember the current_folder
- (free_send_data): If current_folder is set, refresh it so it's
- guaranteed to be synced with the folder tree. Fixes #14770.
-
- * mail-callbacks.c (send_receive_mail): Pass current_folder to
- mail_send_receive().
-
-2001-12-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-display.c (stream_write_or_redisplay_when_loaded): Check
- that the mail-display hasn't been destroyed.
- (mail_display_redisplay): Same here.
-
-2001-12-07 Dan Winship <danw@ximian.com>
-
- * mail-send-recv.c (receive_update_got_store): If updating a store
- that we don't have an associated storage for, just request a
- folder tree and then free it. (For the Connector)
-
- * mail-callbacks.h: Add missing part of Jeff's 12-03 patch so this
- actually compiles.
-
-2001-12-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-ops.c (mail_send_message): s/PREVIEW_RELEASE/VERSION_COMMENT
-
-2001-12-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-ops.c (mail_send_message): Don't append "(Preview Version)"
- at the end of the version string. Use the PREVIEW_RELEASE #define
- instead.
-
-2001-12-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser-ui.c: Setup the UI for the AddSenderToAddressbook
- ui verb thingy.
-
- * mail-callbacks.c (add_sender_to_addrbook): New bonobo-ui
- callback that adds a sender to the addressbook.
-
-2001-12-04 Jon Trowbridge <trow@ximian.com>
-
- * folder-browser-ui.c (folder_browser_ui_set_selection_state):
- Allow 'n' and 'p' to work when multiple messages are selected.
- Fixes #12062.
-
-2001-11-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (save_msg_ok): If the path exists, make sure
- it's a regular file (or we can't possibly save to it). Fix for
- #14127.
-
-2001-11-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * message-list.c (message_list_select): Cleaned up the code.
-
- * mail-callbacks.c (previous_unread_msg): Pass wraparound as TRUE.
-
-2001-11-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.c (pgpopen): Fix the boolean check to be && and not
- ||.
-
-2001-11-20 Not Zed <NotZed@Ximian.com>
-
- * folder-browser-ui.c: Disable search if no message
- loaded/viewed. Also for #14348.
-
- * folder-browser.c: Disable "Add sender to addressbook" if we dont
- have a message loaded (it wont work). For #14348.
-
-2001-11-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-display.c (load_content_loaded): Make sure the mail-display
- object is still "alive" before accessing any of it's data.
-
-2001-11-14 Zbigniew Chyla <cyba@gnome.pl>
-
- * mail-autofilter.c (rule_match_recipients, rule_from_message,
- rule_from_mlist): s/_/U_/ (filter_rule_set_name requires UTF-8 string)
-
-2001-11-14 Dan Winship <danw@ximian.com>
-
- * main.c (segv_redirect): Instead of doing pthread_exit() after
- redirecting the SEGV, try to lock a mutex we know is already
- locked. This will hopefully help debug a bunch of bugs where the
- crashed thread seems to be missing from the bug-buddy report.
-
-2001-11-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-session.c (pass_got): Call e_passwords_remember_password()
- for account passwords if the user set the "remember password"
- checkbox.
-
-2001-11-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-vfolder.c (vfolder_load_storage): Add a NULL check for
- rule->name.
- (mail_vfolder_add_uri): Same here.
-
-2001-11-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (forward_message): If we already have the
- message loaded in the mail-display, don't bother re-loading. This
- happens to fix bug #14848.
-
-2001-11-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-tools.c (mail_tools_x_evolution_message_parse): Was
- x_evolution_message_parse from folder-browser.c. A space char is
- no longer used to separate the folder URI and the first uid,
- instead this is now done with a nul-char so update to parse the
- newer/better format.
-
- * component-factory.c (destination_folder_handle_drop): Update to
- parse the new/better format.
-
- * folder-browser.c (x_evolution_message_parse): Moved to
- mail-tools.c
- (message_list_drag_data_get): Instead of placing a space char
- after the folder URI, instead use a nul-char.
-
-2001-11-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-accounts.c (pgp_path_changed): Call
- mail_config_pgp_type_detect_from_path() instead of doing our own
- lame auto-detection that didn't even work ;-)
-
- * mail-config.c (auto_detect_pgp_variables): Execute the pgp
- binary and look at it's version string if we have a version string
- to compare to.
- (mail_config_pgp_type_detect_from_path): New function that takes a
- pgp path and attempts to figure out what pgp version it is.
-
-2001-11-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (try_inline_pgp): Add a "x-inline-pgp-hack=true"
- paramter to the multipart's content-type.
-
-2001-11-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-editor.c (construct): Don't make the account editor
- modal either.
-
- * mail-accounts.c (mail_add): Use the new global account druid
- variable so that we can avoid having more than a single druid at a
- time. If a druid already exists, bring it to the top.
- (mail_edit): Same idea only for the account editor this time.
- (mail_editor_destroyed): Set the global editor to NULL.
- (mail_add_finished): Set the global druid to NULL.
- (mail_delete): Don't allow any deletes if an account editor is
- opened (we don't want to be able to delete the account we are
- editing...)
- (news_edit): Same thing for the news editor.
- (news_editor_destroyed): Set the news editor to NULL.
- (news_add): And again for the news add.
-
- * mail-account-gui.c (service_check_supported): Updated to pass a
- GtkWindow argument to mail_config_check_service().
-
- * mail-config.c (mail_config_check_service): Now takes a GtkWindow
- argument so we can set our parent window. Also, don't make this
- dialog modal either.
-
- * mail-config-druid.c (construct): Don't make this druid modal.
-
-2001-11-05 <NotZed@Ximian.com>
-
- * message-browser.c (set_bonobo_ui): Override the Move/Copy
- handlers setup by the folder_browser_ui code, and use our own,
- because we need to pass it a live window which we can't.
- (transfer_msg): Our own version of mail-callbacks.c:transfer_msg,
- so we can properly pass the parent to the user_select_folder.
- (transfer_msg_done): Also copy this so we can pass it diff args.
- All fix #13919.
-
- * mail-callbacks.c (transfer_msg): Set physical/uri to NULL before
- calling, because althought he shell client api call is supposed to
- null these out, it doesn't with its stupid assertion checks on
- entry. Also free physical to plug a memleak. Bugs exposed by
- #13919.
-
-2001-11-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-display.h (mail_html_write): Renamed from
- mail_html_write_string.
-
- * mail-display.c (mail_text_write): Don't bother with varargs
- since nothing used them, we were only passing strings anyway...
- (mail_error_printf): Renamed from mail_error_write, this makes
- more sense.
- (mail_html_write): Removed.
-
- * mail-format.c: Updated to use gtk_html_stream_printf directly
- and s/mail_html_write_string/mail_html_write.
- (mail_lookup_handler): Don't use %.*s here either...
- (handle_text_enriched): Same.
- (write_one_text_plain_chunk): And finally here (also update for
- new mail_text_write api).
- (handle_multipart_signed): Update for new mail_text_write api.
- (format_mime_part): Update for new mail_error_text/printf name
- change.
- (handle_multipart_encrypted): Same.
-
- * mail-tools.c (mail_tool_generate_forward_subject): Same as
- mail_generate_reply.
-
- * mail-callbacks.c (mail_generate_reply): Don't use %.*s in any
- *printf* functions.
-
-2001-11-02 Christopher James Lahey <clahey@ximian.com>
-
- * message-list.c (ml_tree_value_at): Use GINT_TO_POINTER here for
- platforms where simply casting an int to void * won't work.
- (build_flat_diff, main_folder_changed): Call
- e_tree_model_pre_change here.
-
-2001-11-02 <NotZed@Ximian.com>
-
- * message-browser.c (message_browser_message_list_built):
- Disconnect from the message_list_built function so we dont do it
- every time the list is rebuilt.
-
- * mail-callbacks.c (composer_send_cb): Disable autosave when we're
- sending mail.
- (composer_sent_cb): Re-enable autosave.
-
- * folder-browser-ui.c (fbui_sensitize_timeout): Make sure we reset
- any data we're using on the folderbrowser before doing anything
- 'cause things could vanish while we're doing it, and also
- ref/unref the folderbrowser so it doesn't vanish while w'ere
- working.
-
- * folder-browser.c (folder_browser_set_ui_component): If we are
- changing the ui comp, remove any pending timeouts. For #13719.
-
-2001-11-01 Larry Ewing <lewing@ximian.com>
-
- * folder-browser.c (folder_browser_copy): fix cut & paste from the
- message body.
-
-2001-11-01 Dan Winship <danw@ximian.com>
-
- * mail-format.c (handle_multipart_signed): Write out the url
- before callind add_url since add_url may free it. Fixes #13839.
- Remove debug printf.
-
- * mail-display.c (on_object_requested): Remove debug printf.
-
-2001-10-31 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (list_add_addresses): Don't use a
- case-sensitive comparison.
-
-2001-10-31 Dan Winship <danw@ximian.com>
-
- * mail-format.c (try_inline_pgp_sig): Make this work again.
-
-2001-10-30 Larry Ewing <lewing@ximian.com>
-
- * mail-account-gui.c (delete_event_cb): add delete_event_handler.
- (menu_file_save_close_cb): add save and close command.
- (launch_signature_editor): initial the editor as having changed
- and attach the delete event handler.
-
-2001-10-30 <NotZed@Ximian.com>
-
- * message-browser.c (d): Turn it off.
-
- * mail-mt.c: Added exception strings to some of the op logging.
-
- * mail-format.c (elide_quotes): Remove, uh, what was this for, its
- not used anywhere? Also loops the instant it had a ", good one
- trow! :)
- (write_address): Remove name_arg/email_arg, these aren't used
- anywhere.
-
- * mail-mt.c (mail_msg_received): If we have a cancellation setup,
- destroy it immediately, to save fd's.
- (mail_msg_cancel): Check cancel != NULL.
- (mail_msg_free): Same.
-
- * folder-info.c: Comment out the Folder: and you've got mail
- prints.
-
- * mail-config-druid.c (wizard_next_cb): If we have a next
- function, honour if it tells us its going to set the page, and
- dont set it, otherwise, set it to the next page, unless we're at
- the end of our pages, and let the wizard do it itself.
- (wizard_back_cb): Same for going back. Rest of fix for #12127,
- see e-shell-startup-wizard for the rest.
- (next_func): If we're not on the last page, tell the druid we're
- gonna handle the next button, so we can sync properly with it,
- needed for above changes.
- (back_func): Similarly for going back past page 0.
- (wizard_listener_event): We want to set the page to the actual one
- asked for not, pagenum-1.
-
- * mail-local.c (mls_rename_folder): Oops, dont use the url storage
- path to offset the folder name we're renaming/opening, etc.
-
- * subscribe-dialog.c (fe_cancel_op_foreach): Argh!!! Dont free the
- async op data here, the async op is still running and will access
- it! Just try to cancel it and mark it as cancelled (id == -1)
- (fe_done_subscribing): Only remove outselves from the hash table
- if we're not cancelled. The handle should always be set here,
- since this code runs in the gui thread.
-
- * message-list.c (on_cursor_activated_idle): If nothing
- selected/cursor not activated, then select no message.
-
- * mail-folder-cache.c (update_1folder): Make the trash count
- optional on EVOLUTION_COUNT_TRASH, becuase some lusers are just
- too stupid to understand what its for.
-
- * component-factory.c (storage_xfer_folder): Return slightly
- better error codes for copying folders, since its not implemented
- yet.
-
- * mail-vfolder.c, mail-local.c, mail-folder-cache.c,
- message-list.c component-factory.c, mail-ops.c,
- subscribe-dialog.c, mail-session.c: d() out some debug printfs,
- w() out some warnings.
-
- * folder-browser-ui.c (folder_browser_ui_add_message): Fix typo,
- Resent->Resend.
-
-2001-10-29 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-ops.c (transfer_messages_transfer): Don't warn the user if
- the source and destination folders are the same.
-
-2001-10-29 Dan Winship <danw@ximian.com>
-
- * mail-format.c (handle_multipart_signed): add some debug spew re
- 13839.
-
- * mail-display.c (on_object_requested): here too
-
-2001-10-29 Christopher James Lahey <clahey@ximian.com>
-
- * e-searching-tokenizer.c (search_info_set_match_size_increase):
- Fixed a warning by #if 0ing out this function.
-
- * folder-browser.c, folder-browser.h (on_selection_changed):
- Update status bar in an idle call. Fixes Ximian bug #13929.
-
- * mail-folder-cache.c (folder_renamed, store_folder_renamed):
- Fixed some warnings here.
-
-2001-10-29 Dan Winship <danw@ximian.com>
-
- * folder-browser.c (folder_browser_copy): Fix the focus check.
- It's not fb->message_list that has focus, it's one of its
- children. #13616.
-
-2001-10-29 <NotZed@Ximian.com>
-
- * mail-folder-cache.c (store_folder_renamed): Sort the folder
- updates first, since we dont seem to get them in the right order,
- or infact in any tree representation whatsoever when using IMAP
- ...? get_folder_info bugs?
-
- Unrelated note to self, the subscribe dialogue may interfere with
- the folder cache.
-
- * mail-vfolder.c (rule_changed): Copy the folder's full_name
- before trying to use it to rename.
- (vfolder_edit_rule): Set 'orig' to be a reference of the original
- rule.
- (edit_rule_clicked): Dont lookup orig by name, copy it over
- instead.
-
- * folder-browser.c (got_folder): oops, emit signal before
- unreffing object, incase we got killded during getting folder.
- (got_folder): Reset get_id.
- (folder_browser_new): Set get_id of the get_folder task.
- (folder_browser_init): Init get_id.
- (folder_browser_destroy): IF we have outstanding 'get folder' op,
- cancel it.
-
-2001-10-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-gui.c (mail_account_gui_save): Call
- mail_autoreceive_setup() instead of
- mail_autoreceive_setup_account() since that code was completely
- broken anyway.
-
- * mail-send-recv.c (mail_autoreceive_setup_account): Removed.
-
- * mail-callbacks.c (transfer_msg_done): Move the message-list
- cursor to the next message.
- (transfer_msg): If we are moving messages, then pass
- transfer_msg_done() to mail_transfer_messages() so when it
- finishes it can move the cursor to the next undeleted message.
-
- * mail-format.c (try_inline_pgp): Check that the special PGP lines
- begin and end with \n so as to avoid matching against quoted PGP
- lines.
-
-2001-10-28 <NotZed@Ximian.com>
-
- * mail-callbacks.c (mark_all_as_seen): fb = user_data, not fb =
- fb!, fixes 13844.
-
- * mail-local.c (mlf_rename): add the folder name to the path when
- passing down to the subordinate folder.
-
- * folder-browser-ui.c (fbui_sensitize_timeout): Remove uic, kill
- dumb warning.
-
- * mail-autofilter.c (mail_filter_rename_uri): Implement function
- for filters to keep track of uri's being renamed.
- (mail_filter_delete_uri): Similarly for deleting uri's. Note that
- these functions are just noops though.
-
-2001-10-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser.c: Deactivate the Print right-click menu option
- if the message isn't loaded. Fixes bug #10346.
-
-2001-10-28 <NotZed@Ximian.com>
-
- * mail-vfolder.c (mail_vfolder_rename_uri): Implemented.
- (mail_vfolder_rename_uri): We do want to check renamed uri's from
- vstores.
- (mail_vfolder_delete_uri): Same.
- (store_folder_renamed): Fix the folder hash at the same time.
-
- * mail-folder-cache.c (real_flush_updates): Pass the rename event
- to vfolder rename uri.
- (real_flush_updates): Also rename and delete uri's from filters.
-
- * mail-local.c (mail_local_folder_reconfigure): Change the store
- path to be same as parent + mbox to be full path.
- (mls_delete_folder): Change store path to be parent path, and mbox
- to be full path.
- (mail_local_folder_reconfigure): Fix a leak of tmpname.
- (mls_delete_folder): Unref the store when done.
- (mls_rename_folder): Fix implementation, shell already created
- destination folder, so we can't just rename :(
-
- * component-factory.c (xfer_folder): Only do a rename if we have
- remove set, cleaned up logic a bit.
- (idle_quit): Put the components still active check last last of
- all.
- (storage_create_folder): IF we have a fragment, use that as part
- part for parent.
- (xfer_folder): Manually call rename code, since the shell will do
- a remove/add later on, AND there's no way we can determine the new
- path from the crock of an api we have to work with.
-
-2001-10-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (mail_format_get_data_wrapper_text): Allow the
- user to shoot him/herself in the foot when overriding message
- charsets. Permanantly fixes bug #921.
-
-2001-10-26 Dan Winship <danw@ximian.com>
-
- * folder-browser.c (etree_key): Work around something that we
- think is a GtkHTML bug, where sometimes the adjustments have
- slightly bogus values and scrolling ends up working backwards.
- (Ximian 4939)
-
- * mail-display.c (do_signature, do_attachment_header): Set the
- icon to be 24x24 here so that (assuming it's not a thumbnail), no
- resizes will have to be queued later. (There's still a bug with
- the text to the left of the button being drawn twice for some
- reason though.)
-
- * mail-callbacks.c (delete_msg): Fix a bug here that makes
- deleting multiple messages cause a gratuitous message body fetch.
- (Ximian 12355)
-
-2001-10-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (providers_config): Set the GdkWindow of the
- FolderBrowser, not the GtkWindow...
-
-2001-10-26 <NotZed@Ximian.com>
-
- * mail-local.c (mlf_set_folder): Changed to open the source store
- from '/', so we can do renames across directories. Of course,
- this doesn't quite work with different filesystems, but we'll
- assume this isn't a problem we're going to have.
- (mail_local_folder_get_type): Setup parent_class.
- (mlf_rename): Implement folder rename call, rename internal data.
-
- Is this a security issue? Well, not really, no more than anything
- else.
-
- * mail-folder-cache.c (mail_note_store): Listen to rename event.
- (store_folder_renamed): Function to handle it, empty.
- (mail_note_store_remove): Unhook from rename event.
- (mail_note_folder): Hook onto renamed event.
- (unset_folder_info): Unhook from renamed event.
- (folder_finalised): Lock around update.
- (folder_deleted): Lock around update.
- (real_flush_updates): If we have a path to remove remove it.
- (rename_folders): Scan folderinfo's, if we can find ones renamed,
- rename them, otherwise add them.
-
- * component-factory.c (owner_unset_cb): Use a timeout not an idle
- handler.
- (storage_xfer_folder): Implementation of xfer_folder signal
- handler, so we can rename imap/vfolders/etc.
-
- * component-factory.c (owner_unset_cb): Use a timeout not an idle
- handler.
-
- * mail-callbacks.c (providers_config): Only set the parent window.
-
- * mail-accounts.c (mail_edit): Set the parent on the account editor.
-
-2001-10-25 <NotZed@Ximian.com>
-
- * openpgp-utils.c (openpgp_verify): s/iconv/e_iconv/.
-
-2001-10-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-ops.c (send_mail_free): Don't forget to unref the filter
- driver here.
-
-2001-10-25 <NotZed@Ximian.com>
-
- * folder-browser-ui.c (fbui_sensitize_timeout): So apparently the
- uicomp can just 'vanish' while we're using it. Joy. Take care of
- that case here, fixes #13482.
- (fbui_sensitise_item): Check here too just for kicks.
-
- * mail-folder-cache.c (store_finalised): If we can't destroy our
- async event, then queue another one to do it.
- (store_finalised_finish): And handle it here, until we can, then
- free it.
- (mail_note_store): Queue an async event to get folderinfo, dont
- use mail_get_folderinfo.
- (update_folders_get): thread-async event to retrieve the
- folderinfo, and build it, then queues gui-async event to update
- the gui.
- (add_unmatched_info): Taken from mail-ops, adds unmatched if
- required.
- (add_vtrash_info): From mail-ops, add trash if required.
- (update_folders): Thread async event to update gui.
- (mail_note_store): Ref the store and storage when created.
- (update_1folder): Changed to assume we have info_lock, and store
- updates in an updates list.
- (setup_folder): Same.
- (folder_changed): Changed to call update_1folder directly.
- (real_folder_changed): Removed.
- (mail_note_folder): Changed to call update_1folder directly.
- (real_note_folder): Removed.
- (store_folder_subscribed): Call setup_folder directly.
- (real_folder_created): Removed.
- (real_flush_update): Function that actually does the updates in
- the gui thread.
- (mail_note_store): Go back to using mail_get_folderinfo.
- (update_folders): Fixed upf ro changed api's.
- (unset_folder_info): Changed to queue pending updates.
- (real_folder_deleted): Removed.
- (store_folder_unsubscribed): Do the removal work directly.
- (mail_note_store): Dont link to finalised event of store - we now
- ref it.
- (mail_note_store_remove): If we have any pending updates, clear
- them out. Also cancel any pending folderinfo retrieve operations.
- (update_folders): Remove our update from the storeinfo list, if it
- still exists.
- (update_1folder): Make 'sent folder shows all counts' optional via
- an environmental variable EVOLUTION_COUNT_SENT for all those
- bloody whinging lusers out there.
- (mail_note_store_remove): Unref the storage when done.
-
- * mail-mt.c (mail_async_event_emit): If we're in main and have a
- gui task, set it to run via an idle function.
- (idle_async_event): Wrapper for calling do_async_event from idle
- function, and freeing the message when done.
- (idle_async_event): Call mail_msg_free not free on the finished
- message.
-
- * component-factory.c (mail_remove_storage): Destroy the storage
- async.
- (store_disconnect): This does the work.
- (free_storage): Un-note the store when we remove it, so the store
- noting code can unref things properly.
- (idle_quit): Return false when done, dont loop.
-
-2001-10-24 <NotZed@Ximian.com>
-
- * component-factory.c (owner_set_cb): Setup an async_event
- handler.
- (idle_quit): Try to destroy the async_event, or keep dropping out
- if it can't (deadlock).
-
- * mail-mt.c (do_async_event): Set the threadid of the thread we're
- running in so we know its running/which thread its in.
- (mail_async_event_emit): Added new argument 'type' which is the
- type of thread to execute against, gui or another one. Fixed all
- callers.
- (mail_async_event_destroy): Return -1 if this operation will fail
- (deadlock possibility). If we're in the thread of the task
- we're going to wait for, then return a failure (since we will
- deadlock).
- (mail_async_event_emit): Changed to use MailAsyncFunc type as the
- function type, which just takes 3 void args, change args to suit.
-
- * mail-folder-cache.c (mail_note_store): Record the pending update
- events in a pending list. We should really be able to use an
- async event for this, but that doesn't return to the gui loop when
- done :-/
- (update_folders): Remove from pending update when done.
-
-2001-10-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-send-recv.c (get_receive_type): Check for a NULL provider.
- (build_dialogue): Check for invalid source urls.
- (mail_receive_uri): Same.
-
-2001-10-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (mail_generate_reply): No longer need to pass a
- settext argument.
- (do_forward_non_attached): Same.
-
- * mail-format.c (mail_get_message_body): Fix to not always return
- NULL for html parts, doh!.
-
-2001-10-24 <NotZed@Ximian.com>
-
- * folder-browser-ui.c (ui_add):
- (fbui_sensitize_timeout): Same.
-
- * folder-browser-factory.c (control_activate): Comment out freeze/thaw.
- (control_deactivate):
-
-2001-10-24 Jon Trowbridge <trow@ximian.com>
-
- * mail-search.c (mail_search_construct): Fixed some weird casting
- crack that got in here somehow, removed superfluous box-packing
- that was generating a gtk warning.
-
-2001-10-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * component-factory.c (owner_unset_cb): Unref the global
- search_context.
- (owner_set_cb): create the global search_context.
-
- * folder-browser.c (folder_browser_gui_init): Pass along the
- global search_context to the e_filter_bar_new call.
-
-2001-10-24 <NotZed@Ximian.com>
-
- * message-browser.c (message_browser_message_loaded): Call
- ui_message_loaded when we are.
-
- * folder-browser-factory.c (control_activate): Freeze/thaw around
- all updates.
- (control_deactivate): Freeze/thaw around all updates.
-
- * folder-browser.c (folder_browser_init): Setup a hashtable to
- keep track of *our* sensitise state, so we can optimise pushes to
- bonobo.
- (folder_browser_finalise): Free hash here.
- (folder_browser_set_message_preview): Call a ui_message_loaded,
- even though it isn't, so it updates sensitivities right.
- (done_message_selected): Call ui_message_loaded when it really is,
- rather than the very fucked up idea of reversing the loaded_uid
- check.
-
- * folder-browser-ui.c (folder_browser_ui_set_selection_state):
- Dont enable the message-enabled options if the message display is
- hidden, e.g. print, view headers, etc.
- (folder_browser_ui_rm_all): Forget sensitise state.
- (fbui_sensitise_item): Sensitise items via a current-state table,
- so we dont have to do bonobo calls every time.
- (folder_browser_setup_property_menu): Call sensitise_item.
- (folder_browser_ui_add_message):
- (folder_browser_ui_add_global): Leave current set_prop "sensitive"
- for the stop button, so it doesn't get lost by the stuff in
- mail-mt.c
- (fbui_real_sensitize_items): Removed.
- (fbui_sensitize_timeout): Cleaned up, use sensitise_item to do
- work.
- (folder_browser_ui_message_loaded): Setup sensitive based on
- preview_shown too.
- (folder_browser_ui_set_selection_state): And here too.
-
-2001-10-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-gui.c (service_check_supported): Don't allow an
- auth-type to be set when saving the service.
- (mail_account_gui_new): Initialize the source and transport
- provider_type's here so we don't forget to do it when it matters.
- (mail_account_gui_setup): Don't bother setting the provider_type's
- here, they are already set in mail_account_gui_new() now.
-
-2001-10-23 <NotZed@Ximian.com>
-
- * mail-display.c (mail_display_destroy): Remove the idle_id when
- we're destroyed so the idle func doesn't run on an invalid object.
-
- * message-list.c (regen_list_regened): Dont do anything if we're
- destroyed #13021.
-
- * mail-mt.c (mail_user_message):
- (mail_get_password): Removed, all functionality moved to
- mail-session.
-
- * mail-config.c (mail_config_write_on_exit): Check
- threaded/preview hash is null before using it, its setup on demand
- so itmight nto be initialised here.
-
- * mail-session.c (request_password): Remove password_current
- stuff.
- (alert_user): Redont, similar to get_pass. Do things as async as
- possible, and dont even wait for a response if we're not asking
- for the cancel button (this may or may not be right behaviour -
- need to check). mail_user_message() code replaced from the stuff
- in mail-mt.c
- (MailSession): Added a lock field.
- (init): Setup lock.
- (finalise): fRee lock.
- (register_timeout): Redone. We now allocate our own 'timeoutid's,
- and <> to the real things asynchronously. Use async_event's so we
- can make sure we have no outstanding ones after shutdown.
- (mail_session_enable_interaction): If interaction has been
- disabled, and we have either a message-box open, or a password
- request open and/or any pending message boxes/passwords, blow 'em
- away.
- (main_register_timeout): If we have pending remove of this same
- timeout, dont do anything.
- (timeout_timeout): Properly honour the result, remove the timout
- if it returns false.
- (do_user_message): Setup the message_destroy_id when we setup the
- destroy handler so it doesn't get called twice.
-
-2001-10-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (reply_to_sender): Make sure the fb and it's
- message-list exist.
- (reply_to_list): same.
- (reply_to_all): And here...
- (forward_message): Here too.
- (forward_attached): Again here.
- (transfer_msg): Here too.
- (apply_filters): Same.
- (select_all): Yet again here...
- (select_thread): And here.
- (invert_selection): Same.
- (flag_messages): Here too.
- (mark_as_unseen): and here...
- (mark_all_as_seen): ...
- (zoom_in):
- (zoom_out):
- (zoom_reset):
- (search_msg):
- (load_images):
- (save_msg):
- (next_msg):
- (next_flagged_msg):
- (next_unread_msg):
- (previous_msg):
- (previous_unread_msg):
- (expunge_folder):
- (configure_folder):
- (empty_trash):
-
-2001-10-23 <NotZed@Ximian.com>
-
- * mail-mt.c: Added missing errno.h
- (mail_msg_new): Fix the logic a bit, dont try to open the log file
- unless logging is actually requested.
- (mail_enable_stop, mail_disable_stop, do_set_busy,
- mail_operation_statys): Dont bother propagating events if
- global_shell_client isn't up yet.
-
-2001-10-23 Dan Winship <danw@ximian.com>
-
- * mail-mt.c (mail_msg_new): If the fopen() fails (eg, because
- evolution-mail was started by oafd with PWD=/), don't try to use
- the NULL file handle.
-
-2001-10-23 <NotZed@Ximian.com>
-
- * mail-session.c (get_password): Completely re-done. We now hae a
- completely async dialogue when requested from antoehr thread, and
- dont use gtk_main() if we can avoid it (which is normally the
- case). This stuff is only partially finished, and will mena the
- removal of the same from mail-mt.c, and the mail_user_message()
- code will be moved here and changed to work in a similar way.
-
- * mail-callbacks.c (empty_trash): Dont try and connect to remote
- stores just to get the trash. Also, always run empty trash async,
- and make sure we unref the trash.
- (empty_trash): Hmm, dont unref the trash, causes a problem on
- exit, i suspect something else is doing funky unrefs on it.
-
- * mail-tools.c (mail_tool_get_trash): Pass a 'connect' arg, tell
- it whether it should tryand connect or not to the parent service,
- if it isn't already connected.
-
- * component-factory.c (owner_unset_cb): Dont try wait_all here,
- could potentially deadlock.
- (idle_quit): Keep returning TRUE if we have outstanding
- processing. Note that this may busy-wait during exit processign
- with busy tasks :(
- (idle_quit): Keep calling ourselves till we no longer get called
- (i.e. gtk_main really quits).
-
- * mail-mt.c (mail_msg_active): New function, returns TRUE if
- events are still active/outstanding.
- (do_op_status): @$@$#@@!#@!! didn't unlock the mail_msg_lock if
- data->activity was NULL and we had no global_shell_client anymore!
- Also shortcut processing if this is going to be the case.
- (mail_msg_init): Setup a temporary other gui_port for redoing with
- new semantics password, user message and progress reporting.
- (mail_get_password): #ifdef'd out all this code temporarily, till
- it gets fully moved to mail-session.c
-
-2001-10-22 <NotZed@Ximian.com>
-
- * component-factory.c (owner_set_cb): Dont call enable_interaction
- here.
- (interactive_cb): But here instead, let the shell tell us when its
- ok to go interactive.
-
-2001-10-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (write_one_text_plain_chunk): Oops, revert my
- change to this function.
-
- * mail-display.h (mail_html_write_string): New fun macro.
-
- * mail-format.c (write_one_text_plain_chunk): Use gtk_html_write
- instead of mail_html_write so we avoid strdup'ing the text.
- (handle_text_plain_flowed): Use the mail_html_write_string macro.
- (handle_message_rfc822): Here too.
- (mail_format_raw_message): We can do it here also...
- (attachment_header): We can do it a little bit here...
- (write_address): A microscopic bit here...
- (write_hr): same.
-
-2001-10-22 Anna Marie Dirks <anna@ximian.com>
-
- * mail-config.glade: Added several new accelerators to the edit account
- dialog, and fixed the focus targets on all existing accelerators. I
- was hoping that since the widgets used in the account editor are also
- used in the first-time start-up druid and them mail-config druid,
- that this would fix all accelerator problems for those druids as well,
- but there is something wrong with Bonobo which is preventing
- the druids from responding to their accelerators. Sigh. Anyway,
- most accelerators in the edit account dialog work correctly
- now, though there are few (such as _Full Name) which fail to
- do anything. I don't know why.
-
-2001-10-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-stream-gtkhtml.c (mail_stream_gtkhtml_new): New class that
- wraps writing to a GtkHTML stream so that we don't have to write
- to an intermediate GByteArray.
-
- * mail-display.c (on_url_requested): Use the new Camel->GtkHTML
- stream - this means we don't have to chew up nearly as much
- memory...yay!
- (try_part_urls): Here too.
-
-2001-10-22 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-mt.c (do_op_status): Don't free `clientid' as it's
- uninitialized.
-
-2001-10-22 Christopher James Lahey <clahey@ximian.com>
-
- * message-list.etspec (Score): disable this column. Fixes Ximian
- bug #12381.
-
-2001-10-22 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-mt.c: #include "component-factory.h".
- (do_op_status): Pass the component ID instead of the msg ID.
-
- * component-factory.h (COMPONENT_ID): #define here instead of
- `component-factory.c'.
- (SUMMARY_FACTORY_ID): Likewise.
-
-2001-10-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (format_mime_part): Don't wrap error text with
- <blockquote>, this is done inside mail_error_write.
- (handle_multipart_encrypted): If we get an exception trying to
- decrypt the mime part, display an error rather than trying to
- treat it as multipart/mixed.
-
- * mail-callbacks.c (empty_trash): Confirm expunge.
-
- * folder-browser.c (folder_browser_destroy): Move the folder sync
- code along with a few other things from folder_browser_finalise()
- into here instead.
- (folder_browser_finalise): Moved some cleanup functions into
- destroy.
-
-2001-10-22 Dan Winship <danw@ximian.com>
-
- PGP verification UI changes to make it not HTML spoofable.
-
- * mail-format.c (handle_application_pgp): Remove this unused
- hack.
- (mail_format_mime_message): Initialize a fourth hash table, used
- to keep track of fake MIME parts.
- (mail_part_set_default_displayed_inline): New routine to set the
- default disposition of a part (doesn't change it if the user has
- already overridden it).
- (format_mime_part): Wrap a blockquote around the error text (moved
- here from mail_error_write since it doesn't apply in other cases).
- (write_hr): Write a <hr> with appropriate padding between MIME
- parts.
- (write_one_text_plain_chunk): Write some plain text with
- appropriate margins.
- (handle_text_plain): Use write_one_text_plain_chunk. Update for
- inline specials handler API change.
- (fake_mime_part_from_data): Use the "fake_parts" hash to avoid
- recreating the same fake parts again if the message is
- redisplayed. Lets you toggle the shown/hiddenness of uudecode
- parts, and do the new pgp verification thing for inline pgp
- signatures.
- (try_inline_pgp): Don't do any actual PGP handling here: Just
- rewrite as a multipart/encrypted.
- (try_inline_pgp_sig): Likewise, just do a multipart/signed (with
- the x-inline-pgp-hack parameter set).
- (try_uudecoding, try_inline_binhex): Update for API changes.
- (handle_multipart_signed): Exciting and new. Use <object> to
- create a button which the user must click to do the
- verification. Change the formatting of the gpg output text a bit.
-
- * mail-display.c (on_link_clicked): Remove x-evolution-decode-pgp
- hack, which is no longer used.
- (pixbuf_gen_idle): Add a hack for the PGP verification button.
- (do_attachment_header, do_external_viewer): Split out of
- on_object_requeested for clarity.
- (do_signature): New routine to do the PGP verification button.
- (on_object_requested): Now just dispatches to
- do_attachment_header, do_external_viewer, or do_signature.
- (mail_error_write): Don't do <blockquote> here. Fixed the problem
- that was trying to fix elsewhere.
-
-2001-10-22 Dan Winship <danw@ximian.com>
-
- * mail-callbacks.c (transfer_msg): Fix these functions so they
- don't crash evolution-mail. Too bad it still crashes in the
- shell.
-
-2001-10-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-display.c (on_url_requested): Use
- mail_format_get_data_wrapper_text for text parts so we get free
- charset conversion.
-
- * mail-format.c (mail_format_get_data_wrapper_text): Renamed from
- get_data_wrapper_text and now returns a GByteArray.
- (handle_text_plain): Updated to use the new get_data_wrapper_text.
- (handle_application_pgp): Same. Wow...also fixed a mem leak and
- made a bit more efficient by doing so.
- (handle_text_enriched): Here too. Also use string->len instead of
- strlen (string->str).
- (mail_format_raw_message): Same.
-
-2001-10-22 <NotZed@Ximian.com>
-
- * mail-callbacks.c (mark_all_as_seen): Instead of select_all()
- then using the tree's selected nodes to iterate, just do it on the
- folder which keeps the current selection. Fixes #3658.
-
-2001-10-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser.c: Call the new move/copy_msg_cb's
-
- * mail-callbacks.c (move_msg_cb): Renamed from move_msg.
- (copy_msg_cb): Renamed from copy_msg.
- (move_msg): The bonobo-ui-component callback.
- (copy_msg): Same.
-
-2001-10-21 <NotZed@Ximian.com>
-
- * mail-vfolder.c (mail_vfolder_shutdown): Clear variables once
- done, for debugging.
- (mail_vfolder_add_uri, mail_vfolder_delete_uri): Dont do anything
- if we're shutdown (context == NULL).
-
- * component-factory.c (idle_quit): Move mail_vfolder_shutdown
- here, it should be one of the last things shutdown.
-
- * mail-format.c (handle_text_plain): Dont use (if (!p++), and then
- check p!= later, since its now 1, oops. Fixes #13106, thought it
- was a start of uuencoded stuff!
-
- * folder-browser.c (on_right_click): Escape _'s before adding them
- to menu from mailing list name, also remove some dead code that
- someone forgot to remove when refactoring. #11307.
- (folder_browser_is_drafts): Use the store's uri_cmp function to
- compare to the drafts uri's.
- (folder_browser_is_sent): Same. Slight cleanup for #11351.
-
-2001-10-21 Dan Winship <danw@ximian.com>
-
- * mail-callbacks.c (mail_generate_reply): Update for
- e_msg_composer_add_messages_attachments arg change.
- (do_forward_non_attached): Likewise.
-
-2001-10-20 Jon Trowbridge <trow@ximian.com>
-
- * mail-display.c (mail_display_new): Don't leak our
- ESearchingTokenizer.
-
-2001-10-20 Larry Ewing <lewing@ximian.com>
-
- * folder-browser-ui.c: hook up zoom functions.
-
- * mail-callbacks.h: add prototypes.
-
- * mail-callbacks.c (zoom_in): added.
- (zoom_out): added.
- (zoom_reset): added.
-
-2001-10-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (transfer_msg): Allow copy/move to/from vTrash
- folders as well.
-
- * component-factory.c (destination_folder_handle_drop): Properly
- handle local vTrash folders.
-
-2001-10-19 <NotZed@Ximian.com>
-
- * mail-account-gui.c (build_auth_menu): Dont translate camel strings.
- (mail_account_gui_setup): "
-
-2001-10-19 Ettore Perazzoli <ettore@ximian.com>
-
- * component-factory.c (destination_folder_handle_motion): Get
- @folder_type here too [to match the changes in the
- EvolutionShellComponentDnd interface]. Also, remove a debugging
- message.
- (destination_folder_handle_drop): Likewise.
-
-2001-10-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (mail_generate_reply): Update to reflect API
- changes to e_msg_composer_add_message_attachments().
- (do_forward_non_attached): Same.
- (providers_config): Oops, pass a GdkWindow instead of a GtkWindow.
-
-2001-10-19 <NotZed@Ximian.com>
-
- * mail-folder-cache.c (store_finalised): Free folders_uri.
- (real_folder_deleted): If folder is deleted, remove it from the
- hashtables.
-
-2001-10-18 <NotZed@Ximian.com>
-
- * subscribe-dialog.c (get_short_folderinfo_get): Remove the
- register/unregister, they're already done above us.
-
- * mail-vfolder.c (vfolder_adduri): Added remove flag - its not
- adduri, its removeuri, its less typing than creating a removeuri.
- (vfolder_adduri_do): Implement the remove flag.
- (mail_vfolder_remove_uri): Changed to mail_vfolder_delte_uri, to
- indicate its actually been deleted.
- (mail_vfolder_add_uri): Added remove flag.
- (rule_changed): When adding existing folders to a new rule, strdup
- the list data.
- (mail_vfolder_delete_uri): Dont do any work to remove the actual
- folder from the vfolder (we'd have to look it up first), let the
- vfolder remove it itself. Just update the rules.
-
- * mail-folder-cache.c (store_finalised): Unhook from all events
- when done.
- (mail_note_store_remove): Remove a store from being noted.
- (free_folder_info): Also if we have a folder, unhook all events.
- Also remove the uri from vfolders.
- (mail_note_folder): Remove warning about adding folders to stores
- that aren't added yet - we might actually be removing the store.
-
- * component-factory.c (mail_remove_storage): Call
- mail_note_store_remove when we remove the storage.
-
-2001-10-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (providers_config): Don't make the mail
- settings dialog modal.
-
-2001-10-17 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-account-gui.c (folder_picker_clicked): Pass the toplevel to
- `evolution_shell_client_user_select_folder()'.
- * mail-callbacks.c (transfer_msg): Likewise.
-
-2001-10-18 <NotZed@Ximian.com>
-
- * mail-send-recv.c (build_dialogue): call setup_send_data *after*
- we've setup the global dialogue thingy.
- (mail_send_receive): Instead of using static local to check for
- re-running of dialogue, use a global, setup by build_dialogue.
- These fix #12335.
- (mail_send_receive): Dont assert dialogue is realized, it might
- still be being built, so only show if it is realized.
-
-2001-10-18 Dan Winship <danw@ximian.com>
-
- * mail-mt.c (mail_call_main): Use G_VA_COPY to make this compile
- on ppc again.
- (do_call): Here too.
-
-2001-10-17 <NotZed@Ximian.com>
-
- * mail-folder-cache.c (store_folder_subscribed): Clone the
- folderinfo before passing to async event.
- (real_folder_created): Free when done.
- (store_folder_unsubscribed):
- (real_folder_deleted): And same here.
-
- * mail-ops.c (mail_expunge_folder): Use the queued thread for
- expunging folders.
-
-2001-10-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-ops.c (mail_send_message): No longer need to copy the
- description now that camel-exceptions have been fixed.
-
- * subscribe-dialog.h (subscribe_dialog_show): Helper macro.
-
- * subscribe-dialog.c (subscribe_dialog_run_and_close): Removed.
-
- * mail-callbacks.c (check_send_configuration): Don't use
- gnome_dialog_run_and_close() here, we can easily get away with
- just using a gtk_widget_show().
- (providers_config): Don't use a gnome_dialog_run_and_close() here
- either. No longer need to use e_gnome_dialog utils.
- (manage_subscriptions): Don't run_and_close().
-
-2001-10-17 <NotZed@Ximian.com>
-
- * mail-callbacks.c (empty_trash): Only empty trash on enabled
- accounts, fixes #12821.
-
-2001-10-17 Dan Winship <danw@ximian.com>
-
- * mail-format.c (write_default_header): Make Reply-To bold too
- since no one ever figures out why it's not currently.
-
-2001-10-17 Iain Holmes <iain@ximian.com>
-
- * importers/evolution-mbox-importer.c: Fix the typo.
-
-2001-10-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-ops.c (uid_cachename_hack): Lets put the UID cache in
- ~/evolution/mail/pop3 as this makes more sense than ~/mail/config
- does. Perform checking to see what flavor cache-path the user is
- on and compensate.
-
- * message-list.c (on_cursor_activated_idle): Check that the
- cursor_uid is non-NULL before emitting a "message_selected"
- signal. Fixes bug #6015.
-
-2001-10-16 Jon Trowbridge <trow@ximian.com>
-
- * e-searching-tokenizer.c (e_searching_tokenizer_begin): Always
- explicitly clear out the SearchInfo.
-
-2001-10-16 <NotZed@Ximian.com>
-
- * mail-folder-cache.c: Added an async_event handler to store_info.
- (mail_note_store): Setup async event handler here.
- (store_finalised): Flush out async events here.
- (folder_changed): Use async event handler to emit event.
- (mail_note_folder): Chagned, do most of the work in the calling
- context, only do the corba stuff in main.
- (store_folder_subscribed): Use async event, and do more work locally.
- (store_folder_unsubscribed): Same.
- (store_folder_deleted): Call store_folder_unsubscribed if we have
- to do any work.
- (store_folder_created): Call store_folder_subscribed if we have to
- do any work.
- (store_folder_unsubscribed): Ref store while busy.
- (real_folder_deleted): And unref here.
- (store_folder_subscribed): Reg store while busy.
- (real_folder_created): Unref here.
- (mail_note_folder): Ref folder while busy.
- (real_note_folder): And unref here.
- (mail_note_folder): Hook onto folder_deleted event.
- (folder_deleted): Just mark this folder as no longer available.
-
- * mail-session.c (register_timeout): Use mail_call_main instead of
- proxy_event.
- (remove_timeout): Same here.
-
- * folder-browser.c (folder_changed): use the new mail_async_event
- stuff.
- (folder_changed_main): Remove old async event handling stuff.
- (FOLDER_BROWSER_LOCK/UNLOCK): Removed.
- (FolderBrowserPrivate): Removed too, sigh.
- (folder_browser_set_message_preview): Return do nothing if we're
- destroyed (message_list == NULL).
- (folder_browser_search_query_changed): "
- (folder_browser_toggle_preview): "
- (folder_browser_toggle_threads): "
- (folder_browser_toggle_hide_deleted): "
- (folder_browser_set_message_display_style): "
- (folder_browser_charset_changed): " All for #12613.
-
- * mail-mt.c (mail_async_event_new, mail_async_event_emit,
- mail_async_event_destroy): New functions to handle async events.
- (mail_proxy_event, mail_proxy_event_id): Removed old functions for
- async events.
- (do_call): Add suport for MAIL_CALL_p_pp.
- (mail_msg_free): Use mail_async_event instead of proxy_event.
-
- * message-list.c (message_changed): Promote the message_changed to
- a folder_changed and use main_folder_changed to process it.
- (main_message_changed): Remove.d
- (message_list_init): Setup async event handler.
- (message_list_destroy): Remove async handler.
- (folder_changed): Use async hanler to emit event in main loop.
- (message_changed): Same.
-
- * mail-mt.c (mail_proxy_event_id): New function to return the id
- of the currently executing proxied event.
-
- * folder-browser.h: Added private field.
-
- * folder-browser.c (folder_changed): Keep track of tasks
- outstanding in the tasks list, locked access.
- (FOLDER_BROWSER_LOCK, UNLOCK): Macros to lock the folder browser
- for poking about in diff threads.
- (folder_browser_finalise): Wait for any outstanding takss to
- finish before cleaning ourself up.
- (folder_browser_destroy): Move the seen_id handling to finalise,
- also add a loading_id handling code.
- (main_folder_changed): Remove our running task when done.
-
-2001-10-15 Larry Ewing <lewing@ximian.com>
-
- * mail-display.c (mail_error_write): don't write strings longer
- than they actually are.
-
-2001-10-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser.c (folder_browser_destroy): Remove the mark_seen
- timeout.
-
-2001-10-15 Larry Ewing <lewing@ximian.com>
-
- * mail-callbacks.c (mail_generate_reply): don't apply the body
- text in replys since we will just replace it anyway.
-
-2001-10-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * component-factory.c (owner_unset_cb): Call
- mail_vfolder_shutdown.
-
- * mail-vfolder.c (mail_vfolder_shutdown): Unref all of our
- VFolders.
-
- * mail-folder-cache.c (real_note_folder): Remember to unref the
- folder before returning if we have already noted this folder.
-
-2001-10-15 <NotZed@Ximian.com>
-
- * mail-session.c (get_password): Proxy get-password call to main
- thread.
- (forget_password): same for forget_password.
- (get_filter_driver): and same for get_filter_driver, since it uses
- gtk objects.
-
- * mail-mt.c (mail_call_main): new generic interface for calling
- stuff/proxying in the gui thread.
-
-2001-10-14 Jon Trowbridge <trow@ximian.com>
-
- * e-searching-tokenizer.c (e_searching_tokenizer_clone): Share
- more state between the parent and its clones, so that our multiple
- tokenizers don't get out of sync when we are rendering frames and
- iframes. (Bug #11638)
-
-2001-10-13 Jon Trowbridge <trow@ximian.com>
-
- * e-searching-tokenizer.c (search_info_compare): Bad hacker!
- Don't implicitly assume that utf8 characters are one byte in size!
- (Bug #9520)
- (e_searching_tokenizer_begin): As long as I'm touching those code:
- don't increase the size of search matches. I'll fix the colors
- later. (part of bug #11589)
-
-2001-10-13 Dan Winship <danw@ximian.com>
-
- * mail-callbacks.c (create_msg_composer): Don't emit a gtk warning
- if the composer creation fails.
-
-2001-10-12 Dan Winship <danw@ximian.com>
-
- * message-list.c, message-list.h, message-list.etspec: Revert the
- change to remove the Score column until Chris can fix ETable so
- it's possible to remove a column without breaking everyone's
- exisiting settings.
-
-2001-10-12 Iain Holmes <iain@ximian.com>
-
- * importers/evolution-mbox-importer.c (load_file_fn): Don't ever create
- the folder here. Wait until the shell has created it. Otherwise we get
- loads of race conditions where the mailer can create a subfolder before
- the shell has registered the parent.
-
-2001-10-12 Chris Toshok <toshok@ximian.com>
-
- * main.c (main): call e_passwords_init and e_passwords_shutdown.
-
- * mail-session.h: add prototypes for
- mail_session_{get,add}_password.
-
- * mail-session.c (init): empty this out - we use e_passwords
- instead of a local hashtable.
- (get_password): use e_passwords_get_password and
- e_passwords_add_password.
- (forget_password): use e_passwords_forget_password.
- (mail_session_remember_password): use
- e_passwords_remember_password.
- (mail_session_forget_password): use e_passwords_forget_password.
- (mail_session_get_password): new function, use
- e_passwords_get_password.
- (mail_session_add_password): same, use e_passwords_add_password.
- (mail_session_forget_passwords): use e_passwords_forget_passwords.
-
- * mail-config.c (mail_config_write_on_exit): fix this up so it
- works as desired with the e_passwords stuff.
-
-2001-10-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-display.c (mail_error_write): Convert URLS so we can get
- clickable links.
-
- * message-list.c: Removed score stuff.
-
-2001-10-12 Jon Trowbridge <trow@ximian.com>
-
- * mail-display.c (html_button_press_event): Store our listener id.
- (popup_info_free): Disconnect our listener when we free the popup.
- (Bug #11040)
-
-2001-10-11 Jon Trowbridge <trow@ximian.com>
-
- * mail-callbacks.c (addrbook_sender): Listen for "destroy" events
- from the control, so that we don't leave stray windows laying
- around. (Bug #9101)
-
-2001-10-11 <NotZed@Ximian.com>
-
- * local-config.glade: Added a checkbox for body indexing.
-
- * mail-local.c (mail_local_reconfigure_folder): Get index_body
- widget.
- (mail_local_folder_reconfigure): Add an 'index_body' argument &
- implement. Dont do anything if nothing changed.
-
- * openpgp-utils.c (openpgp_verify): Use e_iconv_open.
-
-2001-10-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (do_forward_non_attached): Attach the message
- attachments. Fixes bug #5439.
-
-2001-10-11 Dan Winship <danw@ximian.com>
-
- * mail-folder-cache.c (update_1folder): No longer need to pass
- folder display name to storage update_folder methods.
- (setup_folder, free_folder_info): Meaning we no longer need to
- keep track of it.
-
- * evolution-outlook-importer.[ch], evolution-mbox-importer.[ch]:
- These copies are cruft. The real ones are in importers/.
-
-2001-10-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * component-factory.c (free_storage): Make sure the
- service/storage are non-NULL.
-
- * mail-callbacks.c (e_gnome_dialog_parent_destroyed): Call
- gtk_main_quit.
- (send_receive_mail): Don't use e_gnome stuff since this doesn't
- need to be run using gnome_dialog_run_and_close().
- (composer_send_cb): Same.
- (edit_msg): Here too.
- (resend_msg): And here.
- (search_msg): Same.
- (filter_edit): Here too.
- (filter_edit): Don't use e_gnome_dialog_set_parent() because we
- don't do gnome_dialog_run_and_close on this dialog.
- (e_gnome_error_dialog_parented): Removed.
- (e_gnome_ok_dialog_parented): Removed.
-
-2001-10-10 Dan Winship <danw@ximian.com>
-
- * mail-config.c (new_source_created): Fix up the logic here.
-
-2001-10-10 Larry Ewing <lewing@ximian.com>
-
- * mail-callbacks.c (mail_generate_reply): use new function to copy
- the attachments from the source message. This still isn't perfect
- but it should avoid the problems with headers being transfered.
- This makes images in replies work again.
-
- * mail-display.c (save_url): copy the data. We can't ref the byte
- array and we can't free it so we have to copy it.
-
-2001-10-10 <NotZed@Ximian.com>
-
- * mail-ops.c (transfer_messages_transfer): IF the source and
- destination folders are the same, do nothing. Oh, and return an
- error, otherwise the shell goes and removes it anyway. Fixes a
- rather serious bug with dnd of folders onto their current
- location.
-
-2001-10-09 Larry Ewing <lewing@ximian.com>
-
- * mail-display.c (save_part): ref the part.
- (save_destroy_cb): new function to unref the part when we have
- closed the dialog.
- (save_url): fake a mime part so that we can save data urls without
- extra effort. This is less sucky than it seems since it handles
- filenames and ref counting with minimal fuss.
-
-2001-10-09 <NotZed@Ximian.com>
-
- * component-factory.c (owner_unset_cb): Disconnect from all the
- signals we were listening to, so we dont try and do shit twice on
- exit (one on unset_cb, one on destroy).
- (create_component): Setup the signal handlers using a table, so
- they're easier to disconnect on finish.
-
- * mail-folder-cache.c (folder_changed): Ref folder so it hangs
- around till we're done with it.
- (real_folder_changed): Unref folder when we are done with it.
- Should fix #11981.
-
-2001-10-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser.c (done_message_selected): Make sure the
- mail-display is non-NULL.
-
-2001-10-09 <NotZed@Ximian.com>
-
- * mail-local.c (mlf_search_by_uids): Implement.
-
-2001-10-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser-ui.c (folder_browser_ui_add_message): Create a
- chaqrset picker submenu in the View menu.
-
- * mail-format.c (mail_format_raw_message): Pass the mail-display
- to get_data_wrapper_text.
- (get_data_wrapper_text): Use the user's override charset if one is
- provided, otherwise user the user's default charset.
- (handle_text_plain): Pass along the mail-display to
- get_data_wrapper_text.
- (handle_application_pgp): Same.
- (handle_text_enriched): Here too.
- (mail_get_message_body): Pass NULL as the mail-display to
- get_data_wrapper_text since we don't have access to a
- mail-display.
-
- * mail-display.c (mail_display_set_charset): New function to set a
- charset on the maildisplay. Once set, the message is redisplayed
- using the new charset.
- (mail_display_destroy): Free the charset.
-
- * folder-browser.c (folder_browser_charset_changed): New callback
- for when a user overrides the message charset.
-
-2001-10-09 Dan Winship <danw@ximian.com>
-
- * mail-callbacks.c (e_gnome_dialog_set_parent): Use
- gtk_signal_connect_while_alive here so
- e_gnome_dialog_parent_destroyed doesn't get called on an
- already-destroyed dialog.
-
- * mail-config-druid.c (*_prepare): Record which page we're
- currently in.
- (*_changed): Only update the druid buttons if we're the current
- page. Fixes a problem that could make it impossible to get beyond
- the first page of the setup wizard.
-
- * mail-callbacks.c (mail_generate_reply): Revert the change to use
- e_msg_composer_new_with_message. That has unwanted side effects.
- (This commit re-breaks replying to HTML messages with inline
- images.)
-
-2001-10-08 Dan Winship <danw@ximian.com>
-
- * mail-local.c (mlf_set_folder, mlf_unset_folder): Update for
- folder_flags.
-
- * folder-browser-ui.c (folder_browser_ui_add_list): Check
- CAMEL_FOLDER_IS_TRASH flag rather than checking
- CAMEL_IS_VTRASH_FOLDER.
-
- * folder-browser.c (folder_browser_toggle_hide_deleted): Likewise
-
- * message-list.c (message_list_set_folder): Likewise.
- (message_list_set_hidedeleted): Remove redundant trash check.
-
-2001-10-08 Jon Trowbridge <trow@ximian.com>
-
- * mail-format.c (write_default_header): Write out the Bcc: header
- when applicable. Fixes bug #5823.
-
-2001-10-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (attachment_header): Convert the htmlinfo into
- utf8. Fixes bug #11966.
-
-2001-10-08 Dan Winship <danw@ximian.com>
-
- * component-factory.c (create_view): For mailstorage folders,
- connect to the control's "activate" signal, and don't try to
- connect to the store.
- (storage_activate): Instead, do it here, so if the connection
- fails, or the user cancels, or whatever else, he can try again
- later.
-
-2001-10-07 Dan Winship <danw@ximian.com>
-
- * mail-tools.c (mail_tool_do_movemail): Remove #ifndef
- MOVEMAIL_PATH code, since the setting of that variable has been
- meaningless for a while now, and the rest of the code DTRT whether
- that code executes or not.
-
-2001-10-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-mt.c (pass_got): Fix a merge-conflict leftover.
-
-2001-10-05 <NotZed@Ximian.com>
-
- * folder-browser.c: reformatted the menu tables so they're a bit
- more bloody readable.
-
- * mail-folder-cache.c (mail_note_store): Hook into
- subscribed/unsubscribed events. Only 'add/remove' folders from
- the add/removed events if we aren't subscribed, otherwise use the
- subscribed events. Rest of fix for #11831
-
-2001-10-05 Jon Trowbridge <trow@ximian.com>
-
- * mail-config.glade: Add toggle button to config menu to turn the
- "confirm sending unwanted HTML" dialog on/off. (Bug 10794)
-
- * mail-accounts.c (construct): Make said toggle button actually
- work.
-
-2001-10-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (e_gnome_dialog_set_parent): New convenience
- function that not only sets the gnome-dialog's parent window but
- also makes sure that the gnome-dialog closes when it's parent
- closes.
- (e_gnome_warning_dialog_parented): New conmvenience wrapper around
- the libgnomeui version that also does the same thing as
- e_gnome_dialog_set_parent.
- (e_gnome_error_dialog_parented): Same.
- (e_gnome_ok_dialog_parented): And again...
- (e_gnome_ok_cancel_dialog_parented): And once again.
-
-2001-10-05 Larry Ewing <lewing@ximian.com>
-
- * mail-callbacks.c (mail_generate_reply): use
- e_msg_composer_new_with_message rather than e_msg_composer_new.
- This way we bring in all the attachment of the message we are
- replying to.
-
-2001-10-05 Christopher James Lahey <clahey@ximian.com>
-
- * message-list.c (message_list_setup_etree): Turn on
- "uniform_row_height" argument.
-
-2001-10-04 <NotZed@Ximian.com>
-
- * folder-browser.c (update_status_bar): Show "nn sent" as total in
- sent folder, rather than just 'total'.
-
- * mail-folder-cache.c (update_1folder): Also show total message
- count for sent_folder.
-
- * folder-browser-ui.c (folder_browser_setup_property_menu): Do a
- better job of setting up the name. Also de-sensitise when we
- can't configure the folder.
-
-2001-10-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (providers_config): Set the parent window as
- the fb. This fixes bug #11723.
- (filter_edit): Do the same thing here too and also to the warning
- dialog.
- (edit_msg): Set the parent on the warning dialog.
- (resend_msg): And here.
- (search_msg): Here too.
- (confirm_expunge): Set the parent window on the dialog here too.
- (save_msg_ok): Same here.
-
- * mail-accounts.c (images_radio_toggled): Ignore the signal if the
- radio button is not "on". This fixes bug #10532 because the on/off
- signals don't always come in the off->on order.
-
- * mail-ops.c (mail_send_message): Reduced some redundancy.
-
-2001-10-04 Dan Winship <danw@ximian.com>
-
- * mail-format.c (write_address): Fix so that an email address with
- no name is once again just "foo@bar.com", not "<foo@bar.com>".
-
-2001-10-04 Iain Holmes <iain@ximian.com>
-
- * importers/evolution-mbox-importer.c (load_file_fn): Only pass
- CAMEL_STORE_FOLDER_CREATE when the shell will be creating the
- folder.
-
-2001-10-04 <NotZed@Ximian.com>
-
- * mail-callbacks.c (configure_folder): If we're accessing a
- vfolder uri, then popup the vfolder editor instead of trying the
- mail local one.
-
- * mail-vfolder.c (vfolder_edit_rule): Edit a vfolder by name.
-
-2001-10-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-gui.c (mail_account_gui_save): Added some more NULL
- checks.
-
-2001-10-04 <NotZed@Ximian.com>
-
- * component-factory.c (storage_remove_folder): Do the url
- fragment/path -> folder name hack. Removing vfolders from shell
- works now?
-
-2001-10-03 <NotZed@Ximian.com>
-
- * mail-send-recv.c (build_dialogue): Only build destination data
- if we have destination != NULL. Fixes crash of bug #10835.
-
- * folder-browser.c (folder_browser_config_search): Set 'to' ->
- 'recipient' data for search object. #6199.
-
- * mail-local.c (local_storage_new_folder_cb): Handle vtrash case,
- emit 'folder_created' event for the folder-cache to work, etc.
-
-2001-10-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (mail_write_authenticity): Don't use the wax-seal
- icons for the pgp stuff anymore, use Jimmac's new icons instead.
-
-2001-10-03 <NotZed@Ximian.com>
-
- * mail-folder-cache.c (folder_changed): Dont wait for event to
- finish before returning. This could however mean we process it
- after things have vanished below us? Fixes another case of ctrl-d
- deadlock.
-
- * folder-browser.c (update_status_bar): If we have hide deleted
- set, then dont count deleted messages in the 'total' messages
- count. Fixes #6591.
-
- * mail-ops.c (add_vtrash_info): If we have a fragment, override
- that, rather than the path. Fixes #5251.
- (remove_folder_get): Freeze/thaw around deleting all messages in
- folder.
-
-2001-10-03 Rodrigo Moya <rodrigo@ximian.com>
-
- * importers/Makefile.am: add $BONOBO_GNOME_CFLAGS to make it work
- with latest Bonobo
-
-2001-10-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (transfer_msg): Pass an empty flags argument to
- mail_transfer_messages - destination folder should already be
- created by this point.
-
- * folder-browser.c (message_list_drag_data_received): Pass an
- empty flags argument to mail_transfer_messages.
- (selection_received): Same.
-
- * component-factory.c (xfer_folder): Pass the CREATE flag to
- mail_transfer_messages() so that the dest folder gets created.
- (destination_folder_handle_drop): Update for mail-ops API change.
-
- * mail-ops.c (mail_transfer_messages): Now takes a dest_flags
- argument that it passes along to mail_tool_uri_to_folder when
- opening the destination folder.
-
-2001-10-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-vfolder.c (vfolder_setup_do): Pass an empty flags argument
- to mail_tool_uri_to_folder.
- (vfolder_adduri_do): Same.
-
- * mail-session.c (get_folder): Pass an empty flags argument to
- mail_tool_uri_to_folder.
-
- * mail-send-recv.c (receive_get_folder): Pass an empty flags
- argument to mail_tool_uri_to_folder.
-
- * mail-ops.c (get_folder_get): Pass the flags to
- mail_tool_uri_to_folder.
- (mail_get_folder): Now takes a flags argument.
- (remove_folder_get): Pass an empty flags argument to
- mail_tool_uri_to_folder.
- (mail_send_message): Pass an empty argument flag to
- mail_tool_uri_to_folder.
- (transfer_messages_transfer): Same. Destination folder should
- already be created by this time.
-
- * folder-info.c (do_get_info): Pass an empty flags argument to
- mail_tool_uri_to_folder.
-
- * importers/evolution-mbox-importer.c (folder_created_cb): Pass
- the CREATE flag here too.
- (load_file_fn): And here.
- (load_file_fn): And here too.
-
- * importers/evolution-outlook-importer.c (load_file_fn): Pass the
- CREATE flag to mail_tool_uri_to_folder.
-
- * folder-browser.c (folder_browser_new): Pass an empty flags
- argument.
- (x_evolution_message_parse): Pass an empty flags argument to
- mail_tool_uri_to_folder.
-
- * component-factory.c (create_folder): Pass a CREATE flag to
- mail_get_folder here too.
- (owner_set_cb): And here.
- (xfer_folder): Shouldn't need the CREATE flag here, so not passing
- any flags.
- (destination_folder_handle_drop): Same.
-
- * mail-local.c (mail_local_store_add_folder): Pass a CREATE flag
- to mail_get_folder.
- (reconfigure_folder_reconfigure): Pass an empty flags argument to
- mail_tool_uri_to_folder.
-
- * mail-tools.c (mail_tool_uri_to_folder): Take a flags argument.
- (mail_tool_get_local_inbox): Pass an empty flags argument to
- mail_tool_uri_to_folder.
-
-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.server.in.in b/mail/GNOME_Evolution_Mail.server.in.in
deleted file mode 100644
index b52a80267b..0000000000
--- a/mail/GNOME_Evolution_Mail.server.in.in
+++ /dev/null
@@ -1,193 +0,0 @@
-<oaf_info>
-
- <!-- Folder display control -->
-
- <!-- (factory) -->
- <oaf_server iid="OAFIID:GNOME_Evolution_Mail_Factory:@VERSION@"
- type="shlib"
- location="@COMPONENTDIR@/libevolution-mail.so">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/ObjectFactory:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="name" type="string"
- _value="Evolution Mail"/>
- </oaf_server>
-
- <!-- (control) -->
- <oaf_server iid="OAFIID:GNOME_Evolution_Mail_Control:@VERSION@"
- type="factory"
- location="OAFIID:GNOME_Evolution_Mail_ControlFactory:@VERSION@">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:BonoboControl/evolution-mail:@VERSION@"/>
- <item value="IDL:GNOME/Control:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="name" type="string"
- _value="Evolution Mail folder viewer"/>
- </oaf_server>
-
- <!-- Component Interface -->
-
- <oaf_server iid="OAFIID:GNOME_Evolution_Mail_Component:@VERSION@"
- type="factory"
- location="OAFIID:GNOME_Evolution_Mail_Factory:@VERSION@">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Evolution/Component:@VERSION@"/>
- </oaf_attribute>
-
- <oaf_attribute name="name" type="string" _value="Evolution Mail component"/>
-
- <oaf_attribute name="evolution:component_alias" type="string" value="mail"/>
-
- <oaf_attribute name="evolution:button_label" type="string" _value="Mail"/>
- <oaf_attribute name="evolution:button_sort_order" type="string" value="-10"/>
- <oaf_attribute name="evolution:button_icon" type="string" value="evolution-inbox.png"/>
-
- <oaf_attribute name="evolution:component_icon" type="string" value="evolution-inbox.png"/>
- <oaf_attribute name="evolution:component_display_order" type="number" value="1"/>
-
- <oaf_attribute name="evolution:uri_schemas" type="stringv">
- <item value="mailto"/>
- </oaf_attribute>
- </oaf_server>
-
- <!-- Shell Component -->
-
- <oaf_server iid="OAFIID:GNOME_Evolution_Mail_ShellComponent:@VERSION@"
- type="factory"
- location="OAFIID:GNOME_Evolution_Mail_ControlFactory:@VERSION@">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Evolution/ShellComponent:@VERSION@"/>
- </oaf_attribute>
-
- <oaf_attribute name="name" type="string"
- _value="Evolution Mail component"/>
-
- <oaf_attribute name="evolution:shell_component_icon" type="string"
- value="evolution-inbox.png"/>
- <oaf_attribute name="evolution:shell_component_launch_order" type="number"
- value="1"/>
- </oaf_server>
-
- <!-- Message composer -->
-
- <!-- (composer) -->
- <oaf_server iid="OAFIID:GNOME_Evolution_Mail_Composer:@VERSION@"
- type="factory"
- location="OAFIID:GNOME_Evolution_Mail_Factory:@VERSION@">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Evolution:Composer:@VERSION@"/>
- <item value="IDL:Bonobo/ItemContainer:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="name" type="string"
- _value="Evolution Mail composer"/>
- </oaf_server>
-
- <!-- Startup Wizard -->
-
- <!-- (wizard) -->
- <oaf_server iid="OAFIID:GNOME_Evolution_Mail_Wizard:@VERSION@"
- type="factory"
- location="OAFIID:GNOME_Evolution_Mail_ControlFactory:@VERSION@">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Evolution/StartupWizard::@VERSION@"/>
- </oaf_attribute>
-
- <oaf_attribute name="evolution:startup_wizard:priority" type="number"
- value="1"/>
- </oaf_server>
-
-
- <!-- Configuration pages -->
-
- <!-- Account Editor -->
- <oaf_server iid="OAFIID:GNOME_Evolution_Mail_AccountPrefs_ConfigControl:@VERSION@"
- type="factory"
- location="OAFIID:GNOME_Evolution_Mail_Factory:@VERSION@">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Evolution/ConfigControl:@VERSION@"/>
- </oaf_attribute>
-
- <oaf_attribute name="evolution2:config_item:title" type="string"
- _value="Mail Accounts"/>
-
- <oaf_attribute name="evolution2:config_item:description" type="string"
- _value="Configure your email accounts here"/>
-
- <oaf_attribute name="evolution2:config_item:icon_name" type="string"
- value="mail-accounts-settings.png"/>
-
- <oaf_attribute name="evolution2:config_item:type" type="stringv">
- <item value="mail"/>
- </oaf_attribute>
-
- <oaf_attribute name="evolution2:config_item:priority" type="string" value="-10"/>
-
- <oaf_attribute name="name" type="string"
- _value="Evolution Mail accounts configuration control"/>
-
- </oaf_server>
-
- <!-- Mailer Preferences -->
- <oaf_server iid="OAFIID:GNOME_Evolution_Mail_MailerPrefs_ConfigControl:@VERSION@"
- type="factory"
- location="OAFIID:GNOME_Evolution_Mail_Factory:@VERSION@">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Evolution/ConfigControl:@VERSION@"/>
- </oaf_attribute>
-
- <oaf_attribute name="evolution2:config_item:title" type="string"
- _value="Mail Preferences"/>
-
- <oaf_attribute name="evolution2:config_item:description" type="string"
- _value="Configure mail preferences, including security and message display, here"/>
-
- <oaf_attribute name="evolution2:config_item:icon_name" type="string"
- value="mail-config-druid.png"/>
-
- <oaf_attribute name="evolution2:config_item:priority" type="string" value="-9"/>
-
- <oaf_attribute name="name" type="string"
- _value="Evolution Mail preferences control"/>
-
- </oaf_server>
-
- <!-- Composer Preferences -->
- <oaf_server iid="OAFIID:GNOME_Evolution_Mail_ComposerPrefs_ConfigControl:@VERSION@"
- type="factory"
- location="OAFIID:GNOME_Evolution_Mail_Factory:@VERSION@">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Evolution/ConfigControl:@VERSION@"/>
- </oaf_attribute>
-
- <oaf_attribute name="evolution2:config_item:title" type="string"
- _value="Composer Preferences"/>
-
- <oaf_attribute name="evolution2:config_item:description" type="string"
- _value="Configure spell-checking, signatures, and the message composer here"/>
-
- <oaf_attribute name="evolution2:config_item:icon_name" type="string"
- value="composer-settings.png"/>
-
- <oaf_attribute name="evolution2:config_item:priority" type="string" value="-8"/>
-
- <oaf_attribute name="name" type="string"
- _value="Evolution Mail composer configuration control"/>
-
- </oaf_server>
-
-</oaf_info>
-
-
-
diff --git a/mail/Makefile.am b/mail/Makefile.am
deleted file mode 100644
index c377eca846..0000000000
--- a/mail/Makefile.am
+++ /dev/null
@@ -1,254 +0,0 @@
-SUBDIRS = # importers FIXME
-
-libexec_PROGRAMS = \
- evolution-mbox-upgrade
-
-importerdir = $(privlibdir)/evolution-mail-importers
-
-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 \
- $(EVOLUTION_MAIL_CFLAGS) \
- -DEVOLUTION_DATADIR=\""$(datadir)"\" \
- -DEVOLUTION_PRIVDATADIR=\""$(privdatadir)"\" \
- -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
- -DEVOLUTION_ETSPECDIR=\""$(etspecdir)"\" \
- -DEVOLUTION_ICONSDIR=\""$(imagesdir)"\" \
- -DEVOLUTION_IMAGES=\""$(imagesdir)"\" \
- -DEVOLUTION_GALVIEWSDIR=\""$(viewsdir)"\" \
- -DEVOLUTION_BUTTONSDIR=\""$(buttonsdir)"\" \
- -DEVOLUTION_LOCALEDIR=\""$(localedir)"\" \
- -DEVOLUTION_UIDIR=\""$(evolutionuidir)"\" \
- -DCAMEL_PROVIDERDIR=\""$(camel_providerdir)"\" \
- -DMAIL_IMPORTERSDIR=\""$(importerdir)"\" \
- -DPREFIX=\""$(prefix)"\" \
- -DG_LOG_DOMAIN=\"evolution-mail\"
-
-component_LTLIBRARIES = libevolution-mail.la
-
-# Code generation for Spell.idl
-
-SPELL_IDL = Spell.idl
-
-SPELL_IDL_GENERATED_H = \
- Spell.h
-SPELL_IDL_GENERATED_C = \
- Spell-common.c \
- Spell-skels.c \
- Spell-stubs.c
-SPELL_IDL_GENERATED = $(SPELL_IDL_GENERATED_C) $(SPELL_IDL_GENERATED_H)
-
-$(SPELL_IDL_GENERATED_H): $(SPELL_IDL)
- $(ORBIT_IDL) -I $(srcdir) -I $(datadir)/idl $(IDL_INCLUDES) $(srcdir)/Spell.idl
-$(SPELL_IDL_GENERATED_C): $(SPELL_IDL_GENERATED_H)
-
-Spell-impl.o: Spell.h
-
-
-# libevolution-mail
-
-libevolution_mail_la_SOURCES = \
- $(SPELL_IDL_GENERATED) \
- $(MARSHAL_GENERATED) \
- e-searching-tokenizer.c \
- e-searching-tokenizer.h \
- em-account-prefs.c \
- em-account-prefs.h \
- em-composer-prefs.c \
- em-composer-prefs.h \
- em-mailer-prefs.c \
- em-mailer-prefs.h \
- em-inline-filter.c \
- em-inline-filter.h \
- em-folder-selection.c \
- em-folder-selection.h \
- em-folder-selection-button.c \
- em-folder-selection-button.h \
- em-folder-selector.c \
- em-folder-selector.h \
- em-folder-tree.c \
- em-folder-tree.h \
- em-folder-tree-model.c \
- em-folder-tree-model.h \
- em-folder-view.c \
- em-folder-view.h \
- em-folder-browser.c \
- em-folder-browser.h \
- em-format.c \
- em-format.h \
- em-format-html.c \
- em-format-html.h \
- em-format-html-display.c \
- em-format-html-display.h \
- em-format-html-print.c \
- em-format-html-print.h \
- em-format-html-quote.c \
- em-format-html-quote.h \
- em-format-quote.c \
- em-format-quote.h \
- em-message-browser.c \
- em-message-browser.h \
- em-migrate.c \
- em-migrate.h \
- em-composer-utils.c \
- em-composer-utils.h \
- em-popup.c \
- em-popup.h \
- em-utils.c \
- em-utils.h \
- em-subscribe-editor.c \
- em-subscribe-editor.h \
- em-sync-stream.c \
- em-sync-stream.h \
- em-icon-stream.c \
- em-icon-stream.h \
- em-junk-filter.c \
- em-junk-filter.h \
- em-junk-plugin.c \
- em-junk-plugin.h \
- em-html-stream.c \
- em-html-stream.h \
- mail-account-editor.c \
- mail-account-editor.h \
- mail-account-gui.c \
- mail-account-gui.h \
- mail-autofilter.c \
- mail-autofilter.h \
- mail-component-factory.c \
- mail-component.c \
- mail-component.h \
- mail-config.c \
- mail-config.h \
- mail-config-druid.c \
- mail-config-druid.h \
- mail-crypto.c \
- mail-crypto.h \
- mail-config-factory.c \
- mail-config-factory.h \
- mail-folder-cache.c \
- mail-folder-cache.h \
- mail-mt.c \
- mail-mt.h \
- mail-offline-handler.c \
- mail-offline-handler.h \
- mail-ops.c \
- mail-ops.h \
- mail-send-recv.c \
- mail-send-recv.h \
- mail-session.c \
- mail-session.h \
- mail-signature-editor.c \
- mail-signature-editor.h \
- mail-tools.c \
- mail-tools.h \
- mail-types.h \
- mail-vfolder.c \
- mail-vfolder.h \
- message-list.c \
- message-list.h \
- message-tag-editor.c \
- message-tag-editor.h \
- message-tag-followup.c \
- message-tag-followup.h \
- mail.h
-
-# EPFIXME: Functionality to be brought back to life.
-#
-# mail-local.c
-# mail-local.h
-
-libevolution_mail_la_LIBADD = \
- $(top_builddir)/shell/importer/libevolution-importer.la \
- $(top_builddir)/camel/libcamel.la \
- $(top_builddir)/e-util/libeutil.la \
- $(top_builddir)/shell/libeshell.la \
- $(top_builddir)/composer/libcomposer.la \
- $(top_builddir)/widgets/misc/libemiscwidgets.la \
- $(top_builddir)/widgets/misc/libefilterbar.la \
- $(top_builddir)/filter/libfilter.la \
- $(top_builddir)/widgets/menus/libmenus.la \
- $(EVOLUTION_MAIL_LIBS)
-
-libevolution_mail_la_LDFLAGS = \
- -avoid-version -module
-
-
-# .server files
-
-evolution_mbox_upgrade_SOURCES = evolution-mbox-upgrade.c
-evolution_mbox_upgrade_LDADD = \
- $(top_builddir)/camel/libcamel.la \
- $(top_builddir)/e-util/libeutil.la \
- $(EVOLUTION_MAIL_LIBS)
-
-server_in_files = GNOME_Evolution_Mail.server.in.in
-server_DATA = $(server_in_files:.server.in.in=_$(BASE_VERSION).server)
-@EVO_SERVER_RULE@
-@INTLTOOL_SERVER_RULE@
-
-# Misc data to install
-
-glade_DATA = mail-config.glade local-config.glade subscribe-dialog.glade message-tags.glade mail-search.glade mail-security.glade
-MARSHAL_GENERATED = em-marshal.c em-marshal.h
-@EVO_MARSHAL_RULE@
-
-etspec_DATA = message-list.etspec
-
-EXTRA_DIST = \
- ChangeLog.pre-1-4 \
- em-marshal.list \
- $(SPELL_IDL) \
- $(glade_DATA) \
- $(schema_DATA) \
- $(server_in_files) \
- $(etspec_DATA)
-
-
-# Purify support
-
-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
-
-
-# GConf
-
-schemadir = $(GCONF_SCHEMA_FILE_DIR)
-schema_in_files = evolution-mail.schemas.in.in
-schema_DATA = $(schema_in_files:.schemas.in.in=-$(BASE_VERSION).schemas)
-%-$(BASE_VERSION).schemas.in: %.schemas.in.in
- cp $< $@
-
-@INTLTOOL_SCHEMAS_RULE@
-
-install-data-local:
- if test -z "$(DESTDIR)" ; then \
- for p in $(schema_DATA) ; do \
- GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(srcdir)/$$p; \
- done \
- fi
-
-
-# Prologue
-
-dist-hook:
- cd $(distdir); rm -f $(BUILT_SOURCES)
-
-BUILT_SOURCES = $(SPELL_IDL_GENERATED) $(MARSHAL_GENERATED) $(server_DATA)
-CLEANFILES = $(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/Spell.idl b/mail/Spell.idl
deleted file mode 100644
index f251253422..0000000000
--- a/mail/Spell.idl
+++ /dev/null
@@ -1,71 +0,0 @@
-/* This file is part of gnome-spell bonobo component
-
- Copyright (C) 1999, 2000 Helix Code, Inc.
- Authors: Radek Doulik <rodo@helixcode.com>
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
-*/
-
-#include <Bonobo.idl>
-
-module GNOME {
- module Spell {
-
- typedef sequence<string> StringSeq;
- struct Language {
- string name;
- string abbreviation;
- };
- typedef sequence<Language> LanguageSeq;
-
- interface Dictionary : Bonobo::Unknown {
-
- exception Error {
- string error;
- };
-
- LanguageSeq getLanguages ();
-
- /**
- * sets language(s), language string could contain more languages separated by space
- */
- void setLanguage (in string language);
-
- /**
- * checks word
- *
- * returns true if word is valid
- */
- boolean checkWord (in string word) raises (Error);
-
- /**
- * returns suggestions for word
- */
- StringSeq getSuggestions (in string word) raises (Error);
-
- /**
- * add to session/personal dictionary
- */
- void addWordToSession (in string word) raises (Error);
- void addWordToPersonal (in string word, in string language) raises (Error);
-
- /**
- * informs dictionary, that word 'word' will be replaced/corrected by word 'replacement'
- */
- void setCorrection (in string word, in string replacement, in string language);
- };
- };
-};
diff --git a/mail/e-searching-tokenizer.c b/mail/e-searching-tokenizer.c
deleted file mode 100644
index 44e88df378..0000000000
--- a/mail/e-searching-tokenizer.c
+++ /dev/null
@@ -1,1251 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * e-searching-tokenizer.c
- *
- * Copyright (C) 2002 Ximian, Inc.
- *
- * Developed by Jon Trowbridge <trow@ximian.com>
- * Rewritten significantly to handle multiple strings and improve performance
- * by Michael Zucchi <notzed@ximian.com>
- */
-
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <ctype.h>
-
-#include "e-searching-tokenizer.h"
-
-#include "e-util/e-memory.h"
-#include "e-util/e-msgport.h"
-
-#define d(x)
-
-enum {
- MATCH_SIGNAL,
- LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0, };
-
-static void e_searching_tokenizer_begin (HTMLTokenizer *, char *);
-static void e_searching_tokenizer_end (HTMLTokenizer *);
-static char *e_searching_tokenizer_peek_token (HTMLTokenizer *);
-static char *e_searching_tokenizer_next_token (HTMLTokenizer *);
-static gboolean e_searching_tokenizer_has_more (HTMLTokenizer *);
-
-static HTMLTokenizer *e_searching_tokenizer_clone (HTMLTokenizer *);
-
-/*
- static const gchar *space_tags[] = { "br", NULL };*/
-
-static HTMLTokenizerClass *parent_class = NULL;
-
-/** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **/
-
-/* ???
-typedef struct _SharedState SharedState;
-struct _SharedState {
- gint refs;
- gchar *str_primary;
- gchar *str_secondary;
- gboolean case_sensitive_primary;
- gboolean case_sensitive_secondary;
-};
-*/
-
-/* ********************************************************************** */
-
-
-#if 0
-static SharedState *
-shared_state_new (void)
-{
- SharedState *shared = g_new0 (SharedState, 1);
- shared->refs = 1;
- return shared;
-}
-
-static void
-shared_state_ref (SharedState *shared)
-{
- g_return_if_fail (shared != NULL);
- g_return_if_fail (shared->refs > 0);
- ++shared->refs;
-}
-
-static void
-shared_state_unref (SharedState *shared)
-{
- if (shared) {
- g_return_if_fail (shared->refs > 0);
- --shared->refs;
- if (shared->refs == 0) {
- g_free (shared->str_primary);
- g_free (shared->str_secondary);
- g_free (shared);
- }
- }
-}
-#endif
-
-/** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **/
-
-/* ********************************************************************** */
-
-/* Utility functions */
-
-/* This is faster and safer than glib2's utf8 abomination, but isn't exported from camel as yet */
-static inline guint32
-camel_utf8_getc(const unsigned char **ptr)
-{
- register unsigned char *p = (unsigned char *)*ptr;
- register unsigned char c, r;
- register guint32 v, m;
-
-again:
- r = *p++;
-loop:
- if (r < 0x80) {
- *ptr = p;
- v = r;
- } else if (r < 0xfe) { /* valid start char? */
- v = r;
- m = 0x7f80; /* used to mask out the length bits */
- do {
- c = *p++;
- if ((c & 0xc0) != 0x80) {
- r = c;
- goto loop;
- }
- v = (v<<6) | (c & 0x3f);
- r<<=1;
- m<<=5;
- } while (r & 0x40);
-
- *ptr = p;
-
- v &= ~m;
- } else {
- goto again;
- }
-
- return v;
-}
-
-
-/* note: our tags of interest are 7 bit ascii, only, no need to do any fancy utf8 stuff */
-/* tags should be upper case
- if this list gets longer than 10 entries, consider binary search */
-static char *ignored_tags[] = { "B", "I", "FONT", "TT", "EM", /* and more? */};
-
-static int
-ignore_tag(const char *tag)
-{
- char *t = alloca(strlen(tag)+1), c, *out;
- const char *in;
- int i;
-
- /* we could use a aho-corasick matcher here too ... but we wont */
-
- /* normalise tag into 't'.
- Note we use the property that the only tags we're interested in
- are 7 bit ascii to shortcut and simplify case insensitivity */
- in = tag+2; /* skip: TAG_ESCAPE '<' */
- if (*in == '/')
- in++;
- out = t;
- while ((c = *in++)) {
- if (c >= 'A' && c <= 'Z')
- *out++ = c;
- else if (c >= 'a' && c <= 'z')
- *out++ = c & 0xdf; /* convert ASCII to upper case */
- else
- /* maybe should check for > or ' ' etc? */
- break;
- }
- *out = 0;
-
- for (i=0;i<sizeof(ignored_tags)/sizeof(ignored_tags[0]);i++) {
- if (strcmp(t, ignored_tags[i]) == 0)
- return 1;
- }
-
- return 0;
-}
-
-/* ********************************************************************** */
-
-/* Aho-Corasick search tree implmeentation */
-
-/* next state if we match a character */
-struct _match {
- struct _match *next;
- guint32 ch;
- struct _state *match;
-};
-
-/* tree state node */
-struct _state {
- struct _match *matches;
- unsigned int final; /* max no of chars we just matched */
- struct _state *fail; /* where to try next if we fail */
- struct _state *next; /* next on this level? */
-};
-
-/* base tree structure */
-struct _trie {
- struct _state root;
- int max_depth;
-
- EMemChunk *state_chunks;
- EMemChunk *match_chunks;
-};
-
-static void
-dump_trie(struct _state *s, int d)
-{
- char *p = alloca(d*2+1);
- struct _match *m;
-
- memset(p, ' ', d*2);
- p[d*2]=0;
-
- printf("%s[state] %p: %d fail->%p\n", p, s, s->final, s->fail);
- m = s->matches;
- while (m) {
- printf(" %s'%c' -> %p\n", p, m->ch, m->match);
- if (m->match)
- dump_trie(m->match, d+1);
- m = m->next;
- }
-}
-
-/* This builds an Aho-Corasick search trie for a set of utf8 words */
-/* See
- http://www-sr.informatik.uni-tuebingen.de/~buehler/AC/AC.html
- for a neat demo */
-
-static inline struct _match *
-g(struct _state *q, guint32 c)
-{
- struct _match *m = q->matches;
-
- while (m && m->ch != c)
- m = m->next;
-
- return m;
-}
-
-static struct _trie *
-build_trie(int nocase, int len, char **words)
-{
- struct _state *q, *qt, *r;
- char *word;
- struct _match *m, *n = NULL;
- int i, depth;
- guint32 c;
- struct _trie *trie;
- int state_depth_max, state_depth_size;
- struct _state **state_depth;
-
- trie = g_malloc(sizeof(*trie));
- trie->root.matches = NULL;
- trie->root.final = 0;
- trie->root.fail = NULL;
- trie->root.next = NULL;
-
- trie->state_chunks = e_memchunk_new(8, sizeof(struct _state));
- trie->match_chunks = e_memchunk_new(8, sizeof(struct _match));
-
- /* This will correspond to the length of the longest pattern */
- state_depth_size = 0;
- state_depth_max = 64;
- state_depth = g_malloc(sizeof(*state_depth[0])*64);
- state_depth[0] = NULL;
-
- /* Step 1: Build trie */
-
- /* This just builds a tree that merges all common prefixes into the same branch */
-
- for (i=0;i<len;i++) {
- word = words[i];
- q = &trie->root;
- depth = 0;
- while ((c = camel_utf8_getc((const unsigned char **)&word))) {
- if (nocase)
- c = g_unichar_tolower(c);
- m = g(q, c);
- if (m == NULL) {
- m = e_memchunk_alloc(trie->match_chunks);
- m->ch = c;
- m->next = q->matches;
- q->matches = m;
- q = m->match = e_memchunk_alloc(trie->state_chunks);
- q->matches = NULL;
- q->fail = &trie->root;
- q->final = 0;
- if (state_depth_max < depth) {
- state_depth_max += 64;
- state_depth = g_realloc(state_depth, sizeof(*state_depth[0])*state_depth_max);
- }
- if (state_depth_size < depth) {
- state_depth[depth] = 0;
- state_depth_size = depth;
- }
- q->next = state_depth[depth];
- state_depth[depth] = q;
- } else {
- q = m->match;
- }
- depth++;
- }
- q->final = depth;
- }
-
- d(printf("Dumping trie:\n"));
- d(dump_trie(&trie->root, 0));
-
- /* Step 2: Build failure graph */
-
- /* This searches for the longest substring which is a prefix of another string and
- builds a graph of failure links so you can find multiple substrings concurrently,
- using aho-corasick's algorithm */
-
- for (i=0;i<state_depth_size;i++) {
- q = state_depth[i];
- while (q) {
- m = q->matches;
- while (m) {
- c = m->ch;
- qt = m->match;
- r = q->fail;
- while (r && (n = g(r, c)) == NULL)
- r = r->fail;
- if (r != NULL) {
- qt->fail = n->match;
- if (qt->fail->final > qt->final)
- qt->final = qt->fail->final;
- } else {
- if ((n = g(&trie->root, c)))
- qt->fail = n->match;
- else
- qt->fail = &trie->root;
- }
- m = m->next;
- }
- q = q->next;
- }
- }
-
- d(printf("After failure analysis\n"));
- d(dump_trie(&trie->root, 0));
-
- g_free(state_depth);
-
- trie->max_depth = state_depth_size;
-
- return trie;
-}
-
-static void
-free_trie(struct _trie *t)
-{
- e_memchunk_destroy(t->match_chunks);
- e_memchunk_destroy(t->state_chunks);
-
- g_free(t);
-}
-
-/* ********************************************************************** */
-
-/* html token searcher */
-
-struct _token {
- struct _token *next;
- struct _token *prev;
- unsigned int offset;
- /* we need to copy the token for memory management, so why not copy it whole */
- char tok[1];
-};
-
-/* stack of submatches currently being scanned, used for merging */
-struct _submatch {
- unsigned int offstart, offend; /* in bytes */
-};
-
-/* flags for new func */
-#define SEARCH_CASE (1)
-#define SEARCH_BOLD (2)
-
-struct _searcher {
- struct _trie *t;
-
- char *(*next_token)(); /* callbacks for more tokens */
- void *next_data;
-
- int words; /* how many words */
- char *tags, *tage; /* the tag we used to highlight */
-
- int flags; /* case sensitive or not */
-
- struct _state *state; /* state is the current trie state */
-
- int matchcount;
-
- EDList input; /* pending 'input' tokens, processed but might match */
- EDList output; /* output tokens ready for source */
-
- struct _token *current; /* for token output memory management */
-
- guint32 offset; /* current offset through searchable stream? */
- guint32 offout; /* last output position */
-
- unsigned int lastp; /* current position in rotating last buffer */
- guint32 *last; /* buffer that goes back last 'n' positions */
- guint32 last_mask; /* bitmask for efficient rotation calculation */
-
- unsigned int submatchp; /* submatch stack */
- struct _submatch *submatches;
-};
-
-static void
-searcher_set_tokenfunc(struct _searcher *s, char *(*next)(), void *data)
-{
- s->next_token = next;
- s->next_data = data;
-}
-
-static struct _searcher *
-searcher_new(int flags, int argc, char **argv, const char *tags, const char *tage)
-{
- int i, m;
- struct _searcher *s;
-
- s = g_malloc(sizeof(*s));
-
- s->t = build_trie((flags&SEARCH_CASE) == 0, argc, argv);
- s->words = argc;
- s->tags = g_strdup(tags);
- s->tage = g_strdup(tage);
- s->flags = flags;
- s->state = &s->t->root;
- s->matchcount = 0;
-
- e_dlist_init(&s->input);
- e_dlist_init(&s->output);
- s->current = 0;
-
- s->offset = 0;
- s->offout = 0;
-
- /* rotating queue of previous character positions */
- m = s->t->max_depth+1;
- i = 2;
- while (i<m)
- i<<=2;
- s->last = g_malloc(sizeof(s->last[0])*i);
- s->last_mask = i-1;
- s->lastp = 0;
-
- /* a stack of possible submatches */
- s->submatchp = 0;
- s->submatches = g_malloc(sizeof(s->submatches[0])*argc+1);
-
- return s;
-}
-
-static void
-searcher_free(struct _searcher *s)
-{
- struct _token *t;
-
- while ((t = (struct _token *)e_dlist_remhead(&s->input)))
- g_free(t);
- while ((t = (struct _token *)e_dlist_remhead(&s->output)))
- g_free(t);
- g_free(s->tags);
- g_free(s->tage);
- g_free(s->last);
- g_free(s->submatches);
- free_trie(s->t);
- g_free(s);
-}
-static struct _token *
-append_token(EDList *list, const char *tok, int len)
-{
- struct _token *token;
-
- if (len == -1)
- len = strlen(tok);
- token = g_malloc(sizeof(*token) + len+1);
- token->offset = 0; /* set by caller when required */
- memcpy(token->tok, tok, len);
- token->tok[len] = 0;
- e_dlist_addtail(list, (EDListNode *)token);
-
- return token;
-}
-
-#define free_token(x) (g_free(x))
-
-static void
-output_token(struct _searcher *s, struct _token *token)
-{
- int offend;
- int left, pre;
-
- if (token->tok[0] == TAG_ESCAPE) {
- if (token->offset >= s->offout) {
- d(printf("moving tag token '%s' from input to output\n", token->tok[0]==TAG_ESCAPE?token->tok+1:token->tok));
- e_dlist_addtail(&s->output, (EDListNode *)token);
- } else {
- d(printf("discarding tag token '%s' from input\n", token->tok[0]==TAG_ESCAPE?token->tok+1:token->tok));
- free_token(token);
- }
- } else {
- offend = token->offset + strlen(token->tok);
- left = offend-s->offout;
- if (left > 0) {
- pre = s->offout - token->offset;
- if (pre>0)
- memmove(token->tok, token->tok+pre, left+1);
- d(printf("adding partial remaining/failed '%s'\n", token->tok[0]==TAG_ESCAPE?token->tok+1:token->tok));
- s->offout = offend;
- e_dlist_addtail(&s->output, (EDListNode *)token);
- } else {
- d(printf("discarding whole token '%s'\n", token->tok[0]==TAG_ESCAPE?token->tok+1:token->tok));
- free_token(token);
- }
- }
-}
-
-static struct _token *
-find_token(struct _searcher *s, int start)
-{
- register struct _token *token;
-
- /* find token which is start token, from end of list back */
- token = (struct _token *)s->input.tailpred;
- while (token->prev) {
- if (token->offset <= start)
- return token;
- token = token->prev;
- }
-
- return NULL;
-}
-
-static void
-output_match(struct _searcher *s, unsigned int start, unsigned int end)
-{
- register struct _token *token;
- struct _token *starttoken, *endtoken;
- char b[8];
-
- d(printf("output match: %d-%d at %d\n", start, end, s->offout));
-
- starttoken = find_token(s, start);
- endtoken = find_token(s, end);
-
- if (starttoken == NULL || endtoken == NULL) {
- printf("Cannot find match history for match %d-%d\n", start, end);
- return;
- }
-
- d(printf("start in token '%s'\n", starttoken->tok[0]==TAG_ESCAPE?starttoken->tok+1:starttoken->tok));
- d(printf("end in token '%s'\n", endtoken->tok[0]==TAG_ESCAPE?endtoken->tok+1:endtoken->tok));
-
- /* output pending stuff that didn't match afterall */
- while ((struct _token *)s->input.head != starttoken) {
- token = (struct _token *)e_dlist_remhead(&s->input);
- d(printf("appending failed match '%s'\n", token->tok[0]==TAG_ESCAPE?token->tok+1:token->tok));
- output_token(s, token);
- }
-
- /* output any pre-match text */
- if (s->offout < start) {
- token = append_token(&s->output, starttoken->tok + (s->offout-starttoken->offset), start-s->offout);
- d(printf("adding pre-match text '%s'\n", token->tok[0]==TAG_ESCAPE?token->tok+1:token->tok));
- s->offout = start;
- }
-
- /* output highlight/bold */
- if (s->flags & SEARCH_BOLD) {
- sprintf(b, "%c<b>", (char)TAG_ESCAPE);
- append_token(&s->output, b, -1);
- }
- if (s->tags)
- append_token(&s->output, s->tags, -1);
-
- /* output match node(s) */
- if (starttoken != endtoken) {
- while ((struct _token *)s->input.head != endtoken) {
- token = (struct _token *)e_dlist_remhead(&s->input);
- d(printf("appending (partial) match node (head) '%s'\n", token->tok[0]==TAG_ESCAPE?token->tok+1:token->tok));
- output_token(s, token);
- }
- }
-
- /* any remaining partial content */
- if (s->offout < end) {
- token = append_token(&s->output, endtoken->tok+(s->offout-endtoken->offset), end-s->offout);
- d(printf("appending (partial) match node (tail) '%s'\n", token->tok[0]==TAG_ESCAPE?token->tok+1:token->tok));
- s->offout = end;
- }
-
- /* end highlight */
- if (s->tage)
- append_token(&s->output, s->tage, -1);
-
- /* and close bold if we need to */
- if (s->flags & SEARCH_BOLD) {
- sprintf(b, "%c</b>", (char)TAG_ESCAPE);
- append_token(&s->output, b, -1);
- }
-}
-
-/* output any sub-pending blocks */
-static void
-output_subpending(struct _searcher *s)
-{
- int i;
-
- for (i=s->submatchp-1;i>=0;i--)
- output_match(s, s->submatches[i].offstart, s->submatches[i].offend);
- s->submatchp = 0;
-}
-
-/* returns true if a merge took place */
-static int
-merge_subpending(struct _searcher *s, int offstart, int offend)
-{
- int i;
-
- /* merges overlapping or abutting match strings */
- if (s->submatchp &&
- s->submatches[s->submatchp-1].offend >= offstart) {
-
- /* go from end, any that match 'invalidate' follow-on ones too */
- for (i=s->submatchp-1;i>=0;i--) {
- if (s->submatches[i].offend >= offstart) {
- if (offstart < s->submatches[i].offstart)
- s->submatches[i].offstart = offstart;
- s->submatches[i].offend = offend;
- if (s->submatchp > i)
- s->submatchp = i+1;
- }
- }
- return 1;
- }
-
- return 0;
-}
-
-static void
-push_subpending(struct _searcher *s, int offstart, int offend)
-{
- /* This is really an assertion, we just ignore the last pending match instead of crashing though */
- if (s->submatchp >= s->words) {
- printf("ERROR: submatch pending stack overflow\n");
- s->submatchp = s->words-1;
- }
-
- s->submatches[s->submatchp].offstart = offstart;
- s->submatches[s->submatchp].offend = offend;
- s->submatchp++;
-}
-
-/* move any (partial) tokens from input to output if they are beyond the current output position */
-static void
-output_pending(struct _searcher *s)
-{
- struct _token *token;
-
- while ( (token = (struct _token *)e_dlist_remhead(&s->input)) )
- output_token(s, token);
-}
-
-/* flushes any nodes we cannot possibly match anymore */
-static void
-flush_extra(struct _searcher *s)
-{
- unsigned int start;
- int i;
- struct _token *starttoken, *token;
-
- /* find earliest char that can be in contention */
- start = s->offset - s->t->max_depth;
- for (i=0;i<s->submatchp;i++)
- if (s->submatches[i].offstart < start)
- start = s->submatches[i].offstart;
-
- /* now, flush out any tokens which are before this point */
- starttoken = find_token(s, start);
- if (starttoken == NULL)
- return;
-
- while ((struct _token *)s->input.head != starttoken) {
- token = (struct _token *)e_dlist_remhead(&s->input);
- output_token(s, token);
- }
-}
-
-static char *
-searcher_next_token(struct _searcher *s)
-{
- struct _token *token;
- char *tok, *stok, *pre_tok;
- struct _trie *t = s->t;
- struct _state *q = s->state;
- struct _match *m = NULL;
- int offstart, offend;
- guint32 c;
-
- while (e_dlist_empty(&s->output)) {
- /* get next token */
- tok = s->next_token(s->next_data);
- if (tok == NULL) {
- output_subpending(s);
- output_pending(s);
- break;
- }
-
- /* we dont always have to copy each token, e.g. if we dont match anything */
- token = append_token(&s->input, tok, -1);
- token->offset = s->offset;
- tok = token->tok;
-
- d(printf("new token %d '%s'\n", token->offset, token->tok[0]==TAG_ESCAPE?token->tok+1:token->tok));
-
- /* tag test, reset state on unknown tags */
- if (tok[0] == TAG_ESCAPE) {
- if (!ignore_tag(tok)) {
- /* force reset */
- output_subpending(s);
- output_pending(s);
- q = &t->root;
- }
-
- continue;
- }
-
- /* process whole token */
- pre_tok = stok = tok;
- while ((c = camel_utf8_getc((const unsigned char **)&tok))) {
- if ((s->flags & SEARCH_CASE) == 0)
- c = g_unichar_tolower(c);
- while (q && (m = g(q, c)) == NULL)
- q = q->fail;
- if (q == NULL) {
- /* mismatch ... reset state */
- output_subpending(s);
- q = &t->root;
- } else if (m != NULL) {
- /* keep track of previous offsets of utf8 chars, rotating buffer */
- s->last[s->lastp] = s->offset + (pre_tok-stok);
- s->lastp = (s->lastp+1)&s->last_mask;
-
- q = m->match;
- /* we have a match of q->final characters for a matching word */
- if (q->final) {
- s->matchcount++;
-
- /* use the last buffer to find the real offset of this char */
- offstart = s->last[(s->lastp - q->final)&s->last_mask];
- offend = s->offset + (tok - stok);
-
- if (q->matches == NULL) {
- if (s->submatchp == 0) {
- /* nothing pending, always put something in so we can try merge */
- push_subpending(s, offstart, offend);
- } else if (!merge_subpending(s, offstart, offend)) {
- /* can't merge, output what we have, and start againt */
- output_subpending(s);
- push_subpending(s, offstart, offend);
- /*output_match(s, offstart, offend);*/
- } else if (e_dlist_length(&s->input) > 8) {
- /* we're continuing to match and merge, but we have a lot of stuff
- waiting, so flush it out now since this is a safe point to do it */
- output_subpending(s);
- }
- } else {
- /* merge/add subpending */
- if (!merge_subpending(s, offstart, offend))
- push_subpending(s, offstart, offend);
- }
- }
- }
- pre_tok = tok;
- }
-
- s->offset += (pre_tok-stok);
-
- flush_extra(s);
- }
-
- s->state = q;
-
- if (s->current)
- free_token(s->current);
-
- s->current = token = (struct _token *)e_dlist_remhead(&s->output);
-
- return token?token->tok:NULL;
-}
-
-static char *
-searcher_peek_token(struct _searcher *s)
-{
- char *tok;
-
- /* we just get it and then put it back, it's fast enuf */
- tok = searcher_next_token(s);
- if (tok) {
- /* need to clear this so we dont free it while its still active */
- e_dlist_addhead(&s->output, (EDListNode *)s->current);
- s->current = NULL;
- }
-
- return tok;
-}
-
-static int
-searcher_pending(struct _searcher *s)
-{
- return !(e_dlist_empty(&s->input) && e_dlist_empty(&s->output));
-}
-
-/* ********************************************************************** */
-
-struct _search_info {
- GPtrArray *strv;
- char *colour;
- unsigned int size:8;
- unsigned int flags:8;
-};
-
-/** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **/
-
-static struct _search_info *
-search_info_new(void)
-{
- struct _search_info *s;
-
- s = g_malloc0(sizeof(struct _search_info));
- s->strv = g_ptr_array_new();
-
- return s;
-}
-
-static void
-search_info_set_flags(struct _search_info *si, unsigned int flags, unsigned int mask)
-{
- si->flags = (si->flags & ~mask) | (flags & mask);
-}
-
-static void
-search_info_set_colour(struct _search_info *si, const char *colour)
-{
- g_free(si->colour);
- si->colour = g_strdup(colour);
-}
-
-static void
-search_info_add_string(struct _search_info *si, const char *s)
-{
- const char *start;
- guint32 c;
-
- if (s && s[0]) {
- /* strip leading whitespace */
- start = s;
- while ((c = camel_utf8_getc((const unsigned char **)&s))) {
- if (!g_unichar_isspace(c)) {
- break;
- }
- start = s;
- }
- /* should probably also strip trailing, but i'm lazy today */
- if (start[0])
- g_ptr_array_add(si->strv, g_strdup(start));
- }
-}
-
-static void
-search_info_clear(struct _search_info *si)
-{
- int i;
-
- for (i=0;i<si->strv->len;i++)
- g_free(si->strv->pdata[i]);
-
- g_ptr_array_set_size(si->strv, 0);
-}
-
-static void
-search_info_free(struct _search_info *si)
-{
- int i;
-
- for (i=0;i<si->strv->len;i++)
- g_free(si->strv->pdata[i]);
-
- g_ptr_array_free(si->strv, TRUE);
- g_free(si->colour);
- g_free(si);
-}
-
-static struct _search_info *
-search_info_clone(struct _search_info *si)
-{
- struct _search_info *out;
- int i;
-
- out = search_info_new();
- for (i=0;i<si->strv->len;i++)
- g_ptr_array_add(out->strv, g_strdup(si->strv->pdata[i]));
- out->colour = g_strdup(si->colour);
- out->flags = si->flags;
- out->size = si->size;
-
- return out;
-}
-
-static struct _searcher *
-search_info_to_searcher(struct _search_info *si)
-{
- char *tags, *tage;
- char *col;
-
- if (si->strv->len == 0)
- return NULL;
-
- if (si->colour == NULL)
- col = "red";
- else
- col = si->colour;
-
- tags = alloca(20+strlen(col));
- sprintf(tags, "%c<font color=\"%s\">", TAG_ESCAPE, col);
- tage = alloca(20);
- sprintf(tage, "%c</font>", TAG_ESCAPE);
-
- return searcher_new(si->flags, si->strv->len, (char **)si->strv->pdata, tags, tage);
-}
-
-/* ********************************************************************** */
-
-struct _ESearchingTokenizerPrivate {
- struct _search_info *primary, *secondary;
- struct _searcher *engine;
-};
-
-/** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **/
-
-static void
-e_searching_tokenizer_finalise (GObject *obj)
-{
- ESearchingTokenizer *st = E_SEARCHING_TOKENIZER (obj);
- struct _ESearchingTokenizerPrivate *p = st->priv;
-
- search_info_free (p->primary);
- search_info_free (p->secondary);
- if (p->engine)
- searcher_free(p->engine);
-
- /* again wtf?
- shared_state_unref (st->priv->shared);
- */
-
- g_free (p);
-
- if (G_OBJECT_CLASS (parent_class)->finalize)
- G_OBJECT_CLASS (parent_class)->finalize(obj);
-}
-
-static void
-e_searching_tokenizer_class_init (ESearchingTokenizerClass *klass)
-{
- GObjectClass *obj_class = (GObjectClass *) klass;
- HTMLTokenizerClass *tok_class = HTML_TOKENIZER_CLASS (klass);
-
- parent_class = g_type_class_ref (HTML_TYPE_TOKENIZER);
-
- signals[MATCH_SIGNAL] =
- g_signal_new ("match",
- E_TYPE_SEARCHING_TOKENIZER,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ESearchingTokenizerClass, match),
- NULL,
- NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-
- obj_class->finalize = e_searching_tokenizer_finalise;
-
- 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;
-}
-
-static void
-e_searching_tokenizer_init (ESearchingTokenizer *st)
-{
- struct _ESearchingTokenizerPrivate *p;
-
- p = st->priv = g_new0 (struct _ESearchingTokenizerPrivate, 1);
-
- p->primary = search_info_new();
- search_info_set_flags(p->primary, SEARCH_BOLD, SEARCH_CASE|SEARCH_BOLD);
- search_info_set_colour(p->primary, "red");
-
- p->secondary = search_info_new();
- search_info_set_flags(p->secondary, SEARCH_BOLD, SEARCH_CASE|SEARCH_BOLD);
- search_info_set_colour(p->secondary, "purple");
-}
-
-GType
-e_searching_tokenizer_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (ESearchingTokenizerClass),
- NULL, NULL,
- (GClassInitFunc) e_searching_tokenizer_class_init,
- NULL, NULL,
- sizeof (ESearchingTokenizer),
- 0,
- (GInstanceInitFunc) e_searching_tokenizer_init,
- };
-
- type = g_type_register_static (HTML_TYPE_TOKENIZER, "ESearchingTokenizer", &info, 0);
- }
-
- return type;
-}
-
-HTMLTokenizer *
-e_searching_tokenizer_new (void)
-{
- return (HTMLTokenizer *) g_object_new (E_TYPE_SEARCHING_TOKENIZER, NULL);
-}
-
-/** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **/
-
-/* blah blah the htmltokeniser doesn't like being asked
- for a token if it doens't hvae any! */
-static char *get_token(HTMLTokenizer *t)
-{
- HTMLTokenizerClass *klass = HTML_TOKENIZER_CLASS (parent_class);
-
- return klass->has_more(t) ? klass->next_token(t) : NULL;
-}
-
-static void
-e_searching_tokenizer_begin (HTMLTokenizer *t, char *content_type)
-{
- ESearchingTokenizer *st = E_SEARCHING_TOKENIZER (t);
- struct _ESearchingTokenizerPrivate *p = st->priv;
-
- /* reset search */
- if (p->engine) {
- searcher_free(p->engine);
- p->engine = NULL;
- }
-
- if ((p->engine = search_info_to_searcher(p->primary))
- || (p->engine = search_info_to_searcher(p->secondary))) {
- /*HTMLTokenizerClass *klass = HTML_TOKENIZER_CLASS (parent_class);*/
-
- /*searcher_set_tokenfunc(p->engine, klass->next_token, st);*/
- searcher_set_tokenfunc(p->engine, get_token, st);
- }
- /* else - no engine, no search active */
-
- HTML_TOKENIZER_CLASS (parent_class)->begin (t, content_type);
-}
-
-static void
-e_searching_tokenizer_end (HTMLTokenizer *t)
-{
- /* so end gets called before any get/next tokens.
- I dont get it. */
-#if 0
- ESearchingTokenizer *st = E_SEARCHING_TOKENIZER (t);
- struct _ESearchingTokenizerPrivate *p = st->priv;
-
- /* not sure if we should reset search every time ... *shrug* */
- if (p->engine) {
- searcher_free(p->engine);
- p->engine = NULL;
- }
-#endif
-
- HTML_TOKENIZER_CLASS (parent_class)->end (t);
-}
-
-static char *
-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->engine == NULL)
- return HTML_TOKENIZER_CLASS (parent_class)->peek_token (tok);
-
- return searcher_peek_token(st->priv->engine);
-}
-
-static char *
-e_searching_tokenizer_next_token (HTMLTokenizer *tok)
-{
- ESearchingTokenizer *st = E_SEARCHING_TOKENIZER (tok);
- int oldmatched;
- char *token;
-
- /* If no search is active, just use the default method. */
- if (st->priv->engine == NULL)
- return HTML_TOKENIZER_CLASS (parent_class)->next_token (tok);
-
- oldmatched = st->priv->engine->matchcount;
-
- token = searcher_next_token(st->priv->engine);
-
- /* not sure if this has to be accurate or just say we had some matches */
- if (oldmatched != st->priv->engine->matchcount)
- g_signal_emit (st, signals[MATCH_SIGNAL], 0);
-
- return token;
-}
-
-static gboolean
-e_searching_tokenizer_has_more (HTMLTokenizer *tok)
-{
- ESearchingTokenizer *st = E_SEARCHING_TOKENIZER (tok);
-
- return (st->priv->engine != NULL && searcher_pending(st->priv->engine))
- || HTML_TOKENIZER_CLASS (parent_class)->has_more (tok);
-}
-
-/* proxy matched event, not sure what its for otherwise */
-static void
-matched (ESearchingTokenizer *st)
-{
- /*++st->priv->match_count;*/
- g_signal_emit (st, signals[MATCH_SIGNAL], 0);
-}
-
-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 ());
-
- search_info_free(new_st->priv->primary);
- search_info_free(new_st->priv->secondary);
-
- new_st->priv->primary = search_info_clone(orig_st->priv->primary);
- new_st->priv->secondary = search_info_clone(orig_st->priv->secondary);
-
- /* what the fucking what???? */
-#if 0
- shared_state_ref (orig_st->priv->shared);
- shared_state_unref (new_st->priv->shared);
- new_st->priv->shared = orig_st->priv->shared;
-#endif
-
- g_signal_connect_swapped (new_st, "match", G_CALLBACK(matched), orig_st);
-
- return HTML_TOKENIZER (new_st);
-}
-/* ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** */
-
-void
-e_searching_tokenizer_set_primary_search_string (ESearchingTokenizer *st, const gchar *search_str)
-{
- g_return_if_fail (st && E_IS_SEARCHING_TOKENIZER (st));
-
- search_info_clear(st->priv->primary);
- search_info_add_string(st->priv->primary, search_str);
-}
-
-void
-e_searching_tokenizer_add_primary_search_string (ESearchingTokenizer *st, const gchar *search_str)
-{
- g_return_if_fail (st && E_IS_SEARCHING_TOKENIZER (st));
-
- search_info_add_string(st->priv->primary, search_str);
-}
-
-void
-e_searching_tokenizer_set_primary_case_sensitivity (ESearchingTokenizer *st, gboolean iscase)
-{
- g_return_if_fail (st && E_IS_SEARCHING_TOKENIZER (st));
-
- search_info_set_flags(st->priv->primary, iscase?SEARCH_CASE:0, SEARCH_CASE);
-}
-
-void
-e_searching_tokenizer_set_secondary_search_string (ESearchingTokenizer *st, const gchar *search_str)
-{
- g_return_if_fail (st && E_IS_SEARCHING_TOKENIZER (st));
-
- search_info_clear(st->priv->secondary);
- search_info_add_string(st->priv->secondary, search_str);
-}
-
-void
-e_searching_tokenizer_add_secondary_search_string (ESearchingTokenizer *st, const gchar *search_str)
-{
- g_return_if_fail (st && E_IS_SEARCHING_TOKENIZER (st));
-
- search_info_add_string(st->priv->secondary, search_str);
-}
-
-void
-e_searching_tokenizer_set_secondary_case_sensitivity (ESearchingTokenizer *st, gboolean iscase)
-{
- g_return_if_fail (st && E_IS_SEARCHING_TOKENIZER (st));
-
- search_info_set_flags(st->priv->secondary, iscase?SEARCH_CASE:0, SEARCH_CASE);
-}
-
-gint
-e_searching_tokenizer_match_count (ESearchingTokenizer *st)
-{
- g_return_val_if_fail (st && E_IS_SEARCHING_TOKENIZER (st), -1);
-
- if (st->priv->engine)
- return st->priv->engine->matchcount;
-
- return 0;
-}
diff --git a/mail/e-searching-tokenizer.h b/mail/e-searching-tokenizer.h
deleted file mode 100644
index 9cdd3cb3c2..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_TYPE_SEARCHING_TOKENIZER, ESearchingTokenizer))
-#define E_SEARCHING_TOKENIZER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), E_TYPE_SEARCHING_TOKENIZER, ESearchingTokenizerClass))
-#define E_IS_SEARCHING_TOKENIZER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_TYPE_SEARCHING_TOKENIZER))
-#define E_IS_SEARCHING_TOKENIZER_CLASS(k) (G_TYPE_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 *);
-};
-
-GType 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 char *);
-void e_searching_tokenizer_add_primary_search_string (ESearchingTokenizer *, const char *);
-void e_searching_tokenizer_set_primary_case_sensitivity (ESearchingTokenizer *, gboolean is_case_sensitive);
-
-void e_searching_tokenizer_set_secondary_search_string (ESearchingTokenizer *, const char *);
-void e_searching_tokenizer_add_secondary_search_string (ESearchingTokenizer *st, const char *search_str);
-void e_searching_tokenizer_set_secondary_case_sensitivity (ESearchingTokenizer *, gboolean is_case_sensitive);
-
-
-int e_searching_tokenizer_match_count (ESearchingTokenizer *);
-
-
-#endif /* __E_SEARCHING_TOKENIZER_H__ */
diff --git a/mail/em-account-prefs.c b/mail/em-account-prefs.c
deleted file mode 100644
index e4b3844b2b..0000000000
--- a/mail/em-account-prefs.c
+++ /dev/null
@@ -1,580 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2002-2003 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/camel-url.h>
-
-#include <gtk/gtkliststore.h>
-#include <gtk/gtktreeselection.h>
-
-#include "mail.h"
-#include "mail-component.h"
-#include "mail-config.h"
-#include "mail-config-druid.h"
-#include "mail-account-editor.h"
-#include "mail-ops.h"
-#include "mail-send-recv.h"
-
-#include "art/mark.xpm"
-
-#include "em-account-prefs.h"
-
-
-static void em_account_prefs_class_init (EMAccountPrefsClass *class);
-static void em_account_prefs_init (EMAccountPrefs *prefs);
-static void em_account_prefs_finalise (GObject *obj);
-static void em_account_prefs_destroy (GtkObject *object);
-
-static void mail_accounts_load (EMAccountPrefs *prefs);
-
-static GdkPixbuf *disabled_pixbuf = NULL;
-static GdkPixbuf *enabled_pixbuf = NULL;
-
-static GtkVBoxClass *parent_class = NULL;
-
-
-#define PREFS_WINDOW(prefs) GTK_WINDOW (gtk_widget_get_ancestor (GTK_WIDGET (prefs), GTK_TYPE_WINDOW))
-
-
-GType
-em_account_prefs_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- GTypeInfo type_info = {
- sizeof (EMAccountPrefsClass),
- NULL, NULL,
- (GClassInitFunc) em_account_prefs_class_init,
- NULL, NULL,
- sizeof (EMAccountPrefs),
- 0,
- (GInstanceInitFunc) em_account_prefs_init,
- };
-
- type = g_type_register_static (gtk_vbox_get_type (), "EMAccountPrefs", &type_info, 0);
- }
-
- return type;
-}
-
-static void
-em_account_prefs_class_init (EMAccountPrefsClass *klass)
-{
- GtkObjectClass *gtk_object_class = (GtkObjectClass *) klass;
- GObjectClass *object_class = (GObjectClass *) klass;
-
- parent_class = g_type_class_ref (gtk_vbox_get_type ());
-
- gtk_object_class->destroy = em_account_prefs_destroy;
-
- object_class->finalize = em_account_prefs_finalise;
-
- /* setup static data */
- disabled_pixbuf = NULL;
- enabled_pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **) mark_xpm);
-}
-
-static void
-em_account_prefs_init (EMAccountPrefs *prefs)
-{
- prefs->druid = NULL;
- prefs->editor = NULL;
-
- gdk_pixbuf_render_pixmap_and_mask (enabled_pixbuf, &prefs->mark_pixmap, &prefs->mark_bitmap, 128);
-}
-
-static void
-em_account_prefs_destroy (GtkObject *obj)
-{
- EMAccountPrefs *prefs = (EMAccountPrefs *) obj;
-
- prefs->destroyed = TRUE;
-
- GTK_OBJECT_CLASS (parent_class)->destroy (obj);
-}
-
-static void
-em_account_prefs_finalise (GObject *obj)
-{
- EMAccountPrefs *prefs = (EMAccountPrefs *) obj;
-
- g_object_unref (prefs->gui);
- gdk_pixmap_unref (prefs->mark_pixmap);
- g_object_unref (prefs->mark_bitmap);
-
- G_OBJECT_CLASS (parent_class)->finalize (obj);
-}
-
-static void
-account_add_finished (EMAccountPrefs *prefs, GObject *deadbeef)
-{
- /* Either Cancel or Finished was clicked in the druid so reload the accounts */
- prefs->druid = NULL;
-
- if (!prefs->destroyed)
- mail_accounts_load (prefs);
-
- g_object_unref (prefs);
-}
-
-static void
-account_add_clicked (GtkButton *button, gpointer user_data)
-{
- EMAccountPrefs *prefs = (EMAccountPrefs *) user_data;
- GtkWidget *parent;
-
- if (prefs->druid == NULL) {
- prefs->druid = (GtkWidget *) mail_config_druid_new ();
-
- parent = gtk_widget_get_toplevel ((GtkWidget *) prefs);
- if (GTK_WIDGET_TOPLEVEL (parent))
- gtk_window_set_transient_for ((GtkWindow *) prefs->druid, (GtkWindow *) parent);
-
- g_object_weak_ref ((GObject *) prefs->druid,
- (GWeakNotify) account_add_finished, prefs);
-
- gtk_widget_show (prefs->druid);
- g_object_ref (prefs);
- } else {
- gdk_window_raise (prefs->druid->window);
- }
-}
-
-static void
-account_edit_finished (EMAccountPrefs *prefs, GObject *deadbeef)
-{
- prefs->editor = NULL;
-
- if (!prefs->destroyed)
- mail_accounts_load (prefs);
-
- g_object_unref (prefs);
-}
-
-static void
-account_edit_clicked (GtkButton *button, gpointer user_data)
-{
- EMAccountPrefs *prefs = (EMAccountPrefs *) user_data;
-
- if (prefs->editor == NULL) {
- GtkTreeSelection *selection;
- EAccount *account = NULL;
- GtkTreeModel *model;
- GtkTreeIter iter;
-
- selection = gtk_tree_view_get_selection (prefs->table);
- if (gtk_tree_selection_get_selected (selection, &model, &iter))
- gtk_tree_model_get (model, &iter, 3, &account, -1);
-
- if (account) {
- GtkWidget *parent;
-
- parent = gtk_widget_get_toplevel ((GtkWidget *) prefs);
- parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL;
-
- prefs->editor = (GtkWidget *) mail_account_editor_new (account, (GtkWindow *) parent, prefs);
-
- g_object_weak_ref ((GObject *) prefs->editor, (GWeakNotify) account_edit_finished, prefs);
- gtk_widget_show (prefs->editor);
- g_object_ref (prefs);
- }
- } else {
- gdk_window_raise (prefs->editor->window);
- }
-}
-
-static void
-account_delete_clicked (GtkButton *button, gpointer user_data)
-{
- EMAccountPrefs *prefs = user_data;
- GtkTreeSelection *selection;
- EAccount *account = NULL;
- EAccountList *accounts;
- GtkTreeModel *model;
- GtkWidget *confirm;
- GtkTreeIter iter;
- int ans;
-
- selection = gtk_tree_view_get_selection (prefs->table);
- if (gtk_tree_selection_get_selected (selection, &model, &iter))
- gtk_tree_model_get (model, &iter, 3, &account, -1);
-
- /* make sure we have a valid account selected and that we aren't editing anything... */
- if (account == NULL || prefs->editor != NULL)
- return;
-
- confirm = gtk_message_dialog_new (PREFS_WINDOW (prefs),
- GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE,
- _("Are you sure you want to delete this account?"));
-
- button = (GtkButton *) gtk_button_new_from_stock (GTK_STOCK_YES);
- gtk_button_set_label (button, _("Delete"));
- gtk_dialog_add_action_widget ((GtkDialog *) confirm, (GtkWidget *) button, GTK_RESPONSE_YES);
- gtk_widget_show ((GtkWidget *) button);
-
- button = (GtkButton *) gtk_button_new_from_stock (GTK_STOCK_NO);
- gtk_button_set_label (button, _("Don't delete"));
- gtk_dialog_add_action_widget ((GtkDialog *) confirm, (GtkWidget *) button, GTK_RESPONSE_NO);
- gtk_widget_show ((GtkWidget *) button);
-
- ans = gtk_dialog_run ((GtkDialog *) confirm);
- gtk_widget_destroy (confirm);
-
- if (ans == GTK_RESPONSE_YES) {
- int len;
-
- /* remove it from the folder-tree in the shell */
- if (account->enabled && account->source && account->source->url)
- mail_component_remove_store_by_uri (mail_component_peek (), account->source->url);
-
- /* remove it from the config file */
- mail_config_remove_account (account);
- accounts = mail_config_get_accounts ();
-
- mail_config_write ();
-
- mail_autoreceive_setup ();
-
- gtk_list_store_remove ((GtkListStore *) model, &iter);
-
- len = e_list_length ((EList *) accounts);
- if (len > 0) {
- gtk_tree_selection_select_iter (selection, &iter);
- } else {
- gtk_widget_set_sensitive (GTK_WIDGET (prefs->mail_edit), FALSE);
- gtk_widget_set_sensitive (GTK_WIDGET (prefs->mail_delete), FALSE);
- gtk_widget_set_sensitive (GTK_WIDGET (prefs->mail_default), FALSE);
- gtk_widget_set_sensitive (GTK_WIDGET (prefs->mail_able), FALSE);
- }
- }
-}
-
-static void
-account_default_clicked (GtkButton *button, gpointer user_data)
-{
- EMAccountPrefs *prefs = user_data;
- GtkTreeSelection *selection;
- EAccount *account = NULL;
- GtkTreeModel *model;
- GtkTreeIter iter;
-
- selection = gtk_tree_view_get_selection (prefs->table);
- if (gtk_tree_selection_get_selected (selection, &model, &iter))
- gtk_tree_model_get (model, &iter, 3, &account, -1);
-
- if (account) {
- mail_config_set_default_account (account);
-
- mail_config_write ();
-
- mail_accounts_load (prefs);
- }
-}
-
-static void
-account_able_clicked (GtkButton *button, gpointer user_data)
-{
- MailComponent *component = mail_component_peek ();
- EMAccountPrefs *prefs = user_data;
- GtkTreeSelection *selection;
- EAccount *account = NULL;
- GtkTreeModel *model;
- GtkTreeIter iter;
-
- selection = gtk_tree_view_get_selection (prefs->table);
- if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
- gtk_tree_model_get (model, &iter, 3, &account, -1);
- account->enabled = !account->enabled;
- gtk_list_store_set ((GtkListStore *) model, &iter, 0, account->enabled, -1);
-
- gtk_button_set_label (prefs->mail_able, account->enabled ? _("Disable") : _("Enable"));
- }
-
- if (account) {
- /* if the account got disabled, remove it from the
- folder-tree, otherwise add it to the folder-tree */
- if (account->source->url) {
- if (account->enabled)
- mail_component_load_store_by_uri (component,
- account->source->url,
- account->name);
- else
- mail_component_remove_store_by_uri (component, account->source->url);
- }
-
- mail_autoreceive_setup ();
-
- mail_config_write ();
- }
-}
-
-static void
-account_able_toggled (GtkCellRendererToggle *renderer, char *arg1, gpointer user_data)
-{
- EMAccountPrefs *prefs = user_data;
- GtkTreeSelection *selection;
- EAccount *account = NULL;
- GtkTreeModel *model;
- GtkTreePath *path;
- GtkTreeIter iter;
-
- path = gtk_tree_path_new_from_string (arg1);
- model = gtk_tree_view_get_model (prefs->table);
- selection = gtk_tree_view_get_selection (prefs->table);
-
- if (gtk_tree_model_get_iter (model, &iter, path)) {
- gtk_tree_model_get (model, &iter, 3, &account, -1);
- account->enabled = !account->enabled;
- gtk_list_store_set ((GtkListStore *) model, &iter, 0, account->enabled, -1);
-
- if (gtk_tree_selection_iter_is_selected (selection, &iter))
- gtk_button_set_label (prefs->mail_able, account->enabled ? _("Disable") : _("Enable"));
- }
-
- gtk_tree_path_free (path);
-
- if (account) {
- MailComponent *component = mail_component_peek ();
-
- /* if the account got disabled, remove it from the
- folder-tree, otherwise add it to the folder-tree */
- if (account->source->url) {
- if (account->enabled)
- mail_component_load_store_by_uri (component, account->source->url, account->name);
- else
- mail_component_remove_store_by_uri (component, account->source->url);
- }
-
- mail_autoreceive_setup ();
- mail_config_write ();
- }
-}
-
-static void
-account_double_click (GtkTreeView *treeview, GtkTreePath *path,
- GtkTreeViewColumn *column, EMAccountPrefs *prefs)
-{
- account_edit_clicked (NULL, prefs);
-}
-
-static void
-account_cursor_change (GtkTreeSelection *selection, EMAccountPrefs *prefs)
-{
- EAccount *account = NULL;
- GtkTreeModel *model;
- GtkTreeIter iter;
- int state;
-
- state = gtk_tree_selection_get_selected (selection, &model, &iter);
- if (state) {
- gtk_tree_model_get (model, &iter, 3, &account, -1);
- if (account->source && account->enabled)
- gtk_button_set_label (prefs->mail_able, _("Disable"));
- else
- gtk_button_set_label (prefs->mail_able, _("Enable"));
- } else {
- gtk_widget_grab_focus (GTK_WIDGET (prefs->mail_add));
- }
-
- gtk_widget_set_sensitive (GTK_WIDGET (prefs->mail_edit), state);
- gtk_widget_set_sensitive (GTK_WIDGET (prefs->mail_delete), state);
- gtk_widget_set_sensitive (GTK_WIDGET (prefs->mail_default), state);
- gtk_widget_set_sensitive (GTK_WIDGET (prefs->mail_able), state);
-}
-
-static void
-mail_accounts_load (EMAccountPrefs *prefs)
-{
- EAccount *default_account;
- EAccountList *accounts;
- GtkListStore *model;
- GtkTreeIter iter;
- char *name, *val;
- EIterator *node;
- int row = 0;
-
- model = (GtkListStore *) gtk_tree_view_get_model (prefs->table);
- gtk_list_store_clear (model);
-
- default_account = mail_config_get_default_account ();
-
- accounts = mail_config_get_accounts ();
- node = e_list_get_iterator ((EList *) accounts);
- while (e_iterator_is_valid (node)) {
- EAccount *account;
- CamelURL *url;
-
- account = (EAccount *) e_iterator_get (node);
-
- url = account->source && account->source->url ? camel_url_new (account->source->url, NULL) : NULL;
-
- gtk_list_store_append (model, &iter);
- if (account == default_account) {
- /* translators: default account indicator */
- name = val = g_strdup_printf ("%s %s", account->name, _("[Default]"));
- } else {
- val = account->name;
- name = NULL;
- }
-
- gtk_list_store_set (model, &iter,
- 0, account->enabled,
- 1, val,
- 2, url && url->protocol ? url->protocol : (char *) _("None"),
- 3, account,
- -1);
- g_free (name);
-
- if (url)
- camel_url_free (url);
-
- row++;
-
- e_iterator_next (node);
- }
-
- g_object_unref (node);
-}
-
-
-
-GtkWidget *em_account_prefs_treeview_new (char *widget_name, char *string1, char *string2,
- int int1, int int2);
-
-GtkWidget *
-em_account_prefs_treeview_new (char *widget_name, char *string1, char *string2, int int1, int int2)
-{
- GtkWidget *table, *scrolled;
- GtkTreeSelection *selection;
- GtkCellRenderer *renderer;
- GtkListStore *model;
-
- scrolled = gtk_scrolled_window_new (NULL, NULL);
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled),
- GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
- gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled), GTK_SHADOW_IN);
-
- renderer = gtk_cell_renderer_toggle_new ();
- g_object_set ((GObject *) renderer, "activatable", TRUE, NULL);
-
- model = gtk_list_store_new (4, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER);
- table = gtk_tree_view_new_with_model ((GtkTreeModel *) model);
- gtk_tree_view_insert_column_with_attributes ((GtkTreeView *) table, -1, _("Enabled"),
- renderer, "active", 0, NULL);
-
- g_object_set_data ((GObject *) scrolled, "renderer", renderer);
-
- renderer = gtk_cell_renderer_text_new ();
- gtk_tree_view_insert_column_with_attributes ((GtkTreeView *) table, -1, _("Account name"),
- renderer, "text", 1, NULL);
- gtk_tree_view_insert_column_with_attributes ((GtkTreeView *)table, -1, _("Protocol"),
- renderer, "text", 2, NULL);
- selection = gtk_tree_view_get_selection ((GtkTreeView *) table);
- gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
- gtk_tree_view_set_headers_visible ((GtkTreeView *) table, TRUE);
-
- /* FIXME: column auto-resize? */
- /* Is this needed?
- gtk_tree_view_column_set_alignment (gtk_tree_view_get_column (prefs->table, 0), 1.0);*/
-
- gtk_container_add (GTK_CONTAINER (scrolled), table);
-
- g_object_set_data ((GObject *) scrolled, "table", table);
-
- gtk_widget_show (scrolled);
- gtk_widget_show (table);
-
- return scrolled;
-}
-
-static void
-em_account_prefs_construct (EMAccountPrefs *prefs)
-{
- GtkWidget *toplevel, *widget;
- GtkCellRenderer *renderer;
- GladeXML *gui;
-
- gui = glade_xml_new (EVOLUTION_GLADEDIR "/mail-config.glade", "accounts_tab", NULL);
- prefs->gui = gui;
-
- /* get our toplevel widget */
- toplevel = glade_xml_get_widget (gui, "toplevel");
-
- /* reparent */
- gtk_widget_ref (toplevel);
- gtk_container_remove (GTK_CONTAINER (toplevel->parent), toplevel);
- gtk_container_add (GTK_CONTAINER (prefs), toplevel);
- gtk_widget_unref (toplevel);
-
- widget = glade_xml_get_widget (gui, "etableMailAccounts");
-
- prefs->table = (GtkTreeView *) g_object_get_data ((GObject *) widget, "table");
- g_signal_connect (gtk_tree_view_get_selection (prefs->table),
- "changed", G_CALLBACK (account_cursor_change), prefs);
- g_signal_connect (prefs->table, "row-activated", G_CALLBACK (account_double_click), prefs);
-
- renderer = g_object_get_data ((GObject *) widget, "renderer");
- g_signal_connect (renderer, "toggled", G_CALLBACK (account_able_toggled), prefs);
-
- mail_accounts_load (prefs);
-
- prefs->mail_add = GTK_BUTTON (glade_xml_get_widget (gui, "cmdAccountAdd"));
- g_signal_connect (prefs->mail_add, "clicked", G_CALLBACK (account_add_clicked), prefs);
-
- prefs->mail_edit = GTK_BUTTON (glade_xml_get_widget (gui, "cmdAccountEdit"));
- g_signal_connect (prefs->mail_edit, "clicked", G_CALLBACK (account_edit_clicked), prefs);
-
- prefs->mail_delete = GTK_BUTTON (glade_xml_get_widget (gui, "cmdAccountDelete"));
- g_signal_connect (prefs->mail_delete, "clicked", G_CALLBACK (account_delete_clicked), prefs);
-
- prefs->mail_default = GTK_BUTTON (glade_xml_get_widget (gui, "cmdAccountDefault"));
- g_signal_connect (prefs->mail_default, "clicked", G_CALLBACK (account_default_clicked), prefs);
-
- prefs->mail_able = GTK_BUTTON (glade_xml_get_widget (gui, "cmdAccountAble"));
- g_signal_connect (prefs->mail_able, "clicked", G_CALLBACK (account_able_clicked), prefs);
-}
-
-
-GtkWidget *
-em_account_prefs_new (GNOME_Evolution_Shell shell)
-{
- EMAccountPrefs *new;
-
- new = (EMAccountPrefs *) g_object_new (em_account_prefs_get_type (), NULL);
- em_account_prefs_construct (new);
- new->shell = shell;
-
- return (GtkWidget *) new;
-}
-
-
-void
-em_account_prefs_apply (EMAccountPrefs *prefs)
-{
- /* nothing to do here... */
-}
diff --git a/mail/em-account-prefs.h b/mail/em-account-prefs.h
deleted file mode 100644
index cff22fdc51..0000000000
--- a/mail/em-account-prefs.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2002-2003 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 __EM_ACCOUNT_PREFS_H__
-#define __EM_ACCOUNT_PREFS_H__
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <gtk/gtkvbox.h>
-#include <gtk/gtkbutton.h>
-#include <gtk/gtkclist.h>
-#include <glade/glade.h>
-#include <gtk/gtktreeview.h>
-
-#include <gal/e-table/e-table.h>
-
-#include "evolution-config-control.h"
-
-#include <shell/Evolution.h>
-
-
-#define EM_ACCOUNT_PREFS_TYPE (em_account_prefs_get_type ())
-#define EM_ACCOUNT_PREFS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EM_ACCOUNT_PREFS_TYPE, EMAccountPrefs))
-#define EM_ACCOUNT_PREFS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), EM_ACCOUNT_PREFS_TYPE, EMAccountPrefsClass))
-#define EM_IS_ACCOUNT_PREFS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EM_ACCOUNT_PREFS_TYPE))
-#define EM_IS_ACCOUNT_PREFS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EM_ACCOUNT_PREFS_TYPE))
-
-typedef struct _EMAccountPrefs EMAccountPrefs;
-typedef struct _EMAccountPrefsClass EMAccountPrefsClass;
-
-struct _EMAccountPrefs {
- GtkVBox parent_object;
-
- GNOME_Evolution_Shell shell;
-
- GladeXML *gui;
-
- GtkWidget *druid;
- GtkWidget *editor;
-
- GdkPixmap *mark_pixmap;
- GdkBitmap *mark_bitmap;
-
- GtkTreeView *table;
-
- GtkButton *mail_add;
- GtkButton *mail_edit;
- GtkButton *mail_delete;
- GtkButton *mail_default;
- GtkButton *mail_able;
-
- guint destroyed : 1;
-};
-
-struct _EMAccountPrefsClass {
- GtkVBoxClass parent_class;
-
- /* signals */
-
-};
-
-
-GtkType em_account_prefs_get_type (void);
-
-GtkWidget *em_account_prefs_new (GNOME_Evolution_Shell shell);
-
-void em_account_prefs_apply (EMAccountPrefs *prefs);
-
-/* needed by global config */
-#define EM_ACCOUNT_PREFS_CONTROL_ID "OAFIID:GNOME_Evolution_Mail_AccountPrefs_ConfigControl:" BASE_VERSION
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __EM_ACCOUNT_PREFS_H__ */
diff --git a/mail/em-camel-stream.c b/mail/em-camel-stream.c
deleted file mode 100644
index a1274d634a..0000000000
--- a/mail/em-camel-stream.c
+++ /dev/null
@@ -1,326 +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 2001 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <camel/camel-stream.h>
-#include <camel/camel-object.h>
-#include <gtkhtml/gtkhtml.h>
-#include <gtkhtml/gtkhtml-stream.h>
-#include <gtk/gtkmain.h>
-#include "em-camel-stream.h"
-
-#include "mail-mt.h"
-
-#define EMCS_BUFFER_SIZE (4096)
-
-/*#define LOG_STREAM*/
-
-#define d(x)
-
-enum _write_msg_t {
- EMCS_WRITE,
- EMCS_FLUSH,
- EMCS_CLOSE_OK,
- EMCS_CLOSE_ERROR,
-};
-
-struct _write_msg {
- EMsg msg;
-
- enum _write_msg_t op;
-
- const char *data;
- size_t n;
-};
-
-static void em_camel_stream_class_init (EMCamelStreamClass *klass);
-static void em_camel_stream_init (CamelObject *object);
-static void em_camel_stream_finalize (CamelObject *object);
-
-static ssize_t stream_write(CamelStream *stream, const char *buffer, size_t n);
-static int stream_close(CamelStream *stream);
-static int stream_flush(CamelStream *stream);
-
-static CamelStreamClass *parent_class = NULL;
-
-CamelType
-em_camel_stream_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (CAMEL_STREAM_TYPE,
- "EMCamelStream",
- sizeof (EMCamelStream),
- sizeof (EMCamelStreamClass),
- (CamelObjectClassInitFunc) em_camel_stream_class_init,
- NULL,
- (CamelObjectInitFunc) em_camel_stream_init,
- (CamelObjectFinalizeFunc) em_camel_stream_finalize);
- }
-
- return type;
-}
-
-static void
-em_camel_stream_class_init (EMCamelStreamClass *klass)
-{
- CamelStreamClass *stream_class = CAMEL_STREAM_CLASS (klass);
-
- parent_class = (CamelStreamClass *) CAMEL_STREAM_TYPE;
-
- /* virtual method overload */
- stream_class->write = stream_write;
- stream_class->flush = stream_flush;
- stream_class->close = stream_close;
-}
-
-static gboolean
-emcs_gui_received(GIOChannel *source, GIOCondition cond, void *data)
-{
- EMCamelStream *estream = data;
- struct _write_msg *msg;
-
- d(printf("%p: gui sync op job waiting\n", estream));
-
- msg = (struct _write_msg *)e_msgport_get(estream->data_port);
- /* Should never happen ... */
- if (msg == NULL)
- return TRUE;
-
- d(printf("%p: running sync op %d\n", estream, msg->op));
-
- /* force out any pending data before doing anything else */
- if (estream->used > 0) {
- d(printf("sync write %d\n", estream->used));
-
- if (estream->html_stream)
- gtk_html_stream_write(estream->html_stream, estream->buffer, estream->used);
- estream->used = 0;
- }
-
- switch (msg->op) {
- case EMCS_WRITE:
- d(printf("sync write %d\n", msg->n));
- if (estream->html_stream)
- gtk_html_stream_write(estream->html_stream, msg->data, msg->n);
- break;
- case EMCS_FLUSH:
- stream_flush((CamelStream *)estream);
- break;
- case EMCS_CLOSE_OK:
- if (estream->html_stream) {
- gtk_html_stream_close(estream->html_stream, GTK_HTML_STREAM_OK);
- estream->html_stream = NULL;
- }
- break;
- case EMCS_CLOSE_ERROR:
- if (estream->html_stream) {
- gtk_html_stream_close(estream->html_stream, GTK_HTML_STREAM_ERROR);
- estream->html_stream = NULL;
- }
- break;
- }
-
- e_msgport_reply((EMsg *)msg);
- d(printf("%p: gui sync op jobs done\n", estream));
-
- return TRUE;
-}
-
-static void
-em_camel_stream_init (CamelObject *object)
-{
- EMCamelStream *estream = (EMCamelStream *)object;
-
- estream->data_port = e_msgport_new();
- estream->reply_port = e_msgport_new();
-
- estream->gui_channel = g_io_channel_unix_new(e_msgport_fd(estream->data_port));
- estream->gui_watch = g_io_add_watch(estream->gui_channel, G_IO_IN, emcs_gui_received, estream);
-
- estream->used = 0;
- estream->buffer = g_malloc(EMCS_BUFFER_SIZE);
-
- d(printf("%p: new estream\n", estream));
-}
-
-static void
-sync_op(EMCamelStream *estream, enum _write_msg_t op, const char *data, size_t n)
-{
- struct _write_msg msg;
-
- d(printf("%p: launching sync op %d\n", estream, op));
- /* we do everything synchronous, we should never have any locks, and
- this prevents overflow from banked up data */
- msg.msg.reply_port = estream->reply_port;
- msg.op = op;
- msg.data = data;
- msg.n = n;
- e_msgport_put(estream->data_port, &msg.msg);
- e_msgport_wait(estream->reply_port);
- g_assert(e_msgport_get(msg.msg.reply_port) == &msg.msg);
- d(printf("%p: returned sync op %d\n", estream, op));
-}
-
-static void
-em_camel_stream_finalize (CamelObject *object)
-{
- EMCamelStream *estream = (EMCamelStream *)object;
-
- d(printf("%p: finalising stream\n", object));
- if (estream->html_stream) {
- d(printf("%p: html stream still open - error\n", object));
- if (pthread_self() == mail_gui_thread)
- gtk_html_stream_close(estream->html_stream, GTK_HTML_STREAM_ERROR);
- else
- sync_op(estream, EMCS_CLOSE_ERROR, NULL, 0);
- }
-
- /* TODO: is this stuff safe to do in another thread? */
- g_source_remove(estream->gui_watch);
- g_io_channel_unref(estream->gui_channel);
- e_msgport_destroy(estream->data_port);
- estream->data_port = NULL;
- e_msgport_destroy(estream->reply_port);
- estream->reply_port = NULL;
- g_free(estream->buffer);
-}
-
-static ssize_t
-stream_write (CamelStream *stream, const char *buffer, size_t n)
-{
- EMCamelStream *estream = EM_CAMEL_STREAM (stream);
-
- if (estream->html_stream == NULL)
- return -1;
-
-#ifdef LOG_STREAM
- if (estream->save)
- fwrite(buffer, sizeof(char), n, estream->save);
-#endif
-
- if (pthread_self() == mail_gui_thread)
- gtk_html_stream_write(estream->html_stream, buffer, n);
- else {
-#if 1
- size_t left = EMCS_BUFFER_SIZE-estream->used;
-
- /* A super-simple buffer, if we get too much to fit, just do a sync
- write, which will implicitly clear our previous writes first */
- d(printf("thread write '%d'\n", n));
-
- if (n >= left) {
- sync_op(estream, EMCS_WRITE, buffer, n);
- } else {
- memcpy(estream->buffer + estream->used, buffer, n);
- estream->used += n;
- }
-#else
- sync_op(estream, EMCS_WRITE, buffer, n);
-#endif
- }
- return (ssize_t) n;
-}
-
-static int
-stream_flush(CamelStream *stream)
-{
- EMCamelStream *estream = (EMCamelStream *)stream;
-
- if (estream->html_stream) {
- if (pthread_self() == mail_gui_thread) {
- /* FIXME: flush html stream via gtkhtml_stream_flush which doens't exist yet ... */
- while (gtk_events_pending ())
- gtk_main_iteration ();
- } else {
- sync_op(estream, EMCS_FLUSH, NULL, 0);
- }
- }
-
- return 0;
-}
-
-static int
-stream_close(CamelStream *stream)
-{
- EMCamelStream *estream = (EMCamelStream *)stream;
-
- d(printf("%p: closing stream\n", stream));
-
-#ifdef LOG_STREAM
- if (estream->save) {
- fclose(estream->save);
- estream->save = NULL;
- }
-#endif
-
- if (estream->html_stream) {
- if (pthread_self() == mail_gui_thread) {
- gtk_html_stream_close(estream->html_stream, GTK_HTML_STREAM_OK);
- estream->html_stream = NULL;
- } else {
- sync_op(estream, EMCS_CLOSE_OK, NULL, 0);
- }
- }
-
- return 0;
-}
-
-static void
-emcs_gtkhtml_destroy(struct _GtkHTML *html, EMCamelStream *emcs)
-{
- d(printf("%p: emcs gtkhtml destroy\n", emcs));
- emcs->html = NULL;
- emcs->html_stream = NULL;
-}
-
-/* TODO: Could pass NULL for html_stream, and do a gtk_html_begin
- on first data -> less flashing */
-CamelStream *
-em_camel_stream_new(struct _GtkHTML *html, struct _GtkHTMLStream *html_stream)
-{
- EMCamelStream *new;
-
- new = EM_CAMEL_STREAM (camel_object_new (EM_CAMEL_STREAM_TYPE));
- new->html_stream = html_stream;
- g_signal_connect(html, "destroy", G_CALLBACK(emcs_gtkhtml_destroy), new);
-
-#ifdef LOG_STREAM
- {
- static int count;
- char name[32];
-
- sprintf(name, "camel-stream.%d.html", count++);
- printf("saving raw html to '%s'\n", name);
- new->save = fopen(name, "w");
- }
-#endif
- return CAMEL_STREAM (new);
-}
diff --git a/mail/em-camel-stream.h b/mail/em-camel-stream.h
deleted file mode 100644
index 955a15a5e2..0000000000
--- a/mail/em-camel-stream.h
+++ /dev/null
@@ -1,71 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-#ifndef EM_CAMEL_STREAM_H
-#define EM_CAMEL_STREAM_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#define EM_CAMEL_STREAM_TYPE (em_camel_stream_get_type ())
-#define EM_CAMEL_STREAM(obj) (CAMEL_CHECK_CAST((obj), EM_CAMEL_STREAM_TYPE, EMCamelStream))
-#define EM_CAMEL_STREAM_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), EM_CAMEL_STREAM_TYPE, EMCamelStreamClass))
-#define MAIL_IS_DISPLAY_STREAM(o) (CAMEL_CHECK_TYPE((o), EM_CAMEL_STREAM_TYPE))
-
-struct _GtkHTML;
-struct _GtkHTMLStream;
-
-#include <camel/camel-stream.h>
-#include "e-util/e-msgport.h"
-
-typedef struct _EMCamelStream {
- CamelStream parent_stream;
-
- struct _GtkHTML *html;
- struct _GtkHTMLStream *html_stream;
-
- struct _EMsgPort *data_port, *reply_port;
- struct _GIOChannel *gui_channel;
- guint gui_watch;
- char *buffer;
- int used;
- void *save;
-} EMCamelStream;
-
-typedef struct {
- CamelStreamClass parent_class;
-
-} EMCamelStreamClass;
-
-
-CamelType em_camel_stream_get_type (void);
-
-/* the html_stream is closed when we are finalised (with an error), or closed (ok) */
-CamelStream *em_camel_stream_new(struct _GtkHTML *html, struct _GtkHTMLStream *html_stream);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* EM_CAMEL_STREAM_H */
diff --git a/mail/em-composer-prefs.c b/mail/em-composer-prefs.c
deleted file mode 100644
index f16e254ccf..0000000000
--- a/mail/em-composer-prefs.c
+++ /dev/null
@@ -1,1010 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2002-2003 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 "em-composer-prefs.h"
-#include "composer/e-msg-composer.h"
-
-#include <bonobo/bonobo-generic-factory.h>
-
-#include <gal/util/e-iconv.h>
-#include <gal/widgets/e-gui-utils.h>
-
-#include <gtk/gtktreemodel.h>
-#include <gtk/gtkliststore.h>
-#include <gtk/gtktreeselection.h>
-#include <gtk/gtktreeview.h>
-
-#include "widgets/misc/e-charset-picker.h"
-
-#include "mail-config.h"
-
-#include "art/mark.xpm"
-
-
-#define d(x)
-
-static void em_composer_prefs_class_init (EMComposerPrefsClass *class);
-static void em_composer_prefs_init (EMComposerPrefs *dialog);
-static void em_composer_prefs_destroy (GtkObject *obj);
-static void em_composer_prefs_finalise (GObject *obj);
-
-static void sig_event_client (MailConfigSigEvent event, MailConfigSignature *sig, EMComposerPrefs *prefs);
-
-static GtkVBoxClass *parent_class = NULL;
-
-
-GType
-em_composer_prefs_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (EMComposerPrefsClass),
- NULL, NULL,
- (GClassInitFunc) em_composer_prefs_class_init,
- NULL, NULL,
- sizeof (EMComposerPrefs),
- 0,
- (GInstanceInitFunc) em_composer_prefs_init,
- };
-
- type = g_type_register_static (gtk_vbox_get_type (), "EMComposerPrefs", &info, 0);
- }
-
- return type;
-}
-
-static void
-em_composer_prefs_class_init (EMComposerPrefsClass *klass)
-{
- GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- GtkObjectClass *object_class = GTK_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_ref (gtk_vbox_get_type ());
-
- object_class->destroy = em_composer_prefs_destroy;
- gobject_class->finalize = em_composer_prefs_finalise;
-}
-
-static void
-em_composer_prefs_init (EMComposerPrefs *composer_prefs)
-{
- composer_prefs->enabled_pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **) mark_xpm);
- gdk_pixbuf_render_pixmap_and_mask (composer_prefs->enabled_pixbuf,
- &composer_prefs->mark_pixmap, &composer_prefs->mark_bitmap, 128);
-}
-
-static void
-em_composer_prefs_finalise (GObject *obj)
-{
- EMComposerPrefs *prefs = (EMComposerPrefs *) obj;
-
- g_object_unref (prefs->gui);
- g_object_unref (prefs->enabled_pixbuf);
- gdk_pixmap_unref (prefs->mark_pixmap);
- g_object_unref (prefs->mark_bitmap);
-
- G_OBJECT_CLASS (parent_class)->finalize (obj);
-}
-
-static void
-em_composer_prefs_destroy (GtkObject *obj)
-{
- EMComposerPrefs *prefs = (EMComposerPrefs *) obj;
-
- mail_config_signature_unregister_client ((MailConfigSignatureClient) sig_event_client, prefs);
-
- GTK_OBJECT_CLASS (parent_class)->destroy (obj);
-}
-
-static void
-attach_style_info (GtkWidget *item, gpointer user_data)
-{
- int *style = user_data;
-
- g_object_set_data ((GObject *) item, "style", GINT_TO_POINTER (*style));
-
- (*style)++;
-}
-
-static void
-toggle_button_toggled (GtkWidget *widget, gpointer user_data)
-{
- EMComposerPrefs *prefs = (EMComposerPrefs *) user_data;
-
- if (prefs->control)
- evolution_config_control_changed (prefs->control);
-}
-
-static void
-menu_changed (GtkWidget *widget, gpointer user_data)
-{
- EMComposerPrefs *prefs = (EMComposerPrefs *) user_data;
-
- if (prefs->control)
- evolution_config_control_changed (prefs->control);
-}
-
-static void
-option_menu_connect (GtkOptionMenu *omenu, gpointer user_data)
-{
- GtkWidget *menu, *item;
- GList *items;
-
- menu = gtk_option_menu_get_menu (omenu);
-
- items = GTK_MENU_SHELL (menu)->children;
- while (items) {
- item = items->data;
- g_signal_connect (item, "activate", G_CALLBACK (menu_changed), user_data);
- items = items->next;
- }
-}
-
-static void
-sig_load_preview (EMComposerPrefs *prefs, MailConfigSignature *sig)
-{
- char *str;
-
- if (!sig) {
- gtk_html_load_from_string (GTK_HTML (prefs->sig_preview), " ", 1);
- return;
- }
-
- if (sig->script)
- str = mail_config_signature_run_script (sig->script);
- else
- str = e_msg_composer_get_sig_file_content (sig->filename, sig->html);
- if (!str)
- str = g_strdup ("");
-
- /* printf ("HTML: %s\n", str); */
- if (sig->html) {
- gtk_html_load_from_string (GTK_HTML (prefs->sig_preview), str, strlen (str));
- } else {
- GtkHTMLStream *stream;
- int len;
-
- len = strlen (str);
- stream = gtk_html_begin_content (GTK_HTML (prefs->sig_preview), "text/html; charset=utf-8");
- gtk_html_write (GTK_HTML (prefs->sig_preview), stream, "<PRE>", 5);
- if (len)
- gtk_html_write (GTK_HTML (prefs->sig_preview), stream, str, len);
- gtk_html_write (GTK_HTML (prefs->sig_preview), stream, "</PRE>", 6);
- gtk_html_end (GTK_HTML (prefs->sig_preview), stream, GTK_HTML_STREAM_OK);
- }
-
- g_free (str);
-}
-
-static void
-sig_edit_cb (GtkWidget *widget, EMComposerPrefs *prefs)
-{
- GtkTreeSelection *selection;
- MailConfigSignature *sig;
- GtkTreeModel *model;
- GtkWidget *parent;
- GtkTreeIter iter;
-
- selection = gtk_tree_view_get_selection (prefs->sig_list);
- if (!gtk_tree_selection_get_selected (selection, &model, &iter))
- return;
-
- gtk_tree_model_get (model, &iter, 1, &sig, -1);
-
- if (sig->script == NULL) {
- /* normal signature */
- if (!sig->filename || *sig->filename == '\0') {
- g_free (sig->filename);
- sig->filename = g_strdup (_("Unnamed"));
- }
-
- parent = gtk_widget_get_toplevel ((GtkWidget *) prefs);
- parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL;
-
- mail_signature_editor (sig, (GtkWindow *) parent, FALSE);
- } else {
- /* signature script */
- GtkWidget *entry;
-
- entry = glade_xml_get_widget (prefs->sig_script_gui, "fileentry_add_script_script");
- gtk_entry_set_text (GTK_ENTRY (entry), sig->name);
-
- entry = glade_xml_get_widget (prefs->sig_script_gui, "entry_add_script_name");
- gtk_entry_set_text (GTK_ENTRY (entry), sig->name);
-
- g_object_set_data ((GObject *) entry, "script", sig);
-
- gtk_widget_show (prefs->sig_script_dialog);
- gdk_window_raise (prefs->sig_script_dialog->window);
- }
-}
-
-MailConfigSignature *
-em_composer_prefs_new_signature (GtkWindow *parent, gboolean html, const char *script)
-{
- MailConfigSignature *sig;
-
- sig = mail_config_signature_new (html, script);
- mail_signature_editor (sig, parent, TRUE);
-
- return sig;
-}
-
-static void
-sig_delete_cb (GtkWidget *widget, EMComposerPrefs *prefs)
-{
- MailConfigSignature *sig;
- GtkTreeModel *model;
- GtkTreeSelection *selection;
- GtkTreeIter iter;
-
- selection = gtk_tree_view_get_selection (prefs->sig_list);
- if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
- gtk_tree_model_get (model, &iter, 1, &sig, -1);
- gtk_list_store_remove ((GtkListStore *) model, &iter);
- mail_config_signature_delete (sig);
- }
-}
-
-static void
-sig_add_cb (GtkWidget *widget, EMComposerPrefs *prefs)
-{
- GConfClient *gconf;
- gboolean send_html;
- GtkWidget *parent;
-
- gconf = mail_config_get_gconf_client ();
- send_html = gconf_client_get_bool (gconf, "/apps/evolution/mail/composer/send_html", NULL);
-
- parent = gtk_widget_get_toplevel ((GtkWidget *) prefs);
- parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL;
-
- em_composer_prefs_new_signature ((GtkWindow *) parent, send_html, NULL);
-}
-
-static void
-sig_add_script_response (GtkWidget *widget, int button, EMComposerPrefs *prefs)
-{
- const char *script, *name;
- GtkWidget *dialog;
- GtkWidget *entry;
-
- if (button == GTK_RESPONSE_ACCEPT) {
- entry = glade_xml_get_widget (prefs->sig_script_gui, "fileentry_add_script_script");
- script = gtk_entry_get_text (GTK_ENTRY (gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (entry))));
-
- entry = glade_xml_get_widget (prefs->sig_script_gui, "entry_add_script_name");
- name = gtk_entry_get_text (GTK_ENTRY (entry));
- if (script && *script) {
- struct stat st;
-
- if (!stat (script, &st) && S_ISREG (st.st_mode) && access (script, X_OK) == 0) {
- MailConfigSignature *sig;
- GtkWidget *parent;
-
- parent = gtk_widget_get_toplevel ((GtkWidget *) prefs);
- parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL;
-
- if ((sig = g_object_get_data ((GObject *) entry, "script"))) {
- /* we're just editing an existing signature script */
- mail_config_signature_set_name (sig, name);
- } else {
- sig = em_composer_prefs_new_signature ((GtkWindow *) parent, TRUE, script);
- mail_config_signature_set_name (sig, name);
- mail_config_signature_add (sig);
- }
-
- gtk_widget_hide (prefs->sig_script_dialog);
-
- return;
- }
- }
-
- dialog = gtk_message_dialog_new (GTK_WINDOW (prefs->sig_script_dialog),
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
- "%s", _("You must specify a valid script name."));
-
- gtk_dialog_run ((GtkDialog *) dialog);
- gtk_widget_destroy (dialog);
- }
-
- gtk_widget_hide (widget);
-}
-
-static void
-sig_add_script_cb (GtkWidget *widget, EMComposerPrefs *prefs)
-{
- GtkWidget *entry;
-
- entry = glade_xml_get_widget (prefs->sig_script_gui, "entry_add_script_name");
- gtk_entry_set_text (GTK_ENTRY (entry), _("Unnamed"));
-
- g_object_set_data ((GObject *) entry, "script", NULL);
-
- gtk_widget_show (prefs->sig_script_dialog);
- gdk_window_raise (prefs->sig_script_dialog->window);
-}
-
-static void
-sig_selection_changed (GtkTreeSelection *selection, EMComposerPrefs *prefs)
-{
- MailConfigSignature *sig;
- GtkTreeModel *model;
- GtkTreeIter iter;
- int state;
-
- state = gtk_tree_selection_get_selected (selection, &model, &iter);
- if (state) {
- gtk_tree_model_get (model, &iter, 1, &sig, -1);
- sig_load_preview (prefs, sig);
- }
-
- gtk_widget_set_sensitive ((GtkWidget *) prefs->sig_delete, state);
- gtk_widget_set_sensitive ((GtkWidget *) prefs->sig_edit, state);
-}
-
-static void
-sig_fill_clist (GtkTreeView *clist)
-{
- GSList *l;
- GtkListStore *model;
- GtkTreeIter iter;
-
- model = (GtkListStore *) gtk_tree_view_get_model (clist);
- gtk_list_store_clear (model);
-
- for (l = mail_config_get_signature_list (); l; l = l->next) {
- MailConfigSignature *sig = l->data;
- char *name = NULL, *val;
-
- gtk_list_store_append (model, &iter);
-
- if (sig->script)
- name = val = g_strconcat (sig->name, " ", _("[script]"), NULL);
- else
- val = sig->name;
- gtk_list_store_set (model, &iter, 0, val, 1, sig, -1);
- g_free (name);
- }
-}
-
-static void
-url_requested (GtkHTML *html, const char *url, GtkHTMLStream *handle)
-{
- GtkHTMLStreamStatus status;
- char buf[128];
- ssize_t size;
- int fd;
-
- if (!strncmp (url, "file:", 5))
- url += 5;
-
- fd = open (url, O_RDONLY);
- status = GTK_HTML_STREAM_OK;
- if (fd != -1) {
- while ((size = read (fd, buf, sizeof (buf)))) {
- if (size == -1) {
- status = GTK_HTML_STREAM_ERROR;
- break;
- } else
- gtk_html_write (html, handle, buf, size);
- }
- } else
- status = GTK_HTML_STREAM_ERROR;
-
- gtk_html_end (html, handle, status);
-}
-
-static void
-sig_event_client (MailConfigSigEvent event, MailConfigSignature *sig, EMComposerPrefs *prefs)
-{
- MailConfigSignature *current;
- GtkTreeSelection *selection;
- GtkTreeModel *model;
- GtkTreeIter iter;
- char path[16];
-
- switch (event) {
- case MAIL_CONFIG_SIG_EVENT_ADDED:
- d(printf ("signature ADDED\n"));
-
- model = gtk_tree_view_get_model (prefs->sig_list);
- gtk_list_store_append ((GtkListStore *) model, &iter);
- gtk_list_store_set ((GtkListStore *) model, &iter, 0, sig->name, 1, sig, -1);
- break;
- case MAIL_CONFIG_SIG_EVENT_NAME_CHANGED:
- d(printf ("signature NAME CHANGED\n"));
-
- /* this is one bizarro interface */
- model = gtk_tree_view_get_model (prefs->sig_list);
- sprintf (path, "%d", sig->id);
- if (gtk_tree_model_get_iter_from_string (model, &iter, path)) {
- char *val, *name = NULL;
-
- if (sig->script)
- name = val = g_strconcat (sig->name, " ", _("[script]"), NULL);
- else
- val = sig->name;
-
- gtk_list_store_set ((GtkListStore *) model, &iter, 0, val, -1);
- g_free (name);
- }
- break;
- case MAIL_CONFIG_SIG_EVENT_CONTENT_CHANGED:
- d(printf ("signature CONTENT CHANGED\n"));
- selection = gtk_tree_view_get_selection (prefs->sig_list);
- if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
- gtk_tree_model_get (model, &iter, 1, &current, -1);
- if (sig == current)
- sig_load_preview (prefs, sig);
- }
- break;
- default:
- ;
- }
-}
-
-/*
- *
- * Spell checking cut'n'pasted from gnome-spell/capplet/main.c
- *
- */
-
-#include "Spell.h"
-
-#define GNOME_SPELL_GCONF_DIR "/GNOME/Spell"
-#define SPELL_API_VERSION "0.3"
-
-static void
-spell_set_ui (EMComposerPrefs *prefs)
-{
- GtkListStore *model;
- GtkTreeIter iter;
- GHashTable *present;
- gboolean go;
- char **strv = NULL;
- int i;
-
- prefs->spell_active = FALSE;
-
- /* setup the language list */
- present = g_hash_table_new (g_str_hash, g_str_equal);
- if (prefs->language_str && (strv = g_strsplit (prefs->language_str, " ", 0))) {
- for (i = 0; strv[i]; i++)
- g_hash_table_insert (present, strv[i], strv[i]);
- }
-
- model = (GtkListStore *) gtk_tree_view_get_model (prefs->language);
- for (go = gtk_tree_model_get_iter_first ((GtkTreeModel *) model, &iter); go;
- go = gtk_tree_model_iter_next ((GtkTreeModel *) model, &iter)) {
- char *abbr;
-
- gtk_tree_model_get ((GtkTreeModel *) model, &iter, 2, &abbr, -1);
- gtk_list_store_set (model, &iter, 0, g_hash_table_lookup (present, abbr) != NULL, -1);
- }
-
- g_hash_table_destroy (present);
- if (strv != NULL)
- g_strfreev (strv);
-
- gnome_color_picker_set_i16 (GNOME_COLOR_PICKER (prefs->colour),
- prefs->spell_error_color.red,
- prefs->spell_error_color.green,
- prefs->spell_error_color.blue, 0xffff);
-
- prefs->spell_active = TRUE;
-}
-
-static gchar *
-spell_get_language_str (EMComposerPrefs *prefs)
-{
- GString *str = g_string_new ("");
- GtkListStore *model;
- GtkTreeIter iter;
- gboolean go;
- char *rv;
-
- model = (GtkListStore *) gtk_tree_view_get_model (prefs->language);
- for (go = gtk_tree_model_get_iter_first ((GtkTreeModel *) model, &iter);
- go;
- go = gtk_tree_model_iter_next ((GtkTreeModel *) model, &iter)) {
- char *abbr;
- gboolean state;
-
- gtk_tree_model_get ((GtkTreeModel *) model, &iter, 0, &state, 2, &abbr, -1);
- if (state) {
- if (str->len)
- g_string_append_c (str, ' ');
- g_string_append (str, abbr);
- }
- }
-
- rv = str->str;
- g_string_free (str, FALSE);
-
- return rv;
-}
-
-static void
-spell_get_ui (EMComposerPrefs *prefs)
-{
- gnome_color_picker_get_i16 (GNOME_COLOR_PICKER (prefs->colour),
- &prefs->spell_error_color.red,
- &prefs->spell_error_color.green,
- &prefs->spell_error_color.blue, NULL);
- g_free (prefs->language_str);
- prefs->language_str = spell_get_language_str (prefs);
-}
-
-#define GET(t,x,prop,f,c) \
- val = gconf_client_get_without_default (prefs->gconf, GNOME_SPELL_GCONF_DIR x, NULL); \
- if (val) { f; prop = c (gconf_value_get_ ## t (val)); \
- gconf_value_free (val); }
-
-static void
-spell_save_orig (EMComposerPrefs *prefs)
-{
- g_free (prefs->language_str_orig);
- prefs->language_str_orig = g_strdup (prefs->language_str ? prefs->language_str : "");
- prefs->spell_error_color_orig = prefs->spell_error_color;
-}
-
-/* static void
-spell_load_orig (EMComposerPrefs *prefs)
-{
- g_free (prefs->language_str);
- prefs->language_str = g_strdup (prefs->language_str_orig);
- prefs->spell_error_color = prefs->spell_error_color_orig;
-} */
-
-static void
-spell_load_values (EMComposerPrefs *prefs)
-{
- GConfValue *val;
- char *def_lang;
-
- def_lang = g_strdup (e_iconv_locale_language ());
- g_free (prefs->language_str);
- prefs->language_str = g_strdup (def_lang);
- prefs->spell_error_color.red = 0xffff;
- prefs->spell_error_color.green = 0;
- prefs->spell_error_color.blue = 0;
-
- GET (int, "/spell_error_color_red", prefs->spell_error_color.red, (void)0, (int));
- GET (int, "/spell_error_color_green", prefs->spell_error_color.green, (void)0, (int));
- GET (int, "/spell_error_color_blue", prefs->spell_error_color.blue, (void)0, (int));
- GET (string, "/language", prefs->language_str, g_free (prefs->language_str), g_strdup);
-
- if (prefs->language_str == NULL)
- prefs->language_str = g_strdup (def_lang);
-
- spell_save_orig (prefs);
-
- g_free (def_lang);
-}
-
-#define SET(t,x,prop) \
- gconf_client_set_ ## t (prefs->gconf, GNOME_SPELL_GCONF_DIR x, prop, NULL);
-
-#define STR_EQUAL(str1, str2) ((str1 == NULL && str2 == NULL) || (str1 && str2 && !strcmp (str1, str2)))
-
-static void
-spell_save_values (EMComposerPrefs *prefs, gboolean force)
-{
- if (force || !gdk_color_equal (&prefs->spell_error_color, &prefs->spell_error_color_orig)) {
- SET (int, "/spell_error_color_red", prefs->spell_error_color.red);
- SET (int, "/spell_error_color_green", prefs->spell_error_color.green);
- SET (int, "/spell_error_color_blue", prefs->spell_error_color.blue);
- }
-
- if (force || !STR_EQUAL (prefs->language_str, prefs->language_str_orig)) {
- SET (string, "/language", prefs->language_str ? prefs->language_str : "");
- }
-
- gconf_client_suggest_sync (prefs->gconf, NULL);
-}
-
-static void
-spell_apply (EMComposerPrefs *prefs)
-{
- spell_get_ui (prefs);
- spell_save_values (prefs, FALSE);
-}
-
-/* static void
-spell_revert (EMComposerPrefs *prefs)
-{
- spell_load_orig (prefs);
- spell_set_ui (prefs);
- spell_save_values (prefs, TRUE);
-} */
-
-static void
-spell_changed (gpointer user_data)
-{
- EMComposerPrefs *prefs = (EMComposerPrefs *) user_data;
-
- if (prefs->control)
- evolution_config_control_changed (prefs->control);
-}
-
-static void
-spell_color_set (GtkWidget *widget, guint r, guint g, guint b, guint a, gpointer user_data)
-{
- spell_changed (user_data);
-}
-
-static void
-spell_language_selection_changed (GtkTreeSelection *selection, EMComposerPrefs *prefs)
-{
- GtkTreeIter iter;
- GtkTreeModel *model;
- gboolean state = FALSE;
-
- if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
- gtk_tree_model_get ((GtkTreeModel *) model, &iter, 0, &state, -1);
- gtk_button_set_label ((GtkButton *) prefs->spell_able_button, state ? _("Disable") : _("Enable"));
- state = TRUE;
- }
- gtk_widget_set_sensitive (prefs->spell_able_button, state);
-}
-
-static void
-spell_language_enable (GtkWidget *widget, EMComposerPrefs *prefs)
-{
- GtkTreeIter iter;
- GtkTreeModel *model;
- GtkTreeSelection *selection;
- gboolean state;
-
- selection = gtk_tree_view_get_selection (prefs->language);
- if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
- gtk_tree_model_get (model, &iter, 0, &state, -1);
- gtk_list_store_set ((GtkListStore *) model, &iter, 0, !state, -1);
- gtk_button_set_label ((GtkButton *) prefs->spell_able_button, state ? _("Enable") : _("Disable"));
- spell_changed (prefs);
- }
-}
-
-static gboolean
-spell_language_button_press (GtkTreeView *tv, GdkEventButton *event, EMComposerPrefs *prefs)
-{
- GtkTreePath *path = NULL;
- GtkTreeViewColumn *column = NULL;
- gtk_tree_view_get_path_at_pos (tv, event->x, event->y, &path, &column, NULL, NULL);
-
- /* FIXME: This routine should just be a "toggled" event handler on the checkbox cell renderer which
- has "activatable" set. */
-
- if (path != NULL && column != NULL && !strcmp (gtk_tree_view_column_get_title (column), _("Enabled"))) {
- GtkTreeIter iter;
- GtkTreeModel *model;
- gboolean enabled;
-
- model = gtk_tree_view_get_model (tv);
- gtk_tree_model_get_iter (model, &iter, path);
- gtk_tree_model_get (model, &iter, 0, &enabled, -1);
- gtk_list_store_set ((GtkListStore *) model, &iter, 0, !enabled, -1);
- gtk_button_set_label ((GtkButton *) prefs->spell_able_button, enabled ? _("Enable") : _("Disable"));
- spell_changed (prefs);
- }
-
- return FALSE;
-}
-
-static void
-spell_setup (EMComposerPrefs *prefs)
-{
- GtkListStore *model;
- GtkTreeIter iter;
- int i;
-
- model = (GtkListStore *) gtk_tree_view_get_model (prefs->language);
-
- if (prefs->language_seq) {
- for (i = 0; i < prefs->language_seq->_length; i++) {
- gtk_list_store_append (model, &iter);
- gtk_list_store_set (model, &iter,
- 1, _(prefs->language_seq->_buffer[i].name),
- 2, prefs->language_seq->_buffer[i].abbreviation,
- -1);
- }
- }
-
- spell_load_values (prefs);
- spell_set_ui (prefs);
-
- glade_xml_signal_connect_data (prefs->gui, "spellColorSet", G_CALLBACK (spell_color_set), prefs);
- glade_xml_signal_connect_data (prefs->gui, "spellLanguageEnable", GTK_SIGNAL_FUNC (spell_language_enable), prefs);
-
- g_signal_connect (prefs->language, "button_press_event", G_CALLBACK (spell_language_button_press), prefs);
-}
-
-static gboolean
-spell_setup_check_options (EMComposerPrefs *prefs)
-{
- GNOME_Spell_Dictionary dict;
- CORBA_Environment ev;
- char *dictionary_id;
-
- dictionary_id = "OAFIID:GNOME_Spell_Dictionary:" SPELL_API_VERSION;
- dict = bonobo_activation_activate_from_id (dictionary_id, 0, NULL, NULL);
- if (dict == CORBA_OBJECT_NIL) {
- g_warning ("Cannot activate %s", dictionary_id);
-
- return FALSE;
- }
-
- CORBA_exception_init (&ev);
- prefs->language_seq = GNOME_Spell_Dictionary_getLanguages (dict, &ev);
- if (ev._major != CORBA_NO_EXCEPTION)
- prefs->language_seq = NULL;
- CORBA_exception_free (&ev);
-
- if (prefs->language_seq == NULL)
- return FALSE;
-
- gconf_client_add_dir (prefs->gconf, GNOME_SPELL_GCONF_DIR, GCONF_CLIENT_PRELOAD_NONE, NULL);
-
- spell_setup (prefs);
-
- return TRUE;
-}
-
-/*
- * End of Spell checking
- */
-
-static void
-em_composer_prefs_construct (EMComposerPrefs *prefs)
-{
- GtkWidget *toplevel, *widget, *menu, *info_pixmap;
- GtkDialog *dialog;
- GladeXML *gui;
- GtkListStore *model;
- GtkTreeSelection *selection;
- gboolean bool;
- int style;
- char *buf;
-
- prefs->gconf = mail_config_get_gconf_client ();
-
- gui = glade_xml_new (EVOLUTION_GLADEDIR "/mail-config.glade", "composer_tab", NULL);
- prefs->gui = gui;
- prefs->sig_script_gui = glade_xml_new (EVOLUTION_GLADEDIR "/mail-config.glade", "vbox_add_script_signature", NULL);
-
- /* get our toplevel widget */
- toplevel = glade_xml_get_widget (gui, "toplevel");
-
- /* reparent */
- gtk_widget_ref (toplevel);
- gtk_container_remove (GTK_CONTAINER (toplevel->parent), toplevel);
- gtk_container_add (GTK_CONTAINER (prefs), toplevel);
- gtk_widget_unref (toplevel);
-
- /* General tab */
-
- /* Default Behavior */
- prefs->send_html = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkSendHTML"));
- bool = gconf_client_get_bool (prefs->gconf, "/apps/evolution/mail/composer/send_html", NULL);
- gtk_toggle_button_set_active (prefs->send_html, bool);
- g_signal_connect (prefs->send_html, "toggled", G_CALLBACK (toggle_button_toggled), prefs);
-
- prefs->prompt_empty_subject = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkPromptEmptySubject"));
- bool = gconf_client_get_bool (prefs->gconf, "/apps/evolution/mail/prompts/empty_subject", NULL);
- gtk_toggle_button_set_active (prefs->prompt_empty_subject, bool);
- g_signal_connect (prefs->prompt_empty_subject, "toggled", G_CALLBACK (toggle_button_toggled), prefs);
-
- prefs->prompt_bcc_only = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkPromptBccOnly"));
- bool = gconf_client_get_bool (prefs->gconf, "/apps/evolution/mail/prompts/only_bcc", NULL);
- gtk_toggle_button_set_active (prefs->prompt_bcc_only, bool);
- g_signal_connect (prefs->prompt_bcc_only, "toggled", G_CALLBACK (toggle_button_toggled), prefs);
-
- prefs->auto_smileys = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkAutoSmileys"));
- bool = gconf_client_get_bool (prefs->gconf, "/apps/evolution/mail/composer/magic_smileys", NULL);
- gtk_toggle_button_set_active (prefs->auto_smileys, bool);
- g_signal_connect (prefs->auto_smileys, "toggled", G_CALLBACK (toggle_button_toggled), prefs);
-
- prefs->spell_check = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkEnableSpellChecking"));
- bool = gconf_client_get_bool (prefs->gconf, "/apps/evolution/mail/composer/inline_spelling", NULL);
- gtk_toggle_button_set_active (prefs->spell_check, bool);
- g_signal_connect (prefs->spell_check, "toggled", G_CALLBACK (toggle_button_toggled), prefs);
-
- prefs->charset = GTK_OPTION_MENU (glade_xml_get_widget (gui, "omenuCharset"));
- buf = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/composer/charset", NULL);
- menu = e_charset_picker_new (buf && *buf ? buf : e_iconv_locale_charset ());
- gtk_option_menu_set_menu (prefs->charset, GTK_WIDGET (menu));
- option_menu_connect (prefs->charset, prefs);
- g_free (buf);
-
- /* Spell Checking: GNOME Spell part */
- prefs->colour = GNOME_COLOR_PICKER (glade_xml_get_widget (gui, "colorpickerSpellCheckColor"));
- prefs->language = GTK_TREE_VIEW (glade_xml_get_widget (gui, "clistSpellCheckLanguage"));
- model = gtk_list_store_new (3, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_POINTER);
- gtk_tree_view_set_model (prefs->language, (GtkTreeModel *) model);
- gtk_tree_view_insert_column_with_attributes (prefs->language, -1, _("Enabled"),
- gtk_cell_renderer_toggle_new (),
- "active", 0,
- NULL);
- gtk_tree_view_insert_column_with_attributes (prefs->language, -1, _("Language(s)"),
- gtk_cell_renderer_text_new (),
- "text", 1,
- NULL);
- selection = gtk_tree_view_get_selection (prefs->language);
- gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
- g_signal_connect (selection, "changed", G_CALLBACK (spell_language_selection_changed), prefs);
-#if 0
- gtk_clist_set_column_justification (prefs->language, 0, GTK_JUSTIFY_RIGHT);
- gtk_clist_set_column_auto_resize (prefs->language, 0, TRUE);
-#endif
-
- prefs->spell_able_button = glade_xml_get_widget (gui, "buttonSpellCheckEnable");
- info_pixmap = glade_xml_get_widget (gui, "pixmapSpellInfo");
- gtk_image_set_from_file (GTK_IMAGE (info_pixmap), EVOLUTION_IMAGES "/info-bulb.png");
- if (!spell_setup_check_options (prefs)) {
- gtk_widget_hide (GTK_WIDGET (prefs->colour));
- gtk_widget_hide (GTK_WIDGET (prefs->language));
- }
-
- /* Forwards and Replies */
- prefs->forward_style = GTK_OPTION_MENU (glade_xml_get_widget (gui, "omenuForwardStyle"));
- style = gconf_client_get_int (prefs->gconf, "/apps/evolution/mail/format/forward_style", NULL);
- gtk_option_menu_set_history (prefs->forward_style, style);
- style = 0;
- gtk_container_foreach (GTK_CONTAINER (gtk_option_menu_get_menu (prefs->forward_style)),
- attach_style_info, &style);
- option_menu_connect (prefs->forward_style, prefs);
-
- prefs->reply_style = GTK_OPTION_MENU (glade_xml_get_widget (gui, "omenuReplyStyle"));
- style = gconf_client_get_int (prefs->gconf, "/apps/evolution/mail/format/reply_style", NULL);
- gtk_option_menu_set_history (prefs->reply_style, style);
- style = 0;
- gtk_container_foreach (GTK_CONTAINER (gtk_option_menu_get_menu (prefs->reply_style)),
- attach_style_info, &style);
- option_menu_connect (prefs->reply_style, prefs);
-
- /* Signatures */
- dialog = (GtkDialog *) gtk_dialog_new ();
- prefs->sig_script_dialog = (GtkWidget *) dialog;
- gtk_dialog_add_buttons (dialog, GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
- GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL);
- gtk_window_set_title ((GtkWindow *) dialog, _("Add script signature"));
- g_signal_connect (dialog, "response", G_CALLBACK (sig_add_script_response), prefs);
- widget = glade_xml_get_widget (prefs->sig_script_gui, "vbox_add_script_signature");
- gtk_box_pack_start_defaults ((GtkBox *) dialog->vbox, widget);
-
- prefs->sig_add = GTK_BUTTON (glade_xml_get_widget (gui, "cmdSignatureAdd"));
- g_signal_connect (prefs->sig_add, "clicked", G_CALLBACK (sig_add_cb), prefs);
-
- glade_xml_signal_connect_data (gui, "cmdSignatureAddScriptClicked",
- G_CALLBACK (sig_add_script_cb), prefs);
-
- prefs->sig_edit = GTK_BUTTON (glade_xml_get_widget (gui, "cmdSignatureEdit"));
- g_signal_connect (prefs->sig_edit, "clicked", G_CALLBACK (sig_edit_cb), prefs);
-
- prefs->sig_delete = GTK_BUTTON (glade_xml_get_widget (gui, "cmdSignatureDelete"));
- g_signal_connect (prefs->sig_delete, "clicked", G_CALLBACK (sig_delete_cb), prefs);
-
- prefs->sig_list = GTK_TREE_VIEW (glade_xml_get_widget (gui, "clistSignatures"));
- model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_POINTER);
- gtk_tree_view_set_model (prefs->sig_list, (GtkTreeModel *)model);
- gtk_tree_view_insert_column_with_attributes (prefs->sig_list, -1, _("Signature(s)"),
- gtk_cell_renderer_text_new (),
- "text", 0,
- NULL);
- selection = gtk_tree_view_get_selection (prefs->sig_list);
- gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
- g_signal_connect (selection, "changed", G_CALLBACK (sig_selection_changed), prefs);
-
- sig_fill_clist (prefs->sig_list);
- if (mail_config_get_signature_list () == NULL) {
- gtk_widget_set_sensitive ((GtkWidget *) prefs->sig_delete, FALSE);
- gtk_widget_set_sensitive ((GtkWidget *) prefs->sig_edit, FALSE);
- }
-
- /* preview GtkHTML widget */
- widget = glade_xml_get_widget (gui, "scrolled-sig");
- prefs->sig_preview = (GtkHTML *) gtk_html_new ();
- g_signal_connect (prefs->sig_preview, "url_requested", G_CALLBACK (url_requested), NULL);
- gtk_widget_show (GTK_WIDGET (prefs->sig_preview));
- gtk_container_add (GTK_CONTAINER (widget), GTK_WIDGET (prefs->sig_preview));
-
- mail_config_signature_register_client ((MailConfigSignatureClient) sig_event_client, prefs);
-}
-
-
-GtkWidget *
-em_composer_prefs_new (void)
-{
- EMComposerPrefs *new;
-
- new = (EMComposerPrefs *) g_object_new (em_composer_prefs_get_type (), NULL);
- em_composer_prefs_construct (new);
-
- return (GtkWidget *) new;
-}
-
-
-void
-em_composer_prefs_apply (EMComposerPrefs *prefs)
-{
- GtkWidget *menu, *item;
- char *string;
- int val;
-
- /* General tab */
-
- /* Default Behavior */
- gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/composer/send_html",
- gtk_toggle_button_get_active (prefs->send_html), NULL);
-
- gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/prompts/empty_subject",
- gtk_toggle_button_get_active (prefs->prompt_empty_subject), NULL);
-
- gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/prompts/only_bcc",
- gtk_toggle_button_get_active (prefs->prompt_bcc_only), NULL);
-
- gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/composer/inline_spelling",
- gtk_toggle_button_get_active (prefs->spell_check), NULL);
-
- gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/composer/magic_smileys",
- gtk_toggle_button_get_active (prefs->auto_smileys), NULL);
-
- menu = gtk_option_menu_get_menu (prefs->charset);
- if (!(string = e_charset_picker_get_charset (menu)))
- string = g_strdup (e_iconv_locale_charset ());
-
- gconf_client_set_string (prefs->gconf, "/apps/evolution/mail/composer/charset", string, NULL);
- g_free (string);
-
- /* Spell Checking */
- spell_apply (prefs);
-
- /* Forwards and Replies */
- menu = gtk_option_menu_get_menu (prefs->forward_style);
- item = gtk_menu_get_active (GTK_MENU (menu));
- val = GPOINTER_TO_INT (g_object_get_data ((GObject *) item, "style"));
- gconf_client_set_int (prefs->gconf, "/apps/evolution/mail/format/forward_style", val, NULL);
-
- menu = gtk_option_menu_get_menu (prefs->reply_style);
- item = gtk_menu_get_active (GTK_MENU (menu));
- val = GPOINTER_TO_INT (g_object_get_data ((GObject *) item, "style"));
- gconf_client_set_int (prefs->gconf, "/apps/evolution/mail/format/reply_style", val, NULL);
-
- /* Keyboard Shortcuts */
- /* FIXME: implement me */
-
- /* Signatures */
- /* FIXME: implement me */
-
- gconf_client_suggest_sync (prefs->gconf, NULL);
-}
diff --git a/mail/em-composer-prefs.h b/mail/em-composer-prefs.h
deleted file mode 100644
index 70b5eb15eb..0000000000
--- a/mail/em-composer-prefs.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2002-2003 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 __EM_COMPOSER_PREFS_H__
-#define __EM_COMPOSER_PREFS_H__
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <gtk/gtk.h>
-#include <glade/glade.h>
-#include <gtkhtml/gtkhtml.h>
-
-#include <libgnomeui/gnome-color-picker.h>
-#include <libgnomeui/gnome-file-entry.h>
-#include <gconf/gconf-client.h>
-
-#include "mail-signature-editor.h"
-
-#include "evolution-config-control.h"
-
-#include <shell/Evolution.h>
-#include "Spell.h"
-
-#define EM_COMPOSER_PREFS_TYPE (em_composer_prefs_get_type ())
-#define EM_COMPOSER_PREFS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EM_COMPOSER_PREFS_TYPE, EMComposerPrefs))
-#define EM_COMPOSER_PREFS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), EM_COMPOSER_PREFS_TYPE, EMComposerPrefsClass))
-#define EM_IS_COMPOSER_PREFS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EM_COMPOSER_PREFS_TYPE))
-#define EM_IS_COMPOSER_PREFS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EM_COMPOSER_PREFS_TYPE))
-
-typedef struct _EMComposerPrefs EMComposerPrefs;
-typedef struct _EMComposerPrefsClass EMComposerPrefsClass;
-
-struct _EMComposerPrefs {
- GtkVBox parent_object;
-
- EvolutionConfigControl *control;
-
- GConfClient *gconf;
-
- GladeXML *gui;
-
- /* General tab */
-
- /* Default Behavior */
- GtkToggleButton *send_html;
- GtkToggleButton *auto_smileys;
- GtkToggleButton *prompt_empty_subject;
- GtkToggleButton *prompt_bcc_only;
- GtkOptionMenu *charset;
-
- GtkToggleButton *spell_check;
- GnomeColorPicker *colour;
- GtkTreeView *language;
- CORBA_sequence_GNOME_Spell_Language *language_seq;
- gboolean spell_active;
- char *language_str;
- char *language_str_orig;
- GdkColor spell_error_color;
- GdkColor spell_error_color_orig;
- GdkPixmap *mark_pixmap;
- GdkBitmap *mark_bitmap;
- GdkPixbuf *enabled_pixbuf;
- GtkWidget *spell_able_button;
-
- /* Forwards and Replies */
- GtkOptionMenu *forward_style;
- GtkOptionMenu *reply_style;
-
- /* Keyboard Shortcuts */
- GtkOptionMenu *shortcuts_type;
-
- /* Signatures */
- GtkTreeView *sig_list;
- GtkButton *sig_add;
- GtkButton *sig_edit;
- GtkButton *sig_delete;
- GtkHTML *sig_preview;
- gboolean sig_switch;
- int sig_row;
- GladeXML *sig_script_gui;
- GtkWidget *sig_script_dialog;
-};
-
-struct _EMComposerPrefsClass {
- GtkVBoxClass parent_class;
-
- /* signals */
-
-};
-
-
-GType em_composer_prefs_get_type (void);
-
-GtkWidget *em_composer_prefs_new (void);
-
-void em_composer_prefs_apply (EMComposerPrefs *prefs);
-
-MailConfigSignature *em_composer_prefs_new_signature (GtkWindow *parent, gboolean html, const char *script);
-
-/* needed by global config */
-#define EM_COMPOSER_PREFS_CONTROL_ID "OAFIID:GNOME_Evolution_Mail_ComposerPrefs_ConfigControl:" BASE_VERSION
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __EM_COMPOSER_PREFS_H__ */
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
deleted file mode 100644
index bc076a7f77..0000000000
--- a/mail/em-composer-utils.c
+++ /dev/null
@@ -1,600 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2003 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 "mail-mt.h"
-#include "mail-ops.h"
-#include "mail-tools.h"
-#include "mail-config.h"
-#include "mail-session.h"
-#include "mail-send-recv.h"
-
-#include <e-util/e-dialog-utils.h> /* e_notice */
-
-#include "em-utils.h"
-#include "em-composer-utils.h"
-
-struct emcs_t {
- unsigned int ref_count;
-
- CamelFolder *drafts_folder;
- char *drafts_uid;
-
- CamelFolder *folder;
- guint32 flags, set;
- char *uid;
-};
-
-static struct emcs_t *
-emcs_new (void)
-{
- struct emcs_t *emcs;
-
- emcs = g_new (struct emcs_t, 1);
- emcs->ref_count = 1;
- emcs->drafts_folder = NULL;
- emcs->drafts_uid = NULL;
- emcs->folder = NULL;
- emcs->flags = 0;
- emcs->set = 0;
- emcs->uid = NULL;
-
- return emcs;
-}
-
-static void
-free_emcs (struct emcs_t *emcs)
-{
- if (emcs->drafts_folder)
- camel_object_unref (emcs->drafts_folder);
- g_free (emcs->drafts_uid);
-
- if (emcs->folder)
- camel_object_unref (emcs->folder);
- g_free (emcs->uid);
- g_free (emcs);
-}
-
-static void
-emcs_ref (struct emcs_t *emcs)
-{
- emcs->ref_count++;
-}
-
-static void
-emcs_unref (struct emcs_t *emcs)
-{
- emcs->ref_count--;
- if (emcs->ref_count == 0)
- free_emcs (emcs);
-}
-
-static void
-composer_destroy_cb (gpointer user_data, GObject *deadbeef)
-{
- emcs_unref (user_data);
-}
-
-static gboolean
-ask_confirm_for_unwanted_html_mail (EMsgComposer *composer, EABDestination **recipients)
-{
- gboolean res;
- GString *str;
- int i;
-
- str = g_string_new("");
- for (i = 0; recipients[i] != NULL; ++i) {
- if (!eab_destination_get_html_mail_pref (recipients[i])) {
- const char *name;
-
- name = eab_destination_get_textrep (recipients[i], FALSE);
-
- g_string_append_printf (str, " %s\n", name);
- }
- }
-
- /* FIXME: this wording sucks */
- res = em_utils_prompt_user((GtkWindow *) composer, GTK_RESPONSE_YES, "/apps/evolution/mail/prompts/unwanted_html",
- _("You are sending an HTML-formatted message. Please make sure that\n"
- "the following recipients are willing and able to receive HTML mail:\n"
- "%s"
- "Send anyway?"),
- str->str);
- g_string_free (str, TRUE);
-
- return res;
-}
-
-static gboolean
-ask_confirm_for_empty_subject (EMsgComposer *composer)
-{
- return em_utils_prompt_user((GtkWindow *)composer, GTK_RESPONSE_YES, "/apps/evolution/mail/prompts/empty_subject",
- _("This message has no subject.\nReally send?"));
-}
-
-static gboolean
-ask_confirm_for_only_bcc (EMsgComposer *composer, gboolean hidden_list_case)
-{
- gboolean show_again, res;
- const char *first_text;
-
- /* 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.");
- }
-
- return em_utils_prompt_user ((GtkWindow *) composer, GTK_RESPONSE_YES, "/apps/evolution/mail/prompts/only_bcc",
- "%s\n%s", first_text,
- _("It is possible that the mail server may reveal the recipients "
- "by adding an Apparently-To header.\nSend anyway?"));
-}
-
-struct _send_data {
- struct emcs_t *emcs;
- EMsgComposer *composer;
- gboolean send;
-};
-
-static void
-composer_send_queued_cb (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info,
- int queued, const char *appended_uid, void *data)
-{
- struct emcs_t *emcs;
- struct _send_data *send = data;
-
- emcs = send->emcs;
-
- if (queued) {
- if (emcs && emcs->drafts_folder) {
- /* delete the old draft message */
- camel_folder_set_message_flags (emcs->drafts_folder, emcs->drafts_uid,
- CAMEL_MESSAGE_DELETED | CAMEL_MESSAGE_SEEN,
- CAMEL_MESSAGE_DELETED | CAMEL_MESSAGE_SEEN);
- camel_object_unref (emcs->drafts_folder);
- emcs->drafts_folder = NULL;
- g_free (emcs->drafts_uid);
- emcs->drafts_uid = NULL;
- }
-
- if (emcs && emcs->folder) {
- /* set any replied flags etc */
- camel_folder_set_message_flags (emcs->folder, emcs->uid, emcs->flags, emcs->set);
- camel_object_unref (emcs->folder);
- emcs->folder = NULL;
- g_free (emcs->uid);
- emcs->uid = NULL;
- }
-
- gtk_widget_destroy (GTK_WIDGET (send->composer));
-
- if (send->send && camel_session_is_online (session)) {
- /* queue a message send */
- mail_send ();
- }
- } else {
- if (!emcs) {
- /* disconnect the previous signal handlers */
- g_signal_handlers_disconnect_matched (send->composer, G_SIGNAL_MATCH_FUNC, 0,
- 0, NULL, em_utils_composer_send_cb, NULL);
- g_signal_handlers_disconnect_matched (send->composer, G_SIGNAL_MATCH_FUNC, 0,
- 0, NULL, em_utils_composer_save_draft_cb, NULL);
-
- /* reconnect to the signals using a non-NULL emcs for the callback data */
- em_composer_utils_setup_default_callbacks (send->composer);
- }
-
- e_msg_composer_set_enable_autosave (send->composer, TRUE);
- gtk_widget_show (GTK_WIDGET (send->composer));
- }
-
- camel_message_info_free (info);
-
- if (send->emcs)
- emcs_unref (send->emcs);
-
- g_object_unref (send->composer);
- g_free (send);
-}
-
-static CamelMimeMessage *
-composer_get_message (EMsgComposer *composer, gboolean post, gboolean save_html_object_data)
-{
- CamelMimeMessage *message = NULL;
- EABDestination **recipients, **recipients_bcc;
- gboolean send_html, confirm_html;
- CamelInternetAddress *cia;
- int hidden = 0, shown = 0;
- int num = 0, num_bcc = 0;
- const char *subject;
- GConfClient *gconf;
- EAccount *account;
- int i;
-
- gconf = mail_config_get_gconf_client ();
-
- /* We should do all of the validity checks based on the composer, and not on
- the created message, as extra interaction may occur when we get the message
- (e.g. to get a passphrase to sign a message) */
-
- /* get the message recipients */
- recipients = e_msg_composer_get_recipients (composer);
-
- cia = camel_internet_address_new ();
-
- /* see which ones are visible/present, etc */
- if (recipients) {
- for (i = 0; recipients[i] != NULL; i++) {
- const char *addr = eab_destination_get_address (recipients[i]);
-
- if (addr && addr[0]) {
- camel_address_decode ((CamelAddress *) cia, addr);
- if (camel_address_length ((CamelAddress *) cia) > 0) {
- camel_address_remove ((CamelAddress *) cia, -1);
- num++;
- if (eab_destination_is_evolution_list (recipients[i])
- && !eab_destination_list_show_addresses (recipients[i])) {
- hidden++;
- } else {
- shown++;
- }
- }
- }
- }
- }
-
- recipients_bcc = e_msg_composer_get_bcc (composer);
- if (recipients_bcc) {
- for (i = 0; recipients_bcc[i] != NULL; i++) {
- const char *addr = eab_destination_get_address (recipients_bcc[i]);
-
- if (addr && addr[0]) {
- camel_address_decode ((CamelAddress *) cia, addr);
- if (camel_address_length ((CamelAddress *) cia) > 0) {
- camel_address_remove ((CamelAddress *) cia, -1);
- num_bcc++;
- }
- }
- }
-
- eab_destination_freev (recipients_bcc);
- }
-
- camel_object_unref (cia);
-
- /* I'm sensing a lack of love, er, I mean recipients. */
- if (num == 0 && !post) {
- e_notice ((GtkWindow *) composer, GTK_MESSAGE_WARNING,
- _("You must specify recipients in order to send this message."));
- goto finished;
- }
-
- if (num > 0 && (num == num_bcc || shown == 0)) {
- /* this means that the only recipients are Bcc's */
- if (!ask_confirm_for_only_bcc (composer, shown == 0))
- goto finished;
- }
-
- send_html = gconf_client_get_bool (gconf, "/apps/evolution/mail/composer/send_html", NULL);
- confirm_html = gconf_client_get_bool (gconf, "/apps/evolution/mail/prompts/unwanted_html", NULL);
-
- /* 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) && send_html && confirm_html) {
- gboolean html_problem = FALSE;
-
- if (recipients) {
- for (i = 0; recipients[i] != NULL && !html_problem; i++) {
- if (!eab_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)
- goto finished;
- }
- }
-
- /* Check for no subject */
- subject = e_msg_composer_get_subject (composer);
- if (subject == NULL || subject[0] == '\0') {
- if (!ask_confirm_for_empty_subject (composer))
- goto finished;
- }
-
- /* actually get the message now, this will sign/encrypt etc */
- message = e_msg_composer_get_message (composer, save_html_object_data);
- if (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);
- if (account->id->organization && *account->id->organization) {
- char *org;
-
- org = camel_header_encode_string (account->id->organization);
- camel_medium_set_header (CAMEL_MEDIUM (message), "Organization", org);
- g_free (org);
- }
- }
-
- /* Get the message recipients and 'touch' them, boosting their use scores */
- if (recipients)
- eab_destination_touchv (recipients);
-
- finished:
-
- if (recipients)
- eab_destination_freev (recipients);
-
- return message;
-}
-
-static void
-got_post_folder (char *uri, CamelFolder *folder, void *data)
-{
- CamelFolder **fp = data;
-
- *fp = folder;
-
- if (folder)
- camel_object_ref (folder);
-}
-
-void
-em_utils_composer_send_cb (EMsgComposer *composer, gpointer user_data)
-{
- extern CamelFolder *outbox_folder;
- CamelMimeMessage *message;
- CamelMessageInfo *info;
- struct _send_data *send;
- gboolean post = FALSE;
- CamelFolder *folder;
- XEvolution *xev;
- char *url;
-
- url = e_msg_composer_hdrs_get_post_to ((EMsgComposerHdrs *) composer->hdrs);
- if (url && *url) {
- post = TRUE;
-
- mail_msg_wait (mail_get_folder (url, 0, got_post_folder, &folder, mail_thread_new));
-
- if (!folder) {
- g_free (url);
- return;
- }
- } else {
- folder = outbox_folder;
- camel_object_ref (folder);
- }
-
- g_free (url);
-
- message = composer_get_message (composer, post, FALSE);
- if (!message)
- return;
-
- if (post) {
- /* Remove the X-Evolution* headers if we are in Post-To mode */
- xev = mail_tool_remove_xevolution_headers (message);
- mail_tool_destroy_xevolution (xev);
- }
-
- info = camel_message_info_new ();
- info->flags = CAMEL_MESSAGE_SEEN;
-
- send = g_malloc (sizeof (*send));
- send->emcs = user_data;
- if (send->emcs)
- emcs_ref (send->emcs);
- send->send = !post;
- send->composer = composer;
- g_object_ref (composer);
- gtk_widget_hide (GTK_WIDGET (composer));
-
- e_msg_composer_set_enable_autosave (composer, FALSE);
-
- mail_append_mail (folder, message, info, composer_send_queued_cb, send);
- camel_object_unref (message);
- camel_object_unref (folder);
-}
-
-struct _save_draft_info {
- struct emcs_t *emcs;
- EMsgComposer *composer;
- int quit;
-};
-
-static void
-save_draft_done (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, int ok,
- const char *appended_uid, void *user_data)
-{
- struct _save_draft_info *sdi = user_data;
- struct emcs_t *emcs;
- CORBA_Environment ev;
-
- if (!ok)
- goto done;
- CORBA_exception_init (&ev);
- GNOME_GtkHTML_Editor_Engine_runCommand (sdi->composer->editor_engine, "saved", &ev);
- CORBA_exception_free (&ev);
-
- if ((emcs = sdi->emcs) == NULL) {
- emcs = emcs_new ();
-
- /* disconnect the previous signal handlers */
- g_signal_handlers_disconnect_by_func (sdi->composer, G_CALLBACK (em_utils_composer_send_cb), NULL);
- g_signal_handlers_disconnect_by_func (sdi->composer, G_CALLBACK (em_utils_composer_save_draft_cb), NULL);
-
- /* reconnect to the signals using a non-NULL emcs for the callback data */
- em_composer_utils_setup_default_callbacks (sdi->composer);
- }
-
- if (emcs->drafts_folder) {
- /* delete the original draft message */
- camel_folder_set_message_flags (emcs->drafts_folder, emcs->drafts_uid,
- CAMEL_MESSAGE_DELETED | CAMEL_MESSAGE_SEEN,
- CAMEL_MESSAGE_DELETED | CAMEL_MESSAGE_SEEN);
- camel_object_unref (emcs->drafts_folder);
- emcs->drafts_folder = NULL;
- g_free (emcs->drafts_uid);
- emcs->drafts_uid = NULL;
- }
-
- if (emcs->folder) {
- /* set the replied flags etc */
- camel_folder_set_message_flags (emcs->folder, emcs->uid, emcs->flags, emcs->set);
- camel_object_unref (emcs->folder);
- emcs->folder = NULL;
- g_free (emcs->uid);
- emcs->uid = NULL;
- }
-
- if (appended_uid) {
- camel_object_ref (folder);
- emcs->drafts_folder = folder;
- emcs->drafts_uid = g_strdup (appended_uid);
- }
-
- if (sdi->quit)
- gtk_widget_destroy (GTK_WIDGET (sdi->composer));
-
- done:
- g_object_unref (sdi->composer);
- if (sdi->emcs)
- emcs_unref (sdi->emcs);
- g_free (info);
- g_free (sdi);
-}
-
-static void
-save_draft_folder (char *uri, CamelFolder *folder, gpointer data)
-{
- CamelFolder **save = data;
-
- if (folder) {
- *save = folder;
- camel_object_ref (folder);
- }
-}
-
-void
-em_utils_composer_save_draft_cb (EMsgComposer *composer, int quit, gpointer user_data)
-{
- extern char *default_drafts_folder_uri;
- extern CamelFolder *drafts_folder;
- struct _save_draft_info *sdi;
- CamelFolder *folder = NULL;
- CamelMimeMessage *msg;
- CamelMessageInfo *info;
- EAccount *account;
-
- 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, 0, save_draft_folder, &folder, mail_thread_new);
- mail_msg_wait (id);
-
- if (!folder) {
- if (!em_utils_prompt_user ((GtkWindow *) composer, GTK_RESPONSE_YES, NULL,
- _("Unable to open the drafts folder for this account.\n"
- "Would you like to use the default drafts folder?")))
- return;
-
- folder = drafts_folder;
- camel_object_ref (drafts_folder);
- }
- } else {
- folder = drafts_folder;
- camel_object_ref (folder);
- }
-
- msg = e_msg_composer_get_message_draft (composer);
-
- info = g_new0 (CamelMessageInfo, 1);
- info->flags = CAMEL_MESSAGE_DRAFT | CAMEL_MESSAGE_SEEN;
-
- sdi = g_malloc (sizeof (struct _save_draft_info));
- sdi->composer = composer;
- g_object_ref (composer);
- sdi->emcs = user_data;
- if (sdi->emcs)
- emcs_ref (sdi->emcs);
- sdi->quit = quit;
-
- mail_append_mail (folder, msg, info, save_draft_done, sdi);
- camel_object_unref (folder);
- camel_object_unref (msg);
-}
-
-
-void
-em_composer_utils_setup_callbacks (EMsgComposer *composer, CamelFolder *folder, const char *uid,
- guint32 flags, guint32 set, CamelFolder *drafts, const char *drafts_uid)
-{
- struct emcs_t *emcs;
-
- emcs = emcs_new ();
-
- if (folder && uid) {
- camel_object_ref (folder);
- emcs->folder = folder;
- emcs->uid = g_strdup (uid);
- emcs->flags = flags;
- emcs->set = set;
- }
-
- if (drafts && drafts_uid) {
- camel_object_ref (drafts);
- emcs->drafts_folder = drafts;
- emcs->drafts_uid = g_strdup (drafts_uid);
- }
-
- g_signal_connect (composer, "send", G_CALLBACK (em_utils_composer_send_cb), emcs);
- g_signal_connect (composer, "save-draft", G_CALLBACK (em_utils_composer_save_draft_cb), emcs);
-
- g_object_weak_ref ((GObject *) composer, (GWeakNotify) composer_destroy_cb, emcs);
-}
diff --git a/mail/em-composer-utils.h b/mail/em-composer-utils.h
deleted file mode 100644
index 7e4aeb0274..0000000000
--- a/mail/em-composer-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 2003 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 __EM_COMPOSER_UTILS_H__
-#define __EM_COMPOSER_UTILS_H__
-
-#include <composer/e-msg-composer.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-void em_composer_utils_setup_callbacks (EMsgComposer *composer, CamelFolder *folder, const char *uid,
- guint32 flags, guint32 set, CamelFolder *drafts, const char *drafts_uid);
-
-#define em_composer_utils_setup_default_callbacks(composer) em_composer_utils_setup_callbacks (composer, NULL, NULL, 0, 0, NULL, NULL)
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __EM_COMPOSER_UTILS_H__ */
diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c
deleted file mode 100644
index 313b2f61e4..0000000000
--- a/mail/em-folder-browser.c
+++ /dev/null
@@ -1,1018 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Michael Zucchi <notzed@ximian.com>
- * Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2003 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 <gtk/gtkvbox.h>
-#include <gtk/gtkscrolledwindow.h>
-#include <gtk/gtkbutton.h>
-#include <gtk/gtkvpaned.h>
-#include <gtkhtml/gtkhtml.h>
-#include <gdk/gdkkeysyms.h>
-
-#include <libgnomeprintui/gnome-print-dialog.h>
-
-#include "mail-mt.h"
-#include "mail-ops.h"
-#include "mail-tools.h"
-#include "mail-config.h"
-
-#include <e-util/e-passwords.h>
-#include <e-util/e-dialog-utils.h>
-
-#include <camel/camel-mime-message.h>
-#include <camel/camel-stream.h>
-#include <camel/camel-stream-filter.h>
-#include <camel/camel-mime-filter.h>
-#include <camel/camel-mime-filter-tohtml.h>
-#include <camel/camel-mime-filter-enriched.h>
-#include <camel/camel-multipart.h>
-#include <camel/camel-stream-mem.h>
-#include <camel/camel-url.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-ui-component.h>
-#include <bonobo/bonobo-ui-util.h>
-
-/* for efilterbar stuff */
-#include <e-util/e-sexp.h>
-#include "mail-vfolder.h"
-#include "filter/vfolder-rule.h"
-#include <widgets/misc/e-filter-bar.h>
-#include <camel/camel-search-private.h>
-
-/* gal view crap */
-#include <gal/menus/gal-view-etable.h>
-#include <gal/menus/gal-view-instance.h>
-#include <gal/menus/gal-view-factory-etable.h>
-#include "widgets/menus/gal-view-menus.h"
-
-#include "e-util/e-dialog-utils.h"
-#include "em-utils.h"
-#include "em-format-html-display.h"
-#include "em-format-html-print.h"
-#include "em-folder-browser.h"
-#include "em-subscribe-editor.h"
-#include "message-list.h"
-
-#include "mail-component.h"
-#include "mail-ops.h"
-
-#include "evolution-shell-component-utils.h" /* Pixmap stuff, sigh */
-
-#define d(x)
-
-struct _EMFolderBrowserPrivate {
- GtkWidget *preview; /* container for message display */
-
- GtkWidget *subscribe_editor;
-
- GalViewInstance *view_instance;
- GalViewMenus *view_menus;
-
- guint vpane_resize_id;
- guint list_built_id; /* hook onto list-built for delayed 'select first unread' stuff */
-};
-
-static void emfb_activate(EMFolderView *emfv, BonoboUIComponent *uic, int state);
-static void emfb_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri);
-
-/* FilterBar stuff ... */
-static void emfb_search_config_search(EFilterBar *efb, FilterRule *rule, int id, const char *query, void *data);
-static void emfb_search_menu_activated(ESearchBar *esb, int id, EMFolderBrowser *fb);
-static void emfb_search_search_activated(ESearchBar *esb, EMFolderBrowser *emfb);
-static void emfb_search_query_changed(ESearchBar *esb, EMFolderBrowser *fb);
-
-static int emfb_list_key_press(ETree *tree, int row, ETreePath path, int col, GdkEvent *ev, EMFolderBrowser *fb);
-
-static const EMFolderViewEnable emfb_enable_map[];
-
-enum {
- ESB_SAVE,
-};
-
-static ESearchBarItem emfb_search_items[] = {
- E_FILTERBAR_ADVANCED,
- { NULL, 0, NULL },
- E_FILTERBAR_SAVE,
- E_FILTERBAR_EDIT,
- { NULL, 0, NULL },
- { N_("Create _Virtual Folder From Search..."), ESB_SAVE, NULL },
- { NULL, -1, NULL }
-};
-
-static GalViewCollection *collection = NULL;
-
-
-static EMFolderViewClass *emfb_parent;
-
-/* Needed since the paned wont take the position its given otherwise ... */
-static void
-emfb_pane_realised(GtkWidget *w, EMFolderBrowser *emfb)
-{
- GConfClient *gconf;
-
- gconf = mail_config_get_gconf_client ();
- gtk_paned_set_position((GtkPaned *)emfb->vpane, gconf_client_get_int(gconf, "/apps/evolution/mail/display/paned_size", NULL));
-}
-
-static gboolean
-emfb_pane_button_release_event(GtkWidget *w, GdkEventButton *e, EMFolderBrowser *emfb)
-{
- GConfClient *gconf = mail_config_get_gconf_client ();
-
- if (GTK_WIDGET_REALIZED (w))
- gconf_client_set_int(gconf, "/apps/evolution/mail/display/paned_size",
- gtk_paned_get_position(GTK_PANED(w)), NULL);
-
- return FALSE;
-}
-
-static void
-emfb_init(GObject *o)
-{
- EMFolderBrowser *emfb = (EMFolderBrowser *)o;
- RuleContext *search_context = mail_component_peek_search_context (mail_component_peek ());
- struct _EMFolderBrowserPrivate *p;
-
- p = emfb->priv = g_malloc0(sizeof(struct _EMFolderBrowserPrivate));
-
- emfb->view.preview_active = TRUE;
-
- g_slist_free(emfb->view.ui_files);
- emfb->view.ui_files = g_slist_append(NULL, EVOLUTION_UIDIR "/evolution-mail-global.xml");
- emfb->view.ui_files = g_slist_append(emfb->view.ui_files, EVOLUTION_UIDIR "/evolution-mail-list.xml");
- emfb->view.ui_files = g_slist_append(emfb->view.ui_files, EVOLUTION_UIDIR "/evolution-mail-message.xml");
-
- emfb->view.enable_map = g_slist_prepend(emfb->view.enable_map, (void *)emfb_enable_map);
-
- if (search_context) {
- const char *systemrules = g_object_get_data (G_OBJECT (search_context), "system");
- const char *userrules = g_object_get_data (G_OBJECT (search_context), "user");
-
- emfb->search = e_filter_bar_new(search_context, systemrules, userrules, emfb_search_config_search, emfb);
- e_search_bar_set_menu ((ESearchBar *)emfb->search, emfb_search_items);
- gtk_widget_show((GtkWidget *)emfb->search);
-
- g_signal_connect(emfb->search, "menu_activated", G_CALLBACK(emfb_search_menu_activated), emfb);
- g_signal_connect(emfb->search, "search_activated", G_CALLBACK(emfb_search_search_activated), emfb);
- g_signal_connect(emfb->search, "query_changed", G_CALLBACK(emfb_search_query_changed), emfb);
-
- gtk_box_pack_start((GtkBox *)emfb, (GtkWidget *)emfb->search, FALSE, TRUE, 0);
- }
-
- emfb->vpane = gtk_vpaned_new();
- g_signal_connect(emfb->vpane, "realize", G_CALLBACK(emfb_pane_realised), emfb);
- emfb->priv->vpane_resize_id = g_signal_connect(emfb->vpane, "button_release_event", G_CALLBACK(emfb_pane_button_release_event), emfb);
-
- gtk_widget_show(emfb->vpane);
-
- gtk_box_pack_start_defaults((GtkBox *)emfb, emfb->vpane);
-
- gtk_paned_add1((GtkPaned *)emfb->vpane, (GtkWidget *)emfb->view.list);
- gtk_widget_show((GtkWidget *)emfb->view.list);
-
- /* currently: just use a scrolledwindow for preview widget */
- p->preview = gtk_scrolled_window_new(NULL, NULL);
- gtk_scrolled_window_set_policy((GtkScrolledWindow *)p->preview, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
- gtk_scrolled_window_set_shadow_type((GtkScrolledWindow *)p->preview, GTK_SHADOW_IN);
- gtk_widget_show(p->preview);
-
- gtk_container_add((GtkContainer *)p->preview, (GtkWidget *)emfb->view.preview->formathtml.html);
- gtk_widget_show((GtkWidget *)emfb->view.preview->formathtml.html);
-
- gtk_paned_add2((GtkPaned *)emfb->vpane, p->preview);
- gtk_widget_show(p->preview);
-
- g_signal_connect(emfb->view.list->tree, "key_press", G_CALLBACK(emfb_list_key_press), emfb);
-}
-
-static void
-emfb_finalise(GObject *o)
-{
- EMFolderBrowser *emfb = (EMFolderBrowser *)o;
-
- g_free(emfb->priv);
-
- ((GObjectClass *)emfb_parent)->finalize(o);
-}
-
-static void
-emfb_destroy(GtkObject *o)
-{
- EMFolderBrowser *emfb = (EMFolderBrowser *)o;
-
- if (emfb->priv->list_built_id) {
- g_signal_handler_disconnect(((EMFolderView *)emfb)->list, emfb->priv->list_built_id);
- emfb->priv->list_built_id = 0;
- }
-
- ((GtkObjectClass *)emfb_parent)->destroy(o);
-}
-
-static void
-emfb_class_init(GObjectClass *klass)
-{
- klass->finalize = emfb_finalise;
- ((GtkObjectClass *)klass)->destroy = emfb_destroy;
- ((EMFolderViewClass *)klass)->set_folder = emfb_set_folder;
- ((EMFolderViewClass *)klass)->activate = emfb_activate;
-}
-
-GType
-em_folder_browser_get_type(void)
-{
- static GType type = 0;
-
- if (type == 0) {
- static const GTypeInfo info = {
- sizeof(EMFolderBrowserClass),
- NULL, NULL,
- (GClassInitFunc)emfb_class_init,
- NULL, NULL,
- sizeof(EMFolderBrowser), 0,
- (GInstanceInitFunc)emfb_init
- };
- emfb_parent = g_type_class_ref(em_folder_view_get_type());
- type = g_type_register_static(em_folder_view_get_type(), "EMFolderBrowser", &info, 0);
- }
-
- return type;
-}
-
-GtkWidget *em_folder_browser_new(void)
-{
- EMFolderBrowser *emfb = g_object_new(em_folder_browser_get_type(), 0);
-
- return (GtkWidget *)emfb;
-}
-
-void em_folder_browser_show_preview(EMFolderBrowser *emfb, gboolean state)
-{
- if ((emfb->view.preview_active ^ state) == 0
- || emfb->view.list == NULL)
- return;
-
- emfb->view.preview_active = state;
-
- if (state) {
- GConfClient *gconf = mail_config_get_gconf_client ();
- int paned_size /*, y*/;
-
- paned_size = gconf_client_get_int(gconf, "/apps/evolution/mail/display/paned_size", NULL);
-
- /*y = save_cursor_pos (emfb);*/
- gtk_paned_set_position (GTK_PANED (emfb->vpane), paned_size);
- gtk_widget_show (GTK_WIDGET (emfb->priv->preview));
-
- if (emfb->view.list->cursor_uid)
- message_list_select_uid(emfb->view.list, emfb->view.list->cursor_uid);
-
- /* need to load/show the current message? */
- /*do_message_selected (emfb);*/
- /*set_cursor_pos (emfb, y);*/
- } else {
- em_format_format((EMFormat *)emfb->view.preview, NULL);
- gtk_widget_hide(emfb->priv->preview);
- /*
- mail_display_set_message (emfb->mail_display, NULL, NULL, NULL);
- emfb_ui_message_loaded (emfb);*/
- }
-
- /* FIXME: need to update menu's to reflect ui changes */
-}
-
-/* ********************************************************************** */
-
-/* FIXME: Need to separate system rules from user ones */
-/* FIXME: Ugh! */
-
-static void
-emfb_search_menu_activated(ESearchBar *esb, int id, EMFolderBrowser *emfb)
-{
- 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);
- char *name, *text;
-
- text = e_search_bar_get_text(esb);
- name = g_strdup_printf("%s %s", rule->name, (text&&text[0])?text:"''");
- g_free (text);
- filter_rule_set_name(rule, name);
- g_free (name);
-
- filter_rule_set_source(rule, FILTER_SOURCE_INCOMING);
- vfolder_rule_add_source((VfolderRule *)rule, emfb->view.folder_uri);
- vfolder_gui_add_rule((VfolderRule *)rule);
- }
- break;
- }
-}
-
-static void
-emfb_search_config_search(EFilterBar *efb, FilterRule *rule, int id, const char *query, void *data)
-{
- EMFolderBrowser *emfb = data;
- GList *partl;
- struct _camel_search_words *words;
- int i;
- GSList *strings = 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);
-
- words = camel_search_words_split(query);
- for (i=0;i<words->len;i++)
- strings = g_slist_prepend(strings, g_strdup(words->words[i]->word));
- camel_search_words_free (words);
- } else if(!strcmp(part->name, "sender")) {
- FilterInput *input = (FilterInput *)filter_part_find_element(part, "sender");
- if (input)
- filter_input_set_value(input, query);
- } else if(!strcmp(part->name, "to")) {
- FilterInput *input = (FilterInput *)filter_part_find_element(part, "recipient");
- if (input)
- filter_input_set_value(input, query);
- }
-
- partl = partl->next;
- }
-
- em_format_html_display_set_search(emfb->view.preview,
- EM_FORMAT_HTML_DISPLAY_SEARCH_SECONDARY|EM_FORMAT_HTML_DISPLAY_SEARCH_ICASE,
- strings);
- while (strings) {
- GSList *n = strings->next;
-
- g_free(strings->data);
- g_slist_free_1(strings);
- strings = n;
- }
-}
-
-static void
-emfb_search_search_activated(ESearchBar *esb, EMFolderBrowser *emfb)
-{
- char *search_word;
-
- if (emfb->view.list == NULL)
- return;
-
- g_object_get (esb, "query", &search_word, NULL);
- message_list_set_search(emfb->view.list, search_word);
- g_free(search_word);
-}
-
-static void
-emfb_search_query_changed(ESearchBar *esb, EMFolderBrowser *emfb)
-{
- int id;
-
- id = e_search_bar_get_item_id(esb);
- if (id == E_FILTERBAR_ADVANCED_ID)
- emfb_search_search_activated(esb, emfb);
-}
-
-/* ********************************************************************** */
-
-static int
-emfb_list_key_press(ETree *tree, int row, ETreePath path, int col, GdkEvent *ev, EMFolderBrowser *emfb)
-{
- if ((ev->key.state & GDK_CONTROL_MASK) != 0)
- return FALSE;
-
- switch (ev->key.keyval) {
- case GDK_space:
- em_utils_adjustment_page(gtk_scrolled_window_get_vadjustment((GtkScrolledWindow *)emfb->priv->preview), TRUE);
- break;
- case GDK_BackSpace:
- em_utils_adjustment_page(gtk_scrolled_window_get_vadjustment((GtkScrolledWindow *)emfb->priv->preview), FALSE);
- break;
- default:
- return FALSE;
- }
-
- return TRUE;
-}
-
-/* ********************************************************************** */
-
-static void
-emfb_edit_cut(BonoboUIComponent *uid, void *data, const char *path)
-{
- EMFolderBrowser *emfb = data;
-
- /* TODO: pity we can't sucblass this method, ugh, virtualise it? */
-
- if (GTK_WIDGET_HAS_FOCUS(((ESearchBar *)emfb->search)->entry))
- gtk_editable_cut_clipboard((GtkEditable *)((ESearchBar *)emfb->search)->entry);
- else if (message_list_has_primary_selection(emfb->view.list))
- message_list_copy(emfb->view.list, TRUE);
- else if (emfb->view.preview_active)
- em_format_html_display_cut(emfb->view.preview);
-}
-
-static void
-emfb_edit_copy(BonoboUIComponent *uid, void *data, const char *path)
-{
- EMFolderBrowser *emfb = data;
-
- if (GTK_WIDGET_HAS_FOCUS(((ESearchBar *)emfb->search)->entry))
- gtk_editable_copy_clipboard((GtkEditable *)((ESearchBar *)emfb->search)->entry);
- else if (message_list_has_primary_selection(emfb->view.list))
- message_list_copy(emfb->view.list, FALSE);
- else if (emfb->view.preview_active)
- em_format_html_display_copy(emfb->view.preview);
-}
-
-static void
-emfb_edit_paste(BonoboUIComponent *uid, void *data, const char *path)
-{
- EMFolderBrowser *emfb = data;
-
- if (GTK_WIDGET_HAS_FOCUS(((ESearchBar *)emfb->search)->entry))
- gtk_editable_paste_clipboard((GtkEditable *)((ESearchBar *)emfb->search)->entry);
- else
- message_list_paste(emfb->view.list);
-}
-
-static void
-emfb_edit_invert_selection(BonoboUIComponent *uid, void *data, const char *path)
-{
- EMFolderView *emfv = data;
-
- message_list_invert_selection(emfv->list);
-}
-
-static void
-emfb_edit_select_all(BonoboUIComponent *uid, void *data, const char *path)
-{
- EMFolderView *emfv = data;
-
- message_list_select_all(emfv->list);
-}
-
-static void
-emfb_edit_select_thread(BonoboUIComponent *uid, void *data, const char *path)
-{
- EMFolderView *emfv = data;
-
- message_list_select_thread(emfv->list);
-}
-
-static void
-emfb_folder_properties(BonoboUIComponent *uid, void *data, const char *path)
-{
- /* If only we could remove this ... */
- /* Should it be part of the factory? */
- printf("FIXME: folderproperties\n");
-}
-
-static void
-emfb_folder_expunge(BonoboUIComponent *uid, void *data, const char *path)
-{
- EMFolderBrowser *emfb = data;
-
- em_utils_expunge_folder ((GtkWidget *) emfb, emfb->view.folder);
-}
-
-static void
-emfb_mark_all_read(BonoboUIComponent *uid, void *data, const char *path)
-{
- /* FIXME: make a 'mark messages' function? */
- EMFolderView *emfv = data;
- GPtrArray *uids;
- int i;
-
- uids = camel_folder_get_uids(emfv->folder);
- camel_folder_freeze(emfv->folder);
- for (i=0;i<uids->len;i++)
- camel_folder_set_message_flags(emfv->folder, uids->pdata[i], CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN);
- camel_folder_thaw(emfv->folder);
- camel_folder_free_uids(emfv->folder, uids);
-}
-
-static void
-emfb_view_hide_read(BonoboUIComponent *uid, void *data, const char *path)
-{
- EMFolderView *emfv = data;
-
- message_list_hide_add(emfv->list, "(match-all (system-flag \"seen\"))", ML_HIDE_SAME, ML_HIDE_SAME);
-}
-
-static void
-emfb_view_hide_selected(BonoboUIComponent *uid, void *data, const char *path)
-{
- EMFolderView *emfv = data;
- GPtrArray *uids;
-
- /* TODO: perhaps this should sit directly on message_list? */
- /* is it worth it, it's so trivial */
- uids = message_list_get_selected(emfv->list);
- message_list_hide_uids(emfv->list, uids);
- message_list_free_uids(emfv->list, uids);
-}
-
-static void
-emfb_view_show_all(BonoboUIComponent *uid, void *data, const char *path)
-{
- EMFolderView *emfv = data;
-
- message_list_hide_clear(emfv->list);
-}
-
-/* ********************************************************************** */
-
-static void
-emfb_empty_trash(BonoboUIComponent *uid, void *data, const char *path)
-{
- EMFolderView *emfv = data;
-
- em_utils_empty_trash ((GtkWidget *) emfv);
-}
-
-static void
-emfb_forget_passwords(BonoboUIComponent *uid, void *data, const char *path)
-{
- e_passwords_forget_passwords();
-}
-
-static void
-emfb_mail_compose(BonoboUIComponent *uid, void *data, const char *path)
-{
- em_utils_compose_new_message ();
-}
-
-static void
-emfb_mail_stop(BonoboUIComponent *uid, void *data, const char *path)
-{
- camel_operation_cancel(NULL);
-}
-
-static void
-emfb_mail_post(BonoboUIComponent *uid, void *data, const char *path)
-{
- EMFolderView *emfv = data;
- char *url;
-
- url = mail_tools_folder_to_url (emfv->folder);
- em_utils_post_to_url (url);
- g_free (url);
-}
-
-static void
-emfb_tools_filters(BonoboUIComponent *uid, void *data, const char *path)
-{
- EMFolderBrowser *emfb = data;
-
- em_utils_edit_filters ((GtkWidget *) emfb);
-}
-
-static void
-emfb_subscribe_editor_destroy(GtkWidget *w, EMFolderBrowser *emfb)
-{
- emfb->priv->subscribe_editor = NULL;
-}
-
-static void
-emfb_tools_subscriptions(BonoboUIComponent *uid, void *data, const char *path)
-{
- EMFolderBrowser *emfb = data;
-
- if (emfb->priv->subscribe_editor) {
- gdk_window_show(emfb->priv->subscribe_editor->window);
- } else {
- emfb->priv->subscribe_editor = (GtkWidget *)em_subscribe_editor_new();
- e_dialog_set_transient_for((GtkWindow *)emfb->priv->subscribe_editor, (GtkWidget *)emfb);
- g_signal_connect(emfb->priv->subscribe_editor, "destroy", G_CALLBACK(emfb_subscribe_editor_destroy), emfb);
- gtk_widget_show(emfb->priv->subscribe_editor);
- }
-}
-
-static void
-emfb_tools_vfolders(BonoboUIComponent *uid, void *data, const char *path)
-{
- /* FIXME: rename/refactor this */
- vfolder_edit();
-}
-
-static BonoboUIVerb emfb_verbs[] = {
- BONOBO_UI_UNSAFE_VERB ("EditCut", emfb_edit_cut),
- BONOBO_UI_UNSAFE_VERB ("EditCopy", emfb_edit_copy),
- BONOBO_UI_UNSAFE_VERB ("EditPaste", emfb_edit_paste),
-
- BONOBO_UI_UNSAFE_VERB ("EditInvertSelection", emfb_edit_invert_selection),
- BONOBO_UI_UNSAFE_VERB ("EditSelectAll", emfb_edit_select_all),
- BONOBO_UI_UNSAFE_VERB ("EditSelectThread", emfb_edit_select_thread),
- BONOBO_UI_UNSAFE_VERB ("ChangeFolderProperties", emfb_folder_properties),
- BONOBO_UI_UNSAFE_VERB ("FolderExpunge", emfb_folder_expunge),
- /* HideDeleted is a toggle */
- BONOBO_UI_UNSAFE_VERB ("MessageMarkAllAsRead", emfb_mark_all_read),
- BONOBO_UI_UNSAFE_VERB ("ViewHideRead", emfb_view_hide_read),
- BONOBO_UI_UNSAFE_VERB ("ViewHideSelected", emfb_view_hide_selected),
- BONOBO_UI_UNSAFE_VERB ("ViewShowAll", emfb_view_show_all),
- /* ViewThreaded is a toggle */
-
- BONOBO_UI_UNSAFE_VERB ("EmptyTrash", emfb_empty_trash),
- BONOBO_UI_UNSAFE_VERB ("ForgetPasswords", emfb_forget_passwords),
- BONOBO_UI_UNSAFE_VERB ("MailCompose", emfb_mail_compose),
- BONOBO_UI_UNSAFE_VERB ("MailPost", emfb_mail_post),
- BONOBO_UI_UNSAFE_VERB ("MailStop", emfb_mail_stop),
- BONOBO_UI_UNSAFE_VERB ("ToolsFilters", emfb_tools_filters),
- BONOBO_UI_UNSAFE_VERB ("ToolsSubscriptions", emfb_tools_subscriptions),
- BONOBO_UI_UNSAFE_VERB ("ToolsVFolders", emfb_tools_vfolders),
- /* ViewPreview is a toggle */
-
- BONOBO_UI_VERB_END
-};
-
-static EPixmap emfb_pixmaps[] = {
- 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/MailCompose", "new-message.xpm"),
-
- E_PIXMAP_END
-};
-
-static const EMFolderViewEnable emfb_enable_map[] = {
- { "EditSelectThread", EM_FOLDER_VIEW_SELECT_THREADED },
- { "ViewHideSelected", EM_POPUP_SELECT_MANY },
- { "ViewShowAll", EM_FOLDER_VIEW_SELECT_HIDDEN },
- { NULL },
-};
-
-static void
-emfb_hide_deleted(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_EventType type, const char *state, void *data)
-{
- GConfClient *gconf;
- EMFolderView *emfv = data;
-
- if (type != Bonobo_UIComponent_STATE_CHANGED)
- return;
-
- gconf = mail_config_get_gconf_client ();
- gconf_client_set_bool(gconf, "/apps/evolution/mail/display/show_deleted", state[0] == '0', NULL);
- if (!(emfv->folder && (emfv->folder->folder_flags & CAMEL_FOLDER_IS_TRASH)))
- message_list_set_hidedeleted(emfv->list, state[0] != '0');
-}
-
-static void
-emfb_view_threaded(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_EventType type, const char *state, void *data)
-{
- GConfClient *gconf;
- EMFolderView *emfv = data;
-
- if (type != Bonobo_UIComponent_STATE_CHANGED)
- return;
-
- gconf = mail_config_get_gconf_client ();
- gconf_client_set_bool(gconf, "/apps/evolution/mail/display/thread_list", state[0] != '0', NULL);
-
- if (camel_object_meta_set(emfv->folder, "evolution:thread_list", state))
- camel_object_state_write(emfv->folder);
-
- /* FIXME: do set_threaded via meta-data listener on folder? */
- message_list_set_threaded(emfv->list, state[0] != '0');
-
- /* FIXME: update selection state? */
-}
-
-static void
-emfb_view_preview(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_EventType type, const char *state, void *data)
-{
- GConfClient *gconf;
- EMFolderView *emfv = data;
-
- if (type != Bonobo_UIComponent_STATE_CHANGED)
- return;
-
- gconf = mail_config_get_gconf_client ();
- gconf_client_set_bool(gconf, "/apps/evolution/mail/display/show_preview", state[0] != '0', NULL);
-
- if (camel_object_meta_set(emfv->folder, "evolution:show_preview", state))
- camel_object_state_write(emfv->folder);
-
- /* FIXME: do this via folder listener */
- em_folder_browser_show_preview((EMFolderBrowser *)emfv, state[0] != '0');
-}
-
-/* TODO: This should probably be handled by message-list, by storing/queueing
- up the select operation if its busy rebuilding the message-list */
-static void
-emfb_list_built(MessageList *ml, EMFolderBrowser *emfb)
-{
- g_signal_handler_disconnect(ml, emfb->priv->list_built_id);
- emfb->priv->list_built_id = 0;
-
- /* FIXME: if the 1st message in the list is unread, this will actually select the second unread msg */
- /* FIXME: this usually happens "too soon" and so the toolbar/menu-items remain desensitised even tho with the message selected they should be sensitive */
- if (((EMFolderView *)emfb)->list->cursor_uid == NULL)
- message_list_select(((EMFolderView *)emfb)->list,
- MESSAGE_LIST_SELECT_NEXT, 0, CAMEL_MESSAGE_SEEN, TRUE);
-}
-
-
-static void
-emfb_list_display_view (GalViewInstance *instance, GalView *view, EMFolderBrowser *emfb)
-{
- if (GAL_IS_VIEW_ETABLE (view))
- gal_view_etable_attach_tree (GAL_VIEW_ETABLE (view), emfb->view.list->tree);
-}
-
-static void
-collection_init (void)
-{
- ETableSpecification *spec;
- GalViewFactory *factory;
- const char *evolution_dir;
- char *dir;
-
- if (collection != NULL)
- return;
-
- collection = gal_view_collection_new ();
-
- gal_view_collection_set_title (collection, _("Mail"));
-
- evolution_dir = mail_component_peek_base_directory (mail_component_peek ());
- dir = g_build_filename (evolution_dir, "mail", "views", NULL);
- gal_view_collection_set_storage_directories (collection, EVOLUTION_GALVIEWSDIR "/mail/", dir);
- g_free (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);
- g_object_unref (spec);
- gal_view_collection_add_factory (collection, factory);
- g_object_unref (factory);
-
- gal_view_collection_load (collection);
-}
-
-static void
-emfb_create_view_instance (EMFolderBrowser *emfb, CamelFolder *folder, const char *uri)
-{
- struct _EMFolderBrowserPrivate *priv = emfb->priv;
- gboolean outgoing;
- char *id;
-
- collection_init ();
-
- if (priv->view_instance) {
- g_object_unref (priv->view_instance);
- priv->view_instance = NULL;
- }
-
- if (folder == NULL) {
- folder = emfb->view.folder;
- uri = emfb->view.folder_uri;
- }
-
- outgoing = em_utils_folder_is_drafts (folder, uri)
- || em_utils_folder_is_sent (folder, uri)
- || em_utils_folder_is_outbox (folder, uri);
-
- /* TODO: should this go through mail-config api? */
- id = mail_config_folder_to_safe_url (folder);
- priv->view_instance = gal_view_instance_new (collection, id);
- g_free (id);
-
- if (outgoing)
- gal_view_instance_set_default_view (priv->view_instance, "As_Sent_Folder");
-
- gal_view_instance_load (priv->view_instance);
-
- if (!gal_view_instance_exists (priv->view_instance)) {
- struct stat st;
- char *path;
-
- path = mail_config_folder_to_cachename (folder, "et-header-");
- if (path && stat (path, &st) == 0 && st.st_size > 0 && S_ISREG (st.st_mode)) {
- ETableSpecification *spec;
- ETableState *state;
- GalView *view;
-
- spec = e_table_specification_new ();
- e_table_specification_load_from_file (spec, EVOLUTION_ETSPECDIR "/message-list.etspec");
- view = gal_view_etable_new (spec, "");
- g_object_unref (spec);
-
- state = e_table_state_new ();
- e_table_state_load_from_file (state, path);
- gal_view_etable_set_state (GAL_VIEW_ETABLE (view), state);
- g_object_unref (state);
-
- gal_view_instance_set_custom_view (priv->view_instance, view);
- g_object_unref (view);
- }
-
- g_free (path);
- }
-
- if (priv->view_menus)
- gal_view_menus_set_instance (priv->view_menus, priv->view_instance);
-
- g_signal_connect (priv->view_instance, "display_view", G_CALLBACK (emfb_list_display_view), emfb);
- emfb_list_display_view (priv->view_instance, gal_view_instance_get_current_view (priv->view_instance), emfb);
-}
-
-static void
-emfb_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri)
-{
- /* This is required since we get activated the first time
- before the folder is open and need to override the
- defaults */
- if (folder) {
- char *sstate;
-
- if ((sstate = camel_object_meta_get(folder, "evolution:show_preview")))
- em_folder_browser_show_preview((EMFolderBrowser *)emfv, sstate[0] != '0');
-
- if ((sstate = camel_object_meta_get(folder, "evolution:thread_list")))
- message_list_set_threaded(emfv->list, sstate[0] != '0');
-
-#if 0
- if (emfv->list->cursor_uid == NULL && ((EMFolderBrowser *)emfv)->priv->list_built_id == 0)
- ((EMFolderBrowser *)emfv)->priv->list_built_id =
- g_signal_connect(emfv->list, "message_list_built", G_CALLBACK(emfb_list_built), emfv);
-#endif
-
- emfb_create_view_instance ((EMFolderBrowser *) emfv, folder, uri);
- }
-
- emfb_parent->set_folder(emfv, folder, uri);
-}
-
-/* TODO: All this mess should sit directly on MessageList, but it would
- need to become BonoboUIComponent aware ... */
-
-static void
-emfb_create_view_menus(EMFolderBrowser *emfb, BonoboUIComponent *uic)
-{
- struct _EMFolderBrowserPrivate *p = emfb->priv;
-
- g_assert(p->view_instance == NULL);
- g_assert(p->view_menus == NULL);
-
- collection_init ();
-
- emfb_create_view_instance (emfb, emfb->view.folder, emfb->view.folder_uri);
- p->view_menus = gal_view_menus_new (p->view_instance);
- gal_view_menus_apply(p->view_menus, uic, NULL);
-
- /* Due to CORBA reentrancy, the view could be gone now. */
- if (p->view_instance == NULL)
- return;
-
- g_signal_connect(p->view_instance, "display_view", G_CALLBACK(emfb_list_display_view), emfb);
- emfb_list_display_view(p->view_instance, gal_view_instance_get_current_view(p->view_instance), emfb);
-}
-
-static void
-emfb_activate(EMFolderView *emfv, BonoboUIComponent *uic, int act)
-{
- struct _EMFolderBrowserPrivate *p = ((EMFolderBrowser *)emfv)->priv;
-
- if (act) {
- GConfClient *gconf;
- gboolean state;
- char *sstate;
-
- gconf = mail_config_get_gconf_client ();
-
- /* parent loads all ui files via ui_files */
- emfb_parent->activate(emfv, uic, act);
-
- bonobo_ui_component_add_verb_list_with_data(uic, emfb_verbs, emfv);
- e_pixmaps_update(uic, emfb_pixmaps);
-
-#if 0
- /* FIXME: finish */
- /* (Pre)view pane size (do this first because it affects the
- preview settings - see folder_browser_set_message_preview()
- internals for details) */
- g_signal_handler_block(emfb->vpane, emfb->priv->vpane_resize_id);
- gtk_paned_set_position((GtkPaned *)emfb->vpane, gconf_client_get_int (gconf, "/apps/evolution/mail/display/paned_size", NULL));
- g_signal_handler_unblock(emfb->vpane, emfb->priv->vpane_resize_id);
-#endif
-
- /* (Pre)view toggle */
- if (emfv->folder
- && (sstate = camel_object_meta_get(emfv->folder, "evolution:show_preview"))) {
- state = sstate[0] == '1';
- g_free(sstate);
- } else {
- state = gconf_client_get_bool(gconf, "/apps/evolution/mail/display/show_preview", NULL);
- }
-
- bonobo_ui_component_set_prop(uic, "/commands/ViewPreview", "state", state?"1":"0", NULL);
- em_folder_browser_show_preview((EMFolderBrowser *)emfv, state);
- bonobo_ui_component_add_listener(uic, "ViewPreview", emfb_view_preview, emfv);
-
- /* Stop button */
- state = mail_msg_active((unsigned int)-1);
- bonobo_ui_component_set_prop(uic, "/commands/MailStop", "sensitive", state?"1":"0", NULL);
-
- /* HideDeleted */
- state = !gconf_client_get_bool(gconf, "/apps/evolution/mail/display/show_deleted", NULL);
- bonobo_ui_component_set_prop(uic, "/commands/HideDeleted", "state", state ? "1" : "0", NULL);
- bonobo_ui_component_add_listener(uic, "HideDeleted", emfb_hide_deleted, emfv);
- if (!(emfv->folder && (emfv->folder->folder_flags & CAMEL_FOLDER_IS_TRASH)))
- message_list_set_hidedeleted (emfv->list, state);
- else
- bonobo_ui_component_set_prop(uic, "/commands/HideDeleted", "sensitive", state?"1":"0", NULL);
-
- /* FIXME: If we have no folder, we can't do a few of the lookups we need,
- perhaps we should postpone till we can */
-
- /* ViewThreaded */
- if (emfv->folder
- && (sstate = camel_object_meta_get(emfv->folder, "evolution:thread_list"))) {
- state = sstate[0] == '1';
- g_free(sstate);
- } else {
- state = gconf_client_get_bool(gconf, "/apps/evolution/mail/display/thread_list", NULL);
- }
-
- bonobo_ui_component_set_prop(uic, "/commands/ViewThreaded", "state", state?"1":"0", NULL);
- bonobo_ui_component_add_listener(uic, "ViewThreaded", emfb_view_threaded, emfv);
- message_list_set_threaded(emfv->list, state);
-
- /* FIXME: Selection state */
-
- /* FIXME: property menu customisation */
- /*folder_browser_setup_property_menu (fb, fb->uicomp);*/
-
- if (((EMFolderBrowser *)emfv)->search)
- e_search_bar_set_ui_component((ESearchBar *)((EMFolderBrowser *)emfv)->search, uic);
-
- if (emfv->folder)
- emfb_create_view_menus((EMFolderBrowser *)emfv, uic);
- } else {
- const BonoboUIVerb *v;
-
- for (v = &emfb_verbs[0]; v->cname; v++)
- bonobo_ui_component_remove_verb(uic, v->cname);
-
- if (p->view_instance) {
- g_object_unref(p->view_instance);
- p->view_instance = NULL;
- g_object_unref(p->view_menus);
- p->view_menus = NULL;
- }
-
- if (((EMFolderBrowser *)emfv)->search)
- e_search_bar_set_ui_component((ESearchBar *)((EMFolderBrowser *)emfv)->search, NULL);
-
- emfb_parent->activate(emfv, uic, act);
- }
-}
diff --git a/mail/em-folder-browser.h b/mail/em-folder-browser.h
deleted file mode 100644
index 248deaf9b4..0000000000
--- a/mail/em-folder-browser.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Michael Zucchi <notzed@ximian.com>
- *
- * Copyright 2003 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 _EM_FOLDER_BROWSER_H
-#define _EM_FOLDER_BROWSER_H
-
-#include "em-folder-view.h"
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-typedef struct _EMFolderBrowser EMFolderBrowser;
-typedef struct _EMFolderBrowserClass EMFolderBrowserClass;
-
-struct _EMFolderBrowser {
- EMFolderView view;
-
- struct _EMFolderBrowserPrivate *priv;
-
- GtkWidget *vpane;
- struct _EFilterBar *search;
-};
-
-struct _EMFolderBrowserClass {
- EMFolderViewClass parent_class;
-};
-
-GType em_folder_browser_get_type(void);
-
-GtkWidget *em_folder_browser_new(void);
-
-void em_folder_browser_show_preview(EMFolderBrowser *emfv, gboolean state);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* ! _EM_FOLDER_BROWSER_H */
diff --git a/mail/em-folder-selection-button.c b/mail/em-folder-selection-button.c
deleted file mode 100644
index 5187e8d324..0000000000
--- a/mail/em-folder-selection-button.c
+++ /dev/null
@@ -1,255 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2003 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 <gtk/gtkimage.h>
-#include <gtk/gtklabel.h>
-#include <gtk/gtkhbox.h>
-
-#include <gal/util/e-util.h>
-
-#include "mail-component.h"
-#include "em-folder-tree.h"
-#include "em-folder-selector.h"
-
-#include "em-folder-selection-button.h"
-
-static void em_folder_selection_button_class_init (EMFolderSelectionButtonClass *klass);
-static void em_folder_selection_button_init (EMFolderSelectionButton *emfsb);
-static void em_folder_selection_button_destroy (GtkObject *obj);
-static void em_folder_selection_button_finalize (GObject *obj);
-static void em_folder_selection_button_clicked (GtkButton *button);
-
-static GtkButtonClass *parent_class = NULL;
-
-struct _EMFolderSelectionButtonPrivate {
- GtkWidget *icon;
- GtkWidget *label;
-
- char *uri;
-
- char *title;
- char *caption;
-};
-
-enum {
- SELECTED,
- LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-GType
-em_folder_selection_button_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (EMFolderSelectionButtonClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) em_folder_selection_button_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EMFolderSelectionButton),
- 0, /* n_preallocs */
- (GInstanceInitFunc) em_folder_selection_button_init,
- };
-
- type = g_type_register_static (GTK_TYPE_BUTTON, "EMFolderSelectionButton", &info, 0);
- }
-
- return type;
-}
-
-static void
-em_folder_selection_button_class_init (EMFolderSelectionButtonClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (klass);
- GtkButtonClass *button_class = GTK_BUTTON_CLASS (klass);
-
- parent_class = g_type_class_ref (GTK_TYPE_BUTTON);
-
- object_class->finalize = em_folder_selection_button_finalize;
- gtk_object_class->destroy = em_folder_selection_button_destroy;
- button_class->clicked = em_folder_selection_button_clicked;
-
- signals[SELECTED] = g_signal_new ("selected",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (EMFolderSelectionButtonClass, selected),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-}
-
-static void
-set_contents_unselected (EMFolderSelectionButton *button)
-{
- gtk_image_set_from_pixbuf (GTK_IMAGE (button->priv->icon), NULL);
- gtk_label_set_text (GTK_LABEL (button->priv->label), _("<click here to select a folder>"));
-}
-
-static void
-set_contents (EMFolderSelectionButton *button)
-{
- struct _EMFolderSelectionButtonPrivate *priv = button->priv;
- const char *folder_name;
- CamelURL *url;
-
- if (priv->uri == NULL
- || (url = camel_url_new (priv->uri, NULL)) == NULL) {
- set_contents_unselected (button);
- return;
- }
-
- folder_name = url->fragment ? url->fragment : url->path + 1;
-
- if (folder_name == NULL) {
- camel_url_free (url);
- set_contents_unselected (button);
- return;
- }
-
- gtk_label_set_text (GTK_LABEL (priv->label), folder_name);
- camel_url_free (url);
-}
-
-static void
-em_folder_selection_button_init (EMFolderSelectionButton *emfsb)
-{
- struct _EMFolderSelectionButtonPrivate *priv;
- GtkWidget *box;
-
- priv = g_new0 (struct _EMFolderSelectionButtonPrivate, 1);
- emfsb->priv = priv;
-
- box = gtk_hbox_new (FALSE, 4);
-
- priv->icon = gtk_image_new ();
- gtk_widget_show (priv->icon);
- gtk_box_pack_start (GTK_BOX (box), priv->icon, FALSE, TRUE, 0);
-
- priv->label = gtk_label_new ("");
- gtk_widget_show (priv->label);
- gtk_label_set_justify (GTK_LABEL (priv->label), GTK_JUSTIFY_LEFT);
- gtk_misc_set_alignment (GTK_MISC (priv->label), 0.0, 0.0);
- gtk_box_pack_start (GTK_BOX (box), priv->label, TRUE, TRUE, 0);
-
- gtk_widget_show (box);
- gtk_container_add (GTK_CONTAINER (emfsb), box);
-
- set_contents (emfsb);
-}
-
-static void
-em_folder_selection_button_destroy (GtkObject *obj)
-{
- GTK_OBJECT_CLASS (parent_class)->destroy (obj);
-}
-
-static void
-em_folder_selection_button_finalize (GObject *obj)
-{
- struct _EMFolderSelectionButtonPrivate *priv = ((EMFolderSelectionButton *) obj)->priv;
-
- g_free (priv->title);
- g_free (priv->caption);
- g_free (priv->uri);
- g_free (priv);
-
- G_OBJECT_CLASS (parent_class)->finalize (obj);
-}
-
-static void
-emfsb_selector_response (EMFolderSelector *emfs, int response, EMFolderSelectionButton *button)
-{
- if (response == GTK_RESPONSE_OK) {
- const char *uri = em_folder_selector_get_selected_uri (emfs);
-
- em_folder_selection_button_set_selection (button, uri);
- g_signal_emit (button, signals[SELECTED], 0);
- }
-
- gtk_widget_destroy ((GtkWidget *) emfs);
-}
-
-static void
-em_folder_selection_button_clicked (GtkButton *button)
-{
- struct _EMFolderSelectionButtonPrivate *priv = EM_FOLDER_SELECTION_BUTTON (button)->priv;
- EMFolderTreeModel *model;
- EMFolderTree *emft;
- GtkWidget *dialog;
-
- if (GTK_BUTTON_CLASS (parent_class)->clicked != NULL)
- (* GTK_BUTTON_CLASS (parent_class)->clicked) (button);
-
- model = mail_component_get_tree_model (mail_component_peek ());
- emft = (EMFolderTree *) em_folder_tree_new_with_model (model);
-
- dialog = em_folder_selector_new (emft, EM_FOLDER_SELECTOR_CAN_CREATE, priv->title, priv->caption);
- em_folder_selector_set_selected ((EMFolderSelector *) dialog, priv->uri);
- g_signal_connect (dialog, "response", G_CALLBACK (emfsb_selector_response), button);
- gtk_widget_show (dialog);
-}
-
-GtkWidget *
-em_folder_selection_button_new (const char *title, const char *caption)
-{
- EMFolderSelectionButton *button = g_object_new (EM_TYPE_FOLDER_SELECTION_BUTTON, NULL);
-
- button->priv->title = g_strdup (title);
- button->priv->caption = g_strdup (caption);
-
- return GTK_WIDGET (button);
-}
-
-void
-em_folder_selection_button_set_selection (EMFolderSelectionButton *button, const char *uri)
-{
- struct _EMFolderSelectionButtonPrivate *priv = button->priv;
-
- g_return_if_fail (EM_IS_FOLDER_SELECTION_BUTTON (button));
-
- if (priv->uri != uri) {
- g_free (priv->uri);
- priv->uri = g_strdup (uri);
- }
-
- set_contents (button);
-}
-
-const char *
-em_folder_selection_button_get_selection (EMFolderSelectionButton *button)
-{
- g_return_val_if_fail (EM_IS_FOLDER_SELECTION_BUTTON (button), NULL);
-
- return button->priv->uri;
-}
diff --git a/mail/em-folder-selection-button.h b/mail/em-folder-selection-button.h
deleted file mode 100644
index b8f64a4383..0000000000
--- a/mail/em-folder-selection-button.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2003 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 __EM_FOLDER_SELECTION_BUTTON_H__
-#define __EM_FOLDER_SELECTION_BUTTON_H__
-
-#include <gtk/gtkbutton.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#define EM_TYPE_FOLDER_SELECTION_BUTTON (em_folder_selection_button_get_type ())
-#define EM_FOLDER_SELECTION_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EM_TYPE_FOLDER_SELECTION_BUTTON, EMFolderSelectionButton))
-#define EM_FOLDER_SELECTION_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EM_TYPE_FOLDER_SELECTION_BUTTON, EMFolderSelectionButtonClass))
-#define EM_IS_FOLDER_SELECTION_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EM_TYPE_FOLDER_SELECTION_BUTTON))
-#define EM_IS_FOLDER_SELECTION_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), EM_TYPE_FOLDER_SELECTION_BUTTON))
-
-typedef struct _EMFolderSelectionButton EMFolderSelectionButton;
-typedef struct _EMFolderSelectionButtonClass EMFolderSelectionButtonClass;
-
-struct _EMFolderSelectionButton {
- GtkButton parent;
-
- struct _EMFolderSelectionButtonPrivate *priv;
-};
-
-struct _EMFolderSelectionButtonClass {
- GtkButtonClass parent_class;
-
- /* Signals. */
-
- void (* selected) (EMFolderSelectionButton *button);
-};
-
-
-GType em_folder_selection_button_get_type (void);
-
-GtkWidget *em_folder_selection_button_new (const char *title, const char *caption);
-
-void em_folder_selection_button_set_selection (EMFolderSelectionButton *button, const char *uri);
-const char *em_folder_selection_button_get_selection (EMFolderSelectionButton *button);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __EM_FOLDER_SELECTION_BUTTON_H__ */
diff --git a/mail/em-folder-selection.c b/mail/em-folder-selection.c
deleted file mode 100644
index 4a73623529..0000000000
--- a/mail/em-folder-selection.c
+++ /dev/null
@@ -1,218 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2003 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 <gtk/gtkdialog.h>
-#include <gtk/gtkstock.h>
-
-#include "em-folder-tree.h"
-#include "em-folder-selection.h"
-
-#include "mail-component.h"
-#include "mail-tools.h"
-
-
-static void
-folder_selected_cb (EMFolderTree *emft, const char *path, const char *uri, GtkDialog *dialog)
-{
- if (!path || !strcmp (path, "/"))
- gtk_dialog_set_response_sensitive (dialog, GTK_RESPONSE_OK, FALSE);
- else
- gtk_dialog_set_response_sensitive (dialog, GTK_RESPONSE_OK, TRUE);
-}
-
-static GtkWidget *
-create_dialog (GtkWindow *parent, EMFolderTree *emft, const char *title, const char *default_uri, gboolean allow_create)
-{
- GtkWidget *dialog;
-
- dialog = gtk_dialog_new ();
-
- if (parent)
- gtk_window_set_transient_for ((GtkWindow *) dialog, parent);
-
- gtk_window_set_default_size (GTK_WINDOW (dialog), 350, 300);
- gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
- gtk_window_set_title (GTK_WINDOW (dialog), title);
- gtk_container_set_border_width (GTK_CONTAINER (dialog), 6);
- gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), 6);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 6);
-
- if (allow_create)
- gtk_dialog_add_buttons (GTK_DIALOG (dialog), GTK_STOCK_NEW, GTK_RESPONSE_APPLY, NULL);
-
- gtk_dialog_add_buttons (GTK_DIALOG (dialog),
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_OK, GTK_RESPONSE_OK,
- NULL);
-
- if (default_uri == NULL)
- gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), GTK_RESPONSE_OK, FALSE);
- else
- em_folder_tree_set_selected (emft, default_uri);
-
- gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
-
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), GTK_WIDGET (emft), TRUE, TRUE, 6);
-
- g_signal_connect (emft, "folder-selected", G_CALLBACK (folder_selected_cb), dialog);
-
- return dialog;
-}
-
-CamelFolder *
-em_folder_selection_run_dialog (GtkWindow *parent_window, const char *title, CamelFolder *default_folder)
-{
- CamelFolder *selected_folder;
- EMFolderTreeModel *model;
- GtkWidget *dialog;
- GtkWidget *emft;
- const char *uri;
- int response;
-
- model = mail_component_get_tree_model (mail_component_peek ());
- emft = em_folder_tree_new_with_model (model);
- gtk_widget_show (emft);
-
- if (default_folder) {
- char *default_uri;
-
- default_uri = mail_tools_folder_to_url (default_folder);
- dialog = create_dialog (parent_window, (EMFolderTree *) emft, title, default_uri, FALSE);
- g_free (default_uri);
- } else {
- dialog = create_dialog (parent_window, (EMFolderTree *) emft, title, NULL, FALSE);
- }
-
- response = gtk_dialog_run (GTK_DIALOG (dialog));
-
- if (response != GTK_RESPONSE_OK) {
- gtk_widget_destroy (dialog);
- return NULL;
- }
-
- if (!(uri = em_folder_tree_get_selected_uri ((EMFolderTree *) emft))) {
- gtk_widget_destroy (dialog);
- return NULL;
- }
-
- selected_folder = mail_tool_uri_to_folder (uri, 0, NULL);
- gtk_widget_destroy (dialog);
-
- return selected_folder;
-}
-
-/* FIXME: This isn't the way to do it, but then neither is the above, really ... */
-char *
-em_folder_selection_run_dialog_uri (GtkWindow *parent_window, const char *title, const char *default_uri)
-{
- EMFolderTreeModel *model;
- GtkWidget *dialog;
- GtkWidget *emft;
- const char *uri;
- int response;
- char *ret;
-
- model = mail_component_get_tree_model (mail_component_peek ());
- emft = em_folder_tree_new_with_model (model);
- gtk_widget_show (emft);
-
- if (default_uri)
- dialog = create_dialog (parent_window, (EMFolderTree *) emft, title, default_uri, FALSE);
- else
- dialog = create_dialog (parent_window, (EMFolderTree *) emft, title, NULL, FALSE);
-
- response = gtk_dialog_run (GTK_DIALOG (dialog));
-
- if (response != GTK_RESPONSE_OK) {
- gtk_widget_destroy (dialog);
- return NULL;
- }
-
- if (!(uri = em_folder_tree_get_selected_uri ((EMFolderTree *) emft))) {
- gtk_widget_destroy (dialog);
- return NULL;
- }
-
- ret = g_strdup (uri);
- gtk_widget_destroy (dialog);
-
- return ret;
-}
-
-
-struct _select_folder_data {
- void (*done) (const char *uri, void *data);
- void *data;
-};
-
-static void
-emfs_response (GtkWidget *dialog, int response, struct _select_folder_data *d)
-{
- EMFolderTree *emft = g_object_get_data ((GObject *) dialog, "emft");
- const char *uri;
-
- gtk_widget_hide (dialog);
-
- if (response == GTK_RESPONSE_OK) {
- uri = em_folder_tree_get_selected_uri (emft);
- d->done (uri, d->data);
- }
-
- gtk_widget_destroy (dialog);
-}
-
-void
-em_select_folder (GtkWindow *parent_window, const char *title, const char *default_uri,
- void (*done) (const char *uri, void *user_data), void *user_data)
-{
- struct _select_folder_data *d;
- EMFolderTreeModel *model;
- GtkWidget *dialog;
- GtkWidget *emft;
-
- model = mail_component_get_tree_model (mail_component_peek ());
- emft = em_folder_tree_new_with_model (model);
- gtk_widget_show (emft);
-
- if (default_uri)
- dialog = create_dialog (parent_window, (EMFolderTree *) emft, title, default_uri, FALSE);
- else
- dialog = create_dialog (parent_window, (EMFolderTree *) emft, title, NULL, FALSE);
-
- d = g_malloc0 (sizeof (*d));
- d->data = user_data;
- d->done = done;
-
- /* ugh, painful api ... */
- g_object_set_data ((GObject *) dialog, "emft", emft);
- g_object_set_data_full ((GObject *) dialog, "emfs_data", d, g_free);
- g_signal_connect (dialog, "response", G_CALLBACK (emfs_response), d);
-
- gtk_widget_show (dialog);
-}
diff --git a/mail/em-folder-selection.h b/mail/em-folder-selection.h
deleted file mode 100644
index cbcbc20826..0000000000
--- a/mail/em-folder-selection.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2003 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 EM_FOLDER_SELECTION_H
-#define EM_FOLDER_SELECTION_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <gtk/gtkwindow.h>
-#include <camel/camel-folder.h>
-
-CamelFolder *em_folder_selection_run_dialog (GtkWindow *parent_window,
- const char *title,
- CamelFolder *default_folder);
-
-char *em_folder_selection_run_dialog_uri (GtkWindow *parent_window,
- const char *title,
- const char *default_uri);
-
-void em_select_folder (GtkWindow *parent_window, const char *title, const char *default_uri,
- void (*done)(const char *uri, void *data),
- void *data);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* EM_FOLDER_SELECTION_H */
diff --git a/mail/em-folder-selector.c b/mail/em-folder-selector.c
deleted file mode 100644
index 5e2697ddf8..0000000000
--- a/mail/em-folder-selector.c
+++ /dev/null
@@ -1,362 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2003 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 <libgnome/gnome-i18n.h>
-
-#include <gal/util/e-util.h>
-#include <gal/widgets/e-gui-utils.h>
-
-#include <gtk/gtkentry.h>
-#include <gtk/gtkbox.h>
-#include <gtk/gtkhbox.h>
-#include <gtk/gtklabel.h>
-#include <gtk/gtkscrolledwindow.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkstock.h>
-
-#include <camel/camel-url.h>
-#include <camel/camel-store.h>
-#include <camel/camel-session.h>
-
-#include "em-folder-tree.h"
-#include "em-folder-selector.h"
-
-#define d(x) x
-
-
-extern CamelSession *session;
-
-
-static void em_folder_selector_class_init (EMFolderSelectorClass *klass);
-static void em_folder_selector_init (EMFolderSelector *emfs);
-static void em_folder_selector_destroy (GtkObject *obj);
-static void em_folder_selector_finalize (GObject *obj);
-
-
-static GtkDialogClass *parent_class = NULL;
-
-
-GType
-em_folder_selector_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (EMFolderSelectorClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) em_folder_selector_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EMFolderSelector),
- 0, /* n_preallocs */
- (GInstanceInitFunc) em_folder_selector_init,
- };
-
- type = g_type_register_static (GTK_TYPE_DIALOG, "EMFolderSelector", &info, 0);
- }
-
- return type;
-}
-
-static void
-em_folder_selector_class_init (EMFolderSelectorClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_ref (GTK_TYPE_DIALOG);
-
- object_class->finalize = em_folder_selector_finalize;
- gtk_object_class->destroy = em_folder_selector_destroy;
-}
-
-static void
-em_folder_selector_init (EMFolderSelector *emfs)
-{
- emfs->selected_path = NULL;
- emfs->selected_uri = NULL;
-}
-
-static void
-em_folder_selector_destroy (GtkObject *obj)
-{
- GTK_OBJECT_CLASS (parent_class)->destroy (obj);
-}
-
-static void
-em_folder_selector_finalize (GObject *obj)
-{
- EMFolderSelector *emfs = (EMFolderSelector *) obj;
-
- g_free (emfs->selected_path);
- g_free (emfs->selected_uri);
-
- G_OBJECT_CLASS (parent_class)->finalize (obj);
-}
-
-static void
-emfs_response (GtkWidget *dialog, int response, EMFolderSelector *emfs)
-{
- EMFolderTreeModel *model;
- const char *path, *uri;
- EMFolderTree *emft;
-
- if (response != EM_FOLDER_SELECTOR_RESPONSE_NEW)
- return;
-
- model = em_folder_tree_get_model (emfs->emft);
- emft = (EMFolderTree *) em_folder_tree_new_with_model (model);
- dialog = em_folder_selector_create_new (emft, 0, _("Create New Folder"), _("Specify where to create the folder:"));
- gtk_window_set_transient_for ((GtkWindow *) dialog, (GtkWindow *) emfs);
-
- if (gtk_dialog_run ((GtkDialog *) dialog) == GTK_RESPONSE_OK) {
- uri = em_folder_selector_get_selected_uri ((EMFolderSelector *) dialog);
- path = em_folder_selector_get_selected_path ((EMFolderSelector *) dialog);
-
- if (em_folder_tree_create_folder (emfs->emft, path, uri))
- em_folder_tree_set_selected (emfs->emft, uri);
- }
-
- gtk_widget_destroy (dialog);
-
- g_signal_stop_emission_by_name (emfs, "response");
-}
-
-static void
-emfs_create_name_changed (GtkEntry *entry, EMFolderSelector *emfs)
-{
- const char *path, *text = NULL;
- gboolean active;
-
- if (emfs->name_entry->text_length > 0)
- text = gtk_entry_get_text (emfs->name_entry);
-
- path = em_folder_tree_get_selected_path (emfs->emft);
-
- active = text && path && !strchr (text, '/');
-
- gtk_dialog_set_response_sensitive ((GtkDialog *) emfs, GTK_RESPONSE_OK, active);
-}
-
-static void
-folder_selected_cb (EMFolderTree *emft, const char *path, const char *uri, EMFolderSelector *emfs)
-{
- if (emfs->name_entry)
- emfs_create_name_changed (emfs->name_entry, emfs);
- else
- gtk_dialog_set_response_sensitive (GTK_DIALOG (emfs), GTK_RESPONSE_OK, TRUE);
-}
-
-void
-em_folder_selector_construct (EMFolderSelector *emfs, EMFolderTree *emft, guint32 flags, const char *title, const char *text)
-{
- GtkWidget *scrolled_window;
- GtkWidget *label;
-
- gtk_window_set_default_size (GTK_WINDOW (emfs), 350, 300);
- gtk_window_set_modal (GTK_WINDOW (emfs), TRUE);
- gtk_window_set_title (GTK_WINDOW (emfs), title);
- gtk_container_set_border_width (GTK_CONTAINER (emfs), 6);
-
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (emfs)->vbox), 6);
- gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (emfs)->vbox), 6);
-
- emfs->flags = flags;
- if (flags & EM_FOLDER_SELECTOR_CAN_CREATE) {
- gtk_dialog_add_button (GTK_DIALOG (emfs), GTK_STOCK_NEW, EM_FOLDER_SELECTOR_RESPONSE_NEW);
- g_signal_connect (emfs, "response", G_CALLBACK (emfs_response), emfs);
- }
-
- gtk_dialog_add_buttons (GTK_DIALOG (emfs), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_OK, GTK_RESPONSE_OK, NULL);
-
- gtk_dialog_set_response_sensitive (GTK_DIALOG (emfs), GTK_RESPONSE_OK, FALSE);
- gtk_dialog_set_default_response (GTK_DIALOG (emfs), GTK_RESPONSE_OK);
-
- emfs->emft = emft;
- gtk_widget_show ((GtkWidget *) emft);
-
- g_signal_connect (emfs->emft, "folder-selected", G_CALLBACK (folder_selected_cb), emfs);
-
- scrolled_window = gtk_scrolled_window_new (NULL, NULL);
- gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window), GTK_SHADOW_IN);
- 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), (GtkWidget *) emft);
-
- gtk_box_pack_end (GTK_BOX (GTK_DIALOG (emfs)->vbox), scrolled_window, TRUE, TRUE, 6);
-
- if (text != NULL) {
- label = gtk_label_new (text);
- gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
- gtk_widget_show (label);
-
- gtk_box_pack_end (GTK_BOX (GTK_DIALOG (emfs)->vbox), label, FALSE, TRUE, 6);
- }
-
- GTK_WIDGET_SET_FLAGS ((GtkWidget *) emfs->emft, GTK_CAN_FOCUS);
- gtk_widget_grab_focus ((GtkWidget *) emfs->emft);
-}
-
-GtkWidget *
-em_folder_selector_new (EMFolderTree *emft, guint32 flags, const char *title, const char *text)
-{
- EMFolderSelector *emfs;
-
- emfs = g_object_new (em_folder_selector_get_type (), NULL);
- em_folder_selector_construct (emfs, emft, flags, title, text);
-
- return (GtkWidget *) emfs;
-}
-
-
-static void
-emfs_create_name_activate (GtkEntry *entry, EMFolderSelector *emfs)
-{
- g_signal_emit_by_name (emfs, "response", GTK_RESPONSE_OK);
-}
-
-GtkWidget *
-em_folder_selector_create_new (EMFolderTree *emft, guint32 flags, const char *title, const char *text)
-{
- EMFolderSelector *emfs;
- GtkWidget *hbox, *w;
-
- /* remove the CREATE flag if it is there since that's the
- * whole purpose of this dialog */
- flags &= ~EM_FOLDER_SELECTOR_CAN_CREATE;
-
- emfs = g_object_new (em_folder_selector_get_type (), NULL);
- em_folder_selector_construct (emfs, emft, flags, title, text);
-
- hbox = gtk_hbox_new (FALSE, 0);
- w = gtk_label_new_with_mnemonic (_("Folder _name:"));
- gtk_box_pack_start ((GtkBox *) hbox, w, FALSE, FALSE, 6);
- emfs->name_entry = (GtkEntry *) gtk_entry_new ();
- g_signal_connect (emfs->name_entry, "changed", G_CALLBACK (emfs_create_name_changed), emfs);
- g_signal_connect (emfs->name_entry, "activate", G_CALLBACK (emfs_create_name_activate), emfs);
- gtk_box_pack_start ((GtkBox *) hbox, (GtkWidget *) emfs->name_entry, TRUE, FALSE, 6);
- gtk_widget_show_all (hbox);
-
- gtk_box_pack_start ((GtkBox *) ((GtkDialog *) emfs)->vbox, hbox, FALSE, TRUE, 0);
-
- return (GtkWidget *) emfs;
-}
-
-
-void
-em_folder_selector_set_selected (EMFolderSelector *emfs, const char *uri)
-{
- em_folder_tree_set_selected (emfs->emft, uri);
-}
-
-
-const char *
-em_folder_selector_get_selected_uri (EMFolderSelector *emfs)
-{
- const char *uri, *name;
-
- if (!(uri = em_folder_tree_get_selected_uri (emfs->emft))) {
- d(printf ("no selected folder?\n"));
- return NULL;
- }
-
- if (uri && emfs->name_entry) {
- CamelProvider *provider;
- CamelException ex;
- CamelURL *url;
- char *newpath;
-
- camel_exception_init (&ex);
- provider = camel_session_get_provider (session, uri, &ex);
- camel_exception_clear (&ex);
-
- name = gtk_entry_get_text (emfs->name_entry);
-
- url = camel_url_new (uri, NULL);
- if (provider && (provider->url_flags & CAMEL_URL_FRAGMENT_IS_PATH)) {
- if (url->fragment)
- newpath = g_strdup_printf ("%s/%s", url->fragment, name);
- else
- newpath = g_strdup (name);
-
- camel_url_set_fragment (url, newpath);
- } else {
- newpath = g_strdup_printf ("%s/%s", url->path ? url->path : "", name);
- camel_url_set_path (url, newpath);
- }
-
- g_free (emfs->selected_path);
- emfs->selected_path = newpath;
-
- g_free (emfs->selected_uri);
- emfs->selected_uri = camel_url_to_string (url, 0);
-
- camel_url_free (url);
- uri = emfs->selected_uri;
- }
-
- return uri;
-}
-
-
-const char *
-em_folder_selector_get_selected_path (EMFolderSelector *emfs)
-{
- const char *path;
-
- if (emfs->selected_path) {
- /* already did the work in a previous call */
- return emfs->selected_path;
- }
-
- if (!(path = em_folder_tree_get_selected_path (emfs->emft))) {
- d(printf ("no selected folder?\n"));
- return NULL;
- }
-
- if (path && emfs->name_entry) {
- const char *name;
- char *newpath;
-
- name = gtk_entry_get_text (emfs->name_entry);
- if (strcmp (path, "/") != 0)
- newpath = g_strdup_printf ("%s/%s", path, name);
- else
- newpath = g_strdup_printf ("/%s", name);
-
- path = emfs->selected_path = newpath;
- }
-
- return path;
-}
diff --git a/mail/em-folder-selector.h b/mail/em-folder-selector.h
deleted file mode 100644
index d9d4a172ce..0000000000
--- a/mail/em-folder-selector.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2003 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 EM_FOLDER_SELECTOR_H
-#define EM_FOLDER_SELECTOR_H
-
-#include <gtk/gtkdialog.h>
-
-#ifdef cplusplus
-extern "C" {
-#pragma }
-#endif /* cplusplus */
-
-#define EM_TYPE_FOLDER_SELECTOR (em_folder_selector_get_type ())
-#define EM_FOLDER_SELECTOR(obj) (GTK_CHECK_CAST ((obj), E_TYPEM_FOLDER_SELECTOR, EMFolderSelector))
-#define EM_FOLDER_SELECTOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPEM_FOLDER_SELECTOR, EMFolderSelectorClass))
-#define EM_IS_FOLDER_SELECTOR(obj) (GTK_CHECK_TYPE ((obj), E_TYPEM_FOLDER_SELECTOR))
-#define EM_IS_FOLDER_SELECTOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPEM_FOLDER_SELECTOR))
-
-typedef struct _EMFolderSelector EMFolderSelector;
-typedef struct _EMFolderSelectorPrivate EMFolderSelectorPrivate;
-typedef struct _EMFolderSelectorClass EMFolderSelectorClass;
-
-struct _EMFolderSelector {
- GtkDialog parent;
-
- guint32 flags;
- struct _EMFolderTree *emft;
-
- struct _GtkEntry *name_entry;
- char *selected_path;
- char *selected_uri;
-};
-
-struct _EMFolderSelectorClass {
- GtkDialogClass parent_class;
-
-};
-
-enum {
- EM_FOLDER_SELECTOR_CAN_CREATE = 1,
-};
-
-enum {
- EM_FOLDER_SELECTOR_RESPONSE_NEW = -5,
-};
-
-
-GType em_folder_selector_get_type (void);
-
-void em_folder_selector_construct (EMFolderSelector *emfs, struct _EMFolderTree *emft, guint32 flags, const char *title, const char *text);
-
-/* for selecting folders */
-GtkWidget *em_folder_selector_new (struct _EMFolderTree *emft, guint32 flags, const char *title, const char *text);
-
-/* for creating folders */
-GtkWidget *em_folder_selector_create_new (struct _EMFolderTree *emft, guint32 flags, const char *title, const char *text);
-
-void em_folder_selector_set_selected (EMFolderSelector *emfs, const char *uri);
-
-const char *em_folder_selector_get_selected_uri (EMFolderSelector *emfs);
-const char *em_folder_selector_get_selected_path (EMFolderSelector *emfs);
-
-#ifdef cplusplus
-}
-#endif /* cplusplus */
-
-#endif /* EM_FOLDER_SELECTOR_H */
diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c
deleted file mode 100644
index ada449660e..0000000000
--- a/mail/em-folder-tree-model.c
+++ /dev/null
@@ -1,1198 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2003 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 <sys/types.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-
-#include <e-util/e-mktemp.h>
-
-#include <camel/camel-file-utils.h>
-
-#include "mail-config.h"
-#include "mail-session.h"
-#include "mail-tools.h"
-
-#include "em-utils.h"
-
-#include "em-marshal.h"
-#include "em-folder-tree-model.h"
-
-
-#define d(x) x
-
-static GType col_types[] = {
- G_TYPE_STRING, /* display name */
- G_TYPE_POINTER, /* store object */
- G_TYPE_STRING, /* path */
- G_TYPE_STRING, /* uri */
- G_TYPE_UINT, /* unread count */
- G_TYPE_BOOLEAN, /* is a store node */
- G_TYPE_BOOLEAN, /* has not-yet-loaded subfolders */
-};
-
-
-/* GObject virtual method overrides */
-static void em_folder_tree_model_class_init (EMFolderTreeModelClass *klass);
-static void em_folder_tree_model_init (EMFolderTreeModel *model);
-static void em_folder_tree_model_finalize (GObject *obj);
-
-/* interface init methods */
-static void tree_model_iface_init (GtkTreeModelIface *iface);
-static void tree_drag_dest_iface_init (GtkTreeDragDestIface *iface);
-static void tree_drag_source_iface_init (GtkTreeDragSourceIface *iface);
-
-/* drag & drop iface methods */
-static gboolean model_drag_data_received (GtkTreeDragDest *drag_dest,
- GtkTreePath *dest_path,
- GtkSelectionData *selection);
-static gboolean model_row_drop_possible (GtkTreeDragDest *drag_dest,
- GtkTreePath *dest_path,
- GtkSelectionData *selection);
-static gboolean model_row_draggable (GtkTreeDragSource *drag_source,
- GtkTreePath *src_path);
-static gboolean model_drag_data_get (GtkTreeDragSource *drag_source,
- GtkTreePath *src_path,
- GtkSelectionData *selection);
-static gboolean model_drag_data_delete (GtkTreeDragSource *drag_source,
- GtkTreePath *src_path);
-
-
-enum {
- LOADING_ROW,
- DRAG_DATA_RECEIVED,
- ROW_DROP_POSSIBLE,
- ROW_DRAGGABLE,
- DRAG_DATA_GET,
- DRAG_DATA_DELETE,
- LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0, };
-
-
-static GtkTreeStore *parent_class = NULL;
-
-
-GType
-em_folder_tree_model_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (EMFolderTreeModelClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) em_folder_tree_model_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EMFolderTreeModel),
- 0, /* n_preallocs */
- (GInstanceInitFunc) em_folder_tree_model_init,
- };
- static const GInterfaceInfo tree_model_info = {
- (GInterfaceInitFunc) tree_model_iface_init,
- NULL,
- NULL
- };
- static const GInterfaceInfo drag_dest_info = {
- (GInterfaceInitFunc) tree_drag_dest_iface_init,
- NULL,
- NULL
- };
- static const GInterfaceInfo drag_source_info = {
- (GInterfaceInitFunc) tree_drag_source_iface_init,
- NULL,
- NULL
- };
-
- type = g_type_register_static (GTK_TYPE_TREE_STORE, "EMFolderTreeModel", &info, 0);
-
- g_type_add_interface_static (type, GTK_TYPE_TREE_MODEL,
- &tree_model_info);
- g_type_add_interface_static (type, GTK_TYPE_TREE_DRAG_DEST,
- &drag_dest_info);
- g_type_add_interface_static (type, GTK_TYPE_TREE_DRAG_SOURCE,
- &drag_source_info);
- }
-
- return type;
-}
-
-
-static void
-em_folder_tree_model_class_init (EMFolderTreeModelClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_ref (GTK_TYPE_TREE_STORE);
-
- object_class->finalize = em_folder_tree_model_finalize;
-
- /* signals */
- signals[LOADING_ROW] =
- g_signal_new ("loading-row",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (EMFolderTreeModelClass, loading_row),
- NULL, NULL,
- em_marshal_VOID__POINTER_POINTER,
- G_TYPE_NONE, 2,
- G_TYPE_POINTER,
- G_TYPE_POINTER);
-}
-
-static void
-em_folder_tree_model_init (EMFolderTreeModel *model)
-{
- model->store_hash = g_hash_table_new (g_direct_hash, g_direct_equal);
- model->uri_hash = g_hash_table_new (g_str_hash, g_str_equal);
- model->expanded = g_hash_table_new (g_str_hash, g_str_equal);
-}
-
-static void
-path_hash_free (gpointer key, gpointer value, gpointer user_data)
-{
- g_free (key);
- gtk_tree_row_reference_free (value);
-}
-
-static void
-store_info_free (struct _EMFolderTreeModelStoreInfo *si)
-{
- camel_object_remove_event (si->store, si->created_id);
- camel_object_remove_event (si->store, si->deleted_id);
- camel_object_remove_event (si->store, si->renamed_id);
- camel_object_remove_event (si->store, si->subscribed_id);
- camel_object_remove_event (si->store, si->unsubscribed_id);
-
- g_free (si->display_name);
- camel_object_unref (si->store);
- gtk_tree_row_reference_free (si->row);
- g_hash_table_foreach (si->path_hash, path_hash_free, NULL);
- g_free (si);
-}
-
-static void
-store_hash_free (gpointer key, gpointer value, gpointer user_data)
-{
- struct _EMFolderTreeModelStoreInfo *si = value;
-
- store_info_free (si);
-}
-
-static void
-uri_hash_free (gpointer key, gpointer value, gpointer user_data)
-{
- g_free (key);
- gtk_tree_row_reference_free (value);
-}
-
-static gboolean
-expanded_free (gpointer key, gpointer value, gpointer user_data)
-{
- g_free (key);
- return TRUE;
-}
-
-static void
-em_folder_tree_model_finalize (GObject *obj)
-{
- EMFolderTreeModel *model = (EMFolderTreeModel *) obj;
-
- g_hash_table_foreach (model->store_hash, store_hash_free, NULL);
- g_hash_table_destroy (model->store_hash);
-
- g_hash_table_foreach (model->uri_hash, uri_hash_free, NULL);
- g_hash_table_destroy (model->uri_hash);
-
- g_hash_table_foreach (model->expanded, (GHFunc) expanded_free, NULL);
- g_hash_table_destroy (model->expanded);
-
- g_free (model->filename);
-
- G_OBJECT_CLASS (parent_class)->finalize (obj);
-}
-
-
-static void
-tree_model_iface_init (GtkTreeModelIface *iface)
-{
- ;
-}
-
-static void
-tree_drag_dest_iface_init (GtkTreeDragDestIface *iface)
-{
- iface->drag_data_received = model_drag_data_received;
- iface->row_drop_possible = model_row_drop_possible;
-}
-
-static void
-tree_drag_source_iface_init (GtkTreeDragSourceIface *iface)
-{
- iface->row_draggable = model_row_draggable;
- iface->drag_data_get = model_drag_data_get;
- iface->drag_data_delete = model_drag_data_delete;
-}
-
-
-static void
-drop_uid_list (CamelFolder *dest, gboolean move, GtkSelectionData *selection, CamelException *ex)
-{
- CamelFolder *src;
- GPtrArray *uids;
- char *src_uri;
-
- em_utils_selection_get_uidlist (selection, &src_uri, &uids);
-
- if (!(src = mail_tool_uri_to_folder (src_uri, 0, ex))) {
- em_utils_uids_free (uids);
- g_free (src_uri);
- return;
- }
-
- g_free (src_uri);
-
- camel_folder_transfer_messages_to (src, uids, dest, NULL, move, ex);
- em_utils_uids_free (uids);
- camel_object_unref (src);
-}
-
-static void
-drop_folder (CamelFolder *dest, gboolean move, GtkSelectionData *selection, CamelException *ex)
-{
- CamelFolder *src;
-
- /* get the folder being dragged */
- if (!(src = mail_tool_uri_to_folder (selection->data, 0, ex)))
- return;
-
- if (src->parent_store == dest->parent_store && move) {
- /* simple rename() action */
- char *old_name, *new_name;
-
- old_name = g_strdup (src->full_name);
- new_name = g_strdup_printf ("%s/%s", dest->full_name, src->name);
-
- camel_store_rename_folder (dest->parent_store, old_name, new_name, ex);
-
- g_free (old_name);
- g_free (new_name);
- } else {
- /* copy the folder to the new location */
- CamelFolder *folder;
- char *path;
-
- path = g_strdup_printf ("%s/%s", dest->full_name, src->name);
- if ((folder = camel_store_get_folder (dest->parent_store, path, CAMEL_STORE_FOLDER_CREATE, ex))) {
- GPtrArray *uids;
-
- uids = camel_folder_get_uids (src);
- camel_folder_transfer_messages_to (src, uids, folder, NULL, FALSE, ex);
- camel_folder_free_uids (src, uids);
-
- camel_object_unref (folder);
- }
-
- g_free (path);
- }
-
- camel_object_unref (src);
-}
-
-static gboolean
-import_message_rfc822 (CamelFolder *dest, CamelStream *stream, gboolean scan_from, CamelException *ex)
-{
- CamelMimeParser *mp;
-
- mp = camel_mime_parser_new ();
- camel_mime_parser_scan_from (mp, scan_from);
- camel_mime_parser_init_with_stream (mp, stream);
-
- while (camel_mime_parser_step (mp, 0, 0) == CAMEL_MIME_PARSER_STATE_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 (msg);
- camel_object_unref (mp);
- return FALSE;
- }
-
- /* append the message to the folder... */
- info = g_new0 (CamelMessageInfo, 1);
- camel_folder_append_message (dest, msg, info, NULL, ex);
- camel_object_unref (msg);
-
- if (camel_exception_is_set (ex)) {
- camel_object_unref (mp);
- return FALSE;
- }
-
- /* skip over the FROM_END state */
- camel_mime_parser_step (mp, 0, 0);
- }
-
- camel_object_unref (mp);
-
- return TRUE;
-}
-
-static void
-drop_message_rfc822 (CamelFolder *dest, GtkSelectionData *selection, CamelException *ex)
-{
- CamelStream *stream;
- gboolean scan_from;
-
- scan_from = selection->length > 5 && !strncmp (selection->data, "From ", 5);
- stream = camel_stream_mem_new_with_buffer (selection->data, selection->length);
-
- import_message_rfc822 (dest, stream, scan_from, ex);
-
- camel_object_unref (stream);
-}
-
-static void
-drop_text_uri_list (CamelFolder *dest, GtkSelectionData *selection, CamelException *ex)
-{
- char **urls, *url, *tmp;
- CamelStream *stream;
- CamelURL *uri;
- int fd, i;
-
- tmp = g_strndup (selection->data, selection->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);
-
- if (!uri || strcmp (uri->protocol, "file") != 0) {
- camel_url_free (uri);
- continue;
- }
-
- url = uri->path;
- uri->path = NULL;
- camel_url_free (uri);
-
- if ((fd = open (url, O_RDONLY)) == -1) {
- g_free (url);
- continue;
- }
-
- stream = camel_stream_fs_new_with_fd (fd);
- if (!import_message_rfc822 (dest, stream, TRUE, ex)) {
- /* FIXME: should we abort now? or continue? */
- /* for now lets just continue... */
- camel_exception_clear (ex);
- }
-
- camel_object_unref (stream);
- g_free (url);
- }
-
- g_free (urls);
-}
-
-
-static gboolean
-model_drag_data_received (GtkTreeDragDest *drag_dest, GtkTreePath *dest_path, GtkSelectionData *selection)
-{
- EMFolderTreeModel *model = (EMFolderTreeModel *) drag_dest;
- const char *full_name;
- CamelFolder *folder;
- CamelStore *store;
- CamelException ex;
- GtkTreeIter iter;
- char *path;
-
- /* this means we are receiving no data */
- if (!selection->data || selection->length == -1)
- return FALSE;
-
- if (!gtk_tree_model_get_iter ((GtkTreeModel *) model, &iter, dest_path))
- return FALSE;
-
- gtk_tree_model_get ((GtkTreeModel *) model, &iter,
- COL_POINTER_CAMEL_STORE, &store,
- COL_STRING_FOLDER_PATH, &path, -1);
-
- /* make sure user isn't try to drop on a placeholder row */
- if (path == NULL)
- return FALSE;
-
- full_name = path[0] == '/' ? path + 1 : path;
-
- camel_exception_init (&ex);
- if ((folder = camel_store_get_folder (store, full_name, 0, &ex))) {
- /* FIXME: would have been nicer if we could 'move'
- * messages and/or folders. but alas, gtktreeview
- * drag&drop doesn't give us the context->action to
- * check for GDK_ACTION_MOVE, so we can't. Yay. */
- gboolean move = FALSE;
-
- if (selection->target == gdk_atom_intern ("x-uid-list", FALSE)) {
- /* import a list of uids from another evo folder */
- drop_uid_list (folder, move, selection, &ex);
- d(printf ("* dropped a x-uid-list\n"));
- } else if (selection->target == gdk_atom_intern ("x-folder", FALSE)) {
- /* copy or move (aka rename) a folder */
- drop_folder (folder, move, selection, &ex);
- d(printf ("* dropped a x-folder\n"));
- } else if (selection->target == gdk_atom_intern ("message/rfc822", FALSE)) {
- /* import a message/rfc822 stream */
- drop_message_rfc822 (folder, selection, &ex);
- d(printf ("* dropped a message/rfc822\n"));
- } else if (selection->target == gdk_atom_intern ("text/uri-list", FALSE)) {
- /* import an mbox, maildir, or mh folder? */
- drop_text_uri_list (folder, selection, &ex);
- d(printf ("* dropped a text/uri-list\n"));
- } else {
- g_assert_not_reached ();
- }
- }
-
- if (camel_exception_is_set (&ex)) {
- /* FIXME: error dialog? */
- camel_exception_clear (&ex);
- return FALSE;
- }
-
- return TRUE;
-}
-
-static gboolean
-model_row_drop_possible (GtkTreeDragDest *drag_dest, GtkTreePath *dest_path, GtkSelectionData *selection)
-{
- EMFolderTreeModel *model = (EMFolderTreeModel *) drag_dest;
- gboolean is_store;
- GtkTreeIter iter;
-
- if (!gtk_tree_model_get_iter ((GtkTreeModel *) model, &iter, dest_path))
- return FALSE;
-
- gtk_tree_model_get ((GtkTreeModel *) model, &iter, COL_BOOL_IS_STORE, &is_store, -1);
-
- if (selection->target == gdk_atom_intern ("x-uid-list", FALSE)) {
- if (is_store)
- return FALSE;
-
- return TRUE;
- } else if (selection->target == gdk_atom_intern ("x-folder", FALSE)) {
- return TRUE;
- } else if (selection->target == gdk_atom_intern ("message/rfc822", FALSE)) {
- if (is_store)
- return FALSE;
-
- return TRUE;
- } else if (selection->target == gdk_atom_intern ("text/uri-list", FALSE)) {
- if (is_store)
- return FALSE;
-
- return TRUE;
- } else {
- g_assert_not_reached ();
- return FALSE;
- }
-}
-
-static gboolean
-model_row_draggable (GtkTreeDragSource *drag_source, GtkTreePath *src_path)
-{
- EMFolderTreeModel *model = (EMFolderTreeModel *) drag_source;
- gboolean is_store;
- GtkTreeIter iter;
-
- if (!gtk_tree_model_get_iter ((GtkTreeModel *) model, &iter, src_path))
- return FALSE;
-
- gtk_tree_model_get ((GtkTreeModel *) model, &iter, COL_BOOL_IS_STORE, &is_store, -1);
-
- return !is_store;
-}
-
-static void
-drag_text_uri_list (CamelFolder *src, GtkSelectionData *selection, CamelException *ex)
-{
- CamelFolder *dest;
- const char *tmpdir;
- CamelStore *store;
- GPtrArray *uids;
- GString *url;
-
- if (!(tmpdir = e_mkdtemp ("drag-n-drop-XXXXXX"))) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not create temporary directory: %s"),
- g_strerror (errno));
- return;
- }
-
- url = g_string_new ("mbox:");
- g_string_append (url, tmpdir);
- if (!(store = camel_session_get_store (session, url->str, ex))) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not create temporary mbox store: %s"),
- camel_exception_get_description (ex));
- g_string_free (url, TRUE);
-
- return;
- }
-
- if (!(dest = camel_store_get_folder (store, "mbox", CAMEL_STORE_FOLDER_CREATE, ex))) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not create temporary mbox folder: %s"),
- camel_exception_get_description (ex));
-
- camel_object_unref (store);
- g_string_free (url, TRUE);
-
- return;
- }
-
- camel_object_unref (store);
- uids = camel_folder_get_uids (src);
-
- camel_folder_transfer_messages_to (src, uids, dest, NULL, FALSE, ex);
- if (camel_exception_is_set (ex)) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not copy messages to temporary mbox folder: %s"),
- camel_exception_get_description (ex));
- } else {
- /* replace "mbox:" with "file:" */
- memcpy (url->str, "file", 4);
- g_string_append (url, "\r\n");
- gtk_selection_data_set (selection, selection->target, 8, url->str, url->len);
- }
-
- camel_folder_free_uids (src, uids);
- camel_object_unref (dest);
- g_string_free (url, TRUE);
-}
-
-static gboolean
-model_drag_data_get (GtkTreeDragSource *drag_source, GtkTreePath *src_path, GtkSelectionData *selection)
-{
- EMFolderTreeModel *model = (EMFolderTreeModel *) drag_source;
- const char *full_name;
- CamelFolder *folder;
- CamelStore *store;
- CamelException ex;
- GtkTreeIter iter;
- char *path, *uri;
-
- if (!gtk_tree_model_get_iter ((GtkTreeModel *) model, &iter, src_path))
- return FALSE;
-
- gtk_tree_model_get ((GtkTreeModel *) model, &iter,
- COL_POINTER_CAMEL_STORE, &store,
- COL_STRING_FOLDER_PATH, &path,
- COL_STRING_URI, &uri, -1);
-
- /* make sure user isn't try to drag on a placeholder row */
- if (path == NULL)
- return FALSE;
-
- full_name = path[0] == '/' ? path + 1 : path;
-
- camel_exception_init (&ex);
-
- if (selection->target == gdk_atom_intern ("x-folder", FALSE)) {
- /* dragging to a new location in the folder tree */
- gtk_selection_data_set (selection, selection->target, 8, uri, strlen (uri) + 1);
- } else if (selection->target == gdk_atom_intern ("text/uri-list", FALSE)) {
- /* dragging to nautilus or something, probably */
- if ((folder = camel_store_get_folder (store, full_name, 0, &ex))) {
- drag_text_uri_list (folder, selection, &ex);
- camel_object_unref (folder);
- }
- } else {
- g_assert_not_reached ();
- }
-
- if (camel_exception_is_set (&ex)) {
- /* FIXME: error dialog? */
- camel_exception_clear (&ex);
- return FALSE;
- }
-
- return TRUE;
-}
-
-static gboolean
-model_drag_data_delete (GtkTreeDragSource *drag_source, GtkTreePath *src_path)
-{
- EMFolderTreeModel *model = (EMFolderTreeModel *) drag_source;
- const char *full_name;
- gboolean is_store;
- CamelStore *store;
- CamelException ex;
- GtkTreeIter iter;
- char *path;
-
- if (!gtk_tree_model_get_iter ((GtkTreeModel *) model, &iter, src_path))
- return FALSE;
-
- gtk_tree_model_get ((GtkTreeModel *) model, &iter,
- COL_POINTER_CAMEL_STORE, &store,
- COL_STRING_FOLDER_PATH, &path,
- COL_BOOL_IS_STORE, &is_store, -1);
-
- if (is_store)
- return FALSE;
-
- full_name = path[0] == '/' ? path + 1 : path;
-
- camel_exception_init (&ex);
- camel_store_delete_folder (store, full_name, &ex);
- if (camel_exception_is_set (&ex)) {
- /* FIXME: error dialog? */
- camel_exception_clear (&ex);
- return FALSE;
- }
-
- return TRUE;
-}
-
-
-static void
-em_folder_tree_model_load_state (EMFolderTreeModel *model, const char *filename)
-{
- char *node;
- FILE *fp;
-
- g_hash_table_foreach_remove (model->expanded, expanded_free, NULL);
-
- if ((fp = fopen (filename, "r")) == NULL)
- return;
-
- while (camel_file_util_decode_string (fp, &node) != -1)
- g_hash_table_insert (model->expanded, node, GINT_TO_POINTER (TRUE));
-
- fclose (fp);
-}
-
-
-EMFolderTreeModel *
-em_folder_tree_model_new (const char *evolution_dir)
-{
- EMFolderTreeModel *model;
- char *filename;
-
- model = g_object_new (EM_TYPE_FOLDER_TREE_MODEL, NULL);
- gtk_tree_store_set_column_types ((GtkTreeStore *) model, NUM_COLUMNS, col_types);
-
- filename = g_build_filename (evolution_dir, "mail", "config", "folder-tree.state", NULL);
- em_folder_tree_model_load_state (model, filename);
- model->filename = filename;
-
- return model;
-}
-
-
-void
-em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, GtkTreeIter *iter,
- struct _EMFolderTreeModelStoreInfo *si,
- CamelFolderInfo *fi)
-{
- GtkTreeRowReference *uri_row, *path_row;
- unsigned int unread;
- GtkTreePath *path;
- GtkTreeIter sub;
- gboolean load;
-
- load = !fi->child && (fi->flags & CAMEL_FOLDER_CHILDREN) && !(fi->flags & CAMEL_FOLDER_NOINFERIORS);
-
- path = gtk_tree_model_get_path ((GtkTreeModel *) model, iter);
- uri_row = gtk_tree_row_reference_new ((GtkTreeModel *) model, path);
- path_row = gtk_tree_row_reference_copy (uri_row);
- gtk_tree_path_free (path);
-
- g_hash_table_insert (model->uri_hash, g_strdup (fi->url), uri_row);
- g_hash_table_insert (si->path_hash, g_strdup (fi->path), path_row);
-
- unread = fi->unread_message_count == -1 ? 0 : fi->unread_message_count;
-
- gtk_tree_store_set ((GtkTreeStore *) model, iter,
- COL_STRING_DISPLAY_NAME, fi->name,
- COL_POINTER_CAMEL_STORE, si->store,
- COL_STRING_FOLDER_PATH, fi->path,
- COL_STRING_URI, fi->url,
- COL_UINT_UNREAD, unread,
- COL_BOOL_IS_STORE, FALSE,
- COL_BOOL_LOAD_SUBDIRS, load,
- -1);
-
- if (fi->child) {
- fi = fi->child;
-
- do {
- gtk_tree_store_append ((GtkTreeStore *) model, &sub, iter);
- em_folder_tree_model_set_folder_info (model, &sub, si, fi);
- fi = fi->sibling;
- } while (fi);
- } else if (load) {
- /* create a placeholder node for our subfolders... */
- gtk_tree_store_append ((GtkTreeStore *) model, &sub, iter);
- gtk_tree_store_set ((GtkTreeStore *) model, &sub,
- COL_STRING_DISPLAY_NAME, _("Loading..."),
- COL_POINTER_CAMEL_STORE, NULL,
- COL_STRING_FOLDER_PATH, NULL,
- COL_BOOL_LOAD_SUBDIRS, FALSE,
- COL_BOOL_IS_STORE, FALSE,
- COL_STRING_URI, NULL,
- COL_UINT_UNREAD, 0,
- -1);
-
- path = gtk_tree_model_get_path ((GtkTreeModel *) model, iter);
- g_signal_emit (model, signals[LOADING_ROW], 0, path, iter);
- gtk_tree_path_free (path);
- }
-}
-
-
-static void
-folder_subscribed_cb (CamelStore *store, void *event_data, EMFolderTreeModel *model)
-{
- struct _EMFolderTreeModelStoreInfo *si;
- CamelFolderInfo *fi = event_data;
- GtkTreeRowReference *row;
- GtkTreeIter parent, iter;
- GtkTreePath *path;
- gboolean load;
- char *dirname;
-
- if (!(si = g_hash_table_lookup (model->store_hash, store)))
- return;
-
- /* make sure we don't already know about it? */
- if (g_hash_table_lookup (si->path_hash, fi->path))
- return;
-
- /* get our parent folder's path */
- if (!(dirname = g_path_get_dirname (fi->path)))
- return;
-
- if (!strcmp (dirname, "/")) {
- /* user subscribed to a toplevel folder */
- row = si->row;
- g_free (dirname);
- } else {
- row = g_hash_table_lookup (si->path_hash, dirname);
- g_free (dirname);
-
- /* if row is NULL, don't bother adding to the tree,
- * when the user expands enough nodes - it will be
- * added auto-magically */
- if (row == NULL)
- return;
- }
-
- path = gtk_tree_row_reference_get_path (row);
- if (!(gtk_tree_model_get_iter ((GtkTreeModel *) model, &parent, path))) {
- gtk_tree_path_free (path);
- return;
- }
-
- gtk_tree_path_free (path);
-
- /* make sure parent's subfolders have already been loaded */
- gtk_tree_model_get ((GtkTreeModel *) model, &parent, COL_BOOL_LOAD_SUBDIRS, &load, -1);
- if (load)
- return;
-
- /* append a new node */
- gtk_tree_store_append ((GtkTreeStore *) model, &iter, &parent);
-
- em_folder_tree_model_set_folder_info (model, &iter, si, fi);
-}
-
-static void
-folder_unsubscribed_cb (CamelStore *store, void *event_data, EMFolderTreeModel *model)
-{
- struct _EMFolderTreeModelStoreInfo *si;
- CamelFolderInfo *fi = event_data;
- GtkTreeRowReference *row;
- GtkTreePath *path;
- GtkTreeIter iter;
-
- if (!(si = g_hash_table_lookup (model->store_hash, store)))
- return;
-
- if (!(row = g_hash_table_lookup (si->path_hash, fi->path)))
- return;
-
- path = gtk_tree_row_reference_get_path (row);
- if (!(gtk_tree_model_get_iter ((GtkTreeModel *) model, &iter, path))) {
- gtk_tree_path_free (path);
- return;
- }
-
- em_folder_tree_model_remove_folders (model, si, &iter);
-}
-
-static void
-folder_created_cb (CamelStore *store, void *event_data, EMFolderTreeModel *model)
-{
- /* we only want created events to do more work if we don't support subscriptions */
- if (!camel_store_supports_subscriptions (store))
- folder_subscribed_cb (store, event_data, model);
-}
-
-static void
-folder_deleted_cb (CamelStore *store, void *event_data, EMFolderTreeModel *model)
-{
- /* we only want deleted events to do more work if we don't support subscriptions */
- if (!camel_store_supports_subscriptions (store))
- folder_unsubscribed_cb (store, event_data, model);
-}
-
-static void
-folder_renamed_cb (CamelStore *store, void *event_data, EMFolderTreeModel *model)
-{
- struct _EMFolderTreeModelStoreInfo *si;
- CamelRenameInfo *info = event_data;
- GtkTreeRowReference *row;
- GtkTreeIter root, iter;
- GtkTreePath *path;
- char *parent, *p;
-
- if (!(si = g_hash_table_lookup (model->store_hash, store)))
- return;
-
- parent = g_strdup_printf ("/%s", info->old_base);
- if (!(row = g_hash_table_lookup (si->path_hash, parent))) {
- g_free (parent);
- return;
- }
- g_free (parent);
-
- path = gtk_tree_row_reference_get_path (row);
- if (!(gtk_tree_model_get_iter ((GtkTreeModel *) model, &iter, path))) {
- gtk_tree_path_free (path);
- return;
- }
-
- em_folder_tree_model_remove_folders (model, si, &iter);
-
- parent = g_strdup (info->new->path);
- if ((p = strrchr (parent + 1, '/')))
- *p = '\0';
-
- if (!strcmp (parent, "/")) {
- /* renamed to a toplevel folder on the store */
- path = gtk_tree_row_reference_get_path (si->row);
- } else {
- if (!(row = g_hash_table_lookup (si->path_hash, parent))) {
- /* NOTE: this should never happen, but I
- * suppose if it does in reality, we can add
- * code here to add the missing nodes to the
- * tree */
- g_assert_not_reached ();
- g_free (parent);
- return;
- }
-
- path = gtk_tree_row_reference_get_path (row);
- }
-
- g_free (parent);
-
- if (!gtk_tree_model_get_iter ((GtkTreeModel *) model, &root, path)) {
- gtk_tree_path_free (path);
- g_assert_not_reached ();
- return;
- }
-
- gtk_tree_store_append ((GtkTreeStore *) model, &iter, &root);
- em_folder_tree_model_set_folder_info (model, &iter, si, info->new);
-}
-
-
-void
-em_folder_tree_model_add_store (EMFolderTreeModel *model, CamelStore *store, const char *display_name)
-{
- struct _EMFolderTreeModelStoreInfo *si;
- GtkTreeRowReference *row;
- GtkTreeIter root, iter;
- GtkTreePath *path;
- char *uri;
-
- g_return_if_fail (EM_IS_FOLDER_TREE_MODEL (model));
- g_return_if_fail (CAMEL_IS_STORE (store));
- g_return_if_fail (display_name != NULL);
-
- if ((si = g_hash_table_lookup (model->store_hash, store))) {
- const char *name;
-
- path = gtk_tree_row_reference_get_path (si->row);
- gtk_tree_model_get_iter ((GtkTreeModel *) model, &iter, path);
- gtk_tree_path_free (path);
-
- gtk_tree_model_get ((GtkTreeModel *) model, &iter, COL_STRING_DISPLAY_NAME, (char **) &name, -1);
-
- g_warning ("the store `%s' is already in the folder tree as `%s'",
- display_name, name);
-
- return;
- }
-
- uri = camel_url_to_string (((CamelService *) store)->url, CAMEL_URL_HIDE_ALL);
-
- /* add the store to the tree */
- gtk_tree_store_append ((GtkTreeStore *) model, &iter, NULL);
- gtk_tree_store_set ((GtkTreeStore *) model, &iter,
- COL_STRING_DISPLAY_NAME, display_name,
- COL_POINTER_CAMEL_STORE, store,
- COL_STRING_FOLDER_PATH, "/",
- COL_BOOL_LOAD_SUBDIRS, TRUE,
- COL_BOOL_IS_STORE, TRUE,
- COL_STRING_URI, uri, -1);
-
- path = gtk_tree_model_get_path ((GtkTreeModel *) model, &iter);
- row = gtk_tree_row_reference_new ((GtkTreeModel *) model, path);
- gtk_tree_path_free (path);
-
- si = g_new (struct _EMFolderTreeModelStoreInfo, 1);
- si->display_name = g_strdup (display_name);
- camel_object_ref (store);
- si->store = store;
- si->row = row;
- si->path_hash = g_hash_table_new (g_str_hash, g_str_equal);
- g_hash_table_insert (model->store_hash, store, si);
-
- /* each store has folders... but we don't load them until the user demands them */
- root = iter;
- gtk_tree_store_append ((GtkTreeStore *) model, &iter, &root);
- gtk_tree_store_set ((GtkTreeStore *) model, &iter,
- COL_STRING_DISPLAY_NAME, _("Loading..."),
- COL_POINTER_CAMEL_STORE, NULL,
- COL_STRING_FOLDER_PATH, NULL,
- COL_BOOL_LOAD_SUBDIRS, FALSE,
- COL_BOOL_IS_STORE, FALSE,
- COL_STRING_URI, NULL,
- COL_UINT_UNREAD, 0,
- -1);
-
- g_free (uri);
-
- /* listen to store events */
-#define CAMEL_CALLBACK(func) ((CamelObjectEventHookFunc) func)
- si->created_id = camel_object_hook_event (store, "folder_created", CAMEL_CALLBACK (folder_created_cb), model);
- si->deleted_id = camel_object_hook_event (store, "folder_deleted", CAMEL_CALLBACK (folder_deleted_cb), model);
- si->renamed_id = camel_object_hook_event (store, "folder_renamed", CAMEL_CALLBACK (folder_renamed_cb), model);
- si->subscribed_id = camel_object_hook_event (store, "folder_subscribed", CAMEL_CALLBACK (folder_subscribed_cb), model);
- si->unsubscribed_id = camel_object_hook_event (store, "folder_unsubscribed", CAMEL_CALLBACK (folder_unsubscribed_cb), model);
-}
-
-
-static void
-em_folder_tree_model_remove_uri (EMFolderTreeModel *model, const char *uri)
-{
- GtkTreeRowReference *row;
-
- g_return_if_fail (EM_IS_FOLDER_TREE_MODEL (model));
- g_return_if_fail (uri != NULL);
-
- if ((row = g_hash_table_lookup (model->uri_hash, uri))) {
- g_hash_table_remove (model->uri_hash, uri);
- gtk_tree_row_reference_free (row);
- }
-}
-
-
-static void
-em_folder_tree_model_remove_store_info (EMFolderTreeModel *model, CamelStore *store)
-{
- struct _EMFolderTreeModelStoreInfo *si;
-
- g_return_if_fail (EM_IS_FOLDER_TREE_MODEL (model));
- g_return_if_fail (CAMEL_IS_STORE (store));
-
- if (!(si = g_hash_table_lookup (model->store_hash, store)))
- return;
-
- g_hash_table_remove (model->store_hash, si->store);
- store_info_free (si);
-}
-
-
-void
-em_folder_tree_model_remove_folders (EMFolderTreeModel *model, struct _EMFolderTreeModelStoreInfo *si, GtkTreeIter *toplevel)
-{
- GtkTreeRowReference *row;
- char *uri, *folder_path;
- gboolean is_store, go;
- GtkTreeIter iter;
-
- if (gtk_tree_model_iter_children ((GtkTreeModel *) model, &iter, toplevel)) {
- do {
- GtkTreeIter next = iter;
-
- go = gtk_tree_model_iter_next ((GtkTreeModel *) model, &next);
- em_folder_tree_model_remove_folders (model, si, &iter);
- iter = next;
- } while (go);
- }
-
- gtk_tree_model_get ((GtkTreeModel *) model, toplevel, COL_STRING_URI, &uri,
- COL_STRING_FOLDER_PATH, &folder_path,
- COL_BOOL_IS_STORE, &is_store, -1);
-
- if (folder_path && (row = g_hash_table_lookup (si->path_hash, folder_path))) {
- g_hash_table_remove (si->path_hash, folder_path);
- gtk_tree_row_reference_free (row);
- }
-
- em_folder_tree_model_remove_uri (model, uri);
-
- gtk_tree_store_remove ((GtkTreeStore *) model, toplevel);
-
- if (is_store)
- em_folder_tree_model_remove_store_info (model, si->store);
-}
-
-
-void
-em_folder_tree_model_remove_store (EMFolderTreeModel *model, CamelStore *store)
-{
- struct _EMFolderTreeModelStoreInfo *si;
- GtkTreePath *path;
- GtkTreeIter iter;
-
- g_return_if_fail (EM_IS_FOLDER_TREE_MODEL (model));
- g_return_if_fail (CAMEL_IS_STORE (store));
-
- if (!(si = g_hash_table_lookup (model->store_hash, store))) {
- g_warning ("the store `%s' is not in the folder tree", si->display_name);
-
- return;
- }
-
- path = gtk_tree_row_reference_get_path (si->row);
- gtk_tree_model_get_iter ((GtkTreeModel *) model, &iter, path);
- gtk_tree_path_free (path);
-
- /* recursively remove subfolders and finally the toplevel store */
- em_folder_tree_model_remove_folders (model, si, &iter);
-}
-
-
-gboolean
-em_folder_tree_model_get_expanded (EMFolderTreeModel *model, const char *key)
-{
- if (g_hash_table_lookup (model->expanded, key))
- return TRUE;
-
- return FALSE;
-}
-
-
-void
-em_folder_tree_model_set_expanded (EMFolderTreeModel *model, const char *key, gboolean expanded)
-{
- gpointer okey, oval;
-
- if (g_hash_table_lookup_extended (model->expanded, key, &okey, &oval)) {
- g_hash_table_remove (model->expanded, okey);
- g_free (okey);
- }
-
- if (expanded)
- g_hash_table_insert (model->expanded, g_strdup (key), GINT_TO_POINTER (TRUE));
-}
-
-
-static void
-expanded_save (gpointer key, gpointer value, FILE *fp)
-{
- /* FIXME: don't save stale entries */
- if (!GPOINTER_TO_INT (value))
- return;
-
- camel_file_util_encode_string (fp, key);
-}
-
-void
-em_folder_tree_model_save_expanded (EMFolderTreeModel *model)
-{
- char *dirname, *tmpname;
- FILE *fp;
- int fd;
-
- dirname = g_path_get_dirname (model->filename);
- if (camel_mkdir (dirname, 0777) == -1 && errno != EEXIST) {
- g_free (dirname);
- return;
- }
-
- g_free (dirname);
- tmpname = g_strdup_printf ("%s~", model->filename);
-
- if (!(fp = fopen (tmpname, "w+"))) {
- g_free (tmpname);
- return;
- }
-
- g_hash_table_foreach (model->expanded, (GHFunc) expanded_save, fp);
-
- if (fflush (fp) != 0)
- goto exception;
-
- if ((fd = fileno (fp)) == -1)
- goto exception;
-
- if (fsync (fd) == -1)
- goto exception;
-
- fclose (fp);
- fp = NULL;
-
- if (rename (tmpname, model->filename) == -1)
- goto exception;
-
- g_free (tmpname);
-
- return;
-
- exception:
-
- if (fp != NULL)
- fclose (fp);
-
- unlink (tmpname);
- g_free (tmpname);
-}
diff --git a/mail/em-folder-tree-model.h b/mail/em-folder-tree-model.h
deleted file mode 100644
index 3296af1ed1..0000000000
--- a/mail/em-folder-tree-model.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 2003 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 __EM_FOLDER_TREE_MODEL_H__
-#define __EM_FOLDER_TREE_MODEL_H__
-
-#include <gtk/gtktreednd.h>
-#include <gtk/gtktreestore.h>
-
-#include <camel/camel-store.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#define EM_TYPE_FOLDER_TREE_MODEL (em_folder_tree_model_get_type ())
-#define EM_FOLDER_TREE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EM_TYPE_FOLDER_TREE_MODEL, EMFolderTreeModel))
-#define EM_FOLDER_TREE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EM_TYPE_FOLDER_TREE_MODEL, EMFolderTreeModelClass))
-#define EM_IS_FOLDER_TREE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EM_TYPE_FOLDER_TREE_MODEL))
-#define EM_IS_FOLDER_TREE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EM_TYPE_FOLDER_TREE_MODEL))
-#define EM_FOLDER_TREE_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EM_TYPE_FOLDER_TREE_MODEL, EMFolderTreeModelClass))
-
-typedef struct _EMFolderTreeModel EMFolderTreeModel;
-typedef struct _EMFolderTreeModelClass EMFolderTreeModelClass;
-typedef struct _EMFolderTreeModelStoreInfo EMFolderTreeModelStoreInfo;
-
-enum {
- COL_STRING_DISPLAY_NAME, /* string that appears in the tree */
- COL_POINTER_CAMEL_STORE, /* CamelStore object */
- COL_STRING_FOLDER_PATH, /* if node is a folder, the full path of the folder */
- COL_STRING_URI, /* the uri to get the store or
- * folder object */
- COL_UINT_UNREAD, /* unread count */
-
- COL_BOOL_IS_STORE, /* toplevel store node? */
- COL_BOOL_LOAD_SUBDIRS, /* %TRUE only if the store/folder
- * has subfolders which have not yet
- * been added to the tree */
- NUM_COLUMNS
-};
-
-
-struct _EMFolderTreeModelStoreInfo {
- CamelStore *store;
- GtkTreeRowReference *row;
- GHashTable *path_hash; /* maps CamelFolderInfo::path's to GtkTreeRowReferences */
-
- char *display_name;
-
- unsigned int created_id;
- unsigned int deleted_id;
- unsigned int renamed_id;
- unsigned int subscribed_id;
- unsigned int unsubscribed_id;
-};
-
-struct _EMFolderTreeModel {
- GtkTreeStore parent_object;
-
- char *filename; /* state filename */
-
- GHashTable *store_hash; /* maps CamelStore's to store-info's */
- GHashTable *uri_hash; /* maps URI's to GtkTreeRowReferences */
- GHashTable *expanded; /* saved expanded state from previous session */
-};
-
-struct _EMFolderTreeModelClass {
- GtkTreeStoreClass parent_class;
-
- /* signals */
- void (* loading_row) (EMFolderTreeModel *model,
- GtkTreePath *path,
- GtkTreeIter *iter);
-};
-
-
-GType em_folder_tree_model_get_type (void);
-
-
-EMFolderTreeModel *em_folder_tree_model_new (const char *evolution_dir);
-
-
-void em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, GtkTreeIter *iter,
- struct _EMFolderTreeModelStoreInfo *si,
- CamelFolderInfo *fi);
-
-void em_folder_tree_model_add_store (EMFolderTreeModel *model, CamelStore *store, const char *display_name);
-void em_folder_tree_model_remove_store (EMFolderTreeModel *model, CamelStore *store);
-void em_folder_tree_model_remove_folders (EMFolderTreeModel *model, struct _EMFolderTreeModelStoreInfo *si,
- GtkTreeIter *toplevel);
-
-gboolean em_folder_tree_model_get_expanded (EMFolderTreeModel *model, const char *key);
-void em_folder_tree_model_set_expanded (EMFolderTreeModel *model, const char *key, gboolean expanded);
-void em_folder_tree_model_save_expanded (EMFolderTreeModel *model);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __EM_FOLDER_TREE_MODEL_H__ */
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
deleted file mode 100644
index 23f4a88a5c..0000000000
--- a/mail/em-folder-tree.c
+++ /dev/null
@@ -1,1710 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2003 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 <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-
-#include <gtk/gtk.h>
-#include <gdk-pixbuf/gdk-pixbuf.h>
-
-#include <camel/camel-session.h>
-#include <camel/camel-store.h>
-#include <camel/camel-folder.h>
-#include <camel/camel-vtrash-folder.h>
-#include <camel/camel-stream-mem.h>
-#include <camel/camel-file-utils.h>
-
-#include "e-util/e-mktemp.h"
-#include "e-util/e-request.h"
-#include "e-util/e-dialog-utils.h"
-
-#include "mail-mt.h"
-#include "mail-ops.h"
-#include "mail-tools.h"
-#include "mail-config.h"
-#include "mail-component.h"
-
-#include "em-utils.h"
-#include "em-popup.h"
-#include "em-marshal.h"
-#include "em-folder-tree.h"
-#include "em-folder-selector.h"
-#include "em-folder-selection.h"
-
-
-#define d(x) x
-
-
-struct _EMFolderTreePrivate {
- GtkTreeView *treeview;
- EMFolderTreeModel *model;
-
- char *selected_uri;
- char *selected_path;
-
- guint save_state_id;
-
- guint loading_row_id;
-};
-
-enum {
- FOLDER_SELECTED,
- LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-/* Drag & Drop types */
-enum DndDragType {
- DND_DRAG_TYPE_FOLDER, /* drag an evo folder */
- DND_DRAG_TYPE_TEXT_URI_LIST, /* drag to an mbox file */
-};
-
-enum DndDropType {
- DND_DROP_TYPE_UID_LIST, /* drop a list of message uids */
- DND_DROP_TYPE_FOLDER, /* drop an evo folder */
- DND_DROP_TYPE_MESSAGE_RFC822, /* drop a message/rfc822 stream */
- DND_DROP_TYPE_TEXT_URI_LIST, /* drop an mbox file */
-};
-
-static GtkTargetEntry drag_types[] = {
- { "x-folder", 0, DND_DRAG_TYPE_FOLDER },
- { "text/uri-list", 0, DND_DRAG_TYPE_TEXT_URI_LIST },
-};
-
-static const int num_drag_types = sizeof (drag_types) / sizeof (drag_types[0]);
-
-static GtkTargetEntry drop_types[] = {
- { "x-uid-list" , 0, DND_DROP_TYPE_UID_LIST },
- { "x-folder", 0, DND_DROP_TYPE_FOLDER },
- { "message/rfc822", 0, DND_DROP_TYPE_MESSAGE_RFC822 },
- { "text/uri-list", 0, DND_DROP_TYPE_TEXT_URI_LIST },
-};
-
-static const int num_drop_types = sizeof (drop_types) / sizeof (drop_types[0]);
-
-
-extern CamelSession *session;
-
-
-static void em_folder_tree_class_init (EMFolderTreeClass *klass);
-static void em_folder_tree_init (EMFolderTree *emft);
-static void em_folder_tree_destroy (GtkObject *obj);
-static void em_folder_tree_finalize (GObject *obj);
-
-static gboolean em_folder_tree_save_state (EMFolderTree *emft);
-static void em_folder_tree_queue_save_state (EMFolderTree *emft);
-
-static void tree_row_collapsed (GtkTreeView *treeview, GtkTreeIter *root, GtkTreePath *path, EMFolderTree *emft);
-static void tree_row_expanded (GtkTreeView *treeview, GtkTreeIter *root, GtkTreePath *path, EMFolderTree *emft);
-static gboolean tree_button_press (GtkWidget *treeview, GdkEventButton *event, EMFolderTree *emft);
-static void tree_selection_changed (GtkTreeSelection *selection, EMFolderTree *emft);
-
-
-static GtkVBoxClass *parent_class = NULL;
-
-
-GType
-em_folder_tree_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (EMFolderTreeClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) em_folder_tree_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EMFolderTree),
- 0, /* n_preallocs */
- (GInstanceInitFunc) em_folder_tree_init,
- };
-
- type = g_type_register_static (GTK_TYPE_VBOX, "EMFolderTree", &info, 0);
- }
-
- return type;
-}
-
-static void
-em_folder_tree_class_init (EMFolderTreeClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_ref (GTK_TYPE_VBOX);
-
- object_class->finalize = em_folder_tree_finalize;
- gtk_object_class->destroy = em_folder_tree_destroy;
-
- signals[FOLDER_SELECTED] =
- g_signal_new ("folder-selected",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (EMFolderTreeClass, folder_selected),
- NULL, NULL,
- em_marshal_VOID__STRING_STRING,
- G_TYPE_NONE, 2,
- G_TYPE_STRING,
- G_TYPE_STRING);
-}
-
-
-static gboolean
-subdirs_contain_unread (GtkTreeModel *model, GtkTreeIter *root)
-{
- unsigned int unread;
- GtkTreeIter iter;
-
- if (!gtk_tree_model_iter_children (model, &iter, root))
- return FALSE;
-
- do {
- gtk_tree_model_get (model, &iter, COL_UINT_UNREAD, &unread, -1);
- if (unread)
- return TRUE;
-
- if (gtk_tree_model_iter_has_child (model, &iter))
- if (subdirs_contain_unread (model, &iter))
- return TRUE;
- } while (gtk_tree_model_iter_next (model, &iter));
-
- return FALSE;
-}
-
-
-enum {
- FOLDER_ICON_NORMAL,
- FOLDER_ICON_INBOX,
- FOLDER_ICON_OUTBOX,
- FOLDER_ICON_TRASH,
- FOLDER_ICON_JUNK,
- FOLDER_ICON_LAST
-};
-
-static GdkPixbuf *folder_icons[FOLDER_ICON_LAST];
-
-static void
-render_pixbuf (GtkTreeViewColumn *column, GtkCellRenderer *renderer,
- GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data)
-{
- static gboolean initialised = FALSE;
- GdkPixbuf *pixbuf = NULL;
- gboolean is_store;
- char *path;
-
- if (!initialised) {
- folder_icons[FOLDER_ICON_NORMAL] = gdk_pixbuf_new_from_file (EVOLUTION_ICONSDIR "/folder-mini.png", NULL);
- folder_icons[FOLDER_ICON_INBOX] = gdk_pixbuf_new_from_file (EVOLUTION_ICONSDIR "/inbox-mini.png", NULL);
- folder_icons[FOLDER_ICON_OUTBOX] = gdk_pixbuf_new_from_file (EVOLUTION_ICONSDIR "/outbox-mini.png", NULL);
- folder_icons[FOLDER_ICON_TRASH] = gdk_pixbuf_new_from_file (EVOLUTION_ICONSDIR "/evolution-trash-mini.png", NULL);
- folder_icons[FOLDER_ICON_JUNK] = gdk_pixbuf_new_from_file (EVOLUTION_ICONSDIR "/evolution-junk-mini.png", NULL);
- initialised = TRUE;
- }
-
- gtk_tree_model_get (model, iter, COL_STRING_FOLDER_PATH, &path,
- COL_BOOL_IS_STORE, &is_store, -1);
-
- if (!is_store && path != NULL) {
- if (!strcasecmp (path, "/Inbox"))
- pixbuf = folder_icons[FOLDER_ICON_INBOX];
- else if (!strcasecmp (path, "/Outbox"))
- pixbuf = folder_icons[FOLDER_ICON_OUTBOX];
- else if (*path == '/' && !strcasecmp (path + 1, CAMEL_VTRASH_NAME))
- pixbuf = folder_icons[FOLDER_ICON_TRASH];
- else if (*path == '/' && !strcasecmp (path + 1, CAMEL_VJUNK_NAME))
- pixbuf = folder_icons[FOLDER_ICON_JUNK];
- else
- pixbuf = folder_icons[FOLDER_ICON_NORMAL];
- }
-
- g_object_set (renderer, "pixbuf", pixbuf, "visible", !is_store, NULL);
-}
-
-static void
-render_display_name (GtkTreeViewColumn *column, GtkCellRenderer *renderer,
- GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data)
-{
- gboolean is_store, bold;
- unsigned int unread;
- char *display;
- char *name;
-
- gtk_tree_model_get (model, iter, COL_STRING_DISPLAY_NAME, &name,
- COL_BOOL_IS_STORE, &is_store,
- COL_UINT_UNREAD, &unread, -1);
-
- if (!(bold = is_store || unread)) {
- if (gtk_tree_model_iter_has_child (model, iter))
- bold = subdirs_contain_unread (model, iter);
- }
-
- if (!is_store && unread)
- display = g_strdup_printf ("%s (%u)", name, unread);
- else
- display = g_strdup (name);
-
- g_object_set (renderer, "text", display,
- "weight", bold ? PANGO_WEIGHT_BOLD : PANGO_WEIGHT_NORMAL,
- NULL);
-
- g_free (display);
-}
-
-static void
-em_folder_tree_init (EMFolderTree *emft)
-{
- struct _EMFolderTreePrivate *priv;
-
- priv = g_new0 (struct _EMFolderTreePrivate, 1);
- priv->selected_uri = NULL;
- priv->selected_path = NULL;
- priv->treeview = NULL;
- priv->model = NULL;
- emft->priv = priv;
-}
-
-static void
-em_folder_tree_finalize (GObject *obj)
-{
- EMFolderTree *emft = (EMFolderTree *) obj;
-
- g_free (emft->priv->selected_uri);
- g_free (emft->priv->selected_path);
- g_free (emft->priv);
-
- G_OBJECT_CLASS (parent_class)->finalize (obj);
-}
-
-static void
-em_folder_tree_destroy (GtkObject *obj)
-{
- EMFolderTree *emft = (EMFolderTree *) obj;
- struct _EMFolderTreePrivate *priv = emft->priv;
-
- if (priv->loading_row_id != 0) {
- g_signal_handler_disconnect (priv->model, priv->loading_row_id);
- priv->loading_row_id = 0;
- }
-
- if (priv->save_state_id != 0) {
- g_source_remove (priv->save_state_id);
- em_folder_tree_save_state (emft);
- }
-
- priv->treeview = NULL;
- priv->model = NULL;
-
- GTK_OBJECT_CLASS (parent_class)->destroy (obj);
-}
-
-
-static GtkTreeView *
-folder_tree_new (EMFolderTreeModel *model)
-{
- GtkTreeSelection *selection;
- GtkTreeViewColumn *column;
- GtkCellRenderer *renderer;
- GtkWidget *tree;
-
- tree = gtk_tree_view_new_with_model ((GtkTreeModel *) model);
-
- column = gtk_tree_view_column_new ();
- gtk_tree_view_append_column ((GtkTreeView *) tree, column);
-
- renderer = gtk_cell_renderer_pixbuf_new ();
- gtk_tree_view_column_pack_start (column, renderer, FALSE);
- gtk_tree_view_column_set_cell_data_func (column, renderer, render_pixbuf, NULL, NULL);
-
- renderer = gtk_cell_renderer_text_new ();
- gtk_tree_view_column_pack_start (column, renderer, TRUE);
- gtk_tree_view_column_set_cell_data_func (column, renderer, render_display_name, NULL, NULL);
-
- selection = gtk_tree_view_get_selection ((GtkTreeView *) tree);
- gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
-
- gtk_tree_view_set_headers_visible ((GtkTreeView *) tree, FALSE);
-
- return (GtkTreeView *) tree;
-}
-
-static void
-em_folder_tree_construct (EMFolderTree *emft, EMFolderTreeModel *model)
-{
- struct _EMFolderTreePrivate *priv = emft->priv;
- GtkTreeSelection *selection;
- GtkWidget *scrolled;
-
- scrolled = gtk_scrolled_window_new (NULL, NULL);
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled),
- GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
- gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled), GTK_SHADOW_IN);
-
- priv->model = model;
- priv->treeview = folder_tree_new (model);
- gtk_widget_show ((GtkWidget *) priv->treeview);
-
- g_signal_connect (priv->treeview, "row-expanded", G_CALLBACK (tree_row_expanded), emft);
- g_signal_connect (priv->treeview, "row-collapsed", G_CALLBACK (tree_row_collapsed), emft);
- g_signal_connect (priv->treeview, "button-press-event", G_CALLBACK (tree_button_press), emft);
-
- selection = gtk_tree_view_get_selection ((GtkTreeView *) priv->treeview);
- g_signal_connect (selection, "changed", G_CALLBACK (tree_selection_changed), emft);
-
- gtk_container_add ((GtkContainer *) scrolled, (GtkWidget *) priv->treeview);
- gtk_widget_show (scrolled);
-
- gtk_box_pack_start ((GtkBox *) emft, scrolled, TRUE, TRUE, 0);
-}
-
-
-GtkWidget *
-em_folder_tree_new (void)
-{
- EMFolderTreeModel *model;
- EMFolderTree *emft;
-
- model = em_folder_tree_model_new (mail_component_peek_base_directory (mail_component_peek ()));
- emft = (EMFolderTree *) em_folder_tree_new_with_model (model);
- g_object_unref (model);
-
- return (GtkWidget *) emft;
-}
-
-
-struct _gsbn {
- struct _EMFolderTreeModelStoreInfo *si;
- const char *name;
-};
-
-static void
-get_store_by_name (CamelStore *store, struct _EMFolderTreeModelStoreInfo *si, struct _gsbn *gsbn)
-{
- if (!strcmp (si->display_name, gsbn->name))
- gsbn->si = si;
-}
-
-static void
-expand_node (const char *key, gpointer value, EMFolderTree *emft)
-{
- struct _EMFolderTreePrivate *priv = emft->priv;
- struct _EMFolderTreeModelStoreInfo *si;
- GtkTreeRowReference *row;
- GtkTreePath *path;
- EAccount *account;
- const char *p;
- char *id;
-
- if (!(p = strchr (key, ':')))
- return;
-
- id = g_strndup (key, p - key);
- if ((account = mail_config_get_account_by_uid (id))) {
- CamelException ex;
- CamelStore *store;
-
- camel_exception_init (&ex);
- store = (CamelStore *) camel_session_get_service (session, account->source->url, CAMEL_PROVIDER_STORE, &ex);
- camel_exception_clear (&ex);
-
- if (store == NULL || !(si = g_hash_table_lookup (priv->model->store_hash, store))) {
- if (store)
- camel_object_unref (store);
- g_free (id);
- return;
- }
- } else {
- struct _gsbn gsbn;
-
- gsbn.si = NULL;
- gsbn.name = id;
-
- g_hash_table_foreach (priv->model->store_hash, (GHFunc) get_store_by_name, &gsbn);
- if (!(si = gsbn.si)) {
- g_free (id);
- return;
- }
- }
-
- g_free (id);
-
- p++;
- if (!strcmp (p, "/"))
- row = si->row;
- else if (!(row = g_hash_table_lookup (si->path_hash, p)))
- return;
-
- path = gtk_tree_row_reference_get_path (row);
- gtk_tree_view_expand_to_path (priv->treeview, path);
- gtk_tree_path_free (path);
-}
-
-
-static void
-loading_row_cb (EMFolderTreeModel *model, GtkTreePath *tree_path, GtkTreeIter *iter, EMFolderTree *emft)
-{
- struct _EMFolderTreeModelStoreInfo *si;
- CamelStore *store;
- EAccount *account;
- char *path, *key;
-
- gtk_tree_model_get ((GtkTreeModel *) model, iter,
- COL_STRING_FOLDER_PATH, &path,
- COL_POINTER_CAMEL_STORE, &store,
- -1);
-
- si = g_hash_table_lookup (model->store_hash, store);
- if ((account = mail_config_get_account_by_name (si->display_name))) {
- key = g_strdup_printf ("%s:%s", account->uid, path);
- } else {
- key = g_strdup_printf ("%s:%s", si->display_name, path);
- }
-
- if (em_folder_tree_model_get_expanded (model, key))
- gtk_tree_view_expand_to_path (emft->priv->treeview, tree_path);
-
- g_free (key);
-}
-
-
-GtkWidget *
-em_folder_tree_new_with_model (EMFolderTreeModel *model)
-{
- EMFolderTree *emft;
-
- emft = g_object_new (EM_TYPE_FOLDER_TREE, NULL);
- em_folder_tree_construct (emft, model);
- g_object_ref (model);
-
- /* FIXME: this sucks... */
- g_hash_table_foreach (model->expanded, (GHFunc) expand_node, emft);
-
- emft->priv->loading_row_id = g_signal_connect (model, "loading-row", G_CALLBACK (loading_row_cb), emft);
-
- return (GtkWidget *) emft;
-}
-
-
-void
-em_folder_tree_enable_drag_and_drop (EMFolderTree *emft)
-{
- struct _EMFolderTreePrivate *priv;
-
- g_return_if_fail (EM_IS_FOLDER_TREE (emft));
-
- priv = emft->priv;
- gtk_tree_view_enable_model_drag_source (priv->treeview, 0, drag_types, num_drag_types,
- GDK_ACTION_COPY | GDK_ACTION_MOVE);
- gtk_tree_view_enable_model_drag_dest (priv->treeview, drop_types, num_drop_types,
- GDK_ACTION_COPY | GDK_ACTION_MOVE);
-}
-
-
-#if 0
-static void
-dump_fi (CamelFolderInfo *fi, int depth)
-{
- int i;
-
- while (fi != NULL) {
- for (i = 0; i < depth; i++)
- fputs (" ", stdout);
-
- printf ("path='%s'; full_name='%s'\n", fi->path, fi->full_name);
-
- if (fi->child)
- dump_fi (fi->child, depth + 1);
-
- fi = fi->sibling;
- }
-}
-#endif
-
-struct _EMFolderTreeGetFolderInfo {
- struct _mail_msg msg;
-
- /* input data */
- GtkTreeRowReference *root;
- EMFolderTree *emft;
- CamelStore *store;
- guint32 flags;
- char *top;
-
- /* output data */
- CamelFolderInfo *fi;
-
- /* uri to select if any after the op is done */
- char *select_uri;
-};
-
-static void
-em_folder_tree_get_folder_info__get (struct _mail_msg *mm)
-{
- struct _EMFolderTreeGetFolderInfo *m = (struct _EMFolderTreeGetFolderInfo *) mm;
- guint32 flags = m->flags;
-
- if (camel_store_supports_subscriptions (m->store))
- flags |= CAMEL_STORE_FOLDER_INFO_SUBSCRIBED;
-
- m->fi = camel_store_get_folder_info (m->store, m->top, flags, &mm->ex);
-}
-
-static void
-em_folder_tree_get_folder_info__got (struct _mail_msg *mm)
-{
- struct _EMFolderTreeGetFolderInfo *m = (struct _EMFolderTreeGetFolderInfo *) mm;
- struct _EMFolderTreePrivate *priv = m->emft->priv;
- struct _EMFolderTreeModelStoreInfo *si;
- GtkTreeIter root, iter;
- CamelFolderInfo *fi;
- GtkTreeStore *model;
- GtkTreePath *path;
- gboolean load;
-
- /* check that we haven't been destroyed */
- if (priv->treeview == NULL)
- return;
-
- /* check that our parent folder hasn't been deleted/unsubscribed */
- if (!gtk_tree_row_reference_valid (m->root))
- return;
-
- if (!(si = g_hash_table_lookup (priv->model->store_hash, m->store))) {
- /* store has been removed in the interim - do nothing */
- return;
- }
-
- model = (GtkTreeStore *) gtk_tree_view_get_model (priv->treeview);
-
- path = gtk_tree_row_reference_get_path (m->root);
- gtk_tree_model_get_iter ((GtkTreeModel *) model, &root, path);
- gtk_tree_path_free (path);
-
- /* make sure we still need to load the tree subfolders... */
- gtk_tree_model_get ((GtkTreeModel *) model, &root,
- COL_BOOL_LOAD_SUBDIRS, &load,
- -1);
- if (!load)
- return;
-
- /* get the first child (which will be a dummy node) */
- gtk_tree_model_iter_children ((GtkTreeModel *) model, &iter, &root);
-
- /* FIXME: camel's IMAP code is totally on crack here, @top's
- * folder info should be @fi and fi->child should be what we
- * want to fill our tree with... *sigh* */
- if (m->top && !strcmp (m->fi->full_name, m->top)) {
- if (!(fi = m->fi->child))
- fi = m->fi->sibling;
- } else
- fi = m->fi;
-
- if (fi == NULL) {
- /* no children afterall... remove the "Loading..." placeholder node */
- gtk_tree_store_remove (model, &iter);
- } else {
- do {
- em_folder_tree_model_set_folder_info (priv->model, &iter, si, fi);
-
- if ((fi = fi->sibling) != NULL)
- gtk_tree_store_append (model, &iter, &root);
- } while (fi != NULL);
- }
-
- gtk_tree_store_set (model, &root, COL_BOOL_LOAD_SUBDIRS, FALSE, -1);
-
- if (m->select_uri)
- em_folder_tree_set_selected (m->emft, m->select_uri);
-
- em_folder_tree_queue_save_state (m->emft);
-}
-
-static void
-em_folder_tree_get_folder_info__free (struct _mail_msg *mm)
-{
- struct _EMFolderTreeGetFolderInfo *m = (struct _EMFolderTreeGetFolderInfo *) mm;
-
- camel_store_free_folder_info (m->store, m->fi);
-
- gtk_tree_row_reference_free (m->root);
- camel_object_unref (m->store);
- g_free (m->select_uri);
- g_free (m->top);
-}
-
-static struct _mail_msg_op get_folder_info_op = {
- NULL,
- em_folder_tree_get_folder_info__get,
- em_folder_tree_get_folder_info__got,
- em_folder_tree_get_folder_info__free,
-};
-
-static void
-update_model_expanded_state (struct _EMFolderTreePrivate *priv, GtkTreeIter *iter, gboolean expanded)
-{
- struct _EMFolderTreeModelStoreInfo *si;
- CamelStore *store;
- EAccount *account;
- char *path, *key;
-
- gtk_tree_model_get ((GtkTreeModel *) priv->model, iter,
- COL_STRING_FOLDER_PATH, &path,
- COL_POINTER_CAMEL_STORE, &store,
- -1);
-
- si = g_hash_table_lookup (priv->model->store_hash, store);
- if ((account = mail_config_get_account_by_name (si->display_name))) {
- key = g_strdup_printf ("%s:%s", account->uid, path);
- } else {
- key = g_strdup_printf ("%s:%s", si->display_name, path);
- }
-
- em_folder_tree_model_set_expanded (priv->model, key, expanded);
- g_free (key);
-}
-
-static void
-tree_row_expanded (GtkTreeView *treeview, GtkTreeIter *root, GtkTreePath *tree_path, EMFolderTree *emft)
-{
- struct _EMFolderTreePrivate *priv = emft->priv;
- struct _EMFolderTreeGetFolderInfo *m;
- GtkTreeModel *model;
- CamelStore *store;
- const char *top;
- gboolean load;
- char *path;
-
- model = gtk_tree_view_get_model (treeview);
-
- gtk_tree_model_get (model, root,
- COL_STRING_FOLDER_PATH, &path,
- COL_POINTER_CAMEL_STORE, &store,
- COL_BOOL_LOAD_SUBDIRS, &load,
- -1);
-
- update_model_expanded_state (priv, root, TRUE);
-
- if (!load) {
- em_folder_tree_queue_save_state (emft);
- return;
- }
-
- if (!path || !strcmp (path, "/"))
- top = NULL;
- else
- top = path + 1;
-
- m = mail_msg_new (&get_folder_info_op, NULL, sizeof (struct _EMFolderTreeGetFolderInfo));
- m->root = gtk_tree_row_reference_new (model, tree_path);
- camel_object_ref (store);
- m->store = store;
- m->emft = emft;
- m->top = g_strdup (top);
- m->flags = 0;
- m->select_uri = NULL;
-
- e_thread_put (mail_thread_new, (EMsg *) m);
-}
-
-static void
-tree_row_collapsed (GtkTreeView *treeview, GtkTreeIter *root, GtkTreePath *tree_path, EMFolderTree *emft)
-{
- update_model_expanded_state (emft->priv, root, FALSE);
- em_folder_tree_queue_save_state (emft);
-}
-
-#if 0
-static void
-emft_popup_view (GtkWidget *item, EMFolderTree *emft)
-{
-
-}
-
-static void
-emft_popup_open_new (GtkWidget *item, EMFolderTree *emft)
-{
-}
-#endif
-
-
-struct _EMCopyFolders {
- struct _mail_msg msg;
-
- /* input data */
- CamelStore *fromstore;
- CamelStore *tostore;
-
- char *frombase;
- char *tobase;
-
- int delete;
-};
-
-static void
-em_copy_folders__copy (struct _mail_msg *mm)
-{
- struct _EMCopyFolders *m = (struct _EMCopyFolders *) mm;
- guint32 flags = CAMEL_STORE_FOLDER_INFO_RECURSIVE;
- GList *pending = NULL, *deleting = NULL, *l;
- GString *fromname, *toname;
- CamelFolderInfo *fi;
- const char *tmp;
- int fromlen;
-
- if (camel_store_supports_subscriptions (m->fromstore))
- flags |= CAMEL_STORE_FOLDER_INFO_SUBSCRIBED;
-
- if (!(fi = camel_store_get_folder_info (m->fromstore, m->frombase, flags, &mm->ex)))
- return;
-
- pending = g_list_append (pending, fi);
-
- toname = g_string_new ("");
- fromname = g_string_new ("");
-
- tmp = strrchr (m->frombase, '/');
- if (tmp == NULL)
- fromlen = 0;
- else
- fromlen = tmp - m->frombase + 1;
-
- d(printf ("top name is '%s'\n", fi->full_name));
-
- while (pending) {
- CamelFolderInfo *info = pending->data;
-
- pending = g_list_remove_link (pending, pending);
- while (info) {
- CamelFolder *fromfolder, *tofolder;
- GPtrArray *uids;
-
- if (info->child)
- pending = g_list_append (pending, info->child);
-
- if (m->tobase[0])
- g_string_printf (toname, "%s/%s", m->tobase, info->full_name + fromlen);
- else
- g_string_printf (toname, "%s", info->full_name + fromlen);
-
- d(printf ("Copying from '%s' to '%s'\n", info->full_name, toname->str));
-
- /* This makes sure we create the same tree, e.g. from a nonselectable source */
- /* Not sure if this is really the 'right thing', e.g. for spool stores, but it makes the ui work */
- if ((info->flags & CAMEL_FOLDER_NOSELECT) == 0) {
- d(printf ("this folder is selectable\n"));
- if (!(fromfolder = camel_store_get_folder (m->fromstore, info->full_name, 0, &mm->ex)))
- goto exception;
-
- if (!(tofolder = camel_store_get_folder (m->tostore, toname->str, CAMEL_STORE_FOLDER_CREATE, &mm->ex))) {
- camel_object_unref (fromfolder);
- goto exception;
- }
-
- if (camel_store_supports_subscriptions (m->tostore)
- && !camel_store_folder_subscribed (m->tostore, toname->str))
- camel_store_subscribe_folder (m->tostore, toname->str, NULL);
-
- uids = camel_folder_get_uids (fromfolder);
- camel_folder_transfer_messages_to (fromfolder, uids, tofolder, NULL, m->delete, &mm->ex);
- camel_folder_free_uids (fromfolder, uids);
-
- camel_object_unref (fromfolder);
- camel_object_unref (tofolder);
- }
-
- if (camel_exception_is_set (&mm->ex))
- goto exception;
- else if (m->delete)
- deleting = g_list_prepend (deleting, info);
-
- info = info->sibling;
- }
- }
-
- /* delete the folders in reverse order from how we copyied them, if we are deleting any */
- l = deleting;
- while (l) {
- CamelFolderInfo *info = l->data;
-
- d(printf ("deleting folder '%s'\n", info->full_name));
-
- if (camel_store_supports_subscriptions (m->fromstore))
- camel_store_unsubscribe_folder (m->fromstore, info->full_name, NULL);
-
- camel_store_delete_folder (m->fromstore, info->full_name, NULL);
- l = l->next;
- }
-
- exception:
-
- camel_store_free_folder_info (m->fromstore, fi);
- g_list_free (deleting);
-
- g_string_free (toname, TRUE);
- g_string_free (fromname, TRUE);
-}
-
-static void
-em_copy_folders__free (struct _mail_msg *mm)
-{
- struct _EMCopyFolders *m = (struct _EMCopyFolders *) mm;
-
- camel_object_unref (m->fromstore);
- camel_object_unref (m->tostore);
-
- g_free (m->frombase);
- g_free (m->tobase);
-}
-
-static struct _mail_msg_op copy_folders_op = {
- NULL,
- em_copy_folders__copy,
- NULL,
- em_copy_folders__free,
-};
-
-static void
-em_copy_folders (CamelStore *tostore, const char *tobase, CamelStore *fromstore, const char *frombase, int delete)
-{
- struct _EMCopyFolders *m;
-
- m = mail_msg_new (&copy_folders_op, NULL, sizeof (struct _EMCopyFolders));
- camel_object_ref (fromstore);
- m->fromstore = fromstore;
- camel_object_ref (tostore);
- m->tostore = tostore;
- m->frombase = g_strdup (frombase);
- m->tobase = g_strdup (tobase);
- m->delete = delete;
-
- e_thread_put (mail_thread_new, (EMsg *) m);
-}
-
-struct _copy_folder_data {
- EMFolderTree *emft;
- gboolean delete;
-};
-
-static void
-emft_popup_copy_folder_selected (const char *uri, void *data)
-{
- struct _copy_folder_data *cfd = data;
- struct _EMFolderTreePrivate *priv;
- CamelStore *fromstore, *tostore;
- char *tobase, *frombase;
- CamelException ex;
- GtkWidget *dialog;
- CamelURL *url;
-
- if (uri == NULL) {
- g_free (cfd);
- return;
- }
-
- priv = cfd->emft->priv;
-
- d(printf ("copying folder '%s' to '%s'\n", priv->selected_path, uri));
-
- camel_exception_init (&ex);
- if (!(fromstore = camel_session_get_store (session, priv->selected_uri, &ex)))
- goto exception;
-
- frombase = priv->selected_path + 1;
-
- if (!(tostore = camel_session_get_store (session, uri, &ex))) {
- camel_object_unref (fromstore);
- goto exception;
- }
-
- url = camel_url_new (uri, NULL);
- if (url->fragment)
- tobase = url->fragment;
- else if (url->path && url->path[0])
- tobase = url->path + 1;
- else
- tobase = "";
-
- em_copy_folders (tostore, tobase, fromstore, frombase, cfd->delete);
-
- camel_url_free (url);
- g_free (cfd);
-
- return;
-
- exception:
-
- dialog = gtk_message_dialog_new ((GtkWindow *) cfd->emft, GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, _("%s"), ex.desc);
- g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), dialog);
- camel_exception_clear (&ex);
- gtk_widget_show (dialog);
- g_free (cfd);
-}
-
-static void
-emft_popup_copy (GtkWidget *item, EMFolderTree *emft)
-{
- struct _copy_folder_data *cfd;
-
- cfd = g_malloc (sizeof (*cfd));
- cfd->emft = emft;
- cfd->delete = FALSE;
-
- em_select_folder (NULL, _("Select folder"),
- NULL, emft_popup_copy_folder_selected, cfd);
-}
-
-static void
-emft_popup_move (GtkWidget *item, EMFolderTree *emft)
-{
- struct _copy_folder_data *cfd;
-
- cfd = g_malloc (sizeof (*cfd));
- cfd->emft = emft;
- cfd->delete = TRUE;
-
- em_select_folder (NULL, _("Select folder"),
- NULL, emft_popup_copy_folder_selected, cfd);
-}
-
-
-gboolean
-em_folder_tree_create_folder (EMFolderTree *emft, const char *path, const char *uri)
-{
- struct _EMFolderTreePrivate *priv = emft->priv;
- struct _EMFolderTreeModelStoreInfo *si;
- const char *parent, *full_name;
- char *name, *namebuf = NULL;
- GtkWidget *dialog;
- CamelStore *store;
- CamelException ex;
-
- d(printf ("Creating folder: %s (%s)\n", path, uri));
-
- camel_exception_init (&ex);
- if (!(store = (CamelStore *) camel_session_get_service (session, uri, CAMEL_PROVIDER_STORE, &ex)))
- goto exception;
-
- if (!(si = g_hash_table_lookup (priv->model->store_hash, store))) {
- camel_object_unref (store);
- g_assert_not_reached ();
- goto exception;
- }
-
- camel_object_unref (store);
-
- full_name = path[0] == '/' ? path + 1 : path;
- namebuf = g_strdup (full_name);
- if (!(name = strrchr (namebuf, '/'))) {
- name = namebuf;
- parent = "";
- } else {
- *name++ = '\0';
- parent = namebuf;
- }
-
- d(printf ("creating folder parent='%s' name='%s' path='%s'\n", parent, name, path));
-
- camel_store_create_folder (si->store, parent, name, &ex);
- if (camel_exception_is_set (&ex)) {
- goto exception;
- } else if (camel_store_supports_subscriptions (si->store)) {
- camel_store_subscribe_folder (si->store, full_name, &ex);
- if (camel_exception_is_set (&ex))
- goto exception;
- }
-
- g_free (namebuf);
-
- return TRUE;
-
- exception:
-
- dialog = gtk_message_dialog_new ((GtkWindow *) emft, GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, _("%s"), ex.desc);
- g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), dialog);
- camel_exception_clear (&ex);
- g_free (namebuf);
-
- gtk_widget_show (dialog);
-
- return FALSE;
-}
-
-static void
-emft_popup_new_folder_response (EMFolderSelector *emfs, int response, EMFolderTree *emft)
-{
- const char *uri, *path;
-
- if (response != GTK_RESPONSE_OK) {
- gtk_widget_destroy ((GtkWidget *) emfs);
- return;
- }
-
- uri = em_folder_selector_get_selected_uri (emfs);
- path = em_folder_selector_get_selected_path (emfs);
-
- if (em_folder_tree_create_folder (emfs->emft, path, uri))
- gtk_widget_destroy ((GtkWidget *) emfs);
-}
-
-static void
-emft_popup_new_folder (GtkWidget *item, EMFolderTree *emft)
-{
- EMFolderTree *folder_tree;
- GtkWidget *dialog;
-
- folder_tree = (EMFolderTree *) em_folder_tree_new_with_model (emft->priv->model);
-
- dialog = em_folder_selector_create_new (folder_tree, 0, _("Create folder"), _("Specify where to create the folder:"));
- em_folder_selector_set_selected ((EMFolderSelector *) dialog, emft->priv->selected_uri);
- g_signal_connect (dialog, "response", G_CALLBACK (emft_popup_new_folder_response), emft);
- gtk_widget_show (dialog);
-}
-
-static void
-emft_popup_delete_rec (CamelStore *store, CamelFolderInfo *fi, CamelException *ex)
-{
- while (fi) {
- CamelFolder *folder;
-
- if (fi->child) {
- emft_popup_delete_rec (store, fi->child, ex);
-
- if (camel_exception_is_set (ex))
- return;
- }
-
- d(printf ("deleting folder '%s'\n", fi->full_name));
-
- /* shouldn't camel do this itself? */
- if (camel_store_supports_subscriptions (store))
- camel_store_unsubscribe_folder (store, fi->full_name, NULL);
-
- folder = camel_store_get_folder (store, fi->full_name, 0, NULL);
- if (folder) {
- GPtrArray *uids = camel_folder_get_uids (folder);
- int i;
-
- camel_folder_freeze (folder);
- for (i = 0; i < uids->len; i++)
- camel_folder_delete_message (folder, uids->pdata[i]);
- camel_folder_sync (folder, TRUE, NULL);
- camel_folder_thaw (folder);
- camel_folder_free_uids (folder, uids);
- }
-
- camel_store_delete_folder (store, fi->full_name, ex);
- if (camel_exception_is_set (ex))
- return;
-
- fi = fi->sibling;
- }
-}
-
-static void
-emft_popup_delete_folders (CamelStore *store, const char *path, CamelException *ex)
-{
- guint32 flags = CAMEL_STORE_FOLDER_INFO_RECURSIVE;
- const char *full_name;
- CamelFolderInfo *fi;
-
- if (camel_store_supports_subscriptions (store))
- flags |= CAMEL_STORE_FOLDER_INFO_SUBSCRIBED;
-
- full_name = path[0] == '/' ? path + 1 : path;
- fi = camel_store_get_folder_info (store, full_name, flags, ex);
- if (camel_exception_is_set (ex))
- return;
-
- emft_popup_delete_rec (store, fi, ex);
- camel_store_free_folder_info (store, fi);
-}
-
-static void
-emft_popup_delete_response (GtkWidget *dialog, guint response, EMFolderTree *emft)
-{
- struct _EMFolderTreePrivate *priv = emft->priv;
- GtkTreeSelection *selection;
- GtkTreeModel *model;
- CamelStore *store;
- CamelException ex;
- GtkTreeIter iter;
- char *path;
-
- gtk_widget_destroy (dialog);
- if (response != GTK_RESPONSE_OK)
- return;
-
- selection = gtk_tree_view_get_selection (priv->treeview);
- gtk_tree_selection_get_selected (selection, &model, &iter);
- gtk_tree_model_get (model, &iter, COL_STRING_FOLDER_PATH, &path,
- COL_POINTER_CAMEL_STORE, &store, -1);
-
- camel_exception_init (&ex);
- emft_popup_delete_folders (store, path, &ex);
- if (camel_exception_is_set (&ex)) {
- e_notice (NULL, GTK_MESSAGE_ERROR, _("Could not delete folder: %s"), ex.desc);
- camel_exception_clear (&ex);
- }
-}
-
-static void
-emft_popup_delete_folder (GtkWidget *item, EMFolderTree *emft)
-{
- struct _EMFolderTreePrivate *priv = emft->priv;
- GtkTreeSelection *selection;
- GtkTreeModel *model;
- GtkTreeIter iter;
- GtkWidget *dialog;
- char *title, *path;
-
- selection = gtk_tree_view_get_selection (priv->treeview);
- gtk_tree_selection_get_selected (selection, &model, &iter);
- gtk_tree_model_get (model, &iter, COL_STRING_FOLDER_PATH, &path, -1);
-
- dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL,
- GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE,
- _("Really delete folder \"%s\" and all of its subfolders?"),
- path);
-
- gtk_dialog_add_button ((GtkDialog *) dialog, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
- gtk_dialog_add_button ((GtkDialog *) dialog, GTK_STOCK_DELETE, GTK_RESPONSE_OK);
-
- gtk_dialog_set_default_response ((GtkDialog *) dialog, GTK_RESPONSE_OK);
- gtk_container_set_border_width ((GtkContainer *) dialog, 6);
- gtk_box_set_spacing ((GtkBox *) ((GtkDialog *) dialog)->vbox, 6);
-
- title = g_strdup_printf (_("Delete \"%s\""), path);
- gtk_window_set_title ((GtkWindow *) dialog, title);
- g_free (title);
-
- g_signal_connect (dialog, "response", G_CALLBACK (emft_popup_delete_response), emft);
- gtk_widget_show (dialog);
-}
-
-static void
-emft_popup_rename_folder (GtkWidget *item, EMFolderTree *emft)
-{
- struct _EMFolderTreePrivate *priv = emft->priv;
- char *prompt, *folder_path, *name, *new_name, *uri;
- GtkTreeSelection *selection;
- const char *full_name, *p;
- gboolean done = FALSE;
- GtkTreeModel *model;
- CamelStore *store;
- GtkTreeIter iter;
- size_t base_len;
-
- selection = gtk_tree_view_get_selection (priv->treeview);
- gtk_tree_selection_get_selected (selection, &model, &iter);
- gtk_tree_model_get (model, &iter, COL_STRING_FOLDER_PATH, &folder_path,
- COL_STRING_DISPLAY_NAME, &name,
- COL_POINTER_CAMEL_STORE, &store,
- COL_STRING_URI, &uri, -1);
-
- full_name = folder_path[0] == '/' ? folder_path + 1 : folder_path;
- if ((p = strrchr (full_name, '/')))
- base_len = (size_t) (p - full_name);
- else
- base_len = 0;
-
- prompt = g_strdup_printf (_("Rename the \"%s\" folder to:"), name);
- while (!done) {
- const char *why;
-
- new_name = e_request_string (NULL, _("Rename Folder"), prompt, name);
- if (new_name == NULL || !strcmp (name, new_name)) {
- /* old name == new name */
- done = TRUE;
- } else {
- CamelFolderInfo *fi;
- CamelException ex;
- char *path, *p;
-
- if (base_len > 0) {
- path = g_malloc (base_len + strlen (new_name) + 2);
- memcpy (path, full_name, base_len);
- p = path + base_len;
- *p++ = '/';
- strcpy (p, new_name);
- } else {
- path = g_strdup (new_name);
- }
-
- camel_exception_init (&ex);
- if ((fi = camel_store_get_folder_info (store, path, CAMEL_STORE_FOLDER_INFO_FAST, &ex)) != NULL) {
- camel_store_free_folder_info (store, fi);
-
- e_notice (NULL, GTK_MESSAGE_ERROR,
- _("A folder named \"%s\" already exists. Please use a different name."),
- new_name);
- } else {
- const char *oldpath, *newpath;
-
- oldpath = full_name;
- newpath = path;
-
- d(printf ("renaming %s to %s\n", oldpath, newpath));
-
- camel_exception_clear (&ex);
- camel_store_rename_folder (store, oldpath, newpath, &ex);
- if (camel_exception_is_set (&ex)) {
- e_notice (NULL, GTK_MESSAGE_ERROR, _("Could not rename folder: %s"), ex.desc);
- camel_exception_clear (&ex);
- }
-
- done = TRUE;
- }
-
- g_free (path);
- }
-
- g_free (new_name);
- }
-}
-
-struct _prop_data {
- void *object;
- CamelArgV *argv;
- GtkWidget **widgets;
-};
-
-static void
-emft_popup_properties_response (GtkWidget *dialog, int response, struct _prop_data *prop_data)
-{
- CamelArgV *argv = prop_data->argv;
- int i;
-
- if (response != GTK_RESPONSE_OK) {
- gtk_widget_destroy (dialog);
- return;
- }
-
- for (i = 0; i < argv->argc; i++) {
- CamelArg *arg = &argv->argv[i];
-
- switch (arg->tag & CAMEL_ARG_TYPE) {
- case CAMEL_ARG_BOO:
- arg->ca_int = gtk_toggle_button_get_active ((GtkToggleButton *) prop_data->widgets[i]);
- break;
- case CAMEL_ARG_STR:
- g_free (arg->ca_str);
- arg->ca_str = (char *) gtk_entry_get_text ((GtkEntry *) prop_data->widgets[i]);
- break;
- default:
- g_assert_not_reached ();
- break;
- }
- }
-
- camel_object_setv (prop_data->object, NULL, argv);
- gtk_widget_destroy (dialog);
-}
-
-static void
-emft_popup_properties_free (void *data)
-{
- struct _prop_data *prop_data = data;
- int i;
-
- for (i = 0; i < prop_data->argv->argc; i++) {
- if ((prop_data->argv->argv[i].tag & CAMEL_ARG_TYPE) == CAMEL_ARG_STR)
- g_free (prop_data->argv->argv[i].ca_str);
- }
-
- camel_object_unref (prop_data->object);
- g_free (prop_data->argv);
- g_free (prop_data);
-}
-
-static void
-emft_popup_properties_got_folder (char *uri, CamelFolder *folder, void *data)
-{
- GtkWidget *dialog, *w, *table, *label;
- struct _prop_data *prop_data;
- CamelArgGetV *arggetv;
- CamelArgV *argv;
- GSList *list, *l;
- gint32 count, i;
- char *name;
- int row = 1;
-
- if (folder == NULL)
- return;
-
- camel_object_get (folder, NULL, CAMEL_FOLDER_PROPERTIES, &list, CAMEL_FOLDER_NAME, &name, NULL);
-
- dialog = gtk_dialog_new_with_buttons (_("Folder properties"), NULL,
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_STOCK_OK, GTK_RESPONSE_OK,
- NULL);
-
- /* TODO: maybe we want some basic properties here, like message counts/approximate size/etc */
- w = gtk_frame_new (_("Properties"));
- gtk_widget_show (w);
- gtk_box_pack_start ((GtkBox *) ((GtkDialog *) dialog)->vbox, w, TRUE, TRUE, 6);
-
- table = gtk_table_new (g_slist_length (list) + 1, 2, FALSE);
- gtk_widget_show (table);
- gtk_container_add ((GtkContainer *) w, table);
-
- label = gtk_label_new (_("Folder Name"));
- gtk_widget_show (label);
- gtk_misc_set_alignment ((GtkMisc *) label, 1.0, 0.5);
- gtk_table_attach ((GtkTable *) table, label, 0, 1, 0, 1, GTK_FILL | GTK_EXPAND, 0, 3, 0);
-
- label = gtk_label_new (name);
- gtk_widget_show (label);
- gtk_misc_set_alignment ((GtkMisc *) label, 0.0, 0.5);
- gtk_table_attach ((GtkTable *) table, label, 1, 2, 0, 1, GTK_FILL | GTK_EXPAND, 0, 3, 0);
-
- /* build an arggetv/argv to retrieve/store the results */
- count = g_slist_length (list);
- arggetv = g_malloc0 (sizeof (*arggetv) + (count - CAMEL_ARGV_MAX) * sizeof (arggetv->argv[0]));
- arggetv->argc = count;
- argv = g_malloc0 (sizeof (*argv) + (count - CAMEL_ARGV_MAX) * sizeof (argv->argv[0]));
- argv->argc = count;
-
- i = 0;
- l = list;
- while (l) {
- CamelProperty *prop = l->data;
-
- argv->argv[i].tag = prop->tag;
- arggetv->argv[i].tag = prop->tag;
- arggetv->argv[i].ca_ptr = &argv->argv[i].ca_ptr;
-
- l = l->next;
- i++;
- }
-
- camel_object_getv (folder, NULL, arggetv);
- g_free (arggetv);
-
- prop_data = g_malloc0 (sizeof (*prop_data));
- prop_data->widgets = g_malloc0 (sizeof (prop_data->widgets[0]) * count);
- prop_data->argv = argv;
-
- /* setup the ui with the values retrieved */
- l = list;
- i = 0;
- while (l) {
- CamelProperty *prop = l->data;
-
- switch (prop->tag & CAMEL_ARG_TYPE) {
- case CAMEL_ARG_BOO:
- w = gtk_check_button_new_with_label (prop->description);
- gtk_toggle_button_set_active ((GtkToggleButton *) w, argv->argv[i].ca_int != 0);
- gtk_widget_show (w);
- gtk_table_attach ((GtkTable *) table, w, 0, 2, row, row + 1, 0, 0, 3, 3);
- prop_data->widgets[i] = w;
- break;
- case CAMEL_ARG_STR:
- label = gtk_label_new (prop->description);
- gtk_misc_set_alignment ((GtkMisc *) label, 1.0, 0.5);
- gtk_widget_show (label);
- gtk_table_attach ((GtkTable *) table, label, 0, 1, row, row + 1, GTK_FILL | GTK_EXPAND, 0, 3, 3);
-
- w = gtk_entry_new ();
- gtk_widget_show (w);
- if (argv->argv[i].ca_str) {
- gtk_entry_set_text ((GtkEntry *) w, argv->argv[i].ca_str);
- camel_object_free (folder, argv->argv[i].tag, argv->argv[i].ca_str);
- argv->argv[i].ca_str = NULL;
- }
- gtk_table_attach ((GtkTable *) table, w, 1, 2, row, row + 1, GTK_FILL, 0, 3, 3);
- prop_data->widgets[i] = w;
- break;
- default:
- g_assert_not_reached ();
- break;
- }
-
- row++;
- l = l->next;
- }
-
- prop_data->object = folder;
- camel_object_ref (folder);
-
- camel_object_free (folder, CAMEL_FOLDER_PROPERTIES, list);
- camel_object_free (folder, CAMEL_FOLDER_NAME, name);
-
- /* we do 'apply on ok' ... since instant apply may apply some very long running tasks */
-
- g_signal_connect (dialog, "response", G_CALLBACK (emft_popup_properties_response), prop_data);
- g_object_set_data_full ((GObject *) dialog, "e-prop-data", prop_data, emft_popup_properties_free);
- gtk_widget_show (dialog);
-}
-
-static void
-emft_popup_properties (GtkWidget *item, EMFolderTree *emft)
-{
- struct _EMFolderTreePrivate *priv = emft->priv;
- GtkTreeSelection *selection;
- GtkTreeModel *model;
- GtkTreeIter iter;
- char *uri;
-
- selection = gtk_tree_view_get_selection (priv->treeview);
- gtk_tree_selection_get_selected (selection, &model, &iter);
- gtk_tree_model_get (model, &iter, COL_STRING_URI, &uri, -1);
-
- mail_get_folder (uri, 0, emft_popup_properties_got_folder, emft, mail_thread_new);
-}
-
-static EMPopupItem emft_popup_menu[] = {
-#if 0
- { EM_POPUP_ITEM, "00.emc.00", N_("_View"), G_CALLBACK (emft_popup_view), NULL, NULL, 0 },
- { EM_POPUP_ITEM, "00.emc.01", N_("Open in _New Window"), G_CALLBACK (emft_popup_open_new), NULL, NULL, 0 },
-
- { EM_POPUP_BAR, "10.emc" },
-#endif
- { EM_POPUP_ITEM, "10.emc.00", N_("_Copy"), G_CALLBACK (emft_popup_copy), NULL, "folder-copy-16.png", 0 },
- { EM_POPUP_ITEM, "10.emc.01", N_("_Move"), G_CALLBACK (emft_popup_move), NULL, "folder-move-16.png", 0 },
-
- { EM_POPUP_BAR, "20.emc" },
- { EM_POPUP_ITEM, "20.emc.00", N_("_New Folder..."), G_CALLBACK (emft_popup_new_folder), NULL, "folder-mini.png", 0 },
- { EM_POPUP_ITEM, "20.emc.01", N_("_Delete"), G_CALLBACK (emft_popup_delete_folder), NULL, "evolution-trash-mini.png", 0 },
- { EM_POPUP_ITEM, "20.emc.01", N_("_Rename"), G_CALLBACK (emft_popup_rename_folder), NULL, NULL, 0 },
-
- { EM_POPUP_BAR, "80.emc" },
- { EM_POPUP_ITEM, "80.emc.00", N_("_Properties..."), G_CALLBACK (emft_popup_properties), NULL, "configure_16_folder.xpm", 0 },
-};
-
-static gboolean
-tree_button_press (GtkWidget *treeview, GdkEventButton *event, EMFolderTree *emft)
-{
- GSList *menus = NULL;
- GtkMenu *menu;
- EMPopup *emp;
- int i;
-
- if (event->button != 3)
- return FALSE;
-
- /* handle right-click by opening a context menu */
- emp = em_popup_new ("com.ximian.mail.storageset.popup.select");
-
- for (i = 0; i < sizeof (emft_popup_menu) / sizeof (emft_popup_menu[0]); i++) {
- EMPopupItem *item = &emft_popup_menu[i];
-
- item->activate_data = emft;
- menus = g_slist_prepend (menus, item);
- }
-
- em_popup_add_items (emp, menus, (GDestroyNotify) g_slist_free);
-
- menu = em_popup_create_menu_once (emp, NULL, 0, 0);
-
- if (event == NULL || event->type == GDK_KEY_PRESS) {
- /* FIXME: menu pos function */
- gtk_menu_popup (menu, NULL, NULL, NULL, NULL, 0, event->time);
- } else {
- gtk_menu_popup (menu, NULL, NULL, NULL, NULL, event->button, event->time);
- }
-
- return TRUE;
-}
-
-
-static void
-tree_selection_changed (GtkTreeSelection *selection, EMFolderTree *emft)
-{
- struct _EMFolderTreePrivate *priv = emft->priv;
- GtkTreeModel *model;
- GtkTreeIter iter;
- char *path, *uri;
-
- if (!gtk_tree_selection_get_selected (selection, &model, &iter))
- return;
-
- gtk_tree_model_get (model, &iter, COL_STRING_FOLDER_PATH, &path,
- COL_STRING_URI, &uri, -1);
-
- g_free (priv->selected_uri);
- priv->selected_uri = g_strdup (uri);
-
- g_free (priv->selected_path);
- priv->selected_path = g_strdup (path);
-
- g_signal_emit (emft, signals[FOLDER_SELECTED], 0, path, uri);
-}
-
-
-void
-em_folder_tree_set_selected (EMFolderTree *emft, const char *uri)
-{
- struct _EMFolderTreeModelStoreInfo *si;
- struct _EMFolderTreeGetFolderInfo *m;
- struct _EMFolderTreePrivate *priv;
- GtkTreeRowReference *row = NULL;
- GtkTreeSelection *selection;
- GtkTreePath *tree_path;
- CamelStore *store;
- CamelException ex;
- const char *top;
- char *path, *p;
- CamelURL *url;
-
- g_return_if_fail (EM_IS_FOLDER_TREE (emft));
-
- priv = emft->priv;
-
- camel_exception_init (&ex);
- if (!(store = (CamelStore *) camel_session_get_service (session, uri, CAMEL_PROVIDER_STORE, &ex))) {
- camel_exception_clear (&ex);
- return;
- }
-
- if (!(si = g_hash_table_lookup (priv->model->store_hash, store))) {
- camel_object_unref (store);
- return;
- }
-
- if (!(url = camel_url_new (uri, NULL))) {
- camel_object_unref (store);
- return;
- }
-
- if (((CamelService *) store)->provider->url_flags & CAMEL_URL_FRAGMENT_IS_PATH)
- path = g_strdup_printf ("/%s", url->fragment ? url->fragment : "");
- else
- path = g_strdup (url->path ? url->path : "/");
-
- top = path[0] == '/' ? path + 1 : path;
- camel_url_free (url);
-
- if (!strcmp (path, "/"))
- row = si->row;
-
- if (row || (row = g_hash_table_lookup (si->path_hash, path))) {
- /* the folder-info node has already been loaded */
- tree_path = gtk_tree_row_reference_get_path (row);
- gtk_tree_view_expand_to_path (priv->treeview, tree_path);
- selection = gtk_tree_view_get_selection (priv->treeview);
- gtk_tree_selection_select_path (selection, tree_path);
- gtk_tree_path_free (tree_path);
- camel_object_unref (store);
- g_free (path);
- return;
- }
-
- /* look for the first of our parent folders that has already been loaded */
- p = path + strlen (path);
- while (p > path) {
- if (*p == '/') {
- *p = '\0';
-
- if ((row = g_hash_table_lookup (si->path_hash, path)))
- break;
- }
-
- p--;
- }
-
- if (row == NULL) {
- /* none of the folders of the desired store have been loaded yet */
- row = si->row;
- top = NULL;
- }
-
- /* FIXME: this gets all the subfolders of our first loaded
- * parent folder - ideally we'd only get what we needed, but
- * it's probably not worth the effort */
- m = mail_msg_new (&get_folder_info_op, NULL, sizeof (struct _EMFolderTreeGetFolderInfo));
- m->root = gtk_tree_row_reference_copy (row);
- m->store = store;
- m->emft = emft;
- m->top = top ? g_strdup (top) : NULL;
- m->flags = CAMEL_STORE_FOLDER_INFO_RECURSIVE;
- m->select_uri = g_strdup (uri);
-
- g_free (path);
-
- e_thread_put (mail_thread_new, (EMsg *) m);
-}
-
-
-const char *
-em_folder_tree_get_selected_uri (EMFolderTree *emft)
-{
- g_return_val_if_fail (EM_IS_FOLDER_TREE (emft), NULL);
-
- return emft->priv->selected_uri;
-}
-
-
-const char *
-em_folder_tree_get_selected_path (EMFolderTree *emft)
-{
- g_return_val_if_fail (EM_IS_FOLDER_TREE (emft), NULL);
-
- return emft->priv->selected_path;
-}
-
-
-EMFolderTreeModel *
-em_folder_tree_get_model (EMFolderTree *emft)
-{
- g_return_val_if_fail (EM_IS_FOLDER_TREE (emft), NULL);
-
- return emft->priv->model;
-}
-
-
-static gboolean
-em_folder_tree_save_state (EMFolderTree *emft)
-{
- struct _EMFolderTreePrivate *priv = emft->priv;
-
- em_folder_tree_model_save_expanded (priv->model);
- priv->save_state_id = 0;
-
- return FALSE;
-}
-
-
-static void
-em_folder_tree_queue_save_state (EMFolderTree *emft)
-{
- struct _EMFolderTreePrivate *priv = emft->priv;
-
- if (priv->save_state_id != 0)
- return;
-
- priv->save_state_id = g_timeout_add (1000, (GSourceFunc) em_folder_tree_save_state, emft);
-}
diff --git a/mail/em-folder-tree.h b/mail/em-folder-tree.h
deleted file mode 100644
index ec4e9301d9..0000000000
--- a/mail/em-folder-tree.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2003 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 __EM_FOLDER_TREE_H__
-#define __EM_FOLDER_TREE_H__
-
-#include <gtk/gtkvbox.h>
-#include <camel/camel-store.h>
-
-#include "em-folder-tree-model.h"
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#define EM_TYPE_FOLDER_TREE (em_folder_tree_get_type ())
-#define EM_FOLDER_TREE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EM_TYPE_FOLDER_TREE, EMFolderTree))
-#define EM_FOLDER_TREE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EM_TYPE_FOLDER_TREE, EMFolderTreeClass))
-#define EM_IS_FOLDER_TREE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EM_TYPE_FOLDER_TREE))
-#define EM_IS_FOLDER_TREE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EM_TYPE_FOLDER_TREE))
-#define EM_FOLDER_TREE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EM_TYPE_FOLDER_TREE, EMFolderTreeClass))
-
-typedef struct _EMFolderTree EMFolderTree;
-typedef struct _EMFolderTreeClass EMFolderTreeClass;
-
-struct _EMFolderTree {
- GtkVBox parent_object;
-
- struct _EMFolderTreePrivate *priv;
-};
-
-struct _EMFolderTreeClass {
- GtkVBoxClass parent_class;
-
- /* signals */
- void (* folder_selected) (EMFolderTree *emft, const char *path, const char *uri);
-};
-
-
-GType em_folder_tree_get_type (void);
-
-GtkWidget *em_folder_tree_new (void);
-GtkWidget *em_folder_tree_new_with_model (EMFolderTreeModel *model);
-
-void em_folder_tree_enable_drag_and_drop (EMFolderTree *emft);
-
-void em_folder_tree_set_selected (EMFolderTree *emft, const char *uri);
-const char *em_folder_tree_get_selected_uri (EMFolderTree *emft);
-const char *em_folder_tree_get_selected_path (EMFolderTree *emft);
-
-EMFolderTreeModel *em_folder_tree_get_model (EMFolderTree *emft);
-
-gboolean em_folder_tree_create_folder (EMFolderTree *emft, const char *path, const char *uri);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __EM_FOLDER_TREE_H__ */
diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c
deleted file mode 100644
index 5f7a1742e6..0000000000
--- a/mail/em-folder-view.c
+++ /dev/null
@@ -1,2020 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Michael Zucchi <notzed@ximian.com>
- *
- * Copyright 2003 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 <gtk/gtkvbox.h>
-#include <gtk/gtkbutton.h>
-#include <gtk/gtkvpaned.h>
-#include <gdk/gdkkeysyms.h>
-
-#include <gtkhtml/gtkhtml.h>
-
-#include <libgnome/gnome-url.h>
-
-#include <libgnomeprintui/gnome-print-dialog.h>
-
-#include <camel/camel-mime-message.h>
-#include <camel/camel-stream.h>
-#include <camel/camel-stream-filter.h>
-#include <camel/camel-mime-filter.h>
-#include <camel/camel-mime-filter-tohtml.h>
-#include <camel/camel-mime-filter-enriched.h>
-#include <camel/camel-multipart.h>
-#include <camel/camel-stream-mem.h>
-#include <camel/camel-url.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-ui-component.h>
-#include <bonobo/bonobo-ui-util.h>
-
-#include "widgets/misc/e-charset-picker.h"
-
-#include <e-util/e-dialog-utils.h>
-
-#include "em-format-html-display.h"
-#include "em-format-html-print.h"
-#include "em-folder-selection.h"
-#include "em-folder-view.h"
-#include "em-message-browser.h"
-#include "message-list.h"
-#include "em-utils.h"
-
-#include <gtkhtml/gtkhtml.h>
-#include <gtkhtml/htmlobject.h>
-#include <gtkhtml/htmlengine.h>
-#include <gtkhtml/htmlengine-save.h>
-
-#include "mail-mt.h"
-#include "mail-ops.h"
-#include "mail-config.h" /* hrm, pity we need this ... */
-#include "mail-autofilter.h"
-#include "mail-vfolder.h"
-
-#include "evolution-shell-component-utils.h" /* Pixmap stuff, sigh */
-
-static void emfv_folder_changed(CamelFolder *folder, CamelFolderChangeInfo *changes, EMFolderView *emfv);
-
-static void emfv_list_message_selected(MessageList *ml, const char *uid, EMFolderView *emfv);
-static int emfv_list_right_click(ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, EMFolderView *emfv);
-static void emfv_list_double_click(ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, EMFolderView *emfv);
-static int emfv_list_key_press(ETree *tree, int row, ETreePath path, int col, GdkEvent *ev, EMFolderView *emfv);
-
-static void emfv_format_link_clicked(EMFormatHTMLDisplay *efhd, const char *uri, EMFolderView *);
-static int emfv_format_popup_event(EMFormatHTMLDisplay *efhd, GdkEventButton *event, const char *uri, CamelMimePart *part, EMFolderView *);
-
-static void emfv_enable_menus(EMFolderView *emfv);
-
-static void emfv_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri);
-static void emfv_set_folder_uri(EMFolderView *emfv, const char *uri);
-static void emfv_set_message(EMFolderView *emfv, const char *uid);
-static void emfv_activate(EMFolderView *emfv, BonoboUIComponent *uic, int state);
-
-static void emfv_message_reply(EMFolderView *emfv, int mode);
-static void vfolder_type_current (EMFolderView *emfv, int type);
-static void filter_type_current (EMFolderView *emfv, int type);
-
-static void emfv_setting_setup(EMFolderView *emfv);
-
-static const EMFolderViewEnable emfv_enable_map[];
-
-struct _EMFolderViewPrivate {
- guint seen_id;
- guint setting_notify_id;
-
- char *displayed_uid; /* only used to stop re-loads, don't use it to represent any selection state */
-
- CamelObjectHookID folder_changed_id;
-
- GtkWidget *invisible;
- char *selection_uri;
-};
-
-static GtkVBoxClass *emfv_parent;
-
-static void emfv_selection_get(GtkWidget *widget, GtkSelectionData *data, guint info, guint time_stamp, EMFolderView *emfv);
-static void emfv_selection_clear_event(GtkWidget *widget, GdkEventSelection *event, EMFolderView *emfv);
-
-static void
-emfv_init(GObject *o)
-{
- EMFolderView *emfv = (EMFolderView *)o;
- struct _EMFolderViewPrivate *p;
-
- gtk_box_set_homogeneous (GTK_BOX (emfv), FALSE);
-
- p = emfv->priv = g_malloc0(sizeof(struct _EMFolderViewPrivate));
-
- emfv->ui_files = g_slist_append(NULL, EVOLUTION_UIDIR "/evolution-mail-message.xml");
- emfv->ui_app_name = "evolution-mail";
-
- emfv->enable_map = g_slist_prepend(NULL, (void *)emfv_enable_map);
-
- emfv->list = (MessageList *)message_list_new();
- g_signal_connect(emfv->list, "message_selected", G_CALLBACK(emfv_list_message_selected), emfv);
-
- /* FIXME: should this hang off message-list instead? */
- g_signal_connect(emfv->list->tree, "right_click", G_CALLBACK(emfv_list_right_click), emfv);
- g_signal_connect(emfv->list->tree, "double_click", G_CALLBACK(emfv_list_double_click), emfv);
- g_signal_connect(emfv->list->tree, "key_press", G_CALLBACK(emfv_list_key_press), emfv);
-
- emfv->preview = (EMFormatHTMLDisplay *)em_format_html_display_new();
- g_signal_connect(emfv->preview, "link_clicked", G_CALLBACK(emfv_format_link_clicked), emfv);
- g_signal_connect(emfv->preview, "popup_event", G_CALLBACK(emfv_format_popup_event), emfv);
-
- p->invisible = gtk_invisible_new();
- g_object_ref(p->invisible);
- gtk_object_sink((GtkObject *)p->invisible);
- g_signal_connect(p->invisible, "selection_get", G_CALLBACK(emfv_selection_get), emfv);
- g_signal_connect(p->invisible, "selection_clear_event", G_CALLBACK(emfv_selection_clear_event), emfv);
- gtk_selection_add_target(p->invisible, GDK_SELECTION_PRIMARY, GDK_SELECTION_TYPE_STRING, 0);
- gtk_selection_add_target(p->invisible, GDK_SELECTION_PRIMARY, GDK_SELECTION_TYPE_STRING, 1);
-
- emfv->async = mail_async_event_new();
-
- emfv_setting_setup(emfv);
-}
-
-static void
-emfv_finalise(GObject *o)
-{
- EMFolderView *emfv = (EMFolderView *)o;
- struct _EMFolderViewPrivate *p = emfv->priv;
-
- if (emfv->async)
- mail_async_event_destroy(emfv->async);
-
- if (emfv->folder) {
- if (p->folder_changed_id)
- camel_object_remove_event(emfv->folder, p->folder_changed_id);
- camel_object_unref(emfv->folder);
- g_free(emfv->folder_uri);
- }
-
- g_slist_free(emfv->ui_files);
- g_slist_free(emfv->enable_map);
-
- g_free(p);
-
- ((GObjectClass *)emfv_parent)->finalize(o);
-}
-
-static void
-emfv_destroy (GtkObject *o)
-{
- EMFolderView *emfv = (EMFolderView *) o;
- struct _EMFolderViewPrivate *p = emfv->priv;
-
- if (p->seen_id) {
- g_source_remove(p->seen_id);
- p->seen_id = 0;
- }
-
- if (p->setting_notify_id) {
- GConfClient *gconf = gconf_client_get_default();
-
- gconf_client_notify_remove(gconf, p->setting_notify_id);
- p->setting_notify_id = 0;
- g_object_unref(gconf);
- }
-
- if (p->invisible) {
- g_object_unref(p->invisible);
- p->invisible = NULL;
- }
-
- emfv->preview = NULL;
- emfv->list = NULL;
- emfv->preview_active = FALSE;
- emfv->uic = NULL;
-
- ((GtkObjectClass *) emfv_parent)->destroy (o);
-}
-
-static void
-emfv_class_init(GObjectClass *klass)
-{
- klass->finalize = emfv_finalise;
-
- ((GtkObjectClass *) klass)->destroy = emfv_destroy;
-
- ((EMFolderViewClass *)klass)->set_folder = emfv_set_folder;
- ((EMFolderViewClass *)klass)->set_folder_uri = emfv_set_folder_uri;
- ((EMFolderViewClass *)klass)->set_message = emfv_set_message;
- ((EMFolderViewClass *)klass)->activate = emfv_activate;
-}
-
-GType
-em_folder_view_get_type(void)
-{
- static GType type = 0;
-
- if (type == 0) {
- static const GTypeInfo info = {
- sizeof(EMFolderViewClass),
- NULL, NULL,
- (GClassInitFunc)emfv_class_init,
- NULL, NULL,
- sizeof(EMFolderView), 0,
- (GInstanceInitFunc)emfv_init
- };
- emfv_parent = g_type_class_ref(gtk_vbox_get_type());
- type = g_type_register_static(gtk_vbox_get_type(), "EMFolderView", &info, 0);
- }
-
- return type;
-}
-
-GtkWidget *em_folder_view_new(void)
-{
- EMFolderView *emfv = g_object_new(em_folder_view_get_type(), 0);
-
- return (GtkWidget *)emfv;
-}
-
-/* flag all selected messages. Return number flagged */
-/* FIXME: Should this be part of message-list instead? */
-int
-em_folder_view_mark_selected(EMFolderView *emfv, guint32 mask, guint32 set)
-{
- GPtrArray *uids;
- int i;
-
- if (emfv->folder == NULL)
- return 0;
-
- uids = message_list_get_selected(emfv->list);
- camel_folder_freeze(emfv->folder);
-
- for (i=0; i<uids->len; i++)
- camel_folder_set_message_flags(emfv->folder, uids->pdata[i], mask, set);
-
- message_list_free_uids(emfv->list, uids);
- camel_folder_thaw(emfv->folder);
-
- return i;
-}
-
-/* should this be elsewhere/take a uid list? */
-int
-em_folder_view_open_selected(EMFolderView *emfv)
-{
- GPtrArray *uids;
- int i = 0;
-
- /* FIXME: handle editing message? Should be a different method? editing handled by 'Resend' method already */
-
- uids = message_list_get_selected(emfv->list);
-
- if (em_utils_folder_is_drafts(emfv->folder, emfv->folder_uri)
- || em_utils_folder_is_outbox(emfv->folder, emfv->folder_uri)) {
- em_utils_edit_messages (emfv->folder, uids);
- } else {
- /* TODO: have an em_utils_open_messages call? */
-
- /* FIXME: 'are you sure' for > 10 messages; is this even necessary? */
-
- for (i=0; i<uids->len; i++) {
- EMMessageBrowser *emmb;
-
- emmb = (EMMessageBrowser *)em_message_browser_window_new();
- /* FIXME: session needs to be passed easier than this */
- em_format_set_session((EMFormat *)((EMFolderView *)emmb)->preview, ((EMFormat *)emfv->preview)->session);
- em_folder_view_set_folder((EMFolderView *)emmb, emfv->folder, emfv->folder_uri);
- em_folder_view_set_message((EMFolderView *)emmb, uids->pdata[i]);
- gtk_widget_show(emmb->window);
- }
-
- message_list_free_uids(emfv->list, uids);
- }
-
- return i;
-}
-
-/* ********************************************************************** */
-
-static void
-emfv_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri)
-{
- int isout = (folder && uri
- && (em_utils_folder_is_drafts(folder, uri)
- || em_utils_folder_is_sent(folder, uri)
- || em_utils_folder_is_outbox(folder, uri)));
-
- message_list_set_folder(emfv->list, folder, uri, isout);
- g_free(emfv->folder_uri);
- emfv->folder_uri = g_strdup(uri);
- if (folder != emfv->folder) {
- if (emfv->folder) {
- mail_sync_folder (emfv->folder, NULL, NULL);
- if (emfv->priv->folder_changed_id)
- camel_object_remove_event(emfv->folder, emfv->priv->folder_changed_id);
- camel_object_unref(emfv->folder);
- }
- emfv->folder = folder;
- if (folder) {
- emfv->priv->folder_changed_id = camel_object_hook_event(folder, "folder_changed",
- (CamelObjectEventHookFunc)emfv_folder_changed, emfv);
- camel_object_ref(folder);
- }
- }
-
- emfv_enable_menus(emfv);
-}
-
-static void
-emfv_got_folder(char *uri, CamelFolder *folder, void *data)
-{
- EMFolderView *emfv = data;
-
- em_folder_view_set_folder(emfv, folder, uri);
-}
-
-static void
-emfv_set_folder_uri(EMFolderView *emfv, const char *uri)
-{
- if (emfv->preview)
- em_format_format((EMFormat *)emfv->preview, NULL);
-
- mail_get_folder(uri, 0, emfv_got_folder, emfv, mail_thread_new);
-}
-
-static void
-emfv_set_message(EMFolderView *emfv, const char *uid)
-{
- message_list_select_uid(emfv->list, uid);
-}
-
-/* ********************************************************************** */
-
-static void
-emfv_selection_get(GtkWidget *widget, GtkSelectionData *data, guint info, guint time_stamp, EMFolderView *emfv)
-{
- struct _EMFolderViewPrivate *p = emfv->priv;
-
- if (p->selection_uri == NULL)
- return;
-
- gtk_selection_data_set(data, data->target, 8, p->selection_uri, strlen(p->selection_uri));
-}
-
-static void
-emfv_selection_clear_event(GtkWidget *widget, GdkEventSelection *event, EMFolderView *emfv)
-{
-#if 0 /* do i care? */
- struct _EMFolderViewPrivate *p = emfv->priv;
-
- g_free(p->selection_uri);
- p->selection_uri = NULL;
-#endif
-}
-
-/* ********************************************************************** */
-
-/* Popup menu
- In many cases these are the functions called by the bonobo callbacks too */
-
-struct _emfv_label_item {
- EMPopupItem item;
-
- EMFolderView *emfv;
- const char *label;
-};
-
-static void
-emfv_popup_open(GtkWidget *w, EMFolderView *emfv)
-{
- em_folder_view_open_selected(emfv);
-}
-
-static void
-emfv_popup_resend(GtkWidget *w, EMFolderView *emfv)
-{
- GPtrArray *uids;
-
- if (!em_utils_check_user_can_send_mail((GtkWidget *)emfv))
- return;
-
- uids = message_list_get_selected(emfv->list);
- em_utils_edit_messages (emfv->folder, uids);
-}
-
-static void
-emfv_popup_saveas(GtkWidget *w, EMFolderView *emfv)
-{
- GPtrArray *uids;
-
- uids = message_list_get_selected(emfv->list);
- em_utils_save_messages((GtkWidget *)emfv, emfv->folder, uids);
-}
-
-static void
-emfv_popup_print(GtkWidget *w, EMFolderView *emfv)
-{
- em_folder_view_print(emfv, FALSE);
-}
-
-static void
-emfv_popup_reply_sender(GtkWidget *w, EMFolderView *emfv)
-{
- emfv_message_reply(emfv, REPLY_MODE_SENDER);
-}
-
-static void
-emfv_popup_reply_list(GtkWidget *w, EMFolderView *emfv)
-{
- emfv_message_reply(emfv, REPLY_MODE_LIST);
-}
-
-static void
-emfv_popup_reply_all(GtkWidget *w, EMFolderView *emfv)
-{
- emfv_message_reply(emfv, REPLY_MODE_ALL);
-}
-
-static void
-emfv_popup_forward(GtkWidget *w, EMFolderView *emfv)
-{
- GPtrArray *uids;
-
- if (!em_utils_check_user_can_send_mail((GtkWidget *)emfv))
- return;
-
- uids = message_list_get_selected(emfv->list);
- em_utils_forward_messages (emfv->folder, uids);
-}
-
-static void
-emfv_popup_flag_followup(GtkWidget *w, EMFolderView *emfv)
-{
- GPtrArray *uids = message_list_get_selected(emfv->list);
-
- em_utils_flag_for_followup((GtkWidget *)emfv, emfv->folder, uids);
-}
-
-static void
-emfv_popup_flag_completed(GtkWidget *w, EMFolderView *emfv)
-{
- GPtrArray *uids;
-
- uids = message_list_get_selected(emfv->list);
- em_utils_flag_for_followup_completed((GtkWidget *)emfv, emfv->folder, uids);
-}
-
-static void
-emfv_popup_flag_clear(GtkWidget *w, EMFolderView *emfv)
-{
- GPtrArray *uids = message_list_get_selected(emfv->list);
-
- em_utils_flag_for_followup_clear((GtkWidget *)emfv, emfv->folder, uids);
-}
-
-static void
-emfv_popup_mark_read(GtkWidget *w, EMFolderView *emfv)
-{
- em_folder_view_mark_selected(emfv, CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN);
-}
-
-static void
-emfv_popup_mark_unread(GtkWidget *w, EMFolderView *emfv)
-{
- em_folder_view_mark_selected(emfv, CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_DELETED, 0);
-
- if (emfv->priv->seen_id) {
- g_source_remove(emfv->priv->seen_id);
- emfv->priv->seen_id = 0;
- }
-}
-
-static void
-emfv_popup_mark_important(GtkWidget *w, EMFolderView *emfv)
-{
- em_folder_view_mark_selected(emfv, CAMEL_MESSAGE_FLAGGED|CAMEL_MESSAGE_DELETED, CAMEL_MESSAGE_FLAGGED);
-}
-
-static void
-emfv_popup_mark_unimportant(GtkWidget *w, EMFolderView *emfv)
-{
- em_folder_view_mark_selected(emfv, CAMEL_MESSAGE_FLAGGED, 0);
-}
-
-static void
-emfv_popup_mark_junk (GtkWidget *w, EMFolderView *emfv)
-{
- mail_mark_junk (emfv->folder, emfv->list, TRUE);
-}
-
-static void
-emfv_popup_mark_nojunk (GtkWidget *w, EMFolderView *emfv)
-{
- mail_mark_junk (emfv->folder, emfv->list, FALSE);
-}
-
-static void
-emfv_popup_delete(GtkWidget *w, EMFolderView *emfv)
-{
- GPtrArray *uids;
-
- uids = message_list_get_selected (emfv->list);
- em_folder_view_mark_selected (emfv, CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_DELETED, CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_DELETED);
-
- if (uids->len == 1)
- message_list_select (emfv->list, MESSAGE_LIST_SELECT_NEXT, 0, 0, FALSE);
-
- em_utils_uids_free (uids);
-}
-
-static void
-emfv_popup_undelete(GtkWidget *w, EMFolderView *emfv)
-{
- em_folder_view_mark_selected(emfv, CAMEL_MESSAGE_DELETED, 0);
-}
-
-struct _move_data {
- EMFolderView *emfv;
- GPtrArray *uids;
- int delete;
-};
-
-static void
-emfv_popup_move_cb(const char *uri, void *data)
-{
- struct _move_data *d = data;
-
- if (uri)
- mail_transfer_messages(d->emfv->folder, d->uids, d->delete, uri, 0, NULL, NULL);
- else
- em_utils_uids_free(d->uids);
-
- g_object_unref(d->emfv);
- g_free(d);
-}
-
-static void
-emfv_popup_move(GtkWidget *w, EMFolderView *emfv)
-{
- struct _move_data *d;
-
- d = g_malloc(sizeof(*d));
- d->emfv = emfv;
- g_object_ref(emfv);
- d->uids = message_list_get_selected(emfv->list);
- d->delete = TRUE;
-
- em_select_folder ((GtkWindow *) emfv, _("Select folder"), NULL, emfv_popup_move_cb, d);
-}
-
-static void
-emfv_popup_copy(GtkWidget *w, EMFolderView *emfv)
-{
- struct _move_data *d;
-
- d = g_malloc(sizeof(*d));
- d->emfv = emfv;
- g_object_ref(emfv);
- d->uids = message_list_get_selected(emfv->list);
- d->delete = FALSE;
-
- em_select_folder ((GtkWindow *) emfv, _("Select folder"), NULL, emfv_popup_move_cb, d);
-}
-
-static void
-emfv_set_label(EMFolderView *emfv, const char *label)
-{
- GPtrArray *uids = message_list_get_selected(emfv->list);
- int i;
-
- for (i=0;i<uids->len;i++)
- camel_folder_set_message_user_tag(emfv->folder, uids->pdata[i], "label", label);
-
- message_list_free_uids(emfv->list, uids);
-}
-
-static void
-emfv_popup_label_clear(GtkWidget *w, EMFolderView *emfv)
-{
- emfv_set_label(emfv, NULL);
-}
-
-static void
-emfv_popup_label_set(GtkWidget *w, struct _emfv_label_item *item)
-{
- emfv_set_label(item->emfv, item->label);
-}
-
-static void
-emfv_popup_add_sender(GtkWidget *w, EMFolderView *emfv)
-{
- GPtrArray *uids = message_list_get_selected(emfv->list);
- CamelMessageInfo *info;
- const char *addr;
-
- if (uids->len == 1
- && (info = camel_folder_get_message_info(emfv->folder, uids->pdata[0])) != NULL
- && (addr = camel_message_info_from(info)) != NULL
- && addr[0] != 0)
- em_utils_add_address((GtkWidget *)emfv, addr);
-
- em_utils_uids_free(uids);
-}
-
-static void
-emfv_popup_apply_filters(GtkWidget *w, EMFolderView *emfv)
-{
- GPtrArray *uids = message_list_get_selected(emfv->list);
-
- mail_filter_on_demand(emfv->folder, uids);
-}
-
-/* filter callbacks, this will eventually be a wizard, see
- filter_type_current/vfolder_type_current for implementation */
-
-#define EMFV_POPUP_AUTO_TYPE(autotype, name, type) \
-static void \
-name(GtkWidget *w, EMFolderView *emfv) \
-{ \
- autotype(emfv, type); \
-}
-
-EMFV_POPUP_AUTO_TYPE(vfolder_type_current, emfv_popup_vfolder_subject, AUTO_SUBJECT)
-EMFV_POPUP_AUTO_TYPE(vfolder_type_current, emfv_popup_vfolder_sender, AUTO_FROM)
-EMFV_POPUP_AUTO_TYPE(vfolder_type_current, emfv_popup_vfolder_recipients, AUTO_TO)
-EMFV_POPUP_AUTO_TYPE(vfolder_type_current, emfv_popup_vfolder_mlist, AUTO_MLIST)
-EMFV_POPUP_AUTO_TYPE(vfolder_type_current, emfv_popup_vfolder_thread, AUTO_THREAD)
-
-EMFV_POPUP_AUTO_TYPE(filter_type_current, emfv_popup_filter_subject, AUTO_SUBJECT)
-EMFV_POPUP_AUTO_TYPE(filter_type_current, emfv_popup_filter_sender, AUTO_FROM)
-EMFV_POPUP_AUTO_TYPE(filter_type_current, emfv_popup_filter_recipients, AUTO_TO)
-EMFV_POPUP_AUTO_TYPE(filter_type_current, emfv_popup_filter_mlist, AUTO_MLIST)
-EMFV_POPUP_AUTO_TYPE(filter_type_current, emfv_popup_filter_thread, AUTO_THREAD)
-
-/* TODO: Move some of these to be 'standard' menu's */
-
-static EMPopupItem emfv_popup_menu[] = {
- { EM_POPUP_ITEM, "00.emfv.00", N_("_Open"), G_CALLBACK(emfv_popup_open), NULL, NULL, 0 },
- { EM_POPUP_ITEM, "00.emfv.01", N_("_Edit as New Message..."), G_CALLBACK(emfv_popup_resend), NULL, NULL, EM_POPUP_SELECT_RESEND },
- { EM_POPUP_ITEM, "00.emfv.02", N_("_Save As..."), G_CALLBACK(emfv_popup_saveas), NULL, "save-as-16.png", 0 },
- { EM_POPUP_ITEM, "00.emfv.03", N_("_Print"), G_CALLBACK(emfv_popup_print), NULL, "print.xpm", 0 },
-
- { EM_POPUP_BAR, "10.emfv" },
- { EM_POPUP_ITEM, "10.emfv.00", N_("_Reply to Sender"), G_CALLBACK(emfv_popup_reply_sender), NULL, "reply.xpm", EM_POPUP_SELECT_ONE },
- { EM_POPUP_ITEM, "10.emfv.01", N_("Reply to _List"), G_CALLBACK(emfv_popup_reply_list), NULL, NULL, EM_POPUP_SELECT_ONE|EM_POPUP_SELECT_MAILING_LIST },
- { EM_POPUP_ITEM, "10.emfv.02", N_("Reply to _All"), G_CALLBACK(emfv_popup_reply_all), NULL, "reply_to_all.xpm", EM_POPUP_SELECT_ONE },
- { EM_POPUP_ITEM, "10.emfv.03", N_("_Forward"), G_CALLBACK(emfv_popup_forward), NULL, "forward.xpm", EM_POPUP_SELECT_MANY },
-
- { EM_POPUP_BAR, "20.emfv", NULL, NULL, NULL, NULL, EM_POPUP_SELECT_FLAG_FOLLOWUP|EM_POPUP_SELECT_FLAG_COMPLETED|EM_POPUP_SELECT_FLAG_CLEAR },
- { EM_POPUP_ITEM, "20.emfv.00", N_("Follo_w Up..."), G_CALLBACK(emfv_popup_flag_followup), NULL, "flag-for-followup-16.png", EM_POPUP_SELECT_FLAG_FOLLOWUP },
- { EM_POPUP_ITEM, "20.emfv.01", N_("Fla_g Completed"), G_CALLBACK(emfv_popup_flag_completed), NULL, NULL, EM_POPUP_SELECT_FLAG_COMPLETED },
- { EM_POPUP_ITEM, "20.emfv.02", N_("Cl_ear Flag"), G_CALLBACK(emfv_popup_flag_clear), NULL, NULL, EM_POPUP_SELECT_FLAG_CLEAR },
-
- { EM_POPUP_BAR, "30.emfv" },
- { EM_POPUP_ITEM, "30.emfv.00", N_("Mar_k as Read"), G_CALLBACK(emfv_popup_mark_read), NULL, "mail-read.xpm", EM_POPUP_SELECT_MARK_READ },
- { EM_POPUP_ITEM, "30.emfv.01", N_("Mark as _Unread"), G_CALLBACK(emfv_popup_mark_unread), NULL, "mail-new.xpm", EM_POPUP_SELECT_MARK_UNREAD },
- { EM_POPUP_ITEM, "30.emfv.02", N_("Mark as _Important"), G_CALLBACK(emfv_popup_mark_important), NULL, "priority-high.xpm", EM_POPUP_SELECT_MARK_IMPORTANT },
- { EM_POPUP_ITEM, "30.emfv.03", N_("_Mark as Unimportant"), G_CALLBACK(emfv_popup_mark_unimportant), NULL, NULL, EM_POPUP_SELECT_MARK_UNIMPORTANT },
- { EM_POPUP_ITEM, "30.emfv.04", N_("Mark as _Junk"), G_CALLBACK(emfv_popup_mark_junk), NULL, NULL, EM_POPUP_SELECT_MARK_JUNK },
- { EM_POPUP_ITEM, "30.emfv.05", N_("Mark as _Not Junk"), G_CALLBACK(emfv_popup_mark_nojunk), NULL, NULL, EM_POPUP_SELECT_MARK_NOJUNK },
-
- { EM_POPUP_BAR, "40.emfv" },
- { EM_POPUP_ITEM, "40.emfv.00", N_("_Delete"), G_CALLBACK(emfv_popup_delete), NULL, "evolution-trash-mini.png", EM_POPUP_SELECT_DELETE },
- { EM_POPUP_ITEM, "40.emfv.01", N_("U_ndelete"), G_CALLBACK(emfv_popup_undelete), NULL, "undelete_message-16.png", EM_POPUP_SELECT_UNDELETE },
-
- { EM_POPUP_BAR, "50.emfv" },
- { EM_POPUP_ITEM, "50.emfv.00", N_("Mo_ve to Folder..."), G_CALLBACK(emfv_popup_move) },
- { EM_POPUP_ITEM, "50.emfv.01", N_("_Copy to Folder..."), G_CALLBACK(emfv_popup_copy) },
-
- { EM_POPUP_BAR, "60.label" },
- { EM_POPUP_SUBMENU, "60.label.00", N_("Label") },
- { EM_POPUP_IMAGE, "60.label.00/00.label", N_("None"), G_CALLBACK(emfv_popup_label_clear) },
- { EM_POPUP_BAR, "60.label.00/00.label.00" },
-
- { EM_POPUP_BAR, "70.emfv", NULL, NULL, NULL, NULL, EM_POPUP_SELECT_ONE },
- { EM_POPUP_ITEM, "70.emfv.00", N_("Add Sender to Address_book"), G_CALLBACK(emfv_popup_add_sender), NULL, NULL, EM_POPUP_SELECT_ONE|EM_POPUP_SELECT_ADD_SENDER },
-
- { EM_POPUP_BAR, "80.emfv" },
- { EM_POPUP_ITEM, "80.emfv.00", N_("Appl_y Filters"), G_CALLBACK(emfv_popup_apply_filters) },
-
- { EM_POPUP_BAR, "90.filter", NULL, NULL, NULL, NULL, EM_POPUP_SELECT_ONE },
- { EM_POPUP_SUBMENU, "90.filter.00", N_("Crea_te Rule From Message"), NULL, NULL, NULL, EM_POPUP_SELECT_ONE },
- { EM_POPUP_ITEM, "90.filter.00/00.00", N_("VFolder on _Subject"), G_CALLBACK(emfv_popup_vfolder_subject), NULL, NULL, EM_POPUP_SELECT_ONE },
- { EM_POPUP_ITEM, "90.filter.00/00.01", N_("VFolder on Se_nder"), G_CALLBACK(emfv_popup_vfolder_sender), NULL, NULL, EM_POPUP_SELECT_ONE },
- { EM_POPUP_ITEM, "90.filter.00/00.02", N_("VFolder on _Recipients"), G_CALLBACK(emfv_popup_vfolder_recipients), NULL, NULL, EM_POPUP_SELECT_ONE },
- { EM_POPUP_ITEM, "90.filter.00/00.03", N_("VFolder on Mailing _List"),
- G_CALLBACK(emfv_popup_vfolder_mlist), NULL, NULL, EM_POPUP_SELECT_ONE|EM_POPUP_SELECT_MAILING_LIST },
- { EM_POPUP_ITEM, "90.filter.00/00.04", N_("VFolder on Thread"),
- G_CALLBACK(emfv_popup_vfolder_thread), NULL, NULL, EM_POPUP_SELECT_ONE },
-
- { EM_POPUP_BAR, "90.filter.00/10", NULL, NULL, NULL, NULL, EM_POPUP_SELECT_ONE },
- { EM_POPUP_ITEM, "90.filter.00/10.00", N_("Filter on Sub_ject"), G_CALLBACK(emfv_popup_filter_subject), NULL, NULL, EM_POPUP_SELECT_ONE },
- { EM_POPUP_ITEM, "90.filter.00/10.01", N_("Filter on Sen_der"), G_CALLBACK(emfv_popup_filter_sender), NULL, NULL, EM_POPUP_SELECT_ONE },
- { EM_POPUP_ITEM, "90.filter.00/10.02", N_("Filter on Re_cipients"), G_CALLBACK(emfv_popup_filter_recipients), NULL, NULL, EM_POPUP_SELECT_ONE },
- { EM_POPUP_ITEM, "90.filter.00/10.03", N_("Filter on _Mailing List"),
- G_CALLBACK(emfv_popup_filter_mlist), NULL, NULL, EM_POPUP_SELECT_ONE|EM_POPUP_SELECT_MAILING_LIST },
- { EM_POPUP_ITEM, "90.filter.00/10.04", N_("Filter on Thread"),
- G_CALLBACK(emfv_popup_filter_thread), NULL, NULL, EM_POPUP_SELECT_ONE },
-};
-
-static void
-emfv_popup_labels_free(void *data)
-{
- GSList *l = data;
-
- while (l) {
- GSList *n = l->next;
- struct _emfv_label_item *item = l->data;
-
- g_free(item->item.path);
- g_free(item);
-
- g_slist_free_1(l);
- l = n;
- }
-}
-
-static void
-emfv_popup(EMFolderView *emfv, GdkEvent *event)
-{
- GSList *menus = NULL, *l, *label_list = NULL;
- GtkMenu *menu;
- EMPopup *emp;
- EMPopupTarget *target;
- int i;
-
- emp = em_popup_new("com.ximian.mail.folderview.popup.select");
- target = em_folder_view_get_popup_target(emfv);
-
- for (i=0;i<sizeof(emfv_popup_menu)/sizeof(emfv_popup_menu[0]);i++) {
- EMPopupItem *item = &emfv_popup_menu[i];
-
- item->activate_data = emfv;
- menus = g_slist_prepend(menus, item);
- }
-
- em_popup_add_items(emp, menus, (GDestroyNotify)g_slist_free);
-
- i = 1;
- for (l = mail_config_get_labels(); l; l = l->next) {
- struct _emfv_label_item *item;
- MailConfigLabel *label = l->data;
- GdkPixmap *pixmap;
- GdkColor colour;
- GdkGC *gc;
-
- item = g_malloc0(sizeof(*item));
- item->item.type = EM_POPUP_IMAGE;
- item->item.path = g_strdup_printf("60.label.00/00.label.%02d", i++);
- item->item.label = label->name;
- item->item.activate = G_CALLBACK(emfv_popup_label_set);
- item->item.activate_data = item;
- item->emfv = emfv;
- item->label = label->tag;
-
- gdk_color_parse(label->colour, &colour);
- gdk_color_alloc(gdk_colormap_get_system(), &colour);
-
- pixmap = gdk_pixmap_new(((GtkWidget *)emfv)->window, 16, 16, -1);
- gc = gdk_gc_new(((GtkWidget *)emfv)->window);
- gdk_gc_set_foreground(gc, &colour);
- gdk_draw_rectangle(pixmap, gc, TRUE, 0, 0, 16, 16);
- gdk_gc_unref(gc);
-
- item->item.image = gtk_image_new_from_pixmap(pixmap, NULL);
- gtk_widget_show(item->item.image);
-
- label_list = g_slist_prepend(label_list, item);
- }
-
- em_popup_add_items(emp, label_list, emfv_popup_labels_free);
-
- menu = em_popup_create_menu_once(emp, target, target->mask, target->mask);
-
- if (event == NULL || event->type == GDK_KEY_PRESS) {
- /* FIXME: menu pos function */
- gtk_menu_popup(menu, NULL, NULL, NULL, NULL, 0, event->key.time);
- } else {
- gtk_menu_popup(menu, NULL, NULL, NULL, NULL, event->button.button, event->button.time);
- }
-}
-
-/* ********************************************************************** */
-
-/* Bonobo menu's */
-
-/* a lot of stuff maps directly to the popup menu equivalent */
-#define EMFV_MAP_CALLBACK(from, to) \
-static void \
-from(BonoboUIComponent *uid, void *data, const char *path) \
-{ \
- to(NULL, (EMFolderView *)data); \
-}
-
-EMFV_MAP_CALLBACK(emfv_add_sender_addressbook, emfv_popup_add_sender)
-EMFV_MAP_CALLBACK(emfv_message_apply_filters, emfv_popup_apply_filters)
-EMFV_MAP_CALLBACK(emfv_message_copy, emfv_popup_copy)
-EMFV_MAP_CALLBACK(emfv_message_move, emfv_popup_move)
-EMFV_MAP_CALLBACK(emfv_message_forward, emfv_popup_forward)
-EMFV_MAP_CALLBACK(emfv_message_reply_all, emfv_popup_reply_all)
-EMFV_MAP_CALLBACK(emfv_message_reply_list, emfv_popup_reply_list)
-EMFV_MAP_CALLBACK(emfv_message_reply_sender, emfv_popup_reply_sender)
-EMFV_MAP_CALLBACK(emfv_message_mark_read, emfv_popup_mark_read)
-EMFV_MAP_CALLBACK(emfv_message_mark_unread, emfv_popup_mark_unread)
-EMFV_MAP_CALLBACK(emfv_message_mark_important, emfv_popup_mark_important)
-EMFV_MAP_CALLBACK(emfv_message_mark_unimportant, emfv_popup_mark_unimportant)
-EMFV_MAP_CALLBACK(emfv_message_mark_junk, emfv_popup_mark_junk)
-EMFV_MAP_CALLBACK(emfv_message_mark_nojunk, emfv_popup_mark_nojunk)
-EMFV_MAP_CALLBACK(emfv_message_delete, emfv_popup_delete)
-EMFV_MAP_CALLBACK(emfv_message_undelete, emfv_popup_undelete)
-EMFV_MAP_CALLBACK(emfv_message_followup_flag, emfv_popup_flag_followup)
-/*EMFV_MAP_CALLBACK(emfv_message_followup_clear, emfv_popup_flag_clear)
- EMFV_MAP_CALLBACK(emfv_message_followup_completed, emfv_popup_flag_completed)*/
-EMFV_MAP_CALLBACK(emfv_message_open, emfv_popup_open)
-EMFV_MAP_CALLBACK(emfv_message_resend, emfv_popup_resend)
-EMFV_MAP_CALLBACK(emfv_message_saveas, emfv_popup_saveas)
-EMFV_MAP_CALLBACK(emfv_print_message, emfv_popup_print)
-
-static void
-emfv_edit_cut(BonoboUIComponent *uid, void *data, const char *path)
-{
- EMFolderView *emfv = data;
-
- if (message_list_has_primary_selection(emfv->list))
- message_list_copy(emfv->list, TRUE);
- else if (emfv->preview_active)
- em_format_html_display_cut(emfv->preview);
-}
-
-static void
-emfv_edit_copy(BonoboUIComponent *uid, void *data, const char *path)
-{
- EMFolderView *emfv = data;
-
- if (message_list_has_primary_selection(emfv->list))
- message_list_copy(emfv->list, FALSE);
- else if (emfv->preview_active)
- em_format_html_display_copy(emfv->preview);
-}
-
-static void
-emfv_edit_paste(BonoboUIComponent *uid, void *data, const char *path)
-{
- EMFolderView *emfv = data;
-
- message_list_paste(emfv->list);
-}
-
-static void
-emfv_mail_next(BonoboUIComponent *uid, void *data, const char *path)
-{
- EMFolderView *emfv = data;
-
- message_list_select(emfv->list, MESSAGE_LIST_SELECT_NEXT, 0, 0, FALSE);
-}
-
-static void
-emfv_mail_next_flagged(BonoboUIComponent *uid, void *data, const char *path)
-{
- EMFolderView *emfv = data;
-
- message_list_select(emfv->list, MESSAGE_LIST_SELECT_NEXT, CAMEL_MESSAGE_FLAGGED, CAMEL_MESSAGE_FLAGGED, FALSE);
-}
-
-static void
-emfv_mail_next_unread(BonoboUIComponent *uid, void *data, const char *path)
-{
- EMFolderView *emfv = data;
-
- message_list_select(emfv->list, MESSAGE_LIST_SELECT_NEXT, 0, CAMEL_MESSAGE_SEEN, TRUE);
-}
-
-static void
-emfv_mail_next_thread(BonoboUIComponent *uid, void *data, const char *path)
-{
- EMFolderView *emfv = data;
-
- message_list_select_next_thread(emfv->list);
-}
-
-static void
-emfv_mail_previous(BonoboUIComponent *uid, void *data, const char *path)
-{
- EMFolderView *emfv = data;
-
- message_list_select(emfv->list, MESSAGE_LIST_SELECT_PREVIOUS, 0, 0, FALSE);
-}
-
-static void
-emfv_mail_previous_flagged(BonoboUIComponent *uid, void *data, const char *path)
-{
- EMFolderView *emfv = data;
-
- message_list_select(emfv->list, MESSAGE_LIST_SELECT_PREVIOUS, CAMEL_MESSAGE_FLAGGED, CAMEL_MESSAGE_FLAGGED, TRUE);
-}
-
-static void
-emfv_mail_previous_unread(BonoboUIComponent *uid, void *data, const char *path)
-{
- EMFolderView *emfv = data;
-
- message_list_select(emfv->list, MESSAGE_LIST_SELECT_PREVIOUS, 0, CAMEL_MESSAGE_SEEN, TRUE);
-}
-
-static void
-emfv_message_forward_attached (BonoboUIComponent *uic, void *data, const char *path)
-{
- EMFolderView *emfv = data;
- GPtrArray *uids;
-
- if (!em_utils_check_user_can_send_mail ((GtkWidget *) emfv))
- return;
-
- uids = message_list_get_selected (emfv->list);
- em_utils_forward_attached (emfv->folder, uids);
-}
-
-static void
-emfv_message_forward_inline (BonoboUIComponent *uic, void *data, const char *path)
-{
- EMFolderView *emfv = data;
- GPtrArray *uids;
-
- if (!em_utils_check_user_can_send_mail ((GtkWidget *) emfv))
- return;
-
- uids = message_list_get_selected (emfv->list);
- em_utils_forward_inline (emfv->folder, uids);
-}
-
-static void
-emfv_message_forward_quoted (BonoboUIComponent *uic, void *data, const char *path)
-{
- EMFolderView *emfv = data;
- GPtrArray *uids;
-
- if (!em_utils_check_user_can_send_mail ((GtkWidget *) emfv))
- return;
-
- uids = message_list_get_selected (emfv->list);
- em_utils_forward_quoted (emfv->folder, uids);
-}
-
-static void
-emfv_message_redirect (BonoboUIComponent *uic, void *data, const char *path)
-{
- EMFolderView *emfv = data;
-
- if (emfv->list->cursor_uid == NULL)
- return;
-
- if (!em_utils_check_user_can_send_mail ((GtkWidget *) emfv))
- return;
-
- em_utils_redirect_message_by_uid (emfv->folder, emfv->list->cursor_uid);
-}
-
-static void
-emfv_message_post_reply (BonoboUIComponent *uic, void *data, const char *path)
-{
- EMFolderView *emfv = data;
-
- if (emfv->list->cursor_uid == NULL)
- return;
-
- if (!em_utils_check_user_can_send_mail ((GtkWidget *) emfv))
- return;
-
- em_utils_post_reply_to_message_by_uid (emfv->folder, emfv->list->cursor_uid);
-}
-
-static void
-emfv_message_reply(EMFolderView *emfv, int mode)
-{
- /* GtkClipboard *clip; */
-
- if (emfv->list->cursor_uid == NULL)
- return;
-
- if (!em_utils_check_user_can_send_mail ((GtkWidget *) emfv))
- return;
-
- /* Look away! Look away! */
-
- /* HACK: Nasty internal gtkhtml poking going on here */
-
- /* Disabled since there's no simple way to find out if
- gtkhtml has the primary selection right now */
-
- /* Ugh, to use the clipboard we need to request the selection
- and have an async callback - painful to deal with */
-
- /*clip = gtk_clipboard_get(GDK_SELECTION_PRIMARY);*/
- if (FALSE /*gtk_clipboard_get_owner(clip) == (GObject *)emfv->preview*/
- && ((EMFormatHTML *)emfv->preview)->html->engine->primary) {
- CamelMimeMessage *msg, *src;
- struct _camel_header_raw *header;
- HTMLEngineSaveState *state;
-
- src = (CamelMimeMessage *)((EMFormat *)emfv->preview)->message;
- msg = camel_mime_message_new();
-
- header = ((CamelMimePart *)src)->headers;
- while (header) {
- /* FIXME: shouldn't we strip out *all* Content-* headers? */
- if (g_ascii_strcasecmp(header->name, "content-type") != 0)
- camel_medium_add_header((CamelMedium *)msg, header->name, header->value);
- header = header->next;
- }
-
- state = html_engine_save_buffer_new(((EMFormatHTML *)emfv->preview)->html->engine, TRUE);
- html_object_save(((EMFormatHTML *)emfv->preview)->html->engine->primary, state);
- camel_mime_part_set_content((CamelMimePart *)msg,
- ((GString *)state->user_data)->str,
- ((GString *)state->user_data)->len,
- "text/html");
-
- html_engine_save_buffer_free(state);
-
- em_utils_reply_to_message (msg, mode);
- camel_object_unref(msg);
- } else {
- em_utils_reply_to_message_by_uid (emfv->folder, emfv->list->cursor_uid, mode);
- }
-
- /*g_object_unref(clip);*/
-}
-
-static void
-emfv_message_search(BonoboUIComponent *uic, void *data, const char *path)
-{
- EMFolderView *emfv = data;
-
- em_format_html_display_search(emfv->preview);
-}
-
-static void
-emfv_print_preview_message(BonoboUIComponent *uic, void *data, const char *path)
-{
- EMFolderView *emfv = data;
-
- em_folder_view_print(emfv, TRUE);
-}
-
-static void
-emfv_text_zoom_in(BonoboUIComponent *uic, void *data, const char *path)
-{
- EMFolderView *emfv = data;
-
- if (emfv->preview)
- em_format_html_display_zoom_in(emfv->preview);
-}
-
-static void
-emfv_text_zoom_out(BonoboUIComponent *uic, void *data, const char *path)
-{
- EMFolderView *emfv = data;
-
- if (emfv->preview)
- em_format_html_display_zoom_out(emfv->preview);
-}
-
-static void
-emfv_text_zoom_reset(BonoboUIComponent *uic, void *data, const char *path)
-{
- EMFolderView *emfv = data;
-
- if (emfv->preview)
- em_format_html_display_zoom_reset(emfv->preview);
-}
-
-/* ********************************************************************** */
-
-struct _filter_data {
- CamelFolder *folder;
- const char *source;
- char *uid;
- int type;
- char *uri;
- char *mlist;
- char *references;
-};
-
-static void
-filter_data_free (struct _filter_data *fdata)
-{
- g_free (fdata->uid);
- g_free (fdata->uri);
- if (fdata->folder)
- camel_object_unref (fdata->folder);
- g_free (fdata->mlist);
- g_free (fdata->references);
- g_free (fdata);
-}
-
-static void
-filter_type_got_message (CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *user_data)
-{
- struct _filter_data *data = user_data;
-
- if (msg)
- filter_gui_add_from_message (msg, data->source, data->type);
-
- filter_data_free (data);
-}
-
-static void
-filter_type_uid (CamelFolder *folder, const char *uid, const char *source, int type)
-{
- struct _filter_data *data;
-
- data = g_malloc0 (sizeof (*data));
- data->type = type;
- data->source = source;
-
- mail_get_message (folder, uid, filter_type_got_message, data, mail_thread_new);
-}
-
-static void
-filter_type_current (EMFolderView *emfv, int type)
-{
- const char *source;
- GPtrArray *uids;
-
- if (em_utils_folder_is_sent (emfv->folder, emfv->folder_uri)
- || em_utils_folder_is_outbox (emfv->folder, emfv->folder_uri))
- source = FILTER_SOURCE_OUTGOING;
- else
- source = FILTER_SOURCE_INCOMING;
-
- uids = message_list_get_selected (emfv->list);
-
- if (uids->len == 1)
- filter_type_uid (emfv->folder, (char *) uids->pdata[0], source, type);
-
- em_utils_uids_free (uids);
-}
-
-EMFV_MAP_CALLBACK(emfv_tools_filter_subject, emfv_popup_filter_subject)
-EMFV_MAP_CALLBACK(emfv_tools_filter_sender, emfv_popup_filter_sender)
-EMFV_MAP_CALLBACK(emfv_tools_filter_recipient, emfv_popup_filter_recipients)
-EMFV_MAP_CALLBACK(emfv_tools_filter_mlist, emfv_popup_filter_mlist)
-EMFV_MAP_CALLBACK(emfv_tools_filter_thread, emfv_popup_filter_thread)
-
-static void
-vfolder_type_got_message (CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *user_data)
-{
- struct _filter_data *data = user_data;
-
- if (msg)
- vfolder_gui_add_from_message (msg, data->type, data->uri);
-
- filter_data_free (data);
-}
-
-static void
-vfolder_type_uid (CamelFolder *folder, const char *uid, const char *uri, int type)
-{
- struct _filter_data *data;
-
- data = g_malloc0 (sizeof (*data));
- data->type = type;
- data->uri = g_strdup (uri);
-
- mail_get_message (folder, uid, vfolder_type_got_message, data, mail_thread_new);
-}
-
-static void
-vfolder_type_current (EMFolderView *emfv, int type)
-{
- GPtrArray *uids;
-
- uids = message_list_get_selected (emfv->list);
-
- if (uids->len == 1)
- vfolder_type_uid (emfv->folder, (char *) uids->pdata[0], emfv->folder_uri, type);
-
- em_utils_uids_free (uids);
-}
-
-EMFV_MAP_CALLBACK(emfv_tools_vfolder_subject, emfv_popup_vfolder_subject)
-EMFV_MAP_CALLBACK(emfv_tools_vfolder_sender, emfv_popup_vfolder_sender)
-EMFV_MAP_CALLBACK(emfv_tools_vfolder_recipient, emfv_popup_vfolder_recipients)
-EMFV_MAP_CALLBACK(emfv_tools_vfolder_mlist, emfv_popup_vfolder_mlist)
-EMFV_MAP_CALLBACK(emfv_tools_vfolder_thread, emfv_popup_vfolder_thread)
-
-/* ********************************************************************** */
-
-static void
-emfv_view_load_images(BonoboUIComponent *uic, void *data, const char *path)
-{
- EMFolderView *emfv = data;
-
- if (emfv->preview)
- em_format_html_load_http((EMFormatHTML *)emfv->preview);
-}
-
-static BonoboUIVerb emfv_message_verbs[] = {
- BONOBO_UI_UNSAFE_VERB ("EditCut", emfv_edit_cut),
- BONOBO_UI_UNSAFE_VERB ("EditCopy", emfv_edit_copy),
- BONOBO_UI_UNSAFE_VERB ("EditPaste", emfv_edit_paste),
-
- BONOBO_UI_UNSAFE_VERB ("MailNext", emfv_mail_next),
- BONOBO_UI_UNSAFE_VERB ("MailNextFlagged", emfv_mail_next_flagged),
- BONOBO_UI_UNSAFE_VERB ("MailNextUnread", emfv_mail_next_unread),
- BONOBO_UI_UNSAFE_VERB ("MailNextThread", emfv_mail_next_thread),
- BONOBO_UI_UNSAFE_VERB ("MailPrevious", emfv_mail_previous),
- BONOBO_UI_UNSAFE_VERB ("MailPreviousFlagged", emfv_mail_previous_flagged),
- BONOBO_UI_UNSAFE_VERB ("MailPreviousUnread", emfv_mail_previous_unread),
-
- BONOBO_UI_UNSAFE_VERB ("AddSenderToAddressbook", emfv_add_sender_addressbook),
-
- BONOBO_UI_UNSAFE_VERB ("MessageApplyFilters", emfv_message_apply_filters),
- BONOBO_UI_UNSAFE_VERB ("MessageCopy", emfv_message_copy),
- BONOBO_UI_UNSAFE_VERB ("MessageDelete", emfv_message_delete),
- BONOBO_UI_UNSAFE_VERB ("MessageForward", emfv_message_forward),
- BONOBO_UI_UNSAFE_VERB ("MessageForwardAttached", emfv_message_forward_attached),
- BONOBO_UI_UNSAFE_VERB ("MessageForwardInline", emfv_message_forward_inline),
- BONOBO_UI_UNSAFE_VERB ("MessageForwardQuoted", emfv_message_forward_quoted),
- BONOBO_UI_UNSAFE_VERB ("MessageRedirect", emfv_message_redirect),
- BONOBO_UI_UNSAFE_VERB ("MessageMarkAsRead", emfv_message_mark_read),
- BONOBO_UI_UNSAFE_VERB ("MessageMarkAsUnRead", emfv_message_mark_unread),
- BONOBO_UI_UNSAFE_VERB ("MessageMarkAsImportant", emfv_message_mark_important),
- BONOBO_UI_UNSAFE_VERB ("MessageMarkAsUnimportant", emfv_message_mark_unimportant),
- BONOBO_UI_UNSAFE_VERB ("MessageMarkAsJunk", emfv_message_mark_junk),
- BONOBO_UI_UNSAFE_VERB ("MessageMarkAsNotJunk", emfv_message_mark_nojunk),
- BONOBO_UI_UNSAFE_VERB ("MessageFollowUpFlag", emfv_message_followup_flag),
- BONOBO_UI_UNSAFE_VERB ("MessageMove", emfv_message_move),
- BONOBO_UI_UNSAFE_VERB ("MessageOpen", emfv_message_open),
- BONOBO_UI_UNSAFE_VERB ("MessagePostReply", emfv_message_post_reply),
- BONOBO_UI_UNSAFE_VERB ("MessageReplyAll", emfv_message_reply_all),
- BONOBO_UI_UNSAFE_VERB ("MessageReplyList", emfv_message_reply_list),
- BONOBO_UI_UNSAFE_VERB ("MessageReplySender", emfv_message_reply_sender),
- BONOBO_UI_UNSAFE_VERB ("MessageResend", emfv_message_resend),
- BONOBO_UI_UNSAFE_VERB ("MessageSaveAs", emfv_message_saveas),
- BONOBO_UI_UNSAFE_VERB ("MessageSearch", emfv_message_search),
- BONOBO_UI_UNSAFE_VERB ("MessageUndelete", emfv_message_undelete),
-
- BONOBO_UI_UNSAFE_VERB ("PrintMessage", emfv_print_message),
- BONOBO_UI_UNSAFE_VERB ("PrintPreviewMessage", emfv_print_preview_message),
-
- BONOBO_UI_UNSAFE_VERB ("TextZoomIn", emfv_text_zoom_in),
- BONOBO_UI_UNSAFE_VERB ("TextZoomOut", emfv_text_zoom_out),
- BONOBO_UI_UNSAFE_VERB ("TextZoomReset", emfv_text_zoom_reset),
-
- /* TODO: This stuff should just be 1 item that runs a wizard */
- BONOBO_UI_UNSAFE_VERB ("ToolsFilterMailingList", emfv_tools_filter_mlist),
- BONOBO_UI_UNSAFE_VERB ("ToolsFilterRecipient", emfv_tools_filter_recipient),
- BONOBO_UI_UNSAFE_VERB ("ToolsFilterSender", emfv_tools_filter_sender),
- BONOBO_UI_UNSAFE_VERB ("ToolsFilterSubject", emfv_tools_filter_subject),
- BONOBO_UI_UNSAFE_VERB ("ToolsFilterThread", emfv_tools_filter_thread),
- BONOBO_UI_UNSAFE_VERB ("ToolsVFolderMailingList", emfv_tools_vfolder_mlist),
- BONOBO_UI_UNSAFE_VERB ("ToolsVFolderRecipient", emfv_tools_vfolder_recipient),
- BONOBO_UI_UNSAFE_VERB ("ToolsVFolderSender", emfv_tools_vfolder_sender),
- BONOBO_UI_UNSAFE_VERB ("ToolsVFolderSubject", emfv_tools_vfolder_subject),
- BONOBO_UI_UNSAFE_VERB ("ToolsVFolderThread", emfv_tools_vfolder_thread),
-
- BONOBO_UI_UNSAFE_VERB ("ViewLoadImages", emfv_view_load_images),
- /* ViewHeaders stuff is a radio */
- /* CaretMode is a toggle */
-
- BONOBO_UI_VERB_END
-};
-static EPixmap emfv_message_pixmaps[] = {
- E_PIXMAP ("/commands/EditCut", "16_cut.png"),
- E_PIXMAP ("/commands/EditCopy", "16_copy.png"),
- E_PIXMAP ("/commands/EditPaste", "16_paste.png"),
-
- 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 ("/commands/MessageMarkAsRead", "mail-read.xpm"),
- E_PIXMAP ("/commands/MessageMarkAsUnRead", "mail-new.xpm"),
- E_PIXMAP ("/commands/MessageMarkAsImportant", "priority-high.xpm"),
- E_PIXMAP ("/commands/MessageFollowUpFlag", "flag-for-followup-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/MailMessageToolbar/MessageMarkAsJunk", "stock-junk-24.png"),
- E_PIXMAP ("/Toolbar/MailMessageToolbar/MessageMarkAsNotJunk", "stock-notjunk-24.png"),
-
- E_PIXMAP ("/Toolbar/MailNextButtons/MailNext", "buttons/next-message.png"),
- E_PIXMAP ("/Toolbar/MailNextButtons/MailPrevious", "buttons/previous-message.png"),
-
- E_PIXMAP_END
-};
-
-/* this is added to emfv->enable_map in :init() */
-static const EMFolderViewEnable emfv_enable_map[] = {
- { "EditCut", EM_POPUP_SELECT_MANY },
- { "EditCopy", EM_POPUP_SELECT_MANY },
- { "EditPaste", 0 },
-
- /* FIXME: should these be single-selection? */
- { "MailNext", EM_POPUP_SELECT_MANY },
- { "MailNextFlagged", EM_POPUP_SELECT_MANY },
- { "MailNextUnread", EM_POPUP_SELECT_MANY },
- { "MailNextThread", EM_POPUP_SELECT_MANY },
- { "MailPrevious", EM_POPUP_SELECT_MANY },
- { "MailPreviousFlagged", EM_POPUP_SELECT_MANY },
- { "MailPreviousUnread", EM_POPUP_SELECT_MANY },
-
- { "AddSenderToAddressbook", EM_POPUP_SELECT_ADD_SENDER },
-
- { "MessageApplyFilters", EM_POPUP_SELECT_MANY },
- { "MessageCopy", EM_POPUP_SELECT_MANY },
- { "MessageDelete", EM_POPUP_SELECT_MANY|EM_POPUP_SELECT_DELETE },
- { "MessageForward", EM_POPUP_SELECT_MANY },
- { "MessageForwardAttached", EM_POPUP_SELECT_MANY },
- { "MessageForwardInline", EM_POPUP_SELECT_ONE },
- { "MessageForwardQuoted", EM_POPUP_SELECT_ONE },
- { "MessageRedirect", EM_POPUP_SELECT_ONE },
- { "MessageMarkAsRead", EM_POPUP_SELECT_MANY|EM_POPUP_SELECT_MARK_READ },
- { "MessageMarkAsUnRead", EM_POPUP_SELECT_MANY|EM_POPUP_SELECT_MARK_UNREAD },
- { "MessageMarkAsImportant", EM_POPUP_SELECT_MANY|EM_POPUP_SELECT_MARK_IMPORTANT },
- { "MessageMarkAsUnimportant", EM_POPUP_SELECT_MANY|EM_POPUP_SELECT_MARK_UNIMPORTANT },
- { "MessageMarkAsJunk", EM_POPUP_SELECT_MANY|EM_POPUP_SELECT_MARK_JUNK },
- { "MessageMarkAsNotJunk", EM_POPUP_SELECT_MANY|EM_POPUP_SELECT_MARK_NOJUNK },
- { "MessageFollowUpFlag", EM_POPUP_SELECT_MANY },
- { "MessageMove", EM_POPUP_SELECT_MANY },
- { "MessageOpen", EM_POPUP_SELECT_MANY },
- { "MessagePostReply", EM_POPUP_SELECT_ONE },
- { "MessageReplyAll", EM_POPUP_SELECT_ONE },
- { "MessageReplyList", EM_POPUP_SELECT_ONE|EM_POPUP_SELECT_MAILING_LIST },
- { "MessageReplySender", EM_POPUP_SELECT_ONE },
- { "MessageResend", EM_POPUP_SELECT_RESEND },
- { "MessageSaveAs", EM_POPUP_SELECT_MANY },
- { "MessageSearch", EM_POPUP_SELECT_ONE },
- { "MessageUndelete", EM_POPUP_SELECT_MANY|EM_POPUP_SELECT_UNDELETE },
- { "PrintMessage", EM_POPUP_SELECT_ONE },
- { "PrintPreviewMessage", EM_POPUP_SELECT_ONE },
-
- { "TextZoomIn", EM_POPUP_SELECT_ONE },
- { "TextZoomOut", EM_POPUP_SELECT_ONE },
- { "TextZoomReset", EM_POPUP_SELECT_ONE },
-
- { "ToolsFilterMailingList", EM_POPUP_SELECT_ONE },
- { "ToolsFilterRecipient", EM_POPUP_SELECT_ONE },
- { "ToolsFilterSender", EM_POPUP_SELECT_ONE },
- { "ToolsFilterSubject", EM_POPUP_SELECT_ONE },
- { "ToolsFilterThread", EM_POPUP_SELECT_ONE },
- { "ToolsVFolderMailingList", EM_POPUP_SELECT_ONE },
- { "ToolsVFolderRecipient", EM_POPUP_SELECT_ONE },
- { "ToolsVFolderSender", EM_POPUP_SELECT_ONE },
- { "ToolsVFolderSubject", EM_POPUP_SELECT_ONE },
- { "ToolsVFolderThread", EM_POPUP_SELECT_ONE },
-
- { "ViewLoadImages", EM_POPUP_SELECT_ONE },
-
- { NULL },
-
- /* always enabled
-
- { "ViewFullHeaders", IS_0MESSAGE, 0 },
- { "ViewNormal", IS_0MESSAGE, 0 },
- { "ViewSource", IS_0MESSAGE, 0 },
- { "CaretMode", IS_0MESSAGE, 0 }, */
-};
-
-static void
-emfv_enable_menus(EMFolderView *emfv)
-{
- guint32 disable_mask;
- GString *name;
- GSList *l;
- EMPopupTarget *t;
-
- if (emfv->uic == NULL)
- return;
-
- if (emfv->folder) {
- t = em_folder_view_get_popup_target(emfv);
- disable_mask = t->mask;
- em_popup_target_free(t);
- } else {
- disable_mask = ~0;
- }
-
- name = g_string_new("");
- for (l = emfv->enable_map; l; l = l->next) {
- EMFolderViewEnable *map = l->data;
- int i;
-
- for (i=0;map[i].name;i++) {
- int state = (map[i].mask & disable_mask) == 0;
-
- g_string_printf(name, "/commands/%s", map[i].name);
- bonobo_ui_component_set_prop(emfv->uic, name->str, "sensitive", state?"1":"0", NULL);
- }
- }
-
- g_string_free(name, TRUE);
-}
-
-/* must match em_format_mode_t order */
-static const char * const emfv_display_styles[] = {
- "/commands/ViewNormal",
- "/commands/ViewFullHeaders",
- "/commands/ViewSource"
-};
-
-static void
-emfv_view_mode(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_EventType type, const char *state, void *data)
-{
- EMFolderView *emfv = data;
- int i;
-
- if (type != Bonobo_UIComponent_STATE_CHANGED
- || state[0] == '0')
- return;
-
- /* TODO: I don't like this stuff much, is there any way we can move listening for such events
- elsehwere? Probably not I guess, unless there's a EMFolderViewContainer for bonobo usage
- of a folder view */
-
- for (i=0;i<= EM_FORMAT_SOURCE;i++) {
- if (strcmp(emfv_display_styles[i]+strlen("/commands/"), path) == 0) {
- em_format_set_mode((EMFormat *)emfv->preview, i);
-
- if (TRUE /* set preferences but not for EMMessageBrowser? */) {
- GConfClient *gconf = mail_config_get_gconf_client ();
-
- gconf_client_set_int (gconf, "/apps/evolution/mail/display/message_style", i, NULL);
- }
- break;
- }
- }
-}
-
-static void
-emfv_caret_mode(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_EventType type, const char *state, void *data)
-{
- EMFolderView *emfv = data;
-
- if (type != Bonobo_UIComponent_STATE_CHANGED)
- return;
-
- em_format_html_display_set_caret_mode(emfv->preview, state[0] != '0');
-
- gconf_client_set_bool(mail_config_get_gconf_client(), "/apps/evolution/mail/display/caret_mode", state[0] != '0', NULL);
-}
-
-static void
-emfv_charset_changed(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_EventType type, const char *state, void *data)
-{
- EMFolderView *emfv = data;
-
- if (type != Bonobo_UIComponent_STATE_CHANGED)
- return;
-
- /* menu items begin with "Charset-" = 8 characters */
- if (state[0] != '0' && strlen(path) > 8) {
- path += 8;
- /* default charset used in mail view */
- if (!strcmp(path, _("Default")))
- path = NULL;
-
- em_format_set_charset((EMFormat *)emfv->preview, path);
- }
-}
-
-static void
-emfv_activate(EMFolderView *emfv, BonoboUIComponent *uic, int act)
-{
- if (act) {
- em_format_mode_t style;
- gboolean state;
- GSList *l;
-
- emfv->uic = uic;
-
- for (l = emfv->ui_files;l;l = l->next)
- bonobo_ui_util_set_ui(uic, PREFIX, (char *)l->data, emfv->ui_app_name, NULL);
-
- bonobo_ui_component_add_verb_list_with_data(uic, emfv_message_verbs, emfv);
- e_pixmaps_update(uic, emfv_message_pixmaps);
-
- state = emfv->preview->caret_mode;
- bonobo_ui_component_set_prop(uic, "/commands/CaretMode", "state", state?"1":"0", NULL);
- bonobo_ui_component_add_listener(uic, "CaretMode", emfv_caret_mode, emfv);
-
- style = ((EMFormat *)emfv->preview)->mode;
- bonobo_ui_component_set_prop(uic, emfv_display_styles[style], "state", "1", NULL);
- bonobo_ui_component_add_listener(uic, "ViewNormal", emfv_view_mode, emfv);
- bonobo_ui_component_add_listener(uic, "ViewFullHeaders", emfv_view_mode, emfv);
- bonobo_ui_component_add_listener(uic, "ViewSource", emfv_view_mode, emfv);
- em_format_set_mode((EMFormat *)emfv->preview, style);
-
- if (emfv->folder && !em_utils_folder_is_sent(emfv->folder, emfv->folder_uri))
- bonobo_ui_component_set_prop(uic, "/commands/MessageResend", "sensitive", "0", NULL);
-
- /* default charset used in mail view */
- e_charset_picker_bonobo_ui_populate (uic, "/menu/View", _("Default"), emfv_charset_changed, emfv);
-
- emfv_enable_menus(emfv);
- } else {
- const BonoboUIVerb *v;
-
- /* TODO: Should this just rm /? */
- for (v = &emfv_message_verbs[0]; v->cname; v++)
- bonobo_ui_component_remove_verb(uic, v->cname);
-
- if (emfv->folder)
- mail_sync_folder(emfv->folder, NULL, NULL);
-
- emfv->uic = NULL;
- }
-}
-
-int em_folder_view_print(EMFolderView *emfv, int preview)
-{
- /*struct _EMFolderViewPrivate *p = emfv->priv;*/
- EMFormatHTMLPrint *print;
- GnomePrintConfig *config = NULL;
- int res;
- struct _CamelMedium *msg;
-
- /* FIXME: need to load the message first */
- if (!emfv->preview_active)
- return 0;
-
- msg = emfv->preview->formathtml.format.message;
- if (msg == NULL)
- return 0;
-
- if (!preview) {
- GtkDialog *dialog = (GtkDialog *)gnome_print_dialog_new(NULL, _("Print Message"), GNOME_PRINT_DIALOG_COPIES);
-
- gtk_dialog_set_default_response(dialog, GNOME_PRINT_DIALOG_RESPONSE_PRINT);
- e_dialog_set_transient_for ((GtkWindow *) dialog, (GtkWidget *) emfv);
-
- switch (gtk_dialog_run(dialog)) {
- case GNOME_PRINT_DIALOG_RESPONSE_PRINT:
- break;
- case GNOME_PRINT_DIALOG_RESPONSE_PREVIEW:
- preview = TRUE;
- break;
- default:
- gtk_widget_destroy((GtkWidget *)dialog);
- return 0;
- }
-
- config = gnome_print_dialog_get_config((GnomePrintDialog *)dialog);
- gtk_widget_destroy((GtkWidget *)dialog);
- }
-
- print = em_format_html_print_new();
- em_format_set_session((EMFormat *)print, ((EMFormat *)emfv->preview)->session);
- res = em_format_html_print_print(print, msg, (EMFormatHTML *)emfv->preview, config, preview);
- g_object_unref(print);
- if (config)
- g_object_unref(config);
-
- return res;
-}
-
-EMPopupTarget *
-em_folder_view_get_popup_target(EMFolderView *emfv)
-{
- EMPopupTarget *t;
-
- t = em_popup_target_new_select(emfv->folder, emfv->folder_uri, message_list_get_selected(emfv->list));
- t->widget = (GtkWidget *)emfv;
-
- if (emfv->list->threaded)
- t->mask &= ~EM_FOLDER_VIEW_SELECT_THREADED;
-
- if (message_list_hidden(emfv->list) != 0)
- t->mask &= ~EM_FOLDER_VIEW_SELECT_HIDDEN;
-
- return t;
-}
-
-/* ********************************************************************** */
-
-struct mst_t {
- EMFolderView *emfv;
- char *uid;
-};
-
-static void
-mst_free (struct mst_t *mst)
-{
- mst->emfv->priv->seen_id = 0;
-
- g_free (mst->uid);
- g_free (mst);
-}
-
-static int
-do_mark_seen (gpointer user_data)
-{
- struct mst_t *mst = user_data;
- EMFolderView *emfv = mst->emfv;
- MessageList *list = emfv->list;
-
- if (mst->uid && list->cursor_uid && !strcmp (mst->uid, list->cursor_uid))
- camel_folder_set_message_flags (emfv->folder, mst->uid, CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN);
-
- return FALSE;
-}
-
-static void
-emfv_list_done_message_selected(CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *data)
-{
- EMFolderView *emfv = data;
-
- em_format_format((EMFormat *)emfv->preview, (struct _CamelMedium *)msg);
-
- if (emfv->priv->seen_id)
- g_source_remove(emfv->priv->seen_id);
-
- if (msg && emfv->mark_seen) {
- if (emfv->mark_seen_timeout > 0) {
- struct mst_t *mst;
-
- mst = g_new (struct mst_t, 1);
- mst->emfv = emfv;
- mst->uid = g_strdup (uid);
-
- emfv->priv->seen_id = g_timeout_add_full(G_PRIORITY_DEFAULT_IDLE, emfv->mark_seen_timeout,
- (GSourceFunc)do_mark_seen, mst, (GDestroyNotify)mst_free);
- } else {
- camel_folder_set_message_flags(emfv->folder, uid, CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN);
- }
- }
-}
-
-static void
-emfv_list_message_selected(MessageList *ml, const char *uid, EMFolderView *emfv)
-{
- /* FIXME: ui stuff based on messageinfo, if available */
-
- if (emfv->preview_active) {
- if (uid) {
- if (emfv->priv->displayed_uid == NULL || strcmp(emfv->priv->displayed_uid, uid) != 0) {
- g_free(emfv->priv->displayed_uid);
- emfv->priv->displayed_uid = g_strdup(uid);
- mail_get_message(emfv->folder, uid, emfv_list_done_message_selected, emfv, mail_thread_new);
- }
- } else {
- g_free(emfv->priv->displayed_uid);
- emfv->priv->displayed_uid = NULL;
- em_format_format((EMFormat *)emfv->preview, NULL);
- }
- }
-
- emfv_enable_menus(emfv);
-}
-
-static void
-emfv_list_double_click(ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, EMFolderView *emfv)
-{
- /* Ignore double-clicks on columns that handle thier own state */
- if (MESSAGE_LIST_COLUMN_IS_ACTIVE (col))
- return;
-
- em_folder_view_open_selected(emfv);
-}
-
-static int
-emfv_list_right_click(ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, EMFolderView *emfv)
-{
- emfv_popup(emfv, event);
-
- return TRUE;
-}
-
-static int
-emfv_list_key_press(ETree *tree, int row, ETreePath path, int col, GdkEvent *ev, EMFolderView *emfv)
-{
- GPtrArray *uids;
- int i;
- guint32 flags;
-
- if ((ev->key.state & GDK_CONTROL_MASK) != 0)
- return FALSE;
-
- switch (ev->key.keyval) {
- case GDK_Return:
- case GDK_KP_Enter:
- case GDK_ISO_Enter:
- em_folder_view_open_selected(emfv);
- break;
- case GDK_Delete:
- case GDK_KP_Delete:
- /* If any messages are undeleted, run delete, if all are deleted, run undelete */
- flags = 0;
- uids = message_list_get_selected(emfv->list);
- for (i = 0; i < uids->len; i++) {
- if ((camel_folder_get_message_flags(emfv->folder, uids->pdata[i]) & CAMEL_MESSAGE_DELETED) == 0)
- break;
- }
- message_list_free_uids(emfv->list, uids);
- if (i == uids->len)
- emfv_popup_undelete(NULL, emfv);
- else
- emfv_popup_delete(NULL, emfv);
- break;
- case GDK_Menu:
- /* FIXME: location of popup */
- emfv_popup(emfv, NULL);
- break;
- case '!':
- uids = message_list_get_selected(emfv->list);
-
- camel_folder_freeze(emfv->folder);
- for (i = 0; i < uids->len; i++) {
- flags = camel_folder_get_message_flags(emfv->folder, uids->pdata[i]) ^ CAMEL_MESSAGE_FLAGGED;
- if (flags & CAMEL_MESSAGE_FLAGGED)
- flags &= ~CAMEL_MESSAGE_DELETED;
- camel_folder_set_message_flags(emfv->folder, uids->pdata[i],
- CAMEL_MESSAGE_FLAGGED|CAMEL_MESSAGE_DELETED, flags);
- }
- camel_folder_thaw(emfv->folder);
-
- message_list_free_uids(emfv->list, uids);
- break;
- default:
- return FALSE;
- }
-
- return TRUE;
-}
-
-static void
-emfv_format_link_clicked(EMFormatHTMLDisplay *efhd, const char *uri, EMFolderView *emfv)
-{
- if (!strncasecmp (uri, "mailto:", 7)) {
- em_utils_compose_new_message_with_mailto (uri);
- } else if (*uri == '#') {
- gtk_html_jump_to_anchor (((EMFormatHTML *) efhd)->html, uri + 1);
- } else if (!strncasecmp (uri, "thismessage:", 12)) {
- /* ignore */
- } else if (!strncasecmp (uri, "cid:", 4)) {
- /* ignore */
- } else {
- GError *err = NULL;
-
- gnome_url_show (uri, &err);
-
- if (err) {
- g_warning ("gnome_url_show: %s", err->message);
- g_error_free (err);
- }
- }
-}
-
-struct _EMFVPopupItem {
- EMPopupItem item;
-
- EMFolderView *emfv;
- char *uri;
-};
-
-static void
-emp_uri_popup_link_copy(GtkWidget *w, struct _EMFVPopupItem *item)
-{
- struct _EMFolderViewPrivate *p = item->emfv->priv;
-
- g_free(p->selection_uri);
- p->selection_uri = g_strdup(item->uri);
-
- gtk_selection_owner_set(p->invisible, GDK_SELECTION_PRIMARY, gtk_get_current_event_time());
- gtk_selection_owner_set(p->invisible, GDK_SELECTION_CLIPBOARD, gtk_get_current_event_time());
-}
-
-static struct _EMFVPopupItem emfv_uri_popups[] = {
- { { EM_POPUP_ITEM, "00.uri.01", N_("_Copy Link Location"), G_CALLBACK(emp_uri_popup_link_copy), NULL, NULL, EM_POPUP_URI_NOT_MAILTO }, },
-};
-
-static void
-emfv_uri_popup_free(GSList *list)
-{
- while (list) {
- GSList *n = list->next;
- struct _EMFVPopupItem *item = list->data;
-
- g_free(item->uri);
- g_object_unref(item->emfv);
- g_slist_free_1(list);
-
- list = n;
- }
-}
-
-static int
-emfv_format_popup_event(EMFormatHTMLDisplay *efhd, GdkEventButton *event, const char *uri, CamelMimePart *part, EMFolderView *emfv)
-{
- EMPopup *emp;
- EMPopupTarget *target;
- GtkMenu *menu;
-
- /* FIXME: this maybe should just fit on em-html-display, it has access to the
- snooped part type */
-
- emp = em_popup_new("com.ximian.mail.folderview.popup.uri");
- if (part)
- target = em_popup_target_new_part(part, NULL);
- else {
- GSList *menus = NULL;
- int i;
-
- target = em_popup_target_new_uri(uri);
-
- for (i=0;i<sizeof(emfv_uri_popups)/sizeof(emfv_uri_popups[0]);i++) {
- emfv_uri_popups[i].item.activate_data = &emfv_uri_popups[i];
- emfv_uri_popups[i].emfv = emfv;
- g_object_ref(emfv);
- emfv_uri_popups[i].uri = g_strdup(target->data.uri);
- menus = g_slist_prepend(menus, &emfv_uri_popups[i]);
- }
- em_popup_add_items(emp, menus, (GDestroyNotify)emfv_uri_popup_free);
- }
-
- menu = em_popup_create_menu_once(emp, target, target->mask, target->mask);
- gtk_menu_popup(menu, NULL, NULL, NULL, NULL, event->button, event->time);
-
- return TRUE;
-}
-
-static void
-emfv_gui_folder_changed(CamelFolder *folder, void *dummy, EMFolderView *emfv)
-{
- emfv_enable_menus(emfv);
- g_object_unref(emfv);
-}
-
-static void
-emfv_folder_changed(CamelFolder *folder, CamelFolderChangeInfo *changes, EMFolderView *emfv)
-{
- g_object_ref(emfv);
- mail_async_event_emit(emfv->async, MAIL_ASYNC_GUI, (MailAsyncFunc)emfv_gui_folder_changed, folder, NULL, emfv);
-}
-
-/* keep these two tables in sync */
-enum {
- EMFV_ANIMATE_IMAGES = 1,
- EMFV_CHARSET,
- EMFV_CITATION_COLOUR,
- EMFV_CITATION_MARK,
- EMFV_CARET_MODE,
- EMFV_MESSAGE_STYLE,
- EMFV_MARK_SEEN,
- EMFV_MARK_SEEN_TIMEOUT,
- EMFV_LOAD_HTTP,
- EMFV_XMAILER_MASK,
- EMFV_SETTINGS /* last, for loop count */
-};
-
-/* IF these get too long, update key field */
-static const char * const emfv_display_keys[] = {
- "animate_images",
- "charset",
- "citation_colour",
- "mark_citations",
- "caret_mode",
- "message_style",
- "mark_seen",
- "mark_seen_timeout",
- "load_http_images",
- "xmailer_mask",
-};
-
-static GHashTable *emfv_setting_key;
-
-static void
-emfv_setting_notify(GConfClient *gconf, guint cnxn_id, GConfEntry *entry, EMFolderView *emfv)
-{
- char *tkey;
-
- g_return_if_fail (gconf_entry_get_key (entry) != NULL);
- g_return_if_fail (gconf_entry_get_value (entry) != NULL);
-
- tkey = strrchr(entry->key, '/');
- g_return_if_fail (tkey != NULL);
-
- switch(GPOINTER_TO_INT(g_hash_table_lookup(emfv_setting_key, tkey+1))) {
- case EMFV_ANIMATE_IMAGES:
- em_format_html_display_set_animate(emfv->preview, gconf_value_get_bool(gconf_entry_get_value(entry)));
- break;
- case EMFV_CHARSET:
- em_format_set_default_charset((EMFormat *)emfv->preview, gconf_value_get_string(gconf_entry_get_value(entry)));
- break;
- case EMFV_CITATION_COLOUR: {
- const char *s;
- GdkColor colour;
- guint32 rgb;
-
- s = gconf_value_get_string(gconf_entry_get_value(entry));
- gdk_color_parse(s?s:"#737373", &colour);
- rgb = ((colour.red & 0xff00) << 8) | (colour.green & 0xff00) | ((colour.blue & 0xff00) >> 8);
- em_format_html_set_mark_citations((EMFormatHTML *)emfv->preview,
- ((EMFormatHTML *)emfv->preview)->mark_citations, rgb);
- break; }
- case EMFV_CITATION_MARK:
- em_format_html_set_mark_citations((EMFormatHTML *)emfv->preview,
- gconf_value_get_bool(gconf_entry_get_value(entry)),
- ((EMFormatHTML *)emfv->preview)->citation_colour);
- break;
- case EMFV_CARET_MODE:
- em_format_html_display_set_caret_mode(emfv->preview, gconf_value_get_bool(gconf_entry_get_value(entry)));
- break;
- case EMFV_MESSAGE_STYLE: {
- int style = gconf_value_get_int(gconf_entry_get_value(entry));
-
- if (style < EM_FORMAT_NORMAL || style > EM_FORMAT_SOURCE)
- style = EM_FORMAT_NORMAL;
- em_format_set_mode((EMFormat *)emfv->preview, style);
- break; }
- case EMFV_MARK_SEEN:
- emfv->mark_seen = gconf_value_get_bool(gconf_entry_get_value(entry));
- break;
- case EMFV_MARK_SEEN_TIMEOUT:
- emfv->mark_seen_timeout = gconf_value_get_int(gconf_entry_get_value(entry));
- break;
- case EMFV_LOAD_HTTP: {
- int style = gconf_value_get_int(gconf_entry_get_value(entry));
-
- /* FIXME: this doesn't handle the 'sometimes' case, only the always case */
- em_format_html_set_load_http((EMFormatHTML *)emfv->preview, style == 2);
- break; }
- case EMFV_XMAILER_MASK:
- em_format_html_set_xmailer_mask((EMFormatHTML *)emfv->preview, gconf_value_get_int(gconf_entry_get_value(entry)));
- break;
- }
-}
-
-static void
-emfv_setting_setup(EMFolderView *emfv)
-{
- GConfClient *gconf = gconf_client_get_default();
- GConfEntry *entry;
- GError *err = NULL;
- int i;
- char key[64];
-
- if (emfv_setting_key == NULL) {
- emfv_setting_key = g_hash_table_new(g_str_hash, g_str_equal);
- for (i=1;i<EMFV_SETTINGS;i++)
- g_hash_table_insert(emfv_setting_key, (void *)emfv_display_keys[i-1], GINT_TO_POINTER(i));
- }
-
- gconf_client_add_dir(gconf, "/apps/evolution/mail/display", GCONF_CLIENT_PRELOAD_NONE, NULL);
-
- for (i=1;err == NULL && i<EMFV_SETTINGS;i++) {
- sprintf(key, "/apps/evolution/mail/display/%s", emfv_display_keys[i-1]);
- entry = gconf_client_get_entry(gconf, key, NULL, TRUE, &err);
- if (entry) {
- emfv_setting_notify(gconf, 0, entry, emfv);
- gconf_entry_free(entry);
- }
- }
-
- if (err) {
- g_warning("Could not load display settings: %s", err->message);
- g_error_free(err);
- }
-
- emfv->priv->setting_notify_id = gconf_client_notify_add(gconf, "/apps/evolution/mail/display",
- (GConfClientNotifyFunc)emfv_setting_notify,
- emfv, NULL, NULL);
- g_object_unref(gconf);
-}
diff --git a/mail/em-folder-view.h b/mail/em-folder-view.h
deleted file mode 100644
index 080b19eb6a..0000000000
--- a/mail/em-folder-view.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Michael Zucchi <notzed@ximian.com>
- *
- * Copyright 2003 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 _EM_FOLDER_VIEW_H
-#define _EM_FOLDER_VIEW_H
-
-#include <gtk/gtkvbox.h>
-#include "em-popup.h"
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-struct _MessageList;
-struct _EMFormatHTMLDisplay;
-struct _CamelFolder;
-struct _CamelMedium;
-
-typedef struct _EMFolderView EMFolderView;
-typedef struct _EMFolderViewClass EMFolderViewClass;
-
-typedef struct _EMFolderViewEnable EMFolderViewEnable;
-
-enum {
- EM_FOLDER_VIEW_SELECT_THREADED = EM_POPUP_SELECT_LAST,
- EM_FOLDER_VIEW_SELECT_HIDDEN = EM_POPUP_SELECT_LAST<<1,
- EM_FOLDER_VIEW_SELECT_LAST = EM_POPUP_SELECT_LAST<<2,
-};
-
-struct _EMFolderViewEnable {
- const char *name; /* bonobo name, relative to /commands/ */
- guint32 mask; /* disable mask, see EM_FOLDER_VIEW_CAN* flags */
-};
-
-struct _EMFolderView {
- GtkVBox parent;
-
- struct _EMFolderViewPrivate *priv;
-
- struct _MessageList *list;
- struct _EMFormatHTMLDisplay *preview;
-
- struct _CamelFolder *folder;
- char *folder_uri;
-
- /* used to load ui from base activate implementation */
- GSList *ui_files; /* const char * list, TODO: should this be on class? */
- const char *ui_app_name;
-
- /* for proxying jobs to main or other threads */
- struct _MailAsyncEvent *async;
-
- struct _BonoboUIComponent *uic; /* if we're active, this will be set */
- GSList *enable_map; /* bonobo menu enable map, entries are 0-terminated EMFolderViewEnable arryas
- TODO: should this be on class? */
-
- int mark_seen_timeout; /* local copy of gconf stuff */
- int mark_seen:1;
- int preview_active:1; /* is preview being used */
-};
-
-struct _EMFolderViewClass {
- GtkVBoxClass parent_class;
-
- /* if used as a control, used to activate/deactivate custom menu's */
- void (*activate)(EMFolderView *, struct _BonoboUIComponent *uic, int state);
-
- void (*set_folder_uri)(EMFolderView *emfv, const char *uri);
- void (*set_folder)(EMFolderView *emfv, struct _CamelFolder *folder, const char *uri);
- void (*set_message)(EMFolderView *emfv, const char *uid);
-};
-
-GType em_folder_view_get_type(void);
-
-GtkWidget *em_folder_view_new(void);
-
-#define em_folder_view_activate(emfv, uic, state) ((EMFolderViewClass *)G_OBJECT_GET_CLASS(emfv))->activate((emfv), (uic), (state))
-#define em_folder_view_set_folder(emfv, folder, uri) ((EMFolderViewClass *)G_OBJECT_GET_CLASS(emfv))->set_folder((emfv), (folder), (uri))
-#define em_folder_view_set_folder_uri(emfv, uri) ((EMFolderViewClass *)G_OBJECT_GET_CLASS(emfv))->set_folder_uri((emfv), (uri))
-#define em_folder_view_set_message(emfv, uid) ((EMFolderViewClass *)G_OBJECT_GET_CLASS(emfv))->set_message((emfv), (uid))
-
-struct _EMPopupTarget *em_folder_view_get_popup_target(EMFolderView *emfv);
-
-int em_folder_view_mark_selected(EMFolderView *emfv, guint32 mask, guint32 set);
-int em_folder_view_open_selected(EMFolderView *emfv);
-
-int em_folder_view_print(EMFolderView *emfv, int preview);
-
-/* this could be on message-list */
-guint32 em_folder_view_disable_mask(EMFolderView *emfv);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* ! _EM_FOLDER_VIEW_H */
diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c
deleted file mode 100644
index 808f8d030e..0000000000
--- a/mail/em-format-html-display.c
+++ /dev/null
@@ -1,1352 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Michael Zucchi <notzed@ximian.com>
- *
- * Copyright 2003 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 <gtkhtml/gtkhtml.h>
-#include <gtkhtml/htmlengine.h>
-#include <gtkhtml/htmlobject.h>
-#include <gtkhtml/htmliframe.h>
-#include <gtkhtml/htmlinterval.h>
-#include <gtkhtml/gtkhtml-embedded.h>
-#include <gtkhtml/gtkhtml-search.h>
-
-#include <gtk/gtkvbox.h>
-#include <gtk/gtkhbox.h>
-#include <gtk/gtkbutton.h>
-#include <gtk/gtkstock.h>
-#include <gtk/gtkimage.h>
-#include <gtk/gtkarrow.h>
-
-#include <gtk/gtkmenu.h>
-#include <gtk/gtkmenuitem.h>
-
-#include <glade/glade.h>
-
-#include <libgnomevfs/gnome-vfs-mime-handlers.h>
-
-#if 0
-#include <libgnomevfs/gnome-vfs-utils.h>
-#include <libgnomevfs/gnome-vfs-mime-utils.h>
-#include <libgnomevfs/gnome-vfs-mime.h>
-#endif
-
-#include <bonobo/bonobo-control-frame.h>
-#include <bonobo/bonobo-stream-memory.h>
-#include <bonobo/bonobo-widget.h>
-
-#include <camel/camel-stream.h>
-#include <camel/camel-stream-mem.h>
-#include <camel/camel-mime-filter-tohtml.h>
-#include <camel/camel-mime-part.h>
-#include <camel/camel-multipart.h>
-#include <camel/camel-multipart-signed.h>
-#include <camel/camel-internet-address.h>
-#include <camel/camel-mime-message.h>
-#include <camel/camel-gpg-context.h>
-
-#include <e-util/e-msgport.h>
-#include <e-util/e-gui-utils.h>
-#include <e-util/e-dialog-utils.h>
-
-#include "mail-config.h"
-
-#include "em-format-html-display.h"
-#include "em-marshal.h"
-#include "e-searching-tokenizer.h"
-#include "em-icon-stream.h"
-#include "em-utils.h"
-#include "em-popup.h"
-#include "em-icon-stream.h"
-
-#define d(x)
-
-#define EFHD_TABLE_OPEN "<table>"
-
-struct _EMFormatHTMLDisplayPrivate {
- /* For the interactive search dialogue */
- /* TODO: Should this be more subtle, like the mozilla one? */
- GtkDialog *search_dialog;
- GtkWidget *search_entry;
- GtkWidget *search_matches_label;
- GtkWidget *search_case_check;
- char *search_text;
- int search_wrap; /* are we doing a wrap search */
-};
-
-static int efhd_html_button_press_event (GtkWidget *widget, GdkEventButton *event, EMFormatHTMLDisplay *efh);
-static void efhd_html_link_clicked (GtkHTML *html, const char *url, EMFormatHTMLDisplay *efhd);
-
-struct _attach_puri {
- EMFormatPURI puri;
-
- const EMFormatHandler *handle;
-
- /* for the > and V buttons */
- GtkWidget *forward, *down;
- /* currently no way to correlate this data to the frame :( */
- GtkHTML *frame;
- CamelStream *output;
- unsigned int shown:1;
-};
-
-static void efhd_iframe_created(GtkHTML *html, GtkHTML *iframe, EMFormatHTMLDisplay *efh);
-/*static void efhd_url_requested(GtkHTML *html, const char *url, GtkHTMLStream *handle, EMFormatHTMLDisplay *efh);
- static gboolean efhd_object_requested(GtkHTML *html, GtkHTMLEmbedded *eb, EMFormatHTMLDisplay *efh);*/
-
-static void efhd_format_clone(EMFormat *, CamelMedium *, EMFormat *);
-static void efhd_format_error(EMFormat *emf, CamelStream *stream, const char *txt);
-static void efhd_format_message(EMFormat *, CamelStream *, CamelMedium *);
-static void efhd_format_source(EMFormat *, CamelStream *, CamelMimePart *);
-static void efhd_format_attachment(EMFormat *, CamelStream *, CamelMimePart *, const char *, const EMFormatHandler *);
-static void efhd_complete(EMFormat *);
-
-static void efhd_builtin_init(EMFormatHTMLDisplayClass *efhc);
-
-enum {
- EFHD_LINK_CLICKED,
- EFHD_POPUP_EVENT,
- EFHD_LAST_SIGNAL,
-};
-
-static guint efhd_signals[EFHD_LAST_SIGNAL] = { 0 };
-
-
-static EMFormatHTMLClass *efhd_parent;
-
-static void
-efhd_gtkhtml_realise(GtkHTML *html, EMFormatHTMLDisplay *efhd)
-{
- GtkStyle *style;
-
- /* FIXME: does this have to be re-done every time we draw? */
-
- /* My favorite thing to do... muck around with colors so we respect people's stupid themes.
- However, we only do this if we are rendering to the screen -- we ignore the theme
- when we are printing. */
- style = gtk_widget_get_style((GtkWidget *)html);
- if (style) {
- int state = GTK_WIDGET_STATE(html);
- gushort r, g, b;
-#define SCALE (238)
-
- /* choose a suitably darker or lighter colour */
- r = style->base[state].red >> 8;
- g = style->base[state].green >> 8;
- b = style->base[state].blue >> 8;
-
- if (r+b+g > 128*3) {
- r = (r*SCALE) >> 8;
- g = (g*SCALE) >> 8;
- b = (b*SCALE) >> 8;
- } else {
- r = 128 - ((SCALE * r) >> 9);
- g = 128 - ((SCALE * g) >> 9);
- b = 128 - ((SCALE * b) >> 9);
- }
-
- efhd->formathtml.body_colour = ((r<<16) | (g<< 8) | b) & 0xffffff;
-
-#undef SCALE
-#define SCALE (174)
- /* choose a suitably darker or lighter colour */
- r = style->base[state].red >> 8;
- g = style->base[state].green >> 8;
- b = style->base[state].blue >> 8;
-
- if (r+b+g > 128*3) {
- r = (r*SCALE) >> 8;
- g = (g*SCALE) >> 8;
- b = (b*SCALE) >> 8;
- } else {
- r = 128 - ((SCALE * r) >> 9);
- g = 128 - ((SCALE * g) >> 9);
- b = 128 - ((SCALE * b) >> 9);
- }
-
- efhd->formathtml.frame_colour = ((r<<16) | (g<< 8) | b) & 0xffffff;
-
- r = style->base[GTK_STATE_NORMAL].red >> 8;
- g = style->base[GTK_STATE_NORMAL].green >> 8;
- b = style->base[GTK_STATE_NORMAL].blue >> 8;
-
- efhd->formathtml.content_colour = ((r<<16) | (g<< 8) | b) & 0xffffff;
-
- r = style->text[state].red >> 8;
- g = style->text[state].green >> 8;
- b = style->text[state].blue >> 8;
-
- efhd->formathtml.text_colour = ((r<<16) | (g<< 8) | b) & 0xffffff;
- }
-#undef SCALE
-}
-
-static void
-efhd_init(GObject *o)
-{
- EMFormatHTMLDisplay *efhd = (EMFormatHTMLDisplay *)o;
-#define efh ((EMFormatHTML *)efhd)
-
- efhd->priv = g_malloc0(sizeof(*efhd->priv));
-
- efhd->search_tok = (ESearchingTokenizer *)e_searching_tokenizer_new();
- html_engine_set_tokenizer(efh->html->engine, (HTMLTokenizer *)efhd->search_tok);
-
- g_signal_connect(efh->html, "realize", G_CALLBACK(efhd_gtkhtml_realise), o);
-
- /* we want to convert url's etc */
- efh->text_html_flags |= CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS | CAMEL_MIME_FILTER_TOHTML_CONVERT_ADDRESSES;
-#undef efh
-}
-
-static void
-efhd_finalise(GObject *o)
-{
- EMFormatHTMLDisplay *efhd = (EMFormatHTMLDisplay *)o;
-
- /* check pending stuff */
-
- g_free(efhd->priv->search_text);
- g_free(efhd->priv);
-
- ((GObjectClass *)efhd_parent)->finalize(o);
-}
-
-static gboolean
-efhd_bool_accumulator(GSignalInvocationHint *ihint, GValue *out, const GValue *in, void *data)
-{
- gboolean val = g_value_get_boolean(in);
-
- g_value_set_boolean(out, val);
-
- return !val;
-}
-
-static void
-efhd_class_init(GObjectClass *klass)
-{
- ((EMFormatClass *)klass)->format_clone = efhd_format_clone;
- ((EMFormatClass *)klass)->format_error = efhd_format_error;
- ((EMFormatClass *)klass)->format_message = efhd_format_message;
- ((EMFormatClass *)klass)->format_source = efhd_format_source;
- ((EMFormatClass *)klass)->format_attachment = efhd_format_attachment;
- ((EMFormatClass *)klass)->complete = efhd_complete;
-
- klass->finalize = efhd_finalise;
-
- efhd_signals[EFHD_LINK_CLICKED] =
- g_signal_new("link_clicked",
- G_TYPE_FROM_CLASS(klass),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET(EMFormatHTMLDisplayClass, link_clicked),
- NULL, NULL,
- g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
-
- efhd_signals[EFHD_POPUP_EVENT] =
- g_signal_new("popup_event",
- G_TYPE_FROM_CLASS(klass),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET(EMFormatHTMLDisplayClass, popup_event),
- efhd_bool_accumulator, NULL,
- em_marshal_BOOLEAN__BOXED_POINTER_POINTER,
- G_TYPE_BOOLEAN, 3,
- GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE,
- G_TYPE_POINTER, G_TYPE_POINTER);
-
- efhd_builtin_init((EMFormatHTMLDisplayClass *)klass);
-}
-
-GType
-em_format_html_display_get_type(void)
-{
- static GType type = 0;
-
- if (type == 0) {
- static const GTypeInfo info = {
- sizeof(EMFormatHTMLDisplayClass),
- NULL, NULL,
- (GClassInitFunc)efhd_class_init,
- NULL, NULL,
- sizeof(EMFormatHTMLDisplay), 0,
- (GInstanceInitFunc)efhd_init
- };
- efhd_parent = g_type_class_ref(em_format_html_get_type());
- type = g_type_register_static(em_format_html_get_type(), "EMFormatHTMLDisplay", &info, 0);
- }
-
- return type;
-}
-
-EMFormatHTMLDisplay *em_format_html_display_new(void)
-{
- EMFormatHTMLDisplay *efhd;
-
- efhd = g_object_new(em_format_html_display_get_type(), 0);
-
- g_signal_connect(efhd->formathtml.html, "iframe_created", G_CALLBACK(efhd_iframe_created), efhd);
- g_signal_connect(efhd->formathtml.html, "link_clicked", G_CALLBACK(efhd_html_link_clicked), efhd);
- g_signal_connect(efhd->formathtml.html, "button_press_event", G_CALLBACK(efhd_html_button_press_event), efhd);
-
- return efhd;
-}
-
-void em_format_html_display_goto_anchor(EMFormatHTMLDisplay *efhd, const char *name)
-{
- printf("FIXME: go to anchor '%s'\n", name);
-}
-
-void em_format_html_display_set_animate(EMFormatHTMLDisplay *efhd, gboolean state)
-{
- efhd->animate = state;
- gtk_html_set_animate(((EMFormatHTML *)efhd)->html, state);
-}
-
-void em_format_html_display_set_caret_mode(EMFormatHTMLDisplay *efhd, gboolean state)
-{
- efhd->caret_mode = state;
- gtk_html_set_caret_mode(((EMFormatHTML *)efhd)->html, state);
-}
-
-void
-em_format_html_display_set_search(EMFormatHTMLDisplay *efhd, int type, GSList *strings)
-{
- switch(type&3) {
- case EM_FORMAT_HTML_DISPLAY_SEARCH_PRIMARY:
- e_searching_tokenizer_set_primary_case_sensitivity(efhd->search_tok, (type&EM_FORMAT_HTML_DISPLAY_SEARCH_ICASE) == 0);
- e_searching_tokenizer_set_primary_search_string(efhd->search_tok, NULL);
- while (strings) {
- e_searching_tokenizer_add_primary_search_string(efhd->search_tok, strings->data);
- strings = strings->next;
- }
- break;
- case EM_FORMAT_HTML_DISPLAY_SEARCH_SECONDARY:
- default:
- e_searching_tokenizer_set_secondary_case_sensitivity(efhd->search_tok, (type&EM_FORMAT_HTML_DISPLAY_SEARCH_ICASE) == 0);
- e_searching_tokenizer_set_secondary_search_string(efhd->search_tok, NULL);
- while (strings) {
- e_searching_tokenizer_add_secondary_search_string(efhd->search_tok, strings->data);
- strings = strings->next;
- }
- break;
- }
-
- d(printf("redrawing with search\n"));
- em_format_format_clone((EMFormat *)efhd, ((EMFormat *)efhd)->message, (EMFormat *)efhd);
-}
-
-static void
-efhd_update_matches(EMFormatHTMLDisplay *efhd)
-{
- struct _EMFormatHTMLDisplayPrivate *p = efhd->priv;
- char *str;
- /* message-search popup match count string */
- char *fmt = _("Matches: %d");
-
- if (p->search_dialog) {
- str = alloca(strlen(fmt)+32);
- sprintf(str, fmt, e_searching_tokenizer_match_count(efhd->search_tok));
- gtk_label_set_text((GtkLabel *)p->search_matches_label, str);
- }
-}
-
-static void
-efhd_update_search(EMFormatHTMLDisplay *efhd)
-{
- struct _EMFormatHTMLDisplayPrivate *p = efhd->priv;
- GSList *words = NULL;
- int flags = 0;
-
- if (p->search_text == NULL)
- return;
-
- if (!gtk_toggle_button_get_active((GtkToggleButton *)p->search_case_check))
- flags = EM_FORMAT_HTML_DISPLAY_SEARCH_ICASE | EM_FORMAT_HTML_DISPLAY_SEARCH_PRIMARY;
- else
- flags = EM_FORMAT_HTML_DISPLAY_SEARCH_PRIMARY;
-
- if (p->search_text)
- words = g_slist_append(words, p->search_text);
-
- em_format_html_display_set_search(efhd, flags, words);
- g_slist_free(words);
-}
-
-static void
-efhd_search_response(GtkWidget *w, int button, EMFormatHTMLDisplay *efhd)
-{
- struct _EMFormatHTMLDisplayPrivate *p = efhd->priv;
-
- if (button == GTK_RESPONSE_ACCEPT) {
- char *txt = g_strdup(gtk_entry_get_text((GtkEntry *)p->search_entry));
-
- g_strstrip(txt);
- if (p->search_text && strcmp(p->search_text, txt) == 0 && !p->search_wrap) {
- if (!gtk_html_engine_search_next(((EMFormatHTML *)efhd)->html))
- p->search_wrap = TRUE;
- g_free(txt);
- } else {
- g_free(p->search_text);
- p->search_text = txt;
- if (!p->search_wrap)
- efhd_update_search(efhd);
- p->search_wrap = FALSE;
- gtk_html_engine_search(((EMFormatHTML *)efhd)->html, txt,
- gtk_toggle_button_get_active((GtkToggleButton *)p->search_case_check),
- TRUE, FALSE);
- }
- } else {
- g_free(p->search_text);
- p->search_text = NULL;
- gtk_widget_destroy((GtkWidget *)p->search_dialog);
- p->search_dialog = NULL;
- }
-}
-
-static void
-efhd_search_case_toggled(GtkWidget *w, EMFormatHTMLDisplay *efhd)
-{
- struct _EMFormatHTMLDisplayPrivate *p = efhd->priv;
-
- g_free(p->search_text);
- p->search_text = NULL;
- efhd_search_response(w, GTK_RESPONSE_ACCEPT, efhd);
-}
-
-static void
-efhd_search_entry_activate(GtkWidget *w, EMFormatHTMLDisplay *efhd)
-{
- efhd_search_response(w, GTK_RESPONSE_ACCEPT, efhd);
-}
-
-/**
- * em_format_html_display_search:
- * @efhd:
- *
- * Run an interactive search dialogue.
- **/
-void
-em_format_html_display_search(EMFormatHTMLDisplay *efhd)
-{
- struct _EMFormatHTMLDisplayPrivate *p = efhd->priv;
- GladeXML *xml;
-
- if (p->search_dialog) {
- gdk_window_raise(((GtkWidget *)p->search_dialog)->window);
- return;
- }
-
- xml = glade_xml_new (EVOLUTION_GLADEDIR "/mail-search.glade", "search_message_dialog", NULL);
- if (xml == NULL) {
- g_warning("Cannot open search dialog glade file");
- /* ?? */
- return;
- }
-
- /* TODO: The original put the subject in the frame, but it had some
- ugly arbitrary string-cutting code to make sure it fit. */
-
- p->search_dialog = (GtkDialog *)glade_xml_get_widget(xml, "search_message_dialog");
- p->search_entry = glade_xml_get_widget(xml, "search_entry");
- p->search_matches_label = glade_xml_get_widget(xml, "search_matches_label");
- p->search_case_check = glade_xml_get_widget(xml, "search_case_check");
- p->search_wrap = FALSE;
-
- gtk_dialog_set_default_response((GtkDialog *)p->search_dialog, GTK_RESPONSE_ACCEPT);
- efhd_update_matches(efhd);
-
- g_signal_connect(p->search_entry, "activate", G_CALLBACK(efhd_search_entry_activate), efhd);
- g_signal_connect(p->search_case_check, "toggled", G_CALLBACK(efhd_search_case_toggled), efhd);
- g_signal_connect(p->search_dialog, "response", G_CALLBACK(efhd_search_response), efhd);
- e_dialog_set_transient_for((GtkWindow *)p->search_dialog, (GtkWidget *)efhd);
- gtk_widget_show((GtkWidget *)p->search_dialog);
-}
-
-void
-em_format_html_display_cut (EMFormatHTMLDisplay *efhd)
-{
- gtk_html_cut (((EMFormatHTML *) efhd)->html);
-}
-
-void
-em_format_html_display_copy (EMFormatHTMLDisplay *efhd)
-{
- gtk_html_copy (((EMFormatHTML *) efhd)->html);
-}
-
-void
-em_format_html_display_paste (EMFormatHTMLDisplay *efhd)
-{
- gtk_html_paste (((EMFormatHTML *) efhd)->html, FALSE);
-}
-
-void
-em_format_html_display_zoom_in (EMFormatHTMLDisplay *efhd)
-{
- gtk_html_zoom_in (((EMFormatHTML *) efhd)->html);
-}
-
-void
-em_format_html_display_zoom_out (EMFormatHTMLDisplay *efhd)
-{
- gtk_html_zoom_out (((EMFormatHTML *) efhd)->html);
-}
-
-void
-em_format_html_display_zoom_reset (EMFormatHTMLDisplay *efhd)
-{
- gtk_html_zoom_reset (((EMFormatHTML *) efhd)->html);
-}
-
-/* ********************************************************************** */
-
-static void
-efhd_iframe_created(GtkHTML *html, GtkHTML *iframe, EMFormatHTMLDisplay *efh)
-{
- d(printf("Iframe created %p ... \n", iframe));
-
- g_signal_connect(iframe, "button_press_event", G_CALLBACK (efhd_html_button_press_event), efh);
-
- return;
-}
-
-static int
-efhd_html_button_press_event (GtkWidget *widget, GdkEventButton *event, EMFormatHTMLDisplay *efhd)
-{
- HTMLEngine *e;
- HTMLPoint *point;
- const char *url;
- gboolean res = FALSE;
-
- if (event->button != 3)
- return FALSE;
-
- e = ((GtkHTML *)widget)->engine;
- point = html_engine_get_point_at(e, event->x, event->y, FALSE);
- if (point == NULL)
- return FALSE;
-
- d(printf("popup button pressed\n"));
-
- if ( (url = html_object_get_src(point->object)) != NULL
- || (url = html_object_get_url(point->object, 0)) != NULL) {
- EMFormatPURI *puri;
- char *uri;
-
- uri = gtk_html_get_url_object_relative((GtkHTML *)widget, point->object, url);
- puri = em_format_find_puri((EMFormat *)efhd, uri);
-
- d(printf("poup event, uri = '%s' part = '%p'\n", uri, puri?puri->part:NULL));
-
- g_signal_emit((GtkObject *)efhd, efhd_signals[EFHD_POPUP_EVENT], 0, event, uri, puri?puri->part:NULL, &res);
- g_free(uri);
- }
-
- html_point_destroy(point);
-
- return res;
-}
-
-static void
-efhd_html_link_clicked (GtkHTML *html, const char *url, EMFormatHTMLDisplay *efhd)
-{
- d(printf("link clicked event '%s'\n", url));
- g_signal_emit((GObject *)efhd, efhd_signals[EFHD_LINK_CLICKED], 0, url);
-}
-
-static void
-efhd_complete(EMFormat *emf)
-{
- EMFormatHTMLDisplay *efhd = (EMFormatHTMLDisplay *)emf;
-
- if (efhd->priv->search_dialog)
- efhd_update_matches(efhd);
-}
-
-/* ********************************************************************** */
-
-/* TODO: rename some of this stuff, it isn't 'smime' specific */
-/* FIXME: also in em-format-html.c */
-static const struct {
- const char *icon, *shortdesc, *description;
-} smime_sign_table[4] = {
- { NULL, N_("Unsigned"), N_("This message is not signed. There is no guarantee the sender of the message is authentic.") },
- { "pgp-signature-ok.png",N_("Valid signature"), N_("This message is signed and is valid, the sender of this message is very likely who they claim to be.") },
- { "pgp-signature-bad.png", N_("Invalid signature"), N_("The signature of this message cannot be verified, it may have been altered in transit.") },
- { "pgp-signature-nokey.png", N_("Valid signature, cannot verify sender"), N_("This message is signed with a valid signature, but the sender of the message cannot be verified.") },
-};
-
-static const struct {
- const char *icon, *shortdesc, *description;
-} smime_encrypt_table[4] = {
- { NULL, N_("Unencrypted"), N_("This message is not encrypted. It's content may be viewed in transit across The Internet.") },
- { "pgp-signature-ok.png", N_("Encrypted, weak"), N_("This message is encrypted, but with a weak encryption algorithm. It would be difficult, but not impossible for an outsider to view the content of this message in a practical amount of time.") },
- { "pgp-signature-ok.png", N_("Encrypted"), N_("This message is encrypted. It would be difficult for an outsider to view the content of this message.") },
- { "pgp-signature-ok.png", N_("Encrypted, strong"), N_("This message is encrypted, with a strong encryption algorithm. It would be very difficult for an outsider to view the content of this message in a practical amount of time.") },
-};
-
-struct _smime_pobject {
- EMFormatHTMLPObject object;
-
- int signature;
- CamelCipherValidity *valid;
- GtkWidget *widget;
-};
-
-static void
-efhd_xpkcs7mime_free(EMFormatHTMLPObject *o)
-{
- struct _smime_pobject *po = (struct _smime_pobject *)o;
-
- if (po->widget)
- gtk_widget_destroy(po->widget);
- camel_cipher_validity_free(po->valid);
-}
-
-static void
-efhd_xpkcs7mime_info_response(GtkWidget *w, guint button, struct _smime_pobject *po)
-{
- gtk_widget_destroy(w);
- po->widget = NULL;
-}
-
-static void
-efhd_xpkcs7mime_validity_clicked(GtkWidget *button, EMFormatHTMLPObject *pobject)
-{
- struct _smime_pobject *po = (struct _smime_pobject *)pobject;
- GladeXML *xml;
- GtkWidget *vbox, *w;
-
- if (po->widget)
- /* FIXME: window raise? */
- return;
-
- xml = glade_xml_new(EVOLUTION_GLADEDIR "/mail-security.glade", "message_security_dialog", NULL);
- po->widget = glade_xml_get_widget(xml, "message_security_dialog");
-
- vbox = glade_xml_get_widget(xml, "signature_vbox");
- w = gtk_label_new(_(smime_sign_table[po->valid->sign.status].description));
- gtk_misc_set_alignment((GtkMisc *)w, 0.0, 0.5);
- gtk_label_set_line_wrap((GtkLabel *)w, TRUE);
- gtk_box_pack_start((GtkBox *)vbox, w, TRUE, TRUE, 6);
- if (po->valid->sign.description) {
- w = gtk_label_new(po->valid->sign.description);
- gtk_misc_set_alignment((GtkMisc *)w, 0.0, 0.5);
- gtk_label_set_line_wrap((GtkLabel *)w, FALSE);
- gtk_box_pack_start((GtkBox *)vbox, w, TRUE, TRUE, 6);
- }
- gtk_widget_show_all(vbox);
-
- vbox = glade_xml_get_widget(xml, "encryption_vbox");
- w = gtk_label_new(_(smime_encrypt_table[po->valid->encrypt.status].description));
- gtk_misc_set_alignment((GtkMisc *)w, 0.0, 0.5);
- gtk_label_set_line_wrap((GtkLabel *)w, TRUE);
- gtk_box_pack_start((GtkBox *)vbox, w, TRUE, TRUE, 6);
- if (po->valid->encrypt.description) {
- w = gtk_label_new(po->valid->encrypt.description);
- gtk_misc_set_alignment((GtkMisc *)w, 0.0, 0.5);
- gtk_label_set_line_wrap((GtkLabel *)w, FALSE);
- gtk_box_pack_start((GtkBox *)vbox, w, TRUE, TRUE, 6);
- }
- gtk_widget_show_all(vbox);
-
- g_object_unref(xml);
-
- g_signal_connect(po->widget, "response", G_CALLBACK(efhd_xpkcs7mime_info_response), po);
- gtk_widget_show(po->widget);
-}
-
-static gboolean
-efhd_xpkcs7mime_button(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *pobject)
-{
- GtkWidget *icon, *button;
- GdkPixbuf *pixbuf;
- struct _smime_pobject *po = (struct _smime_pobject *)pobject;
- char *file;
- const char *name;
-
- /* FIXME: need to have it based on encryption and signing too */
- if (po->valid->sign.status == CAMEL_CIPHER_VALIDITY_SIGN_GOOD)
- name = "pgp-signature-ok.png";
- else
- name = "pgp-signature-bad.png";
-
- file = g_build_filename(EVOLUTION_ICONSDIR, name, NULL);
- pixbuf = gdk_pixbuf_new_from_file(file, NULL);
- g_free(file);
- if (pixbuf == NULL)
- return FALSE;
-
- /* wtf isn't this just scaled on disk? */
- icon = gtk_image_new_from_pixbuf(gdk_pixbuf_scale_simple(pixbuf, 24, 24, GDK_INTERP_BILINEAR));
- g_object_unref(pixbuf);
- gtk_widget_show(icon);
-
- button = gtk_button_new();
- g_signal_connect(button, "clicked", G_CALLBACK(efhd_xpkcs7mime_validity_clicked), pobject);
-
- gtk_container_add((GtkContainer *)button, icon);
- gtk_widget_show(button);
- gtk_container_add((GtkContainer *)eb, button);
-
- return TRUE;
-}
-
-static void
-efhd_output_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, CamelCipherValidity *valid)
-{
- CamelCipherValidity *save = ((EMFormatHTML *)emf)->valid_parent;
-
- /* Note: this same logic is in efh_output_secure */
-
- if (((EMFormatHTML *)emf)->valid == NULL) {
- ((EMFormatHTML *)emf)->valid = valid;
- } else {
- e_dlist_addtail(&((EMFormatHTML *)emf)->valid_parent->children, (EDListNode *)valid);
- camel_cipher_validity_envelope(((EMFormatHTML *)emf)->valid_parent, valid);
- }
-
- ((EMFormatHTML *)emf)->valid_parent = valid;
- em_format_part(emf, stream, part);
- ((EMFormatHTML *)emf)->valid_parent = save;
-
- if (((EMFormatHTML *)emf)->valid == valid
- && (valid->encrypt.status != CAMEL_CIPHER_VALIDITY_ENCRYPT_NONE
- || valid->sign.status != CAMEL_CIPHER_VALIDITY_SIGN_NONE)) {
- char *classid;
- struct _smime_pobject *pobj;
-
- camel_stream_printf(stream, "<table border=0 width=\"100%%\" cellpadding=3 cellspacing=0 bgcolor=%s><tr>",
- valid->sign.status == CAMEL_CIPHER_VALIDITY_SIGN_GOOD?"#88bb88":"#bb8888");
- classid = g_strdup_printf("smime:///em-format-html/%p/icon/signed", part);
- pobj = (struct _smime_pobject *)em_format_html_add_pobject((EMFormatHTML *)emf, sizeof(*pobj), classid, part, efhd_xpkcs7mime_button);
- pobj->valid = camel_cipher_validity_clone(valid);
- pobj->object.free = efhd_xpkcs7mime_free;
- camel_stream_printf(stream, "<td valign=top><object classid=\"%s\"></object></td><td width=100%% valign=top>", classid);
-
- if (valid->sign.status != CAMEL_CIPHER_VALIDITY_SIGN_NONE) {
- camel_stream_printf(stream, "%s<br>", _(smime_sign_table[valid->sign.status].shortdesc));
- }
-
- if (valid->encrypt.status != CAMEL_CIPHER_VALIDITY_ENCRYPT_NONE) {
- camel_stream_printf(stream, "%s<br>", _(smime_encrypt_table[valid->encrypt.status].shortdesc));
- }
-
- camel_stream_printf(stream, "</td></tr></table>");
- }
-}
-
-static void
-efhd_application_xpkcs7mime(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info)
-{
- CamelCipherContext *context;
- CamelException *ex;
- extern CamelSession *session;
- CamelMimePart *opart;
- CamelCipherValidity *valid;
-
- ex = camel_exception_new();
-
- context = camel_smime_context_new(session);
-
- opart = camel_mime_part_new();
- valid = camel_cipher_decrypt(context, part, opart, ex);
- if (valid == NULL) {
- em_format_format_error(emf, stream, ex->desc?ex->desc:_("Could not parse S/MIME message: Unknown error"));
- em_format_part_as(emf, stream, part, NULL);
- } else {
- efhd_output_secure(emf, stream, opart, valid);
- }
-
- camel_object_unref(opart);
- camel_object_unref(context);
- camel_exception_free(ex);
-}
-
-/* ********************************************************************** */
-
-static void
-efhd_multipart_signed (EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info)
-{
- CamelMultipartSigned *mps;
- CamelMimePart *cpart;
- CamelCipherContext *cipher = NULL;
-
- mps = (CamelMultipartSigned *)camel_medium_get_content_object((CamelMedium *)part);
- if (!CAMEL_IS_MULTIPART_SIGNED(mps)
- || (cpart = camel_multipart_get_part((CamelMultipart *)mps, CAMEL_MULTIPART_SIGNED_CONTENT)) == NULL) {
- em_format_format_source(emf, stream, part);
- return;
- }
-
- /* FIXME: Should be done via a plugin interface */
- /* FIXME: duplicated in em-format-html.c */
- if (g_ascii_strcasecmp("application/x-pkcs7-signature", mps->protocol) == 0)
- cipher = camel_smime_context_new(emf->session);
- else if (g_ascii_strcasecmp("application/pgp-signature", mps->protocol) == 0)
- cipher = camel_gpg_context_new(emf->session);
-
- if (cipher == NULL) {
- em_format_format_error(emf, stream, _("Unsupported signature format"));
- em_format_part_as(emf, stream, part, NULL);
- } else {
- CamelException *ex = camel_exception_new();
- CamelCipherValidity *valid;
-
- valid = camel_cipher_verify(cipher, part, ex);
- if (valid == NULL) {
- em_format_format_error(emf, stream, ex->desc?ex->desc:_("Unknown error verifying signature"));
- em_format_part_as(emf, stream, part, NULL);
- } else {
- efhd_output_secure(emf, stream, cpart, valid);
- }
-
- camel_exception_free(ex);
- camel_object_unref(cipher);
- }
-}
-
-/* ********************************************************************** */
-
-static EMFormatHandler type_builtin_table[] = {
- { "application/x-pkcs7-mime", (EMFormatFunc)efhd_application_xpkcs7mime },
- { "multipart/signed", (EMFormatFunc)efhd_multipart_signed },
-};
-
-static void
-efhd_builtin_init(EMFormatHTMLDisplayClass *efhc)
-{
- int i;
-
- for (i=0;i<sizeof(type_builtin_table)/sizeof(type_builtin_table[0]);i++)
- em_format_class_add_handler((EMFormatClass *)efhc, &type_builtin_table[i]);
-}
-
-/* ********************************************************************** */
-
-static void efhd_format_clone(EMFormat *emf, CamelMedium *part, EMFormat *src)
-{
- ((EMFormatClass *)efhd_parent)->format_clone(emf, part, src);
-}
-
-/* TODO: if these aren't going to do anything should remove */
-static void efhd_format_error(EMFormat *emf, CamelStream *stream, const char *txt)
-{
- ((EMFormatClass *)efhd_parent)->format_error(emf, stream, txt);
-}
-
-static void efhd_format_message(EMFormat *emf, CamelStream *stream, CamelMedium *part)
-{
- ((EMFormatClass *)efhd_parent)->format_message(emf, stream, part);
-}
-
-static void efhd_format_source(EMFormat *emf, CamelStream *stream, CamelMimePart *part)
-{
- ((EMFormatClass *)efhd_parent)->format_source(emf, stream, part);
-}
-
-/* ********************************************************************** */
-
-/* if it hasn't been processed yet, format the attachment */
-static void
-efhd_attachment_show(GtkWidget *w, struct _attach_puri *info)
-{
- d(printf("show attachment button called\n"));
-
- info->shown = ~info->shown;
- em_format_set_inline(info->puri.format, info->puri.part, info->shown);
- /* FIXME: do this in an idle handler */
- em_format_format_clone(info->puri.format, info->puri.format->message, info->puri.format);
-#if 0
- /* FIXME: track shown state in parent */
-
- if (info->shown) {
- d(printf("hiding\n"));
- info->shown = FALSE;
- if (info->frame)
- gtk_widget_hide((GtkWidget *)info->frame);
- gtk_widget_show(info->forward);
- gtk_widget_hide(info->down);
- } else {
- d(printf("showing\n"));
- info->shown = TRUE;
- if (info->frame)
- gtk_widget_show((GtkWidget *)info->frame);
- gtk_widget_hide(info->forward);
- gtk_widget_show(info->down);
-
- /* have we decoded it yet? */
- if (info->output) {
- info->handle->handler(info->puri.format, info->output, info->puri.part, info->handle);
- camel_stream_close(info->output);
- camel_object_unref(info->output);
- info->output = NULL;
- }
- }
-
- em_format_set_inline(info->puri.format, info->puri.part, info->shown);
-#endif
-}
-
-static EMPopupItem efhd_menu_items[] = {
- { EM_POPUP_BAR, "05.display", },
- { EM_POPUP_ITEM, "05.display.00", N_("_View Inline"), G_CALLBACK(efhd_attachment_show) },
- { EM_POPUP_ITEM, "05.display.00", N_("_Hide"), G_CALLBACK(efhd_attachment_show) },
-};
-
-static void
-efhd_popup_place_widget(GtkMenu *menu, int *x, int *y, gboolean *push_in, gpointer user_data)
-{
- GtkWidget *w = user_data;
-
- gdk_window_get_origin(gtk_widget_get_parent_window(w), x, y);
- *x += w->allocation.x + w->allocation.width;
- *y += w->allocation.y;
-}
-
-static gboolean
-efhd_attachment_popup(GtkWidget *w, GdkEventButton *event, struct _attach_puri *info)
-{
- GtkMenu *menu;
- GSList *menus = NULL;
- EMPopup *emp;
- EMPopupTarget *target;
- EMPopupItem *item;
-
- d(printf("attachment popup, button %d\n", event->button));
-
- if (event && event->button != 1 && event->button != 3) {
- /* ?? gtk_propagate_event(GTK_WIDGET (user_data), (GdkEvent *)event);*/
- return FALSE;
- }
-
- emp = em_popup_new("com.ximian.mail.formathtmldisplay.popup.part");
- target = em_popup_target_new_part(info->puri.part, info->handle?info->handle->mime_type:NULL);
- target->widget = w;
-
- /* add our local menus */
- efhd_menu_items[0].activate_data = info;
- menus = g_slist_prepend(menus, &efhd_menu_items[0]);
- item = &efhd_menu_items[info->shown?2:1];
- item->activate_data = info;
- menus = g_slist_prepend(menus, item);
- em_popup_add_items(emp, menus, (GDestroyNotify)g_slist_free);
-
- menu = em_popup_create_menu_once(emp, target, target->mask, target->mask);
- if (event)
- gtk_menu_popup(menu, NULL, NULL, NULL, NULL, event->button, event->time);
- else
- gtk_menu_popup(menu, NULL, NULL, (GtkMenuPositionFunc)efhd_popup_place_widget, w, 0, gtk_get_current_event_time());
-
- return TRUE;
-}
-
-static gboolean
-efhd_attachment_popup_menu(GtkWidget *w, struct _attach_puri *info)
-{
- return efhd_attachment_popup(w, NULL, info);
-}
-
-/* ********************************************************************** */
-
-static void
-efhd_drag_data_get(GtkWidget *w, GdkDragContext *drag, GtkSelectionData *data, guint info, guint time, EMFormatHTMLPObject *pobject)
-{
- CamelMimePart *part = pobject->part;
- char *uri, *path;
- CamelStream *stream;
-
- switch (info) {
- case 0: /* mime/type request */
- stream = camel_stream_mem_new();
- /* TODO: shoudl format_format_text run on the content-object? */
- /* TODO: should we just do format_content? */
- if (camel_content_type_is (((CamelDataWrapper *)part)->mime_type, "text", "*")) {
- /* FIXME: this should be an em_utils method, it only needs a default charset param */
- em_format_format_text((EMFormat *)pobject->format, stream, (CamelDataWrapper *)part);
- } else {
- CamelDataWrapper *dw = camel_medium_get_content_object((CamelMedium *)part);
-
- camel_data_wrapper_decode_to_stream(dw, stream);
- }
-
- gtk_selection_data_set(data, data->target, 8,
- ((CamelStreamMem *)stream)->buffer->data,
- ((CamelStreamMem *)stream)->buffer->len);
- camel_object_unref(stream);
- break;
- case 1: /* text-uri-list request */
- /* Kludge around Nautilus requesting the same data many times */
- uri = g_object_get_data((GObject *)w, "e-drag-uri");
- if (uri) {
- gtk_selection_data_set(data, data->target, 8, uri, strlen(uri));
- return;
- }
-
- path = em_utils_temp_save_part(w, part);
- if (path == NULL)
- return;
-
- uri = g_strdup_printf("file://%s\r\n", path);
- g_free(path);
- gtk_selection_data_set(data, data->target, 8, uri, strlen(uri));
- g_object_set_data_full((GObject *)w, "e-drag-uri", uri, g_free);
- break;
- default:
- abort();
- }
-}
-
-static void
-efhd_drag_data_delete(GtkWidget *w, GdkDragContext *drag, EMFormatHTMLPObject *pobject)
-{
- char *uri;
-
- uri = g_object_get_data((GObject *)w, "e-drag-uri");
- if (uri) {
- /* NB: this doesn't kill the dnd directory */
- /* NB: is this ever called? */
- unlink(uri+7);
- g_object_set_data((GObject *)w, "e-drag-uri", NULL);
- }
-}
-
-static void
-efhd_write_icon_job(struct _EMFormatHTMLJob *job, int cancelled)
-{
- EMFormatHTMLPObject *pobject;
- CamelDataWrapper *dw;
-
- if (cancelled)
- return;
-
- pobject = job->u.data;
- dw = camel_medium_get_content_object((CamelMedium *)pobject->part);
- camel_data_wrapper_decode_to_stream(dw, job->stream);
- camel_stream_close(job->stream);
-}
-
-/* attachment button callback */
-static gboolean
-efhd_attachment_button(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *pobject)
-{
- struct _attach_puri *info;
- GtkWidget *hbox, *w, *button, *mainbox;
- char *simple_type;
- GtkTargetEntry drag_types[] = {
- { NULL, 0, 0 },
- { "text/uri-list", 0, 1 },
- };
-
- /* FIXME: handle default shown case */
- d(printf("adding attachment button/content\n"));
-
- info = (struct _attach_puri *)em_format_find_puri((EMFormat *)efh, pobject->classid);
- g_assert(info != NULL);
- g_assert(info->forward == NULL);
-
- mainbox = gtk_hbox_new(FALSE, 0);
-
- button = gtk_button_new();
-
- if (info->handle)
- g_signal_connect(button, "clicked", G_CALLBACK(efhd_attachment_show), info);
- else
- GTK_WIDGET_UNSET_FLAGS(button, GTK_CAN_FOCUS);
-
- hbox = gtk_hbox_new(FALSE, 2);
- info->forward = gtk_image_new_from_stock(GTK_STOCK_GO_FORWARD, GTK_ICON_SIZE_BUTTON);
- gtk_box_pack_start((GtkBox *)hbox, info->forward, TRUE, TRUE, 0);
- if (info->handle) {
- info->down = gtk_image_new_from_stock(GTK_STOCK_GO_DOWN, GTK_ICON_SIZE_BUTTON);
- gtk_box_pack_start((GtkBox *)hbox, info->down, TRUE, TRUE, 0);
- }
-
- w = gtk_image_new();
- gtk_widget_set_size_request(w, 24, 24);
- gtk_box_pack_start((GtkBox *)hbox, w, TRUE, TRUE, 0);
- gtk_container_add((GtkContainer *)button, hbox);
- gtk_box_pack_start((GtkBox *)mainbox, button, TRUE, TRUE, 0);
-
- /* FIXME: loses any snoop info */
- simple_type = camel_content_type_simple (((CamelDataWrapper *)pobject->part)->mime_type);
- camel_strdown(simple_type);
-
- /* cache? */
- /* FIXME: offline parts, just get icon */
- if (camel_content_type_is (((CamelDataWrapper *)pobject->part)->mime_type, "image", "*")) {
- EMFormatHTMLJob *job;
-
- job = em_format_html_job_new(efh, efhd_write_icon_job, pobject);
- job->stream = (CamelStream *)em_icon_stream_new((GtkImage *)w);
- em_format_html_job_queue(efh, job);
- } else {
- GdkPixbuf *pixbuf = e_icon_for_mime_type(simple_type, 24);
- GdkPixbuf *mini = gdk_pixbuf_scale_simple(pixbuf, 24, 24, GDK_INTERP_BILINEAR);
-
- gtk_image_set_from_pixbuf((GtkImage *)w, mini);
- g_object_unref(mini);
- g_object_unref(pixbuf);
- }
-
- drag_types[0].target = simple_type;
- gtk_drag_source_set(button, GDK_BUTTON1_MASK, drag_types, sizeof(drag_types)/sizeof(drag_types[0]), GDK_ACTION_COPY);
- g_signal_connect(button, "drag-data-get", G_CALLBACK(efhd_drag_data_get), pobject);
- g_signal_connect (button, "drag-data-delete", G_CALLBACK(efhd_drag_data_delete), pobject);
- g_free(simple_type);
-
- button = gtk_button_new();
- /*GTK_WIDGET_UNSET_FLAGS(button, GTK_CAN_FOCUS);*/
- gtk_container_add((GtkContainer *)button, gtk_arrow_new(GTK_ARROW_DOWN, GTK_SHADOW_ETCHED_IN));
- g_signal_connect(button, "button_press_event", G_CALLBACK(efhd_attachment_popup), info);
- g_signal_connect(button, "popup_menu", G_CALLBACK(efhd_attachment_popup_menu), info);
- g_signal_connect(button, "clicked", G_CALLBACK(efhd_attachment_popup_menu), info);
- gtk_box_pack_start((GtkBox *)mainbox, button, TRUE, TRUE, 0);
-
- gtk_widget_show_all(mainbox);
-
- if (info->shown)
- gtk_widget_hide(info->forward);
- else if (info->down)
- gtk_widget_hide(info->down);
-
- gtk_container_add((GtkContainer *)eb, mainbox);
-
- return TRUE;
-}
-
-/* not used currently */
-/* frame source callback */
-static void
-efhd_attachment_frame(EMFormat *emf, CamelStream *stream, EMFormatPURI *puri)
-{
- struct _attach_puri *info = (struct _attach_puri *)puri;
-
- if (info->shown) {
- d(printf("writing to frame content, handler is '%s'\n", info->handle->mime_type));
- info->handle->handler(emf, stream, info->puri.part, info->handle);
- camel_stream_close(stream);
- } else {
- /* FIXME: this is leaked if the object is closed without showing it
- NB: need a virtual puri_free method? */
- info->output = stream;
- camel_object_ref(stream);
- }
-}
-
-static gboolean
-efhd_bonobo_object(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *pobject)
-{
- CamelDataWrapper *wrapper;
- Bonobo_ServerInfo *component;
- GtkWidget *embedded;
- Bonobo_PersistStream persist;
- CORBA_Environment ev;
- CamelStreamMem *cstream;
- BonoboStream *bstream;
- BonoboControlFrame *control_frame;
- Bonobo_PropertyBag prop_bag;
-
- component = gnome_vfs_mime_get_default_component(eb->type);
- if (component == NULL)
- return FALSE;
-
- embedded = bonobo_widget_new_control(component->iid, NULL);
- CORBA_free(component);
- if (embedded == NULL)
- return FALSE;
-
- CORBA_exception_init(&ev);
-
- control_frame = bonobo_widget_get_control_frame((BonoboWidget *)embedded);
- prop_bag = bonobo_control_frame_get_control_property_bag(control_frame, NULL);
- if (prop_bag != CORBA_OBJECT_NIL) {
- /*
- * 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;
-
- from = camel_mime_message_get_from((CamelMimeMessage *)((EMFormat *)efh)->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);
- }
-
- persist = (Bonobo_PersistStream)Bonobo_Unknown_queryInterface(bonobo_widget_get_objref((BonoboWidget *)embedded),
- "IDL:Bonobo/PersistStream:1.0", NULL);
- if (persist == CORBA_OBJECT_NIL) {
- gtk_object_sink((GtkObject *)embedded);
- CORBA_exception_free(&ev);
- return FALSE;
- }
-
- /* Write the data to a CamelStreamMem... */
- cstream = (CamelStreamMem *)camel_stream_mem_new();
- wrapper = camel_medium_get_content_object((CamelMedium *)pobject->part);
- camel_data_wrapper_decode_to_stream(wrapper, (CamelStream *)cstream);
-
- /* ...convert the CamelStreamMem to a BonoboStreamMem... */
- bstream = bonobo_stream_mem_create(cstream->buffer->data, cstream->buffer->len, TRUE, FALSE);
- camel_object_unref(cstream);
-
- /* ...and hydrate the PersistStream from the BonoboStream. */
- 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((GtkObject *)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 gboolean
-efhd_check_server_prop(Bonobo_ServerInfo *component, const char *propname, const char *value)
-{
- CORBA_sequence_CORBA_string stringv;
- Bonobo_ActivationProperty *prop;
- int i;
-
- prop = bonobo_server_info_prop_find(component, propname);
- if (!prop || prop->v._d != Bonobo_ACTIVATION_P_STRINGV)
- return FALSE;
-
- stringv = prop->v._u.value_stringv;
- for (i = 0; i < stringv._length; i++) {
- if (!g_ascii_strcasecmp(value, stringv._buffer[i]))
- return TRUE;
- }
-
- return FALSE;
-}
-
-static gboolean
-efhd_use_component(const char *mime_type)
-{
- GList *components, *iter;
- Bonobo_ServerInfo *component = NULL;
-
- /* should this cache it? */
-
- if (g_ascii_strcasecmp(mime_type, "text/x-vcard") != 0
- && g_ascii_strcasecmp(mime_type, "text/calendar") != 0) {
- const char **mime_types;
- int i;
-
- mime_types = mail_config_get_allowable_mime_types();
- for (i = 0; mime_types[i]; i++) {
- if (!g_ascii_strcasecmp(mime_types[i], mime_type))
- goto type_ok;
- }
- return FALSE;
- }
-type_ok:
- components = gnome_vfs_mime_get_all_components (mime_type);
- for (iter = components; iter; iter = iter->next) {
- Bonobo_ServerInfo *comp = iter->data;
-
- comp = iter->data;
- if (efhd_check_server_prop(comp, "repo_ids", "IDL:Bonobo/PersistStream:1.0")
- && efhd_check_server_prop(comp, "bonobo:supported_mime_types", mime_type)) {
- component = comp;
- break;
- }
- }
- gnome_vfs_mime_component_list_free (components);
-
- return component != NULL;
-}
-
-static void
-efhd_format_attachment(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const char *mime_type, const EMFormatHandler *handle)
-{
- char *classid, *text, *html;
- struct _attach_puri *info;
-
- classid = g_strdup_printf("attachment-%p", part);
- info = (struct _attach_puri *)em_format_add_puri(emf, sizeof(*info), classid, part, efhd_attachment_frame);
- em_format_html_add_pobject((EMFormatHTML *)emf, sizeof(EMFormatHTMLPObject), classid, part, efhd_attachment_button);
- info->handle = handle;
- info->shown = em_format_is_inline(emf, info->puri.part) && handle != NULL;
-
- camel_stream_write_string(stream,
- "<table height=6><tr><td><a></a></td></tr></table>\n"
- "<table cellspacing=0 cellpadding=0><tr><td>"
- "<table width=10 cellspacing=0 cellpadding=0>"
- "<tr><td></td></tr></table></td>");
-
- camel_stream_printf(stream, "<td><object classid=\"%s\"></object></td>", classid);
-
- camel_stream_write_string(stream,
- "<td><table width=3 cellspacing=0 cellpadding=0>"
- "<tr><td></td></tr></table></td><td><font size=-1>");
-
- /* output some info about it */
- /* FIXME: should we look up mime_type from object again? */
- text = em_format_describe_part(part, mime_type);
- html = camel_text_to_html(text, ((EMFormatHTML *)emf)->text_html_flags & CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS, 0);
- camel_stream_write_string(stream, html);
- g_free(html);
- g_free(text);
-
- camel_stream_write_string(stream,
- "</font></td></tr><tr></table>\n"
- "<table height=6><tr><td><a></a></td></tr></table>\n");
-
- if (handle) {
- if (info->shown)
- handle->handler(emf, stream, part, handle);
- /*camel_stream_printf(stream, "<iframe src=\"%s\" marginheight=0 marginwidth=0>%s</iframe>\n", classid, _("Attachment content could not be loaded"));*/
- } else if (efhd_use_component(mime_type)) {
- static int partid;
-
- g_free(classid); /* messy */
-
- classid = g_strdup_printf("bonobo-unknown:///em-formath-html-display/%p/%d", part, partid++);
- em_format_html_add_pobject((EMFormatHTML *)emf, sizeof(EMFormatHTMLPObject), classid, part, efhd_bonobo_object);
- camel_stream_printf(stream, "<object classid=\"%s\" type=\"%s\">\n", classid, mime_type);
- }
-
- g_free(classid);
-}
diff --git a/mail/em-format-html-display.h b/mail/em-format-html-display.h
deleted file mode 100644
index cf78642112..0000000000
--- a/mail/em-format-html-display.h
+++ /dev/null
@@ -1,63 +0,0 @@
-
-/*
- Concrete class for formatting mails to displayed html
-*/
-
-#ifndef _EM_FORMAT_HTML_DISPLAY_H
-#define _EM_FORMAT_HTML_DISPLAY_H
-
-#include "em-format-html.h"
-
-typedef struct _EMFormatHTMLDisplay EMFormatHTMLDisplay;
-typedef struct _EMFormatHTMLDisplayClass EMFormatHTMLDisplayClass;
-
-struct _CamelMimePart;
-
-struct _EMFormatHTMLDisplay {
- EMFormatHTML formathtml;
-
- struct _EMFormatHTMLDisplayPrivate *priv;
-
- struct _ESearchingTokenizer *search_tok;
-
- unsigned int animate:1;
- unsigned int caret_mode:1;
-};
-
-#define EM_FORMAT_HTML_DISPLAY_SEARCH_PRIMARY (0)
-#define EM_FORMAT_HTML_DISPLAY_SEARCH_SECONDARY (1)
-#define EM_FORMAT_HTML_DISPLAY_SEARCH_ICASE (1<<8)
-
-struct _EMFormatHTMLDisplayClass {
- EMFormatHTMLClass formathtml_class;
-
- /* a link clicked normally */
- void (*link_clicked)(EMFormatHTMLDisplay *efhd, const char *uri);
- /* a part or a link button pressed event */
- int (*popup_event)(EMFormatHTMLDisplay *efhd, GdkEventButton *event, const char *uri, struct _CamelMimePart *part);
-};
-
-GType em_format_html_display_get_type(void);
-EMFormatHTMLDisplay *em_format_html_display_new(void);
-
-void em_format_html_display_goto_anchor(EMFormatHTMLDisplay *efhd, const char *name);
-
-void em_format_html_display_set_animate(EMFormatHTMLDisplay *efhd, gboolean state);
-void em_format_html_display_set_caret_mode(EMFormatHTMLDisplay *efhd, gboolean state);
-
-void em_format_html_display_set_search(EMFormatHTMLDisplay *efhd, int type, GSList *strings);
-void em_format_html_display_search(EMFormatHTMLDisplay *efhd);
-
-void em_format_html_display_cut (EMFormatHTMLDisplay *efhd);
-void em_format_html_display_copy (EMFormatHTMLDisplay *efhd);
-void em_format_html_display_paste (EMFormatHTMLDisplay *efhd);
-
-void em_format_html_display_zoom_in (EMFormatHTMLDisplay *efhd);
-void em_format_html_display_zoom_out (EMFormatHTMLDisplay *efhd);
-void em_format_html_display_zoom_reset (EMFormatHTMLDisplay *efhd);
-
-/* experimental */
-struct _EPopupExtension;
-void em_format_html_display_set_popup(EMFormatHTMLDisplay *, struct _EPopupExtension *);
-
-#endif /* !_EM_FORMAT_HTML_DISPLAY_H */
diff --git a/mail/em-format-html-print.c b/mail/em-format-html-print.c
deleted file mode 100644
index 44da5abb73..0000000000
--- a/mail/em-format-html-print.c
+++ /dev/null
@@ -1,186 +0,0 @@
-
-#include <libgnomeprint/gnome-print-job.h>
-#include <libgnomeprintui/gnome-print-job-preview.h>
-
-#include <gtkhtml/gtkhtml.h>
-#include <gtk/gtkwindow.h>
-
-#include <camel/camel-i18n.h>
-#include "em-format-html-print.h"
-
-#include <string.h>
-
-static void efhp_builtin_init(EMFormatHTMLPrintClass *efhc);
-
-static EMFormatHTMLClass *efhp_parent;
-
-static void
-efhp_init(GObject *o)
-{
- EMFormatHTMLPrint *efhp = (EMFormatHTMLPrint *)o;
- GtkWidget *html = (GtkWidget *)efhp->formathtml.html;
-
- /* ?? */
- gtk_widget_set_name(html, "EvolutionMailPrintHTMLWidget");
-
- /* gtk widgets don't like to be realized outside top level widget
- so we put new html widget into gtk window */
- efhp->window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
- gtk_container_add((GtkContainer *)efhp->window, html);
- gtk_widget_realize(html);
-}
-
-static void
-efhp_finalise(GObject *o)
-{
- EMFormatHTMLPrint *efhp = (EMFormatHTMLPrint *)o;
-
- gtk_widget_destroy(efhp->window);
- if (efhp->config)
- g_object_unref(efhp->config);
-
- ((GObjectClass *)efhp_parent)->finalize(o);
-}
-
-static void
-efhp_base_init(EMFormatHTMLPrintClass *efhpklass)
-{
- efhp_builtin_init(efhpklass);
-}
-
-static void
-efhp_class_init(GObjectClass *klass)
-{
- klass->finalize = efhp_finalise;
-}
-
-GType
-em_format_html_print_get_type(void)
-{
- static GType type = 0;
-
- if (type == 0) {
- static const GTypeInfo info = {
- sizeof(EMFormatHTMLPrintClass),
- (GBaseInitFunc)efhp_base_init, NULL,
- (GClassInitFunc)efhp_class_init,
- NULL, NULL,
- sizeof(EMFormatHTMLPrint), 0,
- (GInstanceInitFunc)efhp_init
- };
- efhp_parent = g_type_class_ref(em_format_html_get_type());
- type = g_type_register_static(em_format_html_get_type(), "EMFormatHTMLPrint", &info, 0);
- }
-
- return type;
-}
-
-EMFormatHTMLPrint *em_format_html_print_new(void)
-{
- EMFormatHTMLPrint *efhp;
-
- efhp = g_object_new(em_format_html_print_get_type(), 0);
-
- return efhp;
-}
-
-struct footer_info {
- GnomeFont *local_font;
- gint page_num, pages;
-};
-
-static void
-efhp_footer_cb(GtkHTML *html, GnomePrintContext *print_context, double x, double y, double width, double height, void *data)
-{
- struct footer_info *info = data;
-
- /* do we want anything nicer here, like who its from, etc? */
- if (info->local_font) {
- char *text = g_strdup_printf (_("Page %d of %d"), info->page_num, info->pages);
- /*gdouble tw = gnome_font_get_width_string (info->local_font, text);*/
- /* FIXME: work out how to measure this */
- gdouble tw = strlen(text) * 8;
-
- gnome_print_gsave(print_context);
- gnome_print_newpath(print_context);
- gnome_print_setrgbcolor(print_context, .0, .0, .0);
- gnome_print_moveto(print_context, x + width - tw, y - gnome_font_get_ascender(info->local_font));
- gnome_print_setfont(print_context, info->local_font);
- gnome_print_show(print_context, text);
- gnome_print_grestore(print_context);
-
- g_free(text);
- info->page_num++;
- }
-}
-
-/* perform preview, or print */
-/* returns GNOME_PRINT_OK on success */
-static void
-emfhp_complete(EMFormatHTMLPrint *efhp, void *data)
-{
- GnomePrintContext *print_context;
- GnomePrintJob *print_job;
- gdouble line = 0.0;
- struct footer_info info;
- int res = GNOME_PRINT_OK;
-
- print_job = gnome_print_job_new(efhp->config);
- print_context = gnome_print_job_get_context(print_job);
-
- gtk_html_print_set_master(efhp->formathtml.html, print_job);
- info.local_font = gnome_font_find_closest("Sans Regular", 10.0);
- if (info.local_font) {
- line = gnome_font_get_ascender(info.local_font) - gnome_font_get_descender(info.local_font);
- info.page_num = 1;
- info.pages = gtk_html_print_get_pages_num(efhp->formathtml.html, print_context, 0.0, line);
- gtk_html_print_with_header_footer(efhp->formathtml.html, print_context, 0.0, line, NULL, efhp_footer_cb, &info);
- gnome_font_unref(info.local_font);
- } else {
- gtk_html_print(efhp->formathtml.html, print_context);
- }
- gtk_html_print_set_master(efhp->formathtml.html, NULL);
-
- gnome_print_job_close(print_job);
-
- if (efhp->preview)
- gtk_widget_show(gnome_print_job_preview_new(print_job, _("Print Preview")));
- else
- res = gnome_print_job_print(print_job);
-
- g_object_unref(print_job);
- g_object_unref(efhp);
-}
-
-int em_format_html_print_print(EMFormatHTMLPrint *efhp, struct _CamelMedium *msg, EMFormatHTML *source, struct _GnomePrintConfig *print_config, int preview)
-{
- efhp->config = print_config;
- if (print_config)
- g_object_ref(print_config);
- efhp->preview = preview;
-
- ((EMFormatHTML *)efhp)->load_http = source->load_http_now;
-
- g_signal_connect(efhp, "complete", G_CALLBACK(emfhp_complete), efhp);
-
- g_object_ref(efhp);
- em_format_format_clone((EMFormat *)efhp, msg, (EMFormat *)source);
-
- return 0; /* damn async ... */
-}
-
-/* ********************************************************************** */
-
-/* if only ... but i doubt this is possible with gnome print/gtkhtml */
-static EMFormatHandler type_builtin_table[] = {
- /*{ "application/postscript", (EMFormatFunc)efhp_application_postscript },*/
-};
-
-static void
-efhp_builtin_init(EMFormatHTMLPrintClass *efhc)
-{
- int i;
-
- for (i=0;i<sizeof(type_builtin_table)/sizeof(type_builtin_table[0]);i++)
- em_format_class_add_handler((EMFormatClass *)efhc, &type_builtin_table[i]);
-}
diff --git a/mail/em-format-html-print.h b/mail/em-format-html-print.h
deleted file mode 100644
index 78e3139e0f..0000000000
--- a/mail/em-format-html-print.h
+++ /dev/null
@@ -1,37 +0,0 @@
-
-/*
- Concrete class for formatting mails to displayed html
-*/
-
-#ifndef _EM_FORMAT_HTML_PRINT_H
-#define _EM_FORMAT_HTML_PRINT_H
-
-#include "em-format-html.h"
-
-struct _GnomePrintConfig;
-
-typedef struct _EMFormatHTMLPrint EMFormatHTMLPrint;
-typedef struct _EMFormatHTMLPrintClass EMFormatHTMLPrintClass;
-
-struct _CamelMimePart;
-
-struct _EMFormatHTMLPrint {
- EMFormatHTML formathtml;
-
- struct _GtkWidget *window; /* used to realise the gtkhtml in a toplevel, i dont know why */
- struct _GnomePrintConfig *config;
-
- int preview:1;
-};
-
-struct _EMFormatHTMLPrintClass {
- EMFormatHTMLClass formathtml_class;
-};
-
-GType em_format_html_print_get_type(void);
-
-EMFormatHTMLPrint *em_format_html_print_new(void);
-
-int em_format_html_print_print(EMFormatHTMLPrint *efhp, struct _CamelMedium *msg, EMFormatHTML *source, struct _GnomePrintConfig *print_config, int preview);
-
-#endif /* ! _EM_FORMAT_HTML_PRINT_H */
diff --git a/mail/em-format-html-quote.c b/mail/em-format-html-quote.c
deleted file mode 100644
index d00b8bf5f7..0000000000
--- a/mail/em-format-html-quote.c
+++ /dev/null
@@ -1,277 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2003 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/camel-stream.h>
-#include <camel/camel-mime-filter-tohtml.h>
-#include "em-format-html-quote.h"
-
-struct _EMFormatHTMLQuotePrivate {
- char *credits;
-};
-
-static void efhq_format_clone (EMFormat *, CamelMedium *, EMFormat *);
-static void efhq_format_error (EMFormat *emf, CamelStream *stream, const char *txt);
-static void efhq_format_message (EMFormat *, CamelStream *, CamelMedium *);
-static void efhq_format_source (EMFormat *, CamelStream *, CamelMimePart *);
-static void efhq_format_attachment (EMFormat *, CamelStream *, CamelMimePart *, const char *, const EMFormatHandler *);
-
-static void efhq_builtin_init (EMFormatHTMLQuoteClass *efhc);
-
-static EMFormatHTMLClass *efhq_parent;
-
-static void
-efhq_init (GObject *o)
-{
- EMFormatHTMLQuote *efhq = (EMFormatHTMLQuote *) o;
-
- efhq->priv = g_malloc0 (sizeof (*efhq->priv));
-
- /* we want to convert url's etc */
- ((EMFormatHTML *) efhq)->text_html_flags |= CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS | CAMEL_MIME_FILTER_TOHTML_CONVERT_ADDRESSES;
- /* we want simple header format */
- ((EMFormatHTML *) efhq)->simple_headers = TRUE;
-}
-
-static void
-efhq_finalise (GObject *o)
-{
- EMFormatHTMLQuote *efhq = (EMFormatHTMLQuote *) o;
-
- g_free (efhq->priv->credits);
- g_free (efhq->priv);
-
- ((GObjectClass *) efhq_parent)->finalize (o);
-}
-
-static void
-efhq_base_init(EMFormatHTMLQuoteClass *efhqklass)
-{
- efhq_builtin_init(efhqklass);
-}
-
-static void
-efhq_class_init (GObjectClass *klass)
-{
- ((EMFormatClass *) klass)->format_clone = efhq_format_clone;
- ((EMFormatClass *) klass)->format_error = efhq_format_error;
- ((EMFormatClass *) klass)->format_message = efhq_format_message;
- ((EMFormatClass *) klass)->format_source = efhq_format_source;
- ((EMFormatClass *) klass)->format_attachment = efhq_format_attachment;
-
- klass->finalize = efhq_finalise;
-}
-
-GType
-em_format_html_quote_get_type (void)
-{
- static GType type = 0;
-
- if (type == 0) {
- static const GTypeInfo info = {
- sizeof (EMFormatHTMLQuoteClass),
- (GBaseInitFunc)efhq_base_init, NULL,
- (GClassInitFunc)efhq_class_init,
- NULL, NULL,
- sizeof (EMFormatHTMLQuote), 0,
- (GInstanceInitFunc) efhq_init
- };
-
- efhq_parent = g_type_class_ref (em_format_html_get_type ());
- type = g_type_register_static (em_format_html_get_type (), "EMFormatHTMLQuote", &info, 0);
- }
-
- return type;
-}
-
-EMFormatHTMLQuote *
-em_format_html_quote_new (void)
-{
- return (EMFormatHTMLQuote *) g_object_new (em_format_html_quote_get_type (), NULL);
-}
-
-EMFormatHTMLQuote *
-em_format_html_quote_new_with_credits (const char *credits)
-{
- EMFormatHTMLQuote *emfq;
-
- emfq = (EMFormatHTMLQuote *) g_object_new (em_format_html_quote_get_type (), NULL);
- emfq->priv->credits = g_strdup (credits);
-
- return emfq;
-}
-
-static void
-efhq_format_clone (EMFormat *emf, CamelMedium *part, EMFormat *src)
-{
- ((EMFormatClass *) efhq_parent)->format_clone (emf, part, src);
-}
-
-static void
-efhq_format_error (EMFormat *emf, CamelStream *stream, const char *txt)
-{
- /* FIXME: should we even bother writign error text for quoting? probably not... */
- ((EMFormatClass *) efhq_parent)->format_error (emf, stream, txt);
-}
-
-static void
-efhq_format_message (EMFormat *emf, CamelStream *stream, CamelMedium *part)
-{
- EMFormatHTMLQuote *emfq = (EMFormatHTMLQuote *) emf;
-
- camel_stream_printf (stream, "%s<!--+GtkHTML:<DATA class=\"ClueFlow\" key=\"orig\" value=\"1\">-->\n"
- "<font color=\"#%06x\">\n"
- "<blockquote type=cite>\n",
- emfq->priv->credits ? emfq->priv->credits : "",
- emfq->formathtml.citation_colour);
-
- if (!((EMFormatHTML *)emf)->hide_headers)
- em_format_html_format_headers((EMFormatHTML *)emf, stream, part);
-
- em_format_part(emf, stream, (CamelMimePart *)part);
-
- camel_stream_write_string (stream, "</blockquote></font><!--+GtkHTML:<DATA class=\"ClueFlow\" clear=\"orig\">-->");
-}
-
-static void
-efhq_format_source (EMFormat *emf, CamelStream *stream, CamelMimePart *part)
-{
- /* FIXME: should we just format_message? */
- ((EMFormatClass *) efhq_parent)->format_source (emf, stream, part);
-}
-
-static void
-efhq_format_attachment (EMFormat *emf, CamelStream *stream, CamelMimePart *part, const char *mime_type, const EMFormatHandler *handle)
-{
- ;
-}
-
-#include <camel/camel-medium.h>
-#include <camel/camel-mime-part.h>
-#include <camel/camel-multipart.h>
-#include <camel/camel-url.h>
-
-static void
-efhq_multipart_related(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info)
-{
- CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content_object((CamelMedium *)part);
- CamelMimePart *body_part, *display_part = NULL;
- CamelContentType *content_type;
- const char *location, *start;
- int i, nparts;
- CamelURL *base_save = NULL;
-
- if (!CAMEL_IS_MULTIPART(mp)) {
- em_format_format_source(emf, stream, part);
- return;
- }
-
- /* sigh, so much for oo code reuse ... */
- /* FIXME: put in a function */
- nparts = camel_multipart_get_number(mp);
- content_type = camel_mime_part_get_content_type(part);
- start = camel_content_type_param (content_type, "start");
- if (start && strlen(start)>2) {
- int len;
- const char *cid;
-
- /* strip <>'s */
- len = strlen (start) - 2;
- start++;
-
- for (i=0; i<nparts; i++) {
- body_part = camel_multipart_get_part(mp, i);
- cid = camel_mime_part_get_content_id(body_part);
-
- if (cid && !strncmp(cid, start, len) && strlen(cid) == len) {
- display_part = body_part;
- break;
- }
- }
- } else {
- display_part = camel_multipart_get_part(mp, 0);
- }
-
- if (display_part == NULL) {
- em_format_part_as(emf, stream, part, "multipart/mixed");
- return;
- }
-
- /* stack of present location and pending uri's */
- location = camel_mime_part_get_content_location(part);
- if (location) {
- base_save = emf->base;
- emf->base = camel_url_new(location, NULL);
- }
- em_format_push_level(emf);
-
- em_format_part(emf, stream, display_part);
- em_format_pull_level(emf);
-
- if (location) {
- camel_url_free(emf->base);
- emf->base = base_save;
- }
-}
-
-static const char *type_remove_table[] = {
- "image/gif",
- "image/jpeg",
- "image/png",
- "image/x-png",
- "image/tiff",
- "image/x-bmp",
- "image/bmp",
- "image/x-cmu-raster",
- "image/x-portable-anymap",
- "image/x-portable-bitmap",
- "image/x-portable-graymap",
- "image/x-portable-pixmap",
- "image/x-xpixmap",
- "message/external-body",
- "multipart/appledouble",
- "multipart/signed",
-
- "image/jpg",
- "image/pjpeg",
-};
-
-static EMFormatHandler type_builtin_table[] = {
- { "multipart/related", (EMFormatFunc)efhq_multipart_related },
-};
-
-static void
-efhq_builtin_init (EMFormatHTMLQuoteClass *efhc)
-{
- int i;
-
- for (i = 0; i < sizeof (type_remove_table) / sizeof (type_remove_table[0]); i++)
- em_format_class_remove_handler ((EMFormatClass *) efhc, type_remove_table[i]);
-
- for (i=0;i<sizeof(type_builtin_table)/sizeof(type_builtin_table[0]);i++)
- em_format_class_add_handler((EMFormatClass *)efhc, &type_builtin_table[i]);
-}
diff --git a/mail/em-format-html-quote.h b/mail/em-format-html-quote.h
deleted file mode 100644
index 1422b04093..0000000000
--- a/mail/em-format-html-quote.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2003 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 _EM_FORMAT_HTML_QUOTE_H
-#define _EM_FORMAT_HTML_QUOTE_H
-
-#include "em-format-html.h"
-
-typedef struct _EMFormatHTMLQuote EMFormatHTMLQuote;
-typedef struct _EMFormatHTMLQuoteClass EMFormatHTMLQuoteClass;
-
-struct _EMFormatHTMLQuote {
- EMFormatHTML formathtml;
-
- struct _EMFormatHTMLQuotePrivate *priv;
-};
-
-struct _EMFormatHTMLQuoteClass {
- EMFormatHTMLClass formathtml_class;
-
-};
-
-GType em_format_html_quote_get_type (void);
-
-EMFormatHTMLQuote *em_format_html_quote_new (void);
-
-EMFormatHTMLQuote *em_format_html_quote_new_with_credits (const char *cedits);
-
-#endif /* !_EM_FORMAT_HTML_QUOTE_H */
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
deleted file mode 100644
index f3b9b46c5a..0000000000
--- a/mail/em-format-html.c
+++ /dev/null
@@ -1,1627 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Michael Zucchi <notzed@ximian.com>
- *
- * Copyright 2003 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 <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <ctype.h>
-
-#include <gal/util/e-iconv.h>
-#include <gal/util/e-util.h> /* for e_utf8_strftime, what about e_time_format_time? */
-#include "e-util/e-time-utils.h"
-
-#include <gtkhtml/gtkhtml.h>
-#include <gtkhtml/gtkhtml-embedded.h>
-#include <gtkhtml/gtkhtml-stream.h>
-#include <gtkhtml/htmlengine.h>
-
-#include <libgnomevfs/gnome-vfs-utils.h>
-#include <libgnomevfs/gnome-vfs-mime-utils.h>
-#include <libgnomevfs/gnome-vfs-mime-handlers.h>
-
-#include <camel/camel-mime-message.h>
-#include <camel/camel-stream.h>
-#include <camel/camel-stream-filter.h>
-#include <camel/camel-mime-filter.h>
-#include <camel/camel-mime-filter-tohtml.h>
-#include <camel/camel-mime-filter-enriched.h>
-#include <camel/camel-multipart.h>
-#include <camel/camel-multipart-signed.h>
-#include <camel/camel-gpg-context.h>
-#include <camel/camel-smime-context.h>
-#include <camel/camel-stream-mem.h>
-#include <camel/camel-url.h>
-#include <camel/camel-stream-fs.h>
-#include <camel/camel-string-utils.h>
-#include <camel/camel-http-stream.h>
-#include <camel/camel-data-cache.h>
-#include <camel/camel-file-utils.h>
-
-
-#include <e-util/e-msgport.h>
-
-#include "mail-component.h"
-#include "mail-mt.h"
-
-#include "em-format-html.h"
-#include "em-html-stream.h"
-#include "em-utils.h"
-
-#define d(x)
-
-#define EFH_TABLE_OPEN "<table>"
-
-struct _EMFormatHTMLPrivate {
- struct _CamelMedium *last_part; /* not reffed, DO NOT dereference */
- volatile int format_id; /* format thread id */
- guint format_timeout_id;
- struct _format_msg *format_timeout_msg;
-
- /* Table that re-maps text parts into a mutlipart/mixed */
- GHashTable *text_inline_parts;
-
- EDList pending_jobs;
- GMutex *lock;
-};
-
-static void efh_url_requested(GtkHTML *html, const char *url, GtkHTMLStream *handle, EMFormatHTML *efh);
-static gboolean efh_object_requested(GtkHTML *html, GtkHTMLEmbedded *eb, EMFormatHTML *efh);
-static void efh_gtkhtml_destroy(GtkHTML *html, EMFormatHTML *efh);
-
-static void efh_format_clone(EMFormat *, CamelMedium *, EMFormat *);
-static void efh_format_error(EMFormat *emf, CamelStream *stream, const char *txt);
-static void efh_format_message(EMFormat *, CamelStream *, CamelMedium *);
-static void efh_format_source(EMFormat *, CamelStream *, CamelMimePart *);
-static void efh_format_attachment(EMFormat *, CamelStream *, CamelMimePart *, const char *, const EMFormatHandler *);
-static gboolean efh_busy(EMFormat *);
-
-static void efh_builtin_init(EMFormatHTMLClass *efhc);
-
-static void efh_write_image(EMFormat *emf, CamelStream *stream, EMFormatPURI *puri);
-
-static EMFormatClass *efh_parent;
-static CamelDataCache *emfh_http_cache;
-
-#define EMFH_HTTP_CACHE_PATH "http"
-
-static void
-efh_init(GObject *o)
-{
- EMFormatHTML *efh = (EMFormatHTML *)o;
-
- efh->priv = g_malloc0(sizeof(*efh->priv));
-
- e_dlist_init(&efh->pending_object_list);
- e_dlist_init(&efh->priv->pending_jobs);
- efh->priv->lock = g_mutex_new();
- efh->priv->format_id = -1;
- efh->priv->text_inline_parts = g_hash_table_new(NULL, NULL);
-
- efh->html = (GtkHTML *)gtk_html_new();
- gtk_html_set_blocking(efh->html, FALSE);
- g_object_ref(efh->html);
- gtk_object_sink((GtkObject *)efh->html);
-
- gtk_html_set_default_content_type(efh->html, "text/html; charset=utf-8");
- gtk_html_set_editable(efh->html, FALSE);
-
- g_signal_connect(efh->html, "destroy", G_CALLBACK(efh_gtkhtml_destroy), efh);
- g_signal_connect(efh->html, "url_requested", G_CALLBACK(efh_url_requested), efh);
- g_signal_connect(efh->html, "object_requested", G_CALLBACK(efh_object_requested), efh);
-
- efh->body_colour = 0xeeeeee;
- efh->text_colour = 0;
- efh->frame_colour = 0x3f3f3f;
- efh->content_colour = 0xffffff;
- efh->text_html_flags = CAMEL_MIME_FILTER_TOHTML_CONVERT_NL | CAMEL_MIME_FILTER_TOHTML_CONVERT_SPACES
- | CAMEL_MIME_FILTER_TOHTML_MARK_CITATION;
-}
-
-static void
-efh_gtkhtml_destroy(GtkHTML *html, EMFormatHTML *efh)
-{
- if (efh->priv->format_timeout_id != 0) {
- g_source_remove(efh->priv->format_timeout_id);
- efh->priv->format_timeout_id = 0;
- mail_msg_free(efh->priv->format_timeout_msg);
- efh->priv->format_timeout_msg = NULL;
- }
-
- /* This probably works ... */
- if (efh->priv->format_id != -1)
- mail_msg_cancel(efh->priv->format_id);
-
- if (efh->html) {
- g_object_unref(efh->html);
- efh->html = NULL;
- }
-}
-
-static void
-efh_free_inline_parts(void *key, void *data, void *user)
-{
- camel_object_unref(data);
-}
-
-static void
-efh_finalise(GObject *o)
-{
- EMFormatHTML *efh = (EMFormatHTML *)o;
-
- /* FIXME: check for leaked stuff */
-
- em_format_html_clear_pobject(efh);
- camel_cipher_validity_free(efh->valid);
-
- efh_gtkhtml_destroy(efh->html, efh);
-
- g_hash_table_foreach(efh->priv->text_inline_parts, efh_free_inline_parts, NULL);
- g_hash_table_destroy(efh->priv->text_inline_parts);
-
- g_free(efh->priv);
-
- ((GObjectClass *)efh_parent)->finalize(o);
-}
-
-static void
-efh_base_init(EMFormatHTMLClass *efhklass)
-{
- efh_builtin_init(efhklass);
-}
-
-static void
-efh_class_init(GObjectClass *klass)
-{
- ((EMFormatClass *)klass)->format_clone = efh_format_clone;
- ((EMFormatClass *)klass)->format_error = efh_format_error;
- ((EMFormatClass *)klass)->format_message = efh_format_message;
- ((EMFormatClass *)klass)->format_source = efh_format_source;
- ((EMFormatClass *)klass)->format_attachment = efh_format_attachment;
- ((EMFormatClass *)klass)->busy = efh_busy;
-
- klass->finalize = efh_finalise;
-}
-
-GType
-em_format_html_get_type(void)
-{
- static GType type = 0;
-
- if (type == 0) {
- static const GTypeInfo info = {
- sizeof(EMFormatHTMLClass),
- (GBaseInitFunc)efh_base_init, NULL,
- (GClassInitFunc)efh_class_init,
- NULL, NULL,
- sizeof(EMFormatHTML), 0,
- (GInstanceInitFunc)efh_init
- };
- const char *base_directory = mail_component_peek_base_directory (mail_component_peek ());
- char *path;
-
- efh_parent = g_type_class_ref(em_format_get_type());
- type = g_type_register_static(em_format_get_type(), "EMFormatHTML", &info, 0);
-
- /* cache expiry - 2 hour access, 1 day max */
- path = alloca(strlen(base_directory)+16);
- sprintf(path, "%s/cache", base_directory);
- emfh_http_cache = camel_data_cache_new(path, 0, NULL);
- camel_data_cache_set_expire_age(emfh_http_cache, 24*60*60);
- camel_data_cache_set_expire_access(emfh_http_cache, 2*60*60);
- }
-
- return type;
-}
-
-EMFormatHTML *em_format_html_new(void)
-{
- EMFormatHTML *efh;
-
- efh = g_object_new(em_format_html_get_type(), 0);
-
- return efh;
-}
-
-/* force loading of http images */
-void em_format_html_load_http(EMFormatHTML *emfh)
-{
- if (emfh->load_http)
- return;
-
- /* This will remain set while we're still rendering the same message, then it wont be */
- emfh->load_http_now = TRUE;
- d(printf("redrawing with images forced on\n"));
- em_format_format_clone((EMFormat *)emfh, emfh->format.message, (EMFormat *)emfh);
-}
-
-void
-em_format_html_set_load_http(EMFormatHTML *emfh, int state)
-{
- if (emfh->load_http ^ state) {
- emfh->load_http = state;
- em_format_format_clone((EMFormat *)emfh, emfh->format.message, (EMFormat *)emfh);
- }
-}
-
-void
-em_format_html_set_mark_citations(EMFormatHTML *emfh, int state, guint32 citation_colour)
-{
- if (emfh->mark_citations ^ state || emfh->citation_colour != citation_colour) {
- emfh->mark_citations = state;
- emfh->citation_colour = citation_colour;
- em_format_format_clone((EMFormat *)emfh, emfh->format.message, (EMFormat *)emfh);
- }
-}
-
-void
-em_format_html_set_xmailer_mask(EMFormatHTML *emfh, unsigned int xmailer_mask)
-{
- if (emfh->xmailer_mask ^ xmailer_mask) {
- emfh->xmailer_mask = xmailer_mask;
- em_format_format_clone((EMFormat *)emfh, emfh->format.message, (EMFormat *)emfh);
- }
-}
-
-CamelMimePart *
-em_format_html_file_part(EMFormatHTML *efh, const char *mime_type, const char *path, const char *name)
-{
- CamelMimePart *part;
- CamelStream *stream;
- CamelDataWrapper *dw;
- char *filename;
-
- filename = g_build_filename(path, name, NULL);
- stream = camel_stream_fs_new_with_name(filename, O_RDONLY, 0);
- g_free(filename);
- if (stream == NULL)
- return NULL;
-
- part = camel_mime_part_new();
- dw = camel_data_wrapper_new();
- camel_data_wrapper_construct_from_stream(dw, stream);
- camel_object_unref(stream);
- if (mime_type)
- camel_data_wrapper_set_mime_type(dw, mime_type);
- part = camel_mime_part_new();
- camel_medium_set_content_object((CamelMedium *)part, dw);
- camel_object_unref(dw);
- camel_mime_part_set_filename(part, name);
-
- return part;
-}
-
-/* all this api is a pain in the bum ... */
-
-EMFormatHTMLPObject *
-em_format_html_add_pobject(EMFormatHTML *efh, size_t size, const char *classid, CamelMimePart *part, EMFormatHTMLPObjectFunc func)
-{
- EMFormatHTMLPObject *pobj;
-
- g_assert(size >= sizeof(EMFormatHTMLPObject));
-
- pobj = g_malloc0(size);
- if (classid) {
- pobj->classid = g_strdup(classid);
- } else {
- static unsigned int uriid = 0;
-
- pobj->classid = g_strdup_printf("e-object:///%u", uriid++);
- }
-
- pobj->format = efh;
- pobj->func = func;
- pobj->part = part;
-
- e_dlist_addtail(&efh->pending_object_list, (EDListNode *)pobj);
-
- return pobj;
-}
-
-EMFormatHTMLPObject *
-em_format_html_find_pobject(EMFormatHTML *emf, const char *classid)
-{
- EMFormatHTMLPObject *pw;
-
- pw = (EMFormatHTMLPObject *)emf->pending_object_list.head;
- while (pw->next) {
- if (!strcmp(pw->classid, classid))
- return pw;
- pw = pw->next;
- }
-
- return NULL;
-}
-
-EMFormatHTMLPObject *
-em_format_html_find_pobject_func(EMFormatHTML *emf, CamelMimePart *part, EMFormatHTMLPObjectFunc func)
-{
- EMFormatHTMLPObject *pw;
-
- pw = (EMFormatHTMLPObject *)emf->pending_object_list.head;
- while (pw->next) {
- if (pw->func == func && pw->part == part)
- return pw;
- pw = pw->next;
- }
-
- return NULL;
-}
-
-void
-em_format_html_remove_pobject(EMFormatHTML *emf, EMFormatHTMLPObject *pobject)
-{
- e_dlist_remove((EDListNode *)pobject);
- if (pobject->free)
- pobject->free(pobject);
- g_free(pobject->classid);
- g_free(pobject);
-}
-
-void
-em_format_html_clear_pobject(EMFormatHTML *emf)
-{
- d(printf("clearing pending objects\n"));
- while (!e_dlist_empty(&emf->pending_object_list))
- em_format_html_remove_pobject(emf, (EMFormatHTMLPObject *)emf->pending_object_list.head);
-}
-
-struct _EMFormatHTMLJob *
-em_format_html_job_new(EMFormatHTML *emfh, void (*callback)(struct _EMFormatHTMLJob *job, int cancelled), void *data)
-{
- struct _EMFormatHTMLJob *job = g_malloc0(sizeof(*job));
-
- job->format = emfh;
- job->puri_level = ((EMFormat *)emfh)->pending_uri_level;
- job->callback = callback;
- job->u.data = data;
- if (((EMFormat *)emfh)->base)
- job->base = camel_url_copy(((EMFormat *)emfh)->base);
-
- return job;
-}
-
-void
-em_format_html_job_queue(EMFormatHTML *emfh, struct _EMFormatHTMLJob *job)
-{
- g_mutex_lock(emfh->priv->lock);
- e_dlist_addtail(&emfh->priv->pending_jobs, (EDListNode *)job);
- g_mutex_unlock(emfh->priv->lock);
-}
-
-/* ********************************************************************** */
-
-static void emfh_getpuri(struct _EMFormatHTMLJob *job, int cancelled)
-{
- d(printf(" running getpuri task\n"));
- if (!cancelled)
- job->u.puri->func((EMFormat *)job->format, job->stream, job->u.puri);
-}
-
-static void emfh_gethttp(struct _EMFormatHTMLJob *job, int cancelled)
-{
- CamelStream *cistream = NULL, *costream = NULL, *instream = NULL;
- CamelURL *url;
- ssize_t n, total = 0;
- char buffer[1500];
-
- if (cancelled
- || (url = camel_url_new(job->u.uri, NULL)) == NULL)
- goto badurl;
-
- d(printf(" running load uri task: %s\n", job->u.uri));
-
- if (emfh_http_cache)
- instream = cistream = camel_data_cache_get(emfh_http_cache, EMFH_HTTP_CACHE_PATH, job->u.uri, NULL);
-
- if (instream == NULL) {
- char *proxy;
-
- if (!job->format->load_http_now) {
- /* TODO: Ideally we would put the http requests into another queue and only send them out
- if the user selects 'load images', when they do. The problem is how to maintain this
- state with multiple renderings, and how to adjust the thread dispatch/setup routine to handle it */
- /* FIXME: Need to handle 'load if sender in addressbook' case too */
- camel_url_free(url);
- goto done;
- }
-
- instream = camel_http_stream_new(CAMEL_HTTP_METHOD_GET, ((EMFormat *)job->format)->session, url);
- proxy = em_utils_get_proxy_uri();
- camel_http_stream_set_proxy((CamelHttpStream *)instream, proxy);
- g_free(proxy);
- camel_operation_start(NULL, _("Retrieving `%s'"), job->u.uri);
- } else
- camel_operation_start_transient(NULL, _("Retrieving `%s'"), job->u.uri);
-
- camel_url_free(url);
-
- if (instream == NULL)
- goto done;
-
- if (emfh_http_cache != NULL && cistream == NULL)
- costream = camel_data_cache_add(emfh_http_cache, EMFH_HTTP_CACHE_PATH, job->u.uri, NULL);
-
- do {
- /* FIXME: progress reporting in percentage, can we get the length always? do we care? */
- n = camel_stream_read(instream, buffer, 1500);
- if (n > 0) {
- camel_operation_progress_count(NULL, total);
- total += n;
- d(printf(" read %d bytes\n", n));
- if (costream && camel_stream_write(costream, buffer, n) == -1) {
- camel_data_cache_remove(emfh_http_cache, EMFH_HTTP_CACHE_PATH, job->u.uri, NULL);
- camel_object_unref(costream);
- costream = NULL;
- }
-
- camel_stream_write(job->stream, buffer, n);
- } else if (n < 0 && costream) {
- camel_data_cache_remove(emfh_http_cache, EMFH_HTTP_CACHE_PATH, job->u.uri, NULL);
- camel_object_unref(costream);
- costream = NULL;
- }
- } while (n>0);
-
- /* indicates success */
- if (n == 0)
- camel_stream_close(job->stream);
-
- if (costream)
- camel_object_unref(costream);
-
- camel_object_unref(instream);
-done:
- camel_operation_end(NULL);
-badurl:
- g_free(job->u.uri);
-}
-
-/* ********************************************************************** */
-
-static void
-efh_url_requested(GtkHTML *html, const char *url, GtkHTMLStream *handle, EMFormatHTML *efh)
-{
- EMFormatPURI *puri;
- struct _EMFormatHTMLJob *job = NULL;
-
- d(printf("url requested, html = %p, url '%s'\n", html, url));
-
- puri = em_format_find_visible_puri((EMFormat *)efh, url);
- if (puri) {
- puri->use_count++;
-
- d(printf(" adding puri job\n"));
- job = em_format_html_job_new(efh, emfh_getpuri, puri);
- } else if (g_ascii_strncasecmp(url, "http:", 5) == 0 || g_ascii_strncasecmp(url, "https:", 6) == 0) {
- d(printf(" adding job, get %s\n", url));
- job = em_format_html_job_new(efh, emfh_gethttp, g_strdup(url));
- } else {
- d(printf("HTML Includes reference to unknown uri '%s'\n", url));
- gtk_html_stream_close(handle, GTK_HTML_STREAM_ERROR);
- }
-
- if (job) {
- job->stream = em_html_stream_new(html, handle);
- em_format_html_job_queue(efh, job);
- }
-}
-
-static gboolean
-efh_object_requested(GtkHTML *html, GtkHTMLEmbedded *eb, EMFormatHTML *efh)
-{
- EMFormatHTMLPObject *pobject;
- int res = FALSE;
-
- if (eb->classid == NULL)
- return FALSE;
-
- pobject = em_format_html_find_pobject(efh, eb->classid);
- if (pobject) {
- /* This stops recursion of the part */
- e_dlist_remove((EDListNode *)pobject);
- res = pobject->func(efh, eb, pobject);
- e_dlist_addhead(&efh->pending_object_list, (EDListNode *)pobject);
- } else {
- printf("HTML Includes reference to unknown object '%s'\n", eb->classid);
- }
-
- return res;
-}
-
-/* ********************************************************************** */
-#include "em-inline-filter.h"
-#include <camel/camel-stream-null.h>
-
-/* FIXME: This is duplicated in em-format-html-display, should be exported or in security module */
-static const struct {
- const char *icon, *shortdesc;
-} smime_sign_table[4] = {
- { "pgp-signature-nokey.png", N_("Unsigned") },
- { "pgp-signature-ok.png", N_("Valid signature") },
- { "pgp-signature-bad.png", N_("Invalid signature") },
- { "pgp-signature-nokey.png", N_("Valid signature, cannot verify sender") },
-};
-
-static const struct {
- const char *icon, *shortdesc;
-} smime_encrypt_table[4] = {
- { NULL, N_("Unencrypted") },
- { "pgp-signature-ok.png", N_("Encrypted, weak"),},
- { "pgp-signature-ok.png", N_("Encrypted") },
- { "pgp-signature-ok.png", N_("Encrypted, strong") },
-};
-
-/* TODO: this could probably be virtual on em-format-html
- then we only need one version of each type handler */
-static void
-efh_output_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, CamelCipherValidity *valid)
-{
- CamelCipherValidity *save = ((EMFormatHTML *)emf)->valid_parent;
-
- /* Note: this same logic is in efhd_output_secure */
- if (((EMFormatHTML *)emf)->valid == NULL) {
- ((EMFormatHTML *)emf)->valid = valid;
- } else {
- e_dlist_addtail(&((EMFormatHTML *)emf)->valid_parent->children, (EDListNode *)valid);
- camel_cipher_validity_envelope(((EMFormatHTML *)emf)->valid_parent, valid);
- }
-
- ((EMFormatHTML *)emf)->valid_parent = valid;
- em_format_part(emf, stream, part);
- ((EMFormatHTML *)emf)->valid_parent = save;
-
- if (((EMFormatHTML *)emf)->valid == valid
- && (valid->encrypt.status != CAMEL_CIPHER_VALIDITY_ENCRYPT_NONE
- || valid->sign.status != CAMEL_CIPHER_VALIDITY_SIGN_NONE)) {
- char *classid;
- CamelMimePart *iconpart;
-
- camel_stream_printf(stream, "<table border=0 width=\"100%%\" cellpadding=3 cellspacing=0 bgcolor=%s><tr>",
- valid->sign.status == CAMEL_CIPHER_VALIDITY_SIGN_GOOD?"#88bb88":"#bb8888");
-
- classid = g_strdup_printf("smime:///em-format-html/%p/icon/signed", part);
- camel_stream_printf(stream, "<td valign=\"top\"><img src=\"%s\"></td><td valign=\"top\" width=\"100%%\">", classid);
- iconpart = em_format_html_file_part((EMFormatHTML *)emf, "image/png",
- EVOLUTION_ICONSDIR, smime_sign_table[valid->sign.status].icon);
- if (iconpart) {
- (void)em_format_add_puri(emf, sizeof(EMFormatPURI), classid, iconpart, efh_write_image);
- camel_object_unref(iconpart);
- }
- g_free(classid);
-
- if (valid->sign.status != CAMEL_CIPHER_VALIDITY_SIGN_NONE) {
- camel_stream_printf(stream, "%s<br>", _(smime_sign_table[valid->sign.status].shortdesc));
- }
-
- if (valid->encrypt.status != CAMEL_CIPHER_VALIDITY_ENCRYPT_NONE) {
- camel_stream_printf(stream, "%s<br>", _(smime_encrypt_table[valid->encrypt.status].shortdesc));
- }
-
- camel_stream_printf(stream, "</td></tr></table>");
- }
-}
-
-static void
-efh_application_xpkcs7mime(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info)
-{
- CamelCipherContext *context;
- CamelException *ex;
- extern CamelSession *session;
- CamelMimePart *opart;
- CamelCipherValidity *valid;
-
- ex = camel_exception_new();
-
- context = camel_smime_context_new(session);
-
- opart = camel_mime_part_new();
- valid = camel_cipher_decrypt(context, part, opart, ex);
- if (valid == NULL) {
- em_format_format_error(emf, stream, ex->desc?ex->desc:_("Could not parse S/MIME message: Unknown error"));
- em_format_part_as(emf, stream, part, NULL);
- } else {
- efh_output_secure(emf, stream, opart, valid);
- }
-
- camel_object_unref(opart);
- camel_object_unref(context);
- camel_exception_free(ex);
-}
-
-static void
-efh_text_plain(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info)
-{
- CamelStreamFilter *filtered_stream;
- CamelMimeFilter *html_filter;
- CamelMultipart *mp;
- CamelContentType *type;
- const char *format;
- guint32 rgb = 0x737373, flags;
- int i, count;
-
- camel_stream_printf (stream,
- "<table bgcolor=\"#%06x\" cellspacing=0 cellpadding=1 width=100%%><tr><td>\n"
- "<table bgcolor=\"#%06x\" cellspacing=0 cellpadding=0 width=100%%><tr><td>\n"
- "<table cellspacing=0 cellpadding=10><td><tr>\n",
- efh->frame_colour & 0xffffff, efh->content_colour & 0xffffff);
-
- flags = efh->text_html_flags;
-
- /* Check for RFC 2646 flowed text. */
- type = camel_mime_part_get_content_type(part);
- if (camel_content_type_is (type, "text", "plain")
- && (format = camel_content_type_param (type, "format"))
- && !g_ascii_strcasecmp(format, "flowed"))
- flags |= CAMEL_MIME_FILTER_TOHTML_FORMAT_FLOWED;
-
- /* This scans the text part for inline-encoded data, creates
- a multipart of all the parts inside it. */
-
- /* FIXME: We should discard this multipart if it only contains
- the original text, but it makes this hash lookup more complex */
-
- /* TODO: We could probably put this in the superclass, since
- no knowledge of html is required - but this messes with
- filters a bit. Perhaps the superclass should just deal with
- html anyway and be done with it ... */
-
- mp = g_hash_table_lookup(efh->priv->text_inline_parts, part);
- if (mp == NULL) {
- EMInlineFilter *inline_filter;
- CamelStream *null;
-
- null = camel_stream_null_new();
- filtered_stream = camel_stream_filter_new_with_stream(null);
- camel_object_unref(null);
- inline_filter = em_inline_filter_new(camel_mime_part_get_encoding(part));
- camel_stream_filter_add(filtered_stream, (CamelMimeFilter *)inline_filter);
- camel_data_wrapper_write_to_stream(camel_medium_get_content_object((CamelMedium *)part), (CamelStream *)filtered_stream);
- camel_stream_close((CamelStream *)filtered_stream);
- camel_object_unref(filtered_stream);
- mp = em_inline_filter_get_multipart(inline_filter);
- g_hash_table_insert(efh->priv->text_inline_parts, part, mp);
- camel_object_unref(inline_filter);
- }
-
- filtered_stream = camel_stream_filter_new_with_stream(stream);
- html_filter = camel_mime_filter_tohtml_new(flags, rgb);
- camel_stream_filter_add(filtered_stream, html_filter);
- camel_object_unref(html_filter);
-
- /* We handle our made-up multipart here, so we don't recursively call ourselves */
-
- count = camel_multipart_get_number(mp);
- for (i=0;i<count;i++) {
- CamelMimePart *newpart = camel_multipart_get_part(mp, i);
-
- type = camel_mime_part_get_content_type(newpart);
- if (camel_content_type_is (type, "text", "plain")) {
- camel_stream_write_string(stream, "<tt>\n");
- em_format_format_text((EMFormat *)efh, (CamelStream *)filtered_stream, camel_medium_get_content_object((CamelMedium *)newpart));
- camel_stream_flush((CamelStream *)filtered_stream);
- camel_stream_write_string(stream, "</tt>\n");
- } else {
- em_format_part((EMFormat *)efh, stream, newpart);
- }
- }
-
- camel_object_unref(filtered_stream);
- camel_stream_write_string(stream,
- "</td></tr></table>\n"
- "</td></tr></table>\n"
- "</td></tr></table>\n");
-}
-
-static void
-efh_text_enriched(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info)
-{
- CamelStreamFilter *filtered_stream;
- CamelMimeFilter *enriched;
- CamelDataWrapper *dw;
- guint32 flags = 0;
-
- dw = camel_medium_get_content_object((CamelMedium *)part);
-
- if (!strcmp(info->mime_type, "text/richtext")) {
- flags = CAMEL_MIME_FILTER_ENRICHED_IS_RICHTEXT;
- camel_stream_write_string( stream, "\n<!-- text/richtext -->\n");
- } else {
- camel_stream_write_string( stream, "\n<!-- text/enriched -->\n");
- }
-
- enriched = camel_mime_filter_enriched_new(flags);
- filtered_stream = camel_stream_filter_new_with_stream (stream);
- camel_stream_filter_add(filtered_stream, enriched);
- camel_object_unref(enriched);
-
- camel_stream_write_string(stream, EFH_TABLE_OPEN "<tr><td><tt>\n");
- em_format_format_text((EMFormat *)efh, (CamelStream *)filtered_stream, dw);
-
- camel_stream_write_string(stream, "</tt></td></tr></table>\n");
- camel_object_unref(filtered_stream);
-}
-
-static void
-efh_write_text_html(EMFormat *emf, CamelStream *stream, EMFormatPURI *puri)
-{
- em_format_format_text(emf, stream, camel_medium_get_content_object((CamelMedium *)puri->part));
-}
-
-static void
-efh_text_html(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info)
-{
- const char *location, *base;
- EMFormatPURI *puri;
-
- camel_stream_printf (stream,
- "<table bgcolor=\"#%06x\" cellspacing=0 cellpadding=1 width=100%%><tr><td>\n"
- "<table bgcolor=\"#%06x\" cellspacing=0 cellpadding=0 width=100%%><tr><td>\n"
- "<!-- text/html -->\n",
- efh->frame_colour & 0xffffff, efh->content_colour & 0xffffff);
-
- if ((base = camel_medium_get_header((CamelMedium *)part, "Content-Base"))) {
- char *base_url;
- size_t len;
-
- len = strlen(base);
- if (*base == '"' && *(base + len - 1) == '"') {
- len -= 2;
- base_url = alloca(len + 1);
- memcpy(base_url, base + 1, len);
- base_url[len] = '\0';
- base = base_url;
- }
-
- /* FIXME: set base needs to go on the gtkhtml stream? */
- gtk_html_set_base(efh->html, base);
- }
-
- puri = em_format_add_puri((EMFormat *)efh, sizeof(EMFormatPURI), NULL, part, efh_write_text_html);
- location = puri->uri?puri->uri:puri->cid;
- d(printf("adding iframe, location %s\n", location));
- camel_stream_printf(stream,
- "<iframe src=\"%s\" frameborder=0 scrolling=no>could not get %s</iframe>\n"
- "</td></tr></table>\n"
- "</td></tr></table>\n",
- location, location);
-}
-
-/* This is a lot of code for something useless ... */
-static void
-efh_message_external(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info)
-{
- CamelContentType *type;
- const char *access_type;
- char *url = NULL, *desc = NULL;
-
- /* needs to be cleaner */
- type = camel_mime_part_get_content_type(part);
- access_type = camel_content_type_param (type, "access-type");
- if (!access_type) {
- camel_stream_printf(stream, _("Malformed external-body part."));
- return;
- }
-
- if (!g_ascii_strcasecmp(access_type, "ftp") ||
- !g_ascii_strcasecmp(access_type, "anon-ftp")) {
- const char *name, *site, *dir, *mode;
- char *path;
- char ftype[16];
-
- name = camel_content_type_param (type, "name");
- site = camel_content_type_param (type, "site");
- dir = camel_content_type_param (type, "directory");
- mode = camel_content_type_param (type, "mode");
- if (name == NULL || site == NULL)
- goto fail;
-
- /* Generate the path. */
- if (dir)
- path = g_strdup_printf("/%s/%s", *dir=='/'?dir+1:dir, name);
- else
- path = g_strdup_printf("/%s", *name=='/'?name+1:name);
-
- if (mode && &mode)
- sprintf(ftype, ";type=%c", *mode);
- else
- ftype[0] = 0;
-
- url = g_strdup_printf ("ftp://%s%s%s", site, path, ftype);
- g_free (path);
- desc = g_strdup_printf (_("Pointer to FTP site (%s)"), url);
- } else if (!g_ascii_strcasecmp (access_type, "local-file")) {
- const char *name, *site;
-
- name = camel_content_type_param (type, "name");
- site = camel_content_type_param (type, "site");
- if (name == NULL)
- goto fail;
-
- url = g_strdup_printf ("file:///%s", *name == '/' ? name+1:name);
- if (site)
- desc = g_strdup_printf(_("Pointer to local file (%s) valid at site \"%s\""), name, site);
- else
- desc = g_strdup_printf(_("Pointer to local file (%s)"), name);
- } else if (!g_ascii_strcasecmp (access_type, "URL")) {
- const char *urlparam;
- char *s, *d;
-
- /* RFC 2017 */
-
- urlparam = camel_content_type_param (type, "url");
- if (urlparam == NULL)
- goto fail;
-
- /* For obscure MIMEy reasons, the URL may be split into words */
- url = g_strdup (urlparam);
- s = d = url;
- while (*s) {
- /* FIXME: use camel_isspace */
- if (!isspace ((unsigned char)*s))
- *d++ = *s;
- s++;
- }
- *d = 0;
- desc = g_strdup_printf (_("Pointer to remote data (%s)"), url);
- } else
- goto fail;
-
- camel_stream_printf(stream, "<a href=\"%s\">%s</a>", url, desc);
- g_free(url);
- g_free(desc);
-
- return;
-
-fail:
- camel_stream_printf(stream, _("Pointer to unknown external data (\"%s\" type)"), access_type);
-}
-
-static void
-emfh_write_related(EMFormat *emf, CamelStream *stream, EMFormatPURI *puri)
-{
- em_format_format_content(emf, stream, puri->part);
- camel_stream_close(stream);
-}
-
-static void
-emfh_multipart_related_check(struct _EMFormatHTMLJob *job, int cancelled)
-{
- struct _EMFormatPURITree *ptree;
- EMFormatPURI *puri, *purin;
-
- if (cancelled)
- return;
-
- d(printf(" running multipart/related check task\n"));
-
- ptree = job->puri_level;
- puri = (EMFormatPURI *)ptree->uri_list.head;
- purin = puri->next;
- while (purin) {
- if (puri->use_count == 0) {
- d(printf("part '%s' '%s' used '%d'\n", puri->uri?puri->uri:"", puri->cid, puri->use_count));
- if (puri->func == emfh_write_related)
- em_format_part((EMFormat *)job->format, (CamelStream *)job->stream, puri->part);
- /* else it was probably added by a previous format this loop */
- }
- puri = purin;
- purin = purin->next;
- }
-}
-
-/* RFC 2387 */
-static void
-efh_multipart_related(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info)
-{
- CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content_object((CamelMedium *)part);
- CamelMimePart *body_part, *display_part = NULL;
- CamelContentType *content_type;
- const char *location, *start;
- int i, nparts;
- CamelURL *base_save = NULL;
- EMFormatPURI *puri;
- struct _EMFormatHTMLJob *job;
-
- if (!CAMEL_IS_MULTIPART(mp)) {
- em_format_format_source(emf, stream, part);
- return;
- }
-
- nparts = camel_multipart_get_number(mp);
- content_type = camel_mime_part_get_content_type(part);
- start = camel_content_type_param (content_type, "start");
- if (start && strlen(start)>2) {
- int len;
- const char *cid;
-
- /* strip <>'s */
- len = strlen (start) - 2;
- start++;
-
- for (i=0; i<nparts; i++) {
- body_part = camel_multipart_get_part(mp, i);
- cid = camel_mime_part_get_content_id(body_part);
-
- if (cid && !strncmp(cid, start, len) && strlen(cid) == len) {
- display_part = body_part;
- break;
- }
- }
- } else {
- display_part = camel_multipart_get_part(mp, 0);
- }
-
- if (display_part == NULL) {
- em_format_part_as(emf, stream, part, "multipart/mixed");
- return;
- }
-
- /* stack of present location and pending uri's */
- location = camel_mime_part_get_content_location(part);
- if (location) {
- d(printf("setting content location %s\n", location));
- base_save = emf->base;
- emf->base = camel_url_new(location, NULL);
- }
- em_format_push_level(emf);
-
- /* queue up the parts for possible inclusion */
- for (i = 0; i < nparts; i++) {
- body_part = camel_multipart_get_part(mp, i);
- if (body_part != display_part) {
- puri = em_format_add_puri(emf, sizeof(EMFormatPURI), NULL, body_part, emfh_write_related);
- d(printf(" part '%s' '%s' added\n", puri->uri?puri->uri:"", puri->cid));
- }
- }
-
- em_format_part(emf, stream, display_part);
- camel_stream_flush(stream);
-
- /* queue a job to check for un-referenced parts to add as attachments */
- job = em_format_html_job_new((EMFormatHTML *)emf, emfh_multipart_related_check, NULL);
- job->stream = stream;
- camel_object_ref(stream);
- em_format_html_job_queue((EMFormatHTML *)emf, job);
-
- em_format_pull_level(emf);
-
- if (location) {
- camel_url_free(emf->base);
- emf->base = base_save;
- }
-}
-
-static void
-efh_multipart_signed(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info)
-{
- CamelMimePart *cpart;
- CamelMultipartSigned *mps;
- CamelCipherContext *cipher = NULL;
-
- mps = (CamelMultipartSigned *)camel_medium_get_content_object((CamelMedium *)part);
- if (!CAMEL_IS_MULTIPART_SIGNED(mps)
- || (cpart = camel_multipart_get_part((CamelMultipart *)mps, CAMEL_MULTIPART_SIGNED_CONTENT)) == NULL) {
- em_format_format_error(emf, stream, _("Could not parse MIME message. Displaying as source."));
- em_format_format_source(emf, stream, part);
- return;
- }
-
- /* FIXME: Should be done via a plugin interface */
- /* FIXME: duplicated in em-format-html-display.c */
- if (g_ascii_strcasecmp("application/x-pkcs7-signature", mps->protocol) == 0)
- cipher = camel_smime_context_new(emf->session);
- else if (g_ascii_strcasecmp("application/pgp-signature", mps->protocol) == 0)
- cipher = camel_gpg_context_new(emf->session);
-
- if (cipher == NULL) {
- em_format_format_error(emf, stream, _("Unsupported signature format"));
- em_format_part_as(emf, stream, part, NULL);
- } else {
- CamelException *ex = camel_exception_new();
- CamelCipherValidity *valid;
-
- valid = camel_cipher_verify(cipher, part, ex);
- if (valid == NULL) {
- em_format_format_error(emf, stream, ex->desc?ex->desc:_("Unknown error verifying signature"));
- em_format_part_as(emf, stream, part, NULL);
- } else {
- efh_output_secure(emf, stream, cpart, valid);
- }
-
- camel_exception_free(ex);
- camel_object_unref(cipher);
- }
-}
-
-static void
-efh_write_image(EMFormat *emf, CamelStream *stream, EMFormatPURI *puri)
-{
- CamelDataWrapper *dw = camel_medium_get_content_object((CamelMedium *)puri->part);
-
- d(printf("writing image '%s'\n", puri->uri?puri->uri:puri->cid));
- camel_data_wrapper_decode_to_stream(dw, stream);
- camel_stream_close(stream);
-}
-
-static void
-efh_image(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info)
-{
- EMFormatPURI *puri;
- const char *location;
-
- puri = em_format_add_puri((EMFormat *)efh, sizeof(EMFormatPURI), NULL, part, efh_write_image);
- location = puri->uri?puri->uri:puri->cid;
- d(printf("adding image '%s'\n", location));
- camel_stream_printf(stream, "<img hspace=10 vspace=10 src=\"%s\">", location);
-}
-
-static EMFormatHandler type_builtin_table[] = {
- { "application/x-pkcs7-mime", (EMFormatFunc)efh_application_xpkcs7mime },
-
- { "image/gif", (EMFormatFunc)efh_image },
- { "image/jpeg", (EMFormatFunc)efh_image },
- { "image/png", (EMFormatFunc)efh_image },
- { "image/x-png", (EMFormatFunc)efh_image },
- { "image/tiff", (EMFormatFunc)efh_image },
- { "image/x-bmp", (EMFormatFunc)efh_image },
- { "image/bmp", (EMFormatFunc)efh_image },
- { "image/svg", (EMFormatFunc)efh_image },
- { "image/x-cmu-raster", (EMFormatFunc)efh_image },
- { "image/x-ico", (EMFormatFunc)efh_image },
- { "image/x-portable-anymap", (EMFormatFunc)efh_image },
- { "image/x-portable-bitmap", (EMFormatFunc)efh_image },
- { "image/x-portable-graymap", (EMFormatFunc)efh_image },
- { "image/x-portable-pixmap", (EMFormatFunc)efh_image },
- { "image/x-xpixmap", (EMFormatFunc)efh_image },
- { "text/enriched", (EMFormatFunc)efh_text_enriched },
- { "text/plain", (EMFormatFunc)efh_text_plain },
- { "text/html", (EMFormatFunc)efh_text_html },
- { "text/richtext", (EMFormatFunc)efh_text_enriched },
- /*{ "text/ *", (EMFormatFunc)efh_text_plain },*/
- { "message/external-body", (EMFormatFunc)efh_message_external },
- { "multipart/signed", (EMFormatFunc)efh_multipart_signed },
- { "multipart/related", (EMFormatFunc)efh_multipart_related },
-
- /* This is where one adds those busted, non-registered types,
- that some idiot mailer writers out there decide to pull out
- of their proverbials at random. */
-
- { "image/jpg", (EMFormatFunc)efh_image },
- { "image/pjpeg", (EMFormatFunc)efh_image },
-};
-
-static void
-efh_builtin_init(EMFormatHTMLClass *efhc)
-{
- int i;
-
- for (i=0;i<sizeof(type_builtin_table)/sizeof(type_builtin_table[0]);i++)
- em_format_class_add_handler((EMFormatClass *)efhc, &type_builtin_table[i]);
-}
-
-/* ********************************************************************** */
-
-/* Sigh, this is so we have a cancellable, async rendering thread */
-struct _format_msg {
- struct _mail_msg msg;
-
- EMFormatHTML *format;
- EMFormat *format_source;
- EMHTMLStream *estream;
- CamelMedium *message;
-};
-
-static char *efh_format_desc(struct _mail_msg *mm, int done)
-{
- return g_strdup(_("Formatting message"));
-}
-
-static void efh_format_do(struct _mail_msg *mm)
-{
- struct _format_msg *m = (struct _format_msg *)mm;
- struct _EMFormatHTMLJob *job;
- struct _EMFormatPURITree *puri_level;
- int cancelled = FALSE;
- CamelURL *base;
-
- if (m->format->html == NULL)
- return;
-
- camel_stream_printf((CamelStream *)m->estream,
- "<!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"
- "<body bgcolor =\"#%06x\" text=\"#%06x\" marginwidth=6 marginheight=6>\n",
- m->format->body_colour & 0xffffff,
- m->format->text_colour & 0xffffff);
-
- /* <insert top-header stuff here> */
-
- if (((EMFormat *)m->format)->mode == EM_FORMAT_SOURCE)
- em_format_format_source((EMFormat *)m->format, (CamelStream *)m->estream, (CamelMimePart *)m->message);
- else
- em_format_format_message((EMFormat *)m->format, (CamelStream *)m->estream, m->message);
-
- camel_stream_write_string((CamelStream *)m->estream, "</body>\n</html>\n");
- camel_stream_close((CamelStream *)m->estream);
- camel_object_unref(m->estream);
- m->estream = NULL;
-
- puri_level = ((EMFormat *)m->format)->pending_uri_level;
- base = ((EMFormat *)m->format)->base;
-
- /* now dispatch any added tasks ... */
- g_mutex_lock(m->format->priv->lock);
- while ((job = (struct _EMFormatHTMLJob *)e_dlist_remhead(&m->format->priv->pending_jobs))) {
- g_mutex_unlock(m->format->priv->lock);
-
- /* This is an implicit check to see if the gtkhtml has been destroyed */
- if (!cancelled)
- cancelled = m->format->html == NULL;
-
- /* Now do an explicit check for user cancellation */
- if (!cancelled)
- cancelled = camel_operation_cancel_check(NULL);
-
- /* call jobs even if cancelled, so they can clean up resources */
- ((EMFormat *)m->format)->pending_uri_level = job->puri_level;
- if (job->base)
- ((EMFormat *)m->format)->base = job->base;
- job->callback(job, cancelled);
- ((EMFormat *)m->format)->base = base;
-
- /* clean up the job */
- camel_object_unref(job->stream);
- if (job->base)
- camel_url_free(job->base);
- g_free(job);
-
- g_mutex_lock(m->format->priv->lock);
- }
- g_mutex_unlock(m->format->priv->lock);
- d(printf("out of jobs, done\n"));
-
- ((EMFormat *)m->format)->pending_uri_level = puri_level;
-}
-
-static void efh_format_done(struct _mail_msg *mm)
-{
- struct _format_msg *m = (struct _format_msg *)mm;
-
- d(printf("formatting finished\n"));
-
- m->format->priv->format_id = -1;
- g_signal_emit_by_name(m->format, "complete");
-}
-
-static void efh_format_free(struct _mail_msg *mm)
-{
- struct _format_msg *m = (struct _format_msg *)mm;
-
- d(printf("formatter freed\n"));
- g_object_unref(m->format);
- if (m->estream) {
- camel_stream_close((CamelStream *)m->estream);
- camel_object_unref(m->estream);
- }
- if (m->message)
- camel_object_unref(m->message);
- if (m->format_source)
- g_object_unref(m->format_source);
-}
-
-static struct _mail_msg_op efh_format_op = {
- efh_format_desc,
- efh_format_do,
- efh_format_done,
- efh_format_free,
-};
-
-static gboolean
-efh_format_timeout(struct _format_msg *m)
-{
- GtkHTMLStream *hstream;
- EMFormatHTML *efh = m->format;
- struct _EMFormatHTMLPrivate *p = efh->priv;
-
- if (m->format->html == NULL) {
- mail_msg_free(m);
- return FALSE;
- }
-
- d(printf("timeout called ...\n"));
- if (p->format_id != -1) {
- d(printf(" still waiting for cancellation to take effect, waiting ...\n"));
- return TRUE;
- }
-
- g_assert(e_dlist_empty(&p->pending_jobs));
-
- d(printf(" ready to go, firing off format thread\n"));
-
- /* call super-class to kick it off */
- efh_parent->format_clone((EMFormat *)efh, m->message, m->format_source);
- em_format_html_clear_pobject(m->format);
-
- if (efh->valid) {
- camel_cipher_validity_free(efh->valid);
- efh->valid = NULL;
- efh->valid_parent = NULL;
- }
-
- if (m->message == NULL) {
- hstream = gtk_html_begin(efh->html);
- gtk_html_stream_close(hstream, GTK_HTML_STREAM_OK);
- mail_msg_free(m);
- p->last_part = NULL;
- } else {
- /*hstream = gtk_html_begin(efh->html);*/
- hstream = NULL;
- m->estream = (EMHTMLStream *)em_html_stream_new(efh->html, hstream);
-
- if (p->last_part == m->message) {
- /* HACK: so we redraw in the same spot */
- /* FIXME: It doesn't work! */
- efh->html->engine->newPage = FALSE;
- } else {
- /* clear cache of inline-scanned text parts */
- g_hash_table_foreach(p->text_inline_parts, efh_free_inline_parts, NULL);
- g_hash_table_destroy(p->text_inline_parts);
- p->text_inline_parts = g_hash_table_new(NULL, NULL);
-
- p->last_part = m->message;
- /* FIXME: Need to handle 'load if sender in addressbook' case too */
- efh->load_http_now = efh->load_http;
- }
-
- efh->priv->format_id = m->msg.seq;
- e_thread_put(mail_thread_new, (EMsg *)m);
- }
-
- efh->priv->format_timeout_id = 0;
- efh->priv->format_timeout_msg = NULL;
-
- return FALSE;
-}
-
-static void efh_format_clone(EMFormat *emf, CamelMedium *part, EMFormat *emfsource)
-{
- EMFormatHTML *efh = (EMFormatHTML *)emf;
- struct _format_msg *m;
-
- /* How to sub-class ? Might need to adjust api ... */
-
- if (efh->html == NULL)
- return;
-
- d(printf("efh_format called\n"));
- if (efh->priv->format_timeout_id != 0) {
- d(printf(" timeout for last still active, removing ...\n"));
- g_source_remove(efh->priv->format_timeout_id);
- efh->priv->format_timeout_id = 0;
- mail_msg_free(efh->priv->format_timeout_msg);
- efh->priv->format_timeout_msg = NULL;
- }
-
- m = mail_msg_new(&efh_format_op, NULL, sizeof(*m));
- m->format = (EMFormatHTML *)emf;
- g_object_ref(emf);
- m->format_source = emfsource;
- if (emfsource)
- g_object_ref(emfsource);
- m->message = part;
- if (part)
- camel_object_ref(part);
-
- if (efh->priv->format_id == -1) {
- d(printf(" idle, forcing format\n"));
- efh_format_timeout(m);
- } else {
- d(printf(" still busy, cancelling and queuing wait\n"));
- /* cancel and poll for completion */
- mail_msg_cancel(efh->priv->format_id);
- efh->priv->format_timeout_msg = m;
- efh->priv->format_timeout_id = g_timeout_add(100, (GSourceFunc)efh_format_timeout, m);
- }
-}
-
-static void efh_format_error(EMFormat *emf, CamelStream *stream, const char *txt)
-{
- char *html;
-
- html = camel_text_to_html (txt, CAMEL_MIME_FILTER_TOHTML_CONVERT_NL|CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS, 0);
- camel_stream_printf(stream, "<em><font color=\"red\">%s</font></em><br>", html);
- g_free(html);
-}
-
-static void
-efh_format_text_header(EMFormat *emf, CamelStream *stream, const char *label, const char *value, guint32 flags)
-{
- char *mhtml = NULL;
- const char *fmt, *html;
-
- if (value == NULL)
- return;
-
- while (*value == ' ')
- value++;
-
- if (flags & EM_FORMAT_HTML_HEADER_HTML)
- html = value;
- else
- html = mhtml = camel_text_to_html(value, ((EMFormatHTML *)emf)->text_html_flags, 0);
-
- if (((EMFormatHTML *)emf)->simple_headers) {
- fmt = "<b>%s</b>: %s<br>";
- } else {
- if (flags & EM_FORMAT_HTML_HEADER_NOCOLUMNS) {
- if (flags & EM_FORMAT_HEADER_BOLD)
- fmt = "<tr><td><b>%s:</b> %s</td></tr>";
- else
- fmt = "<tr><td>%s: %s</td></tr>";
- } else {
- if (flags & EM_FORMAT_HEADER_BOLD)
- fmt = "<tr><th align=\"right\" valign=\"top\">%s:<b>&nbsp;</b></th><td>%s</td></tr>";
- else
- fmt = "<tr><td align=\"right\" valign=\"top\">%s:<b>&nbsp;</b></td><td>%s</td></tr>";
- }
- }
-
- camel_stream_printf(stream, fmt, label, html);
- g_free(mhtml);
-}
-
-static void
-efh_format_address(EMFormat *emf, CamelStream *stream, const CamelInternetAddress *cia, const char *name, guint32 flags)
-{
- char *text;
-
- if (cia == NULL || !camel_internet_address_get(cia, 0, NULL, NULL))
- return;
-
- text = camel_address_format((CamelAddress *)cia);
- efh_format_text_header(emf, stream, name, text, flags | EM_FORMAT_HEADER_BOLD);
- g_free(text);
-}
-
-static void
-efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, const char *namein, guint32 flags, const char *charset)
-{
-#define msg ((CamelMimeMessage *)part)
-#define efh ((EMFormatHTML *)emf)
- char *name;
-
- name = alloca(strlen(namein)+1);
- strcpy(name, namein);
- camel_strdown(name);
-
- if (!strcmp(name, "from"))
- efh_format_address(emf, stream, camel_mime_message_get_from(msg), _("From"), flags);
- else if (!strcmp(name, "reply-to"))
- efh_format_address(emf, stream, camel_mime_message_get_reply_to(msg), _("Reply-To"), flags);
- else if (!strcmp(name, "to"))
- efh_format_address(emf, stream, camel_mime_message_get_recipients(msg, CAMEL_RECIPIENT_TYPE_TO), _("To"), flags);
- else if (!strcmp(name, "cc"))
- efh_format_address(emf, stream, camel_mime_message_get_recipients(msg, CAMEL_RECIPIENT_TYPE_CC), _("Cc"), flags);
- else if (!strcmp(name, "bcc"))
- efh_format_address(emf, stream, camel_mime_message_get_recipients(msg, CAMEL_RECIPIENT_TYPE_BCC), _("Bcc"), flags);
- else {
- const char *txt, *label;
- char *value = NULL;
-
- if (!strcmp(name, "subject")) {
- txt = camel_mime_message_get_subject(msg);
- label = _("Subject");
- flags |= EM_FORMAT_HEADER_BOLD;
- } else if (!strcmp(name, "x-evolution-mailer")) { /* pseudo-header */
- txt = camel_medium_get_header(part, "x-mailer");
- if (txt == NULL)
- txt = camel_medium_get_header(part, "user-agent");
- if (txt == NULL
- || ((efh->xmailer_mask & EM_FORMAT_HTML_XMAILER_OTHER) == 0
- && ((efh->xmailer_mask & EM_FORMAT_HTML_XMAILER_EVOLUTION) == 0
- || strstr(txt, "Evolution") == NULL)))
- return;
-
- label = _("Mailer");
- flags |= EM_FORMAT_HEADER_BOLD;
- } else if (!strcmp(name, "date")) {
- int msg_offset, local_tz;
- time_t msg_date;
- struct tm local;
- const char *date;
-
- date = camel_medium_get_header(part, "date");
- if (date == NULL)
- return;
-
- /* Show the local timezone equivalent in brackets if the sender is remote */
- msg_date = camel_header_decode_date (date, &msg_offset);
- e_localtime_with_offset(msg_date, &local, &local_tz);
-
- /* Convert message offset to minutes (e.g. -0400 --> -240) */
- msg_offset = ((msg_offset / 100) * 60) + (msg_offset % 100);
- /* Turn into offset from localtime, not UTC */
- msg_offset -= local_tz / 60;
-
- if (msg_offset) {
- char buf[32], *html;
-
- msg_offset += (local.tm_hour * 60) + local.tm_min;
- if (msg_offset >= (24 * 60) || msg_offset < 0) {
- /* translators: strftime format for local time equivalent in Date header display, with day */
- e_utf8_strftime(buf, sizeof(buf), _("<I> (%a, %R %Z)</I>"), &local);
- } else {
- /* translators: strftime format for local time equivalent in Date header display, without day */
- e_utf8_strftime(buf, sizeof(buf), _("<I> (%R %Z)</I>"), &local);
- }
-
- html = camel_text_to_html(date, ((EMFormatHTML *)emf)->text_html_flags, 0);
- txt = value = g_strdup_printf("%s %s", html, buf);
- g_free(html);
- flags |= EM_FORMAT_HTML_HEADER_HTML;
- } else {
- txt = date;
- }
-
- label = _("Date");
- flags |= EM_FORMAT_HEADER_BOLD;
- } else {
- txt = camel_medium_get_header(part, name);
- value = camel_header_decode_string (txt, charset);
- txt = value;
- label = namein;
- }
-
- efh_format_text_header(emf, stream, label, txt, flags);
- g_free(value);
- }
-#undef msg
-#undef efh
-}
-
-void
-em_format_html_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
-{
- EMFormatHeader *h;
- const char *charset;
- CamelContentType *ct;
-#define emf ((EMFormat *)efh)
-
- ct = camel_mime_part_get_content_type((CamelMimePart *)part);
- charset = camel_content_type_param (ct, "charset");
- charset = e_iconv_charset_name(charset);
-
- if (!efh->simple_headers)
- camel_stream_printf(stream,
- "<font color=\"#%06x\">\n"
- "<table cellpadding=0>\n",
- efh->text_colour & 0xffffff);
-
- /* dump selected headers */
- h = (EMFormatHeader *)emf->header_list.head;
- if (h->next == NULL || emf->mode == EM_FORMAT_ALLHEADERS) {
- struct _camel_header_raw *header;
-
- header = ((CamelMimePart *)part)->headers;
- while (header) {
- efh_format_header(emf, stream, part, header->name, EM_FORMAT_HTML_HEADER_NOCOLUMNS, charset);
- header = header->next;
- }
- } else {
- while (h->next) {
- efh_format_header(emf, stream, part, h->name, h->flags, charset);
- h = h->next;
- }
- }
-
- if (!efh->simple_headers)
- camel_stream_printf(stream,
- "</table>\n</font>\n");
-#undef emf
-}
-
-static void efh_format_message(EMFormat *emf, CamelStream *stream, CamelMedium *part)
-{
-#define efh ((EMFormatHTML *)emf)
- CamelCipherValidity *save = efh->valid, *save_parent = efh->valid_parent;
-
- efh->valid = NULL;
- efh->valid_parent = NULL;
-
- if (emf->message != part)
- camel_stream_printf(stream, "<blockquote>\n");
-
- if (!efh->hide_headers)
- em_format_html_format_headers(efh, stream, part);
-
- camel_stream_printf(stream, "<table height=6><tr><td><a></a></td></tr></table>\n");
- em_format_part(emf, stream, (CamelMimePart *)part);
-
- if (emf->message != part)
- camel_stream_printf(stream, "</blockquote>\n");
-
- camel_cipher_validity_free(efh->valid);
-
- efh->valid = save;
- efh->valid_parent = save_parent;
-#undef efh
-}
-
-static void efh_format_source(EMFormat *emf, CamelStream *stream, CamelMimePart *part)
-{
- CamelStreamFilter *filtered_stream;
- CamelMimeFilter *html_filter;
- CamelDataWrapper *dw = (CamelDataWrapper *)part;
-
- filtered_stream = camel_stream_filter_new_with_stream ((CamelStream *) stream);
- html_filter = camel_mime_filter_tohtml_new (CAMEL_MIME_FILTER_TOHTML_CONVERT_NL
- | CAMEL_MIME_FILTER_TOHTML_CONVERT_SPACES
- | CAMEL_MIME_FILTER_TOHTML_ESCAPE_8BIT, 0);
- camel_stream_filter_add(filtered_stream, html_filter);
- camel_object_unref(html_filter);
-
- camel_stream_write_string((CamelStream *)stream, EFH_TABLE_OPEN "<tr><td><tt>");
- em_format_format_text(emf, (CamelStream *)filtered_stream, dw);
- camel_object_unref(filtered_stream);
-
- camel_stream_write_string(stream, "</tt></td></tr></table>");
-}
-
-static void
-efh_format_attachment(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const char *mime_type, const EMFormatHandler *handle)
-{
- char *text, *html;
-
- /* we display all inlined attachments only */
-
- /* this could probably be cleaned up ... */
- camel_stream_write_string(stream,
- "<table border=1 cellspacing=0 cellpadding=0><tr><td>"
- "<table width=10 cellspacing=0 cellpadding=0>"
- "<tr><td></td></tr></table></td>"
- "<td><table width=3 cellspacing=0 cellpadding=0>"
- "<tr><td></td></tr></table></td><td><font size=-1>\n");
-
- /* output some info about it */
- text = em_format_describe_part(part, mime_type);
- html = camel_text_to_html(text, ((EMFormatHTML *)emf)->text_html_flags & CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS, 0);
- camel_stream_write_string(stream, html);
- g_free(html);
- g_free(text);
-
- camel_stream_write_string(stream, "</font></td></tr><tr></table>");
-
- if (handle && em_format_is_inline(emf, part))
- handle->handler(emf, stream, part, handle);
-}
-
-static gboolean
-efh_busy(EMFormat *emf)
-{
- return (((EMFormatHTML *)emf)->priv->format_id != -1);
-}
diff --git a/mail/em-format-html.h b/mail/em-format-html.h
deleted file mode 100644
index 4a981cd792..0000000000
--- a/mail/em-format-html.h
+++ /dev/null
@@ -1,158 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Michael Zucchi <notzed@ximian.com>
- *
- * Copyright 2003 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.
- *
- */
-
-
-/*
- Concrete class for formatting mails to html
-*/
-
-#ifndef _EM_FORMAT_HTML_H
-#define _EM_FORMAT_HTML_H
-
-#include "em-format.h"
-
-typedef struct _EMFormatHTML EMFormatHTML;
-typedef struct _EMFormatHTMLClass EMFormatHTMLClass;
-
-#if 0
-struct _EMFormatHTMLHandler {
- EFrormatHandler base;
-};
-#endif
-
-struct _GtkHTMLEmbedded;
-struct _CamelMimePart;
-struct _CamelMedium;
-struct _CamelStream;
-
-/* A HTMLJob will be executed in another thread, in sequence,
- It's job is to write to its stream, close it if successful,
- then exit */
-
-typedef struct _EMFormatHTMLJob EMFormatHTMLJob;
-
-struct _EMFormatHTMLJob {
- struct _EMFormatHTMLJob *next, *prev;
-
- EMFormatHTML *format;
- struct _CamelStream *stream;
-
- /* We need to track the state of the visibility tree at
- the point this uri was generated */
- struct _EMFormatPURITree *puri_level;
- struct _CamelURL *base;
-
- void (*callback)(struct _EMFormatHTMLJob *job, int cancelled);
- union {
- char *uri;
- struct _CamelMedium *msg;
- EMFormatPURI *puri;
- struct _EMFormatPURITree *puri_level;
- void *data;
- } u;
-};
-
-/* Pending object (classid: url) */
-typedef struct _EMFormatHTMLPObject EMFormatHTMLPObject;
-
-typedef gboolean (*EMFormatHTMLPObjectFunc)(EMFormatHTML *md, struct _GtkHTMLEmbedded *eb, EMFormatHTMLPObject *pobject);
-
-struct _EMFormatHTMLPObject {
- struct _EMFormatHTMLPObject *next, *prev;
-
- void (*free)(struct _EMFormatHTMLPObject *);
- struct _EMFormatHTML *format;
-
- char *classid;
-
- EMFormatHTMLPObjectFunc func;
- struct _CamelMimePart *part;
-};
-
-#define EM_FORMAT_HTML_HEADER_NOCOLUMNS (EM_FORMAT_HEADER_LAST)
-#define EM_FORMAT_HTML_HEADER_HTML (EM_FORMAT_HEADER_LAST<<1) /* header already in html format */
-#define EM_FORMAT_HTML_HEADER_LAST (EM_FORMAT_HEADER_LAST<<8)
-
-/* xmailer_mask bits */
-#define EM_FORMAT_HTML_XMAILER_EVOLUTION (1<<0)
-#define EM_FORMAT_HTML_XMAILER_OTHER (1<<1)
-#define EM_FORMAT_HTML_XMAILER_RUPERT (1<<2)
-
-struct _EMFormatHTML {
- EMFormat format;
-
- struct _EMFormatHTMLPrivate *priv;
-
- struct _GtkHTML *html;
-
- EDList pending_object_list;
-
- struct _CamelCipherValidity *valid;
- struct _CamelCipherValidity *valid_parent;
-
- GSList *headers;
-
- guint32 text_html_flags; /* default flags for text to html conversion */
- guint32 body_colour; /* header box colour */
- guint32 text_colour;
- guint32 frame_colour;
- guint32 content_colour;
- guint32 citation_colour;
- unsigned int xmailer_mask:4;
- unsigned int load_http:1;
- unsigned int load_http_now:1;
- unsigned int mark_citations:1;
- unsigned int simple_headers:1; /* simple header format, no box/table */
- unsigned int hide_headers:1; /* no headers at all */
-};
-
-struct _EMFormatHTMLClass {
- EMFormatClass format_class;
-};
-
-GType em_format_html_get_type(void);
-EMFormatHTML *em_format_html_new(void);
-
-void em_format_html_load_http(EMFormatHTML *emf);
-
-void em_format_html_set_load_http(EMFormatHTML *emf, int state);
-void em_format_html_set_mark_citations(EMFormatHTML *emf, int state, guint32 citation_colour);
-void em_format_html_set_xmailer_mask(EMFormatHTML *emf, unsigned int xmailer_mask);
-
-/* output headers */
-void em_format_html_format_headers(EMFormatHTML *efh, struct _CamelStream *stream, struct _CamelMedium *part);
-
-/* retrieves a pseudo-part icon wrapper for a file */
-struct _CamelMimePart *em_format_html_file_part(EMFormatHTML *efh, const char *mime_type, const char *path, const char *name);
-
-/* for implementers */
-EMFormatHTMLPObject *em_format_html_add_pobject(EMFormatHTML *efh, size_t size, const char *classid, struct _CamelMimePart *part, EMFormatHTMLPObjectFunc func);
-EMFormatHTMLPObject *em_format_html_find_pobject(EMFormatHTML *emf, const char *classid);
-EMFormatHTMLPObject *em_format_html_find_pobject_func(EMFormatHTML *emf, struct _CamelMimePart *part, EMFormatHTMLPObjectFunc func);
-void em_format_html_remove_pobject(EMFormatHTML *emf, EMFormatHTMLPObject *pobject);
-void em_format_html_clear_pobject(EMFormatHTML *emf);
-
-EMFormatHTMLJob *em_format_html_job_new(EMFormatHTML *emfh, void (*callback)(struct _EMFormatHTMLJob *job, int cancelled), void *data)
-;
-void em_format_html_job_queue(EMFormatHTML *emfh, struct _EMFormatHTMLJob *job);
-
-#endif /* ! EM_FORMAT_HTML_H */
diff --git a/mail/em-format-quote.c b/mail/em-format-quote.c
deleted file mode 100644
index 1b26ff255e..0000000000
--- a/mail/em-format-quote.c
+++ /dev/null
@@ -1,289 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2003 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/camel-stream.h>
-#include <camel/camel-stream-filter.h>
-#include <camel/camel-mime-filter-tohtml.h>
-#include <camel/camel-mime-filter-enriched.h>
-#include "em-format-quote.h"
-
-struct _EMFormatQuotePrivate {
- int dummy;
-};
-
-static void emfq_format_clone(EMFormat *, CamelMedium *, EMFormat *);
-static void emfq_format_error(EMFormat *emf, CamelStream *stream, const char *txt);
-static void emfq_format_message(EMFormat *, CamelStream *, CamelMedium *);
-static void emfq_format_source(EMFormat *, CamelStream *, CamelMimePart *);
-static void emfq_format_attachment(EMFormat *, CamelStream *, CamelMimePart *, const char *, const EMFormatHandler *);
-
-static void emfq_builtin_init(EMFormatQuoteClass *efhc);
-
-static EMFormatClass *emfq_parent;
-
-static void
-emfq_init(GObject *o)
-{
- EMFormatQuote *emfq =(EMFormatQuote *) o;
-
- emfq->priv = g_malloc0(sizeof(*emfq->priv));
-
- /* we want to convert url's etc */
- emfq->text_html_flags = CAMEL_MIME_FILTER_TOHTML_PRE | CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS
- | CAMEL_MIME_FILTER_TOHTML_CONVERT_ADDRESSES;
-}
-
-static void
-emfq_finalise(GObject *o)
-{
- EMFormatQuote *emfq =(EMFormatQuote *) o;
-
- if (emfq->stream)
- camel_object_unref(emfq->stream);
- g_free(emfq->credits);
- g_free(emfq->priv);
-
- ((GObjectClass *) emfq_parent)->finalize(o);
-}
-
-static void
-emfq_base_init(EMFormatQuoteClass *emfqklass)
-{
- emfq_builtin_init(emfqklass);
-}
-
-static void
-emfq_class_init(GObjectClass *klass)
-{
- ((EMFormatClass *) klass)->format_clone = emfq_format_clone;
- ((EMFormatClass *) klass)->format_error = emfq_format_error;
- ((EMFormatClass *) klass)->format_message = emfq_format_message;
- ((EMFormatClass *) klass)->format_source = emfq_format_source;
- ((EMFormatClass *) klass)->format_attachment = emfq_format_attachment;
-
- klass->finalize = emfq_finalise;
-}
-
-GType
-em_format_quote_get_type(void)
-{
- static GType type = 0;
-
- if (type == 0) {
- static const GTypeInfo info = {
- sizeof(EMFormatQuoteClass),
- (GBaseInitFunc)emfq_base_init, NULL,
- (GClassInitFunc)emfq_class_init,
- NULL, NULL,
- sizeof(EMFormatQuote), 0,
- (GInstanceInitFunc) emfq_init
- };
-
- emfq_parent = g_type_class_ref(em_format_get_type());
- type = g_type_register_static(em_format_get_type(), "EMFormatQuote", &info, 0);
- }
-
- return type;
-}
-
-EMFormatQuote *
-em_format_quote_new(const char *credits, CamelStream *stream, guint32 flags)
-{
- EMFormatQuote *emfq;
-
- emfq = (EMFormatQuote *)g_object_new(em_format_quote_get_type(), NULL);
-
- emfq->credits = g_strdup(credits);
- emfq->stream = stream;
- camel_object_ref(stream);
- emfq->flags = flags;
-
- return emfq;
-}
-
-static void
-emfq_format_clone(EMFormat *emf, CamelMedium *part, EMFormat *src)
-{
-#define emfq ((EMFormatQuote *)emf)
-
- ((EMFormatClass *)emfq_parent)->format_clone(emf, part, src);
-
- camel_stream_reset(emfq->stream);
- em_format_format_message(emf, emfq->stream, part);
- camel_stream_flush(emfq->stream);
-
- g_signal_emit_by_name(emf, "complete");
-#undef emfq
-}
-
-static void
-emfq_format_error(EMFormat *emf, CamelStream *stream, const char *txt)
-{
- /* FIXME: should we even bother writign error text for quoting? probably not... */
-}
-
-static void
-emfq_format_message(EMFormat *emf, CamelStream *stream, CamelMedium *part)
-{
- EMFormatQuote *emfq =(EMFormatQuote *) emf;
-
- if (emfq->credits)
- camel_stream_printf(stream, "%s", emfq->credits);
-
-
- if (emfq->flags & EM_FORMAT_QUOTE_CITE)
- camel_stream_printf(stream, "<!--+GtkHTML:<DATA class=\"ClueFlow\" key=\"orig\" value=\"1\">-->\n"
- "<blockquote type=cite>\n"
- "<font color=\"#%06x\">\n",
- emfq->citation_colour & 0xffffff);
-
- if (emfq->flags & EM_FORMAT_QUOTE_HEADERS) {
- camel_stream_printf(stream, "<b>To: </b> Header goes here<br>");
- }
-
- em_format_part(emf, stream, (CamelMimePart *)part);
-
- if (emfq->flags & EM_FORMAT_QUOTE_CITE)
- camel_stream_write_string(stream, "</blockquote></font><!--+GtkHTML:<DATA class=\"ClueFlow\" clear=\"orig\">-->");
-}
-
-static void
-emfq_format_source(EMFormat *emf, CamelStream *stream, CamelMimePart *part)
-{
- CamelStreamFilter *filtered_stream;
- CamelMimeFilter *html_filter;
- CamelDataWrapper *dw = (CamelDataWrapper *)part;
-
- filtered_stream = camel_stream_filter_new_with_stream ((CamelStream *) stream);
- html_filter = camel_mime_filter_tohtml_new (CAMEL_MIME_FILTER_TOHTML_CONVERT_NL
- | CAMEL_MIME_FILTER_TOHTML_CONVERT_SPACES
- | CAMEL_MIME_FILTER_TOHTML_ESCAPE_8BIT, 0);
- camel_stream_filter_add(filtered_stream, html_filter);
- camel_object_unref(html_filter);
-
- em_format_format_text(emf, (CamelStream *)filtered_stream, dw);
- camel_object_unref(filtered_stream);
-}
-
-static void
-emfq_format_attachment(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const char *mime_type, const EMFormatHandler *handle)
-{
- ;
-}
-
-#include <camel/camel-medium.h>
-#include <camel/camel-mime-part.h>
-#include <camel/camel-multipart.h>
-#include <camel/camel-url.h>
-
-static void
-emfq_text_plain(EMFormatQuote *emfq, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info)
-{
- CamelStreamFilter *filtered_stream;
- CamelMimeFilter *html_filter;
- CamelContentType *type;
- const char *format;
- guint32 rgb = 0x737373, flags;
-
- flags = emfq->text_html_flags;
-
- /* Check for RFC 2646 flowed text. */
- type = camel_mime_part_get_content_type(part);
- if (camel_content_type_is (type, "text", "plain")
- && (format = camel_content_type_param (type, "format"))
- && !g_ascii_strcasecmp(format, "flowed"))
- flags |= CAMEL_MIME_FILTER_TOHTML_FORMAT_FLOWED;
-
- html_filter = camel_mime_filter_tohtml_new(flags, rgb);
- filtered_stream = camel_stream_filter_new_with_stream(stream);
- camel_stream_filter_add(filtered_stream, html_filter);
- camel_object_unref(html_filter);
-
- em_format_format_text((EMFormat *)emfq, (CamelStream *)filtered_stream, camel_medium_get_content_object((CamelMedium *)part));
- camel_stream_flush((CamelStream *)filtered_stream);
- camel_object_unref(filtered_stream);
-}
-
-static void
-emfq_text_enriched(EMFormatQuote *emfq, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info)
-{
- CamelStreamFilter *filtered_stream;
- CamelMimeFilter *enriched;
- CamelDataWrapper *dw;
- guint32 flags = 0;
-
- dw = camel_medium_get_content_object((CamelMedium *)part);
-
- if (!strcmp(info->mime_type, "text/richtext")) {
- flags = CAMEL_MIME_FILTER_ENRICHED_IS_RICHTEXT;
- camel_stream_write_string( stream, "\n<!-- text/richtext -->\n");
- } else {
- camel_stream_write_string( stream, "\n<!-- text/enriched -->\n");
- }
-
- enriched = camel_mime_filter_enriched_new(flags);
- filtered_stream = camel_stream_filter_new_with_stream (stream);
- camel_stream_filter_add(filtered_stream, enriched);
- camel_object_unref(enriched);
-
- camel_stream_write_string(stream, "<br><hr><br>");
- em_format_format_text((EMFormat *)emfq, (CamelStream *)filtered_stream, dw);
- camel_object_unref(filtered_stream);
-}
-
-static void
-emfq_text_html(EMFormat *emf, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info)
-{
- camel_stream_write_string(stream, "\n<!-- text/html -->\n");
- em_format_format_text(emf, stream, camel_medium_get_content_object((CamelMedium *)part));
-}
-
-static const char *type_remove_table[] = {
- "message/external-body",
- "multipart/appledouble",
-};
-
-static EMFormatHandler type_builtin_table[] = {
- { "text/plain",(EMFormatFunc)emfq_text_plain },
- { "text/enriched",(EMFormatFunc)emfq_text_enriched },
- { "text/richtext",(EMFormatFunc)emfq_text_enriched },
- { "text/html",(EMFormatFunc)emfq_text_html },
-/* { "multipart/related",(EMFormatFunc)emfq_multipart_related },*/
-};
-
-static void
-emfq_builtin_init(EMFormatQuoteClass *efhc)
-{
- int i;
-
- for (i = 0; i < sizeof(type_remove_table) / sizeof(type_remove_table[0]); i++)
- em_format_class_remove_handler((EMFormatClass *) efhc, type_remove_table[i]);
-
- for (i=0;i<sizeof(type_builtin_table)/sizeof(type_builtin_table[0]);i++)
- em_format_class_add_handler((EMFormatClass *)efhc, &type_builtin_table[i]);
-}
diff --git a/mail/em-format-quote.h b/mail/em-format-quote.h
deleted file mode 100644
index 218937b935..0000000000
--- a/mail/em-format-quote.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 2003 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 _EM_FORMAT_QUOTE_H
-#define _EM_FORMAT_QUOTE_H
-
-#include "em-format.h"
-
-typedef struct _EMFormatQuote EMFormatQuote;
-typedef struct _EMFormatQuoteClass EMFormatQuoteClass;
-
-#define EM_FORMAT_QUOTE_CITE (1<<0)
-#define EM_FORMAT_QUOTE_HEADERS (1<<1)
-
-struct _EMFormatQuote {
- EMFormat format;
-
- struct _EMFormatQuotePrivate *priv;
-
- char *credits;
- struct _CamelStream *stream;
- guint32 flags;
-
- guint32 text_html_flags;
- guint32 citation_colour;
-};
-
-struct _EMFormatQuoteClass {
- EMFormatClass format_class;
-};
-
-GType em_format_quote_get_type(void);
-
-EMFormatQuote *em_format_quote_new(const char *, struct _CamelStream *, guint32 flags);
-
-#endif /* !_EM_FORMAT_QUOTE_H */
diff --git a/mail/em-format.c b/mail/em-format.c
deleted file mode 100644
index 2642b5becd..0000000000
--- a/mail/em-format.c
+++ /dev/null
@@ -1,1255 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Michael Zucchi <notzed@ximian.com>
- * Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2003 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 <libgnomevfs/gnome-vfs-mime.h>
-#include <libgnomevfs/gnome-vfs-mime-utils.h>
-#include <libgnomevfs/gnome-vfs-mime-handlers.h>
-
-#include <e-util/e-msgport.h>
-#include <camel/camel-url.h>
-#include <camel/camel-stream.h>
-#include <camel/camel-stream-mem.h>
-#include <camel/camel-multipart.h>
-#include <camel/camel-multipart-encrypted.h>
-#include <camel/camel-multipart-signed.h>
-#include <camel/camel-medium.h>
-#include <camel/camel-mime-message.h>
-#include <camel/camel-gpg-context.h>
-#include <camel/camel-smime-context.h>
-#include <camel/camel-string-utils.h>
-#include <camel/camel-stream-filter.h>
-#include <camel/camel-stream-null.h>
-#include <camel/camel-mime-filter-charset.h>
-#include <camel/camel-mime-filter-windows.h>
-
-#include "em-format.h"
-
-#define d(x)
-
-static void emf_builtin_init(EMFormatClass *);
-static const char *emf_snoop_part(CamelMimePart *part);
-
-static void emf_format_clone(EMFormat *emf, CamelMedium *msg, EMFormat *emfsource);
-static gboolean emf_busy(EMFormat *emf);
-
-enum {
- EMF_COMPLETE,
- EMF_LAST_SIGNAL,
-};
-
-static guint emf_signals[EMF_LAST_SIGNAL];
-static GObjectClass *emf_parent;
-
-static void
-emf_init(GObject *o)
-{
- EMFormat *emf = (EMFormat *)o;
-
- emf->inline_table = g_hash_table_new(NULL, NULL);
- e_dlist_init(&emf->header_list);
- em_format_default_headers(emf);
-}
-
-static void
-emf_finalise(GObject *o)
-{
- EMFormat *emf = (EMFormat *)o;
-
- if (emf->session)
- camel_object_unref(emf->session);
-
- if (emf->inline_table)
- g_hash_table_destroy(emf->inline_table);
-
- em_format_clear_headers(emf);
- g_free(emf->charset);
-
- /* FIXME: check pending jobs */
-
- ((GObjectClass *)emf_parent)->finalize(o);
-}
-
-static void
-emf_base_init(EMFormatClass *emfklass)
-{
- emfklass->type_handlers = g_hash_table_new(g_str_hash, g_str_equal);
- emf_builtin_init(emfklass);
-}
-
-static void
-emf_class_init(GObjectClass *klass)
-{
- ((EMFormatClass *)klass)->type_handlers = g_hash_table_new(g_str_hash, g_str_equal);
- emf_builtin_init((EMFormatClass *)klass);
-
- klass->finalize = emf_finalise;
- ((EMFormatClass *)klass)->format_clone = emf_format_clone;
- ((EMFormatClass *)klass)->busy = emf_busy;
-
- emf_signals[EMF_COMPLETE] =
- g_signal_new("complete",
- G_OBJECT_CLASS_TYPE (klass),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EMFormatClass, complete),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-}
-
-GType
-em_format_get_type(void)
-{
- static GType type = 0;
-
- if (type == 0) {
- static const GTypeInfo info = {
- sizeof(EMFormatClass),
- (GBaseInitFunc)emf_base_init, NULL,
- (GClassInitFunc)emf_class_init,
- NULL, NULL,
- sizeof(EMFormat), 0,
- (GInstanceInitFunc)emf_init
- };
- emf_parent = g_type_class_ref(G_TYPE_OBJECT);
- type = g_type_register_static(G_TYPE_OBJECT, "EMFormat", &info, 0);
- }
-
- return type;
-}
-
-/**
- * em_format_class_add_handler:
- * @emfc: EMFormatClass
- * @info: Callback information.
- *
- * Add a mime type handler to this class. This is only used by implementing
- * classes.
- *
- * When a mime type described by @info is encountered, the callback will
- * be invoked. Note that @info may be extended by sub-classes if
- * they require additional context information.
- *
- * Use a mime type of "foo/ *" to insert a fallback handler for type "foo".
- **/
-void
-em_format_class_add_handler(EMFormatClass *emfc, EMFormatHandler *info)
-{
- g_hash_table_insert(emfc->type_handlers, info->mime_type, info);
- /* FIXME: do we care? This is really gui stuff */
- /*
- if (info->applications == NULL)
- info->applications = gnome_vfs_mime_get_short_list_applications(info->mime_type);*/
-}
-
-
-/**
- * em_format_class_remove_handler:
- * @emfc: EMFormatClass
- * @mime_type: mime-type of handler to remove
- *
- * Remove a mime type handler from this class. This is only used by
- * implementing classes.
- **/
-void
-em_format_class_remove_handler (EMFormatClass *emfc, const char *mime_type)
-{
- g_hash_table_remove (emfc->type_handlers, mime_type);
-}
-
-
-/**
- * em_format_find_handler:
- * @emf:
- * @mime_type:
- *
- * Find a format handler by @mime_type.
- *
- * Return value: NULL if no handler is available.
- **/
-const EMFormatHandler *
-em_format_find_handler(EMFormat *emf, const char *mime_type)
-{
- EMFormatClass *emfc = (EMFormatClass *)G_OBJECT_GET_CLASS(emf);
-
- return g_hash_table_lookup(emfc->type_handlers, mime_type);
-}
-
-/**
- * em_format_fallback_handler:
- * @emf:
- * @mime_type:
- *
- * Try to find a format handler based on the major type of the @mime_type.
- *
- * The subtype is replaced with "*" and a lookup performed.
- *
- * Return value:
- **/
-const EMFormatHandler *
-em_format_fallback_handler(EMFormat *emf, const char *mime_type)
-{
- char *mime, *s;
-
- s = strchr(mime_type, '/');
- if (s == NULL)
- mime = (char *)mime_type;
- else {
- size_t len = (s-mime_type)+1;
-
- mime = alloca(len+2);
- strncpy(mime, mime_type, len);
- strcpy(mime+len, "*");
- }
-
- return em_format_find_handler(emf, mime);
-}
-
-/**
- * em_format_add_puri:
- * @emf:
- * @size:
- * @cid: Override the autogenerated content id.
- * @part:
- * @func:
- *
- * Add a pending-uri handler. When formatting parts that reference
- * other parts, a pending-uri (PURI) can be used to track the reference.
- *
- * @size is used to allocate the structure, so that it can be directly
- * subclassed by implementors.
- *
- * @cid can be used to override the key used to retreive the PURI, if NULL,
- * then the content-location and the content-id of the @part are stored
- * as lookup keys for the part.
- *
- * FIXME: This may need a free callback.
- *
- * Return value: A new PURI, with a referenced copy of @part, and the cid
- * always set. The uri will be set if one is available. Clashes
- * are resolved by forgetting the old PURI in the global index.
- **/
-EMFormatPURI *
-em_format_add_puri(EMFormat *emf, size_t size, const char *cid, CamelMimePart *part, EMFormatPURIFunc func)
-{
- EMFormatPURI *puri;
- const char *tmp;
- static unsigned int uriid;
-
- g_assert(size >= sizeof(*puri));
- puri = g_malloc0(size);
-
- puri->format = emf;
- puri->func = func;
- puri->use_count = 0;
- puri->cid = g_strdup(cid);
-
- if (part) {
- camel_object_ref(part);
- puri->part = part;
- }
-
- if (part != NULL && cid == NULL) {
- tmp = camel_mime_part_get_content_id(part);
- if (tmp)
- puri->cid = g_strdup_printf("cid:%s", tmp);
- else
- puri->cid = g_strdup_printf("em-no-cid-%u", uriid++);
-
- d(printf("built cid '%s'\n", puri->cid));
-
- /* not quite same as old behaviour, it also put in the relative uri and a fallback for no parent uri */
- tmp = camel_mime_part_get_content_location(part);
- puri->uri = NULL;
- if (tmp == NULL) {
- if (emf->base)
- puri->uri = camel_url_to_string(emf->base, 0);
- } else {
- if (strchr(tmp, ':') == NULL && emf->base != NULL) {
- CamelURL *uri;
-
- uri = camel_url_new_with_base(emf->base, tmp);
- puri->uri = camel_url_to_string(uri, 0);
- camel_url_free(uri);
- } else {
- puri->uri = g_strdup(tmp);
- }
- }
- }
-
- g_assert(puri->cid != NULL);
- g_assert(emf->pending_uri_level != NULL);
- g_assert(emf->pending_uri_table != NULL);
-
- e_dlist_addtail(&emf->pending_uri_level->uri_list, (EDListNode *)puri);
-
- if (puri->uri)
- g_hash_table_insert(emf->pending_uri_table, puri->uri, puri);
- g_hash_table_insert(emf->pending_uri_table, puri->cid, puri);
-
- return puri;
-}
-
-/**
- * em_format_push_level:
- * @emf:
- *
- * This is used to build a heirarchy of visible PURI objects based on
- * the structure of the message. Used by multipart/alternative formatter.
- *
- * FIXME: This could probably also take a uri so it can automaticall update
- * the base location.
- **/
-void
-em_format_push_level(EMFormat *emf)
-{
- struct _EMFormatPURITree *purilist;
-
- d(printf("em_format_push_level\n"));
- purilist = g_malloc0(sizeof(*purilist));
- e_dlist_init(&purilist->children);
- e_dlist_init(&purilist->uri_list);
- purilist->parent = emf->pending_uri_level;
- if (emf->pending_uri_tree == NULL) {
- emf->pending_uri_tree = purilist;
- } else {
- e_dlist_addtail(&emf->pending_uri_level->children, (EDListNode *)purilist);
- }
- emf->pending_uri_level = purilist;
-}
-
-/**
- * em_format_pull_level:
- * @emf:
- *
- * Drop a level of visibility back to the parent. Note that
- * no PURI values are actually freed.
- **/
-void
-em_format_pull_level(EMFormat *emf)
-{
- d(printf("em_format_pull_level\n"));
- emf->pending_uri_level = emf->pending_uri_level->parent;
-}
-
-/**
- * em_format_find_visible_puri:
- * @emf:
- * @uri:
- *
- * Search for a PURI based on the visibility defined by :push_level()
- * and :pull_level().
- *
- * Return value:
- **/
-EMFormatPURI *
-em_format_find_visible_puri(EMFormat *emf, const char *uri)
-{
- EMFormatPURI *pw;
- struct _EMFormatPURITree *ptree;
-
- d(printf("checking for visible uri '%s'\n", uri));
-
- ptree = emf->pending_uri_level;
- while (ptree) {
- pw = (EMFormatPURI *)ptree->uri_list.head;
- while (pw->next) {
- d(printf(" pw->uri = '%s' pw->cid = '%s\n", pw->uri?pw->uri:"", pw->cid));
- if ((pw->uri && !strcmp(pw->uri, uri)) || !strcmp(pw->cid, uri))
- return pw;
- pw = pw->next;
- }
- ptree = ptree->parent;
- }
-
- return NULL;
-}
-
-/**
- * em_format_find_puri:
- * @emf:
- * @uri:
- *
- * Search for a PURI based on a uri. Both the content-id
- * and content-location are checked.
- *
- * Return value:
- **/
-EMFormatPURI *
-em_format_find_puri(EMFormat *emf, const char *uri)
-{
- return g_hash_table_lookup(emf->pending_uri_table, uri);
-}
-
-static void
-emf_clear_puri_node(struct _EMFormatPURITree *node)
-{
- {
- EMFormatPURI *pw, *pn;
-
- /* clear puri's at this level */
- pw = (EMFormatPURI *)node->uri_list.head;
- pn = pw->next;
- while (pn) {
- g_free(pw->uri);
- g_free(pw->cid);
- if (pw->part)
- camel_object_unref(pw->part);
- g_free(pw);
- pw = pn;
- pn = pn->next;
- }
- }
-
- {
- struct _EMFormatPURITree *cw, *cn;
-
- /* clear child nodes */
- cw = (struct _EMFormatPURITree *)node->children.head;
- cn = cw->next;
- while (cn) {
- emf_clear_puri_node(cw);
- cw = cn;
- cn = cn->next;
- }
- }
-
- g_free(node);
-}
-
-/**
- * em_format_clear_puri_tree:
- * @emf:
- *
- * For use by implementors to clear out the message structure
- * data.
- **/
-void
-em_format_clear_puri_tree(EMFormat *emf)
-{
- d(printf("clearing pending uri's\n"));
-
- if (emf->pending_uri_table) {
- g_hash_table_destroy(emf->pending_uri_table);
- emf_clear_puri_node(emf->pending_uri_tree);
- emf->pending_uri_level = NULL;
- emf->pending_uri_tree = NULL;
- }
- emf->pending_uri_table = g_hash_table_new(g_str_hash, g_str_equal);
- em_format_push_level(emf);
-}
-
-/* use mime_type == NULL to force showing as application/octet-stream */
-void
-em_format_part_as(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const char *mime_type)
-{
- const EMFormatHandler *handle = NULL;
-
- if (mime_type != NULL) {
- if (g_ascii_strcasecmp(mime_type, "application/octet-stream") == 0)
- mime_type = emf_snoop_part(part);
-
- handle = em_format_find_handler(emf, mime_type);
- if (handle == NULL)
- handle = em_format_fallback_handler(emf, mime_type);
-
- if (handle != NULL
- && !em_format_is_attachment(emf, part)) {
- d(printf("running handler for type '%s'\n", mime_type));
- handle->handler(emf, stream, part, handle);
- return;
- }
- d(printf("this type is an attachment? '%s'\n", mime_type));
- } else {
- mime_type = "application/octet-stream";
- }
-
- ((EMFormatClass *)G_OBJECT_GET_CLASS(emf))->format_attachment(emf, stream, part, mime_type, handle);
-}
-
-void
-em_format_part(EMFormat *emf, CamelStream *stream, CamelMimePart *part)
-{
- char *mime_type;
- CamelDataWrapper *dw;
-
- dw = camel_medium_get_content_object((CamelMedium *)part);
- mime_type = camel_data_wrapper_get_mime_type(dw);
- camel_strdown(mime_type);
- em_format_part_as(emf, stream, part, mime_type);
- g_free(mime_type);
-}
-
-static void
-emf_clone_inlines(void *key, void *val, void *data)
-{
- g_hash_table_insert(((EMFormat *)data)->inline_table, key, val);
-}
-
-static void
-emf_format_clone(EMFormat *emf, CamelMedium *msg, EMFormat *emfsource)
-{
- em_format_clear_puri_tree(emf);
-
- if (emf != emfsource) {
- g_hash_table_destroy(emf->inline_table);
- emf->inline_table = g_hash_table_new(NULL, NULL);
- if (emfsource) {
- /* We clone the current state here */
- g_hash_table_foreach(emfsource->inline_table, emf_clone_inlines, emf);
- emf->mode = emfsource->mode;
- g_free(emf->charset);
- emf->charset = g_strdup(emfsource->charset);
- /* FIXME: clone headers shown */
- }
- }
-
- if (msg != emf->message) {
- if (emf->message)
- camel_object_unref(emf->message);
- if (msg)
- camel_object_ref(msg);
- emf->message = msg;
- }
-}
-
-static gboolean
-emf_busy(EMFormat *emf)
-{
- return FALSE;
-}
-
-/**
- * em_format_format_clone:
- * @emf: Mail formatter.
- * @msg: Mail message.
- * @emfsource: Used as a basis for user-altered layout, e.g. inline viewed
- * attachments.
- *
- * Format a message @msg. If @emfsource is non NULL, then the status of
- * inlined expansion and so forth is copied direction from @emfsource.
- *
- * By passing the same value for @emf and @emfsource, you can perform
- * a display refresh, or it can be used to generate an identical layout,
- * e.g. to print what the user has shown inline.
- **/
-/* e_format_format_clone is a macro */
-
-/**
- * em_format_set_session:
- * @emf:
- * @s:
- *
- * Set the CamelSession to be used for signature verification and decryption
- * purposes. If this is not set, then signatures cannot be verified or
- * encrypted messages viewed.
- **/
-void
-em_format_set_session(EMFormat *emf, struct _CamelSession *s)
-{
- if (s)
- camel_object_ref(s);
- if (emf->session)
- camel_object_unref(emf->session);
- emf->session = s;
-}
-
-/**
- * em_format_set_mode:
- * @emf:
- * @type:
- *
- * Set display mode, EM_FORMAT_SOURCE, EM_FORMAT_ALLHEADERS, or
- * EM_FORMAT_NORMAL.
- **/
-void
-em_format_set_mode(EMFormat *emf, em_format_mode_t type)
-{
- if (emf->mode == type)
- return;
-
- emf->mode = type;
-
- /* force redraw if type changed afterwards */
- if (emf->message)
- em_format_format_clone(emf, emf->message, emf);
-}
-
-/**
- * em_format_set_charset:
- * @emf:
- * @charset:
- *
- * set override charset on formatter. message will be redisplayed if
- * required.
- **/
-void
-em_format_set_charset(EMFormat *emf, const char *charset)
-{
- if ((emf->charset && charset && g_ascii_strcasecmp(emf->charset, charset) == 0)
- || (emf->charset == NULL && charset == NULL)
- || (emf->charset == charset))
- return;
-
- g_free(emf->charset);
- emf->charset = g_strdup(charset);
-
- if (emf->message)
- em_format_format_clone(emf, emf->message, emf);
-}
-
-
-/**
- * em_format_set_default_charset:
- * @emf:
- * @charset:
- *
- * Set the fallback, default system charset to use when no other charsets
- * are present. Message will be redisplayed if required (and sometimes redisplayed
- * when it isn't).
- **/
-void
-em_format_set_default_charset(EMFormat *emf, const char *charset)
-{
- if ((emf->default_charset && charset && g_ascii_strcasecmp(emf->default_charset, charset) == 0)
- || (emf->default_charset == NULL && charset == NULL)
- || (emf->default_charset == charset))
- return;
-
- g_free(emf->default_charset);
- emf->default_charset = g_strdup(charset);
-
- if (emf->message && emf->charset == NULL)
- em_format_format_clone(emf, emf->message, emf);
-}
-
-/**
- * em_format_clear_headers:
- * @emf:
- *
- * Clear the list of headers to be displayed. This will force all headers to
- * be shown.
- **/
-void
-em_format_clear_headers(EMFormat *emf)
-{
- EMFormatHeader *eh;
-
- while ((eh = (EMFormatHeader *)e_dlist_remhead(&emf->header_list)))
- g_free(eh);
-}
-
-static const struct {
- const char *name;
- guint32 flags;
-} default_headers[] = {
- { N_("From"), EM_FORMAT_HEADER_BOLD },
- { N_("Reply-To"), EM_FORMAT_HEADER_BOLD },
- { N_("To"), EM_FORMAT_HEADER_BOLD },
- { N_("Cc"), EM_FORMAT_HEADER_BOLD },
- { N_("Bcc"), EM_FORMAT_HEADER_BOLD },
- { N_("Subject"), EM_FORMAT_HEADER_BOLD },
- { N_("Date"), EM_FORMAT_HEADER_BOLD },
- { "x-evolution-mailer", 0 }, /* DO NOT translate */
-};
-
-/**
- * em_format_default_headers:
- * @emf:
- *
- * Set the headers to show to the default list.
- *
- * From, Reply-To, To, Cc, Bcc, Subject and Date.
- **/
-void
-em_format_default_headers(EMFormat *emf)
-{
- int i;
-
- em_format_clear_headers(emf);
- for (i=0;i<sizeof(default_headers)/sizeof(default_headers[0]);i++)
- em_format_add_header(emf, default_headers[i].name, default_headers[i].flags);
-}
-
-/**
- * em_format_add_header:
- * @emf:
- * @name: The name of the header, as it will appear during output.
- * @flags: EM_FORMAT_HEAD_* defines to control display attributes.
- *
- * Add a specific header to show. If any headers are set, they will
- * be displayed in the order set by this function. Certain known
- * headers included in this list will be shown using special
- * formatting routines.
- **/
-void em_format_add_header(EMFormat *emf, const char *name, guint32 flags)
-{
- EMFormatHeader *h;
-
- h = g_malloc(sizeof(*h) + strlen(name));
- h->flags = flags;
- strcpy(h->name, name);
- e_dlist_addtail(&emf->header_list, (EDListNode *)h);
-}
-
-/**
- * em_format_is_attachment:
- * @emf:
- * @part: Part to check.
- *
- * Returns true if the part is an attachment.
- *
- * A part is not considered an attachment if it is a
- * multipart, or a text part with no filename. It is used
- * to determine if an attachment header should be displayed for
- * the part.
- *
- * Content-Disposition is not checked.
- *
- * Return value: TRUE/FALSE
- **/
-int em_format_is_attachment(EMFormat *emf, CamelMimePart *part)
-{
- /*CamelContentType *ct = camel_mime_part_get_content_type(part);*/
- CamelDataWrapper *dw = camel_medium_get_content_object((CamelMedium *)part);
-
- /*printf("checking is attachment %s/%s\n", ct->type, ct->subtype);*/
- return !(camel_content_type_is (dw->mime_type, "multipart", "*")
- || camel_content_type_is(dw->mime_type, "application", "x-pkcs7-mime")
- || (camel_content_type_is (dw->mime_type, "text", "*")
- && camel_mime_part_get_filename(part) == NULL));
-}
-
-/**
- * em_format_is_inline:
- * @emf:
- * @part:
- *
- * Returns true if the part should be displayed inline. Any part with
- * a Content-Disposition of inline, or any message type is displayed
- * inline.
- *
- * ::set_inline() called on the same part will override any calculated
- * value.
- *
- * Return value:
- **/
-int em_format_is_inline(EMFormat *emf, CamelMimePart *part)
-{
- void *dummy, *override;
- const char *tmp;
- CamelContentType *ct;
-
- if (g_hash_table_lookup_extended(emf->inline_table, part, &dummy, &override))
- return GPOINTER_TO_INT(override);
-
- ct = camel_mime_part_get_content_type(part);
-
- /* TODO: make this depend on libnss supported */
- /* For some reason rfc2633 says we always add this as an attachment, which
- stuffs us up since we don't want to treat it that way at all ... */
- if (camel_content_type_is(ct, "application", "x-pkcs7-mime"))
- return TRUE;
-
- tmp = camel_mime_part_get_disposition(part);
- if (tmp)
- return g_ascii_strcasecmp(tmp, "inline") == 0;
-
- /* messages are always inline? */
- return camel_content_type_is (ct, "message", "*");
-}
-
-/**
- * em_format_set_inline:
- * @emf:
- * @part:
- * @state:
- *
- * Force the attachment @part to be expanded or hidden explictly to match
- * @state. This is used only to record the change for a redraw or
- * cloned layout render and does not force a redraw.
- **/
-void em_format_set_inline(EMFormat *emf, CamelMimePart *part, int state)
-{
- g_hash_table_insert(emf->inline_table, part, GINT_TO_POINTER(state));
-}
-
-/* should this be virtual? */
-void
-em_format_format_content(EMFormat *emf, CamelStream *stream, CamelMimePart *part)
-{
- CamelDataWrapper *dw = camel_medium_get_content_object((CamelMedium *)part);
-
- if (camel_content_type_is (dw->mime_type, "text", "*"))
- em_format_format_text(emf, stream, dw);
- else
- camel_data_wrapper_decode_to_stream(dw, stream);
-}
-
-/**
- * em_format_format_content:
- * @emf:
- * @stream: Where to write the converted text
- * @part: Part whose container is to be formatted
- *
- * Decode/output a part's content to @stream.
- **/
-void
-em_format_format_text(EMFormat *emf, CamelStream *stream, CamelDataWrapper *dw)
-{
- CamelStreamFilter *filter_stream;
- CamelMimeFilterCharset *filter;
- const char *charset = NULL;
-
- if (emf->charset) {
- charset = emf->charset;
- } else if (dw->mime_type
- && (charset = camel_content_type_param (dw->mime_type, "charset"))
- && g_ascii_strncasecmp(charset, "iso-8859-", 9) == 0) {
- CamelMimeFilterWindows *windows;
- CamelStream *null;
-
- /* Since a few Windows mailers like to claim they sent
- * out iso-8859-# encoded text when they really sent
- * out windows-cp125#, do some simple sanity checking
- * before we move on... */
-
- null = camel_stream_null_new();
- filter_stream = camel_stream_filter_new_with_stream(null);
- camel_object_unref(null);
-
- windows = (CamelMimeFilterWindows *)camel_mime_filter_windows_new(charset);
- camel_stream_filter_add(filter_stream, (CamelMimeFilter *)windows);
-
- camel_data_wrapper_decode_to_stream(dw, (CamelStream *)filter_stream);
- camel_stream_flush((CamelStream *)filter_stream);
- camel_object_unref(filter_stream);
-
- charset = camel_mime_filter_windows_real_charset (windows);
- camel_object_unref(windows);
- } else if (charset == NULL) {
- charset = emf->default_charset;
- }
-
- filter_stream = camel_stream_filter_new_with_stream(stream);
-
- if ((filter = camel_mime_filter_charset_new_convert(charset, "UTF-8"))) {
- camel_stream_filter_add(filter_stream, (CamelMimeFilter *) filter);
- camel_object_unref(filter);
- }
-
- camel_data_wrapper_decode_to_stream(dw, (CamelStream *)filter_stream);
- camel_stream_flush((CamelStream *)filter_stream);
- camel_object_unref(filter_stream);
-}
-
-/**
- * em_format_describe_part:
- * @part:
- * @mimetype:
- *
- * Generate a simple textual description of a part, @mime_type represents the
- * the content.
- *
- * Return value:
- **/
-char *
-em_format_describe_part(CamelMimePart *part, const char *mime_type)
-{
- GString *stext;
- const char *text;
- char *out;
-
- stext = g_string_new("");
- text = gnome_vfs_mime_get_description(mime_type);
- g_string_append_printf(stext, _("%s attachment"), text?text:mime_type);
- if ((text = camel_mime_part_get_filename (part)))
- g_string_append_printf(stext, " (%s)", text);
- if ((text = camel_mime_part_get_description(part)))
- g_string_append_printf(stext, ", \"%s\"", text);
-
- out = stext->str;
- g_string_free(stext, FALSE);
-
- return out;
-}
-
-/* ********************************************************************** */
-
-/* originally from mail-identify.c */
-static const char *
-emf_snoop_part(CamelMimePart *part)
-{
- const char *filename, *name_type = NULL, *magic_type = NULL;
- CamelDataWrapper *dw;
-
- filename = camel_mime_part_get_filename (part);
- if (filename) {
- /* GNOME-VFS will misidentify TNEF attachments as MPEG */
- if (!strcmp (filename, "winmail.dat"))
- return "application/vnd.ms-tnef";
-
- name_type = gnome_vfs_mime_type_from_name(filename);
- }
-
- dw = camel_medium_get_content_object((CamelMedium *)part);
- if (!camel_data_wrapper_is_offline(dw)) {
- CamelStreamMem *mem = (CamelStreamMem *)camel_stream_mem_new();
-
- if (camel_data_wrapper_decode_to_stream(dw, (CamelStream *)mem) > 0)
- magic_type = gnome_vfs_get_mime_type_for_data(mem->buffer->data, mem->buffer->len);
- camel_object_unref(mem);
- }
-
- d(printf("snooped part, magic_type '%s' name_type '%s'\n", 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 and if it returns "application/octet-stream"
- * try to do better with the filename check.
- */
-
- if (magic_type) {
- if (name_type
- && (!strcmp(magic_type, "text/plain")
- || !strcmp(magic_type, "application/octet-stream")))
- return name_type;
- else
- return magic_type;
- } else
- return name_type;
-
- /* We used to load parts to check their type, we dont anymore,
- see bug #11778 for some discussion */
-}
-
-/* RFC 1740 */
-static void
-emf_multipart_appledouble(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info)
-{
- CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content_object((CamelMedium *)part);
-
- if (!CAMEL_IS_MULTIPART(mp)) {
- em_format_format_source(emf, stream, part);
- return;
- }
-
- /* try the data fork for something useful, doubtful but who knows */
- em_format_part(emf, stream, camel_multipart_get_part(mp, 1));
-}
-
-/* RFC ??? */
-static void
-emf_multipart_mixed(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info)
-{
- CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content_object((CamelMedium *)part);
- int i, nparts;
-
- if (!CAMEL_IS_MULTIPART(mp)) {
- em_format_format_source(emf, stream, part);
- return;
- }
-
- nparts = camel_multipart_get_number(mp);
- for (i = 0; i < nparts; i++) {
- part = camel_multipart_get_part(mp, i);
- em_format_part(emf, stream, part);
- }
-}
-
-/* RFC 1740 */
-static void
-emf_multipart_alternative(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info)
-{
- CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content_object((CamelMedium *)part);
- int i, nparts;
- CamelMimePart *best = NULL;
-
- if (!CAMEL_IS_MULTIPART(mp)) {
- em_format_format_source(emf, stream, part);
- return;
- }
-
- /* as per rfc, find the last part we know how to display */
- nparts = camel_multipart_get_number(mp);
- for (i = 0; i < nparts; i++) {
- CamelMimePart *part = camel_multipart_get_part(mp, i);
- CamelContentType *type = camel_mime_part_get_content_type (part);
- char *mime_type = camel_content_type_simple (type);
-
- camel_strdown (mime_type);
-
- /*if (want_plain && !strcmp (mime_type, "text/plain"))
- return part;*/
-
- if (em_format_find_handler(emf, mime_type)
- || (best == NULL && em_format_fallback_handler(emf, mime_type)))
- best = part;
-
- g_free(mime_type);
- }
-
- if (best)
- em_format_part(emf, stream, best);
- else
- emf_multipart_mixed(emf, stream, part, info);
-}
-
-static void
-emf_multipart_encrypted(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info)
-{
- CamelMultipartEncrypted *mpe;
- CamelMimePart *mime_part;
- CamelCipherContext *cipher;
- CamelException ex;
- const char *protocol;
-
- /* Currently we only handle RFC2015-style PGP encryption. */
- protocol = camel_content_type_param (((CamelDataWrapper *) part)->mime_type, "protocol");
- if (!protocol || strcmp (protocol, "application/pgp-encrypted") != 0)
- return emf_multipart_mixed(emf, stream, part, info);
-
- mpe = (CamelMultipartEncrypted *)camel_medium_get_content_object((CamelMedium *)part);
-
- if (!CAMEL_IS_MULTIPART_ENCRYPTED(mpe)) {
- em_format_format_source(emf, stream, part);
- return;
- }
-
- camel_exception_init (&ex);
- cipher = camel_gpg_context_new(emf->session);
- mime_part = camel_multipart_encrypted_decrypt(mpe, cipher, &ex);
- camel_object_unref(cipher);
-
- if (camel_exception_is_set(&ex)) {
- /* FIXME: error handler */
- em_format_format_error(emf, stream, camel_exception_get_description(&ex));
- camel_exception_clear(&ex);
- return;
- }
-
- em_format_part(emf, stream, mime_part);
- camel_object_unref(mime_part);
-}
-
-static void
-emf_write_related(EMFormat *emf, CamelStream *stream, EMFormatPURI *puri)
-{
- em_format_format_content(emf, stream, puri->part);
- camel_stream_close(stream);
-}
-
-/* RFC 2387 */
-static void
-emf_multipart_related(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info)
-{
- CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content_object((CamelMedium *)part);
- CamelMimePart *body_part, *display_part = NULL;
- CamelContentType *content_type;
- const char *location, *start;
- int i, nparts;
- CamelURL *base_save = NULL;
- struct _EMFormatPURITree *ptree;
- EMFormatPURI *puri, *purin;
-
- if (!CAMEL_IS_MULTIPART(mp)) {
- em_format_format_source(emf, stream, part);
- return;
- }
-
- /* FIXME: put this stuff in a shared function */
- nparts = camel_multipart_get_number(mp);
- content_type = camel_mime_part_get_content_type(part);
- start = camel_content_type_param (content_type, "start");
- if (start && strlen(start)>2) {
- int len;
- const char *cid;
-
- /* strip <>'s */
- len = strlen (start) - 2;
- start++;
-
- for (i=0; i<nparts; i++) {
- body_part = camel_multipart_get_part(mp, i);
- cid = camel_mime_part_get_content_id(body_part);
-
- if (cid && !strncmp(cid, start, len) && strlen(cid) == len) {
- display_part = body_part;
- break;
- }
- }
- } else {
- display_part = camel_multipart_get_part(mp, 0);
- }
-
- if (display_part == NULL) {
- emf_multipart_mixed(emf, stream, part, info);
- return;
- }
-
- /* stack of present location and pending uri's */
- location = camel_mime_part_get_content_location(part);
- if (location) {
- d(printf("setting content location %s\n", location));
- base_save = emf->base;
- emf->base = camel_url_new(location, NULL);
- }
- em_format_push_level(emf);
-
- /* queue up the parts for possible inclusion */
- for (i = 0; i < nparts; i++) {
- body_part = camel_multipart_get_part(mp, i);
- if (body_part != display_part) {
- puri = em_format_add_puri(emf, sizeof(EMFormatPURI), NULL, body_part, emf_write_related);
- d(printf(" part '%s' '%s' added\n", puri->uri?puri->uri:"", puri->cid));
- }
- }
-
- em_format_part(emf, stream, display_part);
- camel_stream_flush(stream);
-
- ptree = emf->pending_uri_level;
- puri = (EMFormatPURI *)ptree->uri_list.head;
- purin = puri->next;
- while (purin) {
- if (purin->use_count == 0) {
- d(printf("part '%s' '%s' used '%d'\n", purin->uri?purin->uri:"", purin->cid, purin->use_count));
- if (purin->func == emf_write_related)
- em_format_part(emf, stream, puri->part);
- else
- printf("unreferenced uri generated by format code: %s\n", purin->uri?purin->uri:purin->cid);
- }
- puri = purin;
- purin = purin->next;
- }
- em_format_pull_level(emf);
-
- if (location) {
- camel_url_free(emf->base);
- emf->base = base_save;
- }
-}
-
-/* this is only a fallback implementation, implementations should override */
-static void
-emf_multipart_signed(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info)
-{
- CamelMimePart *cpart;
- CamelMultipartSigned *mps;
- CamelCipherValidity *valid = NULL;
- CamelException ex;
- const char *message = NULL;
- gboolean good = FALSE;
-
- mps = (CamelMultipartSigned *)camel_medium_get_content_object((CamelMedium *)part);
- if (!CAMEL_IS_MULTIPART_SIGNED(mps)
- || (cpart = camel_multipart_get_part((CamelMultipart *)mps, CAMEL_MULTIPART_SIGNED_CONTENT)) == NULL) {
- em_format_format_source(emf, stream, part);
- return;
- }
-
- em_format_part(emf, stream, cpart);
-
- /* FIXME: This sequence is also copied in em-format-html.c */
-
- camel_exception_init(&ex);
- if (emf->session == NULL) {
- message = _("Session not initialised");
- } else {
- CamelCipherContext *cipher = NULL;
-
- /* FIXME: Should be done via a plugin interface */
- if (g_ascii_strcasecmp("application/x-pkcs7-signature", mps->protocol) == 0)
- cipher = camel_smime_context_new(emf->session);
- else if (g_ascii_strcasecmp("application/pgp-signature", mps->protocol) == 0)
- cipher = camel_gpg_context_new(emf->session);
-
- if (cipher == NULL) {
- message = _("Unsupported signature format");
- } else {
- valid = camel_cipher_verify(cipher, part, &ex);
- camel_object_unref(cipher);
- if (valid) {
- good = camel_cipher_validity_get_valid(valid);
- message = camel_cipher_validity_get_description(valid);
- } else {
- message = camel_exception_get_description(&ex);
- }
- }
- }
-
- if (good)
- em_format_format_error(emf, stream, _("This message is digitally signed and has been found to be authentic."));
- else
- em_format_format_error(emf, stream, _("This message is digitally signed but can not be proven to be authentic."));
-
- if (message)
- em_format_format_error(emf, stream, message);
-
- camel_exception_clear(&ex);
- camel_cipher_validity_free(valid);
-}
-
-/* this is only a fallback, any implementer should implement */
-static void
-emf_message_rfc822(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info)
-{
- CamelDataWrapper *dw = camel_medium_get_content_object((CamelMedium *)part);
-
- if (!CAMEL_IS_MIME_MESSAGE(dw)) {
- em_format_format_source(emf, stream, part);
- return;
- }
-
- em_format_format_message(emf, stream, (CamelMedium *)dw);
-}
-
-static EMFormatHandler type_builtin_table[] = {
- { "multipart/alternative", emf_multipart_alternative },
- { "multipart/appledouble", emf_multipart_appledouble },
- { "multipart/encrypted", emf_multipart_encrypted },
- { "multipart/mixed", emf_multipart_mixed },
- { "multipart/signed", emf_multipart_signed },
- { "multipart/related", emf_multipart_related },
- { "multipart/*", emf_multipart_mixed },
- { "message/rfc822", emf_message_rfc822 },
- { "message/news", emf_message_rfc822 },
- { "message/*", emf_message_rfc822 },
-};
-
-static void
-emf_builtin_init(EMFormatClass *klass)
-{
- int i;
-
- for (i=0;i<sizeof(type_builtin_table)/sizeof(type_builtin_table[0]);i++)
- g_hash_table_insert(klass->type_handlers, type_builtin_table[i].mime_type, &type_builtin_table[i]);
-}
diff --git a/mail/em-format.h b/mail/em-format.h
deleted file mode 100644
index cc0f6bdd75..0000000000
--- a/mail/em-format.h
+++ /dev/null
@@ -1,204 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Michael Zucchi <notzed@ximian.com>
- *
- * Copyright 2003 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.
- *
- */
-
-/*
- Abstract class for formatting mime messages
-*/
-
-#ifndef _EM_FORMAT_H
-#define _EM_FORMAT_H
-
-#include <glib-object.h>
-#include "e-util/e-msgport.h"
-
-struct _CamelStream;
-struct _CamelMimePart;
-struct _CamelMedium;
-struct _CamelSession;
-struct _CamelURL;
-struct _CamelDataWrapper;
-
-typedef struct _EMFormat EMFormat;
-typedef struct _EMFormatClass EMFormatClass;
-
-typedef struct _EMFormatHandler EMFormatHandler;
-typedef struct _EMFormatHeader EMFormatHeader;
-
-typedef void (*EMFormatFunc) (EMFormat *md, struct _CamelStream *stream, struct _CamelMimePart *part, const EMFormatHandler *info);
-
-typedef enum _em_format_mode_t {
- EM_FORMAT_NORMAL,
- EM_FORMAT_ALLHEADERS,
- EM_FORMAT_SOURCE,
-} em_format_mode_t;
-
-/* can be subclassed/extended ... */
-struct _EMFormatHandler {
- char *mime_type;
- EMFormatFunc handler;
- GList *applications; /* gnome vfs short-list of applications, do we care? */
-};
-
-typedef struct _EMFormatPURI EMFormatPURI;
-typedef void (*EMFormatPURIFunc)(EMFormat *md, struct _CamelStream *stream, EMFormatPURI *puri);
-
-struct _EMFormatPURI {
- struct _EMFormatPURI *next, *prev;
-
- struct _EMFormat *format;
-
- char *uri; /* will be the location of the part, may be empty */
- char *cid; /* will always be set, a fake one created if needed */
-
- EMFormatPURIFunc func;
- struct _CamelMimePart *part;
-
- unsigned int use_count; /* used by multipart/related to see if it was accessed */
-};
-
-/* used to stack pending uri's for visibility (multipart/related) */
-struct _EMFormatPURITree {
- struct _EMFormatPURITree *next, *prev, *parent;
-
- EDList uri_list;
- EDList children;
-};
-
-struct _EMFormatHeader {
- struct _EMFormatHeader *next, *prev;
-
- guint32 flags; /* E_FORMAT_HEADER_* */
- char name[1];
-};
-
-#define EM_FORMAT_HEADER_BOLD (1<<0)
-#define EM_FORMAT_HEADER_LAST (1<<4) /* reserve 4 slots */
-
-struct _EMFormat {
- GObject parent;
-
- struct _EMFormatPrivate *priv;
-
- struct _CamelMedium *message; /* the current message */
-
- EDList header_list; /* if empty, then all */
-
- struct _CamelSession *session; /* session, used for authentication when required */
- struct _CamelURL *base; /* current location (base url) */
-
- /* for forcing inlining */
- GHashTable *inline_table;
-
- /* global lookup table for message */
- GHashTable *pending_uri_table;
-
- /* visibility tree, also stores every puri permanently */
- struct _EMFormatPURITree *pending_uri_tree;
- /* current level to search from */
- struct _EMFormatPURITree *pending_uri_level;
-
- em_format_mode_t mode; /* source/headers/etc */
- char *charset; /* charset override */
- char *default_charset; /* charset fallback */
-};
-
-struct _EMFormatClass {
- GObjectClass parent_class;
-
- GHashTable *type_handlers;
-
- /* start formatting a message */
- void (*format_clone)(EMFormat *, struct _CamelMedium *, EMFormat *);
- /* some internel error/inconsistency */
- void (*format_error)(EMFormat *, struct _CamelStream *, const char *msg);
-
- /* use for external structured parts */
- void (*format_attachment)(EMFormat *, struct _CamelStream *, struct _CamelMimePart *, const char *mime_type, const struct _EMFormatHandler *info);
- /* for any message parts */
- void (*format_message)(EMFormat *, struct _CamelStream *, struct _CamelMedium *);
- /* use for unparsable content */
- void (*format_source)(EMFormat *, struct _CamelStream *, struct _CamelMimePart *);
-
- /* returns true if the formatter is still busy with pending stuff */
- gboolean (*busy)(EMFormat *);
-
- /* signals */
- /* complete, alternative to polling busy, for asynchronous work */
- void (*complete)(EMFormat *);
-};
-
-/* helper entry point */
-void em_format_set_session(EMFormat *emf, struct _CamelSession *s);
-
-void em_format_set_mode(EMFormat *emf, em_format_mode_t type);
-void em_format_set_charset(EMFormat *emf, const char *charset);
-void em_format_set_default_charset(EMFormat *emf, const char *charset);
-
-void em_format_clear_headers(EMFormat *emf); /* also indicates to show all headers */
-void em_format_default_headers(EMFormat *emf);
-void em_format_add_header(EMFormat *emf, const char *name, guint32 flags);
-
-/* FIXME: Need a 'clone' api to copy details about the current view (inlines etc)
- Or maybe it should live with sub-classes? */
-
-int em_format_is_attachment(EMFormat *emf, struct _CamelMimePart *part);
-int em_format_is_inline(EMFormat *emf, struct _CamelMimePart *part);
-/* FIXME: not sure about this api */
-void em_format_set_inline(EMFormat *emf, struct _CamelMimePart *part, int state);
-char *em_format_describe_part(struct _CamelMimePart *part, const char *mimetype);
-
-/* for implementers */
-GType em_format_get_type(void);
-
-void em_format_class_add_handler(EMFormatClass *emfc, EMFormatHandler *info);
-void em_format_class_remove_handler (EMFormatClass *emfc, const char *mime_type);
-const EMFormatHandler *em_format_find_handler(EMFormat *emf, const char *mime_type);
-const EMFormatHandler *em_format_fallback_handler(EMFormat *emf, const char *mime_type);
-
-/* puri is short for pending uri ... really */
-EMFormatPURI *em_format_add_puri(EMFormat *emf, size_t size, const char *uri, struct _CamelMimePart *part, EMFormatPURIFunc func);
-EMFormatPURI *em_format_find_visible_puri(EMFormat *emf, const char *uri);
-EMFormatPURI *em_format_find_puri(EMFormat *emf, const char *uri);
-void em_format_clear_puri_tree(EMFormat *emf);
-void em_format_push_level(EMFormat *emf);
-void em_format_pull_level(EMFormat *emf);
-
-/* clones inline state/view and format, or use to redraw */
-#define em_format_format_clone(emf, msg, src) ((EMFormatClass *)G_OBJECT_GET_CLASS(emf))->format_clone((emf), (msg), (src))
-/* formats a new message */
-#define em_format_format(emf, msg) ((EMFormatClass *)G_OBJECT_GET_CLASS(emf))->format_clone((emf), (msg), NULL)
-#define em_format_format_error(emf, stream, txt) ((EMFormatClass *)G_OBJECT_GET_CLASS(emf))->format_error((emf), (stream), (txt))
-#define em_format_format_attachment(emf, stream, msg, type, info) ((EMFormatClass *)G_OBJECT_GET_CLASS(emf))->format_attachment((emf), (stream), (msg), (type), (info))
-#define em_format_format_message(emf, stream, msg) ((EMFormatClass *)G_OBJECT_GET_CLASS(emf))->format_message((emf), (stream), (msg))
-#define em_format_format_source(emf, stream, msg) ((EMFormatClass *)G_OBJECT_GET_CLASS(emf))->format_source((emf), (stream), (msg))
-
-#define em_format_busy(emf) ((EMFormatClass *)G_OBJECT_GET_CLASS(emf))->busy((emf))
-
-/* raw content only */
-void em_format_format_content(EMFormat *emf, struct _CamelStream *stream, struct _CamelMimePart *part);
-/* raw content text parts - should this just be checked/done by above? */
-void em_format_format_text(EMFormat *emf, struct _CamelStream *stream, struct _CamelDataWrapper *part);
-
-void em_format_part_as(EMFormat *emf, struct _CamelStream *stream, struct _CamelMimePart *part, const char *mime_type);
-void em_format_part(EMFormat *emf, struct _CamelStream *stream, struct _CamelMimePart *part);
-
-#endif /* ! _EM_FORMAT_H */
diff --git a/mail/em-html-stream.c b/mail/em-html-stream.c
deleted file mode 100644
index 955525c306..0000000000
--- a/mail/em-html-stream.c
+++ /dev/null
@@ -1,169 +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 2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <gtkhtml/gtkhtml.h>
-#include <gtkhtml/gtkhtml-stream.h>
-#include <gtk/gtkmain.h>
-#include "em-html-stream.h"
-
-#define d(x)
-
-static void em_html_stream_class_init (EMHTMLStreamClass *klass);
-static void em_html_stream_init (CamelObject *object);
-static void em_html_stream_finalize (CamelObject *object);
-
-static ssize_t emhs_sync_write(CamelStream *stream, const char *buffer, size_t n);
-static int emhs_sync_close(CamelStream *stream);
-static int emhs_sync_flush(CamelStream *stream);
-
-static EMSyncStreamClass *parent_class = NULL;
-
-CamelType
-em_html_stream_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- parent_class = (EMSyncStreamClass *)em_sync_stream_get_type();
- type = camel_type_register (em_sync_stream_get_type(),
- "EMHTMLStream",
- sizeof (EMHTMLStream),
- sizeof (EMHTMLStreamClass),
- (CamelObjectClassInitFunc) em_html_stream_class_init,
- NULL,
- (CamelObjectInitFunc) em_html_stream_init,
- (CamelObjectFinalizeFunc) em_html_stream_finalize);
- }
-
- return type;
-}
-
-static void
-em_html_stream_class_init (EMHTMLStreamClass *klass)
-{
- ((EMSyncStreamClass *)klass)->sync_write = emhs_sync_write;
- ((EMSyncStreamClass *)klass)->sync_flush = emhs_sync_flush;
- ((EMSyncStreamClass *)klass)->sync_close = emhs_sync_close;
-}
-
-static void
-em_html_stream_init (CamelObject *object)
-{
- /*EMHTMLStream *emhs = (EMHTMLStream *)object;*/
-}
-
-static void
-emhs_cleanup(EMHTMLStream *emhs)
-{
- emhs->html_stream = NULL;
- emhs->sync.cancel = TRUE;
- g_signal_handler_disconnect(emhs->html, emhs->destroy_id);
- g_object_unref(emhs->html);
- emhs->html = NULL;
-}
-
-static void
-em_html_stream_finalize (CamelObject *object)
-{
- EMHTMLStream *emhs = (EMHTMLStream *)object;
-
- d(printf("%p: finalising stream\n", object));
- if (emhs->html_stream) {
- d(printf("%p: html stream still open - error\n", object));
- /* set 'in finalise' flag */
- camel_stream_close((CamelStream *)emhs);
- }
-}
-
-static ssize_t
-emhs_sync_write(CamelStream *stream, const char *buffer, size_t n)
-{
- EMHTMLStream *emhs = EM_HTML_STREAM (stream);
-
- if (emhs->html == NULL)
- return -1;
-
- if (emhs->html_stream == NULL)
- emhs->html_stream = gtk_html_begin(emhs->html);
-
- gtk_html_stream_write(emhs->html_stream, buffer, n);
-
- return (ssize_t) n;
-}
-
-static int
-emhs_sync_flush(CamelStream *stream)
-{
- EMHTMLStream *emhs = (EMHTMLStream *)stream;
-
- if (emhs->html_stream == NULL)
- return -1;
-
- gtk_html_flush (emhs->html);
-
- return 0;
-}
-
-static int
-emhs_sync_close(CamelStream *stream)
-{
- EMHTMLStream *emhs = (EMHTMLStream *)stream;
-
- if (emhs->html_stream == NULL)
- return -1;
-
- gtk_html_stream_close(emhs->html_stream, GTK_HTML_STREAM_OK);
- emhs_cleanup(emhs);
-
- return 0;
-}
-
-static void
-emhs_gtkhtml_destroy(struct _GtkHTML *html, EMHTMLStream *emhs)
-{
- d(printf("%p: emhs gtkhtml destroy\n", emhs));
- emhs_cleanup(emhs);
-}
-
-/* TODO: Could pass NULL for html_stream, and do a gtk_html_begin
- on first data -> less flashing */
-CamelStream *
-em_html_stream_new(struct _GtkHTML *html, struct _GtkHTMLStream *html_stream)
-{
- EMHTMLStream *new;
-
- new = EM_HTML_STREAM (camel_object_new (EM_HTML_STREAM_TYPE));
- new->html_stream = html_stream;
- new->html = html;
- g_object_ref(html);
- new->destroy_id = g_signal_connect(html, "destroy", G_CALLBACK(emhs_gtkhtml_destroy), new);
-
- em_sync_stream_set_buffer_size(&new->sync, 8192);
-
- return (CamelStream *)new;
-}
diff --git a/mail/em-html-stream.h b/mail/em-html-stream.h
deleted file mode 100644
index dc4b59cde8..0000000000
--- a/mail/em-html-stream.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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-#ifndef EM_HTML_STREAM_H
-#define EM_HTML_STREAM_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#define EM_HTML_STREAM_TYPE (em_html_stream_get_type ())
-#define EM_HTML_STREAM(obj) (CAMEL_CHECK_CAST((obj), EM_HTML_STREAM_TYPE, EMHTMLStream))
-#define EM_HTML_STREAM_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), EM_HTML_STREAM_TYPE, EMHTMLStreamClass))
-#define EM_IS_HTML_STREAM(o) (CAMEL_CHECK_TYPE((o), EM_HTML_STREAM_TYPE))
-
-struct _GtkHTML;
-struct _GtkHTMLStream;
-
-#include "em-sync-stream.h"
-
-typedef struct _EMHTMLStream {
- EMSyncStream sync;
-
- guint destroy_id;
- struct _GtkHTML *html;
- struct _GtkHTMLStream *html_stream;
-} EMHTMLStream;
-
-typedef struct {
- EMSyncStreamClass parent_class;
-
-} EMHTMLStreamClass;
-
-
-CamelType em_html_stream_get_type (void);
-
-/* the html_stream is closed when we are finalised (with an error), or closed (ok) */
-CamelStream *em_html_stream_new(struct _GtkHTML *html, struct _GtkHTMLStream *html_stream);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* EM_HTML_STREAM_H */
diff --git a/mail/em-icon-stream.c b/mail/em-icon-stream.c
deleted file mode 100644
index ca0e7b64eb..0000000000
--- a/mail/em-icon-stream.c
+++ /dev/null
@@ -1,208 +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 2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <gdk-pixbuf/gdk-pixbuf.h>
-#include <gdk-pixbuf/gdk-pixbuf-loader.h>
-#ifdef HAVE_LIBGNOMEUI_GNOME_THUMBNAIL_H
-#include <libgnomeui/gnome-thumbnail.h>
-#endif
-#include <gtk/gtkimage.h>
-#include "em-icon-stream.h"
-
-#define d(x)
-
-static void em_icon_stream_class_init (EMIconStreamClass *klass);
-static void em_icon_stream_init (CamelObject *object);
-static void em_icon_stream_finalize (CamelObject *object);
-
-static ssize_t emis_sync_write(CamelStream *stream, const char *buffer, size_t n);
-static int emis_sync_close(CamelStream *stream);
-static int emis_sync_flush(CamelStream *stream);
-
-static EMSyncStreamClass *parent_class = NULL;
-
-CamelType
-em_icon_stream_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- parent_class = (EMSyncStreamClass *)em_sync_stream_get_type();
- type = camel_type_register (em_sync_stream_get_type(),
- "EMIconStream",
- sizeof (EMIconStream),
- sizeof (EMIconStreamClass),
- (CamelObjectClassInitFunc) em_icon_stream_class_init,
- NULL,
- (CamelObjectInitFunc) em_icon_stream_init,
- (CamelObjectFinalizeFunc) em_icon_stream_finalize);
- }
-
- return type;
-}
-
-static void
-em_icon_stream_class_init (EMIconStreamClass *klass)
-{
- ((EMSyncStreamClass *)klass)->sync_write = emis_sync_write;
- ((EMSyncStreamClass *)klass)->sync_flush = emis_sync_flush;
- ((EMSyncStreamClass *)klass)->sync_close = emis_sync_close;
-}
-
-static void
-em_icon_stream_init (CamelObject *object)
-{
- EMIconStream *emis = (EMIconStream *)object;
-
- emis->width = 24;
- emis->height = 24;
-}
-
-static void
-emis_cleanup(EMIconStream *emis)
-{
- if (emis->loader) {
- gdk_pixbuf_loader_close(emis->loader, NULL);
- g_object_unref(emis->loader);
- emis->loader = NULL;
- }
-
- if (emis->destroy_id) {
- g_signal_handler_disconnect(emis->image, emis->destroy_id);
- emis->destroy_id = 0;
- }
-
- emis->image = NULL;
- emis->sync.cancel = TRUE;
-}
-
-static void
-em_icon_stream_finalize(CamelObject *object)
-{
- EMIconStream *emis = (EMIconStream *)object;
-
- emis_cleanup(emis);
-}
-
-static ssize_t
-emis_sync_write(CamelStream *stream, const char *buffer, size_t n)
-{
- EMIconStream *emis = EM_ICON_STREAM (stream);
-
- if (emis->loader == NULL)
- return -1;
-
- if (!gdk_pixbuf_loader_write(emis->loader, buffer, n, NULL)) {
- emis_cleanup(emis);
- return -1;
- }
-
- return (ssize_t) n;
-}
-
-static int
-emis_sync_flush(CamelStream *stream)
-{
- return 0;
-}
-
-static int
-emis_sync_close(CamelStream *stream)
-{
- EMIconStream *emis = (EMIconStream *)stream;
- int width, height, ratio;
- GdkPixbuf *pixbuf, *mini;
-
- if (emis->loader == NULL)
- return -1;
-
- gdk_pixbuf_loader_close(emis->loader, NULL);
-
- pixbuf = gdk_pixbuf_loader_get_pixbuf(emis->loader);
- if (pixbuf == NULL) {
- printf("couldn't get pixbuf from loader\n");
- emis_cleanup(emis);
- return -1;
- }
-
- width = gdk_pixbuf_get_width(pixbuf);
- height = gdk_pixbuf_get_height(pixbuf);
-
- if (width != emis->width || height != emis->height) {
- if (width >= height) {
- if (width > emis->width) {
- ratio = width / emis->width;
- width = emis->width;
- height /= ratio;
- }
- } else {
- if (height > emis->height) {
- ratio = height / emis->height;
- height = emis->height;
- width /= ratio;
- }
- }
-
-#ifdef HAVE_LIBGNOMEUI_GNOME_THUMBNAIL_H
- mini = gnome_thumbnail_scale_down_pixbuf (pixbuf, width, height);
-#else
- mini = gdk_pixbuf_scale_simple(pixbuf, width, height, GDK_INTERP_BILINEAR);
-#endif
- gtk_image_set_from_pixbuf(emis->image, mini);
- g_object_unref(mini);
- } else {
- gtk_image_set_from_pixbuf(emis->image, pixbuf);
- }
-
- g_object_unref(emis->loader);
- emis->loader = NULL;
-
- g_signal_handler_disconnect(emis->image, emis->destroy_id);
- emis->destroy_id = 0;
-
- return 0;
-}
-
-static void
-emis_image_destroy(struct _GtkImage *image, EMIconStream *emis)
-{
- emis_cleanup(emis);
-}
-
-CamelStream *
-em_icon_stream_new(GtkImage *image)
-{
- EMIconStream *new;
-
- new = EM_ICON_STREAM(camel_object_new(EM_ICON_STREAM_TYPE));
- new->image = image;
- new->destroy_id = g_signal_connect(image, "destroy", G_CALLBACK(emis_image_destroy), new);
- new->loader = gdk_pixbuf_loader_new();
-
- return (CamelStream *)new;
-}
diff --git a/mail/em-icon-stream.h b/mail/em-icon-stream.h
deleted file mode 100644
index 3776732578..0000000000
--- a/mail/em-icon-stream.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Michael Zucchi <notzed@ximian.com>
- *
- * Copyright 2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-#ifndef EM_ICON_STREAM_H
-#define EM_ICON_STREAM_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#define EM_ICON_STREAM_TYPE (em_icon_stream_get_type ())
-#define EM_ICON_STREAM(obj) (CAMEL_CHECK_CAST((obj), EM_ICON_STREAM_TYPE, EMIconStream))
-#define EM_ICON_STREAM_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), EM_ICON_STREAM_TYPE, EMIconStreamClass))
-#define EM_IS_ICON_STREAM(o) (CAMEL_CHECK_TYPE((o), EM_ICON_STREAM_TYPE))
-
-struct _GtkHTML;
-struct _GtkIconStream;
-
-#include "em-sync-stream.h"
-
-typedef struct _EMIconStream {
- EMSyncStream sync;
-
- unsigned int width, height;
- guint destroy_id;
- struct _GdkPixbufLoader *loader;
- struct _GtkImage *image;
-} EMIconStream;
-
-typedef struct {
- EMSyncStreamClass parent_class;
-} EMIconStreamClass;
-
-CamelType em_icon_stream_get_type (void);
-
-CamelStream *em_icon_stream_new(GtkImage *image);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* EM_ICON_STREAM_H */
diff --git a/mail/em-inline-filter.c b/mail/em-inline-filter.c
deleted file mode 100644
index 3a38771efc..0000000000
--- a/mail/em-inline-filter.c
+++ /dev/null
@@ -1,335 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- *
- *
- * Authors: Michael Zucchi <notzed@ximian.com>
- *
- * Copyright 2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 "em-inline-filter.h"
-#include <camel/camel-mime-part.h>
-#include <camel/camel-multipart.h>
-#include <camel/camel-stream-mem.h>
-
-#define d(x)
-
-static void em_inline_filter_class_init (EMInlineFilterClass *klass);
-static void em_inline_filter_init (CamelObject *object);
-static void em_inline_filter_finalize (CamelObject *object);
-
-static void emif_filter(CamelMimeFilter *f, char *in, size_t len, size_t prespace, char **out, size_t *outlen, size_t *outprespace);
-static void emif_complete(CamelMimeFilter *f, char *in, size_t len, size_t prespace, char **out, size_t *outlen, size_t *outprespace);
-static void emif_reset(CamelMimeFilter *f);
-
-static CamelMimeFilterClass *parent_class = NULL;
-
-CamelType
-em_inline_filter_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- parent_class = (CamelMimeFilterClass *)camel_mime_filter_get_type();
-
- type = camel_type_register(camel_mime_filter_get_type(),
- "EMInlineFilter",
- sizeof (EMInlineFilter),
- sizeof (EMInlineFilterClass),
- (CamelObjectClassInitFunc) em_inline_filter_class_init,
- NULL,
- (CamelObjectInitFunc) em_inline_filter_init,
- (CamelObjectFinalizeFunc) em_inline_filter_finalize);
- }
-
- return type;
-}
-
-static void
-em_inline_filter_class_init (EMInlineFilterClass *klass)
-{
- ((CamelMimeFilterClass *)klass)->filter = emif_filter;
- ((CamelMimeFilterClass *)klass)->complete = emif_complete;
- ((CamelMimeFilterClass *)klass)->reset = emif_reset;
-}
-
-static void
-em_inline_filter_init (CamelObject *object)
-{
- EMInlineFilter *emif = (EMInlineFilter *)object;
-
- emif->data = g_byte_array_new();
-}
-
-
-static void
-em_inline_filter_finalize (CamelObject *object)
-{
- EMInlineFilter *emif = (EMInlineFilter *)object;
-
- emif_reset((CamelMimeFilter *)emif);
- g_byte_array_free(emif->data, TRUE);
- g_free(emif->filename);
-}
-
-enum {
- EMIF_PLAIN,
- EMIF_UUENC,
- EMIF_BINHEX,
- EMIF_POSTSCRIPT,
- EMIF_PGPSIGNED,
-};
-const struct {
- const char *name;
- CamelTransferEncoding type;
-} emif_types[] = {
- { "text/plain", CAMEL_TRANSFER_ENCODING_DEFAULT, },
- { "application/octet-stream", CAMEL_TRANSFER_ENCODING_UUENCODE, },
- { "application/mac-binhex40", CAMEL_TRANSFER_ENCODING_7BIT, },
- { "application/postscript", CAMEL_TRANSFER_ENCODING_7BIT, },
- { "text/plain", CAMEL_TRANSFER_ENCODING_7BIT, },
-};
-
-static void
-emif_add_part(EMInlineFilter *emif, const char *data, int len)
-{
- CamelTransferEncoding type;
- CamelStream *mem;
- CamelDataWrapper *dw;
- CamelMimePart *part;
-
- if (emif->state == EMIF_PLAIN)
- type = emif->base_encoding;
- else
- type = emif_types[emif->state].type;
-
- g_byte_array_append(emif->data, data, len);
- mem = camel_stream_mem_new_with_byte_array(emif->data);
- emif->data = g_byte_array_new();
-
- dw = camel_data_wrapper_new();
- camel_data_wrapper_construct_from_stream(dw, mem);
- camel_object_unref(mem);
- camel_data_wrapper_set_mime_type(dw, emif_types[emif->state].name);
- dw->encoding = type;
-
- part = camel_mime_part_new();
- camel_medium_set_content_object((CamelMedium *)part, dw);
- camel_mime_part_set_encoding(part, type);
- camel_object_unref(dw);
-
- if (emif->filename) {
- camel_mime_part_set_filename(part, emif->filename);
- g_free(emif->filename);
- emif->filename = NULL;
- }
-
- emif->parts = g_slist_append(emif->parts, part);
-}
-
-static int
-emif_scan(CamelMimeFilter *f, char *in, size_t len, int final)
-{
- EMInlineFilter *emif = (EMInlineFilter *)f;
- char *inptr = in, *inend = in+len;
- char *data_start = in;
- char *start = in;
-
- while (inptr < inend) {
- start = inptr;
-
- while (inptr < inend && *inptr != '\n')
- inptr++;
-
- if (inptr == inend) {
- if (!final) {
- camel_mime_filter_backup(f, start, inend-start);
- inend = start;
- }
- break;
- }
-
- *inptr++ = 0;
-
- switch(emif->state) {
- case EMIF_PLAIN:
- /* This could use some funky plugin shit, but this'll do for now */
- if (strncmp(start, "begin ", 6) == 0
- && start[6] >= '0' && start[6] <= '7') {
- int i = 7;
-
- while (start[i] >='0' && start[i] <='7')
- i++;
-
- inptr[-1] = '\n';
-
- if (start[i++] != ' ')
- break;
-
- emif_add_part(emif, data_start, start-data_start);
- emif->filename = g_strndup(start+i, inptr-start-i-1);
- data_start = start;
- emif->state = EMIF_UUENC;
- } else if (strncmp(start, "(This file must be converted with BinHex 4.0)", 45) == 0) {
- inptr[-1] = '\n';
- emif_add_part(emif, data_start, start-data_start);
- data_start = start;
- emif->state = EMIF_BINHEX;
- } else if (strncmp(start, "%!PS-Adobe-", 11) == 0) {
- inptr[-1] = '\n';
- emif_add_part(emif, data_start, start-data_start);
- data_start = start;
- emif->state = EMIF_POSTSCRIPT;
-#if 0
-/* This should be hooked in once someone can work out how to handle it.
- Maybe we need a multipart_gpg_inline_signed or some crap, if it
- can't be converted to a real multipart/signed */
- } else if (strncmp(start, "-----BEGIN PGP SIGNED MESSAGE-----", 34) == 0) {
- inptr[-1] = '\n';
- emif_add_part(emif, data_start, start-data_start);
- data_start = start;
- emif->state = EMIF_PGPSIGNED;
-#endif
- }
- break;
- case EMIF_UUENC:
- if (strcmp(start, "end") == 0) {
- inptr[-1] = '\n';
- emif_add_part(emif, data_start, inptr-data_start);
- data_start = inptr;
- emif->state = EMIF_PLAIN;
- }
- break;
- case EMIF_BINHEX:
- if (inptr > (start+1) && inptr[-2] == ':') {
- inptr[-1] = '\n';
- emif_add_part(emif, data_start, inptr-data_start);
- data_start = inptr;
- emif->state = EMIF_PLAIN;
- }
- break;
- case EMIF_POSTSCRIPT:
- if (strcmp(start, "%%EOF") == 0) {
- inptr[-1] = '\n';
- emif_add_part(emif, data_start, inptr-data_start);
- data_start = inptr;
- emif->state = EMIF_PLAIN;
- }
- break;
- case EMIF_PGPSIGNED:
- /* This is currently a noop - it just turns it into a text part */
- if (strcmp(start, "-----END PGP SIGNATURE-----") == 0) {
- inptr[-1] = '\n';
- emif_add_part(emif, data_start, inptr-data_start);
- data_start = inptr;
- emif->state = EMIF_PLAIN;
- }
- break;
- }
-
- inptr[-1] = '\n';
- }
-
- if (final) {
- emif_add_part(emif, data_start, inend-data_start);
- } else {
- g_byte_array_append(emif->data, data_start, inend-data_start);
- }
-
- return 0;
-}
-
-static void
-emif_filter(CamelMimeFilter *f, char *in, size_t len, size_t prespace, char **out, size_t *outlen, size_t *outprespace)
-{
- emif_scan(f, in, len, FALSE);
-
- *out = in;
- *outlen = len;
- *outprespace = prespace;
-}
-
-static void
-emif_complete(CamelMimeFilter *f, char *in, size_t len, size_t prespace, char **out, size_t *outlen, size_t *outprespace)
-{
- emif_scan(f, in, len, TRUE);
-
- *out = in;
- *outlen = len;
- *outprespace = prespace;
-}
-
-static void
-emif_reset(CamelMimeFilter *f)
-{
- EMInlineFilter *emif = (EMInlineFilter *)f;
- GSList *l;
-
- l = emif->parts;
- while (l) {
- GSList *n = l->next;
-
- camel_object_unref(l->data);
- g_slist_free_1(l);
-
- l = n;
- }
- emif->parts = NULL;
- g_byte_array_set_size(emif->data, 0);
-}
-
-/**
- * em_inline_filter_new:
- * @base_encoding: The base transfer-encoding of the
- * raw data being processed.
- *
- * Create a filter which will scan a (text) stream for
- * embedded parts. You can then retrieve the contents
- * as a CamelMultipart object.
- *
- * Return value:
- **/
-EMInlineFilter *
-em_inline_filter_new(CamelTransferEncoding base_encoding)
-{
- EMInlineFilter *emif;
-
- emif = (EMInlineFilter *)camel_object_new(em_inline_filter_get_type());
- emif->base_encoding = base_encoding;
-
- return emif;
-}
-
-CamelMultipart *
-em_inline_filter_get_multipart(EMInlineFilter *emif)
-{
- GSList *l = emif->parts;
- CamelMultipart *mp;
-
- mp = camel_multipart_new();
- while (l) {
- camel_multipart_add_part(mp, l->data);
- l = l->next;
- }
-
- return mp;
-}
diff --git a/mail/em-inline-filter.h b/mail/em-inline-filter.h
deleted file mode 100644
index 0afcdfa0b5..0000000000
--- a/mail/em-inline-filter.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Michael Zucchi <notzed@ximian.com>
- *
- * Copyright 2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-#ifndef EM_INLINE_FILTER_H
-#define EM_INLINE_FILTER_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#define EM_INLINE_FILTER_TYPE (em_inline_filter_get_type ())
-#define EM_INLINE_FILTER(obj) (CAMEL_CHECK_CAST((obj), EM_INLINE_FILTER_TYPE, EMInlineFilter))
-#define EM_INLINE_FILTER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), EM_INLINE_FILTER_TYPE, EMInlineFilterClass))
-#define EM_IS_INLINE_FILTER(o) (CAMEL_CHECK_TYPE((o), EM_INLINE_FILTER_TYPE))
-
-#include <camel/camel-mime-filter.h>
-#include <camel/camel-mime-utils.h>
-
-typedef struct _EMInlineFilter {
- CamelMimeFilter filter;
-
- int state;
-
- CamelTransferEncoding base_encoding;
- GByteArray *data;
- char *filename;
- GSList *parts;
-} EMInlineFilter;
-
-typedef struct _EMInlineFilterClass {
- CamelMimeFilterClass filter_class;
-} EMInlineFilterClass;
-
-CamelType em_inline_filter_get_type(void);
-EMInlineFilter *em_inline_filter_new(CamelTransferEncoding base_encoding);
-struct _CamelMultipart *em_inline_filter_get_multipart(EMInlineFilter *emif);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* EM_INLINE_FILTER_H */
diff --git a/mail/em-junk-filter.c b/mail/em-junk-filter.c
deleted file mode 100644
index 7d6b9346e8..0000000000
--- a/mail/em-junk-filter.c
+++ /dev/null
@@ -1,352 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author:
- * Radek Doulik <rodo@ximian.com>
- *
- * Copyright 2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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/types.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <signal.h>
-#include <string.h>
-#include <pthread.h>
-
-#include <camel/camel-data-wrapper.h>
-#include <camel/camel-stream-fs.h>
-
-#include "em-junk-filter.h"
-
-#define LOCK(x) pthread_mutex_lock(&x)
-#define UNLOCK(x) pthread_mutex_unlock(&x)
-
-static pthread_mutex_t em_junk_sa_test_lock = PTHREAD_MUTEX_INITIALIZER;
-
-static const char * em_junk_sa_get_name (void);
-static gboolean em_junk_sa_check_junk (CamelMimeMessage *msg);
-static void em_junk_sa_report_junk (CamelMimeMessage *msg);
-static void em_junk_sa_report_notjunk (CamelMimeMessage *msg);
-static void em_junk_sa_commit_reports (void);
-
-static EMJunkPlugin spam_assassin_plugin =
-{
- {
- em_junk_sa_get_name,
- 1,
- em_junk_sa_check_junk,
- em_junk_sa_report_junk,
- em_junk_sa_report_notjunk,
- em_junk_sa_commit_reports,
- },
- NULL,
- NULL
-};
-
-static gboolean em_junk_sa_tested = FALSE;
-static gboolean em_junk_sa_use_spamc = FALSE;
-static gboolean em_junk_sa_available = FALSE;
-static gint em_junk_sa_spamd_port = -1;
-
-#define d(x) x
-
-static const char *
-em_junk_sa_get_name (void)
-{
- return _("Spamassassin (built-in)");
-}
-
-static int
-pipe_to_sa (CamelMimeMessage *msg, gchar *in, int argc, gchar **argv)
-{
- CamelStream *stream;
- int result, status;
- int in_fds[2];
- pid_t pid;
-
- d(printf ("pipe_to_sa %s %s %s %s\n", argc > 0 ? argv [0] : "", argc > 1 ? argv [1] : "", argc > 2 ? argv [2] : "", argc > 3 ? argv [3] : ""));
-
- if (argc < 1 || argv[0] == '\0')
- return 0;
-
- if (pipe (in_fds) == -1) {
- /* camel_exception_setv (fms->ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to create pipe to '%s': %s"),
- argv[0]->value.string, g_strerror (errno)); */
- return -1;
- }
-
- if (!(pid = fork ())) {
- /* child process */
- int maxfd, fd;
-
- fd = open ("/dev/null", O_WRONLY);
-
- if (dup2 (in_fds[0], STDIN_FILENO) < 0 ||
- dup2 (fd, STDOUT_FILENO) < 0 ||
- dup2 (fd, STDERR_FILENO) < 0)
- _exit (255);
-
- setsid ();
-
- maxfd = sysconf (_SC_OPEN_MAX);
- if (maxfd > 0) {
- for (fd = 0; fd < maxfd; fd++) {
- if (fd != STDIN_FILENO && fd != STDOUT_FILENO && fd != STDERR_FILENO)
- close (fd);
- }
- }
-
- execvp (argv [0], argv);
-
- d(printf ("Could not execute %s: %s\n", argv [0], g_strerror (errno)));
- _exit (255);
- } else if (pid < 0) {
- /* camel_exception_setv (fms->ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to create create child process '%s': %s"),
- argv[0]->value.string, g_strerror (errno)); */
- return -1;
- }
-
- /* parent process */
- close (in_fds[0]);
- fcntl (in_fds[1], F_SETFL, O_NONBLOCK);
-
- if (msg) {
- stream = camel_stream_fs_new_with_fd (in_fds[1]);
-
- camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (msg), stream);
- camel_stream_flush (stream);
- camel_object_unref (CAMEL_OBJECT (stream));
- } else if (in) {
- write (in_fds [1], in, strlen (in));
- close (in_fds [1]);
- }
-
- result = waitpid (pid, &status, 0);
-
- if (result == -1 && errno == EINTR) {
- /* child process is hanging... */
- kill (pid, SIGTERM);
- sleep (1);
- result = waitpid (pid, &status, WNOHANG);
- if (result == 0) {
- /* ...still hanging, set phasers to KILL */
- kill (pid, SIGKILL);
- sleep (1);
- result = waitpid (pid, &status, WNOHANG);
- }
- }
-
- if (result != -1 && WIFEXITED (status))
- return WEXITSTATUS (status);
- else
- return -1;
-}
-
-
-#define NPORTS 1
-
-static int
-em_junk_sa_test_spamd_running (gint port)
-{
- static gchar *sac_args [3] = {
- "/bin/sh",
- "-c",
- NULL
- };
- int retval;
-
- d(fprintf (stderr, "test if spamd is running (port %d)\n", port);)
- sac_args [2] = port > 0 ? g_strdup_printf ("spamc -x -p %d", port) : g_strdup_printf ("spamc -x");
-
- retval = pipe_to_sa (NULL, "From test@127.0.0.1", 3, sac_args) == 0;
- g_free (sac_args [2]);
-
- return retval;
-}
-
-static void
-em_junk_sa_test_spamd ()
-{
- gint i, port = 7830;
- static gchar *args [3] = {
- "/bin/sh",
- "-c",
- "spamassassin --version"
- };
-
- if (pipe_to_sa (NULL, NULL, 3, args))
- em_junk_sa_available = FALSE;
- else {
- em_junk_sa_available = TRUE;
- em_junk_sa_use_spamc = FALSE;
-
- /* if (em_junk_sa_test_spamd_running (-1)) {
- em_junk_sa_use_spamc = TRUE;
- em_junk_sa_spamd_port = -1;
- } else { */
- for (i = 0; i < NPORTS; i ++) {
- if (em_junk_sa_test_spamd_running (port)) {
- em_junk_sa_use_spamc = TRUE;
- em_junk_sa_spamd_port = port;
- break;
- }
- port ++;
- }
- /* } */
-
- if (!em_junk_sa_use_spamc) {
- static gchar *sad_args [3] = {
- "/bin/sh",
- "-c",
- NULL
- };
- gint i, port = 7830;
-
- d(fprintf (stderr, "looks like spamd is not running\n");)
-
- for (i = 0; i < NPORTS; i ++) {
- d(fprintf (stderr, "trying to run spamd at port %d\n", port));
-
- sad_args [2] = g_strdup_printf ("spamd --port %d --local --daemonize", port);
- if (!pipe_to_sa (NULL, NULL, 3, sad_args)) {
- g_free (sad_args [2]);
- em_junk_sa_use_spamc = TRUE;
- em_junk_sa_spamd_port = port;
- d(fprintf (stderr, "success at port %d\n", port));
- break;
- }
- g_free (sad_args [2]);
- port ++;
- }
- }
-
- d(fprintf (stderr, "use spamd %d at port %d\n", em_junk_sa_use_spamc, em_junk_sa_spamd_port));
- }
-
- em_junk_sa_tested = TRUE;
-}
-
-static gboolean
-em_junk_sa_is_available ()
-{
- LOCK (em_junk_sa_test_lock);
- if (!em_junk_sa_tested)
- em_junk_sa_test_spamd ();
- UNLOCK (em_junk_sa_test_lock);
-
- return em_junk_sa_available;
-}
-
-static gboolean
-em_junk_sa_check_junk (CamelMimeMessage *msg)
-{
- static gchar *args [3] = {
- "/bin/sh",
- "-c",
- NULL
- };
- gint retval;
-
- d(fprintf (stderr, "em_junk_sa_check_junk\n"));
-
- if (!em_junk_sa_is_available ())
- return FALSE;
-
- args [2] = em_junk_sa_use_spamc
- ? (em_junk_sa_spamd_port == -1
- ? g_strdup ("spamc -c") /* Exit with a non-zero exit code if the
- tested message was junk */
- : g_strdup_printf ("spamc"
- " -c" /* Exit with a non-zero exit code if the
- tested message was junk */
- " -p %d", em_junk_sa_spamd_port))
- : g_strdup ("spamassassin"
- " --exit-code" /* Exit with a non-zero exit code if the
- tested message was junk */
- " --local"); /* Local tests only (no online tests) */
-
- retval = pipe_to_sa (msg, NULL, 3, args);
-
- g_free (args [2]);
-
- return retval;
-}
-
-static void
-em_junk_sa_report_junk (CamelMimeMessage *msg)
-{
- static gchar *args [3] = {
- "/bin/sh",
- "-c",
- "sa-learn"
- " --no-rebuild" /* do not rebuild db */
- " --spam" /* report junk */
- " --single" /* single message */
- " --local" /* local only */
- };
-
- d(fprintf (stderr, "em_junk_sa_report_junk\n"));
-
- if (em_junk_sa_is_available ())
- pipe_to_sa (msg, NULL, 3, args);
-}
-
-static void
-em_junk_sa_report_notjunk (CamelMimeMessage *msg)
-{
- static gchar *args [3] = {
- "/bin/sh",
- "-c",
- "sa-learn"
- " --no-rebuild" /* do not rebuild db */
- " --ham" /* report notjunk */
- " --single" /* single message */
- " --local" /* local only */
- };
-
- d(fprintf (stderr, "em_junk_sa_report_notjunk\n"));
-
- if (em_junk_sa_is_available ())
- pipe_to_sa (msg, NULL, 3, args);
-}
-
-static void
-em_junk_sa_commit_reports (void)
-{
- static gchar *args [3] = {
- "/bin/sh",
- "-c",
- "sa-learn"
- " --rebuild" /* do not rebuild db */
- " --local" /* local only */
- };
-
- d(fprintf (stderr, "em_junk_sa_commit_reports\n");)
-
- if (em_junk_sa_is_available ())
- pipe_to_sa (NULL, NULL, 3, args);
-}
-
-const EMJunkPlugin *
-em_junk_filter_get_plugin (void)
-{
- return &spam_assassin_plugin;
-}
diff --git a/mail/em-junk-filter.h b/mail/em-junk-filter.h
deleted file mode 100644
index f62ca7bfad..0000000000
--- a/mail/em-junk-filter.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author:
- * Radek Doulik <rodo@ximian.com>
- *
- * Copyright 2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#ifndef _EM_JUNK_FILTER_H
-#define _EM_JUNK_FILTER_H
-
-#include "em-junk-plugin.h"
-
-const EMJunkPlugin * em_junk_filter_get_plugin (void);
-
-#endif
diff --git a/mail/em-junk-plugin.c b/mail/em-junk-plugin.c
deleted file mode 100644
index 5ea2a40119..0000000000
--- a/mail/em-junk-plugin.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author:
- * Radek Doulik <rodo@ximian.com>
- *
- * Copyright 2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 "em-junk-plugin.h"
-
diff --git a/mail/em-junk-plugin.h b/mail/em-junk-plugin.h
deleted file mode 100644
index bd4af4cf9a..0000000000
--- a/mail/em-junk-plugin.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author:
- * Radek Doulik <rodo@ximian.com>
- *
- * Copyright 2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#ifndef _EM_JUNK_PLUGIN_H
-#define _EM_JUNK_PLUGIN_H
-
-#include <camel/camel-junk-plugin.h>
-#include <gtk/gtkwidget.h>
-
-#define EM_JUNK_PLUGIN(x) ((EMJunkPlugin *) x)
-
-typedef struct _EMJunkPlugin EMJunkPlugin;
-
-struct _EMJunkPlugin
-{
- CamelJunkPlugin csp;
-
- /* when called, it should return widget containing UI configuration.
- plugin has to call (*changed_cb) (); whenever configuration
- is changed to notify settings dialog about that change.
- if setup_widget is NULL, it means there is no UI configuration */
-
- GtkWidget (*setup_widget) (void (*changed_cb) ());
- void (*apply) ();
-};
-
-#endif
diff --git a/mail/em-mailer-prefs.c b/mail/em-mailer-prefs.c
deleted file mode 100644
index a4c5f2e25a..0000000000
--- a/mail/em-mailer-prefs.c
+++ /dev/null
@@ -1,484 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2002-2003 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 "em-mailer-prefs.h"
-
-#include <gal/util/e-iconv.h>
-#include <gtkhtml/gtkhtml-properties.h>
-#include "widgets/misc/e-charset-picker.h"
-#include <bonobo/bonobo-generic-factory.h>
-
-#include "mail-config.h"
-
-
-static void em_mailer_prefs_class_init (EMMailerPrefsClass *class);
-static void em_mailer_prefs_init (EMMailerPrefs *dialog);
-static void em_mailer_prefs_finalise (GObject *obj);
-
-static GtkVBoxClass *parent_class = NULL;
-
-
-GtkType
-em_mailer_prefs_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- GTypeInfo type_info = {
- sizeof (EMMailerPrefsClass),
- NULL, NULL,
- (GClassInitFunc) em_mailer_prefs_class_init,
- NULL, NULL,
- sizeof (EMMailerPrefs),
- 0,
- (GInstanceInitFunc) em_mailer_prefs_init,
- };
-
- type = g_type_register_static (gtk_vbox_get_type (), "EMMailerPrefs", &type_info, 0);
- }
-
- return type;
-}
-
-static void
-em_mailer_prefs_class_init (EMMailerPrefsClass *klass)
-{
- GObjectClass *object_class;
-
- object_class = (GObjectClass *) klass;
- parent_class = g_type_class_ref (gtk_vbox_get_type ());
-
- object_class->finalize = em_mailer_prefs_finalise;
-}
-
-static void
-em_mailer_prefs_init (EMMailerPrefs *preferences)
-{
- preferences->gconf = mail_config_get_gconf_client ();
-}
-
-static void
-em_mailer_prefs_finalise (GObject *obj)
-{
- EMMailerPrefs *prefs = (EMMailerPrefs *) obj;
-
- g_object_unref (prefs->gui);
-
- ((GObjectClass *)(parent_class))->finalize (obj);
-}
-
-
-static void
-colorpicker_set_color (GnomeColorPicker *color, const char *str)
-{
- GdkColor colour;
- guint32 rgb;
-
- gdk_color_parse (str, &colour);
- rgb = ((colour.red & 0xff00) << 8) | (colour.green & 0xff00) | ((colour.blue & 0xff00) >> 8);
-
- gnome_color_picker_set_i8 (color, (rgb & 0xff0000) >> 16, (rgb & 0xff00) >> 8, rgb & 0xff, 0xff);
-}
-
-static guint32
-colorpicker_get_color (GnomeColorPicker *color)
-{
- guint8 r, g, b, a;
- guint32 rgb = 0;
-
- gnome_color_picker_get_i8 (color, &r, &g, &b, &a);
-
- rgb = r;
- rgb <<= 8;
- rgb |= g;
- rgb <<= 8;
- rgb |= b;
-
- return rgb;
-}
-
-static void
-settings_changed (GtkWidget *widget, gpointer user_data)
-{
- EMMailerPrefs *prefs = (EMMailerPrefs *) user_data;
-
- if (prefs->control)
- evolution_config_control_changed (prefs->control);
-}
-
-static void
-font_share_changed (GtkWidget *w, gpointer user_data)
-{
- EMMailerPrefs *prefs = (EMMailerPrefs *) user_data;
- gboolean use_custom;
-
- use_custom = !gtk_toggle_button_get_active (prefs->font_share);
-
- gtk_widget_set_sensitive (GTK_WIDGET (prefs->font_fixed), use_custom);
- gtk_widget_set_sensitive (GTK_WIDGET (prefs->font_variable), use_custom);
-
- if (prefs->control)
- evolution_config_control_changed (prefs->control);
-}
-
-static void
-font_changed (GnomeFontPicker *fontpicker, gchar *arg1, gpointer user_data)
-{
- EMMailerPrefs *prefs = (EMMailerPrefs *) user_data;
-
- if (prefs->control)
- evolution_config_control_changed (prefs->control);
-}
-
-static void
-color_set (GtkWidget *widget, guint r, guint g, guint b, guint a, gpointer user_data)
-{
- EMMailerPrefs *prefs = (EMMailerPrefs *) user_data;
-
- if (prefs->control)
- evolution_config_control_changed (prefs->control);
-}
-
-static void
-restore_labels_clicked (GtkWidget *widget, gpointer user_data)
-{
- EMMailerPrefs *prefs = (EMMailerPrefs *) user_data;
- int i;
-
- for (i = 0; i < 5; i++) {
- gtk_entry_set_text (prefs->labels[i].name, _(label_defaults[i].name));
- colorpicker_set_color (prefs->labels[i].color, label_defaults[i].colour);
- }
-}
-
-static void
-menu_changed (GtkWidget *widget, gpointer user_data)
-{
- EMMailerPrefs *prefs = (EMMailerPrefs *) user_data;
-
- if (prefs->control)
- evolution_config_control_changed (prefs->control);
-}
-
-static void
-option_menu_connect (GtkOptionMenu *omenu, gpointer user_data)
-{
- GtkWidget *menu, *item;
- GList *items;
-
- menu = gtk_option_menu_get_menu (omenu);
-
- items = GTK_MENU_SHELL (menu)->children;
- while (items) {
- item = items->data;
- g_signal_connect (item, "activate", G_CALLBACK (menu_changed), user_data);
- items = items->next;
- }
-}
-
-static void
-em_mailer_prefs_construct (EMMailerPrefs *prefs)
-{
- GtkWidget *toplevel, *menu;
- GSList *list;
- GladeXML *gui;
- gboolean bool;
- char *font;
- int i, val;
- char *buf;
-
- gui = glade_xml_new (EVOLUTION_GLADEDIR "/mail-config.glade", "preferences_tab", NULL);
- prefs->gui = gui;
-
- /* get our toplevel widget */
- toplevel = glade_xml_get_widget (gui, "toplevel");
-
- /* reparent */
- gtk_widget_ref (toplevel);
- gtk_container_remove (GTK_CONTAINER (toplevel->parent), toplevel);
- gtk_container_add (GTK_CONTAINER (prefs), toplevel);
- gtk_widget_unref (toplevel);
-
- /* General tab */
-
- /* Message Display */
- prefs->timeout_toggle = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkMarkTimeout"));
- bool = gconf_client_get_bool (prefs->gconf, "/apps/evolution/mail/display/mark_seen", NULL);
- gtk_toggle_button_set_active (prefs->timeout_toggle, bool);
- g_signal_connect (prefs->timeout_toggle, "toggled", G_CALLBACK (settings_changed), prefs);
-
- prefs->timeout = GTK_SPIN_BUTTON (glade_xml_get_widget (gui, "spinMarkTimeout"));
- val = gconf_client_get_int (prefs->gconf, "/apps/evolution/mail/display/mark_seen_timeout", NULL);
- gtk_spin_button_set_value (prefs->timeout, (1.0 * val) / 1000.0);
- g_signal_connect (prefs->timeout, "value-changed", G_CALLBACK (settings_changed), prefs);
-
- prefs->charset = GTK_OPTION_MENU (glade_xml_get_widget (gui, "omenuCharset"));
- buf = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/display/charset", NULL);
- menu = e_charset_picker_new (buf && *buf ? buf : e_iconv_locale_charset ());
- gtk_option_menu_set_menu (prefs->charset, GTK_WIDGET (menu));
- option_menu_connect (prefs->charset, prefs);
- g_free (buf);
-
- prefs->citation_highlight = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkHighlightCitations"));
- bool = gconf_client_get_bool (prefs->gconf, "/apps/evolution/mail/display/mark_citations", NULL);
- gtk_toggle_button_set_active (prefs->citation_highlight, bool);
- g_signal_connect (prefs->citation_highlight, "toggled", G_CALLBACK (settings_changed), prefs);
-
- prefs->citation_color = GNOME_COLOR_PICKER (glade_xml_get_widget (gui, "colorpickerHighlightCitations"));
- buf = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/display/citation_colour", NULL);
- colorpicker_set_color (prefs->citation_color, buf ? buf : "#737373");
- g_signal_connect (prefs->citation_color, "color-set", G_CALLBACK (color_set), prefs);
- g_free (buf);
-
- /* Deleting Mail */
- prefs->empty_trash = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkEmptyTrashOnExit"));
- bool = gconf_client_get_bool (prefs->gconf, "/apps/evolution/mail/trash/empty_on_exit", NULL);
- gtk_toggle_button_set_active (prefs->empty_trash, bool);
- g_signal_connect (prefs->empty_trash, "toggled", G_CALLBACK (settings_changed), prefs);
-
- prefs->confirm_expunge = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkConfirmExpunge"));
- bool = gconf_client_get_bool (prefs->gconf, "/apps/evolution/mail/prompts/expunge", NULL);
- gtk_toggle_button_set_active (prefs->confirm_expunge, bool);
- g_signal_connect (prefs->confirm_expunge, "toggled", G_CALLBACK (settings_changed), prefs);
-
- /* New Mail Notification */
- val = gconf_client_get_int (prefs->gconf, "/apps/evolution/mail/notify/type", NULL);
- prefs->notify_not = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "radNotifyNot"));
- gtk_toggle_button_set_active (prefs->notify_not, val == MAIL_CONFIG_NOTIFY_NOT);
- g_signal_connect (prefs->notify_not, "toggled", G_CALLBACK (settings_changed), prefs);
-
- prefs->notify_beep = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "radNotifyBeep"));
- gtk_toggle_button_set_active (prefs->notify_beep, val == MAIL_CONFIG_NOTIFY_BEEP);
- g_signal_connect (prefs->notify_beep, "toggled", G_CALLBACK (settings_changed), prefs);
-
- prefs->notify_play_sound = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "radNotifyPlaySound"));
- gtk_toggle_button_set_active (prefs->notify_play_sound, val == MAIL_CONFIG_NOTIFY_PLAY_SOUND);
- g_signal_connect (prefs->notify_play_sound, "toggled", G_CALLBACK (settings_changed), prefs);
-
- prefs->notify_sound_file = GNOME_FILE_ENTRY (glade_xml_get_widget (gui, "fileNotifyPlaySound"));
- buf = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/notify/sound", NULL);
- gtk_entry_set_text (GTK_ENTRY (gnome_file_entry_gtk_entry (prefs->notify_sound_file)), buf ? buf : "");
- g_signal_connect (gnome_file_entry_gtk_entry (prefs->notify_sound_file), "changed",
- G_CALLBACK (settings_changed), prefs);
- g_free (buf);
-
- /* Mail Fonts */
- font = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/display/fonts/monospace", NULL);
- prefs->font_fixed = GNOME_FONT_PICKER (glade_xml_get_widget (gui, "radFontFixed"));
- gnome_font_picker_set_font_name (prefs->font_fixed, font);
- g_signal_connect (prefs->font_fixed, "font-set", G_CALLBACK (font_changed), prefs);
-
- font = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/display/fonts/variable", NULL);
- prefs->font_variable = GNOME_FONT_PICKER (glade_xml_get_widget (gui, "radFontVariable"));
- gnome_font_picker_set_font_name (prefs->font_variable, font);
- g_signal_connect (prefs->font_variable, "font-set", G_CALLBACK (font_changed), prefs);
-
- bool = gconf_client_get_bool (prefs->gconf, "/apps/evolution/mail/display/fonts/use_custom", NULL);
- prefs->font_share = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "radFontUseSame"));
- gtk_toggle_button_set_active (prefs->font_share, !bool);
- g_signal_connect (prefs->font_share, "toggled", G_CALLBACK (font_share_changed), prefs);
- font_share_changed (GTK_WIDGET (prefs->font_share), prefs);
-
- /* HTML Mail tab */
-
- /* Loading Images */
-
- val = gconf_client_get_int (prefs->gconf, "/apps/evolution/mail/display/load_http_images", NULL);
- prefs->images_never = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "radImagesNever"));
- gtk_toggle_button_set_active (prefs->images_never, val == MAIL_CONFIG_HTTP_NEVER);
- g_signal_connect (prefs->images_never, "toggled", G_CALLBACK (settings_changed), prefs);
-
- prefs->images_sometimes = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "radImagesSometimes"));
- gtk_toggle_button_set_active (prefs->images_sometimes, val == MAIL_CONFIG_HTTP_SOMETIMES);
- g_signal_connect (prefs->images_sometimes, "toggled", G_CALLBACK (settings_changed), prefs);
-
- prefs->images_always = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "radImagesAlways"));
- gtk_toggle_button_set_active (prefs->images_always, val == MAIL_CONFIG_HTTP_ALWAYS);
- g_signal_connect (prefs->images_always, "toggled", G_CALLBACK (settings_changed), prefs);
-
- prefs->show_animated = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkShowAnimatedImages"));
- bool = gconf_client_get_bool (prefs->gconf, "/apps/evolution/mail/display/animate_images", NULL);
- gtk_toggle_button_set_active (prefs->show_animated, bool);
- g_signal_connect (prefs->show_animated, "toggled", G_CALLBACK (settings_changed), prefs);
-
- prefs->prompt_unwanted_html = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkPromptWantHTML"));
- bool = gconf_client_get_bool (prefs->gconf, "/apps/evolution/mail/prompts/unwanted_html", NULL);
- gtk_toggle_button_set_active (prefs->prompt_unwanted_html, bool);
- g_signal_connect (prefs->prompt_unwanted_html, "toggled", G_CALLBACK (settings_changed), prefs);
-
- i = 0;
- list = mail_config_get_labels ();
- while (list != NULL && i < 5) {
- MailConfigLabel *label;
- char *widget_name;
-
- label = list->data;
-
- widget_name = g_strdup_printf ("txtLabel%d", i);
- prefs->labels[i].name = GTK_ENTRY (glade_xml_get_widget (gui, widget_name));
- g_free (widget_name);
-
- widget_name = g_strdup_printf ("colorLabel%d", i);
- prefs->labels[i].color = GNOME_COLOR_PICKER (glade_xml_get_widget (gui, widget_name));
- g_free (widget_name);
-
- gtk_entry_set_text (prefs->labels[i].name, label->name);
- g_signal_connect (prefs->labels[i].name, "changed", G_CALLBACK (settings_changed), prefs);
-
- colorpicker_set_color (prefs->labels[i].color, label->colour);
- g_signal_connect (prefs->labels[i].color, "color_set", G_CALLBACK (color_set), prefs);
-
- i++;
- list = list->next;
- }
-
- prefs->restore_labels = GTK_BUTTON (glade_xml_get_widget (gui, "cmdRestoreLabels"));
- g_signal_connect (prefs->restore_labels, "clicked", G_CALLBACK (restore_labels_clicked), prefs);
-
- /* Junk prefs */
- prefs->check_incoming = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkCheckIncomingMail"));
- bool = gconf_client_get_bool (prefs->gconf, "/apps/evolution/mail/junk/check_incoming", NULL);
- gtk_toggle_button_set_active (prefs->check_incoming, bool);
- g_signal_connect (prefs->check_incoming, "toggled", G_CALLBACK (settings_changed), prefs);
-}
-
-
-GtkWidget *
-em_mailer_prefs_new (void)
-{
- EMMailerPrefs *new;
-
- new = (EMMailerPrefs *) g_object_new (em_mailer_prefs_get_type (), NULL);
- em_mailer_prefs_construct (new);
-
- return (GtkWidget *) new;
-}
-
-
-void
-em_mailer_prefs_apply (EMMailerPrefs *prefs)
-{
- GtkWidget *entry, *menu;
- char *string, buf[20];
- const char *cstring;
- GSList *list, *l, *n;
- guint32 rgb;
- int i, val;
-
- /* General tab */
-
- /* Message Display */
- gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/display/mark_seen",
- gtk_toggle_button_get_active (prefs->timeout_toggle), NULL);
-
- val = (int) (gtk_spin_button_get_value (prefs->timeout) * 1000.0);
- gconf_client_set_int (prefs->gconf, "/apps/evolution/mail/display/mark_seen_timeout", val, NULL);
-
- menu = gtk_option_menu_get_menu (prefs->charset);
- if (!(string = e_charset_picker_get_charset (menu)))
- string = g_strdup (e_iconv_locale_charset ());
-
- gconf_client_set_string (prefs->gconf, "/apps/evolution/mail/display/charset", string, NULL);
- g_free (string);
-
- gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/display/mark_citations",
- gtk_toggle_button_get_active (prefs->citation_highlight), NULL);
-
- rgb = colorpicker_get_color (prefs->citation_color);
- sprintf (buf,"#%06x", rgb & 0xffffff);
- gconf_client_set_string (prefs->gconf, "/apps/evolution/mail/display/citation_colour", buf, NULL);
-
- /* Deleting Mail */
- gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/trash/empty_on_exit",
- gtk_toggle_button_get_active (prefs->empty_trash), NULL);
-
- gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/prompts/expunge",
- gtk_toggle_button_get_active (prefs->confirm_expunge), NULL);
-
- /* New Mail Notification */
- if (gtk_toggle_button_get_active (prefs->notify_not))
- val = MAIL_CONFIG_NOTIFY_NOT;
- else if (gtk_toggle_button_get_active (prefs->notify_beep))
- val = MAIL_CONFIG_NOTIFY_BEEP;
- else
- val = MAIL_CONFIG_NOTIFY_PLAY_SOUND;
-
- gconf_client_set_int (prefs->gconf, "/apps/evolution/mail/notify/type", val, NULL);
-
- entry = gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (prefs->notify_sound_file));
- cstring = gtk_entry_get_text (GTK_ENTRY (entry));
- gconf_client_set_string (prefs->gconf, "/apps/evolution/mail/notify/sound", cstring, NULL);
-
- /* HTML Mail */
- if (gtk_toggle_button_get_active (prefs->images_always))
- val = MAIL_CONFIG_HTTP_ALWAYS;
- else if (gtk_toggle_button_get_active (prefs->images_sometimes))
- val = MAIL_CONFIG_HTTP_SOMETIMES;
- else
- val = MAIL_CONFIG_HTTP_NEVER;
-
- gconf_client_set_int (prefs->gconf, "/apps/evolution/mail/display/load_http_images", val, NULL);
-
- gconf_client_set_string (prefs->gconf, "/apps/evolution/mail/display/fonts/variable",
- gnome_font_picker_get_font_name (prefs->font_variable), NULL);
- gconf_client_set_string (prefs->gconf, "/apps/evolution/mail/display/fonts/monospace",
- gnome_font_picker_get_font_name (prefs->font_fixed), NULL);
- gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/display/fonts/use_custom",
- !gtk_toggle_button_get_active (prefs->font_share), NULL);
- gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/display/animate_images",
- gtk_toggle_button_get_active (prefs->show_animated), NULL);
-
- gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/prompts/unwanted_html",
- gtk_toggle_button_get_active (prefs->prompt_unwanted_html), NULL);
-
- /* Labels and Colours */
- list = NULL;
- for (i = 4; i >= 0; i--) {
- cstring = gtk_entry_get_text (prefs->labels[i].name);
- rgb = colorpicker_get_color (prefs->labels[i].color);
- string = g_strdup_printf ("%s:#%06x", cstring, rgb & 0xffffff);
- list = g_slist_prepend (list, string);
- }
-
- gconf_client_set_list (prefs->gconf, "/apps/evolution/mail/labels", GCONF_VALUE_STRING, list, NULL);
-
- l = list;
- while (l != NULL) {
- n = l->next;
- g_free (l->data);
- g_slist_free_1 (l);
- l = n;
- }
-
- /* junk prefs */
- gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/junk/check_incoming",
- gtk_toggle_button_get_active (prefs->check_incoming), NULL);
-
- gconf_client_suggest_sync (prefs->gconf, NULL);
-}
diff --git a/mail/em-mailer-prefs.h b/mail/em-mailer-prefs.h
deleted file mode 100644
index 27de7b3ca9..0000000000
--- a/mail/em-mailer-prefs.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2002-2003 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 __EM_MAILER_PREFS_H__
-#define __EM_MAILER_PREFS_H__
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <gtk/gtk.h>
-#include <glade/glade.h>
-#include <gconf/gconf-client.h>
-#include <libgnomeui/gnome-file-entry.h>
-#include <libgnomeui/gnome-color-picker.h>
-#include <libgnomeui/gnome-font-picker.h>
-
-#include "evolution-config-control.h"
-
-#include <shell/Evolution.h>
-
-#define EM_MAILER_PREFS_TYPE (em_mailer_prefs_get_type ())
-#define EM_MAILER_PREFS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EM_MAILER_PREFS_TYPE, EMMailerPrefs))
-#define EM_MAILER_PREFS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), EM_MAILER_PREFS_TYPE, EMMailerPrefsClass))
-#define EM_IS_MAILER_PREFS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EM_MAILER_PREFS_TYPE))
-#define EM_IS_MAILER_PREFS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EM_MAILER_PREFS_TYPE))
-
-typedef struct _EMMailerPrefs EMMailerPrefs;
-typedef struct _EMMailerPrefsClass EMMailerPrefsClass;
-
-struct _EMMailerPrefs {
- GtkVBox parent_object;
-
- GNOME_Evolution_Shell shell;
-
- EvolutionConfigControl *control;
-
- GladeXML *gui;
- GConfClient *gconf;
-
- /* General tab */
-
- /* Message Display */
- GtkToggleButton *timeout_toggle;
- GtkSpinButton *timeout;
- GtkOptionMenu *charset;
- GtkToggleButton *citation_highlight;
- GnomeColorPicker *citation_color;
-
- /* Deleting Mail */
- GtkToggleButton *empty_trash;
- GtkToggleButton *confirm_expunge;
-
- /* New Mail Notification */
- GtkToggleButton *notify_not;
- GtkToggleButton *notify_beep;
- GtkToggleButton *notify_play_sound;
- GnomeFileEntry *notify_sound_file;
-
- /* HTML Mail tab */
- GnomeFontPicker *font_variable;
- GnomeFontPicker *font_fixed;
- GtkToggleButton *font_share;
-
- /* Loading Images */
- GtkToggleButton *images_always;
- GtkToggleButton *images_sometimes;
- GtkToggleButton *images_never;
-
- GtkToggleButton *show_animated;
- GtkToggleButton *autodetect_links;
- GtkToggleButton *prompt_unwanted_html;
-
- /* Labels and Colours tab */
- struct {
- GtkEntry *name;
- GnomeColorPicker *color;
- } labels[5];
- GtkButton *restore_labels;
-
- /* Junk prefs */
- GtkToggleButton *check_incoming;
-};
-
-struct _EMMailerPrefsClass {
- GtkVBoxClass parent_class;
-
- /* signals */
-
-};
-
-
-GtkType em_mailer_prefs_get_type (void);
-
-GtkWidget *em_mailer_prefs_new (void);
-
-void em_mailer_prefs_apply (EMMailerPrefs *prefs);
-
-/* needed by global config */
-#define EM_MAILER_PREFS_CONTROL_ID "OAFIID:GNOME_Evolution_Mail_MailerPrefs_ConfigControl:" BASE_VERSION
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __EM_MAILER_PREFS_H__ */
diff --git a/mail/em-marshal.list b/mail/em-marshal.list
deleted file mode 100644
index aed944ea0f..0000000000
--- a/mail/em-marshal.list
+++ /dev/null
@@ -1,5 +0,0 @@
-BOOLEAN:BOXED,POINTER,POINTER
-VOID:STRING,STRING
-BOOLEAN:POINTER
-VOID:POINTER,POINTER
-VOID:POINTER
diff --git a/mail/em-message-browser.c b/mail/em-message-browser.c
deleted file mode 100644
index 9a72fec0c5..0000000000
--- a/mail/em-message-browser.c
+++ /dev/null
@@ -1,214 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Michael Zucchi <notzed@ximian.com>
- *
- * Copyright 2003 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 <gtk/gtkscrolledwindow.h>
-#include <gtk/gtkbutton.h>
-
-#include <camel/camel-folder.h>
-
-#include <bonobo/bonobo-main.h>
-#include <bonobo/bonobo-object.h>
-#include <bonobo/bonobo-window.h>
-#include <bonobo/bonobo-generic-factory.h>
-#include <bonobo/bonobo-ui-component.h>
-#include <bonobo/bonobo-ui-util.h>
-
-#include "em-format-html-display.h"
-#include "em-message-browser.h"
-
-#include "evolution-shell-component-utils.h" /* Pixmap stuff, sigh */
-
-struct _EMMessageBrowserPrivate {
- GtkWidget *preview; /* container for message display */
-};
-
-static void emmb_set_message(EMFolderView *emfv, const char *uid);
-static void emmb_activate(EMFolderView *emfv, BonoboUIComponent *uic, int state);
-
-static EMFolderViewClass *emmb_parent;
-
-static void
-emmb_init(GObject *o)
-{
- EMMessageBrowser *emmb = (EMMessageBrowser *)o;
- struct _EMMessageBrowserPrivate *p;
-
- p = emmb->priv = g_malloc0(sizeof(struct _EMMessageBrowserPrivate));
-
- ((EMFolderView *)emmb)->preview_active = TRUE;
-
- g_slist_free(emmb->view.ui_files);
- emmb->view.ui_files = g_slist_append(NULL, EVOLUTION_UIDIR "/evolution-mail-message.xml");
- emmb->view.ui_files = g_slist_append(emmb->view.ui_files, EVOLUTION_UIDIR "/evolution-mail-messagedisplay.xml");
-
- /* currently: just use a scrolledwindow for preview widget */
- p->preview = gtk_scrolled_window_new(NULL, NULL);
- gtk_scrolled_window_set_policy((GtkScrolledWindow *)p->preview, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
- gtk_scrolled_window_set_shadow_type((GtkScrolledWindow *)p->preview, GTK_SHADOW_IN);
- gtk_widget_show(p->preview);
-
- gtk_container_add((GtkContainer *)p->preview, (GtkWidget *)emmb->view.preview->formathtml.html);
- gtk_widget_show((GtkWidget *)emmb->view.preview->formathtml.html);
-
- gtk_widget_show(p->preview);
-
- gtk_box_pack_start_defaults((GtkBox *)emmb, p->preview);
-}
-
-static void
-emmb_finalise(GObject *o)
-{
- EMMessageBrowser *emmb = (EMMessageBrowser *)o;
-
- g_free(emmb->priv);
- ((GObjectClass *)emmb_parent)->finalize(o);
-}
-
-static void
-emmb_destroy(GtkObject *o)
-{
- EMMessageBrowser *emmb = (EMMessageBrowser *)o;
-
- if (emmb->view.list) {
- gtk_widget_destroy((GtkWidget *)emmb->view.list);
- emmb->view.list = NULL;
- }
-
- ((GtkObjectClass *)emmb_parent)->destroy(o);
-}
-
-static void
-emmb_class_init(GObjectClass *klass)
-{
- klass->finalize = emmb_finalise;
- ((GtkObjectClass *)klass)->destroy = emmb_destroy;
- ((EMFolderViewClass *)klass)->set_message = emmb_set_message;
- ((EMFolderViewClass *)klass)->activate = emmb_activate;
-}
-
-GType
-em_message_browser_get_type(void)
-{
- static GType type = 0;
-
- if (type == 0) {
- static const GTypeInfo info = {
- sizeof(EMMessageBrowserClass),
- NULL, NULL,
- (GClassInitFunc)emmb_class_init,
- NULL, NULL,
- sizeof(EMMessageBrowser), 0,
- (GInstanceInitFunc)emmb_init
- };
- emmb_parent = g_type_class_ref(em_folder_view_get_type());
- type = g_type_register_static(em_folder_view_get_type(), "EMMessageBrowser", &info, 0);
- }
-
- return type;
-}
-
-GtkWidget *em_message_browser_new(void)
-{
- EMMessageBrowser *emmb = g_object_new(em_message_browser_get_type(), 0);
-
- return (GtkWidget *)emmb;
-}
-
-GtkWidget *em_message_browser_window_new(void)
-{
- EMMessageBrowser *emmb;
- BonoboUIContainer *uicont;
- BonoboUIComponent *uic;
-
- emmb = (EMMessageBrowser *)em_message_browser_new();
- gtk_widget_show((GtkWidget *)emmb);
- /* FIXME: title set elsewhere? */
- emmb->window = g_object_new(bonobo_window_get_type(), "title", "Ximian Evolution", NULL);
- bonobo_window_set_contents((BonoboWindow *)emmb->window, (GtkWidget *)emmb);
-
- uicont = bonobo_window_get_ui_container((BonoboWindow *)emmb->window);
- uic = bonobo_ui_component_new_default();
- bonobo_ui_component_set_container(uic, BONOBO_OBJREF(uicont), NULL);
-
- em_folder_view_activate((EMFolderView *)emmb, uic, TRUE);
-
- /* FIXME: keep track of size changes for next instantation */
- gtk_window_set_default_size((GtkWindow *)emmb->window, 600, 400);
-
- /* cleanup? */
-
- return (GtkWidget *)emmb;
-}
-
-/* ********************************************************************** */
-
-static void
-emmb_set_message(EMFolderView *emfv, const char *uid)
-{
- EMMessageBrowser *emmb = (EMMessageBrowser *) emfv;
- CamelMessageInfo *info;
-
- emmb_parent->set_message(emfv, uid);
-
- info = camel_folder_get_message_info (emfv->folder, uid);
- gtk_window_set_title ((GtkWindow *) emmb->window, camel_message_info_subject (info));
- camel_folder_free_message_info (emfv->folder, info);
-
- /* Well we don't know if it got displayed (yet) ... but whatever ... */
- camel_folder_set_message_flags(emfv->folder, uid, CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN);
-}
-
-static void
-emmb_close(BonoboUIComponent *uid, void *data, const char *path)
-{
- EMMessageBrowser *emmb = data;
-
- gtk_widget_destroy(gtk_widget_get_toplevel((GtkWidget *)emmb));
-}
-
-static BonoboUIVerb emmb_verbs[] = {
- BONOBO_UI_UNSAFE_VERB ("MessageBrowserClose", emmb_close),
- BONOBO_UI_VERB_END
-};
-
-static void
-emmb_activate(EMFolderView *emfv, BonoboUIComponent *uic, int state)
-{
- if (state) {
- emmb_parent->activate(emfv, uic, state);
-
- bonobo_ui_component_add_verb_list_with_data(uic, emmb_verbs, emfv);
- bonobo_ui_component_set_prop(uic, "/commands/EditPaste", "sensitive", "0", NULL);
- } else {
- const BonoboUIVerb *v;
-
- for (v = &emmb_verbs[0]; v->cname; v++)
- bonobo_ui_component_remove_verb(uic, v->cname);
-
- emmb_parent->activate(emfv, uic, state);
- }
-}
diff --git a/mail/em-message-browser.h b/mail/em-message-browser.h
deleted file mode 100644
index c36a87ee0b..0000000000
--- a/mail/em-message-browser.h
+++ /dev/null
@@ -1,30 +0,0 @@
-
-#ifndef _EM_MESSAGE_BROWSER_H
-#define _EM_MESSAGE_BROWSER_H
-
-#include "em-folder-view.h"
-
-typedef struct _EMMessageBrowser EMMessageBrowser;
-typedef struct _EMMessageBrowserClass EMMessageBrowserClass;
-
-struct _EMMessageBrowser {
- EMFolderView view;
-
- /* container, if setup */
- struct _GtkWidget *window;
-
- struct _EMMessageBrowserPrivate *priv;
-};
-
-struct _EMMessageBrowserClass {
- EMFolderViewClass parent_class;
-};
-
-GType em_message_browser_get_type(void);
-
-GtkWidget *em_message_browser_new(void);
-
-/* also sets up a bonobo container window w/ docks and so on */
-GtkWidget *em_message_browser_window_new(void);
-
-#endif /* ! _EM_MESSAGE_BROWSER_H */
diff --git a/mail/em-migrate.c b/mail/em-migrate.c
deleted file mode 100644
index 99bc315db0..0000000000
--- a/mail/em-migrate.c
+++ /dev/null
@@ -1,706 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2003 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 <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <dirent.h>
-#include <errno.h>
-
-#include <gtk/gtk.h>
-
-#include <camel/camel.h>
-#include <camel/camel-session.h>
-#include <camel/camel-file-utils.h>
-
-#include <libxml/tree.h>
-#include <libxml/parser.h>
-#include <libxml/xmlmemory.h>
-
-#include <gal/util/e-xml-utils.h>
-
-#include "em-migrate.h"
-
-
-#define EM_MIGRATE_SESSION_TYPE (em_migrate_session_get_type ())
-#define EM_MIGRATE_SESSION(obj) (CAMEL_CHECK_CAST((obj), EM_MIGRATE_SESSION_TYPE, EMMigrateSession))
-#define EM_MIGRATE_SESSION_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), EM_MIGRATE_SESSION_TYPE, EMMigrateSessionClass))
-#define EM_MIGRATE_IS_SESSION(o) (CAMEL_CHECK_TYPE((o), EM_MIGRATE_SESSION_TYPE))
-
-typedef struct _EMMigrateSession {
- CamelSession parent_object;
-
- CamelStore *store; /* new folder tree store */
- char *srcdir; /* old folder tree path */
-} EMMigrateSession;
-
-typedef struct _EMMigrateSessionClass {
- CamelSessionClass parent_class;
-
-} EMMigrateSessionClass;
-
-static CamelType em_migrate_session_get_type (void);
-static CamelSession *em_migrate_session_new (const char *path);
-
-static void
-class_init (EMMigrateSessionClass *klass)
-{
- ;
-}
-
-static CamelType
-em_migrate_session_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (
- camel_session_get_type (),
- "EMMigrateSession",
- sizeof (EMMigrateSession),
- sizeof (EMMigrateSessionClass),
- (CamelObjectClassInitFunc) class_init,
- NULL,
- NULL,
- NULL);
- }
-
- return type;
-}
-
-static CamelSession *
-em_migrate_session_new (const char *path)
-{
- CamelSession *session;
-
- session = CAMEL_SESSION (camel_object_new (EM_MIGRATE_SESSION_TYPE));
-
- camel_session_construct (session, path);
-
- return session;
-}
-
-
-static GtkWidget *window;
-static GtkLabel *label;
-static GtkProgressBar *progress;
-
-static void
-em_migrate_setup_progress_dialog (void)
-{
- GtkWidget *vbox, *hbox, *w;
-
- window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
- gtk_window_set_title ((GtkWindow *) window, _("Migrating..."));
- gtk_window_set_modal ((GtkWindow *) window, TRUE);
- gtk_container_set_border_width ((GtkContainer *) window, 6);
-
- vbox = gtk_vbox_new (FALSE, 6);
- gtk_widget_show (vbox);
- gtk_container_add ((GtkContainer *) window, vbox);
-
- w = gtk_label_new (_("The location and hierarchy of the Evolution mailbox "
- "folders has changed since Evolution 1.x.\n\nPlease be "
- "patient while Evolution migrates your folders..."));
- gtk_label_set_line_wrap ((GtkLabel *) w, TRUE);
- gtk_widget_show (w);
- gtk_box_pack_start_defaults ((GtkBox *) vbox, w);
-
- hbox = gtk_hbox_new (FALSE, 6);
- gtk_widget_show (hbox);
- gtk_box_pack_start_defaults ((GtkBox *) vbox, hbox);
-
- label = (GtkLabel *) gtk_label_new ("");
- gtk_widget_show ((GtkWidget *) label);
- gtk_box_pack_start_defaults ((GtkBox *) hbox, (GtkWidget *) label);
-
- progress = (GtkProgressBar *) gtk_progress_bar_new ();
- gtk_widget_show ((GtkWidget *) progress);
- gtk_box_pack_start_defaults ((GtkBox *) hbox, (GtkWidget *) progress);
-
- gtk_widget_show (window);
-}
-
-static void
-em_migrate_close_progress_dialog (void)
-{
- gtk_widget_destroy ((GtkWidget *) window);
-}
-
-static void
-em_migrate_set_folder_name (const char *folder_name)
-{
- char *text;
-
- text = g_strdup_printf (_("Migrating `%s':"), folder_name);
- gtk_label_set_text (label, text);
- g_free (text);
-
- gtk_progress_bar_set_fraction (progress, 0.0);
-
- while (gtk_events_pending ())
- gtk_main_iteration ();
-}
-
-static void
-em_migrate_set_progress (double percent)
-{
- char text[5];
-
- snprintf (text, sizeof (text), "%d%%", (int) (percent * 100.0f));
-
- gtk_progress_bar_set_fraction (progress, percent);
- gtk_progress_bar_set_text (progress, text);
-
- while (gtk_events_pending ())
- gtk_main_iteration ();
-}
-
-
-static gboolean
-is_mail_folder (const char *metadata)
-{
- xmlNodePtr node;
- xmlDocPtr doc;
- char *type;
-
- if (!(doc = xmlParseFile (metadata))) {
- g_warning ("Cannot parse `%s'", metadata);
- return FALSE;
- }
-
- if (!(node = xmlDocGetRootElement (doc))) {
- g_warning ("`%s' corrupt: document contains no root node", metadata);
- xmlFreeDoc (doc);
- return FALSE;
- }
-
- if (!node->name || strcmp (node->name, "efolder") != 0) {
- g_warning ("`%s' corrupt: root node is not 'efolder'", metadata);
- xmlFreeDoc (doc);
- return FALSE;
- }
-
- node = node->children;
- while (node != NULL) {
- if (node->name && !strcmp (node->name, "type")) {
- type = xmlNodeGetContent (node);
- if (!strcmp (type, "mail")) {
- xmlFreeDoc (doc);
- xmlFree (type);
-
- return TRUE;
- }
-
- xmlFree (type);
-
- break;
- }
-
- node = node->next;
- }
-
- xmlFreeDoc (doc);
-
- return FALSE;
-}
-
-static CamelStore *
-get_local_store (CamelSession *session, const char *dirname, const char *metadata, char **namep, int *index, CamelException *ex)
-{
- char *protocol, *name, *buf;
- CamelStore *store;
- struct stat st;
- xmlNodePtr node;
- xmlDocPtr doc;
-
- if (stat (metadata, &st) == -1 || !S_ISREG (st.st_mode)) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, "`%s' is not a regular file", metadata);
- return NULL;
- }
-
- if (!(doc = xmlParseFile (metadata))) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, "cannot parse `%s'", metadata);
- return NULL;
- }
-
- if (!(node = xmlDocGetRootElement (doc)) || strcmp (node->name, "folderinfo") != 0) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, "`%s' is malformed", metadata);
- xmlFreeDoc (doc);
- return NULL;
- }
-
- node = node->children;
- while (node != NULL) {
- if (node->name && !strcmp (node->name, "folder")) {
- protocol = xmlGetProp (node, "type");
- name = xmlGetProp (node, "name");
- buf = xmlGetProp (node, "index");
- if (buf != NULL) {
- *index = atoi (buf);
- xmlFree (buf);
- } else {
- *index = 0;
- }
-
- xmlFreeDoc (doc);
-
- buf = g_strdup_printf ("%s:%s", protocol, dirname);
- xmlFree (protocol);
-
- if ((store = camel_session_get_store (session, buf, ex)))
- *namep = g_strdup (name);
- else
- *namep = NULL;
-
- xmlFree (name);
-
- return store;
- }
-
- node = node->next;
- }
-
- xmlFreeDoc (doc);
-
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, "`%s' does not contain needed info", metadata);
-
- return NULL;
-}
-
-static void
-em_migrate_dir (EMMigrateSession *session, const char *dirname, const char *full_name)
-{
- guint32 flags = CAMEL_STORE_FOLDER_CREATE;
- CamelFolder *old_folder, *new_folder;
- CamelStore *local_store;
- struct dirent *dent;
- CamelException ex;
- char *path, *name;
- GPtrArray *uids;
- struct stat st;
- int index, i;
- DIR *dir;
-
- path = g_strdup_printf ("%s/folder-metadata.xml", dirname);
- if (stat (path, &st) == -1 || !S_ISREG (st.st_mode)) {
- g_free (path);
- return;
- }
-
- if (!is_mail_folder (path)) {
- g_free (path);
-
- goto try_subdirs;
- }
-
- g_free (path);
-
- camel_exception_init (&ex);
-
- /* get old store & folder */
- path = g_strdup_printf ("%s/local-metadata.xml", dirname);
- if (!(local_store = get_local_store ((CamelSession *) session, dirname, path, &name, &index, &ex))) {
- g_warning ("error opening old store for `%s': %s", full_name, ex.desc);
- camel_exception_clear (&ex);
- g_free (path);
-
- /* try subfolders anyway? */
- goto try_subdirs;
- }
-
- g_free (path);
-
- if (!(old_folder = camel_store_get_folder (local_store, name, 0, &ex))) {
- g_warning ("error opening old folder `%s': %s", full_name, ex.desc);
- camel_object_unref (local_store);
- camel_exception_clear (&ex);
- g_free (name);
-
- /* try subfolders anyway? */
- goto try_subdirs;
- }
-
- g_free (name);
-
- flags |= (index ? CAMEL_STORE_FOLDER_BODY_INDEX : 0);
- if (!(new_folder = camel_store_get_folder (session->store, full_name, flags, &ex))) {
- g_warning ("error creating new mbox folder `%s': %s", full_name, ex.desc);
- camel_object_unref (local_store);
- camel_object_unref (old_folder);
- camel_exception_clear (&ex);
-
- /* try subfolders anyway? */
- goto try_subdirs;
- }
-
- em_migrate_set_folder_name (full_name);
-
- uids = camel_folder_get_uids (old_folder);
- for (i = 0; i < uids->len; i++) {
- CamelMimeMessage *message;
- CamelMessageInfo *info;
-
- if (!(info = camel_folder_get_message_info (old_folder, uids->pdata[i])))
- continue;
-
- if (!(message = camel_folder_get_message (old_folder, uids->pdata[i], &ex))) {
- camel_folder_free_message_info (old_folder, info);
- break;
- }
-
- camel_folder_append_message (new_folder, message, info, NULL, &ex);
- camel_folder_free_message_info (old_folder, info);
- camel_object_unref (message);
-
- if (camel_exception_is_set (&ex))
- break;
-
- em_migrate_set_progress (((double) i + 1) / ((double) uids->len));
- }
- camel_folder_free_uids (old_folder, uids);
-
- if (camel_exception_is_set (&ex)) {
- g_warning ("error migrating folder `%s': %s", full_name, ex.desc);
- camel_object_unref (local_store);
- camel_object_unref (old_folder);
- camel_object_unref (new_folder);
- camel_exception_clear (&ex);
-
- /* try subfolders anyway? */
- goto try_subdirs;
- }
-
- /*camel_object_unref (local_store);*/
- camel_object_unref (old_folder);
- camel_object_unref (new_folder);
-
- try_subdirs:
-
- path = g_strdup_printf ("%s/subfolders", dirname);
- if (stat (path, &st) == -1 || !S_ISDIR (st.st_mode)) {
- g_free (path);
- return;
- }
-
- if (!(dir = opendir (path))) {
- g_warning ("cannot open `%s': %s", path, strerror (errno));
- g_free (path);
- return;
- }
-
- while ((dent = readdir (dir))) {
- char *full_path;
-
- if (dent->d_name[0] == '.')
- continue;
-
- full_path = g_strdup_printf ("%s/%s", path, dent->d_name);
- if (stat (full_path, &st) == -1 || !S_ISDIR (st.st_mode)) {
- g_free (full_path);
- continue;
- }
-
- name = g_strdup_printf ("%s/%s", full_name, dent->d_name);
- em_migrate_dir (session, full_path, name);
- g_free (full_path);
- g_free (name);
- }
-
- closedir (dir);
-
- g_free (path);
-}
-
-static void
-em_migrate_local_folders (EMMigrateSession *session)
-{
- struct dirent *dent;
- struct stat st;
- DIR *dir;
-
- if (!(dir = opendir (session->srcdir))) {
- g_warning ("cannot open `%s': %s", session->srcdir, strerror (errno));
- return;
- }
-
- em_migrate_setup_progress_dialog ();
-
- while ((dent = readdir (dir))) {
- char *full_path;
-
- if (dent->d_name[0] == '.')
- continue;
-
- full_path = g_strdup_printf ("%s/%s", session->srcdir, dent->d_name);
- if (stat (full_path, &st) == -1 || !S_ISDIR (st.st_mode)) {
- g_free (full_path);
- continue;
- }
-
- em_migrate_dir (session, full_path, dent->d_name);
- g_free (full_path);
- }
-
- closedir (dir);
-
- em_migrate_close_progress_dialog ();
-}
-
-
-static xmlNodePtr
-xml_find_node (xmlNodePtr parent, const char *name)
-{
- xmlNodePtr node;
-
- node = parent->children;
- while (node != NULL) {
- if (node->name && !strcmp (node->name, name))
- return node;
-
- node = node->next;
- }
-
- return NULL;
-}
-
-static char *
-em_migrate_uri (const char *uri)
-{
- char *path, *prefix, *p;
- CamelURL *url;
-
- if (!strncmp (uri, "file:", 5)) {
- url = camel_url_new (uri, NULL);
- camel_url_set_protocol (url, "email");
- camel_url_set_user (url, "local");
- camel_url_set_host (url, "local");
-
- prefix = g_build_filename (g_get_home_dir (), "evolution", "local", NULL);
- g_assert (strncmp (url->path, prefix, strlen (prefix)) == 0);
- path = g_strdup (url->path + strlen (prefix));
- g_free (prefix);
-
- /* modify the path in-place */
- p = path + strlen (path) - 12;
- while (p > path) {
- if (!strncmp (p, "/subfolders/", 12))
- memmove (p, p + 11, strlen (p + 11) + 1);
-
- p--;
- }
-
- camel_url_set_path (url, path);
- g_free (path);
-
- path = camel_url_to_string (url, 0);
- camel_url_free (url);
-
- return path;
- } else {
- return em_uri_from_camel (uri);
- }
-}
-
-static int
-em_migrate_filter_file (const char *evolution_dir, const char *filename, CamelException *ex)
-{
- char *path, *uri, *new;
- xmlNodePtr node;
- xmlDocPtr doc;
- int retval;
-
- path = g_strdup_printf ("%s/evolution/%s", g_get_home_dir (), filename);
-
- if (!(doc = xmlParseFile (path))) {
- /* can't parse - this means nothing to upgrade */
- g_free (path);
- return 0;
- }
-
- g_free (path);
-
- if (!(node = xmlDocGetRootElement (doc))) {
- /* document contains no root node - nothing to upgrade */
- xmlFreeDoc (doc);
- return 0;
- }
-
- if (!node->name || strcmp (node->name, "filteroptions") != 0) {
- /* root node is not <filteroptions>, nothing to upgrade */
- xmlFreeDoc (doc);
- return 0;
- }
-
- if (!(node = xml_find_node (node, "ruleset"))) {
- /* no ruleset node, nothing to upgrade */
- xmlFreeDoc (doc);
- return 0;
- }
-
- node = node->children;
- while (node != NULL) {
- if (node->name && !strcmp (node->name, "rule")) {
- xmlNodePtr actionset, part, val, n;
-
- if ((actionset = xml_find_node (node, "actionset"))) {
- /* filters.xml */
- part = actionset->children;
- while (part != NULL) {
- if (part->name && !strcmp (part->name, "part")) {
- val = part->children;
- while (val != NULL) {
- if (val->name && !strcmp (val->name, "value")) {
- char *type;
-
- type = xmlGetProp (val, "type");
- if (type && !strcmp (type, "folder")) {
- if ((n = xml_find_node (val, "folder"))) {
- uri = xmlGetProp (n, "uri");
- new = em_migrate_uri (uri);
- xmlFree (uri);
-
- xmlSetProp (n, "uri", new);
- g_free (new);
- }
- }
-
- xmlFree (type);
- }
-
- val = val->next;
- }
- }
-
- part = part->next;
- }
- } else if ((actionset = xml_find_node (node, "sources"))) {
- /* vfolders.xml */
- n = actionset->children;
- while (n != NULL) {
- if (n->name && !strcmp (n->name, "folder")) {
- uri = xmlGetProp (n, "uri");
- new = em_uri_from_camel (uri);
- xmlFree (uri);
-
- xmlSetProp (n, "uri", new);
- g_free (new);
- }
-
- n = n->next;
- }
- }
- }
-
- node = node->next;
- }
-
- path = g_strdup_printf ("%s/mail/%s", evolution_dir, filename);
- if ((retval = e_xml_save_file (path, doc)) == -1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to migrate `%s': %s"),
- filename, g_strerror (errno));
- }
-
- g_free (path);
-
- xmlFreeDoc (doc);
-
- return retval;
-}
-
-
-int
-em_migrate (MailComponent *component, CamelException *ex)
-{
- const char *evolution_dir;
- EMMigrateSession *session;
- CamelException lex;
- struct stat st;
- char *path;
-
- evolution_dir = mail_component_peek_base_directory (component);
- path = g_strdup_printf ("%s/mail", evolution_dir);
- if (stat (path, &st) == -1) {
- if (errno != ENOENT || camel_mkdir (path, 0777) == -1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to create directory `%s': %s"),
- path, g_strerror (errno));
- g_free (path);
- return -1;
- }
- }
-
- camel_init (path, TRUE);
- session = (EMMigrateSession *) em_migrate_session_new (path);
- g_free (path);
-
- session->srcdir = g_strdup_printf ("%s/evolution/local", g_get_home_dir ());
-
- path = g_strdup_printf ("mbox:%s/.evolution/mail/local", g_get_home_dir ());
- if (stat (path + 5, &st) == -1) {
- if (errno != ENOENT || camel_mkdir (path + 5, 0777) == -1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to create directory `%s': %s"),
- path + 5, g_strerror (errno));
- g_free (session->srcdir);
- camel_object_unref (session);
- g_free (path);
- return -1;
- }
- }
-
- camel_exception_init (&lex);
- if (!(session->store = camel_session_get_store ((CamelSession *) session, path, &lex))) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to open store for `%s': %s"),
- path, lex.desc);
- g_free (session->srcdir);
- camel_object_unref (session);
- camel_exception_clear (&lex);
- g_free (path);
- return -1;
- }
- g_free (path);
-
- em_migrate_local_folders (session);
-
- camel_object_unref (session->store);
- g_free (session->srcdir);
-
- camel_object_unref (session);
-
- if (em_migrate_filter_file (evolution_dir, "filters.xml", ex) == -1)
- return -1;
-
- if (em_migrate_filter_file (evolution_dir, "vfolders.xml", ex) == -1)
- return -1;
-
- return 0;
-}
diff --git a/mail/em-migrate.h b/mail/em-migrate.h
deleted file mode 100644
index 2ea2b8420e..0000000000
--- a/mail/em-migrate.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2003 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 __EM_MIGRATE_H__
-#define __EM_MIGRATE_H__
-
-#include "mail-component.h"
-
-#include <camel/camel-exception.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-int em_migrate (MailComponent *component, CamelException *ex);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __EM_MIGRATE_H__ */
diff --git a/mail/em-popup.c b/mail/em-popup.c
deleted file mode 100644
index 8312be3770..0000000000
--- a/mail/em-popup.c
+++ /dev/null
@@ -1,839 +0,0 @@
-
-#include <string.h>
-#include <stdlib.h>
-
-#include <gtk/gtkmenu.h>
-#include <gtk/gtkmenuitem.h>
-#include <gtk/gtkimagemenuitem.h>
-#include <gtk/gtkcheckmenuitem.h>
-#include <gtk/gtkradiomenuitem.h>
-#include <gtk/gtkseparatormenuitem.h>
-#include <gtk/gtklabel.h>
-#include <gtk/gtkimage.h>
-
-#include <libgnome/gnome-url.h>
-
-#include <glib.h>
-
-#include "em-popup.h"
-#include "e-util/e-msgport.h"
-#include "em-utils.h"
-
-#include <camel/camel-folder.h>
-#include <camel/camel-mime-message.h>
-#include <camel/camel-string-utils.h>
-#include <camel/camel-url.h>
-
-static void emp_standard_menu_factory(EMPopup *emp, EMPopupTarget *target, void *data);
-
-struct _EMPopupFactory {
- struct _EMPopupFactory *next, *prev;
-
- char *menuid;
- EMPopupFactoryFunc factory;
- void *factory_data;
-};
-
-struct _menu_node {
- struct _menu_node *next, *prev;
-
- GSList *menu;
- GDestroyNotify freefunc;
-};
-
-struct _EMPopupPrivate {
- EDList menus;
-};
-
-static EDList emp_factories = E_DLIST_INITIALISER(emp_factories);
-
-static GObjectClass *emp_parent;
-
-static void
-emp_init(GObject *o)
-{
- EMPopup *emp = (EMPopup *)o;
- struct _EMPopupPrivate *p;
-
- p = emp->priv = g_malloc0(sizeof(struct _EMPopupPrivate));
-
- e_dlist_init(&p->menus);
-}
-
-static void
-emp_finalise(GObject *o)
-{
- EMPopup *emp = (EMPopup *)o;
- struct _EMPopupPrivate *p = emp->priv;
- struct _menu_node *mnode, *nnode;
-
- g_free(emp->menuid);
-
- mnode = (struct _menu_node *)p->menus.head;
- nnode = mnode->next;
- while (nnode) {
- if (mnode->freefunc)
- mnode->freefunc(mnode->menu);
-
- g_free(mnode);
- mnode = nnode;
- nnode = nnode->next;
- }
-
- g_free(p);
-
- ((GObjectClass *)emp_parent)->finalize(o);
-}
-
-static void
-emp_class_init(GObjectClass *klass)
-{
- klass->finalize = emp_finalise;
-}
-
-GType
-em_popup_get_type(void)
-{
- static GType type = 0;
-
- if (type == 0) {
- static const GTypeInfo info = {
- sizeof(EMPopupClass),
- NULL, NULL,
- (GClassInitFunc)emp_class_init,
- NULL, NULL,
- sizeof(EMPopup), 0,
- (GInstanceInitFunc)emp_init
- };
- emp_parent = g_type_class_ref(G_TYPE_OBJECT);
- type = g_type_register_static(G_TYPE_OBJECT, "EMPopup", &info, 0);
-
- /* FIXME: this should probably sit somewhere in global setup */
- em_popup_static_add_factory(NULL, (EMPopupFactoryFunc)emp_standard_menu_factory, NULL);
- }
-
- return type;
-}
-
-EMPopup *em_popup_new(const char *menuid)
-{
- EMPopup *emp = g_object_new(em_popup_get_type(), 0);
-
- emp->menuid = g_strdup(menuid);
-
- return emp;
-}
-
-/**
- * em_popup_add_items:
- * @emp:
- * @items:
- * @freefunc:
- *
- * Add new EMPopupItems to the menu's. Any with the same path
- * will override previously defined menu items, at menu building
- * time.
- **/
-void
-em_popup_add_items(EMPopup *emp, GSList *items, GDestroyNotify freefunc)
-{
- struct _menu_node *node;
-
- node = g_malloc(sizeof(*node));
- node->menu = items;
- node->freefunc = freefunc;
- e_dlist_addtail(&emp->priv->menus, (EDListNode *)node);
-}
-
-/**
- * em_popup_add_static_items:
- * @emp:
- * @target: Target of this menu.
- *
- * Will load up any matching menu items from an installed
- * popup factory. If the menuid of @emp is NULL, then this
- * has no effect.
- *
- **/
-void
-em_popup_add_static_items(EMPopup *emp, EMPopupTarget *target)
-{
- struct _EMPopupFactory *f;
-
- if (emp->menuid == NULL || target == NULL)
- return;
-
- /* setup the menu itself */
- f = (struct _EMPopupFactory *)emp_factories.head;
- while (f->next) {
- if (f->menuid == NULL
- || !strcmp(f->menuid, emp->menuid)) {
- f->factory(emp, target, f->factory_data);
- }
- f = f->next;
- }
-}
-
-static int
-emp_cmp(const void *ap, const void *bp)
-{
- struct _EMPopupItem *a = *((void **)ap);
- struct _EMPopupItem *b = *((void **)bp);
-
- return strcmp(a->path, b->path);
-}
-
-/**
- * em_popup_create:
- * @menuitems:
- * @hide_mask: used to hide menu items, not sure of it's utility,
- * since you could just 'not add them' in the first place. Saves
- * copying logic anyway.
- * @disable_mask: used to disable menu items.
- *
- * TEMPORARY code to create a menu from a list of items.
- *
- * The menu items are merged based on their path element, and
- * built into a menu tree.
- *
- * Return value:
- **/
-GtkMenu *
-em_popup_create_menu(EMPopup *emp, guint32 hide_mask, guint32 disable_mask)
-{
- struct _EMPopupPrivate *p = emp->priv;
- struct _menu_node *mnode, *nnode;
- GPtrArray *items = g_ptr_array_new();
- GSList *l;
- GString *ppath = g_string_new("");
- GtkMenu *topmenu;
- GHashTable *menu_hash = g_hash_table_new(g_str_hash, g_str_equal),
- *group_hash = g_hash_table_new(g_str_hash, g_str_equal);
- /*char *domain = NULL;*/
- int i;
-
- /* FIXME: need to override old ones with new names */
- mnode = (struct _menu_node *)p->menus.head;
- nnode = mnode->next;
- while (nnode) {
- for (l=mnode->menu; l; l = l->next)
- g_ptr_array_add(items, l->data);
- mnode = nnode;
- nnode = nnode->next;
- }
-
- qsort(items->pdata, items->len, sizeof(items->pdata[0]), emp_cmp);
-
- topmenu = (GtkMenu *)gtk_menu_new();
- for (i=0;i<items->len;i++) {
- GtkWidget *label;
- struct _EMPopupItem *item = items->pdata[i];
- GtkMenu *thismenu;
- GtkMenuItem *menuitem;
- char *tmp;
-
- /* for bar's, the mask is exclusive or */
- if (item->mask) {
- if ((item->type & EM_POPUP_TYPE_MASK) == EM_POPUP_BAR) {
- if ((item->mask & hide_mask) == item->mask)
- continue;
- } else if (item->mask & hide_mask)
- continue;
- }
-
- g_string_truncate(ppath, 0);
- tmp = strrchr(item->path, '/');
- if (tmp) {
- g_string_append_len(ppath, item->path, tmp-item->path);
- thismenu = g_hash_table_lookup(menu_hash, ppath->str);
- g_assert(thismenu != NULL);
- } else {
- thismenu = topmenu;
- }
-
- switch (item->type & EM_POPUP_TYPE_MASK) {
- case EM_POPUP_ITEM:
- if (item->image) {
- char *path;
- GtkWidget *image;
-
- path = g_build_filename(EVOLUTION_IMAGES, (char *)item->image, NULL);
- image = gtk_image_new_from_file(path);
- g_free(path);
-
- gtk_widget_show(image);
- menuitem = (GtkMenuItem *)gtk_image_menu_item_new();
- gtk_image_menu_item_set_image((GtkImageMenuItem *)menuitem, image);
- } else {
- menuitem = (GtkMenuItem *)gtk_menu_item_new();
- }
- break;
- case EM_POPUP_TOGGLE:
- menuitem = (GtkMenuItem *)gtk_check_menu_item_new();
- gtk_check_menu_item_set_active((GtkCheckMenuItem *)menuitem, item->type & EM_POPUP_ACTIVE);
- break;
- case EM_POPUP_RADIO:
- menuitem = (GtkMenuItem *)gtk_radio_menu_item_new(g_hash_table_lookup(group_hash, ppath->str));
- g_hash_table_insert(group_hash, ppath->str, gtk_radio_menu_item_get_group((GtkRadioMenuItem *)menuitem));
- gtk_check_menu_item_set_active((GtkCheckMenuItem *)menuitem, item->type & EM_POPUP_ACTIVE);
- break;
- case EM_POPUP_IMAGE:
- menuitem = (GtkMenuItem *)gtk_image_menu_item_new();
- gtk_image_menu_item_set_image((GtkImageMenuItem *)menuitem, item->image);
- break;
- case EM_POPUP_SUBMENU: {
- GtkMenu *submenu = (GtkMenu *)gtk_menu_new();
-
- g_hash_table_insert(menu_hash, item->path, submenu);
- menuitem = (GtkMenuItem *)gtk_menu_item_new();
- gtk_menu_item_set_submenu(menuitem, (GtkWidget *)submenu);
- break; }
- case EM_POPUP_BAR:
- /* TODO: double-bar, end-bar stuff? */
- menuitem = (GtkMenuItem *)gtk_separator_menu_item_new();
- break;
- default:
- continue;
- }
-
- if (item->label) {
- label = gtk_label_new_with_mnemonic(item->label);
- gtk_misc_set_alignment((GtkMisc *)label, 0.0, 0.5);
- gtk_widget_show(label);
- gtk_container_add((GtkContainer *)menuitem, label);
- }
-
- if (item->activate)
- g_signal_connect(menuitem, "activate", item->activate, item->activate_data);
-
- gtk_menu_shell_append((GtkMenuShell *)thismenu, (GtkWidget *)menuitem);
-
- if (item->mask & disable_mask)
- gtk_widget_set_sensitive((GtkWidget *)menuitem, FALSE);
-
- gtk_widget_show((GtkWidget *)menuitem);
- }
-
- g_string_free(ppath, TRUE);
- g_ptr_array_free(items, TRUE);
- g_hash_table_destroy(menu_hash);
- g_hash_table_destroy(group_hash);
-
- return topmenu;
-}
-
-static void
-emp_popup_done(GtkWidget *w, EMPopup *emp)
-{
- gtk_widget_destroy(w);
- g_object_unref(emp);
-}
-
-/**
- * em_popup_create_menu_once:
- * @emp: EMPopup, once the menu is shown, this cannot be
- * considered a valid pointer.
- * @target: If set, the target of the selection. Static menu
- * items will be added. The target will be freed once complete.
- * @hide_mask:
- * @disable_mask:
- *
- * Like popup_create_menu, but automatically sets up the menu
- * so that it is destroyed once a selection takes place, and
- * the EMPopup is unreffed.
- *
- * Return value: A menu, to popup.
- **/
-GtkMenu *
-em_popup_create_menu_once(EMPopup *emp, EMPopupTarget *target, guint32 hide_mask, guint32 disable_mask)
-{
- GtkMenu *menu;
-
- if (target)
- em_popup_add_static_items(emp, target);
-
- menu = em_popup_create_menu(emp, hide_mask, disable_mask);
-
- if (target)
- g_signal_connect_swapped(menu, "selection_done", G_CALLBACK(em_popup_target_free), target);
- g_signal_connect(menu, "selection_done", G_CALLBACK(emp_popup_done), emp);
-
- return menu;
-}
-
-/* ********************************************************************** */
-
-/**
- * em_popup_static_add_factory:
- * @menuid:
- * @func:
- * @data:
- *
- * Add a popup factory which will be called to add_items() any
- * extra menu's if wants to do the current PopupTarget.
- *
- * TODO: Make the menuid a pattern?
- *
- * Return value: A handle to the factory.
- **/
-EMPopupFactory *
-em_popup_static_add_factory(const char *menuid, EMPopupFactoryFunc func, void *data)
-{
- struct _EMPopupFactory *f = g_malloc0(sizeof(*f));
-
- f->menuid = g_strdup(menuid);
- f->factory = func;
- f->factory_data = data;
- e_dlist_addtail(&emp_factories, (EDListNode *)f);
-
- return f;
-}
-
-/**
- * em_popup_static_remove_factory:
- * @f:
- *
- * Remove a popup factory.
- **/
-void
-em_popup_static_remove_factory(EMPopupFactory *f)
-{
- e_dlist_remove((EDListNode *)f);
- g_free(f->menuid);
- g_free(f);
-}
-
-/**
- * em_popup_target_new_select:
- * @folder: The selection will ref this for the life of it.
- * @folder_uri:
- * @uids: The selection will free this when done with it.
- *
- * Create a new selection popup target.
- *
- * Return value:
- **/
-EMPopupTarget *
-em_popup_target_new_select(struct _CamelFolder *folder, const char *folder_uri, GPtrArray *uids)
-{
- EMPopupTarget *t = g_malloc0(sizeof(*t));
- guint32 mask = ~0;
- int i;
- const char *tmp;
-
- t->type = EM_POPUP_TARGET_SELECT;
- t->data.select.uids = uids;
- t->data.select.folder = folder;
- camel_object_ref(folder);
- t->data.select.folder_uri = g_strdup(folder_uri);
-
- if (em_utils_folder_is_sent(folder, folder_uri))
- mask &= ~EM_POPUP_SELECT_RESEND;
-
- if (!(em_utils_folder_is_drafts(folder, folder_uri)
- || em_utils_folder_is_outbox(folder, folder_uri)))
- mask &= ~EM_POPUP_SELECT_ADD_SENDER;
-
- if (uids->len == 1)
- mask &= ~EM_POPUP_SELECT_ONE;
-
- if (uids->len >= 1)
- mask &= ~EM_POPUP_SELECT_MANY;
-
- for (i = 0; i < uids->len; i++) {
- CamelMessageInfo *info = camel_folder_get_message_info(folder, uids->pdata[i]);
-
- if (info == NULL)
- continue;
-
- if (info->flags & CAMEL_MESSAGE_SEEN)
- mask &= ~EM_POPUP_SELECT_MARK_UNREAD;
- else
- mask &= ~EM_POPUP_SELECT_MARK_READ;
-
- if (info->flags & CAMEL_MESSAGE_DELETED)
- mask &= ~EM_POPUP_SELECT_UNDELETE;
- else
- mask &= ~EM_POPUP_SELECT_DELETE;
-
- if (info->flags & CAMEL_MESSAGE_FLAGGED)
- mask &= ~EM_POPUP_SELECT_MARK_UNIMPORTANT;
- else
- mask &= ~EM_POPUP_SELECT_MARK_IMPORTANT;
-
- if (info->flags & CAMEL_MESSAGE_JUNK)
- mask &= ~EM_POPUP_SELECT_MARK_NOJUNK;
- else
- mask &= ~EM_POPUP_SELECT_MARK_JUNK;
-
- tmp = camel_tag_get (&info->user_tags, "follow-up");
- if (tmp && *tmp) {
- mask &= ~EM_POPUP_SELECT_FLAG_CLEAR;
- tmp = camel_tag_get(&info->user_tags, "completed-on");
- if (tmp == NULL || *tmp == 0)
- mask &= ~EM_POPUP_SELECT_FLAG_COMPLETED;
- } else
- mask &= ~EM_POPUP_SELECT_FLAG_FOLLOWUP;
-
- if (i == 0 && uids->len == 1
- && (tmp = camel_message_info_mlist(info))
- && tmp[0] != 0)
- mask &= ~EM_POPUP_SELECT_MAILING_LIST;
-
- camel_folder_free_message_info(folder, info);
- }
-
- t->mask = mask;
-
- return t;
-}
-
-EMPopupTarget *
-em_popup_target_new_uri(const char *uri)
-{
- EMPopupTarget *t = g_malloc0(sizeof(*t));
- guint32 mask = ~0;
-
- t->type = EM_POPUP_TARGET_URI;
- t->data.uri = g_strdup(uri);
-
- if (g_ascii_strncasecmp(uri, "http:", 5) == 0
- || g_ascii_strncasecmp(uri, "https:", 6) == 0)
- mask &= ~EM_POPUP_URI_HTTP;
- if (g_ascii_strncasecmp(uri, "mailto:", 7) == 0)
- mask &= ~EM_POPUP_URI_MAILTO;
- else
- mask &= ~EM_POPUP_URI_NOT_MAILTO;
-
- t->mask = mask;
-
- return t;
-}
-
-EMPopupTarget *
-em_popup_target_new_part(struct _CamelMimePart *part, const char *mime_type)
-{
- EMPopupTarget *t = g_malloc0(sizeof(*t));
- guint32 mask = ~0;
-
- t->type = EM_POPUP_TARGET_PART;
- t->data.part.part = part;
- camel_object_ref(part);
- if (mime_type)
- t->data.part.mime_type = g_strdup(mime_type);
- else
- t->data.part.mime_type = camel_data_wrapper_get_mime_type((CamelDataWrapper *)part);
-
- camel_strdown(t->data.part.mime_type);
-
- if (CAMEL_IS_MIME_MESSAGE(camel_medium_get_content_object((CamelMedium *)part)))
- mask &= ~EM_POPUP_PART_MESSAGE;
-
- if (strncmp(t->data.part.mime_type, "image/", 6) == 0)
- mask &= ~EM_POPUP_PART_IMAGE;
-
- t->mask = mask;
-
- return t;
-}
-
-void
-em_popup_target_free(EMPopupTarget *t)
-{
- switch (t->type) {
- case EM_POPUP_TARGET_SELECT:
- camel_object_unref(t->data.select.folder);
- g_free(t->data.select.folder_uri);
- if (t->data.select.uids)
- em_utils_uids_free(t->data.select.uids);
- break;
- case EM_POPUP_TARGET_URI:
- g_free(t->data.uri);
- break;
- case EM_POPUP_TARGET_PART:
- camel_object_unref(t->data.part.part);
- g_free(t->data.part.mime_type);
- break;
- }
-
- g_free(t);
-}
-
-/* ********************************************************************** */
-
-#if 0
-/* TODO: flesh these out where possible */
-static void
-emp_popup_open(GtkWidget *w, EMFolderView *emfv)
-{
- em_folder_view_open_selected(emfv);
-}
-
-static void
-emp_popup_resend(GtkWidget *w, EMPopupTarget *t)
-{
- if (!em_utils_check_user_can_send_mail(t->widget))
- return;
-
- em_utils_edit_messages(t->widget, t->data.select.folder, em_utils_uids_copy(t->data.select.uids));
-}
-
-static void
-emp_popup_saveas(GtkWidget *w, EMPopupTarget *t)
-{
- em_utils_save_messages(t->widget, t->data.select.folder, em_utils_uids_copy(t->data.select.uids));
-}
-
-static EMPopupItem emp_standard_select_popups[] = {
- /*{ EM_POPUP_ITEM, "00.select.00", N_("_Open"), G_CALLBACK(emp_popup_open), NULL, NULL, 0 },*/
- { EM_POPUP_ITEM, "00.select.01", N_("_Edit as New Message..."), G_CALLBACK(emp_popup_resend), NULL, NULL, EM_POPUP_SELECT_RESEND },
- { EM_POPUP_ITEM, "00.select.02", N_("_Save As..."), G_CALLBACK(emp_popup_saveas), NULL, "save-as-16.png", 0 },
-};
-#endif
-
-/* ********************************************************************** */
-
-static void
-emp_part_popup_saveas(GtkWidget *w, EMPopupTarget *t)
-{
- em_utils_save_part(w, _("Save As..."), t->data.part.part);
-}
-
-static void
-emp_part_popup_set_background(GtkWidget *w, EMPopupTarget *t)
-{
- /* set as background ... */
- printf("UNIMPLEMENTED: set background, but it would be cool, no?\n");
-}
-
-static void
-emp_part_popup_reply_sender (GtkWidget *w, EMPopupTarget *t)
-{
- CamelMimeMessage *message;
-
- message = (CamelMimeMessage *) camel_medium_get_content_object ((CamelMedium *) t->data.part.part);
- em_utils_reply_to_message (message, REPLY_MODE_SENDER);
-}
-
-static void
-emp_part_popup_reply_list (GtkWidget *w, EMPopupTarget *t)
-{
- CamelMimeMessage *message;
-
- message = (CamelMimeMessage *) camel_medium_get_content_object ((CamelMedium *) t->data.part.part);
- em_utils_reply_to_message (message, REPLY_MODE_LIST);
-}
-
-static void
-emp_part_popup_reply_all (GtkWidget *w, EMPopupTarget *t)
-{
- CamelMimeMessage *message;
-
- message = (CamelMimeMessage *) camel_medium_get_content_object ((CamelMedium *) t->data.part.part);
- em_utils_reply_to_message (message, REPLY_MODE_ALL);
-}
-
-static void
-emp_part_popup_forward (GtkWidget *w, EMPopupTarget *t)
-{
- CamelMimeMessage *message;
-
- message = (CamelMimeMessage *) camel_medium_get_content_object ((CamelMedium *) t->data.part.part);
- em_utils_forward_message (message);
-}
-
-static EMPopupItem emp_standard_object_popups[] = {
- { EM_POPUP_ITEM, "00.part.00", N_("_Save As..."), G_CALLBACK(emp_part_popup_saveas), NULL, "save-as-16.png", 0 },
- { EM_POPUP_ITEM, "00.part.10", N_("Set as _Background"), G_CALLBACK(emp_part_popup_set_background), NULL, NULL, EM_POPUP_PART_IMAGE },
- { EM_POPUP_BAR, "10.part", NULL, NULL, NULL, NULL, EM_POPUP_PART_MESSAGE },
- { EM_POPUP_ITEM, "10.part.00", N_("_Reply to sender"), G_CALLBACK(emp_part_popup_reply_sender), NULL, "reply.xpm" , EM_POPUP_PART_MESSAGE },
- { EM_POPUP_ITEM, "10.part.01", N_("Reply to _List"), G_CALLBACK(emp_part_popup_reply_list), NULL, NULL, EM_POPUP_PART_MESSAGE},
- { EM_POPUP_ITEM, "10.part.03", N_("Reply to _All"), G_CALLBACK(emp_part_popup_reply_all), NULL, "reply_to_all.xpm", EM_POPUP_PART_MESSAGE},
- { EM_POPUP_BAR, "20.part", NULL, NULL, NULL, NULL, EM_POPUP_PART_MESSAGE },
- { EM_POPUP_ITEM, "20.part.00", N_("_Forward"), G_CALLBACK(emp_part_popup_forward), NULL, "forward.xpm", EM_POPUP_PART_MESSAGE },
-
-};
-
-static const EMPopupItem emp_standard_part_apps_bar = { EM_POPUP_BAR, "99.object" };
-
-/* ********************************************************************** */
-
-static void
-emp_uri_popup_link_open(GtkWidget *w, EMPopupTarget *t)
-{
- GError *err = NULL;
-
- gnome_url_show(t->data.uri, &err);
- if (err) {
- g_warning("gnome_url_show: %s", err->message);
- g_error_free(err);
- }
-}
-
-static void
-emp_uri_popup_address_send (GtkWidget *w, EMPopupTarget *t)
-{
- em_utils_compose_new_message_with_mailto (t->data.uri);
-}
-
-static void
-emp_uri_popup_address_add(GtkWidget *w, EMPopupTarget *t)
-{
- CamelURL *url;
-
- url = camel_url_new(t->data.uri, NULL);
- if (url == NULL) {
- g_warning("cannot parse url '%s'", t->data.uri);
- return;
- }
-
- if (url->path && url->path[0])
- em_utils_add_address(w, url->path);
-
- camel_url_free(url);
-}
-
-static EMPopupItem emp_standard_uri_popups[] = {
- { EM_POPUP_ITEM, "00.uri.00", N_("_Open Link in Browser"), G_CALLBACK(emp_uri_popup_link_open), NULL, NULL, EM_POPUP_URI_NOT_MAILTO },
- { EM_POPUP_ITEM, "00.uri.10", N_("Se_nd message to..."), G_CALLBACK(emp_uri_popup_address_send), NULL, NULL, EM_POPUP_URI_MAILTO },
- { EM_POPUP_ITEM, "00.uri.20", N_("_Add to Addressbook"), G_CALLBACK(emp_uri_popup_address_add), NULL, NULL, EM_POPUP_URI_MAILTO },
-};
-
-/* ********************************************************************** */
-
-#define LEN(x) (sizeof(x)/sizeof(x[0]))
-
-#include <libgnomevfs/gnome-vfs-mime-handlers.h>
-
-struct _open_in_item {
- EMPopupItem item;
- EMPopupTarget *target;
- GnomeVFSMimeApplication *app;
-};
-
-static void
-emp_apps_open_in(GtkWidget *w, struct _open_in_item *item)
-{
- char *path;
-
- path = em_utils_temp_save_part(item->target->widget, item->target->data.part.part);
- if (path) {
- char *command;
- int douri = (item->app->expects_uris == GNOME_VFS_MIME_APPLICATION_ARGUMENT_TYPE_URIS);
-
- command = g_strdup_printf(douri?"%s file://%s &":"%s %s &", item->app->command, path);
-
- /* FIXME: Do not use system here */
- system(command);
- g_free(command);
- g_free(path);
- }
-}
-
-static void
-emp_apps_popup_free(GSList *free_list)
-{
- while (free_list) {
- GSList *n = free_list->next;
- struct _open_in_item *item = free_list->data;
-
- g_free(item->item.path);
- g_free(item->item.label);
- g_free(item);
- g_slist_free_1(free_list);
-
- free_list = n;
- }
-}
-
-static void
-emp_standard_menu_factory(EMPopup *emp, EMPopupTarget *target, void *data)
-{
- int i, len;
- EMPopupItem *items;
- GSList *menus = NULL;
-
- switch (target->type) {
- case EM_POPUP_TARGET_SELECT:
- return;
-#if 0
- items = emp_standard_select_popups;
- len = LEN(emp_standard_select_popups);
- break;
-#endif
- case EM_POPUP_TARGET_URI:
- items = emp_standard_uri_popups;
- len = LEN(emp_standard_uri_popups);
- break;
- case EM_POPUP_TARGET_PART: {
- GList *apps = gnome_vfs_mime_get_short_list_applications(target->data.part.mime_type);
-
- /* FIXME: use the snoop_part stuff from em-format.c */
- if (apps == NULL && strcmp(target->data.part.mime_type, "application/octet-stream") == 0) {
- const char *filename, *name_type;
-
- filename = camel_mime_part_get_filename(target->data.part.part);
-
- if (filename) {
- /* GNOME-VFS will misidentify TNEF attachments as MPEG */
- if (!strcmp (filename, "winmail.dat"))
- name_type = "application/vnd.ms-tnef";
- else
- name_type = gnome_vfs_mime_type_from_name(filename);
- if (name_type)
- apps = gnome_vfs_mime_get_short_list_applications(name_type);
- }
- }
-
- if (apps) {
- GString *label = g_string_new("");
- GSList *open_menus = NULL;
- GList *l;
-
- menus = g_slist_prepend(menus, (void *)&emp_standard_part_apps_bar);
-
- for (l = apps, i = 0; l; l = l->next, i++) {
- GnomeVFSMimeApplication *app = l->data;
- struct _open_in_item *item;
-
- if (app->requires_terminal)
- continue;
-
- item = g_malloc0(sizeof(*item));
- item->item.type = EM_POPUP_ITEM;
- item->item.path = g_strdup_printf("99.object.%02d", i);
- item->item.label = g_strdup_printf(_("Open in %s..."), app->name);
- item->item.activate = G_CALLBACK(emp_apps_open_in);
- item->item.activate_data = item;
- item->target = target;
- item->app = app;
-
- open_menus = g_slist_prepend(open_menus, item);
- }
-
- if (open_menus)
- em_popup_add_items(emp, open_menus, (GDestroyNotify)emp_apps_popup_free);
-
- g_string_free(label, TRUE);
- g_list_free(apps);
- }
-
- items = emp_standard_object_popups;
- len = LEN(emp_standard_object_popups);
- break; }
- default:
- items = NULL;
- len = 0;
- g_assert_not_reached ();
- }
-
- for (i=0;i<len;i++) {
- if ((items[i].mask & target->mask) == 0) {
- items[i].activate_data = target;
- menus = g_slist_prepend(menus, &items[i]);
- }
- }
-
- if (menus)
- em_popup_add_items(emp, menus, (GDestroyNotify)g_slist_free);
-}
diff --git a/mail/em-popup.h b/mail/em-popup.h
deleted file mode 100644
index 831d586efe..0000000000
--- a/mail/em-popup.h
+++ /dev/null
@@ -1,171 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Authors: Michel Zucchi <notzed@ximian.com>
- *
- * Copyright 2003 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 __EM_POPUP_H__
-#define __EM_POPUP_H__
-
-#include <glib-object.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-/* NB: This is TEMPORARY, to be replaced by EggMenu, if it does what we need? */
-
-typedef struct _EMPopup EMPopup;
-typedef struct _EMPopupClass EMPopupClass;
-
-typedef struct _EMPopupItem EMPopupItem;
-typedef struct _EMPopupFactory EMPopupFactory; /* anonymous type */
-typedef struct _EMPopupTarget EMPopupTarget;
-
-typedef void (*EMPopupFactoryFunc)(EMPopup *emp, EMPopupTarget *target, void *data);
-
-/* Menu item descriptions */
-enum _em_popup_t {
- EM_POPUP_ITEM = 0,
- EM_POPUP_TOGGLE,
- EM_POPUP_RADIO,
- EM_POPUP_IMAGE,
- EM_POPUP_SUBMENU,
- EM_POPUP_BAR,
- EM_POPUP_TYPE_MASK = 0xffff,
- EM_POPUP_ACTIVE = 0x10000,
-};
-
-struct _EMPopupItem {
- enum _em_popup_t type;
- char *path; /* absolute path! must sort ascii-lexographically into the right spot */
- char *label;
- GCallback activate;
- void *activate_data;
- void *image; /* char* for item type, GtkWidget * for image type */
- guint32 mask;
-};
-
-/* Current target description */
-/* Types of popup tagets */
-enum _em_popup_target_t {
- EM_POPUP_TARGET_SELECT,
- EM_POPUP_TARGET_URI,
- EM_POPUP_TARGET_PART,
- EM_POPUP_TARGET_FOLDER,
-};
-
-/* Flags that describe a TARGET_SELECT */
-enum {
- EM_POPUP_SELECT_ONE = 1<<1,
- EM_POPUP_SELECT_MANY = 1<<2,
- EM_POPUP_SELECT_MARK_READ = 1<<3,
- EM_POPUP_SELECT_MARK_UNREAD = 1<<4,
- EM_POPUP_SELECT_DELETE = 1<<5,
- EM_POPUP_SELECT_UNDELETE = 1<<6,
- EM_POPUP_SELECT_MAILING_LIST = 1<<7,
- EM_POPUP_SELECT_RESEND = 1<<8,
- EM_POPUP_SELECT_MARK_IMPORTANT = 1<<9,
- EM_POPUP_SELECT_MARK_UNIMPORTANT = 1<<10,
- EM_POPUP_SELECT_FLAG_FOLLOWUP = 1<<11,
- EM_POPUP_SELECT_FLAG_COMPLETED = 1<<12,
- EM_POPUP_SELECT_FLAG_CLEAR = 1<<13,
- EM_POPUP_SELECT_ADD_SENDER = 1<<14,
- EM_POPUP_SELECT_MARK_JUNK = 1<<15,
- EM_POPUP_SELECT_MARK_NOJUNK = 1<<16,
- EM_POPUP_SELECT_LAST = 1<<18 /* reserve 2 slots */
-};
-
-/* Flags that describe a TARGET_URI */
-enum {
- EM_POPUP_URI_HTTP = 1<<0,
- EM_POPUP_URI_MAILTO = 1<<1,
- EM_POPUP_URI_NOT_MAILTO = 1<<2,
-};
-
-/* Flags that describe TARGET_PART */
-enum {
- EM_POPUP_PART_MESSAGE = 1<<0,
- EM_POPUP_PART_IMAGE = 1<<1,
-};
-
-/* Flags that describe TARGET_FOLDER */
-enum {
- EM_POPUP_FOLDER_LOCAL = 1<<0,
- EM_POPUP_FOLDER_REMOTE = 1<<1,
- EM_POPUP_FOLDER_VFOLDER = 1<<2,
-};
-
-struct _EMPopupTarget {
- enum _em_popup_target_t type;
- guint32 mask; /* depends on type, see above */
- struct _GtkWidget *widget; /* used if you need a parent toplevel, if available */
- union {
- char *uri;
- struct {
- struct _CamelFolder *folder;
- char *folder_uri;
- GPtrArray *uids;
- } select;
- struct {
- char *mime_type;
- struct _CamelMimePart *part;
- } part;
- struct {
- char *folder_uri;
- } folder;
- } data;
-};
-
-/* The object */
-struct _EMPopup {
- GObject object;
-
- struct _EMPopupPrivate *priv;
-
- char *menuid;
-};
-
-struct _EMPopupClass {
- GObjectClass object_class;
-};
-
-GType em_popup_get_type(void);
-
-/* Static class methods */
-EMPopupFactory *em_popup_static_add_factory(const char *menuid, EMPopupFactoryFunc func, void *data);
-void em_popup_static_remove_factory(EMPopupFactory *f);
-
-EMPopup *em_popup_new(const char *menuid);
-void em_popup_add_items(EMPopup *, GSList *items, GDestroyNotify freefunc);
-void em_popup_add_static_items(EMPopup *emp, EMPopupTarget *target);
-struct _GtkMenu *em_popup_create_menu(EMPopup *, guint32 hide_mask, guint32 disable_mask);
-struct _GtkMenu *em_popup_create_menu_once(EMPopup *emp, EMPopupTarget *, guint32 hide_mask, guint32 disable_mask);
-
-EMPopupTarget *em_popup_target_new_uri(const char *uri);
-EMPopupTarget *em_popup_target_new_select(struct _CamelFolder *folder, const char *folder_uri, GPtrArray *uids);
-EMPopupTarget *em_popup_target_new_part(struct _CamelMimePart *part, const char *mime_type);
-void em_popup_target_free(EMPopupTarget *target);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __EM_POPUP_H__ */
diff --git a/mail/em-subscribe-editor.c b/mail/em-subscribe-editor.c
deleted file mode 100644
index 1fb9066362..0000000000
--- a/mail/em-subscribe-editor.c
+++ /dev/null
@@ -1,853 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- * em-subscribe-editor.c *
- *
- * Authors: Michael Zucchi <notzed@ximian.com>
- *
- * Copyright 2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <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 "e-util/e-account-list.h"
-
-#include "em-subscribe-editor.h"
-
-#include "mail-config.h"
-
-#include <glade/glade.h>
-
-#include <gtk/gtkdialog.h>
-#include <gtk/gtkscrolledwindow.h>
-#include <gtk/gtkbox.h>
-#include <gtk/gtklabel.h>
-#include <gtk/gtktreeview.h>
-#include <gtk/gtktreestore.h>
-#include <gtk/gtktreeselection.h>
-#include <gtk/gtkcellrenderertoggle.h>
-#include <gtk/gtkcellrenderertext.h>
-#include <gtk/gtkoptionmenu.h>
-#include <gtk/gtkprogressbar.h>
-#include <gtk/gtkmenuitem.h>
-
-#define d(x)
-
-typedef struct _EMSubscribeEditor EMSubscribeEditor;
-struct _EMSubscribeEditor {
- EDList stores;
-
- int busy;
- guint busy_id;
-
- struct _EMSubscribe *current; /* the current one, if any */
-
- GtkDialog *dialog;
- GtkWidget *vbox; /* where new stores are added */
- GtkWidget *optionmenu;
- GtkWidget *none_selected; /* 'please select a xxx' message */
- GtkWidget *none_selected_item;
- GtkWidget *subscribe_button;
- GtkWidget *unsubscribe_button;
- GtkWidget *progress;
-};
-
-typedef struct _EMSubscribe EMSubscribe;
-struct _EMSubscribe {
- struct _EMSubscribe *next;
- struct _EMSubscribe *prev;
-
- int ref_count;
- int cancel;
-
- struct _EMSubscribeEditor *editor; /* parent object*/
-
- char *store_uri;
- int store_id; /* looking up a store */
-
- CamelStore *store;
- GHashTable *folders;
-
- GtkWidget *widget; /* widget to show for this store */
- GtkTreeView *tree; /* tree, if we have it */
-
- /* list of all returns from get_folder_info, accessed by other structures */
- GSList *info_list;
-
- /* pending LISTs, EMSubscribeNode's */
- int pending_id;
- EDList pending;
-
- /* queue of pending UN/SUBSCRIBEs, EMsg's */
- int subscribe_id;
- EDList subscribe;
-
- /* working variables at runtime */
- int selected_count;
- int selected_subscribed_count;
- gboolean subscribed_state:1; /* for setting the selection*/
-};
-
-typedef struct _EMSubscribeNode EMSubscribeNode;
-struct _EMSubscribeNode {
- struct _EMSubscribeNode *next;
- struct _EMSubscribeNode *prev;
-
- CamelFolderInfo *info;
- GtkTreePath *path;
-};
-
-static void sub_editor_busy(EMSubscribeEditor *se, int dir);
-static int sub_queue_fill_level(EMSubscribe *sub, EMSubscribeNode *node);
-static void sub_selection_changed(GtkTreeSelection *selection, EMSubscribe *sub);
-
-static void
-sub_node_free(char *key, EMSubscribeNode *node, EMSubscribe *sub)
-{
- d(printf("sub node free '%s'\n", node->info?node->info->full_name:"<unknown>"));
- if (node->path)
- gtk_tree_path_free(node->path);
- g_free(node);
-}
-
-static void
-sub_ref(EMSubscribe *sub)
-{
- sub->ref_count++;
-}
-
-static void
-sub_unref(EMSubscribe *sub)
-{
- GSList *l;
-
- sub->ref_count--;
- if (sub->ref_count == 0) {
- d(printf("subscribe object finalised\n"));
- /* we dont have to delete the "subscribe" task list, as it must be empty,
- otherwise we wouldn't be unreffed (intentional circular reference) */
- if (sub->folders) {
- g_hash_table_foreach(sub->folders, (GHFunc)sub_node_free, sub);
- g_hash_table_destroy(sub->folders);
- }
- l = sub->info_list;
- while (l) {
- GSList *n = l->next;
-
- camel_store_free_folder_info(sub->store, (CamelFolderInfo *)l->data);
- g_slist_free_1(l);
- l = n;
- }
- if (sub->store)
- camel_object_unref(sub->store);
- g_free(sub->store_uri);
- g_free(sub);
- }
-}
-
-/* ** Subscribe folder operation **************************************** */
-
-struct _zsubscribe_msg {
- struct _mail_msg msg;
-
- EMSubscribe *sub;
- EMSubscribeNode *node;
- int subscribe;
- char *path;
-};
-
-static void
-sub_folder_subscribe (struct _mail_msg *mm)
-{
- struct _zsubscribe_msg *m = (struct _zsubscribe_msg *) mm;
-
- if (m->subscribe)
- camel_store_subscribe_folder (m->sub->store, m->node->info->full_name, &mm->ex);
- else
- camel_store_unsubscribe_folder (m->sub->store, m->node->info->full_name, &mm->ex);
-}
-
-static void
-sub_folder_subscribed (struct _mail_msg *mm)
-{
- struct _zsubscribe_msg *m = (struct _zsubscribe_msg *)mm, *next;
- GtkTreeIter iter;
- GtkTreeModel *model;
- EMSubscribeNode *node;
- gboolean subscribed, issub;
-
- m->sub->subscribe_id = -1;
- if (m->sub->cancel)
- return;
-
- if (!camel_exception_is_set(&mm->ex)) {
- if (m->subscribe)
- m->node->info->flags |= CAMEL_FOLDER_SUBSCRIBED;
- else
- m->node->info->flags &= ~CAMEL_FOLDER_SUBSCRIBED;
- }
-
- /* make sure the tree view matches the correct state */
- model = gtk_tree_view_get_model(m->sub->tree);
- if (gtk_tree_model_get_iter_from_string(model, &iter, m->path)) {
- issub = (m->node->info->flags & CAMEL_FOLDER_SUBSCRIBED) != 0;
- gtk_tree_model_get(model, &iter, 0, &subscribed, 2, &node, -1);
- if (node == m->node)
- gtk_tree_store_set((GtkTreeStore *)model, &iter, 0, issub, -1);
- else
- d(printf("node mismatch, or subscribe state changed failed\n"));
- }
-
- /* queue any further ones, or if out, update the ui */
- next = (struct _zsubscribe_msg *)e_dlist_remhead(&m->sub->subscribe);
- if (next) {
- next->sub->subscribe_id = next->msg.seq;
- e_thread_put(mail_thread_new, (EMsg *)next);
- } else {
- /* should it go off the model instead? */
- sub_selection_changed(gtk_tree_view_get_selection(m->sub->tree), m->sub);
- }
-}
-
-static void
-sub_folder_free (struct _mail_msg *mm)
-{
- struct _zsubscribe_msg *m = (struct _zsubscribe_msg *) mm;
-
- g_free(m->path);
- sub_unref(m->sub);
-}
-
-static struct _mail_msg_op sub_subscribe_folder_op = {
- NULL, /*subscribe_folder_desc,*/
- sub_folder_subscribe,
- sub_folder_subscribed,
- sub_folder_free,
-};
-
-/* spath is tree path in string form */
-static int
-sub_subscribe_folder (EMSubscribe *sub, EMSubscribeNode *node, int state, const char *spath)
-{
- struct _zsubscribe_msg *m;
- int id;
-
- m = mail_msg_new (&sub_subscribe_folder_op, NULL, sizeof(*m));
- m->sub = sub;
- sub_ref(sub);
- m->node = node;
- m->subscribe = state;
- m->path = g_strdup(spath);
-
- id = m->msg.seq;
- if (sub->subscribe_id == -1) {
- sub->subscribe_id = id;
- d(printf("running subscribe folder '%s'\n", spath));
- e_thread_put (mail_thread_new, (EMsg *)m);
- } else {
- d(printf("queueing subscribe folder '%s'\n", spath));
- e_dlist_addtail(&sub->subscribe, (EDListNode *)m);
- }
-
- return id;
-}
-
-/* ********************************************************************** */
-static void
-sub_fill_level(EMSubscribe *sub, CamelFolderInfo *info, GtkTreeIter *parent, int pending)
-{
- CamelFolderInfo *fi;
- GtkTreeStore *treestore;
- GtkTreeIter iter;
- EMSubscribeNode *node;
-
- treestore = (GtkTreeStore *)gtk_tree_view_get_model(sub->tree);
-
- /* first, fill a level up */
- fi = info;
- while (fi) {
- if (g_hash_table_lookup(sub->folders, fi->full_name) == NULL) {
- gboolean state;
-
- gtk_tree_store_append(treestore, &iter, parent);
- node = g_malloc0(sizeof(*node));
- node->info = fi;
- /* FIXME: CAMEL_FOLDER_SUBSCRIBED not implemented properly in imap */
- state = camel_store_folder_subscribed(sub->store, fi->full_name);
- /* state = (fi->flags & CAMEL_FOLDER_SUBSCRIBED) != 0; */
- gtk_tree_store_set(treestore, &iter, 0, state, 1, fi->name, 2, node, -1);
- if ((fi->flags & CAMEL_FOLDER_NOINFERIORS) == 0) {
- node->path = gtk_tree_model_get_path((GtkTreeModel *)treestore, &iter);
- if (node->path) {
- /* save time, if we have any children alread, dont re-scan */
- if (fi->child) {
- d(printf("scanning child '%s'\n", fi->child->full_name));
- sub_fill_level(sub, fi->child, &iter, FALSE);
- } else {
- if (pending)
- e_dlist_addtail(&sub->pending, (EDListNode *)node);
- }
- }
- }
- g_hash_table_insert(sub->folders, fi->full_name, node);
- }
- fi = fi->sibling;
- }
-}
-
-/* async query of folderinfo */
-
-struct _emse_folderinfo_msg {
- struct _mail_msg msg;
-
- EMSubscribe *sub;
- EMSubscribeNode *node;
- CamelFolderInfo *info;
-};
-
-static void
-sub_folderinfo_get (struct _mail_msg *mm)
-{
- struct _emse_folderinfo_msg *m = (struct _emse_folderinfo_msg *) mm;
-
- camel_operation_register(mm->cancel);
- m->info = camel_store_get_folder_info (m->sub->store, m->node?m->node->info->full_name:"", CAMEL_STORE_FOLDER_INFO_FAST, &mm->ex);
- camel_operation_unregister(mm->cancel);
-}
-
-static void
-sub_folderinfo_got(struct _mail_msg *mm)
-{
- struct _emse_folderinfo_msg *m = (struct _emse_folderinfo_msg *) mm;
- EMSubscribeNode *node;
-
- m->sub->pending_id = -1;
- if (m->sub->cancel)
- return;
-
- if (camel_exception_is_set (&mm->ex)) {
- g_warning ("Error getting folder info from store: %s",
- camel_exception_get_description (&mm->ex));
- }
-
- if (m->info) {
- if (m->node) {
- GtkTreeIter iter;
-
- gtk_tree_model_get_iter(gtk_tree_view_get_model(m->sub->tree), &iter, m->node->path);
- sub_fill_level(m->sub, m->info, &iter, FALSE);
- } else {
- sub_fill_level(m->sub, m->info, NULL, TRUE);
- }
- }
-
- /* check for more to do */
- node = (EMSubscribeNode *)e_dlist_remhead(&m->sub->pending);
- if (node)
- sub_queue_fill_level(m->sub, node);
-}
-
-static void
-sub_folderinfo_free(struct _mail_msg *mm)
-{
- struct _emse_folderinfo_msg *m = (struct _emse_folderinfo_msg *) mm;
-
- if (m->info)
- m->sub->info_list = g_slist_prepend(m->sub->info_list, m->info);
-
- if (!m->sub->cancel)
- sub_editor_busy(m->sub->editor, -1);
-
- sub_unref(m->sub);
-}
-
-static struct _mail_msg_op sub_folderinfo_op = {
- NULL, /*sub_folderinfo_desc, we do our own progress reporting/cancellation */
- sub_folderinfo_get,
- sub_folderinfo_got,
- sub_folderinfo_free,
-};
-
-static int
-sub_queue_fill_level(EMSubscribe *sub, EMSubscribeNode *node)
-{
- struct _emse_folderinfo_msg *m;
- int id;
-
- d(printf("Starting get folderinfo of '%s'\n", node?node->info->full_name:"<root>"));
-
- m = mail_msg_new (&sub_folderinfo_op, NULL, sizeof(*m));
- sub_ref(sub);
- m->sub = sub;
- m->node = node;
-
- sub->pending_id = m->msg.seq;
-
- sub_editor_busy(sub->editor, 1);
-
- e_thread_put (mail_thread_new, (EMsg *)m);
- return id;
-}
-
-/* ********************************************************************** */
-
-/* (un) subscribes the current selection */
-static void sub_do_subscribe(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, void *data)
-{
- EMSubscribe *sub = data;
- EMSubscribeNode *node;
- gboolean subscribed;
-
- gtk_tree_model_get(model, iter, 0, &subscribed, 2, &node, -1);
- if (sub->subscribed_state ^ subscribed) {
- char *spath;
-
- spath = gtk_tree_path_to_string(path);
- gtk_tree_store_set((GtkTreeStore *)model, iter, 0, subscribed, -1);
- sub_subscribe_folder(sub, node, sub->subscribed_state, spath);
- g_free(spath);
- }
-}
-
-static void
-sub_subscribe(EMSubscribe *sub, gboolean subscribed)
-{
- GtkTreeSelection *selection;
-
- if (sub->tree == NULL)
- return;
-
- sub->subscribed_state = subscribed;
- selection = gtk_tree_view_get_selection (sub->tree);
- gtk_tree_selection_selected_foreach(selection, sub_do_subscribe, sub);
-}
-
-static void
-sub_subscribe_toggled(GtkCellRendererToggle *render, const char *spath, EMSubscribe *sub)
-{
- GtkTreeIter iter;
- GtkTreeModel *model = gtk_tree_view_get_model(sub->tree);
- EMSubscribeNode *node;
- gboolean subscribed;
-
- d(printf("subscribe toggled?\n"));
-
- if (gtk_tree_model_get_iter_from_string(model, &iter, spath)) {
- gtk_tree_model_get(model, &iter, 0, &subscribed, 2, &node, -1);
- subscribed = !subscribed;
- d(printf("new state is %s\n", subscribed?"subscribed":"not subscribed"));
- gtk_tree_store_set((GtkTreeStore *)model, &iter, 0, subscribed, -1);
- sub_subscribe_folder(sub, node, subscribed, spath);
- }
-}
-
-static void sub_do_changed(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, void *data)
-{
- EMSubscribe *sub = data;
- EMSubscribeNode *node;
- gboolean subscribed;
-
- gtk_tree_model_get(model, iter, 0, &subscribed, 2, &node, -1);
-
- if (subscribed)
- sub->selected_subscribed_count++;
- sub->selected_count++;
-}
-
-static void
-sub_selection_changed(GtkTreeSelection *selection, EMSubscribe *sub)
-{
- int dosub = TRUE, dounsub = TRUE;
-
- sub->selected_count = 0;
- sub->selected_subscribed_count = 0;
- gtk_tree_selection_selected_foreach(selection, sub_do_changed, sub);
-
- if (sub->selected_count == 0) {
- dosub = FALSE;
- dounsub = FALSE;
- } else if (sub->selected_subscribed_count == sub->selected_count)
- dosub = FALSE;
- else if (sub->selected_subscribed_count == 0)
- dounsub = FALSE;
-
- gtk_widget_set_sensitive(sub->editor->subscribe_button, dosub);
- gtk_widget_set_sensitive(sub->editor->unsubscribe_button, dounsub);
-}
-
-static void
-sub_row_expanded(GtkTreeView *tree, GtkTreeIter *iter, GtkTreePath *path, EMSubscribe *sub)
-{
- EMSubscribeNode *node;
- GtkTreeIter child;
- GtkTreeModel *model = (GtkTreeModel *)gtk_tree_view_get_model(tree);
- EDList list;
-
- gtk_tree_model_get(model, iter, 2, &node, -1);
- if (node->path == NULL) {
- d(printf("path '%s' already processed\n", node->info->full_name));
- return;
- }
- gtk_tree_path_free(node->path);
- node->path = NULL;
-
- e_dlist_init(&list);
-
- /* add all children nodes to pending, and fire off a pending */
- /* we add them to the head of the pending list, to make it more interactive */
- gtk_tree_model_iter_children(model, &child, iter);
- do {
- gtk_tree_model_get(model, &child, 2, &node, -1);
- if (node->path)
- e_dlist_addtail(&list, (EDListNode *)node);
- } while (gtk_tree_model_iter_next(model, &child));
-
- while ( (node = (EMSubscribeNode *)e_dlist_remtail(&list)) )
- e_dlist_addhead(&sub->pending, (EDListNode *)node);
-
- if (sub->pending_id == -1
- && (node = (EMSubscribeNode *)e_dlist_remtail(&sub->pending)))
- sub_queue_fill_level(sub, node);
-}
-
-static void
-sub_destroy(GtkWidget *w, EMSubscribe *sub)
-{
- struct _zsubscribe_msg *m;
-
- d(printf("subscribe closed\n"));
- sub->cancel = TRUE;
-
- if (sub->pending_id != -1)
- mail_msg_cancel(sub->pending_id);
-
- if (sub->subscribe_id != -1)
- mail_msg_cancel(sub->subscribe_id);
-
- while ( (m = (struct _zsubscribe_msg *)e_dlist_remhead(&sub->subscribe)) )
- mail_msg_free(m);
-
- sub_unref(sub);
-}
-
-static EMSubscribe *
-subscribe_new(EMSubscribeEditor *se, const char *uri)
-{
- EMSubscribe *sub;
-
- sub = g_malloc0(sizeof(*sub));
- sub->store_uri = g_strdup(uri);
- sub->editor = se;
- sub->ref_count = 1;
- sub->pending_id = -1;
- e_dlist_init(&sub->pending);
- sub->subscribe_id = -1;
- e_dlist_init(&sub->subscribe);
- sub->store_id = -1;
-
- return sub;
-}
-
-static void
-subscribe_set_store(EMSubscribe *sub, CamelStore *store)
-{
- if (store == NULL || !camel_store_supports_subscriptions(store)) {
- GtkWidget *w = gtk_label_new(_("This store does not support subscriptions, or the are not enabled."));
-
- gtk_label_set_line_wrap((GtkLabel *)w, TRUE);
- sub->widget = gtk_viewport_new(NULL, NULL);
- gtk_viewport_set_shadow_type((GtkViewport *)sub->widget, GTK_SHADOW_IN);
- gtk_container_add((GtkContainer *)sub->widget, w);
- gtk_widget_show(w);
- gtk_widget_show(sub->widget);
- } else {
- GtkTreeSelection *selection;
- GtkCellRenderer *renderer;
- GtkTreeStore *model;
-
- sub->store = store;
- camel_object_ref(store);
- sub->folders = g_hash_table_new(g_str_hash, g_str_equal);
-
- model = gtk_tree_store_new (3, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_POINTER);
- sub->tree = (GtkTreeView *) gtk_tree_view_new_with_model ((GtkTreeModel *) model);
- gtk_widget_show ((GtkWidget *)sub->tree);
-
- sub->widget = gtk_scrolled_window_new (NULL, NULL);
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sub->widget), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
- gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sub->widget), GTK_SHADOW_IN);
- gtk_container_add((GtkContainer *)sub->widget, (GtkWidget *)sub->tree);
- gtk_widget_show(sub->widget);
-
- renderer = gtk_cell_renderer_toggle_new ();
- g_object_set(renderer, "activatable", TRUE, NULL);
- gtk_tree_view_insert_column_with_attributes (sub->tree, -1, _("Subscribed"), renderer, "active", 0, NULL);
- g_signal_connect(renderer, "toggled", G_CALLBACK(sub_subscribe_toggled), sub);
-
- renderer = gtk_cell_renderer_text_new ();
- gtk_tree_view_insert_column_with_attributes (sub->tree, -1, _("Folder"), renderer, "text", 1, NULL);
- gtk_tree_view_set_expander_column(sub->tree, gtk_tree_view_get_column(sub->tree, 1));
-
- selection = gtk_tree_view_get_selection (sub->tree);
- gtk_tree_selection_set_mode (selection, GTK_SELECTION_MULTIPLE);
- gtk_tree_view_set_headers_visible (sub->tree, FALSE);
-
- g_signal_connect(sub->tree, "row-expanded", G_CALLBACK(sub_row_expanded), sub);
- g_signal_connect(sub->tree, "destroy", G_CALLBACK(sub_destroy), sub);
-
- sub_selection_changed(selection, sub);
- g_signal_connect(selection, "changed", G_CALLBACK(sub_selection_changed), sub);
-
- sub_queue_fill_level(sub, NULL);
- }
-
- gtk_box_pack_start((GtkBox *)sub->editor->vbox, sub->widget, TRUE, TRUE, 0);
-}
-
-static void
-sub_editor_destroy(GtkWidget *w, EMSubscribeEditor *se)
-{
- /* need to clean out pending store opens */
- d(printf("editor destroyed, freeing editor\n"));
- if (se->busy_id)
- g_source_remove(se->busy_id);
-
- g_free(se);
-}
-
-static void
-sub_editor_close(GtkWidget *w, EMSubscribeEditor *se)
-{
- gtk_widget_destroy((GtkWidget *)se->dialog);
-}
-
-static void
-sub_editor_refresh(GtkWidget *w, EMSubscribeEditor *se)
-{
- EMSubscribe *sub = se->current;
- GSList *l;
-
- d(printf("sub editor refresh?\n"));
- if (sub == NULL || sub->store == NULL)
- return;
-
- /* drop any currently pending */
- if (sub->pending_id != -1)
- mail_msg_cancel(sub->pending_id);
-
- gtk_tree_store_clear((GtkTreeStore *)gtk_tree_view_get_model(sub->tree));
-
- e_dlist_init(&sub->pending);
- if (sub->folders) {
- g_hash_table_foreach(sub->folders, (GHFunc)sub_node_free, sub);
- g_hash_table_destroy(sub->folders);
- }
- sub->folders = g_hash_table_new(g_str_hash, g_str_equal);
-
- l = sub->info_list;
- sub->info_list = NULL;
- while (l) {
- GSList *n = l->next;
-
- camel_store_free_folder_info(sub->store, (CamelFolderInfo *)l->data);
- g_slist_free_1(l);
- l = n;
- }
-
- sub_queue_fill_level(sub, NULL);
-}
-
-static void
-sub_editor_subscribe(GtkWidget *w, EMSubscribeEditor *se)
-{
- d(printf("subscribe clicked, current = %p\n", se->current));
-
- if (se->current)
- sub_subscribe(se->current, TRUE);
-}
-
-static void
-sub_editor_unsubscribe(GtkWidget *w, EMSubscribeEditor *se)
-{
- d(printf("unsubscribe clicked\n"));
-
- if (se->current)
- sub_subscribe(se->current, FALSE);
-}
-
-static void
-sub_editor_got_store(char *uri, CamelStore *store, void *data)
-{
- struct _EMSubscribe *sub = data;
-
- if (!sub->cancel)
- subscribe_set_store(sub, store);
- sub_unref(sub);
-}
-
-static void
-sub_editor_menu_changed(GtkWidget *w, EMSubscribeEditor *se)
-{
- int i, n;
- struct _EMSubscribe *sub;
-
- d(printf("menu changed\n"));
-
- i = 1;
- n = gtk_option_menu_get_history((GtkOptionMenu *)se->optionmenu);
- if (n == 0)
- gtk_widget_show(se->none_selected);
- else {
- gtk_widget_hide(se->none_selected);
- gtk_widget_hide(se->none_selected_item);
- }
-
- se->current = NULL;
- sub = (struct _EMSubscribe *)se->stores.head;
- while (sub->next) {
- if (i == n) {
- se->current = sub;
- if (sub->widget) {
- gtk_widget_show(sub->widget);
- } else if (sub->store_id == -1) {
- sub_ref(sub);
- sub->store_id = mail_get_store(sub->store_uri, NULL, sub_editor_got_store, sub);
- }
- } else {
- if (sub->widget)
- gtk_widget_hide(sub->widget);
- }
- i++;
- sub = sub->next;
- }
-}
-
-static gboolean sub_editor_timeout(EMSubscribeEditor *se)
-{
- gtk_progress_bar_pulse((GtkProgressBar *)se->progress);
-
- return TRUE;
-}
-
-static void sub_editor_busy(EMSubscribeEditor *se, int dir)
-{
- int was;
-
- was = se->busy != 0;
- se->busy += dir;
- if (was && !se->busy) {
- g_source_remove(se->busy_id);
- se->busy_id = 0;
- gtk_widget_hide(se->progress);
- } else if (!was && se->busy) {
- se->busy_id = g_timeout_add(1000/5, (GSourceFunc)sub_editor_timeout, se);
- gtk_widget_show(se->progress);
- }
-}
-
-GtkDialog *em_subscribe_editor_new(void)
-{
- EMSubscribeEditor *se;
- EAccountList *accounts;
- EIterator *iter;
- GladeXML *xml;
- GtkWidget *menu, *w;
-
- se = g_malloc0(sizeof(*se));
- e_dlist_init(&se->stores);
-
- xml = glade_xml_new (EVOLUTION_GLADEDIR "/subscribe-dialog.glade", "subscribe_dialog", NULL);
- if (xml == NULL) {
- /* ?? */
- return NULL;
- }
- se->dialog = (GtkDialog *)glade_xml_get_widget (xml, "subscribe_dialog");
- g_signal_connect(se->dialog, "destroy", G_CALLBACK(sub_editor_destroy), se);
-
- se->vbox = glade_xml_get_widget(xml, "tree_box");
-
- se->subscribe_button = glade_xml_get_widget (xml, "subscribe_button");
- g_signal_connect(se->subscribe_button, "clicked", G_CALLBACK(sub_editor_subscribe), se);
- se->unsubscribe_button = glade_xml_get_widget (xml, "unsubscribe_button");
- g_signal_connect(se->unsubscribe_button, "clicked", G_CALLBACK(sub_editor_unsubscribe), se);
-
- /* FIXME: This is just to get the shadow, is there a better way? */
- w = gtk_label_new(_("Please select a server."));
- se->none_selected = gtk_viewport_new(NULL, NULL);
- gtk_viewport_set_shadow_type((GtkViewport *)se->none_selected, GTK_SHADOW_IN);
- gtk_container_add((GtkContainer *)se->none_selected, w);
- gtk_widget_show(w);
-
- gtk_box_pack_start((GtkBox *)se->vbox, se->none_selected, TRUE, TRUE, 0);
- gtk_widget_show(se->none_selected);
-
- se->progress = glade_xml_get_widget(xml, "progress_bar");
- gtk_widget_hide(se->progress);
-
- w = glade_xml_get_widget(xml, "close_button");
- g_signal_connect(w, "clicked", G_CALLBACK(sub_editor_close), se);
-
- w = glade_xml_get_widget(xml, "refresh_button");
- g_signal_connect(w, "clicked", G_CALLBACK(sub_editor_refresh), se);
-
- /* setup stores menu */
- se->optionmenu = glade_xml_get_widget(xml, "store_menu");
- menu = gtk_menu_new();
- se->none_selected_item = w = gtk_menu_item_new_with_label(_("No server has been selected"));
- gtk_widget_show(w);
- gtk_menu_shell_append ((GtkMenuShell *)menu, w);
-
- accounts = mail_config_get_accounts ();
- for (iter = e_list_get_iterator ((EList *) accounts);
- e_iterator_is_valid (iter);
- e_iterator_next (iter)) {
- EAccount *account = (EAccount *) e_iterator_get (iter);
-
- /* setup url table, and store table? */
- if (account->enabled && account->source->url) {
- d(printf("adding account '%s'\n", account->name));
- w = gtk_menu_item_new_with_label(account->name);
- gtk_menu_shell_append ((GtkMenuShell *)menu, w);
- gtk_widget_show(w);
- e_dlist_addtail(&se->stores, (EDListNode *)subscribe_new(se, account->source->url));
- } else {
- d(printf("not adding account '%s'\n", account->name));
- }
- }
- g_object_unref(iter);
-
- gtk_option_menu_set_menu((GtkOptionMenu *)se->optionmenu, menu);
- g_signal_connect(se->optionmenu, "changed", G_CALLBACK(sub_editor_menu_changed), se);
-
- gtk_window_set_default_size((GtkWindow *)se->dialog, 350, 400);
-
- return se->dialog;
-}
diff --git a/mail/em-subscribe-editor.h b/mail/em-subscribe-editor.h
deleted file mode 100644
index ca02f14bee..0000000000
--- a/mail/em-subscribe-editor.h
+++ /dev/null
@@ -1,9 +0,0 @@
-
-#ifndef _EM_SUBSCRIBE_EDITOR_H
-#define _EM_SUBSCRIBE_EDITOR_H
-
-#include <gtk/gtkdialog.h>
-
-GtkDialog *em_subscribe_editor_new(void);
-
-#endif /* ! _EM_SUBSCRIBE_EDITOR_H */
diff --git a/mail/em-sync-stream.c b/mail/em-sync-stream.c
deleted file mode 100644
index df5659253e..0000000000
--- a/mail/em-sync-stream.c
+++ /dev/null
@@ -1,286 +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 2001 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <camel/camel-stream.h>
-#include <camel/camel-object.h>
-#include <gtk/gtkmain.h>
-#include "em-sync-stream.h"
-
-#include "mail-mt.h"
-
-/*#define LOG_STREAM*/
-
-#define d(x)
-
-#define EMSS_CLASS(x) ((EMSyncStreamClass *)(((CamelObject *)(x))->klass))
-
-struct _EMSyncStreamPrivate {
- /* FIXME: use a single data port/gui channel for all instances */
- /* TODO: possibly just use one of the mail-mt ports ... */
- struct _EMsgPort *data_port, *reply_port;
- struct _GIOChannel *gui_channel;
- guint gui_watch;
-
- char *buf_data;
- int buf_used;
- int buf_size;
-};
-
-/* Should probably expose messages to outside world ... so subclasses can extend */
-enum _write_msg_t {
- EMSS_WRITE,
- EMSS_FLUSH,
- EMSS_CLOSE,
-};
-
-struct _write_msg {
- EMsg msg;
-
- enum _write_msg_t op;
-
- const char *data;
- size_t n;
-};
-
-static void em_sync_stream_class_init (EMSyncStreamClass *klass);
-static void em_sync_stream_init (CamelObject *object);
-static void em_sync_stream_finalize (CamelObject *object);
-
-static ssize_t stream_write(CamelStream *stream, const char *buffer, size_t n);
-static int stream_close(CamelStream *stream);
-static int stream_flush(CamelStream *stream);
-
-static CamelStreamClass *parent_class = NULL;
-
-CamelType
-em_sync_stream_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (CAMEL_STREAM_TYPE,
- "EMSyncStream",
- sizeof (EMSyncStream),
- sizeof (EMSyncStreamClass),
- (CamelObjectClassInitFunc) em_sync_stream_class_init,
- NULL,
- (CamelObjectInitFunc) em_sync_stream_init,
- (CamelObjectFinalizeFunc) em_sync_stream_finalize);
- }
-
- return type;
-}
-
-static void
-em_sync_stream_class_init (EMSyncStreamClass *klass)
-{
- CamelStreamClass *stream_class = CAMEL_STREAM_CLASS (klass);
-
- parent_class = (CamelStreamClass *) CAMEL_STREAM_TYPE;
-
- /* virtual method overload */
- stream_class->write = stream_write;
- stream_class->flush = stream_flush;
- stream_class->close = stream_close;
-}
-
-static gboolean
-emcs_gui_received(GIOChannel *source, GIOCondition cond, void *data)
-{
- EMSyncStream *emss = data;
- struct _EMSyncStreamPrivate *p = emss->priv;
- struct _write_msg *msg;
-
- d(printf("%p: gui sync op job waiting\n", emss));
-
- msg = (struct _write_msg *)e_msgport_get(p->data_port);
- /* Should never happen ... */
- if (msg == NULL)
- return TRUE;
-
- d(printf("%p: running sync op %d\n", emss, msg->op));
-
- /* force out any pending data before doing anything else */
- if (p->buf_used > 0) {
- EMSS_CLASS(emss)->sync_write((CamelStream *)emss, p->buf_data, p->buf_used);
- p->buf_used = 0;
- }
-
- /* FIXME: need to handle return values */
-
- switch (msg->op) {
- case EMSS_WRITE:
- EMSS_CLASS(emss)->sync_write((CamelStream *)emss, msg->data, msg->n);
- break;
- case EMSS_FLUSH:
- EMSS_CLASS(emss)->sync_flush((CamelStream *)emss);
- break;
- case EMSS_CLOSE:
- EMSS_CLASS(emss)->sync_close((CamelStream *)emss);
- break;
- }
-
- e_msgport_reply((EMsg *)msg);
- d(printf("%p: gui sync op jobs done\n", emss));
-
- return TRUE;
-}
-
-static void
-em_sync_stream_init (CamelObject *object)
-{
- EMSyncStream *emss = (EMSyncStream *)object;
- struct _EMSyncStreamPrivate *p;
-
- p = emss->priv = g_malloc0(sizeof(*p));
-
- p->data_port = e_msgport_new();
- p->reply_port = e_msgport_new();
-
- p->gui_channel = g_io_channel_unix_new(e_msgport_fd(p->data_port));
- p->gui_watch = g_io_add_watch(p->gui_channel, G_IO_IN, emcs_gui_received, emss);
-
- d(printf("%p: new emss\n", emss));
-}
-
-static void
-sync_op(EMSyncStream *emss, enum _write_msg_t op, const char *data, size_t n)
-{
- struct _EMSyncStreamPrivate *p = emss->priv;
- struct _write_msg msg;
-
- d(printf("%p: launching sync op %d\n", emss, op));
-
- /* we do everything synchronous, we should never have any locks, and
- this prevents overflow from banked up data */
-
- msg.msg.reply_port = p->reply_port;
- msg.op = op;
- msg.data = data;
- msg.n = n;
-
- e_msgport_put(p->data_port, &msg.msg);
- e_msgport_wait(p->reply_port);
-
- g_assert(e_msgport_get(msg.msg.reply_port) == &msg.msg);
- d(printf("%p: returned sync op %d\n", emss, op));
-}
-
-static void
-em_sync_stream_finalize (CamelObject *object)
-{
- EMSyncStream *emss = (EMSyncStream *)object;
- struct _EMSyncStreamPrivate *p = emss->priv;
-
- /* TODO: is this stuff safe to do in another thread? */
- g_source_remove(p->gui_watch);
- g_io_channel_unref(p->gui_channel);
-
- e_msgport_destroy(p->data_port);
- e_msgport_destroy(p->reply_port);
-
- p->data_port = NULL;
- p->reply_port = NULL;
-
- g_free(p->buf_data);
- g_free(p);
-}
-
-static ssize_t
-stream_write (CamelStream *stream, const char *buffer, size_t n)
-{
- EMSyncStream *emss = EM_SYNC_STREAM (stream);
- struct _EMSyncStreamPrivate *p = emss->priv;
-
- if (emss->cancel)
- return -1;
-
- if (pthread_self() == mail_gui_thread)
- EMSS_CLASS(emss)->sync_write(stream, buffer, n);
- else if (p->buf_size > 0) {
- size_t left = p->buf_size-p->buf_used;
-
- if (n >= left) {
- sync_op(emss, EMSS_WRITE, buffer, n);
- } else {
- memcpy(p->buf_data + p->buf_used, buffer, n);
- p->buf_used += n;
- }
- } else {
- sync_op(emss, EMSS_WRITE, buffer, n);
- }
-
- return (ssize_t) n;
-}
-
-static int
-stream_flush(CamelStream *stream)
-{
- EMSyncStream *emss = (EMSyncStream *)stream;
-
- if (emss->cancel)
- return -1;
-
- if (pthread_self() == mail_gui_thread)
- return ((EMSyncStreamClass *)(((CamelObject *)emss)->klass))->sync_flush(stream);
- else
- sync_op(emss, EMSS_FLUSH, NULL, 0);
-
- return 0;
-}
-
-static int
-stream_close(CamelStream *stream)
-{
- EMSyncStream *emss = (EMSyncStream *)stream;
-
- if (emss->cancel)
- return -1;
-
- d(printf("%p: closing stream\n", stream));
-
- if (pthread_self() == mail_gui_thread)
- return ((EMSyncStreamClass *)(((CamelObject *)emss)->klass))->sync_close(stream);
- else
- sync_op(emss, EMSS_CLOSE, NULL, 0);
-
- return 0;
-}
-
-void
-em_sync_stream_set_buffer_size(EMSyncStream *emss, size_t size)
-{
- struct _EMSyncStreamPrivate *p = emss->priv;
-
- g_free(p->buf_data);
- p->buf_data = g_malloc(size);
- p->buf_size = size;
- p->buf_used = 0;
-}
diff --git a/mail/em-sync-stream.h b/mail/em-sync-stream.h
deleted file mode 100644
index abccae3311..0000000000
--- a/mail/em-sync-stream.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 2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-/*
-EMSyncStream - Abstract class.
-A synchronous stream, that can be written from any thread, but whose
-requests are always handled in the main gui thread in the correct order.
-*/
-
-#ifndef EM_SYNC_STREAM_H
-#define EM_SYNC_STREAM_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#define EM_SYNC_STREAM_TYPE (em_sync_stream_get_type ())
-#define EM_SYNC_STREAM(obj) (CAMEL_CHECK_CAST((obj), EM_SYNC_STREAM_TYPE, EMSyncStream))
-#define EM_SYNC_STREAM_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), EM_SYNC_STREAM_TYPE, EMSyncStreamClass))
-#define EM_IS_SYNC_STREAM(o) (CAMEL_CHECK_TYPE((o), EM_SYNC_STREAM_TYPE))
-
-#include <glib.h>
-#include <camel/camel-stream.h>
-
-typedef struct _EMSyncStream {
- CamelStream parent_stream;
-
- struct _EMSyncStreamPrivate *priv;
-
- int cancel;
-} EMSyncStream;
-
-typedef struct {
- CamelStreamClass parent_class;
-
- ssize_t (*sync_write) (CamelStream *stream, const char *buffer, size_t n);
- int (*sync_close) (CamelStream *stream);
- int (*sync_flush) (CamelStream *stream);
-
-} EMSyncStreamClass;
-
-CamelType em_sync_stream_get_type (void);
-void em_sync_stream_set_buffer_size(EMSyncStream *, size_t size);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* EM_SYNC_STREAM_H */
diff --git a/mail/em-utils.c b/mail/em-utils.c
deleted file mode 100644
index e2da2fa6d3..0000000000
--- a/mail/em-utils.c
+++ /dev/null
@@ -1,2324 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2003 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 <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <time.h>
-
-#include <camel/camel-stream-fs.h>
-#include <camel/camel-url-scanner.h>
-
-#include <filter/filter-editor.h>
-
-#include "mail-component.h"
-#include "mail-mt.h"
-#include "mail-ops.h"
-#include "mail-tools.h"
-#include "mail-config.h"
-#include "mail-config-druid.h"
-#include "message-tag-followup.h"
-
-#include <e-util/e-mktemp.h>
-#include <e-util/e-dialog-utils.h>
-
-#include "em-utils.h"
-#include "em-composer-utils.h"
-#include "em-format-quote.h"
-
-static EAccount *guess_account (CamelMimeMessage *message);
-
-/**
- * em_utils_prompt_user:
- * @parent: parent window
- * @def: default response
- * @promptkey: gconf key to check if we should prompt the user or not.
- * @fmt: prompt format
- * @Varargs: varargs
- *
- * Convenience function to query the user with a Yes/No dialog and a
- * "Don't show this dialog again" checkbox. If the user checks that
- * checkbox, then @promptkey is set to %FALSE, otherwise it is set to
- * %TRUE.
- *
- * Returns %TRUE if the user clicks Yes or %FALSE otherwise.
- **/
-gboolean
-em_utils_prompt_user(GtkWindow *parent, int def, const char *promptkey, const char *fmt, ...)
-{
- GtkWidget *mbox, *check = NULL;
- va_list ap;
- int button;
- char *str;
- GConfClient *gconf = mail_config_get_gconf_client();
-
- if (promptkey
- && !gconf_client_get_bool(gconf, promptkey, NULL))
- return TRUE;
-
- va_start (ap, fmt);
- str = g_strdup_vprintf (fmt, ap);
- va_end (ap);
- mbox = gtk_message_dialog_new (parent, GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO,
- "%s", str);
- g_free (str);
- gtk_dialog_set_default_response ((GtkDialog *) mbox, def);
- if (promptkey) {
- check = gtk_check_button_new_with_label (_("Don't show this message again."));
- gtk_box_pack_start ((GtkBox *)((GtkDialog *) mbox)->vbox, check, TRUE, TRUE, 10);
- gtk_widget_show (check);
- }
-
- button = gtk_dialog_run ((GtkDialog *) mbox);
- if (promptkey)
- gconf_client_set_bool(gconf, promptkey, !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check)), NULL);
-
- gtk_widget_destroy(mbox);
-
- return button == GTK_RESPONSE_YES;
-}
-
-/**
- * em_utils_uids_copy:
- * @uids: array of uids
- *
- * Duplicates the array of uids held by @uids into a new
- * GPtrArray. Use em_utils_uids_free() to free the resultant uid
- * array.
- *
- * Returns a duplicate copy of @uids.
- **/
-GPtrArray *
-em_utils_uids_copy (GPtrArray *uids)
-{
- GPtrArray *copy;
- int i;
-
- copy = g_ptr_array_new ();
- g_ptr_array_set_size (copy, uids->len);
-
- for (i = 0; i < uids->len; i++)
- copy->pdata[i] = g_strdup (uids->pdata[i]);
-
- return copy;
-}
-
-/**
- * em_utils_uids_free:
- * @uids: array of uids
- *
- * Frees the array of uids pointed to by @uids back to the system.
- **/
-void
-em_utils_uids_free (GPtrArray *uids)
-{
- int i;
-
- for (i = 0; i < uids->len; i++)
- g_free (uids->pdata[i]);
-
- g_ptr_array_free (uids, TRUE);
-}
-
-static void
-druid_destroy_cb (gpointer user_data, GObject *deadbeef)
-{
- gtk_main_quit ();
-}
-
-/**
- * em_utils_configure_account:
- * @parent: parent window for the druid to be a child of.
- *
- * Displays a druid allowing the user to configure an account. If
- * @parent is non-NULL, then the druid will be created as a child
- * window of @parent's toplevel window.
- *
- * Returns %TRUE if an account has been configured or %FALSE
- * otherwise.
- **/
-gboolean
-em_utils_configure_account (GtkWidget *parent)
-{
- MailConfigDruid *druid;
-
- druid = mail_config_druid_new ();
-
- if (parent != NULL)
- e_dialog_set_transient_for ((GtkWindow *) druid, parent);
-
- g_object_weak_ref ((GObject *) druid, (GWeakNotify) druid_destroy_cb, NULL);
- gtk_widget_show ((GtkWidget *) druid);
- gtk_grab_add ((GtkWidget *) druid);
- gtk_main ();
-
- return mail_config_is_configured ();
-}
-
-/**
- * em_utils_check_user_can_send_mail:
- * @parent: parent window for the druid to be a child of.
- *
- * If no accounts have been configured, the user will be given a
- * chance to configure an account. In the case that no accounts are
- * configured, a druid will be created. If @parent is non-NULL, then
- * the druid will be created as a child window of @parent's toplevel
- * window.
- *
- * Returns %TRUE if the user has an account configured (to send mail)
- * or %FALSE otherwise.
- **/
-gboolean
-em_utils_check_user_can_send_mail (GtkWidget *parent)
-{
- EAccount *account;
-
- if (!mail_config_is_configured ()) {
- if (!em_utils_configure_account (parent))
- return FALSE;
- }
-
- if (!(account = mail_config_get_default_account ()))
- return FALSE;
-
- /* Check for a transport */
- if (!account->transport->url)
- return FALSE;
-
- return TRUE;
-}
-
-/* Editing Filters/vFolders... */
-
-static GtkWidget *filter_editor = NULL;
-
-static void
-filter_editor_response (GtkWidget *dialog, int button, gpointer user_data)
-{
- FilterContext *fc;
-
- if (button == GTK_RESPONSE_ACCEPT) {
- char *user;
-
- fc = g_object_get_data ((GObject *) dialog, "context");
- user = g_strdup_printf ("%s/mail/filters.xml",
- mail_component_peek_base_directory (mail_component_peek ()));
- rule_context_save ((RuleContext *) fc, user);
- g_free (user);
- }
-
- gtk_widget_destroy (dialog);
-
- filter_editor = NULL;
-}
-
-static const char *filter_source_names[] = {
- "incoming",
- "outgoing",
- NULL,
-};
-
-/**
- * em_utils_edit_filters:
- * @parent: parent window
- *
- * Opens or raises the filters editor dialog so that the user may edit
- * his/her filters. If @parent is non-NULL, then the dialog will be
- * created as a child window of @parent's toplevel window.
- **/
-void
-em_utils_edit_filters (GtkWidget *parent)
-{
- const char *base_directory = mail_component_peek_base_directory (mail_component_peek ());
- char *user, *system;
- FilterContext *fc;
-
- if (filter_editor) {
- gdk_window_raise (GTK_WIDGET (filter_editor)->window);
- return;
- }
-
- fc = filter_context_new ();
- user = g_strdup_printf ("%s/mail/filters.xml", base_directory);
- system = EVOLUTION_PRIVDATADIR "/filtertypes.xml";
- rule_context_load ((RuleContext *) fc, system, user);
- g_free (user);
-
- if (((RuleContext *) fc)->error) {
- e_notice (parent, GTK_MESSAGE_ERROR,
- _("Error loading filter information:\n%s"),
- ((RuleContext *) fc)->error);
- return;
- }
-
- filter_editor = (GtkWidget *) filter_editor_new (fc, filter_source_names);
- if (parent != NULL)
- e_dialog_set_transient_for ((GtkWindow *) filter_editor, parent);
-
- gtk_window_set_title (GTK_WINDOW (filter_editor), _("Filters"));
- g_object_set_data_full ((GObject *) filter_editor, "context", fc, (GtkDestroyNotify) g_object_unref);
- g_signal_connect (filter_editor, "response", G_CALLBACK (filter_editor_response), NULL);
- gtk_widget_show (GTK_WIDGET (filter_editor));
-}
-
-/* Composing messages... */
-
-static EMsgComposer *
-create_new_composer (void)
-{
- EMsgComposer *composer;
-
- composer = e_msg_composer_new ();
-
- em_composer_utils_setup_default_callbacks (composer);
-
- return composer;
-}
-
-/**
- * em_utils_compose_new_message:
- *
- * Opens a new composer window as a child window of @parent's toplevel
- * window.
- **/
-void
-em_utils_compose_new_message (void)
-{
- GtkWidget *composer;
-
- composer = (GtkWidget *) create_new_composer ();
-
- gtk_widget_show (composer);
-}
-
-/**
- * em_utils_compose_new_message_with_mailto:
- * @url: mailto url
- *
- * Opens a new composer window as a child window of @parent's toplevel
- * window. If @url is non-NULL, the composer fields will be filled in
- * according to the values in the mailto url.
- **/
-void
-em_utils_compose_new_message_with_mailto (const char *url)
-{
- EMsgComposer *composer;
-
- if (url != NULL)
- composer = e_msg_composer_new_from_url (url);
- else
- composer = e_msg_composer_new ();
-
- em_composer_utils_setup_default_callbacks (composer);
-
- gtk_widget_show ((GtkWidget *) composer);
-}
-
-/**
- * em_utils_post_to_url:
- * @url: mailto url
- *
- * Opens a new composer window as a child window of @parent's toplevel
- * window. If @url is non-NULL, the composer will default to posting
- * mail to the folder specified by @url.
- **/
-void
-em_utils_post_to_url (const char *url)
-{
- EMsgComposer *composer;
-
- composer = e_msg_composer_new_post ();
-
- if (url != NULL)
- e_msg_composer_hdrs_set_post_to ((EMsgComposerHdrs *) ((EMsgComposer *) composer)->hdrs, url);
-
- em_composer_utils_setup_default_callbacks (composer);
-
- e_msg_composer_unset_changed (composer);
- e_msg_composer_drop_editor_undo (composer);
-
- gtk_widget_show ((GtkWidget *) composer);
-}
-
-/* Editing messages... */
-
-static void
-edit_message (CamelMimeMessage *message, CamelFolder *drafts, const char *uid)
-{
- EMsgComposer *composer;
-
- composer = e_msg_composer_new_with_message (message);
- em_composer_utils_setup_callbacks (composer, NULL, NULL, 0, 0, drafts, uid);
- e_msg_composer_unset_changed (composer);
- e_msg_composer_drop_editor_undo (composer);
-
- gtk_widget_show (GTK_WIDGET (composer));
-}
-
-/**
- * em_utils_edit_message:
- * @message: message to edit
- *
- * Opens a composer filled in with the headers/mime-parts/etc of
- * @message.
- **/
-void
-em_utils_edit_message (CamelMimeMessage *message)
-{
- g_return_if_fail (CAMEL_IS_MIME_MESSAGE (message));
-
- edit_message (message, NULL, NULL);
-}
-
-static void
-edit_messages (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, void *user_data)
-{
- int i;
-
- if (msgs == NULL)
- return;
-
- for (i = 0; i < msgs->len; i++) {
- camel_medium_remove_header (CAMEL_MEDIUM (msgs->pdata[i]), "X-Mailer");
-
- edit_message (msgs->pdata[i], folder, uids->pdata[i]);
- }
-}
-
-/**
- * em_utils_edit_messages:
- * @folder: folder containing messages to edit
- * @uids: uids of messages to edit
- *
- * Opens a composer for each message to be edited.
- **/
-void
-em_utils_edit_messages (CamelFolder *folder, GPtrArray *uids)
-{
- g_return_if_fail (CAMEL_IS_FOLDER (folder));
- g_return_if_fail (uids != NULL);
-
- mail_get_messages (folder, uids, edit_messages, NULL);
-}
-
-/* Forwarding messages... */
-
-static void
-forward_attached (CamelFolder *folder, GPtrArray *messages, CamelMimePart *part, char *subject, void *user_data)
-{
- EMsgComposer *composer;
-
- if (part == NULL)
- return;
-
- composer = create_new_composer ();
- e_msg_composer_set_headers (composer, NULL, NULL, NULL, NULL, subject);
- e_msg_composer_attach (composer, part);
-
- e_msg_composer_unset_changed (composer);
- e_msg_composer_drop_editor_undo (composer);
-
- gtk_widget_show (GTK_WIDGET (composer));
-}
-
-/**
- * em_utils_forward_attached:
- * @folder: folder containing messages to forward
- * @uids: uids of messages to forward
- *
- * If there is more than a single message in @uids, a multipart/digest
- * will be constructed and attached to a new composer window preset
- * with the appropriate header defaults for forwarding the first
- * message in the list. If only one message is to be forwarded, it is
- * forwarded as a simple message/rfc822 attachment.
- **/
-void
-em_utils_forward_attached (CamelFolder *folder, GPtrArray *uids)
-{
- g_return_if_fail (CAMEL_IS_FOLDER (folder));
- g_return_if_fail (uids != NULL);
-
- mail_build_attachment (folder, uids, forward_attached, NULL);
-}
-
-static void
-forward_non_attached (GPtrArray *messages, int style)
-{
- CamelMimeMessage *message;
- CamelDataWrapper *wrapper;
- EMsgComposer *composer;
- char *subject, *text;
- int i;
- guint32 flags;
-
- if (messages->len == 0)
- return;
-
- flags = EM_FORMAT_QUOTE_HEADERS;
- if (style == MAIL_CONFIG_FORWARD_QUOTED)
- flags |= EM_FORMAT_QUOTE_CITE;
-
- for (i = 0; i < messages->len; i++) {
- message = messages->pdata[i];
- subject = mail_tool_generate_forward_subject (message);
-
- text = em_utils_message_to_html (message, _("-------- Forwarded Message --------"), flags);
-
- if (text) {
- composer = create_new_composer ();
- e_msg_composer_set_headers (composer, NULL, NULL, NULL, NULL, subject);
- e_msg_composer_set_body_text (composer, text);
-
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (message));
- if (CAMEL_IS_MULTIPART (wrapper))
- e_msg_composer_add_message_attachments (composer, message, FALSE);
-
- e_msg_composer_unset_changed (composer);
- e_msg_composer_drop_editor_undo (composer);
-
- gtk_widget_show (GTK_WIDGET (composer));
-
- g_free (text);
- }
-
- g_free (subject);
- }
-}
-
-static void
-forward_inline (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, void *user_data)
-{
- forward_non_attached (messages, MAIL_CONFIG_FORWARD_INLINE);
-}
-
-/**
- * em_utils_forward_inline:
- * @folder: folder containing messages to forward
- * @uids: uids of messages to forward
- *
- * Forwards each message in the 'inline' form, each in its own composer window.
- **/
-void
-em_utils_forward_inline (CamelFolder *folder, GPtrArray *uids)
-{
- g_return_if_fail (CAMEL_IS_FOLDER (folder));
- g_return_if_fail (uids != NULL);
-
- mail_get_messages (folder, uids, forward_inline, NULL);
-}
-
-static void
-forward_quoted (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, void *user_data)
-{
- forward_non_attached (messages, MAIL_CONFIG_FORWARD_QUOTED);
-}
-
-/**
- * em_utils_forward_quoted:
- * @folder: folder containing messages to forward
- * @uids: uids of messages to forward
- *
- * Forwards each message in the 'quoted' form (each line starting with
- * a "> "), each in its own composer window.
- **/
-void
-em_utils_forward_quoted (CamelFolder *folder, GPtrArray *uids)
-{
- g_return_if_fail (CAMEL_IS_FOLDER (folder));
- g_return_if_fail (uids != NULL);
-
- mail_get_messages (folder, uids, forward_quoted, NULL);
-}
-
-/**
- * em_utils_forward_message:
- * @parent: parent window
- * @message: message to be forwarded
- *
- * Forwards a message in the user's configured default style.
- **/
-void
-em_utils_forward_message (CamelMimeMessage *message)
-{
- GPtrArray *messages;
- CamelMimePart *part;
- GConfClient *gconf;
- char *subject;
- int mode;
-
- messages = g_ptr_array_new ();
- g_ptr_array_add (messages, message);
-
- gconf = mail_config_get_gconf_client ();
- mode = gconf_client_get_int (gconf, "/apps/evolution/mail/format/forward_style", NULL);
-
- switch (mode) {
- case MAIL_CONFIG_FORWARD_ATTACHED:
- default:
- part = mail_tool_make_message_attachment (message);
-
- subject = mail_tool_generate_forward_subject (message);
-
- forward_attached (NULL, messages, part, subject, NULL);
- camel_object_unref (part);
- g_free (subject);
- break;
- case MAIL_CONFIG_FORWARD_INLINE:
- forward_non_attached (messages, MAIL_CONFIG_FORWARD_INLINE);
- break;
- case MAIL_CONFIG_FORWARD_QUOTED:
- forward_non_attached (messages, MAIL_CONFIG_FORWARD_QUOTED);
- break;
- }
-
- g_ptr_array_free (messages, TRUE);
-}
-
-/**
- * em_utils_forward_messages:
- * @folder: folder containing messages to forward
- * @uids: uids of messages to forward
- *
- * Forwards a group of messages in the user's configured default
- * style.
- **/
-void
-em_utils_forward_messages (CamelFolder *folder, GPtrArray *uids)
-{
- GConfClient *gconf;
- int mode;
-
- gconf = mail_config_get_gconf_client ();
- mode = gconf_client_get_int (gconf, "/apps/evolution/mail/format/forward_style", NULL);
-
- switch (mode) {
- case MAIL_CONFIG_FORWARD_ATTACHED:
- default:
- em_utils_forward_attached (folder, uids);
- break;
- case MAIL_CONFIG_FORWARD_INLINE:
- em_utils_forward_inline (folder, uids);
- break;
- case MAIL_CONFIG_FORWARD_QUOTED:
- em_utils_forward_quoted (folder, uids);
- break;
- }
-}
-
-/* Redirecting messages... */
-
-static EMsgComposer *
-redirect_get_composer (CamelMimeMessage *message)
-{
- EMsgComposer *composer;
- EAccount *account;
-
- /* QMail will refuse to send a message if it finds one of
- it's Delivered-To headers in the message, so remove all
- Delivered-To headers. Fixes bug #23635. */
- while (camel_medium_get_header (CAMEL_MEDIUM (message), "Delivered-To"))
- camel_medium_remove_header (CAMEL_MEDIUM (message), "Delivered-To");
-
- account = guess_account (message);
-
- composer = e_msg_composer_new_redirect (message, account ? account->name : NULL);
-
- em_composer_utils_setup_default_callbacks (composer);
-
- return composer;
-}
-
-/**
- * em_utils_redirect_message:
- * @message: message to redirect
- *
- * Opens a composer to redirect @message (Note: only headers will be
- * editable). Adds Resent-From/Resent-To/etc headers.
- **/
-void
-em_utils_redirect_message (CamelMimeMessage *message)
-{
- EMsgComposer *composer;
- CamelDataWrapper *wrapper;
-
- g_return_if_fail (CAMEL_IS_MIME_MESSAGE (message));
-
- composer = redirect_get_composer (message);
-
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (message));
- if (CAMEL_IS_MULTIPART (wrapper))
- e_msg_composer_add_message_attachments (composer, message, FALSE);
-
- gtk_widget_show (GTK_WIDGET (composer));
- e_msg_composer_unset_changed (composer);
- e_msg_composer_drop_editor_undo (composer);
-}
-
-static void
-redirect_msg (CamelFolder *folder, const char *uid, CamelMimeMessage *message, void *user_data)
-{
- if (message == NULL)
- return;
-
- em_utils_redirect_message (message);
-}
-
-/**
- * em_utils_redirect_message_by_uid:
- * @folder: folder containing message to be redirected
- * @uid: uid of message to be redirected
- *
- * Opens a composer to redirect the message (Note: only headers will
- * be editable). Adds Resent-From/Resent-To/etc headers.
- **/
-void
-em_utils_redirect_message_by_uid (CamelFolder *folder, const char *uid)
-{
- g_return_if_fail (CAMEL_IS_FOLDER (folder));
- g_return_if_fail (uid != NULL);
-
- mail_get_message (folder, uid, redirect_msg, NULL, mail_thread_new);
-}
-
-/* Replying to messages... */
-
-static GHashTable *
-generate_account_hash (void)
-{
- GHashTable *account_hash;
- EAccount *account, *def;
- EAccountList *accounts;
- EIterator *iter;
-
- accounts = mail_config_get_accounts ();
- account_hash = g_hash_table_new (camel_strcase_hash, camel_strcase_equal);
-
- /* add the default account to the hash first */
- if ((def = mail_config_get_default_account ())) {
- if (def->id->address)
- g_hash_table_insert (account_hash, (char *) def->id->address, (void *) def);
- }
-
- iter = e_list_get_iterator ((EList *) accounts);
- while (e_iterator_is_valid (iter)) {
- account = (EAccount *) e_iterator_get (iter);
-
- if (account->id->address) {
- EAccount *acnt;
-
- /* Accounts with identical email addresses that are enabled
- * take precedence over the accounts that aren't. If all
- * accounts with matching email addresses are disabled, then
- * the first one in the list takes precedence. The default
- * account always takes precedence no matter what.
- */
- acnt = g_hash_table_lookup (account_hash, account->id->address);
- if (acnt && acnt != def && !acnt->enabled && account->enabled) {
- g_hash_table_remove (account_hash, acnt->id->address);
- acnt = NULL;
- }
-
- if (!acnt)
- g_hash_table_insert (account_hash, (char *) account->id->address, (void *) account);
- }
-
- e_iterator_next (iter);
- }
-
- g_object_unref (iter);
-
- return account_hash;
-}
-
-static EABDestination **
-em_utils_camel_address_to_destination (CamelInternetAddress *iaddr)
-{
- EABDestination *dest, **destv;
- int n, i, j;
-
- if (iaddr == NULL)
- return NULL;
-
- if ((n = camel_address_length ((CamelAddress *) iaddr)) == 0)
- return NULL;
-
- destv = g_malloc (sizeof (EABDestination *) * (n + 1));
- for (i = 0, j = 0; i < n; i++) {
- const char *name, *addr;
-
- if (camel_internet_address_get (iaddr, i, &name, &addr)) {
- dest = eab_destination_new ();
- eab_destination_set_name (dest, name);
- eab_destination_set_email (dest, addr);
-
- destv[j++] = dest;
- }
- }
-
- if (j == 0) {
- g_free (destv);
- return NULL;
- }
-
- destv[j] = NULL;
-
- return destv;
-}
-
-static EMsgComposer *
-reply_get_composer (CamelMimeMessage *message, EAccount *account,
- CamelInternetAddress *to, CamelInternetAddress *cc)
-{
- const char *message_id, *references;
- EABDestination **tov, **ccv;
- EMsgComposer *composer;
- char *subject;
-
- g_return_val_if_fail (CAMEL_IS_MIME_MESSAGE (message), NULL);
- g_return_val_if_fail (to == NULL || CAMEL_IS_INTERNET_ADDRESS (to), NULL);
- g_return_val_if_fail (cc == NULL || CAMEL_IS_INTERNET_ADDRESS (cc), NULL);
-
- composer = e_msg_composer_new ();
-
- /* construct the tov/ccv */
- tov = em_utils_camel_address_to_destination (to);
- ccv = em_utils_camel_address_to_destination (cc);
-
- /* Set the subject of the new message. */
- if ((subject = (char *) camel_mime_message_get_subject (message))) {
- if (strncasecmp (subject, "Re: ", 4) != 0)
- subject = g_strdup_printf ("Re: %s", subject);
- else
- subject = g_strdup (subject);
- } else {
- subject = g_strdup ("");
- }
-
- e_msg_composer_set_headers (composer, account ? account->name : NULL, tov, ccv, NULL, subject);
-
- 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);
- }
-
- e_msg_composer_drop_editor_undo (composer);
-
- return composer;
-}
-
-static EAccount *
-guess_account (CamelMimeMessage *message)
-{
- const CamelInternetAddress *to, *cc;
- GHashTable *account_hash;
- EAccount *account = NULL;
- const char *addr;
- int i;
-
- to = camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_TO);
- cc = camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_CC);
-
- if (to == NULL && cc == NULL)
- return NULL;
-
- account_hash = generate_account_hash ();
-
- if (to) {
- for (i = 0; camel_internet_address_get (to, i, NULL, &addr); i++) {
- account = g_hash_table_lookup (account_hash, addr);
- if (account)
- goto found;
- }
- }
-
- if (cc) {
- for (i = 0; camel_internet_address_get (cc, i, NULL, &addr); i++) {
- account = g_hash_table_lookup (account_hash, addr);
- if (account)
- goto found;
- }
- }
-
- found:
-
- g_hash_table_destroy (account_hash);
-
- return account;
-}
-
-static void
-get_reply_sender (CamelMimeMessage *message, CamelInternetAddress **to)
-{
- const CamelInternetAddress *reply_to;
- const char *name, *addr;
- int i;
-
- reply_to = camel_mime_message_get_reply_to (message);
- if (!reply_to)
- reply_to = camel_mime_message_get_from (message);
-
- if (reply_to) {
- *to = camel_internet_address_new ();
-
- for (i = 0; camel_internet_address_get (reply_to, i, &name, &addr); i++)
- camel_internet_address_add (*to, name, addr);
- }
-}
-
-static gboolean
-get_reply_list (CamelMimeMessage *message, CamelInternetAddress **to)
-{
- const char *header, *p;
- char *addr;
-
- /* Examples:
- *
- * List-Post: <mailto:list@host.com>
- * List-Post: <mailto:moderator@host.com?subject=list%20posting>
- * List-Post: NO (posting not allowed on this list)
- */
- if (!(header = camel_medium_get_header ((CamelMedium *) message, "List-Post")))
- return FALSE;
-
- while (*header == ' ' || *header == '\t')
- header++;
-
- /* check for NO */
- if (!strncasecmp (header, "NO", 2))
- return FALSE;
-
- /* Search for the first mailto angle-bracket enclosed URL.
- * (See rfc2369, Section 2, paragraph 3 for details) */
- if (!(header = camel_strstrcase (header, "<mailto:")))
- return FALSE;
-
- header += 8;
-
- p = header;
- while (*p && !strchr ("?>", *p))
- p++;
-
- addr = g_strndup (header, p - header);
-
- *to = camel_internet_address_new ();
- camel_internet_address_add (*to, NULL, addr);
-
- g_free (addr);
-
- return TRUE;
-}
-
-static void
-concat_unique_addrs (CamelInternetAddress *dest, const CamelInternetAddress *src, GHashTable *rcpt_hash)
-{
- const char *name, *addr;
- int i;
-
- for (i = 0; camel_internet_address_get (src, i, &name, &addr); i++) {
- if (!g_hash_table_lookup (rcpt_hash, addr)) {
- camel_internet_address_add (dest, name, addr);
- g_hash_table_insert (rcpt_hash, (char *) addr, GINT_TO_POINTER (1));
- }
- }
-}
-
-static void
-get_reply_all (CamelMimeMessage *message, CamelInternetAddress **to, CamelInternetAddress **cc)
-{
- const CamelInternetAddress *reply_to, *to_addrs, *cc_addrs;
- const char *name, *addr;
- GHashTable *rcpt_hash;
- int i;
-
- rcpt_hash = generate_account_hash ();
-
- reply_to = camel_mime_message_get_reply_to (message);
- if (!reply_to)
- reply_to = camel_mime_message_get_from (message);
-
- to_addrs = camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_TO);
- cc_addrs = camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_CC);
-
- *to = camel_internet_address_new ();
- *cc = camel_internet_address_new ();
-
- if (reply_to) {
- for (i = 0; camel_internet_address_get (reply_to, i, &name, &addr); i++) {
- /* ignore references to the Reply-To address in the To and Cc lists */
- if (addr && !g_hash_table_lookup (rcpt_hash, addr)) {
- /* In the case that we are doing a Reply-To-All, we do not want
- to include the user's email address because replying to oneself
- is kinda silly. */
-
- camel_internet_address_add (*to, name, addr);
- g_hash_table_insert (rcpt_hash, (char *) addr, GINT_TO_POINTER (1));
- }
- }
- }
-
- concat_unique_addrs (*cc, to_addrs, rcpt_hash);
- concat_unique_addrs (*cc, cc_addrs, rcpt_hash);
-
- /* promote the first Cc: address to To: if To: is empty */
- if (camel_address_length ((CamelAddress *) *to) == 0 && camel_address_length ((CamelAddress *) *cc) > 0) {
- camel_internet_address_get (*cc, 0, &name, &addr);
- camel_internet_address_add (*to, name, addr);
- camel_address_remove ((CamelAddress *) *cc, 0);
- }
-
- g_hash_table_destroy (rcpt_hash);
-}
-
-static void
-composer_set_body (EMsgComposer *composer, CamelMimeMessage *message)
-{
- const CamelInternetAddress *sender;
- char *text, *credits, format[256];
- const char *name, *addr;
- CamelMimePart *part;
- GConfClient *gconf;
- time_t date;
- int date_offset;
-
- gconf = mail_config_get_gconf_client ();
-
- switch (gconf_client_get_int (gconf, "/apps/evolution/mail/format/reply_style", NULL)) {
- case MAIL_CONFIG_REPLY_DO_NOT_QUOTE:
- /* do nothing */
- break;
- case MAIL_CONFIG_REPLY_ATTACH:
- /* attach the original message as an attachment */
- part = mail_tool_make_message_attachment (message);
- e_msg_composer_attach (composer, part);
- camel_object_unref (part);
- break;
- case MAIL_CONFIG_REPLY_QUOTED:
- default:
- /* do what any sane user would want when replying... */
- sender = camel_mime_message_get_from (message);
- if (sender != NULL && camel_address_length (CAMEL_ADDRESS (sender)) > 0) {
- camel_internet_address_get (sender, 0, &name, &addr);
- } else {
- name = _("an unknown sender");
- }
-
- date = camel_mime_message_get_date(message, &date_offset);
- /* Convert to UTC */
- date += (date_offset / 100) * 60 * 60;
- date += (date_offset % 100) * 60;
-
- /* translators: attribution string used when quoting messages,
- it must contain a single single %%+05d followed by a single '%%s' */
- e_utf8_strftime(format, sizeof(format), _("On %a, %Y-%m-%d at %H:%M %%+05d, %%s wrote:"), gmtime(&date));
- credits = g_strdup_printf(format, date_offset, name && *name ? name : addr);
- text = em_utils_message_to_html(message, credits, EM_FORMAT_QUOTE_CITE);
- g_free (credits);
- e_msg_composer_set_body_text(composer, text);
- g_free (text);
- break;
- }
-
- e_msg_composer_drop_editor_undo (composer);
-}
-
-/**
- * em_utils_reply_to_message:
- * @message: message to reply to
- * @mode: reply mode
- *
- * Creates a new composer ready to reply to @message.
- **/
-void
-em_utils_reply_to_message (CamelMimeMessage *message, int mode)
-{
- CamelInternetAddress *to = NULL, *cc = NULL;
- EMsgComposer *composer;
- EAccount *account;
-
- account = guess_account (message);
-
- switch (mode) {
- case REPLY_MODE_SENDER:
- get_reply_sender (message, &to);
- break;
- case REPLY_MODE_LIST:
- if (get_reply_list (message, &to))
- break;
- case REPLY_MODE_ALL:
- get_reply_all (message, &to, &cc);
- break;
- }
-
- composer = reply_get_composer (message, account, to, cc);
- e_msg_composer_add_message_attachments (composer, message, TRUE);
-
- if (to != NULL)
- camel_object_unref (to);
-
- if (cc != NULL)
- camel_object_unref (cc);
-
- composer_set_body (composer, message);
-
- em_composer_utils_setup_default_callbacks (composer);
-
- gtk_widget_show (GTK_WIDGET (composer));
- e_msg_composer_unset_changed (composer);
-}
-
-static void
-reply_to_message (CamelFolder *folder, const char *uid, CamelMimeMessage *message, void *user_data)
-{
- CamelInternetAddress *to = NULL, *cc = NULL;
- EMsgComposer *composer;
- EAccount *account;
- guint32 flags;
- int mode;
-
- mode = GPOINTER_TO_INT (user_data);
-
- account = guess_account (message);
- flags = CAMEL_MESSAGE_ANSWERED | CAMEL_MESSAGE_SEEN;
-
- switch (mode) {
- case REPLY_MODE_SENDER:
- get_reply_sender (message, &to);
- break;
- case REPLY_MODE_LIST:
- flags |= CAMEL_MESSAGE_ANSWERED_ALL;
- if (get_reply_list (message, &to))
- break;
- case REPLY_MODE_ALL:
- flags |= CAMEL_MESSAGE_ANSWERED_ALL;
- get_reply_all (message, &to, &cc);
- break;
- }
-
- composer = reply_get_composer (message, account, to, cc);
- e_msg_composer_add_message_attachments (composer, message, TRUE);
-
- if (to != NULL)
- camel_object_unref (to);
-
- if (cc != NULL)
- camel_object_unref (cc);
-
- composer_set_body (composer, message);
-
- em_composer_utils_setup_callbacks (composer, folder, uid, flags, flags, NULL, NULL);
-
- gtk_widget_show (GTK_WIDGET (composer));
- e_msg_composer_unset_changed (composer);
-}
-
-/**
- * em_utils_reply_to_message_by_uid:
- * @folder: folder containing message to reply to
- * @uid: message uid
- * @mode: reply mode
- *
- * Creates a new composer ready to reply to the message referenced by
- * @folder and @uid.
- **/
-void
-em_utils_reply_to_message_by_uid (CamelFolder *folder, const char *uid, int mode)
-{
- g_return_if_fail (CAMEL_IS_FOLDER (folder));
- g_return_if_fail (uid != NULL);
-
- mail_get_message (folder, uid, reply_to_message, GINT_TO_POINTER (mode), mail_thread_new);
-}
-
-/* Posting replies... */
-
-static void
-post_reply_to_message (CamelFolder *folder, const char *uid, CamelMimeMessage *message, void *user_data)
-{
- /* FIXME: would be nice if this shared more code with reply_get_composer() */
- const char *message_id, *references;
- CamelInternetAddress *to = NULL;
- EABDestination **tov = NULL;
- EMsgComposer *composer;
- char *subject, *url;
- EAccount *account;
- guint32 flags;
-
- account = guess_account (message);
- flags = CAMEL_MESSAGE_ANSWERED | CAMEL_MESSAGE_SEEN;
-
- get_reply_sender (message, &to);
-
- composer = e_msg_composer_new_post ();
-
- /* construct the tov/ccv */
- tov = em_utils_camel_address_to_destination (to);
-
- /* Set the subject of the new message. */
- if ((subject = (char *) camel_mime_message_get_subject (message))) {
- if (strncasecmp (subject, "Re: ", 4) != 0)
- subject = g_strdup_printf ("Re: %s", subject);
- else
- subject = g_strdup (subject);
- } else {
- subject = g_strdup ("");
- }
-
- e_msg_composer_set_headers (composer, account ? account->name : NULL, tov, NULL, NULL, subject);
-
- g_free (subject);
-
- url = mail_tools_folder_to_url (folder);
- e_msg_composer_hdrs_set_post_to ((EMsgComposerHdrs *) composer->hdrs, url);
- g_free (url);
-
- /* 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);
- }
-
- e_msg_composer_drop_editor_undo (composer);
-
- e_msg_composer_add_message_attachments (composer, message, TRUE);
-
- if (to != NULL)
- camel_object_unref (to);
-
- composer_set_body (composer, message);
-
- em_composer_utils_setup_callbacks (composer, folder, uid, flags, flags, NULL, NULL);
-
- gtk_widget_show (GTK_WIDGET (composer));
- e_msg_composer_unset_changed (composer);
-}
-
-/**
- * em_utils_post_reply_to_message_by_uid:
- * @folder: folder containing message to reply to
- * @uid: message uid
- * @mode: reply mode
- *
- * Creates a new composer (post mode) ready to reply to the message
- * referenced by @folder and @uid.
- **/
-void
-em_utils_post_reply_to_message_by_uid (CamelFolder *folder, const char *uid)
-{
- g_return_if_fail (CAMEL_IS_FOLDER (folder));
- g_return_if_fail (uid != NULL);
-
- mail_get_message (folder, uid, post_reply_to_message, NULL, mail_thread_new);
-}
-
-/* Saving messages... */
-
-static GtkFileSelection *
-emu_get_save_filesel (GtkWidget *parent, const char *title, const char *name)
-{
- GtkFileSelection *filesel;
- char *gdir, *mname = NULL, *filename;
- const char *realname, *dir;
- GConfClient *gconf;
-
- filesel = (GtkFileSelection *)gtk_file_selection_new(title);
- if (parent)
- e_dialog_set_transient_for((GtkWindow *)filesel, parent);
-
- gconf = gconf_client_get_default();
- dir = gdir = gconf_client_get_string(gconf, "/apps/evolution/mail/save_dir", NULL);
- g_object_unref(gconf);
- if (dir == NULL)
- dir = g_get_home_dir();
-
- if (name && name[0]) {
- realname = mname = g_strdup(name);
- e_filename_make_safe(mname);
- } else {
- realname = "/";
- }
-
- filename = g_build_filename(dir, realname, NULL);
- gtk_file_selection_set_filename(filesel, filename);
- g_free(filename);
- g_free(mname);
- g_free (gdir);
-
- return filesel;
-}
-
-static void
-emu_update_save_path(const char *filename)
-{
- char *dir = g_path_get_dirname(filename);
- GConfClient *gconf = gconf_client_get_default();
-
- gconf_client_set_string(gconf, "/apps/evolution/mail/save_dir", dir, NULL);
- g_object_unref(gconf);
- g_free(dir);
-}
-
-static gboolean
-emu_can_save(GtkWindow *parent, const char *path)
-{
- struct stat st;
-
- if (path[0] == 0)
- return FALSE;
-
- /* make sure we can actually save to it... */
- if (stat (path, &st) != -1 && !S_ISREG (st.st_mode))
- return FALSE;
-
- if (access (path, F_OK) == 0) {
- if (access (path, W_OK) != 0) {
- e_notice (parent, GTK_MESSAGE_ERROR,
- _("Cannot save to `%s'\n %s"), path, g_strerror (errno));
- return FALSE;
- }
-
- return em_utils_prompt_user (parent, GTK_RESPONSE_NO, NULL,
- _("`%s' already exists.\nOverwrite it?"), path);
- }
-
- return TRUE;
-}
-
-static void
-emu_save_part_response(GtkFileSelection *filesel, int response, CamelMimePart *part)
-{
- if (response == GTK_RESPONSE_OK) {
- const char *path = gtk_file_selection_get_filename(filesel);
-
- if (!emu_can_save((GtkWindow *)filesel, path))
- return;
-
- emu_update_save_path(path);
- /* FIXME: popup error if it fails? */
- mail_save_part(part, path, NULL, NULL);
- }
-
- gtk_widget_destroy((GtkWidget *)filesel);
- camel_object_unref(part);
-}
-
-/**
- * em_utils_save_part:
- * @parent: parent window
- * @prompt: prompt string
- * @part: part to save
- *
- * Saves a mime part to disk (prompting the user for filename).
- **/
-void
-em_utils_save_part(GtkWidget *parent, const char *prompt, CamelMimePart *part)
-{
- const char *name;
- GtkFileSelection *filesel;
-
- name = camel_mime_part_get_filename(part);
- if (name == NULL) {
- if (CAMEL_IS_MIME_MESSAGE(part)) {
- name = camel_mime_message_get_subject((CamelMimeMessage *)part);
- if (name == NULL)
- name = _("message");
- } else {
- name = _("attachment");
- }
- }
-
- filesel = emu_get_save_filesel(parent, prompt, name);
- camel_object_ref(part);
- g_signal_connect(filesel, "response", G_CALLBACK(emu_save_part_response), part);
- gtk_widget_show((GtkWidget *)filesel);
-}
-
-
-struct _save_messages_data {
- CamelFolder *folder;
- GPtrArray *uids;
-};
-
-static void
-emu_save_messages_response(GtkFileSelection *filesel, int response, struct _save_messages_data *data)
-{
- if (response == GTK_RESPONSE_OK) {
- const char *path = gtk_file_selection_get_filename(filesel);
-
- if (!emu_can_save((GtkWindow *)filesel, path))
- return;
-
- emu_update_save_path(path);
- mail_save_messages(data->folder, data->uids, path, NULL, NULL);
- data->uids = NULL;
- }
-
- camel_object_unref(data->folder);
- if (data->uids)
- em_utils_uids_free(data->uids);
- g_free(data);
- gtk_widget_destroy((GtkWidget *)filesel);
-}
-
-/**
- * em_utils_save_messages:
- * @parent: parent window
- * @folder: folder containing messages to save
- * @uids: uids of messages to save
- *
- * Saves a group of messages to disk in mbox format (prompting the
- * user for filename).
- **/
-void
-em_utils_save_messages (GtkWidget *parent, CamelFolder *folder, GPtrArray *uids)
-{
- struct _save_messages_data *data;
- GtkFileSelection *filesel;
-
- g_return_if_fail (CAMEL_IS_FOLDER (folder));
- g_return_if_fail (uids != NULL);
-
- filesel = emu_get_save_filesel(parent, _("Save Message..."), NULL);
- camel_object_ref(folder);
-
- data = g_malloc(sizeof(struct _save_messages_data));
- data->folder = folder;
- data->uids = uids;
-
- g_signal_connect(filesel, "response", G_CALLBACK(emu_save_messages_response), data);
- gtk_widget_show((GtkWidget *)filesel);
-}
-
-/* ********************************************************************** */
-
-static void
-emu_add_address_cb(BonoboListener *listener, const char *name, const CORBA_any *any, CORBA_Environment *ev, void *data)
-{
- char *type = bonobo_event_subtype(name);
-
- if (!strcmp(type, "Destroy"))
- gtk_widget_destroy((GtkWidget *)data);
-
- g_free(type);
-}
-
-/**
- * em_utils_add_address:
- * @parent:
- * @email:
- *
- * Add address @email to the addressbook.
- **/
-void em_utils_add_address(struct _GtkWidget *parent, const char *email)
-{
- GtkWidget *win;
- GtkWidget *control;
- /*GtkWidget *socket;*/
-
- win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
- gtk_window_set_title((GtkWindow *)win, _("Add address"));
-
- control = bonobo_widget_new_control("OAFIID:GNOME_Evolution_Addressbook_AddressPopup:" BASE_VERSION, CORBA_OBJECT_NIL);
- bonobo_widget_set_property((BonoboWidget *)control, "email", TC_CORBA_string, email, NULL);
-
- bonobo_event_source_client_add_listener(bonobo_widget_get_objref((BonoboWidget *)control), emu_add_address_cb, NULL, NULL, win);
-
- /*socket = find_socket (GTK_CONTAINER (control));
- g_object_weak_ref ((GObject *) socket, (GWeakNotify) gtk_widget_destroy, win);*/
-
- gtk_container_add((GtkContainer *)win, control);
- gtk_widget_show_all(win);
-}
-
-/* ********************************************************************** */
-/* Flag-for-Followup... */
-
-/* tag-editor callback data */
-struct ted_t {
- MessageTagEditor *editor;
- CamelFolder *folder;
- GPtrArray *uids;
-};
-
-static void
-ted_free (struct ted_t *ted)
-{
- camel_object_unref (ted->folder);
- em_utils_uids_free (ted->uids);
- g_free (ted);
-}
-
-static void
-tag_editor_response (GtkWidget *dialog, int button, struct ted_t *ted)
-{
- CamelFolder *folder;
- CamelTag *tags, *t;
- GPtrArray *uids;
- int i;
-
- if (button == GTK_RESPONSE_OK && (tags = message_tag_editor_get_tag_list (ted->editor))) {
- folder = ted->folder;
- uids = ted->uids;
-
- camel_folder_freeze (folder);
- for (i = 0; i < uids->len; i++) {
- for (t = tags; t; t = t->next)
- camel_folder_set_message_user_tag (folder, uids->pdata[i], t->name, t->value);
- }
-
- camel_folder_thaw (folder);
- camel_tag_list_free (&tags);
- }
-
- gtk_widget_destroy (dialog);
-}
-
-/**
- * em_utils_flag_for_followup:
- * @parent: parent window
- * @folder: folder containing messages to flag
- * @uids: uids of messages to flag
- *
- * Open the Flag-for-Followup editor for the messages specified by
- * @folder and @uids.
- **/
-void
-em_utils_flag_for_followup (GtkWidget *parent, CamelFolder *folder, GPtrArray *uids)
-{
- GtkWidget *editor;
- struct ted_t *ted;
- int i;
-
- g_return_if_fail (CAMEL_IS_FOLDER (folder));
- g_return_if_fail (uids != NULL);
-
- editor = (GtkWidget *) message_tag_followup_new ();
-
- if (parent != NULL)
- e_dialog_set_transient_for ((GtkWindow *) editor, parent);
-
- camel_object_ref (folder);
-
- ted = g_new (struct ted_t, 1);
- ted->editor = MESSAGE_TAG_EDITOR (editor);
- ted->folder = folder;
- ted->uids = uids;
-
- for (i = 0; i < uids->len; i++) {
- CamelMessageInfo *info;
-
- info = camel_folder_get_message_info (folder, uids->pdata[i]);
- message_tag_followup_append_message (MESSAGE_TAG_FOLLOWUP (editor),
- camel_message_info_from (info),
- camel_message_info_subject (info));
- }
-
- /* special-case... */
- if (uids->len == 1) {
- CamelMessageInfo *info;
-
- info = camel_folder_get_message_info (folder, uids->pdata[0]);
- if (info) {
- if (info->user_tags)
- message_tag_editor_set_tag_list (MESSAGE_TAG_EDITOR (editor), info->user_tags);
- camel_folder_free_message_info (folder, info);
- }
- }
-
- g_signal_connect (editor, "response", G_CALLBACK (tag_editor_response), ted);
- g_object_weak_ref ((GObject *) editor, (GWeakNotify) ted_free, ted);
-
- gtk_widget_show (editor);
-}
-
-/**
- * em_utils_flag_for_followup_clear:
- * @parent: parent window
- * @folder: folder containing messages to unflag
- * @uids: uids of messages to unflag
- *
- * Clears the Flag-for-Followup flag on the messages referenced by
- * @folder and @uids.
- **/
-void
-em_utils_flag_for_followup_clear (GtkWidget *parent, CamelFolder *folder, GPtrArray *uids)
-{
- int i;
-
- g_return_if_fail (CAMEL_IS_FOLDER (folder));
- g_return_if_fail (uids != NULL);
-
- camel_folder_freeze (folder);
- for (i = 0; i < uids->len; i++) {
- camel_folder_set_message_user_tag (folder, uids->pdata[i], "follow-up", "");
- camel_folder_set_message_user_tag (folder, uids->pdata[i], "due-by", "");
- camel_folder_set_message_user_tag (folder, uids->pdata[i], "completed-on", "");
- }
- camel_folder_thaw (folder);
-
- em_utils_uids_free (uids);
-}
-
-/**
- * em_utils_flag_for_followup_completed:
- * @parent: parent window
- * @folder: folder containing messages to 'complete'
- * @uids: uids of messages to 'complete'
- *
- * Sets the completed state (and date/time) for each message
- * referenced by @folder and @uids that is marked for
- * Flag-for-Followup.
- **/
-void
-em_utils_flag_for_followup_completed (GtkWidget *parent, CamelFolder *folder, GPtrArray *uids)
-{
- char *now;
- int i;
-
- g_return_if_fail (CAMEL_IS_FOLDER (folder));
- g_return_if_fail (uids != NULL);
-
- now = camel_header_format_date (time (NULL), 0);
-
- camel_folder_freeze (folder);
- for (i = 0; i < uids->len; i++) {
- const char *tag;
-
- tag = camel_folder_get_message_user_tag (folder, uids->pdata[i], "follow-up");
- if (tag == NULL || *tag == '\0')
- continue;
-
- camel_folder_set_message_user_tag (folder, uids->pdata[i], "completed-on", now);
- }
- camel_folder_thaw (folder);
-
- g_free (now);
-
- em_utils_uids_free (uids);
-}
-
-#include "camel/camel-stream-mem.h"
-#include "camel/camel-stream-filter.h"
-#include "camel/camel-mime-filter-from.h"
-
-/* This kind of sucks, because for various reasons most callers need to run synchronously
- in the gui thread, however this could take a long, blocking time, to run */
-static int
-em_utils_write_messages_to_stream(CamelFolder *folder, GPtrArray *uids, CamelStream *stream)
-{
- CamelStreamFilter *filtered_stream;
- CamelMimeFilterFrom *from_filter;
- int i, res = 0;
-
- 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(from_filter);
-
- for (i=0; i<uids->len; i++) {
- CamelMimeMessage *message;
- char *from;
-
- message = camel_folder_get_message(folder, uids->pdata[i], NULL);
- if (message == NULL) {
- res = -1;
- break;
- }
-
- /* we need to flush after each stream write since we are writing to the same stream */
- from = camel_mime_message_build_mbox_from(message);
-
- 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)
- res = -1;
-
- g_free(from);
- camel_object_unref(message);
-
- if (res == -1)
- break;
- }
-
- camel_object_unref(filtered_stream);
-
- return res;
-}
-
-/* This kind of sucks, because for various reasons most callers need to run synchronously
- in the gui thread, however this could take a long, blocking time, to run */
-static int
-em_utils_read_messages_from_stream(CamelFolder *folder, CamelStream *stream)
-{
- CamelException *ex = camel_exception_new();
- CamelMimeParser *mp = camel_mime_parser_new();
- int res = -1;
-
- camel_mime_parser_scan_from(mp, TRUE);
- camel_mime_parser_init_with_stream(mp, stream);
- camel_object_unref(stream);
-
- while (camel_mime_parser_step(mp, 0, 0) == CAMEL_MIME_PARSER_STATE_FROM) {
- CamelMimeMessage *msg;
-
- /* NB: de-from filter, once written */
- msg = camel_mime_message_new();
- if (camel_mime_part_construct_from_parser((CamelMimePart *)msg, mp) == -1) {
- camel_object_unref(msg);
- break;
- }
-
- camel_folder_append_message(folder, msg, NULL, NULL, ex);
- camel_object_unref(msg);
-
- if (camel_exception_is_set (ex))
- break;
-
- camel_mime_parser_step(mp, 0, 0);
- }
-
- camel_object_unref(mp);
- if (!camel_exception_is_set(ex))
- res = 0;
- camel_exception_free(ex);
-
- return res;
-}
-
-/**
- * em_utils_selection_set_mailbox:
- * @data: selection data
- * @folder: folder containign messages to copy into the selection
- * @uids: uids of the messages to copy into the selection
- *
- * Creates a mailbox-format selection.
- * Warning: Could be BIG!
- * Warning: This could block the ui for an extended period.
- **/
-void
-em_utils_selection_set_mailbox(GtkSelectionData *data, CamelFolder *folder, GPtrArray *uids)
-{
- CamelStream *stream;
-
- stream = camel_stream_mem_new();
- if (em_utils_write_messages_to_stream(folder, uids, stream) == 0)
- gtk_selection_data_set(data, data->target, 8,
- ((CamelStreamMem *)stream)->buffer->data,
- ((CamelStreamMem *)stream)->buffer->len);
-
- camel_object_unref(stream);
-}
-
-/**
- * em_utils_selection_get_mailbox:
- * @data: selection data
- * @folder:
- *
- * Receive a mailbox selection/dnd
- * Warning: Could be BIG!
- * Warning: This could block the ui for an extended period.
- * FIXME: Exceptions?
- **/
-void
-em_utils_selection_get_mailbox(GtkSelectionData *data, CamelFolder *folder)
-{
- CamelStream *stream;
-
- if (data->data == NULL || data->length == -1)
- return;
-
- /* TODO: a stream mem with read-only access to existing data? */
- /* NB: Although copying would let us run this async ... which it should */
- stream = camel_stream_mem_new_with_buffer(data->data, data->length);
- em_utils_read_messages_from_stream(folder, stream);
- camel_object_unref(stream);
-}
-
-/**
- * em_utils_selection_set_uidlist:
- * @data: selection data
- * @uri:
- * @uids:
- *
- * Sets a "x-uid-list" format selection data.
- *
- * FIXME: be nice if this could take a folder argument rather than uri
- **/
-void
-em_utils_selection_set_uidlist(GtkSelectionData *data, const char *uri, GPtrArray *uids)
-{
- GByteArray *array = g_byte_array_new();
- int i;
-
- /* format: "uri\0uid1\0uid2\0uid3\0...\0uidn\0" */
-
- g_byte_array_append(array, uri, strlen(uri)+1);
-
- for (i=0; i<uids->len; i++)
- g_byte_array_append(array, uids->pdata[i], strlen(uids->pdata[i])+1);
-
- gtk_selection_data_set(data, data->target, 8, array->data, array->len);
- g_byte_array_free(array, TRUE);
-}
-
-/**
- * em_utils_selection_get_uidlist:
- * @data: selection data
- * @urip: Pointer to uri string, to be free'd by caller
- * @uidsp: Pointer to an array of uid's.
- *
- * Convert an x-uid-list type to a uri and a uid list.
- *
- * Return value: The number of uid's found. If 0, then @urip and
- * @uidsp will be empty.
- **/
-int
-em_utils_selection_get_uidlist(GtkSelectionData *data, char **urip, GPtrArray **uidsp)
-{
- /* format: "uri\0uid1\0uid2\0uid3\0...\0uidn" */
- char *inptr, *inend;
- GPtrArray *uids;
- int res;
-
- *urip = NULL;
- *uidsp = NULL;
-
- if (data == NULL || data->data == NULL || data->length == -1)
- return 0;
-
- uids = g_ptr_array_new();
-
- inptr = data->data;
- inend = data->data + data->length;
- while (inptr < inend) {
- char *start = inptr;
-
- while (inptr < inend && *inptr)
- inptr++;
-
- if (start > (char *)data->data)
- g_ptr_array_add(uids, g_strndup(start, inptr-start));
-
- inptr++;
- }
-
- if (uids->len == 0) {
- g_ptr_array_free(uids, TRUE);
- res = 0;
- } else {
- *urip = g_strdup(data->data);
- *uidsp = uids;
- res = uids->len;
- }
-
- return res;
-}
-
-/**
- * em_utils_selection_set_urilist:
- * @data:
- * @folder:
- * @uids:
- *
- * Set the selection data @data to a uri which points to a file, which is
- * a berkely mailbox format mailbox. The file is automatically cleaned
- * up when the application quits.
- **/
-void
-em_utils_selection_set_urilist(GtkSelectionData *data, CamelFolder *folder, GPtrArray *uids)
-{
- const char *tmpdir;
- CamelStream *fstream;
- char *uri, *p;
- int fd;
-
- tmpdir = e_mkdtemp("drag-n-drop-XXXXXX");
- if (tmpdir == NULL)
- return;
-
- /* FIXME: this used to save a single message with the subject
- as the filename but it was unsafe, and makes this messier,
- the pain */
-
- p = uri = g_alloca (strlen (tmpdir) + 16);
- p += sprintf (uri, "file:///%s/mbox", tmpdir);
-
- fd = open(uri + 7, O_WRONLY | O_CREAT | O_EXCL, 0666);
- if (fd == -1)
- return;
-
- fstream = camel_stream_fs_new_with_fd(fd);
- if (fstream) {
- /* terminate with \r\n to be compliant with the spec */
- strcpy (p, "\r\n");
-
- if (em_utils_write_messages_to_stream(folder, uids, fstream) == 0)
- gtk_selection_data_set(data, data->target, 8, uri, strlen(uri));
-
- camel_object_unref(fstream);
- }
-}
-
-static void
-emu_save_part_done(CamelMimePart *part, char *name, int done, void *data)
-{
- ((int *)data)[0] = done;
-}
-
-/**
- * em_utils_temp_save_part:
- * @parent:
- * @part:
- *
- * Save a part's content to a temporary file, and return the
- * filename.
- *
- * Return value: NULL if anything failed.
- **/
-char *
-em_utils_temp_save_part(GtkWidget *parent, CamelMimePart *part)
-{
- const char *tmpdir, *filename;
- char *path, *mfilename = NULL;
- int done;
-
- tmpdir = e_mkdtemp("evolution-tmp-XXXXXX");
- if (tmpdir == NULL) {
- e_notice(parent, GTK_MESSAGE_ERROR,
- _("Could not create temporary directory: %s"),
- g_strerror (errno));
-
- return NULL;
- }
-
- filename = camel_mime_part_get_filename (part);
- if (filename == NULL) {
- /* This is the default filename used for temporary file creation */
- filename = _("Unknown");
- } else {
- mfilename = g_strdup(filename);
- e_filename_make_safe(mfilename);
- filename = mfilename;
- }
-
- path = g_build_filename(tmpdir, filename, NULL);
- g_free(mfilename);
-
- /* FIXME: This doesn't handle default charsets */
- mail_msg_wait(mail_save_part(part, path, emu_save_part_done, &done));
-
- if (!done) {
- /* mail_save_part should popup an error box automagically */
- g_free(path);
- path = NULL;
- }
-
- return path;
-}
-
-extern CamelFolder *drafts_folder, *sent_folder, *outbox_folder;
-
-/**
- * em_utils_folder_is_drafts:
- * @folder: folder
- * @uri: uri for this folder, if known
- *
- * Decides if @folder is a Drafts folder.
- *
- * Returns %TRUE if this is a Drafts folder or %FALSE otherwise.
- **/
-gboolean
-em_utils_folder_is_drafts(CamelFolder *folder, const char *uri)
-{
- EAccountList *accounts;
- EAccount *account;
- EIterator *iter;
- int is = FALSE;
-
- if (folder == drafts_folder)
- return TRUE;
-
- if (uri == NULL)
- return FALSE;
-
- accounts = mail_config_get_accounts();
- iter = e_list_get_iterator((EList *)accounts);
- while (e_iterator_is_valid(iter)) {
- account = (EAccount *)e_iterator_get(iter);
- if (account->drafts_folder_uri &&
- camel_store_uri_cmp(folder->parent_store, account->drafts_folder_uri, uri)) {
- is = TRUE;
- break;
- }
-
- e_iterator_next(iter);
- }
-
- g_object_unref(iter);
-
- return is;
-}
-
-/**
- * em_utils_folder_is_sent:
- * @folder: folder
- * @uri: uri for this folder, if known
- *
- * Decides if @folder is a Sent folder
- *
- * Returns %TRUE if this is a Sent folder or %FALSE otherwise.
- **/
-gboolean
-em_utils_folder_is_sent(CamelFolder *folder, const char *uri)
-{
- EAccountList *accounts;
- EAccount *account;
- EIterator *iter;
- int is = FALSE;
-
- if (folder == sent_folder)
- return TRUE;
-
- if (uri == NULL)
- return FALSE;
-
- accounts = mail_config_get_accounts();
- iter = e_list_get_iterator((EList *)accounts);
- while (e_iterator_is_valid(iter)) {
- account = (EAccount *)e_iterator_get(iter);
- if (account->sent_folder_uri &&
- camel_store_uri_cmp(folder->parent_store, account->sent_folder_uri, uri)) {
- is = TRUE;
- break;
- }
-
- e_iterator_next(iter);
- }
-
- g_object_unref(iter);
-
- return is;
-}
-
-/**
- * em_utils_folder_is_outbox:
- * @folder: folder
- * @uri: uri for this folder, if known
- *
- * Decides if @folder is an Outbox folder
- *
- * Returns %TRUE if this is an Outbox folder or %FALSE otherwise.
- **/
-gboolean
-em_utils_folder_is_outbox(CamelFolder *folder, const char *uri)
-{
- /* <Highlander>There can be only one.</Highlander> */
- return folder == outbox_folder;
-}
-
-/**
- * em_utils_adjustment_page:
- * @adj:
- * @down:
- *
- * Move an adjustment up/down forward/back one page.
- **/
-void
-em_utils_adjustment_page(GtkAdjustment *adj, gboolean down)
-{
- float page_size = adj->page_size - adj->step_increment;
-
- if (down) {
- if (adj->value < adj->upper - adj->page_size - page_size)
- adj->value += page_size;
- else if (adj->upper >= adj->page_size)
- adj->value = adj->upper - adj->page_size;
- else
- adj->value = adj->lower;
- } else {
- if (adj->value > adj->lower + page_size)
- adj->value -= page_size;
- else
- adj->value = adj->lower;
- }
-
- gtk_adjustment_value_changed(adj);
-}
-
-/* ********************************************************************** */
-static char *emu_proxy_uri;
-
-static void
-emu_set_proxy(GConfClient *client)
-{
- char *server;
- int port;
-
- if (!gconf_client_get_bool(client, "/system/http_proxy/use_http_proxy", NULL)) {
- g_free(emu_proxy_uri);
- emu_proxy_uri = NULL;
-
- return;
- }
-
- /* TODO: Should lock ... */
-
- server = gconf_client_get_string(client, "/system/http_proxy/host", NULL);
- port = gconf_client_get_int(client, "/system/http_proxy/port", NULL);
-
- if (server && server[0]) {
- g_free(emu_proxy_uri);
-
- if (gconf_client_get_bool(client, "/system/http_proxy/use_authentication", NULL)) {
- char *user = gconf_client_get_string(client, "/system/http_proxy/authentication_user", NULL);
- char *pass = gconf_client_get_string(client, "/system/http_proxy/authentication_password", NULL);
-
- emu_proxy_uri = g_strdup_printf("http://%s:%s@%s:%d", user, pass, server, port);
- g_free(user);
- g_free(pass);
- } else {
- emu_proxy_uri = g_strdup_printf("http://%s:%d", server, port);
- }
- }
-
- g_free(server);
-}
-
-static void
-emu_proxy_changed(GConfClient *client, guint32 cnxn_id, GConfEntry *entry, gpointer user_data)
-{
- emu_set_proxy(client);
-}
-
-/**
- * em_utils_get_proxy_uri:
- *
- * Get the system proxy uri.
- *
- * Return value: Must be freed when finished with.
- **/
-char *
-em_utils_get_proxy_uri(void)
-{
- static int init;
-
- if (!init) {
- GConfClient *client = gconf_client_get_default();
-
- gconf_client_add_dir(client, "/system/http_proxy", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
- gconf_client_notify_add(client, "/system/http_proxy", emu_proxy_changed, NULL, NULL, NULL);
- emu_set_proxy(client);
- g_object_unref(client);
- init = TRUE;
- }
-
- return g_strdup(emu_proxy_uri);
-}
-
-/**
- * em_utils_part_to_html:
- * @part:
- *
- * Converts a mime part's contents into html text. If @credits is given,
- * then it will be used as an attribution string, and the
- * content will be cited. Otherwise no citation or attribution
- * will be performed.
- *
- * Return Value: The part in displayable html format.
- **/
-char *
-em_utils_part_to_html(CamelMimePart *part)
-{
- EMFormatQuote *emfq;
- CamelStreamMem *mem;
- GByteArray *buf;
- char *text;
-
- buf = g_byte_array_new ();
- mem = (CamelStreamMem *) camel_stream_mem_new ();
- camel_stream_mem_set_byte_array (mem, buf);
-
- emfq = em_format_quote_new(NULL, (CamelStream *)mem, 0);
- em_format_part((EMFormat *) emfq, (CamelStream *) mem, part);
- g_object_unref (emfq);
-
- camel_stream_write ((CamelStream *) mem, "", 1);
- camel_object_unref (mem);
-
- text = buf->data;
- g_byte_array_free (buf, FALSE);
-
- return text;
-}
-
-/**
- * em_utils_message_to_html:
- * @message:
- * @credits:
- * @flags: EMFormatQuote flags
- *
- * Convert a message to html, quoting if the @credits attribution
- * string is given.
- *
- * Return value: The html version.
- **/
-char *
-em_utils_message_to_html(CamelMimeMessage *message, const char *credits, guint32 flags)
-{
- EMFormatQuote *emfq;
- CamelStreamMem *mem;
- GByteArray *buf;
- char *text;
-
- buf = g_byte_array_new ();
- mem = (CamelStreamMem *) camel_stream_mem_new ();
- camel_stream_mem_set_byte_array (mem, buf);
-
- emfq = em_format_quote_new(credits, (CamelStream *)mem, flags);
- em_format_format((EMFormat *)emfq, (CamelMedium *)message);
- g_object_unref (emfq);
-
- camel_stream_write ((CamelStream *) mem, "", 1);
- camel_object_unref (mem);
-
- text = buf->data;
- g_byte_array_free (buf, FALSE);
-
- return text;
-}
-
-/* ********************************************************************** */
-
-/**
- * em_utils_expunge_folder:
- * @parent: parent window
- * @folder: folder to expunge
- *
- * Expunges @folder.
- **/
-void
-em_utils_expunge_folder (GtkWidget *parent, CamelFolder *folder)
-{
- char *name;
-
- camel_object_get(folder, NULL, CAMEL_OBJECT_DESCRIPTION, &name, 0);
-
- if (!em_utils_prompt_user(parent, GTK_RESPONSE_NO, "/apps/evolution/mail/prompts/expunge",
- _("This operation will permanently remove all deleted messages "
- "in the folder `%s'. If you continue, you "
- "will not be able to recover these messages.\n"
- "\nReally erase these messages?"), name))
- return;
-
- mail_expunge_folder(folder, NULL, NULL);
-}
-
-/**
- * em_utils_empty_trash:
- * @parent: parent window
- *
- * Empties all Trash folders.
- **/
-void
-em_utils_empty_trash (GtkWidget *parent)
-{
- extern CamelSession *session;
- CamelProvider *provider;
- EAccountList *accounts;
- EAccount *account;
- EIterator *iter;
- CamelException ex;
-
- if (!em_utils_prompt_user(parent, GTK_RESPONSE_NO, "/apps/evolution/mail/prompts/empty_trash",
- _("This operation will permanently remove all deleted messages "
- "in all folders. If you continue, you will not be able to "
- "recover these messages.\n"
- "\nReally erase these messages?")))
- return;
-
- camel_exception_init (&ex);
-
- /* expunge all remote stores */
- accounts = mail_config_get_accounts ();
- iter = e_list_get_iterator ((EList *) accounts);
- while (e_iterator_is_valid (iter)) {
- account = (EAccount *) e_iterator_get (iter);
-
- /* make sure this is a valid source */
- if (account->enabled && 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) {
- mail_empty_trash (account, NULL, NULL);
- }
- }
-
- /* clear the exception for the next round */
- camel_exception_clear (&ex);
- }
-
- e_iterator_next (iter);
- }
-
- g_object_unref (iter);
-
- /* Now empty the local trash folder */
- mail_empty_trash (NULL, NULL, NULL);
-}
diff --git a/mail/em-utils.h b/mail/em-utils.h
deleted file mode 100644
index 502b52e19d..0000000000
--- a/mail/em-utils.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2003 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 __EM_UTILS_H__
-#define __EM_UTILS_H__
-
-#include <glib.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-struct _GtkWidget;
-struct _GtkWindow;
-struct _CamelFolder;
-struct _CamelStream;
-struct _CamelMimeMessage;
-struct _CamelMimePart;
-struct _GtkSelectionData;
-struct _GtkAdjustment;
-struct _EMsgComposer;
-
-gboolean em_utils_prompt_user(struct _GtkWindow *parent, int def, const char *promptkey, const char *fmt, ...);
-
-GPtrArray *em_utils_uids_copy (GPtrArray *uids);
-void em_utils_uids_free (GPtrArray *uids);
-
-gboolean em_utils_configure_account (struct _GtkWidget *parent);
-gboolean em_utils_check_user_can_send_mail (struct _GtkWidget *parent);
-
-void em_utils_edit_filters (struct _GtkWidget *parent);
-void em_utils_edit_vfolders (struct _GtkWidget *parent);
-
-void em_utils_composer_send_cb(struct _EMsgComposer *composer, gpointer user_data);
-void em_utils_composer_save_draft_cb(struct _EMsgComposer *composer, int quit, gpointer user_data);
-
-void em_utils_compose_new_message (void);
-
-/* FIXME: mailto? url? should make up its mind what its called. imho use 'uri' */
-void em_utils_compose_new_message_with_mailto (const char *url);
-void em_utils_post_to_url (const char *url);
-
-void em_utils_edit_message (struct _CamelMimeMessage *message);
-void em_utils_edit_messages (struct _CamelFolder *folder, GPtrArray *uids);
-
-void em_utils_forward_attached (struct _CamelFolder *folder, GPtrArray *uids);
-void em_utils_forward_inline (struct _CamelFolder *folder, GPtrArray *uids);
-void em_utils_forward_quoted (struct _CamelFolder *folder, GPtrArray *uids);
-
-void em_utils_forward_message (struct _CamelMimeMessage *msg);
-void em_utils_forward_messages (struct _CamelFolder *folder, GPtrArray *uids);
-
-void em_utils_redirect_message (struct _CamelMimeMessage *message);
-void em_utils_redirect_message_by_uid (struct _CamelFolder *folder, const char *uid);
-
-enum {
- REPLY_MODE_SENDER,
- REPLY_MODE_ALL,
- REPLY_MODE_LIST
-};
-
-void em_utils_reply_to_message (struct _CamelMimeMessage *message, int mode);
-void em_utils_reply_to_message_by_uid (struct _CamelFolder *folder, const char *uid, int mode);
-
-void em_utils_post_reply_to_message_by_uid (struct _CamelFolder *folder, const char *uid);
-
-void em_utils_save_part(struct _GtkWidget *parent, const char *prompt, struct _CamelMimePart *part);
-void em_utils_save_messages (struct _GtkWidget *parent, struct _CamelFolder *folder, GPtrArray *uids);
-
-void em_utils_add_address(struct _GtkWidget *parent, const char *email);
-
-void em_utils_flag_for_followup (struct _GtkWidget *parent, struct _CamelFolder *folder, GPtrArray *uids);
-void em_utils_flag_for_followup_clear (struct _GtkWidget *parent, struct _CamelFolder *folder, GPtrArray *uids);
-void em_utils_flag_for_followup_completed (struct _GtkWidget *parent, struct _CamelFolder *folder, GPtrArray *uids);
-
-/* This stuff that follows probably doesn't belong here, then again, the stuff above probably belongs elsewhere */
-
-void em_utils_selection_set_mailbox(struct _GtkSelectionData *data, struct _CamelFolder *folder, GPtrArray *uids);
-void em_utils_selection_get_mailbox(struct _GtkSelectionData *data, struct _CamelFolder *folder);
-/* FIXME: be nice if these also worked on struct _CamelFolder's, no easy way to get uri from folder yet tho */
-void em_utils_selection_set_uidlist(struct _GtkSelectionData *data, const char *uri, GPtrArray *uids);
-int em_utils_selection_get_uidlist(struct _GtkSelectionData *data, char **uri, GPtrArray **uidsp);
-void em_utils_selection_set_urilist(struct _GtkSelectionData *data, struct _CamelFolder *folder, GPtrArray *uids);
-
-char *em_utils_temp_save_part(struct _GtkWidget *parent, struct _CamelMimePart *part);
-
-gboolean em_utils_folder_is_drafts(struct _CamelFolder *folder, const char *uri);
-gboolean em_utils_folder_is_sent(struct _CamelFolder *folder, const char *uri);
-gboolean em_utils_folder_is_outbox(struct _CamelFolder *folder, const char *uri);
-
-void em_utils_adjustment_page(struct _GtkAdjustment *adj, gboolean down);
-
-char *em_utils_get_proxy_uri(void);
-
-/* FIXME: should this have an override charset? */
-char *em_utils_part_to_html(struct _CamelMimePart *part);
-char *em_utils_message_to_html(struct _CamelMimeMessage *msg, const char *credits, guint32 flags);
-
-void em_utils_expunge_folder (struct _GtkWidget *parent, struct _CamelFolder *folder);
-void em_utils_empty_trash (struct _GtkWidget *parent);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __EM_UTILS_H__ */
diff --git a/mail/evolution-mail.schemas.in.in b/mail/evolution-mail.schemas.in.in
deleted file mode 100644
index 297d158d6b..0000000000
--- a/mail/evolution-mail.schemas.in.in
+++ /dev/null
@@ -1,654 +0,0 @@
-<gconfschemafile>
- <schemalist>
-
- <!-- Composer settings -->
-
- <schema>
- <key>/schemas/apps/evolution/mail/composer/charset</key>
- <applyto>/apps/evolution/mail/composer/charset</applyto>
- <owner>evolution-mail</owner>
- <type>string</type>
- <default></default>
- <locale name="C">
- <short>Default charset in which to compose messages</short>
- <long>
- Default charset in which to compose messages.
- </long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/mail/composer/send_html</key>
- <applyto>/apps/evolution/mail/composer/send_html</applyto>
- <owner>evolution-mail</owner>
- <type>bool</type>
- <default>false</default>
- <locale name="C">
- <short>Send HTML mail by default</short>
- <long>
- Send HTML mail by default.
- </long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/mail/composer/magic_links</key>
- <applyto>/apps/evolution/mail/composer/magic_links</applyto>
- <owner>evolution-mail</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Automatic link recognition</short>
- <long>
- Recognize links in text and replace them.
- </long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/mail/composer/magic_smileys</key>
- <applyto>/apps/evolution/mail/composer/send_smileys</applyto>
- <owner>evolution-mail</owner>
- <type>bool</type>
- <default>false</default>
- <locale name="C">
- <short>Automatic smiley recognition</short>
- <long>
- Recognize smileys in text and replace them with images.
- </long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/mail/composer/inline_spelling</key>
- <applyto>/apps/evolution/mail/composer/inline_spelling</applyto>
- <owner>evolution-mail</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Spell check inline</short>
- <long>
- Draw spelling error indicators on words as you type.
- </long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/mail/composer/view/From</key>
- <applyto>/apps/evolution/mail/composer/view/From</applyto>
- <owner>evolution-mail</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>View/From menu item is checked</short>
- <long>
- View/From menu item is checked.
- </long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/mail/composer/view/PostTo</key>
- <applyto>/apps/evolution/mail/composer/view/PostTo</applyto>
- <owner>evolution-mail</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>View/PostTo menu item is checked</short>
- <long>
- View/PostTo menu item is checked.
- </long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/mail/composer/view/ReplyTo</key>
- <applyto>/apps/evolution/mail/composer/view/ReplyTo</applyto>
- <owner>evolution-mail</owner>
- <type>bool</type>
- <default>false</default>
- <locale name="C">
- <short>View/ReplyTo menu item is checked</short>
- <long>
- View/ReplyTo menu item is checked.
- </long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/mail/composer/view/Cc</key>
- <applyto>/apps/evolution/mail/composer/view/Cc</applyto>
- <owner>evolution-mail</owner>
- <type>bool</type>
- <default>false</default>
- <locale name="C">
- <short>View/Cc menu item is checked</short>
- <long>
- View/Cc menu item is checked.
- </long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/mail/composer/view/Bcc</key>
- <applyto>/apps/evolution/mail/composer/view/Bcc</applyto>
- <owner>evolution-mail</owner>
- <type>bool</type>
- <default>false</default>
- <locale name="C">
- <short>View/Bcc menu item is checked</short>
- <long>
- View/Bcc menu item is checked.
- </long>
- </locale>
- </schema>
-
- <!-- Display Settings -->
-
- <schema>
- <key>/schemas/apps/evolution/mail/display/mark_citations</key>
- <applyto>/apps/evolution/mail/display/mark_citations</applyto>
- <owner>evolution-mail</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Mark citations in the message "Preview"</short>
- <long>
- Mark citations in the message "Preview".
- </long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/mail/display/citation_colour</key>
- <applyto>/apps/evolution/mail/display/citation_colour</applyto>
- <owner>evolution-mail</owner>
- <type>string</type>
- <default>#737373</default>
- <locale name="C">
- <short>Citation highlight colour</short>
- <long>
- Citation highlight colour.
- </long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/mail/display/caret_mode</key>
- <applyto>/apps/evolution/mail/display/caret_mode</applyto>
- <owner>evolution-mail</owner>
- <type>bool</type>
- <default>false</default>
- <locale name="C">
- <short>Enable/disable caret mode</short>
- <long>
- Enable caret mode, so that you can see a cursor when reading mail.
- </long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/mail/display/charset</key>
- <applyto>/apps/evolution/mail/display/charset</applyto>
- <owner>evolution-mail</owner>
- <type>string</type>
- <default></default>
- <locale name="C">
- <short>Default charset in which to display messages</short>
- <long>
- Default charset in which to display messages.
- </long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/mail/display/load_http_images</key>
- <applyto>/apps/evolution/mail/display/load_http_images</applyto>
- <owner>evolution-mail</owner>
- <type>int</type>
- <default>0</default>
- <locale name="C">
- <short>Load images for HTML messages over http</short>
- <long>
- Load images for HTML messages over http(s). Possible values are:
- 0 - Never load images off the net
- 1 - Load images if sender is in the addressbook
- 2 - Always load images off the net
- </long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/mail/display/animate_images</key>
- <applyto>/apps/evolution/mail/display/animate_images</applyto>
- <owner>evolution-mail</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Show Animations</short>
- <long>
- Show animated images as animations.
- </long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/mail/display/mime_types</key>
- <applyto>/apps/evolution/mail/display/mime_types</applyto>
- <owner>evolution-mail</owner>
- <type>list</type>
- <list_type>string</list_type>
- <default>[]</default>
- <locale name="C">
- <short>List of mime types to check for bonobo component viewers</short>
- <long>
- If there isn't a builtin viewer for a particular mime-type inside Evolution,
- any mime-types appearing in this list which map to a bonobo-component viewer
- in GNOME's mime-type database may be used for displaying content.
- </long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/mail/display/xmailer_mask</key>
- <applyto>/apps/evolution/mail/display/xmailer_mask</applyto>
- <owner>evolution-mail</owner>
- <type>int</type>
- <default>0</default>
- <locale name="C">
- <short>S3kr3t 0pt10n</short>
- <long>
- S3kr3t 0pt10n.
- </long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/mail/display/mark_seen</key>
- <applyto>/apps/evolution/mail/display/mark_seen</applyto>
- <owner>evolution-mail</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Mark as Seen after specified timeout</short>
- <long>
- Mark as Seen after specified timeout.
- </long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/mail/display/mark_seen_timeout</key>
- <applyto>/apps/evolution/mail/display/mark_seen_timeout</applyto>
- <owner>evolution-mail</owner>
- <type>int</type>
- <default>1500</default>
- <locale name="C">
- <short>Timeout for marking message as Seen</short>
- <long>
- Timeout for marking message as Seen.
- </long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/mail/display/show_deleted</key>
- <applyto>/apps/evolution/mail/display/show_deleted</applyto>
- <owner>evolution-mail</owner>
- <type>bool</type>
- <default>false</default>
- <locale name="C">
- <short>Show deleted messages in the message-list</short>
- <long>
- Show deleted messages (with a strike-through) in the message-list.
- </long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/mail/display/show_preview</key>
- <applyto>/apps/evolution/mail/display/show_preview</applyto>
- <owner>evolution-mail</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Show the "Preview" pane</short>
- <long>
- Show the "Preview" pane.
- </long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/mail/display/paned_size</key>
- <applyto>/apps/evolution/mail/display/paned_size</applyto>
- <owner>evolution-mail</owner>
- <type>int</type>
- <default>144</default>
- <locale name="C">
- <short>Height of the message-list pane</short>
- <long>
- Height of the message-list pane.
- </long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/mail/display/fonts/variable</key>
- <applyto>/apps/evolution/mail/display/fonts/variable</applyto>
- <owner>evolution-mail</owner>
- <type>string</type>
- <default>Sans 12</default>
- <locale name="C">
- <short>Variable width font</short>
- <long>
- The variable width font for mail display
- </long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/mail/display/fonts/monospace</key>
- <applyto>/apps/evolution/mail/display/fonts/monospace</applyto>
- <owner>evolution-mail</owner>
- <type>string</type>
- <default>Monospace 12</default>
- <locale name="C">
- <short>Terminal font</short>
- <long>
- The terminal font for mail display
- </long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/mail/display/fonts/use_custom</key>
- <applyto>/apps/evolution/mail/display/fonts/use_custom</applyto>
- <owner>evolution-mail</owner>
- <type>bool</type>
- <default>false</default>
- <locale name="C">
- <short>Use custom fonts</short>
- <long>
- Use custom fonts for displaying mail
- </long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/mail/display/thread_list</key>
- <applyto>/apps/evolution/mail/display/thread_list</applyto>
- <owner>evolution-mail</owner>
- <type>bool</type>
- <default>false</default>
- <locale name="C">
- <short>Thread the message-list</short>
- <long>
- Thread the message list.
- </long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/mail/display/thread_subject</key>
- <applyto>/apps/evolution/mail/display/thread_subject</applyto>
- <owner>evolution-mail</owner>
- <type>bool</type>
- <default>false</default>
- <locale name="C">
- <short>Thread the message-list based on Subject</short>
- <long>
- Whether or not to fall back on threading by subjects when the
- messages do not contain In-Reply-To or References headers.
- </long>
- </locale>
- </schema>
-
- <!-- Filter logging -->
-
- <schema>
- <key>/schemas/apps/evolution/mail/filters/log</key>
- <applyto>/apps/evolution/mail/filters/log</applyto>
- <owner>evolution-mail</owner>
- <type>bool</type>
- <default>false</default>
- <locale name="C">
- <short>Log filter actions</short>
- <long>
- Log filter actions to the specified log file.
- </long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/mail/filters/logfile</key>
- <applyto>/apps/evolution/mail/filters/logfile</applyto>
- <owner>evolution-mail</owner>
- <type>string</type>
- <default></default>
- <locale name="C">
- <short>Logfile to log filter actions</short>
- <long>
- Logfile to log filter actions.
- </long>
- </locale>
- </schema>
-
- <!-- Format settings -->
-
- <schema>
- <key>/schemas/apps/evolution/mail/format/forward_style</key>
- <applyto>/apps/evolution/mail/format/forward_style</applyto>
- <owner>evolution-mail</owner>
- <type>int</type>
- <default>0</default>
- <locale name="C">
- <short>Default forward style</short>
- <long>
-
- </long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/mail/format/reply_style</key>
- <applyto>/apps/evolution/mail/format/reply_style</applyto>
- <owner>evolution-mail</owner>
- <type>int</type>
- <default>0</default>
- <locale name="C">
- <short>Default reply style</short>
- <long>
-
- </long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/mail/format/message_display_style</key>
- <applyto>/apps/evolution/mail/format/message_display_style</applyto>
- <owner>evolution-mail</owner>
- <type>int</type>
- <default>0</default>
- <locale name="C">
- <short>Message-display style (normal, full headers, source)</short>
- <long>
-
- </long>
- </locale>
- </schema>
-
- <!-- New Mail Notification settings -->
-
- <schema>
- <key>/schemas/apps/evolution/mail/notify/type</key>
- <applyto>/apps/evolution/mail/notify/type</applyto>
- <owner>evolution-mail</owner>
- <type>int</type>
- <default>0</default>
- <locale name="C">
- <short>New Mail Notify type</short>
- <long>
- Specifies the type of New Mail Notification the user wishes to use.
- </long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/mail/notify/sound</key>
- <applyto>/apps/evolution/mail/notify/sound</applyto>
- <owner>evolution-mail</owner>
- <type>string</type>
- <default></default>
- <locale name="C">
- <short>New Mail Notify sound file</short>
- <long>
- Sound file to play when new mail arrives.
- </long>
- </locale>
- </schema>
-
- <!-- Prompt settings -->
-
- <schema>
- <key>/schemas/apps/evolution/mail/prompts/empty_subject</key>
- <applyto>/apps/evolution/mail/prompts/empty_subject</applyto>
- <owner>evolution-mail</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Prompt on empty subject</short>
- <long>
- Prompt the user when he or she tries to send a message
- without a Subject.
- </long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/mail/prompts/expunge</key>
- <applyto>/apps/evolution/mail/prompts/expunge</applyto>
- <owner>evolution-mail</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Prompt when user expunges</short>
- <long>
- Prompt the user when he or she tries to expunge a folder.
- </long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/mail/prompts/only_bcc</key>
- <applyto>/apps/evolution/mail/prompts/only_bcc</applyto>
- <owner>evolution-mail</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Prompt when user only fills Bcc</short>
- <long>
- Prompt when user tries to send a message with no To or Cc recipients.
- </long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/mail/prompts/unwanted_html</key>
- <applyto>/apps/evolution/mail/prompts/unwanted_html</applyto>
- <owner>evolution-mail</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Prompt when user tries to send unwanted HTML</short>
- <long>
- Prompt when user tries to send HTML mail to recipients that
- may not want to receive HTML mail.
- </long>
- </locale>
- </schema>
-
- <!-- Trash settings -->
-
- <schema>
- <key>/schemas/apps/evolution/mail/trash/empty_on_exit</key>
- <applyto>/apps/evolution/mail/trash/empty_on_exit</applyto>
- <owner>evolution-mail</owner>
- <type>bool</type>
- <default>false</default>
- <locale name="C">
- <short>Empty Trash folders on exit</short>
- <long>
- Empty all Trash folders when exiting Evolution.
- </long>
- </locale>
- </schema>
-
- <!-- Labels and Colours -->
-
- <schema>
- <key>/schemas/apps/evolution/mail/labels</key>
- <applyto>/apps/evolution/mail/labels</applyto>
- <owner>evolution-mail</owner>
- <type>list</type>
- <list_type>string</list_type>
- <default>[Important:#ff0000,Work:#ff8c00,Personal:#008b00,To Do:#0000ff,Later:#8b008b]</default>
- <locale name="C">
- <short>List of Labels and their associated colours</short>
- <long>
- List of labels known to the mail component of
- Evolution. The list contains strings containing name:colour
- where colour uses the HTML hex encoding.
- </long>
- </locale>
- </schema>
-
- <!-- Junk -->
-
- <schema>
- <key>/schemas/apps/evolution/mail/junk/check_incoming</key>
- <applyto>/apps/evolution/mail/junk/check_incoming</applyto>
- <owner>evolution-mail</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Check incoming mail being junk</short>
- <long>
- Run junk test on incoming mail
- </long>
- </locale>
- </schema>
-
- <!-- Account settings -->
-
- <schema>
- <key>/schemas/apps/evolution/mail/default_account</key>
- <applyto>/apps/evolution/mail/default_account</applyto>
- <owner>evolution-mail</owner>
- <type>string</type>
- <locale name="C">
- <short>UID string of the default account.</short>
- <long>
- UID string of the default account.
- </long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/evolution/mail/accounts</key>
- <applyto>/apps/evolution/mail/accounts</applyto>
- <owner>evolution-mail</owner>
- <type>list</type>
- <list_type>string</list_type>
- <locale name="C">
- <short>List of accounts</short>
- <long>
- List of accounts known to the mail component of
- Evolution. The list contains strings naming
- subdirectories relative to /apps/evolution/mail/accounts.
- </long>
- </locale>
- </schema>
-
- </schemalist>
-</gconfschemafile>
diff --git a/mail/evolution-mbox-upgrade.c b/mail/evolution-mbox-upgrade.c
deleted file mode 100644
index 8d8c76cdc8..0000000000
--- a/mail/evolution-mbox-upgrade.c
+++ /dev/null
@@ -1,420 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2003 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 <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <dirent.h>
-#include <errno.h>
-
-#include <camel/camel.h>
-#include <camel/camel-session.h>
-#include <camel/camel-file-utils.h>
-
-#include <libxml/tree.h>
-#include <libxml/parser.h>
-#include <libxml/xmlmemory.h>
-
-#define EM_MIGRATE_SESSION_TYPE (em_migrate_session_get_type ())
-#define EM_MIGRATE_SESSION(obj) (CAMEL_CHECK_CAST((obj), EM_MIGRATE_SESSION_TYPE, EMMigrateSession))
-#define EM_MIGRATE_SESSION_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), EM_MIGRATE_SESSION_TYPE, EMMigrateSessionClass))
-#define EM_MIGRATE_IS_SESSION(o) (CAMEL_CHECK_TYPE((o), EM_MIGRATE_SESSION_TYPE))
-
-typedef struct _EMMigrateSession {
- CamelSession parent_object;
-
- CamelStore *store; /* new folder tree store */
- char *srcdir; /* old folder tree path */
-} EMMigrateSession;
-
-typedef struct _EMMigrateSessionClass {
- CamelSessionClass parent_class;
-
-} EMMigrateSessionClass;
-
-CamelType em_migrate_session_get_type (void);
-CamelSession *em_migrate_session_new (const char *path);
-
-static void
-class_init (EMMigrateSessionClass *klass)
-{
- ;
-}
-
-CamelType
-em_migrate_session_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (
- camel_session_get_type (),
- "EMMigrateSession",
- sizeof (EMMigrateSession),
- sizeof (EMMigrateSessionClass),
- (CamelObjectClassInitFunc) class_init,
- NULL,
- NULL,
- NULL);
- }
-
- return type;
-}
-
-CamelSession *
-em_migrate_session_new (const char *path)
-{
- CamelSession *session;
-
- session = CAMEL_SESSION (camel_object_new (EM_MIGRATE_SESSION_TYPE));
-
- camel_session_construct (session, path);
-
- return session;
-}
-
-static gboolean
-is_mail_folder (const char *metadata)
-{
- xmlNodePtr node;
- xmlDocPtr doc;
- char *type;
-
- if (!(doc = xmlParseFile (metadata))) {
- g_warning ("Cannot parse `%s'", metadata);
- return FALSE;
- }
-
- if (!(node = xmlDocGetRootElement (doc))) {
- g_warning ("`%s' corrupt: document contains no root node", metadata);
- xmlFreeDoc (doc);
- return FALSE;
- }
-
- if (!node->name || strcmp (node->name, "efolder") != 0) {
- g_warning ("`%s' corrupt: root node is not 'efolder'", metadata);
- xmlFreeDoc (doc);
- return FALSE;
- }
-
- node = node->children;
- while (node != NULL) {
- if (node->name && !strcmp (node->name, "type")) {
- type = xmlNodeGetContent (node);
- if (!strcmp (type, "mail")) {
- xmlFreeDoc (doc);
- xmlFree (type);
-
- return TRUE;
- }
-
- xmlFree (type);
-
- break;
- }
-
- node = node->next;
- }
-
- xmlFreeDoc (doc);
-
- return FALSE;
-}
-
-static CamelStore *
-get_local_store (CamelSession *session, const char *dirname, const char *metadata, char **namep, int *index, CamelException *ex)
-{
- char *protocol, *name, *buf;
- CamelStore *store;
- struct stat st;
- xmlNodePtr node;
- xmlDocPtr doc;
-
- if (stat (metadata, &st) == -1 || !S_ISREG (st.st_mode)) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, "`%s' is not a regular file", metadata);
- return NULL;
- }
-
- if (!(doc = xmlParseFile (metadata))) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, "cannot parse `%s'", metadata);
- return NULL;
- }
-
- if (!(node = xmlDocGetRootElement (doc)) || strcmp (node->name, "folderinfo") != 0) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, "`%s' is malformed", metadata);
- xmlFreeDoc (doc);
- return NULL;
- }
-
- node = node->children;
- while (node != NULL) {
- if (node->name && !strcmp (node->name, "folder")) {
- protocol = xmlGetProp (node, "type");
- name = xmlGetProp (node, "name");
- buf = xmlGetProp (node, "index");
- if (buf != NULL) {
- *index = atoi (buf);
- xmlFree (buf);
- } else {
- *index = 0;
- }
-
- xmlFreeDoc (doc);
-
- buf = g_strdup_printf ("%s:%s", protocol, dirname);
- xmlFree (protocol);
-
- if ((store = camel_session_get_store (session, buf, ex)))
- *namep = g_strdup (name);
- else
- *namep = NULL;
-
- xmlFree (name);
-
- return store;
- }
-
- node = node->next;
- }
-
- xmlFreeDoc (doc);
-
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, "`%s' does not contain needed info", metadata);
-
- return NULL;
-}
-
-static void
-em_migrate_dir (EMMigrateSession *session, const char *dirname, const char *full_name)
-{
- guint32 flags = CAMEL_STORE_FOLDER_CREATE;
- CamelFolder *old_folder, *new_folder;
- CamelStore *local_store;
- struct dirent *dent;
- CamelException ex;
- char *path, *name;
- GPtrArray *uids;
- struct stat st;
- int index;
- DIR *dir;
-
- path = g_strdup_printf ("%s/folder-metadata.xml", dirname);
- if (stat (path, &st) == -1 || !S_ISREG (st.st_mode)) {
- g_free (path);
- return;
- }
-
- if (!is_mail_folder (path)) {
- g_free (path);
-
- goto try_subdirs;
- }
-
- g_free (path);
-
- camel_exception_init (&ex);
-
- /* get old store & folder */
- path = g_strdup_printf ("%s/local-metadata.xml", dirname);
- if (!(local_store = get_local_store ((CamelSession *) session, dirname, path, &name, &index, &ex))) {
- g_warning ("error opening old store for `%s': %s", full_name, ex.desc);
- camel_exception_clear (&ex);
- g_free (path);
-
- /* try subfolders anyway? */
- goto try_subdirs;
- }
-
- g_free (path);
-
- if (!(old_folder = camel_store_get_folder (local_store, name, 0, &ex))) {
- g_warning ("error opening old folder `%s': %s", full_name, ex.desc);
- camel_object_unref (local_store);
- camel_exception_clear (&ex);
- g_free (name);
-
- /* try subfolders anyway? */
- goto try_subdirs;
- }
-
- g_free (name);
-
- flags |= (index ? CAMEL_STORE_FOLDER_BODY_INDEX : 0);
- if (!(new_folder = camel_store_get_folder (session->store, full_name, flags, &ex))) {
- g_warning ("error creating new mbox folder `%s': %s", full_name, ex.desc);
- camel_object_unref (local_store);
- camel_object_unref (old_folder);
- camel_exception_clear (&ex);
-
- /* try subfolders anyway? */
- goto try_subdirs;
- }
-
- uids = camel_folder_get_uids (old_folder);
- camel_folder_transfer_messages_to (old_folder, uids, new_folder, NULL, FALSE, &ex);
- camel_folder_free_uids (old_folder, uids);
-
- if (camel_exception_is_set (&ex)) {
- g_warning ("error migrating folder `%s': %s", full_name, ex.desc);
- camel_object_unref (local_store);
- camel_object_unref (old_folder);
- camel_object_unref (new_folder);
- camel_exception_clear (&ex);
-
- /* try subfolders anyway? */
- goto try_subdirs;
- }
-
- /*camel_object_unref (local_store);*/
- camel_object_unref (old_folder);
- camel_object_unref (new_folder);
-
- try_subdirs:
-
- path = g_strdup_printf ("%s/subfolders", dirname);
- if (stat (path, &st) == -1 || !S_ISDIR (st.st_mode)) {
- g_free (path);
- return;
- }
-
- if (!(dir = opendir (path))) {
- g_warning ("cannot open `%s': %s", path, strerror (errno));
- g_free (path);
- return;
- }
-
- while ((dent = readdir (dir))) {
- char *full_path;
-
- if (dent->d_name[0] == '.')
- continue;
-
- full_path = g_strdup_printf ("%s/%s", path, dent->d_name);
- if (stat (full_path, &st) == -1 || !S_ISDIR (st.st_mode)) {
- g_free (full_path);
- continue;
- }
-
- name = g_strdup_printf ("%s/%s", full_name, dent->d_name);
- em_migrate_dir (session, full_path, name);
- g_free (full_path);
- g_free (name);
- }
-
- closedir (dir);
-
- g_free (path);
-}
-
-static void
-em_migrate (EMMigrateSession *session)
-{
- struct dirent *dent;
- struct stat st;
- DIR *dir;
-
- if (!(dir = opendir (session->srcdir))) {
- g_warning ("cannot open `%s': %s", session->srcdir, strerror (errno));
- return;
- }
-
- while ((dent = readdir (dir))) {
- char *full_path;
-
- if (dent->d_name[0] == '.')
- continue;
-
- full_path = g_strdup_printf ("%s/%s", session->srcdir, dent->d_name);
- if (stat (full_path, &st) == -1 || !S_ISDIR (st.st_mode)) {
- g_free (full_path);
- continue;
- }
-
- em_migrate_dir (session, full_path, dent->d_name);
- g_free (full_path);
- }
-
- closedir (dir);
-}
-
-int main (int argc, char **argv)
-{
- EMMigrateSession *session;
- CamelException ex;
- struct stat st;
- char *path;
-
- g_thread_init (NULL);
-
- path = g_strdup_printf ("%s/.evolution/mail", g_get_home_dir ());
- if (stat (path, &st) == -1) {
- if (errno != ENOENT || camel_mkdir (path, 0777) == -1) {
- g_warning ("Failed to create directory `%s': %s", path, strerror (errno));
- g_free (path);
- return -1;
- }
- }
-
- camel_init (path, TRUE);
- session = (EMMigrateSession *) em_migrate_session_new (path);
- g_free (path);
-
- session->srcdir = g_strdup_printf ("%s/evolution/local", g_get_home_dir ());
-
- path = g_strdup_printf ("mbox:%s/.evolution/mail/local", g_get_home_dir ());
- if (stat (path + 5, &st) == -1) {
- if (errno != ENOENT || camel_mkdir (path + 5, 0777) == -1) {
- g_warning ("Failed to create directory `%s': %s", path + 5, strerror (errno));
- g_free (session->srcdir);
- camel_object_unref (session);
- g_free (path);
- return -1;
- }
- }
-
- camel_exception_init (&ex);
- if (!(session->store = camel_session_get_store ((CamelSession *) session, path, &ex))) {
- g_warning ("Failed to open store for `%s': %s", path, ex.desc);
- g_free (session->srcdir);
- camel_object_unref (session);
- camel_exception_clear (&ex);
- g_free (path);
- return -1;
- }
- g_free (path);
-
- em_migrate (session);
-
- camel_object_unref (session->store);
- g_free (session->srcdir);
-
- camel_object_unref (session);
-
- return 0;
-}
diff --git a/mail/importers/.cvsignore b/mail/importers/.cvsignore
deleted file mode 100644
index ebc3104d83..0000000000
--- a/mail/importers/.cvsignore
+++ /dev/null
@@ -1,15 +0,0 @@
-.deps
-.libs
-.pure
-Makefile
-Makefile.in
-*.bb
-*.bbg
-*.da
-*.gcov
-*.server
-*.server.in
-*.lo
-*.la
-Mailer.h
-Mailer-*.c \ No newline at end of file
diff --git a/mail/importers/GNOME_Evolution_Mail_Elm_Intelligent_Importer.server.in.in b/mail/importers/GNOME_Evolution_Mail_Elm_Intelligent_Importer.server.in.in
deleted file mode 100644
index c9f1c985d1..0000000000
--- a/mail/importers/GNOME_Evolution_Mail_Elm_Intelligent_Importer.server.in.in
+++ /dev/null
@@ -1,26 +0,0 @@
-<oaf_info>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Mail_Elm_Intelligent_Importer_Factory:@VERSION@"
- type="exe"
- location="@BINDIR@/evolution-@VERSION@">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/ObjectFactory:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="name" type="string"
- _value="Evolution Elm importer"/>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Mail_Elm_Intelligent_Importer:@VERSION@"
- type="factory"
- location="OAFIID:GNOME_Evolution_Mail_Elm_Intelligent_Importer_Factory:@VERSION@">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Evolution/IntelligentImporter:@VERSION@"/>
- </oaf_attribute>
-
- <oaf_attribute name="name" type="string"
- _value="Evolution Elm importer"/>
-</oaf_server>
-</oaf_info>
diff --git a/mail/importers/GNOME_Evolution_Mail_Mbox_Importer.server.in.in b/mail/importers/GNOME_Evolution_Mail_Mbox_Importer.server.in.in
deleted file mode 100644
index 72e634bd6a..0000000000
--- a/mail/importers/GNOME_Evolution_Mail_Mbox_Importer.server.in.in
+++ /dev/null
@@ -1,29 +0,0 @@
-<oaf_info>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Mail_Mbox_ImporterFactory:@VERSION@"
- type="exe"
- location="@BINDIR@/evolution-@VERSION@">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/ObjectFactory:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="name" type="string"
- _value="Evolution mbox importer"/>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Mail_Mbox_Importer:@VERSION@"
- type="factory"
- location="OAFIID:GNOME_Evolution_Mail_Mbox_ImporterFactory:@VERSION@">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Evolution/Importer:@VERSION@"/>
- </oaf_attribute>
-
- <oaf_attribute name="evolution:menu_name" type="string"
- _value="MBox (mbox)"/>
- <oaf_attribute name="name" type="string"
- _value="Evolution mbox importer"/>
-</oaf_server>
-
-</oaf_info>
diff --git a/mail/importers/GNOME_Evolution_Mail_Netscape_Intelligent_Importer.server.in.in b/mail/importers/GNOME_Evolution_Mail_Netscape_Intelligent_Importer.server.in.in
deleted file mode 100644
index 83302a5402..0000000000
--- a/mail/importers/GNOME_Evolution_Mail_Netscape_Intelligent_Importer.server.in.in
+++ /dev/null
@@ -1,26 +0,0 @@
-<oaf_info>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Mail_Netscape_Intelligent_Importer_Factory:@VERSION@"
- type="exe"
- location="@BINDIR@/evolution-@VERSION@">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/ObjectFactory:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="name" type="string"
- _value="Evolution Netscape Mail importer"/>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Mail_Netscape_Intelligent_Importer:@VERSION@"
- type="factory"
- location="OAFIID:GNOME_Evolution_Mail_Netscape_Intelligent_Importer_Factory:@VERSION@">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Evolution/IntelligentImporter:@VERSION@"/>
- </oaf_attribute>
-
- <oaf_attribute name="name" type="string"
- _value="Evolution Netscape Mail importer"/>
-</oaf_server>
-</oaf_info>
diff --git a/mail/importers/GNOME_Evolution_Mail_Outlook_Importer.server.in.in b/mail/importers/GNOME_Evolution_Mail_Outlook_Importer.server.in.in
deleted file mode 100644
index 49963ca2a6..0000000000
--- a/mail/importers/GNOME_Evolution_Mail_Outlook_Importer.server.in.in
+++ /dev/null
@@ -1,29 +0,0 @@
-<oaf_info>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Mail_Outlook_ImporterFactory:@VERSION@"
- type="exe"
- location="@BINDIR@/evolution-@VERSION@">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/ObjectFactory:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="name" type="string"
- _value="Evolution Outlook Express 4 importer"/>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Mail_Outlook_Importer:@VERSION@"
- type="factory"
- location="OAFIID:GNOME_Evolution_Mail_Outlook_ImporterFactory:@VERSION@">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Evolution/Importer:@VERSION@"/>
- </oaf_attribute>
-
- <oaf_attribute name="evolution:menu_name" type="string"
- _value="Outlook Express 4 (.mbx)"/>
- <oaf_attribute name="name" type="string"
- _value="Evolution Outlook Express 4 importer"/>
-</oaf_server>
-
-</oaf_info>
diff --git a/mail/importers/GNOME_Evolution_Mail_Pine_Intelligent_Importer.server.in.in b/mail/importers/GNOME_Evolution_Mail_Pine_Intelligent_Importer.server.in.in
deleted file mode 100644
index b81789c291..0000000000
--- a/mail/importers/GNOME_Evolution_Mail_Pine_Intelligent_Importer.server.in.in
+++ /dev/null
@@ -1,26 +0,0 @@
-<oaf_info>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Mail_Pine_Intelligent_Importer_Factory:@VERSION@"
- type="exe"
- location="@BINDIR@/evolution-@VERSION@">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/ObjectFactory:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="name" type="string"
- _value="Evolution Pine importer"/>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Mail_Pine_Intelligent_Importer:@VERSION@"
- type="factory"
- location="OAFIID:GNOME_Evolution_Mail_Pine_Intelligent_Importer_Factory:@VERSION@">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Evolution/IntelligentImporter:@VERSION@"/>
- </oaf_attribute>
-
- <oaf_attribute name="name" type="string"
- _value="Evolution Pine importer"/>
-</oaf_server>
-</oaf_info>
diff --git a/mail/importers/Makefile.am b/mail/importers/Makefile.am
deleted file mode 100644
index 2e2f8881f2..0000000000
--- a/mail/importers/Makefile.am
+++ /dev/null
@@ -1,102 +0,0 @@
-importersdir = $(privlibdir)/evolution-mail-importers
-
-importers_LTLIBRARIES = liboutlook.la libmbox.la \
- libevolution-elm-importer.la \
- libevolution-pine-importer.la \
- libevolution-netscape-importer.la
-
-INCLUDES = -I.. \
- -I$(srcdir)/.. \
- -I$(top_srcdir) \
- -I$(top_srcdir)/shell \
- -I$(top_builddir)/shell \
- -DG_LOG_DOMAIN=\"evolution-mail-importer\" \
- -I$(top_srcdir)/addressbook/backend \
- -I$(top_builddir)/addressbook/backend \
- -DEVOLUTION_PRIVDATADIR=\""$(privdatadir)"\" \
- $(IMPORTERS_CFLAGS)
-
-liboutlook_la_SOURCES = \
- evolution-outlook-importer.c
-liboutlook_la_LDFLAGS = -avoid-version -module
-
-libmbox_la_SOURCES = evolution-mbox-importer.c \
- mozilla-status-headers.h
-libmbox_la_LDFLAGS = -avoid-version -module
-
-IDLS = \
- $(top_srcdir)/mail/Mailer.idl
-
-MAIL_GENERATED_H = \
- Mailer.h
-MAIL_GENERATED_C = \
- Mailer-common.c \
- Mailer-skels.c \
- Mailer-stubs.c
-MAIL_GENERATED = $(MAIL_GENERATED_C) $(MAIL_GENERATED_H)
-
-$(MAIL_GENERATED_H): $(IDLS)
- $(ORBIT_IDL) -I $(srcdir) $(IDL_INCLUDES) $(top_srcdir)/mail/Mailer.idl
-$(MAIL_GENERATED_C): $(MAIL_GENERATED_H)
-
-libevolution_netscape_importer_la_SOURCES = \
- $(MAIL_GENERATED) \
- netscape-importer.c
-
-libevolution_netscape_importer_la_LDFLAGS = -avoid-version -module
-
-libevolution_netscape_importer_la_LIBADD = \
- $(top_builddir)/shell/importer/libevolution-importer.la \
- $(top_builddir)/camel/libcamel.la \
- $(top_builddir)/e-util/libeutil.la \
- $(top_builddir)/filter/libfilter.la \
- $(top_builddir)/shell/libeshell.la \
- $(IMPORTERS_LIBS)
-
-libevolution_elm_importer_la_SOURCES = \
- elm-importer.c
-
-libevolution_elm_importer_la_LDFLAGS = -avoid-version -module
-
-libevolution_elm_importer_la_LIBADD = \
- $(top_builddir)/shell/importer/libevolution-importer.la \
- $(top_builddir)/e-util/libeutil.la \
- $(IMPORTERS_LIBS)
-
-libevolution_pine_importer_la_SOURCES = \
- pine-importer.c
-
-libevolution_pine_importer_la_LDFLAGS = -avoid-version -module
-
-libevolution_pine_importer_la_LIBADD = \
- $(top_builddir)/shell/importer/libevolution-importer.la \
- $(top_builddir)/addressbook/backend/ebook/libebook.la \
- $(top_builddir)/camel/libcamel.la \
- $(IMPORTERS_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 \
-# $(IMPORTERS_LIBS)
-
-
-server_in_files = GNOME_Evolution_Mail_Mbox_Importer.server.in.in \
- GNOME_Evolution_Mail_Outlook_Importer.server.in.in \
- GNOME_Evolution_Mail_Netscape_Intelligent_Importer.server.in.in \
- GNOME_Evolution_Mail_Elm_Intelligent_Importer.server.in.in \
- GNOME_Evolution_Mail_Pine_Intelligent_Importer.server.in.in
-server_DATA = $(server_in_files:.server.in.in=_$(BASE_VERSION).server)
-@EVO_SERVER_RULE@
-@INTLTOOL_SERVER_RULE@
-
-BUILT_SOURCES = $(MAIL_GENERATED) $(server_DATA)
-CLEANFILES = $(BUILT_SOURCES)
-
-EXTRA_DIST = $(server_in_files)
-
-dist-hook:
- cd $(distdir); rm -f $(BUILT_SOURCES)
diff --git a/mail/importers/elm-importer.c b/mail/importers/elm-importer.c
deleted file mode 100644
index 1386e3a26f..0000000000
--- a/mail/importers/elm-importer.c
+++ /dev/null
@@ -1,593 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <gconf/gconf.h>
-#include <gconf/gconf-client.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-activation/bonobo-activation.h>
-
-#include <importer/evolution-intelligent-importer.h>
-#include <importer/evolution-importer-client.h>
-#include <importer/GNOME_Evolution_Importer.h>
-
-#include "mail/mail-importer.h"
-
-#define ELM_INTELLIGENT_IMPORTER_IID "OAFIID:GNOME_Evolution_Mail_Elm_Intelligent_Importer_Factory:" BASE_VERSION
-#define MBOX_IMPORTER_IID "OAFIID:GNOME_Evolution_Mail_Mbox_Importer:" BASE_VERSION
-#define KEY "elm-mail-imported"
-
-/*#define SUPER_IMPORTER_DEBUG*/
-#ifdef SUPER_IMPORTER_DEBUG
-#define d(x) x
-#else
-#define d(x)
-#endif
-
-typedef struct {
- EvolutionIntelligentImporter *ii;
-
- GList *dir_list;
-
- int progress_count;
- int more;
- EvolutionImporterResult result;
-
- GNOME_Evolution_Importer importer;
- EvolutionImporterListener *listener;
-
- GtkWidget *mail;
- gboolean do_mail;
-
- GtkWidget *dialog;
- GtkWidget *label;
- GtkWidget *progressbar;
-} ElmImporter;
-
-typedef struct {
- char *parent;
- char *foldername;
- char *path;
-} ElmFolder;
-
-static GHashTable *elm_prefs = NULL;
-
-void mail_importer_module_init (void);
-
-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)
-{
- GConfClient *gconf;
-
- gconf = gconf_client_get_default ();
- gconf_client_set_bool (gconf, "/apps/evolution/importer/elm/mail", importer->do_mail, NULL);
-}
-
-static void
-elm_restore_settings (ElmImporter *importer)
-{
- GConfClient *gconf = gconf_client_get_default ();
-
- importer->do_mail = gconf_client_get_bool (gconf, "/apps/evolution/importer/elm/mail", NULL);
-}
-
-static void
-importer_cb (EvolutionImporterListener *listener,
- EvolutionImporterResult result,
- gboolean more_items,
- void *data)
-{
- ElmImporter *importer = (ElmImporter *) data;
-
- importer->result = result;
- importer->more = more_items;
-}
-
-static gboolean
-elm_import_file (ElmImporter *importer,
- const char *path,
- const char *folderpath)
-{
- CORBA_boolean result;
- CORBA_Environment ev;
- CORBA_Object objref;
- char *str, *uri;
- struct stat st;
-
- str = g_strdup_printf (_("Importing %s as %s"), path, folderpath);
- gtk_label_set_text (GTK_LABEL (importer->label), str);
- g_free (str);
- while (g_main_context_iteration(NULL, FALSE))
- ;
-
- uri = mail_importer_make_local_folder(folderpath);
- if (!uri)
- return FALSE;
-
- /* if its a dir, we just create it, but dont add anything */
- if (lstat(path, &st) == 0 && S_ISDIR(st.st_mode)) {
- g_free(uri);
- /* this is ok, we return false to say we haven't launched an async task */
- return FALSE;
- }
-
- CORBA_exception_init(&ev);
-
- result = GNOME_Evolution_Importer_loadFile (importer->importer, path, uri, "", &ev);
- g_free(uri);
- if (ev._major != CORBA_NO_EXCEPTION || result == FALSE) {
- g_warning ("Exception here: %s", CORBA_exception_id (&ev));
- CORBA_exception_free (&ev);
- return FALSE;
- }
-
- /* process all items in a direct loop */
- importer->listener = evolution_importer_listener_new (importer_cb, importer);
- objref = bonobo_object_corba_objref (BONOBO_OBJECT (importer->listener));
- do {
- importer->progress_count++;
- if ((importer->progress_count & 0xf) == 0)
- gtk_progress_bar_pulse(GTK_PROGRESS_BAR(importer->progressbar));
-
- importer->result = -1;
- GNOME_Evolution_Importer_processItem (importer->importer, objref, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Exception: %s", CORBA_exception_id (&ev));
- break;
- }
-
- while (importer->result == -1 || g_main_context_pending(NULL))
- g_main_context_iteration(NULL, TRUE);
- } while (importer->more);
-
- bonobo_object_unref((BonoboObject *)importer->listener);
-
- CORBA_exception_free (&ev);
-
- return FALSE;
-}
-
-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;
- struct stat st;
- GConfClient *gconf = gconf_client_get_default();
-
- mail = gconf_client_get_bool(gconf, "/apps/evolution/importer/elm/mail-imported", 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 = lstat(elmdir, &st) == 0 && S_ISDIR(st.st_mode);
-
- 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 = lstat(elmdir, &st) == 0 && S_ISDIR(st.st_mode);
- g_free (elmdir);
-
- aliasfile = gnome_util_prepend_user_home (".elm/aliases");
- aliasexists = lstat(aliasfile, &st) == 0 && S_ISREG(st.st_mode);
- g_free (aliasfile);
-
- exists = (aliasexists || mailexists);
-
- return exists;
-}
-
-static void
-import_next (ElmImporter *importer)
-{
- ElmFolder *data;
-
-trynext:
- if (importer->dir_list) {
- char *folder;
- GList *l;
- int ok;
-
- l = importer->dir_list;
- data = l->data;
-
- folder = g_concat_dir_and_file (data->parent, data->foldername);
-
- importer->dir_list = l->next;
- g_list_free_1(l);
-
- ok = 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);
- /* its ugly, but so is everything else in this file */
- if (!ok)
- goto trynext;
- } else {
- bonobo_object_unref((BonoboObject *)importer->ii);
- }
-}
-
-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)
-{
- 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);
-
- if (importer->do_mail == TRUE) {
- char *elmdir;
- GConfClient *gconf = gconf_client_get_default();
-
- importer->dialog = create_importer_gui (importer);
- gtk_widget_show_all (importer->dialog);
- while (gtk_events_pending ()) {
- gtk_main_iteration ();
- }
-
- gconf_client_set_bool(gconf, "/apps/evolution/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, "/", elmdir);
- g_free (elmdir);
-
- /* Import them */
- import_next (importer);
- }
-
- bonobo_object_unref (BONOBO_OBJECT (ii));
-}
-
-static void
-elm_destroy_cb (ElmImporter *importer, GtkObject *object)
-{
- elm_store_settings (importer);
-
- if (importer->dialog)
- gtk_widget_destroy(importer->dialog);
-
- bonobo_object_release_unref (importer->importer, NULL);
-}
-
-/* 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 *
-elm_factory_fn (BonoboGenericFactory *_factory,
- const char *id,
- 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_restore_settings (elm);
-
- elm->importer = bonobo_activation_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);
- g_object_weak_ref(G_OBJECT (importer), (GWeakNotify)elm_destroy_cb, elm);
- elm->ii = importer;
-
- control = create_checkboxes_control (elm);
- bonobo_object_add_interface (BONOBO_OBJECT (importer),
- BONOBO_OBJECT (control));
- return BONOBO_OBJECT (importer);
-}
-
-void
-mail_importer_module_init (void)
-{
- static gboolean initialised = FALSE;
- BonoboGenericFactory *factory;
-
- if (initialised == TRUE)
- return;
-
- factory = bonobo_generic_factory_new (ELM_INTELLIGENT_IMPORTER_IID,
- elm_factory_fn, NULL);
- if (factory == NULL)
- g_warning ("Could not initialise Elm Intelligent Mail Importer.");
- initialised = TRUE;
-}
diff --git a/mail/importers/evolution-mbox-importer.c b/mail/importers/evolution-mbox-importer.c
deleted file mode 100644
index 83323703af..0000000000
--- a/mail/importers/evolution-mbox-importer.c
+++ /dev/null
@@ -1,335 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <string.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 "mozilla-status-headers.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", G_GNUC_FUNCTION, __LINE__)
-#define OUT g_print ("<==== %s (%d)\n", G_GNUC_FUNCTION, __LINE__)
-#else
-#define IN
-#define OUT
-#endif
-
-#define MBOX_FACTORY_IID "OAFIID:GNOME_Evolution_Mail_Mbox_ImporterFactory:" BASE_VERSION
-
-typedef struct {
- MailImporter importer; /* Parent */
-
- char *filename;
- int num;
- GNOME_Evolution_Storage_Result create_result;
-
- CamelMimeParser *mp;
- gboolean is_folder;
-} MboxImporter;
-
-void mail_importer_module_init (void);
-
-/* EvolutionImporter methods */
-
-
-static CamelMessageInfo *
-get_info_from_mozilla (const char *mozilla_status,
- gboolean *deleted)
-{
- unsigned int status;
- CamelMessageInfo *info;
-
- *deleted = FALSE;
-
- status = strtoul (mozilla_status, NULL, 16);
- if (status == 0) {
- return camel_message_info_new ();
- }
-
- if (status & MSG_FLAG_EXPUNGED) {
- *deleted = TRUE;
-
- return NULL;
- }
-
- info = camel_message_info_new ();
-
- if (status & MSG_FLAG_READ)
- info->flags |= CAMEL_MESSAGE_SEEN;
-
- if (status & MSG_FLAG_MARKED)
- info->flags |= CAMEL_MESSAGE_FLAGGED;
-
- if (status & MSG_FLAG_REPLIED)
- info->flags |= CAMEL_MESSAGE_ANSWERED;
-
- return info;
-}
-
-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;
- const char *mozilla_status;
-
- if (importer->folder == NULL) {
- GNOME_Evolution_ImporterListener_notifyResult (listener,
- GNOME_Evolution_ImporterListener_BAD_FILE,
- FALSE, ev);
- }
-
- 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) == CAMEL_MIME_PARSER_STATE_FROM) {
- /* Import the next message */
- CamelMimeMessage *msg;
- CamelMessageInfo *info;
- gboolean deleted;
-
- 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;
- } else {
- mozilla_status = camel_medium_get_header (CAMEL_MEDIUM (msg), "X-Mozilla-Status");
- if (mozilla_status != NULL) {
- info = get_info_from_mozilla (mozilla_status, &deleted);
- } else {
- deleted = FALSE;
- info = camel_message_info_new ();
- }
-
- if (deleted == FALSE) {
- /* write the mesg */
- camel_folder_append_message (importer->folder, msg, info, NULL, ex);
- }
-
- if (info)
- camel_message_info_free (info);
-
- camel_object_unref (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 (void *data, GObject *object)
-{
- MboxImporter *mbi = data;
- MailImporter *importer = data;
-
- if (importer->folder) {
- if (importer->frozen) {
- camel_folder_sync (importer->folder, FALSE, NULL);
- camel_folder_thaw (importer->folder);
- }
-
- camel_object_unref (importer->folder);
- }
-
- g_free (mbi->filename);
- if (mbi->mp)
- camel_object_unref (mbi->mp);
-
- g_free (mbi);
-}
-
-static gboolean
-load_file_fn (EvolutionImporter *eimporter,
- const char *filename,
- const char *uri,
- const char *folder_type,
- void *closure)
-{
- MboxImporter *mbi;
- MailImporter *importer;
- 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 (uri == NULL || *uri == '\0')
- importer->folder = mail_tool_get_local_inbox (NULL);
- else
- importer->folder = mail_tool_uri_to_folder(uri, 0, NULL);
-
- if (importer->folder == NULL) {
- g_warning ("Bad folder\n");
- goto fail;
- }
-
- if (importer->folder != NULL) {
- camel_folder_freeze (importer->folder);
- importer->frozen = TRUE;
- }
-
- return TRUE;
-
- fail:
- camel_object_unref (mbi->mp);
- mbi->mp = NULL;
-
- return FALSE;
-}
-
-static BonoboObject *
-mbox_factory_fn (BonoboGenericFactory *_factory,
- const char *cid,
- 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);
- g_object_weak_ref(G_OBJECT(importer), 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 mbox 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 62d99bb149..0000000000
--- a/mail/importers/evolution-outlook-importer.c
+++ /dev/null
@@ -1,318 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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:" BASE_VERSION
-
-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 (void *data, GObject *object)
-{
- OutlookImporter *oli = data;
- MailImporter *importer = data;
-
- if (importer->folder)
- camel_object_unref (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 *uri,
- const char *folder_type,
- 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 (uri == NULL || *uri == 0)
- importer->folder = mail_tool_get_local_inbox (NULL);
- else
- importer->folder = mail_tool_uri_to_folder (uri, 0, 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,
- const char *cid,
- 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);
- g_object_weak_ref((GObject *)importer, 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/importers/mozilla-status-headers.h b/mail/importers/mozilla-status-headers.h
deleted file mode 100644
index f459d6ec8f..0000000000
--- a/mail/importers/mozilla-status-headers.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* mozilla-status-headers.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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 copied from nsMsgMessageFlags.h in Mozilla source. */
-
-/* Evolution only cares about these headers I think */
-#define MSG_FLAG_READ 0x0001
-#define MSG_FLAG_REPLIED 0x0002
-#define MSG_FLAG_MARKED 0x0004
-#define MSG_FLAG_EXPUNGED 0x0008
diff --git a/mail/importers/netscape-importer.c b/mail/importers/netscape-importer.c
deleted file mode 100644
index a0610ca1b4..0000000000
--- a/mail/importers/netscape-importer.c
+++ /dev/null
@@ -1,2162 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* netscape-importer.c
- *
- * Authors:
- * Iain Holmes <iain@ximian.com>
- * Christian Kreibich <cK@whoop.org> (email filter import)
- *
- * Copyright 2001 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <gconf/gconf.h>
-#include <gconf/gconf-client.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-activation/bonobo-activation.h>
-
-#include <importer/evolution-intelligent-importer.h>
-#include <importer/GNOME_Evolution_Importer.h>
-#include <importer/evolution-importer-client.h>
-
-#include <filter/filter-context.h>
-#include <filter/filter-filter.h>
-#include <filter/filter-rule.h>
-#include <filter/filter-option.h>
-#include <filter/filter-folder.h>
-#include <filter/filter-int.h>
-#include <shell/evolution-shell-client.h>
-
-#include "Mailer.h"
-#include "mail/mail-importer.h"
-
-static char *nsmail_dir = NULL;
-static GHashTable *user_prefs = NULL;
-
-/* This is rather ugly -- libfilter needs this symbol: */
-EvolutionShellClient *global_shell_client = NULL;
-
-static char *filter_name = N_("Priority Filter \"%s\"");
-
-#define FACTORY_IID "OAFIID:GNOME_Evolution_Mail_Netscape_Intelligent_Importer_Factory:" BASE_VERSION
-#define MBOX_IMPORTER_IID "OAFIID:GNOME_Evolution_Mail_Mbox_Importer:" BASE_VERSION
-#define MAIL_CONFIG_IID "OAFIID:GNOME_Evolution_MailConfig:" BASE_VERSION
-
-#define KEY "netscape-mail-imported"
-
-/*#define SUPER_IMPORTER_DEBUG*/
-#ifdef SUPER_IMPORTER_DEBUG
-#define d(x) x
-#else
-#define d(x)
-#endif
-
-#define MAXLEN 4096
-
-typedef struct {
- EvolutionIntelligentImporter *ii;
-
- GList *dir_list;
-
- int progress_count;
- int more;
- EvolutionImporterResult result;
-
- 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;
-} NsImporter;
-
-
-/* Email filter datastructures ---------------------------------------------- */
-
-
-typedef enum {
- MOVE_TO_FOLDER, CHANGE_PRIORITY, DELETE,
- MARK_READ, IGNORE_THREAD, WATCH_THREAD
-} NsFilterActionType;
-
-static char* ns_filter_action_types[] =
-{
- "Move to folder", "Change priority", "Delete",
- "Mark read", "Ignore thread", "Watch thread"
-};
-
-
-typedef enum {
- HIGHEST, HIGH, NORMAL, LOW, LOWEST, FREE, NONE
-} NsFilterActionValueType;
-
-static char *ns_filter_action_value_types[] =
-{
- "Highest", "High", "Normal", "Low", "Lowest"
-};
-
-
-typedef enum {
- FROM, SUBJECT, TO, CC, TO_OR_CC, BODY, DATE, PRIORITY,
- STATUS, AGE_IN_DAYS, X_MSG_HEADER
-} NsFilterConditionType;
-
-static char *ns_filter_condition_types[] =
-{
- "from", "subject", "to", "CC", "to or CC", "body", "date",
- "priority", "age in days"
-};
-
-
-typedef enum {
- CONTAINS, CONTAINS_NOT, IS, IS_NOT, BEGINS_WITH, ENDS_WITH,
- IS_BEFORE, IS_AFTER, IS_GREATER_THAN, IS_LESS_THAN, READ,
- REPLIED, IS_HIGHER_THAN, IS_LOWER_THAN
-} NsFilterConditionPropertyType;
-
-static char *ns_filter_condition_property_types[] =
-{
- "contains", "doesn't contain", "is", "isn't", "begins with",
- "ends with", "is before", "is after", "is greater than",
- "is less than", "read", "replied", "is higher than",
- "is lower than"
-};
-
-
-typedef struct
-{
- NsFilterConditionType type;
- NsFilterConditionPropertyType prop;
- NsFilterActionValueType prop_val_id; /* for dealing with priority levels */
- char *prop_val_str;
-} NsFilterCondition;
-
-typedef struct {
- char *name;
- char *description;
-
- gboolean enabled;
-
- NsFilterActionType action;
- NsFilterActionValueType action_val_id;
- char *action_val_str;
-
- enum _filter_grouping_t grouping;
- GList *conditions; /* List of NSFilterConditions */
-} NsFilter;
-
-
-/* Prototypes ------------------------------------------------------------- */
-void mail_importer_module_init (void);
-
-static void netscape_filter_cleanup (NsFilter *nsf);
-static char *fix_netscape_folder_names (const char *original_name);
-static void import_next (NsImporter *importer);
-
-
-/* Email filter stuff ----------------------------------------------------- */
-
-static gboolean
-netscape_filter_flatfile_get_entry (FILE *f, char *key, char *val)
-{
- char line[MAXLEN];
- char *ptr = NULL;
- char *ptr2 = NULL;
-
- if (fgets (line, MAXLEN, f)) {
-
- ptr = strchr(line, '=');
- *ptr = '\0';
-
- memcpy (key, line, strlen(line)+1);
-
- ptr += 2; /* Skip '=' and '"' */
- ptr2 = strrchr (ptr, '"');
- *ptr2 = '\0';
-
- memcpy (val, ptr, strlen(ptr)+1);
-
- d(g_warning ("Parsing key/val '%s' '%s'", key, val));
- return TRUE;
-
- }
-
- *key = '\0'; *val = '\0';
- return FALSE;
-}
-
-/* This function parses the filtering condition strings.
- Netscape describes the conditions that determine when
- to apply a filter through a string of the form
-
- " OR (type, property, value) OR (type, property, value) ... "
-
- or
- " AND (type, property, value) AND (type, property, value) ... "
-
- where type can be "subject", "from", "to", "CC" etc, property
- is "contains" etc, and value is the according pattern.
-*/
-static void
-netscape_filter_parse_conditions (NsFilter *nsf, FILE *f, char *condition)
-{
- char *ptr = condition, *ptr2 = NULL;
- char type[MAXLEN];
- char prop[MAXLEN];
- char val[MAXLEN];
- NsFilterCondition *cond;
-
- if ( (ptr = strstr (condition, "OR")) == NULL) {
- nsf->grouping = FILTER_GROUP_ALL;
- } else {
- nsf->grouping = FILTER_GROUP_ANY;
- }
-
- ptr = condition;
- while ( (ptr = strchr (ptr, '(')) != NULL) {
-
- /* Move ptr to start of type */
- ptr++;
-
- /* Move ptr2 up to next comma: */
- if ( (ptr2 = strchr (ptr, ',')) == NULL)
- continue;
-
- memcpy (type, ptr, ptr2-ptr);
- type[ptr2-ptr] = '\0';
-
- /* Move ptr to start of property */
- ptr = ptr2 + 1;
-
- /* Move ptr2 up to next comma: */
- if ( (ptr2 = strchr (ptr, ',')) == NULL)
- continue;
-
- memcpy (prop, ptr, ptr2-ptr);
- prop[ptr2-ptr] = '\0';
-
- /* Move ptr to start of value */
- ptr = ptr2 + 1;
-
- /* Move ptr2 to end of value: */
- if ( (ptr2 = strchr (ptr, ')')) == NULL)
- continue;
-
- memcpy (val, ptr, ptr2-ptr);
- val[ptr2-ptr] = '\0';
-
- cond = g_new0 (NsFilterCondition, 1);
-
- if (!strcmp (type, ns_filter_condition_types[FROM])) {
- cond->type = FROM;
- } else if (!strcmp (type, ns_filter_condition_types[SUBJECT])) {
- cond->type = SUBJECT;
- } else if (!strcmp (type, ns_filter_condition_types[TO])) {
- cond->type = TO;
- } else if (!strcmp (type, ns_filter_condition_types[CC])) {
- cond->type = CC;
- } else if (!strcmp (type, ns_filter_condition_types[TO_OR_CC])) {
- cond->type = TO_OR_CC;
- } else if (!strcmp (type, ns_filter_condition_types[BODY])) {
- cond->type = BODY;
- } else if (!strcmp (type, ns_filter_condition_types[DATE])) {
- cond->type = DATE;
- } else if (!strcmp (type, ns_filter_condition_types[PRIORITY])) {
- cond->type = PRIORITY;
- } else if (!strcmp (type, ns_filter_condition_types[STATUS])) {
- cond->type = STATUS;
- } else if (!strcmp (type, ns_filter_condition_types[AGE_IN_DAYS])) {
- cond->type = AGE_IN_DAYS;
- } else if (!strcmp (type, ns_filter_condition_types[X_MSG_HEADER])) {
- cond->type = X_MSG_HEADER;
- } else {
- d(g_warning ("Unknown condition type '%s' encountered -- skipping.", type));
- g_free (cond);
- continue;
- }
-
-
- if (!strcmp (prop, ns_filter_condition_property_types[CONTAINS])) {
- cond->prop = CONTAINS;
- } else if (!strcmp (prop, ns_filter_condition_property_types[CONTAINS_NOT])) {
- cond->prop = CONTAINS_NOT;
- } else if (!strcmp (prop, ns_filter_condition_property_types[IS])) {
- cond->prop = IS;
- } else if (!strcmp (prop, ns_filter_condition_property_types[IS_NOT])) {
- cond->prop = IS_NOT;
- } else if (!strcmp (prop, ns_filter_condition_property_types[BEGINS_WITH])) {
- cond->prop = BEGINS_WITH;
- } else if (!strcmp (prop, ns_filter_condition_property_types[ENDS_WITH])) {
- cond->prop = ENDS_WITH;
- } else if (!strcmp (prop, ns_filter_condition_property_types[IS_BEFORE])) {
- cond->prop = IS_BEFORE;
- } else if (!strcmp (prop, ns_filter_condition_property_types[IS_AFTER])) {
- cond->prop = IS_AFTER;
- } else if (!strcmp (prop, ns_filter_condition_property_types[IS_GREATER_THAN])) {
- cond->prop = IS_GREATER_THAN;
- } else if (!strcmp (prop, ns_filter_condition_property_types[IS_LESS_THAN])) {
- cond->prop = IS_LESS_THAN;
- } else if (!strcmp (prop, ns_filter_condition_property_types[READ])) {
- cond->prop = READ;
- } else if (!strcmp (prop, ns_filter_condition_property_types[REPLIED])) {
- cond->prop = REPLIED;
- } else if (!strcmp (prop, ns_filter_condition_property_types[IS_HIGHER_THAN])) {
- cond->prop = IS_HIGHER_THAN;
- } else if (!strcmp (prop, ns_filter_condition_property_types[IS_LOWER_THAN])) {
- cond->prop = IS_LOWER_THAN;
- } else {
- d(g_warning ("Unknown condition property '%s' encountered -- skipping.", prop));
- g_free (cond);
- continue;
- }
-
- cond->prop_val_id = FREE;
-
- if (!strcmp (val, ns_filter_action_value_types[LOWEST])) {
- cond->prop_val_id = LOWEST;
- } else if (!strcmp (val, ns_filter_action_value_types[LOW])) {
- cond->prop_val_id = LOW;
- } else if (!strcmp (val, ns_filter_action_value_types[NORMAL])) {
- cond->prop_val_id = NORMAL;
- } else if (!strcmp (val, ns_filter_action_value_types[HIGH])) {
- cond->prop_val_id = HIGH;
- } else if (!strcmp (val, ns_filter_action_value_types[HIGHEST])) {
- cond->prop_val_id = HIGHEST;
- }
-
- cond->prop_val_str = g_strdup (val);
- nsf->conditions = g_list_append (nsf->conditions, cond);
- }
-}
-
-
-static NsFilter *
-netscape_filter_read_next (FILE *mailrule_handle)
-{
- NsFilter *nsf;
- char key[MAXLEN];
- char val[MAXLEN];
-
- key[0] = '\0';
-
- for ( ; ; ) {
-
- /* Skip stuff at the beginning, until beginning of next filter
- is read: */
-
- do {
- if (!netscape_filter_flatfile_get_entry (mailrule_handle, key, val))
- return NULL;
-
- } while (strcmp(key, "name"));
-
- nsf = g_new0 (NsFilter, 1);
- nsf->name = g_strdup (val);
-
-
- /* Read value for "enabled" setting */
-
- if (!netscape_filter_flatfile_get_entry (mailrule_handle, key, val))
- goto cleanup;
- if (strcmp (key, "enabled")) {
- goto cleanup;
- }
- if (strcmp (val, "true"))
- nsf->enabled = TRUE;
- else
- nsf->enabled = FALSE;
-
-
- /* Read filter description */
-
- if (!netscape_filter_flatfile_get_entry (mailrule_handle, key, val))
- goto cleanup;
- if (strcmp (key, "description")) {
- goto cleanup;
- }
- nsf->description = g_strdup (val);
-
-
- /* Skip one line -- it's a "type" entry and always seems to be "1"? */
-
- if (!netscape_filter_flatfile_get_entry (mailrule_handle, key, val))
- goto cleanup;
- if (strcmp (key, "type")) {
- goto cleanup;
- }
-
- /* Read filter action and handle action value accordingly */
-
- if (!netscape_filter_flatfile_get_entry (mailrule_handle, key, val))
- goto cleanup;
- if (strcmp (key, "action")) {
- goto cleanup;
- }
- if (!strcmp (val, ns_filter_action_types[MOVE_TO_FOLDER])) {
-
- if (!netscape_filter_flatfile_get_entry (mailrule_handle, key, val))
- goto cleanup;
- if (strcmp (key, "actionValue")) {
- goto cleanup;
- }
- nsf->action = MOVE_TO_FOLDER;
- nsf->action_val_id = FREE;
- nsf->action_val_str = g_strdup(val);
- }
- else if (!strcmp (val, ns_filter_action_types[CHANGE_PRIORITY])) {
-
- if (!netscape_filter_flatfile_get_entry (mailrule_handle, key, val))
- goto cleanup;
- if (strcmp (key, "actionValue")) {
- goto cleanup;
- }
-
- nsf->action = CHANGE_PRIORITY;
-
- if (!strcmp (val, ns_filter_action_value_types[LOWEST])) {
- nsf->action_val_id = LOWEST;
- } else if (!strcmp (val, ns_filter_action_value_types[LOW])) {
- nsf->action_val_id = LOW;
- } else if (!strcmp (val, ns_filter_action_value_types[NORMAL])) {
- nsf->action_val_id = NORMAL;
- } else if (!strcmp (val, ns_filter_action_value_types[HIGH])) {
- nsf->action_val_id = HIGH;
- } else if (!strcmp (val, ns_filter_action_value_types[HIGHEST])) {
- nsf->action_val_id = HIGHEST;
- } else {
- d(g_warning ("Unknown Netscape filter action value '%s' for action '%s'",
- val, ns_filter_action_types[CHANGE_PRIORITY]));
- goto cleanup;
- }
-
- nsf->action_val_str = NULL;
-
- }
- else if (!strcmp (val, ns_filter_action_types[DELETE])) {
-
- nsf->action = DELETE;
- nsf->action_val_id = NONE;
- }
- else if (!strcmp (val, ns_filter_action_types[MARK_READ])) {
-
- nsf->action = MARK_READ;
- nsf->action_val_id = NONE;
- }
- else if (!strcmp (val, ns_filter_action_types[IGNORE_THREAD])) {
-
- nsf->action = IGNORE_THREAD;
- nsf->action_val_id = NONE;
- }
- else if (!strcmp (val, ns_filter_action_types[WATCH_THREAD])) {
-
- nsf->action = WATCH_THREAD;
- nsf->action_val_id = NONE;
- }
- else {
- d(g_warning ("Unknown Netscape filter action '%s'", val));
- goto cleanup;
- }
-
-
- /* Read conditions, the fun part ... */
-
- if (!netscape_filter_flatfile_get_entry (mailrule_handle, key, val))
- goto cleanup;
- if (strcmp (key, "condition")) {
- goto cleanup;
- }
- netscape_filter_parse_conditions (nsf, mailrule_handle, val);
-
- return nsf;
-
- cleanup:
- netscape_filter_cleanup (nsf);
- }
-
- return NULL;
-}
-
-
-static void
-netscape_filter_cleanup (NsFilter *nsf)
-{
- GList *l;
-
- g_free (nsf->name);
- g_free (nsf->description);
- g_free (nsf->action_val_str);
-
- for (l = nsf->conditions; l; l = l->next) {
-
- NsFilterCondition *cond = (NsFilterCondition *)l->data;
-
- g_free (cond->prop_val_str);
- g_free (cond);
- }
-
- g_list_free (nsf->conditions);
- g_free (nsf);
-}
-
-
-static gboolean
-netscape_filter_set_opt_for_cond (NsFilterCondition *cond, FilterOption* op)
-{
- switch (cond->prop) {
- case CONTAINS:
- filter_option_set_current (op, "contains");
- break;
- case CONTAINS_NOT:
- filter_option_set_current (op, "does not contain");
- break;
- case IS:
- filter_option_set_current (op, "is");
- break;
- case IS_NOT:
- filter_option_set_current (op, "is not");
- break;
- case BEGINS_WITH:
- filter_option_set_current (op, "starts with");
- break;
- case ENDS_WITH:
- filter_option_set_current (op, "ends with");
- break;
- default:
- return FALSE;
- }
-
- return TRUE;
-}
-
-
-/* Translates a string of the form
- folder1.sbd/folder2.sbd/.../folderN.sbd/folder
-
- into one that looks like this:
-
- folder1/folder2/.../folderN/folder
-*/
-static char*
-netscape_filter_strip_sbd (char *ns_folder)
-{
- char *folder_copy;
- char s[MAXLEN];
- char *ptr, *ptr2;
- char *fixed_folder;
-
- folder_copy = g_strdup (ns_folder);
- ptr = folder_copy;
- s[0] = '\0';
-
- while (ptr) {
- if ( (ptr2 = strstr (ptr, ".sbd")) == NULL)
- break;
-
- *ptr2 = '\0';
- strcat (s, ptr);
-
- ptr = ptr2 + 4; /* skip ".sbd" */
- }
-
- fixed_folder = fix_netscape_folder_names (ptr);
- strcat (s, fixed_folder);
- g_free (folder_copy);
- g_free (fixed_folder);
-
- d(g_warning ("Stripped '%s' to '%s'", ns_folder, s));
-
- return g_strdup (s);
-}
-
-
-static char *
-netscape_filter_map_folder_to_uri (char *folder)
-{
- char *folder_copy;
- char s[MAXLEN];
- char *ptr, *ptr2;
-
- folder_copy = g_strdup (folder);
- ptr = folder_copy;
-
- g_snprintf (s, MAXLEN, "file://%s/evolution/local/", g_get_home_dir ());
-
- while (ptr) {
- if ( (ptr2 = strchr (ptr, '/')) == NULL)
- break;
-
- *ptr2 = '\0';
- strcat (s, ptr);
- strcat (s, "/subfolders/");
-
- ptr = ptr2 + 1;
- }
-
- strcat (s, ptr);
- g_free (folder_copy);
-
- d(g_warning ("Mapped '%s' to '%s'", folder, s));
-
- return g_strdup (s);
-}
-
-
-static void
-netscape_filter_change_priority_warning (void)
-{
- GtkWidget *dialog;
- static gboolean already_shown = FALSE;
-
- if (!already_shown) {
- already_shown = TRUE;
- dialog = gnome_ok_dialog (_("Some of your Netscape email filters are based on\n"
- "email priorities, which are not used in Evolution.\n"
- "Instead, Evolution provides scores in the range of\n"
- "-3 to 3 that can be assigned to emails and filtered\n"
- "accordingly.\n"
- "\n"
- "As a workaround, a set of filters called \"Priority Filter\"\n"
- "was added that converts Netscape's email priorities into\n"
- "Evolution's scores, and the affected filters use scores instead\n"
- "of priorities. Check the imported filters to make sure\n"
- "everything still works as intended."));
- gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
- }
-}
-
-
-static void
-netscape_filter_threads_action_not_supported (void)
-{
- GtkWidget *dialog;
- static gboolean already_shown = FALSE;
-
- if (!already_shown) {
- already_shown = TRUE;
- dialog = gnome_ok_dialog (_("Some of your Netscape email filters use\n"
- "the \"Ignore Thread\" or \"Watch Thread\"\n"
- "feature, which is not supported in Evolution.\n"
- "These filters will be dropped."));
- gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
- }
-}
-
-
-static void
-netscape_filter_body_is_not_supported (void)
-{
- GtkWidget *dialog;
- static gboolean already_shown = FALSE;
-
- if (!already_shown) {
- already_shown = TRUE;
- dialog = gnome_ok_dialog (_("Some of your Netscape email filters test the\n"
- "body of emails for (in)equality to a given string,\n"
- "which is not supported in Evolution. Those filters\n"
- "were modified to test whether that string is or is not\n"
- "contained in the message body."));
- gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
- }
-}
-
-
-static FilterRule*
-netscape_create_priority_converter (FilterContext *fc, NsFilterActionValueType priority)
-{
- FilterFilter *ff;
- FilterPart *fp;
- FilterRule *fr;
- FilterElement *el;
- char s[MAXLEN];
- int v;
-
- ff = filter_filter_new ();
- fr = FILTER_RULE(ff);
-
- g_snprintf (s, MAXLEN, filter_name, ns_filter_action_value_types[priority]);
- filter_rule_set_name (fr, s);
- filter_rule_set_source (fr, FILTER_SOURCE_INCOMING);
-
- fp = rule_context_create_part (RULE_CONTEXT(fc), "header");
- filter_rule_add_part (fr, fp);
- el = filter_part_find_element (fp, "header-field");
- filter_input_set_value ((FilterInput*)el, "X-Priority");
- el = filter_part_find_element (fp, "header-type");
- filter_option_set_current ((FilterOption*)el, "contains");
- el = filter_part_find_element (fp, "word");
- filter_input_set_value ((FilterInput*)el,
- ns_filter_action_value_types[priority]);
-
- fp = filter_context_create_action (fc, "score");
- el = filter_part_find_element (fp, "score");
-
- switch (priority) {
- case LOWEST:
- v = -2;
- break;
- case LOW:
- v = -1;
- break;
- case NORMAL:
- v = 0;
- break;
- case HIGH:
- v = 1;
- break;
- case HIGHEST:
- v = 2;
- break;
- default:
- g_object_unref((ff));
- return NULL;
- }
-
- filter_int_set_value((FilterInt *)el, v);
- filter_filter_add_action (ff, fp);
-
- return FILTER_RULE(ff);
-}
-
-
-static void
-netscape_add_priority_workaround_filters (FilterContext *fc)
-{
- FilterRule *fr;
-
- fr = netscape_create_priority_converter (fc, LOWEST);
- rule_context_add_rule (RULE_CONTEXT(fc), FILTER_RULE(fr));
- rule_context_rank_rule (RULE_CONTEXT(fc), FILTER_RULE(fr), FILTER_SOURCE_INCOMING, 0);
-
- fr = netscape_create_priority_converter (fc, LOW);
- rule_context_add_rule (RULE_CONTEXT(fc), FILTER_RULE(fr));
- rule_context_rank_rule (RULE_CONTEXT(fc), FILTER_RULE(fr), FILTER_SOURCE_INCOMING, 1);
-
- fr = netscape_create_priority_converter (fc, HIGH);
- rule_context_add_rule (RULE_CONTEXT(fc), FILTER_RULE(fr));
- rule_context_rank_rule (RULE_CONTEXT(fc), FILTER_RULE(fr), FILTER_SOURCE_INCOMING, 2);
-
- fr = netscape_create_priority_converter (fc, HIGHEST);
- rule_context_add_rule (RULE_CONTEXT(fc), FILTER_RULE(fr));
- rule_context_rank_rule (RULE_CONTEXT(fc), FILTER_RULE(fr), FILTER_SOURCE_INCOMING, 3);
-}
-
-
-static gboolean
-netscape_filter_score_set (NsFilterCondition *cond, FilterInt *el)
-{
- int v;
-
- switch (cond->prop_val_id) {
- case LOWEST:
- v = -2;
- break;
- case LOW:
- v = -1;
- break;
- case NORMAL:
- v = 0;
- break;
- case HIGH:
- v = 1;
- break;
- case HIGHEST:
- v = 2;
- break;
- default:
- return FALSE;
- }
-
- filter_int_set_value(el, v);
-
- return TRUE;
-}
-
-
-static FilterFilter *
-netscape_filter_to_evol_filter (FilterContext *fc, NsFilter *nsf, gboolean *priority_needed)
-{
- RuleContext *rc = RULE_CONTEXT(fc);
- FilterFilter *ff = NULL;
- FilterPart *fp;
- FilterRule *fr;
- FilterElement *el;
- GList *l;
- gboolean part_added = FALSE, action_added = FALSE;
-
-
- ff = filter_filter_new ();
- fr = FILTER_RULE(ff);
-
- filter_rule_set_name (fr, nsf->name);
- filter_rule_set_source (fr, FILTER_SOURCE_INCOMING);
- fr->grouping = nsf->grouping;
-
-
- /* build and add partset */
-
- for (l = nsf->conditions; l; l = l->next) {
-
- NsFilterCondition *cond = (NsFilterCondition*) l->data;
-
- fp = NULL;
-
- switch (cond->type) {
- case FROM:
- fp = rule_context_create_part (rc, "sender");
- filter_rule_add_part (fr, fp);
- el = filter_part_find_element (fp, "sender-type");
-
- if (!netscape_filter_set_opt_for_cond (cond, (FilterOption*)el)) {
- filter_rule_remove_part (fr, fp);
- g_object_unref((fp));
- continue;
- }
-
- el = filter_part_find_element (fp, "sender");
- filter_input_set_value ((FilterInput *)el, cond->prop_val_str);
- part_added = TRUE;
- break;
-
- case SUBJECT:
- fp = rule_context_create_part (rc, "subject");
- filter_rule_add_part (fr, fp);
- el = filter_part_find_element (fp, "subject-type");
-
- if (!netscape_filter_set_opt_for_cond (cond, (FilterOption*)el)) {
- filter_rule_remove_part (fr, fp);
- g_object_unref((fp));
- continue;
- }
-
- el = filter_part_find_element (fp, "subject");
- filter_input_set_value ((FilterInput *)el, cond->prop_val_str);
- part_added = TRUE;
- break;
- case TO:
- case CC:
- case TO_OR_CC:
- fp = rule_context_create_part (rc, "to");
- filter_rule_add_part (fr, fp);
- el = filter_part_find_element (fp, "recipient-type");
-
- if (!netscape_filter_set_opt_for_cond (cond, (FilterOption*)el)) {
- filter_rule_remove_part (fr, fp);
- g_object_unref((fp));
- continue;
- }
-
- el = filter_part_find_element (fp, "recipient");
- filter_input_set_value ((FilterInput *)el, cond->prop_val_str);
- part_added = TRUE;
- break;
- case BODY:
- fp = rule_context_create_part (rc, "body");
- filter_rule_add_part (fr, fp);
- el = filter_part_find_element (fp, "body-type");
-
- switch (cond->prop) {
- case CONTAINS:
- filter_option_set_current ((FilterOption*)el, "contains");
- break;
- case CONTAINS_NOT:
- filter_option_set_current ((FilterOption*)el, "not contains");
- break;
- case IS:
- netscape_filter_body_is_not_supported ();
- filter_option_set_current ((FilterOption*)el, "contains");
- break;
- case IS_NOT:
- netscape_filter_body_is_not_supported ();
- filter_option_set_current ((FilterOption*)el, "not contains");
- break;
- default:
- g_warning("Body rule dropped");
- filter_rule_remove_part (fr, fp);
- g_object_unref((fp));
- continue;
- }
-
- el = filter_part_find_element (fp, "word");
- filter_input_set_value ((FilterInput *)el, cond->prop_val_str);
- part_added = TRUE;
- break;
- case DATE:
- fp = rule_context_create_part (rc, "sent-date");
- filter_rule_add_part (fr, fp);
- el = filter_part_find_element (fp, "date-spec-type");
-
- switch (cond->prop) {
- case IS:
- filter_option_set_current ((FilterOption*)el, "is");
- break;
- case IS_NOT:
- filter_option_set_current ((FilterOption*)el, "is-not");
- break;
- case IS_BEFORE:
- filter_option_set_current ((FilterOption*)el, "before");
- break;
- case IS_AFTER:
- filter_option_set_current ((FilterOption*)el, "after");
- break;
- default:
- filter_rule_remove_part (fr, fp);
- g_object_unref((fp));
- continue;
- }
-
- el = filter_part_find_element (fp, "versus");
- filter_input_set_value ((FilterInput *)el, cond->prop_val_str);
- part_added = TRUE;
- break;
- case PRIORITY:
- switch (cond->prop) {
- case IS:
- *priority_needed = TRUE;
- fp = rule_context_create_part (rc, "score");
- filter_rule_add_part (fr, fp);
- el = filter_part_find_element (fp, "score-type");
- filter_option_set_current ((FilterOption*)el, "is");
- el = filter_part_find_element (fp, "versus");
-
- if (!netscape_filter_score_set(cond, (FilterInt*)el)) {
- filter_rule_remove_part (fr, fp);
- g_object_unref((fp));
- continue;
- }
-
- break;
- case IS_NOT:
- *priority_needed = TRUE;
- fp = rule_context_create_part (rc, "score");
- filter_rule_add_part (fr, fp);
- el = filter_part_find_element (fp, "score-type");
- filter_option_set_current ((FilterOption*)el, "is-not");
- el = filter_part_find_element (fp, "versus");
-
- if (!netscape_filter_score_set(cond, (FilterInt*)el)) {
- filter_rule_remove_part (fr, fp);
- g_object_unref((fp));
- continue;
- }
-
- break;
- case IS_HIGHER_THAN:
- *priority_needed = TRUE;
- fp = rule_context_create_part (rc, "score");
- filter_rule_add_part (fr, fp);
- el = filter_part_find_element (fp, "score-type");
- filter_option_set_current ((FilterOption*)el, "greater-than");
- el = filter_part_find_element (fp, "versus");
-
- if (!netscape_filter_score_set(cond, (FilterInt*)el)) {
- filter_rule_remove_part (fr, fp);
- g_object_unref((fp));
- continue;
- }
-
- break;
- case IS_LOWER_THAN:
- *priority_needed = TRUE;
- fp = rule_context_create_part (rc, "score");
- filter_rule_add_part (fr, fp);
- el = filter_part_find_element (fp, "score-type");
- filter_option_set_current ((FilterOption*)el, "less-than");
- el = filter_part_find_element (fp, "versus");
-
- if (!netscape_filter_score_set(cond, (FilterInt*)el)) {
- filter_rule_remove_part (fr, fp);
- g_object_unref((fp));
- continue;
- }
- break;
- default:
- filter_rule_remove_part (fr, fp);
- g_object_unref((fp));
- continue;
- }
- part_added = TRUE;
- break;
-
- case STATUS:
- fp = rule_context_create_part (rc, "status");
- filter_rule_add_part (fr, fp);
- el = filter_part_find_element (fp, "match-type");
-
- switch (cond->prop) {
- case IS:
- filter_option_set_current ((FilterOption*)el, "is");
- el = filter_part_find_element (fp, "flag");
-
- if (!strcmp (cond->prop_val_str,
- ns_filter_condition_property_types[READ])) {
- filter_option_set_current ((FilterOption*)el, "Seen");
- } else if (!strcmp (cond->prop_val_str,
- ns_filter_condition_property_types[REPLIED])) {
- filter_option_set_current ((FilterOption*)el, "Answered");
- }
- break;
- case IS_NOT:
- filter_option_set_current ((FilterOption*)el, "is not");
- el = filter_part_find_element (fp, "flag");
-
- if (!strcmp (cond->prop_val_str,
- ns_filter_condition_property_types[READ])) {
- filter_option_set_current ((FilterOption*)el, "Seen");
- } else if (!strcmp (cond->prop_val_str,
- ns_filter_condition_property_types[REPLIED])) {
- filter_option_set_current ((FilterOption*)el, "Answered");
- }
- default:
- filter_rule_remove_part (fr, fp);
- g_object_unref((fp));
- continue;
- }
- part_added = TRUE;
- break;
- case AGE_IN_DAYS:
- /* I guess we can skip that -- Netscape crashes anyway
- whenever you try to use that setting ... :) */
- break;
- case X_MSG_HEADER:
- fp = rule_context_create_part (rc, "header");
- filter_rule_add_part (fr, fp);
- el = filter_part_find_element (fp, "header-field");
- filter_input_set_value ((FilterInput *)el, cond->prop_val_str);
- el = filter_part_find_element (fp, "header-type");
- filter_option_set_current ((FilterOption*)el, "exists");
- part_added = TRUE;
- break;
- default:
- continue;
- }
- }
-
- if (!part_added) {
- g_object_unref((ff));
- return NULL;
- }
-
- /* build and add actionset */
-
- switch (nsf->action) {
- case MOVE_TO_FOLDER:
- {
- char *evol_folder;
- char *evol_folder_uri;
-
- fp = filter_context_create_action (fc, "move-to-folder");
- filter_filter_add_action (ff, fp);
- el = filter_part_find_element (fp, "folder");
-
- evol_folder = netscape_filter_strip_sbd (nsf->action_val_str);
- evol_folder_uri = netscape_filter_map_folder_to_uri (evol_folder);
- filter_folder_set_value ((FilterFolder *)el, evol_folder_uri);
- g_free (evol_folder);
- g_free (evol_folder_uri);
-
- action_added = TRUE;
- }
- break;
- case CHANGE_PRIORITY:
- fp = filter_context_create_action (fc, "score");
- el = filter_part_find_element (fp, "score");
-
- switch (nsf->action_val_id) {
- case LOWEST:
- filter_int_set_value((FilterInt *)el, -2);
- action_added = TRUE;
- break;
- case LOW:
- filter_int_set_value((FilterInt *)el, -1);
- action_added = TRUE;
- break;
- case NORMAL:
- filter_int_set_value((FilterInt *)el, 0);
- action_added = TRUE;
- break;
- case HIGH:
- filter_int_set_value((FilterInt *)el, 1);
- action_added = TRUE;
- break;
- case HIGHEST:
- filter_int_set_value((FilterInt *)el, 2);
- action_added = TRUE;
- break;
- default:
- g_object_unref((fp));
- }
- if (action_added) {
- *priority_needed = TRUE;
- filter_filter_add_action (ff, fp);
- }
- break;
- case DELETE:
- fp = filter_context_create_action (fc, "delete");
- filter_filter_add_action (ff, fp);
- action_added = TRUE;
- break;
- case MARK_READ:
- fp = filter_context_create_action (fc, "set-status");
- el = filter_part_find_element (fp, "flag");
- filter_option_set_current ((FilterOption *)el, "Seen");
- filter_filter_add_action (ff, fp);
- action_added = TRUE;
- break;
- case IGNORE_THREAD:
- case WATCH_THREAD:
- netscape_filter_threads_action_not_supported ();
- break;
- default:
- break;
- }
-
- if (!action_added) {
- g_object_unref((ff));
- return NULL;
- }
-
- return ff;
-}
-
-
-static void
-netscape_import_filters (NsImporter *importer)
-{
- FilterContext *fc;
- char *user, *system;
- FILE *mailrule_handle;
- char *ns_mailrule;
- NsFilter *nsf;
- FilterFilter *ff;
- gboolean priority_needed = FALSE;
-
- ns_mailrule = gnome_util_prepend_user_home (".netscape/mailrule");
- mailrule_handle = fopen (ns_mailrule, "r");
- g_free (ns_mailrule);
-
- if (mailrule_handle == NULL) {
- d(g_warning ("No .netscape/mailrule found."));
- user_prefs = NULL;
- return;
- }
-
- fc = filter_context_new ();
- user = g_concat_dir_and_file (g_get_home_dir (),
- "evolution/filters.xml");
- system = EVOLUTION_PRIVDATADIR "/filtertypes.xml";
-
- if (rule_context_load ((RuleContext *)fc, system, user) < 0) {
- g_warning ("Could not load rule context.");
- goto exit;
- }
-
- while ( (nsf = netscape_filter_read_next (mailrule_handle)) != NULL) {
-
- if ( (ff = netscape_filter_to_evol_filter (fc, nsf, &priority_needed)) != NULL)
- rule_context_add_rule (RULE_CONTEXT(fc), FILTER_RULE(ff));
- netscape_filter_cleanup (nsf);
- }
-
- if (priority_needed) {
- netscape_filter_change_priority_warning ();
- netscape_add_priority_workaround_filters (fc);
- }
-
- if (rule_context_save(RULE_CONTEXT(fc), user) < 0) {
- g_warning ("Could not save user's rule context.");
- }
-
- exit:
- g_free(user);
- g_object_unref((fc));
-
-}
-
-
-
-
-/* Email folder & accounts stuff ----------------------------------------------- */
-
-
-static GtkWidget *
-create_importer_gui (NsImporter *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 (NsImporter *importer)
-{
- GConfClient *gconf = gconf_client_get_default();
-
- gconf_client_set_bool(gconf, "/apps/evolution/importer/netscape/mail", importer->do_mail, NULL);
- gconf_client_set_bool(gconf, "/apps/evolution/importer/netscape/settings", importer->do_settings, NULL);
- gconf_client_set_bool(gconf, "/apps/evolution/importer/netscape/filters", importer->do_filters, NULL);
-}
-
-static void
-netscape_restore_settings (NsImporter *importer)
-{
- GConfClient *gconf = gconf_client_get_default();
-
- importer->do_mail = gconf_client_get_bool(gconf, "/apps/evolution/importer/netscape/mail", NULL);
- importer->do_settings = gconf_client_get_bool(gconf, "/apps/evolution/importer/netscape/settings", NULL);
- importer->do_filters = gconf_client_get_bool(gconf, "/apps/evolution/importer/netscape/filters", 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[MAXLEN];
-
- 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, MAXLEN, 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 (NsImporter *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 = bonobo_activation_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");
- /* FIXME rodo 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_uri = 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 */
- }
-
- while ((contents = readdir(base)) != NULL) {
- char *fullpath;
-
- if (strcmp (contents->d_name, ".") == 0 ||
- strcmp (contents->d_name, "..") == 0) {
- continue;
- }
-
- fullpath = g_build_filename(path, contents->d_name, NULL);
- if (lstat (fullpath, &buf) == -1) {
- g_free(fullpath);
- continue;
- }
-
- if ((S_ISDIR (buf.st_mode) && !is_dir_empty (fullpath))
- || (S_ISREG(buf.st_mode) && buf.st_size != 0)) {
- g_free (fullpath);
- closedir (base);
- return FALSE;
- }
-
- g_free (fullpath);
- }
-
- closedir (base);
- return TRUE;
-}
-
-static gboolean
-netscape_can_import (EvolutionIntelligentImporter *ii,
- void *closure)
-{
- 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 void
-importer_cb (EvolutionImporterListener *listener,
- EvolutionImporterResult result,
- gboolean more_items,
- void *data)
-{
- NsImporter *importer = (NsImporter *) data;
-
- importer->result = result;
- importer->more = more_items;
-}
-
-static gboolean
-netscape_import_file (NsImporter *importer,
- const char *path,
- const char *folderpath)
-{
- CORBA_boolean result;
- CORBA_Environment ev;
- CORBA_Object objref;
- char *str, *uri;
-
- /* Do import of mail folder */
- d(g_warning ("Importing %s as %s", 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 (g_main_context_iteration(NULL, FALSE))
- ;
-
- uri = mail_importer_make_local_folder(folderpath);
- if (!uri)
- return FALSE;
-
- result = GNOME_Evolution_Importer_loadFile (importer->importer, path, uri, "", &ev);
- g_free(uri);
- if (ev._major != CORBA_NO_EXCEPTION || result == FALSE) {
- g_warning ("Exception here: %s", CORBA_exception_id (&ev));
- CORBA_exception_free (&ev);
- return FALSE;
- }
-
- /* process all items in a direct loop */
- importer->listener = evolution_importer_listener_new (importer_cb, importer);
- objref = bonobo_object_corba_objref (BONOBO_OBJECT (importer->listener));
- do {
- importer->progress_count++;
- if ((importer->progress_count & 0xf) == 0)
- gtk_progress_bar_pulse(GTK_PROGRESS_BAR(importer->progressbar));
-
- importer->result = -1;
- GNOME_Evolution_Importer_processItem (importer->importer, objref, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Exception: %s", CORBA_exception_id (&ev));
- break;
- }
-
- while (importer->result == -1 || g_main_context_pending(NULL))
- g_main_context_iteration(NULL, TRUE);
- } while (importer->more);
- bonobo_object_unref((BonoboObject *)importer->listener);
- CORBA_exception_free (&ev);
-
- return FALSE;
-}
-
-typedef struct {
- NsImporter *importer;
- char *parent;
- char *path;
- char *foldername;
-} NetscapeCreateDirectoryData;
-
-static void
-import_next (NsImporter *importer)
-{
- NetscapeCreateDirectoryData *data;
-
-trynext:
- if (importer->dir_list) {
- char *folder;
- GList *l;
- int ok;
-
- l = importer->dir_list;
- data = l->data;
-
- folder = g_build_filename(data->parent, data->foldername, NULL);
-
- importer->dir_list = l->next;
- g_list_free_1(l);
-
- ok = 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);
- if (!ok)
- goto trynext;
- } else {
- bonobo_object_unref((BonoboObject *)importer->ii);
- }
-}
-
-/* We don't allow any mail to be imported into a reservered Evolution folder name */
-static char *reserved_names[] = {
- N_("Trash"),
- N_("Calendar"),
- N_("Contacts"),
- N_("Tasks"),
- NULL
-};
-
-static char *
-fix_netscape_folder_names (const char *original_name)
-{
- int i;
-
- for (i = 0; reserved_names[i] != NULL; i++) {
- if (strcmp (original_name, _(reserved_names[i])) == 0) {
- return g_strdup_printf ("Netscape-%s",
- _(reserved_names[i]));
- }
- }
-
- 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 (NsImporter *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 = fix_netscape_folder_names (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)
-{
- NsImporter *importer = closure;
- GConfClient *gconf = gconf_client_get_default();
-
- 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 if we're going to be active */
- /* Importing mail filters is not a criterion because it makes
- little sense to import the filters but not the mail folders. */
- if (importer->do_settings == TRUE ||
- importer->do_mail == TRUE) {
- importer->dialog = create_importer_gui (importer);
- gtk_widget_show_all (importer->dialog);
- while (gtk_events_pending ()) {
- gtk_main_iteration ();
- }
- }
-
- if (importer->do_settings == TRUE) {
- gconf_client_set_bool(gconf, "/apps/evolution/importer/netscape/settings-imported", TRUE, NULL);
- netscape_import_accounts (importer);
- }
-
- if (importer->do_mail == TRUE) {
-
- /* Import the mail filters if needed ... */
- if (importer->do_filters == TRUE) {
- gconf_client_set_bool(gconf, "/apps/evolution/importer/netscape/filters-imported", TRUE, NULL);
- gtk_label_set_text (GTK_LABEL (importer->label),
- _("Scanning mail filters"));
-
- netscape_import_filters (importer);
- }
-
- gconf_client_set_bool(gconf, "/apps/evolution/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);
- }
-
- 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));
- }
-
- bonobo_object_unref (BONOBO_OBJECT (ii));
-}
-
-static void
-netscape_destroy_cb (NsImporter *importer, GObject *object)
-{
- netscape_store_settings (importer);
-
- if (importer->importer != CORBA_OBJECT_NIL) {
- bonobo_object_release_unref (importer->importer, NULL);
- }
-
- if (importer->dialog)
- gtk_widget_destroy(importer->dialog);
-
- g_free(importer);
-}
-
-/* Fun initialisation stuff */
-
-/* Fun with aggregation */
-static void
-checkbox_toggle_cb (GtkToggleButton *tb,
- NsImporter *importer)
-{
- /* Some extra logic here to make the filters choice
- depending on the mail choice */
- if (GTK_WIDGET(tb) == importer->mail) {
- importer->do_mail = gtk_toggle_button_get_active (tb);
-
- if (importer->do_mail == FALSE) {
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(importer->filters), FALSE);
- gtk_widget_set_sensitive(GTK_WIDGET(importer->filters), FALSE);
- importer->do_filters = FALSE;
- } else {
- gtk_widget_set_sensitive(GTK_WIDGET(importer->filters), TRUE);
- }
-
- } else if (GTK_WIDGET(tb) == importer->settings) {
- importer->do_settings = gtk_toggle_button_get_active (tb);
-
- } else if (GTK_WIDGET(tb) == importer->filters) {
- importer->do_filters = gtk_toggle_button_get_active (tb);
-
- }
- /* *do_item = gtk_toggle_button_get_active (tb); */
-}
-
-static BonoboControl *
-create_checkboxes_control (NsImporter *importer)
-{
- GtkWidget *hbox;
- BonoboControl *control;
-
- hbox = gtk_hbox_new (FALSE, 2);
-
- importer->mail = gtk_check_button_new_with_label (_("Mail"));
- g_signal_connect((importer->mail), "toggled",
- G_CALLBACK (checkbox_toggle_cb),
- importer);
-
- importer->settings = gtk_check_button_new_with_label (_("Settings"));
- g_signal_connect((importer->settings), "toggled",
- G_CALLBACK (checkbox_toggle_cb),
- importer);
-
- importer->filters = gtk_check_button_new_with_label (_("Mail Filters"));
- gtk_widget_set_sensitive(GTK_WIDGET(importer->filters), FALSE);
- g_signal_connect((importer->filters), "toggled",
- G_CALLBACK (checkbox_toggle_cb),
- importer);
-
- 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_box_pack_start (GTK_BOX (hbox), importer->filters, FALSE, FALSE, 0);
-
- gtk_widget_show_all (hbox);
- control = bonobo_control_new (hbox);
- return control;
-}
-
-static BonoboObject *
-factory_fn (BonoboGenericFactory *_factory,
- const char *iid,
- void *closure)
-{
- EvolutionIntelligentImporter *importer;
- BonoboControl *control;
- NsImporter *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 (NsImporter, 1);
-
- CORBA_exception_init (&ev);
-
- netscape_restore_settings (netscape);
-
- netscape->importer = bonobo_activation_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);
- g_object_weak_ref(G_OBJECT (importer), (GWeakNotify)netscape_destroy_cb, netscape);
- netscape->ii = importer;
-
- control = create_checkboxes_control (netscape);
- bonobo_object_add_interface (BONOBO_OBJECT (importer),
- BONOBO_OBJECT (control));
- return BONOBO_OBJECT (importer);
-}
-
-void
-mail_importer_module_init (void)
-{
- BonoboGenericFactory *factory;
- static int init = FALSE;
-
- if (init)
- return;
-
- factory = bonobo_generic_factory_new (FACTORY_IID, factory_fn, NULL);
- if (factory == NULL)
- g_warning("Could not initialise Netscape intelligent mail importer");
- init = 1;
-}
diff --git a/mail/importers/pine-importer.c b/mail/importers/pine-importer.c
deleted file mode 100644
index 89cfcc2fdc..0000000000
--- a/mail/importers/pine-importer.c
+++ /dev/null
@@ -1,643 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <string.h>
-
-#include <glib.h>
-
-#include <libgnomeui/gnome-messagebox.h>
-#include <gtk/gtk.h>
-
-#include <gconf/gconf.h>
-#include <gconf/gconf-client.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 <importer/evolution-intelligent-importer.h>
-#include <importer/evolution-importer-client.h>
-#include <importer/GNOME_Evolution_Importer.h>
-
-#include "mail/mail-importer.h"
-
-#include <ebook/e-book.h>
-#include <ebook/e-card-simple.h>
-
-#define PINE_INTELLIGENT_IMPORTER_IID "OAFIID:GNOME_Evolution_Mail_Pine_Intelligent_Importer_Factory:" BASE_VERSION
-#define MBOX_IMPORTER_IID "OAFIID:GNOME_Evolution_Mail_Mbox_Importer:" BASE_VERSION
-#define KEY "pine-mail-imported"
-
-/*#define SUPER_IMPORTER_DEBUG*/
-#ifdef SUPER_IMPORTER_DEBUG
-#define d(x) x
-#else
-#define d(x)
-#endif
-
-typedef struct {
- EvolutionIntelligentImporter *ii;
-
- GList *dir_list;
-
- int progress_count;
- int more;
- EvolutionImporterResult result;
-
- GNOME_Evolution_Importer importer;
- EvolutionImporterListener *listener;
-
- GtkWidget *mail;
- gboolean do_mail;
- GtkWidget *address;
- gboolean do_address;
-
- EBook *book;
-
- /* GUI */
- GtkWidget *dialog;
- GtkWidget *label;
- GtkWidget *progressbar;
-} PineImporter;
-
-typedef struct {
- char *parent;
- char *foldername;
- char *path;
- gboolean folder;
-} PineFolder;
-
-void mail_importer_module_init (void);
-
-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)
-{
- GConfClient *gconf = gconf_client_get_default ();
-
- gconf_client_set_bool (gconf, "/apps/evolution/importer/pine/mail", importer->do_mail, NULL);
- gconf_client_set_bool (gconf, "/apps/evolution/importer/pine/address", importer->do_address, NULL);
-}
-
-static void
-pine_restore_settings (PineImporter *importer)
-{
- GConfClient *gconf = gconf_client_get_default ();
-
- importer->do_mail = gconf_client_get_bool (gconf, "/apps/evolution/importer/pine/mail", NULL);
- importer->do_address = gconf_client_get_bool (gconf, "/apps/evolution/importer/pine/address", NULL);
-}
-
-static void
-add_card_cb (EBook *book,
- EBookStatus status,
- const char *id,
- gpointer closure)
-{
- g_object_unref (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]);
- g_object_set (card,
- "nickname", strings[0],
- "full_name", strings[1],
- "name", name, NULL);
- g_object_get (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 = g_build_filename(g_get_home_dir(), ".addressbook", NULL);
- 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;
-
- importer->progress_count++;
- if ((importer->progress_count & 0xf) == 0)
- gtk_progress_bar_pulse(GTK_PROGRESS_BAR(importer->progressbar));
-
- 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);
-}
-
-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_build_filename(g_get_home_dir (),
- "evolution/local/Contacts/addressbook.db", NULL);
- uri = g_strdup_printf ("file://%s", path);
- g_free (path);
-
- e_book_load_uri (importer->book, uri, import_addressfile, importer);
- g_free (uri);
-}
-
-static void
-importer_cb (EvolutionImporterListener *listener,
- EvolutionImporterResult result,
- gboolean more_items,
- void *data)
-{
- PineImporter *importer = (PineImporter *) data;
-
- importer->result = result;
- importer->more = more_items;
-}
-
-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, *uri;
- struct stat st;
-
- 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 (g_main_context_iteration(NULL, FALSE))
- ;
-
- uri = mail_importer_make_local_folder(folderpath);
- if (!uri)
- return FALSE;
-
- /* only create dirs, dont try to import them */
- if (lstat(path, &st) == 0 && S_ISDIR(st.st_mode)) {
- g_free(uri);
- /* this is ok, we return false to say we haven't launched an async task */
- return FALSE;
- }
-
- result = GNOME_Evolution_Importer_loadFile (importer->importer, path, uri, "", &ev);
- g_free(uri);
- if (ev._major != CORBA_NO_EXCEPTION || result == FALSE) {
- g_warning ("Exception here: %s\n%s, %s", CORBA_exception_id (&ev), path, folderpath);
- CORBA_exception_free (&ev);
- return FALSE;
- }
-
- /* process all items in a direct loop */
- importer->listener = evolution_importer_listener_new (importer_cb, importer);
- objref = bonobo_object_corba_objref (BONOBO_OBJECT (importer->listener));
- do {
- importer->progress_count++;
- if ((importer->progress_count & 0xf) == 0)
- gtk_progress_bar_pulse(GTK_PROGRESS_BAR(importer->progressbar));
-
- importer->result = -1;
- GNOME_Evolution_Importer_processItem (importer->importer, objref, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Exception: %s", CORBA_exception_id (&ev));
- break;
- }
-
- while (importer->result == -1 || g_main_context_pending(NULL))
- g_main_context_iteration(NULL, TRUE);
- } while (importer->more);
- bonobo_object_unref((BonoboObject *)importer->listener);
-
- CORBA_exception_free (&ev);
-
- return FALSE;
-}
-
-static gboolean
-pine_can_import (EvolutionIntelligentImporter *ii,
- void *closure)
-{
- PineImporter *importer = closure;
- char *maildir, *addrfile;
- gboolean md_exists = FALSE, addr_exists = FALSE;
- struct stat st;
-
- maildir = g_build_filename(g_get_home_dir(), "mail", NULL);
- md_exists = lstat(maildir, &st) == 0 && S_ISDIR(st.st_mode);
- 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 = g_build_filename(g_get_home_dir(), ".addressbook", NULL);
- addr_exists = lstat(addrfile, &st) == 0 && S_ISREG(st.st_mode);
- g_free (addrfile);
- gtk_widget_set_sensitive (importer->address, addr_exists);
-
- return md_exists || addr_exists;
-}
-
-static void
-import_next (PineImporter *importer)
-{
- PineFolder *data;
-
-trynext:
- if (importer->dir_list) {
- char *folder;
- GList *l;
- int ok;
-
- l = importer->dir_list;
- data = l->data;
- folder = g_build_filename(data->parent, data->foldername, NULL);
- importer->dir_list = l->next;
- g_list_free_1(l);
-
- ok = 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);
- if (!ok)
- goto trynext;
- } else {
- bonobo_object_unref((BonoboObject *)importer->ii);
- }
-}
-
-/* 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_build_filename(dirname, current->d_name, NULL);
- 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_build_filename (orig_parent, foldername, NULL);
- 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)
-{
- PineImporter *importer = closure;
- char *maildir;
- GConfClient *gconf = gconf_client_get_default ();
-
- bonobo_object_ref (BONOBO_OBJECT (ii));
- pine_store_settings (importer);
-
- /* Create a dialog */
- if (importer->do_address == TRUE ||
- importer->do_mail == TRUE) {
- importer->dialog = create_importer_gui (importer);
- gtk_widget_show_all (importer->dialog);
- while (gtk_events_pending ()) {
- gtk_main_iteration ();
- }
- }
-
- if (importer->do_address == TRUE) {
- gconf_client_set_bool(gconf, "/apps/evolution/importer/pine/address-imported", TRUE, NULL);
- import_addressbook (importer);
- }
-
- if (importer->do_mail == TRUE) {
- gconf_client_set_bool(gconf, "/apps/evolution/importer/pine/mail-imported", TRUE, NULL);
- maildir = g_build_filename(g_get_home_dir(), "mail", NULL);
- 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);
- }
-
- 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 */
- bonobo_object_unref (BONOBO_OBJECT (ii));
- }
- bonobo_object_unref (BONOBO_OBJECT (ii));
-}
-
-static void
-pine_destroy_cb (PineImporter *importer, GtkObject *object)
-{
- pine_store_settings (importer);
-
- if (importer->dialog)
- gtk_widget_destroy(importer->dialog);
-
- if (importer->importer != CORBA_OBJECT_NIL) {
- bonobo_object_release_unref (importer->importer, NULL);
- }
-}
-
-/* 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,
- const char *iid,
- 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_restore_settings (pine);
-
- pine->importer = bonobo_activation_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);
- g_object_weak_ref((GObject *)importer, (GWeakNotify)pine_destroy_cb, pine);
- pine->ii = importer;
-
- control = create_checkboxes_control (pine);
- bonobo_object_add_interface (BONOBO_OBJECT (importer),
- BONOBO_OBJECT (control));
- return BONOBO_OBJECT (importer);
-}
-
-void
-mail_importer_module_init (void)
-{
- BonoboGenericFactory *factory;
- static int init = FALSE;
-
- if (init)
- return;
-
- factory = bonobo_generic_factory_new (PINE_INTELLIGENT_IMPORTER_IID,
- factory_fn, NULL);
- if (factory == NULL)
- g_warning ("Could not initialise Pine Intelligent Mail Importer.");
- init = TRUE;
-}
diff --git a/mail/local-config.glade b/mail/local-config.glade
deleted file mode 100644
index bc63ea7b47..0000000000
--- a/mail/local-config.glade
+++ /dev/null
@@ -1,325 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-
-<widget class="GtkDialog" id="dialog_format">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="title" translatable="yes"></property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="has_separator">True</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="cancel_format">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">-6</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="apply_format">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">-5</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox1">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment2">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0</property>
- <property name="xscale">1</property>
- <property name="yscale">0</property>
-
- <child>
- <widget class="GtkImage" id="pixmap1">
- <property name="visible">True</property>
- <property name="pixbuf">mail-config-druid.png</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label4">
- <property name="visible">True</property>
- <property name="label" translatable="yes">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.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHSeparator" id="hseparator1">
- <property name="visible">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTable" id="table_format">
- <property name="border_width">2</property>
- <property name="visible">True</property>
- <property name="n_rows">3</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label8">
- <property name="visible">True</property>
- <property name="label" translatable="yes">New store format:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_RIGHT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label9">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Current store format:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_RIGHT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label_format">
- <property name="visible">True</property>
- <property name="label" translatable="yes">mbox</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xpad">8</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label11">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_RIGHT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="check_index_body">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Index body contents</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment4">
- <property name="visible">True</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">1</property>
-
- <child>
- <widget class="GtkOptionMenu" id="option_format">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget1">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget2">
- <property name="visible">True</property>
- <property name="label" translatable="yes">mbox</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">maildir</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget4">
- <property name="visible">True</property>
- <property name="label" translatable="yes">mh</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/mail/mail-account-editor.c b/mail/mail-account-editor.c
deleted file mode 100644
index 11cdb56f94..0000000000
--- a/mail/mail-account-editor.c
+++ /dev/null
@@ -1,225 +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-2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <camel/camel-url.h>
-#include <e-util/e-dialog-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 (GObject *obj);
-
-static GtkDialogClass *parent_class = NULL;
-
-GType
-mail_account_editor_get_type ()
-{
- static GtkType type = 0;
-
- if (!type) {
- GTypeInfo type_info = {
- sizeof (MailAccountEditorClass),
- NULL, NULL,
- (GClassInitFunc) mail_account_editor_class_init,
- NULL, NULL,
- sizeof (MailAccountEditor),
- 0,
- NULL
- };
-
- type = g_type_register_static (gtk_dialog_get_type (), "MailAccountEditor", &type_info, 0);
- }
-
- return type;
-}
-
-static void
-mail_account_editor_class_init (MailAccountEditorClass *klass)
-{
- GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_ref(gtk_dialog_get_type ());
-
- gobject_class->finalize = mail_account_editor_finalize;
-}
-
-static void
-mail_account_editor_finalize (GObject *obj)
-{
- MailAccountEditor *editor = (MailAccountEditor *) obj;
-
- mail_account_gui_destroy (editor->gui);
-
- G_OBJECT_CLASS (parent_class)->finalize (obj);
-}
-
-static gboolean
-apply_changes (MailAccountEditor *editor)
-{
- 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_current_page (editor->notebook, page);
- gtk_widget_grab_focus (incomplete);
- e_notice (editor, GTK_MESSAGE_ERROR, _("You have not filled in all of the required information."));
- return FALSE;
- }
-
- if (mail_account_gui_save (editor->gui) == FALSE)
- return FALSE;
-
- gtk_dialog_set_response_sensitive (GTK_DIALOG (editor),
- GTK_RESPONSE_APPLY, FALSE);
-
- /* 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
-editor_response_cb (GtkWidget *widget, int button, gpointer user_data)
-{
- MailAccountEditor *editor = user_data;
-
- switch (button) {
- case GTK_RESPONSE_APPLY:
- apply_changes (editor);
- return;
- case GTK_RESPONSE_OK:
- apply_changes (editor);
- default:
- gtk_widget_destroy (GTK_WIDGET (editor));
- }
-}
-
-static void
-mail_account_editor_changed (GtkWidget *widget, MailAccountEditor *editor)
-{
- gtk_dialog_set_response_sensitive (GTK_WIDGET (editor), GTK_RESPONSE_APPLY, TRUE);
-}
-
-static void
-construct (MailAccountEditor *editor, EAccount *account, EMAccountPrefs *dialog)
-{
- EAccountService *source = account->source;
-
- editor->gui = mail_account_gui_new (account, dialog);
-
- /* 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), GTK_DIALOG (editor)->vbox);
-
- /* give our dialog an OK button and title */
- gtk_window_set_title (GTK_WINDOW (editor), _("Evolution Account Editor"));
- gtk_window_set_resizable (GTK_WINDOW (editor), TRUE);
- gtk_window_set_modal (GTK_WINDOW (editor), FALSE);
- gtk_dialog_add_buttons (GTK_DIALOG (editor),
- GTK_STOCK_APPLY, GTK_RESPONSE_APPLY,
- GTK_STOCK_CLOSE, GTK_RESPONSE_CANCEL,
- GTK_STOCK_OK, GTK_RESPONSE_OK,
- NULL);
-
- g_signal_connect (editor, "response", G_CALLBACK (editor_response_cb), editor);
-
- g_signal_connect (editor->gui->account_name, "changed", G_CALLBACK (mail_account_editor_changed), editor);
- g_signal_connect (editor->gui->default_account, "toggled", G_CALLBACK (mail_account_editor_changed), editor);
- g_signal_connect (editor->gui->full_name, "changed", G_CALLBACK (mail_account_editor_changed), editor);
- g_signal_connect (editor->gui->email_address, "changed", G_CALLBACK (mail_account_editor_changed), editor);
- g_signal_connect (editor->gui->reply_to, "changed", G_CALLBACK (mail_account_editor_changed), editor);
- g_signal_connect (editor->gui->organization, "changed", G_CALLBACK (mail_account_editor_changed), editor);
-
- g_signal_connect (editor->gui->source.type, "changed", G_CALLBACK (mail_account_editor_changed), editor);
- g_signal_connect (editor->gui->source.hostname, "changed", G_CALLBACK (mail_account_editor_changed), editor);
- g_signal_connect (editor->gui->source.username, "changed", G_CALLBACK (mail_account_editor_changed), editor);
- g_signal_connect (editor->gui->source.path, "changed", G_CALLBACK (mail_account_editor_changed), editor);
- g_signal_connect (editor->gui->source.use_ssl, "changed", G_CALLBACK (mail_account_editor_changed), editor);
- g_signal_connect (editor->gui->source.authtype, "changed", G_CALLBACK (mail_account_editor_changed), editor);
- g_signal_connect (editor->gui->source.remember, "toggled", G_CALLBACK (mail_account_editor_changed), editor);
-
- g_signal_connect (editor->gui->source_auto_check, "toggled", G_CALLBACK (mail_account_editor_changed), editor);
- g_signal_connect (editor->gui->source_auto_check_min, "value-changed", G_CALLBACK (mail_account_editor_changed), editor);
-
- g_signal_connect (editor->gui->transport.type, "changed", G_CALLBACK (mail_account_editor_changed), editor);
- g_signal_connect (editor->gui->transport.hostname, "changed", G_CALLBACK (mail_account_editor_changed), editor);
- g_signal_connect (editor->gui->transport.username, "changed", G_CALLBACK (mail_account_editor_changed), editor);
- g_signal_connect (editor->gui->transport_needs_auth, "toggled", G_CALLBACK (mail_account_editor_changed), editor);
- g_signal_connect (editor->gui->transport.use_ssl, "changed", G_CALLBACK (mail_account_editor_changed), editor);
- g_signal_connect (editor->gui->transport.authtype, "changed", G_CALLBACK (mail_account_editor_changed), editor);
- g_signal_connect (editor->gui->transport.remember, "toggled", G_CALLBACK (mail_account_editor_changed), editor);
-
- g_signal_connect (editor->gui->drafts_folder_button, "clicked", G_CALLBACK (mail_account_editor_changed), editor);
- g_signal_connect (editor->gui->sent_folder_button, "clicked", G_CALLBACK (mail_account_editor_changed), editor);
- g_signal_connect (editor->gui->always_cc, "toggled", G_CALLBACK (mail_account_editor_changed), editor);
- g_signal_connect (editor->gui->cc_addrs, "changed", G_CALLBACK (mail_account_editor_changed), editor);
- g_signal_connect (editor->gui->always_bcc, "toggled", G_CALLBACK (mail_account_editor_changed), editor);
- g_signal_connect (editor->gui->bcc_addrs, "changed", G_CALLBACK (mail_account_editor_changed), editor);
-
- g_signal_connect (editor->gui->pgp_key, "changed", G_CALLBACK (mail_account_editor_changed), editor);
- g_signal_connect (editor->gui->pgp_encrypt_to_self, "toggled", G_CALLBACK (mail_account_editor_changed), editor);
- g_signal_connect (editor->gui->pgp_always_sign, "toggled", G_CALLBACK (mail_account_editor_changed), editor);
- g_signal_connect (editor->gui->pgp_no_imip_sign, "toggled", G_CALLBACK (mail_account_editor_changed), editor);
- g_signal_connect (editor->gui->pgp_always_trust, "toggled", G_CALLBACK (mail_account_editor_changed), editor);
-
- mail_account_gui_setup (editor->gui, GTK_WIDGET (editor));
-
- mail_account_gui_build_extra_conf (editor->gui, source->url);
-
- gtk_dialog_set_response_sensitive (GTK_DIALOG (editor),
- GTK_RESPONSE_APPLY, FALSE);
-
- gtk_widget_grab_focus (GTK_WIDGET (editor->gui->account_name));
-}
-
-MailAccountEditor *
-mail_account_editor_new (EAccount *account, GtkWindow *parent, EMAccountPrefs *dialog)
-{
- MailAccountEditor *new;
-
- new = (MailAccountEditor *) g_object_new (mail_account_editor_get_type (), NULL);
- gtk_window_set_transient_for ((GtkWindow *) new, parent);
- construct (new, account, dialog);
-
- return new;
-}
diff --git a/mail/mail-account-editor.h b/mail/mail-account-editor.h
deleted file mode 100644
index ff66a47703..0000000000
--- a/mail/mail-account-editor.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001-2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_ACCOUNT_EDITOR_H
-#define MAIL_ACCOUNT_EDITOR_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <gtk/gtk.h>
-#include <libgnomeui/gnome-file-entry.h>
-
-#include "mail-account-gui.h"
-#include "em-account-prefs.h"
-
-#define MAIL_ACCOUNT_EDITOR_TYPE (mail_account_editor_get_type ())
-#define MAIL_ACCOUNT_EDITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MAIL_ACCOUNT_EDITOR_TYPE, MailAccountEditor))
-#define MAIL_ACCOUNT_EDITOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), MAIL_ACCOUNT_EDITOR_TYPE, MailAccountEditorClass))
-#define MAIL_IS_ACCOUNT_EDITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MAIL_ACCOUNT_EDITOR_TYPE))
-#define MAIL_IS_ACCOUNT_EDITOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MAIL_ACCOUNT_EDITOR_TYPE))
-
-struct _MailAccountEditor {
- GtkDialog parent_object;
-
- MailAccountGui *gui;
- GtkNotebook *notebook;
-};
-
-typedef struct _MailAccountEditor MailAccountEditor;
-
-typedef struct {
- GtkDialogClass parent_class;
-
- /* signals */
-
-} MailAccountEditorClass;
-
-GtkType mail_account_editor_get_type (void);
-
-MailAccountEditor *mail_account_editor_new (EAccount *account, GtkWindow *parent, EMAccountPrefs *dialog);
-
-#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 40858ec792..0000000000
--- a/mail/mail-account-gui.c
+++ /dev/null
@@ -1,2105 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <stdarg.h>
-
-#include <gconf/gconf.h>
-#include <gconf/gconf-client.h>
-
-#include <e-util/e-account-list.h>
-#include <e-util/e-dialog-utils.h>
-
-#include "em-folder-selection-button.h"
-#include "mail-account-gui.h"
-#include "mail-session.h"
-#include "mail-send-recv.h"
-#include "mail-signature-editor.h"
-#include "mail-component.h"
-#include "em-composer-prefs.h"
-#include "mail-config.h"
-#include "mail-ops.h"
-#include "mail-mt.h"
-#include "mail.h"
-
-#if defined (HAVE_NSS)
-#include "smime/gui/e-cert-selector.h"
-#endif
-
-#define d(x)
-
-extern char *default_drafts_folder_uri, *default_sent_folder_uri;
-
-static void save_service (MailAccountGuiService *gsvc, GHashTable *extra_conf, EAccountService *service);
-static void service_changed (GtkEntry *entry, gpointer user_data);
-
-struct {
- char *label;
- char *value;
-} ssl_options[] = {
- { N_("Always"), "always" },
- { N_("Whenever Possible"), "when-possible" },
- { N_("Never"), "never" }
-};
-
-static int num_ssl_options = sizeof (ssl_options) / sizeof (ssl_options[0]);
-
-static gboolean
-is_email (const char *address)
-{
- /* This is supposed to check if the address's domain could be
- an FQDN but alas, it's not worth the pain and suffering. */
- const char *at;
-
- 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;
-
- return TRUE;
-}
-
-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)
-{
- const 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),
- GTK_WIDGET (gui->reply_to),
- 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),
- GTK_WIDGET (gui->reply_to),
- NULL);
- return FALSE;
- }
-
- /* make sure that if the reply-to field is filled in, that it is valid */
- text = gtk_entry_get_text (gui->reply_to);
- if (text && *text && !is_email (text)) {
- if (incomplete)
- *incomplete = get_focused_widget (GTK_WIDGET (gui->reply_to),
- GTK_WIDGET (gui->email_address),
- GTK_WIDGET (gui->full_name),
- NULL);
- return FALSE;
- }
-
- return TRUE;
-}
-
-static void
-auto_detected_foreach (gpointer key, gpointer value, gpointer user_data)
-{
- g_free (key);
- g_free (value);
-}
-
-static gboolean
-service_complete (MailAccountGuiService *service, GHashTable *extra_config, GtkWidget **incomplete)
-{
- const CamelProvider *prov = service->provider;
- GtkWidget *path;
- const char *text;
-
- 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, gui->extra_config, incomplete);
-}
-
-void
-mail_account_gui_auto_detect_extra_conf (MailAccountGui *gui)
-{
- MailAccountGuiService *service = &gui->source;
- CamelProvider *prov = service->provider;
- GHashTable *auto_detected;
- GtkWidget *path;
- CamelURL *url;
- char *text;
- const char *tmp;
-
- if (!prov)
- return;
-
- /* transports don't have a path */
- if (service->path)
- path = GTK_WIDGET (service->path);
- else
- path = NULL;
-
- url = g_new0 (CamelURL, 1);
- camel_url_set_protocol (url, prov->protocol);
-
- if (CAMEL_PROVIDER_ALLOWS (prov, CAMEL_URL_PART_HOST)) {
- text = g_strdup (gtk_entry_get_text (service->hostname));
- if (*text) {
- char *port;
-
- port = strchr (text, ':');
- if (port) {
- *port++ = '\0';
- camel_url_set_port (url, atoi (port));
- }
-
- camel_url_set_host (url, text);
- }
- g_free (text);
- }
-
- if (CAMEL_PROVIDER_ALLOWS (prov, CAMEL_URL_PART_USER)) {
- text = g_strdup (gtk_entry_get_text (service->username));
- g_strstrip (text);
- camel_url_set_user (url, text);
- g_free (text);
- }
-
- if (path && CAMEL_PROVIDER_ALLOWS (prov, CAMEL_URL_PART_PATH)) {
- tmp = gtk_entry_get_text (service->path);
- if (tmp && *tmp)
- camel_url_set_path (url, tmp);
- }
-
- camel_provider_auto_detect (prov, url, &auto_detected, NULL);
- camel_url_free (url);
-
- if (auto_detected) {
- CamelProviderConfEntry *entries;
- GtkToggleButton *toggle;
- GtkSpinButton *spin;
- GtkEntry *entry;
- char *value;
- int i;
-
- entries = service->provider->extra_conf;
-
- for (i = 0; entries[i].type != CAMEL_PROVIDER_CONF_END; i++) {
- if (!entries[i].name)
- continue;
-
- value = g_hash_table_lookup (auto_detected, entries[i].name);
- if (!value)
- continue;
-
- switch (entries[i].type) {
- case CAMEL_PROVIDER_CONF_CHECKBOX:
- toggle = g_hash_table_lookup (gui->extra_config, entries[i].name);
- gtk_toggle_button_set_active (toggle, atoi (value));
- break;
-
- case CAMEL_PROVIDER_CONF_ENTRY:
- entry = g_hash_table_lookup (gui->extra_config, entries[i].name);
- if (value)
- gtk_entry_set_text (entry, value);
- break;
-
- case CAMEL_PROVIDER_CONF_CHECKSPIN:
- {
- gboolean enable;
- double val;
- char *name;
-
- toggle = g_hash_table_lookup (gui->extra_config, entries[i].name);
- name = g_strdup_printf ("%s_value", entries[i].name);
- spin = g_hash_table_lookup (gui->extra_config, name);
- g_free (name);
-
- enable = *value++ == 'y';
- gtk_toggle_button_set_active (toggle, enable);
- g_assert (*value == ':');
- val = strtod (++value, NULL);
- gtk_spin_button_set_value (spin, val);
- }
- break;
- default:
- break;
- }
- }
-
- g_hash_table_foreach (auto_detected, auto_detected_foreach, NULL);
- g_hash_table_destroy (auto_detected);
- }
-}
-
-gboolean
-mail_account_gui_transport_complete (MailAccountGui *gui, GtkWidget **incomplete)
-{
- if (!gui->transport.provider) {
- if (incomplete)
- *incomplete = GTK_WIDGET (gui->transport.type);
- return FALSE;
- }
-
- /* If it's both source and transport, there's nothing extra to
- * configure on the transport page.
- */
- if (CAMEL_PROVIDER_IS_STORE_AND_TRANSPORT (gui->transport.provider)) {
- if (gui->transport.provider == gui->source.provider)
- return TRUE;
- if (incomplete)
- *incomplete = GTK_WIDGET (gui->transport.type);
- return FALSE;
- }
-
- if (!service_complete (&gui->transport, NULL, incomplete))
- return FALSE;
-
- /* FIXME? */
- if (gtk_toggle_button_get_active (gui->transport_needs_auth) &&
- CAMEL_PROVIDER_ALLOWS (gui->transport.provider, CAMEL_URL_PART_USER)) {
- const 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)
-{
- const 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 = g_object_get_data ((GObject *) 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 = g_object_get_data ((GObject *) 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;
- }
-
- g_object_set_data ((GObject *) item, "authtype", authtype);
- g_signal_connect (item, "activate", G_CALLBACK (service_authtype_changed), service);
-
- gtk_menu_shell_append(GTK_MENU_SHELL(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);
- g_signal_emit_by_name (first, "activate");
- }
-}
-
-static void
-transport_provider_set_available (MailAccountGui *gui, CamelProvider *provider,
- gboolean available)
-{
- GtkWidget *menuitem;
-
- menuitem = g_object_get_data ((GObject *) gui->transport.type, provider->protocol);
- g_return_if_fail (menuitem != NULL);
-
- gtk_widget_set_sensitive (menuitem, available);
-
- if (available) {
- gpointer number = g_object_get_data ((GObject *) menuitem, "number");
-
- g_signal_emit_by_name (menuitem, "activate");
- gtk_option_menu_set_history (gui->transport.type, GPOINTER_TO_UINT (number));
- }
-}
-
-static void
-source_type_changed (GtkWidget *widget, gpointer user_data)
-{
- MailAccountGui *gui = user_data;
- GtkWidget *file_entry, *label, *frame, *dwidget = NULL;
- CamelProvider *provider;
-
- provider = g_object_get_data ((GObject *) widget, "provider");
-
- /* If the previously-selected provider has a linked transport,
- * disable it.
- */
- if (gui->source.provider &&
- CAMEL_PROVIDER_IS_STORE_AND_TRANSPORT (gui->source.provider))
- transport_provider_set_available (gui, gui->source.provider, FALSE);
-
- 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);
-
- 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 (gui->source.ssl_hbox);
- else
- gtk_widget_hide (gui->source.ssl_hbox);
- gtk_widget_hide (gui->source.no_ssl);
-#else
- gtk_widget_hide (gui->source.ssl_hbox);
- gtk_widget_show (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);
- }
-
- g_signal_emit_by_name (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);
-
- if (provider && CAMEL_PROVIDER_IS_STORE_AND_TRANSPORT (provider))
- transport_provider_set_available (gui, provider, TRUE);
-}
-
-
-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 = g_object_get_data ((GObject *) widget, "provider");
- gui->transport.provider = provider;
-
- /* description */
- gtk_label_set_text (gui->transport.description, provider->description);
-
- frame = glade_xml_get_widget (gui->xml, "transport_frame");
- if (!CAMEL_PROVIDER_IS_STORE_AND_TRANSPORT (provider) &&
- (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 (gui->transport.ssl_hbox);
- else
- gtk_widget_hide (gui->transport.ssl_hbox);
- gtk_widget_hide (gui->transport.no_ssl);
-#else
- gtk_widget_hide (gui->transport.ssl_hbox);
- gtk_widget_show (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_IS_STORE_AND_TRANSPORT (provider) &&
- 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);
-
- g_signal_emit_by_name (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, NULL));
-}
-
-static void
-service_check_supported (GtkButton *button, gpointer user_data)
-{
- MailAccountGuiService *gsvc = user_data;
- EAccountService *service;
- GList *authtypes = NULL;
- GtkWidget *authitem;
- GtkWidget *window;
-
- service = g_new0 (EAccountService, 1);
-
- /* This is sort of a hack, when checking for supported AUTH
- types we don't want to use whatever authtype is selected
- because it may not be available. */
- authitem = gsvc->authitem;
- gsvc->authitem = NULL;
-
- save_service (gsvc, NULL, service);
-
- gsvc->authitem = authitem;
-
- window = gtk_widget_get_ancestor (GTK_WIDGET (button), GTK_TYPE_WINDOW);
-
- if (mail_config_check_service (service->url, gsvc->provider_type, &authtypes, GTK_WINDOW (window))) {
- 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);
- }
-
- g_free (service->url);
- g_free (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);
- g_signal_connect (toggle, "toggled", G_CALLBACK (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, *mailcheck_hbox;
- GtkWidget *hostname_label, *username_label, *path_label;
- GtkWidget *hostname, *username, *path;
- GtkTable *main_table, *cur_table;
- CamelProviderConfEntry *entries;
- GList *children, *child;
- char *name;
- int i, rows;
-
- if (url_string)
- url = camel_url_new (url_string, NULL);
- else
- url = NULL;
-
- hostname_label = glade_xml_get_widget (gui->xml, "source_host_label");
- gtk_label_set_text_with_mnemonic (GTK_LABEL (hostname_label), _("_Host:"));
- hostname = glade_xml_get_widget (gui->xml, "source_host");
-
- username_label = glade_xml_get_widget (gui->xml, "source_user_label");
- gtk_label_set_text_with_mnemonic (GTK_LABEL (username_label), _("User_name:"));
- username = glade_xml_get_widget (gui->xml, "source_user");
-
- path_label = glade_xml_get_widget (gui->xml, "source_path_label");
- gtk_label_set_text_with_mnemonic (GTK_LABEL (path_label), _("_Path:"));
- path = glade_xml_get_widget (gui->xml, "source_path");
-
- /* Remove the contents of the extra_table except for the
- * mailcheck_frame.
- */
- main_table = (GtkTable *)glade_xml_get_widget (gui->xml, "extra_table");
- mailcheck_frame = glade_xml_get_widget (gui->xml, "extra_mailcheck_frame");
- children = gtk_container_get_children (GTK_CONTAINER (main_table));
- for (child = children; child; child = child->next) {
- if (child->data != (gpointer)mailcheck_frame) {
- gtk_container_remove (GTK_CONTAINER (main_table),
- child->data);
- }
- }
- g_list_free (children);
- gtk_table_resize (main_table, 1, 2);
-
- /* Remove any additional mailcheck items. */
- cur_table = (GtkTable *)glade_xml_get_widget (gui->xml, "extra_mailcheck_table");
- mailcheck_hbox = glade_xml_get_widget (gui->xml, "extra_mailcheck_hbox");
- children = gtk_container_get_children (GTK_CONTAINER (cur_table));
- for (child = children; child; child = child->next) {
- if (child->data != (gpointer)mailcheck_hbox) {
- gtk_container_remove (GTK_CONTAINER (cur_table),
- child->data);
- }
- }
- g_list_free (children);
- gtk_table_resize (cur_table, 1, 2);
-
- if (!gui->source.provider) {
- gtk_widget_set_sensitive (GTK_WIDGET (main_table), FALSE);
- if (url)
- camel_url_free (url);
- return;
- } else
- gtk_widget_set_sensitive (GTK_WIDGET (main_table), 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_table = main_table;
- rows = main_table->nrows;
- 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_table = (GtkTable *)glade_xml_get_widget (gui->xml, "extra_mailcheck_table");
- else {
- frame = gtk_frame_new (entries[i].text);
- gtk_container_set_border_width (GTK_CONTAINER (frame), 3);
- gtk_table_attach (main_table, frame, 0, 2,
- rows, rows + 1,
- GTK_EXPAND | GTK_FILL, 0, 0, 0);
-
- cur_table = (GtkTable *)gtk_table_new (0, 2, FALSE);
- rows = 0;
- gtk_table_set_row_spacings (cur_table, 4);
- gtk_table_set_col_spacings (cur_table, 8);
- gtk_container_set_border_width (GTK_CONTAINER (cur_table), 3);
-
- gtk_container_add (GTK_CONTAINER (frame), GTK_WIDGET (cur_table));
- }
- break;
- }
- case CAMEL_PROVIDER_CONF_SECTION_END:
- cur_table = main_table;
- rows = main_table->nrows;
- break;
-
- case CAMEL_PROVIDER_CONF_LABEL:
- if (entries[i].name && entries[i].text) {
- GtkWidget *label;
-
- if (!strcmp (entries[i].name, "username")) {
- gtk_label_set_text_with_mnemonic (GTK_LABEL (username_label), entries[i].text);
- } else if (!strcmp (entries[i].name, "hostname")) {
- gtk_label_set_text_with_mnemonic (GTK_LABEL (hostname_label), entries[i].text);
- } else if (!strcmp (entries[i].name, "path")) {
- gtk_label_set_text_with_mnemonic (GTK_LABEL (path_label), entries[i].text);
- } else {
- /* make a new label */
- label = gtk_label_new (entries[i].text);
- gtk_table_resize (cur_table, cur_table->nrows + 1, 2);
- gtk_table_attach (cur_table, label, 0, 2, rows, rows + 1,
- GTK_EXPAND | GTK_FILL, 0, 0, 0);
- rows++;
- }
- }
- 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_table_attach (cur_table, checkbox, 0, 2, rows, rows + 1,
- GTK_EXPAND | GTK_FILL, 0, 0, 0);
- rows++;
- 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 *label, *entry;
- const char *text;
-
- if (!strcmp (entries[i].name, "username")) {
- gtk_label_set_text_with_mnemonic (GTK_LABEL (username_label), entries[i].text);
- label = username_label;
- entry = username;
- } else if (!strcmp (entries[i].name, "hostname")) {
- gtk_label_set_text_with_mnemonic (GTK_LABEL (hostname_label), entries[i].text);
- label = hostname_label;
- entry = hostname;
- } else if (!strcmp (entries[i].name, "path")) {
- gtk_label_set_text_with_mnemonic (GTK_LABEL (path_label), entries[i].text);
- label = path_label;
- entry = path;
- } else {
- /* make a new text entry with label */
- label = gtk_label_new (entries[i].text);
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.0);
- entry = gtk_entry_new ();
-
- gtk_table_attach (cur_table, label, 0, 1, rows, rows + 1,
- GTK_FILL, 0, 0, 0);
- gtk_table_attach (cur_table, entry, 1, 2, rows, rows + 1,
- GTK_EXPAND | GTK_FILL, 0, 0, 0);
- rows++;
- }
-
- 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);
-
- if (entries[i].depname) {
- setup_toggle (entry, entries[i].depname, gui);
- setup_toggle (label, entries[i].depname, gui);
- }
-
- g_hash_table_insert (gui->extra_config, entries[i].name, entry);
-
- break;
- }
-
- case CAMEL_PROVIDER_CONF_CHECKSPIN:
- {
- GtkWidget *hbox, *checkbox, *spin, *label;
- GtkObject *adj;
- char *data, *pre, *post, *p;
- double min, def, max;
- gboolean enable;
-
- /* FIXME: this is pretty fucked... */
- 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 + 1, &data);
- g_return_if_fail (*data == ':');
- def = strtod (data + 1, &data);
- g_return_if_fail (*data == ':');
- max = strtod (data + 1, 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_table_attach (cur_table, hbox, 0, 2, rows, rows + 1,
- GTK_EXPAND | GTK_FILL, 0, 0, 0);
- rows++;
- 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 (GTK_WIDGET (main_table));
- 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:
- if (strcmp (entries[i].name, "username") == 0
- || strcmp (entries[i].name, "hostname") == 0
- || strcmp (entries[i].name, "path") == 0) {
- break;
- }
- 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;
- }
- }
-}
-
-static void
-folder_selected (EMFolderSelectionButton *button, gpointer user_data)
-{
- char **folder_name = user_data;
-
- g_free (*folder_name);
- *folder_name = g_strdup(em_folder_selection_button_get_selection(button));
-}
-
-static void
-default_folders_clicked (GtkButton *button, gpointer user_data)
-{
- MailAccountGui *gui = user_data;
-
- /* Drafts folder */
- g_free (gui->drafts_folder_uri);
- gui->drafts_folder_uri = g_strdup (default_drafts_folder_uri);
- em_folder_selection_button_set_selection((EMFolderSelectionButton *)gui->drafts_folder_button, gui->drafts_folder_uri);
-
- /* Sent folder */
- g_free (gui->sent_folder_uri);
- gui->sent_folder_uri = g_strdup (default_sent_folder_uri);
- em_folder_selection_button_set_selection((EMFolderSelectionButton *)gui->sent_folder_button, gui->sent_folder_uri);
-}
-
-GtkWidget *mail_account_gui_folder_selector_button_new (char *widget_name, char *string1, char *string2, int int1, int int2);
-
-GtkWidget *
-mail_account_gui_folder_selector_button_new (char *widget_name,
- char *string1, char *string2,
- int int1, int int2)
-{
- return (GtkWidget *)em_folder_selection_button_new(_("Select Folder"), NULL);
-}
-
-static gboolean
-setup_service (MailAccountGuiService *gsvc, EAccountService *service)
-{
- CamelURL *url = camel_url_new (service->url, NULL);
- gboolean has_auth = FALSE;
-
- if (url == NULL || gsvc->provider == 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) {
- GList *children, *item;
- const char *use_ssl;
- int i;
-
- use_ssl = camel_url_get_param (url, "use_ssl");
- if (!use_ssl)
- use_ssl = "never";
- else if (!*use_ssl) /* old config code just used an empty string as the value */
- use_ssl = "always";
-
- children = gtk_container_get_children(GTK_CONTAINER (gtk_option_menu_get_menu (gsvc->use_ssl)));
- for (item = children, i = 0; item; item = item->next, i++) {
- if (!strcmp (use_ssl, ssl_options[i].value)) {
- gtk_option_menu_set_history (gsvc->use_ssl, i);
- g_signal_emit_by_name (item->data, "activate", gsvc);
- break;
- }
- }
- }
-
- if (url->authmech && CAMEL_PROVIDER_ALLOWS (gsvc->provider, CAMEL_URL_PART_AUTH)) {
- GList *children, *item;
- CamelServiceAuthType *authtype;
- int i;
-
- children = gtk_container_get_children(GTK_CONTAINER (gtk_option_menu_get_menu (gsvc->authtype)));
- for (item = children, i = 0; item; item = item->next, i++) {
- authtype = g_object_get_data ((GObject *) item->data, "authtype");
- if (!authtype)
- continue;
- if (!strcmp (authtype->authproto, url->authmech)) {
- gtk_option_menu_set_history (gsvc->authtype, i);
- g_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;
- }
-}
-
-static void
-ssl_option_activate (GtkWidget *widget, gpointer user_data)
-{
- MailAccountGuiService *service = user_data;
-
- service->ssl_selected = widget;
-}
-
-static void
-construct_ssl_menu (MailAccountGuiService *service)
-{
- GtkWidget *menu, *item = NULL;
- int i;
-
- menu = gtk_menu_new ();
-
- for (i = 0; i < num_ssl_options; i++) {
- item = gtk_menu_item_new_with_label (_(ssl_options[i].label));
- g_object_set_data ((GObject *) item, "use_ssl", ssl_options[i].value);
- g_signal_connect (item, "activate", G_CALLBACK (ssl_option_activate), service);
- gtk_widget_show (item);
- gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
- }
-
- gtk_option_menu_remove_menu (service->use_ssl);
- gtk_option_menu_set_menu (service->use_ssl, menu);
-
- gtk_option_menu_set_history (service->use_ssl, i - 1);
- g_signal_emit_by_name (item, "activate", service);
-}
-
-static void
-clear_menu (GtkWidget *menu)
-{
- while (GTK_MENU_SHELL (menu)->children)
- gtk_container_remove (GTK_CONTAINER (menu), GTK_MENU_SHELL (menu)->children->data);
-}
-
-static inline int
-sig_get_index (MailConfigSignature *sig)
-{
- return sig ? sig->id + 2 : 0;
-}
-
-static inline int
-sig_gui_get_index (MailAccountGui *gui)
-{
- if (gui->auto_signature)
- return 1;
- return sig_get_index (gui->def_signature);
-}
-
-static void
-sig_fill_options (MailAccountGui *gui)
-{
- GtkWidget *menu;
- GtkWidget *mi;
- GSList *l;
- MailConfigSignature *sig;
-
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (gui->sig_option_menu));
-
- if (menu)
- clear_menu (menu);
- else
- menu = gtk_menu_new ();
-
- gtk_menu_shell_append(GTK_MENU_SHELL(menu), gtk_menu_item_new_with_label (_("None")));
- gtk_menu_shell_append(GTK_MENU_SHELL(menu), gtk_menu_item_new_with_label (_("Autogenerated")));
- /* gtk_menu_shell_append(GTK_MENU_SHELL(menu), gtk_menu_item_new_with_label (_("Random"))); */
-
- for (l = mail_config_get_signature_list (); l; l = l->next) {
- sig = l->data;
- mi = gtk_menu_item_new_with_label (sig->name);
- g_object_set_data ((GObject *) mi, "sig", sig);
- gtk_widget_show (mi);
- gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi);
- }
-}
-
-static void
-sig_changed (GtkWidget *w, MailAccountGui *gui)
-{
- GtkWidget *active;
- int index;
-
- active = gtk_menu_get_active (GTK_MENU (w));
- index = g_list_index (GTK_MENU_SHELL (w)->children, active);
-
- gui->def_signature = (MailConfigSignature *) g_object_get_data(G_OBJECT(active), "sig");
- gui->auto_signature = index == 1 ? TRUE : FALSE;
-}
-
-static void
-sig_switch_to_list (GtkWidget *w, MailAccountGui *gui)
-{
- gtk_window_set_transient_for (GTK_WINDOW (gtk_widget_get_toplevel (w)), NULL);
- gdk_window_raise (GTK_WIDGET (gui->dialog)->window);
- gtk_notebook_set_current_page (GTK_NOTEBOOK (glade_xml_get_widget (gui->dialog->gui, "notebook")), 3);
-}
-
-static void
-sig_add_new_signature (GtkWidget *w, MailAccountGui *gui)
-{
- GConfClient *gconf;
- gboolean send_html;
- GtkWidget *parent;
-
- if (!gui->dialog)
- return;
-
- sig_switch_to_list (w, gui);
-
- gconf = mail_config_get_gconf_client ();
- send_html = gconf_client_get_bool (gconf, "/apps/evolution/mail/composer/send_html", NULL);
-
- parent = gtk_widget_get_toplevel (w);
- parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL;
-
- gui->def_signature = em_composer_prefs_new_signature ((GtkWindow *) parent, send_html, NULL);
- gui->auto_signature = FALSE;
-
- gtk_option_menu_set_history (GTK_OPTION_MENU (gui->sig_option_menu), sig_gui_get_index (gui));
-}
-
-static void
-setup_signatures (MailAccountGui *gui)
-{
- MailConfigSignature *sig;
- GSList *signatures;
-
- signatures = mail_config_get_signature_list ();
- sig = g_slist_nth_data (signatures, gui->account->id->def_signature);
-
- gui->def_signature = sig;
- gui->auto_signature = gui->account->id->auto_signature;
- gtk_option_menu_set_history (GTK_OPTION_MENU (gui->sig_option_menu), sig_gui_get_index (gui));
-}
-
-static void
-sig_event_client (MailConfigSigEvent event, MailConfigSignature *sig, MailAccountGui *gui)
-{
- switch (event) {
- case MAIL_CONFIG_SIG_EVENT_ADDED: {
- GtkWidget *menu;
- GtkWidget *mi;
-
- d(printf ("accounts ADDED\n"));
- mi = gtk_menu_item_new_with_label (sig->name);
- g_object_set_data ((GObject *) mi, "sig", sig);
- gtk_widget_show (mi);
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (gui->sig_option_menu));
- gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi);
-
- break;
- }
- case MAIL_CONFIG_SIG_EVENT_NAME_CHANGED: {
- GtkWidget *menu;
- GtkWidget *mi;
-
- d(printf ("gui NAME CHANGED\n"));
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (gui->sig_option_menu));
- gtk_widget_ref (menu);
- gtk_option_menu_remove_menu (GTK_OPTION_MENU (gui->sig_option_menu));
- mi = g_list_nth_data (GTK_MENU_SHELL (menu)->children, sig_get_index (sig));
- gtk_label_set_text (GTK_LABEL (GTK_BIN (mi)->child), sig->name);
- gtk_option_menu_set_menu (GTK_OPTION_MENU (gui->sig_option_menu), menu);
- gtk_widget_unref (menu);
- gtk_option_menu_set_history (GTK_OPTION_MENU (gui->sig_option_menu),
- sig_gui_get_index (gui));
-
- break;
- }
- case MAIL_CONFIG_SIG_EVENT_DELETED: {
- GtkWidget *menu;
- GtkWidget *mi;
-
- d(printf ("gui DELETED\n"));
-
- if (sig == gui->def_signature) {
- gui->def_signature = NULL;
- gui->auto_signature = TRUE;
- gtk_option_menu_set_history (GTK_OPTION_MENU (gui->sig_option_menu),
- sig_gui_get_index (gui));
- }
-
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (gui->sig_option_menu));
- mi = g_list_nth_data (GTK_MENU_SHELL (menu)->children, sig_get_index (sig));
- gtk_container_remove (GTK_CONTAINER (menu), mi);
-
- break;
- }
- default:
- ;
- }
-}
-
-static void
-prepare_signatures (MailAccountGui *gui)
-{
- gui->sig_option_menu = glade_xml_get_widget (gui->xml, "sigOption");
- sig_fill_options (gui);
- g_signal_connect (gtk_option_menu_get_menu (GTK_OPTION_MENU (gui->sig_option_menu)),
- "selection-done", G_CALLBACK(sig_changed), gui);
-
- glade_xml_signal_connect_data (gui->xml, "sigAddNewClicked",
- G_CALLBACK (sig_add_new_signature), gui);
-
- if (!gui->dialog) {
- gtk_widget_hide (glade_xml_get_widget (gui->xml, "sigLabel"));
- gtk_widget_hide (glade_xml_get_widget (gui->xml, "sigOption"));
- gtk_widget_hide (glade_xml_get_widget (gui->xml, "sigAddNew"));
- } else {
- mail_config_signature_register_client ((MailConfigSignatureClient) sig_event_client, gui);
- }
-}
-
-#if defined (HAVE_NSS)
-static void
-smime_changed(MailAccountGui *gui)
-{
- int act;
- const char *tmp;
-
- tmp = gtk_entry_get_text(gui->smime_sign_key);
- act = tmp && tmp[0];
- gtk_widget_set_sensitive((GtkWidget *)gui->smime_sign_key_clear, act);
- gtk_widget_set_sensitive((GtkWidget *)gui->smime_sign_default, act);
- if (!act)
- gtk_toggle_button_set_active(gui->smime_sign_default, FALSE);
-
- tmp = gtk_entry_get_text(gui->smime_encrypt_key);
- act = tmp && tmp[0];
- gtk_widget_set_sensitive((GtkWidget *)gui->smime_encrypt_key_clear, act);
- gtk_widget_set_sensitive((GtkWidget *)gui->smime_encrypt_default, act);
- gtk_widget_set_sensitive((GtkWidget *)gui->smime_encrypt_to_self, act);
- if (!act) {
- gtk_toggle_button_set_active(gui->smime_encrypt_default, FALSE);
- gtk_toggle_button_set_active(gui->smime_encrypt_to_self, FALSE);
- }
-}
-
-static void
-smime_sign_key_selected(GtkWidget *dialog, const char *key, MailAccountGui *gui)
-{
- if (key != NULL) {
- gtk_entry_set_text(gui->smime_sign_key, key);
- smime_changed(gui);
- }
-
- gtk_widget_destroy(dialog);
-}
-
-static void
-smime_sign_key_select(GtkWidget *button, MailAccountGui *gui)
-{
- GtkWidget *w;
-
- w = e_cert_selector_new(E_CERT_SELECTOR_SIGNER, gtk_entry_get_text(gui->smime_sign_key));
- gtk_window_set_modal((GtkWindow *)w, TRUE);
- gtk_window_set_transient_for((GtkWindow *)w, (GtkWindow *)gui->dialog);
- g_signal_connect(w, "selected", G_CALLBACK(smime_sign_key_selected), gui);
- gtk_widget_show(w);
-}
-
-static void
-smime_sign_key_clear(GtkWidget *w, MailAccountGui *gui)
-{
- gtk_entry_set_text(gui->smime_sign_key, "");
- smime_changed(gui);
-}
-
-static void
-smime_encrypt_key_selected(GtkWidget *dialog, const char *key, MailAccountGui *gui)
-{
- if (key != NULL) {
- gtk_entry_set_text(gui->smime_encrypt_key, key);
- smime_changed(gui);
- }
-
- gtk_widget_destroy(dialog);
-}
-
-static void
-smime_encrypt_key_select(GtkWidget *button, MailAccountGui *gui)
-{
- GtkWidget *w;
-
- w = e_cert_selector_new(E_CERT_SELECTOR_SIGNER, gtk_entry_get_text(gui->smime_encrypt_key));
- gtk_window_set_modal((GtkWindow *)w, TRUE);
- gtk_window_set_transient_for((GtkWindow *)w, (GtkWindow *)gui->dialog);
- g_signal_connect(w, "selected", G_CALLBACK(smime_encrypt_key_selected), gui);
- gtk_widget_show(w);
-}
-
-static void
-smime_encrypt_key_clear(GtkWidget *w, MailAccountGui *gui)
-{
- gtk_entry_set_text(gui->smime_encrypt_key, "");
- smime_changed(gui);
-}
-#endif
-
-MailAccountGui *
-mail_account_gui_new (EAccount *account, EMAccountPrefs *dialog)
-{
- MailAccountGui *gui;
- GtkWidget *button;
-
- g_object_ref (account);
-
- gui = g_new0 (MailAccountGui, 1);
- gui->account = account;
- gui->dialog = dialog;
- gui->xml = glade_xml_new (EVOLUTION_GLADEDIR "/mail-config.glade", NULL, 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)
- 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->reply_to = GTK_ENTRY (glade_xml_get_widget (gui->xml, "identity_reply_to"));
- gui->organization = GTK_ENTRY (glade_xml_get_widget (gui->xml, "identity_organization"));
-
- prepare_signatures (gui);
-
- if (account->id->name)
- 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->reply_to)
- gtk_entry_set_text (gui->reply_to, account->id->reply_to);
- if (account->id->organization)
- gtk_entry_set_text (gui->organization, account->id->organization);
-
- setup_signatures (gui);
-
- /* Source */
- gui->source.provider_type = CAMEL_PROVIDER_STORE;
- 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"));
- g_signal_connect (gui->source.hostname, "changed",
- G_CALLBACK (service_changed), &gui->source);
- gui->source.username = GTK_ENTRY (glade_xml_get_widget (gui->xml, "source_user"));
- g_signal_connect (gui->source.username, "changed",
- G_CALLBACK (service_changed), &gui->source);
- gui->source.path = GTK_ENTRY (glade_xml_get_widget (gui->xml, "source_path"));
- g_signal_connect (gui->source.path, "changed",
- G_CALLBACK (service_changed), &gui->source);
- gui->source.ssl_hbox = glade_xml_get_widget (gui->xml, "source_ssl_hbox");
- gui->source.use_ssl = GTK_OPTION_MENU (glade_xml_get_widget (gui->xml, "source_use_ssl"));
- construct_ssl_menu (&gui->source);
- 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"));
- g_signal_connect (gui->source.check_supported, "clicked",
- G_CALLBACK (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.provider_type = CAMEL_PROVIDER_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"));
- g_signal_connect (gui->transport.hostname, "changed",
- G_CALLBACK (service_changed), &gui->transport);
- gui->transport.username = GTK_ENTRY (glade_xml_get_widget (gui->xml, "transport_user"));
- g_signal_connect (gui->transport.username, "changed",
- G_CALLBACK (service_changed), &gui->transport);
- gui->transport.ssl_hbox = glade_xml_get_widget (gui->xml, "transport_ssl_hbox");
- gui->transport.use_ssl = GTK_OPTION_MENU (glade_xml_get_widget (gui->xml, "transport_use_ssl"));
- construct_ssl_menu (&gui->transport);
- 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"));
- g_signal_connect (gui->transport_needs_auth, "toggled",
- G_CALLBACK (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"));
- g_signal_connect (gui->transport.check_supported, "clicked",
- G_CALLBACK (service_check_supported), &gui->transport);
-
- /* Drafts folder */
- gui->drafts_folder_button = GTK_BUTTON (glade_xml_get_widget (gui->xml, "drafts_button"));
- g_signal_connect (gui->drafts_folder_button, "selected", G_CALLBACK (folder_selected), &gui->drafts_folder_uri);
- if (account->drafts_folder_uri)
- gui->drafts_folder_uri = g_strdup (account->drafts_folder_uri);
- else
- gui->drafts_folder_uri = g_strdup (default_drafts_folder_uri);
- em_folder_selection_button_set_selection((EMFolderSelectionButton *)gui->drafts_folder_button, gui->drafts_folder_uri);
-
- /* Sent folder */
- gui->sent_folder_button = GTK_BUTTON (glade_xml_get_widget (gui->xml, "sent_button"));
- g_signal_connect (gui->sent_folder_button, "selected", G_CALLBACK (folder_selected), &gui->sent_folder_uri);
- if (account->sent_folder_uri)
- gui->sent_folder_uri = g_strdup (account->sent_folder_uri);
- else
- gui->sent_folder_uri = g_strdup (default_sent_folder_uri);
- em_folder_selection_button_set_selection((EMFolderSelectionButton *)gui->sent_folder_button, gui->sent_folder_uri);
-
- /* Special Folders "Reset Defaults" button */
- button = glade_xml_get_widget (gui->xml, "default_folders_button");
- g_signal_connect (button, "clicked", G_CALLBACK (default_folders_clicked), gui);
-
- /* Always Cc */
- gui->always_cc = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui->xml, "always_cc"));
- gtk_toggle_button_set_active (gui->always_cc, account->always_cc);
- gui->cc_addrs = GTK_ENTRY (glade_xml_get_widget (gui->xml, "cc_addrs"));
- if (account->cc_addrs)
- gtk_entry_set_text (gui->cc_addrs, account->cc_addrs);
-
- /* Always Bcc */
- gui->always_bcc = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui->xml, "always_bcc"));
- gtk_toggle_button_set_active (gui->always_bcc, account->always_bcc);
- gui->bcc_addrs = GTK_ENTRY (glade_xml_get_widget (gui->xml, "bcc_addrs"));
- if (account->bcc_addrs)
- gtk_entry_set_text (gui->bcc_addrs, account->bcc_addrs);
-
- /* Security */
- gui->pgp_key = GTK_ENTRY (glade_xml_get_widget (gui->xml, "pgp_key"));
- if (account->pgp_key)
- 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->pgp_no_imip_sign = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui->xml, "pgp_no_imip_sign"));
- gtk_toggle_button_set_active (gui->pgp_no_imip_sign, account->pgp_no_imip_sign);
- gui->pgp_always_trust = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui->xml, "pgp_always_trust"));
- gtk_toggle_button_set_active (gui->pgp_always_trust, account->pgp_always_trust);
-
-#if defined (HAVE_NSS)
- gui->smime_sign_key = (GtkEntry *)glade_xml_get_widget (gui->xml, "smime_sign_key");
- if (account->smime_sign_key)
- gtk_entry_set_text(gui->smime_sign_key, account->smime_sign_key);
- gui->smime_sign_key_select = (GtkButton *)glade_xml_get_widget (gui->xml, "smime_sign_key_select");
- gui->smime_sign_key_clear = (GtkButton *)glade_xml_get_widget (gui->xml, "smime_sign_key_clear");
- g_signal_connect(gui->smime_sign_key_select, "clicked", G_CALLBACK(smime_sign_key_select), gui);
- g_signal_connect(gui->smime_sign_key_clear, "clicked", G_CALLBACK(smime_sign_key_clear), gui);
-
- gui->smime_sign_default = (GtkToggleButton *)glade_xml_get_widget (gui->xml, "smime_sign_default");
- gtk_toggle_button_set_active(gui->smime_sign_default, account->smime_sign_default);
-
- gui->smime_encrypt_key = (GtkEntry *)glade_xml_get_widget (gui->xml, "smime_encrypt_key");
- if (account->smime_encrypt_key)
- gtk_entry_set_text(gui->smime_encrypt_key, account->smime_encrypt_key);
- gui->smime_encrypt_key_select = (GtkButton *)glade_xml_get_widget (gui->xml, "smime_encrypt_key_select");
- gui->smime_encrypt_key_clear = (GtkButton *)glade_xml_get_widget (gui->xml, "smime_encrypt_key_clear");
- g_signal_connect(gui->smime_encrypt_key_select, "clicked", G_CALLBACK(smime_encrypt_key_select), gui);
- g_signal_connect(gui->smime_encrypt_key_clear, "clicked", G_CALLBACK(smime_encrypt_key_clear), gui);
-
- gui->smime_encrypt_default = (GtkToggleButton *)glade_xml_get_widget (gui->xml, "smime_encrypt_default");
- gtk_toggle_button_set_active(gui->smime_encrypt_default, account->smime_encrypt_default);
- gui->smime_encrypt_to_self = (GtkToggleButton *)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);
- smime_changed(gui);
-#else
- {
- /* 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_destroy (frame);
- }
-#endif /* HAVE_NSS */
-
- 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") || !strcmp (provider->domain, "news")))
- 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);
- g_object_set_data ((GObject *) gui->source.type, provider->protocol, item);
- g_object_set_data ((GObject *) item, "provider", provider);
- g_object_set_data ((GObject *) item, "number", GUINT_TO_POINTER (si));
- g_signal_connect (item, "activate", G_CALLBACK (source_type_changed), gui);
-
- gtk_menu_shell_append(GTK_MENU_SHELL(stores), item);
-
- gtk_widget_show (item);
-
- if (!fstore) {
- fstore = item;
- hstore = si;
- }
-
- if (source_proto && !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);
- g_object_set_data ((GObject *) gui->transport.type, provider->protocol, item);
- g_object_set_data ((GObject *) item, "provider", provider);
- g_object_set_data ((GObject *) item, "number", GUINT_TO_POINTER (ti));
- g_signal_connect (item, "activate", G_CALLBACK (transport_type_changed), gui);
-
- gtk_menu_shell_append(GTK_MENU_SHELL(transports), item);
-
- gtk_widget_show (item);
-
- if (CAMEL_PROVIDER_IS_STORE_AND_TRANSPORT (provider))
- gtk_widget_set_sensitive (item, FALSE);
-
- if (!ftransport) {
- ftransport = item;
- htransport = ti;
- }
-
- if (transport_proto && !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;
-
- /* Just using string length is probably good enough,
- as we only use the width of the widget, not the string */
- /*width = gdk_string_width (font, at->name);*/
- width = strlen(at->name) * 14;
- 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"));
- g_object_set_data ((GObject *) item, "provider", NULL);
- g_signal_connect (item, "activate", G_CALLBACK (source_type_changed), gui);
-
- gtk_menu_shell_append(GTK_MENU_SHELL(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_remove_menu (gui->transport.type);
- gtk_option_menu_set_menu (gui->transport.type, transports);
-
- /* 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_shell_append(GTK_MENU_SHELL(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_size_request (GTK_WIDGET (gui->source.authtype),
- size_req.width, -1);
- gtk_widget_set_size_request (GTK_WIDGET (gui->transport.authtype),
- size_req.width, -1);
- }
-
- if (top != NULL) {
- gtk_widget_show_all (top);
- }
-
- if (fstore) {
- g_signal_emit_by_name (fstore, "activate");
- gtk_option_menu_set_history (gui->source.type, hstore);
- }
-
- if (ftransport) {
- g_signal_emit_by_name (ftransport, "activate");
- gtk_option_menu_set_history (gui->transport.type, htransport);
- }
-
- 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, EAccountService *service)
-{
- CamelURL *url;
- const 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_strstrip (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 = g_object_get_data(G_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) {
- const char *use_ssl;
-
- use_ssl = g_object_get_data(G_OBJECT(gsvc->ssl_selected), "use_ssl");
-
- /* set the value to either "always" or "when-possible"
- but don't bother setting it for "never" */
- if (strcmp (use_ssl, "never"))
- camel_url_set_param (url, "use_ssl", 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);
-}
-
-static void
-add_new_store (char *uri, CamelStore *store, void *user_data)
-{
- MailComponent *component = mail_component_peek ();
- EAccount *account = user_data;
-
- if (store == NULL)
- return;
-
- mail_component_add_store (component, store, account->name);
-}
-
-gboolean
-mail_account_gui_save (MailAccountGui *gui)
-{
- EAccount *account, *new;
- CamelProvider *provider = NULL;
- gboolean is_new = FALSE;
- const char *new_name;
- gboolean is_storage;
- GSList *signatures;
-
- 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;
-
- new = gui->account;
-
- /* 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 = gtk_entry_get_text (gui->account_name);
- account = mail_config_get_account_by_name (new_name);
-
- if (account && account != new) {
- e_notice (gui->account_name, GTK_MESSAGE_ERROR, _("You may not create two accounts with the same name."));
- return FALSE;
- }
-
- account = new;
-
- new = e_account_new ();
- new->name = g_strdup (new_name);
- new->enabled = account->enabled;
-
- /* construct the identity */
- new->id->name = g_strdup (gtk_entry_get_text (gui->full_name));
- new->id->address = g_strdup (gtk_entry_get_text (gui->email_address));
- new->id->reply_to = g_strdup (gtk_entry_get_text (gui->reply_to));
- new->id->organization = g_strdup (gtk_entry_get_text (gui->organization));
-
- /* signatures */
- signatures = mail_config_get_signature_list ();
- new->id->def_signature = g_slist_index (signatures, gui->def_signature);
- new->id->auto_signature = gui->auto_signature;
-
- /* source */
- save_service (&gui->source, gui->extra_config, new->source);
- if (new->source->url)
- provider = camel_session_get_provider (session, new->source->url, NULL);
-
- new->source->auto_check = gtk_toggle_button_get_active (gui->source_auto_check);
- if (new->source->auto_check)
- new->source->auto_check_time = gtk_spin_button_get_value_as_int (gui->source_auto_check_min);
-
- /* transport */
- if (CAMEL_PROVIDER_IS_STORE_AND_TRANSPORT (gui->transport.provider)) {
- /* The transport URI is the same as the source URI. */
- save_service (&gui->source, gui->extra_config, new->transport);
- } else
- save_service (&gui->transport, NULL, new->transport);
-
- /* Check to make sure that the Drafts folder uri is "valid" before assigning it */
- if (mail_config_get_account_by_source_url (gui->drafts_folder_uri) ||
- !strncmp (gui->drafts_folder_uri, "file:", 5)) {
- new->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) */
- new->drafts_folder_uri = g_strdup (default_drafts_folder_uri);
- }
-
- /* Check to make sure that the Sent folder uri is "valid" before assigning it */
- if (mail_config_get_account_by_source_url (gui->sent_folder_uri) ||
- !strncmp (gui->sent_folder_uri, "file:", 5)) {
- new->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) */
- new->sent_folder_uri = g_strdup (default_sent_folder_uri);
- }
-
- new->always_cc = gtk_toggle_button_get_active (gui->always_cc);
- new->cc_addrs = g_strdup (gtk_entry_get_text (gui->cc_addrs));
- new->always_bcc = gtk_toggle_button_get_active (gui->always_bcc);
- new->bcc_addrs = g_strdup (gtk_entry_get_text (gui->bcc_addrs));
-
- new->pgp_key = g_strdup (gtk_entry_get_text (gui->pgp_key));
- new->pgp_encrypt_to_self = gtk_toggle_button_get_active (gui->pgp_encrypt_to_self);
- new->pgp_always_sign = gtk_toggle_button_get_active (gui->pgp_always_sign);
- new->pgp_no_imip_sign = gtk_toggle_button_get_active (gui->pgp_no_imip_sign);
- new->pgp_always_trust = gtk_toggle_button_get_active (gui->pgp_always_trust);
-
-#if defined (HAVE_NSS)
- new->smime_sign_default = gtk_toggle_button_get_active (gui->smime_sign_default);
- new->smime_sign_key = g_strdup (gtk_entry_get_text (gui->smime_sign_key));
-
- new->smime_encrypt_default = gtk_toggle_button_get_active (gui->smime_encrypt_default);
- new->smime_encrypt_key = g_strdup (gtk_entry_get_text (gui->smime_encrypt_key));
- new->smime_encrypt_to_self = gtk_toggle_button_get_active (gui->smime_encrypt_to_self);
-#endif /* HAVE_NSS */
-
- is_storage = provider && (provider->flags & CAMEL_PROVIDER_IS_STORAGE) &&
- !(provider->flags & CAMEL_PROVIDER_IS_EXTERNAL);
-
- if (!mail_config_find_account (account)) {
- /* this is a new account so add it to our account-list */
- is_new = TRUE;
- } else if (account->source->url) {
- /* this means the account was edited - if the old and
- new source urls are not identical, replace the old
- store with the new store */
-#define sources_equal(old,new) (new->url && !strcmp (old->url, new->url))
- if (!sources_equal (account->source, new->source)) {
- /* Remove the old store from the folder-tree */
- mail_component_remove_store_by_uri (mail_component_peek (), account->source->url);
- }
- }
-
- /* update the old account with the new settings */
- e_account_import (account, new);
- g_object_unref (new);
-
- if (is_new) {
- mail_config_add_account (account);
- } else {
- e_account_list_change (mail_config_get_accounts (), account);
- }
-
- /* if the account provider is something we can stick
- in the folder-tree and not added by some other
- component, then get the CamelStore and add it to
- the folder-tree */
- if (is_storage && account->enabled)
- mail_get_store (account->source->url, NULL, add_new_store, account);
-
- if (gtk_toggle_button_get_active (gui->default_account))
- mail_config_set_default_account (account);
-
- mail_config_save_accounts ();
- mail_config_write_account_sig (account, -1);
-
- mail_autoreceive_setup ();
-
- return TRUE;
-}
-
-void
-mail_account_gui_destroy (MailAccountGui *gui)
-{
- if (gui->dialog)
- mail_config_signature_unregister_client ((MailConfigSignatureClient) sig_event_client, gui);
-
- g_object_unref (gui->xml);
- g_object_unref (gui->account);
-
- if (gui->extra_config)
- g_hash_table_destroy (gui->extra_config);
-
- g_free (gui->drafts_folder_uri);
- 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 3574eddf28..0000000000
--- a/mail/mail-account-gui.h
+++ /dev/null
@@ -1,143 +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-2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_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"
-#include "em-account-prefs.h"
-
-typedef struct {
- GtkOptionMenu *type;
- GtkLabel *description;
- GtkEntry *hostname;
- GtkEntry *username;
- GtkEntry *path;
- GtkOptionMenu *use_ssl;
- GtkWidget *ssl_selected;
- GtkWidget *ssl_hbox;
- GtkWidget *no_ssl;
- GtkOptionMenu *authtype;
- GtkWidget *authitem;
- GtkToggleButton *remember;
- GtkButton *check_supported;
-
- CamelProvider *provider;
- CamelProviderType provider_type;
-} MailAccountGuiService;
-
-typedef struct {
- EAccount *account;
- EMAccountPrefs *dialog;
- GladeXML *xml;
-
- /* identity */
- GtkEntry *full_name;
- GtkEntry *email_address;
- GtkEntry *reply_to;
- GtkEntry *organization;
-
- /* signatures */
- GtkWidget *sig_option_menu;
-
- MailConfigSignature *def_signature;
- gboolean auto_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;
- char *drafts_folder_uri;
- GtkButton *sent_folder_button;
- char *sent_folder_uri;
-
- /* always cc/bcc */
- GtkToggleButton *always_cc;
- GtkEntry *cc_addrs;
- GtkToggleButton *always_bcc;
- GtkEntry *bcc_addrs;
-
- /* Security */
- GtkEntry *pgp_key;
- GtkToggleButton *pgp_encrypt_to_self;
- GtkToggleButton *pgp_always_sign;
- GtkToggleButton *pgp_no_imip_sign;
- GtkToggleButton *pgp_always_trust;
-
- GtkToggleButton *smime_sign_default;
- GtkEntry *smime_sign_key;
- GtkButton *smime_sign_key_select;
- GtkButton *smime_sign_key_clear;
- GtkButton *smime_sign_select;
- GtkToggleButton *smime_encrypt_default;
- GtkToggleButton *smime_encrypt_to_self;
- GtkEntry *smime_encrypt_key;
- GtkButton *smime_encrypt_key_select;
- GtkButton *smime_encrypt_key_clear;
-} MailAccountGui;
-
-
-MailAccountGui *mail_account_gui_new (EAccount *account, EMAccountPrefs *dialog);
-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);
-
-void mail_account_gui_auto_detect_extra_conf (MailAccountGui *gui);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* MAIL_ACCOUNT_GUI_H */
diff --git a/mail/mail-autofilter.c b/mail/mail-autofilter.c
deleted file mode 100644
index 79ab30f5dd..0000000000
--- a/mail/mail-autofilter.c
+++ /dev/null
@@ -1,444 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <string.h>
-
-#include <glib.h>
-#include <libgnome/gnome-i18n.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 "mail-component.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 = g_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 = g_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 = g_alloca (strlen (s) + 1);
- strcpy (tmp, s);
- g_strstrip (tmp);
- rule_add_subject (context, rule, tmp);
-}
-
-static void
-rule_match_mlist(RuleContext *context, FilterRule *rule, const char *mlist)
-{
- FilterPart *part;
- FilterElement *element;
-
- if (mlist[0] == 0)
- return;
-
- 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);
-}
-
-static void
-rule_match_thread (RuleContext *context, FilterRule *rule, const char *msgid)
-{
- FilterElement *element;
- FilterPart *part;
-
- if (msgid[0] == 0)
- return;
-
- part = rule_context_create_part (context, "header");
- filter_rule_add_part (rule, part);
-
- element = filter_part_find_element (part, "header-type");
- filter_option_set_current ((FilterOption *) element, "contains");
-
- element = filter_part_find_element (part, "header-field");
- filter_input_set_value ((FilterInput *) element, "References");
-
- element = filter_part_find_element (part, "word");
- filter_input_set_value ((FilterInput *) element, msgid);
-}
-
-static void
-rule_from_message (FilterRule *rule, RuleContext *context, CamelMimeMessage *msg, int flags)
-{
- CamelInternetAddress *addr;
-
- rule->grouping = FILTER_GROUP_ANY;
-
- if (flags & AUTO_SUBJECT) {
- const char *subject = msg->subject ? msg->subject : "";
- char *namestr;
-
- rule_match_subject (context, rule, subject);
-
- namestr = g_strdup_printf (_("Subject is %s"), strip_re (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);
- }
- if (flags & AUTO_MLIST) {
- char *name, *mlist;
-
- mlist = camel_header_raw_check_mailing_list (&((CamelMimePart *)msg)->headers);
- if (mlist) {
- rule_match_mlist(context, rule, mlist);
- name = g_strdup_printf (_("%s mailing list"), mlist);
- filter_rule_set_name(rule, name);
- g_free(name);
- }
- g_free(mlist);
- }
- if (flags & AUTO_THREAD) {
- const char *msgid = NULL, *refs = NULL;
- char *name;
-
- if (!(refs = camel_medium_get_header ((CamelMedium *) msg, "References"))) {
- if (!(refs = camel_medium_get_header ((CamelMedium *) msg, "In-Reply-To")))
- msgid = camel_mime_message_get_message_id (msg);
- }
-
- if (refs || msgid) {
- struct _camel_header_references *r = NULL;
-
- if (refs) {
- r = camel_header_references_decode (refs);
- msgid = r->id;
- }
-
- rule_match_thread (context, rule, msgid);
- name = g_strdup_printf (_("Replies to %s"), msgid);
-
- if (r)
- camel_header_references_list_clear (&r);
- }
- }
-}
-
-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;
-}
-
-void
-filter_gui_add_from_message (CamelMimeMessage *msg, const char *source, int flags)
-{
- FilterContext *fc;
- char *user, *system;
- FilterRule *rule;
-
- g_return_if_fail (msg != NULL);
-
- fc = filter_context_new ();
- user = g_strdup_printf ("%s/mail/filters.xml",
- mail_component_peek_base_directory (mail_component_peek ()));
- system = EVOLUTION_PRIVDATADIR "/filtertypes.xml";
- rule_context_load ((RuleContext *)fc, system, user);
- rule = filter_rule_from_message (fc, msg, flags);
-
- filter_rule_set_source (rule, source);
-
- rule_context_add_rule_gui ((RuleContext *)fc, rule, _("Add Filter Rule"), user);
- g_free (user);
- g_object_unref (fc);
-}
-
-void
-mail_filter_rename_uri(CamelStore *store, const char *olduri, const char *newuri)
-{
- GCompareFunc uri_cmp = CAMEL_STORE_CLASS(CAMEL_OBJECT_GET_CLASS(store))->compare_folder_name;
- FilterContext *fc;
- char *user, *system;
- GList *changed;
-
- fc = filter_context_new ();
- user = g_strdup_printf ("%s/mail/filters.xml", mail_component_peek_base_directory (mail_component_peek ()));
- system = EVOLUTION_PRIVDATADIR "/filtertypes.xml";
- rule_context_load ((RuleContext *)fc, system, user);
-
- changed = rule_context_rename_uri((RuleContext *)fc, olduri, newuri, uri_cmp);
- if (changed) {
- printf("Folder rename '%s' -> '%s' changed filters, resaving\n", olduri, newuri);
- if (rule_context_save((RuleContext *)fc, user) == -1)
- g_warning("Could not write out changed filter rules\n");
- rule_context_free_uri_list((RuleContext *)fc, changed);
- }
-
- g_free(user);
- g_object_unref (fc);
-}
-
-void
-mail_filter_delete_uri(CamelStore *store, const char *uri)
-{
- GCompareFunc uri_cmp = CAMEL_STORE_CLASS(CAMEL_OBJECT_GET_CLASS(store))->compare_folder_name;
- FilterContext *fc;
- char *user, *system;
- GList *deleted;
-
- fc = filter_context_new ();
- user = g_strdup_printf ("%s/mail/filters.xml", mail_component_peek_base_directory (mail_component_peek ()));
- system = EVOLUTION_PRIVDATADIR "/filtertypes.xml";
- rule_context_load ((RuleContext *)fc, system, user);
-
- deleted = rule_context_delete_uri ((RuleContext *) fc, uri, uri_cmp);
- if (deleted) {
- GtkWidget *dialog;
- GString *s;
- GList *l;
-
- s = g_string_new (_("The following filter rule(s):\n"));
- l = deleted;
- while (l) {
- g_string_append_printf (s, " %s\n", (char *)l->data);
- l = l->next;
- }
- g_string_append_printf (s, _("Used the removed folder:\n '%s'\n"
- "And have been updated."), uri);
-
- dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_INFO,
- GTK_BUTTONS_CLOSE, "%s", s->str);
- g_signal_connect_swapped (dialog, "response", G_CALLBACK (gtk_widget_destroy), dialog);
-
- g_string_free (s, TRUE);
-
- gtk_widget_show (dialog);
-
- printf("Folder deleterename '%s' changed filters, resaving\n", uri);
- if (rule_context_save ((RuleContext *) fc, user) == -1)
- g_warning ("Could not write out changed filter rules\n");
- rule_context_free_uri_list ((RuleContext *) fc, deleted);
- }
-
- g_free (user);
- g_object_unref (fc);
-}
diff --git a/mail/mail-autofilter.h b/mail/mail-autofilter.h
deleted file mode 100644
index a5c2575338..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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,
- AUTO_MLIST = 8,
- AUTO_THREAD = 16,
-};
-
-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);
-
-/* easiest place to put this */
-void filter_gui_add_from_message (CamelMimeMessage *msg, const char *source, int flags);
-
-/* Also easiest place for these, we should really share a global rule context for this stuff ... */
-void mail_filter_rename_uri(CamelStore *store, const char *olduri, const char *newuri);
-void mail_filter_delete_uri(CamelStore *store, const char *uri);
-
-#endif
diff --git a/mail/mail-component-factory.c b/mail/mail-component-factory.c
deleted file mode 100644
index d2130ef7ce..0000000000
--- a/mail/mail-component-factory.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* mail-component-factory.c
- *
- * Authors: Ettore Perazzoli <ettore@ximian.com>
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 "em-utils.h"
-#include "evolution-composer.h"
-#include "mail-component.h"
-#include "em-account-prefs.h"
-#include "em-composer-prefs.h"
-#include "em-mailer-prefs.h"
-
-#include "mail-config-druid.h"
-#include "mail-config-factory.h"
-#include "mail-config.h"
-#include "mail-mt.h"
-
-#include <bonobo-activation/bonobo-activation.h>
-#include <bonobo/bonobo-shlib-factory.h>
-
-#include <string.h>
-
-
-#define FACTORY_ID "OAFIID:GNOME_Evolution_Mail_Factory:" BASE_VERSION
-
-#define COMPONENT_ID "OAFIID:GNOME_Evolution_Mail_Component:" BASE_VERSION
-#define COMPOSER_ID "OAFIID:GNOME_Evolution_Mail_Composer:" BASE_VERSION
-#define FOLDER_INFO_ID "OAFIID:GNOME_Evolution_FolderInfo:" BASE_VERSION
-#define MAIL_CONFIG_ID "OAFIID:GNOME_Evolution_MailConfig:" BASE_VERSION
-#define WIZARD_ID "OAFIID:GNOME_Evolution_Mail_Wizard:" BASE_VERSION
-
-
-static BonoboObject *
-factory (BonoboGenericFactory *factory,
- const char *component_id,
- void *closure)
-{
- /* EPFIXME this is messy. The IDs are defined all over the place
- without a logic... */
-
- if (strcmp (component_id, COMPONENT_ID) == 0) {
- MailComponent *component = mail_component_peek ();
-
- bonobo_object_ref (BONOBO_OBJECT (component));
- return BONOBO_OBJECT (component);
- } else if (strcmp(component_id, MAIL_CONFIG_ID) == 0) {
- return (BonoboObject *)g_object_new (evolution_mail_config_get_type (), NULL);
- } else if (strcmp(component_id, WIZARD_ID) == 0) {
- return evolution_mail_config_wizard_new();
- } else if (strcmp (component_id, EM_ACCOUNT_PREFS_CONTROL_ID) == 0
- || strcmp (component_id, EM_MAILER_PREFS_CONTROL_ID) == 0
- || strcmp (component_id, EM_COMPOSER_PREFS_CONTROL_ID) == 0) {
- return mail_config_control_factory_cb (factory, component_id, CORBA_OBJECT_NIL);
- } else if (strcmp(component_id, COMPOSER_ID) == 0) {
- /* FIXME: how to remove need for callbacks, probably make the composer more tightly integrated with mail */
- return (BonoboObject *) evolution_composer_new (em_utils_composer_send_cb, em_utils_composer_save_draft_cb);
- }
-
- g_warning (FACTORY_ID ": Don't know what to do with %s", component_id);
- return NULL;
-}
-
-static Bonobo_Unknown
-make_factory (PortableServer_POA poa, const char *iid, gpointer impl_ptr, CORBA_Environment *ev)
-{
- static int init = 0;
-
- if (!init) {
- mail_config_init ();
- mail_msg_init ();
- init = 1;
- }
-
- return bonobo_shlib_factory_std (FACTORY_ID, poa, impl_ptr, factory, NULL, ev);
-}
-
-static BonoboActivationPluginObject plugin_list[] = {
- { FACTORY_ID, make_factory},
- { NULL }
-};
-
-const BonoboActivationPlugin Bonobo_Plugin_info = {
- plugin_list, "Evolution Mail component factory"
-};
diff --git a/mail/mail-component.c b/mail/mail-component.c
deleted file mode 100644
index 3967ed8a1b..0000000000
--- a/mail/mail-component.c
+++ /dev/null
@@ -1,900 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* mail-component.c
- *
- * Copyright (C) 2003 Ximian Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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>
- */
-
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-
-#include "em-popup.h"
-#include "em-utils.h"
-#include "em-format.h"
-#include "em-folder-tree.h"
-#include "em-folder-browser.h"
-#include "em-folder-selector.h"
-#include "em-folder-selection.h"
-#include "em-migrate.h"
-
-#include "mail-config.h"
-#include "mail-component.h"
-#include "mail-folder-cache.h"
-#include "mail-vfolder.h"
-#include "mail-mt.h"
-#include "mail-ops.h"
-#include "mail-tools.h"
-#include "mail-send-recv.h"
-#include "mail-session.h"
-
-#include "e-task-bar.h"
-
-#include <gtk/gtklabel.h>
-
-#include <e-util/e-mktemp.h>
-#include <e-util/e-dialog-utils.h>
-
-#include <gal/e-table/e-tree.h>
-#include <gal/e-table/e-tree-memory.h>
-
-#include <camel/camel.h>
-#include <camel/camel-file-utils.h>
-
-#include <bonobo/bonobo-control.h>
-#include <bonobo/bonobo-widget.h>
-
-
-#define d(x) x
-
-
-#define PARENT_TYPE bonobo_object_get_type ()
-static BonoboObjectClass *parent_class = NULL;
-
-struct _MailComponentPrivate {
- char *base_directory;
-
- EMFolderTreeModel *model;
-
- EActivityHandler *activity_handler;
-
- MailAsyncEvent *async_event;
- GHashTable *store_hash; /* display_name by store */
-
- RuleContext *search_context;
-
- char *context_path; /* current path for right-click menu */
-
- CamelStore *local_store;
-};
-
-/* Utility functions. */
-
-static void
-add_store (MailComponent *component, const char *name, CamelStore *store, CamelException *ex)
-{
- camel_object_ref (store);
- g_hash_table_insert (component->priv->store_hash, store, g_strdup (name));
- em_folder_tree_model_add_store (component->priv->model, store, name);
- mail_note_store (store, NULL, NULL, NULL);
-}
-
-static void
-load_accounts (MailComponent *component, EAccountList *accounts)
-{
- EIterator *iter;
-
- /* Load each service (don't connect!). Check its provider and
- * see if this belongs in the shell's folder list. If so, add
- * it.
- */
-
- iter = e_list_get_iterator ((EList *) accounts);
- while (e_iterator_is_valid (iter)) {
- EAccountService *service;
- EAccount *account;
- const char *name;
-
- account = (EAccount *) e_iterator_get (iter);
- service = account->source;
- name = account->name;
-
- if (account->enabled && service->url != NULL)
- mail_component_load_store_by_uri (component, service->url, name);
-
- e_iterator_next (iter);
- }
-
- g_object_unref (iter);
-}
-
-static void
-store_go_online (gpointer key, gpointer value, gpointer data)
-{
- CamelStore *store = key;
- CamelService *service = CAMEL_SERVICE (store);
-
- if (! (service->provider->flags & CAMEL_PROVIDER_IS_REMOTE)
- || (service->provider->flags & CAMEL_PROVIDER_IS_EXTERNAL))
- return;
-
- if ((CAMEL_IS_DISCO_STORE (service)
- && camel_disco_store_status (CAMEL_DISCO_STORE (service)) == CAMEL_DISCO_STORE_OFFLINE)
- || service->status != CAMEL_SERVICE_DISCONNECTED) {
- mail_store_set_offline (store, FALSE, NULL, NULL);
- mail_note_store (store, NULL, NULL, NULL);
- }
-}
-
-static void
-go_online (MailComponent *component)
-{
- camel_session_set_online (session, TRUE);
- mail_session_set_interactive (TRUE);
- mail_component_stores_foreach (component, store_go_online, NULL);
-}
-
-static void
-setup_search_context (MailComponent *component)
-{
- MailComponentPrivate *priv = component->priv;
- char *user = g_strdup_printf ("%s/evolution/searches.xml", g_get_home_dir ()); /* EPFIXME should be somewhere else. */
- char *system = g_strdup (EVOLUTION_PRIVDATADIR "/vfoldertypes.xml");
-
- priv->search_context = rule_context_new ();
- g_object_set_data_full (G_OBJECT (priv->search_context), "user", user, g_free);
- g_object_set_data_full (G_OBJECT (priv->search_context), "system", system, g_free);
-
- rule_context_add_part_set (priv->search_context, "partset", filter_part_get_type (),
- rule_context_add_part, rule_context_next_part);
-
- rule_context_add_rule_set (priv->search_context, "ruleset", filter_rule_get_type (),
- rule_context_add_rule, rule_context_next_rule);
-
- rule_context_load (priv->search_context, system, user);
-}
-
-/* Local store setup. */
-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 *default_inbox_folder_uri;
-CamelFolder *inbox_folder = NULL;
-
-static struct {
- char *base;
- char **uri;
- CamelFolder **folder;
-} default_folders[] = {
- { "Inbox", &default_inbox_folder_uri, &inbox_folder },
- { "Drafts", &default_drafts_folder_uri, &drafts_folder },
- { "Outbox", &default_outbox_folder_uri, &outbox_folder },
- { "Sent", &default_sent_folder_uri, &sent_folder },
-};
-
-static void
-setup_local_store(MailComponent *component)
-{
- MailComponentPrivate *p = component->priv;
- CamelException ex;
- char *store_uri;
- int i;
-
- g_assert(p->local_store == NULL);
-
- /* EPFIXME It should use base_directory once we have moved it. */
- store_uri = g_strconcat("mbox:", g_get_home_dir (), "/.evolution/mail/local", NULL);
- p->local_store = mail_component_load_store_by_uri (component, store_uri, _("On this Computer"));
- camel_object_ref (p->local_store);
-
- camel_exception_init (&ex);
- for (i=0;i<sizeof(default_folders)/sizeof(default_folders[0]);i++) {
- /* FIXME: should this uri be account relative? */
- *default_folders[i].uri = g_strdup_printf("%s#%s", store_uri, default_folders[i].base);
- *default_folders[i].folder = camel_store_get_folder(p->local_store, default_folders[i].base,
- CAMEL_STORE_FOLDER_CREATE, &ex);
- camel_exception_clear(&ex);
- }
-
- g_free(store_uri);
-}
-
-static void
-folder_selected_cb (EMFolderTree *emft, const char *path, const char *uri, EMFolderView *view)
-{
- if (!path || !strcmp (path, "/"))
- em_folder_view_set_folder (view, NULL, NULL);
- else
- em_folder_view_set_folder_uri (view, uri);
-}
-
-static void
-view_control_activate_cb (BonoboControl *control, gboolean activate, EMFolderView *view)
-{
- BonoboUIComponent *uic;
-
- uic = bonobo_control_get_ui_component (control);
- g_assert (uic != NULL);
-
- if (activate) {
- Bonobo_UIContainer container;
-
- container = bonobo_control_get_remote_ui_container (control, NULL);
- bonobo_ui_component_set_container (uic, container, NULL);
- bonobo_object_release_unref (container, NULL);
-
- g_assert (container == bonobo_ui_component_get_container(uic));
- g_return_if_fail (container != CORBA_OBJECT_NIL);
-
- em_folder_view_activate (view, uic, activate);
- } else {
- em_folder_view_activate (view, uic, activate);
- bonobo_ui_component_unset_container (uic, NULL);
- }
-}
-
-
-/* GObject methods. */
-
-static void
-impl_dispose (GObject *object)
-{
- MailComponentPrivate *priv = MAIL_COMPONENT (object)->priv;
-
- if (priv->activity_handler != NULL) {
- g_object_unref (priv->activity_handler);
- priv->activity_handler = NULL;
- }
-
- if (priv->search_context != NULL) {
- g_object_unref (priv->search_context);
- priv->search_context = NULL;
- }
-
- if (priv->local_store != NULL) {
- camel_object_unref (CAMEL_OBJECT (priv->local_store));
- priv->local_store = NULL;
- }
-
- (* G_OBJECT_CLASS (parent_class)->dispose) (object);
-}
-
-static void
-store_hash_free (gpointer key, gpointer value, gpointer user_data)
-{
- CamelStore *store = key;
- char *name = value;
-
- g_free (name);
- camel_object_unref (store);
-}
-
-static void
-impl_finalize (GObject *object)
-{
- MailComponentPrivate *priv = MAIL_COMPONENT (object)->priv;
-
- g_free (priv->base_directory);
-
- mail_async_event_destroy (priv->async_event);
-
- g_hash_table_foreach (priv->store_hash, store_hash_free, NULL);
- g_hash_table_destroy (priv->store_hash);
-
- if (mail_async_event_destroy (priv->async_event) == -1) {
- g_warning("Cannot destroy async event: would deadlock");
- g_warning(" system may be unstable at exit");
- }
-
- g_free (priv->context_path);
- g_free (priv);
-
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
-}
-
-
-/* Evolution::Component CORBA methods. */
-
-static void
-impl_createControls (PortableServer_Servant servant,
- Bonobo_Control *corba_tree_control,
- Bonobo_Control *corba_view_control,
- Bonobo_Control *corba_statusbar_control,
- CORBA_Environment *ev)
-{
- MailComponent *mail_component = MAIL_COMPONENT (bonobo_object_from_servant (servant));
- MailComponentPrivate *priv = mail_component->priv;
- BonoboControl *tree_control;
- BonoboControl *view_control;
- BonoboControl *statusbar_control;
- GtkWidget *tree_widget;
- GtkWidget *view_widget;
- GtkWidget *statusbar_widget;
-
- view_widget = em_folder_browser_new ();
- tree_widget = (GtkWidget *) em_folder_tree_new_with_model (priv->model);
- em_folder_tree_enable_drag_and_drop ((EMFolderTree *) tree_widget);
- em_format_set_session ((EMFormat *) ((EMFolderView *) view_widget)->preview, session);
-
- statusbar_widget = e_task_bar_new ();
- e_activity_handler_attach_task_bar (priv->activity_handler, E_TASK_BAR (statusbar_widget));
-
- gtk_widget_show (tree_widget);
- gtk_widget_show (view_widget);
- gtk_widget_show (statusbar_widget);
-
- tree_control = bonobo_control_new (tree_widget);
- view_control = bonobo_control_new (view_widget);
- statusbar_control = bonobo_control_new (statusbar_widget);
-
- *corba_tree_control = CORBA_Object_duplicate (BONOBO_OBJREF (tree_control), ev);
- *corba_view_control = CORBA_Object_duplicate (BONOBO_OBJREF (view_control), ev);
- *corba_statusbar_control = CORBA_Object_duplicate (BONOBO_OBJREF (statusbar_control), ev);
-
- g_signal_connect (view_control, "activate", G_CALLBACK (view_control_activate_cb), view_widget);
-
- g_signal_connect (tree_widget, "folder-selected", G_CALLBACK (folder_selected_cb), view_widget);
-}
-
-
-static GNOME_Evolution_CreatableItemTypeList *
-impl__get_userCreatableItems (PortableServer_Servant servant, CORBA_Environment *ev)
-{
- GNOME_Evolution_CreatableItemTypeList *list = GNOME_Evolution_CreatableItemTypeList__alloc ();
-
- list->_length = 1;
- list->_maximum = list->_length;
- list->_buffer = GNOME_Evolution_CreatableItemTypeList_allocbuf (list->_length);
-
- CORBA_sequence_set_release (list, FALSE);
-
- list->_buffer[0].id = "message";
- list->_buffer[0].description = _("New Mail Message");
- list->_buffer[0].menuDescription = _("_Mail Message");
- list->_buffer[0].tooltip = _("Compose a new mail message");
- list->_buffer[0].menuShortcut = 'm';
- list->_buffer[0].iconName = "new-message.xpm";
-
- return list;
-}
-
-static void
-impl_requestCreateItem (PortableServer_Servant servant,
- const CORBA_char *item_type_name,
- CORBA_Environment *ev)
-{
- if (strcmp (item_type_name, "message") != 0) {
- CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
- ex_GNOME_Evolution_Component_UnknownType, NULL);
- return;
- }
-
- em_utils_compose_new_message ();
-}
-
-static void
-impl_handleURI (PortableServer_Servant servant, const CORBA_char *uri, CORBA_Environment *ev)
-{
- if (!strncmp (uri, "mailto:", 7)) {
- em_utils_compose_new_message_with_mailto (uri);
- }
-}
-
-static void
-impl_sendAndReceive (PortableServer_Servant servant, CORBA_Environment *ev)
-{
- mail_send_receive ();
-}
-
-
-/* Initialization. */
-
-static void
-mail_component_class_init (MailComponentClass *class)
-{
- POA_GNOME_Evolution_Component__epv *epv = &class->epv;
- GObjectClass *object_class = G_OBJECT_CLASS (class);
-
- parent_class = g_type_class_peek_parent (class);
-
- object_class->dispose = impl_dispose;
- object_class->finalize = impl_finalize;
-
- epv->createControls = impl_createControls;
- epv->_get_userCreatableItems = impl__get_userCreatableItems;
- epv->requestCreateItem = impl_requestCreateItem;
- epv->handleURI = impl_handleURI;
- epv->sendAndReceive = impl_sendAndReceive;
-}
-
-static void
-mail_component_init (MailComponent *component)
-{
- MailComponentPrivate *priv;
- EAccountList *accounts;
- struct stat st;
- char *mail_dir;
-
- priv = g_new0 (MailComponentPrivate, 1);
- component->priv = priv;
-
- priv->base_directory = g_build_filename (g_get_home_dir (), ".evolution", NULL);
- if (camel_mkdir (priv->base_directory, 0777) == -1 && errno != EEXIST)
- abort ();
-
- priv->model = em_folder_tree_model_new (priv->base_directory);
-
- priv->activity_handler = e_activity_handler_new ();
-
- /* EPFIXME: Turn into an object? */
- mail_session_init (priv->base_directory);
-
- priv->async_event = mail_async_event_new();
- priv->store_hash = g_hash_table_new (NULL, NULL);
-
- /* migrate evolution 1.x folders to 2.0's location/format */
- mail_dir = g_strdup_printf ("%s/mail", priv->base_directory);
- if (stat (mail_dir, &st) == -1) {
- CamelException ex;
-
- camel_exception_init (&ex);
- if (em_migrate (component, &ex) == -1) {
- GtkWidget *dialog;
-
- dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_WARNING, GTK_BUTTONS_CLOSE,
- _("The following error occured while migrating your mail data:\n%s"),
- camel_exception_get_description (&ex));
-
- g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), dialog);
- gtk_widget_show (dialog);
-
- camel_exception_clear (&ex);
- }
- }
- g_free (mail_dir);
-
- setup_local_store (component);
-
- accounts = mail_config_get_accounts ();
- load_accounts(component, accounts);
-
- /* mail_autoreceive_setup (); EPFIXME keep it off for testing */
-
- setup_search_context (component);
-
- /* EPFIXME not sure about this. */
- go_online (component);
-}
-
-
-/* Public API. */
-
-MailComponent *
-mail_component_peek (void)
-{
- static MailComponent *component = NULL;
-
- if (component == NULL) {
- component = g_object_new (mail_component_get_type (), NULL);
-
- /* FIXME: this should all be initialised in a starutp routine, not from the peek function,
- this covers much of the ::init method's content too */
- vfolder_load_storage ();
- }
-
- return component;
-}
-
-
-const char *
-mail_component_peek_base_directory (MailComponent *component)
-{
- return component->priv->base_directory;
-}
-
-RuleContext *
-mail_component_peek_search_context (MailComponent *component)
-{
- return component->priv->search_context;
-}
-
-EActivityHandler *
-mail_component_peek_activity_handler (MailComponent *component)
-{
- return component->priv->activity_handler;
-}
-
-void
-mail_component_add_store (MailComponent *component, CamelStore *store, const char *name)
-{
- CamelException ex;
-
- camel_exception_init (&ex);
-
- if (name == NULL) {
- char *service_name;
-
- service_name = camel_service_get_name ((CamelService *) store, TRUE);
- add_store (component, service_name, store, &ex);
- g_free (service_name);
- } else {
- add_store (component, name, store, &ex);
- }
-
- camel_exception_clear (&ex);
-}
-
-
-/**
- * mail_component_load_store_by_uri:
- * @component: mail component
- * @uri: uri of store
- * @name: name of store (used for display purposes)
- *
- * Return value: Pointer to the newly added CamelStore. The caller is supposed
- * to ref the object if it wants to store it.
- **/
-CamelStore *
-mail_component_load_store_by_uri (MailComponent *component, const char *uri, const char *name)
-{
- CamelException ex;
- CamelStore *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) {
- /* EPFIXME: real error dialog */
- g_warning ("couldn't get service %s: %s\n", uri,
- camel_exception_get_description (&ex));
- camel_exception_clear (&ex);
- return NULL;
- }
-
- if (!(prov->flags & CAMEL_PROVIDER_IS_STORAGE) ||
- (prov->flags & CAMEL_PROVIDER_IS_EXTERNAL))
- return NULL;
-
- store = (CamelStore *) camel_session_get_service (session, uri, CAMEL_PROVIDER_STORE, &ex);
- if (store == NULL) {
- /* EPFIXME: real error dialog */
- g_warning ("couldn't get service %s: %s\n", uri,
- camel_exception_get_description (&ex));
- camel_exception_clear (&ex);
- return NULL;
- }
-
- if (name != NULL) {
- add_store (component, name, store, &ex);
- } else {
- char *service_name;
-
- service_name = camel_service_get_name ((CamelService *) store, TRUE);
- add_store (component, service_name, store, &ex);
- g_free (service_name);
- }
-
- if (camel_exception_is_set (&ex)) {
- /* EPFIXME: real error dialog */
- g_warning ("Cannot load store: %s",
- camel_exception_get_description (&ex));
- camel_exception_clear (&ex);
- }
-
- camel_object_unref (store);
-
- return store;
-}
-
-
-static void
-store_disconnect (CamelStore *store, void *event_data, void *user_data)
-{
- camel_service_disconnect (CAMEL_SERVICE (store), TRUE, NULL);
- camel_object_unref (store);
-}
-
-void
-mail_component_remove_store (MailComponent *component, CamelStore *store)
-{
- MailComponentPrivate *priv = component->priv;
- char *name;
-
- /* Because the store_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.
- */
-
- if (!(name = g_hash_table_lookup (priv->store_hash, store)))
- return;
-
- g_hash_table_remove (priv->store_hash, store);
- g_free (name);
-
- /* so i guess potentially we could have a race, add a store while one
- being removed. ?? */
- mail_note_store_remove (store);
-
- em_folder_tree_model_remove_store (priv->model, store);
-
- mail_async_event_emit (priv->async_event, MAIL_ASYNC_THREAD, (MailAsyncFunc) store_disconnect, store, NULL, NULL);
-}
-
-
-void
-mail_component_remove_store_by_uri (MailComponent *component, const char *uri)
-{
- CamelProvider *prov;
- CamelStore *store;
-
- if (!(prov = camel_session_get_provider (session, uri, NULL)))
- return;
-
- if (!(prov->flags & CAMEL_PROVIDER_IS_STORAGE) ||
- (prov->flags & CAMEL_PROVIDER_IS_EXTERNAL))
- return;
-
- store = (CamelStore *) camel_session_get_service (session, uri, CAMEL_PROVIDER_STORE, NULL);
- if (store != NULL) {
- mail_component_remove_store (component, store);
- camel_object_unref (store);
- }
-}
-
-
-int
-mail_component_get_store_count (MailComponent *component)
-{
- return g_hash_table_size (component->priv->store_hash);
-}
-
-
-void
-mail_component_stores_foreach (MailComponent *component, GHFunc func, void *user_data)
-{
- g_hash_table_foreach (component->priv->store_hash, func, user_data);
-}
-
-
-void
-mail_component_remove_folder (MailComponent *component, CamelStore *store, const char *path)
-{
- /* FIXME: implement me. but first, am I really even needed? */
-}
-
-
-EMFolderTreeModel *
-mail_component_get_tree_model (MailComponent *component)
-{
- g_object_ref (component->priv->model);
- return component->priv->model;
-}
-
-struct _CamelFolder *
-mail_component_get_local_inbox(MailComponent *mc, struct _CamelException *ex)
-{
- return camel_store_get_folder(mc->priv->local_store, "Inbox", 0, ex);
-}
-
-extern struct _CamelSession *session;
-
-char *em_uri_from_camel(const char *curi)
-{
- CamelURL *curl;
- EAccount *account;
- const char *uid, *path;
- char *euri;
- CamelProvider *provider;
-
- provider = camel_session_get_provider(session, curi, NULL);
- if (provider == NULL)
- return g_strdup(curi);
-
- curl = camel_url_new(curi, NULL);
- if (curl == NULL)
- return g_strdup(curi);
-
- account = mail_config_get_account_by_source_url(curi);
- uid = (account == NULL)?"local@local":account->uid;
- path = (provider->url_flags & CAMEL_URL_FRAGMENT_IS_PATH)?curl->fragment:curl->path;
- if (path[0] == '/')
- path++;
- euri = g_strdup_printf("email://%s/%s", uid, path);
-
- d(printf("em uri from camel '%s' -> '%s'\n", curi, euri));
-
- return euri;
-}
-
-char *em_uri_to_camel(const char *euri)
-{
- EAccountList *accounts;
- const EAccount *account;
- EAccountService *service;
- CamelProvider *provider;
- CamelURL *eurl, *curl;
- char *uid, *curi;
-
- eurl = camel_url_new(euri, NULL);
- if (eurl == NULL)
- return g_strdup(euri);
-
- if (strcmp(eurl->protocol, "email") != 0) {
- camel_url_free(eurl);
- return g_strdup(euri);
- }
-
- g_assert(eurl->user != NULL);
- g_assert(eurl->host != NULL);
-
- if (strcmp(eurl->user, "local") == 0 && strcmp(eurl->host, "local") == 0) {
- curi = g_strdup_printf("mbox:%s/.evolution/mail/local#%s", g_get_home_dir(), eurl->path[0]=='/'?eurl->path+1:eurl->path);
- camel_url_free(eurl);
- return curi;
- }
-
- uid = g_strdup_printf("%s@%s", eurl->user, eurl->host);
-
- accounts = mail_config_get_accounts();
- account = e_account_list_find(accounts, E_ACCOUNT_FIND_UID, uid);
- g_free(uid);
-
- if (account == NULL) {
- camel_url_free(eurl);
- return g_strdup(euri);
- }
-
- service = account->source;
- provider = camel_session_get_provider(session, service->url, NULL);
-
- curl = camel_url_new(service->url, NULL);
- if (provider->url_flags & CAMEL_URL_FRAGMENT_IS_PATH)
- camel_url_set_fragment(curl, eurl->path[0]=='/'?eurl->path+1:eurl->path);
- else
- camel_url_set_path(curl, eurl->path);
-
- curi = camel_url_to_string(curl, 0);
-
- camel_url_free(eurl);
- camel_url_free(curl);
-
- d(printf("em uri to camel '%s' -> '%s'\n", euri, curi));
-
- return curi;
-}
-
-
-CamelFolder *
-mail_component_get_folder_from_evomail_uri (MailComponent *component,
- guint32 flags,
- const char *evomail_uri,
- CamelException *ex)
-{
- CamelException local_ex;
- EAccountList *accounts;
- EIterator *iter;
- const char *p;
- const char *q;
- const char *folder_name;
- char *uid;
-
- camel_exception_init (&local_ex);
-
- if (strncmp (evomail_uri, "evomail:", 8) != 0)
- return NULL;
-
- p = evomail_uri + 8;
- while (*p == '/')
- p ++;
-
- q = strchr (p, '/');
- if (q == NULL)
- return NULL;
-
- uid = g_strndup (p, q - p);
- folder_name = q + 1;
-
- /* since we have no explicit account for 'local' folders, make one up */
- if (strcmp(uid, "local") == 0) {
- g_free(uid);
- return camel_store_get_folder(component->priv->local_store, folder_name, flags, ex);
- }
-
- accounts = mail_config_get_accounts ();
- iter = e_list_get_iterator ((EList *) accounts);
- while (e_iterator_is_valid (iter)) {
- EAccount *account = (EAccount *) e_iterator_get (iter);
- EAccountService *service = account->source;
- CamelProvider *provider;
- CamelStore *store;
-
- if (strcmp (account->uid, uid) != 0)
- continue;
-
- provider = camel_session_get_provider (session, service->url, &local_ex);
- if (provider == NULL)
- goto fail;
-
- store = (CamelStore *) camel_session_get_service (session, service->url, CAMEL_PROVIDER_STORE, &local_ex);
- if (store == NULL)
- goto fail;
-
- g_free (uid);
- return camel_store_get_folder (store, folder_name, flags, ex);
- }
-
- fail:
- camel_exception_clear (&local_ex);
- g_free (uid);
- return NULL;
-}
-
-
-char *
-mail_component_evomail_uri_from_folder (MailComponent *component,
- CamelFolder *folder)
-{
- CamelStore *store = camel_folder_get_parent_store (folder);
- EAccount *account;
- char *service_url;
- char *evomail_uri;
- const char *uid;
-
- if (store == NULL)
- return NULL;
-
- service_url = camel_service_get_url (CAMEL_SERVICE (store));
- account = mail_config_get_account_by_source_url (service_url);
-
- if (account == NULL) {
- /* since we have no explicit account for 'local' folders, make one up */
- /* TODO: check the folder is really a local one, folder->parent_store == local_store? */
- uid = "local";
- /*g_free (service_url);
- return NULL;*/
- } else {
- uid = account->uid;
- }
-
- evomail_uri = g_strconcat ("evomail:///", uid, "/", camel_folder_get_full_name (folder), NULL);
- g_free (service_url);
-
- return evomail_uri;
-}
-
-
-BONOBO_TYPE_FUNC_FULL (MailComponent, GNOME_Evolution_Component, PARENT_TYPE, mail_component)
diff --git a/mail/mail-component.h b/mail/mail-component.h
deleted file mode 100644
index 545ddf11d4..0000000000
--- a/mail/mail-component.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* mail-component.h
- *
- * Copyright (C) 2003 Ximian Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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>
- * Jeffrey Stedfast <fejj@ximian.com>
- * Ettore Perazzoli <ettore@ximian.com>
- */
-
-#ifndef _MAIL_COMPONENT_H_
-#define _MAIL_COMPONENT_H_
-
-#include <camel/camel-store.h>
-#include <filter/rule-context.h>
-#include <bonobo/bonobo-object.h>
-
-#include "e-activity-handler.h"
-
-#include "Evolution.h"
-
-#define MAIL_TYPE_COMPONENT (mail_component_get_type ())
-#define MAIL_COMPONENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MAIL_TYPE_COMPONENT, MailComponent))
-#define MAIL_COMPONENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MAIL_TYPE_COMPONENT, MailComponentClass))
-#define MAIL_IS_COMPONENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MAIL_TYPE_COMPONENT))
-#define MAIL_IS_COMPONENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), MAIL_TYPE_COMPONENT))
-
-typedef struct _MailComponent MailComponent;
-typedef struct _MailComponentPrivate MailComponentPrivate;
-typedef struct _MailComponentClass MailComponentClass;
-
-struct _MailComponent {
- BonoboObject parent;
-
- MailComponentPrivate *priv;
-};
-
-struct _MailComponentClass {
- BonoboObjectClass parent_class;
-
- POA_GNOME_Evolution_Component__epv epv;
-};
-
-GType mail_component_get_type (void);
-
-MailComponent *mail_component_peek (void);
-
-const char *mail_component_peek_base_directory (MailComponent *component);
-RuleContext *mail_component_peek_search_context (MailComponent *component);
-EActivityHandler *mail_component_peek_activity_handler (MailComponent *component);
-
-void mail_component_add_store (MailComponent *component,
- CamelStore *store,
- const char *name);
-CamelStore *mail_component_load_store_by_uri (MailComponent *component,
- const char *uri,
- const char *name);
-
-void mail_component_remove_store (MailComponent *component,
- CamelStore *store);
-void mail_component_remove_store_by_uri (MailComponent *component,
- const char *uri);
-
-int mail_component_get_store_count (MailComponent *component);
-void mail_component_stores_foreach (MailComponent *component,
- GHFunc func,
- void *data);
-
-void mail_component_remove_folder (MailComponent *component, CamelStore *store, const char *path);
-
-struct _EMFolderTreeModel *mail_component_get_tree_model (MailComponent *component);
-struct _CamelFolder *mail_component_get_local_inbox(MailComponent *mc, struct _CamelException *ex);
-
-char *em_uri_from_camel (const char *curi);
-char *em_uri_to_camel (const char *euri);
-
-CamelFolder *mail_component_get_folder_from_evomail_uri (MailComponent *component,
- guint32 flags,
- const char *evomail_uri,
- CamelException *ex);
-char *mail_component_evomail_uri_from_folder (MailComponent *component,
- CamelFolder *folder);
-
-#endif /* _MAIL_COMPONENT_H_ */
diff --git a/mail/mail-config-druid.c b/mail/mail-config-druid.c
deleted file mode 100644
index 368742f157..0000000000
--- a/mail/mail-config-druid.c
+++ /dev/null
@@ -1,768 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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/utsname.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <gal/util/e-util.h>
-#include <glade/glade.h>
-#include <gtkhtml/gtkhtml.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 <bonobo/bonobo-exception.h>
-
-#include "mail-config-druid.h"
-#include "mail-config.h"
-#include "mail-ops.h"
-#include "mail.h"
-#include "mail-session.h"
-
-#include <evolution-wizard.h>
-#include <e-util/e-account.h>
-
-typedef enum {
- MAIL_CONFIG_WIZARD_PAGE_NONE = -1,
- MAIL_CONFIG_WIZARD_PAGE_IDENTITY,
- MAIL_CONFIG_WIZARD_PAGE_SOURCE,
- MAIL_CONFIG_WIZARD_PAGE_EXTRA,
- MAIL_CONFIG_WIZARD_PAGE_TRANSPORT,
- MAIL_CONFIG_WIZARD_PAGE_MANAGEMENT,
-
- MAIL_CONFIG_WIZARD_NUM_PAGES
-} MailConfigWizardPage;
-
-typedef struct {
- /* Only one of these will be set */
- GnomeDruid *druid;
- EvolutionWizard *corba_wizard;
-
- MailAccountGui *gui;
-
- GPtrArray *interior_pages;
- GnomeDruidPage *last_page;
-
- gboolean identity_copied;
- CamelProvider *last_source;
- MailConfigWizardPage page;
-} MailConfigWizard;
-
-
-
-
-static void
-config_wizard_set_buttons_sensitive (MailConfigWizard *mcw,
- gboolean prev_sensitive,
- gboolean next_sensitive)
-{
- if (mcw->corba_wizard) {
- evolution_wizard_set_buttons_sensitive (mcw->corba_wizard,
- prev_sensitive,
- next_sensitive,
- TRUE, NULL);
- } else {
- gnome_druid_set_buttons_sensitive (mcw->druid,
- prev_sensitive,
- next_sensitive,
- TRUE, FALSE);
- }
-}
-
-static void
-config_wizard_set_page (MailConfigWizard *mcw, MailConfigWizardPage page)
-{
- if (mcw->corba_wizard)
- evolution_wizard_set_page (mcw->corba_wizard, page, NULL);
- else {
- if (page < mcw->interior_pages->len)
- gnome_druid_set_page (mcw->druid, mcw->interior_pages->pdata[page]);
- else
- gnome_druid_set_page (mcw->druid, mcw->last_page);
- }
-}
-
-/* Identity Page */
-static void
-identity_changed (GtkWidget *widget, gpointer data)
-{
- MailConfigWizard *mcw = data;
- GtkWidget *incomplete;
- gboolean next_sensitive;
-
- if (mcw->page != MAIL_CONFIG_WIZARD_PAGE_IDENTITY)
- return;
-
- next_sensitive = mail_account_gui_identity_complete (mcw->gui, &incomplete);
-
- config_wizard_set_buttons_sensitive (mcw, TRUE, next_sensitive);
-}
-
-static void
-identity_prepare (MailConfigWizard *mcw)
-{
- mcw->page = MAIL_CONFIG_WIZARD_PAGE_IDENTITY;
-
- if (!gtk_entry_get_text (mcw->gui->full_name)) {
- char *uname;
-
- uname = g_locale_to_utf8 (g_get_real_name (), -1, NULL, NULL, NULL);
- gtk_entry_set_text (mcw->gui->full_name, uname ? uname : "");
- g_free (uname);
- }
- identity_changed (NULL, mcw);
-}
-
-static gboolean
-identity_next (MailConfigWizard *mcw)
-{
- if (!mcw->identity_copied) {
- char *username;
- const char *user;
-
- /* Copy the username part of the email address into
- * the Username field of the source and transport pages.
- */
- user = gtk_entry_get_text (mcw->gui->email_address);
- username = g_strndup (user, strcspn (user, "@"));
- gtk_entry_set_text (mcw->gui->source.username, username);
- gtk_entry_set_text (mcw->gui->transport.username, username);
- g_free (username);
-
- mcw->identity_copied = TRUE;
- }
-
- return FALSE;
-}
-
-static void
-identity_activate_cb (GtkEntry *ent, gpointer user_data)
-{
- MailConfigWizard *mcw = user_data;
-
- if (mail_account_gui_identity_complete (mcw->gui, NULL) &&
- !identity_next (mcw))
- config_wizard_set_page (mcw, MAIL_CONFIG_WIZARD_PAGE_SOURCE);
-}
-
-/* Incoming mail Page */
-static void
-source_changed (GtkWidget *widget, gpointer data)
-{
- MailConfigWizard *mcw = data;
- GtkWidget *incomplete;
- gboolean next_sensitive;
-
- if (mcw->page != MAIL_CONFIG_WIZARD_PAGE_SOURCE)
- return;
-
- next_sensitive = mail_account_gui_source_complete (mcw->gui, &incomplete);
-
- config_wizard_set_buttons_sensitive (mcw, TRUE, next_sensitive);
-}
-
-static void
-source_prepare (MailConfigWizard *mcw)
-{
- mcw->page = MAIL_CONFIG_WIZARD_PAGE_SOURCE;
- source_changed (NULL, mcw);
-}
-
-static gboolean
-source_next (MailConfigWizard *mcw)
-{
- /* FIXME: if online, check that the data is good. */
-
- if (mcw->gui->source.provider && mcw->gui->source.provider->extra_conf)
- return FALSE;
-
- /* Otherwise, skip to transport page. */
- config_wizard_set_page (mcw, MAIL_CONFIG_WIZARD_PAGE_TRANSPORT);
- return TRUE;
-}
-
-static void
-source_activate_cb (GtkEntry *ent, gpointer user_data)
-{
- MailConfigWizard *mcw = user_data;
-
- if (mail_account_gui_source_complete (mcw->gui, NULL) &&
- !source_next (mcw))
- config_wizard_set_page (mcw, MAIL_CONFIG_WIZARD_PAGE_EXTRA);
-}
-
-/* Extra Config Page */
-static void
-extra_prepare (MailConfigWizard *mcw)
-{
- mcw->page = MAIL_CONFIG_WIZARD_PAGE_EXTRA;
- if (mcw->gui->source.provider != mcw->last_source) {
- mcw->last_source = mcw->gui->source.provider;
- mail_account_gui_auto_detect_extra_conf (mcw->gui);
- }
-}
-
-/* Transport Page */
-static gboolean
-transport_next (MailConfigWizard *mcw)
-{
- /* FIXME: if online, check that the data is good. */
- return FALSE;
-}
-
-static gboolean
-transport_back (MailConfigWizard *mcw)
-{
- if (mcw->gui->source.provider && mcw->gui->source.provider->extra_conf)
- return FALSE;
- else {
- config_wizard_set_page (mcw, MAIL_CONFIG_WIZARD_PAGE_SOURCE);
- return TRUE;
- }
-}
-
-static void
-transport_changed (GtkWidget *widget, gpointer data)
-{
- MailConfigWizard *mcw = data;
- GtkWidget *incomplete;
- gboolean next_sensitive;
-
- if (mcw->page != MAIL_CONFIG_WIZARD_PAGE_TRANSPORT)
- return;
-
- next_sensitive = mail_account_gui_transport_complete (mcw->gui, &incomplete);
-
- config_wizard_set_buttons_sensitive (mcw, TRUE, next_sensitive);
-}
-
-static void
-transport_prepare (MailConfigWizard *mcw)
-{
- mcw->page = MAIL_CONFIG_WIZARD_PAGE_TRANSPORT;
- transport_changed (NULL, mcw);
-}
-
-static void
-transport_activate_cb (GtkEntry *ent, gpointer user_data)
-{
- MailConfigWizard *mcw = user_data;
-
- if (mail_account_gui_transport_complete (mcw->gui, NULL) &&
- !transport_next (mcw))
- config_wizard_set_page (mcw, MAIL_CONFIG_WIZARD_PAGE_MANAGEMENT);
-}
-
-/* Management page */
-static gboolean
-management_check (MailConfigWizard *mcw)
-{
- gboolean next_sensitive;
- const char *text;
-
- text = gtk_entry_get_text (mcw->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;
-
- config_wizard_set_buttons_sensitive (mcw, TRUE, next_sensitive);
- return next_sensitive;
-}
-
-static void
-management_prepare (MailConfigWizard *mcw)
-{
- const char *name, *text;
-
- mcw->page = MAIL_CONFIG_WIZARD_PAGE_MANAGEMENT;
-
- text = gtk_entry_get_text (mcw->gui->account_name);
- if (!text || *text == '\0') {
- name = gtk_entry_get_text(mcw->gui->email_address);
- if (name && *name) {
- if (mail_config_get_account_by_name (name)) {
- char *template;
- unsigned int i = 1, len;
-
- /* length of name + 1 char for ' ' + 1 char
- for '(' + 10 chars for %d + 1 char for ')'
- + 1 char for nul */
- len = strlen (name);
- template = alloca (len + 14);
- strcpy (template, name);
- name = template;
- do {
- sprintf (template + len, " (%d)", i++);
- } while (mail_config_get_account_by_name (name) && i != 0);
- }
-
- gtk_entry_set_text(mcw->gui->account_name, name);
- }
- }
-
- management_check (mcw);
-}
-
-static void
-management_changed (GtkWidget *widget, gpointer data)
-{
- MailConfigWizard *mcw = data;
-
- if (mcw->page != MAIL_CONFIG_WIZARD_PAGE_MANAGEMENT)
- return;
-
- management_check (mcw);
-}
-
-static void
-management_activate_cb (GtkEntry *ent, gpointer user_data)
-{
- MailConfigWizard *mcw = user_data;
-
- if (management_check (mcw))
- config_wizard_set_page (mcw, mcw->page + 1);
-}
-
-
-#define WIZARD_ICON(name) (EVOLUTION_IMAGES "/mail-config-druid-" name ".png")
-
-static struct {
- const char *page_name, *title, *icon_path;
- void (*prepare_func) (MailConfigWizard *mcw);
- gboolean (*back_func) (MailConfigWizard *mcw);
- gboolean (*next_func) (MailConfigWizard *mcw);
- const char *help_text;
-} wizard_pages[] = {
- { "identity_page", N_("Identity"), WIZARD_ICON ("identity"),
- identity_prepare, NULL, identity_next,
- N_("Please enter your name and email address below. "
- "The \"optional\" fields below do not need to be "
- "filled in, unless you wish to include this "
- "information in email you send.")
- },
-
- { "source_page", N_("Receiving Mail"), WIZARD_ICON ("receive"),
- source_prepare, NULL, source_next,
- N_("Please enter information about your incoming "
- "mail server below. If you are not sure, ask your "
- "system administrator or Internet Service Provider.")
- },
-
- { "extra_page", N_("Receiving Mail"), WIZARD_ICON ("receive"),
- extra_prepare, NULL, NULL,
- N_("Please select among the following options")
- },
-
- { "transport_page", N_("Sending Mail"), WIZARD_ICON ("send"),
- transport_prepare, transport_back, transport_next,
- N_("Please enter information about the way you will "
- "send mail. If you are not sure, ask your system "
- "administrator or Internet Service Provider.")
- },
-
- { "management_page", N_("Account Management"), WIZARD_ICON ("account-name"),
- management_prepare, NULL, NULL,
- N_("You are almost done with the mail configuration "
- "process. The identity, incoming mail server and "
- "outgoing mail transport method which you provided "
- "will be grouped together to make an Evolution mail "
- "account. Please enter a name for this account in "
- "the space below. This name will be used for display "
- "purposes only.")
- }
-};
-static const int num_wizard_pages = sizeof (wizard_pages) / sizeof (wizard_pages[0]);
-
-static GtkWidget *
-get_page (GladeXML *xml, int page_num)
-{
- GtkWidget *vbox, *widget;
-
- vbox = gtk_vbox_new (FALSE, 4);
-
- widget = gtk_label_new (_(wizard_pages[page_num].help_text));
- gtk_label_set_line_wrap (GTK_LABEL (widget), TRUE);
- gtk_label_set_justify (GTK_LABEL (widget), GTK_JUSTIFY_FILL);
- gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 0);
- gtk_widget_show_all (vbox);
-
- switch (page_num) {
- case MAIL_CONFIG_WIZARD_PAGE_IDENTITY:
- widget = glade_xml_get_widget (xml, "identity_required_frame");
- gtk_container_set_border_width (GTK_CONTAINER (widget), 0);
- 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 (xml, "identity_optional_frame");
- gtk_container_set_border_width (GTK_CONTAINER (widget), 0);
- gtk_widget_reparent (widget, vbox);
- gtk_box_set_child_packing (GTK_BOX (vbox), widget, FALSE, FALSE, 0, GTK_PACK_START);
- break;
-
- case MAIL_CONFIG_WIZARD_PAGE_SOURCE:
- widget = glade_xml_get_widget (xml, "source_vbox");
- gtk_container_set_border_width (GTK_CONTAINER (widget), 0);
- gtk_widget_reparent (widget, vbox);
- break;
-
- case MAIL_CONFIG_WIZARD_PAGE_EXTRA:
- widget = glade_xml_get_widget (xml, "extra_table");
- gtk_container_set_border_width (GTK_CONTAINER (widget), 0);
- gtk_widget_reparent (widget, vbox);
- break;
-
- case MAIL_CONFIG_WIZARD_PAGE_TRANSPORT:
- widget = glade_xml_get_widget (xml, "transport_vbox");
- gtk_container_set_border_width (GTK_CONTAINER (widget), 0);
- gtk_widget_reparent (widget, vbox);
- break;
-
- case MAIL_CONFIG_WIZARD_PAGE_MANAGEMENT:
- widget = glade_xml_get_widget (xml, "management_frame");
- gtk_container_set_border_width (GTK_CONTAINER (widget), 0);
- gtk_widget_reparent (widget, vbox);
- break;
-
- default:
- g_return_val_if_reached (NULL);
- }
-
- return vbox;
-}
-
-
-static MailConfigWizard *
-config_wizard_new (void)
-{
- MailConfigWizard *mcw;
- const char *user;
- EAccountService *xport;
- struct utsname uts;
- EAccount *account;
-
- /* Create a new account object with some defaults */
- account = e_account_new ();
- account->enabled = TRUE;
-
- account->id->name = g_locale_to_utf8 (g_get_real_name (), -1, NULL, NULL, NULL);
- user = g_get_user_name ();
- if (user && !uname (&uts) && strchr (uts.nodename, '.'))
- account->id->address = g_strdup_printf ("%s@%s", user, uts.nodename);
-
- if ((xport = mail_config_get_default_transport ())) {
- account->transport->url = g_strdup (xport->url);
- account->transport->save_passwd = xport->save_passwd;
- }
-
- /* Create the config wizard object */
- mcw = g_new0 (MailConfigWizard, 1);
- mcw->gui = mail_account_gui_new (account, NULL);
- g_object_unref (account);
-
- /* Set up gui */
- g_signal_connect (mcw->gui->account_name, "changed",
- G_CALLBACK (management_changed), mcw);
- g_signal_connect (mcw->gui->full_name, "changed",
- G_CALLBACK (identity_changed), mcw);
- g_signal_connect (mcw->gui->email_address, "changed",
- G_CALLBACK (identity_changed), mcw);
- g_signal_connect (mcw->gui->reply_to,"changed",
- G_CALLBACK (identity_changed), mcw);
- g_signal_connect (mcw->gui->source.hostname, "changed",
- G_CALLBACK (source_changed), mcw);
- g_signal_connect (mcw->gui->source.username, "changed",
- G_CALLBACK (source_changed), mcw);
- g_signal_connect (mcw->gui->source.path, "changed",
- G_CALLBACK (source_changed), mcw);
- g_signal_connect (mcw->gui->transport.hostname, "changed",
- G_CALLBACK (transport_changed), mcw);
- g_signal_connect (mcw->gui->transport.username, "changed",
- G_CALLBACK (transport_changed), mcw);
- g_signal_connect (mcw->gui->transport_needs_auth, "toggled",
- G_CALLBACK (transport_changed), mcw);
-
- g_signal_connect (mcw->gui->account_name, "activate",
- G_CALLBACK (management_activate_cb), mcw);
-
- g_signal_connect (mcw->gui->full_name, "activate",
- G_CALLBACK (identity_activate_cb), mcw);
- g_signal_connect (mcw->gui->email_address, "activate",
- G_CALLBACK (identity_activate_cb), mcw);
- g_signal_connect (mcw->gui->reply_to,"activate",
- G_CALLBACK (identity_activate_cb), mcw);
- g_signal_connect (mcw->gui->organization, "activate",
- G_CALLBACK (identity_activate_cb), mcw);
-
- g_signal_connect (mcw->gui->source.hostname, "activate",
- G_CALLBACK (source_activate_cb), mcw);
- g_signal_connect (mcw->gui->source.username, "activate",
- G_CALLBACK (source_activate_cb), mcw);
- g_signal_connect (mcw->gui->source.path, "activate",
- G_CALLBACK (source_activate_cb), mcw);
-
- g_signal_connect (mcw->gui->transport.hostname, "activate",
- G_CALLBACK (transport_activate_cb), mcw);
- g_signal_connect (mcw->gui->transport.username, "activate",
- G_CALLBACK (transport_activate_cb), mcw);
-
- return mcw;
-}
-
-static void
-free_config_wizard (MailConfigWizard *mcw)
-{
- mail_account_gui_destroy (mcw->gui);
-
- if (mcw->interior_pages)
- g_ptr_array_free (mcw->interior_pages, TRUE);
-
- g_free (mcw);
-}
-
-/* In-proc config druid */
-
-static void
-druid_cancel (GnomeDruid *druid, gpointer user_data)
-{
- MailConfigWizard *mcw = user_data;
- GtkWidget *window;
-
- window = glade_xml_get_widget (mcw->gui->xml, "account_druid");
- gtk_widget_destroy (window);
-
- free_config_wizard (mcw);
-}
-
-static void
-druid_finish (GnomeDruidPage *page, GnomeDruid *druid, gpointer user_data)
-{
- MailConfigWizard *mcw = user_data;
-
- mail_account_gui_save (mcw->gui);
- druid_cancel (druid, user_data);
-}
-
-static void
-druid_prepare (GnomeDruidPage *page, GnomeDruid *druid, gpointer data)
-{
- MailConfigWizard *mcw = g_object_get_data (G_OBJECT (druid), "MailConfigWizard");
- int page_num = GPOINTER_TO_INT (data);
-
- if (wizard_pages[page_num].prepare_func)
- wizard_pages[page_num].prepare_func (mcw);
-}
-
-static gboolean
-druid_back (GnomeDruidPage *page, GnomeDruid *druid, gpointer data)
-{
- MailConfigWizard *mcw = g_object_get_data (G_OBJECT (druid), "MailConfigWizard");
- int page_num = GPOINTER_TO_INT (data);
-
- if (wizard_pages[page_num].back_func)
- return wizard_pages[page_num].back_func (mcw);
- else
- return FALSE;
-}
-
-static gboolean
-druid_next (GnomeDruidPage *page, GnomeDruid *druid, gpointer data)
-{
- MailConfigWizard *mcw = g_object_get_data (G_OBJECT (druid), "MailConfigWizard");
- int page_num = GPOINTER_TO_INT (data);
-
- if (wizard_pages[page_num].next_func)
- return wizard_pages[page_num].next_func (mcw);
- else
- return FALSE;
-}
-
-
-MailConfigDruid *
-mail_config_druid_new (void)
-{
- MailConfigWizard *mcw;
- GtkWidget *new, *page;
- int i;
-
- mcw = config_wizard_new ();
- mcw->druid = (GnomeDruid *)glade_xml_get_widget (mcw->gui->xml, "druid");
- g_object_set_data (G_OBJECT (mcw->druid), "MailConfigWizard", mcw);
- gtk_widget_show_all (GTK_WIDGET (mcw->druid));
-
- mcw->interior_pages = g_ptr_array_new ();
- for (i = 0; i < num_wizard_pages; i++) {
- page = glade_xml_get_widget (mcw->gui->xml,
- wizard_pages[i].page_name);
- g_ptr_array_add (mcw->interior_pages, page);
- gtk_box_pack_start (GTK_BOX (GNOME_DRUID_PAGE_STANDARD (page)->vbox),
- get_page (mcw->gui->xml, i),
- FALSE, FALSE, 0);
- g_signal_connect (page, "back", G_CALLBACK (druid_back),
- GINT_TO_POINTER (i));
- g_signal_connect (page, "next", G_CALLBACK (druid_next),
- GINT_TO_POINTER (i));
-
- /* At least in 2.0 (and probably 2.2 too),
- * GnomeDruidPageStandard is broken and you need to
- * connect_after to "prepare" or else its default
- * method will run after your signal handler and
- * undo its button sensitivity changes.
- */
- g_signal_connect_after (page, "prepare",
- G_CALLBACK (druid_prepare),
- GINT_TO_POINTER (i));
- }
- g_signal_connect (mcw->druid, "cancel", G_CALLBACK (druid_cancel), mcw);
-
- mcw->last_page = (GnomeDruidPage *)glade_xml_get_widget (mcw->gui->xml, "finish_page");
- g_signal_connect (mcw->last_page, "finish", G_CALLBACK (druid_finish), mcw);
-
- gnome_druid_set_buttons_sensitive (mcw->druid, FALSE, TRUE, TRUE, FALSE);
- /*gtk_widget_show_all (GTK_WIDGET (mcw->druid));*/
- mail_account_gui_setup (mcw->gui, NULL);
-
- new = glade_xml_get_widget (mcw->gui->xml, "account_druid");
- gtk_window_set_type_hint ((GtkWindow *) new, GDK_WINDOW_TYPE_HINT_DIALOG);
-
- return (MailConfigDruid *) new;
-}
-
-
-/* CORBA wizard */
-
-static void
-wizard_next_cb (EvolutionWizard *wizard,
- int page_num,
- MailConfigWizard *mcw)
-{
- if (page_num >= MAIL_CONFIG_WIZARD_PAGE_MANAGEMENT)
- return;
-
- if (wizard_pages[page_num].next_func &&
- wizard_pages[page_num].next_func (mcw))
- return;
-
- evolution_wizard_set_page (wizard, page_num + 1, NULL);
-}
-
-static void
-wizard_prepare_cb (EvolutionWizard *wizard,
- int page_num,
- MailConfigWizard *mcw)
-{
- if (wizard_pages[page_num].prepare_func)
- wizard_pages[page_num].prepare_func (mcw);
-}
-
-static void
-wizard_back_cb (EvolutionWizard *wizard,
- int page_num,
- MailConfigWizard *mcw)
-{
- if (page_num >= MAIL_CONFIG_WIZARD_NUM_PAGES) {
- evolution_wizard_set_page (wizard, MAIL_CONFIG_WIZARD_PAGE_MANAGEMENT, NULL);
- return;
- }
-
- if (wizard_pages[page_num].back_func &&
- wizard_pages[page_num].back_func (mcw))
- return;
-
- if (page_num > 0)
- evolution_wizard_set_page (wizard, page_num - 1, NULL);
-}
-
-static void
-wizard_finish_cb (EvolutionWizard *wizard,
- 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;
-
- /* Write out the config info */
- mail_config_write ();
- mail_account_gui_destroy (gui);
- w->gui = NULL;
-}
-
-static void
-wizard_cancel_cb (EvolutionWizard *wizard,
- MailConfigWizard *mcw)
-{
- mail_account_gui_destroy (mcw->gui);
- mcw->gui = NULL;
-}
-
-static void
-wizard_help_cb (EvolutionWizard *wizard,
- int page_num,
- MailConfigWizard *mcw)
-{
-}
-
-BonoboObject *
-evolution_mail_config_wizard_new (void)
-{
- EvolutionWizard *wizard;
- MailConfigWizard *mcw;
- GdkPixbuf *icon;
- int i;
-
- mcw = config_wizard_new ();
- mail_account_gui_setup (mcw->gui, NULL);
-
- wizard = evolution_wizard_new ();
- for (i = 0; i < MAIL_CONFIG_WIZARD_NUM_PAGES; i++) {
- icon = gdk_pixbuf_new_from_file (wizard_pages[i].icon_path, NULL);
- evolution_wizard_add_page (wizard, _(wizard_pages[i].title),
- icon, get_page (mcw->gui->xml, i));
- g_object_unref (icon);
- }
-
- g_object_set_data_full (G_OBJECT (wizard), "MailConfigWizard",
- mcw, (GDestroyNotify)free_config_wizard);
- mcw->corba_wizard = wizard;
-
- g_signal_connect (wizard, "next", G_CALLBACK (wizard_next_cb), mcw);
- g_signal_connect (wizard, "prepare", G_CALLBACK (wizard_prepare_cb), mcw);
- g_signal_connect (wizard, "back", G_CALLBACK (wizard_back_cb), mcw);
- g_signal_connect (wizard, "finish", G_CALLBACK (wizard_finish_cb), mcw);
- g_signal_connect (wizard, "cancel", G_CALLBACK (wizard_cancel_cb), mcw);
- g_signal_connect (wizard, "help", G_CALLBACK (wizard_help_cb), mcw);
-
- return BONOBO_OBJECT (wizard);
-}
diff --git a/mail/mail-config-druid.h b/mail/mail-config-druid.h
deleted file mode 100644
index f429e98acf..0000000000
--- a/mail/mail-config-druid.h
+++ /dev/null
@@ -1,68 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_CONFIG_DRUID_H
-#define MAIL_CONFIG_DRUID_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <camel.h>
-#include <glade/glade.h>
-#include <libgnomeui/gnome-druid.h>
-#include <libgnomeui/gnome-file-entry.h>
-#include <bonobo/bonobo-listener.h>
-#include <bonobo/bonobo-control.h>
-#include <bonobo/bonobo-widget.h>
-#include <bonobo/bonobo-generic-factory.h>
-#include <bonobo/bonobo-context.h>
-#include "shell/Evolution.h"
-#include "mail-account-gui.h"
-
-typedef GtkWindow MailConfigDruid;
-
-MailConfigDruid *mail_config_druid_new (void);
-
-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);
-
-
-BonoboObject *evolution_mail_config_wizard_new (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* MAIL_CONFIG_DRUID_H */
diff --git a/mail/mail-config-factory.c b/mail/mail-config-factory.c
deleted file mode 100644
index 9a6170796a..0000000000
--- a/mail/mail-config-factory.c
+++ /dev/null
@@ -1,105 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2002 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 "em-account-prefs.h"
-#include "em-composer-prefs.h"
-#include "em-mailer-prefs.h"
-
-#include "mail-config-factory.h"
-
-#define CONFIG_CONTROL_FACTORY_ID "OAFIID:GNOME_Evolution_Mail_ConfigControlFactory:" BASE_VERSION
-
-
-typedef void (*ApplyFunc) (GtkWidget *prefs);
-
-struct _config_data {
- GtkWidget *prefs;
- ApplyFunc apply;
-};
-
-static void
-config_control_destroy_cb (struct _config_data *data, GObject *deadbeef)
-{
- g_object_unref (data->prefs);
- g_free (data);
-}
-
-static void
-config_control_apply_cb (EvolutionConfigControl *config_control, void *user_data)
-{
- struct _config_data *data = user_data;
-
- data->apply (data->prefs);
-}
-
-BonoboObject *
-mail_config_control_factory_cb (BonoboGenericFactory *factory, const char *component_id, void *user_data)
-{
- GNOME_Evolution_Shell shell = (GNOME_Evolution_Shell) user_data;
- EvolutionConfigControl *control;
- struct _config_data *data;
- GtkWidget *prefs = NULL;
-
- data = g_new (struct _config_data, 1);
-
- if (!strcmp (component_id, EM_ACCOUNT_PREFS_CONTROL_ID)) {
- prefs = em_account_prefs_new (shell);
- data->apply = (ApplyFunc) em_account_prefs_apply;
- } else if (!strcmp (component_id, EM_MAILER_PREFS_CONTROL_ID)) {
- prefs = em_mailer_prefs_new ();
- data->apply = (ApplyFunc) em_mailer_prefs_apply;
- } else if (!strcmp (component_id, EM_COMPOSER_PREFS_CONTROL_ID)) {
- prefs = em_composer_prefs_new ();
- data->apply = (ApplyFunc) em_composer_prefs_apply;
- } else {
- g_assert_not_reached ();
- }
-
- data->prefs = prefs;
- g_object_ref (prefs);
-
- gtk_widget_show_all (prefs);
-
- control = evolution_config_control_new (prefs);
-
- if (!strcmp (component_id, EM_ACCOUNT_PREFS_CONTROL_ID)) {
- /* nothing to do here... */
- } else if (!strcmp (component_id, EM_MAILER_PREFS_CONTROL_ID)) {
- EM_MAILER_PREFS (prefs)->control = control;
- } else if (!strcmp (component_id, EM_COMPOSER_PREFS_CONTROL_ID)) {
- EM_COMPOSER_PREFS (prefs)->control = control;
- } else {
- g_assert_not_reached ();
- }
-
- g_signal_connect (control, "apply", G_CALLBACK (config_control_apply_cb), data);
- g_object_weak_ref ((GObject *) control, (GWeakNotify) config_control_destroy_cb, data);
-
- return BONOBO_OBJECT (control);
-}
diff --git a/mail/mail-config-factory.h b/mail/mail-config-factory.h
deleted file mode 100644
index e726a51976..0000000000
--- a/mail/mail-config-factory.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2002-2003 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_FACTORY_H__
-#define __MAIL_CONFIG_FACTORY_H__
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <bonobo/bonobo-generic-factory.h>
-#include "evolution-config-control.h"
-
-#include <shell/Evolution.h>
-
-gboolean mail_config_register_factory (GNOME_Evolution_Shell shell);
-
-BonoboObject *mail_config_control_factory_cb (BonoboGenericFactory *factory, const char *component_id, void *user_data);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __MAIL_CONFIG_FACTORY_H__ */
diff --git a/mail/mail-config.c b/mail/mail-config.c
deleted file mode 100644
index 6fa378e25b..0000000000
--- a/mail/mail-config.c
+++ /dev/null
@@ -1,1524 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- * Radek Doulik <rodo@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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <pwd.h>
-#include <ctype.h>
-#include <sys/wait.h>
-#include <signal.h>
-#include <errno.h>
-#include <string.h>
-
-#include <glib.h>
-#include <gtk/gtkdialog.h>
-#include <gtkhtml/gtkhtml.h>
-#include <glade/glade.h>
-
-#include <libxml/tree.h>
-#include <libxml/parser.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 <gal/util/e-util.h>
-#include <gal/widgets/e-gui-utils.h>
-#include <e-util/e-url.h>
-#include <e-util/e-passwords.h>
-
-#include "mail.h"
-#include "mail-component.h"
-#include "mail-config.h"
-#include "mail-mt.h"
-#include "mail-tools.h"
-
-/* Note, the first element of each MailConfigLabel must NOT be translated */
-MailConfigLabel label_defaults[5] = {
- { "important", N_("Important"), "#ff0000" }, /* red */
- { "work", N_("Work"), "#ff8c00" }, /* orange */
- { "personal", N_("Personal"), "#008b00" }, /* forest green */
- { "todo", N_("To Do"), "#0000ff" }, /* blue */
- { "later", N_("Later"), "#8b008b" } /* magenta */
-};
-
-typedef struct {
- GConfClient *gconf;
-
- gboolean corrupt;
-
- EAccountList *accounts;
-
- GSList *signatures;
- int sig_nextid;
- gboolean signature_info;
-
- GSList *labels;
- guint label_notify_id;
-
- guint font_notify_id;
- guint spell_notify_id;
-
- GPtrArray *mime_types;
- guint mime_types_notify_id;
-} MailConfig;
-
-static MailConfig *config = NULL;
-static guint config_write_timeout = 0;
-
-#define MAIL_CONFIG_RC "/gtkrc-mail-fonts"
-
-/* signatures */
-MailConfigSignature *
-signature_copy (const MailConfigSignature *sig)
-{
- MailConfigSignature *ns;
-
- g_return_val_if_fail (sig != NULL, NULL);
-
- ns = g_new (MailConfigSignature, 1);
-
- ns->id = sig->id;
- ns->name = g_strdup (sig->name);
- ns->filename = g_strdup (sig->filename);
- ns->script = g_strdup (sig->script);
- ns->html = sig->html;
-
- return ns;
-}
-
-void
-signature_destroy (MailConfigSignature *sig)
-{
- g_free (sig->name);
- g_free (sig->filename);
- g_free (sig->script);
- g_free (sig);
-}
-
-static char *
-xml_get_prop (xmlNodePtr node, const char *name)
-{
- char *buf, *val;
-
- buf = xmlGetProp (node, name);
- val = g_strdup (buf);
- xmlFree (buf);
-
- return val;
-}
-
-static char *
-xml_get_content (xmlNodePtr node)
-{
- char *buf, *val;
-
- buf = xmlNodeGetContent (node);
- val = g_strdup (buf);
- xmlFree (buf);
-
- return val;
-}
-
-void
-mail_config_save_accounts (void)
-{
- e_account_list_save (config->accounts);
-}
-
-static MailConfigSignature *
-signature_new_from_xml (char *in, int id)
-{
- MailConfigSignature *sig;
- xmlNodePtr node, cur;
- xmlDocPtr doc;
- char *buf;
-
- if (!(doc = xmlParseDoc (in)))
- return NULL;
-
- node = doc->children;
- if (strcmp (node->name, "signature") != 0) {
- xmlFreeDoc (doc);
- return NULL;
- }
-
- sig = g_new0 (MailConfigSignature, 1);
- sig->name = xml_get_prop (node, "name");
- sig->id = id;
-
- buf = xml_get_prop (node, "format");
- if (!strcmp (buf, "text/html"))
- sig->html = TRUE;
- else
- sig->html = FALSE;
- g_free (buf);
-
- cur = node->children;
- while (cur) {
- if (!strcmp (cur->name, "filename")) {
- g_free (sig->filename);
- sig->filename = xml_get_content (cur);
- } else if (!strcmp (cur->name, "script")) {
- g_free (sig->script);
- sig->script = xml_get_content (cur);
- }
-
- cur = cur->next;
- }
-
- xmlFreeDoc (doc);
-
- return sig;
-}
-
-static void
-config_read_signatures (void)
-{
- GSList *list, *l, *tail, *n;
- int i = 0;
-
- config->signatures = NULL;
-
- tail = NULL;
- list = gconf_client_get_list (config->gconf, "/apps/evolution/mail/signatures",
- GCONF_VALUE_STRING, NULL);
-
- l = list;
- while (l != NULL) {
- MailConfigSignature *sig;
-
- if ((sig = signature_new_from_xml ((char *) l->data, i++))) {
- n = g_slist_alloc ();
- n->next = NULL;
- n->data = sig;
-
- if (tail == NULL)
- config->signatures = n;
- else
- tail->next = n;
- tail = n;
- }
-
- n = l->next;
- g_slist_free_1 (l);
- l = n;
- }
-
- config->sig_nextid = i + 1;
-}
-
-static char *
-signature_to_xml (MailConfigSignature *sig)
-{
- char *xmlbuf, *tmp;
- xmlNodePtr root;
- xmlDocPtr doc;
- int n;
-
- doc = xmlNewDoc ("1.0");
-
- root = xmlNewDocNode (doc, NULL, "signature", NULL);
- xmlDocSetRootElement (doc, root);
-
- xmlSetProp (root, "name", sig->name);
- xmlSetProp (root, "format", sig->html ? "text/html" : "text/plain");
-
- if (sig->filename)
- xmlNewTextChild (root, NULL, "filename", sig->filename);
-
- if (sig->script)
- xmlNewTextChild (root, NULL, "script", sig->script);
-
- xmlDocDumpMemory (doc, (xmlChar **) &xmlbuf, &n);
- xmlFreeDoc (doc);
-
- /* remap to glib memory */
- tmp = g_malloc (n + 1);
- memcpy (tmp, xmlbuf, n);
- tmp[n] = '\0';
- xmlFree (xmlbuf);
-
- return tmp;
-}
-
-static void
-config_write_signatures (void)
-{
- GSList *list, *tail, *n, *l;
- char *xmlbuf;
-
- list = NULL;
- tail = NULL;
-
- l = config->signatures;
- while (l != NULL) {
- if ((xmlbuf = signature_to_xml ((MailConfigSignature *) l->data))) {
- n = g_slist_alloc ();
- n->data = xmlbuf;
- n->next = NULL;
-
- if (tail == NULL)
- list = n;
- else
- tail->next = n;
- tail = n;
- }
-
- l = l->next;
- }
-
- gconf_client_set_list (config->gconf, "/apps/evolution/mail/signatures", GCONF_VALUE_STRING, list, NULL);
-
- l = list;
- while (l != NULL) {
- n = l->next;
- g_free (l->data);
- g_slist_free_1 (l);
- l = n;
- }
-
- gconf_client_suggest_sync (config->gconf, NULL);
-}
-
-static void
-config_clear_labels (void)
-{
- MailConfigLabel *label;
- GSList *list, *n;
-
- list = config->labels;
- while (list != NULL) {
- label = list->data;
- g_free(label->tag);
- g_free (label->name);
- g_free (label->colour);
- g_free (label);
-
- n = list->next;
- g_slist_free_1 (list);
- list = n;
- }
-
- config->labels = NULL;
-}
-
-static void
-config_cache_labels (void)
-{
- GSList *labels, *list, *tail, *n;
- MailConfigLabel *label;
- char *buf, *colour;
- int num = 0;
-
- tail = labels = NULL;
-
- list = gconf_client_get_list (config->gconf, "/apps/evolution/mail/labels", GCONF_VALUE_STRING, NULL);
-
- while (list != NULL) {
- buf = list->data;
-
- if (num < 5 && (colour = strrchr (buf, ':'))) {
- label = g_new (MailConfigLabel, 1);
-
- *colour++ = '\0';
- label->tag = g_strdup(label_defaults[num].tag);
- label->name = g_strdup (buf);
- label->colour = g_strdup (colour);
-
- n = g_slist_alloc ();
- n->next = NULL;
- n->data = label;
-
- if (tail == NULL)
- labels = n;
- else
- tail->next = n;
-
- tail = n;
-
- num++;
- }
-
- g_free (buf);
-
- n = list->next;
- g_slist_free_1 (list);
- list = n;
- }
-
- while (num < 5) {
- /* complete the list with defaults */
- label = g_new (MailConfigLabel, 1);
- label->tag = g_strdup (label_defaults[num].tag);
- label->name = g_strdup (_(label_defaults[num].name));
- label->colour = g_strdup (label_defaults[num].colour);
-
- n = g_slist_alloc ();
- n->next = NULL;
- n->data = label;
-
- if (tail == NULL)
- labels = n;
- else
- tail->next = n;
-
- tail = n;
-
- num++;
- }
-
- config->labels = labels;
-}
-
-static void
-config_clear_mime_types (void)
-{
- int i;
-
- for (i = 0; i < config->mime_types->len; i++)
- g_free (config->mime_types->pdata[i]);
-
- g_ptr_array_set_size (config->mime_types, 0);
-}
-
-static void
-config_cache_mime_types (void)
-{
- GSList *n, *nn;
-
- n = gconf_client_get_list (config->gconf, "/apps/evolution/mail/display/mime_types", GCONF_VALUE_STRING, NULL);
- while (n != NULL) {
- nn = n->next;
- g_ptr_array_add (config->mime_types, n->data);
- g_slist_free_1 (n);
- n = nn;
- }
-
- g_ptr_array_add (config->mime_types, NULL);
-}
-
-#define CONFIG_GET_SPELL_VALUE(t,x,prop,f,c) G_STMT_START { \
- val = gconf_client_get_without_default (config->gconf, "/GNOME/Spell" x, NULL); \
- if (val) { f; prop = c (gconf_value_get_ ## t (val)); \
- gconf_value_free (val); } } G_STMT_END
-
-static void
-config_write_style (void)
-{
- GConfValue *val;
- char *filename;
- FILE *rc;
- gboolean custom;
- char *fix_font;
- char *var_font;
- gint red = 0xffff, green = 0, blue = 0;
-
- /*
- * This is the wrong way to get the path but it needs to
- * always be the same as the gtk_rc_parse call and evolution_dir
- * may not have been set yet
- *
- * filename = g_build_filename (evolution_dir, MAIL_CONFIG_RC, NULL);
- *
- * EPFIXME this kludge needs to go away.
- */
- filename = g_build_filename (g_get_home_dir (), "evolution", MAIL_CONFIG_RC, NULL);
-
- rc = fopen (filename, "w");
-
- if (!rc) {
- g_warning ("unable to open %s", filename);
- g_free (filename);
- return;
- }
- g_free (filename);
-
- custom = gconf_client_get_bool (config->gconf, "/apps/evolution/mail/display/fonts/use_custom", NULL);
- var_font = gconf_client_get_string (config->gconf, "/apps/evolution/mail/display/fonts/variable", NULL);
- fix_font = gconf_client_get_string (config->gconf, "/apps/evolution/mail/display/fonts/monospace", NULL);
-
- CONFIG_GET_SPELL_VALUE (int, "/spell_error_color_red", red, (void)0, (int));
- CONFIG_GET_SPELL_VALUE (int, "/spell_error_color_green", green, (void)0, (int));
- CONFIG_GET_SPELL_VALUE (int, "/spell_error_color_blue", blue, (void)0, (int));
-
- fprintf (rc, "style \"evolution-mail-custom-fonts\" {\n");
- fprintf (rc, " GtkHTML::spell_error_color = \"#%02x%02x%02x\"\n",
- 0xff & (red >> 8), 0xff & (green >> 8), 0xff & (blue >> 8));
-
- if (custom && var_font && fix_font) {
- fprintf (rc,
- " GtkHTML::fixed_font_name = \"%s\"\n"
- " font_name = \"%s\"\n",
- fix_font, var_font);
- }
- fprintf (rc, "}\n\n");
-
- fprintf (rc, "widget \"*.MailDisplay.*.GtkHTML\" style \"evolution-mail-custom-fonts\"\n");
- fprintf (rc, "widget \"*.FolderBrowser.*.GtkHTML\" style \"evolution-mail-custom-fonts\"\n");
- fprintf (rc, "widget \"*.BonoboPlug.*.GtkHTML\" style \"evolution-mail-custom-fonts\"\n");
- fprintf (rc, "widget \"*.EvolutionMailPrintHTMLWidget\" style \"evolution-mail-custom-fonts\"\n");
-
- if (fclose (rc) == 0)
- gtk_rc_reparse_all ();
-}
-
-static void
-gconf_labels_changed (GConfClient *client, guint cnxn_id,
- GConfEntry *entry, gpointer user_data)
-{
- config_clear_labels ();
- config_cache_labels ();
-}
-
-static void
-gconf_style_changed (GConfClient *client, guint cnxn_id,
- GConfEntry *entry, gpointer user_data)
-{
- config_write_style ();
-}
-
-static void
-gconf_mime_types_changed (GConfClient *client, guint cnxn_id,
- GConfEntry *entry, gpointer user_data)
-{
- config_clear_mime_types ();
- config_cache_mime_types ();
-}
-
-/* Config struct routines */
-void
-mail_config_init (void)
-{
- char *filename;
-
- if (config)
- return;
-
- config = g_new0 (MailConfig, 1);
- config->gconf = gconf_client_get_default ();
- config->mime_types = g_ptr_array_new ();
-
- mail_config_clear ();
-
- /*
- EPFIXME: This kludge needs to go away.
- filename = g_build_filename (evolution_dir, MAIL_CONFIG_RC, NULL);
- */
- filename = g_build_filename (g_get_home_dir (), "evolution", MAIL_CONFIG_RC, NULL);
- gtk_rc_parse (filename);
- g_free (filename);
-
- gconf_client_add_dir (config->gconf, "/apps/evolution/mail/display/fonts",
- GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
- gconf_client_add_dir (config->gconf, "/GNOME/Spell",
- GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
- config->font_notify_id = gconf_client_notify_add (config->gconf, "/apps/evolution/mail/display/fonts",
- gconf_style_changed, NULL, NULL, NULL);
- config->spell_notify_id = gconf_client_notify_add (config->gconf, "/GNOME/Spell",
- gconf_style_changed, NULL, NULL, NULL);
-
- gconf_client_add_dir (config->gconf, "/apps/evolution/mail/labels",
- GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
- config->label_notify_id =
- gconf_client_notify_add (config->gconf, "/apps/evolution/mail/labels",
- gconf_labels_changed, NULL, NULL, NULL);
-
- gconf_client_add_dir (config->gconf, "/apps/evolution/mail/mime_types",
- GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
- config->mime_types_notify_id =
- gconf_client_notify_add (config->gconf, "/apps/evolution/mail/mime_types",
- gconf_mime_types_changed, NULL, NULL, NULL);
-
- config_cache_labels ();
- config_read_signatures ();
- config_cache_mime_types ();
-
- config->accounts = e_account_list_new (config->gconf);
-}
-
-void
-mail_config_clear (void)
-{
- if (!config)
- return;
-
- if (config->accounts) {
- g_object_unref (config->accounts);
- config->accounts = NULL;
- }
-
- config_clear_labels ();
- config_clear_mime_types ();
-}
-
-void
-mail_config_write_account_sig (EAccount *account, int id)
-{
- /* FIXME: what is this supposed to do? */
- ;
-}
-
-void
-mail_config_write (void)
-{
- if (!config)
- return;
-
- config_write_signatures ();
- e_account_list_save (config->accounts);
-
- gconf_client_suggest_sync (config->gconf, NULL);
-}
-
-void
-mail_config_write_on_exit (void)
-{
- EAccount *account;
- EIterator *iter;
-
- if (config_write_timeout) {
- g_source_remove (config_write_timeout);
- config_write_timeout = 0;
- mail_config_write ();
- }
-
- /* Passwords */
-
- /* then we make sure the ones we want to remember are in the
- session cache */
- iter = e_list_get_iterator ((EList *) config->accounts);
- while (e_iterator_is_valid (iter)) {
- char *passwd;
-
- account = (EAccount *) e_iterator_get (iter);
-
- if (account->source->save_passwd && account->source->url) {
- passwd = mail_session_get_password (account->source->url);
- mail_session_forget_password (account->source->url);
- mail_session_add_password (account->source->url, passwd);
- g_free (passwd);
- }
-
- if (account->transport->save_passwd && account->transport->url) {
- passwd = mail_session_get_password (account->transport->url);
- mail_session_forget_password (account->transport->url);
- mail_session_add_password (account->transport->url, passwd);
- g_free (passwd);
- }
-
- e_iterator_next (iter);
- }
-
- g_object_unref (iter);
-
- /* then we clear out our component passwords */
- e_passwords_clear_component_passwords ("Mail");
-
- /* then we remember them */
- iter = e_list_get_iterator ((EList *) config->accounts);
- while (e_iterator_is_valid (iter)) {
- account = (EAccount *) e_iterator_get (iter);
-
- 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);
-
- e_iterator_next (iter);
- }
-
- /* now do cleanup */
- mail_config_clear ();
-
- g_object_unref (config->gconf);
- g_ptr_array_free (config->mime_types, TRUE);
-
- g_free (config);
-}
-
-/* Accessor functions */
-GConfClient *
-mail_config_get_gconf_client (void)
-{
- return config->gconf;
-}
-
-gboolean
-mail_config_is_configured (void)
-{
- return e_list_length ((EList *) config->accounts) > 0;
-}
-
-gboolean
-mail_config_is_corrupt (void)
-{
- return config->corrupt;
-}
-
-GSList *
-mail_config_get_labels (void)
-{
- return config->labels;
-}
-
-const char *
-mail_config_get_label_color_by_name (const char *name)
-{
- MailConfigLabel *label;
- GSList *node;
-
- node = config->labels;
- while (node != NULL) {
- label = node->data;
- if (!strcmp (label->tag, name))
- return label->colour;
- node = node->next;
- }
-
- return NULL;
-}
-
-const char *
-mail_config_get_label_color_by_index (int index)
-{
- MailConfigLabel *label;
-
- label = g_slist_nth_data (config->labels, index);
-
- if (label)
- return label->colour;
-
- return NULL;
-}
-
-const char **
-mail_config_get_allowable_mime_types (void)
-{
- return (const char **) config->mime_types->pdata;
-}
-
-gboolean
-mail_config_find_account (EAccount *account)
-{
- EAccount *acnt;
- EIterator *iter;
-
- iter = e_list_get_iterator ((EList *) config->accounts);
- while (e_iterator_is_valid (iter)) {
- acnt = (EAccount *) e_iterator_get (iter);
- if (acnt == account) {
- g_object_unref (iter);
- return TRUE;
- }
-
- e_iterator_next (iter);
- }
-
- g_object_unref (iter);
-
- return FALSE;
-}
-
-EAccount *
-mail_config_get_default_account (void)
-{
- if (config == NULL)
- mail_config_init ();
-
- if (!config->accounts)
- return NULL;
-
- /* should probably return const */
- return (EAccount *)e_account_list_get_default(config->accounts);
-}
-
-EAccount *
-mail_config_get_account_by_name (const char *account_name)
-{
- return (EAccount *)e_account_list_find(config->accounts, E_ACCOUNT_FIND_NAME, account_name);
-}
-
-EAccount *
-mail_config_get_account_by_uid (const char *uid)
-{
- return (EAccount *) e_account_list_find (config->accounts, E_ACCOUNT_FIND_UID, uid);
-}
-
-EAccount *
-mail_config_get_account_by_source_url (const char *source_url)
-{
- CamelProvider *provider;
- EAccount *account;
- CamelURL *source;
- EIterator *iter;
-
- 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;
-
- iter = e_list_get_iterator ((EList *) config->accounts);
- while (e_iterator_is_valid (iter)) {
- account = (EAccount *) e_iterator_get (iter);
-
- if (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);
- g_object_unref (iter);
-
- return account;
- }
-
- if (url)
- camel_url_free (url);
- }
-
- e_iterator_next (iter);
- }
-
- g_object_unref (iter);
-
- camel_url_free (source);
-
- return NULL;
-}
-
-EAccount *
-mail_config_get_account_by_transport_url (const char *transport_url)
-{
- CamelProvider *provider;
- CamelURL *transport;
- EAccount *account;
- EIterator *iter;
-
- 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;
-
- iter = e_list_get_iterator ((EList *) config->accounts);
- while (e_iterator_is_valid (iter)) {
- account = (EAccount *) e_iterator_get (iter);
-
- if (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);
- g_object_unref (iter);
-
- return account;
- }
-
- if (url)
- camel_url_free (url);
- }
-
- e_iterator_next (iter);
- }
-
- g_object_unref (iter);
-
- camel_url_free (transport);
-
- return NULL;
-}
-
-EAccountList *
-mail_config_get_accounts (void)
-{
- g_assert (config != NULL);
-
- return config->accounts;
-}
-
-void
-mail_config_add_account (EAccount *account)
-{
- e_account_list_add(config->accounts, account);
- mail_config_save_accounts ();
-}
-
-void
-mail_config_remove_account (EAccount *account)
-{
- e_account_list_remove(config->accounts, account);
- mail_config_save_accounts ();
-}
-
-void
-mail_config_set_default_account (EAccount *account)
-{
- e_account_list_set_default(config->accounts, account);
-}
-
-EAccountIdentity *
-mail_config_get_default_identity (void)
-{
- EAccount *account;
-
- account = mail_config_get_default_account ();
- if (account)
- return account->id;
- else
- return NULL;
-}
-
-EAccountService *
-mail_config_get_default_transport (void)
-{
- EAccount *account;
- EIterator *iter;
-
- account = mail_config_get_default_account ();
- if (account && account->transport && account->transport->url)
- return account->transport;
-
- /* return the first account with a transport? */
- iter = e_list_get_iterator ((EList *) config->accounts);
- while (e_iterator_is_valid (iter)) {
- account = (EAccount *) e_iterator_get (iter);
-
- if (account->transport && account->transport->url) {
- g_object_unref (iter);
-
- return account->transport;
- }
-
- e_iterator_next (iter);
- }
-
- g_object_unref (iter);
-
- return NULL;
-}
-
-static char *
-uri_to_evname (const char *uri, const char *prefix)
-{
- const char *base_directory = mail_component_peek_base_directory (mail_component_peek ());
- char *safe;
- char *tmp;
-
- safe = g_strdup (uri);
- e_filename_make_safe (safe);
- /* blah, easiest thing to do */
- if (prefix[0] == '*')
- tmp = g_strdup_printf ("%s/mail/%s%s.xml", base_directory, prefix + 1, safe);
- else
- tmp = g_strdup_printf ("%s/mail/%s%s", base_directory, prefix, safe);
- g_free (safe);
- return tmp;
-}
-
-void
-mail_config_uri_renamed (GCompareFunc uri_cmp, const char *old, const char *new)
-{
- EAccount *account;
- EIterator *iter;
- int i, work = 0;
- char *oldname, *newname;
- char *cachenames[] = { "config/hidestate-",
- "config/et-expanded-",
- "config/et-header-",
- "*views/current_view-",
- "*views/custom_view-",
- NULL };
-
- iter = e_list_get_iterator ((EList *) config->accounts);
- while (e_iterator_is_valid (iter)) {
- account = (EAccount *) e_iterator_get (iter);
-
- if (account->sent_folder_uri && uri_cmp (account->sent_folder_uri, old)) {
- g_free (account->sent_folder_uri);
- account->sent_folder_uri = g_strdup (new);
- work = 1;
- }
-
- if (account->drafts_folder_uri && uri_cmp (account->drafts_folder_uri, old)) {
- g_free (account->drafts_folder_uri);
- account->drafts_folder_uri = g_strdup (new);
- work = 1;
- }
-
- e_iterator_next (iter);
- }
-
- g_object_unref (iter);
-
- /* ignore return values or if the files exist or
- * not, doesn't matter */
-
- for (i = 0; cachenames[i]; i++) {
- oldname = uri_to_evname (old, cachenames[i]);
- newname = uri_to_evname (new, cachenames[i]);
- /*printf ("** renaming %s to %s\n", oldname, newname);*/
- rename (oldname, newname);
- g_free (oldname);
- g_free (newname);
- }
-
- /* nasty ... */
- if (work)
- mail_config_write ();
-}
-
-void
-mail_config_uri_deleted (GCompareFunc uri_cmp, const char *uri)
-{
- EAccount *account;
- EIterator *iter;
- int work = 0;
- /* assumes these can't be removed ... */
- extern char *default_sent_folder_uri, *default_drafts_folder_uri;
-
- iter = e_list_get_iterator ((EList *) config->accounts);
- while (e_iterator_is_valid (iter)) {
- account = (EAccount *) e_iterator_get (iter);
-
- if (account->sent_folder_uri && uri_cmp (account->sent_folder_uri, uri)) {
- g_free (account->sent_folder_uri);
- account->sent_folder_uri = g_strdup (default_sent_folder_uri);
- work = 1;
- }
-
- if (account->drafts_folder_uri && uri_cmp (account->drafts_folder_uri, uri)) {
- g_free (account->drafts_folder_uri);
- account->drafts_folder_uri = g_strdup (default_drafts_folder_uri);
- work = 1;
- }
-
- e_iterator_next (iter);
- }
-
- /* nasty again */
- if (work)
- mail_config_write ();
-}
-
-void
-mail_config_service_set_save_passwd (EAccountService *service, gboolean save_passwd)
-{
- service->save_passwd = save_passwd;
-}
-
-char *
-mail_config_folder_to_safe_url (CamelFolder *folder)
-{
- char *url;
-
- url = mail_tools_folder_to_url (folder);
- e_filename_make_safe (url);
-
- return url;
-}
-
-char *
-mail_config_folder_to_cachename (CamelFolder *folder, const char *prefix)
-{
- char *url, *basename, *filename;
- const char *evolution_dir;
-
- evolution_dir = mail_component_peek_base_directory (mail_component_peek ());
-
- url = mail_config_folder_to_safe_url (folder);
- basename = g_strdup_printf ("%s%s", prefix, url);
- filename = g_build_filename (evolution_dir, "mail", "config", basename, NULL);
- g_free (basename);
- 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 (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_response (GtkDialog *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, GtkWindow *window)
-{
- static GtkWidget *dialog = NULL;
- gboolean ret = FALSE;
- struct _check_msg *m;
- GtkWidget *label;
- int id;
-
- if (dialog) {
- gdk_window_raise (dialog->window);
- *authtypes = NULL;
- return FALSE;
- }
-
- 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_new, (EMsg *)m);
-
- dialog = gtk_dialog_new_with_buttons(_("Connecting to server..."), window,
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- NULL);
- label = gtk_label_new (_("Connecting to server..."));
- gtk_box_pack_start (GTK_BOX(GTK_DIALOG (dialog)->vbox),
- label, TRUE, TRUE, 10);
- g_signal_connect(dialog, "response", G_CALLBACK (check_response), &id);
- gtk_widget_show_all (dialog);
-
- mail_msg_wait(id);
-
- gtk_widget_destroy (dialog);
- dialog = NULL;
-
- return ret;
-}
-
-static gboolean
-do_config_write (gpointer data)
-{
- config_write_timeout = 0;
- mail_config_write ();
- return FALSE;
-}
-
-GSList *
-mail_config_get_signature_list (void)
-{
- return config->signatures;
-}
-
-static char *
-get_new_signature_filename (void)
-{
- const char *base_directory;
- char *filename, *id;
- struct stat st;
- int i;
-
- base_directory = mail_component_peek_base_directory (mail_component_peek ());
- filename = g_build_filename (base_directory, "signatures", NULL);
- if (lstat (filename, &st)) {
- if (errno == ENOENT) {
- if (mkdir (filename, 0700))
- g_warning ("Fatal problem creating %s directory.", filename);
- } else
- g_warning ("Fatal problem with %s directory.", filename);
- }
- g_free (filename);
-
- filename = g_malloc (strlen (base_directory) + sizeof ("/signatures/signature-") + 12);
- id = g_stpcpy (filename, base_directory);
- id = g_stpcpy (id, "/signatures/signature-");
-
- for (i = 0; i < (INT_MAX - 1); i++) {
- sprintf (id, "%d", i);
- if (lstat (filename, &st) == -1 && errno == ENOENT) {
- int fd;
-
- fd = creat (filename, 0600);
- if (fd >= 0) {
- close (fd);
- return filename;
- }
- }
- }
-
- g_free (filename);
-
- return NULL;
-}
-
-
-MailConfigSignature *
-mail_config_signature_new (gboolean html, const char *script)
-{
- MailConfigSignature *sig;
-
- sig = g_new0 (MailConfigSignature, 1);
-
- sig->id = config->sig_nextid++;
- sig->name = g_strdup (_("Unnamed"));
- if (script)
- sig->script = g_strdup (script);
- else
- sig->filename = get_new_signature_filename ();
- sig->html = html;
-
- return sig;
-}
-
-
-void
-mail_config_signature_add (MailConfigSignature *sig)
-{
- g_assert (g_slist_find (config->signatures, sig) == NULL);
-
- config->signatures = g_slist_append (config->signatures, sig);
- config_write_signatures ();
- mail_config_signature_emit_event (MAIL_CONFIG_SIG_EVENT_ADDED, sig);
-}
-
-static void
-delete_unused_signature_file (const char *filename)
-{
- char *signatures_dir;
- int len;
-
- signatures_dir = g_strconcat (mail_component_peek_base_directory (mail_component_peek ()),
- "/signatures", NULL);
-
- /* remove signature file if it's in evolution dir and no other signature uses it */
- len = strlen (signatures_dir);
- if (filename && !strncmp (filename, signatures_dir, len)) {
- gboolean only_one = TRUE;
- GSList *node;
-
- node = config->signatures;
- while (node != NULL) {
- MailConfigSignature *sig = node->data;
-
- if (sig->filename && !strcmp (filename, sig->filename)) {
- only_one = FALSE;
- break;
- }
-
- node = node->next;
- }
-
- if (only_one)
- unlink (filename);
- }
-
- g_free (signatures_dir);
-}
-
-void
-mail_config_signature_delete (MailConfigSignature *sig)
-{
- EAccount *account;
- EIterator *iter;
- GSList *node, *next;
- gboolean after = FALSE;
- int index;
-
- index = g_slist_index (config->signatures, sig);
-
- iter = e_list_get_iterator ((EList *) config->accounts);
- while (e_iterator_is_valid (iter)) {
- account = (EAccount *) e_iterator_get (iter);
-
- if (account->id->def_signature == index)
- account->id->def_signature = -1;
- else if (account->id->def_signature > index)
- account->id->def_signature--;
-
- e_iterator_next (iter);
- }
-
- g_object_unref (iter);
-
- node = config->signatures;
- while (node != NULL) {
- next = node->next;
-
- if (after) {
- ((MailConfigSignature *) node->data)->id--;
- } else if (node->data == sig) {
- config->signatures = g_slist_remove_link (config->signatures, node);
- config->sig_nextid--;
- after = TRUE;
- }
-
- node = next;
- }
-
- config_write_signatures ();
- delete_unused_signature_file (sig->filename);
- /* printf ("signatures: %d\n", config->signatures); */
- mail_config_signature_emit_event (MAIL_CONFIG_SIG_EVENT_DELETED, sig);
- signature_destroy (sig);
-}
-
-void
-mail_config_signature_set_filename (MailConfigSignature *sig, const char *filename)
-{
- char *old_filename = sig->filename;
-
- sig->filename = g_strdup (filename);
- if (old_filename) {
- delete_unused_signature_file (old_filename);
- g_free (old_filename);
- }
- config_write_signatures ();
-}
-
-void
-mail_config_signature_set_name (MailConfigSignature *sig, const char *name)
-{
- g_free (sig->name);
- sig->name = g_strdup (name);
-
- config_write_signatures ();
-
- mail_config_signature_emit_event (MAIL_CONFIG_SIG_EVENT_NAME_CHANGED, sig);
-}
-
-static GList *clients = NULL;
-
-/* uh...the following code is snot. this needs to be fixed. I just don't feel like doing it right now. */
-
-void
-mail_config_signature_register_client (MailConfigSignatureClient client, gpointer data)
-{
- clients = g_list_append (clients, client);
- clients = g_list_append (clients, data);
-}
-
-void
-mail_config_signature_unregister_client (MailConfigSignatureClient client, gpointer data)
-{
- GList *link;
-
- if ((link = g_list_find (clients, data)) != NULL) {
- clients = g_list_remove_link (clients, link->prev);
- clients = g_list_remove_link (clients, link);
- }
-}
-
-void
-mail_config_signature_emit_event (MailConfigSigEvent event, MailConfigSignature *sig)
-{
- GList *l, *next;
-
- for (l = clients; l; l = next) {
- next = l->next->next;
- (*((MailConfigSignatureClient) l->data)) (event, sig, l->next->data);
- }
-}
-
-gchar *
-mail_config_signature_run_script (gchar *script)
-{
- int result, status;
- int in_fds[2];
- pid_t pid;
-
- if (pipe (in_fds) == -1) {
- g_warning ("Failed to create pipe to '%s': %s", script, g_strerror (errno));
- return NULL;
- }
-
- if (!(pid = fork ())) {
- /* child process */
- int maxfd, i;
-
- close (in_fds [0]);
- if (dup2 (in_fds[1], STDOUT_FILENO) < 0)
- _exit (255);
- close (in_fds [1]);
-
- setsid ();
-
- maxfd = sysconf (_SC_OPEN_MAX);
- for (i = 3; i < maxfd; i++) {
- if (i != STDIN_FILENO && i != STDOUT_FILENO && i != STDERR_FILENO)
- fcntl (i, F_SETFD, FD_CLOEXEC);
- }
-
- execlp (script, script, NULL);
- g_warning ("Could not execute %s: %s\n", script, g_strerror (errno));
- _exit (255);
- } else if (pid < 0) {
- g_warning ("Failed to create create child process '%s': %s", script, g_strerror (errno));
- return NULL;
- } else {
- CamelStreamFilter *filtered_stream;
- CamelStreamMem *memstream;
- CamelMimeFilter *charenc;
- CamelStream *stream;
- GByteArray *buffer;
- char *charset;
- char *content;
-
- /* parent process */
- close (in_fds[1]);
-
- stream = camel_stream_fs_new_with_fd (in_fds[0]);
-
- memstream = (CamelStreamMem *) camel_stream_mem_new ();
- buffer = g_byte_array_new ();
- camel_stream_mem_set_byte_array (memstream, buffer);
-
- camel_stream_write_to_stream (stream, (CamelStream *) memstream);
- camel_object_unref (stream);
-
- /* signature scripts are supposed to generate UTF-8 content, but because users
- are known to not ever read the manual... we try to do our best if the
- content isn't valid UTF-8 by assuming that the content is in the user's
- preferred charset. */
- if (!g_utf8_validate (buffer->data, buffer->len, NULL)) {
- stream = (CamelStream *) memstream;
- memstream = (CamelStreamMem *) camel_stream_mem_new ();
- camel_stream_mem_set_byte_array (memstream, g_byte_array_new ());
-
- filtered_stream = camel_stream_filter_new_with_stream (stream);
- camel_object_unref (stream);
-
- charset = gconf_client_get_string (config->gconf, "/apps/evolution/mail/composer/charset", NULL);
- charenc = (CamelMimeFilter *) camel_mime_filter_charset_new_convert (charset, "utf-8");
- camel_stream_filter_add (filtered_stream, charenc);
- camel_object_unref (charenc);
- g_free (charset);
-
- camel_stream_write_to_stream ((CamelStream *) filtered_stream, (CamelStream *) memstream);
- camel_object_unref (filtered_stream);
- g_byte_array_free (buffer, TRUE);
-
- buffer = memstream->buffer;
- }
-
- camel_object_unref (memstream);
-
- g_byte_array_append (buffer, "", 1);
- content = buffer->data;
- g_byte_array_free (buffer, FALSE);
-
- /* wait for the script process to terminate */
- result = waitpid (pid, &status, 0);
-
- if (result == -1 && errno == EINTR) {
- /* child process is hanging... */
- kill (pid, SIGTERM);
- sleep (1);
- result = waitpid (pid, &status, WNOHANG);
- if (result == 0) {
- /* ...still hanging, set phasers to KILL */
- kill (pid, SIGKILL);
- sleep (1);
- result = waitpid (pid, &status, WNOHANG);
- }
- }
-
- return content;
- }
-}
-
-void
-mail_config_signature_set_html (MailConfigSignature *sig, gboolean html)
-{
- if (sig->html != html) {
- sig->html = html;
- config_write_signatures ();
- mail_config_signature_emit_event (MAIL_CONFIG_SIG_EVENT_HTML_CHANGED, sig);
- }
-}
diff --git a/mail/mail-config.glade b/mail/mail-config.glade
deleted file mode 100644
index 7b451f0a56..0000000000
--- a/mail/mail-config.glade
+++ /dev/null
@@ -1,6020 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-<requires lib="gnome"/>
-
-<widget class="GtkWindow" id="account_druid">
- <property name="title" translatable="yes">Evolution Account Assistant</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
-
- <child>
- <widget class="GnomeDruid" id="druid">
- <property name="border_width">4</property>
- <property name="visible">True</property>
- <property name="show_help">False</property>
-
- <child>
- <widget class="GnomeDruidPageEdge" id="start_page">
- <property name="visible">True</property>
- <property name="position">GNOME_EDGE_START</property>
- <property name="title" translatable="yes">Mail Configuration</property>
- <property name="text" translatable="yes">Welcome to the Evolution Mail Configuration Assistant.
-
-Click &quot;Forward&quot; to begin. </property>
- </widget>
- </child>
-
- <child>
- <widget class="GnomeDruidPageStandard" id="identity_page">
- <property name="visible">True</property>
- <property name="title" translatable="yes">Identity</property>
- <property name="logo">mail-config-druid-identity.png</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="druid_identity_vbox">
- <property name="border_width">16</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <placeholder/>
- </child>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GnomeDruidPageStandard" id="source_page">
- <property name="visible">True</property>
- <property name="title" translatable="yes">Receiving Email</property>
- <property name="logo">mail-config-druid-receive.png</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="druid_source_vbox">
- <property name="border_width">16</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <placeholder/>
- </child>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GnomeDruidPageStandard" id="extra_page">
- <property name="visible">True</property>
- <property name="title" translatable="yes">Receiving Email</property>
- <property name="logo">mail-config-druid-receive.png</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="druid_extra_vbox">
- <property name="border_width">16</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <placeholder/>
- </child>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GnomeDruidPageStandard" id="transport_page">
- <property name="visible">True</property>
- <property name="title" translatable="yes">Sending Email</property>
- <property name="logo">mail-config-druid-send.png</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="druid_transport_vbox">
- <property name="border_width">16</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <placeholder/>
- </child>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GnomeDruidPageStandard" id="management_page">
- <property name="visible">True</property>
- <property name="title" translatable="yes">Account Management</property>
- <property name="logo">mail-config-druid-account-name.png</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="druid_management_vbox">
- <property name="border_width">16</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <placeholder/>
- </child>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GnomeDruidPageEdge" id="finish_page">
- <property name="visible">True</property>
- <property name="position">GNOME_EDGE_FINISH</property>
- <property name="title" translatable="yes">Done</property>
- <property name="text" translatable="yes">Congratulations, your mail configuration is complete.
-
-You are now ready to send and receive email
-using Evolution.
-
-Click &quot;Apply&quot; to save your settings.</property>
- </widget>
- </child>
- </widget>
- </child>
-</widget>
-
-<widget class="GtkWindow" id="account_editor">
- <property name="title" translatable="yes">Account Editor</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
-
- <child>
- <widget class="GtkNotebook" id="account_editor_notebook">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="show_tabs">True</property>
- <property name="show_border">True</property>
- <property name="tab_pos">GTK_POS_TOP</property>
- <property name="scrollable">False</property>
- <property name="enable_popup">False</property>
-
- <child>
- <widget class="GtkVBox" id="vboxIdentityBorder">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkVBox" id="identity_vbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkFrame" id="management_frame">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkVBox" id="account_vbox">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkLabel" id="management_description_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Type the name by which you would like to refer to this account.
-For example: &quot;Work&quot; or &quot;Personal&quot;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">3</property>
- <property name="ypad">3</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hboxIdentityName">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">4</property>
-
- <child>
- <widget class="GtkLabel" id="management_name_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Name:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_RIGHT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">management_name</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="management_name">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="management_default">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Make this my default account</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Account Information</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="identity_required_frame">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkTable" id="identity_required_table">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkEntry" id="identity_address">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="identity_address_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Email _address:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">identity_address</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="identity_full_name_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Full name:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">identity_full_name</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="identity_full_name">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Required Information</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="identity_optional_frame">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkTable" id="identity_optional_table">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="n_rows">3</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="identity_organization_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Or_ganization:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">identity_organization</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="sigLabel">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Default signature:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="identity_organization">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="reply_to_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Re_ply-To:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">identity_reply_to</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="identity_reply_to">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox169">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">5</property>
-
- <child>
- <widget class="GtkOptionMenu" id="sigOption">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget1">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget2">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Default</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="sigAddNew">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Add new signature...</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <signal name="clicked" handler="sigAddNewClicked"/>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Optional Information</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label31">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Identity</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vboxSourceBorder">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkVBox" id="source_vbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkTable" id="table3">
- <property name="visible">True</property>
- <property name="n_rows">1</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">0</property>
- <property name="column_spacing">3</property>
-
- <child>
- <widget class="GtkLabel" id="source_type_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Server _Type: </property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_RIGHT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">source_type_omenu</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="source_type_omenu">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget3">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget4">
- <property name="visible">True</property>
- <property name="label" translatable="yes">POP</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget5">
- <property name="visible">True</property>
- <property name="label" translatable="yes">IMAPv4 </property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget6">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Standard Unix mbox</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget7">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Qmail maildir </property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget8">
- <property name="visible">True</property>
- <property name="label" translatable="yes">None</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options"></property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hboxSourceDescription">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkLabel" id="label442">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Description:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="source_description">
- <property name="visible">True</property>
- <property name="label" translatable="yes">description</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="source_frame">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkTable" id="table4">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="n_rows">5</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="source_host_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Host:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">source_host</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="source_user_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">User_name:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">source_user</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="source_host">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="source_user">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="source_path_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Path:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">source_path</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GnomeFileEntry" id="source_path_entry">
- <property name="visible">True</property>
- <property name="max_saved">10</property>
- <property name="browse_dialog_title" translatable="yes">Mailbox location</property>
- <property name="directory_entry">False</property>
- <property name="modal">False</property>
-
- <child internal-child="entry">
- <widget class="GtkEntry" id="source_path">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="source_ssl_disabled">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="label" translatable="yes">(SSL is not supported in this build of Evolution)</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">2</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="source_ssl_hbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="lblSourceUseSSL">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Use secure connection (SSL):</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">source_use_ssl</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="source_use_ssl">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget9">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget10">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Always</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget11">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Whenever Possible</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget12">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Never</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label443">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Configuration</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="source_auth_frame">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkVBox" id="vbox60">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHBox" id="hbox44">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkLabel" id="source_auth_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Authentication type: </property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">source_auth_omenu</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="source_auth_omenu">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget13">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget14">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Password</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget15">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Kerberos </property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
-
- <child>
- <widget class="GtkButton" id="source_check_supported">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes"> _Check for supported types </property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="source_remember_password">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Re_member this password</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="lblNote">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Note: you will not be prompted for a password until you connect for the first time</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.03</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label444">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Authentication</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label32">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Receiving Mail</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vboxExtraTableBorder">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkTable" id="extra_table">
- <property name="visible">True</property>
- <property name="n_rows">1</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">4</property>
- <property name="column_spacing">8</property>
-
- <child>
- <widget class="GtkFrame" id="extra_mailcheck_frame">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkTable" id="extra_mailcheck_table">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="n_rows">1</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkHBox" id="extra_mailcheck_hbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkCheckButton" id="extra_auto_check">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Automatically check for new mail every</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkSpinButton" id="extra_auto_check_min">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">True</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="snap_to_ticks">False</property>
- <property name="wrap">False</property>
- <property name="adjustment">10 1 1440 1 10 10</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label36">
- <property name="visible">True</property>
- <property name="label" translatable="yes">minute(s)</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label445">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Checking for New Mail</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label33">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Receiving _Options</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vboxTransportBorder">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkVBox" id="transport_vbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkTable" id="table5">
- <property name="visible">True</property>
- <property name="n_rows">1</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">0</property>
- <property name="column_spacing">3</property>
-
- <child>
- <widget class="GtkLabel" id="transport_type_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Server _Type: </property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_RIGHT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">transport_type_omenu</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="transport_type_omenu">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget16">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget17">
- <property name="visible">True</property>
- <property name="label" translatable="yes">SMTP</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget18">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Sendmail</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options"></property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hboxTransportDescription">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkLabel" id="label50">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Description:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_RIGHT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="transport_description">
- <property name="visible">True</property>
- <property name="label" translatable="yes">description</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="transport_frame">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkVBox" id="vbox12">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkTable" id="table6">
- <property name="visible">True</property>
- <property name="n_rows">1</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">4</property>
- <property name="column_spacing">4</property>
-
- <child>
- <widget class="GtkLabel" id="transport_host_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Host:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_RIGHT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">transport_host</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="transport_host">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">4</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="transport_ssl_hbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="lblTransportUseSSL">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Use secure connection (SSL):</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">transport_use_ssl</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="transport_use_ssl">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget19">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget20">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Always</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget21">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Whenever Possible</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget22">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Never</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="transport_ssl_disabled">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="label" translatable="yes">(SSL is not supported in this build of evolution)</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="transport_needs_auth">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Ser_ver requires authentication</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label446">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Server Configuration</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="transport_auth_frame">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkVBox" id="vbox61">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkHBox" id="hbox49">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkLabel" id="transport_auth_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Authentication Type: </property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">transport_auth_omenu</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="transport_auth_omenu">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget23">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget24">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Password</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget25">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Kerberos </property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment2">
- <property name="visible">True</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
-
- <child>
- <widget class="GtkButton" id="transport_check_supported">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes"> _Check for supported types </property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox52">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkLabel" id="transport_user_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">User_name:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_RIGHT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">transport_user</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="transport_user">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="transport_remember_password">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Remember this _password</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label447">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Authentication</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label34">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Sending Mail</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vboxFoldersBorder">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkVBox" id="folders_vbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkFrame" id="folders_frame">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkTable" id="folders_table">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="n_rows">3</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="drafts_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Drafts _folder:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">drafts_button</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="sent_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Sent _messages folder:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">sent_button</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="drafts_button">
- <property name="visible">True</property>
- <property name="creation_function">mail_account_gui_folder_selector_button_new</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Wed, 03 Apr 2002 23:03:41 GMT</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="sent_button">
- <property name="visible">True</property>
- <property name="creation_function">mail_account_gui_folder_selector_button_new</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Wed, 03 Apr 2002 23:03:59 GMT</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="default_folders_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Restore Defaults</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label448">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Sent and Draft Messages</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frame2">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkVBox" id="vbox67">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox61">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkTable" id="table8">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkCheckButton" id="always_cc">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Always _carbon-copy (Cc) to:</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="always_bcc">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Always _blind carbon-copy (Bcc) to:</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="cc_addrs">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="bcc_addrs">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label449">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Composing Messages</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label35">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Defaults</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vboxSecurityBorder">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkVBox" id="security_vbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkFrame" id="pgp_frame">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkVBox" id="vboxPGP">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkHBox" id="hbox63">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="pgp_key_id_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">PGP/GPG _Key ID:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">pgp_key</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="pgp_key">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="pgp_always_sign">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Always sign outgoing messages when using this account</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="pgp_no_imip_sign">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Don't sign _meeting requests (for Outlook compatibility)</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="pgp_encrypt_to_self">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Al_ways encrypt to myself when sending encrypted mail</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">True</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="pgp_always_trust">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Always _trust keys in my keyring when encrypting</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label450">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Pretty Good Privacy (PGP/GPG)</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="smime_frame">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkTable" id="smime_table">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="n_rows">6</property>
- <property name="n_columns">4</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">5</property>
- <property name="column_spacing">9</property>
-
- <child>
- <widget class="GtkLabel" id="label469">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Si_gning certificate:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">smime_sign_key</property>
- <accessibility>
- <atkrelation target="smime_sign_key" type="label-for"/>
- </accessibility>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="smime_sign_key">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label470">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Encry_ption certificate:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">smime_encrypt_key</property>
- <accessibility>
- <atkrelation target="smime_encrypt_key" type="label-for"/>
- </accessibility>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="smime_encrypt_key">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="smime_encrypt_key_select">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment28">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox175">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child>
- <widget class="GtkImage" id="image3">
- <property name="visible">True</property>
- <property name="stock">gtk-open</property>
- <property name="icon_size">4</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="button98">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Select...</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="smime_sign_key_select">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment29">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox176">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child>
- <widget class="GtkImage" id="image4">
- <property name="visible">True</property>
- <property name="stock">gtk-open</property>
- <property name="icon_size">4</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label472">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Select...</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="smime_sign_key_clear">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-clear</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="smime_encrypt_key_clear">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-clear</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="smime_encrypt_to_self">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">A_lso encrypt to self when sending encrypted mail</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">4</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="smime_encrypt_default">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Encrypt outgoing messages (by default)</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">4</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHSeparator" id="hseparator3">
- <property name="visible">True</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">4</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_padding">3</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="smime_sign_default">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Digitally _sign outgoing messages (by default)</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">4</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label451">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Secure MIME (S/MIME)</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="lblSecurity">
- <property name="visible">True</property>
- <property name="label" translatable="yes">S_ecurity</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-<widget class="GtkWindow" id="accounts_tab">
- <property name="title" translatable="yes">Email Accounts</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
-
- <child>
- <widget class="GtkHBox" id="toplevel">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="Custom" id="etableMailAccounts">
- <property name="visible">True</property>
- <property name="creation_function">em_account_prefs_treeview_new</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Wed, 29 Oct 2003 17:47:08 GMT</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vboxMailFunctions">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="lblMailSpacer">
- <property name="visible">True</property>
- <property name="label" translatable="yes">
-</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVButtonBox" id="vbuttonboxMailAccounts">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_START</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkButton" id="cmdAccountAdd">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-add</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="cmdAccountEdit">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Edit</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="cmdAccountDelete">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-remove</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label421">
- <property name="visible">True</property>
- <property name="label" translatable="yes">
-</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVButtonBox" id="vbuttonboxMailExtras">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_START</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkButton" id="cmdAccountDefault">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">De_fault</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="cmdAccountAble">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">E_nable</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-<widget class="GtkWindow" id="preferences_tab">
- <property name="title" translatable="yes">Mail Preferences</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
-
- <child>
- <widget class="GtkNotebook" id="toplevel">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="show_tabs">True</property>
- <property name="show_border">True</property>
- <property name="tab_pos">GTK_POS_TOP</property>
- <property name="scrollable">False</property>
- <property name="enable_popup">False</property>
-
- <child>
- <widget class="GtkVBox" id="vboxGeneral">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkFrame" id="frame3">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkVBox" id="vboxMessageFonts">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkCheckButton" id="radFontUseSame">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Use the same fonts as other applications</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTable" id="tblScreen">
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">3</property>
- <property name="column_spacing">3</property>
-
- <child>
- <widget class="GtkLabel" id="lblScreenVariable">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Standard Font:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_RIGHT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">radFontVariable</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GnomeFontPicker" id="radFontFixed">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="title" translatable="yes">Select HTML fixed width font</property>
- <property name="mode">GNOME_FONT_PICKER_MODE_FONT_INFO</property>
- <property name="show_size">True</property>
- <property name="use_font_in_label">False</property>
- <property name="label_font_size">14</property>
- <signal name="font_set" handler="changed"/>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GnomeFontPicker" id="radFontVariable">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="title" translatable="yes">Select HTML variable width font</property>
- <property name="mode">GNOME_FONT_PICKER_MODE_FONT_INFO</property>
- <property name="show_size">True</property>
- <property name="use_font_in_label">False</property>
- <property name="label_font_size">14</property>
- <signal name="font_set" handler="changed"/>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label444">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Terminal Font:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_RIGHT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">radFontFixed</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label460">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Message Fonts</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frameMessageDisplay">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkVBox" id="vboxMessageDisplay">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkHBox" id="hboxReadTimeout">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkCheckButton" id="chkMarkTimeout">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Mark messages as read after</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkSpinButton" id="spinMarkTimeout">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">1</property>
- <property name="numeric">True</property>
- <property name="update_policy">GTK_UPDATE_IF_VALID</property>
- <property name="snap_to_ticks">False</property>
- <property name="wrap">False</property>
- <property name="adjustment">1.5 0 10 1 1 1</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="lblSeconds">
- <property name="visible">True</property>
- <property name="label" translatable="yes">seconds</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hboxDefaultCharset">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkLabel" id="lblDefaultCharset">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Default character _encoding:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">omenuCharset</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="omenuCharset">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget26">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget27">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Baltic (ISO-8859-13)</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget28">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Baltic (ISO-8859-4)</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hboxHighlightColor">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkCheckButton" id="chkHighlightCitations">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Highlight _quotations with</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">True</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GnomeColorPicker" id="colorpickerHighlightCitations">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="dither">True</property>
- <property name="use_alpha">False</property>
- <property name="title" translatable="yes">Pick a color</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="lblColor">
- <property name="visible">True</property>
- <property name="label" translatable="yes">color</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label452">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Message Display</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frameDeletingMail">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkVBox" id="vboxDeletingMail">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkCheckButton" id="chkEmptyTrashOnExit">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Empty _trash folders on exit</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="chkConfirmExpunge">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Confirm when expunging a folder</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label453">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Deleting Mail</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frameNewMailNotify">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkVBox" id="vboxNewMailNotify">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkRadioButton" id="radNotifyNot">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Do not notify me when new mail arrives</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">True</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkRadioButton" id="radNotifyBeep">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Beep when new mail arrives</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">radNotifyNot</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkRadioButton" id="radNotifyPlaySound">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Play sound file when new mail arrives</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">radNotifyNot</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox154">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkLabel" id="lblNotifyFilename">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Specify _filename:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">txtNotifyPlaySound</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GnomeFileEntry" id="fileNotifyPlaySound">
- <property name="visible">True</property>
- <property name="max_saved">10</property>
- <property name="browse_dialog_title" translatable="yes">Execute Command...</property>
- <property name="directory_entry">False</property>
- <property name="modal">False</property>
-
- <child internal-child="entry">
- <widget class="GtkEntry" id="txtNotifyPlaySound">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label454">
- <property name="visible">True</property>
- <property name="label" translatable="yes">New Mail Notification</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="lblGeneral">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_General</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vboxHtmlMail">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkFrame" id="frameLoadingImages">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkVBox" id="vboxLoadingImages">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkRadioButton" id="radImagesNever">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Never load images off the net</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">True</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkRadioButton" id="radImagesSometimes">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Load images if sender is in addressbook</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">radImagesNever</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkRadioButton" id="radImagesAlways">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Always load images off the net</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">radImagesNever</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label455">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Loading Images</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="chkShowAnimatedImages">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Show animated images</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="chkPromptWantHTML">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Prompt when sending HTML messages to contacts that don't want them</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="lblHtmlMail">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_HTML Mail</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vboxColours">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkFrame" id="frameColours">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkTable" id="tableColours">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="n_rows">6</property>
- <property name="n_columns">3</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">3</property>
- <property name="column_spacing">3</property>
-
- <child>
- <widget class="GnomeColorPicker" id="colorLabel0">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="dither">True</property>
- <property name="use_alpha">False</property>
- <property name="title" translatable="yes">Pick a color</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GnomeColorPicker" id="colorLabel1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="dither">True</property>
- <property name="use_alpha">False</property>
- <property name="title" translatable="yes">Pick a color</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GnomeColorPicker" id="colorLabel2">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="dither">True</property>
- <property name="use_alpha">False</property>
- <property name="title" translatable="yes">Pick a color</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GnomeColorPicker" id="colorLabel3">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="dither">True</property>
- <property name="use_alpha">False</property>
- <property name="title" translatable="yes">Pick a color</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GnomeColorPicker" id="colorLabel4">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="dither">True</property>
- <property name="use_alpha">False</property>
- <property name="title" translatable="yes">Pick a color</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="txtLabel0">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes">Important</property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="txtLabel1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes">Work</property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="txtLabel2">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes">Personal</property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="txtLabel3">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes">To Do</property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="txtLabel4">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes">Later</property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="cmdRestoreLabels">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Restore defaults</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label456">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Labels and Colors</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="lblColours">
- <property name="visible">True</property>
- <property name="label" translatable="yes">C_olors</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox161">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkVBox" id="vbox162">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkCheckButton" id="chkCheckIncomingMail">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Checks incoming mail messages to be Junk</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Check _Incoming Mail</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frameFilterOptions">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <placeholder/>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label474">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Filter Options</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label473">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Junk</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-<widget class="GtkWindow" id="composer_tab">
- <property name="title" translatable="yes">Message Composer</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
-
- <child>
- <widget class="GtkNotebook" id="toplevel">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="show_tabs">True</property>
- <property name="show_border">True</property>
- <property name="tab_pos">GTK_POS_TOP</property>
- <property name="scrollable">False</property>
- <property name="enable_popup">False</property>
-
- <child>
- <widget class="GtkVBox" id="vboxGeneral">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkFrame" id="frameBehavior">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkVBox" id="vboxBehavior">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkTable" id="tableForwardsReplies">
- <property name="visible">True</property>
- <property name="n_rows">3</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">3</property>
- <property name="column_spacing">3</property>
-
- <child>
- <widget class="GtkLabel" id="lblForwardStyle">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Forward style:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="lblReplyStyle">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Reply style:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment25">
- <property name="visible">True</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">1</property>
-
- <child>
- <widget class="GtkHBox" id="hboxReplyStyle">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkOptionMenu" id="omenuReplyStyle">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget33">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget34">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Quote original message</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget35">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Do not quote original message</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget36">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Attach original message</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hboxForwardStyle">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkOptionMenu" id="omenuForwardStyle">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget37">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget38">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Attachment</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget39">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Inline</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget40">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Quoted</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="lblCharset">
- <property name="visible">True</property>
- <property name="label" translatable="yes">C_haracter set:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">omenuCharset</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="omenuCharset">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget41">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget42">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Baltic (ISO-8859-13)</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget43">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Baltic (ISO-8859-4)</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="chkSendHTML">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Format messages in _HTML</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="chkAutoSmileys">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Automatically insert smiley images</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label457">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Default Behavior</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frameAlerts">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkVBox" id="vboxAlerts">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkCheckButton" id="chkPromptEmptySubject">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Prompt when sending messages with an empty subject line</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="chkPromptBccOnly">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Pr_ompt when sending messages with only Bcc recipients defined</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label458">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Alerts</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="lblGeneral">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_General</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vboxSignatures">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkHBox" id="hboxSignatures">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow46">
- <property name="visible">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTreeView" id="clistSignatures">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">True</property>
- <property name="rules_hint">False</property>
- <property name="reorderable">False</property>
- <property name="enable_search">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vboxSignatureButtons">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkLabel" id="label455">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVButtonBox" id="vbuttonbox25">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_START</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkButton" id="cmdSignatureAdd">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-add</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="cmdSignatureAddScript">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Add Sc_ript</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <signal name="clicked" handler="cmdSignatureAddScriptClicked"/>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="cmdSignatureEdit">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Edit</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="cmdSignatureDelete">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-remove</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox162">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkFrame" id="frameSignaturePreview">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolled-sig">
- <property name="visible">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <placeholder/>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="lblSignatures">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Signatures</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vboxSpellChecking">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHBox" id="hboxImageAndHelp">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkImage" id="pixmapSpellInfo">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="lblSpellChecking">
- <property name="visible">True</property>
- <property name="label" translatable="yes">This page allows you to configure spell checking behavior and language. The list of languages here reflects only the languages for which you have a dictionary installed.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">True</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHSeparator" id="hseparator1">
- <property name="visible">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hboxLanguages">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow48">
- <property name="visible">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTreeView" id="clistSpellCheckLanguage">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">True</property>
- <property name="rules_hint">False</property>
- <property name="reorderable">False</property>
- <property name="enable_search">True</property>
- <signal name="select_row" handler="spellLanguageSelectRow"/>
- <signal name="unselect_row" handler="spellLanguageUnselectRow"/>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox159">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">5</property>
-
- <child>
- <widget class="GtkLabel" id="label454">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVButtonBox" id="vbuttonbox26">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_START</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkButton" id="buttonSpellCheckEnable">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Enable</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <signal name="clicked" handler="spellLanguageEnable"/>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frameSpellChecking">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkVBox" id="vboxOptions">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkCheckButton" id="chkEnableSpellChecking">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Check spelling while I _type</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hboxSpellCheckColor">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="lblSpellCheckColor">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Color for _misspelled words:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">colorpickerSpellCheckColor</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GnomeColorPicker" id="colorpickerSpellCheckColor">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="dither">True</property>
- <property name="use_alpha">False</property>
- <property name="title" translatable="yes">Pick a color</property>
- <signal name="color_set" handler="spellColorSet"/>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label459">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Options</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label450">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Spell _Checking</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-<widget class="GtkWindow" id="font_tab">
- <property name="title" translatable="yes">Font Properties</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
-
- <child>
- <widget class="GtkVBox" id="toplevel">
- <property name="border_width">4</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">4</property>
-
- <child>
- <placeholder/>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frame4">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkTable" id="tblPrint">
- <property name="border_width">4</property>
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">4</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="lblPrintVariable">
- <property name="visible">True</property>
- <property name="label" translatable="yes">V_ariable-width:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">print_variable</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="lblPrintFixed">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Fi_xed -width:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">print_fixed</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GnomeFontPicker" id="print_fixed">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="title" translatable="yes">Select HTML fixed width font for printing</property>
- <property name="mode">GNOME_FONT_PICKER_MODE_FONT_INFO</property>
- <property name="show_size">True</property>
- <property name="use_font_in_label">False</property>
- <property name="label_font_size">14</property>
- <signal name="font_set" handler="changed"/>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GnomeFontPicker" id="print_variable">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="title" translatable="yes">Select HTML variable width font for printing</property>
- <property name="mode">GNOME_FONT_PICKER_MODE_FONT_INFO</property>
- <property name="show_size">True</property>
- <property name="use_font_in_label">False</property>
- <property name="label_font_size">14</property>
- <signal name="font_set" handler="changed"/>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label461">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Printed Fonts</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-<widget class="GtkDialog" id="add_script_signature">
- <property name="title" translatable="yes"></property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="has_separator">True</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="button_add_script_add">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Add Signature</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">0</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="button_add_script_cancel">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">0</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox160">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkVBox" id="vbox_add_script_signature">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHBox" id="hboxImageAndHelp">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkImage" id="pixmap1">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label456">
- <property name="visible">True</property>
- <property name="label" translatable="yes">The output of this script will be used as your
-signature. The name you specify will be used
-for display purposes only. </property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">True</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTable" id="tblNameScript">
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label459">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Name:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry_add_script_name</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label460">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Script:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">combo-entry2</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry_add_script_name">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GnomeFileEntry" id="fileentry_add_script_script">
- <property name="visible">True</property>
- <property name="history_id">evolution_script_signature</property>
- <property name="max_saved">10</property>
- <property name="directory_entry">False</property>
- <property name="modal">False</property>
-
- <child internal-child="entry">
- <widget class="GtkEntry" id="combo-entry2">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-<widget class="GtkWindow" id="sa_options">
- <property name="title" translatable="yes">window1</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
-
- <child>
- <widget class="GtkVBox" id="vbox163">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkCheckButton" id="chkLocalTestsOnly">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Local Tests Only</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="chkUseDaemon">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Use _Daemon</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/mail/mail-config.h b/mail/mail-config.h
deleted file mode 100644
index 36891eccb4..0000000000
--- a/mail/mail-config.h
+++ /dev/null
@@ -1,186 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_CONFIG_H
-#define MAIL_CONFIG_H
-
-#include <gtk/gtk.h>
-
-#include <gconf/gconf.h>
-#include <gconf/gconf-client.h>
-
-#include <camel/camel.h>
-
-#include "e-util/e-account.h"
-#include "e-util/e-account-list.h"
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-typedef struct {
- int id;
- char *name;
- char *filename;
- char *script;
- gboolean html;
-} MailConfigSignature;
-
-
-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_REPLY_QUOTED,
- MAIL_CONFIG_REPLY_DO_NOT_QUOTE,
- MAIL_CONFIG_REPLY_ATTACH
-} MailConfigReplyStyle;
-
-typedef enum {
- MAIL_CONFIG_DISPLAY_NORMAL,
- MAIL_CONFIG_DISPLAY_FULL_HEADERS,
- MAIL_CONFIG_DISPLAY_SOURCE,
- MAIL_CONFIG_DISPLAY_MAX
-} MailConfigDisplayStyle;
-
-typedef enum {
- MAIL_CONFIG_NOTIFY_NOT,
- MAIL_CONFIG_NOTIFY_BEEP,
- MAIL_CONFIG_NOTIFY_PLAY_SOUND,
-} MailConfigNewMailNotify;
-
-typedef enum {
- MAIL_CONFIG_XMAILER_NONE = 0,
- MAIL_CONFIG_XMAILER_EVO = 1,
- MAIL_CONFIG_XMAILER_OTHER = 2,
- MAIL_CONFIG_XMAILER_RUPERT_APPROVED = 4
-} MailConfigXMailerDisplayStyle;
-
-typedef struct {
- char *tag;
- char *name;
- char *colour;
-} MailConfigLabel;
-
-#define LABEL_DEFAULTS_NUM 5
-extern MailConfigLabel label_defaults[5];
-
-/* signatures */
-MailConfigSignature *signature_copy (const MailConfigSignature *sig);
-void signature_destroy (MailConfigSignature *sig);
-
-/* Configuration */
-void mail_config_init (void);
-void mail_config_clear (void);
-void mail_config_write (void);
-void mail_config_write_on_exit (void);
-
-GConfClient *mail_config_get_gconf_client (void);
-
-/* General Accessor functions */
-gboolean mail_config_is_configured (void);
-gboolean mail_config_is_corrupt (void);
-
-GSList *mail_config_get_labels (void);
-const char *mail_config_get_label_color_by_name (const char *name);
-const char *mail_config_get_label_color_by_index (int index);
-
-const char **mail_config_get_allowable_mime_types (void);
-
-void mail_config_service_set_save_passwd (EAccountService *service, gboolean save_passwd);
-
-gboolean mail_config_find_account (EAccount *account);
-EAccount *mail_config_get_default_account (void);
-EAccount *mail_config_get_account_by_name (const char *account_name);
-EAccount *mail_config_get_account_by_uid (const char *uid);
-EAccount *mail_config_get_account_by_source_url (const char *url);
-EAccount *mail_config_get_account_by_transport_url (const char *url);
-EAccountList *mail_config_get_accounts (void);
-void mail_config_add_account (EAccount *account);
-void mail_config_remove_account (EAccount *account);
-
-void mail_config_set_default_account (EAccount *account);
-
-EAccountIdentity *mail_config_get_default_identity (void);
-EAccountService *mail_config_get_default_transport (void);
-
-void mail_config_save_accounts (void);
-
-GSList *mail_config_get_signature_list (void);
-MailConfigSignature *mail_config_signature_new (gboolean html, const char *script);
-void mail_config_signature_add (MailConfigSignature *sig);
-void mail_config_signature_delete (MailConfigSignature *sig);
-void mail_config_signature_set_name (MailConfigSignature *sig, const char *name);
-void mail_config_signature_set_html (MailConfigSignature *sig, gboolean html);
-void mail_config_signature_set_filename (MailConfigSignature *sig, const char *filename);
-
-
-/* uri's got changed by the store, etc */
-void mail_config_uri_renamed (GCompareFunc uri_cmp, const char *old, const char *new);
-void mail_config_uri_deleted (GCompareFunc uri_cmp, const char *uri);
-
-
-/* static utility functions */
-char *mail_config_folder_to_cachename (CamelFolder *folder, const char *prefix);
-char *mail_config_folder_to_safe_url (CamelFolder *folder);
-
-gboolean mail_config_check_service (const char *url, CamelProviderType type, GList **authtypes, GtkWindow *window);
-
-
-
-GtkType evolution_mail_config_get_type (void);
-
-gboolean evolution_mail_config_factory_init (void);
-
-
-typedef enum {
- MAIL_CONFIG_SIG_EVENT_NAME_CHANGED,
- MAIL_CONFIG_SIG_EVENT_CONTENT_CHANGED,
- MAIL_CONFIG_SIG_EVENT_HTML_CHANGED,
- MAIL_CONFIG_SIG_EVENT_ADDED,
- MAIL_CONFIG_SIG_EVENT_DELETED
-} MailConfigSigEvent;
-
-typedef void (*MailConfigSignatureClient)(MailConfigSigEvent, MailConfigSignature *sig, gpointer data);
-
-void mail_config_signature_register_client (MailConfigSignatureClient client, gpointer data);
-void mail_config_signature_unregister_client (MailConfigSignatureClient client, gpointer data);
-void mail_config_signature_emit_event (MailConfigSigEvent event, MailConfigSignature *sig);
-
-void mail_config_write_account_sig (EAccount *account, int i);
-char *mail_config_signature_run_script (char *script);
-
-#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 c77bc14425..0000000000
--- a/mail/mail-crypto.c
+++ /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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <string.h>
-
-#include "mail-crypto.h"
-#include "mail-session.h"
-#include "mail-config.h"
-
-
-/**
- * mail_crypto_get_pgp_cipher_context:
- * @account: Account that will be using this context
- *
- * Constructs a new GnuPG cipher context with the appropriate
- * options set based on the account provided.
- **/
-CamelCipherContext *
-mail_crypto_get_pgp_cipher_context (EAccount *account)
-{
- CamelCipherContext *cipher;
-
- cipher = camel_gpg_context_new (session);
- if (account)
- camel_gpg_context_set_always_trust ((CamelGpgContext *) cipher, account->pgp_always_trust);
-
- return cipher;
-}
diff --git a/mail/mail-crypto.h b/mail/mail-crypto.h
deleted file mode 100644
index a380f65863..0000000000
--- a/mail/mail-crypto.h
+++ /dev/null
@@ -1,42 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_CRYPTO_H
-#define MAIL_CRYPTO_H
-
-#include <camel/camel.h>
-#include "mail-config.h"
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-
-/* PGP/MIME convenience wrappers */
-CamelCipherContext *mail_crypto_get_pgp_cipher_context (EAccount *account);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* ! MAIL_CRYPTO_H */
diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c
deleted file mode 100644
index 23f6221544..0000000000
--- a/mail/mail-folder-cache.c
+++ /dev/null
@@ -1,956 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <string.h>
-#include <time.h>
-
-#include <libgnome/gnome-sound.h>
-#include <bonobo/bonobo-exception.h>
-#include <camel/camel-store.h>
-#include <camel/camel-folder.h>
-#include <camel/camel-vtrash-folder.h>
-#include <camel/camel-vee-store.h>
-#include <camel/camel-disco-store.h>
-
-#include "mail-mt.h"
-#include "mail-folder-cache.h"
-#include "mail-ops.h"
-#include "mail-session.h"
-
-/* For notifications of changes */
-#include "mail-vfolder.h"
-#include "mail-autofilter.h"
-#include "mail-config.h"
-
-#define w(x)
-#define d(x) /*(printf("%s(%d):%s: ", __FILE__, __LINE__, __PRETTY_FUNCTION__), (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 *full_name; /* full name of folder/folderinfo */
- char *uri; /* uri of folder */
-
- CamelFolder *folder; /* if known */
-};
-
-/* pending list of updates */
-struct _folder_update {
- struct _folder_update *next;
- struct _folder_update *prev;
-
- unsigned int remove:1; /* removing from vfolders */
- unsigned int delete:1; /* deleting as well? */
- unsigned int add:1; /* add to vfolder */
- unsigned int unsub:1; /* unsubcribing? */
- unsigned int new:1; /* new mail arrived? */
-
- char *path;
- char *name;
- char *uri;
- char *oldpath;
- char *olduri;
-
- int unread;
- CamelStore *store;
-};
-
-struct _store_info {
- GHashTable *folders; /* by full_name */
- GHashTable *folders_uri; /* by uri */
-
- CamelStore *store; /* the store for these folders */
-
- /* Outstanding folderinfo requests */
- EDList folderinfo_updates;
-};
-
-static void folder_changed(CamelObject *o, gpointer event_data, gpointer user_data);
-static void folder_renamed(CamelObject *o, gpointer event_data, gpointer user_data);
-static void folder_finalised(CamelObject *o, gpointer event_data, gpointer user_data);
-static void message_changed (CamelObject *o, gpointer event_data, gpointer user_data);
-
-static guint ping_id = 0;
-static gboolean ping_cb (gpointer user_data);
-
-static guint notify_id = 0;
-static int notify_type = -1;
-
-static time_t last_notify = 0;
-static guint notify_idle_id = 0;
-static gboolean notify_idle_cb (gpointer user_data);
-
-
-/* Store to storeinfo table, active stores */
-static GHashTable *stores = NULL;
-
-/* List of folder changes to be executed in gui thread */
-static EDList updates = E_DLIST_INITIALISER(updates);
-static int update_id = -1;
-
-/* hack for people who LIKE to have unsent count */
-static int count_sent = FALSE;
-static int count_trash = FALSE;
-
-static void
-free_update(struct _folder_update *up)
-{
- g_free(up->path);
- g_free(up->name);
- g_free(up->uri);
- if (up->store)
- camel_object_unref(up->store);
- g_free(up->oldpath);
- g_free(up->olduri);
- g_free(up);
-}
-
-static gboolean
-notify_idle_cb (gpointer user_data)
-{
- GConfClient *gconf;
- char *filename;
-
- gconf = mail_config_get_gconf_client ();
-
- switch (notify_type) {
- case MAIL_CONFIG_NOTIFY_PLAY_SOUND:
- filename = gconf_client_get_string (gconf, "/apps/evolution/mail/notify/sound", NULL);
- if (filename != NULL) {
- gnome_sound_play (filename);
- g_free (filename);
- }
- break;
- case MAIL_CONFIG_NOTIFY_BEEP:
- gdk_beep ();
- break;
- default:
- break;
- }
-
- time (&last_notify);
-
- notify_idle_id = 0;
-
- return FALSE;
-}
-
-static void
-notify_type_changed (GConfClient *client, guint cnxn_id,
- GConfEntry *entry, gpointer user_data)
-{
- notify_type = gconf_client_get_int (client, "/apps/evolution/mail/notify/type", NULL);
-}
-
-static void
-real_flush_updates(void *o, void *event_data, void *data)
-{
- struct _folder_update *up;
- struct _store_info *si;
- time_t now;
-
- LOCK(info_lock);
- while ((up = (struct _folder_update *)e_dlist_remhead(&updates))) {
- si = g_hash_table_lookup(stores, up->store);
-
- UNLOCK(info_lock);
-
- if (up->remove) {
- if (up->delete) {
- mail_vfolder_delete_uri(up->store, up->uri);
- mail_filter_delete_uri(up->store, up->uri);
- mail_config_uri_deleted(CAMEL_STORE_CLASS(CAMEL_OBJECT_GET_CLASS(up->store))->compare_folder_name, up->uri);
-
- } else
- mail_vfolder_add_uri(up->store, up->uri, TRUE);
- } else {
- /* We can tell the vfolder code though */
- if (up->olduri && up->add) {
- d(printf("renaming folder '%s' to '%s'\n", up->olduri, up->uri));
- mail_vfolder_rename_uri(up->store, up->olduri, up->uri);
- mail_filter_rename_uri(up->store, up->olduri, up->uri);
- mail_config_uri_renamed(CAMEL_STORE_CLASS(CAMEL_OBJECT_GET_CLASS(up->store))->compare_folder_name,
- up->olduri, up->uri);
- }
-
- if (!up->olduri && up->add)
- mail_vfolder_add_uri(up->store, up->uri, FALSE);
- }
-
- /* new mail notification */
- if (notify_type == -1) {
- /* need to track the user's new-mail-notification settings... */
- GConfClient *gconf;
-
- gconf = mail_config_get_gconf_client ();
- gconf_client_add_dir (gconf, "/apps/evolution/mail/notify",
- GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
- notify_id = gconf_client_notify_add (gconf, "/apps/evolution/mail/notify",
- notify_type_changed, NULL, NULL, NULL);
- notify_type = gconf_client_get_int (gconf, "/apps/evolution/mail/notify/type", NULL);
- }
-
- time (&now);
- if (notify_type != 0 && up->new && notify_idle_id == 0 && (now - last_notify >= 5))
- notify_idle_id = g_idle_add_full (G_PRIORITY_LOW, notify_idle_cb, NULL, NULL);
-
- free_update(up);
-
- LOCK(info_lock);
- }
- update_id = -1;
- UNLOCK(info_lock);
-}
-
-static void
-flush_updates(void)
-{
- if (update_id == -1 && !e_dlist_empty(&updates))
- update_id = mail_async_event_emit(mail_async_event, MAIL_ASYNC_GUI, (MailAsyncFunc)real_flush_updates, 0, 0, 0);
-}
-
-static void
-unset_folder_info(struct _folder_info *mfi, int delete, int unsub)
-{
- struct _folder_update *up;
-
- d(printf("unset folderinfo '%s'\n", mfi->uri));
-
- if (mfi->folder) {
- CamelFolder *folder = mfi->folder;
-
- camel_object_unhook_event(folder, "folder_changed", folder_changed, mfi);
- camel_object_unhook_event(folder, "message_changed", message_changed, mfi);
- camel_object_unhook_event(folder, "renamed", folder_renamed, mfi);
- camel_object_unhook_event(folder, "finalize", folder_finalised, mfi);
- }
-
- if (strstr(mfi->uri, ";noselect") == NULL) {
- up = g_malloc0(sizeof(*up));
-
- up->remove = TRUE;
- up->delete = delete;
- up->unsub = unsub;
- up->store = mfi->store_info->store;
- up->path = g_strdup (mfi->path);
- camel_object_ref(up->store);
- up->uri = g_strdup(mfi->uri);
-
- e_dlist_addtail(&updates, (EDListNode *)up);
- flush_updates();
- }
-}
-
-static void
-free_folder_info(struct _folder_info *mfi)
-{
- g_free(mfi->path);
- g_free(mfi->full_name);
- g_free(mfi->uri);
- g_free(mfi);
-}
-
-/* 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, int new, CamelFolderInfo *info)
-{
- struct _store_info *si;
- struct _folder_update *up;
- CamelFolder *folder;
- int unread = -1;
- extern CamelFolder *outbox_folder, *sent_folder;
-
- si = mfi->store_info;
-
- folder = mfi->folder;
- if (folder) {
- if ((count_trash && CAMEL_IS_VTRASH_FOLDER (folder))
- || folder == outbox_folder
- || (count_sent && folder == sent_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;
-
- d(printf("folder updated: unread %d: '%s'\n", unread, mfi->full_name));
-
- if (unread == -1)
- return;
-
- up = g_malloc0(sizeof(*up));
- up->path = g_strdup(mfi->path);
- up->unread = unread;
- up->new = new ? 1 : 0;
- up->store = mfi->store_info->store;
- camel_object_ref(up->store);
- e_dlist_addtail(&updates, (EDListNode *)up);
- flush_updates();
-}
-
-static void
-setup_folder(CamelFolderInfo *fi, struct _store_info *si)
-{
- struct _folder_info *mfi;
- struct _folder_update *up;
-
- mfi = g_hash_table_lookup(si->folders, fi->full_name);
- if (mfi) {
- update_1folder(mfi, 0, 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->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);
-
- up = g_malloc0(sizeof(*up));
- up->path = g_strdup(mfi->path);
- up->name = g_strdup(fi->name);
- up->uri = g_strdup(fi->url);
- up->unread = (fi->unread_message_count==-1)?0:fi->unread_message_count;
- up->store = si->store;
- camel_object_ref(up->store);
- if (strstr(fi->url, ";noselect") == NULL)
- up->add = TRUE;
-
- e_dlist_addtail(&updates, (EDListNode *)up);
- flush_updates();
- }
-}
-
-static void
-create_folders(CamelFolderInfo *fi, struct _store_info *si)
-{
- d(printf("Setup new folder: %s\n %s\n", fi->url, fi->full_name));
-
- setup_folder(fi, si);
-
- if (fi->child)
- create_folders(fi->child, si);
- if (fi->sibling)
- create_folders(fi->sibling, si);
-}
-
-static void
-folder_changed (CamelObject *o, gpointer event_data, gpointer user_data)
-{
- extern CamelFolder *outbox_folder, *sent_folder;
- CamelFolderChangeInfo *changes = event_data;
- CamelFolder *folder = (CamelFolder *) o;
- struct _folder_info *mfi = user_data;
- int new = 0;
-
- if (mfi->folder != folder)
- return;
-
- if (!CAMEL_IS_VTRASH_FOLDER (folder) && folder != outbox_folder && folder != sent_folder && changes && changes->uid_added)
- new = changes->uid_added->len;
-
- LOCK(info_lock);
- update_1folder(mfi, new, NULL);
- UNLOCK(info_lock);
-}
-
-static void
-message_changed (CamelObject *o, gpointer event_data, gpointer user_data)
-{
- struct _folder_info *mfi = user_data;
-
- if (mfi->folder != CAMEL_FOLDER (o))
- return;
-
- LOCK(info_lock);
- update_1folder(mfi, 0, NULL);
- UNLOCK(info_lock);
-}
-
-static void
-folder_finalised(CamelObject *o, gpointer event_data, gpointer user_data)
-{
- struct _folder_info *mfi = user_data;
-
- d(printf("Folder finalised '%s'!\n", ((CamelFolder *)o)->full_name));
- LOCK(info_lock);
- mfi->folder = NULL;
- UNLOCK(info_lock);
-}
-
-static void
-folder_renamed(CamelObject *o, gpointer event_data, gpointer user_data)
-{
- struct _folder_info *mfi = user_data;
- CamelFolder *folder = (CamelFolder *)o;
- char *old = event_data;
-
- d(printf("Folder renamed from '%s' to '%s'\n", old, folder->full_name));
-
- mfi = mfi;
- old = old;
- folder = folder;
- /* Dont do anything, do it from the store rename event? */
-}
-
-void mail_note_folder(CamelFolder *folder)
-{
- CamelStore *store = folder->parent_store;
- struct _store_info *si;
- struct _folder_info *mfi;
-
- if (stores == NULL) {
- g_warning("Adding a folder `%s' to a store which hasn't been added yet?\n", folder->full_name);
- return;
- }
-
- LOCK(info_lock);
- si = g_hash_table_lookup(stores, store);
- if (si == NULL) {
- /*g_warning("Adding a folder `%s' to a store %p which hasn't been added yet?", folder->full_name, store);*/
- UNLOCK(info_lock);
- return;
- }
-
- mfi = g_hash_table_lookup(si->folders, folder->full_name);
- if (mfi == NULL) {
- w(g_warning("Adding a folder `%s' that I dont know about yet?", folder->full_name));
- UNLOCK(info_lock);
- return;
- }
-
- /* dont do anything if we already have this */
- if (mfi->folder == folder) {
- UNLOCK(info_lock);
- return;
- }
-
- mfi->folder = folder;
-
- camel_object_hook_event(folder, "folder_changed", folder_changed, mfi);
- camel_object_hook_event(folder, "message_changed", message_changed, mfi);
- camel_object_hook_event(folder, "renamed", folder_renamed, mfi);
- camel_object_hook_event(folder, "finalize", folder_finalised, mfi);
-
- update_1folder(mfi, 0, NULL);
-
- UNLOCK(info_lock);
-}
-
-static void
-store_folder_subscribed(CamelObject *o, void *event_data, void *data)
-{
- struct _store_info *si;
- CamelFolderInfo *fi = event_data;
-
- d(printf("Store folder subscribed '%s' store '%s' \n", fi->full_name, camel_url_to_string(((CamelService *)o)->url, 0)));
-
- LOCK(info_lock);
- si = g_hash_table_lookup(stores, o);
- if (si)
- setup_folder(fi, si);
- UNLOCK(info_lock);
-}
-
-static void
-store_folder_created(CamelObject *o, void *event_data, void *data)
-{
- /* we only want created events to do more work if we dont support subscriptions */
- if (!camel_store_supports_subscriptions(CAMEL_STORE(o)))
- store_folder_subscribed(o, event_data, data);
-}
-
-static void
-store_folder_unsubscribed(CamelObject *o, void *event_data, void *data)
-{
- struct _store_info *si;
- CamelFolderInfo *fi = event_data;
- struct _folder_info *mfi;
- CamelStore *store = (CamelStore *)o;
-
- d(printf("Store Folder deleted: %s\n", fi->full_name));
-
- LOCK(info_lock);
- si = g_hash_table_lookup(stores, store);
- if (si) {
- mfi = g_hash_table_lookup(si->folders, fi->full_name);
- if (mfi) {
- g_hash_table_remove(si->folders, mfi->full_name);
- g_hash_table_remove(si->folders_uri, mfi->uri);
- unset_folder_info(mfi, TRUE, TRUE);
- free_folder_info(mfi);
- }
- }
- UNLOCK(info_lock);
-}
-
-static void
-store_folder_deleted(CamelObject *o, void *event_data, void *data)
-{
- /* we only want deleted events to do more work if we dont support subscriptions */
- if (!camel_store_supports_subscriptions(CAMEL_STORE(o)))
- store_folder_unsubscribed(o, event_data, data);
-}
-
-static void
-rename_folders(struct _store_info *si, const char *oldbase, const char *newbase, CamelFolderInfo *fi)
-{
- char *old;
- struct _folder_info *mfi;
- struct _folder_update *up;
-
- up = g_malloc0(sizeof(*up));
-
- d(printf("oldbase '%s' newbase '%s' new '%s'\n", oldbase, newbase, fi->full_name));
-
- /* Form what was the old name, and try and look it up */
- old = g_strdup_printf("%s%s", oldbase, fi->full_name + strlen(newbase));
- mfi = g_hash_table_lookup(si->folders, old);
- if (mfi) {
- d(printf("Found old folder '%s' renaming to '%s'\n", mfi->full_name, fi->full_name));
-
- up->oldpath = mfi->path;
- up->olduri = mfi->uri;
-
- /* Its a rename op */
- g_hash_table_remove(si->folders, mfi->full_name);
- g_hash_table_remove(si->folders, mfi->uri);
- g_free(mfi->full_name);
- mfi->path = g_strdup(fi->path);
- mfi->full_name = g_strdup(fi->full_name);
- mfi->uri = g_strdup(fi->url);
- g_hash_table_insert(si->folders, mfi->full_name, mfi);
- g_hash_table_insert(si->folders_uri, mfi->uri, mfi);
- } else {
- d(printf("Rename found a new folder? old '%s' new '%s'\n", old, fi->full_name));
- /* Its a new op */
- mfi = g_malloc0(sizeof(*mfi));
- mfi->path = g_strdup(fi->path);
- 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);
- }
-
- g_free(old);
-
- up->path = g_strdup(mfi->path);
- up->name = g_strdup(fi->name);
- up->uri = g_strdup(mfi->uri);
- up->unread = fi->unread_message_count==-1?0:fi->unread_message_count;
- up->store = si->store;
- camel_object_ref(up->store);
- /* FIXME: use fi->flags */
- if (strstr(fi->url, ";noselect") == NULL)
- up->add = TRUE;
-
- e_dlist_addtail(&updates, (EDListNode *)up);
- flush_updates();
-#if 0
- if (fi->sibling)
- rename_folders(si, oldbase, newbase, fi->sibling, folders);
- if (fi->child)
- rename_folders(si, oldbase, newbase, fi->child, folders);
-#endif
-}
-
-static void
-get_folders(CamelFolderInfo *fi, GPtrArray *folders)
-{
- g_ptr_array_add(folders, fi);
-
- if (fi->child)
- get_folders(fi->child, folders);
- if (fi->sibling)
- get_folders(fi->sibling, folders);
-}
-
-static int
-folder_cmp(const void *ap, const void *bp)
-{
- const CamelFolderInfo *a = ((CamelFolderInfo **)ap)[0];
- const CamelFolderInfo *b = ((CamelFolderInfo **)bp)[0];
-
- return strcmp(a->path, b->path);
-}
-
-static void
-store_folder_renamed(CamelObject *o, void *event_data, void *data)
-{
- CamelStore *store = (CamelStore *)o;
- CamelRenameInfo *info = event_data;
- struct _store_info *si;
-
- d(printf("Folder renamed: oldbase = '%s' new->full = '%s'\n", info->old_base, info->new->full_name));
-
- LOCK(info_lock);
- si = g_hash_table_lookup(stores, store);
- if (si) {
- GPtrArray *folders = g_ptr_array_new();
- CamelFolderInfo *top;
- int i;
-
- /* Ok, so for some reason the folderinfo we have comes in all messed up from
- imap, should find out why ... this makes it workable */
- get_folders(info->new, folders);
- qsort(folders->pdata, folders->len, sizeof(folders->pdata[0]), folder_cmp);
-
- top = folders->pdata[0];
- for (i=0;i<folders->len;i++) {
- rename_folders(si, info->old_base, top->full_name, folders->pdata[i]);
- }
-
- g_ptr_array_free(folders, TRUE);
-
- }
- UNLOCK(info_lock);
-}
-
-struct _update_data {
- struct _update_data *next;
- struct _update_data *prev;
-
- int id; /* id for cancellation */
-
- void (*done)(CamelStore *store, CamelFolderInfo *info, void *data);
- void *data;
-};
-
-static void
-unset_folder_info_hash(char *path, struct _folder_info *mfi, void *data)
-{
- unset_folder_info(mfi, FALSE, FALSE);
-}
-
-static void
-free_folder_info_hash(char *path, struct _folder_info *mfi, void *data)
-{
- free_folder_info(mfi);
-}
-
-void
-mail_note_store_remove(CamelStore *store)
-{
- struct _update_data *ud;
- struct _store_info *si;
-
- g_assert(CAMEL_IS_STORE(store));
-
- if (stores == NULL)
- return;
-
- d(printf("store removed!!\n"));
- LOCK(info_lock);
- si = g_hash_table_lookup(stores, store);
- if (si) {
- g_hash_table_remove(stores, store);
-
- camel_object_unhook_event(store, "folder_created", store_folder_created, NULL);
- camel_object_unhook_event(store, "folder_deleted", store_folder_deleted, NULL);
- camel_object_unhook_event(store, "folder_renamed", store_folder_renamed, NULL);
- camel_object_unhook_event(store, "folder_subscribed", store_folder_subscribed, NULL);
- camel_object_unhook_event(store, "folder_unsubscribed", store_folder_unsubscribed, NULL);
- g_hash_table_foreach(si->folders, (GHFunc)unset_folder_info_hash, NULL);
-
- ud = (struct _update_data *)si->folderinfo_updates.head;
- while (ud->next) {
- d(printf("Cancelling outstanding folderinfo update %d\n", ud->id));
- mail_msg_cancel(ud->id);
- ud = ud->next;
- }
-
- camel_object_unref(si->store);
- g_hash_table_foreach(si->folders, (GHFunc)free_folder_info_hash, NULL);
- g_hash_table_destroy(si->folders);
- g_hash_table_destroy(si->folders_uri);
- g_free(si);
- }
- UNLOCK(info_lock);
-}
-
-static void
-update_folders(CamelStore *store, CamelFolderInfo *fi, void *data)
-{
- struct _update_data *ud = data;
- struct _store_info *si;
-
- d(printf("Got folderinfo for store\n"));
-
- LOCK(info_lock);
- si = g_hash_table_lookup(stores, store);
- if (si) {
- /* the 'si' is still there, so we can remove ourselves from its list */
- /* otherwise its not, and we're on our own and free anyway */
- e_dlist_remove((EDListNode *)ud);
-
- if (fi)
- create_folders(fi, si);
- }
- UNLOCK(info_lock);
-
- if (ud->done)
- ud->done(store, fi, ud->data);
- g_free(ud);
-}
-
-
-struct _ping_store_msg {
- struct _mail_msg msg;
-
- CamelStore *store;
-};
-
-static char *
-ping_store_desc (struct _mail_msg *mm, int done)
-{
- struct _ping_store_msg *m = (struct _ping_store_msg *) mm;
- char *service_name = camel_service_get_name (CAMEL_SERVICE (m->store), TRUE);
- char *msg;
-
- msg = g_strdup_printf (_("Pinging %s"), service_name);
- g_free (service_name);
-
- return msg;
-}
-
-static void
-ping_store_ping (struct _mail_msg *mm)
-{
- struct _ping_store_msg *m = (struct _ping_store_msg *) mm;
-
- if (CAMEL_SERVICE (m->store)->status == CAMEL_SERVICE_CONNECTED)
- camel_store_noop (m->store, &mm->ex);
-}
-
-static void
-ping_store_free (struct _mail_msg *mm)
-{
- struct _ping_store_msg *m = (struct _ping_store_msg *) mm;
-
- camel_object_unref (m->store);
-}
-
-static struct _mail_msg_op ping_store_op = {
- ping_store_desc,
- ping_store_ping,
- NULL,
- ping_store_free
-};
-
-static void
-ping_store (gpointer key, gpointer val, gpointer user_data)
-{
- CamelStore *store = (CamelStore *) key;
- struct _ping_store_msg *m;
-
- if (CAMEL_SERVICE (store)->status != CAMEL_SERVICE_CONNECTED)
- return;
-
- m = mail_msg_new (&ping_store_op, NULL, sizeof (struct _ping_store_msg));
- m->store = store;
- camel_object_ref (store);
-
- e_thread_put (mail_thread_queued, (EMsg *) m);
-}
-
-static gboolean
-ping_cb (gpointer user_data)
-{
- LOCK (info_lock);
-
- g_hash_table_foreach (stores, ping_store, NULL);
-
- UNLOCK (info_lock);
-
- return TRUE;
-}
-
-static void
-store_online_cb (CamelStore *store, void *data)
-{
- struct _update_data *ud = data;
-
- LOCK(info_lock);
-
- if (g_hash_table_lookup(stores, store) != NULL) {
- /* re-use the cancel id. we're already in the store update list too */
- ud->id = mail_get_folderinfo(store, NULL, update_folders, ud);
- } else {
- /* the store vanished, that means we were probably cancelled, or at any rate,
- need to clean ourselves up */
- g_free(ud);
- }
-
- UNLOCK(info_lock);
-}
-
-void
-mail_note_store(CamelStore *store, CamelOperation *op,
- void (*done)(CamelStore *store, CamelFolderInfo *info, void *data), void *data)
-{
- struct _store_info *si;
- struct _update_data *ud;
- const char *buf;
- guint timeout;
-
- g_assert(CAMEL_IS_STORE(store));
- g_assert(pthread_self() == mail_gui_thread);
-
- LOCK(info_lock);
-
- if (stores == NULL) {
- stores = g_hash_table_new(NULL, NULL);
- count_sent = getenv("EVOLUTION_COUNT_SENT") != NULL;
- count_trash = getenv("EVOLUTION_COUNT_TRASH") != NULL;
- buf = getenv ("EVOLUTION_PING_TIMEOUT");
- timeout = buf ? strtoul (buf, NULL, 10) * 1000 : 600000;
- ping_id = g_timeout_add (timeout, ping_cb, 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)));
-
- 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->store = store;
- camel_object_ref((CamelObject *)store);
- g_hash_table_insert(stores, store, si);
- e_dlist_init(&si->folderinfo_updates);
-
- camel_object_hook_event(store, "folder_created", store_folder_created, NULL);
- camel_object_hook_event(store, "folder_deleted", store_folder_deleted, NULL);
- camel_object_hook_event(store, "folder_renamed", store_folder_renamed, NULL);
- camel_object_hook_event(store, "folder_subscribed", store_folder_subscribed, NULL);
- camel_object_hook_event(store, "folder_unsubscribed", store_folder_unsubscribed, NULL);
- }
-
- /* We might get a race when setting up a store, such that it is still left in offline mode,
- after we've gone online. This catches and fixes it up when the shell opens us */
- if (CAMEL_IS_DISCO_STORE(store)
- && camel_session_is_online(session)
- && camel_disco_store_status (CAMEL_DISCO_STORE (store)) == CAMEL_DISCO_STORE_OFFLINE) {
- ud = g_malloc(sizeof(*ud));
- ud->done = done;
- ud->data = data;
- /* Note: we use the 'id' here, even though its not the right id, its still ok */
- ud->id = mail_store_set_offline (store, FALSE, store_online_cb, ud);
-
- e_dlist_addtail (&si->folderinfo_updates, (EDListNode *) ud);
- } else if (!CAMEL_IS_DISCO_STORE(store)
- || camel_disco_store_status (CAMEL_DISCO_STORE (store)) == CAMEL_DISCO_STORE_ONLINE
- || camel_disco_store_can_work_offline (CAMEL_DISCO_STORE (store))) {
- ud = g_malloc (sizeof (*ud));
- ud->done = done;
- ud->data = data;
- ud->id = mail_get_folderinfo (store, op, update_folders, ud);
-
- e_dlist_addtail (&si->folderinfo_updates, (EDListNode *) ud);
- }
-
- UNLOCK(info_lock);
-}
-
-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(*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 875579ad67..0000000000
--- a/mail/mail-folder-cache.h
+++ /dev/null
@@ -1,51 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 <camel/camel-store.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, CamelOperation *op,
- void (*done) (CamelStore *store, CamelFolderInfo *info, void *data),
- void *data);
-
-/* de-note a store */
-void mail_note_store_remove (CamelStore *store);
-
-/* 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 (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-font-prefs.c b/mail/mail-font-prefs.c
deleted file mode 100644
index 0d26f1ccbd..0000000000
--- a/mail/mail-font-prefs.c
+++ /dev/null
@@ -1,130 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Larry Ewing <lewing@ximian.com>
- *
- * Copyright 2002 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 <gtk/gtk.h>
-#include <gtkhtml/gtkhtml-propmanager.h>
-
-#include "mail-font-prefs.h"
-
-static GtkVBoxClass *parent_class = NULL;
-
-GtkWidget *
-mail_font_prefs_new (void)
-{
- MailFontPrefs *new;
-
- new = MAIL_FONT_PREFS (g_object_new (mail_font_prefs_get_type ()), NULL);
-
- return GTK_WIDGET (new);
-}
-
-void
-mail_font_prefs_apply (MailFontPrefs *prefs)
-{
- gtk_html_propmanager_apply (prefs->pman);
-}
-
-static void
-font_prefs_changed (GtkHTMLPropmanager *pman, MailFontPrefs *prefs)
-{
- if (prefs->control)
- evolution_config_control_changed (prefs->control);
-}
-
-static void
-mail_font_prefs_destroy (GtkObject *object)
-{
- MailFontPrefs *prefs = (MailFontPrefs *) object;
-
- if (prefs->pman) {
- g_object_unref(prefs->pman);
- g_object_unref(prefs->gui);
- prefs->pman = NULL;
- }
-
- if (GTK_OBJECT_CLASS (parent_class)->finalize)
- (* GTK_OBJECT_CLASS (parent_class)->finalize) (object);
-}
-
-static void
-mail_font_prefs_init (MailFontPrefs *prefs)
-{
- GtkWidget *toplevel;
- GladeXML *gui;
-
- gui = glade_xml_new (EVOLUTION_GLADEDIR "/mail-config.glade", "font_tab", NULL);
- prefs->gui = gui;
-
- prefs->pman = GTK_HTML_PROPMANAGER (gtk_html_propmanager_new (NULL));
- gtk_html_propmanager_set_gui (prefs->pman, gui, NULL);
- g_object_ref(prefs->pman);
- gtk_object_sink (GTK_OBJECT (prefs->pman));
-
- g_signal_connect(prefs->pman, "changed", font_prefs_changed, prefs);
-
- /* get our toplevel widget */
- toplevel = glade_xml_get_widget (gui, "toplevel");
-
- /* reparent */
- g_object_ref (toplevel);
- gtk_container_remove (GTK_CONTAINER (toplevel->parent), toplevel);
- gtk_container_add (GTK_CONTAINER (prefs), toplevel);
- g_object_unref (toplevel);
-}
-
-static void
-mail_font_prefs_class_init (MailFontPrefsClass *klass)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass *) klass;
- parent_class = g_type_class_ref(gtk_vbox_get_type ());
-
- object_class->destroy = mail_font_prefs_destroy;
-}
-
-GtkType
-mail_font_prefs_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- GTypeInfo type_info = {
- sizeof (MailFontPrefsClass),
- NULL, NULL,
- (GClassInitFunc) mail_font_prefs_class_init,
- NULL, NULL,
- sizeof (MailFontPrefs),
- 0,
- (GInstanceInitFunc) mail_font_prefs_init,
- };
-
- type = g_type_register_static (gtk_vbox_get_type (), "MailFontPrefs", &type_info, 0);
- }
-
- return type;
-}
-
-
diff --git a/mail/mail-font-prefs.h b/mail/mail-font-prefs.h
deleted file mode 100644
index 87266734a9..0000000000
--- a/mail/mail-font-prefs.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2002 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_FONT_PREFS_H__
-#define __MAIL_FONT_PREFS_H__
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif
-
-#include <gtk/gtk.h>
-#include <gtkhtml/gtkhtml-propmanager.h>
-
-#include <shell/Evolution.h>
-#include "evolution-config-control.h"
-
-#define MAIL_FONT_PREFS_TYPE (mail_font_prefs_get_type())
-#define MAIL_FONT_PREFS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MAIL_FONT_PREFS_TYPE, MailFontPrefs))
-#define MAIL_FONT_PREFS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), MAIL_FONT_PREFS_TYPE, MailFontPrefsClass))
-#define IS_MAIL_FONT_PREFS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MAIL_FONT_PREFS_TYPE))
-#define IS_MAIL_FONT_PREFS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MAIL_FONT_PREFS_TYPE))
-
-typedef struct _MailFontPrefs MailFontPrefs;
-typedef struct _MailFontPrefsClass MailFontPrefsClass;
-
-struct _MailFontPrefs {
- GtkVBox parent_object;
-
- GtkHTMLPropmanager *pman;
- GladeXML *gui;
- EvolutionConfigControl *control;
-};
-
-struct _MailFontPrefsClass {
- GtkVBoxClass parent_object;
-};
-
-GtkType mail_font_prefs_get_type (void);
-GtkWidget * mail_font_prefs_new (void);
-void mail_font_prefs_apply (MailFontPrefs *prefs);
-
-#define MAIL_FONT_PREFS_CONTROL_ID "OAFIID:GNOME_Evolution_Mail_FontPrefs_ConfigControl:" BASE_VERSION
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-#endif /* __MAIL_FONT_PREFS_H__ */
diff --git a/mail/mail-importer.c b/mail/mail-importer.c
deleted file mode 100644
index 46804fc295..0000000000
--- a/mail/mail-importer.c
+++ /dev/null
@@ -1,288 +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-2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <dirent.h>
-#include <gmodule.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 <e-util/e-path.h>
-
-#include "mail-component.h"
-#include "mail-importer.h"
-#include "mail.h"
-
-static GList *importer_modules = NULL;
-static GNOME_Evolution_Storage local_storage = NULL;
-
-void mail_importer_uninit (void);
-
-struct _create_data {
- GNOME_Evolution_Storage_Result create_result;
- int create_done:1;
-};
-
-static void
-folder_created_cb(BonoboListener *listener, const char *event_name, const BonoboArg *event_data,
- CORBA_Environment *ev, struct _create_data *data)
-{
- GNOME_Evolution_Storage_FolderResult *result;
-
- data->create_done = TRUE;
-
- if (strcmp (event_name, "evolution-shell:folder_created") != 0) {
- return; /* Unknown event */
- }
-
- result = event_data->_value;
- data->create_result = result->result;
-}
-
-/**
- * mail_importer_make_local_folder:
- * @folderpath:
- *
- * Check a local folder exists at path @folderpath, and if not, create it.
- *
- * Return value: The physical uri of the folder, or NULL if the folder did
- * not exist and could not be created.
- **/
-char *
-mail_importer_make_local_folder(const char *folderpath)
-{
- CORBA_Environment ev;
- char *uri = NULL, *tmp;
- GNOME_Evolution_Folder *fi;
- BonoboListener *listener;
-
- CORBA_exception_init (&ev);
-
- /* first, check, does this folder exist, if so, use the right path */
- fi = GNOME_Evolution_Storage_getFolderAtPath(local_storage, folderpath, &ev);
- if (fi) {
- printf("folder %s exists @ %s\n", folderpath, fi->physicalUri);
- uri = g_strdup(fi->physicalUri);
- CORBA_free(fi);
- } else {
- struct _create_data data = { GNOME_Evolution_Storage_GENERIC_ERROR, FALSE };
-
- tmp = g_strdup_printf("file://%s/local",
- mail_component_peek_base_directory (mail_component_peek ()));
- uri = e_path_to_physical(tmp, folderpath);
- g_free(tmp);
- tmp = strrchr(uri, '/');
- tmp[0] = 0;
-
- printf("Creating folder %s, parent %s\n", folderpath, uri);
-
- listener = bonobo_listener_new (NULL, NULL);
- g_signal_connect(listener, "event-notify", G_CALLBACK (folder_created_cb), &data);
-
- GNOME_Evolution_Storage_asyncCreateFolder(local_storage, folderpath, "mail", "", uri,
- bonobo_object_corba_objref((BonoboObject *)listener), &ev);
-
- while (!data.create_done)
- g_main_context_iteration(NULL, TRUE);
-
- bonobo_object_unref((BonoboObject *)listener);
-
- if (data.create_result != GNOME_Evolution_Storage_OK) {
- g_free(uri);
- uri = NULL;
- } else {
- *tmp = '/';
- }
- }
-
- CORBA_exception_free (&ev);
-
- return uri;
-}
-
-/**
- * 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 (importer->mstream);
- importer->mstream = NULL;
-
- ex = camel_exception_new ();
- camel_folder_append_message (importer->folder, msg, info, NULL, ex);
- camel_object_unref (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_build_filename (MAIL_IMPORTERSDIR, d->d_name, NULL);
- 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 66b4441e1d..0000000000
--- a/mail/mail-importer.h
+++ /dev/null
@@ -1,53 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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);
-
-/* creates a folder at folderpath on the local storage */
-char *mail_importer_make_local_folder(const char *folderpath);
-
-#endif
diff --git a/mail/mail-mt.c b/mail/mail-mt.c
deleted file mode 100644
index 7d3ac53e3b..0000000000
--- a/mail/mail-mt.c
+++ /dev/null
@@ -1,982 +0,0 @@
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-#include <pthread.h>
-#include <errno.h>
-
-#include <glib.h>
-
-#include <gtk/gtkmain.h>
-#include <gtk/gtkwidget.h>
-#include <gtk/gtkdialog.h>
-#include <gtk/gtkstock.h>
-#include <libgnome/gnome-i18n.h>
-#include <gal/widgets/e-gui-utils.h>
-
-#include "e-util/e-msgport.h"
-#include "camel/camel-operation.h"
-
-#include "e-activity-handler.h"
-
-#include "mail-config.h"
-#include "camel/camel-url.h"
-#include "mail-component.h"
-#include "mail-session.h"
-#include "mail-mt.h"
-
-/*#define MALLOC_CHECK*/
-#define LOG_OPS
-#define LOG_LOCKS
-#define d(x)
-
-static void set_stop(int sensitive);
-static void mail_operation_status(struct _CamelOperation *op, const char *what, int pc, void *data);
-
-#ifdef LOG_LOCKS
-#define MAIL_MT_LOCK(x) (log_locks?fprintf(log, "%ld: lock " # x "\n", pthread_self()):0, pthread_mutex_lock(&x))
-#define MAIL_MT_UNLOCK(x) (log_locks?fprintf(log, "%ld: unlock " # x "\n", pthread_self()): 0, pthread_mutex_unlock(&x))
-#else
-#define MAIL_MT_LOCK(x) pthread_mutex_lock(&x)
-#define MAIL_MT_UNLOCK(x) pthread_mutex_unlock(&x)
-#endif
-
-/* 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 */
- int activity_id;
-};
-
-/* This is used for the mail status bar, cheap and easy */
-#include "art/mail-new.xpm"
-
-static GdkPixbuf *progress_icon = NULL;
-
-/* mail_msg stuff */
-#ifdef LOG_OPS
-static FILE *log;
-static int log_ops, log_locks, log_init;
-#endif
-
-static unsigned int mail_msg_seq; /* sequence number of each message */
-static GHashTable *mail_msg_active_table; /* 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;
-
-MailAsyncEvent *mail_async_event;
-
-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);
-
-#if defined(LOG_OPS) || defined(LOG_LOCKS)
- if (!log_init) {
- time_t now = time(0);
-
- log_init = TRUE;
- log_ops = getenv("EVOLUTION_MAIL_LOG_OPS") != NULL;
- log_locks = getenv("EVOLUTION_MAIL_LOG_LOCKS") != NULL;
- if (log_ops || log_locks) {
- log = fopen("evolution-mail-ops.log", "w+");
- if (log) {
- setvbuf(log, NULL, _IOLBF, 0);
- fprintf(log, "Started evolution-mail: %s\n", ctime(&now));
- g_warning("Logging mail operations to evolution-mail-ops.log");
-
- if (log_ops)
- fprintf(log, "Logging async operations\n");
-
- if (log_locks) {
- fprintf(log, "Logging lock operations, mail_gui_thread = %ld\n\n", mail_gui_thread);
- fprintf(log, "%ld: lock mail_msg_lock\n", pthread_self());
- }
- } else {
- g_warning ("Could not open log file: %s", strerror(errno));
- log_ops = log_locks = FALSE;
- }
- }
- }
-#endif
- 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, GINT_TO_POINTER(msg->seq));
- camel_exception_init(&msg->ex);
- msg->priv = g_malloc0(sizeof(*msg->priv));
-
- g_hash_table_insert(mail_msg_active_table, GINT_TO_POINTER(msg->seq), msg);
-
- d(printf("New message %p\n", msg));
-
-#ifdef LOG_OPS
- if (log_ops)
- fprintf(log, "%p: New\n", msg);
-#endif
- MAIL_MT_UNLOCK(mail_msg_lock);
-
- return msg;
-}
-
-
-static void end_event_callback (CamelObject *o, void *event_data, void *data)
-{
- EActivityHandler *activity_handler = mail_component_peek_activity_handler (mail_component_peek ());
- guint activity_id = GPOINTER_TO_INT (event_data);
-
- e_activity_handler_operation_finished (activity_handler, activity_id);
-}
-
-
-#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;
- int activity_id;
-
-#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);
-
-#ifdef LOG_OPS
- if (log_ops)
- fprintf(log, "%p: Free (exception `%s')\n", msg,
- camel_exception_get_description(&m->ex)?camel_exception_get_description(&m->ex):"None");
-#endif
- g_hash_table_remove(mail_msg_active_table, GINT_TO_POINTER(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_id = m->priv->activity_id;
- }
-
- MAIL_MT_UNLOCK(mail_msg_lock);
-
- if (m->cancel) {
- camel_operation_mute(m->cancel);
- camel_operation_unref(m->cancel);
- }
-
- camel_exception_clear(&m->ex);
- /*g_free(m->priv->what);*/
- g_free(m->priv);
- g_free(m);
-
- if (activity_id != 0)
- mail_async_event_emit(mail_async_event, MAIL_ASYNC_GUI, (MailAsyncFunc) end_event_callback,
- NULL, GINT_TO_POINTER (activity_id), NULL);
-}
-
-/* hash table of ops->dialogue of active errors */
-static GHashTable *active_errors = NULL;
-
-static void error_destroy(GtkObject *o, void *data)
-{
- g_hash_table_remove(active_errors, data);
-}
-
-static void error_response(GtkObject *o, int button, void *data)
-{
- gtk_widget_destroy((GtkWidget *)o);
-}
-
-void mail_msg_check_error(void *msg)
-{
- struct _mail_msg *m = msg;
- char *what = NULL;
- char *text;
- GtkDialog *gd;
-
-#ifdef MALLOC_CHECK
- checkmem(m);
- checkmem(m->cancel);
- checkmem(m->priv);
-#endif
-
- /* don't report any errors if we are not in interactive mode */
- if (!mail_session_get_interactive ())
- return;
-
- 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 = (GtkDialog *)gtk_message_dialog_new(NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "%s", text);
- g_hash_table_insert(active_errors, m->ops, gd);
- g_signal_connect(gd, "response", G_CALLBACK(error_response), m->ops);
- g_signal_connect(gd, "destroy", G_CALLBACK(error_destroy), m->ops);
- gtk_widget_show((GtkWidget *)gd);
- g_free (text);
-}
-
-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_table, GINT_TO_POINTER(msgid));
-
- if (m && m->cancel)
- 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_table, GINT_TO_POINTER(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_table, GINT_TO_POINTER(msgid));
- }
- MAIL_MT_UNLOCK(mail_msg_lock);
- } else {
- MAIL_MT_LOCK(mail_msg_lock);
- m = g_hash_table_lookup(mail_msg_active_table, GINT_TO_POINTER(msgid));
- while (m) {
- pthread_cond_wait(&mail_msg_cond, &mail_msg_lock);
- m = g_hash_table_lookup(mail_msg_active_table, GINT_TO_POINTER(msgid));
- }
- MAIL_MT_UNLOCK(mail_msg_lock);
- }
-}
-
-int mail_msg_active(unsigned int msgid)
-{
- int active;
-
- MAIL_MT_LOCK(mail_msg_lock);
- if (msgid == (unsigned int)-1)
- active = g_hash_table_size(mail_msg_active_table) > 0;
- else
- active = g_hash_table_lookup(mail_msg_active_table, GINT_TO_POINTER(msgid)) != NULL;
- MAIL_MT_UNLOCK(mail_msg_lock);
-
- return active;
-}
-
-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_table) > 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_table) > 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;
-static guint mail_gui_watch;
-
-/* TODO: Merge these, gui_port2 doesn't do any mail_msg processing on the request (replies, forwards, frees) */
-EMsgPort *mail_gui_port2;
-static GIOChannel *mail_gui_channel2;
-static guint mail_gui_watch2;
-
-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
-
-#ifdef LOG_OPS
- if (log_ops)
- fprintf(log, "%p: Replied to GUI thread (exception `%s'\n", m,
- camel_exception_get_description(&m->ex)?camel_exception_get_description(&m->ex):"None");
-#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
-
-#ifdef LOG_OPS
- if (log_ops)
- fprintf(log, "%p: Received at GUI thread\n", m);
-#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;
-}
-
-/* Test code, lighterwight, more configurable calls */
-static gboolean
-mail_msgport_received2(GIOChannel *source, GIOCondition cond, void *d)
-{
- EMsgPort *port = (EMsgPort *)d;
- mail_msg_t *m;
-
- while (( m = (mail_msg_t *)e_msgport_get(port))) {
-#ifdef LOG_OPS
- if (log_ops)
- fprintf(log, "%p: Received at GUI2 thread\n", m);
-#endif
-
- if (m->ops->receive_msg)
- m->ops->receive_msg(m);
- else
- 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);
-
-#ifdef LOG_OPS
- if (log_ops)
- fprintf(log, "%p: Received at thread %ld: '%s'\n", m, pthread_self(), text);
-#endif
-
- d(printf("message received at thread\n"));
- camel_operation_register(m->cancel);
- camel_operation_start(m->cancel, "%s", text);
- g_free(text);
- }
-#ifdef LOG_OPS
- else
- if (log_ops)
- fprintf(log, "%p: Received at thread %ld\n", m, pthread_self());
-#endif
-
- 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);
- MAIL_MT_LOCK(mail_msg_lock);
- camel_operation_unref(m->cancel);
- m->cancel = NULL;
- MAIL_MT_UNLOCK(mail_msg_lock);
- }
-}
-
-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);
-}
-
-static guint
-em_channel_setup(EMsgPort **port, GIOChannel **channel, GIOFunc func)
-{
- GSource *source;
- guint id;
-
- *port = e_msgport_new();
- *channel = g_io_channel_unix_new(e_msgport_fd(*port));
- source = g_io_create_watch(*channel, G_IO_IN);
- g_source_set_callback(source, (GSourceFunc)func, *port, NULL);
- g_source_set_can_recurse(source, FALSE);
- id = g_source_attach(source, NULL);
- g_source_unref(source);
-
- return id;
-}
-
-void mail_msg_init(void)
-{
- em_channel_setup(&mail_gui_reply_port, &mail_gui_reply_channel, mail_msgport_replied);
- mail_gui_watch = em_channel_setup(&mail_gui_port, &mail_gui_channel, mail_msgport_received);
- mail_gui_watch2 = em_channel_setup(&mail_gui_port2, &mail_gui_channel2, mail_msgport_received2);
-
- 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_table = g_hash_table_new(NULL, NULL);
- mail_gui_thread = pthread_self();
-
- mail_async_event = mail_async_event_new();
-}
-
-/* ********************************************************************** */
-
-/* locks */
-static pthread_mutex_t status_lock = PTHREAD_MUTEX_INITIALIZER;
-
-/* ********************************************************************** */
-
-struct _proxy_msg {
- struct _mail_msg msg;
- MailAsyncEvent *ea;
- mail_async_event_t type;
-
- pthread_t thread;
-
- MailAsyncFunc func;
- void *o;
- void *event_data;
- void *data;
-};
-
-static void
-do_async_event(struct _mail_msg *mm)
-{
- struct _proxy_msg *m = (struct _proxy_msg *)mm;
-
- m->thread = pthread_self();
- m->func(m->o, m->event_data, m->data);
- m->thread = ~0;
-
- g_mutex_lock(m->ea->lock);
- m->ea->tasks = g_slist_remove(m->ea->tasks, m);
- g_mutex_unlock(m->ea->lock);
-}
-
-static int
-idle_async_event(void *mm)
-{
- do_async_event(mm);
- mail_msg_free(mm);
-
- return FALSE;
-}
-
-struct _mail_msg_op async_event_op = {
- NULL,
- do_async_event,
- NULL,
- NULL,
-};
-
-MailAsyncEvent *mail_async_event_new(void)
-{
- MailAsyncEvent *ea;
-
- ea = g_malloc0(sizeof(*ea));
- ea->lock = g_mutex_new();
-
- return ea;
-}
-
-int mail_async_event_emit(MailAsyncEvent *ea, mail_async_event_t type, MailAsyncFunc func, void *o, void *event_data, void *data)
-{
- struct _proxy_msg *m;
- int id;
- int ismain = pthread_self() == mail_gui_thread;
-
- /* we dont have a reply port for this, we dont care when/if it gets executed, just queue it */
- m = mail_msg_new(&async_event_op, NULL, sizeof(*m));
- m->func = func;
- m->o = o;
- m->event_data = event_data;
- m->data = data;
- m->ea = ea;
- m->type = type;
- m->thread = ~0;
-
- id = m->msg.seq;
- g_mutex_lock(ea->lock);
- ea->tasks = g_slist_prepend(ea->tasks, m);
- g_mutex_unlock(ea->lock);
-
- /* We use an idle function instead of our own message port only because the
- gui message ports's notification buffer might overflow and deadlock us */
- if (type == MAIL_ASYNC_GUI) {
- if (ismain)
- g_idle_add(idle_async_event, m);
- else
- e_msgport_put(mail_gui_port, (EMsg *)m);
- } else
- e_thread_put(mail_thread_queued, (EMsg *)m);
-
- return id;
-}
-
-int mail_async_event_destroy(MailAsyncEvent *ea)
-{
- int id;
- pthread_t thread = pthread_self();
- struct _proxy_msg *m;
-
- g_mutex_lock(ea->lock);
- while (ea->tasks) {
- m = ea->tasks->data;
- id = m->msg.seq;
- if (m->thread == thread) {
- g_warning("Destroying async event from inside an event, returning EDEADLK");
- g_mutex_unlock(ea->lock);
- errno = EDEADLK;
- return -1;
- }
- g_mutex_unlock(ea->lock);
- mail_msg_wait(id);
- g_mutex_lock(ea->lock);
- }
- g_mutex_unlock(ea->lock);
-
- g_mutex_free(ea->lock);
- g_free(ea);
-
- return 0;
-}
-
-/* ********************************************************************** */
-
-struct _call_msg {
- struct _mail_msg msg;
- mail_call_t type;
- MailMainFunc func;
- void *ret;
- va_list ap;
-};
-
-static void
-do_call(struct _mail_msg *mm)
-{
- struct _call_msg *m = (struct _call_msg *)mm;
- void *p1, *p2, *p3, *p4, *p5;
- int i1;
- va_list ap;
-
- G_VA_COPY(ap, m->ap);
-
- switch(m->type) {
- case MAIL_CALL_p_p:
- p1 = va_arg(ap, void *);
- m->ret = m->func(p1);
- break;
- case MAIL_CALL_p_pp:
- p1 = va_arg(ap, void *);
- p2 = va_arg(ap, void *);
- m->ret = m->func(p1, p2);
- break;
- case MAIL_CALL_p_ppp:
- p1 = va_arg(ap, void *);
- p2 = va_arg(ap, void *);
- p3 = va_arg(ap, void *);
- m->ret = m->func(p1, p2, p3);
- break;
- case MAIL_CALL_p_pppp:
- p1 = va_arg(ap, void *);
- p2 = va_arg(ap, void *);
- p3 = va_arg(ap, void *);
- p4 = va_arg(ap, void *);
- m->ret = m->func(p1, p2, p3, p4);
- break;
- case MAIL_CALL_p_ppippp:
- p1 = va_arg(ap, void *);
- p2 = va_arg(ap, void *);
- i1 = va_arg(ap, int);
- p3 = va_arg(ap, void *);
- p4 = va_arg(ap, void *);
- p5 = va_arg(ap, void *);
- m->ret = m->func(p1, p2, i1, p3, p4, p5);
- break;
- }
-}
-
-struct _mail_msg_op mail_call_op = {
- NULL,
- do_call,
- NULL,
- NULL,
-};
-
-void *mail_call_main(mail_call_t type, MailMainFunc func, ...)
-{
- struct _call_msg *m;
- void *ret;
- va_list ap;
- EMsgPort *reply = NULL;
- int ismain = pthread_self() == mail_gui_thread;
-
- va_start(ap, func);
-
- if (!ismain)
- reply = e_msgport_new();
-
- m = mail_msg_new(&mail_call_op, reply, sizeof(*m));
- m->type = type;
- m->func = func;
- G_VA_COPY(m->ap, ap);
-
- if (!ismain) {
- e_msgport_put(mail_gui_port, (EMsg *)m);
- e_msgport_wait(reply);
- e_msgport_destroy(reply);
- } else {
- do_call(&m->msg);
- }
-
- va_end(ap);
-
- ret = m->ret;
- mail_msg_free(m);
-
- return ret;
-}
-
-/* ********************************************************************** */
-/* 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,
-};
-
-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);
-}
-
-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)
-{
- EActivityHandler *activity_handler = mail_component_peek_activity_handler (mail_component_peek ());
- 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;
-
- g_assert (mail_gui_thread == pthread_self ());
-
- MAIL_MT_LOCK (mail_msg_lock);
-
- msg = g_hash_table_lookup (mail_msg_active_table, 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;
-
- if (data->activity_id == 0) {
- char *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 == NULL)
- progress_icon = gdk_pixbuf_new_from_xpm_data ((const char **)mail_new_xpm);
-
- MAIL_MT_UNLOCK (mail_msg_lock);
- if (msg->ops->describe_msg)
- what = msg->ops->describe_msg (msg, FALSE);
- else
- what = _("Working");
-
- data->activity_id = e_activity_handler_operation_started (activity_handler, "evolution-mail", progress_icon, what, TRUE);
-
- if (msg->ops->describe_msg)
- g_free (what);
-
- MAIL_MT_LOCK (mail_msg_lock);
- if (data->activity_state == 3) {
- MAIL_MT_UNLOCK (mail_msg_lock);
- if (msg->cancel)
- camel_operation_unref (msg->cancel);
- camel_exception_clear (&msg->ex);
- g_free (msg->priv);
- g_free (msg);
- } else {
- data->activity_state = 2;
- MAIL_MT_UNLOCK (mail_msg_lock);
- }
- return;
- }
- } else if (data->activity_id != 0) {
- MAIL_MT_UNLOCK (mail_msg_lock);
- e_activity_handler_operation_progressing (activity_handler, data->activity_id, out, (double)(pc/100.0));
- } else {
- MAIL_MT_UNLOCK (mail_msg_lock);
- }
-}
-
-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)
-{
- static int last = FALSE;
-
- if (last == sensitive)
- return;
-
- /*bonobo_ui_component_set_prop (uic, "/commands/MailStop", "sensitive", sensitive ? "1" : "0", NULL);*/
- last = sensitive;
-}
diff --git a/mail/mail-mt.h b/mail/mail-mt.h
deleted file mode 100644
index 11a7166d74..0000000000
--- a/mail/mail-mt.h
+++ /dev/null
@@ -1,126 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_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);
-int mail_msg_active(unsigned int msgid);
-
-/* 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);
-
-/* asynchronous event proxies */
-typedef struct _MailAsyncEvent {
- GMutex *lock;
- GSList *tasks;
-} MailAsyncEvent;
-
-typedef enum _mail_async_event_t {
- MAIL_ASYNC_GUI,
- MAIL_ASYNC_THREAD,
-} mail_async_event_t;
-
-typedef void (*MailAsyncFunc)(void *, void *, void *);
-
-/* create a new async event handler */
-MailAsyncEvent *mail_async_event_new(void);
-/* forward a camel event (or other call) to the gui thread */
-int mail_async_event_emit(MailAsyncEvent *ea, mail_async_event_t type, MailAsyncFunc func, void *, void *, void *);
-/* wait for all outstanding async events to complete */
-int mail_async_event_destroy(MailAsyncEvent *ea);
-
-/* Call a function in the gui thread, wait for it to return, type is the marshaller to use */
-typedef enum {
- MAIL_CALL_p_p,
- MAIL_CALL_p_pp,
- MAIL_CALL_p_ppp,
- MAIL_CALL_p_pppp,
- MAIL_CALL_p_ppippp,
-} mail_call_t;
-
-typedef void *(*MailMainFunc)();
-
-void *mail_call_main(mail_call_t type, MailMainFunc func, ...);
-
-/* use with caution. only works with active message's anyway */
-void mail_enable_stop(void);
-void mail_disable_stop(void);
-
-/* 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;
-
-/* A generic proxy event for anything that can be proxied during the life of the mailer (almost nothing) */
-/* Note that almost all objects care about the lifecycle of their events, so this cannot be used */
-extern MailAsyncEvent *mail_async_event;
-
-#endif /* ! _MAIL_MT */
diff --git a/mail/mail-offline-handler.c b/mail/mail-offline-handler.c
deleted file mode 100644
index 6613391a7b..0000000000
--- a/mail/mail-offline-handler.c
+++ /dev/null
@@ -1,258 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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-component.h"
-#include "mail-ops.h"
-#include "mail-folder-cache.h"
-#include "mail.h"
-
-#include <gtk/gtkmain.h>
-
-#include <gal/util/e-util.h>
-
-
-#define PARENT_TYPE bonobo_object_get_type ()
-static BonoboObjectClass *parent_class = NULL;
-
-struct _MailOfflineHandlerPrivate {
- GHashTable *sync_table;
-};
-
-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) &&
- camel_disco_store_status (CAMEL_DISCO_STORE (service)) == CAMEL_DISCO_STORE_OFFLINE)
- return !going_offline;
-
- return service->status != CAMEL_SERVICE_DISCONNECTED;
-}
-
-static void
-add_connection (gpointer key, gpointer value, 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_component_get_store_count (mail_component_peek ());
- list->_buffer = CORBA_sequence_GNOME_Evolution_Connection_allocbuf (list->_maximum);
-
- mail_component_stores_foreach (mail_component_peek (), 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 ();
-}
-
-/* keep track of each sync in progress */
-struct _sync_info {
- char *uri; /* uri of folder being synced */
- CamelOperation *cancel; /* progress report/cancellation object */
- int pc; /* percent complete (0-100) */
- int lastpc; /* last percent reported, so we dont overreport */
- int id; /* timeout id */
- GHashTable *table; /* the hashtable that we're registered in */
-};
-
-static void
-went_offline (CamelStore *store, void *data)
-{
- CORBA_Environment ev;
- GNOME_Evolution_ConnectionList *connection_list;
- GNOME_Evolution_OfflineProgressListener listener = data;
-
- connection_list = create_connection_list ();
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_OfflineProgressListener_updateProgress(listener, connection_list, &ev);
- if (ev._major != CORBA_NO_EXCEPTION)
- g_warning ("Error updating offline progress");
- CORBA_Object_release(listener, &ev);
-
- CORBA_exception_free (&ev);
- CORBA_free (connection_list);
-}
-
-static void
-store_go_offline (gpointer key, gpointer value, gpointer data)
-{
- CamelStore *store = key;
- GNOME_Evolution_OfflineProgressListener listener = data;
- CORBA_Environment ev;
-
- CORBA_exception_init(&ev);
- if (service_is_relevant (CAMEL_SERVICE (store), TRUE)) {
- mail_store_set_offline (store, TRUE, went_offline, CORBA_Object_duplicate(listener, &ev));
- }
- CORBA_exception_free(&ev);
-}
-
-static void
-impl_goOffline (PortableServer_Servant servant,
- const GNOME_Evolution_OfflineProgressListener progress_listener,
- CORBA_Environment *ev)
-{
- MailOfflineHandler *offline_handler;
-
- offline_handler = MAIL_OFFLINE_HANDLER (bonobo_object_from_servant (servant));
-
- /* 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_component_stores_foreach (mail_component_peek (), store_go_offline, progress_listener);
-}
-
-static void
-store_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);
- mail_note_store (store, NULL, 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_component_stores_foreach (mail_component_peek (), store_go_online, NULL);
-}
-
-/* GObject methods. */
-
-static void
-impl_finalise (GObject *object)
-{
- MailOfflineHandler *offline_handler;
- MailOfflineHandlerPrivate *priv;
-
- offline_handler = MAIL_OFFLINE_HANDLER (object);
- priv = offline_handler->priv;
- g_hash_table_destroy(priv->sync_table);
- g_free (priv);
-
- if (G_OBJECT_CLASS (parent_class)->finalize != NULL)
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
-}
-
-/* GTK+ type initialization. */
-
-static void
-mail_offline_handler_class_init (MailOfflineHandlerClass *klass)
-{
- GObjectClass *object_class;
- POA_GNOME_Evolution_Offline__epv *epv;
-
- object_class = G_OBJECT_CLASS (klass);
- object_class->finalize = impl_finalise;
-
- epv = & klass->epv;
- epv->_get_isOffline = impl__get_isOffline;
- epv->prepareForOffline = impl_prepareForOffline;
- epv->goOffline = impl_goOffline;
- epv->goOnline = impl_goOnline;
-
- parent_class = g_type_class_ref(PARENT_TYPE);
-}
-
-static void
-mail_offline_handler_init (MailOfflineHandler *offline_handler)
-{
- MailOfflineHandlerPrivate *priv;
-
- priv = g_new (MailOfflineHandlerPrivate, 1);
- priv->sync_table = g_hash_table_new(g_str_hash, g_str_equal);
-
- offline_handler->priv = priv;
-}
-
-MailOfflineHandler *
-mail_offline_handler_new (void)
-{
- MailOfflineHandler *new;
-
- new = g_object_new(mail_offline_handler_get_type (), NULL);
-
- return new;
-}
-
-BONOBO_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 4e6a811d98..0000000000
--- a/mail/mail-offline-handler.h
+++ /dev/null
@@ -1,65 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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_
-
-#include <bonobo/bonobo-object.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) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MAIL_TYPE_OFFLINE_HANDLER, MailOfflineHandler))
-#define MAIL_OFFLINE_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MAIL_TYPE_OFFLINE_HANDLER, MailOfflineHandlerClass))
-#define MAIL_IS_OFFLINE_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MAIL_TYPE_OFFLINE_HANDLER))
-#define MAIL_IS_OFFLINE_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), MAIL_TYPE_OFFLINE_HANDLER))
-
-
-typedef struct _MailOfflineHandler MailOfflineHandler;
-typedef struct _MailOfflineHandlerPrivate MailOfflineHandlerPrivate;
-typedef struct _MailOfflineHandlerClass MailOfflineHandlerClass;
-
-struct _MailOfflineHandler {
- BonoboObject parent;
-
- MailOfflineHandlerPrivate *priv;
-};
-
-struct _MailOfflineHandlerClass {
- BonoboObjectClass parent_class;
-
- POA_GNOME_Evolution_Offline__epv epv;
-};
-
-
-GType 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 1f5e75cb42..0000000000
--- a/mail/mail-ops.c
+++ /dev/null
@@ -1,2449 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <errno.h>
-#include <libgnome/gnome-exec.h>
-#include <gal/util/e-util.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-component.h"
-#include "mail-tools.h"
-#include "mail-ops.h"
-#include "mail-vfolder.h"
-#include "mail-session.h"
-#include "composer/e-msg-composer.h"
-
-#include "filter/filter-filter.h"
-
-#include "mail-mt.h"
-#include "mail-folder-cache.h"
-
-#include "em-utils.h"
-
-#define w(x)
-#define d(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);
- camel_filter_driver_flush (m->driver, &mm->ex);
-
- if (folder_uids)
- camel_folder_free_uids (folder, folder_uids);
-
- /* sync our source folder */
- if (!m->cache)
- camel_folder_sync (folder, FALSE, camel_exception_is_set (&mm->ex) ? NULL : &mm->ex);
- camel_folder_thaw (folder);
-
- if (m->destination)
- camel_folder_thaw (m->destination);
-
- /* this may thaw/unref source folders, do it here so we dont do it in the main thread
- see also fetch_mail_fetch() below */
- camel_object_unref(m->driver);
- m->driver = NULL;
-
- 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;
-
- if (m->source_folder)
- camel_object_unref (m->source_folder);
-
- if (m->source_uids)
- em_utils_uids_free (m->source_uids);
-
- if (m->cancel)
- camel_operation_unref (m->cancel);
-
- if (m->destination)
- camel_object_unref (m->destination);
-
- if (m->driver)
- camel_object_unref (m->driver);
-
- mail_session_flush_filter_log ();
-}
-
-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, gboolean notify,
- 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 (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);
-
- if (!notify) {
- /* FIXME: have a #define NOTIFY_FILTER_NAME macro? */
- /* the filter name has to stay in sync with mail-session::get_filter_driver */
- camel_filter_driver_remove_rule_by_name (m->driver, "new-mail-notification");
- }
-
- 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, FALSE, 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, *old_location;
- struct stat st;
-
- 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/mail/pop3/cache-%s",
- mail_component_peek_base_directory (mail_component_peek ()), encoded_url);
-
- /* lame hack, but we can't expect user's to actually migrate
- their cache files - brain power requirements are too
- high. */
- if (stat (filename, &st) == -1) {
- /* This is either the first time the user has checked
- mail with this POP provider or else their cache
- file is in the old location... */
- old_location = g_strdup_printf ("%s/config/cache-%s",
- mail_component_peek_base_directory (mail_component_peek ()),
- encoded_url);
- if (stat (old_location, &st) == -1) {
- /* old location doesn't exist either so use the new location */
- g_free (old_location);
- } else {
- /* old location exists, so I guess we use the old cache file location */
- g_free (filename);
- filename = old_location;
- }
- }
-
- 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)
- goto fail;
-
- /* 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);
-
- /* save the cache of uids that we've just downloaded */
- 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 (fm->source_folder);
- fm->source_folder = NULL;
- }
- }
-fail:
- 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) */
- if (fm->driver) {
- camel_object_unref (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;
-
-static char *normal_recipients[] = {
- CAMEL_RECIPIENT_TYPE_TO,
- CAMEL_RECIPIENT_TYPE_CC,
- CAMEL_RECIPIENT_TYPE_BCC
-};
-
-static char *resent_recipients[] = {
- CAMEL_RECIPIENT_TYPE_RESENT_TO,
- CAMEL_RECIPIENT_TYPE_RESENT_CC,
- CAMEL_RECIPIENT_TYPE_RESENT_BCC
-};
-
-/* send 1 message to a specific transport */
-static void
-mail_send_message (CamelMimeMessage *message, const char *destination,
- CamelFilterDriver *driver, CamelException *ex)
-{
- EAccount *account = NULL;
- const CamelInternetAddress *iaddr;
- CamelAddress *from, *recipients;
- CamelMessageInfo *info;
- CamelTransport *xport = NULL;
- char *transport_url = NULL;
- char *sent_folder_uri = NULL;
- const char *resent_from;
- CamelFolder *folder = NULL;
- GString *err = NULL;
- XEvolution *xev;
- int i;
-
- camel_medium_set_header (CAMEL_MEDIUM (message), "X-Mailer",
- "Ximian Evolution " VERSION SUB_VERSION " " VERSION_COMMENT);
-
- camel_mime_message_set_date (message, CAMEL_MESSAGE_DATE_CURRENT, 0);
-
- xev = mail_tool_remove_xevolution_headers (message);
-
- if (xev->account) {
- char *name;
-
- name = g_strstrip (g_strdup (xev->account));
- account = mail_config_get_account_by_name (name);
- g_free (name);
-
- if (account) {
- if (account->transport && account->transport->url)
- transport_url = g_strdup (account->transport->url);
-
- sent_folder_uri = g_strdup (account->sent_folder_uri);
- }
- }
-
- if (!account) {
- /* default back to these headers */
- if (xev->transport)
- transport_url = g_strstrip (g_strdup (xev->transport));
-
- if (xev->fcc)
- sent_folder_uri = g_strstrip (g_strdup (xev->fcc));
- }
-
- xport = camel_session_get_transport (session, transport_url ? transport_url : destination, ex);
- g_free (transport_url);
- if (!xport) {
- mail_tool_restore_xevolution_headers (message, xev);
- mail_tool_destroy_xevolution (xev);
- g_free (sent_folder_uri);
- return;
- }
-
- from = (CamelAddress *) camel_internet_address_new ();
- resent_from = camel_medium_get_header (CAMEL_MEDIUM (message), "Resent-From");
- if (resent_from) {
- camel_address_decode (from, resent_from);
- } else {
- iaddr = camel_mime_message_get_from (message);
- camel_address_copy (from, CAMEL_ADDRESS (iaddr));
- }
-
- recipients = (CamelAddress *) camel_internet_address_new ();
- for (i = 0; i < 3; i++) {
- const char *type;
-
- type = resent_from ? resent_recipients[i] : normal_recipients[i];
- iaddr = camel_mime_message_get_recipients (message, type);
- camel_address_cat (recipients, CAMEL_ADDRESS (iaddr));
- }
-
- camel_transport_send_to (xport, message, from, recipients, ex);
- camel_object_unref (recipients);
- camel_object_unref (from);
-
- mail_tool_restore_xevolution_headers (message, xev);
- mail_tool_destroy_xevolution (xev);
-
- camel_object_unref (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;
-
- if (sent_folder_uri) {
- folder = mail_tool_uri_to_folder (sent_folder_uri, 0, ex);
- camel_exception_clear (ex);
- g_free (sent_folder_uri);
- }
-
- if (!folder) {
- camel_object_ref (sent_folder);
- folder = sent_folder;
- }
-
- if (driver) {
- camel_filter_driver_filter_message (driver, message, info,
- NULL, NULL, NULL, "", ex);
-
- if (camel_exception_is_set (ex)) {
- if (camel_exception_get_id (ex) == CAMEL_EXCEPTION_USER_CANCEL)
- goto exit;
-
- /* save this error */
- err = g_string_new ("");
- g_string_append_printf (err, _("Failed to apply outgoing filters: %s"),
- camel_exception_get_description (ex));
- }
- }
-
- retry_append:
- camel_exception_clear (ex);
- camel_folder_append_message (folder, message, info, NULL, ex);
- if (camel_exception_is_set (ex)) {
- if (camel_exception_get_id (ex) == CAMEL_EXCEPTION_USER_CANCEL)
- goto exit;
-
- if (err == NULL)
- err = g_string_new ("");
- else
- g_string_append (err, "\n\n");
-
- if (folder != sent_folder) {
- const char *name;
-
- camel_object_get (folder, NULL, CAMEL_OBJECT_DESCRIPTION, (char **) &name, 0);
- g_string_append_printf (err, _("Failed to append to %s: %s\n"
- "Appending to local `Sent' folder instead."),
- name, camel_exception_get_description (ex));
- camel_object_ref (sent_folder);
- camel_object_unref (folder);
- folder = sent_folder;
-
- goto retry_append;
- } else {
- g_string_append_printf (err, _("Failed to append to local `Sent' folder: %s"),
- camel_exception_get_description (ex));
- }
- }
-
- if (err != NULL) {
- /* set the culmulative exception report */
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, err->str);
- }
-
- exit:
-
- camel_folder_sync (folder, FALSE, NULL);
- camel_message_info_free (info);
- camel_object_unref (folder);
-
- if (err != NULL)
- g_string_free (err, TRUE);
-}
-
-/* ********************************************************************** */
-
-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;
- const char *subject;
-
- subject = camel_mime_message_get_subject (m->message);
-
- if (subject)
- return g_strdup_printf (_("Sending \"%s\""), subject);
- 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 (m->driver);
- camel_object_unref (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 (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(m->driver);
- camel_object_unref(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(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;
- char *appended_uid;
-
- void (*done)(CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, int ok, const char *appended_uid, 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, &m->appended_uid, &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->appended_uid, m->data);
-}
-
-static void
-append_mail_free (struct _mail_msg *mm)
-{
- struct _append_msg *m = (struct _append_msg *)mm;
-
- camel_object_unref(m->message);
- camel_object_unref(m->folder);
- g_free (m->appended_uid);
-}
-
-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, const char *appended_uid, 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(folder);
- m->message = message;
- camel_object_ref(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;
- guint32 dest_flags;
-
- 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;
-
- dest = mail_tool_uri_to_folder (m->dest_uri, m->dest_flags, &mm->ex);
- if (camel_exception_is_set (&mm->ex))
- return;
-
- if (dest == m->source) {
- camel_object_unref(dest);
- /* no-op */
- return;
- }
-
- camel_folder_freeze (m->source);
- camel_folder_freeze (dest);
-
- camel_folder_transfer_messages_to (m->source, m->uids, dest, NULL, m->delete, &mm->ex);
-
- /* make sure all deleted messages are marked as seen */
-
- if (m->delete) {
- int i;
-
- for (i = 0; i < m->uids->len; i++)
- camel_folder_set_message_flags (m->source, m->uids->pdata[i],
- CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN);
- }
-
- camel_folder_thaw (m->source);
- camel_folder_thaw (dest);
- camel_folder_sync (dest, FALSE, NULL);
- camel_object_unref (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;
-
- camel_object_unref (m->source);
- g_free (m->dest_uri);
- em_utils_uids_free (m->uids);
-}
-
-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,
- guint32 dest_flags,
- 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 (source);
- m->uids = uids;
- m->delete = delete_from_source;
- m->dest_uri = g_strdup (dest_uri);
- m->dest_flags = dest_flags;
- 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_or_vjunk_info (CamelStore *store, CamelFolderInfo *info, gchar *name, gchar *full_name, gchar *url_base, gboolean unread_count)
-{
- CamelFolderInfo *fi, *vinfo, *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, name))
- break;
- parent = fi;
- }
-
- /* create our vTrash/vJunk URL */
- url = camel_url_new (info->url, NULL);
- path = g_strdup_printf ("/%s", name);
- if (url->fragment)
- camel_url_set_fragment (url, path);
- else
- 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/Junk folder with our vTrash/vJunk folder */
- vinfo = fi;
- g_free (vinfo->full_name);
- g_free (vinfo->name);
- g_free (vinfo->url);
- } else {
- /* There wasn't a Trash/Junk folder so create a new folder entry */
- vinfo = g_new0 (CamelFolderInfo, 1);
-
- g_assert(parent != NULL);
-
- /* link it into the right spot */
- vinfo->sibling = parent->sibling;
- parent->sibling = vinfo;
- }
-
- /* Fill in the new fields */
- vinfo->full_name = g_strdup (full_name);
- vinfo->name = g_strdup(vinfo->full_name);
- vinfo->url = g_strdup_printf ("%s:%s", url_base, uri);
- if (!unread_count)
- vinfo->unread_message_count = -1;
- vinfo->path = g_strdup_printf("/%s", vinfo->name);
- g_free (uri);
-}
-
-static void
-add_vtrash_info (CamelStore *store, CamelFolderInfo *info)
-{
- add_vtrash_or_vjunk_info (store, info, CAMEL_VTRASH_NAME, _("Trash"), "vtrash", FALSE);
-}
-
-static void
-add_vjunk_info (CamelStore *store, CamelFolderInfo *info)
-{
- add_vtrash_or_vjunk_info (store, info, CAMEL_VJUNK_NAME, _("Junk"), "vjunk", TRUE);
-}
-
-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(_("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 (m->info->url && (m->store->flags & CAMEL_STORE_VJUNK))
- add_vjunk_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));
- w(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(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, CamelOperation *op, 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));
- if (op) {
- camel_operation_unref(m->msg.cancel);
- m->msg.cancel = op;
- camel_operation_ref(op);
- }
- m->store = store;
- camel_object_ref(store);
- m->done = done;
- m->data = data;
- id = m->msg.seq;
-
- e_thread_put(mail_thread_new, (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(part);
- }
- part = camel_mime_part_new();
- camel_medium_set_content_object(CAMEL_MEDIUM (part), CAMEL_DATA_WRAPPER(multipart));
- camel_object_unref(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(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 should 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;
- guint32 flags;
- 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, m->flags, &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 (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, guint32 flags,
- 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->flags = flags;
- 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;
-
- /*camel_session_get_store connects us, which we don't want to do on startup. */
-
- m->store = (CamelStore *) camel_session_get_service (session, m->uri,
- CAMEL_PROVIDER_STORE,
- &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 (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, CamelOperation *op, 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));
- if (op) {
- camel_operation_unref(m->msg.cancel);
- m->msg.cancel = op;
- camel_operation_ref(op);
- }
- 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, 0, &mm->ex);
- if (!folder)
- return;
-
- store = folder->parent_store;
-
- /* Delete every message in this folder, then expunge it */
- uids = camel_folder_get_uids (folder);
- camel_folder_freeze(folder);
- for (i = 0; i < uids->len; i++)
- camel_folder_delete_message (folder, uids->pdata[i]);
- camel_folder_sync (folder, TRUE, NULL);
- camel_folder_thaw(folder);
- 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 (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(folder);
- m->data = data;
- m->done = done;
-
- e_thread_put(mail_thread_queued_slow, (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(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(folder);
- m->data = data;
- m->done = done;
-
- e_thread_put(mail_thread_queued_slow, (EMsg *)m);
-}
-
-/* ******************************************************************************** */
-
-struct _empty_trash_msg {
- struct _mail_msg msg;
-
- EAccount *account;
- void (*done) (EAccount *account, void *data);
- void *data;
-};
-
-static char *empty_trash_desc(struct _mail_msg *mm, int done)
-{
- /* FIXME after 1.4 is out and we're not in string freeze any more. */
-#if 0
- struct _empty_trash_msg *m = (struct _empty_trash_msg *)mm;
-
- return g_strdup_printf (_("Emptying trash in \'%s\'"),
- m->account ? m->account->name : _("Local Folders"));
-#else
- return g_strdup(_("Expunging folder"));
-#endif
-}
-
-static void empty_trash_empty(struct _mail_msg *mm)
-{
- struct _empty_trash_msg *m = (struct _empty_trash_msg *)mm;
- const char *evolution_dir;
- CamelFolder *trash;
- char *uri;
-
- if (m->account) {
- trash = mail_tool_get_trash (m->account->source->url, FALSE, &mm->ex);
- } else {
- evolution_dir = mail_component_peek_base_directory (mail_component_peek ());
- uri = g_strdup_printf ("mbox:%s/mail/local", evolution_dir);
- trash = mail_tool_get_trash (uri, TRUE, &mm->ex);
- g_free (uri);
- }
-
- if (trash)
- camel_folder_expunge (trash, &mm->ex);
-
- camel_object_unref (trash);
-}
-
-static void empty_trash_emptied(struct _mail_msg *mm)
-{
- struct _empty_trash_msg *m = (struct _empty_trash_msg *)mm;
-
- if (m->done)
- m->done(m->account, m->data);
-}
-
-static void empty_trash_free(struct _mail_msg *mm)
-{
- struct _empty_trash_msg *m = (struct _empty_trash_msg *)mm;
-
- if (m->account)
- g_object_unref(m->account);
-}
-
-static struct _mail_msg_op empty_trash_op = {
- empty_trash_desc,
- empty_trash_empty,
- empty_trash_emptied,
- empty_trash_free,
-};
-
-void
-mail_empty_trash(EAccount *account, void (*done) (EAccount *account, void *data), void *data)
-{
- struct _empty_trash_msg *m;
-
- m = mail_msg_new(&empty_trash_op, NULL, sizeof(*m));
- m->account = account;
- if (account)
- g_object_ref(account);
- m->data = data;
- m->done = done;
-
- e_thread_put(mail_thread_queued_slow, (EMsg *)m);
-}
-
-/* ** GET MESSAGE(s) ***************************************************** */
-
-struct _get_message_msg {
- struct _mail_msg msg;
-
- CamelFolder *folder;
- char *uid;
- void (*done) (CamelFolder *folder, const 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 (m->folder);
- camel_operation_unref (m->cancel);
-
- if (m->message)
- camel_object_unref (m->message);
-}
-
-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, const 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(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;
-
- em_utils_uids_free (m->uids);
- for (i=0;i<m->messages->len;i++) {
- if (m->messages->pdata[i])
- camel_object_unref(m->messages->pdata[i]);
- }
- g_ptr_array_free(m->messages, TRUE);
- camel_object_unref(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(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);
-}
-
-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 (camel_content_type_is (type, "text", "*"))
- camel_mime_part_set_encoding (mime_part, CAMEL_TRANSFER_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(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 = camel_mime_message_build_mbox_from(message);
- 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(message);
- }
-
- camel_object_unref(filtered_stream);
- camel_object_unref(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;
-
- em_utils_uids_free (m->uids);
- camel_object_unref(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(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;
- CamelStream *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, 0666);
- if (stream_fs == NULL) {
- camel_exception_setv (&mm->ex, CAMEL_EXCEPTION_SYSTEM,
- _("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 (camel_content_type_is (content_type, "text", "*")
- && (charset = camel_content_type_param (content_type, "charset"))
- && strcasecmp (charset, "utf-8") != 0) {
- charsetfilter = camel_mime_filter_charset_new_convert ("utf-8", charset);
- filtered_stream = (CamelStream *) camel_stream_filter_new_with_stream (stream_fs);
- camel_object_unref (CAMEL_OBJECT (stream_fs));
- if (charsetfilter) {
- camel_stream_filter_add (CAMEL_STREAM_FILTER (filtered_stream), CAMEL_MIME_FILTER (charsetfilter));
- camel_object_unref (charsetfilter);
- }
- } else {
- filtered_stream = stream_fs;
- }
-
- if (camel_data_wrapper_decode_to_stream (data, filtered_stream) == -1
- || camel_stream_flush (filtered_stream) == -1)
- camel_exception_setv (&mm->ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not write data: %s"),
- g_strerror (errno));
-
- camel_object_unref (filtered_stream);
-}
-
-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 (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 (part);
- 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;
-}
-
-
-/* ** PREPARE OFFLINE ***************************************************** */
-
-struct _prep_offline_msg {
- struct _mail_msg msg;
-
- CamelOperation *cancel;
- char *uri;
- void (*done)(const char *uri, void *data);
- void *data;
-};
-
-static void prep_offline_do(struct _mail_msg *mm)
-{
- struct _prep_offline_msg *m = (struct _prep_offline_msg *)mm;
- CamelFolder *folder;
-
- if (m->cancel)
- camel_operation_register(m->cancel);
-
- folder = mail_tool_uri_to_folder(m->uri, 0, &mm->ex);
- if (folder) {
- if (CAMEL_IS_DISCO_FOLDER(folder)) {
- camel_disco_folder_prepare_for_offline((CamelDiscoFolder *)folder,
- "(match-all)",
- &mm->ex);
- }
- /* prepare_for_offline should do this? */
- /* of course it should all be atomic, but ... */
- camel_folder_sync(folder, FALSE, NULL);
- camel_object_unref(folder);
- }
-
- if (m->cancel)
- camel_operation_unregister(m->cancel);
-}
-
-static void prep_offline_done(struct _mail_msg *mm)
-{
- struct _prep_offline_msg *m = (struct _prep_offline_msg *)mm;
-
- if (m->done)
- m->done(m->uri, m->data);
-}
-
-static void prep_offline_free(struct _mail_msg *mm)
-{
- struct _prep_offline_msg *m = (struct _prep_offline_msg *)mm;
-
- if (m->cancel)
- camel_operation_unref(m->cancel);
- g_free(m->uri);
-}
-
-static struct _mail_msg_op prep_offline_op = {
- NULL, /* DO NOT CHANGE THIS, IT MUST BE NULL FOR CANCELLATION TO WORK */
- prep_offline_do,
- prep_offline_done,
- prep_offline_free,
-};
-
-void
-mail_prep_offline(const char *uri,
- CamelOperation *cancel,
- void (*done)(const char *, void *data),
- void *data)
-{
- struct _prep_offline_msg *m;
-
- m = mail_msg_new(&prep_offline_op, NULL, sizeof(*m));
- m->cancel = cancel;
- if (cancel)
- camel_operation_ref(cancel);
- m->uri = g_strdup(uri);
- m->data = data;
- m->done = done;
-
- e_thread_put(mail_thread_queued, (EMsg *)m);
-}
-
-/* ** 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)) {
- if (!m->offline) {
- camel_disco_store_set_status (CAMEL_DISCO_STORE (m->store),
- CAMEL_DISCO_STORE_ONLINE,
- &mm->ex);
- return;
- } else if (camel_disco_store_can_work_offline (CAMEL_DISCO_STORE (m->store))) {
- camel_disco_store_set_status (CAMEL_DISCO_STORE (m->store),
- CAMEL_DISCO_STORE_OFFLINE,
- &mm->ex);
- return;
- }
- }
-
- if (m->offline)
- camel_service_disconnect (CAMEL_SERVICE (m->store),
- TRUE, &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(m->store);
-}
-
-static struct _mail_msg_op set_offline_op = {
- set_offline_desc,
- set_offline_do,
- set_offline_done,
- set_offline_free,
-};
-
-int
-mail_store_set_offline (CamelStore *store, gboolean offline,
- void (*done)(CamelStore *, void *data),
- void *data)
-{
- struct _set_offline_msg *m;
- int id;
-
- /* 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(store);
- m->offline = offline;
- m->data = data;
- m->done = done;
-
- id = m->msg.seq;
- e_thread_put(mail_thread_new, (EMsg *)m);
-
- return id;
-}
-
-/* ** Execute Shell Command ***************************************************** */
-
-void
-mail_execute_shell_command (CamelFilterDriver *driver, int argc, char **argv, void *data)
-{
- if (argc <= 0)
- return;
-
- gnome_execute_async_fds (NULL, argc, argv, TRUE);
-}
-
-/* [Un]mark junk flag */
-
-struct _mark_junk_mail_msg {
- struct _mail_msg msg;
-
- CamelFolder *folder;
- MessageList *list;
- gboolean junk;
-};
-
-static char *
-mark_junk_describe (struct _mail_msg *mm, int complete)
-{
- return g_strdup (_("Changing junk status"));
-}
-
-/* filter a folder, or a subset thereof, uses source_folder/source_uids */
-/* this is shared with fetch_mail */
-static void
-mark_junk_mark (struct _mail_msg *mm)
-{
- struct _mark_junk_mail_msg *m = (struct _mark_junk_mail_msg *) mm;
- CamelJunkPlugin *csp = NULL;
- GPtrArray *uids;
- gboolean commit_reports = FALSE;
- int i;
-
- if (m->folder == NULL)
- return;
-
- uids = message_list_get_selected (m->list);
- camel_folder_freeze (m->folder);
-
- for (i=0; i<uids->len; i++) {
- guint32 flags;
-
- flags = camel_folder_get_message_flags (m->folder, uids->pdata[i]);
- if (((flags & CAMEL_MESSAGE_JUNK) == CAMEL_MESSAGE_JUNK) != m->junk) {
- CamelMimeMessage *msg = camel_folder_get_message (m->folder, uids->pdata[i], NULL);
-
- if (msg) {
- csp = CAMEL_SERVICE (m->folder->parent_store)->session->junk_plugin;
- if (m->junk)
- camel_junk_plugin_report_junk (csp, msg);
- else
- camel_junk_plugin_report_notjunk (csp, msg);
-
- commit_reports = TRUE;
- camel_object_unref (msg);
- }
- }
- camel_folder_set_message_flags(m->folder, uids->pdata[i],
- CAMEL_MESSAGE_JUNK | (m->junk ? CAMEL_MESSAGE_DELETED : 0),
- m->junk ? CAMEL_MESSAGE_JUNK : 0);
- }
-
- if (commit_reports)
- camel_junk_plugin_commit_reports (csp);
-
- message_list_free_uids(m->list, uids);
- camel_folder_thaw(m->folder);
-}
-
-static void
-mark_junk_marked (struct _mail_msg *mm)
-{
-}
-
-static void
-mark_junk_free (struct _mail_msg *mm)
-{
- struct _mark_junk_mail_msg *m = (struct _mark_junk_mail_msg *)mm;
-
- if (m->folder)
- camel_object_unref (m->folder);
-}
-
-static struct _mail_msg_op mark_junk_op = {
- mark_junk_describe,
- mark_junk_mark,
- mark_junk_marked,
- mark_junk_free,
-};
-
-void
-mail_mark_junk (CamelFolder *folder, MessageList *list, gboolean junk)
-{
- struct _mark_junk_mail_msg *m;
-
- m = mail_msg_new (&mark_junk_op, NULL, sizeof (*m));
- m->folder = folder;
- camel_object_ref (folder);
- m->list = list;
- m->junk = junk;
-
- e_thread_put (mail_thread_new, (EMsg *) m);
-}
diff --git a/mail/mail-ops.h b/mail/mail-ops.h
deleted file mode 100644
index 142052277d..0000000000
--- a/mail/mail-ops.h
+++ /dev/null
@@ -1,167 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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-store.h"
-#include "camel/camel-folder.h"
-#include "camel/camel-filter-driver.h"
-#include "camel/camel-mime-message.h"
-#include "camel/camel-operation.h"
-
-#include "message-list.h"
-
-#include "e-util/e-msgport.h"
-#include "e-util/e-account.h"
-
-void mail_append_mail (CamelFolder *folder, CamelMimeMessage *message, CamelMessageInfo *info,
- void (*done)(CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, int ok,
- const char *appended_uid, void *data),
- void *data);
-
-void mail_transfer_messages (CamelFolder *source, GPtrArray *uids,
- gboolean delete_from_source,
- const char *dest_uri,
- guint32 dest_flags,
- 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, const 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, guint32 flags,
- void (*done) (char *uri, CamelFolder *folder, void *data), void *data,
- EThread *thread);
-
-/* and for a store */
-int mail_get_store (const char *uri, CamelOperation *op,
- 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);
-
-void mail_empty_trash (EAccount *account,
- void (*done) (EAccount *account, void *data),
- void *data);
-
-/* get folder info asynchronously */
-int mail_get_folderinfo (CamelStore *store, CamelOperation *op,
- 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);
-
-
-/* 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, gboolean notify,
- CamelOperation *cancel);
-
-/* convenience function for above */
-void mail_filter_on_demand (CamelFolder *folder, GPtrArray *uids);
-
-/* Work Offline */
-void mail_prep_offline(const char *uri, CamelOperation *cancel,
- void (*done)(const char *, void *data),
- void *data);
-int mail_store_set_offline(CamelStore *store, gboolean offline,
- void (*done)(CamelStore *, void *data),
- void *data);
-
-/* filter driver execute shell command async callback */
-void mail_execute_shell_command (CamelFilterDriver *driver, int argc, char **argv, void *data);
-
-void mail_mark_junk (CamelFolder *folder, MessageList *list, gboolean junk);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* MAIL_OPS_H */
diff --git a/mail/mail-search.glade b/mail/mail-search.glade
deleted file mode 100644
index 10b84e99a2..0000000000
--- a/mail/mail-search.glade
+++ /dev/null
@@ -1,197 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-
-<widget class="GtkDialog" id="search_message_dialog">
- <property name="visible">True</property>
- <property name="title" translatable="yes">Find in Message</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_CENTER</property>
- <property name="modal">False</property>
- <property name="resizable">False</property>
- <property name="destroy_with_parent">False</property>
- <property name="has_separator">True</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="button1">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">-6</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="button2">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-find</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">-3</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frame1">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkVBox" id="vbox1">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHBox" id="hbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Find:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="search_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="search_matches_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="search_case_check">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Case Sensitive</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="search_subject_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Search</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/mail/mail-security.glade b/mail/mail-security.glade
deleted file mode 100644
index 5dfbed673e..0000000000
--- a/mail/mail-security.glade
+++ /dev/null
@@ -1,214 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-
-<widget class="GtkDialog" id="message_security_dialog">
- <property name="visible">True</property>
- <property name="title" translatable="yes">Security Information</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="has_separator">True</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area2">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="okbutton1">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">-5</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkNotebook" id="notebook1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="show_tabs">True</property>
- <property name="show_border">True</property>
- <property name="tab_pos">GTK_POS_TOP</property>
- <property name="scrollable">False</property>
- <property name="enable_popup">False</property>
-
- <child>
- <widget class="GtkVBox" id="vbox161">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkFrame" id="frame5">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkVBox" id="signature_vbox">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <placeholder/>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label475">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Digital Signature</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frame6">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkVBox" id="encryption_vbox">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <placeholder/>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label476">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Encryption</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label473">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Summary</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <placeholder/>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label474">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Details</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c
deleted file mode 100644
index e7d546294d..0000000000
--- a/mail/mail-send-recv.c
+++ /dev/null
@@ -1,943 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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>
-
-/* for the dialogue stuff */
-#include <glib.h>
-#include <gtk/gtkmain.h>
-#include <gtk/gtkdialog.h>
-#include <gtk/gtkstock.h>
-#include <libgnomeui/gnome-window-icon.h>
-
-#include "e-util/e-gtk-utils.h"
-
-#include "widgets/misc/e-clipped-label.h"
-#include "filter/filter-filter.h"
-#include "camel/camel-filter-driver.h"
-#include "camel/camel-folder.h"
-#include "camel/camel-operation.h"
-
-#include "mail.h"
-#include "mail-mt.h"
-#include "mail-component.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)
-
-/* pseudo-uri to key the send task on */
-#define SEND_URI_KEY "send-task:"
-
-/* 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;
-
- GtkDialog *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_INVALID
-} 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;
- EClippedLabel *status;
-
- int timeout_id;
- char *what;
- int pc;
-
- /*time_t update;*/
- struct _send_data *data;
-};
-
-static struct _send_data *send_data = NULL;
-static GtkWidget *send_recv_dialogue = 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)
- e_clipped_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(info->folder);
- g_free(info->uri);
- g_free(info);
-}
-
-static void free_send_info(void *key, struct _send_info *info, void *data)
-{
- g_free(info->uri);
- camel_operation_unref(info->cancel);
- if (info->timeout_id != 0)
- g_source_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(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) {
- g_source_remove (info->timeout_id);
- info->timeout_id = 0;
- }
-}
-
-static void
-dialog_destroy_cb (struct _send_data *data, GObject *deadbeef)
-{
- g_hash_table_foreach (data->active, (GHFunc) hide_send_info, NULL);
- data->gd = NULL;
- send_recv_dialogue = NULL;
-}
-
-static void
-dialogue_response(GtkDialog *gd, int button, struct _send_data *data)
-{
- switch(button) {
- case GTK_RESPONSE_CANCEL:
- d(printf("cancelled whole thing\n"));
- if (!data->cancelled) {
- data->cancelled = TRUE;
- g_hash_table_foreach(data->active, (GHFunc)cancel_send_info, NULL);
- }
- gtk_dialog_set_response_sensitive(gd, GTK_RESPONSE_CANCEL, FALSE);
- break;
- default:
- d(printf("hiding dialogue\n"));
- g_hash_table_foreach(data->active, (GHFunc)hide_send_info, NULL);
- data->gd = NULL;
- /*gtk_widget_destroy((GtkWidget *)gd);*/
- 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;
- CamelException ex;
-
- camel_exception_init(&ex);
- provider = camel_session_get_provider (session, url, &ex);
- camel_exception_clear(&ex);
- if (!provider)
- return SEND_INVALID;
-
- if (provider->object_types[CAMEL_PROVIDER_STORE]) {
- if (provider->flags & CAMEL_PROVIDER_IS_STORAGE)
- return SEND_UPDATE;
- else
- return SEND_RECEIVE;
- } else if (provider->object_types[CAMEL_PROVIDER_TRANSPORT]) {
- return SEND_SEND;
- }
-
- return SEND_INVALID;
-}
-
-static struct _send_data *
-build_dialogue (EAccountList *accounts, CamelFolder *outbox, const char *destination)
-{
- GtkDialog *gd;
- GtkTable *table;
- int row, num_sources;
- GList *list = NULL;
- struct _send_data *data;
- GtkWidget *send_icon, *recv_icon;
- GtkLabel *label;
- EClippedLabel *status_label;
- GtkProgressBar *bar;
- GtkButton *stop;
- GtkHSeparator *line;
- struct _send_info *info;
- char *pretty_url;
- EAccount *account;
- EIterator *iter;
-
- gd = (GtkDialog *)send_recv_dialogue = gtk_dialog_new_with_buttons(_("Send & Receive Mail"), NULL, GTK_DIALOG_NO_SEPARATOR, NULL);
- stop = (GtkButton *)e_gtk_button_new_with_icon(_("Cancel _All"), GTK_STOCK_CANCEL);
- gtk_widget_show((GtkWidget *)stop);
- gtk_dialog_add_action_widget(gd, (GtkWidget *)stop, GTK_RESPONSE_CANCEL);
- gnome_window_icon_set_from_file (GTK_WINDOW (gd), EVOLUTION_ICONSDIR "/send-receive.xpm");
-
- num_sources = 0;
-
- iter = e_list_get_iterator ((EList *) accounts);
- while (e_iterator_is_valid (iter)) {
- account = (EAccount *) e_iterator_get (iter);
-
- if (account->source->url)
- num_sources++;
-
- e_iterator_next (iter);
- }
-
- g_object_unref (iter);
-
- table = (GtkTable *) gtk_table_new (num_sources, 4, FALSE);
- gtk_container_set_border_width ((GtkContainer *) table, 3);
-
- gtk_box_pack_start (GTK_BOX (gd->vbox), GTK_WIDGET (table), TRUE, TRUE, 0);
-
- /* must bet setup after send_recv_dialogue as it may re-trigger send-recv button */
- data = setup_send_data ();
-
- row = 0;
- iter = e_list_get_iterator ((EList *) accounts);
- while (e_iterator_is_valid (iter)) {
- EAccountService *source;
-
- account = (EAccount *) e_iterator_get (iter);
-
- source = account->source;
- if (!account->enabled || !source->url) {
- e_iterator_next (iter);
- continue;
- }
-
- /* see if we have an outstanding download active */
- info = g_hash_table_lookup (data->active, source->url);
- if (info == NULL) {
- send_info_t type;
-
- type = get_receive_type (source->url);
- if (type == SEND_INVALID || type == SEND_SEND) {
- e_iterator_next (iter);
- continue;
- }
-
- info = g_malloc0 (sizeof (*info));
- info->type = type;
-
- 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 = g_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 */
- e_iterator_next (iter);
- continue;
- } else if (info->timeout_id == 0)
- info->timeout_id = g_timeout_add (STATUS_TIMEOUT, operation_status_timeout, info);
-
- recv_icon = gtk_image_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 ();
-
- stop = (GtkButton *)e_gtk_button_new_with_icon(_("Cancel"), GTK_STOCK_CANCEL);
-
- status_label = (EClippedLabel *)e_clipped_label_new((info->type == SEND_UPDATE)?_("Updating..."):_("Waiting..."),
- PANGO_WEIGHT_NORMAL, 1.0);
-
- /* g_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, 3);
- gtk_table_attach (table, (GtkWidget *)label, 1, 2, row, row+1, GTK_EXPAND | GTK_FILL, 0, 3, 3);
- gtk_table_attach (table, (GtkWidget *)bar, 2, 3, row, row+2, GTK_EXPAND | GTK_FILL, 0, 3, 3);
- gtk_table_attach (table, (GtkWidget *)stop, 3, 4, row, row+2, GTK_EXPAND | GTK_FILL, 0, 3, 3);
- gtk_table_attach (table, (GtkWidget *)status_label, 1, 2, row+1, row+2, GTK_EXPAND | GTK_FILL, 0, 3, 3);
-
- info->bar = bar;
- info->status = status_label;
- info->stop = stop;
- info->data = data;
-
- g_signal_connect (stop, "clicked", G_CALLBACK(receive_cancel), info);
- e_iterator_next (iter);
- row = row + 2;
- }
-
- g_object_unref (iter);
-
- if (outbox && destination) {
- info = g_hash_table_lookup (data->active, SEND_URI_KEY);
- 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 = g_timeout_add (STATUS_TIMEOUT, operation_status_timeout, info);
-
- g_hash_table_insert (data->active, SEND_URI_KEY, info);
- list = g_list_prepend (list, info);
- } else if (info->timeout_id == 0)
- info->timeout_id = g_timeout_add (STATUS_TIMEOUT, operation_status_timeout, info);
-
- send_icon = gtk_image_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 *)e_gtk_button_new_with_icon(_("Cancel"), GTK_STOCK_CANCEL);
-
- status_label = (EClippedLabel *)e_clipped_label_new(_("Waiting..."), PANGO_WEIGHT_NORMAL, 1.0);
-
- gtk_misc_set_alignment (GTK_MISC (label), 0, .5);
- gtk_misc_set_alignment (GTK_MISC (status_label), 0, .5);
-
- gtk_table_attach (table, GTK_WIDGET (send_icon), 0, 1, row, row+2, GTK_EXPAND | GTK_FILL, 0, 3, 3);
- gtk_table_attach (table, GTK_WIDGET (label), 1, 2, row, row+1, GTK_EXPAND | GTK_FILL, 0, 3, 3);
- gtk_table_attach (table, GTK_WIDGET (bar), 2, 3, row, row+2, GTK_EXPAND | GTK_FILL, 0, 3, 3);
- gtk_table_attach (table, GTK_WIDGET (stop), 3, 4, row, row+2, GTK_EXPAND | GTK_FILL, 0, 3, 3);
- gtk_table_attach (table, GTK_WIDGET (status_label), 1, 2, row+1, row+2, GTK_EXPAND | GTK_FILL, 0, 3, 3);
-
- info->bar = bar;
- info->stop = stop;
- info->data = data;
- info->status = status_label;
-
- g_signal_connect(stop, "clicked", G_CALLBACK(receive_cancel), info);
- gtk_widget_show_all (GTK_WIDGET (table));
- }
-
- gtk_widget_show (GTK_WIDGET (gd));
-
- g_signal_connect (gd, "response", G_CALLBACK (dialogue_response), data);
-
- g_object_weak_ref ((GObject *) gd, (GWeakNotify) dialog_destroy_cb, 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_bar_set_fraction((GtkProgressBar *)info->bar, (gfloat)(info->pc/100.0));
- if (info->what)
- e_clipped_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_bar_set_fraction((GtkProgressBar *)info->bar, (gfloat)1.0);
-
- switch(info->state) {
- case SEND_CANCELLED:
- e_clipped_label_set_text(info->status, _("Cancelled."));
- break;
- default:
- info->state = SEND_COMPLETE;
- e_clipped_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", G_GNUC_FUNCTION, info));
- if (info->type == SEND_SEND)
- g_hash_table_remove(info->data->active, SEND_URI_KEY);
- else
- 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)
- gtk_widget_destroy((GtkWidget *)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(oldinfo->folder);
- return oldinfo->folder;
- }
- folder = mail_tool_uri_to_folder (uri, 0, 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(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 (folder);
-
- g_mutex_unlock(info->data->lock);
-
- return folder;
-}
-
-static void
-receive_update_got_folderinfo (CamelStore *store, CamelFolderInfo *info, void *data)
-{
- receive_done ("", data);
-}
-
-static void
-receive_update_got_store (char *uri, CamelStore *store, void *data)
-{
- struct _send_info *info = data;
-
- if (store) {
- mail_get_folderinfo (store, info->cancel, receive_update_got_folderinfo, info);
- } else {
- receive_done ("", info);
- }
-}
-
-GtkWidget *mail_send_receive (void)
-{
- extern CamelFolder *outbox_folder;
- struct _send_data *data;
- EAccountList *accounts;
- EAccount *account;
- GList *scan;
-
- if (send_recv_dialogue != NULL) {
- if (GTK_WIDGET_REALIZED(send_recv_dialogue)) {
- gdk_window_show(send_recv_dialogue->window);
- gdk_window_raise(send_recv_dialogue->window);
- }
- return send_recv_dialogue;
- }
-
- if (!camel_session_is_online (session))
- return send_recv_dialogue;
-
- account = mail_config_get_default_account ();
- if (!account || !account->transport->url)
- return send_recv_dialogue;
-
- accounts = mail_config_get_accounts ();
-
- data = build_dialogue (accounts, outbox_folder, account->transport->url);
- scan = data->infos;
- 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:
- mail_get_store(info->uri, info->cancel, receive_update_got_store, info);
- break;
- default:
- g_assert_not_reached ();
- }
- scan = scan->next;
- }
-
- return send_recv_dialogue;
-}
-
-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);
- g_source_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 */
-void
-mail_autoreceive_setup (void)
-{
- EAccountList *accounts;
- GHashTable *set_hash;
- EIterator *iter;
-
- accounts = mail_config_get_accounts ();
-
- 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);
-
- iter = e_list_get_iterator ((EList *) accounts);
- while (e_iterator_is_valid (iter)) {
- EAccountService *source;
- EAccount *account;
-
- account = (EAccount *) e_iterator_get (iter);
- source = account->source;
-
- if (account->enabled && source->url && source->auto_check) {
- 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;
- g_source_remove(info->timeout_id);
- info->timeout_id = g_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 = g_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);*/
- }
- }
-
- e_iterator_next (iter);
- }
-
- g_object_unref (iter);
-
- g_hash_table_foreach(set_hash, (GHFunc)auto_clean_set, auto_active);
- g_hash_table_destroy(set_hash);
-}
-
-/* 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;
- send_info_t type;
-
- 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));
-
- type = get_receive_type (uri);
- if (type == SEND_INVALID || type == SEND_SEND) {
- d(printf ("unsupported provider: '%s'\n", uri));
- return;
- }
-
- info = g_malloc0 (sizeof (*info));
- info->type = type;
- 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:
- mail_get_store (info->uri, info->cancel, receive_update_got_store, info);
- break;
- default:
- g_assert_not_reached ();
- }
-}
-
-void
-mail_send (void)
-{
- extern CamelFolder *outbox_folder;
- EAccountService *transport;
- struct _send_info *info;
- struct _send_data *data;
- send_info_t type;
-
- transport = mail_config_get_default_transport ();
- if (!transport || !transport->url)
- return;
-
- data = setup_send_data ();
- info = g_hash_table_lookup (data->active, SEND_URI_KEY);
- if (info != NULL) {
- d(printf("send of %s still in progress\n", transport->url));
- return;
- }
-
- d(printf("starting non-interactive send of '%s'\n", transport->url));
-
- type = get_receive_type (transport->url);
- if (type == SEND_INVALID) {
- d(printf ("unsupported provider: '%s'\n", transport->url));
- return;
- }
-
- info = g_malloc0 (sizeof (*info));
- info->type = SEND_SEND;
- info->bar = NULL;
- info->status = NULL;
- info->uri = g_strdup (transport->url);
- info->keep = FALSE;
- 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, SEND_URI_KEY, info);
-
- /* 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);
-}
diff --git a/mail/mail-send-recv.h b/mail/mail-send-recv.h
deleted file mode 100644
index d97f06222e..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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_SEND_RECV_H
-#define MAIL_SEND_RECV_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include "mail-config.h"
-
-/* send/receive all uri's */
-GtkWidget *mail_send_receive(void);
-/* receive a single uri */
-void mail_receive_uri(const char *uri, int keep);
-void mail_send (void);
-/* setup auto receive stuff */
-void mail_autoreceive_setup(void);
-
-#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 75f95f906b..0000000000
--- a/mail/mail-session.c
+++ /dev/null
@@ -1,855 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 <string.h>
-
-#include <gtk/gtkdialog.h>
-#include <gtk/gtkstock.h>
-
-#include <gconf/gconf.h>
-#include <gconf/gconf-client.h>
-
-#include <libgnome/gnome-config.h>
-#include <libgnome/gnome-sound.h>
-
-#include "camel/camel-filter-driver.h"
-#include "filter/filter-context.h"
-#include "filter/filter-filter.h"
-#include "mail.h"
-#include "mail-component.h"
-#include "mail-config.h"
-#include "mail-session.h"
-#include "mail-tools.h"
-#include "mail-mt.h"
-#include "mail-ops.h"
-#include "e-util/e-passwords.h"
-#include "e-util/e-msgport.h"
-#include "em-junk-filter.h"
-
-#define d(x)
-
-CamelSession *session;
-static int session_check_junk_notify_id = -1;
-
-#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))
-
-#define MAIL_SESSION_LOCK(s, l) (e_mutex_lock(((MailSession *)s)->l))
-#define MAIL_SESSION_UNLOCK(s, l) (e_mutex_unlock(((MailSession *)s)->l))
-
-typedef struct _MailSession {
- CamelSession parent_object;
-
- gboolean interactive;
- FILE *filter_logfile;
-
- EMutex *lock;
-
- MailAsyncEvent *async;
-} MailSession;
-
-typedef struct _MailSessionClass {
- CamelSessionClass parent_class;
-
-} MailSessionClass;
-
-static CamelSessionClass *ms_parent_class;
-
-static char *get_password(CamelSession *session, const char *prompt, gboolean reprompt, 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 CamelFilterDriver *get_filter_driver(CamelSession *session, const char *type, CamelException *ex);
-
-static void ms_thread_status(CamelSession *session, CamelSessionThreadMsg *msg, const char *text, int pc);
-static void *ms_thread_msg_new(CamelSession *session, CamelSessionThreadOps *ops, unsigned int size);
-static void ms_thread_msg_free(CamelSession *session, CamelSessionThreadMsg *m);
-
-static void
-init (MailSession *session)
-{
- session->lock = e_mutex_new(E_MUTEX_REC);
- session->async = mail_async_event_new();
-}
-
-static void
-finalise (MailSession *session)
-{
- if (session_check_junk_notify_id != -1)
- gconf_client_notify_remove (mail_config_get_gconf_client (), session_check_junk_notify_id);
-
- mail_async_event_destroy(session->async);
- e_mutex_destroy(session->lock);
-}
-
-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->get_filter_driver = get_filter_driver;
-
- camel_session_class->thread_msg_new = ms_thread_msg_new;
- camel_session_class->thread_msg_free = ms_thread_msg_free;
- camel_session_class->thread_status = ms_thread_status;
-}
-
-static CamelType
-mail_session_get_type (void)
-{
- static CamelType mail_session_type = CAMEL_INVALID_TYPE;
-
- if (mail_session_type == CAMEL_INVALID_TYPE) {
- ms_parent_class = (CamelSessionClass *)camel_session_get_type();
- mail_session_type = camel_type_register (
- camel_session_get_type (),
- "MailSession",
- sizeof (MailSession),
- sizeof (MailSessionClass),
- (CamelObjectClassInitFunc) class_init,
- NULL,
- (CamelObjectInitFunc) init,
- (CamelObjectFinalizeFunc) finalise);
- }
-
- 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 GtkDialog *password_dialog = NULL;
-static EDList password_list = E_DLIST_INITIALISER(password_list);
-
-struct _pass_msg {
- struct _mail_msg msg;
-
- CamelSession *session;
- const char *prompt;
- gboolean reprompt;
- gboolean secret;
- CamelService *service;
- const char *item;
- CamelException *ex;
-
- char *service_url;
- char *key;
-
- EAccountService *config_service;
- GtkWidget *check;
- GtkWidget *entry;
- char *result;
- int ismain;
-};
-
-static void do_get_pass(struct _mail_msg *mm);
-
-static void
-pass_activate (GtkEntry *entry, void *data)
-{
- if (password_dialog)
- gtk_dialog_response (password_dialog, GTK_RESPONSE_OK);
-}
-
-static void
-pass_response (GtkDialog *dialog, int button, void *data)
-{
- struct _pass_msg *m = data;
-
- switch (button) {
- case GTK_RESPONSE_OK:
- {
- gboolean cache, remember;
-
- m->result = g_strdup (gtk_entry_get_text ((GtkEntry *) m->entry));
- remember = cache = m->check ? gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (m->check)) : FALSE;
-
- if (m->service_url) {
- if (m->config_service) {
- mail_config_service_set_save_passwd (m->config_service, cache);
-
- /* set `cache' 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* */
- cache = TRUE;
- }
- } else {
- /* we can't remember the password if it isn't for an account (pgp?) */
- remember = FALSE;
- }
-
- if (cache) {
- /* cache the password for the session */
- e_passwords_add_password (m->key, m->result);
-
- /* should we remember it between sessions? */
- if (remember)
- e_passwords_remember_password ("Mail", m->key);
- }
- break;
- }
- default:
- camel_exception_set (m->ex, CAMEL_EXCEPTION_USER_CANCEL, _("User canceled operation."));
- break;
- }
-
- gtk_widget_destroy ((GtkWidget *) dialog);
-
- password_dialog = NULL;
- e_msgport_reply ((EMsg *)m);
-
- if ((m = (struct _pass_msg *) e_dlist_remhead (&password_list)))
- do_get_pass ((struct _mail_msg *) m);
-}
-
-static void
-request_password (struct _pass_msg *m)
-{
- EAccount *mca = NULL;
- char *title;
-
- /* If we already have a password_dialog up, save this request till later */
- if (!m->ismain && password_dialog) {
- e_dlist_addtail (&password_list, (EDListNode *)m);
- return;
- }
-
- if (m->service_url) {
- if ((mca = mail_config_get_account_by_source_url (m->service_url)))
- m->config_service = mca->source;
- else if ((mca = mail_config_get_account_by_transport_url (m->service_url)))
- m->config_service = mca->transport;
- }
-
- if (mca)
- title = g_strdup_printf (_("Enter Password for %s"), mca->name);
- else
- title = g_strdup (_("Enter Password"));
-
- password_dialog = (GtkDialog *) gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_QUESTION,
- GTK_BUTTONS_OK_CANCEL, "%s", m->prompt);
- gtk_window_set_title (GTK_WINDOW (password_dialog), title);
- gtk_dialog_set_default_response (password_dialog, GTK_RESPONSE_OK);
- g_free (title);
-
- gtk_container_set_border_width ((GtkContainer *) password_dialog, 6);
-
- m->entry = gtk_entry_new ();
- gtk_entry_set_visibility ((GtkEntry *) m->entry, !m->secret);
- g_signal_connect (m->entry, "activate", G_CALLBACK (pass_activate), password_dialog);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (password_dialog)->vbox), m->entry, TRUE, FALSE, 3);
- gtk_widget_show (m->entry);
-
- if (m->reprompt && m->result) {
- gtk_entry_set_text ((GtkEntry *) m->entry, m->result);
- g_free (m->result);
- m->result = NULL;
- }
-
- if (m->service_url == NULL || m->service != NULL) {
- m->check = gtk_check_button_new_with_mnemonic (m->service_url ? _("_Remember this password") :
- _("_Remember this password for the remainder of this session"));
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (m->check),
- m->config_service ? m->config_service->save_passwd : FALSE);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (password_dialog)->vbox), m->check, TRUE, FALSE, 3);
- gtk_widget_show (m->check);
- }
-
- if (m->ismain) {
- pass_response(password_dialog, gtk_dialog_run (password_dialog), m);
- } else {
- g_signal_connect (password_dialog, "response", G_CALLBACK (pass_response), m);
- gtk_widget_show ((GtkWidget *) password_dialog);
- }
-}
-
-static void
-do_get_pass(struct _mail_msg *mm)
-{
- struct _pass_msg *m = (struct _pass_msg *)mm;
- MailSession *mail_session = MAIL_SESSION (m->session);
-
- if (!strcmp (m->item, "popb4smtp_uri")) {
- char *url = camel_url_to_string (m->service->url, 0);
- EAccount *account = mail_config_get_account_by_transport_url (url);
-
- g_free(url);
- if (account)
- m->result = g_strdup(account->source->url);
- } else if (m->key) {
- m->result = e_passwords_get_password ("Mail", m->key);
- if (m->result == NULL || m->reprompt) {
- if (mail_session->interactive) {
- request_password(m);
- return;
- }
- }
- }
-
- e_msgport_reply((EMsg *)mm);
-}
-
-static void
-do_free_pass(struct _mail_msg *mm)
-{
- struct _pass_msg *m = (struct _pass_msg *)mm;
-
- g_free(m->service_url);
- g_free(m->key);
-}
-
-static struct _mail_msg_op get_pass_op = {
- NULL,
- do_get_pass,
- NULL,
- do_free_pass,
-};
-
-static char *
-get_password (CamelSession *session, const char *prompt, gboolean reprompt, gboolean secret,
- CamelService *service, const char *item, CamelException *ex)
-{
- struct _pass_msg *m, *r;
- EMsgPort *pass_reply;
- char *ret;
-
- /* We setup an async request and send it off, and wait for it to return */
- /* If we're really in main, we dont of course ...
- ... but this shouldn't be allowed because of locking issues */
- pass_reply = e_msgport_new ();
- m = mail_msg_new(&get_pass_op, pass_reply, sizeof(struct _pass_msg));
- m->ismain = pthread_self() == mail_gui_thread;
- m->session = session;
- m->prompt = prompt;
- m->reprompt = reprompt;
- m->secret = secret;
- m->service = service;
- m->item = item;
- m->ex = ex;
- if (service)
- m->service_url = camel_url_to_string (service->url, CAMEL_URL_HIDE_ALL);
- m->key = make_key(service, item);
-
- if (m->ismain) {
- do_get_pass((struct _mail_msg *)m);
- } else {
- extern EMsgPort *mail_gui_port2;
-
- e_msgport_put(mail_gui_port2, (EMsg *)m);
- }
-
- e_msgport_wait(pass_reply);
- r = (struct _pass_msg *)e_msgport_get(pass_reply);
- g_assert(m == r);
-
- ret = m->result;
- mail_msg_free(m);
- e_msgport_destroy(pass_reply);
-
- return ret;
-}
-
-static void
-main_forget_password (CamelSession *session, CamelService *service, const char *item, CamelException *ex)
-{
- char *key = make_key (service, item);
-
- e_passwords_forget_password ("Mail", key);
-
- g_free (key);
-}
-
-static void
-forget_password (CamelSession *session, CamelService *service, const char *item, CamelException *ex)
-{
- mail_call_main(MAIL_CALL_p_pppp, (MailMainFunc)main_forget_password,
- session, service, item, ex);
-}
-
-/* ********************************************************************** */
-
-static GtkDialog *message_dialog;
-static EDList message_list = E_DLIST_INITIALISER(message_list);
-
-struct _user_message_msg {
- struct _mail_msg msg;
-
- CamelSessionAlertType type;
- const char *prompt;
-
- unsigned int allow_cancel:1;
- unsigned int result:1;
- unsigned int ismain:1;
-};
-
-static void do_user_message (struct _mail_msg *mm);
-
-/* clicked, send back the reply */
-static void
-user_message_response (GtkDialog *dialog, int button, struct _user_message_msg *m)
-{
- gtk_widget_destroy ((GtkWidget *) dialog);
-
- message_dialog = NULL;
-
- /* if !allow_cancel, then we've already replied */
- if (m->allow_cancel) {
- m->result = button == GTK_RESPONSE_OK;
- e_msgport_reply((EMsg *)m);
- }
-
- /* check for pendings */
- if ((m = (struct _user_message_msg *)e_dlist_remhead(&message_list)))
- do_user_message((struct _mail_msg *)m);
-}
-
-static void
-user_message_destroy_notify (struct _user_message_msg *m, GObject *deadbeef)
-{
- message_dialog = NULL;
-}
-
-static void
-do_user_message (struct _mail_msg *mm)
-{
- struct _user_message_msg *m = (struct _user_message_msg *)mm;
- GtkMessageType msg_type;
-
- if (!m->ismain && message_dialog != NULL) {
- e_dlist_addtail (&message_list, (EDListNode *)m);
- return;
- }
-
- switch (m->type) {
- case CAMEL_SESSION_ALERT_INFO:
- msg_type = GTK_MESSAGE_INFO;
- break;
- case CAMEL_SESSION_ALERT_WARNING:
- msg_type = GTK_MESSAGE_WARNING;
- break;
- case CAMEL_SESSION_ALERT_ERROR:
- msg_type = GTK_MESSAGE_ERROR;
- break;
- default:
- msg_type = GTK_MESSAGE_INFO;
- }
-
- message_dialog = (GtkDialog *) gtk_message_dialog_new (
- NULL, 0, msg_type,
- m->allow_cancel ? GTK_BUTTONS_OK_CANCEL : GTK_BUTTONS_OK,
- "%s", m->prompt);
- gtk_dialog_set_default_response (message_dialog, m->allow_cancel ? GTK_RESPONSE_CANCEL : GTK_RESPONSE_OK);
- g_object_set ((GObject *) message_dialog, "allow_shrink", TRUE, "allow_grow", TRUE, NULL);
-
- /* We only need to wait for the result if we allow cancel otherwise show but send result back instantly */
- if (m->allow_cancel) {
- if (m->ismain) {
- user_message_response(message_dialog, gtk_dialog_run (message_dialog), m);
- } else {
- g_signal_connect (message_dialog, "response", G_CALLBACK (user_message_response), m);
- gtk_widget_show ((GtkWidget *) message_dialog);
- }
- } else {
- g_signal_connect (message_dialog, "response", G_CALLBACK (gtk_widget_destroy), message_dialog);
- g_object_weak_ref ((GObject *) message_dialog, (GWeakNotify) user_message_destroy_notify, m);
- gtk_widget_show ((GtkWidget *) message_dialog);
- m->result = TRUE;
- e_msgport_reply ((EMsg *)m);
- }
-}
-
-static struct _mail_msg_op user_message_op = { NULL, do_user_message, NULL, NULL };
-
-static gboolean
-alert_user(CamelSession *session, CamelSessionAlertType type, const char *prompt, gboolean cancel)
-{
- MailSession *mail_session = MAIL_SESSION (session);
- struct _user_message_msg *m, *r;
- EMsgPort *user_message_reply;
- gboolean ret;
-
- if (!mail_session->interactive)
- return FALSE;
-
- user_message_reply = e_msgport_new ();
- m = mail_msg_new (&user_message_op, user_message_reply, sizeof (*m));
- m->ismain = pthread_self() == mail_gui_thread;
- m->type = type;
- m->prompt = prompt;
- m->allow_cancel = cancel;
-
- if (m->ismain)
- do_user_message((struct _mail_msg *)m);
- else {
- extern EMsgPort *mail_gui_port2;
-
- e_msgport_put(mail_gui_port2, (EMsg *)m);
- }
-
- e_msgport_wait(user_message_reply);
- r = (struct _user_message_msg *)e_msgport_get(user_message_reply);
- g_assert(m == r);
-
- ret = m->result;
- mail_msg_free(m);
- e_msgport_destroy(user_message_reply);
-
- return ret;
-}
-
-static CamelFolder *
-get_folder (CamelFilterDriver *d, const char *uri, void *data, CamelException *ex)
-{
- return mail_tool_uri_to_folder(uri, 0, ex);
-}
-
-static void
-main_play_sound (CamelFilterDriver *driver, char *filename, gpointer user_data)
-{
- if (filename && *filename)
- gnome_sound_play (filename);
- else
- gdk_beep ();
-
- g_free (filename);
- camel_object_unref (session);
-}
-
-static void
-session_play_sound (CamelFilterDriver *driver, const char *filename, gpointer user_data)
-{
- MailSession *ms = (MailSession *) session;
-
- camel_object_ref (session);
-
- mail_async_event_emit (ms->async, MAIL_ASYNC_GUI, (MailAsyncFunc) main_play_sound,
- driver, g_strdup (filename), user_data);
-}
-
-static void
-main_system_beep (CamelFilterDriver *driver, gpointer user_data)
-{
- gdk_beep ();
-}
-
-static void
-session_system_beep (CamelFilterDriver *driver, gpointer user_data)
-{
- MailSession *ms = (MailSession *) session;
-
- camel_object_ref (session);
-
- mail_async_event_emit (ms->async, MAIL_ASYNC_GUI, (MailAsyncFunc) main_system_beep,
- driver, user_data, NULL);
-}
-
-static CamelFilterDriver *
-main_get_filter_driver (CamelSession *session, const char *type, CamelException *ex)
-{
- CamelFilterDriver *driver;
- FilterRule *rule = NULL;
- char *user, *system;
- GConfClient *gconf;
- RuleContext *fc;
-
- gconf = mail_config_get_gconf_client ();
-
- user = g_strdup_printf ("%s/mail/filters.xml", mail_component_peek_base_directory (mail_component_peek ()));
- system = EVOLUTION_PRIVDATADIR "/filtertypes.xml";
- fc = (RuleContext *) filter_context_new ();
- rule_context_load (fc, system, user);
- g_free (user);
-
- driver = camel_filter_driver_new (session);
- camel_filter_driver_set_folder_func (driver, get_folder, NULL);
-
- if (gconf_client_get_bool (gconf, "/apps/evolution/mail/filters/log", NULL)) {
- MailSession *ms = (MailSession *) session;
-
- if (ms->filter_logfile == NULL) {
- char *filename;
-
- filename = gconf_client_get_string (gconf, "/apps/evolution/mail/filters/logfile", NULL);
- if (filename) {
- ms->filter_logfile = fopen (filename, "a+");
- g_free (filename);
- }
- }
-
- if (ms->filter_logfile)
- camel_filter_driver_set_logfile (driver, ms->filter_logfile);
- }
-
- camel_filter_driver_set_shell_func (driver, mail_execute_shell_command, NULL);
- camel_filter_driver_set_play_sound_func (driver, session_play_sound, NULL);
- camel_filter_driver_set_system_beep_func (driver, session_system_beep, NULL);
-
- if ((!strcmp (type, FILTER_SOURCE_INCOMING) || !strcmp (type, FILTER_SOURCE_JUNKTEST))
- && camel_session_check_junk (session)) {
- /* implicit junk check as 1st rule */
- camel_filter_driver_add_rule (driver, "Junk check", "(junk-test)", "(begin (set-system-flag \"junk\"))");
- }
-
- if (strcmp (type, FILTER_SOURCE_JUNKTEST)) {
- GString *fsearch, *faction;
-
- fsearch = g_string_new ("");
- faction = g_string_new ("");
-
- /* add the user-defined rules next */
- 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);
- }
-
- g_object_unref (fc);
-
- return driver;
-}
-
-static CamelFilterDriver *
-get_filter_driver (CamelSession *session, const char *type, CamelException *ex)
-{
- return (CamelFilterDriver *) mail_call_main (MAIL_CALL_p_ppp, (MailMainFunc) main_get_filter_driver,
- session, type, ex);
-}
-
-/* TODO: This is very temporary, until we have a better way to do the progress reporting,
- we just borrow a dummy mail-mt thread message and hook it onto out camel thread message */
-
-static mail_msg_op_t ms_thread_ops_dummy = { NULL };
-
-static void *ms_thread_msg_new(CamelSession *session, CamelSessionThreadOps *ops, unsigned int size)
-{
- CamelSessionThreadMsg *msg = ms_parent_class->thread_msg_new(session, ops, size);
-
- /* We create a dummy mail_msg, and then copy its cancellation port over to ours, so
- we get cancellation and progress in common with hte existing mail code, for free */
- if (msg) {
- struct _mail_msg *m = mail_msg_new(&ms_thread_ops_dummy, NULL, sizeof(struct _mail_msg));
-
- msg->data = m;
- camel_operation_unref(msg->op);
- msg->op = m->cancel;
- camel_operation_ref(msg->op);
- }
-
- return msg;
-}
-
-static void ms_thread_msg_free(CamelSession *session, CamelSessionThreadMsg *m)
-{
- mail_msg_free(m->data);
- ms_parent_class->thread_msg_free(session, m);
-}
-
-static void ms_thread_status(CamelSession *session, CamelSessionThreadMsg *msg, const char *text, int pc)
-{
- /* This should never be called since we bypass it in alloc! */
- printf("Thread status '%s' %d%%\n", text, pc);
-}
-
-char *
-mail_session_get_password (const char *url_string)
-{
- CamelURL *url;
- char *simple_url;
- char *passwd;
-
- 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);
-
- passwd = e_passwords_get_password ("Mail", simple_url);
-
- g_free (simple_url);
-
- return passwd;
-}
-
-void
-mail_session_add_password (const char *url_string,
- const char *passwd)
-{
- CamelURL *url;
- char *simple_url;
-
- 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);
-
- e_passwords_add_password (simple_url, passwd);
-
- g_free (simple_url);
-}
-
-void
-mail_session_remember_password (const char *url_string)
-{
- CamelURL *url;
- char *simple_url;
-
- 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);
-
- e_passwords_remember_password ("Mail", simple_url);
-
- g_free (simple_url);
-}
-
-void
-mail_session_forget_password (const char *key)
-{
- e_passwords_forget_password ("Mail", key);
-}
-
-static void
-mail_session_check_junk_notify (GConfClient *gconf, guint id, GConfEntry *entry, CamelSession *session)
-{
- gchar *key;
-
- g_return_if_fail (gconf_entry_get_key (entry) != NULL);
- g_return_if_fail (gconf_entry_get_value (entry) != NULL);
-
- key = strrchr (gconf_entry_get_key (entry), '/');
- if (!strcmp (key, "check_incoming"))
- camel_session_set_check_junk (session, gconf_value_get_bool (gconf_entry_get_value (entry)));
-}
-
-void
-mail_session_init (const char *base_directory)
-{
- char *camel_dir;
- GConfClient *gconf;
-
- if (camel_init (base_directory, TRUE) != 0)
- exit (0);
-
- session = CAMEL_SESSION (camel_object_new (MAIL_SESSION_TYPE));
-
- camel_dir = g_strdup_printf ("%s/mail", base_directory);
- camel_session_construct (session, camel_dir);
-
- gconf = mail_config_get_gconf_client ();
- camel_session_set_check_junk (session, gconf_client_get_bool (gconf, "/apps/evolution/mail/junk/check_incoming", NULL));
- session_check_junk_notify_id = gconf_client_notify_add (gconf, "/apps/evolution/mail/junk",
- (GConfClientNotifyFunc) mail_session_check_junk_notify,
- session, NULL, NULL);
- session->junk_plugin = CAMEL_JUNK_PLUGIN (em_junk_filter_get_plugin ());
-
- /* The shell will tell us to go online. */
- camel_session_set_online ((CamelSession *) session, FALSE);
-
- g_free (camel_dir);
-}
-
-gboolean
-mail_session_get_interactive (void)
-{
- return MAIL_SESSION (session)->interactive;
-}
-
-void
-mail_session_set_interactive (gboolean interactive)
-{
- MAIL_SESSION (session)->interactive = interactive;
-
- if (!interactive) {
- struct _pass_msg *pm;
- struct _user_message_msg *um;
-
- d(printf ("Gone non-interactive, checking for outstanding interactive tasks\n"));
-
- /* clear out pending password requests */
- while ((pm = (struct _pass_msg *) e_dlist_remhead (&password_list))) {
- d(printf ("Flushing password request : %s\n", pm->prompt));
- e_msgport_reply ((EMsg *) pm);
- }
-
- /* destroy the current */
- if (password_dialog) {
- d(printf ("Destroying password dialogue\n"));
- gtk_widget_destroy ((GtkWidget *) password_dialog);
- password_dialog = NULL;
- }
-
- /* same for pending user messages */
- while ((um = (struct _user_message_msg *) e_dlist_remhead (&message_list))) {
- d(printf ("Flusing message request: %s\n", um->prompt));
- e_msgport_reply((EMsg *) um);
- }
-
- /* and the current */
- if (message_dialog) {
- d(printf("Destroying message dialogue\n"));
- gtk_widget_destroy ((GtkWidget *) message_dialog);
- }
- }
-}
-
-void
-mail_session_forget_passwords (BonoboUIComponent *uih, void *user_data,
- const char *path)
-{
- e_passwords_forget_passwords ();
-}
-
-void
-mail_session_flush_filter_log (void)
-{
- MailSession *ms = (MailSession *) session;
-
- if (ms->filter_logfile)
- fflush (ms->filter_logfile);
-}
diff --git a/mail/mail-session.h b/mail/mail-session.h
deleted file mode 100644
index 2a7559964c..0000000000
--- a/mail/mail-session.h
+++ /dev/null
@@ -1,58 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_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 (const char *base_directory);
-gboolean mail_session_get_interactive (void);
-void mail_session_set_interactive (gboolean interactive);
-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);
-char *mail_session_get_password (const char *url);
-void mail_session_add_password (const char *url, const char *passwd);
-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);
-
-void mail_session_flush_filter_log (void);
-
-extern CamelSession *session;
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* ! MAIL_SESSION_H */
diff --git a/mail/mail-signature-editor.c b/mail/mail-signature-editor.c
deleted file mode 100644
index 570a0157c4..0000000000
--- a/mail/mail-signature-editor.c
+++ /dev/null
@@ -1,447 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Radek Doulik <rodo@ximian.com>
- * Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2002 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 <errno.h>
-#include <bonobo.h>
-#include <bonobo/bonobo-stream-memory.h>
-
-#include <e-util/e-dialog-utils.h>
-
-#include "e-msg-composer.h"
-#include "mail-signature-editor.h"
-#include "mail-config.h"
-
-#define d(x)
-
-
-struct _ESignatureEditor {
- GtkWidget *win;
- GtkWidget *control;
- GtkWidget *name_entry;
- GtkWidget *info_frame;
-
- MailConfigSignature *sig;
- gboolean is_new;
- gboolean html;
-
- GNOME_GtkHTML_Editor_Engine engine;
-};
-typedef struct _ESignatureEditor ESignatureEditor;
-
-#define E_SIGNATURE_EDITOR(o) ((ESignatureEditor *) o)
-
-#define DEFAULT_WIDTH 600
-#define DEFAULT_HEIGHT 350
-
-enum { REPLY_YES = 0, REPLY_NO, REPLY_CANCEL };
-
-static void
-destroy_editor (ESignatureEditor *editor)
-{
- gtk_widget_destroy (editor->win);
- g_free (editor);
-}
-
-static void
-menu_file_save_error (BonoboUIComponent *uic, CORBA_Environment *ev)
-{
- char *err;
-
- /* errno is set if the rename() fails in menu_file_save_cb */
-
- err = ev->_major != CORBA_NO_EXCEPTION ? bonobo_exception_get_text (ev) : g_strdup (g_strerror (errno));
-
- e_notice (NULL, GTK_MESSAGE_ERROR, _("Could not save signature file: %s"), err);
- g_warning ("Exception while saving signature: %s", err);
-
- g_free (err);
-}
-
-static GByteArray *
-get_text (Bonobo_PersistStream persist, const char *format, CORBA_Environment *ev)
-{
- BonoboStream *stream;
- BonoboStreamMem *stream_mem;
- GByteArray *text;
-
- 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)
- return NULL;
-
- 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;
-}
-
-static ssize_t
-write_all (int fd, const char *buf, size_t n)
-{
- ssize_t w, nwritten = 0;
-
- do {
- do {
- w = write (fd, buf + nwritten, n - nwritten);
- } while (w == -1 && (errno == EINTR || errno == EAGAIN));
-
- if (w > 0)
- nwritten += w;
- } while (nwritten < n && w != -1);
-
- if (w == -1)
- return -1;
-
- return nwritten;
-}
-
-static void
-menu_file_save_cb (BonoboUIComponent *uic, void *user_data, const char *path)
-{
- ESignatureEditor *editor = user_data;
- Bonobo_PersistStream pstream_iface;
- char *dirname, *base, *filename;
- CORBA_Environment ev;
- GByteArray *text;
- int fd;
-
- d(printf ("editor->sig->filename = %s\n", editor->sig->filename));
- dirname = g_path_get_dirname (editor->sig->filename);
- d(printf ("dirname = %s\n", dirname));
- base = g_path_get_basename (editor->sig->filename);
- d(printf ("basename = %s\n", base));
- filename = g_strdup_printf ("%s/.#%s", dirname, base);
- d(printf ("filename = %s\n", filename));
- g_free (dirname);
- g_free (base);
-
- CORBA_exception_init (&ev);
- pstream_iface = Bonobo_Unknown_queryInterface
- (bonobo_widget_get_objref (BONOBO_WIDGET (editor->control)),
- "IDL:Bonobo/PersistStream:1.0", &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION)
- goto exception;
-
- if ((fd = open (filename, O_WRONLY | O_TRUNC | O_CREAT, 0666)) == -1)
- goto exception;
-
- text = get_text (pstream_iface, editor->html ? "text/html" : "text/plain", &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- close (fd);
- goto exception;
- }
-
- if (write_all (fd, text->data, text->len) == -1) {
- g_byte_array_free (text, TRUE);
- close (fd);
- goto exception;
- }
-
- g_byte_array_free (text, TRUE);
- close (fd);
-
- if (rename (filename, editor->sig->filename) == -1)
- goto exception;
-
- g_free (filename);
-
- mail_config_signature_set_html (editor->sig, editor->html);
-
- /* if the signature isn't already saved in the config, save it there now... */
- if (editor->is_new) {
- mail_config_signature_add (editor->sig);
- editor->is_new = FALSE;
- } else
- mail_config_signature_emit_event (MAIL_CONFIG_SIG_EVENT_CONTENT_CHANGED, editor->sig);
-
- return;
-
- exception:
-
- menu_file_save_error (uic, &ev);
- CORBA_exception_free (&ev);
- unlink (filename);
- g_free (filename);
-}
-
-static void
-exit_dialog_cb (int reply, ESignatureEditor *editor)
-{
- switch (reply) {
- case GTK_RESPONSE_YES:
- menu_file_save_cb (NULL, editor, NULL);
- break;
- case GTK_RESPONSE_NO:
- destroy_editor (editor);
- break;
- }
-}
-
-static void
-do_exit (ESignatureEditor *editor)
-{
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
-
- if (GNOME_GtkHTML_Editor_Engine_hasUndo (editor->engine, &ev)) {
- GtkWidget *dialog;
- int button;
-
- dialog = gtk_message_dialog_new (GTK_WINDOW (editor->win),
- GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL,
- GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, "%s",
- _("This signature has been changed, but hasn't been saved.\n"
- "\nDo you wish to save your changes?"));
- gtk_dialog_add_buttons ((GtkDialog *) dialog,
- _("_Discard changes"), GTK_RESPONSE_NO,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE, GTK_RESPONSE_YES,
- NULL);
- gtk_window_set_title ((GtkWindow *) dialog, _("Save signature"));
- gtk_dialog_set_default_response ((GtkDialog *) dialog, GTK_RESPONSE_YES);
-
- button = gtk_dialog_run ((GtkDialog *) dialog);
- gtk_widget_destroy (dialog);
-
- exit_dialog_cb (button, editor);
- } else
- destroy_editor (editor);
-
- CORBA_exception_free (&ev);
-}
-
-static int
-delete_event_cb (GtkWidget *w, GdkEvent *event, ESignatureEditor *editor)
-{
- do_exit (editor);
-
- return FALSE;
-}
-
-static void
-menu_file_close_cb (BonoboUIComponent *uic, gpointer data, const gchar *path)
-{
- ESignatureEditor *editor;
-
- editor = E_SIGNATURE_EDITOR (data);
- do_exit (editor);
-}
-
-static void
-menu_file_save_close_cb (BonoboUIComponent *uic, gpointer data, const gchar *path)
-{
- ESignatureEditor *editor;
-
- editor = E_SIGNATURE_EDITOR (data);
-
- menu_file_save_cb (uic, editor, path);
- destroy_editor (editor);
-}
-
-static BonoboUIVerb verbs [] = {
-
- BONOBO_UI_VERB ("FileSave", menu_file_save_cb),
- BONOBO_UI_VERB ("FileClose", menu_file_close_cb),
- BONOBO_UI_VERB ("FileSaveClose", menu_file_save_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_Unknown_queryInterface (bonobo_widget_get_objref (BONOBO_WIDGET (editor->control)),
- "IDL:Bonobo/PersistFile:1.0", NULL);
- CORBA_exception_init (&ev);
- Bonobo_PersistFile_load (pfile_iface, editor->sig->filename, &ev);
- CORBA_exception_free (&ev);
- } else {
- Bonobo_PersistStream pstream_iface;
- BonoboStream *stream;
- char *data, *html;
-
- data = e_msg_composer_get_sig_file_content (editor->sig->filename, FALSE);
- html = g_strdup_printf ("<PRE>\n%s", data);
- g_free (data);
-
- pstream_iface = Bonobo_Unknown_queryInterface
- (bonobo_widget_get_objref (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
-sig_name_changed (GtkWidget *w, ESignatureEditor *editor)
-{
- const char *name;
-
- name = gtk_entry_get_text (GTK_ENTRY (editor->name_entry));
-
- if (editor->is_new) {
- g_free (editor->sig->name);
- editor->sig->name = g_strdup (name);
- } else {
- mail_config_signature_set_name (editor->sig, name);
- }
-}
-
-static void
-format_html_cb (BonoboUIComponent *component,
- const char *path,
- Bonobo_UIComponent_EventType type,
- const char *state,
- gpointer data)
-
-{
- ESignatureEditor *editor = (ESignatureEditor *) data;
-
- if (type != Bonobo_UIComponent_STATE_CHANGED)
- return;
-
- editor->html = atoi (state);
- bonobo_widget_set_property (BONOBO_WIDGET (editor->control), "FormatHTML", TC_CORBA_boolean, editor->html, NULL);
-}
-
-void
-mail_signature_editor (MailConfigSignature *sig, GtkWindow *parent, gboolean is_new)
-{
- CORBA_Environment ev;
- ESignatureEditor *editor;
- BonoboUIComponent *component;
- BonoboUIContainer *container;
- GtkWidget *vbox, *hbox, *label, *frame, *vbox1;
-
- if (!sig->filename || !*sig->filename)
- return;
-
- editor = g_new0 (ESignatureEditor, 1);
-
- editor->sig = sig;
- editor->html = sig->html;
- editor->is_new = is_new;
-
- editor->win = bonobo_window_new ("e-sig-editor", _("Edit signature"));
- gtk_window_set_type_hint (GTK_WINDOW (editor->win), GDK_WINDOW_TYPE_HINT_DIALOG);
- gtk_window_set_default_size (GTK_WINDOW (editor->win), DEFAULT_WIDTH, DEFAULT_HEIGHT);
- if (parent != NULL)
- gtk_window_set_transient_for (GTK_WINDOW (editor->win), parent);
- g_object_set (editor->win, "allow_shrink", FALSE, "allow_grow", TRUE, NULL);
-
- container = bonobo_window_get_ui_container (BONOBO_WINDOW(editor->win));
-
- component = bonobo_ui_component_new_default ();
- bonobo_ui_component_set_container (component, bonobo_object_corba_objref (BONOBO_OBJECT (container)), NULL);
- bonobo_ui_component_add_verb_list_with_data (component, verbs, editor);
- bonobo_ui_util_set_ui (component, PREFIX,
- EVOLUTION_UIDIR "/evolution-signature-editor.xml",
- "evolution-signature-editor", NULL);
-
- editor->control = bonobo_widget_new_control ("OAFIID:GNOME_GtkHTML_Editor:3.1",
- bonobo_ui_component_get_container (component));
-
- if (editor->control == NULL) {
- g_warning ("Cannot get 'OAFIID:GNOME_GtkHTML_Editor:3.1'.");
-
- destroy_editor (editor);
- return;
- }
-
- editor->engine = (GNOME_GtkHTML_Editor_Engine) Bonobo_Unknown_queryInterface
- (bonobo_widget_get_objref (BONOBO_WIDGET (editor->control)), "IDL:GNOME/GtkHTML/Editor/Engine:1.0", NULL);
-
- load_signature (editor);
-
- bonobo_ui_component_set_prop (component, "/commands/FormatHtml", "state", editor->html ? "1" : "0", NULL);
- bonobo_ui_component_add_listener (component, "FormatHtml", format_html_cb, editor);
-
- g_signal_connect (editor->win, "delete_event", G_CALLBACK (delete_event_cb), editor);
-
- vbox = gtk_vbox_new (FALSE, 0);
- hbox = gtk_hbox_new (FALSE, 4);
- vbox1 = gtk_vbox_new (FALSE, 3);
- gtk_container_set_border_width (GTK_CONTAINER (vbox1), 3);
- label = gtk_label_new (_("Enter a name for this signature."));
- gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
- gtk_box_pack_start (GTK_BOX (vbox1), label, FALSE, TRUE, 0);
- label = gtk_label_new (_("Name:"));
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
- editor->name_entry = gtk_entry_new ();
- gtk_entry_set_text (GTK_ENTRY (editor->name_entry), sig->name);
- g_signal_connect (editor->name_entry, "changed", G_CALLBACK (sig_name_changed), editor);
- gtk_box_pack_start_defaults (GTK_BOX (hbox), editor->name_entry);
- frame = gtk_frame_new (NULL);
- gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT);
- gtk_box_pack_start (GTK_BOX (vbox1), hbox, FALSE, TRUE, 0);
- gtk_container_add (GTK_CONTAINER (frame), vbox1);
- gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0);
- gtk_widget_show_all (vbox);
- gtk_box_pack_start_defaults (GTK_BOX (vbox), editor->control);
-
- bonobo_window_set_contents (BONOBO_WINDOW (editor->win), vbox);
- bonobo_widget_set_property (BONOBO_WIDGET (editor->control), "FormatHTML", TC_CORBA_boolean, editor->html, NULL);
- gtk_widget_show (GTK_WIDGET (editor->win));
- gtk_widget_show (GTK_WIDGET (editor->control));
-
- CORBA_exception_init (&ev);
- GNOME_GtkHTML_Editor_Engine_runCommand (editor->engine, "grab-focus", &ev);
- CORBA_exception_free (&ev);
-}
diff --git a/mail/mail-signature-editor.h b/mail/mail-signature-editor.h
deleted file mode 100644
index 9dd58aade2..0000000000
--- a/mail/mail-signature-editor.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Radek Doulik <rodo@ximian.com>
- *
- * Copyright 2001, 2002 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License 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_SIGNATURE_EDITOR_H
-#define MAIL_SIGNATURE_EDITOR_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <glib.h>
-#include <gtk/gtkwindow.h>
-#include <mail-config.h>
-
-void mail_signature_editor (MailConfigSignature *sig, GtkWindow *parent, gboolean is_new);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/mail/mail-tools.c b/mail/mail-tools.c
deleted file mode 100644
index 50b2d0ab12..0000000000
--- a/mail/mail-tools.c
+++ /dev/null
@@ -1,424 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 <string.h>
-
-#include <gconf/gconf.h>
-#include <gconf/gconf-client.h>
-
-#include <camel/camel.h>
-#include <camel/camel-vee-folder.h>
-
-#include <filter/vfolder-rule.h>
-#include <filter/vfolder-context.h>
-#include <filter/filter-option.h>
-#include <filter/filter-input.h>
-
-#include "e-util/e-meta.h"
-
-#include "mail.h" /*session*/
-#include "mail-component.h"
-#include "mail-config.h"
-#include "mail-vfolder.h"
-#include "mail-tools.h"
-#include "mail-mt.h"
-#include "mail-folder-cache.h"
-
-
-/* **************************************** */
-
-CamelFolder *
-mail_tool_get_local_inbox (CamelException *ex)
-{
- return mail_component_get_local_inbox(mail_component_peek(), ex);
-}
-
-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 (store);
-
- return folder;
-}
-
-CamelFolder *
-mail_tool_get_trash (const gchar *url, int connect, CamelException *ex)
-{
- CamelStore *store;
- CamelFolder *trash;
-
- if (connect)
- store = camel_session_get_store (session, url, ex);
- else
- store = (CamelStore *) camel_session_get_service (session, url, CAMEL_PROVIDER_STORE, ex);
-
- if (!store)
- return NULL;
-
- if (connect || ((CamelService *) store)->status == CAMEL_SERVICE_CONNECTED)
- trash = camel_store_get_trash (store, ex);
- else
- trash = NULL;
-
- camel_object_unref (store);
-
- return trash;
-}
-
-static char *
-mail_tool_get_local_movemail_path (const unsigned char *uri)
-{
- unsigned char *safe_uri, *c;
- char *path;
-
- safe_uri = g_strdup (uri);
- for (c = safe_uri; *c; c++)
- if (strchr ("/:;=|%&#!*^()\\, ", *c) || !isprint ((int) *c))
- *c = '_';
-
- path = g_strdup_printf ("%s/local/Inbox/movemail.%s",
- mail_component_peek_base_directory (mail_component_peek ()),
- safe_uri);
- g_free (safe_uri);
-
- return path;
-}
-
-char *
-mail_tool_do_movemail (const char *source_url, CamelException *ex)
-{
- char *dest_path;
- struct stat sb;
- CamelURL *uri;
-
- uri = camel_url_new(source_url, ex);
- if (uri == NULL)
- return NULL;
-
- if (strcmp(uri->protocol, "mbox") != 0) {
- /* FIXME: use right text here post 1.4 */
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_URL_INVALID,
- _("Could not parse URL `%s'"),
- source_url);
- camel_url_free(uri);
- return NULL;
- }
-
- /* Set up our destination. */
- dest_path = mail_tool_get_local_movemail_path (source_url);
-
- /* Movemail from source (source_url) to dest_path */
- camel_movemail (uri->path, dest_path, ex);
- camel_url_free(uri);
-
- 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 {
- /* We can't use %.*s because it depends on the locale being C/POSIX
- or UTF-8 to work correctly in glibc */
- /*fwd_subj = g_strdup_printf ("[Fwd: %.*s...]", max_subject_length, subject);*/
- fwd_subj = g_malloc (max_subject_length + 11);
- memcpy (fwd_subj, "[Fwd: ", 6);
- memcpy (fwd_subj + 6, subject, max_subject_length);
- memcpy (fwd_subj + 6 + max_subject_length, "...]", 5);
- }
- } 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"));
- xev->postto = g_strdup (camel_medium_get_header (CAMEL_MEDIUM (message), "X-Evolution-PostTo"));
-
- /* 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");
- camel_medium_remove_header (CAMEL_MEDIUM (message), "X-Evolution-PostTo");
-
- 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);
- if (xev->postto)
- camel_medium_set_header (CAMEL_MEDIUM (message), "X-Evolution-PostTo", xev->postto);
-}
-
-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->format);
- g_free (xev->fcc);
- g_free (xev->postto);
- 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)
- desc = g_strdup_printf (_("Forwarded message - %s"), subject);
- else
- desc = g_strdup (_("Forwarded message"));
-
- /* rip off the X-Evolution headers */
- xev = mail_tool_remove_xevolution_headers (message);
- mail_tool_destroy_xevolution (xev);
-
- /* remove Bcc headers */
- while (camel_medium_get_header (CAMEL_MEDIUM (message), "Bcc"))
- camel_medium_remove_header (CAMEL_MEDIUM (message), "Bcc");
-
- 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, guint32 flags, CamelException *ex)
-{
- CamelURL *url;
- CamelStore *store = NULL;
- CamelFolder *folder = NULL;
- int offset = 0;
- char *curi = NULL;
-
- g_return_val_if_fail (uri != NULL, NULL);
-
- if (!strncmp (uri, "vtrash:", 7))
- offset = 7;
- else if (!strncmp (uri, "vjunk:", 6))
- offset = 6;
- else if (!strncmp(uri, "email:", 6)) {
- /* FIXME?: the filter:get_folder callback should do this itself? */
- curi = em_uri_to_camel(uri);
- if (uri == NULL) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, _("Invalid folder: `%s'"), uri);
- return NULL;
- }
- uri = curi;
- }
-
- url = camel_url_new (uri + offset, ex);
- if (!url) {
- g_free(curi);
- 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) {
- if (offset == 7)
- folder = camel_store_get_trash (store, ex);
- else if (offset == 6)
- folder = camel_store_get_junk (store, ex);
- else
- g_assert (FALSE);
- } else
- folder = camel_store_get_folder (store, name, flags, ex);
- camel_object_unref (store);
- }
-
- if (folder)
- mail_note_folder (folder);
-
- camel_url_free (url);
- g_free(curi);
-
- return folder;
-}
-
-
-/**
- * mail_tools_x_evolution_message_parse:
- * @in: GtkSelectionData->data
- * @inlen: GtkSelectionData->length
- * @uids: pointer to a gptrarray that will be filled with uids on success
- *
- * Parses the GtkSelectionData and returns a CamelFolder and a list of
- * UIDs specified by the selection.
- **/
-CamelFolder *
-mail_tools_x_evolution_message_parse (char *in, unsigned int inlen, GPtrArray **uids)
-{
- /* format: "uri\0uid1\0uid2\0uid3\0...\0uidn" */
- char *inptr, *inend;
- CamelFolder *folder;
-
- if (in == NULL)
- return NULL;
-
- folder = mail_tool_uri_to_folder (in, 0, NULL);
-
- if (!folder)
- return NULL;
-
- /* split the uids */
- inend = in + inlen;
- inptr = in + strlen (in) + 1;
- *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;
-}
-
-
-char *
-mail_tools_folder_to_url (CamelFolder *folder)
-{
- char *service_url, *url;
- const char *full_name;
- CamelService *service;
-
- g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
-
- full_name = folder->full_name;
- while (*full_name == '/')
- full_name++;
-
- service = (CamelService *) folder->parent_store;
- service_url = camel_url_to_string (service->url, CAMEL_URL_HIDE_ALL);
- url = g_strdup_printf ("%s%s%s", service_url, service_url[strlen (service_url)-1] != '/' ? "/" : "",
- full_name);
- g_free (service_url);
-
- return url;
-}
diff --git a/mail/mail-tools.h b/mail/mail-tools.h
deleted file mode 100644
index 2f4b61123c..0000000000
--- a/mail/mail-tools.h
+++ /dev/null
@@ -1,75 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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;
- char *postto;
-} XEvolution;
-
-/* 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 char *url, CamelException *ex);
-
-/* Get the "trash" for a url (uses global session) */
-CamelFolder *mail_tool_get_trash (const char *url, int connect, 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 char *source_url, 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, guint32 flags, CamelException *ex);
-
-GHashTable *mail_lookup_url_table (CamelMimeMessage *mime_message);
-
-CamelFolder *mail_tools_x_evolution_message_parse (char *in, unsigned int inlen, GPtrArray **uids);
-
-char *mail_tools_folder_to_url (CamelFolder *folder);
-
-struct _EMeta *mail_tool_get_meta_data(const char *uri);
-void mail_tool_delete_meta_data(const char *uri);
-
-#endif
diff --git a/mail/mail-types.h b/mail/mail-types.h
deleted file mode 100644
index 1cb0bdad06..0000000000
--- a/mail/mail-types.h
+++ /dev/null
@@ -1,40 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 84a278957a..0000000000
--- a/mail/mail-vfolder.c
+++ /dev/null
@@ -1,1022 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Michael Zucchi <notzed@ximian.com>
- *
- * Copyright 2000-2003 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 <glib.h>
-#include <string.h>
-#include <libgnome/gnome-i18n.h>
-
-#include "Evolution.h"
-
-#include "mail-component.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 "e-util/e-dialog-utils.h"
-
-#include "camel/camel.h"
-#include "camel/camel-vee-folder.h"
-#include "camel/camel-vee-store.h"
-
-#include "filter/vfolder-context.h"
-#include "filter/vfolder-editor.h"
-
-#define d(x) /*(printf("%s(%d):%s: ", __FILE__, __LINE__, __PRETTY_FUNCTION__), (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;
-
-/* more globals ... */
-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) {
- d(printf(" Adding uri: %s\n", (char *)l->data));
- folder = mail_tool_uri_to_folder (l->data, 0, &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(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(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(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(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;
- int remove;
-};
-
-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 = NULL;
-
- d(printf("%s uri to vfolder: %s\n", m->remove?"Removing":"Adding", m->uri));
-
- /* we dont try lookup the cache if we are removing it, its no longer there */
- if (!m->remove && !mail_note_get_folder_from_uri(m->uri, &folder)) {
- g_warning("Folder '%s' disappeared while I was adding/remove it to/from my vfolder", m->uri);
- return;
- }
-
- if (folder == NULL)
- folder = mail_tool_uri_to_folder (m->uri, 0, &mm->ex);
-
- if (folder != NULL) {
- l = m->folders;
- while (l) {
- if (m->remove)
- camel_vee_folder_remove_folder((CamelVeeFolder *)l->data, folder);
- else
- camel_vee_folder_add_folder((CamelVeeFolder *)l->data, folder);
- l = l->next;
- }
- camel_object_unref(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, int remove)
-{
- struct _adduri_msg *m;
- int id;
-
- m = mail_msg_new(&vfolder_adduri_op, NULL, sizeof (*m));
- m->folders = folders;
- m->uri = g_strdup(uri);
- m->remove = remove;
-
- 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;
-}
-
-static int
-uri_is_ignore(const char *uri, GCompareFunc uri_cmp)
-{
- extern char *default_outbox_folder_uri, *default_sent_folder_uri, *default_drafts_folder_uri;
- EAccountList *accounts;
- EAccount *account;
- EIterator *iter;
- int found = FALSE;
-
- d(printf("checking '%s' against:\n %s\n %s\n %s\n", uri, default_outbox_folder_uri, default_sent_folder_uri, default_drafts_folder_uri));
-
- found = (default_outbox_folder_uri && uri_cmp(default_outbox_folder_uri, uri))
- || (default_sent_folder_uri && uri_cmp(default_sent_folder_uri, uri))
- || (default_drafts_folder_uri && uri_cmp(default_drafts_folder_uri, uri));
-
- accounts = mail_config_get_accounts ();
- iter = e_list_get_iterator ((EList *) accounts);
- while (e_iterator_is_valid (iter)) {
- account = (EAccount *) e_iterator_get (iter);
-
- d(printf("checking sent_folder_uri '%s' == '%s'\n",
- account->sent_folder_uri ? account->sent_folder_uri : "empty", uri));
-
- found = (account->sent_folder_uri && uri_cmp (account->sent_folder_uri, uri))
- || (account->drafts_folder_uri && uri_cmp (account->drafts_folder_uri, uri));
-
- if (found)
- break;
-
- e_iterator_next (iter);
- }
-
- g_object_unref (iter);
-
- return found;
-}
-
-/* called when a new uri becomes (un)available */
-void
-mail_vfolder_add_uri(CamelStore *store, const char *uri, int remove)
-{
- FilterRule *rule;
- const char *source;
- CamelVeeFolder *vf;
- GList *folders = NULL, *link;
- 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;
- int is_ignore;
-
- if (CAMEL_IS_VEE_STORE(store) || !strncmp(uri, "vtrash:", 7) || !strncmp(uri, "vjunk:", 6) || context == NULL)
- return;
-
- g_assert(pthread_self() == mail_gui_thread);
-
- is_ignore = uri_is_ignore(uri, uri_cmp);
-
- LOCK();
-
- d(printf("%s uri to check: %s\n", remove?"Removing":"Adding", uri));
-
- /* maintain the source folders lists for changed rules later on */
- if (remove) {
- 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);
- }
- }
- } else if (!is_ignore) {
- /* we ignore drafts/sent/outbox here */
- 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->name) {
- d(printf("invalid rule (%p): rule->name is set to NULL\n", rule));
- continue;
- }
-
- /* dont auto-add any sent/drafts folders etc, they must be explictly listed as a source */
- if (rule->source
- && !is_ignore
- && ((!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(vf);
- folders = g_list_prepend(folders, vf);
- }
- }
-
- UNLOCK();
-
- if (folders != NULL)
- vfolder_adduri(uri, folders, remove);
-}
-
-/* called when a uri is deleted from a store */
-void
-mail_vfolder_delete_uri(CamelStore *store, const char *uri)
-{
- GCompareFunc uri_cmp = CAMEL_STORE_CLASS(CAMEL_OBJECT_GET_CLASS(store))->compare_folder_name;
- FilterRule *rule;
- const char *source;
- CamelVeeFolder *vf;
- GString *changed;
-
- if (context == NULL || !strncmp(uri, "vtrash:", 7) || !strncmp(uri, "vjunk:", 6))
- return;
-
- d(printf ("Deleting uri to check: %s\n", uri));
-
- g_assert (pthread_self() == mail_gui_thread);
-
- changed = g_string_new ("");
-
- LOCK();
-
- /* see if any rules directly reference this removed uri */
- rule = NULL;
- while ((rule = rule_context_next_rule ((RuleContext *) context, rule, NULL))) {
- source = NULL;
- while ((source = vfolder_rule_next_source ((VfolderRule *) rule, source))) {
- /* Remove all sources that match, ignore changed events though
- because the adduri call above does the work async */
- if (uri_cmp (uri, source)) {
- vf = g_hash_table_lookup (vfolder_hash, rule->name);
- g_assert (vf != NULL);
- g_signal_handlers_disconnect_matched (rule, G_SIGNAL_MATCH_FUNC|G_SIGNAL_MATCH_DATA, 0,
- 0, NULL, rule_changed, vf);
- vfolder_rule_remove_source ((VfolderRule *)rule, source);
- g_signal_connect (rule, "changed", G_CALLBACK(rule_changed), vf);
- g_string_append_printf (changed, " %s\n", rule->name);
- source = NULL;
- }
- }
- }
-
- UNLOCK();
-
- if (changed->str[0]) {
- GtkWidget *dialog;
- char *user;
-
- dialog = gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_INFO, GTK_BUTTONS_OK,
- _("The following vFolder(s):\n%s"
- "Used the removed folder:\n '%s'\n"
- "And have been updated."),
- changed->str, uri);
- g_signal_connect_swapped (dialog, "response", G_CALLBACK (gtk_widget_destroy), dialog);
- gtk_widget_show (dialog);
-
- user = g_strdup_printf ("%s/mail/vfolders.xml",
- mail_component_peek_base_directory (mail_component_peek ()));
- rule_context_save ((RuleContext *) context, user);
- g_free (user);
- }
-
- g_string_free (changed, TRUE);
-}
-
-/* called when a uri is renamed in a store */
-void
-mail_vfolder_rename_uri(CamelStore *store, const char *from, const char *to)
-{
- GCompareFunc uri_cmp = CAMEL_STORE_CLASS(CAMEL_OBJECT_GET_CLASS(store))->compare_folder_name;
- FilterRule *rule;
- const char *source;
- CamelVeeFolder *vf;
- int changed = 0;
-
- d(printf("vfolder rename uri: %s to %s\n", from, to));
-
- if (context == NULL || !strncmp(from, "vtrash:", 7) || !strncmp(to, "vtrash:", 7) || !strncmp(from, "vjunk:", 6) || !strncmp(to, "vjunk:", 6))
- return;
-
- g_assert(pthread_self() == mail_gui_thread);
-
- LOCK();
-
- /* see if any rules directly reference this removed uri */
- rule = NULL;
- while ( (rule = rule_context_next_rule((RuleContext *)context, rule, NULL)) ) {
- source = NULL;
- while ( (source = vfolder_rule_next_source((VfolderRule *)rule, source)) ) {
- /* Remove all sources that match, ignore changed events though
- because the adduri call above does the work async */
- if (uri_cmp(from, source)) {
- d(printf("Vfolder '%s' used '%s' ('%s') now uses '%s'\n", rule->name, source, from, to));
- vf = g_hash_table_lookup(vfolder_hash, rule->name);
- g_assert(vf);
- g_signal_handlers_disconnect_matched(rule, G_SIGNAL_MATCH_FUNC|G_SIGNAL_MATCH_DATA, 0,
- 0, NULL, rule_changed, vf);
- vfolder_rule_remove_source((VfolderRule *)rule, source);
- vfolder_rule_add_source((VfolderRule *)rule, to);
- g_signal_connect(rule, "changed", G_CALLBACK(rule_changed), vf);
- changed++;
- source = NULL;
- }
- }
- }
-
- UNLOCK();
-
- if (changed) {
- char *user;
-
- d(printf("Vfolders updated from renamed folder\n"));
- user = g_strdup_printf("%s/mail/vfolders.xml", mail_component_peek_base_directory (mail_component_peek ()));
- rule_context_save((RuleContext *)context, user);
- g_free(user);
- }
-}
-
-/* ********************************************************************** */
-
-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 *key, *oldname;
- CamelFolder *old;
-
- LOCK();
- d(printf("Changing folder name in hash table to '%s'\n", rule->name));
- 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);
- g_hash_table_insert(vfolder_hash, g_strdup(rule->name), folder);
- UNLOCK();
- } else {
- UNLOCK();
- g_warning("couldn't find a vfolder rule in our table? %s", folder->full_name);
- }
-
- /* TODO: make the folder->full_name var thread accessible */
- oldname = g_strdup(folder->full_name);
- camel_store_rename_folder(vfolder_store, oldname, rule->name, NULL);
- g_free(oldname);
- }
-
- 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(l->data));
- } else {
- d(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) {
- g_signal_connect(rule, "changed", G_CALLBACK(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 = NULL;
-
- d(printf("rule removed; %s\n", rule->name));
-
- /* TODO: remove from folder info cache? */
-
- /* FIXME: is this even necessary? if we remove the folder from
- * the CamelStore, the tree should pick it up auto-magically
- * because it listens to CamelStore events... */
- path = g_strdup_printf("/%s", rule->name);
- mail_component_remove_folder (mail_component_peek (), 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_store_delete_folder(vfolder_store, rule->name, NULL);
- /* this must be unref'd after its deleted */
- if (folder)
- camel_object_unref(folder);
-}
-
-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;
-
- /* Warning not thread safe, but might be enough */
-
- LOCK();
-
- /* delete it from our list */
- rule = rule_context_find_rule((RuleContext *)context, info->full_name, NULL);
- if (rule) {
- /* We need to stop listening to removed events, otherwise we'll try and remove it again */
- g_signal_handlers_disconnect_matched(context, G_SIGNAL_MATCH_FUNC|G_SIGNAL_MATCH_DATA, 0,
- 0, NULL, context_rule_removed, context);
- rule_context_remove_rule((RuleContext *)context, rule);
- g_object_unref(rule);
- g_signal_connect(context, "rule_removed", G_CALLBACK(context_rule_removed), context);
-
- user = g_strdup_printf("%s/mail/vfolders.xml", mail_component_peek_base_directory (mail_component_peek ()));
- rule_context_save((RuleContext *)context, user);
- g_free(user);
- } else {
- g_warning("Cannot find rule for deleted vfolder '%s'", info->name);
- }
-
- UNLOCK();
-}
-
-static void
-store_folder_renamed(CamelObject *o, void *event_data, void *data)
-{
- CamelStore *store = (CamelStore *)o;
- CamelRenameInfo *info = event_data;
- FilterRule *rule;
- char *user;
- char *key;
- CamelFolder *folder;
-
- /* This should be more-or-less thread-safe */
-
- d(printf("Folder renamed to '%s' from '%s'\n", info->new->full_name, info->old_base));
-
- /* Folder is already renamed? */
- LOCK();
- d(printf("Changing folder name in hash table to '%s'\n", info->new->full_name));
- if (g_hash_table_lookup_extended(vfolder_hash, info->old_base, (void **)&key, (void **)&folder)) {
- g_hash_table_remove(vfolder_hash, key);
- g_free(key);
- g_hash_table_insert(vfolder_hash, g_strdup(info->new->full_name), folder);
-
- rule = rule_context_find_rule((RuleContext *)context, info->old_base, NULL);
- g_assert(rule);
- g_signal_handlers_disconnect_matched(rule, G_SIGNAL_MATCH_FUNC|G_SIGNAL_MATCH_DATA, 0,
- 0, NULL, rule_changed, folder);
- filter_rule_set_name(rule, info->new->full_name);
- g_signal_connect(rule, "changed", G_CALLBACK(rule_changed), folder);
-
- user = g_strdup_printf("%s/mail/vfolders.xml", mail_component_peek_base_directory (mail_component_peek ()));
- rule_context_save((RuleContext *)context, user);
- g_free(user);
-
- UNLOCK();
- } else {
- UNLOCK();
- g_warning("couldn't find a vfolder rule in our table? %s", info->new->full_name);
- }
-}
-
-void
-vfolder_load_storage(void)
-{
- 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", mail_component_peek_base_directory (mail_component_peek ()));
- 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(vfolder_store, "folder_created",
- (CamelObjectEventHookFunc)store_folder_created, NULL);
- camel_object_hook_event(vfolder_store, "folder_deleted",
- (CamelObjectEventHookFunc)store_folder_deleted, NULL);
- camel_object_hook_event(vfolder_store, "folder_renamed",
- (CamelObjectEventHookFunc)store_folder_renamed, NULL);
-
- d(printf("got store '%s' = %p\n", storeuri, vfolder_store));
- mail_component_load_store_by_uri (mail_component_peek (), storeuri, _("VFolders"));
-
- /* load our rules */
- user = g_strdup_printf ("%s/mail/vfolders.xml", mail_component_peek_base_directory (mail_component_peek ()));
- context = vfolder_context_new ();
- if (rule_context_load ((RuleContext *)context,
- EVOLUTION_PRIVDATADIR "/vfoldertypes.xml", user) != 0) {
- g_warning("cannot load vfolders: %s\n", ((RuleContext *)context)->error);
- }
- g_free (user);
-
- g_signal_connect(context, "rule_added", G_CALLBACK(context_rule_added), context);
- g_signal_connect(context, "rule_removed", G_CALLBACK(context_rule_removed), context);
-
- /* and setup the rules we have */
- rule = NULL;
- while ( (rule = rule_context_next_rule((RuleContext *)context, rule, NULL)) ) {
- if (rule->name)
- context_rule_added((RuleContext *)context, rule);
- else
- d(printf("invalid rule (%p) encountered: rule->name is NULL\n", rule));
- }
-
- g_free(storeuri);
-}
-
-static GtkWidget *vfolder_editor = NULL;
-
-static void
-vfolder_editor_response (GtkWidget *dialog, int button, void *data)
-{
- char *user;
-
- user = g_strdup_printf ("%s/mail/vfolders.xml", mail_component_peek_base_directory (mail_component_peek ()));
-
- switch(button) {
- case GTK_RESPONSE_ACCEPT:
- rule_context_save((RuleContext *)context, user);
- break;
- default:
- rule_context_revert((RuleContext *)context, user);
- }
-
- vfolder_editor = NULL;
-
- gtk_widget_destroy(dialog);
-
- g_free (user);
-}
-
-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_window_set_title (GTK_WINDOW (vfolder_editor), _("vFolders"));
- g_signal_connect(vfolder_editor, "response", G_CALLBACK(vfolder_editor_response), NULL);
-
- gtk_widget_show (vfolder_editor);
-}
-
-static void
-edit_rule_response(GtkWidget *w, int button, void *data)
-{
- if (button == GTK_RESPONSE_OK) {
- char *user;
- FilterRule *rule = g_object_get_data (G_OBJECT (w), "rule");
- FilterRule *orig = g_object_get_data (G_OBJECT (w), "orig");
-
- filter_rule_copy(orig, rule);
- user = g_strdup_printf("%s/mail/vfolders.xml", mail_component_peek_base_directory (mail_component_peek ()));
- rule_context_save((RuleContext *)context, user);
- g_free(user);
- }
-
- gtk_widget_destroy(w);
-}
-
-void
-vfolder_edit_rule(const char *uri)
-{
- GtkWidget *w;
- GtkDialog *gd;
- FilterRule *rule, *newrule;
- CamelURL *url;
-
- url = camel_url_new(uri, NULL);
- if (url && url->fragment
- && (rule = rule_context_find_rule((RuleContext *)context, url->fragment, NULL))) {
- g_object_ref((GtkObject *)rule);
- newrule = filter_rule_clone(rule);
-
- w = filter_rule_get_widget((FilterRule *)newrule, (RuleContext *)context);
-
- gd = (GtkDialog *)gtk_dialog_new_with_buttons(_("Edit VFolder"), NULL,
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_STOCK_CANCEL,
- GTK_RESPONSE_CANCEL,
- GTK_STOCK_OK,
- GTK_RESPONSE_OK,
- NULL);
- gtk_container_set_border_width (GTK_CONTAINER (gd), 6);
- gtk_box_set_spacing ((GtkBox *) gd->vbox, 6);
- gtk_dialog_set_default_response(gd, GTK_RESPONSE_OK);
- g_object_set(gd, "allow_shrink", FALSE, "allow_grow", TRUE, NULL);
- 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);
- g_object_set_data_full(G_OBJECT(gd), "rule", newrule, (GtkDestroyNotify)g_object_unref);
- g_object_set_data_full(G_OBJECT(gd), "orig", rule, (GtkDestroyNotify)g_object_unref);
- g_signal_connect(gd, "response", G_CALLBACK(edit_rule_response), NULL);
- gtk_widget_show((GtkWidget *)gd);
- } else {
- e_notice (NULL, GTK_MESSAGE_WARNING,
- _("Trying to edit a vfolder '%s' which doesn't exist."), uri);
- }
-
- if (url)
- camel_url_free(url);
-}
-
-static void
-new_rule_clicked(GtkWidget *w, int button, void *data)
-{
- if (button == GTK_RESPONSE_OK) {
- char *user;
- FilterRule *rule = g_object_get_data((GObject *)w, "rule");
-
- if (!filter_rule_validate(rule)) {
- /* no need to popup a dialog because the validate code does that. */
- return;
- }
-
- if (rule_context_find_rule ((RuleContext *)context, rule->name, rule->source)) {
- GtkWidget *dialog =
- gtk_message_dialog_new ((GtkWindow *) w, GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
- _("Rule name '%s' is not unique, choose another."),
- rule->name);
-
- gtk_dialog_run ((GtkDialog *) dialog);
- gtk_widget_destroy (dialog);
-
- return;
- }
-
-
- g_object_ref(rule);
- rule_context_add_rule((RuleContext *)context, rule);
- user = g_strdup_printf("%s/mail/vfolders.xml", mail_component_peek_base_directory (mail_component_peek ()));
- rule_context_save((RuleContext *)context, user);
- g_free(user);
- }
-
- gtk_widget_destroy(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;
- GtkDialog *gd;
-
- w = filter_rule_get_widget((FilterRule *)rule, (RuleContext *)context);
-
- gd = (GtkDialog *)gtk_dialog_new_with_buttons(_("New VFolder"),
- NULL,
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_STOCK_CANCEL,
- GTK_RESPONSE_CANCEL,
- GTK_STOCK_OK,
- GTK_RESPONSE_OK,
- NULL);
- gtk_dialog_set_default_response(gd, GTK_RESPONSE_OK);
- gtk_container_set_border_width (GTK_CONTAINER (gd), 6);
- gtk_box_set_spacing ((GtkBox *) gd->vbox, 6);
- g_object_set(gd, "allow_shrink", FALSE, "allow_grow", TRUE, NULL);
- 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);
- g_object_set_data_full(G_OBJECT(gd), "rule", rule, (GtkDestroyNotify)g_object_unref);
- g_signal_connect(gd, "response", G_CALLBACK(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);
-}
-
-static void
-vfolder_foreach_cb (gpointer key, gpointer data, gpointer user_data)
-{
- CamelFolder *folder = CAMEL_FOLDER (data);
-
- if (folder)
- camel_object_unref(folder);
-
- g_free (key);
-}
-
-void
-mail_vfolder_shutdown (void)
-{
- g_hash_table_foreach (vfolder_hash, vfolder_foreach_cb, NULL);
- g_hash_table_destroy (vfolder_hash);
- vfolder_hash = NULL;
-
- if (vfolder_store) {
- camel_object_unref (vfolder_store);
- vfolder_store = NULL;
- }
-
- if (context) {
- g_object_unref(context);
- context = NULL;
- }
-}
diff --git a/mail/mail-vfolder.h b/mail/mail-vfolder.h
deleted file mode 100644
index d945454c5e..0000000000
--- a/mail/mail-vfolder.h
+++ /dev/null
@@ -1,33 +0,0 @@
-
-#ifndef _MAIL_VFOLDER_H
-#define _MAIL_VFOLDER_H
-
-#include "Evolution.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(void);
-
-void vfolder_edit (void);
-void vfolder_edit_rule(const char *name);
-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);
-
-/* add a uri that is now (un)available to vfolders in a transient manner */
-void mail_vfolder_add_uri(CamelStore *store, const char *uri, int remove);
-
-/* note that a folder has changed name (uri) */
-void mail_vfolder_rename_uri(CamelStore *store, const char *from, const char *to);
-
-/* remove a uri that should be removed from vfolders permanently */
-void mail_vfolder_delete_uri(CamelStore *store, const char *uri);
-
-/* close up, clean up */
-void mail_vfolder_shutdown (void);
-
-#endif
diff --git a/mail/mail.h b/mail/mail.h
deleted file mode 100644
index 52d1b720a5..0000000000
--- a/mail/mail.h
+++ /dev/null
@@ -1,33 +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 version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * 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 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 "mail-config.h"
-#include "mail-session.h"
-#include "mail-types.h"
-
-/* mail-identify */
-char *mail_identify_mime_part (CamelMimePart *part, MailDisplay *md);
-gboolean evolution_folder_info_factory_init (void);
-
diff --git a/mail/message-list.c b/mail/message-list.c
deleted file mode 100644
index c1fb66c39e..0000000000
--- a/mail/message-list.c
+++ /dev/null
@@ -1,3378 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Miguel de Icaza (miguel@ximian.com)
- * Bertrand Guiheneuf (bg@aful.org)
- * And just about everyone else in evolution ...
- *
- * Copyright 2000-2002 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 <ctype.h>
-
-#include <glib/gunicode.h>
-
-#include <gconf/gconf.h>
-#include <gconf/gconf-client.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 <camel/camel-exception.h>
-#include <camel/camel-file-utils.h>
-#include <camel/camel-folder.h>
-#include <camel/camel-folder-thread.h>
-#include <e-util/e-memory.h>
-
-#include "filter/filter-label.h"
-
-#include "mail-config.h"
-#include "message-list.h"
-#include "mail-mt.h"
-#include "mail-tools.h"
-#include "mail-ops.h"
-
-#include "em-utils.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"
-#include "art/flag-for-followup.xpm"
-#include "art/flag-for-followup-done.xpm"
-
-/*#define TIMEIT */
-
-#ifdef TIMEIT
-#include <sys/time.h>
-#include <unistd.h>
-#endif
-
-#define d(x)
-#define t(x)
-
-struct _MessageListPrivate {
- GtkWidget *invisible; /* 4 selection */
-
- GPtrArray *primary_uids; /* uids in primary selection */
- GPtrArray *clipboard_uids; /* uids in clipboard selection */
-};
-
-/*
- * 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)
-
-enum {
- NORMALISED_SUBJECT,
- NORMALISED_FROM,
- NORMALISED_TO,
- NORMALISED_LAST,
-};
-
-#define PARENT_TYPE (e_tree_scrolled_get_type ())
-
-/* #define SMART_ADDRESS_COMPARE */
-
-#ifdef SMART_ADDRESS_COMPARE
-struct _EMailAddress {
- ENameWestern *wname;
- char *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 void on_selection_changed_cmd(ETree *tree, MessageList *ml);
-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 },
- { flag_for_followup_xpm,NULL },
- { flag_for_followup_done_xpm,NULL },
- { NULL, NULL }
-};
-
-/* FIXME: junk prefs */
-static gboolean junk_folder = TRUE;
-
-#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 (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 (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);
-}
-
-/* Note: by the time this function is called, the strings have already
- been normalised which means we can assume all lowercase chars and
- we can just use strcmp for the final comparison. */
-static int
-e_mail_address_compare (gconstpointer address1, gconstpointer address2)
-{
- const EMailAddress *addr1 = address1;
- const EMailAddress *addr2 = address2;
- int 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 strcmp (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 strcmp (addr1->address, addr2->address);
- }
-
- if (!addr1->wname->last)
- return -1;
- if (!addr2->wname->last)
- return 1;
-
- retval = strcmp (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 strcmp (addr1->address, addr2->address);
-
- if (!addr1->wname->first)
- return -1;
- if (!addr2->wname->first)
- return 1;
-
- retval = strcmp (addr1->wname->first, addr2->wname->first);
- if (retval)
- return retval;
-
- return strcmp (addr1->address, addr2->address);
-}
-#endif /* SMART_ADDRESS_COMPARE */
-
-/* Note: by the time this function is called, the strings have already
- been normalised which means we can assume all lowercase chars and
- we can just use strcmp for the final comparison. */
-static int
-address_compare (gconstpointer address1, gconstpointer address2)
-{
-#ifdef SMART_ADDRESS_COMPARE
- EMailAddress *addr1, *addr2;
-#endif /* SMART_ADDRESS_COMPARE */
- int 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 = strcmp ((const char *) address1, (const char *) address2);
-#endif /* SMART_ADDRESS_COMPARE */
-
- return retval;
-}
-
-static char *
-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;
-}
-
-static const char *
-get_normalised_string (MessageList *message_list, CamelMessageInfo *info, int col)
-{
- const char *string, *str;
- char *normalised;
- EPoolv *poolv;
- int index;
-
- switch (col) {
- case COL_SUBJECT_NORM:
- string = camel_message_info_subject (info);
- index = NORMALISED_SUBJECT;
- break;
- case COL_FROM_NORM:
- string = camel_message_info_from (info);
- index = NORMALISED_FROM;
- break;
- case COL_TO_NORM:
- string = camel_message_info_to (info);
- index = NORMALISED_TO;
- break;
- default:
- string = NULL;
- index = NORMALISED_LAST;
- g_assert_not_reached ();
- }
-
- /* slight optimisation */
- if (string == NULL || string[0] == '\0')
- return "";
-
- poolv = g_hash_table_lookup (message_list->normalised_hash, camel_message_info_uid (info));
- if (poolv == NULL) {
- poolv = e_poolv_new (NORMALISED_LAST);
- g_hash_table_insert (message_list->normalised_hash, (char *) camel_message_info_uid (info), poolv);
- } else {
- str = e_poolv_get (poolv, index);
- if (*str)
- return str;
- }
-
- if (col == COL_SUBJECT_NORM) {
- const unsigned char *subject;
-
- subject = (const unsigned char *) string;
- while (!g_ascii_strncasecmp (subject, "Re:", 3)) {
- subject += 3;
-
- /* jump over any spaces */
- while (*subject && isspace ((int) *subject))
- subject++;
- }
-
- /* jump over any spaces */
- while (*subject && isspace ((int) *subject))
- subject++;
-
- string = (const char *) subject;
- }
-
- normalised = g_utf8_collate_key (string, -1);
- e_poolv_set (poolv, index, normalised, TRUE);
-
- return e_poolv_get (poolv, index);
-}
-
-struct search_func_data {
- MessageList *message_list;
- guint32 flags;
- guint32 mask;
-};
-
-static gboolean
-search_func (ETreeModel *model, ETreePath path, struct search_func_data *data)
-{
- CamelMessageInfo *info;
-
- if (e_tree_model_node_is_root (data->message_list->model, path))
- return FALSE;
-
- info = get_message_info (data->message_list, path);
-
- if (info && (info->flags & data->mask) == data->flags) {
- if (data->message_list->cursor_uid) {
- g_free (data->message_list->cursor_uid);
- data->message_list->cursor_uid = g_strdup (camel_message_info_uid (info));
- }
- g_signal_emit (GTK_OBJECT (data->message_list), message_list_signals[MESSAGE_SELECTED], 0,
- camel_message_info_uid (info));
- return TRUE;
- }
- return FALSE;
-}
-
-
-/**
- * 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.
- *
- * Returns %TRUE if a new message has been selected or %FALSE otherwise.
- **/
-gboolean
-message_list_select (MessageList *message_list,
- MessageListSelectDirection direction,
- guint32 flags,
- guint32 mask,
- gboolean wraparound)
-{
- struct search_func_data data;
- ETreeFindNextParams params = 0;
-
- data.message_list = message_list;
- data.flags = flags;
- data.mask = mask;
-
- if (direction == MESSAGE_LIST_SELECT_NEXT)
- params |= E_TREE_FIND_NEXT_FORWARD;
- else
- params |= E_TREE_FIND_NEXT_BACKWARD;
-
- if (wraparound)
- params |= E_TREE_FIND_NEXT_WRAP;
-
- return e_tree_find_next (message_list->tree, params, (ETreePathFunc) search_func, &data);
-}
-
-
-/**
- * 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;
-
- if (message_list->regen) {
- g_free(message_list->pending_select_uid);
- message_list->pending_select_uid = g_strdup(uid);
- }
-
- node = g_hash_table_lookup (message_list->uid_nodemap, uid);
- if (node) {
- CamelMessageInfo *info;
-
- info = get_message_info (message_list, node);
-
- /* This will emit a changed signal that we'll pick up */
- e_tree_set_cursor (message_list->tree, node);
- } else {
- g_free (message_list->cursor_uid);
- message_list->cursor_uid = NULL;
- g_signal_emit (GTK_OBJECT (message_list), message_list_signals[MESSAGE_SELECTED], 0, NULL);
- }
-}
-
-
-void
-message_list_select_next_thread (MessageList *message_list)
-{
- ETreePath node, last;
-
- if (!message_list->cursor_uid)
- return;
-
- /* get the thread parent node */
- last = node = g_hash_table_lookup (message_list->uid_nodemap, message_list->cursor_uid);
- while (!e_tree_model_node_is_root (message_list->model, node)) {
- last = node;
- node = e_tree_model_node_get_parent (message_list->model, node);
- }
-
- /* get the next toplevel node */
- node = e_tree_model_node_get_next (message_list->model, last);
-
- 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));
-
- g_signal_emit (GTK_OBJECT (message_list), message_list_signals[MESSAGE_SELECTED], 0,
- camel_message_info_uid (info));
- }
-}
-
-
-/**
- * message_list_select_all:
- * @message_list: Message List widget
- *
- * Selects all messages in the message list.
- **/
-void
-message_list_select_all (MessageList *message_list)
-{
- ESelectionModel *etsm;
-
- etsm = e_tree_get_selection_model (message_list->tree);
-
- e_selection_model_select_all (etsm);
-}
-
-
-typedef struct thread_select_info {
- MessageList *ml;
- GPtrArray *paths;
-} thread_select_info_t;
-
-static gboolean
-select_node (ETreeModel *model, 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 *model = 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 (model, path)) {
- node = path;
- } else {
- node = e_tree_model_node_get_parent (model, 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 (model, node))
- node = path;
- }
-
- e_tree_model_node_traverse (model, node, select_node, tsi);
-}
-
-/**
- * message_list_select_thread:
- * @message_list: Message List widget
- *
- * Selects all messages in the current thread (based on cursor).
- **/
-void
-message_list_select_thread (MessageList *message_list)
-{
- ETreeSelectionModel *etsm;
- thread_select_info_t tsi;
- int i;
-
- tsi.ml = message_list;
- tsi.paths = g_ptr_array_new ();
-
- etsm = (ETreeSelectionModel *) e_tree_get_selection_model (message_list->tree);
-
- e_tree_selected_path_foreach (message_list->tree, thread_select_foreach, &tsi);
-
- for (i = 0; i < tsi.paths->len; i++)
- e_tree_selection_model_add_to_selection (etsm, tsi.paths->pdata[i]);
-
- g_ptr_array_free (tsi.paths, TRUE);
-}
-
-
-/**
- * message_list_invert_selection:
- * @message_list: Message List widget
- *
- * Invert the current selection in the message-list.
- **/
-void
-message_list_invert_selection (MessageList *message_list)
-{
- ESelectionModel *etsm;
-
- etsm = e_tree_get_selection_model (message_list->tree);
-
- e_selection_model_invert_selection (etsm);
-}
-
-void
-message_list_copy(MessageList *ml, gboolean cut)
-{
- struct _MessageListPrivate *p = ml->priv;
- GPtrArray *uids;
-
- if (p->clipboard_uids) {
- message_list_free_uids(ml, p->clipboard_uids);
- p->clipboard_uids = NULL;
- }
-
- uids = message_list_get_selected(ml);
-
- if (uids->len > 0) {
- if (cut) {
- int i;
-
- camel_folder_freeze(ml->folder);
- for (i=0;i<uids->len;i++)
- camel_folder_set_message_flags(ml->folder, uids->pdata[i],
- CAMEL_MESSAGE_SEEN | CAMEL_MESSAGE_DELETED,
- CAMEL_MESSAGE_SEEN | CAMEL_MESSAGE_DELETED);
-
- camel_folder_thaw(ml->folder);
- }
-
- p->clipboard_uids = uids;
- gtk_selection_owner_set(p->invisible, GDK_SELECTION_CLIPBOARD, gtk_get_current_event_time());
- } else {
- message_list_free_uids(ml, uids);
- gtk_selection_owner_set(NULL, GDK_SELECTION_CLIPBOARD, gtk_get_current_event_time());
- }
-}
-
-gboolean
-message_list_has_primary_selection(MessageList *ml)
-{
- return ml->priv->primary_uids != NULL;
-}
-
-void
-message_list_paste(MessageList *ml)
-{
- gtk_selection_convert(ml->priv->invisible, GDK_SELECTION_CLIPBOARD,
- gdk_atom_intern ("x-uid-list", FALSE),
- GDK_CURRENT_TIME);
-}
-
-/*
- * 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:
- case COL_FOLLOWUP_FLAG_STATUS:
- case COL_FOLLOWUP_DUE_BY:
- return (void *) value;
-
- case COL_FROM:
- case COL_SUBJECT:
- case COL_TO:
- case COL_FOLLOWUP_FLAG:
- case COL_LOCATION:
- 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:
- case COL_FOLLOWUP_FLAG_STATUS:
- case COL_FOLLOWUP_DUE_BY:
- break;
-
- case COL_FROM:
- case COL_SUBJECT:
- case COL_TO:
- case COL_FOLLOWUP_FLAG:
- case COL_LOCATION:
- 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:
- case COL_FOLLOWUP_FLAG_STATUS:
- case COL_FOLLOWUP_DUE_BY:
- return NULL;
-
- case COL_FROM:
- case COL_SUBJECT:
- case COL_TO:
- case COL_FOLLOWUP_FLAG:
- case COL_LOCATION:
- 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:
- case COL_FOLLOWUP_FLAG_STATUS:
- case COL_FOLLOWUP_DUE_BY:
- return value == NULL;
-
- case COL_FROM:
- case COL_SUBJECT:
- case COL_TO:
- case COL_FOLLOWUP_FLAG:
- case COL_LOCATION:
- 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 = GPOINTER_TO_UINT(value);
- if (i > 4)
- return g_strdup ("");
- return g_strdup (_(status_map[i]));
-
- case COL_SCORE:
- i = GPOINTER_TO_UINT(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:
- case COL_FOLLOWUP_FLAG_STATUS:
- return g_strdup_printf ("%d", GPOINTER_TO_UINT(value));
-
- case COL_SENT:
- case COL_RECEIVED:
- case COL_FOLLOWUP_DUE_BY:
- 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:
- case COL_FOLLOWUP_FLAG:
- case COL_LOCATION:
- 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;
- const char *str;
-
- if (e_tree_model_node_is_root (etm, path))
- return NULL;
-
- /* retrieve the message information array */
- msg_info = e_tree_memory_node_get_data (E_TREE_MEMORY(etm), path);
- g_assert (msg_info != NULL);
-
- switch (col){
- case COL_MESSAGE_STATUS:
- 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_FOLLOWUP_FLAG_STATUS: {
- const char *tag, *cmp;
-
- /* FIXME: this all should be methods off of message-tag-followup class,
- FIXME: the tag names should be namespaced :( */
- tag = camel_tag_get ((CamelTag **) &msg_info->user_tags, "follow-up");
- cmp = camel_tag_get ((CamelTag **) &msg_info->user_tags, "completed-on");
- if (tag && tag[0]) {
- if (cmp && cmp[0])
- return GINT_TO_POINTER(2);
- else
- return GINT_TO_POINTER(1);
- } else
- return GINT_TO_POINTER(0);
- }
- case COL_FOLLOWUP_DUE_BY: {
- const char *tag;
- time_t due_by;
-
- tag = camel_tag_get ((CamelTag **) &msg_info->user_tags, "due-by");
- if (tag && *tag) {
- due_by = camel_header_decode_date (tag, NULL);
- return GINT_TO_POINTER (due_by);
- } else {
- return GINT_TO_POINTER (0);
- }
- }
- case COL_FOLLOWUP_FLAG:
- str = camel_tag_get ((CamelTag **) &msg_info->user_tags, "follow-up");
- return (void *)(str ? str : "");
- case COL_ATTACHMENT:
- return GINT_TO_POINTER ((msg_info->flags & CAMEL_MESSAGE_ATTACHMENTS) != 0);
- case COL_FROM:
- str = camel_message_info_from (msg_info);
- return (void *)(str ? str : "");
- case COL_FROM_NORM:
- return (void *) get_normalised_string (message_list, msg_info, col);
- case COL_SUBJECT:
- str = camel_message_info_subject (msg_info);
- return (void *)(str ? str : "");
- case COL_SUBJECT_NORM:
- return (void *) get_normalised_string (message_list, msg_info, col);
- 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:
- str = camel_message_info_to (msg_info);
- return (void *)(str ? str : "");
- case COL_TO_NORM:
- return (void *) get_normalised_string (message_list, msg_info, col);
- 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 GINT_TO_POINTER (subtree_unread (message_list, child));
- }
-
- return GINT_TO_POINTER (!(msg_info->flags & CAMEL_MESSAGE_SEEN));
- }
- case COL_COLOUR: {
- const char *colour, *due_by, *completed, *label;
-
- /* Priority: colour tag; label tag; important flag; due-by tag */
-
- colour = camel_tag_get ((CamelTag **) &msg_info->user_tags, "colour");
- due_by = camel_tag_get ((CamelTag **) &msg_info->user_tags, "due-by");
- completed = camel_tag_get ((CamelTag **) &msg_info->user_tags, "completed-on");
- label = camel_tag_get ((CamelTag **) &msg_info->user_tags, "label");
- if (colour == NULL) {
- find_colour:
- if (label != NULL) {
- colour = mail_config_get_label_color_by_name (label);
- if (colour == NULL) {
- /* dead label? */
- label = NULL;
- goto find_colour;
- }
- } else if (msg_info->flags & CAMEL_MESSAGE_FLAGGED) {
- /* FIXME: extract from the xpm somehow. */
- colour = "#A7453E";
- } else if ((due_by && *due_by) && !(completed && *completed)) {
- time_t now = time (NULL);
- time_t target_date;
-
- target_date = camel_header_decode_date (due_by, NULL);
- if (now >= target_date) {
- /* FIXME: extract from the xpm somehow. */
- colour = "#A7453E";
- }
- }
- }
- return (void *) colour;
- }
- case COL_LOCATION: {
- CamelFolder *folder;
- char *name;
-
- if (CAMEL_IS_VEE_FOLDER(message_list->folder)) {
- folder = camel_vee_folder_get_location((CamelVeeFolder *)message_list->folder, (CamelVeeMessageInfo *)msg_info, NULL);
- } else {
- folder = message_list->folder;
- }
-
- camel_object_get(folder, NULL, CAMEL_OBJECT_DESCRIPTION, &name, 0);
- return name;
- }
- default:
- 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_utf8_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_utf8_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_utf8_strftime_fix_am_pm (buf, 26, _("%a %l:%M %p"), &then);
- done = TRUE;
- break;
- }
- }
- }
- if (!done) {
- if (then.tm_year == now.tm_year) {
- e_utf8_strftime_fix_am_pm (buf, 26, _("%b %d %l:%M %p"), &then);
- } else {
- e_utf8_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_pixbuf (extras, "followup", states_pixmaps [15].pixbuf);
-
- e_table_extras_add_compare (extras, "address_compare", address_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));
-
- images[1] = states_pixmaps [15].pixbuf;
- images[2] = states_pixmaps [16].pixbuf;
- e_table_extras_add_cell (extras, "render_flag_status", e_cell_toggle_new (0, 3, 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);
- g_object_set (G_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);
- g_object_set (G_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);
- g_object_set (G_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-expanded-");
- e_tree_save_expanded_state(ml->tree, filename);
- g_free(filename);
-}
-
-static void
-load_tree_state (MessageList *ml)
-{
- char *filename;
-
- if (ml->folder == NULL || ml->tree == NULL)
- return;
-
- filename = mail_config_folder_to_cachename (ml->folder, "et-expanded-");
- e_tree_load_expanded_state (ml->tree, filename);
- g_free (filename);
-}
-
-
-void
-message_list_save_state (MessageList *ml)
-{
- save_tree_state (ml);
- hide_save_state (ml);
-}
-
-static void
-message_list_setup_etree (MessageList *message_list, gboolean outgoing)
-{
- /* 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;
-
- g_object_set (message_list->tree,
- "uniform_row_height", TRUE,
- NULL);
-
- 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-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);
- }
-}
-
-static void
-ml_selection_get(GtkWidget *widget, GtkSelectionData *data, guint info, guint time_stamp, MessageList *ml)
-{
- GPtrArray *uids;
-
- if (info & 1)
- uids = ml->priv->primary_uids;
- else
- uids = ml->priv->clipboard_uids;
-
- if (uids == NULL)
- return;
-
- if (info & 2) {
- /* text/plain */
- printf("setting text/plain selection for uids\n");
- em_utils_selection_set_mailbox(data, ml->folder, uids);
- } else {
- /* x-uid-list */
- printf("setting x-uid-list selection for uids\n");
- em_utils_selection_set_uidlist(data, ml->folder_uri, uids);
- }
-}
-
-static void
-ml_selection_clear_event(GtkWidget *widget, GdkEventSelection *event, MessageList *ml)
-{
- struct _MessageListPrivate *p = ml->priv;
-
- if (event->selection == GDK_SELECTION_PRIMARY) {
- if (p->primary_uids) {
- message_list_free_uids(ml, p->primary_uids);
- p->primary_uids = NULL;
- }
- } else if (event->selection == GDK_SELECTION_CLIPBOARD) {
- if (p->clipboard_uids) {
- message_list_free_uids(ml, p->clipboard_uids);
- p->clipboard_uids = NULL;
- }
- }
-}
-
-static void
-ml_selection_received_uidlist(MessageList *ml, GtkSelectionData *data)
-{
- CamelFolder *folder;
- GPtrArray *uids;
- char *uri;
-
- if (em_utils_selection_get_uidlist(data, &uri, &uids) == 0)
- return;
-
- folder = mail_tool_uri_to_folder(uri, 0, NULL);
- if (folder) {
- mail_transfer_messages(folder, uids, FALSE, ml->folder_uri, 0, NULL, NULL);
- camel_object_unref(folder);
- } else {
- /* FIXME: error box? */
- g_warning("could not open paste source uri '%s'", uri);
- em_utils_uids_free(uids);
- }
-
- g_free(uri);
-}
-
-static void
-ml_selection_received(GtkWidget *widget, GtkSelectionData *data, guint time, MessageList *ml)
-{
- if (data->target != gdk_atom_intern ("x-uid-list", FALSE)) {
- printf("Unknown selection received by message-list\n");
-
- return;
- }
-
- ml_selection_received_uidlist(ml, data);
-}
-
-static GtkTargetEntry ml_drag_types[] = {
- { "x-uid-list", 0, 0 },
- { "message/rfc822", 0, 1 },
- /* not included in dest types */
- { "text/uri-list", 0, 2 },
-};
-
-static void
-ml_tree_drag_data_get (ETree *tree, int row, ETreePath path, int col,
- GdkDragContext *context, GtkSelectionData *data,
- guint info, guint time, MessageList *ml)
-{
- GPtrArray *uids;
-
- uids = message_list_get_selected(ml);
-
- if (uids->len > 0) {
- switch (info) {
- case 0 /* DND_TARGET_TYPE_X_UID_LIST */:
- em_utils_selection_set_uidlist(data, ml->folder_uri, uids);
- break;
- case 1 /* DND_TARGET_TYPE_MESSAGE_RFC822 */:
- em_utils_selection_set_mailbox(data, ml->folder, uids);
- break;
- case 2 /* DND_TARGET_TYPE_TEXT_URI_LIST */:
- em_utils_selection_set_urilist(data, ml->folder, uids);
- break;
- }
- }
-
- message_list_free_uids(ml, uids);
-}
-
-static void
-ml_tree_drag_data_received (ETree *tree, int row, ETreePath path, int col,
- GdkDragContext *context, gint x, gint y,
- GtkSelectionData *data, guint info,
- guint time, MessageList *ml)
-{
- /* this means we are receiving no data */
- if (data->data == NULL || data->length == -1)
- return;
-
- /* Note: we don't receive text/uri-list, since we have no
- guarantee on what the content would be */
-
- switch (info) {
- case 1 /* DND_TARGET_TYPE_MESSAGE_RFC822 */:
- em_utils_selection_get_mailbox(data, ml->folder);
- break;
- case 0 /* DND_TARGET_TYPE_X_UID_LIST */:
- ml_selection_received_uidlist(ml, data);
- break;
- }
-
- gtk_drag_finish(context, TRUE, TRUE, time);
-}
-
-/*
- * GtkObject::init
- */
-static void
-message_list_init (GtkObject *object)
-{
- MessageList *message_list = MESSAGE_LIST (object);
- struct _MessageListPrivate *p;
- GdkAtom matom;
-
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (message_list), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
-
- message_list->normalised_hash = g_hash_table_new (g_str_hash, g_str_equal);
-
- 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);
- message_list->async_event = mail_async_event_new();
-
- /* TODO: Should this only get the selection if we're realised? */
- p = message_list->priv = g_malloc0(sizeof(*message_list->priv));
- p->invisible = gtk_invisible_new();
- g_object_ref(p->invisible);
- gtk_object_sink((GtkObject *)p->invisible);
-
- matom = gdk_atom_intern ("x-uid-list", FALSE);
- gtk_selection_add_target(p->invisible, GDK_SELECTION_CLIPBOARD, matom, 0);
- gtk_selection_add_target(p->invisible, GDK_SELECTION_PRIMARY, matom, 1);
- gtk_selection_add_target(p->invisible, GDK_SELECTION_CLIPBOARD, GDK_SELECTION_TYPE_STRING, 2);
- gtk_selection_add_target(p->invisible, GDK_SELECTION_PRIMARY, GDK_SELECTION_TYPE_STRING, 3);
-
- g_signal_connect(p->invisible, "selection_get", G_CALLBACK(ml_selection_get), message_list);
- g_signal_connect(p->invisible, "selection_clear_event", G_CALLBACK(ml_selection_clear_event), message_list);
- g_signal_connect(p->invisible, "selection_received", G_CALLBACK(ml_selection_received), message_list);
-}
-
-static void
-normalised_free (gpointer key, gpointer value, gpointer user_data)
-{
- e_poolv_destroy (value);
-}
-
-static void
-message_list_destroy(GtkObject *object)
-{
- MessageList *message_list = MESSAGE_LIST (object);
- struct _MessageListPrivate *p = message_list->priv;
-
- if (message_list->async_event) {
- mail_async_event_destroy(message_list->async_event);
- message_list->async_event = NULL;
- }
-
- if (message_list->folder) {
- /* need to do this before removing folder, folderinfo's might not exist after */
- 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);
- }
-
- save_tree_state(message_list);
- hide_save_state(message_list);
- camel_object_unhook_event(message_list->folder, "folder_changed", folder_changed, message_list);
- camel_object_unhook_event(message_list->folder, "message_changed", message_changed, message_list);
- camel_object_unref (message_list->folder);
- message_list->folder = NULL;
- }
-
- if (p->invisible) {
- g_object_unref(p->invisible);
- p->invisible = NULL;
- }
-
- if (message_list->extras) {
- g_object_unref (message_list->extras);
- message_list->extras = NULL;
- }
-
- if (message_list->model) {
- g_object_unref (message_list->model);
- message_list->model = NULL;
- }
-
- if (message_list->idle_id != 0) {
- g_source_remove (message_list->idle_id);
- message_list->idle_id = 0;
- }
-
- if (message_list->seen_id) {
- g_source_remove (message_list->seen_id);
- message_list->seen_id = 0;
- }
-
- message_list->destroyed = TRUE;
-
- GTK_OBJECT_CLASS (message_list_parent_class)->destroy(object);
-}
-
-static void
-message_list_finalise (GObject *object)
-{
- MessageList *message_list = MESSAGE_LIST (object);
- struct _MessageListPrivate *p = message_list->priv;
-
- g_hash_table_foreach (message_list->normalised_hash, normalised_free, NULL);
- g_hash_table_destroy (message_list->normalised_hash);
-
- if (message_list->thread_tree)
- camel_folder_thread_messages_unref(message_list->thread_tree);
-
- 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;
- }
-
- g_free(message_list->cursor_uid);
-
- g_mutex_free(message_list->hide_lock);
-
- g_free(message_list->folder_uri);
- message_list->folder_uri = NULL;
-
- if (p->primary_uids)
- message_list_free_uids(message_list, p->primary_uids);
- if (p->clipboard_uids)
- message_list_free_uids(message_list, p->clipboard_uids);
-
- g_free(p);
-
- G_OBJECT_CLASS (message_list_parent_class)->finalize (object);
-}
-
-/*
- * GtkObjectClass::init
- */
-static void
-message_list_class_init (GObjectClass *object_class)
-{
- message_list_parent_class = g_type_class_ref(PARENT_TYPE);
-
- object_class->finalize = message_list_finalise;
- ((GtkObjectClass *)object_class)->destroy = message_list_destroy;
-
- message_list_signals[MESSAGE_SELECTED] =
- g_signal_new ("message_selected",
- MESSAGE_LIST_TYPE,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (MessageListClass, message_selected),
- NULL,
- NULL,
- g_cclosure_marshal_VOID__STRING,
- G_TYPE_NONE, 1, G_TYPE_STRING);
-
- message_list_signals[MESSAGE_LIST_BUILT] =
- g_signal_new ("message_list_built",
- MESSAGE_LIST_TYPE,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (MessageListClass, message_list_built),
- NULL,
- NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-
- message_list_init_images ();
-}
-
-static void
-message_list_construct (MessageList *message_list)
-{
- gboolean construct_failed;
- 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);
-
- e_tree_memory_set_expanded_default(E_TREE_MEMORY(message_list->model), TRUE);
-
- /*
- * The etree
- */
- message_list->extras = message_list_create_extras ();
- construct_failed = (e_tree_scrolled_construct_from_spec_file (E_TREE_SCROLLED (message_list),
- message_list->model,
- message_list->extras,
- EVOLUTION_ETSPECDIR "/message-list.etspec",
- NULL)
- == NULL);
-
- message_list->tree = e_tree_scrolled_get_tree(E_TREE_SCROLLED (message_list));
- if (!construct_failed)
- e_tree_root_node_set_visible (message_list->tree, FALSE);
-
- g_signal_connect((message_list->tree), "cursor_activated",
- G_CALLBACK (on_cursor_activated_cmd),
- message_list);
-
- g_signal_connect((message_list->tree), "click",
- G_CALLBACK (on_click), message_list);
-
- g_signal_connect((message_list->tree), "selection_change",
- G_CALLBACK (on_selection_changed_cmd), message_list);
-
-
- e_tree_drag_source_set(message_list->tree, GDK_BUTTON1_MASK,
- ml_drag_types, sizeof(ml_drag_types)/sizeof(ml_drag_types[0]),
- GDK_ACTION_MOVE|GDK_ACTION_COPY);
-
- g_signal_connect(message_list->tree, "tree_drag_data_get",
- G_CALLBACK(ml_tree_drag_data_get), message_list);
-
- /* note, we only include 2 types, we don't include text/uri-list as a receiver */
- e_tree_drag_dest_set(message_list->tree, GTK_DEST_DEFAULT_ALL,
- ml_drag_types, 2,
- GDK_ACTION_MOVE|GDK_ACTION_COPY);
-
- g_signal_connect(message_list->tree, "tree_drag_data_received",
- G_CALLBACK(ml_tree_drag_data_received), message_list);
-}
-
-/**
- * message_list_new:
- *
- * Creates a new message-list widget.
- *
- * Returns a new message-list widget.
- **/
-GtkWidget *
-message_list_new (void)
-{
- MessageList *message_list;
-
- message_list = MESSAGE_LIST (g_object_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;
- g_signal_emit (ml, message_list_signals[MESSAGE_SELECTED], 0, 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;
- g_signal_emit (ml, message_list_signals[MESSAGE_SELECTED], 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("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;
- g_signal_emit (ml, message_list_signals[MESSAGE_SELECTED], 0, 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
-
-}
-
-static void
-message_list_change_first_visible_parent (MessageList *ml, ETreePath node)
-{
- ETreePath first_visible = NULL;
-
- while (node && (node = e_tree_model_node_get_parent (ml->model, node))) {
- if (!e_tree_node_is_expanded (ml->tree, node))
- first_visible = node;
- }
-
- if (first_visible != NULL) {
- e_tree_model_pre_change (ml->model);
- e_tree_model_node_data_changed (ml->model, first_visible);
- }
-}
-
-#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
-
- d(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_pre_change (ml->model);
- e_tree_model_node_data_changed (ml->model, node);
-
- message_list_change_first_visible_parent (ml, 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
-mail_folder_hide_by_flag (CamelFolder *folder, MessageList *ml, CamelFolderChangeInfo **changes, int flag)
-{
- CamelFolderChangeInfo *newchanges, *oldchanges = *changes;
- CamelMessageInfo *info;
- int i;
-
- newchanges = camel_folder_change_info_new ();
-
- for (i = 0; i < oldchanges->uid_changed->len; i++) {
- ETreePath node = g_hash_table_lookup (ml->uid_nodemap, oldchanges->uid_changed->pdata[i]);
-
- info = camel_folder_get_message_info (folder, oldchanges->uid_changed->pdata[i]);
- if (node != NULL && info != NULL && (info->flags & flag) != 0)
- camel_folder_change_info_remove_uid (newchanges, oldchanges->uid_changed->pdata[i]);
- else if (node == NULL && info != NULL && (info->flags & flag) == 0)
- camel_folder_change_info_add_uid (newchanges, oldchanges->uid_changed->pdata[i]);
- else
- camel_folder_change_info_change_uid (newchanges, oldchanges->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 < oldchanges->uid_added->len; i++)
- camel_folder_change_info_add_uid (newchanges, oldchanges->uid_added->pdata[i]);
- for (i = 0; i < oldchanges->uid_removed->len; i++)
- camel_folder_change_info_remove_uid (newchanges, oldchanges->uid_removed->pdata[i]);
- camel_folder_change_info_free (oldchanges);
- *changes = newchanges;
- } else {
- camel_folder_change_info_free (newchanges);
- }
-}
-
-static void
-main_folder_changed (CamelObject *o, gpointer event_data, gpointer user_data)
-{
- MessageList *ml = MESSAGE_LIST (user_data);
- CamelFolderChangeInfo *changes = (CamelFolderChangeInfo *)event_data;
- 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));
-
- for (i = 0; i < changes->uid_removed->len; i++) {
- /* uncache the normalised strings for these uids */
- EPoolv *poolv;
-
- poolv = g_hash_table_lookup (ml->normalised_hash, changes->uid_removed->pdata[i]);
- if (poolv != NULL) {
- g_hash_table_remove (ml->normalised_hash, changes->uid_removed->pdata[i]);
- e_poolv_destroy (poolv);
- }
- }
-
- /* check if the hidden state has changed, if so modify accordingly, then regenerate */
- if (ml->hidejunk || ml->hidedeleted)
- mail_folder_hide_by_flag (folder, ml, &changes, (ml->hidejunk ? CAMEL_MESSAGE_JUNK : 0) | (ml->hidedeleted ? CAMEL_MESSAGE_DELETED : 0));
-
- 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_pre_change (ml->model);
- e_tree_model_node_data_changed (ml->model, node);
-
- message_list_change_first_visible_parent (ml, 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)
-{
- CamelFolderChangeInfo *changes;
- MessageList *ml = MESSAGE_LIST (user_data);
-
- if (event_data) {
- changes = camel_folder_change_info_new();
- camel_folder_change_info_cat(changes, (CamelFolderChangeInfo *)event_data);
- } else {
- changes = NULL;
- }
-
- mail_async_event_emit(ml->async_event, MAIL_ASYNC_GUI, (MailAsyncFunc)main_folder_changed, o, changes, user_data);
-}
-
-static void
-message_changed (CamelObject *o, gpointer event_data, gpointer user_data)
-{
- CamelFolderChangeInfo *changes;
- MessageList *ml = MESSAGE_LIST (user_data);
-
- changes = camel_folder_change_info_new();
- camel_folder_change_info_change_uid(changes, (char *)event_data);
-
- mail_async_event_emit(ml->async_event, MAIL_ASYNC_GUI, (MailAsyncFunc)main_folder_changed, o, changes, user_data);
-}
-
-
-/**
- * message_list_set_folder:
- * @message_list: Message List widget
- * @folder: folder backend to be set
- * @uri: uri of @folder.
- * @outgoing: whether this is an outgoing folder
- *
- * Sets @folder to be the backend folder for @message_list. If
- * @outgoing is %TRUE, then the message-list UI changes to default to
- * the "Outgoing folder" column view.
- **/
-void
-message_list_set_folder (MessageList *message_list, CamelFolder *folder, const char *uri, gboolean outgoing)
-{
- gboolean hide_deleted;
- GConfClient *gconf;
- CamelException ex;
-
- g_return_if_fail (IS_MESSAGE_LIST (message_list));
-
- if (message_list->folder == folder)
- return;
-
- camel_exception_init (&ex);
-
- /* cancel any outstanding regeneration requests */
- if (message_list->regen) {
- GList *l = message_list->regen;
-
- while (l) {
- struct _mail_msg *mm = l->data;
-
- if (mm->cancel)
- camel_operation_cancel(mm->cancel);
- l = l->next;
- }
- }
-
- 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 (message_list->folder);
- }
-
- if (message_list->thread_tree) {
- camel_folder_thread_messages_unref(message_list->thread_tree);
- message_list->thread_tree = NULL;
- }
-
- if (message_list->folder_uri != uri) {
- g_free(message_list->folder_uri);
- message_list->folder_uri = g_strdup(uri);
- message_list->folder = folder;
- }
-
- if (message_list->cursor_uid) {
- g_free(message_list->cursor_uid);
- message_list->cursor_uid = NULL;
- g_signal_emit(message_list, message_list_signals[MESSAGE_SELECTED], 0, NULL);
- }
-
- if (folder) {
- /* Setup the strikeout effect for non-trash folders */
- if (!(folder->folder_flags & CAMEL_FOLDER_IS_TRASH)) {
- ECell *cell;
-
- cell = e_table_extras_get_cell (message_list->extras, "render_date");
- g_object_set (cell,
- "strikeout_column", COL_DELETED,
- NULL);
-
- cell = e_table_extras_get_cell (message_list->extras, "render_text");
- g_object_set (cell,
- "strikeout_column", COL_DELETED,
- NULL);
-
- cell = e_table_extras_get_cell (message_list->extras, "render_size");
- g_object_set (cell,
- "strikeout_column", COL_DELETED,
- NULL);
- }
-
- /* Build the etree suitable for this folder */
- message_list_setup_etree (message_list, outgoing);
-
- camel_object_hook_event (folder, "folder_changed",
- folder_changed, message_list);
- camel_object_hook_event (folder, "message_changed",
- message_changed, message_list);
-
- camel_object_ref (folder);
-
- gconf = mail_config_get_gconf_client ();
- hide_deleted = !gconf_client_get_bool (gconf, "/apps/evolution/mail/display/show_deleted", NULL);
- message_list->hidedeleted = hide_deleted && !(folder->folder_flags & CAMEL_FOLDER_IS_TRASH);
- message_list->hidejunk = junk_folder && !(folder->folder_flags & CAMEL_FOLDER_IS_JUNK) && !(folder->folder_flags & CAMEL_FOLDER_IS_TRASH);
-
- 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);
- int selected = e_selection_model_selected_count (esm);
-
- if (selected == 1 && message_list->cursor_uid) {
- d(printf ("emitting cursor changed signal, for uid %s\n", message_list->cursor_uid));
- g_signal_emit (message_list, message_list_signals[MESSAGE_SELECTED], 0, message_list->cursor_uid);
- } else {
- g_signal_emit (message_list, message_list_signals[MESSAGE_SELECTED], 0, NULL);
- }
-
- 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 void
-on_selection_changed_cmd(ETree *tree, MessageList *ml)
-{
- GPtrArray *uids;
-
- uids = message_list_get_selected(ml);
- g_free(ml->cursor_uid);
- if (uids->len == 1)
- ml->cursor_uid = g_strdup(uids->pdata[0]);
- else
- ml->cursor_uid = NULL;
-
- if (uids->len <= 1 && !ml->idle_id)
- ml->idle_id = g_idle_add_full (G_PRIORITY_LOW, on_cursor_activated_idle, ml, NULL);
-
- if (ml->priv->primary_uids) {
- message_list_free_uids(ml, ml->priv->primary_uids);
- ml->priv->primary_uids = NULL;
- }
-
- if (uids->len > 0) {
- ml->priv->primary_uids = uids;
- gtk_selection_owner_set(ml->priv->invisible, GDK_SELECTION_PRIMARY, gtk_get_current_event_time());
- } else {
- message_list_free_uids(ml, uids);
- gtk_selection_owner_set(NULL, GDK_SELECTION_PRIMARY, gtk_get_current_event_time());
- }
-}
-
-static gint
-on_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, MessageList *list)
-{
- CamelMessageInfo *info;
- int flag;
-
- 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, marks it as needing a reply, marks it as unread,
- then undelete the message. */
- if (info->flags & CAMEL_MESSAGE_DELETED) {
- if (col == COL_FLAGGED && !(info->flags & CAMEL_MESSAGE_FLAGGED))
- flag |= CAMEL_MESSAGE_DELETED;
-
- if (col == COL_MESSAGE_STATUS && (info->flags & CAMEL_MESSAGE_SEEN))
- 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) {
- g_source_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);
-}
-
-struct _ml_selected_data {
- MessageList *ml;
- GPtrArray *uids;
-};
-
-static void
-ml_getselected_cb(ETreePath path, void *user_data)
-{
- struct _ml_selected_data *data = user_data;
- const char *uid;
-
- if (e_tree_model_node_is_root (data->ml->model, path))
- return;
-
- uid = get_message_uid(data->ml, path);
- g_assert(uid != NULL);
- g_ptr_array_add(data->uids, g_strdup(uid));
-}
-
-GPtrArray *
-message_list_get_selected(MessageList *ml)
-{
- struct _ml_selected_data data = {
- ml,
- g_ptr_array_new()
- };
-
- e_tree_selected_path_foreach(ml->tree, ml_getselected_cb, &data);
-
- return data.uids;
-}
-
-void message_list_free_uids(MessageList *ml, GPtrArray *uids)
-{
- int i;
-
- for (i=0;i<uids->len;i++)
- g_free(uids->pdata[i]);
- g_ptr_array_free(uids, TRUE);
-}
-
-/* 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->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;
-
- if (ml->thread_tree) {
- camel_folder_thread_messages_unref(ml->thread_tree);
- ml->thread_tree = NULL;
- }
-
- 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;
-}
-
-struct _glibsuxcrap {
- unsigned int count;
- CamelFolder *folder;
-};
-
-static void
-glib_crapback(void *key, void *data, void *x)
-{
- struct _glibsuxcrap *y = x;
- CamelMessageInfo *mi;
-
- mi = camel_folder_get_message_info(y->folder, key);
- if (mi) {
- y->count++;
- camel_folder_free_message_info(y->folder, mi);
- }
-}
-
-/* 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 && ml->folder) {
- /* this is a hack, should probably just maintain the hidden table better */
- struct _glibsuxcrap x = { 0, ml->folder };
- g_hash_table_foreach(ml->hidden, glib_crapback, &x);
- hidden = x.count;
- }
- 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);
-
- if (ml->thread_tree) {
- camel_folder_thread_messages_unref(ml->thread_tree);
- ml->thread_tree = NULL;
- }
-
- 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;
-
- if (ml->folder == NULL)
- return;
-
- 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;
-
- int complete;
-
- 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 */
- gboolean hidejunk; /* we want to/dont want to show junk messages */
- gboolean thread_subject;
- 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, *searchuids = NULL;
- CamelMessageInfo *info;
- int i;
-
- /* if we have hidedeleted on, use a search to find it out, merge with existing search if set */
- if (!camel_folder_has_search_capability(m->folder)) {
- /* if we have no search capability, dont let search or hide deleted work */
- uids = camel_folder_get_uids(m->folder);
- } else if (m->hidedel) {
- char *expr;
-
- if (m->hidejunk) {
- if (m->search) {
- expr = alloca(strlen(m->search) + 92);
- sprintf(expr, "(and (match-all (and (not (system-flag \"deleted\")) (not (system-flag \"junk\"))))\n %s)", m->search);
- } else
- expr = "(match-all (and (not (system-flag \"deleted\")) (not (system-flag \"junk\"))))";
- } else {
- if (m->search) {
- expr = alloca(strlen(m->search) + 64);
- sprintf(expr, "(and (match-all (not (system-flag \"deleted\")))\n %s)", m->search);
- } else
- expr = "(match-all (not (system-flag \"deleted\")))";
- }
- searchuids = uids = camel_folder_search_by_expression (m->folder, expr, &mm->ex);
- } else {
- char *expr;
-
- if (m->hidejunk) {
- if (m->search) {
- expr = alloca(strlen(m->search) + 64);
- sprintf(expr, "(and (match-all (not (system-flag \"junk\")))\n %s)", m->search);
- } else
- expr = "(match-all (not (system-flag \"junk\")))";
- searchuids = uids = camel_folder_search_by_expression (m->folder, expr, &mm->ex);
- } else {
- if (m->search)
- searchuids = 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 && camel_folder_has_search_capability(m->folder)) {
- 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);
-
- if (!camel_operation_cancel_check(mm->cancel)) {
- /* update/build a new tree */
- if (m->dotree) {
- if (m->tree)
- camel_folder_thread_messages_apply (m->tree, showuids);
- else
- m->tree = camel_folder_thread_messages_new (m->folder, showuids, m->thread_subject);
- } else {
- 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)
- g_ptr_array_add(m->summary, info);
- }
- }
-
- m->complete = TRUE;
- }
-
- if (uidnew)
- g_ptr_array_free (uidnew, TRUE);
-
- if (searchuids)
- camel_folder_search_free (m->folder, searchuids);
- else
- camel_folder_free_uids (m->folder, uids);
-}
-
-static void
-regen_list_regened (struct _mail_msg *mm)
-{
- struct _regen_list_msg *m = (struct _regen_list_msg *)mm;
-
- if (m->ml->destroyed)
- return;
-
- if (!m->complete)
- return;
-
- if (camel_operation_cancel_check(mm->cancel))
- return;
-
- if (m->dotree) {
- save_tree_state (m->ml);
-
- build_tree (m->ml, m->tree, m->changes);
- if (m->ml->thread_tree)
- camel_folder_thread_messages_unref(m->ml->thread_tree);
- m->ml->thread_tree = m->tree;
- m->tree = NULL;
-
- load_tree_state (m->ml);
- } else
- build_flat (m->ml, m->summary, m->changes);
-
- g_signal_emit (m->ml, message_list_signals[MESSAGE_LIST_BUILT], 0);
-}
-
-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_unref (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 (m->folder);
-
- if (m->changes)
- camel_folder_change_info_free (m->changes);
-
- /* This should probably lock the list.
- However, since we have a received function, this will always be called in gui thread */
- m->ml->regen = g_list_remove(m->ml->regen, m);
-
- if (m->ml->regen == NULL && m->ml->pending_select_uid) {
- char *uid = m->ml->pending_select_uid;
-
- m->ml->pending_select_uid = NULL;
- message_list_select_uid(m->ml, uid);
- g_free(uid);
- }
-
- g_object_unref(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;
- GConfClient *gconf;
-
- if (ml->folder == NULL)
- return;
-
- /* cancel any outstanding regeneration requests, we rebuild from scratch anyway */
- if (ml->regen) {
- GList *l = ml->regen;
-
- while (l) {
- struct _mail_msg *mm = l->data;
-
- if (mm->cancel)
- camel_operation_cancel(mm->cancel);
- l = l->next;
- }
- }
-
- gconf = mail_config_get_gconf_client ();
-
-#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;
- m->hidejunk = ml->hidejunk;
- m->thread_subject = gconf_client_get_bool (gconf, "/apps/evolution/mail/display/thread_subject", NULL);
- g_object_ref(ml);
- m->folder = ml->folder;
- camel_object_ref(m->folder);
-
- if ((!m->hidedel || !m->dotree) && ml->thread_tree) {
- camel_folder_thread_messages_unref(ml->thread_tree);
- ml->thread_tree = NULL;
- } else if (ml->thread_tree) {
- m->tree = ml->thread_tree;
- camel_folder_thread_messages_ref(m->tree);
- }
-
- ml->regen = g_list_prepend(ml->regen, m);
-
- 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 1ba8a64187..0000000000
--- a/mail/message-list.etspec
+++ /dev/null
@@ -1,35 +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" disabled="true" 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" compare_col="14" _title="From" expansion="1.0" minimum_width="32" resizable="true" cell="render_text" compare="address_compare" search="string" priority="10"/>
-
- <ETableColumn model_col="5" compare_col="15" _title="Subject" expansion="1.6" minimum_width="32" resizable="true" cell="render_tree" compare="string" search="string"/>
-
- <ETableColumn model_col="6" _title="Date" 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" compare_col="16" _title="To" expansion="1.0" minimum_width="32" resizable="true" cell="render_text" compare="address_compare" search="string" priority="5"/>
-
- <ETableColumn model_col="9" _title="Size" expansion="0.2" minimum_width="32" resizable="true" cell="render_size" compare="integer"/>
-
- <ETableColumn model_col="10" _title="Flag Status" pixbuf="followup" expansion="0.0" minimum_width="18" resizable="false" cell="render_flag_status" compare="integer"/>
-
- <ETableColumn model_col="11" _title="Follow Up Flag" expansion="0.2" minimum_width="32" resizable="true" cell="render_text" compare="string"/>
-
- <ETableColumn model_col="12" _title="Due By" expansion="0.2" minimum_width="32" resizable="true" cell="render_date" compare="integer"/>
-
- <ETableColumn model_col="13" _title="Original Location" expansion="0.2" minimum_width="32" resizable="true" cell="render_text" compare="string"/>
-
- <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 8052ed791b..0000000000
--- a/mail/message-list.h
+++ /dev/null
@@ -1,216 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2003 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_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"
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#define MESSAGE_LIST_TYPE (message_list_get_type ())
-#define MESSAGE_LIST(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MESSAGE_LIST_TYPE, MessageList))
-#define MESSAGE_LIST_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), MESSAGE_LIST_TYPE, MessageListClass))
-#define IS_MESSAGE_LIST(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MESSAGE_LIST_TYPE))
-#define IS_MESSAGE_LIST_CLASS(k) (G_TYPE_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_FOLLOWUP_FLAG_STATUS,
- COL_FOLLOWUP_FLAG,
- COL_FOLLOWUP_DUE_BY,
- COL_LOCATION, /* vfolder location? */
-
- /* normalised strings */
- COL_FROM_NORM,
- COL_SUBJECT_NORM,
- COL_TO_NORM,
-
- 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;
-
- struct _MessageListPrivate *priv;
-
- /* The table */
- ETreeModel *model;
- ETree *tree;
- ETreePath tree_root;
- ETableExtras *extras;
-
- /* The folder & matching uri */
- CamelFolder *folder;
- char *folder_uri;
-
- GHashTable *uid_nodemap; /* uid (from info) -> tree node mapping */
-
- GHashTable *normalised_hash;
-
- /* 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 */
- int hide_before, hide_after; /* hide ranges of messages */
-
- /* Current search string, or %NULL */
- char *search;
-
- /* Are we displaying threaded view? */
- guint threaded : 1;
-
- /* do we automatically hide deleted messages? */
- guint hidedeleted : 1;
-
- /* do we automatically hide junk messages? */
- guint hidejunk : 1;
-
- /* is the message-list object in a destroyed state? */
- guint destroyed : 1;
-
- /* 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 */
-
- /* list of outstanding regeneration requests */
- GList *regen;
- char *pending_select_uid; /* set if we were busy regnerating while we had a select come in */
-
- /* the current camel folder thread tree, if any */
- struct _CamelFolderThread *thread_tree;
-
- /* for message/folder chagned event handling */
- struct _MailAsyncEvent *async_event;
-};
-
-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, const char *uri, gboolean outgoing);
-
-void message_list_foreach (MessageList *message_list,
- MessageListForeachFunc callback,
- gpointer user_data);
-
-GPtrArray *message_list_get_selected(MessageList *ml);
-void message_list_free_uids(MessageList *ml, GPtrArray *uids);
-
-/* select next/prev message helpers */
-gboolean message_list_select (MessageList *message_list,
- MessageListSelectDirection direction,
- guint32 flags,
- guint32 mask,
- gboolean wraparound);
-
-void message_list_select_uid (MessageList *message_list,
- const char *uid);
-
-void message_list_select_next_thread (MessageList *ml);
-
-/* selection manipulation */
-void message_list_select_all (MessageList *ml);
-void message_list_select_thread (MessageList *ml);
-void message_list_invert_selection (MessageList *ml);
-
-/* clipboard stuff */
-void message_list_copy(MessageList *ml, gboolean cut);
-gboolean message_list_has_primary_selection(MessageList *ml);
-void message_list_paste (MessageList *ml);
-
-/* 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);
-
-void message_list_save_state (MessageList *ml);
-
-#define MESSAGE_LIST_LOCK(m, l) g_mutex_lock(((MessageList *)m)->l)
-#define MESSAGE_LIST_UNLOCK(m, l) g_mutex_unlock(((MessageList *)m)->l)
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _MESSAGE_LIST_H_ */
diff --git a/mail/message-tag-editor.c b/mail/message-tag-editor.c
deleted file mode 100644
index bfc7c699f3..0000000000
--- a/mail/message-tag-editor.c
+++ /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 2002 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 <gtk/gtkstock.h>
-
-#include "message-tag-editor.h"
-
-static void message_tag_editor_class_init (MessageTagEditorClass *class);
-static void message_tag_editor_init (MessageTagEditor *editor);
-static void message_tag_editor_finalise (GObject *obj);
-
-static CamelTag *get_tag_list (MessageTagEditor *editor);
-static void set_tag_list (MessageTagEditor *editor, CamelTag *value);
-
-static GtkDialogClass *parent_class = NULL;
-
-GType
-message_tag_editor_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (MessageTagEditorClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) message_tag_editor_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (MessageTagEditor),
- 0,
- (GInstanceInitFunc) message_tag_editor_init,
- };
-
- type = g_type_register_static (gtk_dialog_get_type (), "MessageTagEditor", &info, 0);
- }
-
- return type;
-}
-
-static void
-message_tag_editor_class_init (MessageTagEditorClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_ref (gtk_dialog_get_type ());
-
- object_class->finalize = message_tag_editor_finalise;
-
- klass->get_tag_list = get_tag_list;
- klass->set_tag_list = set_tag_list;
-}
-
-static void
-message_tag_editor_init (MessageTagEditor *editor)
-{
- gtk_window_set_default_size((GtkWindow *)editor, 400, 500);
- gtk_dialog_add_buttons (GTK_DIALOG (editor),
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_OK, GTK_RESPONSE_OK,
- NULL);
-
- gtk_dialog_set_default_response (GTK_DIALOG (editor), GTK_RESPONSE_OK);
-}
-
-
-static void
-message_tag_editor_finalise (GObject *obj)
-{
- /*MessageTagEditor *editor = (MessageTagEditor *) obj;*/
-
- G_OBJECT_CLASS (parent_class)->finalize (obj);
-}
-
-static CamelTag *
-get_tag_list (MessageTagEditor *editor)
-{
- return NULL;
-}
-
-CamelTag *
-message_tag_editor_get_tag_list (MessageTagEditor *editor)
-{
- g_return_val_if_fail (IS_MESSAGE_TAG_EDITOR (editor), NULL);
-
- return MESSAGE_TAG_EDITOR_GET_CLASS (editor)->get_tag_list (editor);
-}
-
-
-static void
-set_tag_list (MessageTagEditor *editor, CamelTag *tags)
-{
- /* no-op */
- ;
-}
-
-void
-message_tag_editor_set_tag_list (MessageTagEditor *editor, CamelTag *tags)
-{
- g_return_if_fail (IS_MESSAGE_TAG_EDITOR (editor));
- g_return_if_fail (tags != NULL);
-
- MESSAGE_TAG_EDITOR_GET_CLASS (editor)->set_tag_list (editor, tags);
-}
diff --git a/mail/message-tag-editor.h b/mail/message-tag-editor.h
deleted file mode 100644
index 9177012f75..0000000000
--- a/mail/message-tag-editor.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 2002 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_TAG_EDITOR_H__
-#define __MESSAGE_TAG_EDITOR_H__
-
-#include <gtk/gtkwidget.h>
-#include <gtk/gtkdialog.h>
-#include <camel/camel-folder.h>
-#include <camel/camel-folder-summary.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#define MESSAGE_TAG_EDITOR_TYPE (message_tag_editor_get_type ())
-#define MESSAGE_TAG_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST (obj, MESSAGE_TAG_EDITOR_TYPE, MessageTagEditor))
-#define MESSAGE_TAG_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST (klass, MESSAGE_TAG_EDITOR_TYPE, MessageTagEditorClass))
-#define IS_MESSAGE_TAG_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE (obj, MESSAGE_TAG_EDITOR_TYPE))
-#define IS_MESSAGE_TAG_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MESSAGE_TAG_EDITOR_TYPE))
-#define MESSAGE_TAG_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MESSAGE_TAG_EDITOR_TYPE, MessageTagEditorClass))
-
-typedef struct _MessageTagEditor MessageTagEditor;
-typedef struct _MessageTagEditorClass MessageTagEditorClass;
-
-struct _MessageTagEditor {
- GtkDialog parent;
-
-};
-
-struct _MessageTagEditorClass {
- GtkDialogClass parent_class;
-
- /* virtual methods */
- CamelTag * (*get_tag_list) (MessageTagEditor *editor);
- void (*set_tag_list) (MessageTagEditor *editor, CamelTag *tags);
-
- /* signals */
-};
-
-
-GtkType message_tag_editor_get_type (void);
-
-/* methods */
-CamelTag *message_tag_editor_get_tag_list (MessageTagEditor *editor);
-void message_tag_editor_set_tag_list (MessageTagEditor *editor, CamelTag *tags);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __MESSAGE_TAG_EDITOR_H__ */
diff --git a/mail/message-tag-followup.c b/mail/message-tag-followup.c
deleted file mode 100644
index 6a2f62eaf6..0000000000
--- a/mail/message-tag-followup.c
+++ /dev/null
@@ -1,354 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2002 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>
-
-#ifdef GTK_DISABLE_DEPRECATED
-/* Gtk2's GtkCombo widget uses the deprecated GtkList widget, so
- there's no way to use GtkCombo and still build if
- GTK_DISABLE_DEPRECATED is defined. Yay Gtk! */
-#undef GTK_DISABLE_DEPRECATED
-#include <gtk/gtkcombo.h>
-#include <gtk/gtklist.h>
-#define GTK_ENABLE_DEPRECATED
-#endif /* GTK_DISABLE_DEPRECATED */
-
-#include <glade/glade.h>
-
-#include <gconf/gconf.h>
-#include <gconf/gconf-client.h>
-
-#include <libgnomeui/gnome-window-icon.h>
-#include <libgnomeui/gnome-pixmap.h>
-
-#include "message-tag-followup.h"
-#include "mail-config.h"
-
-static void message_tag_followup_class_init (MessageTagFollowUpClass *class);
-static void message_tag_followup_init (MessageTagFollowUp *followup);
-static void message_tag_followup_finalise (GObject *obj);
-
-static CamelTag *get_tag_list (MessageTagEditor *editor);
-static void set_tag_list (MessageTagEditor *editor, CamelTag *tags);
-
-
-#define DEFAULT_FLAG 2 /* Follow-Up */
-static char *available_flags[] = {
- N_("Call"),
- N_("Do Not Forward"),
- N_("Follow-Up"),
- N_("For Your Information"),
- N_("Forward"),
- N_("No Response Necessary"),
- N_("Read"),
- N_("Reply"),
- N_("Reply to All"),
- N_("Review"),
-};
-
-static int num_available_flags = sizeof (available_flags) / sizeof (available_flags[0]);
-
-
-static MessageTagEditorClass *parent_class = NULL;
-
-
-GType
-message_tag_followup_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (MessageTagFollowUpClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) message_tag_followup_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (MessageTagFollowUp),
- 0,
- (GInstanceInitFunc) message_tag_followup_init,
- };
-
- type = g_type_register_static (message_tag_editor_get_type (), "MessageTagFollowUp", &info, 0);
- }
-
- return type;
-}
-
-static void
-message_tag_followup_class_init (MessageTagFollowUpClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- MessageTagEditorClass *editor_class = (MessageTagEditorClass *) klass;
-
- parent_class = g_type_class_ref (message_tag_editor_get_type ());
-
- object_class->finalize = message_tag_followup_finalise;
-
- editor_class->get_tag_list = get_tag_list;
- editor_class->set_tag_list = set_tag_list;
-}
-
-static void
-message_tag_followup_init (MessageTagFollowUp *editor)
-{
- editor->combo = NULL;
- editor->target_date = NULL;
- editor->completed = NULL;
- editor->clear = NULL;
- editor->completed_date = 0;
-}
-
-
-static void
-message_tag_followup_finalise (GObject *obj)
-{
- MessageTagFollowUp *editor = (MessageTagFollowUp *) obj;
-
- editor->completed_date = 0;
-
- G_OBJECT_CLASS (parent_class)->finalize (obj);
-}
-
-
-static CamelTag *
-get_tag_list (MessageTagEditor *editor)
-{
- MessageTagFollowUp *followup = (MessageTagFollowUp *) editor;
- CamelTag *tags = NULL;
- time_t date;
- char *text;
-
- camel_tag_set (&tags, "follow-up", gtk_entry_get_text (GTK_ENTRY (followup->combo->entry)));
-
- date = e_date_edit_get_time (followup->target_date);
- if (date != (time_t) -1) {
- text = camel_header_format_date (date, 0);
- camel_tag_set (&tags, "due-by", text);
- g_free (text);
- } else {
- camel_tag_set (&tags, "due-by", "");
- }
-
- if (gtk_toggle_button_get_active (followup->completed)) {
- text = camel_header_format_date (followup->completed_date, 0);
- camel_tag_set (&tags, "completed-on", text);
- g_free (text);
- } else {
- camel_tag_set (&tags, "completed-on", "");
- }
-
- return tags;
-}
-
-static void
-set_tag_list (MessageTagEditor *editor, CamelTag *tags)
-{
- MessageTagFollowUp *followup = (MessageTagFollowUp *) editor;
- const char *text;
- time_t date;
-
- text = camel_tag_get (&tags, "follow-up");
- if (text)
- gtk_entry_set_text (GTK_ENTRY (followup->combo->entry), text);
-
- text = camel_tag_get (&tags, "due-by");
- if (text && *text) {
- date = camel_header_decode_date (text, NULL);
- e_date_edit_set_time (followup->target_date, date);
- } else {
- e_date_edit_set_time (followup->target_date, (time_t) -1);
- }
-
- text = camel_tag_get (&tags, "completed-on");
- if (text && *text) {
- date = camel_header_decode_date (text, NULL);
- if (date != (time_t) 0) {
- gtk_toggle_button_set_active (followup->completed, TRUE);
- followup->completed_date = date;
- }
- }
-}
-
-static void
-clear_clicked (GtkButton *button, gpointer user_data)
-{
- MessageTagFollowUp *followup = user_data;
-
- gtk_list_select_item (GTK_LIST (followup->combo->list), DEFAULT_FLAG);
-
- e_date_edit_set_time (followup->target_date, (time_t) -1);
- gtk_toggle_button_set_active (followup->completed, FALSE);
-}
-
-static void
-completed_toggled (GtkToggleButton *button, gpointer user_data)
-{
- MessageTagFollowUp *followup = user_data;
-
- if (gtk_toggle_button_get_active (followup->completed))
- followup->completed_date = time (NULL);
- else
- followup->completed_date = 0;
-}
-
-static int
-get_week_start_day (void)
-{
- GConfClient *gconf;
-
- gconf = mail_config_get_gconf_client ();
- return gconf_client_get_int (gconf, "/apps/evolution/calendar/display/week_start_day", NULL);
-}
-
-static gboolean
-locale_supports_12_hour_format (void)
-{
- char s[16];
- time_t t = 0;
-
- strftime(s, sizeof s, "%p", gmtime (&t));
- return s[0] != '\0';
-}
-
-GtkWidget *target_date_new (const char *s1, const char *s2, int i1, int i2);
-
-GtkWidget *
-target_date_new (const char *s1, const char *s2, int i1, int i2)
-{
- gboolean time_24hour = TRUE;
- GConfClient *gconf;
- GtkWidget *widget;
- int start;
-
- widget = e_date_edit_new ();
- e_date_edit_set_show_date (E_DATE_EDIT (widget), TRUE);
- e_date_edit_set_show_time (E_DATE_EDIT (widget), TRUE);
-
- /* Note that this is 0 (Sun) to 6 (Sat), conver to 0 (mon) to 6 (sun) */
- start = (get_week_start_day () + 6) % 7;
-
- if (locale_supports_12_hour_format ()) {
- gconf = mail_config_get_gconf_client ();
- time_24hour = gconf_client_get_bool (gconf, "/apps/evolution/calendar/display/use_24hour_format", NULL);
- }
-
- e_date_edit_set_week_start_day (E_DATE_EDIT (widget), start);
- e_date_edit_set_use_24_hour_format (E_DATE_EDIT (widget), time_24hour);
- e_date_edit_set_allow_no_date_set (E_DATE_EDIT (widget), TRUE);
- e_date_edit_set_time_popup_range (E_DATE_EDIT (widget), 0, 24);
-
- return widget;
-}
-
-static void
-construct (MessageTagEditor *editor)
-{
- MessageTagFollowUp *followup = (MessageTagFollowUp *) editor;
- GtkCellRenderer *renderer;
- GtkListStore *model;
- GtkWidget *widget;
- GList *strings;
- GladeXML *gui;
- int i;
-
- gtk_window_set_title (GTK_WINDOW (editor), _("Flag to Follow Up"));
- gnome_window_icon_set_from_file (GTK_WINDOW (editor), EVOLUTION_IMAGES "/flag-for-followup-16.png");
- gtk_container_set_border_width (GTK_CONTAINER (editor), 6);
-
- gui = glade_xml_new (EVOLUTION_GLADEDIR "/message-tags.glade", "followup_editor", NULL);
-
- widget = glade_xml_get_widget (gui, "toplevel");
-
- /* reparent */
- gtk_widget_reparent (widget, GTK_DIALOG (editor)->vbox);
- gtk_box_set_child_packing (GTK_BOX (GTK_DIALOG (editor)->vbox), widget, TRUE, TRUE, 6, GTK_PACK_START);
-
- widget = glade_xml_get_widget (gui, "pixmap");
- gtk_image_set_from_file ((GtkImage *)widget, EVOLUTION_GLADEDIR "/flag-for-followup-48.png");
-
- followup->message_list = GTK_TREE_VIEW (glade_xml_get_widget (gui, "message_list"));
- model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
- gtk_tree_view_set_model (followup->message_list, (GtkTreeModel *) model);
-
- renderer = gtk_cell_renderer_text_new ();
- gtk_tree_view_insert_column_with_attributes (followup->message_list, -1, _("From"),
- renderer, "text", 0, NULL);
-
- renderer = gtk_cell_renderer_text_new ();
- gtk_tree_view_insert_column_with_attributes (followup->message_list, -1, _("Subject"),
- renderer, "text", 1, NULL);
-
- followup->combo = GTK_COMBO (glade_xml_get_widget (gui, "combo"));
- gtk_combo_set_case_sensitive (followup->combo, FALSE);
- strings = NULL;
- for (i = 0; i < num_available_flags; i++)
- strings = g_list_append (strings, (char *) _(available_flags[i]));
- gtk_combo_set_popdown_strings (followup->combo, strings);
- g_list_free (strings);
- gtk_list_select_item (GTK_LIST (followup->combo->list), DEFAULT_FLAG);
-
- followup->target_date = E_DATE_EDIT (glade_xml_get_widget (gui, "target_date"));
- /* glade bug, need to show this ourselves */
- gtk_widget_show ((GtkWidget *) followup->target_date);
- e_date_edit_set_time (followup->target_date, (time_t) -1);
-
- followup->completed = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "completed"));
- g_signal_connect (followup->completed, "toggled", G_CALLBACK (completed_toggled), followup);
-
- followup->clear = GTK_BUTTON (glade_xml_get_widget (gui, "clear"));
- g_signal_connect (followup->clear, "clicked", G_CALLBACK (clear_clicked), followup);
-
- g_object_unref (gui);
-}
-
-MessageTagEditor *
-message_tag_followup_new (void)
-{
- MessageTagEditor *editor;
-
- editor = (MessageTagEditor *) g_object_new (message_tag_followup_get_type (), NULL);
- construct (editor);
-
- return editor;
-}
-
-void
-message_tag_followup_append_message (MessageTagFollowUp *editor, const char *from, const char *subject)
-{
- GtkTreeIter iter;
- GtkListStore *model;
-
- g_return_if_fail (IS_MESSAGE_TAG_FOLLOWUP (editor));
-
- model = (GtkListStore *) gtk_tree_view_get_model (editor->message_list);
-
- gtk_list_store_append (model, &iter);
- gtk_list_store_set (model, &iter, 0, from, 1, subject, -1);
-}
diff --git a/mail/message-tag-followup.h b/mail/message-tag-followup.h
deleted file mode 100644
index c6a292c19e..0000000000
--- a/mail/message-tag-followup.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2002 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_TAG_FOLLOWUP_H__
-#define __MESSAGE_TAG_FOLLOWUP_H__
-
-#include <gtk/gtk.h>
-#include <mail/message-tag-editor.h>
-#include <camel/camel-folder.h>
-#include <camel/camel-folder-summary.h>
-#include <widgets/misc/e-dateedit.h>
-#include <time.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#define MESSAGE_TAG_FOLLOWUP_TYPE (message_tag_followup_get_type ())
-#define MESSAGE_TAG_FOLLOWUP(obj) (G_TYPE_CHECK_INSTANCE_CAST (obj, MESSAGE_TAG_FOLLOWUP_TYPE, MessageTagFollowUp))
-#define MESSAGE_TAG_FOLLOWUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST (klass, MESSAGE_TAG_FOLLOWUP_TYPE, MessageTagFollowUpClass))
-#define IS_MESSAGE_TAG_FOLLOWUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE (obj, MESSAGE_TAG_FOLLOWUP_TYPE))
-#define IS_MESSAGE_TAG_FOLLOWUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MESSAGE_TAG_FOLLOWUP_TYPE))
-#define MESSAGE_TAG_FOLLOWUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MESSAGE_TAG_FOLLOWUP_TYPE, MessageTagFollowUpClass))
-
-typedef struct _MessageTagFollowUp MessageTagFollowUp;
-typedef struct _MessageTagFollowUpClass MessageTagFollowUpClass;
-
-struct _MessageTagFollowUp {
- MessageTagEditor parent;
-
- GtkTreeView *message_list;
-
- GtkCombo *combo;
-
- EDateEdit *target_date;
- GtkToggleButton *completed;
- GtkButton *clear;
-
- time_t completed_date;
-};
-
-struct _MessageTagFollowUpClass {
- MessageTagEditorClass parent_class;
-
- /* virtual methods */
- /* signals */
-};
-
-
-GtkType message_tag_followup_get_type (void);
-
-MessageTagEditor *message_tag_followup_new (void);
-
-void message_tag_followup_append_message (MessageTagFollowUp *editor,
- const char *from,
- const char *subject);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __MESSAGE_TAG_FOLLOWUP_H__ */
diff --git a/mail/message-tags.glade b/mail/message-tags.glade
deleted file mode 100644
index 1b58fe297d..0000000000
--- a/mail/message-tags.glade
+++ /dev/null
@@ -1,335 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-
-<widget class="GtkDialog" id="followup_editor">
- <property name="border_width">6</property>
- <property name="title" translatable="yes">Flag to Follow Up</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="has_separator">True</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="vbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="hbuttonbox1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="button4">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">0</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="button5">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">0</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="toplevel">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHBox" id="hbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkImage" id="pixmap">
- <property name="visible">True</property>
- <property name="pixbuf">flag-for-followup-48.png</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="lblDirections">
- <property name="visible">True</property>
- <property name="label" translatable="yes">The messages you have selected for follow up are listed below.
-Please select a follow up action from the &quot;Flag&quot; menu.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow1">
- <property name="visible">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTreeView" id="message_list">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">True</property>
- <property name="rules_hint">False</property>
- <property name="reorderable">False</property>
- <property name="enable_search">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTable" id="table2">
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">3</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Flag:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">combo-entry</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label4">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Due by:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="clear">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-clear</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="completed">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">C_ompleted</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="target_date">
- <property name="visible">True</property>
- <property name="creation_function">target_date_new</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Sat, 09 Feb 2002 00:20:24 GMT</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCombo" id="combo">
- <property name="visible">True</property>
- <property name="value_in_list">False</property>
- <property name="allow_empty">True</property>
- <property name="case_sensitive">False</property>
- <property name="enable_arrow_keys">True</property>
- <property name="enable_arrows_always">False</property>
-
- <child internal-child="entry">
- <widget class="GtkEntry" id="combo-entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- </child>
-
- <child internal-child="list">
- <widget class="GtkList" id="convertwidget3">
- <property name="visible">True</property>
- <property name="selection_mode">GTK_SELECTION_BROWSE</property>
-
- <child>
- <widget class="GtkListItem" id="convertwidget4">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget5">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/mail/subscribe-dialog.glade b/mail/subscribe-dialog.glade
deleted file mode 100644
index c38505df4d..0000000000
--- a/mail/subscribe-dialog.glade
+++ /dev/null
@@ -1,334 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-
-<widget class="GtkWindow" id="subscribe_dialog">
- <property name="width_request">500</property>
- <property name="height_request">400</property>
- <property name="visible">True</property>
- <property name="title" translatable="yes">Folder Subscriptions</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
-
- <child>
- <widget class="GtkVBox" id="vbox1">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHBox" id="hbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">S_erver:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">store_menu</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="store_menu">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child>
- <widget class="GtkMenu" id="menu1">
-
- <child>
- <widget class="GtkMenuItem" id="no_imap_server_selected1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">None Selected</property>
- <property name="use_underline">True</property>
- <signal name="activate" handler="on_no_imap_server_selected1_activate" last_modification_time="Mon, 14 Apr 2003 17:08:20 GMT"/>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkProgressBar" id="progress_bar">
- <property name="visible">True</property>
- <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
- <property name="fraction">0</property>
- <property name="pulse_step">0.1</property>
- <property name="text" translatable="yes"></property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="tree_box">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkVButtonBox" id="vbuttonbox1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_START</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkButton" id="subscribe_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox3">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child>
- <widget class="GtkImage" id="image1">
- <property name="visible">True</property>
- <property name="stock">gtk-add</property>
- <property name="icon_size">4</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Subscribe</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="unsubscribe_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment2">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox4">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child>
- <widget class="GtkImage" id="image2">
- <property name="visible">True</property>
- <property name="stock">gtk-remove</property>
- <property name="icon_size">4</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Unsubscribe</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHSeparator" id="hseparator1">
- <property name="visible">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox5">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkHButtonBox" id="hbuttonbox2">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_DEFAULT_STYLE</property>
- <property name="spacing">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHButtonBox" id="hbuttonbox1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkButton" id="refresh_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-refresh</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="close_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-close</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/marshal.mk b/marshal.mk
deleted file mode 100644
index 9d4298deae..0000000000
--- a/marshal.mk
+++ /dev/null
@@ -1,7 +0,0 @@
-%.h: %.list
- ( $(GLIB_GENMARSHAL) --prefix=$(subst -,_,$*) $< --header > $@.tmp \
- && mv $@.tmp $@ ) || ( rm -f $@.tmp && exit 1 )
-
-%.c: %.list %.h
- ( (echo "#include \"$*.h\""; $(GLIB_GENMARSHAL) --prefix=$(subst -,_,$*) $*.list --body) > $@.tmp \
- && mv $@.tmp $@ ) || ( rm -f $@.tmp && exit 1 )
diff --git a/po/.cvsignore b/po/.cvsignore
deleted file mode 100644
index 9e83e03c05..0000000000
--- a/po/.cvsignore
+++ /dev/null
@@ -1,19 +0,0 @@
-*.gmo
-*.mo
-*.pot
-Makefile
-Makefile.in
-Makefile.in.in
-Makevars.template
-POTFILES
-Rules-quot
-boldquot.sed
-cat-id-tbl.c
-en@boldquot.header
-en@quot.header
-insert-header.sin
-messages
-missing
-quot.sed
-remove-potcdate.sin
-stamp-cat-id
diff --git a/po/ChangeLog b/po/ChangeLog
deleted file mode 100644
index 2d5dc082dd..0000000000
--- a/po/ChangeLog
+++ /dev/null
@@ -1,386 +0,0 @@
-2003-12-08 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
-
-2003-12-07 Paul Duffy <dubhthach@compsoc.nuigalway.ie>
-
- * ga.po: Updated Irish Translation, submitted by David O'Callaghan <david.ocallaghan@cs.tcd.ie>
-
-2003-12-02 Rodney Dawes <dobey@ixmian.com>
-
- * POTFILES.in: Remove missing files, Add files with strings
- * POTFILES.skip: Remove missing files
-
-2003-12-01 Rodney Dawes <dobey@ximian.com>
-
- * POTFILES.in: Remove missing files
-
-2003-11-27 Metin Amiroff <metin@karegen.com>
-
- * az.po: Updated Azerbaijani translation.
-
-2003-11-26 Chris Toshok <toshok@ximian.com>
-
- * POTFILES.in: add smime/gui/certificate-viewer.c and
- smime/lib/e-pkcs12.c
-
-2003-11-24 Marco Ciampa <ciampix@libero.it>
-
- * it.po: Updated italian translation
-
-2003-11-19 Rodney Dawes <dobey@ximian.com>
-
- * it.po: Fixed msgstr missing ending \n
-
-2003-11-19 Marco Ciampa <ciampix@libero.it>
-
- * it.po: Updated italian translation
-
-2003-11-18 Hasbullah Bin Pit <sebol@ikhlas.com>
-
- * ms.po: Updated initial Malay Translation by
- MIMOS Open Source Development Group <ismas@mimos.my>
-
-2003-11-17 Arkadiusz Lipiec <arkadiusz.lipiec@gazeta.pl>
-
- * pl.po: Updated Polish translation
-
-2003-11-17 Ettore Perazzoli <ettore@ximian.com>
-
- * POTFILES.in: Update.
-
-2003-11-13 JP Rosevear <jpr@ximian.com>
-
- * POTFILES.in: remove dead file
-
-2003-11-11 Chris Toshok <toshok@ximian.com>
-
- * POTFILES.in: add smime/lib/e-cert-db.c
-
-2003-11-07 JP Rosevear <jpr@ximian.com>
-
- * POTFILES.in: update
-
-2003-10-30 JP Rosevear <jpr@ximian.com>
-
- * POTFILES.in: remove dead file
-
-2003-10-30 Åsmund Skjæveland <aasmunds@fys.uio.no>
-
- * nn.po: Updated Norwegian Nynorsk translation.
-
-2003-10-23 Rodney Dawes <dobey@ximian.com>
-
- * POTFILES.in: s/smime-gui.glade/smime-ui.glade/
-
-2003-10-23 Rodney Dawes <dobey@ximian.com>
-
- * POTFILES.in: Add some missing files, and remove files
- that have been removed from CVS
- * POTFILES.skip: Add data/evolution.desktop.in
-
-2003-10-23 Chris Toshok <toshok@ximian.com>
-
- * POTFILES.in: add smime files.
-
-2003-10-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * POTFILES.in: Removed some unused mail source files
-
-2003-10-22 Dan Winship <danw@ximian.com>
-
- * POTFILES.in, POTFILES.skip: update to match the tree.
-
-2003-10-15 Rodrigo Moya <rodrigo@ximian.com>
-
- * POTFILES.in: removed calendar-model.c.
-
-2003-10-13 Åsmund Skjæveland <aasmunds@fys.uio.no>
-
- * nn.po: Updated Norwegian Nynorsk translation.
-
-2003-10-09 Åsmund Skjæveland <aasmunds@fys.uio.no>
-
- * nn.po: Updated Norwegian (nynorsk) translation.
-
-2003-10-02 Åsmund Skjæveland <aasmunds@fys.uio.no>
-
- * nn.po: Updated Norwegian (nynorsk) translation.
-
-2003-10-01 Åsmund Skjæveland <aasmunds@fys.uio.no>
-
- * nn.po: Updated Norwegian (nynorsk) translation.
-
-2003-09-26 Åsmund Skjæveland <aasmunds@fys.uio.no>
-
- * nn.po: Updated Norwegian (nynorsk) translation.
-
-2003-09-26 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2003-09-25 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2003-09-23 Åsmund Skjæveland <aasmunds@fys.uio.no>
-
- * nn.po: Updated.
-
-2003-09-23 Åsmund Skjæveland <aasmunds@fys.uio.no>
-
- * nn.po: Minor update.
-
-2003-09-18 Åsmund Skjæveland <aasmunds@fys.uio.no>
-
- * nn.po: And now with correct charset.
-
-2003-09-16 Åsmund Skjæveland <aasmunds@fys.uio.no>
-
- * nn.po: Roughly two hundred strings translated or defuzzed. Still
- a long way to go (25% left), but every little bit helps.
-
-2003-09-15 Marco Ciampa <ciampix@libero.it>
-
- * it.po: Updated italian translation (replay date corrected...)
-
-2003-09-11 Hans Petter Jansson <hpj@ximian.com>
-
- * POTFILES.in: Add some files that were missing, remove some test
- programs that don't need i18n, sort.
-
-2003-09-10 Marco Ciampa <ciampix@libero.it>
-
- * it.po: Updated italian translation.
-
-2003-09-07 Wang Jian <lark@linux.net.cn>
-
- * zh_CN.po: Merged from evolution-1-4-branch.
-
-2003-08-20 Suresh Chandrasekharan <suresh.chandrasekharan@sun.com>
-
- * zh_CN.po: Removed illegal '-'s from strptime msgstr, this fixes
- #43558, Appointment Editor always gives time validation error for
- apptmnts in non UTF-8/non ASCII locales.
-
-2003-08-20 Hasbullah Bin Pit <sebol@ikhlas.com>
-
- * ms.po: Updated initial Malay Translation by
- MIMOS Open Source Development Group <syed@mimos.my>
-
-2003-08-07 Wang Jian <lark@linux.net.cn>
-
- * zh_CN.po: Merged from evolution-1-4-branch.
-
-2003-08-06 Dan Winship <danw@ximian.com>
-
- * it.po: Fix a bug (control characters accidentally inserted into
- the file?) and a warning (extra "\n")
-
-2003-08-05 Marco Ciampa <ciampix@libero.it>
-
- * it.po: Updated italian translation (revision completed).
-
-2003-08-04 Marco Ciampa <ciampix@libero.it>
-
- * it.po: Updated italian translation (under revision 91% completed).
-
-2003-08-03 Marco Ciampa <ciampix@libero.it>
-
- * it.po: Updated italian translation (under revision 35% completed).
-
-2003-08-02 Christophe Merlet <redfox@redfoxcenter.org>
-
- * fr.po: Updated French translation by
- Brigitte Le Grand <brigitte.le.grand@sun.com>
-
-2003-08-02 Marco Ciampa <ciampix@libero.it>
-
- * it.po: Updated italian translation (under revision 25% completed).
-
-2003-08-01 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
-
- * es.po: Updated Spanish translation by
- Francisco Javier F. Serrador <serrador@arrakis.es>.
-
-2003-07-26 Danilo Å egan <dsegan@gmx.net>
-
- * sr.po,sr@Latn.po: Updated Serbian translation by Serbian team
- (Prevod.org).
-
- * POTFILES.in: Removed "widgets/misc/e-messagebox.c" because it
- was removed from repository on July 23, by danw.
-
-2003-07-26 Marco Ciampa <ciampix@libero.it>
-
- * it.po: Updated italian translation.
-
-2003-07-22 Christian Neumair <chris@gnome-de.org>
-
- * de.po: Updated German translation.
-
-2003-07-21 Hasbullah Bin Pit <sebol@ikhlas.com>
-
- * ms.po: Added initial Malay Translation by
- MIMOS Open Source Development Group <syed@mimos.my>
-
-2003-07-19 Abel Cheung <maddog@linux.org.hk>
-
- * bg.po, ga.po, gl.po, lt.po: Convert to UTF-8 and merge with newest
- template.
-
-2003-07-10 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
-
- * es.po: Updated Spanish translation by
- Francisco Javier F. Serrador <serrador@arrakis.es>.
-
-2003-07-07 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
-
- * es.po: Updated Spanish translation by
- Francisco Javier F. Serrador <serrador@arrakis.es>.
-
-2003-06-26 Kostas Papadimas <pkst@gmx.net>
-
- * el.po: Greek translation updated by Nikos Charonitakis <charosn@her.forthnet.gr>
-
-2003-06-25 Ivan Stojmirov <stojmir@linux.net.mk>
-
- * mk.po: Updated Macedonian translation.
-
-2003-06-25 Kang Jeong-Hee <Keizi@mail.co.kr>
-
- * ko.po: Updated Korean translation.
-
-2003-06-23 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2003-06-23 Fatih Demir <kabalak@gtranslator.org>
-
- * tr.po: Committed updated Turkish translation by Gorkem Cetin.
-
-2003-06-23 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
-
- * es.po: Updated Spanish translation by
- Francisco Javier F. Serrador <serrador@arrakis.es>.
-
-2003-06-23 Marco Ciampa <ciampix@libero.it>
-
- * it.po: Updated italian translation.
-
-2003-06-22 Kostas Papadimas <pkst@gmx.net>
-
- * el.po: Greek translation updated by Nikos Charonitakis <charosn@her.forthnet.gr>
-
-2003-06-22 Danilo Å egan <dsegan@gmx.net>
-
- * sr.po, sr@Latn.po: Updated Serbian translation by Serbian team
- (Prevod.org).
-
-2003-06-21 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
-
- * nl.po: Dutch translation updated.
-
-2003-06-21 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
-
- * nl.po: Dutch translation updated.
-
-2003-06-20 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2003-06-18 Andras Timar <timar@gnome.hu>
-
- * hu.po: Proofreading: 100%
-
-2003-06-20 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2003-06-19 Danilo Å egan <dsegan@gmx.net>
-
- * sr.po, sr@Latn.po: Added Serbian translation by Serbian team
- (Prevod.org).
-
-2003-06-18 Andras Timar <timar@gnome.hu>
-
- * hu.po: Translation: 100% reached, Proofreading: 37%
-
-2003-06-19 Wang Jian <lark@linux.net.cn>
-
- * zh_CN.po: Updated Simplified Chinese translation by
- Funda Wang <fundawang@linux.net.cn>.
-
-2003-06-19 Marco Ciampa <ciampix@libero.it>
-
- * it.po: Updated Italian translation.
-
-2003-06-19 Gustavo Maciel Dias Vieira <gdvieira@zaz.com.br>
-
- * pt_BR.po: Updated Brazilian Portuguese translation done by
- Gustavo Maciel Dias Vieira <gdvieira@zaz.com.br>.
-
-2003-06-19 Marco Ciampa <ciampix@libero.it>
-
- * it.po: Updated Italian translation.
-
-2003-06-18 Fatih Demir <kabalak@gtranslator.org>
-
- * tr.po: Committed updated Turkish translation by Gorkem Cetin.
-
-2003-06-18 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
-
- * es.po: Updated Spanish translation by
- Francisco Javier F. Serrador <serrador@arrakis.es>.
-
-2003-06-18 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation.
-
-2003-06-17 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
-
- * es.po: Updated Spanish translation by
- Francisco Javier F. Serrador <serrador@arrakis.es>.
-
-2003-06-16 Fatih Demir <kabalak@gtranslator.org>
-
- * tr.po: Committed updated Turkish translation by Gorkem Cetin.
-
-2003-06-16 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation.
-
-2003-06-15 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
-
- * nl.po: Dutch translation updated.
-
-2003-06-14 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation, minor fixes.
-
-2003-06-10 Gustavo Maciel Dias Vieira <gdvieira@zaz.com.br>
-
- * pt_BR.po: Updated Brazilian Portuguese translation done by
- Gustavo Maciel Dias Vieira <gdvieira@zaz.com.br>.
-
-2003-06-09 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
-
- * es.po: Updated Spanish translation from
- Francisco Javier Fernandez <serrador@arrakis.es>.
-
-2003-06-04 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Fixed some bugs in Czech translation.
-
-2003-06-03 Ettore Perazzoli <ettore@ximian.com>
-
- * zh_CN.po: Updated (from Wang Li <charles@linux.net.cn> and Funda
- Wang <fundawang@en2china.com>).
-
-2003-06-03 Marco Ciampa <ciampix@libero.it>
-
- * it.po: Updated Italian translation.
-
-2003-06-03 Stanislav Brabec <sbrabec@suse.cz>
-
- * cs.po: Fixed quotes: \\\" -> \".
diff --git a/po/ChangeLog.pre-1-4 b/po/ChangeLog.pre-1-4
deleted file mode 100644
index 58d6330957..0000000000
--- a/po/ChangeLog.pre-1-4
+++ /dev/null
@@ -1,4726 +0,0 @@
-2003-06-02 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
-
- * nl.po: Dutch translation updated.
-
-2003-05-30 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
-
- * nl.po: Dutch translation updated.
-
-2003-05-30 Dmitry G. Mastrukov <dmitry@taurussoft.org>
-
- * ru.po: Updated Russian translation
- from Russian team <gnome-cyr@gnome.org>.
-
-2003-05-30 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
-
- * nl.po: Dutch translation updated.
-
-2003-05-28 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
-
- * nl.po: Dutch translation updated.
-
-2003-05-27 Dmitry G. Mastrukov <dmitry@taurussoft.org>
-
- * be.po: Updated Belarusian translation
- from Belarusian team <i18n@mova.org>.
-
-2003-05-26 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
-
- * es.po: Updated Spanish translation by
- Francisco Javier F. Serrador <serrador@arrakis.es>
-
-2003-05-26 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
-
- * nl.po: Dutch translation updated.
-
-2003-05-22 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Update translation.
-
-2003-05-22 Dmitry G. Mastrukov <dmitry@taurussoft.org>
-
- * be.po: Added Belarusian translation
- from Belarusian team <i18n@mova.org>.
-
-2003-05-22 Duarte Loreto <happyguy_pt@hotmail.com>
-
- * pt.po: Updated Portuguese translation.
-
-2003-05-21 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2003-05-21 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2003-05-20 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2003-05-20 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
-
- * es.po: Updated by Francisco Javier Fernandez <serrador@arrakis.es>
-
-2003-05-19 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2003-05-19 Dmitry G. Mastrukov <dmitry@taurussoft.org>
-
- * ru.po: updated Russian translation
- from Russian team <gnome-cyr@gnome.org>.
-
-2003-05-17 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2003-05-17 Gustavo Maciel Dias Vieira <gdvieira@zaz.com.br>
-
- * pt_BR.po: Updated Brazilian Portuguese translation done by
- Gustavo Maciel Dias Vieira <gdvieira@zaz.com.br>.
-
-2003-05-14 Anders Carlsson <andersca@codefactory.se>
-
- * sv.po: Fix the last part of #113003.
-
-2003-05-14 Christian Rose <menthos@menthos.com>
-
- * sv.po: Fix #113003 in bugzilla.gnome.org.
-
-2003-05-14 Kenneth Rohde Christiansen <kenneth@gnu.org>
-
- * da.po: Updated a bit.
-
-2003-05-14 Carlos Perelló Marín <carlos@gnome.org>
-
- * es.po: Updated by Francisco Javier Fernandez <serrador@arrakis.es>
-
-2003-05-12 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
-
-2003-05-11 Abel Cheung <maddog@linux.org.hk>
-
- * POTFILES.skip: Remove non-existant file(s).
- * ca.po, en_AU.po, en_GB.po, et.po, eu.po, ro.po:
- Converted to UTF-8.
-
-2003-05-08 Duarte Loreto <happyguy_pt@hotmail.com>
-
- * pt.po: Updated Portuguese translation.
-
-2003-05-07 Christophe Fergeau <teuf@users.sourceforge.net>
-
- * fr.po: Updated French translation.
-
-2003-05-06 Marco Ciampa <ciampix@libero.it>
-
- * it.po: Updated Italian translation.
-
-2003-05-05 Christian Neumair <chris@gnome-de.org>
-
- * de.po: Updated German translation.
-
-2003-04-29 Takuo KITAME <kitame@debian.org>
-
- * ja.po: Updated Japanese translation.
-
-2003-04-29 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2003-04-28 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2003-04-28 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2003-04-27 Duarte Loreto <happyguy_pt@hotmail.com>
-
- * pt.po: Updated portuguese translation.
-
-2003-04-26 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2003-04-26 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
- * POTFILES.in: Added calendar/gui/dialogs/delete-error.c
-
-2003-04-25 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
-
- * es.po: Updated Spanish translation by
- Francisco Javier Fernandez <serrador@arrakis.es>
-
-2003-04-25 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2003-04-24 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
-
- * nl.po: Dutch translation updated.
-
-2003-04-24 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2003-04-24 Marco Ciampa <ciampix@libero.it>
-
- * it.po: Updated italian translation.
-
-2003-04-23 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
-
- * es.po: Updated Spanish translation by
- Francisco Javier Fernandez <serrador@arrakis.es>
-
-2003-04-23 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
-
- * nl.po: Dutch translation updated.
-
-2003-04-23 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2003-04-23 Marco Ciampa <ciampix@libero.it>
-
- * it.po: Updated italian translation.
-
-2003-04-23 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
-
- * nl.po: Dutch translation updated.
-
-2003-04-22 Duarte Loreto <happyguy_pt@hotmail.com>
-
- * pt.po: Updated Portuguese translation.
-
-2003-04-22 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2003-04-17 Duarte Loreto <happyguy_pt@hotmail.com>
-
- * pt.po: Updated Portuguese translation.
-
-2003-04-17 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2003-04-17 Christian Neumair <chris@gnome-de.org>
-
- * POTFILES.in: Removed erroneous line.
- Thanks to Christian Rose who reported that issue.
- * POTFILES.skip: Removed obsolete line.
-
-2003-04-17 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2003-04-16 Christian Neumair <chris@gnome-de.org>
-
- * POTFILES.skip: Added missing files.
- * de.po: Updated German translation.
-
-2003-04-15 Wang Jian <lark@linux.net.cn>
-
- * zh_CN.po: Fixed an erroneous translation for "message".
-
-2003-04-14 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
-
- * es.po: Updated Spanish translation by
- Francisco Javier Fernandez <serrador@arrakis.es>
-
-2003-04-13 Duarte Loreto <happyguy_pt@hotmail.com>
-
- * pt.po: Updated Portuguese translation.
-
-2003-04-12 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2003-04-12 Christian Neumair <chris@gnome-de.org>
-
- * POTFILES.in: Added missing files.
- * POTFILES.skip: Added tools/evolution-addressbook-export*.
- * de.po: Updated German translation.
-
-2003-04-11 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2003-04-10 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2003-04-09 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2003-04-08 Ettore Perazzoli <ettore@ximian.com>
-
- * POTFILES.in: Remove tools/evolution-addressbook-export.c, which
- is gone now.
-
-2003-04-07 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2003-04-07 Dan Winship <danw@ximian.com>
-
- * POTFILES.in: add tools/killev.c
-
-2003-04-06 Sami Pesonen <sampeson@iki.fi>
-
- * fi.po: Updated Finnish translation.
-
-2003-04-06 Marco Ciampa <ciampix@libero.it>
-
- * it.po: Updated italian translation.
-
-2003-04-03 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
-
- * es.po: Updated Spanish translation by
- Francisco Javier Fernandez <serrador@arrakis.es>
-
-2003-04-01 Marco Ciampa <ciampix@libero.it>
-
- * it.po: Updated italian translation.
-
-2003-03-31 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation.
-
-2003-03-31 Yuriy Syrota <rasta renome.rovno.ua>
-
- * uk.po: Updated Ukrainian translation.
-
-2003-03-30 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2003-03-29 Gustavo Maciel Dias Vieira <gdvieira@zaz.com.br>
-
- * pt_BR.po: Updated Brazilian Portuguese translation done by
- Gustavo Maciel Dias Vieira <gdvieira@zaz.com.br>.
-
-2003-03-29 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2003-03-29 Duarte Loreto <happyguy_pt@hotmail.com>
-
- * pt.po: Finished updating Portuguese translation.
-
-2003-03-28 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
-
- * es.po: Updated Spanish translation by
- Francisco Javier Fernandez <serrador@arakis.es>
-
-2003-03-28 Christian Neumair <chris@gnome-de.org>
-
- * de.po: Updated German translation.
-
-2003-03-27 Duarte Loreto <happyguy_pt@hotmail.com>
-
- * pt.po: Non-final update to Portuguese translation.
-
-2003-03-27 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2003-03-24 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2003-03-23 Duarte Loreto <happyguy_pt@hotmail.com>
-
- * pt.po: Non-final update to Portuguese translation.
-
-2003-03-23 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2003-03-23 Abel Cheung <maddog@linux.org.hk>
-
- * POTFILES.in, POTFILES.skip: Remove vanished files.
- * zh_TW.po: Updated traditional Chinese translation from
- Chao-Hsiung Liao <pesder.liao@msa.hinet.net>
-
-2003-03-21 Christian Neumair <chris@gnome-de.org>
-
- * POTFILES.in, POTFILES.skip: Added missing files.
- * de.po: Updated German translation.
-
-2003-03-21 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2003-03-20 Rodney Dawes <dobey@ximian.com>
-
- * POTFILES.in: Remove mail-search-dialogue.c
-
-2003-03-18 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Fixed errors in Czech translation.
-
-2003-03-18 Duarte Loreto <happyguy_pt@hotmail.com>
-
- * pt.po: Initial Portuguese translation update.
-
-2003-03-17 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
-
- * es.po: Updated Spanish translation by
- Francisco Javier Fernandez <serrador@arrakis.es>
-
-2003-03-17 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
-
-2003-03-14 Marco Ciampa <ciampix@libero.it>
-
- * it.po: Updated italian translation.
-
-2003-03-14 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2003-03-14 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
-
- * es.po: Updated Spanish translation by
- Francisco Javier Fernandez <serrador@arrakis.es>.
-
-2003-03-13 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2003-03-13 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2003-03-11 Christian Neumair <chris@gnome-de.org>
-
- * de.po: Updated German translation.
-
-2003-03-11 Marco Ciampa <ciampix@libero.it>
-
- * it.po: Updated italian translation.
-
-2003-03-07 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2003-03-07 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2003-03-05 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2003-03-03 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
-
- * nl.po: Dutch translation updated by Kees van den Broek.
-
-2003-03-02 Sami Pesonen <sampeson@iki.fi>
-
- * fi.po: converted fi.po to UTF-8 encoding & updated.
-
-2003-03-02 Rodney Dawes <dobey@ximian.com>
-
- * POTFILES.in: s/server.in$/server.in.in/
-
-2003-02-26 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2003-02-25 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2003-02-25 Pablo Saratxaga <pablo@mandrakesoft.com>
-
- * vi.po: Updated Vietnamese file
-
-2003-02-21 Marco Ciampa <ciampix@libero.it>
-
- * it.po: converted it.po in UTF-8 encoding & updated.
-
-2003-02-21 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2003-02-21 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
-
- * es.po: Updated Spanish translation
- from Francisco J Fernandez <serrador@arrakis.es>.
-
-2003-02-20 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2003-02-20 Artis Trops <hornet@navigator.lv>
-
- * lv.po: Updated Latvian tanslation by Peteris Krisjanis.
-
-2003-02-18 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
-
- * nl.po: Dutch translation updated by Vincent van Adrighem.
-
-2003-02-18 Dmitry G. Mastrukov <dmitry@taurussoft.org>
-
- * ru.po: updated Russian translation
- from Russian team <gnome-cyr@gnome.org>.
-
-2003-02-13 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2003-02-11 Abel Cheung <maddog@linux.org.hk>
-
- * POTFILES.in: Add missing file(s) and remove non-existant one(s).
-
-2003-02-12 Dmitry G. Mastrukov <dmitry@taurussoft.org>
-
- * ru.po: updated Russian translation
- from Russian team <gnome-cyr@gnome.org>.
-
-2003-02-09 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation, removed some obsolete entries
-
-2003-02-08 Abel Cheung <maddog@linux.org.hk>
-
- * POTFILES.in: Add missing files and remove non-existant one.
- * el.po, en_AU.po, et.po, nn.po, sk.po: Mark incorrectly translated
- entries as fuzzy.
-
-2002-02-07 Daniel Yacob <locales@geez.org>
-
- * am.po: Updated Amharic translation.
-
-2003-02-06 Michal Bukovjan <bukm@centrum.cz>
-
- * cs.po: updated and proofread Czech translation
-
-2003-02-05 Dan Winship <danw@ximian.com>
-
- * POTFILES.in: add cal-recur.c
-
-2003-02-05 Dmitry G. Mastrukov <dmitry@taurussoft.org>
-
- * ru.po: updated Russian translation
- from Russian team <gnome-cyr@gnome.org>.
-
-2003-02-04 Marco Ciampa <ciampix@libero.it>
-
- * it.po: Updated italian translation.
-
-2003-02-03 Daniel Yacob <locales@geez.org>
-
- * am.po: Updated Amharic translation.
-
-2003-02-02 Keld Simonsen <keld@dkuug.dk>
-
- * da.po: Updated Danish translation.
-
-2003-02-02 German Poo-Caaman~o <gpoo@ubiobio.cl>
-
- * es.po: Updated Spanish translation
- from Francisco J Fernandez <serrador@arrakis.es>.
-
-2003-02-01 Keld Simonsen <keld@dkuug.dk>
-
- * da.po: Updated Danish translation.
-
-2003-02-01 Marco Ciampa <ciampix@libero.it>
-
- * it.po: Updated Italian translation.
-
-2003-01-31 Marco Ciampa <ciampix@libero.it>
-
- * it.po: Updated Italian translation.
-
-2003-01-29 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation.
-
-2003-01-28 Marco Ciampa <ciampix@libero.it>
-
- * it.po: Updated Italian translation.
-
-2003-01-28 Fatih Demir <kabalak@gtranslator.org>
-
- * tr.po: Take over for the HEAD branch in here...
-
-2003-01-28 Abel Cheung <maddog@linux.org.hk>
-
- * POTFILES.in, POTFILES.skip: Fixes file lists.
- * flu-danish: Removed. This file has been present for 2.5 years.
- * zh_TW.po: Converted to UTF-8.
-
-2003-01-27 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2003-01-26 Daniel Yacob <locales@geez.org>
-
- * am.po: Updated Amharic translation.
-
-2003-01-24 Marco Ciampa <ciampix@libero.it>
-
- * it.po: Updated Italian translation.
-
-2003-01-24 Daniel Yacob <locales@geez.org>
-
- * am.po: Updated Amharic translation.
-
-2003-01-23 Alessio Frusciante <algol@firenze.linux.it>
-
- * it.po: Fixed bug #84257.
-
-2003-01-23 Not Zed <NotZed@Ximian.com>
-
- * zh_CN.po: Update for chinese translation from Yuedong Du
- <yuedong.du@sun.com>
-
-2003-01-22 Marco Ciampa <ciampix@libero.it>
-
- * it.po: Updated Italian translation.
-
-2003-01-21 Kostas Papadimas <pkst@gmx.net>
-
- * el.po: Updated Greek translation.
-
-2003-01-20 Christian Meyer <chrisime@gnome.org>
-
- * de.po: Updated German translation.
-
-2003-01-19 Kostas Papadimas <pkst@gmx.net>
-
- * el.po: Updated Greek translation.
-
-2003-01-19 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2003-01-14 Ettore Perazzoli <ettore@ximian.com>
-
- * POTFILES.in: Update for renamed and removed files.
-
-2003-01-14 Daniel Yacob <locales@geez.org>
-
- * am.po: Updated Amharic translation.
-
-2003-01-13 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
-
- * es.po: Updated Spanish translation
- from Francisco J Fernandez <serrador@arrakis.es>.
-
-2003-01-10 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2003-01-10 Christian Rose <menthos@menthos.com>
-
- * POTFILES.in: Removed non-existing file.
- * sv.po: Updated Swedish translation.
-
-2003-01-08 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2003-01-07 Daniel Yaocb <locales@geez.org>
-
- * am.po: Added Amharic translation.
-
-2003-01-06 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
-
- * es.po: Updated Spanish translation by Fco. Javier Fernandez <serrador@arrakis.es>.
-
-2003-01-06 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation.
-
-2003-01-02 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation somewhat.
-
-2003-01-02 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
-
- * nl.po: Dutch translation updated by "Last-Translator: \n".
-
-2002-12-29 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation somewhat.
-
-2002-12-28 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation somewhat.
-
-2002-12-25 Takuo KITAME <kitame@debian.org>
-
- * ja.po: Updated Japanese translation.
-
-2002-12-25 Andrew V. Samoilov <sav@bcs.zp.ua>
-
- * ru.po: Updated Russian translation.
-
-2002-12-21 Wang Jian <lark@linux.net.cn>
-
- * zh_CN.po: Updated Simplified Chinese translation by
- Wang Li.
-
-2002-12-15 Christian Neumair <chris@gnome-de.org>
-
- * POTFILES.in: Added missing files.
- * de.po: Updated German translation.
-
-2002-12-09 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
-
- * es.po: Updated Spanish translation by Fco. Javier Fernandez
- <serrador@arrakis.es>.
-
-2002-12-03 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Spellchecking by Zdenko Podobny.
-
-2002-12-01 Gustavo Maciel Dias Vieira <gdvieira@zaz.com.br>
-
- * pt_BR.po: Updated Brazilian Portuguese translation done by
- Gustavo Maciel Dias Vieira <gdvieira@zaz.com.br>.
-
-2002-11-27 Joaquim Fellmann <joaquim@altern.org>
-
- * fr.po: Updated French translation.
- * POTFILES.in: Removed files that were messing with
- intltool-update because they doesn't exist anymore.
-
-2002-11-25 Dan Winship <danw@ximian.com>
-
- * fr.po: Remove a ":" that shouldn't have been there (and
- abbreviate the translation of "Mailer" to make the mail header
- display look nicer).
-
-2002-11-14 German Poo Caaman~o <gpoo@ubiobio.cl>
-
- * es.po: Updated spanish translation.
-
-2002-11-14 German Poo Caaman~o <gpoo@ubiobio.cl>
-
- * es.po: Updated spanish translation.
-
-2002-10-28 gettextize <bug-gnu-utils@gnu.org>
-
- * Makefile.in.in: Upgrade to gettext-0.10.40.
-
-2002-10-28 gettextize <bug-gnu-utils@gnu.org>
-
- * Makefile.in.in: Upgrade to gettext-0.10.40.
-
-2002-10-28 gettextize <bug-gnu-utils@gnu.org>
-
- * Makefile.in.in: Upgrade to gettext-0.10.40.
-
-2002-10-26 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
-
-2002-10-10 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
- * POTFILES.in: Added new etspec files.
-
-2002-10-04 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
-
-2002-09-25 Changwoo Ryu <cwryu@debian.org>
-
- * ko.po: Updated Korean translation by Young-Ho Cha
- <ganadist@mizi.com>.
-
-2002-09-25 Changwoo Ryu <cwryu@debian.org>
-
- * ko.po: Updated Korean translation.
-
-2002-09-25 Zbigniew Chyla <cyba@gnome.pl>
-
- * pl.po: Updated Polish translation by
- GNOME PL Team <translators@gnome.pl>.
-
-2002-09-22 Pablo Saratxaga <pablo@mandrakesoft.com>
-
- * vi.po: Updated Vietnamese file
-
-2002-09-22 Roy-Magne Mo <rmo@sunnmore.net>
-
- * nn.po: Updated Norwegian nynorsk translation.
-
-2002-09-21 Kjartan Maraas <kmaraas@gnome.org>
-
- * POTFILES.in: Added a couple of missing .glade files.
- * no.po: Updated Norwegian translation.
-
-2002-09-10 Fatih Demir <kabalak@gtranslator.org>
-
- * tr.po: Committed updated Turkish translation by Gorkem...
-
-2002-09-05 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokmål) translation.
-
-2002-09-01 Gustavo Maciel Dias Vieira <gdvieira@zaz.com.br>
-
- * pt_BR.po: Updated Brazilian Portuguese translation
- and converted to UTF-8.
-
-2002-08-25 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation.
-
-2002-08-25 Christophe Merlet <christophe@merlet.net>
-
- * fr.po: Updated French translation.
-
-2002-08-20 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokmål) translation.
-
-2002-08-20 Yanko Kaneti <yaneti@declera.com>
-
- * bg.po: Updated Bulgarian translation.
- Not full: +~300 location places to 4305 translated.
-
-2002-08-16 Yanko Kaneti <yaneti@declera.com>
-
- * bg.po: Updated Bulgarian translation.
- Not full: +~400 location places to 3991.
-
-2002-07-30 Hector Garcia Alvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2002-07-26 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokmål) translation.
-
-2002-07-23 Simos Xenitellis <simos@hellug.gr>
-
- * el.po: Updated Greek translation.
-
-2002-07-22 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokmål) translation.
-
-2002-07-19 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation.
-
-2002-07-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * POTFILES.in: Removed mail/mail-account-news-editor.c
-
-2002-07-04 Abel Cheung <maddog@linux.org.hk>
-
- * zh_TW.po: Convert back to native encoding.
-
-2002-07-03 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokmål) translation.
-
-2002-06-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * POTFILES.in: Removed camel/camel-pgp-context.c and added
- camel-gpg-context.c and camel-multipart-encrypted.c.
- Also removed camel/camel-spoold-store.c
-
-2002-06-23 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokmål) translation.
-
-2002-06-21 Abel Cheung <maddog@linux.org.hk>
-
- * .cvsignore: Ignore more files.
- * Makefile.i18npatch, update.sh: Removed obsolete files.
- * POTFILES.in: Add missing files, remove entries already present in
- POTFILES.skip.
- * POTFILES.skip: Remove non-existant entries.
-
-2002-06-13 Andrew V. Samoilov <kai@cmail.ru>
-
- * ru.po: Updated Russian translation.
- * uk.po: Updated Ukrainian translation. Use utf-8 instead of
- utf8 to avoid msgfmt's warning.
-
-2002-06-11 Andrew V. Samoilov <kai@cmail.ru>
-
- * uk.po: Updated Ukrainian translation.
-
-2002-06-09 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation.
-
-2002-05-24 Manuel Borchers <webmaster@matronix.de>
-
- * de.po: Updated German translation.
-
-2002-05-24 Chris Toshok <toshok@ximian.com>
-
- * POTFILES.in: added shell/e-shell-config-autocompletion.c and
- shell/e-shell-config-folder-settings.c.
-
-2002-05-23 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokmål) translation.
-
-2002-05-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * POTFILES.in: Removed references to camel-remote-store.c
-
-2002-05-21 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokmål) translation.
-
-2002-05-21 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation.
-
-2002-05-21 Kjartan Maraas <kmaraas@gnome.org>
-
- * POTFILES.in: Updated this.
- * no.po: Updated Norwegian (bokmål) translation.
-
-2002-05-14 Christophe Merlet <christophe@merlet.net>
-
- * fr.po: Updated French translation.
-
-2002-05-10 Pablo Saratxaga <pablo@mandrakesoft.com>
-
- * vi.po: Updated Vietnamese file
-
-2002-05-08 JP Rosevear <jpr@ximian.com>
-
- * Revert zh_CN and zh_TW changes because gettext sucks
-
-2002-05-08 JP Rosevear <jpr@ximian.com>
-
- * Update the po files to cut down on dist time
-
-2002-05-06 Christopher James Lahey <clahey@ximian.com>
-
- * POTFILES.in: Replaced ldap-config.c with addressbook-config.c.
-
-2002-04-30 Hector Garcia Alvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2002-04-30 Yanko Kaneti <yaneti@declera.com>
-
- * Updated Bulgarian translation by
- Borislav Aleksandrov <B.Aleksandrov@cnsys.bg>
-
-2002-04-28 Fatih Demir <kabalak@gtranslator.org>
-
- * tr.po: Conversion to UTF-8 and some small hotkey corrections.
-
-2002-04-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * POTFILES.in: Removed
- addressbook/gui/component/addressbook-config.[c,glade] and added
- in it's place ldap-config.[c,glade].
-
-2002-04-16 Christophe Merlet <christophe@merlet.net>
-
- * fr.po: Updated French translation.
-
-2002-04-13 Christophe Merlet <christophe@merlet.net>
-
- * fr.po: Updated French translation.
-
-2002-04-08 Christophe Merlet <christophe@merlet.net>
-
- * fr.po: Updated French translation from work of
- Frederic Riss <frederic.riss@laposte.net>.
-
-2002-04-06 JP Rosevear <jpr@ximian.com>
-
- * POTFILES.in: Remove notes files.
-
-2002-04-06 JP Rosevear <jpr@ximian.com>
-
- * POTFILES.in: Remove mail-summary.c
-
-2002-04-06 JP Rosevear <jpr@ximian.com>
-
- * POTFILES.in: Remove executive summary files.
-
-2002-04-05 JP Rosevear <jpr@ximian.com>
-
- * POTFILES.in: comment out more unused camel files
-
-2002-04-05 JP Rosevear <jpr@ximian.com>
-
- * POTFILES.in: remove file that is not compiled (and hence not
- disted)
-
-2002-04-04 Gustavo Maciel Dias Vieira <gdvieira@zaz.com.br>
-
- * pt_BR.po: Updated Brazilian Portuguese translation done by
- Gustavo Maciel Dias Vieira <gdvieira@zaz.com.br>.
-
-2002-04-02 Ettore Perazzoli <ettore@ximian.com>
-
- * it.po: Updated Italian translation from Clara Tattoni
- <clara.tattoni@libero.it>.
-
-2002-04-01 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokmål) translation.
-
-2002-04-01 Christian Rose <menthos@menthos.com>
-
- * POTFILES.in: Added missing file.
- * sv.po: Updated Swedish translation some.
-
-2002-03-30 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokmål) translation.
-
-2002-03-27 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokmål) translation.
- * POTFILES.in: Bring back up to speed.
-
-2002-03-15 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokmål) translation.
-
-2002-03-12 Tõivo Leedjärv <toivo@linux.ee>
-
- * et.po: Updated Estonian translation
- by the Gnome Estonian team <gnome-et@linux.ee>.
-
-2002-03-11 Christophe Merlet <christophe@merlet.net>
-
- * fr.po: Updated French translation from report of
- Stéphane Raimbault <stephane.raimbault@deesse.univ-lemans.fr>
-
-2002-02-28 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokmål) translation.
-
-2002-02-27 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2002-02-26 Pablo Saratxaga <pablo@mandrakesoft.com>
-
- * eu.po: Updated Basque file
-
-2002-02-25 Christophe Merlet <christophe@merlet.net>
-
- * fr.po: Updated French translation from work of
- Frederic Riss <frederic.riss@laposte.net>.
-
-2002-02-24 Carlos Perelló Marín <carlos@gnome-db.org>
-
- * es.po: Small fix.
-
-2002-02-23 Carlos Perelló Marín <carlos@gnome-db.org>
-
- * es.po: Sync with translation memory.
-
-2002-02-21 Fatih Demir <kabalak@gtranslator.org>
-
- * tr.po: Committed updated Turkish translation by Görkem.
-
-2002-02-19 Tõivo Leedjärv <leedjarv@interest.ee>
-
- * et.po: Updated Estonian translation by
- Ivar Smolin <okul@linux.ee>.
-
-2002-02-15 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokmål) translation.
-
-2002-02-12 Pablo Saratxaga <pablo@mandrakesoft.com>
-
- * eu.po: Updated Basque file
-
-2002-02-12 Tõivo Leedjärv <leedjarv@interest.ee>
-
- * et.po: Added Estonian translation.
-
-2002-02-12 Akira TAGOH <tagoh@gnome.gr.jp>
-
- * ja.po: fixed typo.
-
-2002-02-11 Alastair McKinstry <mckinstry@computer.org>
-
- * ga.po: Updated Irish file.
-
-2002-02-11 Pablo Saratxaga <pablo@mandrakesoft.com>
-
- * eu.po: Updated Basque file
-
-2002-02-04 Héctor García Alvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2002-02-04 Wang Jian <lark@linux.net.cn>
-
- * zh_CN.po: Updated Simplified Chinese translation by
- Wang Li.
-
-2002-02-02 Héctor García Álvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2002-02-02 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokmål) translation.
-
-2002-01-31 Christophe Merlet <christophe@merlet.net>
-
- * fr.po: Converted French translation to UTF-8.
-
-2002-01-31 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokmål) translation.
-
-2002-01-30 Christophe Merlet <christophe@merlet.net>
-
- * fr.po: Updated French translation from work of
- Frederic Riss <frederic.riss@laposte.net>.
-
-2002-01-29 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2002-01-28 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation
-
-2002-01-28 Christian Rose <menthos@menthos.com>
-
- * POTFILES.in: Added missing file.
- * sv.po: Updated and converted to UTF-8.
-
-2002-01-26 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokmål) translation.
- * POTFILES.in: Updated.
-
-2002-01-25 Roy-Magne Mo <rmo@sunnmore.net>
-
- * nn.po: Updated Norwegian (nynorsk) translation.
-
-2002-01-23 Ettore Perazzoli <ettore@ximian.com>
-
- * it.po: More updates to the Italian translation.
-
-2002-01-23 Ettore Perazzoli <ettore@ximian.com>
-
- * it.po: Updated translation by Clara Tattoni
- <clara.tattoni@libero.it>.
-
-2002-01-23 Peteris Krisjanis <peteris.krisjanis@ttc.lv>
-
- * lv.po: Updated Latvian translation.
-
-2002-01-22 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2002-01-21 Alastair McKinstry <mckinstry@computer.org>
-
- * ga.po: updated Irish translation.
-
-2002-01-21 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2002-01-18 Simos Xenitellis <simos@hellug.gr>
-
- * el.po: Updated Greek translation (by Nick Niktaris).
-
-2002-01-14 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2002-01-13 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokmål) translation.
-
-2002-01-13 Simos Xenitellis <simos@hellug.gr>
-
- * el.po: Updated Greek translation (work from Panayotis Pakos).
-
-2002-01-13 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2002-01-12 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2002-01-11 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2001-01-10 Wang Jian <lark@linux.net.cn>
-
- * zh_CN.po: Updated Simplified Chinese translation by
- Wang Jian.
-
-2002-01-09 Christian Rose <menthos@menthos.com>
-
- * POTFILES.in: Sorted and added LOTS of missing files.
- * sv.po: Updated Swedish translation.
-
-2002-01-05 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2002-01-04 Pablo Saratxaga <pablo@mandrakesoft.com>
-
- * eu.po: Added Basque file
-
-2002-01-04 Christophe Merlet <christophe@merlet.net>
-
- * fr.po: Updated French translation.
-
-2001-12-28 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-12-26 Fatih Demir <kabalak@gtranslator.org>
-
- * tr.po: Small correction in the charset field of the po file.
-
-2001-12-22 Simos Xenitellis <simos@hellug.gr>
-
- * el.po: Run xml-i18n-update on the file.
- * el.po: Updated Greek translation by Nikos Niktaris.
-
-2001-12-21 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-12-19 Christian Rose <menthos@menthos.com>
-
- * sv.po: Fixed Swedish translation. Thanks to
- Johan Dahlin <zilch.am@home.se> for his review.
-
-2001-12-19 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-12-18 Wang Jian <lark@linux.net.cn>
-
- * zh_CN.po: Updated Simplified Chinese translation by
- Wang Li <charlesw1234@163.com>.
-
-2001-12-17 Iain Holmes <iain@ximian.com>
-
- * POFILES.in: Added my-evolution/Locations.h
-
-2001-12-17 Roy-Magne Mo <rmo@sunnmore.net>
-
- * nn.po: Updated Norwegian (nynorsk) translation.
-
-2001-12-15 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-12-13 Damon Chaplin <damon@ximian.com>
-
- * POTFILES.in: added calendar/zones.h
-
-2001-12-13 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2001-12-12 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-12-11 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2001-12-09 Wang Jian <lark@linux.net.cn>
-
- * zh_CN.po: Updated Simplified translation by
- Wang Li <charlesw1234@163.com>.
-
-2001-12-07 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-12-02 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-11-30 Hector Garcia Alvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation
-
-2001-11-26 Pablo Saratxaga <pablo@mandrakesoft.com>
-
- * az.po: Updated Azeri file
-
-2001-11-24 Peteris Krisjanis <pecisk@inbox.lv>
-
- * lv.po: Added latvian translation.
-
-2001-11-23 Christophe Merlet <christophe@merlet.net>
-
- * fr.po: Updated French translation from work of
- Frederic Riss <frederic.riss@laposte.net>.
-
-2001-11-20 Wang Jian <lark@linux.net.cn>
-
- * zh_CN.po: Converted to UTF-8.
-
-2001-11-20 Hector Garcia Alvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation
-
-2001-11-20 Christian Meyer <chrisime@gnome.org>
-
- * de.po: Applied Manuel Borchers diff.
- Made the translation for consistent.
-
-2001-11-19 Wang Jian <lark@linux.net.cn>
-
- * zh_CN.po: Updated Simplified Chinese translation by
- Wang Jian.
-
-2001-11-18 Simos Xenitellis <simos@hellug.gr>
-
- * el.po: Updated Greek translation.
-
- * el.po: Updated Greek translation.
-
-2001-11-17 Wang Jian <lark@linux.net.cn>
-
- * zh_CN.po: Updated Simplified Chinese translation by
- Wang Li <charlesw1234@163.com>.
-
-2001-11-15 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2001-12-06 gettextize <bug-gnu-utils@gnu.org>
-
- * Makefile.in.in: Upgrade to gettext-0.10.39.
-
-2001-12-16 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokmål) translation.
-
-2001-12-14 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation
- and fixed Bugzilla ID 17344.
-
-2001-12-13 Damon Chaplin <damon@ximian.com>
-
- * POTFILES.in: added calendar/zones.h
-
-2001-12-12 Zbigniew Chyla <cyba@gnome.pl>
-
- * pl.po: Updated Polish translation by
- GNOME PL Team <translators@gnome.pl>.
-
-2001-12-12 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokmål) translation.
-
-2001-12-12 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-12-12 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-12-11 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2001-12-07 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation.
-
-2001-12-07 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokmål) translation.
-
-2001-12-07 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-12-06 Christian Meyer <chrisime@gnome.org>
-
- * de.po: Minor update + fixes.
-
-2001-12-04 Christian Meyer <chrisime@gnome.org>
-
- * de.po: Updated German translation.
-
-2001-12-04 Zbigniew Chyla <cyba@gnome.pl>
-
- * pl.po: Updated Polish translation by
- GNOME PL Team <translators@gnome.pl>.
-
-2001-12-03 Simos Xenitellis <simos@hellug.gr>
-
- * el.po: Updated Greek translation.
-
-2001-12-02 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokmål) translation.
-
-2001-12-01 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-11-30 Peteris Krisjanis <pecisk@inbox.lv>
-
- * lv.po: Updated Latvian translation.
-
-2001-11-28 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-11-25 Matthias Warkus <mawarkus@gnome.org>
-
- * de.po: Updated German translation for release.
-
-2001-11-25 Christophe Merlet <christophe@merlet.net>
-
- * fr.po: Updated French translation from work of
- Frederic Riss <frederic.riss@laposte.net>.
-
-2001-11-24 Zbigniew Chyla <cyba@gnome.pl>
-
- * pl.po: Updated Polish translation by
- GNOME PL Team <translators@gnome.pl>.
-
-2001-11-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * POTFILES.in: Remove camel/camel-tcp-stream-openssl.c
-
-2001-11-21 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokmål) translation.
-
-2001-11-20 Wang Jian <lark@linux.net.cn>
-
- * zh_CN.po: Minor QA by Wang Jian.
-
-2001-11-20 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokmål) translation.
-
-2001-11-20 Hector Garcia Alavrez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation, last fuzzy string fixed
-
-2001-11-20 Carlos Perelló Marín <carlos@gnome-db.org>
-
- * es.po: Some QA.
-
-2001-11-20 Hector Garcia Alavrez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation
-
-2001-11-20 Wang Jian <lark@linux.net.cn>
-
- * zh_CN.po: Converted to UTF-8.
-
-2001-11-20 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2001-10-20 Wang Jian <lark@linux.net.cn>
-
- * zh_CN.po: Updated by Wang Jian.
-
-2001-11-19 Wang Jian <lark@linux.net.cn>
-
- * zh_CN.po: Updated Simplified Chinese translation by
- Wang Jian(Merged from HEAD), and gettext-0.10.40 compatible.
-
-2001-11-19 Zbigniew Chyla <cyba@gnome.pl>
-
- * pl.po: Updated Polish translation by
- GNOME PL Team <translators@gnome.pl>.
-
-2001-11-18 Simos Xenitellis <simos@hellug.gr>
-
- * el.po: Updated + normalised Greek translation.
-
-2001-11-18 Administrator <simos@hellug.gr>
-
- * el.po: Updated Greek translation.
-
-2001-11-16 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation.
-
-2001-11-14 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-11-13 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2001-11-13 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2001-11-13 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation.
-
-2001-11-13 Zbigniew Chyla <cyba@gnome.pl>
-
- * pl.po: Updated Polish translation by
- GNOME PL Team <translators@gnome.pl>.
-
-2001-11-11 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2001-11-11 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation.
-
-2001-11-10 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokmål) translation.
-
-2001-11-10 Wang Jian <lark@linux.net.cn>
-
- * zh_CN.po: Updated Simplified Chinese translation by
- Wang Li <charlesw1234@163.com>.
-
-2001-11-10 Simos Xenitellis <simos@hellug.gr>
-
- * el.po: Updated Greek translation.
-
-2001-11-09 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2001-11-09 Abel Cheung <maddog@linux.org.hk>
-
- * zh_TW.po: Convert to UTF8.
-
-2001-11-09 Carlos Perelló Marín <carlos@gnome-db.org>
-
- * es.po: Some QA changes.
-
-2001-11-09 Frederic Crozat <fcrozat@mandrakesoft.com>
-
- * fr.po: Fix error in French translation
-
-2001-11-08 Gustavo Maciel Dias Vieira <gdvieira@zaz.com.br>
-
- * pt_BR.po: Updated Brazilian Portuguese translation.
-
-2001-11-08 Wang Jian <lark@linux.net.cn>
-
- * zh_CN.po: Updated Simplified Chinese translation by
- Wang Li <charlesw1234@163.com>.
-
-2001-11-08 Jarkko Ranta <jjranta@cc.joensuu.fi>
-
- * fi.po: Updated Finnish translation.
-
-2001-11-08 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-11-07 Hector Garcia Alvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation. Added patches from Carlos
- Perello.
-
-2001-11-07 Abel Cheung <maddog@linux.org.hk>
-
- * zh_TW.po: Merged to new pot file.
-
-2001-11-07 Roy-Magne Mo <rmo@sunnmore.net>
-
- * nn.po: Small update of Norwegian (nynorsk) translation.
-
-2001-11-05 Zbigniew Chyla <cyba@gnome.pl>
-
- * pl.po: Updated Polish translation by
- GNOME PL Team <translators@gnome.pl>.
-
-2001-11-05 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-11-01 Christophe Merlet <christophe@merlet.net>
-
- * fr.po: Updated French translation from work of
- Frederic Riss <frederic.riss@laposte.net>.
-
-2001-11-01 Zbigniew Chyla <cyba@gnome.pl>
-
- * pl.po: Updated Polish translation by
- GNOME PL Team <translators@gnome.pl>.
-
-2001-10-31 Ettore Perazzoli <ettore@ximian.com>
-
- * POTFILES.in: Add `calendar/cal-util/cal-component.c' and
- `shell/e-shell-utils.c'.
-
-2001-10-31 Gustavo Maciel Dias Vieira <gdvieira@zaz.com.br>
-
- * pt_BR.po: Updated Brazilian Portuguese translation.
-
-2001-10-31 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-10-31 Zbigniew Chyla <cyba@gnome.pl>
-
- * pl.po: Updated Polish translation by
- GNOME PL Team <translators@gnome.pl>.
-
-2001-10-30 Roy-Magne Mo <rmo@sunnmore.net>
-
- * nn.po: Small update to Norwegian (nynorsk) translation.
-
-2001-10-30 <NotZed@Ximian.com>
-
- * en_AU.po: Changed the weather to be something more appropriate
- for the other side of the world. And some updates.
-
-2001-10-29 Damon Chaplin <damon@ximian.com>
-
- * en_AU.po: new file. Copied en_GB.po since they should be pretty much
- exactly the same.
-
-2001-10-30 Wang Jian <lark@linux.net.cn>
-
- * zh_CN.po: Updated Simplified Chinese translation by
- Wang Li <charlesw1234@163.com>.
-
-2001-10-29 Abel Cheung <maddog@linux.org.hk>
-
- * zh_TW.po: Strip extra \r at end of each line, so that
- GTP status report shows it correctly. (Thanks Joe Man
- <trmetal@yahoo.com.hk>)
-
-2001-10-28 Matthias Warkus <mawarkus@gnome.org>
-
- * de.po: Updated translation for string freeze. Hopefully
- everything is in order.
-
-2001-10-28 Zbigniew Chyla <cyba@gnome.pl>
-
- * pl.po: Updated Polish translation by
- GNOME PL Team <translators@gnome.pl>.
-
-2001-10-27 Hector Garcia Alvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-10-27 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2001-10-27 Gediminas Paulauskas <menesis@delfi.lt>
-
- * lt.po: Updated Lithuanian translation.
-
-2001-10-26 Zbigniew Chyla <cyba@gnome.pl>
-
- * pl.po: Updated Polish translation by
- GNOME PL Team <translators@gnome.pl>.
-
-2001-10-26 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-10-26 Christian Rose <menthos@menthos.com>
-
- * POTFILES.in: Removed the reference to the non-existant
- "wombat/GNOME_Evolution_Wombat.oaf.in".
-
-2001-10-26 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated SLovak translation.
-
-2001-10-25 Ettore Perazzoli <ettore@ximian.com>
-
- * it.po: More updates to make it a little more usable.
-
-2001-10-26 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokmål) translation.
- * POTFILES.in: Updated with some missing files.
-
-2001-10-25 Zbigniew Chyla <cyba@gnome.pl>
-
- * pl.po: Updated Polish translation by
- GNOME PL Team <translators@gnome.pl>.
-
-2001-10-24 Simos Xenitellis <simos@hellug.gr>
-
- * el.po: Updated Greek translation.
-
-2001-10-24 Zbigniew Chyla <cyba@gnome.pl>
-
- * pl.po: Updated Polish translation by
- GNOME PL Team <translators@gnome.pl>.
-
-2001-10-24 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2001-10-24 Takuo KITAME <kitame@debian.org>
-
- * ja.po: Updated Japanese translation.
-
-2001-10-23 Hector Garcia Alvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-10-23 Christophe Merlet <christophe@merlet.net>
-
- * fr.po: Updated French translation from work of
- Frederic Riss <frederic.riss@laposte.net>.
-
-2001-10-23 Wang Jian <lark@linux.net.cn>
-
- * zh_CN.po: Updated Simplified Chinese translation by
- Wang Li <charlesw1234@163.com>.
-
-2001-10-23 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-10-22 Damon Chaplin <damon@ximian.com>
-
- * POTFILES.in: added calendar/gui/e-cell-date-edit-text.c and
- widgets/misc/e-cell-percent.c.
-
-2001-10-22 Christophe Merlet <christophe@merlet.net>
-
- * fr.po: Updated French translation from work of
- Frederic Riss <frederic.riss@laposte.net>.
-
-2001-10-22 Ettore Perazzoli <ettore@ximian.com>
-
- * it.po: More updates.
-
-2001-10-22 Ettore Perazzoli <ettore@ximian.com>
-
- * it.po: Fixed up a little bit.
-
-2001-10-22 Zbigniew Chyla <cyba@gnome.pl>
-
- * pl.po: Updated Polish translation.
-
-2001-10-22 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2001-10-22 Marius Andreiana <mandreiana@yahoo.com>
-
- * ro.po: updated
-
-2001-10-21 Christophe Merlet <christophe@merlet.net>
-
- * fr.po: Updated French translation.
-
-2001-10-21 Hector Garcia Alvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-10-21 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-10-20 Wang Jian <lark@linux.net.cn>
-
- * zh_CN.po: Updated Simplified Chinese translation from
- Wang Li <charlesw1234@163.com>.
-
-2001-10-20 Christopher R. Gabriel <cgabriel@cgabriel.org>
-
- * it.po: Updated italian translation from Clara Tattoni
- <clara.tattoni@libero.it>
-
-2001-10-20 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokmål) translation.
-
-2001-10-19 Zbigniew Chyla <cyba@gnome.pl>
-
- * pl.po: Updated Polish translation.
-
-2001-10-18 Carlos Perelló Marín <carlos@gnome-db.org>
-
- * POTFILES.in: Fixed.
-
-2001-10-18 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokmål) translation.
-
-2001-10-18 Wang Jian <lark@linux.net.cn>
-
- * zh_CN.po: Added Simplified Chinese translation by
- Wang Li <charlesw1234@163.com>.
-
-2001-10-17 Abel Cheung <maddog@linux.org.hk>
-
- * ja.po: Mark line 3436, 9375 as fuzzy, fails at "msgfmt -c" check.
-
-2001-10-17 Abel Cheung <maddog@linux.org.hk>
-
- * zh_TW.po: Updated traditional Chinese translation from Joe Man
- <trmetal@yahoo.com.hk> and Jau-Shiung Liau <pesder@seed.net.tw>.
-
-2001-10-17 Zbigniew Chyla <cyba@gnome.pl>
-
- * pl.po: Updated Polish translation.
-
-2001-10-16 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-10-15 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation
-
-2001-10-13 Hector Garcia Alvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-10-13 Dan Winship <danw@ximian.com>
-
- * POTFILES.in: Add shell/evolution-shell-component-utils.c
-
-2001-10-13 Gustavo Maciel Dias Vieira <gdvieira@zaz.com.br>
-
- * pt_BR.po: Updated Brazilian Portuguese translation.
-
-2001-10-13 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2001-10-13 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokmål) translation.
-
-2001-10-13 Hector Garcia Alvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-10-12 Ismael Olea <ismael@olea.org>
-
- * es.po: Updates Spanish trasnlation
-
-2001-10-12 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2001-10-11 Zbigniew Chyla <cyba@gnome.pl>
-
- * pl.po: Updated Polish translation.
-
-2001-10-10 Hector Garcia Alvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-10-09 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-10-07 Zbigniew Chyla <cyba@gnome.pl>
-
- * pl.po: Updated Polish translation.
-
-2001-10-07 Hector Garcia Alvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-10-06 Simos Xenitellis <simos@hellug.gr>
-
- * el.po: Updated Greek translation.
-
-2001-10-06 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokmål) translation.
-
-2001-10-05 Christophe Merlet <christophe@merlet.net>
-
- * fr.po: Updated French translation.
-
-2001-10-04 Takuo KITAME <kitame@debian.org>
-
- * ja.po: Updated Japanese translation.
-
-2001-10-03 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-10-03 Carlos Perelló Marín <carlos@gnome-db.org>
-
- * es.po: Reverted a change from Ismael and /s/fichero/archivo/
- * POTFILES.in: Fixed.
-
-2001-10-03 Zbigniew Chyla <cyba@gnome.pl>
-
- * pl.po: Updated Polish translation.
-
-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ó Marín <carlos@gnome-db.org>
-
- * es.po: Fixed. /s/Salir/Existe/.
-
-2001-09-29 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokmål) translation.
-
-2001-09-29 Carlos Perelló Marín <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 Héctor García Álvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-09-25 Héctor García Á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 <christophe@merlet.net>
-
- * fr.po: Updated French translation with contributions from
- Jean-Noël Guiheneuf <jean-noel.guiheneuf@wanadoo.fr>.
-
-2001-09-23 Carlos Perelló Marín <carlos@gnome-db.org>
-
- * es.po: /s/Algún nuve/Algunas nuves/
-
-2001-09-23 Héctor García Á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 (bokmål) 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 Héctor García Á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 Héctor García Á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 (bokmål) 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 <christophe@merlet.net>
-
- * fr.po: Updated French translation with contributions from
- Jean-Noël 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 (bokmål) 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ó Marín <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 <christophe@merlet.net>
-
- * fr.po: Updated French translation from contribution of
- Jean-Noël 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 <christophe@merlet.net>
-
- * fr.po: Updated French translation from contribution of
- Jean-Noël 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 (bokmål) translation.
-
-2001-08-28 Christophe Merlet <christophe@merlet.net>
-
- * fr.po: Updated French translation from contribution of
- Jean-Noël 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 <christophe@merlet.net>
-
- * fr.po: Updated French translation from contribution of
- Jean-Noël 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 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokmål) 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 (bokmål) 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 (bokmål) 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 Héctor García Á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 (bokmål) 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 (bokmål) 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 Héctor García Álvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-08-03 Héctor García Á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 Héctor García Á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 (bokmål) 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ó Marín <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ó Marín <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 Görkem.
-
-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 Héctor García Á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 Héctor García Álvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-06-18 Héctor García Á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. Fernández 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 HñÄtor 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 H‚Ætor 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 H‚Ætor 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 H€Ètor 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 G޶ŽÕkem 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 H€Ètor 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 H€Ètor 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 G޶ŽÕan 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 G޶ŽÕkem.
-
-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 H€Ètor 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 G޶ŽÕkem.
-
-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 H€Ètor 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 G޶ŽÕkem 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 H€Ètor 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 H€Ètor 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 G޶ŽÕkem 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 <christophe@merlet.net>
-
- * 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 <christophe@merlet.net>
-
- * fr.po: Updated French translation.
-
-2001-02-09 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2001-02-09 H€Ètor 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
- G޶ŽÕkem 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 H€Ètor 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 H€Ètor 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 H€Ètor 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 H€Ètor 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 H€Ètor 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 NorbüÈk <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 NorbüÈk <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 NorbüÈk <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 H€Ètor 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 H€Ètor 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 <christophe@merlet.net>
-
- * 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 H€Ètor 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 <christophe@merlet.net>
-
- * 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 H€Ètor 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 H€Ètor 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 H€Ètor 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 H€Ètor 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 H€Ètor 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 H€Ètor 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 H€Ètor 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 H€Ètor 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 H€Ètor 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 H€Ètor 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 H€Ètor GarcÄÆ Alvarez <hector@scouts-es.org>
-
- * es.po: updated Spanish translation.
-
-2000-10-04 H€Ètor 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 H€Ètor 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 compleaŽ¢ŽÒs!
- :)
-
-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 H€Ètor 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/POTFILES.in b/po/POTFILES.in
deleted file mode 100644
index ea8c828000..0000000000
--- a/po/POTFILES.in
+++ /dev/null
@@ -1,393 +0,0 @@
-# List of source files containing translatable strings.
-# Please keep this list in alphabetic order.
-addressbook/conduit/address-conduit.c
-addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in
-addressbook/gui/component/addressbook-component.c
-addressbook/gui/component/addressbook-config.c
-addressbook/gui/component/addressbook.c
-addressbook/gui/component/apps_evolution_addressbook.schemas.in.in
-addressbook/gui/component/ldap-config.glade
-addressbook/gui/component/select-names/GNOME_Evolution_Addressbook_SelectNames.server.in.in
-addressbook/gui/component/select-names/e-select-names-popup.c
-addressbook/gui/component/select-names/e-select-names-section.etspec
-addressbook/gui/component/select-names/e-select-names-table-model.c
-addressbook/gui/component/select-names/e-select-names-text-model.c
-addressbook/gui/component/select-names/e-select-names.c
-addressbook/gui/component/select-names/e-select-names.etspec
-addressbook/gui/component/select-names/select-names.glade
-addressbook/gui/contact-editor/contact-editor.glade
-addressbook/gui/contact-editor/e-contact-editor-address.c
-addressbook/gui/contact-editor/e-contact-editor-fullname.c
-addressbook/gui/contact-editor/e-contact-editor.c
-addressbook/gui/contact-editor/e-contact-quick-add.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/contact-list-editor/e-contact-list-editor.etspec
-addressbook/gui/merging/eab-contact-commit-duplicate-detected.glade
-addressbook/gui/merging/eab-contact-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-view.c
-addressbook/gui/widgets/e-addressbook-view.etspec
-addressbook/gui/widgets/e-minicard-label.c
-addressbook/gui/widgets/e-minicard-view-widget.c
-addressbook/gui/widgets/e-minicard-view.c
-addressbook/gui/widgets/e-minicard.c
-addressbook/gui/widgets/eab-contact-display.c
-addressbook/gui/widgets/eab-gui-util.c
-addressbook/gui/widgets/eab-popup-control.c
-addressbook/gui/widgets/eab-vcard-control.c
-addressbook/gui/widgets/gal-view-factory-minicard.c
-addressbook/gui/widgets/gal-view-factory-treeview.c
-addressbook/gui/widgets/test-reflow.c
-addressbook/printing/e-contact-print-envelope.c
-addressbook/printing/e-contact-print.c
-addressbook/printing/e-contact-print.glade
-addressbook/printing/test-contact-print-style-editor.c
-addressbook/printing/test-print.c
-addressbook/tools/evolution-addressbook-abuse.c
-addressbook/tools/evolution-addressbook-export-list-cards.c
-addressbook/tools/evolution-addressbook-export-list-folders.c
-addressbook/tools/evolution-addressbook-export.c
-addressbook/tools/evolution-addressbook-import.c
-addressbook/util/eab-destination.c
-calendar/conduits/calendar/calendar-conduit.c
-calendar/conduits/todo/todo-conduit.c
-calendar/gui/GNOME_Evolution_Calendar.server.in.in
-calendar/gui/alarm-notify/GNOME_Evolution_Calendar_AlarmNotify.server.in.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/alarm-notify/util.c
-calendar/gui/apps_evolution_calendar.schemas.in.in
-calendar/gui/cal-search-bar.c
-calendar/gui/calendar-commands.c
-calendar/gui/calendar-component.c
-calendar/gui/calendar-offline-handler.c
-calendar/gui/calendar-view-factory.c
-calendar/gui/comp-editor-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-page.c
-calendar/gui/dialogs/comp-editor-util.c
-calendar/gui/dialogs/comp-editor.c
-calendar/gui/dialogs/copy-source-dialog.c
-calendar/gui/dialogs/delete-comp.c
-calendar/gui/dialogs/delete-error.c
-calendar/gui/dialogs/e-delegate-dialog.glade
-calendar/gui/dialogs/event-editor.c
-calendar/gui/dialogs/event-page.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/new-calendar.c
-calendar/gui/dialogs/new-calendar.glade
-calendar/gui/dialogs/new-task-list.c
-calendar/gui/dialogs/new-task-list.glade
-calendar/gui/dialogs/recur-comp.c
-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.c
-calendar/gui/dialogs/task-details-page.glade
-calendar/gui/dialogs/task-editor.c
-calendar/gui/dialogs/task-page.c
-calendar/gui/dialogs/task-page.glade
-calendar/gui/e-alarm-list.c
-calendar/gui/e-cal-list-view.c
-calendar/gui/e-cal-list-view.etspec
-calendar/gui/e-cal-model-calendar.c
-calendar/gui/e-cal-model-tasks.c
-calendar/gui/e-cal-model.c
-calendar/gui/e-cal-view.c
-calendar/gui/e-calendar-table.c
-calendar/gui/e-calendar-table.etspec
-calendar/gui/e-cell-date-edit-text.c
-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-list-view.c
-calendar/gui/e-meeting-model.c
-calendar/gui/e-meeting-store.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-timezone-entry.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/migration.c
-calendar/gui/print.c
-calendar/gui/tasks-component.c
-calendar/gui/tasks-control.c
-calendar/gui/weekday-picker.c
-calendar/importers/GNOME_Evolution_Calendar_Importer.server.in.in
-calendar/importers/icalendar-importer.c
-calendar/zones.h
-camel/camel-cipher-context.c
-camel/camel-data-cache.c
-camel/camel-disco-diary.c
-camel/camel-disco-folder.c
-camel/camel-disco-store.c
-camel/camel-filter-driver.c
-camel/camel-filter-search.c
-camel/camel-folder-search.c
-camel/camel-folder.c
-camel/camel-gpg-context.c
-camel/camel-lock-client.c
-camel/camel-lock.c
-camel/camel-movemail.c
-camel/camel-multipart-encrypted.c
-camel/camel-multipart-signed.c
-camel/camel-process.c
-camel/camel-provider.c
-camel/camel-sasl-anonymous.c
-camel/camel-sasl-cram-md5.c
-camel/camel-sasl-digest-md5.c
-camel/camel-sasl-gssapi.c
-camel/camel-sasl-kerberos4.c
-camel/camel-sasl-login.c
-camel/camel-sasl-ntlm.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/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/imapp/camel-imapp-provider.c
-camel/providers/imapp/camel-imapp-store.c
-camel/providers/local/camel-local-folder.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/nntp/camel-nntp-summary.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.in
-data/evolution.keys.in
-default_user/searches.xml
-default_user/vfolders.xml
-designs/OOA/ooa.glade
-designs/read_receipts/read.glade
-e-util/e-categories-config.c
-e-util/e-component-listener.c
-e-util/e-dialog-utils.c
-e-util/e-passwords.c
-e-util/e-pilot-settings.c
-e-util/e-time-utils.c
-filter/filter-datespec.c
-filter/filter-editor.c
-filter/filter-file.c
-filter/filter-filter.c
-filter/filter-folder.c
-filter/filter-input.c
-filter/filter-label.c
-filter/filter-option.c
-filter/filter-part.c
-filter/filter-rule.c
-filter/filter.glade
-filter/libfilter-i18n.h
-filter/rule-context.c
-filter/rule-editor.c
-filter/score-editor.c
-filter/score-rule.c
-filter/vfolder-editor.c
-filter/vfolder-rule.c
-mail/GNOME_Evolution_Mail.server.in.in
-mail/em-account-prefs.c
-mail/em-composer-prefs.c
-mail/em-composer-utils.c
-mail/em-folder-browser.c
-mail/em-folder-selection-button.c
-mail/em-folder-selector.c
-mail/em-folder-tree-model.c
-mail/em-folder-tree.c
-mail/em-folder-view.c
-mail/em-format-html-display.c
-mail/em-format-html-print.c
-mail/em-format-html.c
-mail/em-format.c
-mail/em-junk-filter.c
-mail/em-mailer-prefs.c
-mail/em-migrate.c
-mail/em-popup.c
-mail/em-subscribe-editor.c
-mail/em-utils.c
-mail/evolution-mail.schemas.in.in
-mail/importers/GNOME_Evolution_Mail_Elm_Intelligent_Importer.server.in.in
-mail/importers/GNOME_Evolution_Mail_Mbox_Importer.server.in.in
-mail/importers/GNOME_Evolution_Mail_Netscape_Intelligent_Importer.server.in.in
-mail/importers/GNOME_Evolution_Mail_Outlook_Importer.server.in.in
-mail/importers/GNOME_Evolution_Mail_Pine_Intelligent_Importer.server.in.in
-mail/importers/elm-importer.c
-mail/importers/netscape-importer.c
-mail/importers/pine-importer.c
-mail/local-config.glade
-mail/mail-account-editor.c
-mail/mail-account-gui.c
-mail/mail-autofilter.c
-mail/mail-component.c
-mail/mail-config-druid.c
-mail/mail-config.c
-mail/mail-config.glade
-mail/mail-crypto.c
-mail/mail-folder-cache.c
-mail/mail-mt.c
-mail/mail-ops.c
-mail/mail-search.glade
-mail/mail-security.glade
-mail/mail-send-recv.c
-mail/mail-session.c
-mail/mail-signature-editor.c
-mail/mail-tools.c
-mail/mail-vfolder.c
-mail/message-list.c
-mail/message-list.etspec
-mail/message-tag-editor.c
-mail/message-tag-followup.c
-mail/message-tags.glade
-mail/subscribe-dialog.glade
-shell/GNOME_Evolution_Shell.server.in.in
-shell/apps_evolution_shell.schemas.in.in
-shell/e-component-registry.c
-shell/e-config-upgrade.c
-shell/e-setup.c
-shell/e-shell-about-box.c
-shell/e-shell-config-autocompletion.c
-shell/e-shell-config-default-folders.c
-shell/e-shell-config-folder-settings.c
-shell/e-shell-folder-commands.c
-shell/e-shell-folder-creation-dialog.c
-shell/e-shell-folder-title-bar.c
-shell/e-shell-importer.c
-shell/e-shell-offline-handler.c
-shell/e-shell-settings-dialog.c
-shell/e-shell-shared-folder-picker-dialog.c
-shell/e-shell-startup-wizard.c
-shell/e-shell-utils.c
-shell/e-shell-view-menu.c
-shell/e-shell-window.c
-shell/e-shell-window-commands.c
-shell/e-shell.c
-shell/e-shortcuts-view.c
-shell/e-shortcuts.c
-shell/e-task-widget.c
-shell/e-user-creatable-items-handler.c
-shell/evolution-folder-selector-button.c
-shell/evolution-shell-component-utils.c
-shell/glade/e-active-connection-dialog.glade
-shell/glade/e-folder-list.glade
-shell/glade/e-shell-config-default-folders.glade
-shell/glade/e-shell-folder-creation-dialog.glade
-shell/glade/e-shell-shared-folder-picker-dialog.glade
-shell/glade/evolution-startup-wizard.glade
-shell/importer/import.glade
-shell/importer/intelligent.c
-shell/main.c
-smime/gui/certificate-manager.c
-smime/gui/certificate-viewer.c
-smime/gui/e-cert-selector.c
-smime/gui/smime-ui.glade
-smime/lib/e-cert-db.c
-smime/lib/e-cert.c
-smime/lib/e-pkcs12.c
-tools/evolution-launch-composer.c
-tools/killev.c
-ui/evolution-addressbook.xml
-ui/evolution-calendar.xml
-ui/evolution-comp-editor.xml
-ui/evolution-composer-entries.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-cell-percent.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-search-bar.c
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
deleted file mode 100644
index 60e6113489..0000000000
--- a/po/POTFILES.skip
+++ /dev/null
@@ -1,15 +0,0 @@
-addressbook/gui/component/select-names/recipient.glade
-addressbook/gui/widgets/test-reflow.c
-addressbook/printing/test-contact-print-style-editor.c
-addressbook/printing/test-print.c
-addressbook/tools/evolution-addressbook-abuse.c
-addressbook/tools/evolution-addressbook-export-list-cards.c
-addressbook/tools/evolution-addressbook-export-list-folders.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/nntp/camel-nntp-summary.c
-designs/OOA/ooa.glade
-designs/read_receipts/read.glade
diff --git a/po/am.po b/po/am.po
deleted file mode 100644
index 0ea07139bc..0000000000
--- a/po/am.po
+++ /dev/null
@@ -1,17383 +0,0 @@
-# Translations into the Amharic Language.
-# Copyright (C) 2002 Free Software Foundation, Inc.
-# This file is distributed under the same license as the evolution package.
-# Ge'ez Frontier Foundation <locales@geez.org>, 2002.
-#
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: evolution 1.0\n"
-"POT-Creation-Date: 2003-12-07 17:06-0500\n"
-"PO-Revision-Date: 2003-02-07 17:46+EDT\n"
-"Last-Translator: Ge'ez Frontier Foundation <locales@geez.org>\n"
-"Language-Team: Amharic <locales@geez.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: addressbook/conduit/address-conduit.c:272
-msgid "Default Sync Address:"
-msgstr ""
-
-#: addressbook/conduit/address-conduit.c:1150
-#: addressbook/conduit/address-conduit.c:1151
-msgid "Could not load addressbook"
-msgstr ""
-
-#: addressbook/conduit/address-conduit.c:1214
-#: addressbook/conduit/address-conduit.c:1217
-msgid "Could not read pilot's Address application block"
-msgstr ""
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in.h:1
-#, fuzzy
-msgid "Autocompletion"
-msgstr "አውቶማቲክ"
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in.h:2
-msgid "Certificates"
-msgstr ""
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in.h:3
-msgid "Configure autocomple here"
-msgstr ""
-
-#. Fix me *
-#. can not get name, should be a bug of e-book.Anyway, should set a default name.
-#.
-#. name = e_book_get_name (book);
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in.h:4
-#: addressbook/tools/evolution-addressbook-export-list-folders.c:51
-#: mail/importers/netscape-importer.c:1844 shell/e-shortcuts.c:1088
-msgid "Contacts"
-msgstr ""
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in.h:5
-msgid "Evolution Addressbook"
-msgstr ""
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in.h:6
-msgid "Evolution Addressbook address pop-up"
-msgstr ""
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in.h:7
-msgid "Evolution Addressbook address viewer"
-msgstr ""
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in.h:8
-msgid "Evolution Addressbook card viewer"
-msgstr ""
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in.h:9
-msgid "Evolution Addressbook component"
-msgstr ""
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in.h:10
-msgid "Evolution Addressbook folder viewer"
-msgstr ""
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in.h:11
-msgid "Evolution S/Mime Certificate Management Control"
-msgstr ""
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in.h:12
-#: shell/GNOME_Evolution_Shell.server.in.in.h:3
-msgid "Evolution folder settings configuration control"
-msgstr ""
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in.h:13
-msgid "Manager your S/Mime certificates here"
-msgstr ""
-
-#: addressbook/gui/component/addressbook-component.c:145
-#: addressbook/gui/component/ldap-config.glade.h:28
-#, fuzzy
-msgid "New Addressbook"
-msgstr "አድራሻ"
-
-#: addressbook/gui/component/addressbook-component.c:146
-msgid "Properties..."
-msgstr "ምርጫዎች..."
-
-#: addressbook/gui/component/addressbook-component.c:147
-#: addressbook/gui/widgets/e-addressbook-view.c:910
-#: calendar/gui/calendar-component.c:431 calendar/gui/tasks-component.c:403
-#: filter/libfilter-i18n.h:10 mail/em-account-prefs.c:236
-#: ui/evolution-addressbook.xml.h:8 ui/evolution-comp-editor.xml.h:4
-#: ui/evolution-contact-editor.xml.h:3
-#: ui/evolution-contact-list-editor.xml.h:3 ui/evolution-mail-message.xml.h:24
-msgid "Delete"
-msgstr "አጥፉ"
-
-#: addressbook/gui/component/addressbook-component.c:148
-#: calendar/gui/calendar-component.c:430 calendar/gui/tasks-component.c:401
-#, fuzzy
-msgid "Rename"
-msgstr "እንደገና ሰይም"
-
-#: addressbook/gui/component/addressbook-component.c:217
-#, fuzzy
-msgid "New Contact"
-msgstr "ወር"
-
-#: addressbook/gui/component/addressbook-component.c:218
-#, fuzzy
-msgid "_Contact"
-msgstr "ወር"
-
-#: addressbook/gui/component/addressbook-component.c:219
-#, fuzzy
-msgid "Create a new contact"
-msgstr "አዲስ ዶሴ ፍጠር"
-
-#: addressbook/gui/component/addressbook-component.c:224
-msgid "New Contact List"
-msgstr ""
-
-#: addressbook/gui/component/addressbook-component.c:225
-#, fuzzy
-msgid "Contact _List"
-msgstr "አልተገኘም"
-
-#: addressbook/gui/component/addressbook-component.c:226
-#, fuzzy
-msgid "Create a new contact list"
-msgstr "አዲስ ዶሴ ፍጠር"
-
-#: addressbook/gui/component/addressbook-component.c:375
-#: calendar/gui/calendar-component.c:834 calendar/gui/tasks-component.c:764
-msgid "On This Computer"
-msgstr ""
-
-#. orange
-#: addressbook/gui/component/addressbook-component.c:385
-#: calendar/gui/calendar-component.c:842 calendar/gui/migration.c:123
-#: calendar/gui/migration.c:146 calendar/gui/tasks-component.c:772
-#: filter/filter-label.c:123 mail/mail-config.c:65 mail/mail-config.glade.h:86
-#: shell/e-config-upgrade.c:1456
-msgid "Personal"
-msgstr "የግል"
-
-#. red
-#: addressbook/gui/component/addressbook-component.c:392
-#: calendar/gui/calendar-component.c:849 filter/filter-label.c:122
-#: mail/mail-config.c:64 mail/mail-config.glade.h:133
-#: shell/e-config-upgrade.c:1455
-msgid "Work"
-msgstr "መሥራት"
-
-#. Create the LDAP source group
-#: addressbook/gui/component/addressbook-component.c:400
-msgid "On LDAP Servers"
-msgstr ""
-
-#. FIXME: parent
-#: addressbook/gui/component/addressbook-config.c:244
-#, fuzzy
-msgid "Could not create a directory for the new addressbook."
-msgstr "አዲስ ዶሴ ፍጠር"
-
-#: addressbook/gui/component/addressbook-config.c:416
-msgid "Failed to connect to LDAP server"
-msgstr ""
-
-#: addressbook/gui/component/addressbook-config.c:440
-msgid "Failed to authenticate with LDAP server"
-msgstr ""
-
-#: addressbook/gui/component/addressbook-config.c:468
-msgid "Could not perform query on Root DSE"
-msgstr ""
-
-#: addressbook/gui/component/addressbook-config.c:792
-msgid "The server responded with no supported search bases"
-msgstr ""
-
-#: addressbook/gui/component/addressbook-config.c:1203
-msgid "This server does not support LDAPv3 schema information"
-msgstr ""
-
-#: addressbook/gui/component/addressbook-config.c:1225
-msgid "Error retrieving schema information"
-msgstr ""
-
-#: addressbook/gui/component/addressbook-config.c:1233
-msgid "Server did not respond with valid schema information"
-msgstr ""
-
-#: addressbook/gui/component/addressbook.c:500
-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:507
-msgid ""
-"We were unable to open this addressbook. This either\n"
-"means you have entered an incorrect URI, or the LDAP server\n"
-"is unreachable."
-msgstr ""
-
-#: addressbook/gui/component/addressbook.c:512
-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:521
-msgid ""
-"We were unable to open this addressbook. This either\n"
-"means you have entered an incorrect URI, or the server\n"
-"is unreachable."
-msgstr ""
-
-#: addressbook/gui/component/addressbook.c:539
-msgid "Unable to open addressbook"
-msgstr ""
-
-#: addressbook/gui/component/addressbook.c:600
-msgid "Accessing LDAP Server anonymously"
-msgstr ""
-
-#: addressbook/gui/component/addressbook.c:670
-msgid "Failed to authenticate.\n"
-msgstr ""
-
-#: addressbook/gui/component/addressbook.c:676
-#, c-format
-msgid "%sEnter password for %s (user %s)"
-msgstr ""
-
-#: addressbook/gui/component/addressbook.c:802
-msgid "Name begins with"
-msgstr ""
-
-#: addressbook/gui/component/addressbook.c:803
-msgid "Email begins with"
-msgstr ""
-
-#: addressbook/gui/component/addressbook.c:804
-#: calendar/gui/cal-search-bar.c:52
-msgid "Category is"
-msgstr ""
-
-#. We attach subitems below
-#: addressbook/gui/component/addressbook.c:805
-#: calendar/gui/cal-search-bar.c:48
-msgid "Any field contains"
-msgstr ""
-
-#: addressbook/gui/component/addressbook.c:806
-msgid "Advanced..."
-msgstr "ጠለቅ"
-
-#: addressbook/gui/component/addressbook.c:927
-msgid ""
-"More cards matched this query than either the server is \n"
-"configured to return or Evolution is configured to display.\n"
-"Please make your search more specific or raise the result limit in\n"
-"the directory server preferences for this addressbook."
-msgstr ""
-
-#: addressbook/gui/component/addressbook.c:933
-msgid ""
-"The time to execute this query exceeded the server limit or the limit\n"
-"you have configured for this addressbook. Please make your search\n"
-"more specific or raise the time limit in the directory server\n"
-"preferences for this addressbook."
-msgstr ""
-
-#: addressbook/gui/component/addressbook.c:939
-msgid "The backend for this addressbook was unable to parse this query."
-msgstr ""
-
-#: addressbook/gui/component/addressbook.c:942
-msgid "The backend for this addressbook refused to perform this query."
-msgstr ""
-
-#: addressbook/gui/component/addressbook.c:945
-msgid "This query did not complete successfully."
-msgstr ""
-
-#. All, unmatched, separator
-#: addressbook/gui/component/addressbook.c:982
-#: calendar/gui/cal-search-bar.c:353
-msgid "Any Category"
-msgstr ""
-
-#: addressbook/gui/component/addressbook.c:1063
-msgid "UID of the contacts source that the view will display"
-msgstr ""
-
-#: addressbook/gui/component/apps_evolution_addressbook.schemas.in.in.h:1
-msgid "EFolderList xml for the list of completion uris"
-msgstr ""
-
-#: addressbook/gui/component/apps_evolution_addressbook.schemas.in.in.h:2
-msgid ""
-"The number of characters that must be typed before evolution will attempt to "
-"autocomplete"
-msgstr ""
-
-#: addressbook/gui/component/apps_evolution_addressbook.schemas.in.in.h:3
-msgid "URI for the folder last used in the select names dialog"
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:1
-#: addressbook/gui/contact-list-editor/contact-list-editor.glade.h:1
-#: mail/mail-config.glade.h:1
-msgid "\n"
-msgstr "\n"
-
-#: addressbook/gui/component/ldap-config.glade.h:3
-msgid " S_how Supported Bases "
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:4
-#: addressbook/gui/component/select-names/select-names.glade.h:1
-#: addressbook/gui/contact-editor/contact-editor.glade.h:2
-#: addressbook/gui/contact-editor/fulladdr.glade.h:1
-#: addressbook/gui/contact-editor/fullname.glade.h:1
-#: addressbook/gui/contact-list-editor/contact-list-editor.glade.h:3
-#: calendar/gui/dialogs/alarm-options.glade.h:1
-#: calendar/gui/dialogs/event-page.glade.h:1
-#: calendar/gui/dialogs/meeting-page.glade.h:1
-#: calendar/gui/dialogs/new-calendar.glade.h:1
-#: calendar/gui/dialogs/new-task-list.glade.h:1
-#: calendar/gui/dialogs/task-page.glade.h:1
-#: composer/e-msg-composer-attachment.glade.h:1 mail/mail-config.glade.h:6
-#: mail/mail-search.glade.h:1 mail/message-tags.glade.h:1
-#: shell/glade/e-shell-folder-creation-dialog.glade.h:1
-#: widgets/e-timezone-dialog/e-timezone-dialog.glade.h:1
-msgid "*"
-msgstr "*"
-
-#: addressbook/gui/component/ldap-config.glade.h:5
-msgid "1:00"
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:6
-msgid "2:30"
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:7
-msgid "3268"
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:8
-msgid "389"
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:9
-msgid "5:00"
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:10
-msgid "636"
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:11
-msgid "Addressbook Creation Assistant"
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:12
-msgid "Addressbook Sources"
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:13 mail/mail-account-gui.c:66
-#: mail/mail-config.glade.h:15
-msgid "Always"
-msgstr "ሁል ጊዜ"
-
-#: addressbook/gui/component/ldap-config.glade.h:14
-msgid "Anonymously"
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:15
-msgid ""
-"Congratulations, you are finished setting up this addressbook.\n"
-"\n"
-"Please click the \"Finish\" button to save the settings you have entered "
-"here."
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:18
-msgid "Connecting"
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:19
-msgid "Distinguished _name:"
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:20
-msgid "Edit LDAP Server"
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:21
-#, fuzzy
-msgid "Email address:"
-msgstr "ኢሜያል አድራሻ"
-
-#: addressbook/gui/component/ldap-config.glade.h:22
-msgid "Evolution will use this DN to authenticate you with the server"
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:23
-msgid ""
-"Evolution will use this email address to authenticate you with the server"
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:24
-msgid "Finished"
-msgstr "ጨርሷል"
-
-#: addressbook/gui/component/ldap-config.glade.h:25
-#: addressbook/gui/contact-editor/contact-editor.glade.h:16
-#: smime/gui/smime-ui.glade.h:27
-msgid "General"
-msgstr "አጠቃላይ"
-
-#: addressbook/gui/component/ldap-config.glade.h:26
-#, fuzzy
-msgid "Group:"
-msgstr "የውይይት መድረክ"
-
-#: addressbook/gui/component/ldap-config.glade.h:27 mail/mail-account-gui.c:68
-#: mail/mail-config.glade.h:76
-msgid "Never"
-msgstr "በፍጹም"
-
-#: addressbook/gui/component/ldap-config.glade.h:29
-msgid ""
-"Now, you must specify how you want to connect to the LDAP server. The SSL "
-"(Secure Sockets Layer)\n"
-"and TLS (Transport Layer Security) protocols are used by some servers to "
-"cryptographically protect\n"
-"your connection. Ask your system administrator if your LDAP server uses "
-"these protocols."
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:32
-msgid "One"
-msgstr "አንድ"
-
-#: addressbook/gui/component/ldap-config.glade.h:33
-msgid "S_earch scope: "
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:34
-#: calendar/gui/e-cal-list-view.c:396 calendar/gui/e-cal-view.c:589
-#: calendar/gui/gnome-cal.c:585
-msgid "Searching"
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:35
-msgid "Selected:"
-msgstr "ተመርጠዋል፦"
-
-#: addressbook/gui/component/ldap-config.glade.h:36
-msgid ""
-"Selecting this option means that Evolution will only connect to your LDAP "
-"server if\n"
-"your LDAP server supports SSL or TLS."
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:38
-msgid ""
-"Selecting this option means that Evolution will only try to use SSL/TLS if "
-"you are in a \n"
-"insecure environment. For example, if you and your LDAP server are behind a "
-"firewall\n"
-"at work, then Evolution doesn't need to use SSL/TLS because your connection "
-"is already\n"
-"secure."
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:42
-msgid ""
-"Selecting this option means that your server does not support either SSL or "
-"TLS. This \n"
-"means that your connection will be insecure, and that you will be vulnerable "
-"to security\n"
-"exploits. "
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:45
-msgid ""
-"Selecting this option will let you change Evolution's default settings for "
-"LDAP\n"
-"searches, and for creating and editing contacts. "
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:47
-msgid ""
-"Specifying a display name and group is the first step in setting up an "
-"addressbook."
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:48
-msgid "Step 1: Folder Characteristics"
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:49
-#, fuzzy
-msgid "Step 2: Server Information"
-msgstr "የኩነቶች መረጃ"
-
-#: addressbook/gui/component/ldap-config.glade.h:50
-msgid "Step 3: Connecting to Server"
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:51
-msgid "Step 4: Searching the Directory"
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:52
-msgid "Sub"
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:53
-msgid "Supported Search Bases"
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:54
-msgid ""
-"The options on this page control how many entries should be included in "
-"your\n"
-"searches, and how long a search should take. Ask your system administrator "
-"if you\n"
-"need to change these options."
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:57
-msgid ""
-"The search base is the distinguished name (DN) of the entry where your "
-"searches will \n"
-"begin. If you leave this blank, the search will begin at the root of the "
-"directory tree."
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:59
-msgid ""
-"The search scope defines how deep you would like the search to extend down "
-"the \n"
-"directory tree. A search scope of \"sub\" will include all entries below "
-"your search base.\n"
-"A search scope of \"one\" will only include the entries one level beneath "
-"your base.\n"
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:63
-msgid ""
-"This assistant will help you create a new addressbook. \n"
-"\n"
-"Depending on the type of addressbook you create, additional\n"
-"parameters may be required. Please contact your system\n"
-"administrator if you need help finding this information."
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:68
-msgid ""
-"This is the full name of your ldap server. For example, \"ldap.mycompany.com"
-"\"."
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:69
-msgid ""
-"This is the maximum number of entries to download. Setting this number to "
-"be \n"
-"too large will slow down your addressbook."
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:71
-msgid ""
-"This is the method evolution will use to authenticate you. Note that "
-"setting this to \"Email Address\" requires anonymous access to your ldap "
-"server."
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:72
-msgid ""
-"This is the name for this server that will appear in your Evolution folder "
-"list.\n"
-"It is for display purposes only. "
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:74
-msgid ""
-"This is the name that will appear in your Evolution folder list. It is for "
-"display purposes only. "
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:75
-msgid ""
-"This is the port on the LDAP server that Evolution will try to connect to. "
-"A \n"
-"list of standard ports has been provided. Ask your system administrator\n"
-"what port you should specify."
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:78
-msgid "This option controls how long a search will be run."
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:79
-msgid "U_se SSL/TLS:"
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:80
-msgid "Using distinguished name (DN)"
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:81
-msgid "Using email address"
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:82 mail/mail-account-gui.c:67
-#: mail/mail-config.glade.h:132
-msgid "Whenever Possible"
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:83
-msgid ""
-"You have decided to configure an LDAP server. The first step in doing this "
-"is to provide its name and your\n"
-"log in information. Please ask your system administrator if you are unsure "
-"of this information."
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:85
-msgid "_Display name:"
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:86
-msgid "_Download limit:"
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:87 filter/filter.glade.h:14
-#: mail/mail-config.glade.h:146 ui/evolution-addressbook.xml.h:33
-#: ui/evolution-calendar.xml.h:37 ui/evolution-composer-entries.xml.h:8
-#: ui/evolution-mail-list.xml.h:24 ui/evolution-mail-messagedisplay.xml.h:6
-#: ui/evolution-message-composer.xml.h:41
-#: ui/evolution-signature-editor.xml.h:12 ui/evolution-subscribe.xml.h:10
-#: ui/evolution-tasks.xml.h:19
-msgid "_Edit"
-msgstr "አስተካክል"
-
-#: addressbook/gui/component/ldap-config.glade.h:88
-msgid "_Log in method:"
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:89
-msgid "_Port number:"
-msgstr "የ_ፖርት ቍጥር፦"
-
-#: addressbook/gui/component/ldap-config.glade.h:90
-msgid "_Search base:"
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:91
-msgid "_Server name:"
-msgstr "_የሰርቨር ስም፦"
-
-#: addressbook/gui/component/ldap-config.glade.h:92
-msgid "_Timeout (minutes):"
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:93
-msgid "cards"
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:94
-msgid "connecting-tab"
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:95
-msgid "general-tab"
-msgstr ""
-
-#: addressbook/gui/component/ldap-config.glade.h:96
-msgid "searching-tab"
-msgstr ""
-
-#: addressbook/gui/component/select-names/GNOME_Evolution_Addressbook_SelectNames.server.in.in.h:1
-msgid "Evolution Addressbook name selection interface"
-msgstr ""
-
-#: addressbook/gui/component/select-names/e-select-names-popup.c:205
-msgid "Remove All"
-msgstr "ሁሉንም አስወግድ"
-
-#: addressbook/gui/component/select-names/e-select-names-popup.c:212
-#: addressbook/gui/component/select-names/e-select-names.c:694
-#: composer/e-msg-composer-attachment-bar.c:444
-msgid "Remove"
-msgstr "አስወግድ"
-
-#: addressbook/gui/component/select-names/e-select-names-popup.c:219
-msgid "View Contact List"
-msgstr ""
-
-#: addressbook/gui/component/select-names/e-select-names-popup.c:219
-msgid "View Contact Info"
-msgstr ""
-
-#: addressbook/gui/component/select-names/e-select-names-popup.c:226
-#: addressbook/gui/component/select-names/e-select-names-popup.c:336
-msgid "Send HTML Mail?"
-msgstr ""
-
-#: addressbook/gui/component/select-names/e-select-names-popup.c:328
-#: addressbook/gui/widgets/eab-popup-control.c:1002
-msgid "Add to Contacts"
-msgstr ""
-
-#: addressbook/gui/component/select-names/e-select-names-popup.c:354
-msgid "Unnamed Contact"
-msgstr ""
-
-#: addressbook/gui/component/select-names/e-select-names-section.etspec.h:1
-#: addressbook/gui/component/select-names/e-select-names.etspec.h:1
-#: addressbook/gui/contact-editor/e-contact-editor-fullname.c:89
-msgid "Name"
-msgstr "ስም"
-
-#: addressbook/gui/component/select-names/e-select-names-table-model.c:351
-#: addressbook/gui/component/select-names/e-select-names-text-model.c:104
-msgid "Source"
-msgstr "ምንጭ"
-
-#: addressbook/gui/component/select-names/e-select-names.c:518
-msgid "Select Contacts from Addressbook"
-msgstr ""
-
-#: addressbook/gui/component/select-names/select-names.glade.h:2
-msgid "Find"
-msgstr "ፈልግ"
-
-#: addressbook/gui/component/select-names/select-names.glade.h:3
-msgid "Select Names"
-msgstr ""
-
-#: addressbook/gui/component/select-names/select-names.glade.h:4
-msgid "Selected Contacts:"
-msgstr ""
-
-#: addressbook/gui/component/select-names/select-names.glade.h:5
-msgid "Show Contacts"
-msgstr ""
-
-#: addressbook/gui/component/select-names/select-names.glade.h:6
-msgid ""
-"Type a name into the entry, or\n"
-"select one from the list below:"
-msgstr ""
-
-#: addressbook/gui/component/select-names/select-names.glade.h:8
-msgid "_Category:"
-msgstr "ምድብ፦ (_C)"
-
-#: addressbook/gui/component/select-names/select-names.glade.h:9
-msgid "_Folder:"
-msgstr "_ዶሴ፦"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:1
-msgid " B_usiness:"
-msgstr ""
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:3
-#, fuzzy
-msgid "A_ddress..."
-msgstr "አድራሻ..."
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:4
-msgid "A_ssistant's name:"
-msgstr ""
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:5
-msgid "Anni_versary:"
-msgstr ""
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:6
-msgid "Birthda_y:"
-msgstr "የልደት በዓል፦"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:7
-#, fuzzy
-msgid "Blog address:"
-msgstr "ኢሜያል አድራሻ"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:8
-msgid "Business fa_x:"
-msgstr ""
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:9
-msgid "Collaboration"
-msgstr ""
-
-#. Construct the app
-#: addressbook/gui/contact-editor/contact-editor.glade.h:10
-#: addressbook/gui/contact-editor/e-contact-editor.c:1343
-msgid "Contact Editor"
-msgstr ""
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:11
-msgid "D_epartment:"
-msgstr ""
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:12
-#: calendar/gui/dialogs/task-editor.c:200 mail/mail-security.glade.h:1
-#: smime/gui/smime-ui.glade.h:19
-msgid "Details"
-msgstr "ዝርዝሮች"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:13
-msgid "F_ree/Busy URL:"
-msgstr ""
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:14
-#, fuzzy
-msgid "File a_s:"
-msgstr "የፋይል ስም"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:15
-msgid "Full _Name..."
-msgstr "ሙሉ ስም... (_N)"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:17
-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:19
-msgid "New phone type"
-msgstr ""
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:20
-msgid "No_tes:"
-msgstr "_ማስታወሻዎች፦"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:21
-msgid "Organi_zation:"
-msgstr ""
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:22
-msgid "P_rofession:"
-msgstr ""
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:23
-msgid "Primary _email:"
-msgstr ""
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:24
-msgid "S_pouse:"
-msgstr ""
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:25
-msgid "Wants to receive _HTML mail"
-msgstr ""
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:26
-msgid "_Add"
-msgstr "ጨምር"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:27
-msgid "_Business:"
-msgstr ""
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:28
-#, fuzzy
-msgid "_Categories..."
-msgstr "ምድብ... (_T)"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:29
-#: calendar/gui/dialogs/meeting-page.c:633 calendar/gui/e-cal-view.c:1223
-#: calendar/gui/e-cal-view.c:1254 calendar/gui/e-calendar-table.c:1009
-#: calendar/gui/e-calendar-table.c:1027 mail/em-folder-tree.c:1501
-#: mail/em-folder-view.c:705 ui/evolution-addressbook.xml.h:32
-#: ui/evolution-calendar.xml.h:36 ui/evolution-comp-editor.xml.h:17
-#: ui/evolution-contact-editor.xml.h:14 ui/evolution-mail-message.xml.h:110
-#: ui/evolution-tasks.xml.h:18
-msgid "_Delete"
-msgstr "አጥፉ"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:30
-#, fuzzy
-msgid "_Home:"
-msgstr "መጀመሪያ"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:31
-msgid "_Job title:"
-msgstr ""
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:32
-#, fuzzy
-msgid "_Manager's name:"
-msgstr "_የሰርቨር ስም፦"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:33
-#, fuzzy
-msgid "_Mobile:"
-msgstr "ሞቢል"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:34
-msgid "_Nickname:"
-msgstr "ቅጽል ስም"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:35
-msgid "_Office:"
-msgstr "ቢሮ"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:36
-msgid "_Public Calendar URL:"
-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
-msgid "_Web page address:"
-msgstr ""
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:96
-msgid "Address"
-msgstr "አድራሻ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:102
-#: addressbook/gui/contact-editor/e-contact-editor-fullname.c:95
-#: addressbook/gui/contact-editor/e-contact-editor.c:212
-#: addressbook/gui/contact-list-editor/e-contact-list-editor.c:183
-#: addressbook/gui/widgets/e-addressbook-model.c:312
-#: addressbook/gui/widgets/e-addressbook-reflow-adapter.c:392
-#: addressbook/gui/widgets/e-minicard-label.c:164
-#: addressbook/gui/widgets/e-minicard-view-widget.c:119
-#: addressbook/gui/widgets/e-minicard-view.c:474
-#: addressbook/gui/widgets/e-minicard.c:182
-msgid "Editable"
-msgstr ""
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:135
-msgid "United States"
-msgstr "አሜሪካ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:136
-msgid "Afghanistan"
-msgstr "አፍጋኒስታን"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:137
-msgid "Albania"
-msgstr "አልባኒያ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:138
-msgid "Algeria"
-msgstr "አልጄሪያ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:139
-msgid "American Samoa"
-msgstr "የአሜሪካ ሳሞአ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:140
-msgid "Andorra"
-msgstr "አንዶራ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:141
-msgid "Angola"
-msgstr "አንጐላ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:142
-msgid "Anguilla"
-msgstr "አንጉኢላ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:143
-msgid "Antarctica"
-msgstr "አንታርክቲካ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:144
-msgid "Antigua And Barbuda"
-msgstr "አንቲጓ እና ባሩዳ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:145
-msgid "Argentina"
-msgstr "አርጀንቲና"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:146
-msgid "Armenia"
-msgstr "አርሜኒያ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:147
-msgid "Aruba"
-msgstr "አሩባ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:148
-msgid "Australia"
-msgstr "አውስትሬሊያ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:149
-msgid "Austria"
-msgstr "ኦስትሪያ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:150
-msgid "Azerbaijan"
-msgstr "አዘርባጃን"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:151
-msgid "Bahamas"
-msgstr "ባሃማስ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:152
-msgid "Bahrain"
-msgstr "ባህሬን"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:153
-msgid "Bangladesh"
-msgstr "ባንግላዲሽ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:154
-msgid "Barbados"
-msgstr "ባርቤዶስ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:155
-msgid "Belarus"
-msgstr "ቤላሩስ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:156
-msgid "Belgium"
-msgstr "ቤልጄም"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:157
-msgid "Belize"
-msgstr "ቤሊዘ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:158
-msgid "Benin"
-msgstr "ቤኒን"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:159
-msgid "Bermuda"
-msgstr "ቤርሙዳ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:160
-msgid "Bhutan"
-msgstr "ቡህታን"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:161
-msgid "Bolivia"
-msgstr "ቦሊቪያ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:162
-msgid "Bosnia And Herzegowina"
-msgstr ""
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:163
-msgid "Botswana"
-msgstr "ቦትስዋና"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:164
-msgid "Bouvet Island"
-msgstr "የቦውቬት ደሴት"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:165
-msgid "Brazil"
-msgstr "ብራዚል"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:166
-msgid "British Indian Ocean Territory"
-msgstr "የብሪታኒያ ህንድ ውቂያኖስ ግዛት"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:167
-msgid "Brunei Darussalam"
-msgstr "ብሩኒ ዳሩሳላም"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:168
-msgid "Bulgaria"
-msgstr "ቡልጌሪያ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:169
-msgid "Burkina Faso"
-msgstr "ቡርኪና ፋሶ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:170
-msgid "Burundi"
-msgstr "ብሩንዲ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:171
-msgid "Cambodia"
-msgstr "ካምቦዲያ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:172
-msgid "Cameroon"
-msgstr "ካሜሩን"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:173
-msgid "Canada"
-msgstr "ካናዳ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:174
-msgid "Cape Verde"
-msgstr "ኬፕ ቬርዴ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:175
-msgid "Cayman Islands"
-msgstr "ካይማን ደሴቶች"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:176
-msgid "Central African Republic"
-msgstr "የመካከለኛው አፍሪካ ሪፐብሊክ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:177
-msgid "Chad"
-msgstr "ቻድ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:178
-msgid "Chile"
-msgstr "ቺሊ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:179
-msgid "China"
-msgstr "ቻይና"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:180
-msgid "Christmas Island"
-msgstr "የገና ደሴቶች"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:181
-msgid "Cocos (Keeling) Islands"
-msgstr "ኮኮስ ኬሊንግ ደሴቶች"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:182
-msgid "Colombia"
-msgstr "ኮሎምቢያ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:183
-msgid "Comoros"
-msgstr "ኮሞሮስ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:184
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:185
-msgid "Congo"
-msgstr "ኮንጐ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:186
-msgid "Cook Islands"
-msgstr "ኩክ ደሴቶች"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:187
-msgid "Costa Rica"
-msgstr "ኮስታ ሪካ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:188
-msgid "Cote d'Ivoire"
-msgstr "ኮት ዲቯር"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:189
-msgid "Croatia"
-msgstr "ክሮኤሽያ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:190
-msgid "Cuba"
-msgstr "ኩባ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:191
-msgid "Cyprus"
-msgstr "ሳይፕረስ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:192
-msgid "Czech Republic"
-msgstr "ቼክ ሪፑብሊክ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:193
-msgid "Denmark"
-msgstr "ዴንማርክ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:194
-msgid "Djibouti"
-msgstr "ጂቡቲ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:195
-msgid "Dominica"
-msgstr "ዶሚኒካ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:196
-msgid "Dominican Republic"
-msgstr "ዶሚኒክ ሪፑብሊክ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:197
-msgid "East Timor"
-msgstr "ምስራቅ ቲሞር"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:198
-msgid "Ecuador"
-msgstr "ኢኳዶር"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:199
-msgid "Egypt"
-msgstr "ግብጽ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:200
-msgid "El Salvador"
-msgstr "ኤል ሳልቫዶር"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:201
-msgid "Equatorial Guinea"
-msgstr "ኢኳቶሪያል ጊኒ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:202
-msgid "Eritrea"
-msgstr "ኤርትራ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:203
-msgid "Estonia"
-msgstr "ኤስቶኒያ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:204
-msgid "Ethiopia"
-msgstr "ኢትዮጵያ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:205
-msgid "Falkland Islands"
-msgstr "የፎልክላንድ ደሴቶች"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:206
-msgid "Faroe Islands"
-msgstr "የፋሮይ ደሴቶች"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:207
-msgid "Fiji"
-msgstr "ፊጂ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:208
-msgid "Finland"
-msgstr "ፊንላንድ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:209
-msgid "France"
-msgstr "ፈረንሳይ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:210
-msgid "French Guiana"
-msgstr "የፈረንሳይ ጉዊአና"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:211
-msgid "French Polynesia"
-msgstr "የፈረንሳይ ፖሊኔዢያ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:212
-msgid "French Southern Territories"
-msgstr "የፈረንሳይ ደቡባዊ ግዛቶች"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:213
-msgid "Gabon"
-msgstr "ጋቦን"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:214
-msgid "Gambia"
-msgstr "ጋምቢያ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:215
-msgid "Georgia"
-msgstr "ጆርጂያ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:216
-msgid "Germany"
-msgstr "ጀርመን"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:217
-msgid "Ghana"
-msgstr "ጋና"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:218
-msgid "Gibraltar"
-msgstr "ጊብራልታር"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:219
-msgid "Greece"
-msgstr "ግሪክ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:220
-msgid "Greenland"
-msgstr "ግሪንላንድ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:221
-msgid "Grenada"
-msgstr "ግሬናዳ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:222
-msgid "Guadeloupe"
-msgstr "ጉዋደሉፕ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:223
-msgid "Guam"
-msgstr "ጉዋም"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:224
-msgid "Guatemala"
-msgstr "ጉዋቲማላ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:225
-msgid "Guinea"
-msgstr "ጊኒ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:226
-msgid "Guinea-bissau"
-msgstr "ጊኒ ቢሳዎ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:227
-msgid "Guyana"
-msgstr "ጉያና"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:228
-msgid "Haiti"
-msgstr "ሀይቲ*"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:229
-msgid "Heard And McDonald Islands"
-msgstr "የኧርድ እና የማክዶናልድ ደሴቶች"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:230
-msgid "Holy See"
-msgstr ""
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:231
-msgid "Honduras"
-msgstr "ሆንዱራስ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:232
-msgid "Hong Kong"
-msgstr "ሆንግ ኮንግ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:233
-msgid "Hungary"
-msgstr "ሀንጋሪ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:234
-msgid "Iceland"
-msgstr "አይስላንድ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:235
-msgid "India"
-msgstr "ህንድ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:236
-msgid "Indonesia"
-msgstr "ኢንዶኔዢያ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:237
-msgid "Ireland"
-msgstr "አየርላንድ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:238
-msgid "Israel"
-msgstr "እስራኤል"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:239
-msgid "Italy"
-msgstr "ጣሊያን"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:240
-msgid "Jamaica"
-msgstr "ጃማይካ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:241
-msgid "Japan"
-msgstr "ጃፓን"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:242
-msgid "Jordan"
-msgstr "ጆርዳን"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:243
-msgid "Kazakhstan"
-msgstr "ካዛኪስታን"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:244
-msgid "Kenya"
-msgstr "ኬንያ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:245
-msgid "Kiribati"
-msgstr "ኪሪባቲ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:246
-msgid "Korea, Republic Of"
-msgstr "ኮሪያ ሪፐብሊክ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:247
-msgid "Kuwait"
-msgstr "ክዌት"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:248
-msgid "Kyrgyzstan"
-msgstr ""
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:249
-msgid "Laos"
-msgstr "ላኦስ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:250
-msgid "Latvia"
-msgstr "ላትቪያ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:251
-msgid "Lebanon"
-msgstr "ሊባኖስ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:252
-msgid "Lesotho"
-msgstr "ሌሶቶ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:253
-msgid "Liberia"
-msgstr "ላይቤሪያ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:254
-msgid "Liechtenstein"
-msgstr "ሊችተንስታይን"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:255
-msgid "Lithuania"
-msgstr "ሊቱዌኒያ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:256
-msgid "Luxembourg"
-msgstr "ሉክሰምበርግ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:257
-msgid "Macau"
-msgstr "ማካዎ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:258
-msgid "Macedonia"
-msgstr "ማከዶኒያ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:259
-msgid "Madagascar"
-msgstr "ማዳጋስካር"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:260
-msgid "Malawi"
-msgstr "ማላዊ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:261
-msgid "Malaysia"
-msgstr "ማሌዢያ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:262
-msgid "Maldives"
-msgstr "ማልዲቭስ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:263
-msgid "Mali"
-msgstr "ማሊ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:264
-msgid "Malta"
-msgstr "ማልታ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:265
-msgid "Marshall Islands"
-msgstr "ማርሻል አይላንድ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:266
-msgid "Martinique"
-msgstr "ማርቲኒክ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:267
-msgid "Mauritania"
-msgstr "ሞሪቴኒያ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:268
-msgid "Mauritius"
-msgstr "ማሩሸስ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:269
-msgid "Mayotte"
-msgstr "ሜይኦቴ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:270
-msgid "Mexico"
-msgstr "ሜክሲኮ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:271
-msgid "Micronesia"
-msgstr "ሚክሮኔዢያ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:272
-msgid "Moldova, Republic Of"
-msgstr ""
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:273
-msgid "Monaco"
-msgstr "ሞናኮ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:274
-msgid "Mongolia"
-msgstr "ሞንጎሊያ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:275
-msgid "Montserrat"
-msgstr "ሞንትሴራት"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:276
-msgid "Morocco"
-msgstr "ሞሮኮ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:277
-msgid "Mozambique"
-msgstr "ሞዛምቢክ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:278
-msgid "Myanmar"
-msgstr "ማያንማር"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:279
-msgid "Namibia"
-msgstr "ናሚቢያ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:280
-msgid "Nauru"
-msgstr "ናኡሩ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:281
-msgid "Nepal"
-msgstr "ኔፓል"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:282
-msgid "Netherlands"
-msgstr "ኔዘርላንድ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:283
-msgid "Netherlands Antilles"
-msgstr "ኔዘርላንድስ አንቲልስ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:284
-msgid "New Caledonia"
-msgstr "ኒው ካሌዶኒያ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:285
-msgid "New Zealand"
-msgstr "ኒው ዚላንድ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:286
-msgid "Nicaragua"
-msgstr "ኒካራጓ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:287
-msgid "Niger"
-msgstr "ኒጀር"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:288
-msgid "Nigeria"
-msgstr "ናይጄሪያ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:289
-msgid "Niue"
-msgstr "ኒኡይ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:290
-msgid "Norfolk Island"
-msgstr "ኖርፎልክ ደሴት"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:291
-msgid "Northern Mariana Islands"
-msgstr "የሰሜናዊ ማሪያና ደሴቶች"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:292
-msgid "Norway"
-msgstr "ኖርዌ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:293
-msgid "Oman"
-msgstr "ኦማን"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:294
-msgid "Pakistan"
-msgstr "ፓኪስታን"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:295
-msgid "Palau"
-msgstr "ፓላው"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:296
-msgid "Palestinian Territory"
-msgstr ""
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:297
-msgid "Panama"
-msgstr "ፓናማ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:298
-msgid "Papua New Guinea"
-msgstr "ፓፑዋ ኒው ጊኒ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:299
-msgid "Paraguay"
-msgstr "ፓራጓይ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:300
-msgid "Peru"
-msgstr "ፔሩ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:301
-msgid "Philippines"
-msgstr "ፊሊፒንስ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:302
-msgid "Pitcairn"
-msgstr "ፒትካኢርን"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:303
-msgid "Poland"
-msgstr "ፖላንድ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:304
-msgid "Portugal"
-msgstr "ፖርቱጋል"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:305
-msgid "Puerto Rico"
-msgstr "ፖርታ ሪኮ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:306
-msgid "Qatar"
-msgstr "ኳታር"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:307
-msgid "Reunion"
-msgstr "ውህደት"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:308
-msgid "Romania"
-msgstr "ሮሜኒያ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:309
-msgid "Russian Federation"
-msgstr "ራሺያ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:310
-msgid "Rwanda"
-msgstr "ሩዋንዳ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:311
-msgid "Saint Kitts And Nevis"
-msgstr ""
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:312
-msgid "Saint Lucia"
-msgstr "ሴንት ሉቺያ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:313
-msgid "Saint Vincent And The Grena-dines"
-msgstr ""
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:314
-msgid "Samoa"
-msgstr "ሳሞአ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:315
-msgid "San Marino"
-msgstr "ሳን ማሪኖ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:316
-msgid "Sao Tome And Principe"
-msgstr "ሳኦ ቶሜ እና ፕሪንሲፔ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:317
-msgid "Saudi Arabia"
-msgstr "ሳውድአረቢያ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:318
-msgid "Senegal"
-msgstr "ሴኔጋል"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:319
-msgid "Seychelles"
-msgstr "ሲሼልስ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:320
-msgid "Sierra Leone"
-msgstr "ሴራሊዮን"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:321
-msgid "Singapore"
-msgstr "ሲንጋፖር"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:322
-msgid "Slovakia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:323
-msgid "Slovenia"
-msgstr "ስሎቬኒያ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:324
-msgid "Solomon Islands"
-msgstr "ሰሎሞን ደሴት"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:325
-msgid "Somalia"
-msgstr "ሱማሌ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:326
-msgid "South Africa"
-msgstr "ደቡብ አፍሪካ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:327
-msgid "South Georgia And The South Sandwich Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:328
-msgid "Spain"
-msgstr "ስፔን"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:329
-msgid "Sri Lanka"
-msgstr "ሲሪላንካ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:330
-msgid "St. Helena"
-msgstr "ሴንት ሄለና"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:331
-msgid "St. Pierre And Miquelon"
-msgstr "ቅዱስ ፒዬር እና ሚኩኤሎን"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:332
-msgid "Sudan"
-msgstr "ሱዳን"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:333
-msgid "Suriname"
-msgstr "ሱሪናም"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:334
-msgid "Svalbard And Jan Mayen Islands"
-msgstr "የስቫልባርድ እና ዣን ማየን ደሴቶች"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:335
-msgid "Swaziland"
-msgstr "ሱዋዚላንድ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:336
-msgid "Sweden"
-msgstr "ስዊድን"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:337
-msgid "Switzerland"
-msgstr "ስዊዘርላንድ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:338
-msgid "Taiwan"
-msgstr "ታይዋን"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:339
-msgid "Tajikistan"
-msgstr "ታጃኪስታን"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:340
-msgid "Tanzania, United Republic Of"
-msgstr ""
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:341
-msgid "Thailand"
-msgstr "ታይላንድ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:342
-msgid "Togo"
-msgstr "ቶጐ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:343
-msgid "Tokelau"
-msgstr "ቶክላው"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:344
-msgid "Tonga"
-msgstr "ቶንጋ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:345
-msgid "Trinidad And Tobago"
-msgstr "ትሪኒዳድ እና ቶባጎ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:346
-msgid "Tunisia"
-msgstr "ቱኒዚያ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:347
-msgid "Turkey"
-msgstr "ቱርክ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:348
-msgid "Turkmenistan"
-msgstr "ቱርክሜኒስታን"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:349
-msgid "Turks And Caicos Islands"
-msgstr "የቱርኮችና የካኢኮስ ደሴቶች"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:350
-msgid "Tuvalu"
-msgstr "ቱቫሉ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:351
-msgid "Uganda"
-msgstr "ዩጋንዳ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:352
-msgid "Ukraine"
-msgstr "ዩክሬን"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:353
-msgid "United Arab Emirates"
-msgstr "የተባበሩት አረብ ኤምሬትስ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:354
-msgid "United Kingdom"
-msgstr "እንግሊዝ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:355
-msgid "United States Minor Outlying Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:356
-msgid "Uruguay"
-msgstr "ኡራጓይ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:357
-msgid "Uzbekistan"
-msgstr "ዩዝበኪስታን"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:358
-msgid "Vanuatu"
-msgstr "ቫኑአቱ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:359
-msgid "Venezuela"
-msgstr "ቬንዙዌላ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:360
-msgid "Viet Nam"
-msgstr ""
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:361
-msgid "Virgin Islands, British"
-msgstr ""
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:362
-msgid "Virgin Islands, U.S."
-msgstr ""
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:363
-msgid "Wallis And Futuna Islands"
-msgstr "ዋሊስ እና ፉቱና ደሴቶች"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:364
-msgid "Western Sahara"
-msgstr "ምዕራባዊ ሳህራ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:365
-msgid "Yemen"
-msgstr "የመን"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:366
-msgid "Yugoslavia"
-msgstr "ዩጎዝላቪያ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:367
-msgid "Zambia"
-msgstr "ዛምቢያ"
-
-#: addressbook/gui/contact-editor/e-contact-editor-address.c:368
-msgid "Zimbabwe"
-msgstr "ዚምቧቤ"
-
-#: addressbook/gui/contact-editor/e-contact-editor.c:184
-#: addressbook/gui/contact-list-editor/e-contact-list-editor.c:162
-#: addressbook/gui/widgets/e-addressbook-model.c:298
-#: addressbook/gui/widgets/e-addressbook-reflow-adapter.c:378
-#: addressbook/gui/widgets/e-addressbook-view.c:177
-#: addressbook/gui/widgets/e-minicard-view-widget.c:105
-#: addressbook/gui/widgets/e-minicard-view.c:460
-msgid "Book"
-msgstr ""
-
-#: addressbook/gui/contact-editor/e-contact-editor.c:191
-#: addressbook/gui/contact-list-editor/e-contact-list-editor.c:169
-#: addressbook/gui/contact-list-editor/e-contact-list-editor.etspec.h:1
-#: addressbook/gui/widgets/e-minicard.c:189
-msgid "Contact"
-msgstr ""
-
-#: addressbook/gui/contact-editor/e-contact-editor.c:198
-msgid "Is New Contact"
-msgstr ""
-
-#: addressbook/gui/contact-editor/e-contact-editor.c:205
-msgid "Writable Fields"
-msgstr ""
-
-#: addressbook/gui/contact-editor/e-contact-editor.c:219
-msgid "Changed"
-msgstr ""
-
-#: addressbook/gui/contact-editor/e-contact-editor.c:855
-msgid "Category editor not available."
-msgstr ""
-
-#: addressbook/gui/contact-editor/e-contact-editor.c:863
-msgid "This contact belongs to these categories:"
-msgstr ""
-
-#: addressbook/gui/contact-editor/e-contact-editor.c:1034
-msgid "Save Contact as VCard"
-msgstr ""
-
-#: addressbook/gui/contact-editor/e-contact-editor.c:1074
-msgid ""
-"Are you sure you want\n"
-"to delete these contacts?"
-msgstr ""
-
-#: addressbook/gui/contact-editor/e-contact-editor.c:1077
-msgid ""
-"Are you sure you want\n"
-"to delete this contact?"
-msgstr ""
-
-#: addressbook/gui/contact-editor/e-contact-editor.c:1780
-msgid "Business"
-msgstr ""
-
-#: addressbook/gui/contact-editor/e-contact-editor.c:1781
-msgid "Home"
-msgstr "መጀመሪያ"
-
-#: addressbook/gui/contact-editor/e-contact-editor.c:1782
-msgid "Other"
-msgstr "ሌላ"
-
-#: addressbook/gui/contact-editor/e-contact-editor.c:2284
-#, c-format
-msgid "Could not find widget for a field: `%s'"
-msgstr ""
-
-#: addressbook/gui/contact-editor/e-contact-quick-add.c:290
-msgid "Contact Quick-Add"
-msgstr ""
-
-#: addressbook/gui/contact-editor/e-contact-quick-add.c:293
-#, fuzzy
-msgid "_Edit Full"
-msgstr "አስተካክል"
-
-#: addressbook/gui/contact-editor/e-contact-quick-add.c:311
-#, fuzzy
-msgid "_Full Name:"
-msgstr "ሙሉ ስም"
-
-#: addressbook/gui/contact-editor/e-contact-quick-add.c:317
-#, fuzzy
-msgid "E-_mail:"
-msgstr "ኢሜይል፦"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:2
-msgid "Address _2:"
-msgstr "አድራሻ"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:3
-#, fuzzy
-msgid "Ci_ty:"
-msgstr "ከተማ"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:4
-msgid "Countr_y:"
-msgstr "አገር"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:5
-#, fuzzy
-msgid "Full Address"
-msgstr "አድራሻ"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:6
-msgid "_Address:"
-msgstr "አድራሻ"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:7
-msgid "_PO Box:"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:8
-msgid "_State/Province:"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:9
-msgid "_ZIP Code:"
-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
-#: addressbook/gui/widgets/e-addressbook-view.etspec.h:15
-msgid "Full Name"
-msgstr "ሙሉ ስም"
-
-#: addressbook/gui/contact-editor/fullname.glade.h:5
-msgid "I"
-msgstr "i p,"
-
-#: addressbook/gui/contact-editor/fullname.glade.h:6
-msgid "II"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fullname.glade.h:7
-msgid "III"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fullname.glade.h:8
-msgid "Jr."
-msgstr ""
-
-#: addressbook/gui/contact-editor/fullname.glade.h:9
-msgid "Miss"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fullname.glade.h:10
-msgid "Mr."
-msgstr ""
-
-#: addressbook/gui/contact-editor/fullname.glade.h:11
-msgid "Mrs."
-msgstr ""
-
-#: addressbook/gui/contact-editor/fullname.glade.h:12
-msgid "Ms."
-msgstr "ms"
-
-#: addressbook/gui/contact-editor/fullname.glade.h:13
-msgid "Sr."
-msgstr ""
-
-#: addressbook/gui/contact-editor/fullname.glade.h:14
-msgid "_First:"
-msgstr "መጀመሪያ"
-
-#: addressbook/gui/contact-editor/fullname.glade.h:15
-msgid "_Last:"
-msgstr "መጨረሻ"
-
-#: addressbook/gui/contact-editor/fullname.glade.h:16
-msgid "_Middle:"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fullname.glade.h:17
-msgid "_Suffix:"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fullname.glade.h:18
-msgid "_Title:"
-msgstr "አርእስት"
-
-#: addressbook/gui/contact-list-editor/contact-list-editor.glade.h:4
-msgid "Members"
-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
-#, fuzzy
-msgid "_List name:"
-msgstr "የፋይል ስም"
-
-#: addressbook/gui/contact-list-editor/contact-list-editor.glade.h:7
-msgid "_Type an email address or drag a contact into the list below:"
-msgstr ""
-
-#: addressbook/gui/contact-list-editor/contact-list-editor.glade.h:8
-msgid "contact-list-editor"
-msgstr ""
-
-#: addressbook/gui/contact-list-editor/e-contact-list-editor.c:176
-msgid "Is New List"
-msgstr ""
-
-#. Construct the app
-#: addressbook/gui/contact-list-editor/e-contact-list-editor.c:272
-msgid "Contact List Editor"
-msgstr ""
-
-#: addressbook/gui/contact-list-editor/e-contact-list-editor.c:502
-msgid "Save List as VCard"
-msgstr ""
-
-#: addressbook/gui/merging/eab-contact-commit-duplicate-detected.glade.h:1
-msgid "Changed Contact:"
-msgstr ""
-
-#: addressbook/gui/merging/eab-contact-commit-duplicate-detected.glade.h:2
-msgid "Conflicting Contact:"
-msgstr ""
-
-#: addressbook/gui/merging/eab-contact-commit-duplicate-detected.glade.h:3
-#: addressbook/gui/merging/eab-contact-duplicate-detected.glade.h:1
-msgid "Duplicate Contact Detected"
-msgstr ""
-
-#: addressbook/gui/merging/eab-contact-commit-duplicate-detected.glade.h:4
-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/merging/eab-contact-duplicate-detected.glade.h:2
-msgid "New Contact:"
-msgstr ""
-
-#: addressbook/gui/merging/eab-contact-duplicate-detected.glade.h:3
-msgid "Original Contact:"
-msgstr ""
-
-#: addressbook/gui/merging/eab-contact-duplicate-detected.glade.h:4
-msgid ""
-"The name or email address of this contact already exists\n"
-"in this folder. Would you like to add it anyway?"
-msgstr ""
-
-#. FIXME: get the toplevel window...
-#: addressbook/gui/search/e-addressbook-search-dialog.c:116
-#: widgets/misc/e-filter-bar.c:148
-msgid "Advanced Search"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-model.c:148
-msgid "No contacts"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-model.c:151
-#, fuzzy
-msgid "1 contact"
-msgstr "ወር"
-
-#: addressbook/gui/widgets/e-addressbook-model.c:154
-#, fuzzy, c-format
-msgid "%d contacts"
-msgstr "%d ሴኮንዶች"
-
-#: addressbook/gui/widgets/e-addressbook-model.c:305
-#: addressbook/gui/widgets/e-addressbook-reflow-adapter.c:385
-#: addressbook/gui/widgets/e-addressbook-view.c:184
-#: addressbook/gui/widgets/e-minicard-view-widget.c:112
-#: addressbook/gui/widgets/e-minicard-view.c:467
-msgid "Query"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-model.c:448
-msgid "Error getting book view"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-reflow-adapter.c:399
-msgid "Model"
-msgstr "ሞዴል"
-
-#: addressbook/gui/widgets/e-addressbook-table-adapter.c:114
-msgid "Error modifying card"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.c:191
-#: calendar/gui/dialogs/meeting-page.etspec.h:11
-#: calendar/gui/e-calendar-table.etspec.h:17
-#: calendar/gui/e-meeting-list-view.c:249
-#: calendar/gui/e-meeting-time-sel.etspec.h:11
-msgid "Type"
-msgstr "ዓይነት"
-
-#: addressbook/gui/widgets/e-addressbook-view.c:399
-#: mail/importers/pine-importer.c:577
-msgid "Addressbook"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.c:674
-#: addressbook/gui/widgets/e-addressbook-view.c:894
-#: addressbook/gui/widgets/e-addressbook-view.c:1653
-#: ui/evolution-addressbook.xml.h:19
-msgid "Save as VCard"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.c:881
-msgid "New Contact..."
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.c:882
-msgid "New Contact List..."
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.c:885
-msgid "Go to Folder..."
-msgstr "ወደ ዶሴን ሂዱ..."
-
-#: addressbook/gui/widgets/e-addressbook-view.c:886
-msgid "Import..."
-msgstr "ከውጭ አስገባ"
-
-#: addressbook/gui/widgets/e-addressbook-view.c:888
-msgid "Search for Contacts..."
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.c:889
-msgid "Addressbook Sources..."
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.c:891
-msgid "Pilot Settings..."
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.c:895
-#: ui/evolution-addressbook.xml.h:10
-msgid "Forward Contact"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.c:896
-msgid "Send Message to Contact"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.c:897 calendar/gui/print.c:2452
-#: ui/evolution-addressbook.xml.h:16 ui/evolution-comp-editor.xml.h:8
-#: ui/evolution-contact-editor.xml.h:5 ui/evolution-mail-message.xml.h:78
-#: ui/my-evolution.xml.h:1
-msgid "Print"
-msgstr "አትም"
-
-#: addressbook/gui/widgets/e-addressbook-view.c:899
-msgid "Print Envelope"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.c:903
-msgid "Copy to folder..."
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.c:904
-msgid "Move to folder..."
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.c:907
-#: ui/evolution-addressbook.xml.h:6 ui/evolution-tasks.xml.h:4
-msgid "Cut"
-msgstr "ቁረጥ"
-
-#. create the dialog
-#: addressbook/gui/widgets/e-addressbook-view.c:908
-#: calendar/gui/calendar-component.c:429
-#: calendar/gui/dialogs/copy-source-dialog.c:135
-#: calendar/gui/tasks-component.c:400 ui/evolution-addressbook.xml.h:2
-#: ui/evolution-mail-message.xml.h:9 ui/evolution-tasks.xml.h:2
-msgid "Copy"
-msgstr "ቅጂ"
-
-#: addressbook/gui/widgets/e-addressbook-view.c:909
-#: ui/evolution-addressbook.xml.h:13 ui/evolution-tasks.xml.h:10
-msgid "Paste"
-msgstr "ለጥፍ"
-
-#: addressbook/gui/widgets/e-addressbook-view.c:914
-#: calendar/gui/e-cal-view.c:1192
-msgid "Current View"
-msgstr "የአሁኑ ዕይታ"
-
-#: addressbook/gui/widgets/e-addressbook-view.c:1099
-#, c-format
-msgid ""
-"The addressbook backend for\n"
-"%s\n"
-"has crashed. You will have to restart Evolution in order to use it again"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.etspec.h:1
-msgid "Assistant"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.etspec.h:2
-msgid "Assistant Phone"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.etspec.h:3
-msgid "Business Fax"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.etspec.h:4
-msgid "Business Phone"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.etspec.h:5
-msgid "Business Phone 2"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.etspec.h:6
-msgid "Callback Phone"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.etspec.h:7
-msgid "Car Phone"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.etspec.h:8
-#: calendar/gui/e-cal-list-view.etspec.h:1
-#: calendar/gui/e-calendar-table.etspec.h:4
-msgid "Categories"
-msgstr "ምድቦች"
-
-#: addressbook/gui/widgets/e-addressbook-view.etspec.h:9
-msgid "Company Phone"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.etspec.h:10
-#: addressbook/gui/widgets/eab-contact-display.c:216
-#: addressbook/gui/widgets/eab-contact-display.c:217
-#: addressbook/gui/widgets/eab-contact-display.c:218
-#: addressbook/gui/widgets/eab-contact-display.c:348 smime/lib/e-cert.c:769
-msgid "Email"
-msgstr "ኢሜይል"
-
-#: addressbook/gui/widgets/e-addressbook-view.etspec.h:11
-#: addressbook/gui/widgets/eab-popup-control.c:460
-msgid "Email 2"
-msgstr "ኢሜይል"
-
-#: addressbook/gui/widgets/e-addressbook-view.etspec.h:12
-#: addressbook/gui/widgets/eab-popup-control.c:470
-msgid "Email 3"
-msgstr "ኢሜይል"
-
-#: addressbook/gui/widgets/e-addressbook-view.etspec.h:13
-msgid "Family Name"
-msgstr "የቤተሰብ ስም"
-
-#: addressbook/gui/widgets/e-addressbook-view.etspec.h:14
-msgid "File As"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.etspec.h:16
-#, fuzzy
-msgid "Given Name"
-msgstr "የሰርቨር ስም"
-
-#: addressbook/gui/widgets/e-addressbook-view.etspec.h:17
-msgid "Home Fax"
-msgstr "የቤት ፋክስ"
-
-#: addressbook/gui/widgets/e-addressbook-view.etspec.h:18
-msgid "Home Phone"
-msgstr "የቤት ስልክ"
-
-#: addressbook/gui/widgets/e-addressbook-view.etspec.h:19
-msgid "Home Phone 2"
-msgstr "የቤት ስልክ"
-
-#: addressbook/gui/widgets/e-addressbook-view.etspec.h:20
-#, fuzzy
-msgid "ISDN Phone"
-msgstr "የቤት ስልክ"
-
-#: addressbook/gui/widgets/e-addressbook-view.etspec.h:21
-#, fuzzy
-msgid "Journal"
-msgstr "ጆርዳን"
-
-#: addressbook/gui/widgets/e-addressbook-view.etspec.h:22
-msgid "Manager"
-msgstr "መቆጣጠሪያ"
-
-#: addressbook/gui/widgets/e-addressbook-view.etspec.h:23
-msgid "Mobile Phone"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.etspec.h:24
-msgid "Nickname"
-msgstr "ቅጽል ስም"
-
-#: addressbook/gui/widgets/e-addressbook-view.etspec.h:25
-msgid "Note"
-msgstr "ማስታወሻ"
-
-#: addressbook/gui/widgets/e-addressbook-view.etspec.h:26
-msgid "Office"
-msgstr "ቢሮ"
-
-#: addressbook/gui/widgets/e-addressbook-view.etspec.h:27
-msgid "Organization"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.etspec.h:28
-msgid "Other Fax"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.etspec.h:29
-msgid "Other Phone"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.etspec.h:30
-msgid "Pager"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.etspec.h:31
-msgid "Primary Phone"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.etspec.h:32
-msgid "Radio"
-msgstr "ሬዲዮ"
-
-#: addressbook/gui/widgets/e-addressbook-view.etspec.h:33
-#: calendar/gui/dialogs/meeting-page.etspec.h:9
-#: calendar/gui/e-meeting-list-view.c:256
-#: calendar/gui/e-meeting-time-sel.etspec.h:9
-msgid "Role"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.etspec.h:34
-msgid "Spouse"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.etspec.h:35
-#, fuzzy
-msgid "TTYTDD"
-msgstr "tty"
-
-#: addressbook/gui/widgets/e-addressbook-view.etspec.h:36
-msgid "Telex"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.etspec.h:37
-msgid "Title"
-msgstr "አርእስት"
-
-#: addressbook/gui/widgets/e-addressbook-view.etspec.h:38
-#, fuzzy
-msgid "Unit"
-msgstr "ያልተሰየመ"
-
-#: addressbook/gui/widgets/e-addressbook-view.etspec.h:39
-msgid "Web Site"
-msgstr ""
-
-#: addressbook/gui/widgets/e-minicard-label.c:115
-#: addressbook/gui/widgets/e-minicard.c:145
-msgid "Width"
-msgstr "ስፋት"
-
-#: addressbook/gui/widgets/e-minicard-label.c:122
-#: addressbook/gui/widgets/e-minicard.c:152
-msgid "Height"
-msgstr "እርዝማኔ"
-
-#: addressbook/gui/widgets/e-minicard-label.c:129
-#: addressbook/gui/widgets/e-minicard.c:160
-msgid "Has Focus"
-msgstr ""
-
-#: addressbook/gui/widgets/e-minicard-label.c:136
-msgid "Field"
-msgstr "መጻፊያ ሳጥን"
-
-#: addressbook/gui/widgets/e-minicard-label.c:143
-msgid "Field Name"
-msgstr ""
-
-#: addressbook/gui/widgets/e-minicard-label.c:150
-msgid "Text Model"
-msgstr ""
-
-#: addressbook/gui/widgets/e-minicard-label.c:157
-msgid "Max field name length"
-msgstr ""
-
-#: addressbook/gui/widgets/e-minicard-view-widget.c:126
-msgid "Column Width"
-msgstr ""
-
-#: addressbook/gui/widgets/e-minicard-view.c:142
-msgid ""
-"\n"
-"\n"
-"There are no items to show in this view.\n"
-"\n"
-"Double-click here to create a new Contact."
-msgstr ""
-
-#: addressbook/gui/widgets/e-minicard-view.c:145
-msgid ""
-"\n"
-"\n"
-"There are no items to show in this view."
-msgstr ""
-
-#: addressbook/gui/widgets/e-minicard-view.c:453
-msgid "Adapter"
-msgstr ""
-
-#: addressbook/gui/widgets/e-minicard.c:168
-msgid "Selected"
-msgstr "ተመርጠዋል"
-
-#: addressbook/gui/widgets/e-minicard.c:175
-msgid "Has Cursor"
-msgstr ""
-
-#: addressbook/gui/widgets/eab-contact-display.c:93
-#: addressbook/gui/widgets/eab-contact-display.c:114
-msgid "Map It"
-msgstr ""
-
-#: addressbook/gui/widgets/eab-contact-display.c:198
-#: addressbook/gui/widgets/eab-contact-display.c:324
-#, fuzzy
-msgid "List Members"
-msgstr "የፋይል ስም"
-
-#: addressbook/gui/widgets/eab-contact-display.c:214
-#: addressbook/gui/widgets/eab-contact-display.c:344
-#, fuzzy
-msgid "Job Title"
-msgstr "አርእስት"
-
-#: addressbook/gui/widgets/eab-contact-display.c:221
-msgid "Home Address"
-msgstr ""
-
-#: addressbook/gui/widgets/eab-contact-display.c:222
-#, fuzzy
-msgid "Work Address"
-msgstr "አድራሻ"
-
-#: addressbook/gui/widgets/eab-contact-display.c:223
-msgid "Other Address"
-msgstr ""
-
-#: addressbook/gui/widgets/eab-contact-display.c:227
-#: addressbook/gui/widgets/eab-contact-display.c:375
-#, fuzzy
-msgid "Home page"
-msgstr "የቤት ፋክስ"
-
-#: addressbook/gui/widgets/eab-contact-display.c:228
-#: addressbook/gui/widgets/eab-contact-display.c:383
-msgid "Blog"
-msgstr ""
-
-#: addressbook/gui/widgets/eab-gui-util.c:43
-msgid "Success"
-msgstr ""
-
-#: addressbook/gui/widgets/eab-gui-util.c:44
-#: camel/providers/imap/camel-imap-command.c:306
-#: camel/providers/imap/camel-imap-command.c:403
-#: camel/providers/pop3/camel-pop3-store.c:536
-#: camel/providers/pop3/camel-pop3-store.c:543 shell/e-shell.c:1011
-msgid "Unknown error"
-msgstr "ያልታወቀ ስህተት"
-
-#: addressbook/gui/widgets/eab-gui-util.c:45
-msgid "Repository offline"
-msgstr ""
-
-#: addressbook/gui/widgets/eab-gui-util.c:46
-msgid "Permission denied"
-msgstr ""
-
-#: addressbook/gui/widgets/eab-gui-util.c:47
-#, fuzzy
-msgid "Contact not found"
-msgstr "አልተገኘም"
-
-#: addressbook/gui/widgets/eab-gui-util.c:48
-msgid "Contact ID already exists"
-msgstr ""
-
-#: addressbook/gui/widgets/eab-gui-util.c:49
-msgid "Protocol not supported"
-msgstr ""
-
-#: addressbook/gui/widgets/eab-gui-util.c:50
-#: calendar/gui/dialogs/task-details-page.glade.h:3
-#: calendar/gui/e-cal-model-tasks.c:325 calendar/gui/e-cal-model-tasks.c:600
-#: calendar/gui/e-calendar-table.c:478 calendar/gui/e-tasks.c:213
-#: calendar/gui/print.c:2320 camel/camel-service.c:734
-#: camel/camel-service.c:772 camel/camel-service.c:856
-#: camel/camel-service.c:896 camel/providers/pop3/camel-pop3-store.c:453
-#: camel/providers/pop3/camel-pop3-store.c:530
-msgid "Cancelled"
-msgstr ""
-
-#: addressbook/gui/widgets/eab-gui-util.c:51
-msgid "Authentication Failed"
-msgstr ""
-
-#: addressbook/gui/widgets/eab-gui-util.c:52
-msgid "Authentication Required"
-msgstr ""
-
-#: addressbook/gui/widgets/eab-gui-util.c:53
-msgid "TLS not Available"
-msgstr ""
-
-#: addressbook/gui/widgets/eab-gui-util.c:54
-msgid "Addressbook does not exist"
-msgstr ""
-
-#: addressbook/gui/widgets/eab-gui-util.c:55
-msgid "Other error"
-msgstr ""
-
-#: addressbook/gui/widgets/eab-gui-util.c:82
-msgid "Do you want to save changes?"
-msgstr ""
-
-#: addressbook/gui/widgets/eab-gui-util.c:84
-msgid "_Discard"
-msgstr ""
-
-#: addressbook/gui/widgets/eab-gui-util.c:103
-msgid "Error adding list"
-msgstr ""
-
-#: addressbook/gui/widgets/eab-gui-util.c:103
-#: addressbook/gui/widgets/eab-gui-util.c:457
-msgid "Error adding contact"
-msgstr ""
-
-#: addressbook/gui/widgets/eab-gui-util.c:112
-msgid "Error modifying list"
-msgstr ""
-
-#: addressbook/gui/widgets/eab-gui-util.c:112
-msgid "Error modifying contact"
-msgstr ""
-
-#: addressbook/gui/widgets/eab-gui-util.c:122
-msgid "Error removing list"
-msgstr ""
-
-#: addressbook/gui/widgets/eab-gui-util.c:122
-#: addressbook/gui/widgets/eab-gui-util.c:415
-msgid "Error removing contact"
-msgstr ""
-
-#: addressbook/gui/widgets/eab-gui-util.c:204
-#, c-format
-msgid ""
-"Opening %d contacts will open %d new windows as well.\n"
-"Do you really want to display all of these contacts?"
-msgstr ""
-
-#: addressbook/gui/widgets/eab-gui-util.c:230
-#, c-format
-msgid ""
-"%s already exists\n"
-"Do you want to overwrite it?"
-msgstr ""
-
-#: addressbook/gui/widgets/eab-gui-util.c:234
-msgid "Overwrite"
-msgstr "በላዩ ላይ ይጻፍ"
-
-#: addressbook/gui/widgets/eab-gui-util.c:270
-#, c-format
-msgid "Error saving %s: %s"
-msgstr ""
-
-#. This is a filename. Translators take note.
-#: addressbook/gui/widgets/eab-gui-util.c:307
-msgid "card.vcf"
-msgstr ""
-
-#: addressbook/gui/widgets/eab-gui-util.c:376
-msgid "list"
-msgstr "ዝርዝር"
-
-#: addressbook/gui/widgets/eab-gui-util.c:513
-msgid "Move contact to"
-msgstr ""
-
-#: addressbook/gui/widgets/eab-gui-util.c:515
-msgid "Copy contact to"
-msgstr ""
-
-#: addressbook/gui/widgets/eab-gui-util.c:518
-msgid "Move contacts to"
-msgstr ""
-
-#: addressbook/gui/widgets/eab-gui-util.c:520
-msgid "Copy contacts to"
-msgstr ""
-
-#: addressbook/gui/widgets/eab-gui-util.c:706
-msgid "Multiple VCards"
-msgstr ""
-
-#: addressbook/gui/widgets/eab-gui-util.c:714
-#, c-format
-msgid "VCard for %s"
-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
-#. * contact.
-#.
-#: addressbook/gui/widgets/eab-popup-control.c:188
-msgid "(none)"
-msgstr "(ምንም)"
-
-#: addressbook/gui/widgets/eab-popup-control.c:450
-msgid "Primary Email"
-msgstr ""
-
-#: addressbook/gui/widgets/eab-popup-control.c:586
-msgid "Select an Action"
-msgstr ""
-
-#: addressbook/gui/widgets/eab-popup-control.c:594
-#, c-format
-msgid "Create a new contact \"%s\""
-msgstr ""
-
-#: addressbook/gui/widgets/eab-popup-control.c:610
-#, c-format
-msgid "Add address to existing contact \"%s\""
-msgstr ""
-
-#: addressbook/gui/widgets/eab-popup-control.c:888
-msgid "Querying Addressbook..."
-msgstr ""
-
-#: addressbook/gui/widgets/eab-popup-control.c:972
-msgid "Edit Contact Info"
-msgstr ""
-
-#: addressbook/gui/widgets/eab-popup-control.c:1027
-msgid "Merge E-Mail Address"
-msgstr ""
-
-#: addressbook/gui/widgets/eab-vcard-control.c:140
-#, c-format
-msgid "and %d other contacts."
-msgstr ""
-
-#: addressbook/gui/widgets/eab-vcard-control.c:142
-msgid "and one other contact."
-msgstr ""
-
-#: addressbook/gui/widgets/eab-vcard-control.c:225
-#: addressbook/gui/widgets/eab-vcard-control.c:275
-msgid "Show Full VCard"
-msgstr ""
-
-#: addressbook/gui/widgets/eab-vcard-control.c:229
-msgid "Show Compact VCard"
-msgstr ""
-
-#: addressbook/gui/widgets/eab-vcard-control.c:280
-msgid "Save in addressbook"
-msgstr ""
-
-#: addressbook/gui/widgets/gal-view-factory-minicard.c:24
-msgid "Card View"
-msgstr ""
-
-#: addressbook/gui/widgets/gal-view-factory-treeview.c:25
-msgid "GTK Tree View"
-msgstr "የGTK ዛፍ ዕይታ"
-
-#: addressbook/gui/widgets/test-reflow.c:106
-msgid "Reflow Test"
-msgstr ""
-
-#: addressbook/gui/widgets/test-reflow.c:107
-#: addressbook/printing/test-contact-print-style-editor.c:54
-#: addressbook/printing/test-print.c:53
-msgid "Copyright (C) 2000, Ximian, Inc."
-msgstr ""
-
-#: addressbook/gui/widgets/test-reflow.c:109
-msgid "This should test the reflow canvas item"
-msgstr ""
-
-#: addressbook/printing/e-contact-print-envelope.c:212
-#: addressbook/printing/e-contact-print-envelope.c:233
-msgid "Print envelope"
-msgstr ""
-
-#: addressbook/printing/e-contact-print.c:1003
-msgid "Print contacts"
-msgstr ""
-
-#: addressbook/printing/e-contact-print.c:1069